@vitessce/json 3.0.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -242,8 +242,8 @@ var util$4;
242
242
  return void 0;
243
243
  };
244
244
  util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && isFinite(val) && Math.floor(val) === val;
245
- function joinValues(array, separator = " | ") {
246
- return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
245
+ function joinValues(array2, separator = " | ") {
246
+ return array2.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
247
247
  }
248
248
  util2.joinValues = joinValues;
249
249
  util2.jsonStringifyReplacer = (_, value) => {
@@ -4147,13 +4147,13 @@ var baseCreate = function() {
4147
4147
  };
4148
4148
  }();
4149
4149
  const baseCreate$1 = baseCreate;
4150
- function copyArray(source, array) {
4150
+ function copyArray(source, array2) {
4151
4151
  var index2 = -1, length2 = source.length;
4152
- array || (array = Array(length2));
4152
+ array2 || (array2 = Array(length2));
4153
4153
  while (++index2 < length2) {
4154
- array[index2] = source[index2];
4154
+ array2[index2] = source[index2];
4155
4155
  }
4156
- return array;
4156
+ return array2;
4157
4157
  }
4158
4158
  var defineProperty$2 = function() {
4159
4159
  try {
@@ -4164,14 +4164,14 @@ var defineProperty$2 = function() {
4164
4164
  }
4165
4165
  }();
4166
4166
  const defineProperty$3 = defineProperty$2;
4167
- function arrayEach(array, iteratee) {
4168
- var index2 = -1, length2 = array == null ? 0 : array.length;
4167
+ function arrayEach(array2, iteratee) {
4168
+ var index2 = -1, length2 = array2 == null ? 0 : array2.length;
4169
4169
  while (++index2 < length2) {
4170
- if (iteratee(array[index2], index2, array) === false) {
4170
+ if (iteratee(array2[index2], index2, array2) === false) {
4171
4171
  break;
4172
4172
  }
4173
4173
  }
4174
- return array;
4174
+ return array2;
4175
4175
  }
4176
4176
  var MAX_SAFE_INTEGER$4 = 9007199254740991;
4177
4177
  var reIsUint = /^(?:0|[1-9]\d*)$/;
@@ -4421,10 +4421,10 @@ function listCacheClear() {
4421
4421
  this.__data__ = [];
4422
4422
  this.size = 0;
4423
4423
  }
4424
- function assocIndexOf(array, key) {
4425
- var length2 = array.length;
4424
+ function assocIndexOf(array2, key) {
4425
+ var length2 = array2.length;
4426
4426
  while (length2--) {
4427
- if (eq$4(array[length2][0], key)) {
4427
+ if (eq$4(array2[length2][0], key)) {
4428
4428
  return length2;
4429
4429
  }
4430
4430
  }
@@ -4524,12 +4524,12 @@ MapCache.prototype["delete"] = mapCacheDelete;
4524
4524
  MapCache.prototype.get = mapCacheGet;
4525
4525
  MapCache.prototype.has = mapCacheHas;
4526
4526
  MapCache.prototype.set = mapCacheSet;
4527
- function arrayPush(array, values2) {
4528
- var index2 = -1, length2 = values2.length, offset = array.length;
4527
+ function arrayPush(array2, values2) {
4528
+ var index2 = -1, length2 = values2.length, offset = array2.length;
4529
4529
  while (++index2 < length2) {
4530
- array[offset + index2] = values2[index2];
4530
+ array2[offset + index2] = values2[index2];
4531
4531
  }
4532
- return array;
4532
+ return array2;
4533
4533
  }
4534
4534
  var getPrototype = overArg(Object.getPrototypeOf, Object);
4535
4535
  const getPrototype$1 = getPrototype;
@@ -4591,11 +4591,11 @@ function cloneBuffer(buffer2, isDeep) {
4591
4591
  buffer2.copy(result);
4592
4592
  return result;
4593
4593
  }
4594
- function arrayFilter(array, predicate) {
4595
- var index2 = -1, length2 = array == null ? 0 : array.length, resIndex = 0, result = [];
4594
+ function arrayFilter(array2, predicate) {
4595
+ var index2 = -1, length2 = array2 == null ? 0 : array2.length, resIndex = 0, result = [];
4596
4596
  while (++index2 < length2) {
4597
- var value = array[index2];
4598
- if (predicate(value, index2, array)) {
4597
+ var value = array2[index2];
4598
+ if (predicate(value, index2, array2)) {
4599
4599
  result[resIndex++] = value;
4600
4600
  }
4601
4601
  }
@@ -4676,11 +4676,11 @@ if (DataView$2 && getTag(new DataView$2(new ArrayBuffer(1))) != dataViewTag$3 ||
4676
4676
  const getTag$1 = getTag;
4677
4677
  var objectProto$3 = Object.prototype;
4678
4678
  var hasOwnProperty$5 = objectProto$3.hasOwnProperty;
4679
- function initCloneArray(array) {
4680
- var length2 = array.length, result = new array.constructor(length2);
4681
- if (length2 && typeof array[0] == "string" && hasOwnProperty$5.call(array, "index")) {
4682
- result.index = array.index;
4683
- result.input = array.input;
4679
+ function initCloneArray(array2) {
4680
+ var length2 = array2.length, result = new array2.constructor(length2);
4681
+ if (length2 && typeof array2[0] == "string" && hasOwnProperty$5.call(array2, "index")) {
4682
+ result.index = array2.index;
4683
+ result.input = array2.input;
4684
4684
  }
4685
4685
  return result;
4686
4686
  }
@@ -4848,10 +4848,10 @@ function SetCache(values2) {
4848
4848
  }
4849
4849
  SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
4850
4850
  SetCache.prototype.has = setCacheHas;
4851
- function arraySome(array, predicate) {
4852
- var index2 = -1, length2 = array == null ? 0 : array.length;
4851
+ function arraySome(array2, predicate) {
4852
+ var index2 = -1, length2 = array2 == null ? 0 : array2.length;
4853
4853
  while (++index2 < length2) {
4854
- if (predicate(array[index2], index2, array)) {
4854
+ if (predicate(array2[index2], index2, array2)) {
4855
4855
  return true;
4856
4856
  }
4857
4857
  }
@@ -4861,23 +4861,23 @@ function cacheHas(cache2, key) {
4861
4861
  return cache2.has(key);
4862
4862
  }
4863
4863
  var COMPARE_PARTIAL_FLAG$3 = 1, COMPARE_UNORDERED_FLAG$1 = 2;
4864
- function equalArrays(array, other, bitmask, customizer, equalFunc, stack2) {
4865
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, arrLength = array.length, othLength = other.length;
4864
+ function equalArrays(array2, other, bitmask, customizer, equalFunc, stack2) {
4865
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, arrLength = array2.length, othLength = other.length;
4866
4866
  if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
4867
4867
  return false;
4868
4868
  }
4869
- var arrStacked = stack2.get(array);
4869
+ var arrStacked = stack2.get(array2);
4870
4870
  var othStacked = stack2.get(other);
4871
4871
  if (arrStacked && othStacked) {
4872
- return arrStacked == other && othStacked == array;
4872
+ return arrStacked == other && othStacked == array2;
4873
4873
  }
4874
4874
  var index2 = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$1 ? new SetCache() : void 0;
4875
- stack2.set(array, other);
4876
- stack2.set(other, array);
4875
+ stack2.set(array2, other);
4876
+ stack2.set(other, array2);
4877
4877
  while (++index2 < arrLength) {
4878
- var arrValue = array[index2], othValue = other[index2];
4878
+ var arrValue = array2[index2], othValue = other[index2];
4879
4879
  if (customizer) {
4880
- var compared = isPartial ? customizer(othValue, arrValue, index2, other, array, stack2) : customizer(arrValue, othValue, index2, array, other, stack2);
4880
+ var compared = isPartial ? customizer(othValue, arrValue, index2, other, array2, stack2) : customizer(arrValue, othValue, index2, array2, other, stack2);
4881
4881
  }
4882
4882
  if (compared !== void 0) {
4883
4883
  if (compared) {
@@ -4900,7 +4900,7 @@ function equalArrays(array, other, bitmask, customizer, equalFunc, stack2) {
4900
4900
  break;
4901
4901
  }
4902
4902
  }
4903
- stack2["delete"](array);
4903
+ stack2["delete"](array2);
4904
4904
  stack2["delete"](other);
4905
4905
  return result;
4906
4906
  }
@@ -5060,10 +5060,10 @@ function baseIsEqual(value, other, bitmask, customizer, stack2) {
5060
5060
  function isEqual$1(value, other) {
5061
5061
  return baseIsEqual(value, other);
5062
5062
  }
5063
- function baseSum(array, iteratee) {
5064
- var result, index2 = -1, length2 = array.length;
5063
+ function baseSum(array2, iteratee) {
5064
+ var result, index2 = -1, length2 = array2.length;
5065
5065
  while (++index2 < length2) {
5066
- var current = iteratee(array[index2]);
5066
+ var current = iteratee(array2[index2]);
5067
5067
  if (current !== void 0) {
5068
5068
  result = result === void 0 ? current : result + current;
5069
5069
  }
@@ -5097,8 +5097,8 @@ function createRange(fromRight) {
5097
5097
  }
5098
5098
  var range$4 = createRange();
5099
5099
  const range$5 = range$4;
5100
- function sum$3(array) {
5101
- return array && array.length ? baseSum(array, identity$6) : 0;
5100
+ function sum$3(array2) {
5101
+ return array2 && array2.length ? baseSum(array2, identity$6) : 0;
5102
5102
  }
5103
5103
  var earthRadius = 63710088e-1;
5104
5104
  var factors = {
@@ -8475,34 +8475,34 @@ var json2csv_umd = { exports: {} };
8475
8475
  }
8476
8476
  return that;
8477
8477
  }
8478
- function fromArrayLike(that, array) {
8479
- var length2 = array.length < 0 ? 0 : checked(array.length) | 0;
8478
+ function fromArrayLike(that, array2) {
8479
+ var length2 = array2.length < 0 ? 0 : checked(array2.length) | 0;
8480
8480
  that = createBuffer(that, length2);
8481
8481
  for (var i2 = 0; i2 < length2; i2 += 1) {
8482
- that[i2] = array[i2] & 255;
8482
+ that[i2] = array2[i2] & 255;
8483
8483
  }
8484
8484
  return that;
8485
8485
  }
8486
- function fromArrayBuffer(that, array, byteOffset, length2) {
8487
- array.byteLength;
8488
- if (byteOffset < 0 || array.byteLength < byteOffset) {
8486
+ function fromArrayBuffer(that, array2, byteOffset, length2) {
8487
+ array2.byteLength;
8488
+ if (byteOffset < 0 || array2.byteLength < byteOffset) {
8489
8489
  throw new RangeError("'offset' is out of bounds");
8490
8490
  }
8491
- if (array.byteLength < byteOffset + (length2 || 0)) {
8491
+ if (array2.byteLength < byteOffset + (length2 || 0)) {
8492
8492
  throw new RangeError("'length' is out of bounds");
8493
8493
  }
8494
8494
  if (byteOffset === void 0 && length2 === void 0) {
8495
- array = new Uint8Array(array);
8495
+ array2 = new Uint8Array(array2);
8496
8496
  } else if (length2 === void 0) {
8497
- array = new Uint8Array(array, byteOffset);
8497
+ array2 = new Uint8Array(array2, byteOffset);
8498
8498
  } else {
8499
- array = new Uint8Array(array, byteOffset, length2);
8499
+ array2 = new Uint8Array(array2, byteOffset, length2);
8500
8500
  }
8501
8501
  if (Buffer3.TYPED_ARRAY_SUPPORT) {
8502
- that = array;
8502
+ that = array2;
8503
8503
  that.__proto__ = Buffer3.prototype;
8504
8504
  } else {
8505
- that = fromArrayLike(that, array);
8505
+ that = fromArrayLike(that, array2);
8506
8506
  }
8507
8507
  return that;
8508
8508
  }
@@ -9909,9 +9909,9 @@ var json2csv_umd = { exports: {} };
9909
9909
  runTimeout(drainQueue);
9910
9910
  }
9911
9911
  }
9912
- function Item(fun, array) {
9912
+ function Item(fun, array2) {
9913
9913
  this.fun = fun;
9914
- this.array = array;
9914
+ this.array = array2;
9915
9915
  }
9916
9916
  Item.prototype.run = function() {
9917
9917
  this.fun.apply(null, this.array);
@@ -10086,9 +10086,9 @@ var json2csv_umd = { exports: {} };
10086
10086
  function stylizeNoColor(str, styleType) {
10087
10087
  return str;
10088
10088
  }
10089
- function arrayToHash(array) {
10089
+ function arrayToHash(array2) {
10090
10090
  var hash = {};
10091
- array.forEach(function(val, idx) {
10091
+ array2.forEach(function(val, idx) {
10092
10092
  hash[val] = true;
10093
10093
  });
10094
10094
  return hash;
@@ -10130,9 +10130,9 @@ var json2csv_umd = { exports: {} };
10130
10130
  return formatError(value);
10131
10131
  }
10132
10132
  }
10133
- var base = "", array = false, braces = ["{", "}"];
10133
+ var base = "", array2 = false, braces = ["{", "}"];
10134
10134
  if (isArray$12(value)) {
10135
- array = true;
10135
+ array2 = true;
10136
10136
  braces = ["[", "]"];
10137
10137
  }
10138
10138
  if (isFunction2(value)) {
@@ -10148,7 +10148,7 @@ var json2csv_umd = { exports: {} };
10148
10148
  if (isError(value)) {
10149
10149
  base = " " + formatError(value);
10150
10150
  }
10151
- if (keys4.length === 0 && (!array || value.length == 0)) {
10151
+ if (keys4.length === 0 && (!array2 || value.length == 0)) {
10152
10152
  return braces[0] + base + braces[1];
10153
10153
  }
10154
10154
  if (recurseTimes < 0) {
@@ -10160,11 +10160,11 @@ var json2csv_umd = { exports: {} };
10160
10160
  }
10161
10161
  ctx.seen.push(value);
10162
10162
  var output;
10163
- if (array) {
10163
+ if (array2) {
10164
10164
  output = formatArray2(ctx, value, recurseTimes, visibleKeys, keys4);
10165
10165
  } else {
10166
10166
  output = keys4.map(function(key) {
10167
- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
10167
+ return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array2);
10168
10168
  });
10169
10169
  }
10170
10170
  ctx.seen.pop();
@@ -10217,7 +10217,7 @@ var json2csv_umd = { exports: {} };
10217
10217
  });
10218
10218
  return output;
10219
10219
  }
10220
- function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
10220
+ function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array2) {
10221
10221
  var name2, str, desc;
10222
10222
  desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
10223
10223
  if (desc.get) {
@@ -10242,7 +10242,7 @@ var json2csv_umd = { exports: {} };
10242
10242
  str = formatValue2(ctx, desc.value, recurseTimes - 1);
10243
10243
  }
10244
10244
  if (str.indexOf("\n") > -1) {
10245
- if (array) {
10245
+ if (array2) {
10246
10246
  str = str.split("\n").map(function(line) {
10247
10247
  return " " + line;
10248
10248
  }).join("\n").substr(2);
@@ -10257,7 +10257,7 @@ var json2csv_umd = { exports: {} };
10257
10257
  }
10258
10258
  }
10259
10259
  if (isUndefined2(name2)) {
10260
- if (array && key.match(/^\d+$/)) {
10260
+ if (array2 && key.match(/^\d+$/)) {
10261
10261
  return str;
10262
10262
  }
10263
10263
  name2 = JSON.stringify("" + key);
@@ -12079,10 +12079,10 @@ var json2csv_umd = { exports: {} };
12079
12079
  MapCache2.prototype.get = mapCacheGet2;
12080
12080
  MapCache2.prototype.has = mapCacheHas2;
12081
12081
  MapCache2.prototype.set = mapCacheSet2;
12082
- function assocIndexOf2(array, key) {
12083
- var length2 = array.length;
12082
+ function assocIndexOf2(array2, key) {
12083
+ var length2 = array2.length;
12084
12084
  while (length2--) {
12085
- if (eq2(array[length2][0], key)) {
12085
+ if (eq2(array2[length2][0], key)) {
12086
12086
  return length2;
12087
12087
  }
12088
12088
  }
@@ -16906,8 +16906,8 @@ function formatValue$1(value, {
16906
16906
  function isArray$3(value) {
16907
16907
  return Array.isArray(value) || ArrayBuffer.isView(value) && !(value instanceof DataView);
16908
16908
  }
16909
- function clone$8(array) {
16910
- return "clone" in array ? array.clone() : array.slice();
16909
+ function clone$8(array2) {
16910
+ return "clone" in array2 ? array2.clone() : array2.slice();
16911
16911
  }
16912
16912
  function toRadians(degrees2) {
16913
16913
  return radians$1(degrees2);
@@ -17021,14 +17021,14 @@ function withEpsilon(epsilon3, func) {
17021
17021
  function round$2(value) {
17022
17022
  return Math.round(value / config$2.EPSILON) * config$2.EPSILON;
17023
17023
  }
17024
- function duplicateArray(array) {
17025
- return array.clone ? array.clone() : new Array(array.length);
17024
+ function duplicateArray(array2) {
17025
+ return array2.clone ? array2.clone() : new Array(array2.length);
17026
17026
  }
17027
17027
  function map(value, func, result) {
17028
17028
  if (isArray$3(value)) {
17029
- const array = value;
17030
- result = result || duplicateArray(array);
17031
- for (let i2 = 0; i2 < result.length && i2 < array.length; ++i2) {
17029
+ const array2 = value;
17030
+ result = result || duplicateArray(array2);
17031
+ for (let i2 = 0; i2 < result.length && i2 < array2.length; ++i2) {
17032
17032
  result[i2] = func(value[i2], i2, result);
17033
17033
  }
17034
17034
  return result;
@@ -17060,9 +17060,9 @@ class MathArray extends _extendableBuiltin(Array) {
17060
17060
  clone() {
17061
17061
  return new this.constructor().copy(this);
17062
17062
  }
17063
- fromArray(array, offset = 0) {
17063
+ fromArray(array2, offset = 0) {
17064
17064
  for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
17065
- this[i2] = array[i2 + offset];
17065
+ this[i2] = array2[i2 + offset];
17066
17066
  }
17067
17067
  return this.check();
17068
17068
  }
@@ -17097,23 +17097,23 @@ class MathArray extends _extendableBuiltin(Array) {
17097
17097
  }
17098
17098
  return "".concat(opts2.printTypes ? this.constructor.name : "", "[").concat(string, "]");
17099
17099
  }
17100
- equals(array) {
17101
- if (!array || this.length !== array.length) {
17100
+ equals(array2) {
17101
+ if (!array2 || this.length !== array2.length) {
17102
17102
  return false;
17103
17103
  }
17104
17104
  for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
17105
- if (!equals$3(this[i2], array[i2])) {
17105
+ if (!equals$3(this[i2], array2[i2])) {
17106
17106
  return false;
17107
17107
  }
17108
17108
  }
17109
17109
  return true;
17110
17110
  }
17111
- exactEquals(array) {
17112
- if (!array || this.length !== array.length) {
17111
+ exactEquals(array2) {
17112
+ if (!array2 || this.length !== array2.length) {
17113
17113
  return false;
17114
17114
  }
17115
17115
  for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
17116
- if (this[i2] !== array[i2]) {
17116
+ if (this[i2] !== array2[i2]) {
17117
17117
  return false;
17118
17118
  }
17119
17119
  }
@@ -17373,7 +17373,7 @@ if (!Math.hypot)
17373
17373
  }
17374
17374
  return Math.sqrt(y2);
17375
17375
  };
17376
- function create$4() {
17376
+ function create$5() {
17377
17377
  var out = new ARRAY_TYPE(2);
17378
17378
  if (ARRAY_TYPE != Float32Array) {
17379
17379
  out[0] = 0;
@@ -17438,7 +17438,7 @@ function transformMat4$2(out, a2, m) {
17438
17438
  }
17439
17439
  var sub$2 = subtract$2;
17440
17440
  (function() {
17441
- var vec = create$4();
17441
+ var vec = create$5();
17442
17442
  return function(a2, stride, offset, count2, fn, arg) {
17443
17443
  var i2, l2;
17444
17444
  if (!stride) {
@@ -17526,9 +17526,9 @@ class Vector2 extends Vector {
17526
17526
  this[1] = y2;
17527
17527
  return this.check();
17528
17528
  }
17529
- copy(array) {
17530
- this[0] = array[0];
17531
- this[1] = array[1];
17529
+ copy(array2) {
17530
+ this[0] = array2[0];
17531
+ this[1] = array2[1];
17532
17532
  return this.check();
17533
17533
  }
17534
17534
  fromObject(object2) {
@@ -17578,7 +17578,7 @@ class Vector2 extends Vector {
17578
17578
  return this.check();
17579
17579
  }
17580
17580
  }
17581
- function create$3() {
17581
+ function create$4() {
17582
17582
  var out = new ARRAY_TYPE(3);
17583
17583
  if (ARRAY_TYPE != Float32Array) {
17584
17584
  out[0] = 0;
@@ -17744,7 +17744,7 @@ var mul$1 = multiply$4;
17744
17744
  var len = length$4;
17745
17745
  var sqrLen = squaredLength$2;
17746
17746
  (function() {
17747
- var vec = create$3();
17747
+ var vec = create$4();
17748
17748
  return function(a2, stride, offset, count2, fn, arg) {
17749
17749
  var i2, l2;
17750
17750
  if (!stride) {
@@ -17801,10 +17801,10 @@ class Vector3 extends Vector {
17801
17801
  this[2] = z2;
17802
17802
  return this.check();
17803
17803
  }
17804
- copy(array) {
17805
- this[0] = array[0];
17806
- this[1] = array[1];
17807
- this[2] = array[2];
17804
+ copy(array2) {
17805
+ this[0] = array2[0];
17806
+ this[1] = array2[1];
17807
+ this[2] = array2[2];
17808
17808
  return this.check();
17809
17809
  }
17810
17810
  fromObject(object2) {
@@ -17918,11 +17918,11 @@ class Vector4 extends Vector {
17918
17918
  this[3] = w2;
17919
17919
  return this.check();
17920
17920
  }
17921
- copy(array) {
17922
- this[0] = array[0];
17923
- this[1] = array[1];
17924
- this[2] = array[2];
17925
- this[3] = array[3];
17921
+ copy(array2) {
17922
+ this[0] = array2[0];
17923
+ this[1] = array2[1];
17924
+ this[2] = array2[2];
17925
+ this[3] = array2[3];
17926
17926
  return this.check();
17927
17927
  }
17928
17928
  fromObject(object2) {
@@ -18025,7 +18025,7 @@ let Matrix$1 = class Matrix extends MathArray {
18025
18025
  return this;
18026
18026
  }
18027
18027
  };
18028
- function create$2() {
18028
+ function create$3() {
18029
18029
  var out = new ARRAY_TYPE(9);
18030
18030
  if (ARRAY_TYPE != Float32Array) {
18031
18031
  out[1] = 0;
@@ -18202,26 +18202,26 @@ class Matrix3 extends Matrix$1 {
18202
18202
  get INDICES() {
18203
18203
  return INDICES$1;
18204
18204
  }
18205
- constructor(array, ...args) {
18205
+ constructor(array2, ...args) {
18206
18206
  super(-0, -0, -0, -0, -0, -0, -0, -0, -0);
18207
- if (arguments.length === 1 && Array.isArray(array)) {
18208
- this.copy(array);
18207
+ if (arguments.length === 1 && Array.isArray(array2)) {
18208
+ this.copy(array2);
18209
18209
  } else if (args.length > 0) {
18210
- this.copy([array, ...args]);
18210
+ this.copy([array2, ...args]);
18211
18211
  } else {
18212
18212
  this.identity();
18213
18213
  }
18214
18214
  }
18215
- copy(array) {
18216
- this[0] = array[0];
18217
- this[1] = array[1];
18218
- this[2] = array[2];
18219
- this[3] = array[3];
18220
- this[4] = array[4];
18221
- this[5] = array[5];
18222
- this[6] = array[6];
18223
- this[7] = array[7];
18224
- this[8] = array[8];
18215
+ copy(array2) {
18216
+ this[0] = array2[0];
18217
+ this[1] = array2[1];
18218
+ this[2] = array2[2];
18219
+ this[3] = array2[3];
18220
+ this[4] = array2[4];
18221
+ this[5] = array2[5];
18222
+ this[6] = array2[6];
18223
+ this[7] = array2[7];
18224
+ this[8] = array2[8];
18225
18225
  return this.check();
18226
18226
  }
18227
18227
  identity() {
@@ -18901,7 +18901,7 @@ function equals$2(a2, b) {
18901
18901
  var b12 = b[12], b13 = b[13], b14 = b[14], b15 = b[15];
18902
18902
  return Math.abs(a0 - b0) <= EPSILON$3 * Math.max(1, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= EPSILON$3 * Math.max(1, Math.abs(a1), Math.abs(b1)) && Math.abs(a22 - b2) <= EPSILON$3 * Math.max(1, Math.abs(a22), Math.abs(b2)) && Math.abs(a3 - b3) <= EPSILON$3 * Math.max(1, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= EPSILON$3 * Math.max(1, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= EPSILON$3 * Math.max(1, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= EPSILON$3 * Math.max(1, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= EPSILON$3 * Math.max(1, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= EPSILON$3 * Math.max(1, Math.abs(a8), Math.abs(b8)) && Math.abs(a9 - b9) <= EPSILON$3 * Math.max(1, Math.abs(a9), Math.abs(b9)) && Math.abs(a10 - b10) <= EPSILON$3 * Math.max(1, Math.abs(a10), Math.abs(b10)) && Math.abs(a11 - b11) <= EPSILON$3 * Math.max(1, Math.abs(a11), Math.abs(b11)) && Math.abs(a12 - b12) <= EPSILON$3 * Math.max(1, Math.abs(a12), Math.abs(b12)) && Math.abs(a13 - b13) <= EPSILON$3 * Math.max(1, Math.abs(a13), Math.abs(b13)) && Math.abs(a14 - b14) <= EPSILON$3 * Math.max(1, Math.abs(a14), Math.abs(b14)) && Math.abs(a15 - b15) <= EPSILON$3 * Math.max(1, Math.abs(a15), Math.abs(b15));
18903
18903
  }
18904
- function create$1() {
18904
+ function create$2() {
18905
18905
  var out = new ARRAY_TYPE(4);
18906
18906
  if (ARRAY_TYPE != Float32Array) {
18907
18907
  out[0] = 0;
@@ -18990,7 +18990,7 @@ function transformQuat(out, a2, q) {
18990
18990
  return out;
18991
18991
  }
18992
18992
  (function() {
18993
- var vec = create$1();
18993
+ var vec = create$2();
18994
18994
  return function(a2, stride, offset, count2, fn, arg) {
18995
18995
  var i2, l2;
18996
18996
  if (!stride) {
@@ -19058,31 +19058,31 @@ class Matrix4 extends Matrix$1 {
19058
19058
  get INDICES() {
19059
19059
  return INDICES;
19060
19060
  }
19061
- constructor(array) {
19061
+ constructor(array2) {
19062
19062
  super(-0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0);
19063
- if (arguments.length === 1 && Array.isArray(array)) {
19064
- this.copy(array);
19063
+ if (arguments.length === 1 && Array.isArray(array2)) {
19064
+ this.copy(array2);
19065
19065
  } else {
19066
19066
  this.identity();
19067
19067
  }
19068
19068
  }
19069
- copy(array) {
19070
- this[0] = array[0];
19071
- this[1] = array[1];
19072
- this[2] = array[2];
19073
- this[3] = array[3];
19074
- this[4] = array[4];
19075
- this[5] = array[5];
19076
- this[6] = array[6];
19077
- this[7] = array[7];
19078
- this[8] = array[8];
19079
- this[9] = array[9];
19080
- this[10] = array[10];
19081
- this[11] = array[11];
19082
- this[12] = array[12];
19083
- this[13] = array[13];
19084
- this[14] = array[14];
19085
- this[15] = array[15];
19069
+ copy(array2) {
19070
+ this[0] = array2[0];
19071
+ this[1] = array2[1];
19072
+ this[2] = array2[2];
19073
+ this[3] = array2[3];
19074
+ this[4] = array2[4];
19075
+ this[5] = array2[5];
19076
+ this[6] = array2[6];
19077
+ this[7] = array2[7];
19078
+ this[8] = array2[8];
19079
+ this[9] = array2[9];
19080
+ this[10] = array2[10];
19081
+ this[11] = array2[11];
19082
+ this[12] = array2[12];
19083
+ this[13] = array2[13];
19084
+ this[14] = array2[14];
19085
+ this[15] = array2[15];
19086
19086
  return this.check();
19087
19087
  }
19088
19088
  set(m00, m10, m20, m30, m01, m11, m21, m31, m02, m12, m22, m32, m03, m13, m23, m33) {
@@ -19426,7 +19426,7 @@ function computeInfinitePerspectiveOffCenter(result, left, right, bottom, top, n
19426
19426
  result[15] = 0;
19427
19427
  return result;
19428
19428
  }
19429
- function create() {
19429
+ function create$1() {
19430
19430
  var out = new ARRAY_TYPE(4);
19431
19431
  if (ARRAY_TYPE != Float32Array) {
19432
19432
  out[0] = 0;
@@ -19578,7 +19578,7 @@ var length$2 = length$3;
19578
19578
  var squaredLength = squaredLength$1;
19579
19579
  var normalize$1 = normalize$2;
19580
19580
  var rotationTo = function() {
19581
- var tmpvec3 = create$3();
19581
+ var tmpvec3 = create$4();
19582
19582
  var xUnitVec3 = fromValues(1, 0, 0);
19583
19583
  var yUnitVec3 = fromValues(0, 1, 0);
19584
19584
  return function(out, a2, b) {
@@ -19607,8 +19607,8 @@ var rotationTo = function() {
19607
19607
  };
19608
19608
  }();
19609
19609
  (function() {
19610
- var temp1 = create();
19611
- var temp2 = create();
19610
+ var temp1 = create$1();
19611
+ var temp2 = create$1();
19612
19612
  return function(out, a2, b, c, d, t2) {
19613
19613
  slerp(temp1, a2, d, t2);
19614
19614
  slerp(temp2, b, c, t2);
@@ -19617,7 +19617,7 @@ var rotationTo = function() {
19617
19617
  };
19618
19618
  })();
19619
19619
  (function() {
19620
- var matr = create$2();
19620
+ var matr = create$3();
19621
19621
  return function(out, view, right, up) {
19622
19622
  matr[0] = right[0];
19623
19623
  matr[3] = right[1];
@@ -19641,11 +19641,11 @@ class Quaternion extends MathArray {
19641
19641
  this.set(x2, y2, z2, w2);
19642
19642
  }
19643
19643
  }
19644
- copy(array) {
19645
- this[0] = array[0];
19646
- this[1] = array[1];
19647
- this[2] = array[2];
19648
- this[3] = array[3];
19644
+ copy(array2) {
19645
+ this[0] = array2[0];
19646
+ this[1] = array2[1];
19647
+ this[2] = array2[2];
19648
+ this[3] = array2[3];
19649
19649
  return this.check();
19650
19650
  }
19651
19651
  set(x2, y2, z2, w2) {
@@ -20019,11 +20019,11 @@ class Euler extends MathArray {
20019
20019
  fromObject(object2) {
20020
20020
  throw new Error("not implemented");
20021
20021
  }
20022
- copy(array) {
20023
- this[0] = array[0];
20024
- this[1] = array[1];
20025
- this[2] = array[2];
20026
- this[3] = Number.isFinite(array[3]) || this.order;
20022
+ copy(array2) {
20023
+ this[0] = array2[0];
20024
+ this[1] = array2[1];
20025
+ this[2] = array2[2];
20026
+ this[3] = Number.isFinite(array2[3]) || this.order;
20027
20027
  return this.check();
20028
20028
  }
20029
20029
  set(x2 = 0, y2 = 0, z2 = 0, order) {
@@ -20036,18 +20036,18 @@ class Euler extends MathArray {
20036
20036
  validate() {
20037
20037
  return validateOrder(this[3]) && Number.isFinite(this[0]) && Number.isFinite(this[1]) && Number.isFinite(this[2]);
20038
20038
  }
20039
- toArray(array = [], offset = 0) {
20040
- array[offset] = this[0];
20041
- array[offset + 1] = this[1];
20042
- array[offset + 2] = this[2];
20043
- return array;
20039
+ toArray(array2 = [], offset = 0) {
20040
+ array2[offset] = this[0];
20041
+ array2[offset + 1] = this[1];
20042
+ array2[offset + 2] = this[2];
20043
+ return array2;
20044
20044
  }
20045
- toArray4(array = [], offset = 0) {
20046
- array[offset] = this[0];
20047
- array[offset + 1] = this[1];
20048
- array[offset + 2] = this[2];
20049
- array[offset + 3] = this[3];
20050
- return array;
20045
+ toArray4(array2 = [], offset = 0) {
20046
+ array2[offset] = this[0];
20047
+ array2[offset + 1] = this[1];
20048
+ array2[offset + 2] = this[2];
20049
+ array2[offset + 3] = this[3];
20050
+ return array2;
20051
20051
  }
20052
20052
  toVector3(result = [-0, -0, -0]) {
20053
20053
  result[0] = this[0];
@@ -20136,12 +20136,12 @@ class Euler extends MathArray {
20136
20136
  fromVector3(v, order) {
20137
20137
  return this.set(v[0], v[1], v[2], Number.isFinite(order) ? order : this[3]);
20138
20138
  }
20139
- fromArray(array, offset = 0) {
20140
- this[0] = array[0 + offset];
20141
- this[1] = array[1 + offset];
20142
- this[2] = array[2 + offset];
20143
- if (array[3] !== void 0) {
20144
- this[3] = array[3];
20139
+ fromArray(array2, offset = 0) {
20140
+ this[0] = array2[0 + offset];
20141
+ this[1] = array2[1 + offset];
20142
+ this[2] = array2[2 + offset];
20143
+ if (array2[3] !== void 0) {
20144
+ this[3] = array2[3];
20145
20145
  }
20146
20146
  return this.check();
20147
20147
  }
@@ -20981,9 +20981,9 @@ var typedFunction$1 = { exports: {} };
20981
20981
  function parseSignature(signature, fn, conversions) {
20982
20982
  var params = [];
20983
20983
  if (signature.trim() !== "") {
20984
- params = signature.split(",").map(trim2).map(function(param, index2, array) {
20984
+ params = signature.split(",").map(trim2).map(function(param, index2, array2) {
20985
20985
  var parsedParam = parseParam(param, conversions);
20986
- if (parsedParam.restParam && index2 !== array.length - 1) {
20986
+ if (parsedParam.restParam && index2 !== array2.length - 1) {
20987
20987
  throw new SyntaxError('Unexpected rest parameter "' + param + '": only allowed for the last parameter');
20988
20988
  }
20989
20989
  return parsedParam;
@@ -21490,8 +21490,8 @@ var typedFunction$1 = { exports: {} };
21490
21490
  function slice2(arr, start, end) {
21491
21491
  return Array.prototype.slice.call(arr, start, end);
21492
21492
  }
21493
- function contains2(array, item) {
21494
- return array.indexOf(item) !== -1;
21493
+ function contains2(array2, item) {
21494
+ return array2.indexOf(item) !== -1;
21495
21495
  }
21496
21496
  function hasOverlap(array12, array2) {
21497
21497
  for (var i2 = 0; i2 < array12.length; i2++) {
@@ -21781,10 +21781,10 @@ function toFixed$1(value, precision) {
21781
21781
  var p = rounded.exponent + 1;
21782
21782
  var pp = p + (precision || 0);
21783
21783
  if (c.length < pp) {
21784
- c = c.concat(zeros$1(pp - c.length));
21784
+ c = c.concat(zeros$2(pp - c.length));
21785
21785
  }
21786
21786
  if (p < 0) {
21787
- c = zeros$1(-p + 1).concat(c);
21787
+ c = zeros$2(-p + 1).concat(c);
21788
21788
  p = 1;
21789
21789
  }
21790
21790
  if (p < c.length) {
@@ -21801,7 +21801,7 @@ function toExponential$1(value, precision) {
21801
21801
  var c = rounded.coefficients;
21802
21802
  var e2 = rounded.exponent;
21803
21803
  if (c.length < precision) {
21804
- c = c.concat(zeros$1(precision - c.length));
21804
+ c = c.concat(zeros$2(precision - c.length));
21805
21805
  }
21806
21806
  var first = c.shift();
21807
21807
  return rounded.sign + first + (c.length > 0 ? "." + c.join("") : "") + "e" + (e2 >= 0 ? "+" : "") + e2;
@@ -21820,10 +21820,10 @@ function toPrecision(value, precision, options) {
21820
21820
  var c = rounded.coefficients;
21821
21821
  var e2 = rounded.exponent;
21822
21822
  if (c.length < precision) {
21823
- c = c.concat(zeros$1(precision - c.length));
21823
+ c = c.concat(zeros$2(precision - c.length));
21824
21824
  }
21825
- c = c.concat(zeros$1(e2 - c.length + 1 + (c.length < precision ? precision - c.length : 0)));
21826
- c = zeros$1(-e2).concat(c);
21825
+ c = c.concat(zeros$2(e2 - c.length + 1 + (c.length < precision ? precision - c.length : 0)));
21826
+ c = zeros$2(-e2).concat(c);
21827
21827
  var dot2 = e2 > 0 ? e2 : 0;
21828
21828
  if (dot2 < c.length - 1) {
21829
21829
  c.splice(dot2 + 1, 0, ".");
@@ -21862,7 +21862,7 @@ function roundDigits(split, precision) {
21862
21862
  }
21863
21863
  return rounded;
21864
21864
  }
21865
- function zeros$1(length2) {
21865
+ function zeros$2(length2) {
21866
21866
  var arr = [];
21867
21867
  for (var i2 = 0; i2 < length2; i2++) {
21868
21868
  arr.push(0);
@@ -22050,20 +22050,20 @@ function format$1(value, options) {
22050
22050
  }
22051
22051
  return String(value);
22052
22052
  }
22053
- function formatArray(array, options) {
22054
- if (Array.isArray(array)) {
22053
+ function formatArray(array2, options) {
22054
+ if (Array.isArray(array2)) {
22055
22055
  var str = "[";
22056
- var len2 = array.length;
22056
+ var len2 = array2.length;
22057
22057
  for (var i2 = 0; i2 < len2; i2++) {
22058
22058
  if (i2 !== 0) {
22059
22059
  str += ", ";
22060
22060
  }
22061
- str += formatArray(array[i2], options);
22061
+ str += formatArray(array2[i2], options);
22062
22062
  }
22063
22063
  str += "]";
22064
22064
  return str;
22065
22065
  } else {
22066
- return format$1(array, options);
22066
+ return format$1(array2, options);
22067
22067
  }
22068
22068
  }
22069
22069
  function looksLikeFraction(value) {
@@ -22116,37 +22116,37 @@ function arraySize(x2) {
22116
22116
  }
22117
22117
  return s2;
22118
22118
  }
22119
- function _validate(array, size2, dim) {
22119
+ function _validate(array2, size2, dim) {
22120
22120
  var i2;
22121
- var len2 = array.length;
22121
+ var len2 = array2.length;
22122
22122
  if (len2 !== size2[dim]) {
22123
22123
  throw new DimensionError(len2, size2[dim]);
22124
22124
  }
22125
22125
  if (dim < size2.length - 1) {
22126
22126
  var dimNext = dim + 1;
22127
22127
  for (i2 = 0; i2 < len2; i2++) {
22128
- var child = array[i2];
22128
+ var child = array2[i2];
22129
22129
  if (!Array.isArray(child)) {
22130
22130
  throw new DimensionError(size2.length - 1, size2.length, "<");
22131
22131
  }
22132
- _validate(array[i2], size2, dimNext);
22132
+ _validate(array2[i2], size2, dimNext);
22133
22133
  }
22134
22134
  } else {
22135
22135
  for (i2 = 0; i2 < len2; i2++) {
22136
- if (Array.isArray(array[i2])) {
22136
+ if (Array.isArray(array2[i2])) {
22137
22137
  throw new DimensionError(size2.length + 1, size2.length, ">");
22138
22138
  }
22139
22139
  }
22140
22140
  }
22141
22141
  }
22142
- function validate$1(array, size2) {
22142
+ function validate$1(array2, size2) {
22143
22143
  var isScalar = size2.length === 0;
22144
22144
  if (isScalar) {
22145
- if (Array.isArray(array)) {
22146
- throw new DimensionError(array.length, 0);
22145
+ if (Array.isArray(array2)) {
22146
+ throw new DimensionError(array2.length, 0);
22147
22147
  }
22148
22148
  } else {
22149
- _validate(array, size2, 0);
22149
+ _validate(array2, size2, 0);
22150
22150
  }
22151
22151
  }
22152
22152
  function validateIndex(index2, length2) {
@@ -22157,8 +22157,8 @@ function validateIndex(index2, length2) {
22157
22157
  throw new IndexError(index2, length2);
22158
22158
  }
22159
22159
  }
22160
- function resize(array, size2, defaultValue2) {
22161
- if (!Array.isArray(array) || !Array.isArray(size2)) {
22160
+ function resize(array2, size2, defaultValue2) {
22161
+ if (!Array.isArray(array2) || !Array.isArray(size2)) {
22162
22162
  throw new TypeError("Array expected");
22163
22163
  }
22164
22164
  if (size2.length === 0) {
@@ -22170,46 +22170,46 @@ function resize(array, size2, defaultValue2) {
22170
22170
  }
22171
22171
  });
22172
22172
  var _defaultValue = defaultValue2 !== void 0 ? defaultValue2 : 0;
22173
- _resize(array, size2, 0, _defaultValue);
22174
- return array;
22173
+ _resize(array2, size2, 0, _defaultValue);
22174
+ return array2;
22175
22175
  }
22176
- function _resize(array, size2, dim, defaultValue2) {
22176
+ function _resize(array2, size2, dim, defaultValue2) {
22177
22177
  var i2;
22178
22178
  var elem;
22179
- var oldLen = array.length;
22179
+ var oldLen = array2.length;
22180
22180
  var newLen = size2[dim];
22181
22181
  var minLen = Math.min(oldLen, newLen);
22182
- array.length = newLen;
22182
+ array2.length = newLen;
22183
22183
  if (dim < size2.length - 1) {
22184
22184
  var dimNext = dim + 1;
22185
22185
  for (i2 = 0; i2 < minLen; i2++) {
22186
- elem = array[i2];
22186
+ elem = array2[i2];
22187
22187
  if (!Array.isArray(elem)) {
22188
22188
  elem = [elem];
22189
- array[i2] = elem;
22189
+ array2[i2] = elem;
22190
22190
  }
22191
22191
  _resize(elem, size2, dimNext, defaultValue2);
22192
22192
  }
22193
22193
  for (i2 = minLen; i2 < newLen; i2++) {
22194
22194
  elem = [];
22195
- array[i2] = elem;
22195
+ array2[i2] = elem;
22196
22196
  _resize(elem, size2, dimNext, defaultValue2);
22197
22197
  }
22198
22198
  } else {
22199
22199
  for (i2 = 0; i2 < minLen; i2++) {
22200
- while (Array.isArray(array[i2])) {
22201
- array[i2] = array[i2][0];
22200
+ while (Array.isArray(array2[i2])) {
22201
+ array2[i2] = array2[i2][0];
22202
22202
  }
22203
22203
  }
22204
22204
  for (i2 = minLen; i2 < newLen; i2++) {
22205
- array[i2] = defaultValue2;
22205
+ array2[i2] = defaultValue2;
22206
22206
  }
22207
22207
  }
22208
22208
  }
22209
- function reshape(array, sizes) {
22210
- var flatArray = flatten$1(array);
22209
+ function reshape(array2, sizes) {
22210
+ var flatArray = flatten$1(array2);
22211
22211
  var currentLength = flatArray.length;
22212
- if (!Array.isArray(array) || !Array.isArray(sizes)) {
22212
+ if (!Array.isArray(array2) || !Array.isArray(sizes)) {
22213
22213
  throw new TypeError("Array expected");
22214
22214
  }
22215
22215
  if (sizes.length === 0) {
@@ -22249,11 +22249,11 @@ function processSizesWildcard(sizes, currentLength) {
22249
22249
  }
22250
22250
  return processedSizes;
22251
22251
  }
22252
- function product$1(array) {
22253
- return array.reduce((prev, curr) => prev * curr, 1);
22252
+ function product$1(array2) {
22253
+ return array2.reduce((prev, curr) => prev * curr, 1);
22254
22254
  }
22255
- function _reshape(array, sizes) {
22256
- var tmpArray = array;
22255
+ function _reshape(array2, sizes) {
22256
+ var tmpArray = array2;
22257
22257
  var tmpArray2;
22258
22258
  for (var sizeIndex = sizes.length - 1; sizeIndex > 0; sizeIndex--) {
22259
22259
  var size2 = sizes[sizeIndex];
@@ -22266,40 +22266,40 @@ function _reshape(array, sizes) {
22266
22266
  }
22267
22267
  return tmpArray;
22268
22268
  }
22269
- function unsqueeze(array, dims, outer, size2) {
22270
- var s2 = size2 || arraySize(array);
22269
+ function unsqueeze(array2, dims, outer, size2) {
22270
+ var s2 = size2 || arraySize(array2);
22271
22271
  if (outer) {
22272
22272
  for (var i2 = 0; i2 < outer; i2++) {
22273
- array = [array];
22273
+ array2 = [array2];
22274
22274
  s2.unshift(1);
22275
22275
  }
22276
22276
  }
22277
- array = _unsqueeze(array, dims, 0);
22277
+ array2 = _unsqueeze(array2, dims, 0);
22278
22278
  while (s2.length < dims) {
22279
22279
  s2.push(1);
22280
22280
  }
22281
- return array;
22281
+ return array2;
22282
22282
  }
22283
- function _unsqueeze(array, dims, dim) {
22283
+ function _unsqueeze(array2, dims, dim) {
22284
22284
  var i2, ii;
22285
- if (Array.isArray(array)) {
22285
+ if (Array.isArray(array2)) {
22286
22286
  var next3 = dim + 1;
22287
- for (i2 = 0, ii = array.length; i2 < ii; i2++) {
22288
- array[i2] = _unsqueeze(array[i2], dims, next3);
22287
+ for (i2 = 0, ii = array2.length; i2 < ii; i2++) {
22288
+ array2[i2] = _unsqueeze(array2[i2], dims, next3);
22289
22289
  }
22290
22290
  } else {
22291
22291
  for (var d = dim; d < dims; d++) {
22292
- array = [array];
22292
+ array2 = [array2];
22293
22293
  }
22294
22294
  }
22295
- return array;
22295
+ return array2;
22296
22296
  }
22297
- function flatten$1(array) {
22298
- if (!Array.isArray(array)) {
22299
- return array;
22297
+ function flatten$1(array2) {
22298
+ if (!Array.isArray(array2)) {
22299
+ return array2;
22300
22300
  }
22301
22301
  var flat2 = [];
22302
- array.forEach(function callback(value) {
22302
+ array2.forEach(function callback(value) {
22303
22303
  if (Array.isArray(value)) {
22304
22304
  value.forEach(callback);
22305
22305
  } else {
@@ -22308,11 +22308,11 @@ function flatten$1(array) {
22308
22308
  });
22309
22309
  return flat2;
22310
22310
  }
22311
- function getArrayDataType(array, typeOf2) {
22311
+ function getArrayDataType(array2, typeOf2) {
22312
22312
  var type;
22313
22313
  var length2 = 0;
22314
- for (var i2 = 0; i2 < array.length; i2++) {
22315
- var item = array[i2];
22314
+ for (var i2 = 0; i2 < array2.length; i2++) {
22315
+ var item = array2[i2];
22316
22316
  var isArray2 = Array.isArray(item);
22317
22317
  if (i2 === 0 && isArray2) {
22318
22318
  length2 = item.length;
@@ -22766,11 +22766,11 @@ var createTyped = /* @__PURE__ */ factory("typed", dependencies$Q, function crea
22766
22766
  }, {
22767
22767
  from: "Array",
22768
22768
  to: "Matrix",
22769
- convert: function convert(array) {
22769
+ convert: function convert(array2) {
22770
22770
  if (!DenseMatrix2) {
22771
22771
  throwNoMatrix();
22772
22772
  }
22773
- return new DenseMatrix2(array);
22773
+ return new DenseMatrix2(array2);
22774
22774
  }
22775
22775
  }, {
22776
22776
  from: "Matrix",
@@ -27491,13 +27491,13 @@ var createDenseMatrixClass = /* @__PURE__ */ factory(name$S, dependencies$L, (_r
27491
27491
  }, {
27492
27492
  isClass: true
27493
27493
  });
27494
- function deepMap(array, callback, skipZeros) {
27495
- if (array && typeof array.map === "function") {
27496
- return array.map(function(x2) {
27494
+ function deepMap(array2, callback, skipZeros) {
27495
+ if (array2 && typeof array2.map === "function") {
27496
+ return array2.map(function(x2) {
27497
27497
  return deepMap(x2, callback);
27498
27498
  });
27499
27499
  } else {
27500
- return callback(array);
27500
+ return callback(array2);
27501
27501
  }
27502
27502
  }
27503
27503
  var n1 = "number";
@@ -31224,7 +31224,7 @@ var createFibonacciHeapClass = /* @__PURE__ */ factory(name$f, dependencies$8, (
31224
31224
  };
31225
31225
  function _findMinimumNode(minimum, size2) {
31226
31226
  var arraySize2 = Math.floor(Math.log(size2) * oneOverLogPhi) + 1;
31227
- var array = new Array(arraySize2);
31227
+ var array2 = new Array(arraySize2);
31228
31228
  var numRoots = 0;
31229
31229
  var x2 = minimum;
31230
31230
  if (x2) {
@@ -31240,7 +31240,7 @@ var createFibonacciHeapClass = /* @__PURE__ */ factory(name$f, dependencies$8, (
31240
31240
  var d = x2.degree;
31241
31241
  var next3 = x2.right;
31242
31242
  while (true) {
31243
- y2 = array[d];
31243
+ y2 = array2[d];
31244
31244
  if (!y2) {
31245
31245
  break;
31246
31246
  }
@@ -31250,16 +31250,16 @@ var createFibonacciHeapClass = /* @__PURE__ */ factory(name$f, dependencies$8, (
31250
31250
  x2 = temp2;
31251
31251
  }
31252
31252
  _linkNodes(y2, x2);
31253
- array[d] = null;
31253
+ array2[d] = null;
31254
31254
  d++;
31255
31255
  }
31256
- array[d] = x2;
31256
+ array2[d] = x2;
31257
31257
  x2 = next3;
31258
31258
  numRoots--;
31259
31259
  }
31260
31260
  minimum = null;
31261
31261
  for (var i2 = 0; i2 < arraySize2; i2++) {
31262
- y2 = array[i2];
31262
+ y2 = array2[i2];
31263
31263
  if (!y2) {
31264
31264
  continue;
31265
31265
  }
@@ -35386,7 +35386,7 @@ var size = /* @__PURE__ */ createSize({
35386
35386
  config: config$1,
35387
35387
  typed
35388
35388
  });
35389
- var zeros = /* @__PURE__ */ createZeros({
35389
+ var zeros$1 = /* @__PURE__ */ createZeros({
35390
35390
  BigNumber,
35391
35391
  config: config$1,
35392
35392
  matrix,
@@ -35398,7 +35398,7 @@ var round = /* @__PURE__ */ createRound({
35398
35398
  equalScalar,
35399
35399
  matrix,
35400
35400
  typed,
35401
- zeros
35401
+ zeros: zeros$1
35402
35402
  });
35403
35403
  var compare = /* @__PURE__ */ createCompare({
35404
35404
  BigNumber,
@@ -36274,9 +36274,9 @@ function concatenateTypedArrays(...typedArrays) {
36274
36274
  const sumLength = arrays.reduce((acc, value) => acc + value.length, 0);
36275
36275
  const result = new TypedArrayConstructor(sumLength);
36276
36276
  let offset = 0;
36277
- for (const array of arrays) {
36278
- result.set(array, offset);
36279
- offset += array.length;
36277
+ for (const array2 of arrays) {
36278
+ result.set(array2, offset);
36279
+ offset += array2.length;
36280
36280
  }
36281
36281
  return result;
36282
36282
  }
@@ -38005,7 +38005,7 @@ async function parseWithLoader(loader, data, options, context) {
38005
38005
  assert$a(!loader.parseSync);
38006
38006
  throw new Error("".concat(loader.id, " loader - no parser found and worker is disabled"));
38007
38007
  }
38008
- async function load(url, loaders, options, context) {
38008
+ async function load$1(url, loaders, options, context) {
38009
38009
  if (!Array.isArray(loaders) && !isLoaderObject(loaders)) {
38010
38010
  options = loaders;
38011
38011
  loaders = void 0;
@@ -39194,8 +39194,8 @@ const drawFramebuffer = (gl, value) => {
39194
39194
  const readFramebuffer = (gl, value) => {
39195
39195
  return gl.bindFramebuffer(36008, value);
39196
39196
  };
39197
- function isArray$1(array) {
39198
- return Array.isArray(array) || ArrayBuffer.isView(array);
39197
+ function isArray$1(array2) {
39198
+ return Array.isArray(array2) || ArrayBuffer.isView(array2);
39199
39199
  }
39200
39200
  const GL_PARAMETER_SETTERS = {
39201
39201
  [3042]: enable,
@@ -44193,16 +44193,16 @@ class VertexArrayObject extends Resource$1 {
44193
44193
  VertexArrayObject.MAX_ATTRIBUTES = VertexArrayObject.MAX_ATTRIBUTES || gl.getParameter(34921);
44194
44194
  return VertexArrayObject.MAX_ATTRIBUTES;
44195
44195
  }
44196
- static setConstant(gl, location, array) {
44197
- switch (array.constructor) {
44196
+ static setConstant(gl, location, array2) {
44197
+ switch (array2.constructor) {
44198
44198
  case Float32Array:
44199
- VertexArrayObject._setConstantFloatArray(gl, location, array);
44199
+ VertexArrayObject._setConstantFloatArray(gl, location, array2);
44200
44200
  break;
44201
44201
  case Int32Array:
44202
- VertexArrayObject._setConstantIntArray(gl, location, array);
44202
+ VertexArrayObject._setConstantIntArray(gl, location, array2);
44203
44203
  break;
44204
44204
  case Uint32Array:
44205
- VertexArrayObject._setConstantUintArray(gl, location, array);
44205
+ VertexArrayObject._setConstantUintArray(gl, location, array2);
44206
44206
  break;
44207
44207
  default:
44208
44208
  assert$7(false);
@@ -44326,57 +44326,57 @@ class VertexArrayObject extends Resource$1 {
44326
44326
  }
44327
44327
  return true;
44328
44328
  }
44329
- static _setConstantFloatArray(gl, location, array) {
44330
- switch (array.length) {
44329
+ static _setConstantFloatArray(gl, location, array2) {
44330
+ switch (array2.length) {
44331
44331
  case 1:
44332
- gl.vertexAttrib1fv(location, array);
44332
+ gl.vertexAttrib1fv(location, array2);
44333
44333
  break;
44334
44334
  case 2:
44335
- gl.vertexAttrib2fv(location, array);
44335
+ gl.vertexAttrib2fv(location, array2);
44336
44336
  break;
44337
44337
  case 3:
44338
- gl.vertexAttrib3fv(location, array);
44338
+ gl.vertexAttrib3fv(location, array2);
44339
44339
  break;
44340
44340
  case 4:
44341
- gl.vertexAttrib4fv(location, array);
44341
+ gl.vertexAttrib4fv(location, array2);
44342
44342
  break;
44343
44343
  default:
44344
44344
  assert$7(false);
44345
44345
  }
44346
44346
  }
44347
- static _setConstantIntArray(gl, location, array) {
44347
+ static _setConstantIntArray(gl, location, array2) {
44348
44348
  assert$7(isWebGL2$1(gl));
44349
- switch (array.length) {
44349
+ switch (array2.length) {
44350
44350
  case 1:
44351
- gl.vertexAttribI1iv(location, array);
44351
+ gl.vertexAttribI1iv(location, array2);
44352
44352
  break;
44353
44353
  case 2:
44354
- gl.vertexAttribI2iv(location, array);
44354
+ gl.vertexAttribI2iv(location, array2);
44355
44355
  break;
44356
44356
  case 3:
44357
- gl.vertexAttribI3iv(location, array);
44357
+ gl.vertexAttribI3iv(location, array2);
44358
44358
  break;
44359
44359
  case 4:
44360
- gl.vertexAttribI4iv(location, array);
44360
+ gl.vertexAttribI4iv(location, array2);
44361
44361
  break;
44362
44362
  default:
44363
44363
  assert$7(false);
44364
44364
  }
44365
44365
  }
44366
- static _setConstantUintArray(gl, location, array) {
44366
+ static _setConstantUintArray(gl, location, array2) {
44367
44367
  assert$7(isWebGL2$1(gl));
44368
- switch (array.length) {
44368
+ switch (array2.length) {
44369
44369
  case 1:
44370
- gl.vertexAttribI1uiv(location, array);
44370
+ gl.vertexAttribI1uiv(location, array2);
44371
44371
  break;
44372
44372
  case 2:
44373
- gl.vertexAttribI2uiv(location, array);
44373
+ gl.vertexAttribI2uiv(location, array2);
44374
44374
  break;
44375
44375
  case 3:
44376
- gl.vertexAttribI3uiv(location, array);
44376
+ gl.vertexAttribI3uiv(location, array2);
44377
44377
  break;
44378
44378
  case 4:
44379
- gl.vertexAttribI4uiv(location, array);
44379
+ gl.vertexAttribI4uiv(location, array2);
44380
44380
  break;
44381
44381
  default:
44382
44382
  assert$7(false);
@@ -47635,8 +47635,8 @@ class TextureTransform {
47635
47635
  return;
47636
47636
  }
47637
47637
  const elementIds = new Float32Array(elementCount);
47638
- elementIds.forEach((_, index2, array) => {
47639
- array[index2] = index2;
47638
+ elementIds.forEach((_, index2, array2) => {
47639
+ array2[index2] = index2;
47640
47640
  });
47641
47641
  if (!this.elementIDBuffer) {
47642
47642
  this.elementIDBuffer = new Buffer$1(this.gl, {
@@ -50493,11 +50493,11 @@ class TypedArrayManager {
50493
50493
  const byteLength = Type2.BYTES_PER_ELEMENT * sizeToAllocate;
50494
50494
  const i2 = pool.findIndex((b) => b.byteLength >= byteLength);
50495
50495
  if (i2 >= 0) {
50496
- const array = new Type2(pool.splice(i2, 1)[0], 0, sizeToAllocate);
50496
+ const array2 = new Type2(pool.splice(i2, 1)[0], 0, sizeToAllocate);
50497
50497
  if (initialize) {
50498
- array.fill(0);
50498
+ array2.fill(0);
50499
50499
  }
50500
- return array;
50500
+ return array2;
50501
50501
  }
50502
50502
  return new Type2(sizeToAllocate);
50503
50503
  }
@@ -51444,16 +51444,16 @@ const COMPONENT_SYMBOL = Symbol.for("component");
51444
51444
  const ASYNC_DEFAULTS_SYMBOL = Symbol.for("asyncPropDefaults");
51445
51445
  const ASYNC_ORIGINAL_SYMBOL = Symbol.for("asyncPropOriginal");
51446
51446
  const ASYNC_RESOLVED_SYMBOL = Symbol.for("asyncPropResolved");
51447
- function flatten(array, filter = () => true) {
51448
- if (!Array.isArray(array)) {
51449
- return filter(array) ? [array] : [];
51447
+ function flatten(array2, filter = () => true) {
51448
+ if (!Array.isArray(array2)) {
51449
+ return filter(array2) ? [array2] : [];
51450
51450
  }
51451
- return flattenArray(array, filter, []);
51451
+ return flattenArray(array2, filter, []);
51452
51452
  }
51453
- function flattenArray(array, filter, result) {
51453
+ function flattenArray(array2, filter, result) {
51454
51454
  let index2 = -1;
51455
- while (++index2 < array.length) {
51456
- const value = array[index2];
51455
+ while (++index2 < array2.length) {
51456
+ const value = array2[index2];
51457
51457
  if (Array.isArray(value)) {
51458
51458
  flattenArray(value, filter, result);
51459
51459
  } else if (filter(value)) {
@@ -51523,7 +51523,7 @@ class Resource2 {
51523
51523
  const loadCount = ++this._loadCount;
51524
51524
  let loader = data;
51525
51525
  if (typeof data === "string") {
51526
- loader = load(data);
51526
+ loader = load$1(data);
51527
51527
  }
51528
51528
  if (loader instanceof Promise) {
51529
51529
  this.isLoaded = false;
@@ -57142,9 +57142,9 @@ const MOUSE_INPUT_MAP = {
57142
57142
  mousemove: INPUT_MOVE,
57143
57143
  mouseup: INPUT_END
57144
57144
  };
57145
- function some(array, predict) {
57146
- for (let i2 = 0; i2 < array.length; i2++) {
57147
- if (predict(array[i2])) {
57145
+ function some(array2, predict) {
57146
+ for (let i2 = 0; i2 < array2.length; i2++) {
57147
+ if (predict(array2[i2])) {
57148
57148
  return true;
57149
57149
  }
57150
57150
  }
@@ -61430,7 +61430,7 @@ const defaultProps$L = {
61430
61430
  if (!inResourceManager && !loadOptions) {
61431
61431
  resourceManager.add({
61432
61432
  resourceId: url,
61433
- data: load(url, loaders),
61433
+ data: load$1(url, loaders),
61434
61434
  persistent: false
61435
61435
  });
61436
61436
  inResourceManager = true;
@@ -61446,7 +61446,7 @@ const defaultProps$L = {
61446
61446
  requestId: propName
61447
61447
  });
61448
61448
  }
61449
- return load(url, loaders, loadOptions);
61449
+ return load$1(url, loaders, loadOptions);
61450
61450
  },
61451
61451
  compare: false
61452
61452
  },
@@ -64062,7 +64062,7 @@ class IconManager {
64062
64062
  const ctx = this._canvas.getContext("2d");
64063
64063
  for (const icon of icons) {
64064
64064
  this._pendingCount++;
64065
- load(icon.url, ImageLoader, this._loadOptions).then((imageData) => {
64065
+ load$1(icon.url, ImageLoader, this._loadOptions).then((imageData) => {
64066
64066
  const id = getIconId(icon);
64067
64067
  const {
64068
64068
  x: x2,
@@ -72829,8 +72829,8 @@ var libh3 = function(libh32) {
72829
72829
  return stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite);
72830
72830
  }
72831
72831
  typeof TextDecoder !== "undefined" ? new TextDecoder("utf-16le") : void 0;
72832
- function writeArrayToMemory(array, buffer3) {
72833
- HEAP8.set(array, buffer3);
72832
+ function writeArrayToMemory(array2, buffer3) {
72833
+ HEAP8.set(array2, buffer3);
72834
72834
  }
72835
72835
  function alignUp(x2, multiple) {
72836
72836
  if (x2 % multiple > 0) {
@@ -84956,13 +84956,13 @@ function accessorToJsArray(accessor) {
84956
84956
  buffer: buffer2,
84957
84957
  byteOffset
84958
84958
  } = accessor.bufferView.data;
84959
- const array = new ArrayType(buffer2, byteOffset + (accessor.byteOffset || 0), length2);
84959
+ const array2 = new ArrayType(buffer2, byteOffset + (accessor.byteOffset || 0), length2);
84960
84960
  if (components === 1) {
84961
- accessor._animation = Array.from(array);
84961
+ accessor._animation = Array.from(array2);
84962
84962
  } else {
84963
84963
  const slicedArray = [];
84964
- for (let i2 = 0; i2 < array.length; i2 += components) {
84965
- slicedArray.push(Array.from(array.slice(i2, i2 + components)));
84964
+ for (let i2 = 0; i2 < array2.length; i2 += components) {
84965
+ slicedArray.push(Array.from(array2.slice(i2, i2 + components)));
84966
84966
  }
84967
84967
  accessor._animation = slicedArray;
84968
84968
  }
@@ -86133,13 +86133,13 @@ class GLTFScenegraph {
86133
86133
  getBuffer(index2) {
86134
86134
  return this.getObject("buffers", index2);
86135
86135
  }
86136
- getObject(array, index2) {
86136
+ getObject(array2, index2) {
86137
86137
  if (typeof index2 === "object") {
86138
86138
  return index2;
86139
86139
  }
86140
- const object2 = this.json[array] && this.json[array][index2];
86140
+ const object2 = this.json[array2] && this.json[array2][index2];
86141
86141
  if (!object2) {
86142
- throw new Error("glTF file error: Could not find ".concat(array, "[").concat(index2, "]"));
86142
+ throw new Error("glTF file error: Could not find ".concat(array2, "[").concat(index2, "]"));
86143
86143
  }
86144
86144
  return object2;
86145
86145
  }
@@ -86394,12 +86394,12 @@ class GLTFScenegraph {
86394
86394
  this.gltf.binary = arrayBuffer2;
86395
86395
  this.sourceBuffers = [arrayBuffer2];
86396
86396
  }
86397
- _removeStringFromArray(array, string) {
86397
+ _removeStringFromArray(array2, string) {
86398
86398
  let found = true;
86399
86399
  while (found) {
86400
- const index2 = array.indexOf(string);
86400
+ const index2 = array2.indexOf(string);
86401
86401
  if (index2 > -1) {
86402
- array.splice(index2, 1);
86402
+ array2.splice(index2, 1);
86403
86403
  } else {
86404
86404
  found = false;
86405
86405
  }
@@ -86980,8 +86980,8 @@ class FixedSizeList extends DataType {
86980
86980
  return "FixedSizeList[".concat(this.listSize, "]<").concat(this.valueType, ">");
86981
86981
  }
86982
86982
  }
86983
- function getArrowTypeFromTypedArray(array) {
86984
- switch (array.constructor) {
86983
+ function getArrowTypeFromTypedArray(array2) {
86984
+ switch (array2.constructor) {
86985
86985
  case Int8Array:
86986
86986
  return new Int8();
86987
86987
  case Uint8Array:
@@ -87518,17 +87518,17 @@ function getAccessorData(attribute) {
87518
87518
  count: count2
87519
87519
  };
87520
87520
  }
87521
- function toTypedArray(array, ArrayType, convertTypedArrays = false) {
87522
- if (!array) {
87521
+ function toTypedArray(array2, ArrayType, convertTypedArrays = false) {
87522
+ if (!array2) {
87523
87523
  return null;
87524
87524
  }
87525
- if (Array.isArray(array)) {
87526
- return new ArrayType(array);
87525
+ if (Array.isArray(array2)) {
87526
+ return new ArrayType(array2);
87527
87527
  }
87528
- if (convertTypedArrays && !(array instanceof ArrayType)) {
87529
- return new ArrayType(array);
87528
+ if (convertTypedArrays && !(array2 instanceof ArrayType)) {
87529
+ return new ArrayType(array2);
87530
87530
  }
87531
- return array;
87531
+ return array2;
87532
87532
  }
87533
87533
  const KHR_DRACO_MESH_COMPRESSION = "KHR_draco_mesh_compression";
87534
87534
  const name$3 = KHR_DRACO_MESH_COMPRESSION;
@@ -88163,13 +88163,13 @@ class GLTFPostProcessor {
88163
88163
  getBuffer(index2) {
88164
88164
  return this._get("buffers", index2);
88165
88165
  }
88166
- _get(array, index2) {
88166
+ _get(array2, index2) {
88167
88167
  if (typeof index2 === "object") {
88168
88168
  return index2;
88169
88169
  }
88170
- const object2 = this.json[array] && this.json[array][index2];
88170
+ const object2 = this.json[array2] && this.json[array2][index2];
88171
88171
  if (!object2) {
88172
- console.warn("glTF file error: Could not find ".concat(array, "[").concat(index2, "]"));
88172
+ console.warn("glTF file error: Could not find ".concat(array2, "[").concat(index2, "]"));
88173
88173
  }
88174
88174
  return object2;
88175
88175
  }
@@ -88581,8 +88581,8 @@ async function loadImage(gltf, image2, index2, options, context) {
88581
88581
  arrayBuffer2 = await response.arrayBuffer();
88582
88582
  }
88583
88583
  if (Number.isFinite(image2.bufferView)) {
88584
- const array = getTypedArrayForBufferView(gltf.json, gltf.buffers, image2.bufferView);
88585
- arrayBuffer2 = sliceArrayBuffer(array.buffer, array.byteOffset, array.byteLength);
88584
+ const array2 = getTypedArrayForBufferView(gltf.json, gltf.buffers, image2.bufferView);
88585
+ arrayBuffer2 = sliceArrayBuffer(array2.buffer, array2.byteOffset, array2.byteLength);
88586
88586
  }
88587
88587
  assert$3(arrayBuffer2, "glTF image has no data");
88588
88588
  let parsedImage = await parse2(arrayBuffer2, [ImageLoader, BasisLoader], {
@@ -90489,7 +90489,7 @@ class TileHeader {
90489
90489
  ...this._getLoaderSpecificOptions(loader.id)
90490
90490
  }
90491
90491
  };
90492
- this.content = await load(contentUrl, loader, options);
90492
+ this.content = await load$1(contentUrl, loader, options);
90493
90493
  if (this.tileset.options.contentLoader) {
90494
90494
  await this.tileset.options.contentLoader(this);
90495
90495
  }
@@ -90878,7 +90878,7 @@ class I3STilesetTraverser extends TilesetTraverser {
90878
90878
  loadContent: false
90879
90879
  }
90880
90880
  };
90881
- return await load(nodeUrl, loader, options);
90881
+ return await load$1(nodeUrl, loader, options);
90882
90882
  }
90883
90883
  _onTileLoad(header, tile, extendedId) {
90884
90884
  const childTile = new TileHeader(tile.tileset, header, tile, extendedId);
@@ -91685,11 +91685,11 @@ class Tile3DFeatureTable {
91685
91685
  }
91686
91686
  return typedArray;
91687
91687
  }
91688
- _getTypedArrayFromArray(propertyName, componentType, array) {
91688
+ _getTypedArrayFromArray(propertyName, componentType, array2) {
91689
91689
  const cachedTypedArrays = this._cachedTypedArrays;
91690
91690
  let typedArray = cachedTypedArrays[propertyName];
91691
91691
  if (!typedArray) {
91692
- typedArray = GLType.createTypedArray(componentType, array);
91692
+ typedArray = GLType.createTypedArray(componentType, array2);
91693
91693
  cachedTypedArrays[propertyName] = typedArray;
91694
91694
  }
91695
91695
  return typedArray;
@@ -92945,7 +92945,7 @@ async function parseImplicitTiles(params) {
92945
92945
  if (isChildSubtreeAvailable) {
92946
92946
  const subtreePath = "".concat(basePath, "/").concat(subtreesUriTemplate);
92947
92947
  const childSubtreeUrl = replaceContentUrlTemplate(subtreePath, lev, x2, y2, z2);
92948
- const childSubtree = await load(childSubtreeUrl, Tile3DSubtreeLoader);
92948
+ const childSubtree = await load$1(childSubtreeUrl, Tile3DSubtreeLoader);
92949
92949
  subtree = childSubtree;
92950
92950
  globalData.mortonIndex = childTileMortonIndex;
92951
92951
  globalData.x = childTileX;
@@ -93168,7 +93168,7 @@ async function normalizeImplicitTileHeaders(tileset) {
93168
93168
  } = implicitTilingExtension;
93169
93169
  const subtreeUrl = replaceContentUrlTemplate(subtreesUriTemplate, 0, 0, 0, 0);
93170
93170
  const rootSubtreeUrl = resolveUri(subtreeUrl, basePath);
93171
- const rootSubtree = await load(rootSubtreeUrl, Tile3DSubtreeLoader);
93171
+ const rootSubtree = await load$1(rootSubtreeUrl, Tile3DSubtreeLoader);
93172
93172
  const contentUrlTemplate = resolveUri(tileset.root.content.uri, basePath);
93173
93173
  const refine = tileset.root.refine;
93174
93174
  const rootLodMetricValue = tileset.root.geometricError;
@@ -93442,7 +93442,7 @@ class Tile3DLayer extends CompositeLayer {
93442
93442
  }
93443
93443
  Object.assign(options, preloadOptions);
93444
93444
  }
93445
- const tilesetJson = await load(tilesetUrl, loader, options.loadOptions);
93445
+ const tilesetJson = await load$1(tilesetUrl, loader, options.loadOptions);
93446
93446
  const tileset3d = new Tileset3D(tilesetJson, {
93447
93447
  onTileLoad: this._onTileLoad.bind(this),
93448
93448
  onTileUnload: this._onTileUnload.bind(this),
@@ -96763,9 +96763,9 @@ function getGlobalFeatureId(geomData, featureIndex) {
96763
96763
  }
96764
96764
  return geomData.__ids[featureIndex];
96765
96765
  }
96766
- function findIndex(array, predicate, startIndex, endIndex) {
96766
+ function findIndex(array2, predicate, startIndex, endIndex) {
96767
96767
  for (let i2 = startIndex; i2 < endIndex; i2++) {
96768
- if (predicate(array[i2], i2)) {
96768
+ if (predicate(array2[i2], i2)) {
96769
96769
  return i2;
96770
96770
  }
96771
96771
  }
@@ -111717,16 +111717,16 @@ function clipPolygon(segments, compareIntersection2, startInside, interpolate2,
111717
111717
  stream.lineEnd();
111718
111718
  }
111719
111719
  }
111720
- function link(array) {
111721
- if (!(n3 = array.length))
111720
+ function link(array2) {
111721
+ if (!(n3 = array2.length))
111722
111722
  return;
111723
- var n3, i2 = 0, a2 = array[0], b;
111723
+ var n3, i2 = 0, a2 = array2[0], b;
111724
111724
  while (++i2 < n3) {
111725
- a2.n = b = array[i2];
111725
+ a2.n = b = array2[i2];
111726
111726
  b.p = a2;
111727
111727
  a2 = b;
111728
111728
  }
111729
- a2.n = b = array[0];
111729
+ a2.n = b = array2[0];
111730
111730
  b.p = a2;
111731
111731
  }
111732
111732
  function ascending(a2, b) {
@@ -111781,15 +111781,15 @@ function range$1(start, stop, step) {
111781
111781
  return range2;
111782
111782
  }
111783
111783
  function merge(arrays) {
111784
- var n3 = arrays.length, m, i2 = -1, j = 0, merged, array;
111784
+ var n3 = arrays.length, m, i2 = -1, j = 0, merged, array2;
111785
111785
  while (++i2 < n3)
111786
111786
  j += arrays[i2].length;
111787
111787
  merged = new Array(j);
111788
111788
  while (--n3 >= 0) {
111789
- array = arrays[n3];
111790
- m = array.length;
111789
+ array2 = arrays[n3];
111790
+ m = array2.length;
111791
111791
  while (--m >= 0) {
111792
- merged[--j] = array[m];
111792
+ merged[--j] = array2[m];
111793
111793
  }
111794
111794
  }
111795
111795
  return merged;
@@ -117507,13 +117507,13 @@ function toDeckColor$2(color) {
117507
117507
  }
117508
117508
  return [color[0] * 255, color[1] * 255, color[2] * 255, color[3] * 255];
117509
117509
  }
117510
- function recursivelyTraverseNestedArrays$2(array, prefix, fn) {
117511
- if (!Array.isArray(array[0])) {
117510
+ function recursivelyTraverseNestedArrays$2(array2, prefix, fn) {
117511
+ if (!Array.isArray(array2[0])) {
117512
117512
  return true;
117513
117513
  }
117514
- for (var i2 = 0; i2 < array.length; i2++) {
117515
- if (recursivelyTraverseNestedArrays$2(array[i2], [].concat(_toConsumableArray$h(prefix), [i2]), fn)) {
117516
- fn(array, prefix);
117514
+ for (var i2 = 0; i2 < array2.length; i2++) {
117515
+ if (recursivelyTraverseNestedArrays$2(array2[i2], [].concat(_toConsumableArray$h(prefix), [i2]), fn)) {
117516
+ fn(array2, prefix);
117517
117517
  break;
117518
117518
  }
117519
117519
  }
@@ -130868,13 +130868,13 @@ function toDeckColor$1(color) {
130868
130868
  }
130869
130869
  return [color[0] * 255, color[1] * 255, color[2] * 255, color[3] * 255];
130870
130870
  }
130871
- function recursivelyTraverseNestedArrays$1(array, prefix, fn) {
130872
- if (!Array.isArray(array[0])) {
130871
+ function recursivelyTraverseNestedArrays$1(array2, prefix, fn) {
130872
+ if (!Array.isArray(array2[0])) {
130873
130873
  return true;
130874
130874
  }
130875
- for (var i2 = 0; i2 < array.length; i2++) {
130876
- if (recursivelyTraverseNestedArrays$1(array[i2], [].concat(_toConsumableArray$1(prefix), [i2]), fn)) {
130877
- fn(array, prefix);
130875
+ for (var i2 = 0; i2 < array2.length; i2++) {
130876
+ if (recursivelyTraverseNestedArrays$1(array2[i2], [].concat(_toConsumableArray$1(prefix), [i2]), fn)) {
130877
+ fn(array2, prefix);
130878
130878
  break;
130879
130879
  }
130880
130880
  }
@@ -131083,13 +131083,13 @@ function toDeckColor(color) {
131083
131083
  }
131084
131084
  return [color[0] * 255, color[1] * 255, color[2] * 255, color[3] * 255];
131085
131085
  }
131086
- function recursivelyTraverseNestedArrays(array, prefix, fn) {
131087
- if (!Array.isArray(array[0])) {
131086
+ function recursivelyTraverseNestedArrays(array2, prefix, fn) {
131087
+ if (!Array.isArray(array2[0])) {
131088
131088
  return true;
131089
131089
  }
131090
- for (var i2 = 0; i2 < array.length; i2++) {
131091
- if (recursivelyTraverseNestedArrays(array[i2], [].concat(_toConsumableArray(prefix), [i2]), fn)) {
131092
- fn(array, prefix);
131090
+ for (var i2 = 0; i2 < array2.length; i2++) {
131091
+ if (recursivelyTraverseNestedArrays(array2[i2], [].concat(_toConsumableArray(prefix), [i2]), fn)) {
131092
+ fn(array2, prefix);
131093
131093
  break;
131094
131094
  }
131095
131095
  }
@@ -133825,12 +133825,12 @@ const SafeIteratorPrototype = ObjectCreate(null, {
133825
133825
  }
133826
133826
  }
133827
133827
  });
133828
- function safeIfNeeded(array) {
133829
- if (array[SymbolIterator] === NativeArrayPrototypeSymbolIterator) {
133830
- return array;
133828
+ function safeIfNeeded(array2) {
133829
+ if (array2[SymbolIterator] === NativeArrayPrototypeSymbolIterator) {
133830
+ return array2;
133831
133831
  }
133832
133832
  const safe = ObjectCreate(SafeIteratorPrototype);
133833
- WeakMapPrototypeSet(arrayIterators, safe, ArrayPrototypeSymbolIterator(array));
133833
+ WeakMapPrototypeSet(arrayIterators, safe, ArrayPrototypeSymbolIterator(array2));
133834
133834
  return safe;
133835
133835
  }
133836
133836
  const generators = new NativeWeakMap();
@@ -134395,29 +134395,29 @@ async function getDecoder(fileDirectory) {
134395
134395
  const Decoder = await importFn();
134396
134396
  return new Decoder(fileDirectory);
134397
134397
  }
134398
- addDecoder([void 0, 1], () => import("./raw-3f989896.js").then((m) => m.default));
134399
- addDecoder(5, () => import("./lzw-e9c82d83.js").then((m) => m.default));
134398
+ addDecoder([void 0, 1], () => import("./raw-88c5a59c.js").then((m) => m.default));
134399
+ addDecoder(5, () => import("./lzw-0f433a46.js").then((m) => m.default));
134400
134400
  addDecoder(6, () => {
134401
134401
  throw new Error("old style JPEG compression is not supported.");
134402
134402
  });
134403
- addDecoder(7, () => import("./jpeg-e323e6ed.js").then((m) => m.default));
134404
- addDecoder([8, 32946], () => import("./deflate-a2d6b257.js").then((m) => m.default));
134405
- addDecoder(32773, () => import("./packbits-0a0f672b.js").then((m) => m.default));
134406
- addDecoder(34887, () => import("./lerc-0dc6a58a.js").then((m) => m.default));
134407
- addDecoder(50001, () => import("./webimage-f799ed95.js").then((m) => m.default));
134408
- function copyNewSize(array, width, height, samplesPerPixel = 1) {
134409
- return new (Object.getPrototypeOf(array)).constructor(width * height * samplesPerPixel);
134403
+ addDecoder(7, () => import("./jpeg-cf883268.js").then((m) => m.default));
134404
+ addDecoder([8, 32946], () => import("./deflate-ba4bbf4e.js").then((m) => m.default));
134405
+ addDecoder(32773, () => import("./packbits-9f8b76b3.js").then((m) => m.default));
134406
+ addDecoder(34887, () => import("./lerc-eb8b24d4.js").then((m) => m.default));
134407
+ addDecoder(50001, () => import("./webimage-32a7a116.js").then((m) => m.default));
134408
+ function copyNewSize(array2, width, height, samplesPerPixel = 1) {
134409
+ return new (Object.getPrototypeOf(array2)).constructor(width * height * samplesPerPixel);
134410
134410
  }
134411
134411
  function resampleNearest(valueArrays, inWidth, inHeight, outWidth, outHeight) {
134412
134412
  const relX = inWidth / outWidth;
134413
134413
  const relY = inHeight / outHeight;
134414
- return valueArrays.map((array) => {
134415
- const newArray = copyNewSize(array, outWidth, outHeight);
134414
+ return valueArrays.map((array2) => {
134415
+ const newArray = copyNewSize(array2, outWidth, outHeight);
134416
134416
  for (let y2 = 0; y2 < outHeight; ++y2) {
134417
134417
  const cy = Math.min(Math.round(relY * y2), inHeight - 1);
134418
134418
  for (let x2 = 0; x2 < outWidth; ++x2) {
134419
134419
  const cx = Math.min(Math.round(relX * x2), inWidth - 1);
134420
- const value = array[cy * inWidth + cx];
134420
+ const value = array2[cy * inWidth + cx];
134421
134421
  newArray[y2 * outWidth + x2] = value;
134422
134422
  }
134423
134423
  }
@@ -134430,8 +134430,8 @@ function lerp(v0, v12, t2) {
134430
134430
  function resampleBilinear(valueArrays, inWidth, inHeight, outWidth, outHeight) {
134431
134431
  const relX = inWidth / outWidth;
134432
134432
  const relY = inHeight / outHeight;
134433
- return valueArrays.map((array) => {
134434
- const newArray = copyNewSize(array, outWidth, outHeight);
134433
+ return valueArrays.map((array2) => {
134434
+ const newArray = copyNewSize(array2, outWidth, outHeight);
134435
134435
  for (let y2 = 0; y2 < outHeight; ++y2) {
134436
134436
  const rawY = relY * y2;
134437
134437
  const yl = Math.floor(rawY);
@@ -134441,10 +134441,10 @@ function resampleBilinear(valueArrays, inWidth, inHeight, outWidth, outHeight) {
134441
134441
  const tx = rawX % 1;
134442
134442
  const xl = Math.floor(rawX);
134443
134443
  const xh = Math.min(Math.ceil(rawX), inWidth - 1);
134444
- const ll = array[yl * inWidth + xl];
134445
- const hl = array[yl * inWidth + xh];
134446
- const lh = array[yh * inWidth + xl];
134447
- const hh = array[yh * inWidth + xh];
134444
+ const ll = array2[yl * inWidth + xl];
134445
+ const hl = array2[yl * inWidth + xh];
134446
+ const lh = array2[yh * inWidth + xl];
134447
+ const hh = array2[yh * inWidth + xh];
134448
134448
  const value = lerp(
134449
134449
  lerp(ll, hl, tx),
134450
134450
  lerp(lh, hh, tx),
@@ -134537,10 +134537,10 @@ function resampleInterleaved(valueArray2, inWidth, inHeight, outWidth, outHeight
134537
134537
  throw new Error(`Unsupported resampling method: '${method}'`);
134538
134538
  }
134539
134539
  }
134540
- function sum(array, start, end) {
134540
+ function sum(array2, start, end) {
134541
134541
  let s2 = 0;
134542
134542
  for (let i2 = start; i2 < end; ++i2) {
134543
- s2 += array[i2];
134543
+ s2 += array2[i2];
134544
134544
  }
134545
134545
  return s2;
134546
134546
  }
@@ -138512,6 +138512,13 @@ class ArrayNotFoundError extends Error {
138512
138512
  Object.setPrototypeOf(this, ArrayNotFoundError.prototype);
138513
138513
  }
138514
138514
  }
138515
+ class GroupNotFoundError extends Error {
138516
+ constructor(path) {
138517
+ super(`ground not found at path ${path}`);
138518
+ this.__zarr__ = "GroupNotFoundError";
138519
+ Object.setPrototypeOf(this, GroupNotFoundError.prototype);
138520
+ }
138521
+ }
138515
138522
  class PermissionError extends Error {
138516
138523
  constructor(message) {
138517
138524
  super(message);
@@ -138793,14 +138800,14 @@ function* product(...iterables) {
138793
138800
  }
138794
138801
  }
138795
138802
  class BasicIndexer {
138796
- constructor(selection, array) {
138797
- selection = normalizeArraySelection(selection, array.shape);
138803
+ constructor(selection, array2) {
138804
+ selection = normalizeArraySelection(selection, array2.shape);
138798
138805
  this.dimIndexers = [];
138799
- const arrayShape = array.shape;
138806
+ const arrayShape = array2.shape;
138800
138807
  for (let i2 = 0; i2 < arrayShape.length; i2++) {
138801
138808
  let dimSelection = selection[i2];
138802
138809
  const dimLength = arrayShape[i2];
138803
- const dimChunkLength = array.chunks[i2];
138810
+ const dimChunkLength = array2.chunks[i2];
138804
138811
  if (dimSelection === null) {
138805
138812
  dimSelection = slice(null);
138806
138813
  }
@@ -139111,6 +139118,11 @@ async function initGroupMetadata(store, path = null, overwrite = false) {
139111
139118
  const key = pathToPrefix(path) + GROUP_META_KEY;
139112
139119
  await store.setItem(key, JSON.stringify(metadata));
139113
139120
  }
139121
+ async function initGroup(store, path = null, chunkStore = null, overwrite = false) {
139122
+ path = normalizeStoragePath(path);
139123
+ await requireParentGroup(store, path, chunkStore, overwrite);
139124
+ await initGroupMetadata(store, path, overwrite);
139125
+ }
139114
139126
  async function initArrayMetadata(store, shape, chunks, dtype, path, compressor, fillValue, order, overwrite, chunkStore, filters, dimensionSeparator) {
139115
139127
  if (overwrite) {
139116
139128
  throw Error("Array overwriting not implemented yet :(");
@@ -139932,13 +139944,13 @@ var _default$3 = pTimeout;
139932
139944
  var TimeoutError_1 = TimeoutError;
139933
139945
  pTimeout_1.default = _default$3;
139934
139946
  pTimeout_1.TimeoutError = TimeoutError_1;
139935
- function lowerBound(array, value, comparator2) {
139947
+ function lowerBound(array2, value, comparator2) {
139936
139948
  let first = 0;
139937
- let count2 = array.length;
139949
+ let count2 = array2.length;
139938
139950
  while (count2 > 0) {
139939
139951
  const step = count2 / 2 | 0;
139940
139952
  let it = first + step;
139941
- if (comparator2(array[it], value) <= 0) {
139953
+ if (comparator2(array2[it], value) <= 0) {
139942
139954
  first = ++it;
139943
139955
  count2 -= step + 1;
139944
139956
  } else {
@@ -140804,6 +140816,43 @@ class HTTPStore {
140804
140816
  return value.status === 200;
140805
140817
  }
140806
140818
  }
140819
+ async function create({ shape, chunks = true, dtype = "<i4", compressor = null, fillValue = null, order = "C", store, overwrite = false, path, chunkStore, filters, cacheMetadata = true, cacheAttrs = true, readOnly = false, dimensionSeparator }) {
140820
+ store = normalizeStoreArgument(store);
140821
+ await initArray(store, shape, chunks, dtype, path, compressor, fillValue, order, overwrite, chunkStore, filters, dimensionSeparator);
140822
+ const z2 = await ZarrArray.create(store, path, readOnly, chunkStore, cacheMetadata, cacheAttrs);
140823
+ return z2;
140824
+ }
140825
+ async function empty(shape, opts2 = {}) {
140826
+ opts2.fillValue = null;
140827
+ return create({ shape, ...opts2 });
140828
+ }
140829
+ async function zeros(shape, opts2 = {}) {
140830
+ opts2.fillValue = 0;
140831
+ return create({ shape, ...opts2 });
140832
+ }
140833
+ async function ones(shape, opts2 = {}) {
140834
+ opts2.fillValue = 1;
140835
+ return create({ shape, ...opts2 });
140836
+ }
140837
+ async function full(shape, fillValue, opts2 = {}) {
140838
+ opts2.fillValue = fillValue;
140839
+ return create({ shape, ...opts2 });
140840
+ }
140841
+ async function array(data, opts2 = {}) {
140842
+ let shape = null;
140843
+ if (data instanceof NestedArray) {
140844
+ shape = data.shape;
140845
+ opts2.dtype = opts2.dtype === void 0 ? data.dtype : opts2.dtype;
140846
+ } else {
140847
+ shape = data.byteLength;
140848
+ }
140849
+ const wasReadOnly = opts2.readOnly === void 0 ? false : opts2.readOnly;
140850
+ opts2.readOnly = false;
140851
+ const z2 = await create({ shape, ...opts2 });
140852
+ await z2.set(null, data);
140853
+ z2.readOnly = wasReadOnly;
140854
+ return z2;
140855
+ }
140807
140856
  async function openArray({ shape, mode = "a", chunks = true, dtype = "<i4", compressor = null, fillValue = null, order = "C", store, overwrite = false, path = null, chunkStore, filters, cacheMetadata = true, cacheAttrs = true, dimensionSeparator } = {}) {
140808
140857
  store = normalizeStoreArgument(store);
140809
140858
  if (chunkStore === void 0) {
@@ -140857,6 +140906,223 @@ function normalizeStoreArgument(store) {
140857
140906
  }
140858
140907
  return store;
140859
140908
  }
140909
+ class Group {
140910
+ constructor(store, path = null, metadata, readOnly = false, chunkStore = null, cacheAttrs = true) {
140911
+ this.store = store;
140912
+ this._chunkStore = chunkStore;
140913
+ this.path = normalizeStoragePath(path);
140914
+ this.keyPrefix = pathToPrefix(this.path);
140915
+ this.readOnly = readOnly;
140916
+ this.meta = metadata;
140917
+ const attrKey = this.keyPrefix + ATTRS_META_KEY;
140918
+ this.attrs = new Attributes(this.store, attrKey, this.readOnly, cacheAttrs);
140919
+ }
140920
+ /**
140921
+ * Group name following h5py convention.
140922
+ */
140923
+ get name() {
140924
+ if (this.path.length > 0) {
140925
+ if (this.path[0] !== "/") {
140926
+ return "/" + this.path;
140927
+ }
140928
+ return this.path;
140929
+ }
140930
+ return "/";
140931
+ }
140932
+ /**
140933
+ * Final component of name.
140934
+ */
140935
+ get basename() {
140936
+ const parts = this.name.split("/");
140937
+ return parts[parts.length - 1];
140938
+ }
140939
+ /**
140940
+ * A `Store` providing the underlying storage for array chunks.
140941
+ */
140942
+ get chunkStore() {
140943
+ if (this._chunkStore) {
140944
+ return this._chunkStore;
140945
+ }
140946
+ return this.store;
140947
+ }
140948
+ static async create(store, path = null, readOnly = false, chunkStore = null, cacheAttrs = true) {
140949
+ const metadata = await this.loadMetadataForConstructor(store, path);
140950
+ return new Group(store, path, metadata, readOnly, chunkStore, cacheAttrs);
140951
+ }
140952
+ static async loadMetadataForConstructor(store, path) {
140953
+ path = normalizeStoragePath(path);
140954
+ const keyPrefix = pathToPrefix(path);
140955
+ try {
140956
+ const metaStoreValue = await store.getItem(keyPrefix + GROUP_META_KEY);
140957
+ return parseMetadata(metaStoreValue);
140958
+ } catch (error2) {
140959
+ if (await containsArray(store, path)) {
140960
+ throw new ContainsArrayError(path);
140961
+ }
140962
+ throw new GroupNotFoundError(path);
140963
+ }
140964
+ }
140965
+ itemPath(item) {
140966
+ const absolute = typeof item === "string" && item.length > 0 && item[0] === "/";
140967
+ const path = normalizeStoragePath(item);
140968
+ if (!absolute && this.path.length > 0) {
140969
+ return this.keyPrefix + path;
140970
+ }
140971
+ return path;
140972
+ }
140973
+ /**
140974
+ * Create a sub-group.
140975
+ */
140976
+ async createGroup(name2, overwrite = false) {
140977
+ if (this.readOnly) {
140978
+ throw new PermissionError("group is read only");
140979
+ }
140980
+ const path = this.itemPath(name2);
140981
+ await initGroup(this.store, path, this._chunkStore, overwrite);
140982
+ return Group.create(this.store, path, this.readOnly, this._chunkStore, this.attrs.cache);
140983
+ }
140984
+ /**
140985
+ * Obtain a sub-group, creating one if it doesn't exist.
140986
+ */
140987
+ async requireGroup(name2, overwrite = false) {
140988
+ if (this.readOnly) {
140989
+ throw new PermissionError("group is read only");
140990
+ }
140991
+ const path = this.itemPath(name2);
140992
+ if (!await containsGroup(this.store, path)) {
140993
+ await initGroup(this.store, path, this._chunkStore, overwrite);
140994
+ }
140995
+ return Group.create(this.store, path, this.readOnly, this._chunkStore, this.attrs.cache);
140996
+ }
140997
+ getOptsForArrayCreation(name2, opts2 = {}) {
140998
+ const path = this.itemPath(name2);
140999
+ opts2.path = path;
141000
+ if (opts2.cacheAttrs === void 0) {
141001
+ opts2.cacheAttrs = this.attrs.cache;
141002
+ }
141003
+ opts2.store = this.store;
141004
+ opts2.chunkStore = this.chunkStore;
141005
+ return opts2;
141006
+ }
141007
+ /**
141008
+ * Creates an array
141009
+ */
141010
+ array(name2, data, opts2, overwrite) {
141011
+ if (this.readOnly) {
141012
+ throw new PermissionError("group is read only");
141013
+ }
141014
+ opts2 = this.getOptsForArrayCreation(name2, opts2);
141015
+ opts2.overwrite = overwrite === void 0 ? opts2.overwrite : overwrite;
141016
+ return array(data, opts2);
141017
+ }
141018
+ empty(name2, shape, opts2 = {}) {
141019
+ if (this.readOnly) {
141020
+ throw new PermissionError("group is read only");
141021
+ }
141022
+ opts2 = this.getOptsForArrayCreation(name2, opts2);
141023
+ return empty(shape, opts2);
141024
+ }
141025
+ zeros(name2, shape, opts2 = {}) {
141026
+ if (this.readOnly) {
141027
+ throw new PermissionError("group is read only");
141028
+ }
141029
+ opts2 = this.getOptsForArrayCreation(name2, opts2);
141030
+ return zeros(shape, opts2);
141031
+ }
141032
+ ones(name2, shape, opts2 = {}) {
141033
+ if (this.readOnly) {
141034
+ throw new PermissionError("group is read only");
141035
+ }
141036
+ opts2 = this.getOptsForArrayCreation(name2, opts2);
141037
+ return ones(shape, opts2);
141038
+ }
141039
+ full(name2, shape, fillValue, opts2 = {}) {
141040
+ if (this.readOnly) {
141041
+ throw new PermissionError("group is read only");
141042
+ }
141043
+ opts2 = this.getOptsForArrayCreation(name2, opts2);
141044
+ return full(shape, fillValue, opts2);
141045
+ }
141046
+ createDataset(name2, shape, data, opts2) {
141047
+ if (this.readOnly) {
141048
+ throw new PermissionError("group is read only");
141049
+ }
141050
+ opts2 = this.getOptsForArrayCreation(name2, opts2);
141051
+ let z2;
141052
+ if (data === void 0) {
141053
+ if (shape === void 0) {
141054
+ throw new ValueError("Shape must be set if no data is passed to CreateDataset");
141055
+ }
141056
+ z2 = create({ shape, ...opts2 });
141057
+ } else {
141058
+ z2 = array(data, opts2);
141059
+ }
141060
+ return z2;
141061
+ }
141062
+ async getItem(item) {
141063
+ const path = this.itemPath(item);
141064
+ if (await containsArray(this.store, path)) {
141065
+ return ZarrArray.create(this.store, path, this.readOnly, this.chunkStore, void 0, this.attrs.cache);
141066
+ } else if (await containsGroup(this.store, path)) {
141067
+ return Group.create(this.store, path, this.readOnly, this._chunkStore, this.attrs.cache);
141068
+ }
141069
+ throw new KeyError(item);
141070
+ }
141071
+ async setItem(item, value) {
141072
+ await this.array(item, value, {}, true);
141073
+ return true;
141074
+ }
141075
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
141076
+ async deleteItem(_item) {
141077
+ if (this.readOnly) {
141078
+ throw new PermissionError("group is read only");
141079
+ }
141080
+ throw new Error("Method not implemented.");
141081
+ }
141082
+ async containsItem(item) {
141083
+ const path = this.itemPath(item);
141084
+ return await containsArray(this.store, path) || containsGroup(this.store, path);
141085
+ }
141086
+ proxy() {
141087
+ return createProxy(this);
141088
+ }
141089
+ }
141090
+ async function openGroup(store, path = null, mode = "a", chunkStore, cacheAttrs = true) {
141091
+ store = normalizeStoreArgument(store);
141092
+ if (chunkStore !== void 0) {
141093
+ chunkStore = normalizeStoreArgument(store);
141094
+ }
141095
+ path = normalizeStoragePath(path);
141096
+ if (mode === "r" || mode === "r+") {
141097
+ if (!await containsGroup(store, path)) {
141098
+ if (await containsArray(store, path)) {
141099
+ throw new ContainsArrayError(path);
141100
+ }
141101
+ throw new GroupNotFoundError(path);
141102
+ }
141103
+ } else if (mode === "w") {
141104
+ await initGroup(store, path, chunkStore, true);
141105
+ } else if (mode === "a") {
141106
+ if (!await containsGroup(store, path)) {
141107
+ if (await containsArray(store, path)) {
141108
+ throw new ContainsArrayError(path);
141109
+ }
141110
+ await initGroup(store, path, chunkStore);
141111
+ }
141112
+ } else if (mode === "w-" || mode === "x") {
141113
+ if (await containsArray(store, path)) {
141114
+ throw new ContainsArrayError(path);
141115
+ } else if (await containsGroup(store, path)) {
141116
+ throw new ContainsGroupError(path);
141117
+ } else {
141118
+ await initGroup(store, path, chunkStore);
141119
+ }
141120
+ } else {
141121
+ throw new ValueError(`Invalid mode argument: ${mode}`);
141122
+ }
141123
+ const readOnly = mode === "r";
141124
+ return Group.create(store, path, readOnly, chunkStore, cacheAttrs);
141125
+ }
140860
141126
  /*! pako 2.0.3 https://github.com/nodeca/pako @license (MIT AND Zlib) */
140861
141127
  const Z_FIXED = 4;
140862
141128
  const Z_BINARY = 0;
@@ -146406,6 +146672,41 @@ async function loadOmeTiff(source, opts2 = {}) {
146406
146672
  const loaders = await load$3(tiff, pool);
146407
146673
  return images === "all" ? loaders : loaders[0];
146408
146674
  }
146675
+ function isAxis(axisOrLabel) {
146676
+ return typeof axisOrLabel[0] !== "string";
146677
+ }
146678
+ function castLabels(dimnames) {
146679
+ return dimnames;
146680
+ }
146681
+ async function loadMultiscales(store, path = "") {
146682
+ const grp = await openGroup(store, path);
146683
+ const rootAttrs = await grp.attrs.asObject();
146684
+ let paths = ["0"];
146685
+ let labels = castLabels(["t", "c", "z", "y", "x"]);
146686
+ if ("multiscales" in rootAttrs) {
146687
+ const { datasets, axes } = rootAttrs.multiscales[0];
146688
+ paths = datasets.map((d) => d.path);
146689
+ if (axes) {
146690
+ if (isAxis(axes)) {
146691
+ labels = castLabels(axes.map((axis) => axis.name));
146692
+ } else {
146693
+ labels = castLabels(axes);
146694
+ }
146695
+ }
146696
+ }
146697
+ const data = paths.map((path2) => grp.getItem(path2));
146698
+ return {
146699
+ data: await Promise.all(data),
146700
+ rootAttrs,
146701
+ labels
146702
+ };
146703
+ }
146704
+ function guessTileSize(arr) {
146705
+ const interleaved = isInterleaved$1(arr.shape);
146706
+ const [yChunk, xChunk] = arr.chunks.slice(interleaved ? -3 : -2);
146707
+ const size2 = Math.min(yChunk, xChunk);
146708
+ return prevPowerOf2(size2);
146709
+ }
146409
146710
  function getIndexer(labels) {
146410
146711
  const size2 = labels.length;
146411
146712
  const dims = getDims(labels);
@@ -146504,6 +146805,22 @@ class ZarrPixelSource {
146504
146805
  }
146505
146806
  }
146506
146807
  }
146808
+ async function load(store) {
146809
+ const { data, rootAttrs, labels } = await loadMultiscales(store);
146810
+ const tileSize = guessTileSize(data[0]);
146811
+ const pyramid = data.map((arr) => new ZarrPixelSource(arr, labels, tileSize));
146812
+ return {
146813
+ data: pyramid,
146814
+ metadata: rootAttrs
146815
+ };
146816
+ }
146817
+ async function loadOmeZarr(source, options = {}) {
146818
+ const store = new HTTPStore(source, options);
146819
+ if ((options == null ? void 0 : options.type) !== "multiscales") {
146820
+ throw Error("Only multiscale OME-Zarr is supported.");
146821
+ }
146822
+ return load(store);
146823
+ }
146507
146824
  const MAX_COLOR_INTENSITY = 255;
146508
146825
  const DEFAULT_COLOR_OFF = [0, 0, 0];
146509
146826
  const MAX_CHANNELS = 6;
@@ -150691,6 +151008,62 @@ async function initializeRasterLayersAndChannels(rasterLayers, rasterRenderLayer
150691
151008
  const autoImageLayerDefs = await Promise.all(autoImageLayerDefPromises);
150692
151009
  return [autoImageLayerDefs, nextImageLoaders, nextImageMetaAndLayers];
150693
151010
  }
151011
+ function getDefaultAxisType(name2) {
151012
+ if (name2 === "t")
151013
+ return "time";
151014
+ if (name2 === "c")
151015
+ return "channel";
151016
+ return "space";
151017
+ }
151018
+ function getNgffAxes(firstMultiscalesAxes) {
151019
+ const defaultAxes = [
151020
+ { type: "time", name: "t" },
151021
+ { type: "channel", name: "c" },
151022
+ { type: "space", name: "z" },
151023
+ { type: "space", name: "y" },
151024
+ { type: "space", name: "x" }
151025
+ ];
151026
+ let axes = defaultAxes;
151027
+ if (firstMultiscalesAxes) {
151028
+ axes = firstMultiscalesAxes.map((axis) => {
151029
+ if (typeof axis === "string") {
151030
+ return { name: axis, type: getDefaultAxisType(axis) };
151031
+ }
151032
+ const { name: name2, type } = axis;
151033
+ return { name: name2, type: type ?? getDefaultAxisType(name2) };
151034
+ });
151035
+ }
151036
+ return axes;
151037
+ }
151038
+ function coordinateTransformationsToMatrix(coordinateTransformations, axes) {
151039
+ let mat = new Matrix4().identity();
151040
+ if (coordinateTransformations && axes) {
151041
+ const xyzIndices = ["x", "y", "z"].map((name2) => axes.findIndex((axisObj) => axisObj.type === "space" && axisObj.name === name2));
151042
+ coordinateTransformations.forEach((transform2) => {
151043
+ if (transform2.type === "translation") {
151044
+ const { translation: axisOrderedTranslation } = transform2;
151045
+ if (axisOrderedTranslation.length !== axes.length) {
151046
+ throw new Error("Length of translation array was expected to match length of axes.");
151047
+ }
151048
+ const defaultValue2 = 0;
151049
+ const xyzTranslation = xyzIndices.map((axisIndex) => axisIndex >= 0 ? axisOrderedTranslation[axisIndex] : defaultValue2);
151050
+ const nextMat = new Matrix4().translate(xyzTranslation);
151051
+ mat = mat.multiplyLeft(nextMat);
151052
+ }
151053
+ if (transform2.type === "scale") {
151054
+ const { scale: axisOrderedScale } = transform2;
151055
+ if (axisOrderedScale.length !== axes.length) {
151056
+ throw new Error("Length of scale array was expected to match length of axes.");
151057
+ }
151058
+ const defaultValue2 = 1;
151059
+ const xyzScale = xyzIndices.map((axisIndex) => axisIndex >= 0 ? axisOrderedScale[axisIndex] : defaultValue2);
151060
+ const nextMat = new Matrix4().scale(xyzScale);
151061
+ mat = mat.multiplyLeft(nextMat);
151062
+ }
151063
+ });
151064
+ }
151065
+ return mat;
151066
+ }
150694
151067
  class CellsJsonAsObsSegmentationsLoader extends JsonLoader {
150695
151068
  constructor(dataSource, params) {
150696
151069
  super(dataSource, params);
@@ -150981,6 +151354,39 @@ async function initLoader(imageData) {
150981
151354
  const channels2 = Array.isArray(Channels) ? Channels.map((channel, i2) => channel.Name || `Channel ${i2}`) : [Channels.Name || `Channel ${0}`];
150982
151355
  return { ...loader, channels: channels2 };
150983
151356
  }
151357
+ case "ome-zarr": {
151358
+ const { coordinateTransformations: coordinateTransformationsFromOptions } = metadata || {};
151359
+ const loader = await loadOmeZarr(url, { fetchOptions: requestInit2, type: "multiscales" });
151360
+ const { metadata: loaderMetadata } = loader;
151361
+ const { omero, multiscales } = loaderMetadata;
151362
+ if (!Array.isArray(multiscales) || multiscales.length === 0) {
151363
+ console.error("Multiscales array must exist and have at least one element");
151364
+ }
151365
+ const { coordinateTransformations } = multiscales[0];
151366
+ const axes = getNgffAxes(multiscales[0].axes);
151367
+ const transformMatrixFromOptions = coordinateTransformationsToMatrix(
151368
+ coordinateTransformationsFromOptions,
151369
+ axes
151370
+ );
151371
+ const transformMatrixFromFile = coordinateTransformationsToMatrix(
151372
+ coordinateTransformations,
151373
+ axes
151374
+ );
151375
+ const transformMatrix = transformMatrixFromFile.multiplyLeft(transformMatrixFromOptions);
151376
+ const { channels: channels2, name: omeroName } = omero;
151377
+ return {
151378
+ name: omeroName || "Image",
151379
+ channels: channels2.map((c, i2) => c.label || `Channel ${i2}`),
151380
+ ...transformMatrix ? {
151381
+ metadata: {
151382
+ transform: {
151383
+ matrix: transformMatrix
151384
+ }
151385
+ }
151386
+ } : {},
151387
+ ...loader
151388
+ };
151389
+ }
150984
151390
  default: {
150985
151391
  throw Error(`Image type (${type}) is not supported`);
150986
151392
  }
@@ -151002,7 +151408,7 @@ class RasterLoader extends JsonLoader {
151002
151408
  }
151003
151409
  const { data: raster } = payload;
151004
151410
  const { images, renderLayers, usePhysicalSizeScaling = false } = raster;
151005
- const urls = images.filter((image2) => !image2.url.includes("zarr")).map((image2) => [image2.url, image2.name]);
151411
+ const urls = images.filter((image2) => !image2.url.includes("zarr")).map((image2) => ({ url: image2.url, name: image2.name }));
151006
151412
  const imagesWithLoaderCreators = images.map((image2) => ({
151007
151413
  ...image2,
151008
151414
  loaderCreator: async () => initLoader(image2)