@idetik/core 0.4.1 → 0.4.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/index.d.ts +52 -46
- package/dist/index.js +367 -348
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +12 -12
- package/dist/index.umd.cjs.map +1 -1
- package/dist/types/examples/chunk_streaming/chunk_info_overlay.d.ts.map +1 -1
- package/dist/types/src/core/chunk_manager.d.ts +1 -6
- package/dist/types/src/core/chunk_manager.d.ts.map +1 -1
- package/dist/types/src/core/chunk_store.d.ts +10 -0
- package/dist/types/src/core/chunk_store.d.ts.map +1 -1
- package/dist/types/src/core/chunk_store_view.d.ts +5 -2
- package/dist/types/src/core/chunk_store_view.d.ts.map +1 -1
- package/dist/types/src/layers/chunked_image_layer.d.ts +1 -1
- package/dist/types/src/layers/chunked_image_layer.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1037,19 +1037,19 @@ function AA() {
|
|
|
1037
1037
|
return T != Float32Array && (g[1] = 0, g[2] = 0, g[3] = 0, g[4] = 0, g[6] = 0, g[7] = 0, g[8] = 0, g[9] = 0, g[11] = 0, g[12] = 0, g[13] = 0, g[14] = 0), g[0] = 1, g[5] = 1, g[10] = 1, g[15] = 1, g;
|
|
1038
1038
|
}
|
|
1039
1039
|
function ig(g, A) {
|
|
1040
|
-
var I = A[0], B = A[1], Q = A[2], C = A[3], E = A[4], i = A[5], o = A[6], a = A[7], D = A[8], h = A[9], y = A[10], t = A[11], F = A[12], r = A[13], S = A[14],
|
|
1041
|
-
return m ? (m = 1 / m, g[0] = (i *
|
|
1040
|
+
var I = A[0], B = A[1], Q = A[2], C = A[3], E = A[4], i = A[5], o = A[6], a = A[7], D = A[8], h = A[9], y = A[10], t = A[11], F = A[12], r = A[13], S = A[14], e = A[15], c = I * i - B * E, N = I * o - Q * E, M = I * a - C * E, Y = B * o - Q * i, J = B * a - C * i, W = Q * a - C * o, v = D * r - h * F, Z = D * S - y * F, P = D * e - t * F, O = h * S - y * r, eA = h * e - t * r, nA = y * e - t * S, m = c * nA - N * eA + M * O + Y * P - J * Z + W * v;
|
|
1041
|
+
return m ? (m = 1 / m, g[0] = (i * nA - o * eA + a * O) * m, g[1] = (Q * eA - B * nA - C * O) * m, g[2] = (r * W - S * J + e * Y) * m, g[3] = (y * J - h * W - t * Y) * m, g[4] = (o * P - E * nA - a * Z) * m, g[5] = (I * nA - Q * P + C * Z) * m, g[6] = (S * M - F * W - e * N) * m, g[7] = (D * W - y * M + t * N) * m, g[8] = (E * eA - i * P + a * v) * m, g[9] = (B * P - I * eA - C * v) * m, g[10] = (F * J - r * M + e * c) * m, g[11] = (h * M - D * J - t * c) * m, g[12] = (i * Z - E * O - o * v) * m, g[13] = (I * O - B * Z + Q * v) * m, g[14] = (r * N - F * Y - S * c) * m, g[15] = (D * Y - h * N + y * c) * m, g) : null;
|
|
1042
1042
|
}
|
|
1043
|
-
function
|
|
1044
|
-
var B = A[0], Q = A[1], C = A[2], E = A[3], i = A[4], o = A[5], a = A[6], D = A[7], h = A[8], y = A[9], t = A[10], F = A[11], r = A[12], S = A[13],
|
|
1045
|
-
return g[0] = N * B + M * i + Y * h + J * r, g[1] = N * Q + M * o + Y * y + J * S, g[2] = N * C + M * a + Y * t + J *
|
|
1043
|
+
function nI(g, A, I) {
|
|
1044
|
+
var B = A[0], Q = A[1], C = A[2], E = A[3], i = A[4], o = A[5], a = A[6], D = A[7], h = A[8], y = A[9], t = A[10], F = A[11], r = A[12], S = A[13], e = A[14], c = A[15], N = I[0], M = I[1], Y = I[2], J = I[3];
|
|
1045
|
+
return g[0] = N * B + M * i + Y * h + J * r, g[1] = N * Q + M * o + Y * y + J * S, g[2] = N * C + M * a + Y * t + J * e, g[3] = N * E + M * D + Y * F + J * c, N = I[4], M = I[5], Y = I[6], J = I[7], g[4] = N * B + M * i + Y * h + J * r, g[5] = N * Q + M * o + Y * y + J * S, g[6] = N * C + M * a + Y * t + J * e, g[7] = N * E + M * D + Y * F + J * c, N = I[8], M = I[9], Y = I[10], J = I[11], g[8] = N * B + M * i + Y * h + J * r, g[9] = N * Q + M * o + Y * y + J * S, g[10] = N * C + M * a + Y * t + J * e, g[11] = N * E + M * D + Y * F + J * c, N = I[12], M = I[13], Y = I[14], J = I[15], g[12] = N * B + M * i + Y * h + J * r, g[13] = N * Q + M * o + Y * y + J * S, g[14] = N * C + M * a + Y * t + J * e, g[15] = N * E + M * D + Y * F + J * c, g;
|
|
1046
1046
|
}
|
|
1047
1047
|
function DQ(g, A) {
|
|
1048
1048
|
return g[0] = A[0], g[1] = 0, g[2] = 0, g[3] = 0, g[4] = 0, g[5] = A[1], g[6] = 0, g[7] = 0, g[8] = 0, g[9] = 0, g[10] = A[2], g[11] = 0, g[12] = 0, g[13] = 0, g[14] = 0, g[15] = 1, g;
|
|
1049
1049
|
}
|
|
1050
1050
|
function sQ(g, A, I, B) {
|
|
1051
|
-
var Q = A[0], C = A[1], E = A[2], i = A[3], o = Q + Q, a = C + C, D = E + E, h = Q * o, y = Q * a, t = Q * D, F = C * a, r = C * D, S = E * D,
|
|
1052
|
-
return g[0] = (1 - (F + S)) * M, g[1] = (y + N) * M, g[2] = (t - c) * M, g[3] = 0, g[4] = (y - N) * Y, g[5] = (1 - (h + S)) * Y, g[6] = (r +
|
|
1051
|
+
var Q = A[0], C = A[1], E = A[2], i = A[3], o = Q + Q, a = C + C, D = E + E, h = Q * o, y = Q * a, t = Q * D, F = C * a, r = C * D, S = E * D, e = i * o, c = i * a, N = i * D, M = B[0], Y = B[1], J = B[2];
|
|
1052
|
+
return g[0] = (1 - (F + S)) * M, g[1] = (y + N) * M, g[2] = (t - c) * M, g[3] = 0, g[4] = (y - N) * Y, g[5] = (1 - (h + S)) * Y, g[6] = (r + e) * Y, g[7] = 0, g[8] = (t + c) * J, g[9] = (r - e) * J, g[10] = (1 - (h + F)) * J, g[11] = 0, g[12] = I[0], g[13] = I[1], g[14] = I[2], g[15] = 1, g;
|
|
1053
1053
|
}
|
|
1054
1054
|
function hQ(g, A, I, B, Q) {
|
|
1055
1055
|
var C = 1 / Math.tan(A / 2), E;
|
|
@@ -1061,7 +1061,7 @@ function tQ(g, A, I, B, Q, C, E) {
|
|
|
1061
1061
|
return g[0] = -2 * i, g[1] = 0, g[2] = 0, g[3] = 0, g[4] = 0, g[5] = -2 * o, g[6] = 0, g[7] = 0, g[8] = 0, g[9] = 0, g[10] = 2 * a, g[11] = 0, g[12] = (A + I) * i, g[13] = (Q + B) * o, g[14] = (E + C) * a, g[15] = 1, g;
|
|
1062
1062
|
}
|
|
1063
1063
|
var GQ = tQ;
|
|
1064
|
-
function
|
|
1064
|
+
function eQ(g, A, I, B) {
|
|
1065
1065
|
var Q = A[0], C = A[1], E = A[2], i = B[0], o = B[1], a = B[2], D = Q - I[0], h = C - I[1], y = E - I[2], t = D * D + h * h + y * y;
|
|
1066
1066
|
t > 0 && (t = 1 / Math.sqrt(t), D *= t, h *= t, y *= t);
|
|
1067
1067
|
var F = o * y - a * h, r = a * D - i * y, S = i * h - o * D;
|
|
@@ -1092,7 +1092,7 @@ function LA(g, A, I, B) {
|
|
|
1092
1092
|
function tB(g, A, I) {
|
|
1093
1093
|
return g[0] = A[0] + I[0], g[1] = A[1] + I[1], g[2] = A[2] + I[2], g;
|
|
1094
1094
|
}
|
|
1095
|
-
function
|
|
1095
|
+
function nQ(g, A, I) {
|
|
1096
1096
|
return g[0] = A[0] - I[0], g[1] = A[1] - I[1], g[2] = A[2] - I[2], g;
|
|
1097
1097
|
}
|
|
1098
1098
|
function wQ(g, A, I) {
|
|
@@ -1112,7 +1112,7 @@ function FQ(g, A) {
|
|
|
1112
1112
|
var I = A[0], B = A[1], Q = A[2], C = I * I + B * B + Q * Q;
|
|
1113
1113
|
return C > 0 && (C = 1 / Math.sqrt(C)), g[0] = A[0] * C, g[1] = A[1] * C, g[2] = A[2] * C, g;
|
|
1114
1114
|
}
|
|
1115
|
-
function
|
|
1115
|
+
function eB(g, A) {
|
|
1116
1116
|
return g[0] * A[0] + g[1] * A[1] + g[2] * A[2];
|
|
1117
1117
|
}
|
|
1118
1118
|
function TI(g, A, I) {
|
|
@@ -1131,7 +1131,7 @@ function SQ(g, A) {
|
|
|
1131
1131
|
var I = g[0], B = g[1], Q = g[2], C = A[0], E = A[1], i = A[2];
|
|
1132
1132
|
return Math.abs(I - C) <= rA * Math.max(1, Math.abs(I), Math.abs(C)) && Math.abs(B - E) <= rA * Math.max(1, Math.abs(B), Math.abs(E)) && Math.abs(Q - i) <= rA * Math.max(1, Math.abs(Q), Math.abs(i));
|
|
1133
1133
|
}
|
|
1134
|
-
var VI =
|
|
1134
|
+
var VI = nQ, RQ = yB;
|
|
1135
1135
|
(function() {
|
|
1136
1136
|
var g = p();
|
|
1137
1137
|
return function(A, I, B, Q, C, E) {
|
|
@@ -1193,7 +1193,7 @@ function WI(g, A, I, B) {
|
|
|
1193
1193
|
var Q = A[0], C = A[1], E = A[2], i = A[3], o = I[0], a = I[1], D = I[2], h = I[3], y, t, F, r, S;
|
|
1194
1194
|
return t = Q * o + C * a + E * D + i * h, t < 0 && (t = -t, o = -o, a = -a, D = -D, h = -h), 1 - t > rA ? (y = Math.acos(t), F = Math.sin(y), r = Math.sin((1 - B) * y) / F, S = Math.sin(B * y) / F) : (r = 1 - B, S = B), g[0] = r * Q + S * o, g[1] = r * C + S * a, g[2] = r * E + S * D, g[3] = r * i + S * h, g;
|
|
1195
1195
|
}
|
|
1196
|
-
function
|
|
1196
|
+
function nB(g, A) {
|
|
1197
1197
|
var I = A[0] + A[4] + A[8], B;
|
|
1198
1198
|
if (I > 0)
|
|
1199
1199
|
B = Math.sqrt(I + 1), g[3] = 0.5 * B, B = 0.5 / B, g[0] = (A[5] - A[7]) * B, g[1] = (A[6] - A[2]) * B, g[2] = (A[1] - A[3]) * B;
|
|
@@ -1209,7 +1209,7 @@ var YQ = NQ, MQ = cQ, og = kQ;
|
|
|
1209
1209
|
(function() {
|
|
1210
1210
|
var g = p(), A = q(1, 0, 0), I = q(0, 1, 0);
|
|
1211
1211
|
return function(B, Q, C) {
|
|
1212
|
-
var E =
|
|
1212
|
+
var E = eB(Q, C);
|
|
1213
1213
|
return E < -0.999999 ? (TI(g, A, Q), RQ(g) < 1e-6 && TI(g, I, Q), FQ(g, g), LQ(B, g, Math.PI), B) : E > 0.999999 ? (B[0] = 0, B[1] = 0, B[2] = 0, B[3] = 1, B) : (TI(g, Q, C), B[0] = g[0], B[1] = g[1], B[2] = g[2], B[3] = 1 + E, og(B, B));
|
|
1214
1214
|
};
|
|
1215
1215
|
})();
|
|
@@ -1222,7 +1222,7 @@ var YQ = NQ, MQ = cQ, og = kQ;
|
|
|
1222
1222
|
(function() {
|
|
1223
1223
|
var g = hB();
|
|
1224
1224
|
return function(A, I, B, Q) {
|
|
1225
|
-
return g[0] = B[0], g[3] = B[1], g[6] = B[2], g[1] = Q[0], g[4] = Q[1], g[7] = Q[2], g[2] = -I[0], g[5] = -I[1], g[8] = -I[2], og(A,
|
|
1225
|
+
return g[0] = B[0], g[3] = B[1], g[6] = B[2], g[1] = Q[0], g[4] = Q[1], g[7] = Q[2], g[2] = -I[0], g[5] = -I[1], g[8] = -I[2], og(A, nB(A, g));
|
|
1226
1226
|
};
|
|
1227
1227
|
})();
|
|
1228
1228
|
function wB() {
|
|
@@ -1875,11 +1875,11 @@ class uQ extends OB {
|
|
|
1875
1875
|
}
|
|
1876
1876
|
}
|
|
1877
1877
|
drawGeometry(A, I, B, Q, C) {
|
|
1878
|
-
const E =
|
|
1878
|
+
const E = nI(
|
|
1879
1879
|
AA(),
|
|
1880
1880
|
C.viewMatrix,
|
|
1881
1881
|
I.transform.matrix
|
|
1882
|
-
), i =
|
|
1882
|
+
), i = nI(
|
|
1883
1883
|
AA(),
|
|
1884
1884
|
mQ,
|
|
1885
1885
|
C.projectionMatrix
|
|
@@ -2009,136 +2009,11 @@ function xQ(g, A) {
|
|
|
2009
2009
|
function jI(g, A, I = 1e-6) {
|
|
2010
2010
|
return Math.abs(g - A) <= I;
|
|
2011
2011
|
}
|
|
2012
|
-
class bQ {
|
|
2013
|
-
chunks_;
|
|
2014
|
-
loader_;
|
|
2015
|
-
lowestResLOD_;
|
|
2016
|
-
dimensions_;
|
|
2017
|
-
constructor(A) {
|
|
2018
|
-
this.loader_ = A, this.dimensions_ = this.loader_.getSourceDimensionMap(), this.lowestResLOD_ = this.dimensions_.numLods - 1, this.validateXYScaleRatios();
|
|
2019
|
-
const { size: I } = this.getAndValidateTimeDimension(), { size: B } = this.getAndValidateChannelDimension();
|
|
2020
|
-
this.chunks_ = Array.from({ length: I }, () => []);
|
|
2021
|
-
for (let Q = 0; Q < I; ++Q) {
|
|
2022
|
-
const C = this.chunks_[Q];
|
|
2023
|
-
for (let E = 0; E < this.dimensions_.numLods; ++E) {
|
|
2024
|
-
const i = this.dimensions_.x.lods[E], o = this.dimensions_.y.lods[E], a = this.dimensions_.z?.lods[E], D = i.chunkSize, h = o.chunkSize, y = a?.chunkSize ?? 1, t = Math.ceil(i.size / D), F = Math.ceil(o.size / h), r = Math.ceil((a?.size ?? 1) / y);
|
|
2025
|
-
for (let S = 0; S < B; ++S)
|
|
2026
|
-
for (let n = 0; n < t; ++n) {
|
|
2027
|
-
const c = i.translation + n * i.chunkSize * i.scale;
|
|
2028
|
-
for (let N = 0; N < F; ++N) {
|
|
2029
|
-
const M = o.translation + N * o.chunkSize * o.scale;
|
|
2030
|
-
for (let Y = 0; Y < r; ++Y) {
|
|
2031
|
-
const J = a !== void 0 ? a.translation + Y * y * a.scale : 0;
|
|
2032
|
-
C.push({
|
|
2033
|
-
state: "unloaded",
|
|
2034
|
-
lod: E,
|
|
2035
|
-
visible: !1,
|
|
2036
|
-
prefetch: !1,
|
|
2037
|
-
priority: null,
|
|
2038
|
-
orderKey: null,
|
|
2039
|
-
shape: {
|
|
2040
|
-
x: Math.min(D, i.size - n * D),
|
|
2041
|
-
y: Math.min(h, o.size - N * h),
|
|
2042
|
-
z: Math.min(y, (a?.size ?? 1) - Y * y),
|
|
2043
|
-
c: 1
|
|
2044
|
-
},
|
|
2045
|
-
rowAlignmentBytes: 1,
|
|
2046
|
-
chunkIndex: { x: n, y: N, z: Y, c: S, t: Q },
|
|
2047
|
-
scale: {
|
|
2048
|
-
x: i.scale,
|
|
2049
|
-
y: o.scale,
|
|
2050
|
-
z: a?.scale ?? 1
|
|
2051
|
-
},
|
|
2052
|
-
offset: {
|
|
2053
|
-
x: c,
|
|
2054
|
-
y: M,
|
|
2055
|
-
z: J
|
|
2056
|
-
}
|
|
2057
|
-
});
|
|
2058
|
-
}
|
|
2059
|
-
}
|
|
2060
|
-
}
|
|
2061
|
-
}
|
|
2062
|
-
}
|
|
2063
|
-
}
|
|
2064
|
-
getChunksAtTime(A) {
|
|
2065
|
-
return this.chunks_[A];
|
|
2066
|
-
}
|
|
2067
|
-
getTimeIndex(A) {
|
|
2068
|
-
return A.t === void 0 || this.dimensions_.t === void 0 ? 0 : xQ(this.dimensions_.t.lods[0], A.t);
|
|
2069
|
-
}
|
|
2070
|
-
get lodCount() {
|
|
2071
|
-
return this.lowestResLOD_ + 1;
|
|
2072
|
-
}
|
|
2073
|
-
get dimensions() {
|
|
2074
|
-
return this.dimensions_;
|
|
2075
|
-
}
|
|
2076
|
-
getLowestResLOD() {
|
|
2077
|
-
return this.lowestResLOD_;
|
|
2078
|
-
}
|
|
2079
|
-
loadChunkData(A, I) {
|
|
2080
|
-
return this.loader_.loadChunkData(A, I);
|
|
2081
|
-
}
|
|
2082
|
-
validateXYScaleRatios() {
|
|
2083
|
-
const A = this.dimensions_.x, I = this.dimensions_.y;
|
|
2084
|
-
for (let B = 1; B < this.dimensions_.numLods; B++) {
|
|
2085
|
-
const Q = A.lods[B].scale / A.lods[B - 1].scale, C = I.lods[B].scale / I.lods[B - 1].scale;
|
|
2086
|
-
if (!jI(Q, 2, 0.02) || !jI(C, 2, 0.02))
|
|
2087
|
-
throw new Error(
|
|
2088
|
-
`Invalid downsampling factor between levels ${B - 1} → ${B}: expected (2× in X and Y), but got (${Q.toFixed(2)}×, ${C.toFixed(2)}×) from scale [${A.lods[B - 1].scale}, ${I.lods[B - 1].scale}] → [${A.lods[B].scale}, ${I.lods[B].scale}]`
|
|
2089
|
-
);
|
|
2090
|
-
}
|
|
2091
|
-
}
|
|
2092
|
-
getAndValidateTimeDimension() {
|
|
2093
|
-
for (let A = 0; A < this.dimensions_.numLods; ++A) {
|
|
2094
|
-
const I = this.dimensions_.t?.lods[A];
|
|
2095
|
-
if (!I) continue;
|
|
2096
|
-
if (I.chunkSize !== 1)
|
|
2097
|
-
throw new Error(
|
|
2098
|
-
`ChunkStore only supports a chunk size of 1 in t. Found ${I.chunkSize} at LOD ${A}`
|
|
2099
|
-
);
|
|
2100
|
-
const B = this.dimensions_.t?.lods[A - 1];
|
|
2101
|
-
if (B && I.size !== B.size)
|
|
2102
|
-
throw new Error(
|
|
2103
|
-
`ChunkStore does not support downsampling in t. Found ${B.size} at LOD ${A - 1} → ${I.size} at LOD ${A}`
|
|
2104
|
-
);
|
|
2105
|
-
}
|
|
2106
|
-
return {
|
|
2107
|
-
size: this.dimensions_.t?.lods[0].size ?? 1
|
|
2108
|
-
};
|
|
2109
|
-
}
|
|
2110
|
-
getAndValidateChannelDimension() {
|
|
2111
|
-
for (let A = 0; A < this.dimensions_.numLods; ++A) {
|
|
2112
|
-
const I = this.dimensions_.c?.lods[A];
|
|
2113
|
-
if (!I) continue;
|
|
2114
|
-
if (I.chunkSize !== 1)
|
|
2115
|
-
throw new Error(
|
|
2116
|
-
`ChunkStore only supports a chunk size of 1 in c. Found ${I.chunkSize} at LOD ${A}`
|
|
2117
|
-
);
|
|
2118
|
-
if (I.scale !== 1)
|
|
2119
|
-
throw new Error(
|
|
2120
|
-
`ChunkStore does not support scale in c. Found ${I.scale} at LOD ${A}`
|
|
2121
|
-
);
|
|
2122
|
-
if (I.translation !== 0)
|
|
2123
|
-
throw new Error(
|
|
2124
|
-
`ChunkStore does not support translation in c. Found ${I.translation} at LOD ${A}`
|
|
2125
|
-
);
|
|
2126
|
-
const B = this.dimensions_.c?.lods[A - 1];
|
|
2127
|
-
if (B && I.size !== B.size)
|
|
2128
|
-
throw new Error(
|
|
2129
|
-
`ChunkStore does not support downsampling in c. Found ${B.size} at LOD ${A - 1} → ${I.size} at LOD ${A}`
|
|
2130
|
-
);
|
|
2131
|
-
}
|
|
2132
|
-
return {
|
|
2133
|
-
size: this.dimensions_.c?.lods[0].size ?? 1
|
|
2134
|
-
};
|
|
2135
|
-
}
|
|
2136
|
-
}
|
|
2137
2012
|
function OA(g, A, I) {
|
|
2138
2013
|
return Math.max(A, Math.min(I, g));
|
|
2139
2014
|
}
|
|
2140
2015
|
const FB = Symbol("INTERNAL_POLICY_KEY");
|
|
2141
|
-
class
|
|
2016
|
+
class bQ {
|
|
2142
2017
|
store_;
|
|
2143
2018
|
policy_;
|
|
2144
2019
|
policyChanged_ = !1;
|
|
@@ -2159,12 +2034,19 @@ class ZQ {
|
|
|
2159
2034
|
u(Q.size * Q.scale, C.size * C.scale)
|
|
2160
2035
|
);
|
|
2161
2036
|
}
|
|
2162
|
-
get store() {
|
|
2163
|
-
return this.store_;
|
|
2164
|
-
}
|
|
2165
2037
|
get chunkViewStates() {
|
|
2166
2038
|
return this.chunkViewStates_;
|
|
2167
2039
|
}
|
|
2040
|
+
// forwarding methods for chunk stats overlay while keeping store_ private
|
|
2041
|
+
getChunksAtTime(A) {
|
|
2042
|
+
return this.store_.getChunksAtTime(A);
|
|
2043
|
+
}
|
|
2044
|
+
getTimeIndex(A) {
|
|
2045
|
+
return this.store_.getTimeIndex(A);
|
|
2046
|
+
}
|
|
2047
|
+
get lodCount() {
|
|
2048
|
+
return this.store_.lodCount;
|
|
2049
|
+
}
|
|
2168
2050
|
getChunksToRender(A) {
|
|
2169
2051
|
const I = this.store_.getTimeIndex(A), B = this.store_.getChunksAtTime(I), Q = B.filter(
|
|
2170
2052
|
(i) => i.lod === this.currentLOD_ && this.chunkViewStates_.get(i)?.visible === !0 && i.state === "loaded"
|
|
@@ -2195,6 +2077,9 @@ class ZQ {
|
|
|
2195
2077
|
const I = this.chunkViewStates_.get(A);
|
|
2196
2078
|
I && (I.visible || I.prefetch || I.priority !== null) || this.chunkViewStates_.delete(A);
|
|
2197
2079
|
}
|
|
2080
|
+
dispose() {
|
|
2081
|
+
this.store_.removeView(this);
|
|
2082
|
+
}
|
|
2198
2083
|
setImageSourcePolicy(A, I) {
|
|
2199
2084
|
if (I !== FB)
|
|
2200
2085
|
throw new Error("Unauthorized policy mutation");
|
|
@@ -2229,7 +2114,7 @@ class ZQ {
|
|
|
2229
2114
|
q(I.min[0], I.min[1], E),
|
|
2230
2115
|
q(I.max[0], I.max[1], i)
|
|
2231
2116
|
);
|
|
2232
|
-
this.chunkViewStates_.forEach(
|
|
2117
|
+
this.chunkViewStates_.forEach(ZQ), this.updateChunksAtTimeIndex(
|
|
2233
2118
|
B,
|
|
2234
2119
|
A,
|
|
2235
2120
|
o,
|
|
@@ -2346,52 +2231,216 @@ class ZQ {
|
|
|
2346
2231
|
return Q * Q + C * C;
|
|
2347
2232
|
}
|
|
2348
2233
|
}
|
|
2349
|
-
function
|
|
2234
|
+
function ZQ(g) {
|
|
2350
2235
|
g.visible = !1, g.prefetch = !1, g.priority = null, g.orderKey = null;
|
|
2351
2236
|
}
|
|
2237
|
+
class PQ {
|
|
2238
|
+
chunks_;
|
|
2239
|
+
loader_;
|
|
2240
|
+
lowestResLOD_;
|
|
2241
|
+
dimensions_;
|
|
2242
|
+
views_ = [];
|
|
2243
|
+
hasHadViews_ = !1;
|
|
2244
|
+
constructor(A) {
|
|
2245
|
+
this.loader_ = A, this.dimensions_ = this.loader_.getSourceDimensionMap(), this.lowestResLOD_ = this.dimensions_.numLods - 1, this.validateXYScaleRatios();
|
|
2246
|
+
const { size: I } = this.getAndValidateTimeDimension(), { size: B } = this.getAndValidateChannelDimension();
|
|
2247
|
+
this.chunks_ = Array.from({ length: I }, () => []);
|
|
2248
|
+
for (let Q = 0; Q < I; ++Q) {
|
|
2249
|
+
const C = this.chunks_[Q];
|
|
2250
|
+
for (let E = 0; E < this.dimensions_.numLods; ++E) {
|
|
2251
|
+
const i = this.dimensions_.x.lods[E], o = this.dimensions_.y.lods[E], a = this.dimensions_.z?.lods[E], D = i.chunkSize, h = o.chunkSize, y = a?.chunkSize ?? 1, t = Math.ceil(i.size / D), F = Math.ceil(o.size / h), r = Math.ceil((a?.size ?? 1) / y);
|
|
2252
|
+
for (let S = 0; S < B; ++S)
|
|
2253
|
+
for (let e = 0; e < t; ++e) {
|
|
2254
|
+
const c = i.translation + e * i.chunkSize * i.scale;
|
|
2255
|
+
for (let N = 0; N < F; ++N) {
|
|
2256
|
+
const M = o.translation + N * o.chunkSize * o.scale;
|
|
2257
|
+
for (let Y = 0; Y < r; ++Y) {
|
|
2258
|
+
const J = a !== void 0 ? a.translation + Y * y * a.scale : 0;
|
|
2259
|
+
C.push({
|
|
2260
|
+
state: "unloaded",
|
|
2261
|
+
lod: E,
|
|
2262
|
+
visible: !1,
|
|
2263
|
+
prefetch: !1,
|
|
2264
|
+
priority: null,
|
|
2265
|
+
orderKey: null,
|
|
2266
|
+
shape: {
|
|
2267
|
+
x: Math.min(D, i.size - e * D),
|
|
2268
|
+
y: Math.min(h, o.size - N * h),
|
|
2269
|
+
z: Math.min(y, (a?.size ?? 1) - Y * y),
|
|
2270
|
+
c: 1
|
|
2271
|
+
},
|
|
2272
|
+
rowAlignmentBytes: 1,
|
|
2273
|
+
chunkIndex: { x: e, y: N, z: Y, c: S, t: Q },
|
|
2274
|
+
scale: {
|
|
2275
|
+
x: i.scale,
|
|
2276
|
+
y: o.scale,
|
|
2277
|
+
z: a?.scale ?? 1
|
|
2278
|
+
},
|
|
2279
|
+
offset: {
|
|
2280
|
+
x: c,
|
|
2281
|
+
y: M,
|
|
2282
|
+
z: J
|
|
2283
|
+
}
|
|
2284
|
+
});
|
|
2285
|
+
}
|
|
2286
|
+
}
|
|
2287
|
+
}
|
|
2288
|
+
}
|
|
2289
|
+
}
|
|
2290
|
+
}
|
|
2291
|
+
getChunksAtTime(A) {
|
|
2292
|
+
return this.chunks_[A];
|
|
2293
|
+
}
|
|
2294
|
+
getTimeIndex(A) {
|
|
2295
|
+
return A.t === void 0 || this.dimensions_.t === void 0 ? 0 : xQ(this.dimensions_.t.lods[0], A.t);
|
|
2296
|
+
}
|
|
2297
|
+
get lodCount() {
|
|
2298
|
+
return this.lowestResLOD_ + 1;
|
|
2299
|
+
}
|
|
2300
|
+
get dimensions() {
|
|
2301
|
+
return this.dimensions_;
|
|
2302
|
+
}
|
|
2303
|
+
getLowestResLOD() {
|
|
2304
|
+
return this.lowestResLOD_;
|
|
2305
|
+
}
|
|
2306
|
+
loadChunkData(A, I) {
|
|
2307
|
+
return this.loader_.loadChunkData(A, I);
|
|
2308
|
+
}
|
|
2309
|
+
createView(A) {
|
|
2310
|
+
const I = new bQ(this, A);
|
|
2311
|
+
return this.views_.push(I), this.hasHadViews_ = !0, I;
|
|
2312
|
+
}
|
|
2313
|
+
removeView(A) {
|
|
2314
|
+
const I = this.views_.indexOf(A);
|
|
2315
|
+
if (I === -1)
|
|
2316
|
+
throw new Error(
|
|
2317
|
+
"Cannot remove view: view not found in store's view list"
|
|
2318
|
+
);
|
|
2319
|
+
const B = Array.from(A.chunkViewStates.keys());
|
|
2320
|
+
this.views_.splice(I, 1);
|
|
2321
|
+
for (const Q of B)
|
|
2322
|
+
this.aggregateChunkViewStates(Q);
|
|
2323
|
+
}
|
|
2324
|
+
get views() {
|
|
2325
|
+
return this.views_;
|
|
2326
|
+
}
|
|
2327
|
+
canDispose() {
|
|
2328
|
+
return this.hasHadViews_ && this.views_.length === 0;
|
|
2329
|
+
}
|
|
2330
|
+
updateAndCollectChunkChanges() {
|
|
2331
|
+
const A = /* @__PURE__ */ new Set();
|
|
2332
|
+
for (const I of this.views_)
|
|
2333
|
+
for (const [B, Q] of I.chunkViewStates)
|
|
2334
|
+
A.add(B);
|
|
2335
|
+
for (const I of A)
|
|
2336
|
+
this.aggregateChunkViewStates(I);
|
|
2337
|
+
return A;
|
|
2338
|
+
}
|
|
2339
|
+
aggregateChunkViewStates(A) {
|
|
2340
|
+
let I = !1, B = !1, Q = null, C = null;
|
|
2341
|
+
for (const a of this.views_) {
|
|
2342
|
+
const D = a.chunkViewStates.get(A);
|
|
2343
|
+
D && (D.visible && (I = !0), D.prefetch && (B = !0), D.priority !== null && (Q === null || D.priority < Q) && (Q = D.priority, C = D.orderKey), !D.visible && !D.prefetch && D.priority === null && a.maybeForgetChunk(A));
|
|
2344
|
+
}
|
|
2345
|
+
if (A.visible = I, A.prefetch = B, A.priority = Q, A.orderKey = C, A.priority !== null && A.state === "unloaded") {
|
|
2346
|
+
A.state = "queued";
|
|
2347
|
+
return;
|
|
2348
|
+
}
|
|
2349
|
+
if (A.priority === null && A.state === "queued") {
|
|
2350
|
+
A.state = "unloaded";
|
|
2351
|
+
return;
|
|
2352
|
+
}
|
|
2353
|
+
if (A.state === "loaded" && A.priority === null) {
|
|
2354
|
+
if (A.visible || A.prefetch)
|
|
2355
|
+
throw new Error(
|
|
2356
|
+
`Chunk state inconsistency detected: priority is null but visible=${A.visible} or prefetch=${A.prefetch} for chunk ${JSON.stringify(A.chunkIndex)} in LOD ${A.lod}`
|
|
2357
|
+
);
|
|
2358
|
+
A.data = void 0, A.state = "unloaded", A.orderKey = null, U.debug(
|
|
2359
|
+
"ChunkStore",
|
|
2360
|
+
`Disposing chunk ${JSON.stringify(A.chunkIndex)} in LOD ${A.lod}`
|
|
2361
|
+
);
|
|
2362
|
+
}
|
|
2363
|
+
}
|
|
2364
|
+
validateXYScaleRatios() {
|
|
2365
|
+
const A = this.dimensions_.x, I = this.dimensions_.y;
|
|
2366
|
+
for (let B = 1; B < this.dimensions_.numLods; B++) {
|
|
2367
|
+
const Q = A.lods[B].scale / A.lods[B - 1].scale, C = I.lods[B].scale / I.lods[B - 1].scale;
|
|
2368
|
+
if (!jI(Q, 2, 0.02) || !jI(C, 2, 0.02))
|
|
2369
|
+
throw new Error(
|
|
2370
|
+
`Invalid downsampling factor between levels ${B - 1} → ${B}: expected (2× in X and Y), but got (${Q.toFixed(2)}×, ${C.toFixed(2)}×) from scale [${A.lods[B - 1].scale}, ${I.lods[B - 1].scale}] → [${A.lods[B].scale}, ${I.lods[B].scale}]`
|
|
2371
|
+
);
|
|
2372
|
+
}
|
|
2373
|
+
}
|
|
2374
|
+
getAndValidateTimeDimension() {
|
|
2375
|
+
for (let A = 0; A < this.dimensions_.numLods; ++A) {
|
|
2376
|
+
const I = this.dimensions_.t?.lods[A];
|
|
2377
|
+
if (!I) continue;
|
|
2378
|
+
if (I.chunkSize !== 1)
|
|
2379
|
+
throw new Error(
|
|
2380
|
+
`ChunkStore only supports a chunk size of 1 in t. Found ${I.chunkSize} at LOD ${A}`
|
|
2381
|
+
);
|
|
2382
|
+
const B = this.dimensions_.t?.lods[A - 1];
|
|
2383
|
+
if (B && I.size !== B.size)
|
|
2384
|
+
throw new Error(
|
|
2385
|
+
`ChunkStore does not support downsampling in t. Found ${B.size} at LOD ${A - 1} → ${I.size} at LOD ${A}`
|
|
2386
|
+
);
|
|
2387
|
+
}
|
|
2388
|
+
return {
|
|
2389
|
+
size: this.dimensions_.t?.lods[0].size ?? 1
|
|
2390
|
+
};
|
|
2391
|
+
}
|
|
2392
|
+
getAndValidateChannelDimension() {
|
|
2393
|
+
for (let A = 0; A < this.dimensions_.numLods; ++A) {
|
|
2394
|
+
const I = this.dimensions_.c?.lods[A];
|
|
2395
|
+
if (!I) continue;
|
|
2396
|
+
if (I.chunkSize !== 1)
|
|
2397
|
+
throw new Error(
|
|
2398
|
+
`ChunkStore only supports a chunk size of 1 in c. Found ${I.chunkSize} at LOD ${A}`
|
|
2399
|
+
);
|
|
2400
|
+
if (I.scale !== 1)
|
|
2401
|
+
throw new Error(
|
|
2402
|
+
`ChunkStore does not support scale in c. Found ${I.scale} at LOD ${A}`
|
|
2403
|
+
);
|
|
2404
|
+
if (I.translation !== 0)
|
|
2405
|
+
throw new Error(
|
|
2406
|
+
`ChunkStore does not support translation in c. Found ${I.translation} at LOD ${A}`
|
|
2407
|
+
);
|
|
2408
|
+
const B = this.dimensions_.c?.lods[A - 1];
|
|
2409
|
+
if (B && I.size !== B.size)
|
|
2410
|
+
throw new Error(
|
|
2411
|
+
`ChunkStore does not support downsampling in c. Found ${B.size} at LOD ${A - 1} → ${I.size} at LOD ${A}`
|
|
2412
|
+
);
|
|
2413
|
+
}
|
|
2414
|
+
return {
|
|
2415
|
+
size: this.dimensions_.c?.lods[0].size ?? 1
|
|
2416
|
+
};
|
|
2417
|
+
}
|
|
2418
|
+
}
|
|
2352
2419
|
class OQ {
|
|
2353
2420
|
stores_ = /* @__PURE__ */ new Map();
|
|
2354
2421
|
pendingStores_ = /* @__PURE__ */ new Map();
|
|
2355
|
-
views_ = /* @__PURE__ */ new Map();
|
|
2356
2422
|
queue_ = new WQ();
|
|
2357
2423
|
async addView(A, I) {
|
|
2358
|
-
|
|
2359
|
-
return this.views_.set(B, (this.views_.get(B) ?? []).concat(Q)), Q;
|
|
2424
|
+
return (await this.getOrCreateStore(A)).createView(I);
|
|
2360
2425
|
}
|
|
2361
|
-
|
|
2362
|
-
const I =
|
|
2363
|
-
if (!Q)
|
|
2364
|
-
throw new Error("Cannot remove view: store not managed by ChunkManager");
|
|
2365
|
-
const C = Q.indexOf(A);
|
|
2366
|
-
if (C === -1)
|
|
2367
|
-
throw new Error(
|
|
2368
|
-
`Cannot remove view: view not found in store's view list (source: ${B})`
|
|
2369
|
-
);
|
|
2370
|
-
const E = Array.from(A.chunkViewStates.keys());
|
|
2371
|
-
Q.splice(C, 1);
|
|
2372
|
-
for (const i of E)
|
|
2373
|
-
this.aggregateChunkViewStates(i, I);
|
|
2374
|
-
Q.length === 0 && (this.stores_.delete(B), this.views_.delete(I));
|
|
2375
|
-
}
|
|
2376
|
-
async addSource(A) {
|
|
2377
|
-
const I = this.stores_.get(A) ?? this.pendingStores_.get(A);
|
|
2426
|
+
async getOrCreateStore(A) {
|
|
2427
|
+
const I = this.stores_.get(A);
|
|
2378
2428
|
if (I)
|
|
2379
2429
|
return I;
|
|
2380
|
-
const
|
|
2381
|
-
|
|
2382
|
-
return
|
|
2430
|
+
const B = this.pendingStores_.get(A);
|
|
2431
|
+
if (B)
|
|
2432
|
+
return B;
|
|
2433
|
+
const C = (async () => {
|
|
2434
|
+
const i = await A.open();
|
|
2435
|
+
return new PQ(i);
|
|
2383
2436
|
})();
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
for (const [I, B] of this.stores_)
|
|
2388
|
-
if (B === A)
|
|
2389
|
-
return I;
|
|
2390
|
-
throw new Error("Source not found for the given store.");
|
|
2437
|
+
this.pendingStores_.set(A, C);
|
|
2438
|
+
const E = await C;
|
|
2439
|
+
return this.stores_.set(A, E), this.pendingStores_.delete(A), E;
|
|
2391
2440
|
}
|
|
2392
2441
|
update() {
|
|
2393
2442
|
for (const [A, I] of this.stores_) {
|
|
2394
|
-
const B =
|
|
2443
|
+
const B = I.updateAndCollectChunkChanges();
|
|
2395
2444
|
for (const Q of B)
|
|
2396
2445
|
Q.priority === null ? this.queue_.cancel(Q) : Q.state === "queued" && this.queue_.enqueue(
|
|
2397
2446
|
Q,
|
|
@@ -2399,38 +2448,8 @@ class OQ {
|
|
|
2399
2448
|
);
|
|
2400
2449
|
}
|
|
2401
2450
|
this.queue_.flush();
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
const I = this.views_.get(A);
|
|
2405
|
-
if (!I) return /* @__PURE__ */ new Set();
|
|
2406
|
-
const B = /* @__PURE__ */ new Set();
|
|
2407
|
-
for (const Q of I)
|
|
2408
|
-
for (const [C, E] of Q.chunkViewStates)
|
|
2409
|
-
B.add(C);
|
|
2410
|
-
for (const Q of B)
|
|
2411
|
-
this.aggregateChunkViewStates(Q, A);
|
|
2412
|
-
return B;
|
|
2413
|
-
}
|
|
2414
|
-
aggregateChunkViewStates(A, I) {
|
|
2415
|
-
const B = this.views_.get(I);
|
|
2416
|
-
if (!B) return;
|
|
2417
|
-
let Q = !1, C = !1, E = null, i = null;
|
|
2418
|
-
for (const h of B) {
|
|
2419
|
-
const y = h.chunkViewStates.get(A);
|
|
2420
|
-
y && (y.visible && (Q = !0), y.prefetch && (C = !0), y.priority !== null && (E === null || y.priority < E) && (E = y.priority, i = y.orderKey), !y.visible && !y.prefetch && y.priority === null && h.maybeForgetChunk(A));
|
|
2421
|
-
}
|
|
2422
|
-
if (A.visible = Q, A.prefetch = C, A.priority = E, A.orderKey = i, A.priority !== null && A.state === "unloaded") {
|
|
2423
|
-
A.state = "queued";
|
|
2424
|
-
return;
|
|
2425
|
-
}
|
|
2426
|
-
if (A.priority === null && A.state === "queued") {
|
|
2427
|
-
A.state = "unloaded";
|
|
2428
|
-
return;
|
|
2429
|
-
}
|
|
2430
|
-
A.state === "loaded" && !A.visible && !A.prefetch && (A.data = void 0, A.state = "unloaded", A.priority = null, A.orderKey = null, A.prefetch = !1, U.debug(
|
|
2431
|
-
"ChunkManager",
|
|
2432
|
-
`Disposing chunk ${JSON.stringify(A.chunkIndex)} in LOD ${A.lod}`
|
|
2433
|
-
));
|
|
2451
|
+
for (const [A, I] of this.stores_)
|
|
2452
|
+
I.canDispose() && this.stores_.delete(A);
|
|
2434
2453
|
}
|
|
2435
2454
|
}
|
|
2436
2455
|
var ZA = function(g = 1) {
|
|
@@ -2477,11 +2496,11 @@ var ZA = function(g = 1) {
|
|
|
2477
2496
|
ZA.Panel = function(g, A, I, B) {
|
|
2478
2497
|
var Q = 1 / 0, C = 0, E = Math.round, i = E(window.devicePixelRatio || 1), o = E(80 * i * B), a = E(48 * i * B), D = E(3 * i * B), h = E(2 * i * B), y = E(3 * i * B), t = E(15 * i * B), F = E(74 * i * B), r = E(30 * i * B), S = document.createElement("canvas");
|
|
2479
2498
|
S.width = o, S.height = a, S.style.cssText = `width:${E(B * 80)}px;height:${E(B * 48)}px`;
|
|
2480
|
-
var
|
|
2481
|
-
return
|
|
2499
|
+
var e = S.getContext("2d");
|
|
2500
|
+
return e.font = "bold " + E(9 * i * B) + "px Helvetica,Arial,sans-serif", e.textBaseline = "top", e.fillStyle = I, e.fillRect(0, 0, o, a), e.fillStyle = A, e.fillText(g, D, h), e.fillRect(y, t, F, r), e.fillStyle = I, e.globalAlpha = 0.9, e.fillRect(y, t, F, r), {
|
|
2482
2501
|
dom: S,
|
|
2483
2502
|
update: function(c, N) {
|
|
2484
|
-
Q = Math.min(Q, c), C = Math.max(C, c),
|
|
2503
|
+
Q = Math.min(Q, c), C = Math.max(C, c), e.fillStyle = I, e.globalAlpha = 1, e.fillRect(0, 0, o, t), e.fillStyle = A, e.fillText(E(c) + " " + g + " (" + E(Q) + "-" + E(C) + ")", D, h), e.drawImage(S, y + i, t, F - i, r, y, t, F - i, r), e.fillRect(y + F - i, t, i, r), e.fillStyle = I, e.globalAlpha = 0.9, e.fillRect(y + F - i, t, i, E((1 - c / N) * r));
|
|
2485
2504
|
}
|
|
2486
2505
|
};
|
|
2487
2506
|
};
|
|
@@ -2934,8 +2953,8 @@ class QC {
|
|
|
2934
2953
|
}
|
|
2935
2954
|
targetTo(A) {
|
|
2936
2955
|
SQ(this.translation_, A) && (A = IA(A), A[2] += rA);
|
|
2937
|
-
const I =
|
|
2938
|
-
|
|
2956
|
+
const I = eQ(AA(), this.translation_, A, BC), B = aQ(hB(), I);
|
|
2957
|
+
nB(this.rotation_, B), og(this.rotation_, this.rotation_), this.dirty_ = !0;
|
|
2939
2958
|
}
|
|
2940
2959
|
get scale() {
|
|
2941
2960
|
return IA(this.scale_);
|
|
@@ -3024,7 +3043,7 @@ class JA {
|
|
|
3024
3043
|
this.normal = IA(A), this.signedDistance = I;
|
|
3025
3044
|
}
|
|
3026
3045
|
signedDistanceToPoint(A) {
|
|
3027
|
-
return
|
|
3046
|
+
return eB(this.normal, A) + this.signedDistance;
|
|
3028
3047
|
}
|
|
3029
3048
|
normalize() {
|
|
3030
3049
|
const A = yB(this.normal);
|
|
@@ -3103,7 +3122,7 @@ class rB extends mA {
|
|
|
3103
3122
|
}
|
|
3104
3123
|
get frustum() {
|
|
3105
3124
|
return new CC(
|
|
3106
|
-
|
|
3125
|
+
nI(AA(), this.projectionMatrix, this.viewMatrix)
|
|
3107
3126
|
);
|
|
3108
3127
|
}
|
|
3109
3128
|
pan(A) {
|
|
@@ -3162,7 +3181,7 @@ class so extends rB {
|
|
|
3162
3181
|
}
|
|
3163
3182
|
getWorldViewRect() {
|
|
3164
3183
|
let A = vI(-1, -1, 0, 1), I = vI(1, 1, 0, 1);
|
|
3165
|
-
const B =
|
|
3184
|
+
const B = nI(
|
|
3166
3185
|
AA(),
|
|
3167
3186
|
this.projectionMatrix,
|
|
3168
3187
|
this.viewMatrix
|
|
@@ -3512,7 +3531,7 @@ function oC(g) {
|
|
|
3512
3531
|
const [I, B] = A(0), [Q, C] = A(1), [E, i] = A(2);
|
|
3513
3532
|
return { xMin: I, xMax: B, yMin: Q, yMax: C, zMin: E, zMax: i };
|
|
3514
3533
|
}
|
|
3515
|
-
class
|
|
3534
|
+
class eo extends GA {
|
|
3516
3535
|
type = "TracksLayer";
|
|
3517
3536
|
tracks_ = [];
|
|
3518
3537
|
constructor(A = []) {
|
|
@@ -3599,14 +3618,14 @@ class RB extends pA {
|
|
|
3599
3618
|
for (let t = 0; t < D; ++t) {
|
|
3600
3619
|
const F = t * y;
|
|
3601
3620
|
for (let r = 0; r < a; ++r) {
|
|
3602
|
-
const S = r * h,
|
|
3621
|
+
const S = r * h, e = r / i, c = t / o, N = [S, F, 0], M = [0, 0, 1], Y = [e, c];
|
|
3603
3622
|
C.push(...N, ...M, ...Y);
|
|
3604
3623
|
}
|
|
3605
3624
|
}
|
|
3606
3625
|
for (let t = 0; t < o; ++t)
|
|
3607
3626
|
for (let F = 0; F < i; ++F) {
|
|
3608
|
-
const r = F + a * t, S = F + a * (t + 1),
|
|
3609
|
-
E.push(r, S, c), E.push(S,
|
|
3627
|
+
const r = F + a * t, S = F + a * (t + 1), e = F + 1 + a * (t + 1), c = F + 1 + a * t;
|
|
3628
|
+
E.push(r, S, c), E.push(S, e, c);
|
|
3610
3629
|
}
|
|
3611
3630
|
this.vertexData_ = new Float32Array(C), this.indexData_ = new Uint32Array(E), this.addAttribute({
|
|
3612
3631
|
type: "position",
|
|
@@ -3762,7 +3781,7 @@ function tC(g) {
|
|
|
3762
3781
|
if (g.type === "Texture2D")
|
|
3763
3782
|
return GC(g.dataType);
|
|
3764
3783
|
if (g.type === "Texture2DArray")
|
|
3765
|
-
return
|
|
3784
|
+
return eC(g.dataType);
|
|
3766
3785
|
throw new Error(`Unsupported image texture type: ${g.type}`);
|
|
3767
3786
|
}
|
|
3768
3787
|
function GC(g) {
|
|
@@ -3779,7 +3798,7 @@ function GC(g) {
|
|
|
3779
3798
|
return "floatScalarImage";
|
|
3780
3799
|
}
|
|
3781
3800
|
}
|
|
3782
|
-
function
|
|
3801
|
+
function eC(g) {
|
|
3783
3802
|
switch (g) {
|
|
3784
3803
|
case "byte":
|
|
3785
3804
|
case "int":
|
|
@@ -3867,7 +3886,7 @@ function hg(g, A, I, B, Q = 3) {
|
|
|
3867
3886
|
return A;
|
|
3868
3887
|
}
|
|
3869
3888
|
}
|
|
3870
|
-
class
|
|
3889
|
+
class nC {
|
|
3871
3890
|
bins_ = /* @__PURE__ */ new Map();
|
|
3872
3891
|
acquire(A) {
|
|
3873
3892
|
const B = this.bins_.get(A)?.pop();
|
|
@@ -3888,7 +3907,7 @@ class NB extends GA {
|
|
|
3888
3907
|
sliceCoords_;
|
|
3889
3908
|
onPickValue_;
|
|
3890
3909
|
visibleChunks_ = /* @__PURE__ */ new Map();
|
|
3891
|
-
pool_ = new
|
|
3910
|
+
pool_ = new nC();
|
|
3892
3911
|
initialChannelProps_;
|
|
3893
3912
|
channelChangeCallbacks_ = [];
|
|
3894
3913
|
policy_;
|
|
@@ -3927,7 +3946,7 @@ class NB extends GA {
|
|
|
3927
3946
|
);
|
|
3928
3947
|
}
|
|
3929
3948
|
onDetached(A) {
|
|
3930
|
-
this.releaseAndRemoveChunks(this.visibleChunks_.keys()), this.clearObjects(), this.chunkStoreView_ && (
|
|
3949
|
+
this.releaseAndRemoveChunks(this.visibleChunks_.keys()), this.clearObjects(), this.chunkStoreView_ && (this.chunkStoreView_.dispose(), this.chunkStoreView_ = void 0);
|
|
3931
3950
|
}
|
|
3932
3951
|
update(A) {
|
|
3933
3952
|
!A || !this.chunkStoreView_ || (this.chunkStoreView_.updateChunkStates(this.sliceCoords_, A.viewport), this.updateChunks(), this.resliceIfZChanged());
|
|
@@ -4168,15 +4187,15 @@ class wC extends pA {
|
|
|
4168
4187
|
});
|
|
4169
4188
|
}
|
|
4170
4189
|
buildFace(A, I, B, Q, C, E, i, o, a, D, h, y, t) {
|
|
4171
|
-
const F = E / a, r = i / D, S = E / 2,
|
|
4190
|
+
const F = E / a, r = i / D, S = E / 2, e = i / 2, c = o / 2 * h, N = a + 1, M = D + 1, Y = y.length / 8;
|
|
4172
4191
|
for (let J = 0; J < M; J++) {
|
|
4173
|
-
const W = -
|
|
4192
|
+
const W = -e + J * r;
|
|
4174
4193
|
for (let v = 0; v < N; v++) {
|
|
4175
4194
|
const Z = -S + v * F, P = { x: 0, y: 0, z: 0 };
|
|
4176
4195
|
P[A] = Z * Q, P[I] = W * C, P[B] = c;
|
|
4177
4196
|
const O = { x: 0, y: 0, z: 0 };
|
|
4178
4197
|
O[B] = h;
|
|
4179
|
-
const
|
|
4198
|
+
const eA = v / a, nA = 1 - J / D;
|
|
4180
4199
|
y.push(
|
|
4181
4200
|
P.x,
|
|
4182
4201
|
P.y,
|
|
@@ -4184,8 +4203,8 @@ class wC extends pA {
|
|
|
4184
4203
|
O.x,
|
|
4185
4204
|
O.y,
|
|
4186
4205
|
O.z,
|
|
4187
|
-
|
|
4188
|
-
|
|
4206
|
+
eA,
|
|
4207
|
+
nA
|
|
4189
4208
|
);
|
|
4190
4209
|
}
|
|
4191
4210
|
}
|
|
@@ -4218,7 +4237,7 @@ function rC(g) {
|
|
|
4218
4237
|
return "floatVolume";
|
|
4219
4238
|
}
|
|
4220
4239
|
}
|
|
4221
|
-
class
|
|
4240
|
+
class no extends GA {
|
|
4222
4241
|
type = "VolumeLayer";
|
|
4223
4242
|
constructor() {
|
|
4224
4243
|
super();
|
|
@@ -4870,7 +4889,7 @@ class cB {
|
|
|
4870
4889
|
yield this.get(A);
|
|
4871
4890
|
}
|
|
4872
4891
|
}
|
|
4873
|
-
class
|
|
4892
|
+
class eg {
|
|
4874
4893
|
_data;
|
|
4875
4894
|
chars;
|
|
4876
4895
|
#A;
|
|
@@ -5004,7 +5023,7 @@ function UB(g) {
|
|
|
5004
5023
|
let A = g.match(MC);
|
|
5005
5024
|
if (A) {
|
|
5006
5025
|
let [, B, Q] = A;
|
|
5007
|
-
return (B === "U" ? aI :
|
|
5026
|
+
return (B === "U" ? aI : eg).bind(null, Number(Q));
|
|
5008
5027
|
}
|
|
5009
5028
|
let I = YC[g];
|
|
5010
5029
|
if (!I)
|
|
@@ -5158,10 +5177,10 @@ class KI {
|
|
|
5158
5177
|
};
|
|
5159
5178
|
}
|
|
5160
5179
|
}
|
|
5161
|
-
class
|
|
5180
|
+
class ng {
|
|
5162
5181
|
kind = "bytes_to_bytes";
|
|
5163
5182
|
static fromConfig() {
|
|
5164
|
-
return new
|
|
5183
|
+
return new ng();
|
|
5165
5184
|
}
|
|
5166
5185
|
encode(A) {
|
|
5167
5186
|
throw new Error("Not implemented");
|
|
@@ -5240,7 +5259,7 @@ class wg {
|
|
|
5240
5259
|
}
|
|
5241
5260
|
}
|
|
5242
5261
|
function jg(g) {
|
|
5243
|
-
return g instanceof cB || g instanceof
|
|
5262
|
+
return g instanceof cB || g instanceof eg || g instanceof aI ? new Proxy(g, {
|
|
5244
5263
|
get(I, B) {
|
|
5245
5264
|
return I.get(Number(B));
|
|
5246
5265
|
},
|
|
@@ -5251,7 +5270,7 @@ function jg(g) {
|
|
|
5251
5270
|
}
|
|
5252
5271
|
function bC(g, A) {
|
|
5253
5272
|
let I;
|
|
5254
|
-
return g.data instanceof
|
|
5273
|
+
return g.data instanceof eg || g.data instanceof aI ? I = new g.constructor(
|
|
5255
5274
|
// @ts-expect-error
|
|
5256
5275
|
g.data.length,
|
|
5257
5276
|
g.data.chars
|
|
@@ -5322,7 +5341,7 @@ class rg {
|
|
|
5322
5341
|
}
|
|
5323
5342
|
}
|
|
5324
5343
|
function OC() {
|
|
5325
|
-
return (/* @__PURE__ */ new Map()).set("blosc", () => import("./blosc-BOWv2fO7.js").then((g) => g.default)).set("gzip", () => import("./gzip-DchmmbTG.js").then((g) => g.default)).set("lz4", () => import("./lz4-DUlZKApi.js").then((g) => g.default)).set("zlib", () => import("./zlib-Din1wO0I.js").then((g) => g.default)).set("zstd", () => import("./zstd-DnzmycJs.js").then((g) => g.default)).set("transpose", () => Fg).set("bytes", () => KI).set("crc32c", () =>
|
|
5344
|
+
return (/* @__PURE__ */ new Map()).set("blosc", () => import("./blosc-BOWv2fO7.js").then((g) => g.default)).set("gzip", () => import("./gzip-DchmmbTG.js").then((g) => g.default)).set("lz4", () => import("./lz4-DUlZKApi.js").then((g) => g.default)).set("zlib", () => import("./zlib-Din1wO0I.js").then((g) => g.default)).set("zstd", () => import("./zstd-DnzmycJs.js").then((g) => g.default)).set("transpose", () => Fg).set("bytes", () => KI).set("crc32c", () => ng).set("vlen-utf8", () => rg).set("json2", () => wg).set("bitround", () => Gg);
|
|
5326
5345
|
}
|
|
5327
5346
|
const VC = OC();
|
|
5328
5347
|
function Ag(g) {
|
|
@@ -5399,11 +5418,11 @@ function XC(g, A, I, B) {
|
|
|
5399
5418
|
}
|
|
5400
5419
|
if (h === null)
|
|
5401
5420
|
return;
|
|
5402
|
-
let { data: y, shape: t, stride: F } = h, r = o.map((c, N) => c % t[N]).reduce((c, N, M) => c + N * F[M], 0), S = y[r],
|
|
5403
|
-
if (!(S === _g &&
|
|
5421
|
+
let { data: y, shape: t, stride: F } = h, r = o.map((c, N) => c % t[N]).reduce((c, N, M) => c + N * F[M], 0), S = y[r], e = y[r + 1];
|
|
5422
|
+
if (!(S === _g && e === _g))
|
|
5404
5423
|
return Q(D, {
|
|
5405
5424
|
offset: Number(S),
|
|
5406
|
-
length: Number(
|
|
5425
|
+
length: Number(e)
|
|
5407
5426
|
});
|
|
5408
5427
|
};
|
|
5409
5428
|
}
|
|
@@ -5775,7 +5794,7 @@ function GE(g, A) {
|
|
|
5775
5794
|
let I = [];
|
|
5776
5795
|
return g === null ? I = A.map((B) => SI(null)) : Array.isArray(g) && (I = g.map((B) => B ?? SI(null))), hE(I, A), I;
|
|
5777
5796
|
}
|
|
5778
|
-
class
|
|
5797
|
+
class eE {
|
|
5779
5798
|
dim_indexers;
|
|
5780
5799
|
shape;
|
|
5781
5800
|
constructor({ selection: A, shape: I, chunk_shape: B }) {
|
|
@@ -5793,11 +5812,11 @@ class nE {
|
|
|
5793
5812
|
}
|
|
5794
5813
|
}
|
|
5795
5814
|
}
|
|
5796
|
-
function
|
|
5815
|
+
function nE(g, A) {
|
|
5797
5816
|
return "get" in g ? g.get(A) : g[A];
|
|
5798
5817
|
}
|
|
5799
5818
|
async function wE(g, A, I, B) {
|
|
5800
|
-
let Q = jC(g), C = new
|
|
5819
|
+
let Q = jC(g), C = new eE({
|
|
5801
5820
|
selection: A,
|
|
5802
5821
|
shape: g.shape,
|
|
5803
5822
|
chunk_shape: g.chunks
|
|
@@ -5807,7 +5826,7 @@ async function wE(g, A, I, B) {
|
|
|
5807
5826
|
let { data: D, shape: h, stride: y } = await g.getChunk(o, I.opts), t = B.prepare(D, h, y);
|
|
5808
5827
|
B.set_from_chunk(E, t, a);
|
|
5809
5828
|
});
|
|
5810
|
-
return await i.onIdle(), C.shape.length === 0 ?
|
|
5829
|
+
return await i.onIdle(), C.shape.length === 0 ? nE(E.data, 0) : E;
|
|
5811
5830
|
}
|
|
5812
5831
|
function Ng(g, A = 0, I) {
|
|
5813
5832
|
let B = I ?? g.length - A;
|
|
@@ -5902,8 +5921,8 @@ function tI(g, A, I, B) {
|
|
|
5902
5921
|
}
|
|
5903
5922
|
if (Q.to === null) {
|
|
5904
5923
|
if (C.length === 0) {
|
|
5905
|
-
let
|
|
5906
|
-
g.data.set(A.data.subarray(
|
|
5924
|
+
let e = Q.from * I;
|
|
5925
|
+
g.data.set(A.data.subarray(e, e + I), 0);
|
|
5907
5926
|
return;
|
|
5908
5927
|
}
|
|
5909
5928
|
tI(g, {
|
|
@@ -5915,22 +5934,22 @@ function tI(g, A, I, B) {
|
|
|
5915
5934
|
const [D, h, y] = Q.to, [t, F, r] = Q.from, S = JB(D, h, y);
|
|
5916
5935
|
if (C.length === 0) {
|
|
5917
5936
|
if (y === 1 && r === 1 && E === 1 && o === 1) {
|
|
5918
|
-
let
|
|
5919
|
-
g.data.set(A.data.subarray(
|
|
5937
|
+
let e = t * I, c = S * I;
|
|
5938
|
+
g.data.set(A.data.subarray(e, e + c), D * I);
|
|
5920
5939
|
return;
|
|
5921
5940
|
}
|
|
5922
|
-
for (let
|
|
5923
|
-
let c = o * (t + r *
|
|
5924
|
-
g.data.set(A.data.subarray(c, c + I), E * (D + y *
|
|
5941
|
+
for (let e = 0; e < S; e++) {
|
|
5942
|
+
let c = o * (t + r * e) * I;
|
|
5943
|
+
g.data.set(A.data.subarray(c, c + I), E * (D + y * e) * I);
|
|
5925
5944
|
}
|
|
5926
5945
|
return;
|
|
5927
5946
|
}
|
|
5928
|
-
for (let
|
|
5947
|
+
for (let e = 0; e < S; e++)
|
|
5929
5948
|
tI({
|
|
5930
|
-
data: g.data.subarray(E * (D +
|
|
5949
|
+
data: g.data.subarray(E * (D + e * y) * I),
|
|
5931
5950
|
stride: i
|
|
5932
5951
|
}, {
|
|
5933
|
-
data: A.data.subarray(o * (t +
|
|
5952
|
+
data: A.data.subarray(o * (t + e * r) * I),
|
|
5934
5953
|
stride: a
|
|
5935
5954
|
}, I, C);
|
|
5936
5955
|
}
|
|
@@ -6035,12 +6054,12 @@ class Ug extends uA {
|
|
|
6035
6054
|
x-amz-content-sha256:UNSIGNED-PAYLOAD
|
|
6036
6055
|
x-amz-date:${o}
|
|
6037
6056
|
` + (C ? `x-amz-security-token:${C}
|
|
6038
|
-
` : ""), r = C ? "host;x-amz-content-sha256;x-amz-date;x-amz-security-token" : "host;x-amz-content-sha256;x-amz-date", S = "UNSIGNED-PAYLOAD",
|
|
6057
|
+
` : ""), r = C ? "host;x-amz-content-sha256;x-amz-date;x-amz-security-token" : "host;x-amz-content-sha256;x-amz-date", S = "UNSIGNED-PAYLOAD", e = `${I}
|
|
6039
6058
|
${y}
|
|
6040
6059
|
${t}
|
|
6041
6060
|
${F}
|
|
6042
6061
|
${r}
|
|
6043
|
-
${S}`, c = "AWS4-HMAC-SHA256", N = `${a}/${E}/${i}/aws4_request`, M = await this.sha256(
|
|
6062
|
+
${S}`, c = "AWS4-HMAC-SHA256", N = `${a}/${E}/${i}/aws4_request`, M = await this.sha256(e), Y = `${c}
|
|
6044
6063
|
${o}
|
|
6045
6064
|
${N}
|
|
6046
6065
|
${M}`, J = await this.getSignatureKey(
|
|
@@ -10129,7 +10148,7 @@ class mE {
|
|
|
10129
10148
|
throw new Error(
|
|
10130
10149
|
"Invalid row alignment value. Possible values are 1, 2, 4, or 8"
|
|
10131
10150
|
);
|
|
10132
|
-
const a = (
|
|
10151
|
+
const a = (e, c) => typeof e == "number" ? e * c.scale + c.translation : e.start === null ? c.translation : e.start * c.scale + c.translation, D = this.dimensions_.x.lods[I], h = Q[this.dimensions_.x.index], y = a(h, D), t = Q[this.dimensions_.y.index], F = this.dimensions_.y.lods[I], r = a(t, F);
|
|
10133
10152
|
return {
|
|
10134
10153
|
state: "loaded",
|
|
10135
10154
|
lod: I,
|
|
@@ -10181,11 +10200,11 @@ function uE(g, A) {
|
|
|
10181
10200
|
const I = g.axes.map((h) => h.name), B = g.axes.length, Q = EB(I, "x"), C = EB(I, "y"), E = (h, y) => {
|
|
10182
10201
|
const t = [];
|
|
10183
10202
|
for (let F = 0; F < g.datasets.length; F++) {
|
|
10184
|
-
const r = g.datasets[F], S = A[F],
|
|
10203
|
+
const r = g.datasets[F], S = A[F], e = r.coordinateTransformations[0].scale, c = r.coordinateTransformations.length === 2 ? r.coordinateTransformations[1].translation : new Array(B).fill(0);
|
|
10185
10204
|
t.push({
|
|
10186
10205
|
size: S.shape[y],
|
|
10187
10206
|
chunkSize: S.chunks[y],
|
|
10188
|
-
scale:
|
|
10207
|
+
scale: e[y],
|
|
10189
10208
|
translation: c[y]
|
|
10190
10209
|
});
|
|
10191
10210
|
}
|
|
@@ -10478,7 +10497,7 @@ const cI = (g) => {
|
|
|
10478
10497
|
message: i
|
|
10479
10498
|
};
|
|
10480
10499
|
}, xE = [];
|
|
10481
|
-
function
|
|
10500
|
+
function n(g, A) {
|
|
10482
10501
|
const I = NI(), B = cI({
|
|
10483
10502
|
issueData: A,
|
|
10484
10503
|
data: g.data,
|
|
@@ -10843,7 +10862,7 @@ class $ extends K {
|
|
|
10843
10862
|
_parse(A) {
|
|
10844
10863
|
if (this._def.coerce && (A.data = String(A.data)), this._getType(A) !== w.string) {
|
|
10845
10864
|
const C = this._getOrReturnCtx(A);
|
|
10846
|
-
return
|
|
10865
|
+
return n(C, {
|
|
10847
10866
|
code: G.invalid_type,
|
|
10848
10867
|
expected: w.string,
|
|
10849
10868
|
received: C.parsedType
|
|
@@ -10853,7 +10872,7 @@ class $ extends K {
|
|
|
10853
10872
|
let Q;
|
|
10854
10873
|
for (const C of this._def.checks)
|
|
10855
10874
|
if (C.kind === "min")
|
|
10856
|
-
A.data.length < C.value && (Q = this._getOrReturnCtx(A, Q),
|
|
10875
|
+
A.data.length < C.value && (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10857
10876
|
code: G.too_small,
|
|
10858
10877
|
minimum: C.value,
|
|
10859
10878
|
type: "string",
|
|
@@ -10862,7 +10881,7 @@ class $ extends K {
|
|
|
10862
10881
|
message: C.message
|
|
10863
10882
|
}), B.dirty());
|
|
10864
10883
|
else if (C.kind === "max")
|
|
10865
|
-
A.data.length > C.value && (Q = this._getOrReturnCtx(A, Q),
|
|
10884
|
+
A.data.length > C.value && (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10866
10885
|
code: G.too_big,
|
|
10867
10886
|
maximum: C.value,
|
|
10868
10887
|
type: "string",
|
|
@@ -10872,14 +10891,14 @@ class $ extends K {
|
|
|
10872
10891
|
}), B.dirty());
|
|
10873
10892
|
else if (C.kind === "length") {
|
|
10874
10893
|
const E = A.data.length > C.value, i = A.data.length < C.value;
|
|
10875
|
-
(E || i) && (Q = this._getOrReturnCtx(A, Q), E ?
|
|
10894
|
+
(E || i) && (Q = this._getOrReturnCtx(A, Q), E ? n(Q, {
|
|
10876
10895
|
code: G.too_big,
|
|
10877
10896
|
maximum: C.value,
|
|
10878
10897
|
type: "string",
|
|
10879
10898
|
inclusive: !0,
|
|
10880
10899
|
exact: !0,
|
|
10881
10900
|
message: C.message
|
|
10882
|
-
}) : i &&
|
|
10901
|
+
}) : i && n(Q, {
|
|
10883
10902
|
code: G.too_small,
|
|
10884
10903
|
minimum: C.value,
|
|
10885
10904
|
type: "string",
|
|
@@ -10888,43 +10907,43 @@ class $ extends K {
|
|
|
10888
10907
|
message: C.message
|
|
10889
10908
|
}), B.dirty());
|
|
10890
10909
|
} else if (C.kind === "email")
|
|
10891
|
-
jE.test(A.data) || (Q = this._getOrReturnCtx(A, Q),
|
|
10910
|
+
jE.test(A.data) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10892
10911
|
validation: "email",
|
|
10893
10912
|
code: G.invalid_string,
|
|
10894
10913
|
message: C.message
|
|
10895
10914
|
}), B.dirty());
|
|
10896
10915
|
else if (C.kind === "emoji")
|
|
10897
|
-
OI || (OI = new RegExp(zE, "u")), OI.test(A.data) || (Q = this._getOrReturnCtx(A, Q),
|
|
10916
|
+
OI || (OI = new RegExp(zE, "u")), OI.test(A.data) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10898
10917
|
validation: "emoji",
|
|
10899
10918
|
code: G.invalid_string,
|
|
10900
10919
|
message: C.message
|
|
10901
10920
|
}), B.dirty());
|
|
10902
10921
|
else if (C.kind === "uuid")
|
|
10903
|
-
OE.test(A.data) || (Q = this._getOrReturnCtx(A, Q),
|
|
10922
|
+
OE.test(A.data) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10904
10923
|
validation: "uuid",
|
|
10905
10924
|
code: G.invalid_string,
|
|
10906
10925
|
message: C.message
|
|
10907
10926
|
}), B.dirty());
|
|
10908
10927
|
else if (C.kind === "nanoid")
|
|
10909
|
-
VE.test(A.data) || (Q = this._getOrReturnCtx(A, Q),
|
|
10928
|
+
VE.test(A.data) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10910
10929
|
validation: "nanoid",
|
|
10911
10930
|
code: G.invalid_string,
|
|
10912
10931
|
message: C.message
|
|
10913
10932
|
}), B.dirty());
|
|
10914
10933
|
else if (C.kind === "cuid")
|
|
10915
|
-
bE.test(A.data) || (Q = this._getOrReturnCtx(A, Q),
|
|
10934
|
+
bE.test(A.data) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10916
10935
|
validation: "cuid",
|
|
10917
10936
|
code: G.invalid_string,
|
|
10918
10937
|
message: C.message
|
|
10919
10938
|
}), B.dirty());
|
|
10920
10939
|
else if (C.kind === "cuid2")
|
|
10921
|
-
ZE.test(A.data) || (Q = this._getOrReturnCtx(A, Q),
|
|
10940
|
+
ZE.test(A.data) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10922
10941
|
validation: "cuid2",
|
|
10923
10942
|
code: G.invalid_string,
|
|
10924
10943
|
message: C.message
|
|
10925
10944
|
}), B.dirty());
|
|
10926
10945
|
else if (C.kind === "ulid")
|
|
10927
|
-
PE.test(A.data) || (Q = this._getOrReturnCtx(A, Q),
|
|
10946
|
+
PE.test(A.data) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10928
10947
|
validation: "ulid",
|
|
10929
10948
|
code: G.invalid_string,
|
|
10930
10949
|
message: C.message
|
|
@@ -10933,61 +10952,61 @@ class $ extends K {
|
|
|
10933
10952
|
try {
|
|
10934
10953
|
new URL(A.data);
|
|
10935
10954
|
} catch {
|
|
10936
|
-
Q = this._getOrReturnCtx(A, Q),
|
|
10955
|
+
Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10937
10956
|
validation: "url",
|
|
10938
10957
|
code: G.invalid_string,
|
|
10939
10958
|
message: C.message
|
|
10940
10959
|
}), B.dirty();
|
|
10941
10960
|
}
|
|
10942
|
-
else C.kind === "regex" ? (C.regex.lastIndex = 0, C.regex.test(A.data) || (Q = this._getOrReturnCtx(A, Q),
|
|
10961
|
+
else C.kind === "regex" ? (C.regex.lastIndex = 0, C.regex.test(A.data) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10943
10962
|
validation: "regex",
|
|
10944
10963
|
code: G.invalid_string,
|
|
10945
10964
|
message: C.message
|
|
10946
|
-
}), B.dirty())) : C.kind === "trim" ? A.data = A.data.trim() : C.kind === "includes" ? A.data.includes(C.value, C.position) || (Q = this._getOrReturnCtx(A, Q),
|
|
10965
|
+
}), B.dirty())) : C.kind === "trim" ? A.data = A.data.trim() : C.kind === "includes" ? A.data.includes(C.value, C.position) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10947
10966
|
code: G.invalid_string,
|
|
10948
10967
|
validation: { includes: C.value, position: C.position },
|
|
10949
10968
|
message: C.message
|
|
10950
|
-
}), B.dirty()) : C.kind === "toLowerCase" ? A.data = A.data.toLowerCase() : C.kind === "toUpperCase" ? A.data = A.data.toUpperCase() : C.kind === "startsWith" ? A.data.startsWith(C.value) || (Q = this._getOrReturnCtx(A, Q),
|
|
10969
|
+
}), B.dirty()) : C.kind === "toLowerCase" ? A.data = A.data.toLowerCase() : C.kind === "toUpperCase" ? A.data = A.data.toUpperCase() : C.kind === "startsWith" ? A.data.startsWith(C.value) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10951
10970
|
code: G.invalid_string,
|
|
10952
10971
|
validation: { startsWith: C.value },
|
|
10953
10972
|
message: C.message
|
|
10954
|
-
}), B.dirty()) : C.kind === "endsWith" ? A.data.endsWith(C.value) || (Q = this._getOrReturnCtx(A, Q),
|
|
10973
|
+
}), B.dirty()) : C.kind === "endsWith" ? A.data.endsWith(C.value) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10955
10974
|
code: G.invalid_string,
|
|
10956
10975
|
validation: { endsWith: C.value },
|
|
10957
10976
|
message: C.message
|
|
10958
|
-
}), B.dirty()) : C.kind === "datetime" ? mB(C).test(A.data) || (Q = this._getOrReturnCtx(A, Q),
|
|
10977
|
+
}), B.dirty()) : C.kind === "datetime" ? mB(C).test(A.data) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10959
10978
|
code: G.invalid_string,
|
|
10960
10979
|
validation: "datetime",
|
|
10961
10980
|
message: C.message
|
|
10962
|
-
}), B.dirty()) : C.kind === "date" ? Qi.test(A.data) || (Q = this._getOrReturnCtx(A, Q),
|
|
10981
|
+
}), B.dirty()) : C.kind === "date" ? Qi.test(A.data) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10963
10982
|
code: G.invalid_string,
|
|
10964
10983
|
validation: "date",
|
|
10965
10984
|
message: C.message
|
|
10966
|
-
}), B.dirty()) : C.kind === "time" ? Ci(C).test(A.data) || (Q = this._getOrReturnCtx(A, Q),
|
|
10985
|
+
}), B.dirty()) : C.kind === "time" ? Ci(C).test(A.data) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10967
10986
|
code: G.invalid_string,
|
|
10968
10987
|
validation: "time",
|
|
10969
10988
|
message: C.message
|
|
10970
|
-
}), B.dirty()) : C.kind === "duration" ? XE.test(A.data) || (Q = this._getOrReturnCtx(A, Q),
|
|
10989
|
+
}), B.dirty()) : C.kind === "duration" ? XE.test(A.data) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10971
10990
|
validation: "duration",
|
|
10972
10991
|
code: G.invalid_string,
|
|
10973
10992
|
message: C.message
|
|
10974
|
-
}), B.dirty()) : C.kind === "ip" ? Ei(A.data, C.version) || (Q = this._getOrReturnCtx(A, Q),
|
|
10993
|
+
}), B.dirty()) : C.kind === "ip" ? Ei(A.data, C.version) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10975
10994
|
validation: "ip",
|
|
10976
10995
|
code: G.invalid_string,
|
|
10977
10996
|
message: C.message
|
|
10978
|
-
}), B.dirty()) : C.kind === "jwt" ? ii(A.data, C.alg) || (Q = this._getOrReturnCtx(A, Q),
|
|
10997
|
+
}), B.dirty()) : C.kind === "jwt" ? ii(A.data, C.alg) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10979
10998
|
validation: "jwt",
|
|
10980
10999
|
code: G.invalid_string,
|
|
10981
11000
|
message: C.message
|
|
10982
|
-
}), B.dirty()) : C.kind === "cidr" ? oi(A.data, C.version) || (Q = this._getOrReturnCtx(A, Q),
|
|
11001
|
+
}), B.dirty()) : C.kind === "cidr" ? oi(A.data, C.version) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10983
11002
|
validation: "cidr",
|
|
10984
11003
|
code: G.invalid_string,
|
|
10985
11004
|
message: C.message
|
|
10986
|
-
}), B.dirty()) : C.kind === "base64" ? gi.test(A.data) || (Q = this._getOrReturnCtx(A, Q),
|
|
11005
|
+
}), B.dirty()) : C.kind === "base64" ? gi.test(A.data) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10987
11006
|
validation: "base64",
|
|
10988
11007
|
code: G.invalid_string,
|
|
10989
11008
|
message: C.message
|
|
10990
|
-
}), B.dirty()) : C.kind === "base64url" ? Bi.test(A.data) || (Q = this._getOrReturnCtx(A, Q),
|
|
11009
|
+
}), B.dirty()) : C.kind === "base64url" ? Bi.test(A.data) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10991
11010
|
validation: "base64url",
|
|
10992
11011
|
code: G.invalid_string,
|
|
10993
11012
|
message: C.message
|
|
@@ -11237,7 +11256,7 @@ class sA extends K {
|
|
|
11237
11256
|
_parse(A) {
|
|
11238
11257
|
if (this._def.coerce && (A.data = Number(A.data)), this._getType(A) !== w.number) {
|
|
11239
11258
|
const C = this._getOrReturnCtx(A);
|
|
11240
|
-
return
|
|
11259
|
+
return n(C, {
|
|
11241
11260
|
code: G.invalid_type,
|
|
11242
11261
|
expected: w.number,
|
|
11243
11262
|
received: C.parsedType
|
|
@@ -11246,30 +11265,30 @@ class sA extends K {
|
|
|
11246
11265
|
let B;
|
|
11247
11266
|
const Q = new b();
|
|
11248
11267
|
for (const C of this._def.checks)
|
|
11249
|
-
C.kind === "int" ? H.isInteger(A.data) || (B = this._getOrReturnCtx(A, B),
|
|
11268
|
+
C.kind === "int" ? H.isInteger(A.data) || (B = this._getOrReturnCtx(A, B), n(B, {
|
|
11250
11269
|
code: G.invalid_type,
|
|
11251
11270
|
expected: "integer",
|
|
11252
11271
|
received: "float",
|
|
11253
11272
|
message: C.message
|
|
11254
|
-
}), Q.dirty()) : C.kind === "min" ? (C.inclusive ? A.data < C.value : A.data <= C.value) && (B = this._getOrReturnCtx(A, B),
|
|
11273
|
+
}), Q.dirty()) : C.kind === "min" ? (C.inclusive ? A.data < C.value : A.data <= C.value) && (B = this._getOrReturnCtx(A, B), n(B, {
|
|
11255
11274
|
code: G.too_small,
|
|
11256
11275
|
minimum: C.value,
|
|
11257
11276
|
type: "number",
|
|
11258
11277
|
inclusive: C.inclusive,
|
|
11259
11278
|
exact: !1,
|
|
11260
11279
|
message: C.message
|
|
11261
|
-
}), Q.dirty()) : C.kind === "max" ? (C.inclusive ? A.data > C.value : A.data >= C.value) && (B = this._getOrReturnCtx(A, B),
|
|
11280
|
+
}), Q.dirty()) : C.kind === "max" ? (C.inclusive ? A.data > C.value : A.data >= C.value) && (B = this._getOrReturnCtx(A, B), n(B, {
|
|
11262
11281
|
code: G.too_big,
|
|
11263
11282
|
maximum: C.value,
|
|
11264
11283
|
type: "number",
|
|
11265
11284
|
inclusive: C.inclusive,
|
|
11266
11285
|
exact: !1,
|
|
11267
11286
|
message: C.message
|
|
11268
|
-
}), Q.dirty()) : C.kind === "multipleOf" ? ai(A.data, C.value) !== 0 && (B = this._getOrReturnCtx(A, B),
|
|
11287
|
+
}), Q.dirty()) : C.kind === "multipleOf" ? ai(A.data, C.value) !== 0 && (B = this._getOrReturnCtx(A, B), n(B, {
|
|
11269
11288
|
code: G.not_multiple_of,
|
|
11270
11289
|
multipleOf: C.value,
|
|
11271
11290
|
message: C.message
|
|
11272
|
-
}), Q.dirty()) : C.kind === "finite" ? Number.isFinite(A.data) || (B = this._getOrReturnCtx(A, B),
|
|
11291
|
+
}), Q.dirty()) : C.kind === "finite" ? Number.isFinite(A.data) || (B = this._getOrReturnCtx(A, B), n(B, {
|
|
11273
11292
|
code: G.not_finite,
|
|
11274
11293
|
message: C.message
|
|
11275
11294
|
}), Q.dirty()) : H.assertNever(C);
|
|
@@ -11418,19 +11437,19 @@ class hA extends K {
|
|
|
11418
11437
|
let B;
|
|
11419
11438
|
const Q = new b();
|
|
11420
11439
|
for (const C of this._def.checks)
|
|
11421
|
-
C.kind === "min" ? (C.inclusive ? A.data < C.value : A.data <= C.value) && (B = this._getOrReturnCtx(A, B),
|
|
11440
|
+
C.kind === "min" ? (C.inclusive ? A.data < C.value : A.data <= C.value) && (B = this._getOrReturnCtx(A, B), n(B, {
|
|
11422
11441
|
code: G.too_small,
|
|
11423
11442
|
type: "bigint",
|
|
11424
11443
|
minimum: C.value,
|
|
11425
11444
|
inclusive: C.inclusive,
|
|
11426
11445
|
message: C.message
|
|
11427
|
-
}), Q.dirty()) : C.kind === "max" ? (C.inclusive ? A.data > C.value : A.data >= C.value) && (B = this._getOrReturnCtx(A, B),
|
|
11446
|
+
}), Q.dirty()) : C.kind === "max" ? (C.inclusive ? A.data > C.value : A.data >= C.value) && (B = this._getOrReturnCtx(A, B), n(B, {
|
|
11428
11447
|
code: G.too_big,
|
|
11429
11448
|
type: "bigint",
|
|
11430
11449
|
maximum: C.value,
|
|
11431
11450
|
inclusive: C.inclusive,
|
|
11432
11451
|
message: C.message
|
|
11433
|
-
}), Q.dirty()) : C.kind === "multipleOf" ? A.data % C.value !== BigInt(0) && (B = this._getOrReturnCtx(A, B),
|
|
11452
|
+
}), Q.dirty()) : C.kind === "multipleOf" ? A.data % C.value !== BigInt(0) && (B = this._getOrReturnCtx(A, B), n(B, {
|
|
11434
11453
|
code: G.not_multiple_of,
|
|
11435
11454
|
multipleOf: C.value,
|
|
11436
11455
|
message: C.message
|
|
@@ -11439,7 +11458,7 @@ class hA extends K {
|
|
|
11439
11458
|
}
|
|
11440
11459
|
_getInvalidInput(A) {
|
|
11441
11460
|
const I = this._getOrReturnCtx(A);
|
|
11442
|
-
return
|
|
11461
|
+
return n(I, {
|
|
11443
11462
|
code: G.invalid_type,
|
|
11444
11463
|
expected: w.bigint,
|
|
11445
11464
|
received: I.parsedType
|
|
@@ -11542,7 +11561,7 @@ class XA extends K {
|
|
|
11542
11561
|
_parse(A) {
|
|
11543
11562
|
if (this._def.coerce && (A.data = !!A.data), this._getType(A) !== w.boolean) {
|
|
11544
11563
|
const B = this._getOrReturnCtx(A);
|
|
11545
|
-
return
|
|
11564
|
+
return n(B, {
|
|
11546
11565
|
code: G.invalid_type,
|
|
11547
11566
|
expected: w.boolean,
|
|
11548
11567
|
received: B.parsedType
|
|
@@ -11560,7 +11579,7 @@ class UA extends K {
|
|
|
11560
11579
|
_parse(A) {
|
|
11561
11580
|
if (this._def.coerce && (A.data = new Date(A.data)), this._getType(A) !== w.date) {
|
|
11562
11581
|
const C = this._getOrReturnCtx(A);
|
|
11563
|
-
return
|
|
11582
|
+
return n(C, {
|
|
11564
11583
|
code: G.invalid_type,
|
|
11565
11584
|
expected: w.date,
|
|
11566
11585
|
received: C.parsedType
|
|
@@ -11568,21 +11587,21 @@ class UA extends K {
|
|
|
11568
11587
|
}
|
|
11569
11588
|
if (isNaN(A.data.getTime())) {
|
|
11570
11589
|
const C = this._getOrReturnCtx(A);
|
|
11571
|
-
return
|
|
11590
|
+
return n(C, {
|
|
11572
11591
|
code: G.invalid_date
|
|
11573
11592
|
}), L;
|
|
11574
11593
|
}
|
|
11575
11594
|
const B = new b();
|
|
11576
11595
|
let Q;
|
|
11577
11596
|
for (const C of this._def.checks)
|
|
11578
|
-
C.kind === "min" ? A.data.getTime() < C.value && (Q = this._getOrReturnCtx(A, Q),
|
|
11597
|
+
C.kind === "min" ? A.data.getTime() < C.value && (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
11579
11598
|
code: G.too_small,
|
|
11580
11599
|
message: C.message,
|
|
11581
11600
|
inclusive: !0,
|
|
11582
11601
|
exact: !1,
|
|
11583
11602
|
minimum: C.value,
|
|
11584
11603
|
type: "date"
|
|
11585
|
-
}), B.dirty()) : C.kind === "max" ? A.data.getTime() > C.value && (Q = this._getOrReturnCtx(A, Q),
|
|
11604
|
+
}), B.dirty()) : C.kind === "max" ? A.data.getTime() > C.value && (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
11586
11605
|
code: G.too_big,
|
|
11587
11606
|
message: C.message,
|
|
11588
11607
|
inclusive: !0,
|
|
@@ -11638,7 +11657,7 @@ class kI extends K {
|
|
|
11638
11657
|
_parse(A) {
|
|
11639
11658
|
if (this._getType(A) !== w.symbol) {
|
|
11640
11659
|
const B = this._getOrReturnCtx(A);
|
|
11641
|
-
return
|
|
11660
|
+
return n(B, {
|
|
11642
11661
|
code: G.invalid_type,
|
|
11643
11662
|
expected: w.symbol,
|
|
11644
11663
|
received: B.parsedType
|
|
@@ -11655,7 +11674,7 @@ class jA extends K {
|
|
|
11655
11674
|
_parse(A) {
|
|
11656
11675
|
if (this._getType(A) !== w.undefined) {
|
|
11657
11676
|
const B = this._getOrReturnCtx(A);
|
|
11658
|
-
return
|
|
11677
|
+
return n(B, {
|
|
11659
11678
|
code: G.invalid_type,
|
|
11660
11679
|
expected: w.undefined,
|
|
11661
11680
|
received: B.parsedType
|
|
@@ -11672,7 +11691,7 @@ class zA extends K {
|
|
|
11672
11691
|
_parse(A) {
|
|
11673
11692
|
if (this._getType(A) !== w.null) {
|
|
11674
11693
|
const B = this._getOrReturnCtx(A);
|
|
11675
|
-
return
|
|
11694
|
+
return n(B, {
|
|
11676
11695
|
code: G.invalid_type,
|
|
11677
11696
|
expected: w.null,
|
|
11678
11697
|
received: B.parsedType
|
|
@@ -11712,7 +11731,7 @@ SA.create = (g) => new SA({
|
|
|
11712
11731
|
class DA extends K {
|
|
11713
11732
|
_parse(A) {
|
|
11714
11733
|
const I = this._getOrReturnCtx(A);
|
|
11715
|
-
return
|
|
11734
|
+
return n(I, {
|
|
11716
11735
|
code: G.invalid_type,
|
|
11717
11736
|
expected: w.never,
|
|
11718
11737
|
received: I.parsedType
|
|
@@ -11727,7 +11746,7 @@ class LI extends K {
|
|
|
11727
11746
|
_parse(A) {
|
|
11728
11747
|
if (this._getType(A) !== w.undefined) {
|
|
11729
11748
|
const B = this._getOrReturnCtx(A);
|
|
11730
|
-
return
|
|
11749
|
+
return n(B, {
|
|
11731
11750
|
code: G.invalid_type,
|
|
11732
11751
|
expected: w.void,
|
|
11733
11752
|
received: B.parsedType
|
|
@@ -11744,14 +11763,14 @@ class BA extends K {
|
|
|
11744
11763
|
_parse(A) {
|
|
11745
11764
|
const { ctx: I, status: B } = this._processInputParams(A), Q = this._def;
|
|
11746
11765
|
if (I.parsedType !== w.array)
|
|
11747
|
-
return
|
|
11766
|
+
return n(I, {
|
|
11748
11767
|
code: G.invalid_type,
|
|
11749
11768
|
expected: w.array,
|
|
11750
11769
|
received: I.parsedType
|
|
11751
11770
|
}), L;
|
|
11752
11771
|
if (Q.exactLength !== null) {
|
|
11753
11772
|
const E = I.data.length > Q.exactLength.value, i = I.data.length < Q.exactLength.value;
|
|
11754
|
-
(E || i) && (
|
|
11773
|
+
(E || i) && (n(I, {
|
|
11755
11774
|
code: E ? G.too_big : G.too_small,
|
|
11756
11775
|
minimum: i ? Q.exactLength.value : void 0,
|
|
11757
11776
|
maximum: E ? Q.exactLength.value : void 0,
|
|
@@ -11761,14 +11780,14 @@ class BA extends K {
|
|
|
11761
11780
|
message: Q.exactLength.message
|
|
11762
11781
|
}), B.dirty());
|
|
11763
11782
|
}
|
|
11764
|
-
if (Q.minLength !== null && I.data.length < Q.minLength.value && (
|
|
11783
|
+
if (Q.minLength !== null && I.data.length < Q.minLength.value && (n(I, {
|
|
11765
11784
|
code: G.too_small,
|
|
11766
11785
|
minimum: Q.minLength.value,
|
|
11767
11786
|
type: "array",
|
|
11768
11787
|
inclusive: !0,
|
|
11769
11788
|
exact: !1,
|
|
11770
11789
|
message: Q.minLength.message
|
|
11771
|
-
}), B.dirty()), Q.maxLength !== null && I.data.length > Q.maxLength.value && (
|
|
11790
|
+
}), B.dirty()), Q.maxLength !== null && I.data.length > Q.maxLength.value && (n(I, {
|
|
11772
11791
|
code: G.too_big,
|
|
11773
11792
|
maximum: Q.maxLength.value,
|
|
11774
11793
|
type: "array",
|
|
@@ -11842,7 +11861,7 @@ class f extends K {
|
|
|
11842
11861
|
_parse(A) {
|
|
11843
11862
|
if (this._getType(A) !== w.object) {
|
|
11844
11863
|
const a = this._getOrReturnCtx(A);
|
|
11845
|
-
return
|
|
11864
|
+
return n(a, {
|
|
11846
11865
|
code: G.invalid_type,
|
|
11847
11866
|
expected: w.object,
|
|
11848
11867
|
received: a.parsedType
|
|
@@ -11870,7 +11889,7 @@ class f extends K {
|
|
|
11870
11889
|
value: { status: "valid", value: Q.data[D] }
|
|
11871
11890
|
});
|
|
11872
11891
|
else if (a === "strict")
|
|
11873
|
-
i.length > 0 && (
|
|
11892
|
+
i.length > 0 && (n(Q, {
|
|
11874
11893
|
code: G.unrecognized_keys,
|
|
11875
11894
|
keys: i
|
|
11876
11895
|
}), B.dirty());
|
|
@@ -12127,7 +12146,7 @@ class _A extends K {
|
|
|
12127
12146
|
if (i.result.status === "dirty")
|
|
12128
12147
|
return I.common.issues.push(...i.ctx.common.issues), i.result;
|
|
12129
12148
|
const E = C.map((i) => new j(i.ctx.common.issues));
|
|
12130
|
-
return
|
|
12149
|
+
return n(I, {
|
|
12131
12150
|
code: G.invalid_union,
|
|
12132
12151
|
unionErrors: E
|
|
12133
12152
|
}), L;
|
|
@@ -12174,7 +12193,7 @@ class _A extends K {
|
|
|
12174
12193
|
if (C)
|
|
12175
12194
|
return I.common.issues.push(...C.ctx.common.issues), C.result;
|
|
12176
12195
|
const i = E.map((o) => new j(o));
|
|
12177
|
-
return
|
|
12196
|
+
return n(I, {
|
|
12178
12197
|
code: G.invalid_union,
|
|
12179
12198
|
unionErrors: i
|
|
12180
12199
|
}), L;
|
|
@@ -12194,7 +12213,7 @@ class qI extends K {
|
|
|
12194
12213
|
_parse(A) {
|
|
12195
12214
|
const { ctx: I } = this._processInputParams(A);
|
|
12196
12215
|
if (I.parsedType !== w.object)
|
|
12197
|
-
return
|
|
12216
|
+
return n(I, {
|
|
12198
12217
|
code: G.invalid_type,
|
|
12199
12218
|
expected: w.object,
|
|
12200
12219
|
received: I.parsedType
|
|
@@ -12208,7 +12227,7 @@ class qI extends K {
|
|
|
12208
12227
|
data: I.data,
|
|
12209
12228
|
path: I.path,
|
|
12210
12229
|
parent: I
|
|
12211
|
-
}) : (
|
|
12230
|
+
}) : (n(I, {
|
|
12212
12231
|
code: G.invalid_union_discriminator,
|
|
12213
12232
|
options: Array.from(this.optionsMap.keys()),
|
|
12214
12233
|
path: [B]
|
|
@@ -12284,7 +12303,7 @@ class $A extends K {
|
|
|
12284
12303
|
if (Bg(C) || Bg(E))
|
|
12285
12304
|
return L;
|
|
12286
12305
|
const i = Cg(C.value, E.value);
|
|
12287
|
-
return i.valid ? ((Qg(C) || Qg(E)) && I.dirty(), { status: I.value, value: i.data }) : (
|
|
12306
|
+
return i.valid ? ((Qg(C) || Qg(E)) && I.dirty(), { status: I.value, value: i.data }) : (n(B, {
|
|
12288
12307
|
code: G.invalid_intersection_types
|
|
12289
12308
|
}), L);
|
|
12290
12309
|
};
|
|
@@ -12320,20 +12339,20 @@ class iA extends K {
|
|
|
12320
12339
|
_parse(A) {
|
|
12321
12340
|
const { status: I, ctx: B } = this._processInputParams(A);
|
|
12322
12341
|
if (B.parsedType !== w.array)
|
|
12323
|
-
return
|
|
12342
|
+
return n(B, {
|
|
12324
12343
|
code: G.invalid_type,
|
|
12325
12344
|
expected: w.array,
|
|
12326
12345
|
received: B.parsedType
|
|
12327
12346
|
}), L;
|
|
12328
12347
|
if (B.data.length < this._def.items.length)
|
|
12329
|
-
return
|
|
12348
|
+
return n(B, {
|
|
12330
12349
|
code: G.too_small,
|
|
12331
12350
|
minimum: this._def.items.length,
|
|
12332
12351
|
inclusive: !0,
|
|
12333
12352
|
exact: !1,
|
|
12334
12353
|
type: "array"
|
|
12335
12354
|
}), L;
|
|
12336
|
-
!this._def.rest && B.data.length > this._def.items.length && (
|
|
12355
|
+
!this._def.rest && B.data.length > this._def.items.length && (n(B, {
|
|
12337
12356
|
code: G.too_big,
|
|
12338
12357
|
maximum: this._def.items.length,
|
|
12339
12358
|
inclusive: !0,
|
|
@@ -12376,7 +12395,7 @@ class AI extends K {
|
|
|
12376
12395
|
_parse(A) {
|
|
12377
12396
|
const { status: I, ctx: B } = this._processInputParams(A);
|
|
12378
12397
|
if (B.parsedType !== w.object)
|
|
12379
|
-
return
|
|
12398
|
+
return n(B, {
|
|
12380
12399
|
code: G.invalid_type,
|
|
12381
12400
|
expected: w.object,
|
|
12382
12401
|
received: B.parsedType
|
|
@@ -12417,7 +12436,7 @@ class JI extends K {
|
|
|
12417
12436
|
_parse(A) {
|
|
12418
12437
|
const { status: I, ctx: B } = this._processInputParams(A);
|
|
12419
12438
|
if (B.parsedType !== w.map)
|
|
12420
|
-
return
|
|
12439
|
+
return n(B, {
|
|
12421
12440
|
code: G.invalid_type,
|
|
12422
12441
|
expected: w.map,
|
|
12423
12442
|
received: B.parsedType
|
|
@@ -12459,20 +12478,20 @@ class kA extends K {
|
|
|
12459
12478
|
_parse(A) {
|
|
12460
12479
|
const { status: I, ctx: B } = this._processInputParams(A);
|
|
12461
12480
|
if (B.parsedType !== w.set)
|
|
12462
|
-
return
|
|
12481
|
+
return n(B, {
|
|
12463
12482
|
code: G.invalid_type,
|
|
12464
12483
|
expected: w.set,
|
|
12465
12484
|
received: B.parsedType
|
|
12466
12485
|
}), L;
|
|
12467
12486
|
const Q = this._def;
|
|
12468
|
-
Q.minSize !== null && B.data.size < Q.minSize.value && (
|
|
12487
|
+
Q.minSize !== null && B.data.size < Q.minSize.value && (n(B, {
|
|
12469
12488
|
code: G.too_small,
|
|
12470
12489
|
minimum: Q.minSize.value,
|
|
12471
12490
|
type: "set",
|
|
12472
12491
|
inclusive: !0,
|
|
12473
12492
|
exact: !1,
|
|
12474
12493
|
message: Q.minSize.message
|
|
12475
|
-
}), I.dirty()), Q.maxSize !== null && B.data.size > Q.maxSize.value && (
|
|
12494
|
+
}), I.dirty()), Q.maxSize !== null && B.data.size > Q.maxSize.value && (n(B, {
|
|
12476
12495
|
code: G.too_big,
|
|
12477
12496
|
maximum: Q.maxSize.value,
|
|
12478
12497
|
type: "set",
|
|
@@ -12526,7 +12545,7 @@ class dA extends K {
|
|
|
12526
12545
|
_parse(A) {
|
|
12527
12546
|
const { ctx: I } = this._processInputParams(A);
|
|
12528
12547
|
if (I.parsedType !== w.function)
|
|
12529
|
-
return
|
|
12548
|
+
return n(I, {
|
|
12530
12549
|
code: G.invalid_type,
|
|
12531
12550
|
expected: w.function,
|
|
12532
12551
|
received: I.parsedType
|
|
@@ -12638,7 +12657,7 @@ class gI extends K {
|
|
|
12638
12657
|
_parse(A) {
|
|
12639
12658
|
if (A.data !== this._def.value) {
|
|
12640
12659
|
const I = this._getOrReturnCtx(A);
|
|
12641
|
-
return
|
|
12660
|
+
return n(I, {
|
|
12642
12661
|
received: I.data,
|
|
12643
12662
|
code: G.invalid_literal,
|
|
12644
12663
|
expected: this._def.value
|
|
@@ -12669,7 +12688,7 @@ class yA extends K {
|
|
|
12669
12688
|
_parse(A) {
|
|
12670
12689
|
if (typeof A.data != "string") {
|
|
12671
12690
|
const I = this._getOrReturnCtx(A), B = this._def.values;
|
|
12672
|
-
return
|
|
12691
|
+
return n(I, {
|
|
12673
12692
|
expected: H.joinValues(B),
|
|
12674
12693
|
received: I.parsedType,
|
|
12675
12694
|
code: G.invalid_type
|
|
@@ -12677,7 +12696,7 @@ class yA extends K {
|
|
|
12677
12696
|
}
|
|
12678
12697
|
if (UI(this, WA) || lB(this, WA, new Set(this._def.values)), !UI(this, WA).has(A.data)) {
|
|
12679
12698
|
const I = this._getOrReturnCtx(A), B = this._def.values;
|
|
12680
|
-
return
|
|
12699
|
+
return n(I, {
|
|
12681
12700
|
received: I.data,
|
|
12682
12701
|
code: G.invalid_enum_value,
|
|
12683
12702
|
options: B
|
|
@@ -12729,7 +12748,7 @@ class BI extends K {
|
|
|
12729
12748
|
const I = H.getValidEnumValues(this._def.values), B = this._getOrReturnCtx(A);
|
|
12730
12749
|
if (B.parsedType !== w.string && B.parsedType !== w.number) {
|
|
12731
12750
|
const Q = H.objectValues(I);
|
|
12732
|
-
return
|
|
12751
|
+
return n(B, {
|
|
12733
12752
|
expected: H.joinValues(Q),
|
|
12734
12753
|
received: B.parsedType,
|
|
12735
12754
|
code: G.invalid_type
|
|
@@ -12737,7 +12756,7 @@ class BI extends K {
|
|
|
12737
12756
|
}
|
|
12738
12757
|
if (UI(this, xA) || lB(this, xA, new Set(H.getValidEnumValues(this._def.values))), !UI(this, xA).has(A.data)) {
|
|
12739
12758
|
const Q = H.objectValues(I);
|
|
12740
|
-
return
|
|
12759
|
+
return n(B, {
|
|
12741
12760
|
received: B.data,
|
|
12742
12761
|
code: G.invalid_enum_value,
|
|
12743
12762
|
options: Q
|
|
@@ -12762,7 +12781,7 @@ class lA extends K {
|
|
|
12762
12781
|
_parse(A) {
|
|
12763
12782
|
const { ctx: I } = this._processInputParams(A);
|
|
12764
12783
|
if (I.parsedType !== w.promise && I.common.async === !1)
|
|
12765
|
-
return
|
|
12784
|
+
return n(I, {
|
|
12766
12785
|
code: G.invalid_type,
|
|
12767
12786
|
expected: w.promise,
|
|
12768
12787
|
received: I.parsedType
|
|
@@ -12789,7 +12808,7 @@ class QA extends K {
|
|
|
12789
12808
|
_parse(A) {
|
|
12790
12809
|
const { status: I, ctx: B } = this._processInputParams(A), Q = this._def.effect || null, C = {
|
|
12791
12810
|
addIssue: (E) => {
|
|
12792
|
-
|
|
12811
|
+
n(B, E), E.fatal ? I.abort() : I.dirty();
|
|
12793
12812
|
},
|
|
12794
12813
|
get path() {
|
|
12795
12814
|
return B.path;
|
|
@@ -12961,7 +12980,7 @@ class YI extends K {
|
|
|
12961
12980
|
_parse(A) {
|
|
12962
12981
|
if (this._getType(A) !== w.nan) {
|
|
12963
12982
|
const B = this._getOrReturnCtx(A);
|
|
12964
|
-
return
|
|
12983
|
+
return n(B, {
|
|
12965
12984
|
code: G.invalid_type,
|
|
12966
12985
|
expected: w.nan,
|
|
12967
12986
|
received: B.parsedType
|
|
@@ -13073,7 +13092,7 @@ var k;
|
|
|
13073
13092
|
})(k || (k = {}));
|
|
13074
13093
|
const hi = (g, A = {
|
|
13075
13094
|
message: `Input not instance of ${g.name}`
|
|
13076
|
-
}) => TB((I) => I instanceof g, A), WB = $.create, xB = sA.create, yi = YI.create, ti = hA.create, bB = XA.create, Gi = UA.create,
|
|
13095
|
+
}) => TB((I) => I instanceof g, A), WB = $.create, xB = sA.create, yi = YI.create, ti = hA.create, bB = XA.create, Gi = UA.create, ei = kI.create, ni = jA.create, wi = zA.create, Fi = qA.create, ri = SA.create, Si = DA.create, Ri = LI.create, Ni = BA.create, ci = f.create, Ui = f.strictCreate, ki = _A.create, Li = qI.create, Ji = $A.create, Yi = iA.create, Mi = AI.create, di = JI.create, Ki = kA.create, Hi = dA.create, qi = II.create, li = gI.create, fi = yA.create, pi = BI.create, mi = lA.create, DB = QA.create, ui = CA.create, Ti = tA.create, Wi = QA.createWithPreprocess, xi = hI.create, bi = () => WB().optional(), Zi = () => xB().optional(), Pi = () => bB().optional(), Oi = {
|
|
13077
13096
|
string: (g) => $.create({ ...g, coerce: !0 }),
|
|
13078
13097
|
number: (g) => sA.create({ ...g, coerce: !0 }),
|
|
13079
13098
|
boolean: (g) => XA.create({
|
|
@@ -13090,7 +13109,7 @@ var s = /* @__PURE__ */ Object.freeze({
|
|
|
13090
13109
|
getErrorMap: NI,
|
|
13091
13110
|
makeIssue: cI,
|
|
13092
13111
|
EMPTY_PATH: xE,
|
|
13093
|
-
addIssueToContext:
|
|
13112
|
+
addIssueToContext: n,
|
|
13094
13113
|
ParseStatus: b,
|
|
13095
13114
|
INVALID: L,
|
|
13096
13115
|
DIRTY: MA,
|
|
@@ -13187,10 +13206,10 @@ var s = /* @__PURE__ */ Object.freeze({
|
|
|
13187
13206
|
set: Ki,
|
|
13188
13207
|
strictObject: Ui,
|
|
13189
13208
|
string: WB,
|
|
13190
|
-
symbol:
|
|
13209
|
+
symbol: ei,
|
|
13191
13210
|
transformer: DB,
|
|
13192
13211
|
tuple: Yi,
|
|
13193
|
-
undefined:
|
|
13212
|
+
undefined: ni,
|
|
13194
13213
|
union: ki,
|
|
13195
13214
|
unknown: ri,
|
|
13196
13215
|
void: Ri,
|
|
@@ -13744,7 +13763,7 @@ function Jg(g) {
|
|
|
13744
13763
|
${JSON.stringify(g)}`);
|
|
13745
13764
|
}
|
|
13746
13765
|
}
|
|
13747
|
-
class
|
|
13766
|
+
class eI {
|
|
13748
13767
|
location;
|
|
13749
13768
|
version;
|
|
13750
13769
|
constructor(A) {
|
|
@@ -13784,7 +13803,7 @@ class nI {
|
|
|
13784
13803
|
*/
|
|
13785
13804
|
static fromHttp(A) {
|
|
13786
13805
|
const I = new uA(A.url);
|
|
13787
|
-
return new
|
|
13806
|
+
return new eI({
|
|
13788
13807
|
location: new X(I),
|
|
13789
13808
|
version: A.version
|
|
13790
13809
|
});
|
|
@@ -13801,7 +13820,7 @@ class nI {
|
|
|
13801
13820
|
*/
|
|
13802
13821
|
static fromS3(A) {
|
|
13803
13822
|
const I = new Ug(A);
|
|
13804
|
-
return new
|
|
13823
|
+
return new eI({
|
|
13805
13824
|
location: new X(I),
|
|
13806
13825
|
version: A.version
|
|
13807
13826
|
});
|
|
@@ -13817,7 +13836,7 @@ class nI {
|
|
|
13817
13836
|
*/
|
|
13818
13837
|
static fromFileSystem(A) {
|
|
13819
13838
|
const I = new cg(A.directory);
|
|
13820
|
-
return new
|
|
13839
|
+
return new eI({
|
|
13821
13840
|
location: new X(I, A.path),
|
|
13822
13841
|
version: A.version
|
|
13823
13842
|
});
|
|
@@ -13988,7 +14007,7 @@ export {
|
|
|
13988
14007
|
Fo as LabelImageLayer,
|
|
13989
14008
|
GA as Layer,
|
|
13990
14009
|
vQ as LayerManager,
|
|
13991
|
-
|
|
14010
|
+
eI as OmeZarrImageSource,
|
|
13992
14011
|
so as OrthographicCamera,
|
|
13993
14012
|
yo as PanZoomControls,
|
|
13994
14013
|
ho as PerspectiveCamera,
|
|
@@ -13998,9 +14017,9 @@ export {
|
|
|
13998
14017
|
Yo as Spherical,
|
|
13999
14018
|
iI as Texture2DArray,
|
|
14000
14019
|
yg as Texture3D,
|
|
14001
|
-
|
|
14020
|
+
eo as TracksLayer,
|
|
14002
14021
|
_Q as Viewport,
|
|
14003
|
-
|
|
14022
|
+
no as VolumeLayer,
|
|
14004
14023
|
uQ as WebGLRenderer,
|
|
14005
14024
|
ko as createExplorationPolicy,
|
|
14006
14025
|
Yg as createImageSourcePolicy,
|