@vitessce/spatial-utils 4.2.0 → 4.2.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.
@@ -20879,16 +20879,16 @@ class Stats {
20879
20879
  }
20880
20880
  }
20881
20881
  getTable() {
20882
- const table = {};
20882
+ const table2 = {};
20883
20883
  this.forEach((stat) => {
20884
- table[stat.name] = {
20884
+ table2[stat.name] = {
20885
20885
  time: stat.time || 0,
20886
20886
  count: stat.count || 0,
20887
20887
  average: stat.getAverageTime() || 0,
20888
20888
  hz: stat.getHz() || 0
20889
20889
  };
20890
20890
  });
20891
- return table;
20891
+ return table2;
20892
20892
  }
20893
20893
  _initializeStats() {
20894
20894
  let stats = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
@@ -21546,10 +21546,10 @@ class Log {
21546
21546
  }
21547
21547
  return this._getLogFunction(logLevel, message, originalConsole.debug || originalConsole.info, arguments, ONCE);
21548
21548
  }
21549
- table(logLevel, table, columns) {
21550
- if (table) {
21551
- return this._getLogFunction(logLevel, table, console.table || noop$4, columns && [columns], {
21552
- tag: getTableHeader(table)
21549
+ table(logLevel, table2, columns) {
21550
+ if (table2) {
21551
+ return this._getLogFunction(logLevel, table2, console.table || noop$4, columns && [columns], {
21552
+ tag: getTableHeader(table2)
21553
21553
  });
21554
21554
  }
21555
21555
  return noop$4;
@@ -21749,9 +21749,9 @@ function logImageInBrowser(_ref3) {
21749
21749
  }
21750
21750
  return noop$4;
21751
21751
  }
21752
- function getTableHeader(table) {
21753
- for (const key in table) {
21754
- for (const title in table[key]) {
21752
+ function getTableHeader(table2) {
21753
+ for (const key in table2) {
21754
+ for (const title in table2[key]) {
21755
21755
  return title || "untitled";
21756
21756
  }
21757
21757
  }
@@ -29195,13 +29195,13 @@ function getDebugTableForUniforms(_ref) {
29195
29195
  const SHADER_MODULE_UNIFORM_REGEXP = ".*_.*";
29196
29196
  const PROJECT_MODULE_UNIFORM_REGEXP = ".*Matrix";
29197
29197
  const uniformLocations = program._uniformSetters;
29198
- const table = {};
29198
+ const table2 = {};
29199
29199
  const uniformNames = Object.keys(uniformLocations).sort();
29200
29200
  let count2 = 0;
29201
29201
  for (const uniformName of uniformNames) {
29202
29202
  if (!uniformName.match(SHADER_MODULE_UNIFORM_REGEXP) && !uniformName.match(PROJECT_MODULE_UNIFORM_REGEXP)) {
29203
29203
  if (addUniformToTable({
29204
- table,
29204
+ table: table2,
29205
29205
  header,
29206
29206
  uniforms,
29207
29207
  uniformName,
@@ -29214,7 +29214,7 @@ function getDebugTableForUniforms(_ref) {
29214
29214
  for (const uniformName of uniformNames) {
29215
29215
  if (uniformName.match(PROJECT_MODULE_UNIFORM_REGEXP)) {
29216
29216
  if (addUniformToTable({
29217
- table,
29217
+ table: table2,
29218
29218
  header,
29219
29219
  uniforms,
29220
29220
  uniformName,
@@ -29225,9 +29225,9 @@ function getDebugTableForUniforms(_ref) {
29225
29225
  }
29226
29226
  }
29227
29227
  for (const uniformName of uniformNames) {
29228
- if (!table[uniformName]) {
29228
+ if (!table2[uniformName]) {
29229
29229
  if (addUniformToTable({
29230
- table,
29230
+ table: table2,
29231
29231
  header,
29232
29232
  uniforms,
29233
29233
  uniformName,
@@ -29242,7 +29242,7 @@ function getDebugTableForUniforms(_ref) {
29242
29242
  if (!undefinedOnly) {
29243
29243
  for (const uniformName in uniforms) {
29244
29244
  const uniform = uniforms[uniformName];
29245
- if (!table[uniformName]) {
29245
+ if (!table2[uniformName]) {
29246
29246
  unusedCount++;
29247
29247
  unusedTable[uniformName] = {
29248
29248
  Type: "NOT USED: ".concat(uniform),
@@ -29252,7 +29252,7 @@ function getDebugTableForUniforms(_ref) {
29252
29252
  }
29253
29253
  }
29254
29254
  return {
29255
- table,
29255
+ table: table2,
29256
29256
  count: count2,
29257
29257
  unusedTable,
29258
29258
  unusedCount
@@ -29260,7 +29260,7 @@ function getDebugTableForUniforms(_ref) {
29260
29260
  }
29261
29261
  function addUniformToTable(_ref2) {
29262
29262
  let {
29263
- table,
29263
+ table: table2,
29264
29264
  header,
29265
29265
  uniforms,
29266
29266
  uniformName,
@@ -29269,7 +29269,7 @@ function addUniformToTable(_ref2) {
29269
29269
  const value = uniforms[uniformName];
29270
29270
  const isDefined = isUniformDefined(value);
29271
29271
  if (!undefinedOnly || !isDefined) {
29272
- table[uniformName] = {
29272
+ table2[uniformName] = {
29273
29273
  [header]: isDefined ? formatValue(value) : "N/A",
29274
29274
  "Uniform Type": isDefined ? value : "NOT PROVIDED"
29275
29275
  };
@@ -29288,9 +29288,9 @@ function getDebugTableForVertexArray(_ref) {
29288
29288
  if (!vertexArray.configuration) {
29289
29289
  return {};
29290
29290
  }
29291
- const table = {};
29291
+ const table2 = {};
29292
29292
  if (vertexArray.elements) {
29293
- table.ELEMENT_ARRAY_BUFFER = getDebugTableRow(vertexArray, vertexArray.elements, null, header);
29293
+ table2.ELEMENT_ARRAY_BUFFER = getDebugTableRow(vertexArray, vertexArray.elements, null, header);
29294
29294
  }
29295
29295
  const attributes = vertexArray.values;
29296
29296
  for (const attributeLocation in attributes) {
@@ -29301,10 +29301,10 @@ function getDebugTableForVertexArray(_ref) {
29301
29301
  if (accessor) {
29302
29302
  rowHeader = "".concat(attributeLocation, ": ").concat(getGLSLDeclaration$1(info.name, accessor));
29303
29303
  }
29304
- table[rowHeader] = getDebugTableRow(vertexArray, attributes[attributeLocation], accessor, header);
29304
+ table2[rowHeader] = getDebugTableRow(vertexArray, attributes[attributeLocation], accessor, header);
29305
29305
  }
29306
29306
  }
29307
- return table;
29307
+ return table2;
29308
29308
  }
29309
29309
  function getDebugTableRow(vertexArray, attribute, accessor, header) {
29310
29310
  const {
@@ -29376,12 +29376,12 @@ function getGLSLDeclaration$1(name2, accessor) {
29376
29376
  return typeAndName ? "".concat(name2, " (").concat(typeAndName.name, ")") : name2;
29377
29377
  }
29378
29378
  function getDebugTableForProgramConfiguration(config3) {
29379
- const table = {};
29379
+ const table2 = {};
29380
29380
  const header = "Accessors for ".concat(config3.id);
29381
29381
  for (const attributeInfo of config3.attributeInfos) {
29382
29382
  if (attributeInfo) {
29383
29383
  const glslDeclaration = getGLSLDeclaration(attributeInfo);
29384
- table["in ".concat(glslDeclaration)] = {
29384
+ table2["in ".concat(glslDeclaration)] = {
29385
29385
  [header]: JSON.stringify(attributeInfo.accessor)
29386
29386
  };
29387
29387
  }
@@ -29389,12 +29389,12 @@ function getDebugTableForProgramConfiguration(config3) {
29389
29389
  for (const varyingInfo of config3.varyingInfos) {
29390
29390
  if (varyingInfo) {
29391
29391
  const glslDeclaration = getGLSLDeclaration(varyingInfo);
29392
- table["out ".concat(glslDeclaration)] = {
29392
+ table2["out ".concat(glslDeclaration)] = {
29393
29393
  [header]: JSON.stringify(varyingInfo.accessor)
29394
29394
  };
29395
29395
  }
29396
29396
  }
29397
- return table;
29397
+ return table2;
29398
29398
  }
29399
29399
  function getGLSLDeclaration(attributeInfo) {
29400
29400
  const {
@@ -98463,7 +98463,7 @@ function requireBignumber() {
98463
98463
  suffix: ""
98464
98464
  }, ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyz", alphabetHasNormalDecimalDigits = true;
98465
98465
  function BigNumber3(v, b) {
98466
- var alphabet, c, caseChanged, e2, i2, isNum, len2, str, x = this;
98466
+ var alphabet2, c, caseChanged, e2, i2, isNum, len2, str, x = this;
98467
98467
  if (!(x instanceof BigNumber3)) return new BigNumber3(v, b);
98468
98468
  if (b == null) {
98469
98469
  if (v && v._isBigNumber === true) {
@@ -98519,10 +98519,10 @@ function requireBignumber() {
98519
98519
  } else {
98520
98520
  x.s = str.charCodeAt(0) === 45 ? (str = str.slice(1), -1) : 1;
98521
98521
  }
98522
- alphabet = ALPHABET.slice(0, b);
98522
+ alphabet2 = ALPHABET.slice(0, b);
98523
98523
  e2 = i2 = 0;
98524
98524
  for (len2 = str.length; i2 < len2; i2++) {
98525
- if (alphabet.indexOf(c = str.charAt(i2)) < 0) {
98525
+ if (alphabet2.indexOf(c = str.charAt(i2)) < 0) {
98526
98526
  if (c == ".") {
98527
98527
  if (i2 > e2) {
98528
98528
  e2 = len2;
@@ -98793,11 +98793,11 @@ function requireBignumber() {
98793
98793
  };
98794
98794
  convertBase2 = /* @__PURE__ */ function() {
98795
98795
  var decimal = "0123456789";
98796
- function toBaseOut(str, baseIn, baseOut, alphabet) {
98796
+ function toBaseOut(str, baseIn, baseOut, alphabet2) {
98797
98797
  var j, arr = [0], arrL, i2 = 0, len2 = str.length;
98798
98798
  for (; i2 < len2; ) {
98799
98799
  for (arrL = arr.length; arrL--; arr[arrL] *= baseIn) ;
98800
- arr[0] += alphabet.indexOf(str.charAt(i2++));
98800
+ arr[0] += alphabet2.indexOf(str.charAt(i2++));
98801
98801
  for (j = 0; j < arr.length; j++) {
98802
98802
  if (arr[j] > baseOut - 1) {
98803
98803
  if (arr[j + 1] == null) arr[j + 1] = 0;
@@ -98809,7 +98809,7 @@ function requireBignumber() {
98809
98809
  return arr.reverse();
98810
98810
  }
98811
98811
  return function(str, baseIn, baseOut, sign2, callerIsToString) {
98812
- var alphabet, d, e2, k, r2, x, xc, y, i2 = str.indexOf("."), dp = DECIMAL_PLACES, rm = ROUNDING_MODE;
98812
+ var alphabet2, d, e2, k, r2, x, xc, y, i2 = str.indexOf("."), dp = DECIMAL_PLACES, rm = ROUNDING_MODE;
98813
98813
  if (i2 >= 0) {
98814
98814
  k = POW_PRECISION;
98815
98815
  POW_PRECISION = 0;
@@ -98825,10 +98825,10 @@ function requireBignumber() {
98825
98825
  );
98826
98826
  y.e = y.c.length;
98827
98827
  }
98828
- xc = toBaseOut(str, baseIn, baseOut, callerIsToString ? (alphabet = ALPHABET, decimal) : (alphabet = decimal, ALPHABET));
98828
+ xc = toBaseOut(str, baseIn, baseOut, callerIsToString ? (alphabet2 = ALPHABET, decimal) : (alphabet2 = decimal, ALPHABET));
98829
98829
  e2 = k = xc.length;
98830
98830
  for (; xc[--k] == 0; xc.pop()) ;
98831
- if (!xc[0]) return alphabet.charAt(0);
98831
+ if (!xc[0]) return alphabet2.charAt(0);
98832
98832
  if (i2 < 0) {
98833
98833
  --e2;
98834
98834
  } else {
@@ -98846,7 +98846,7 @@ function requireBignumber() {
98846
98846
  r2 = r2 || d < 0 || xc[d + 1] != null;
98847
98847
  r2 = rm < 4 ? (i2 != null || r2) && (rm == 0 || rm == (x.s < 0 ? 3 : 2)) : i2 > k || i2 == k && (rm == 4 || r2 || rm == 6 && xc[d - 1] & 1 || rm == (x.s < 0 ? 8 : 7));
98848
98848
  if (d < 1 || !xc[0]) {
98849
- str = r2 ? toFixedPoint2(alphabet.charAt(1), -dp, alphabet.charAt(0)) : alphabet.charAt(0);
98849
+ str = r2 ? toFixedPoint2(alphabet2.charAt(1), -dp, alphabet2.charAt(0)) : alphabet2.charAt(0);
98850
98850
  } else {
98851
98851
  xc.length = d;
98852
98852
  if (r2) {
@@ -98859,8 +98859,8 @@ function requireBignumber() {
98859
98859
  }
98860
98860
  }
98861
98861
  for (k = xc.length; !xc[--k]; ) ;
98862
- for (i2 = 0, str = ""; i2 <= k; str += alphabet.charAt(xc[i2++])) ;
98863
- str = toFixedPoint2(str, e2, alphabet.charAt(0));
98862
+ for (i2 = 0, str = ""; i2 <= k; str += alphabet2.charAt(xc[i2++])) ;
98863
+ str = toFixedPoint2(str, e2, alphabet2.charAt(0));
98864
98864
  }
98865
98865
  return str;
98866
98866
  };
@@ -118870,22 +118870,22 @@ function addDecoder(cases, importFn) {
118870
118870
  }
118871
118871
  cases.forEach((c) => registry$2.set(c, importFn));
118872
118872
  }
118873
- addDecoder([void 0, 1], () => import("./raw-D4Pt_p5A.js").then((m) => m.default));
118874
- addDecoder(5, () => import("./lzw-CshJA-Hv.js").then((m) => m.default));
118873
+ addDecoder([void 0, 1], () => import("./raw-9RhgSdLv.js").then((m) => m.default));
118874
+ addDecoder(5, () => import("./lzw-CijfqonR.js").then((m) => m.default));
118875
118875
  addDecoder(6, () => {
118876
118876
  throw new Error("old style JPEG compression is not supported.");
118877
118877
  });
118878
- addDecoder(7, () => import("./jpeg-Cs2ewxT8.js").then((m) => m.default));
118879
- addDecoder([8, 32946], () => import("./deflate-BpLKqVCj.js").then((m) => m.default));
118880
- addDecoder(32773, () => import("./packbits-CeKvH434.js").then((m) => m.default));
118878
+ addDecoder(7, () => import("./jpeg-bIVUcAL0.js").then((m) => m.default));
118879
+ addDecoder([8, 32946], () => import("./deflate-BP4xoM7l.js").then((m) => m.default));
118880
+ addDecoder(32773, () => import("./packbits-CLU5G6vJ.js").then((m) => m.default));
118881
118881
  addDecoder(
118882
118882
  34887,
118883
- () => import("./lerc-Cyiy8X_M.js").then(async (m) => {
118883
+ () => import("./lerc-DbxE0ug1.js").then(async (m) => {
118884
118884
  await m.zstd.init();
118885
118885
  return m;
118886
118886
  }).then((m) => m.default)
118887
118887
  );
118888
- addDecoder(50001, () => import("./webimage-B25p7QDy.js").then((m) => m.default));
118888
+ addDecoder(50001, () => import("./webimage-CuahAqXh.js").then((m) => m.default));
118889
118889
  function decodeRowAcc(row, stride) {
118890
118890
  let length2 = row.length - stride;
118891
118891
  let offset2 = 0;
@@ -123517,15 +123517,15 @@ const adler32 = (adler, buf, len2, pos) => {
123517
123517
  };
123518
123518
  var adler32_1 = adler32;
123519
123519
  const makeTable = () => {
123520
- let c, table = [];
123520
+ let c, table2 = [];
123521
123521
  for (var n3 = 0; n3 < 256; n3++) {
123522
123522
  c = n3;
123523
123523
  for (var k = 0; k < 8; k++) {
123524
123524
  c = c & 1 ? 3988292384 ^ c >>> 1 : c >>> 1;
123525
123525
  }
123526
- table[n3] = c;
123526
+ table2[n3] = c;
123527
123527
  }
123528
- return table;
123528
+ return table2;
123529
123529
  };
123530
123530
  const crcTable = new Uint32Array(makeTable());
123531
123531
  const crc32 = (crc, buf, len2, pos) => {
@@ -125333,7 +125333,7 @@ const dext = new Uint8Array([
125333
125333
  64,
125334
125334
  64
125335
125335
  ]);
125336
- const inflate_table = (type, lens2, lens_index, codes, table, table_index, work, opts) => {
125336
+ const inflate_table = (type, lens2, lens_index, codes, table2, table_index, work, opts) => {
125337
125337
  const bits = opts.bits;
125338
125338
  let len2 = 0;
125339
125339
  let sym = 0;
@@ -125373,8 +125373,8 @@ const inflate_table = (type, lens2, lens_index, codes, table, table_index, work,
125373
125373
  root2 = max2;
125374
125374
  }
125375
125375
  if (max2 === 0) {
125376
- table[table_index++] = 1 << 24 | 64 << 16 | 0;
125377
- table[table_index++] = 1 << 24 | 64 << 16 | 0;
125376
+ table2[table_index++] = 1 << 24 | 64 << 16 | 0;
125377
+ table2[table_index++] = 1 << 24 | 64 << 16 | 0;
125378
125378
  opts.bits = 1;
125379
125379
  return 0;
125380
125380
  }
@@ -125449,7 +125449,7 @@ const inflate_table = (type, lens2, lens_index, codes, table, table_index, work,
125449
125449
  min2 = fill;
125450
125450
  do {
125451
125451
  fill -= incr;
125452
- table[next2 + (huff >> drop) + fill] = here_bits << 24 | here_op << 16 | here_val | 0;
125452
+ table2[next2 + (huff >> drop) + fill] = here_bits << 24 | here_op << 16 | here_val | 0;
125453
125453
  } while (fill !== 0);
125454
125454
  incr = 1 << len2 - 1;
125455
125455
  while (huff & incr) {
@@ -125488,11 +125488,11 @@ const inflate_table = (type, lens2, lens_index, codes, table, table_index, work,
125488
125488
  return 1;
125489
125489
  }
125490
125490
  low = huff & mask;
125491
- table[low] = root2 << 24 | curr << 16 | next2 - table_index | 0;
125491
+ table2[low] = root2 << 24 | curr << 16 | next2 - table_index | 0;
125492
125492
  }
125493
125493
  }
125494
125494
  if (huff !== 0) {
125495
- table[next2 + huff] = len2 - drop << 24 | 64 << 16 | 0;
125495
+ table2[next2 + huff] = len2 - drop << 24 | 64 << 16 | 0;
125496
125496
  }
125497
125497
  opts.bits = root2;
125498
125498
  return 0;
@@ -127879,13 +127879,13 @@ var blosc_codec = function() {
127879
127879
  }();
127880
127880
  var __isNode = typeof process !== "undefined" && process.versions != null && process.versions.node != null;
127881
127881
  var __toBinary = __isNode ? (base64) => new Uint8Array(Buffer.from(base64, "base64")) : /* @__PURE__ */ (() => {
127882
- var table = new Uint8Array(128);
127883
- for (var i2 = 0; i2 < 64; i2++) table[i2 < 26 ? i2 + 65 : i2 < 52 ? i2 + 71 : i2 < 62 ? i2 - 4 : i2 * 4 - 205] = i2;
127882
+ var table2 = new Uint8Array(128);
127883
+ for (var i2 = 0; i2 < 64; i2++) table2[i2 < 26 ? i2 + 65 : i2 < 52 ? i2 + 71 : i2 < 62 ? i2 - 4 : i2 * 4 - 205] = i2;
127884
127884
  return (base64) => {
127885
127885
  var n3 = base64.length, bytes = new Uint8Array((n3 - (base64[n3 - 1] == "=") - (base64[n3 - 2] == "=")) * 3 / 4 | 0);
127886
127886
  for (var i3 = 0, j = 0; i3 < n3; ) {
127887
- var c0 = table[base64.charCodeAt(i3++)], c1 = table[base64.charCodeAt(i3++)];
127888
- var c2 = table[base64.charCodeAt(i3++)], c3 = table[base64.charCodeAt(i3++)];
127887
+ var c0 = table2[base64.charCodeAt(i3++)], c1 = table2[base64.charCodeAt(i3++)];
127888
+ var c2 = table2[base64.charCodeAt(i3++)], c3 = table2[base64.charCodeAt(i3++)];
127889
127889
  bytes[j++] = c0 << 2 | c1 >> 4;
127890
127890
  bytes[j++] = c1 << 4 | c2 >> 2;
127891
127891
  bytes[j++] = c2 << 6 | c3;
@@ -133172,7 +133172,7 @@ function clone$1(configObject) {
133172
133172
  suffix: ""
133173
133173
  }, ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyz", alphabetHasNormalDecimalDigits = true;
133174
133174
  function BigNumber2(v, b) {
133175
- var alphabet, c, caseChanged, e2, i2, isNum, len2, str, x = this;
133175
+ var alphabet2, c, caseChanged, e2, i2, isNum, len2, str, x = this;
133176
133176
  if (!(x instanceof BigNumber2)) return new BigNumber2(v, b);
133177
133177
  if (b == null) {
133178
133178
  if (v && v._isBigNumber === true) {
@@ -133228,10 +133228,10 @@ function clone$1(configObject) {
133228
133228
  } else {
133229
133229
  x.s = str.charCodeAt(0) === 45 ? (str = str.slice(1), -1) : 1;
133230
133230
  }
133231
- alphabet = ALPHABET.slice(0, b);
133231
+ alphabet2 = ALPHABET.slice(0, b);
133232
133232
  e2 = i2 = 0;
133233
133233
  for (len2 = str.length; i2 < len2; i2++) {
133234
- if (alphabet.indexOf(c = str.charAt(i2)) < 0) {
133234
+ if (alphabet2.indexOf(c = str.charAt(i2)) < 0) {
133235
133235
  if (c == ".") {
133236
133236
  if (i2 > e2) {
133237
133237
  e2 = len2;
@@ -133502,11 +133502,11 @@ function clone$1(configObject) {
133502
133502
  };
133503
133503
  convertBase2 = /* @__PURE__ */ function() {
133504
133504
  var decimal = "0123456789";
133505
- function toBaseOut(str, baseIn, baseOut, alphabet) {
133505
+ function toBaseOut(str, baseIn, baseOut, alphabet2) {
133506
133506
  var j, arr = [0], arrL, i2 = 0, len2 = str.length;
133507
133507
  for (; i2 < len2; ) {
133508
133508
  for (arrL = arr.length; arrL--; arr[arrL] *= baseIn) ;
133509
- arr[0] += alphabet.indexOf(str.charAt(i2++));
133509
+ arr[0] += alphabet2.indexOf(str.charAt(i2++));
133510
133510
  for (j = 0; j < arr.length; j++) {
133511
133511
  if (arr[j] > baseOut - 1) {
133512
133512
  if (arr[j + 1] == null) arr[j + 1] = 0;
@@ -133518,7 +133518,7 @@ function clone$1(configObject) {
133518
133518
  return arr.reverse();
133519
133519
  }
133520
133520
  return function(str, baseIn, baseOut, sign2, callerIsToString) {
133521
- var alphabet, d, e2, k, r2, x, xc, y, i2 = str.indexOf("."), dp = DECIMAL_PLACES, rm = ROUNDING_MODE;
133521
+ var alphabet2, d, e2, k, r2, x, xc, y, i2 = str.indexOf("."), dp = DECIMAL_PLACES, rm = ROUNDING_MODE;
133522
133522
  if (i2 >= 0) {
133523
133523
  k = POW_PRECISION;
133524
133524
  POW_PRECISION = 0;
@@ -133534,10 +133534,10 @@ function clone$1(configObject) {
133534
133534
  );
133535
133535
  y.e = y.c.length;
133536
133536
  }
133537
- xc = toBaseOut(str, baseIn, baseOut, callerIsToString ? (alphabet = ALPHABET, decimal) : (alphabet = decimal, ALPHABET));
133537
+ xc = toBaseOut(str, baseIn, baseOut, callerIsToString ? (alphabet2 = ALPHABET, decimal) : (alphabet2 = decimal, ALPHABET));
133538
133538
  e2 = k = xc.length;
133539
133539
  for (; xc[--k] == 0; xc.pop()) ;
133540
- if (!xc[0]) return alphabet.charAt(0);
133540
+ if (!xc[0]) return alphabet2.charAt(0);
133541
133541
  if (i2 < 0) {
133542
133542
  --e2;
133543
133543
  } else {
@@ -133555,7 +133555,7 @@ function clone$1(configObject) {
133555
133555
  r2 = r2 || d < 0 || xc[d + 1] != null;
133556
133556
  r2 = rm < 4 ? (i2 != null || r2) && (rm == 0 || rm == (x.s < 0 ? 3 : 2)) : i2 > k || i2 == k && (rm == 4 || r2 || rm == 6 && xc[d - 1] & 1 || rm == (x.s < 0 ? 8 : 7));
133557
133557
  if (d < 1 || !xc[0]) {
133558
- str = r2 ? toFixedPoint(alphabet.charAt(1), -dp, alphabet.charAt(0)) : alphabet.charAt(0);
133558
+ str = r2 ? toFixedPoint(alphabet2.charAt(1), -dp, alphabet2.charAt(0)) : alphabet2.charAt(0);
133559
133559
  } else {
133560
133560
  xc.length = d;
133561
133561
  if (r2) {
@@ -133568,8 +133568,8 @@ function clone$1(configObject) {
133568
133568
  }
133569
133569
  }
133570
133570
  for (k = xc.length; !xc[--k]; ) ;
133571
- for (i2 = 0, str = ""; i2 <= k; str += alphabet.charAt(xc[i2++])) ;
133572
- str = toFixedPoint(str, e2, alphabet.charAt(0));
133571
+ for (i2 = 0, str = ""; i2 <= k; str += alphabet2.charAt(xc[i2++])) ;
133572
+ str = toFixedPoint(str, e2, alphabet2.charAt(0));
133573
133573
  }
133574
133574
  return str;
133575
133575
  };
@@ -143377,13 +143377,13 @@ const parseAddition = (str) => {
143377
143377
  if (!Number.isNaN(+str)) {
143378
143378
  return +str;
143379
143379
  }
143380
- const numbers = str.match(/\d*\.?\d+/g);
143381
- if (!numbers) {
143380
+ const numbers2 = str.match(/\d*\.?\d+/g);
143381
+ if (!numbers2) {
143382
143382
  return 0;
143383
143383
  }
143384
143384
  let sum2 = 0;
143385
- for (let i2 = 0; i2 < numbers.length; i2 += 1) {
143386
- sum2 += +numbers[i2];
143385
+ for (let i2 = 0; i2 < numbers2.length; i2 += 1) {
143386
+ sum2 += +numbers2[i2];
143387
143387
  }
143388
143388
  return sum2;
143389
143389
  };
@@ -147558,6 +147558,13 @@ function normalizeCoordinateTransformations(coordinateTransformations, datasets)
147558
147558
  }
147559
147559
  return result;
147560
147560
  }
147561
+ function getDatasetScale(dataset) {
147562
+ const scales = normalizeCoordinateTransformations(dataset?.coordinateTransformations, null).filter((transform2) => transform2?.type === "scale" && Array.isArray(transform2.scale)).map((transform2) => transform2.scale);
147563
+ if (scales.length === 0) {
147564
+ return void 0;
147565
+ }
147566
+ return scales.reduce((product2, scale2) => product2.map((factor, axis) => factor * scale2[axis]));
147567
+ }
147561
147568
  function coordinateTransformationsToMatrixForSpatialData(ngffMetadata, targetCoordinateSystem) {
147562
147569
  const {
147563
147570
  datasets,
@@ -149750,6 +149757,354 @@ function createZarrArrayAdapter(arr) {
149750
149757
  }
149751
149758
  });
149752
149759
  }
149760
+ const alphabet = "abcdefghijklmnopqrstuvwxyz";
149761
+ const numbers = "01234569789";
149762
+ const expr = "()*/+-";
149763
+ const space = " ";
149764
+ new Set(
149765
+ alphabet + alphabet.toUpperCase() + numbers + expr + space
149766
+ );
149767
+ (() => {
149768
+ var table2 = new Uint8Array(128);
149769
+ for (var i2 = 0; i2 < 64; i2++) {
149770
+ table2[i2 < 26 ? i2 + 65 : i2 < 52 ? i2 + 71 : i2 < 62 ? i2 - 4 : i2 * 4 - 205] = i2;
149771
+ }
149772
+ return (base64) => {
149773
+ var n3 = base64.length;
149774
+ var bytes = new Uint8Array(
149775
+ // @ts-expect-error
149776
+ (n3 - (base64[n3 - 1] == "=") - (base64[n3 - 2] == "=")) * 3 / 4 | 0
149777
+ );
149778
+ for (var i22 = 0, j = 0; i22 < n3; ) {
149779
+ var c0 = table2[base64.charCodeAt(i22++)], c1 = table2[base64.charCodeAt(i22++)];
149780
+ var c2 = table2[base64.charCodeAt(i22++)], c3 = table2[base64.charCodeAt(i22++)];
149781
+ bytes[j++] = c0 << 2 | c1 >> 4;
149782
+ bytes[j++] = c1 << 4 | c2 >> 2;
149783
+ bytes[j++] = c2 << 6 | c3;
149784
+ }
149785
+ return bytes;
149786
+ };
149787
+ })();
149788
+ new TextEncoder();
149789
+ function _structure_size(structure) {
149790
+ const fmt = "<" + Array.from(structure.values()).join("");
149791
+ return struct.calcsize(fmt);
149792
+ }
149793
+ function isBigEndian() {
149794
+ const array = new Uint8Array(4);
149795
+ const view = new Uint32Array(array.buffer);
149796
+ return !((view[0] = 1) & array[0]);
149797
+ }
149798
+ function decodeFloat16(low, high) {
149799
+ const sign2 = (high & 128) >> 7;
149800
+ const exponent = (high & 124) >> 2;
149801
+ const fraction2 = ((high & 3) << 8) + low;
149802
+ let magnitude;
149803
+ if (exponent === 31) {
149804
+ magnitude = fraction2 === 0 ? Infinity : NaN;
149805
+ } else if (exponent === 0) {
149806
+ magnitude = 2 ** -14 * (fraction2 / 1024);
149807
+ } else {
149808
+ magnitude = 2 ** (exponent - 15) * (1 + fraction2 / 1024);
149809
+ }
149810
+ return sign2 ? -magnitude : magnitude;
149811
+ }
149812
+ class DataView64 extends DataView {
149813
+ getFloat16(byteOffset, littleEndian) {
149814
+ const bytes = [this.getUint8(byteOffset), this.getUint8(byteOffset + 1)];
149815
+ if (!littleEndian)
149816
+ bytes.reverse();
149817
+ return decodeFloat16(bytes[0], bytes[1]);
149818
+ }
149819
+ getUint64(byteOffset, littleEndian) {
149820
+ const left = BigInt(this.getUint32(byteOffset, littleEndian));
149821
+ const right = BigInt(this.getUint32(byteOffset + 4, littleEndian));
149822
+ const combined = littleEndian ? left + (right << 32n) : (left << 32n) + right;
149823
+ return Number(combined);
149824
+ }
149825
+ getInt64(byteOffset, littleEndian) {
149826
+ let low, high;
149827
+ if (littleEndian) {
149828
+ low = this.getUint32(byteOffset, true);
149829
+ high = this.getInt32(byteOffset + 4, true);
149830
+ } else {
149831
+ high = this.getInt32(byteOffset, false);
149832
+ low = this.getUint32(byteOffset + 4, false);
149833
+ }
149834
+ const combined = BigInt(low) + (BigInt(high) << 32n);
149835
+ return Number(combined);
149836
+ }
149837
+ getString(byteOffset, _littleEndian, length2) {
149838
+ const str_buffer = this.buffer.slice(byteOffset, byteOffset + length2);
149839
+ return new TextDecoder().decode(str_buffer);
149840
+ }
149841
+ getVLENStruct(byteOffset, littleEndian, _length) {
149842
+ const item_size = this.getUint32(byteOffset, littleEndian);
149843
+ const collection_address = this.getUint64(byteOffset + 4, littleEndian);
149844
+ const object_index = this.getUint32(byteOffset + 12, littleEndian);
149845
+ return [item_size, collection_address, object_index];
149846
+ }
149847
+ }
149848
+ class Struct {
149849
+ big_endian;
149850
+ getters;
149851
+ byte_lengths;
149852
+ fmt_size_regex;
149853
+ constructor() {
149854
+ this.big_endian = isBigEndian();
149855
+ this.getters = {
149856
+ s: "getUint8",
149857
+ b: "getInt8",
149858
+ B: "getUint8",
149859
+ h: "getInt16",
149860
+ H: "getUint16",
149861
+ i: "getInt32",
149862
+ I: "getUint32",
149863
+ l: "getInt32",
149864
+ L: "getUint32",
149865
+ q: "getInt64",
149866
+ Q: "getUint64",
149867
+ e: "getFloat16",
149868
+ f: "getFloat32",
149869
+ d: "getFloat64"
149870
+ };
149871
+ this.byte_lengths = {
149872
+ s: 1,
149873
+ b: 1,
149874
+ B: 1,
149875
+ h: 2,
149876
+ H: 2,
149877
+ i: 4,
149878
+ I: 4,
149879
+ l: 4,
149880
+ L: 4,
149881
+ q: 8,
149882
+ Q: 8,
149883
+ e: 2,
149884
+ f: 4,
149885
+ d: 8
149886
+ };
149887
+ const all_formats = Object.keys(this.byte_lengths).join("");
149888
+ this.fmt_size_regex = "(\\d*)([" + all_formats + "])";
149889
+ }
149890
+ calcsize(fmt) {
149891
+ let size2 = 0;
149892
+ const regex = new RegExp(this.fmt_size_regex, "g");
149893
+ let match2;
149894
+ while ((match2 = regex.exec(fmt)) !== null) {
149895
+ const n3 = parseInt(match2[1] || "1", 10);
149896
+ const f2 = match2[2];
149897
+ size2 += n3 * this.byte_lengths[f2];
149898
+ }
149899
+ return size2;
149900
+ }
149901
+ _is_big_endian(fmt) {
149902
+ if (/^</.test(fmt))
149903
+ return false;
149904
+ if (/^(!|>)/.test(fmt))
149905
+ return true;
149906
+ return this.big_endian;
149907
+ }
149908
+ unpack_from(fmt, buffer, offset2) {
149909
+ offset2 = Number(offset2 || 0);
149910
+ const view = new DataView64(buffer, 0);
149911
+ const output = [];
149912
+ const big_endian = this._is_big_endian(fmt);
149913
+ const regex = new RegExp(this.fmt_size_regex, "g");
149914
+ let match2;
149915
+ while ((match2 = regex.exec(fmt)) !== null) {
149916
+ const n3 = parseInt(match2[1] || "1", 10);
149917
+ const f2 = match2[2];
149918
+ const getter = this.getters[f2];
149919
+ const size2 = this.byte_lengths[f2];
149920
+ if (f2 === "s") {
149921
+ output.push(new TextDecoder().decode(buffer.slice(offset2, offset2 + n3)));
149922
+ offset2 += n3;
149923
+ } else {
149924
+ for (let i2 = 0; i2 < n3; i2++) {
149925
+ output.push(view[getter](offset2, !big_endian));
149926
+ offset2 += size2;
149927
+ }
149928
+ }
149929
+ }
149930
+ return output;
149931
+ }
149932
+ }
149933
+ const struct = new Struct();
149934
+ const DATATYPE_MSG = /* @__PURE__ */ new Map([
149935
+ ["class_and_version", "B"],
149936
+ ["class_bit_field_0", "B"],
149937
+ ["class_bit_field_1", "B"],
149938
+ ["class_bit_field_2", "B"],
149939
+ ["size", "I"]
149940
+ ]);
149941
+ _structure_size(DATATYPE_MSG);
149942
+ const B_LINK_NODE_V1 = /* @__PURE__ */ new Map([
149943
+ ["signature", "4s"],
149944
+ ["node_type", "B"],
149945
+ ["node_level", "B"],
149946
+ ["entries_used", "H"],
149947
+ ["left_sibling", "Q"],
149948
+ ["right_sibling", "Q"]
149949
+ ]);
149950
+ _structure_size(B_LINK_NODE_V1);
149951
+ const B_LINK_NODE_V2 = /* @__PURE__ */ new Map([
149952
+ ["signature", "4s"],
149953
+ ["version", "B"],
149954
+ ["node_type", "B"]
149955
+ ]);
149956
+ _structure_size(B_LINK_NODE_V2);
149957
+ struct.unpack_from("8s", new Uint8Array([137, 72, 68, 70, 13, 10, 26, 10]).buffer)[0];
149958
+ struct.unpack_from("<Q", new Uint8Array([255, 255, 255, 255, 255, 255, 255, 255]).buffer)[0];
149959
+ const SUPERBLOCK_V0 = /* @__PURE__ */ new Map([
149960
+ ["format_signature", "8s"],
149961
+ ["superblock_version", "B"],
149962
+ ["free_storage_version", "B"],
149963
+ ["root_group_version", "B"],
149964
+ ["reserved_0", "B"],
149965
+ ["shared_header_version", "B"],
149966
+ ["offset_size", "B"],
149967
+ ["length_size", "B"],
149968
+ ["reserved_1", "B"],
149969
+ ["group_leaf_node_k", "H"],
149970
+ ["group_internal_node_k", "H"],
149971
+ ["file_consistency_flags", "L"],
149972
+ ["base_address_lower", "Q"],
149973
+ ["free_space_address", "Q"],
149974
+ ["end_of_file_address", "Q"],
149975
+ ["driver_information_address", "Q"]
149976
+ ]);
149977
+ _structure_size(SUPERBLOCK_V0);
149978
+ const SUPERBLOCK_V2_V3 = /* @__PURE__ */ new Map([
149979
+ ["format_signature", "8s"],
149980
+ ["superblock_version", "B"],
149981
+ ["offset_size", "B"],
149982
+ ["length_size", "B"],
149983
+ ["file_consistency_flags", "B"],
149984
+ ["base_address", "Q"],
149985
+ ["superblock_extension_address", "Q"],
149986
+ ["end_of_file_address", "Q"],
149987
+ ["root_group_address", "Q"],
149988
+ ["superblock_checksum", "I"]
149989
+ ]);
149990
+ _structure_size(SUPERBLOCK_V2_V3);
149991
+ const SYMBOL_TABLE_ENTRY = /* @__PURE__ */ new Map([
149992
+ ["link_name_offset", "Q"],
149993
+ ["object_header_address", "Q"],
149994
+ ["cache_type", "I"],
149995
+ ["reserved", "I"],
149996
+ ["scratch", "16s"]
149997
+ ]);
149998
+ _structure_size(SYMBOL_TABLE_ENTRY);
149999
+ const SYMBOL_TABLE_NODE = /* @__PURE__ */ new Map([
150000
+ ["signature", "4s"],
150001
+ ["version", "B"],
150002
+ ["reserved_0", "B"],
150003
+ ["symbols", "H"]
150004
+ ]);
150005
+ _structure_size(SYMBOL_TABLE_NODE);
150006
+ const GLOBAL_HEAP_HEADER = /* @__PURE__ */ new Map([
150007
+ ["signature", "4s"],
150008
+ ["version", "B"],
150009
+ ["reserved", "3s"],
150010
+ ["collection_size", "Q"]
150011
+ ]);
150012
+ _structure_size(GLOBAL_HEAP_HEADER);
150013
+ const GLOBAL_HEAP_OBJECT = /* @__PURE__ */ new Map([
150014
+ ["object_index", "H"],
150015
+ ["reference_count", "H"],
150016
+ ["reserved", "I"],
150017
+ ["object_size", "Q"]
150018
+ ]);
150019
+ _structure_size(GLOBAL_HEAP_OBJECT);
150020
+ const OBJECT_HEADER_V1 = /* @__PURE__ */ new Map([
150021
+ ["version", "B"],
150022
+ ["reserved", "B"],
150023
+ ["total_header_messages", "H"],
150024
+ ["object_reference_count", "I"],
150025
+ ["object_header_size", "I"],
150026
+ ["padding", "I"]
150027
+ ]);
150028
+ _structure_size(OBJECT_HEADER_V1);
150029
+ const OBJECT_HEADER_V2 = /* @__PURE__ */ new Map([
150030
+ ["signature", "4s"],
150031
+ ["version", "B"],
150032
+ ["flags", "B"]
150033
+ ]);
150034
+ _structure_size(OBJECT_HEADER_V2);
150035
+ const HEADER_MSG_INFO_V1 = /* @__PURE__ */ new Map([
150036
+ ["type", "H"],
150037
+ ["size", "H"],
150038
+ ["flags", "B"],
150039
+ ["reserved", "3s"]
150040
+ ]);
150041
+ _structure_size(HEADER_MSG_INFO_V1);
150042
+ const HEADER_MSG_INFO_V2 = /* @__PURE__ */ new Map([
150043
+ ["type", "B"],
150044
+ ["size", "H"],
150045
+ ["flags", "B"]
150046
+ ]);
150047
+ _structure_size(HEADER_MSG_INFO_V2);
150048
+ const ATTR_MSG_HEADER_V1 = /* @__PURE__ */ new Map([
150049
+ ["version", "B"],
150050
+ ["reserved", "B"],
150051
+ ["name_size", "H"],
150052
+ ["datatype_size", "H"],
150053
+ ["dataspace_size", "H"]
150054
+ ]);
150055
+ _structure_size(ATTR_MSG_HEADER_V1);
150056
+ const ATTR_MSG_HEADER_V3 = /* @__PURE__ */ new Map([
150057
+ ["version", "B"],
150058
+ ["flags", "B"],
150059
+ ["name_size", "H"],
150060
+ ["datatype_size", "H"],
150061
+ ["dataspace_size", "H"],
150062
+ ["character_set_encoding", "B"]
150063
+ ]);
150064
+ _structure_size(ATTR_MSG_HEADER_V3);
150065
+ const DATASPACE_MSG_HEADER_V1 = /* @__PURE__ */ new Map([
150066
+ ["version", "B"],
150067
+ ["dimensionality", "B"],
150068
+ ["flags", "B"],
150069
+ ["reserved_0", "B"],
150070
+ ["reserved_1", "I"]
150071
+ ]);
150072
+ _structure_size(DATASPACE_MSG_HEADER_V1);
150073
+ const DATASPACE_MSG_HEADER_V2 = /* @__PURE__ */ new Map([
150074
+ ["version", "B"],
150075
+ ["dimensionality", "B"],
150076
+ ["flags", "B"],
150077
+ ["type", "B"]
150078
+ ]);
150079
+ _structure_size(DATASPACE_MSG_HEADER_V2);
150080
+ const FILLVAL_MSG_V1V2 = /* @__PURE__ */ new Map([
150081
+ ["version", "B"],
150082
+ ["space_allocation_time", "B"],
150083
+ ["fillvalue_write_time", "B"],
150084
+ ["fillvalue_defined", "B"]
150085
+ ]);
150086
+ _structure_size(FILLVAL_MSG_V1V2);
150087
+ const FILLVAL_MSG_V3 = /* @__PURE__ */ new Map([
150088
+ ["version", "B"],
150089
+ ["flags", "B"]
150090
+ ]);
150091
+ _structure_size(FILLVAL_MSG_V3);
150092
+ const FILTER_PIPELINE_DESCR_V1 = /* @__PURE__ */ new Map([
150093
+ ["filter_id", "H"],
150094
+ ["name_length", "H"],
150095
+ ["flags", "H"],
150096
+ ["client_data_values", "H"]
150097
+ ]);
150098
+ _structure_size(FILTER_PIPELINE_DESCR_V1);
150099
+ const GLOBAL_HEAP_ID = /* @__PURE__ */ new Map([
150100
+ ["collection_address", "Q"],
150101
+ ["object_index", "I"]
150102
+ ]);
150103
+ _structure_size(GLOBAL_HEAP_ID);
150104
+ let table = new Uint8Array(128);
150105
+ for (let i2 = 0; i2 < 64; i2++) {
150106
+ table[i2 < 26 ? i2 + 65 : i2 < 52 ? i2 + 71 : i2 < 62 ? i2 - 4 : i2 * 4 - 205] = i2;
150107
+ }
149753
150108
  function flattenOmeAttrs(rootAttrs) {
149754
150109
  if (rootAttrs && typeof rootAttrs.ome === "object" && rootAttrs.ome !== null) {
149755
150110
  return { ...rootAttrs.ome, ...rootAttrs };
@@ -149790,6 +150145,21 @@ function guessTileSize(arr) {
149790
150145
  function isAxis(axisOrLabel) {
149791
150146
  return typeof axisOrLabel[0] !== "string";
149792
150147
  }
150148
+ function lowercaseAxisNames(rootAttrs) {
150149
+ if (!Array.isArray(rootAttrs?.multiscales)) return rootAttrs;
150150
+ const multiscales = rootAttrs.multiscales.map((multiscale) => {
150151
+ const { axes } = multiscale;
150152
+ if (!Array.isArray(axes)) return multiscale;
150153
+ const names = axes.map((axis) => typeof axis === "string" ? axis : axis.name);
150154
+ const lowerNames = names.map((name2) => typeof name2 === "string" ? name2.toLowerCase() : name2);
150155
+ if (new Set(lowerNames).size !== new Set(names).size) return multiscale;
150156
+ return {
150157
+ ...multiscale,
150158
+ axes: axes.map((axis, i2) => typeof axis === "string" ? lowerNames[i2] : { ...axis, name: lowerNames[i2] })
150159
+ };
150160
+ });
150161
+ return { ...rootAttrs, multiscales };
150162
+ }
149793
150163
  async function loadMultiscales(root2) {
149794
150164
  let rootAttrs;
149795
150165
  try {
@@ -149800,7 +150170,7 @@ async function loadMultiscales(root2) {
149800
150170
  }
149801
150171
  throw e2;
149802
150172
  }
149803
- rootAttrs = flattenOmeAttrs(rootAttrs);
150173
+ rootAttrs = lowercaseAxisNames(flattenOmeAttrs(rootAttrs));
149804
150174
  let paths = ["0"];
149805
150175
  let labels = ["t", "c", "z", "y", "x"];
149806
150176
  if ("multiscales" in rootAttrs) {
@@ -149855,14 +150225,15 @@ function getDomains() {
149855
150225
  }
149856
150226
  const DOMAINS = getDomains();
149857
150227
  export {
149858
- getPhysicalSizeScalingMatrix as A,
150228
+ getMultiSelectionStats as A,
149859
150229
  BaseDecoder as B,
149860
- getBoundingCube as C,
150230
+ getPhysicalSizeScalingMatrix as C,
149861
150231
  DEFAULT_CELLS_LAYER as D,
149862
- abbreviateNumber as E,
149863
- filterSelection as F,
150232
+ getBoundingCube as E,
150233
+ abbreviateNumber as F,
149864
150234
  GLOBAL_LABELS as G,
149865
- DOMAINS as H,
150235
+ filterSelection as H,
150236
+ DOMAINS as I,
149866
150237
  ZarritaPixelSource as Z,
149867
150238
  DEFAULT_MOLECULES_LAYER as a,
149868
150239
  DEFAULT_NEIGHBORHOODS_LAYER as b,
@@ -149884,10 +150255,10 @@ export {
149884
150255
  getStatsForResolution as r,
149885
150256
  canLoadResolution as s,
149886
150257
  normalizeCoordinateTransformations as t,
149887
- normalizeAxes as u,
149888
- loadOmeZarr as v,
149889
- guessTileSize as w,
149890
- toRgbUIString as x,
149891
- getSingleSelectionStats as y,
149892
- getMultiSelectionStats as z
150258
+ getDatasetScale as u,
150259
+ normalizeAxes as v,
150260
+ loadOmeZarr as w,
150261
+ guessTileSize as x,
150262
+ toRgbUIString as y,
150263
+ getSingleSelectionStats as z
149893
150264
  };