@idetik/core 0.4.1 → 0.4.2
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 +361 -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,80 +2231,118 @@ 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
|
}
|
|
2352
|
-
class
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
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;
|
|
2360
2312
|
}
|
|
2361
2313
|
removeView(A) {
|
|
2362
|
-
const I =
|
|
2363
|
-
if (
|
|
2364
|
-
throw new Error("Cannot remove view: store not managed by ChunkManager");
|
|
2365
|
-
const C = Q.indexOf(A);
|
|
2366
|
-
if (C === -1)
|
|
2314
|
+
const I = this.views_.indexOf(A);
|
|
2315
|
+
if (I === -1)
|
|
2367
2316
|
throw new Error(
|
|
2368
|
-
|
|
2317
|
+
"Cannot remove view: view not found in store's view list"
|
|
2369
2318
|
);
|
|
2370
|
-
const
|
|
2371
|
-
|
|
2372
|
-
for (const
|
|
2373
|
-
this.aggregateChunkViewStates(
|
|
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);
|
|
2378
|
-
if (I)
|
|
2379
|
-
return I;
|
|
2380
|
-
const Q = (async () => {
|
|
2381
|
-
const C = await A.open(), E = new bQ(C);
|
|
2382
|
-
return this.stores_.set(A, E), this.pendingStores_.delete(A), E;
|
|
2383
|
-
})();
|
|
2384
|
-
return this.pendingStores_.set(A, Q), Q;
|
|
2319
|
+
const B = Array.from(A.chunkViewStates.keys());
|
|
2320
|
+
this.views_.splice(I, 1);
|
|
2321
|
+
for (const Q of B)
|
|
2322
|
+
this.aggregateChunkViewStates(Q);
|
|
2385
2323
|
}
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
if (B === A)
|
|
2389
|
-
return I;
|
|
2390
|
-
throw new Error("Source not found for the given store.");
|
|
2324
|
+
get views() {
|
|
2325
|
+
return this.views_;
|
|
2391
2326
|
}
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
const B = this.updateAndCollectChunkChanges(I);
|
|
2395
|
-
for (const Q of B)
|
|
2396
|
-
Q.priority === null ? this.queue_.cancel(Q) : Q.state === "queued" && this.queue_.enqueue(
|
|
2397
|
-
Q,
|
|
2398
|
-
(C) => I.loadChunkData(Q, C)
|
|
2399
|
-
);
|
|
2400
|
-
}
|
|
2401
|
-
this.queue_.flush();
|
|
2327
|
+
canDispose() {
|
|
2328
|
+
return this.hasHadViews_ && this.views_.length === 0;
|
|
2402
2329
|
}
|
|
2403
|
-
updateAndCollectChunkChanges(
|
|
2404
|
-
const
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
this.aggregateChunkViewStates(Q, A);
|
|
2412
|
-
return B;
|
|
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;
|
|
2413
2338
|
}
|
|
2414
|
-
aggregateChunkViewStates(A
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
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));
|
|
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));
|
|
2421
2344
|
}
|
|
2422
|
-
if (A.visible =
|
|
2345
|
+
if (A.visible = I, A.prefetch = B, A.priority = Q, A.orderKey = C, A.priority !== null && A.state === "unloaded") {
|
|
2423
2346
|
A.state = "queued";
|
|
2424
2347
|
return;
|
|
2425
2348
|
}
|
|
@@ -2428,10 +2351,100 @@ class OQ {
|
|
|
2428
2351
|
return;
|
|
2429
2352
|
}
|
|
2430
2353
|
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
|
-
"
|
|
2354
|
+
"ChunkStore",
|
|
2432
2355
|
`Disposing chunk ${JSON.stringify(A.chunkIndex)} in LOD ${A.lod}`
|
|
2433
2356
|
));
|
|
2434
2357
|
}
|
|
2358
|
+
validateXYScaleRatios() {
|
|
2359
|
+
const A = this.dimensions_.x, I = this.dimensions_.y;
|
|
2360
|
+
for (let B = 1; B < this.dimensions_.numLods; B++) {
|
|
2361
|
+
const Q = A.lods[B].scale / A.lods[B - 1].scale, C = I.lods[B].scale / I.lods[B - 1].scale;
|
|
2362
|
+
if (!jI(Q, 2, 0.02) || !jI(C, 2, 0.02))
|
|
2363
|
+
throw new Error(
|
|
2364
|
+
`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}]`
|
|
2365
|
+
);
|
|
2366
|
+
}
|
|
2367
|
+
}
|
|
2368
|
+
getAndValidateTimeDimension() {
|
|
2369
|
+
for (let A = 0; A < this.dimensions_.numLods; ++A) {
|
|
2370
|
+
const I = this.dimensions_.t?.lods[A];
|
|
2371
|
+
if (!I) continue;
|
|
2372
|
+
if (I.chunkSize !== 1)
|
|
2373
|
+
throw new Error(
|
|
2374
|
+
`ChunkStore only supports a chunk size of 1 in t. Found ${I.chunkSize} at LOD ${A}`
|
|
2375
|
+
);
|
|
2376
|
+
const B = this.dimensions_.t?.lods[A - 1];
|
|
2377
|
+
if (B && I.size !== B.size)
|
|
2378
|
+
throw new Error(
|
|
2379
|
+
`ChunkStore does not support downsampling in t. Found ${B.size} at LOD ${A - 1} → ${I.size} at LOD ${A}`
|
|
2380
|
+
);
|
|
2381
|
+
}
|
|
2382
|
+
return {
|
|
2383
|
+
size: this.dimensions_.t?.lods[0].size ?? 1
|
|
2384
|
+
};
|
|
2385
|
+
}
|
|
2386
|
+
getAndValidateChannelDimension() {
|
|
2387
|
+
for (let A = 0; A < this.dimensions_.numLods; ++A) {
|
|
2388
|
+
const I = this.dimensions_.c?.lods[A];
|
|
2389
|
+
if (!I) continue;
|
|
2390
|
+
if (I.chunkSize !== 1)
|
|
2391
|
+
throw new Error(
|
|
2392
|
+
`ChunkStore only supports a chunk size of 1 in c. Found ${I.chunkSize} at LOD ${A}`
|
|
2393
|
+
);
|
|
2394
|
+
if (I.scale !== 1)
|
|
2395
|
+
throw new Error(
|
|
2396
|
+
`ChunkStore does not support scale in c. Found ${I.scale} at LOD ${A}`
|
|
2397
|
+
);
|
|
2398
|
+
if (I.translation !== 0)
|
|
2399
|
+
throw new Error(
|
|
2400
|
+
`ChunkStore does not support translation in c. Found ${I.translation} at LOD ${A}`
|
|
2401
|
+
);
|
|
2402
|
+
const B = this.dimensions_.c?.lods[A - 1];
|
|
2403
|
+
if (B && I.size !== B.size)
|
|
2404
|
+
throw new Error(
|
|
2405
|
+
`ChunkStore does not support downsampling in c. Found ${B.size} at LOD ${A - 1} → ${I.size} at LOD ${A}`
|
|
2406
|
+
);
|
|
2407
|
+
}
|
|
2408
|
+
return {
|
|
2409
|
+
size: this.dimensions_.c?.lods[0].size ?? 1
|
|
2410
|
+
};
|
|
2411
|
+
}
|
|
2412
|
+
}
|
|
2413
|
+
class OQ {
|
|
2414
|
+
stores_ = /* @__PURE__ */ new Map();
|
|
2415
|
+
pendingStores_ = /* @__PURE__ */ new Map();
|
|
2416
|
+
queue_ = new WQ();
|
|
2417
|
+
async addView(A, I) {
|
|
2418
|
+
return (await this.getOrCreateStore(A)).createView(I);
|
|
2419
|
+
}
|
|
2420
|
+
async getOrCreateStore(A) {
|
|
2421
|
+
const I = this.stores_.get(A);
|
|
2422
|
+
if (I)
|
|
2423
|
+
return I;
|
|
2424
|
+
const B = this.pendingStores_.get(A);
|
|
2425
|
+
if (B)
|
|
2426
|
+
return B;
|
|
2427
|
+
const C = (async () => {
|
|
2428
|
+
const i = await A.open();
|
|
2429
|
+
return new PQ(i);
|
|
2430
|
+
})();
|
|
2431
|
+
this.pendingStores_.set(A, C);
|
|
2432
|
+
const E = await C;
|
|
2433
|
+
return this.stores_.set(A, E), this.pendingStores_.delete(A), E;
|
|
2434
|
+
}
|
|
2435
|
+
update() {
|
|
2436
|
+
for (const [A, I] of this.stores_) {
|
|
2437
|
+
const B = I.updateAndCollectChunkChanges();
|
|
2438
|
+
for (const Q of B)
|
|
2439
|
+
Q.priority === null ? this.queue_.cancel(Q) : Q.state === "queued" && this.queue_.enqueue(
|
|
2440
|
+
Q,
|
|
2441
|
+
(C) => I.loadChunkData(Q, C)
|
|
2442
|
+
);
|
|
2443
|
+
}
|
|
2444
|
+
this.queue_.flush();
|
|
2445
|
+
for (const [A, I] of this.stores_)
|
|
2446
|
+
I.canDispose() && this.stores_.delete(A);
|
|
2447
|
+
}
|
|
2435
2448
|
}
|
|
2436
2449
|
var ZA = function(g = 1) {
|
|
2437
2450
|
var A = 0, I = document.createElement("div");
|
|
@@ -2477,11 +2490,11 @@ var ZA = function(g = 1) {
|
|
|
2477
2490
|
ZA.Panel = function(g, A, I, B) {
|
|
2478
2491
|
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
2492
|
S.width = o, S.height = a, S.style.cssText = `width:${E(B * 80)}px;height:${E(B * 48)}px`;
|
|
2480
|
-
var
|
|
2481
|
-
return
|
|
2493
|
+
var e = S.getContext("2d");
|
|
2494
|
+
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
2495
|
dom: S,
|
|
2483
2496
|
update: function(c, N) {
|
|
2484
|
-
Q = Math.min(Q, c), C = Math.max(C, c),
|
|
2497
|
+
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
2498
|
}
|
|
2486
2499
|
};
|
|
2487
2500
|
};
|
|
@@ -2934,8 +2947,8 @@ class QC {
|
|
|
2934
2947
|
}
|
|
2935
2948
|
targetTo(A) {
|
|
2936
2949
|
SQ(this.translation_, A) && (A = IA(A), A[2] += rA);
|
|
2937
|
-
const I =
|
|
2938
|
-
|
|
2950
|
+
const I = eQ(AA(), this.translation_, A, BC), B = aQ(hB(), I);
|
|
2951
|
+
nB(this.rotation_, B), og(this.rotation_, this.rotation_), this.dirty_ = !0;
|
|
2939
2952
|
}
|
|
2940
2953
|
get scale() {
|
|
2941
2954
|
return IA(this.scale_);
|
|
@@ -3024,7 +3037,7 @@ class JA {
|
|
|
3024
3037
|
this.normal = IA(A), this.signedDistance = I;
|
|
3025
3038
|
}
|
|
3026
3039
|
signedDistanceToPoint(A) {
|
|
3027
|
-
return
|
|
3040
|
+
return eB(this.normal, A) + this.signedDistance;
|
|
3028
3041
|
}
|
|
3029
3042
|
normalize() {
|
|
3030
3043
|
const A = yB(this.normal);
|
|
@@ -3103,7 +3116,7 @@ class rB extends mA {
|
|
|
3103
3116
|
}
|
|
3104
3117
|
get frustum() {
|
|
3105
3118
|
return new CC(
|
|
3106
|
-
|
|
3119
|
+
nI(AA(), this.projectionMatrix, this.viewMatrix)
|
|
3107
3120
|
);
|
|
3108
3121
|
}
|
|
3109
3122
|
pan(A) {
|
|
@@ -3162,7 +3175,7 @@ class so extends rB {
|
|
|
3162
3175
|
}
|
|
3163
3176
|
getWorldViewRect() {
|
|
3164
3177
|
let A = vI(-1, -1, 0, 1), I = vI(1, 1, 0, 1);
|
|
3165
|
-
const B =
|
|
3178
|
+
const B = nI(
|
|
3166
3179
|
AA(),
|
|
3167
3180
|
this.projectionMatrix,
|
|
3168
3181
|
this.viewMatrix
|
|
@@ -3512,7 +3525,7 @@ function oC(g) {
|
|
|
3512
3525
|
const [I, B] = A(0), [Q, C] = A(1), [E, i] = A(2);
|
|
3513
3526
|
return { xMin: I, xMax: B, yMin: Q, yMax: C, zMin: E, zMax: i };
|
|
3514
3527
|
}
|
|
3515
|
-
class
|
|
3528
|
+
class eo extends GA {
|
|
3516
3529
|
type = "TracksLayer";
|
|
3517
3530
|
tracks_ = [];
|
|
3518
3531
|
constructor(A = []) {
|
|
@@ -3599,14 +3612,14 @@ class RB extends pA {
|
|
|
3599
3612
|
for (let t = 0; t < D; ++t) {
|
|
3600
3613
|
const F = t * y;
|
|
3601
3614
|
for (let r = 0; r < a; ++r) {
|
|
3602
|
-
const S = r * h,
|
|
3615
|
+
const S = r * h, e = r / i, c = t / o, N = [S, F, 0], M = [0, 0, 1], Y = [e, c];
|
|
3603
3616
|
C.push(...N, ...M, ...Y);
|
|
3604
3617
|
}
|
|
3605
3618
|
}
|
|
3606
3619
|
for (let t = 0; t < o; ++t)
|
|
3607
3620
|
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,
|
|
3621
|
+
const r = F + a * t, S = F + a * (t + 1), e = F + 1 + a * (t + 1), c = F + 1 + a * t;
|
|
3622
|
+
E.push(r, S, c), E.push(S, e, c);
|
|
3610
3623
|
}
|
|
3611
3624
|
this.vertexData_ = new Float32Array(C), this.indexData_ = new Uint32Array(E), this.addAttribute({
|
|
3612
3625
|
type: "position",
|
|
@@ -3762,7 +3775,7 @@ function tC(g) {
|
|
|
3762
3775
|
if (g.type === "Texture2D")
|
|
3763
3776
|
return GC(g.dataType);
|
|
3764
3777
|
if (g.type === "Texture2DArray")
|
|
3765
|
-
return
|
|
3778
|
+
return eC(g.dataType);
|
|
3766
3779
|
throw new Error(`Unsupported image texture type: ${g.type}`);
|
|
3767
3780
|
}
|
|
3768
3781
|
function GC(g) {
|
|
@@ -3779,7 +3792,7 @@ function GC(g) {
|
|
|
3779
3792
|
return "floatScalarImage";
|
|
3780
3793
|
}
|
|
3781
3794
|
}
|
|
3782
|
-
function
|
|
3795
|
+
function eC(g) {
|
|
3783
3796
|
switch (g) {
|
|
3784
3797
|
case "byte":
|
|
3785
3798
|
case "int":
|
|
@@ -3867,7 +3880,7 @@ function hg(g, A, I, B, Q = 3) {
|
|
|
3867
3880
|
return A;
|
|
3868
3881
|
}
|
|
3869
3882
|
}
|
|
3870
|
-
class
|
|
3883
|
+
class nC {
|
|
3871
3884
|
bins_ = /* @__PURE__ */ new Map();
|
|
3872
3885
|
acquire(A) {
|
|
3873
3886
|
const B = this.bins_.get(A)?.pop();
|
|
@@ -3888,7 +3901,7 @@ class NB extends GA {
|
|
|
3888
3901
|
sliceCoords_;
|
|
3889
3902
|
onPickValue_;
|
|
3890
3903
|
visibleChunks_ = /* @__PURE__ */ new Map();
|
|
3891
|
-
pool_ = new
|
|
3904
|
+
pool_ = new nC();
|
|
3892
3905
|
initialChannelProps_;
|
|
3893
3906
|
channelChangeCallbacks_ = [];
|
|
3894
3907
|
policy_;
|
|
@@ -3927,7 +3940,7 @@ class NB extends GA {
|
|
|
3927
3940
|
);
|
|
3928
3941
|
}
|
|
3929
3942
|
onDetached(A) {
|
|
3930
|
-
this.releaseAndRemoveChunks(this.visibleChunks_.keys()), this.clearObjects(), this.chunkStoreView_ && (
|
|
3943
|
+
this.releaseAndRemoveChunks(this.visibleChunks_.keys()), this.clearObjects(), this.chunkStoreView_ && (this.chunkStoreView_.dispose(), this.chunkStoreView_ = void 0);
|
|
3931
3944
|
}
|
|
3932
3945
|
update(A) {
|
|
3933
3946
|
!A || !this.chunkStoreView_ || (this.chunkStoreView_.updateChunkStates(this.sliceCoords_, A.viewport), this.updateChunks(), this.resliceIfZChanged());
|
|
@@ -4168,15 +4181,15 @@ class wC extends pA {
|
|
|
4168
4181
|
});
|
|
4169
4182
|
}
|
|
4170
4183
|
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,
|
|
4184
|
+
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
4185
|
for (let J = 0; J < M; J++) {
|
|
4173
|
-
const W = -
|
|
4186
|
+
const W = -e + J * r;
|
|
4174
4187
|
for (let v = 0; v < N; v++) {
|
|
4175
4188
|
const Z = -S + v * F, P = { x: 0, y: 0, z: 0 };
|
|
4176
4189
|
P[A] = Z * Q, P[I] = W * C, P[B] = c;
|
|
4177
4190
|
const O = { x: 0, y: 0, z: 0 };
|
|
4178
4191
|
O[B] = h;
|
|
4179
|
-
const
|
|
4192
|
+
const eA = v / a, nA = 1 - J / D;
|
|
4180
4193
|
y.push(
|
|
4181
4194
|
P.x,
|
|
4182
4195
|
P.y,
|
|
@@ -4184,8 +4197,8 @@ class wC extends pA {
|
|
|
4184
4197
|
O.x,
|
|
4185
4198
|
O.y,
|
|
4186
4199
|
O.z,
|
|
4187
|
-
|
|
4188
|
-
|
|
4200
|
+
eA,
|
|
4201
|
+
nA
|
|
4189
4202
|
);
|
|
4190
4203
|
}
|
|
4191
4204
|
}
|
|
@@ -4218,7 +4231,7 @@ function rC(g) {
|
|
|
4218
4231
|
return "floatVolume";
|
|
4219
4232
|
}
|
|
4220
4233
|
}
|
|
4221
|
-
class
|
|
4234
|
+
class no extends GA {
|
|
4222
4235
|
type = "VolumeLayer";
|
|
4223
4236
|
constructor() {
|
|
4224
4237
|
super();
|
|
@@ -4870,7 +4883,7 @@ class cB {
|
|
|
4870
4883
|
yield this.get(A);
|
|
4871
4884
|
}
|
|
4872
4885
|
}
|
|
4873
|
-
class
|
|
4886
|
+
class eg {
|
|
4874
4887
|
_data;
|
|
4875
4888
|
chars;
|
|
4876
4889
|
#A;
|
|
@@ -5004,7 +5017,7 @@ function UB(g) {
|
|
|
5004
5017
|
let A = g.match(MC);
|
|
5005
5018
|
if (A) {
|
|
5006
5019
|
let [, B, Q] = A;
|
|
5007
|
-
return (B === "U" ? aI :
|
|
5020
|
+
return (B === "U" ? aI : eg).bind(null, Number(Q));
|
|
5008
5021
|
}
|
|
5009
5022
|
let I = YC[g];
|
|
5010
5023
|
if (!I)
|
|
@@ -5158,10 +5171,10 @@ class KI {
|
|
|
5158
5171
|
};
|
|
5159
5172
|
}
|
|
5160
5173
|
}
|
|
5161
|
-
class
|
|
5174
|
+
class ng {
|
|
5162
5175
|
kind = "bytes_to_bytes";
|
|
5163
5176
|
static fromConfig() {
|
|
5164
|
-
return new
|
|
5177
|
+
return new ng();
|
|
5165
5178
|
}
|
|
5166
5179
|
encode(A) {
|
|
5167
5180
|
throw new Error("Not implemented");
|
|
@@ -5240,7 +5253,7 @@ class wg {
|
|
|
5240
5253
|
}
|
|
5241
5254
|
}
|
|
5242
5255
|
function jg(g) {
|
|
5243
|
-
return g instanceof cB || g instanceof
|
|
5256
|
+
return g instanceof cB || g instanceof eg || g instanceof aI ? new Proxy(g, {
|
|
5244
5257
|
get(I, B) {
|
|
5245
5258
|
return I.get(Number(B));
|
|
5246
5259
|
},
|
|
@@ -5251,7 +5264,7 @@ function jg(g) {
|
|
|
5251
5264
|
}
|
|
5252
5265
|
function bC(g, A) {
|
|
5253
5266
|
let I;
|
|
5254
|
-
return g.data instanceof
|
|
5267
|
+
return g.data instanceof eg || g.data instanceof aI ? I = new g.constructor(
|
|
5255
5268
|
// @ts-expect-error
|
|
5256
5269
|
g.data.length,
|
|
5257
5270
|
g.data.chars
|
|
@@ -5322,7 +5335,7 @@ class rg {
|
|
|
5322
5335
|
}
|
|
5323
5336
|
}
|
|
5324
5337
|
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", () =>
|
|
5338
|
+
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
5339
|
}
|
|
5327
5340
|
const VC = OC();
|
|
5328
5341
|
function Ag(g) {
|
|
@@ -5399,11 +5412,11 @@ function XC(g, A, I, B) {
|
|
|
5399
5412
|
}
|
|
5400
5413
|
if (h === null)
|
|
5401
5414
|
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 &&
|
|
5415
|
+
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];
|
|
5416
|
+
if (!(S === _g && e === _g))
|
|
5404
5417
|
return Q(D, {
|
|
5405
5418
|
offset: Number(S),
|
|
5406
|
-
length: Number(
|
|
5419
|
+
length: Number(e)
|
|
5407
5420
|
});
|
|
5408
5421
|
};
|
|
5409
5422
|
}
|
|
@@ -5775,7 +5788,7 @@ function GE(g, A) {
|
|
|
5775
5788
|
let I = [];
|
|
5776
5789
|
return g === null ? I = A.map((B) => SI(null)) : Array.isArray(g) && (I = g.map((B) => B ?? SI(null))), hE(I, A), I;
|
|
5777
5790
|
}
|
|
5778
|
-
class
|
|
5791
|
+
class eE {
|
|
5779
5792
|
dim_indexers;
|
|
5780
5793
|
shape;
|
|
5781
5794
|
constructor({ selection: A, shape: I, chunk_shape: B }) {
|
|
@@ -5793,11 +5806,11 @@ class nE {
|
|
|
5793
5806
|
}
|
|
5794
5807
|
}
|
|
5795
5808
|
}
|
|
5796
|
-
function
|
|
5809
|
+
function nE(g, A) {
|
|
5797
5810
|
return "get" in g ? g.get(A) : g[A];
|
|
5798
5811
|
}
|
|
5799
5812
|
async function wE(g, A, I, B) {
|
|
5800
|
-
let Q = jC(g), C = new
|
|
5813
|
+
let Q = jC(g), C = new eE({
|
|
5801
5814
|
selection: A,
|
|
5802
5815
|
shape: g.shape,
|
|
5803
5816
|
chunk_shape: g.chunks
|
|
@@ -5807,7 +5820,7 @@ async function wE(g, A, I, B) {
|
|
|
5807
5820
|
let { data: D, shape: h, stride: y } = await g.getChunk(o, I.opts), t = B.prepare(D, h, y);
|
|
5808
5821
|
B.set_from_chunk(E, t, a);
|
|
5809
5822
|
});
|
|
5810
|
-
return await i.onIdle(), C.shape.length === 0 ?
|
|
5823
|
+
return await i.onIdle(), C.shape.length === 0 ? nE(E.data, 0) : E;
|
|
5811
5824
|
}
|
|
5812
5825
|
function Ng(g, A = 0, I) {
|
|
5813
5826
|
let B = I ?? g.length - A;
|
|
@@ -5902,8 +5915,8 @@ function tI(g, A, I, B) {
|
|
|
5902
5915
|
}
|
|
5903
5916
|
if (Q.to === null) {
|
|
5904
5917
|
if (C.length === 0) {
|
|
5905
|
-
let
|
|
5906
|
-
g.data.set(A.data.subarray(
|
|
5918
|
+
let e = Q.from * I;
|
|
5919
|
+
g.data.set(A.data.subarray(e, e + I), 0);
|
|
5907
5920
|
return;
|
|
5908
5921
|
}
|
|
5909
5922
|
tI(g, {
|
|
@@ -5915,22 +5928,22 @@ function tI(g, A, I, B) {
|
|
|
5915
5928
|
const [D, h, y] = Q.to, [t, F, r] = Q.from, S = JB(D, h, y);
|
|
5916
5929
|
if (C.length === 0) {
|
|
5917
5930
|
if (y === 1 && r === 1 && E === 1 && o === 1) {
|
|
5918
|
-
let
|
|
5919
|
-
g.data.set(A.data.subarray(
|
|
5931
|
+
let e = t * I, c = S * I;
|
|
5932
|
+
g.data.set(A.data.subarray(e, e + c), D * I);
|
|
5920
5933
|
return;
|
|
5921
5934
|
}
|
|
5922
|
-
for (let
|
|
5923
|
-
let c = o * (t + r *
|
|
5924
|
-
g.data.set(A.data.subarray(c, c + I), E * (D + y *
|
|
5935
|
+
for (let e = 0; e < S; e++) {
|
|
5936
|
+
let c = o * (t + r * e) * I;
|
|
5937
|
+
g.data.set(A.data.subarray(c, c + I), E * (D + y * e) * I);
|
|
5925
5938
|
}
|
|
5926
5939
|
return;
|
|
5927
5940
|
}
|
|
5928
|
-
for (let
|
|
5941
|
+
for (let e = 0; e < S; e++)
|
|
5929
5942
|
tI({
|
|
5930
|
-
data: g.data.subarray(E * (D +
|
|
5943
|
+
data: g.data.subarray(E * (D + e * y) * I),
|
|
5931
5944
|
stride: i
|
|
5932
5945
|
}, {
|
|
5933
|
-
data: A.data.subarray(o * (t +
|
|
5946
|
+
data: A.data.subarray(o * (t + e * r) * I),
|
|
5934
5947
|
stride: a
|
|
5935
5948
|
}, I, C);
|
|
5936
5949
|
}
|
|
@@ -6035,12 +6048,12 @@ class Ug extends uA {
|
|
|
6035
6048
|
x-amz-content-sha256:UNSIGNED-PAYLOAD
|
|
6036
6049
|
x-amz-date:${o}
|
|
6037
6050
|
` + (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",
|
|
6051
|
+
` : ""), 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
6052
|
${y}
|
|
6040
6053
|
${t}
|
|
6041
6054
|
${F}
|
|
6042
6055
|
${r}
|
|
6043
|
-
${S}`, c = "AWS4-HMAC-SHA256", N = `${a}/${E}/${i}/aws4_request`, M = await this.sha256(
|
|
6056
|
+
${S}`, c = "AWS4-HMAC-SHA256", N = `${a}/${E}/${i}/aws4_request`, M = await this.sha256(e), Y = `${c}
|
|
6044
6057
|
${o}
|
|
6045
6058
|
${N}
|
|
6046
6059
|
${M}`, J = await this.getSignatureKey(
|
|
@@ -10129,7 +10142,7 @@ class mE {
|
|
|
10129
10142
|
throw new Error(
|
|
10130
10143
|
"Invalid row alignment value. Possible values are 1, 2, 4, or 8"
|
|
10131
10144
|
);
|
|
10132
|
-
const a = (
|
|
10145
|
+
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
10146
|
return {
|
|
10134
10147
|
state: "loaded",
|
|
10135
10148
|
lod: I,
|
|
@@ -10181,11 +10194,11 @@ function uE(g, A) {
|
|
|
10181
10194
|
const I = g.axes.map((h) => h.name), B = g.axes.length, Q = EB(I, "x"), C = EB(I, "y"), E = (h, y) => {
|
|
10182
10195
|
const t = [];
|
|
10183
10196
|
for (let F = 0; F < g.datasets.length; F++) {
|
|
10184
|
-
const r = g.datasets[F], S = A[F],
|
|
10197
|
+
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
10198
|
t.push({
|
|
10186
10199
|
size: S.shape[y],
|
|
10187
10200
|
chunkSize: S.chunks[y],
|
|
10188
|
-
scale:
|
|
10201
|
+
scale: e[y],
|
|
10189
10202
|
translation: c[y]
|
|
10190
10203
|
});
|
|
10191
10204
|
}
|
|
@@ -10478,7 +10491,7 @@ const cI = (g) => {
|
|
|
10478
10491
|
message: i
|
|
10479
10492
|
};
|
|
10480
10493
|
}, xE = [];
|
|
10481
|
-
function
|
|
10494
|
+
function n(g, A) {
|
|
10482
10495
|
const I = NI(), B = cI({
|
|
10483
10496
|
issueData: A,
|
|
10484
10497
|
data: g.data,
|
|
@@ -10843,7 +10856,7 @@ class $ extends K {
|
|
|
10843
10856
|
_parse(A) {
|
|
10844
10857
|
if (this._def.coerce && (A.data = String(A.data)), this._getType(A) !== w.string) {
|
|
10845
10858
|
const C = this._getOrReturnCtx(A);
|
|
10846
|
-
return
|
|
10859
|
+
return n(C, {
|
|
10847
10860
|
code: G.invalid_type,
|
|
10848
10861
|
expected: w.string,
|
|
10849
10862
|
received: C.parsedType
|
|
@@ -10853,7 +10866,7 @@ class $ extends K {
|
|
|
10853
10866
|
let Q;
|
|
10854
10867
|
for (const C of this._def.checks)
|
|
10855
10868
|
if (C.kind === "min")
|
|
10856
|
-
A.data.length < C.value && (Q = this._getOrReturnCtx(A, Q),
|
|
10869
|
+
A.data.length < C.value && (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10857
10870
|
code: G.too_small,
|
|
10858
10871
|
minimum: C.value,
|
|
10859
10872
|
type: "string",
|
|
@@ -10862,7 +10875,7 @@ class $ extends K {
|
|
|
10862
10875
|
message: C.message
|
|
10863
10876
|
}), B.dirty());
|
|
10864
10877
|
else if (C.kind === "max")
|
|
10865
|
-
A.data.length > C.value && (Q = this._getOrReturnCtx(A, Q),
|
|
10878
|
+
A.data.length > C.value && (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10866
10879
|
code: G.too_big,
|
|
10867
10880
|
maximum: C.value,
|
|
10868
10881
|
type: "string",
|
|
@@ -10872,14 +10885,14 @@ class $ extends K {
|
|
|
10872
10885
|
}), B.dirty());
|
|
10873
10886
|
else if (C.kind === "length") {
|
|
10874
10887
|
const E = A.data.length > C.value, i = A.data.length < C.value;
|
|
10875
|
-
(E || i) && (Q = this._getOrReturnCtx(A, Q), E ?
|
|
10888
|
+
(E || i) && (Q = this._getOrReturnCtx(A, Q), E ? n(Q, {
|
|
10876
10889
|
code: G.too_big,
|
|
10877
10890
|
maximum: C.value,
|
|
10878
10891
|
type: "string",
|
|
10879
10892
|
inclusive: !0,
|
|
10880
10893
|
exact: !0,
|
|
10881
10894
|
message: C.message
|
|
10882
|
-
}) : i &&
|
|
10895
|
+
}) : i && n(Q, {
|
|
10883
10896
|
code: G.too_small,
|
|
10884
10897
|
minimum: C.value,
|
|
10885
10898
|
type: "string",
|
|
@@ -10888,43 +10901,43 @@ class $ extends K {
|
|
|
10888
10901
|
message: C.message
|
|
10889
10902
|
}), B.dirty());
|
|
10890
10903
|
} else if (C.kind === "email")
|
|
10891
|
-
jE.test(A.data) || (Q = this._getOrReturnCtx(A, Q),
|
|
10904
|
+
jE.test(A.data) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10892
10905
|
validation: "email",
|
|
10893
10906
|
code: G.invalid_string,
|
|
10894
10907
|
message: C.message
|
|
10895
10908
|
}), B.dirty());
|
|
10896
10909
|
else if (C.kind === "emoji")
|
|
10897
|
-
OI || (OI = new RegExp(zE, "u")), OI.test(A.data) || (Q = this._getOrReturnCtx(A, Q),
|
|
10910
|
+
OI || (OI = new RegExp(zE, "u")), OI.test(A.data) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10898
10911
|
validation: "emoji",
|
|
10899
10912
|
code: G.invalid_string,
|
|
10900
10913
|
message: C.message
|
|
10901
10914
|
}), B.dirty());
|
|
10902
10915
|
else if (C.kind === "uuid")
|
|
10903
|
-
OE.test(A.data) || (Q = this._getOrReturnCtx(A, Q),
|
|
10916
|
+
OE.test(A.data) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10904
10917
|
validation: "uuid",
|
|
10905
10918
|
code: G.invalid_string,
|
|
10906
10919
|
message: C.message
|
|
10907
10920
|
}), B.dirty());
|
|
10908
10921
|
else if (C.kind === "nanoid")
|
|
10909
|
-
VE.test(A.data) || (Q = this._getOrReturnCtx(A, Q),
|
|
10922
|
+
VE.test(A.data) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10910
10923
|
validation: "nanoid",
|
|
10911
10924
|
code: G.invalid_string,
|
|
10912
10925
|
message: C.message
|
|
10913
10926
|
}), B.dirty());
|
|
10914
10927
|
else if (C.kind === "cuid")
|
|
10915
|
-
bE.test(A.data) || (Q = this._getOrReturnCtx(A, Q),
|
|
10928
|
+
bE.test(A.data) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10916
10929
|
validation: "cuid",
|
|
10917
10930
|
code: G.invalid_string,
|
|
10918
10931
|
message: C.message
|
|
10919
10932
|
}), B.dirty());
|
|
10920
10933
|
else if (C.kind === "cuid2")
|
|
10921
|
-
ZE.test(A.data) || (Q = this._getOrReturnCtx(A, Q),
|
|
10934
|
+
ZE.test(A.data) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10922
10935
|
validation: "cuid2",
|
|
10923
10936
|
code: G.invalid_string,
|
|
10924
10937
|
message: C.message
|
|
10925
10938
|
}), B.dirty());
|
|
10926
10939
|
else if (C.kind === "ulid")
|
|
10927
|
-
PE.test(A.data) || (Q = this._getOrReturnCtx(A, Q),
|
|
10940
|
+
PE.test(A.data) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10928
10941
|
validation: "ulid",
|
|
10929
10942
|
code: G.invalid_string,
|
|
10930
10943
|
message: C.message
|
|
@@ -10933,61 +10946,61 @@ class $ extends K {
|
|
|
10933
10946
|
try {
|
|
10934
10947
|
new URL(A.data);
|
|
10935
10948
|
} catch {
|
|
10936
|
-
Q = this._getOrReturnCtx(A, Q),
|
|
10949
|
+
Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10937
10950
|
validation: "url",
|
|
10938
10951
|
code: G.invalid_string,
|
|
10939
10952
|
message: C.message
|
|
10940
10953
|
}), B.dirty();
|
|
10941
10954
|
}
|
|
10942
|
-
else C.kind === "regex" ? (C.regex.lastIndex = 0, C.regex.test(A.data) || (Q = this._getOrReturnCtx(A, Q),
|
|
10955
|
+
else C.kind === "regex" ? (C.regex.lastIndex = 0, C.regex.test(A.data) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10943
10956
|
validation: "regex",
|
|
10944
10957
|
code: G.invalid_string,
|
|
10945
10958
|
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),
|
|
10959
|
+
}), 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
10960
|
code: G.invalid_string,
|
|
10948
10961
|
validation: { includes: C.value, position: C.position },
|
|
10949
10962
|
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),
|
|
10963
|
+
}), 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
10964
|
code: G.invalid_string,
|
|
10952
10965
|
validation: { startsWith: C.value },
|
|
10953
10966
|
message: C.message
|
|
10954
|
-
}), B.dirty()) : C.kind === "endsWith" ? A.data.endsWith(C.value) || (Q = this._getOrReturnCtx(A, Q),
|
|
10967
|
+
}), B.dirty()) : C.kind === "endsWith" ? A.data.endsWith(C.value) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10955
10968
|
code: G.invalid_string,
|
|
10956
10969
|
validation: { endsWith: C.value },
|
|
10957
10970
|
message: C.message
|
|
10958
|
-
}), B.dirty()) : C.kind === "datetime" ? mB(C).test(A.data) || (Q = this._getOrReturnCtx(A, Q),
|
|
10971
|
+
}), B.dirty()) : C.kind === "datetime" ? mB(C).test(A.data) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10959
10972
|
code: G.invalid_string,
|
|
10960
10973
|
validation: "datetime",
|
|
10961
10974
|
message: C.message
|
|
10962
|
-
}), B.dirty()) : C.kind === "date" ? Qi.test(A.data) || (Q = this._getOrReturnCtx(A, Q),
|
|
10975
|
+
}), B.dirty()) : C.kind === "date" ? Qi.test(A.data) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10963
10976
|
code: G.invalid_string,
|
|
10964
10977
|
validation: "date",
|
|
10965
10978
|
message: C.message
|
|
10966
|
-
}), B.dirty()) : C.kind === "time" ? Ci(C).test(A.data) || (Q = this._getOrReturnCtx(A, Q),
|
|
10979
|
+
}), B.dirty()) : C.kind === "time" ? Ci(C).test(A.data) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10967
10980
|
code: G.invalid_string,
|
|
10968
10981
|
validation: "time",
|
|
10969
10982
|
message: C.message
|
|
10970
|
-
}), B.dirty()) : C.kind === "duration" ? XE.test(A.data) || (Q = this._getOrReturnCtx(A, Q),
|
|
10983
|
+
}), B.dirty()) : C.kind === "duration" ? XE.test(A.data) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10971
10984
|
validation: "duration",
|
|
10972
10985
|
code: G.invalid_string,
|
|
10973
10986
|
message: C.message
|
|
10974
|
-
}), B.dirty()) : C.kind === "ip" ? Ei(A.data, C.version) || (Q = this._getOrReturnCtx(A, Q),
|
|
10987
|
+
}), B.dirty()) : C.kind === "ip" ? Ei(A.data, C.version) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10975
10988
|
validation: "ip",
|
|
10976
10989
|
code: G.invalid_string,
|
|
10977
10990
|
message: C.message
|
|
10978
|
-
}), B.dirty()) : C.kind === "jwt" ? ii(A.data, C.alg) || (Q = this._getOrReturnCtx(A, Q),
|
|
10991
|
+
}), B.dirty()) : C.kind === "jwt" ? ii(A.data, C.alg) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10979
10992
|
validation: "jwt",
|
|
10980
10993
|
code: G.invalid_string,
|
|
10981
10994
|
message: C.message
|
|
10982
|
-
}), B.dirty()) : C.kind === "cidr" ? oi(A.data, C.version) || (Q = this._getOrReturnCtx(A, Q),
|
|
10995
|
+
}), B.dirty()) : C.kind === "cidr" ? oi(A.data, C.version) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10983
10996
|
validation: "cidr",
|
|
10984
10997
|
code: G.invalid_string,
|
|
10985
10998
|
message: C.message
|
|
10986
|
-
}), B.dirty()) : C.kind === "base64" ? gi.test(A.data) || (Q = this._getOrReturnCtx(A, Q),
|
|
10999
|
+
}), B.dirty()) : C.kind === "base64" ? gi.test(A.data) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10987
11000
|
validation: "base64",
|
|
10988
11001
|
code: G.invalid_string,
|
|
10989
11002
|
message: C.message
|
|
10990
|
-
}), B.dirty()) : C.kind === "base64url" ? Bi.test(A.data) || (Q = this._getOrReturnCtx(A, Q),
|
|
11003
|
+
}), B.dirty()) : C.kind === "base64url" ? Bi.test(A.data) || (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
10991
11004
|
validation: "base64url",
|
|
10992
11005
|
code: G.invalid_string,
|
|
10993
11006
|
message: C.message
|
|
@@ -11237,7 +11250,7 @@ class sA extends K {
|
|
|
11237
11250
|
_parse(A) {
|
|
11238
11251
|
if (this._def.coerce && (A.data = Number(A.data)), this._getType(A) !== w.number) {
|
|
11239
11252
|
const C = this._getOrReturnCtx(A);
|
|
11240
|
-
return
|
|
11253
|
+
return n(C, {
|
|
11241
11254
|
code: G.invalid_type,
|
|
11242
11255
|
expected: w.number,
|
|
11243
11256
|
received: C.parsedType
|
|
@@ -11246,30 +11259,30 @@ class sA extends K {
|
|
|
11246
11259
|
let B;
|
|
11247
11260
|
const Q = new b();
|
|
11248
11261
|
for (const C of this._def.checks)
|
|
11249
|
-
C.kind === "int" ? H.isInteger(A.data) || (B = this._getOrReturnCtx(A, B),
|
|
11262
|
+
C.kind === "int" ? H.isInteger(A.data) || (B = this._getOrReturnCtx(A, B), n(B, {
|
|
11250
11263
|
code: G.invalid_type,
|
|
11251
11264
|
expected: "integer",
|
|
11252
11265
|
received: "float",
|
|
11253
11266
|
message: C.message
|
|
11254
|
-
}), Q.dirty()) : C.kind === "min" ? (C.inclusive ? A.data < C.value : A.data <= C.value) && (B = this._getOrReturnCtx(A, B),
|
|
11267
|
+
}), Q.dirty()) : C.kind === "min" ? (C.inclusive ? A.data < C.value : A.data <= C.value) && (B = this._getOrReturnCtx(A, B), n(B, {
|
|
11255
11268
|
code: G.too_small,
|
|
11256
11269
|
minimum: C.value,
|
|
11257
11270
|
type: "number",
|
|
11258
11271
|
inclusive: C.inclusive,
|
|
11259
11272
|
exact: !1,
|
|
11260
11273
|
message: C.message
|
|
11261
|
-
}), Q.dirty()) : C.kind === "max" ? (C.inclusive ? A.data > C.value : A.data >= C.value) && (B = this._getOrReturnCtx(A, B),
|
|
11274
|
+
}), Q.dirty()) : C.kind === "max" ? (C.inclusive ? A.data > C.value : A.data >= C.value) && (B = this._getOrReturnCtx(A, B), n(B, {
|
|
11262
11275
|
code: G.too_big,
|
|
11263
11276
|
maximum: C.value,
|
|
11264
11277
|
type: "number",
|
|
11265
11278
|
inclusive: C.inclusive,
|
|
11266
11279
|
exact: !1,
|
|
11267
11280
|
message: C.message
|
|
11268
|
-
}), Q.dirty()) : C.kind === "multipleOf" ? ai(A.data, C.value) !== 0 && (B = this._getOrReturnCtx(A, B),
|
|
11281
|
+
}), Q.dirty()) : C.kind === "multipleOf" ? ai(A.data, C.value) !== 0 && (B = this._getOrReturnCtx(A, B), n(B, {
|
|
11269
11282
|
code: G.not_multiple_of,
|
|
11270
11283
|
multipleOf: C.value,
|
|
11271
11284
|
message: C.message
|
|
11272
|
-
}), Q.dirty()) : C.kind === "finite" ? Number.isFinite(A.data) || (B = this._getOrReturnCtx(A, B),
|
|
11285
|
+
}), Q.dirty()) : C.kind === "finite" ? Number.isFinite(A.data) || (B = this._getOrReturnCtx(A, B), n(B, {
|
|
11273
11286
|
code: G.not_finite,
|
|
11274
11287
|
message: C.message
|
|
11275
11288
|
}), Q.dirty()) : H.assertNever(C);
|
|
@@ -11418,19 +11431,19 @@ class hA extends K {
|
|
|
11418
11431
|
let B;
|
|
11419
11432
|
const Q = new b();
|
|
11420
11433
|
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),
|
|
11434
|
+
C.kind === "min" ? (C.inclusive ? A.data < C.value : A.data <= C.value) && (B = this._getOrReturnCtx(A, B), n(B, {
|
|
11422
11435
|
code: G.too_small,
|
|
11423
11436
|
type: "bigint",
|
|
11424
11437
|
minimum: C.value,
|
|
11425
11438
|
inclusive: C.inclusive,
|
|
11426
11439
|
message: C.message
|
|
11427
|
-
}), Q.dirty()) : C.kind === "max" ? (C.inclusive ? A.data > C.value : A.data >= C.value) && (B = this._getOrReturnCtx(A, B),
|
|
11440
|
+
}), Q.dirty()) : C.kind === "max" ? (C.inclusive ? A.data > C.value : A.data >= C.value) && (B = this._getOrReturnCtx(A, B), n(B, {
|
|
11428
11441
|
code: G.too_big,
|
|
11429
11442
|
type: "bigint",
|
|
11430
11443
|
maximum: C.value,
|
|
11431
11444
|
inclusive: C.inclusive,
|
|
11432
11445
|
message: C.message
|
|
11433
|
-
}), Q.dirty()) : C.kind === "multipleOf" ? A.data % C.value !== BigInt(0) && (B = this._getOrReturnCtx(A, B),
|
|
11446
|
+
}), Q.dirty()) : C.kind === "multipleOf" ? A.data % C.value !== BigInt(0) && (B = this._getOrReturnCtx(A, B), n(B, {
|
|
11434
11447
|
code: G.not_multiple_of,
|
|
11435
11448
|
multipleOf: C.value,
|
|
11436
11449
|
message: C.message
|
|
@@ -11439,7 +11452,7 @@ class hA extends K {
|
|
|
11439
11452
|
}
|
|
11440
11453
|
_getInvalidInput(A) {
|
|
11441
11454
|
const I = this._getOrReturnCtx(A);
|
|
11442
|
-
return
|
|
11455
|
+
return n(I, {
|
|
11443
11456
|
code: G.invalid_type,
|
|
11444
11457
|
expected: w.bigint,
|
|
11445
11458
|
received: I.parsedType
|
|
@@ -11542,7 +11555,7 @@ class XA extends K {
|
|
|
11542
11555
|
_parse(A) {
|
|
11543
11556
|
if (this._def.coerce && (A.data = !!A.data), this._getType(A) !== w.boolean) {
|
|
11544
11557
|
const B = this._getOrReturnCtx(A);
|
|
11545
|
-
return
|
|
11558
|
+
return n(B, {
|
|
11546
11559
|
code: G.invalid_type,
|
|
11547
11560
|
expected: w.boolean,
|
|
11548
11561
|
received: B.parsedType
|
|
@@ -11560,7 +11573,7 @@ class UA extends K {
|
|
|
11560
11573
|
_parse(A) {
|
|
11561
11574
|
if (this._def.coerce && (A.data = new Date(A.data)), this._getType(A) !== w.date) {
|
|
11562
11575
|
const C = this._getOrReturnCtx(A);
|
|
11563
|
-
return
|
|
11576
|
+
return n(C, {
|
|
11564
11577
|
code: G.invalid_type,
|
|
11565
11578
|
expected: w.date,
|
|
11566
11579
|
received: C.parsedType
|
|
@@ -11568,21 +11581,21 @@ class UA extends K {
|
|
|
11568
11581
|
}
|
|
11569
11582
|
if (isNaN(A.data.getTime())) {
|
|
11570
11583
|
const C = this._getOrReturnCtx(A);
|
|
11571
|
-
return
|
|
11584
|
+
return n(C, {
|
|
11572
11585
|
code: G.invalid_date
|
|
11573
11586
|
}), L;
|
|
11574
11587
|
}
|
|
11575
11588
|
const B = new b();
|
|
11576
11589
|
let Q;
|
|
11577
11590
|
for (const C of this._def.checks)
|
|
11578
|
-
C.kind === "min" ? A.data.getTime() < C.value && (Q = this._getOrReturnCtx(A, Q),
|
|
11591
|
+
C.kind === "min" ? A.data.getTime() < C.value && (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
11579
11592
|
code: G.too_small,
|
|
11580
11593
|
message: C.message,
|
|
11581
11594
|
inclusive: !0,
|
|
11582
11595
|
exact: !1,
|
|
11583
11596
|
minimum: C.value,
|
|
11584
11597
|
type: "date"
|
|
11585
|
-
}), B.dirty()) : C.kind === "max" ? A.data.getTime() > C.value && (Q = this._getOrReturnCtx(A, Q),
|
|
11598
|
+
}), B.dirty()) : C.kind === "max" ? A.data.getTime() > C.value && (Q = this._getOrReturnCtx(A, Q), n(Q, {
|
|
11586
11599
|
code: G.too_big,
|
|
11587
11600
|
message: C.message,
|
|
11588
11601
|
inclusive: !0,
|
|
@@ -11638,7 +11651,7 @@ class kI extends K {
|
|
|
11638
11651
|
_parse(A) {
|
|
11639
11652
|
if (this._getType(A) !== w.symbol) {
|
|
11640
11653
|
const B = this._getOrReturnCtx(A);
|
|
11641
|
-
return
|
|
11654
|
+
return n(B, {
|
|
11642
11655
|
code: G.invalid_type,
|
|
11643
11656
|
expected: w.symbol,
|
|
11644
11657
|
received: B.parsedType
|
|
@@ -11655,7 +11668,7 @@ class jA extends K {
|
|
|
11655
11668
|
_parse(A) {
|
|
11656
11669
|
if (this._getType(A) !== w.undefined) {
|
|
11657
11670
|
const B = this._getOrReturnCtx(A);
|
|
11658
|
-
return
|
|
11671
|
+
return n(B, {
|
|
11659
11672
|
code: G.invalid_type,
|
|
11660
11673
|
expected: w.undefined,
|
|
11661
11674
|
received: B.parsedType
|
|
@@ -11672,7 +11685,7 @@ class zA extends K {
|
|
|
11672
11685
|
_parse(A) {
|
|
11673
11686
|
if (this._getType(A) !== w.null) {
|
|
11674
11687
|
const B = this._getOrReturnCtx(A);
|
|
11675
|
-
return
|
|
11688
|
+
return n(B, {
|
|
11676
11689
|
code: G.invalid_type,
|
|
11677
11690
|
expected: w.null,
|
|
11678
11691
|
received: B.parsedType
|
|
@@ -11712,7 +11725,7 @@ SA.create = (g) => new SA({
|
|
|
11712
11725
|
class DA extends K {
|
|
11713
11726
|
_parse(A) {
|
|
11714
11727
|
const I = this._getOrReturnCtx(A);
|
|
11715
|
-
return
|
|
11728
|
+
return n(I, {
|
|
11716
11729
|
code: G.invalid_type,
|
|
11717
11730
|
expected: w.never,
|
|
11718
11731
|
received: I.parsedType
|
|
@@ -11727,7 +11740,7 @@ class LI extends K {
|
|
|
11727
11740
|
_parse(A) {
|
|
11728
11741
|
if (this._getType(A) !== w.undefined) {
|
|
11729
11742
|
const B = this._getOrReturnCtx(A);
|
|
11730
|
-
return
|
|
11743
|
+
return n(B, {
|
|
11731
11744
|
code: G.invalid_type,
|
|
11732
11745
|
expected: w.void,
|
|
11733
11746
|
received: B.parsedType
|
|
@@ -11744,14 +11757,14 @@ class BA extends K {
|
|
|
11744
11757
|
_parse(A) {
|
|
11745
11758
|
const { ctx: I, status: B } = this._processInputParams(A), Q = this._def;
|
|
11746
11759
|
if (I.parsedType !== w.array)
|
|
11747
|
-
return
|
|
11760
|
+
return n(I, {
|
|
11748
11761
|
code: G.invalid_type,
|
|
11749
11762
|
expected: w.array,
|
|
11750
11763
|
received: I.parsedType
|
|
11751
11764
|
}), L;
|
|
11752
11765
|
if (Q.exactLength !== null) {
|
|
11753
11766
|
const E = I.data.length > Q.exactLength.value, i = I.data.length < Q.exactLength.value;
|
|
11754
|
-
(E || i) && (
|
|
11767
|
+
(E || i) && (n(I, {
|
|
11755
11768
|
code: E ? G.too_big : G.too_small,
|
|
11756
11769
|
minimum: i ? Q.exactLength.value : void 0,
|
|
11757
11770
|
maximum: E ? Q.exactLength.value : void 0,
|
|
@@ -11761,14 +11774,14 @@ class BA extends K {
|
|
|
11761
11774
|
message: Q.exactLength.message
|
|
11762
11775
|
}), B.dirty());
|
|
11763
11776
|
}
|
|
11764
|
-
if (Q.minLength !== null && I.data.length < Q.minLength.value && (
|
|
11777
|
+
if (Q.minLength !== null && I.data.length < Q.minLength.value && (n(I, {
|
|
11765
11778
|
code: G.too_small,
|
|
11766
11779
|
minimum: Q.minLength.value,
|
|
11767
11780
|
type: "array",
|
|
11768
11781
|
inclusive: !0,
|
|
11769
11782
|
exact: !1,
|
|
11770
11783
|
message: Q.minLength.message
|
|
11771
|
-
}), B.dirty()), Q.maxLength !== null && I.data.length > Q.maxLength.value && (
|
|
11784
|
+
}), B.dirty()), Q.maxLength !== null && I.data.length > Q.maxLength.value && (n(I, {
|
|
11772
11785
|
code: G.too_big,
|
|
11773
11786
|
maximum: Q.maxLength.value,
|
|
11774
11787
|
type: "array",
|
|
@@ -11842,7 +11855,7 @@ class f extends K {
|
|
|
11842
11855
|
_parse(A) {
|
|
11843
11856
|
if (this._getType(A) !== w.object) {
|
|
11844
11857
|
const a = this._getOrReturnCtx(A);
|
|
11845
|
-
return
|
|
11858
|
+
return n(a, {
|
|
11846
11859
|
code: G.invalid_type,
|
|
11847
11860
|
expected: w.object,
|
|
11848
11861
|
received: a.parsedType
|
|
@@ -11870,7 +11883,7 @@ class f extends K {
|
|
|
11870
11883
|
value: { status: "valid", value: Q.data[D] }
|
|
11871
11884
|
});
|
|
11872
11885
|
else if (a === "strict")
|
|
11873
|
-
i.length > 0 && (
|
|
11886
|
+
i.length > 0 && (n(Q, {
|
|
11874
11887
|
code: G.unrecognized_keys,
|
|
11875
11888
|
keys: i
|
|
11876
11889
|
}), B.dirty());
|
|
@@ -12127,7 +12140,7 @@ class _A extends K {
|
|
|
12127
12140
|
if (i.result.status === "dirty")
|
|
12128
12141
|
return I.common.issues.push(...i.ctx.common.issues), i.result;
|
|
12129
12142
|
const E = C.map((i) => new j(i.ctx.common.issues));
|
|
12130
|
-
return
|
|
12143
|
+
return n(I, {
|
|
12131
12144
|
code: G.invalid_union,
|
|
12132
12145
|
unionErrors: E
|
|
12133
12146
|
}), L;
|
|
@@ -12174,7 +12187,7 @@ class _A extends K {
|
|
|
12174
12187
|
if (C)
|
|
12175
12188
|
return I.common.issues.push(...C.ctx.common.issues), C.result;
|
|
12176
12189
|
const i = E.map((o) => new j(o));
|
|
12177
|
-
return
|
|
12190
|
+
return n(I, {
|
|
12178
12191
|
code: G.invalid_union,
|
|
12179
12192
|
unionErrors: i
|
|
12180
12193
|
}), L;
|
|
@@ -12194,7 +12207,7 @@ class qI extends K {
|
|
|
12194
12207
|
_parse(A) {
|
|
12195
12208
|
const { ctx: I } = this._processInputParams(A);
|
|
12196
12209
|
if (I.parsedType !== w.object)
|
|
12197
|
-
return
|
|
12210
|
+
return n(I, {
|
|
12198
12211
|
code: G.invalid_type,
|
|
12199
12212
|
expected: w.object,
|
|
12200
12213
|
received: I.parsedType
|
|
@@ -12208,7 +12221,7 @@ class qI extends K {
|
|
|
12208
12221
|
data: I.data,
|
|
12209
12222
|
path: I.path,
|
|
12210
12223
|
parent: I
|
|
12211
|
-
}) : (
|
|
12224
|
+
}) : (n(I, {
|
|
12212
12225
|
code: G.invalid_union_discriminator,
|
|
12213
12226
|
options: Array.from(this.optionsMap.keys()),
|
|
12214
12227
|
path: [B]
|
|
@@ -12284,7 +12297,7 @@ class $A extends K {
|
|
|
12284
12297
|
if (Bg(C) || Bg(E))
|
|
12285
12298
|
return L;
|
|
12286
12299
|
const i = Cg(C.value, E.value);
|
|
12287
|
-
return i.valid ? ((Qg(C) || Qg(E)) && I.dirty(), { status: I.value, value: i.data }) : (
|
|
12300
|
+
return i.valid ? ((Qg(C) || Qg(E)) && I.dirty(), { status: I.value, value: i.data }) : (n(B, {
|
|
12288
12301
|
code: G.invalid_intersection_types
|
|
12289
12302
|
}), L);
|
|
12290
12303
|
};
|
|
@@ -12320,20 +12333,20 @@ class iA extends K {
|
|
|
12320
12333
|
_parse(A) {
|
|
12321
12334
|
const { status: I, ctx: B } = this._processInputParams(A);
|
|
12322
12335
|
if (B.parsedType !== w.array)
|
|
12323
|
-
return
|
|
12336
|
+
return n(B, {
|
|
12324
12337
|
code: G.invalid_type,
|
|
12325
12338
|
expected: w.array,
|
|
12326
12339
|
received: B.parsedType
|
|
12327
12340
|
}), L;
|
|
12328
12341
|
if (B.data.length < this._def.items.length)
|
|
12329
|
-
return
|
|
12342
|
+
return n(B, {
|
|
12330
12343
|
code: G.too_small,
|
|
12331
12344
|
minimum: this._def.items.length,
|
|
12332
12345
|
inclusive: !0,
|
|
12333
12346
|
exact: !1,
|
|
12334
12347
|
type: "array"
|
|
12335
12348
|
}), L;
|
|
12336
|
-
!this._def.rest && B.data.length > this._def.items.length && (
|
|
12349
|
+
!this._def.rest && B.data.length > this._def.items.length && (n(B, {
|
|
12337
12350
|
code: G.too_big,
|
|
12338
12351
|
maximum: this._def.items.length,
|
|
12339
12352
|
inclusive: !0,
|
|
@@ -12376,7 +12389,7 @@ class AI extends K {
|
|
|
12376
12389
|
_parse(A) {
|
|
12377
12390
|
const { status: I, ctx: B } = this._processInputParams(A);
|
|
12378
12391
|
if (B.parsedType !== w.object)
|
|
12379
|
-
return
|
|
12392
|
+
return n(B, {
|
|
12380
12393
|
code: G.invalid_type,
|
|
12381
12394
|
expected: w.object,
|
|
12382
12395
|
received: B.parsedType
|
|
@@ -12417,7 +12430,7 @@ class JI extends K {
|
|
|
12417
12430
|
_parse(A) {
|
|
12418
12431
|
const { status: I, ctx: B } = this._processInputParams(A);
|
|
12419
12432
|
if (B.parsedType !== w.map)
|
|
12420
|
-
return
|
|
12433
|
+
return n(B, {
|
|
12421
12434
|
code: G.invalid_type,
|
|
12422
12435
|
expected: w.map,
|
|
12423
12436
|
received: B.parsedType
|
|
@@ -12459,20 +12472,20 @@ class kA extends K {
|
|
|
12459
12472
|
_parse(A) {
|
|
12460
12473
|
const { status: I, ctx: B } = this._processInputParams(A);
|
|
12461
12474
|
if (B.parsedType !== w.set)
|
|
12462
|
-
return
|
|
12475
|
+
return n(B, {
|
|
12463
12476
|
code: G.invalid_type,
|
|
12464
12477
|
expected: w.set,
|
|
12465
12478
|
received: B.parsedType
|
|
12466
12479
|
}), L;
|
|
12467
12480
|
const Q = this._def;
|
|
12468
|
-
Q.minSize !== null && B.data.size < Q.minSize.value && (
|
|
12481
|
+
Q.minSize !== null && B.data.size < Q.minSize.value && (n(B, {
|
|
12469
12482
|
code: G.too_small,
|
|
12470
12483
|
minimum: Q.minSize.value,
|
|
12471
12484
|
type: "set",
|
|
12472
12485
|
inclusive: !0,
|
|
12473
12486
|
exact: !1,
|
|
12474
12487
|
message: Q.minSize.message
|
|
12475
|
-
}), I.dirty()), Q.maxSize !== null && B.data.size > Q.maxSize.value && (
|
|
12488
|
+
}), I.dirty()), Q.maxSize !== null && B.data.size > Q.maxSize.value && (n(B, {
|
|
12476
12489
|
code: G.too_big,
|
|
12477
12490
|
maximum: Q.maxSize.value,
|
|
12478
12491
|
type: "set",
|
|
@@ -12526,7 +12539,7 @@ class dA extends K {
|
|
|
12526
12539
|
_parse(A) {
|
|
12527
12540
|
const { ctx: I } = this._processInputParams(A);
|
|
12528
12541
|
if (I.parsedType !== w.function)
|
|
12529
|
-
return
|
|
12542
|
+
return n(I, {
|
|
12530
12543
|
code: G.invalid_type,
|
|
12531
12544
|
expected: w.function,
|
|
12532
12545
|
received: I.parsedType
|
|
@@ -12638,7 +12651,7 @@ class gI extends K {
|
|
|
12638
12651
|
_parse(A) {
|
|
12639
12652
|
if (A.data !== this._def.value) {
|
|
12640
12653
|
const I = this._getOrReturnCtx(A);
|
|
12641
|
-
return
|
|
12654
|
+
return n(I, {
|
|
12642
12655
|
received: I.data,
|
|
12643
12656
|
code: G.invalid_literal,
|
|
12644
12657
|
expected: this._def.value
|
|
@@ -12669,7 +12682,7 @@ class yA extends K {
|
|
|
12669
12682
|
_parse(A) {
|
|
12670
12683
|
if (typeof A.data != "string") {
|
|
12671
12684
|
const I = this._getOrReturnCtx(A), B = this._def.values;
|
|
12672
|
-
return
|
|
12685
|
+
return n(I, {
|
|
12673
12686
|
expected: H.joinValues(B),
|
|
12674
12687
|
received: I.parsedType,
|
|
12675
12688
|
code: G.invalid_type
|
|
@@ -12677,7 +12690,7 @@ class yA extends K {
|
|
|
12677
12690
|
}
|
|
12678
12691
|
if (UI(this, WA) || lB(this, WA, new Set(this._def.values)), !UI(this, WA).has(A.data)) {
|
|
12679
12692
|
const I = this._getOrReturnCtx(A), B = this._def.values;
|
|
12680
|
-
return
|
|
12693
|
+
return n(I, {
|
|
12681
12694
|
received: I.data,
|
|
12682
12695
|
code: G.invalid_enum_value,
|
|
12683
12696
|
options: B
|
|
@@ -12729,7 +12742,7 @@ class BI extends K {
|
|
|
12729
12742
|
const I = H.getValidEnumValues(this._def.values), B = this._getOrReturnCtx(A);
|
|
12730
12743
|
if (B.parsedType !== w.string && B.parsedType !== w.number) {
|
|
12731
12744
|
const Q = H.objectValues(I);
|
|
12732
|
-
return
|
|
12745
|
+
return n(B, {
|
|
12733
12746
|
expected: H.joinValues(Q),
|
|
12734
12747
|
received: B.parsedType,
|
|
12735
12748
|
code: G.invalid_type
|
|
@@ -12737,7 +12750,7 @@ class BI extends K {
|
|
|
12737
12750
|
}
|
|
12738
12751
|
if (UI(this, xA) || lB(this, xA, new Set(H.getValidEnumValues(this._def.values))), !UI(this, xA).has(A.data)) {
|
|
12739
12752
|
const Q = H.objectValues(I);
|
|
12740
|
-
return
|
|
12753
|
+
return n(B, {
|
|
12741
12754
|
received: B.data,
|
|
12742
12755
|
code: G.invalid_enum_value,
|
|
12743
12756
|
options: Q
|
|
@@ -12762,7 +12775,7 @@ class lA extends K {
|
|
|
12762
12775
|
_parse(A) {
|
|
12763
12776
|
const { ctx: I } = this._processInputParams(A);
|
|
12764
12777
|
if (I.parsedType !== w.promise && I.common.async === !1)
|
|
12765
|
-
return
|
|
12778
|
+
return n(I, {
|
|
12766
12779
|
code: G.invalid_type,
|
|
12767
12780
|
expected: w.promise,
|
|
12768
12781
|
received: I.parsedType
|
|
@@ -12789,7 +12802,7 @@ class QA extends K {
|
|
|
12789
12802
|
_parse(A) {
|
|
12790
12803
|
const { status: I, ctx: B } = this._processInputParams(A), Q = this._def.effect || null, C = {
|
|
12791
12804
|
addIssue: (E) => {
|
|
12792
|
-
|
|
12805
|
+
n(B, E), E.fatal ? I.abort() : I.dirty();
|
|
12793
12806
|
},
|
|
12794
12807
|
get path() {
|
|
12795
12808
|
return B.path;
|
|
@@ -12961,7 +12974,7 @@ class YI extends K {
|
|
|
12961
12974
|
_parse(A) {
|
|
12962
12975
|
if (this._getType(A) !== w.nan) {
|
|
12963
12976
|
const B = this._getOrReturnCtx(A);
|
|
12964
|
-
return
|
|
12977
|
+
return n(B, {
|
|
12965
12978
|
code: G.invalid_type,
|
|
12966
12979
|
expected: w.nan,
|
|
12967
12980
|
received: B.parsedType
|
|
@@ -13073,7 +13086,7 @@ var k;
|
|
|
13073
13086
|
})(k || (k = {}));
|
|
13074
13087
|
const hi = (g, A = {
|
|
13075
13088
|
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,
|
|
13089
|
+
}) => 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
13090
|
string: (g) => $.create({ ...g, coerce: !0 }),
|
|
13078
13091
|
number: (g) => sA.create({ ...g, coerce: !0 }),
|
|
13079
13092
|
boolean: (g) => XA.create({
|
|
@@ -13090,7 +13103,7 @@ var s = /* @__PURE__ */ Object.freeze({
|
|
|
13090
13103
|
getErrorMap: NI,
|
|
13091
13104
|
makeIssue: cI,
|
|
13092
13105
|
EMPTY_PATH: xE,
|
|
13093
|
-
addIssueToContext:
|
|
13106
|
+
addIssueToContext: n,
|
|
13094
13107
|
ParseStatus: b,
|
|
13095
13108
|
INVALID: L,
|
|
13096
13109
|
DIRTY: MA,
|
|
@@ -13187,10 +13200,10 @@ var s = /* @__PURE__ */ Object.freeze({
|
|
|
13187
13200
|
set: Ki,
|
|
13188
13201
|
strictObject: Ui,
|
|
13189
13202
|
string: WB,
|
|
13190
|
-
symbol:
|
|
13203
|
+
symbol: ei,
|
|
13191
13204
|
transformer: DB,
|
|
13192
13205
|
tuple: Yi,
|
|
13193
|
-
undefined:
|
|
13206
|
+
undefined: ni,
|
|
13194
13207
|
union: ki,
|
|
13195
13208
|
unknown: ri,
|
|
13196
13209
|
void: Ri,
|
|
@@ -13744,7 +13757,7 @@ function Jg(g) {
|
|
|
13744
13757
|
${JSON.stringify(g)}`);
|
|
13745
13758
|
}
|
|
13746
13759
|
}
|
|
13747
|
-
class
|
|
13760
|
+
class eI {
|
|
13748
13761
|
location;
|
|
13749
13762
|
version;
|
|
13750
13763
|
constructor(A) {
|
|
@@ -13784,7 +13797,7 @@ class nI {
|
|
|
13784
13797
|
*/
|
|
13785
13798
|
static fromHttp(A) {
|
|
13786
13799
|
const I = new uA(A.url);
|
|
13787
|
-
return new
|
|
13800
|
+
return new eI({
|
|
13788
13801
|
location: new X(I),
|
|
13789
13802
|
version: A.version
|
|
13790
13803
|
});
|
|
@@ -13801,7 +13814,7 @@ class nI {
|
|
|
13801
13814
|
*/
|
|
13802
13815
|
static fromS3(A) {
|
|
13803
13816
|
const I = new Ug(A);
|
|
13804
|
-
return new
|
|
13817
|
+
return new eI({
|
|
13805
13818
|
location: new X(I),
|
|
13806
13819
|
version: A.version
|
|
13807
13820
|
});
|
|
@@ -13817,7 +13830,7 @@ class nI {
|
|
|
13817
13830
|
*/
|
|
13818
13831
|
static fromFileSystem(A) {
|
|
13819
13832
|
const I = new cg(A.directory);
|
|
13820
|
-
return new
|
|
13833
|
+
return new eI({
|
|
13821
13834
|
location: new X(I, A.path),
|
|
13822
13835
|
version: A.version
|
|
13823
13836
|
});
|
|
@@ -13988,7 +14001,7 @@ export {
|
|
|
13988
14001
|
Fo as LabelImageLayer,
|
|
13989
14002
|
GA as Layer,
|
|
13990
14003
|
vQ as LayerManager,
|
|
13991
|
-
|
|
14004
|
+
eI as OmeZarrImageSource,
|
|
13992
14005
|
so as OrthographicCamera,
|
|
13993
14006
|
yo as PanZoomControls,
|
|
13994
14007
|
ho as PerspectiveCamera,
|
|
@@ -13998,9 +14011,9 @@ export {
|
|
|
13998
14011
|
Yo as Spherical,
|
|
13999
14012
|
iI as Texture2DArray,
|
|
14000
14013
|
yg as Texture3D,
|
|
14001
|
-
|
|
14014
|
+
eo as TracksLayer,
|
|
14002
14015
|
_Q as Viewport,
|
|
14003
|
-
|
|
14016
|
+
no as VolumeLayer,
|
|
14004
14017
|
uQ as WebGLRenderer,
|
|
14005
14018
|
ko as createExplorationPolicy,
|
|
14006
14019
|
Yg as createImageSourcePolicy,
|