@idetik/core 0.22.1 → 0.23.0

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.js CHANGED
@@ -328,6 +328,7 @@ uniform float EarlyTerminationAlpha;
328
328
  uniform vec4 Visible;
329
329
  uniform vec4 ValueOffset;
330
330
  uniform vec4 ValueScale;
331
+ uniform vec4 ChannelOpacity;
331
332
  uniform vec3 Color[4];
332
333
 
333
334
  vec2 findBoxIntersectionsAlongRay(vec3 rayOrigin, vec3 rayDir, vec3 boxMin, vec3 boxMax) {
@@ -416,7 +417,7 @@ void main() {
416
417
  for (int ch = 0; ch < 4; ch++) {
417
418
  if (!bool(Visible[ch]) || sampleValues[ch] == 0.0) continue;
418
419
  sampleColor = Color[ch];
419
- sampleAlpha = clamp(sampleValues[ch] * intensityScale, 0.0, 1.0);
420
+ sampleAlpha = clamp(sampleValues[ch] * intensityScale * ChannelOpacity[ch], 0.0, 1.0);
420
421
  blendedSampleAlpha = (1.0 - accumulatedColor.a) * sampleAlpha;
421
422
 
422
423
 
@@ -589,25 +590,25 @@ function RE() {
589
590
  }
590
591
  return "development";
591
592
  }
592
- class u {
593
+ class H {
593
594
  static logLevel_ = RE() === "production" ? "warn" : "debug";
594
595
  static setLogLevel(A) {
595
- u.logLevel_ = A;
596
+ H.logLevel_ = A;
596
597
  }
597
598
  static debug(A, I, ...g) {
598
- u.log("debug", A, I, ...g);
599
+ H.log("debug", A, I, ...g);
599
600
  }
600
601
  static info(A, I, ...g) {
601
- u.log("info", A, I, ...g);
602
+ H.log("info", A, I, ...g);
602
603
  }
603
604
  static warn(A, I, ...g) {
604
- u.log("warn", A, I, ...g);
605
+ H.log("warn", A, I, ...g);
605
606
  }
606
607
  static error(A, I, ...g) {
607
- u.log("error", A, I, ...g);
608
+ H.log("error", A, I, ...g);
608
609
  }
609
610
  static log(A, I, g, ...B) {
610
- if (BC[A] < BC[u.logLevel_]) return;
611
+ if (BC[A] < BC[H.logLevel_]) return;
611
612
  const Q = (/* @__PURE__ */ new Date()).toISOString(), E = NE[A], i = `[${Q}][${A.toUpperCase()}][${I}]`, o = [`${E}${i}`, g, ...B];
612
613
  switch (A) {
613
614
  case "debug":
@@ -712,7 +713,7 @@ class kE {
712
713
  `Unsupported uniform type "${g.type}" (GLenum) found in shader program for uniform "${g.name}"`
713
714
  );
714
715
  const B = this.gl_.getUniformLocation(this.program_, g.name);
715
- B && (this.uniformInfo_.set(g.name, [B, g]), u.debug(
716
+ B && (this.uniformInfo_.set(g.name, [B, g]), H.debug(
716
717
  "WebGLShaderProgram",
717
718
  "Uniform found:",
718
719
  g.name,
@@ -845,19 +846,19 @@ function ME(C, A, I, g, B, Q, E, i, o, s, t, a, r, D, F, U) {
845
846
  return S[0] = C, S[1] = A, S[2] = I, S[3] = g, S[4] = B, S[5] = Q, S[6] = E, S[7] = i, S[8] = o, S[9] = s, S[10] = t, S[11] = a, S[12] = r, S[13] = D, S[14] = F, S[15] = U, S;
846
847
  }
847
848
  function Fg(C, A) {
848
- var I = A[0], g = A[1], B = A[2], Q = A[3], E = A[4], i = A[5], o = A[6], s = A[7], t = A[8], a = A[9], r = A[10], D = A[11], F = A[12], U = A[13], S = A[14], d = A[15], H = I * i - g * E, k = I * o - B * E, R = I * s - Q * E, L = g * o - B * i, Y = g * s - Q * i, T = B * s - Q * o, IA = t * U - a * F, CA = t * S - r * F, z = t * d - D * F, gA = a * S - r * U, SA = a * d - D * U, NA = r * d - D * S, oA = H * NA - k * SA + R * gA + L * z - Y * CA + T * IA;
849
- return oA ? (oA = 1 / oA, C[0] = (i * NA - o * SA + s * gA) * oA, C[1] = (B * SA - g * NA - Q * gA) * oA, C[2] = (U * T - S * Y + d * L) * oA, C[3] = (r * Y - a * T - D * L) * oA, C[4] = (o * z - E * NA - s * CA) * oA, C[5] = (I * NA - B * z + Q * CA) * oA, C[6] = (S * R - F * T - d * k) * oA, C[7] = (t * T - r * R + D * k) * oA, C[8] = (E * SA - i * z + s * IA) * oA, C[9] = (g * z - I * SA - Q * IA) * oA, C[10] = (F * Y - U * R + d * H) * oA, C[11] = (a * R - t * Y - D * H) * oA, C[12] = (i * CA - E * gA - o * IA) * oA, C[13] = (I * gA - g * CA + B * IA) * oA, C[14] = (U * k - F * L - S * H) * oA, C[15] = (t * L - a * k + r * H) * oA, C) : null;
849
+ var I = A[0], g = A[1], B = A[2], Q = A[3], E = A[4], i = A[5], o = A[6], s = A[7], t = A[8], a = A[9], r = A[10], D = A[11], F = A[12], U = A[13], S = A[14], d = A[15], u = I * i - g * E, k = I * o - B * E, R = I * s - Q * E, L = g * o - B * i, Y = g * s - Q * i, T = B * s - Q * o, IA = t * U - a * F, CA = t * S - r * F, z = t * d - D * F, gA = a * S - r * U, SA = a * d - D * U, NA = r * d - D * S, oA = u * NA - k * SA + R * gA + L * z - Y * CA + T * IA;
850
+ return oA ? (oA = 1 / oA, C[0] = (i * NA - o * SA + s * gA) * oA, C[1] = (B * SA - g * NA - Q * gA) * oA, C[2] = (U * T - S * Y + d * L) * oA, C[3] = (r * Y - a * T - D * L) * oA, C[4] = (o * z - E * NA - s * CA) * oA, C[5] = (I * NA - B * z + Q * CA) * oA, C[6] = (S * R - F * T - d * k) * oA, C[7] = (t * T - r * R + D * k) * oA, C[8] = (E * SA - i * z + s * IA) * oA, C[9] = (g * z - I * SA - Q * IA) * oA, C[10] = (F * Y - U * R + d * u) * oA, C[11] = (a * R - t * Y - D * u) * oA, C[12] = (i * CA - E * gA - o * IA) * oA, C[13] = (I * gA - g * CA + B * IA) * oA, C[14] = (U * k - F * L - S * u) * oA, C[15] = (t * L - a * k + r * u) * oA, C) : null;
850
851
  }
851
- function VA(C, A, I) {
852
- var g = A[0], B = A[1], Q = A[2], E = A[3], i = A[4], o = A[5], s = A[6], t = A[7], a = A[8], r = A[9], D = A[10], F = A[11], U = A[12], S = A[13], d = A[14], H = A[15], k = I[0], R = I[1], L = I[2], Y = I[3];
853
- return C[0] = k * g + R * i + L * a + Y * U, C[1] = k * B + R * o + L * r + Y * S, C[2] = k * Q + R * s + L * D + Y * d, C[3] = k * E + R * t + L * F + Y * H, k = I[4], R = I[5], L = I[6], Y = I[7], C[4] = k * g + R * i + L * a + Y * U, C[5] = k * B + R * o + L * r + Y * S, C[6] = k * Q + R * s + L * D + Y * d, C[7] = k * E + R * t + L * F + Y * H, k = I[8], R = I[9], L = I[10], Y = I[11], C[8] = k * g + R * i + L * a + Y * U, C[9] = k * B + R * o + L * r + Y * S, C[10] = k * Q + R * s + L * D + Y * d, C[11] = k * E + R * t + L * F + Y * H, k = I[12], R = I[13], L = I[14], Y = I[15], C[12] = k * g + R * i + L * a + Y * U, C[13] = k * B + R * o + L * r + Y * S, C[14] = k * Q + R * s + L * D + Y * d, C[15] = k * E + R * t + L * F + Y * H, C;
852
+ function OA(C, A, I) {
853
+ var g = A[0], B = A[1], Q = A[2], E = A[3], i = A[4], o = A[5], s = A[6], t = A[7], a = A[8], r = A[9], D = A[10], F = A[11], U = A[12], S = A[13], d = A[14], u = A[15], k = I[0], R = I[1], L = I[2], Y = I[3];
854
+ return C[0] = k * g + R * i + L * a + Y * U, C[1] = k * B + R * o + L * r + Y * S, C[2] = k * Q + R * s + L * D + Y * d, C[3] = k * E + R * t + L * F + Y * u, k = I[4], R = I[5], L = I[6], Y = I[7], C[4] = k * g + R * i + L * a + Y * U, C[5] = k * B + R * o + L * r + Y * S, C[6] = k * Q + R * s + L * D + Y * d, C[7] = k * E + R * t + L * F + Y * u, k = I[8], R = I[9], L = I[10], Y = I[11], C[8] = k * g + R * i + L * a + Y * U, C[9] = k * B + R * o + L * r + Y * S, C[10] = k * Q + R * s + L * D + Y * d, C[11] = k * E + R * t + L * F + Y * u, k = I[12], R = I[13], L = I[14], Y = I[15], C[12] = k * g + R * i + L * a + Y * U, C[13] = k * B + R * o + L * r + Y * S, C[14] = k * Q + R * s + L * D + Y * d, C[15] = k * E + R * t + L * F + Y * u, C;
854
855
  }
855
856
  function fE(C, A) {
856
857
  return C[0] = A[0], C[1] = 0, C[2] = 0, C[3] = 0, C[4] = 0, C[5] = A[1], C[6] = 0, C[7] = 0, C[8] = 0, C[9] = 0, C[10] = A[2], C[11] = 0, C[12] = 0, C[13] = 0, C[14] = 0, C[15] = 1, C;
857
858
  }
858
859
  function KE(C, A, I, g) {
859
- var B = A[0], Q = A[1], E = A[2], i = A[3], o = B + B, s = Q + Q, t = E + E, a = B * o, r = B * s, D = B * t, F = Q * s, U = Q * t, S = E * t, d = i * o, H = i * s, k = i * t, R = g[0], L = g[1], Y = g[2];
860
- return C[0] = (1 - (F + S)) * R, C[1] = (r + k) * R, C[2] = (D - H) * R, C[3] = 0, C[4] = (r - k) * L, C[5] = (1 - (a + S)) * L, C[6] = (U + d) * L, C[7] = 0, C[8] = (D + H) * Y, C[9] = (U - d) * Y, C[10] = (1 - (a + F)) * Y, C[11] = 0, C[12] = I[0], C[13] = I[1], C[14] = I[2], C[15] = 1, C;
860
+ var B = A[0], Q = A[1], E = A[2], i = A[3], o = B + B, s = Q + Q, t = E + E, a = B * o, r = B * s, D = B * t, F = Q * s, U = Q * t, S = E * t, d = i * o, u = i * s, k = i * t, R = g[0], L = g[1], Y = g[2];
861
+ return C[0] = (1 - (F + S)) * R, C[1] = (r + k) * R, C[2] = (D - u) * R, C[3] = 0, C[4] = (r - k) * L, C[5] = (1 - (a + S)) * L, C[6] = (U + d) * L, C[7] = 0, C[8] = (D + u) * Y, C[9] = (U - d) * Y, C[10] = (1 - (a + F)) * Y, C[11] = 0, C[12] = I[0], C[13] = I[1], C[14] = I[2], C[15] = 1, C;
861
862
  }
862
863
  function uE(C, A, I, g, B) {
863
864
  var Q = 1 / Math.tan(A / 2);
@@ -881,8 +882,8 @@ function mE(C, A, I, g) {
881
882
  return D = F * F + U * U + S * S, D > 0 && (D = 1 / Math.sqrt(D), F *= D, U *= D, S *= D), C[0] = F, C[1] = U, C[2] = S, C[3] = 0, C[4] = a * S - r * U, C[5] = r * F - t * S, C[6] = t * U - a * F, C[7] = 0, C[8] = t, C[9] = a, C[10] = r, C[11] = 0, C[12] = B, C[13] = Q, C[14] = E, C[15] = 1, C;
882
883
  }
883
884
  function xE(C, A) {
884
- var I = C[0], g = C[1], B = C[2], Q = C[3], E = C[4], i = C[5], o = C[6], s = C[7], t = C[8], a = C[9], r = C[10], D = C[11], F = C[12], U = C[13], S = C[14], d = C[15], H = A[0], k = A[1], R = A[2], L = A[3], Y = A[4], T = A[5], IA = A[6], CA = A[7], z = A[8], gA = A[9], SA = A[10], NA = A[11], oA = A[12], AC = A[13], IC = A[14], gC = A[15];
885
- return Math.abs(I - H) <= AA * Math.max(1, Math.abs(I), Math.abs(H)) && Math.abs(g - k) <= AA * Math.max(1, Math.abs(g), Math.abs(k)) && Math.abs(B - R) <= AA * Math.max(1, Math.abs(B), Math.abs(R)) && Math.abs(Q - L) <= AA * Math.max(1, Math.abs(Q), Math.abs(L)) && Math.abs(E - Y) <= AA * Math.max(1, Math.abs(E), Math.abs(Y)) && Math.abs(i - T) <= AA * Math.max(1, Math.abs(i), Math.abs(T)) && Math.abs(o - IA) <= AA * Math.max(1, Math.abs(o), Math.abs(IA)) && Math.abs(s - CA) <= AA * Math.max(1, Math.abs(s), Math.abs(CA)) && Math.abs(t - z) <= AA * Math.max(1, Math.abs(t), Math.abs(z)) && Math.abs(a - gA) <= AA * Math.max(1, Math.abs(a), Math.abs(gA)) && Math.abs(r - SA) <= AA * Math.max(1, Math.abs(r), Math.abs(SA)) && Math.abs(D - NA) <= AA * Math.max(1, Math.abs(D), Math.abs(NA)) && Math.abs(F - oA) <= AA * Math.max(1, Math.abs(F), Math.abs(oA)) && Math.abs(U - AC) <= AA * Math.max(1, Math.abs(U), Math.abs(AC)) && Math.abs(S - IC) <= AA * Math.max(1, Math.abs(S), Math.abs(IC)) && Math.abs(d - gC) <= AA * Math.max(1, Math.abs(d), Math.abs(gC));
885
+ var I = C[0], g = C[1], B = C[2], Q = C[3], E = C[4], i = C[5], o = C[6], s = C[7], t = C[8], a = C[9], r = C[10], D = C[11], F = C[12], U = C[13], S = C[14], d = C[15], u = A[0], k = A[1], R = A[2], L = A[3], Y = A[4], T = A[5], IA = A[6], CA = A[7], z = A[8], gA = A[9], SA = A[10], NA = A[11], oA = A[12], AC = A[13], IC = A[14], gC = A[15];
886
+ return Math.abs(I - u) <= AA * Math.max(1, Math.abs(I), Math.abs(u)) && Math.abs(g - k) <= AA * Math.max(1, Math.abs(g), Math.abs(k)) && Math.abs(B - R) <= AA * Math.max(1, Math.abs(B), Math.abs(R)) && Math.abs(Q - L) <= AA * Math.max(1, Math.abs(Q), Math.abs(L)) && Math.abs(E - Y) <= AA * Math.max(1, Math.abs(E), Math.abs(Y)) && Math.abs(i - T) <= AA * Math.max(1, Math.abs(i), Math.abs(T)) && Math.abs(o - IA) <= AA * Math.max(1, Math.abs(o), Math.abs(IA)) && Math.abs(s - CA) <= AA * Math.max(1, Math.abs(s), Math.abs(CA)) && Math.abs(t - z) <= AA * Math.max(1, Math.abs(t), Math.abs(z)) && Math.abs(a - gA) <= AA * Math.max(1, Math.abs(a), Math.abs(gA)) && Math.abs(r - SA) <= AA * Math.max(1, Math.abs(r), Math.abs(SA)) && Math.abs(D - NA) <= AA * Math.max(1, Math.abs(D), Math.abs(NA)) && Math.abs(F - oA) <= AA * Math.max(1, Math.abs(F), Math.abs(oA)) && Math.abs(U - AC) <= AA * Math.max(1, Math.abs(U), Math.abs(AC)) && Math.abs(S - IC) <= AA * Math.max(1, Math.abs(S), Math.abs(IC)) && Math.abs(d - gC) <= AA * Math.max(1, Math.abs(d), Math.abs(gC));
886
887
  }
887
888
  function EA() {
888
889
  var C = new DA(3);
@@ -1349,7 +1350,7 @@ class Ci {
1349
1350
  getFilter(A, I) {
1350
1351
  const { dataFormat: g, dataType: B } = I;
1351
1352
  if (g === "scalar" && B !== "float" && A !== "nearest")
1352
- return u.warn(
1353
+ return H.warn(
1353
1354
  "WebGLTexture",
1354
1355
  "Integer values are not filterable. Using gl.NEAREST instead."
1355
1356
  ), this.gl_.NEAREST;
@@ -1633,7 +1634,7 @@ class sC extends eQ {
1633
1634
  });
1634
1635
  if (!I)
1635
1636
  throw new Error("Failed to initialize WebGL2 context");
1636
- this.gl_ = I, u.info(
1637
+ this.gl_ = I, H.info(
1637
1638
  "WebGLRenderer",
1638
1639
  `WebGL version ${I.getParameter(I.VERSION)}`
1639
1640
  ), this.programs_ = new lE(I), this.bindings_ = new Bi(I), this.textures_ = new Ci(I), this.state_ = new Qi(I), this.initStencil(), this.resize(this.canvas.width, this.canvas.height);
@@ -1653,7 +1654,7 @@ class sC extends eQ {
1653
1654
  else if (i)
1654
1655
  this.state_.setScissorTest(!0), this.state_.setScissor(B);
1655
1656
  else {
1656
- u.warn(
1657
+ H.warn(
1657
1658
  "WebGLRenderer",
1658
1659
  `Viewport ${A.id} is entirely outside canvas bounds, skipping render`
1659
1660
  );
@@ -1676,7 +1677,7 @@ class sC extends eQ {
1676
1677
  }
1677
1678
  renderLayer(A, I, g) {
1678
1679
  if (A.objects.length === 0) return;
1679
- this.state_.setBlendingMode(A.transparent ? A.blendMode : "none");
1680
+ this.state_.setBlendingMode(A.blendMode);
1680
1681
  const B = A.hasMultipleLODs();
1681
1682
  this.state_.setStencilTest(B), B && this.gl_.clear(this.gl_.STENCIL_BUFFER_BIT), A.objects.forEach((Q, E) => {
1682
1683
  g.intersectsWithBox3(Q.boundingBox) && (this.renderObject(A, E, I), this.renderedObjectsPerFrame_ += 1);
@@ -1704,11 +1705,11 @@ class sC extends eQ {
1704
1705
  }
1705
1706
  }
1706
1707
  drawGeometry(A, I, g, B, Q) {
1707
- const E = VA(
1708
+ const E = OA(
1708
1709
  FA(),
1709
1710
  Q.viewMatrix,
1710
1711
  I.transform.matrix
1711
- ), i = VA(
1712
+ ), i = OA(
1712
1713
  FA(),
1713
1714
  Ei,
1714
1715
  Q.projectionMatrix
@@ -1728,7 +1729,10 @@ class sC extends eQ {
1728
1729
  B.setUniform(F, o);
1729
1730
  break;
1730
1731
  case "u_opacity":
1731
- B.setUniform(F, g.opacity);
1732
+ B.setUniform(
1733
+ F,
1734
+ g.opacity * (s.Opacity ?? 1)
1735
+ );
1732
1736
  break;
1733
1737
  case "CameraPositionModel": {
1734
1738
  const U = Fg(FA(), E), S = Bg(0, 0, 0, 1), d = pI(
@@ -2371,7 +2375,7 @@ class eC {
2371
2375
  return this.type.isArray ? this.type.stride : this.size;
2372
2376
  }
2373
2377
  }
2374
- class vA extends dA {
2378
+ class ZA extends dA {
2375
2379
  constructor(A, I) {
2376
2380
  super(A, I), this.members = [], this.align = 0, this.startLine = -1, this.endLine = -1, this.inUse = !1;
2377
2381
  }
@@ -2379,7 +2383,7 @@ class vA extends dA {
2379
2383
  return !0;
2380
2384
  }
2381
2385
  }
2382
- class OA extends dA {
2386
+ class _A extends dA {
2383
2387
  constructor(A, I) {
2384
2388
  super(A, I), this.count = 0, this.stride = 0;
2385
2389
  }
@@ -3590,7 +3594,7 @@ class QA extends KA {
3590
3594
  if (I === null) return void console.log("setDataValue: NULL data.");
3591
3595
  let Q = this.offset, E = this.typeInfo;
3592
3596
  for (; g; ) {
3593
- if (g instanceof DI) if (E instanceof OA) {
3597
+ if (g instanceof DI) if (E instanceof _A) {
3594
3598
  const i = g.index;
3595
3599
  if (i instanceof nA) {
3596
3600
  if (!(i.value instanceof c)) return void console.error(`SetDataValue: Invalid index type ${i.value}`);
@@ -3606,7 +3610,7 @@ class QA extends KA {
3606
3610
  if (!(g instanceof BI)) return void console.error("SetDataValue: Unknown postfix type", g);
3607
3611
  {
3608
3612
  const i = g.value;
3609
- if (E instanceof vA) {
3613
+ if (E instanceof ZA) {
3610
3614
  let o = !1;
3611
3615
  for (const s of E.members) if (s.name === i) {
3612
3616
  Q += s.offset, E = s.type, o = !0;
@@ -3738,7 +3742,7 @@ class QA extends KA {
3738
3742
  if (I instanceof DI) {
3739
3743
  const t = I.index, a = t instanceof fA ? A.evalExpression(t, g) : t;
3740
3744
  let r = 0;
3741
- if (a instanceof c ? r = a.value : typeof a == "number" ? r = a : console.error("GetDataValue: Invalid index type", t), o instanceof OA) i += r * o.stride, o = o.format;
3745
+ if (a instanceof c ? r = a.value : typeof a == "number" ? r = a : console.error("GetDataValue: Invalid index type", t), o instanceof _A) i += r * o.stride, o = o.format;
3742
3746
  else {
3743
3747
  const D = o.getTypeName();
3744
3748
  D === "mat4x4" || D === "mat4x4f" || D === "mat4x4h" ? (i += 16 * r, o = A.getTypeInfo("vec4f")) : D === "mat4x3" || D === "mat4x3f" || D === "mat4x3h" ? (i += 12 * r, o = A.getTypeInfo("vec3f")) : D === "mat4x2" || D === "mat4x2f" || D === "mat4x2h" ? (i += 8 * r, o = A.getTypeInfo("vec2f")) : D === "mat3x4" || D === "mat3x4f" || D === "mat3x4h" ? (i += 12 * r, o = A.getTypeInfo("vec4f")) : D === "mat3x3" || D === "mat3x3f" || D === "mat3x3h" ? (i += 9 * r, o = A.getTypeInfo("vec3f")) : D === "mat3x2" || D === "mat3x2f" || D === "mat3x2h" ? (i += 6 * r, o = A.getTypeInfo("vec2f")) : D === "mat2x4" || D === "mat2x4f" || D === "mat2x4h" ? (i += 8 * r, o = A.getTypeInfo("vec4f")) : D === "mat2x3" || D === "mat2x3f" || D === "mat2x3h" ? (i += 6 * r, o = A.getTypeInfo("vec3f")) : D === "mat2x2" || D === "mat2x2f" || D === "mat2x2h" ? (i += 4 * r, o = A.getTypeInfo("vec2f")) : D === "vec2f" || D === "vec3f" || D === "vec4f" ? (i += 4 * r, o = A.getTypeInfo("f32")) : D === "vec2h" || D === "vec3h" || D === "vec4h" ? (i += 2 * r, o = A.getTypeInfo("f16")) : D === "vec2b" || D === "vec3b" || D === "vec4b" ? (i += 1 * r, o = A.getTypeInfo("bool")) : D === "vec2i" || D === "vec3i" || D === "vec4i" ? (i += 4 * r, o = A.getTypeInfo("i32")) : D === "vec2u" || D === "vec3u" || D === "vec4u" ? (i += 4 * r, o = A.getTypeInfo("u32")) : console.error(`getDataValue: Type ${o.getTypeName()} is not an array`);
@@ -3747,7 +3751,7 @@ class QA extends KA {
3747
3751
  if (!(I instanceof BI)) return console.error("GetDataValue: Unknown postfix type", I), null;
3748
3752
  {
3749
3753
  const t = I.value;
3750
- if (o instanceof vA) {
3754
+ if (o instanceof ZA) {
3751
3755
  let a = !1;
3752
3756
  for (const r of o.members) if (r.name === t) {
3753
3757
  i += r.offset, o = r.type, a = !0;
@@ -3811,7 +3815,7 @@ class QA extends KA {
3811
3815
  }
3812
3816
  toString() {
3813
3817
  let A = "";
3814
- if (this.typeInfo instanceof OA) if (this.typeInfo.format.name === "f32") {
3818
+ if (this.typeInfo instanceof _A) if (this.typeInfo.format.name === "f32") {
3815
3819
  const I = new Float32Array(this.buffer, this.offset);
3816
3820
  A = `[${I[0]}`;
3817
3821
  for (let g = 1; g < I.length; ++g) A += `, ${I[g]}`;
@@ -3836,7 +3840,7 @@ class QA extends KA {
3836
3840
  A = `[${I[0]}, ${I[1]}, ${I[2]}, ${I[3]}]`;
3837
3841
  for (let g = 4; g < I.length; g += 4) A += `, [${I[g]}, ${I[g + 1]}, ${I[g + 2]}, ${I[g + 3]}]`;
3838
3842
  } else A = "[...]";
3839
- else this.typeInfo instanceof vA ? A += "{...}" : A = "[...]";
3843
+ else this.typeInfo instanceof ZA ? A += "{...}" : A = "[...]";
3840
3844
  return A;
3841
3845
  }
3842
3846
  }
@@ -3907,9 +3911,9 @@ class xA extends KA {
3907
3911
  }
3908
3912
  setPixel(A, I, g, B, Q) {
3909
3913
  const E = this.texelByteSize, i = this.bytesPerRow, o = this.height, s = this.data[B];
3910
- (function(t, a, r, D, F, U, S, d, H, k) {
3914
+ (function(t, a, r, D, F, U, S, d, u, k) {
3911
3915
  const R = D * (S >>= F) * (U >>= F) + r * S + a * d;
3912
- switch (H) {
3916
+ switch (u) {
3913
3917
  case "r8unorm":
3914
3918
  return void _(t, R, "8unorm", 1, k);
3915
3919
  case "r8snorm":
@@ -4175,7 +4179,7 @@ class qA {
4175
4179
  for (const I of A) I instanceof mI && this._functions.set(I.name, new Xi(I));
4176
4180
  for (const I of A) if (I instanceof mA) {
4177
4181
  const g = this.getTypeInfo(I, null);
4178
- g instanceof vA && this.structs.push(g);
4182
+ g instanceof ZA && this.structs.push(g);
4179
4183
  }
4180
4184
  for (const I of A) if (I instanceof UB) this.aliases.push(this._getAliasInfo(I));
4181
4185
  else {
@@ -4419,11 +4423,11 @@ class qA {
4419
4423
  return this._types.set(A, Q), this._updateTypeInfo(Q), Q;
4420
4424
  }
4421
4425
  if (A instanceof fI) {
4422
- const B = A, Q = B.format ? this.getTypeInfo(B.format, B.attributes) : null, E = new OA(B.name, I);
4426
+ const B = A, Q = B.format ? this.getTypeInfo(B.format, B.attributes) : null, E = new _A(B.name, I);
4423
4427
  return E.format = Q, E.count = B.count, this._types.set(A, E), this._updateTypeInfo(E), E;
4424
4428
  }
4425
4429
  if (A instanceof mA) {
4426
- const B = A, Q = new vA(B.name, I);
4430
+ const B = A, Q = new ZA(B.name, I);
4427
4431
  Q.startLine = B.startLine, Q.endLine = B.endLine;
4428
4432
  for (const E of B.members) {
4429
4433
  const i = this.getTypeInfo(E.type, E.attributes);
@@ -4445,11 +4449,11 @@ class qA {
4445
4449
  _updateTypeInfo(A) {
4446
4450
  var I, g, B;
4447
4451
  const Q = this._getTypeSize(A);
4448
- if (A.size = (I = Q?.size) !== null && I !== void 0 ? I : 0, A instanceof OA && A.format) {
4452
+ if (A.size = (I = Q?.size) !== null && I !== void 0 ? I : 0, A instanceof _A && A.format) {
4449
4453
  const E = this._getTypeSize(A.format);
4450
4454
  A.stride = Math.max((g = E?.size) !== null && g !== void 0 ? g : 0, (B = E?.align) !== null && B !== void 0 ? B : 0), this._updateTypeInfo(A.format);
4451
4455
  }
4452
- A instanceof $g && this._updateTypeInfo(A.format), A instanceof vA && this._updateStructInfo(A);
4456
+ A instanceof $g && this._updateTypeInfo(A.format), A instanceof ZA && this._updateStructInfo(A);
4453
4457
  }
4454
4458
  _updateStructInfo(A) {
4455
4459
  var I;
@@ -4485,12 +4489,12 @@ class qA {
4485
4489
  return new XI(Math.max(Q, E.align / i), Math.max(B, E.size / i));
4486
4490
  }
4487
4491
  }
4488
- if (A instanceof OA) {
4492
+ if (A instanceof _A) {
4489
4493
  let E = A, i = 8, o = 8;
4490
4494
  const s = this._getTypeSize(E.format);
4491
4495
  return s !== null && (o = s.size, i = s.align), o = E.count * this._getAttributeNum((g = A?.attributes) !== null && g !== void 0 ? g : null, "stride", this._roundUp(i, o)), B && (o = B), new XI(Math.max(Q, i), Math.max(B, o));
4492
4496
  }
4493
- if (A instanceof vA) {
4497
+ if (A instanceof ZA) {
4494
4498
  let E = 0, i = 0, o = 0, s = 0, t = 0;
4495
4499
  for (const a of A.members) {
4496
4500
  const r = this._getTypeSize(a.type);
@@ -5432,7 +5436,7 @@ class BA extends ji {
5432
5436
  if (B === null) return null;
5433
5437
  if (B instanceof c) return B.value;
5434
5438
  if (B instanceof n || B instanceof p) return Array.from(B.data);
5435
- if (B instanceof QA && B.typeInfo instanceof OA) {
5439
+ if (B instanceof QA && B.typeInfo instanceof _A) {
5436
5440
  if (B.typeInfo.format.name === "u32") return Array.from(new Uint32Array(B.buffer, B.offset, B.typeInfo.count));
5437
5441
  if (B.typeInfo.format.name === "i32") return Array.from(new Int32Array(B.buffer, B.offset, B.typeInfo.count));
5438
5442
  if (B.typeInfo.format.name === "f32") return Array.from(new Float32Array(B.buffer, B.offset, B.typeInfo.count));
@@ -5462,9 +5466,9 @@ class BA extends ji {
5462
5466
  var S;
5463
5467
  const d = U.node;
5464
5468
  if (d?.attributes) {
5465
- let H = null, k = null;
5466
- for (const R of d.attributes) R.name === "binding" ? H = R.value : R.name === "group" && (k = R.value);
5467
- if (D === H && r === k) {
5469
+ let u = null, k = null;
5470
+ for (const R of d.attributes) R.name === "binding" ? u = R.value : R.name === "group" && (k = R.value);
5471
+ if (D === u && r === k) {
5468
5472
  let R = !1;
5469
5473
  for (const L of a.resources) if (L.name === U.name && L.group === parseInt(r) && L.binding === parseInt(D)) {
5470
5474
  R = !0;
@@ -5987,12 +5991,12 @@ class BA extends ji {
5987
5991
  if (Q === null) return console.error(`Unknown type ${B}. Line ${A.line}`), null;
5988
5992
  if (Q.size === 0) return null;
5989
5993
  const E = new QA(new ArrayBuffer(Q.size), Q, 0);
5990
- if (Q instanceof vA) {
5994
+ if (Q instanceof ZA) {
5991
5995
  if (A.args) for (let i = 0; i < A.args.length; ++i) {
5992
5996
  const o = Q.members[i], s = A.args[i], t = this.evalExpression(s, I);
5993
5997
  E.setData(this, t, o.type, o.offset, I);
5994
5998
  }
5995
- } else if (Q instanceof OA) {
5999
+ } else if (Q instanceof _A) {
5996
6000
  let i = 0;
5997
6001
  if (A.args) for (let o = 0; o < A.args.length; ++o) {
5998
6002
  const s = A.args[o], t = this.evalExpression(s, I);
@@ -6108,14 +6112,14 @@ class BA extends ji {
6108
6112
  if (J(Q) && J(E)) {
6109
6113
  const t = Q, a = E;
6110
6114
  if (this._isMatrixType(g) && this._isMatrixType(B)) {
6111
- const r = (function(S, d, H, k) {
6115
+ const r = (function(S, d, u, k) {
6112
6116
  if (cA[d.name] === void 0 || cA[k.name] === void 0) return null;
6113
6117
  const R = cA[d.name][0], L = cA[d.name][1], Y = cA[k.name][0];
6114
6118
  if (R !== cA[k.name][1]) return null;
6115
6119
  const T = new Array(Y * L);
6116
6120
  for (let IA = 0; IA < L; IA++) for (let CA = 0; CA < Y; CA++) {
6117
6121
  let z = 0;
6118
- for (let gA = 0; gA < R; gA++) z += S[gA * L + IA] * H[CA * R + gA];
6122
+ for (let gA = 0; gA < R; gA++) z += S[gA * L + IA] * u[CA * R + gA];
6119
6123
  T[IA * Y + CA] = z;
6120
6124
  }
6121
6125
  return T;
@@ -6127,12 +6131,12 @@ class BA extends ji {
6127
6131
  if (this._isMatrixType(g) && this._isVectorType(B)) {
6128
6132
  const r = (function(D, F, U, S) {
6129
6133
  if (cA[F.name] === void 0 || ug[S.name] === void 0) return null;
6130
- const d = cA[F.name][0], H = cA[F.name][1];
6134
+ const d = cA[F.name][0], u = cA[F.name][1];
6131
6135
  if (d !== U.length) return null;
6132
- const k = new Array(H);
6133
- for (let R = 0; R < H; R++) {
6136
+ const k = new Array(u);
6137
+ for (let R = 0; R < u; R++) {
6134
6138
  let L = 0;
6135
- for (let Y = 0; Y < d; Y++) L += D[Y * H + R] * U[Y];
6139
+ for (let Y = 0; Y < d; Y++) L += D[Y * u + R] * U[Y];
6136
6140
  k[R] = L;
6137
6141
  }
6138
6142
  return k;
@@ -6142,12 +6146,12 @@ class BA extends ji {
6142
6146
  if (this._isVectorType(g) && this._isMatrixType(B)) {
6143
6147
  const r = (function(D, F, U, S) {
6144
6148
  if (ug[F.name] === void 0 || cA[S.name] === void 0) return null;
6145
- const d = cA[S.name][0], H = cA[S.name][1];
6146
- if (H !== D.length) return null;
6149
+ const d = cA[S.name][0], u = cA[S.name][1];
6150
+ if (u !== D.length) return null;
6147
6151
  const k = [];
6148
6152
  for (let R = 0; R < d; R++) {
6149
6153
  let L = 0;
6150
- for (let Y = 0; Y < H; Y++) L += D[Y] * U[Y * d + R];
6154
+ for (let Y = 0; Y < u; Y++) L += D[Y] * U[Y * d + R];
6151
6155
  k[R] = L;
6152
6156
  }
6153
6157
  return k;
@@ -8136,7 +8140,7 @@ async function yo(C, A) {
8136
8140
  const I = await A.getCompilationInfo();
8137
8141
  if (I.messages.some((g) => g.type === "error")) {
8138
8142
  for (const g of I.messages)
8139
- u.error("WebGPUPipelines", `${g.type}: ${g.message}`);
8143
+ H.error("WebGPUPipelines", `${g.type}: ${g.message}`);
8140
8144
  throw new Error(`Failed to compile WGSL shader ${C}.wgsl`);
8141
8145
  }
8142
8146
  }
@@ -8243,7 +8247,7 @@ class Ro extends eQ {
8243
8247
  currentDepthWrite_ = !0;
8244
8248
  currentStencil_ = !1;
8245
8249
  currentBlendMode_ = "none";
8246
- currentOpacity_ = 1;
8250
+ currentLayerOpacity_ = 1;
8247
8251
  constructor(A, I) {
8248
8252
  super(A), this.colorFormat_ = navigator.gpu.getPreferredCanvasFormat(), this.depthFormat_ = "depth24plus-stencil8", this.device_ = I;
8249
8253
  const g = A.getContext("webgpu");
@@ -8257,7 +8261,7 @@ class Ro extends eQ {
8257
8261
  I,
8258
8262
  this.colorFormat_,
8259
8263
  this.depthFormat_
8260
- ), u.info("WebGPURenderer", "WebGPU Initialized"), this.resize(this.width, this.height);
8264
+ ), H.info("WebGPURenderer", "WebGPU Initialized"), this.resize(this.width, this.height);
8261
8265
  }
8262
8266
  async compileShaders() {
8263
8267
  await Promise.all([
@@ -8280,7 +8284,7 @@ class Ro extends eQ {
8280
8284
  eA(this.width, this.height)
8281
8285
  );
8282
8286
  if (!GA.intersects(B, Q)) {
8283
- u.warn(
8287
+ H.warn(
8284
8288
  "WebGPURenderer",
8285
8289
  `Viewport ${A.id} is entirely outside canvas bounds`
8286
8290
  );
@@ -8316,7 +8320,7 @@ class Ro extends eQ {
8316
8320
  const E = this.device_.createCommandEncoder();
8317
8321
  this.passEncoder_ = this.beginRenderPass(E);
8318
8322
  const { x: i, y: o, width: s, height: t } = B.floor().toRect();
8319
- this.passEncoder_.setViewport(i, o, s, t, 0, 1), Q && this.passEncoder_.setScissorRect(i, o, s, t), this.currentStencil_ = A.hasMultipleLODs(), this.currentStencil_ && this.passEncoder_.setStencilReference(0), this.currentBlendMode_ = A.transparent ? A.blendMode : "none", this.currentOpacity_ = A.opacity, A.objects.forEach((a, r) => {
8323
+ this.passEncoder_.setViewport(i, o, s, t, 0, 1), Q && this.passEncoder_.setScissorRect(i, o, s, t), this.currentStencil_ = A.hasMultipleLODs(), this.currentStencil_ && this.passEncoder_.setStencilReference(0), this.currentBlendMode_ = A.blendMode, this.currentLayerOpacity_ = A.opacity, A.objects.forEach((a, r) => {
8320
8324
  g.intersectsWithBox3(a.boundingBox) && (this.renderObject(A, r, I), this.renderedObjectsPerFrame_ += 1);
8321
8325
  }), this.passEncoder_.end(), this.device_.queue.submit([E.finish()]), this.passEncoder_ = null;
8322
8326
  }
@@ -8360,7 +8364,7 @@ class Ro extends eQ {
8360
8364
  },
8361
8365
  Q
8362
8366
  );
8363
- B.setPipeline(E.pipeline), VA(
8367
+ B.setPipeline(E.pipeline), OA(
8364
8368
  this.currentModelView_,
8365
8369
  I.viewMatrix,
8366
8370
  A.transform.matrix
@@ -8368,7 +8372,7 @@ class Ro extends eQ {
8368
8372
  projection: this.currentProjection_,
8369
8373
  modelView: this.currentModelView_,
8370
8374
  color: A.wireframeColor.rgb,
8371
- opacity: this.currentOpacity_
8375
+ opacity: this.currentLayerOpacity_
8372
8376
  }), this.bindings_.setUniforms(B, E), B.setVertexBuffer(0, Q.vertexBuffer), Q.indexBuffer && (B.setIndexBuffer(Q.indexBuffer, "uint32"), B.drawIndexed(g.indexData.length));
8373
8377
  }
8374
8378
  resize(A, I) {
@@ -8415,19 +8419,19 @@ class Ro extends eQ {
8415
8419
  clear() {
8416
8420
  }
8417
8421
  setUniformsForObject(A, I, g) {
8418
- VA(
8422
+ OA(
8419
8423
  this.currentModelView_,
8420
8424
  g.viewMatrix,
8421
8425
  A.transform.matrix
8422
8426
  );
8423
- const B = A.getUniforms();
8427
+ const B = A.getUniforms(), Q = B.Opacity ?? 1;
8424
8428
  I.uniformsView.set({
8425
8429
  projection: this.currentProjection_,
8426
8430
  modelView: this.currentModelView_,
8427
8431
  color: B.Color,
8428
8432
  valueOffset: B.ValueOffset,
8429
8433
  valueScale: B.ValueScale,
8430
- opacity: this.currentOpacity_
8434
+ opacity: this.currentLayerOpacity_ * Q
8431
8435
  }), this.bindings_.setUniforms(this.passEncoder_, I);
8432
8436
  }
8433
8437
  setTexturesForObject(A, I) {
@@ -8442,7 +8446,7 @@ class Ro extends eQ {
8442
8446
  );
8443
8447
  }
8444
8448
  updateProjection(A) {
8445
- VA(
8449
+ OA(
8446
8450
  this.currentProjection_,
8447
8451
  So,
8448
8452
  A
@@ -8480,11 +8484,11 @@ class lo {
8480
8484
  cancel(A) {
8481
8485
  const I = this.pending_.findIndex((B) => B.chunk === A);
8482
8486
  if (I >= 0) {
8483
- this.pending_.splice(I, 1), u.debug("ChunkQueue", "Cancelled pending request");
8487
+ this.pending_.splice(I, 1), H.debug("ChunkQueue", "Cancelled pending request");
8484
8488
  return;
8485
8489
  }
8486
8490
  const g = this.running_.get(A);
8487
- g && (g.controller.abort(), u.debug("ChunkQueue", "Cancelled fetch request"));
8491
+ g && (g.controller.abort(), H.debug("ChunkQueue", "Cancelled fetch request"));
8488
8492
  }
8489
8493
  get pendingCount() {
8490
8494
  return this.pending_.length;
@@ -8508,7 +8512,7 @@ class lo {
8508
8512
  I.state === "loading" && (I.state = "loaded");
8509
8513
  },
8510
8514
  (E) => {
8511
- I.state === "loading" && (I.state = "unloaded"), E.name !== "AbortError" && u.error("ChunkQueue", String(E));
8515
+ I.state === "loading" && (I.state = "unloaded"), E.name !== "AbortError" && H.error("ChunkQueue", String(E));
8512
8516
  }
8513
8517
  ).finally(() => {
8514
8518
  this.running_.delete(I), this.pump();
@@ -8532,7 +8536,7 @@ function Lo(C) {
8532
8536
  if (NC.some((I) => C instanceof I))
8533
8537
  return !0;
8534
8538
  const A = NC.map((I) => I.name);
8535
- return u.debug(
8539
+ return H.debug(
8536
8540
  "Chunk",
8537
8541
  `Unsupported chunk data type: ${C}. Supported data types: ${A}`
8538
8542
  ), !1;
@@ -8540,7 +8544,7 @@ function Lo(C) {
8540
8544
  function Jo(C, A) {
8541
8545
  return Math.round((A - C.translation) / C.scale);
8542
8546
  }
8543
- function XA(C, A, I) {
8547
+ function TA(C, A, I) {
8544
8548
  return Math.max(A, Math.min(I, C));
8545
8549
  }
8546
8550
  const Ng = Symbol("INTERNAL_POLICY_KEY");
@@ -8558,7 +8562,7 @@ class Yo {
8558
8562
  chunkViewStates_ = /* @__PURE__ */ new Map();
8559
8563
  isDisposed_ = !1;
8560
8564
  constructor(A, I) {
8561
- this.store_ = A, this.policy_ = I, u.info(
8565
+ this.store_ = A, this.policy_ = I, H.info(
8562
8566
  "ChunkStoreView",
8563
8567
  "Using image source policy:",
8564
8568
  this.policy_.profile
@@ -8598,7 +8602,7 @@ class Yo {
8598
8602
  if (!(this.policyChanged_ || this.viewBounds2DChanged(Q) || this.zBoundsChanged(a) || this.lastTCoord_ !== A.t || this.cCoordsChanged(A.c))) return;
8599
8603
  const D = this.timeIndex(A);
8600
8604
  if (!this.store_.hasChunksAtTime(D)) {
8601
- u.warn(
8605
+ H.warn(
8602
8606
  "ChunkStoreView",
8603
8607
  "updateChunkViewStates called with no chunks initialized"
8604
8608
  ), this.chunkViewStates_.clear();
@@ -8611,13 +8615,13 @@ class Yo {
8611
8615
  P(Q.max[0], Q.max[1], S)
8612
8616
  );
8613
8617
  this.chunkViewStates_.forEach(mg);
8614
- const H = this.channelsOfInterest(A), k = this.fallbackLOD(), R = this.getPaddedBounds(d), L = this.currentLOD_ === k ? [this.currentLOD_] : [this.currentLOD_, k];
8618
+ const u = this.channelsOfInterest(A), k = this.fallbackLOD(), R = this.getPaddedBounds(d), L = this.currentLOD_ === k ? [this.currentLOD_] : [this.currentLOD_, k];
8615
8619
  for (const Y of L) {
8616
8620
  const T = Y === this.currentLOD_, IA = Y === k;
8617
8621
  this.iterateChunksInBox(
8618
8622
  D,
8619
8623
  Y,
8620
- H,
8624
+ u,
8621
8625
  R,
8622
8626
  (CA, z) => {
8623
8627
  const gA = II.intersects(z, d), SA = T && !gA, NA = this.computePriority(
@@ -8644,7 +8648,7 @@ class Yo {
8644
8648
  ), this.policyChanged_ = !1, this.lastViewBounds2D_ = Q.clone(), this.lastZBounds_ = a, this.lastTCoord_ = A.t, this.lastCCoords_ = A.c ? [...A.c] : void 0;
8645
8649
  }
8646
8650
  updateChunksForVolume(A, I) {
8647
- const g = VA(
8651
+ const g = OA(
8648
8652
  FA(),
8649
8653
  I.camera.projectionMatrix,
8650
8654
  I.camera.viewMatrix
@@ -8652,7 +8656,7 @@ class Yo {
8652
8656
  if (!(this.policyChanged_ || this.hasViewProjectionChanged(g) || this.lastTCoord_ !== A.t || this.cCoordsChanged(A.c))) return;
8653
8657
  const Q = this.timeIndex(A);
8654
8658
  if (!this.store_.hasChunksAtTime(Q)) {
8655
- u.warn(
8659
+ H.warn(
8656
8660
  "ChunkStoreView",
8657
8661
  "updateChunksForVolume called with no chunks initialized"
8658
8662
  ), this.chunkViewStates_.clear();
@@ -8707,7 +8711,7 @@ class Yo {
8707
8711
  setImageSourcePolicy(A, I) {
8708
8712
  if (I !== Ng)
8709
8713
  throw new Error("Unauthorized policy mutation");
8710
- this.policy_ !== A && (this.policy_ = A, this.policyChanged_ = !0, u.info(
8714
+ this.policy_ !== A && (this.policy_ = A, this.policyChanged_ = !0, H.info(
8711
8715
  "ChunkStoreView",
8712
8716
  "Using image source policy:",
8713
8717
  this.policy_.profile
@@ -8720,7 +8724,7 @@ class Yo {
8720
8724
  ), s = Math.max(
8721
8725
  o,
8722
8726
  Math.min(i, this.policy_.lod.max)
8723
- ), t = XA(E, o, s);
8727
+ ), t = TA(E, o, s);
8724
8728
  t !== this.currentLOD_ && (this.currentLOD_ = t);
8725
8729
  }
8726
8730
  markTimeChunksForPrefetchImage(A, I, g, B) {
@@ -8738,7 +8742,7 @@ class Yo {
8738
8742
  const r = this.squareDistance2D(
8739
8743
  a,
8740
8744
  B
8741
- ), D = XA(
8745
+ ), D = TA(
8742
8746
  r / this.sourceMaxSquareDistance2D_,
8743
8747
  0,
8744
8748
  1 - Number.EPSILON
@@ -8779,8 +8783,8 @@ class Yo {
8779
8783
  // Half-open chunk-index range [min, max) at a given LOD that covers `bounds`.
8780
8784
  // Returns null if the bounds don't overlap the data grid.
8781
8785
  chunkIndexRange(A, I) {
8782
- const g = this.store_.dimensions, B = g.x.lods[I], Q = g.y.lods[I], E = g.z?.lods[I], i = Math.ceil(B.size / B.chunkSize), o = Math.ceil(Q.size / Q.chunkSize), s = E ? Math.ceil(E.size / E.chunkSize) : 1, t = B.chunkSize * B.scale, a = Q.chunkSize * Q.scale, r = E ? E.chunkSize * E.scale : 1, D = B.translation, F = Q.translation, U = E?.translation ?? 0, S = Math.max(0, Math.floor((A.min[0] - D) / t)), d = Math.min(i, Math.ceil((A.max[0] - D) / t)), H = Math.max(0, Math.floor((A.min[1] - F) / a)), k = Math.min(o, Math.ceil((A.max[1] - F) / a)), R = E ? Math.max(0, Math.floor((A.min[2] - U) / r)) : 0, L = E ? Math.min(s, Math.ceil((A.max[2] - U) / r)) : 1;
8783
- return S >= d || H >= k || R >= L ? null : { xMin: S, xMax: d, yMin: H, yMax: k, zMin: R, zMax: L };
8786
+ const g = this.store_.dimensions, B = g.x.lods[I], Q = g.y.lods[I], E = g.z?.lods[I], i = Math.ceil(B.size / B.chunkSize), o = Math.ceil(Q.size / Q.chunkSize), s = E ? Math.ceil(E.size / E.chunkSize) : 1, t = B.chunkSize * B.scale, a = Q.chunkSize * Q.scale, r = E ? E.chunkSize * E.scale : 1, D = B.translation, F = Q.translation, U = E?.translation ?? 0, S = Math.max(0, Math.floor((A.min[0] - D) / t)), d = Math.min(i, Math.ceil((A.max[0] - D) / t)), u = Math.max(0, Math.floor((A.min[1] - F) / a)), k = Math.min(o, Math.ceil((A.max[1] - F) / a)), R = E ? Math.max(0, Math.floor((A.min[2] - U) / r)) : 0, L = E ? Math.min(s, Math.ceil((A.max[2] - U) / r)) : 1;
8787
+ return S >= d || u >= k || R >= L ? null : { xMin: S, xMax: d, yMin: u, yMax: k, zMin: R, zMax: L };
8784
8788
  }
8785
8789
  iterateChunksInBox(A, I, g, B, Q) {
8786
8790
  const E = this.chunkIndexRange(B, I);
@@ -8903,9 +8907,9 @@ class Mo {
8903
8907
  for (let S = 0; S < I; ++S) {
8904
8908
  const d = new Array(g);
8905
8909
  U[S] = d;
8906
- for (let H = 0; H < g; ++H) {
8910
+ for (let u = 0; u < g; ++u) {
8907
8911
  const k = new Array(F);
8908
- d[H] = k;
8912
+ d[u] = k;
8909
8913
  for (let R = 0; R < F; ++R) {
8910
8914
  const L = o !== void 0 ? o.translation + R * a * o.scale : 0, Y = new Array(D);
8911
8915
  k[R] = Y;
@@ -8928,7 +8932,7 @@ class Mo {
8928
8932
  c: 1
8929
8933
  },
8930
8934
  rowAlignmentBytes: 1,
8931
- chunkIndex: { x: z, y: T, z: R, c: H, t: S },
8935
+ chunkIndex: { x: z, y: T, z: R, c: u, t: S },
8932
8936
  scale: {
8933
8937
  x: E.scale,
8934
8938
  y: i.scale,
@@ -9010,7 +9014,7 @@ class Mo {
9010
9014
  throw new Error(
9011
9015
  `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}`
9012
9016
  );
9013
- A.data = void 0, A.state = "unloaded", A.orderKey = null, u.debug(
9017
+ A.data = void 0, A.state = "unloaded", A.orderKey = null, H.debug(
9014
9018
  "ChunkStore",
9015
9019
  `Disposing chunk ${JSON.stringify(A.chunkIndex)} in LOD ${A.lod}`
9016
9020
  );
@@ -9044,7 +9048,7 @@ class Mo {
9044
9048
  for (let A = 0; A < this.dimensions_.numLods; ++A) {
9045
9049
  const I = this.dimensions_.c?.lods[A];
9046
9050
  if (!I) continue;
9047
- if (I.scale !== 1 && u.warn(
9051
+ if (I.scale !== 1 && H.warn(
9048
9052
  "ChunkStore",
9049
9053
  `Idetik does not make use of non-unity scale in c. Found ${I.scale} at LOD ${A}`
9050
9054
  ), I.translation !== 0)
@@ -9151,8 +9155,8 @@ KI.Panel = function(C, A, I, g) {
9151
9155
  var d = S.getContext("2d");
9152
9156
  return d.font = "bold " + E(9 * i * g) + "px Helvetica,Arial,sans-serif", d.textBaseline = "top", d.fillStyle = I, d.fillRect(0, 0, o, s), d.fillStyle = A, d.fillText(C, t, a), d.fillRect(r, D, F, U), d.fillStyle = I, d.globalAlpha = 0.9, d.fillRect(r, D, F, U), {
9153
9157
  dom: S,
9154
- update: function(H, k) {
9155
- B = Math.min(B, H), Q = Math.max(Q, H), d.fillStyle = I, d.globalAlpha = 1, d.fillRect(0, 0, o, D), d.fillStyle = A, d.fillText(E(H) + " " + C + " (" + E(B) + "-" + E(Q) + ")", t, a), d.drawImage(S, r + i, D, F - i, U, r, D, F - i, U), d.fillRect(r + F - i, D, i, U), d.fillStyle = I, d.globalAlpha = 0.9, d.fillRect(r + F - i, D, i, E((1 - H / k) * U));
9158
+ update: function(u, k) {
9159
+ B = Math.min(B, u), Q = Math.max(Q, u), d.fillStyle = I, d.globalAlpha = 1, d.fillRect(0, 0, o, D), d.fillStyle = A, d.fillText(E(u) + " " + C + " (" + E(B) + "-" + E(Q) + ")", t, a), d.drawImage(S, r + i, D, F - i, U, r, D, F - i, U), d.fillRect(r + F - i, D, i, U), d.fillStyle = I, d.globalAlpha = 0.9, d.fillRect(r + F - i, D, i, E((1 - u / k) * U));
9156
9160
  }
9157
9161
  };
9158
9162
  };
@@ -9173,7 +9177,7 @@ class uo {
9173
9177
  partitionLayers() {
9174
9178
  const A = [], I = [];
9175
9179
  for (const g of this.layers)
9176
- g.transparent ? I.push(g) : A.push(g);
9180
+ g.blendMode === "none" ? A.push(g) : I.push(g);
9177
9181
  return { opaque: A, transparent: I };
9178
9182
  }
9179
9183
  add(A) {
@@ -9251,7 +9255,7 @@ class po {
9251
9255
  }
9252
9256
  connect() {
9253
9257
  if (this.isConnected_) {
9254
- u.warn(
9258
+ H.warn(
9255
9259
  "EventDispatcher",
9256
9260
  "Attempted to connect already connected event dispatcher",
9257
9261
  `element id: ${this.element_.id}`
@@ -9266,7 +9270,7 @@ class po {
9266
9270
  }
9267
9271
  disconnect() {
9268
9272
  if (!this.isConnected_) {
9269
- u.debug(
9273
+ H.debug(
9270
9274
  "EventDispatcher",
9271
9275
  "Attempted to disconnect already disconnected event dispatcher",
9272
9276
  `element id: ${this.element_.id}`
@@ -9279,7 +9283,7 @@ class po {
9279
9283
  }
9280
9284
  handleEvent = (A) => {
9281
9285
  if (!Ho(A.type)) {
9282
- u.error("EventDispatcher", `Unsupported event type ${A.type}`);
9286
+ H.error("EventDispatcher", `Unsupported event type ${A.type}`);
9283
9287
  return;
9284
9288
  }
9285
9289
  const I = new qo(A.type, A);
@@ -9339,7 +9343,7 @@ class mo {
9339
9343
  updateAspectRatio() {
9340
9344
  const { width: A, height: I } = this.getBox().toRect();
9341
9345
  if (A <= 0 || I <= 0) {
9342
- u.debug(
9346
+ H.debug(
9343
9347
  "Viewport",
9344
9348
  `Skipping aspect ratio update for viewport ${this.id}: invalid dimensions ${A}x${I}`
9345
9349
  );
@@ -9390,7 +9394,7 @@ class bo {
9390
9394
  }
9391
9395
  connect() {
9392
9396
  if (this.resizeObserver_) {
9393
- u.warn(
9397
+ H.warn(
9394
9398
  "PixelSizeObserver",
9395
9399
  "Attempted to connect already connected observer"
9396
9400
  );
@@ -9414,7 +9418,7 @@ class bo {
9414
9418
  }
9415
9419
  disconnect() {
9416
9420
  if (!this.resizeObserver_) {
9417
- u.warn(
9421
+ H.warn(
9418
9422
  "PixelSizeObserver",
9419
9423
  "Attempted to disconnect already disconnected observer"
9420
9424
  );
@@ -9424,7 +9428,7 @@ class bo {
9424
9428
  }
9425
9429
  observe(A) {
9426
9430
  if (this.elements_.includes(A)) {
9427
- u.warn("PixelSizeObserver", "Element already being observed");
9431
+ H.warn("PixelSizeObserver", "Element already being observed");
9428
9432
  return;
9429
9433
  }
9430
9434
  this.elements_.push(A), this.resizeObserver_ && this.resizeObserver_.observe(A);
@@ -9432,7 +9436,7 @@ class bo {
9432
9436
  unobserve(A) {
9433
9437
  const I = this.elements_.indexOf(A);
9434
9438
  if (I === -1) {
9435
- u.warn("PixelSizeObserver", "Element not being observed");
9439
+ H.warn("PixelSizeObserver", "Element not being observed");
9436
9440
  return;
9437
9441
  }
9438
9442
  this.elements_.splice(I, 1), this.resizeObserver_ && this.resizeObserver_.unobserve(A);
@@ -9545,18 +9549,18 @@ class vQ {
9545
9549
  this.canvas,
9546
9550
  this.context_
9547
9551
  );
9548
- return WQ(I, this.viewports_), this.viewports_.push(I), this.running && (I.events.connect(), I.element !== this.canvas && this.sizeObserver_.observe(I.element)), u.info("Idetik", `Added viewport "${I.id}"`), I;
9552
+ return WQ(I, this.viewports_), this.viewports_.push(I), this.running && (I.events.connect(), I.element !== this.canvas && this.sizeObserver_.observe(I.element)), H.info("Idetik", `Added viewport "${I.id}"`), I;
9549
9553
  }
9550
9554
  removeViewport(A) {
9551
9555
  const I = this.viewports_.indexOf(A);
9552
- return I === -1 ? (u.warn(
9556
+ return I === -1 ? (H.warn(
9553
9557
  "Idetik",
9554
9558
  `Viewport "${A.id}" not found, nothing to remove`
9555
- ), !1) : (this.running && (A.events.disconnect(), A.element !== this.canvas && this.sizeObserver_.unobserve(A.element)), this.viewports_.splice(I, 1), u.info("Idetik", `Removed viewport "${A.id}"`), !0);
9559
+ ), !1) : (this.running && (A.events.disconnect(), A.element !== this.canvas && this.sizeObserver_.unobserve(A.element)), this.viewports_.splice(I, 1), H.info("Idetik", `Removed viewport "${A.id}"`), !0);
9556
9560
  }
9557
9561
  start() {
9558
- if (u.info("Idetik", "Idetik runtime starting"), this.running)
9559
- u.warn("Idetik", "Idetik runtime already started");
9562
+ if (H.info("Idetik", "Idetik runtime starting"), this.running)
9563
+ H.warn("Idetik", "Idetik runtime already started");
9560
9564
  else {
9561
9565
  for (const A of this.viewports_)
9562
9566
  A.events.connect();
@@ -9580,8 +9584,8 @@ class vQ {
9580
9584
  );
9581
9585
  }
9582
9586
  stop() {
9583
- if (u.info("Idetik", "Idetik runtime stopping"), !this.running)
9584
- u.warn("Idetik", "Idetik runtime not started");
9587
+ if (H.info("Idetik", "Idetik runtime stopping"), !this.running)
9588
+ H.warn("Idetik", "Idetik runtime not started");
9585
9589
  else {
9586
9590
  this.sizeObserver_.disconnect();
9587
9591
  for (const A of this.viewports_)
@@ -9593,11 +9597,11 @@ class vQ {
9593
9597
  class To extends NI {
9594
9598
  constructor(A) {
9595
9599
  if (super(), A.primitive != "triangles") {
9596
- u.warn("WireframeGeometry", "Only indexed geometries are supported");
9600
+ H.warn("WireframeGeometry", "Only indexed geometries are supported");
9597
9601
  return;
9598
9602
  }
9599
9603
  if (A.indexData.length == 0) {
9600
- u.warn(
9604
+ H.warn(
9601
9605
  "WireframeGeometry",
9602
9606
  "Only triangulated geometries are supported"
9603
9607
  );
@@ -9816,7 +9820,7 @@ class ZQ extends kI {
9816
9820
  }
9817
9821
  get frustum() {
9818
9822
  return new Zo(
9819
- VA(FA(), this.projectionMatrix, this.viewMatrix)
9823
+ OA(FA(), this.projectionMatrix, this.viewMatrix)
9820
9824
  );
9821
9825
  }
9822
9826
  pan(A) {
@@ -9875,7 +9879,7 @@ class sa extends ZQ {
9875
9879
  }
9876
9880
  getWorldViewRect() {
9877
9881
  let A = Bg(-1, -1, 0, 1), I = Bg(1, 1, 0, 1);
9878
- const g = VA(
9882
+ const g = OA(
9879
9883
  FA(),
9880
9884
  this.projectionMatrix,
9881
9885
  this.viewMatrix
@@ -10024,7 +10028,7 @@ class ea {
10024
10028
  I?.radius ?? 1,
10025
10029
  I?.yaw ?? 0,
10026
10030
  I?.pitch ?? 0
10027
- ), I?.target && Og(this.currCenter_, I.target), this.dampingFactor_ = XA(
10031
+ ), I?.target && Og(this.currCenter_, I.target), this.dampingFactor_ = TA(
10028
10032
  I?.dampingFactor ?? jo,
10029
10033
  0,
10030
10034
  1
@@ -10055,7 +10059,7 @@ class ea {
10055
10059
  return;
10056
10060
  this.currPos_.phi += this.orbitVelocity_.phi, this.currPos_.theta += this.orbitVelocity_.theta, this.currPos_.radius += this.orbitVelocity_.radius * this.currPos_.radius, HI(this.currCenter_, this.currCenter_, this.panVelocity_);
10057
10061
  const I = Math.PI / 2 - AA;
10058
- this.currPos_.theta = XA(this.currPos_.theta, -I, I), this.currPos_.radius = Math.max(0.01, this.currPos_.radius), this.updateCamera();
10062
+ this.currPos_.theta = TA(this.currPos_.theta, -I, I), this.currPos_.radius = Math.max(0.01, this.currPos_.radius), this.updateCamera();
10059
10063
  const g = Math.pow(1 - this.dampingFactor_, A * zo);
10060
10064
  this.orbitVelocity_.phi *= g, this.orbitVelocity_.theta *= g, this.orbitVelocity_.radius *= g, qI(this.panVelocity_, this.panVelocity_, g), this.cutoffLowVelocity();
10061
10065
  }
@@ -10101,27 +10105,19 @@ class Rg {
10101
10105
  objects_ = [];
10102
10106
  state_ = "initialized";
10103
10107
  callbacks_ = [];
10104
- transparent;
10105
10108
  opacity_;
10106
10109
  blendMode;
10107
- constructor({
10108
- transparent: A = !1,
10109
- opacity: I = 1,
10110
- blendMode: g = "normal"
10111
- } = {}) {
10112
- (I < 0 || I > 1) && u.warn(
10113
- "Layer",
10114
- `Layer opacity out of bounds: ${I} — clamping to [0.0, 1.0]`
10115
- ), this.transparent = A, this.opacity_ = XA(I, 0, 1), this.blendMode = g;
10110
+ constructor({ opacity: A = 1, blendMode: I = "none" } = {}) {
10111
+ this.opacity_ = TA(A, 0, 1), this.blendMode = I;
10116
10112
  }
10117
10113
  get opacity() {
10118
10114
  return this.opacity_;
10119
10115
  }
10120
10116
  set opacity(A) {
10121
- (A < 0 || A > 1) && u.warn(
10117
+ (A < 0 || A > 1) && H.warn(
10122
10118
  "Layer",
10123
10119
  `Opacity out of bounds: ${A} — clamping to [0.0, 1.0]`
10124
- ), this.opacity_ = XA(A, 0, 1);
10120
+ ), this.opacity_ = TA(A, 0, 1);
10125
10121
  }
10126
10122
  onEvent(A) {
10127
10123
  }
@@ -10287,14 +10283,15 @@ function Tg(C) {
10287
10283
  });
10288
10284
  }
10289
10285
  const YC = 32;
10290
- function xI(C, { visible: A, color: I, contrastLimits: g }) {
10291
- return A === void 0 && (A = !0), I === void 0 ? I = $.WHITE : I = $.from(I), C !== null ? g = Is(g, C) : g === void 0 && (u.debug(
10286
+ function xI(C, { visible: A, color: I, contrastLimits: g, opacity: B }) {
10287
+ return A ??= !0, I = I === void 0 ? $.WHITE : $.from(I), B = B === void 0 ? 1 : TA(B, 0, 1), C !== null ? g = Is(g, C) : g === void 0 && (H.debug(
10292
10288
  "Channel",
10293
10289
  "No texture provided, defaulting channel contrast limits to [0, 1]."
10294
10290
  ), g = [0, 1]), {
10295
10291
  visible: A,
10296
10292
  color: I,
10297
- contrastLimits: g
10293
+ contrastLimits: g,
10294
+ opacity: B
10298
10295
  };
10299
10296
  }
10300
10297
  function BB(C, A) {
@@ -10324,14 +10321,14 @@ class OQ extends NI {
10324
10321
  for (let D = 0; D < t; ++D) {
10325
10322
  const F = D * r;
10326
10323
  for (let U = 0; U < s; ++U) {
10327
- const S = U * a, d = U / i, H = D / o, k = [S, F, 0], R = [0, 0, 1], L = [d, H];
10324
+ const S = U * a, d = U / i, u = D / o, k = [S, F, 0], R = [0, 0, 1], L = [d, u];
10328
10325
  Q.push(...k, ...R, ...L);
10329
10326
  }
10330
10327
  }
10331
10328
  for (let D = 0; D < o; ++D)
10332
10329
  for (let F = 0; F < i; ++F) {
10333
- const U = F + s * D, S = F + s * (D + 1), d = F + 1 + s * (D + 1), H = F + 1 + s * D;
10334
- E.push(U, S, H), E.push(S, d, H);
10330
+ const U = F + s * D, S = F + s * (D + 1), d = F + 1 + s * (D + 1), u = F + 1 + s * D;
10331
+ E.push(U, S, u), E.push(S, d, u);
10335
10332
  }
10336
10333
  this.vertexData_ = new Float32Array(Q), this.indexData_ = new Uint32Array(E), this.addAttribute({
10337
10334
  type: "position",
@@ -10370,12 +10367,13 @@ class gs extends kI {
10370
10367
  const A = this.textures[0];
10371
10368
  if (!A)
10372
10369
  throw new Error("No texture set");
10373
- const { color: I, contrastLimits: g } = this.channels_[0] ?? xI(A, {});
10370
+ const { color: I, contrastLimits: g, opacity: B } = this.channels_[0] ?? xI(A, {});
10374
10371
  return {
10375
10372
  ImageSampler: 0,
10376
10373
  Color: I.rgb,
10377
10374
  ValueOffset: -g[0],
10378
- ValueScale: 1 / (g[1] - g[0])
10375
+ ValueScale: 1 / (g[1] - g[0]),
10376
+ Opacity: B
10379
10377
  };
10380
10378
  }
10381
10379
  }
@@ -10467,11 +10465,11 @@ class fB {
10467
10465
  bins_ = /* @__PURE__ */ new Map();
10468
10466
  acquire(A) {
10469
10467
  const g = this.bins_.get(A)?.pop();
10470
- return g && u.debug("RenderablePool", "Renderable object acquired"), g;
10468
+ return g && H.debug("RenderablePool", "Renderable object acquired"), g;
10471
10469
  }
10472
10470
  release(A, I) {
10473
10471
  let g = this.bins_.get(A);
10474
- g || (g = [], this.bins_.set(A, g)), g.push(I), u.debug("RenderablePool", "Renderable object released");
10472
+ g || (g = [], this.bins_.set(A, g)), g.push(I), H.debug("RenderablePool", "Renderable object released");
10475
10473
  }
10476
10474
  clearAll(A) {
10477
10475
  if (A) for (const I of this.bins_.values()) I.forEach(A);
@@ -10599,8 +10597,8 @@ class XQ extends Rg {
10599
10597
  }
10600
10598
  slicePlane(A, I) {
10601
10599
  if (!A.data) return;
10602
- const g = (I - A.offset.z) / A.scale.z, B = Math.round(g), Q = XA(B, 0, A.shape.z - 1);
10603
- sg(g, Q, 1 + 1e-6) || u.error("ImageLayer", "slicePlane zValue outside extent");
10600
+ const g = (I - A.offset.z) / A.scale.z, B = Math.round(g), Q = TA(B, 0, A.shape.z - 1);
10601
+ sg(g, Q, 1 + 1e-6) || H.error("ImageLayer", "slicePlane zValue outside extent");
10604
10602
  const E = A.shape.x * A.shape.y, i = E * Q;
10605
10603
  return A.data.slice(i, i + E);
10606
10604
  }
@@ -10625,7 +10623,7 @@ class XQ extends Rg {
10625
10623
  getDataForImage(A) {
10626
10624
  const I = this.sliceCoords_?.z !== void 0 ? this.slicePlane(A, this.sliceCoords_.z) : A.data;
10627
10625
  if (!I) {
10628
- u.warn("ImageLayer", "No data for image");
10626
+ H.warn("ImageLayer", "No data for image");
10629
10627
  return;
10630
10628
  }
10631
10629
  return I;
@@ -10723,12 +10721,12 @@ class Cs extends NI {
10723
10721
  });
10724
10722
  }
10725
10723
  buildFace(A, I, g, B, Q, E, i, o, s, t, a, r, D) {
10726
- const F = E / s, U = i / t, S = E / 2, d = i / 2, H = o / 2 * a, k = s + 1, R = t + 1, L = r.length / 8;
10724
+ const F = E / s, U = i / t, S = E / 2, d = i / 2, u = o / 2 * a, k = s + 1, R = t + 1, L = r.length / 8;
10727
10725
  for (let Y = 0; Y < R; Y++) {
10728
10726
  const T = -d + Y * U;
10729
10727
  for (let IA = 0; IA < k; IA++) {
10730
10728
  const CA = -S + IA * F, z = { x: 0, y: 0, z: 0 };
10731
- z[A] = CA * B, z[I] = T * Q, z[g] = H;
10729
+ z[A] = CA * B, z[I] = T * Q, z[g] = u;
10732
10730
  const gA = { x: 0, y: 0, z: 0 };
10733
10731
  gA[g] = a;
10734
10732
  const SA = IA / s, NA = 1 - Y / t;
@@ -10855,25 +10853,26 @@ class Qs extends kI {
10855
10853
  1,
10856
10854
  1,
10857
10855
  1
10858
- ], g = [0, 0, 0, 0], B = [1, 1, 1, 1], Q = [], E = Math.max(
10856
+ ], g = [0, 0, 0, 0], B = [1, 1, 1, 1], Q = [1, 1, 1, 1], E = [], i = Math.max(
10859
10857
  this.channels_.length,
10860
10858
  this.channelToTextureIndex_.size
10861
10859
  );
10862
- for (let i = 0; i < E && Q.length < 4; i++) {
10863
- const o = this.channelToTextureIndex_.get(i);
10864
- if (o === void 0 || !this.loadedChannels_.has(i)) continue;
10865
- const s = this.textures[o], t = xI(s, this.channels_[i] || {});
10866
- if (!t.visible) continue;
10867
- const a = Q.length;
10868
- I[a * 3] = t.color.rgb[0], I[a * 3 + 1] = t.color.rgb[1], I[a * 3 + 2] = t.color.rgb[2], Q.push(o), g[a] = -t.contrastLimits[0], B[a] = 1 / (t.contrastLimits[1] - t.contrastLimits[0]), A[a] = 1;
10869
- }
10870
- return Q.reduce(
10871
- (i, o, s) => (i[`Channel${s}Sampler`] = o, i),
10860
+ for (let o = 0; o < i && E.length < 4; o++) {
10861
+ const s = this.channelToTextureIndex_.get(o);
10862
+ if (s === void 0 || !this.loadedChannels_.has(o)) continue;
10863
+ const t = this.textures[s], a = xI(t, this.channels_[o] || {});
10864
+ if (!a.visible) continue;
10865
+ const r = E.length;
10866
+ I[r * 3] = a.color.rgb[0], I[r * 3 + 1] = a.color.rgb[1], I[r * 3 + 2] = a.color.rgb[2], E.push(s), g[r] = -a.contrastLimits[0], B[r] = 1 / (a.contrastLimits[1] - a.contrastLimits[0]), A[r] = 1, Q[r] = a.opacity;
10867
+ }
10868
+ return E.reduce(
10869
+ (o, s, t) => (o[`Channel${t}Sampler`] = s, o),
10872
10870
  {
10873
10871
  Visible: A,
10874
10872
  "Color[0]": I,
10875
10873
  ValueOffset: g,
10876
10874
  ValueScale: B,
10875
+ ChannelOpacity: Q,
10877
10876
  VoxelScale: [
10878
10877
  this.voxelScale[0],
10879
10878
  this.voxelScale[1],
@@ -10994,7 +10993,7 @@ class ra extends Rg {
10994
10993
  this.channelChangeCallbacks_.splice(I, 1);
10995
10994
  }
10996
10995
  constructor({ source: A, sliceCoords: I, policy: g, channelProps: B }) {
10997
- super({ transparent: !0, blendMode: "premultiplied" }), this.source_ = A, this.sliceCoords_ = I, this.sourcePolicy_ = g, this.initialChannelProps_ = B, this.channelProps_ = B, this.setState("initialized");
10996
+ super({ blendMode: "premultiplied" }), this.source_ = A, this.sliceCoords_ = I, this.sourcePolicy_ = g, this.initialChannelProps_ = B, this.channelProps_ = B, this.setState("initialized");
10998
10997
  }
10999
10998
  getOrCreateVolume(A, I) {
11000
10999
  const g = this.currentVolumes_.get(A);
@@ -11336,8 +11335,8 @@ class jQ extends Rg {
11336
11335
  }
11337
11336
  slicePlane(A, I) {
11338
11337
  if (!A.data) return;
11339
- const g = (I - A.offset.z) / A.scale.z, B = Math.round(g), Q = XA(B, 0, A.shape.z - 1);
11340
- sg(g, Q, 1 + 1e-6) || u.error("LabelLayer", "slicePlane zValue outside extent");
11338
+ const g = (I - A.offset.z) / A.scale.z, B = Math.round(g), Q = TA(B, 0, A.shape.z - 1);
11339
+ sg(g, Q, 1 + 1e-6) || H.error("LabelLayer", "slicePlane zValue outside extent");
11341
11340
  const E = A.shape.x * A.shape.y, i = E * Q;
11342
11341
  return A.data.slice(i, i + E);
11343
11342
  }
@@ -11361,7 +11360,7 @@ class jQ extends Rg {
11361
11360
  getDataForLabel(A) {
11362
11361
  const I = this.sliceCoords_?.z !== void 0 ? this.slicePlane(A, this.sliceCoords_.z) : A.data;
11363
11362
  if (!I) {
11364
- u.warn("LabelLayer", "No data for label");
11363
+ H.warn("LabelLayer", "No data for label");
11365
11364
  return;
11366
11365
  }
11367
11366
  return I;
@@ -12553,7 +12552,7 @@ function Vs(C, A, I, g) {
12553
12552
  let F = await s[D];
12554
12553
  if (F === null)
12555
12554
  return;
12556
- let { data: U, shape: S, stride: d } = F, H = t.map((L, Y) => L % S[Y]).reduce((L, Y, T) => L + Y * d[T], 0), k = U[H], R = U[H + 1];
12555
+ let { data: U, shape: S, stride: d } = F, u = t.map((L, Y) => L % S[Y]).reduce((L, Y, T) => L + Y * d[T], 0), k = U[u], R = U[u + 1];
12557
12556
  if (!(k === PC && R === PC))
12558
12557
  return B(D, {
12559
12558
  offset: Number(k),
@@ -12912,10 +12911,10 @@ function it(C, A, I, g) {
12912
12911
  return C;
12913
12912
  const d = new C.constructor(
12914
12913
  a
12915
- ), H = E.z !== void 0 ? I[E.z] : 0, k = I[E.y];
12914
+ ), u = E.z !== void 0 ? I[E.z] : 0, k = I[E.y];
12916
12915
  let R = 0;
12917
12916
  for (let L = 0; L < B.z; L++) {
12918
- const Y = F + L * H;
12917
+ const Y = F + L * u;
12919
12918
  for (let T = 0; T < B.y; T++) {
12920
12919
  const IA = Y + T * k, CA = IA + B.x;
12921
12920
  d.set(C.subarray(IA, CA), R), R += B.x;
@@ -16589,7 +16588,7 @@ let MA = [], tt = 0, QE = 0;
16589
16588
  const QI = /* @__PURE__ */ new Map(), Dg = /* @__PURE__ */ new Set();
16590
16589
  function EE(C) {
16591
16590
  const A = MA.find((I) => I.worker === C);
16592
- return A || u.error(
16591
+ return A || H.error(
16593
16592
  "ZarrWorker",
16594
16593
  "Worker not found in pool - this should not happen"
16595
16594
  ), A;
@@ -16597,7 +16596,7 @@ function EE(C) {
16597
16596
  function at(C, A) {
16598
16597
  const { id: I, success: g } = C.data, B = QI.get(I);
16599
16598
  if (!B) {
16600
- Dg.has(I) ? Dg.delete(I) : u.warn(
16599
+ Dg.has(I) ? Dg.delete(I) : H.warn(
16601
16600
  "ZarrWorker",
16602
16601
  `Received response for unknown message ID ${I}:`,
16603
16602
  C.data
@@ -16606,20 +16605,20 @@ function at(C, A) {
16606
16605
  }
16607
16606
  QI.delete(I), B.abortListener && B.abortSignal && B.abortSignal.removeEventListener("abort", B.abortListener);
16608
16607
  const Q = EE(A);
16609
- Q && Q.pendingCount > 0 ? Q.pendingCount-- : Q && u.error(
16608
+ Q && Q.pendingCount > 0 ? Q.pendingCount-- : Q && H.error(
16610
16609
  "ZarrWorker",
16611
16610
  "Received message but no pending tasks - this should not happen"
16612
16611
  ), g && C.data.type === "getChunk" ? B.resolve(C.data.data) : g || B.reject(new Error(C.data.error || "Unknown worker error"));
16613
16612
  }
16614
16613
  function jC(C, A) {
16615
16614
  if (C instanceof MessageEvent) {
16616
- u.error(
16615
+ H.error(
16617
16616
  "ZarrWorker",
16618
16617
  "Message serialization error occurred - worker remains active"
16619
16618
  );
16620
16619
  return;
16621
16620
  }
16622
- u.error(
16621
+ H.error(
16623
16622
  "ZarrWorker",
16624
16623
  "Worker failed - replacing worker and canceling its in-flight messages",
16625
16624
  C.message
@@ -16639,9 +16638,9 @@ function jC(C, A) {
16639
16638
  worker: B,
16640
16639
  pendingCount: 0,
16641
16640
  workerId: QE++
16642
- }), u.debug("ZarrWorker", "Replacement worker created successfully");
16641
+ }), H.debug("ZarrWorker", "Replacement worker created successfully");
16643
16642
  } catch (B) {
16644
- u.error("ZarrWorker", "Failed to create replacement worker", B);
16643
+ H.error("ZarrWorker", "Failed to create replacement worker", B);
16645
16644
  }
16646
16645
  }
16647
16646
  function iE() {
@@ -16696,12 +16695,12 @@ function rt() {
16696
16695
  workerId: QE++
16697
16696
  });
16698
16697
  }
16699
- u.debug(
16698
+ H.debug(
16700
16699
  "ZarrWorker",
16701
16700
  `Initialized worker pool with ${MA.length} workers`
16702
16701
  );
16703
16702
  } catch {
16704
- u.warn("ZarrWorker", "Failed to create workers - clearing pool"), ht();
16703
+ H.warn("ZarrWorker", "Failed to create workers - clearing pool"), ht();
16705
16704
  return;
16706
16705
  }
16707
16706
  }
@@ -16717,7 +16716,7 @@ async function Dt(C, A, I, g, B) {
16717
16716
  } catch (Q) {
16718
16717
  if (Q instanceof DOMException && Q.name === "AbortError")
16719
16718
  throw Q;
16720
- u.warn("ZarrWorker", "Falling back to main thread", Q);
16719
+ H.warn("ZarrWorker", "Falling back to main thread", Q);
16721
16720
  const E = await C.getChunk(I, B);
16722
16721
  if (!Lo(E.data))
16723
16722
  throw new Error(
@@ -16791,12 +16790,12 @@ function ct(C, A) {
16791
16790
  const I = C.axes.map((a) => a.name), g = C.axes.length, B = zC(I, "x"), Q = zC(I, "y"), E = (a, r) => {
16792
16791
  const D = [];
16793
16792
  for (let F = 0; F < C.datasets.length; F++) {
16794
- const U = C.datasets[F], S = A[F], d = U.coordinateTransformations[0].scale, H = U.coordinateTransformations.length === 2 ? U.coordinateTransformations[1].translation : new Array(g).fill(0);
16793
+ const U = C.datasets[F], S = A[F], d = U.coordinateTransformations[0].scale, u = U.coordinateTransformations.length === 2 ? U.coordinateTransformations[1].translation : new Array(g).fill(0);
16795
16794
  D.push({
16796
16795
  size: S.shape[r],
16797
16796
  chunkSize: S.chunks[r],
16798
16797
  scale: d[r],
16799
- translation: H[r]
16798
+ translation: u[r]
16800
16799
  });
16801
16800
  }
16802
16801
  if (C.axes[r].type === "space" && Gt(D))
@@ -16906,7 +16905,7 @@ const f = V.arrayToEnum([
16906
16905
  "never",
16907
16906
  "map",
16908
16907
  "set"
16909
- ]), WA = (C) => {
16908
+ ]), vA = (C) => {
16910
16909
  switch (typeof C) {
16911
16910
  case "undefined":
16912
16911
  return f.undefined;
@@ -16945,7 +16944,7 @@ const f = V.arrayToEnum([
16945
16944
  "not_multiple_of",
16946
16945
  "not_finite"
16947
16946
  ]);
16948
- class TA extends Error {
16947
+ class WA extends Error {
16949
16948
  get errors() {
16950
16949
  return this.issues;
16951
16950
  }
@@ -16982,7 +16981,7 @@ class TA extends Error {
16982
16981
  return B(this), g;
16983
16982
  }
16984
16983
  static assert(A) {
16985
- if (!(A instanceof TA))
16984
+ if (!(A instanceof WA))
16986
16985
  throw new Error(`Not a ZodError: ${A}`);
16987
16986
  }
16988
16987
  toString() {
@@ -17008,7 +17007,7 @@ class TA extends Error {
17008
17007
  return this.flatten();
17009
17008
  }
17010
17009
  }
17011
- TA.create = (C) => new TA(C);
17010
+ WA.create = (C) => new WA(C);
17012
17011
  const iB = (C, A) => {
17013
17012
  let I;
17014
17013
  switch (C.code) {
@@ -17174,7 +17173,7 @@ const gQ = (C, A) => {
17174
17173
  get error() {
17175
17174
  if (this._error)
17176
17175
  return this._error;
17177
- const I = new TA(C.common.issues);
17176
+ const I = new WA(C.common.issues);
17178
17177
  return this._error = I, this._error;
17179
17178
  }
17180
17179
  };
@@ -17195,13 +17194,13 @@ class Z {
17195
17194
  return this._def.description;
17196
17195
  }
17197
17196
  _getType(A) {
17198
- return WA(A.data);
17197
+ return vA(A.data);
17199
17198
  }
17200
17199
  _getOrReturnCtx(A, I) {
17201
17200
  return I || {
17202
17201
  common: A.parent.common,
17203
17202
  data: A.data,
17204
- parsedType: WA(A.data),
17203
+ parsedType: vA(A.data),
17205
17204
  schemaErrorMap: this._def.errorMap,
17206
17205
  path: A.path,
17207
17206
  parent: A.parent
@@ -17213,7 +17212,7 @@ class Z {
17213
17212
  ctx: {
17214
17213
  common: A.parent.common,
17215
17214
  data: A.data,
17216
- parsedType: WA(A.data),
17215
+ parsedType: vA(A.data),
17217
17216
  schemaErrorMap: this._def.errorMap,
17218
17217
  path: A.path,
17219
17218
  parent: A.parent
@@ -17247,7 +17246,7 @@ class Z {
17247
17246
  schemaErrorMap: this._def.errorMap,
17248
17247
  parent: null,
17249
17248
  data: A,
17250
- parsedType: WA(A)
17249
+ parsedType: vA(A)
17251
17250
  }, B = this._parseSync({ data: A, path: g.path, parent: g });
17252
17251
  return gQ(g, B);
17253
17252
  }
@@ -17261,7 +17260,7 @@ class Z {
17261
17260
  schemaErrorMap: this._def.errorMap,
17262
17261
  parent: null,
17263
17262
  data: A,
17264
- parsedType: WA(A)
17263
+ parsedType: vA(A)
17265
17264
  };
17266
17265
  if (!this["~standard"].async)
17267
17266
  try {
@@ -17300,7 +17299,7 @@ class Z {
17300
17299
  schemaErrorMap: this._def.errorMap,
17301
17300
  parent: null,
17302
17301
  data: A,
17303
- parsedType: WA(A)
17302
+ parsedType: vA(A)
17304
17303
  }, B = this._parse({ data: A, path: g.path, parent: g }), Q = await (hg(B) ? B : Promise.resolve(B));
17305
17304
  return gQ(g, Q);
17306
17305
  }
@@ -17335,7 +17334,7 @@ class Z {
17335
17334
  };
17336
17335
  }
17337
17336
  optional() {
17338
- return _A.create(this, this._def);
17337
+ return XA.create(this, this._def);
17339
17338
  }
17340
17339
  nullable() {
17341
17340
  return FI.create(this, this._def);
@@ -17444,7 +17443,7 @@ function Wt(C, A) {
17444
17443
  function vt(C, A) {
17445
17444
  return !!((A === "v4" || !A) && Kt.test(C) || (A === "v6" || !A) && Ht.test(C));
17446
17445
  }
17447
- class ZA extends Z {
17446
+ class PA extends Z {
17448
17447
  _parse(A) {
17449
17448
  if (this._def.coerce && (A.data = String(A.data)), this._getType(A) !== f.string) {
17450
17449
  const Q = this._getOrReturnCtx(A);
@@ -17607,7 +17606,7 @@ class ZA extends Z {
17607
17606
  });
17608
17607
  }
17609
17608
  _addCheck(A) {
17610
- return new ZA({
17609
+ return new PA({
17611
17610
  ...this._def,
17612
17611
  checks: [...this._def.checks, A]
17613
17612
  });
@@ -17743,19 +17742,19 @@ class ZA extends Z {
17743
17742
  return this.min(1, K.errToObj(A));
17744
17743
  }
17745
17744
  trim() {
17746
- return new ZA({
17745
+ return new PA({
17747
17746
  ...this._def,
17748
17747
  checks: [...this._def.checks, { kind: "trim" }]
17749
17748
  });
17750
17749
  }
17751
17750
  toLowerCase() {
17752
- return new ZA({
17751
+ return new PA({
17753
17752
  ...this._def,
17754
17753
  checks: [...this._def.checks, { kind: "toLowerCase" }]
17755
17754
  });
17756
17755
  }
17757
17756
  toUpperCase() {
17758
- return new ZA({
17757
+ return new PA({
17759
17758
  ...this._def,
17760
17759
  checks: [...this._def.checks, { kind: "toUpperCase" }]
17761
17760
  });
@@ -17821,7 +17820,7 @@ class ZA extends Z {
17821
17820
  return A;
17822
17821
  }
17823
17822
  }
17824
- ZA.create = (C) => new ZA({
17823
+ PA.create = (C) => new PA({
17825
17824
  checks: [],
17826
17825
  typeName: x.ZodString,
17827
17826
  coerce: C?.coerce ?? !1,
@@ -18416,7 +18415,7 @@ function tI(C) {
18416
18415
  const A = {};
18417
18416
  for (const I in C.shape) {
18418
18417
  const g = C.shape[I];
18419
- A[I] = _A.create(tI(g));
18418
+ A[I] = XA.create(tI(g));
18420
18419
  }
18421
18420
  return new aA({
18422
18421
  ...C._def,
@@ -18425,7 +18424,7 @@ function tI(C) {
18425
18424
  } else return C instanceof pA ? new pA({
18426
18425
  ...C._def,
18427
18426
  type: tI(C.element)
18428
- }) : C instanceof _A ? _A.create(tI(C.unwrap())) : C instanceof FI ? FI.create(tI(C.unwrap())) : C instanceof EI ? EI.create(C.items.map((A) => tI(A))) : C;
18427
+ }) : C instanceof XA ? XA.create(tI(C.unwrap())) : C instanceof FI ? FI.create(tI(C.unwrap())) : C instanceof EI ? EI.create(C.items.map((A) => tI(A))) : C;
18429
18428
  }
18430
18429
  class aA extends Z {
18431
18430
  constructor() {
@@ -18680,7 +18679,7 @@ class aA extends Z {
18680
18679
  I[g] = this.shape[g];
18681
18680
  else {
18682
18681
  let Q = this.shape[g];
18683
- for (; Q instanceof _A; )
18682
+ for (; Q instanceof XA; )
18684
18683
  Q = Q._def.innerType;
18685
18684
  I[g] = Q;
18686
18685
  }
@@ -18724,7 +18723,7 @@ class cg extends Z {
18724
18723
  for (const i of Q)
18725
18724
  if (i.result.status === "dirty")
18726
18725
  return I.common.issues.push(...i.ctx.common.issues), i.result;
18727
- const E = Q.map((i) => new TA(i.ctx.common.issues));
18726
+ const E = Q.map((i) => new WA(i.ctx.common.issues));
18728
18727
  return M(I, {
18729
18728
  code: l.invalid_union,
18730
18729
  unionErrors: E
@@ -18771,7 +18770,7 @@ class cg extends Z {
18771
18770
  }
18772
18771
  if (Q)
18773
18772
  return I.common.issues.push(...Q.ctx.common.issues), Q.result;
18774
- const i = E.map((o) => new TA(o));
18773
+ const i = E.map((o) => new WA(o));
18775
18774
  return M(I, {
18776
18775
  code: l.invalid_union,
18777
18776
  unionErrors: i
@@ -18788,7 +18787,7 @@ cg.create = (C, A) => new cg({
18788
18787
  ...b(A)
18789
18788
  });
18790
18789
  function tB(C, A) {
18791
- const I = WA(C), g = WA(A);
18790
+ const I = vA(C), g = vA(A);
18792
18791
  if (C === A)
18793
18792
  return { valid: !0, data: C };
18794
18793
  if (I === f.object && g === f.object) {
@@ -19256,7 +19255,7 @@ GI.createWithPreprocess = (C, A, I) => new GI({
19256
19255
  typeName: x.ZodEffects,
19257
19256
  ...b(I)
19258
19257
  });
19259
- class _A extends Z {
19258
+ class XA extends Z {
19260
19259
  _parse(A) {
19261
19260
  return this._getType(A) === f.undefined ? JA(void 0) : this._def.innerType._parse(A);
19262
19261
  }
@@ -19264,7 +19263,7 @@ class _A extends Z {
19264
19263
  return this._def.innerType;
19265
19264
  }
19266
19265
  }
19267
- _A.create = (C, A) => new _A({
19266
+ XA.create = (C, A) => new XA({
19268
19267
  innerType: C,
19269
19268
  typeName: x.ZodOptional,
19270
19269
  ...b(A)
@@ -19321,7 +19320,7 @@ class nB extends Z {
19321
19320
  status: "valid",
19322
19321
  value: Q.status === "valid" ? Q.value : this._def.catchValue({
19323
19322
  get error() {
19324
- return new TA(g.common.issues);
19323
+ return new WA(g.common.issues);
19325
19324
  },
19326
19325
  input: g.data
19327
19326
  })
@@ -19329,7 +19328,7 @@ class nB extends Z {
19329
19328
  status: "valid",
19330
19329
  value: B.status === "valid" ? B.value : this._def.catchValue({
19331
19330
  get error() {
19332
- return new TA(g.common.issues);
19331
+ return new WA(g.common.issues);
19333
19332
  },
19334
19333
  input: g.data
19335
19334
  })
@@ -19433,7 +19432,7 @@ var x;
19433
19432
  (function(C) {
19434
19433
  C.ZodString = "ZodString", C.ZodNumber = "ZodNumber", C.ZodNaN = "ZodNaN", C.ZodBigInt = "ZodBigInt", C.ZodBoolean = "ZodBoolean", C.ZodDate = "ZodDate", C.ZodSymbol = "ZodSymbol", C.ZodUndefined = "ZodUndefined", C.ZodNull = "ZodNull", C.ZodAny = "ZodAny", C.ZodUnknown = "ZodUnknown", C.ZodNever = "ZodNever", C.ZodVoid = "ZodVoid", C.ZodArray = "ZodArray", C.ZodObject = "ZodObject", C.ZodUnion = "ZodUnion", C.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", C.ZodIntersection = "ZodIntersection", C.ZodTuple = "ZodTuple", C.ZodRecord = "ZodRecord", C.ZodMap = "ZodMap", C.ZodSet = "ZodSet", C.ZodFunction = "ZodFunction", C.ZodLazy = "ZodLazy", C.ZodLiteral = "ZodLiteral", C.ZodEnum = "ZodEnum", C.ZodEffects = "ZodEffects", C.ZodNativeEnum = "ZodNativeEnum", C.ZodOptional = "ZodOptional", C.ZodNullable = "ZodNullable", C.ZodDefault = "ZodDefault", C.ZodCatch = "ZodCatch", C.ZodPromise = "ZodPromise", C.ZodBranded = "ZodBranded", C.ZodPipeline = "ZodPipeline", C.ZodReadonly = "ZodReadonly";
19435
19434
  })(x || (x = {}));
19436
- const j = ZA.create, W = cI.create, aE = oB.create, PA = sB.create;
19435
+ const j = PA.create, W = cI.create, aE = oB.create, VA = sB.create;
19437
19436
  zA.create;
19438
19437
  const X = pA.create, q = aA.create;
19439
19438
  cg.create;
@@ -19441,7 +19440,7 @@ wg.create;
19441
19440
  EI.create;
19442
19441
  const yA = aB.create, eI = wI.create;
19443
19442
  Gg.create;
19444
- _A.create;
19443
+ XA.create;
19445
19444
  FI.create;
19446
19445
  const Vt = q({
19447
19446
  /**The multiscale datasets for this image*/
@@ -19452,7 +19451,7 @@ const Vt = q({
19452
19451
  q({
19453
19452
  path: j(),
19454
19453
  coordinateTransformations: X(
19455
- PA().superRefine((C, A) => {
19454
+ VA().superRefine((C, A) => {
19456
19455
  const I = [
19457
19456
  q({
19458
19457
  type: yA("scale"),
@@ -19480,7 +19479,7 @@ const Vt = q({
19480
19479
  ).min(1),
19481
19480
  version: yA("0.4").optional(),
19482
19481
  axes: X(
19483
- PA().superRefine((C, A) => {
19482
+ VA().superRefine((C, A) => {
19484
19483
  const I = [
19485
19484
  q({
19486
19485
  name: j(),
@@ -19488,7 +19487,7 @@ const Vt = q({
19488
19487
  }),
19489
19488
  q({
19490
19489
  name: j(),
19491
- type: PA().refine(
19490
+ type: VA().refine(
19492
19491
  (B) => !eI(["space", "time", "channel"]).safeParse(B).success,
19493
19492
  "Invalid input: Should NOT be valid against schema"
19494
19493
  ).optional()
@@ -19508,7 +19507,7 @@ const Vt = q({
19508
19507
  })
19509
19508
  ).min(2).max(5),
19510
19509
  coordinateTransformations: X(
19511
- PA().superRefine((C, A) => {
19510
+ VA().superRefine((C, A) => {
19512
19511
  const I = [
19513
19512
  q({
19514
19513
  type: yA("scale"),
@@ -19655,7 +19654,7 @@ const Vt = q({
19655
19654
  q({
19656
19655
  path: j(),
19657
19656
  coordinateTransformations: X(
19658
- PA().superRefine((C, A) => {
19657
+ VA().superRefine((C, A) => {
19659
19658
  const I = [
19660
19659
  q({
19661
19660
  type: yA("scale"),
@@ -19680,7 +19679,7 @@ const Vt = q({
19680
19679
  })
19681
19680
  ).min(1),
19682
19681
  axes: X(
19683
- PA().superRefine((C, A) => {
19682
+ VA().superRefine((C, A) => {
19684
19683
  const I = [
19685
19684
  q({
19686
19685
  name: j(),
@@ -19688,7 +19687,7 @@ const Vt = q({
19688
19687
  }),
19689
19688
  q({
19690
19689
  name: j(),
19691
- type: PA().refine(
19690
+ type: VA().refine(
19692
19691
  (B) => !eI(["space", "time", "channel"]).safeParse(B).success,
19693
19692
  "Invalid input: Should NOT be valid against schema"
19694
19693
  ).optional()
@@ -19708,7 +19707,7 @@ const Vt = q({
19708
19707
  })
19709
19708
  ).min(2).max(5),
19710
19709
  coordinateTransformations: X(
19711
- PA().superRefine((C, A) => {
19710
+ VA().superRefine((C, A) => {
19712
19711
  const I = [
19713
19712
  q({
19714
19713
  type: yA("scale"),