vitessce 3.3.9 → 3.3.10

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.
@@ -250,8 +250,11 @@ const Pn = {
250
250
  PHOTOMETRIC_INTERPRETATION: "photometricInterpretation",
251
251
  // For 3D volume rendering
252
252
  SPATIAL_RENDERING_MODE: "spatialRenderingMode",
253
+ // For whole spatial view
253
254
  VOLUMETRIC_RENDERING_ALGORITHM: "volumetricRenderingAlgorithm",
255
+ // Could be per-image-layer
254
256
  SPATIAL_TARGET_RESOLUTION: "spatialTargetResolution",
257
+ // Per-spatial-layer
255
258
  // For clipping plane sliders
256
259
  SPATIAL_SLICE_X: "spatialSliceX",
257
260
  SPATIAL_SLICE_Y: "spatialSliceY",
@@ -260,10 +263,12 @@ const Pn = {
260
263
  SPOT_LAYER: "spotLayer",
261
264
  POINT_LAYER: "pointLayer",
262
265
  SPATIAL_SPOT_RADIUS: "spatialSpotRadius",
266
+ // In micrometers?
263
267
  SPATIAL_SPOT_FILLED: "spatialSpotFilled",
264
268
  SPATIAL_SPOT_STROKE_WIDTH: "spatialSpotStrokeWidth",
265
269
  SPATIAL_LAYER_COLOR: "spatialLayerColor",
266
270
  PIXEL_HIGHLIGHT: "pixelHighlight",
271
+ // Per-image-layer
267
272
  TOOLTIP_CROSSHAIRS_VISIBLE: "tooltipCrosshairsVisible",
268
273
  LEGEND_VISIBLE: "legendVisible",
269
274
  SPATIAL_CHANNEL_LABELS_VISIBLE: "spatialChannelLabelsVisible",
@@ -740,7 +745,7 @@ const Pn = {
740
745
  ne.FEATURE_HIGHLIGHT,
741
746
  ne.FEATURE_SELECTION
742
747
  ]
743
- }, Qdt = "This file is autogenerated by .changeset/post-changelog.mjs.", wdt = "3.3.9", xdt = "2024-03-22", Rdt = "changeset-release/main", Ddt = "da07c69b", Tdt = {
748
+ }, Qdt = "This file is autogenerated by .changeset/post-changelog.mjs.", wdt = "3.3.10", xdt = "2024-04-01", Rdt = "changeset-release/main", Ddt = "bed2e0da", Tdt = {
744
749
  note: Qdt,
745
750
  version: wdt,
746
751
  date: xdt,
@@ -1542,6 +1547,7 @@ class Fz {
1542
1547
  component: e,
1543
1548
  coordinationScopes: n,
1544
1549
  coordinationScopesBy: void 0,
1550
+ // TODO: initialize from parameter?
1545
1551
  x: r,
1546
1552
  y: i,
1547
1553
  w: o,
@@ -21253,8 +21259,11 @@ const l6e = Ie.object({
21253
21259
  grayDark: "#555555",
21254
21260
  black: "#000000",
21255
21261
  grayDarkL5: "rgb(98, 98, 98)",
21262
+ // lighten(map-get($global-colors, "gray-dark"), 5%);
21256
21263
  grayDarkD15: "rgb(47, 47, 47)",
21264
+ // darken(map-get($global-colors, "gray-dark"), 15%);
21257
21265
  grayMidL10: "rgb(154, 154, 154)",
21266
+ // lighten(map-get($global-colors, "gray-mid"), 10%);
21258
21267
  grayLightL10: "rgb(237, 237, 237)"
21259
21268
  // lighten(map-get($global-colors, "gray-light"), 10%);
21260
21269
  }, vV = {
@@ -21309,8 +21318,11 @@ const l6e = Ie.object({
21309
21318
  primaryBackgroundLight: "#e0e0e0",
21310
21319
  primaryForeground: "#333333",
21311
21320
  primaryForegroundL5: "rgb(64, 64, 64)",
21321
+ // lighten(map-get($theme-colors, "primary-foreground"), 5%);
21312
21322
  primaryForegroundL10: "rgb(77, 77, 77)",
21323
+ // lighten(map-get($theme-colors, "primary-foreground"), 10%);
21313
21324
  primaryForegroundD15: "rgb(13, 13, 13)",
21325
+ // darken(map-get($theme-colors, "primary-foreground"), 15%);
21314
21326
  primaryForegroundDim: "#808080",
21315
21327
  primaryForegroundActive: "#0074D9",
21316
21328
  secondaryBackground: "#F1F1F1",
@@ -21986,9 +21998,11 @@ function B6e(t, e) {
21986
21998
  function WI(t, e, n, r, i) {
21987
21999
  const o = ht(() => n?.[r]?.[i] ? {
21988
22000
  ...e,
22001
+ // TODO: this is needed for falling back to view-level coordination scopes, but does it affect performance?
21989
22002
  [i]: Object.values(n[r][i]).flat()
21990
22003
  } : e?.[i] && Array.isArray(e[i]) ? {
21991
22004
  ...e,
22005
+ // TODO: this is needed for falling back to view-level coordination scopes, but does it affect performance?
21992
22006
  [i]: e[i]
21993
22007
  } : { [i]: [] }, [n, r, i]), [a, s] = dA(t, o, n, i), A = ht(() => {
21994
22008
  const c = {};
@@ -28502,28 +28516,41 @@ function T6t(t, e, n, r) {
28502
28516
  ), [a, s] = b6t(n, r, !1, o, 2);
28503
28517
  return [a, s];
28504
28518
  }
28519
+ class Ii {
28520
+ /**
28521
+ * @param {LoaderDataType} data
28522
+ * @param {object[]|string|null} url Single URL or array of { url, name } objects.
28523
+ * @param {object|null} coordinationValues
28524
+ */
28525
+ constructor(e, n, r = null) {
28526
+ this.data = e, this.url = n, this.coordinationValues = r;
28527
+ }
28528
+ }
28505
28529
  class N6t {
28530
+ /**
28531
+ *
28532
+ * @param {LoaderParams} params
28533
+ */
28506
28534
  constructor({ type: e, fileType: n, url: r, requestInit: i, options: o, coordinationValues: a }) {
28507
28535
  this.fileType = n, this.type = e, this.url = r, this.requestInit = i, this.options = o, this.coordinationValues = a;
28508
28536
  }
28537
+ /**
28538
+ *
28539
+ * @returns {Promise<LoaderResult<any>>}
28540
+ */
28509
28541
  // eslint-disable-next-line class-methods-use-this
28510
- load() {
28511
- return Promise.resolve(!0);
28542
+ async load() {
28543
+ return Promise.resolve(new Ii(!0, null));
28512
28544
  }
28513
28545
  }
28514
28546
  class VA extends N6t {
28515
- constructor(e, n) {
28516
- super(n), this.dataSource = e;
28517
- }
28518
- }
28519
- class mi {
28520
28547
  /**
28521
- * @param {*} data
28522
- * @param {object[]|string|null} url Single URL or array of { url, name } objects.
28523
- * @param {object} coordinationValues
28548
+ *
28549
+ * @param {DataSourceType} dataSource
28550
+ * @param {LoaderParams} params
28524
28551
  */
28525
- constructor(e, n, r = null) {
28526
- this.data = e, this.url = n, this.coordinationValues = r;
28552
+ constructor(e, n) {
28553
+ super(n), this.dataSource = e;
28527
28554
  }
28528
28555
  }
28529
28556
  const p8 = {
@@ -33860,7 +33887,7 @@ var gHt = THe(","), hHt = gHt.parse, one = { exports: {} };
33860
33887
  );
33861
33888
  }
33862
33889
  }]), F;
33863
- }(ot), kt = Gt, St = {}, Yn = St.LEFT_BRACE = 1, $r = St.RIGHT_BRACE = 2, ui = St.LEFT_BRACKET = 3, qi = St.RIGHT_BRACKET = 4, Ii = St.COLON = 5, no = St.COMMA = 6, So = St.TRUE = 7, Rr = St.FALSE = 8, QEe = St.NULL = 9, iP = St.STRING = 10, wEe = St.NUMBER = 11, xy = St.START = 17, xEe = St.STOP = 18, REe = St.TRUE1 = 33, DEe = St.TRUE2 = 34, TEe = St.TRUE3 = 35, NEe = St.FALSE1 = 49, LEe = St.FALSE2 = 50, MEe = St.FALSE3 = 51, OEe = St.FALSE4 = 52, FEe = St.NULL1 = 65, PEe = St.NULL2 = 66, kEe = St.NULL3 = 67, GEe = St.NUMBER1 = 81, Dz = St.NUMBER3 = 83, Rh = St.STRING1 = 97, UEe = St.STRING2 = 98, HEe = St.STRING3 = 99, Xht = St.STRING4 = 100, Zht = St.STRING5 = 101, $Ee = St.STRING6 = 102, bb = St.VALUE = 113, Tz = St.KEY = 114, oP = St.OBJECT = 129, aP = St.ARRAY = 130, edt = "\\".charCodeAt(0), tdt = "/".charCodeAt(0), ndt = "\b".charCodeAt(0), rdt = "\f".charCodeAt(0), idt = `
33890
+ }(ot), kt = Gt, St = {}, Yn = St.LEFT_BRACE = 1, $r = St.RIGHT_BRACE = 2, ui = St.LEFT_BRACKET = 3, qi = St.RIGHT_BRACKET = 4, mi = St.COLON = 5, no = St.COMMA = 6, So = St.TRUE = 7, Rr = St.FALSE = 8, QEe = St.NULL = 9, iP = St.STRING = 10, wEe = St.NUMBER = 11, xy = St.START = 17, xEe = St.STOP = 18, REe = St.TRUE1 = 33, DEe = St.TRUE2 = 34, TEe = St.TRUE3 = 35, NEe = St.FALSE1 = 49, LEe = St.FALSE2 = 50, MEe = St.FALSE3 = 51, OEe = St.FALSE4 = 52, FEe = St.NULL1 = 65, PEe = St.NULL2 = 66, kEe = St.NULL3 = 67, GEe = St.NUMBER1 = 81, Dz = St.NUMBER3 = 83, Rh = St.STRING1 = 97, UEe = St.STRING2 = 98, HEe = St.STRING3 = 99, Xht = St.STRING4 = 100, Zht = St.STRING5 = 101, $Ee = St.STRING6 = 102, bb = St.VALUE = 113, Tz = St.KEY = 114, oP = St.OBJECT = 129, aP = St.ARRAY = 130, edt = "\\".charCodeAt(0), tdt = "/".charCodeAt(0), ndt = "\b".charCodeAt(0), rdt = "\f".charCodeAt(0), idt = `
33864
33891
  `.charCodeAt(0), odt = "\r".charCodeAt(0), adt = " ".charCodeAt(0), sP = 64 * 1024;
33865
33892
  function Ym() {
33866
33893
  this.tState = xy, this.value = void 0, this.string = void 0, this.stringBuffer = Z.alloc ? Z.alloc(sP) : new Z(sP), this.stringBufferOffset = 0, this.unicode = void 0, this.highSurrogate = void 0, this.key = void 0, this.mode = void 0, this.stack = [], this.state = bb, this.bytes_remaining = 0, this.bytes_in_sequence = 0, this.temp_buffs = { 2: new Z(2), 3: new Z(3), 4: new Z(4) }, this.offset = -1;
@@ -33896,7 +33923,7 @@ var gHt = THe(","), hHt = gHt.parse, one = { exports: {} };
33896
33923
  else if (F === 93)
33897
33924
  this.onToken(qi, "]");
33898
33925
  else if (F === 58)
33899
- this.onToken(Ii, ":");
33926
+ this.onToken(mi, ":");
33900
33927
  else if (F === 44)
33901
33928
  this.onToken(no, ",");
33902
33929
  else if (F === 116)
@@ -34074,13 +34101,13 @@ var gHt = THe(","), hHt = gHt.parse, one = { exports: {} };
34074
34101
  return this.parseError(U, F);
34075
34102
  else if (this.state === Tz)
34076
34103
  if (U === iP)
34077
- this.key = F, this.state = Ii;
34104
+ this.key = F, this.state = mi;
34078
34105
  else if (U === $r)
34079
34106
  this.pop();
34080
34107
  else
34081
34108
  return this.parseError(U, F);
34082
- else if (this.state === Ii)
34083
- if (U === Ii)
34109
+ else if (this.state === mi)
34110
+ if (U === mi)
34084
34111
  this.state = bb;
34085
34112
  else
34086
34113
  return this.parseError(U, F);
@@ -39017,7 +39044,9 @@ const yYt = /* @__PURE__ */ HE(EYt), Xm = 32, KM = Gr((t) => ({
39017
39044
  height: "auto",
39018
39045
  display: "block",
39019
39046
  paddingRight: "17px",
39047
+ /* Increase/decrease this value for cross-browser compatibility */
39020
39048
  boxSizing: "content-box",
39049
+ /* So the width will be 100% + 17px */
39021
39050
  "@global .rc-tree": {
39022
39051
  paddingLeft: "0",
39023
39052
  margin: "0",
@@ -39315,6 +39344,7 @@ const yYt = /* @__PURE__ */ HE(EYt), Xm = 32, KM = Gr((t) => ({
39315
39344
  maxWidth: "250px",
39316
39345
  visibility: "visible",
39317
39346
  paddingTop: "8px",
39347
+ // Assumes placement: 'top'
39318
39348
  ...N_e,
39319
39349
  "@global .rc-tooltip-inner": {
39320
39350
  fontSize: "10px",
@@ -39342,6 +39372,7 @@ const yYt = /* @__PURE__ */ HE(EYt), Xm = 32, KM = Gr((t) => ({
39342
39372
  cursor: "auto",
39343
39373
  userSelect: "text",
39344
39374
  paddingBottom: "10px",
39375
+ // Assumes placement: 'top'
39345
39376
  "&.rc-tooltip-placement-top": {
39346
39377
  paddingBottom: "10px"
39347
39378
  },
@@ -75746,8 +75777,8 @@ var Wt = function(t) {
75746
75777
  }
75747
75778
  function Ot(S, x, T) {
75748
75779
  S = S | 0, x = x | 0, T = T | 0;
75749
- var P = 0, H = 0, J = 0, h = 0, p = 0, E = 0, B = 0, D = 0, j = 0, te = 0, he = 0, Se = 0, Le = 0, Ve = 0, et = 0, Ke = 0, ot = 0, je = 0, Et = 0, Gt = 0, kt = 0, St = 0, Yn = 0, $r = 0, ui = 0, qi = 0, Ii = 0, no = 0, So = 0, Rr = 0;
75750
- if (Rr = He, He = He + 112 | 0, qi = Rr + 80 | 0, E = Rr + 72 | 0, Ii = Rr, no = Rr + 56 | 0, B = S + 8 | 0, So = wA((_[B >> 2] << 5) + 32 | 0) | 0, So || Zt(22848, 22448, 800, 22456), Jo(S, So), J = S, P = _[J + 4 >> 2] | 0, p = E, _[p >> 2] = _[J >> 2], _[p + 4 >> 2] = P, rA(E, qi), p = Sc(qi, x) | 0, P = _[E >> 2] | 0, J = _[B >> 2] | 0, (J | 0) > 0) {
75780
+ var P = 0, H = 0, J = 0, h = 0, p = 0, E = 0, B = 0, D = 0, j = 0, te = 0, he = 0, Se = 0, Le = 0, Ve = 0, et = 0, Ke = 0, ot = 0, je = 0, Et = 0, Gt = 0, kt = 0, St = 0, Yn = 0, $r = 0, ui = 0, qi = 0, mi = 0, no = 0, So = 0, Rr = 0;
75781
+ if (Rr = He, He = He + 112 | 0, qi = Rr + 80 | 0, E = Rr + 72 | 0, mi = Rr, no = Rr + 56 | 0, B = S + 8 | 0, So = wA((_[B >> 2] << 5) + 32 | 0) | 0, So || Zt(22848, 22448, 800, 22456), Jo(S, So), J = S, P = _[J + 4 >> 2] | 0, p = E, _[p >> 2] = _[J >> 2], _[p + 4 >> 2] = P, rA(E, qi), p = Sc(qi, x) | 0, P = _[E >> 2] | 0, J = _[B >> 2] | 0, (J | 0) > 0) {
75751
75782
  h = _[S + 12 >> 2] | 0, H = 0;
75752
75783
  do
75753
75784
  P = (_[h + (H << 3) >> 2] | 0) + P | 0, H = H + 1 | 0;
@@ -75772,20 +75803,20 @@ var Wt = function(t) {
75772
75803
  t:
75773
75804
  for (; ; ) {
75774
75805
  for (Le = _[qi >> 2] | 0, he = 0, Se = 0, J = 0; ; ) {
75775
- h = Ii, p = h + 56 | 0;
75806
+ h = mi, p = h + 56 | 0;
75776
75807
  do
75777
75808
  _[h >> 2] = 0, h = h + 4 | 0;
75778
75809
  while ((h | 0) < (p | 0));
75779
- if (x = je + (he << 3) | 0, E = _[x >> 2] | 0, x = _[x + 4 >> 2] | 0, tA(E, x, 1, Ii, 0) | 0) {
75780
- h = Ii, p = h + 56 | 0;
75810
+ if (x = je + (he << 3) | 0, E = _[x >> 2] | 0, x = _[x + 4 >> 2] | 0, tA(E, x, 1, mi, 0) | 0) {
75811
+ h = mi, p = h + 56 | 0;
75781
75812
  do
75782
75813
  _[h >> 2] = 0, h = h + 4 | 0;
75783
75814
  while ((h | 0) < (p | 0));
75784
- h = xA(7, 4) | 0, h | 0 && (Zi(E, x, 1, Ii, h, 7, 0), Fr(h));
75815
+ h = xA(7, 4) | 0, h | 0 && (Zi(E, x, 1, mi, h, 7, 0), Fr(h));
75785
75816
  }
75786
75817
  te = 0;
75787
75818
  do {
75788
- j = Ii + (te << 3) | 0, D = _[j >> 2] | 0, j = _[j + 4 >> 2] | 0;
75819
+ j = mi + (te << 3) | 0, D = _[j >> 2] | 0, j = _[j + 4 >> 2] | 0;
75789
75820
  n:
75790
75821
  do
75791
75822
  if (!((D | 0) == 0 & (j | 0) == 0)) {
@@ -76360,26 +76391,26 @@ var Wt = function(t) {
76360
76391
  }
76361
76392
  function pu(S, x, T, P, H) {
76362
76393
  S = S | 0, x = x | 0, T = T | 0, P = P | 0, H = H | 0;
76363
- var J = 0, h = 0, p = 0, E = 0, B = 0, D = 0, j = 0, te = 0, he = 0, Se = 0, Le = 0, Ve = 0, et = 0, Ke = 0, ot = 0, je = 0, Et = 0, Gt = 0, kt = 0, St = 0, Yn = 0, $r = 0, ui = 0, qi = 0, Ii = 0, no = 0, So = 0, Rr = 0;
76364
- if (no = He, He = He + 272 | 0, J = no + 256 | 0, Ke = no + 240 | 0, ui = no, qi = no + 224 | 0, Ii = no + 208 | 0, ot = no + 176 | 0, je = no + 160 | 0, Et = no + 192 | 0, Gt = no + 144 | 0, kt = no + 128 | 0, St = no + 112 | 0, Yn = no + 96 | 0, $r = no + 80 | 0, _[J >> 2] = x, _[Ke >> 2] = _[S >> 2], _[Ke + 4 >> 2] = _[S + 4 >> 2], _[Ke + 8 >> 2] = _[S + 8 >> 2], _[Ke + 12 >> 2] = _[S + 12 >> 2], ph(Ke, J, ui), _[H >> 2] = 0, Ke = P + T + ((P | 0) == 5 & 1) | 0, (Ke | 0) <= (T | 0)) {
76394
+ var J = 0, h = 0, p = 0, E = 0, B = 0, D = 0, j = 0, te = 0, he = 0, Se = 0, Le = 0, Ve = 0, et = 0, Ke = 0, ot = 0, je = 0, Et = 0, Gt = 0, kt = 0, St = 0, Yn = 0, $r = 0, ui = 0, qi = 0, mi = 0, no = 0, So = 0, Rr = 0;
76395
+ if (no = He, He = He + 272 | 0, J = no + 256 | 0, Ke = no + 240 | 0, ui = no, qi = no + 224 | 0, mi = no + 208 | 0, ot = no + 176 | 0, je = no + 160 | 0, Et = no + 192 | 0, Gt = no + 144 | 0, kt = no + 128 | 0, St = no + 112 | 0, Yn = no + 96 | 0, $r = no + 80 | 0, _[J >> 2] = x, _[Ke >> 2] = _[S >> 2], _[Ke + 4 >> 2] = _[S + 4 >> 2], _[Ke + 8 >> 2] = _[S + 8 >> 2], _[Ke + 12 >> 2] = _[S + 12 >> 2], ph(Ke, J, ui), _[H >> 2] = 0, Ke = P + T + ((P | 0) == 5 & 1) | 0, (Ke | 0) <= (T | 0)) {
76365
76396
  He = no;
76366
76397
  return;
76367
76398
  }
76368
- E = _[J >> 2] | 0, B = qi + 4 | 0, D = ot + 4 | 0, j = T + 5 | 0, te = 16848 + (E << 2) | 0, he = 16928 + (E << 2) | 0, Se = kt + 8 | 0, Le = St + 8 | 0, Ve = Yn + 8 | 0, et = Ii + 4 | 0, p = T;
76399
+ E = _[J >> 2] | 0, B = qi + 4 | 0, D = ot + 4 | 0, j = T + 5 | 0, te = 16848 + (E << 2) | 0, he = 16928 + (E << 2) | 0, Se = kt + 8 | 0, Le = St + 8 | 0, Ve = Yn + 8 | 0, et = mi + 4 | 0, p = T;
76369
76400
  e:
76370
76401
  for (; ; ) {
76371
- h = ui + (((p | 0) % 5 | 0) << 4) | 0, _[Ii >> 2] = _[h >> 2], _[Ii + 4 >> 2] = _[h + 4 >> 2], _[Ii + 8 >> 2] = _[h + 8 >> 2], _[Ii + 12 >> 2] = _[h + 12 >> 2];
76402
+ h = ui + (((p | 0) % 5 | 0) << 4) | 0, _[mi >> 2] = _[h >> 2], _[mi + 4 >> 2] = _[h + 4 >> 2], _[mi + 8 >> 2] = _[h + 8 >> 2], _[mi + 12 >> 2] = _[h + 12 >> 2];
76372
76403
  do
76373
76404
  ;
76374
- while ((cf(Ii, E, 0, 1) | 0) == 2);
76405
+ while ((cf(mi, E, 0, 1) | 0) == 2);
76375
76406
  if ((p | 0) > (T | 0) & (ks(x) | 0) != 0) {
76376
- if (_[ot >> 2] = _[Ii >> 2], _[ot + 4 >> 2] = _[Ii + 4 >> 2], _[ot + 8 >> 2] = _[Ii + 8 >> 2], _[ot + 12 >> 2] = _[Ii + 12 >> 2], Ur(B, je), P = _[ot >> 2] | 0, J = _[17008 + (P * 80 | 0) + (_[qi >> 2] << 2) >> 2] | 0, _[ot >> 2] = _[18608 + (P * 80 | 0) + (J * 20 | 0) >> 2], h = _[18608 + (P * 80 | 0) + (J * 20 | 0) + 16 >> 2] | 0, (h | 0) > 0) {
76407
+ if (_[ot >> 2] = _[mi >> 2], _[ot + 4 >> 2] = _[mi + 4 >> 2], _[ot + 8 >> 2] = _[mi + 8 >> 2], _[ot + 12 >> 2] = _[mi + 12 >> 2], Ur(B, je), P = _[ot >> 2] | 0, J = _[17008 + (P * 80 | 0) + (_[qi >> 2] << 2) >> 2] | 0, _[ot >> 2] = _[18608 + (P * 80 | 0) + (J * 20 | 0) >> 2], h = _[18608 + (P * 80 | 0) + (J * 20 | 0) + 16 >> 2] | 0, (h | 0) > 0) {
76377
76408
  S = 0;
76378
76409
  do
76379
76410
  ag(D), S = S + 1 | 0;
76380
76411
  while ((S | 0) < (h | 0));
76381
76412
  }
76382
- switch (h = 18608 + (P * 80 | 0) + (J * 20 | 0) + 4 | 0, _[Et >> 2] = _[h >> 2], _[Et + 4 >> 2] = _[h + 4 >> 2], _[Et + 8 >> 2] = _[h + 8 >> 2], Pi(Et, (_[te >> 2] | 0) * 3 | 0), Sr(D, Et, D), Jn(D), Ur(D, Gt), So = +(_[he >> 2] | 0), _e[kt >> 3] = So * 3, _e[Se >> 3] = 0, Rr = So * -1.5, _e[St >> 3] = Rr, _e[Le >> 3] = So * 2.598076211353316, _e[Yn >> 3] = Rr, _e[Ve >> 3] = So * -2.598076211353316, _[17008 + ((_[ot >> 2] | 0) * 80 | 0) + (_[Ii >> 2] << 2) >> 2] | 0) {
76413
+ switch (h = 18608 + (P * 80 | 0) + (J * 20 | 0) + 4 | 0, _[Et >> 2] = _[h >> 2], _[Et + 4 >> 2] = _[h + 4 >> 2], _[Et + 8 >> 2] = _[h + 8 >> 2], Pi(Et, (_[te >> 2] | 0) * 3 | 0), Sr(D, Et, D), Jn(D), Ur(D, Gt), So = +(_[he >> 2] | 0), _e[kt >> 3] = So * 3, _e[Se >> 3] = 0, Rr = So * -1.5, _e[St >> 3] = Rr, _e[Le >> 3] = So * 2.598076211353316, _e[Yn >> 3] = Rr, _e[Ve >> 3] = So * -2.598076211353316, _[17008 + ((_[ot >> 2] | 0) * 80 | 0) + (_[mi >> 2] << 2) >> 2] | 0) {
76383
76414
  case 1: {
76384
76415
  S = St, P = kt;
76385
76416
  break;
@@ -76399,7 +76430,7 @@ var Wt = function(t) {
76399
76430
  }
76400
76431
  pf(je, Gt, P, S, $r), aa($r, _[ot >> 2] | 0, E, 1, H + 8 + (_[H >> 2] << 4) | 0), _[H >> 2] = (_[H >> 2] | 0) + 1;
76401
76432
  }
76402
- if ((p | 0) < (j | 0) && (Ur(et, ot), aa(ot, _[Ii >> 2] | 0, E, 1, H + 8 + (_[H >> 2] << 4) | 0), _[H >> 2] = (_[H >> 2] | 0) + 1), _[qi >> 2] = _[Ii >> 2], _[qi + 4 >> 2] = _[Ii + 4 >> 2], _[qi + 8 >> 2] = _[Ii + 8 >> 2], _[qi + 12 >> 2] = _[Ii + 12 >> 2], p = p + 1 | 0, (p | 0) >= (Ke | 0)) {
76433
+ if ((p | 0) < (j | 0) && (Ur(et, ot), aa(ot, _[mi >> 2] | 0, E, 1, H + 8 + (_[H >> 2] << 4) | 0), _[H >> 2] = (_[H >> 2] | 0) + 1), _[qi >> 2] = _[mi >> 2], _[qi + 4 >> 2] = _[mi + 4 >> 2], _[qi + 8 >> 2] = _[mi + 8 >> 2], _[qi + 12 >> 2] = _[mi + 12 >> 2], p = p + 1 | 0, (p | 0) >= (Ke | 0)) {
76403
76434
  S = 3;
76404
76435
  break;
76405
76436
  }
@@ -77730,7 +77761,7 @@ var Wt = function(t) {
77730
77761
  }
77731
77762
  function Aa(S) {
77732
77763
  S = S | 0;
77733
- var x = 0, T = 0, P = 0, H = 0, J = 0, h = 0, p = 0, E = 0, B = 0, D = 0, j = 0, te = 0, he = 0, Se = 0, Le = 0, Ve = 0, et = 0, Ke = 0, ot = 0, je = 0, Et = 0, Gt = 0, kt = 0, St = 0, Yn = 0, $r = 0, ui = 0, qi = 0, Ii = 0, no = 0, So = 0, Rr = 0;
77764
+ var x = 0, T = 0, P = 0, H = 0, J = 0, h = 0, p = 0, E = 0, B = 0, D = 0, j = 0, te = 0, he = 0, Se = 0, Le = 0, Ve = 0, et = 0, Ke = 0, ot = 0, je = 0, Et = 0, Gt = 0, kt = 0, St = 0, Yn = 0, $r = 0, ui = 0, qi = 0, mi = 0, no = 0, So = 0, Rr = 0;
77734
77765
  if (H = S + 8 | 0, _[H >> 2] | 0)
77735
77766
  return Rr = 1, Rr | 0;
77736
77767
  if (P = _[S >> 2] | 0, !P)
@@ -77741,7 +77772,7 @@ var Wt = function(t) {
77741
77772
  while (x | 0);
77742
77773
  if (T >>> 0 < 2)
77743
77774
  return Rr = 0, Rr | 0;
77744
- no = wA(T << 2) | 0, no || Zt(22807, 22646, 317, 22826), Ii = wA(T << 5) | 0, Ii || Zt(22848, 22646, 321, 22826), _[S >> 2] = 0, Gt = S + 4 | 0, _[Gt >> 2] = 0, _[H >> 2] = 0, T = 0, qi = 0, Et = 0, j = 0;
77775
+ no = wA(T << 2) | 0, no || Zt(22807, 22646, 317, 22826), mi = wA(T << 5) | 0, mi || Zt(22848, 22646, 321, 22826), _[S >> 2] = 0, Gt = S + 4 | 0, _[Gt >> 2] = 0, _[H >> 2] = 0, T = 0, qi = 0, Et = 0, j = 0;
77745
77776
  e:
77746
77777
  for (; ; ) {
77747
77778
  if (D = _[P >> 2] | 0, D) {
@@ -77786,8 +77817,8 @@ var Wt = function(t) {
77786
77817
  break;
77787
77818
  }
77788
77819
  while (0);
77789
- if (_[h >> 2] = P, _[H >> 2] = P, h = Ii + (Et << 5) | 0, B = _[P >> 2] | 0, B) {
77790
- for (D = Ii + (Et << 5) + 8 | 0, _e[D >> 3] = 17976931348623157e292, j = Ii + (Et << 5) + 24 | 0, _e[j >> 3] = 17976931348623157e292, _e[h >> 3] = -17976931348623157e292, te = Ii + (Et << 5) + 16 | 0, _e[te >> 3] = -17976931348623157e292, et = 17976931348623157e292, Ke = -17976931348623157e292, H = 0, he = B, E = 17976931348623157e292, Le = 17976931348623157e292, Ve = -17976931348623157e292, p = -17976931348623157e292; J = +_e[he >> 3], je = +_e[he + 8 >> 3], he = _[he + 16 >> 2] | 0, Se = (he | 0) == 0, ot = +_e[(Se ? B : he) + 8 >> 3], J < E && (_e[D >> 3] = J, E = J), je < Le && (_e[j >> 3] = je, Le = je), J > Ve ? _e[h >> 3] = J : J = Ve, je > p && (_e[te >> 3] = je, p = je), et = je > 0 & je < et ? je : et, Ke = je < 0 & je > Ke ? je : Ke, H = H | +tt(+(je - ot)) > 3.141592653589793, !Se; )
77820
+ if (_[h >> 2] = P, _[H >> 2] = P, h = mi + (Et << 5) | 0, B = _[P >> 2] | 0, B) {
77821
+ for (D = mi + (Et << 5) + 8 | 0, _e[D >> 3] = 17976931348623157e292, j = mi + (Et << 5) + 24 | 0, _e[j >> 3] = 17976931348623157e292, _e[h >> 3] = -17976931348623157e292, te = mi + (Et << 5) + 16 | 0, _e[te >> 3] = -17976931348623157e292, et = 17976931348623157e292, Ke = -17976931348623157e292, H = 0, he = B, E = 17976931348623157e292, Le = 17976931348623157e292, Ve = -17976931348623157e292, p = -17976931348623157e292; J = +_e[he >> 3], je = +_e[he + 8 >> 3], he = _[he + 16 >> 2] | 0, Se = (he | 0) == 0, ot = +_e[(Se ? B : he) + 8 >> 3], J < E && (_e[D >> 3] = J, E = J), je < Le && (_e[j >> 3] = je, Le = je), J > Ve ? _e[h >> 3] = J : J = Ve, je > p && (_e[te >> 3] = je, p = je), et = je > 0 & je < et ? je : et, Ke = je < 0 & je > Ke ? je : Ke, H = H | +tt(+(je - ot)) > 3.141592653589793, !Se; )
77791
77822
  Ve = J;
77792
77823
  H && (_e[te >> 3] = Ke, _e[j >> 3] = et);
77793
77824
  } else
@@ -77828,7 +77859,7 @@ var Wt = function(t) {
77828
77859
  if ($r)
77829
77860
  T = 0;
77830
77861
  else {
77831
- for (H = 0, T = 0, h = S; P = Ii + (H << 5) | 0, Qa(_[h >> 2] | 0, P, _[kt >> 2] | 0) | 0 ? (_[Et + (T << 2) >> 2] = h, _[Gt + (T << 2) >> 2] = P, Se = T + 1 | 0) : Se = T, h = _[h + 8 >> 2] | 0, h; )
77862
+ for (H = 0, T = 0, h = S; P = mi + (H << 5) | 0, Qa(_[h >> 2] | 0, P, _[kt >> 2] | 0) | 0 ? (_[Et + (T << 2) >> 2] = h, _[Gt + (T << 2) >> 2] = P, Se = T + 1 | 0) : Se = T, h = _[h + 8 >> 2] | 0, h; )
77832
77863
  H = H + 1 | 0, T = Se;
77833
77864
  if ((Se | 0) > 0)
77834
77865
  if (P = _[Et >> 2] | 0, (Se | 0) == 1)
@@ -77872,7 +77903,7 @@ var Wt = function(t) {
77872
77903
  } else
77873
77904
  So = 0;
77874
77905
  while (0);
77875
- return Fr(no), Fr(Ii), Rr = So, Rr | 0;
77906
+ return Fr(no), Fr(mi), Rr = So, Rr | 0;
77876
77907
  }
77877
77908
  return 0;
77878
77909
  }
@@ -118985,16 +119016,16 @@ async function $9n(t) {
118985
119016
  const n = await e();
118986
119017
  return new n(t);
118987
119018
  }
118988
- Qm([void 0, 1], () => import("./raw-15023863.js").then((t) => t.default));
118989
- Qm(5, () => import("./lzw-825aac19.js").then((t) => t.default));
119019
+ Qm([void 0, 1], () => import("./raw-6efac994.js").then((t) => t.default));
119020
+ Qm(5, () => import("./lzw-672294ac.js").then((t) => t.default));
118990
119021
  Qm(6, () => {
118991
119022
  throw new Error("old style JPEG compression is not supported.");
118992
119023
  });
118993
- Qm(7, () => import("./jpeg-45eb5c74.js").then((t) => t.default));
118994
- Qm([8, 32946], () => import("./deflate-5a2ed6e4.js").then((t) => t.default));
118995
- Qm(32773, () => import("./packbits-b5ec4708.js").then((t) => t.default));
118996
- Qm(34887, () => import("./lerc-911ed859.js").then((t) => t.default));
118997
- Qm(50001, () => import("./webimage-f73d66e5.js").then((t) => t.default));
119024
+ Qm(7, () => import("./jpeg-a7d7b483.js").then((t) => t.default));
119025
+ Qm([8, 32946], () => import("./deflate-ad8b9b4f.js").then((t) => t.default));
119026
+ Qm(32773, () => import("./packbits-3b4fec96.js").then((t) => t.default));
119027
+ Qm(34887, () => import("./lerc-8045cbc4.js").then((t) => t.default));
119028
+ Qm(50001, () => import("./webimage-776fef04.js").then((t) => t.default));
118998
119029
  function kj(t, e, n, r = 1) {
118999
119030
  return new (Object.getPrototypeOf(t)).constructor(e * n * r);
119000
119031
  }
@@ -145582,7 +145613,8 @@ class B6 {
145582
145613
  const nor = B6;
145583
145614
  function Poe(t, e, n) {
145584
145615
  let r;
145585
- return e && e.endsWith(".zip") ? r = nor.fromUrl(t, { overrides: n }) : r = new ent(t, { overrides: n }), Ede(r);
145616
+ const i = n ? { overrides: n } : void 0;
145617
+ return e && e.endsWith(".zip") ? r = nor.fromUrl(t, i) : r = new ent(t, i), Ede(r);
145586
145618
  }
145587
145619
  function ror(t) {
145588
145620
  return 2 ** Math.floor(Math.log2(t));
@@ -146736,10 +146768,15 @@ class For extends xhe {
146736
146768
  excludeBackground: !0,
146737
146769
  onViewportLoad: () => {
146738
146770
  },
146771
+ // layerProps.callback, // TODO: figure out callback implementation
146739
146772
  colorScaleLo: 0,
146773
+ // TODO: check if these can be removed?
146740
146774
  colorScaleHi: 1,
146775
+ // TODO: check if these can be removed?
146741
146776
  isExpressionMode: !1,
146777
+ // TODO: check if these can be removed?
146742
146778
  colormap: null,
146779
+ // TODO: check if these can be removed?
146743
146780
  expressionData: this.expression.data,
146744
146781
  // There is no onHover here,
146745
146782
  // see the onHover method of AbstractSpatialOrScatterplot.
@@ -146802,6 +146839,7 @@ class For extends xhe {
146802
146839
  zSlice: n[ne.SPATIAL_SLICE_Z],
146803
146840
  onViewportLoad: () => {
146804
146841
  },
146842
+ // layerProps.callback, // TODO: figure out callback implementation
146805
146843
  excludeBackground: b,
146806
146844
  extensions: Q,
146807
146845
  // Picking / onHover on the root DeckGL component
@@ -146955,7 +146993,9 @@ class For extends xhe {
146955
146993
  const C = nHt(d, f, c);
146956
146994
  this.segmentationColors[e] || (this.segmentationColors[e] = {}), this.prevSegmentationSetColor[e] || (this.prevSegmentationSetColor[e] = {}), this.prevSegmentationSetSelection[e] || (this.prevSegmentationSetSelection[e] = {}), this.segmentationColors[e][n] = {
146957
146995
  setColorIndices: C,
146996
+ // The Map from cell ID to color index.
146958
146997
  setColors: c,
146998
+ // The array with [{ path, color: [r, g, b] }, ...].
146959
146999
  obsIndex: l
146960
147000
  // TODO: how to ensure obsIndex.length matches the number of cells
146961
147001
  }, this.prevSegmentationSetColor[e][n] = c, this.prevSegmentationSetSelection[e][n] = f;
@@ -150831,7 +150871,9 @@ const war = Gr((t) => ({
150831
150871
  /* background-color only for content */
150832
150872
  backgroundClip: "content-box",
150833
150873
  border: `2px solid ${t.palette.grayLight}`,
150874
+ // map-get($global-colors, "gray-light");
150834
150875
  backgroundColor: t.palette.grayLight,
150876
+ // map-get($global-colors, "gray-light");
150835
150877
  "&:checked": {
150836
150878
  backgroundClip: "unset"
150837
150879
  }
@@ -150999,6 +151041,7 @@ const Mar = Gr(() => ({
150999
151041
  marginTop: "7px",
151000
151042
  "& span": {
151001
151043
  color: t.palette.secondaryForeground,
151044
+ // Change color here
151002
151045
  backgroundColor: t.palette.secondaryBackgroundDim
151003
151046
  // Change color here
151004
151047
  }
@@ -152500,7 +152543,7 @@ const Qde = Gr((t) => ({
152500
152543
  })), qsr = "higlass-no-github-deps", jsr = "1.11.13", Ysr = `https://unpkg.com/${qsr}@${jsr}/dist/hglib.css`;
152501
152544
  Hsr({ dataFetcher: HOe, config: HOe.config }, { pluginType: "dataFetcher" });
152502
152545
  const zsr = Qt.lazy(async () => {
152503
- const { HiGlassComponent: t } = await import("./hglib-6e843da0.js").then((e) => e.h);
152546
+ const { HiGlassComponent: t } = await import("./hglib-f7059244.js").then((e) => e.h);
152504
152547
  return { default: t };
152505
152548
  }), Ek = 800;
152506
152549
  function wde(t) {
@@ -193288,14 +193331,14 @@ class sI {
193288
193331
  class Um extends VA {
193289
193332
  getSourceData() {
193290
193333
  const { url: e } = this;
193291
- return this.data ? this.data : (this.data = this.dataSource.data.then((n) => n instanceof pi ? Promise.reject(n) : Promise.resolve(new mi(n, e))), this.data);
193334
+ return this.data ? this.data : (this.data = this.dataSource.data.then((n) => n instanceof pi ? Promise.reject(n) : Promise.resolve(new Ii(n, e))), this.data);
193292
193335
  }
193293
193336
  async load() {
193294
193337
  const e = await this.getSourceData().catch((o) => Promise.resolve(o));
193295
193338
  if (e instanceof pi)
193296
193339
  return Promise.reject(e);
193297
193340
  const { data: n, url: r } = e, i = this.loadFromCache(n);
193298
- return Promise.resolve(new mi(i, r));
193341
+ return Promise.resolve(new Ii(i, r));
193299
193342
  }
193300
193343
  }
193301
193344
  class Kkr extends Um {
@@ -193371,7 +193414,7 @@ class e4r extends Um {
193371
193414
  // additionalObsSets: null,
193372
193415
  })
193373
193416
  }, { data: r, url: i } = e, o = this.loadFromCache(r);
193374
- return Promise.resolve(new mi(o, i, n));
193417
+ return Promise.resolve(new Ii(o, i, n));
193375
193418
  }
193376
193419
  }
193377
193420
  class t4r extends Um {
@@ -193404,7 +193447,7 @@ class t4r extends Um {
193404
193447
  // obsLabelsType: null,
193405
193448
  })
193406
193449
  }, { data: r, url: i } = e, o = this.loadFromCache(r);
193407
- return Promise.resolve(new mi(o, i, n));
193450
+ return Promise.resolve(new Ii(o, i, n));
193408
193451
  }
193409
193452
  }
193410
193453
  class n4r extends Um {
@@ -193437,7 +193480,7 @@ class r4r extends Um {
193437
193480
  if (e instanceof pi)
193438
193481
  return Promise.reject(e);
193439
193482
  const { data: n, url: r } = e, [i, o, a, s] = this.loadFromCache(n);
193440
- return Promise.resolve(new mi({
193483
+ return Promise.resolve(new Ii({
193441
193484
  obsIndex: i,
193442
193485
  obsSets: o,
193443
193486
  obsSetsMembership: a
@@ -193460,7 +193503,7 @@ class i4r extends Um {
193460
193503
  if (e instanceof pi)
193461
193504
  return Promise.reject(e);
193462
193505
  const { data: n, url: r } = e, [i, o, a] = this.loadFromCache(n);
193463
- return Promise.resolve(new mi({
193506
+ return Promise.resolve(new Ii({
193464
193507
  sampleIndex: i,
193465
193508
  sampleSets: o,
193466
193509
  sampleSetsMembership: a
@@ -193508,7 +193551,7 @@ class hh extends VA {
193508
193551
  if (i instanceof pi)
193509
193552
  return Promise.reject(i);
193510
193553
  const [o, a] = this.validate(i);
193511
- return o ? Promise.resolve(new mi(i, e)) : Promise.reject(new A6t(n, r, e, a));
193554
+ return o ? Promise.resolve(new Ii(i, e)) : Promise.reject(new A6t(n, r, e, a));
193512
193555
  }), this.data);
193513
193556
  }
193514
193557
  validate(e) {
@@ -193558,7 +193601,7 @@ class s4r extends hh {
193558
193601
  }
193559
193602
  ])
193560
193603
  }, { data: i, url: o } = e, a = this.loadFromCache(i);
193561
- return Promise.resolve(new mi(a, o, r));
193604
+ return Promise.resolve(new Ii(a, o, r));
193562
193605
  }
193563
193606
  }
193564
193607
  class yGe extends hh {
@@ -193584,7 +193627,7 @@ class yGe extends hh {
193584
193627
  const l = A[0].name, c = A[0].children.map((f) => [l, f.name]), u = F$(i, []);
193585
193628
  a.obsSetSelection = c, a.obsSetColor = u, o = Gd(A[0]).map((f) => f[0]);
193586
193629
  }
193587
- return Promise.resolve(new mi({
193630
+ return Promise.resolve(new Ii({
193588
193631
  obsIndex: o,
193589
193632
  obsSets: i,
193590
193633
  obsSetsMembership: s
@@ -193615,7 +193658,7 @@ class A4r extends hh {
193615
193658
  if (e instanceof pi)
193616
193659
  return Promise.reject(e);
193617
193660
  const { data: n, url: r } = e, i = this.loadFromCache(n);
193618
- return Promise.resolve(new mi(i, r));
193661
+ return Promise.resolve(new Ii(i, r));
193619
193662
  }
193620
193663
  }
193621
193664
  class l4r extends hh {
@@ -193633,7 +193676,7 @@ class l4r extends hh {
193633
193676
  if (e instanceof pi)
193634
193677
  return Promise.reject(e);
193635
193678
  const { data: n, url: r } = e, i = this.loadFromCache(n);
193636
- return Promise.resolve(new mi(i, r));
193679
+ return Promise.resolve(new Ii(i, r));
193637
193680
  }
193638
193681
  }
193639
193682
  class c4r extends hh {
@@ -193660,7 +193703,7 @@ class c4r extends hh {
193660
193703
  if (e instanceof pi)
193661
193704
  return Promise.reject(e);
193662
193705
  const { data: n, url: r } = e, i = this.loadFromCache(n);
193663
- return Promise.resolve(new mi(i, r));
193706
+ return Promise.resolve(new Ii(i, r));
193664
193707
  }
193665
193708
  }
193666
193709
  class u4r extends hh {
@@ -193691,7 +193734,7 @@ class u4r extends hh {
193691
193734
  const { data: n, url: r } = e, i = this.loadFromCache(n), o = {
193692
193735
  spatialSegmentationLayer: Jtt
193693
193736
  };
193694
- return Promise.resolve(new mi({
193737
+ return Promise.resolve(new Ii({
193695
193738
  ...i,
193696
193739
  obsSegmentationsType: "polygon"
193697
193740
  }, r, o));
@@ -193723,7 +193766,7 @@ class g4r extends hh {
193723
193766
  if (e instanceof pi)
193724
193767
  return Promise.reject(e);
193725
193768
  const { data: n, url: r } = e, i = this.loadFromCache(n);
193726
- return Promise.resolve(new mi(i, r));
193769
+ return Promise.resolve(new Ii(i, r));
193727
193770
  }
193728
193771
  }
193729
193772
  const h4r = Ie.record(Ie.object({
@@ -193745,7 +193788,7 @@ class d4r extends hh {
193745
193788
  if (e instanceof pi)
193746
193789
  return Promise.reject(e);
193747
193790
  const { data: n, url: r } = e, i = this.loadFromCache(n);
193748
- return Promise.resolve(new mi(i, r));
193791
+ return Promise.resolve(new Ii(i, r));
193749
193792
  }
193750
193793
  }
193751
193794
  class p4r extends hh {
@@ -193769,7 +193812,7 @@ class p4r extends hh {
193769
193812
  if (e instanceof pi)
193770
193813
  return Promise.reject(e);
193771
193814
  const { data: n, url: r } = e, i = this.loadFromCache(n);
193772
- return Promise.resolve(new mi(i, r));
193815
+ return Promise.resolve(new Ii(i, r));
193773
193816
  }
193774
193817
  }
193775
193818
  class I4r extends hh {
@@ -193798,7 +193841,7 @@ class I4r extends hh {
193798
193841
  // TODO: do this for anndata segmentation loader
193799
193842
  spatialPointLayer: Srr
193800
193843
  };
193801
- return Promise.resolve(new mi(i, r, o));
193844
+ return Promise.resolve(new Ii(i, r, o));
193802
193845
  }
193803
193846
  }
193804
193847
  async function m4r(t) {
@@ -193872,7 +193915,7 @@ class Ght extends hh {
193872
193915
  const [l, c, u] = A, f = {
193873
193916
  spatialImageLayer: l
193874
193917
  };
193875
- return new mi({ loaders: c, meta: u }, a, f);
193918
+ return new Ii({ loaders: c, meta: u }, a, f);
193876
193919
  });
193877
193920
  }
193878
193921
  }
@@ -193884,7 +193927,7 @@ class C4r extends Ght {
193884
193927
  const { data: n = {}, url: r, coordinationValues: i } = e, { loaders: o = [], meta: a = [] } = n, s = [], A = [];
193885
193928
  return a.forEach((l, c) => {
193886
193929
  l?.metadata?.isBitmask || (s.push(o[c]), A.push(a[c]));
193887
- }), i?.spatialImageLayer || console.warn("Could not initialize coordinationValues.spatialImageLayer in RasterJsonAsImageLoader. This may be an indicator that the image could not be loaded."), new mi({
193930
+ }), i?.spatialImageLayer || console.warn("Could not initialize coordinationValues.spatialImageLayer in RasterJsonAsImageLoader. This may be an indicator that the image could not be loaded."), new Ii({
193888
193931
  image: s.length > 0 && A.length > 0 ? { loaders: s, meta: A } : null
193889
193932
  }, r, {
193890
193933
  // Filter coordinationValues, keeping only non-bitmask layers.
@@ -193903,7 +193946,7 @@ class E4r extends Ght {
193903
193946
  const { data: n = {}, url: r, coordinationValues: i } = e, { loaders: o = [], meta: a = [] } = n, s = [], A = [];
193904
193947
  return a.forEach((l, c) => {
193905
193948
  l?.metadata?.isBitmask && (s.push(o[c]), A.push(a[c]));
193906
- }), i?.spatialImageLayer || console.warn("Could not initialize coordinationValues.spatialImageLayer in RasterJsonAsObsSegmentationsLoader. This may be an indicator that the image could not be loaded."), new mi(s.length > 0 && A.length > 0 ? {
193949
+ }), i?.spatialImageLayer || console.warn("Could not initialize coordinationValues.spatialImageLayer in RasterJsonAsObsSegmentationsLoader. This may be an indicator that the image could not be loaded."), new Ii(s.length > 0 && A.length > 0 ? {
193907
193950
  obsSegmentationsType: "bitmask",
193908
193951
  obsSegmentations: { loaders: s, meta: A }
193909
193952
  } : null, r, {
@@ -193916,16 +193959,31 @@ class E4r extends Ght {
193916
193959
  }
193917
193960
  }
193918
193961
  class gv {
193962
+ /**
193963
+ * @param {DataSourceParams} params The parameters object.
193964
+ */
193919
193965
  constructor({ url: e, requestInit: n, store: r, fileType: i }) {
193920
- r ? this.storeRoot = Ede(r) : this.storeRoot = Poe(e, i, n);
193966
+ if (r)
193967
+ this.storeRoot = Ede(r);
193968
+ else if (e)
193969
+ this.storeRoot = Poe(e, i, n);
193970
+ else
193971
+ throw new Error("Either a store or a URL must be provided to the ZarrDataSource constructor.");
193921
193972
  }
193973
+ /**
193974
+ *
193975
+ * @param {string} path
193976
+ * @returns {ZarrLocation<Readable>}
193977
+ */
193922
193978
  getStoreRoot(e) {
193923
193979
  return this.storeRoot.resolve(e);
193924
193980
  }
193925
193981
  /**
193926
- * Class method for decoding json from the store.
193982
+ * Method for accessing JSON attributes, relative to the store root.
193927
193983
  * @param {string} key A path to the item.
193928
- * @returns {Promise} This async function returns a promise
193984
+ * @param {ZarrLocation<Readable>|null} storeRootParam An optional location,
193985
+ * which if provided will override the default store root.
193986
+ * @returns {Promise<any>} This async function returns a promise
193929
193987
  * that resolves to the parsed JSON if successful.
193930
193988
  * @throws This may throw an error.
193931
193989
  */
@@ -193940,15 +193998,36 @@ function y4r(t) {
193940
193998
  return e.pop(), e.join("/");
193941
193999
  }
193942
194000
  function v4r(t) {
193943
- return t.split("/").at(-1);
194001
+ const n = t.split("/").at(-1);
194002
+ return n || (console.error("basename of path is empty", t), "");
193944
194003
  }
193945
194004
  class wu extends gv {
193946
- constructor(...e) {
193947
- super(...e), this.promises = /* @__PURE__ */ new Map();
194005
+ /**
194006
+ *
194007
+ * @param {DataSourceParams} params
194008
+ */
194009
+ constructor(e) {
194010
+ super(e), this.promises = /* @__PURE__ */ new Map();
193948
194011
  }
194012
+ /**
194013
+ *
194014
+ * @param {string[]} paths Paths to multiple string-valued columns
194015
+ * within the obs dataframe.
194016
+ * @returns {Promise<(undefined | string[] | string[][])[]>} Returns
194017
+ * each column as an array of strings,
194018
+ * ordered the same as the paths.
194019
+ */
193949
194020
  loadObsColumns(e) {
193950
194021
  return this._loadColumns(e);
193951
194022
  }
194023
+ /**
194024
+ *
194025
+ * @param {string[]} paths Paths to multiple string-valued columns
194026
+ * within the var dataframe.
194027
+ * @returns {Promise<(undefined | string[] | string[][])[]>} Returns
194028
+ * each column as an array of strings,
194029
+ * ordered the same as the paths.
194030
+ */
193952
194031
  loadVarColumns(e) {
193953
194032
  return this._loadColumns(e);
193954
194033
  }
@@ -193956,8 +194035,10 @@ class wu extends gv {
193956
194035
  * Class method for loading obs variables.
193957
194036
  * Takes the location as an argument because this is shared across objects,
193958
194037
  * which have different ways of specifying location.
193959
- * @param {string[]} paths An array of strings like "obs/leiden" or "obs/bulk_labels."
193960
- * @returns {Promise} A promise for an array of ids with one per cell.
194038
+ * @param {string[] | string[][]} paths An array of strings like
194039
+ * "obs/leiden" or "obs/bulk_labels."
194040
+ * @returns {Promise<(undefined | string[] | string[][])[]>} A promise
194041
+ * for an array of ids with one per cell.
193961
194042
  */
193962
194043
  _loadColumns(e) {
193963
194044
  const n = e.map((r) => {
@@ -193968,23 +194049,31 @@ class wu extends gv {
193968
194049
  });
193969
194050
  this.promises.set(o, a);
193970
194051
  }
193971
- return this.promises.get(o);
194052
+ return (
194053
+ /** @type {Promise<string[]>} */
194054
+ this.promises.get(o)
194055
+ );
193972
194056
  };
193973
194057
  return r ? Array.isArray(r) ? Promise.resolve(Promise.all(r.map(i))) : i(r) : Promise.resolve(void 0);
193974
194058
  });
193975
194059
  return Promise.all(n);
193976
194060
  }
194061
+ /**
194062
+ *
194063
+ * @param {string} path
194064
+ * @returns
194065
+ */
193977
194066
  async _loadColumn(e) {
193978
194067
  const { storeRoot: n } = this, r = y4r(e), { categories: i, "encoding-type": o } = await this.getJson(`${e}/.zattrs`);
193979
194068
  let a, s;
193980
194069
  if (i) {
193981
- const { dtype: f } = await pa(n.resolve(`/${r}/${i}`));
194070
+ const { dtype: f } = await pa(n.resolve(`/${r}/${i}`), { kind: "array" });
193982
194071
  f === "v2:object" && (a = await this.getFlatArrDecompressed(`/${r}/${i}`));
193983
194072
  } else if (o === "categorical") {
193984
- const { dtype: f } = await pa(n.resolve(`/${e}/categories`));
194073
+ const { dtype: f } = await pa(n.resolve(`/${e}/categories`), { kind: "array" });
193985
194074
  f === "v2:object" && (a = await this.getFlatArrDecompressed(`/${e}/categories`)), s = `/${e}/codes`;
193986
194075
  } else {
193987
- const { dtype: f } = await pa(n.resolve(`/${e}`));
194076
+ const { dtype: f } = await pa(n.resolve(`/${e}`), { kind: "array" });
193988
194077
  if (f === "v2:object")
193989
194078
  return this.getFlatArrDecompressed(e);
193990
194079
  }
@@ -193994,7 +194083,7 @@ class wu extends gv {
193994
194083
  /**
193995
194084
  * Class method for loading general numeric arrays.
193996
194085
  * @param {string} path A string like obsm.X_pca.
193997
- * @returns {Promise} A promise for a zarr array containing the data.
194086
+ * @returns {Promise<Chunk<any>>} A promise for a zarr array containing the data.
193998
194087
  */
193999
194088
  loadNumeric(e) {
194000
194089
  const { storeRoot: n } = this;
@@ -194003,13 +194092,19 @@ class wu extends gv {
194003
194092
  /**
194004
194093
  * Class method for loading specific columns of numeric arrays.
194005
194094
  * @param {string} path A string like obsm.X_pca.
194006
- * @param {number[]} dims The column indices to load.
194007
- * @returns {Promise} A promise for a zarr array containing the data.
194095
+ * @param {[number, number]} dims The column indices to load.
194096
+ * @returns {Promise<{
194097
+ * data: [ZarrTypedArray<any>, ZarrTypedArray<any>],
194098
+ * shape: [number, number],
194099
+ * }>} A promise for a zarr array containing the data.
194008
194100
  */
194009
194101
  loadNumericForDims(e, n) {
194010
194102
  const { storeRoot: r } = this, i = pa(r.resolve(e), { kind: "array" });
194011
194103
  return Promise.all(n.map((o) => i.then((a) => Up(a, [null, o])))).then((o) => ({
194012
- data: o.map((a) => a.data),
194104
+ data: (
194105
+ /** @type {[ZarrTypedArray<any>, ZarrTypedArray<any>]} */
194106
+ o.map((a) => a.data)
194107
+ ),
194013
194108
  shape: [n.length, o[0].shape[0]]
194014
194109
  }));
194015
194110
  }
@@ -194017,68 +194112,127 @@ class wu extends gv {
194017
194112
  * A common method for loading flattened data
194018
194113
  * i.e that which has shape [n] where n is a natural number.
194019
194114
  * @param {string} path A path to a flat array location, like obs/_index
194020
- * @returns {Array} The data from the zarr array.
194115
+ * @returns {Promise<string[]>} The data from the zarr array.
194021
194116
  */
194022
194117
  async getFlatArrDecompressed(e) {
194023
194118
  const { storeRoot: n } = this, r = await pa(n.resolve(e), { kind: "array" }), i = await Up(r);
194024
- return i.data?.[Symbol.iterator] ? Array.from(i.data) : i.data;
194119
+ return i.data?.[Symbol.iterator] ? Array.from(i.data) : (
194120
+ /** @type {string[]} */
194121
+ i.data
194122
+ );
194025
194123
  }
194026
194124
  /**
194027
194125
  * Class method for loading the obs index.
194028
- * @returns {Promise} An promise for a zarr array containing the indices.
194126
+ * @param {string|undefined} path Used by subclasses.
194127
+ * @returns {Promise<string[]>} An promise for a zarr array
194128
+ * containing the indices.
194029
194129
  */
194030
- loadObsIndex() {
194031
- return this.obsIndex ? this.obsIndex : (this.obsIndex = this.getJson("obs/.zattrs").then(({ _index: e }) => this.getFlatArrDecompressed(`/obs/${e}`)), this.obsIndex);
194130
+ loadObsIndex(e = void 0) {
194131
+ return this.obsIndex ? this.obsIndex : (this.obsIndex = this.getJson("obs/.zattrs").then(({ _index: n }) => this.getFlatArrDecompressed(`/obs/${n}`)), this.obsIndex);
194032
194132
  }
194033
194133
  /**
194034
194134
  * Class method for loading the var index.
194035
- * @returns {Promise} An promise for a zarr array containing the indices.
194135
+ * @param {string|undefined} path Used by subclasses.
194136
+ * @returns {Promise<string[]>} An promise for a zarr array containing the indices.
194036
194137
  */
194037
- loadVarIndex() {
194038
- return this.varIndex ? this.varIndex : (this.varIndex = this.getJson("var/.zattrs").then(({ _index: e }) => this.getFlatArrDecompressed(`/var/${e}`)), this.varIndex);
194138
+ loadVarIndex(e = void 0) {
194139
+ return this.varIndex ? this.varIndex : (this.varIndex = this.getJson("var/.zattrs").then(({ _index: n }) => this.getFlatArrDecompressed(`/var/${n}`)), this.varIndex);
194039
194140
  }
194040
194141
  /**
194041
194142
  * Class method for loading the var alias.
194042
- * @returns {Promise} An promise for a zarr array containing the aliased names.
194143
+ * @param {string} varPath
194144
+ * @param {string|undefined} matrixPath
194145
+ * @returns {Promise<string[]>} An promise for a zarr array containing the aliased names.
194043
194146
  */
194044
- async loadVarAlias(e) {
194147
+ async loadVarAlias(e, n = void 0) {
194045
194148
  if (this.varAlias)
194046
194149
  return this.varAlias;
194047
194150
  [this.varAlias] = await this.loadVarColumns([e]);
194048
- const n = await this.loadVarIndex();
194049
- return this.varAlias = this.varAlias.map((r, i) => r ? r.concat(` (${n[i]})`) : n[i]), this.varAlias;
194151
+ const r = await this.loadVarIndex();
194152
+ return this.varAlias = this.varAlias.map(
194153
+ /** @type {(val: string, ind: number) => string} */
194154
+ (i, o) => i ? i.concat(` (${r[o]})`) : r[o]
194155
+ ), this.varAlias;
194050
194156
  }
194157
+ /**
194158
+ *
194159
+ * @param {string} path
194160
+ * @returns {Promise<object>}
194161
+ */
194051
194162
  async _loadAttrs(e) {
194052
194163
  return this.getJson(`${e}/.zattrs`);
194053
194164
  }
194165
+ /**
194166
+ *
194167
+ * @param {string} path
194168
+ * @returns {Promise<string>}
194169
+ */
194054
194170
  async _loadString(e) {
194055
- const { storeRoot: n } = this, { "encoding-type": r, "encoding-version": i } = await this._loadAttrs(e);
194056
- if (r === "string" && i === "0.2.0") {
194057
- const o = await pa(n.resolve(e), { kind: "array" }), { data: a } = await o.getChunk([]);
194058
- return a.get(0);
194171
+ const { storeRoot: n } = this, r = await this._loadAttrs(e);
194172
+ if ("encoding-type" in r && "encoding-version" in r) {
194173
+ const { "encoding-type": i, "encoding-version": o } = r;
194174
+ if (i === "string" && o === "0.2.0") {
194175
+ const a = await pa(n.resolve(e), { kind: "array" }), { data: s } = (
194176
+ /** @type {{ data: ByteStringArray }} */
194177
+ await a.getChunk([])
194178
+ );
194179
+ return s.get(0);
194180
+ }
194181
+ throw new Error(`Unsupported encoding type ${i} and version ${o} in AnnDataSource._loadString`);
194059
194182
  }
194060
- throw new Error(`Unsupported encoding type ${r} and version ${i} in AnnDataSource._loadString`);
194183
+ throw new Error("Keys for encoding-type or encoding-version not found in AnnDataSource._loadString");
194061
194184
  }
194185
+ /**
194186
+ *
194187
+ * @param {string} path
194188
+ * @returns {Promise<string[]>}
194189
+ */
194062
194190
  async _loadStringArray(e) {
194063
- const { "encoding-type": n, "encoding-version": r } = await this._loadAttrs(e);
194064
- if (n === "string-array" && r === "0.2.0")
194065
- return this.getFlatArrDecompressed(e);
194066
- throw new Error(`Unsupported encoding type ${n} and version ${r} in AnnDataSource._loadStringArray`);
194191
+ const n = await this._loadAttrs(e);
194192
+ if ("encoding-type" in n && "encoding-version" in n) {
194193
+ const { "encoding-type": r, "encoding-version": i } = n;
194194
+ if (r === "string-array" && i === "0.2.0")
194195
+ return this.getFlatArrDecompressed(e);
194196
+ throw new Error(`Unsupported encoding type ${r} and version ${i} in AnnDataSource._loadStringArray`);
194197
+ }
194198
+ throw new Error("Keys for encoding-type or encoding-version not found in AnnDataSource._loadString");
194067
194199
  }
194200
+ /**
194201
+ *
194202
+ * @param {string} path
194203
+ * @returns
194204
+ */
194068
194205
  async _loadElement(e) {
194069
- const { "encoding-type": n } = await this._loadAttrs(e);
194070
- return n === "string" ? this._loadString(e) : n === "string-array" ? this._loadStringArray(e) : null;
194206
+ const n = await this._loadAttrs(e);
194207
+ if ("encoding-type" in n) {
194208
+ const { "encoding-type": r } = n;
194209
+ if (r === "string")
194210
+ return this._loadString(e);
194211
+ if (r === "string-array")
194212
+ return this._loadStringArray(e);
194213
+ }
194214
+ return null;
194071
194215
  }
194216
+ /**
194217
+ *
194218
+ * @param {string} path
194219
+ * @param {string[]} keys
194220
+ * @returns
194221
+ */
194072
194222
  async _loadDict(e, n) {
194073
- const { "encoding-type": r, "encoding-version": i } = await this._loadAttrs(e);
194074
- if (r === "dict" && i === "0.1.0") {
194075
- const o = {};
194076
- return await Promise.all(n.map(async (a) => {
194077
- const s = await this._loadElement(`${e}/${a}`);
194078
- o[a] = s;
194079
- })), o;
194223
+ const r = await this._loadAttrs(e);
194224
+ if ("encoding-type" in r && "encoding-version" in r) {
194225
+ const { "encoding-type": i, "encoding-version": o } = r;
194226
+ if (i === "dict" && o === "0.1.0") {
194227
+ const a = {};
194228
+ return await Promise.all(n.map(async (s) => {
194229
+ const A = await this._loadElement(`${e}/${s}`);
194230
+ a[s] = A;
194231
+ })), a;
194232
+ }
194233
+ throw new Error(`Unsupported encoding type ${i} and version ${o} in AnnDataSource._loadDict`);
194080
194234
  }
194081
- throw new Error(`Unsupported encoding type ${r} and version ${i} in AnnDataSource._loadDict`);
194235
+ throw new Error("Keys for encoding-type or encoding-version not found in AnnDataSource._loadString");
194082
194236
  }
194083
194237
  }
194084
194238
  const B4r = /^mod\/([^/]*)\/(.*)$/;
@@ -194144,15 +194298,27 @@ function w4r(t) {
194144
194298
  return `${mEe(t)}var`;
194145
194299
  }
194146
194300
  class Ree extends wu {
194301
+ /**
194302
+ *
194303
+ * @param {DataSourceParams} params
194304
+ */
194305
+ constructor(e) {
194306
+ super(e), this.obsIndices = {}, this.varIndices = {}, this.varAliases = {};
194307
+ }
194308
+ /**
194309
+ *
194310
+ * @param {string} tablePath
194311
+ * @returns
194312
+ */
194147
194313
  async loadSpatialDataAttrs(e) {
194148
194314
  return this._loadDict(`${e}uns/spatialdata_attrs`, ["instance_key", "region", "region_key"]);
194149
194315
  }
194150
194316
  /**
194151
194317
  * Class method for loading the obs index.
194152
- * @returns {Promise} An promise for a zarr array containing the indices.
194318
+ * @param {string|undefined} path
194319
+ * @returns {Promise<string[]>} An promise for a zarr array containing the indices.
194153
194320
  */
194154
- async loadObsIndex(e = null) {
194155
- this.obsIndex || (this.obsIndex = {});
194321
+ async loadObsIndex(e = void 0) {
194156
194322
  const n = Q4r(e), { _index: r } = await this.getJson(`${n}/.zattrs`);
194157
194323
  let i = `${n}/${r}`;
194158
194324
  const {
@@ -194161,28 +194327,31 @@ class Ree extends wu {
194161
194327
  // region_key: regionKey,
194162
194328
  // region,
194163
194329
  } = await this.loadSpatialDataAttrs(mEe(e));
194164
- return i = `${n}/${o}`, this.obsIndex[i] ? this.obsIndex[i] : (this.obsIndex[i] = this._loadColumn(i), this.obsIndex[i]);
194330
+ return i = `${n}/${o}`, i in this.obsIndices ? this.obsIndices[i] : (this.obsIndices[i] = this._loadColumn(i), this.obsIndices[i]);
194165
194331
  }
194166
194332
  /**
194167
194333
  * Class method for loading the var index.
194168
- * @returns {Promise} An promise for a zarr array containing the indices.
194334
+ * @param {string|undefined} path
194335
+ * @returns {Promise<string[]>} An promise for a zarr array containing the indices.
194169
194336
  */
194170
- loadVarIndex(e = null) {
194171
- this.varIndex || (this.varIndex = {});
194337
+ loadVarIndex(e = void 0) {
194172
194338
  const n = w4r(e);
194173
- return this.varIndex[n] ? this.varIndex[n] : (this.varIndex[n] = this.getJson(`${n}/.zattrs`).then(({ _index: r }) => this.getFlatArrDecompressed(`${n}/${r}`)), this.varIndex[n]);
194339
+ return n in this.varIndices ? this.varIndices[n] : (this.varIndices[n] = this.getJson(`${n}/.zattrs`).then(({ _index: r }) => this.getFlatArrDecompressed(`${n}/${r}`)), this.varIndices[n]);
194174
194340
  }
194175
194341
  /**
194176
194342
  * Class method for loading the var alias.
194177
- * @returns {Promise} An promise for a zarr array containing the aliased names.
194343
+ * @param {string} varPath
194344
+ * @param {string} matrixPath
194345
+ * @returns {Promise<string[]>} An promise for a zarr array containing the aliased names.
194178
194346
  */
194179
194347
  async loadVarAlias(e, n) {
194180
- if (this.varAlias || (this.varAlias = {}), this.varAlias[e])
194181
- return this.varAlias[e];
194348
+ if (e in this.varAliases)
194349
+ return this.varAliases[e];
194182
194350
  const [r] = await this.loadVarColumns([e]);
194183
- this.varAlias[e] = r;
194351
+ this.varAliases[e] = /** @type {string[]} */
194352
+ r;
194184
194353
  const i = await this.loadVarIndex(n);
194185
- return this.varAlias[e] = this.varAlias[e].map((o, a) => o ? o.concat(` (${i[a]})`) : i[a]), this.varAlias[e];
194354
+ return this.varAliases[e] = this.varAliases[e].map((o, a) => o ? o.concat(` (${i[a]})`) : i[a]), this.varAliases[e];
194186
194355
  }
194187
194356
  }
194188
194357
  const x4r = /^shapes\/([^/]*)\/(.*)$/;
@@ -194201,15 +194370,28 @@ function D4r(t) {
194201
194370
  return `${Hht(t)}var`;
194202
194371
  }
194203
194372
  class vGe extends wu {
194373
+ /**
194374
+ *
194375
+ * @param {DataSourceParams} params
194376
+ */
194377
+ constructor(e) {
194378
+ super(e), this.obsIndices = {}, this.varIndices = {}, this.varAliases = {};
194379
+ }
194380
+ /**
194381
+ *
194382
+ * @param {string} tablePath
194383
+ * @returns
194384
+ */
194204
194385
  async loadSpatialDataAttrs(e) {
194205
194386
  return this._loadDict(`${e}/uns/spatialdata_attrs`, ["instance_key", "region", "region_key"]);
194206
194387
  }
194207
194388
  /**
194208
194389
  * Class method for loading the obs index.
194209
- * @returns {Promise} An promise for a zarr array containing the indices.
194390
+ * @param {string|undefined} path
194391
+ * @param {string|undefined} tablePath
194392
+ * @returns {Promise<string[]>} An promise for a zarr array containing the indices.
194210
194393
  */
194211
- async loadObsIndex(e = null, n = null) {
194212
- this.obsIndex || (this.obsIndex = {});
194394
+ async loadObsIndex(e = void 0, n = void 0) {
194213
194395
  let r = R4r(e);
194214
194396
  if (n) {
194215
194397
  const i = `${n}/obs`, { _index: o } = await this.getJson(`${i}/.zattrs`);
@@ -194222,28 +194404,31 @@ class vGe extends wu {
194222
194404
  } = await this.loadSpatialDataAttrs(n);
194223
194405
  r = `${i}/${a}`;
194224
194406
  }
194225
- return this.obsIndex[r] ? this.obsIndex[r] : (this.obsIndex[r] = this._loadColumn(r), this.obsIndex[r]);
194407
+ return r in this.obsIndices ? this.obsIndices[r] : (this.obsIndices[r] = this._loadColumn(r), this.obsIndices[r]);
194226
194408
  }
194227
194409
  /**
194228
194410
  * Class method for loading the var index.
194229
- * @returns {Promise} An promise for a zarr array containing the indices.
194411
+ * @param {string|undefined} path
194412
+ * @returns {Promise<string[]>} An promise for a zarr array containing the indices.
194230
194413
  */
194231
- loadVarIndex(e = null) {
194232
- this.varIndex || (this.varIndex = {});
194414
+ loadVarIndex(e = void 0) {
194233
194415
  const n = D4r(e);
194234
- return this.varIndex[n] ? this.varIndex[n] : (this.varIndex[n] = this.getJson(`${n}/.zattrs`).then(({ _index: r }) => this.getFlatArrDecompressed(`${n}/${r}`)), this.varIndex[n]);
194416
+ return n in this.varIndices ? this.varIndices[n] : (this.varIndices[n] = this.getJson(`${n}/.zattrs`).then(({ _index: r }) => this.getFlatArrDecompressed(`${n}/${r}`)), this.varIndices[n]);
194235
194417
  }
194236
194418
  /**
194237
194419
  * Class method for loading the var alias.
194238
- * @returns {Promise} An promise for a zarr array containing the aliased names.
194420
+ * @param {string} varPath
194421
+ * @param {string} matrixPath
194422
+ * @returns {Promise<string[]>} An promise for a zarr array containing the aliased names.
194239
194423
  */
194240
194424
  async loadVarAlias(e, n) {
194241
- if (this.varAlias || (this.varAlias = {}), this.varAlias[e])
194242
- return this.varAlias[e];
194425
+ if (e in this.varAliases)
194426
+ return this.varAliases[e];
194243
194427
  const [r] = await this.loadVarColumns([e]);
194244
- this.varAlias[e] = r;
194428
+ this.varAliases[e] = /** @type {string[]} */
194429
+ r;
194245
194430
  const i = await this.loadVarIndex(n);
194246
- return this.varAlias[e] = this.varAlias[e].map((o, a) => o ? o.concat(` (${i[a]})`) : i[a]), this.varAlias[e];
194431
+ return this.varAliases[e] = this.varAliases[e].map((o, a) => o ? o.concat(` (${i[a]})`) : i[a]), this.varAliases[e];
194247
194432
  }
194248
194433
  }
194249
194434
  class T4r extends VA {
@@ -194261,7 +194446,7 @@ class T4r extends VA {
194261
194446
  return this.arr = await PC(n).getRaw([null, null]), this.arr;
194262
194447
  }
194263
194448
  load() {
194264
- return Promise.all([this.loadAttrs(), this.loadArr()]).then(([e, n]) => Promise.resolve(new mi({ obsIndex: e.data.rows, featureIndex: e.data.cols, obsFeatureMatrix: n }, null)));
194449
+ return Promise.all([this.loadAttrs(), this.loadArr()]).then(([e, n]) => Promise.resolve(new Ii({ obsIndex: e.data.rows, featureIndex: e.data.cols, obsFeatureMatrix: n }, null)));
194265
194450
  }
194266
194451
  }
194267
194452
  const eD = (t) => ({ data: t }), N4r = (t) => {
@@ -194494,18 +194679,26 @@ class Dee extends VA {
194494
194679
  this.dataSource.loadObsIndex(e),
194495
194680
  this.loadInitialFilteredGeneNames(),
194496
194681
  this.loadCellXGene()
194497
- ]).then(([r, i, o]) => Promise.resolve(new mi({ obsIndex: r, featureIndex: i, obsFeatureMatrix: o }, null)));
194682
+ ]).then(([r, i, o]) => Promise.resolve(new Ii({ obsIndex: r, featureIndex: i, obsFeatureMatrix: o }, null)));
194498
194683
  }
194499
194684
  }
194500
194685
  class BGe extends VA {
194501
194686
  /**
194502
194687
  * Class method for loading embedding coordinates, such as those from UMAP or t-SNE.
194503
- * @returns {Promise} A promise for an array of columns.
194688
+ * @returns {Promise<MatrixResult>} A promise for an array of columns.
194504
194689
  */
194505
- loadEmbedding() {
194690
+ async loadEmbedding() {
194506
194691
  const { path: e, dims: n = [0, 1] } = this.options;
194507
- return this.embedding ? this.embedding : this.embedding ? (this.embedding = Promise.resolve(null), this.embedding) : (this.embedding = this.dataSource.loadNumericForDims(e, n), this.embedding);
194692
+ return this.embedding ? (
194693
+ /** @type {Promise<MatrixResult>} */
194694
+ this.embedding
194695
+ ) : this.embedding ? this.embedding : (this.embedding = this.dataSource.loadNumericForDims(e, n), /** @type {Promise<MatrixResult>} */
194696
+ this.embedding);
194508
194697
  }
194698
+ /**
194699
+ *
194700
+ * @returns {Promise<LoaderResult<ObsEmbeddingData>>}
194701
+ */
194509
194702
  async load() {
194510
194703
  const { path: e } = this.options, n = await super.load().catch((r) => Promise.resolve(r));
194511
194704
  return n instanceof pi ? Promise.reject(n) : Promise.all([
@@ -194514,7 +194707,7 @@ class BGe extends VA {
194514
194707
  // `mod/rna/index` rather than `index`.
194515
194708
  this.dataSource.loadObsIndex(e),
194516
194709
  this.loadEmbedding()
194517
- ]).then(([r, i]) => Promise.resolve(new mi({ obsIndex: r, obsEmbedding: i }, null)));
194710
+ ]).then(([r, i]) => Promise.resolve(new Ii({ obsIndex: r, obsEmbedding: i }, null)));
194518
194711
  }
194519
194712
  }
194520
194713
  class bGe extends VA {
@@ -194551,7 +194744,7 @@ class bGe extends VA {
194551
194744
  return Promise.all([
194552
194745
  this.dataSource.loadObsIndex(e),
194553
194746
  this.loadSpots()
194554
- ]).then(([i, o]) => Promise.resolve(new mi({ obsIndex: i, obsSpots: o }, null, r)));
194747
+ ]).then(([i, o]) => Promise.resolve(new Ii({ obsIndex: i, obsSpots: o }, null, r)));
194555
194748
  }
194556
194749
  }
194557
194750
  class _Ge extends VA {
@@ -194586,7 +194779,7 @@ class _Ge extends VA {
194586
194779
  return Promise.all([
194587
194780
  this.dataSource.loadObsIndex(e),
194588
194781
  this.loadPoints()
194589
- ]).then(([i, o]) => Promise.resolve(new mi({ obsIndex: i, obsPoints: o }, null, r)));
194782
+ ]).then(([i, o]) => Promise.resolve(new Ii({ obsIndex: i, obsPoints: o }, null, r)));
194590
194783
  }
194591
194784
  }
194592
194785
  class SGe extends VA {
@@ -194603,7 +194796,7 @@ class SGe extends VA {
194603
194796
  return n instanceof pi ? Promise.reject(n) : Promise.all([
194604
194797
  this.dataSource.loadObsIndex(e),
194605
194798
  this.loadLocations()
194606
- ]).then(([r, i]) => Promise.resolve(new mi({ obsIndex: r, obsLocations: i }, null)));
194799
+ ]).then(([r, i]) => Promise.resolve(new Ii({ obsIndex: r, obsLocations: i }, null)));
194607
194800
  }
194608
194801
  }
194609
194802
  class Tee extends VA {
@@ -194668,7 +194861,7 @@ class Tee extends VA {
194668
194861
  return Promise.all([
194669
194862
  this.dataSource.loadObsIndex(e),
194670
194863
  this.loadSegmentations()
194671
- ]).then(([o, a]) => Promise.resolve(new mi({
194864
+ ]).then(([o, a]) => Promise.resolve(new Ii({
194672
194865
  obsIndex: o,
194673
194866
  obsSegmentations: a,
194674
194867
  obsSegmentationsType: "polygon"
@@ -194705,7 +194898,7 @@ class AAe extends VA {
194705
194898
  s,
194706
194899
  c.name
194707
194900
  ]), l = F$(r, []);
194708
- return o.obsSetSelection = A, o.obsSetColor = l, Promise.resolve(new mi({ obsIndex: n, obsSets: r, obsSetsMembership: i }, null, o));
194901
+ return o.obsSetSelection = A, o.obsSetColor = l, Promise.resolve(new Ii({ obsIndex: n, obsSets: r, obsSetsMembership: i }, null, o));
194709
194902
  }
194710
194903
  }
194711
194904
  class QGe extends VA {
@@ -194722,18 +194915,22 @@ class QGe extends VA {
194722
194915
  return n instanceof pi ? Promise.reject(n) : Promise.all([
194723
194916
  this.dataSource.loadObsIndex(e),
194724
194917
  this.loadLabels()
194725
- ]).then(([r, i]) => Promise.resolve(new mi({ obsIndex: r, obsLabels: i }, null)));
194918
+ ]).then(([r, i]) => Promise.resolve(new Ii({ obsIndex: r, obsLabels: i }, null)));
194726
194919
  }
194727
194920
  }
194728
194921
  class Nee extends VA {
194729
194922
  /**
194730
194923
  * Class method for loading feature string labels.
194731
- * @returns {Promise} A promise for the array.
194924
+ * @returns {Promise<string[]>} A promise for the array.
194732
194925
  */
194733
- loadLabels() {
194926
+ async loadLabels() {
194734
194927
  const { path: e } = this.options;
194735
- return this.labels ? this.labels : this.labels ? (this.labels = Promise.resolve(null), this.labels) : (this.labels = this.dataSource._loadColumn(e), this.labels);
194928
+ return this.labels ? this.labels : this.labels ? this.labels : (this.labels = this.dataSource._loadColumn(e), this.labels);
194736
194929
  }
194930
+ /**
194931
+ *
194932
+ * @returns {Promise<LoaderResult<FeatureLabelsData>>}
194933
+ */
194737
194934
  async load() {
194738
194935
  const { path: e } = this.options, n = await super.load().catch((r) => Promise.resolve(r));
194739
194936
  return n instanceof pi ? Promise.reject(n) : Promise.all([
@@ -194742,10 +194939,10 @@ class Nee extends VA {
194742
194939
  // `mod/rna/index` rather than `index`.
194743
194940
  this.dataSource.loadVarIndex(e),
194744
194941
  this.loadLabels()
194745
- ]).then(([r, i]) => Promise.resolve(new mi({
194942
+ ]).then(([r, i]) => Promise.resolve(new Ii({
194746
194943
  featureIndex: r,
194747
194944
  featureLabels: i,
194748
- featureLabelsMap: new Map(r.map((o, a) => [o, i[a]]))
194945
+ featureLabelsMap: new Map(r.map((o, a) => [o, i?.[a]]))
194749
194946
  }, null)));
194750
194947
  }
194751
194948
  }
@@ -194774,7 +194971,7 @@ class L4r extends VA {
194774
194971
  const e = await super.load().catch((n) => Promise.resolve(n));
194775
194972
  return e instanceof pi ? Promise.reject(e) : Promise.all([
194776
194973
  this.loadObsFeatureColumns()
194777
- ]).then(([{ obsIndex: n, obsFeatureMatrix: r, featureIndex: i }]) => Promise.resolve(new mi({ obsIndex: n, obsFeatureMatrix: r, featureIndex: i }, null)));
194974
+ ]).then(([{ obsIndex: n, obsFeatureMatrix: r, featureIndex: i }]) => Promise.resolve(new Ii({ obsIndex: n, obsFeatureMatrix: r, featureIndex: i }, null)));
194778
194975
  }
194779
194976
  }
194780
194977
  class M4r extends VA {
@@ -194791,7 +194988,7 @@ class M4r extends VA {
194791
194988
  return n instanceof pi ? Promise.reject(n) : Promise.all([
194792
194989
  this.dataSource.loadObsIndex(e),
194793
194990
  this.loadLabels()
194794
- ]).then(([r, i]) => Promise.resolve(new mi({ obsIndex: r, sampleIds: i }, null)));
194991
+ ]).then(([r, i]) => Promise.resolve(new Ii({ obsIndex: r, sampleIds: i }, null)));
194795
194992
  }
194796
194993
  }
194797
194994
  class CEe {
@@ -194924,6 +195121,7 @@ class CEe {
194924
195121
  name: n.Name || `Channel ${r}`,
194925
195122
  defaultColor: n.Color ? n.Color : void 0,
194926
195123
  defaultWindow: void 0,
195124
+ // TODO: does OME-TIFF support this?
194927
195125
  autoDefaultColor: fI[r % fI.length]
194928
195126
  }));
194929
195127
  }
@@ -195096,10 +195294,12 @@ class EEe extends VA {
195096
195294
  }
195097
195295
  ])
195098
195296
  };
195099
- return Promise.resolve(new mi({
195297
+ return Promise.resolve(new Ii({
195100
195298
  image: {
195101
195299
  loaders: G,
195300
+ // TODO: replace with imageWrapper
195102
195301
  meta: $,
195302
+ // TODO: replace with imageWrapper
195103
195303
  instance: i
195104
195304
  // TODO: make this the root value of LoaderResult.image.
195105
195305
  },
@@ -195134,7 +195334,7 @@ class O4r extends EEe {
195134
195334
  }
195135
195335
  ])
195136
195336
  };
195137
- return Promise.resolve(new mi({
195337
+ return Promise.resolve(new Ii({
195138
195338
  obsSegmentationsType: "bitmask",
195139
195339
  obsSegmentations: n.data.image
195140
195340
  }, n.url, a));
@@ -195225,7 +195425,7 @@ class k4r extends VA {
195225
195425
  // additionalObsSets: null,
195226
195426
  })
195227
195427
  };
195228
- return Promise.resolve(new mi({ obsIndex: i, obsSpots: o }, null, A));
195428
+ return Promise.resolve(new Ii({ obsIndex: i, obsSpots: o }, null, A));
195229
195429
  });
195230
195430
  }
195231
195431
  }
@@ -195240,7 +195440,7 @@ class U4r extends VA {
195240
195440
  }
195241
195441
  load() {
195242
195442
  const { url: e } = this;
195243
- return this.loadAttrs().then((n) => Promise.resolve(new mi(n, e)));
195443
+ return this.loadAttrs().then((n) => Promise.resolve(new Ii(n, e)));
195244
195444
  }
195245
195445
  }
195246
195446
  class xGe {
@@ -195304,10 +195504,12 @@ class qht extends VA {
195304
195504
  }
195305
195505
  ])
195306
195506
  };
195307
- return new mi({
195507
+ return new Ii({
195308
195508
  image: {
195309
195509
  loaders: O,
195510
+ // TODO: replace with imageWrapper
195310
195511
  meta: M,
195512
+ // TODO: replace with imageWrapper
195311
195513
  instance: a
195312
195514
  // TODO: make this the root value of LoaderResult.image.
195313
195515
  },
@@ -195369,11 +195571,13 @@ class H4r extends qht {
195369
195571
  }
195370
195572
  ])
195371
195573
  };
195372
- return new mi({
195574
+ return new Ii({
195373
195575
  obsSegmentationsType: "bitmask",
195374
195576
  obsSegmentations: {
195375
195577
  loaders: O,
195578
+ // TODO: replace with imageWrapper
195376
195579
  meta: M,
195580
+ // TODO: replace with imageWrapper
195377
195581
  instance: s
195378
195582
  // TODO: make this the root value of LoaderResult.image.
195379
195583
  }
@@ -196068,6 +196272,7 @@ const nGr = [
196068
196272
  new zt(ne.SPATIAL_LAYER_VISIBLE, !0, Ie.boolean()),
196069
196273
  new zt(ne.SPATIAL_LAYER_OPACITY, 1, Ie.number()),
196070
196274
  new zt(ne.SPATIAL_LAYER_COLORMAP, null, Ie.string().nullable()),
196275
+ // TODO: enum to be more strict
196071
196276
  new zt(ne.SPATIAL_LAYER_TRANSPARENT_COLOR, null, Ie.array(Ie.number()).length(3).nullable()),
196072
196277
  new zt(ne.SPATIAL_LAYER_MODEL_MATRIX, null, Ie.array(Ie.number()).length(16).nullable()),
196073
196278
  new zt(ne.SPATIAL_CHANNEL_VISIBLE, !0, Ie.boolean()),