@vitessce/scatterplot-embedding 3.3.2 → 3.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
2
- import { B as BaseDecoder } from "./index-e7cfe3df.js";
2
+ import { B as BaseDecoder } from "./index-c936b693.js";
3
3
  import "react";
4
4
  import "@vitessce/vit-s";
5
5
  import "react-dom";
@@ -999,18 +999,18 @@ bisector$1(number$2).center;
999
999
  const bisect = bisectRight;
1000
1000
  function extent$1(values2, valueof) {
1001
1001
  let min;
1002
- let max;
1002
+ let max2;
1003
1003
  if (valueof === void 0) {
1004
1004
  for (const value of values2) {
1005
1005
  if (value != null) {
1006
1006
  if (min === void 0) {
1007
1007
  if (value >= value)
1008
- min = max = value;
1008
+ min = max2 = value;
1009
1009
  } else {
1010
1010
  if (min > value)
1011
1011
  min = value;
1012
- if (max < value)
1013
- max = value;
1012
+ if (max2 < value)
1013
+ max2 = value;
1014
1014
  }
1015
1015
  }
1016
1016
  }
@@ -1020,17 +1020,17 @@ function extent$1(values2, valueof) {
1020
1020
  if ((value = valueof(value, ++index2, values2)) != null) {
1021
1021
  if (min === void 0) {
1022
1022
  if (value >= value)
1023
- min = max = value;
1023
+ min = max2 = value;
1024
1024
  } else {
1025
1025
  if (min > value)
1026
1026
  min = value;
1027
- if (max < value)
1028
- max = value;
1027
+ if (max2 < value)
1028
+ max2 = value;
1029
1029
  }
1030
1030
  }
1031
1031
  }
1032
1032
  }
1033
- return [min, max];
1033
+ return [min, max2];
1034
1034
  }
1035
1035
  var e10 = Math.sqrt(50), e5 = Math.sqrt(10), e2 = Math.sqrt(2);
1036
1036
  function ticks(start, stop, count2) {
@@ -1080,6 +1080,24 @@ function tickStep(start, stop, count2) {
1080
1080
  step1 *= 2;
1081
1081
  return stop < start ? -step1 : step1;
1082
1082
  }
1083
+ function max(values2, valueof) {
1084
+ let max2;
1085
+ if (valueof === void 0) {
1086
+ for (const value of values2) {
1087
+ if (value != null && (max2 < value || max2 === void 0 && value >= value)) {
1088
+ max2 = value;
1089
+ }
1090
+ }
1091
+ } else {
1092
+ let index2 = -1;
1093
+ for (let value of values2) {
1094
+ if ((value = valueof(value, ++index2, values2)) != null && (max2 < value || max2 === void 0 && value >= value)) {
1095
+ max2 = value;
1096
+ }
1097
+ }
1098
+ }
1099
+ return max2;
1100
+ }
1083
1101
  var freeGlobal$1 = typeof global == "object" && global && global.Object === Object && global;
1084
1102
  const freeGlobal$2 = freeGlobal$1;
1085
1103
  var freeSelf$1 = typeof self == "object" && self && self.Object === Object && self;
@@ -5669,14 +5687,14 @@ class ZodString extends ZodType {
5669
5687
  return min;
5670
5688
  }
5671
5689
  get maxLength() {
5672
- let max = null;
5690
+ let max2 = null;
5673
5691
  for (const ch of this._def.checks) {
5674
5692
  if (ch.kind === "max") {
5675
- if (max === null || ch.value < max)
5676
- max = ch.value;
5693
+ if (max2 === null || ch.value < max2)
5694
+ max2 = ch.value;
5677
5695
  }
5678
5696
  }
5679
- return max;
5697
+ return max2;
5680
5698
  }
5681
5699
  }
5682
5700
  ZodString.create = (params) => {
@@ -5891,20 +5909,20 @@ class ZodNumber extends ZodType {
5891
5909
  return min;
5892
5910
  }
5893
5911
  get maxValue() {
5894
- let max = null;
5912
+ let max2 = null;
5895
5913
  for (const ch of this._def.checks) {
5896
5914
  if (ch.kind === "max") {
5897
- if (max === null || ch.value < max)
5898
- max = ch.value;
5915
+ if (max2 === null || ch.value < max2)
5916
+ max2 = ch.value;
5899
5917
  }
5900
5918
  }
5901
- return max;
5919
+ return max2;
5902
5920
  }
5903
5921
  get isInt() {
5904
5922
  return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util$4.isInteger(ch.value));
5905
5923
  }
5906
5924
  get isFinite() {
5907
- let max = null, min = null;
5925
+ let max2 = null, min = null;
5908
5926
  for (const ch of this._def.checks) {
5909
5927
  if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
5910
5928
  return true;
@@ -5912,11 +5930,11 @@ class ZodNumber extends ZodType {
5912
5930
  if (min === null || ch.value > min)
5913
5931
  min = ch.value;
5914
5932
  } else if (ch.kind === "max") {
5915
- if (max === null || ch.value < max)
5916
- max = ch.value;
5933
+ if (max2 === null || ch.value < max2)
5934
+ max2 = ch.value;
5917
5935
  }
5918
5936
  }
5919
- return Number.isFinite(min) && Number.isFinite(max);
5937
+ return Number.isFinite(min) && Number.isFinite(max2);
5920
5938
  }
5921
5939
  }
5922
5940
  ZodNumber.create = (params) => {
@@ -6074,14 +6092,14 @@ class ZodBigInt extends ZodType {
6074
6092
  return min;
6075
6093
  }
6076
6094
  get maxValue() {
6077
- let max = null;
6095
+ let max2 = null;
6078
6096
  for (const ch of this._def.checks) {
6079
6097
  if (ch.kind === "max") {
6080
- if (max === null || ch.value < max)
6081
- max = ch.value;
6098
+ if (max2 === null || ch.value < max2)
6099
+ max2 = ch.value;
6082
6100
  }
6083
6101
  }
6084
- return max;
6102
+ return max2;
6085
6103
  }
6086
6104
  }
6087
6105
  ZodBigInt.create = (params) => {
@@ -6209,14 +6227,14 @@ class ZodDate extends ZodType {
6209
6227
  return min != null ? new Date(min) : null;
6210
6228
  }
6211
6229
  get maxDate() {
6212
- let max = null;
6230
+ let max2 = null;
6213
6231
  for (const ch of this._def.checks) {
6214
6232
  if (ch.kind === "max") {
6215
- if (max === null || ch.value < max)
6216
- max = ch.value;
6233
+ if (max2 === null || ch.value < max2)
6234
+ max2 = ch.value;
6217
6235
  }
6218
6236
  }
6219
- return max != null ? new Date(max) : null;
6237
+ return max2 != null ? new Date(max2) : null;
6220
6238
  }
6221
6239
  }
