@takram/three-geospatial 0.2.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/build/index.cjs +1 -1
  3. package/build/index.cjs.map +1 -1
  4. package/build/index.js +1311 -1309
  5. package/build/index.js.map +1 -1
  6. package/build/r3f.cjs +1 -1
  7. package/build/r3f.cjs.map +1 -1
  8. package/build/r3f.js +33 -50
  9. package/build/r3f.js.map +1 -1
  10. package/build/shaders.cjs.map +1 -1
  11. package/build/shaders.js.map +1 -1
  12. package/build/shared.cjs +1 -1
  13. package/build/shared.cjs.map +1 -1
  14. package/build/shared.js +116 -97
  15. package/build/shared.js.map +1 -1
  16. package/package.json +2 -3
  17. package/src/DataTextureLoader.ts +134 -0
  18. package/src/EXR3DTextureLoader.ts +66 -0
  19. package/src/{EXR3DLoader.ts → EXRTextureLoader.ts} +25 -12
  20. package/src/Ellipsoid.ts +23 -4
  21. package/src/STBNLoader.ts +28 -13
  22. package/src/TilingScheme.ts +1 -1
  23. package/src/TypedArrayLoader.ts +11 -21
  24. package/src/capabilities.ts +5 -0
  25. package/src/constants.ts +1 -0
  26. package/src/decorators.ts +0 -1
  27. package/src/defineShorthand.ts +1 -1
  28. package/src/index.ts +5 -3
  29. package/src/r3f/EastNorthUpFrame.tsx +14 -11
  30. package/src/r3f/EllipsoidMesh.tsx +16 -15
  31. package/src/r3f/index.ts +1 -1
  32. package/src/r3f/types.ts +1 -1
  33. package/src/typedArrayParsers.ts +1 -1
  34. package/src/types.ts +3 -1
  35. package/types/DataTextureLoader.d.ts +27 -0
  36. package/types/EXR3DTextureLoader.d.ts +11 -0
  37. package/types/EXRTextureLoader.d.ts +10 -0
  38. package/types/Ellipsoid.d.ts +1 -0
  39. package/types/STBNLoader.d.ts +5 -1
  40. package/types/TypedArrayLoader.d.ts +4 -6
  41. package/types/capabilities.d.ts +2 -0
  42. package/types/index.d.ts +5 -3
  43. package/types/r3f/EastNorthUpFrame.d.ts +4 -3
  44. package/types/r3f/EllipsoidMesh.d.ts +2 -1
  45. package/types/r3f/index.d.ts +1 -1
  46. package/types/types.d.ts +2 -1
  47. package/src/DataLoader.ts +0 -164
  48. package/src/Texture3DLoader.ts +0 -81
  49. package/types/DataLoader.d.ts +0 -29
  50. package/types/EXR3DLoader.d.ts +0 -6
  51. package/types/Texture3DLoader.d.ts +0 -4
