@soonspacejs/plugin-atmosphere 3.0.0-alpha.8 → 3.0.0-alpha.9

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.
Files changed (2) hide show
  1. package/dist/index.esm.js +657 -656
  2. package/package.json +2 -2
package/dist/index.esm.js CHANGED
@@ -1,13 +1,14 @@
1
- import { Vector3 as p, Matrix4 as T, MathUtils as ue, Material as yr, Loader as Ui, FileLoader as po, LinearFilter as q, RGBAFormat as Hi, Data3DTexture as Pt, RepeatWrapping as ne, NearestFilter as cn, RedFormat as Lt, WebGLRenderer as fo, ByteType as go, UnsignedByteType as un, ShortType as vo, UnsignedShortType as _o, IntType as So, UnsignedIntType as ia, HalfFloatType as K, FloatType as oi, Color as Er, Uniform as u, Matrix3 as Le, Mesh as na, PlaneGeometry as aa, Scene as To, Camera as wr, GLSL3 as Fe, LightProbe as xo, DirectionalLight as yo, Vector2 as D, MeshBasicMaterial as Eo, DepthTexture as wo, WebGLRenderTarget as Mt, RGBADepthPacking as Kt, LessEqualDepth as Ro, BasicDepthPacking as Ao, RawShaderMaterial as Ht, CustomBlending as Co, NoBlending as Fi, AddEquation as ln, OneFactor as Jt, ClampToEdgeWrapping as Nt, NoColorSpace as Ke, WebGL3DRenderTarget as Io, EventDispatcher as No, Texture as dn, Object3D as hn, Box3 as Do, Vector4 as ee, WebGLArrayRenderTarget as Oo, ShaderMaterial as oa, Layers as bo, WebGLCubeRenderTarget as Po, CubeCamera as Lo, TextureLoader as Mo, LinearMipMapLinearFilter as mn } from "three";
2
- import { BlendFunction as Ft, Effect as pt, EffectAttribute as Gt, Pass as sa, Selection as Uo, RenderPass as Ho, DepthCopyPass as pn, ClearPass as Fo, DepthMaskMaterial as Go, DepthTestStrategy as zo, ShaderPass as st, Resolution as ct, MipmapBlurPass as Bo, KawaseBlurPass as Wo, KernelSize as ko } from "postprocessing";
1
+ import yt from "soonspacejs";
2
+ import { Vector3 as p, Matrix4 as T, MathUtils as ue, Material as Er, Loader as Hi, FileLoader as fo, LinearFilter as q, RGBAFormat as Fi, Data3DTexture as Lt, RepeatWrapping as ne, NearestFilter as un, RedFormat as Mt, WebGLRenderer as go, ByteType as vo, UnsignedByteType as ln, ShortType as _o, UnsignedShortType as So, IntType as To, UnsignedIntType as na, HalfFloatType as K, FloatType as si, Color as wr, Uniform as u, Matrix3 as Le, Mesh as aa, PlaneGeometry as oa, Scene as xo, Camera as Rr, GLSL3 as Fe, LightProbe as yo, DirectionalLight as Eo, Vector2 as D, MeshBasicMaterial as wo, DepthTexture as Ro, WebGLRenderTarget as Ut, RGBADepthPacking as Jt, LessEqualDepth as Ao, BasicDepthPacking as Co, RawShaderMaterial as Ft, CustomBlending as Io, NoBlending as Gi, AddEquation as dn, OneFactor as Qt, ClampToEdgeWrapping as Dt, NoColorSpace as Ke, WebGL3DRenderTarget as No, EventDispatcher as Do, Texture as hn, Object3D as mn, Box3 as Oo, Vector4 as ee, WebGLArrayRenderTarget as bo, ShaderMaterial as sa, Layers as Po, WebGLCubeRenderTarget as Lo, CubeCamera as Mo, LinearMipMapLinearFilter as pn } from "three";
3
+ import { BlendFunction as Gt, Effect as pt, EffectAttribute as zt, Pass as ca, Selection as Uo, RenderPass as Ho, DepthCopyPass as fn, ClearPass as Fo, DepthMaskMaterial as Go, DepthTestStrategy as zo, ShaderPass as st, Resolution as ct, MipmapBlurPass as Bo, KawaseBlurPass as Wo, KernelSize as ko } from "postprocessing";
3
4
  import "three/addons/loaders/EXRLoader.js";
4
5
  var Vo = "Invariant failed";
