@vitessce/json 3.6.14 → 3.6.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-SxljTded.js";
2
- import { B as BaseDecoder } from "./index-C7YXFoIv.js";
2
+ import { B as BaseDecoder } from "./index-ClFtTupj.js";
3
3
  class DeflateDecoder extends BaseDecoder {
4
4
  decodeBlock(buffer) {
5
5
  return inflate_1(new Uint8Array(buffer)).buffer;
@@ -9,7 +9,7 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
9
9
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
10
10
  var __privateSet = (obj, member, value, setter2) => (__accessCheck(obj, member, "write to private field"), setter2 ? setter2.call(obj, value) : member.set(obj, value), value);
11
11
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
12
- var _a2, _b, _bytes, _encoder, _data, _stride, _TypedArray, _BYTES_PER_ELEMENT, _shape, _endian, _encoder_config, _decoder_config, _order, _inverseOrder, _shape2, _strides, _metadata, _metadata2, _c, _overrides, _use_suffix_request, _FetchStore_instances, merge_init_fn;
12
+ var _a2, _b, _overrides, _use_suffix_request, _FetchStore_instances, merge_init_fn, _bytes, _encoder, _data, _stride, _TypedArray, _BYTES_PER_ELEMENT, _shape, _endian, _encoder_config, _decoder_config, _order, _inverseOrder, _shape2, _strides, _metadata, _metadata2, _c;
13
13
  import "react";
14
14
  function _mergeNamespaces(n3, m) {
15
15
  for (var i2 = 0; i2 < m.length; i2++) {
@@ -137113,22 +137113,22 @@ async function getDecoder(fileDirectory) {
137113
137113
  const Decoder = await importFn();
137114
137114
  return new Decoder(fileDirectory);
137115
137115
  }
137116
- addDecoder([void 0, 1], () => import("./raw-BT28vB2m.js").then((m) => m.default));
137117
- addDecoder(5, () => import("./lzw-D5xWNXHf.js").then((m) => m.default));
137116
+ addDecoder([void 0, 1], () => import("./raw-DTPVJ1o9.js").then((m) => m.default));
137117
+ addDecoder(5, () => import("./lzw-CiXrXL8r.js").then((m) => m.default));
137118
137118
  addDecoder(6, () => {
137119
137119
  throw new Error("old style JPEG compression is not supported.");
137120
137120
  });
137121
- addDecoder(7, () => import("./jpeg-BQGtNkBb.js").then((m) => m.default));
137122
- addDecoder([8, 32946], () => import("./deflate-RA5GBsWY.js").then((m) => m.default));
137123
- addDecoder(32773, () => import("./packbits-C7fkYHsO.js").then((m) => m.default));
137121
+ addDecoder(7, () => import("./jpeg-uLYxf0zU.js").then((m) => m.default));
137122
+ addDecoder([8, 32946], () => import("./deflate-Dwj2TkFo.js").then((m) => m.default));
137123
+ addDecoder(32773, () => import("./packbits-jRtcxRzM.js").then((m) => m.default));
137124
137124
  addDecoder(
137125
137125
  34887,
137126
- () => import("./lerc-FyRDMldG.js").then(async (m) => {
137126
+ () => import("./lerc-DgruiVGI.js").then(async (m) => {
137127
137127
  await m.zstd.init();
137128
137128
  return m;
137129
137129
  }).then((m) => m.default)
137130
137130
  );
137131
- addDecoder(50001, () => import("./webimage-A55WzWd4.js").then((m) => m.default));
137131
+ addDecoder(50001, () => import("./webimage-CXJ7hRD-.js").then((m) => m.default));
137132
137132
  function copyNewSize(array, width, height, samplesPerPixel = 1) {
137133
137133
  return new (Object.getPrototypeOf(array)).constructor(width * height * samplesPerPixel);
137134
137134
  }
@@ -150375,10 +150375,10 @@ function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColo
150375
150375
  channelIsSetColorMode.forEach((isSetColorMode, channelIndex) => {
150376
150376
  var _a3, _b2, _c2, _d;
150377
150377
  if (isSetColorMode) {
150378
- totalColorsLength += (((_b2 = (_a3 = setColorValues[channelIndex]) == null ? void 0 : _a3.setColors) == null ? void 0 : _b2.length) || 0) * 3;
150378
+ totalColorsLength += (((_b2 = (_a3 = setColorValues[channelIndex]) == null ? void 0 : _a3.setColors) == null ? void 0 : _b2.length) ?? 0) * 3;
150379
150379
  totalValuesLength += ((_c2 = setColorValues[channelIndex]) == null ? void 0 : _c2.obsIndex) ? max$1(setColorValues[channelIndex].obsIndex.map((d) => parseInt(d))) : 0;
150380
150380
  } else {
150381
- totalValuesLength += multiMatrixObsIndex[channelIndex] ? max$1(multiMatrixObsIndex[channelIndex].map((d) => parseInt(d))) : ((_d = multiFeatureValues[channelIndex]) == null ? void 0 : _d.length) || 0;
150381
+ totalValuesLength += multiMatrixObsIndex[channelIndex] ? max$1(multiMatrixObsIndex[channelIndex].map((d) => parseInt(d))) : ((_d = multiFeatureValues[channelIndex]) == null ? void 0 : _d.length) ?? 0;
150382
150382
  }
150383
150383
  });
150384
150384
  const valueTexHeight = Math.max(2, Math.ceil(totalValuesLength / texSize));
@@ -150399,7 +150399,7 @@ function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColo
150399
150399
  const matrixObsIndex = multiMatrixObsIndex[channelIndex];
150400
150400
  const bitmaskValueIsIndex = matrixObsIndex === null;
150401
150401
  if (isSetColorMode) {
150402
- const { setColorIndices, setColors, obsIndex } = setColorValues[channelIndex] || {};
150402
+ const { setColorIndices, setColors, obsIndex } = setColorValues[channelIndex] ?? {};
150403
150403
  if (setColorIndices && setColors && obsIndex) {
150404
150404
  for (let i2 = 0; i2 < obsIndex.length; i2++) {
150405
150405
  let obsId = String(i2 + 1);
@@ -150423,7 +150423,7 @@ function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColo
150423
150423
  indexOffset += (obsIndex == null ? void 0 : obsIndex.length) || 0;
150424
150424
  colorOffset += (setColors == null ? void 0 : setColors.length) || 0;
150425
150425
  } else {
150426
- const featureArr = multiFeatureValues[channelIndex];
150426
+ const featureArr = multiFeatureValues[channelIndex] ?? [];
150427
150427
  const normalizedFeatureArr = normalize(featureArr);
150428
150428
  if (!bitmaskValueIsIndex && matrixObsIndex) {
150429
150429
  for (let i2 = 0; i2 < matrixObsIndex.length; i2++) {
@@ -154201,18 +154201,93 @@ function coordinateTransformationsToMatrix(coordinateTransformations, axes) {
154201
154201
  }
154202
154202
  return mat;
154203
154203
  }
154204
- class NodeNotFoundError extends Error {
154205
- constructor(context, options = {}) {
154206
- super(`Node not found: ${context}`, options);
154207
- this.name = "NodeNotFoundError";
154204
+ function fetch_range(url, offset, length2, opts = {}) {
154205
+ if (offset !== void 0 && length2 !== void 0) {
154206
+ opts = {
154207
+ ...opts,
154208
+ headers: {
154209
+ ...opts.headers,
154210
+ Range: `bytes=${offset}-${offset + length2 - 1}`
154211
+ }
154212
+ };
154208
154213
  }
154214
+ return fetch(url, opts);
154209
154215
  }
154210
- class KeyError extends Error {
154211
- constructor(path) {
154212
- super(`Missing key: ${path}`);
154213
- this.name = "KeyError";
154216
+ function merge_init(storeOverrides, requestOverrides) {
154217
+ return {
154218
+ ...storeOverrides,
154219
+ ...requestOverrides,
154220
+ headers: {
154221
+ ...storeOverrides.headers,
154222
+ ...requestOverrides.headers
154223
+ }
154224
+ };
154225
+ }
154226
+ function resolve(root2, path) {
154227
+ const base = typeof root2 === "string" ? new URL(root2) : root2;
154228
+ if (!base.pathname.endsWith("/")) {
154229
+ base.pathname += "/";
154230
+ }
154231
+ const resolved = new URL(path.slice(1), base);
154232
+ resolved.search = base.search;
154233
+ return resolved;
154234
+ }
154235
+ async function handle_response(response) {
154236
+ if (response.status === 404) {
154237
+ return void 0;
154238
+ }
154239
+ if (response.status === 200 || response.status === 206) {
154240
+ return new Uint8Array(await response.arrayBuffer());
154241
+ }
154242
+ throw new Error(`Unexpected response status ${response.status} ${response.statusText}`);
154243
+ }
154244
+ async function fetch_suffix(url, suffix_length, init, use_suffix_request) {
154245
+ if (use_suffix_request) {
154246
+ return fetch(url, {
154247
+ ...init,
154248
+ headers: { ...init.headers, Range: `bytes=-${suffix_length}` }
154249
+ });
154250
+ }
154251
+ let response = await fetch(url, { ...init, method: "HEAD" });
154252
+ if (!response.ok) {
154253
+ return response;
154214
154254
  }
154255
+ let content_length = response.headers.get("Content-Length");
154256
+ let length2 = Number(content_length);
154257
+ return fetch_range(url, length2 - suffix_length, length2, init);
154215
154258
  }
154259
+ class FetchStore {
154260
+ constructor(url, options = {}) {
154261
+ __privateAdd(this, _FetchStore_instances);
154262
+ __privateAdd(this, _overrides);
154263
+ __privateAdd(this, _use_suffix_request);
154264
+ this.url = url;
154265
+ __privateSet(this, _overrides, options.overrides ?? {});
154266
+ __privateSet(this, _use_suffix_request, options.useSuffixRequest ?? false);
154267
+ }
154268
+ async get(key, options = {}) {
154269
+ let href = resolve(this.url, key).href;
154270
+ let response = await fetch(href, __privateMethod(this, _FetchStore_instances, merge_init_fn).call(this, options));
154271
+ return handle_response(response);
154272
+ }
154273
+ async getRange(key, range2, options = {}) {
154274
+ let url = resolve(this.url, key);
154275
+ let init = __privateMethod(this, _FetchStore_instances, merge_init_fn).call(this, options);
154276
+ let response;
154277
+ if ("suffixLength" in range2) {
154278
+ response = await fetch_suffix(url, range2.suffixLength, init, __privateGet(this, _use_suffix_request));
154279
+ } else {
154280
+ response = await fetch_range(url, range2.offset, range2.length, init);
154281
+ }
154282
+ return handle_response(response);
154283
+ }
154284
+ }
154285
+ _overrides = new WeakMap();
154286
+ _use_suffix_request = new WeakMap();
154287
+ _FetchStore_instances = new WeakSet();
154288
+ merge_init_fn = function(overrides) {
154289
+ return merge_init(__privateGet(this, _overrides), overrides);
154290
+ };
154216
154291
  class BoolArray {
154217
154292
  constructor(x, byteOffset, length2) {
154218
154293
  __privateAdd(this, _bytes);
@@ -154730,7 +154805,7 @@ const _JsonCodec = class _JsonCodec {
154730
154805
  const items = Array.from(buf.data);
154731
154806
  items.push("|O");
154732
154807
  items.push(buf.shape);
154733
- let replacer = void 0;
154808
+ let replacer;
154734
154809
  if (replacer_functions.length) {
154735
154810
  replacer = (key, value) => {
154736
154811
  let new_value = value;
@@ -154993,6 +155068,18 @@ async function load_codecs(chunk_meta) {
154993
155068
  function is_typed_array_like_meta(meta) {
154994
155069
  return meta.data_type !== "v2:object";
154995
155070
  }
155071
+ class NodeNotFoundError extends Error {
155072
+ constructor(context, options = {}) {
155073
+ super(`Node not found: ${context}`, options);
155074
+ this.name = "NodeNotFoundError";
155075
+ }
155076
+ }
155077
+ class KeyError extends Error {
155078
+ constructor(path) {
155079
+ super(`Missing key: ${path}`);
155080
+ this.name = "KeyError";
155081
+ }
155082
+ }
154996
155083
  const MAX_BIG_UINT = 18446744073709551615n;
154997
155084
  function create_sharded_chunk_getter(location, shard_shape, encode_shard_key, sharding_config) {
154998
155085
  assert$1(location.store.getRange, "Store does not support range requests");
@@ -155172,105 +155259,6 @@ let Array$1 = (_c = class extends (_a = Location, _a) {
155172
155259
  return is_dtype(this.dtype, query);
155173
155260
  }
155174
155261
  }, _metadata2 = new WeakMap(), _c);
155175
- let VERSION_COUNTER = create_version_counter();
155176
- function create_version_counter() {
155177
- let version_counts = /* @__PURE__ */ new WeakMap();
155178
- function get_counts(store) {
155179
- let counts = version_counts.get(store) ?? { v2: 0, v3: 0 };
155180
- version_counts.set(store, counts);
155181
- return counts;
155182
- }
155183
- return {
155184
- increment(store, version2) {
155185
- get_counts(store)[version2] += 1;
155186
- },
155187
- version_max(store) {
155188
- let counts = get_counts(store);
155189
- return counts.v3 > counts.v2 ? "v3" : "v2";
155190
- }
155191
- };
155192
- }
155193
- async function load_attrs(location) {
155194
- let meta_bytes = await location.store.get(location.resolve(".zattrs").path);
155195
- if (!meta_bytes)
155196
- return {};
155197
- return json_decode_object(meta_bytes);
155198
- }
155199
- async function open_v2(location, options = {}) {
155200
- let loc = "store" in location ? location : new Location(location);
155201
- let attrs = {};
155202
- if (options.attrs ?? true)
155203
- attrs = await load_attrs(loc);
155204
- if (options.kind === "array")
155205
- return open_array_v2(loc, attrs);
155206
- if (options.kind === "group")
155207
- return open_group_v2(loc, attrs);
155208
- return open_array_v2(loc, attrs).catch((err2) => {
155209
- rethrow_unless(err2, NodeNotFoundError);
155210
- return open_group_v2(loc, attrs);
155211
- });
155212
- }
155213
- async function open_array_v2(location, attrs) {
155214
- let { path } = location.resolve(".zarray");
155215
- let meta = await location.store.get(path);
155216
- if (!meta) {
155217
- throw new NodeNotFoundError("v2 array", {
155218
- cause: new KeyError(path)
155219
- });
155220
- }
155221
- VERSION_COUNTER.increment(location.store, "v2");
155222
- return new Array$1(location.store, location.path, v2_to_v3_array_metadata(json_decode_object(meta), attrs));
155223
- }
155224
- async function open_group_v2(location, attrs) {
155225
- let { path } = location.resolve(".zgroup");
155226
- let meta = await location.store.get(path);
155227
- if (!meta) {
155228
- throw new NodeNotFoundError("v2 group", {
155229
- cause: new KeyError(path)
155230
- });
155231
- }
155232
- VERSION_COUNTER.increment(location.store, "v2");
155233
- return new Group(location.store, location.path, v2_to_v3_group_metadata(json_decode_object(meta), attrs));
155234
- }
155235
- async function _open_v3(location) {
155236
- let { store, path } = location.resolve("zarr.json");
155237
- let meta = await location.store.get(path);
155238
- if (!meta) {
155239
- throw new NodeNotFoundError("v3 array or group", {
155240
- cause: new KeyError(path)
155241
- });
155242
- }
155243
- let meta_doc = json_decode_object(meta);
155244
- if (meta_doc.node_type === "array") {
155245
- meta_doc.fill_value = ensure_correct_scalar(meta_doc);
155246
- }
155247
- return meta_doc.node_type === "array" ? new Array$1(store, location.path, meta_doc) : new Group(store, location.path, meta_doc);
155248
- }
155249
- async function open_v3(location, options = {}) {
155250
- let loc = "store" in location ? location : new Location(location);
155251
- let node2 = await _open_v3(loc);
155252
- VERSION_COUNTER.increment(loc.store, "v3");
155253
- if (options.kind === void 0)
155254
- return node2;
155255
- if (options.kind === "array" && node2 instanceof Array$1)
155256
- return node2;
155257
- if (options.kind === "group" && node2 instanceof Group)
155258
- return node2;
155259
- let kind = node2 instanceof Array$1 ? "array" : "group";
155260
- throw new Error(`Expected node of kind ${options.kind}, found ${kind}.`);
155261
- }
155262
- async function open(location, options = {}) {
155263
- let store = "store" in location ? location.store : location;
155264
- let version_max = VERSION_COUNTER.version_max(store);
155265
- let open_primary = version_max === "v2" ? open.v2 : open.v3;
155266
- let open_secondary = version_max === "v2" ? open.v3 : open.v2;
155267
- return open_primary(location, options).catch((err2) => {
155268
- rethrow_unless(err2, NodeNotFoundError);
155269
- return open_secondary(location, options);
155270
- });
155271
- }
155272
- open.v2 = open_v2;
155273
- open.v3 = open_v3;
155274
155262
  function* range(start, stop, step = 1) {
155275
155263
  if (stop === void 0) {
155276
155264
  stop = start;
@@ -155651,93 +155639,105 @@ function set_from_chunk_binary(dest, src, bytes_per_element2, projections) {
155651
155639
  }, bytes_per_element2, projs);
155652
155640
  }
155653
155641
  }
155654
- function fetch_range(url, offset, length2, opts = {}) {
155655
- if (offset !== void 0 && length2 !== void 0) {
155656
- opts = {
155657
- ...opts,
155658
- headers: {
155659
- ...opts.headers,
155660
- Range: `bytes=${offset}-${offset + length2 - 1}`
155661
- }
155662
- };
155642
+ let VERSION_COUNTER = create_version_counter();
155643
+ function create_version_counter() {
155644
+ let version_counts = /* @__PURE__ */ new WeakMap();
155645
+ function get_counts(store) {
155646
+ let counts = version_counts.get(store) ?? { v2: 0, v3: 0 };
155647
+ version_counts.set(store, counts);
155648
+ return counts;
155663
155649
  }
155664
- return fetch(url, opts);
155665
- }
155666
- function merge_init(storeOverrides, requestOverrides) {
155667
155650
  return {
155668
- ...storeOverrides,
155669
- ...requestOverrides,
155670
- headers: {
155671
- ...storeOverrides.headers,
155672
- ...requestOverrides.headers
155651
+ increment(store, version2) {
155652
+ get_counts(store)[version2] += 1;
155653
+ },
155654
+ version_max(store) {
155655
+ let counts = get_counts(store);
155656
+ return counts.v3 > counts.v2 ? "v3" : "v2";
155673
155657
  }
155674
155658
  };
155675
155659
  }
155676
- function resolve(root2, path) {
155677
- const base = typeof root2 === "string" ? new URL(root2) : root2;
155678
- if (!base.pathname.endsWith("/")) {
155679
- base.pathname += "/";
155680
- }
155681
- const resolved = new URL(path.slice(1), base);
155682
- resolved.search = base.search;
155683
- return resolved;
155660
+ async function load_attrs(location) {
155661
+ let meta_bytes = await location.store.get(location.resolve(".zattrs").path);
155662
+ if (!meta_bytes)
155663
+ return {};
155664
+ return json_decode_object(meta_bytes);
155684
155665
  }
155685
- async function handle_response(response) {
155686
- if (response.status === 404) {
155687
- return void 0;
155688
- }
155689
- if (response.status === 200 || response.status === 206) {
155690
- return new Uint8Array(await response.arrayBuffer());
155691
- }
155692
- throw new Error(`Unexpected response status ${response.status} ${response.statusText}`);
155666
+ async function open_v2(location, options = {}) {
155667
+ let loc = "store" in location ? location : new Location(location);
155668
+ let attrs = {};
155669
+ if (options.attrs ?? true)
155670
+ attrs = await load_attrs(loc);
155671
+ if (options.kind === "array")
155672
+ return open_array_v2(loc, attrs);
155673
+ if (options.kind === "group")
155674
+ return open_group_v2(loc, attrs);
155675
+ return open_array_v2(loc, attrs).catch((err2) => {
155676
+ rethrow_unless(err2, NodeNotFoundError);
155677
+ return open_group_v2(loc, attrs);
155678
+ });
155693
155679
  }
155694
- async function fetch_suffix(url, suffix_length, init, use_suffix_request) {
155695
- if (use_suffix_request) {
155696
- return fetch(url, {
155697
- ...init,
155698
- headers: { ...init.headers, Range: `bytes=-${suffix_length}` }
155680
+ async function open_array_v2(location, attrs) {
155681
+ let { path } = location.resolve(".zarray");
155682
+ let meta = await location.store.get(path);
155683
+ if (!meta) {
155684
+ throw new NodeNotFoundError("v2 array", {
155685
+ cause: new KeyError(path)
155699
155686
  });
155700
155687
  }
155701
- let response = await fetch(url, { ...init, method: "HEAD" });
155702
- if (!response.ok) {
155703
- return response;
155704
- }
155705
- let content_length = response.headers.get("Content-Length");
155706
- let length2 = Number(content_length);
155707
- return fetch_range(url, length2 - suffix_length, length2, init);
155688
+ VERSION_COUNTER.increment(location.store, "v2");
155689
+ return new Array$1(location.store, location.path, v2_to_v3_array_metadata(json_decode_object(meta), attrs));
155708
155690
  }
155709
- class FetchStore {
155710
- constructor(url, options = {}) {
155711
- __privateAdd(this, _FetchStore_instances);
155712
- __privateAdd(this, _overrides);
155713
- __privateAdd(this, _use_suffix_request);
155714
- this.url = url;
155715
- __privateSet(this, _overrides, options.overrides ?? {});
155716
- __privateSet(this, _use_suffix_request, options.useSuffixRequest ?? false);
155691
+ async function open_group_v2(location, attrs) {
155692
+ let { path } = location.resolve(".zgroup");
155693
+ let meta = await location.store.get(path);
155694
+ if (!meta) {
155695
+ throw new NodeNotFoundError("v2 group", {
155696
+ cause: new KeyError(path)
155697
+ });
155717
155698
  }
155718
- async get(key, options = {}) {
155719
- let href = resolve(this.url, key).href;
155720
- let response = await fetch(href, __privateMethod(this, _FetchStore_instances, merge_init_fn).call(this, options));
155721
- return handle_response(response);
155699
+ VERSION_COUNTER.increment(location.store, "v2");
155700
+ return new Group(location.store, location.path, v2_to_v3_group_metadata(json_decode_object(meta), attrs));
155701
+ }
155702
+ async function _open_v3(location) {
155703
+ let { store, path } = location.resolve("zarr.json");
155704
+ let meta = await location.store.get(path);
155705
+ if (!meta) {
155706
+ throw new NodeNotFoundError("v3 array or group", {
155707
+ cause: new KeyError(path)
155708
+ });
155722
155709
  }
155723
- async getRange(key, range2, options = {}) {
155724
- let url = resolve(this.url, key);
155725
- let init = __privateMethod(this, _FetchStore_instances, merge_init_fn).call(this, options);
155726
- let response;
155727
- if ("suffixLength" in range2) {
155728
- response = await fetch_suffix(url, range2.suffixLength, init, __privateGet(this, _use_suffix_request));
155729
- } else {
155730
- response = await fetch_range(url, range2.offset, range2.length, init);
155731
- }
155732
- return handle_response(response);
155710
+ let meta_doc = json_decode_object(meta);
155711
+ if (meta_doc.node_type === "array") {
155712
+ meta_doc.fill_value = ensure_correct_scalar(meta_doc);
155733
155713
  }
155714
+ return meta_doc.node_type === "array" ? new Array$1(store, location.path, meta_doc) : new Group(store, location.path, meta_doc);
155734
155715
  }
155735
- _overrides = new WeakMap();
155736
- _use_suffix_request = new WeakMap();
155737
- _FetchStore_instances = new WeakSet();
155738
- merge_init_fn = function(overrides) {
155739
- return merge_init(__privateGet(this, _overrides), overrides);
155740
- };
155716
+ async function open_v3(location, options = {}) {
155717
+ let loc = "store" in location ? location : new Location(location);
155718
+ let node2 = await _open_v3(loc);
155719
+ VERSION_COUNTER.increment(loc.store, "v3");
155720
+ if (options.kind === void 0)
155721
+ return node2;
155722
+ if (options.kind === "array" && node2 instanceof Array$1)
155723
+ return node2;
155724
+ if (options.kind === "group" && node2 instanceof Group)
155725
+ return node2;
155726
+ let kind = node2 instanceof Array$1 ? "array" : "group";
155727
+ throw new Error(`Expected node of kind ${options.kind}, found ${kind}.`);
155728
+ }
155729
+ async function open(location, options = {}) {
155730
+ let store = "store" in location ? location.store : location;
155731
+ let version_max = VERSION_COUNTER.version_max(store);
155732
+ let open_primary = version_max === "v2" ? open.v2 : open.v3;
155733
+ let open_secondary = version_max === "v2" ? open.v3 : open.v2;
155734
+ return open_primary(location, options).catch((err2) => {
155735
+ rethrow_unless(err2, NodeNotFoundError);
155736
+ return open_secondary(location, options);
155737
+ });
155738
+ }
155739
+ open.v2 = open_v2;
155740
+ open.v3 = open_v3;
155741
155741
  function getV2DataType(dtype) {
155742
155742
  const mapping = {
155743
155743
  int8: "|i1",
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C, d, e, f, h, G, b, J, M, i, O, c, R, j } from "./index-C7YXFoIv.js";
1
+ import { C, d, e, f, h, G, b, J, M, i, O, c, R, j } from "./index-ClFtTupj.js";
2
2
  export {
3
3
  C as CellsJsonAsObsEmbeddingLoader,
4
4
  d as CellsJsonAsObsLabelsLoader,
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-C7YXFoIv.js";
1
+ import { B as BaseDecoder } from "./index-ClFtTupj.js";
2
2
  const dctZigZag = new Int32Array([
3
3
  0,
4
4
  1,
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-SxljTded.js";
2
- import { g as getDefaultExportFromCjs, B as BaseDecoder, L as LercParameters, a as LercAddCompression } from "./index-C7YXFoIv.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder, L as LercParameters, a as LercAddCompression } from "./index-ClFtTupj.js";
3
3
  var LercDecode = { exports: {} };
4
4
  var hasRequiredLercDecode;
5
5
  function requireLercDecode() {
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-C7YXFoIv.js";
1
+ import { B as BaseDecoder } from "./index-ClFtTupj.js";
2
2
  const MIN_BITS = 9;
3
3
  const CLEAR_CODE = 256;
4
4
  const EOI_CODE = 257;
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-C7YXFoIv.js";
1
+ import { B as BaseDecoder } from "./index-ClFtTupj.js";
2
2
  class PackbitsDecoder extends BaseDecoder {
3
3
  decodeBlock(buffer) {
4
4
  const dataView = new DataView(buffer);
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-C7YXFoIv.js";
1
+ import { B as BaseDecoder } from "./index-ClFtTupj.js";
2
2
  class RawDecoder extends BaseDecoder {
3
3
  decodeBlock(buffer) {
4
4
  return buffer;
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-C7YXFoIv.js";
1
+ import { B as BaseDecoder } from "./index-ClFtTupj.js";
2
2
  class WebImageDecoder extends BaseDecoder {
3
3
  constructor() {
4
4
  super();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/json",
3
- "version": "3.6.14",
3
+ "version": "3.6.15",
4
4
  "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -18,19 +18,19 @@
18
18
  "dependencies": {
19
19
  "d3-array": "^2.4.0",
20
20
  "lodash-es": "^4.17.21",
21
- "zarrita": "0.5.2",
21
+ "zarrita": "0.5.3",
22
22
  "zod": "^3.21.4",
23
- "@vitessce/constants-internal": "3.6.14",
24
- "@vitessce/gl": "3.6.14",
25
- "@vitessce/globals": "3.6.14",
26
- "@vitessce/schemas": "3.6.14",
27
- "@vitessce/sets-utils": "3.6.14",
28
- "@vitessce/spatial-utils": "3.6.14",
29
- "@vitessce/utils": "3.6.14",
30
- "@vitessce/abstract": "3.6.14",
31
- "@vitessce/error": "3.6.14",
32
- "@vitessce/zarr-utils": "3.6.14",
33
- "@vitessce/config": "3.6.14"
23
+ "@vitessce/constants-internal": "3.6.15",
24
+ "@vitessce/gl": "3.6.15",
25
+ "@vitessce/globals": "3.6.15",
26
+ "@vitessce/schemas": "3.6.15",
27
+ "@vitessce/sets-utils": "3.6.15",
28
+ "@vitessce/spatial-utils": "3.6.15",
29
+ "@vitessce/utils": "3.6.15",
30
+ "@vitessce/abstract": "3.6.15",
31
+ "@vitessce/error": "3.6.15",
32
+ "@vitessce/zarr-utils": "3.6.15",
33
+ "@vitessce/config": "3.6.15"
34
34
  },
35
35
  "scripts": {
36
36
  "bundle": "pnpm exec vite build -c ../../../scripts/vite.config.js",