package/build/index.js CHANGED
@@ -1,26 +1,17 @@
1
- import { Loader as qt, FileLoader as _i, BufferGeometry as bi, BufferAttribute as zr, Box3 as Ni, Vector3 as Re, Sphere as Oi, ByteType as mi, UnsignedByteType as kr, ShortType as Ui, UnsignedShortType as Ci, IntType as Ri, UnsignedIntType as xi, HalfFloatType as lt, FloatType as ft, LinearFilter as zt, RGBAFormat as ln, Data3DTexture as un, DataTexture as Fi, MathUtils as ye, Material as Vt, REVISION as Li, DataTextureLoader as Pi, RedFormat as hn, DataUtils as Zr, Quaternion as Mi, Matrix4 as Di, Ray as Bi, RepeatWrapping as sr, NearestFilter as Hr, Vector2 as fn } from "three";
2
- import { E as Gr, G as st } from "./shared.js";
3
- import { a as oa } from "./shared.js";
4
- var zi = "production" === "production", Wr = "Invariant failed";
5
- function vn(r, e) {
6
- if (!r) {
7
- if (zi)
8
- throw new Error(Wr);
9
- var i = Wr;
10
- throw new Error(i);
11
- }
12
- }
13
- class ki extends qt {
14
- load(e, i, s, o) {
15
- const c = new _i(this.manager);
16
- c.setResponseType("arraybuffer"), c.setRequestHeader(this.requestHeader), c.setPath(this.path), c.setWithCredentials(this.withCredentials), c.load(
1
+ import { Loader as gt, FileLoader as Ei, BufferGeometry as Ti, BufferAttribute as zr, Box3 as Ii, Vector3 as Re, Sphere as _i, LinearFilter as kt, RGBAFormat as cn, ByteType as bi, UnsignedByteType as kr, ShortType as Ni, UnsignedShortType as Oi, IntType as Ui, UnsignedIntType as mi, HalfFloatType as lt, FloatType as ft, MathUtils as ye, Material as Vt, REVISION as Ci, DataTextureLoader as Ri, RedFormat as ln, DataUtils as Zr, Data3DTexture as hn, DataTexture as xi, Quaternion as Fi, Matrix4 as Mi, Ray as Pi, RepeatWrapping as sr, NearestFilter as Hr, Vector2 as un } from "three";
2
+ import { i as fn, E as Gr, G as st } from "./shared.js";
3
+ import { a as jo } from "./shared.js";
4
+ class Bi extends gt {
5
+ load(e, n, s, o) {
6
+ const a = new Ei(this.manager);
7
+ a.setResponseType("arraybuffer"), a.setRequestHeader(this.requestHeader), a.setPath(this.path), a.setWithCredentials(this.withCredentials), a.load(
17
8
  e,
18
9
  (l) => {
19
- vn(l instanceof ArrayBuffer);
10
+ fn(l instanceof ArrayBuffer);
20
11
  try {
21
- i(l);
22
- } catch (v) {
23
- o != null ? o(v) : console.error(v), this.manager.itemError(e);
12
+ n(l);
13
+ } catch (u) {
14
+ o != null ? o(u) : console.error(u), this.manager.itemError(e);
24
15
  }
25
16
  },
26
17
  s,
@@ -28,25 +19,25 @@ class ki extends qt {
28
19
  );
29
20
  }
30
21
  }
31
- function go(r) {
22
+ function uo(r) {
32
23
  }
33
- function So(r) {
34
- var c;
35
- const { attributes: e, index: i, boundingBox: s, boundingSphere: o } = r;
24
+ function fo(r) {
25
+ var a;
26
+ const { attributes: e, index: n, boundingBox: s, boundingSphere: o } = r;
36
27
  return [
37
- { attributes: e, index: i, boundingBox: s, boundingSphere: o },
28
+ { attributes: e, index: n, boundingBox: s, boundingSphere: o },
38
29
  [
39
30
  ...Object.values(r.attributes).map(
40
31
  (l) => l.array.buffer
41
32
  ),
42
- (c = r.index) == null ? void 0 : c.array.buffer
33
+ (a = r.index) == null ? void 0 : a.array.buffer
43
34
  ].filter((l) => l != null)
44
35
  ];
45
36
  }
46
- function To(r, e = new bi()) {
47
- for (const [i, s] of Object.entries(r.attributes))
37
+ function vo(r, e = new Ti()) {
38
+ for (const [n, s] of Object.entries(r.attributes))
48
39
  e.setAttribute(
49
- i,
40
+ n,
50
41
  new zr(
51
42
  s.array,
52
43
  s.itemSize,
@@ -58,26 +49,29 @@ function To(r, e = new bi()) {
58
49
  r.index.itemSize,
59
50
  r.index.normalized
60
51
  ) : null, r.boundingBox != null) {
61
- const { min: i, max: s } = r.boundingBox;
62
- e.boundingBox = new Ni(
63
- new Re(i.x, i.y, i.z),
52
+ const { min: n, max: s } = r.boundingBox;
53
+ e.boundingBox = new Ii(
54
+ new Re(n.x, n.y, n.z),
64
55
  new Re(s.x, s.y, s.z)
65
56
  );
66
57
  }
67
58
  if (r.boundingSphere != null) {
68
- const { center: i, radius: s } = r.boundingSphere;
69
- e.boundingSphere = new Oi(
70
- new Re(i.x, i.y, i.z),
59
+ const { center: n, radius: s } = r.boundingSphere;
60
+ e.boundingSphere = new _i(
61
+ new Re(n.x, n.y, n.z),
71
62
  s
72
63
  );
73
64
  }
74
65
  return e;
75
66
  }
76
- const Zi = 128, Hi = 128, Gi = 64, Wi = "9627216cc50057994c98a2118f3c4a23765d43b9", Eo = `https://media.githubusercontent.com/media/takram-design-engineering/three-geospatial/${Wi}/packages/core/assets/stbn.bin`, Xi = "This is not an object", Yi = "This is not a Float16Array object", Xr = "This constructor is not a subclass of Float16Array", yn = "The constructor property value is not an object", qi = "Species constructor didn't return TypedArray object", Vi = "Derived constructor created TypedArray object which was too small length", vt = "Attempting to access detached ArrayBuffer", yr = "Cannot convert undefined or null to object", pr = "Cannot mix BigInt and other types, use explicit conversions", Yr = "@@iterator property is not callable", qr = "Reduce of empty array with no initial value", Ji = "The comparison function must be either a function or undefined", or = "Offset is out of bounds";
67
+ function yo(r) {
68
+ return r.getContext().getExtension("OES_texture_float_linear") != null;
69
+ }
70
+ const Di = 128, Li = 128, zi = 64, ki = "9627216cc50057994c98a2118f3c4a23765d43b9", po = `https://media.githubusercontent.com/media/takram-design-engineering/three-geospatial/${ki}/packages/core/assets/stbn.bin`, Zi = "This is not an object", Hi = "This is not a Float16Array object", Wr = "This constructor is not a subclass of Float16Array", vn = "The constructor property value is not an object", Gi = "Species constructor didn't return TypedArray object", Wi = "Derived constructor created TypedArray object which was too small length", vt = "Attempting to access detached ArrayBuffer", yr = "Cannot convert undefined or null to object", pr = "Cannot mix BigInt and other types, use explicit conversions", Xr = "@@iterator property is not callable", Yr = "Reduce of empty array with no initial value", Xi = "The comparison function must be either a function or undefined", or = "Offset is out of bounds";
77
71
  function Z(r) {
78
- return (e, ...i) => ie(r, e, i);
72
+ return (e, ...n) => ie(r, e, n);
79
73
  }
80
- function $e(r, e) {
74
+ function Je(r, e) {
81
75
  return Z(
82
76
  Ye(
83
77
  r,
@@ -87,84 +81,84 @@ function $e(r, e) {
87
81
  }
88
82
  const {
89
83
  apply: ie,
90
- construct: ut,
91
- defineProperty: Vr,
84
+ construct: ht,
85
+ defineProperty: qr,
92
86
  get: ar,
93
87
  getOwnPropertyDescriptor: Ye,
94
88
  getPrototypeOf: At,
95
- has: dr,
96
- ownKeys: pn,
97
- set: Jr,
98
- setPrototypeOf: dn
99
- } = Reflect, $i = Proxy, {
100
- EPSILON: Qi,
89
+ has: wr,
90
+ ownKeys: yn,
91
+ set: Vr,
92
+ setPrototypeOf: pn
93
+ } = Reflect, Yi = Proxy, {
94
+ EPSILON: qi,
101
95
  MAX_SAFE_INTEGER: $r,
102
96
  isFinite: wn,
103
97
  isNaN: qe
104
98
  } = Number, {
105
99
  iterator: Ie,
106
- species: ji,
100
+ species: Vi,
107
101
  toStringTag: Ir,
108
- for: Ki
102
+ for: $i
109
103
  } = Symbol, Ve = Object, {
110
- create: Jt,
111
- defineProperty: gt,
112
- freeze: es,
113
- is: Qr
114
- } = Ve, wr = Ve.prototype, ts = (
104
+ create: $t,
105
+ defineProperty: St,
106
+ freeze: Ji,
107
+ is: Jr
108
+ } = Ve, dr = Ve.prototype, Qi = (
115
109
  /** @type {any} */
116
- wr.__lookupGetter__ ? Z(
110
+ dr.__lookupGetter__ ? Z(
117
111
  /** @type {any} */
118
- wr.__lookupGetter__
112
+ dr.__lookupGetter__
119
113
  ) : (r, e) => {
120
114
  if (r == null)
121
115
  throw X(
122
116
  yr
123
117
  );
124
- let i = Ve(r);
118
+ let n = Ve(r);
125
119
  do {
126
- const s = Ye(i, e);
120
+ const s = Ye(n, e);
127
121
  if (s !== void 0)
128
122
  return Ce(s, "get") ? s.get : void 0;
129
- } while ((i = At(i)) !== null);
123
+ } while ((n = At(n)) !== null);
130
124
  }
131
125
  ), Ce = (
132
126
  /** @type {any} */
133
- Ve.hasOwn || Z(wr.hasOwnProperty)
134
- ), An = Array, gn = An.isArray, $t = An.prototype, rs = Z($t.join), ns = Z($t.push), is = Z(
135
- $t.toLocaleString
136
- ), _r = $t[Ie], ss = Z(_r), {
137
- abs: os,
138
- trunc: Sn
139
- } = Math, Qt = ArrayBuffer, as = Qt.isView, Tn = Qt.prototype, cs = Z(Tn.slice), ls = $e(Tn, "byteLength"), Ar = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : null, us = Ar && $e(Ar.prototype, "byteLength"), br = At(Uint8Array), hs = br.from, Q = br.prototype, fs = Q[Ie], vs = Z(Q.keys), ys = Z(
127
+ Ve.hasOwn || Z(dr.hasOwnProperty)
128
+ ), dn = Array, gn = dn.isArray, Jt = dn.prototype, ji = Z(Jt.join), Ki = Z(Jt.push), es = Z(
129
+ Jt.toLocaleString
130
+ ), _r = Jt[Ie], ts = Z(_r), {
131
+ abs: rs,
132
+ trunc: An
133
+ } = Math, Qt = ArrayBuffer, ns = Qt.isView, Sn = Qt.prototype, is = Z(Sn.slice), ss = Je(Sn, "byteLength"), gr = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : null, os = gr && Je(gr.prototype, "byteLength"), br = At(Uint8Array), as = br.from, Q = br.prototype, cs = Q[Ie], ls = Z(Q.keys), hs = Z(
140
134
  Q.values
141
- ), ps = Z(
135
+ ), us = Z(
142
136
  Q.entries
143
- ), ds = Z(Q.set), jr = Z(
137
+ ), fs = Z(Q.set), Qr = Z(
144
138
  Q.reverse
145
- ), ws = Z(Q.fill), As = Z(
139
+ ), vs = Z(Q.fill), ys = Z(
146
140
  Q.copyWithin
147
- ), Kr = Z(Q.sort), ot = Z(Q.slice), gs = Z(
141
+ ), jr = Z(Q.sort), ot = Z(Q.slice), ps = Z(
148
142
  Q.subarray
149
- ), $ = $e(
143
+ ), J = Je(
150
144
  Q,
151
145
  "buffer"
152
- ), Be = $e(
146
+ ), Le = Je(
153
147
  Q,
154
148
  "byteOffset"
155
- ), x = $e(
149
+ ), x = Je(
156
150
  Q,
157
151
  "length"
158
- ), En = $e(
152
+ ), En = Je(
159
153
  Q,
160
154
  Ir
161
- ), Ss = Uint8Array, ce = Uint16Array, en = (...r) => ie(hs, ce, r), Nr = Uint32Array, Ts = Float32Array, ze = At([][Ie]()), jt = Z(ze.next), Es = Z(function* () {
162
- }().next), Is = At(ze), _s = DataView.prototype, bs = Z(
163
- _s.getUint16
164
- ), X = TypeError, cr = RangeError, In = WeakSet, _n = In.prototype, Ns = Z(_n.add), Os = Z(_n.has), Kt = WeakMap, Or = Kt.prototype, kt = Z(Or.get), ms = Z(Or.has), mr = Z(Or.set), bn = new Kt(), Us = Jt(null, {
155
+ ), ws = Uint8Array, ce = Uint16Array, Kr = (...r) => ie(as, ce, r), Nr = Uint32Array, ds = Float32Array, ze = At([][Ie]()), jt = Z(ze.next), gs = Z(function* () {
156
+ }().next), As = At(ze), Ss = DataView.prototype, Es = Z(
157
+ Ss.getUint16
158
+ ), X = TypeError, cr = RangeError, Tn = WeakSet, In = Tn.prototype, Ts = Z(In.add), Is = Z(In.has), Kt = WeakMap, Or = Kt.prototype, Zt = Z(Or.get), _s = Z(Or.has), Ur = Z(Or.set), _n = new Kt(), bs = $t(null, {
165
159
  next: {
166
160
  value: function() {
167
- const e = kt(bn, this);
161
+ const e = Zt(_n, this);
168
162
  return jt(e);
169
163
  }
170
164
  },
@@ -174,44 +168,44 @@ const {
174
168
  }
175
169
  }
176
170
  });
177
- function ht(r) {
171
+ function ut(r) {
178
172
  if (r[Ie] === _r && ze.next === jt)
179
173
  return r;
180
- const e = Jt(Us);
181
- return mr(bn, e, ss(r)), e;
174
+ const e = $t(bs);
175
+ return Ur(_n, e, ts(r)), e;
182
176
  }
183
- const Nn = new Kt(), On = Jt(Is, {
177
+ const bn = new Kt(), Nn = $t(As, {
184
178
  next: {
185
179
  value: function() {
186
- const e = kt(Nn, this);
187
- return Es(e);
180
+ const e = Zt(bn, this);
181
+ return gs(e);
188
182
  },
189
183
  writable: !0,
190
184
  configurable: !0
191
185
  }
192
186
  });
193
- for (const r of pn(ze))
194
- r !== "next" && gt(On, r, Ye(ze, r));
195
- function tn(r) {
196
- const e = Jt(On);
197
- return mr(Nn, e, r), e;
187
+ for (const r of yn(ze))
188
+ r !== "next" && St(Nn, r, Ye(ze, r));
189
+ function en(r) {
190
+ const e = $t(Nn);
191
+ return Ur(bn, e, r), e;
198
192
  }
199
- function Zt(r) {
193
+ function Ht(r) {
200
194
  return r !== null && typeof r == "object" || typeof r == "function";
201
195
  }
202
- function rn(r) {
196
+ function tn(r) {
203
197
  return r !== null && typeof r == "object";
204
198
  }
205
- function Ht(r) {
199
+ function Gt(r) {
206
200
  return En(r) !== void 0;
207
201
  }
208
- function gr(r) {
202
+ function Ar(r) {
209
203
  const e = En(r);
210
204
  return e === "BigInt64Array" || e === "BigUint64Array";
211
205
  }
212
- function Cs(r) {
206
+ function Ns(r) {
213
207
  try {
214
- return gn(r) ? !1 : (ls(
208
+ return gn(r) ? !1 : (ss(
215
209
  /** @type {any} */
216
210
  r
217
211
  ), !0);
@@ -219,11 +213,11 @@ function Cs(r) {
219
213
  return !1;
220
214
  }
221
215
  }
222
- function mn(r) {
223
- if (Ar === null)
216
+ function On(r) {
217
+ if (gr === null)
224
218
  return !1;
225
219
  try {
226
- return us(
220
+ return os(
227
221
  /** @type {any} */
228
222
  r
229
223
  ), !0;
@@ -231,69 +225,69 @@ function mn(r) {
231
225
  return !1;
232
226
  }
233
227
  }
234
- function Rs(r) {
235
- return Cs(r) || mn(r);
228
+ function Os(r) {
229
+ return Ns(r) || On(r);
236
230
  }
237
- function nn(r) {
231
+ function rn(r) {
238
232
  return gn(r) ? r[Ie] === _r && ze.next === jt : !1;
239
233
  }
240
- function xs(r) {
241
- return Ht(r) ? r[Ie] === fs && ze.next === jt : !1;
234
+ function Us(r) {
235
+ return Gt(r) ? r[Ie] === cs && ze.next === jt : !1;
242
236
  }
243
- function xt(r) {
237
+ function Ft(r) {
244
238
  if (typeof r != "string")
245
239
  return !1;
246
240
  const e = +r;
247
- return r !== e + "" || !wn(e) ? !1 : e === Sn(e);
241
+ return r !== e + "" || !wn(e) ? !1 : e === An(e);
248
242
  }
249
- const Gt = Ki("__Float16Array__");
250
- function Fs(r) {
251
- if (!rn(r))
243
+ const Wt = $i("__Float16Array__");
244
+ function ms(r) {
245
+ if (!tn(r))
252
246
  return !1;
253
247
  const e = At(r);
254
- if (!rn(e))
248
+ if (!tn(e))
255
249
  return !1;
256
- const i = e.constructor;
257
- if (i === void 0)
250
+ const n = e.constructor;
251
+ if (n === void 0)
258
252
  return !1;
259
- if (!Zt(i))
260
- throw X(yn);
261
- return dr(i, Gt);
253
+ if (!Ht(n))
254
+ throw X(vn);
255
+ return wr(n, Wt);
262
256
  }
263
- const Sr = 1 / Qi;
264
- function Ls(r) {
257
+ const Sr = 1 / qi;
258
+ function Cs(r) {
265
259
  return r + Sr - Sr;
266
260
  }
267
- const Un = 6103515625e-14, Ps = 65504, Cn = 9765625e-10, sn = Cn * Un, Ms = Cn * Sr;
268
- function Ds(r) {
261
+ const Un = 6103515625e-14, Rs = 65504, mn = 9765625e-10, nn = mn * Un, xs = mn * Sr;
262
+ function Fs(r) {
269
263
  const e = +r;
270
264
  if (!wn(e) || e === 0)
271
265
  return e;
272
- const i = e > 0 ? 1 : -1, s = os(e);
266
+ const n = e > 0 ? 1 : -1, s = rs(e);
273
267
  if (s < Un)
274
- return i * Ls(s / sn) * sn;
275
- const o = (1 + Ms) * s, c = o - (o - s);
276
- return c > Ps || qe(c) ? i * (1 / 0) : i * c;
268
+ return n * Cs(s / nn) * nn;
269
+ const o = (1 + xs) * s, a = o - (o - s);
270
+ return a > Rs || qe(a) ? n * (1 / 0) : n * a;
277
271
  }
278
- const Rn = new Qt(4), xn = new Ts(Rn), Fn = new Nr(Rn), we = new ce(512), Ae = new Ss(512);
272
+ const Cn = new Qt(4), Rn = new ds(Cn), xn = new Nr(Cn), de = new ce(512), ge = new ws(512);
279
273
  for (let r = 0; r < 256; ++r) {
280
274
  const e = r - 127;
281
- e < -24 ? (we[r] = 0, we[r | 256] = 32768, Ae[r] = 24, Ae[r | 256] = 24) : e < -14 ? (we[r] = 1024 >> -e - 14, we[r | 256] = 1024 >> -e - 14 | 32768, Ae[r] = -e - 1, Ae[r | 256] = -e - 1) : e <= 15 ? (we[r] = e + 15 << 10, we[r | 256] = e + 15 << 10 | 32768, Ae[r] = 13, Ae[r | 256] = 13) : e < 128 ? (we[r] = 31744, we[r | 256] = 64512, Ae[r] = 24, Ae[r | 256] = 24) : (we[r] = 31744, we[r | 256] = 64512, Ae[r] = 13, Ae[r | 256] = 13);
275
+ e < -24 ? (de[r] = 0, de[r | 256] = 32768, ge[r] = 24, ge[r | 256] = 24) : e < -14 ? (de[r] = 1024 >> -e - 14, de[r | 256] = 1024 >> -e - 14 | 32768, ge[r] = -e - 1, ge[r | 256] = -e - 1) : e <= 15 ? (de[r] = e + 15 << 10, de[r | 256] = e + 15 << 10 | 32768, ge[r] = 13, ge[r | 256] = 13) : e < 128 ? (de[r] = 31744, de[r | 256] = 64512, ge[r] = 24, ge[r | 256] = 24) : (de[r] = 31744, de[r | 256] = 64512, ge[r] = 13, ge[r | 256] = 13);
282
276
  }
283
- function Ee(r) {
284
- xn[0] = Ds(r);
285
- const e = Fn[0], i = e >> 23 & 511;
286
- return we[i] + ((e & 8388607) >> Ae[i]);
277
+ function Te(r) {
278
+ Rn[0] = Fs(r);
279
+ const e = xn[0], n = e >> 23 & 511;
280
+ return de[n] + ((e & 8388607) >> ge[n]);
287
281
  }
288
- const Ur = new Nr(2048);
282
+ const mr = new Nr(2048);
289
283
  for (let r = 1; r < 1024; ++r) {
290
- let e = r << 13, i = 0;
284
+ let e = r << 13, n = 0;
291
285
  for (; (e & 8388608) === 0; )
292
- e <<= 1, i -= 8388608;
293
- e &= -8388609, i += 947912704, Ur[r] = e | i;
286
+ e <<= 1, n -= 8388608;
287
+ e &= -8388609, n += 947912704, mr[r] = e | n;
294
288
  }
295
289
  for (let r = 1024; r < 2048; ++r)
296
- Ur[r] = 939524096 + (r - 1024 << 13);
290
+ mr[r] = 939524096 + (r - 1024 << 13);
297
291
  const Qe = new Nr(64);
298
292
  for (let r = 1; r < 31; ++r)
299
293
  Qe[r] = r << 23;
@@ -302,271 +296,271 @@ Qe[32] = 2147483648;
302
296
  for (let r = 33; r < 63; ++r)
303
297
  Qe[r] = 2147483648 + (r - 32 << 23);
304
298
  Qe[63] = 3347054592;
305
- const Ln = new ce(64);
299
+ const Fn = new ce(64);
306
300
  for (let r = 1; r < 64; ++r)
307
- r !== 32 && (Ln[r] = 1024);
308
- function L(r) {
301
+ r !== 32 && (Fn[r] = 1024);
302
+ function M(r) {
309
303
  const e = r >> 10;
310
- return Fn[0] = Ur[Ln[e] + (r & 1023)] + Qe[e], xn[0];
304
+ return xn[0] = mr[Fn[e] + (r & 1023)] + Qe[e], Rn[0];
311
305
  }
312
- function Ue(r) {
306
+ function me(r) {
313
307
  const e = +r;
314
- return qe(e) || e === 0 ? 0 : Sn(e);
308
+ return qe(e) || e === 0 ? 0 : An(e);
315
309
  }
316
310
  function lr(r) {
317
- const e = Ue(r);
311
+ const e = me(r);
318
312
  return e < 0 ? 0 : e < $r ? e : $r;
319
313
  }
320
- function Ft(r, e) {
321
- if (!Zt(r))
322
- throw X(Xi);
323
- const i = r.constructor;
324
- if (i === void 0)
314
+ function Mt(r, e) {
315
+ if (!Ht(r))
316
+ throw X(Zi);
317
+ const n = r.constructor;
318
+ if (n === void 0)
325
319
  return e;
326
- if (!Zt(i))
327
- throw X(yn);
328
- const s = i[ji];
320
+ if (!Ht(n))
321
+ throw X(vn);
322
+ const s = n[Vi];
329
323
  return s ?? e;
330
324
  }
331
325
  function yt(r) {
332
- if (mn(r))
326
+ if (On(r))
333
327
  return !1;
334
328
  try {
335
- return cs(r, 0, 0), !1;
329
+ return is(r, 0, 0), !1;
336
330
  } catch {
337
331
  }
338
332
  return !0;
339
333
  }
340
- function on(r, e) {
341
- const i = qe(r), s = qe(e);
342
- if (i && s)
334
+ function sn(r, e) {
335
+ const n = qe(r), s = qe(e);
336
+ if (n && s)
343
337
  return 0;
344
- if (i)
338
+ if (n)
345
339
  return 1;
346
340
  if (s || r < e)
347
341
  return -1;
348
342
  if (r > e)
349
343
  return 1;
350
344
  if (r === 0 && e === 0) {
351
- const o = Qr(r, 0), c = Qr(e, 0);
352
- if (!o && c)
345
+ const o = Jr(r, 0), a = Jr(e, 0);
346
+ if (!o && a)
353
347
  return -1;
354
- if (o && !c)
348
+ if (o && !a)
355
349
  return 1;
356
350
  }
357
351
  return 0;
358
352
  }
359
- const Cr = 2, Wt = new Kt();
353
+ const Cr = 2, Xt = new Kt();
360
354
  function Xe(r) {
361
- return ms(Wt, r) || !as(r) && Fs(r);
355
+ return _s(Xt, r) || !ns(r) && ms(r);
362
356
  }
363
357
  function R(r) {
364
358
  if (!Xe(r))
365
- throw X(Yi);
359
+ throw X(Hi);
366
360
  }
367
- function Lt(r, e) {
368
- const i = Xe(r), s = Ht(r);
369
- if (!i && !s)
370
- throw X(qi);
361
+ function Pt(r, e) {
362
+ const n = Xe(r), s = Gt(r);
363
+ if (!n && !s)
364
+ throw X(Gi);
371
365
  if (typeof e == "number") {
372
366
  let o;
373
- if (i) {
374
- const c = O(r);
375
- o = x(c);
367
+ if (n) {
368
+ const a = O(r);
369
+ o = x(a);
376
370
  } else
377
371
  o = x(r);
378
372
  if (o < e)
379
373
  throw X(
380
- Vi
374
+ Wi
381
375
  );
382
376
  }
383
- if (gr(r))
377
+ if (Ar(r))
384
378
  throw X(pr);
385
379
  }
386
380
  function O(r) {
387
- const e = kt(Wt, r);
381
+ const e = Zt(Xt, r);
388
382
  if (e !== void 0) {
389
- const o = $(e);
383
+ const o = J(e);
390
384
  if (yt(o))
391
385
  throw X(vt);
392
386
  return e;
393
387
  }
394
- const i = (
388
+ const n = (
395
389
  /** @type {any} */
396
390
  r.buffer
397
391
  );
398
- if (yt(i))
392
+ if (yt(n))
399
393
  throw X(vt);
400
- const s = ut(B, [
401
- i,
394
+ const s = ht(L, [
395
+ n,
402
396
  /** @type {any} */
403
397
  r.byteOffset,
404
398
  /** @type {any} */
405
399
  r.length
406
400
  ], r.constructor);
407
- return kt(Wt, s);
401
+ return Zt(Xt, s);
408
402
  }
409
- function an(r) {
410
- const e = x(r), i = [];
403
+ function on(r) {
404
+ const e = x(r), n = [];
411
405
  for (let s = 0; s < e; ++s)
412
- i[s] = L(r[s]);
413
- return i;
406
+ n[s] = M(r[s]);
407
+ return n;
414
408
  }
415
- const Pn = new In();
416
- for (const r of pn(Q)) {
409
+ const Mn = new Tn();
410
+ for (const r of yn(Q)) {
417
411
  if (r === Ir)
418
412
  continue;
419
413
  const e = Ye(Q, r);
420
- Ce(e, "get") && typeof e.get == "function" && Ns(Pn, e.get);
414
+ Ce(e, "get") && typeof e.get == "function" && Ts(Mn, e.get);
421
415
  }
422
- const Bs = es(
416
+ const Ms = Ji(
423
417
  /** @type {ProxyHandler<Float16BitsArray>} */
424
418
  {
425
- get(r, e, i) {
426
- return xt(e) && Ce(r, e) ? L(ar(r, e)) : Os(Pn, ts(r, e)) ? ar(r, e) : ar(r, e, i);
419
+ get(r, e, n) {
420
+ return Ft(e) && Ce(r, e) ? M(ar(r, e)) : Is(Mn, Qi(r, e)) ? ar(r, e) : ar(r, e, n);
427
421
  },
428
- set(r, e, i, s) {
429
- return xt(e) && Ce(r, e) ? Jr(r, e, Ee(i)) : Jr(r, e, i, s);
422
+ set(r, e, n, s) {
423
+ return Ft(e) && Ce(r, e) ? Vr(r, e, Te(n)) : Vr(r, e, n, s);
430
424
  },
431
425
  getOwnPropertyDescriptor(r, e) {
432
- if (xt(e) && Ce(r, e)) {
433
- const i = Ye(r, e);
434
- return i.value = L(i.value), i;
426
+ if (Ft(e) && Ce(r, e)) {
427
+ const n = Ye(r, e);
428
+ return n.value = M(n.value), n;
435
429
  }
436
430
  return Ye(r, e);
437
431
  },
438
- defineProperty(r, e, i) {
439
- return xt(e) && Ce(r, e) && Ce(i, "value") && (i.value = Ee(i.value)), Vr(r, e, i);
432
+ defineProperty(r, e, n) {
433
+ return Ft(e) && Ce(r, e) && Ce(n, "value") && (n.value = Te(n.value)), qr(r, e, n);
440
434
  }
441
435
  }
442
436
  );
443
- class B {
437
+ class L {
444
438
  /** @see https://tc39.es/ecma262/#sec-typedarray */
445
- constructor(e, i, s) {
439
+ constructor(e, n, s) {
446
440
  let o;
447
441
  if (Xe(e))
448
- o = ut(ce, [O(e)], new.target);
449
- else if (Zt(e) && !Rs(e)) {
450
- let l, v;
451
- if (Ht(e)) {
452
- l = e, v = x(e);
453
- const y = $(e);
442
+ o = ht(ce, [O(e)], new.target);
443
+ else if (Ht(e) && !Os(e)) {
444
+ let l, u;
445
+ if (Gt(e)) {
446
+ l = e, u = x(e);
447
+ const y = J(e);
454
448
  if (yt(y))
455
449
  throw X(vt);
456
- if (gr(e))
450
+ if (Ar(e))
457
451
  throw X(pr);
458
452
  const E = new Qt(
459
- v * Cr
453
+ u * Cr
460
454
  );
461
- o = ut(ce, [E], new.target);
455
+ o = ht(ce, [E], new.target);
462
456
  } else {
463
457
  const y = e[Ie];
464
458
  if (y != null && typeof y != "function")
465
- throw X(Yr);
466
- y != null ? nn(e) ? (l = e, v = e.length) : (l = [.../** @type {Iterable<unknown>} */
467
- e], v = l.length) : (l = /** @type {ArrayLike<unknown>} */
468
- e, v = lr(l.length)), o = ut(ce, [v], new.target);
459
+ throw X(Xr);
460
+ y != null ? rn(e) ? (l = e, u = e.length) : (l = [.../** @type {Iterable<unknown>} */
461
+ e], u = l.length) : (l = /** @type {ArrayLike<unknown>} */
462
+ e, u = lr(l.length)), o = ht(ce, [u], new.target);
469
463
  }
470
- for (let y = 0; y < v; ++y)
471
- o[y] = Ee(l[y]);
464
+ for (let y = 0; y < u; ++y)
465
+ o[y] = Te(l[y]);
472
466
  } else
473
- o = ut(ce, arguments, new.target);
474
- const c = (
467
+ o = ht(ce, arguments, new.target);
468
+ const a = (
475
469
  /** @type {any} */
476
- new $i(o, Bs)
470
+ new Yi(o, Ms)
477
471
  );
478
- return mr(Wt, c, o), c;
472
+ return Ur(Xt, a, o), a;
479
473
  }
480
474
  /**
481
475
  * limitation: `Object.getOwnPropertyNames(Float16Array)` or `Reflect.ownKeys(Float16Array)` include this key
482
476
  * @see https://tc39.es/ecma262/#sec-%typedarray%.from
483
477
  */
484
- static from(e, ...i) {
478
+ static from(e, ...n) {
485
479
  const s = this;
486
- if (!dr(s, Gt))
480
+ if (!wr(s, Wt))
487
481
  throw X(
488
- Xr
482
+ Wr
489
483
  );
490
- if (s === B) {
491
- if (Xe(e) && i.length === 0) {
492
- const b = O(e), U = new ce(
493
- $(b),
494
- Be(b),
495
- x(b)
484
+ if (s === L) {
485
+ if (Xe(e) && n.length === 0) {
486
+ const I = O(e), U = new ce(
487
+ J(I),
488
+ Le(I),
489
+ x(I)
496
490
  );
497
- return new B(
498
- $(ot(U))
491
+ return new L(
492
+ J(ot(U))
499
493
  );
500
494
  }
501
- if (i.length === 0)
502
- return new B(
503
- $(
504
- en(e, Ee)
495
+ if (n.length === 0)
496
+ return new L(
497
+ J(
498
+ Kr(e, Te)
505
499
  )
506
500
  );
507
- const y = i[0], E = i[1];
508
- return new B(
509
- $(
510
- en(e, function(b, ...U) {
511
- return Ee(
512
- ie(y, this, [b, ...ht(U)])
501
+ const y = n[0], E = n[1];
502
+ return new L(
503
+ J(
504
+ Kr(e, function(I, ...U) {
505
+ return Te(
506
+ ie(y, this, [I, ...ut(U)])
513
507
  );
514
508
  }, E)
515
509
  )
516
510
  );
517
511
  }
518
- let o, c;
512
+ let o, a;
519
513
  const l = e[Ie];
520
514
  if (l != null && typeof l != "function")
521
- throw X(Yr);
515
+ throw X(Xr);
522
516
  if (l != null)
523
- nn(e) ? (o = e, c = e.length) : xs(e) ? (o = e, c = x(e)) : (o = [...e], c = o.length);
517
+ rn(e) ? (o = e, a = e.length) : Us(e) ? (o = e, a = x(e)) : (o = [...e], a = o.length);
524
518
  else {
525
519
  if (e == null)
526
520
  throw X(
527
521
  yr
528
522
  );
529
- o = Ve(e), c = lr(o.length);
523
+ o = Ve(e), a = lr(o.length);
530
524
  }
531
- const v = new s(c);
532
- if (i.length === 0)
533
- for (let y = 0; y < c; ++y)
534
- v[y] = /** @type {number} */
525
+ const u = new s(a);
526
+ if (n.length === 0)
527
+ for (let y = 0; y < a; ++y)
528
+ u[y] = /** @type {number} */
535
529
  o[y];
536
530
  else {
537
- const y = i[0], E = i[1];
538
- for (let b = 0; b < c; ++b)
539
- v[b] = ie(y, E, [o[b], b]);
531
+ const y = n[0], E = n[1];
532
+ for (let I = 0; I < a; ++I)
533
+ u[I] = ie(y, E, [o[I], I]);
540
534
  }
541
- return v;
535
+ return u;
542
536
  }
543
537
  /**
544
538
  * limitation: `Object.getOwnPropertyNames(Float16Array)` or `Reflect.ownKeys(Float16Array)` include this key
545
539
  * @see https://tc39.es/ecma262/#sec-%typedarray%.of
546
540
  */
547
541
  static of(...e) {
548
- const i = this;
549
- if (!dr(i, Gt))
542
+ const n = this;
543
+ if (!wr(n, Wt))
550
544
  throw X(
551
- Xr
545
+ Wr
552
546
  );
553
547
  const s = e.length;
554
- if (i === B) {
555
- const c = new B(s), l = O(c);
556
- for (let v = 0; v < s; ++v)
557
- l[v] = Ee(e[v]);
558
- return c;
548
+ if (n === L) {
549
+ const a = new L(s), l = O(a);
550
+ for (let u = 0; u < s; ++u)
551
+ l[u] = Te(e[u]);
552
+ return a;
559
553
  }
560
- const o = new i(s);
561
- for (let c = 0; c < s; ++c)
562
- o[c] = e[c];
554
+ const o = new n(s);
555
+ for (let a = 0; a < s; ++a)
556
+ o[a] = e[a];
563
557
  return o;
564
558
  }
565
559
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys */
566
560
  keys() {
567
561
  R(this);
568
562
  const e = O(this);
569
- return vs(e);
563
+ return ls(e);
570
564
  }
571
565
  /**
572
566
  * limitation: returns a object whose prototype is not `%ArrayIteratorPrototype%`
@@ -575,9 +569,9 @@ class B {
575
569
  values() {
576
570
  R(this);
577
571
  const e = O(this);
578
- return tn(function* () {
579
- for (const i of ys(e))
580
- yield L(i);
572
+ return en(function* () {
573
+ for (const n of hs(e))
574
+ yield M(n);
581
575
  }());
582
576
  }
583
577
  /**
@@ -587,169 +581,169 @@ class B {
587
581
  entries() {
588
582
  R(this);
589
583
  const e = O(this);
590
- return tn(function* () {
591
- for (const [i, s] of ps(e))
584
+ return en(function* () {
585
+ for (const [n, s] of us(e))
592
586
  yield (
593
587
  /** @type {[number, number]} */
594
- [i, L(s)]
588
+ [n, M(s)]
595
589
  );
596
590
  }());
597
591
  }
598
592
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.at */
599
593
  at(e) {
600
594
  R(this);
601
- const i = O(this), s = x(i), o = Ue(e), c = o >= 0 ? o : s + o;
602
- if (!(c < 0 || c >= s))
603
- return L(i[c]);
595
+ const n = O(this), s = x(n), o = me(e), a = o >= 0 ? o : s + o;
596
+ if (!(a < 0 || a >= s))
597
+ return M(n[a]);
604
598
  }
605
599
  /** @see https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.with */
606
- with(e, i) {
600
+ with(e, n) {
607
601
  R(this);
608
- const s = O(this), o = x(s), c = Ue(e), l = c >= 0 ? c : o + c, v = +i;
602
+ const s = O(this), o = x(s), a = me(e), l = a >= 0 ? a : o + a, u = +n;
609
603
  if (l < 0 || l >= o)
610
604
  throw cr(or);
611
605
  const y = new ce(
612
- $(s),
613
- Be(s),
606
+ J(s),
607
+ Le(s),
614
608
  x(s)
615
- ), E = new B(
616
- $(
609
+ ), E = new L(
610
+ J(
617
611
  ot(y)
618
612
  )
619
- ), b = O(E);
620
- return b[l] = Ee(v), E;
613
+ ), I = O(E);
614
+ return I[l] = Te(u), E;
621
615
  }
622
616
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.map */
623
- map(e, ...i) {
617
+ map(e, ...n) {
624
618
  R(this);
625
- const s = O(this), o = x(s), c = i[0], l = Ft(s, B);
626
- if (l === B) {
627
- const y = new B(o), E = O(y);
628
- for (let b = 0; b < o; ++b) {
629
- const U = L(s[b]);
630
- E[b] = Ee(
631
- ie(e, c, [U, b, this])
619
+ const s = O(this), o = x(s), a = n[0], l = Mt(s, L);
620
+ if (l === L) {
621
+ const y = new L(o), E = O(y);
622
+ for (let I = 0; I < o; ++I) {
623
+ const U = M(s[I]);
624
+ E[I] = Te(
625
+ ie(e, a, [U, I, this])
632
626
  );
633
627
  }
634
628
  return y;
635
629
  }
636
- const v = new l(o);
637
- Lt(v, o);
630
+ const u = new l(o);
631
+ Pt(u, o);
638
632
  for (let y = 0; y < o; ++y) {
639
- const E = L(s[y]);
640
- v[y] = ie(e, c, [E, y, this]);
633
+ const E = M(s[y]);
634
+ u[y] = ie(e, a, [E, y, this]);
641
635
  }
642
636
  return (
643
637
  /** @type {any} */
644
- v
638
+ u
645
639
  );
646
640
  }
647
641
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter */
648
- filter(e, ...i) {
642
+ filter(e, ...n) {
649
643
  R(this);
650
- const s = O(this), o = x(s), c = i[0], l = [];
644
+ const s = O(this), o = x(s), a = n[0], l = [];
651
645
  for (let E = 0; E < o; ++E) {
652
- const b = L(s[E]);
653
- ie(e, c, [b, E, this]) && ns(l, b);
646
+ const I = M(s[E]);
647
+ ie(e, a, [I, E, this]) && Ki(l, I);
654
648
  }
655
- const v = Ft(s, B), y = new v(l);
656
- return Lt(y), /** @type {any} */
649
+ const u = Mt(s, L), y = new u(l);
650
+ return Pt(y), /** @type {any} */
657
651
  y;
658
652
  }
659
653
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce */
660
- reduce(e, ...i) {
654
+ reduce(e, ...n) {
661
655
  R(this);
662
656
  const s = O(this), o = x(s);
663
- if (o === 0 && i.length === 0)
664
- throw X(qr);
665
- let c, l;
666
- i.length === 0 ? (c = L(s[0]), l = 1) : (c = i[0], l = 0);
667
- for (let v = l; v < o; ++v)
668
- c = e(
669
- c,
670
- L(s[v]),
671
- v,
657
+ if (o === 0 && n.length === 0)
658
+ throw X(Yr);
659
+ let a, l;
660
+ n.length === 0 ? (a = M(s[0]), l = 1) : (a = n[0], l = 0);
661
+ for (let u = l; u < o; ++u)
662
+ a = e(
663
+ a,
664
+ M(s[u]),
665
+ u,
672
666
  this
673
667
  );
674
- return c;
668
+ return a;
675
669
  }
676
670
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduceright */
677
- reduceRight(e, ...i) {
671
+ reduceRight(e, ...n) {
678
672
  R(this);
679
673
  const s = O(this), o = x(s);
680
- if (o === 0 && i.length === 0)
681
- throw X(qr);
682
- let c, l;
683
- i.length === 0 ? (c = L(s[o - 1]), l = o - 2) : (c = i[0], l = o - 1);
684
- for (let v = l; v >= 0; --v)
685
- c = e(
686
- c,
687
- L(s[v]),
688
- v,
674
+ if (o === 0 && n.length === 0)
675
+ throw X(Yr);
676
+ let a, l;
677
+ n.length === 0 ? (a = M(s[o - 1]), l = o - 2) : (a = n[0], l = o - 1);
678
+ for (let u = l; u >= 0; --u)
679
+ a = e(
680
+ a,
681
+ M(s[u]),
682
+ u,
689
683
  this
690
684
  );
691
- return c;
685
+ return a;
692
686
  }
693
687
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.foreach */
694
- forEach(e, ...i) {
688
+ forEach(e, ...n) {
695
689
  R(this);
696
- const s = O(this), o = x(s), c = i[0];
690
+ const s = O(this), o = x(s), a = n[0];
697
691
  for (let l = 0; l < o; ++l)
698
- ie(e, c, [
699
- L(s[l]),
692
+ ie(e, a, [
693
+ M(s[l]),
700
694
  l,
701
695
  this
702
696
  ]);
703
697
  }
704
698
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.find */
705
- find(e, ...i) {
699
+ find(e, ...n) {
706
700
  R(this);
707
- const s = O(this), o = x(s), c = i[0];
701
+ const s = O(this), o = x(s), a = n[0];
708
702
  for (let l = 0; l < o; ++l) {
709
- const v = L(s[l]);
710
- if (ie(e, c, [v, l, this]))
711
- return v;
703
+ const u = M(s[l]);
704
+ if (ie(e, a, [u, l, this]))
705
+ return u;
712
706
  }
713
707
  }
714
708
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.findindex */
715
- findIndex(e, ...i) {
709
+ findIndex(e, ...n) {
716
710
  R(this);
717
- const s = O(this), o = x(s), c = i[0];
711
+ const s = O(this), o = x(s), a = n[0];
718
712
  for (let l = 0; l < o; ++l) {
719
- const v = L(s[l]);
720
- if (ie(e, c, [v, l, this]))
713
+ const u = M(s[l]);
714
+ if (ie(e, a, [u, l, this]))
721
715
  return l;
722
716
  }
723
717
  return -1;
724
718
  }
725
719
  /** @see https://tc39.es/proposal-array-find-from-last/index.html#sec-%typedarray%.prototype.findlast */
726
- findLast(e, ...i) {
720
+ findLast(e, ...n) {
727
721
  R(this);
728
- const s = O(this), o = x(s), c = i[0];
722
+ const s = O(this), o = x(s), a = n[0];
729
723
  for (let l = o - 1; l >= 0; --l) {
730
- const v = L(s[l]);
731
- if (ie(e, c, [v, l, this]))
732
- return v;
724
+ const u = M(s[l]);
725
+ if (ie(e, a, [u, l, this]))
726
+ return u;
733
727
  }
734
728
  }
735
729
  /** @see https://tc39.es/proposal-array-find-from-last/index.html#sec-%typedarray%.prototype.findlastindex */
736
- findLastIndex(e, ...i) {
730
+ findLastIndex(e, ...n) {
737
731
  R(this);
738
- const s = O(this), o = x(s), c = i[0];
732
+ const s = O(this), o = x(s), a = n[0];
739
733
  for (let l = o - 1; l >= 0; --l) {
740
- const v = L(s[l]);
741
- if (ie(e, c, [v, l, this]))
734
+ const u = M(s[l]);
735
+ if (ie(e, a, [u, l, this]))
742
736
  return l;
743
737
  }
744
738
  return -1;
745
739
  }
746
740
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.every */
747
- every(e, ...i) {
741
+ every(e, ...n) {
748
742
  R(this);
749
- const s = O(this), o = x(s), c = i[0];
743
+ const s = O(this), o = x(s), a = n[0];
750
744
  for (let l = 0; l < o; ++l)
751
- if (!ie(e, c, [
752
- L(s[l]),
745
+ if (!ie(e, a, [
746
+ M(s[l]),
753
747
  l,
754
748
  this
755
749
  ]))
@@ -757,12 +751,12 @@ class B {
757
751
  return !0;
758
752
  }
759
753
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.some */
760
- some(e, ...i) {
754
+ some(e, ...n) {
761
755
  R(this);
762
- const s = O(this), o = x(s), c = i[0];
756
+ const s = O(this), o = x(s), a = n[0];
763
757
  for (let l = 0; l < o; ++l)
764
- if (ie(e, c, [
765
- L(s[l]),
758
+ if (ie(e, a, [
759
+ M(s[l]),
766
760
  l,
767
761
  this
768
762
  ]))
@@ -770,182 +764,182 @@ class B {
770
764
  return !1;
771
765
  }
772
766
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.set */
773
- set(e, ...i) {
767
+ set(e, ...n) {
774
768
  R(this);
775
- const s = O(this), o = Ue(i[0]);
769
+ const s = O(this), o = me(n[0]);
776
770
  if (o < 0)
777
771
  throw cr(or);
778
772
  if (e == null)
779
773
  throw X(
780
774
  yr
781
775
  );
782
- if (gr(e))
776
+ if (Ar(e))
783
777
  throw X(
784
778
  pr
785
779
  );
786
780
  if (Xe(e))
787
- return ds(
781
+ return fs(
788
782
  O(this),
789
783
  O(e),
790
784
  o
791
785
  );
792
- if (Ht(e)) {
793
- const y = $(e);
786
+ if (Gt(e)) {
787
+ const y = J(e);
794
788
  if (yt(y))
795
789
  throw X(vt);
796
790
  }
797
- const c = x(s), l = Ve(e), v = lr(l.length);
798
- if (o === 1 / 0 || v + o > c)
791
+ const a = x(s), l = Ve(e), u = lr(l.length);
792
+ if (o === 1 / 0 || u + o > a)
799
793
  throw cr(or);
800
- for (let y = 0; y < v; ++y)
801
- s[y + o] = Ee(l[y]);
794
+ for (let y = 0; y < u; ++y)
795
+ s[y + o] = Te(l[y]);
802
796
  }
803
797
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse */
804
798
  reverse() {
805
799
  R(this);
806
800
  const e = O(this);
807
- return jr(e), this;
801
+ return Qr(e), this;
808
802
  }
809
803
  /** @see https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.toReversed */
810
804
  toReversed() {
811
805
  R(this);
812
- const e = O(this), i = new ce(
813
- $(e),
814
- Be(e),
806
+ const e = O(this), n = new ce(
807
+ J(e),
808
+ Le(e),
815
809
  x(e)
816
- ), s = new B(
817
- $(
818
- ot(i)
810
+ ), s = new L(
811
+ J(
812
+ ot(n)
819
813
  )
820
814
  ), o = O(s);
821
- return jr(o), s;
815
+ return Qr(o), s;
822
816
  }
823
817
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill */
824
- fill(e, ...i) {
818
+ fill(e, ...n) {
825
819
  R(this);
826
820
  const s = O(this);
827
- return ws(
821
+ return vs(
828
822
  s,
829
- Ee(e),
830
- ...ht(i)
823
+ Te(e),
824
+ ...ut(n)
831
825
  ), this;
832
826
  }
833
827
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.copywithin */
834
- copyWithin(e, i, ...s) {
828
+ copyWithin(e, n, ...s) {
835
829
  R(this);
836
830
  const o = O(this);
837
- return As(o, e, i, ...ht(s)), this;
831
+ return ys(o, e, n, ...ut(s)), this;
838
832
  }
839
833
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort */
840
834
  sort(e) {
841
835
  R(this);
842
- const i = O(this), s = e !== void 0 ? e : on;
843
- return Kr(i, (o, c) => s(L(o), L(c))), this;
836
+ const n = O(this), s = e !== void 0 ? e : sn;
837
+ return jr(n, (o, a) => s(M(o), M(a))), this;
844
838
  }
845
839
  /** @see https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.toSorted */
846
840
  toSorted(e) {
847
841
  R(this);
848
- const i = O(this);
842
+ const n = O(this);
849
843
  if (e !== void 0 && typeof e != "function")
850
- throw new X(Ji);
851
- const s = e !== void 0 ? e : on, o = new ce(
852
- $(i),
853
- Be(i),
854
- x(i)
855
- ), c = new B(
856
- $(
844
+ throw new X(Xi);
845
+ const s = e !== void 0 ? e : sn, o = new ce(
846
+ J(n),
847
+ Le(n),
848
+ x(n)
849
+ ), a = new L(
850
+ J(
857
851
  ot(o)
858
852
  )
859
- ), l = O(c);
860
- return Kr(l, (v, y) => s(L(v), L(y))), c;
853
+ ), l = O(a);
854
+ return jr(l, (u, y) => s(M(u), M(y))), a;
861
855
  }
862
856
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice */
863
- slice(e, i) {
857
+ slice(e, n) {
864
858
  R(this);
865
- const s = O(this), o = Ft(s, B);
866
- if (o === B) {
859
+ const s = O(this), o = Mt(s, L);
860
+ if (o === L) {
867
861
  const Ze = new ce(
868
- $(s),
869
- Be(s),
862
+ J(s),
863
+ Le(s),
870
864
  x(s)
871
865
  );
872
- return new B(
873
- $(
874
- ot(Ze, e, i)
866
+ return new L(
867
+ J(
868
+ ot(Ze, e, n)
875
869
  )
876
870
  );
877
871
  }
878
- const c = x(s), l = Ue(e), v = i === void 0 ? c : Ue(i);
872
+ const a = x(s), l = me(e), u = n === void 0 ? a : me(n);
879
873
  let y;
880
- l === -1 / 0 ? y = 0 : l < 0 ? y = c + l > 0 ? c + l : 0 : y = c < l ? c : l;
874
+ l === -1 / 0 ? y = 0 : l < 0 ? y = a + l > 0 ? a + l : 0 : y = a < l ? a : l;
881
875
  let E;
882
- v === -1 / 0 ? E = 0 : v < 0 ? E = c + v > 0 ? c + v : 0 : E = c < v ? c : v;
883
- const b = E - y > 0 ? E - y : 0, U = new o(b);
884
- if (Lt(U, b), b === 0)
876
+ u === -1 / 0 ? E = 0 : u < 0 ? E = a + u > 0 ? a + u : 0 : E = a < u ? a : u;
877
+ const I = E - y > 0 ? E - y : 0, U = new o(I);
878
+ if (Pt(U, I), I === 0)
885
879
  return U;
886
- const q = $(s);
880
+ const q = J(s);
887
881
  if (yt(q))
888
882
  throw X(vt);
889
883
  let se = 0;
890
884
  for (; y < E; )
891
- U[se] = L(s[y]), ++y, ++se;
885
+ U[se] = M(s[y]), ++y, ++se;
892
886
  return (
893
887
  /** @type {any} */
894
888
  U
895
889
  );
896
890
  }
897
891
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray */
898
- subarray(e, i) {
892
+ subarray(e, n) {
899
893
  R(this);
900
- const s = O(this), o = Ft(s, B), c = new ce(
901
- $(s),
902
- Be(s),
894
+ const s = O(this), o = Mt(s, L), a = new ce(
895
+ J(s),
896
+ Le(s),
903
897
  x(s)
904
- ), l = gs(c, e, i), v = new o(
905
- $(l),
906
- Be(l),
898
+ ), l = ps(a, e, n), u = new o(
899
+ J(l),
900
+ Le(l),
907
901
  x(l)
908
902
  );
909
- return Lt(v), /** @type {any} */
910
- v;
903
+ return Pt(u), /** @type {any} */
904
+ u;
911
905
  }
912
906
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.indexof */
913
- indexOf(e, ...i) {
907
+ indexOf(e, ...n) {
914
908
  R(this);
915
909
  const s = O(this), o = x(s);
916
- let c = Ue(i[0]);
917
- if (c === 1 / 0)
910
+ let a = me(n[0]);
911
+ if (a === 1 / 0)
918
912
  return -1;
919
- c < 0 && (c += o, c < 0 && (c = 0));
920
- for (let l = c; l < o; ++l)
921
- if (Ce(s, l) && L(s[l]) === e)
913
+ a < 0 && (a += o, a < 0 && (a = 0));
914
+ for (let l = a; l < o; ++l)
915
+ if (Ce(s, l) && M(s[l]) === e)
922
916
  return l;
923
917
  return -1;
924
918
  }
925
919
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof */
926
- lastIndexOf(e, ...i) {
920
+ lastIndexOf(e, ...n) {
927
921
  R(this);
928
922
  const s = O(this), o = x(s);
929
- let c = i.length >= 1 ? Ue(i[0]) : o - 1;
930
- if (c === -1 / 0)
923
+ let a = n.length >= 1 ? me(n[0]) : o - 1;
924
+ if (a === -1 / 0)
931
925
  return -1;
932
- c >= 0 ? c = c < o - 1 ? c : o - 1 : c += o;
933
- for (let l = c; l >= 0; --l)
934
- if (Ce(s, l) && L(s[l]) === e)
926
+ a >= 0 ? a = a < o - 1 ? a : o - 1 : a += o;
927
+ for (let l = a; l >= 0; --l)
928
+ if (Ce(s, l) && M(s[l]) === e)
935
929
  return l;
936
930
  return -1;
937
931
  }
938
932
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.includes */
939
- includes(e, ...i) {
933
+ includes(e, ...n) {
940
934
  R(this);
941
935
  const s = O(this), o = x(s);
942
- let c = Ue(i[0]);
943
- if (c === 1 / 0)
936
+ let a = me(n[0]);
937
+ if (a === 1 / 0)
944
938
  return !1;
945
- c < 0 && (c += o, c < 0 && (c = 0));
939
+ a < 0 && (a += o, a < 0 && (a = 0));
946
940
  const l = qe(e);
947
- for (let v = c; v < o; ++v) {
948
- const y = L(s[v]);
941
+ for (let u = a; u < o; ++u) {
942
+ const y = M(s[u]);
949
943
  if (l && qe(y) || y === e)
950
944
  return !0;
951
945
  }
@@ -954,14 +948,14 @@ class B {
954
948
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.join */
955
949
  join(e) {
956
950
  R(this);
957
- const i = O(this), s = an(i);
958
- return rs(s, e);
951
+ const n = O(this), s = on(n);
952
+ return ji(s, e);
959
953
  }
960
954
  /** @see https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring */
961
955
  toLocaleString(...e) {
962
956
  R(this);
963
- const i = O(this), s = an(i);
964
- return is(s, ...ht(e));
957
+ const n = O(this), s = on(n);
958
+ return es(s, ...ut(e));
965
959
  }
966
960
  /** @see https://tc39.es/ecma262/#sec-get-%typedarray%.prototype-@@tostringtag */
967
961
  get [Ir]() {
@@ -972,39 +966,42 @@ class B {
972
966
  );
973
967
  }
974
968
  }
975
- gt(B, "BYTES_PER_ELEMENT", {
969
+ St(L, "BYTES_PER_ELEMENT", {
976
970
  value: Cr
977
971
  });
978
- gt(B, Gt, {});
979
- dn(B, br);
980
- const Xt = B.prototype;
981
- gt(Xt, "BYTES_PER_ELEMENT", {
972
+ St(L, Wt, {});
973
+ pn(L, br);
974
+ const Yt = L.prototype;
975
+ St(Yt, "BYTES_PER_ELEMENT", {
982
976
  value: Cr
983
977
  });
984
- gt(Xt, Ie, {
985
- value: Xt.values,
978
+ St(Yt, Ie, {
979
+ value: Yt.values,
986
980
  writable: !0,
987
981
  configurable: !0
988
982
  });
989
- dn(Xt, Q);
990
- function zs(r, e, ...i) {
991
- return L(
992
- bs(r, e, ...ht(i))
983
+ pn(Yt, Q);
984
+ function Ps(r, e, ...n) {
985
+ return M(
986
+ Es(r, e, ...ut(n))
993
987
  );
994
988
  }
995
- function Io(r) {
996
- return r instanceof Int8Array || r instanceof Uint8Array || r instanceof Uint8ClampedArray || r instanceof Int16Array || r instanceof Uint16Array || r instanceof Int32Array || r instanceof Uint32Array || r instanceof B || r instanceof Float32Array || r instanceof Float64Array;
989
+ function wo(r) {
990
+ return r instanceof Int8Array || r instanceof Uint8Array || r instanceof Uint8ClampedArray || r instanceof Int16Array || r instanceof Uint16Array || r instanceof Int32Array || r instanceof Uint32Array || r instanceof L || r instanceof Float32Array || r instanceof Float64Array;
997
991
  }
998
- class ks extends qt {
999
- load(e, i, s, o) {
1000
- const c = new ki(this.manager);
1001
- c.setRequestHeader(this.requestHeader), c.setPath(this.path), c.setWithCredentials(this.withCredentials), c.load(
992
+ class Bs extends gt {
993
+ constructor(e, n) {
994
+ super(n), this.parser = e;
995
+ }
996
+ load(e, n, s, o) {
997
+ const a = new Bi(this.manager);
998
+ a.setRequestHeader(this.requestHeader), a.setPath(this.path), a.setWithCredentials(this.withCredentials), a.load(
1002
999
  e,
1003
1000
  (l) => {
1004
1001
  try {
1005
- i(this.parseTypedArray(l));
1006
- } catch (v) {
1007
- o != null ? o(v) : console.error(v), this.manager.itemError(e);
1002
+ n(this.parser(l));
1003
+ } catch (u) {
1004
+ o != null ? o(u) : console.error(u), this.manager.itemError(e);
1008
1005
  }
1009
1006
  },
1010
1007
  s,
@@ -1012,85 +1009,53 @@ class ks extends qt {
1012
1009
  );
1013
1010
  }
1014
1011
  }
1015
- function Mn(r) {
1016
- return class extends ks {
1017
- constructor() {
1018
- super(...arguments), this.parseTypedArray = r;
1019
- }
1020
- };
1021
- }
1022
- function _o(r) {
1023
- return new (Mn(r))();
1024
- }
1025
- function Zs(r) {
1026
- const e = r instanceof Int8Array ? mi : r instanceof Uint8Array ? kr : r instanceof Uint8ClampedArray ? kr : r instanceof Int16Array ? Ui : r instanceof Uint16Array ? Ci : r instanceof Int32Array ? Ri : r instanceof Uint32Array ? xi : r instanceof B ? lt : r instanceof Float32Array ? ft : r instanceof Float64Array ? ft : null;
1027
- return vn(e != null), e;
1028
- }
1029
- const Hs = {
1030
- format: ln,
1031
- minFilter: zt,
1032
- magFilter: zt
1033
- };
1034
- class Gs extends qt {
1035
- constructor() {
1036
- super(...arguments), this.parameters = {};
1012
+ function Ds(r) {
1013
+ const e = r instanceof Int8Array ? bi : r instanceof Uint8Array ? kr : r instanceof Uint8ClampedArray ? kr : r instanceof Int16Array ? Ni : r instanceof Uint16Array ? Oi : r instanceof Int32Array ? Ui : r instanceof Uint32Array ? mi : r instanceof L ? lt : r instanceof Float32Array ? ft : r instanceof Float64Array ? ft : null;
1014
+ return fn(e != null), e;
1015
+ }
1016
+ class Ls extends gt {
1017
+ constructor(e, n, s = {}, o) {
1018
+ super(o), this.textureClass = e, this.parser = n, this.options = {
1019
+ format: cn,
1020
+ minFilter: kt,
1021
+ magFilter: kt,
1022
+ ...s
1023
+ };
1037
1024
  }
1038
- load(e, i, s, o) {
1039
- const c = new this.Texture(), l = new this.TypedArrayLoader(this.manager);
1040
- l.setRequestHeader(this.requestHeader), l.setPath(this.path), l.setWithCredentials(this.withCredentials), l.load(
1025
+ load(e, n, s, o) {
1026
+ const a = new this.textureClass(), l = new Bs(this.parser, this.manager);
1027
+ return l.setRequestHeader(this.requestHeader), l.setPath(this.path), l.setWithCredentials(this.withCredentials), l.load(
1041
1028
  e,
1042
- (v) => {
1043
- c.image.data = v instanceof B ? new Uint16Array(v.buffer) : v;
1044
- const { width: y, height: E, depth: b, ...U } = this.parameters;
1045
- y != null && (c.image.width = y), E != null && (c.image.height = E), "depth" in c.image && b != null && (c.image.depth = b), c.type = Zs(v), Object.assign(c, U), c.needsUpdate = !0, i(c);
1029
+ (u) => {
1030
+ a.image.data = u instanceof L ? new Uint16Array(u.buffer) : u;
1031
+ const { width: y, height: E, depth: I, ...U } = this.options;
1032
+ y != null && (a.image.width = y), E != null && (a.image.height = E), "depth" in a.image && I != null && (a.image.depth = I), a.type = Ds(u), Object.assign(a, U), a.needsUpdate = !0, n == null || n(a);
1046
1033
  },
1047
1034
  s,
1048
1035
  o
1049
- );
1036
+ ), a;
1050
1037
  }
1051
1038
  }
1052
- function Dn(r, e, i) {
1053
- return class extends Gs {
1054
- constructor() {
1055
- super(...arguments), this.Texture = r, this.TypedArrayLoader = Mn(e), this.parameters = {
1056
- ...Hs,
1057
- ...i
1058
- };
1059
- }
1060
- };
1061
- }
1062
- function Bn(r, e) {
1063
- return Dn(un, r, e);
1064
- }
1065
- function Ws(r, e) {
1066
- return Dn(Fi, r, e);
1067
- }
1068
- function bo(r, e) {
1069
- return new (Bn(r, e))();
1070
- }
1071
- function No(r, e) {
1072
- return new (Ws(r, e))();
1073
- }
1074
- const Je = ye.clamp, Oo = ye.euclideanModulo, mo = ye.inverseLerp, Uo = ye.lerp, Co = ye.degToRad, Ro = ye.radToDeg, xo = ye.isPowerOfTwo, Fo = ye.ceilPowerOfTwo, Lo = ye.floorPowerOfTwo, Po = ye.normalize;
1075
- function Mo(r, e, i, s = 0, o = 1) {
1076
- return ye.mapLinear(r, e, i, s, o);
1039
+ const $e = ye.clamp, go = ye.euclideanModulo, Ao = ye.inverseLerp, So = ye.lerp, Eo = ye.degToRad, To = ye.radToDeg, Io = ye.isPowerOfTwo, _o = ye.ceilPowerOfTwo, bo = ye.floorPowerOfTwo, No = ye.normalize;
1040
+ function Oo(r, e, n, s = 0, o = 1) {
1041
+ return ye.mapLinear(r, e, n, s, o);
1077
1042
  }
1078
- function Do(r, e, i, s = 0, o = 1) {
1079
- return Je(ye.mapLinear(r, e, i, s, o), s, o);
1043
+ function Uo(r, e, n, s = 0, o = 1) {
1044
+ return $e(ye.mapLinear(r, e, n, s, o), s, o);
1080
1045
  }
1081
- function Bo(r, e, i) {
1082
- return i <= r ? 0 : i >= e ? 1 : (i = (i - r) / (e - r), i * i * (3 - 2 * i));
1046
+ function mo(r, e, n) {
1047
+ return n <= r ? 0 : n >= e ? 1 : (n = (n - r) / (e - r), n * n * (3 - 2 * n));
1083
1048
  }
1084
- function zo(r) {
1049
+ function Co(r) {
1085
1050
  return Math.min(Math.max(r, 0), 1);
1086
1051
  }
1087
- function ko(r, e, i, s = i) {
1052
+ function Ro(r, e, n, s = n) {
1088
1053
  const o = Math.abs(r - e);
1089
- return o <= s || o <= i * Math.max(Math.abs(r), Math.abs(e));
1054
+ return o <= s || o <= n * Math.max(Math.abs(r), Math.abs(e));
1090
1055
  }
1091
- function Zo(r) {
1092
- return (e, i) => {
1093
- e instanceof Vt ? Object.defineProperty(e, i, {
1056
+ function xo(r) {
1057
+ return (e, n) => {
1058
+ e instanceof Vt ? Object.defineProperty(e, n, {
1094
1059
  enumerable: !0,
1095
1060
  get() {
1096
1061
  var s;
@@ -1098,81 +1063,81 @@ function Zo(r) {
1098
1063
  },
1099
1064
  set(s) {
1100
1065
  var o;
1101
- s !== this[i] && (s ? (this.defines ?? (this.defines = {}), this.defines[r] = "1") : (o = this.defines) == null || delete o[r], this.needsUpdate = !0);
1066
+ s !== this[n] && (s ? (this.defines ?? (this.defines = {}), this.defines[r] = "1") : (o = this.defines) == null || delete o[r], this.needsUpdate = !0);
1102
1067
  }
1103
- }) : Object.defineProperty(e, i, {
1068
+ }) : Object.defineProperty(e, n, {
1104
1069
  enumerable: !0,
1105
1070
  get() {
1106
1071
  return this.defines.has(r);
1107
1072
  },
1108
1073
  set(s) {
1109
- s !== this[i] && (s ? this.defines.set(r, "1") : this.defines.delete(r), this.setChanged());
1074
+ s !== this[n] && (s ? this.defines.set(r, "1") : this.defines.delete(r), this.setChanged());
1110
1075
  }
1111
1076
  });
1112
1077
  };
1113
1078
  }
1114
- function Ho(r, {
1079
+ function Fo(r, {
1115
1080
  min: e = Number.MIN_SAFE_INTEGER,
1116
- max: i = Number.MAX_SAFE_INTEGER
1081
+ max: n = Number.MAX_SAFE_INTEGER
1117
1082
  } = {}) {
1118
1083
  return (s, o) => {
1119
1084
  s instanceof Vt ? Object.defineProperty(s, o, {
1120
1085
  enumerable: !0,
1121
1086
  get() {
1122
1087
  var l;
1123
- const c = (l = this.defines) == null ? void 0 : l[r];
1124
- return c != null ? parseInt(c) : 0;
1088
+ const a = (l = this.defines) == null ? void 0 : l[r];
1089
+ return a != null ? parseInt(a) : 0;
1125
1090
  },
1126
- set(c) {
1091
+ set(a) {
1127
1092
  const l = this[o];
1128
- c !== l && (this.defines ?? (this.defines = {}), this.defines[r] = Je(c, e, i).toFixed(0), this.needsUpdate = !0);
1093
+ a !== l && (this.defines ?? (this.defines = {}), this.defines[r] = $e(a, e, n).toFixed(0), this.needsUpdate = !0);
1129
1094
  }
1130
1095
  }) : Object.defineProperty(s, o, {
1131
1096
  enumerable: !0,
1132
1097
  get() {
1133
- const c = this.defines.get(r);
1134
- return c != null ? parseInt(c) : 0;
1098
+ const a = this.defines.get(r);
1099
+ return a != null ? parseInt(a) : 0;
1135
1100
  },
1136
- set(c) {
1101
+ set(a) {
1137
1102
  const l = this[o];
1138
- c !== l && (this.defines.set(r, Je(c, e, i).toFixed(0)), this.setChanged());
1103
+ a !== l && (this.defines.set(r, $e(a, e, n).toFixed(0)), this.setChanged());
1139
1104
  }
1140
1105
  });
1141
1106
  };
1142
1107
  }
1143
- function Go(r, {
1108
+ function Mo(r, {
1144
1109
  min: e = -1 / 0,
1145
- max: i = 1 / 0,
1110
+ max: n = 1 / 0,
1146
1111
  precision: s = 7
1147
1112
  } = {}) {
1148
- return (o, c) => {
1149
- o instanceof Vt ? Object.defineProperty(o, c, {
1113
+ return (o, a) => {
1114
+ o instanceof Vt ? Object.defineProperty(o, a, {
1150
1115
  enumerable: !0,
1151
1116
  get() {
1152
- var v;
1153
- const l = (v = this.defines) == null ? void 0 : v[r];
1117
+ var u;
1118
+ const l = (u = this.defines) == null ? void 0 : u[r];
1154
1119
  return l != null ? parseFloat(l) : 0;
1155
1120
  },
1156
1121
  set(l) {
1157
- const v = this[c];
1158
- l !== v && (this.defines ?? (this.defines = {}), this.defines[r] = Je(l, e, i).toFixed(s), this.needsUpdate = !0);
1122
+ const u = this[a];
1123
+ l !== u && (this.defines ?? (this.defines = {}), this.defines[r] = $e(l, e, n).toFixed(s), this.needsUpdate = !0);
1159
1124
  }
1160
- }) : Object.defineProperty(o, c, {
1125
+ }) : Object.defineProperty(o, a, {
1161
1126
  enumerable: !0,
1162
1127
  get() {
1163
1128
  const l = this.defines.get(r);
1164
1129
  return l != null ? parseFloat(l) : 0;
1165
1130
  },
1166
1131
  set(l) {
1167
- const v = this[c];
1168
- l !== v && (this.defines.set(r, Je(l, e, i).toFixed(s)), this.setChanged());
1132
+ const u = this[a];
1133
+ l !== u && (this.defines.set(r, $e(l, e, n).toFixed(s)), this.setChanged());
1169
1134
  }
1170
1135
  });
1171
1136
  };
1172
1137
  }
1173
- function Wo(r, { validate: e } = {}) {
1174
- return (i, s) => {
1175
- i instanceof Vt ? Object.defineProperty(i, s, {
1138
+ function Po(r, { validate: e } = {}) {
1139
+ return (n, s) => {
1140
+ n instanceof Vt ? Object.defineProperty(n, s, {
1176
1141
  enumerable: !0,
1177
1142
  get() {
1178
1143
  var o;
@@ -1187,7 +1152,7 @@ function Wo(r, { validate: e } = {}) {
1187
1152
  this.defines ?? (this.defines = {}), this.defines[r] = o, this.needsUpdate = !0;
1188
1153
  }
1189
1154
  }
1190
- }) : Object.defineProperty(i, s, {
1155
+ }) : Object.defineProperty(n, s, {
1191
1156
  enumerable: !0,
1192
1157
  get() {
1193
1158
  return this.defines.get(r) ?? "";
@@ -1204,35 +1169,35 @@ function Wo(r, { validate: e } = {}) {
1204
1169
  });
1205
1170
  };
1206
1171
  }
1207
- function Xo(r, ...e) {
1208
- const i = {};
1172
+ function Bo(r, ...e) {
1173
+ const n = {};
1209
1174
  for (let s = 0; s < e.length; s += 2) {
1210
- const o = e[s], c = e[s + 1];
1211
- for (const l of c)
1212
- i[l] = {
1175
+ const o = e[s], a = e[s + 1];
1176
+ for (const l of a)
1177
+ n[l] = {
1213
1178
  enumerable: !0,
1214
1179
  get: () => o[l],
1215
- set: (v) => {
1216
- o[l] = v;
1180
+ set: (u) => {
1181
+ o[l] = u;
1217
1182
  }
1218
1183
  };
1219
1184
  }
1220
- return Object.defineProperties(r, i), r;
1185
+ return Object.defineProperties(r, n), r;
1221
1186
  }
1222
- function Yo(r, e, i) {
1187
+ function Do(r, e, n) {
1223
1188
  const s = {};
1224
- for (const o of i)
1189
+ for (const o of n)
1225
1190
  s[o] = {
1226
1191
  enumerable: !0,
1227
1192
  get: () => e.uniforms[o].value,
1228
- set: (c) => {
1229
- e.uniforms[o].value = c;
1193
+ set: (a) => {
1194
+ e.uniforms[o].value = a;
1230
1195
  }
1231
1196
  };
1232
1197
  return Object.defineProperties(r, s), r;
1233
1198
  }
1234
- const Xs = parseInt(Li.replace(/\D+/g, ""));
1235
- var ve = Uint8Array, Le = Uint16Array, Tr = Uint32Array, zn = new ve([
1199
+ const zs = parseInt(Ci.replace(/\D+/g, ""));
1200
+ var ve = Uint8Array, Me = Uint16Array, Er = Uint32Array, Pn = new ve([
1236
1201
  0,
1237
1202
  0,
1238
1203
  0,
@@ -1267,7 +1232,7 @@ var ve = Uint8Array, Le = Uint16Array, Tr = Uint32Array, zn = new ve([
1267
1232
  0,
1268
1233
  /* impossible */
1269
1234
  0
1270
- ]), kn = new ve([
1235
+ ]), Bn = new ve([
1271
1236
  0,
1272
1237
  0,
1273
1238
  0,
@@ -1301,129 +1266,129 @@ var ve = Uint8Array, Le = Uint16Array, Tr = Uint32Array, zn = new ve([
1301
1266
  /* unused */
1302
1267
  0,
1303
1268
  0
1304
- ]), Ys = new ve([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), Zn = function(r, e) {
1305
- for (var i = new Le(31), s = 0; s < 31; ++s)
1306
- i[s] = e += 1 << r[s - 1];
1307
- for (var o = new Tr(i[30]), s = 1; s < 30; ++s)
1308
- for (var c = i[s]; c < i[s + 1]; ++c)
1309
- o[c] = c - i[s] << 5 | s;
1310
- return [i, o];
1311
- }, Hn = Zn(zn, 2), Gn = Hn[0], qs = Hn[1];
1312
- Gn[28] = 258, qs[258] = 28;
1313
- var Vs = Zn(kn, 0), Js = Vs[0], Er = new Le(32768);
1269
+ ]), ks = new ve([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), Dn = function(r, e) {
1270
+ for (var n = new Me(31), s = 0; s < 31; ++s)
1271
+ n[s] = e += 1 << r[s - 1];
1272
+ for (var o = new Er(n[30]), s = 1; s < 30; ++s)
1273
+ for (var a = n[s]; a < n[s + 1]; ++a)
1274
+ o[a] = a - n[s] << 5 | s;
1275
+ return [n, o];
1276
+ }, Ln = Dn(Pn, 2), zn = Ln[0], Zs = Ln[1];
1277
+ zn[28] = 258, Zs[258] = 28;
1278
+ var Hs = Dn(Bn, 0), Gs = Hs[0], Tr = new Me(32768);
1314
1279
  for (var G = 0; G < 32768; ++G) {
1315
1280
  var Fe = (G & 43690) >>> 1 | (G & 21845) << 1;
1316
- Fe = (Fe & 52428) >>> 2 | (Fe & 13107) << 2, Fe = (Fe & 61680) >>> 4 | (Fe & 3855) << 4, Er[G] = ((Fe & 65280) >>> 8 | (Fe & 255) << 8) >>> 1;
1281
+ Fe = (Fe & 52428) >>> 2 | (Fe & 13107) << 2, Fe = (Fe & 61680) >>> 4 | (Fe & 3855) << 4, Tr[G] = ((Fe & 65280) >>> 8 | (Fe & 255) << 8) >>> 1;
1317
1282
  }
1318
- var pt = function(r, e, i) {
1319
- for (var s = r.length, o = 0, c = new Le(e); o < s; ++o)
1320
- ++c[r[o] - 1];
1321
- var l = new Le(e);
1283
+ var pt = function(r, e, n) {
1284
+ for (var s = r.length, o = 0, a = new Me(e); o < s; ++o)
1285
+ ++a[r[o] - 1];
1286
+ var l = new Me(e);
1322
1287
  for (o = 0; o < e; ++o)
1323
- l[o] = l[o - 1] + c[o - 1] << 1;
1324
- var v;
1325
- if (i) {
1326
- v = new Le(1 << e);
1288
+ l[o] = l[o - 1] + a[o - 1] << 1;
1289
+ var u;
1290
+ if (n) {
1291
+ u = new Me(1 << e);
1327
1292
  var y = 15 - e;
1328
1293
  for (o = 0; o < s; ++o)
1329
1294
  if (r[o])
1330
- for (var E = o << 4 | r[o], b = e - r[o], U = l[r[o] - 1]++ << b, q = U | (1 << b) - 1; U <= q; ++U)
1331
- v[Er[U] >>> y] = E;
1295
+ for (var E = o << 4 | r[o], I = e - r[o], U = l[r[o] - 1]++ << I, q = U | (1 << I) - 1; U <= q; ++U)
1296
+ u[Tr[U] >>> y] = E;
1332
1297
  } else
1333
- for (v = new Le(s), o = 0; o < s; ++o)
1334
- r[o] && (v[o] = Er[l[r[o] - 1]++] >>> 15 - r[o]);
1335
- return v;
1336
- }, St = new ve(288);
1298
+ for (u = new Me(s), o = 0; o < s; ++o)
1299
+ r[o] && (u[o] = Tr[l[r[o] - 1]++] >>> 15 - r[o]);
1300
+ return u;
1301
+ }, Et = new ve(288);
1337
1302
  for (var G = 0; G < 144; ++G)
1338
- St[G] = 8;
1303
+ Et[G] = 8;
1339
1304
  for (var G = 144; G < 256; ++G)
1340
- St[G] = 9;
1305
+ Et[G] = 9;
1341
1306
  for (var G = 256; G < 280; ++G)
1342
- St[G] = 7;
1307
+ Et[G] = 7;
1343
1308
  for (var G = 280; G < 288; ++G)
1344
- St[G] = 8;
1345
- var Wn = new ve(32);
1309
+ Et[G] = 8;
1310
+ var kn = new ve(32);
1346
1311
  for (var G = 0; G < 32; ++G)
1347
- Wn[G] = 5;
1348
- var $s = /* @__PURE__ */ pt(St, 9, 1), Qs = /* @__PURE__ */ pt(Wn, 5, 1), ur = function(r) {
1349
- for (var e = r[0], i = 1; i < r.length; ++i)
1350
- r[i] > e && (e = r[i]);
1312
+ kn[G] = 5;
1313
+ var Ws = /* @__PURE__ */ pt(Et, 9, 1), Xs = /* @__PURE__ */ pt(kn, 5, 1), hr = function(r) {
1314
+ for (var e = r[0], n = 1; n < r.length; ++n)
1315
+ r[n] > e && (e = r[n]);
1351
1316
  return e;
1352
- }, de = function(r, e, i) {
1317
+ }, we = function(r, e, n) {
1353
1318
  var s = e / 8 | 0;
1354
- return (r[s] | r[s + 1] << 8) >> (e & 7) & i;
1355
- }, hr = function(r, e) {
1356
- var i = e / 8 | 0;
1357
- return (r[i] | r[i + 1] << 8 | r[i + 2] << 16) >> (e & 7);
1358
- }, js = function(r) {
1319
+ return (r[s] | r[s + 1] << 8) >> (e & 7) & n;
1320
+ }, ur = function(r, e) {
1321
+ var n = e / 8 | 0;
1322
+ return (r[n] | r[n + 1] << 8 | r[n + 2] << 16) >> (e & 7);
1323
+ }, Ys = function(r) {
1359
1324
  return (r / 8 | 0) + (r & 7 && 1);
1360
- }, Ks = function(r, e, i) {
1361
- (i == null || i > r.length) && (i = r.length);
1362
- var s = new (r instanceof Le ? Le : r instanceof Tr ? Tr : ve)(i - e);
1363
- return s.set(r.subarray(e, i)), s;
1364
- }, eo = function(r, e, i) {
1325
+ }, qs = function(r, e, n) {
1326
+ (n == null || n > r.length) && (n = r.length);
1327
+ var s = new (r instanceof Me ? Me : r instanceof Er ? Er : ve)(n - e);
1328
+ return s.set(r.subarray(e, n)), s;
1329
+ }, Vs = function(r, e, n) {
1365
1330
  var s = r.length;
1366
- if (!s || i && !i.l && s < 5)
1331
+ if (!s || n && !n.l && s < 5)
1367
1332
  return e || new ve(0);
1368
- var o = !e || i, c = !i || i.i;
1369
- i || (i = {}), e || (e = new ve(s * 3));
1333
+ var o = !e || n, a = !n || n.i;
1334
+ n || (n = {}), e || (e = new ve(s * 3));
1370
1335
  var l = function(P) {
1371
1336
  var be = e.length;
1372
1337
  if (P > be) {
1373
1338
  var Ne = new ve(Math.max(be * 2, P));
1374
1339
  Ne.set(e), e = Ne;
1375
1340
  }
1376
- }, v = i.f || 0, y = i.p || 0, E = i.b || 0, b = i.l, U = i.d, q = i.m, se = i.n, Ze = s * 8;
1341
+ }, u = n.f || 0, y = n.p || 0, E = n.b || 0, I = n.l, U = n.d, q = n.m, se = n.n, Ze = s * 8;
1377
1342
  do {
1378
- if (!b) {
1379
- i.f = v = de(r, y, 1);
1380
- var Tt = de(r, y + 1, 3);
1343
+ if (!I) {
1344
+ n.f = u = we(r, y, 1);
1345
+ var Tt = we(r, y + 1, 3);
1381
1346
  if (y += 3, Tt)
1382
1347
  if (Tt == 1)
1383
- b = $s, U = Qs, q = 9, se = 5;
1348
+ I = Ws, U = Xs, q = 9, se = 5;
1384
1349
  else if (Tt == 2) {
1385
- var _t = de(r, y, 31) + 257, er = de(r, y + 10, 15) + 4, tr = _t + de(r, y + 5, 31) + 1;
1350
+ var bt = we(r, y, 31) + 257, er = we(r, y + 10, 15) + 4, tr = bt + we(r, y + 5, 31) + 1;
1386
1351
  y += 14;
1387
- for (var He = new ve(tr), bt = new ve(19), oe = 0; oe < er; ++oe)
1388
- bt[Ys[oe]] = de(r, y + oe * 3, 7);
1352
+ for (var He = new ve(tr), Nt = new ve(19), oe = 0; oe < er; ++oe)
1353
+ Nt[ks[oe]] = we(r, y + oe * 3, 7);
1389
1354
  y += er * 3;
1390
- for (var Nt = ur(bt), rr = (1 << Nt) - 1, nr = pt(bt, Nt, 1), oe = 0; oe < tr; ) {
1391
- var le = nr[de(r, y, rr)];
1355
+ for (var Ot = hr(Nt), rr = (1 << Ot) - 1, nr = pt(Nt, Ot, 1), oe = 0; oe < tr; ) {
1356
+ var le = nr[we(r, y, rr)];
1392
1357
  y += le & 15;
1393
1358
  var pe = le >>> 4;
1394
1359
  if (pe < 16)
1395
1360
  He[oe++] = pe;
1396
1361
  else {
1397
- var _e = 0, ge = 0;
1398
- for (pe == 16 ? (ge = 3 + de(r, y, 3), y += 2, _e = He[oe - 1]) : pe == 17 ? (ge = 3 + de(r, y, 7), y += 3) : pe == 18 && (ge = 11 + de(r, y, 127), y += 7); ge--; )
1362
+ var _e = 0, Ae = 0;
1363
+ for (pe == 16 ? (Ae = 3 + we(r, y, 3), y += 2, _e = He[oe - 1]) : pe == 17 ? (Ae = 3 + we(r, y, 7), y += 3) : pe == 18 && (Ae = 11 + we(r, y, 127), y += 7); Ae--; )
1399
1364
  He[oe++] = _e;
1400
1365
  }
1401
1366
  }
1402
- var Ot = He.subarray(0, _t), Se = He.subarray(_t);
1403
- q = ur(Ot), se = ur(Se), b = pt(Ot, q, 1), U = pt(Se, se, 1);
1367
+ var Ut = He.subarray(0, bt), Se = He.subarray(bt);
1368
+ q = hr(Ut), se = hr(Se), I = pt(Ut, q, 1), U = pt(Se, se, 1);
1404
1369
  } else
1405
1370
  throw "invalid block type";
1406
1371
  else {
1407
- var pe = js(y) + 4, Et = r[pe - 4] | r[pe - 3] << 8, It = pe + Et;
1408
- if (It > s) {
1409
- if (c)
1372
+ var pe = Ys(y) + 4, It = r[pe - 4] | r[pe - 3] << 8, _t = pe + It;
1373
+ if (_t > s) {
1374
+ if (a)
1410
1375
  throw "unexpected EOF";
1411
1376
  break;
1412
1377
  }
1413
- o && l(E + Et), e.set(r.subarray(pe, It), E), i.b = E += Et, i.p = y = It * 8;
1378
+ o && l(E + It), e.set(r.subarray(pe, _t), E), n.b = E += It, n.p = y = _t * 8;
1414
1379
  continue;
1415
1380
  }
1416
1381
  if (y > Ze) {
1417
- if (c)
1382
+ if (a)
1418
1383
  throw "unexpected EOF";
1419
1384
  break;
1420
1385
  }
1421
1386
  }
1422
1387
  o && l(E + 131072);
1423
- for (var mt = (1 << q) - 1, Ut = (1 << se) - 1, je = y; ; je = y) {
1424
- var _e = b[hr(r, y) & mt], ee = _e >>> 4;
1388
+ for (var mt = (1 << q) - 1, Ct = (1 << se) - 1, je = y; ; je = y) {
1389
+ var _e = I[ur(r, y) & mt], ee = _e >>> 4;
1425
1390
  if (y += _e & 15, y > Ze) {
1426
- if (c)
1391
+ if (a)
1427
1392
  throw "unexpected EOF";
1428
1393
  break;
1429
1394
  }
@@ -1432,25 +1397,25 @@ var $s = /* @__PURE__ */ pt(St, 9, 1), Qs = /* @__PURE__ */ pt(Wn, 5, 1), ur = f
1432
1397
  if (ee < 256)
1433
1398
  e[E++] = ee;
1434
1399
  else if (ee == 256) {
1435
- je = y, b = null;
1400
+ je = y, I = null;
1436
1401
  break;
1437
1402
  } else {
1438
1403
  var Ge = ee - 254;
1439
1404
  if (ee > 264) {
1440
- var oe = ee - 257, re = zn[oe];
1441
- Ge = de(r, y, (1 << re) - 1) + Gn[oe], y += re;
1405
+ var oe = ee - 257, re = Pn[oe];
1406
+ Ge = we(r, y, (1 << re) - 1) + zn[oe], y += re;
1442
1407
  }
1443
- var Pe = U[hr(r, y) & Ut], Me = Pe >>> 4;
1408
+ var Pe = U[ur(r, y) & Ct], Be = Pe >>> 4;
1444
1409
  if (!Pe)
1445
1410
  throw "invalid distance";
1446
1411
  y += Pe & 15;
1447
- var Se = Js[Me];
1448
- if (Me > 3) {
1449
- var re = kn[Me];
1450
- Se += hr(r, y) & (1 << re) - 1, y += re;
1412
+ var Se = Gs[Be];
1413
+ if (Be > 3) {
1414
+ var re = Bn[Be];
1415
+ Se += ur(r, y) & (1 << re) - 1, y += re;
1451
1416
  }
1452
1417
  if (y > Ze) {
1453
- if (c)
1418
+ if (a)
1454
1419
  throw "unexpected EOF";
1455
1420
  break;
1456
1421
  }
@@ -1460,206 +1425,206 @@ var $s = /* @__PURE__ */ pt(St, 9, 1), Qs = /* @__PURE__ */ pt(Wn, 5, 1), ur = f
1460
1425
  E = Ke;
1461
1426
  }
1462
1427
  }
1463
- i.l = b, i.p = je, i.b = E, b && (v = 1, i.m = q, i.d = U, i.n = se);
1464
- } while (!v);
1465
- return E == e.length ? e : Ks(e, 0, E);
1466
- }, to = /* @__PURE__ */ new ve(0), ro = function(r) {
1428
+ n.l = I, n.p = je, n.b = E, I && (u = 1, n.m = q, n.d = U, n.n = se);
1429
+ } while (!u);
1430
+ return E == e.length ? e : qs(e, 0, E);
1431
+ }, $s = /* @__PURE__ */ new ve(0), Js = function(r) {
1467
1432
  if ((r[0] & 15) != 8 || r[0] >>> 4 > 7 || (r[0] << 8 | r[1]) % 31)
1468
1433
  throw "invalid zlib data";
1469
1434
  if (r[1] & 32)
1470
1435
  throw "invalid zlib data: preset dictionaries not supported";
1471
1436
  };
1472
- function Pt(r, e) {
1473
- return eo((ro(r), r.subarray(2, -4)), e);
1437
+ function Bt(r, e) {
1438
+ return Vs((Js(r), r.subarray(2, -4)), e);
1474
1439
  }
1475
- var no = typeof TextDecoder < "u" && /* @__PURE__ */ new TextDecoder(), io = 0;
1440
+ var Qs = typeof TextDecoder < "u" && /* @__PURE__ */ new TextDecoder(), js = 0;
1476
1441
  try {
1477
- no.decode(to, { stream: !0 }), io = 1;
1442
+ Qs.decode($s, { stream: !0 }), js = 1;
1478
1443
  } catch {
1479
1444
  }
1480
- const at = Xs >= 152;
1481
- class so extends Pi {
1445
+ const at = zs >= 152;
1446
+ class Zn extends Ri {
1482
1447
  constructor(e) {
1483
1448
  super(e), this.type = lt;
1484
1449
  }
1485
1450
  parse(e) {
1486
- const Nt = Math.pow(2.7182818, 2.2);
1487
- function rr(t, n) {
1488
- for (var a = 0, u = 0; u < 65536; ++u)
1489
- (u == 0 || t[u >> 3] & 1 << (u & 7)) && (n[a++] = u);
1490
- for (var h = a - 1; a < 65536; )
1491
- n[a++] = 0;
1492
- return h;
1451
+ const Ot = Math.pow(2.7182818, 2.2);
1452
+ function rr(t, i) {
1453
+ for (var c = 0, h = 0; h < 65536; ++h)
1454
+ (h == 0 || t[h >> 3] & 1 << (h & 7)) && (i[c++] = h);
1455
+ for (var f = c - 1; c < 65536; )
1456
+ i[c++] = 0;
1457
+ return f;
1493
1458
  }
1494
1459
  function nr(t) {
1495
- for (var n = 0; n < 16384; n++)
1496
- t[n] = {}, t[n].len = 0, t[n].lit = 0, t[n].p = null;
1460
+ for (var i = 0; i < 16384; i++)
1461
+ t[i] = {}, t[i].len = 0, t[i].lit = 0, t[i].p = null;
1497
1462
  }
1498
1463
  const le = { l: 0, c: 0, lc: 0 };
1499
- function _e(t, n, a, u, h) {
1500
- for (; a < t; )
1501
- n = n << 8 | Dr(u, h), a += 8;
1502
- a -= t, le.l = n >> a & (1 << t) - 1, le.c = n, le.lc = a;
1503
- }
1504
- const ge = new Array(59);
1505
- function Ot(t) {
1506
- for (var n = 0; n <= 58; ++n)
1507
- ge[n] = 0;
1508
- for (var n = 0; n < 65537; ++n)
1509
- ge[t[n]] += 1;
1510
- for (var a = 0, n = 58; n > 0; --n) {
1511
- var u = a + ge[n] >> 1;
1512
- ge[n] = a, a = u;
1464
+ function _e(t, i, c, h, f) {
1465
+ for (; c < t; )
1466
+ i = i << 8 | Dr(h, f), c += 8;
1467
+ c -= t, le.l = i >> c & (1 << t) - 1, le.c = i, le.lc = c;
1468
+ }
1469
+ const Ae = new Array(59);
1470
+ function Ut(t) {
1471
+ for (var i = 0; i <= 58; ++i)
1472
+ Ae[i] = 0;
1473
+ for (var i = 0; i < 65537; ++i)
1474
+ Ae[t[i]] += 1;
1475
+ for (var c = 0, i = 58; i > 0; --i) {
1476
+ var h = c + Ae[i] >> 1;
1477
+ Ae[i] = c, c = h;
1513
1478
  }
1514
- for (var n = 0; n < 65537; ++n) {
1515
- var h = t[n];
1516
- h > 0 && (t[n] = h | ge[h]++ << 6);
1479
+ for (var i = 0; i < 65537; ++i) {
1480
+ var f = t[i];
1481
+ f > 0 && (t[i] = f | Ae[f]++ << 6);
1517
1482
  }
1518
1483
  }
1519
- function Se(t, n, a, u, h, f, d) {
1520
- for (var p = a, g = 0, A = 0; h <= f; h++) {
1521
- if (p.value - a.value > u)
1484
+ function Se(t, i, c, h, f, v, w) {
1485
+ for (var p = c, A = 0, g = 0; f <= v; f++) {
1486
+ if (p.value - c.value > h)
1522
1487
  return !1;
1523
- _e(6, g, A, t, p);
1488
+ _e(6, A, g, t, p);
1524
1489
  var S = le.l;
1525
- if (g = le.c, A = le.lc, d[h] = S, S == 63) {
1526
- if (p.value - a.value > u)
1490
+ if (A = le.c, g = le.lc, w[f] = S, S == 63) {
1491
+ if (p.value - c.value > h)
1527
1492
  throw "Something wrong with hufUnpackEncTable";
1528
- _e(8, g, A, t, p);
1529
- var w = le.l + 6;
1530
- if (g = le.c, A = le.lc, h + w > f + 1)
1493
+ _e(8, A, g, t, p);
1494
+ var d = le.l + 6;
1495
+ if (A = le.c, g = le.lc, f + d > v + 1)
1531
1496
  throw "Something wrong with hufUnpackEncTable";
1532
- for (; w--; )
1533
- d[h++] = 0;
1534
- h--;
1497
+ for (; d--; )
1498
+ w[f++] = 0;
1499
+ f--;
1535
1500
  } else if (S >= 59) {
1536
- var w = S - 59 + 2;
1537
- if (h + w > f + 1)
1501
+ var d = S - 59 + 2;
1502
+ if (f + d > v + 1)
1538
1503
  throw "Something wrong with hufUnpackEncTable";
1539
- for (; w--; )
1540
- d[h++] = 0;
1541
- h--;
1504
+ for (; d--; )
1505
+ w[f++] = 0;
1506
+ f--;
1542
1507
  }
1543
1508
  }
1544
- Ot(d);
1509
+ Ut(w);
1545
1510
  }
1546
1511
  function mt(t) {
1547
1512
  return t & 63;
1548
1513
  }
1549
- function Ut(t) {
1514
+ function Ct(t) {
1550
1515
  return t >> 6;
1551
1516
  }
1552
- function je(t, n, a, u) {
1553
- for (; n <= a; n++) {
1554
- var h = Ut(t[n]), f = mt(t[n]);
1555
- if (h >> f)
1517
+ function je(t, i, c, h) {
1518
+ for (; i <= c; i++) {
1519
+ var f = Ct(t[i]), v = mt(t[i]);
1520
+ if (f >> v)
1556
1521
  throw "Invalid table entry";
1557
- if (f > 14) {
1558
- var d = u[h >> f - 14];
1559
- if (d.len)
1522
+ if (v > 14) {
1523
+ var w = h[f >> v - 14];
1524
+ if (w.len)
1560
1525
  throw "Invalid table entry";
1561
- if (d.lit++, d.p) {
1562
- var p = d.p;
1563
- d.p = new Array(d.lit);
1564
- for (var g = 0; g < d.lit - 1; ++g)
1565
- d.p[g] = p[g];
1526
+ if (w.lit++, w.p) {
1527
+ var p = w.p;
1528
+ w.p = new Array(w.lit);
1529
+ for (var A = 0; A < w.lit - 1; ++A)
1530
+ w.p[A] = p[A];
1566
1531
  } else
1567
- d.p = new Array(1);
1568
- d.p[d.lit - 1] = n;
1569
- } else if (f)
1570
- for (var A = 0, g = 1 << 14 - f; g > 0; g--) {
1571
- var d = u[(h << 14 - f) + A];
1572
- if (d.len || d.p)
1532
+ w.p = new Array(1);
1533
+ w.p[w.lit - 1] = i;
1534
+ } else if (v)
1535
+ for (var g = 0, A = 1 << 14 - v; A > 0; A--) {
1536
+ var w = h[(f << 14 - v) + g];
1537
+ if (w.len || w.p)
1573
1538
  throw "Invalid table entry";
1574
- d.len = f, d.lit = n, A++;
1539
+ w.len = v, w.lit = i, g++;
1575
1540
  }
1576
1541
  }
1577
1542
  return !0;
1578
1543
  }
1579
1544
  const ee = { c: 0, lc: 0 };
1580
- function Ge(t, n, a, u) {
1581
- t = t << 8 | Dr(a, u), n += 8, ee.c = t, ee.lc = n;
1545
+ function Ge(t, i, c, h) {
1546
+ t = t << 8 | Dr(c, h), i += 8, ee.c = t, ee.lc = i;
1582
1547
  }
1583
1548
  const re = { c: 0, lc: 0 };
1584
- function Pe(t, n, a, u, h, f, d, p, g, A) {
1585
- if (t == n) {
1586
- u < 8 && (Ge(a, u, h, d), a = ee.c, u = ee.lc), u -= 8;
1587
- var S = a >> u, S = new Uint8Array([S])[0];
1588
- if (g.value + S > A)
1549
+ function Pe(t, i, c, h, f, v, w, p, A, g) {
1550
+ if (t == i) {
1551
+ h < 8 && (Ge(c, h, f, w), c = ee.c, h = ee.lc), h -= 8;
1552
+ var S = c >> h, S = new Uint8Array([S])[0];
1553
+ if (A.value + S > g)
1589
1554
  return !1;
1590
- for (var w = p[g.value - 1]; S-- > 0; )
1591
- p[g.value++] = w;
1592
- } else if (g.value < A)
1593
- p[g.value++] = t;
1555
+ for (var d = p[A.value - 1]; S-- > 0; )
1556
+ p[A.value++] = d;
1557
+ } else if (A.value < g)
1558
+ p[A.value++] = t;
1594
1559
  else
1595
1560
  return !1;
1596
- re.c = a, re.lc = u;
1561
+ re.c = c, re.lc = h;
1597
1562
  }
1598
- function Me(t) {
1563
+ function Be(t) {
1599
1564
  return t & 65535;
1600
1565
  }
1601
1566
  function Ke(t) {
1602
- var n = Me(t);
1603
- return n > 32767 ? n - 65536 : n;
1567
+ var i = Be(t);
1568
+ return i > 32767 ? i - 65536 : i;
1604
1569
  }
1605
1570
  const P = { a: 0, b: 0 };
1606
- function be(t, n) {
1607
- var a = Ke(t), u = Ke(n), h = u, f = a + (h & 1) + (h >> 1), d = f, p = f - h;
1608
- P.a = d, P.b = p;
1609
- }
1610
- function Ne(t, n) {
1611
- var a = Me(t), u = Me(n), h = a - (u >> 1) & 65535, f = u + h - 32768 & 65535;
1612
- P.a = f, P.b = h;
1613
- }
1614
- function Vn(t, n, a, u, h, f, d) {
1615
- for (var p = d < 16384, g = a > h ? h : a, A = 1, S; A <= g; )
1616
- A <<= 1;
1617
- for (A >>= 1, S = A, A >>= 1; A >= 1; ) {
1618
- for (var w = 0, Y = w + f * (h - S), I = f * A, _ = f * S, N = u * A, m = u * S, M, z, V, te; w <= Y; w += _) {
1619
- for (var k = w, Te = w + u * (a - S); k <= Te; k += m) {
1620
- var H = k + N, J = k + I, Oe = J + N;
1621
- p ? (be(t[k + n], t[J + n]), M = P.a, V = P.b, be(t[H + n], t[Oe + n]), z = P.a, te = P.b, be(M, z), t[k + n] = P.a, t[H + n] = P.b, be(V, te), t[J + n] = P.a, t[Oe + n] = P.b) : (Ne(t[k + n], t[J + n]), M = P.a, V = P.b, Ne(t[H + n], t[Oe + n]), z = P.a, te = P.b, Ne(M, z), t[k + n] = P.a, t[H + n] = P.b, Ne(V, te), t[J + n] = P.a, t[Oe + n] = P.b);
1571
+ function be(t, i) {
1572
+ var c = Ke(t), h = Ke(i), f = h, v = c + (f & 1) + (f >> 1), w = v, p = v - f;
1573
+ P.a = w, P.b = p;
1574
+ }
1575
+ function Ne(t, i) {
1576
+ var c = Be(t), h = Be(i), f = c - (h >> 1) & 65535, v = h + f - 32768 & 65535;
1577
+ P.a = v, P.b = f;
1578
+ }
1579
+ function Xn(t, i, c, h, f, v, w) {
1580
+ for (var p = w < 16384, A = c > f ? f : c, g = 1, S; g <= A; )
1581
+ g <<= 1;
1582
+ for (g >>= 1, S = g, g >>= 1; g >= 1; ) {
1583
+ for (var d = 0, Y = d + v * (f - S), _ = v * g, b = v * S, N = h * g, m = h * S, B, z, V, te; d <= Y; d += b) {
1584
+ for (var k = d, Ee = d + h * (c - S); k <= Ee; k += m) {
1585
+ var H = k + N, $ = k + _, Oe = $ + N;
1586
+ p ? (be(t[k + i], t[$ + i]), B = P.a, V = P.b, be(t[H + i], t[Oe + i]), z = P.a, te = P.b, be(B, z), t[k + i] = P.a, t[H + i] = P.b, be(V, te), t[$ + i] = P.a, t[Oe + i] = P.b) : (Ne(t[k + i], t[$ + i]), B = P.a, V = P.b, Ne(t[H + i], t[Oe + i]), z = P.a, te = P.b, Ne(B, z), t[k + i] = P.a, t[H + i] = P.b, Ne(V, te), t[$ + i] = P.a, t[Oe + i] = P.b);
1622
1587
  }
1623
- if (a & A) {
1624
- var J = k + I;
1625
- p ? be(t[k + n], t[J + n]) : Ne(t[k + n], t[J + n]), M = P.a, t[J + n] = P.b, t[k + n] = M;
1588
+ if (c & g) {
1589
+ var $ = k + _;
1590
+ p ? be(t[k + i], t[$ + i]) : Ne(t[k + i], t[$ + i]), B = P.a, t[$ + i] = P.b, t[k + i] = B;
1626
1591
  }
1627
1592
  }
1628
- if (h & A)
1629
- for (var k = w, Te = w + u * (a - S); k <= Te; k += m) {
1593
+ if (f & g)
1594
+ for (var k = d, Ee = d + h * (c - S); k <= Ee; k += m) {
1630
1595
  var H = k + N;
1631
- p ? be(t[k + n], t[H + n]) : Ne(t[k + n], t[H + n]), M = P.a, t[H + n] = P.b, t[k + n] = M;
1596
+ p ? be(t[k + i], t[H + i]) : Ne(t[k + i], t[H + i]), B = P.a, t[H + i] = P.b, t[k + i] = B;
1632
1597
  }
1633
- S = A, A >>= 1;
1598
+ S = g, g >>= 1;
1634
1599
  }
1635
- return w;
1600
+ return d;
1636
1601
  }
1637
- function Jn(t, n, a, u, h, f, d, p, g, A) {
1638
- for (var S = 0, w = 0, Y = p, I = Math.trunc(h.value + (f + 7) / 8); h.value < I; )
1639
- for (Ge(S, w, a, h), S = ee.c, w = ee.lc; w >= 14; ) {
1640
- var _ = S >> w - 14 & 16383, N = n[_];
1602
+ function Yn(t, i, c, h, f, v, w, p, A, g) {
1603
+ for (var S = 0, d = 0, Y = p, _ = Math.trunc(f.value + (v + 7) / 8); f.value < _; )
1604
+ for (Ge(S, d, c, f), S = ee.c, d = ee.lc; d >= 14; ) {
1605
+ var b = S >> d - 14 & 16383, N = i[b];
1641
1606
  if (N.len)
1642
- w -= N.len, Pe(N.lit, d, S, w, a, u, h, g, A, Y), S = re.c, w = re.lc;
1607
+ d -= N.len, Pe(N.lit, w, S, d, c, h, f, A, g, Y), S = re.c, d = re.lc;
1643
1608
  else {
1644
1609
  if (!N.p)
1645
1610
  throw "hufDecode issues";
1646
1611
  var m;
1647
1612
  for (m = 0; m < N.lit; m++) {
1648
- for (var M = mt(t[N.p[m]]); w < M && h.value < I; )
1649
- Ge(S, w, a, h), S = ee.c, w = ee.lc;
1650
- if (w >= M && Ut(t[N.p[m]]) == (S >> w - M & (1 << M) - 1)) {
1651
- w -= M, Pe(
1613
+ for (var B = mt(t[N.p[m]]); d < B && f.value < _; )
1614
+ Ge(S, d, c, f), S = ee.c, d = ee.lc;
1615
+ if (d >= B && Ct(t[N.p[m]]) == (S >> d - B & (1 << B) - 1)) {
1616
+ d -= B, Pe(
1652
1617
  N.p[m],
1653
- d,
1654
- S,
1655
1618
  w,
1656
- a,
1657
- u,
1619
+ S,
1620
+ d,
1621
+ c,
1658
1622
  h,
1659
- g,
1623
+ f,
1660
1624
  A,
1625
+ g,
1661
1626
  Y
1662
- ), S = re.c, w = re.lc;
1627
+ ), S = re.c, d = re.lc;
1663
1628
  break;
1664
1629
  }
1665
1630
  }
@@ -1667,277 +1632,277 @@ class so extends Pi {
1667
1632
  throw "hufDecode issues";
1668
1633
  }
1669
1634
  }
1670
- var z = 8 - f & 7;
1671
- for (S >>= z, w -= z; w > 0; ) {
1672
- var N = n[S << 14 - w & 16383];
1635
+ var z = 8 - v & 7;
1636
+ for (S >>= z, d -= z; d > 0; ) {
1637
+ var N = i[S << 14 - d & 16383];
1673
1638
  if (N.len)
1674
- w -= N.len, Pe(N.lit, d, S, w, a, u, h, g, A, Y), S = re.c, w = re.lc;
1639
+ d -= N.len, Pe(N.lit, w, S, d, c, h, f, A, g, Y), S = re.c, d = re.lc;
1675
1640
  else
1676
1641
  throw "hufDecode issues";
1677
1642
  }
1678
1643
  return !0;
1679
1644
  }
1680
- function Rr(t, n, a, u, h, f) {
1681
- var d = { value: 0 }, p = a.value, g = ne(n, a), A = ne(n, a);
1682
- a.value += 4;
1683
- var S = ne(n, a);
1684
- if (a.value += 4, g < 0 || g >= 65537 || A < 0 || A >= 65537)
1645
+ function Rr(t, i, c, h, f, v) {
1646
+ var w = { value: 0 }, p = c.value, A = ne(i, c), g = ne(i, c);
1647
+ c.value += 4;
1648
+ var S = ne(i, c);
1649
+ if (c.value += 4, A < 0 || A >= 65537 || g < 0 || g >= 65537)
1685
1650
  throw "Something wrong with HUF_ENCSIZE";
1686
- var w = new Array(65537), Y = new Array(16384);
1651
+ var d = new Array(65537), Y = new Array(16384);
1687
1652
  nr(Y);
1688
- var I = u - (a.value - p);
1689
- if (Se(t, n, a, I, g, A, w), S > 8 * (u - (a.value - p)))
1653
+ var _ = h - (c.value - p);
1654
+ if (Se(t, i, c, _, A, g, d), S > 8 * (h - (c.value - p)))
1690
1655
  throw "Something wrong with hufUncompress";
1691
- je(w, g, A, Y), Jn(w, Y, t, n, a, S, A, f, h, d);
1656
+ je(d, A, g, Y), Yn(d, Y, t, i, c, S, g, v, f, w);
1692
1657
  }
1693
- function $n(t, n, a) {
1694
- for (var u = 0; u < a; ++u)
1695
- n[u] = t[n[u]];
1658
+ function qn(t, i, c) {
1659
+ for (var h = 0; h < c; ++h)
1660
+ i[h] = t[i[h]];
1696
1661
  }
1697
1662
  function xr(t) {
1698
- for (var n = 1; n < t.length; n++) {
1699
- var a = t[n - 1] + t[n] - 128;
1700
- t[n] = a;
1663
+ for (var i = 1; i < t.length; i++) {
1664
+ var c = t[i - 1] + t[i] - 128;
1665
+ t[i] = c;
1701
1666
  }
1702
1667
  }
1703
- function Fr(t, n) {
1704
- for (var a = 0, u = Math.floor((t.length + 1) / 2), h = 0, f = t.length - 1; !(h > f || (n[h++] = t[a++], h > f)); )
1705
- n[h++] = t[u++];
1706
- }
1707
- function Lr(t) {
1708
- for (var n = t.byteLength, a = new Array(), u = 0, h = new DataView(t); n > 0; ) {
1709
- var f = h.getInt8(u++);
1710
- if (f < 0) {
1711
- var d = -f;
1712
- n -= d + 1;
1713
- for (var p = 0; p < d; p++)
1714
- a.push(h.getUint8(u++));
1668
+ function Fr(t, i) {
1669
+ for (var c = 0, h = Math.floor((t.length + 1) / 2), f = 0, v = t.length - 1; !(f > v || (i[f++] = t[c++], f > v)); )
1670
+ i[f++] = t[h++];
1671
+ }
1672
+ function Mr(t) {
1673
+ for (var i = t.byteLength, c = new Array(), h = 0, f = new DataView(t); i > 0; ) {
1674
+ var v = f.getInt8(h++);
1675
+ if (v < 0) {
1676
+ var w = -v;
1677
+ i -= w + 1;
1678
+ for (var p = 0; p < w; p++)
1679
+ c.push(f.getUint8(h++));
1715
1680
  } else {
1716
- var d = f;
1717
- n -= 2;
1718
- for (var g = h.getUint8(u++), p = 0; p < d + 1; p++)
1719
- a.push(g);
1681
+ var w = v;
1682
+ i -= 2;
1683
+ for (var A = f.getUint8(h++), p = 0; p < w + 1; p++)
1684
+ c.push(A);
1720
1685
  }
1721
1686
  }
1722
- return a;
1687
+ return c;
1723
1688
  }
1724
- function Qn(t, n, a, u, h, f) {
1725
- var H = new DataView(f.buffer), d = a[t.idx[0]].width, p = a[t.idx[0]].height, g = 3, A = Math.floor(d / 8), S = Math.ceil(d / 8), w = Math.ceil(p / 8), Y = d - (S - 1) * 8, I = p - (w - 1) * 8, _ = { value: 0 }, N = new Array(g), m = new Array(g), M = new Array(g), z = new Array(g), V = new Array(g);
1726
- for (let D = 0; D < g; ++D)
1727
- V[D] = n[t.idx[D]], N[D] = D < 1 ? 0 : N[D - 1] + S * w, m[D] = new Float32Array(64), M[D] = new Uint16Array(64), z[D] = new Uint16Array(S * 64);
1728
- for (let D = 0; D < w; ++D) {
1689
+ function Vn(t, i, c, h, f, v) {
1690
+ var H = new DataView(v.buffer), w = c[t.idx[0]].width, p = c[t.idx[0]].height, A = 3, g = Math.floor(w / 8), S = Math.ceil(w / 8), d = Math.ceil(p / 8), Y = w - (S - 1) * 8, _ = p - (d - 1) * 8, b = { value: 0 }, N = new Array(A), m = new Array(A), B = new Array(A), z = new Array(A), V = new Array(A);
1691
+ for (let D = 0; D < A; ++D)
1692
+ V[D] = i[t.idx[D]], N[D] = D < 1 ? 0 : N[D - 1] + S * d, m[D] = new Float32Array(64), B[D] = new Uint16Array(64), z[D] = new Uint16Array(S * 64);
1693
+ for (let D = 0; D < d; ++D) {
1729
1694
  var te = 8;
1730
- D == w - 1 && (te = I);
1695
+ D == d - 1 && (te = _);
1731
1696
  var k = 8;
1732
1697
  for (let W = 0; W < S; ++W) {
1733
1698
  W == S - 1 && (k = Y);
1734
- for (let F = 0; F < g; ++F)
1735
- M[F].fill(0), M[F][0] = h[N[F]++], jn(_, u, M[F]), Kn(M[F], m[F]), ei(m[F]);
1736
- ti(m);
1737
- for (let F = 0; F < g; ++F)
1738
- ri(m[F], z[F], W * 64);
1699
+ for (let F = 0; F < A; ++F)
1700
+ B[F].fill(0), B[F][0] = f[N[F]++], $n(b, h, B[F]), Jn(B[F], m[F]), Qn(m[F]);
1701
+ jn(m);
1702
+ for (let F = 0; F < A; ++F)
1703
+ Kn(m[F], z[F], W * 64);
1739
1704
  }
1740
1705
  let K = 0;
1741
- for (let W = 0; W < g; ++W) {
1742
- const F = a[t.idx[W]].type;
1706
+ for (let W = 0; W < A; ++W) {
1707
+ const F = c[t.idx[W]].type;
1743
1708
  for (let fe = 8 * D; fe < 8 * D + te; ++fe) {
1744
1709
  K = V[W][fe];
1745
- for (let De = 0; De < A; ++De) {
1710
+ for (let De = 0; De < g; ++De) {
1746
1711
  const ae = De * 64 + (fe & 7) * 8;
1747
1712
  H.setUint16(K + 0 * 2 * F, z[W][ae + 0], !0), H.setUint16(K + 1 * 2 * F, z[W][ae + 1], !0), H.setUint16(K + 2 * 2 * F, z[W][ae + 2], !0), H.setUint16(K + 3 * 2 * F, z[W][ae + 3], !0), H.setUint16(K + 4 * 2 * F, z[W][ae + 4], !0), H.setUint16(K + 5 * 2 * F, z[W][ae + 5], !0), H.setUint16(K + 6 * 2 * F, z[W][ae + 6], !0), H.setUint16(K + 7 * 2 * F, z[W][ae + 7], !0), K += 8 * 2 * F;
1748
1713
  }
1749
1714
  }
1750
- if (A != S)
1715
+ if (g != S)
1751
1716
  for (let fe = 8 * D; fe < 8 * D + te; ++fe) {
1752
- const De = V[W][fe] + 8 * A * 2 * F, ae = A * 64 + (fe & 7) * 8;
1717
+ const De = V[W][fe] + 8 * g * 2 * F, ae = g * 64 + (fe & 7) * 8;
1753
1718
  for (let xe = 0; xe < k; ++xe)
1754
1719
  H.setUint16(De + xe * 2 * F, z[W][ae + xe], !0);
1755
1720
  }
1756
1721
  }
1757
1722
  }
1758
- for (var Te = new Uint16Array(d), H = new DataView(f.buffer), J = 0; J < g; ++J) {
1759
- a[t.idx[J]].decoded = !0;
1760
- var Oe = a[t.idx[J]].type;
1761
- if (a[J].type == 2)
1723
+ for (var Ee = new Uint16Array(w), H = new DataView(v.buffer), $ = 0; $ < A; ++$) {
1724
+ c[t.idx[$]].decoded = !0;
1725
+ var Oe = c[t.idx[$]].type;
1726
+ if (c[$].type == 2)
1762
1727
  for (var it = 0; it < p; ++it) {
1763
- const D = V[J][it];
1764
- for (var he = 0; he < d; ++he)
1765
- Te[he] = H.getUint16(D + he * 2 * Oe, !0);
1766
- for (var he = 0; he < d; ++he)
1767
- H.setFloat32(D + he * 2 * Oe, T(Te[he]), !0);
1728
+ const D = V[$][it];
1729
+ for (var ue = 0; ue < w; ++ue)
1730
+ Ee[ue] = H.getUint16(D + ue * 2 * Oe, !0);
1731
+ for (var ue = 0; ue < w; ++ue)
1732
+ H.setFloat32(D + ue * 2 * Oe, T(Ee[ue]), !0);
1768
1733
  }
1769
1734
  }
1770
1735
  }
1771
- function jn(t, n, a) {
1772
- for (var u, h = 1; h < 64; )
1773
- u = n[t.value], u == 65280 ? h = 64 : u >> 8 == 255 ? h += u & 255 : (a[h] = u, h++), t.value++;
1736
+ function $n(t, i, c) {
1737
+ for (var h, f = 1; f < 64; )
1738
+ h = i[t.value], h == 65280 ? f = 64 : h >> 8 == 255 ? f += h & 255 : (c[f] = h, f++), t.value++;
1774
1739
  }
1775
- function Kn(t, n) {
1776
- n[0] = T(t[0]), n[1] = T(t[1]), n[2] = T(t[5]), n[3] = T(t[6]), n[4] = T(t[14]), n[5] = T(t[15]), n[6] = T(t[27]), n[7] = T(t[28]), n[8] = T(t[2]), n[9] = T(t[4]), n[10] = T(t[7]), n[11] = T(t[13]), n[12] = T(t[16]), n[13] = T(t[26]), n[14] = T(t[29]), n[15] = T(t[42]), n[16] = T(t[3]), n[17] = T(t[8]), n[18] = T(t[12]), n[19] = T(t[17]), n[20] = T(t[25]), n[21] = T(t[30]), n[22] = T(t[41]), n[23] = T(t[43]), n[24] = T(t[9]), n[25] = T(t[11]), n[26] = T(t[18]), n[27] = T(t[24]), n[28] = T(t[31]), n[29] = T(t[40]), n[30] = T(t[44]), n[31] = T(t[53]), n[32] = T(t[10]), n[33] = T(t[19]), n[34] = T(t[23]), n[35] = T(t[32]), n[36] = T(t[39]), n[37] = T(t[45]), n[38] = T(t[52]), n[39] = T(t[54]), n[40] = T(t[20]), n[41] = T(t[22]), n[42] = T(t[33]), n[43] = T(t[38]), n[44] = T(t[46]), n[45] = T(t[51]), n[46] = T(t[55]), n[47] = T(t[60]), n[48] = T(t[21]), n[49] = T(t[34]), n[50] = T(t[37]), n[51] = T(t[47]), n[52] = T(t[50]), n[53] = T(t[56]), n[54] = T(t[59]), n[55] = T(t[61]), n[56] = T(t[35]), n[57] = T(t[36]), n[58] = T(t[48]), n[59] = T(t[49]), n[60] = T(t[57]), n[61] = T(t[58]), n[62] = T(t[62]), n[63] = T(t[63]);
1740
+ function Jn(t, i) {
1741
+ i[0] = T(t[0]), i[1] = T(t[1]), i[2] = T(t[5]), i[3] = T(t[6]), i[4] = T(t[14]), i[5] = T(t[15]), i[6] = T(t[27]), i[7] = T(t[28]), i[8] = T(t[2]), i[9] = T(t[4]), i[10] = T(t[7]), i[11] = T(t[13]), i[12] = T(t[16]), i[13] = T(t[26]), i[14] = T(t[29]), i[15] = T(t[42]), i[16] = T(t[3]), i[17] = T(t[8]), i[18] = T(t[12]), i[19] = T(t[17]), i[20] = T(t[25]), i[21] = T(t[30]), i[22] = T(t[41]), i[23] = T(t[43]), i[24] = T(t[9]), i[25] = T(t[11]), i[26] = T(t[18]), i[27] = T(t[24]), i[28] = T(t[31]), i[29] = T(t[40]), i[30] = T(t[44]), i[31] = T(t[53]), i[32] = T(t[10]), i[33] = T(t[19]), i[34] = T(t[23]), i[35] = T(t[32]), i[36] = T(t[39]), i[37] = T(t[45]), i[38] = T(t[52]), i[39] = T(t[54]), i[40] = T(t[20]), i[41] = T(t[22]), i[42] = T(t[33]), i[43] = T(t[38]), i[44] = T(t[46]), i[45] = T(t[51]), i[46] = T(t[55]), i[47] = T(t[60]), i[48] = T(t[21]), i[49] = T(t[34]), i[50] = T(t[37]), i[51] = T(t[47]), i[52] = T(t[50]), i[53] = T(t[56]), i[54] = T(t[59]), i[55] = T(t[61]), i[56] = T(t[35]), i[57] = T(t[36]), i[58] = T(t[48]), i[59] = T(t[49]), i[60] = T(t[57]), i[61] = T(t[58]), i[62] = T(t[62]), i[63] = T(t[63]);
1777
1742
  }
1778
- function ei(t) {
1779
- const n = 0.5 * Math.cos(0.7853975), a = 0.5 * Math.cos(3.14159 / 16), u = 0.5 * Math.cos(3.14159 / 8), h = 0.5 * Math.cos(3 * 3.14159 / 16), f = 0.5 * Math.cos(5 * 3.14159 / 16), d = 0.5 * Math.cos(3 * 3.14159 / 8), p = 0.5 * Math.cos(7 * 3.14159 / 16);
1780
- for (var g = new Array(4), A = new Array(4), S = new Array(4), w = new Array(4), Y = 0; Y < 8; ++Y) {
1781
- var I = Y * 8;
1782
- g[0] = u * t[I + 2], g[1] = d * t[I + 2], g[2] = u * t[I + 6], g[3] = d * t[I + 6], A[0] = a * t[I + 1] + h * t[I + 3] + f * t[I + 5] + p * t[I + 7], A[1] = h * t[I + 1] - p * t[I + 3] - a * t[I + 5] - f * t[I + 7], A[2] = f * t[I + 1] - a * t[I + 3] + p * t[I + 5] + h * t[I + 7], A[3] = p * t[I + 1] - f * t[I + 3] + h * t[I + 5] - a * t[I + 7], S[0] = n * (t[I + 0] + t[I + 4]), S[3] = n * (t[I + 0] - t[I + 4]), S[1] = g[0] + g[3], S[2] = g[1] - g[2], w[0] = S[0] + S[1], w[1] = S[3] + S[2], w[2] = S[3] - S[2], w[3] = S[0] - S[1], t[I + 0] = w[0] + A[0], t[I + 1] = w[1] + A[1], t[I + 2] = w[2] + A[2], t[I + 3] = w[3] + A[3], t[I + 4] = w[3] - A[3], t[I + 5] = w[2] - A[2], t[I + 6] = w[1] - A[1], t[I + 7] = w[0] - A[0];
1743
+ function Qn(t) {
1744
+ const i = 0.5 * Math.cos(0.7853975), c = 0.5 * Math.cos(3.14159 / 16), h = 0.5 * Math.cos(3.14159 / 8), f = 0.5 * Math.cos(3 * 3.14159 / 16), v = 0.5 * Math.cos(5 * 3.14159 / 16), w = 0.5 * Math.cos(3 * 3.14159 / 8), p = 0.5 * Math.cos(7 * 3.14159 / 16);
1745
+ for (var A = new Array(4), g = new Array(4), S = new Array(4), d = new Array(4), Y = 0; Y < 8; ++Y) {
1746
+ var _ = Y * 8;
1747
+ A[0] = h * t[_ + 2], A[1] = w * t[_ + 2], A[2] = h * t[_ + 6], A[3] = w * t[_ + 6], g[0] = c * t[_ + 1] + f * t[_ + 3] + v * t[_ + 5] + p * t[_ + 7], g[1] = f * t[_ + 1] - p * t[_ + 3] - c * t[_ + 5] - v * t[_ + 7], g[2] = v * t[_ + 1] - c * t[_ + 3] + p * t[_ + 5] + f * t[_ + 7], g[3] = p * t[_ + 1] - v * t[_ + 3] + f * t[_ + 5] - c * t[_ + 7], S[0] = i * (t[_ + 0] + t[_ + 4]), S[3] = i * (t[_ + 0] - t[_ + 4]), S[1] = A[0] + A[3], S[2] = A[1] - A[2], d[0] = S[0] + S[1], d[1] = S[3] + S[2], d[2] = S[3] - S[2], d[3] = S[0] - S[1], t[_ + 0] = d[0] + g[0], t[_ + 1] = d[1] + g[1], t[_ + 2] = d[2] + g[2], t[_ + 3] = d[3] + g[3], t[_ + 4] = d[3] - g[3], t[_ + 5] = d[2] - g[2], t[_ + 6] = d[1] - g[1], t[_ + 7] = d[0] - g[0];
1783
1748
  }
1784
- for (var _ = 0; _ < 8; ++_)
1785
- g[0] = u * t[16 + _], g[1] = d * t[16 + _], g[2] = u * t[48 + _], g[3] = d * t[48 + _], A[0] = a * t[8 + _] + h * t[24 + _] + f * t[40 + _] + p * t[56 + _], A[1] = h * t[8 + _] - p * t[24 + _] - a * t[40 + _] - f * t[56 + _], A[2] = f * t[8 + _] - a * t[24 + _] + p * t[40 + _] + h * t[56 + _], A[3] = p * t[8 + _] - f * t[24 + _] + h * t[40 + _] - a * t[56 + _], S[0] = n * (t[_] + t[32 + _]), S[3] = n * (t[_] - t[32 + _]), S[1] = g[0] + g[3], S[2] = g[1] - g[2], w[0] = S[0] + S[1], w[1] = S[3] + S[2], w[2] = S[3] - S[2], w[3] = S[0] - S[1], t[0 + _] = w[0] + A[0], t[8 + _] = w[1] + A[1], t[16 + _] = w[2] + A[2], t[24 + _] = w[3] + A[3], t[32 + _] = w[3] - A[3], t[40 + _] = w[2] - A[2], t[48 + _] = w[1] - A[1], t[56 + _] = w[0] - A[0];
1749
+ for (var b = 0; b < 8; ++b)
1750
+ A[0] = h * t[16 + b], A[1] = w * t[16 + b], A[2] = h * t[48 + b], A[3] = w * t[48 + b], g[0] = c * t[8 + b] + f * t[24 + b] + v * t[40 + b] + p * t[56 + b], g[1] = f * t[8 + b] - p * t[24 + b] - c * t[40 + b] - v * t[56 + b], g[2] = v * t[8 + b] - c * t[24 + b] + p * t[40 + b] + f * t[56 + b], g[3] = p * t[8 + b] - v * t[24 + b] + f * t[40 + b] - c * t[56 + b], S[0] = i * (t[b] + t[32 + b]), S[3] = i * (t[b] - t[32 + b]), S[1] = A[0] + A[3], S[2] = A[1] - A[2], d[0] = S[0] + S[1], d[1] = S[3] + S[2], d[2] = S[3] - S[2], d[3] = S[0] - S[1], t[0 + b] = d[0] + g[0], t[8 + b] = d[1] + g[1], t[16 + b] = d[2] + g[2], t[24 + b] = d[3] + g[3], t[32 + b] = d[3] - g[3], t[40 + b] = d[2] - g[2], t[48 + b] = d[1] - g[1], t[56 + b] = d[0] - g[0];
1786
1751
  }
1787
- function ti(t) {
1788
- for (var n = 0; n < 64; ++n) {
1789
- var a = t[0][n], u = t[1][n], h = t[2][n];
1790
- t[0][n] = a + 1.5747 * h, t[1][n] = a - 0.1873 * u - 0.4682 * h, t[2][n] = a + 1.8556 * u;
1752
+ function jn(t) {
1753
+ for (var i = 0; i < 64; ++i) {
1754
+ var c = t[0][i], h = t[1][i], f = t[2][i];
1755
+ t[0][i] = c + 1.5747 * f, t[1][i] = c - 0.1873 * h - 0.4682 * f, t[2][i] = c + 1.8556 * h;
1791
1756
  }
1792
1757
  }
1793
- function ri(t, n, a) {
1794
- for (var u = 0; u < 64; ++u)
1795
- n[a + u] = Zr.toHalfFloat(ni(t[u]));
1758
+ function Kn(t, i, c) {
1759
+ for (var h = 0; h < 64; ++h)
1760
+ i[c + h] = Zr.toHalfFloat(ei(t[h]));
1796
1761
  }
1797
- function ni(t) {
1798
- return t <= 1 ? Math.sign(t) * Math.pow(Math.abs(t), 2.2) : Math.sign(t) * Math.pow(Nt, Math.abs(t) - 1);
1762
+ function ei(t) {
1763
+ return t <= 1 ? Math.sign(t) * Math.pow(Math.abs(t), 2.2) : Math.sign(t) * Math.pow(Ot, Math.abs(t) - 1);
1799
1764
  }
1800
1765
  function Pr(t) {
1801
1766
  return new DataView(t.array.buffer, t.offset.value, t.size);
1802
1767
  }
1803
- function ii(t) {
1804
- var n = t.viewer.buffer.slice(t.offset.value, t.offset.value + t.size), a = new Uint8Array(Lr(n)), u = new Uint8Array(a.length);
1805
- return xr(a), Fr(a, u), new DataView(u.buffer);
1768
+ function ti(t) {
1769
+ var i = t.viewer.buffer.slice(t.offset.value, t.offset.value + t.size), c = new Uint8Array(Mr(i)), h = new Uint8Array(c.length);
1770
+ return xr(c), Fr(c, h), new DataView(h.buffer);
1806
1771
  }
1807
1772
  function ir(t) {
1808
- var n = t.array.slice(t.offset.value, t.offset.value + t.size), a = Pt(n), u = new Uint8Array(a.length);
1809
- return xr(a), Fr(a, u), new DataView(u.buffer);
1810
- }
1811
- function si(t) {
1812
- for (var n = t.viewer, a = { value: t.offset.value }, u = new Uint16Array(t.width * t.scanlineBlockSize * (t.channels * t.type)), h = new Uint8Array(8192), f = 0, d = new Array(t.channels), p = 0; p < t.channels; p++)
1813
- d[p] = {}, d[p].start = f, d[p].end = d[p].start, d[p].nx = t.width, d[p].ny = t.lines, d[p].size = t.type, f += d[p].nx * d[p].ny * d[p].size;
1814
- var g = tt(n, a), A = tt(n, a);
1815
- if (A >= 8192)
1773
+ var i = t.array.slice(t.offset.value, t.offset.value + t.size), c = Bt(i), h = new Uint8Array(c.length);
1774
+ return xr(c), Fr(c, h), new DataView(h.buffer);
1775
+ }
1776
+ function ri(t) {
1777
+ for (var i = t.viewer, c = { value: t.offset.value }, h = new Uint16Array(t.width * t.scanlineBlockSize * (t.channels * t.type)), f = new Uint8Array(8192), v = 0, w = new Array(t.channels), p = 0; p < t.channels; p++)
1778
+ w[p] = {}, w[p].start = v, w[p].end = w[p].start, w[p].nx = t.width, w[p].ny = t.lines, w[p].size = t.type, v += w[p].nx * w[p].ny * w[p].size;
1779
+ var A = tt(i, c), g = tt(i, c);
1780
+ if (g >= 8192)
1816
1781
  throw "Something is wrong with PIZ_COMPRESSION BITMAP_SIZE";
1817
- if (g <= A)
1818
- for (var p = 0; p < A - g + 1; p++)
1819
- h[p + g] = We(n, a);
1820
- var S = new Uint16Array(65536), w = rr(h, S), Y = ne(n, a);
1821
- Rr(t.array, n, a, Y, u, f);
1782
+ if (A <= g)
1783
+ for (var p = 0; p < g - A + 1; p++)
1784
+ f[p + A] = We(i, c);
1785
+ var S = new Uint16Array(65536), d = rr(f, S), Y = ne(i, c);
1786
+ Rr(t.array, i, c, Y, h, v);
1822
1787
  for (var p = 0; p < t.channels; ++p)
1823
- for (var I = d[p], _ = 0; _ < d[p].size; ++_)
1824
- Vn(u, I.start + _, I.nx, I.size, I.ny, I.nx * I.size, w);
1825
- $n(S, u, f);
1826
- for (var N = 0, m = new Uint8Array(u.buffer.byteLength), M = 0; M < t.lines; M++)
1788
+ for (var _ = w[p], b = 0; b < w[p].size; ++b)
1789
+ Xn(h, _.start + b, _.nx, _.size, _.ny, _.nx * _.size, d);
1790
+ qn(S, h, v);
1791
+ for (var N = 0, m = new Uint8Array(h.buffer.byteLength), B = 0; B < t.lines; B++)
1827
1792
  for (var z = 0; z < t.channels; z++) {
1828
- var I = d[z], V = I.nx * I.size, te = new Uint8Array(u.buffer, I.end * 2, V * 2);
1829
- m.set(te, N), N += V * 2, I.end += V;
1793
+ var _ = w[z], V = _.nx * _.size, te = new Uint8Array(h.buffer, _.end * 2, V * 2);
1794
+ m.set(te, N), N += V * 2, _.end += V;
1830
1795
  }
1831
1796
  return new DataView(m.buffer);
1832
1797
  }
1833
- function oi(t) {
1834
- var n = t.array.slice(t.offset.value, t.offset.value + t.size), a = Pt(n);
1835
- const u = t.lines * t.channels * t.width, h = t.type == 1 ? new Uint16Array(u) : new Uint32Array(u);
1836
- let f = 0, d = 0;
1798
+ function ni(t) {
1799
+ var i = t.array.slice(t.offset.value, t.offset.value + t.size), c = Bt(i);
1800
+ const h = t.lines * t.channels * t.width, f = t.type == 1 ? new Uint16Array(h) : new Uint32Array(h);
1801
+ let v = 0, w = 0;
1837
1802
  const p = new Array(4);
1838
- for (let g = 0; g < t.lines; g++)
1839
- for (let A = 0; A < t.channels; A++) {
1803
+ for (let A = 0; A < t.lines; A++)
1804
+ for (let g = 0; g < t.channels; g++) {
1840
1805
  let S = 0;
1841
1806
  switch (t.type) {
1842
1807
  case 1:
1843
- p[0] = f, p[1] = p[0] + t.width, f = p[1] + t.width;
1844
- for (let w = 0; w < t.width; ++w) {
1845
- const Y = a[p[0]++] << 8 | a[p[1]++];
1846
- S += Y, h[d] = S, d++;
1808
+ p[0] = v, p[1] = p[0] + t.width, v = p[1] + t.width;
1809
+ for (let d = 0; d < t.width; ++d) {
1810
+ const Y = c[p[0]++] << 8 | c[p[1]++];
1811
+ S += Y, f[w] = S, w++;
1847
1812
  }
1848
1813
  break;
1849
1814
  case 2:
1850
- p[0] = f, p[1] = p[0] + t.width, p[2] = p[1] + t.width, f = p[2] + t.width;
1851
- for (let w = 0; w < t.width; ++w) {
1852
- const Y = a[p[0]++] << 24 | a[p[1]++] << 16 | a[p[2]++] << 8;
1853
- S += Y, h[d] = S, d++;
1815
+ p[0] = v, p[1] = p[0] + t.width, p[2] = p[1] + t.width, v = p[2] + t.width;
1816
+ for (let d = 0; d < t.width; ++d) {
1817
+ const Y = c[p[0]++] << 24 | c[p[1]++] << 16 | c[p[2]++] << 8;
1818
+ S += Y, f[w] = S, w++;
1854
1819
  }
1855
1820
  break;
1856
1821
  }
1857
1822
  }
1858
- return new DataView(h.buffer);
1859
- }
1860
- function Mr(t) {
1861
- var n = t.viewer, a = { value: t.offset.value }, u = new Uint8Array(t.width * t.lines * (t.channels * t.type * 2)), h = {
1862
- version: ue(n, a),
1863
- unknownUncompressedSize: ue(n, a),
1864
- unknownCompressedSize: ue(n, a),
1865
- acCompressedSize: ue(n, a),
1866
- dcCompressedSize: ue(n, a),
1867
- rleCompressedSize: ue(n, a),
1868
- rleUncompressedSize: ue(n, a),
1869
- rleRawSize: ue(n, a),
1870
- totalAcUncompressedCount: ue(n, a),
1871
- totalDcUncompressedCount: ue(n, a),
1872
- acCompression: ue(n, a)
1823
+ return new DataView(f.buffer);
1824
+ }
1825
+ function Br(t) {
1826
+ var i = t.viewer, c = { value: t.offset.value }, h = new Uint8Array(t.width * t.lines * (t.channels * t.type * 2)), f = {
1827
+ version: he(i, c),
1828
+ unknownUncompressedSize: he(i, c),
1829
+ unknownCompressedSize: he(i, c),
1830
+ acCompressedSize: he(i, c),
1831
+ dcCompressedSize: he(i, c),
1832
+ rleCompressedSize: he(i, c),
1833
+ rleUncompressedSize: he(i, c),
1834
+ rleRawSize: he(i, c),
1835
+ totalAcUncompressedCount: he(i, c),
1836
+ totalDcUncompressedCount: he(i, c),
1837
+ acCompression: he(i, c)
1873
1838
  };
1874
- if (h.version < 2)
1875
- throw "EXRLoader.parse: " + nt.compression + " version " + h.version + " is unsupported";
1876
- for (var f = new Array(), d = tt(n, a) - 2; d > 0; ) {
1877
- var p = Ct(n.buffer, a), g = We(n, a), A = g >> 2 & 3, S = (g >> 4) - 1, w = new Int8Array([S])[0], Y = We(n, a);
1878
- f.push({
1839
+ if (f.version < 2)
1840
+ throw "EXRLoader.parse: " + nt.compression + " version " + f.version + " is unsupported";
1841
+ for (var v = new Array(), w = tt(i, c) - 2; w > 0; ) {
1842
+ var p = Rt(i.buffer, c), A = We(i, c), g = A >> 2 & 3, S = (A >> 4) - 1, d = new Int8Array([S])[0], Y = We(i, c);
1843
+ v.push({
1879
1844
  name: p,
1880
- index: w,
1845
+ index: d,
1881
1846
  type: Y,
1882
- compression: A
1883
- }), d -= p.length + 3;
1847
+ compression: g
1848
+ }), w -= p.length + 3;
1884
1849
  }
1885
- for (var I = nt.channels, _ = new Array(t.channels), N = 0; N < t.channels; ++N) {
1886
- var m = _[N] = {}, M = I[N];
1887
- m.name = M.name, m.compression = 0, m.decoded = !1, m.type = M.pixelType, m.pLinear = M.pLinear, m.width = t.width, m.height = t.lines;
1850
+ for (var _ = nt.channels, b = new Array(t.channels), N = 0; N < t.channels; ++N) {
1851
+ var m = b[N] = {}, B = _[N];
1852
+ m.name = B.name, m.compression = 0, m.decoded = !1, m.type = B.pixelType, m.pLinear = B.pLinear, m.width = t.width, m.height = t.lines;
1888
1853
  }
1889
1854
  for (var z = {
1890
1855
  idx: new Array(3)
1891
1856
  }, V = 0; V < t.channels; ++V)
1892
- for (var m = _[V], N = 0; N < f.length; ++N) {
1893
- var te = f[N];
1857
+ for (var m = b[V], N = 0; N < v.length; ++N) {
1858
+ var te = v[N];
1894
1859
  m.name == te.name && (m.compression = te.compression, te.index >= 0 && (z.idx[te.index] = V), m.offset = V);
1895
1860
  }
1896
- if (h.acCompressedSize > 0)
1897
- switch (h.acCompression) {
1861
+ if (f.acCompressedSize > 0)
1862
+ switch (f.acCompression) {
1898
1863
  case 0:
1899
- var H = new Uint16Array(h.totalAcUncompressedCount);
1864
+ var H = new Uint16Array(f.totalAcUncompressedCount);
1900
1865
  Rr(
1901
1866
  t.array,
1902
- n,
1903
- a,
1904
- h.acCompressedSize,
1867
+ i,
1868
+ c,
1869
+ f.acCompressedSize,
1905
1870
  H,
1906
- h.totalAcUncompressedCount
1871
+ f.totalAcUncompressedCount
1907
1872
  );
1908
1873
  break;
1909
1874
  case 1:
1910
- var k = t.array.slice(a.value, a.value + h.totalAcUncompressedCount), Te = Pt(k), H = new Uint16Array(Te.buffer);
1911
- a.value += h.totalAcUncompressedCount;
1875
+ var k = t.array.slice(c.value, c.value + f.totalAcUncompressedCount), Ee = Bt(k), H = new Uint16Array(Ee.buffer);
1876
+ c.value += f.totalAcUncompressedCount;
1912
1877
  break;
1913
1878
  }
1914
- if (h.dcCompressedSize > 0) {
1915
- var J = {
1879
+ if (f.dcCompressedSize > 0) {
1880
+ var $ = {
1916
1881
  array: t.array,
1917
- offset: a,
1918
- size: h.dcCompressedSize
1919
- }, Oe = new Uint16Array(ir(J).buffer);
1920
- a.value += h.dcCompressedSize;
1882
+ offset: c,
1883
+ size: f.dcCompressedSize
1884
+ }, Oe = new Uint16Array(ir($).buffer);
1885
+ c.value += f.dcCompressedSize;
1921
1886
  }
1922
- if (h.rleRawSize > 0) {
1923
- var k = t.array.slice(a.value, a.value + h.rleCompressedSize), Te = Pt(k), it = Lr(Te.buffer);
1924
- a.value += h.rleCompressedSize;
1887
+ if (f.rleRawSize > 0) {
1888
+ var k = t.array.slice(c.value, c.value + f.rleCompressedSize), Ee = Bt(k), it = Mr(Ee.buffer);
1889
+ c.value += f.rleCompressedSize;
1925
1890
  }
1926
- for (var he = 0, D = new Array(_.length), N = 0; N < D.length; ++N)
1891
+ for (var ue = 0, D = new Array(b.length), N = 0; N < D.length; ++N)
1927
1892
  D[N] = new Array();
1928
1893
  for (var K = 0; K < t.lines; ++K)
1929
- for (var W = 0; W < _.length; ++W)
1930
- D[W].push(he), he += _[W].width * t.type * 2;
1931
- Qn(z, D, _, H, Oe, u);
1932
- for (var N = 0; N < _.length; ++N) {
1933
- var m = _[N];
1894
+ for (var W = 0; W < b.length; ++W)
1895
+ D[W].push(ue), ue += b[W].width * t.type * 2;
1896
+ Vn(z, D, b, H, Oe, h);
1897
+ for (var N = 0; N < b.length; ++N) {
1898
+ var m = b[N];
1934
1899
  if (!m.decoded)
1935
1900
  switch (m.compression) {
1936
1901
  case 2:
1937
1902
  for (var F = 0, fe = 0, K = 0; K < t.lines; ++K) {
1938
1903
  for (var De = D[N][F], ae = 0; ae < m.width; ++ae) {
1939
1904
  for (var xe = 0; xe < 2 * m.type; ++xe)
1940
- u[De++] = it[fe + xe * m.width * m.height];
1905
+ h[De++] = it[fe + xe * m.width * m.height];
1941
1906
  fe++;
1942
1907
  }
1943
1908
  F++;
@@ -1948,94 +1913,94 @@ class so extends Pi {
1948
1913
  throw "EXRLoader.parse: unsupported channel compression";
1949
1914
  }
1950
1915
  }
1951
- return new DataView(u.buffer);
1916
+ return new DataView(h.buffer);
1952
1917
  }
1953
- function Ct(t, n) {
1954
- for (var a = new Uint8Array(t), u = 0; a[n.value + u] != 0; )
1955
- u += 1;
1956
- var h = new TextDecoder().decode(a.slice(n.value, n.value + u));
1957
- return n.value = n.value + u + 1, h;
1918
+ function Rt(t, i) {
1919
+ for (var c = new Uint8Array(t), h = 0; c[i.value + h] != 0; )
1920
+ h += 1;
1921
+ var f = new TextDecoder().decode(c.slice(i.value, i.value + h));
1922
+ return i.value = i.value + h + 1, f;
1958
1923
  }
1959
- function ai(t, n, a) {
1960
- var u = new TextDecoder().decode(new Uint8Array(t).slice(n.value, n.value + a));
1961
- return n.value = n.value + a, u;
1924
+ function ii(t, i, c) {
1925
+ var h = new TextDecoder().decode(new Uint8Array(t).slice(i.value, i.value + c));
1926
+ return i.value = i.value + c, h;
1962
1927
  }
1963
- function ci(t, n) {
1964
- var a = et(t, n), u = ne(t, n);
1965
- return [a, u];
1928
+ function si(t, i) {
1929
+ var c = et(t, i), h = ne(t, i);
1930
+ return [c, h];
1966
1931
  }
1967
- function li(t, n) {
1968
- var a = ne(t, n), u = ne(t, n);
1969
- return [a, u];
1932
+ function oi(t, i) {
1933
+ var c = ne(t, i), h = ne(t, i);
1934
+ return [c, h];
1970
1935
  }
1971
- function et(t, n) {
1972
- var a = t.getInt32(n.value, !0);
1973
- return n.value = n.value + 4, a;
1936
+ function et(t, i) {
1937
+ var c = t.getInt32(i.value, !0);
1938
+ return i.value = i.value + 4, c;
1974
1939
  }
1975
- function ne(t, n) {
1976
- var a = t.getUint32(n.value, !0);
1977
- return n.value = n.value + 4, a;
1940
+ function ne(t, i) {
1941
+ var c = t.getUint32(i.value, !0);
1942
+ return i.value = i.value + 4, c;
1978
1943
  }
1979
- function Dr(t, n) {
1980
- var a = t[n.value];
1981
- return n.value = n.value + 1, a;
1944
+ function Dr(t, i) {
1945
+ var c = t[i.value];
1946
+ return i.value = i.value + 1, c;
1982
1947
  }
1983
- function We(t, n) {
1984
- var a = t.getUint8(n.value);
1985
- return n.value = n.value + 1, a;
1948
+ function We(t, i) {
1949
+ var c = t.getUint8(i.value);
1950
+ return i.value = i.value + 1, c;
1986
1951
  }
1987
- const ue = function(t, n) {
1988
- let a;
1989
- return "getBigInt64" in DataView.prototype ? a = Number(t.getBigInt64(n.value, !0)) : a = t.getUint32(n.value + 4, !0) + Number(t.getUint32(n.value, !0) << 32), n.value += 8, a;
1952
+ const he = function(t, i) {
1953
+ let c;
1954
+ return "getBigInt64" in DataView.prototype ? c = Number(t.getBigInt64(i.value, !0)) : c = t.getUint32(i.value + 4, !0) + Number(t.getUint32(i.value, !0) << 32), i.value += 8, c;
1990
1955
  };
1991
- function j(t, n) {
1992
- var a = t.getFloat32(n.value, !0);
1993
- return n.value += 4, a;
1956
+ function j(t, i) {
1957
+ var c = t.getFloat32(i.value, !0);
1958
+ return i.value += 4, c;
1994
1959
  }
1995
- function ui(t, n) {
1996
- return Zr.toHalfFloat(j(t, n));
1960
+ function ai(t, i) {
1961
+ return Zr.toHalfFloat(j(t, i));
1997
1962
  }
1998
1963
  function T(t) {
1999
- var n = (t & 31744) >> 10, a = t & 1023;
2000
- return (t >> 15 ? -1 : 1) * (n ? n === 31 ? a ? NaN : 1 / 0 : Math.pow(2, n - 15) * (1 + a / 1024) : 6103515625e-14 * (a / 1024));
2001
- }
2002
- function tt(t, n) {
2003
- var a = t.getUint16(n.value, !0);
2004
- return n.value += 2, a;
2005
- }
2006
- function hi(t, n) {
2007
- return T(tt(t, n));
2008
- }
2009
- function fi(t, n, a, u) {
2010
- for (var h = a.value, f = []; a.value < h + u - 1; ) {
2011
- var d = Ct(n, a), p = et(t, a), g = We(t, a);
2012
- a.value += 3;
2013
- var A = et(t, a), S = et(t, a);
2014
- f.push({
2015
- name: d,
1964
+ var i = (t & 31744) >> 10, c = t & 1023;
1965
+ return (t >> 15 ? -1 : 1) * (i ? i === 31 ? c ? NaN : 1 / 0 : Math.pow(2, i - 15) * (1 + c / 1024) : 6103515625e-14 * (c / 1024));
1966
+ }
1967
+ function tt(t, i) {
1968
+ var c = t.getUint16(i.value, !0);
1969
+ return i.value += 2, c;
1970
+ }
1971
+ function ci(t, i) {
1972
+ return T(tt(t, i));
1973
+ }
1974
+ function li(t, i, c, h) {
1975
+ for (var f = c.value, v = []; c.value < f + h - 1; ) {
1976
+ var w = Rt(i, c), p = et(t, c), A = We(t, c);
1977
+ c.value += 3;
1978
+ var g = et(t, c), S = et(t, c);
1979
+ v.push({
1980
+ name: w,
2016
1981
  pixelType: p,
2017
- pLinear: g,
2018
- xSampling: A,
1982
+ pLinear: A,
1983
+ xSampling: g,
2019
1984
  ySampling: S
2020
1985
  });
2021
1986
  }
2022
- return a.value += 1, f;
1987
+ return c.value += 1, v;
2023
1988
  }
2024
- function vi(t, n) {
2025
- var a = j(t, n), u = j(t, n), h = j(t, n), f = j(t, n), d = j(t, n), p = j(t, n), g = j(t, n), A = j(t, n);
1989
+ function hi(t, i) {
1990
+ var c = j(t, i), h = j(t, i), f = j(t, i), v = j(t, i), w = j(t, i), p = j(t, i), A = j(t, i), g = j(t, i);
2026
1991
  return {
2027
- redX: a,
2028
- redY: u,
2029
- greenX: h,
2030
- greenY: f,
2031
- blueX: d,
1992
+ redX: c,
1993
+ redY: h,
1994
+ greenX: f,
1995
+ greenY: v,
1996
+ blueX: w,
2032
1997
  blueY: p,
2033
- whiteX: g,
2034
- whiteY: A
1998
+ whiteX: A,
1999
+ whiteY: g
2035
2000
  };
2036
2001
  }
2037
- function yi(t, n) {
2038
- var a = [
2002
+ function ui(t, i) {
2003
+ var c = [
2039
2004
  "NO_COMPRESSION",
2040
2005
  "RLE_COMPRESSION",
2041
2006
  "ZIPS_COMPRESSION",
@@ -2046,85 +2011,85 @@ class so extends Pi {
2046
2011
  "B44A_COMPRESSION",
2047
2012
  "DWAA_COMPRESSION",
2048
2013
  "DWAB_COMPRESSION"
2049
- ], u = We(t, n);
2050
- return a[u];
2051
- }
2052
- function pi(t, n) {
2053
- var a = ne(t, n), u = ne(t, n), h = ne(t, n), f = ne(t, n);
2054
- return { xMin: a, yMin: u, xMax: h, yMax: f };
2055
- }
2056
- function di(t, n) {
2057
- var a = ["INCREASING_Y"], u = We(t, n);
2058
- return a[u];
2059
- }
2060
- function wi(t, n) {
2061
- var a = j(t, n), u = j(t, n);
2062
- return [a, u];
2063
- }
2064
- function Ai(t, n) {
2065
- var a = j(t, n), u = j(t, n), h = j(t, n);
2066
- return [a, u, h];
2067
- }
2068
- function gi(t, n, a, u, h) {
2069
- if (u === "string" || u === "stringvector" || u === "iccProfile")
2070
- return ai(n, a, h);
2071
- if (u === "chlist")
2072
- return fi(t, n, a, h);
2073
- if (u === "chromaticities")
2074
- return vi(t, a);
2075
- if (u === "compression")
2076
- return yi(t, a);
2077
- if (u === "box2i")
2078
- return pi(t, a);
2079
- if (u === "lineOrder")
2080
- return di(t, a);
2081
- if (u === "float")
2082
- return j(t, a);
2083
- if (u === "v2f")
2084
- return wi(t, a);
2085
- if (u === "v3f")
2086
- return Ai(t, a);
2087
- if (u === "int")
2088
- return et(t, a);
2089
- if (u === "rational")
2090
- return ci(t, a);
2091
- if (u === "timecode")
2092
- return li(t, a);
2093
- if (u === "preview")
2094
- return a.value += h, "skipped";
2095
- a.value += h;
2096
- }
2097
- function Si(t, n, a) {
2098
- const u = {};
2014
+ ], h = We(t, i);
2015
+ return c[h];
2016
+ }
2017
+ function fi(t, i) {
2018
+ var c = ne(t, i), h = ne(t, i), f = ne(t, i), v = ne(t, i);
2019
+ return { xMin: c, yMin: h, xMax: f, yMax: v };
2020
+ }
2021
+ function vi(t, i) {
2022
+ var c = ["INCREASING_Y"], h = We(t, i);
2023
+ return c[h];
2024
+ }
2025
+ function yi(t, i) {
2026
+ var c = j(t, i), h = j(t, i);
2027
+ return [c, h];
2028
+ }
2029
+ function pi(t, i) {
2030
+ var c = j(t, i), h = j(t, i), f = j(t, i);
2031
+ return [c, h, f];
2032
+ }
2033
+ function wi(t, i, c, h, f) {
2034
+ if (h === "string" || h === "stringvector" || h === "iccProfile")
2035
+ return ii(i, c, f);
2036
+ if (h === "chlist")
2037
+ return li(t, i, c, f);
2038
+ if (h === "chromaticities")
2039
+ return hi(t, c);
2040
+ if (h === "compression")
2041
+ return ui(t, c);
2042
+ if (h === "box2i")
2043
+ return fi(t, c);
2044
+ if (h === "lineOrder")
2045
+ return vi(t, c);
2046
+ if (h === "float")
2047
+ return j(t, c);
2048
+ if (h === "v2f")
2049
+ return yi(t, c);
2050
+ if (h === "v3f")
2051
+ return pi(t, c);
2052
+ if (h === "int")
2053
+ return et(t, c);
2054
+ if (h === "rational")
2055
+ return si(t, c);
2056
+ if (h === "timecode")
2057
+ return oi(t, c);
2058
+ if (h === "preview")
2059
+ return c.value += f, "skipped";
2060
+ c.value += f;
2061
+ }
2062
+ function di(t, i, c) {
2063
+ const h = {};
2099
2064
  if (t.getUint32(0, !0) != 20000630)
2100
2065
  throw "THREE.EXRLoader: provided file doesn't appear to be in OpenEXR format.";
2101
- u.version = t.getUint8(4);
2102
- const h = t.getUint8(5);
2103
- u.spec = {
2104
- singleTile: !!(h & 2),
2105
- longName: !!(h & 4),
2106
- deepFormat: !!(h & 8),
2107
- multiPart: !!(h & 16)
2108
- }, a.value = 8;
2109
- for (var f = !0; f; ) {
2110
- var d = Ct(n, a);
2111
- if (d == 0)
2112
- f = !1;
2066
+ h.version = t.getUint8(4);
2067
+ const f = t.getUint8(5);
2068
+ h.spec = {
2069
+ singleTile: !!(f & 2),
2070
+ longName: !!(f & 4),
2071
+ deepFormat: !!(f & 8),
2072
+ multiPart: !!(f & 16)
2073
+ }, c.value = 8;
2074
+ for (var v = !0; v; ) {
2075
+ var w = Rt(i, c);
2076
+ if (w == 0)
2077
+ v = !1;
2113
2078
  else {
2114
- var p = Ct(n, a), g = ne(t, a), A = gi(t, n, a, p, g);
2115
- A === void 0 ? console.warn(`EXRLoader.parse: skipped unknown header attribute type '${p}'.`) : u[d] = A;
2079
+ var p = Rt(i, c), A = ne(t, c), g = wi(t, i, c, p, A);
2080
+ g === void 0 ? console.warn(`EXRLoader.parse: skipped unknown header attribute type '${p}'.`) : h[w] = g;
2116
2081
  }
2117
2082
  }
2118
- if ((h & -5) != 0)
2119
- throw console.error("EXRHeader:", u), "THREE.EXRLoader: provided file is currently unsupported.";
2120
- return u;
2083
+ if ((f & -5) != 0)
2084
+ throw console.error("EXRHeader:", h), "THREE.EXRLoader: provided file is currently unsupported.";
2085
+ return h;
2121
2086
  }
2122
- function Ti(t, n, a, u, h) {
2123
- const f = {
2087
+ function gi(t, i, c, h, f) {
2088
+ const v = {
2124
2089
  size: 0,
2125
- viewer: n,
2126
- array: a,
2127
- offset: u,
2090
+ viewer: i,
2091
+ array: c,
2092
+ offset: h,
2128
2093
  width: t.dataWindow.xMax - t.dataWindow.xMin + 1,
2129
2094
  height: t.dataWindow.yMax - t.dataWindow.yMin + 1,
2130
2095
  channels: t.channels.length,
@@ -2139,85 +2104,85 @@ class so extends Pi {
2139
2104
  };
2140
2105
  switch (t.compression) {
2141
2106
  case "NO_COMPRESSION":
2142
- f.lines = 1, f.uncompress = Pr;
2107
+ v.lines = 1, v.uncompress = Pr;
2143
2108
  break;
2144
2109
  case "RLE_COMPRESSION":
2145
- f.lines = 1, f.uncompress = ii;
2110
+ v.lines = 1, v.uncompress = ti;
2146
2111
  break;
2147
2112
  case "ZIPS_COMPRESSION":
2148
- f.lines = 1, f.uncompress = ir;
2113
+ v.lines = 1, v.uncompress = ir;
2149
2114
  break;
2150
2115
  case "ZIP_COMPRESSION":
2151
- f.lines = 16, f.uncompress = ir;
2116
+ v.lines = 16, v.uncompress = ir;
2152
2117
  break;
2153
2118
  case "PIZ_COMPRESSION":
2154
- f.lines = 32, f.uncompress = si;
2119
+ v.lines = 32, v.uncompress = ri;
2155
2120
  break;
2156
2121
  case "PXR24_COMPRESSION":
2157
- f.lines = 16, f.uncompress = oi;
2122
+ v.lines = 16, v.uncompress = ni;
2158
2123
  break;
2159
2124
  case "DWAA_COMPRESSION":
2160
- f.lines = 32, f.uncompress = Mr;
2125
+ v.lines = 32, v.uncompress = Br;
2161
2126
  break;
2162
2127
  case "DWAB_COMPRESSION":
2163
- f.lines = 256, f.uncompress = Mr;
2128
+ v.lines = 256, v.uncompress = Br;
2164
2129
  break;
2165
2130
  default:
2166
2131
  throw "EXRLoader.parse: " + t.compression + " is unsupported";
2167
2132
  }
2168
- if (f.scanlineBlockSize = f.lines, f.type == 1)
2169
- switch (h) {
2133
+ if (v.scanlineBlockSize = v.lines, v.type == 1)
2134
+ switch (f) {
2170
2135
  case ft:
2171
- f.getter = hi, f.inputSize = 2;
2136
+ v.getter = ci, v.inputSize = 2;
2172
2137
  break;
2173
2138
  case lt:
2174
- f.getter = tt, f.inputSize = 2;
2139
+ v.getter = tt, v.inputSize = 2;
2175
2140
  break;
2176
2141
  }
2177
- else if (f.type == 2)
2178
- switch (h) {
2142
+ else if (v.type == 2)
2143
+ switch (f) {
2179
2144
  case ft:
2180
- f.getter = j, f.inputSize = 4;
2145
+ v.getter = j, v.inputSize = 4;
2181
2146
  break;
2182
2147
  case lt:
2183
- f.getter = ui, f.inputSize = 4;
2148
+ v.getter = ai, v.inputSize = 4;
2184
2149
  }
2185
2150
  else
2186
- throw "EXRLoader.parse: unsupported pixelType " + f.type + " for " + t.compression + ".";
2187
- f.blockCount = (t.dataWindow.yMax + 1) / f.scanlineBlockSize;
2188
- for (var d = 0; d < f.blockCount; d++)
2189
- ue(n, u);
2190
- f.outputChannels = f.channels == 3 ? 4 : f.channels;
2191
- const p = f.width * f.height * f.outputChannels;
2192
- switch (h) {
2151
+ throw "EXRLoader.parse: unsupported pixelType " + v.type + " for " + t.compression + ".";
2152
+ v.blockCount = (t.dataWindow.yMax + 1) / v.scanlineBlockSize;
2153
+ for (var w = 0; w < v.blockCount; w++)
2154
+ he(i, h);
2155
+ v.outputChannels = v.channels == 3 ? 4 : v.channels;
2156
+ const p = v.width * v.height * v.outputChannels;
2157
+ switch (f) {
2193
2158
  case ft:
2194
- f.byteArray = new Float32Array(p), f.channels < f.outputChannels && f.byteArray.fill(1, 0, p);
2159
+ v.byteArray = new Float32Array(p), v.channels < v.outputChannels && v.byteArray.fill(1, 0, p);
2195
2160
  break;
2196
2161
  case lt:
2197
- f.byteArray = new Uint16Array(p), f.channels < f.outputChannels && f.byteArray.fill(15360, 0, p);
2162
+ v.byteArray = new Uint16Array(p), v.channels < v.outputChannels && v.byteArray.fill(15360, 0, p);
2198
2163
  break;
2199
2164
  default:
2200
- console.error("THREE.EXRLoader: unsupported type: ", h);
2165
+ console.error("THREE.EXRLoader: unsupported type: ", f);
2201
2166
  break;
2202
2167
  }
2203
- return f.bytesPerLine = f.width * f.inputSize * f.channels, f.outputChannels == 4 ? f.format = ln : f.format = hn, at ? f.colorSpace = "srgb-linear" : f.encoding = 3e3, f;
2168
+ return v.bytesPerLine = v.width * v.inputSize * v.channels, v.outputChannels == 4 ? v.format = cn : v.format = ln, at ? v.colorSpace = "srgb-linear" : v.encoding = 3e3, v;
2204
2169
  }
2205
- const Rt = new DataView(e), Ei = new Uint8Array(e), rt = { value: 0 }, nt = Si(Rt, e, rt), C = Ti(nt, Rt, Ei, rt, this.type), Br = { value: 0 }, Ii = { R: 0, G: 1, B: 2, A: 3, Y: 0 };
2170
+ const xt = new DataView(e), Ai = new Uint8Array(e), rt = { value: 0 }, nt = di(xt, e, rt), C = gi(nt, xt, Ai, rt, this.type), Lr = { value: 0 }, Si = { R: 0, G: 1, B: 2, A: 3, Y: 0 };
2206
2171
  for (let t = 0; t < C.height / C.scanlineBlockSize; t++) {
2207
- const n = ne(Rt, rt);
2208
- C.size = ne(Rt, rt), C.lines = n + C.scanlineBlockSize > C.height ? C.height - n : C.scanlineBlockSize;
2209
- const u = C.size < C.lines * C.bytesPerLine ? C.uncompress(C) : Pr(C);
2172
+ const i = ne(xt, rt);
2173
+ C.size = ne(xt, rt), C.lines = i + C.scanlineBlockSize > C.height ? C.height - i : C.scanlineBlockSize;
2174
+ const h = C.size < C.lines * C.bytesPerLine ? C.uncompress(C) : Pr(C);
2210
2175
  rt.value += C.size;
2211
- for (let h = 0; h < C.scanlineBlockSize; h++) {
2212
- const f = h + t * C.scanlineBlockSize;
2213
- if (f >= C.height)
2176
+ for (let f = 0; f < C.scanlineBlockSize; f++) {
2177
+ const v = f + t * C.scanlineBlockSize;
2178
+ if (v >= C.height)
2214
2179
  break;
2215
- for (let d = 0; d < C.channels; d++) {
2216
- const p = Ii[nt.channels[d].name];
2217
- for (let g = 0; g < C.width; g++) {
2218
- Br.value = (h * (C.channels * C.width) + d * C.width + g) * C.inputSize;
2219
- const A = (C.height - 1 - f) * (C.width * C.outputChannels) + g * C.outputChannels + p;
2220
- C.byteArray[A] = C.getter(u, Br);
2180
+ for (let w = 0; w < C.channels; w++) {
2181
+ const p = Si[nt.channels[w].name];
2182
+ for (let A = 0; A < C.width; A++) {
2183
+ Lr.value = (f * (C.channels * C.width) + w * C.width + A) * C.inputSize;
2184
+ const g = (C.height - 1 - v) * (C.width * C.outputChannels) + A * C.outputChannels + p;
2185
+ C.byteArray[g] = C.getter(h, Lr);
2221
2186
  }
2222
2187
  }
2223
2188
  }
@@ -2235,39 +2200,70 @@ class so extends Pi {
2235
2200
  setDataType(e) {
2236
2201
  return this.type = e, this;
2237
2202
  }
2238
- load(e, i, s, o) {
2239
- function c(l, v) {
2240
- at ? l.colorSpace = v.colorSpace : l.encoding = v.encoding, l.minFilter = zt, l.magFilter = zt, l.generateMipmaps = !1, l.flipY = !1, i && i(l, v);
2203
+ load(e, n, s, o) {
2204
+ function a(l, u) {
2205
+ at ? l.colorSpace = u.colorSpace : l.encoding = u.encoding, l.minFilter = kt, l.magFilter = kt, l.generateMipmaps = !1, l.flipY = !1, n && n(l, u);
2241
2206
  }
2242
- return super.load(e, c, s, o);
2207
+ return super.load(e, a, s, o);
2243
2208
  }
2244
2209
  }
2245
- class qo extends qt {
2246
- setDepth(e) {
2247
- return this.depth = e, this;
2210
+ class Lo extends gt {
2211
+ constructor(e = {}, n) {
2212
+ super(n), this.options = e;
2248
2213
  }
2249
- load(e, i, s, o) {
2250
- const c = new so(this.manager);
2251
- c.setRequestHeader(this.requestHeader), c.setPath(this.path), c.setWithCredentials(this.withCredentials), c.load(
2214
+ load(e, n, s, o) {
2215
+ const { width: a, height: l, depth: u } = this.options, y = new hn(null, a, l, u), E = new Zn(this.manager);
2216
+ return E.setRequestHeader(this.requestHeader), E.setPath(this.path), E.setWithCredentials(this.withCredentials), E.load(
2252
2217
  e,
2253
- (l) => {
2254
- const { data: v, width: y, height: E } = l.image, b = this.depth ?? Math.sqrt(E), U = new un(v, y, E / b, b);
2255
- U.type = l.type, U.format = l.format, U.colorSpace = l.colorSpace, U.needsUpdate = !0;
2218
+ (I) => {
2219
+ const { image: U } = I;
2220
+ y.image = {
2221
+ data: U.data,
2222
+ width: a ?? U.width,
2223
+ height: l ?? U.height,
2224
+ depth: u ?? Math.sqrt(U.height)
2225
+ }, y.type = I.type, y.format = I.format, y.colorSpace = I.colorSpace, y.needsUpdate = !0;
2256
2226
  try {
2257
- i(U);
2227
+ n == null || n(y);
2258
2228
  } catch (q) {
2259
2229
  o != null ? o(q) : console.error(q), this.manager.itemError(e);
2260
2230
  }
2261
2231
  },
2262
2232
  s,
2263
2233
  o
2264
- );
2234
+ ), y;
2235
+ }
2236
+ }
2237
+ class zo extends gt {
2238
+ constructor(e = {}, n) {
2239
+ super(n), this.options = e;
2240
+ }
2241
+ load(e, n, s, o) {
2242
+ const { width: a, height: l } = this.options, u = new xi(null, a, l), y = new Zn(this.manager);
2243
+ return y.setRequestHeader(this.requestHeader), y.setPath(this.path), y.setWithCredentials(this.withCredentials), y.load(
2244
+ e,
2245
+ (E) => {
2246
+ const { image: I } = E;
2247
+ u.image = {
2248
+ data: I.data,
2249
+ width: a ?? I.width,
2250
+ height: l ?? I.height
2251
+ }, u.type = E.type, u.format = E.format, u.colorSpace = E.colorSpace, u.needsUpdate = !0;
2252
+ try {
2253
+ n == null || n(u);
2254
+ } catch (U) {
2255
+ o != null ? o(U) : console.error(U), this.manager.itemError(e);
2256
+ }
2257
+ },
2258
+ s,
2259
+ o
2260
+ ), u;
2265
2261
  }
2266
2262
  }
2267
- const fr = 1e-6, Mt = /* @__PURE__ */ new Re(), Dt = /* @__PURE__ */ new Re(), me = /* @__PURE__ */ new Re(), ct = /* @__PURE__ */ new Re(), vr = /* @__PURE__ */ new Re(), oo = /* @__PURE__ */ new Re(), ao = /* @__PURE__ */ new Di(), co = /* @__PURE__ */ new Mi(), lo = /* @__PURE__ */ new Bi();
2268
- class Xn {
2269
- constructor(e = 0, i = 0, s = 0, o = 0) {
2270
- this.distance = e, this.heading = i, this.pitch = s, this.roll = o;
2263
+ const fr = 1e-6, Dt = /* @__PURE__ */ new Re(), Lt = /* @__PURE__ */ new Re(), Ue = /* @__PURE__ */ new Re(), ct = /* @__PURE__ */ new Re(), vr = /* @__PURE__ */ new Re(), Ks = /* @__PURE__ */ new Re(), eo = /* @__PURE__ */ new Mi(), to = /* @__PURE__ */ new Fi(), ro = /* @__PURE__ */ new Pi();
2264
+ class Hn {
2265
+ constructor(e = 0, n = 0, s = 0, o = 0) {
2266
+ this.distance = e, this.heading = n, this.pitch = s, this.roll = o;
2271
2267
  }
2272
2268
  get distance() {
2273
2269
  return this._distance;
@@ -2279,13 +2275,13 @@ class Xn {
2279
2275
  return this._pitch;
2280
2276
  }
2281
2277
  set pitch(e) {
2282
- this._pitch = Je(e, -Math.PI / 2 + fr, Math.PI / 2 - fr);
2278
+ this._pitch = $e(e, -Math.PI / 2 + fr, Math.PI / 2 - fr);
2283
2279
  }
2284
- set(e, i, s, o) {
2285
- return this.distance = e, this.heading = i, this.pitch = s, o != null && (this.roll = o), this;
2280
+ set(e, n, s, o) {
2281
+ return this.distance = e, this.heading = n, this.pitch = s, o != null && (this.roll = o), this;
2286
2282
  }
2287
2283
  clone() {
2288
- return new Xn(this.distance, this.heading, this.pitch, this.roll);
2284
+ return new Hn(this.distance, this.heading, this.pitch, this.roll);
2289
2285
  }
2290
2286
  copy(e) {
2291
2287
  return this.distance = e.distance, this.heading = e.heading, this.pitch = e.pitch, this.roll = e.roll, this;
@@ -2293,46 +2289,46 @@ class Xn {
2293
2289
  equals(e) {
2294
2290
  return e.distance === this.distance && e.heading === this.heading && e.pitch === this.pitch && e.roll === this.roll;
2295
2291
  }
2296
- decompose(e, i, s, o, c = Gr.WGS84) {
2297
- c.getEastNorthUpVectors(
2292
+ decompose(e, n, s, o, a = Gr.WGS84) {
2293
+ a.getEastNorthUpVectors(
2298
2294
  e,
2299
- Mt,
2300
2295
  Dt,
2301
- me
2302
- ), o == null || o.copy(me);
2303
- const l = ct.copy(Mt).multiplyScalar(Math.cos(this.heading)).add(
2304
- vr.copy(Dt).multiplyScalar(Math.sin(this.heading))
2305
- ).multiplyScalar(Math.cos(this.pitch)).add(vr.copy(me).multiplyScalar(Math.sin(this.pitch))).normalize().multiplyScalar(this.distance);
2306
- if (i.copy(e).sub(l), this.roll !== 0) {
2307
- const v = ct.copy(e).sub(i).normalize();
2308
- me.applyQuaternion(
2309
- co.setFromAxisAngle(v, this.roll)
2296
+ Lt,
2297
+ Ue
2298
+ ), o == null || o.copy(Ue);
2299
+ const l = ct.copy(Dt).multiplyScalar(Math.cos(this.heading)).add(
2300
+ vr.copy(Lt).multiplyScalar(Math.sin(this.heading))
2301
+ ).multiplyScalar(Math.cos(this.pitch)).add(vr.copy(Ue).multiplyScalar(Math.sin(this.pitch))).normalize().multiplyScalar(this.distance);
2302
+ if (n.copy(e).sub(l), this.roll !== 0) {
2303
+ const u = ct.copy(e).sub(n).normalize();
2304
+ Ue.applyQuaternion(
2305
+ to.setFromAxisAngle(u, this.roll)
2310
2306
  );
2311
2307
  }
2312
2308
  s.setFromRotationMatrix(
2313
- ao.lookAt(i, e, me)
2309
+ eo.lookAt(n, e, Ue)
2314
2310
  );
2315
2311
  }
2316
- setFromCamera(e, i = Gr.WGS84) {
2317
- const s = ct.setFromMatrixPosition(e.matrixWorld), o = vr.set(0, 0, 0.5).unproject(e).sub(s).normalize(), c = i.getIntersection(lo.set(s, o));
2318
- if (c == null)
2312
+ setFromCamera(e, n = Gr.WGS84) {
2313
+ const s = ct.setFromMatrixPosition(e.matrixWorld), o = vr.set(0, 0, 0.5).unproject(e).sub(s).normalize(), a = n.getIntersection(ro.set(s, o));
2314
+ if (a == null)
2319
2315
  return;
2320
- this.distance = s.distanceTo(c), i.getEastNorthUpVectors(
2321
- c,
2322
- Mt,
2316
+ this.distance = s.distanceTo(a), n.getEastNorthUpVectors(
2317
+ a,
2323
2318
  Dt,
2324
- me
2319
+ Lt,
2320
+ Ue
2325
2321
  ), this.heading = Math.atan2(
2326
- Dt.dot(o),
2327
- Mt.dot(o)
2328
- ), this.pitch = Math.asin(me.dot(o));
2329
- const l = ct.copy(e.up).applyQuaternion(e.quaternion), v = oo.copy(o).multiplyScalar(-l.dot(o)).add(l).normalize(), y = ct.copy(o).multiplyScalar(-me.dot(o)).add(me).normalize(), E = y.dot(v), b = o.dot(y.cross(v));
2330
- return this.roll = Math.atan2(b, E), this;
2322
+ Lt.dot(o),
2323
+ Dt.dot(o)
2324
+ ), this.pitch = Math.asin(Ue.dot(o));
2325
+ const l = ct.copy(e.up).applyQuaternion(e.quaternion), u = Ks.copy(o).multiplyScalar(-l.dot(o)).add(l).normalize(), y = ct.copy(o).multiplyScalar(-Ue.dot(o)).add(Ue).normalize(), E = y.dot(u), I = o.dot(y.cross(u));
2326
+ return this.roll = Math.atan2(I, E), this;
2331
2327
  }
2332
2328
  }
2333
- const dt = class dt {
2334
- constructor(e = 0, i = 0, s = 0, o = 0) {
2335
- this.west = e, this.south = i, this.east = s, this.north = o;
2329
+ const wt = class wt {
2330
+ constructor(e = 0, n = 0, s = 0, o = 0) {
2331
+ this.west = e, this.south = n, this.east = s, this.north = o;
2336
2332
  }
2337
2333
  get width() {
2338
2334
  let e = this.east;
@@ -2341,11 +2337,11 @@ const dt = class dt {
2341
2337
  get height() {
2342
2338
  return this.north - this.south;
2343
2339
  }
2344
- set(e, i, s, o) {
2345
- return this.west = e, this.south = i, this.east = s, this.north = o, this;
2340
+ set(e, n, s, o) {
2341
+ return this.west = e, this.south = n, this.east = s, this.north = o, this;
2346
2342
  }
2347
2343
  clone() {
2348
- return new dt(this.west, this.south, this.east, this.north);
2344
+ return new wt(this.west, this.south, this.east, this.north);
2349
2345
  }
2350
2346
  copy(e) {
2351
2347
  return this.west = e.west, this.south = e.south, this.east = e.east, this.north = e.north, this;
@@ -2353,97 +2349,107 @@ const dt = class dt {
2353
2349
  equals(e) {
2354
2350
  return e.west === this.west && e.south === this.south && e.east === this.east && e.north === this.north;
2355
2351
  }
2356
- at(e, i, s = new st()) {
2352
+ at(e, n, s = new st()) {
2357
2353
  return s.set(
2358
2354
  this.west + (this.east - this.west) * e,
2359
- this.north + (this.south - this.north) * i
2355
+ this.north + (this.south - this.north) * n
2360
2356
  );
2361
2357
  }
2362
- fromArray(e, i = 0) {
2363
- return this.west = e[i], this.south = e[i + 1], this.east = e[i + 2], this.north = e[i + 3], this;
2358
+ fromArray(e, n = 0) {
2359
+ return this.west = e[n], this.south = e[n + 1], this.east = e[n + 2], this.north = e[n + 3], this;
2364
2360
  }
2365
- toArray(e = [], i = 0) {
2366
- return e[i] = this.west, e[i + 1] = this.south, e[i + 2] = this.east, e[i + 3] = this.north, e;
2361
+ toArray(e = [], n = 0) {
2362
+ return e[n] = this.west, e[n + 1] = this.south, e[n + 2] = this.east, e[n + 3] = this.north, e;
2367
2363
  }
2368
2364
  *[Symbol.iterator]() {
2369
2365
  yield this.west, yield this.south, yield this.east, yield this.north;
2370
2366
  }
2371
2367
  };
2372
- dt.MAX = /* @__PURE__ */ new dt(
2368
+ wt.MAX = /* @__PURE__ */ new wt(
2373
2369
  st.MIN_LONGITUDE,
2374
2370
  st.MIN_LATITUDE,
2375
2371
  st.MAX_LONGITUDE,
2376
2372
  st.MAX_LATITUDE
2377
2373
  );
2378
- let Yt = dt;
2379
- const uo = /^[ \t]*#include +"([\w\d./]+)"/gm;
2380
- function ho(r, e) {
2381
- return r.replace(uo, (i, s) => {
2382
- const c = s.split("/").reduce(
2383
- (l, v) => typeof l != "string" && l != null ? l[v] : void 0,
2374
+ let qt = wt;
2375
+ const no = /^[ \t]*#include +"([\w\d./]+)"/gm;
2376
+ function io(r, e) {
2377
+ return r.replace(no, (n, s) => {
2378
+ const a = s.split("/").reduce(
2379
+ (l, u) => typeof l != "string" && l != null ? l[u] : void 0,
2384
2380
  e
2385
2381
  );
2386
- if (typeof c != "string")
2382
+ if (typeof a != "string")
2387
2383
  throw new Error(`Could not find include for ${s}.`);
2388
- return ho(c, e);
2384
+ return io(a, e);
2389
2385
  });
2390
2386
  }
2391
- let Bt;
2392
- function fo() {
2393
- if (Bt != null)
2394
- return Bt;
2387
+ let zt;
2388
+ function so() {
2389
+ if (zt != null)
2390
+ return zt;
2395
2391
  const r = new Uint32Array([268435456]);
2396
- return Bt = new Uint8Array(r.buffer, r.byteOffset, r.byteLength)[0] === 0, Bt;
2392
+ return zt = new Uint8Array(r.buffer, r.byteOffset, r.byteLength)[0] === 0, zt;
2397
2393
  }
2398
- function ke(r, e, i, s = !0) {
2399
- if (s === fo())
2394
+ function ke(r, e, n, s = !0) {
2395
+ if (s === so())
2400
2396
  return new e(r);
2401
2397
  const o = Object.assign(new DataView(r), {
2402
- getFloat16(l, v) {
2403
- return zs(this, l, v);
2404
- }
2405
- }), c = new e(o.byteLength / e.BYTES_PER_ELEMENT);
2406
- for (let l = 0, v = 0; l < c.length; ++l, v += e.BYTES_PER_ELEMENT)
2407
- c[l] = o[i](v, s);
2408
- return c;
2409
- }
2410
- const vo = (r) => new Uint8Array(r), Vo = (r) => new Int8Array(r), Jo = (r, e) => ke(r, Uint16Array, "getUint16", e), $o = (r, e) => ke(r, Int16Array, "getInt16", e), Qo = (r, e) => ke(r, Int32Array, "getInt32", e), jo = (r, e) => ke(r, Uint32Array, "getUint32", e), Ko = (r, e) => ke(r, B, "getFloat16", e), ea = (r, e) => ke(r, Float32Array, "getFloat32", e), ta = (r, e) => ke(r, Float64Array, "getFloat64", e), ra = Bn(vo, {
2411
- format: hn,
2412
- minFilter: Hr,
2413
- magFilter: Hr,
2414
- wrapS: sr,
2415
- wrapT: sr,
2416
- wrapR: sr,
2417
- width: Zi,
2418
- height: Hi,
2419
- depth: Gi
2420
- });
2421
- function* Yn(r, e, i, s, o) {
2422
- if (i >= s)
2398
+ getFloat16(l, u) {
2399
+ return Ps(this, l, u);
2400
+ }
2401
+ }), a = new e(o.byteLength / e.BYTES_PER_ELEMENT);
2402
+ for (let l = 0, u = 0; l < a.length; ++l, u += e.BYTES_PER_ELEMENT)
2403
+ a[l] = o[n](u, s);
2404
+ return a;
2405
+ }
2406
+ const oo = (r) => new Uint8Array(r), ko = (r) => new Int8Array(r), Zo = (r, e) => ke(r, Uint16Array, "getUint16", e), Ho = (r, e) => ke(r, Int16Array, "getInt16", e), Go = (r, e) => ke(r, Int32Array, "getInt32", e), Wo = (r, e) => ke(r, Uint32Array, "getUint32", e), Xo = (r, e) => ke(r, L, "getFloat16", e), Yo = (r, e) => ke(r, Float32Array, "getFloat32", e), qo = (r, e) => ke(r, Float64Array, "getFloat64", e);
2407
+ class Vo extends Ls {
2408
+ constructor(e) {
2409
+ super(
2410
+ hn,
2411
+ oo,
2412
+ {
2413
+ format: ln,
2414
+ minFilter: Hr,
2415
+ magFilter: Hr,
2416
+ wrapS: sr,
2417
+ wrapT: sr,
2418
+ wrapR: sr,
2419
+ width: Di,
2420
+ height: Li,
2421
+ depth: zi
2422
+ },
2423
+ e
2424
+ );
2425
+ }
2426
+ }
2427
+ function* Gn(r, e, n, s, o) {
2428
+ if (n >= s)
2423
2429
  return;
2424
- const c = 2 ** i, l = i + 1, v = 2 ** l, y = Math.floor(r / c * v), E = Math.floor(e / c * v), b = [
2430
+ const a = 2 ** n, l = n + 1, u = 2 ** l, y = Math.floor(r / a * u), E = Math.floor(e / a * u), I = [
2425
2431
  [y, E, l],
2426
2432
  [y + 1, E, l],
2427
2433
  [y, E + 1, l],
2428
2434
  [y + 1, E + 1, l]
2429
2435
  ];
2430
2436
  if (l < s)
2431
- for (const U of b)
2432
- for (const q of Yn(...U, s, o))
2437
+ for (const U of I)
2438
+ for (const q of Gn(...U, s, o))
2433
2439
  yield q;
2434
2440
  else
2435
- for (const U of b)
2436
- yield (o ?? new wt()).set(...U);
2441
+ for (const U of I)
2442
+ yield (o ?? new dt()).set(...U);
2437
2443
  }
2438
- class wt {
2439
- constructor(e = 0, i = 0, s = 0) {
2440
- this.x = e, this.y = i, this.z = s;
2444
+ class dt {
2445
+ constructor(e = 0, n = 0, s = 0) {
2446
+ this.x = e, this.y = n, this.z = s;
2441
2447
  }
2442
- set(e, i, s) {
2443
- return this.x = e, this.y = i, s != null && (this.z = s), this;
2448
+ set(e, n, s) {
2449
+ return this.x = e, this.y = n, s != null && (this.z = s), this;
2444
2450
  }
2445
2451
  clone() {
2446
- return new wt(this.x, this.y, this.z);
2452
+ return new dt(this.x, this.y, this.z);
2447
2453
  }
2448
2454
  copy(e) {
2449
2455
  return this.x = e.x, this.y = e.y, this.z = e.z, this;
@@ -2451,124 +2457,120 @@ class wt {
2451
2457
  equals(e) {
2452
2458
  return e.x === this.x && e.y === this.y && e.z === this.z;
2453
2459
  }
2454
- getParent(e = new wt()) {
2455
- const i = 2 ** this.z, s = this.x / i, o = this.y / i, c = this.z - 1, l = 2 ** c;
2456
- return e.set(Math.floor(s * l), Math.floor(o * l), c);
2460
+ getParent(e = new dt()) {
2461
+ const n = 2 ** this.z, s = this.x / n, o = this.y / n, a = this.z - 1, l = 2 ** a;
2462
+ return e.set(Math.floor(s * l), Math.floor(o * l), a);
2457
2463
  }
2458
- *traverseChildren(e, i) {
2459
- const { x: s, y: o, z: c } = this;
2460
- for (const l of Yn(s, o, c, c + e, i))
2464
+ *traverseChildren(e, n) {
2465
+ const { x: s, y: o, z: a } = this;
2466
+ for (const l of Gn(s, o, a, a + e, n))
2461
2467
  yield l;
2462
2468
  }
2463
- fromArray(e, i = 0) {
2464
- return this.x = e[i], this.y = e[i + 1], this.z = e[i + 2], this;
2469
+ fromArray(e, n = 0) {
2470
+ return this.x = e[n], this.y = e[n + 1], this.z = e[n + 2], this;
2465
2471
  }
2466
- toArray(e = [], i = 0) {
2467
- return e[i] = this.x, e[i + 1] = this.y, e[i + 2] = this.z, e;
2472
+ toArray(e = [], n = 0) {
2473
+ return e[n] = this.x, e[n + 1] = this.y, e[n + 2] = this.z, e;
2468
2474
  }
2469
2475
  *[Symbol.iterator]() {
2470
2476
  yield this.x, yield this.y, yield this.z;
2471
2477
  }
2472
2478
  }
2473
- const cn = /* @__PURE__ */ new fn();
2474
- class qn {
2475
- constructor(e = 2, i = 1, s = Yt.MAX) {
2476
- this.width = e, this.height = i, this.rectangle = s;
2479
+ const an = /* @__PURE__ */ new un();
2480
+ class Wn {
2481
+ constructor(e = 2, n = 1, s = qt.MAX) {
2482
+ this.width = e, this.height = n, this.rectangle = s;
2477
2483
  }
2478
2484
  clone() {
2479
- return new qn(this.width, this.height, this.rectangle.clone());
2485
+ return new Wn(this.width, this.height, this.rectangle.clone());
2480
2486
  }
2481
2487
  copy(e) {
2482
2488
  return this.width = e.width, this.height = e.height, this.rectangle.copy(e.rectangle), this;
2483
2489
  }
2484
- getSize(e, i = new fn()) {
2485
- return i.set(this.width << e, this.height << e);
2490
+ getSize(e, n = new un()) {
2491
+ return n.set(this.width << e, this.height << e);
2486
2492
  }
2487
2493
  // Reference: https://github.com/CesiumGS/cesium/blob/1.122/packages/engine/Source/Core/GeographicTilingScheme.js#L210
2488
- getTile(e, i, s = new wt()) {
2489
- const o = this.getSize(i, cn), { rectangle: c } = this, l = c.width / o.x, v = c.height / o.y, { west: y, south: E, east: b } = c;
2494
+ getTile(e, n, s = new dt()) {
2495
+ const o = this.getSize(n, an), { rectangle: a } = this, l = a.width / o.x, u = a.height / o.y, { west: y, south: E, east: I } = a;
2490
2496
  let U = e.longitude;
2491
- b < y && (U += Math.PI * 2);
2497
+ I < y && (U += Math.PI * 2);
2492
2498
  let q = Math.floor((U - y) / l);
2493
2499
  q >= o.x && (q = o.x - 1);
2494
- let se = Math.floor((e.latitude - E) / v);
2495
- return se >= o.y && (se = o.y - 1), s.x = q, s.y = se, s.z = i, s;
2500
+ let se = Math.floor((e.latitude - E) / u);
2501
+ return se >= o.y && (se = o.y - 1), s.x = q, s.y = se, s.z = n, s;
2496
2502
  }
2497
2503
  // Reference: https://github.com/CesiumGS/cesium/blob/1.122/packages/engine/Source/Core/GeographicTilingScheme.js#L169
2498
- getRectangle(e, i = new Yt()) {
2499
- const s = this.getSize(e.z, cn), { rectangle: o } = this, c = o.width / s.x, l = o.height / s.y, { west: v, north: y } = o;
2500
- return i.west = e.x * c + v, i.east = (e.x + 1) * c + v, i.north = y - (s.y - e.y - 1) * l, i.south = y - (s.y - e.y) * l, i;
2504
+ getRectangle(e, n = new qt()) {
2505
+ const s = this.getSize(e.z, an), { rectangle: o } = this, a = o.width / s.x, l = o.height / s.y, { west: u, north: y } = o;
2506
+ return n.west = e.x * a + u, n.east = (e.x + 1) * a + u, n.north = y - (s.y - e.y - 1) * l, n.south = y - (s.y - e.y) * l, n;
2501
2507
  }
2502
2508
  }
2503
- const yo = /#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*(?:i\s*\+\+|\+\+\s*i)\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;
2504
- function po(r, e, i, s) {
2509
+ const ao = /#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*(?:i\s*\+\+|\+\+\s*i)\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;
2510
+ function co(r, e, n, s) {
2505
2511
  let o = "";
2506
- for (let c = parseInt(e); c < parseInt(i); ++c)
2507
- o += s.replace(/\[\s*i\s*\]/g, "[" + c + "]").replace(/UNROLLED_LOOP_INDEX/g, `${c}`);
2512
+ for (let a = parseInt(e); a < parseInt(n); ++a)
2513
+ o += s.replace(/\[\s*i\s*\]/g, "[" + a + "]").replace(/UNROLLED_LOOP_INDEX/g, `${a}`);
2508
2514
  return o;
2509
2515
  }
2510
- function na(r) {
2511
- return r.replace(yo, po);
2516
+ function $o(r) {
2517
+ return r.replace(ao, co);
2512
2518
  }
2513
2519
  export {
2514
- ki as ArrayBufferLoader,
2515
- Eo as DEFAULT_STBN_URL,
2516
- Gs as DataLoader,
2517
- qo as EXR3DLoader,
2520
+ Bi as ArrayBufferLoader,
2521
+ po as DEFAULT_STBN_URL,
2522
+ Ls as DataTextureLoader,
2523
+ Lo as EXR3DTextureLoader,
2524
+ zo as EXRTextureLoader,
2518
2525
  Gr as Ellipsoid,
2519
- oa as EllipsoidGeometry,
2520
- B as Float16Array,
2526
+ jo as EllipsoidGeometry,
2527
+ L as Float16Array,
2521
2528
  st as Geodetic,
2522
- Xn as PointOfView,
2523
- Yt as Rectangle,
2524
- ra as STBNLoader,
2525
- Gi as STBN_TEXTURE_DEPTH,
2526
- Hi as STBN_TEXTURE_HEIGHT,
2527
- Zi as STBN_TEXTURE_WIDTH,
2528
- wt as TileCoordinate,
2529
- qn as TilingScheme,
2530
- ks as TypedArrayLoader,
2531
- go as assertType,
2532
- Fo as ceilPowerOfTwo,
2533
- Je as clamp,
2534
- ko as closeTo,
2535
- bo as createData3DTextureLoader,
2536
- Bn as createData3DTextureLoaderClass,
2537
- No as createDataTextureLoader,
2538
- Ws as createDataTextureLoaderClass,
2539
- _o as createTypedArrayLoader,
2540
- Mn as createTypedArrayLoaderClass,
2541
- Zo as define,
2542
- Wo as defineExpression,
2543
- Go as defineFloat,
2544
- Ho as defineInt,
2545
- Xo as definePropertyShorthand,
2546
- Yo as defineUniformShorthand,
2547
- Ro as degrees,
2548
- Oo as euclideanModulo,
2549
- Lo as floorPowerOfTwo,
2550
- To as fromBufferGeometryLike,
2551
- mo as inverseLerp,
2552
- xo as isPowerOfTwo,
2553
- Io as isTypedArray,
2554
- Uo as lerp,
2555
- Po as normalize,
2556
- Ko as parseFloat16Array,
2557
- ea as parseFloat32Array,
2558
- ta as parseFloat64Array,
2559
- $o as parseInt16Array,
2560
- Qo as parseInt32Array,
2561
- Vo as parseInt8Array,
2562
- Jo as parseUint16Array,
2563
- jo as parseUint32Array,
2564
- vo as parseUint8Array,
2565
- Co as radians,
2566
- Mo as remap,
2567
- Do as remapClamped,
2568
- ho as resolveIncludes,
2569
- zo as saturate,
2570
- Bo as smoothstep,
2571
- So as toBufferGeometryLike,
2572
- na as unrollLoops
2529
+ Hn as PointOfView,
2530
+ qt as Rectangle,
2531
+ Vo as STBNLoader,
2532
+ zi as STBN_TEXTURE_DEPTH,
2533
+ Li as STBN_TEXTURE_HEIGHT,
2534
+ Di as STBN_TEXTURE_WIDTH,
2535
+ dt as TileCoordinate,
2536
+ Wn as TilingScheme,
2537
+ Bs as TypedArrayLoader,
2538
+ uo as assertType,
2539
+ _o as ceilPowerOfTwo,
2540
+ $e as clamp,
2541
+ Ro as closeTo,
2542
+ xo as define,
2543
+ Po as defineExpression,
2544
+ Mo as defineFloat,
2545
+ Fo as defineInt,
2546
+ Bo as definePropertyShorthand,
2547
+ Do as defineUniformShorthand,
2548
+ To as degrees,
2549
+ go as euclideanModulo,
2550
+ bo as floorPowerOfTwo,
2551
+ vo as fromBufferGeometryLike,
2552
+ Ao as inverseLerp,
2553
+ yo as isFloatLinearSupported,
2554
+ Io as isPowerOfTwo,
2555
+ wo as isTypedArray,
2556
+ So as lerp,
2557
+ No as normalize,
2558
+ Xo as parseFloat16Array,
2559
+ Yo as parseFloat32Array,
2560
+ qo as parseFloat64Array,
2561
+ Ho as parseInt16Array,
2562
+ Go as parseInt32Array,
2563
+ ko as parseInt8Array,
2564
+ Zo as parseUint16Array,
2565
+ Wo as parseUint32Array,
2566
+ oo as parseUint8Array,
2567
+ Eo as radians,
2568
+ Oo as remap,
2569
+ Uo as remapClamped,
2570
+ io as resolveIncludes,
2571
+ Co as saturate,
2572
+ mo as smoothstep,
2573
+ fo as toBufferGeometryLike,
2574
+ $o as unrollLoops
2573
2575
  };
2574
2576
  //# sourceMappingURL=index.js.map