@vitessce/dev 3.3.6 → 3.3.8

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.
@@ -26,7 +26,7 @@ var __privateMethod = (obj, member, method2) => {
26
26
  __accessCheck(obj, member, "access private method");
27
27
  return method2;
28
28
  };
29
- var _bytes, _encoder, _encode_buffer, _strides, _TypedArray, _BYTES_PER_ELEMENT, _shape, _endian, _shape2, _strides2, _metadata, _a2, _metadata2, _b, _c, _overrides, _use_suffix_request, _merge_init, merge_init_fn;
29
+ var _bytes, _encoder, _data, _encode_buffer, _strides, _TypedArray, _BYTES_PER_ELEMENT, _shape, _endian, _shape2, _strides2, _encoder_config, _decoder_config, _metadata, _a2, _metadata2, _b, _c, _overrides, _use_suffix_request, _merge_init, merge_init_fn, _overrides2;
30
30
  import * as React$6 from "react";
31
31
  import React__default, { Children, isValidElement, cloneElement as cloneElement$1, useReducer, useRef, useDebugValue, useEffect, useLayoutEffect as useLayoutEffect$1, createContext as createContext$1, createElement, useContext, useMemo, useCallback, useState, forwardRef, useImperativeHandle, PureComponent, Component as Component$1, Suspense } from "react";
32
32
  import * as ReactDOM from "react-dom";
@@ -79,11 +79,14 @@ const DataType$3 = {
79
79
  GENOMIC_PROFILES: "genomic-profiles",
80
80
  OBS_SPOTS: "obsSpots",
81
81
  OBS_POINTS: "obsPoints",
82
- OBS_LOCATIONS: "obsLocations"
82
+ OBS_LOCATIONS: "obsLocations",
83
+ SAMPLE_SETS: "sampleSets",
84
+ SAMPLE_EDGES: "sampleEdges"
83
85
  };
