@vitessce/heatmap 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.
- package/dist/{deflate-75a89dc6.js → deflate-ca3a4331.js} +1 -1
- package/dist/{index-b879347c.js → index-98499b51.js} +233 -157
- package/dist/index.js +1 -1
- package/dist/{jpeg-f4efd5d2.js → jpeg-de3f5fd6.js} +1 -1
- package/dist/{lerc-24acd19a.js → lerc-1f658a8e.js} +1 -1
- package/dist/{lzw-4bad7337.js → lzw-85a51820.js} +1 -1
- package/dist/{packbits-2b4a014a.js → packbits-e923ce89.js} +1 -1
- package/dist/{raw-486d710b.js → raw-0da61dee.js} +1 -1
- package/dist/{webimage-5effa8da.js → webimage-dc2efc6c.js} +1 -1
- package/package.json +9 -9
|
@@ -5474,14 +5474,14 @@ class ZodString extends ZodType {
|
|
|
5474
5474
|
return min;
|
|
5475
5475
|
}
|
|
5476
5476
|
get maxLength() {
|
|
5477
|
-
let
|
|
5477
|
+
let max2 = null;
|
|
5478
5478
|
for (const ch of this._def.checks) {
|
|
5479
5479
|
if (ch.kind === "max") {
|
|
5480
|
-
if (
|
|
5481
|
-
|
|
5480
|
+
if (max2 === null || ch.value < max2)
|
|
5481
|
+
max2 = ch.value;
|
|
5482
5482
|
}
|
|
5483
5483
|
}
|
|
5484
|
-
return
|
|
5484
|
+
return max2;
|
|
5485
5485
|
}
|
|
5486
5486
|
}
|
|
5487
5487
|
ZodString.create = (params) => {
|
|
@@ -5696,20 +5696,20 @@ class ZodNumber extends ZodType {
|
|
|
5696
5696
|
return min;
|
|
5697
5697
|
}
|
|
5698
5698
|
get maxValue() {
|
|
5699
|
-
let
|
|
5699
|
+
let max2 = null;
|
|
5700
5700
|
for (const ch of this._def.checks) {
|
|
5701
5701
|
if (ch.kind === "max") {
|
|
5702
|
-
if (
|
|
5703
|
-
|
|
5702
|
+
if (max2 === null || ch.value < max2)
|
|
5703
|
+
max2 = ch.value;
|
|
5704
5704
|
}
|
|
5705
5705
|
}
|
|
5706
|
-
return
|
|
5706
|
+
return max2;
|
|
5707
5707
|
}
|
|
5708
5708
|
get isInt() {
|
|
5709
5709
|
return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util$4.isInteger(ch.value));
|
|
5710
5710
|
}
|
|
5711
5711
|
get isFinite() {
|
|
5712
|
-
let
|
|
5712
|
+
let max2 = null, min = null;
|
|
5713
5713
|
for (const ch of this._def.checks) {
|
|
5714
5714
|
if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
|
|
5715
5715
|
return true;
|
|
@@ -5717,11 +5717,11 @@ class ZodNumber extends ZodType {
|
|
|
5717
5717
|
if (min === null || ch.value > min)
|
|
5718
5718
|
min = ch.value;
|
|
5719
5719
|
} else if (ch.kind === "max") {
|
|
5720
|
-
if (
|
|
5721
|
-
|
|
5720
|
+
if (max2 === null || ch.value < max2)
|
|
5721
|
+
max2 = ch.value;
|
|
5722
5722
|
}
|
|
5723
5723
|
}
|
|
5724
|
-
return Number.isFinite(min) && Number.isFinite(
|
|
5724
|
+
return Number.isFinite(min) && Number.isFinite(max2);
|
|
5725
5725
|
}
|
|
5726
5726
|
}
|
|
5727
5727
|
ZodNumber.create = (params) => {
|
|
@@ -5879,14 +5879,14 @@ class ZodBigInt extends ZodType {
|
|
|
5879
5879
|
return min;
|
|
5880
5880
|
}
|
|
5881
5881
|
get maxValue() {
|
|
5882
|
-
let
|
|
5882
|
+
let max2 = null;
|
|
5883
5883
|
for (const ch of this._def.checks) {
|
|
5884
5884
|
if (ch.kind === "max") {
|
|
5885
|
-
if (
|
|
5886
|
-
|
|
5885
|
+
if (max2 === null || ch.value < max2)
|
|
5886
|
+
max2 = ch.value;
|
|
5887
5887
|
}
|
|
5888
5888
|
}
|
|
5889
|
-
return
|
|
5889
|
+
return max2;
|
|
5890
5890
|
}
|
|
5891
5891
|
}
|
|
5892
5892
|
ZodBigInt.create = (params) => {
|
|
@@ -6014,14 +6014,14 @@ class ZodDate extends ZodType {
|
|
|
6014
6014
|
return min != null ? new Date(min) : null;
|
|
6015
6015
|
}
|
|
6016
6016
|
get maxDate() {
|
|
6017
|
-
let
|
|
6017
|
+
let max2 = null;
|
|
6018
6018
|
for (const ch of this._def.checks) {
|
|
6019
6019
|
if (ch.kind === "max") {
|
|
6020
|
-
if (
|
|
6021
|
-
|
|
6020
|
+
if (max2 === null || ch.value < max2)
|
|
6021
|
+
max2 = ch.value;
|
|
6022
6022
|
}
|
|
6023
6023
|
}
|
|
6024
|
-
return
|
|
6024
|
+
return max2 != null ? new Date(max2) : null;
|
|
6025
6025
|
}
|
|
6026
6026
|
}
|
|
6027
6027
|
ZodDate.create = (params) => {
|
|
@@ -10380,7 +10380,7 @@ var toComparators_1 = toComparators$1;
|
|
|
10380
10380
|
const SemVer$4 = semver;
|
|
10381
10381
|
const Range$7 = requireRange();
|
|
10382
10382
|
const maxSatisfying$1 = (versions, range2, options) => {
|
|
10383
|
-
let
|
|
10383
|
+
let max2 = null;
|
|
10384
10384
|
let maxSV = null;
|
|
10385
10385
|
let rangeObj = null;
|
|
10386
10386
|
try {
|
|
@@ -10390,13 +10390,13 @@ const maxSatisfying$1 = (versions, range2, options) => {
|
|
|
10390
10390
|
}
|
|
10391
10391
|
versions.forEach((v) => {
|
|
10392
10392
|
if (rangeObj.test(v)) {
|
|
10393
|
-
if (!
|
|
10394
|
-
|
|
10395
|
-
maxSV = new SemVer$4(
|
|
10393
|
+
if (!max2 || maxSV.compare(v) === -1) {
|
|
10394
|
+
max2 = v;
|
|
10395
|
+
maxSV = new SemVer$4(max2, options);
|
|
10396
10396
|
}
|
|
10397
10397
|
}
|
|
10398
10398
|
});
|
|
10399
|
-
return
|
|
10399
|
+
return max2;
|
|
10400
10400
|
};
|
|
10401
10401
|
var maxSatisfying_1 = maxSatisfying$1;
|
|
10402
10402
|
const SemVer$3 = semver;
|
|
@@ -10581,17 +10581,17 @@ var simplify = (versions, range2, options) => {
|
|
|
10581
10581
|
set2.push([first, null]);
|
|
10582
10582
|
}
|
|
10583
10583
|
const ranges2 = [];
|
|
10584
|
-
for (const [min,
|
|
10585
|
-
if (min ===
|
|
10584
|
+
for (const [min, max2] of set2) {
|
|
10585
|
+
if (min === max2) {
|
|
10586
10586
|
ranges2.push(min);
|
|
10587
|
-
} else if (!
|
|
10587
|
+
} else if (!max2 && min === v[0]) {
|
|
10588
10588
|
ranges2.push("*");
|
|
10589
|
-
} else if (!
|
|
10589
|
+
} else if (!max2) {
|
|
10590
10590
|
ranges2.push(`>=${min}`);
|
|
10591
10591
|
} else if (min === v[0]) {
|
|
10592
|
-
ranges2.push(`<=${
|
|
10592
|
+
ranges2.push(`<=${max2}`);
|
|
10593
10593
|
} else {
|
|
10594
|
-
ranges2.push(`${min} - ${
|
|
10594
|
+
ranges2.push(`${min} - ${max2}`);
|
|
10595
10595
|
}
|
|
10596
10596
|
}
|
|
10597
10597
|
const simplified = ranges2.join(" || ");
|
|
@@ -10885,7 +10885,9 @@ const FileType$1 = {
|
|
|
10885
10885
|
OBS_SEGMENTATIONS_JSON: "obsSegmentations.json",
|
|
10886
10886
|
OBS_SETS_CSV: "obsSets.csv",
|
|
10887
10887
|
OBS_SETS_JSON: "obsSets.json",
|
|
10888
|
+
// OME-Zarr
|
|
10888
10889
|
IMAGE_OME_ZARR: "image.ome-zarr",
|
|
10890
|
+
OBS_SEGMENTATIONS_OME_ZARR: "obsSegmentations.ome-zarr",
|
|
10889
10891
|
// AnnData
|
|
10890
10892
|
OBS_FEATURE_MATRIX_ANNDATA_ZARR: "obsFeatureMatrix.anndata.zarr",
|
|
10891
10893
|
OBS_SETS_ANNDATA_ZARR: "obsSets.anndata.zarr",
|
|
@@ -11369,7 +11371,9 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
11369
11371
|
CoordinationType$1.SPATIAL_SEGMENTATION_FILLED,
|
|
11370
11372
|
CoordinationType$1.SPATIAL_SEGMENTATION_STROKE_WIDTH,
|
|
11371
11373
|
CoordinationType$1.IMAGE_CHANNEL,
|
|
11374
|
+
CoordinationType$1.IMAGE_LAYER,
|
|
11372
11375
|
CoordinationType$1.SEGMENTATION_CHANNEL,
|
|
11376
|
+
CoordinationType$1.SEGMENTATION_LAYER,
|
|
11373
11377
|
CoordinationType$1.SPATIAL_CHANNEL_VISIBLE,
|
|
11374
11378
|
CoordinationType$1.SPATIAL_CHANNEL_OPACITY,
|
|
11375
11379
|
CoordinationType$1.SPATIAL_CHANNEL_WINDOW,
|
|
@@ -11387,6 +11391,9 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
11387
11391
|
CoordinationType$1.SPATIAL_SPOT_STROKE_WIDTH,
|
|
11388
11392
|
CoordinationType$1.SPATIAL_LAYER_COLOR,
|
|
11389
11393
|
CoordinationType$1.OBS_COLOR_ENCODING,
|
|
11394
|
+
CoordinationType$1.FEATURE_VALUE_COLORMAP,
|
|
11395
|
+
CoordinationType$1.FEATURE_VALUE_COLORMAP_RANGE,
|
|
11396
|
+
CoordinationType$1.FEATURE_SELECTION,
|
|
11390
11397
|
CoordinationType$1.TOOLTIPS_VISIBLE,
|
|
11391
11398
|
CoordinationType$1.TOOLTIP_CROSSHAIRS_VISIBLE,
|
|
11392
11399
|
CoordinationType$1.LEGEND_VISIBLE,
|
|
@@ -11703,30 +11710,39 @@ const omeCoordinateTransformations = z.array(z.union([
|
|
|
11703
11710
|
scale: z.array(z.number())
|
|
11704
11711
|
})
|
|
11705
11712
|
]));
|
|
11706
|
-
z.object({
|
|
11713
|
+
const imageOmeTiffSchema = z.object({
|
|
11707
11714
|
offsetsUrl: z.string().optional(),
|
|
11708
11715
|
coordinateTransformations: omeCoordinateTransformations.optional()
|
|
11709
11716
|
});
|
|
11717
|
+
imageOmeTiffSchema.extend({
|
|
11718
|
+
obsTypesFromChannelNames: z.boolean().optional()
|
|
11719
|
+
});
|
|
11710
11720
|
const imageOmeZarrSchema = z.object({
|
|
11711
11721
|
coordinateTransformations: omeCoordinateTransformations.optional()
|
|
11712
11722
|
});
|
|
11713
11723
|
imageOmeZarrSchema.extend({
|
|
11724
|
+
obsTypesFromChannelNames: z.boolean().optional()
|
|
11725
|
+
});
|
|
11726
|
+
const imageSpatialdataSchema = imageOmeZarrSchema.extend({
|
|
11714
11727
|
path: z.string()
|
|
11715
11728
|
});
|
|
11716
|
-
z.object({
|
|
11729
|
+
const obsSegmentationsSpatialdataSchema = z.object({
|
|
11730
|
+
// TODO: should this also extend the imageOmeZarrSchema?
|
|
11731
|
+
// TODO: should this be renamed labelsSpatialdataSchema?
|
|
11732
|
+
// TODO: support obsTypesFromChannelNames?
|
|
11717
11733
|
path: z.string()
|
|
11718
11734
|
});
|
|
11719
11735
|
z.object({
|
|
11720
11736
|
path: z.string()
|
|
11721
11737
|
});
|
|
11722
|
-
z.object({
|
|
11738
|
+
const obsSpotsSpatialdataSchema = z.object({
|
|
11723
11739
|
path: z.string(),
|
|
11724
11740
|
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.")
|
|
11725
11741
|
});
|
|
11726
|
-
annDataObsFeatureMatrix.extend({
|
|
11742
|
+
const obsFeatureMatrixSpatialdataSchema = annDataObsFeatureMatrix.extend({
|
|
11727
11743
|
region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional()
|
|
11728
11744
|
});
|
|
11729
|
-
z.object({
|
|
11745
|
+
const obsSetsSpatialdataSchema = z.object({
|
|
11730
11746
|
region: z.string().describe("The name of a region to use to filter instances (i.e., rows) in the table").optional(),
|
|
11731
11747
|
tablePath: z.string().optional().describe("The path to a table which contains the index for the set values."),
|
|
11732
11748
|
obsSets: annDataObsSets
|
|
@@ -11789,6 +11805,19 @@ z.object({
|
|
|
11789
11805
|
z.array(annDataConvenienceObsEmbeddingItem)
|
|
11790
11806
|
])
|
|
11791
11807
|
}).partial();
|
|
11808
|
+
z.object({
|
|
11809
|
+
// TODO: should `image` be a special schema
|
|
11810
|
+
// to allow specifying fileUid (like for embeddingType)?
|
|
11811
|
+
image: imageSpatialdataSchema,
|
|
11812
|
+
// TODO: should this be a special schema
|
|
11813
|
+
// to allow specifying fileUid (like for embeddingType)?
|
|
11814
|
+
labels: obsSegmentationsSpatialdataSchema,
|
|
11815
|
+
obsFeatureMatrix: obsFeatureMatrixSpatialdataSchema,
|
|
11816
|
+
obsSpots: obsSpotsSpatialdataSchema,
|
|
11817
|
+
// TODO: obsPoints
|
|
11818
|
+
// TODO: obsLocations
|
|
11819
|
+
obsSets: obsSetsSpatialdataSchema
|
|
11820
|
+
}).partial();
|
|
11792
11821
|
z.object({
|
|
11793
11822
|
obsLabelsTypes: z.array(z.string()).optional(),
|
|
11794
11823
|
embeddingTypes: z.array(z.string()).optional()
|
|
@@ -12162,14 +12191,14 @@ var tinycolor = { exports: {} };
|
|
|
12162
12191
|
r2 = bound01(r2, 255);
|
|
12163
12192
|
g2 = bound01(g2, 255);
|
|
12164
12193
|
b = bound01(b, 255);
|
|
12165
|
-
var
|
|
12166
|
-
var h, s2, l2 = (
|
|
12167
|
-
if (
|
|
12194
|
+
var max2 = mathMax(r2, g2, b), min = mathMin(r2, g2, b);
|
|
12195
|
+
var h, s2, l2 = (max2 + min) / 2;
|
|
12196
|
+
if (max2 == min) {
|
|
12168
12197
|
h = s2 = 0;
|
|
12169
12198
|
} else {
|
|
12170
|
-
var d =
|
|
12171
|
-
s2 = l2 > 0.5 ? d / (2 -
|
|
12172
|
-
switch (
|
|
12199
|
+
var d = max2 - min;
|
|
12200
|
+
s2 = l2 > 0.5 ? d / (2 - max2 - min) : d / (max2 + min);
|
|
12201
|
+
switch (max2) {
|
|
12173
12202
|
case r2:
|
|
12174
12203
|
h = (g2 - b) / d + (g2 < b ? 6 : 0);
|
|
12175
12204
|
break;
|
|
@@ -12217,14 +12246,14 @@ var tinycolor = { exports: {} };
|
|
|
12217
12246
|
r2 = bound01(r2, 255);
|
|
12218
12247
|
g2 = bound01(g2, 255);
|
|
12219
12248
|
b = bound01(b, 255);
|
|
12220
|
-
var
|
|
12221
|
-
var h, s2, v =
|
|
12222
|
-
var d =
|
|
12223
|
-
s2 =
|
|
12224
|
-
if (
|
|
12249
|
+
var max2 = mathMax(r2, g2, b), min = mathMin(r2, g2, b);
|
|
12250
|
+
var h, s2, v = max2;
|
|
12251
|
+
var d = max2 - min;
|
|
12252
|
+
s2 = max2 === 0 ? 0 : d / max2;
|
|
12253
|
+
if (max2 == min) {
|
|
12225
12254
|
h = 0;
|
|
12226
12255
|
} else {
|
|
12227
|
-
switch (
|
|
12256
|
+
switch (max2) {
|
|
12228
12257
|
case r2:
|
|
12229
12258
|
h = (g2 - b) / d + (g2 < b ? 6 : 0);
|
|
12230
12259
|
break;
|
|
@@ -12621,19 +12650,19 @@ var tinycolor = { exports: {} };
|
|
|
12621
12650
|
}
|
|
12622
12651
|
return a2;
|
|
12623
12652
|
}
|
|
12624
|
-
function bound01(n2,
|
|
12653
|
+
function bound01(n2, max2) {
|
|
12625
12654
|
if (isOnePointZero(n2)) {
|
|
12626
12655
|
n2 = "100%";
|
|
12627
12656
|
}
|
|
12628
12657
|
var processPercent = isPercentage(n2);
|
|
12629
|
-
n2 = mathMin(
|
|
12658
|
+
n2 = mathMin(max2, mathMax(0, parseFloat(n2)));
|
|
12630
12659
|
if (processPercent) {
|
|
12631
|
-
n2 = parseInt(n2 *
|
|
12660
|
+
n2 = parseInt(n2 * max2, 10) / 100;
|
|
12632
12661
|
}
|
|
12633
|
-
if (Math2.abs(n2 -
|
|
12662
|
+
if (Math2.abs(n2 - max2) < 1e-6) {
|
|
12634
12663
|
return 1;
|
|
12635
12664
|
}
|
|
12636
|
-
return n2 %
|
|
12665
|
+
return n2 % max2 / parseFloat(max2);
|
|
12637
12666
|
}
|
|
12638
12667
|
function clamp01(val) {
|
|
12639
12668
|
return mathMin(1, mathMax(0, val));
|
|
@@ -13791,10 +13820,10 @@ var json2csv_umd = { exports: {} };
|
|
|
13791
13820
|
};
|
|
13792
13821
|
Buffer3.prototype.inspect = function inspect2() {
|
|
13793
13822
|
var str = "";
|
|
13794
|
-
var
|
|
13823
|
+
var max2 = INSPECT_MAX_BYTES;
|
|
13795
13824
|
if (this.length > 0) {
|
|
13796
|
-
str = this.toString("hex", 0,
|
|
13797
|
-
if (this.length >
|
|
13825
|
+
str = this.toString("hex", 0, max2).match(/.{2}/g).join(" ");
|
|
13826
|
+
if (this.length > max2)
|
|
13798
13827
|
str += " ... ";
|
|
13799
13828
|
}
|
|
13800
13829
|
return "<Buffer " + str + ">";
|
|
@@ -14360,10 +14389,10 @@ var json2csv_umd = { exports: {} };
|
|
|
14360
14389
|
checkOffset(offset5, 8, this.length);
|
|
14361
14390
|
return read(this, offset5, false, 52, 8);
|
|
14362
14391
|
};
|
|
14363
|
-
function checkInt(buf, value, offset5, ext,
|
|
14392
|
+
function checkInt(buf, value, offset5, ext, max2, min) {
|
|
14364
14393
|
if (!internalIsBuffer(buf))
|
|
14365
14394
|
throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
14366
|
-
if (value >
|
|
14395
|
+
if (value > max2 || value < min)
|
|
14367
14396
|
throw new RangeError('"value" argument is out of bounds');
|
|
14368
14397
|
if (offset5 + ext > buf.length)
|
|
14369
14398
|
throw new RangeError("Index out of range");
|
|
@@ -14588,7 +14617,7 @@ var json2csv_umd = { exports: {} };
|
|
|
14588
14617
|
}
|
|
14589
14618
|
return offset5 + 4;
|
|
14590
14619
|
};
|
|
14591
|
-
function checkIEEE754(buf, value, offset5, ext,
|
|
14620
|
+
function checkIEEE754(buf, value, offset5, ext, max2, min) {
|
|
14592
14621
|
if (offset5 + ext > buf.length)
|
|
14593
14622
|
throw new RangeError("Index out of range");
|
|
14594
14623
|
if (offset5 < 0)
|
|
@@ -19724,13 +19753,13 @@ var refType = PropTypes.oneOfType([PropTypes.func, PropTypes.object]);
|
|
|
19724
19753
|
const refType$1 = refType;
|
|
19725
19754
|
function clamp$3(value) {
|
|
19726
19755
|
var min = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
19727
|
-
var
|
|
19756
|
+
var max2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1;
|
|
19728
19757
|
{
|
|
19729
|
-
if (value < min || value >
|
|
19730
|
-
console.error("Material-UI: The value provided ".concat(value, " is out of range [").concat(min, ", ").concat(
|
|
19758
|
+
if (value < min || value > max2) {
|
|
19759
|
+
console.error("Material-UI: The value provided ".concat(value, " is out of range [").concat(min, ", ").concat(max2, "]."));
|
|
19731
19760
|
}
|
|
19732
19761
|
}
|
|
19733
|
-
return Math.min(Math.max(min, value),
|
|
19762
|
+
return Math.min(Math.max(min, value), max2);
|
|
19734
19763
|
}
|
|
19735
19764
|
function hexToRgb(color2) {
|
|
19736
19765
|
color2 = color2.substr(1);
|
|
@@ -27398,8 +27427,8 @@ const ValueLabel$1 = withStyles2(styles$4, {
|
|
|
27398
27427
|
function asc(a2, b) {
|
|
27399
27428
|
return a2 - b;
|
|
27400
27429
|
}
|
|
27401
|
-
function clamp$2(value, min,
|
|
27402
|
-
return Math.min(Math.max(min, value),
|
|
27430
|
+
function clamp$2(value, min, max2) {
|
|
27431
|
+
return Math.min(Math.max(min, value), max2);
|
|
27403
27432
|
}
|
|
27404
27433
|
function findClosest(values2, currentValue) {
|
|
27405
27434
|
var _values$reduce = values2.reduce(function(acc, value, index2) {
|
|
@@ -27432,11 +27461,11 @@ function trackFinger(event, touchId) {
|
|
|
27432
27461
|
y: event.clientY
|
|
27433
27462
|
};
|
|
27434
27463
|
}
|
|
27435
|
-
function valueToPercent(value, min,
|
|
27436
|
-
return (value - min) * 100 / (
|
|
27464
|
+
function valueToPercent(value, min, max2) {
|
|
27465
|
+
return (value - min) * 100 / (max2 - min);
|
|
27437
27466
|
}
|
|
27438
|
-
function percentToValue(percent2, min,
|
|
27439
|
-
return (
|
|
27467
|
+
function percentToValue(percent2, min, max2) {
|
|
27468
|
+
return (max2 - min) * percent2 + min;
|
|
27440
27469
|
}
|
|
27441
27470
|
function getDecimalPrecision(num) {
|
|
27442
27471
|
if (Math.abs(num) < 1) {
|
|
@@ -27724,7 +27753,7 @@ var styles$3 = function styles7(theme) {
|
|
|
27724
27753
|
};
|
|
27725
27754
|
};
|
|
27726
27755
|
var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
27727
|
-
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,
|
|
27756
|
+
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"]);
|
|
27728
27757
|
var theme = useTheme();
|
|
27729
27758
|
var touchId = React.useRef();
|
|
27730
27759
|
var _React$useState = React.useState(-1), active = _React$useState[0], setActive = _React$useState[1];
|
|
@@ -27737,9 +27766,9 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
27737
27766
|
var range2 = Array.isArray(valueDerived);
|
|
27738
27767
|
var values2 = range2 ? valueDerived.slice().sort(asc) : [valueDerived];
|
|
27739
27768
|
values2 = values2.map(function(value) {
|
|
27740
|
-
return clamp$2(value, min,
|
|
27769
|
+
return clamp$2(value, min, max2);
|
|
27741
27770
|
});
|
|
27742
|
-
var marks = marksProp === true && step !== null ? _toConsumableArray$j(Array(Math.floor((
|
|
27771
|
+
var marks = marksProp === true && step !== null ? _toConsumableArray$j(Array(Math.floor((max2 - min) / step) + 1)).map(function(_, index2) {
|
|
27743
27772
|
return {
|
|
27744
27773
|
value: min + step * index2
|
|
27745
27774
|
};
|
|
@@ -27774,7 +27803,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
27774
27803
|
var handleKeyDown2 = useEventCallback(function(event) {
|
|
27775
27804
|
var index2 = Number(event.currentTarget.getAttribute("data-index"));
|
|
27776
27805
|
var value = values2[index2];
|
|
27777
|
-
var tenPercents = (
|
|
27806
|
+
var tenPercents = (max2 - min) / 10;
|
|
27778
27807
|
var marksValues = marks.map(function(mark) {
|
|
27779
27808
|
return mark.value;
|
|
27780
27809
|
});
|
|
@@ -27787,7 +27816,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
27787
27816
|
newValue = min;
|
|
27788
27817
|
break;
|
|
27789
27818
|
case "End":
|
|
27790
|
-
newValue =
|
|
27819
|
+
newValue = max2;
|
|
27791
27820
|
break;
|
|
27792
27821
|
case "PageUp":
|
|
27793
27822
|
if (step) {
|
|
@@ -27822,7 +27851,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
27822
27851
|
if (step) {
|
|
27823
27852
|
newValue = roundValueToStep(newValue, step, min);
|
|
27824
27853
|
}
|
|
27825
|
-
newValue = clamp$2(newValue, min,
|
|
27854
|
+
newValue = clamp$2(newValue, min, max2);
|
|
27826
27855
|
if (range2) {
|
|
27827
27856
|
var previousValue = newValue;
|
|
27828
27857
|
newValue = setValueIndex({
|
|
@@ -27864,7 +27893,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
27864
27893
|
percent2 = 1 - percent2;
|
|
27865
27894
|
}
|
|
27866
27895
|
var newValue;
|
|
27867
|
-
newValue = percentToValue(percent2, min,
|
|
27896
|
+
newValue = percentToValue(percent2, min, max2);
|
|
27868
27897
|
if (step) {
|
|
27869
27898
|
newValue = roundValueToStep(newValue, step, min);
|
|
27870
27899
|
} else {
|
|
@@ -27874,7 +27903,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
27874
27903
|
var closestIndex = findClosest(marksValues, newValue);
|
|
27875
27904
|
newValue = marksValues[closestIndex];
|
|
27876
27905
|
}
|
|
27877
|
-
newValue = clamp$2(newValue, min,
|
|
27906
|
+
newValue = clamp$2(newValue, min, max2);
|
|
27878
27907
|
var activeIndex = 0;
|
|
27879
27908
|
if (range2) {
|
|
27880
27909
|
if (!move) {
|
|
@@ -28003,8 +28032,8 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
28003
28032
|
doc.addEventListener("mousemove", handleTouchMove);
|
|
28004
28033
|
doc.addEventListener("mouseup", handleTouchEnd);
|
|
28005
28034
|
});
|
|
28006
|
-
var trackOffset = valueToPercent(range2 ? values2[0] : min, min,
|
|
28007
|
-
var trackLeap = valueToPercent(values2[values2.length - 1], min,
|
|
28035
|
+
var trackOffset = valueToPercent(range2 ? values2[0] : min, min, max2);
|
|
28036
|
+
var trackLeap = valueToPercent(values2[values2.length - 1], min, max2) - trackOffset;
|
|
28008
28037
|
var trackStyle = _extends$1({}, axisProps[axis2].offset(trackOffset), axisProps[axis2].leap(trackLeap));
|
|
28009
28038
|
return /* @__PURE__ */ React.createElement(Component2, _extends$1({
|
|
28010
28039
|
ref: handleRef,
|
|
@@ -28022,7 +28051,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
28022
28051
|
name: name2,
|
|
28023
28052
|
type: "hidden"
|
|
28024
28053
|
}), marks.map(function(mark, index2) {
|
|
28025
|
-
var percent2 = valueToPercent(mark.value, min,
|
|
28054
|
+
var percent2 = valueToPercent(mark.value, min, max2);
|
|
28026
28055
|
var style2 = axisProps[axis2].offset(percent2);
|
|
28027
28056
|
var markActive;
|
|
28028
28057
|
if (track === false) {
|
|
@@ -28043,7 +28072,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
28043
28072
|
className: clsx(classes.markLabel, markActive && classes.markLabelActive)
|
|
28044
28073
|
}, mark.label) : null);
|
|
28045
28074
|
}), values2.map(function(value, index2) {
|
|
28046
|
-
var percent2 = valueToPercent(value, min,
|
|
28075
|
+
var percent2 = valueToPercent(value, min, max2);
|
|
28047
28076
|
var style2 = axisProps[axis2].offset(percent2);
|
|
28048
28077
|
return /* @__PURE__ */ React.createElement(ValueLabelComponent, {
|
|
28049
28078
|
key: index2,
|
|
@@ -28063,7 +28092,7 @@ var Slider = /* @__PURE__ */ React.forwardRef(function Slider2(props2, ref) {
|
|
|
28063
28092
|
"aria-label": getAriaLabel ? getAriaLabel(index2) : ariaLabel,
|
|
28064
28093
|
"aria-labelledby": ariaLabelledby,
|
|
28065
28094
|
"aria-orientation": orientation,
|
|
28066
|
-
"aria-valuemax": scale2(
|
|
28095
|
+
"aria-valuemax": scale2(max2),
|
|
28067
28096
|
"aria-valuemin": scale2(min),
|
|
28068
28097
|
"aria-valuenow": scale2(value),
|
|
28069
28098
|
"aria-valuetext": getAriaValueText ? getAriaValueText(scale2(value), index2) : ariaValuetext,
|
|
@@ -29297,18 +29326,18 @@ bisector$1(number$2).center;
|
|
|
29297
29326
|
const bisect = bisectRight;
|
|
29298
29327
|
function extent$1(values2, valueof) {
|
|
29299
29328
|
let min;
|
|
29300
|
-
let
|
|
29329
|
+
let max2;
|
|
29301
29330
|
if (valueof === void 0) {
|
|
29302
29331
|
for (const value of values2) {
|
|
29303
29332
|
if (value != null) {
|
|
29304
29333
|
if (min === void 0) {
|
|
29305
29334
|
if (value >= value)
|
|
29306
|
-
min =
|
|
29335
|
+
min = max2 = value;
|
|
29307
29336
|
} else {
|
|
29308
29337
|
if (min > value)
|
|
29309
29338
|
min = value;
|
|
29310
|
-
if (
|
|
29311
|
-
|
|
29339
|
+
if (max2 < value)
|
|
29340
|
+
max2 = value;
|
|
29312
29341
|
}
|
|
29313
29342
|
}
|
|
29314
29343
|
}
|
|
@@ -29318,17 +29347,17 @@ function extent$1(values2, valueof) {
|
|
|
29318
29347
|
if ((value = valueof(value, ++index2, values2)) != null) {
|
|
29319
29348
|
if (min === void 0) {
|
|
29320
29349
|
if (value >= value)
|
|
29321
|
-
min =
|
|
29350
|
+
min = max2 = value;
|
|
29322
29351
|
} else {
|
|
29323
29352
|
if (min > value)
|
|
29324
29353
|
min = value;
|
|
29325
|
-
if (
|
|
29326
|
-
|
|
29354
|
+
if (max2 < value)
|
|
29355
|
+
max2 = value;
|
|
29327
29356
|
}
|
|
29328
29357
|
}
|
|
29329
29358
|
}
|
|
29330
29359
|
}
|
|
29331
|
-
return [min,
|
|
29360
|
+
return [min, max2];
|
|
29332
29361
|
}
|
|
29333
29362
|
var e10 = Math.sqrt(50), e5 = Math.sqrt(10), e2 = Math.sqrt(2);
|
|
29334
29363
|
function ticks(start, stop, count2) {
|
|
@@ -29378,6 +29407,24 @@ function tickStep(start, stop, count2) {
|
|
|
29378
29407
|
step1 *= 2;
|
|
29379
29408
|
return stop < start ? -step1 : step1;
|
|
29380
29409
|
}
|
|
29410
|
+
function max(values2, valueof) {
|
|
29411
|
+
let max2;
|
|
29412
|
+
if (valueof === void 0) {
|
|
29413
|
+
for (const value of values2) {
|
|
29414
|
+
if (value != null && (max2 < value || max2 === void 0 && value >= value)) {
|
|
29415
|
+
max2 = value;
|
|
29416
|
+
}
|
|
29417
|
+
}
|
|
29418
|
+
} else {
|
|
29419
|
+
let index2 = -1;
|
|
29420
|
+
for (let value of values2) {
|
|
29421
|
+
if ((value = valueof(value, ++index2, values2)) != null && (max2 < value || max2 === void 0 && value >= value)) {
|
|
29422
|
+
max2 = value;
|
|
29423
|
+
}
|
|
29424
|
+
}
|
|
29425
|
+
}
|
|
29426
|
+
return max2;
|
|
29427
|
+
}
|
|
29381
29428
|
function initRange(domain, range2) {
|
|
29382
29429
|
switch (arguments.length) {
|
|
29383
29430
|
case 0:
|
|
@@ -29683,15 +29730,15 @@ function hslConvert(o2) {
|
|
|
29683
29730
|
if (o2 instanceof Hsl)
|
|
29684
29731
|
return o2;
|
|
29685
29732
|
o2 = o2.rgb();
|
|
29686
|
-
var r2 = o2.r / 255, g2 = o2.g / 255, b = o2.b / 255, min = Math.min(r2, g2, b),
|
|
29733
|
+
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;
|
|
29687
29734
|
if (s2) {
|
|
29688
|
-
if (r2 ===
|
|
29735
|
+
if (r2 === max2)
|
|
29689
29736
|
h = (g2 - b) / s2 + (g2 < b) * 6;
|
|
29690
|
-
else if (g2 ===
|
|
29737
|
+
else if (g2 === max2)
|
|
29691
29738
|
h = (b - r2) / s2 + 2;
|
|
29692
29739
|
else
|
|
29693
29740
|
h = (r2 - g2) / s2 + 4;
|
|
29694
|
-
s2 /= l2 < 0.5 ?
|
|
29741
|
+
s2 /= l2 < 0.5 ? max2 + min : 2 - max2 - min;
|
|
29695
29742
|
h *= 60;
|
|
29696
29743
|
} else {
|
|
29697
29744
|
s2 = l2 > 0 && l2 < 1 ? 0 : h;
|
|
@@ -30239,9 +30286,9 @@ function precisionFixed(step) {
|
|
|
30239
30286
|
function precisionPrefix(step, value) {
|
|
30240
30287
|
return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));
|
|
30241
30288
|
}
|
|
30242
|
-
function precisionRound(step,
|
|
30243
|
-
step = Math.abs(step),
|
|
30244
|
-
return Math.max(0, exponent(
|
|
30289
|
+
function precisionRound(step, max2) {
|
|
30290
|
+
step = Math.abs(step), max2 = Math.abs(max2) - step;
|
|
30291
|
+
return Math.max(0, exponent(max2) - exponent(step)) + 1;
|
|
30245
30292
|
}
|
|
30246
30293
|
function tickFormat(start, stop, count2, specifier) {
|
|
30247
30294
|
var step = tickStep(start, stop, count2), precision;
|
|
@@ -41395,8 +41442,8 @@ function acos$1(radians2, result) {
|
|
|
41395
41442
|
function atan$1(radians2, result) {
|
|
41396
41443
|
return map(radians2, (angle2) => Math.atan(angle2), result);
|
|
41397
41444
|
}
|
|
41398
|
-
function clamp$1(value, min,
|
|
41399
|
-
return map(value, (value2) => Math.max(min, Math.min(
|
|
41445
|
+
function clamp$1(value, min, max2) {
|
|
41446
|
+
return map(value, (value2) => Math.max(min, Math.min(max2, value2)));
|
|
41400
41447
|
}
|
|
41401
41448
|
function lerp$5(a2, b, t2) {
|
|
41402
41449
|
if (isArray$1(a2)) {
|
|
@@ -41683,9 +41730,9 @@ class MathArray extends _extendableBuiltin(Array) {
|
|
|
41683
41730
|
divideScalar(a2) {
|
|
41684
41731
|
return this.multiplyByScalar(1 / a2);
|
|
41685
41732
|
}
|
|
41686
|
-
clampScalar(min,
|
|
41733
|
+
clampScalar(min, max2) {
|
|
41687
41734
|
for (let i2 = 0; i2 < this.ELEMENTS; ++i2) {
|
|
41688
|
-
this[i2] = Math.min(Math.max(this[i2], min),
|
|
41735
|
+
this[i2] = Math.min(Math.max(this[i2], min), max2);
|
|
41689
41736
|
}
|
|
41690
41737
|
return this.check();
|
|
41691
41738
|
}
|
|
@@ -47818,8 +47865,8 @@ function mod$1(value, divisor) {
|
|
|
47818
47865
|
function lerp(start, end, step) {
|
|
47819
47866
|
return step * end + (1 - step) * start;
|
|
47820
47867
|
}
|
|
47821
|
-
function clamp(x2, min,
|
|
47822
|
-
return x2 < min ? min : x2 >
|
|
47868
|
+
function clamp(x2, min, max2) {
|
|
47869
|
+
return x2 < min ? min : x2 > max2 ? max2 : x2;
|
|
47823
47870
|
}
|
|
47824
47871
|
function ieLog2(x2) {
|
|
47825
47872
|
return Math.log(x2) * Math.LOG2E;
|
|
@@ -57540,17 +57587,17 @@ class DataColumn {
|
|
|
57540
57587
|
const len2 = numInstances * size;
|
|
57541
57588
|
if (value && len2 && value.length >= len2) {
|
|
57542
57589
|
const min = new Array(size).fill(Infinity);
|
|
57543
|
-
const
|
|
57590
|
+
const max2 = new Array(size).fill(-Infinity);
|
|
57544
57591
|
for (let i2 = 0; i2 < len2; ) {
|
|
57545
57592
|
for (let j = 0; j < size; j++) {
|
|
57546
57593
|
const v = value[i2++];
|
|
57547
57594
|
if (v < min[j])
|
|
57548
57595
|
min[j] = v;
|
|
57549
|
-
if (v >
|
|
57550
|
-
|
|
57596
|
+
if (v > max2[j])
|
|
57597
|
+
max2[j] = v;
|
|
57551
57598
|
}
|
|
57552
57599
|
}
|
|
57553
|
-
result = [min,
|
|
57600
|
+
result = [min, max2];
|
|
57554
57601
|
}
|
|
57555
57602
|
}
|
|
57556
57603
|
this.state.bounds = result;
|
|
@@ -83631,10 +83678,10 @@ class GroupNode extends ScenegraphNode {
|
|
|
83631
83678
|
if (!bounds2) {
|
|
83632
83679
|
return;
|
|
83633
83680
|
}
|
|
83634
|
-
const [min,
|
|
83635
|
-
const center2 = new Vector3(min).add(
|
|
83681
|
+
const [min, max2] = bounds2;
|
|
83682
|
+
const center2 = new Vector3(min).add(max2).divide([2, 2, 2]);
|
|
83636
83683
|
worldMatrix.transformAsPoint(center2, center2);
|
|
83637
|
-
const halfSize = new Vector3(
|
|
83684
|
+
const halfSize = new Vector3(max2).subtract(min).divide([2, 2, 2]);
|
|
83638
83685
|
worldMatrix.transformAsVector(halfSize, halfSize);
|
|
83639
83686
|
for (let v = 0; v < 8; v++) {
|
|
83640
83687
|
const position = new Vector3(v & 1 ? -1 : 1, v & 2 ? -1 : 1, v & 4 ? -1 : 1).multiply(halfSize).add(center2);
|
|
@@ -92583,7 +92630,7 @@ class Tile {
|
|
|
92583
92630
|
const { errors } = this;
|
|
92584
92631
|
let numVertices = 0;
|
|
92585
92632
|
let numTriangles = 0;
|
|
92586
|
-
const
|
|
92633
|
+
const max2 = size - 1;
|
|
92587
92634
|
indices.fill(0);
|
|
92588
92635
|
function countElements(ax, ay, bx, by, cx, cy) {
|
|
92589
92636
|
const mx = ax + bx >> 1;
|
|
@@ -92598,8 +92645,8 @@ class Tile {
|
|
|
92598
92645
|
numTriangles++;
|
|
92599
92646
|
}
|
|
92600
92647
|
}
|
|
92601
|
-
countElements(0, 0,
|
|
92602
|
-
countElements(
|
|
92648
|
+
countElements(0, 0, max2, max2, max2, 0);
|
|
92649
|
+
countElements(max2, max2, 0, 0, 0, max2);
|
|
92603
92650
|
const vertices = new Uint16Array(numVertices * 2);
|
|
92604
92651
|
const triangles = new Uint32Array(numTriangles * 3);
|
|
92605
92652
|
let triIndex = 0;
|
|
@@ -92624,8 +92671,8 @@ class Tile {
|
|
|
92624
92671
|
triangles[triIndex++] = c;
|
|
92625
92672
|
}
|
|
92626
92673
|
}
|
|
92627
|
-
processTriangle(0, 0,
|
|
92628
|
-
processTriangle(
|
|
92674
|
+
processTriangle(0, 0, max2, max2, max2, 0);
|
|
92675
|
+
processTriangle(max2, max2, 0, 0, 0, max2);
|
|
92629
92676
|
return { vertices, triangles };
|
|
92630
92677
|
}
|
|
92631
92678
|
}
|
|
@@ -132610,16 +132657,16 @@ function addDecoder(cases, importFn) {
|
|
|
132610
132657
|
}
|
|
132611
132658
|
cases.forEach((c) => registry$1.set(c, importFn));
|
|
132612
132659
|
}
|
|
132613
|
-
addDecoder([void 0, 1], () => import("./raw-
|
|
132614
|
-
addDecoder(5, () => import("./lzw-
|
|
132660
|
+
addDecoder([void 0, 1], () => import("./raw-0da61dee.js").then((m) => m.default));
|
|
132661
|
+
addDecoder(5, () => import("./lzw-85a51820.js").then((m) => m.default));
|
|
132615
132662
|
addDecoder(6, () => {
|
|
132616
132663
|
throw new Error("old style JPEG compression is not supported.");
|
|
132617
132664
|
});
|
|
132618
|
-
addDecoder(7, () => import("./jpeg-
|
|
132619
|
-
addDecoder([8, 32946], () => import("./deflate-
|
|
132620
|
-
addDecoder(32773, () => import("./packbits-
|
|
132621
|
-
addDecoder(34887, () => import("./lerc-
|
|
132622
|
-
addDecoder(50001, () => import("./webimage-
|
|
132665
|
+
addDecoder(7, () => import("./jpeg-de3f5fd6.js").then((m) => m.default));
|
|
132666
|
+
addDecoder([8, 32946], () => import("./deflate-ca3a4331.js").then((m) => m.default));
|
|
132667
|
+
addDecoder(32773, () => import("./packbits-e923ce89.js").then((m) => m.default));
|
|
132668
|
+
addDecoder(34887, () => import("./lerc-1f658a8e.js").then((m) => m.default));
|
|
132669
|
+
addDecoder(50001, () => import("./webimage-dc2efc6c.js").then((m) => m.default));
|
|
132623
132670
|
function decodeRowAcc(row, stride) {
|
|
132624
132671
|
let length2 = row.length - stride;
|
|
132625
132672
|
let offset5 = 0;
|
|
@@ -136168,9 +136215,9 @@ const buf2binstring = (buf, len2) => {
|
|
|
136168
136215
|
}
|
|
136169
136216
|
return result;
|
|
136170
136217
|
};
|
|
136171
|
-
var buf2string = (buf,
|
|
136218
|
+
var buf2string = (buf, max2) => {
|
|
136172
136219
|
let i2, out;
|
|
136173
|
-
const len2 =
|
|
136220
|
+
const len2 = max2 || buf.length;
|
|
136174
136221
|
const utf16buf = new Array(len2 * 2);
|
|
136175
136222
|
for (out = 0, i2 = 0; i2 < len2; ) {
|
|
136176
136223
|
let c = buf[i2++];
|
|
@@ -136203,22 +136250,22 @@ var buf2string = (buf, max) => {
|
|
|
136203
136250
|
}
|
|
136204
136251
|
return buf2binstring(utf16buf, out);
|
|
136205
136252
|
};
|
|
136206
|
-
var utf8border = (buf,
|
|
136207
|
-
|
|
136208
|
-
if (
|
|
136209
|
-
|
|
136253
|
+
var utf8border = (buf, max2) => {
|
|
136254
|
+
max2 = max2 || buf.length;
|
|
136255
|
+
if (max2 > buf.length) {
|
|
136256
|
+
max2 = buf.length;
|
|
136210
136257
|
}
|
|
136211
|
-
let pos =
|
|
136258
|
+
let pos = max2 - 1;
|
|
136212
136259
|
while (pos >= 0 && (buf[pos] & 192) === 128) {
|
|
136213
136260
|
pos--;
|
|
136214
136261
|
}
|
|
136215
136262
|
if (pos < 0) {
|
|
136216
|
-
return
|
|
136263
|
+
return max2;
|
|
136217
136264
|
}
|
|
136218
136265
|
if (pos === 0) {
|
|
136219
|
-
return
|
|
136266
|
+
return max2;
|
|
136220
136267
|
}
|
|
136221
|
-
return pos + _utf8len[buf[pos]] >
|
|
136268
|
+
return pos + _utf8len[buf[pos]] > max2 ? pos : max2;
|
|
136222
136269
|
};
|
|
136223
136270
|
var strings = {
|
|
136224
136271
|
string2buf,
|
|
@@ -136768,7 +136815,7 @@ const inflate_table = (type, lens2, lens_index, codes, table, table_index, work,
|
|
|
136768
136815
|
const bits = opts2.bits;
|
|
136769
136816
|
let len2 = 0;
|
|
136770
136817
|
let sym = 0;
|
|
136771
|
-
let min = 0,
|
|
136818
|
+
let min = 0, max2 = 0;
|
|
136772
136819
|
let root2 = 0;
|
|
136773
136820
|
let curr = 0;
|
|
136774
136821
|
let drop = 0;
|
|
@@ -136795,21 +136842,21 @@ const inflate_table = (type, lens2, lens_index, codes, table, table_index, work,
|
|
|
136795
136842
|
count2[lens2[lens_index + sym]]++;
|
|
136796
136843
|
}
|
|
136797
136844
|
root2 = bits;
|
|
136798
|
-
for (
|
|
136799
|
-
if (count2[
|
|
136845
|
+
for (max2 = MAXBITS; max2 >= 1; max2--) {
|
|
136846
|
+
if (count2[max2] !== 0) {
|
|
136800
136847
|
break;
|
|
136801
136848
|
}
|
|
136802
136849
|
}
|
|
136803
|
-
if (root2 >
|
|
136804
|
-
root2 =
|
|
136850
|
+
if (root2 > max2) {
|
|
136851
|
+
root2 = max2;
|
|
136805
136852
|
}
|
|
136806
|
-
if (
|
|
136853
|
+
if (max2 === 0) {
|
|
136807
136854
|
table[table_index++] = 1 << 24 | 64 << 16 | 0;
|
|
136808
136855
|
table[table_index++] = 1 << 24 | 64 << 16 | 0;
|
|
136809
136856
|
opts2.bits = 1;
|
|
136810
136857
|
return 0;
|
|
136811
136858
|
}
|
|
136812
|
-
for (min = 1; min <
|
|
136859
|
+
for (min = 1; min < max2; min++) {
|
|
136813
136860
|
if (count2[min] !== 0) {
|
|
136814
136861
|
break;
|
|
136815
136862
|
}
|
|
@@ -136825,7 +136872,7 @@ const inflate_table = (type, lens2, lens_index, codes, table, table_index, work,
|
|
|
136825
136872
|
return -1;
|
|
136826
136873
|
}
|
|
136827
136874
|
}
|
|
136828
|
-
if (left2 > 0 && (type === CODES ||
|
|
136875
|
+
if (left2 > 0 && (type === CODES || max2 !== 1)) {
|
|
136829
136876
|
return -1;
|
|
136830
136877
|
}
|
|
136831
136878
|
offs[1] = 0;
|
|
@@ -136894,7 +136941,7 @@ const inflate_table = (type, lens2, lens_index, codes, table, table_index, work,
|
|
|
136894
136941
|
}
|
|
136895
136942
|
sym++;
|
|
136896
136943
|
if (--count2[len2] === 0) {
|
|
136897
|
-
if (len2 ===
|
|
136944
|
+
if (len2 === max2) {
|
|
136898
136945
|
break;
|
|
136899
136946
|
}
|
|
136900
136947
|
len2 = lens2[lens_index + work[sym]];
|
|
@@ -136906,7 +136953,7 @@ const inflate_table = (type, lens2, lens_index, codes, table, table_index, work,
|
|
|
136906
136953
|
next += min;
|
|
136907
136954
|
curr = len2 - drop;
|
|
136908
136955
|
left2 = 1 << curr;
|
|
136909
|
-
while (curr + drop <
|
|
136956
|
+
while (curr + drop < max2) {
|
|
136910
136957
|
left2 -= count2[curr + drop];
|
|
136911
136958
|
if (left2 <= 0) {
|
|
136912
136959
|
break;
|
|
@@ -143640,21 +143687,21 @@ void main() {
|
|
|
143640
143687
|
}
|
|
143641
143688
|
`;
|
|
143642
143689
|
function normalize(arr) {
|
|
143643
|
-
const [min,
|
|
143644
|
-
const ratio = 255 / (
|
|
143690
|
+
const [min, max2] = extent$1(arr);
|
|
143691
|
+
const ratio = 255 / (max2 - min);
|
|
143645
143692
|
const data = new Uint8Array(arr.map((i2) => Math.floor((i2 - min) * ratio)));
|
|
143646
143693
|
return data;
|
|
143647
143694
|
}
|
|
143648
|
-
function multiSetsToTextureData(multiFeatureValues, setColorValues, channelIsSetColorMode, texSize) {
|
|
143695
|
+
function multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColorValues, channelIsSetColorMode, texSize) {
|
|
143649
143696
|
let totalValuesLength = 0;
|
|
143650
143697
|
let totalColorsLength = 0;
|
|
143651
143698
|
channelIsSetColorMode.forEach((isSetColorMode, channelIndex) => {
|
|
143652
|
-
var _a2, _b, _c, _d
|
|
143699
|
+
var _a2, _b, _c, _d;
|
|
143653
143700
|
if (isSetColorMode) {
|
|
143654
|
-
|
|
143655
|
-
|
|
143701
|
+
totalColorsLength += (((_b = (_a2 = setColorValues[channelIndex]) == null ? void 0 : _a2.setColors) == null ? void 0 : _b.length) || 0) * 3;
|
|
143702
|
+
totalValuesLength += ((_c = setColorValues[channelIndex]) == null ? void 0 : _c.obsIndex) ? max(setColorValues[channelIndex].obsIndex.map((d) => parseInt(d))) : 0;
|
|
143656
143703
|
} else {
|
|
143657
|
-
totalValuesLength += ((
|
|
143704
|
+
totalValuesLength += multiMatrixObsIndex[channelIndex] ? max(multiMatrixObsIndex[channelIndex].map((d) => parseInt(d))) : ((_d = multiFeatureValues[channelIndex]) == null ? void 0 : _d.length) || 0;
|
|
143658
143705
|
}
|
|
143659
143706
|
});
|
|
143660
143707
|
const valueTexHeight = Math.max(2, Math.ceil(totalValuesLength / texSize));
|
|
@@ -143672,12 +143719,20 @@ function multiSetsToTextureData(multiFeatureValues, setColorValues, channelIsSet
|
|
|
143672
143719
|
let indexOffset = 0;
|
|
143673
143720
|
let colorOffset = 0;
|
|
143674
143721
|
channelIsSetColorMode.forEach((isSetColorMode, channelIndex) => {
|
|
143722
|
+
const matrixObsIndex = multiMatrixObsIndex[channelIndex];
|
|
143723
|
+
const bitmaskValueIsIndex = matrixObsIndex === null;
|
|
143675
143724
|
if (isSetColorMode) {
|
|
143676
143725
|
const { setColorIndices, setColors, obsIndex } = setColorValues[channelIndex] || {};
|
|
143677
143726
|
if (setColorIndices && setColors && obsIndex) {
|
|
143678
143727
|
for (let i2 = 0; i2 < obsIndex.length; i2++) {
|
|
143679
|
-
|
|
143680
|
-
|
|
143728
|
+
let obsId = String(i2 + 1);
|
|
143729
|
+
let obsI = i2;
|
|
143730
|
+
if (!bitmaskValueIsIndex) {
|
|
143731
|
+
obsId = obsIndex[i2];
|
|
143732
|
+
obsI = parseInt(obsId) - 1;
|
|
143733
|
+
}
|
|
143734
|
+
const colorIndex = setColorIndices.get(obsId);
|
|
143735
|
+
totalData[indexOffset + obsI] = colorIndex === void 0 ? 0 : colorIndex + 1;
|
|
143681
143736
|
}
|
|
143682
143737
|
for (let i2 = 0; i2 < setColors.length; i2++) {
|
|
143683
143738
|
const { color: [r2, g2, b] } = setColors[i2];
|
|
@@ -143692,7 +143747,16 @@ function multiSetsToTextureData(multiFeatureValues, setColorValues, channelIsSet
|
|
|
143692
143747
|
colorOffset += (setColors == null ? void 0 : setColors.length) || 0;
|
|
143693
143748
|
} else {
|
|
143694
143749
|
const featureArr = multiFeatureValues[channelIndex];
|
|
143695
|
-
|
|
143750
|
+
const normalizedFeatureArr = normalize(featureArr);
|
|
143751
|
+
if (!bitmaskValueIsIndex && matrixObsIndex) {
|
|
143752
|
+
for (let i2 = 0; i2 < matrixObsIndex.length; i2++) {
|
|
143753
|
+
const obsId = matrixObsIndex[i2];
|
|
143754
|
+
const obsI = parseInt(obsId) - 1;
|
|
143755
|
+
totalData[indexOffset + obsI] = normalizedFeatureArr[i2];
|
|
143756
|
+
}
|
|
143757
|
+
} else {
|
|
143758
|
+
totalData.set(normalizedFeatureArr, indexOffset);
|
|
143759
|
+
}
|
|
143696
143760
|
indicesOffsets.push(indexOffset);
|
|
143697
143761
|
indexOffset += featureArr.length;
|
|
143698
143762
|
colorsOffsets.push(colorOffset);
|
|
@@ -143719,6 +143783,17 @@ function padWithDefault(arr, defaultValue2, padWidth) {
|
|
|
143719
143783
|
function getColor(arr) {
|
|
143720
143784
|
return arr ? arr.map((v) => v / 255) : [0, 0, 0];
|
|
143721
143785
|
}
|
|
143786
|
+
function isEqualShallow(prevArr, nextArr) {
|
|
143787
|
+
if (prevArr === nextArr) {
|
|
143788
|
+
return true;
|
|
143789
|
+
}
|
|
143790
|
+
if (Array.isArray(prevArr) && Array.isArray(nextArr)) {
|
|
143791
|
+
if (prevArr.length === nextArr.length) {
|
|
143792
|
+
return !prevArr.some((v, i2) => v !== nextArr[i2] && (!Array.isArray(v) && !Array.isArray(nextArr[i2]) || (v.length > 0 || nextArr[i2].length > 0)));
|
|
143793
|
+
}
|
|
143794
|
+
}
|
|
143795
|
+
return prevArr === nextArr;
|
|
143796
|
+
}
|
|
143722
143797
|
const defaultProps = {
|
|
143723
143798
|
channelStrokeWidths: { type: "array", value: null, compare: true },
|
|
143724
143799
|
channelsFilled: { type: "array", value: null, compare: true },
|
|
@@ -143728,6 +143803,7 @@ const defaultProps = {
|
|
|
143728
143803
|
colormap: { type: "string", value: GLSL_COLORMAP_DEFAULT, compare: true },
|
|
143729
143804
|
expressionData: { type: "object", value: null, compare: true },
|
|
143730
143805
|
multiFeatureValues: { type: "array", value: null, compare: true },
|
|
143806
|
+
multiMatrixObsIndex: { type: "array", value: null, compare: true },
|
|
143731
143807
|
setColorValues: { type: "array", value: null, compare: true },
|
|
143732
143808
|
channelFeatureValueColormaps: { type: "array", value: null, compare: true },
|
|
143733
143809
|
channelFeatureValueColormapRanges: { type: "array", value: null, compare: true },
|
|
@@ -143774,9 +143850,9 @@ class BitmaskLayer2 extends XRLayer {
|
|
|
143774
143850
|
}
|
|
143775
143851
|
updateState({ props: props2, oldProps, changeFlags }) {
|
|
143776
143852
|
super.updateState({ props: props2, oldProps, changeFlags });
|
|
143777
|
-
if (props2.multiFeatureValues
|
|
143778
|
-
const { multiFeatureValues, setColorValues, channelIsSetColorMode } = this.props;
|
|
143779
|
-
const [valueTex, colorTex, valueTexOffsets, colorTexOffsets, valueTexHeight, colorTexHeight] = this.multiSetsToTexture(multiFeatureValues, setColorValues, channelIsSetColorMode);
|
|
143853
|
+
if (!isEqualShallow(props2.multiFeatureValues, oldProps.multiFeatureValues) || !isEqualShallow(props2.multiMatrixObsIndex, oldProps.multiMatrixObsIndex) || !isEqualShallow(props2.setColorValues, oldProps.setColorValues) || !isEqualShallow(props2.channelIsSetColorMode, oldProps.channelIsSetColorMode)) {
|
|
143854
|
+
const { multiFeatureValues, multiMatrixObsIndex, setColorValues, channelIsSetColorMode } = this.props;
|
|
143855
|
+
const [valueTex, colorTex, valueTexOffsets, colorTexOffsets, valueTexHeight, colorTexHeight] = this.multiSetsToTexture(multiFeatureValues, multiMatrixObsIndex, setColorValues, channelIsSetColorMode);
|
|
143780
143856
|
this.setState({
|
|
143781
143857
|
valueTex,
|
|
143782
143858
|
colorTex,
|
|
@@ -143928,9 +144004,9 @@ class BitmaskLayer2 extends XRLayer {
|
|
|
143928
144004
|
type: GL$1.FLOAT
|
|
143929
144005
|
});
|
|
143930
144006
|
}
|
|
143931
|
-
multiSetsToTexture(multiFeatureValues, setColorValues, channelIsSetColorMode) {
|
|
144007
|
+
multiSetsToTexture(multiFeatureValues, multiMatrixObsIndex, setColorValues, channelIsSetColorMode) {
|
|
143932
144008
|
const isWebGL2On = isWebGL2$1(this.context.gl);
|
|
143933
|
-
const [totalData, valueTexHeight, indicesOffsets, totalColors, colorTexHeight, colorsOffsets] = multiSetsToTextureData(multiFeatureValues, setColorValues, channelIsSetColorMode, MULTI_FEATURE_TEX_SIZE);
|
|
144009
|
+
const [totalData, valueTexHeight, indicesOffsets, totalColors, colorTexHeight, colorsOffsets] = multiSetsToTextureData(multiFeatureValues, multiMatrixObsIndex, setColorValues, channelIsSetColorMode, MULTI_FEATURE_TEX_SIZE);
|
|
143934
144010
|
return [
|
|
143935
144011
|
// Color indices texture
|
|
143936
144012
|
new Texture2D(this.context.gl, {
|
package/dist/index.js
CHANGED
|
@@ -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-
|
|
2
|
+
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-98499b51.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@vitessce/vit-s";
|
|
5
5
|
import "react-dom";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/heatmap",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.3",
|
|
4
4
|
"author": "Gehlenborg Lab",
|
|
5
5
|
"homepage": "http://vitessce.io",
|
|
6
6
|
"repository": {
|
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
"lodash-es": "^4.17.21",
|
|
21
21
|
"uuid": "^9.0.0",
|
|
22
22
|
"react-aria": "^3.28.0",
|
|
23
|
-
"@vitessce/
|
|
24
|
-
"@vitessce/sets-utils": "3.3.
|
|
25
|
-
"@vitessce/legend": "3.3.
|
|
26
|
-
"@vitessce/tooltip": "3.3.
|
|
27
|
-
"@vitessce/vit-s": "3.3.
|
|
28
|
-
"@vitessce/
|
|
29
|
-
"@vitessce/
|
|
30
|
-
"@vitessce/
|
|
23
|
+
"@vitessce/constants-internal": "3.3.3",
|
|
24
|
+
"@vitessce/sets-utils": "3.3.3",
|
|
25
|
+
"@vitessce/legend": "3.3.3",
|
|
26
|
+
"@vitessce/tooltip": "3.3.3",
|
|
27
|
+
"@vitessce/vit-s": "3.3.3",
|
|
28
|
+
"@vitessce/workers": "3.3.3",
|
|
29
|
+
"@vitessce/utils": "3.3.3",
|
|
30
|
+
"@vitessce/gl": "3.3.3"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@testing-library/jest-dom": "^5.16.4",
|