6222
6240
  ZodDate.create = (params) => {
@@ -10575,7 +10593,7 @@ var toComparators_1 = toComparators$1;
10575
10593
  const SemVer$4 = semver;
10576
10594
  const Range$7 = requireRange();
10577
10595
  const maxSatisfying$1 = (versions, range2, options) => {
10578
- let max = null;
10596
+ let max2 = null;
10579
10597
  let maxSV = null;
10580
10598
  let rangeObj = null;
10581
10599
  try {
@@ -10585,13 +10603,13 @@ const maxSatisfying$1 = (versions, range2, options) => {
10585
10603
  }
10586
10604
  versions.forEach((v) => {
10587
10605
  if (rangeObj.test(v)) {
10588
- if (!max || maxSV.compare(v) === -1) {
10589
- max = v;
10590
- maxSV = new SemVer$4(max, options);
10606
+ if (!max2 || maxSV.compare(v) === -1) {
10607
+ max2 = v;
10608
+ maxSV = new SemVer$4(max2, options);
10591
10609
  }
10592
10610
  }
10593
10611
  });
10594
- return max;
10612
+ return max2;
10595
10613
  };
10596
10614
  var maxSatisfying_1 = maxSatisfying$1;
10597
10615
  const SemVer$3 = semver;
@@ -10776,17 +10794,17 @@ var simplify = (versions, range2, options) => {
10776
10794
  set3.push([first, null]);
10777
10795
  }
10778
10796
  const ranges2 = [];
10779
- for (const [min, max] of set3) {
10780
- if (min === max) {
10797
+ for (const [min, max2] of set3) {
10798
+ if (min === max2) {
10781
10799
  ranges2.push(min);
10782
- } else if (!max && min === v[0]) {
10800
+ } else if (!max2 && min === v[0]) {
10783
10801
  ranges2.push("*");
10784
- } else if (!max) {
10802
+ } else if (!max2) {
10785
10803
  ranges2.push(`>=${min}`);
10786
10804
  } else if (min === v[0]) {
10787
- ranges2.push(`<=${max}`);
10805
+ ranges2.push(`<=${max2}`);
10788
10806
  } else {
10789
- ranges2.push(`${min} - ${max}`);
10807
+ ranges2.push(`${min} - ${max2}`);
10790
10808
  }
10791
10809
  }
10792
10810
  const simplified = ranges2.join(" || ");
@@ -11080,7 +11098,9 @@ const FileType$1 = {
11080
11098
  OBS_SEGMENTATIONS_JSON: "obsSegmentations.json",
11081
11099
  OBS_SETS_CSV: "obsSets.csv",
11082
11100
  OBS_SETS_JSON: "obsSets.json",
11101
+ // OME-Zarr
11083
11102
  IMAGE_OME_ZARR: "image.ome-zarr",
11103
+ OBS_SEGMENTATIONS_OME_ZARR: "obsSegmentations.ome-zarr",
11084
11104
  // AnnData
11085
11105
  OBS_FEATURE_MATRIX_ANNDATA_ZARR: "obsFeatureMatrix.anndata.zarr",
11086
11106
  OBS_SETS_ANNDATA_ZARR: "obsSets.anndata.zarr",
@@ -11564,7 +11584,9 @@ const COMPONENT_COORDINATION_TYPES = {
11564
11584
  CoordinationType$1.SPATIAL_SEGMENTATION_FILLED,
11565
11585
  CoordinationType$1.SPATIAL_SEGMENTATION_STROKE_WIDTH,
11566
11586
  CoordinationType$1.IMAGE_CHANNEL,
11587
+ CoordinationType$1.IMAGE_LAYER,
11567
11588
  CoordinationType$1.SEGMENTATION_CHANNEL,
11589
+ CoordinationType$1.SEGMENTATION_LAYER,
11568
11590
  CoordinationType$1.SPATIAL_CHANNEL_VISIBLE,
11569
11591
  CoordinationType$1.SPATIAL_CHANNEL_OPACITY,
11570
11592
  CoordinationType$1.SPATIAL_CHANNEL_WINDOW,
@@ -11582,6 +11604,9 @@ const COMPONENT_COORDINATION_TYPES = {
11582
11604
  CoordinationType$1.SPATIAL_SPOT_STROKE_WIDTH,
11583
11605
  CoordinationType$1.SPATIAL_LAYER_COLOR,
11584
11606
  CoordinationType$1.OBS_COLOR_ENCODING,
11607
+ CoordinationType$1.FEATURE_VALUE_COLORMAP,
11608
+ CoordinationType$1.FEATURE_VALUE_COLORMAP_RANGE,
11609
+ CoordinationType$1.FEATURE_SELECTION,
11585
11610
  CoordinationType$1.TOOLTIPS_VISIBLE,
11586
11611
  CoordinationType$1.TOOLTIP_CROSSHAIRS_VISIBLE,
11587
11612
  CoordinationType$1.LEGEND_VISIBLE,
@@ -11898,30 +11923,39 @@ const omeCoordinateTransformations = z.array(z.union([
11898
11923
  scale: z.array(z.number())
11899
11924
  })
11900
11925
  ]));
11901
- z.object({
11926
+ const imageOmeTiffSchema = z.object({
11902
11927
  offsetsUrl: z.string().optional(),
11903
11928
  coordinateTransformations: omeCoordinateTransformations.optional()
11904
11929
  });
11930
+ imageOmeTiffSchema.extend({
11931
+ obsTypesFromChannelNames: z.boolean().optional()
11932
+ });
11905
11933
  const imageOmeZarrSchema = z.object({
11906
11934
  coordinateTransformations: omeCoordinateTransformations.optional()
11907
11935
  });
11908
11936
  imageOmeZarrSchema.extend({
11937
+ obsTypesFromChannelNames: z.boolean().optional()
11938
+ });
11939
+ const imageSpatialdataSchema = imageOmeZarrSchema.extend({
11909
11940
  path: z.string()
11910
11941
  });
11911
- z.object({
11942
+ const obsSegmentationsSpatialdataSchema = z.object({
11943
+ // TODO: should this also extend the imageOmeZarrSchema?
11944
+ // TODO: should this be renamed labelsSpatialdataSchema?
11945
+ // TODO: support obsTypesFromChannelNames?
11912
11946
  path: z.string()
11913
11947
  });
11914
11948
  z.object({
11915
11949
  path: z.string()
11916
11950
  });
11917
- z.object({
11951
+ const obsSpotsSpatialdataSchema = z.object({
11918
11952
  path: z.string(),
11919
11953
  tablePath: z.string().optional().describe("The path to a table which annotates the spots. If available but not specified, the spot identifiers may not be aligned with associated tabular data as expected.")
11920
11954
  });
11921
- annDataObsFeatureMatrix.extend({
11955
+ const obsFeatureMatrixSpatialdataSchema = annDataObsFeatureMatrix.extend({
11922
11956
  region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional()
11923
11957
  });
11924
- z.object({
11958
+ const obsSetsSpatialdataSchema = z.object({
11925
11959
  region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional(),
11926
11960
  tablePath: z.string().optional().describe("The path to a table which contains the index for the set values."),
11927
11961
  obsSets: annDataObsSets
@@ -11984,6 +12018,19 @@ z.object({
11984
12018
  z.array(annDataConvenienceObsEmbeddingItem)
11985
12019
  ])
11986
12020
  }).partial();
12021
+ z.object({
12022
+ // TODO: should `image` be a special schema
12023
+ // to allow specifying fileUid (like for embeddingType)?
12024
+ image: imageSpatialdataSchema,
12025
+ // TODO: should this be a special schema
12026
+ // to allow specifying fileUid (like for embeddingType)?
12027
+ labels: obsSegmentationsSpatialdataSchema,
12028
+ obsFeatureMatrix: obsFeatureMatrixSpatialdataSchema,
12029
+ obsSpots: obsSpotsSpatialdataSchema,
12030
+ // TODO: obsPoints
12031
+ // TODO: obsLocations
12032
+ obsSets: obsSetsSpatialdataSchema
12033
+ }).partial();
11987
12034
  z.object({
11988
12035
  obsLabelsTypes: z.array(z.string()).optional(),
11989
12036
  embeddingTypes: z.array(z.string()).optional()
@@ -12357,14 +12404,14 @@ var tinycolor = { exports: {} };
12357
12404
  r2 = bound01(r2, 255);
12358
12405
  g2 = bound01(g2, 255);
12359
12406
  b = bound01(b, 255);
12360
- var max = mathMax(r2, g2, b), min = mathMin(r2, g2, b);
12361
- var h, s2, l2 = (max + min) / 2;
12362
- if (max == min) {
12407
+ var max2 = mathMax(r2, g2, b), min = mathMin(r2, g2, b);
12408
+ var h, s2, l2 = (max2 + min) / 2;
12409
+ if (max2 == min) {
12363
12410
  h = s2 = 0;
12364
12411
  } else {
12365
- var d = max - min;
12366
- s2 = l2 > 0.5 ? d / (2 - max - min) : d / (max + min);
12367
- switch (max) {
12412
+ var d = max2 - min;
12413
+ s2 = l2 > 0.5 ? d / (2 - max2 - min) : d / (max2 + min);
12414
+ switch (max2) {
12368
12415
  case r2:
12369
12416
  h = (g2 - b) / d + (g2 < b ? 6 : 0);
12370
12417
  break;
@@ -12412,14 +12459,14 @@ var tinycolor = { exports: {} };
12412
12459
  r2 = bound01(r2, 255);
12413
12460
  g2 = bound01(g2, 255);
12414
12461
  b = bound01(b, 255);
12415
- var max = mathMax(r2, g2, b), min = mathMin(r2, g2, b);
12416
- var h, s2, v = max;
12417
- var d = max - min;
12418
- s2 = max === 0 ? 0 : d / max;
12419
- if (max == min) {
12462
+ var max2 = mathMax(r2, g2, b), min = mathMin(r2, g2, b);
12463
+ var h, s2, v = max2;
12464
+ var d = max2 - min;
12465
+ s2 = max2 === 0 ? 0 : d / max2;
12466
+ if (max2 == min) {
12420
12467
  h = 0;
12421
12468
  } else {
12422
- switch (max) {
12469
+ switch (max2) {
12423
12470
  case r2:
12424
12471
  h = (g2 - b) / d + (g2 < b ? 6 : 0);
12425
12472
  break;
@@ -12816,19 +12863,19 @@ var tinycolor = { exports: {} };
12816
12863
  }
12817
12864
  return a2;
12818
12865
  }
12819
- function bound01(n2, max) {
12866
+ function bound01(n2, max2) {
12820
12867
  if (isOnePointZero(n2)) {
12821
12868
  n2 = "100%";
12822
12869
  }
12823
12870
  var processPercent = isPercentage(n2);
12824
- n2 = mathMin(max, mathMax(0, parseFloat(n2)));
12871
+ n2 = mathMin(max2, mathMax(0, parseFloat(n2)));
12825
12872
  if (processPercent) {
12826
- n2 = parseInt(n2 * max, 10) / 100;
12873
+ n2 = parseInt(n2 * max2, 10) / 100;
12827
12874
  }
12828
- if (Math2.abs(n2 - max) < 1e-6) {
12875
+ if (Math2.abs(n2 - max2) < 1e-6) {
12829
12876
  return 1;
12830
12877
  }
12831
- return n2 % max / parseFloat(max);
12878
+ return n2 % max2 / parseFloat(max2);
12832
12879
  }
12833
12880
  function clamp01(val) {
12834
12881
  return mathMin(1, mathMax(0, val));
@@ -14044,10 +14091,10 @@ var json2csv_umd = { exports: {} };
14044
14091
  };
14045
14092
  Buffer3.prototype.inspect = function inspect2() {
14046
14093
  var str = "";
14047
- var max = INSPECT_MAX_BYTES;
14094
+ var max2 = INSPECT_MAX_BYTES;
14048
14095
  if (this.length > 0) {
14049
- str = this.toString("hex", 0, max).match(/.{2}/g).join(" ");
14050
- if (this.length > max)
14096
+ str = this.toString("hex", 0, max2).match(/.{2}/g).join(" ");
14097
+ if (this.length > max2)
14051
14098
  str += " ... ";
14052
14099
  }
14053
14100
  return "<Buffer " + str + ">";
@@ -14613,10 +14660,10 @@ var json2csv_umd = { exports: {} };
14613
14660
  checkOffset(offset5, 8, this.length);
14614
14661
  return read(this, offset5, false, 52, 8);
14615
14662
  };
14616
- function checkInt(buf, value, offset5, ext, max, min) {
14663
+ function checkInt(buf, value, offset5, ext, max2, min) {
14617
14664
  if (!internalIsBuffer(buf))
14618
14665
  throw new TypeError('"buffer" argument must be a Buffer instance');
14619
- if (value > max || value < min)
14666
+ if (value > max2 || value < min)
14620
14667
  throw new RangeError('"value" argument is out of bounds');
14621
14668
  if (offset5 + ext > buf.length)
14622
14669
  throw new RangeError("Index out of range");
@@ -14841,7 +14888,7 @@ var json2csv_umd = { exports: {} };
14841
14888
  }
14842
14889
  return offset5 + 4;
14843
14890
  };
14844
- function checkIEEE754(buf, value, offset5, ext, max, min) {
14891
+ function checkIEEE754(buf, value, offset5, ext, max2, min) {
14845
14892
  if (offset5 + ext > buf.length)
14846
14893
  throw new RangeError("Index out of range");
14847
14894
  if (offset5 < 0)
@@ -30017,8 +30064,8 @@ function acos$1(radians2, result) {
30017
30064
  function atan$1(radians2, result) {
30018
30065
  return map$1(radians2, (angle2) => Math.atan(angle2), result);
30019
30066
  }
30020
- function clamp$3(value, min, max) {
30021
- return map$1(value, (value2) => Math.max(min, Math.min(max, value2)));
30067
+ function clamp$3(value, min, max2) {
30068
+ return map$1(value, (value2) => Math.max(min, Math.min(max2, value2)));
30022
30069
  }
30023
30070
  function lerp$5(a2, b, t2) {
30024
30071
  if (isArray$1(a2)) {
@@ -30305,9 +30352,9 @@ class MathArray extends _extendableBuiltin(Array) {
30305
30352
  divideScalar(a2) {
30306
30353
  return this.multiplyByScalar(1 / a2);
30307
30354
  }
30308
- clampScalar(min, max) {
30355
+ clampScalar(min, max2) {
30309
30356
  for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
30310
- this[i2] = Math.min(Math.max(this[i2], min), max);
30357
+ this[i2] = Math.min(Math.max(this[i2], min), max2);
30311
30358
  }
30312
30359
  return this.check();
30313
30360
  }
@@ -36440,8 +36487,8 @@ function mod$1(value, divisor) {
36440
36487
  function lerp(start, end, step) {
36441
36488
  return step * end + (1 - step) * start;
36442
36489
  }
36443
- function clamp$2(x2, min, max) {
36444
- return x2 < min ? min : x2 > max ? max : x2;
36490
+ function clamp$2(x2, min, max2) {
36491
+ return x2 < min ? min : x2 > max2 ? max2 : x2;
36445
36492
  }
36446
36493
  function ieLog2(x2) {
36447
36494
  return Math.log(x2) * Math.LOG2E;
@@ -46162,17 +46209,17 @@ class DataColumn {
46162
46209
  const len2 = numInstances * size;
46163
46210
  if (value && len2 && value.length >= len2) {
46164
46211
  const min = new Array(size).fill(Infinity);
46165
- const max = new Array(size).fill(-Infinity);
46212
+ const max2 = new Array(size).fill(-Infinity);
46166
46213
  for (let i2 = 0; i2 < len2; ) {
46167
46214
  for (let j = 0; j < size; j++) {
46168
46215
  const v = value[i2++];
46169
46216
  if (v < min[j])
46170
46217
  min[j] = v;
46171
- if (v > max[j])
46172
- max[j] = v;
46218
+ if (v > max2[j])
46219
+ max2[j] = v;
46173
46220
  }
46174
46221
  }
46175
- result = [min, max];
46222
+ result = [min, max2];
46176
46223
  }
46177
46224
  }
46178
46225
  this.state.bounds = result;
@@ -72253,10 +72300,10 @@ class GroupNode extends ScenegraphNode {
72253
72300
  if (!bounds2) {
72254
72301
  return;
72255
72302
  }
72256
- const [min, max] = bounds2;
72257
- const center2 = new Vector3(min).add(max).divide([2, 2, 2]);
72303
+ const [min, max2] = bounds2;
72304
+ const center2 = new Vector3(min).add(max2).divide([2, 2, 2]);
72258
72305
  worldMatrix.transformAsPoint(center2, center2);
72259
- const halfSize = new Vector3(max).subtract(min).divide([2, 2, 2]);
72306
+ const halfSize = new Vector3(max2).subtract(min).divide([2, 2, 2]);
72260
72307
  worldMatrix.transformAsVector(halfSize, halfSize);
72261
72308
  for (let v = 0; v < 8; v++) {
72262
72309
  const position = new Vector3(v & 1 ? -1 : 1, v & 2 ? -1 : 1, v & 4 ? -1 : 1).multiply(halfSize).add(center2);
@@ -81205,7 +81252,7 @@ class Tile {
81205
81252
  const { errors } = this;
81206
81253
  let numVertices = 0;
81207
81254
  let numTriangles = 0;
81208
- const max = size - 1;
81255
+ const max2 = size - 1;
81209
81256
  indices.fill(0);
81210
81257
  function countElements(ax, ay, bx, by, cx, cy) {
81211
81258
  const mx = ax + bx >> 1;
@@ -81220,8 +81267,8 @@ class Tile {
81220
81267
  numTriangles++;
81221
81268
  }
81222
81269
  }
81223
- countElements(0, 0, max, max, max, 0);
81224
- countElements(max, max, 0, 0, 0, max);
81270
+ countElements(0, 0, max2, max2, max2, 0);
81271
+ countElements(max2, max2, 0, 0, 0, max2);
81225
81272
  const vertices = new Uint16Array(numVertices * 2);
81226
81273
  const triangles = new Uint32Array(numTriangles * 3);
81227
81274
  let triIndex = 0;
@@ -81246,8 +81293,8 @@ class Tile {
81246
81293
  triangles[triIndex++] = c2;
81247
81294
  }
81248
81295
  }
81249
- processTriangle(0, 0, max, max, max, 0);
81250
- processTriangle(max, max, 0, 0, 0, max);
81296
+ processTriangle(0, 0, max2, max2, max2, 0);
81297
+ processTriangle(max2, max2, 0, 0, 0, max2);
81251
81298
  return { vertices, triangles };
81252
81299
  }
81253
81300
  }
@@ -121261,16 +121308,16 @@ function addDecoder(cases, importFn) {
121261
121308
  }
121262
121309
  cases.forEach((c2) => registry$1.set(c2, importFn));
121263
121310
  }
121264
- addDecoder([void 0, 1], () => import("./raw-2f6386b1.js").then((m2) => m2.default));
121265
- addDecoder(5, () => import("./lzw-feb8dc70.js").then((m2) => m2.default));
121311
+ addDecoder([void 0, 1], () => import("./raw-0ba1df6f.js").then((m2) => m2.default));
121312
+ addDecoder(5, () => import("./lzw-8fbaef0b.js").then((m2) => m2.default));
121266
121313
  addDecoder(6, () => {
121267
121314
  throw new Error("old style JPEG compression is not supported.");
121268
121315
  });
121269
- addDecoder(7, () => import("./jpeg-59b4a15e.js").then((m2) => m2.default));
121270
- addDecoder([8, 32946], () => import("./deflate-99ed3e4b.js").then((m2) => m2.default));
121271
- addDecoder(32773, () => import("./packbits-c190d867.js").then((m2) => m2.default));
121272
- addDecoder(34887, () => import("./lerc-ce83e5c1.js").then((m2) => m2.default));
121273
- addDecoder(50001, () => import("./webimage-0ef01b51.js").then((m2) => m2.default));
121316
+ addDecoder(7, () => import("./jpeg-23fd3e2a.js").then((m2) => m2.default));
121317
+ addDecoder([8, 32946], () => import("./deflate-4ede6d09.js").then((m2) => m2.default));
121318
+ addDecoder(32773, () => import("./packbits-6ba8ace5.js").then((m2) => m2.default));
121319
+ addDecoder(34887, () => import("./lerc-ce46904c.js").then((m2) => m2.default));
121320
+ addDecoder(50001, () => import("./webimage-70045d38.js").then((m2) => m2.default));
121274
121321
  function decodeRowAcc(row, stride) {
121275
121322
  let length2 = row.length - stride;
121276
121323
  let offset5 = 0;
@@ -124819,9 +124866,9 @@ const buf2binstring = (buf, len2) => {
124819
124866
  }
124820
124867
  return result;
124821
124868
  };
124822
- var buf2string = (buf, max) => {
124869
+ var buf2string = (buf, max2) => {
124823
124870
  let i2, out;
124824
- const len2 = max || buf.length;
124871
+ const len2 = max2 || buf.length;
124825
124872
  const utf16buf = new Array(len2 * 2);
124826
124873
  for (out = 0, i2 = 0; i2 < len2; ) {
124827
124874
  let c2 = buf[i2++];
@@ -124854,22 +124901,22 @@ var buf2string = (buf, max) => {
124854
124901
  }
124855
124902
  return buf2binstring(utf16buf, out);
124856
124903
  };
124857
- var utf8border = (buf, max) => {
124858
- max = max || buf.length;
124859
- if (max > buf.length) {
124860
- max = buf.length;
124904
+ var utf8border = (buf, max2) => {
124905
+ max2 = max2 || buf.length;
124906
+ if (max2 > buf.length) {
124907
+ max2 = buf.length;
124861
124908
  }
124862
- let pos = max - 1;
124909
+ let pos = max2 - 1;
124863
124910
  while (pos >= 0 && (buf[pos] & 192) === 128) {
124864
124911
  pos--;
124865
124912
  }
124866
124913
  if (pos < 0) {
124867
- return max;
124914
+ return max2;
124868
124915
  }
124869
124916
  if (pos === 0) {
124870
- return max;
124917
+ return max2;
124871
124918
  }
124872
- return pos + _utf8len[buf[pos]] > max ? pos : max;
124919
+ return pos + _utf8len[buf[pos]] > max2 ? pos : max2;
124873
124920
  };
124874
124921
  var strings = {
124875
124922
  string2buf,
@@ -125419,7 +125466,7 @@ const inflate_table = (type, lens2, lens_index, codes, table, table_index, work,
125419
125466
  const bits = opts2.bits;
125420
125467
  let len2 = 0;
125421
125468
  let sym = 0;
125422
- let min = 0, max = 0;
125469
+ let min = 0, max2 = 0;
125423
125470
  let root2 = 0;
125424
125471
  let curr = 0;
125425
125472
  let drop = 0;
@@ -125446,21 +125493,21 @@ const inflate_table = (type, lens2, lens_index, codes, table, table_index, work,
125446
125493
  count2[lens2[lens_index + sym]]++;
125447
125494
  }
125448
125495
  root2 = bits;
125449
- for (max = MAXBITS; max >= 1; max--) {
125450
- if (count2[max] !== 0) {
125496
+ for (max2 = MAXBITS; max2 >= 1; max2--) {
125497
+ if (count2[max2] !== 0) {
125451
125498
  break;
125452
125499
  }
125453
125500
  }
125454
- if (root2 > max) {
125455
- root2 = max;
125501
+ if (root2 > max2) {
125502
+ root2 = max2;
125456
125503
  }
125457
- if (max === 0) {
125504
+ if (max2 === 0) {
125458
125505
  table[table_index++] = 1 << 24 | 64 << 16 | 0;
125459
125506
  table[table_index++] = 1 << 24 | 64 << 16 | 0;
125460
125507
  opts2.bits = 1;
125461
125508
  return 0;
125462
125509
  }
125463
- for (min = 1; min < max; min++) {
125510
+ for (min = 1; min < max2; min++) {
125464
125511
  if (count2[min] !== 0) {
125465
125512
  break;
125466
125513
  }
@@ -125476,7 +125523,7 @@ const inflate_table = (type, lens2, lens_index, codes, table, table_index, work,
125476
125523
  return -1;
125477
125524
  }
125478
125525
  }
125479
- if (left2 > 0 && (type === CODES || max !== 1)) {
125526
+ if (left2 > 0 && (type === CODES || max2 !== 1)) {
125480
125527
  return -1;
125481
125528
  }
125482
125529
  offs[1] = 0;
@@ -125545,7 +125592,7 @@ const inflate_table = (type, lens2, lens_index, codes, table, table_index, work,
125545
125592
  }
125546
125593
  sym++;
125547
125594
  if (--count2[len2] === 0) {
125548
- if (len2 === max) {
125595
+ if (len2 === max2) {
125549
125596
  break;
125550
125597
  }
125551
125598
  len2 = lens2[lens_index + work[sym]];
@@ -125557,7 +125604,7 @@ const inflate_table = (type, lens2, lens_index, codes, table, table_index, work,
125557
125604
  next += min;
125558
125605
  curr = len2 - drop;
125559
125606
  left2 = 1 << curr;
125560
- while (curr + drop < max) {
125607
+ while (curr + drop < max2) {
125561
125608
  left2 -= count2[curr + drop];
125562
125609
  if (left2 <= 0) {
125563
125610
  break;
@@ -132291,21 +132338,21 @@ void main() {
132291
132338
  }
132292
132339
  `;
132293
132340
  function normalize$1(arr) {
132294
- const [min, max] = extent$1(arr);
132295
- const ratio = 255 / (max - min);
132341
+ const [min, max2] = extent$1(arr);
132342
+ const ratio = 255 / (max2 - min);
132296
132343
  const data = new Uint8Array(arr.map((i2) => Math.floor((i2 - min) * ratio)));
132297
132344
  return data;
132298
132345
  }
132299
- function multiSetsToTextureData(multiFeatureValues, setColorValues, channelIsSetColorMode, texSize) {
132346
+ function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColorValues, channelIsSetColorMode, texSize) {
132300
132347
  let totalValuesLength = 0;
132301
132348
  let totalColorsLength = 0;
132302
132349
  channelIsSetColorMode.forEach((isSetColorMode, channelIndex) => {
132303
- var _a2, _b, _c, _d, _e;
132350
+ var _a2, _b, _c, _d;
132304
132351
  if (isSetColorMode) {
132305
- totalValuesLength += ((_b = (_a2 = setColorValues[channelIndex]) == null ? void 0 : _a2.obsIndex) == null ? void 0 : _b.length) || 0;
132306
- totalColorsLength += (((_d = (_c = setColorValues[channelIndex]) == null ? void 0 : _c.setColors) == null ? void 0 : _d.length) || 0) * 3;
132352
+ totalColorsLength += (((_b = (_a2 = setColorValues[channelIndex]) == null ? void 0 : _a2.setColors) == null ? void 0 : _b.length) || 0) * 3;
132353
+ totalValuesLength += ((_c = setColorValues[channelIndex]) == null ? void 0 : _c.obsIndex) ? max(setColorValues[channelIndex].obsIndex.map((d) => parseInt(d))) : 0;
132307
132354
  } else {
132308
- totalValuesLength += ((_e = multiFeatureValues[channelIndex]) == null ? void 0 : _e.length) || 0;
132355
+ totalValuesLength += multiMatrixObsIndex[channelIndex] ? max(multiMatrixObsIndex[channelIndex].map((d) => parseInt(d))) : ((_d = multiFeatureValues[channelIndex]) == null ? void 0 : _d.length) || 0;
132309
132356
  }
132310
132357
  });
132311
132358
  const valueTexHeight = Math.max(2, Math.ceil(totalValuesLength / texSize));
@@ -132323,12 +132370,20 @@ function multiSetsToTextureData(multiFeatureValues, setColorValues, channelIsSet
132323
132370
  let indexOffset = 0;
132324
132371
  let colorOffset = 0;
132325
132372
  channelIsSetColorMode.forEach((isSetColorMode, channelIndex) => {
132373
+ const matrixObsIndex = multiMatrixObsIndex[channelIndex];
132374
+ const bitmaskValueIsIndex = matrixObsIndex === null;
132326
132375
  if (isSetColorMode) {
132327
132376
  const { setColorIndices, setColors, obsIndex } = setColorValues[channelIndex] || {};
132328
132377
  if (setColorIndices && setColors && obsIndex) {
132329
132378
  for (let i2 = 0; i2 < obsIndex.length; i2++) {
132330
- const colorIndex = setColorIndices.get(String(i2 + 1));
132331
- totalData[indexOffset + i2] = colorIndex === void 0 ? 0 : colorIndex + 1;
132379
+ let obsId = String(i2 + 1);
132380
+ let obsI = i2;
132381
+ if (!bitmaskValueIsIndex) {
132382
+ obsId = obsIndex[i2];
132383
+ obsI = parseInt(obsId) - 1;
132384
+ }
132385
+ const colorIndex = setColorIndices.get(obsId);
132386
+ totalData[indexOffset + obsI] = colorIndex === void 0 ? 0 : colorIndex + 1;
132332
132387
  }
132333
132388
  for (let i2 = 0; i2 < setColors.length; i2++) {
132334
132389
  const { color: [r2, g2, b] } = setColors[i2];
@@ -132343,7 +132398,16 @@ function multiSetsToTextureData(multiFeatureValues, setColorValues, channelIsSet
132343
132398
  colorOffset += (setColors == null ? void 0 : setColors.length) || 0;
132344
132399
  } else {
132345
132400
  const featureArr = multiFeatureValues[channelIndex];
132346
- totalData.set(normalize$1(featureArr), indexOffset);
132401
+ const normalizedFeatureArr = normalize$1(featureArr);
132402
+ if (!bitmaskValueIsIndex && matrixObsIndex) {
132403
+ for (let i2 = 0; i2 < matrixObsIndex.length; i2++) {
132404
+ const obsId = matrixObsIndex[i2];
132405
+ const obsI = parseInt(obsId) - 1;
132406
+ totalData[indexOffset + obsI] = normalizedFeatureArr[i2];
132407
+ }
132408
+ } else {
132409
+ totalData.set(normalizedFeatureArr, indexOffset);
132410
+ }
132347
132411
  indicesOffsets.push(indexOffset);
132348
132412
  indexOffset += featureArr.length;
132349
132413
  colorsOffsets.push(colorOffset);
@@ -132370,6 +132434,17 @@ function padWithDefault(arr, defaultValue2, padWidth) {
132370
132434
  function getColor(arr) {
132371
132435
  return arr ? arr.map((v) => v / 255) : [0, 0, 0];
132372
132436
  }
132437
+ function isEqualShallow(prevArr, nextArr) {
132438
+ if (prevArr === nextArr) {
132439
+ return true;
132440
+ }
132441
+ if (Array.isArray(prevArr) && Array.isArray(nextArr)) {
132442
+ if (prevArr.length === nextArr.length) {
132443
+ return !prevArr.some((v, i2) => v !== nextArr[i2] && (!Array.isArray(v) && !Array.isArray(nextArr[i2]) || (v.length > 0 || nextArr[i2].length > 0)));
132444
+ }
132445
+ }
132446
+ return prevArr === nextArr;
132447
+ }
132373
132448
  const defaultProps$1 = {
132374
132449
  channelStrokeWidths: { type: "array", value: null, compare: true },
132375
132450
  channelsFilled: { type: "array", value: null, compare: true },
@@ -132379,6 +132454,7 @@ const defaultProps$1 = {
132379
132454
  colormap: { type: "string", value: GLSL_COLORMAP_DEFAULT, compare: true },
132380
132455
  expressionData: { type: "object", value: null, compare: true },
132381
132456
  multiFeatureValues: { type: "array", value: null, compare: true },
132457
+ multiMatrixObsIndex: { type: "array", value: null, compare: true },
132382
132458
  setColorValues: { type: "array", value: null, compare: true },
132383
132459
  channelFeatureValueColormaps: { type: "array", value: null, compare: true },
132384
132460
  channelFeatureValueColormapRanges: { type: "array", value: null, compare: true },
@@ -132425,9 +132501,9 @@ class BitmaskLayer2 extends XRLayer {
132425
132501
  }
132426
132502
  updateState({ props: props2, oldProps, changeFlags }) {
132427
132503
  super.updateState({ props: props2, oldProps, changeFlags });
132428
- if (props2.multiFeatureValues !== oldProps.multiFeatureValues || props2.setColorValues !== oldProps.setColorValues || props2.channelIsSetColorMode !== oldProps.channelIsSetColorMode) {
132429
- const { multiFeatureValues, setColorValues, channelIsSetColorMode } = this.props;
132430
- const [valueTex, colorTex, valueTexOffsets, colorTexOffsets, valueTexHeight, colorTexHeight] = this.multiSetsToTexture(multiFeatureValues, setColorValues, channelIsSetColorMode);
132504
+ if (!isEqualShallow(props2.multiFeatureValues, oldProps.multiFeatureValues) || !isEqualShallow(props2.multiMatrixObsIndex, oldProps.multiMatrixObsIndex) || !isEqualShallow(props2.setColorValues, oldProps.setColorValues) || !isEqualShallow(props2.channelIsSetColorMode, oldProps.channelIsSetColorMode)) {
132505
+ const { multiFeatureValues, multiMatrixObsIndex, setColorValues, channelIsSetColorMode } = this.props;
132506
+ const [valueTex, colorTex, valueTexOffsets, colorTexOffsets, valueTexHeight, colorTexHeight] = this.multiSetsToTexture(multiFeatureValues, multiMatrixObsIndex, setColorValues, channelIsSetColorMode);
132431
132507
  this.setState({
132432
132508
  valueTex,
132433
132509
  colorTex,
@@ -132579,9 +132655,9 @@ class BitmaskLayer2 extends XRLayer {
132579
132655
  type: GL$1.FLOAT
132580
132656
  });
132581
132657
  }
132582
- multiSetsToTexture(multiFeatureValues, setColorValues, channelIsSetColorMode) {
132658
+ multiSetsToTexture(multiFeatureValues, multiMatrixObsIndex, setColorValues, channelIsSetColorMode) {
132583
132659
  const isWebGL2On = isWebGL2$1(this.context.gl);
132584
- const [totalData, valueTexHeight, indicesOffsets, totalColors, colorTexHeight, colorsOffsets] = multiSetsToTextureData(multiFeatureValues, setColorValues, channelIsSetColorMode, MULTI_FEATURE_TEX_SIZE);
132660
+ const [totalData, valueTexHeight, indicesOffsets, totalColors, colorTexHeight, colorsOffsets] = multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColorValues, channelIsSetColorMode, MULTI_FEATURE_TEX_SIZE);
132585
132661
  return [
132586
132662
  // Color indices texture
132587
132663
  new Texture2D(this.context.gl, {
@@ -133833,13 +133909,13 @@ var refType = PropTypes.oneOfType([PropTypes.func, PropTypes.object]);
133833
133909
  const refType$1 = refType;
133834
133910
  function clamp$1(value) {
133835
133911
  var min = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
133836
- var max = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1;
133912
+ var max2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1;
133837
133913
  {
133838
- if (value < min || value > max) {
133839
- console.error("Material-UI: The value provided ".concat(value, " is out of range [").concat(min, ", ").concat(max, "]."));
133914
+ if (value < min || value > max2) {
133915
+ console.error("Material-UI: The value provided ".concat(value, " is out of range [").concat(min, ", ").concat(max2, "]."));
133840
133916
  }
133841
133917
  }
133842
- return Math.min(Math.max(min, value), max);
133918
+ return Math.min(Math.max(min, value), max2);
133843
133919
  }
133844
133920
  function hexToRgb(color2) {
133845
133921
  color2 = color2.substr(1);
@@ -141494,8 +141570,8 @@ const ValueLabel$1 = withStyles2(styles$4, {
141494
141570
  function asc(a2, b) {
141495
141571
  return a2 - b;
141496
141572
  }
141497
- function clamp(value, min, max) {
141498
- return Math.min(Math.max(min, value), max);
141573
+ function clamp(value, min, max2) {
141574
+ return Math.min(Math.max(min, value), max2);
141499
141575
  }
141500
141576
  function findClosest(values2, currentValue) {
141501
141577
  var _values$reduce = values2.reduce(function(acc, value, index2) {
@@ -141528,11 +141604,11 @@ function trackFinger(event, touchId) {
141528
141604
  y: event.clientY
141529
141605
  };
141530
141606
  }
141531
- function valueToPercent(value, min, max) {
141532
- return (value - min) * 100 / (max - min);
141607
+ function valueToPercent(value, min, max2) {
141608
+ return (value - min) * 100 / (max2 - min);
141533
141609
  }
141534
- function percentToValue(percent2, min, max) {
141535
- return (max - min) * percent2 + min;
141610
+ function percentToValue(percent2, min, max2) {
141611
+ return (max2 - min) * percent2 + min;
141536
141612
  }
141537
141613
  function getDecimalPrecision(num) {
141538
141614
  if (Math.abs(num) < 1) {
@@ -141820,7 +141896,7 @@ var styles$3 = function styles7(theme) {
141820
141896
  };
141821
141897
  };
141822
141898
  var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
141823
- var ariaLabel = props2["aria-label"], ariaLabelledby = props2["aria-labelledby"], ariaValuetext = props2["aria-valuetext"], classes = props2.classes, className = props2.className, _props$color = props2.color, color2 = _props$color === void 0 ? "primary" : _props$color, _props$component = props2.component, Component2 = _props$component === void 0 ? "span" : _props$component, defaultValue2 = props2.defaultValue, _props$disabled = props2.disabled, disabled = _props$disabled === void 0 ? false : _props$disabled, getAriaLabel = props2.getAriaLabel, getAriaValueText = props2.getAriaValueText, _props$marks = props2.marks, marksProp = _props$marks === void 0 ? false : _props$marks, _props$max = props2.max, max = _props$max === void 0 ? 100 : _props$max, _props$min = props2.min, min = _props$min === void 0 ? 0 : _props$min, name2 = props2.name, onChange = props2.onChange, onChangeCommitted = props2.onChangeCommitted, onMouseDown = props2.onMouseDown, _props$orientation = props2.orientation, orientation = _props$orientation === void 0 ? "horizontal" : _props$orientation, _props$scale = props2.scale, scale2 = _props$scale === void 0 ? Identity : _props$scale, _props$step = props2.step, step = _props$step === void 0 ? 1 : _props$step, _props$ThumbComponent = props2.ThumbComponent, ThumbComponent = _props$ThumbComponent === void 0 ? "span" : _props$ThumbComponent, _props$track = props2.track, track = _props$track === void 0 ? "normal" : _props$track, valueProp = props2.value, _props$ValueLabelComp = props2.ValueLabelComponent, ValueLabelComponent = _props$ValueLabelComp === void 0 ? ValueLabel$1 : _props$ValueLabelComp, _props$valueLabelDisp = props2.valueLabelDisplay, valueLabelDisplay = _props$valueLabelDisp === void 0 ? "off" : _props$valueLabelDisp, _props$valueLabelForm = props2.valueLabelFormat, valueLabelFormat = _props$valueLabelForm === void 0 ? Identity : _props$valueLabelForm, other = _objectWithoutProperties(props2, ["aria-label", "aria-labelledby", "aria-valuetext", "classes", "className", "color", "component", "defaultValue", "disabled", "getAriaLabel", "getAriaValueText", "marks", "max", "min", "name", "onChange", "onChangeCommitted", "onMouseDown", "orientation", "scale", "step", "ThumbComponent", "track", "value", "ValueLabelComponent", "valueLabelDisplay", "valueLabelFormat"]);
141899
+ var ariaLabel = props2["aria-label"], ariaLabelledby = props2["aria-labelledby"], ariaValuetext = props2["aria-valuetext"], classes = props2.classes, className = props2.className, _props$color = props2.color, color2 = _props$color === void 0 ? "primary" : _props$color, _props$component = props2.component, Component2 = _props$component === void 0 ? "span" : _props$component, defaultValue2 = props2.defaultValue, _props$disabled = props2.disabled, disabled = _props$disabled === void 0 ? false : _props$disabled, getAriaLabel = props2.getAriaLabel, getAriaValueText = props2.getAriaValueText, _props$marks = props2.marks, marksProp = _props$marks === void 0 ? false : _props$marks, _props$max = props2.max, max2 = _props$max === void 0 ? 100 : _props$max, _props$min = props2.min, min = _props$min === void 0 ? 0 : _props$min, name2 = props2.name, onChange = props2.onChange, onChangeCommitted = props2.onChangeCommitted, onMouseDown = props2.onMouseDown, _props$orientation = props2.orientation, orientation = _props$orientation === void 0 ? "horizontal" : _props$orientation, _props$scale = props2.scale, scale2 = _props$scale === void 0 ? Identity : _props$scale, _props$step = props2.step, step = _props$step === void 0 ? 1 : _props$step, _props$ThumbComponent = props2.ThumbComponent, ThumbComponent = _props$ThumbComponent === void 0 ? "span" : _props$ThumbComponent, _props$track = props2.track, track = _props$track === void 0 ? "normal" : _props$track, valueProp = props2.value, _props$ValueLabelComp = props2.ValueLabelComponent, ValueLabelComponent = _props$ValueLabelComp === void 0 ? ValueLabel$1 : _props$ValueLabelComp, _props$valueLabelDisp = props2.valueLabelDisplay, valueLabelDisplay = _props$valueLabelDisp === void 0 ? "off" : _props$valueLabelDisp, _props$valueLabelForm = props2.valueLabelFormat, valueLabelFormat = _props$valueLabelForm === void 0 ? Identity : _props$valueLabelForm, other = _objectWithoutProperties(props2, ["aria-label", "aria-labelledby", "aria-valuetext", "classes", "className", "color", "component", "defaultValue", "disabled", "getAriaLabel", "getAriaValueText", "marks", "max", "min", "name", "onChange", "onChangeCommitted", "onMouseDown", "orientation", "scale", "step", "ThumbComponent", "track", "value", "ValueLabelComponent", "valueLabelDisplay", "valueLabelFormat"]);
141824
141900
  var theme = useTheme();
141825
141901
  var touchId = React.useRef();
141826
141902
  var _React$useState = React.useState(-1), active = _React$useState[0], setActive = _React$useState[1];
@@ -141833,9 +141909,9 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
141833
141909
  var range2 = Array.isArray(valueDerived);
141834
141910
  var values2 = range2 ? valueDerived.slice().sort(asc) : [valueDerived];
141835
141911
  values2 = values2.map(function(value) {
141836
- return clamp(value, min, max);
141912
+ return clamp(value, min, max2);
141837
141913
  });
141838
- var marks = marksProp === true && step !== null ? _toConsumableArray$1(Array(Math.floor((max - min) / step) + 1)).map(function(_, index2) {
141914
+ var marks = marksProp === true && step !== null ? _toConsumableArray$1(Array(Math.floor((max2 - min) / step) + 1)).map(function(_, index2) {
141839
141915
  return {
141840
141916
  value: min + step * index2
141841
141917
  };
@@ -141870,7 +141946,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
141870
141946
  var handleKeyDown2 = useEventCallback(function(event) {
141871
141947
  var index2 = Number(event.currentTarget.getAttribute("data-index"));
141872
141948
  var value = values2[index2];
141873
- var tenPercents = (max - min) / 10;
141949
+ var tenPercents = (max2 - min) / 10;
141874
141950
  var marksValues = marks.map(function(mark) {
141875
141951
  return mark.value;
141876
141952
  });
@@ -141883,7 +141959,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
141883
141959
  newValue = min;
141884
141960
  break;
141885
141961
  case "End":
141886
- newValue = max;
141962
+ newValue = max2;
141887
141963
  break;
141888
141964
  case "PageUp":
141889
141965
  if (step) {
@@ -141918,7 +141994,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
141918
141994
  if (step) {
141919
141995
  newValue = roundValueToStep(newValue, step, min);
141920
141996
  }
141921
- newValue = clamp(newValue, min, max);
141997
+ newValue = clamp(newValue, min, max2);
141922
141998
  if (range2) {
141923
141999
  var previousValue = newValue;
141924
142000
  newValue = setValueIndex({
@@ -141960,7 +142036,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
141960
142036
  percent2 = 1 - percent2;
141961
142037
  }
141962
142038
  var newValue;
141963
- newValue = percentToValue(percent2, min, max);
142039
+ newValue = percentToValue(percent2, min, max2);
141964
142040
  if (step) {
141965
142041
  newValue = roundValueToStep(newValue, step, min);
141966
142042
  } else {
@@ -141970,7 +142046,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
141970
142046
  var closestIndex = findClosest(marksValues, newValue);
141971
142047
  newValue = marksValues[closestIndex];
141972
142048
  }
141973
- newValue = clamp(newValue, min, max);
142049
+ newValue = clamp(newValue, min, max2);
141974
142050
  var activeIndex = 0;
141975
142051
  if (range2) {
141976
142052
  if (!move) {
@@ -142099,8 +142175,8 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
142099
142175
  doc.addEventListener("mousemove", handleTouchMove);
142100
142176
  doc.addEventListener("mouseup", handleTouchEnd);
142101
142177
  });
142102
- var trackOffset = valueToPercent(range2 ? values2[0] : min, min, max);
142103
- var trackLeap = valueToPercent(values2[values2.length - 1], min, max) - trackOffset;
142178
+ var trackOffset = valueToPercent(range2 ? values2[0] : min, min, max2);
142179
+ var trackLeap = valueToPercent(values2[values2.length - 1], min, max2) - trackOffset;
142104
142180
  var trackStyle = _extends$1({}, axisProps[axis2].offset(trackOffset), axisProps[axis2].leap(trackLeap));
142105
142181
  return /* @__PURE__ */ React.createElement(Component2, _extends$1({
142106
142182
  ref: handleRef,
@@ -142118,7 +142194,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
142118
142194
  name: name2,
142119
142195
  type: "hidden"
142120
142196
  }), marks.map(function(mark, index2) {
142121
- var percent2 = valueToPercent(mark.value, min, max);
142197
+ var percent2 = valueToPercent(mark.value, min, max2);
142122
142198
  var style = axisProps[axis2].offset(percent2);
142123
142199
  var markActive;
142124
142200
  if (track === false) {
@@ -142139,7 +142215,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
142139
142215
  className: clsx(classes.markLabel, markActive && classes.markLabelActive)
142140
142216
  }, mark.label) : null);
142141
142217
  }), values2.map(function(value, index2) {
142142
- var percent2 = valueToPercent(value, min, max);
142218
+ var percent2 = valueToPercent(value, min, max2);
142143
142219
  var style = axisProps[axis2].offset(percent2);
142144
142220
  return /* @__PURE__ */ React.createElement(ValueLabelComponent, {
142145
142221
  key: index2,
@@ -142159,7 +142235,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
142159
142235
  "aria-label": getAriaLabel ? getAriaLabel(index2) : ariaLabel,
142160
142236
  "aria-labelledby": ariaLabelledby,
142161
142237
  "aria-orientation": orientation,
142162
- "aria-valuemax": scale2(max),
142238
+ "aria-valuemax": scale2(max2),
142163
142239
  "aria-valuemin": scale2(min),
142164
142240
  "aria-valuenow": scale2(value),
142165
142241
  "aria-valuetext": getAriaValueText ? getAriaValueText(scale2(value), index2) : ariaValuetext,
@@ -144657,15 +144733,15 @@ function hslConvert(o2) {
144657
144733
  if (o2 instanceof Hsl)
144658
144734
  return o2;
144659
144735
  o2 = o2.rgb();
144660
- var r2 = o2.r / 255, g2 = o2.g / 255, b = o2.b / 255, min = Math.min(r2, g2, b), max = Math.max(r2, g2, b), h = NaN, s2 = max - min, l2 = (max + min) / 2;
144736
+ var r2 = o2.r / 255, g2 = o2.g / 255, b = o2.b / 255, min = Math.min(r2, g2, b), max2 = Math.max(r2, g2, b), h = NaN, s2 = max2 - min, l2 = (max2 + min) / 2;
144661
144737
  if (s2) {
144662
- if (r2 === max)
144738
+ if (r2 === max2)
144663
144739
  h = (g2 - b) / s2 + (g2 < b) * 6;
144664
- else if (g2 === max)
144740
+ else if (g2 === max2)
144665
144741
  h = (b - r2) / s2 + 2;
144666
144742
  else
144667
144743
  h = (r2 - g2) / s2 + 4;
144668
- s2 /= l2 < 0.5 ? max + min : 2 - max - min;
144744
+ s2 /= l2 < 0.5 ? max2 + min : 2 - max2 - min;
144669
144745
  h *= 60;
144670
144746
  } else {
144671
144747
  s2 = l2 > 0 && l2 < 1 ? 0 : h;
@@ -145213,9 +145289,9 @@ function precisionFixed(step) {
145213
145289
  function precisionPrefix(step, value) {
145214
145290
  return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));
145215
145291
  }
145216
- function precisionRound(step, max) {
145217
- step = Math.abs(step), max = Math.abs(max) - step;
145218
- return Math.max(0, exponent(max) - exponent(step)) + 1;
145292
+ function precisionRound(step, max2) {
145293
+ step = Math.abs(step), max2 = Math.abs(max2) - step;
145294
+ return Math.max(0, exponent(max2) - exponent(step)) + 1;
145219
145295
  }
145220
145296
  function tickFormat(start, stop, count2, specifier) {
145221
145297
  var step = tickStep(start, stop, count2), precision;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { E } from "./index-e7cfe3df.js";
1
+ import { E } from "./index-c936b693.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-e7cfe3df.js";
1
+ import { B as BaseDecoder } from "./index-c936b693.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
2
- import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-e7cfe3df.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-c936b693.js";
3
3
  import "react";
4
4
  import "@vitessce/vit-s";
5
5
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-e7cfe3df.js";
1
+ import { B as BaseDecoder } from "./index-c936b693.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-e7cfe3df.js";
1
+ import { B as BaseDecoder } from "./index-c936b693.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-e7cfe3df.js";
1
+ import { B as BaseDecoder } from "./index-c936b693.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-e7cfe3df.js";
1
+ import { B as BaseDecoder } from "./index-c936b693.js";
2
2
  import "react";
3
3
  import "@vitessce/vit-s";
4
4
  import "react-dom";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/scatterplot-embedding",
3
- "version": "3.3.2",
3
+ "version": "3.3.3",
4
4
  "author": "Gehlenborg Lab",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -20,12 +20,12 @@
20
20
  "d3-array": "^2.4.0",
21
21
  "lodash-es": "^4.17.21",
22
22
  "react-aria": "^3.28.0",
23
- "@vitessce/legend": "3.3.2",
24
- "@vitessce/constants-internal": "3.3.2",
25
- "@vitessce/scatterplot": "3.3.2",
26
- "@vitessce/sets-utils": "3.3.2",
27
- "@vitessce/utils": "3.3.2",
28
- "@vitessce/vit-s": "3.3.2"
23
+ "@vitessce/constants-internal": "3.3.3",
24
+ "@vitessce/legend": "3.3.3",
25
+ "@vitessce/scatterplot": "3.3.3",
26
+ "@vitessce/sets-utils": "3.3.3",
27
+ "@vitessce/vit-s": "3.3.3",
28
+ "@vitessce/utils": "3.3.3"
29
29
  },
30
30
  "devDependencies": {
31
31
  "react": "^18.0.0",