84
86
  const FileType$2 = {
85
87
  // Joint file types
86
88
  ANNDATA_ZARR: "anndata.zarr",
89
+ ANNDATA_ZARR_ZIP: "anndata.zarr.zip",
87
90
  SPATIALDATA_ZARR: "spatialdata.zarr",
88
91
  // Atomic file types
89
92
  OBS_EMBEDDING_CSV: "obsEmbedding.csv",
@@ -96,6 +99,7 @@ const FileType$2 = {
96
99
  OBS_SEGMENTATIONS_JSON: "obsSegmentations.json",
97
100
  OBS_SETS_CSV: "obsSets.csv",
98
101
  OBS_SETS_JSON: "obsSets.json",
102
+ SAMPLE_SETS_CSV: "sampleSets.csv",
99
103
  // OME-Zarr
100
104
  IMAGE_OME_ZARR: "image.ome-zarr",
101
105
  OBS_SEGMENTATIONS_OME_ZARR: "obsSegmentations.ome-zarr",
@@ -110,6 +114,19 @@ const FileType$2 = {
110
114
  OBS_SEGMENTATIONS_ANNDATA_ZARR: "obsSegmentations.anndata.zarr",
111
115
  OBS_LABELS_ANNDATA_ZARR: "obsLabels.anndata.zarr",
112
116
  FEATURE_LABELS_ANNDATA_ZARR: "featureLabels.anndata.zarr",
117
+ SAMPLE_EDGES_ANNDATA_ZARR: "sampleEdges.anndata.zarr",
118
+ // AnnData - zipped
119
+ OBS_FEATURE_MATRIX_ANNDATA_ZARR_ZIP: "obsFeatureMatrix.anndata.zarr.zip",
120
+ OBS_FEATURE_COLUMNS_ANNDATA_ZARR_ZIP: "obsFeatureColumns.anndata.zarr.zip",
121
+ OBS_SETS_ANNDATA_ZARR_ZIP: "obsSets.anndata.zarr.zip",
122
+ OBS_EMBEDDING_ANNDATA_ZARR_ZIP: "obsEmbedding.anndata.zarr.zip",
123
+ OBS_SPOTS_ANNDATA_ZARR_ZIP: "obsSpots.anndata.zarr.zip",
124
+ OBS_POINTS_ANNDATA_ZARR_ZIP: "obsPoints.anndata.zarr.zip",
125
+ OBS_LOCATIONS_ANNDATA_ZARR_ZIP: "obsLocations.anndata.zarr.zip",
126
+ OBS_SEGMENTATIONS_ANNDATA_ZARR_ZIP: "obsSegmentations.anndata.zarr.zip",
127
+ OBS_LABELS_ANNDATA_ZARR_ZIP: "obsLabels.anndata.zarr.zip",
128
+ FEATURE_LABELS_ANNDATA_ZARR_ZIP: "featureLabels.anndata.zarr.zip",
129
+ SAMPLE_EDGES_ANNDATA_ZARR_ZIP: "sampleEdges.anndata.zarr.zip",
113
130
  // SpatialData
114
131
  IMAGE_SPATIALDATA_ZARR: "image.spatialdata.zarr",
115
132
  LABELS_SPATIALDATA_ZARR: "labels.spatialdata.zarr",
@@ -117,6 +134,7 @@ const FileType$2 = {
117
134
  OBS_FEATURE_MATRIX_SPATIALDATA_ZARR: "obsFeatureMatrix.spatialdata.zarr",
118
135
  OBS_SETS_SPATIALDATA_ZARR: "obsSets.spatialdata.zarr",
119
136
  OBS_SPOTS_SPATIALDATA_ZARR: "obsSpots.spatialdata.zarr",
137
+ FEATURE_LABELS_SPATIALDATA_ZARR: "featureLabels.spatialdata.zarr",
120
138
  // TODO:
121
139
  // OBS_POINTS_SPATIALDATA_ZARR: 'obsPoints.spatialdata.zarr',
122
140
  // OBS_LOCATIONS_SPATIALDATA_ZARR: 'obsLocations.spatialdata.zarr',
@@ -273,7 +291,10 @@ const CoordinationType$2 = {
273
291
  LEGEND_VISIBLE: "legendVisible",
274
292
  SPATIAL_CHANNEL_LABELS_VISIBLE: "spatialChannelLabelsVisible",
275
293
  SPATIAL_CHANNEL_LABELS_ORIENTATION: "spatialChannelLabelsOrientation",
276
- SPATIAL_CHANNEL_LABEL_SIZE: "spatialChannelLabelSize"
294
+ SPATIAL_CHANNEL_LABEL_SIZE: "spatialChannelLabelSize",
295
+ // Multi-sample / comparative
296
+ SAMPLE_TYPE: "sampleType",
297
+ SAMPLE_SET_SELECTION: "sampleSetSelection"
277
298
  };
278
299
  const STATUS$1 = {
279
300
  LOADING: "loading",
@@ -317,7 +338,49 @@ const DATA_TYPE_COORDINATION_VALUE_USAGE = {
317
338
  [DataType$3.IMAGE]: [
318
339
  CoordinationType$2.FILE_UID
319
340
  ],
320
- [DataType$3.NEIGHBORHOODS]: []
341
+ [DataType$3.NEIGHBORHOODS]: [],
342
+ [DataType$3.SAMPLE_SETS]: [
343
+ CoordinationType$2.SAMPLE_TYPE
344
+ ],
345
+ [DataType$3.SAMPLE_EDGES]: [
346
+ CoordinationType$2.OBS_TYPE,
347
+ CoordinationType$2.SAMPLE_TYPE
348
+ ]
349
+ };
350
+ const ALT_ZARR_STORE_TYPES = {
351
+ [FileType$2.OBS_FEATURE_MATRIX_ANNDATA_ZARR]: {
352
+ zip: FileType$2.OBS_FEATURE_MATRIX_ANNDATA_ZARR_ZIP
353
+ },
354
+ [FileType$2.OBS_FEATURE_COLUMNS_ANNDATA_ZARR]: {
355
+ zip: FileType$2.OBS_FEATURE_COLUMNS_ANNDATA_ZARR_ZIP
356
+ },
357
+ [FileType$2.OBS_SETS_ANNDATA_ZARR]: {
358
+ zip: FileType$2.OBS_SETS_ANNDATA_ZARR_ZIP
359
+ },
360
+ [FileType$2.OBS_EMBEDDING_ANNDATA_ZARR]: {
361
+ zip: FileType$2.OBS_EMBEDDING_ANNDATA_ZARR_ZIP
362
+ },
363
+ [FileType$2.OBS_SPOTS_ANNDATA_ZARR]: {
364
+ zip: FileType$2.OBS_SPOTS_ANNDATA_ZARR_ZIP
365
+ },
366
+ [FileType$2.OBS_POINTS_ANNDATA_ZARR]: {
367
+ zip: FileType$2.OBS_POINTS_ANNDATA_ZARR_ZIP
368
+ },
369
+ [FileType$2.OBS_LOCATIONS_ANNDATA_ZARR]: {
370
+ zip: FileType$2.OBS_LOCATIONS_ANNDATA_ZARR_ZIP
371
+ },
372
+ [FileType$2.OBS_SEGMENTATIONS_ANNDATA_ZARR]: {
373
+ zip: FileType$2.OBS_SEGMENTATIONS_ANNDATA_ZARR_ZIP
374
+ },
375
+ [FileType$2.OBS_LABELS_ANNDATA_ZARR]: {
376
+ zip: FileType$2.OBS_LABELS_ANNDATA_ZARR_ZIP
377
+ },
378
+ [FileType$2.FEATURE_LABELS_ANNDATA_ZARR]: {
379
+ zip: FileType$2.FEATURE_LABELS_ANNDATA_ZARR_ZIP
380
+ },
381
+ [FileType$2.SAMPLE_EDGES_ANNDATA_ZARR]: {
382
+ zip: FileType$2.SAMPLE_EDGES_ANNDATA_ZARR_ZIP
383
+ }
321
384
  };
322
385
  const AUTO_INDEPENDENT_COORDINATION_TYPES = [
323
386
  CoordinationType$2.HEATMAP_ZOOM_X,
@@ -580,7 +643,9 @@ const COMPONENT_COORDINATION_TYPES = {
580
643
  CoordinationType$2.OBS_SET_SELECTION,
581
644
  CoordinationType$2.OBS_SET_HIGHLIGHT,
582
645
  CoordinationType$2.OBS_SET_COLOR,
583
- CoordinationType$2.ADDITIONAL_OBS_SETS
646
+ CoordinationType$2.ADDITIONAL_OBS_SETS,
647
+ CoordinationType$2.SAMPLE_TYPE,
648
+ CoordinationType$2.SAMPLE_SET_SELECTION
584
649
  ],
585
650
  [ViewType$2.FEATURE_VALUE_HISTOGRAM]: [
586
651
  CoordinationType$2.DATASET,
@@ -705,10 +770,10 @@ const COMPONENT_COORDINATION_TYPES = {
705
770
  ]
706
771
  };
707
772
  const note = "This file is autogenerated by .changeset/post-changelog.mjs.";
708
- const version$6 = "3.3.6";
709
- const date$5 = "2024-02-25";
773
+ const version$6 = "3.3.8";
774
+ const date$5 = "2024-03-21";
710
775
  const branch = "changeset-release/main";
711
- const hash$1 = "fcb2a92d";
776
+ const hash$1 = "a1b536f3";
712
777
  const META_VERSION = {
713
778
  note,
714
779
  version: version$6,
@@ -10170,7 +10235,7 @@ function useIsFocusVisible() {
10170
10235
  function _toArray(arr) {
10171
10236
  return _arrayWithHoles$9(arr) || _iterableToArray$k(arr) || _unsupportedIterableToArray$o(arr) || _nonIterableRest$9();
10172
10237
  }
10173
- const config$3 = {
10238
+ const config$4 = {
10174
10239
  disabled: false
10175
10240
  };
10176
10241
  var timeoutsShape = _pt.oneOfType([_pt.number, _pt.shape({
@@ -10304,7 +10369,7 @@ var Transition$1 = /* @__PURE__ */ function(_React$Component) {
10304
10369
  var _ref22 = this.props.nodeRef ? [appearing] : [ReactDOM__default.findDOMNode(this), appearing], maybeNode = _ref22[0], maybeAppearing = _ref22[1];
10305
10370
  var timeouts = this.getTimeouts();
10306
10371
  var enterTimeout = appearing ? timeouts.appear : timeouts.enter;
10307
- if (!mounting && !enter || config$3.disabled) {
10372
+ if (!mounting && !enter || config$4.disabled) {
10308
10373
  this.safeSetState({
10309
10374
  status: ENTERED
10310
10375
  }, function() {
@@ -10331,7 +10396,7 @@ var Transition$1 = /* @__PURE__ */ function(_React$Component) {
10331
10396
  var exit = this.props.exit;
10332
10397
  var timeouts = this.getTimeouts();
10333
10398
  var maybeNode = this.props.nodeRef ? void 0 : ReactDOM__default.findDOMNode(this);
10334
- if (!exit || config$3.disabled) {
10399
+ if (!exit || config$4.disabled) {
10335
10400
  this.safeSetState({
10336
10401
  status: EXITED
10337
10402
  }, function() {
@@ -35144,6 +35209,7 @@ const annDataConvenienceObsEmbeddingItem = z.object({
35144
35209
  });
35145
35210
  const annDataObsLabels = annDataObs;
35146
35211
  const annDataFeatureLabels = annDataObs;
35212
+ const annDataSampleEdges = annDataObs;
35147
35213
  const annDataObsFeatureMatrix = z.object({
35148
35214
  path: z.string(),
35149
35215
  featureFilterPath: z.string().optional().describe("If the feature index should be filtered, put a boolean column here (analogous to the previous geneFilter option). e.g., var/in_obsm_X_small_matrix"),
@@ -35225,6 +35291,7 @@ const obsFeatureMatrixAnndataSchema = annDataObsFeatureMatrix;
35225
35291
  const obsLabelsAnndataSchema = annDataObsLabels;
35226
35292
  const featureLabelsAnndataSchema = annDataFeatureLabels;
35227
35293
  const obsFeatureColumnsAnndataSchema = annDataObsFeatureColumns;
35294
+ const sampleEdgesAnndataSchema = annDataSampleEdges;
35228
35295
  const obsEmbeddingCsvSchema = z.object({
35229
35296
  obsIndex: z.string(),
35230
35297
  obsEmbedding: z.array(z.string()).length(2)
@@ -35263,6 +35330,17 @@ const obsSetsCsvSchema = z.object({
35263
35330
  scoreColumn: z.string().optional()
35264
35331
  }))
35265
35332
  });
35333
+ const sampleSetsCsvSchema = z.object({
35334
+ sampleIndex: z.string(),
35335
+ sampleSets: z.array(z.object({
35336
+ name: z.string(),
35337
+ column: z.union([
35338
+ z.string(),
35339
+ z.array(z.string())
35340
+ ]),
35341
+ scoreColumn: z.string().optional()
35342
+ }))
35343
+ });
35266
35344
  const anndataZarrSchema = z.object({
35267
35345
  obsLabels: z.union([
35268
35346
  annDataObsLabels,
@@ -42636,6 +42714,7 @@ function createLoaders(datasets, configDescription, fileTypes, coordinationTypes
42636
42714
  if (!dataSources.has(dataSourceKey)) {
42637
42715
  dataSources.set(dataSourceKey, new DataSourceClass({
42638
42716
  url,
42717
+ fileType,
42639
42718
  requestInit: requestInit2,
42640
42719
  // Optionally, pass a Zarrita store to the data source,
42641
42720
  // if one was mapped to this URL.
@@ -44395,6 +44474,12 @@ function useObsSegmentationsData(loaders, dataset, isRequired, coordinationSette
44395
44474
  function useObsSetsData(loaders, dataset, isRequired, coordinationSetters, initialCoordinationValues, matchOn) {
44396
44475
  return useDataType(DataType$3.OBS_SETS, loaders, dataset, isRequired, coordinationSetters, initialCoordinationValues, matchOn);
44397
44476
  }
44477
+ function useSampleSetsData(loaders, dataset, isRequired, coordinationSetters, initialCoordinationValues, matchOn) {
44478
+ return useDataType(DataType$3.SAMPLE_SETS, loaders, dataset, isRequired, coordinationSetters, initialCoordinationValues, matchOn);
44479
+ }
44480
+ function useSampleEdgesData(loaders, dataset, isRequired, coordinationSetters, initialCoordinationValues, matchOn) {
44481
+ return useDataType(DataType$3.SAMPLE_EDGES, loaders, dataset, isRequired, coordinationSetters, initialCoordinationValues, matchOn);
44482
+ }
44398
44483
  function useObsFeatureMatrixData(loaders, dataset, isRequired, coordinationSetters, initialCoordinationValues, matchOn) {
44399
44484
  return useDataType(DataType$3.OBS_FEATURE_MATRIX, loaders, dataset, isRequired, coordinationSetters, initialCoordinationValues, matchOn);
44400
44485
  }
@@ -44571,6 +44656,20 @@ function useSpotMultiObsSets(coordinationScopes, coordinationScopesBy, loaders,
44571
44656
  const [obsSetsData, obsSetsDataStatus, obsSetsUrls] = useDataTypeMulti(DataType$3.OBS_SETS, loaders, dataset, false, {}, {}, matchOnObj);
44572
44657
  return [obsSetsData, obsSetsDataStatus, obsSetsUrls];
44573
44658
  }
44659
+ function useSpotMultiFeatureLabels(coordinationScopes, coordinationScopesBy, loaders, dataset) {
44660
+ const featureTypeCoordination = useComplexCoordination([
44661
+ CoordinationType$2.FEATURE_TYPE
44662
+ ], coordinationScopes, coordinationScopesBy, CoordinationType$2.SPOT_LAYER);
44663
+ const matchOnObj = useMemo(
44664
+ () => featureTypeCoordination[0],
44665
+ // imageCoordination reference changes each render,
44666
+ // use coordinationScopes and coordinationScopesBy which are
44667
+ // indirect dependencies here.
44668
+ [coordinationScopes, coordinationScopesBy]
44669
+ );
44670
+ const [featureLabelsData, featureLabelsStatus, featureLabelsUrls] = useDataTypeMulti(DataType$3.FEATURE_LABELS, loaders, dataset, false, {}, {}, matchOnObj);
44671
+ return [featureLabelsData, featureLabelsStatus, featureLabelsUrls];
44672
+ }
44574
44673
  function useMultiObsLabels(coordinationScopes, obsType, loaders, dataset) {
44575
44674
  const obsLabelsTypes = useMultiCoordinationValues(CoordinationType$2.OBS_LABELS_TYPE, coordinationScopes);
44576
44675
  const obsLabelsMatchOnObj = useMemo(() => Object.fromEntries(Object.entries(obsLabelsTypes).map(([scope, obsLabelsType]) => [
@@ -45114,10 +45213,10 @@ const $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== "undefined
45114
45213
  let $bdb11010cef70236$var$idsUpdaterMap = /* @__PURE__ */ new Map();
45115
45214
  function $bdb11010cef70236$export$f680877a34711e37(defaultId2) {
45116
45215
  let [value2, setValue] = useState(defaultId2);
45117
- let nextId = useRef(null);
45216
+ let nextId2 = useRef(null);
45118
45217
  let res = $b5e257d569688ac6$export$619500959fc48b26(value2);
45119
45218
  let updateValue = useCallback((val) => {
45120
- nextId.current = val;
45219
+ nextId2.current = val;
45121
45220
  }, []);
45122
45221
  $bdb11010cef70236$var$idsUpdaterMap.set(res, updateValue);
45123
45222
  $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
@@ -45129,9 +45228,9 @@ function $bdb11010cef70236$export$f680877a34711e37(defaultId2) {
45129
45228
  res
45130
45229
  ]);
45131
45230
  useEffect(() => {
45132
- let newId = nextId.current;
45231
+ let newId = nextId2.current;
45133
45232
  if (newId) {
45134
- nextId.current = null;
45233
+ nextId2.current = null;
45135
45234
  setValue(newId);
45136
45235
  }
45137
45236
  });
@@ -54766,10 +54865,10 @@ var _objectKeysInternal = function(object2, names) {
54766
54865
  return result;
54767
54866
  };
54768
54867
  var _enumBugKeys = "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",");
54769
- var $keys$2 = _objectKeysInternal;
54868
+ var $keys$1 = _objectKeysInternal;
54770
54869
  var enumBugKeys$1 = _enumBugKeys;
54771
54870
  var _objectKeys$1 = Object.keys || function keys(O) {
54772
- return $keys$2(O, enumBugKeys$1);
54871
+ return $keys$1(O, enumBugKeys$1);
54773
54872
  };
54774
54873
  var _objectGops = {};
54775
54874
  _objectGops.f = Object.getOwnPropertySymbols;
@@ -55240,13 +55339,20 @@ var _isArray = Array.isArray || function isArray(arg) {
55240
55339
  };
55241
55340
  var _objectGopnExt = {};
55242
55341
  var _objectGopn = {};
55243
- var $keys$1 = _objectKeysInternal;
55244
- var hiddenKeys = _enumBugKeys.concat("length", "prototype");
55245
- _objectGopn.f = Object.getOwnPropertyNames || function getOwnPropertyNames2(O) {
55246
- return $keys$1(O, hiddenKeys);
55247
- };
55342
+ var hasRequired_objectGopn;
55343
+ function require_objectGopn() {
55344
+ if (hasRequired_objectGopn)
55345
+ return _objectGopn;
55346
+ hasRequired_objectGopn = 1;
55347
+ var $keys2 = _objectKeysInternal;
55348
+ var hiddenKeys = _enumBugKeys.concat("length", "prototype");
55349
+ _objectGopn.f = Object.getOwnPropertyNames || function getOwnPropertyNames4(O) {
55350
+ return $keys2(O, hiddenKeys);
55351
+ };
55352
+ return _objectGopn;
55353
+ }
55248
55354
  var toIObject$2 = _toIobject;
55249
- var gOPN$1 = _objectGopn.f;
55355
+ var gOPN$1 = require_objectGopn().f;
55250
55356
  var toString$3 = {}.toString;
55251
55357
  var windowNames = typeof window == "object" && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [];
55252
55358
  var getWindowNames = function(it) {
@@ -55256,7 +55362,7 @@ var getWindowNames = function(it) {
55256
55362
  return windowNames.slice();
55257
55363
  }
55258
55364
  };
55259
- _objectGopnExt.f = function getOwnPropertyNames3(it) {
55365
+ _objectGopnExt.f = function getOwnPropertyNames2(it) {
55260
55366
  return windowNames && toString$3.call(it) == "[object Window]" ? getWindowNames(it) : gOPN$1(toIObject$2(it));
55261
55367
  };
55262
55368
  var _objectGopd = {};
@@ -55395,7 +55501,7 @@ var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor3(it, key2) {
55395
55501
  D2.enumerable = true;
55396
55502
  return D2;
55397
55503
  };
55398
- var $getOwnPropertyNames = function getOwnPropertyNames4(it) {
55504
+ var $getOwnPropertyNames = function getOwnPropertyNames3(it) {
55399
55505
  var names = gOPN(toIObject(it));
55400
55506
  var result = [];
55401
55507
  var i2 = 0;
@@ -55439,7 +55545,7 @@ if (!USE_NATIVE) {
55439
55545
  });
55440
55546
  $GOPD.f = $getOwnPropertyDescriptor;
55441
55547
  $DP.f = $defineProperty$1;
55442
- _objectGopn.f = gOPNExt.f = $getOwnPropertyNames;
55548
+ require_objectGopn().f = gOPNExt.f = $getOwnPropertyNames;
55443
55549
  require_objectPie().f = $propertyIsEnumerable;
55444
55550
  $GOPS.f = $getOwnPropertySymbols;
55445
55551
  if (DESCRIPTORS && !_library) {
@@ -68954,7 +69060,7 @@ const isPureObject = (x2) => isObject$4(x2) && x2.constructor === {}.constructor
68954
69060
  const isIterable$1 = (x2) => x2 && typeof x2[Symbol.iterator] === "function";
68955
69061
  const isAsyncIterable$1 = (x2) => x2 && typeof x2[Symbol.asyncIterator] === "function";
68956
69062
  const isResponse = (x2) => typeof Response !== "undefined" && x2 instanceof Response || x2 && x2.arrayBuffer && x2.text && x2.json;
68957
- const isBlob = (x2) => typeof Blob !== "undefined" && x2 instanceof Blob;
69063
+ const isBlob$1 = (x2) => typeof Blob !== "undefined" && x2 instanceof Blob;
68958
69064
  const isBuffer$2 = (x2) => x2 && typeof x2 === "object" && x2.isBuffer;
68959
69065
  const isReadableDOMStream = (x2) => typeof ReadableStream !== "undefined" && x2 instanceof ReadableStream || isObject$4(x2) && isFunction$4(x2.tee) && isFunction$4(x2.cancel) && isFunction$4(x2.getReader);
68960
69066
  const isReadableNodeStream = (x2) => isObject$4(x2) && isFunction$4(x2.read) && isFunction$4(x2.pipe) && isBoolean$4(x2.readable);
@@ -68985,7 +69091,7 @@ function getResourceUrlAndType(resource) {
68985
69091
  type: parseMIMEType(contentTypeHeader) || parseMIMETypeFromURL(url)
68986
69092
  };
68987
69093
  }
68988
- if (isBlob(resource)) {
69094
+ if (isBlob$1(resource)) {
68989
69095
  return {
68990
69096
  url: stripQueryString(resource.name || ""),
68991
69097
  type: resource.type || ""
@@ -69006,7 +69112,7 @@ function getResourceContentLength(resource) {
69006
69112
  if (isResponse(resource)) {
69007
69113
  return resource.headers["content-length"] || -1;
69008
69114
  }
69009
- if (isBlob(resource)) {
69115
+ if (isBlob$1(resource)) {
69010
69116
  return resource.size;
69011
69117
  }
69012
69118
  if (typeof resource === "string") {
@@ -69909,7 +70015,7 @@ async function selectLoader(data2, loaders = [], options, context2) {
69909
70015
  if (loader2) {
69910
70016
  return loader2;
69911
70017
  }
69912
- if (isBlob(data2)) {
70018
+ if (isBlob$1(data2)) {
69913
70019
  data2 = await data2.slice(0, 10).arrayBuffer();
69914
70020
  loader2 = selectLoaderSync(data2, loaders, options, context2);
69915
70021
  }
@@ -70163,7 +70269,7 @@ function makeIterator(data2, options) {
70163
70269
  if (data2 instanceof ArrayBuffer) {
70164
70270
  return makeArrayBufferIterator(data2, options);
70165
70271
  }
70166
- if (isBlob(data2)) {
70272
+ if (isBlob$1(data2)) {
70167
70273
  return makeBlobIterator(data2, options);
70168
70274
  }
70169
70275
  if (isReadableStream(data2)) {
@@ -70210,7 +70316,7 @@ async function getArrayBufferOrStringFromData(data2, loader2, options) {
70210
70316
  if (typeof data2 === "string" || isArrayBuffer) {
70211
70317
  return getArrayBufferOrStringFromDataSync(data2, loader2);
70212
70318
  }
70213
- if (isBlob(data2)) {
70319
+ if (isBlob$1(data2)) {
70214
70320
  data2 = await makeResponse(data2);
70215
70321
  }
70216
70322
  if (isResponse(data2)) {
@@ -70329,7 +70435,7 @@ async function load$2(url, loaders, options, context2) {
70329
70435
  if (typeof url === "string") {
70330
70436
  data2 = await fetch2(url);
70331
70437
  }
70332
- if (isBlob(url)) {
70438
+ if (isBlob$1(url)) {
70333
70439
  data2 = await fetch2(url);
70334
70440
  }
70335
70441
  return await parse$b(data2, loaders, options);
@@ -78554,7 +78660,7 @@ function assert$7(condition, message) {
78554
78660
  }
78555
78661
  const RADIANS_TO_DEGREES$2 = 1 / Math.PI * 180;
78556
78662
  const DEGREES_TO_RADIANS$7 = 1 / 180 * Math.PI;
78557
- const config$2 = {
78663
+ const config$3 = {
78558
78664
  EPSILON: 1e-12,
78559
78665
  debug: false,
78560
78666
  precision: 4,
@@ -78564,13 +78670,13 @@ const config$2 = {
78564
78670
  };
78565
78671
  function configure(options) {
78566
78672
  for (const key2 in options) {
78567
- assert$7(key2 in config$2);
78568
- config$2[key2] = options[key2];
78673
+ assert$7(key2 in config$3);
78674
+ config$3[key2] = options[key2];
78569
78675
  }
78570
- return config$2;
78676
+ return config$3;
78571
78677
  }
78572
78678
  function formatValue$4(value2, {
78573
- precision = config$2.precision
78679
+ precision = config$3.precision
78574
78680
  } = {}) {
78575
78681
  value2 = round$3(value2);
78576
78682
  return "".concat(parseFloat(value2.toPrecision(precision)));
@@ -78621,9 +78727,9 @@ function lerp$7(a2, b2, t4) {
78621
78727
  return t4 * b2 + (1 - t4) * a2;
78622
78728
  }
78623
78729
  function equals$3(a2, b2, epsilon3) {
78624
- const oldEpsilon = config$2.EPSILON;
78730
+ const oldEpsilon = config$3.EPSILON;
78625
78731
  if (epsilon3) {
78626
- config$2.EPSILON = epsilon3;
78732
+ config$3.EPSILON = epsilon3;
78627
78733
  }
78628
78734
  try {
78629
78735
  if (a2 === b2) {
@@ -78647,11 +78753,11 @@ function equals$3(a2, b2, epsilon3) {
78647
78753
  return b2.equals(a2);
78648
78754
  }
78649
78755
  if (typeof a2 === "number" && typeof b2 === "number") {
78650
- return Math.abs(a2 - b2) <= config$2.EPSILON * Math.max(1, Math.abs(a2), Math.abs(b2));
78756
+ return Math.abs(a2 - b2) <= config$3.EPSILON * Math.max(1, Math.abs(a2), Math.abs(b2));
78651
78757
  }
78652
78758
  return false;
78653
78759
  } finally {
78654
- config$2.EPSILON = oldEpsilon;
78760
+ config$3.EPSILON = oldEpsilon;
78655
78761
  }
78656
78762
  }
78657
78763
  function exactEquals(a2, b2) {
@@ -78680,18 +78786,18 @@ function exactEquals(a2, b2) {
78680
78786
  return false;
78681
78787
  }
78682
78788
  function withEpsilon(epsilon3, func) {
78683
- const oldPrecision = config$2.EPSILON;
78684
- config$2.EPSILON = epsilon3;
78789
+ const oldPrecision = config$3.EPSILON;
78790
+ config$3.EPSILON = epsilon3;
78685
78791
  let value2;
78686
78792
  try {
78687
78793
  value2 = func();
78688
78794
  } finally {
78689
- config$2.EPSILON = oldPrecision;
78795
+ config$3.EPSILON = oldPrecision;
78690
78796
  }
78691
78797
  return value2;
78692
78798
  }
78693
78799
  function round$3(value2) {
78694
- return Math.round(value2 / config$2.EPSILON) * config$2.EPSILON;
78800
+ return Math.round(value2 / config$3.EPSILON) * config$3.EPSILON;
78695
78801
  }
78696
78802
  function duplicateArray(array2) {
78697
78803
  return array2.clone ? array2.clone() : new Array(array2.length);
@@ -78760,7 +78866,7 @@ class MathArray extends _extendableBuiltin(Array) {
78760
78866
  return new Float32Array(this);
78761
78867
  }
78762
78868
  toString() {
78763
- return this.formatString(config$2);
78869
+ return this.formatString(config$3);
78764
78870
  }
78765
78871
  formatString(opts2) {
78766
78872
  let string2 = "";
@@ -78860,7 +78966,7 @@ class MathArray extends _extendableBuiltin(Array) {
78860
78966
  return this.check();
78861
78967
  }
78862
78968
  check() {
78863
- if (config$2.debug && !this.validate()) {
78969
+ if (config$3.debug && !this.validate()) {
78864
78970
  throw new Error("math.gl: ".concat(this.constructor.name, " some fields set to invalid numbers'"));
78865
78971
  }
78866
78972
  return this;
@@ -78927,7 +79033,7 @@ function checkNumber(value2) {
78927
79033
  return value2;
78928
79034
  }
78929
79035
  function checkVector(v, length2, callerName = "") {
78930
- if (config$2.debug && !validateVector(v, length2)) {
79036
+ if (config$3.debug && !validateVector(v, length2)) {
78931
79037
  throw new Error("math.gl: ".concat(callerName, " some fields set to invalid numbers'"));
78932
79038
  }
78933
79039
  return v;
@@ -79185,7 +79291,7 @@ class Vector2 extends Vector {
79185
79291
  if (isArray$3(x2) && arguments.length === 1) {
79186
79292
  this.copy(x2);
79187
79293
  } else {
79188
- if (config$2.debug) {
79294
+ if (config$3.debug) {
79189
79295
  checkNumber(x2);
79190
79296
  checkNumber(y2);
79191
79297
  }
@@ -79204,7 +79310,7 @@ class Vector2 extends Vector {
79204
79310
  return this.check();
79205
79311
  }
79206
79312
  fromObject(object2) {
79207
- if (config$2.debug) {
79313
+ if (config$3.debug) {
79208
79314
  checkNumber(object2.x);
79209
79315
  checkNumber(object2.y);
79210
79316
  }
@@ -79457,7 +79563,7 @@ class Vector3 extends Vector {
79457
79563
  if (arguments.length === 1 && isArray$3(x2)) {
79458
79564
  this.copy(x2);
79459
79565
  } else {
79460
- if (config$2.debug) {
79566
+ if (config$3.debug) {
79461
79567
  checkNumber(x2);
79462
79568
  checkNumber(y2);
79463
79569
  checkNumber(z2);
@@ -79480,7 +79586,7 @@ class Vector3 extends Vector {
79480
79586
  return this.check();
79481
79587
  }
79482
79588
  fromObject(object2) {
79483
- if (config$2.debug) {
79589
+ if (config$3.debug) {
79484
79590
  checkNumber(object2.x);
79485
79591
  checkNumber(object2.y);
79486
79592
  checkNumber(object2.z);
@@ -79571,7 +79677,7 @@ class Vector4 extends Vector {
79571
79677
  if (isArray$3(x2) && arguments.length === 1) {
79572
79678
  this.copy(x2);
79573
79679
  } else {
79574
- if (config$2.debug) {
79680
+ if (config$3.debug) {
79575
79681
  checkNumber(x2);
79576
79682
  checkNumber(y2);
79577
79683
  checkNumber(z2);
@@ -79598,7 +79704,7 @@ class Vector4 extends Vector {
79598
79704
  return this.check();
79599
79705
  }
79600
79706
  fromObject(object2) {
79601
- if (config$2.debug) {
79707
+ if (config$3.debug) {
79602
79708
  checkNumber(object2.x);
79603
79709
  checkNumber(object2.y);
79604
79710
  checkNumber(object2.z);
@@ -79656,7 +79762,7 @@ class Vector4 extends Vector {
79656
79762
  let Matrix$1 = class Matrix extends MathArray {
79657
79763
  toString() {
79658
79764
  let string2 = "[";
79659
- if (config$2.printRowMajor) {
79765
+ if (config$3.printRowMajor) {
79660
79766
  string2 += "row-major:";
79661
79767
  for (let row = 0; row < this.RANK; ++row) {
79662
79768
  for (let col = 0; col < this.RANK; ++col) {
@@ -81519,7 +81625,7 @@ class SphericalCoordinates {
81519
81625
  this.check();
81520
81626
  }
81521
81627
  toString() {
81522
- return this.formatString(config$2);
81628
+ return this.formatString(config$3);
81523
81629
  }
81524
81630
  formatString({
81525
81631
  printTypes = false
@@ -125094,7 +125200,7 @@ function fromCartographic(cartographic, result = [], map2 = identity$f) {
125094
125200
  return result;
125095
125201
  }
125096
125202
  function fromCartographicToRadians(cartographic, vector = []) {
125097
- return fromCartographic(cartographic, vector, config$2._cartographicRadians ? identity$f : toRadians);
125203
+ return fromCartographic(cartographic, vector, config$3._cartographicRadians ? identity$f : toRadians);
125098
125204
  }
125099
125205
  function toCartographic(vector, cartographic, map2 = identity$f) {
125100
125206
  if ("longitude" in cartographic) {
@@ -125113,7 +125219,7 @@ function toCartographic(vector, cartographic, map2 = identity$f) {
125113
125219
  return cartographic;
125114
125220
  }
125115
125221
  function toCartographicFromRadians(vector, cartographic) {
125116
- return toCartographic(vector, cartographic, config$2._cartographicRadians ? identity$f : toDegrees);
125222
+ return toCartographic(vector, cartographic, config$3._cartographicRadians ? identity$f : toDegrees);
125117
125223
  }
125118
125224
  const scratchVector$4 = new Vector3();
125119
125225
  const scaleToGeodeticSurfaceIntersection = new Vector3();
@@ -137668,14 +137774,14 @@ var jsts_min = { exports: {} };
137668
137774
  return 1e-15;
137669
137775
  }, Object.defineProperties(q, B2);
137670
137776
  var V = function() {
137671
- }, U = { X: { configurable: true }, Y: { configurable: true }, Z: { configurable: true }, M: { configurable: true } };
137672
- U.X.get = function() {
137777
+ }, U2 = { X: { configurable: true }, Y: { configurable: true }, Z: { configurable: true }, M: { configurable: true } };
137778
+ U2.X.get = function() {
137673
137779
  return 0;
137674
- }, U.Y.get = function() {
137780
+ }, U2.Y.get = function() {
137675
137781
  return 1;
137676
- }, U.Z.get = function() {
137782
+ }, U2.Z.get = function() {
137677
137783
  return 2;
137678
- }, U.M.get = function() {
137784
+ }, U2.M.get = function() {
137679
137785
  return 3;
137680
137786
  }, V.prototype.setOrdinate = function(t5, e4, n4) {
137681
137787
  }, V.prototype.size = function() {
@@ -137693,7 +137799,7 @@ var jsts_min = { exports: {} };
137693
137799
  return [x2];
137694
137800
  }, V.prototype.getClass = function() {
137695
137801
  return V;
137696
- }, Object.defineProperties(V, U);
137802
+ }, Object.defineProperties(V, U2);
137697
137803
  var z2 = function() {
137698
137804
  }, X3 = function(t5) {
137699
137805
  function e4() {
@@ -166103,7 +166209,7 @@ const esm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty(
166103
166209
  atan: atan$3,
166104
166210
  clamp: clamp$3,
166105
166211
  clone: clone$9,
166106
- config: config$2,
166212
+ config: config$3,
166107
166213
  configure,
166108
166214
  cos: cos$5,
166109
166215
  degrees: degrees$5,
@@ -170537,16 +170643,16 @@ async function getDecoder(fileDirectory) {
170537
170643
  const Decoder = await importFn();
170538
170644
  return new Decoder(fileDirectory);
170539
170645
  }
170540
- addDecoder([void 0, 1], () => import("./raw-a36c9f65.js").then((m2) => m2.default));
170541
- addDecoder(5, () => import("./lzw-8f645795.js").then((m2) => m2.default));
170646
+ addDecoder([void 0, 1], () => import("./raw-9d2155cb.js").then((m2) => m2.default));
170647
+ addDecoder(5, () => import("./lzw-5305eb8a.js").then((m2) => m2.default));
170542
170648
  addDecoder(6, () => {
170543
170649
  throw new Error("old style JPEG compression is not supported.");
170544
170650
  });
170545
- addDecoder(7, () => import("./jpeg-d904d490.js").then((m2) => m2.default));
170546
- addDecoder([8, 32946], () => import("./deflate-0e6942ee.js").then((m2) => m2.default));
170547
- addDecoder(32773, () => import("./packbits-d51ee8e1.js").then((m2) => m2.default));
170548
- addDecoder(34887, () => import("./lerc-92ba15d8.js").then((m2) => m2.default));
170549
- addDecoder(50001, () => import("./webimage-bc0ca93d.js").then((m2) => m2.default));
170651
+ addDecoder(7, () => import("./jpeg-986fe1c3.js").then((m2) => m2.default));
170652
+ addDecoder([8, 32946], () => import("./deflate-b02ff1d4.js").then((m2) => m2.default));
170653
+ addDecoder(32773, () => import("./packbits-fd7c693c.js").then((m2) => m2.default));
170654
+ addDecoder(34887, () => import("./lerc-ca2cec1b.js").then((m2) => m2.default));
170655
+ addDecoder(50001, () => import("./webimage-221468f4.js").then((m2) => m2.default));
170550
170656
  function copyNewSize(array2, width2, height2, samplesPerPixel = 1) {
170551
170657
  return new (Object.getPrototypeOf(array2)).constructor(width2 * height2 * samplesPerPixel);
170552
170658
  }
@@ -175551,14 +175657,14 @@ const makeTable = () => {
175551
175657
  return table;
175552
175658
  };
175553
175659
  const crcTable = new Uint32Array(makeTable());
175554
- const crc32 = (crc, buf, len2, pos) => {
175660
+ const crc32 = (crc2, buf, len2, pos) => {
175555
175661
  const t4 = crcTable;
175556
175662
  const end = pos + len2;
175557
- crc ^= -1;
175663
+ crc2 ^= -1;
175558
175664
  for (let i2 = pos; i2 < end; i2++) {
175559
- crc = crc >>> 8 ^ t4[(crc ^ buf[i2]) & 255];
175665
+ crc2 = crc2 >>> 8 ^ t4[(crc2 ^ buf[i2]) & 255];
175560
175666
  }
175561
- return crc ^ -1;
175667
+ return crc2 ^ -1;
175562
175668
  };
175563
175669
  var crc32_1 = crc32;
175564
175670
  var messages = {
@@ -177760,7 +177866,7 @@ const updatewindow = (strm, src2, end, copy2) => {
177760
177866
  }
177761
177867
  return 0;
177762
177868
  };
177763
- const inflate = (strm, flush2) => {
177869
+ const inflate$1 = (strm, flush2) => {
177764
177870
  let state;
177765
177871
  let input, output2;
177766
177872
  let next3;
@@ -178717,7 +178823,7 @@ var inflateReset2_1 = inflateReset2;
178717
178823
  var inflateResetKeep_1 = inflateResetKeep;
178718
178824
  var inflateInit_1 = inflateInit;
178719
178825
  var inflateInit2_1 = inflateInit2;
178720
- var inflate_2 = inflate;
178826
+ var inflate_2 = inflate$1;
178721
178827
  var inflateEnd_1 = inflateEnd;
178722
178828
  var inflateGetHeader_1 = inflateGetHeader;
178723
178829
  var inflateSetDictionary_1 = inflateSetDictionary;
@@ -178899,22 +179005,22 @@ Inflate.prototype.onEnd = function(status) {
178899
179005
  this.err = status;
178900
179006
  this.msg = this.strm.msg;
178901
179007
  };
178902
- function inflate$1(input, options) {
179008
+ function inflate$1$1(input, options) {
178903
179009
  const inflator = new Inflate(options);
178904
179010
  inflator.push(input);
178905
179011
  if (inflator.err)
178906
179012
  throw inflator.msg || messages[inflator.err];
178907
179013
  return inflator.result;
178908
179014
  }
178909
- function inflateRaw(input, options) {
179015
+ function inflateRaw$1(input, options) {
178910
179016
  options = options || {};
178911
179017
  options.raw = true;
178912
- return inflate$1(input, options);
179018
+ return inflate$1$1(input, options);
178913
179019
  }
178914
179020
  var Inflate_1 = Inflate;
178915
- var inflate_2$1 = inflate$1;
178916
- var inflateRaw_1 = inflateRaw;
178917
- var ungzip = inflate$1;
179021
+ var inflate_2$1 = inflate$1$1;
179022
+ var inflateRaw_1 = inflateRaw$1;
179023
+ var ungzip = inflate$1$1;
178918
179024
  var constants$2$1 = constants$3;
178919
179025
  var inflate_1$1 = {
178920
179026
  Inflate: Inflate_1,
@@ -178924,14 +179030,14 @@ var inflate_1$1 = {
178924
179030
  constants: constants$2$1
178925
179031
  };
178926
179032
  const { Deflate: Deflate$1, deflate: deflate$2, deflateRaw: deflateRaw$1, gzip: gzip$1 } = deflate_1$1;
178927
- const { Inflate: Inflate$1, inflate: inflate$2, inflateRaw: inflateRaw$1, ungzip: ungzip$1 } = inflate_1$1;
179033
+ const { Inflate: Inflate$1, inflate: inflate$2, inflateRaw: inflateRaw$1$1, ungzip: ungzip$1 } = inflate_1$1;
178928
179034
  var Deflate_1$1 = Deflate$1;
178929
179035
  var deflate_1$2 = deflate$2;
178930
179036
  var deflateRaw_1$1 = deflateRaw$1;
178931
179037
  var gzip_1$1 = gzip$1;
178932
179038
  var Inflate_1$1 = Inflate$1;
178933
179039
  var inflate_1$2 = inflate$2;
178934
- var inflateRaw_1$1 = inflateRaw$1;
179040
+ var inflateRaw_1$1 = inflateRaw$1$1;
178935
179041
  var ungzip_1 = ungzip$1;
178936
179042
  var constants_1 = constants$3;
178937
179043
  var pako = {
@@ -179317,7 +179423,7 @@ var blosc_codec = function() {
179317
179423
  if (h2.length !== d.length)
179318
179424
  throw new La("Mismatched type converter count");
179319
179425
  for (var l2 = 0; l2 < d.length; ++l2)
179320
- U(d[l2], h2[l2]);
179426
+ U2(d[l2], h2[l2]);
179321
179427
  }
179322
179428
  var d = [];
179323
179429
  d.forEach(function(h2) {
@@ -179333,7 +179439,7 @@ var blosc_codec = function() {
179333
179439
  });
179334
179440
  0 === g2.length && c2(e3);
179335
179441
  }
179336
- function U(a2, b2, c2) {
179442
+ function U2(a2, b2, c2) {
179337
179443
  c2 = c2 || {};
179338
179444
  if (!("argPackAdvance" in b2))
179339
179445
  throw new TypeError("registerType registeredInstance requires argPackAdvance");
@@ -179528,7 +179634,7 @@ var blosc_codec = function() {
179528
179634
  }, z: function(a2, b2, c2, d, e3) {
179529
179635
  var g2 = Fa(c2);
179530
179636
  b2 = P2(b2);
179531
- U(a2, { name: b2, fromWireType: function(k) {
179637
+ U2(a2, { name: b2, fromWireType: function(k) {
179532
179638
  return !!k;
179533
179639
  }, toWireType: function(k, h2) {
179534
179640
  return h2 ? d : e3;
@@ -179545,7 +179651,7 @@ var blosc_codec = function() {
179545
179651
  }, M: null });
179546
179652
  }, y: function(a2, b2) {
179547
179653
  b2 = P2(b2);
179548
- U(a2, { name: b2, fromWireType: function(c2) {
179654
+ U2(a2, { name: b2, fromWireType: function(c2) {
179549
179655
  var d = V[c2].value;
179550
179656
  Qa(c2);
179551
179657
  return d;
@@ -179555,7 +179661,7 @@ var blosc_codec = function() {
179555
179661
  }, h: function(a2, b2, c2) {
179556
179662
  c2 = Fa(c2);
179557
179663
  b2 = P2(b2);
179558
- U(a2, { name: b2, fromWireType: function(d) {
179664
+ U2(a2, { name: b2, fromWireType: function(d) {
179559
179665
  return d;
179560
179666
  }, toWireType: function(d, e3) {
179561
179667
  if ("number" !== typeof e3 && "boolean" !== typeof e3)
@@ -179623,7 +179729,7 @@ var blosc_codec = function() {
179623
179729
  };
179624
179730
  }
179625
179731
  var l2 = -1 != b2.indexOf("unsigned");
179626
- U(a2, { name: b2, fromWireType: g2, toWireType: function(n3, p) {
179732
+ U2(a2, { name: b2, fromWireType: g2, toWireType: function(n3, p) {
179627
179733
  if ("number" !== typeof p && "boolean" !== typeof p)
179628
179734
  throw new TypeError('Cannot convert "' + Ta(p) + '" to ' + this.name);
179629
179735
  if (p < d || p > e3)
@@ -179642,11 +179748,11 @@ var blosc_codec = function() {
179642
179748
  }
179643
179749
  var e3 = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array][b2];
179644
179750
  c2 = P2(c2);
179645
- U(a2, { name: c2, fromWireType: d, argPackAdvance: 8, readValueFromPointer: d }, { U: true });
179751
+ U2(a2, { name: c2, fromWireType: d, argPackAdvance: 8, readValueFromPointer: d }, { U: true });
179646
179752
  }, i: function(a2, b2) {
179647
179753
  b2 = P2(b2);
179648
179754
  var c2 = "std::string" === b2;
179649
- U(a2, { name: b2, fromWireType: function(d) {
179755
+ U2(a2, { name: b2, fromWireType: function(d) {
179650
179756
  var e3 = G2[d >> 2];
179651
179757
  if (c2)
179652
179758
  for (var g2 = d + 4, k = 0; k <= e3; ++k) {
@@ -179713,7 +179819,7 @@ var blosc_codec = function() {
179713
179819
  4 === b2 && (d = na, e3 = oa, g2 = pa2, k = function() {
179714
179820
  return G2;
179715
179821
  }, h2 = 2);
179716
- U(a2, { name: c2, fromWireType: function(l2) {
179822
+ U2(a2, { name: c2, fromWireType: function(l2) {
179717
179823
  for (var n3 = G2[l2 >> 2], p = k(), q, x2 = l2 + 4, B2 = 0; B2 <= n3; ++B2) {
179718
179824
  var m2 = l2 + 4 + B2 * b2;
179719
179825
  if (B2 == n3 || 0 == p[m2 >> h2])
@@ -179733,7 +179839,7 @@ var blosc_codec = function() {
179733
179839
  } });
179734
179840
  }, A: function(a2, b2) {
179735
179841
  b2 = P2(b2);
179736
- U(a2, {
179842
+ U2(a2, {
179737
179843
  aa: true,
179738
179844
  name: b2,
179739
179845
  argPackAdvance: 0,
@@ -189820,6 +189926,7 @@ function MultiLegend(props2) {
189820
189926
  spotLayerScopes,
189821
189927
  spotLayerCoordination,
189822
189928
  spotMultiExpressionExtents,
189929
+ spotMultiFeatureLabels,
189823
189930
  // Points
189824
189931
  pointLayerScopes,
189825
189932
  pointLayerCoordination
@@ -189858,26 +189965,8 @@ function MultiLegend(props2) {
189858
189965
  const firstExpressionExtent = expressionExtents?.[0];
189859
189966
  const isStaticColor = obsColorEncoding === "spatialLayerColor";
189860
189967
  const height2 = isStaticColor ? 20 : 36;
189861
- return spatialLayerVisible && legendVisible ? jsxRuntimeExports.jsx(Legend, {
189862
- positionRelative: true,
189863
- highContrast: true,
189864
- showObsLabel: true,
189865
- visible: spatialLayerVisible,
189866
- theme,
189867
- obsType,
189868
- featureType,
189869
- featureValueType,
189870
- obsColorEncoding,
189871
- spatialLayerColor,
189872
- featureSelection,
189873
- // featureLabelsMap={featureLabelsMap} // TODO
189874
- featureValueColormap,
189875
- featureValueColormapRange,
189876
- extent: firstExpressionExtent,
189877
- height: height2,
189878
- obsSetSelection,
189879
- obsSetColor
189880
- }, layerScope) : null;
189968
+ const featureLabelsMap = spotMultiFeatureLabels?.[layerScope]?.featureLabelsMap;
189969
+ return spatialLayerVisible && legendVisible ? jsxRuntimeExports.jsx(Legend, { positionRelative: true, highContrast: true, showObsLabel: true, visible: spatialLayerVisible, theme, obsType, featureType, featureValueType, obsColorEncoding, spatialLayerColor, featureSelection, featureLabelsMap, featureValueColormap, featureValueColormapRange, extent: firstExpressionExtent, height: height2, obsSetSelection, obsSetColor }, layerScope) : null;
189881
189970
  }) : null, segmentationLayerScopes ? reversedSegmentationLayerScopes.flatMap((layerScope) => {
189882
189971
  const layerCoordination = segmentationLayerCoordination[0][layerScope];
189883
189972
  const channelScopes = segmentationChannelScopesByLayer[layerScope];
@@ -190493,7 +190582,7 @@ function isFunctionNode(x2) {
190493
190582
  function isIndexNode(x2) {
190494
190583
  return x2 && x2.isIndexNode === true && x2.constructor.prototype.isNode === true || false;
190495
190584
  }
190496
- function isNode(x2) {
190585
+ function isNode$1(x2) {
190497
190586
  return x2 && x2.isNode === true && x2.constructor.prototype.isNode === true || false;
190498
190587
  }
190499
190588
  function isObjectNode(x2) {
@@ -190541,7 +190630,7 @@ function typeOf(x2) {
190541
190630
  return "Range";
190542
190631
  if (isResultSet(x2))
190543
190632
  return "ResultSet";
190544
- if (isNode(x2))
190633
+ if (isNode$1(x2))
190545
190634
  return x2.type;
190546
190635
  if (isChain(x2))
190547
190636
  return "Chain";
@@ -190643,13 +190732,13 @@ function pickShallow(object2, properties2) {
190643
190732
  }
190644
190733
  var MATRIX_OPTIONS = ["Matrix", "Array"];
190645
190734
  var NUMBER_OPTIONS = ["number", "BigNumber", "Fraction"];
190646
- var config$1 = function config(options) {
190735
+ var config$2 = function config(options) {
190647
190736
  if (options) {
190648
190737
  throw new Error("The global config is readonly. \nPlease create a mathjs instance if you want to change the default configuration. \nExample:\n\n import { create, all } from 'mathjs';\n const mathjs = create(all);\n mathjs.config({ number: 'BigNumber' });\n");
190649
190738
  }
190650
190739
  return Object.freeze(DEFAULT_CONFIG);
190651
190740
  };
190652
- _extends$a(config$1, DEFAULT_CONFIG, {
190741
+ _extends$a(config$2, DEFAULT_CONFIG, {
190653
190742
  MATRIX_OPTIONS,
190654
190743
  NUMBER_OPTIONS
190655
190744
  });
@@ -192415,7 +192504,7 @@ var createTyped = /* @__PURE__ */ factory("typed", dependencies$R, function crea
192415
192504
  },
192416
192505
  {
192417
192506
  name: "Node",
192418
- test: isNode
192507
+ test: isNode$1
192419
192508
  },
192420
192509
  {
192421
192510
  name: "ObjectNode",
@@ -194592,7 +194681,7 @@ function ceil$2(x2) {
194592
194681
  function clamp$1(x2, min2, max2) {
194593
194682
  return new this(x2).clamp(min2, max2);
194594
194683
  }
194595
- function config2(obj) {
194684
+ function config$1(obj) {
194596
194685
  if (!obj || typeof obj !== "object")
194597
194686
  throw Error(decimalError + "Object expected");
194598
194687
  var i2, p, v, useDefaults = obj.defaults === true, ps = [
@@ -194744,7 +194833,7 @@ function clone$1(obj) {
194744
194833
  Decimal2.ROUND_HALF_CEIL = 7;
194745
194834
  Decimal2.ROUND_HALF_FLOOR = 8;
194746
194835
  Decimal2.EUCLID = 9;
194747
- Decimal2.config = Decimal2.set = config2;
194836
+ Decimal2.config = Decimal2.set = config$1;
194748
194837
  Decimal2.clone = clone$1;
194749
194838
  Decimal2.isDecimal = isDecimalInstance;
194750
194839
  Decimal2.abs = abs$4;
@@ -205145,7 +205234,7 @@ var createDivide = /* @__PURE__ */ factory(name$2, dependencies$1, (_ref3) => {
205145
205234
  });
205146
205235
  var Complex = /* @__PURE__ */ createComplexClass({});
205147
205236
  var BigNumber = /* @__PURE__ */ createBigNumberClass({
205148
- config: config$1
205237
+ config: config$2
205149
205238
  });
205150
205239
  var Matrix2 = /* @__PURE__ */ createMatrixClass({});
205151
205240
  var Fraction = /* @__PURE__ */ createFractionClass({});
@@ -205162,7 +205251,7 @@ var isNumeric$1 = /* @__PURE__ */ createIsNumeric({
205162
205251
  typed
205163
205252
  });
205164
205253
  var equalScalar = /* @__PURE__ */ createEqualScalar({
205165
- config: config$1,
205254
+ config: config$2,
205166
205255
  typed
205167
205256
  });
205168
205257
  var number$9 = /* @__PURE__ */ createNumber({
@@ -205205,18 +205294,18 @@ var identity$8 = /* @__PURE__ */ createIdentity({
205205
205294
  BigNumber,
205206
205295
  DenseMatrix,
205207
205296
  SparseMatrix,
205208
- config: config$1,
205297
+ config: config$2,
205209
205298
  matrix,
205210
205299
  typed
205211
205300
  });
205212
205301
  var size$1 = /* @__PURE__ */ createSize({
205213
205302
  matrix,
205214
- config: config$1,
205303
+ config: config$2,
205215
205304
  typed
205216
205305
  });
205217
205306
  var zeros = /* @__PURE__ */ createZeros({
205218
205307
  BigNumber,
205219
- config: config$1,
205308
+ config: config$2,
205220
205309
  matrix,
205221
205310
  typed
205222
205311
  });
@@ -205232,20 +205321,20 @@ var compare$a = /* @__PURE__ */ createCompare({
205232
205321
  BigNumber,
205233
205322
  DenseMatrix,
205234
205323
  Fraction,
205235
- config: config$1,
205324
+ config: config$2,
205236
205325
  equalScalar,
205237
205326
  matrix,
205238
205327
  typed
205239
205328
  });
205240
205329
  var smaller = /* @__PURE__ */ createSmaller({
205241
205330
  DenseMatrix,
205242
- config: config$1,
205331
+ config: config$2,
205243
205332
  matrix,
205244
205333
  typed
205245
205334
  });
205246
205335
  var larger = /* @__PURE__ */ createLarger({
205247
205336
  DenseMatrix,
205248
- config: config$1,
205337
+ config: config$2,
205249
205338
  matrix,
205250
205339
  typed
205251
205340
  });
@@ -205261,7 +205350,7 @@ var dot = /* @__PURE__ */ createDot({
205261
205350
  typed
205262
205351
  });
205263
205352
  var floor$1 = /* @__PURE__ */ createFloor({
205264
- config: config$1,
205353
+ config: config$2,
205265
205354
  equalScalar,
205266
205355
  matrix,
205267
205356
  round: round$1,
@@ -205277,7 +205366,7 @@ var multiply = /* @__PURE__ */ createMultiply({
205277
205366
  });
205278
205367
  var pow$5 = /* @__PURE__ */ createPow({
205279
205368
  Complex,
205280
- config: config$1,
205369
+ config: config$2,
205281
205370
  fraction,
205282
205371
  identity: identity$8,
205283
205372
  matrix,
@@ -205309,7 +205398,7 @@ var equal$1 = /* @__PURE__ */ createEqual({
205309
205398
  typed
205310
205399
  });
205311
205400
  var ceil$1 = /* @__PURE__ */ createCeil({
205312
- config: config$1,
205401
+ config: config$2,
205313
205402
  equalScalar,
205314
205403
  matrix,
205315
205404
  round: round$1,
@@ -205379,7 +205468,7 @@ var Unit = /* @__PURE__ */ createUnitClass({
205379
205468
  Fraction,
205380
205469
  abs: abs$3,
205381
205470
  addScalar,
205382
- config: config$1,
205471
+ config: config$2,
205383
205472
  divideScalar,
205384
205473
  equal: equal$1,
205385
205474
  fix,
@@ -205837,14 +205926,14 @@ function normalizeCoordinateTransformations(coordinateTransformations, datasets)
205837
205926
  return result;
205838
205927
  }
205839
205928
  class NodeNotFoundError extends Error {
205840
- constructor(msg) {
205841
- super(msg);
205929
+ constructor(context2, options = {}) {
205930
+ super(`Node not found: ${context2}`, options);
205842
205931
  this.name = "NodeNotFoundError";
205843
205932
  }
205844
205933
  }
205845
205934
  class KeyError extends Error {
205846
- constructor(msg) {
205847
- super(msg);
205935
+ constructor(path2) {
205936
+ super(`Missing key: ${path2}`);
205848
205937
  this.name = "KeyError";
205849
205938
  }
205850
205939
  }
@@ -205955,56 +206044,56 @@ class ByteStringArray {
205955
206044
  _encoder = new WeakMap();
205956
206045
  const _UnicodeStringArray = class {
205957
206046
  constructor(chars, x2, byteOffset, length2) {
205958
- __publicField(this, "_data");
206047
+ __privateAdd(this, _data, void 0);
205959
206048
  __publicField(this, "chars");
205960
206049
  __privateAdd(this, _encode_buffer, void 0);
205961
206050
  this.chars = chars;
205962
206051
  if (typeof x2 === "number") {
205963
- this._data = new Int32Array(x2 * chars);
206052
+ __privateSet(this, _data, new Int32Array(x2 * chars));
205964
206053
  } else if (x2 instanceof ArrayBuffer) {
205965
206054
  if (length2)
205966
206055
  length2 *= chars;
205967
- this._data = new Int32Array(x2, byteOffset, length2);
206056
+ __privateSet(this, _data, new Int32Array(x2, byteOffset, length2));
205968
206057
  } else {
205969
206058
  const values3 = x2;
205970
206059
  const d = new _UnicodeStringArray(chars, 1);
205971
- this._data = new Int32Array(function* () {
206060
+ __privateSet(this, _data, new Int32Array(function* () {
205972
206061
  for (let str of values3) {
205973
206062
  d.set(0, str);
205974
- yield* d._data;
206063
+ yield* __privateGet(d, _data);
205975
206064
  }
205976
- }());
206065
+ }()));
205977
206066
  }
205978
206067
  __privateSet(this, _encode_buffer, new Int32Array(chars));
205979
206068
  }
205980
206069
  get BYTES_PER_ELEMENT() {
205981
- return this._data.BYTES_PER_ELEMENT * this.chars;
206070
+ return __privateGet(this, _data).BYTES_PER_ELEMENT * this.chars;
205982
206071
  }
205983
206072
  get byteLength() {
205984
- return this._data.byteLength;
206073
+ return __privateGet(this, _data).byteLength;
205985
206074
  }
205986
206075
  get byteOffset() {
205987
- return this._data.byteOffset;
206076
+ return __privateGet(this, _data).byteOffset;
205988
206077
  }
205989
206078
  /** @type {ArrayBuffer} */
205990
206079
  get buffer() {
205991
- return this._data.buffer;
206080
+ return __privateGet(this, _data).buffer;
205992
206081
  }
205993
206082
  /** @type {number} */
205994
206083
  get length() {
205995
- return this._data.length / this.chars;
206084
+ return __privateGet(this, _data).length / this.chars;
205996
206085
  }
205997
206086
  get(idx) {
205998
206087
  const offset6 = this.chars * idx;
205999
206088
  let result = "";
206000
206089
  for (let i2 = 0; i2 < this.chars; i2++) {
206001
- result += String.fromCodePoint(this._data[offset6 + i2]);
206090
+ result += String.fromCodePoint(__privateGet(this, _data)[offset6 + i2]);
206002
206091
  }
206003
206092
  return result.replace(/\u0000/g, "");
206004
206093
  }
206005
206094
  set(idx, value2) {
206006
206095
  const offset6 = this.chars * idx;
206007
- const view = this._data.subarray(offset6, offset6 + this.chars);
206096
+ const view = __privateGet(this, _data).subarray(offset6, offset6 + this.chars);
206008
206097
  view.fill(0);
206009
206098
  for (let i2 = 0; i2 < this.chars; i2++) {
206010
206099
  view[i2] = value2.codePointAt(i2) ?? 0;
@@ -206012,9 +206101,9 @@ const _UnicodeStringArray = class {
206012
206101
  }
206013
206102
  fill(value2) {
206014
206103
  this.set(0, value2);
206015
- let encoded = this._data.subarray(0, this.chars);
206104
+ let encoded = __privateGet(this, _data).subarray(0, this.chars);
206016
206105
  for (let i2 = 1; i2 < this.length; i2++) {
206017
- this._data.set(encoded, i2 * this.chars);
206106
+ __privateGet(this, _data).set(encoded, i2 * this.chars);
206018
206107
  }
206019
206108
  }
206020
206109
  *[Symbol.iterator]() {
@@ -206024,6 +206113,7 @@ const _UnicodeStringArray = class {
206024
206113
  }
206025
206114
  };
206026
206115
  let UnicodeStringArray = _UnicodeStringArray;
206116
+ _data = new WeakMap();
206027
206117
  _encode_buffer = new WeakMap();
206028
206118
  function json_decode_object(bytes) {
206029
206119
  const str = new TextDecoder().decode(bytes);
@@ -206388,8 +206478,115 @@ const _VLenUTF8 = class {
206388
206478
  let VLenUTF8 = _VLenUTF8;
206389
206479
  _shape2 = new WeakMap();
206390
206480
  _strides2 = new WeakMap();
206481
+ function throw_on_nan_replacer(_key, value2) {
206482
+ if (value2 !== value2) {
206483
+ throw new Error("JsonCodec allow_nan is false but NaN was encountered during encoding.");
206484
+ }
206485
+ if (value2 === Infinity) {
206486
+ throw new Error("JsonCodec allow_nan is false but Infinity was encountered during encoding.");
206487
+ }
206488
+ if (value2 === -Infinity) {
206489
+ throw new Error("JsonCodec allow_nan is false but -Infinity was encountered during encoding.");
206490
+ }
206491
+ return value2;
206492
+ }
206493
+ function sort_keys_replacer(_key, value2) {
206494
+ return value2 instanceof Object && !(value2 instanceof Array) ? Object.keys(value2).sort().reduce((sorted, key2) => {
206495
+ sorted[key2] = value2[key2];
206496
+ return sorted;
206497
+ }, {}) : value2;
206498
+ }
206499
+ const _JsonCodec = class {
206500
+ constructor(configuration) {
206501
+ __publicField(this, "configuration");
206502
+ __publicField(this, "kind", "array_to_bytes");
206503
+ __privateAdd(this, _encoder_config, void 0);
206504
+ __privateAdd(this, _decoder_config, void 0);
206505
+ this.configuration = configuration;
206506
+ const { encoding = "utf-8", skipkeys = false, ensure_ascii = true, check_circular = true, allow_nan = true, sort_keys = true, indent, strict = true } = configuration;
206507
+ let separators = configuration.separators;
206508
+ if (!separators) {
206509
+ if (!indent) {
206510
+ separators = [",", ":"];
206511
+ } else {
206512
+ separators = [", ", ": "];
206513
+ }
206514
+ }
206515
+ __privateSet(this, _encoder_config, {
206516
+ encoding,
206517
+ skipkeys,
206518
+ ensure_ascii,
206519
+ check_circular,
206520
+ allow_nan,
206521
+ indent,
206522
+ separators,
206523
+ sort_keys
206524
+ });
206525
+ __privateSet(this, _decoder_config, { strict });
206526
+ }
206527
+ static fromConfig(configuration) {
206528
+ return new _JsonCodec(configuration);
206529
+ }
206530
+ encode(buf) {
206531
+ const { indent, encoding, ensure_ascii, check_circular, allow_nan, sort_keys } = __privateGet(this, _encoder_config);
206532
+ if (encoding !== "utf-8") {
206533
+ throw new Error("JsonCodec does not yet support non-utf-8 encoding.");
206534
+ }
206535
+ const replacer_functions = [];
206536
+ if (!check_circular) {
206537
+ throw new Error("JsonCodec does not yet support skipping the check for circular references during encoding.");
206538
+ }
206539
+ if (!allow_nan) {
206540
+ replacer_functions.push(throw_on_nan_replacer);
206541
+ }
206542
+ if (sort_keys) {
206543
+ replacer_functions.push(sort_keys_replacer);
206544
+ }
206545
+ const items = Array.from(buf.data);
206546
+ items.push("|O");
206547
+ items.push(buf.shape);
206548
+ let replacer2 = void 0;
206549
+ if (replacer_functions.length) {
206550
+ replacer2 = function(key2, value2) {
206551
+ let new_value = value2;
206552
+ replacer_functions.forEach((sub_replacer) => {
206553
+ new_value = sub_replacer(key2, new_value);
206554
+ });
206555
+ return new_value;
206556
+ };
206557
+ }
206558
+ let json_str = JSON.stringify(items, replacer2, indent);
206559
+ if (ensure_ascii) {
206560
+ json_str = json_str.replace(/[\u007F-\uFFFF]/g, function(chr) {
206561
+ const full_str = "0000" + chr.charCodeAt(0).toString(16);
206562
+ const sub_str = full_str.substring(full_str.length - 4);
206563
+ return "\\u" + sub_str;
206564
+ });
206565
+ }
206566
+ return new TextEncoder().encode(json_str);
206567
+ }
206568
+ decode(bytes) {
206569
+ const { strict } = __privateGet(this, _decoder_config);
206570
+ if (!strict) {
206571
+ throw new Error("JsonCodec does not yet support non-strict decoding.");
206572
+ }
206573
+ const items = json_decode_object(bytes);
206574
+ const shape2 = items.pop();
206575
+ items.pop();
206576
+ if (!shape2) {
206577
+ throw new Error("0D not implemented for JsonCodec.");
206578
+ } else {
206579
+ const stride = get_strides(shape2, "C");
206580
+ const data2 = items;
206581
+ return { data: data2, shape: shape2, stride };
206582
+ }
206583
+ }
206584
+ };
206585
+ let JsonCodec = _JsonCodec;
206586
+ _encoder_config = new WeakMap();
206587
+ _decoder_config = new WeakMap();
206391
206588
  function create_default_registry() {
206392
- return (/* @__PURE__ */ new Map()).set("blosc", () => import("./blosc-0acfcf7e.js").then((m2) => m2.default)).set("gzip", () => import("./gzip-dd5ab7c8.js").then((m2) => m2.default)).set("lz4", () => import("./lz4-abb4416a.js").then((m2) => m2.default)).set("zlib", () => import("./zlib-cd823c38.js").then((m2) => m2.default)).set("zstd", () => import("./zstd-4072ca78.js").then((m2) => m2.default)).set("transpose", () => TransposeCodec).set("bytes", () => BytesCodec).set("crc32c", () => Crc32cCodec).set("vlen-utf8", () => VLenUTF8);
206589
+ return (/* @__PURE__ */ new Map()).set("blosc", () => import("./blosc-039d2f27.js").then((m2) => m2.default)).set("gzip", () => import("./gzip-6a24f0fe.js").then((m2) => m2.default)).set("lz4", () => import("./lz4-e899c949.js").then((m2) => m2.default)).set("zlib", () => import("./zlib-175cd38d.js").then((m2) => m2.default)).set("zstd", () => import("./zstd-9aabb3ce.js").then((m2) => m2.default)).set("transpose", () => TransposeCodec).set("bytes", () => BytesCodec).set("crc32c", () => Crc32cCodec).set("vlen-utf8", () => VLenUTF8).set("json2", () => JsonCodec);
206393
206590
  }
206394
206591
  const registry = create_default_registry();
206395
206592
  function create_codec_pipeline(chunk_metadata) {
@@ -206633,6 +206830,7 @@ let Array$1 = (_c = class extends Location {
206633
206830
  return is_dtype(this.dtype, query);
206634
206831
  }
206635
206832
  }, _b = CONTEXT_MARKER, _metadata2 = new WeakMap(), _c);
206833
+ let VERSION_COUNTER = create_version_counter();
206636
206834
  function create_version_counter() {
206637
206835
  let version_counts = /* @__PURE__ */ new WeakMap();
206638
206836
  function get_counts(store2) {
@@ -206650,7 +206848,6 @@ function create_version_counter() {
206650
206848
  }
206651
206849
  };
206652
206850
  }
206653
- let VERSION_COUNTER = create_version_counter();
206654
206851
  async function load_attrs(location) {
206655
206852
  let meta_bytes = await location.store.get(location.resolve(".zattrs").path);
206656
206853
  if (!meta_bytes)
@@ -206676,7 +206873,9 @@ async function open_array_v2(location, attrs) {
206676
206873
  let { path: path2 } = location.resolve(".zarray");
206677
206874
  let meta2 = await location.store.get(path2);
206678
206875
  if (!meta2) {
206679
- throw new NodeNotFoundError(path2);
206876
+ throw new NodeNotFoundError("v2 array", {
206877
+ cause: new KeyError(path2)
206878
+ });
206680
206879
  }
206681
206880
  VERSION_COUNTER.increment(location.store, "v2");
206682
206881
  return new Array$1(location.store, location.path, v2_to_v3_array_metadata(json_decode_object(meta2), attrs));
@@ -206685,7 +206884,9 @@ async function open_group_v2(location, attrs) {
206685
206884
  let { path: path2 } = location.resolve(".zgroup");
206686
206885
  let meta2 = await location.store.get(path2);
206687
206886
  if (!meta2) {
206688
- throw new NodeNotFoundError(path2);
206887
+ throw new NodeNotFoundError("v2 group", {
206888
+ cause: new KeyError(path2)
206889
+ });
206689
206890
  }
206690
206891
  VERSION_COUNTER.increment(location.store, "v2");
206691
206892
  return new Group$1(location.store, location.path, v2_to_v3_group_metadata(json_decode_object(meta2), attrs));
@@ -206694,7 +206895,9 @@ async function _open_v3(location) {
206694
206895
  let { store: store2, path: path2 } = location.resolve("zarr.json");
206695
206896
  let meta2 = await location.store.get(path2);
206696
206897
  if (!meta2) {
206697
- throw new NodeNotFoundError(path2);
206898
+ throw new NodeNotFoundError("v3 array or group", {
206899
+ cause: new KeyError(path2)
206900
+ });
206698
206901
  }
206699
206902
  let meta_doc = json_decode_object(meta2);
206700
206903
  if (meta_doc.node_type === "array" && (meta_doc.data_type === "uint64" || meta_doc.data_type === "int64") && meta_doc.fill_value != void 0) {
@@ -206716,8 +206919,8 @@ async function open_v3(location, options = {}) {
206716
206919
  throw new Error(`Expected node of kind ${options.kind}, found ${kind}.`);
206717
206920
  }
206718
206921
  async function open(location, options = {}) {
206719
- const store2 = "store" in location ? location.store : location;
206720
- const version_max = VERSION_COUNTER.version_max(store2);
206922
+ let store2 = "store" in location ? location.store : location;
206923
+ let version_max = VERSION_COUNTER.version_max(store2);
206721
206924
  let open_primary = version_max === "v2" ? open.v2 : open.v3;
206722
206925
  let open_secondary = version_max === "v2" ? open.v3 : open.v2;
206723
206926
  return open_primary(location, options).catch((err2) => {
@@ -206761,7 +206964,7 @@ function* product(...iterables) {
206761
206964
  results[i2] = iterators[i2].next();
206762
206965
  }
206763
206966
  }
206764
- function slice_indices(start, stop3, step2, length2) {
206967
+ function slice_indices({ start, stop: stop3, step: step2 }, length2) {
206765
206968
  if (step2 === 0) {
206766
206969
  throw new Error("slice step cannot be zero");
206767
206970
  }
@@ -206802,10 +207005,7 @@ function slice$4(start, stop3, step2 = null) {
206802
207005
  return {
206803
207006
  start,
206804
207007
  stop: stop3,
206805
- step: step2,
206806
- indices(length2) {
206807
- return slice_indices(this.start, this.stop, this.step, length2);
206808
- }
207008
+ step: step2
206809
207009
  };
206810
207010
  }
206811
207011
  function create_queue() {
@@ -206873,7 +207073,7 @@ class SliceDimIndexer {
206873
207073
  __publicField(this, "dim_chunk_len");
206874
207074
  __publicField(this, "nitems");
206875
207075
  __publicField(this, "nchunks");
206876
- const [start, stop3, step2] = dim_sel.indices(dim_len);
207076
+ const [start, stop3, step2] = slice_indices(dim_sel, dim_len);
206877
207077
  this.start = start;
206878
207078
  this.stop = stop3;
206879
207079
  this.step = step2;
@@ -206958,25 +207158,20 @@ function unwrap(arr, idx) {
206958
207158
  return "get" in arr ? arr.get(idx) : arr[idx];
206959
207159
  }
206960
207160
  async function get$7(arr, selection, opts2, setter2) {
206961
- const context2 = get_context(arr);
206962
- const indexer = new BasicIndexer({
207161
+ let context2 = get_context(arr);
207162
+ let indexer = new BasicIndexer({
206963
207163
  selection,
206964
207164
  shape: arr.shape,
206965
207165
  chunk_shape: arr.chunks
206966
207166
  });
206967
- const out = setter2.prepare(new context2.TypedArray(indexer.shape.reduce((a2, b2) => a2 * b2, 1)), indexer.shape, context2.get_strides(indexer.shape, opts2.order));
206968
- const queue = opts2.create_queue?.() ?? create_queue();
207167
+ let out = setter2.prepare(new context2.TypedArray(indexer.shape.reduce((a2, b2) => a2 * b2, 1)), indexer.shape, context2.get_strides(indexer.shape, opts2.order));
207168
+ let queue = opts2.create_queue?.() ?? create_queue();
206969
207169
  for (const { chunk_coords, mapping } of indexer) {
206970
- queue.add(() => arr.getChunk(chunk_coords, opts2.opts).then(({ data: data2, shape: shape2, stride }) => {
206971
- const chunk = setter2.prepare(data2, shape2, stride);
207170
+ queue.add(async () => {
207171
+ let { data: data2, shape: shape2, stride } = await arr.getChunk(chunk_coords, opts2.opts);
207172
+ let chunk = setter2.prepare(data2, shape2, stride);
206972
207173
  setter2.set_from_chunk(out, chunk, mapping);
206973
- }).catch((err2) => {
206974
- if (!(err2 instanceof KeyError))
206975
- throw err2;
206976
- if (context2.fill_value) {
206977
- setter2.set_scalar(out, mapping.map((m2) => m2.to).filter((s2) => s2 !== null), context2.fill_value);
206978
- }
206979
- }));
207174
+ });
206980
207175
  }
206981
207176
  await queue.onIdle();
206982
207177
  return indexer.shape.length === 0 ? unwrap(out.data, 0) : out;
@@ -207129,6 +207324,9 @@ function set_from_chunk_binary(dest, src2, bytes_per_element2, projections2) {
207129
207324
  }, bytes_per_element2, projs);
207130
207325
  }
207131
207326
  }
207327
+ function strip_prefix(path2) {
207328
+ return path2.slice(1);
207329
+ }
207132
207330
  function fetch_range(url, offset6, length2, opts2 = {}) {
207133
207331
  if (offset6 !== void 0 && length2 !== void 0) {
207134
207332
  opts2 = {
@@ -207141,6 +207339,16 @@ function fetch_range(url, offset6, length2, opts2 = {}) {
207141
207339
  }
207142
207340
  return fetch(url, opts2);
207143
207341
  }
207342
+ function merge_init(storeOverrides, requestOverrides) {
207343
+ return {
207344
+ ...storeOverrides,
207345
+ ...requestOverrides,
207346
+ headers: {
207347
+ ...storeOverrides.headers,
207348
+ ...requestOverrides.headers
207349
+ }
207350
+ };
207351
+ }
207144
207352
  function resolve$1(root2, path2) {
207145
207353
  const base2 = typeof root2 === "string" ? new URL(root2) : root2;
207146
207354
  if (!base2.pathname.endsWith("/")) {
@@ -207205,14 +207413,7 @@ _overrides = new WeakMap();
207205
207413
  _use_suffix_request = new WeakMap();
207206
207414
  _merge_init = new WeakSet();
207207
207415
  merge_init_fn = function(overrides) {
207208
- return {
207209
- ...__privateGet(this, _overrides),
207210
- ...overrides,
207211
- headers: {
207212
- ...__privateGet(this, _overrides).headers,
207213
- ...overrides.headers
207214
- }
207215
- };
207416
+ return merge_init(__privateGet(this, _overrides), overrides);
207216
207417
  };
207217
207418
  const FetchStore$1 = FetchStore;
207218
207419
  function getV2DataType(dtype) {
@@ -207254,8 +207455,896 @@ function createZarrArrayAdapter(arr) {
207254
207455
  }
207255
207456
  });
207256
207457
  }
207257
- function zarrOpenRoot(url, requestInit2) {
207258
- const store2 = new FetchStore$1(url, { overrides: requestInit2 });
207458
+ function readBlobAsArrayBuffer(blob) {
207459
+ if (blob.arrayBuffer) {
207460
+ return blob.arrayBuffer();
207461
+ }
207462
+ return new Promise((resolve2, reject) => {
207463
+ const reader = new FileReader();
207464
+ reader.addEventListener("loadend", () => {
207465
+ resolve2(reader.result);
207466
+ });
207467
+ reader.addEventListener("error", reject);
207468
+ reader.readAsArrayBuffer(blob);
207469
+ });
207470
+ }
207471
+ async function readBlobAsUint8Array(blob) {
207472
+ const arrayBuffer2 = await readBlobAsArrayBuffer(blob);
207473
+ return new Uint8Array(arrayBuffer2);
207474
+ }
207475
+ function isBlob(v) {
207476
+ return typeof Blob !== "undefined" && v instanceof Blob;
207477
+ }
207478
+ function isSharedArrayBuffer(b2) {
207479
+ return typeof SharedArrayBuffer !== "undefined" && b2 instanceof SharedArrayBuffer;
207480
+ }
207481
+ const isNode = typeof process !== "undefined" && process.versions && typeof process.versions.node !== "undefined" && typeof process.versions.electron === "undefined";
207482
+ function isTypedArraySameAsArrayBuffer(typedArray) {
207483
+ return typedArray.byteOffset === 0 && typedArray.byteLength === typedArray.buffer.byteLength;
207484
+ }
207485
+ class ArrayBufferReader {
207486
+ constructor(arrayBufferOrView) {
207487
+ this.typedArray = arrayBufferOrView instanceof ArrayBuffer || isSharedArrayBuffer(arrayBufferOrView) ? new Uint8Array(arrayBufferOrView) : new Uint8Array(arrayBufferOrView.buffer, arrayBufferOrView.byteOffset, arrayBufferOrView.byteLength);
207488
+ }
207489
+ async getLength() {
207490
+ return this.typedArray.byteLength;
207491
+ }
207492
+ async read(offset6, length2) {
207493
+ return new Uint8Array(this.typedArray.buffer, this.typedArray.byteOffset + offset6, length2);
207494
+ }
207495
+ }
207496
+ let BlobReader$1 = class BlobReader {
207497
+ constructor(blob) {
207498
+ this.blob = blob;
207499
+ }
207500
+ async getLength() {
207501
+ return this.blob.size;
207502
+ }
207503
+ async read(offset6, length2) {
207504
+ const blob = this.blob.slice(offset6, offset6 + length2);
207505
+ const arrayBuffer2 = await readBlobAsArrayBuffer(blob);
207506
+ return new Uint8Array(arrayBuffer2);
207507
+ }
207508
+ async sliceAsBlob(offset6, length2, type3 = "") {
207509
+ return this.blob.slice(offset6, offset6 + length2, type3);
207510
+ }
207511
+ };
207512
+ function inflate(data2, buf) {
207513
+ var u8 = Uint8Array;
207514
+ if (data2[0] == 3 && data2[1] == 0)
207515
+ return buf ? buf : new u8(0);
207516
+ var bitsF = _bitsF, bitsE = _bitsE, decodeTiny = _decodeTiny, get17 = _get17;
207517
+ var noBuf = buf == null;
207518
+ if (noBuf)
207519
+ buf = new u8(data2.length >>> 2 << 3);
207520
+ var BFINAL = 0, BTYPE = 0, HLIT = 0, HDIST = 0, HCLEN = 0, ML = 0, MD = 0;
207521
+ var off = 0, pos = 0;
207522
+ var lmap, dmap;
207523
+ while (BFINAL == 0) {
207524
+ BFINAL = bitsF(data2, pos, 1);
207525
+ BTYPE = bitsF(data2, pos + 1, 2);
207526
+ pos += 3;
207527
+ if (BTYPE == 0) {
207528
+ if ((pos & 7) != 0)
207529
+ pos += 8 - (pos & 7);
207530
+ var p8 = (pos >>> 3) + 4, len2 = data2[p8 - 4] | data2[p8 - 3] << 8;
207531
+ if (noBuf)
207532
+ buf = _check(buf, off + len2);
207533
+ buf.set(new u8(data2.buffer, data2.byteOffset + p8, len2), off);
207534
+ pos = p8 + len2 << 3;
207535
+ off += len2;
207536
+ continue;
207537
+ }
207538
+ if (noBuf)
207539
+ buf = _check(buf, off + (1 << 17));
207540
+ if (BTYPE == 1) {
207541
+ lmap = U.flmap;
207542
+ dmap = U.fdmap;
207543
+ ML = (1 << 9) - 1;
207544
+ MD = (1 << 5) - 1;
207545
+ }
207546
+ if (BTYPE == 2) {
207547
+ HLIT = bitsE(data2, pos, 5) + 257;
207548
+ HDIST = bitsE(data2, pos + 5, 5) + 1;
207549
+ HCLEN = bitsE(data2, pos + 10, 4) + 4;
207550
+ pos += 14;
207551
+ for (var i2 = 0; i2 < 38; i2 += 2) {
207552
+ U.itree[i2] = 0;
207553
+ U.itree[i2 + 1] = 0;
207554
+ }
207555
+ var tl2 = 1;
207556
+ for (var i2 = 0; i2 < HCLEN; i2++) {
207557
+ var l2 = bitsE(data2, pos + i2 * 3, 3);
207558
+ U.itree[(U.ordr[i2] << 1) + 1] = l2;
207559
+ if (l2 > tl2)
207560
+ tl2 = l2;
207561
+ }
207562
+ pos += 3 * HCLEN;
207563
+ makeCodes(U.itree, tl2);
207564
+ codes2map(U.itree, tl2, U.imap);
207565
+ lmap = U.lmap;
207566
+ dmap = U.dmap;
207567
+ pos = decodeTiny(U.imap, (1 << tl2) - 1, HLIT + HDIST, data2, pos, U.ttree);
207568
+ var mx0 = _copyOut(U.ttree, 0, HLIT, U.ltree);
207569
+ ML = (1 << mx0) - 1;
207570
+ var mx1 = _copyOut(U.ttree, HLIT, HDIST, U.dtree);
207571
+ MD = (1 << mx1) - 1;
207572
+ makeCodes(U.ltree, mx0);
207573
+ codes2map(U.ltree, mx0, lmap);
207574
+ makeCodes(U.dtree, mx1);
207575
+ codes2map(U.dtree, mx1, dmap);
207576
+ }
207577
+ while (true) {
207578
+ var code = lmap[get17(data2, pos) & ML];
207579
+ pos += code & 15;
207580
+ var lit = code >>> 4;
207581
+ if (lit >>> 8 == 0) {
207582
+ buf[off++] = lit;
207583
+ } else if (lit == 256) {
207584
+ break;
207585
+ } else {
207586
+ var end = off + lit - 254;
207587
+ if (lit > 264) {
207588
+ var ebs = U.ldef[lit - 257];
207589
+ end = off + (ebs >>> 3) + bitsE(data2, pos, ebs & 7);
207590
+ pos += ebs & 7;
207591
+ }
207592
+ var dcode = dmap[get17(data2, pos) & MD];
207593
+ pos += dcode & 15;
207594
+ var dlit = dcode >>> 4;
207595
+ var dbs = U.ddef[dlit], dst = (dbs >>> 4) + bitsF(data2, pos, dbs & 15);
207596
+ pos += dbs & 15;
207597
+ if (noBuf)
207598
+ buf = _check(buf, off + (1 << 17));
207599
+ while (off < end) {
207600
+ buf[off] = buf[off++ - dst];
207601
+ buf[off] = buf[off++ - dst];
207602
+ buf[off] = buf[off++ - dst];
207603
+ buf[off] = buf[off++ - dst];
207604
+ }
207605
+ off = end;
207606
+ }
207607
+ }
207608
+ }
207609
+ return buf.length == off ? buf : buf.slice(0, off);
207610
+ }
207611
+ function _check(buf, len2) {
207612
+ var bl2 = buf.length;
207613
+ if (len2 <= bl2)
207614
+ return buf;
207615
+ var nbuf = new Uint8Array(Math.max(bl2 << 1, len2));
207616
+ nbuf.set(buf, 0);
207617
+ return nbuf;
207618
+ }
207619
+ function _decodeTiny(lmap, LL, len2, data2, pos, tree2) {
207620
+ var bitsE = _bitsE, get17 = _get17;
207621
+ var i2 = 0;
207622
+ while (i2 < len2) {
207623
+ var code = lmap[get17(data2, pos) & LL];
207624
+ pos += code & 15;
207625
+ var lit = code >>> 4;
207626
+ if (lit <= 15) {
207627
+ tree2[i2] = lit;
207628
+ i2++;
207629
+ } else {
207630
+ var ll = 0, n3 = 0;
207631
+ if (lit == 16) {
207632
+ n3 = 3 + bitsE(data2, pos, 2);
207633
+ pos += 2;
207634
+ ll = tree2[i2 - 1];
207635
+ } else if (lit == 17) {
207636
+ n3 = 3 + bitsE(data2, pos, 3);
207637
+ pos += 3;
207638
+ } else if (lit == 18) {
207639
+ n3 = 11 + bitsE(data2, pos, 7);
207640
+ pos += 7;
207641
+ }
207642
+ var ni = i2 + n3;
207643
+ while (i2 < ni) {
207644
+ tree2[i2] = ll;
207645
+ i2++;
207646
+ }
207647
+ }
207648
+ }
207649
+ return pos;
207650
+ }
207651
+ function _copyOut(src2, off, len2, tree2) {
207652
+ var mx = 0, i2 = 0, tl2 = tree2.length >>> 1;
207653
+ while (i2 < len2) {
207654
+ var v = src2[i2 + off];
207655
+ tree2[i2 << 1] = 0;
207656
+ tree2[(i2 << 1) + 1] = v;
207657
+ if (v > mx)
207658
+ mx = v;
207659
+ i2++;
207660
+ }
207661
+ while (i2 < tl2) {
207662
+ tree2[i2 << 1] = 0;
207663
+ tree2[(i2 << 1) + 1] = 0;
207664
+ i2++;
207665
+ }
207666
+ return mx;
207667
+ }
207668
+ function makeCodes(tree2, MAX_BITS2) {
207669
+ var max_code = tree2.length;
207670
+ var code, bits, n3, i2, len2;
207671
+ var bl_count = U.bl_count;
207672
+ for (var i2 = 0; i2 <= MAX_BITS2; i2++)
207673
+ bl_count[i2] = 0;
207674
+ for (i2 = 1; i2 < max_code; i2 += 2)
207675
+ bl_count[tree2[i2]]++;
207676
+ var next_code = U.next_code;
207677
+ code = 0;
207678
+ bl_count[0] = 0;
207679
+ for (bits = 1; bits <= MAX_BITS2; bits++) {
207680
+ code = code + bl_count[bits - 1] << 1;
207681
+ next_code[bits] = code;
207682
+ }
207683
+ for (n3 = 0; n3 < max_code; n3 += 2) {
207684
+ len2 = tree2[n3 + 1];
207685
+ if (len2 != 0) {
207686
+ tree2[n3] = next_code[len2];
207687
+ next_code[len2]++;
207688
+ }
207689
+ }
207690
+ }
207691
+ function codes2map(tree2, MAX_BITS2, map2) {
207692
+ var max_code = tree2.length;
207693
+ var r15 = U.rev15;
207694
+ for (var i2 = 0; i2 < max_code; i2 += 2)
207695
+ if (tree2[i2 + 1] != 0) {
207696
+ var lit = i2 >> 1;
207697
+ var cl = tree2[i2 + 1], val = lit << 4 | cl;
207698
+ var rest = MAX_BITS2 - cl, i0 = tree2[i2] << rest, i1 = i0 + (1 << rest);
207699
+ while (i0 != i1) {
207700
+ var p02 = r15[i0] >>> 15 - MAX_BITS2;
207701
+ map2[p02] = val;
207702
+ i0++;
207703
+ }
207704
+ }
207705
+ }
207706
+ function revCodes(tree2, MAX_BITS2) {
207707
+ var r15 = U.rev15, imb = 15 - MAX_BITS2;
207708
+ for (var i2 = 0; i2 < tree2.length; i2 += 2) {
207709
+ var i0 = tree2[i2] << MAX_BITS2 - tree2[i2 + 1];
207710
+ tree2[i2] = r15[i0] >>> imb;
207711
+ }
207712
+ }
207713
+ function _bitsE(dt, pos, length2) {
207714
+ return (dt[pos >>> 3] | dt[(pos >>> 3) + 1] << 8) >>> (pos & 7) & (1 << length2) - 1;
207715
+ }
207716
+ function _bitsF(dt, pos, length2) {
207717
+ return (dt[pos >>> 3] | dt[(pos >>> 3) + 1] << 8 | dt[(pos >>> 3) + 2] << 16) >>> (pos & 7) & (1 << length2) - 1;
207718
+ }
207719
+ function _get17(dt, pos) {
207720
+ return (dt[pos >>> 3] | dt[(pos >>> 3) + 1] << 8 | dt[(pos >>> 3) + 2] << 16) >>> (pos & 7);
207721
+ }
207722
+ const U = function() {
207723
+ var u16 = Uint16Array, u32 = Uint32Array;
207724
+ return {
207725
+ next_code: new u16(16),
207726
+ bl_count: new u16(16),
207727
+ ordr: [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15],
207728
+ of0: [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 999, 999, 999],
207729
+ exb: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0],
207730
+ ldef: new u16(32),
207731
+ df0: [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 65535, 65535],
207732
+ dxb: [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0],
207733
+ ddef: new u32(32),
207734
+ flmap: new u16(512),
207735
+ fltree: [],
207736
+ fdmap: new u16(32),
207737
+ fdtree: [],
207738
+ lmap: new u16(32768),
207739
+ ltree: [],
207740
+ ttree: [],
207741
+ dmap: new u16(32768),
207742
+ dtree: [],
207743
+ imap: new u16(512),
207744
+ itree: [],
207745
+ //rev9 : new u16( 512)
207746
+ rev15: new u16(1 << 15),
207747
+ lhst: new u32(286),
207748
+ dhst: new u32(30),
207749
+ ihst: new u32(19),
207750
+ lits: new u32(15e3),
207751
+ strt: new u16(1 << 16),
207752
+ prev: new u16(1 << 15)
207753
+ };
207754
+ }();
207755
+ (function() {
207756
+ var len2 = 1 << 15;
207757
+ for (var i2 = 0; i2 < len2; i2++) {
207758
+ var x2 = i2;
207759
+ x2 = (x2 & 2863311530) >>> 1 | (x2 & 1431655765) << 1;
207760
+ x2 = (x2 & 3435973836) >>> 2 | (x2 & 858993459) << 2;
207761
+ x2 = (x2 & 4042322160) >>> 4 | (x2 & 252645135) << 4;
207762
+ x2 = (x2 & 4278255360) >>> 8 | (x2 & 16711935) << 8;
207763
+ U.rev15[i2] = (x2 >>> 16 | x2 << 16) >>> 17;
207764
+ }
207765
+ function pushV(tgt, n3, sv) {
207766
+ while (n3-- != 0)
207767
+ tgt.push(0, sv);
207768
+ }
207769
+ for (var i2 = 0; i2 < 32; i2++) {
207770
+ U.ldef[i2] = U.of0[i2] << 3 | U.exb[i2];
207771
+ U.ddef[i2] = U.df0[i2] << 4 | U.dxb[i2];
207772
+ }
207773
+ pushV(U.fltree, 144, 8);
207774
+ pushV(U.fltree, 255 - 143, 9);
207775
+ pushV(U.fltree, 279 - 255, 7);
207776
+ pushV(U.fltree, 287 - 279, 8);
207777
+ makeCodes(U.fltree, 9);
207778
+ codes2map(U.fltree, 9, U.flmap);
207779
+ revCodes(U.fltree, 9);
207780
+ pushV(U.fdtree, 32, 5);
207781
+ makeCodes(U.fdtree, 5);
207782
+ codes2map(U.fdtree, 5, U.fdmap);
207783
+ revCodes(U.fdtree, 5);
207784
+ pushV(U.itree, 19, 0);
207785
+ pushV(U.ltree, 286, 0);
207786
+ pushV(U.dtree, 30, 0);
207787
+ pushV(U.ttree, 320, 0);
207788
+ })();
207789
+ const crc = {
207790
+ table: function() {
207791
+ var tab = new Uint32Array(256);
207792
+ for (var n3 = 0; n3 < 256; n3++) {
207793
+ var c2 = n3;
207794
+ for (var k = 0; k < 8; k++) {
207795
+ if (c2 & 1)
207796
+ c2 = 3988292384 ^ c2 >>> 1;
207797
+ else
207798
+ c2 = c2 >>> 1;
207799
+ }
207800
+ tab[n3] = c2;
207801
+ }
207802
+ return tab;
207803
+ }(),
207804
+ update: function(c2, buf, off, len2) {
207805
+ for (var i2 = 0; i2 < len2; i2++)
207806
+ c2 = crc.table[(c2 ^ buf[off + i2]) & 255] ^ c2 >>> 8;
207807
+ return c2;
207808
+ },
207809
+ crc: function(b2, o2, l2) {
207810
+ return crc.update(4294967295, b2, o2, l2) ^ 4294967295;
207811
+ }
207812
+ };
207813
+ function inflateRaw(file, buf) {
207814
+ return inflate(file, buf);
207815
+ }
207816
+ const config2 = {
207817
+ numWorkers: 1,
207818
+ workerURL: "",
207819
+ useWorkers: false
207820
+ };
207821
+ let nextId = 0;
207822
+ const waitingForWorkerQueue = [];
207823
+ function startWorker(url) {
207824
+ return new Promise((resolve2, reject) => {
207825
+ const worker = new Worker(url);
207826
+ worker.onmessage = (e3) => {
207827
+ if (e3.data === "start") {
207828
+ worker.onerror = void 0;
207829
+ worker.onmessage = void 0;
207830
+ resolve2(worker);
207831
+ } else {
207832
+ reject(new Error(`unexpected message: ${e3.data}`));
207833
+ }
207834
+ };
207835
+ worker.onerror = reject;
207836
+ });
207837
+ }
207838
+ function dynamicRequire(mod2, request2) {
207839
+ return mod2.require ? mod2.require(request2) : {};
207840
+ }
207841
+ (function() {
207842
+ if (isNode) {
207843
+ const { Worker: Worker3 } = dynamicRequire(module, "worker_threads");
207844
+ return {
207845
+ async createWorker(url) {
207846
+ return new Worker3(url);
207847
+ },
207848
+ addEventListener(worker, fn) {
207849
+ worker.on("message", (data2) => {
207850
+ fn({ target: worker, data: data2 });
207851
+ });
207852
+ },
207853
+ async terminate(worker) {
207854
+ await worker.terminate();
207855
+ }
207856
+ };
207857
+ } else {
207858
+ return {
207859
+ async createWorker(url) {
207860
+ try {
207861
+ const worker = await startWorker(url);
207862
+ return worker;
207863
+ } catch (e3) {
207864
+ console.warn("could not load worker:", url);
207865
+ }
207866
+ let text2;
207867
+ try {
207868
+ const req = await fetch(url, { mode: "cors" });
207869
+ if (!req.ok) {
207870
+ throw new Error(`could not load: ${url}`);
207871
+ }
207872
+ text2 = await req.text();
207873
+ url = URL.createObjectURL(new Blob([text2], { type: "application/javascript" }));
207874
+ const worker = await startWorker(url);
207875
+ config2.workerURL = url;
207876
+ return worker;
207877
+ } catch (e3) {
207878
+ console.warn("could not load worker via fetch:", url);
207879
+ }
207880
+ if (text2 !== void 0) {
207881
+ try {
207882
+ url = `data:application/javascript;base64,${btoa(text2)}`;
207883
+ const worker = await startWorker(url);
207884
+ config2.workerURL = url;
207885
+ return worker;
207886
+ } catch (e3) {
207887
+ console.warn("could not load worker via dataURI");
207888
+ }
207889
+ }
207890
+ console.warn("workers will not be used");
207891
+ throw new Error("can not start workers");
207892
+ },
207893
+ addEventListener(worker, fn) {
207894
+ worker.addEventListener("message", fn);
207895
+ },
207896
+ async terminate(worker) {
207897
+ worker.terminate();
207898
+ }
207899
+ };
207900
+ }
207901
+ })();
207902
+ function inflateRawLocal(src2, uncompressedSize, type3, resolve2) {
207903
+ const dst = new Uint8Array(uncompressedSize);
207904
+ inflateRaw(src2, dst);
207905
+ resolve2(type3 ? new Blob([dst], { type: type3 }) : dst.buffer);
207906
+ }
207907
+ async function processWaitingForWorkerQueue() {
207908
+ if (waitingForWorkerQueue.length === 0) {
207909
+ return;
207910
+ }
207911
+ while (waitingForWorkerQueue.length) {
207912
+ const { src: src2, uncompressedSize, type: type3, resolve: resolve2 } = waitingForWorkerQueue.shift();
207913
+ let data2 = src2;
207914
+ if (isBlob(src2)) {
207915
+ data2 = await readBlobAsUint8Array(src2);
207916
+ }
207917
+ inflateRawLocal(data2, uncompressedSize, type3, resolve2);
207918
+ }
207919
+ }
207920
+ function inflateRawAsync(src2, uncompressedSize, type3) {
207921
+ return new Promise((resolve2, reject) => {
207922
+ waitingForWorkerQueue.push({ src: src2, uncompressedSize, type: type3, resolve: resolve2, reject, id: nextId++ });
207923
+ processWaitingForWorkerQueue();
207924
+ });
207925
+ }
207926
+ function dosDateTimeToDate(date2, time2) {
207927
+ const day2 = date2 & 31;
207928
+ const month2 = (date2 >> 5 & 15) - 1;
207929
+ const year2 = (date2 >> 9 & 127) + 1980;
207930
+ const millisecond2 = 0;
207931
+ const second2 = (time2 & 31) * 2;
207932
+ const minute2 = time2 >> 5 & 63;
207933
+ const hour2 = time2 >> 11 & 31;
207934
+ return new Date(year2, month2, day2, hour2, minute2, second2, millisecond2);
207935
+ }
207936
+ class ZipEntry {
207937
+ constructor(reader, rawEntry) {
207938
+ this._reader = reader;
207939
+ this._rawEntry = rawEntry;
207940
+ this.name = rawEntry.name;
207941
+ this.nameBytes = rawEntry.nameBytes;
207942
+ this.size = rawEntry.uncompressedSize;
207943
+ this.compressedSize = rawEntry.compressedSize;
207944
+ this.comment = rawEntry.comment;
207945
+ this.commentBytes = rawEntry.commentBytes;
207946
+ this.compressionMethod = rawEntry.compressionMethod;
207947
+ this.lastModDate = dosDateTimeToDate(rawEntry.lastModFileDate, rawEntry.lastModFileTime);
207948
+ this.isDirectory = rawEntry.uncompressedSize === 0 && rawEntry.name.endsWith("/");
207949
+ this.encrypted = !!(rawEntry.generalPurposeBitFlag & 1);
207950
+ this.externalFileAttributes = rawEntry.externalFileAttributes;
207951
+ this.versionMadeBy = rawEntry.versionMadeBy;
207952
+ }
207953
+ // returns a promise that returns a Blob for this entry
207954
+ async blob(type3 = "application/octet-stream") {
207955
+ return await readEntryDataAsBlob(this._reader, this._rawEntry, type3);
207956
+ }
207957
+ // returns a promise that returns an ArrayBuffer for this entry
207958
+ async arrayBuffer() {
207959
+ return await readEntryDataAsArrayBuffer(this._reader, this._rawEntry);
207960
+ }
207961
+ // returns text, assumes the text is valid utf8. If you want more options decode arrayBuffer yourself
207962
+ async text() {
207963
+ const buffer2 = await this.arrayBuffer();
207964
+ return decodeBuffer(new Uint8Array(buffer2));
207965
+ }
207966
+ // returns text with JSON.parse called on it. If you want more options decode arrayBuffer yourself
207967
+ async json() {
207968
+ const text2 = await this.text();
207969
+ return JSON.parse(text2);
207970
+ }
207971
+ }
207972
+ const EOCDR_WITHOUT_COMMENT_SIZE = 22;
207973
+ const MAX_COMMENT_SIZE = 65535;
207974
+ const EOCDR_SIGNATURE = 101010256;
207975
+ const ZIP64_EOCDR_SIGNATURE = 101075792;
207976
+ async function readAs(reader, offset6, length2) {
207977
+ return await reader.read(offset6, length2);
207978
+ }
207979
+ async function readAsBlobOrTypedArray(reader, offset6, length2, type3) {
207980
+ if (reader.sliceAsBlob) {
207981
+ return await reader.sliceAsBlob(offset6, length2, type3);
207982
+ }
207983
+ return await reader.read(offset6, length2);
207984
+ }
207985
+ const crc$1 = {
207986
+ unsigned() {
207987
+ return 0;
207988
+ }
207989
+ };
207990
+ function getUint16LE(uint8View, offset6) {
207991
+ return uint8View[offset6] + uint8View[offset6 + 1] * 256;
207992
+ }
207993
+ function getUint32LE(uint8View, offset6) {
207994
+ return uint8View[offset6] + uint8View[offset6 + 1] * 256 + uint8View[offset6 + 2] * 65536 + uint8View[offset6 + 3] * 16777216;
207995
+ }
207996
+ function getUint64LE(uint8View, offset6) {
207997
+ return getUint32LE(uint8View, offset6) + getUint32LE(uint8View, offset6 + 4) * 4294967296;
207998
+ }
207999
+ const utf8Decoder = new TextDecoder();
208000
+ function decodeBuffer(uint8View, isUTF8) {
208001
+ if (isSharedArrayBuffer(uint8View.buffer)) {
208002
+ uint8View = new Uint8Array(uint8View);
208003
+ }
208004
+ return utf8Decoder.decode(uint8View);
208005
+ }
208006
+ async function findEndOfCentralDirector(reader, totalLength) {
208007
+ const size2 = Math.min(EOCDR_WITHOUT_COMMENT_SIZE + MAX_COMMENT_SIZE, totalLength);
208008
+ const readStart = totalLength - size2;
208009
+ const data2 = await readAs(reader, readStart, size2);
208010
+ for (let i2 = size2 - EOCDR_WITHOUT_COMMENT_SIZE; i2 >= 0; --i2) {
208011
+ if (getUint32LE(data2, i2) !== EOCDR_SIGNATURE) {
208012
+ continue;
208013
+ }
208014
+ const eocdr = new Uint8Array(data2.buffer, data2.byteOffset + i2, data2.byteLength - i2);
208015
+ const diskNumber = getUint16LE(eocdr, 4);
208016
+ if (diskNumber !== 0) {
208017
+ throw new Error(`multi-volume zip files are not supported. This is volume: ${diskNumber}`);
208018
+ }
208019
+ const entryCount = getUint16LE(eocdr, 10);
208020
+ const centralDirectorySize = getUint32LE(eocdr, 12);
208021
+ const centralDirectoryOffset = getUint32LE(eocdr, 16);
208022
+ const commentLength = getUint16LE(eocdr, 20);
208023
+ const expectedCommentLength = eocdr.length - EOCDR_WITHOUT_COMMENT_SIZE;
208024
+ if (commentLength !== expectedCommentLength) {
208025
+ throw new Error(`invalid comment length. expected: ${expectedCommentLength}, actual: ${commentLength}`);
208026
+ }
208027
+ const commentBytes = new Uint8Array(eocdr.buffer, eocdr.byteOffset + 22, commentLength);
208028
+ const comment = decodeBuffer(commentBytes);
208029
+ if (entryCount === 65535 || centralDirectoryOffset === 4294967295) {
208030
+ return await readZip64CentralDirectory(reader, readStart + i2, comment, commentBytes);
208031
+ } else {
208032
+ return await readEntries(reader, centralDirectoryOffset, centralDirectorySize, entryCount, comment, commentBytes);
208033
+ }
208034
+ }
208035
+ throw new Error("could not find end of central directory. maybe not zip file");
208036
+ }
208037
+ const END_OF_CENTRAL_DIRECTORY_LOCATOR_SIGNATURE = 117853008;
208038
+ async function readZip64CentralDirectory(reader, offset6, comment, commentBytes) {
208039
+ const zip64EocdlOffset = offset6 - 20;
208040
+ const eocdl = await readAs(reader, zip64EocdlOffset, 20);
208041
+ if (getUint32LE(eocdl, 0) !== END_OF_CENTRAL_DIRECTORY_LOCATOR_SIGNATURE) {
208042
+ throw new Error("invalid zip64 end of central directory locator signature");
208043
+ }
208044
+ const zip64EocdrOffset = getUint64LE(eocdl, 8);
208045
+ const zip64Eocdr = await readAs(reader, zip64EocdrOffset, 56);
208046
+ if (getUint32LE(zip64Eocdr, 0) !== ZIP64_EOCDR_SIGNATURE) {
208047
+ throw new Error("invalid zip64 end of central directory record signature");
208048
+ }
208049
+ const entryCount = getUint64LE(zip64Eocdr, 32);
208050
+ const centralDirectorySize = getUint64LE(zip64Eocdr, 40);
208051
+ const centralDirectoryOffset = getUint64LE(zip64Eocdr, 48);
208052
+ return readEntries(reader, centralDirectoryOffset, centralDirectorySize, entryCount, comment, commentBytes);
208053
+ }
208054
+ const CENTRAL_DIRECTORY_FILE_HEADER_SIGNATURE = 33639248;
208055
+ async function readEntries(reader, centralDirectoryOffset, centralDirectorySize, rawEntryCount, comment, commentBytes) {
208056
+ let readEntryCursor = 0;
208057
+ const allEntriesBuffer = await readAs(reader, centralDirectoryOffset, centralDirectorySize);
208058
+ const rawEntries = [];
208059
+ for (let e3 = 0; e3 < rawEntryCount; ++e3) {
208060
+ const buffer2 = allEntriesBuffer.subarray(readEntryCursor, readEntryCursor + 46);
208061
+ const signature = getUint32LE(buffer2, 0);
208062
+ if (signature !== CENTRAL_DIRECTORY_FILE_HEADER_SIGNATURE) {
208063
+ throw new Error(`invalid central directory file header signature: 0x${signature.toString(16)}`);
208064
+ }
208065
+ const rawEntry = {
208066
+ // 4 - Version made by
208067
+ versionMadeBy: getUint16LE(buffer2, 4),
208068
+ // 6 - Version needed to extract (minimum)
208069
+ versionNeededToExtract: getUint16LE(buffer2, 6),
208070
+ // 8 - General purpose bit flag
208071
+ generalPurposeBitFlag: getUint16LE(buffer2, 8),
208072
+ // 10 - Compression method
208073
+ compressionMethod: getUint16LE(buffer2, 10),
208074
+ // 12 - File last modification time
208075
+ lastModFileTime: getUint16LE(buffer2, 12),
208076
+ // 14 - File last modification date
208077
+ lastModFileDate: getUint16LE(buffer2, 14),
208078
+ // 16 - CRC-32
208079
+ crc32: getUint32LE(buffer2, 16),
208080
+ // 20 - Compressed size
208081
+ compressedSize: getUint32LE(buffer2, 20),
208082
+ // 24 - Uncompressed size
208083
+ uncompressedSize: getUint32LE(buffer2, 24),
208084
+ // 28 - File name length (n)
208085
+ fileNameLength: getUint16LE(buffer2, 28),
208086
+ // 30 - Extra field length (m)
208087
+ extraFieldLength: getUint16LE(buffer2, 30),
208088
+ // 32 - File comment length (k)
208089
+ fileCommentLength: getUint16LE(buffer2, 32),
208090
+ // 34 - Disk number where file starts
208091
+ // 36 - Internal file attributes
208092
+ internalFileAttributes: getUint16LE(buffer2, 36),
208093
+ // 38 - External file attributes
208094
+ externalFileAttributes: getUint32LE(buffer2, 38),
208095
+ // 42 - Relative offset of local file header
208096
+ relativeOffsetOfLocalHeader: getUint32LE(buffer2, 42)
208097
+ };
208098
+ if (rawEntry.generalPurposeBitFlag & 64) {
208099
+ throw new Error("strong encryption is not supported");
208100
+ }
208101
+ readEntryCursor += 46;
208102
+ const data2 = allEntriesBuffer.subarray(readEntryCursor, readEntryCursor + rawEntry.fileNameLength + rawEntry.extraFieldLength + rawEntry.fileCommentLength);
208103
+ rawEntry.nameBytes = data2.slice(0, rawEntry.fileNameLength);
208104
+ rawEntry.name = decodeBuffer(rawEntry.nameBytes);
208105
+ const fileCommentStart = rawEntry.fileNameLength + rawEntry.extraFieldLength;
208106
+ const extraFieldBuffer = data2.slice(rawEntry.fileNameLength, fileCommentStart);
208107
+ rawEntry.extraFields = [];
208108
+ let i2 = 0;
208109
+ while (i2 < extraFieldBuffer.length - 3) {
208110
+ const headerId = getUint16LE(extraFieldBuffer, i2 + 0);
208111
+ const dataSize = getUint16LE(extraFieldBuffer, i2 + 2);
208112
+ const dataStart = i2 + 4;
208113
+ const dataEnd = dataStart + dataSize;
208114
+ if (dataEnd > extraFieldBuffer.length) {
208115
+ throw new Error("extra field length exceeds extra field buffer size");
208116
+ }
208117
+ rawEntry.extraFields.push({
208118
+ id: headerId,
208119
+ data: extraFieldBuffer.slice(dataStart, dataEnd)
208120
+ });
208121
+ i2 = dataEnd;
208122
+ }
208123
+ rawEntry.commentBytes = data2.slice(fileCommentStart, fileCommentStart + rawEntry.fileCommentLength);
208124
+ rawEntry.comment = decodeBuffer(rawEntry.commentBytes);
208125
+ readEntryCursor += data2.length;
208126
+ if (rawEntry.uncompressedSize === 4294967295 || rawEntry.compressedSize === 4294967295 || rawEntry.relativeOffsetOfLocalHeader === 4294967295) {
208127
+ const zip64ExtraField = rawEntry.extraFields.find((e4) => e4.id === 1);
208128
+ if (!zip64ExtraField) {
208129
+ throw new Error("expected zip64 extended information extra field");
208130
+ }
208131
+ const zip64EiefBuffer = zip64ExtraField.data;
208132
+ let index2 = 0;
208133
+ if (rawEntry.uncompressedSize === 4294967295) {
208134
+ if (index2 + 8 > zip64EiefBuffer.length) {
208135
+ throw new Error("zip64 extended information extra field does not include uncompressed size");
208136
+ }
208137
+ rawEntry.uncompressedSize = getUint64LE(zip64EiefBuffer, index2);
208138
+ index2 += 8;
208139
+ }
208140
+ if (rawEntry.compressedSize === 4294967295) {
208141
+ if (index2 + 8 > zip64EiefBuffer.length) {
208142
+ throw new Error("zip64 extended information extra field does not include compressed size");
208143
+ }
208144
+ rawEntry.compressedSize = getUint64LE(zip64EiefBuffer, index2);
208145
+ index2 += 8;
208146
+ }
208147
+ if (rawEntry.relativeOffsetOfLocalHeader === 4294967295) {
208148
+ if (index2 + 8 > zip64EiefBuffer.length) {
208149
+ throw new Error("zip64 extended information extra field does not include relative header offset");
208150
+ }
208151
+ rawEntry.relativeOffsetOfLocalHeader = getUint64LE(zip64EiefBuffer, index2);
208152
+ index2 += 8;
208153
+ }
208154
+ }
208155
+ const nameField = rawEntry.extraFields.find((e4) => e4.id === 28789 && e4.data.length >= 6 && // too short to be meaningful
208156
+ e4.data[0] === 1 && // Version 1 byte version of this extra field, currently 1
208157
+ getUint32LE(e4.data, 1), crc$1.unsigned(rawEntry.nameBytes));
208158
+ if (nameField) {
208159
+ rawEntry.fileName = decodeBuffer(nameField.data.slice(5));
208160
+ }
208161
+ if (rawEntry.compressionMethod === 0) {
208162
+ let expectedCompressedSize = rawEntry.uncompressedSize;
208163
+ if ((rawEntry.generalPurposeBitFlag & 1) !== 0) {
208164
+ expectedCompressedSize += 12;
208165
+ }
208166
+ if (rawEntry.compressedSize !== expectedCompressedSize) {
208167
+ throw new Error(`compressed size mismatch for stored file: ${rawEntry.compressedSize} != ${expectedCompressedSize}`);
208168
+ }
208169
+ }
208170
+ rawEntries.push(rawEntry);
208171
+ }
208172
+ const zip2 = {
208173
+ comment,
208174
+ commentBytes
208175
+ };
208176
+ return {
208177
+ zip: zip2,
208178
+ entries: rawEntries.map((e3) => new ZipEntry(reader, e3))
208179
+ };
208180
+ }
208181
+ async function readEntryDataHeader(reader, rawEntry) {
208182
+ if (rawEntry.generalPurposeBitFlag & 1) {
208183
+ throw new Error("encrypted entries not supported");
208184
+ }
208185
+ const buffer2 = await readAs(reader, rawEntry.relativeOffsetOfLocalHeader, 30);
208186
+ const totalLength = await reader.getLength();
208187
+ const signature = getUint32LE(buffer2, 0);
208188
+ if (signature !== 67324752) {
208189
+ throw new Error(`invalid local file header signature: 0x${signature.toString(16)}`);
208190
+ }
208191
+ const fileNameLength = getUint16LE(buffer2, 26);
208192
+ const extraFieldLength = getUint16LE(buffer2, 28);
208193
+ const localFileHeaderEnd = rawEntry.relativeOffsetOfLocalHeader + buffer2.length + fileNameLength + extraFieldLength;
208194
+ let decompress;
208195
+ if (rawEntry.compressionMethod === 0) {
208196
+ decompress = false;
208197
+ } else if (rawEntry.compressionMethod === 8) {
208198
+ decompress = true;
208199
+ } else {
208200
+ throw new Error(`unsupported compression method: ${rawEntry.compressionMethod}`);
208201
+ }
208202
+ const fileDataStart = localFileHeaderEnd;
208203
+ const fileDataEnd = fileDataStart + rawEntry.compressedSize;
208204
+ if (rawEntry.compressedSize !== 0) {
208205
+ if (fileDataEnd > totalLength) {
208206
+ throw new Error(`file data overflows file bounds: ${fileDataStart} + ${rawEntry.compressedSize} > ${totalLength}`);
208207
+ }
208208
+ }
208209
+ return {
208210
+ decompress,
208211
+ fileDataStart
208212
+ };
208213
+ }
208214
+ async function readEntryDataAsArrayBuffer(reader, rawEntry) {
208215
+ const { decompress, fileDataStart } = await readEntryDataHeader(reader, rawEntry);
208216
+ if (!decompress) {
208217
+ const dataView = await readAs(reader, fileDataStart, rawEntry.compressedSize);
208218
+ return isTypedArraySameAsArrayBuffer(dataView) ? dataView.buffer : dataView.slice().buffer;
208219
+ }
208220
+ const typedArrayOrBlob = await readAsBlobOrTypedArray(reader, fileDataStart, rawEntry.compressedSize);
208221
+ const result = await inflateRawAsync(typedArrayOrBlob, rawEntry.uncompressedSize);
208222
+ return result;
208223
+ }
208224
+ async function readEntryDataAsBlob(reader, rawEntry, type3) {
208225
+ const { decompress, fileDataStart } = await readEntryDataHeader(reader, rawEntry);
208226
+ if (!decompress) {
208227
+ const typedArrayOrBlob2 = await readAsBlobOrTypedArray(reader, fileDataStart, rawEntry.compressedSize, type3);
208228
+ if (isBlob(typedArrayOrBlob2)) {
208229
+ return typedArrayOrBlob2;
208230
+ }
208231
+ return new Blob([isSharedArrayBuffer(typedArrayOrBlob2.buffer) ? new Uint8Array(typedArrayOrBlob2) : typedArrayOrBlob2], { type: type3 });
208232
+ }
208233
+ const typedArrayOrBlob = await readAsBlobOrTypedArray(reader, fileDataStart, rawEntry.compressedSize);
208234
+ const result = await inflateRawAsync(typedArrayOrBlob, rawEntry.uncompressedSize, type3);
208235
+ return result;
208236
+ }
208237
+ async function unzipRaw(source2) {
208238
+ let reader;
208239
+ if (typeof Blob !== "undefined" && source2 instanceof Blob) {
208240
+ reader = new BlobReader$1(source2);
208241
+ } else if (source2 instanceof ArrayBuffer || source2 && source2.buffer && source2.buffer instanceof ArrayBuffer) {
208242
+ reader = new ArrayBufferReader(source2);
208243
+ } else if (isSharedArrayBuffer(source2) || isSharedArrayBuffer(source2.buffer)) {
208244
+ reader = new ArrayBufferReader(source2);
208245
+ } else if (typeof source2 === "string") {
208246
+ const req = await fetch(source2);
208247
+ if (!req.ok) {
208248
+ throw new Error(`failed http request ${source2}, status: ${req.status}: ${req.statusText}`);
208249
+ }
208250
+ const blob = await req.blob();
208251
+ reader = new BlobReader$1(blob);
208252
+ } else if (typeof source2.getLength === "function" && typeof source2.read === "function") {
208253
+ reader = source2;
208254
+ } else {
208255
+ throw new Error("unsupported source type");
208256
+ }
208257
+ const totalLength = await reader.getLength();
208258
+ if (totalLength > Number.MAX_SAFE_INTEGER) {
208259
+ throw new Error(`file too large. size: ${totalLength}. Only file sizes up 4503599627370496 bytes are supported`);
208260
+ }
208261
+ return await findEndOfCentralDirector(reader, totalLength);
208262
+ }
208263
+ async function unzip(source2) {
208264
+ const { zip: zip2, entries: entries2 } = await unzipRaw(source2);
208265
+ return {
208266
+ zip: zip2,
208267
+ entries: Object.fromEntries(entries2.map((v) => [v.name, v]))
208268
+ };
208269
+ }
208270
+ class BlobReader2 {
208271
+ constructor(blob) {
208272
+ __publicField(this, "blob");
208273
+ this.blob = blob;
208274
+ }
208275
+ async getLength() {
208276
+ return this.blob.size;
208277
+ }
208278
+ async read(offset6, length2) {
208279
+ const blob = this.blob.slice(offset6, offset6 + length2);
208280
+ return new Uint8Array(await blob.arrayBuffer());
208281
+ }
208282
+ }
208283
+ class HTTPRangeReader {
208284
+ constructor(url, opts2 = {}) {
208285
+ __publicField(this, "url");
208286
+ __publicField(this, "length");
208287
+ __privateAdd(this, _overrides2, void 0);
208288
+ this.url = url;
208289
+ __privateSet(this, _overrides2, opts2.overrides ?? {});
208290
+ }
208291
+ async getLength() {
208292
+ if (this.length === void 0) {
208293
+ const req = await fetch(this.url, {
208294
+ ...__privateGet(this, _overrides2),
208295
+ method: "HEAD"
208296
+ });
208297
+ if (!req.ok) {
208298
+ throw new Error(`failed http request ${this.url}, status: ${req.status}: ${req.statusText}`);
208299
+ }
208300
+ this.length = parseInt(req.headers.get("content-length"));
208301
+ if (Number.isNaN(this.length)) {
208302
+ throw Error("could not get length");
208303
+ }
208304
+ }
208305
+ return this.length;
208306
+ }
208307
+ async read(offset6, size2) {
208308
+ if (size2 === 0) {
208309
+ return new Uint8Array(0);
208310
+ }
208311
+ const req = await fetch_range(this.url, offset6, size2, __privateGet(this, _overrides2));
208312
+ if (!req.ok) {
208313
+ throw new Error(`failed http request ${this.url}, status: ${req.status} offset: ${offset6} size: ${size2}: ${req.statusText}`);
208314
+ }
208315
+ return new Uint8Array(await req.arrayBuffer());
208316
+ }
208317
+ }
208318
+ _overrides2 = new WeakMap();
208319
+ class ZipFileStore {
208320
+ constructor(reader) {
208321
+ __publicField(this, "info");
208322
+ this.info = unzip(reader);
208323
+ }
208324
+ async get(key2) {
208325
+ let entry2 = (await this.info).entries[strip_prefix(key2)];
208326
+ if (!entry2)
208327
+ return;
208328
+ return new Uint8Array(await entry2.arrayBuffer());
208329
+ }
208330
+ async has(key2) {
208331
+ return strip_prefix(key2) in (await this.info).entries;
208332
+ }
208333
+ static fromUrl(href2, opts2 = {}) {
208334
+ return new ZipFileStore(new HTTPRangeReader(href2, opts2));
208335
+ }
208336
+ static fromBlob(blob) {
208337
+ return new ZipFileStore(new BlobReader2(blob));
208338
+ }
208339
+ }
208340
+ const ZipFileStore$1 = ZipFileStore;
208341
+ function zarrOpenRoot(url, fileType, requestInit2) {
208342
+ let store2;
208343
+ if (fileType && fileType.endsWith(".zip")) {
208344
+ store2 = ZipFileStore$1.fromUrl(url, { overrides: requestInit2 });
208345
+ } else {
208346
+ store2 = new FetchStore$1(url, { overrides: requestInit2 });
208347
+ }
207259
208348
  return root(store2);
207260
208349
  }
207261
208350
  function prevPowerOf2(x2) {
@@ -209857,6 +210946,7 @@ function SpatialSubscriber(props2) {
209857
210946
  const [pointMultiObsLabelsData, pointMultiObsLabelsDataStatus] = usePointMultiObsLabels(coordinationScopes, coordinationScopesBy, loaders, dataset);
209858
210947
  const [obsSpotsData, obsSpotsDataStatus, obsSpotsUrls] = useMultiObsSpots(coordinationScopes, coordinationScopesBy, loaders, dataset, mergeCoordination, uuid);
209859
210948
  const [obsSpotsSetsData, obsSpotsSetsDataStatus] = useSpotMultiObsSets(coordinationScopes, coordinationScopesBy, loaders, dataset);
210949
+ const [obsSpotsFeatureLabelsData, obsSpotsFeatureLabelsDataStatus] = useSpotMultiFeatureLabels(coordinationScopes, coordinationScopesBy, loaders, dataset);
209860
210950
  const [spotMultiExpressionData, spotMultiLoadedFeatureSelection, spotMultiExpressionExtents, spotMultiExpressionNormData, spotMultiFeatureSelectionStatus] = useSpotMultiFeatureSelection(coordinationScopes, coordinationScopesBy, loaders, dataset);
209861
210951
  const [spotMultiIndicesData, spotMultiIndicesDataStatus] = useSpotMultiObsFeatureMatrixIndices(coordinationScopes, coordinationScopesBy, loaders, dataset);
209862
210952
  const [obsSegmentationsLocationsData, obsSegmentationsLocationsDataStatus] = useSegmentationMultiObsLocations(coordinationScopes, coordinationScopesBy, loaders, dataset);
@@ -210177,6 +211267,7 @@ function SpatialSubscriber(props2) {
210177
211267
  spotLayerScopes,
210178
211268
  spotLayerCoordination,
210179
211269
  spotMultiExpressionExtents,
211270
+ spotMultiFeatureLabels: obsSpotsFeatureLabelsData,
210180
211271
  // Points
210181
211272
  pointLayerScopes,
210182
211273
  pointLayerCoordination
@@ -217563,7 +218654,7 @@ const HIGLASS_BUNDLE_VERSION = "1.11.13";
217563
218654
  const HIGLASS_CSS_URL = `https://unpkg.com/${HIGLASS_PKG_NAME}@${HIGLASS_BUNDLE_VERSION}/dist/hglib.css`;
217564
218655
  register({ dataFetcher: ZarrMultivecDataFetcher_default, config: ZarrMultivecDataFetcher_default.config }, { pluginType: "dataFetcher" });
217565
218656
  const LazyHiGlassComponent = React__default.lazy(async () => {
217566
- const { HiGlassComponent } = await import("./hglib-f850a2ea.js").then((n3) => n3.h);
218657
+ const { HiGlassComponent } = await import("./hglib-00c8df12.js").then((n3) => n3.h);
217567
218658
  return { default: HiGlassComponent };
217568
218659
  });
217569
218660
  const HG_SIZE = 800;
@@ -222670,23 +223761,29 @@ function CellSetExpressionPlotSubscriber(props2) {
222670
223761
  const { coordinationScopes, closeButtonVisible, downloadButtonVisible, removeGridComponent, theme, jitter: jitter2 = false, yMin = null, yUnits = null } = props2;
222671
223762
  const classes = useStyles$1();
222672
223763
  const loaders = useLoaders();
222673
- const [{ dataset, obsType, featureType, featureValueType, featureSelection: geneSelection, featureValueTransform, featureValueTransformCoefficient, obsSetSelection: cellSetSelection, obsSetColor: cellSetColor, additionalObsSets: additionalCellSets }, { setFeatureValueTransform, setFeatureValueTransformCoefficient }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType$2.OBS_SET_FEATURE_VALUE_DISTRIBUTION], coordinationScopes);
223764
+ const [{ dataset, obsType, featureType, featureValueType, featureSelection: geneSelection, featureValueTransform, featureValueTransformCoefficient, obsSetSelection: cellSetSelection, obsSetColor: cellSetColor, additionalObsSets: additionalCellSets, sampleType }, { setFeatureValueTransform, setFeatureValueTransformCoefficient }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType$2.OBS_SET_FEATURE_VALUE_DISTRIBUTION], coordinationScopes);
222674
223765
  const [width2, height2, containerRef] = useGridItemSize();
222675
223766
  const transformOptions = VALUE_TRANSFORM_OPTIONS;
222676
223767
  const [expressionData, loadedFeatureSelection, featureSelectionStatus] = useFeatureSelection(loaders, dataset, false, geneSelection, { obsType, featureType, featureValueType });
222677
223768
  const [{ featureLabelsMap }, featureLabelsStatus, featureLabelsUrls] = useFeatureLabelsData(loaders, dataset, false, {}, {}, { featureType });
222678
223769
  const [{ obsIndex }, matrixIndicesStatus, matrixIndicesUrls] = useObsFeatureMatrixIndices(loaders, dataset, false, { obsType, featureType, featureValueType });
222679
223770
  const [{ obsSets: cellSets }, obsSetsStatus, obsSetsUrls] = useObsSetsData(loaders, dataset, true, {}, {}, { obsType });
223771
+ const [{ sampleSets }, sampleSetsStatus, sampleSetsUrls] = useSampleSetsData(loaders, dataset, false, {}, {}, { sampleType });
223772
+ const [{ sampleEdges }, sampleEdgesStatus, sampleEdgesUrls] = useSampleEdgesData(loaders, dataset, false, {}, {}, { obsType, sampleType });
222680
223773
  const isReady = useReady([
222681
223774
  featureSelectionStatus,
222682
223775
  matrixIndicesStatus,
222683
223776
  obsSetsStatus,
222684
- featureLabelsStatus
223777
+ featureLabelsStatus,
223778
+ sampleSetsStatus,
223779
+ sampleEdgesStatus
222685
223780
  ]);
222686
223781
  const urls2 = useUrls([
222687
223782
  featureLabelsUrls,
222688
223783
  matrixIndicesUrls,
222689
- obsSetsUrls
223784
+ obsSetsUrls,
223785
+ sampleSetsUrls,
223786
+ sampleEdgesUrls
222690
223787
  ]);
222691
223788
  const [expressionArr, setArr] = useExpressionByCellSet(expressionData, obsIndex, cellSets, additionalCellSets, geneSelection, cellSetSelection, cellSetColor, featureValueTransform, featureValueTransformCoefficient, theme);
222692
223789
  const firstGeneSelected = geneSelection && geneSelection.length >= 1 ? featureLabelsMap?.get(geneSelection[0]) || geneSelection[0] : null;
@@ -275820,6 +276917,40 @@ class ObsSetsCsvLoader extends CsvLoader {
275820
276917
  }, url, coordinationValues));
275821
276918
  }
275822
276919
  }
276920
+ class SampleSetsCsvLoader extends CsvLoader {
276921
+ loadFromCache(data2) {
276922
+ if (this.cachedResult) {
276923
+ return this.cachedResult;
276924
+ }
276925
+ const { sampleIndex: indexCol, sampleSets: setsArr } = this.options;
276926
+ const obsIndex = data2.map((d) => String(d[indexCol]));
276927
+ const setsCols = setsArr.map(({ column }) => column);
276928
+ const cellSetIds = setsCols.map((setCol) => Array.isArray(setCol) ? setCol.map((subCol) => data2.map((d) => d[subCol])) : data2.map((d) => d[setCol]));
276929
+ const scoresCols = setsArr.map((option) => option.scorePath || void 0);
276930
+ const cellSetScores = scoresCols.map((scoreCol) => scoreCol ? data2.map((d) => d[scoreCol]) : void 0);
276931
+ const obsIndices = cellSetIds.map(() => obsIndex);
276932
+ const cellSetsTree = dataToCellSetsTree([
276933
+ obsIndices,
276934
+ cellSetIds,
276935
+ cellSetScores
276936
+ ], setsArr);
276937
+ const obsSetsMembership = treeToMembershipMap(cellSetsTree);
276938
+ return [obsIndex, cellSetsTree, obsSetsMembership];
276939
+ }
276940
+ async load() {
276941
+ const payload = await this.getSourceData().catch((reason) => Promise.resolve(reason));
276942
+ if (payload instanceof AbstractLoaderError) {
276943
+ return Promise.reject(payload);
276944
+ }
276945
+ const { data: data2, url } = payload;
276946
+ const [obsIndex, cellSetsTree, obsSetsMembership] = this.loadFromCache(data2);
276947
+ return Promise.resolve(new LoaderResult({
276948
+ sampleIndex: obsIndex,
276949
+ sampleSets: cellSetsTree,
276950
+ sampleSetsMembership: obsSetsMembership
276951
+ }, url));
276952
+ }
276953
+ }
275823
276954
  class JsonSource {
275824
276955
  constructor({ url, requestInit: requestInit2 }) {
275825
276956
  this.url = url;
@@ -276273,7 +277404,7 @@ async function initLoader(imageData) {
276273
277404
  const { dimensions, isPyramid, transform: transform4 } = metadata2 || {};
276274
277405
  const labels2 = dimensions.map((d) => d.field);
276275
277406
  let source2;
276276
- const root2 = await zarrOpenRoot(url, requestInit2);
277407
+ const root2 = await zarrOpenRoot(url, null, requestInit2);
276277
277408
  if (isPyramid) {
276278
277409
  const metadataUrl = `${url}${url.slice(-1) === "/" ? "" : "/"}.zmetadata`;
276279
277410
  const response = await fetch(metadataUrl);
@@ -276311,7 +277442,7 @@ async function initLoader(imageData) {
276311
277442
  }
276312
277443
  case "ome-zarr": {
276313
277444
  const { coordinateTransformations: coordinateTransformationsFromOptions } = metadata2 || {};
276314
- const root2 = await zarrOpenRoot(url, requestInit2);
277445
+ const root2 = await zarrOpenRoot(url, null, requestInit2);
276315
277446
  const loader2 = await loadOmeZarr(root2);
276316
277447
  const { metadata: loaderMetadata } = loader2;
276317
277448
  const { omero, multiscales } = loaderMetadata;
@@ -276437,11 +277568,11 @@ class RasterJsonAsObsSegmentationsLoader extends RasterLoader {
276437
277568
  }
276438
277569
  }
276439
277570
  class ZarrDataSource {
276440
- constructor({ url, requestInit: requestInit2, store: store2 }) {
277571
+ constructor({ url, requestInit: requestInit2, store: store2, fileType }) {
276441
277572
  if (store2) {
276442
277573
  this.storeRoot = root(store2);
276443
277574
  } else {
276444
- this.storeRoot = zarrOpenRoot(url, requestInit2);
277575
+ this.storeRoot = zarrOpenRoot(url, fileType, requestInit2);
276445
277576
  }
276446
277577
  }
276447
277578
  getStoreRoot(path2) {
@@ -277610,6 +278741,35 @@ class ObsFeatureColumnsAnndataLoader extends AbstractTwoStepLoader {
277610
278741
  ]).then(([{ obsIndex, obsFeatureMatrix, featureIndex }]) => Promise.resolve(new LoaderResult({ obsIndex, obsFeatureMatrix, featureIndex }, null)));
277611
278742
  }
277612
278743
  }
278744
+ class SampleEdgesAnndataLoader extends AbstractTwoStepLoader {
278745
+ /**
278746
+ * Class method for loading observation string labels.
278747
+ * @returns {Promise} A promise for the array.
278748
+ */
278749
+ loadLabels() {
278750
+ const { path: path2 } = this.options;
278751
+ if (this.labels) {
278752
+ return this.labels;
278753
+ }
278754
+ if (!this.labels) {
278755
+ this.labels = this.dataSource._loadColumn(path2);
278756
+ return this.labels;
278757
+ }
278758
+ this.labels = Promise.resolve(null);
278759
+ return this.labels;
278760
+ }
278761
+ async load() {
278762
+ const { path: path2 } = this.options;
278763
+ const superResult = await super.load().catch((reason) => Promise.resolve(reason));
278764
+ if (superResult instanceof AbstractLoaderError) {
278765
+ return Promise.reject(superResult);
278766
+ }
278767
+ return Promise.all([
278768
+ this.dataSource.loadObsIndex(path2),
278769
+ this.loadLabels()
278770
+ ]).then(([obsIndex, sampleIds]) => Promise.resolve(new LoaderResult({ obsIndex, sampleIds }, null)));
278771
+ }
278772
+ }
277613
278773
  class ImageWrapper {
277614
278774
  constructor(vivLoader, options) {
277615
278775
  __publicField(this, "vivLoader");
@@ -278060,7 +279220,7 @@ class SpatialDataLabelsLoader extends SpatialDataImageLoader {
278060
279220
  };
278061
279221
  const imageWrapper = result.data.obsSegmentations.instance;
278062
279222
  const channelObjects = imageWrapper.getChannelObjects();
278063
- const channelCoordination = channelObjects.slice(0, 5).map((channelObj, i2) => ({
279223
+ const channelCoordination = channelObjects.slice(0, 7).map((channelObj, i2) => ({
278064
279224
  spatialTargetC: i2,
278065
279225
  // obsType: channelObj.name,
278066
279226
  spatialChannelColor: (channelObj.defaultColor || channelObj.autoDefaultColor).slice(0, 3),
@@ -278362,7 +279522,16 @@ const expectedCoordinationTypes = [
278362
279522
  "obsLabelsType",
278363
279523
  "embeddingType"
278364
279524
  ];
279525
+ function createGetFileType(jointFileType) {
279526
+ return (fileType) => {
279527
+ if (jointFileType.endsWith(".zip") && ALT_ZARR_STORE_TYPES[fileType]?.zip) {
279528
+ return ALT_ZARR_STORE_TYPES[fileType].zip;
279529
+ }
279530
+ return fileType;
279531
+ };
279532
+ }
278365
279533
  function expandAnndataZarr(fileDef) {
279534
+ const getFileType2 = createGetFileType(fileDef.fileType);
278366
279535
  const baseFileDef = {
278367
279536
  url: fileDef.url,
278368
279537
  requestInit: fileDef.requestInit,
@@ -278384,7 +279553,7 @@ function expandAnndataZarr(fileDef) {
278384
279553
  // obsFeatureMatrix
278385
279554
  ...options.obsFeatureMatrix ? [{
278386
279555
  ...baseFileDef,
278387
- fileType: FileType$2.OBS_FEATURE_MATRIX_ANNDATA_ZARR,
279556
+ fileType: getFileType2(FileType$2.OBS_FEATURE_MATRIX_ANNDATA_ZARR),
278388
279557
  options: options.obsFeatureMatrix,
278389
279558
  coordinationValues: {
278390
279559
  ...extraCoordinationValues,
@@ -278396,7 +279565,7 @@ function expandAnndataZarr(fileDef) {
278396
279565
  // obsSets
278397
279566
  ...options.obsSets ? [{
278398
279567
  ...baseFileDef,
278399
- fileType: FileType$2.OBS_SETS_ANNDATA_ZARR,
279568
+ fileType: getFileType2(FileType$2.OBS_SETS_ANNDATA_ZARR),
278400
279569
  options: options.obsSets,
278401
279570
  coordinationValues: {
278402
279571
  ...extraCoordinationValues,
@@ -278406,7 +279575,7 @@ function expandAnndataZarr(fileDef) {
278406
279575
  // obsSpots
278407
279576
  ...options.obsSpots ? [{
278408
279577
  ...baseFileDef,
278409
- fileType: FileType$2.OBS_SPOTS_ANNDATA_ZARR,
279578
+ fileType: getFileType2(FileType$2.OBS_SPOTS_ANNDATA_ZARR),
278410
279579
  options: options.obsSpots,
278411
279580
  coordinationValues: {
278412
279581
  ...extraCoordinationValues,
@@ -278416,7 +279585,7 @@ function expandAnndataZarr(fileDef) {
278416
279585
  // obsPoints
278417
279586
  ...options.obsPoints ? [{
278418
279587
  ...baseFileDef,
278419
- fileType: FileType$2.OBS_POINTS_ANNDATA_ZARR,
279588
+ fileType: getFileType2(FileType$2.OBS_POINTS_ANNDATA_ZARR),
278420
279589
  options: options.obsPoints,
278421
279590
  coordinationValues: {
278422
279591
  ...extraCoordinationValues,
@@ -278426,7 +279595,7 @@ function expandAnndataZarr(fileDef) {
278426
279595
  // obsLocations
278427
279596
  ...options.obsLocations ? [{
278428
279597
  ...baseFileDef,
278429
- fileType: FileType$2.OBS_LOCATIONS_ANNDATA_ZARR,
279598
+ fileType: getFileType2(FileType$2.OBS_LOCATIONS_ANNDATA_ZARR),
278430
279599
  options: options.obsLocations,
278431
279600
  coordinationValues: {
278432
279601
  ...extraCoordinationValues,
@@ -278436,7 +279605,7 @@ function expandAnndataZarr(fileDef) {
278436
279605
  // obsSegmentations
278437
279606
  ...options.obsSegmentations ? [{
278438
279607
  ...baseFileDef,
278439
- fileType: FileType$2.OBS_SEGMENTATIONS_ANNDATA_ZARR,
279608
+ fileType: getFileType2(FileType$2.OBS_SEGMENTATIONS_ANNDATA_ZARR),
278440
279609
  options: options.obsSegmentations,
278441
279610
  coordinationValues: {
278442
279611
  ...extraCoordinationValues,
@@ -278448,7 +279617,7 @@ function expandAnndataZarr(fileDef) {
278448
279617
  ...options.obsEmbedding ? Array.isArray(options.obsEmbedding) ? options.obsEmbedding.map((oe) => ({
278449
279618
  // obsEmbedding was an array, process each element.
278450
279619
  ...baseFileDef,
278451
- fileType: FileType$2.OBS_EMBEDDING_ANNDATA_ZARR,
279620
+ fileType: getFileType2(FileType$2.OBS_EMBEDDING_ANNDATA_ZARR),
278452
279621
  options: {
278453
279622
  path: oe.path,
278454
279623
  dims: oe.dims
@@ -278462,7 +279631,7 @@ function expandAnndataZarr(fileDef) {
278462
279631
  })) : [{
278463
279632
  // obsEmbedding was an object.
278464
279633
  ...baseFileDef,
278465
- fileType: FileType$2.OBS_EMBEDDING_ANNDATA_ZARR,
279634
+ fileType: getFileType2(FileType$2.OBS_EMBEDDING_ANNDATA_ZARR),
278466
279635
  options: options.obsEmbedding,
278467
279636
  coordinationValues: {
278468
279637
  ...extraCoordinationValues,
@@ -278475,7 +279644,7 @@ function expandAnndataZarr(fileDef) {
278475
279644
  ...options.obsLabels ? Array.isArray(options.obsLabels) ? options.obsLabels.map((ol) => ({
278476
279645
  // obsLabels was an array, process each element.
278477
279646
  ...baseFileDef,
278478
- fileType: FileType$2.OBS_LABELS_ANNDATA_ZARR,
279647
+ fileType: getFileType2(FileType$2.OBS_LABELS_ANNDATA_ZARR),
278479
279648
  options: {
278480
279649
  path: ol.path
278481
279650
  },
@@ -278488,7 +279657,7 @@ function expandAnndataZarr(fileDef) {
278488
279657
  })) : [{
278489
279658
  // obsLabels was an object.
278490
279659
  ...baseFileDef,
278491
- fileType: FileType$2.OBS_LABELS_ANNDATA_ZARR,
279660
+ fileType: getFileType2(FileType$2.OBS_LABELS_ANNDATA_ZARR),
278492
279661
  options: options.obsLabels,
278493
279662
  coordinationValues: {
278494
279663
  ...extraCoordinationValues,
@@ -278501,7 +279670,7 @@ function expandAnndataZarr(fileDef) {
278501
279670
  ...options.featureLabels ? Array.isArray(options.featureLabels) ? options.featureLabels.map((fl) => ({
278502
279671
  // featureLabels was an array, process each element.
278503
279672
  ...baseFileDef,
278504
- fileType: FileType$2.FEATURE_LABELS_ANNDATA_ZARR,
279673
+ fileType: getFileType2(FileType$2.FEATURE_LABELS_ANNDATA_ZARR),
278505
279674
  options: {
278506
279675
  path: fl.path
278507
279676
  },
@@ -278514,7 +279683,7 @@ function expandAnndataZarr(fileDef) {
278514
279683
  })) : [{
278515
279684
  // featureLabels was an object.
278516
279685
  ...baseFileDef,
278517
- fileType: FileType$2.FEATURE_LABELS_ANNDATA_ZARR,
279686
+ fileType: getFileType2(FileType$2.FEATURE_LABELS_ANNDATA_ZARR),
278518
279687
  options: options.featureLabels,
278519
279688
  coordinationValues: {
278520
279689
  ...extraCoordinationValues,
@@ -278871,6 +280040,13 @@ function makeViewType(name2, component) {
278871
280040
  function makeFileType(name2, dataType, dataLoaderClass, dataSourceClass, optionsSchema) {
278872
280041
  return new PluginFileType(name2, dataType, dataLoaderClass, dataSourceClass, optionsSchema);
278873
280042
  }
280043
+ function makeZarrFileTypes(name2, dataType, dataLoaderClass, dataSourceClass, optionsSchema) {
280044
+ const altFileTypes = Object.values(ALT_ZARR_STORE_TYPES[name2]);
280045
+ return [
280046
+ new PluginFileType(name2, dataType, dataLoaderClass, dataSourceClass, optionsSchema),
280047
+ ...altFileTypes.map((n3) => new PluginFileType(n3, dataType, dataLoaderClass, dataSourceClass, optionsSchema))
280048
+ ];
280049
+ }
278874
280050
  const baseViewTypes = [
278875
280051
  makeViewType(ViewType$2.DESCRIPTION, DescriptionSubscriber),
278876
280052
  makeViewType(ViewType$2.OBS_SETS, ObsSetsManagerSubscriber),
@@ -278899,20 +280075,22 @@ const baseFileTypes = [
278899
280075
  makeFileType(FileType$2.OBS_LABELS_CSV, DataType$3.OBS_LABELS, ObsLabelsCsvLoader, CsvSource, obsLabelsCsvSchema),
278900
280076
  makeFileType(FileType$2.OBS_FEATURE_MATRIX_CSV, DataType$3.OBS_FEATURE_MATRIX, ObsFeatureMatrixCsvLoader, CsvSource, z.null()),
278901
280077
  makeFileType(FileType$2.FEATURE_LABELS_CSV, DataType$3.FEATURE_LABELS, FeatureLabelsCsvLoader, CsvSource, featureLabelsCsvSchema),
280078
+ makeFileType(FileType$2.SAMPLE_SETS_CSV, DataType$3.SAMPLE_SETS, SampleSetsCsvLoader, CsvSource, sampleSetsCsvSchema),
278902
280079
  // All JSON file types
278903
280080
  makeFileType(FileType$2.OBS_SEGMENTATIONS_JSON, DataType$3.OBS_SEGMENTATIONS, ObsSegmentationsJsonLoader, JsonSource, z.null()),
278904
280081
  makeFileType(FileType$2.OBS_SETS_JSON, DataType$3.OBS_SETS, ObsSetsJsonLoader, JsonSource, z.null()),
278905
280082
  // All AnnData file types
278906
- makeFileType(FileType$2.OBS_SETS_ANNDATA_ZARR, DataType$3.OBS_SETS, ObsSetsAnndataLoader, AnnDataSource, obsSetsAnndataSchema),
278907
- makeFileType(FileType$2.OBS_EMBEDDING_ANNDATA_ZARR, DataType$3.OBS_EMBEDDING, ObsEmbeddingAnndataLoader, AnnDataSource, obsEmbeddingAnndataSchema),
278908
- makeFileType(FileType$2.OBS_SPOTS_ANNDATA_ZARR, DataType$3.OBS_SPOTS, ObsSpotsAnndataLoader, AnnDataSource, obsSpotsAnndataSchema),
278909
- makeFileType(FileType$2.OBS_POINTS_ANNDATA_ZARR, DataType$3.OBS_POINTS, ObsPointsAnndataLoader, AnnDataSource, obsPointsAnndataSchema),
278910
- makeFileType(FileType$2.OBS_LOCATIONS_ANNDATA_ZARR, DataType$3.OBS_LOCATIONS, ObsLocationsAnndataLoader, AnnDataSource, obsLocationsAnndataSchema),
278911
- makeFileType(FileType$2.OBS_LABELS_ANNDATA_ZARR, DataType$3.OBS_LABELS, ObsLabelsAnndataLoader, AnnDataSource, obsLabelsAnndataSchema),
278912
- makeFileType(FileType$2.OBS_FEATURE_MATRIX_ANNDATA_ZARR, DataType$3.OBS_FEATURE_MATRIX, ObsFeatureMatrixAnndataLoader, AnnDataSource, obsFeatureMatrixAnndataSchema),
278913
- makeFileType(FileType$2.OBS_FEATURE_COLUMNS_ANNDATA_ZARR, DataType$3.OBS_FEATURE_MATRIX, ObsFeatureColumnsAnndataLoader, AnnDataSource, obsFeatureColumnsAnndataSchema),
278914
- makeFileType(FileType$2.OBS_SEGMENTATIONS_ANNDATA_ZARR, DataType$3.OBS_SEGMENTATIONS, ObsSegmentationsAnndataLoader, AnnDataSource, obsSegmentationsAnndataSchema),
278915
- makeFileType(FileType$2.FEATURE_LABELS_ANNDATA_ZARR, DataType$3.FEATURE_LABELS, FeatureLabelsAnndataLoader, AnnDataSource, featureLabelsAnndataSchema),
280083
+ ...makeZarrFileTypes(FileType$2.OBS_SETS_ANNDATA_ZARR, DataType$3.OBS_SETS, ObsSetsAnndataLoader, AnnDataSource, obsSetsAnndataSchema),
280084
+ ...makeZarrFileTypes(FileType$2.OBS_EMBEDDING_ANNDATA_ZARR, DataType$3.OBS_EMBEDDING, ObsEmbeddingAnndataLoader, AnnDataSource, obsEmbeddingAnndataSchema),
280085
+ ...makeZarrFileTypes(FileType$2.OBS_SPOTS_ANNDATA_ZARR, DataType$3.OBS_SPOTS, ObsSpotsAnndataLoader, AnnDataSource, obsSpotsAnndataSchema),
280086
+ ...makeZarrFileTypes(FileType$2.OBS_POINTS_ANNDATA_ZARR, DataType$3.OBS_POINTS, ObsPointsAnndataLoader, AnnDataSource, obsPointsAnndataSchema),
280087
+ ...makeZarrFileTypes(FileType$2.OBS_LOCATIONS_ANNDATA_ZARR, DataType$3.OBS_LOCATIONS, ObsLocationsAnndataLoader, AnnDataSource, obsLocationsAnndataSchema),
280088
+ ...makeZarrFileTypes(FileType$2.OBS_LABELS_ANNDATA_ZARR, DataType$3.OBS_LABELS, ObsLabelsAnndataLoader, AnnDataSource, obsLabelsAnndataSchema),
280089
+ ...makeZarrFileTypes(FileType$2.OBS_FEATURE_MATRIX_ANNDATA_ZARR, DataType$3.OBS_FEATURE_MATRIX, ObsFeatureMatrixAnndataLoader, AnnDataSource, obsFeatureMatrixAnndataSchema),
280090
+ ...makeZarrFileTypes(FileType$2.OBS_FEATURE_COLUMNS_ANNDATA_ZARR, DataType$3.OBS_FEATURE_MATRIX, ObsFeatureColumnsAnndataLoader, AnnDataSource, obsFeatureColumnsAnndataSchema),
280091
+ ...makeZarrFileTypes(FileType$2.OBS_SEGMENTATIONS_ANNDATA_ZARR, DataType$3.OBS_SEGMENTATIONS, ObsSegmentationsAnndataLoader, AnnDataSource, obsSegmentationsAnndataSchema),
280092
+ ...makeZarrFileTypes(FileType$2.FEATURE_LABELS_ANNDATA_ZARR, DataType$3.FEATURE_LABELS, FeatureLabelsAnndataLoader, AnnDataSource, featureLabelsAnndataSchema),
280093
+ ...makeZarrFileTypes(FileType$2.SAMPLE_EDGES_ANNDATA_ZARR, DataType$3.SAMPLE_EDGES, SampleEdgesAnndataLoader, AnnDataSource, sampleEdgesAnndataSchema),
278916
280094
  // All MuData file types
278917
280095
  makeFileType(FileType$2.OBS_SETS_MUDATA_ZARR, DataType$3.OBS_SETS, ObsSetsAnndataLoader, MuDataSource, obsSetsAnndataSchema),
278918
280096
  makeFileType(FileType$2.OBS_EMBEDDING_MUDATA_ZARR, DataType$3.OBS_EMBEDDING, ObsEmbeddingAnndataLoader, MuDataSource, obsEmbeddingAnndataSchema),
@@ -278938,6 +280116,7 @@ const baseFileTypes = [
278938
280116
  makeFileType(FileType$2.OBS_SPOTS_SPATIALDATA_ZARR, DataType$3.OBS_SPOTS, SpatialDataObsSpotsLoader, SpatialDataShapesSource, obsSpotsSpatialdataSchema),
278939
280117
  makeFileType(FileType$2.OBS_FEATURE_MATRIX_SPATIALDATA_ZARR, DataType$3.OBS_FEATURE_MATRIX, ObsFeatureMatrixAnndataLoader, SpatialDataTableSource, obsFeatureMatrixSpatialdataSchema),
278940
280118
  makeFileType(FileType$2.OBS_SETS_SPATIALDATA_ZARR, DataType$3.OBS_SETS, SpatialDataObsSetsLoader, SpatialDataTableSource, obsSetsSpatialdataSchema),
280119
+ makeFileType(FileType$2.FEATURE_LABELS_SPATIALDATA_ZARR, DataType$3.FEATURE_LABELS, FeatureLabelsAnndataLoader, SpatialDataTableSource, featureLabelsAnndataSchema),
278941
280120
  // All legacy file types
278942
280121
  makeFileType(FileType$2.OBS_FEATURE_MATRIX_EXPRESSION_MATRIX_ZARR, DataType$3.OBS_FEATURE_MATRIX, MatrixZarrAsObsFeatureMatrixLoader, ZarrDataSource, z.null()),
278943
280122
  makeFileType(FileType$2.IMAGE_RASTER_JSON, DataType$3.IMAGE, RasterJsonAsImageLoader, JsonSource, rasterJsonSchema),
@@ -278956,6 +280135,7 @@ const baseFileTypes = [
278956
280135
  ];
278957
280136
  const baseJointFileTypes = [
278958
280137
  new PluginJointFileType(FileType$2.ANNDATA_ZARR, expandAnndataZarr, anndataZarrSchema),
280138
+ new PluginJointFileType(FileType$2.ANNDATA_ZARR_ZIP, expandAnndataZarr, anndataZarrSchema),
278959
280139
  new PluginJointFileType(FileType$2.SPATIALDATA_ZARR, expandSpatialdataZarr, spatialdataZarrSchema),
278960
280140
  // For legacy file types:
278961
280141
  new PluginJointFileType(FileType$2.ANNDATA_CELLS_ZARR, expandAnndataCellsZarr, anndataCellsZarrSchema),
@@ -279077,7 +280257,9 @@ const baseCoordinationTypes = [
279077
280257
  new PluginCoordinationType(CoordinationType$2.LEGEND_VISIBLE, true, z.boolean()),
279078
280258
  new PluginCoordinationType(CoordinationType$2.SPATIAL_CHANNEL_LABELS_VISIBLE, true, z.boolean()),
279079
280259
  new PluginCoordinationType(CoordinationType$2.SPATIAL_CHANNEL_LABELS_ORIENTATION, "vertical", z.enum(["vertical", "horizontal"])),
279080
- new PluginCoordinationType(CoordinationType$2.SPATIAL_CHANNEL_LABEL_SIZE, 14, z.number())
280260
+ new PluginCoordinationType(CoordinationType$2.SPATIAL_CHANNEL_LABEL_SIZE, 14, z.number()),
280261
+ new PluginCoordinationType(CoordinationType$2.SAMPLE_TYPE, null, z.string().nullable()),
280262
+ new PluginCoordinationType(CoordinationType$2.SAMPLE_SET_SELECTION, null, z.array(z.string()).nullable())
279081
280263
  ];
279082
280264
  function Vitessce(props2) {
279083
280265
  const { config: config3, onConfigUpgrade, pluginViewTypes: pluginViewTypesProp, pluginFileTypes: pluginFileTypesProp, pluginCoordinationTypes: pluginCoordinationTypesProp, pluginJointFileTypes: pluginJointFileTypesProp } = props2;