5
- function dr(i, e) {
6
+ function hr(i, e) {
6
7
  if (!i)
7
8
  throw new Error(Vo);
8
9
  }
9
10
  const $o = /* @__PURE__ */ new p();
10
- function ca(i, e, t = new p(), r) {
11
+ function ua(i, e, t = new p(), r) {
11
12
  const { x: n, y: a, z: o } = i, s = e.x, c = e.y, l = e.z, d = n * n * s, h = a * a * c, f = o * o * l, v = d + h + f, g = Math.sqrt(1 / v);
12
13
  if (!Number.isFinite(g))
13
14
  return;
@@ -23,7 +24,7 @@ function ca(i, e, t = new p(), r) {
23
24
  } while (Math.abs(j) > 1e-12);
24
25
  return t.set(n * U, a * b, o * L);
25
26
  }
26
- const $e = /* @__PURE__ */ new p(), $r = /* @__PURE__ */ new p(), jr = /* @__PURE__ */ new p(), si = class {
27
+ const $e = /* @__PURE__ */ new p(), jr = /* @__PURE__ */ new p(), Yr = /* @__PURE__ */ new p(), ci = class {
27
28
  constructor(e, t, r) {
28
29
  this.radii = new p(e, t, r);
29
30
  }
@@ -54,7 +55,7 @@ const $e = /* @__PURE__ */ new p(), $r = /* @__PURE__ */ new p(), jr = /* @__PUR
54
55
  return e.set(1 / t ** 2, 1 / r ** 2, 1 / n ** 2);
55
56
  }
56
57
  projectOnSurface(e, t = new p(), r) {
57
- return ca(
58
+ return ua(
58
59
  e,
59
60
  this.reciprocalRadiiSquared(),
60
61
  t,
@@ -68,15 +69,15 @@ const $e = /* @__PURE__ */ new p(), $r = /* @__PURE__ */ new p(), jr = /* @__PUR
68
69
  this.getSurfaceNormal(e, n), t.set(-e.y, e.x, 0).normalize(), r.crossVectors(n, t).normalize();
69
70
  }
70
71
  getEastNorthUpFrame(e, t = new T()) {
71
- const r = $e, n = $r, a = jr;
72
+ const r = $e, n = jr, a = Yr;
72
73
  return this.getEastNorthUpVectors(e, r, n, a), t.makeBasis(r, n, a).setPosition(e);
73
74
  }
74
75
  getNorthUpEastFrame(e, t = new T()) {
75
- const r = $e, n = $r, a = jr;
76
+ const r = $e, n = jr, a = Yr;
76
77
  return this.getEastNorthUpVectors(e, r, n, a), t.makeBasis(n, a, r).setPosition(e);
77
78
  }
78
79
  getIntersection(e, t = new p()) {
79
- const r = this.reciprocalRadii($e), n = $r.copy(r).multiply(e.origin), a = jr.copy(r).multiply(e.direction), o = n.lengthSq(), s = a.lengthSq(), c = n.dot(a), l = c ** 2 - s * (o - 1);
80
+ const r = this.reciprocalRadii($e), n = jr.copy(r).multiply(e.origin), a = Yr.copy(r).multiply(e.direction), o = n.lengthSq(), s = a.lengthSq(), c = n.dot(a), l = c ** 2 - s * (o - 1);
80
81
  if (o === 1)
81
82
  return t.copy(e.origin);
82
83
  if (o > 1) {
@@ -93,7 +94,7 @@ const $e = /* @__PURE__ */ new p(), $r = /* @__PURE__ */ new p(), jr = /* @__PUR
93
94
  return e.at(-c / s, t);
94
95
  }
95
96
  getOsculatingSphereCenter(e, t, r = new p()) {
96
- dr(this.radii.x === this.radii.y);
97
+ hr(this.radii.x === this.radii.y);
97
98
  const n = this.radii.x ** 2, a = this.radii.z ** 2, o = $e.set(
98
99
  e.x / n,
99
100
  e.y / n,
@@ -102,7 +103,7 @@ const $e = /* @__PURE__ */ new p(), $r = /* @__PURE__ */ new p(), jr = /* @__PUR
102
103
  return r.copy(o.multiplyScalar(-t).add(e));
103
104
  }
104
105
  getNormalAtHorizon(e, t, r = new p()) {
105
- dr(this.radii.x === this.radii.y);
106
+ hr(this.radii.x === this.radii.y);
106
107
  const n = this.radii.x ** 2, a = this.radii.z ** 2, o = e, s = t;
107
108
  let c = (o.x * s.x + o.y * s.y) / n + o.z * s.z / a;
108
109
  c /= (o.x ** 2 + o.y ** 2) / n + o.z ** 2 / a;
@@ -110,13 +111,13 @@ const $e = /* @__PURE__ */ new p(), $r = /* @__PURE__ */ new p(), jr = /* @__PUR
110
111
  return r.set(l.x / n, l.y / n, l.z / a).normalize();
111
112
  }
112
113
  };
113
- si.WGS84 = /* @__PURE__ */ new si(
114
+ ci.WGS84 = /* @__PURE__ */ new ci(
114
115
  6378137,
115
116
  6378137,
116
117
  6356752314245179e-9
117
118
  );
118
- let Ne = si;
119
- const Qt = /* @__PURE__ */ new p(), fn = /* @__PURE__ */ new p(), At = class ci {
119
+ let Ne = ci;
120
+ const er = /* @__PURE__ */ new p(), gn = /* @__PURE__ */ new p(), Ct = class ui {
120
121
  constructor(e = 0, t = 0, r = 0) {
121
122
  this.longitude = e, this.latitude = t, this.height = r;
122
123
  }
@@ -124,7 +125,7 @@ const Qt = /* @__PURE__ */ new p(), fn = /* @__PURE__ */ new p(), At = class ci
124
125
  return this.longitude = e, this.latitude = t, r != null && (this.height = r), this;
125
126
  }
126
127
  clone() {
127
- return new ci(this.longitude, this.latitude, this.height);
128
+ return new ui(this.longitude, this.latitude, this.height);
128
129
  }
129
130
  copy(e) {
130
131
  return this.longitude = e.longitude, this.latitude = e.latitude, this.height = e.height, this;
@@ -142,33 +143,33 @@ const Qt = /* @__PURE__ */ new p(), fn = /* @__PURE__ */ new p(), At = class ci
142
143
  return this.height = e, this;
143
144
  }
144
145
  normalize() {
145
- return this.longitude < ci.MIN_LONGITUDE && (this.longitude += Math.PI * 2), this;
146
+ return this.longitude < ui.MIN_LONGITUDE && (this.longitude += Math.PI * 2), this;
146
147
  }
147
148
  // See: https://en.wikipedia.org/wiki/Geographic_coordinate_conversion
148
149
  // Reference: https://github.com/CesiumGS/cesium/blob/1.122/packages/engine/Source/Core/Geodetic.js#L119
149
150
  setFromECEF(e, t) {
150
- const r = (t?.ellipsoid ?? Ne.WGS84).reciprocalRadiiSquared(Qt), n = ca(
151
+ const r = (t?.ellipsoid ?? Ne.WGS84).reciprocalRadiiSquared(er), n = ua(
151
152
  e,
152
153
  r,
153
- fn,
154
+ gn,
154
155
  t
155
156
  );
156
157
  if (n == null)
157
158
  throw new Error(
158
159
  `Could not project position to ellipsoid surface: ${e.toArray()}`
159
160
  );
160
- const a = Qt.multiplyVectors(n, r).normalize();
161
+ const a = er.multiplyVectors(n, r).normalize();
161
162
  this.longitude = Math.atan2(a.y, a.x), this.latitude = Math.asin(a.z);
162
- const o = Qt.subVectors(e, n);
163
+ const o = er.subVectors(e, n);
163
164
  return this.height = Math.sign(o.dot(e)) * o.length(), this;
164
165
  }
165
166
  // See: https://en.wikipedia.org/wiki/Geographic_coordinate_conversion
166
167
  // Reference: https://github.com/CesiumGS/cesium/blob/1.122/packages/engine/Source/Core/Cartesian3.js#L916
167
168
  toECEF(e = new p(), t) {
168
- const r = t?.ellipsoid ?? Ne.WGS84, n = Qt.multiplyVectors(
169
+ const r = t?.ellipsoid ?? Ne.WGS84, n = er.multiplyVectors(
169
170
  r.radii,
170
171
  r.radii
171
- ), a = Math.cos(this.latitude), o = fn.set(
172
+ ), a = Math.cos(this.latitude), o = gn.set(
172
173
  a * Math.cos(this.longitude),
173
174
  a * Math.sin(this.longitude),
174
175
  Math.sin(this.latitude)
@@ -185,15 +186,15 @@ const Qt = /* @__PURE__ */ new p(), fn = /* @__PURE__ */ new p(), At = class ci
185
186
  yield this.longitude, yield this.latitude, yield this.height;
186
187
  }
187
188
  };
188
- At.MIN_LONGITUDE = -Math.PI, At.MAX_LONGITUDE = Math.PI, At.MIN_LATITUDE = -Math.PI / 2, At.MAX_LATITUDE = Math.PI / 2;
189
- let Gi = At;
190
- class ua extends Ui {
189
+ Ct.MIN_LONGITUDE = -Math.PI, Ct.MAX_LONGITUDE = Math.PI, Ct.MIN_LATITUDE = -Math.PI / 2, Ct.MAX_LATITUDE = Math.PI / 2;
190
+ let zi = Ct;
191
+ class la extends Hi {
191
192
  load(e, t, r, n) {
192
- const a = new po(this.manager);
193
+ const a = new fo(this.manager);
193
194
  a.setResponseType("arraybuffer"), a.setRequestHeader(this.requestHeader), a.setPath(this.path), a.setWithCredentials(this.withCredentials), a.load(
194
195
  e,
195
196
  (o) => {
196
- dr(o instanceof ArrayBuffer);
197
+ hr(o instanceof ArrayBuffer);
197
198
  try {
198
199
  t(o);
199
200
  } catch (s) {
@@ -206,9 +207,9 @@ class ua extends Ui {
206
207
  }
207
208
  }
208
209
  function jo(i) {
209
- return i instanceof fo ? i.getContext().getExtension("OES_texture_float_linear") != null : i.backend.hasFeature?.("float32-filterable") ?? !1;
210
+ return i instanceof go ? i.getContext().getExtension("OES_texture_float_linear") != null : i.backend.hasFeature?.("float32-filterable") ?? !1;
210
211
  }
211
- const Yo = 128, Xo = 128, qo = 64, Zo = "This is not an object", Ko = "This is not a Float16Array object", gn = "This constructor is not a subclass of Float16Array", la = "The constructor property value is not an object", Jo = "Species constructor didn't return TypedArray object", Qo = "Derived constructor created TypedArray object which was too small length", Dt = "Attempting to access detached ArrayBuffer", ui = "Cannot convert undefined or null to object", li = "Cannot mix BigInt and other types, use explicit conversions", vn = "@@iterator property is not callable", _n = "Reduce of empty array with no initial value", es = "The comparison function must be either a function or undefined", Yr = "Offset is out of bounds";
212
+ const Yo = 128, Xo = 128, qo = 64, Zo = "This is not an object", Ko = "This is not a Float16Array object", vn = "This constructor is not a subclass of Float16Array", da = "The constructor property value is not an object", Jo = "Species constructor didn't return TypedArray object", Qo = "Derived constructor created TypedArray object which was too small length", Ot = "Attempting to access detached ArrayBuffer", li = "Cannot convert undefined or null to object", di = "Cannot mix BigInt and other types, use explicit conversions", _n = "@@iterator property is not callable", Sn = "Reduce of empty array with no initial value", es = "The comparison function must be either a function or undefined", Xr = "Offset is out of bounds";
212
213
  function M(i) {
213
214
  return (e, ...t) => te(i, e, t);
214
215
  }
@@ -222,64 +223,64 @@ function ft(i, e) {
222
223
  }
223
224
  const {
224
225
  apply: te,
225
- construct: Ct,
226
+ construct: It,
226
227
  defineProperty: ts,
227
- get: Xr,
228
+ get: qr,
228
229
  getOwnPropertyDescriptor: ut,
229
- getPrototypeOf: zt,
230
- has: di,
231
- ownKeys: da,
232
- set: Sn,
233
- setPrototypeOf: ha
230
+ getPrototypeOf: Bt,
231
+ has: hi,
232
+ ownKeys: ha,
233
+ set: Tn,
234
+ setPrototypeOf: ma
234
235
  } = Reflect, rs = Proxy, {
235
236
  EPSILON: is,
236
- MAX_SAFE_INTEGER: Tn,
237
- isFinite: ma,
237
+ MAX_SAFE_INTEGER: xn,
238
+ isFinite: pa,
238
239
  isNaN: lt
239
240
  } = Number, {
240
241
  iterator: fe,
241
242
  species: ns,
242
- toStringTag: zi,
243
+ toStringTag: Bi,
243
244
  for: as
244
245
  } = Symbol, dt = Object, {
245
- create: Rr,
246
- defineProperty: Bt,
246
+ create: Ar,
247
+ defineProperty: Wt,
247
248
  freeze: os,
248
- is: xn
249
- } = dt, hi = dt.prototype, ss = (
249
+ is: yn
250
+ } = dt, mi = dt.prototype, ss = (
250
251
  /** @type {any} */
251
- hi.__lookupGetter__ ? M(
252
+ mi.__lookupGetter__ ? M(
252
253
  /** @type {any} */
253
- hi.__lookupGetter__
254
+ mi.__lookupGetter__
254
255
  ) : (i, e) => {
255
256
  if (i == null)
256
257
  throw H(
257
- ui
258
+ li
258
259
  );
259
260
  let t = dt(i);
260
261
  do {
261
262
  const r = ut(t, e);
262
263
  if (r !== void 0)
263
264
  return xe(r, "get") ? r.get : void 0;
264
- } while ((t = zt(t)) !== null);
265
+ } while ((t = Bt(t)) !== null);
265
266
  }
266
267
  ), xe = (
267
268
  /** @type {any} */
268
- dt.hasOwn || M(hi.hasOwnProperty)
269
- ), pa = Array, fa = pa.isArray, Ar = pa.prototype, cs = M(Ar.join), us = M(Ar.push), ls = M(
270
- Ar.toLocaleString
271
- ), Bi = Ar[fe], ds = M(Bi), {
269
+ dt.hasOwn || M(mi.hasOwnProperty)
270
+ ), fa = Array, ga = fa.isArray, Cr = fa.prototype, cs = M(Cr.join), us = M(Cr.push), ls = M(
271
+ Cr.toLocaleString
272
+ ), Wi = Cr[fe], ds = M(Wi), {
272
273
  abs: hs,
273
- trunc: ga
274
- } = Math, Cr = ArrayBuffer, ms = Cr.isView, va = Cr.prototype, ps = M(va.slice), fs = ft(va, "byteLength"), mi = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : null, gs = mi && ft(mi.prototype, "byteLength"), Wi = zt(Uint8Array), vs = Wi.from, V = Wi.prototype, _s = V[fe], Ss = M(V.keys), Ts = M(
274
+ trunc: va
275
+ } = Math, Ir = ArrayBuffer, ms = Ir.isView, _a = Ir.prototype, ps = M(_a.slice), fs = ft(_a, "byteLength"), pi = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : null, gs = pi && ft(pi.prototype, "byteLength"), ki = Bt(Uint8Array), vs = ki.from, V = ki.prototype, _s = V[fe], Ss = M(V.keys), Ts = M(
275
276
  V.values
276
277
  ), xs = M(
277
278
  V.entries
278
- ), ys = M(V.set), yn = M(
279
+ ), ys = M(V.set), En = M(
279
280
  V.reverse
280
281
  ), Es = M(V.fill), ws = M(
281
282
  V.copyWithin
282
- ), En = M(V.sort), yt = M(V.slice), Rs = M(
283
+ ), wn = M(V.sort), Et = M(V.slice), Rs = M(
283
284
  V.subarray
284
285
  ), B = ft(
285
286
  V,
@@ -290,15 +291,15 @@ const {
290
291
  ), A = ft(
291
292
  V,
292
293
  "length"
293
- ), _a = ft(
294
+ ), Sa = ft(
294
295
  V,
295
- zi
296
- ), As = Uint8Array, ae = Uint16Array, wn = (...i) => te(vs, ae, i), ki = Uint32Array, Cs = Float32Array, Me = zt([][fe]()), Ir = M(Me.next), Is = M((function* () {
297
- })().next), Ns = zt(Me), H = TypeError, qr = RangeError, Sa = WeakSet, Ta = Sa.prototype, Ds = M(Ta.add), Os = M(Ta.has), Nr = WeakMap, Vi = Nr.prototype, hr = M(Vi.get), bs = M(Vi.has), $i = M(Vi.set), xa = new Nr(), Ps = Rr(null, {
296
+ Bi
297
+ ), As = Uint8Array, ae = Uint16Array, Rn = (...i) => te(vs, ae, i), Vi = Uint32Array, Cs = Float32Array, Me = Bt([][fe]()), Nr = M(Me.next), Is = M((function* () {
298
+ })().next), Ns = Bt(Me), H = TypeError, Zr = RangeError, Ta = WeakSet, xa = Ta.prototype, Ds = M(xa.add), Os = M(xa.has), Dr = WeakMap, $i = Dr.prototype, mr = M($i.get), bs = M($i.has), ji = M($i.set), ya = new Dr(), Ps = Ar(null, {
298
299
  next: {
299
300
  value: function() {
300
- const i = hr(xa, this);
301
- return Ir(i);
301
+ const i = mr(ya, this);
302
+ return Nr(i);
302
303
  }
303
304
  },
304
305
  [fe]: {
@@ -307,44 +308,44 @@ const {
307
308
  }
308
309
  }
309
310
  });
310
- function er(i) {
311
- if (i[fe] === Bi && Me.next === Ir)
311
+ function tr(i) {
312
+ if (i[fe] === Wi && Me.next === Nr)
312
313
  return i;
313
- const e = Rr(Ps);
314
- return $i(xa, e, ds(i)), e;
314
+ const e = Ar(Ps);
315
+ return ji(ya, e, ds(i)), e;
315
316
  }
316
- const ya = new Nr(), Ea = Rr(Ns, {
317
+ const Ea = new Dr(), wa = Ar(Ns, {
317
318
  next: {
318
319
  value: function() {
319
- const i = hr(ya, this);
320
+ const i = mr(Ea, this);
320
321
  return Is(i);
321
322
  },
322
323
  writable: !0,
323
324
  configurable: !0
324
325
  }
325
326
  });
326
- for (const i of da(Me))
327
- i !== "next" && Bt(Ea, i, ut(Me, i));
328
- function Rn(i) {
329
- const e = Rr(Ea);
330
- return $i(ya, e, i), e;
327
+ for (const i of ha(Me))
328
+ i !== "next" && Wt(wa, i, ut(Me, i));
329
+ function An(i) {
330
+ const e = Ar(wa);
331
+ return ji(Ea, e, i), e;
331
332
  }
332
- function mr(i) {
333
+ function pr(i) {
333
334
  return i !== null && typeof i == "object" || typeof i == "function";
334
335
  }
335
- function An(i) {
336
+ function Cn(i) {
336
337
  return i !== null && typeof i == "object";
337
338
  }
338
- function pr(i) {
339
- return _a(i) !== void 0;
339
+ function fr(i) {
340
+ return Sa(i) !== void 0;
340
341
  }
341
- function pi(i) {
342
- const e = _a(i);
342
+ function fi(i) {
343
+ const e = Sa(i);
343
344
  return e === "BigInt64Array" || e === "BigUint64Array";
344
345
  }
345
346
  function Ls(i) {
346
347
  try {
347
- return fa(i) ? !1 : (fs(
348
+ return ga(i) ? !1 : (fs(
348
349
  /** @type {any} */
349
350
  i
350
351
  ), !0);
@@ -352,8 +353,8 @@ function Ls(i) {
352
353
  return !1;
353
354
  }
354
355
  }
355
- function wa(i) {
356
- if (mi === null)
356
+ function Ra(i) {
357
+ if (pi === null)
357
358
  return !1;
358
359
  try {
359
360
  return gs(
@@ -365,69 +366,69 @@ function wa(i) {
365
366
  }
366
367
  }
367
368
  function Ms(i) {
368
- return Ls(i) || wa(i);
369
+ return Ls(i) || Ra(i);
369
370
  }
370
- function Cn(i) {
371
- return fa(i) ? i[fe] === Bi && Me.next === Ir : !1;
371
+ function In(i) {
372
+ return ga(i) ? i[fe] === Wi && Me.next === Nr : !1;
372
373
  }
373
374
  function Us(i) {
374
- return pr(i) ? i[fe] === _s && Me.next === Ir : !1;
375
+ return fr(i) ? i[fe] === _s && Me.next === Nr : !1;
375
376
  }
376
- function tr(i) {
377
+ function rr(i) {
377
378
  if (typeof i != "string")
378
379
  return !1;
379
380
  const e = +i;
380
- return i !== e + "" || !ma(e) ? !1 : e === ga(e);
381
+ return i !== e + "" || !pa(e) ? !1 : e === va(e);
381
382
  }
382
- const fr = as("__Float16Array__");
383
+ const gr = as("__Float16Array__");
383
384
  function Hs(i) {
384
- if (!An(i))
385
+ if (!Cn(i))
385
386
  return !1;
386
- const e = zt(i);
387
- if (!An(e))
387
+ const e = Bt(i);
388
+ if (!Cn(e))
388
389
  return !1;
389
390
  const t = e.constructor;
390
391
  if (t === void 0)
391
392
  return !1;
392
- if (!mr(t))
393
- throw H(la);
394
- return di(t, fr);
393
+ if (!pr(t))
394
+ throw H(da);
395
+ return hi(t, gr);
395
396
  }
396
- const fi = 1 / is;
397
+ const gi = 1 / is;
397
398
  function Fs(i) {
398
- return i + fi - fi;
399
+ return i + gi - gi;
399
400
  }
400
- const Ra = 6103515625e-14, Gs = 65504, Aa = 9765625e-10, In = Aa * Ra, zs = Aa * fi;
401
+ const Aa = 6103515625e-14, Gs = 65504, Ca = 9765625e-10, Nn = Ca * Aa, zs = Ca * gi;
401
402
  function Bs(i) {
402
403
  const e = +i;
403
- if (!ma(e) || e === 0)
404
+ if (!pa(e) || e === 0)
404
405
  return e;
405
406
  const t = e > 0 ? 1 : -1, r = hs(e);
406
- if (r < Ra)
407
- return t * Fs(r / In) * In;
407
+ if (r < Aa)
408
+ return t * Fs(r / Nn) * Nn;
408
409
  const n = (1 + zs) * r, a = n - (n - r);
409
410
  return a > Gs || lt(a) ? t * (1 / 0) : t * a;
410
411
  }
411
- const Ca = new Cr(4), Ia = new Cs(Ca), Na = new ki(Ca), oe = new ae(512), se = new As(512);
412
+ const Ia = new Ir(4), Na = new Cs(Ia), Da = new Vi(Ia), oe = new ae(512), se = new As(512);
412
413
  for (let i = 0; i < 256; ++i) {
413
414
  const e = i - 127;
414
415
  e < -24 ? (oe[i] = 0, oe[i | 256] = 32768, se[i] = 24, se[i | 256] = 24) : e < -14 ? (oe[i] = 1024 >> -e - 14, oe[i | 256] = 1024 >> -e - 14 | 32768, se[i] = -e - 1, se[i | 256] = -e - 1) : e <= 15 ? (oe[i] = e + 15 << 10, oe[i | 256] = e + 15 << 10 | 32768, se[i] = 13, se[i | 256] = 13) : e < 128 ? (oe[i] = 31744, oe[i | 256] = 64512, se[i] = 24, se[i | 256] = 24) : (oe[i] = 31744, oe[i | 256] = 64512, se[i] = 13, se[i | 256] = 13);
415
416
  }
416
417
  function he(i) {
417
- Ia[0] = Bs(i);
418
- const e = Na[0], t = e >> 23 & 511;
418
+ Na[0] = Bs(i);
419
+ const e = Da[0], t = e >> 23 & 511;
419
420
  return oe[t] + ((e & 8388607) >> se[t]);
420
421
  }
421
- const ji = new ki(2048);
422
+ const Yi = new Vi(2048);
422
423
  for (let i = 1; i < 1024; ++i) {
423
424
  let e = i << 13, t = 0;
424
425
  for (; (e & 8388608) === 0; )
425
426
  e <<= 1, t -= 8388608;
426
- e &= -8388609, t += 947912704, ji[i] = e | t;
427
+ e &= -8388609, t += 947912704, Yi[i] = e | t;
427
428
  }
428
429
  for (let i = 1024; i < 2048; ++i)
429
- ji[i] = 939524096 + (i - 1024 << 13);
430
- const gt = new ki(64);
430
+ Yi[i] = 939524096 + (i - 1024 << 13);
431
+ const gt = new Vi(64);
431
432
  for (let i = 1; i < 31; ++i)
432
433
  gt[i] = i << 23;
433
434
  gt[31] = 1199570944;
@@ -435,33 +436,33 @@ gt[32] = 2147483648;
435
436
  for (let i = 33; i < 63; ++i)
436
437
  gt[i] = 2147483648 + (i - 32 << 23);
437
438
  gt[63] = 3347054592;
438
- const Da = new ae(64);
439
+ const Oa = new ae(64);
439
440
  for (let i = 1; i < 64; ++i)
440
- i !== 32 && (Da[i] = 1024);
441
+ i !== 32 && (Oa[i] = 1024);
441
442
  function I(i) {
442
443
  const e = i >> 10;
443
- return Na[0] = ji[Da[e] + (i & 1023)] + gt[e], Ia[0];
444
+ return Da[0] = Yi[Oa[e] + (i & 1023)] + gt[e], Na[0];
444
445
  }
445
446
  function _e(i) {
446
447
  const e = +i;
447
- return lt(e) || e === 0 ? 0 : ga(e);
448
+ return lt(e) || e === 0 ? 0 : va(e);
448
449
  }
449
- function Zr(i) {
450
+ function Kr(i) {
450
451
  const e = _e(i);
451
- return e < 0 ? 0 : e < Tn ? e : Tn;
452
+ return e < 0 ? 0 : e < xn ? e : xn;
452
453
  }
453
- function rr(i, e) {
454
- if (!mr(i))
454
+ function ir(i, e) {
455
+ if (!pr(i))
455
456
  throw H(Zo);
456
457
  const t = i.constructor;
457
458
  if (t === void 0)
458
459
  return e;
459
- if (!mr(t))
460
- throw H(la);
460
+ if (!pr(t))
461
+ throw H(da);
461
462
  return t[ns] ?? e;
462
463
  }
463
- function Ot(i) {
464
- if (wa(i))
464
+ function bt(i) {
465
+ if (Ra(i))
465
466
  return !1;
466
467
  try {
467
468
  return ps(i, 0, 0), !1;
@@ -469,7 +470,7 @@ function Ot(i) {
469
470
  }
470
471
  return !0;
471
472
  }
472
- function Nn(i, e) {
473
+ function Dn(i, e) {
473
474
  const t = lt(i), r = lt(e);
474
475
  if (t && r)
475
476
  return 0;
@@ -480,7 +481,7 @@ function Nn(i, e) {
480
481
  if (i > e)
481
482
  return 1;
482
483
  if (i === 0 && e === 0) {
483
- const n = xn(i, 0), a = xn(e, 0);
484
+ const n = yn(i, 0), a = yn(e, 0);
484
485
  if (!n && a)
485
486
  return -1;
486
487
  if (n && !a)
@@ -488,16 +489,16 @@ function Nn(i, e) {
488
489
  }
489
490
  return 0;
490
491
  }
491
- const Yi = 2, gr = new Nr();
492
+ const Xi = 2, vr = new Dr();
492
493
  function Je(i) {
493
- return bs(gr, i) || !ms(i) && Hs(i);
494
+ return bs(vr, i) || !ms(i) && Hs(i);
494
495
  }
495
496
  function R(i) {
496
497
  if (!Je(i))
497
498
  throw H(Ko);
498
499
  }
499
- function ir(i, e) {
500
- const t = Je(i), r = pr(i);
500
+ function nr(i, e) {
501
+ const t = Je(i), r = fr(i);
501
502
  if (!t && !r)
502
503
  throw H(Jo);
503
504
  if (typeof e == "number") {
@@ -512,63 +513,63 @@ function ir(i, e) {
512
513
  Qo
513
514
  );
514
515
  }
515
- if (pi(i))
516
- throw H(li);
516
+ if (fi(i))
517
+ throw H(di);
517
518
  }
518
519
  function x(i) {
519
- const e = hr(gr, i);
520
+ const e = mr(vr, i);
520
521
  if (e !== void 0) {
521
522
  const n = B(e);
522
- if (Ot(n))
523
- throw H(Dt);
523
+ if (bt(n))
524
+ throw H(Ot);
524
525
  return e;
525
526
  }
526
527
  const t = (
527
528
  /** @type {any} */
528
529
  i.buffer
529
530
  );
530
- if (Ot(t))
531
- throw H(Dt);
532
- const r = Ct(Ee, [
531
+ if (bt(t))
532
+ throw H(Ot);
533
+ const r = It(Ee, [
533
534
  t,
534
535
  /** @type {any} */
535
536
  i.byteOffset,
536
537
  /** @type {any} */
537
538
  i.length
538
539
  ], i.constructor);
539
- return hr(gr, r);
540
+ return mr(vr, r);
540
541
  }
541
- function Dn(i) {
542
+ function On(i) {
542
543
  const e = A(i), t = [];
543
544
  for (let r = 0; r < e; ++r)
544
545
  t[r] = I(i[r]);
545
546
  return t;
546
547
  }
547
- const Oa = new Sa();
548
- for (const i of da(V)) {
549
- if (i === zi)
548
+ const ba = new Ta();
549
+ for (const i of ha(V)) {
550
+ if (i === Bi)
550
551
  continue;
551
552
  const e = ut(V, i);
552
- xe(e, "get") && typeof e.get == "function" && Ds(Oa, e.get);
553
+ xe(e, "get") && typeof e.get == "function" && Ds(ba, e.get);
553
554
  }
554
555
  const Ws = os(
555
556
  /** @type {ProxyHandler<Float16BitsArray>} */
556
557
  {
557
558
  get(i, e, t) {
558
- return tr(e) && xe(i, e) ? I(Xr(i, e)) : Os(Oa, ss(i, e)) ? Xr(i, e) : Xr(i, e, t);
559
+ return rr(e) && xe(i, e) ? I(qr(i, e)) : Os(ba, ss(i, e)) ? qr(i, e) : qr(i, e, t);
559
560
  },
560
561
  set(i, e, t, r) {
561
- return tr(e) && xe(i, e) ? Sn(i, e, he(t)) : Sn(i, e, t, r);
562
+ return rr(e) && xe(i, e) ? Tn(i, e, he(t)) : Tn(i, e, t, r);
562
563
  },
563
564
  getOwnPropertyDescriptor(i, e) {
564
- if (tr(e) && xe(i, e)) {
565
+ if (rr(e) && xe(i, e)) {
565
566
  const t = ut(i, e);
566
567
  return t.value = I(t.value), t;
567
568
  }
568
569
  return ut(i, e);
569
570
  },
570
571
  defineProperty(i, e, t) {
571
- return tr(e) && xe(i, e) && xe(t, "value") && (t.value = he(t.value)), ts(i, e, t);
572
+ return rr(e) && xe(i, e) && xe(t, "value") && (t.value = he(t.value)), ts(i, e, t);
572
573
  }
573
574
  }
574
575
  );
@@ -577,37 +578,37 @@ let Ee = class W {
577
578
  constructor(e, t, r) {
578
579
  let n;
579
580
  if (Je(e))
580
- n = Ct(ae, [x(e)], new.target);
581
- else if (mr(e) && !Ms(e)) {
581
+ n = It(ae, [x(e)], new.target);
582
+ else if (pr(e) && !Ms(e)) {
582
583
  let o, s;
583
- if (pr(e)) {
584
+ if (fr(e)) {
584
585
  o = e, s = A(e);
585
586
  const c = B(e);
586
- if (Ot(c))
587
- throw H(Dt);
588
- if (pi(e))
589
- throw H(li);
590
- const l = new Cr(
591
- s * Yi
587
+ if (bt(c))
588
+ throw H(Ot);
589
+ if (fi(e))
590
+ throw H(di);
591
+ const l = new Ir(
592
+ s * Xi
592
593
  );
593
- n = Ct(ae, [l], new.target);
594
+ n = It(ae, [l], new.target);
594
595
  } else {
595
596
  const c = e[fe];
596
597
  if (c != null && typeof c != "function")
597
- throw H(vn);
598
- c != null ? Cn(e) ? (o = e, s = e.length) : (o = [.../** @type {Iterable<unknown>} */
598
+ throw H(_n);
599
+ c != null ? In(e) ? (o = e, s = e.length) : (o = [.../** @type {Iterable<unknown>} */
599
600
  e], s = o.length) : (o = /** @type {ArrayLike<unknown>} */
600
- e, s = Zr(o.length)), n = Ct(ae, [s], new.target);
601
+ e, s = Kr(o.length)), n = It(ae, [s], new.target);
601
602
  }
602
603
  for (let c = 0; c < s; ++c)
603
604
  n[c] = he(o[c]);
604
605
  } else
605
- n = Ct(ae, arguments, new.target);
606
+ n = It(ae, arguments, new.target);
606
607
  const a = (
607
608
  /** @type {any} */
608
609
  new rs(n, Ws)
609
610
  );
610
- return $i(gr, a, n), a;
611
+ return ji(vr, a, n), a;
611
612
  }
612
613
  /**
613
614
  * limitation: `Object.getOwnPropertyNames(Float16Array)` or `Reflect.ownKeys(Float16Array)` include this key
@@ -615,9 +616,9 @@ let Ee = class W {
615
616
  */
616
617
  static from(e, ...t) {
617
618
  const r = this;
618
- if (!di(r, fr))
619
+ if (!hi(r, gr))
619
620
  throw H(
620
- gn
621
+ vn
621
622
  );
622
623
  if (r === W) {
623
624
  if (Je(e) && t.length === 0) {
@@ -627,21 +628,21 @@ let Ee = class W {
627
628
  A(d)
628
629
  );
629
630
  return new W(
630
- B(yt(h))
631
+ B(Et(h))
631
632
  );
632
633
  }
633
634
  if (t.length === 0)
634
635
  return new W(
635
636
  B(
636
- wn(e, he)
637
+ Rn(e, he)
637
638
  )
638
639
  );
639
640
  const c = t[0], l = t[1];
640
641
  return new W(
641
642
  B(
642
- wn(e, function(d, ...h) {
643
+ Rn(e, function(d, ...h) {
643
644
  return he(
644
- te(c, this, [d, ...er(h)])
645
+ te(c, this, [d, ...tr(h)])
645
646
  );
646
647
  }, l)
647
648
  )
@@ -650,15 +651,15 @@ let Ee = class W {
650
651
  let n, a;
651
652
  const o = e[fe];
652
653
  if (o != null && typeof o != "function")
653
- throw H(vn);
654
+ throw H(_n);
654
655
  if (o != null)
655
- Cn(e) ? (n = e, a = e.length) : Us(e) ? (n = e, a = A(e)) : (n = [...e], a = n.length);
656
+ In(e) ? (n = e, a = e.length) : Us(e) ? (n = e, a = A(e)) : (n = [...e], a = n.length);
656
657
  else {
657
658
  if (e == null)
658
659
  throw H(
659
- ui
660
+ li
660
661
  );
661
- n = dt(e), a = Zr(n.length);
662
+ n = dt(e), a = Kr(n.length);
662
663
  }
663
664
  const s = new r(a);
664
665
  if (t.length === 0)
@@ -678,9 +679,9 @@ let Ee = class W {
678
679
  */
679
680
  static of(...e) {
680
681
  const t = this;
681
- if (!di(t, fr))
682
+ if (!hi(t, gr))
682
683
  throw H(
683
- gn
684
+ vn
684
685
  );
685
686
  const r = e.length;
686
687
  if (t === W) {
@@ -707,7 +708,7 @@ let Ee = class W {
707
708
  values() {
708
709
  R(this);
709
710
  const e = x(this);
710
- return Rn((function* () {
711
+ return An((function* () {
711
712
  for (const t of Ts(e))
712
713
  yield I(t);
713
714
  })());
@@ -719,7 +720,7 @@ let Ee = class W {
719
720
  entries() {
720
721
  R(this);
721
722
  const e = x(this);
722
- return Rn((function* () {
723
+ return An((function* () {
723
724
  for (const [t, r] of xs(e))
724
725
  yield (
725
726
  /** @type {[number, number]} */
@@ -739,14 +740,14 @@ let Ee = class W {
739
740
  R(this);
740
741
  const r = x(this), n = A(r), a = _e(e), o = a >= 0 ? a : n + a, s = +t;
741
742
  if (o < 0 || o >= n)
742
- throw qr(Yr);
743
+ throw Zr(Xr);
743
744
  const c = new ae(
744
745
  B(r),
745
746
  be(r),
746
747
  A(r)
747
748
  ), l = new W(
748
749
  B(
749
- yt(c)
750
+ Et(c)
750
751
  )
751
752
  ), d = x(l);
752
753
  return d[o] = he(s), l;
@@ -754,7 +755,7 @@ let Ee = class W {
754
755
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.map */
755
756
  map(e, ...t) {
756
757
  R(this);
757
- const r = x(this), n = A(r), a = t[0], o = rr(r, W);
758
+ const r = x(this), n = A(r), a = t[0], o = ir(r, W);
758
759
  if (o === W) {
759
760
  const c = new W(n), l = x(c);
760
761
  for (let d = 0; d < n; ++d) {
@@ -766,7 +767,7 @@ let Ee = class W {
766
767
  return c;
767
768
  }
768
769
  const s = new o(n);
769
- ir(s, n);
770
+ nr(s, n);
770
771
  for (let c = 0; c < n; ++c) {
771
772
  const l = I(r[c]);
772
773
  s[c] = te(e, a, [l, c, this]);
@@ -784,8 +785,8 @@ let Ee = class W {
784
785
  const d = I(r[l]);
785
786
  te(e, a, [d, l, this]) && us(o, d);
786
787
  }
787
- const s = rr(r, W), c = new s(o);
788
- return ir(c), /** @type {any} */
788
+ const s = ir(r, W), c = new s(o);
789
+ return nr(c), /** @type {any} */
789
790
  c;
790
791
  }
791
792
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce */
@@ -793,7 +794,7 @@ let Ee = class W {
793
794
  R(this);
794
795
  const r = x(this), n = A(r);
795
796
  if (n === 0 && t.length === 0)
796
- throw H(_n);
797
+ throw H(Sn);
797
798
  let a, o;
798
799
  t.length === 0 ? (a = I(r[0]), o = 1) : (a = t[0], o = 0);
799
800
  for (let s = o; s < n; ++s)
@@ -810,7 +811,7 @@ let Ee = class W {
810
811
  R(this);
811
812
  const r = x(this), n = A(r);
812
813
  if (n === 0 && t.length === 0)
813
- throw H(_n);
814
+ throw H(Sn);
814
815
  let a, o;
815
816
  t.length === 0 ? (a = I(r[n - 1]), o = n - 2) : (a = t[0], o = n - 1);
816
817
  for (let s = o; s >= 0; --s)
@@ -906,14 +907,14 @@ let Ee = class W {
906
907
  R(this);
907
908
  const r = x(this), n = _e(t[0]);
908
909
  if (n < 0)
909
- throw qr(Yr);
910
+ throw Zr(Xr);
910
911
  if (e == null)
911
912
  throw H(
912
- ui
913
+ li
913
914
  );
914
- if (pi(e))
915
+ if (fi(e))
915
916
  throw H(
916
- li
917
+ di
917
918
  );
918
919
  if (Je(e))
919
920
  return ys(
@@ -921,14 +922,14 @@ let Ee = class W {
921
922
  x(e),
922
923
  n
923
924
  );
924
- if (pr(e)) {
925
+ if (fr(e)) {
925
926
  const c = B(e);
926
- if (Ot(c))
927
- throw H(Dt);
927
+ if (bt(c))
928
+ throw H(Ot);
928
929
  }
929
- const a = A(r), o = dt(e), s = Zr(o.length);
930
+ const a = A(r), o = dt(e), s = Kr(o.length);
930
931
  if (n === 1 / 0 || s + n > a)
931
- throw qr(Yr);
932
+ throw Zr(Xr);
932
933
  for (let c = 0; c < s; ++c)
933
934
  r[c + n] = he(o[c]);
934
935
  }
@@ -936,7 +937,7 @@ let Ee = class W {
936
937
  reverse() {
937
938
  R(this);
938
939
  const e = x(this);
939
- return yn(e), this;
940
+ return En(e), this;
940
941
  }
941
942
  /** @see https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.toReversed */
942
943
  toReversed() {
@@ -947,10 +948,10 @@ let Ee = class W {
947
948
  A(e)
948
949
  ), r = new W(
949
950
  B(
950
- yt(t)
951
+ Et(t)
951
952
  )
952
953
  ), n = x(r);
953
- return yn(n), r;
954
+ return En(n), r;
954
955
  }
955
956
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill */
956
957
  fill(e, ...t) {
@@ -959,20 +960,20 @@ let Ee = class W {
959
960
  return Es(
960
961
  r,
961
962
  he(e),
962
- ...er(t)
963
+ ...tr(t)
963
964
  ), this;
964
965
  }
965
966
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.copywithin */
966
967
  copyWithin(e, t, ...r) {
967
968
  R(this);
968
969
  const n = x(this);
969
- return ws(n, e, t, ...er(r)), this;
970
+ return ws(n, e, t, ...tr(r)), this;
970
971
  }
971
972
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort */
972
973
  sort(e) {
973
974
  R(this);
974
- const t = x(this), r = e !== void 0 ? e : Nn;
975
- return En(t, (n, a) => r(I(n), I(a))), this;
975
+ const t = x(this), r = e !== void 0 ? e : Dn;
976
+ return wn(t, (n, a) => r(I(n), I(a))), this;
976
977
  }
977
978
  /** @see https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.toSorted */
978
979
  toSorted(e) {
@@ -980,21 +981,21 @@ let Ee = class W {
980
981
  const t = x(this);
981
982
  if (e !== void 0 && typeof e != "function")
982
983
  throw new H(es);
983
- const r = e !== void 0 ? e : Nn, n = new ae(
984
+ const r = e !== void 0 ? e : Dn, n = new ae(
984
985
  B(t),
985
986
  be(t),
986
987
  A(t)
987
988
  ), a = new W(
988
989
  B(
989
- yt(n)
990
+ Et(n)
990
991
  )
991
992
  ), o = x(a);
992
- return En(o, (s, c) => r(I(s), I(c))), a;
993
+ return wn(o, (s, c) => r(I(s), I(c))), a;
993
994
  }
994
995
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice */
995
996
  slice(e, t) {
996
997
  R(this);
997
- const r = x(this), n = rr(r, W);
998
+ const r = x(this), n = ir(r, W);
998
999
  if (n === W) {
999
1000
  const g = new ae(
1000
1001
  B(r),
@@ -1003,7 +1004,7 @@ let Ee = class W {
1003
1004
  );
1004
1005
  return new W(
1005
1006
  B(
1006
- yt(g, e, t)
1007
+ Et(g, e, t)
1007
1008
  )
1008
1009
  );
1009
1010
  }
@@ -1013,11 +1014,11 @@ let Ee = class W {
1013
1014
  let l;
1014
1015
  s === -1 / 0 ? l = 0 : s < 0 ? l = a + s > 0 ? a + s : 0 : l = a < s ? a : s;
1015
1016
  const d = l - c > 0 ? l - c : 0, h = new n(d);
1016
- if (ir(h, d), d === 0)
1017
+ if (nr(h, d), d === 0)
1017
1018
  return h;
1018
1019
  const f = B(r);
1019
- if (Ot(f))
1020
- throw H(Dt);
1020
+ if (bt(f))
1021
+ throw H(Ot);
1021
1022
  let v = 0;
1022
1023
  for (; c < l; )
1023
1024
  h[v] = I(r[c]), ++c, ++v;
@@ -1029,7 +1030,7 @@ let Ee = class W {
1029
1030
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray */
1030
1031
  subarray(e, t) {
1031
1032
  R(this);
1032
- const r = x(this), n = rr(r, W), a = new ae(
1033
+ const r = x(this), n = ir(r, W), a = new ae(
1033
1034
  B(r),
1034
1035
  be(r),
1035
1036
  A(r)
@@ -1038,7 +1039,7 @@ let Ee = class W {
1038
1039
  be(o),
1039
1040
  A(o)
1040
1041
  );
1041
- return ir(s), /** @type {any} */
1042
+ return nr(s), /** @type {any} */
1042
1043
  s;
1043
1044
  }
1044
1045
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.indexof */
@@ -1086,17 +1087,17 @@ let Ee = class W {
1086
1087
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.join */
1087
1088
  join(e) {
1088
1089
  R(this);
1089
- const t = x(this), r = Dn(t);
1090
+ const t = x(this), r = On(t);
1090
1091
  return cs(r, e);
1091
1092
  }
1092
1093
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring */
1093
1094
  toLocaleString(...e) {
1094
1095
  R(this);
1095
- const t = x(this), r = Dn(t);
1096
- return ls(r, ...er(e));
1096
+ const t = x(this), r = On(t);
1097
+ return ls(r, ...tr(e));
1097
1098
  }
1098
1099
  /** @see https://tc39.es/ecma262/#sec-get-%typedarray%.prototype-@@tostringtag */
1099
- get [zi]() {
1100
+ get [Bi]() {
1100
1101
  if (Je(this))
1101
1102
  return (
1102
1103
  /** @type {any} */
@@ -1104,30 +1105,30 @@ let Ee = class W {
1104
1105
  );
1105
1106
  }
1106
1107
  };
1107
- Bt(Ee, "BYTES_PER_ELEMENT", {
1108
- value: Yi
1108
+ Wt(Ee, "BYTES_PER_ELEMENT", {
1109
+ value: Xi
1109
1110
  });
1110
- Bt(Ee, fr, {});
1111
- ha(Ee, Wi);
1112
- const vr = Ee.prototype;
1113
- Bt(vr, "BYTES_PER_ELEMENT", {
1114
- value: Yi
1111
+ Wt(Ee, gr, {});
1112
+ ma(Ee, ki);
1113
+ const _r = Ee.prototype;
1114
+ Wt(_r, "BYTES_PER_ELEMENT", {
1115
+ value: Xi
1115
1116
  });
1116
- Bt(vr, fe, {
1117
- value: vr.values,
1117
+ Wt(_r, fe, {
1118
+ value: _r.values,
1118
1119
  writable: !0,
1119
1120
  configurable: !0
1120
1121
  });
1121
- ha(vr, V);
1122
- function On(i) {
1122
+ ma(_r, V);
1123
+ function bn(i) {
1123
1124
  return i instanceof Int8Array || i instanceof Uint8Array || i instanceof Uint8ClampedArray || i instanceof Int16Array || i instanceof Uint16Array || i instanceof Int32Array || i instanceof Uint32Array || i instanceof Ee || i instanceof Float32Array || i instanceof Float64Array;
1124
1125
  }
1125
- let ks = class extends Ui {
1126
+ let ks = class extends Hi {
1126
1127
  constructor(e, t) {
1127
1128
  super(t), this.parser = e;
1128
1129
  }
1129
1130
  load(e, t, r, n) {
1130
- const a = new ua(this.manager);
1131
+ const a = new la(this.manager);
1131
1132
  a.setRequestHeader(this.requestHeader), a.setPath(this.path), a.setWithCredentials(this.withCredentials), a.load(
1132
1133
  e,
1133
1134
  (o) => {
@@ -1143,13 +1144,13 @@ let ks = class extends Ui {
1143
1144
  }
1144
1145
  };
1145
1146
  function Vs(i) {
1146
- const e = i instanceof Int8Array ? go : i instanceof Uint8Array ? un : i instanceof Uint8ClampedArray ? un : i instanceof Int16Array ? vo : i instanceof Uint16Array ? _o : i instanceof Int32Array ? So : i instanceof Uint32Array ? ia : i instanceof Ee ? K : i instanceof Float32Array ? oi : i instanceof Float64Array ? oi : null;
1147
- return dr(e != null), e;
1147
+ const e = i instanceof Int8Array ? vo : i instanceof Uint8Array ? ln : i instanceof Uint8ClampedArray ? ln : i instanceof Int16Array ? _o : i instanceof Uint16Array ? So : i instanceof Int32Array ? To : i instanceof Uint32Array ? na : i instanceof Ee ? K : i instanceof Float32Array ? si : i instanceof Float64Array ? si : null;
1148
+ return hr(e != null), e;
1148
1149
  }
1149
- let gi = class extends Ui {
1150
+ let vi = class extends Hi {
1150
1151
  constructor(e, t, r = {}, n) {
1151
1152
  super(n), this.textureClass = e, this.parser = t, this.options = {
1152
- format: Hi,
1153
+ format: Fi,
1153
1154
  minFilter: q,
1154
1155
  magFilter: q,
1155
1156
  ...r
@@ -1172,7 +1173,7 @@ let gi = class extends Ui {
1172
1173
  const ht = ue.clamp;
1173
1174
  ue.euclideanModulo;
1174
1175
  ue.inverseLerp;
1175
- const ba = ue.lerp, vi = ue.degToRad;
1176
+ const Pa = ue.lerp, _i = ue.degToRad;
1176
1177
  ue.radToDeg;
1177
1178
  ue.isPowerOfTwo;
1178
1179
  ue.ceilPowerOfTwo;
@@ -1186,7 +1187,7 @@ function js(i) {
1186
1187
  }
1187
1188
  function y(i) {
1188
1189
  return (e, t) => {
1189
- e instanceof yr ? Object.defineProperty(e, t, {
1190
+ e instanceof Er ? Object.defineProperty(e, t, {
1190
1191
  enumerable: !0,
1191
1192
  get() {
1192
1193
  return this.defines?.[i] != null;
@@ -1205,7 +1206,7 @@ function y(i) {
1205
1206
  });
1206
1207
  };
1207
1208
  }
1208
- function bn(i) {
1209
+ function Pn(i) {
1209
1210
  return typeof i == "number" ? Math.floor(i) : typeof i == "string" ? parseInt(i, 10) : typeof i == "boolean" ? +i : 0;
1210
1211
  }
1211
1212
  function Ge(i, {
@@ -1213,11 +1214,11 @@ function Ge(i, {
1213
1214
  max: t = Number.MAX_SAFE_INTEGER
1214
1215
  } = {}) {
1215
1216
  return (r, n) => {
1216
- r instanceof yr ? Object.defineProperty(r, n, {
1217
+ r instanceof Er ? Object.defineProperty(r, n, {
1217
1218
  enumerable: !0,
1218
1219
  get() {
1219
1220
  const a = this.defines?.[i];
1220
- return a != null ? bn(a) : 0;
1221
+ return a != null ? Pn(a) : 0;
1221
1222
  },
1222
1223
  set(a) {
1223
1224
  const o = this[n];
@@ -1227,7 +1228,7 @@ function Ge(i, {
1227
1228
  enumerable: !0,
1228
1229
  get() {
1229
1230
  const a = this.defines.get(i);
1230
- return a != null ? bn(a) : 0;
1231
+ return a != null ? Pn(a) : 0;
1231
1232
  },
1232
1233
  set(a) {
1233
1234
  const o = this[n];
@@ -1236,20 +1237,20 @@ function Ge(i, {
1236
1237
  });
1237
1238
  };
1238
1239
  }
1239
- function Pn(i) {
1240
+ function Ln(i) {
1240
1241
  return typeof i == "number" ? i : typeof i == "string" ? parseFloat(i) : typeof i == "boolean" ? +i : 0;
1241
1242
  }
1242
- function Xi(i, {
1243
+ function qi(i, {
1243
1244
  min: e = -1 / 0,
1244
1245
  max: t = 1 / 0,
1245
1246
  precision: r = 7
1246
1247
  } = {}) {
1247
1248
  return (n, a) => {
1248
- n instanceof yr ? Object.defineProperty(n, a, {
1249
+ n instanceof Er ? Object.defineProperty(n, a, {
1249
1250
  enumerable: !0,
1250
1251
  get() {
1251
1252
  const o = this.defines?.[i];
1252
- return o != null ? Pn(o) : 0;
1253
+ return o != null ? Ln(o) : 0;
1253
1254
  },
1254
1255
  set(o) {
1255
1256
  const s = this[a];
@@ -1259,7 +1260,7 @@ function Xi(i, {
1259
1260
  enumerable: !0,
1260
1261
  get() {
1261
1262
  const o = this.defines.get(i);
1262
- return o != null ? Pn(o) : 0;
1263
+ return o != null ? Ln(o) : 0;
1263
1264
  },
1264
1265
  set(o) {
1265
1266
  const s = this[a];
@@ -1268,9 +1269,9 @@ function Xi(i, {
1268
1269
  });
1269
1270
  };
1270
1271
  }
1271
- function Pa(i, { validate: e } = {}) {
1272
+ function La(i, { validate: e } = {}) {
1272
1273
  return (t, r) => {
1273
- t instanceof yr ? Object.defineProperty(t, r, {
1274
+ t instanceof Er ? Object.defineProperty(t, r, {
1274
1275
  enumerable: !0,
1275
1276
  get() {
1276
1277
  return this.defines?.[i];
@@ -1301,7 +1302,7 @@ function Pa(i, { validate: e } = {}) {
1301
1302
  });
1302
1303
  };
1303
1304
  }
1304
- function Ln(i, ...e) {
1305
+ function Mn(i, ...e) {
1305
1306
  const t = {};
1306
1307
  for (let r = 0; r < e.length; r += 2) {
1307
1308
  const n = e[r], a = e[r + 1];
@@ -1316,7 +1317,7 @@ function Ln(i, ...e) {
1316
1317
  }
1317
1318
  return Object.defineProperties(i, t), i;
1318
1319
  }
1319
- function Mn(i, e, t) {
1320
+ function Un(i, e, t) {
1320
1321
  const r = {};
1321
1322
  for (const n of t)
1322
1323
  r[n] = {
@@ -1340,16 +1341,16 @@ function k(i, e) {
1340
1341
  return k(n, e);
1341
1342
  });
1342
1343
  }
1343
- const _i = (i) => new Uint8Array(i);
1344
- class Xs extends gi {
1344
+ const Si = (i) => new Uint8Array(i);
1345
+ class Xs extends vi {
1345
1346
  constructor(e) {
1346
1347
  super(
1347
- Pt,
1348
- _i,
1348
+ Lt,
1349
+ Si,
1349
1350
  {
1350
- format: Lt,
1351
- minFilter: cn,
1352
- magFilter: cn,
1351
+ format: Mt,
1352
+ minFilter: un,
1353
+ magFilter: un,
1353
1354
  wrapS: ne,
1354
1355
  wrapT: ne,
1355
1356
  wrapR: ne,
@@ -1368,7 +1369,7 @@ function Zs(i, e, t, r) {
1368
1369
  n += r.replace(/\[\s*i\s*\]/g, `[${a}]`).replace(/UNROLLED_LOOP_INDEX/g, `${a}`);
1369
1370
  return n;
1370
1371
  }
1371
- function Wt(i) {
1372
+ function kt(i) {
1372
1373
  return i.replace(qs, Zs);
1373
1374
  }
1374
1375
  const Ks = `// Reference: https://github.com/mrdoob/three.js/blob/r171/examples/jsm/csm/CSMShader.js
@@ -1767,8 +1768,8 @@ vec2 vogelDisk(const int index, const int sampleCount, const float phi) {
1767
1768
  float theta = float(index) * goldenAngle + phi;
1768
1769
  return r * vec2(cos(theta), sin(theta));
1769
1770
  }
1770
- `, La = Ks, kt = Js, sc = Qs, Ma = ec, qi = tc, Ua = rc, Dr = ic, Ha = nc, Zi = ac, Fa = oc, vt = 64, _t = 16, Or = 32, br = 128, Pr = 32, Lr = 8, rt = Lr * Pr, it = br, nt = Or, St = 256, Tt = 64, _r = 1 / 1e3, cc = /* @__PURE__ */ new p();
1771
- function Mr(i, e, t, r) {
1771
+ `, Ma = Ks, Vt = Js, sc = Qs, Ua = ec, Zi = tc, Ha = rc, Or = ic, Fa = nc, Ki = ac, Ga = oc, vt = 64, _t = 16, br = 32, Pr = 128, Lr = 32, Mr = 8, rt = Mr * Lr, it = Pr, nt = br, St = 256, Tt = 64, Sr = 1 / 1e3, cc = /* @__PURE__ */ new p();
1772
+ function Ur(i, e, t, r) {
1772
1773
  const n = t.projectOnSurface(
1773
1774
  i,
1774
1775
  cc
@@ -1780,7 +1781,7 @@ function lc(i, e) {
1780
1781
  if (!i)
1781
1782
  throw new Error(uc);
1782
1783
  }
1783
- const Un = typeof window < "u" && window.requestIdleCallback != null ? window.requestIdleCallback : function(i, e = {}) {
1784
+ const Hn = typeof window < "u" && window.requestIdleCallback != null ? window.requestIdleCallback : function(i, e = {}) {
1784
1785
  const t = e.timeout ?? 1, r = performance.now();
1785
1786
  return setTimeout(() => {
1786
1787
  i({
@@ -2215,7 +2216,7 @@ struct AtmosphereParameters {
2215
2216
  DimensionlessSpectrum ground_albedo;
2216
2217
  Number mu_s_min;
2217
2218
  };
2218
- `, Ur = `// Based on: https://github.com/ebruneton/precomputed_atmospheric_scattering/blob/master/atmosphere/functions.glsl
2219
+ `, Hr = `// Based on: https://github.com/ebruneton/precomputed_atmospheric_scattering/blob/master/atmosphere/functions.glsl
2219
2220
 
2220
2221
  /**
2221
2222
  * Copyright (c) 2017 Eric Bruneton
@@ -3357,7 +3358,7 @@ class Ye {
3357
3358
  });
3358
3359
  }
3359
3360
  }
3360
- const Si = class {
3361
+ const Ti = class {
3361
3362
  constructor(e) {
3362
3363
  this.solarIrradiance = new p(1.474, 1.8504, 1.91198), this.sunAngularRadius = 4675e-6, this.bottomRadius = 636e4, this.topRadius = 642e4, this.rayleighDensity = [
3363
3364
  new Ye(0, 0, 0, 0, 0),
@@ -3368,7 +3369,7 @@ const Si = class {
3368
3369
  ], this.mieScattering = new p(3996e-6, 3996e-6, 3996e-6), this.mieExtinction = new p(444e-5, 444e-5, 444e-5), this.miePhaseFunctionG = 0.8, this.absorptionDensity = [
3369
3370
  new Ye(25, 0, 0, 1 / 15, -2 / 3),
3370
3371
  new Ye(0, 0, 0, -1 / 15, 8 / 3)
3371
- ], this.absorptionExtinction = new p(65e-5, 1881e-6, 85e-6), this.groundAlbedo = new Er().setScalar(0.1), this.muSMin = Math.cos(vi(120)), this.sunRadianceToLuminance = new p(98242.786222, 69954.398112, 66475.012354), this.skyRadianceToLuminance = new p(114974.916437, 71305.954816, 65310.548555), this.sunRadianceToRelativeLuminance = new p(), this.skyRadianceToRelativeLuminance = new p(), mc(this, e);
3372
+ ], this.absorptionExtinction = new p(65e-5, 1881e-6, 85e-6), this.groundAlbedo = new wr().setScalar(0.1), this.muSMin = Math.cos(_i(120)), this.sunRadianceToLuminance = new p(98242.786222, 69954.398112, 66475.012354), this.skyRadianceToLuminance = new p(114974.916437, 71305.954816, 65310.548555), this.sunRadianceToRelativeLuminance = new p(), this.skyRadianceToRelativeLuminance = new p(), mc(this, e);
3372
3373
  const t = dc.dot(this.sunRadianceToLuminance);
3373
3374
  this.sunRadianceToRelativeLuminance.copy(this.sunRadianceToLuminance).divideScalar(t), this.skyRadianceToRelativeLuminance.copy(this.skyRadianceToLuminance).divideScalar(t);
3374
3375
  }
@@ -3377,8 +3378,8 @@ const Si = class {
3377
3378
  return new u({
3378
3379
  solar_irradiance: this.solarIrradiance,
3379
3380
  sun_angular_radius: this.sunAngularRadius,
3380
- bottom_radius: this.bottomRadius * _r,
3381
- top_radius: this.topRadius * _r,
3381
+ bottom_radius: this.bottomRadius * Sr,
3382
+ top_radius: this.topRadius * Sr,
3382
3383
  rayleigh_density: {
3383
3384
  layers: this.rayleighDensity.map((e) => e.toUniform().value)
3384
3385
  },
@@ -3398,8 +3399,8 @@ const Si = class {
3398
3399
  });
3399
3400
  }
3400
3401
  };
3401
- Si.DEFAULT = /* @__PURE__ */ new Si();
3402
- let De = Si;
3402
+ Ti.DEFAULT = /* @__PURE__ */ new Ti();
3403
+ let De = Ti;
3403
3404
  const pc = `precision highp sampler2DArray;
3404
3405
 
3405
3406
  #include "core/depth"
@@ -3843,7 +3844,7 @@ void mainSupport() {
3843
3844
  vec3 radii = ellipsoidRadii * METER_TO_LENGTH_UNIT;
3844
3845
  vEllipsoidRadiiSquared = radii * radii;
3845
3846
  }
3846
- `, Ga = `vec3 getLunarRadiance(const float moonAngularRadius) {
3847
+ `, za = `vec3 getLunarRadiance(const float moonAngularRadius) {
3847
3848
  // Not a physical number but the order of 10^-6 relative to the sun may fit.
3848
3849
  vec3 radiance =
3849
3850
  ATMOSPHERE.solar_irradiance *
@@ -3935,8 +3936,8 @@ var gc = Object.defineProperty, J = (i, e, t, r) => {
3935
3936
  (o = i[a]) && (n = o(e, t, n) || n);
3936
3937
  return n && gc(e, t, n), n;
3937
3938
  };
3938
- const vc = /* @__PURE__ */ new p(), _c = /* @__PURE__ */ new p(), Sc = /* @__PURE__ */ new Gi(), Tc = {
3939
- blendFunction: Ft.NORMAL,
3939
+ const vc = /* @__PURE__ */ new p(), _c = /* @__PURE__ */ new p(), Sc = /* @__PURE__ */ new zi(), Tc = {
3940
+ blendFunction: Gt.NORMAL,
3940
3941
  octEncodedNormal: !1,
3941
3942
  reconstructNormal: !1,
3942
3943
  ellipsoid: Ne.WGS84,
@@ -3956,7 +3957,7 @@ const vc = /* @__PURE__ */ new p(), _c = /* @__PURE__ */ new p(), Sc = /* @__PUR
3956
3957
  ground: !0
3957
3958
  };
3958
3959
  let Z = class extends pt {
3959
- constructor(e = new wr(), t, r = De.DEFAULT) {
3960
+ constructor(e = new Rr(), t, r = De.DEFAULT) {
3960
3961
  const {
3961
3962
  blendFunction: n,
3962
3963
  normalBuffer: a = null,
@@ -3986,30 +3987,30 @@ let Z = class extends pt {
3986
3987
  } = { ...Tc, ...t };
3987
3988
  super(
3988
3989
  "AerialPerspectiveEffect",
3989
- Wt(
3990
+ kt(
3990
3991
  k(pc, {
3991
3992
  core: {
3992
- depth: kt,
3993
- packing: Ua,
3994
- math: qi,
3995
- transform: Ha,
3996
- raySphereIntersection: Dr,
3997
- cascadedShadowMaps: La,
3998
- interleavedGradientNoise: Ma,
3999
- vogelDisk: Fa
3993
+ depth: Vt,
3994
+ packing: Ha,
3995
+ math: Zi,
3996
+ transform: Fa,
3997
+ raySphereIntersection: Or,
3998
+ cascadedShadowMaps: Ma,
3999
+ interleavedGradientNoise: Ua,
4000
+ vogelDisk: Ga
4000
4001
  },
4001
4002
  bruneton: {
4002
4003
  common: me,
4003
4004
  definitions: pe,
4004
- runtime: Ur
4005
+ runtime: Hr
4005
4006
  },
4006
- sky: Ga
4007
+ sky: za
4007
4008
  })
4008
4009
  ),
4009
4010
  {
4010
4011
  blendFunction: n,
4011
4012
  vertexShader: fc,
4012
- attributes: Gt.DEPTH,
4013
+ attributes: zt.DEPTH,
4013
4014
  // prettier-ignore
4014
4015
  uniforms: new Map(
4015
4016
  Object.entries({
@@ -4059,13 +4060,13 @@ let Z = class extends pt {
4059
4060
  defines: /* @__PURE__ */ new Map([
4060
4061
  ["TRANSMITTANCE_TEXTURE_WIDTH", St.toFixed(0)],
4061
4062
  ["TRANSMITTANCE_TEXTURE_HEIGHT", Tt.toFixed(0)],
4062
- ["SCATTERING_TEXTURE_R_SIZE", Or.toFixed(0)],
4063
- ["SCATTERING_TEXTURE_MU_SIZE", br.toFixed(0)],
4064
- ["SCATTERING_TEXTURE_MU_S_SIZE", Pr.toFixed(0)],
4065
- ["SCATTERING_TEXTURE_NU_SIZE", Lr.toFixed(0)],
4063
+ ["SCATTERING_TEXTURE_R_SIZE", br.toFixed(0)],
4064
+ ["SCATTERING_TEXTURE_MU_SIZE", Pr.toFixed(0)],
4065
+ ["SCATTERING_TEXTURE_MU_S_SIZE", Lr.toFixed(0)],
4066
+ ["SCATTERING_TEXTURE_NU_SIZE", Mr.toFixed(0)],
4066
4067
  ["IRRADIANCE_TEXTURE_WIDTH", vt.toFixed(0)],
4067
4068
  ["IRRADIANCE_TEXTURE_HEIGHT", _t.toFixed(0)],
4068
- ["METER_TO_LENGTH_UNIT", _r.toFixed(7)]
4069
+ ["METER_TO_LENGTH_UNIT", Sr.toFixed(7)]
4069
4070
  ])
4070
4071
  }
4071
4072
  ), this.camera = e, this.atmosphere = r, this.overlay = null, this.shadow = null, this.shadowLength = null, this.lightingMask = null, this.hasNormals = !1, this.combinedScatteringTextures = !1, this.hasHigherOrderScatteringTexture = !1, this.shadowSampleCount = 8, this.octEncodedNormal = o, this.reconstructNormal = s, this.singleMieScatteringTexture = h, this.higherOrderScatteringTexture = f, this.ellipsoid = v, this.correctAltitude = g, this.correctGeometricError = S, this.sunLight = C, this.skyLight = O, this.transmittance = U, this.inscatter = b, this.sky = j, this.sun = Y, this.moon = le, this.ground = Oe;
@@ -4096,7 +4097,7 @@ let Z = class extends pt {
4096
4097
  return;
4097
4098
  }
4098
4099
  const d = o.get("altitudeCorrection");
4099
- this.correctAltitude ? Mr(
4100
+ this.correctAltitude ? Ur(
4100
4101
  l,
4101
4102
  this.atmosphere.bottomRadius,
4102
4103
  this.ellipsoid,
@@ -4264,7 +4265,7 @@ J([
4264
4265
  J([
4265
4266
  Ge("SHADOW_SAMPLE_COUNT", { min: 1, max: 16 })
4266
4267
  ], Z.prototype, "shadowSampleCount");
4267
- var xc = Object.defineProperty, za = (i, e, t, r) => {
4268
+ var xc = Object.defineProperty, Ba = (i, e, t, r) => {
4268
4269
  for (var n = void 0, a = i.length - 1, o; a >= 0; a--)
4269
4270
  (o = i[a]) && (n = o(e, t, n) || n);
4270
4271
  return n && xc(e, t, n), n;
@@ -4278,12 +4279,12 @@ function Ec(i, e) {
4278
4279
  `;
4279
4280
  return i.replace("#include <mrt_layout>", t).replace("#include <mrt_output>", r);
4280
4281
  }
4281
- const Ki = {
4282
+ const Ji = {
4282
4283
  ellipsoid: Ne.WGS84,
4283
4284
  correctAltitude: !0,
4284
4285
  renderTargetCount: 1
4285
4286
  };
4286
- class Vt extends Ht {
4287
+ class $t extends Ft {
4287
4288
  constructor(e, t = De.DEFAULT) {
4288
4289
  const {
4289
4290
  irradianceTexture: r = null,
@@ -4297,7 +4298,7 @@ class Vt extends Ht {
4297
4298
  sunAngularRadius: h,
4298
4299
  renderTargetCount: f,
4299
4300
  ...v
4300
- } = { ...Ki, ...e };
4301
+ } = { ...Ji, ...e };
4301
4302
  super({
4302
4303
  toneMapped: !1,
4303
4304
  depthWrite: !1,
@@ -4324,13 +4325,13 @@ class Vt extends Ht {
4324
4325
  PI: `${Math.PI}`,
4325
4326
  TRANSMITTANCE_TEXTURE_WIDTH: St.toFixed(0),
4326
4327
  TRANSMITTANCE_TEXTURE_HEIGHT: Tt.toFixed(0),
4327
- SCATTERING_TEXTURE_R_SIZE: Or.toFixed(0),
4328
- SCATTERING_TEXTURE_MU_SIZE: br.toFixed(0),
4329
- SCATTERING_TEXTURE_MU_S_SIZE: Pr.toFixed(0),
4330
- SCATTERING_TEXTURE_NU_SIZE: Lr.toFixed(0),
4328
+ SCATTERING_TEXTURE_R_SIZE: br.toFixed(0),
4329
+ SCATTERING_TEXTURE_MU_SIZE: Pr.toFixed(0),
4330
+ SCATTERING_TEXTURE_MU_S_SIZE: Lr.toFixed(0),
4331
+ SCATTERING_TEXTURE_NU_SIZE: Mr.toFixed(0),
4331
4332
  IRRADIANCE_TEXTURE_WIDTH: vt.toFixed(0),
4332
4333
  IRRADIANCE_TEXTURE_HEIGHT: _t.toFixed(0),
4333
- METER_TO_LENGTH_UNIT: _r.toFixed(7),
4334
+ METER_TO_LENGTH_UNIT: Sr.toFixed(7),
4334
4335
  ...v.defines
4335
4336
  }
4336
4337
  }), this.atmosphere = t, this.combinedScatteringTextures = !1, this.hasHigherOrderScatteringTexture = !1, this.singleMieScatteringTexture = o, this.higherOrderScatteringTexture = s, this.ellipsoid = c, this.correctAltitude = l, h != null && (this.sunAngularRadius = h), this.renderTargetCount = f;
@@ -4339,7 +4340,7 @@ class Vt extends Ht {
4339
4340
  const t = this.uniforms, r = e.getWorldPosition(
4340
4341
  t.cameraPosition.value
4341
4342
  ), n = yc.copy(r).applyMatrix4(t.worldToECEFMatrix.value), a = t.altitudeCorrection.value;
4342
- this.correctAltitude ? Mr(
4343
+ this.correctAltitude ? Ur(
4343
4344
  n,
4344
4345
  this.atmosphere.bottomRadius,
4345
4346
  this.ellipsoid,
@@ -4406,14 +4407,14 @@ class Vt extends Ht {
4406
4407
  e !== this.renderTargetCount && (this._renderTargetCount = e, this.needsUpdate = !0);
4407
4408
  }
4408
4409
  }
4409
- za([
4410
+ Ba([
4410
4411
  y("COMBINED_SCATTERING_TEXTURES")
4411
- ], Vt.prototype, "combinedScatteringTextures");
4412
- za([
4412
+ ], $t.prototype, "combinedScatteringTextures");
4413
+ Ba([
4413
4414
  y("HAS_HIGHER_ORDER_SCATTERING_TEXTURE")
4414
- ], Vt.prototype, "hasHigherOrderScatteringTexture");
4415
- const wc = 173.1446326846693, Rc = 14959787069098932e-8, Ue = 0.017453292519943295, Ac = 365.24217, Hn = /* @__PURE__ */ new Date("2000-01-01T12:00:00Z"), Se = 2 * Math.PI, Re = 3600 * (180 / Math.PI), Qe = 484813681109536e-20, Cc = 10800 * 60, Ic = 2 * Cc, Nc = 6378.1366, Dc = Nc / Rc, Oc = 81.30056, Ji = 2959122082855911e-19, Ti = 2825345909524226e-22, xi = 8459715185680659e-23, yi = 1292024916781969e-23, Ei = 1524358900784276e-23;
4416
- function ur(i) {
4415
+ ], $t.prototype, "hasHigherOrderScatteringTexture");
4416
+ const wc = 173.1446326846693, Rc = 14959787069098932e-8, Ue = 0.017453292519943295, Ac = 365.24217, Fn = /* @__PURE__ */ new Date("2000-01-01T12:00:00Z"), Se = 2 * Math.PI, Re = 3600 * (180 / Math.PI), Qe = 484813681109536e-20, Cc = 10800 * 60, Ic = 2 * Cc, Nc = 6378.1366, Dc = Nc / Rc, Oc = 81.30056, Qi = 2959122082855911e-19, xi = 2825345909524226e-22, yi = 8459715185680659e-23, Ei = 1292024916781969e-23, wi = 1524358900784276e-23;
4417
+ function lr(i) {
4417
4418
  if (!Number.isFinite(i))
4418
4419
  throw console.trace(), `Value is not a finite number: ${i}`;
4419
4420
  return i;
@@ -4448,7 +4449,7 @@ function Lc(i) {
4448
4449
  const e = bc.indexOf(i);
4449
4450
  return e >= 0 ? Pc[e] : null;
4450
4451
  }
4451
- function Ba(i) {
4452
+ function Wa(i) {
4452
4453
  const e = Lc(i);
4453
4454
  return e && e.dist > 0 ? e : null;
4454
4455
  }
@@ -5099,7 +5100,7 @@ function Mc(i) {
5099
5100
  return c < -500 ? (e = (c - 1820) / 100, -20 + 32 * e * e) : c < 500 ? (e = c / 100, t = e * e, r = e * t, n = t * t, a = t * r, o = r * r, 10583.6 - 1014.41 * e + 33.78311 * t - 5.952053 * r - 0.1798452 * n + 0.022174192 * a + 0.0090316521 * o) : c < 1600 ? (e = (c - 1e3) / 100, t = e * e, r = e * t, n = t * t, a = t * r, o = r * r, 1574.2 - 556.01 * e + 71.23472 * t + 0.319781 * r - 0.8503463 * n - 5050998e-9 * a + 0.0083572073 * o) : c < 1700 ? (e = c - 1600, t = e * e, r = e * t, 120 - 0.9808 * e - 0.01532 * t + r / 7129) : c < 1800 ? (e = c - 1700, t = e * e, r = e * t, n = t * t, 8.83 + 0.1603 * e - 59285e-7 * t + 13336e-8 * r - n / 1174e3) : c < 1860 ? (e = c - 1800, t = e * e, r = e * t, n = t * t, a = t * r, o = r * r, s = r * n, 13.72 - 0.332447 * e + 68612e-7 * t + 41116e-7 * r - 37436e-8 * n + 121272e-10 * a - 1699e-10 * o + 875e-12 * s) : c < 1900 ? (e = c - 1860, t = e * e, r = e * t, n = t * t, a = t * r, 7.62 + 0.5737 * e - 0.251754 * t + 0.01680668 * r - 4473624e-10 * n + a / 233174) : c < 1920 ? (e = c - 1900, t = e * e, r = e * t, n = t * t, -2.79 + 1.494119 * e - 0.0598939 * t + 61966e-7 * r - 197e-6 * n) : c < 1941 ? (e = c - 1920, t = e * e, r = e * t, 21.2 + 0.84493 * e - 0.0761 * t + 20936e-7 * r) : c < 1961 ? (e = c - 1950, t = e * e, r = e * t, 29.07 + 0.407 * e - t / 233 + r / 2547) : c < 1986 ? (e = c - 1975, t = e * e, r = e * t, 45.45 + 1.067 * e - t / 260 - r / 718) : c < 2005 ? (e = c - 2e3, t = e * e, r = e * t, n = t * t, a = t * r, 63.86 + 0.3345 * e - 0.060374 * t + 17275e-7 * r + 651814e-9 * n + 2373599e-11 * a) : c < 2050 ? (e = c - 2e3, 62.92 + 0.32217 * e + 5589e-6 * e * e) : c < 2150 ? (e = (c - 1820) / 100, -20 + 32 * e * e - 0.5628 * (2150 - c)) : (e = (c - 1820) / 100, -20 + 32 * e * e);
5100
5101
  }
5101
5102
  let Uc = Mc;
5102
- function Fn(i) {
5103
+ function Gn(i) {
5103
5104
  return i + Uc(i) / 86400;
5104
5105
  }
5105
5106
  class Ie {
@@ -5114,11 +5115,11 @@ class Ie {
5114
5115
  }
5115
5116
  const t = 1e3 * 3600 * 24;
5116
5117
  if (e instanceof Date && Number.isFinite(e.getTime())) {
5117
- this.date = e, this.ut = (e.getTime() - Hn.getTime()) / t, this.tt = Fn(this.ut);
5118
+ this.date = e, this.ut = (e.getTime() - Fn.getTime()) / t, this.tt = Gn(this.ut);
5118
5119
  return;
5119
5120
  }
5120
5121
  if (Number.isFinite(e)) {
5121
- this.date = new Date(Hn.getTime() + e * t), this.ut = e, this.tt = Fn(this.ut);
5122
+ this.date = new Date(Fn.getTime() + e * t), this.ut = e, this.tt = Gn(this.ut);
5122
5123
  return;
5123
5124
  }
5124
5125
  throw "Argument must be a Date object, an AstroTime object, or a numeric UTC Julian date.";
@@ -5188,15 +5189,15 @@ function Hc(i) {
5188
5189
  deps: 388e-6 + d * 1e-7
5189
5190
  };
5190
5191
  }
5191
- function Wa(i) {
5192
+ function ka(i) {
5192
5193
  var e = i.tt / 36525, t = ((((-434e-10 * e - 576e-9) * e + 20034e-7) * e - 1831e-7) * e - 46.836769) * e + 84381.406;
5193
5194
  return t / 3600;
5194
5195
  }
5195
- var nr;
5196
- function ka(i) {
5197
- if (!nr || Math.abs(nr.tt - i.tt) > 1e-6) {
5198
- const e = Hc(i), t = Wa(i), r = t + e.deps / 3600;
5199
- nr = {
5196
+ var ar;
5197
+ function Va(i) {
5198
+ if (!ar || Math.abs(ar.tt - i.tt) > 1e-6) {
5199
+ const e = Hc(i), t = ka(i), r = t + e.deps / 3600;
5200
+ ar = {
5200
5201
  tt: i.tt,
5201
5202
  dpsi: e.dpsi,
5202
5203
  deps: e.deps,
@@ -5205,7 +5206,7 @@ function ka(i) {
5205
5206
  tobl: r
5206
5207
  };
5207
5208
  }
5208
- return nr;
5209
+ return ar;
5209
5210
  }
5210
5211
  function Fc(i, e) {
5211
5212
  const t = i * Ue, r = Math.cos(t), n = Math.sin(t);
@@ -5216,7 +5217,7 @@ function Fc(i, e) {
5216
5217
  ];
5217
5218
  }
5218
5219
  function Gc(i, e) {
5219
- return Fc(Wa(i), e);
5220
+ return Fc(ka(i), e);
5220
5221
  }
5221
5222
  function zc(i) {
5222
5223
  const e = i.tt / 36525;
@@ -5241,28 +5242,28 @@ function zc(i) {
5241
5242
  const $ = w.array[P - w.min];
5242
5243
  $.array[G - $.min] = z;
5243
5244
  }
5244
- let o, s, c, l, d, h, f, v, g, S, E, C, O, U, b, L, j, Y, le, ie, We, ke, Oe, nn = r(-6, 6, 1, 4), an = r(-6, 6, 1, 4);
5245
- function $t(w, P) {
5246
- return n(nn, w, P);
5247
- }
5245
+ let o, s, c, l, d, h, f, v, g, S, E, C, O, U, b, L, j, Y, le, ie, We, ke, Oe, an = r(-6, 6, 1, 4), on = r(-6, 6, 1, 4);
5248
5246
  function jt(w, P) {
5249
5247
  return n(an, w, P);
5250
5248
  }
5251
- function Yt(w, P, G) {
5252
- return a(nn, w, P, G);
5249
+ function Yt(w, P) {
5250
+ return n(on, w, P);
5253
5251
  }
5254
5252
  function Xt(w, P, G) {
5255
5253
  return a(an, w, P, G);
5256
5254
  }
5257
- function on(w, P, G, z, $) {
5255
+ function qt(w, P, G) {
5256
+ return a(on, w, P, G);
5257
+ }
5258
+ function sn(w, P, G, z, $) {
5258
5259
  $(w * G - P * z, P * G + w * z);
5259
5260
  }
5260
5261
  function F(w) {
5261
5262
  return Math.sin(Se * w);
5262
5263
  }
5263
5264
  f = e * e, g = 0, Oe = 0, E = 0, C = 3422.7;
5264
- var qt = F(0.19833 + 0.05611 * e), zr = F(0.27869 + 0.04508 * e), Br = F(0.16827 - 0.36903 * e), Wr = F(0.34734 - 5.37261 * e), kr = F(0.10498 - 5.37899 * e), Zt = F(0.42681 - 0.41855 * e), ho = F(0.14943 - 5.37511 * e);
5265
- for (Y = 0.84 * qt + 0.31 * zr + 14.27 * Br + 7.26 * Wr + 0.28 * kr + 0.24 * Zt, le = 2.94 * qt + 0.31 * zr + 14.27 * Br + 9.34 * Wr + 1.12 * kr + 0.83 * Zt, ie = -6.4 * qt - 1.89 * Zt, We = 0.21 * qt + 0.31 * zr + 14.27 * Br - 88.7 * Wr - 15.3 * kr + 0.24 * Zt - 1.86 * ho, ke = Y - ie, v = -3332e-9 * F(0.59734 - 5.37261 * e) - 539e-9 * F(0.35498 - 5.37899 * e) - 64e-9 * F(0.39943 - 5.37511 * e), O = Se * Xe(0.60643382 + 1336.85522467 * e - 313e-8 * f) + Y / Re, U = Se * Xe(0.37489701 + 1325.55240982 * e + 2565e-8 * f) + le / Re, b = Se * Xe(0.99312619 + 99.99735956 * e - 44e-8 * f) + ie / Re, L = Se * Xe(0.25909118 + 1342.2278298 * e - 892e-8 * f) + We / Re, j = Se * Xe(0.82736186 + 1236.85308708 * e - 397e-8 * f) + ke / Re, d = 1; d <= 4; ++d) {
5265
+ var Zt = F(0.19833 + 0.05611 * e), Br = F(0.27869 + 0.04508 * e), Wr = F(0.16827 - 0.36903 * e), kr = F(0.34734 - 5.37261 * e), Vr = F(0.10498 - 5.37899 * e), Kt = F(0.42681 - 0.41855 * e), mo = F(0.14943 - 5.37511 * e);
5266
+ for (Y = 0.84 * Zt + 0.31 * Br + 14.27 * Wr + 7.26 * kr + 0.28 * Vr + 0.24 * Kt, le = 2.94 * Zt + 0.31 * Br + 14.27 * Wr + 9.34 * kr + 1.12 * Vr + 0.83 * Kt, ie = -6.4 * Zt - 1.89 * Kt, We = 0.21 * Zt + 0.31 * Br + 14.27 * Wr - 88.7 * kr - 15.3 * Vr + 0.24 * Kt - 1.86 * mo, ke = Y - ie, v = -3332e-9 * F(0.59734 - 5.37261 * e) - 539e-9 * F(0.35498 - 5.37899 * e) - 64e-9 * F(0.39943 - 5.37511 * e), O = Se * Xe(0.60643382 + 1336.85522467 * e - 313e-8 * f) + Y / Re, U = Se * Xe(0.37489701 + 1325.55240982 * e + 2565e-8 * f) + le / Re, b = Se * Xe(0.99312619 + 99.99735956 * e - 44e-8 * f) + ie / Re, L = Se * Xe(0.25909118 + 1342.2278298 * e - 892e-8 * f) + We / Re, j = Se * Xe(0.82736186 + 1236.85308708 * e - 397e-8 * f) + ke / Re, d = 1; d <= 4; ++d) {
5266
5267
  switch (d) {
5267
5268
  case 1:
5268
5269
  c = U, s = 4, l = 1.000002208;
@@ -5279,29 +5280,29 @@ function zc(i) {
5279
5280
  default:
5280
5281
  throw `Internal error: I = ${d}`;
5281
5282
  }
5282
- for (Yt(0, d, 1), Yt(1, d, Math.cos(c) * l), Xt(0, d, 0), Xt(1, d, Math.sin(c) * l), h = 2; h <= s; ++h)
5283
- on($t(h - 1, d), jt(h - 1, d), $t(1, d), jt(1, d), (w, P) => (Yt(h, d, w), Xt(h, d, P)));
5283
+ for (Xt(0, d, 1), Xt(1, d, Math.cos(c) * l), qt(0, d, 0), qt(1, d, Math.sin(c) * l), h = 2; h <= s; ++h)
5284
+ sn(jt(h - 1, d), Yt(h - 1, d), jt(1, d), Yt(1, d), (w, P) => (Xt(h, d, w), qt(h, d, P)));
5284
5285
  for (h = 1; h <= s; ++h)
5285
- Yt(-h, d, $t(h, d)), Xt(-h, d, -jt(h, d));
5286
+ Xt(-h, d, jt(h, d)), qt(-h, d, -Yt(h, d));
5286
5287
  }
5287
- function sn(w, P, G, z) {
5288
+ function cn(w, P, G, z) {
5288
5289
  for (var $ = { x: 1, y: 0 }, we = [0, w, P, G, z], ge = 1; ge <= 4; ++ge)
5289
- we[ge] !== 0 && on($.x, $.y, $t(we[ge], ge), jt(we[ge], ge), (Vr, Ve) => ($.x = Vr, $.y = Ve));
5290
+ we[ge] !== 0 && sn($.x, $.y, jt(we[ge], ge), Yt(we[ge], ge), ($r, Ve) => ($.x = $r, $.y = Ve));
5290
5291
  return $;
5291
5292
  }
5292
- function m(w, P, G, z, $, we, ge, Vr) {
5293
- var Ve = sn($, we, ge, Vr);
5293
+ function m(w, P, G, z, $, we, ge, $r) {
5294
+ var Ve = cn($, we, ge, $r);
5294
5295
  g += w * Ve.y, Oe += P * Ve.y, E += G * Ve.x, C += z * Ve.x;
5295
5296
  }
5296
5297
  m(13.902, 14.06, -1e-3, 0.2607, 0, 0, 0, 4), m(0.403, -4.01, 0.394, 23e-4, 0, 0, 0, 3), m(2369.912, 2373.36, 0.601, 28.2333, 0, 0, 0, 2), m(-125.154, -112.79, -0.725, -0.9781, 0, 0, 0, 1), m(1.979, 6.98, -0.445, 0.0433, 1, 0, 0, 4), m(191.953, 192.72, 0.029, 3.0861, 1, 0, 0, 2), m(-8.466, -13.51, 0.455, -0.1093, 1, 0, 0, 1), m(22639.5, 22609.07, 0.079, 186.5398, 1, 0, 0, 0), m(18.609, 3.59, -0.094, 0.0118, 1, 0, 0, -1), m(-4586.465, -4578.13, -0.077, 34.3117, 1, 0, 0, -2), m(3.215, 5.44, 0.192, -0.0386, 1, 0, 0, -3), m(-38.428, -38.64, 1e-3, 0.6008, 1, 0, 0, -4), m(-0.393, -1.43, -0.092, 86e-4, 1, 0, 0, -6), m(-0.289, -1.59, 0.123, -53e-4, 0, 1, 0, 4), m(-24.42, -25.1, 0.04, -0.3, 0, 1, 0, 2), m(18.023, 17.93, 7e-3, 0.1494, 0, 1, 0, 1), m(-668.146, -126.98, -1.302, -0.3997, 0, 1, 0, 0), m(0.56, 0.32, -1e-3, -37e-4, 0, 1, 0, -1), m(-165.145, -165.06, 0.054, 1.9178, 0, 1, 0, -2), m(-1.877, -6.46, -0.416, 0.0339, 0, 1, 0, -4), m(0.213, 1.02, -0.074, 54e-4, 2, 0, 0, 4), m(14.387, 14.78, -0.017, 0.2833, 2, 0, 0, 2), m(-0.586, -1.2, 0.054, -0.01, 2, 0, 0, 1), m(769.016, 767.96, 0.107, 10.1657, 2, 0, 0, 0), m(1.75, 2.01, -0.018, 0.0155, 2, 0, 0, -1), m(-211.656, -152.53, 5.679, -0.3039, 2, 0, 0, -2), m(1.225, 0.91, -0.03, -88e-4, 2, 0, 0, -3), m(-30.773, -34.07, -0.308, 0.3722, 2, 0, 0, -4), m(-0.57, -1.4, -0.074, 0.0109, 2, 0, 0, -6), m(-2.921, -11.75, 0.787, -0.0484, 1, 1, 0, 2), m(1.267, 1.52, -0.022, 0.0164, 1, 1, 0, 1), m(-109.673, -115.18, 0.461, -0.949, 1, 1, 0, 0), m(-205.962, -182.36, 2.056, 1.4437, 1, 1, 0, -2), m(0.233, 0.36, 0.012, -25e-4, 1, 1, 0, -3), m(-4.391, -9.66, -0.471, 0.0673, 1, 1, 0, -4), m(0.283, 1.53, -0.111, 6e-3, 1, -1, 0, 4), m(14.577, 31.7, -1.54, 0.2302, 1, -1, 0, 2), m(147.687, 138.76, 0.679, 1.1528, 1, -1, 0, 0), m(-1.089, 0.55, 0.021, 0, 1, -1, 0, -1), m(28.475, 23.59, -0.443, -0.2257, 1, -1, 0, -2), m(-0.276, -0.38, -6e-3, -36e-4, 1, -1, 0, -3), m(0.636, 2.27, 0.146, -0.0102, 1, -1, 0, -4), m(-0.189, -1.68, 0.131, -28e-4, 0, 2, 0, 2), m(-7.486, -0.66, -0.037, -86e-4, 0, 2, 0, 0), m(-8.096, -16.35, -0.74, 0.0918, 0, 2, 0, -2), m(-5.741, -0.04, 0, -9e-4, 0, 0, 2, 2), m(0.255, 0, 0, 0, 0, 0, 2, 1), m(-411.608, -0.2, 0, -0.0124, 0, 0, 2, 0), m(0.584, 0.84, 0, 71e-4, 0, 0, 2, -1), m(-55.173, -52.14, 0, -0.1052, 0, 0, 2, -2), m(0.254, 0.25, 0, -17e-4, 0, 0, 2, -3), m(0.025, -1.67, 0, 31e-4, 0, 0, 2, -4), m(1.06, 2.96, -0.166, 0.0243, 3, 0, 0, 2), m(36.124, 50.64, -1.3, 0.6215, 3, 0, 0, 0), m(-13.193, -16.4, 0.258, -0.1187, 3, 0, 0, -2), m(-1.187, -0.74, 0.042, 74e-4, 3, 0, 0, -4), m(-0.293, -0.31, -2e-3, 46e-4, 3, 0, 0, -6), m(-0.29, -1.45, 0.116, -51e-4, 2, 1, 0, 2), m(-7.649, -10.56, 0.259, -0.1038, 2, 1, 0, 0), m(-8.627, -7.59, 0.078, -0.0192, 2, 1, 0, -2), m(-2.74, -2.54, 0.022, 0.0324, 2, 1, 0, -4), m(1.181, 3.32, -0.212, 0.0213, 2, -1, 0, 2), m(9.703, 11.67, -0.151, 0.1268, 2, -1, 0, 0), m(-0.352, -0.37, 1e-3, -28e-4, 2, -1, 0, -1), m(-2.494, -1.17, -3e-3, -17e-4, 2, -1, 0, -2), m(0.36, 0.2, -0.012, -43e-4, 2, -1, 0, -4), m(-1.167, -1.25, 8e-3, -0.0106, 1, 2, 0, 0), m(-7.412, -6.12, 0.117, 0.0484, 1, 2, 0, -2), m(-0.311, -0.65, -0.032, 44e-4, 1, 2, 0, -4), m(0.757, 1.82, -0.105, 0.0112, 1, -2, 0, 2), m(2.58, 2.32, 0.027, 0.0196, 1, -2, 0, 0), m(2.533, 2.4, -0.014, -0.0212, 1, -2, 0, -2), m(-0.344, -0.57, -0.025, 36e-4, 0, 3, 0, -2), m(-0.992, -0.02, 0, 0, 1, 0, 2, 2), m(-45.099, -0.02, 0, -1e-3, 1, 0, 2, 0), m(-0.179, -9.52, 0, -0.0833, 1, 0, 2, -2), m(-0.301, -0.33, 0, 14e-4, 1, 0, 2, -4), m(-6.382, -3.37, 0, -0.0481, 1, 0, -2, 2), m(39.528, 85.13, 0, -0.7136, 1, 0, -2, 0), m(9.366, 0.71, 0, -0.0112, 1, 0, -2, -2), m(0.202, 0.02, 0, 0, 1, 0, -2, -4), m(0.415, 0.1, 0, 13e-4, 0, 1, 2, 0), m(-2.152, -2.26, 0, -66e-4, 0, 1, 2, -2), m(-1.44, -1.3, 0, 14e-4, 0, 1, -2, 2), m(0.384, -0.04, 0, 0, 0, 1, -2, -2), m(1.938, 3.6, -0.145, 0.0401, 4, 0, 0, 0), m(-0.952, -1.58, 0.052, -0.013, 4, 0, 0, -2), m(-0.551, -0.94, 0.032, -97e-4, 3, 1, 0, 0), m(-0.482, -0.57, 5e-3, -45e-4, 3, 1, 0, -2), m(0.681, 0.96, -0.026, 0.0115, 3, -1, 0, 0), m(-0.297, -0.27, 2e-3, -9e-4, 2, 2, 0, -2), m(0.254, 0.21, -3e-3, 0, 2, -2, 0, -2), m(-0.25, -0.22, 4e-3, 14e-4, 1, 3, 0, -2), m(-3.996, 0, 0, 4e-4, 2, 0, 2, 0), m(0.557, -0.75, 0, -9e-3, 2, 0, 2, -2), m(-0.459, -0.38, 0, -53e-4, 2, 0, -2, 2), m(-1.298, 0.74, 0, 4e-4, 2, 0, -2, 0), m(0.538, 1.14, 0, -0.0141, 2, 0, -2, -2), m(0.263, 0.02, 0, 0, 1, 1, 2, 0), m(0.426, 0.07, 0, -6e-4, 1, 1, -2, -2), m(-0.304, 0.03, 0, 3e-4, 1, -1, 2, 0), m(-0.372, -0.19, 0, -27e-4, 1, -1, -2, 2), m(0.418, 0, 0, 0, 0, 0, 4, 0), m(-0.33, -0.04, 0, 0, 3, 0, 2, 0);
5297
5298
  function de(w, P, G, z, $) {
5298
- return w * sn(P, G, z, $).y;
5299
+ return w * cn(P, G, z, $).y;
5299
5300
  }
5300
5301
  S = 0, S += de(-526.069, 0, 0, 1, -2), S += de(-3.352, 0, 0, 1, -4), S += de(44.297, 1, 0, 1, -2), S += de(-6, 1, 0, 1, -4), S += de(20.599, -1, 0, 1, 0), S += de(-30.598, -1, 0, 1, -2), S += de(-24.649, -2, 0, 1, 0), S += de(-2, -2, 0, 1, -2), S += de(-22.571, 0, 1, 1, -2), S += de(10.985, 0, -1, 1, -2), g += 0.82 * F(0.7736 - 62.5512 * e) + 0.31 * F(0.0466 - 125.1025 * e) + 0.35 * F(0.5785 - 25.1042 * e) + 0.66 * F(0.4591 + 1335.8075 * e) + 0.64 * F(0.313 - 91.568 * e) + 1.14 * F(0.148 + 1331.2898 * e) + 0.21 * F(0.5918 + 1056.5859 * e) + 0.44 * F(0.5784 + 1322.8595 * e) + 0.24 * F(0.2275 - 5.7374 * e) + 0.28 * F(0.2965 + 2.6929 * e) + 0.33 * F(0.3132 + 6.3368 * e), o = L + Oe / Re;
5301
- let mo = (1.000002708 + 139.978 * v) * (18518.511 + 1.189 + E) * Math.sin(o) - 6.24 * Math.sin(3 * o) + S;
5302
+ let po = (1.000002708 + 139.978 * v) * (18518.511 + 1.189 + E) * Math.sin(o) - 6.24 * Math.sin(3 * o) + S;
5302
5303
  return {
5303
5304
  geo_eclip_lon: Se * Xe((O + g / Re) / Se),
5304
- geo_eclip_lat: Math.PI / (180 * 3600) * mo,
5305
+ geo_eclip_lat: Math.PI / (180 * 3600) * po,
5305
5306
  distance_au: Re * Dc / (0.999953253 * C)
5306
5307
  };
5307
5308
  }
@@ -5313,10 +5314,10 @@ function Bc(i, e) {
5313
5314
  ];
5314
5315
  }
5315
5316
  function Wc(i, e, t) {
5316
- const r = Va(e, t);
5317
+ const r = $a(e, t);
5317
5318
  return Bc(r, i);
5318
5319
  }
5319
- function Va(i, e) {
5320
+ function $a(i, e) {
5320
5321
  const t = i.tt / 36525;
5321
5322
  let r = 84381.406, n = ((((-951e-10 * t + 132851e-9) * t - 114045e-8) * t - 1.0790069) * t + 5038.481507) * t, a = ((((3337e-10 * t - 467e-9) * t - 772503e-8) * t + 0.0512623) * t - 0.025754) * t + r, o = ((((-56e-9 * t + 170663e-9) * t - 121197e-8) * t - 2.3814292) * t + 10.556403) * t;
5322
5323
  r *= Qe, n *= Qe, a *= Qe, o *= Qe;
@@ -5340,26 +5341,26 @@ function kc(i) {
5340
5341
  let r = 360 * ((e + t) % 1);
5341
5342
  return r < 0 && (r += 360), r;
5342
5343
  }
5343
- let ar;
5344
+ let or;
5344
5345
  function Vc(i) {
5345
- if (!ar || ar.tt !== i.tt) {
5346
+ if (!or || or.tt !== i.tt) {
5346
5347
  const e = i.tt / 36525;
5347
- let t = 15 * ka(i).ee;
5348
+ let t = 15 * Va(i).ee;
5348
5349
  const r = kc(i);
5349
5350
  let n = ((t + 0.014506 + ((((-368e-10 * e - 29956e-9) * e - 44e-8) * e + 1.3915817) * e + 4612.156534) * e) / 3600 + r) % 360 / 15;
5350
- n < 0 && (n += 24), ar = {
5351
+ n < 0 && (n += 24), or = {
5351
5352
  tt: i.tt,
5352
5353
  st: n
5353
5354
  };
5354
5355
  }
5355
- return ar.st;
5356
+ return or.st;
5356
5357
  }
5357
5358
  function $c(i) {
5358
5359
  const e = ze(i);
5359
5360
  return Vc(e);
5360
5361
  }
5361
5362
  function jc(i, e) {
5362
- const t = ka(i), r = t.mobl * Ue, n = t.tobl * Ue, a = t.dpsi * Qe, o = Math.cos(r), s = Math.sin(r), c = Math.cos(n), l = Math.sin(n), d = Math.cos(a), h = Math.sin(a), f = d, v = -h * o, g = -h * s, S = h * c, E = d * o * c + s * l, C = d * s * c - o * l, O = h * l, U = d * o * l - s * c, b = d * s * l + o * c;
5363
+ const t = Va(i), r = t.mobl * Ue, n = t.tobl * Ue, a = t.dpsi * Qe, o = Math.cos(r), s = Math.sin(r), c = Math.cos(n), l = Math.sin(n), d = Math.cos(a), h = Math.sin(a), f = d, v = -h * o, g = -h * s, S = h * c, E = d * o * c + s * l, C = d * s * c - o * l, O = h * l, U = d * o * l - s * c, b = d * s * l + o * c;
5363
5364
  if (e === ye.From2000)
5364
5365
  return new mt([
5365
5366
  [f, S, O],
@@ -5393,7 +5394,7 @@ class Yc {
5393
5394
  }
5394
5395
  let Xc = class {
5395
5396
  constructor(e, t, r) {
5396
- this.lat = ur(e), this.lon = ur(t), this.dist = ur(r);
5397
+ this.lat = lr(e), this.lon = lr(t), this.dist = lr(r);
5397
5398
  }
5398
5399
  };
5399
5400
  class mt {
@@ -5401,7 +5402,7 @@ class mt {
5401
5402
  this.rot = e;
5402
5403
  }
5403
5404
  }
5404
- function wi(i) {
5405
+ function Ri(i) {
5405
5406
  const e = ze(i), t = zc(e), r = t.distance_au * Math.cos(t.geo_eclip_lat), n = [
5406
5407
  r * Math.cos(t.geo_eclip_lon),
5407
5408
  r * Math.sin(t.geo_eclip_lon),
@@ -5420,7 +5421,7 @@ function at(i, e, t) {
5420
5421
  }
5421
5422
  return n;
5422
5423
  }
5423
- function Kr(i, e) {
5424
+ function Jr(i, e) {
5424
5425
  let t = 1, r = 0, n = 0, a = 0;
5425
5426
  for (let o of i) {
5426
5427
  let s = 0, c = 0;
@@ -5432,11 +5433,11 @@ function Kr(i, e) {
5432
5433
  }
5433
5434
  return n;
5434
5435
  }
5435
- const It = 365250, Ri = 0, Ai = 1, Ci = 2;
5436
- function Ii(i) {
5436
+ const Nt = 365250, Ai = 0, Ci = 1, Ii = 2;
5437
+ function Ni(i) {
5437
5438
  return new X(i[0] + 44036e-11 * i[1] - 190919e-12 * i[2], -479966e-12 * i[0] + 0.917482137087 * i[1] - 0.397776982902 * i[2], 0.397776982902 * i[1] + 0.917482137087 * i[2]);
5438
5439
  }
5439
- function $a(i, e, t) {
5440
+ function ja(i, e, t) {
5440
5441
  const r = t * Math.cos(e), n = Math.cos(i), a = Math.sin(i);
5441
5442
  return [
5442
5443
  r * n,
@@ -5444,27 +5445,27 @@ function $a(i, e, t) {
5444
5445
  t * Math.sin(e)
5445
5446
  ];
5446
5447
  }
5447
- function lr(i, e) {
5448
- const t = e.tt / It, r = at(i[Ri], t, !0), n = at(i[Ai], t, !1), a = at(i[Ci], t, !1), o = $a(r, n, a);
5449
- return Ii(o).ToAstroVector(e);
5448
+ function dr(i, e) {
5449
+ const t = e.tt / Nt, r = at(i[Ai], t, !0), n = at(i[Ci], t, !1), a = at(i[Ii], t, !1), o = ja(r, n, a);
5450
+ return Ni(o).ToAstroVector(e);
5450
5451
  }
5451
5452
  function qc(i, e) {
5452
- const t = e / It, r = at(i[Ri], t, !0), n = at(i[Ai], t, !1), a = at(i[Ci], t, !1), o = Kr(i[Ri], t), s = Kr(i[Ai], t), c = Kr(i[Ci], t), l = Math.cos(r), d = Math.sin(r), h = Math.cos(n), f = Math.sin(n), v = +(c * h * l) - a * f * l * s - a * h * d * o, g = +(c * h * d) - a * f * d * s + a * h * l * o, S = +(c * f) + a * h * s, E = $a(r, n, a), C = [
5453
- v / It,
5454
- g / It,
5455
- S / It
5456
- ], O = Ii(E), U = Ii(C);
5453
+ const t = e / Nt, r = at(i[Ai], t, !0), n = at(i[Ci], t, !1), a = at(i[Ii], t, !1), o = Jr(i[Ai], t), s = Jr(i[Ci], t), c = Jr(i[Ii], t), l = Math.cos(r), d = Math.sin(r), h = Math.cos(n), f = Math.sin(n), v = +(c * h * l) - a * f * l * s - a * h * d * o, g = +(c * h * d) - a * f * d * s + a * h * l * o, S = +(c * f) + a * h * s, E = ja(r, n, a), C = [
5454
+ v / Nt,
5455
+ g / Nt,
5456
+ S / Nt
5457
+ ], O = Ni(E), U = Ni(C);
5457
5458
  return new He(e, O, U);
5458
5459
  }
5459
- function or(i, e, t, r) {
5460
- const n = r / (r + Ji), a = lr(et[t], e);
5460
+ function sr(i, e, t, r) {
5461
+ const n = r / (r + Qi), a = dr(et[t], e);
5461
5462
  i.x += n * a.x, i.y += n * a.y, i.z += n * a.z;
5462
5463
  }
5463
5464
  function Zc(i) {
5464
5465
  const e = new ce(0, 0, 0, i);
5465
- return or(e, i, N.Jupiter, Ti), or(e, i, N.Saturn, xi), or(e, i, N.Uranus, yi), or(e, i, N.Neptune, Ei), e;
5466
+ return sr(e, i, N.Jupiter, xi), sr(e, i, N.Saturn, yi), sr(e, i, N.Uranus, Ei), sr(e, i, N.Neptune, wi), e;
5466
5467
  }
5467
- const Ni = 51, Kc = 29200, tt = 146, Te = 201, Pe = [
5468
+ const Di = 51, Kc = 29200, tt = 146, Te = 201, Pe = [
5468
5469
  [-73e4, [-26.118207232108, -14.376168177825, 3.384402515299], [0.0016339372163656, -0.0027861699588508, -0.0013585880229445]],
5469
5470
  [-700800, [41.974905202127, -0.448502952929, -12.770351505989], [73458569351457e-17, 0.0022785014891658, 48619778602049e-17]],
5470
5471
  [-671600, [14.706930780744, 44.269110540027, 9.353698474772], [-0.00210001479998, 22295915939915e-17, 70143443551414e-17]],
@@ -5573,71 +5574,71 @@ function Jc(i) {
5573
5574
  let [e, [t, r, n], [a, o, s]] = i;
5574
5575
  return new He(e, new X(t, r, n), new X(a, o, s));
5575
5576
  }
5576
- function sr(i, e, t, r) {
5577
- const n = r / (r + Ji), a = qc(et[t], e);
5577
+ function cr(i, e, t, r) {
5578
+ const n = r / (r + Qi), a = qc(et[t], e);
5578
5579
  return i.r.incr(a.r.mul(n)), i.v.incr(a.v.mul(n)), a;
5579
5580
  }
5580
- function Et(i, e, t) {
5581
+ function wt(i, e, t) {
5581
5582
  const r = t.sub(i), n = r.quadrature();
5582
5583
  return r.mul(e / (n * Math.sqrt(n)));
5583
5584
  }
5584
- class Qi {
5585
+ class en {
5585
5586
  constructor(e) {
5586
5587
  let t = new He(e, new X(0, 0, 0), new X(0, 0, 0));
5587
- this.Jupiter = sr(t, e, N.Jupiter, Ti), this.Saturn = sr(t, e, N.Saturn, xi), this.Uranus = sr(t, e, N.Uranus, yi), this.Neptune = sr(t, e, N.Neptune, Ei), this.Jupiter.r.decr(t.r), this.Jupiter.v.decr(t.v), this.Saturn.r.decr(t.r), this.Saturn.v.decr(t.v), this.Uranus.r.decr(t.r), this.Uranus.v.decr(t.v), this.Neptune.r.decr(t.r), this.Neptune.v.decr(t.v), this.Sun = new He(e, t.r.mul(-1), t.v.mul(-1));
5588
+ this.Jupiter = cr(t, e, N.Jupiter, xi), this.Saturn = cr(t, e, N.Saturn, yi), this.Uranus = cr(t, e, N.Uranus, Ei), this.Neptune = cr(t, e, N.Neptune, wi), this.Jupiter.r.decr(t.r), this.Jupiter.v.decr(t.v), this.Saturn.r.decr(t.r), this.Saturn.v.decr(t.v), this.Uranus.r.decr(t.r), this.Uranus.v.decr(t.v), this.Neptune.r.decr(t.r), this.Neptune.v.decr(t.v), this.Sun = new He(e, t.r.mul(-1), t.v.mul(-1));
5588
5589
  }
5589
5590
  Acceleration(e) {
5590
- let t = Et(e, Ji, this.Sun.r);
5591
- return t.incr(Et(e, Ti, this.Jupiter.r)), t.incr(Et(e, xi, this.Saturn.r)), t.incr(Et(e, yi, this.Uranus.r)), t.incr(Et(e, Ei, this.Neptune.r)), t;
5591
+ let t = wt(e, Qi, this.Sun.r);
5592
+ return t.incr(wt(e, xi, this.Jupiter.r)), t.incr(wt(e, yi, this.Saturn.r)), t.incr(wt(e, Ei, this.Uranus.r)), t.incr(wt(e, wi, this.Neptune.r)), t;
5592
5593
  }
5593
5594
  }
5594
- class Hr {
5595
+ class Fr {
5595
5596
  constructor(e, t, r, n) {
5596
5597
  this.tt = e, this.r = t, this.v = r, this.a = n;
5597
5598
  }
5598
5599
  clone() {
5599
- return new Hr(this.tt, this.r.clone(), this.v.clone(), this.a.clone());
5600
+ return new Fr(this.tt, this.r.clone(), this.v.clone(), this.a.clone());
5600
5601
  }
5601
5602
  }
5602
- let ja = class {
5603
+ let Ya = class {
5603
5604
  constructor(e, t) {
5604
5605
  this.bary = e, this.grav = t;
5605
5606
  }
5606
5607
  };
5607
- function Sr(i, e, t, r) {
5608
+ function Tr(i, e, t, r) {
5608
5609
  return new X(e.x + i * (t.x + i * r.x / 2), e.y + i * (t.y + i * r.y / 2), e.z + i * (t.z + i * r.z / 2));
5609
5610
  }
5610
- function Gn(i, e, t) {
5611
+ function zn(i, e, t) {
5611
5612
  return new X(e.x + i * t.x, e.y + i * t.y, e.z + i * t.z);
5612
5613
  }
5613
- function Di(i, e) {
5614
- const t = i - e.tt, r = new Qi(i), n = Sr(t, e.r, e.v, e.a), a = r.Acceleration(n).mean(e.a), o = Sr(t, e.r, e.v, a), s = e.v.add(a.mul(t)), c = r.Acceleration(o), l = new Hr(i, o, s, c);
5615
- return new ja(r, l);
5614
+ function Oi(i, e) {
5615
+ const t = i - e.tt, r = new en(i), n = Tr(t, e.r, e.v, e.a), a = r.Acceleration(n).mean(e.a), o = Tr(t, e.r, e.v, a), s = e.v.add(a.mul(t)), c = r.Acceleration(o), l = new Fr(i, o, s, c);
5616
+ return new Ya(r, l);
5616
5617
  }
5617
5618
  const Qc = [];
5618
- function Ya(i, e) {
5619
+ function Xa(i, e) {
5619
5620
  const t = Math.floor(i);
5620
5621
  return t < 0 ? 0 : t >= e ? e - 1 : t;
5621
5622
  }
5622
- function Oi(i) {
5623
- const e = Jc(i), t = new Qi(e.tt), r = e.r.add(t.Sun.r), n = e.v.add(t.Sun.v), a = t.Acceleration(r), o = new Hr(e.tt, r, n, a);
5624
- return new ja(t, o);
5623
+ function bi(i) {
5624
+ const e = Jc(i), t = new en(e.tt), r = e.r.add(t.Sun.r), n = e.v.add(t.Sun.v), a = t.Acceleration(r), o = new Fr(e.tt, r, n, a);
5625
+ return new Ya(t, o);
5625
5626
  }
5626
5627
  function eu(i, e) {
5627
5628
  const t = Pe[0][0];
5628
- if (e < t || e > Pe[Ni - 1][0])
5629
+ if (e < t || e > Pe[Di - 1][0])
5629
5630
  return null;
5630
- const r = Ya((e - t) / Kc, Ni - 1);
5631
+ const r = Xa((e - t) / Kc, Di - 1);
5631
5632
  if (!i[r]) {
5632
5633
  const a = i[r] = [];
5633
- a[0] = Oi(Pe[r]).grav, a[Te - 1] = Oi(Pe[r + 1]).grav;
5634
+ a[0] = bi(Pe[r]).grav, a[Te - 1] = bi(Pe[r + 1]).grav;
5634
5635
  let o, s = a[0].tt;
5635
5636
  for (o = 1; o < Te - 1; ++o)
5636
- a[o] = Di(s += tt, a[o - 1]).grav;
5637
+ a[o] = Oi(s += tt, a[o - 1]).grav;
5637
5638
  s = a[Te - 1].tt;
5638
5639
  var n = [];
5639
5640
  for (n[Te - 1] = a[Te - 1], o = Te - 2; o > 0; --o)
5640
- n[o] = Di(s -= tt, n[o + 1]).grav;
5641
+ n[o] = Oi(s -= tt, n[o + 1]).grav;
5641
5642
  for (o = Te - 2; o > 0; --o) {
5642
5643
  const c = o / (Te - 1);
5643
5644
  a[o].r = a[o].r.mul(1 - c).add(n[o].r.mul(c)), a[o].v = a[o].v.mul(1 - c).add(n[o].v.mul(c)), a[o].a = a[o].a.mul(1 - c).add(n[o].a.mul(c));
@@ -5645,29 +5646,29 @@ function eu(i, e) {
5645
5646
  }
5646
5647
  return i[r];
5647
5648
  }
5648
- function zn(i, e, t) {
5649
- let r = Oi(i);
5649
+ function Bn(i, e, t) {
5650
+ let r = bi(i);
5650
5651
  const n = Math.ceil((e - r.grav.tt) / t);
5651
5652
  for (let a = 0; a < n; ++a)
5652
- r = Di(a + 1 === n ? e : r.grav.tt + t, r.grav);
5653
+ r = Oi(a + 1 === n ? e : r.grav.tt + t, r.grav);
5653
5654
  return r;
5654
5655
  }
5655
5656
  function tu(i, e) {
5656
5657
  let t, r, n;
5657
5658
  const a = eu(Qc, i.tt);
5658
5659
  if (a) {
5659
- const o = Ya((i.tt - a[0].tt) / tt, Te - 1), s = a[o], c = a[o + 1], l = s.a.mean(c.a), d = Sr(i.tt - s.tt, s.r, s.v, l), h = Gn(i.tt - s.tt, s.v, l), f = Sr(i.tt - c.tt, c.r, c.v, l), v = Gn(i.tt - c.tt, c.v, l), g = (i.tt - s.tt) / tt;
5660
+ const o = Xa((i.tt - a[0].tt) / tt, Te - 1), s = a[o], c = a[o + 1], l = s.a.mean(c.a), d = Tr(i.tt - s.tt, s.r, s.v, l), h = zn(i.tt - s.tt, s.v, l), f = Tr(i.tt - c.tt, c.r, c.v, l), v = zn(i.tt - c.tt, c.v, l), g = (i.tt - s.tt) / tt;
5660
5661
  t = d.mul(1 - g).add(f.mul(g)), r = h.mul(1 - g).add(v.mul(g));
5661
5662
  } else {
5662
5663
  let o;
5663
- i.tt < Pe[0][0] ? o = zn(Pe[0], i.tt, -tt) : o = zn(Pe[Ni - 1], i.tt, +tt), t = o.grav.r, r = o.grav.v, n = o.bary;
5664
+ i.tt < Pe[0][0] ? o = Bn(Pe[0], i.tt, -tt) : o = Bn(Pe[Di - 1], i.tt, +tt), t = o.grav.r, r = o.grav.v, n = o.bary;
5664
5665
  }
5665
- return n || (n = new Qi(i.tt)), t = t.sub(n.Sun.r), r = r.sub(n.Sun.v), new Yc(t.x, t.y, t.z, r.x, r.y, r.z, i);
5666
+ return n || (n = new en(i.tt)), t = t.sub(n.Sun.r), r = r.sub(n.Sun.v), new Yc(t.x, t.y, t.z, r.x, r.y, r.z, i);
5666
5667
  }
5667
- function bt(i, e) {
5668
+ function Pt(i, e) {
5668
5669
  var t = ze(e);
5669
5670
  if (i in et)
5670
- return lr(et[i], t);
5671
+ return dr(et[i], t);
5671
5672
  if (i === N.Pluto) {
5672
5673
  const o = tu(t);
5673
5674
  return new ce(o.x, o.y, o.z, t);
@@ -5675,16 +5676,16 @@ function bt(i, e) {
5675
5676
  if (i === N.Sun)
5676
5677
  return new ce(0, 0, 0, t);
5677
5678
  if (i === N.Moon) {
5678
- var r = lr(et.Earth, t), n = wi(t);
5679
+ var r = dr(et.Earth, t), n = Ri(t);
5679
5680
  return new ce(r.x + n.x, r.y + n.y, r.z + n.z, t);
5680
5681
  }
5681
5682
  if (i === N.EMB) {
5682
- const o = lr(et.Earth, t), s = wi(t), c = 1 + Oc;
5683
+ const o = dr(et.Earth, t), s = Ri(t), c = 1 + Oc;
5683
5684
  return new ce(o.x + s.x / c, o.y + s.y / c, o.z + s.z / c, t);
5684
5685
  }
5685
5686
  if (i === N.SSB)
5686
5687
  return Zc(t);
5687
- const a = Ba(i);
5688
+ const a = Wa(i);
5688
5689
  if (a) {
5689
5690
  const o = new Xc(a.dec, 15 * a.ra, a.dist);
5690
5691
  return cu(o, t);
@@ -5709,19 +5710,19 @@ class iu {
5709
5710
  this.observerBody = e, this.targetBody = t, this.aberration = r, this.observerPos = n;
5710
5711
  }
5711
5712
  Position(e) {
5712
- this.aberration && (this.observerPos = bt(this.observerBody, e));
5713
- const t = bt(this.targetBody, e);
5713
+ this.aberration && (this.observerPos = Pt(this.observerBody, e));
5714
+ const t = Pt(this.targetBody, e);
5714
5715
  return new ce(t.x - this.observerPos.x, t.y - this.observerPos.y, t.z - this.observerPos.z, e);
5715
5716
  }
5716
5717
  }
5717
5718
  function nu(i, e, t, r) {
5718
5719
  const n = ze(i);
5719
- if (Ba(t)) {
5720
- const s = bt(t, n), c = bt(e, n);
5720
+ if (Wa(t)) {
5721
+ const s = Pt(t, n), c = Pt(e, n);
5721
5722
  return new ce(s.x - c.x, s.y - c.y, s.z - c.z, n);
5722
5723
  }
5723
5724
  let a;
5724
- a = bt(e, n);
5725
+ a = Pt(e, n);
5725
5726
  const o = new iu(e, t, r, a);
5726
5727
  return ru((s) => o.Position(s), n);
5727
5728
  }
@@ -5731,16 +5732,16 @@ function au(i, e, t) {
5731
5732
  case N.Earth:
5732
5733
  return new ce(0, 0, 0, r);
5733
5734
  case N.Moon:
5734
- return wi(r);
5735
+ return Ri(r);
5735
5736
  default:
5736
5737
  const n = nu(r, N.Earth, i, t);
5737
5738
  return n.t = r, n;
5738
5739
  }
5739
5740
  }
5740
- var Bn;
5741
+ var Wn;
5741
5742
  (function(i) {
5742
5743
  i[i.Pericenter = 0] = "Pericenter", i[i.Apocenter = 1] = "Apocenter";
5743
- })(Bn || (Bn = {}));
5744
+ })(Wn || (Wn = {}));
5744
5745
  function ou(i, e) {
5745
5746
  return new mt([
5746
5747
  [
@@ -5761,7 +5762,7 @@ function ou(i, e) {
5761
5762
  ]);
5762
5763
  }
5763
5764
  function su(i, e, t) {
5764
- const r = ur(t) * Ue, n = Math.cos(r), a = Math.sin(r), o = (e + 1) % 3, s = (e + 2) % 3, c = e;
5765
+ const r = lr(t) * Ue, n = Math.cos(r), a = Math.sin(r), o = (e + 1) % 3, s = (e + 2) % 3, c = e;
5765
5766
  let l = [[0, 0, 0], [0, 0, 0], [0, 0, 0]];
5766
5767
  return l[o][o] = n * i.rot[o][o] - a * i.rot[o][s], l[o][s] = a * i.rot[o][o] + n * i.rot[o][s], l[o][c] = i.rot[o][c], l[s][o] = n * i.rot[s][o] - a * i.rot[s][s], l[s][s] = a * i.rot[s][o] + n * i.rot[s][s], l[s][c] = i.rot[s][c], l[c][o] = n * i.rot[c][o] - a * i.rot[c][s], l[c][s] = a * i.rot[c][o] + n * i.rot[c][s], l[c][c] = i.rot[c][c], new mt(l);
5767
5768
  }
@@ -5772,18 +5773,18 @@ function cu(i, e) {
5772
5773
  }
5773
5774
  function uu(i) {
5774
5775
  i = ze(i);
5775
- const e = Va(i, ye.From2000), t = jc(i, ye.From2000);
5776
+ const e = $a(i, ye.From2000), t = jc(i, ye.From2000);
5776
5777
  return ou(e, t);
5777
5778
  }
5778
- var Wn;
5779
+ var kn;
5779
5780
  (function(i) {
5780
5781
  i.Penumbral = "penumbral", i.Partial = "partial", i.Annular = "annular", i.Total = "total";
5781
- })(Wn || (Wn = {}));
5782
- var kn;
5782
+ })(kn || (kn = {}));
5783
+ var Vn;
5783
5784
  (function(i) {
5784
5785
  i[i.Invalid = 0] = "Invalid", i[i.Ascending = 1] = "Ascending", i[i.Descending = -1] = "Descending";
5785
- })(kn || (kn = {}));
5786
- function en(i) {
5786
+ })(Vn || (Vn = {}));
5787
+ function tn(i) {
5787
5788
  return i instanceof Ie ? i : (
5788
5789
  // Prefer number to be JS timestamp.
5789
5790
  new Ie(i instanceof Date ? i : new Date(i))
@@ -5815,20 +5816,20 @@ function du(i, e = new T()) {
5815
5816
  );
5816
5817
  }
5817
5818
  function hu(i, e = new T()) {
5818
- const t = en(i), r = su(uu(t), 2, -15 * $c(t));
5819
+ const t = tn(i), r = su(uu(t), 2, -15 * $c(t));
5819
5820
  return du(r, e);
5820
5821
  }
5821
- function Xa(i, e, t, r, n) {
5822
+ function qa(i, e, t, r, n) {
5822
5823
  const a = au(i, e, !1);
5823
5824
  return lu(a, t), r != null, t.normalize();
5824
5825
  }
5825
5826
  function mu(i, e = new p(), t) {
5826
- return Xa(N.Sun, en(i), e, t);
5827
+ return qa(N.Sun, tn(i), e, t);
5827
5828
  }
5828
5829
  function pu(i, e = new p(), t) {
5829
- return Xa(N.Moon, en(i), e, t);
5830
+ return qa(N.Moon, tn(i), e, t);
5830
5831
  }
5831
- function qa(i) {
5832
+ function Za(i) {
5832
5833
  return Math.sqrt(Math.max(i, 0));
5833
5834
  }
5834
5835
  function fu(i) {
@@ -5840,42 +5841,42 @@ function gu(i, e, t) {
5840
5841
  }
5841
5842
  function vu(i, e, t) {
5842
5843
  const { topRadius: r } = i, n = e ** 2 * (t ** 2 - 1) + r ** 2;
5843
- return fu(-e * t + qa(n));
5844
+ return fu(-e * t + Za(n));
5844
5845
  }
5845
- function Tr(i, e) {
5846
+ function xr(i, e) {
5846
5847
  return 0.5 / e + i * (1 - 1 / e);
5847
5848
  }
5848
- const _u = /* @__PURE__ */ new p(), Vn = /* @__PURE__ */ new p(), Su = /* @__PURE__ */ new p(), $n = /* @__PURE__ */ new WeakMap();
5849
+ const _u = /* @__PURE__ */ new p(), $n = /* @__PURE__ */ new p(), Su = /* @__PURE__ */ new p(), jn = /* @__PURE__ */ new WeakMap();
5849
5850
  function Tu(i) {
5850
5851
  i.image;
5851
- let e = On(i.image.data) ? i.image.data : On(i.userData.imageData) ? i.userData.imageData : void 0;
5852
+ let e = bn(i.image.data) ? i.image.data : bn(i.userData.imageData) ? i.userData.imageData : void 0;
5852
5853
  if (i.type === K && e instanceof Uint16Array) {
5853
- const t = $n.get(e.buffer);
5854
- t == null ? (e = new Ee(e.buffer), $n.set(e.buffer, e)) : e = t;
5854
+ const t = jn.get(e.buffer);
5855
+ t == null ? (e = new Ee(e.buffer), jn.set(e.buffer, e)) : e = t;
5855
5856
  }
5856
5857
  return e;
5857
5858
  }
5858
- function cr(i, e, t) {
5859
+ function ur(i, e, t) {
5859
5860
  const r = e * 4;
5860
5861
  return t.set(i[r], i[r + 1], i[r + 2]);
5861
5862
  }
5862
- function Za(i, e, t) {
5863
+ function Ka(i, e, t) {
5863
5864
  const r = Tu(i);
5864
5865
  if (r == null)
5865
5866
  return t.setScalar(0);
5866
5867
  i.image;
5867
- const { width: n, height: a } = i.image, o = ht(e.x, 0, 1) * (n - 1), s = ht(e.y, 0, 1) * (a - 1), c = Math.floor(o), l = Math.floor(s), d = o - c, h = s - l, f = d, v = h, g = c % n, S = (g + 1) % n, E = l % a, C = (E + 1) % a, O = cr(r, E * n + g, _u), U = cr(r, E * n + S, Vn), b = O.lerp(U, f), L = cr(r, C * n + g, Vn), j = cr(r, C * n + S, Su), Y = L.lerp(j, f);
5868
+ const { width: n, height: a } = i.image, o = ht(e.x, 0, 1) * (n - 1), s = ht(e.y, 0, 1) * (a - 1), c = Math.floor(o), l = Math.floor(s), d = o - c, h = s - l, f = d, v = h, g = c % n, S = (g + 1) % n, E = l % a, C = (E + 1) % a, O = ur(r, E * n + g, _u), U = ur(r, E * n + S, $n), b = O.lerp(U, f), L = ur(r, C * n + g, $n), j = ur(r, C * n + S, Su), Y = L.lerp(j, f);
5868
5869
  return t.copy(b.lerp(Y, v));
5869
5870
  }
5870
5871
  function xu(i, e, t, r) {
5871
- const { topRadius: n, bottomRadius: a } = i, o = Math.sqrt(n ** 2 - a ** 2), s = qa(e ** 2 - a ** 2), c = vu(i, e, t), l = n - e, d = s + o, h = (c - l) / (d - l), f = s / o;
5872
+ const { topRadius: n, bottomRadius: a } = i, o = Math.sqrt(n ** 2 - a ** 2), s = Za(e ** 2 - a ** 2), c = vu(i, e, t), l = n - e, d = s + o, h = (c - l) / (d - l), f = s / o;
5872
5873
  return r.set(
5873
- Tr(h, St),
5874
- Tr(f, Tt)
5874
+ xr(h, St),
5875
+ xr(f, Tt)
5875
5876
  );
5876
5877
  }
5877
- const yu = /* @__PURE__ */ new p(), Jr = /* @__PURE__ */ new p(), Eu = /* @__PURE__ */ new D();
5878
- function wu(i, e, t, r = new Er(), {
5878
+ const yu = /* @__PURE__ */ new p(), Qr = /* @__PURE__ */ new p(), Eu = /* @__PURE__ */ new D();
5879
+ function wu(i, e, t, r = new wr(), {
5879
5880
  ellipsoid: n = Ne.WGS84,
5880
5881
  correctAltitude: a = !0
5881
5882
  } = {}, o = De.DEFAULT) {
@@ -5883,17 +5884,17 @@ function wu(i, e, t, r = new Er(), {
5883
5884
  if (a) {
5884
5885
  const g = n.projectOnSurface(
5885
5886
  e,
5886
- Jr
5887
+ Qr
5887
5888
  );
5888
5889
  g != null && s.sub(
5889
5890
  n.getOsculatingSphereCenter(
5890
5891
  g,
5891
5892
  o.bottomRadius,
5892
- Jr
5893
+ Qr
5893
5894
  )
5894
5895
  );
5895
5896
  }
5896
- const c = Jr;
5897
+ const c = Qr;
5897
5898
  let l = s.length(), d = s.dot(t);
5898
5899
  const { topRadius: h } = o, f = -d - Math.sqrt(d ** 2 - l ** 2 + h ** 2);
5899
5900
  if (f > 0 && (l = h, d += f), l > h)
@@ -5904,7 +5905,7 @@ function wu(i, e, t, r = new Er(), {
5904
5905
  c.setScalar(0);
5905
5906
  else {
5906
5907
  const S = xu(o, l, g, Eu);
5907
- Za(i, S, c);
5908
+ Ka(i, S, c);
5908
5909
  }
5909
5910
  }
5910
5911
  const v = c.multiply(o.solarIrradiance).multiply(o.sunRadianceToRelativeLuminance);
@@ -5985,16 +5986,16 @@ void main() {
5985
5986
  }
5986
5987
  }
5987
5988
  `;
5988
- class Au extends sa {
5989
+ class Au extends ca {
5989
5990
  constructor(e, t) {
5990
- super("LightingMaskPass"), this.selection = new Uo(), this.needsSwap = !1, this.needsDepthTexture = !0, this.renderPass = new Ho(e, t, new Eo()), this.renderPass.ignoreBackground = !0, this.renderPass.skipShadowMapUpdate = !0, this.renderPass.selection = this.selection, this.depthTexture = new wo(1, 1, ia), this.renderTarget = new Mt(1, 1, {
5991
- format: Lt,
5991
+ super("LightingMaskPass"), this.selection = new Uo(), this.needsSwap = !1, this.needsDepthTexture = !0, this.renderPass = new Ho(e, t, new wo()), this.renderPass.ignoreBackground = !0, this.renderPass.skipShadowMapUpdate = !0, this.renderPass.selection = this.selection, this.depthTexture = new Ro(1, 1, na), this.renderTarget = new Ut(1, 1, {
5992
+ format: Mt,
5992
5993
  depthTexture: this.depthTexture
5993
- }), this.depthCopyPass0 = new pn({ depthPacking: Kt }), this.depthCopyPass1 = new pn({ depthPacking: Kt }), this.clearPass = new Fo(!0, !1, !1), this.clearPass.overrideClearColor = new Er(16777215), this.clearPass.overrideClearAlpha = 1;
5994
+ }), this.depthCopyPass0 = new fn({ depthPacking: Jt }), this.depthCopyPass1 = new fn({ depthPacking: Jt }), this.clearPass = new Fo(!0, !1, !1), this.clearPass.overrideClearColor = new wr(16777215), this.clearPass.overrideClearAlpha = 1;
5994
5995
  const r = new Go();
5995
5996
  r.fragmentShader = k(Ru, {
5996
- core: { depth: kt }
5997
- }), r.uniforms.inverted = new u(!1), r.copyCameraSettings(t), r.depthBuffer0 = this.depthCopyPass0.texture, r.depthPacking0 = Kt, r.depthBuffer1 = this.depthCopyPass1.texture, r.depthPacking1 = Kt, r.depthMode = Ro, r.maxDepthStrategy = zo.DISCARD_MAX_DEPTH, this.depthMaskMaterial = r, this.depthMaskPass = new st(r);
5997
+ core: { depth: Vt }
5998
+ }), r.uniforms.inverted = new u(!1), r.copyCameraSettings(t), r.depthBuffer0 = this.depthCopyPass0.texture, r.depthPacking0 = Jt, r.depthBuffer1 = this.depthCopyPass1.texture, r.depthPacking1 = Jt, r.depthMode = Ao, r.maxDepthStrategy = zo.DISCARD_MAX_DEPTH, this.depthMaskMaterial = r, this.depthMaskPass = new st(r);
5998
5999
  }
5999
6000
  // eslint-disable-next-line accessor-pairs
6000
6001
  set mainScene(e) {
@@ -6007,7 +6008,7 @@ class Au extends sa {
6007
6008
  initialize(e, t, r) {
6008
6009
  this.renderPass.initialize(e, t, r), this.clearPass.initialize(e, t, r), this.depthMaskPass.initialize(e, t, r);
6009
6010
  }
6010
- setDepthTexture(e, t = Ao) {
6011
+ setDepthTexture(e, t = Co) {
6011
6012
  this.depthCopyPass0.setDepthTexture(e, t), this.depthCopyPass1.setDepthTexture(this.depthTexture, t);
6012
6013
  }
6013
6014
  render(e, t, r, n, a) {
@@ -6219,21 +6220,21 @@ void main() {
6219
6220
  }
6220
6221
  `
6221
6222
  );
6222
- function xr(i, e, t) {
6223
- const r = new Mt(e, t, {
6223
+ function yr(i, e, t) {
6224
+ const r = new Ut(e, t, {
6224
6225
  depthBuffer: !1,
6225
6226
  type: i,
6226
- format: Hi
6227
+ format: Fi
6227
6228
  }), n = r.texture;
6228
- return n.minFilter = q, n.magFilter = q, n.wrapS = Nt, n.wrapT = Nt, n.colorSpace = Ke, r;
6229
+ return n.minFilter = q, n.magFilter = q, n.wrapS = Dt, n.wrapT = Dt, n.colorSpace = Ke, r;
6229
6230
  }
6230
6231
  function ot(i, e, t, r) {
6231
- const n = new Io(e, t, r, {
6232
+ const n = new No(e, t, r, {
6232
6233
  depthBuffer: !1,
6233
6234
  type: i,
6234
- format: Hi
6235
+ format: Fi
6235
6236
  }), a = n.texture;
6236
- return a.minFilter = q, a.magFilter = q, a.wrapS = Nt, a.wrapT = Nt, a.wrapR = Nt, a.colorSpace = Ke, n;
6237
+ return a.minFilter = q, a.magFilter = q, a.wrapS = Dt, a.wrapT = Dt, a.wrapR = Dt, a.colorSpace = Ke, n;
6237
6238
  }
6238
6239
  function Lu(i) {
6239
6240
  const e = i[Symbol.iterator]();
@@ -6241,15 +6242,15 @@ function Lu(i) {
6241
6242
  const n = () => {
6242
6243
  try {
6243
6244
  const { value: a, done: o } = e.next();
6244
- o === !0 ? t(a) : Un(n);
6245
+ o === !0 ? t(a) : Hn(n);
6245
6246
  } catch (a) {
6246
6247
  r(a instanceof Error ? a : new Error());
6247
6248
  }
6248
6249
  };
6249
- Un(n);
6250
+ Hn(n);
6250
6251
  });
6251
6252
  }
6252
- async function jn(i, e, t) {
6253
+ async function Yn(i, e, t) {
6253
6254
  const { width: r, height: n } = e, a = t.type === K ? new Uint16Array(r * n * 4) : new Float32Array(r * n * 4);
6254
6255
  await i.readRenderTargetPixelsAsync(
6255
6256
  e,
@@ -6262,11 +6263,11 @@ async function jn(i, e, t) {
6262
6263
  }
6263
6264
  class Mu {
6264
6265
  constructor(e) {
6265
- this.lambdas = new p(), this.luminanceFromRadiance = new Le(), e === K && (this.opticalDepth = xr(
6266
+ this.lambdas = new p(), this.luminanceFromRadiance = new Le(), e === K && (this.opticalDepth = yr(
6266
6267
  e,
6267
6268
  St,
6268
6269
  Tt
6269
- )), this.deltaIrradiance = xr(
6270
+ )), this.deltaIrradiance = yr(
6270
6271
  e,
6271
6272
  vt,
6272
6273
  _t
@@ -6291,7 +6292,7 @@ class Mu {
6291
6292
  this.opticalDepth?.dispose(), this.deltaIrradiance.dispose(), this.deltaRayleighScattering.dispose(), this.deltaMieScattering.dispose(), this.deltaScatteringDensity.dispose();
6292
6293
  }
6293
6294
  }
6294
- class qe extends Ht {
6295
+ class qe extends Ft {
6295
6296
  constructor(e) {
6296
6297
  super({
6297
6298
  glslVersion: Fe,
@@ -6300,10 +6301,10 @@ class qe extends Ht {
6300
6301
  defines: {
6301
6302
  TRANSMITTANCE_TEXTURE_WIDTH: St.toFixed(0),
6302
6303
  TRANSMITTANCE_TEXTURE_HEIGHT: Tt.toFixed(0),
6303
- SCATTERING_TEXTURE_R_SIZE: Or.toFixed(0),
6304
- SCATTERING_TEXTURE_MU_SIZE: br.toFixed(0),
6305
- SCATTERING_TEXTURE_MU_S_SIZE: Pr.toFixed(0),
6306
- SCATTERING_TEXTURE_NU_SIZE: Lr.toFixed(0),
6304
+ SCATTERING_TEXTURE_R_SIZE: br.toFixed(0),
6305
+ SCATTERING_TEXTURE_MU_SIZE: Pr.toFixed(0),
6306
+ SCATTERING_TEXTURE_MU_S_SIZE: Lr.toFixed(0),
6307
+ SCATTERING_TEXTURE_NU_SIZE: Mr.toFixed(0),
6307
6308
  IRRADIANCE_TEXTURE_WIDTH: vt.toFixed(0),
6308
6309
  IRRADIANCE_TEXTURE_HEIGHT: _t.toFixed(0),
6309
6310
  ...e.defines
@@ -6312,7 +6313,7 @@ class qe extends Ht {
6312
6313
  }
6313
6314
  // eslint-disable-next-line accessor-pairs
6314
6315
  set additive(e) {
6315
- this.transparent = e, this.blending = e ? Co : Fi, this.blendEquation = ln, this.blendEquationAlpha = ln, this.blendSrc = Jt, this.blendDst = Jt, this.blendSrcAlpha = Jt, this.blendDstAlpha = Jt;
6316
+ this.transparent = e, this.blending = e ? Io : Gi, this.blendEquation = dn, this.blendEquationAlpha = dn, this.blendSrc = Qt, this.blendDst = Qt, this.blendSrcAlpha = Qt, this.blendDstAlpha = Qt;
6316
6317
  }
6317
6318
  setUniforms(e) {
6318
6319
  const t = this.uniforms;
@@ -6321,7 +6322,7 @@ class qe extends Ht {
6321
6322
  }
6322
6323
  class Uu {
6323
6324
  constructor(e, {
6324
- type: t = jo(e) ? oi : K,
6325
+ type: t = jo(e) ? si : K,
6325
6326
  combinedScattering: r = !0,
6326
6327
  higherOrderScattering: n = !0
6327
6328
  } = {}) {
@@ -6403,7 +6404,7 @@ class Uu {
6403
6404
  scatteringDensityTexture: new u(null),
6404
6405
  layer: new u(0)
6405
6406
  }
6406
- }), this.mesh = new na(new aa(2, 2)), this.scene = new To().add(this.mesh), this.camera = new wr(), this.updating = !1, this.renderer = e, this.type = t, this.transmittanceRenderTarget = xr(
6407
+ }), this.mesh = new aa(new oa(2, 2)), this.scene = new xo().add(this.mesh), this.camera = new Rr(), this.updating = !1, this.renderer = e, this.type = t, this.transmittanceRenderTarget = yr(
6407
6408
  t,
6408
6409
  St,
6409
6410
  Tt
@@ -6412,7 +6413,7 @@ class Uu {
6412
6413
  rt,
6413
6414
  it,
6414
6415
  nt
6415
- ), this.irradianceRenderTarget = xr(
6416
+ ), this.irradianceRenderTarget = yr(
6416
6417
  t,
6417
6418
  vt,
6418
6419
  _t
@@ -6553,11 +6554,11 @@ class Uu {
6553
6554
  const r = this.renderer, n = new Mu(this.type);
6554
6555
  n.lambdas.set(680, 550, 440), n.luminanceFromRadiance.identity();
6555
6556
  const a = r.autoClear;
6556
- return r.autoClear = !1, await Lu(this.precompute(n, !1)), r.autoClear = a, n.dispose(), await jn(
6557
+ return r.autoClear = !1, await Lu(this.precompute(n, !1)), r.autoClear = a, n.dispose(), await Yn(
6557
6558
  this.renderer,
6558
6559
  this.transmittanceRenderTarget,
6559
6560
  this.transmittanceRenderTarget.texture
6560
- ), await jn(
6561
+ ), await Yn(
6561
6562
  this.renderer,
6562
6563
  this.irradianceRenderTarget,
6563
6564
  this.irradianceRenderTarget.texture
@@ -6577,15 +6578,15 @@ class Uu {
6577
6578
  function Hu({ topRadius: i, bottomRadius: e }, t, r, n) {
6578
6579
  const a = (t - e) / (i - e), o = r * 0.5 + 0.5;
6579
6580
  return n.set(
6580
- Tr(o, vt),
6581
- Tr(a, _t)
6581
+ xr(o, vt),
6582
+ xr(a, _t)
6582
6583
  );
6583
6584
  }
6584
- const Fu = 1 / Math.sqrt(Math.PI), Qr = Math.sqrt(3) / (2 * Math.sqrt(Math.PI)), Gu = /* @__PURE__ */ new p(), ei = /* @__PURE__ */ new p(), zu = /* @__PURE__ */ new D(), Bu = /* @__PURE__ */ new Le(), Wu = {
6585
+ const Fu = 1 / Math.sqrt(Math.PI), ei = Math.sqrt(3) / (2 * Math.sqrt(Math.PI)), Gu = /* @__PURE__ */ new p(), ti = /* @__PURE__ */ new p(), zu = /* @__PURE__ */ new D(), Bu = /* @__PURE__ */ new Le(), Wu = {
6585
6586
  ellipsoid: Ne.WGS84,
6586
6587
  correctAltitude: !0
6587
6588
  };
6588
- class ku extends xo {
6589
+ class ku extends yo {
6589
6590
  constructor(e, t = De.DEFAULT) {
6590
6591
  super(), this.atmosphere = t, this.worldToECEFMatrix = new T();
6591
6592
  const {
@@ -6603,21 +6604,21 @@ class ku extends xo {
6603
6604
  if (this.correctAltitude) {
6604
6605
  const d = this.ellipsoid.projectOnSurface(
6605
6606
  r,
6606
- ei
6607
+ ti
6607
6608
  );
6608
6609
  d != null && r.add(
6609
- Mr(
6610
+ Ur(
6610
6611
  d,
6611
6612
  this.atmosphere.bottomRadius,
6612
6613
  this.ellipsoid,
6613
- ei
6614
+ ti
6614
6615
  )
6615
6616
  );
6616
6617
  }
6617
- const n = r.length(), a = r.dot(this.sunDirection) / n, o = Hu(this.atmosphere, n, a, zu), s = Za(this.irradianceTexture, o, ei);
6618
+ const n = r.length(), a = r.dot(this.sunDirection) / n, o = Hu(this.atmosphere, n, a, zu), s = Ka(this.irradianceTexture, o, ti);
6618
6619
  s.multiply(this.atmosphere.skyRadianceToRelativeLuminance);
6619
6620
  const c = this.ellipsoid.getSurfaceNormal(r).applyMatrix3(t), l = this.sh.coefficients;
6620
- l[0].copy(s).multiplyScalar(Fu), l[1].copy(s).multiplyScalar(Qr * c.y), l[2].copy(s).multiplyScalar(Qr * c.z), l[3].copy(s).multiplyScalar(Qr * c.x);
6621
+ l[0].copy(s).multiplyScalar(Fu), l[1].copy(s).multiplyScalar(ei * c.y), l[2].copy(s).multiplyScalar(ei * c.z), l[3].copy(s).multiplyScalar(ei * c.x);
6621
6622
  }
6622
6623
  }
6623
6624
  const Vu = `precision highp float;
@@ -6785,22 +6786,22 @@ void main() {
6785
6786
  gl_Position = vec4(position.xy, 1.0, 1.0);
6786
6787
  }
6787
6788
  `;
6788
- var ju = Object.defineProperty, tn = (i, e, t, r) => {
6789
+ var ju = Object.defineProperty, rn = (i, e, t, r) => {
6789
6790
  for (var n = void 0, a = i.length - 1, o; a >= 0; a--)
6790
6791
  (o = i[a]) && (n = o(e, t, n) || n);
6791
6792
  return n && ju(e, t, n), n;
6792
6793
  };
6793
6794
  const Yu = {
6794
- ...Ki,
6795
+ ...Ji,
6795
6796
  sun: !0,
6796
6797
  moon: !0,
6797
6798
  moonAngularRadius: 45e-4,
6798
6799
  // ≈ 15.5 arcminutes
6799
6800
  lunarRadianceScale: 1,
6800
6801
  ground: !0,
6801
- groundAlbedo: new Er(0)
6802
+ groundAlbedo: new wr(0)
6802
6803
  };
6803
- class Fr extends Vt {
6804
+ class Gr extends $t {
6804
6805
  constructor(e) {
6805
6806
  const {
6806
6807
  sun: t,
@@ -6817,13 +6818,13 @@ class Fr extends Vt {
6817
6818
  glslVersion: Fe,
6818
6819
  vertexShader: $u,
6819
6820
  fragmentShader: k(Vu, {
6820
- core: { raySphereIntersection: Dr },
6821
+ core: { raySphereIntersection: Or },
6821
6822
  bruneton: {
6822
6823
  common: me,
6823
6824
  definitions: pe,
6824
- runtime: Ur
6825
+ runtime: Hr
6825
6826
  },
6826
- sky: Ga
6827
+ sky: za
6827
6828
  }),
6828
6829
  ...l,
6829
6830
  uniforms: {
@@ -6873,15 +6874,15 @@ class Fr extends Vt {
6873
6874
  return this.uniforms.groundAlbedo.value;
6874
6875
  }
6875
6876
  }
6876
- tn([
6877
+ rn([
6877
6878
  y("SUN")
6878
- ], Fr.prototype, "sun");
6879
- tn([
6879
+ ], Gr.prototype, "sun");
6880
+ rn([
6880
6881
  y("MOON")
6881
- ], Fr.prototype, "moon");
6882
- tn([
6882
+ ], Gr.prototype, "moon");
6883
+ rn([
6883
6884
  y("GROUND")
6884
- ], Fr.prototype, "ground");
6885
+ ], Gr.prototype, "ground");
6885
6886
  const Xu = `precision highp float;
6886
6887
  precision highp sampler3D;
6887
6888
 
@@ -6989,19 +6990,19 @@ void main() {
6989
6990
  gl_PointSize = pointSize;
6990
6991
  }
6991
6992
  `;
6992
- var Zu = Object.defineProperty, Ka = (i, e, t, r) => {
6993
+ var Zu = Object.defineProperty, Ja = (i, e, t, r) => {
6993
6994
  for (var n = void 0, a = i.length - 1, o; a >= 0; a--)
6994
6995
  (o = i[a]) && (n = o(e, t, n) || n);
6995
6996
  return n && Zu(e, t, n), n;
6996
6997
  };
6997
6998
  const Ku = {
6998
- ...Ki,
6999
+ ...Ji,
6999
7000
  pointSize: 1,
7000
7001
  intensity: 1,
7001
7002
  background: !0,
7002
7003
  ground: !0
7003
7004
  };
7004
- let Ja = class extends Vt {
7005
+ let Qa = class extends $t {
7005
7006
  constructor(e) {
7006
7007
  const { pointSize: t, intensity: r, background: n, ground: a, ...o } = {
7007
7008
  ...Ku,
@@ -7015,7 +7016,7 @@ let Ja = class extends Vt {
7015
7016
  bruneton: {
7016
7017
  common: me,
7017
7018
  definitions: pe,
7018
- runtime: Ur
7019
+ runtime: Hr
7019
7020
  }
7020
7021
  }),
7021
7022
  ...o,
@@ -7054,18 +7055,18 @@ let Ja = class extends Vt {
7054
7055
  this.uniforms.intensity.value = e;
7055
7056
  }
7056
7057
  };
7057
- Ka([
7058
+ Ja([
7058
7059
  y("BACKGROUND")
7059
- ], Ja.prototype, "background");
7060
- Ka([
7060
+ ], Qa.prototype, "background");
7061
+ Ja([
7061
7062
  y("GROUND")
7062
- ], Ja.prototype, "ground");
7063
+ ], Qa.prototype, "ground");
7063
7064
  const Ju = /* @__PURE__ */ new p(), Qu = /* @__PURE__ */ new Le(), el = {
7064
7065
  ellipsoid: Ne.WGS84,
7065
7066
  correctAltitude: !0,
7066
7067
  distance: 1
7067
7068
  };
7068
- class tl extends yo {
7069
+ class tl extends Eo {
7069
7070
  constructor(e, t = De.DEFAULT) {
7070
7071
  super(), this.atmosphere = t, this.worldToECEFMatrix = new T();
7071
7072
  const {
@@ -7095,8 +7096,8 @@ class tl extends yo {
7095
7096
  );
7096
7097
  }
7097
7098
  }
7098
- const Yn = Ur, Xn = me, qn = pe;
7099
- class Gr {
7099
+ const Xn = Hr, qn = me, Zn = pe;
7100
+ class zr {
7100
7101
  constructor(e = 0, t = 0, r = 0, n = 0) {
7101
7102
  this.expTerm = e, this.exponent = t, this.linearTerm = r, this.constantTerm = n;
7102
7103
  }
@@ -7104,7 +7105,7 @@ class Gr {
7104
7105
  return this.expTerm = e, this.exponent = t, this.linearTerm = r, this.constantTerm = n, this;
7105
7106
  }
7106
7107
  clone() {
7107
- return new Gr(
7108
+ return new zr(
7108
7109
  this.expTerm,
7109
7110
  this.exponent,
7110
7111
  this.linearTerm,
@@ -7132,36 +7133,36 @@ function il(i, e) {
7132
7133
  if (e != null)
7133
7134
  for (const t of rl) {
7134
7135
  const r = e[t];
7135
- r != null && (i[t] instanceof Gr ? i[t].copy(r) : i[t] = r);
7136
+ r != null && (i[t] instanceof zr ? i[t].copy(r) : i[t] = r);
7136
7137
  }
7137
7138
  }
7138
- const bi = class Qa {
7139
+ const Pi = class eo {
7139
7140
  constructor(e) {
7140
- this.channel = "r", this.altitude = 0, this.height = 0, this.densityScale = 0.2, this.shapeAmount = 1, this.shapeDetailAmount = 1, this.weatherExponent = 1, this.shapeAlteringBias = 0.35, this.coverageFilterWidth = 0.6, this.densityProfile = new Gr(0, 0, 0.75, 0.25), this.shadow = !1, this.set(e);
7141
+ this.channel = "r", this.altitude = 0, this.height = 0, this.densityScale = 0.2, this.shapeAmount = 1, this.shapeDetailAmount = 1, this.weatherExponent = 1, this.shapeAlteringBias = 0.35, this.coverageFilterWidth = 0.6, this.densityProfile = new zr(0, 0, 0.75, 0.25), this.shadow = !1, this.set(e);
7141
7142
  }
7142
7143
  set(e) {
7143
7144
  return il(this, e), this;
7144
7145
  }
7145
7146
  clone() {
7146
- return new Qa(this);
7147
+ return new eo(this);
7147
7148
  }
7148
7149
  copy(e) {
7149
7150
  return this.channel = e.channel, this.altitude = e.altitude, this.height = e.height, this.densityScale = e.densityScale, this.shapeAmount = e.shapeAmount, this.shapeDetailAmount = e.shapeDetailAmount, this.weatherExponent = e.weatherExponent, this.shapeAlteringBias = e.shapeAlteringBias, this.coverageFilterWidth = e.coverageFilterWidth, this.densityProfile.copy(e.densityProfile), this.shadow = e.shadow, this;
7150
7151
  }
7151
7152
  };
7152
- bi.DEFAULT = /* @__PURE__ */ new bi();
7153
- let Ae = bi;
7153
+ Pi.DEFAULT = /* @__PURE__ */ new Pi();
7154
+ let Ae = Pi;
7154
7155
  const Ze = /* @__PURE__ */ Array.from(
7155
7156
  { length: 8 },
7156
7157
  () => ({ value: 0, flag: 0 })
7157
- ), wt = /* @__PURE__ */ Array.from(
7158
+ ), Rt = /* @__PURE__ */ Array.from(
7158
7159
  { length: 3 },
7159
7160
  () => ({ min: 0, max: 0 })
7160
7161
  );
7161
7162
  function nl(i, e) {
7162
7163
  return i.value !== e.value ? i.value - e.value : i.flag - e.flag;
7163
7164
  }
7164
- const Pi = class eo extends Array {
7165
+ const Li = class to extends Array {
7165
7166
  constructor(e) {
7166
7167
  super(
7167
7168
  new Ae(e?.[0]),
@@ -7177,7 +7178,7 @@ const Pi = class eo extends Array {
7177
7178
  return this[0].copy(Ae.DEFAULT), this[1].copy(Ae.DEFAULT), this[2].copy(Ae.DEFAULT), this[3].copy(Ae.DEFAULT), this;
7178
7179
  }
7179
7180
  clone() {
7180
- return new eo(this);
7181
+ return new to(this);
7181
7182
  }
7182
7183
  copy(e) {
7183
7184
  return this[0].copy(e[0]), this[1].copy(e[1]), this[2].copy(e[2]), this[3].copy(e[3]), this;
@@ -7216,20 +7217,20 @@ const Pi = class eo extends Array {
7216
7217
  for (let o = 0; o < Ze.length; ++o) {
7217
7218
  const { value: s, flag: c } = Ze[o];
7218
7219
  if (n === 0 && o > 0) {
7219
- const l = wt[r++];
7220
+ const l = Rt[r++];
7220
7221
  l.min = Ze[o - 1].value, l.max = s;
7221
7222
  }
7222
7223
  n += c === 0 ? 1 : -1;
7223
7224
  }
7224
7225
  for (; r < 3; ++r) {
7225
- const o = wt[r];
7226
+ const o = Rt[r];
7226
7227
  o.min = 0, o.max = 0;
7227
7228
  }
7228
- let a = wt[0];
7229
- e.x = a.min, t.x = a.max, a = wt[1], e.y = a.min, t.y = a.max, a = wt[2], e.z = a.min, t.z = a.max;
7229
+ let a = Rt[0];
7230
+ e.x = a.min, t.x = a.max, a = Rt[1], e.y = a.min, t.y = a.max, a = Rt[2], e.z = a.min, t.z = a.max;
7230
7231
  }
7231
7232
  };
7232
- Pi.DEFAULT = /* @__PURE__ */ new Pi([
7233
+ Li.DEFAULT = /* @__PURE__ */ new Li([
7233
7234
  {
7234
7235
  channel: "r",
7235
7236
  altitude: 750,
@@ -7267,18 +7268,18 @@ Pi.DEFAULT = /* @__PURE__ */ new Pi([
7267
7268
  },
7268
7269
  { channel: "a" }
7269
7270
  ]);
7270
- let al = Pi;
7271
+ let al = Li;
7271
7272
  var ol = "Invariant failed";
7272
7273
  function Ce(i, e) {
7273
7274
  if (!i)
7274
7275
  throw new Error(ol);
7275
7276
  }
7276
- class Ut {
7277
+ class Ht {
7277
7278
  constructor(e, t) {
7278
7279
  this.near = [new p(), new p(), new p(), new p()], this.far = [new p(), new p(), new p(), new p()], e != null && t != null && this.setFromCamera(e, t);
7279
7280
  }
7280
7281
  clone() {
7281
- return new Ut().copy(this);
7282
+ return new Ht().copy(this);
7282
7283
  }
7283
7284
  copy(e) {
7284
7285
  for (let t = 0; t < 4; ++t)
@@ -7301,7 +7302,7 @@ class Ut {
7301
7302
  }
7302
7303
  split(e, t = []) {
7303
7304
  for (let r = 0; r < e.length; ++r) {
7304
- const n = t[r] ??= new Ut();
7305
+ const n = t[r] ??= new Ht();
7305
7306
  if (r === 0)
7306
7307
  for (let a = 0; a < 4; ++a)
7307
7308
  n.near[a].copy(this.near[a]);
@@ -7345,7 +7346,7 @@ const sl = {
7345
7346
  practical: (i, e, t, r = 0.5, n = []) => {
7346
7347
  for (let a = 0; a < i; ++a) {
7347
7348
  const o = (e + (t - e) * (a + 1) / i) / t, s = e * (t / e) ** ((a + 1) / i) / t;
7348
- n[a] = ba(o, s, r);
7349
+ n[a] = Pa(o, s, r);
7349
7350
  }
7350
7351
  return n.length = i, n;
7351
7352
  }
@@ -7353,7 +7354,7 @@ const sl = {
7353
7354
  function cl(i, e, t, r, n, a = []) {
7354
7355
  return sl[i](e, t, r, n, a);
7355
7356
  }
7356
- const Zn = /* @__PURE__ */ new p(), Kn = /* @__PURE__ */ new p(), ul = /* @__PURE__ */ new T(), Jn = /* @__PURE__ */ new T(), ll = /* @__PURE__ */ new Ut(), dl = /* @__PURE__ */ new Do(), hl = {
7357
+ const Kn = /* @__PURE__ */ new p(), Jn = /* @__PURE__ */ new p(), ul = /* @__PURE__ */ new T(), Qn = /* @__PURE__ */ new T(), ll = /* @__PURE__ */ new Ht(), dl = /* @__PURE__ */ new Oo(), hl = {
7357
7358
  maxFar: null,
7358
7359
  farScale: 1,
7359
7360
  splitMode: "practical",
@@ -7363,7 +7364,7 @@ const Zn = /* @__PURE__ */ new p(), Kn = /* @__PURE__ */ new p(), ul = /* @__PUR
7363
7364
  };
7364
7365
  class ml {
7365
7366
  constructor(e) {
7366
- this.cascades = [], this.mapSize = new D(), this.cameraFrustum = new Ut(), this.frusta = [], this.splits = [], this._far = 0;
7367
+ this.cascades = [], this.mapSize = new D(), this.cameraFrustum = new Ht(), this.frusta = [], this.splits = [], this._far = 0;
7367
7368
  const {
7368
7369
  cascadeCount: t,
7369
7370
  mapSize: r,
@@ -7428,11 +7429,11 @@ class ml {
7428
7429
  }
7429
7430
  updateMatrices(e, t, r = 1) {
7430
7431
  const n = ul.lookAt(
7431
- Zn.setScalar(0),
7432
- Kn.copy(t).multiplyScalar(-1),
7433
- hn.DEFAULT_UP
7434
- ), a = Jn.multiplyMatrices(
7435
- Jn.copy(n).invert(),
7432
+ Kn.setScalar(0),
7433
+ Jn.copy(t).multiplyScalar(-1),
7434
+ mn.DEFAULT_UP
7435
+ ), a = Qn.multiplyMatrices(
7436
+ Qn.copy(n).invert(),
7436
7437
  e.matrixWorld
7437
7438
  ), o = this.frusta, s = this.cascades;
7438
7439
  Ce(o.length === s.length);
@@ -7452,12 +7453,12 @@ class ml {
7452
7453
  const { near: O, far: U } = ll.copy(h).applyMatrix4(a), b = dl.makeEmpty();
7453
7454
  for (let ie = 0; ie < 4; ie++)
7454
7455
  b.expandByPoint(O[ie]), b.expandByPoint(U[ie]);
7455
- const L = b.getCenter(Zn);
7456
+ const L = b.getCenter(Kn);
7456
7457
  L.z = b.max.z + c;
7457
7458
  const j = (S - g) / l.width, Y = (E - C) / l.height;
7458
7459
  L.x = Math.round(L.x / j) * j, L.y = Math.round(L.y / Y) * Y, L.applyMatrix4(n);
7459
- const le = Kn.copy(t).multiplyScalar(r).add(L);
7460
- f.inverseViewMatrix.lookAt(L, le, hn.DEFAULT_UP).setPosition(le);
7460
+ const le = Jn.copy(t).multiplyScalar(r).add(L);
7461
+ f.inverseViewMatrix.lookAt(L, le, mn.DEFAULT_UP).setPosition(le);
7461
7462
  }
7462
7463
  }
7463
7464
  update(e, t, r) {
@@ -7476,7 +7477,7 @@ class ml {
7476
7477
  }
7477
7478
  }
7478
7479
  }
7479
- const Qn = [
7480
+ const ea = [
7480
7481
  0,
7481
7482
  8,
7482
7483
  2,
@@ -7493,10 +7494,10 @@ const Qn = [
7493
7494
  7,
7494
7495
  13,
7495
7496
  5
7496
- ], to = /* @__PURE__ */ Qn.reduce((i, e, t) => {
7497
+ ], ro = /* @__PURE__ */ ea.reduce((i, e, t) => {
7497
7498
  const r = new D();
7498
7499
  for (let n = 0; n < 16; ++n)
7499
- if (Qn[n] === t) {
7500
+ if (ea[n] === t) {
7500
7501
  r.set((n % 4 + 0.5) / 4, (Math.floor(n / 4) + 0.5) / 4);
7501
7502
  break;
7502
7503
  }
@@ -8619,7 +8620,7 @@ void main() {
8619
8620
  outputShadowLength = shadowLength * METER_TO_LENGTH_UNIT;
8620
8621
  #endif // SHADOW_LENGTH
8621
8622
  }
8622
- `, ro = `float getSTBN() {
8623
+ `, io = `float getSTBN() {
8623
8624
  ivec3 size = textureSize(stbnTexture, 0);
8624
8625
  vec3 scale = 1.0 / vec3(size);
8625
8626
  return texture(stbnTexture, vec3(gl_FragCoord.xy, float(frame % size.z)) * scale).r;
@@ -8890,7 +8891,7 @@ void main() {
8890
8891
 
8891
8892
  gl_Position = vec4(position.xy, 1.0, 1.0);
8892
8893
  }
8893
- `, io = `uniform vec2 resolution;
8894
+ `, no = `uniform vec2 resolution;
8894
8895
  uniform int frame;
8895
8896
  uniform sampler3D stbnTexture;
8896
8897
 
@@ -8956,7 +8957,7 @@ uniform float shadowTopHeight;
8956
8957
  uniform float shadowBottomHeight;
8957
8958
  uniform vec4 shadowLayerMask;
8958
8959
  uniform CloudDensityProfile densityProfile;
8959
- `, Li = `struct GroundIrradiance {
8960
+ `, Mi = `struct GroundIrradiance {
8960
8961
  vec3 sun;
8961
8962
  vec3 sky;
8962
8963
  };
@@ -8980,8 +8981,8 @@ var _l = Object.defineProperty, re = (i, e, t, r) => {
8980
8981
  (o = i[a]) && (n = o(e, t, n) || n);
8981
8982
  return n && _l(e, t, n), n;
8982
8983
  };
8983
- const Sl = /* @__PURE__ */ new p(), Tl = /* @__PURE__ */ new Gi();
8984
- class Q extends Vt {
8984
+ const Sl = /* @__PURE__ */ new p(), Tl = /* @__PURE__ */ new zi();
8985
+ class Q extends $t {
8985
8986
  constructor({
8986
8987
  parameterUniforms: e,
8987
8988
  layerUniforms: t,
@@ -8994,35 +8995,35 @@ class Q extends Vt {
8994
8995
  vertexShader: k(vl, {
8995
8996
  atmosphere: {
8996
8997
  bruneton: {
8997
- common: Xn,
8998
- definitions: qn,
8999
- runtime: Yn
8998
+ common: qn,
8999
+ definitions: Zn,
9000
+ runtime: Xn
9000
9001
  }
9001
9002
  },
9002
- types: Li
9003
+ types: Mi
9003
9004
  }),
9004
- fragmentShader: Wt(
9005
+ fragmentShader: kt(
9005
9006
  k(gl, {
9006
9007
  core: {
9007
- depth: kt,
9008
- math: qi,
9009
- turbo: Zi,
9008
+ depth: Vt,
9009
+ math: Zi,
9010
+ turbo: Ki,
9010
9011
  generators: sc,
9011
- raySphereIntersection: Dr,
9012
- cascadedShadowMaps: La,
9013
- interleavedGradientNoise: Ma,
9014
- vogelDisk: Fa
9012
+ raySphereIntersection: Or,
9013
+ cascadedShadowMaps: Ma,
9014
+ interleavedGradientNoise: Ua,
9015
+ vogelDisk: Ga
9015
9016
  },
9016
9017
  atmosphere: {
9017
9018
  bruneton: {
9018
- common: Xn,
9019
- definitions: qn,
9020
- runtime: Yn
9019
+ common: qn,
9020
+ definitions: Zn,
9021
+ runtime: Xn
9021
9022
  }
9022
9023
  },
9023
- types: Li,
9024
- parameters: io,
9025
- clouds: ro
9024
+ types: Mi,
9025
+ parameters: no,
9026
+ clouds: io
9026
9027
  })
9027
9028
  ),
9028
9029
  // prettier-ignore
@@ -9107,7 +9108,7 @@ class Q extends Vt {
9107
9108
  t.viewMatrix.value.copy(e.matrixWorldInverse), t.inverseViewMatrix.value.copy(e.matrixWorld);
9108
9109
  const r = this.previousProjectionMatrix ?? e.projectionMatrix, n = this.previousViewMatrix ?? e.matrixWorldInverse, a = t.inverseProjectionMatrix.value, o = t.inverseViewMatrix.value, s = t.reprojectionMatrix.value, c = t.viewReprojectionMatrix.value;
9109
9110
  if (this.temporalUpscale) {
9110
- const h = t.frame.value % 16, f = t.resolution.value, v = to[h], g = (v.x - 0.5) / f.x * 4, S = (v.y - 0.5) / f.y * 4;
9111
+ const h = t.frame.value % 16, f = t.resolution.value, v = ro[h], g = (v.x - 0.5) / f.x * 4, S = (v.y - 0.5) / f.y * 4;
9111
9112
  t.temporalJitter.value.set(g, S), t.mipLevelScale.value = 0.25, a.copy(e.projectionMatrix), a.elements[8] += g * 2, a.elements[9] += S * 2, a.invert(), s.copy(r), s.elements[8] += g * 2, s.elements[9] += S * 2, s.multiply(n), c.copy(s).multiply(o);
9112
9113
  } else
9113
9114
  t.temporalJitter.value.setScalar(0), t.mipLevelScale.value = 1, a.copy(e.projectionMatrixInverse), s.copy(r).multiply(n), c.copy(s).multiply(o);
@@ -9145,7 +9146,7 @@ re([
9145
9146
  Ge("DEPTH_PACKING")
9146
9147
  ], Q.prototype, "depthPacking");
9147
9148
  re([
9148
- Pa("LOCAL_WEATHER_CHANNELS", {
9149
+ La("LOCAL_WEATHER_CHANNELS", {
9149
9150
  validate: (i) => /^[rgba]{4}$/.test(i)
9150
9151
  })
9151
9152
  ], Q.prototype, "localWeatherChannels");
@@ -9177,13 +9178,13 @@ re([
9177
9178
  Ge("SHADOW_SAMPLE_COUNT", { min: 1, max: 16 })
9178
9179
  ], Q.prototype, "shadowSampleCount");
9179
9180
  re([
9180
- Xi("SCATTER_ANISOTROPY_1")
9181
+ qi("SCATTER_ANISOTROPY_1")
9181
9182
  ], Q.prototype, "scatterAnisotropy1");
9182
9183
  re([
9183
- Xi("SCATTER_ANISOTROPY_2")
9184
+ qi("SCATTER_ANISOTROPY_2")
9184
9185
  ], Q.prototype, "scatterAnisotropy2");
9185
9186
  re([
9186
- Xi("SCATTER_ANISOTROPY_MIX")
9187
+ qi("SCATTER_ANISOTROPY_MIX")
9187
9188
  ], Q.prototype, "scatterAnisotropyMix");
9188
9189
  const xl = `// Taken from https://gist.github.com/TheRealMJP/c83b8c0f46b63f3a88a5986f4fa982b1
9189
9190
  // TODO: Use 5-taps version: https://www.shadertoy.com/view/MtVGWz
@@ -9485,7 +9486,7 @@ void main() {
9485
9486
  vUv = position.xy * 0.5 + 0.5;
9486
9487
  gl_Position = vec4(position.xy, 1.0, 1.0);
9487
9488
  }
9488
- `, no = `#ifdef VARIANCE_9_SAMPLES
9489
+ `, ao = `#ifdef VARIANCE_9_SAMPLES
9489
9490
  #define VARIANCE_OFFSET_COUNT 8
9490
9491
  const ivec2 varianceOffsets[8] = ivec2[8](
9491
9492
  ivec2(-1, -1),
@@ -9600,12 +9601,12 @@ vec4 varianceClipping(
9600
9601
  return varianceClipping(inputBuffer, coord, current, history, 1.0);
9601
9602
  }
9602
9603
  `;
9603
- var wl = Object.defineProperty, ao = (i, e, t, r) => {
9604
+ var wl = Object.defineProperty, oo = (i, e, t, r) => {
9604
9605
  for (var n = void 0, a = i.length - 1, o; a >= 0; a--)
9605
9606
  (o = i[a]) && (n = o(e, t, n) || n);
9606
9607
  return n && wl(e, t, n), n;
9607
9608
  };
9608
- let rn = class extends Ht {
9609
+ let nn = class extends Ft {
9609
9610
  constructor({
9610
9611
  colorBuffer: e = null,
9611
9612
  depthVelocityBuffer: t = null,
@@ -9617,11 +9618,11 @@ let rn = class extends Ht {
9617
9618
  name: "CloudsResolveMaterial",
9618
9619
  glslVersion: Fe,
9619
9620
  vertexShader: El,
9620
- fragmentShader: Wt(
9621
+ fragmentShader: kt(
9621
9622
  k(yl, {
9622
- core: { turbo: Zi },
9623
+ core: { turbo: Ki },
9623
9624
  catmullRomSampling: xl,
9624
- varianceClipping: no
9625
+ varianceClipping: ao
9625
9626
  })
9626
9627
  ),
9627
9628
  uniforms: {
@@ -9642,19 +9643,19 @@ let rn = class extends Ht {
9642
9643
  this.uniforms.texelSize.value.set(1 / e, 1 / t);
9643
9644
  }
9644
9645
  onBeforeRender(e, t, r, n, a, o) {
9645
- const s = this.uniforms.frame.value % 16, c = to[s], l = (c.x - 0.5) * 4, d = (c.y - 0.5) * 4;
9646
+ const s = this.uniforms.frame.value % 16, c = ro[s], l = (c.x - 0.5) * 4, d = (c.y - 0.5) * 4;
9646
9647
  this.uniforms.jitterOffset.value.set(l, d);
9647
9648
  }
9648
9649
  };
9649
- ao([
9650
+ oo([
9650
9651
  y("TEMPORAL_UPSCALE")
9651
- ], rn.prototype, "temporalUpscale");
9652
- ao([
9652
+ ], nn.prototype, "temporalUpscale");
9653
+ oo([
9653
9654
  y("SHADOW_LENGTH")
9654
- ], rn.prototype, "shadowLength");
9655
- class oo extends sa {
9655
+ ], nn.prototype, "shadowLength");
9656
+ class so extends ca {
9656
9657
  constructor(e, t) {
9657
- super(e), this._mainCamera = new wr();
9658
+ super(e), this._mainCamera = new Rr();
9658
9659
  const { shadow: r } = t;
9659
9660
  this.shadow = r;
9660
9661
  }
@@ -9665,8 +9666,8 @@ class oo extends sa {
9665
9666
  this._mainCamera = e;
9666
9667
  }
9667
9668
  }
9668
- function ti(i, { depthVelocity: e, shadowLength: t }) {
9669
- const r = new Mt(1, 1, {
9669
+ function ri(i, { depthVelocity: e, shadowLength: t }) {
9670
+ const r = new Ut(1, 1, {
9670
9671
  depthBuffer: !1,
9671
9672
  type: K
9672
9673
  });
@@ -9674,12 +9675,12 @@ function ti(i, { depthVelocity: e, shadowLength: t }) {
9674
9675
  let n;
9675
9676
  e && (n = r.texture.clone(), n.isRenderTargetTexture = !0, r.depthVelocity = n, r.textures.push(n));
9676
9677
  let a;
9677
- return t && (a = r.texture.clone(), a.isRenderTargetTexture = !0, a.format = Lt, r.shadowLength = a, r.textures.push(a)), Object.assign(r, {
9678
+ return t && (a = r.texture.clone(), a.isRenderTargetTexture = !0, a.format = Mt, r.shadowLength = a, r.textures.push(a)), Object.assign(r, {
9678
9679
  depthVelocity: n ?? null,
9679
9680
  shadowLength: a ?? null
9680
9681
  });
9681
9682
  }
9682
- class Rl extends oo {
9683
+ class Rl extends so {
9683
9684
  constructor({
9684
9685
  parameterUniforms: e,
9685
9686
  layerUniforms: t,
@@ -9693,7 +9694,7 @@ class Rl extends oo {
9693
9694
  atmosphereUniforms: r
9694
9695
  },
9695
9696
  a
9696
- ), this.currentPass = new st(this.currentMaterial), this.resolveMaterial = new rn(), this.resolvePass = new st(this.resolveMaterial), this.initRenderTargets({
9697
+ ), this.currentPass = new st(this.currentMaterial), this.resolveMaterial = new nn(), this.resolvePass = new st(this.resolveMaterial), this.initRenderTargets({
9697
9698
  depthVelocity: !0,
9698
9699
  shadowLength: _.lightShafts
9699
9700
  });
@@ -9706,10 +9707,10 @@ class Rl extends oo {
9706
9707
  }
9707
9708
  initRenderTargets(e) {
9708
9709
  this.currentRenderTarget?.dispose(), this.resolveRenderTarget?.dispose(), this.historyRenderTarget?.dispose();
9709
- const t = ti("Clouds", e), r = ti("Clouds.A", {
9710
+ const t = ri("Clouds", e), r = ri("Clouds.A", {
9710
9711
  ...e,
9711
9712
  depthVelocity: !1
9712
- }), n = ti("Clouds.B", {
9713
+ }), n = ri("Clouds.B", {
9713
9714
  ...e,
9714
9715
  depthVelocity: !1
9715
9716
  });
@@ -9799,7 +9800,7 @@ function Al(i, e) {
9799
9800
  ), n.push(r.COLOR_ATTACHMENT0 + a);
9800
9801
  r.drawBuffers(n);
9801
9802
  }
9802
- class ea extends st {
9803
+ class ta extends st {
9803
9804
  render(e, t, r, n, a) {
9804
9805
  const o = this.fullscreenMaterial.uniforms;
9805
9806
  t !== null && o?.[this.input] != null && (o[this.input].value = t.texture), Al(e, r), e.render(this.scene, this.camera);
@@ -10115,7 +10116,7 @@ var Dl = Object.defineProperty, xt = (i, e, t, r) => {
10115
10116
  (o = i[a]) && (n = o(e, t, n) || n);
10116
10117
  return n && Dl(e, t, n), n;
10117
10118
  };
10118
- let Be = class extends Ht {
10119
+ let Be = class extends Ft {
10119
10120
  constructor({
10120
10121
  parameterUniforms: e,
10121
10122
  layerUniforms: t,
@@ -10125,16 +10126,16 @@ let Be = class extends Ht {
10125
10126
  name: "ShadowMaterial",
10126
10127
  glslVersion: Fe,
10127
10128
  vertexShader: Il,
10128
- fragmentShader: Wt(
10129
+ fragmentShader: kt(
10129
10130
  k(Cl, {
10130
10131
  core: {
10131
- math: qi,
10132
- raySphereIntersection: Dr
10132
+ math: Zi,
10133
+ raySphereIntersection: Or
10133
10134
  },
10134
- types: Li,
10135
- parameters: io,
10135
+ types: Mi,
10136
+ parameters: no,
10136
10137
  structuredSampling: Nl,
10137
- clouds: ro
10138
+ clouds: io
10138
10139
  })
10139
10140
  ),
10140
10141
  uniforms: {
@@ -10173,7 +10174,7 @@ let Be = class extends Ht {
10173
10174
  }
10174
10175
  };
10175
10176
  xt([
10176
- Pa("LOCAL_WEATHER_CHANNELS", {
10177
+ La("LOCAL_WEATHER_CHANNELS", {
10177
10178
  validate: (i) => /^[rgba]{4}$/.test(i)
10178
10179
  })
10179
10180
  ], Be.prototype, "localWeatherChannels");
@@ -10284,7 +10285,7 @@ var Pl = Object.defineProperty, Ll = (i, e, t, r) => {
10284
10285
  (o = i[a]) && (n = o(e, t, n) || n);
10285
10286
  return n && Pl(e, t, n), n;
10286
10287
  };
10287
- class so extends Ht {
10288
+ class co extends Ft {
10288
10289
  constructor({
10289
10290
  inputBuffer: e = null,
10290
10291
  historyBuffer: t = null
@@ -10293,9 +10294,9 @@ class so extends Ht {
10293
10294
  name: "ShadowResolveMaterial",
10294
10295
  glslVersion: Fe,
10295
10296
  vertexShader: bl,
10296
- fragmentShader: Wt(
10297
+ fragmentShader: kt(
10297
10298
  k(Ol, {
10298
- varianceClipping: no
10299
+ varianceClipping: ao
10299
10300
  })
10300
10301
  ),
10301
10302
  uniforms: {
@@ -10318,14 +10319,14 @@ class so extends Ht {
10318
10319
  }
10319
10320
  Ll([
10320
10321
  Ge("CASCADE_COUNT", { min: 1, max: 4 })
10321
- ], so.prototype, "cascadeCount");
10322
- function ri(i) {
10323
- const e = new Oo(1, 1, 1, {
10322
+ ], co.prototype, "cascadeCount");
10323
+ function ii(i) {
10324
+ const e = new bo(1, 1, 1, {
10324
10325
  depthBuffer: !1
10325
10326
  });
10326
10327
  return e.texture.type = K, e.texture.minFilter = q, e.texture.magFilter = q, e.texture.name = i, e;
10327
10328
  }
10328
- class Ml extends oo {
10329
+ class Ml extends so {
10329
10330
  constructor({
10330
10331
  parameterUniforms: e,
10331
10332
  layerUniforms: t,
@@ -10336,14 +10337,14 @@ class Ml extends oo {
10336
10337
  parameterUniforms: e,
10337
10338
  layerUniforms: t,
10338
10339
  atmosphereUniforms: r
10339
- }), this.currentPass = new ea(this.currentMaterial), this.resolveMaterial = new so(), this.resolvePass = new ea(this.resolveMaterial), this.initRenderTargets();
10340
+ }), this.currentPass = new ta(this.currentMaterial), this.resolveMaterial = new co(), this.resolvePass = new ta(this.resolveMaterial), this.initRenderTargets();
10340
10341
  }
10341
10342
  initialize(e, t, r) {
10342
10343
  this.currentPass.initialize(e, t, r), this.resolvePass.initialize(e, t, r);
10343
10344
  }
10344
10345
  initRenderTargets() {
10345
10346
  this.currentRenderTarget?.dispose(), this.resolveRenderTarget?.dispose(), this.historyRenderTarget?.dispose();
10346
- const e = ri("Shadow"), t = this.temporalPass ? ri("Shadow.A") : null, r = this.temporalPass ? ri("Shadow.B") : null;
10347
+ const e = ii("Shadow"), t = this.temporalPass ? ii("Shadow.A") : null, r = this.temporalPass ? ii("Shadow.B") : null;
10347
10348
  this.currentRenderTarget = e, this.resolveRenderTarget = t, this.historyRenderTarget = r;
10348
10349
  const n = this.resolveMaterial.uniforms;
10349
10350
  n.inputBuffer.value = e.texture, n.historyBuffer.value = r?.texture ?? null;
@@ -10434,7 +10435,7 @@ function Hl() {
10434
10435
  })
10435
10436
  };
10436
10437
  }
10437
- const ii = [0, 0, 0, 0];
10438
+ const ni = [0, 0, 0, 0];
10438
10439
  function Fl(i, e) {
10439
10440
  e.packValues("altitude", i.minLayerHeights.value), e.packSums("altitude", "height", i.maxLayerHeights.value), e.packIntervalHeights(
10440
10441
  i.minIntervalHeights.value,
@@ -10443,12 +10444,12 @@ function Fl(i, e) {
10443
10444
  const t = i.densityProfile.value;
10444
10445
  e.packDensityProfiles("expTerm", t.expTerms), e.packDensityProfiles("exponent", t.exponents), e.packDensityProfiles("linearTerm", t.linearTerms), e.packDensityProfiles("constantTerm", t.constantTerms);
10445
10446
  let r = 1 / 0, n = 0, a = 1 / 0, o = 0;
10446
- ii.fill(0);
10447
+ ni.fill(0);
10447
10448
  for (let s = 0; s < e.length; ++s) {
10448
10449
  const { altitude: c, height: l, shadow: d } = e[s], h = c + l;
10449
- l > 0 && (c < r && (r = c), d && c < a && (a = c), h > n && (n = h), d && h > o && (o = h)), ii[s] = d ? 1 : 0;
10450
+ l > 0 && (c < r && (r = c), d && c < a && (a = c), h > n && (n = h), d && h > o && (o = h)), ni[s] = d ? 1 : 0;
10450
10451
  }
10451
- r !== 1 / 0 ? (i.minHeight.value = r, i.maxHeight.value = n) : (Ce(n === 0), i.minHeight.value = 0), a !== 1 / 0 ? (i.shadowBottomHeight.value = a, i.shadowTopHeight.value = o) : (Ce(o === 0), i.shadowBottomHeight.value = 0), i.shadowLayerMask.value.fromArray(ii);
10452
+ r !== 1 / 0 ? (i.minHeight.value = r, i.maxHeight.value = n) : (Ce(n === 0), i.minHeight.value = 0), a !== 1 / 0 ? (i.shadowBottomHeight.value = a, i.shadowTopHeight.value = o) : (Ce(o === 0), i.shadowBottomHeight.value = 0), i.shadowLayerMask.value.fromArray(ni);
10452
10453
  }
10453
10454
  function Gl(i, e) {
10454
10455
  return {
@@ -10477,7 +10478,7 @@ var Bl = Object.defineProperty, Wl = (i, e, t, r) => {
10477
10478
  (o = i[a]) && (n = o(e, t, n) || n);
10478
10479
  return n && Bl(e, t, n), n;
10479
10480
  };
10480
- const Rt = /* @__PURE__ */ new p(), kl = /* @__PURE__ */ new D(), Vl = /* @__PURE__ */ new Le(), $l = [
10481
+ const At = /* @__PURE__ */ new p(), kl = /* @__PURE__ */ new D(), Vl = /* @__PURE__ */ new Le(), $l = [
10481
10482
  "maxIterationCount",
10482
10483
  "minStepSize",
10483
10484
  "maxStepSize",
@@ -10528,12 +10529,12 @@ const Rt = /* @__PURE__ */ new p(), kl = /* @__PURE__ */ new D(), Vl = /* @__PUR
10528
10529
  width: ct.AUTO_SIZE,
10529
10530
  height: ct.AUTO_SIZE
10530
10531
  };
10531
- class co extends pt {
10532
- constructor(e = new wr(), t, r = De.DEFAULT) {
10532
+ class uo extends pt {
10533
+ constructor(e = new Rr(), t, r = De.DEFAULT) {
10533
10534
  super("CloudsEffect", zl, {
10534
- attributes: Gt.DEPTH,
10535
+ attributes: zt.DEPTH,
10535
10536
  uniforms: /* @__PURE__ */ new Map([["cloudsBuffer", new u(null)]])
10536
- }), this.camera = e, this.atmosphere = r, this.cloudLayers = al.DEFAULT.clone(), this.correctAltitude = !0, this.localWeatherRepeat = new D().setScalar(100), this.localWeatherOffset = new D(), this.shapeRepeat = new p().setScalar(3e-4), this.shapeOffset = new p(), this.shapeDetailRepeat = new p().setScalar(6e-3), this.shapeDetailOffset = new p(), this.turbulenceRepeat = new D().setScalar(20), this.worldToECEFMatrix = new T(), this.ecefToWorldMatrix = new T(), this.altitudeCorrection = new p(), this.sunDirection = new p(), this.localWeatherVelocity = new D(), this.shapeVelocity = new p(), this.shapeDetailVelocity = new p(), this._atmosphereOverlay = null, this._atmosphereShadow = null, this._atmosphereShadowLength = null, this.events = new No(), this.frame = 0, this.shadowCascadeCount = 0, this.shadowMapSize = new D(), this.onResolutionChange = () => {
10537
+ }), this.camera = e, this.atmosphere = r, this.cloudLayers = al.DEFAULT.clone(), this.correctAltitude = !0, this.localWeatherRepeat = new D().setScalar(100), this.localWeatherOffset = new D(), this.shapeRepeat = new p().setScalar(3e-4), this.shapeOffset = new p(), this.shapeDetailRepeat = new p().setScalar(6e-3), this.shapeDetailOffset = new p(), this.turbulenceRepeat = new D().setScalar(20), this.worldToECEFMatrix = new T(), this.ecefToWorldMatrix = new T(), this.altitudeCorrection = new p(), this.sunDirection = new p(), this.localWeatherVelocity = new D(), this.shapeVelocity = new p(), this.shapeDetailVelocity = new p(), this._atmosphereOverlay = null, this._atmosphereShadow = null, this._atmosphereShadowLength = null, this.events = new Do(), this.frame = 0, this.shadowCascadeCount = 0, this.shadowMapSize = new D(), this.onResolutionChange = () => {
10537
10538
  this.setSize(this.resolution.baseWidth, this.resolution.baseHeight);
10538
10539
  }, this.skipRendering = !0;
10539
10540
  const {
@@ -10574,16 +10575,16 @@ class co extends pt {
10574
10575
  layerUniforms: this.layerUniforms,
10575
10576
  atmosphereUniforms: this.atmosphereUniforms
10576
10577
  };
10577
- this.shadowPass = new Ml(l), this.shadowPass.mainCamera = e, this.cloudsPass = new Rl(l, r), this.cloudsPass.mainCamera = e, this.clouds = Ln(
10578
- Mn(
10578
+ this.shadowPass = new Ml(l), this.shadowPass.mainCamera = e, this.cloudsPass = new Rl(l, r), this.cloudsPass.mainCamera = e, this.clouds = Mn(
10579
+ Un(
10579
10580
  {},
10580
10581
  this.cloudsPass.currentMaterial,
10581
10582
  $l
10582
10583
  ),
10583
10584
  this.cloudsPass.currentMaterial,
10584
10585
  jl
10585
- ), this.shadow = Ln(
10586
- Mn(
10586
+ ), this.shadow = Mn(
10587
+ Un(
10587
10588
  {},
10588
10589
  this.shadowPass.currentMaterial,
10589
10590
  Yl
@@ -10616,14 +10617,14 @@ class co extends pt {
10616
10617
  t.localWeatherOffset.value.add(
10617
10618
  kl.copy(this.localWeatherVelocity).multiplyScalar(e)
10618
10619
  ), t.shapeOffset.value.add(
10619
- Rt.copy(this.shapeVelocity).multiplyScalar(e)
10620
+ At.copy(this.shapeVelocity).multiplyScalar(e)
10620
10621
  ), t.shapeDetailOffset.value.add(
10621
- Rt.copy(this.shapeDetailVelocity).multiplyScalar(e)
10622
+ At.copy(this.shapeDetailVelocity).multiplyScalar(e)
10622
10623
  );
10623
10624
  const r = this.worldToECEFMatrix;
10624
10625
  this.ecefToWorldMatrix.copy(r).invert();
10625
- const n = this.camera.getWorldPosition(Rt).applyMatrix4(this.worldToECEFMatrix), a = this.altitudeCorrection;
10626
- this.correctAltitude ? Mr(
10626
+ const n = this.camera.getWorldPosition(At).applyMatrix4(this.worldToECEFMatrix), a = this.altitudeCorrection;
10627
+ this.correctAltitude ? Ur(
10627
10628
  n,
10628
10629
  this.atmosphere.bottomRadius,
10629
10630
  this.ellipsoid,
@@ -10631,11 +10632,11 @@ class co extends pt {
10631
10632
  ) : a.setScalar(0);
10632
10633
  const o = this.ellipsoid.getSurfaceNormal(
10633
10634
  n,
10634
- Rt
10635
- ), s = this.sunDirection.dot(o), c = ba(1e6, 1e3, s), l = Vl.setFromMatrix4(r).transpose();
10635
+ At
10636
+ ), s = this.sunDirection.dot(o), c = Pa(1e6, 1e3, s), l = Vl.setFromMatrix4(r).transpose();
10636
10637
  this.shadowMaps.update(
10637
10638
  this.camera,
10638
- Rt.copy(this.sunDirection).applyMatrix3(l),
10639
+ At.copy(this.sunDirection).applyMatrix3(l),
10639
10640
  c
10640
10641
  );
10641
10642
  }
@@ -10691,25 +10692,25 @@ class co extends pt {
10691
10692
  return this.proceduralLocalWeather ?? this.parameterUniforms.localWeatherTexture.value;
10692
10693
  }
10693
10694
  set localWeatherTexture(e) {
10694
- e instanceof dn || e == null ? (this.proceduralLocalWeather = void 0, this.parameterUniforms.localWeatherTexture.value = e) : (this.proceduralLocalWeather = e, this.parameterUniforms.localWeatherTexture.value = e.texture);
10695
+ e instanceof hn || e == null ? (this.proceduralLocalWeather = void 0, this.parameterUniforms.localWeatherTexture.value = e) : (this.proceduralLocalWeather = e, this.parameterUniforms.localWeatherTexture.value = e.texture);
10695
10696
  }
10696
10697
  get shapeTexture() {
10697
10698
  return this.proceduralShape ?? this.parameterUniforms.shapeTexture.value;
10698
10699
  }
10699
10700
  set shapeTexture(e) {
10700
- e instanceof Pt || e == null ? (this.proceduralShape = void 0, this.parameterUniforms.shapeTexture.value = e) : (this.proceduralShape = e, this.parameterUniforms.shapeTexture.value = e.texture);
10701
+ e instanceof Lt || e == null ? (this.proceduralShape = void 0, this.parameterUniforms.shapeTexture.value = e) : (this.proceduralShape = e, this.parameterUniforms.shapeTexture.value = e.texture);
10701
10702
  }
10702
10703
  get shapeDetailTexture() {
10703
10704
  return this.proceduralShapeDetail ?? this.parameterUniforms.shapeDetailTexture.value;
10704
10705
  }
10705
10706
  set shapeDetailTexture(e) {
10706
- e instanceof Pt || e == null ? (this.proceduralShapeDetail = void 0, this.parameterUniforms.shapeDetailTexture.value = e) : (this.proceduralShapeDetail = e, this.parameterUniforms.shapeDetailTexture.value = e.texture);
10707
+ e instanceof Lt || e == null ? (this.proceduralShapeDetail = void 0, this.parameterUniforms.shapeDetailTexture.value = e) : (this.proceduralShapeDetail = e, this.parameterUniforms.shapeDetailTexture.value = e.texture);
10707
10708
  }
10708
10709
  get turbulenceTexture() {
10709
10710
  return this.proceduralTurbulence ?? this.parameterUniforms.turbulenceTexture.value;
10710
10711
  }
10711
10712
  set turbulenceTexture(e) {
10712
- e instanceof dn || e == null ? (this.proceduralTurbulence = void 0, this.parameterUniforms.turbulenceTexture.value = e) : (this.proceduralTurbulence = e, this.parameterUniforms.turbulenceTexture.value = e.texture);
10713
+ e instanceof hn || e == null ? (this.proceduralTurbulence = void 0, this.parameterUniforms.turbulenceTexture.value = e) : (this.proceduralTurbulence = e, this.parameterUniforms.turbulenceTexture.value = e.texture);
10713
10714
  }
10714
10715
  get stbnTexture() {
10715
10716
  return this.cloudsPass.currentMaterial.uniforms.stbnTexture.value;
@@ -10878,8 +10879,8 @@ class co extends pt {
10878
10879
  }
10879
10880
  Wl([
10880
10881
  y("SKIP_RENDERING")
10881
- ], co.prototype, "skipRendering");
10882
- const ni = 128, ai = 32, Jl = `#include "core/depth"
10882
+ ], uo.prototype, "skipRendering");
10883
+ const ai = 128, oi = 32, Jl = `#include "core/depth"
10883
10884
  #include "core/turbo"
10884
10885
 
10885
10886
  uniform float near;
@@ -10905,7 +10906,7 @@ var Ql = Object.defineProperty, ed = (i, e, t, r) => {
10905
10906
  return n && Ql(e, t, n), n;
10906
10907
  };
10907
10908
  const td = {
10908
- blendFunction: Ft.SRC,
10909
+ blendFunction: Gt.SRC,
10909
10910
  useTurbo: !1,
10910
10911
  near: 1,
10911
10912
  far: 1e3
@@ -10919,11 +10920,11 @@ class rd extends pt {
10919
10920
  super(
10920
10921
  "DepthEffect",
10921
10922
  k(Jl, {
10922
- core: { depth: kt, turbo: Zi }
10923
+ core: { depth: Vt, turbo: Ki }
10923
10924
  }),
10924
10925
  {
10925
10926
  blendFunction: t,
10926
- attributes: Gt.DEPTH,
10927
+ attributes: zt.DEPTH,
10927
10928
  uniforms: new Map(
10928
10929
  Object.entries({
10929
10930
  near: new u(n),
@@ -10957,7 +10958,7 @@ void mainImage(const vec4 inputColor, const vec2 uv, out vec4 outputColor) {
10957
10958
  outputColor = vec4(saturate(dithering(inputColor.rgb)), inputColor.a);
10958
10959
  }
10959
10960
  `, nd = {
10960
- blendFunction: Ft.NORMAL
10961
+ blendFunction: Gt.NORMAL
10961
10962
  };
10962
10963
  class ad extends pt {
10963
10964
  constructor(e) {
@@ -11086,7 +11087,7 @@ void main() {
11086
11087
  thresholdLevel: 10,
11087
11088
  thresholdRange: 1
11088
11089
  };
11089
- class ud extends oa {
11090
+ class ud extends sa {
11090
11091
  constructor(e) {
11091
11092
  const {
11092
11093
  inputBuffer: t = null,
@@ -11101,7 +11102,7 @@ class ud extends oa {
11101
11102
  name: "DownsampleThresholdMaterial",
11102
11103
  fragmentShader: od,
11103
11104
  vertexShader: sd,
11104
- blending: Fi,
11105
+ blending: Gi,
11105
11106
  toneMapped: !1,
11106
11107
  depthWrite: !1,
11107
11108
  depthTest: !1,
@@ -11225,7 +11226,7 @@ void main() {
11225
11226
  haloAmount: 1e-3,
11226
11227
  chromaticAberration: 10
11227
11228
  };
11228
- class md extends oa {
11229
+ class md extends sa {
11229
11230
  constructor(e) {
11230
11231
  const {
11231
11232
  inputBuffer: t = null,
@@ -11241,7 +11242,7 @@ class md extends oa {
11241
11242
  name: "LensFlareFeaturesMaterial",
11242
11243
  fragmentShader: ld,
11243
11244
  vertexShader: dd,
11244
- blending: Fi,
11245
+ blending: Gi,
11245
11246
  toneMapped: !1,
11246
11247
  depthWrite: !1,
11247
11248
  depthTest: !1,
@@ -11293,7 +11294,7 @@ void mainImage(const vec4 inputColor, const vec2 uv, out vec4 outputColor) {
11293
11294
  outputColor = vec4(inputColor.rgb + (bloom + features) * intensity, inputColor.a);
11294
11295
  }
11295
11296
  `, fd = {
11296
- blendFunction: Ft.NORMAL,
11297
+ blendFunction: Gt.NORMAL,
11297
11298
  resolutionScale: 0.5,
11298
11299
  width: ct.AUTO_SIZE,
11299
11300
  height: ct.AUTO_SIZE,
@@ -11315,7 +11316,7 @@ class gd extends pt {
11315
11316
  };
11316
11317
  super("LensFlareEffect", pd, {
11317
11318
  blendFunction: t,
11318
- attributes: Gt.CONVOLUTION,
11319
+ attributes: zt.CONVOLUTION,
11319
11320
  uniforms: new Map(
11320
11321
  Object.entries({
11321
11322
  bloomBuffer: new u(null),
@@ -11325,10 +11326,10 @@ class gd extends pt {
11325
11326
  )
11326
11327
  }), this.onResolutionChange = () => {
11327
11328
  this.setSize(this.resolution.baseWidth, this.resolution.baseHeight);
11328
- }, this.renderTarget1 = new Mt(1, 1, {
11329
+ }, this.renderTarget1 = new Ut(1, 1, {
11329
11330
  depthBuffer: !1,
11330
11331
  type: K
11331
- }), this.renderTarget1.texture.name = "LensFlare.Target1", this.renderTarget2 = new Mt(1, 1, {
11332
+ }), this.renderTarget1.texture.name = "LensFlare.Target1", this.renderTarget2 = new Ut(1, 1, {
11332
11333
  depthBuffer: !1,
11333
11334
  type: K
11334
11335
  }), this.renderTarget2.texture.name = "LensFlare.Target2", this.thresholdMaterial = new ud(), this.thresholdPass = new st(this.thresholdMaterial), this.blurPass = new Bo(), this.blurPass.levels = 8, this.preBlurPass = new Wo({
@@ -11413,17 +11414,17 @@ void mainImage(const vec4 inputColor, const vec2 uv, out vec4 outputColor) {
11413
11414
  outputColor = vec4(normal * 0.5 + 0.5, inputColor.a);
11414
11415
  }
11415
11416
  `;
11416
- var _d = Object.defineProperty, uo = (i, e, t, r) => {
11417
+ var _d = Object.defineProperty, lo = (i, e, t, r) => {
11417
11418
  for (var n = void 0, a = i.length - 1, o; a >= 0; a--)
11418
11419
  (o = i[a]) && (n = o(e, t, n) || n);
11419
11420
  return n && _d(e, t, n), n;
11420
11421
  };
11421
11422
  const Sd = {
11422
- blendFunction: Ft.SRC,
11423
+ blendFunction: Gt.SRC,
11423
11424
  octEncoded: !1,
11424
11425
  reconstructFromDepth: !1
11425
11426
  };
11426
- class lo extends pt {
11427
+ class ho extends pt {
11427
11428
  constructor(e, t) {
11428
11429
  const {
11429
11430
  blendFunction: r,
@@ -11438,14 +11439,14 @@ class lo extends pt {
11438
11439
  "NormalEffect",
11439
11440
  k(vd, {
11440
11441
  core: {
11441
- depth: kt,
11442
- packing: Ua,
11443
- transform: Ha
11442
+ depth: Vt,
11443
+ packing: Ha,
11444
+ transform: Fa
11444
11445
  }
11445
11446
  }),
11446
11447
  {
11447
11448
  blendFunction: r,
11448
- attributes: Gt.DEPTH,
11449
+ attributes: zt.DEPTH,
11449
11450
  uniforms: new Map(
11450
11451
  Object.entries({
11451
11452
  normalBuffer: new u(n),
@@ -11473,19 +11474,19 @@ class lo extends pt {
11473
11474
  this.uniforms.get("normalBuffer").value = e;
11474
11475
  }
11475
11476
  }
11476
- uo([
11477
+ lo([
11477
11478
  y("OCT_ENCODED")
11478
- ], lo.prototype, "octEncoded");
11479
- uo([
11479
+ ], ho.prototype, "octEncoded");
11480
+ lo([
11480
11481
  y("RECONSTRUCT_FROM_DEPTH")
11481
- ], lo.prototype, "reconstructFromDepth");
11482
- const ta = new Gi(), ra = new p(), Mi = 10, Td = new bo();
11483
- Td.enable(Mi);
11484
- class Md {
11482
+ ], ho.prototype, "reconstructFromDepth");
11483
+ const ra = new zi(), ia = new p(), Ui = 10, Td = new Po();
11484
+ Td.enable(Ui);
11485
+ class Ud {
11485
11486
  constructor(e) {
11486
11487
  this.ssp = e;
11487
11488
  const { viewport: { scene: t, camera: r, renderer: n } } = e;
11488
- this.date.setHours(10, 0, 0, 0), this.texturesGenerator = new Uu(n), this.arrayBufferLoader = new ua(), this.skyMaterial = new Fr(), this.skyMesh = new na(new aa(2, 2), this.skyMaterial), this.skyMesh.frustumCulled = !1, this.skyLight = new ku(), this.sunLight = new tl(), this.sunLight.shadow.autoUpdate = !1, this.sunLight.shadow.bias = -5e-4, this.sunLight.shadow.normalBias = 0.5, this.sunLight.shadow.camera.near = 0.01, this.sunLight.shadow.mapSize.width = n.capabilities.maxTextureSize, this.sunLight.shadow.mapSize.height = n.capabilities.maxTextureSize, this.aerialPerspectiveEffect = new Z(r), this.aerialPerspective = { effect: this.aerialPerspectiveEffect, enabled: !1 }, this.lensFlareEffect = new gd(), this.lensFlare = { effect: this.lensFlareEffect, enabled: !1 }, this.ditheringEffect = new ad(), this.dithering = { effect: this.ditheringEffect, enabled: !1 }, this.lightingMaskPass = new Au(t, r), this.lightingMaskPass.selectionLayer = Mi, this.cubeRenderTarget = new Po(512, { type: K }), this.cubeCamera = new Lo(0.1, 1e3, this.cubeRenderTarget), this.cloudsEffect = new co(r), this.cloudsEffect.coverage = this.cloudCoverage, this.cloudsEffect.qualityPreset = this.cloudQuality, this.cloudsEffect.localWeatherVelocity.set(1e-3, 0), this.cloudsEffect.events.addEventListener("change", this.onCloudsChange), this.clouds = { effect: this.cloudsEffect, enabled: !1 };
11489
+ this.date.setHours(10, 0, 0, 0), this.texturesGenerator = new Uu(n), this.arrayBufferLoader = yt.utils.configureRequestLoader(new la()), this.skyMaterial = new Gr(), this.skyMesh = new aa(new oa(2, 2), this.skyMaterial), this.skyMesh.frustumCulled = !1, this.skyLight = new ku(), this.sunLight = new tl(), this.sunLight.shadow.autoUpdate = !1, this.sunLight.shadow.bias = -5e-4, this.sunLight.shadow.normalBias = 0.5, this.sunLight.shadow.camera.near = 0.01, this.sunLight.shadow.mapSize.width = n.capabilities.maxTextureSize, this.sunLight.shadow.mapSize.height = n.capabilities.maxTextureSize, this.aerialPerspectiveEffect = new Z(r), this.aerialPerspective = { effect: this.aerialPerspectiveEffect, enabled: !1 }, this.lensFlareEffect = new gd(), this.lensFlare = { effect: this.lensFlareEffect, enabled: !1 }, this.ditheringEffect = new ad(), this.dithering = { effect: this.ditheringEffect, enabled: !1 }, this.lightingMaskPass = new Au(t, r), this.lightingMaskPass.selectionLayer = Ui, this.cubeRenderTarget = new Lo(512, { type: K }), this.cubeCamera = new Mo(0.1, 1e3, this.cubeRenderTarget), this.cloudsEffect = new uo(r), this.cloudsEffect.coverage = this.cloudCoverage, this.cloudsEffect.qualityPreset = this.cloudQuality, this.cloudsEffect.localWeatherVelocity.set(1e-3, 0), this.cloudsEffect.events.addEventListener("change", this.onCloudsChange), this.clouds = { effect: this.cloudsEffect, enabled: !1 };
11489
11490
  }
11490
11491
  cacheKey = "";
11491
11492
  date = /* @__PURE__ */ new Date();
@@ -11541,7 +11542,7 @@ class Md {
11541
11542
  };
11542
11543
  update = () => {
11543
11544
  const { date: e, longitude: t, latitude: r, altitude: n, distance: a, target: o, ground: s, groundAlbedo: c, castShadow: l, skyMaterial: d, skyLight: h, sunLight: f, aerialPerspectiveEffect: v, cloudsEffect: g } = this, { inertialToECEFMatrix: S, sunDirection: E, moonDirection: C, worldToECEFMatrix: O } = this.atmosphereProps, { ssp: { viewport: { renderer: U } } } = this;
11544
- hu(e, S), mu(e, E).applyMatrix4(S), pu(e, C).applyMatrix4(S), ta.set(vi(t), vi(r), n), ta.toECEF(ra), Ne.WGS84.getNorthUpEastFrame(ra, O), d.ground = s, d.groundAlbedo.set(c), d.sunDirection.copy(E), d.moonDirection.copy(C), d.worldToECEFMatrix.copy(O), h.sunDirection.copy(E), h.worldToECEFMatrix.copy(O), h.position.copy(o), f.castShadow = l, f.distance = a, f.shadow.camera.top = a, f.shadow.camera.bottom = -a, f.shadow.camera.left = -a, f.shadow.camera.right = a, f.shadow.camera.far = a * 2, f.sunDirection.copy(E), f.worldToECEFMatrix.copy(O), f.target.position.copy(o), v.sunDirection.copy(E), v.moonDirection.copy(C), v.worldToECEFMatrix.copy(O), g.sunDirection.copy(E), g.worldToECEFMatrix.copy(O);
11545
+ hu(e, S), mu(e, E).applyMatrix4(S), pu(e, C).applyMatrix4(S), ra.set(_i(t), _i(r), n), ra.toECEF(ia), Ne.WGS84.getNorthUpEastFrame(ia, O), d.ground = s, d.groundAlbedo.set(c), d.sunDirection.copy(E), d.moonDirection.copy(C), d.worldToECEFMatrix.copy(O), h.sunDirection.copy(E), h.worldToECEFMatrix.copy(O), h.position.copy(o), f.castShadow = l, f.distance = a, f.shadow.camera.top = a, f.shadow.camera.bottom = -a, f.shadow.camera.left = -a, f.shadow.camera.right = a, f.shadow.camera.far = a * 2, f.sunDirection.copy(E), f.worldToECEFMatrix.copy(O), f.target.position.copy(o), v.sunDirection.copy(E), v.moonDirection.copy(C), v.worldToECEFMatrix.copy(O), g.sunDirection.copy(E), g.worldToECEFMatrix.copy(O);
11545
11546
  const b = this.getCacheKey();
11546
11547
  b !== this.cacheKey && (this.cacheKey = b, l && (f.shadow.needsUpdate = !0, f.shadow.camera.updateProjectionMatrix()), this.skyMesh.material.sun = !1, this.cubeCamera.update(U, this.skyMesh), this.skyMesh.material.sun = !0, h.update(), f.update());
11547
11548
  };
@@ -11565,34 +11566,34 @@ class Md {
11565
11566
  }
11566
11567
  updateModelLightingMask() {
11567
11568
  this._started && this.ssp.viewport.scener.intersectsList.meshOfModelList.forEach((e) => {
11568
- e.layers.enable(Mi);
11569
+ e.layers.enable(Ui);
11569
11570
  });
11570
11571
  }
11571
11572
  loadCloudTextures(e) {
11572
11573
  if (!this._started) return;
11573
- const t = new Mo(), r = new gi(Pt, _i, {
11574
- width: ni,
11575
- height: ni,
11576
- depth: ni
11577
- }), n = new gi(Pt, _i, {
11574
+ const t = yt.utils.createTextureLoader(), r = yt.utils.configureRequestLoader(new vi(Lt, Si, {
11578
11575
  width: ai,
11579
11576
  height: ai,
11580
11577
  depth: ai
11581
- }), a = new Xs();
11578
+ })), n = yt.utils.configureRequestLoader(new vi(Lt, Si, {
11579
+ width: oi,
11580
+ height: oi,
11581
+ depth: oi
11582
+ })), a = yt.utils.configureRequestLoader(new Xs());
11582
11583
  t.load(
11583
11584
  `${e}/local_weather.png`,
11584
11585
  (o) => {
11585
- o.minFilter = mn, o.magFilter = q, o.wrapS = ne, o.wrapT = ne, o.colorSpace = Ke, o.needsUpdate = !0, this.cloudsEffect.localWeatherTexture = o;
11586
+ o.minFilter = pn, o.magFilter = q, o.wrapS = ne, o.wrapT = ne, o.colorSpace = Ke, o.needsUpdate = !0, this.cloudsEffect.localWeatherTexture = o;
11586
11587
  }
11587
11588
  ), t.load(
11588
11589
  `${e}/turbulence.png`,
11589
11590
  (o) => {
11590
- o.minFilter = mn, o.magFilter = q, o.wrapS = ne, o.wrapT = ne, o.colorSpace = Ke, o.needsUpdate = !0, this.cloudsEffect.turbulenceTexture = o;
11591
+ o.minFilter = pn, o.magFilter = q, o.wrapS = ne, o.wrapT = ne, o.colorSpace = Ke, o.needsUpdate = !0, this.cloudsEffect.turbulenceTexture = o;
11591
11592
  }
11592
11593
  ), r.load(`${e}/shape.bin`, (o) => {
11593
- o.format = Lt, o.minFilter = q, o.magFilter = q, o.wrapS = ne, o.wrapT = ne, o.wrapR = ne, o.colorSpace = Ke, o.needsUpdate = !0, this.cloudsEffect.shapeTexture = o;
11594
+ o.format = Mt, o.minFilter = q, o.magFilter = q, o.wrapS = ne, o.wrapT = ne, o.wrapR = ne, o.colorSpace = Ke, o.needsUpdate = !0, this.cloudsEffect.shapeTexture = o;
11594
11595
  }), n.load(`${e}/shape_detail.bin`, (o) => {
11595
- o.format = Lt, o.minFilter = q, o.magFilter = q, o.wrapS = ne, o.wrapT = ne, o.wrapR = ne, o.colorSpace = Ke, o.needsUpdate = !0, this.cloudsEffect.shapeDetailTexture = o;
11596
+ o.format = Mt, o.minFilter = q, o.magFilter = q, o.wrapS = ne, o.wrapT = ne, o.wrapR = ne, o.colorSpace = Ke, o.needsUpdate = !0, this.cloudsEffect.shapeDetailTexture = o;
11596
11597
  }), a.load(`${e}/stbn.bin`, (o) => {
11597
11598
  this.aerialPerspectiveEffect.stbnTexture = o, this.cloudsEffect.stbnTexture = o;
11598
11599
  });
@@ -11613,5 +11614,5 @@ class Md {
11613
11614
  }
11614
11615
  }
11615
11616
  export {
11616
- Md as default
11617
+ Ud as default
11617
11618
  };