@thatopen/components 2.3.0-alpha.2 → 2.3.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +23 -23
- package/dist/index.mjs +767 -762
- package/dist/namespace.d.ts +2006 -2006
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -92,23 +92,23 @@ function rs(c) {
|
|
|
92
92
|
return 2 * (e * t + t * s + s * e);
|
|
93
93
|
}
|
|
94
94
|
function bi(c, e, t, s, i = null) {
|
|
95
|
-
let n = 1 / 0, r = 1 / 0, o = 1 / 0, a = -1 / 0, l = -1 / 0, h = -1 / 0,
|
|
95
|
+
let n = 1 / 0, r = 1 / 0, o = 1 / 0, a = -1 / 0, l = -1 / 0, h = -1 / 0, d = 1 / 0, u = 1 / 0, f = 1 / 0, E = -1 / 0, p = -1 / 0, I = -1 / 0;
|
|
96
96
|
const m = i !== null;
|
|
97
97
|
for (let _ = e * 6, y = (e + t) * 6; _ < y; _ += 6) {
|
|
98
98
|
const C = c[_ + 0], R = c[_ + 1], F = C - R, O = C + R;
|
|
99
|
-
F < n && (n = F), O > a && (a = O), m && C <
|
|
99
|
+
F < n && (n = F), O > a && (a = O), m && C < d && (d = C), m && C > E && (E = C);
|
|
100
100
|
const L = c[_ + 2], N = c[_ + 3], x = L - N, k = L + N;
|
|
101
|
-
x < r && (r = x), k > l && (l = k), m && L <
|
|
101
|
+
x < r && (r = x), k > l && (l = k), m && L < u && (u = L), m && L > p && (p = L);
|
|
102
102
|
const w = c[_ + 4], P = c[_ + 5], T = w - P, M = w + P;
|
|
103
103
|
T < o && (o = T), M > h && (h = M), m && w < f && (f = w), m && w > I && (I = w);
|
|
104
104
|
}
|
|
105
|
-
s[0] = n, s[1] = r, s[2] = o, s[3] = a, s[4] = l, s[5] = h, m && (i[0] =
|
|
105
|
+
s[0] = n, s[1] = r, s[2] = o, s[3] = a, s[4] = l, s[5] = h, m && (i[0] = d, i[1] = u, i[2] = f, i[3] = E, i[4] = p, i[5] = I);
|
|
106
106
|
}
|
|
107
107
|
function Ao(c, e, t, s) {
|
|
108
108
|
let i = 1 / 0, n = 1 / 0, r = 1 / 0, o = -1 / 0, a = -1 / 0, l = -1 / 0;
|
|
109
|
-
for (let h = e * 6,
|
|
110
|
-
const
|
|
111
|
-
|
|
109
|
+
for (let h = e * 6, d = (e + t) * 6; h < d; h += 6) {
|
|
110
|
+
const u = c[h + 0];
|
|
111
|
+
u < i && (i = u), u > o && (o = u);
|
|
112
112
|
const f = c[h + 2];
|
|
113
113
|
f < n && (n = f), f > a && (a = f);
|
|
114
114
|
const E = c[h + 4];
|
|
@@ -122,9 +122,9 @@ function Ro(c, e) {
|
|
|
122
122
|
let l = 3;
|
|
123
123
|
t.isInterleavedBufferAttribute && (l = t.data.stride);
|
|
124
124
|
const h = ["getX", "getY", "getZ"];
|
|
125
|
-
for (let
|
|
126
|
-
const
|
|
127
|
-
let E =
|
|
125
|
+
for (let d = 0; d < i; d++) {
|
|
126
|
+
const u = d * 3, f = d * 6;
|
|
127
|
+
let E = u + 0, p = u + 1, I = u + 2;
|
|
128
128
|
s && (E = s[E], p = s[p], I = s[I]), r || (E = E * l + a, p = p * l + a, I = I * l + a);
|
|
129
129
|
for (let m = 0; m < 3; m++) {
|
|
130
130
|
let _, y, C;
|
|
@@ -155,16 +155,16 @@ function wo(c, e, t, s, i, n) {
|
|
|
155
155
|
else if (n === Eo) {
|
|
156
156
|
const a = rs(c);
|
|
157
157
|
let l = Si * i;
|
|
158
|
-
const h = s * 6,
|
|
159
|
-
for (let
|
|
160
|
-
const f = e[
|
|
158
|
+
const h = s * 6, d = (s + i) * 6;
|
|
159
|
+
for (let u = 0; u < 3; u++) {
|
|
160
|
+
const f = e[u], I = (e[u + 3] - f) / fe;
|
|
161
161
|
if (i < fe / 4) {
|
|
162
162
|
const m = [...me];
|
|
163
163
|
m.length = i;
|
|
164
164
|
let _ = 0;
|
|
165
|
-
for (let C = h; C <
|
|
165
|
+
for (let C = h; C < d; C += 6, _++) {
|
|
166
166
|
const R = m[_];
|
|
167
|
-
R.candidate = t[C + 2 *
|
|
167
|
+
R.candidate = t[C + 2 * u], R.count = 0;
|
|
168
168
|
const {
|
|
169
169
|
bounds: F,
|
|
170
170
|
leftCacheBounds: O,
|
|
@@ -181,8 +181,8 @@ function wo(c, e, t, s, i, n) {
|
|
|
181
181
|
for (; C + 1 < y && m[C + 1].candidate === R.candidate; )
|
|
182
182
|
m.splice(C + 1, 1), y--;
|
|
183
183
|
}
|
|
184
|
-
for (let C = h; C <
|
|
185
|
-
const R = t[C + 2 *
|
|
184
|
+
for (let C = h; C < d; C += 6) {
|
|
185
|
+
const R = t[C + 2 * u];
|
|
186
186
|
for (let F = 0; F < y; F++) {
|
|
187
187
|
const O = m[F];
|
|
188
188
|
R >= O.candidate ? xs(C, t, O.rightCacheBounds) : (xs(C, t, O.leftCacheBounds), O.count++);
|
|
@@ -195,7 +195,7 @@ function wo(c, e, t, s, i, n) {
|
|
|
195
195
|
let k = 0;
|
|
196
196
|
O !== 0 && (k = rs(N) / a);
|
|
197
197
|
const w = Mn + Si * (x * F + k * O);
|
|
198
|
-
w < l && (r =
|
|
198
|
+
w < l && (r = u, l = w, o = R.candidate);
|
|
199
199
|
}
|
|
200
200
|
} else {
|
|
201
201
|
for (let y = 0; y < fe; y++) {
|
|
@@ -205,8 +205,8 @@ function wo(c, e, t, s, i, n) {
|
|
|
205
205
|
for (let F = 0; F < 3; F++)
|
|
206
206
|
R[F] = 1 / 0, R[F + 3] = -1 / 0;
|
|
207
207
|
}
|
|
208
|
-
for (let y = h; y <
|
|
209
|
-
let F = ~~((t[y + 2 *
|
|
208
|
+
for (let y = h; y < d; y += 6) {
|
|
209
|
+
let F = ~~((t[y + 2 * u] - f) / I);
|
|
210
210
|
F >= fe && (F = fe - 1);
|
|
211
211
|
const O = me[F];
|
|
212
212
|
O.count++, xs(y, t, O.bounds);
|
|
@@ -226,7 +226,7 @@ function wo(c, e, t, s, i, n) {
|
|
|
226
226
|
const k = i - _;
|
|
227
227
|
k !== 0 && (x = rs(L) / a);
|
|
228
228
|
const w = Mn + Si * (N * _ + x * k);
|
|
229
|
-
w < l && (r =
|
|
229
|
+
w < l && (r = u, l = w, o = C.candidate);
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
}
|
|
@@ -254,12 +254,12 @@ function Oo(c, e, t, s, i, n) {
|
|
|
254
254
|
o--;
|
|
255
255
|
if (r < o) {
|
|
256
256
|
for (let h = 0; h < 3; h++) {
|
|
257
|
-
let
|
|
258
|
-
e[r * 3 + h] = e[o * 3 + h], e[o * 3 + h] =
|
|
257
|
+
let d = e[r * 3 + h];
|
|
258
|
+
e[r * 3 + h] = e[o * 3 + h], e[o * 3 + h] = d;
|
|
259
259
|
}
|
|
260
260
|
for (let h = 0; h < 6; h++) {
|
|
261
|
-
let
|
|
262
|
-
t[r * 6 + h] = t[o * 6 + h], t[o * 6 + h] =
|
|
261
|
+
let d = t[r * 6 + h];
|
|
262
|
+
t[r * 6 + h] = t[o * 6 + h], t[o * 6 + h] = d;
|
|
263
263
|
}
|
|
264
264
|
r++, o--;
|
|
265
265
|
} else
|
|
@@ -277,9 +277,9 @@ function So(c, e, t, s, i, n) {
|
|
|
277
277
|
if (r < o) {
|
|
278
278
|
let h = c[r];
|
|
279
279
|
c[r] = c[o], c[o] = h;
|
|
280
|
-
for (let
|
|
281
|
-
let
|
|
282
|
-
t[r * 6 +
|
|
280
|
+
for (let d = 0; d < 6; d++) {
|
|
281
|
+
let u = t[r * 6 + d];
|
|
282
|
+
t[r * 6 + d] = t[o * 6 + d], t[o * 6 + d] = u;
|
|
283
283
|
}
|
|
284
284
|
r++, o--;
|
|
285
285
|
} else
|
|
@@ -294,11 +294,11 @@ function No(c, e) {
|
|
|
294
294
|
}
|
|
295
295
|
function bo(c, e) {
|
|
296
296
|
const t = c.geometry, s = t.index ? t.index.array : null, i = e.maxDepth, n = e.verbose, r = e.maxLeafTris, o = e.strategy, a = e.onProgress, l = ts(t), h = c._indirectBuffer;
|
|
297
|
-
let
|
|
298
|
-
const
|
|
297
|
+
let d = !1;
|
|
298
|
+
const u = new Float32Array(6), f = new Float32Array(6), E = Ro(t, u), p = e.indirect ? So : Oo, I = [], m = e.indirect ? vr(t) : xr(t);
|
|
299
299
|
if (m.length === 1) {
|
|
300
300
|
const C = m[0], R = new Ds();
|
|
301
|
-
R.boundingData =
|
|
301
|
+
R.boundingData = u, Ao(E, C.offset, C.count, f), y(R, C.offset, C.count, f), I.push(R);
|
|
302
302
|
} else
|
|
303
303
|
for (let C of m) {
|
|
304
304
|
const R = new Ds();
|
|
@@ -309,7 +309,7 @@ function bo(c, e) {
|
|
|
309
309
|
a && a(C / l);
|
|
310
310
|
}
|
|
311
311
|
function y(C, R, F, O = null, L = 0) {
|
|
312
|
-
if (!
|
|
312
|
+
if (!d && L >= i && (d = !0, n && (console.warn(`MeshBVH: Max depth of ${i} reached when generating BVH. Consider increasing maxDepth.`), console.warn(t))), F <= r || L >= i)
|
|
313
313
|
return _(R + F), C.offset = R, C.count = F, C;
|
|
314
314
|
const N = wo(C.boundingData, O, E, R, F, o);
|
|
315
315
|
if (N.axis === -1)
|
|
@@ -335,28 +335,28 @@ function Po(c, e) {
|
|
|
335
335
|
const s = bo(c, e);
|
|
336
336
|
let i, n, r;
|
|
337
337
|
const o = [], a = e.useSharedArrayBuffer ? SharedArrayBuffer : ArrayBuffer;
|
|
338
|
-
for (let
|
|
339
|
-
const
|
|
340
|
-
let f = l(
|
|
338
|
+
for (let d = 0; d < s.length; d++) {
|
|
339
|
+
const u = s[d];
|
|
340
|
+
let f = l(u);
|
|
341
341
|
const E = new a(ri * f);
|
|
342
|
-
i = new Float32Array(E), n = new Uint32Array(E), r = new Uint16Array(E), h(0,
|
|
342
|
+
i = new Float32Array(E), n = new Uint32Array(E), r = new Uint16Array(E), h(0, u), o.push(E);
|
|
343
343
|
}
|
|
344
344
|
c._roots = o;
|
|
345
345
|
return;
|
|
346
|
-
function l(
|
|
347
|
-
return
|
|
346
|
+
function l(d) {
|
|
347
|
+
return d.count ? 1 : 1 + l(d.left) + l(d.right);
|
|
348
348
|
}
|
|
349
|
-
function h(
|
|
350
|
-
const f =
|
|
349
|
+
function h(d, u) {
|
|
350
|
+
const f = d / 4, E = d / 2, p = !!u.count, I = u.boundingData;
|
|
351
351
|
for (let m = 0; m < 6; m++)
|
|
352
352
|
i[f + m] = I[m];
|
|
353
353
|
if (p) {
|
|
354
|
-
const m =
|
|
355
|
-
return n[f + 6] = m, r[E + 14] = _, r[E + 15] = yi,
|
|
354
|
+
const m = u.offset, _ = u.count;
|
|
355
|
+
return n[f + 6] = m, r[E + 14] = _, r[E + 15] = yi, d + ri;
|
|
356
356
|
} else {
|
|
357
|
-
const m =
|
|
357
|
+
const m = u.left, _ = u.right, y = u.splitAxis;
|
|
358
358
|
let C;
|
|
359
|
-
if (C = h(
|
|
359
|
+
if (C = h(d + ri, m), C / 4 > Math.pow(2, 32))
|
|
360
360
|
throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");
|
|
361
361
|
return n[f + 6] = C / 4, C = h(C, _), n[f + 7] = y, C;
|
|
362
362
|
}
|
|
@@ -395,8 +395,8 @@ pe.prototype.setFromBox = function() {
|
|
|
395
395
|
for (let l = 0; l <= 1; l++)
|
|
396
396
|
for (let h = 0; h <= 1; h++) {
|
|
397
397
|
c.x = i.x * a + n.x * (1 - a), c.y = i.y * l + n.y * (1 - l), c.z = i.z * h + n.z * (1 - h);
|
|
398
|
-
const
|
|
399
|
-
r = Math.min(
|
|
398
|
+
const d = t.dot(c);
|
|
399
|
+
r = Math.min(d, r), o = Math.max(d, o);
|
|
400
400
|
}
|
|
401
401
|
this.min = r, this.max = o;
|
|
402
402
|
};
|
|
@@ -406,9 +406,9 @@ const Lo = function() {
|
|
|
406
406
|
return function(i, n, r) {
|
|
407
407
|
const o = i.start, a = c, l = n.start, h = e;
|
|
408
408
|
t.subVectors(o, l), c.subVectors(i.end, i.start), e.subVectors(n.end, n.start);
|
|
409
|
-
const
|
|
409
|
+
const d = t.dot(h), u = h.dot(a), f = h.dot(h), E = t.dot(a), I = a.dot(a) * f - u * u;
|
|
410
410
|
let m, _;
|
|
411
|
-
I !== 0 ? m = (
|
|
411
|
+
I !== 0 ? m = (d * u - E * f) / I : m = 0, _ = (d + m * u) / f, r.x = m, r.y = _;
|
|
412
412
|
};
|
|
413
413
|
}(), gn = function() {
|
|
414
414
|
const c = new Qe(), e = new Q(), t = new Q();
|
|
@@ -427,11 +427,11 @@ const Lo = function() {
|
|
|
427
427
|
} else {
|
|
428
428
|
let h;
|
|
429
429
|
a < 0 ? h = i.start : h = i.end;
|
|
430
|
-
let
|
|
431
|
-
l < 0 ?
|
|
432
|
-
const
|
|
433
|
-
if (i.closestPointToPoint(
|
|
434
|
-
r.copy(
|
|
430
|
+
let d;
|
|
431
|
+
l < 0 ? d = n.start : d = n.end;
|
|
432
|
+
const u = e, f = t;
|
|
433
|
+
if (i.closestPointToPoint(d, !0, e), n.closestPointToPoint(h, !0, t), u.distanceToSquared(d) <= f.distanceToSquared(h)) {
|
|
434
|
+
r.copy(u), o.copy(d);
|
|
435
435
|
return;
|
|
436
436
|
} else {
|
|
437
437
|
r.copy(h), o.copy(f);
|
|
@@ -442,8 +442,8 @@ const Lo = function() {
|
|
|
442
442
|
}(), vo = function() {
|
|
443
443
|
const c = new Q(), e = new Q(), t = new In(), s = new he();
|
|
444
444
|
return function(n, r) {
|
|
445
|
-
const { radius: o, center: a } = n, { a: l, b: h, c:
|
|
446
|
-
if (s.start = l, s.end = h, s.closestPointToPoint(a, !0, c).distanceTo(a) <= o || (s.start = l, s.end =
|
|
445
|
+
const { radius: o, center: a } = n, { a: l, b: h, c: d } = r;
|
|
446
|
+
if (s.start = l, s.end = h, s.closestPointToPoint(a, !0, c).distanceTo(a) <= o || (s.start = l, s.end = d, s.closestPointToPoint(a, !0, c).distanceTo(a) <= o) || (s.start = h, s.end = d, s.closestPointToPoint(a, !0, c).distanceTo(a) <= o))
|
|
447
447
|
return !0;
|
|
448
448
|
const p = r.getPlane(t);
|
|
449
449
|
if (Math.abs(p.distanceToPoint(a)) <= o) {
|
|
@@ -469,8 +469,8 @@ class ee extends $e {
|
|
|
469
469
|
this.getNormal(o), a.setFromPoints(o, i);
|
|
470
470
|
const l = n[1], h = r[1];
|
|
471
471
|
l.subVectors(e, t), h.setFromPoints(l, i);
|
|
472
|
-
const
|
|
473
|
-
|
|
472
|
+
const d = n[2], u = r[2];
|
|
473
|
+
d.subVectors(t, s), u.setFromPoints(d, i);
|
|
474
474
|
const f = n[3], E = r[3];
|
|
475
475
|
f.subVectors(s, e), E.setFromPoints(f, i), this.sphere.setFromPoints(this.points), this.plane.setFromNormalAndCoplanarPoint(o, e), this.needsUpdate = !1;
|
|
476
476
|
}
|
|
@@ -479,16 +479,16 @@ ee.prototype.closestPointToSegment = function() {
|
|
|
479
479
|
const c = new Q(), e = new Q(), t = new he();
|
|
480
480
|
return function(i, n = null, r = null) {
|
|
481
481
|
const { start: o, end: a } = i, l = this.points;
|
|
482
|
-
let h,
|
|
483
|
-
for (let
|
|
484
|
-
const f = (
|
|
485
|
-
t.start.copy(l[
|
|
482
|
+
let h, d = 1 / 0;
|
|
483
|
+
for (let u = 0; u < 3; u++) {
|
|
484
|
+
const f = (u + 1) % 3;
|
|
485
|
+
t.start.copy(l[u]), t.end.copy(l[f]), gn(t, i, c, e), h = c.distanceToSquared(e), h < d && (d = h, n && n.copy(c), r && r.copy(e));
|
|
486
486
|
}
|
|
487
|
-
return this.closestPointToPoint(o, c), h = o.distanceToSquared(c), h <
|
|
487
|
+
return this.closestPointToPoint(o, c), h = o.distanceToSquared(c), h < d && (d = h, n && n.copy(c), r && r.copy(o)), this.closestPointToPoint(a, c), h = a.distanceToSquared(c), h < d && (d = h, n && n.copy(c), r && r.copy(a)), Math.sqrt(d);
|
|
488
488
|
};
|
|
489
489
|
}();
|
|
490
490
|
ee.prototype.intersectsTriangle = function() {
|
|
491
|
-
const c = new ee(), e = new Array(3), t = new Array(3), s = new pe(), i = new pe(), n = new Q(), r = new Q(), o = new Q(), a = new Q(), l = new Q(), h = new he(),
|
|
491
|
+
const c = new ee(), e = new Array(3), t = new Array(3), s = new pe(), i = new pe(), n = new Q(), r = new Q(), o = new Q(), a = new Q(), l = new Q(), h = new he(), d = new he(), u = new he(), f = new Q();
|
|
492
492
|
function E(p, I, m) {
|
|
493
493
|
const _ = p.points;
|
|
494
494
|
let y = 0, C = -1;
|
|
@@ -542,22 +542,22 @@ ee.prototype.intersectsTriangle = function() {
|
|
|
542
542
|
}
|
|
543
543
|
return m && (_ || console.warn("ExtendedTriangle.intersectsTriangle: Triangles are coplanar which does not support an output edge. Setting edge to 0, 0, 0."), m.start.set(0, 0, 0), m.end.set(0, 0, 0)), !0;
|
|
544
544
|
} else {
|
|
545
|
-
const R = E(this, C,
|
|
546
|
-
if (R === 1 && I.containsPoint(
|
|
547
|
-
return m && (m.start.copy(
|
|
545
|
+
const R = E(this, C, d);
|
|
546
|
+
if (R === 1 && I.containsPoint(d.end))
|
|
547
|
+
return m && (m.start.copy(d.end), m.end.copy(d.end)), !0;
|
|
548
548
|
if (R !== 2)
|
|
549
549
|
return !1;
|
|
550
|
-
const F = E(I, y,
|
|
551
|
-
if (F === 1 && this.containsPoint(
|
|
552
|
-
return m && (m.start.copy(
|
|
550
|
+
const F = E(I, y, u);
|
|
551
|
+
if (F === 1 && this.containsPoint(u.end))
|
|
552
|
+
return m && (m.start.copy(u.end), m.end.copy(u.end)), !0;
|
|
553
553
|
if (F !== 2)
|
|
554
554
|
return !1;
|
|
555
|
-
if (
|
|
556
|
-
let P =
|
|
557
|
-
|
|
555
|
+
if (d.delta(o), u.delta(a), o.dot(a) < 0) {
|
|
556
|
+
let P = u.start;
|
|
557
|
+
u.start = u.end, u.end = P;
|
|
558
558
|
}
|
|
559
|
-
const O =
|
|
560
|
-
return O !== x && N !== L && k === w ? !1 : (m && (l.subVectors(
|
|
559
|
+
const O = d.start.dot(o), L = d.end.dot(o), N = u.start.dot(o), x = u.end.dot(o), k = L < N, w = O < x;
|
|
560
|
+
return O !== x && N !== L && k === w ? !1 : (m && (l.subVectors(d.start, u.start), l.dot(o) > 0 ? m.start.copy(d.start) : m.start.copy(u.start), l.subVectors(d.end, u.end), l.dot(o) < 0 ? m.end.copy(d.end) : m.end.copy(u.end)), !0);
|
|
561
561
|
}
|
|
562
562
|
};
|
|
563
563
|
}();
|
|
@@ -574,16 +574,16 @@ ee.prototype.distanceToTriangle = function() {
|
|
|
574
574
|
if (this.intersectsTriangle(r, l))
|
|
575
575
|
return (o || a) && (o && l.getCenter(o), a && l.getCenter(a)), 0;
|
|
576
576
|
let h = 1 / 0;
|
|
577
|
-
for (let
|
|
578
|
-
let
|
|
579
|
-
const f = t[
|
|
580
|
-
this.closestPointToPoint(E, c),
|
|
577
|
+
for (let d = 0; d < 3; d++) {
|
|
578
|
+
let u;
|
|
579
|
+
const f = t[d], E = r[f];
|
|
580
|
+
this.closestPointToPoint(E, c), u = E.distanceToSquared(c), u < h && (h = u, o && o.copy(c), a && a.copy(E));
|
|
581
581
|
const p = this[f];
|
|
582
|
-
r.closestPointToPoint(p, c),
|
|
582
|
+
r.closestPointToPoint(p, c), u = p.distanceToSquared(c), u < h && (h = u, o && o.copy(p), a && a.copy(c));
|
|
583
583
|
}
|
|
584
|
-
for (let
|
|
585
|
-
const
|
|
586
|
-
s.set(this[
|
|
584
|
+
for (let d = 0; d < 3; d++) {
|
|
585
|
+
const u = t[d], f = t[(d + 1) % 3];
|
|
586
|
+
s.set(this[u], this[f]);
|
|
587
587
|
for (let E = 0; E < 3; E++) {
|
|
588
588
|
const p = t[E], I = t[(E + 1) % 3];
|
|
589
589
|
i.set(r[p], r[I]), gn(s, i, c, e);
|
|
@@ -610,14 +610,14 @@ Bt.prototype.update = /* @__PURE__ */ function() {
|
|
|
610
610
|
const e = this.matrix, t = this.min, s = this.max, i = this.points;
|
|
611
611
|
for (let l = 0; l <= 1; l++)
|
|
612
612
|
for (let h = 0; h <= 1; h++)
|
|
613
|
-
for (let
|
|
614
|
-
const
|
|
615
|
-
f.x = l ? s.x : t.x, f.y = h ? s.y : t.y, f.z =
|
|
613
|
+
for (let d = 0; d <= 1; d++) {
|
|
614
|
+
const u = 1 * l | 2 * h | 4 * d, f = i[u];
|
|
615
|
+
f.x = l ? s.x : t.x, f.y = h ? s.y : t.y, f.z = d ? s.z : t.z, f.applyMatrix4(e);
|
|
616
616
|
}
|
|
617
617
|
const n = this.satBounds, r = this.satAxes, o = i[0];
|
|
618
618
|
for (let l = 0; l < 3; l++) {
|
|
619
|
-
const h = r[l],
|
|
620
|
-
h.subVectors(o, f),
|
|
619
|
+
const h = r[l], d = n[l], u = 1 << l, f = i[u];
|
|
620
|
+
h.subVectors(o, f), d.setFromPoints(h, i);
|
|
621
621
|
}
|
|
622
622
|
const a = this.alignedSatBounds;
|
|
623
623
|
a[0].setFromPointsField(i, "x"), a[1].setFromPointsField(i, "y"), a[2].setFromPointsField(i, "z"), this.invMatrix.copy(this.matrix).invert(), this.needsUpdate = !1;
|
|
@@ -644,22 +644,22 @@ Bt.prototype.intersectsTriangle = function() {
|
|
|
644
644
|
this.needsUpdate && this.update(), r.isExtendedTriangle ? r.needsUpdate && r.update() : (c.copy(r), c.update(), r = c);
|
|
645
645
|
const o = this.satBounds, a = this.satAxes;
|
|
646
646
|
e[0] = r.a, e[1] = r.b, e[2] = r.c;
|
|
647
|
-
for (let
|
|
648
|
-
const f = o[
|
|
647
|
+
for (let u = 0; u < 3; u++) {
|
|
648
|
+
const f = o[u], E = a[u];
|
|
649
649
|
if (t.setFromPoints(E, e), f.isSeparated(t))
|
|
650
650
|
return !1;
|
|
651
651
|
}
|
|
652
|
-
const l = r.satBounds, h = r.satAxes,
|
|
653
|
-
for (let
|
|
654
|
-
const f = l[
|
|
655
|
-
if (t.setFromPoints(E,
|
|
652
|
+
const l = r.satBounds, h = r.satAxes, d = this.points;
|
|
653
|
+
for (let u = 0; u < 3; u++) {
|
|
654
|
+
const f = l[u], E = h[u];
|
|
655
|
+
if (t.setFromPoints(E, d), f.isSeparated(t))
|
|
656
656
|
return !1;
|
|
657
657
|
}
|
|
658
|
-
for (let
|
|
659
|
-
const f = a[
|
|
658
|
+
for (let u = 0; u < 3; u++) {
|
|
659
|
+
const f = a[u];
|
|
660
660
|
for (let E = 0; E < 4; E++) {
|
|
661
661
|
const p = h[E];
|
|
662
|
-
if (i.crossVectors(f, p), t.setFromPoints(i, e), s.setFromPoints(i,
|
|
662
|
+
if (i.crossVectors(f, p), t.setFromPoints(i, e), s.setFromPoints(i, d), t.isSeparated(s))
|
|
663
663
|
return !1;
|
|
664
664
|
}
|
|
665
665
|
}
|
|
@@ -682,11 +682,11 @@ Bt.prototype.distanceToBox = function() {
|
|
|
682
682
|
return function(r, o = 0, a = null, l = null) {
|
|
683
683
|
if (this.needsUpdate && this.update(), this.intersectsBox(r))
|
|
684
684
|
return (a || l) && (r.getCenter(i), this.closestPointToPoint(i, s), r.closestPointToPoint(s, i), a && a.copy(s), l && l.copy(i)), 0;
|
|
685
|
-
const h = o * o,
|
|
685
|
+
const h = o * o, d = r.min, u = r.max, f = this.points;
|
|
686
686
|
let E = 1 / 0;
|
|
687
687
|
for (let I = 0; I < 8; I++) {
|
|
688
688
|
const m = f[I];
|
|
689
|
-
i.copy(m).clamp(
|
|
689
|
+
i.copy(m).clamp(d, u);
|
|
690
690
|
const _ = m.distanceToSquared(i);
|
|
691
691
|
if (_ < E && (E = _, a && a.copy(m), l && l.copy(i), _ < h))
|
|
692
692
|
return Math.sqrt(_);
|
|
@@ -698,12 +698,12 @@ Bt.prototype.distanceToBox = function() {
|
|
|
698
698
|
const y = (I + 1) % 3, C = (I + 2) % 3, R = m << y | _ << C, F = 1 << I | m << y | _ << C, O = f[R], L = f[F];
|
|
699
699
|
e[p].set(O, L);
|
|
700
700
|
const x = c[I], k = c[y], w = c[C], P = t[p], T = P.start, M = P.end;
|
|
701
|
-
T[x] =
|
|
701
|
+
T[x] = d[x], T[k] = m ? d[k] : u[k], T[w] = _ ? d[w] : u[k], M[x] = u[x], M[k] = m ? d[k] : u[k], M[w] = _ ? d[w] : u[k], p++;
|
|
702
702
|
}
|
|
703
703
|
for (let I = 0; I <= 1; I++)
|
|
704
704
|
for (let m = 0; m <= 1; m++)
|
|
705
705
|
for (let _ = 0; _ <= 1; _++) {
|
|
706
|
-
i.x = I ?
|
|
706
|
+
i.x = I ? u.x : d.x, i.y = m ? u.y : d.y, i.z = _ ? u.z : d.z, this.closestPointToPoint(i, s);
|
|
707
707
|
const y = i.distanceToSquared(s);
|
|
708
708
|
if (y < E && (E = y, a && a.copy(s), l && l.copy(i), y < h))
|
|
709
709
|
return Math.sqrt(y);
|
|
@@ -783,8 +783,8 @@ function Qi(c, e, t, s, i = null, n = 0, r = 0) {
|
|
|
783
783
|
const { float32Array: o, uint16Array: a, uint32Array: l } = At;
|
|
784
784
|
let h = c * 2;
|
|
785
785
|
if (Vt(h, a)) {
|
|
786
|
-
const
|
|
787
|
-
return wt(c, o, _e), s(
|
|
786
|
+
const u = Yt(c, l), f = Zt(h, a);
|
|
787
|
+
return wt(c, o, _e), s(u, f, !1, r, n + c, _e);
|
|
788
788
|
} else {
|
|
789
789
|
let x = function(w) {
|
|
790
790
|
const { uint16Array: P, uint32Array: T } = At;
|
|
@@ -799,10 +799,10 @@ function Qi(c, e, t, s, i = null, n = 0, r = 0) {
|
|
|
799
799
|
w = jt(w, T), M = w * 2;
|
|
800
800
|
return Yt(w, T) + Zt(M, P);
|
|
801
801
|
};
|
|
802
|
-
const
|
|
803
|
-
let E =
|
|
802
|
+
const u = $t(c), f = jt(c, l);
|
|
803
|
+
let E = u, p = f, I, m, _, y;
|
|
804
804
|
if (i && (_ = _e, y = je, wt(E, o, _), wt(p, o, y), I = i(_), m = i(y), m < I)) {
|
|
805
|
-
E = f, p =
|
|
805
|
+
E = f, p = u;
|
|
806
806
|
const w = I;
|
|
807
807
|
I = m, m = w, _ = y;
|
|
808
808
|
}
|
|
@@ -850,11 +850,11 @@ function Bo(c, e, t = {}, s = 0, i = 1 / 0) {
|
|
|
850
850
|
if (c.shapecast(
|
|
851
851
|
{
|
|
852
852
|
boundsTraverseOrder: (h) => (os.copy(e).clamp(h.min, h.max), os.distanceToSquared(e)),
|
|
853
|
-
intersectsBounds: (h,
|
|
854
|
-
intersectsTriangle: (h,
|
|
853
|
+
intersectsBounds: (h, d, u) => u < o && u < r,
|
|
854
|
+
intersectsTriangle: (h, d) => {
|
|
855
855
|
h.closestPointToPoint(e, os);
|
|
856
|
-
const
|
|
857
|
-
return
|
|
856
|
+
const u = e.distanceToSquared(os);
|
|
857
|
+
return u < o && (Li.copy(os), o = u, a = d), u < n;
|
|
858
858
|
}
|
|
859
859
|
}
|
|
860
860
|
), o === 1 / 0)
|
|
@@ -891,7 +891,7 @@ function wi(c, e, t, s, i) {
|
|
|
891
891
|
let r = n + 0, o = n + 1, a = n + 2;
|
|
892
892
|
const l = c.index;
|
|
893
893
|
c.index && (r = l.getX(r), o = l.getX(o), a = l.getX(a));
|
|
894
|
-
const { position: h, normal:
|
|
894
|
+
const { position: h, normal: d, uv: u, uv1: f } = c.attributes, E = ko(t, h, d, u, f, r, o, a, e);
|
|
895
895
|
return E ? (E.faceIndex = s, i && i.push(E), E) : null;
|
|
896
896
|
}
|
|
897
897
|
function Pt(c, e, t, s) {
|
|
@@ -908,16 +908,16 @@ function Yo(c, e, t, s, i) {
|
|
|
908
908
|
const { geometry: n, _indirectBuffer: r } = c;
|
|
909
909
|
let o = 1 / 0, a = null;
|
|
910
910
|
for (let l = s, h = s + i; l < h; l++) {
|
|
911
|
-
let
|
|
912
|
-
|
|
911
|
+
let d;
|
|
912
|
+
d = wi(n, e, t, l), d && d.distance < o && (a = d, o = d.distance);
|
|
913
913
|
}
|
|
914
914
|
return a;
|
|
915
915
|
}
|
|
916
916
|
function Go(c, e, t, s, i, n, r) {
|
|
917
917
|
const { geometry: o } = t, { index: a } = o, l = o.attributes.position;
|
|
918
|
-
for (let h = c,
|
|
919
|
-
let
|
|
920
|
-
if (
|
|
918
|
+
for (let h = c, d = e + c; h < d; h++) {
|
|
919
|
+
let u;
|
|
920
|
+
if (u = h, Pt(r, u * 3, a, l), r.needsUpdate = !0, s(r, u, i, n))
|
|
921
921
|
return !0;
|
|
922
922
|
}
|
|
923
923
|
return !1;
|
|
@@ -927,33 +927,33 @@ function Ho(c, e = null) {
|
|
|
927
927
|
const t = c.geometry, s = t.index ? t.index.array : null, i = t.attributes.position;
|
|
928
928
|
let n, r, o, a, l = 0;
|
|
929
929
|
const h = c._roots;
|
|
930
|
-
for (let
|
|
931
|
-
n = h[
|
|
932
|
-
function u
|
|
933
|
-
const p =
|
|
930
|
+
for (let u = 0, f = h.length; u < f; u++)
|
|
931
|
+
n = h[u], r = new Uint32Array(n), o = new Uint16Array(n), a = new Float32Array(n), d(0, l), l += n.byteLength;
|
|
932
|
+
function d(u, f, E = !1) {
|
|
933
|
+
const p = u * 2;
|
|
934
934
|
if (o[p + 15] === yi) {
|
|
935
|
-
const m = r[
|
|
935
|
+
const m = r[u + 6], _ = o[p + 14];
|
|
936
936
|
let y = 1 / 0, C = 1 / 0, R = 1 / 0, F = -1 / 0, O = -1 / 0, L = -1 / 0;
|
|
937
937
|
for (let N = 3 * m, x = 3 * (m + _); N < x; N++) {
|
|
938
938
|
let k = s[N];
|
|
939
939
|
const w = i.getX(k), P = i.getY(k), T = i.getZ(k);
|
|
940
940
|
w < y && (y = w), w > F && (F = w), P < C && (C = P), P > O && (O = P), T < R && (R = T), T > L && (L = T);
|
|
941
941
|
}
|
|
942
|
-
return a[
|
|
942
|
+
return a[u + 0] !== y || a[u + 1] !== C || a[u + 2] !== R || a[u + 3] !== F || a[u + 4] !== O || a[u + 5] !== L ? (a[u + 0] = y, a[u + 1] = C, a[u + 2] = R, a[u + 3] = F, a[u + 4] = O, a[u + 5] = L, !0) : !1;
|
|
943
943
|
} else {
|
|
944
|
-
const m =
|
|
944
|
+
const m = u + 8, _ = r[u + 6], y = m + f, C = _ + f;
|
|
945
945
|
let R = E, F = !1, O = !1;
|
|
946
946
|
e ? R || (F = e.has(y), O = e.has(C), R = !F && !O) : (F = !0, O = !0);
|
|
947
947
|
const L = R || F, N = R || O;
|
|
948
948
|
let x = !1;
|
|
949
|
-
L && (x =
|
|
949
|
+
L && (x = d(m, f, R));
|
|
950
950
|
let k = !1;
|
|
951
|
-
N && (k =
|
|
951
|
+
N && (k = d(_, f, R));
|
|
952
952
|
const w = x || k;
|
|
953
953
|
if (w)
|
|
954
954
|
for (let P = 0; P < 3; P++) {
|
|
955
955
|
const T = m + P, M = _ + P, j = a[T], V = a[T + 3], et = a[M], H = a[M + 3];
|
|
956
|
-
a[
|
|
956
|
+
a[u + P] = j < et ? j : et, a[u + P + 3] = V > H ? V : H;
|
|
957
957
|
}
|
|
958
958
|
return w;
|
|
959
959
|
}
|
|
@@ -974,16 +974,16 @@ function Xo(c, e, t, s, i) {
|
|
|
974
974
|
const { geometry: n, _indirectBuffer: r } = c;
|
|
975
975
|
let o = 1 / 0, a = null;
|
|
976
976
|
for (let l = s, h = s + i; l < h; l++) {
|
|
977
|
-
let
|
|
978
|
-
|
|
977
|
+
let d;
|
|
978
|
+
d = wi(n, e, t, r ? r[l] : l), d && d.distance < o && (a = d, o = d.distance);
|
|
979
979
|
}
|
|
980
980
|
return a;
|
|
981
981
|
}
|
|
982
982
|
function Zo(c, e, t, s, i, n, r) {
|
|
983
983
|
const { geometry: o } = t, { index: a } = o, l = o.attributes.position;
|
|
984
|
-
for (let h = c,
|
|
985
|
-
let
|
|
986
|
-
if (
|
|
984
|
+
for (let h = c, d = e + c; h < d; h++) {
|
|
985
|
+
let u;
|
|
986
|
+
if (u = t.resolveTriangleIndex(h), Pt(r, u * 3, a, l), r.needsUpdate = !0, s(r, u, i, n))
|
|
987
987
|
return !0;
|
|
988
988
|
}
|
|
989
989
|
return !1;
|
|
@@ -995,13 +995,13 @@ function $o(c, e, t, s, i) {
|
|
|
995
995
|
function qi(c, e, t, s, i) {
|
|
996
996
|
const { float32Array: n, uint16Array: r, uint32Array: o } = At, a = c * 2;
|
|
997
997
|
if (Vt(a, r)) {
|
|
998
|
-
const h = Yt(c, o),
|
|
999
|
-
Vo(e, t, s, h,
|
|
998
|
+
const h = Yt(c, o), d = Zt(a, r);
|
|
999
|
+
Vo(e, t, s, h, d, i);
|
|
1000
1000
|
} else {
|
|
1001
1001
|
const h = $t(c);
|
|
1002
1002
|
Re(h, n, s, Gn) && qi(h, e, t, s, i);
|
|
1003
|
-
const
|
|
1004
|
-
Re(
|
|
1003
|
+
const d = jt(c, o);
|
|
1004
|
+
Re(d, n, s, Gn) && qi(d, e, t, s, i);
|
|
1005
1005
|
}
|
|
1006
1006
|
}
|
|
1007
1007
|
const Hn = /* @__PURE__ */ new Q(), jo = ["x", "y", "z"];
|
|
@@ -1017,13 +1017,13 @@ function Ki(c, e, t, s) {
|
|
|
1017
1017
|
const l = Yt(c, r), h = Zt(o, n);
|
|
1018
1018
|
return Yo(e, t, s, l, h);
|
|
1019
1019
|
} else {
|
|
1020
|
-
const l = Mr(c, r), h = jo[l],
|
|
1020
|
+
const l = Mr(c, r), h = jo[l], u = s.direction[h] >= 0;
|
|
1021
1021
|
let f, E;
|
|
1022
|
-
|
|
1022
|
+
u ? (f = $t(c), E = jt(c, r)) : (f = jt(c, r), E = $t(c));
|
|
1023
1023
|
const I = Re(f, i, s, Hn) ? Ki(f, e, t, s) : null;
|
|
1024
1024
|
if (I) {
|
|
1025
1025
|
const y = I.point[h];
|
|
1026
|
-
if (
|
|
1026
|
+
if (u ? y <= i[E + l] : (
|
|
1027
1027
|
// min bounding data
|
|
1028
1028
|
y >= i[E + l + 3]
|
|
1029
1029
|
))
|
|
@@ -1043,33 +1043,33 @@ function Ji(c, e, t, s, i = null) {
|
|
|
1043
1043
|
const { float32Array: n, uint16Array: r, uint32Array: o } = At;
|
|
1044
1044
|
let a = c * 2;
|
|
1045
1045
|
if (i === null && (t.boundingBox || t.computeBoundingBox(), Wn.set(t.boundingBox.min, t.boundingBox.max, s), i = Wn), Vt(a, r)) {
|
|
1046
|
-
const h = e.geometry,
|
|
1046
|
+
const h = e.geometry, d = h.index, u = h.attributes.position, f = t.index, E = t.attributes.position, p = Yt(c, o), I = Zt(a, r);
|
|
1047
1047
|
if (as.copy(s).invert(), t.boundsTree)
|
|
1048
1048
|
return wt(c, n, Gs), Gs.matrix.copy(as), Gs.needsUpdate = !0, t.boundsTree.shapecast({
|
|
1049
1049
|
intersectsBounds: (_) => Gs.intersectsBox(_),
|
|
1050
1050
|
intersectsTriangle: (_) => {
|
|
1051
1051
|
_.a.applyMatrix4(s), _.b.applyMatrix4(s), _.c.applyMatrix4(s), _.needsUpdate = !0;
|
|
1052
1052
|
for (let y = p * 3, C = (I + p) * 3; y < C; y += 3)
|
|
1053
|
-
if (Pt(ze, y,
|
|
1053
|
+
if (Pt(ze, y, d, u), ze.needsUpdate = !0, _.intersectsTriangle(ze))
|
|
1054
1054
|
return !0;
|
|
1055
1055
|
return !1;
|
|
1056
1056
|
}
|
|
1057
1057
|
});
|
|
1058
1058
|
for (let m = p * 3, _ = (I + p) * 3; m < _; m += 3) {
|
|
1059
|
-
Pt(Be, m,
|
|
1059
|
+
Pt(Be, m, d, u), Be.a.applyMatrix4(as), Be.b.applyMatrix4(as), Be.c.applyMatrix4(as), Be.needsUpdate = !0;
|
|
1060
1060
|
for (let y = 0, C = f.count; y < C; y += 3)
|
|
1061
1061
|
if (Pt(ze, y, f, E), ze.needsUpdate = !0, Be.intersectsTriangle(ze))
|
|
1062
1062
|
return !0;
|
|
1063
1063
|
}
|
|
1064
1064
|
} else {
|
|
1065
|
-
const h = c + 8,
|
|
1066
|
-
return wt(h, n, Ys), !!(i.intersectsBox(Ys) && Ji(h, e, t, s, i) || (wt(
|
|
1065
|
+
const h = c + 8, d = o[c + 6];
|
|
1066
|
+
return wt(h, n, Ys), !!(i.intersectsBox(Ys) && Ji(h, e, t, s, i) || (wt(d, n, Ys), i.intersectsBox(Ys) && Ji(d, e, t, s, i)));
|
|
1067
1067
|
}
|
|
1068
1068
|
}
|
|
1069
1069
|
const Hs = /* @__PURE__ */ new ue(), vi = /* @__PURE__ */ new Bt(), cs = /* @__PURE__ */ new Bt(), Ko = /* @__PURE__ */ new Q(), Jo = /* @__PURE__ */ new Q(), ta = /* @__PURE__ */ new Q(), ea = /* @__PURE__ */ new Q();
|
|
1070
1070
|
function sa(c, e, t, s = {}, i = {}, n = 0, r = 1 / 0) {
|
|
1071
1071
|
e.boundingBox || e.computeBoundingBox(), vi.set(e.boundingBox.min, e.boundingBox.max, t), vi.needsUpdate = !0;
|
|
1072
|
-
const o = c.geometry, a = o.attributes.position, l = o.index, h = e.attributes.position,
|
|
1072
|
+
const o = c.geometry, a = o.attributes.position, l = o.index, h = e.attributes.position, d = e.index, u = Xt.getPrimitive(), f = Xt.getPrimitive();
|
|
1073
1073
|
let E = Ko, p = Jo, I = null, m = null;
|
|
1074
1074
|
i && (I = ta, m = ea);
|
|
1075
1075
|
let _ = 1 / 0, y = null, C = null;
|
|
@@ -1084,10 +1084,10 @@ function sa(c, e, t, s = {}, i = {}, n = 0, r = 1 / 0) {
|
|
|
1084
1084
|
intersectsBounds: (L, N, x) => x < _ && x < r,
|
|
1085
1085
|
intersectsRange: (L, N) => {
|
|
1086
1086
|
for (let x = L, k = L + N; x < k; x++) {
|
|
1087
|
-
Pt(f, 3 * x,
|
|
1087
|
+
Pt(f, 3 * x, d, h), f.a.applyMatrix4(t), f.b.applyMatrix4(t), f.c.applyMatrix4(t), f.needsUpdate = !0;
|
|
1088
1088
|
for (let w = R, P = R + F; w < P; w++) {
|
|
1089
|
-
Pt(
|
|
1090
|
-
const T =
|
|
1089
|
+
Pt(u, 3 * w, l, a), u.needsUpdate = !0;
|
|
1090
|
+
const T = u.distanceToTriangle(f, E, I);
|
|
1091
1091
|
if (T < _ && (p.copy(E), m && m.copy(I), _ = T, y = w, C = x), T < n)
|
|
1092
1092
|
return !0;
|
|
1093
1093
|
}
|
|
@@ -1097,10 +1097,10 @@ function sa(c, e, t, s = {}, i = {}, n = 0, r = 1 / 0) {
|
|
|
1097
1097
|
{
|
|
1098
1098
|
const O = ts(e);
|
|
1099
1099
|
for (let L = 0, N = O; L < N; L++) {
|
|
1100
|
-
Pt(f, 3 * L,
|
|
1100
|
+
Pt(f, 3 * L, d, h), f.a.applyMatrix4(t), f.b.applyMatrix4(t), f.c.applyMatrix4(t), f.needsUpdate = !0;
|
|
1101
1101
|
for (let x = R, k = R + F; x < k; x++) {
|
|
1102
|
-
Pt(
|
|
1103
|
-
const w =
|
|
1102
|
+
Pt(u, 3 * x, l, a), u.needsUpdate = !0;
|
|
1103
|
+
const w = u.distanceToTriangle(f, E, I);
|
|
1104
1104
|
if (w < _ && (p.copy(E), m && m.copy(I), _ = w, y = x, C = L), w < n)
|
|
1105
1105
|
return !0;
|
|
1106
1106
|
}
|
|
@@ -1108,19 +1108,19 @@ function sa(c, e, t, s = {}, i = {}, n = 0, r = 1 / 0) {
|
|
|
1108
1108
|
}
|
|
1109
1109
|
}
|
|
1110
1110
|
}
|
|
1111
|
-
), Xt.releasePrimitive(
|
|
1111
|
+
), Xt.releasePrimitive(u), Xt.releasePrimitive(f), _ === 1 / 0 ? null : (s.point ? s.point.copy(p) : s.point = p.clone(), s.distance = _, s.faceIndex = y, i && (i.point ? i.point.copy(m) : i.point = m.clone(), i.point.applyMatrix4(Hs), p.applyMatrix4(Hs), i.distance = p.sub(i.point).length(), i.faceIndex = C), s);
|
|
1112
1112
|
}
|
|
1113
1113
|
function ia(c, e = null) {
|
|
1114
1114
|
e && Array.isArray(e) && (e = new Set(e));
|
|
1115
1115
|
const t = c.geometry, s = t.index ? t.index.array : null, i = t.attributes.position;
|
|
1116
1116
|
let n, r, o, a, l = 0;
|
|
1117
1117
|
const h = c._roots;
|
|
1118
|
-
for (let
|
|
1119
|
-
n = h[
|
|
1120
|
-
function u
|
|
1121
|
-
const p =
|
|
1118
|
+
for (let u = 0, f = h.length; u < f; u++)
|
|
1119
|
+
n = h[u], r = new Uint32Array(n), o = new Uint16Array(n), a = new Float32Array(n), d(0, l), l += n.byteLength;
|
|
1120
|
+
function d(u, f, E = !1) {
|
|
1121
|
+
const p = u * 2;
|
|
1122
1122
|
if (o[p + 15] === yi) {
|
|
1123
|
-
const m = r[
|
|
1123
|
+
const m = r[u + 6], _ = o[p + 14];
|
|
1124
1124
|
let y = 1 / 0, C = 1 / 0, R = 1 / 0, F = -1 / 0, O = -1 / 0, L = -1 / 0;
|
|
1125
1125
|
for (let N = m, x = m + _; N < x; N++) {
|
|
1126
1126
|
const k = 3 * c.resolveTriangleIndex(N);
|
|
@@ -1131,21 +1131,21 @@ function ia(c, e = null) {
|
|
|
1131
1131
|
T < y && (y = T), T > F && (F = T), M < C && (C = M), M > O && (O = M), j < R && (R = j), j > L && (L = j);
|
|
1132
1132
|
}
|
|
1133
1133
|
}
|
|
1134
|
-
return a[
|
|
1134
|
+
return a[u + 0] !== y || a[u + 1] !== C || a[u + 2] !== R || a[u + 3] !== F || a[u + 4] !== O || a[u + 5] !== L ? (a[u + 0] = y, a[u + 1] = C, a[u + 2] = R, a[u + 3] = F, a[u + 4] = O, a[u + 5] = L, !0) : !1;
|
|
1135
1135
|
} else {
|
|
1136
|
-
const m =
|
|
1136
|
+
const m = u + 8, _ = r[u + 6], y = m + f, C = _ + f;
|
|
1137
1137
|
let R = E, F = !1, O = !1;
|
|
1138
1138
|
e ? R || (F = e.has(y), O = e.has(C), R = !F && !O) : (F = !0, O = !0);
|
|
1139
1139
|
const L = R || F, N = R || O;
|
|
1140
1140
|
let x = !1;
|
|
1141
|
-
L && (x =
|
|
1141
|
+
L && (x = d(m, f, R));
|
|
1142
1142
|
let k = !1;
|
|
1143
|
-
N && (k =
|
|
1143
|
+
N && (k = d(_, f, R));
|
|
1144
1144
|
const w = x || k;
|
|
1145
1145
|
if (w)
|
|
1146
1146
|
for (let P = 0; P < 3; P++) {
|
|
1147
1147
|
const T = m + P, M = _ + P, j = a[T], V = a[T + 3], et = a[M], H = a[M + 3];
|
|
1148
|
-
a[
|
|
1148
|
+
a[u + P] = j < et ? j : et, a[u + P + 3] = V > H ? V : H;
|
|
1149
1149
|
}
|
|
1150
1150
|
return w;
|
|
1151
1151
|
}
|
|
@@ -1158,13 +1158,13 @@ function na(c, e, t, s, i) {
|
|
|
1158
1158
|
function tn(c, e, t, s, i) {
|
|
1159
1159
|
const { float32Array: n, uint16Array: r, uint32Array: o } = At, a = c * 2;
|
|
1160
1160
|
if (Vt(a, r)) {
|
|
1161
|
-
const h = Yt(c, o),
|
|
1162
|
-
Wo(e, t, s, h,
|
|
1161
|
+
const h = Yt(c, o), d = Zt(a, r);
|
|
1162
|
+
Wo(e, t, s, h, d, i);
|
|
1163
1163
|
} else {
|
|
1164
1164
|
const h = $t(c);
|
|
1165
1165
|
Re(h, n, s, Xn) && tn(h, e, t, s, i);
|
|
1166
|
-
const
|
|
1167
|
-
Re(
|
|
1166
|
+
const d = jt(c, o);
|
|
1167
|
+
Re(d, n, s, Xn) && tn(d, e, t, s, i);
|
|
1168
1168
|
}
|
|
1169
1169
|
}
|
|
1170
1170
|
const Zn = /* @__PURE__ */ new Q(), ra = ["x", "y", "z"];
|
|
@@ -1180,13 +1180,13 @@ function en(c, e, t, s) {
|
|
|
1180
1180
|
const l = Yt(c, r), h = Zt(o, n);
|
|
1181
1181
|
return Xo(e, t, s, l, h);
|
|
1182
1182
|
} else {
|
|
1183
|
-
const l = Mr(c, r), h = ra[l],
|
|
1183
|
+
const l = Mr(c, r), h = ra[l], u = s.direction[h] >= 0;
|
|
1184
1184
|
let f, E;
|
|
1185
|
-
|
|
1185
|
+
u ? (f = $t(c), E = jt(c, r)) : (f = jt(c, r), E = $t(c));
|
|
1186
1186
|
const I = Re(f, i, s, Zn) ? en(f, e, t, s) : null;
|
|
1187
1187
|
if (I) {
|
|
1188
1188
|
const y = I.point[h];
|
|
1189
|
-
if (
|
|
1189
|
+
if (u ? y <= i[E + l] : (
|
|
1190
1190
|
// min bounding data
|
|
1191
1191
|
y >= i[E + l + 3]
|
|
1192
1192
|
))
|
|
@@ -1206,34 +1206,34 @@ function sn(c, e, t, s, i = null) {
|
|
|
1206
1206
|
const { float32Array: n, uint16Array: r, uint32Array: o } = At;
|
|
1207
1207
|
let a = c * 2;
|
|
1208
1208
|
if (i === null && (t.boundingBox || t.computeBoundingBox(), $n.set(t.boundingBox.min, t.boundingBox.max, s), i = $n), Vt(a, r)) {
|
|
1209
|
-
const h = e.geometry,
|
|
1209
|
+
const h = e.geometry, d = h.index, u = h.attributes.position, f = t.index, E = t.attributes.position, p = Yt(c, o), I = Zt(a, r);
|
|
1210
1210
|
if (ls.copy(s).invert(), t.boundsTree)
|
|
1211
1211
|
return wt(c, n, Xs), Xs.matrix.copy(ls), Xs.needsUpdate = !0, t.boundsTree.shapecast({
|
|
1212
1212
|
intersectsBounds: (_) => Xs.intersectsBox(_),
|
|
1213
1213
|
intersectsTriangle: (_) => {
|
|
1214
1214
|
_.a.applyMatrix4(s), _.b.applyMatrix4(s), _.c.applyMatrix4(s), _.needsUpdate = !0;
|
|
1215
1215
|
for (let y = p, C = I + p; y < C; y++)
|
|
1216
|
-
if (Pt(Ve, 3 * e.resolveTriangleIndex(y),
|
|
1216
|
+
if (Pt(Ve, 3 * e.resolveTriangleIndex(y), d, u), Ve.needsUpdate = !0, _.intersectsTriangle(Ve))
|
|
1217
1217
|
return !0;
|
|
1218
1218
|
return !1;
|
|
1219
1219
|
}
|
|
1220
1220
|
});
|
|
1221
1221
|
for (let m = p, _ = I + p; m < _; m++) {
|
|
1222
1222
|
const y = e.resolveTriangleIndex(m);
|
|
1223
|
-
Pt(ke, 3 * y,
|
|
1223
|
+
Pt(ke, 3 * y, d, u), ke.a.applyMatrix4(ls), ke.b.applyMatrix4(ls), ke.c.applyMatrix4(ls), ke.needsUpdate = !0;
|
|
1224
1224
|
for (let C = 0, R = f.count; C < R; C += 3)
|
|
1225
1225
|
if (Pt(Ve, C, f, E), Ve.needsUpdate = !0, ke.intersectsTriangle(Ve))
|
|
1226
1226
|
return !0;
|
|
1227
1227
|
}
|
|
1228
1228
|
} else {
|
|
1229
|
-
const h = c + 8,
|
|
1230
|
-
return wt(h, n, Ws), !!(i.intersectsBox(Ws) && sn(h, e, t, s, i) || (wt(
|
|
1229
|
+
const h = c + 8, d = o[c + 6];
|
|
1230
|
+
return wt(h, n, Ws), !!(i.intersectsBox(Ws) && sn(h, e, t, s, i) || (wt(d, n, Ws), i.intersectsBox(Ws) && sn(d, e, t, s, i)));
|
|
1231
1231
|
}
|
|
1232
1232
|
}
|
|
1233
1233
|
const Zs = /* @__PURE__ */ new ue(), xi = /* @__PURE__ */ new Bt(), hs = /* @__PURE__ */ new Bt(), ca = /* @__PURE__ */ new Q(), la = /* @__PURE__ */ new Q(), ha = /* @__PURE__ */ new Q(), ua = /* @__PURE__ */ new Q();
|
|
1234
1234
|
function da(c, e, t, s = {}, i = {}, n = 0, r = 1 / 0) {
|
|
1235
1235
|
e.boundingBox || e.computeBoundingBox(), xi.set(e.boundingBox.min, e.boundingBox.max, t), xi.needsUpdate = !0;
|
|
1236
|
-
const o = c.geometry, a = o.attributes.position, l = o.index, h = e.attributes.position,
|
|
1236
|
+
const o = c.geometry, a = o.attributes.position, l = o.index, h = e.attributes.position, d = e.index, u = Xt.getPrimitive(), f = Xt.getPrimitive();
|
|
1237
1237
|
let E = ca, p = la, I = null, m = null;
|
|
1238
1238
|
i && (I = ha, m = ua);
|
|
1239
1239
|
let _ = 1 / 0, y = null, C = null;
|
|
@@ -1250,11 +1250,11 @@ function da(c, e, t, s = {}, i = {}, n = 0, r = 1 / 0) {
|
|
|
1250
1250
|
intersectsRange: (L, N) => {
|
|
1251
1251
|
for (let x = L, k = L + N; x < k; x++) {
|
|
1252
1252
|
const w = O.resolveTriangleIndex(x);
|
|
1253
|
-
Pt(f, 3 * w,
|
|
1253
|
+
Pt(f, 3 * w, d, h), f.a.applyMatrix4(t), f.b.applyMatrix4(t), f.c.applyMatrix4(t), f.needsUpdate = !0;
|
|
1254
1254
|
for (let P = R, T = R + F; P < T; P++) {
|
|
1255
1255
|
const M = c.resolveTriangleIndex(P);
|
|
1256
|
-
Pt(
|
|
1257
|
-
const j =
|
|
1256
|
+
Pt(u, 3 * M, l, a), u.needsUpdate = !0;
|
|
1257
|
+
const j = u.distanceToTriangle(f, E, I);
|
|
1258
1258
|
if (j < _ && (p.copy(E), m && m.copy(I), _ = j, y = P, C = x), j < n)
|
|
1259
1259
|
return !0;
|
|
1260
1260
|
}
|
|
@@ -1264,11 +1264,11 @@ function da(c, e, t, s = {}, i = {}, n = 0, r = 1 / 0) {
|
|
|
1264
1264
|
} else {
|
|
1265
1265
|
const O = ts(e);
|
|
1266
1266
|
for (let L = 0, N = O; L < N; L++) {
|
|
1267
|
-
Pt(f, 3 * L,
|
|
1267
|
+
Pt(f, 3 * L, d, h), f.a.applyMatrix4(t), f.b.applyMatrix4(t), f.c.applyMatrix4(t), f.needsUpdate = !0;
|
|
1268
1268
|
for (let x = R, k = R + F; x < k; x++) {
|
|
1269
1269
|
const w = c.resolveTriangleIndex(x);
|
|
1270
|
-
Pt(
|
|
1271
|
-
const P =
|
|
1270
|
+
Pt(u, 3 * w, l, a), u.needsUpdate = !0;
|
|
1271
|
+
const P = u.distanceToTriangle(f, E, I);
|
|
1272
1272
|
if (P < _ && (p.copy(E), m && m.copy(I), _ = P, y = x, C = L), P < n)
|
|
1273
1273
|
return !0;
|
|
1274
1274
|
}
|
|
@@ -1276,7 +1276,7 @@ function da(c, e, t, s = {}, i = {}, n = 0, r = 1 / 0) {
|
|
|
1276
1276
|
}
|
|
1277
1277
|
}
|
|
1278
1278
|
}
|
|
1279
|
-
), Xt.releasePrimitive(
|
|
1279
|
+
), Xt.releasePrimitive(u), Xt.releasePrimitive(f), _ === 1 / 0 ? null : (s.point ? s.point.copy(p) : s.point = p.clone(), s.distance = _, s.faceIndex = y, i && (i.point ? i.point.copy(m) : i.point = m.clone(), i.point.applyMatrix4(Zs), p.applyMatrix4(Zs), i.distance = p.sub(i.point).length(), i.faceIndex = C), s);
|
|
1280
1280
|
}
|
|
1281
1281
|
function fa() {
|
|
1282
1282
|
return typeof SharedArrayBuffer < "u";
|
|
@@ -1290,10 +1290,10 @@ function pa(c, e, t, s) {
|
|
|
1290
1290
|
const i = c._roots, n = e._roots;
|
|
1291
1291
|
let r, o = 0, a = 0;
|
|
1292
1292
|
const l = new ue().copy(t).invert();
|
|
1293
|
-
for (let h = 0,
|
|
1293
|
+
for (let h = 0, d = i.length; h < d; h++) {
|
|
1294
1294
|
As.setBuffer(i[h]), a = 0;
|
|
1295
|
-
const
|
|
1296
|
-
wt(0, As.float32Array,
|
|
1295
|
+
const u = Ce.getPrimitive();
|
|
1296
|
+
wt(0, As.float32Array, u), u.applyMatrix4(l);
|
|
1297
1297
|
for (let f = 0, E = n.length; f < E && (li.setBuffer(n[h]), r = Qt(
|
|
1298
1298
|
0,
|
|
1299
1299
|
0,
|
|
@@ -1304,18 +1304,18 @@ function pa(c, e, t, s) {
|
|
|
1304
1304
|
a,
|
|
1305
1305
|
0,
|
|
1306
1306
|
0,
|
|
1307
|
-
|
|
1307
|
+
u
|
|
1308
1308
|
), li.clearBuffer(), a += n[f].length, !r); f++)
|
|
1309
1309
|
;
|
|
1310
|
-
if (Ce.releasePrimitive(
|
|
1310
|
+
if (Ce.releasePrimitive(u), As.clearBuffer(), o += i[h].length, r)
|
|
1311
1311
|
break;
|
|
1312
1312
|
}
|
|
1313
1313
|
return Ui = !1, r;
|
|
1314
1314
|
}
|
|
1315
1315
|
function Qt(c, e, t, s, i, n = 0, r = 0, o = 0, a = 0, l = null, h = !1) {
|
|
1316
|
-
let
|
|
1317
|
-
h ? (
|
|
1318
|
-
const f =
|
|
1316
|
+
let d, u;
|
|
1317
|
+
h ? (d = li, u = As) : (d = As, u = li);
|
|
1318
|
+
const f = d.float32Array, E = d.uint32Array, p = d.uint16Array, I = u.float32Array, m = u.uint32Array, _ = u.uint16Array, y = c * 2, C = e * 2, R = Vt(y, p), F = Vt(C, _);
|
|
1319
1319
|
let O = !1;
|
|
1320
1320
|
if (F && R)
|
|
1321
1321
|
h ? O = i(
|
|
@@ -1567,21 +1567,21 @@ class Tn {
|
|
|
1567
1567
|
function r(o, a = 0) {
|
|
1568
1568
|
const l = o * 2, h = n[l + 15] === yi;
|
|
1569
1569
|
if (h) {
|
|
1570
|
-
const
|
|
1571
|
-
e(a, h, new Float32Array(s, o * 4, 6),
|
|
1570
|
+
const d = i[o + 6], u = n[l + 14];
|
|
1571
|
+
e(a, h, new Float32Array(s, o * 4, 6), d, u);
|
|
1572
1572
|
} else {
|
|
1573
|
-
const
|
|
1574
|
-
e(a, h, new Float32Array(s, o * 4, 6), f) || (r(
|
|
1573
|
+
const d = o + ri / 4, u = i[o + 6], f = i[o + 7];
|
|
1574
|
+
e(a, h, new Float32Array(s, o * 4, 6), f) || (r(d, a + 1), r(u, a + 1));
|
|
1575
1575
|
}
|
|
1576
1576
|
}
|
|
1577
1577
|
}
|
|
1578
1578
|
/* Core Cast Functions */
|
|
1579
1579
|
raycast(e, t = Pn) {
|
|
1580
1580
|
const s = this._roots, i = this.geometry, n = [], r = t.isMaterial, o = Array.isArray(t), a = i.groups, l = r ? t.side : t, h = this.indirect ? na : $o;
|
|
1581
|
-
for (let
|
|
1582
|
-
const f = o ? t[a[
|
|
1583
|
-
if (h(this,
|
|
1584
|
-
const p = a[
|
|
1581
|
+
for (let d = 0, u = s.length; d < u; d++) {
|
|
1582
|
+
const f = o ? t[a[d].materialIndex].side : l, E = n.length;
|
|
1583
|
+
if (h(this, d, f, e, n), o) {
|
|
1584
|
+
const p = a[d].materialIndex;
|
|
1585
1585
|
for (let I = E, m = n.length; I < m; I++)
|
|
1586
1586
|
n[I].face.materialIndex = p;
|
|
1587
1587
|
}
|
|
@@ -1592,9 +1592,9 @@ class Tn {
|
|
|
1592
1592
|
const s = this._roots, i = this.geometry, n = t.isMaterial, r = Array.isArray(t);
|
|
1593
1593
|
let o = null;
|
|
1594
1594
|
const a = i.groups, l = n ? t.side : t, h = this.indirect ? oa : Qo;
|
|
1595
|
-
for (let
|
|
1596
|
-
const f = r ? t[a[
|
|
1597
|
-
E != null && (o == null || E.distance < o.distance) && (o = E, r && (E.face.materialIndex = a[
|
|
1595
|
+
for (let d = 0, u = s.length; d < u; d++) {
|
|
1596
|
+
const f = r ? t[a[d].materialIndex].side : l, E = h(this, d, f, e);
|
|
1597
|
+
E != null && (o == null || E.distance < o.distance) && (o = E, r && (E.face.materialIndex = a[d].materialIndex));
|
|
1598
1598
|
}
|
|
1599
1599
|
return o;
|
|
1600
1600
|
}
|
|
@@ -1614,15 +1614,15 @@ class Tn {
|
|
|
1614
1614
|
intersectsTriangle: o
|
|
1615
1615
|
} = e;
|
|
1616
1616
|
if (r && o) {
|
|
1617
|
-
const
|
|
1618
|
-
r = (
|
|
1617
|
+
const d = r;
|
|
1618
|
+
r = (u, f, E, p, I) => d(u, f, E, p, I) ? !0 : s(u, f, this, o, E, p, t);
|
|
1619
1619
|
} else
|
|
1620
|
-
r || (o ? r = (
|
|
1620
|
+
r || (o ? r = (d, u, f, E) => s(d, u, this, o, f, E, t) : r = (d, u, f) => f);
|
|
1621
1621
|
let a = !1, l = 0;
|
|
1622
1622
|
const h = this._roots;
|
|
1623
|
-
for (let
|
|
1624
|
-
const f = h[
|
|
1625
|
-
if (a = Uo(this,
|
|
1623
|
+
for (let d = 0, u = h.length; d < u; d++) {
|
|
1624
|
+
const f = h[d];
|
|
1625
|
+
if (a = Uo(this, d, n, r, i, l), a)
|
|
1626
1626
|
break;
|
|
1627
1627
|
l += f.byteLength;
|
|
1628
1628
|
}
|
|
@@ -1638,11 +1638,11 @@ class Tn {
|
|
|
1638
1638
|
Pt(r, p * 3, o, a);
|
|
1639
1639
|
} : (E) => {
|
|
1640
1640
|
Pt(r, E * 3, o, a);
|
|
1641
|
-
}, h = Xt.getPrimitive(),
|
|
1641
|
+
}, h = Xt.getPrimitive(), d = e.geometry.index, u = e.geometry.attributes.position, f = e.indirect ? (E) => {
|
|
1642
1642
|
const p = e.resolveTriangleIndex(E);
|
|
1643
|
-
Pt(h, p * 3,
|
|
1643
|
+
Pt(h, p * 3, d, u);
|
|
1644
1644
|
} : (E) => {
|
|
1645
|
-
Pt(h, E * 3,
|
|
1645
|
+
Pt(h, E * 3, d, u);
|
|
1646
1646
|
};
|
|
1647
1647
|
if (n) {
|
|
1648
1648
|
const E = (p, I, m, _, y, C, R, F) => {
|
|
@@ -2177,8 +2177,8 @@ class ya {
|
|
|
2177
2177
|
const a = s[r], l = a.distanceToPoint(e.origin), h = a.normal.dot(e.direction);
|
|
2178
2178
|
if (l > 0 && h >= 0)
|
|
2179
2179
|
return null;
|
|
2180
|
-
const
|
|
2181
|
-
if (!(
|
|
2180
|
+
const d = h !== 0 ? -l / h : 0;
|
|
2181
|
+
if (!(d <= 0) && (h > 0 ? n = Math.min(d, n) : i = Math.max(d, i), i > n))
|
|
2182
2182
|
return null;
|
|
2183
2183
|
}
|
|
2184
2184
|
return i !== -1 / 0 ? e.at(i, t) : e.at(n, t), t;
|
|
@@ -2262,15 +2262,15 @@ class ya {
|
|
|
2262
2262
|
computeInitialHull() {
|
|
2263
2263
|
const e = this.vertices, t = this.computeExtremes(), s = t.min, i = t.max;
|
|
2264
2264
|
let n = 0, r = 0;
|
|
2265
|
-
for (let
|
|
2266
|
-
const f = i[
|
|
2267
|
-
f > n && (n = f, r =
|
|
2265
|
+
for (let u = 0; u < 3; u++) {
|
|
2266
|
+
const f = i[u].point.getComponent(u) - s[u].point.getComponent(u);
|
|
2267
|
+
f > n && (n = f, r = u);
|
|
2268
2268
|
}
|
|
2269
2269
|
const o = s[r], a = i[r];
|
|
2270
2270
|
let l, h;
|
|
2271
2271
|
n = 0, Kn.set(o.point, a.point);
|
|
2272
|
-
for (let
|
|
2273
|
-
const E = e[
|
|
2272
|
+
for (let u = 0, f = this.vertices.length; u < f; u++) {
|
|
2273
|
+
const E = e[u];
|
|
2274
2274
|
if (E !== o && E !== a) {
|
|
2275
2275
|
Kn.closestPointToPoint(E.point, !0, Jn);
|
|
2276
2276
|
const p = Jn.distanceToSquared(E.point);
|
|
@@ -2278,41 +2278,41 @@ class ya {
|
|
|
2278
2278
|
}
|
|
2279
2279
|
}
|
|
2280
2280
|
n = -1, zi.setFromCoplanarPoints(o.point, a.point, l.point);
|
|
2281
|
-
for (let
|
|
2282
|
-
const E = e[
|
|
2281
|
+
for (let u = 0, f = this.vertices.length; u < f; u++) {
|
|
2282
|
+
const E = e[u];
|
|
2283
2283
|
if (E !== o && E !== a && E !== l) {
|
|
2284
2284
|
const p = Math.abs(zi.distanceToPoint(E.point));
|
|
2285
2285
|
p > n && (n = p, h = E);
|
|
2286
2286
|
}
|
|
2287
2287
|
}
|
|
2288
|
-
const
|
|
2288
|
+
const d = [];
|
|
2289
2289
|
if (zi.distanceToPoint(h.point) < 0) {
|
|
2290
|
-
|
|
2290
|
+
d.push(
|
|
2291
2291
|
Kt.create(o, a, l),
|
|
2292
2292
|
Kt.create(h, a, o),
|
|
2293
2293
|
Kt.create(h, l, a),
|
|
2294
2294
|
Kt.create(h, o, l)
|
|
2295
2295
|
);
|
|
2296
|
-
for (let
|
|
2297
|
-
const f = (
|
|
2298
|
-
u
|
|
2296
|
+
for (let u = 0; u < 3; u++) {
|
|
2297
|
+
const f = (u + 1) % 3;
|
|
2298
|
+
d[u + 1].getEdge(2).setTwin(d[0].getEdge(f)), d[u + 1].getEdge(1).setTwin(d[f + 1].getEdge(0));
|
|
2299
2299
|
}
|
|
2300
2300
|
} else {
|
|
2301
|
-
|
|
2301
|
+
d.push(
|
|
2302
2302
|
Kt.create(o, l, a),
|
|
2303
2303
|
Kt.create(h, o, a),
|
|
2304
2304
|
Kt.create(h, a, l),
|
|
2305
2305
|
Kt.create(h, l, o)
|
|
2306
2306
|
);
|
|
2307
|
-
for (let
|
|
2308
|
-
const f = (
|
|
2309
|
-
u
|
|
2307
|
+
for (let u = 0; u < 3; u++) {
|
|
2308
|
+
const f = (u + 1) % 3;
|
|
2309
|
+
d[u + 1].getEdge(2).setTwin(d[0].getEdge((3 - u) % 3)), d[u + 1].getEdge(0).setTwin(d[f + 1].getEdge(1));
|
|
2310
2310
|
}
|
|
2311
2311
|
}
|
|
2312
|
-
for (let
|
|
2313
|
-
this.faces.push(u
|
|
2314
|
-
for (let
|
|
2315
|
-
const E = e[
|
|
2312
|
+
for (let u = 0; u < 4; u++)
|
|
2313
|
+
this.faces.push(d[u]);
|
|
2314
|
+
for (let u = 0, f = e.length; u < f; u++) {
|
|
2315
|
+
const E = e[u];
|
|
2316
2316
|
if (E !== o && E !== a && E !== l && E !== h) {
|
|
2317
2317
|
n = this.tolerance;
|
|
2318
2318
|
let p = null;
|
|
@@ -2515,9 +2515,9 @@ function Sa(c, e) {
|
|
|
2515
2515
|
let n = 1, r = 0;
|
|
2516
2516
|
const o = rn[s], a = nn[s];
|
|
2517
2517
|
if (Math.abs(i[ae(a, o)]) > Number.EPSILON) {
|
|
2518
|
-
const l = i[ae(a, a)], h = i[ae(o, o)],
|
|
2518
|
+
const l = i[ae(a, a)], h = i[ae(o, o)], d = i[ae(a, o)], u = (l - h) / 2 / d;
|
|
2519
2519
|
let f;
|
|
2520
|
-
|
|
2520
|
+
u < 0 ? f = -1 / (-u + Math.sqrt(1 + u * u)) : f = 1 / (u + Math.sqrt(1 + u * u)), n = 1 / Math.sqrt(1 + f * f), r = f * n;
|
|
2521
2521
|
}
|
|
2522
2522
|
return e.identity(), e.elements[ae(o, o)] = n, e.elements[ae(a, a)] = n, e.elements[ae(a, o)] = r, e.elements[ae(o, a)] = -r, e;
|
|
2523
2523
|
}
|
|
@@ -2555,12 +2555,12 @@ function ba(c) {
|
|
|
2555
2555
|
r.push(W.point.x, W.point.y, W.point.z), r.push(Y.point.x, Y.point.y, Y.point.z), r.push(b.point.x, b.point.y, b.point.z);
|
|
2556
2556
|
}
|
|
2557
2557
|
}
|
|
2558
|
-
const o = new v.Vector3(), a = new v.Vector3(), l = new v.Vector3(), h = new v.Vector3(),
|
|
2558
|
+
const o = new v.Vector3(), a = new v.Vector3(), l = new v.Vector3(), h = new v.Vector3(), d = new v.Vector3(), u = new v.Vector3(), f = new v.Vector3(), E = new v.Vector3();
|
|
2559
2559
|
let p = 0, I = 0, m = 0, _ = 0, y = 0, C = 0, R = 0;
|
|
2560
2560
|
for (let at = 0, ft = r.length; at < ft; at += 9) {
|
|
2561
|
-
o.fromArray(r, at), a.fromArray(r, at + 3), l.fromArray(r, at + 6), f.set(0, 0, 0), f.add(o).add(a).add(l).divideScalar(3), h.subVectors(a, o),
|
|
2562
|
-
const dt =
|
|
2563
|
-
E.add(
|
|
2561
|
+
o.fromArray(r, at), a.fromArray(r, at + 3), l.fromArray(r, at + 6), f.set(0, 0, 0), f.add(o).add(a).add(l).divideScalar(3), h.subVectors(a, o), d.subVectors(l, o);
|
|
2562
|
+
const dt = u.crossVectors(h, d).length() / 2;
|
|
2563
|
+
E.add(u.copy(f).multiplyScalar(dt)), p += dt, I += (9 * f.x * f.x + o.x * o.x + a.x * a.x + l.x * l.x) * (dt / 12), m += (9 * f.x * f.y + o.x * o.y + a.x * a.y + l.x * l.y) * (dt / 12), _ += (9 * f.x * f.z + o.x * o.z + a.x * a.z + l.x * l.z) * (dt / 12), y += (9 * f.y * f.y + o.y * o.y + a.y * a.y + l.y * l.y) * (dt / 12), C += (9 * f.y * f.z + o.y * o.z + a.y * a.z + l.y * l.z) * (dt / 12), R += (9 * f.z * f.z + o.z * o.z + a.z * a.z + l.z * l.z) * (dt / 12);
|
|
2564
2564
|
}
|
|
2565
2565
|
E.divideScalar(p), I /= p, m /= p, _ /= p, y /= p, C /= p, R /= p, I -= E.x * E.x, m -= E.x * E.y, _ -= E.x * E.z, y -= E.y * E.y, C -= E.y * E.z, R -= E.z * E.z;
|
|
2566
2566
|
const F = new v.Matrix3();
|
|
@@ -3371,8 +3371,8 @@ class Da extends _a {
|
|
|
3371
3371
|
this.config.directionalLight.color = n.color, this.config.directionalLight.intensity = n.intensity, this.config.directionalLight.position = n.position, this.deleteAllLights();
|
|
3372
3372
|
const { color: r, intensity: o } = this.config.directionalLight, a = new v.DirectionalLight(r, o);
|
|
3373
3373
|
a.position.copy(n.position);
|
|
3374
|
-
const { color: l, intensity: h } = this.config.directionalLight,
|
|
3375
|
-
this.three.add(a,
|
|
3374
|
+
const { color: l, intensity: h } = this.config.directionalLight, d = new v.AmbientLight(l, h);
|
|
3375
|
+
this.three.add(a, d), this.directionalLights.set(a.uuid, a), this.ambientLights.set(d.uuid, d), this.isSetup = !0, this.onSetup.trigger();
|
|
3376
3376
|
}
|
|
3377
3377
|
}
|
|
3378
3378
|
class kl extends Ta {
|
|
@@ -3531,25 +3531,25 @@ function Qs(c, e, t, s, i = 1 / 0, n) {
|
|
|
3531
3531
|
s = Math.max(1e-4, s);
|
|
3532
3532
|
const r = 2 / s, o = r * n, a = 1 / (1 + o + 0.48 * o * o + 0.235 * o * o * o);
|
|
3533
3533
|
let l = c - e;
|
|
3534
|
-
const h = e,
|
|
3535
|
-
l = qt(l, -
|
|
3536
|
-
const
|
|
3537
|
-
t.value = (t.value - r *
|
|
3538
|
-
let f = e + (l +
|
|
3534
|
+
const h = e, d = i * s;
|
|
3535
|
+
l = qt(l, -d, d), e = c - l;
|
|
3536
|
+
const u = (t.value + r * l) * n;
|
|
3537
|
+
t.value = (t.value - r * u) * a;
|
|
3538
|
+
let f = e + (l + u) * a;
|
|
3539
3539
|
return h - c > 0 == f > h && (f = h, t.value = (f - h) / n), f;
|
|
3540
3540
|
}
|
|
3541
3541
|
function nr(c, e, t, s, i = 1 / 0, n, r) {
|
|
3542
3542
|
s = Math.max(1e-4, s);
|
|
3543
3543
|
const o = 2 / s, a = o * n, l = 1 / (1 + a + 0.48 * a * a + 0.235 * a * a * a);
|
|
3544
|
-
let h = e.x,
|
|
3545
|
-
const I = h, m =
|
|
3544
|
+
let h = e.x, d = e.y, u = e.z, f = c.x - h, E = c.y - d, p = c.z - u;
|
|
3545
|
+
const I = h, m = d, _ = u, y = i * s, C = y * y, R = f * f + E * E + p * p;
|
|
3546
3546
|
if (R > C) {
|
|
3547
3547
|
const M = Math.sqrt(R);
|
|
3548
3548
|
f = f / M * y, E = E / M * y, p = p / M * y;
|
|
3549
3549
|
}
|
|
3550
|
-
h = c.x - f,
|
|
3550
|
+
h = c.x - f, d = c.y - E, u = c.z - p;
|
|
3551
3551
|
const F = (t.x + o * f) * n, O = (t.y + o * E) * n, L = (t.z + o * p) * n;
|
|
3552
|
-
t.x = (t.x - o * F) * l, t.y = (t.y - o * O) * l, t.z = (t.z - o * L) * l, r.x = h + (f + F) * l, r.y =
|
|
3552
|
+
t.x = (t.x - o * F) * l, t.y = (t.y - o * O) * l, t.z = (t.z - o * L) * l, r.x = h + (f + F) * l, r.y = d + (E + O) * l, r.z = u + (p + L) * l;
|
|
3553
3553
|
const N = I - c.x, x = m - c.y, k = _ - c.z, w = r.x - I, P = r.y - m, T = r.z - _;
|
|
3554
3554
|
return N * w + x * P + k * T > 0 && (r.x = I, r.y = m, r.z = _, t.x = (r.x - I) / n, t.y = (r.y - m) / n, t.z = (r.z - _) / n), r;
|
|
3555
3555
|
}
|
|
@@ -3777,7 +3777,7 @@ class Mt extends Ua {
|
|
|
3777
3777
|
deltaY: 0,
|
|
3778
3778
|
mouseButton: (C.buttons & ht.LEFT) === ht.LEFT ? ht.LEFT : (C.buttons & ht.MIDDLE) === ht.LEFT ? ht.MIDDLE : (C.buttons & ht.RIGHT) === ht.LEFT ? ht.RIGHT : null
|
|
3779
3779
|
};
|
|
3780
|
-
this._activePointers.push(F), this._domElement.ownerDocument.removeEventListener("mousemove", l), this._domElement.ownerDocument.removeEventListener("mouseup",
|
|
3780
|
+
this._activePointers.push(F), this._domElement.ownerDocument.removeEventListener("mousemove", l), this._domElement.ownerDocument.removeEventListener("mouseup", d), this._domElement.ownerDocument.addEventListener("mousemove", l), this._domElement.ownerDocument.addEventListener("mouseup", d), this._isDragging = !0, p(C);
|
|
3781
3781
|
}, a = (C) => {
|
|
3782
3782
|
C.cancelable && C.preventDefault();
|
|
3783
3783
|
const R = C.pointerId, F = this._lockedPointer || this._findPointerById(R);
|
|
@@ -3823,11 +3823,11 @@ class Mt extends Ua {
|
|
|
3823
3823
|
this._state = G.NONE;
|
|
3824
3824
|
m();
|
|
3825
3825
|
}
|
|
3826
|
-
},
|
|
3826
|
+
}, d = () => {
|
|
3827
3827
|
const C = this._findPointerById(1);
|
|
3828
3828
|
C && C === this._lockedPointer || (C && this._disposePointer(C), this._state = G.NONE, m());
|
|
3829
3829
|
};
|
|
3830
|
-
let
|
|
3830
|
+
let u = -1;
|
|
3831
3831
|
const f = (C) => {
|
|
3832
3832
|
if (!this._domElement || !this._enabled || this.mouseButtons.wheel === G.NONE)
|
|
3833
3833
|
return;
|
|
@@ -3838,7 +3838,7 @@ class Mt extends Ua {
|
|
|
3838
3838
|
}
|
|
3839
3839
|
if (C.preventDefault(), this.dollyToCursor || this.mouseButtons.wheel === G.ROTATE || this.mouseButtons.wheel === G.TRUCK) {
|
|
3840
3840
|
const N = performance.now();
|
|
3841
|
-
|
|
3841
|
+
u - N < 1e3 && this._getClientRect(this._elementRect), u = N;
|
|
3842
3842
|
}
|
|
3843
3843
|
const R = za ? -1 : -3, F = C.deltaMode === 1 ? C.deltaY / R : C.deltaY / (R * 10), O = this.dollyToCursor ? (C.clientX - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, L = this.dollyToCursor ? (C.clientY - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
|
|
3844
3844
|
switch (this.mouseButtons.wheel) {
|
|
@@ -3868,7 +3868,7 @@ class Mt extends Ua {
|
|
|
3868
3868
|
if (!(!this._domElement || !this._enabled)) {
|
|
3869
3869
|
if (this.mouseButtons.right === Mt.ACTION.NONE) {
|
|
3870
3870
|
const R = C instanceof PointerEvent ? C.pointerId : (C instanceof MouseEvent, 0), F = this._findPointerById(R);
|
|
3871
|
-
F && this._disposePointer(F), this._domElement.ownerDocument.removeEventListener("pointermove", a, { passive: !1 }), this._domElement.ownerDocument.removeEventListener("pointerup", h), this._domElement.ownerDocument.removeEventListener("mousemove", l), this._domElement.ownerDocument.removeEventListener("mouseup",
|
|
3871
|
+
F && this._disposePointer(F), this._domElement.ownerDocument.removeEventListener("pointermove", a, { passive: !1 }), this._domElement.ownerDocument.removeEventListener("pointerup", h), this._domElement.ownerDocument.removeEventListener("mousemove", l), this._domElement.ownerDocument.removeEventListener("mouseup", d);
|
|
3872
3872
|
return;
|
|
3873
3873
|
}
|
|
3874
3874
|
C.preventDefault();
|
|
@@ -3916,7 +3916,7 @@ class Mt extends Ua {
|
|
|
3916
3916
|
}
|
|
3917
3917
|
((this._state & G.TRUCK) === G.TRUCK || (this._state & G.TOUCH_TRUCK) === G.TOUCH_TRUCK || (this._state & G.TOUCH_DOLLY_TRUCK) === G.TOUCH_DOLLY_TRUCK || (this._state & G.TOUCH_ZOOM_TRUCK) === G.TOUCH_ZOOM_TRUCK) && (this._truckInternal(F, O, !1), this._isUserControllingTruck = !0), ((this._state & G.OFFSET) === G.OFFSET || (this._state & G.TOUCH_OFFSET) === G.TOUCH_OFFSET || (this._state & G.TOUCH_DOLLY_OFFSET) === G.TOUCH_DOLLY_OFFSET || (this._state & G.TOUCH_ZOOM_OFFSET) === G.TOUCH_ZOOM_OFFSET) && (this._truckInternal(F, O, !0), this._isUserControllingOffset = !0), this.dispatchEvent({ type: "control" });
|
|
3918
3918
|
}, m = () => {
|
|
3919
|
-
Vi(this._activePointers, kt), i.copy(kt), this._dragNeedsUpdate = !1, (this._activePointers.length === 0 || this._activePointers.length === 1 && this._activePointers[0] === this._lockedPointer) && (this._isDragging = !1), this._activePointers.length === 0 && this._domElement && (this._domElement.ownerDocument.removeEventListener("pointermove", a, { passive: !1 }), this._domElement.ownerDocument.removeEventListener("mousemove", l), this._domElement.ownerDocument.removeEventListener("pointerup", h), this._domElement.ownerDocument.removeEventListener("mouseup",
|
|
3919
|
+
Vi(this._activePointers, kt), i.copy(kt), this._dragNeedsUpdate = !1, (this._activePointers.length === 0 || this._activePointers.length === 1 && this._activePointers[0] === this._lockedPointer) && (this._isDragging = !1), this._activePointers.length === 0 && this._domElement && (this._domElement.ownerDocument.removeEventListener("pointermove", a, { passive: !1 }), this._domElement.ownerDocument.removeEventListener("mousemove", l), this._domElement.ownerDocument.removeEventListener("pointerup", h), this._domElement.ownerDocument.removeEventListener("mouseup", d), this.dispatchEvent({ type: "controlend" }));
|
|
3920
3920
|
};
|
|
3921
3921
|
this.lockPointer = () => {
|
|
3922
3922
|
!this._enabled || !this._domElement || (this.cancel(), this._lockedPointer = {
|
|
@@ -3938,7 +3938,7 @@ class Mt extends Ua {
|
|
|
3938
3938
|
this._addAllEventListeners = (C) => {
|
|
3939
3939
|
this._domElement = C, this._domElement.style.touchAction = "none", this._domElement.style.userSelect = "none", this._domElement.style.webkitUserSelect = "none", this._domElement.addEventListener("pointerdown", r), ka && this._domElement.addEventListener("mousedown", o), this._domElement.addEventListener("pointercancel", h), this._domElement.addEventListener("wheel", f, { passive: !1 }), this._domElement.addEventListener("contextmenu", E);
|
|
3940
3940
|
}, this._removeAllEventListeners = () => {
|
|
3941
|
-
this._domElement && (this._domElement.style.touchAction = "", this._domElement.style.userSelect = "", this._domElement.style.webkitUserSelect = "", this._domElement.removeEventListener("pointerdown", r), this._domElement.removeEventListener("mousedown", o), this._domElement.removeEventListener("pointercancel", h), this._domElement.removeEventListener("wheel", f, { passive: !1 }), this._domElement.removeEventListener("contextmenu", E), this._domElement.ownerDocument.removeEventListener("pointermove", a, { passive: !1 }), this._domElement.ownerDocument.removeEventListener("mousemove", l), this._domElement.ownerDocument.removeEventListener("pointerup", h), this._domElement.ownerDocument.removeEventListener("mouseup",
|
|
3941
|
+
this._domElement && (this._domElement.style.touchAction = "", this._domElement.style.userSelect = "", this._domElement.style.webkitUserSelect = "", this._domElement.removeEventListener("pointerdown", r), this._domElement.removeEventListener("mousedown", o), this._domElement.removeEventListener("pointercancel", h), this._domElement.removeEventListener("wheel", f, { passive: !1 }), this._domElement.removeEventListener("contextmenu", E), this._domElement.ownerDocument.removeEventListener("pointermove", a, { passive: !1 }), this._domElement.ownerDocument.removeEventListener("mousemove", l), this._domElement.ownerDocument.removeEventListener("pointerup", h), this._domElement.ownerDocument.removeEventListener("mouseup", d), this._domElement.ownerDocument.removeEventListener("pointerlockchange", _), this._domElement.ownerDocument.removeEventListener("pointerlockerror", y));
|
|
3942
3942
|
}, this.cancel = () => {
|
|
3943
3943
|
this._state !== G.NONE && (this._state = G.NONE, this._activePointers.length = 0, m());
|
|
3944
3944
|
}, t && this.connect(t), this.update(0);
|
|
@@ -4305,12 +4305,12 @@ class Mt extends Ua {
|
|
|
4305
4305
|
fitToBox(e, t, { cover: s = !1, paddingLeft: i = 0, paddingRight: n = 0, paddingBottom: r = 0, paddingTop: o = 0 } = {}) {
|
|
4306
4306
|
const a = [], l = e.isBox3 ? Ze.copy(e) : Ze.setFromObject(e);
|
|
4307
4307
|
l.isEmpty() && (console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"), Promise.resolve());
|
|
4308
|
-
const h = ir(this._sphericalEnd.theta, sr),
|
|
4309
|
-
a.push(this.rotateTo(h,
|
|
4310
|
-
const
|
|
4308
|
+
const h = ir(this._sphericalEnd.theta, sr), d = ir(this._sphericalEnd.phi, sr);
|
|
4309
|
+
a.push(this.rotateTo(h, d, t));
|
|
4310
|
+
const u = ut.setFromSpherical(this._sphericalEnd).normalize(), f = lr.setFromUnitVectors(u, Gi), E = mt(Math.abs(u.y), 1);
|
|
4311
4311
|
E && f.multiply(Wi.setFromAxisAngle(Ks, h)), f.multiply(this._yAxisUpSpaceInverse);
|
|
4312
4312
|
const p = cr.makeEmpty();
|
|
4313
|
-
Et.copy(l.min).applyQuaternion(f), p.expandByPoint(Et), Et.copy(l.min).setX(l.max.x).applyQuaternion(f), p.expandByPoint(Et), Et.copy(l.min).setY(l.max.y).applyQuaternion(f), p.expandByPoint(Et), Et.copy(l.max).setZ(l.min.z).applyQuaternion(f), p.expandByPoint(Et), Et.copy(l.min).setZ(l.max.z).applyQuaternion(f), p.expandByPoint(Et), Et.copy(l.max).setY(l.min.y).applyQuaternion(f), p.expandByPoint(Et), Et.copy(l.max).setX(l.min.x).applyQuaternion(f), p.expandByPoint(Et), Et.copy(l.max).applyQuaternion(f), p.expandByPoint(Et), p.min.x -= i, p.min.y -= r, p.max.x += n, p.max.y += o, f.setFromUnitVectors(Gi,
|
|
4313
|
+
Et.copy(l.min).applyQuaternion(f), p.expandByPoint(Et), Et.copy(l.min).setX(l.max.x).applyQuaternion(f), p.expandByPoint(Et), Et.copy(l.min).setY(l.max.y).applyQuaternion(f), p.expandByPoint(Et), Et.copy(l.max).setZ(l.min.z).applyQuaternion(f), p.expandByPoint(Et), Et.copy(l.min).setZ(l.max.z).applyQuaternion(f), p.expandByPoint(Et), Et.copy(l.max).setY(l.min.y).applyQuaternion(f), p.expandByPoint(Et), Et.copy(l.max).setX(l.min.x).applyQuaternion(f), p.expandByPoint(Et), Et.copy(l.max).applyQuaternion(f), p.expandByPoint(Et), p.min.x -= i, p.min.y -= r, p.max.x += n, p.max.y += o, f.setFromUnitVectors(Gi, u), E && f.premultiply(Wi.invert()), f.premultiply(this._yAxisUpSpace);
|
|
4314
4314
|
const I = p.getSize(ut), m = p.getCenter(Et).applyQuaternion(f);
|
|
4315
4315
|
if (Oe(this._camera)) {
|
|
4316
4316
|
const _ = this.getDistanceToFitBox(I.x, I.y, I.z, s);
|
|
@@ -4374,11 +4374,11 @@ class Mt extends Ua {
|
|
|
4374
4374
|
* @param enableTransition
|
|
4375
4375
|
* @category Methods
|
|
4376
4376
|
*/
|
|
4377
|
-
lerpLookAt(e, t, s, i, n, r, o, a, l, h,
|
|
4377
|
+
lerpLookAt(e, t, s, i, n, r, o, a, l, h, d, u, f, E = !1) {
|
|
4378
4378
|
this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._lastDollyDirection = He.NONE, this._changedDolly = 0;
|
|
4379
4379
|
const p = ut.set(i, n, r), I = Et.set(e, t, s);
|
|
4380
4380
|
Wt.setFromVector3(I.sub(p).applyQuaternion(this._yAxisUpSpace));
|
|
4381
|
-
const m = Xe.set(h,
|
|
4381
|
+
const m = Xe.set(h, d, u), _ = Et.set(o, a, l);
|
|
4382
4382
|
Es.setFromVector3(_.sub(m).applyQuaternion(this._yAxisUpSpace)), this._targetEnd.copy(p.lerp(m, f));
|
|
4383
4383
|
const y = Es.theta - Wt.theta, C = Es.phi - Wt.phi, R = Es.radius - Wt.radius;
|
|
4384
4384
|
this._sphericalEnd.set(Wt.radius + R * f, Wt.phi + C * f, Wt.theta + y * f), this.normalizeRotations(), this._needsUpdate = !0, E || (this._target.copy(this._targetEnd), this._spherical.copy(this._sphericalEnd));
|
|
@@ -4589,57 +4589,57 @@ class Mt extends Ua {
|
|
|
4589
4589
|
if (Tt(t))
|
|
4590
4590
|
this._thetaVelocity.value = 0, this._spherical.theta = this._sphericalEnd.theta;
|
|
4591
4591
|
else {
|
|
4592
|
-
const
|
|
4593
|
-
this._spherical.theta = Qs(this._spherical.theta, this._sphericalEnd.theta, this._thetaVelocity,
|
|
4592
|
+
const d = this._isUserControllingRotate ? this.draggingSmoothTime : this.smoothTime;
|
|
4593
|
+
this._spherical.theta = Qs(this._spherical.theta, this._sphericalEnd.theta, this._thetaVelocity, d, 1 / 0, e), this._needsUpdate = !0;
|
|
4594
4594
|
}
|
|
4595
4595
|
if (Tt(s))
|
|
4596
4596
|
this._phiVelocity.value = 0, this._spherical.phi = this._sphericalEnd.phi;
|
|
4597
4597
|
else {
|
|
4598
|
-
const
|
|
4599
|
-
this._spherical.phi = Qs(this._spherical.phi, this._sphericalEnd.phi, this._phiVelocity,
|
|
4598
|
+
const d = this._isUserControllingRotate ? this.draggingSmoothTime : this.smoothTime;
|
|
4599
|
+
this._spherical.phi = Qs(this._spherical.phi, this._sphericalEnd.phi, this._phiVelocity, d, 1 / 0, e), this._needsUpdate = !0;
|
|
4600
4600
|
}
|
|
4601
4601
|
if (Tt(i))
|
|
4602
4602
|
this._radiusVelocity.value = 0, this._spherical.radius = this._sphericalEnd.radius;
|
|
4603
4603
|
else {
|
|
4604
|
-
const
|
|
4605
|
-
this._spherical.radius = Qs(this._spherical.radius, this._sphericalEnd.radius, this._radiusVelocity,
|
|
4604
|
+
const d = this._isUserControllingDolly ? this.draggingSmoothTime : this.smoothTime;
|
|
4605
|
+
this._spherical.radius = Qs(this._spherical.radius, this._sphericalEnd.radius, this._radiusVelocity, d, this.maxSpeed, e), this._needsUpdate = !0;
|
|
4606
4606
|
}
|
|
4607
4607
|
if (Tt(n.x) && Tt(n.y) && Tt(n.z))
|
|
4608
4608
|
this._targetVelocity.set(0, 0, 0), this._target.copy(this._targetEnd);
|
|
4609
4609
|
else {
|
|
4610
|
-
const
|
|
4611
|
-
nr(this._target, this._targetEnd, this._targetVelocity,
|
|
4610
|
+
const d = this._isUserControllingTruck ? this.draggingSmoothTime : this.smoothTime;
|
|
4611
|
+
nr(this._target, this._targetEnd, this._targetVelocity, d, this.maxSpeed, e, this._target), this._needsUpdate = !0;
|
|
4612
4612
|
}
|
|
4613
4613
|
if (Tt(r.x) && Tt(r.y) && Tt(r.z))
|
|
4614
4614
|
this._focalOffsetVelocity.set(0, 0, 0), this._focalOffset.copy(this._focalOffsetEnd);
|
|
4615
4615
|
else {
|
|
4616
|
-
const
|
|
4617
|
-
nr(this._focalOffset, this._focalOffsetEnd, this._focalOffsetVelocity,
|
|
4616
|
+
const d = this._isUserControllingOffset ? this.draggingSmoothTime : this.smoothTime;
|
|
4617
|
+
nr(this._focalOffset, this._focalOffsetEnd, this._focalOffsetVelocity, d, this.maxSpeed, e, this._focalOffset), this._needsUpdate = !0;
|
|
4618
4618
|
}
|
|
4619
4619
|
if (Tt(o))
|
|
4620
4620
|
this._zoomVelocity.value = 0, this._zoom = this._zoomEnd;
|
|
4621
4621
|
else {
|
|
4622
|
-
const
|
|
4623
|
-
this._zoom = Qs(this._zoom, this._zoomEnd, this._zoomVelocity,
|
|
4622
|
+
const d = this._isUserControllingZoom ? this.draggingSmoothTime : this.smoothTime;
|
|
4623
|
+
this._zoom = Qs(this._zoom, this._zoomEnd, this._zoomVelocity, d, 1 / 0, e);
|
|
4624
4624
|
}
|
|
4625
4625
|
if (this.dollyToCursor) {
|
|
4626
4626
|
if (Oe(this._camera) && this._changedDolly !== 0) {
|
|
4627
|
-
const
|
|
4627
|
+
const d = this._spherical.radius - this._lastDistance, u = this._camera, f = this._getCameraDirection(ps), E = ut.copy(f).cross(u.up).normalize();
|
|
4628
4628
|
E.lengthSq() === 0 && (E.x = 1);
|
|
4629
|
-
const p = Et.crossVectors(E, f), I = this._sphericalEnd.radius * Math.tan(
|
|
4629
|
+
const p = Et.crossVectors(E, f), I = this._sphericalEnd.radius * Math.tan(u.getEffectiveFOV() * us * 0.5), _ = (this._sphericalEnd.radius - d - this._sphericalEnd.radius) / this._sphericalEnd.radius, y = Xe.copy(this._targetEnd).add(E.multiplyScalar(this._dollyControlCoord.x * I * u.aspect)).add(p.multiplyScalar(this._dollyControlCoord.y * I)), C = ut.copy(this._targetEnd).lerp(y, _), R = this._lastDollyDirection === He.IN && this._spherical.radius <= this.minDistance, F = this._lastDollyDirection === He.OUT && this.maxDistance <= this._spherical.radius;
|
|
4630
4630
|
if (this.infinityDolly && (R || F)) {
|
|
4631
|
-
this._sphericalEnd.radius -=
|
|
4632
|
-
const L = Et.copy(f).multiplyScalar(-
|
|
4631
|
+
this._sphericalEnd.radius -= d, this._spherical.radius -= d;
|
|
4632
|
+
const L = Et.copy(f).multiplyScalar(-d);
|
|
4633
4633
|
C.add(L);
|
|
4634
4634
|
}
|
|
4635
4635
|
this._boundary.clampPoint(C, C);
|
|
4636
4636
|
const O = Et.subVectors(C, this._targetEnd);
|
|
4637
|
-
this._targetEnd.copy(C), this._target.add(O), this._changedDolly -=
|
|
4637
|
+
this._targetEnd.copy(C), this._target.add(O), this._changedDolly -= d, Tt(this._changedDolly) && (this._changedDolly = 0);
|
|
4638
4638
|
} else if (ge(this._camera) && this._changedZoom !== 0) {
|
|
4639
|
-
const
|
|
4639
|
+
const d = this._zoom - this._lastZoom, u = this._camera, f = ut.set(this._dollyControlCoord.x, this._dollyControlCoord.y, (u.near + u.far) / (u.near - u.far)).unproject(u), E = Et.set(0, 0, -1).applyQuaternion(u.quaternion), p = Xe.copy(f).add(E.multiplyScalar(-f.dot(u.up))), m = -(this._zoom - d - this._zoom) / this._zoom, _ = this._getCameraDirection(ps), y = this._targetEnd.dot(_), C = ut.copy(this._targetEnd).lerp(p, m), R = C.dot(_), F = _.multiplyScalar(R - y);
|
|
4640
4640
|
C.sub(F), this._boundary.clampPoint(C, C);
|
|
4641
4641
|
const O = Et.subVectors(C, this._targetEnd);
|
|
4642
|
-
this._targetEnd.copy(C), this._target.add(O), this._changedZoom -=
|
|
4642
|
+
this._targetEnd.copy(C), this._target.add(O), this._changedZoom -= d, Tt(this._changedZoom) && (this._changedZoom = 0);
|
|
4643
4643
|
}
|
|
4644
4644
|
}
|
|
4645
4645
|
this._camera.zoom !== this._zoom && (this._camera.zoom = this._zoom, this._camera.updateProjectionMatrix(), this._updateNearPlaneCorners(), this._needsUpdate = !0), this._dragNeedsUpdate = !0;
|
|
@@ -4838,8 +4838,8 @@ class Mt extends Ua {
|
|
|
4838
4838
|
const o = r, a = o.geometry.clone();
|
|
4839
4839
|
a.applyMatrix4(o.matrixWorld);
|
|
4840
4840
|
const h = a.attributes.position;
|
|
4841
|
-
for (let
|
|
4842
|
-
ut.fromBufferAttribute(h,
|
|
4841
|
+
for (let d = 0, u = h.count; d < u; d++)
|
|
4842
|
+
ut.fromBufferAttribute(h, d), n = Math.max(n, i.distanceToSquared(ut));
|
|
4843
4843
|
}), s.radius = Math.sqrt(n), s;
|
|
4844
4844
|
}
|
|
4845
4845
|
}
|
|
@@ -5286,15 +5286,15 @@ class Ha extends Ga {
|
|
|
5286
5286
|
const s = t instanceof v.InstancedMesh, { geometry: i, material: n } = t, { colorMaterial: r, code: o } = this.getAvailableMaterial();
|
|
5287
5287
|
let a;
|
|
5288
5288
|
if (Array.isArray(n)) {
|
|
5289
|
-
let
|
|
5290
|
-
const
|
|
5289
|
+
let d = !0;
|
|
5290
|
+
const u = [];
|
|
5291
5291
|
for (const f of n)
|
|
5292
|
-
er.isTransparent(f) ?
|
|
5293
|
-
if (
|
|
5292
|
+
er.isTransparent(f) ? u.push(this._transparentMat) : (d = !1, u.push(r));
|
|
5293
|
+
if (d) {
|
|
5294
5294
|
r.dispose(), this.isProcessing = !1;
|
|
5295
5295
|
return;
|
|
5296
5296
|
}
|
|
5297
|
-
a =
|
|
5297
|
+
a = u;
|
|
5298
5298
|
} else if (er.isTransparent(n)) {
|
|
5299
5299
|
r.dispose(), this.isProcessing = !1;
|
|
5300
5300
|
return;
|
|
@@ -5629,12 +5629,12 @@ class Vl extends Da {
|
|
|
5629
5629
|
const h = this.directionalLights.get(l);
|
|
5630
5630
|
if (!h)
|
|
5631
5631
|
throw new Error("Light not found.");
|
|
5632
|
-
const
|
|
5633
|
-
|
|
5634
|
-
const
|
|
5635
|
-
|
|
5632
|
+
const d = new v.Vector3();
|
|
5633
|
+
d.copy(n);
|
|
5634
|
+
const u = a === this._lightsWithShadow.size - 1, f = u ? r / 2 : r * 2 / 3;
|
|
5635
|
+
d.multiplyScalar(f), d.add(i.position);
|
|
5636
5636
|
const E = r - f, p = new v.Vector3();
|
|
5637
|
-
p.copy(o), p.multiplyScalar(E), h.target.position.copy(
|
|
5637
|
+
p.copy(o), p.multiplyScalar(E), h.target.position.copy(d), h.position.copy(d), h.position.add(p), h.shadow.camera.right = E, h.shadow.camera.left = -E, h.shadow.camera.top = E, h.shadow.camera.bottom = -E, h.shadow.camera.far = E * 2, h.shadow.camera.updateProjectionMatrix(), h.shadow.camera.updateMatrix(), u || (r /= 3);
|
|
5638
5638
|
}
|
|
5639
5639
|
this._isComputingShadows = !1;
|
|
5640
5640
|
});
|
|
@@ -6115,8 +6115,8 @@ class ja extends ji {
|
|
|
6115
6115
|
}), n[_] = y, i[_] = y, s[_] = y;
|
|
6116
6116
|
}
|
|
6117
6117
|
r("camera", e), r("object", void 0), r("enabled", !0), r("axis", null), r("mode", "translate"), r("translationSnap", null), r("rotationSnap", null), r("scaleSnap", null), r("space", "world"), r("size", 1), r("dragging", !1), r("showX", !0), r("showY", !0), r("showZ", !0);
|
|
6118
|
-
const o = new Q(), a = new Q(), l = new le(), h = new le(),
|
|
6119
|
-
r("worldPosition", o), r("worldPositionStart", a), r("worldQuaternion", l), r("worldQuaternionStart", h), r("cameraPosition",
|
|
6118
|
+
const o = new Q(), a = new Q(), l = new le(), h = new le(), d = new Q(), u = new le(), f = new Q(), E = new Q(), p = new Q(), I = 0, m = new Q();
|
|
6119
|
+
r("worldPosition", o), r("worldPositionStart", a), r("worldQuaternion", l), r("worldQuaternionStart", h), r("cameraPosition", d), r("cameraQuaternion", u), r("pointStart", f), r("pointEnd", E), r("rotationAxis", p), r("rotationAngle", I), r("eye", m), this._offset = new Q(), this._startNorm = new Q(), this._endNorm = new Q(), this._cameraScale = new Q(), this._parentPosition = new Q(), this._parentQuaternion = new le(), this._parentQuaternionInv = new le(), this._parentScale = new Q(), this._worldScaleStart = new Q(), this._worldQuaternionInv = new le(), this._worldScale = new Q(), this._positionStart = new Q(), this._quaternionStart = new le(), this._scaleStart = new Q(), this._getPointer = Qa.bind(this), this._onPointerDown = Ka.bind(this), this._onPointerHover = qa.bind(this), this._onPointerMove = Ja.bind(this), this._onPointerUp = tc.bind(this), this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointermove", this._onPointerHover), this.domElement.addEventListener("pointerup", this._onPointerUp);
|
|
6120
6120
|
}
|
|
6121
6121
|
// updateMatrixWorld updates key transformation variables
|
|
6122
6122
|
updateMatrixWorld() {
|
|
@@ -6280,10 +6280,10 @@ class ec extends ji {
|
|
|
6280
6280
|
l.color.setHex(65280), l.opacity = 0.5;
|
|
6281
6281
|
const h = e.clone();
|
|
6282
6282
|
h.color.setHex(255), h.opacity = 0.5;
|
|
6283
|
-
const u = e.clone();
|
|
6284
|
-
u.opacity = 0.25;
|
|
6285
6283
|
const d = e.clone();
|
|
6286
|
-
d.
|
|
6284
|
+
d.opacity = 0.25;
|
|
6285
|
+
const u = e.clone();
|
|
6286
|
+
u.color.setHex(16776960), u.opacity = 0.25, e.clone().color.setHex(16776960);
|
|
6287
6287
|
const E = e.clone();
|
|
6288
6288
|
E.color.setHex(7895160);
|
|
6289
6289
|
const p = new zt(0, 0.04, 0.1, 12);
|
|
@@ -6319,7 +6319,7 @@ class ec extends ji {
|
|
|
6319
6319
|
[new rt(_, o), null, [Math.PI / 2, 0, 0]]
|
|
6320
6320
|
],
|
|
6321
6321
|
XYZ: [
|
|
6322
|
-
[new rt(new vs(0.1, 0),
|
|
6322
|
+
[new rt(new vs(0.1, 0), d.clone()), [0, 0, 0]]
|
|
6323
6323
|
],
|
|
6324
6324
|
XY: [
|
|
6325
6325
|
[new rt(new Dt(0.15, 0.15, 0.01), h.clone()), [0.15, 0.15, 0]]
|
|
@@ -6388,7 +6388,7 @@ class ec extends ji {
|
|
|
6388
6388
|
[new rt(y(0.5, 0.5), o), null, [0, Math.PI / 2, 0]]
|
|
6389
6389
|
],
|
|
6390
6390
|
E: [
|
|
6391
|
-
[new rt(y(0.75, 1),
|
|
6391
|
+
[new rt(y(0.75, 1), u), null, [0, Math.PI / 2, 0]]
|
|
6392
6392
|
]
|
|
6393
6393
|
}, N = {
|
|
6394
6394
|
AXIS: [
|
|
@@ -6436,7 +6436,7 @@ class ec extends ji {
|
|
|
6436
6436
|
[new rt(new Dt(0.15, 0.15, 0.01), l), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
|
|
6437
6437
|
],
|
|
6438
6438
|
XYZ: [
|
|
6439
|
-
[new rt(new Dt(0.1, 0.1, 0.1),
|
|
6439
|
+
[new rt(new Dt(0.1, 0.1, 0.1), d.clone())]
|
|
6440
6440
|
]
|
|
6441
6441
|
}, w = {
|
|
6442
6442
|
X: [
|
|
@@ -7181,8 +7181,8 @@ class ac extends Ns {
|
|
|
7181
7181
|
a.getSize(l);
|
|
7182
7182
|
const h = new v.Vector3();
|
|
7183
7183
|
a.getCenter(h);
|
|
7184
|
-
const
|
|
7185
|
-
await this.controls.fitToSphere(
|
|
7184
|
+
const d = Math.max(l.x, l.y, l.z) * s, u = new v.Sphere(h, d);
|
|
7185
|
+
await this.controls.fitToSphere(u, !0);
|
|
7186
7186
|
}
|
|
7187
7187
|
/**
|
|
7188
7188
|
* Allows or prevents all user input.
|
|
@@ -7390,20 +7390,20 @@ const cc = /* @__PURE__ */ new Map([
|
|
|
7390
7390
|
}
|
|
7391
7391
|
indexRelations(t, s, i, n) {
|
|
7392
7392
|
const r = Object.keys(s).find(
|
|
7393
|
-
(
|
|
7393
|
+
(u) => u.startsWith("Relating")
|
|
7394
7394
|
), o = Object.keys(s).find(
|
|
7395
|
-
(
|
|
7395
|
+
(u) => u.startsWith("Related")
|
|
7396
7396
|
);
|
|
7397
7397
|
if (!(r && o))
|
|
7398
7398
|
return;
|
|
7399
|
-
const a = s[r].value, l = s[o].map((
|
|
7400
|
-
|
|
7401
|
-
for (const
|
|
7402
|
-
const f = t.get(
|
|
7399
|
+
const a = s[r].value, l = s[o].map((u) => u.value), h = t.get(a) ?? /* @__PURE__ */ new Map(), d = this.getAttributeIndex(n);
|
|
7400
|
+
d !== null && (h.set(d, l), t.set(a, h));
|
|
7401
|
+
for (const u of l) {
|
|
7402
|
+
const f = t.get(u) ?? /* @__PURE__ */ new Map(), E = this.getAttributeIndex(i);
|
|
7403
7403
|
if (!E)
|
|
7404
7404
|
continue;
|
|
7405
7405
|
const p = f.get(E) ?? [];
|
|
7406
|
-
p.push(a), f.set(E, p), t.set(
|
|
7406
|
+
p.push(a), f.set(E, p), t.set(u, f);
|
|
7407
7407
|
}
|
|
7408
7408
|
}
|
|
7409
7409
|
getAttributeIndex(t) {
|
|
@@ -7478,11 +7478,11 @@ const cc = /* @__PURE__ */ new Map([
|
|
|
7478
7478
|
continue;
|
|
7479
7479
|
const { forRelated: o, forRelating: a } = r, l = t.GetLineIDsWithType(s, n);
|
|
7480
7480
|
for (let h = 0; h < l.size(); h++) {
|
|
7481
|
-
const
|
|
7481
|
+
const d = await t.properties.getItemProperties(
|
|
7482
7482
|
s,
|
|
7483
7483
|
l.get(h)
|
|
7484
7484
|
);
|
|
7485
|
-
this.indexRelations(i,
|
|
7485
|
+
this.indexRelations(i, d, o, a);
|
|
7486
7486
|
}
|
|
7487
7487
|
}
|
|
7488
7488
|
return this.onRelationsIndexed.trigger({
|
|
@@ -7760,8 +7760,8 @@ const Ei = class Ei extends Ft {
|
|
|
7760
7760
|
load(t, s) {
|
|
7761
7761
|
const n = { ...{ coordinate: !0 }, ...s }, { coordinate: r, name: o, properties: a, relationsMap: l } = n, h = this._loader.import(t);
|
|
7762
7762
|
s && (h.isStreamed = s.isStreamed || !1), o && (h.name = o);
|
|
7763
|
-
for (const
|
|
7764
|
-
|
|
7763
|
+
for (const d of h.items)
|
|
7764
|
+
d.group = h, this.list.set(d.id, d);
|
|
7765
7765
|
return r && this.coordinate([h]), this.groups.set(h.uuid, h), a && h.setLocalProperties(a), l && this.components.get(Je).setRelationMap(h, l), this.onFragmentsLoaded.trigger(h), h;
|
|
7766
7766
|
}
|
|
7767
7767
|
/**
|
|
@@ -7915,13 +7915,13 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
7915
7915
|
function r(l, h) {
|
|
7916
7916
|
if (!i[l]) {
|
|
7917
7917
|
if (!s[l]) {
|
|
7918
|
-
var
|
|
7919
|
-
if (!h &&
|
|
7920
|
-
return
|
|
7918
|
+
var d = typeof ni == "function" && ni;
|
|
7919
|
+
if (!h && d)
|
|
7920
|
+
return d(l, !0);
|
|
7921
7921
|
if (o)
|
|
7922
7922
|
return o(l, !0);
|
|
7923
|
-
var
|
|
7924
|
-
throw
|
|
7923
|
+
var u = new Error("Cannot find module '" + l + "'");
|
|
7924
|
+
throw u.code = "MODULE_NOT_FOUND", u;
|
|
7925
7925
|
}
|
|
7926
7926
|
var f = i[l] = { exports: {} };
|
|
7927
7927
|
s[l][0].call(f.exports, function(E) {
|
|
@@ -7937,35 +7937,35 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
7937
7937
|
}({ 1: [function(t, s, i) {
|
|
7938
7938
|
var n = t("./utils"), r = t("./support"), o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
7939
7939
|
i.encode = function(a) {
|
|
7940
|
-
for (var l, h,
|
|
7941
|
-
y = _ - m,
|
|
7940
|
+
for (var l, h, d, u, f, E, p, I = [], m = 0, _ = a.length, y = _, C = n.getTypeOf(a) !== "string"; m < a.length; )
|
|
7941
|
+
y = _ - m, d = C ? (l = a[m++], h = m < _ ? a[m++] : 0, m < _ ? a[m++] : 0) : (l = a.charCodeAt(m++), h = m < _ ? a.charCodeAt(m++) : 0, m < _ ? a.charCodeAt(m++) : 0), u = l >> 2, f = (3 & l) << 4 | h >> 4, E = 1 < y ? (15 & h) << 2 | d >> 6 : 64, p = 2 < y ? 63 & d : 64, I.push(o.charAt(u) + o.charAt(f) + o.charAt(E) + o.charAt(p));
|
|
7942
7942
|
return I.join("");
|
|
7943
7943
|
}, i.decode = function(a) {
|
|
7944
|
-
var l, h,
|
|
7944
|
+
var l, h, d, u, f, E, p = 0, I = 0, m = "data:";
|
|
7945
7945
|
if (a.substr(0, m.length) === m)
|
|
7946
7946
|
throw new Error("Invalid base64 input, it looks like a data url.");
|
|
7947
7947
|
var _, y = 3 * (a = a.replace(/[^A-Za-z0-9+/=]/g, "")).length / 4;
|
|
7948
7948
|
if (a.charAt(a.length - 1) === o.charAt(64) && y--, a.charAt(a.length - 2) === o.charAt(64) && y--, y % 1 != 0)
|
|
7949
7949
|
throw new Error("Invalid base64 input, bad content length.");
|
|
7950
7950
|
for (_ = r.uint8array ? new Uint8Array(0 | y) : new Array(0 | y); p < a.length; )
|
|
7951
|
-
l = o.indexOf(a.charAt(p++)) << 2 | (
|
|
7951
|
+
l = o.indexOf(a.charAt(p++)) << 2 | (u = o.indexOf(a.charAt(p++))) >> 4, h = (15 & u) << 4 | (f = o.indexOf(a.charAt(p++))) >> 2, d = (3 & f) << 6 | (E = o.indexOf(a.charAt(p++))), _[I++] = l, f !== 64 && (_[I++] = h), E !== 64 && (_[I++] = d);
|
|
7952
7952
|
return _;
|
|
7953
7953
|
};
|
|
7954
7954
|
}, { "./support": 30, "./utils": 32 }], 2: [function(t, s, i) {
|
|
7955
7955
|
var n = t("./external"), r = t("./stream/DataWorker"), o = t("./stream/Crc32Probe"), a = t("./stream/DataLengthProbe");
|
|
7956
|
-
function l(h,
|
|
7957
|
-
this.compressedSize = h, this.uncompressedSize =
|
|
7956
|
+
function l(h, d, u, f, E) {
|
|
7957
|
+
this.compressedSize = h, this.uncompressedSize = d, this.crc32 = u, this.compression = f, this.compressedContent = E;
|
|
7958
7958
|
}
|
|
7959
7959
|
l.prototype = { getContentWorker: function() {
|
|
7960
|
-
var h = new r(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),
|
|
7960
|
+
var h = new r(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")), d = this;
|
|
7961
7961
|
return h.on("end", function() {
|
|
7962
|
-
if (this.streamInfo.data_length !==
|
|
7962
|
+
if (this.streamInfo.data_length !== d.uncompressedSize)
|
|
7963
7963
|
throw new Error("Bug : uncompressed data size mismatch");
|
|
7964
7964
|
}), h;
|
|
7965
7965
|
}, getCompressedWorker: function() {
|
|
7966
7966
|
return new r(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize", this.compressedSize).withStreamInfo("uncompressedSize", this.uncompressedSize).withStreamInfo("crc32", this.crc32).withStreamInfo("compression", this.compression);
|
|
7967
|
-
} }, l.createWorkerFrom = function(h,
|
|
7968
|
-
return h.pipe(new o()).pipe(new a("uncompressedSize")).pipe(
|
|
7967
|
+
} }, l.createWorkerFrom = function(h, d, u) {
|
|
7968
|
+
return h.pipe(new o()).pipe(new a("uncompressedSize")).pipe(d.compressWorker(u)).pipe(new a("compressedSize")).withStreamInfo("compression", d);
|
|
7969
7969
|
}, s.exports = l;
|
|
7970
7970
|
}, { "./external": 6, "./stream/Crc32Probe": 25, "./stream/DataLengthProbe": 26, "./stream/DataWorker": 27 }], 3: [function(t, s, i) {
|
|
7971
7971
|
var n = t("./stream/GenericWorker");
|
|
@@ -7985,16 +7985,16 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
7985
7985
|
return a;
|
|
7986
7986
|
}();
|
|
7987
7987
|
s.exports = function(o, a) {
|
|
7988
|
-
return o !== void 0 && o.length ? n.getTypeOf(o) !== "string" ? function(l, h,
|
|
7989
|
-
var f = r, E =
|
|
7988
|
+
return o !== void 0 && o.length ? n.getTypeOf(o) !== "string" ? function(l, h, d, u) {
|
|
7989
|
+
var f = r, E = u + d;
|
|
7990
7990
|
l ^= -1;
|
|
7991
|
-
for (var p =
|
|
7991
|
+
for (var p = u; p < E; p++)
|
|
7992
7992
|
l = l >>> 8 ^ f[255 & (l ^ h[p])];
|
|
7993
7993
|
return -1 ^ l;
|
|
7994
|
-
}(0 | a, o, o.length, 0) : function(l, h,
|
|
7995
|
-
var f = r, E =
|
|
7994
|
+
}(0 | a, o, o.length, 0) : function(l, h, d, u) {
|
|
7995
|
+
var f = r, E = u + d;
|
|
7996
7996
|
l ^= -1;
|
|
7997
|
-
for (var p =
|
|
7997
|
+
for (var p = u; p < E; p++)
|
|
7998
7998
|
l = l >>> 8 ^ f[255 & (l ^ h.charCodeAt(p))];
|
|
7999
7999
|
return -1 ^ l;
|
|
8000
8000
|
}(0 | a, o, o.length, 0) : 0;
|
|
@@ -8006,23 +8006,23 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
8006
8006
|
n = typeof Promise < "u" ? Promise : t("lie"), s.exports = { Promise: n };
|
|
8007
8007
|
}, { lie: 37 }], 7: [function(t, s, i) {
|
|
8008
8008
|
var n = typeof Uint8Array < "u" && typeof Uint16Array < "u" && typeof Uint32Array < "u", r = t("pako"), o = t("./utils"), a = t("./stream/GenericWorker"), l = n ? "uint8array" : "array";
|
|
8009
|
-
function h(
|
|
8010
|
-
a.call(this, "FlateWorker/" +
|
|
8009
|
+
function h(d, u) {
|
|
8010
|
+
a.call(this, "FlateWorker/" + d), this._pako = null, this._pakoAction = d, this._pakoOptions = u, this.meta = {};
|
|
8011
8011
|
}
|
|
8012
|
-
i.magic = "\b\0", o.inherits(h, a), h.prototype.processChunk = function(
|
|
8013
|
-
this.meta =
|
|
8012
|
+
i.magic = "\b\0", o.inherits(h, a), h.prototype.processChunk = function(d) {
|
|
8013
|
+
this.meta = d.meta, this._pako === null && this._createPako(), this._pako.push(o.transformTo(l, d.data), !1);
|
|
8014
8014
|
}, h.prototype.flush = function() {
|
|
8015
8015
|
a.prototype.flush.call(this), this._pako === null && this._createPako(), this._pako.push([], !0);
|
|
8016
8016
|
}, h.prototype.cleanUp = function() {
|
|
8017
8017
|
a.prototype.cleanUp.call(this), this._pako = null;
|
|
8018
8018
|
}, h.prototype._createPako = function() {
|
|
8019
8019
|
this._pako = new r[this._pakoAction]({ raw: !0, level: this._pakoOptions.level || -1 });
|
|
8020
|
-
var
|
|
8021
|
-
this._pako.onData = function(
|
|
8022
|
-
|
|
8020
|
+
var d = this;
|
|
8021
|
+
this._pako.onData = function(u) {
|
|
8022
|
+
d.push({ data: u, meta: d.meta });
|
|
8023
8023
|
};
|
|
8024
|
-
}, i.compressWorker = function(
|
|
8025
|
-
return new h("Deflate",
|
|
8024
|
+
}, i.compressWorker = function(d) {
|
|
8025
|
+
return new h("Deflate", d);
|
|
8026
8026
|
}, i.uncompressWorker = function() {
|
|
8027
8027
|
return new h("Inflate", {});
|
|
8028
8028
|
};
|
|
@@ -8047,16 +8047,16 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
8047
8047
|
}(R.dosPermissions)), y = H.getUTCHours(), y <<= 6, y |= H.getUTCMinutes(), y <<= 5, y |= H.getUTCSeconds() / 2, C = H.getUTCFullYear() - 1980, C <<= 4, C |= H.getUTCMonth() + 1, C <<= 5, C |= H.getUTCDate(), P && (j = n(1, 1) + n(h(L), 4) + N, M += "up" + n(j.length, 2) + j), T && (V = n(1, 1) + n(h(k), 4) + w, M += "uc" + n(V.length, 2) + V);
|
|
8048
8048
|
var st = "";
|
|
8049
8049
|
return st += `
|
|
8050
|
-
\0`, st += n(z, 2), st += F.magic, st += n(y, 2), st += n(C, 2), st += n(nt.crc32, 4), st += n(nt.compressedSize, 4), st += n(nt.uncompressedSize, 4), st += n(L.length, 2), st += n(M.length, 2), { fileRecord:
|
|
8050
|
+
\0`, st += n(z, 2), st += F.magic, st += n(y, 2), st += n(C, 2), st += n(nt.crc32, 4), st += n(nt.compressedSize, 4), st += n(nt.uncompressedSize, 4), st += n(L.length, 2), st += n(M.length, 2), { fileRecord: d.LOCAL_FILE_HEADER + st + L + M, dirRecord: d.CENTRAL_FILE_HEADER + n(ot, 2) + st + n(k.length, 2) + "\0\0\0\0" + n(U, 4) + n(I, 4) + L + M + k };
|
|
8051
8051
|
}
|
|
8052
|
-
var o = t("../utils"), a = t("../stream/GenericWorker"), l = t("../utf8"), h = t("../crc32"),
|
|
8053
|
-
function
|
|
8052
|
+
var o = t("../utils"), a = t("../stream/GenericWorker"), l = t("../utf8"), h = t("../crc32"), d = t("../signature");
|
|
8053
|
+
function u(f, E, p, I) {
|
|
8054
8054
|
a.call(this, "ZipFileWorker"), this.bytesWritten = 0, this.zipComment = E, this.zipPlatform = p, this.encodeFileName = I, this.streamFiles = f, this.accumulate = !1, this.contentBuffer = [], this.dirRecords = [], this.currentSourceOffset = 0, this.entriesCount = 0, this.currentFile = null, this._sources = [];
|
|
8055
8055
|
}
|
|
8056
|
-
o.inherits(
|
|
8056
|
+
o.inherits(u, a), u.prototype.push = function(f) {
|
|
8057
8057
|
var E = f.meta.percent || 0, p = this.entriesCount, I = this._sources.length;
|
|
8058
8058
|
this.accumulate ? this.contentBuffer.push(f) : (this.bytesWritten += f.data.length, a.prototype.push.call(this, { data: f.data, meta: { currentFile: this.currentFile, percent: p ? (E + 100 * (p - I - 1)) / p : 100 } }));
|
|
8059
|
-
},
|
|
8059
|
+
}, u.prototype.openedSource = function(f) {
|
|
8060
8060
|
this.currentSourceOffset = this.bytesWritten, this.currentFile = f.file.name;
|
|
8061
8061
|
var E = this.streamFiles && !f.file.dir;
|
|
8062
8062
|
if (E) {
|
|
@@ -8064,28 +8064,28 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
8064
8064
|
this.push({ data: p.fileRecord, meta: { percent: 0 } });
|
|
8065
8065
|
} else
|
|
8066
8066
|
this.accumulate = !0;
|
|
8067
|
-
},
|
|
8067
|
+
}, u.prototype.closedSource = function(f) {
|
|
8068
8068
|
this.accumulate = !1;
|
|
8069
8069
|
var E = this.streamFiles && !f.file.dir, p = r(f, E, !0, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
|
|
8070
8070
|
if (this.dirRecords.push(p.dirRecord), E)
|
|
8071
8071
|
this.push({ data: function(I) {
|
|
8072
|
-
return
|
|
8072
|
+
return d.DATA_DESCRIPTOR + n(I.crc32, 4) + n(I.compressedSize, 4) + n(I.uncompressedSize, 4);
|
|
8073
8073
|
}(f), meta: { percent: 100 } });
|
|
8074
8074
|
else
|
|
8075
8075
|
for (this.push({ data: p.fileRecord, meta: { percent: 0 } }); this.contentBuffer.length; )
|
|
8076
8076
|
this.push(this.contentBuffer.shift());
|
|
8077
8077
|
this.currentFile = null;
|
|
8078
|
-
},
|
|
8078
|
+
}, u.prototype.flush = function() {
|
|
8079
8079
|
for (var f = this.bytesWritten, E = 0; E < this.dirRecords.length; E++)
|
|
8080
8080
|
this.push({ data: this.dirRecords[E], meta: { percent: 100 } });
|
|
8081
8081
|
var p = this.bytesWritten - f, I = function(m, _, y, C, R) {
|
|
8082
8082
|
var F = o.transformTo("string", R(C));
|
|
8083
|
-
return
|
|
8083
|
+
return d.CENTRAL_DIRECTORY_END + "\0\0\0\0" + n(m, 2) + n(m, 2) + n(_, 4) + n(y, 4) + n(F.length, 2) + F;
|
|
8084
8084
|
}(this.dirRecords.length, p, f, this.zipComment, this.encodeFileName);
|
|
8085
8085
|
this.push({ data: I, meta: { percent: 100 } });
|
|
8086
|
-
},
|
|
8086
|
+
}, u.prototype.prepareNextSource = function() {
|
|
8087
8087
|
this.previous = this._sources.shift(), this.openedSource(this.previous.streamInfo), this.isPaused ? this.previous.pause() : this.previous.resume();
|
|
8088
|
-
},
|
|
8088
|
+
}, u.prototype.registerPrevious = function(f) {
|
|
8089
8089
|
this._sources.push(f);
|
|
8090
8090
|
var E = this;
|
|
8091
8091
|
return f.on("data", function(p) {
|
|
@@ -8095,9 +8095,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
8095
8095
|
}), f.on("error", function(p) {
|
|
8096
8096
|
E.error(p);
|
|
8097
8097
|
}), this;
|
|
8098
|
-
},
|
|
8098
|
+
}, u.prototype.resume = function() {
|
|
8099
8099
|
return !!a.prototype.resume.call(this) && (!this.previous && this._sources.length ? (this.prepareNextSource(), !0) : this.previous || this._sources.length || this.generatedError ? void 0 : (this.end(), !0));
|
|
8100
|
-
},
|
|
8100
|
+
}, u.prototype.error = function(f) {
|
|
8101
8101
|
var E = this._sources;
|
|
8102
8102
|
if (!a.prototype.error.call(this, f))
|
|
8103
8103
|
return !1;
|
|
@@ -8107,28 +8107,28 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
8107
8107
|
} catch {
|
|
8108
8108
|
}
|
|
8109
8109
|
return !0;
|
|
8110
|
-
},
|
|
8110
|
+
}, u.prototype.lock = function() {
|
|
8111
8111
|
a.prototype.lock.call(this);
|
|
8112
8112
|
for (var f = this._sources, E = 0; E < f.length; E++)
|
|
8113
8113
|
f[E].lock();
|
|
8114
|
-
}, s.exports =
|
|
8114
|
+
}, s.exports = u;
|
|
8115
8115
|
}, { "../crc32": 4, "../signature": 23, "../stream/GenericWorker": 28, "../utf8": 31, "../utils": 32 }], 9: [function(t, s, i) {
|
|
8116
8116
|
var n = t("../compressions"), r = t("./ZipFileWorker");
|
|
8117
8117
|
i.generateWorker = function(o, a, l) {
|
|
8118
|
-
var h = new r(a.streamFiles, l, a.platform, a.encodeFileName),
|
|
8118
|
+
var h = new r(a.streamFiles, l, a.platform, a.encodeFileName), d = 0;
|
|
8119
8119
|
try {
|
|
8120
|
-
o.forEach(function(
|
|
8121
|
-
|
|
8120
|
+
o.forEach(function(u, f) {
|
|
8121
|
+
d++;
|
|
8122
8122
|
var E = function(_, y) {
|
|
8123
8123
|
var C = _ || y, R = n[C];
|
|
8124
8124
|
if (!R)
|
|
8125
8125
|
throw new Error(C + " is not a valid compression method !");
|
|
8126
8126
|
return R;
|
|
8127
8127
|
}(f.options.compression, a.compression), p = f.options.compressionOptions || a.compressionOptions || {}, I = f.dir, m = f.date;
|
|
8128
|
-
f._compressWorker(E, p).withStreamInfo("file", { name:
|
|
8129
|
-
}), h.entriesCount =
|
|
8130
|
-
} catch (
|
|
8131
|
-
h.error(
|
|
8128
|
+
f._compressWorker(E, p).withStreamInfo("file", { name: u, dir: I, date: m, comment: f.comment || "", unixPermissions: f.unixPermissions, dosPermissions: f.dosPermissions }).pipe(h);
|
|
8129
|
+
}), h.entriesCount = d;
|
|
8130
|
+
} catch (u) {
|
|
8131
|
+
h.error(u);
|
|
8132
8132
|
}
|
|
8133
8133
|
return h;
|
|
8134
8134
|
};
|
|
@@ -8150,26 +8150,26 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
8150
8150
|
}, n.external = t("./external"), s.exports = n;
|
|
8151
8151
|
}, { "./defaults": 5, "./external": 6, "./load": 11, "./object": 15, "./support": 30 }], 11: [function(t, s, i) {
|
|
8152
8152
|
var n = t("./utils"), r = t("./external"), o = t("./utf8"), a = t("./zipEntries"), l = t("./stream/Crc32Probe"), h = t("./nodejsUtils");
|
|
8153
|
-
function u
|
|
8153
|
+
function d(u) {
|
|
8154
8154
|
return new r.Promise(function(f, E) {
|
|
8155
|
-
var p =
|
|
8155
|
+
var p = u.decompressed.getContentWorker().pipe(new l());
|
|
8156
8156
|
p.on("error", function(I) {
|
|
8157
8157
|
E(I);
|
|
8158
8158
|
}).on("end", function() {
|
|
8159
|
-
p.streamInfo.crc32 !==
|
|
8159
|
+
p.streamInfo.crc32 !== u.decompressed.crc32 ? E(new Error("Corrupted zip : CRC32 mismatch")) : f();
|
|
8160
8160
|
}).resume();
|
|
8161
8161
|
});
|
|
8162
8162
|
}
|
|
8163
|
-
s.exports = function(
|
|
8163
|
+
s.exports = function(u, f) {
|
|
8164
8164
|
var E = this;
|
|
8165
|
-
return f = n.extend(f || {}, { base64: !1, checkCRC32: !1, optimizedBinaryString: !1, createFolders: !1, decodeFileName: o.utf8decode }), h.isNode && h.isStream(
|
|
8165
|
+
return f = n.extend(f || {}, { base64: !1, checkCRC32: !1, optimizedBinaryString: !1, createFolders: !1, decodeFileName: o.utf8decode }), h.isNode && h.isStream(u) ? r.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")) : n.prepareContent("the loaded zip file", u, !0, f.optimizedBinaryString, f.base64).then(function(p) {
|
|
8166
8166
|
var I = new a(f);
|
|
8167
8167
|
return I.load(p), I;
|
|
8168
8168
|
}).then(function(p) {
|
|
8169
8169
|
var I = [r.Promise.resolve(p)], m = p.files;
|
|
8170
8170
|
if (f.checkCRC32)
|
|
8171
8171
|
for (var _ = 0; _ < m.length; _++)
|
|
8172
|
-
I.push(
|
|
8172
|
+
I.push(d(m[_]));
|
|
8173
8173
|
return r.Promise.all(I);
|
|
8174
8174
|
}).then(function(p) {
|
|
8175
8175
|
for (var I = p.shift(), m = I.files, _ = 0; _ < m.length; _++) {
|
|
@@ -8203,10 +8203,10 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
8203
8203
|
function r(o, a, l) {
|
|
8204
8204
|
n.call(this, a), this._helper = o;
|
|
8205
8205
|
var h = this;
|
|
8206
|
-
o.on("data", function(
|
|
8207
|
-
h.push(
|
|
8208
|
-
}).on("error", function(
|
|
8209
|
-
h.emit("error",
|
|
8206
|
+
o.on("data", function(d, u) {
|
|
8207
|
+
h.push(d) || h._helper.pause(), l && l(u);
|
|
8208
|
+
}).on("error", function(d) {
|
|
8209
|
+
h.emit("error", d);
|
|
8210
8210
|
}).on("end", function() {
|
|
8211
8211
|
h.push(null);
|
|
8212
8212
|
});
|
|
@@ -8236,13 +8236,13 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
8236
8236
|
var L, N = o.getTypeOf(F), x = o.extend(O || {}, h);
|
|
8237
8237
|
x.date = x.date || /* @__PURE__ */ new Date(), x.compression !== null && (x.compression = x.compression.toUpperCase()), typeof x.unixPermissions == "string" && (x.unixPermissions = parseInt(x.unixPermissions, 8)), x.unixPermissions && 16384 & x.unixPermissions && (x.dir = !0), x.dosPermissions && 16 & x.dosPermissions && (x.dir = !0), x.dir && (R = m(R)), x.createFolders && (L = I(R)) && _.call(this, L, !0);
|
|
8238
8238
|
var k = N === "string" && x.binary === !1 && x.base64 === !1;
|
|
8239
|
-
O && O.binary !== void 0 || (x.binary = !k), (F instanceof
|
|
8239
|
+
O && O.binary !== void 0 || (x.binary = !k), (F instanceof d && F.uncompressedSize === 0 || x.dir || !F || F.length === 0) && (x.base64 = !1, x.binary = !0, F = "", x.compression = "STORE", N = "string");
|
|
8240
8240
|
var w = null;
|
|
8241
|
-
w = F instanceof
|
|
8242
|
-
var P = new
|
|
8241
|
+
w = F instanceof d || F instanceof a ? F : E.isNode && E.isStream(F) ? new p(R, F) : o.prepareContent(R, F, x.binary, x.optimizedBinaryString, x.base64);
|
|
8242
|
+
var P = new u(R, w, x);
|
|
8243
8243
|
this.files[R] = P;
|
|
8244
8244
|
}
|
|
8245
|
-
var r = t("./utf8"), o = t("./utils"), a = t("./stream/GenericWorker"), l = t("./stream/StreamHelper"), h = t("./defaults"),
|
|
8245
|
+
var r = t("./utf8"), o = t("./utils"), a = t("./stream/GenericWorker"), l = t("./stream/StreamHelper"), h = t("./defaults"), d = t("./compressedObject"), u = t("./zipObject"), f = t("./generate"), E = t("./nodejsUtils"), p = t("./nodejs/NodejsStreamInputAdapter"), I = function(R) {
|
|
8246
8246
|
R.slice(-1) === "/" && (R = R.substring(0, R.length - 1));
|
|
8247
8247
|
var F = R.lastIndexOf("/");
|
|
8248
8248
|
return 0 < F ? R.substring(0, F) : "";
|
|
@@ -8328,13 +8328,13 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
8328
8328
|
t("../utils").inherits(r, n), r.prototype.byteAt = function(o) {
|
|
8329
8329
|
return this.data[this.zero + o];
|
|
8330
8330
|
}, r.prototype.lastIndexOfSignature = function(o) {
|
|
8331
|
-
for (var a = o.charCodeAt(0), l = o.charCodeAt(1), h = o.charCodeAt(2),
|
|
8332
|
-
if (this.data[
|
|
8333
|
-
return
|
|
8331
|
+
for (var a = o.charCodeAt(0), l = o.charCodeAt(1), h = o.charCodeAt(2), d = o.charCodeAt(3), u = this.length - 4; 0 <= u; --u)
|
|
8332
|
+
if (this.data[u] === a && this.data[u + 1] === l && this.data[u + 2] === h && this.data[u + 3] === d)
|
|
8333
|
+
return u - this.zero;
|
|
8334
8334
|
return -1;
|
|
8335
8335
|
}, r.prototype.readAndCheckSignature = function(o) {
|
|
8336
|
-
var a = o.charCodeAt(0), l = o.charCodeAt(1), h = o.charCodeAt(2),
|
|
8337
|
-
return a ===
|
|
8336
|
+
var a = o.charCodeAt(0), l = o.charCodeAt(1), h = o.charCodeAt(2), d = o.charCodeAt(3), u = this.readData(4);
|
|
8337
|
+
return a === u[0] && l === u[1] && h === u[2] && d === u[3];
|
|
8338
8338
|
}, r.prototype.readData = function(o) {
|
|
8339
8339
|
if (this.checkOffset(o), o === 0)
|
|
8340
8340
|
return [];
|
|
@@ -8409,9 +8409,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
8409
8409
|
}, s.exports = r;
|
|
8410
8410
|
}, { "../utils": 32, "./ArrayReader": 17 }], 22: [function(t, s, i) {
|
|
8411
8411
|
var n = t("../utils"), r = t("../support"), o = t("./ArrayReader"), a = t("./StringReader"), l = t("./NodeBufferReader"), h = t("./Uint8ArrayReader");
|
|
8412
|
-
s.exports = function(
|
|
8413
|
-
var
|
|
8414
|
-
return n.checkSupport(
|
|
8412
|
+
s.exports = function(d) {
|
|
8413
|
+
var u = n.getTypeOf(d);
|
|
8414
|
+
return n.checkSupport(u), u !== "string" || r.uint8array ? u === "nodebuffer" ? new l(d) : r.uint8array ? new h(n.transformTo("uint8array", d)) : new o(n.transformTo("array", d)) : new a(d);
|
|
8415
8415
|
};
|
|
8416
8416
|
}, { "../support": 30, "../utils": 32, "./ArrayReader": 17, "./NodeBufferReader": 19, "./StringReader": 20, "./Uint8ArrayReader": 21 }], 23: [function(t, s, i) {
|
|
8417
8417
|
i.LOCAL_FILE_HEADER = "PK", i.CENTRAL_FILE_HEADER = "PK", i.CENTRAL_DIRECTORY_END = "PK", i.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x07", i.ZIP64_CENTRAL_DIRECTORY_END = "PK", i.DATA_DESCRIPTOR = "PK\x07\b";
|
|
@@ -8543,13 +8543,13 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
8543
8543
|
return this.previous ? this.previous + " -> " + r : r;
|
|
8544
8544
|
} }, s.exports = n;
|
|
8545
8545
|
}, {}], 29: [function(t, s, i) {
|
|
8546
|
-
var n = t("../utils"), r = t("./ConvertWorker"), o = t("./GenericWorker"), a = t("../base64"), l = t("../support"), h = t("../external"),
|
|
8546
|
+
var n = t("../utils"), r = t("./ConvertWorker"), o = t("./GenericWorker"), a = t("../base64"), l = t("../support"), h = t("../external"), d = null;
|
|
8547
8547
|
if (l.nodestream)
|
|
8548
8548
|
try {
|
|
8549
|
-
|
|
8549
|
+
d = t("../nodejs/NodejsStreamOutputAdapter");
|
|
8550
8550
|
} catch {
|
|
8551
8551
|
}
|
|
8552
|
-
function
|
|
8552
|
+
function u(E, p) {
|
|
8553
8553
|
return new h.Promise(function(I, m) {
|
|
8554
8554
|
var _ = [], y = E._internalType, C = E._outputType, R = E._mimeType;
|
|
8555
8555
|
E.on("data", function(F, O) {
|
|
@@ -8611,7 +8611,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
8611
8611
|
}
|
|
8612
8612
|
}
|
|
8613
8613
|
f.prototype = { accumulate: function(E) {
|
|
8614
|
-
return
|
|
8614
|
+
return u(this, E);
|
|
8615
8615
|
}, on: function(E, p) {
|
|
8616
8616
|
var I = this;
|
|
8617
8617
|
return E === "data" ? this._worker.on(E, function(m) {
|
|
@@ -8626,7 +8626,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
8626
8626
|
}, toNodejsStream: function(E) {
|
|
8627
8627
|
if (n.checkSupport("nodestream"), this._outputType !== "nodebuffer")
|
|
8628
8628
|
throw new Error(this._outputType + " is not supported by this method");
|
|
8629
|
-
return new
|
|
8629
|
+
return new d(this, { objectMode: this._outputType !== "nodebuffer" }, E);
|
|
8630
8630
|
} }, s.exports = f;
|
|
8631
8631
|
}, { "../base64": 1, "../external": 6, "../nodejs/NodejsStreamOutputAdapter": 13, "../support": 30, "../utils": 32, "./ConvertWorker": 24, "./GenericWorker": 28 }], 30: [function(t, s, i) {
|
|
8632
8632
|
if (i.base64 = !0, i.array = !0, i.string = !0, i.arraybuffer = typeof ArrayBuffer < "u" && typeof Uint8Array < "u", i.nodebuffer = typeof Buffer < "u", i.uint8array = typeof Uint8Array < "u", typeof ArrayBuffer > "u")
|
|
@@ -8653,10 +8653,10 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
8653
8653
|
for (var n = t("./utils"), r = t("./support"), o = t("./nodejsUtils"), a = t("./stream/GenericWorker"), l = new Array(256), h = 0; h < 256; h++)
|
|
8654
8654
|
l[h] = 252 <= h ? 6 : 248 <= h ? 5 : 240 <= h ? 4 : 224 <= h ? 3 : 192 <= h ? 2 : 1;
|
|
8655
8655
|
l[254] = l[254] = 1;
|
|
8656
|
-
function
|
|
8656
|
+
function d() {
|
|
8657
8657
|
a.call(this, "utf-8 decode"), this.leftOver = null;
|
|
8658
8658
|
}
|
|
8659
|
-
function
|
|
8659
|
+
function u() {
|
|
8660
8660
|
a.call(this, "utf-8 encode");
|
|
8661
8661
|
}
|
|
8662
8662
|
i.utf8encode = function(f) {
|
|
@@ -8683,7 +8683,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
8683
8683
|
}
|
|
8684
8684
|
return C.length !== I && (C.subarray ? C = C.subarray(0, I) : C.length = I), n.applyFromCharCode(C);
|
|
8685
8685
|
}(f = n.transformTo(r.uint8array ? "uint8array" : "array", f));
|
|
8686
|
-
}, n.inherits(
|
|
8686
|
+
}, n.inherits(d, a), d.prototype.processChunk = function(f) {
|
|
8687
8687
|
var E = n.transformTo(r.uint8array ? "uint8array" : "array", f.data);
|
|
8688
8688
|
if (this.leftOver && this.leftOver.length) {
|
|
8689
8689
|
if (r.uint8array) {
|
|
@@ -8700,11 +8700,11 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
8700
8700
|
return C < 0 || C === 0 ? y : C + l[_[C]] > y ? C : y;
|
|
8701
8701
|
}(E), m = E;
|
|
8702
8702
|
I !== E.length && (r.uint8array ? (m = E.subarray(0, I), this.leftOver = E.subarray(I, E.length)) : (m = E.slice(0, I), this.leftOver = E.slice(I, E.length))), this.push({ data: i.utf8decode(m), meta: f.meta });
|
|
8703
|
-
},
|
|
8703
|
+
}, d.prototype.flush = function() {
|
|
8704
8704
|
this.leftOver && this.leftOver.length && (this.push({ data: i.utf8decode(this.leftOver), meta: {} }), this.leftOver = null);
|
|
8705
|
-
}, i.Utf8DecodeWorker =
|
|
8705
|
+
}, i.Utf8DecodeWorker = d, n.inherits(u, a), u.prototype.processChunk = function(f) {
|
|
8706
8706
|
this.push({ data: i.utf8encode(f.data), meta: f.meta });
|
|
8707
|
-
}, i.Utf8EncodeWorker =
|
|
8707
|
+
}, i.Utf8EncodeWorker = u;
|
|
8708
8708
|
}, { "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./support": 30, "./utils": 32 }], 32: [function(t, s, i) {
|
|
8709
8709
|
var n = t("./support"), r = t("./base64"), o = t("./nodejsUtils"), a = t("./external");
|
|
8710
8710
|
function l(p) {
|
|
@@ -8728,7 +8728,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
8728
8728
|
}
|
|
8729
8729
|
}
|
|
8730
8730
|
};
|
|
8731
|
-
var
|
|
8731
|
+
var d = { stringifyByChunk: function(p, I, m) {
|
|
8732
8732
|
var _ = [], y = 0, C = p.length;
|
|
8733
8733
|
if (C <= m)
|
|
8734
8734
|
return String.fromCharCode.apply(null, p);
|
|
@@ -8752,23 +8752,23 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
8752
8752
|
return !1;
|
|
8753
8753
|
}
|
|
8754
8754
|
}() } };
|
|
8755
|
-
function
|
|
8755
|
+
function u(p) {
|
|
8756
8756
|
var I = 65536, m = i.getTypeOf(p), _ = !0;
|
|
8757
|
-
if (m === "uint8array" ? _ =
|
|
8757
|
+
if (m === "uint8array" ? _ = d.applyCanBeUsed.uint8array : m === "nodebuffer" && (_ = d.applyCanBeUsed.nodebuffer), _)
|
|
8758
8758
|
for (; 1 < I; )
|
|
8759
8759
|
try {
|
|
8760
|
-
return
|
|
8760
|
+
return d.stringifyByChunk(p, m, I);
|
|
8761
8761
|
} catch {
|
|
8762
8762
|
I = Math.floor(I / 2);
|
|
8763
8763
|
}
|
|
8764
|
-
return
|
|
8764
|
+
return d.stringifyByChar(p);
|
|
8765
8765
|
}
|
|
8766
8766
|
function f(p, I) {
|
|
8767
8767
|
for (var m = 0; m < p.length; m++)
|
|
8768
8768
|
I[m] = p[m];
|
|
8769
8769
|
return I;
|
|
8770
8770
|
}
|
|
8771
|
-
i.applyFromCharCode =
|
|
8771
|
+
i.applyFromCharCode = u;
|
|
8772
8772
|
var E = {};
|
|
8773
8773
|
E.string = { string: l, array: function(p) {
|
|
8774
8774
|
return h(p, new Array(p.length));
|
|
@@ -8778,27 +8778,27 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
8778
8778
|
return h(p, new Uint8Array(p.length));
|
|
8779
8779
|
}, nodebuffer: function(p) {
|
|
8780
8780
|
return h(p, o.allocBuffer(p.length));
|
|
8781
|
-
} }, E.array = { string:
|
|
8781
|
+
} }, E.array = { string: u, array: l, arraybuffer: function(p) {
|
|
8782
8782
|
return new Uint8Array(p).buffer;
|
|
8783
8783
|
}, uint8array: function(p) {
|
|
8784
8784
|
return new Uint8Array(p);
|
|
8785
8785
|
}, nodebuffer: function(p) {
|
|
8786
8786
|
return o.newBufferFrom(p);
|
|
8787
8787
|
} }, E.arraybuffer = { string: function(p) {
|
|
8788
|
-
return
|
|
8788
|
+
return u(new Uint8Array(p));
|
|
8789
8789
|
}, array: function(p) {
|
|
8790
8790
|
return f(new Uint8Array(p), new Array(p.byteLength));
|
|
8791
8791
|
}, arraybuffer: l, uint8array: function(p) {
|
|
8792
8792
|
return new Uint8Array(p);
|
|
8793
8793
|
}, nodebuffer: function(p) {
|
|
8794
8794
|
return o.newBufferFrom(new Uint8Array(p));
|
|
8795
|
-
} }, E.uint8array = { string:
|
|
8795
|
+
} }, E.uint8array = { string: u, array: function(p) {
|
|
8796
8796
|
return f(p, new Array(p.length));
|
|
8797
8797
|
}, arraybuffer: function(p) {
|
|
8798
8798
|
return p.buffer;
|
|
8799
8799
|
}, uint8array: l, nodebuffer: function(p) {
|
|
8800
8800
|
return o.newBufferFrom(p);
|
|
8801
|
-
} }, E.nodebuffer = { string:
|
|
8801
|
+
} }, E.nodebuffer = { string: u, array: function(p) {
|
|
8802
8802
|
return f(p, new Array(p.length));
|
|
8803
8803
|
}, arraybuffer: function(p) {
|
|
8804
8804
|
return E.nodebuffer.uint8array(p).buffer;
|
|
@@ -8859,72 +8859,72 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
8859
8859
|
};
|
|
8860
8860
|
}, { "./base64": 1, "./external": 6, "./nodejsUtils": 14, "./support": 30, setimmediate: 54 }], 33: [function(t, s, i) {
|
|
8861
8861
|
var n = t("./reader/readerFor"), r = t("./utils"), o = t("./signature"), a = t("./zipEntry"), l = t("./support");
|
|
8862
|
-
function h(
|
|
8863
|
-
this.files = [], this.loadOptions =
|
|
8862
|
+
function h(d) {
|
|
8863
|
+
this.files = [], this.loadOptions = d;
|
|
8864
8864
|
}
|
|
8865
|
-
h.prototype = { checkSignature: function(
|
|
8866
|
-
if (!this.reader.readAndCheckSignature(
|
|
8865
|
+
h.prototype = { checkSignature: function(d) {
|
|
8866
|
+
if (!this.reader.readAndCheckSignature(d)) {
|
|
8867
8867
|
this.reader.index -= 4;
|
|
8868
|
-
var
|
|
8869
|
-
throw new Error("Corrupted zip or bug: unexpected signature (" + r.pretty(
|
|
8868
|
+
var u = this.reader.readString(4);
|
|
8869
|
+
throw new Error("Corrupted zip or bug: unexpected signature (" + r.pretty(u) + ", expected " + r.pretty(d) + ")");
|
|
8870
8870
|
}
|
|
8871
|
-
}, isSignature: function(
|
|
8871
|
+
}, isSignature: function(d, u) {
|
|
8872
8872
|
var f = this.reader.index;
|
|
8873
|
-
this.reader.setIndex(
|
|
8874
|
-
var E = this.reader.readString(4) ===
|
|
8873
|
+
this.reader.setIndex(d);
|
|
8874
|
+
var E = this.reader.readString(4) === u;
|
|
8875
8875
|
return this.reader.setIndex(f), E;
|
|
8876
8876
|
}, readBlockEndOfCentral: function() {
|
|
8877
8877
|
this.diskNumber = this.reader.readInt(2), this.diskWithCentralDirStart = this.reader.readInt(2), this.centralDirRecordsOnThisDisk = this.reader.readInt(2), this.centralDirRecords = this.reader.readInt(2), this.centralDirSize = this.reader.readInt(4), this.centralDirOffset = this.reader.readInt(4), this.zipCommentLength = this.reader.readInt(2);
|
|
8878
|
-
var
|
|
8878
|
+
var d = this.reader.readData(this.zipCommentLength), u = l.uint8array ? "uint8array" : "array", f = r.transformTo(u, d);
|
|
8879
8879
|
this.zipComment = this.loadOptions.decodeFileName(f);
|
|
8880
8880
|
}, readBlockZip64EndOfCentral: function() {
|
|
8881
8881
|
this.zip64EndOfCentralSize = this.reader.readInt(8), this.reader.skip(4), this.diskNumber = this.reader.readInt(4), this.diskWithCentralDirStart = this.reader.readInt(4), this.centralDirRecordsOnThisDisk = this.reader.readInt(8), this.centralDirRecords = this.reader.readInt(8), this.centralDirSize = this.reader.readInt(8), this.centralDirOffset = this.reader.readInt(8), this.zip64ExtensibleData = {};
|
|
8882
|
-
for (var
|
|
8883
|
-
|
|
8882
|
+
for (var d, u, f, E = this.zip64EndOfCentralSize - 44; 0 < E; )
|
|
8883
|
+
d = this.reader.readInt(2), u = this.reader.readInt(4), f = this.reader.readData(u), this.zip64ExtensibleData[d] = { id: d, length: u, value: f };
|
|
8884
8884
|
}, readBlockZip64EndOfCentralLocator: function() {
|
|
8885
8885
|
if (this.diskWithZip64CentralDirStart = this.reader.readInt(4), this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8), this.disksCount = this.reader.readInt(4), 1 < this.disksCount)
|
|
8886
8886
|
throw new Error("Multi-volumes zip are not supported");
|
|
8887
8887
|
}, readLocalFiles: function() {
|
|
8888
|
-
var
|
|
8889
|
-
for (
|
|
8890
|
-
|
|
8888
|
+
var d, u;
|
|
8889
|
+
for (d = 0; d < this.files.length; d++)
|
|
8890
|
+
u = this.files[d], this.reader.setIndex(u.localHeaderOffset), this.checkSignature(o.LOCAL_FILE_HEADER), u.readLocalPart(this.reader), u.handleUTF8(), u.processAttributes();
|
|
8891
8891
|
}, readCentralDir: function() {
|
|
8892
|
-
var
|
|
8892
|
+
var d;
|
|
8893
8893
|
for (this.reader.setIndex(this.centralDirOffset); this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER); )
|
|
8894
|
-
(
|
|
8894
|
+
(d = new a({ zip64: this.zip64 }, this.loadOptions)).readCentralPart(this.reader), this.files.push(d);
|
|
8895
8895
|
if (this.centralDirRecords !== this.files.length && this.centralDirRecords !== 0 && this.files.length === 0)
|
|
8896
8896
|
throw new Error("Corrupted zip or bug: expected " + this.centralDirRecords + " records in central dir, got " + this.files.length);
|
|
8897
8897
|
}, readEndOfCentral: function() {
|
|
8898
|
-
var
|
|
8899
|
-
if (
|
|
8898
|
+
var d = this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);
|
|
8899
|
+
if (d < 0)
|
|
8900
8900
|
throw this.isSignature(0, o.LOCAL_FILE_HEADER) ? new Error("Corrupted zip: can't find end of central directory") : new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");
|
|
8901
|
-
this.reader.setIndex(
|
|
8902
|
-
var
|
|
8901
|
+
this.reader.setIndex(d);
|
|
8902
|
+
var u = d;
|
|
8903
8903
|
if (this.checkSignature(o.CENTRAL_DIRECTORY_END), this.readBlockEndOfCentral(), this.diskNumber === r.MAX_VALUE_16BITS || this.diskWithCentralDirStart === r.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === r.MAX_VALUE_16BITS || this.centralDirRecords === r.MAX_VALUE_16BITS || this.centralDirSize === r.MAX_VALUE_32BITS || this.centralDirOffset === r.MAX_VALUE_32BITS) {
|
|
8904
|
-
if (this.zip64 = !0, (
|
|
8904
|
+
if (this.zip64 = !0, (d = this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR)) < 0)
|
|
8905
8905
|
throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");
|
|
8906
|
-
if (this.reader.setIndex(
|
|
8906
|
+
if (this.reader.setIndex(d), this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR), this.readBlockZip64EndOfCentralLocator(), !this.isSignature(this.relativeOffsetEndOfZip64CentralDir, o.ZIP64_CENTRAL_DIRECTORY_END) && (this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_END), this.relativeOffsetEndOfZip64CentralDir < 0))
|
|
8907
8907
|
throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");
|
|
8908
8908
|
this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir), this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_END), this.readBlockZip64EndOfCentral();
|
|
8909
8909
|
}
|
|
8910
8910
|
var f = this.centralDirOffset + this.centralDirSize;
|
|
8911
8911
|
this.zip64 && (f += 20, f += 12 + this.zip64EndOfCentralSize);
|
|
8912
|
-
var E =
|
|
8912
|
+
var E = u - f;
|
|
8913
8913
|
if (0 < E)
|
|
8914
|
-
this.isSignature(
|
|
8914
|
+
this.isSignature(u, o.CENTRAL_FILE_HEADER) || (this.reader.zero = E);
|
|
8915
8915
|
else if (E < 0)
|
|
8916
8916
|
throw new Error("Corrupted zip: missing " + Math.abs(E) + " bytes.");
|
|
8917
|
-
}, prepareReader: function(
|
|
8918
|
-
this.reader = n(
|
|
8919
|
-
}, load: function(
|
|
8920
|
-
this.prepareReader(
|
|
8917
|
+
}, prepareReader: function(d) {
|
|
8918
|
+
this.reader = n(d);
|
|
8919
|
+
}, load: function(d) {
|
|
8920
|
+
this.prepareReader(d), this.readEndOfCentral(), this.readCentralDir(), this.readLocalFiles();
|
|
8921
8921
|
} }, s.exports = h;
|
|
8922
8922
|
}, { "./reader/readerFor": 22, "./signature": 23, "./support": 30, "./utils": 32, "./zipEntry": 34 }], 34: [function(t, s, i) {
|
|
8923
|
-
var n = t("./reader/readerFor"), r = t("./utils"), o = t("./compressedObject"), a = t("./crc32"), l = t("./utf8"), h = t("./compressions"),
|
|
8924
|
-
function
|
|
8923
|
+
var n = t("./reader/readerFor"), r = t("./utils"), o = t("./compressedObject"), a = t("./crc32"), l = t("./utf8"), h = t("./compressions"), d = t("./support");
|
|
8924
|
+
function u(f, E) {
|
|
8925
8925
|
this.options = f, this.loadOptions = E;
|
|
8926
8926
|
}
|
|
8927
|
-
|
|
8927
|
+
u.prototype = { isEncrypted: function() {
|
|
8928
8928
|
return (1 & this.bitFlag) == 1;
|
|
8929
8929
|
}, useUTF8: function() {
|
|
8930
8930
|
return (2048 & this.bitFlag) == 2048;
|
|
@@ -8961,7 +8961,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
8961
8961
|
E = f.readInt(2), p = f.readInt(2), I = f.readData(p), this.extraFields[E] = { id: E, length: p, value: I };
|
|
8962
8962
|
f.setIndex(m);
|
|
8963
8963
|
}, handleUTF8: function() {
|
|
8964
|
-
var f =
|
|
8964
|
+
var f = d.uint8array ? "uint8array" : "array";
|
|
8965
8965
|
if (this.useUTF8())
|
|
8966
8966
|
this.fileNameStr = l.utf8decode(this.fileName), this.fileCommentStr = l.utf8decode(this.fileComment);
|
|
8967
8967
|
else {
|
|
@@ -8994,7 +8994,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
8994
8994
|
return E.readInt(1) !== 1 || a(this.fileComment) !== E.readInt(4) ? null : l.utf8decode(E.readData(f.length - 5));
|
|
8995
8995
|
}
|
|
8996
8996
|
return null;
|
|
8997
|
-
} }, s.exports =
|
|
8997
|
+
} }, s.exports = u;
|
|
8998
8998
|
}, { "./compressedObject": 2, "./compressions": 3, "./crc32": 4, "./reader/readerFor": 22, "./support": 30, "./utf8": 31, "./utils": 32 }], 35: [function(t, s, i) {
|
|
8999
8999
|
function n(E, p, I) {
|
|
9000
9000
|
this.name = E, this.dir = I.dir, this.date = I.date, this.comment = I.comment, this.unixPermissions = I.unixPermissions, this.dosPermissions = I.dosPermissions, this._data = p, this._dataBinary = I.binary, this.options = { compression: I.compression, compressionOptions: I.compressionOptions };
|
|
@@ -9025,18 +9025,18 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
9025
9025
|
}, _decompressWorker: function() {
|
|
9026
9026
|
return this._data instanceof l ? this._data.getContentWorker() : this._data instanceof h ? this._data : new o(this._data);
|
|
9027
9027
|
} };
|
|
9028
|
-
for (var
|
|
9028
|
+
for (var d = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"], u = function() {
|
|
9029
9029
|
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
9030
|
-
}, f = 0; f <
|
|
9031
|
-
n.prototype[
|
|
9030
|
+
}, f = 0; f < d.length; f++)
|
|
9031
|
+
n.prototype[d[f]] = u;
|
|
9032
9032
|
s.exports = n;
|
|
9033
9033
|
}, { "./compressedObject": 2, "./stream/DataWorker": 27, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31 }], 36: [function(t, s, i) {
|
|
9034
9034
|
(function(n) {
|
|
9035
9035
|
var r, o, a = n.MutationObserver || n.WebKitMutationObserver;
|
|
9036
9036
|
if (a) {
|
|
9037
|
-
var l = 0, h = new a(E),
|
|
9038
|
-
h.observe(
|
|
9039
|
-
|
|
9037
|
+
var l = 0, h = new a(E), d = n.document.createTextNode("");
|
|
9038
|
+
h.observe(d, { characterData: !0 }), r = function() {
|
|
9039
|
+
d.data = l = ++l % 2;
|
|
9040
9040
|
};
|
|
9041
9041
|
} else if (n.setImmediate || n.MessageChannel === void 0)
|
|
9042
9042
|
r = "document" in n && "onreadystatechange" in n.document.createElement("script") ? function() {
|
|
@@ -9048,9 +9048,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
9048
9048
|
setTimeout(E, 0);
|
|
9049
9049
|
};
|
|
9050
9050
|
else {
|
|
9051
|
-
var
|
|
9052
|
-
|
|
9053
|
-
|
|
9051
|
+
var u = new n.MessageChannel();
|
|
9052
|
+
u.port1.onmessage = E, r = function() {
|
|
9053
|
+
u.port2.postMessage(0);
|
|
9054
9054
|
};
|
|
9055
9055
|
}
|
|
9056
9056
|
var f = [];
|
|
@@ -9073,12 +9073,12 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
9073
9073
|
function r() {
|
|
9074
9074
|
}
|
|
9075
9075
|
var o = {}, a = ["REJECTED"], l = ["FULFILLED"], h = ["PENDING"];
|
|
9076
|
-
function
|
|
9076
|
+
function d(m) {
|
|
9077
9077
|
if (typeof m != "function")
|
|
9078
9078
|
throw new TypeError("resolver must be a function");
|
|
9079
9079
|
this.state = h, this.queue = [], this.outcome = void 0, m !== r && p(this, m);
|
|
9080
9080
|
}
|
|
9081
|
-
function
|
|
9081
|
+
function u(m, _, y) {
|
|
9082
9082
|
this.promise = m, typeof _ == "function" && (this.onFulfilled = _, this.callFulfilled = this.otherCallFulfilled), typeof y == "function" && (this.onRejected = y, this.callRejected = this.otherCallRejected);
|
|
9083
9083
|
}
|
|
9084
9084
|
function f(m, _, y) {
|
|
@@ -9121,7 +9121,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
9121
9121
|
}
|
|
9122
9122
|
return y;
|
|
9123
9123
|
}
|
|
9124
|
-
(s.exports =
|
|
9124
|
+
(s.exports = d).prototype.finally = function(m) {
|
|
9125
9125
|
if (typeof m != "function")
|
|
9126
9126
|
return this;
|
|
9127
9127
|
var _ = this.constructor;
|
|
@@ -9134,20 +9134,20 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
9134
9134
|
throw y;
|
|
9135
9135
|
});
|
|
9136
9136
|
});
|
|
9137
|
-
},
|
|
9137
|
+
}, d.prototype.catch = function(m) {
|
|
9138
9138
|
return this.then(null, m);
|
|
9139
|
-
},
|
|
9139
|
+
}, d.prototype.then = function(m, _) {
|
|
9140
9140
|
if (typeof m != "function" && this.state === l || typeof _ != "function" && this.state === a)
|
|
9141
9141
|
return this;
|
|
9142
9142
|
var y = new this.constructor(r);
|
|
9143
|
-
return this.state !== h ? f(y, this.state === l ? m : _, this.outcome) : this.queue.push(new
|
|
9144
|
-
},
|
|
9143
|
+
return this.state !== h ? f(y, this.state === l ? m : _, this.outcome) : this.queue.push(new u(y, m, _)), y;
|
|
9144
|
+
}, u.prototype.callFulfilled = function(m) {
|
|
9145
9145
|
o.resolve(this.promise, m);
|
|
9146
|
-
},
|
|
9146
|
+
}, u.prototype.otherCallFulfilled = function(m) {
|
|
9147
9147
|
f(this.promise, this.onFulfilled, m);
|
|
9148
|
-
},
|
|
9148
|
+
}, u.prototype.callRejected = function(m) {
|
|
9149
9149
|
o.reject(this.promise, m);
|
|
9150
|
-
},
|
|
9150
|
+
}, u.prototype.otherCallRejected = function(m) {
|
|
9151
9151
|
f(this.promise, this.onRejected, m);
|
|
9152
9152
|
}, o.resolve = function(m, _) {
|
|
9153
9153
|
var y = I(E, _);
|
|
@@ -9167,12 +9167,12 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
9167
9167
|
for (var y = -1, C = m.queue.length; ++y < C; )
|
|
9168
9168
|
m.queue[y].callRejected(_);
|
|
9169
9169
|
return m;
|
|
9170
|
-
},
|
|
9170
|
+
}, d.resolve = function(m) {
|
|
9171
9171
|
return m instanceof this ? m : o.resolve(new this(r), m);
|
|
9172
|
-
},
|
|
9172
|
+
}, d.reject = function(m) {
|
|
9173
9173
|
var _ = new this(r);
|
|
9174
9174
|
return o.reject(_, m);
|
|
9175
|
-
},
|
|
9175
|
+
}, d.all = function(m) {
|
|
9176
9176
|
var _ = this;
|
|
9177
9177
|
if (Object.prototype.toString.call(m) !== "[object Array]")
|
|
9178
9178
|
return this.reject(new TypeError("must be an array"));
|
|
@@ -9189,7 +9189,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
9189
9189
|
C || (C = !0, o.reject(L, w));
|
|
9190
9190
|
});
|
|
9191
9191
|
}
|
|
9192
|
-
},
|
|
9192
|
+
}, d.race = function(m) {
|
|
9193
9193
|
var _ = this;
|
|
9194
9194
|
if (Object.prototype.toString.call(m) !== "[object Array]")
|
|
9195
9195
|
return this.reject(new TypeError("must be an array"));
|
|
@@ -9209,19 +9209,19 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
9209
9209
|
var n = {};
|
|
9210
9210
|
(0, t("./lib/utils/common").assign)(n, t("./lib/deflate"), t("./lib/inflate"), t("./lib/zlib/constants")), s.exports = n;
|
|
9211
9211
|
}, { "./lib/deflate": 39, "./lib/inflate": 40, "./lib/utils/common": 41, "./lib/zlib/constants": 44 }], 39: [function(t, s, i) {
|
|
9212
|
-
var n = t("./zlib/deflate"), r = t("./utils/common"), o = t("./utils/strings"), a = t("./zlib/messages"), l = t("./zlib/zstream"), h = Object.prototype.toString,
|
|
9212
|
+
var n = t("./zlib/deflate"), r = t("./utils/common"), o = t("./utils/strings"), a = t("./zlib/messages"), l = t("./zlib/zstream"), h = Object.prototype.toString, d = 0, u = -1, f = 0, E = 8;
|
|
9213
9213
|
function p(m) {
|
|
9214
9214
|
if (!(this instanceof p))
|
|
9215
9215
|
return new p(m);
|
|
9216
|
-
this.options = r.assign({ level:
|
|
9216
|
+
this.options = r.assign({ level: u, method: E, chunkSize: 16384, windowBits: 15, memLevel: 8, strategy: f, to: "" }, m || {});
|
|
9217
9217
|
var _ = this.options;
|
|
9218
9218
|
_.raw && 0 < _.windowBits ? _.windowBits = -_.windowBits : _.gzip && 0 < _.windowBits && _.windowBits < 16 && (_.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new l(), this.strm.avail_out = 0;
|
|
9219
9219
|
var y = n.deflateInit2(this.strm, _.level, _.method, _.windowBits, _.memLevel, _.strategy);
|
|
9220
|
-
if (y !==
|
|
9220
|
+
if (y !== d)
|
|
9221
9221
|
throw new Error(a[y]);
|
|
9222
9222
|
if (_.header && n.deflateSetHeader(this.strm, _.header), _.dictionary) {
|
|
9223
9223
|
var C;
|
|
9224
|
-
if (C = typeof _.dictionary == "string" ? o.string2buf(_.dictionary) : h.call(_.dictionary) === "[object ArrayBuffer]" ? new Uint8Array(_.dictionary) : _.dictionary, (y = n.deflateSetDictionary(this.strm, C)) !==
|
|
9224
|
+
if (C = typeof _.dictionary == "string" ? o.string2buf(_.dictionary) : h.call(_.dictionary) === "[object ArrayBuffer]" ? new Uint8Array(_.dictionary) : _.dictionary, (y = n.deflateSetDictionary(this.strm, C)) !== d)
|
|
9225
9225
|
throw new Error(a[y]);
|
|
9226
9226
|
this._dict_set = !0;
|
|
9227
9227
|
}
|
|
@@ -9238,22 +9238,22 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
9238
9238
|
return !1;
|
|
9239
9239
|
C = _ === ~~_ ? _ : _ === !0 ? 4 : 0, typeof m == "string" ? R.input = o.string2buf(m) : h.call(m) === "[object ArrayBuffer]" ? R.input = new Uint8Array(m) : R.input = m, R.next_in = 0, R.avail_in = R.input.length;
|
|
9240
9240
|
do {
|
|
9241
|
-
if (R.avail_out === 0 && (R.output = new r.Buf8(F), R.next_out = 0, R.avail_out = F), (y = n.deflate(R, C)) !== 1 && y !==
|
|
9241
|
+
if (R.avail_out === 0 && (R.output = new r.Buf8(F), R.next_out = 0, R.avail_out = F), (y = n.deflate(R, C)) !== 1 && y !== d)
|
|
9242
9242
|
return this.onEnd(y), !(this.ended = !0);
|
|
9243
9243
|
R.avail_out !== 0 && (R.avail_in !== 0 || C !== 4 && C !== 2) || (this.options.to === "string" ? this.onData(o.buf2binstring(r.shrinkBuf(R.output, R.next_out))) : this.onData(r.shrinkBuf(R.output, R.next_out)));
|
|
9244
9244
|
} while ((0 < R.avail_in || R.avail_out === 0) && y !== 1);
|
|
9245
|
-
return C === 4 ? (y = n.deflateEnd(this.strm), this.onEnd(y), this.ended = !0, y ===
|
|
9245
|
+
return C === 4 ? (y = n.deflateEnd(this.strm), this.onEnd(y), this.ended = !0, y === d) : C !== 2 || (this.onEnd(d), !(R.avail_out = 0));
|
|
9246
9246
|
}, p.prototype.onData = function(m) {
|
|
9247
9247
|
this.chunks.push(m);
|
|
9248
9248
|
}, p.prototype.onEnd = function(m) {
|
|
9249
|
-
m ===
|
|
9249
|
+
m === d && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = r.flattenChunks(this.chunks)), this.chunks = [], this.err = m, this.msg = this.strm.msg;
|
|
9250
9250
|
}, i.Deflate = p, i.deflate = I, i.deflateRaw = function(m, _) {
|
|
9251
9251
|
return (_ = _ || {}).raw = !0, I(m, _);
|
|
9252
9252
|
}, i.gzip = function(m, _) {
|
|
9253
9253
|
return (_ = _ || {}).gzip = !0, I(m, _);
|
|
9254
9254
|
};
|
|
9255
9255
|
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/deflate": 46, "./zlib/messages": 51, "./zlib/zstream": 53 }], 40: [function(t, s, i) {
|
|
9256
|
-
var n = t("./zlib/inflate"), r = t("./utils/common"), o = t("./utils/strings"), a = t("./zlib/constants"), l = t("./zlib/messages"), h = t("./zlib/zstream"),
|
|
9256
|
+
var n = t("./zlib/inflate"), r = t("./utils/common"), o = t("./utils/strings"), a = t("./zlib/constants"), l = t("./zlib/messages"), h = t("./zlib/zstream"), d = t("./zlib/gzheader"), u = Object.prototype.toString;
|
|
9257
9257
|
function f(p) {
|
|
9258
9258
|
if (!(this instanceof f))
|
|
9259
9259
|
return new f(p);
|
|
@@ -9263,7 +9263,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
9263
9263
|
var m = n.inflateInit2(this.strm, I.windowBits);
|
|
9264
9264
|
if (m !== a.Z_OK)
|
|
9265
9265
|
throw new Error(l[m]);
|
|
9266
|
-
this.header = new
|
|
9266
|
+
this.header = new d(), n.inflateGetHeader(this.strm, this.header);
|
|
9267
9267
|
}
|
|
9268
9268
|
function E(p, I) {
|
|
9269
9269
|
var m = new f(I);
|
|
@@ -9275,9 +9275,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
9275
9275
|
var m, _, y, C, R, F, O = this.strm, L = this.options.chunkSize, N = this.options.dictionary, x = !1;
|
|
9276
9276
|
if (this.ended)
|
|
9277
9277
|
return !1;
|
|
9278
|
-
_ = I === ~~I ? I : I === !0 ? a.Z_FINISH : a.Z_NO_FLUSH, typeof p == "string" ? O.input = o.binstring2buf(p) :
|
|
9278
|
+
_ = I === ~~I ? I : I === !0 ? a.Z_FINISH : a.Z_NO_FLUSH, typeof p == "string" ? O.input = o.binstring2buf(p) : u.call(p) === "[object ArrayBuffer]" ? O.input = new Uint8Array(p) : O.input = p, O.next_in = 0, O.avail_in = O.input.length;
|
|
9279
9279
|
do {
|
|
9280
|
-
if (O.avail_out === 0 && (O.output = new r.Buf8(L), O.next_out = 0, O.avail_out = L), (m = n.inflate(O, a.Z_NO_FLUSH)) === a.Z_NEED_DICT && N && (F = typeof N == "string" ? o.string2buf(N) :
|
|
9280
|
+
if (O.avail_out === 0 && (O.output = new r.Buf8(L), O.next_out = 0, O.avail_out = L), (m = n.inflate(O, a.Z_NO_FLUSH)) === a.Z_NEED_DICT && N && (F = typeof N == "string" ? o.string2buf(N) : u.call(N) === "[object ArrayBuffer]" ? new Uint8Array(N) : N, m = n.inflateSetDictionary(this.strm, F)), m === a.Z_BUF_ERROR && x === !0 && (m = a.Z_OK, x = !1), m !== a.Z_STREAM_END && m !== a.Z_OK)
|
|
9281
9281
|
return this.onEnd(m), !(this.ended = !0);
|
|
9282
9282
|
O.next_out && (O.avail_out !== 0 && m !== a.Z_STREAM_END && (O.avail_in !== 0 || _ !== a.Z_FINISH && _ !== a.Z_SYNC_FLUSH) || (this.options.to === "string" ? (y = o.utf8border(O.output, O.next_out), C = O.next_out - y, R = o.buf2string(O.output, y), O.next_out = C, O.avail_out = L - C, C && r.arraySet(O.output, O.output, y, C, 0), this.onData(R)) : this.onData(r.shrinkBuf(O.output, O.next_out)))), O.avail_in === 0 && O.avail_out === 0 && (x = !0);
|
|
9283
9283
|
} while ((0 < O.avail_in || O.avail_out === 0) && m !== a.Z_STREAM_END);
|
|
@@ -9297,30 +9297,30 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
9297
9297
|
if (h) {
|
|
9298
9298
|
if (typeof h != "object")
|
|
9299
9299
|
throw new TypeError(h + "must be non-object");
|
|
9300
|
-
for (var
|
|
9301
|
-
h.hasOwnProperty(
|
|
9300
|
+
for (var d in h)
|
|
9301
|
+
h.hasOwnProperty(d) && (a[d] = h[d]);
|
|
9302
9302
|
}
|
|
9303
9303
|
}
|
|
9304
9304
|
return a;
|
|
9305
9305
|
}, i.shrinkBuf = function(a, l) {
|
|
9306
9306
|
return a.length === l ? a : a.subarray ? a.subarray(0, l) : (a.length = l, a);
|
|
9307
9307
|
};
|
|
9308
|
-
var r = { arraySet: function(a, l, h,
|
|
9308
|
+
var r = { arraySet: function(a, l, h, d, u) {
|
|
9309
9309
|
if (l.subarray && a.subarray)
|
|
9310
|
-
a.set(l.subarray(h, h +
|
|
9310
|
+
a.set(l.subarray(h, h + d), u);
|
|
9311
9311
|
else
|
|
9312
|
-
for (var f = 0; f <
|
|
9313
|
-
a[
|
|
9312
|
+
for (var f = 0; f < d; f++)
|
|
9313
|
+
a[u + f] = l[h + f];
|
|
9314
9314
|
}, flattenChunks: function(a) {
|
|
9315
|
-
var l, h,
|
|
9316
|
-
for (l =
|
|
9317
|
-
|
|
9318
|
-
for (E = new Uint8Array(
|
|
9319
|
-
f = a[l], E.set(f,
|
|
9315
|
+
var l, h, d, u, f, E;
|
|
9316
|
+
for (l = d = 0, h = a.length; l < h; l++)
|
|
9317
|
+
d += a[l].length;
|
|
9318
|
+
for (E = new Uint8Array(d), l = u = 0, h = a.length; l < h; l++)
|
|
9319
|
+
f = a[l], E.set(f, u), u += f.length;
|
|
9320
9320
|
return E;
|
|
9321
|
-
} }, o = { arraySet: function(a, l, h,
|
|
9322
|
-
for (var f = 0; f <
|
|
9323
|
-
a[
|
|
9321
|
+
} }, o = { arraySet: function(a, l, h, d, u) {
|
|
9322
|
+
for (var f = 0; f < d; f++)
|
|
9323
|
+
a[u + f] = l[h + f];
|
|
9324
9324
|
}, flattenChunks: function(a) {
|
|
9325
9325
|
return [].concat.apply([], a);
|
|
9326
9326
|
} };
|
|
@@ -9341,49 +9341,49 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
9341
9341
|
}
|
|
9342
9342
|
for (var a = new n.Buf8(256), l = 0; l < 256; l++)
|
|
9343
9343
|
a[l] = 252 <= l ? 6 : 248 <= l ? 5 : 240 <= l ? 4 : 224 <= l ? 3 : 192 <= l ? 2 : 1;
|
|
9344
|
-
function h(
|
|
9345
|
-
if (
|
|
9346
|
-
return String.fromCharCode.apply(null, n.shrinkBuf(
|
|
9347
|
-
for (var f = "", E = 0; E <
|
|
9348
|
-
f += String.fromCharCode(
|
|
9344
|
+
function h(d, u) {
|
|
9345
|
+
if (u < 65537 && (d.subarray && o || !d.subarray && r))
|
|
9346
|
+
return String.fromCharCode.apply(null, n.shrinkBuf(d, u));
|
|
9347
|
+
for (var f = "", E = 0; E < u; E++)
|
|
9348
|
+
f += String.fromCharCode(d[E]);
|
|
9349
9349
|
return f;
|
|
9350
9350
|
}
|
|
9351
|
-
a[254] = a[254] = 1, i.string2buf = function(
|
|
9352
|
-
var
|
|
9351
|
+
a[254] = a[254] = 1, i.string2buf = function(d) {
|
|
9352
|
+
var u, f, E, p, I, m = d.length, _ = 0;
|
|
9353
9353
|
for (p = 0; p < m; p++)
|
|
9354
|
-
(64512 & (f =
|
|
9355
|
-
for (
|
|
9356
|
-
(64512 & (f =
|
|
9357
|
-
return
|
|
9358
|
-
}, i.buf2binstring = function(
|
|
9359
|
-
return h(
|
|
9360
|
-
}, i.binstring2buf = function(
|
|
9361
|
-
for (var
|
|
9362
|
-
|
|
9363
|
-
return
|
|
9364
|
-
}, i.buf2string = function(
|
|
9365
|
-
var f, E, p, I, m =
|
|
9354
|
+
(64512 & (f = d.charCodeAt(p))) == 55296 && p + 1 < m && (64512 & (E = d.charCodeAt(p + 1))) == 56320 && (f = 65536 + (f - 55296 << 10) + (E - 56320), p++), _ += f < 128 ? 1 : f < 2048 ? 2 : f < 65536 ? 3 : 4;
|
|
9355
|
+
for (u = new n.Buf8(_), p = I = 0; I < _; p++)
|
|
9356
|
+
(64512 & (f = d.charCodeAt(p))) == 55296 && p + 1 < m && (64512 & (E = d.charCodeAt(p + 1))) == 56320 && (f = 65536 + (f - 55296 << 10) + (E - 56320), p++), f < 128 ? u[I++] = f : (f < 2048 ? u[I++] = 192 | f >>> 6 : (f < 65536 ? u[I++] = 224 | f >>> 12 : (u[I++] = 240 | f >>> 18, u[I++] = 128 | f >>> 12 & 63), u[I++] = 128 | f >>> 6 & 63), u[I++] = 128 | 63 & f);
|
|
9357
|
+
return u;
|
|
9358
|
+
}, i.buf2binstring = function(d) {
|
|
9359
|
+
return h(d, d.length);
|
|
9360
|
+
}, i.binstring2buf = function(d) {
|
|
9361
|
+
for (var u = new n.Buf8(d.length), f = 0, E = u.length; f < E; f++)
|
|
9362
|
+
u[f] = d.charCodeAt(f);
|
|
9363
|
+
return u;
|
|
9364
|
+
}, i.buf2string = function(d, u) {
|
|
9365
|
+
var f, E, p, I, m = u || d.length, _ = new Array(2 * m);
|
|
9366
9366
|
for (f = E = 0; f < m; )
|
|
9367
|
-
if ((p =
|
|
9367
|
+
if ((p = d[f++]) < 128)
|
|
9368
9368
|
_[E++] = p;
|
|
9369
9369
|
else if (4 < (I = a[p]))
|
|
9370
9370
|
_[E++] = 65533, f += I - 1;
|
|
9371
9371
|
else {
|
|
9372
9372
|
for (p &= I === 2 ? 31 : I === 3 ? 15 : 7; 1 < I && f < m; )
|
|
9373
|
-
p = p << 6 | 63 &
|
|
9373
|
+
p = p << 6 | 63 & d[f++], I--;
|
|
9374
9374
|
1 < I ? _[E++] = 65533 : p < 65536 ? _[E++] = p : (p -= 65536, _[E++] = 55296 | p >> 10 & 1023, _[E++] = 56320 | 1023 & p);
|
|
9375
9375
|
}
|
|
9376
9376
|
return h(_, E);
|
|
9377
|
-
}, i.utf8border = function(
|
|
9377
|
+
}, i.utf8border = function(d, u) {
|
|
9378
9378
|
var f;
|
|
9379
|
-
for ((
|
|
9379
|
+
for ((u = u || d.length) > d.length && (u = d.length), f = u - 1; 0 <= f && (192 & d[f]) == 128; )
|
|
9380
9380
|
f--;
|
|
9381
|
-
return f < 0 || f === 0 ?
|
|
9381
|
+
return f < 0 || f === 0 ? u : f + a[d[f]] > u ? f : u;
|
|
9382
9382
|
};
|
|
9383
9383
|
}, { "./common": 41 }], 43: [function(t, s, i) {
|
|
9384
9384
|
s.exports = function(n, r, o, a) {
|
|
9385
|
-
for (var l = 65535 & n | 0, h = n >>> 16 & 65535 | 0,
|
|
9386
|
-
for (o -=
|
|
9385
|
+
for (var l = 65535 & n | 0, h = n >>> 16 & 65535 | 0, d = 0; o !== 0; ) {
|
|
9386
|
+
for (o -= d = 2e3 < o ? 2e3 : o; h = h + (l = l + r[a++] | 0) | 0, --d; )
|
|
9387
9387
|
;
|
|
9388
9388
|
l %= 65521, h %= 65521;
|
|
9389
9389
|
}
|
|
@@ -9402,14 +9402,14 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
9402
9402
|
return o;
|
|
9403
9403
|
}();
|
|
9404
9404
|
s.exports = function(r, o, a, l) {
|
|
9405
|
-
var h = n,
|
|
9405
|
+
var h = n, d = l + a;
|
|
9406
9406
|
r ^= -1;
|
|
9407
|
-
for (var
|
|
9408
|
-
r = r >>> 8 ^ h[255 & (r ^ o[
|
|
9407
|
+
for (var u = l; u < d; u++)
|
|
9408
|
+
r = r >>> 8 ^ h[255 & (r ^ o[u])];
|
|
9409
9409
|
return -1 ^ r;
|
|
9410
9410
|
};
|
|
9411
9411
|
}, {}], 46: [function(t, s, i) {
|
|
9412
|
-
var n, r = t("../utils/common"), o = t("./trees"), a = t("./adler32"), l = t("./crc32"), h = t("./messages"),
|
|
9412
|
+
var n, r = t("../utils/common"), o = t("./trees"), a = t("./adler32"), l = t("./crc32"), h = t("./messages"), d = 0, u = 4, f = 0, E = -2, p = -1, I = 4, m = 2, _ = 8, y = 9, C = 286, R = 30, F = 19, O = 2 * C + 1, L = 15, N = 3, x = 258, k = x + N + 1, w = 42, P = 113, T = 1, M = 2, j = 3, V = 4;
|
|
9413
9413
|
function et(A, W) {
|
|
9414
9414
|
return A.msg = h[W], W;
|
|
9415
9415
|
}
|
|
@@ -9471,7 +9471,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
9471
9471
|
function Ot(A, W) {
|
|
9472
9472
|
for (var Y, b; ; ) {
|
|
9473
9473
|
if (A.lookahead < k) {
|
|
9474
|
-
if (Rt(A), A.lookahead < k && W ===
|
|
9474
|
+
if (Rt(A), A.lookahead < k && W === d)
|
|
9475
9475
|
return T;
|
|
9476
9476
|
if (A.lookahead === 0)
|
|
9477
9477
|
break;
|
|
@@ -9488,12 +9488,12 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
9488
9488
|
if (b && (U(A, !1), A.strm.avail_out === 0))
|
|
9489
9489
|
return T;
|
|
9490
9490
|
}
|
|
9491
|
-
return A.insert = A.strstart < N - 1 ? A.strstart : N - 1, W ===
|
|
9491
|
+
return A.insert = A.strstart < N - 1 ? A.strstart : N - 1, W === u ? (U(A, !0), A.strm.avail_out === 0 ? j : V) : A.last_lit && (U(A, !1), A.strm.avail_out === 0) ? T : M;
|
|
9492
9492
|
}
|
|
9493
9493
|
function at(A, W) {
|
|
9494
9494
|
for (var Y, b, S; ; ) {
|
|
9495
9495
|
if (A.lookahead < k) {
|
|
9496
|
-
if (Rt(A), A.lookahead < k && W ===
|
|
9496
|
+
if (Rt(A), A.lookahead < k && W === d)
|
|
9497
9497
|
return T;
|
|
9498
9498
|
if (A.lookahead === 0)
|
|
9499
9499
|
break;
|
|
@@ -9509,7 +9509,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
9509
9509
|
} else
|
|
9510
9510
|
A.match_available = 1, A.strstart++, A.lookahead--;
|
|
9511
9511
|
}
|
|
9512
|
-
return A.match_available && (b = o._tr_tally(A, 0, A.window[A.strstart - 1]), A.match_available = 0), A.insert = A.strstart < N - 1 ? A.strstart : N - 1, W ===
|
|
9512
|
+
return A.match_available && (b = o._tr_tally(A, 0, A.window[A.strstart - 1]), A.match_available = 0), A.insert = A.strstart < N - 1 ? A.strstart : N - 1, W === u ? (U(A, !0), A.strm.avail_out === 0 ? j : V) : A.last_lit && (U(A, !1), A.strm.avail_out === 0) ? T : M;
|
|
9513
9513
|
}
|
|
9514
9514
|
function ft(A, W, Y, b, S) {
|
|
9515
9515
|
this.good_length = A, this.max_lazy = W, this.nice_length = Y, this.max_chain = b, this.func = S;
|
|
@@ -9519,7 +9519,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
9519
9519
|
}
|
|
9520
9520
|
function It(A) {
|
|
9521
9521
|
var W;
|
|
9522
|
-
return A && A.state ? (A.total_in = A.total_out = 0, A.data_type = m, (W = A.state).pending = 0, W.pending_out = 0, W.wrap < 0 && (W.wrap = -W.wrap), W.status = W.wrap ? w : P, A.adler = W.wrap === 2 ? 0 : 1, W.last_flush =
|
|
9522
|
+
return A && A.state ? (A.total_in = A.total_out = 0, A.data_type = m, (W = A.state).pending = 0, W.pending_out = 0, W.wrap < 0 && (W.wrap = -W.wrap), W.status = W.wrap ? w : P, A.adler = W.wrap === 2 ? 0 : 1, W.last_flush = d, o._tr_init(W), f) : et(A, E);
|
|
9523
9523
|
}
|
|
9524
9524
|
function Gt(A) {
|
|
9525
9525
|
var W = It(A);
|
|
@@ -9541,7 +9541,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
9541
9541
|
var Y = 65535;
|
|
9542
9542
|
for (Y > A.pending_buf_size - 5 && (Y = A.pending_buf_size - 5); ; ) {
|
|
9543
9543
|
if (A.lookahead <= 1) {
|
|
9544
|
-
if (Rt(A), A.lookahead === 0 && W ===
|
|
9544
|
+
if (Rt(A), A.lookahead === 0 && W === d)
|
|
9545
9545
|
return T;
|
|
9546
9546
|
if (A.lookahead === 0)
|
|
9547
9547
|
break;
|
|
@@ -9551,7 +9551,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
9551
9551
|
if ((A.strstart === 0 || A.strstart >= b) && (A.lookahead = A.strstart - b, A.strstart = b, U(A, !1), A.strm.avail_out === 0) || A.strstart - A.block_start >= A.w_size - k && (U(A, !1), A.strm.avail_out === 0))
|
|
9552
9552
|
return T;
|
|
9553
9553
|
}
|
|
9554
|
-
return A.insert = 0, W ===
|
|
9554
|
+
return A.insert = 0, W === u ? (U(A, !0), A.strm.avail_out === 0 ? j : V) : (A.strstart > A.block_start && (U(A, !1), A.strm.avail_out), T);
|
|
9555
9555
|
}), new ft(4, 4, 8, 4, Ot), new ft(4, 5, 16, 8, Ot), new ft(4, 6, 32, 32, Ot), new ft(4, 4, 16, 16, at), new ft(8, 16, 32, 32, at), new ft(8, 16, 128, 128, at), new ft(8, 32, 128, 256, at), new ft(32, 128, 258, 1024, at), new ft(32, 258, 258, 4096, at)], i.deflateInit = function(A, W) {
|
|
9556
9556
|
return vt(A, W, _, 15, 8, 0);
|
|
9557
9557
|
}, i.deflateInit2 = vt, i.deflateReset = Gt, i.deflateResetKeep = It, i.deflateSetHeader = function(A, W) {
|
|
@@ -9560,7 +9560,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
9560
9560
|
var Y, b, S, D;
|
|
9561
9561
|
if (!A || !A.state || 5 < W || W < 0)
|
|
9562
9562
|
return A ? et(A, E) : E;
|
|
9563
|
-
if (b = A.state, !A.output || !A.input && A.avail_in !== 0 || b.status === 666 && W !==
|
|
9563
|
+
if (b = A.state, !A.output || !A.input && A.avail_in !== 0 || b.status === 666 && W !== u)
|
|
9564
9564
|
return et(A, A.avail_out === 0 ? -5 : E);
|
|
9565
9565
|
if (b.strm = A, Y = b.last_flush, b.last_flush = W, b.status === w)
|
|
9566
9566
|
if (b.wrap === 2)
|
|
@@ -9605,26 +9605,26 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
9605
9605
|
if (b.status === 103 && (b.gzhead.hcrc ? (b.pending + 2 > b.pending_buf_size && z(A), b.pending + 2 <= b.pending_buf_size && (ot(b, 255 & A.adler), ot(b, A.adler >> 8 & 255), A.adler = 0, b.status = P)) : b.status = P), b.pending !== 0) {
|
|
9606
9606
|
if (z(A), A.avail_out === 0)
|
|
9607
9607
|
return b.last_flush = -1, f;
|
|
9608
|
-
} else if (A.avail_in === 0 && H(W) <= H(Y) && W !==
|
|
9608
|
+
} else if (A.avail_in === 0 && H(W) <= H(Y) && W !== u)
|
|
9609
9609
|
return et(A, -5);
|
|
9610
9610
|
if (b.status === 666 && A.avail_in !== 0)
|
|
9611
9611
|
return et(A, -5);
|
|
9612
|
-
if (A.avail_in !== 0 || b.lookahead !== 0 || W !==
|
|
9612
|
+
if (A.avail_in !== 0 || b.lookahead !== 0 || W !== d && b.status !== 666) {
|
|
9613
9613
|
var Z = b.strategy === 2 ? function(B, q) {
|
|
9614
9614
|
for (var it; ; ) {
|
|
9615
9615
|
if (B.lookahead === 0 && (Rt(B), B.lookahead === 0)) {
|
|
9616
|
-
if (q ===
|
|
9616
|
+
if (q === d)
|
|
9617
9617
|
return T;
|
|
9618
9618
|
break;
|
|
9619
9619
|
}
|
|
9620
9620
|
if (B.match_length = 0, it = o._tr_tally(B, 0, B.window[B.strstart]), B.lookahead--, B.strstart++, it && (U(B, !1), B.strm.avail_out === 0))
|
|
9621
9621
|
return T;
|
|
9622
9622
|
}
|
|
9623
|
-
return B.insert = 0, q ===
|
|
9623
|
+
return B.insert = 0, q === u ? (U(B, !0), B.strm.avail_out === 0 ? j : V) : B.last_lit && (U(B, !1), B.strm.avail_out === 0) ? T : M;
|
|
9624
9624
|
}(b, W) : b.strategy === 3 ? function(B, q) {
|
|
9625
9625
|
for (var it, J, ct, Ct, pt = B.window; ; ) {
|
|
9626
9626
|
if (B.lookahead <= x) {
|
|
9627
|
-
if (Rt(B), B.lookahead <= x && q ===
|
|
9627
|
+
if (Rt(B), B.lookahead <= x && q === d)
|
|
9628
9628
|
return T;
|
|
9629
9629
|
if (B.lookahead === 0)
|
|
9630
9630
|
break;
|
|
@@ -9639,14 +9639,14 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
9639
9639
|
if (B.match_length >= N ? (it = o._tr_tally(B, 1, B.match_length - N), B.lookahead -= B.match_length, B.strstart += B.match_length, B.match_length = 0) : (it = o._tr_tally(B, 0, B.window[B.strstart]), B.lookahead--, B.strstart++), it && (U(B, !1), B.strm.avail_out === 0))
|
|
9640
9640
|
return T;
|
|
9641
9641
|
}
|
|
9642
|
-
return B.insert = 0, q ===
|
|
9642
|
+
return B.insert = 0, q === u ? (U(B, !0), B.strm.avail_out === 0 ? j : V) : B.last_lit && (U(B, !1), B.strm.avail_out === 0) ? T : M;
|
|
9643
9643
|
}(b, W) : n[b.level].func(b, W);
|
|
9644
9644
|
if (Z !== j && Z !== V || (b.status = 666), Z === T || Z === j)
|
|
9645
9645
|
return A.avail_out === 0 && (b.last_flush = -1), f;
|
|
9646
9646
|
if (Z === M && (W === 1 ? o._tr_align(b) : W !== 5 && (o._tr_stored_block(b, 0, 0, !1), W === 3 && (nt(b.head), b.lookahead === 0 && (b.strstart = 0, b.block_start = 0, b.insert = 0))), z(A), A.avail_out === 0))
|
|
9647
9647
|
return b.last_flush = -1, f;
|
|
9648
9648
|
}
|
|
9649
|
-
return W !==
|
|
9649
|
+
return W !== u ? f : b.wrap <= 0 ? 1 : (b.wrap === 2 ? (ot(b, 255 & A.adler), ot(b, A.adler >> 8 & 255), ot(b, A.adler >> 16 & 255), ot(b, A.adler >> 24 & 255), ot(b, 255 & A.total_in), ot(b, A.total_in >> 8 & 255), ot(b, A.total_in >> 16 & 255), ot(b, A.total_in >> 24 & 255)) : (st(b, A.adler >>> 16), st(b, 65535 & A.adler)), z(A), 0 < b.wrap && (b.wrap = -b.wrap), b.pending !== 0 ? f : 1);
|
|
9650
9650
|
}, i.deflateEnd = function(A) {
|
|
9651
9651
|
var W;
|
|
9652
9652
|
return A && A.state ? (W = A.state.status) !== w && W !== 69 && W !== 73 && W !== 91 && W !== 103 && W !== P && W !== 666 ? et(A, E) : (A.state = null, W === P ? et(A, -3) : f) : E;
|
|
@@ -9667,8 +9667,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
9667
9667
|
};
|
|
9668
9668
|
}, {}], 48: [function(t, s, i) {
|
|
9669
9669
|
s.exports = function(n, r) {
|
|
9670
|
-
var o, a, l, h,
|
|
9671
|
-
o = n.state, a = n.next_in, T = n.input, l = a + (n.avail_in - 5), h = n.next_out, M = n.output,
|
|
9670
|
+
var o, a, l, h, d, u, f, E, p, I, m, _, y, C, R, F, O, L, N, x, k, w, P, T, M;
|
|
9671
|
+
o = n.state, a = n.next_in, T = n.input, l = a + (n.avail_in - 5), h = n.next_out, M = n.output, d = h - (r - n.avail_out), u = h + (n.avail_out - 257), f = o.dmax, E = o.wsize, p = o.whave, I = o.wnext, m = o.window, _ = o.hold, y = o.bits, C = o.lencode, R = o.distcode, F = (1 << o.lenbits) - 1, O = (1 << o.distbits) - 1;
|
|
9672
9672
|
t:
|
|
9673
9673
|
do {
|
|
9674
9674
|
y < 15 && (_ += T[a++] << y, y += 8, _ += T[a++] << y, y += 8), L = C[_ & F];
|
|
@@ -9704,7 +9704,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
9704
9704
|
n.msg = "invalid distance too far back", o.mode = 30;
|
|
9705
9705
|
break t;
|
|
9706
9706
|
}
|
|
9707
|
-
if (_ >>>= N, y -= N, (N = h -
|
|
9707
|
+
if (_ >>>= N, y -= N, (N = h - d) < k) {
|
|
9708
9708
|
if (p < (N = k - N) && o.sane) {
|
|
9709
9709
|
n.msg = "invalid distance too far back", o.mode = 30;
|
|
9710
9710
|
break t;
|
|
@@ -9743,11 +9743,11 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
9743
9743
|
}
|
|
9744
9744
|
break;
|
|
9745
9745
|
}
|
|
9746
|
-
} while (a < l && h <
|
|
9747
|
-
a -= x = y >> 3, _ &= (1 << (y -= x << 3)) - 1, n.next_in = a, n.next_out = h, n.avail_in = a < l ? l - a + 5 : 5 - (a - l), n.avail_out = h <
|
|
9746
|
+
} while (a < l && h < u);
|
|
9747
|
+
a -= x = y >> 3, _ &= (1 << (y -= x << 3)) - 1, n.next_in = a, n.next_out = h, n.avail_in = a < l ? l - a + 5 : 5 - (a - l), n.avail_out = h < u ? u - h + 257 : 257 - (h - u), o.hold = _, o.bits = y;
|
|
9748
9748
|
};
|
|
9749
9749
|
}, {}], 49: [function(t, s, i) {
|
|
9750
|
-
var n = t("../utils/common"), r = t("./adler32"), o = t("./crc32"), a = t("./inffast"), l = t("./inftrees"), h = 1,
|
|
9750
|
+
var n = t("../utils/common"), r = t("./adler32"), o = t("./crc32"), a = t("./inffast"), l = t("./inftrees"), h = 1, d = 2, u = 0, f = -2, E = 1, p = 852, I = 592;
|
|
9751
9751
|
function m(w) {
|
|
9752
9752
|
return (w >>> 24 & 255) + (w >>> 8 & 65280) + ((65280 & w) << 8) + ((255 & w) << 24);
|
|
9753
9753
|
}
|
|
@@ -9756,7 +9756,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
9756
9756
|
}
|
|
9757
9757
|
function y(w) {
|
|
9758
9758
|
var P;
|
|
9759
|
-
return w && w.state ? (P = w.state, w.total_in = w.total_out = P.total = 0, w.msg = "", P.wrap && (w.adler = 1 & P.wrap), P.mode = E, P.last = 0, P.havedict = 0, P.dmax = 32768, P.head = null, P.hold = 0, P.bits = 0, P.lencode = P.lendyn = new n.Buf32(p), P.distcode = P.distdyn = new n.Buf32(I), P.sane = 1, P.back = -1,
|
|
9759
|
+
return w && w.state ? (P = w.state, w.total_in = w.total_out = P.total = 0, w.msg = "", P.wrap && (w.adler = 1 & P.wrap), P.mode = E, P.last = 0, P.havedict = 0, P.dmax = 32768, P.head = null, P.hold = 0, P.bits = 0, P.lencode = P.lendyn = new n.Buf32(p), P.distcode = P.distdyn = new n.Buf32(I), P.sane = 1, P.back = -1, u) : f;
|
|
9760
9760
|
}
|
|
9761
9761
|
function C(w) {
|
|
9762
9762
|
var P;
|
|
@@ -9768,7 +9768,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
9768
9768
|
}
|
|
9769
9769
|
function F(w, P) {
|
|
9770
9770
|
var T, M;
|
|
9771
|
-
return w ? (M = new _(), (w.state = M).window = null, (T = R(w, P)) !==
|
|
9771
|
+
return w ? (M = new _(), (w.state = M).window = null, (T = R(w, P)) !== u && (w.state = null), T) : f;
|
|
9772
9772
|
}
|
|
9773
9773
|
var O, L, N = !0;
|
|
9774
9774
|
function x(w) {
|
|
@@ -9784,7 +9784,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
9784
9784
|
w.lens[P++] = 8;
|
|
9785
9785
|
for (l(h, w.lens, 0, 288, O, 0, w.work, { bits: 9 }), P = 0; P < 32; )
|
|
9786
9786
|
w.lens[P++] = 5;
|
|
9787
|
-
l(
|
|
9787
|
+
l(d, w.lens, 0, 32, L, 0, w.work, { bits: 5 }), N = !1;
|
|
9788
9788
|
}
|
|
9789
9789
|
w.lencode = O, w.lenbits = 9, w.distcode = L, w.distbits = 5;
|
|
9790
9790
|
}
|
|
@@ -9798,7 +9798,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
9798
9798
|
var T, M, j, V, et, H, nt, z, U, ot, st, tt, Rt, Ot, at, ft, dt, It, Gt, vt, A, W, Y, b, S = 0, D = new n.Buf8(4), X = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
|
|
9799
9799
|
if (!w || !w.state || !w.output || !w.input && w.avail_in !== 0)
|
|
9800
9800
|
return f;
|
|
9801
|
-
(T = w.state).mode === 12 && (T.mode = 13), et = w.next_out, j = w.output, nt = w.avail_out, V = w.next_in, M = w.input, H = w.avail_in, z = T.hold, U = T.bits, ot = H, st = nt, W =
|
|
9801
|
+
(T = w.state).mode === 12 && (T.mode = 13), et = w.next_out, j = w.output, nt = w.avail_out, V = w.next_in, M = w.input, H = w.avail_in, z = T.hold, U = T.bits, ot = H, st = nt, W = u;
|
|
9802
9802
|
t:
|
|
9803
9803
|
for (; ; )
|
|
9804
9804
|
switch (T.mode) {
|
|
@@ -10058,7 +10058,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
10058
10058
|
w.msg = "invalid literal/lengths set", T.mode = 30;
|
|
10059
10059
|
break;
|
|
10060
10060
|
}
|
|
10061
|
-
if (T.distbits = 6, T.distcode = T.distdyn, Y = { bits: T.distbits }, W = l(
|
|
10061
|
+
if (T.distbits = 6, T.distcode = T.distdyn, Y = { bits: T.distbits }, W = l(d, T.lens, T.nlen, T.ndist, T.distcode, 0, T.work, Y), T.distbits = Y.bits, W) {
|
|
10062
10062
|
w.msg = "invalid distances set", T.mode = 30;
|
|
10063
10063
|
break;
|
|
10064
10064
|
}
|
|
@@ -10200,27 +10200,27 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
10200
10200
|
default:
|
|
10201
10201
|
return f;
|
|
10202
10202
|
}
|
|
10203
|
-
return w.next_out = et, w.avail_out = nt, w.next_in = V, w.avail_in = H, T.hold = z, T.bits = U, (T.wsize || st !== w.avail_out && T.mode < 30 && (T.mode < 27 || P !== 4)) && k(w, w.output, w.next_out, st - w.avail_out) ? (T.mode = 31, -4) : (ot -= w.avail_in, st -= w.avail_out, w.total_in += ot, w.total_out += st, T.total += st, T.wrap && st && (w.adler = T.check = T.flags ? o(T.check, j, st, w.next_out - st) : r(T.check, j, st, w.next_out - st)), w.data_type = T.bits + (T.last ? 64 : 0) + (T.mode === 12 ? 128 : 0) + (T.mode === 20 || T.mode === 15 ? 256 : 0), (ot == 0 && st === 0 || P === 4) && W ===
|
|
10203
|
+
return w.next_out = et, w.avail_out = nt, w.next_in = V, w.avail_in = H, T.hold = z, T.bits = U, (T.wsize || st !== w.avail_out && T.mode < 30 && (T.mode < 27 || P !== 4)) && k(w, w.output, w.next_out, st - w.avail_out) ? (T.mode = 31, -4) : (ot -= w.avail_in, st -= w.avail_out, w.total_in += ot, w.total_out += st, T.total += st, T.wrap && st && (w.adler = T.check = T.flags ? o(T.check, j, st, w.next_out - st) : r(T.check, j, st, w.next_out - st)), w.data_type = T.bits + (T.last ? 64 : 0) + (T.mode === 12 ? 128 : 0) + (T.mode === 20 || T.mode === 15 ? 256 : 0), (ot == 0 && st === 0 || P === 4) && W === u && (W = -5), W);
|
|
10204
10204
|
}, i.inflateEnd = function(w) {
|
|
10205
10205
|
if (!w || !w.state)
|
|
10206
10206
|
return f;
|
|
10207
10207
|
var P = w.state;
|
|
10208
|
-
return P.window && (P.window = null), w.state = null,
|
|
10208
|
+
return P.window && (P.window = null), w.state = null, u;
|
|
10209
10209
|
}, i.inflateGetHeader = function(w, P) {
|
|
10210
10210
|
var T;
|
|
10211
|
-
return w && w.state && 2 & (T = w.state).wrap ? ((T.head = P).done = !1,
|
|
10211
|
+
return w && w.state && 2 & (T = w.state).wrap ? ((T.head = P).done = !1, u) : f;
|
|
10212
10212
|
}, i.inflateSetDictionary = function(w, P) {
|
|
10213
10213
|
var T, M = P.length;
|
|
10214
|
-
return w && w.state ? (T = w.state).wrap !== 0 && T.mode !== 11 ? f : T.mode === 11 && r(1, P, M, 0) !== T.check ? -3 : k(w, P, M, M) ? (T.mode = 31, -4) : (T.havedict = 1,
|
|
10214
|
+
return w && w.state ? (T = w.state).wrap !== 0 && T.mode !== 11 ? f : T.mode === 11 && r(1, P, M, 0) !== T.check ? -3 : k(w, P, M, M) ? (T.mode = 31, -4) : (T.havedict = 1, u) : f;
|
|
10215
10215
|
}, i.inflateInfo = "pako inflate (from Nodeca project)";
|
|
10216
10216
|
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./inffast": 48, "./inftrees": 50 }], 50: [function(t, s, i) {
|
|
10217
10217
|
var n = t("../utils/common"), r = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0], o = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78], a = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0], l = [16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64];
|
|
10218
|
-
s.exports = function(h,
|
|
10218
|
+
s.exports = function(h, d, u, f, E, p, I, m) {
|
|
10219
10219
|
var _, y, C, R, F, O, L, N, x, k = m.bits, w = 0, P = 0, T = 0, M = 0, j = 0, V = 0, et = 0, H = 0, nt = 0, z = 0, U = null, ot = 0, st = new n.Buf16(16), tt = new n.Buf16(16), Rt = null, Ot = 0;
|
|
10220
10220
|
for (w = 0; w <= 15; w++)
|
|
10221
10221
|
st[w] = 0;
|
|
10222
10222
|
for (P = 0; P < f; P++)
|
|
10223
|
-
st[u
|
|
10223
|
+
st[d[u + P]]++;
|
|
10224
10224
|
for (j = k, M = 15; 1 <= M && st[M] === 0; M--)
|
|
10225
10225
|
;
|
|
10226
10226
|
if (M < j && (j = M), M === 0)
|
|
@@ -10235,7 +10235,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
10235
10235
|
for (tt[1] = 0, w = 1; w < 15; w++)
|
|
10236
10236
|
tt[w + 1] = tt[w] + st[w];
|
|
10237
10237
|
for (P = 0; P < f; P++)
|
|
10238
|
-
u
|
|
10238
|
+
d[u + P] !== 0 && (I[tt[d[u + P]]++] = P);
|
|
10239
10239
|
if (O = h === 0 ? (U = Rt = I, 19) : h === 1 ? (U = r, ot -= 257, Rt = o, Ot -= 257, 256) : (U = a, Rt = l, -1), w = T, F = p, et = P = z = 0, C = -1, R = (nt = 1 << (V = j)) - 1, h === 1 && 852 < nt || h === 2 && 592 < nt)
|
|
10240
10240
|
return 1;
|
|
10241
10241
|
for (; ; ) {
|
|
@@ -10246,7 +10246,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
10246
10246
|
if (_ !== 0 ? (z &= _ - 1, z += _) : z = 0, P++, --st[w] == 0) {
|
|
10247
10247
|
if (w === M)
|
|
10248
10248
|
break;
|
|
10249
|
-
w = u
|
|
10249
|
+
w = d[u + I[P]];
|
|
10250
10250
|
}
|
|
10251
10251
|
if (j < w && (z & R) !== C) {
|
|
10252
10252
|
for (et === 0 && (et = j), F += T, H = 1 << (V = w - et); V + et < M && !((H -= st[V + et]) <= 0); )
|
|
@@ -10266,7 +10266,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
10266
10266
|
for (var D = S.length; 0 <= --D; )
|
|
10267
10267
|
S[D] = 0;
|
|
10268
10268
|
}
|
|
10269
|
-
var l = 0, h = 29,
|
|
10269
|
+
var l = 0, h = 29, d = 256, u = d + 1 + h, f = 30, E = 19, p = 2 * u + 1, I = 15, m = 16, _ = 7, y = 256, C = 16, R = 17, F = 18, O = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], L = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], N = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], x = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], k = new Array(2 * (u + 2));
|
|
10270
10270
|
a(k);
|
|
10271
10271
|
var w = new Array(2 * f);
|
|
10272
10272
|
a(w);
|
|
@@ -10311,7 +10311,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
10311
10311
|
}
|
|
10312
10312
|
function at(S) {
|
|
10313
10313
|
var D;
|
|
10314
|
-
for (D = 0; D <
|
|
10314
|
+
for (D = 0; D < u; D++)
|
|
10315
10315
|
S.dyn_ltree[2 * D] = 0;
|
|
10316
10316
|
for (D = 0; D < f; D++)
|
|
10317
10317
|
S.dyn_dtree[2 * D] = 0;
|
|
@@ -10334,7 +10334,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
10334
10334
|
function Gt(S, D, X) {
|
|
10335
10335
|
var Z, B, q, it, J = 0;
|
|
10336
10336
|
if (S.last_lit !== 0)
|
|
10337
|
-
for (; Z = S.pending_buf[S.d_buf + 2 * J] << 8 | S.pending_buf[S.d_buf + 2 * J + 1], B = S.pending_buf[S.l_buf + J], J++, Z === 0 ? tt(S, B, D) : (tt(S, (q = T[B]) +
|
|
10337
|
+
for (; Z = S.pending_buf[S.d_buf + 2 * J] << 8 | S.pending_buf[S.d_buf + 2 * J + 1], B = S.pending_buf[S.l_buf + J], J++, Z === 0 ? tt(S, B, D) : (tt(S, (q = T[B]) + d + 1, D), (it = O[q]) !== 0 && st(S, B -= M[q], it), tt(S, q = U(--Z), X), (it = L[q]) !== 0 && st(S, Z -= H[q], it)), J < S.last_lit; )
|
|
10338
10338
|
;
|
|
10339
10339
|
tt(S, y, D);
|
|
10340
10340
|
}
|
|
@@ -10412,9 +10412,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
10412
10412
|
k[2 * D + 1] = 7, D++, it[7]++;
|
|
10413
10413
|
for (; D <= 287; )
|
|
10414
10414
|
k[2 * D + 1] = 8, D++, it[8]++;
|
|
10415
|
-
for (Ot(k,
|
|
10415
|
+
for (Ot(k, u + 1, it), D = 0; D < f; D++)
|
|
10416
10416
|
w[2 * D + 1] = 5, w[2 * D] = Rt(D, 5);
|
|
10417
|
-
j = new nt(k, O,
|
|
10417
|
+
j = new nt(k, O, d + 1, u, I), V = new nt(w, L, 0, f, I), et = new nt(new Array(0), N, 0, E, _);
|
|
10418
10418
|
}(), Y = !0), S.l_desc = new z(S.dyn_ltree, j), S.d_desc = new z(S.dyn_dtree, V), S.bl_desc = new z(S.bl_tree, et), S.bi_buf = 0, S.bi_valid = 0, at(S);
|
|
10419
10419
|
}, i._tr_stored_block = b, i._tr_flush_block = function(S, D, X, Z) {
|
|
10420
10420
|
var B, q, it = 0;
|
|
@@ -10425,7 +10425,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
10425
10425
|
return r;
|
|
10426
10426
|
if (J.dyn_ltree[18] !== 0 || J.dyn_ltree[20] !== 0 || J.dyn_ltree[26] !== 0)
|
|
10427
10427
|
return o;
|
|
10428
|
-
for (ct = 32; ct <
|
|
10428
|
+
for (ct = 32; ct < d; ct++)
|
|
10429
10429
|
if (J.dyn_ltree[2 * ct] !== 0)
|
|
10430
10430
|
return o;
|
|
10431
10431
|
return r;
|
|
@@ -10441,7 +10441,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
10441
10441
|
W(J, J.dyn_ltree, ct - 1), W(J, J.dyn_dtree, Ct - 1);
|
|
10442
10442
|
}(S, S.l_desc.max_code + 1, S.d_desc.max_code + 1, it + 1), Gt(S, S.dyn_ltree, S.dyn_dtree)), at(S), Z && ft(S);
|
|
10443
10443
|
}, i._tr_tally = function(S, D, X) {
|
|
10444
|
-
return S.pending_buf[S.d_buf + 2 * S.last_lit] = D >>> 8 & 255, S.pending_buf[S.d_buf + 2 * S.last_lit + 1] = 255 & D, S.pending_buf[S.l_buf + S.last_lit] = 255 & X, S.last_lit++, D === 0 ? S.dyn_ltree[2 * X]++ : (S.matches++, D--, S.dyn_ltree[2 * (T[X] +
|
|
10444
|
+
return S.pending_buf[S.d_buf + 2 * S.last_lit] = D >>> 8 & 255, S.pending_buf[S.d_buf + 2 * S.last_lit + 1] = 255 & D, S.pending_buf[S.l_buf + S.last_lit] = 255 & X, S.last_lit++, D === 0 ? S.dyn_ltree[2 * X]++ : (S.matches++, D--, S.dyn_ltree[2 * (T[X] + d + 1)]++, S.dyn_dtree[2 * U(D)]++), S.last_lit === S.lit_bufsize - 1;
|
|
10445
10445
|
}, i._tr_align = function(S) {
|
|
10446
10446
|
st(S, 2, 3), tt(S, y, k), function(D) {
|
|
10447
10447
|
D.bi_valid === 16 ? (ot(D, D.bi_buf), D.bi_buf = 0, D.bi_valid = 0) : 8 <= D.bi_valid && (D.pending_buf[D.pending++] = 255 & D.bi_buf, D.bi_buf >>= 8, D.bi_valid -= 8);
|
|
@@ -10455,7 +10455,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
10455
10455
|
(function(n) {
|
|
10456
10456
|
(function(r, o) {
|
|
10457
10457
|
if (!r.setImmediate) {
|
|
10458
|
-
var a, l, h,
|
|
10458
|
+
var a, l, h, d, u = 1, f = {}, E = !1, p = r.document, I = Object.getPrototypeOf && Object.getPrototypeOf(r);
|
|
10459
10459
|
I = I && I.setTimeout ? I : r, a = {}.toString.call(r.process) === "[object process]" ? function(C) {
|
|
10460
10460
|
process.nextTick(function() {
|
|
10461
10461
|
_(C);
|
|
@@ -10467,8 +10467,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
10467
10467
|
C = !1;
|
|
10468
10468
|
}, r.postMessage("", "*"), r.onmessage = R, C;
|
|
10469
10469
|
}
|
|
10470
|
-
}() ? (
|
|
10471
|
-
r.postMessage(
|
|
10470
|
+
}() ? (d = "setImmediate$" + Math.random() + "$", r.addEventListener ? r.addEventListener("message", y, !1) : r.attachEvent("onmessage", y), function(C) {
|
|
10471
|
+
r.postMessage(d + C, "*");
|
|
10472
10472
|
}) : r.MessageChannel ? ((h = new MessageChannel()).port1.onmessage = function(C) {
|
|
10473
10473
|
_(C.data);
|
|
10474
10474
|
}, function(C) {
|
|
@@ -10485,7 +10485,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
10485
10485
|
for (var R = new Array(arguments.length - 1), F = 0; F < R.length; F++)
|
|
10486
10486
|
R[F] = arguments[F + 1];
|
|
10487
10487
|
var O = { callback: C, args: R };
|
|
10488
|
-
return f[
|
|
10488
|
+
return f[u] = O, a(u), u++;
|
|
10489
10489
|
}, I.clearImmediate = m;
|
|
10490
10490
|
}
|
|
10491
10491
|
function m(C) {
|
|
@@ -10525,7 +10525,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
10525
10525
|
}
|
|
10526
10526
|
}
|
|
10527
10527
|
function y(C) {
|
|
10528
|
-
C.source === r && typeof C.data == "string" && C.data.indexOf(
|
|
10528
|
+
C.source === r && typeof C.data == "string" && C.data.indexOf(d) === 0 && _(+C.data.slice(d.length));
|
|
10529
10529
|
}
|
|
10530
10530
|
})(typeof self > "u" ? n === void 0 ? this : n : self);
|
|
10531
10531
|
}).call(this, typeof ii < "u" ? ii : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
@@ -10540,12 +10540,12 @@ var wn = {}, Fi = {};
|
|
|
10540
10540
|
const l = [];
|
|
10541
10541
|
let h = a.exec(o);
|
|
10542
10542
|
for (; h; ) {
|
|
10543
|
-
const
|
|
10544
|
-
|
|
10545
|
-
const
|
|
10546
|
-
for (let f = 0; f <
|
|
10547
|
-
|
|
10548
|
-
l.push(
|
|
10543
|
+
const d = [];
|
|
10544
|
+
d.startIndex = a.lastIndex - h[0].length;
|
|
10545
|
+
const u = h.length;
|
|
10546
|
+
for (let f = 0; f < u; f++)
|
|
10547
|
+
d.push(h[f]);
|
|
10548
|
+
l.push(d), h = a.exec(o);
|
|
10549
10549
|
}
|
|
10550
10550
|
return l;
|
|
10551
10551
|
}, r = function(o) {
|
|
@@ -10558,9 +10558,9 @@ var wn = {}, Fi = {};
|
|
|
10558
10558
|
return Object.keys(o).length === 0;
|
|
10559
10559
|
}, c.merge = function(o, a, l) {
|
|
10560
10560
|
if (a) {
|
|
10561
|
-
const h = Object.keys(a),
|
|
10562
|
-
for (let
|
|
10563
|
-
l === "strict" ? o[h[
|
|
10561
|
+
const h = Object.keys(a), d = h.length;
|
|
10562
|
+
for (let u = 0; u < d; u++)
|
|
10563
|
+
l === "strict" ? o[h[u]] = [a[h[u]]] : o[h[u]] = a[h[u]];
|
|
10564
10564
|
}
|
|
10565
10565
|
}, c.getValue = function(o) {
|
|
10566
10566
|
return c.isExist(o) ? o : "";
|
|
@@ -10593,21 +10593,21 @@ wn.validate = function(c, e) {
|
|
|
10593
10593
|
` && c[n] !== "\r"; n++)
|
|
10594
10594
|
a += c[n];
|
|
10595
10595
|
if (a = a.trim(), a[a.length - 1] === "/" && (a = a.substring(0, a.length - 1), n--), !Cc(a)) {
|
|
10596
|
-
let
|
|
10597
|
-
return a.trim().length === 0 ?
|
|
10596
|
+
let d;
|
|
10597
|
+
return a.trim().length === 0 ? d = "Invalid space after '<'." : d = "Tag '" + a + "' is an invalid name.", bt("InvalidTag", d, Ut(c, n));
|
|
10598
10598
|
}
|
|
10599
10599
|
const l = pc(c, n);
|
|
10600
10600
|
if (l === !1)
|
|
10601
10601
|
return bt("InvalidAttr", "Attributes for '" + a + "' have open quote.", Ut(c, n));
|
|
10602
10602
|
let h = l.value;
|
|
10603
10603
|
if (n = l.index, h[h.length - 1] === "/") {
|
|
10604
|
-
const
|
|
10604
|
+
const d = n - h.length;
|
|
10605
10605
|
h = h.substring(0, h.length - 1);
|
|
10606
|
-
const
|
|
10607
|
-
if (
|
|
10606
|
+
const u = Ar(h, e);
|
|
10607
|
+
if (u === !0)
|
|
10608
10608
|
s = !0;
|
|
10609
10609
|
else
|
|
10610
|
-
return bt(
|
|
10610
|
+
return bt(u.err.code, u.err.msg, Ut(c, d + u.err.line));
|
|
10611
10611
|
} else if (o)
|
|
10612
10612
|
if (l.tagClosed) {
|
|
10613
10613
|
if (h.trim().length > 0)
|
|
@@ -10615,12 +10615,12 @@ wn.validate = function(c, e) {
|
|
|
10615
10615
|
if (t.length === 0)
|
|
10616
10616
|
return bt("InvalidTag", "Closing tag '" + a + "' has not been opened.", Ut(c, r));
|
|
10617
10617
|
{
|
|
10618
|
-
const
|
|
10619
|
-
if (a !==
|
|
10620
|
-
let
|
|
10618
|
+
const d = t.pop();
|
|
10619
|
+
if (a !== d.tagName) {
|
|
10620
|
+
let u = Ut(c, d.tagStartPos);
|
|
10621
10621
|
return bt(
|
|
10622
10622
|
"InvalidTag",
|
|
10623
|
-
"Expected closing tag '" +
|
|
10623
|
+
"Expected closing tag '" + d.tagName + "' (opened in line " + u.line + ", col " + u.col + ") instead of closing tag '" + a + "'.",
|
|
10624
10624
|
Ut(c, r)
|
|
10625
10625
|
);
|
|
10626
10626
|
}
|
|
@@ -10629,9 +10629,9 @@ wn.validate = function(c, e) {
|
|
|
10629
10629
|
} else
|
|
10630
10630
|
return bt("InvalidTag", "Closing tag '" + a + "' doesn't have proper closing.", Ut(c, n));
|
|
10631
10631
|
else {
|
|
10632
|
-
const
|
|
10633
|
-
if (
|
|
10634
|
-
return bt(
|
|
10632
|
+
const d = Ar(h, e);
|
|
10633
|
+
if (d !== !0)
|
|
10634
|
+
return bt(d.err.code, d.err.msg, Ut(c, n - h.length + d.err.line));
|
|
10635
10635
|
if (i === !0)
|
|
10636
10636
|
return bt("InvalidXml", "Multiple possible root nodes found.", Ut(c, n));
|
|
10637
10637
|
e.unpairedTags.indexOf(a) !== -1 || t.push({ tagName: a, tagStartPos: r }), s = !0;
|
|
@@ -10647,10 +10647,10 @@ wn.validate = function(c, e) {
|
|
|
10647
10647
|
} else
|
|
10648
10648
|
break;
|
|
10649
10649
|
else if (c[n] === "&") {
|
|
10650
|
-
const
|
|
10651
|
-
if (
|
|
10650
|
+
const d = Ic(c, n);
|
|
10651
|
+
if (d == -1)
|
|
10652
10652
|
return bt("InvalidChar", "char '&' is not expected.", Ut(c, n));
|
|
10653
|
-
n =
|
|
10653
|
+
n = d;
|
|
10654
10654
|
} else if (i === !0 && !Cr(c[n]))
|
|
10655
10655
|
return bt("InvalidXml", "Extra text at the end", Ut(c, n));
|
|
10656
10656
|
c[n] === "<" && n--;
|
|
@@ -11061,8 +11061,8 @@ const Zc = function(c) {
|
|
|
11061
11061
|
const o = Le(c, ">", n, "Closing Tag is not closed.");
|
|
11062
11062
|
let a = c.substring(n + 2, o).trim();
|
|
11063
11063
|
if (this.options.removeNSPrefix) {
|
|
11064
|
-
const
|
|
11065
|
-
|
|
11064
|
+
const d = a.indexOf(":");
|
|
11065
|
+
d !== -1 && (a = a.substr(d + 1));
|
|
11066
11066
|
}
|
|
11067
11067
|
this.options.transformTagName && (a = this.options.transformTagName(a)), t && (s = this.saveTextToParentTag(s, t, i));
|
|
11068
11068
|
const l = i.substring(i.lastIndexOf(".") + 1);
|
|
@@ -11097,7 +11097,7 @@ const Zc = function(c) {
|
|
|
11097
11097
|
} else {
|
|
11098
11098
|
let o = hn(c, n, this.options.removeNSPrefix), a = o.tagName;
|
|
11099
11099
|
const l = o.rawTagName;
|
|
11100
|
-
let h = o.tagExp,
|
|
11100
|
+
let h = o.tagExp, d = o.attrExpPresent, u = o.closeIndex;
|
|
11101
11101
|
this.options.transformTagName && (a = this.options.transformTagName(a)), t && s && t.tagname !== "!xml" && (s = this.saveTextToParentTag(s, t, i, !1));
|
|
11102
11102
|
const f = t;
|
|
11103
11103
|
if (f && this.options.unpairedTags.indexOf(f.tagname) !== -1 && (t = this.tagsNodeStack.pop(), i = i.substring(0, i.lastIndexOf("."))), a !== e.tagname && (i += i ? "." + a : a), this.isItStopNode(this.options.stopNodes, i, a)) {
|
|
@@ -11107,23 +11107,23 @@ const Zc = function(c) {
|
|
|
11107
11107
|
else if (this.options.unpairedTags.indexOf(a) !== -1)
|
|
11108
11108
|
n = o.closeIndex;
|
|
11109
11109
|
else {
|
|
11110
|
-
const I = this.readStopNodeData(c, l,
|
|
11110
|
+
const I = this.readStopNodeData(c, l, u + 1);
|
|
11111
11111
|
if (!I)
|
|
11112
11112
|
throw new Error(`Unexpected end of ${l}`);
|
|
11113
11113
|
n = I.i, E = I.tagContent;
|
|
11114
11114
|
}
|
|
11115
11115
|
const p = new Cs(a);
|
|
11116
|
-
a !== h &&
|
|
11116
|
+
a !== h && d && (p[":@"] = this.buildAttributesMap(h, i, a)), E && (E = this.parseTextData(E, a, i, !0, d, !0, !0)), i = i.substr(0, i.lastIndexOf(".")), p.add(this.options.textNodeName, E), this.addChild(t, p, i);
|
|
11117
11117
|
} else {
|
|
11118
11118
|
if (h.length > 0 && h.lastIndexOf("/") === h.length - 1) {
|
|
11119
11119
|
a[a.length - 1] === "/" ? (a = a.substr(0, a.length - 1), i = i.substr(0, i.length - 1), h = a) : h = h.substr(0, h.length - 1), this.options.transformTagName && (a = this.options.transformTagName(a));
|
|
11120
11120
|
const E = new Cs(a);
|
|
11121
|
-
a !== h &&
|
|
11121
|
+
a !== h && d && (E[":@"] = this.buildAttributesMap(h, i, a)), this.addChild(t, E, i), i = i.substr(0, i.lastIndexOf("."));
|
|
11122
11122
|
} else {
|
|
11123
11123
|
const E = new Cs(a);
|
|
11124
|
-
this.tagsNodeStack.push(t), a !== h &&
|
|
11124
|
+
this.tagsNodeStack.push(t), a !== h && d && (E[":@"] = this.buildAttributesMap(h, i, a)), this.addChild(t, E, i), t = E;
|
|
11125
11125
|
}
|
|
11126
|
-
s = "", n =
|
|
11126
|
+
s = "", n = u;
|
|
11127
11127
|
}
|
|
11128
11128
|
}
|
|
11129
11129
|
else
|
|
@@ -11213,8 +11213,8 @@ function hn(c, e, t, s = ">") {
|
|
|
11213
11213
|
o !== -1 && (a = n.substring(0, o), n = n.substring(o + 1).trimStart());
|
|
11214
11214
|
const h = a;
|
|
11215
11215
|
if (t) {
|
|
11216
|
-
const
|
|
11217
|
-
|
|
11216
|
+
const d = a.indexOf(":");
|
|
11217
|
+
d !== -1 && (a = a.substr(d + 1), l = a !== i.data.substr(d + 1));
|
|
11218
11218
|
}
|
|
11219
11219
|
return {
|
|
11220
11220
|
tagName: a,
|
|
@@ -11375,8 +11375,8 @@ function Hr(c, e, t, s) {
|
|
|
11375
11375
|
}
|
|
11376
11376
|
let h = s;
|
|
11377
11377
|
h !== "" && (h += e.indentBy);
|
|
11378
|
-
const
|
|
11379
|
-
e.unpairedTags.indexOf(a) !== -1 ? e.suppressUnpairedNode ? i +=
|
|
11378
|
+
const d = Rr(o[":@"], e), u = s + `<${a}${d}`, f = Hr(o[a], e, l, h);
|
|
11379
|
+
e.unpairedTags.indexOf(a) !== -1 ? e.suppressUnpairedNode ? i += u + ">" : i += u + "/>" : (!f || f.length === 0) && e.suppressEmptyNode ? i += u + "/>" : f && f.endsWith(">") ? i += u + `>${f}${s}</${a}>` : (i += u + ">", f && s !== "" && (f.includes("/>") || f.includes("</")) ? i += s + e.indentBy + f + s : i += f, i += `</${a}>`), n = !0;
|
|
11380
11380
|
}
|
|
11381
11381
|
return i;
|
|
11382
11382
|
}
|
|
@@ -11871,7 +11871,7 @@ ${t}
|
|
|
11871
11871
|
this.description && (l = `<Description>${this.description}</Description>`);
|
|
11872
11872
|
let h = null;
|
|
11873
11873
|
this.stage && (h = `<Stage>${this.stage}</Stage>`);
|
|
11874
|
-
const
|
|
11874
|
+
const d = this.createCommentTags(e), u = this.createViewpointTags(e), f = this.createLabelTags(e), E = this.createRelatedTopicTags(e);
|
|
11875
11875
|
return `
|
|
11876
11876
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
11877
11877
|
<Markup>
|
|
@@ -11889,11 +11889,11 @@ ${t}
|
|
|
11889
11889
|
${h ?? ""}
|
|
11890
11890
|
${f}
|
|
11891
11891
|
${E}
|
|
11892
|
-
${e === "3" ? u : ""}
|
|
11893
11892
|
${e === "3" ? d : ""}
|
|
11893
|
+
${e === "3" ? u : ""}
|
|
11894
11894
|
</Topic>
|
|
11895
|
-
${e === "2.1" ? u : ""}
|
|
11896
11895
|
${e === "2.1" ? d : ""}
|
|
11896
|
+
${e === "2.1" ? u : ""}
|
|
11897
11897
|
</Markup>
|
|
11898
11898
|
`;
|
|
11899
11899
|
}
|
|
@@ -12257,10 +12257,10 @@ const Pe = class Pe extends Ft {
|
|
|
12257
12257
|
const l = s.folder(a.guid);
|
|
12258
12258
|
l.file("markup.bcf", a.serialize());
|
|
12259
12259
|
for (const h of a.viewpoints) {
|
|
12260
|
-
const
|
|
12261
|
-
|
|
12260
|
+
const d = r.list.get(h);
|
|
12261
|
+
d && (l.file(`${h}.jpeg`, n, {
|
|
12262
12262
|
binary: !0
|
|
12263
|
-
}), l.file(`${h}.bcfv`, await
|
|
12263
|
+
}), l.file(`${h}.bcfv`, await d.serialize()));
|
|
12264
12264
|
}
|
|
12265
12265
|
}
|
|
12266
12266
|
return await s.generateAsync({ type: "blob" });
|
|
@@ -12361,14 +12361,14 @@ ${o}
|
|
|
12361
12361
|
}
|
|
12362
12362
|
if (!(l && (l === "2.1" || l === "3")))
|
|
12363
12363
|
throw new Error(`BCFTopics: ${l} is not supported.`);
|
|
12364
|
-
const
|
|
12364
|
+
const d = a.find(
|
|
12365
12365
|
(y) => y.name.endsWith(".extensions")
|
|
12366
12366
|
);
|
|
12367
|
-
if (r &&
|
|
12368
|
-
const y = await
|
|
12367
|
+
if (r && d) {
|
|
12368
|
+
const y = await d.async("string");
|
|
12369
12369
|
Fl(this, y);
|
|
12370
12370
|
}
|
|
12371
|
-
const
|
|
12371
|
+
const u = [], f = this.components.get(te), E = a.filter((y) => y.name.endsWith(".bcfv"));
|
|
12372
12372
|
for (const y of E) {
|
|
12373
12373
|
const C = await y.async("string"), R = Pe.xmlParser.parse(C).VisualizationInfo;
|
|
12374
12374
|
if (!R) {
|
|
@@ -12432,7 +12432,7 @@ ${o}
|
|
|
12432
12432
|
}
|
|
12433
12433
|
}
|
|
12434
12434
|
}
|
|
12435
|
-
if (
|
|
12435
|
+
if (u.push(w), L) {
|
|
12436
12436
|
const P = this.components.get(ln), T = Array.isArray(L.ClippingPlane) ? L.ClippingPlane : [L.ClippingPlane];
|
|
12437
12437
|
for (const M of T) {
|
|
12438
12438
|
const { Location: j, Direction: V } = M;
|
|
@@ -12494,7 +12494,7 @@ ${o}
|
|
|
12494
12494
|
for (const F of R)
|
|
12495
12495
|
C.relatedTopics.add(F);
|
|
12496
12496
|
}
|
|
12497
|
-
return this.onBCFImported.trigger(I), { viewpoints:
|
|
12497
|
+
return this.onBCFImported.trigger(I), { viewpoints: u, topics: I };
|
|
12498
12498
|
}
|
|
12499
12499
|
};
|
|
12500
12500
|
g(Pe, "uuid", "de977976-e4f6-4e4f-a01a-204727839802"), g(Pe, "xmlParser", new wl.XMLParser({
|
|
@@ -12728,14 +12728,14 @@ const Jt = class Jt extends Ft {
|
|
|
12728
12728
|
for (const l of s) {
|
|
12729
12729
|
const h = t.fragment.getInstancesIDs(l);
|
|
12730
12730
|
if (h)
|
|
12731
|
-
for (const
|
|
12732
|
-
a.add(
|
|
12731
|
+
for (const d of h)
|
|
12732
|
+
a.add(d);
|
|
12733
12733
|
}
|
|
12734
12734
|
} else
|
|
12735
12735
|
a.add(0);
|
|
12736
12736
|
for (const l of a) {
|
|
12737
|
-
const h = i.min.clone(),
|
|
12738
|
-
o && (t.getMatrixAt(l, r), h.applyMatrix4(r),
|
|
12737
|
+
const h = i.min.clone(), d = i.max.clone();
|
|
12738
|
+
o && (t.getMatrixAt(l, r), h.applyMatrix4(r), d.applyMatrix4(r)), h.applyMatrix4(n), d.applyMatrix4(n), h.x < this._absoluteMin.x && (this._absoluteMin.x = h.x), h.y < this._absoluteMin.y && (this._absoluteMin.y = h.y), h.z < this._absoluteMin.z && (this._absoluteMin.z = h.z), h.x > this._absoluteMax.x && (this._absoluteMax.x = h.x), h.y > this._absoluteMax.y && (this._absoluteMax.y = h.y), h.z > this._absoluteMax.z && (this._absoluteMax.z = h.z), d.x > this._absoluteMax.x && (this._absoluteMax.x = d.x), d.y > this._absoluteMax.y && (this._absoluteMax.y = d.y), d.z > this._absoluteMax.z && (this._absoluteMax.z = d.z), d.x < this._absoluteMin.x && (this._absoluteMin.x = d.x), d.y < this._absoluteMin.y && (this._absoluteMin.y = d.y), d.z < this._absoluteMin.z && (this._absoluteMin.z = d.z);
|
|
12739
12739
|
}
|
|
12740
12740
|
}
|
|
12741
12741
|
/**
|
|
@@ -12780,8 +12780,8 @@ const Jt = class Jt extends Ft {
|
|
|
12780
12780
|
l += 2;
|
|
12781
12781
|
continue;
|
|
12782
12782
|
}
|
|
12783
|
-
const h = a[l],
|
|
12784
|
-
|
|
12783
|
+
const h = a[l], d = s.getX(h), u = s.getY(h), f = s.getZ(h);
|
|
12784
|
+
d < r.x && (r.x = d), u < r.y && (r.y = u), f < r.z && (r.z = f), d > o.x && (o.x = d), u > o.y && (o.y = u), f > o.z && (o.z = f);
|
|
12785
12785
|
}
|
|
12786
12786
|
return new v.Box3(r, o);
|
|
12787
12787
|
}
|
|
@@ -12949,11 +12949,16 @@ const Xr = /* @__PURE__ */ new Set([
|
|
|
12949
12949
|
for (const l of o) {
|
|
12950
12950
|
if (Xr.has(l))
|
|
12951
12951
|
continue;
|
|
12952
|
-
const h = a.has(l) && n,
|
|
12953
|
-
for (const
|
|
12954
|
-
|
|
12955
|
-
|
|
12956
|
-
|
|
12952
|
+
const h = a.has(l) && n, d = t.GetLineIDsWithType(s, l);
|
|
12953
|
+
for (const u of d)
|
|
12954
|
+
try {
|
|
12955
|
+
const f = t.GetLine(0, u, h, i);
|
|
12956
|
+
r[f.expressID] = f;
|
|
12957
|
+
} catch {
|
|
12958
|
+
console.log(
|
|
12959
|
+
`Could not get property ${u}, with recursive ${h} and indirect ${i}.`
|
|
12960
|
+
);
|
|
12961
|
+
}
|
|
12957
12962
|
}
|
|
12958
12963
|
return r;
|
|
12959
12964
|
}
|
|
@@ -14269,8 +14274,8 @@ class ve {
|
|
|
14269
14274
|
const h = await e.getProperties(l.value);
|
|
14270
14275
|
if (!h || !h.UnitType || !h.UnitType.value || h.UnitType.value !== "LENGTHUNIT")
|
|
14271
14276
|
continue;
|
|
14272
|
-
let
|
|
14273
|
-
return h.Name.value === "METRE" && (f = 1), h.Name.value === "FOOT" && (f = 0.3048), ((r = h.Prefix) == null ? void 0 : r.value) === "MILLI" ?
|
|
14277
|
+
let u = 1, f = 1;
|
|
14278
|
+
return h.Name.value === "METRE" && (f = 1), h.Name.value === "FOOT" && (f = 0.3048), ((r = h.Prefix) == null ? void 0 : r.value) === "MILLI" ? u = 1e-3 : ((o = h.Prefix) == null ? void 0 : o.value) === "CENTI" ? u = 0.01 : ((a = h.Prefix) == null ? void 0 : a.value) === "DECI" && (u = 0.1), f * u;
|
|
14274
14279
|
}
|
|
14275
14280
|
return 1;
|
|
14276
14281
|
}
|
|
@@ -14292,14 +14297,14 @@ class ve {
|
|
|
14292
14297
|
const h = await e.getProperties(l);
|
|
14293
14298
|
if (!h)
|
|
14294
14299
|
continue;
|
|
14295
|
-
const
|
|
14300
|
+
const d = h.type === t, u = Object.keys(h).find(
|
|
14296
14301
|
(m) => m.startsWith("Relating")
|
|
14297
14302
|
), f = Object.keys(h).find(
|
|
14298
14303
|
(m) => m.startsWith("Related")
|
|
14299
14304
|
);
|
|
14300
|
-
if (!(
|
|
14305
|
+
if (!(d && u && f))
|
|
14301
14306
|
continue;
|
|
14302
|
-
const E = await e.getProperties((a = h[
|
|
14307
|
+
const E = await e.getProperties((a = h[u]) == null ? void 0 : a.value), p = h[f];
|
|
14303
14308
|
if (!E || !p || !(p && Array.isArray(p)))
|
|
14304
14309
|
continue;
|
|
14305
14310
|
const I = p.map((m) => m.value);
|
|
@@ -14466,48 +14471,48 @@ class $r {
|
|
|
14466
14471
|
s.add(i.get(l));
|
|
14467
14472
|
const n = e.GetLineIDsWithType(0, K.IFCRELAGGREGATES), r = n.size();
|
|
14468
14473
|
for (let l = 0; l < r; l++) {
|
|
14469
|
-
const h = n.get(l),
|
|
14470
|
-
if (!
|
|
14474
|
+
const h = n.get(l), d = e.GetLine(0, h);
|
|
14475
|
+
if (!d || !d.RelatingObject || !d.RelatedObjects)
|
|
14471
14476
|
continue;
|
|
14472
|
-
const
|
|
14477
|
+
const u = d.RelatingObject.value, f = d.RelatedObjects;
|
|
14473
14478
|
for (const E of f) {
|
|
14474
14479
|
const p = E.value;
|
|
14475
|
-
s.has(p) && (this.itemsByFloor[p] =
|
|
14480
|
+
s.has(p) && (this.itemsByFloor[p] = u);
|
|
14476
14481
|
}
|
|
14477
14482
|
}
|
|
14478
14483
|
const o = {}, a = t.size();
|
|
14479
14484
|
for (let l = 0; l < a; l++) {
|
|
14480
|
-
const h = t.get(l),
|
|
14481
|
-
if (!
|
|
14485
|
+
const h = t.get(l), d = e.GetLine(0, h);
|
|
14486
|
+
if (!d || !d.RelatingStructure || !d.RelatedElements)
|
|
14482
14487
|
continue;
|
|
14483
|
-
const
|
|
14484
|
-
if (s.has(
|
|
14488
|
+
const u = d.RelatingStructure.value, f = d.RelatedElements;
|
|
14489
|
+
if (s.has(u))
|
|
14485
14490
|
for (const E of f) {
|
|
14486
|
-
o[
|
|
14491
|
+
o[u] || (o[u] = []);
|
|
14487
14492
|
const p = E.value;
|
|
14488
|
-
o[
|
|
14493
|
+
o[u].push(p);
|
|
14489
14494
|
}
|
|
14490
14495
|
else
|
|
14491
14496
|
for (const E of f) {
|
|
14492
14497
|
const p = E.value;
|
|
14493
|
-
this.itemsByFloor[p] =
|
|
14498
|
+
this.itemsByFloor[p] = u;
|
|
14494
14499
|
}
|
|
14495
14500
|
}
|
|
14496
14501
|
for (const l in o) {
|
|
14497
14502
|
const h = this.itemsByFloor[l];
|
|
14498
14503
|
if (h !== void 0) {
|
|
14499
|
-
const
|
|
14500
|
-
for (const
|
|
14501
|
-
this.itemsByFloor[
|
|
14504
|
+
const d = o[l];
|
|
14505
|
+
for (const u of d)
|
|
14506
|
+
this.itemsByFloor[u] = h;
|
|
14502
14507
|
}
|
|
14503
14508
|
}
|
|
14504
14509
|
for (let l = 0; l < r; l++) {
|
|
14505
|
-
const h = n.get(l),
|
|
14506
|
-
if (!
|
|
14510
|
+
const h = n.get(l), d = e.GetLine(0, h);
|
|
14511
|
+
if (!d || !d.RelatingObject || !d.RelatedObjects)
|
|
14507
14512
|
continue;
|
|
14508
|
-
const
|
|
14513
|
+
const u = d.RelatingObject.value, f = d.RelatedObjects;
|
|
14509
14514
|
for (const E of f) {
|
|
14510
|
-
const p = E.value, I = this.itemsByFloor[
|
|
14515
|
+
const p = E.value, I = this.itemsByFloor[u];
|
|
14511
14516
|
I !== void 0 && (this.itemsByFloor[p] = I);
|
|
14512
14517
|
}
|
|
14513
14518
|
}
|
|
@@ -14593,32 +14598,32 @@ class jr {
|
|
|
14593
14598
|
for (const n of e) {
|
|
14594
14599
|
const r = {};
|
|
14595
14600
|
if (n.data)
|
|
14596
|
-
for (const
|
|
14597
|
-
const [f, E] =
|
|
14601
|
+
for (const u of n.data) {
|
|
14602
|
+
const [f, E] = u.split(": "), p = parseFloat(E);
|
|
14598
14603
|
r[f] = p || E;
|
|
14599
14604
|
}
|
|
14600
14605
|
const { points: o } = n, a = new Float32Array(o.length * 3);
|
|
14601
|
-
for (let
|
|
14602
|
-
const { x: f, y: E, z: p } = o[
|
|
14603
|
-
a[
|
|
14606
|
+
for (let u = 0; u < o.length; u++) {
|
|
14607
|
+
const { x: f, y: E, z: p } = o[u];
|
|
14608
|
+
a[u * 3] = f, a[u * 3 + 1] = E, a[u * 3 + 2] = p || 0;
|
|
14604
14609
|
}
|
|
14605
14610
|
const l = new v.BufferAttribute(a, 3), h = new v.EdgesGeometry();
|
|
14606
14611
|
h.setAttribute("position", l);
|
|
14607
|
-
const
|
|
14612
|
+
const d = new Ae.CurveMesh(
|
|
14608
14613
|
i,
|
|
14609
14614
|
r,
|
|
14610
14615
|
t,
|
|
14611
14616
|
h,
|
|
14612
14617
|
this.defLineMat
|
|
14613
14618
|
);
|
|
14614
|
-
s.push(
|
|
14619
|
+
s.push(d.curve), i++;
|
|
14615
14620
|
}
|
|
14616
14621
|
return s;
|
|
14617
14622
|
}
|
|
14618
14623
|
}
|
|
14619
14624
|
class Qr {
|
|
14620
14625
|
getNameInfo(e) {
|
|
14621
|
-
var
|
|
14626
|
+
var d;
|
|
14622
14627
|
const t = {}, { arguments: s } = e.GetHeaderLine(0, K.FILE_NAME) || {};
|
|
14623
14628
|
if (!s)
|
|
14624
14629
|
return t;
|
|
@@ -14633,10 +14638,10 @@ class Qr {
|
|
|
14633
14638
|
] = s;
|
|
14634
14639
|
if (i != null && i.value && (t.name = i.value), n != null && n.value && (t.creationDate = new Date(n.value)), r) {
|
|
14635
14640
|
t.author = {};
|
|
14636
|
-
const [
|
|
14637
|
-
|
|
14641
|
+
const [u, f] = r;
|
|
14642
|
+
u != null && u.value && (t.author.name = u.value), f != null && f.value && (t.author.email = f.value);
|
|
14638
14643
|
}
|
|
14639
|
-
return (
|
|
14644
|
+
return (d = o[0]) != null && d.value && (t.organization = o[0].value), a != null && a.value && (t.preprocessorVersion = a == null ? void 0 : a.value), l != null && l.value && (t.originatingSystem = l == null ? void 0 : l.value), h != null && h.value && (t.authorization = h == null ? void 0 : h.value), t;
|
|
14640
14645
|
}
|
|
14641
14646
|
getDescriptionInfo(e) {
|
|
14642
14647
|
var r;
|
|
@@ -14762,8 +14767,8 @@ const Ss = class Ss extends Ft {
|
|
|
14762
14767
|
const h = o[l];
|
|
14763
14768
|
if (!h || !h.GlobalId)
|
|
14764
14769
|
continue;
|
|
14765
|
-
const
|
|
14766
|
-
n.globalToExpressIDs.set(
|
|
14770
|
+
const d = h.GlobalId.value || h.GlobalId;
|
|
14771
|
+
n.globalToExpressIDs.set(d, l);
|
|
14767
14772
|
}
|
|
14768
14773
|
return qr.get(n, this.webIfc), this.cleanUp(), console.log(`Streaming the IFC took ${performance.now() - i} ms!`), n;
|
|
14769
14774
|
}
|
|
@@ -14831,10 +14836,10 @@ const Ss = class Ss extends Ft {
|
|
|
14831
14836
|
continue;
|
|
14832
14837
|
const a = this.webIfc.GetLineIDsWithType(0, r), l = a.size();
|
|
14833
14838
|
for (let h = 0; h < l; h++) {
|
|
14834
|
-
const
|
|
14835
|
-
i.push(
|
|
14836
|
-
const
|
|
14837
|
-
s.data.set(
|
|
14839
|
+
const d = a.get(h);
|
|
14840
|
+
i.push(d);
|
|
14841
|
+
const u = this._spatialTree.itemsByFloor[d] || 0;
|
|
14842
|
+
s.data.set(d, [[], [u, r]]);
|
|
14838
14843
|
}
|
|
14839
14844
|
}
|
|
14840
14845
|
this._spatialTree.cleanUp(), this.webIfc.StreamMeshes(0, i, (r) => {
|
|
@@ -14859,9 +14864,9 @@ const Ss = class Ss extends Ft {
|
|
|
14859
14864
|
getMesh(t, s) {
|
|
14860
14865
|
const i = t.geometries.size(), n = t.expressID;
|
|
14861
14866
|
for (let r = 0; r < i; r++) {
|
|
14862
|
-
const o = t.geometries.get(r), { x: a, y: l, z: h, w:
|
|
14867
|
+
const o = t.geometries.get(r), { x: a, y: l, z: h, w: d } = o.color, u = d !== 1, { geometryExpressID: f } = o, E = `${f}-${u}`;
|
|
14863
14868
|
if (!this._visitedFragments.has(E)) {
|
|
14864
|
-
const R = this.getGeometry(this.webIfc, f), F =
|
|
14869
|
+
const R = this.getGeometry(this.webIfc, f), F = u ? this._materialT : this._material, O = new Ae.Fragment(R, F, 1);
|
|
14865
14870
|
s.add(O.mesh), s.items.push(O);
|
|
14866
14871
|
const L = this._visitedFragments.size;
|
|
14867
14872
|
this._visitedFragments.set(E, { index: L, fragment: O });
|
|
@@ -14897,10 +14902,10 @@ const Ss = class Ss extends Ft {
|
|
|
14897
14902
|
i.GetVertexData(),
|
|
14898
14903
|
i.GetVertexDataSize()
|
|
14899
14904
|
), o = new Float32Array(r.length / 2), a = new Float32Array(r.length / 2);
|
|
14900
|
-
for (let
|
|
14901
|
-
o[
|
|
14902
|
-
const l = new v.BufferGeometry(), h = new v.BufferAttribute(o, 3),
|
|
14903
|
-
return l.setAttribute("position", h), l.setAttribute("normal",
|
|
14905
|
+
for (let u = 0; u < r.length; u += 6)
|
|
14906
|
+
o[u / 2] = r[u], o[u / 2 + 1] = r[u + 1], o[u / 2 + 2] = r[u + 2], a[u / 2] = r[u + 3], a[u / 2 + 1] = r[u + 4], a[u / 2 + 2] = r[u + 5];
|
|
14907
|
+
const l = new v.BufferGeometry(), h = new v.BufferAttribute(o, 3), d = new v.BufferAttribute(a, 3);
|
|
14908
|
+
return l.setAttribute("position", h), l.setAttribute("normal", d), l.setIndex(Array.from(n)), i.delete(), l;
|
|
14904
14909
|
}
|
|
14905
14910
|
async autoSetWasm() {
|
|
14906
14911
|
const t = await fetch(
|
|
@@ -15037,15 +15042,15 @@ const Te = class Te extends Ft {
|
|
|
15037
15042
|
[]
|
|
15038
15043
|
);
|
|
15039
15044
|
h.expressID = this.getNewExpressID(t);
|
|
15040
|
-
const
|
|
15041
|
-
|
|
15045
|
+
const d = this.newGUID(t), u = new K[n].IfcRelDefinesByProperties(
|
|
15046
|
+
d,
|
|
15042
15047
|
r,
|
|
15043
15048
|
null,
|
|
15044
15049
|
null,
|
|
15045
15050
|
[],
|
|
15046
15051
|
new K.Handle(h.expressID)
|
|
15047
15052
|
);
|
|
15048
|
-
return
|
|
15053
|
+
return u.expressID = this.getNewExpressID(t), await this.setData(t, h, u), { pset: h, rel: u };
|
|
15049
15054
|
}
|
|
15050
15055
|
/**
|
|
15051
15056
|
* Removes a Property Set (Pset) from the given model.
|
|
@@ -15389,11 +15394,11 @@ const Ii = class Ii extends Ft {
|
|
|
15389
15394
|
for (const l of a) {
|
|
15390
15395
|
const h = this.list[o][l];
|
|
15391
15396
|
if (h)
|
|
15392
|
-
for (const
|
|
15393
|
-
n[
|
|
15394
|
-
for (const
|
|
15395
|
-
const f = n[
|
|
15396
|
-
f === void 0 ? n[
|
|
15397
|
+
for (const d in h.map) {
|
|
15398
|
+
n[d] || (n[d] = /* @__PURE__ */ new Map());
|
|
15399
|
+
for (const u of h.map[d]) {
|
|
15400
|
+
const f = n[d].get(u);
|
|
15401
|
+
f === void 0 ? n[d].set(u, 1) : n[d].set(u, f + 1);
|
|
15397
15402
|
}
|
|
15398
15403
|
}
|
|
15399
15404
|
}
|
|
@@ -15463,9 +15468,9 @@ const Ii = class Ii extends Ft {
|
|
|
15463
15468
|
name: a
|
|
15464
15469
|
});
|
|
15465
15470
|
const l = s[a];
|
|
15466
|
-
for (const [h,
|
|
15467
|
-
const
|
|
15468
|
-
for (const f of
|
|
15471
|
+
for (const [h, d] of t.data) {
|
|
15472
|
+
const u = d[0];
|
|
15473
|
+
for (const f of u) {
|
|
15469
15474
|
const E = t.keyFragments.get(f);
|
|
15470
15475
|
if (!E)
|
|
15471
15476
|
throw new Error("Fragment ID not found!");
|
|
@@ -15552,22 +15557,22 @@ const Ii = class Ii extends Ft {
|
|
|
15552
15557
|
`Classifier: model relations of ${t.name || t.uuid} have to exists to group by spatial structure.`
|
|
15553
15558
|
);
|
|
15554
15559
|
const r = "spatialStructures", a = s.useProperties === void 0 || s.useProperties;
|
|
15555
|
-
for (const [
|
|
15560
|
+
for (const [d] of n) {
|
|
15556
15561
|
if (s.isolate) {
|
|
15557
|
-
const p = t.data.get(
|
|
15562
|
+
const p = t.data.get(d);
|
|
15558
15563
|
if (!p)
|
|
15559
15564
|
continue;
|
|
15560
15565
|
const I = p[1][1];
|
|
15561
15566
|
if (I === void 0 || !s.isolate.has(I))
|
|
15562
15567
|
continue;
|
|
15563
15568
|
}
|
|
15564
|
-
const
|
|
15569
|
+
const u = i.getEntityRelations(
|
|
15565
15570
|
t,
|
|
15566
|
-
|
|
15571
|
+
d,
|
|
15567
15572
|
"Decomposes"
|
|
15568
15573
|
);
|
|
15569
|
-
if (
|
|
15570
|
-
for (const p of
|
|
15574
|
+
if (u)
|
|
15575
|
+
for (const p of u) {
|
|
15571
15576
|
let I = p.toString();
|
|
15572
15577
|
if (a) {
|
|
15573
15578
|
const m = await t.getProperties(p);
|
|
@@ -15575,24 +15580,24 @@ const Ii = class Ii extends Ft {
|
|
|
15575
15580
|
continue;
|
|
15576
15581
|
I = (l = m.Name) == null ? void 0 : l.value;
|
|
15577
15582
|
}
|
|
15578
|
-
this.saveItem(t, r, I,
|
|
15583
|
+
this.saveItem(t, r, I, d, p);
|
|
15579
15584
|
}
|
|
15580
15585
|
const f = i.getEntityRelations(
|
|
15581
15586
|
t,
|
|
15582
|
-
|
|
15587
|
+
d,
|
|
15583
15588
|
"ContainsElements"
|
|
15584
15589
|
);
|
|
15585
15590
|
if (!f)
|
|
15586
15591
|
continue;
|
|
15587
|
-
let E =
|
|
15592
|
+
let E = d.toString();
|
|
15588
15593
|
if (a) {
|
|
15589
|
-
const p = await t.getProperties(
|
|
15594
|
+
const p = await t.getProperties(d);
|
|
15590
15595
|
if (!p)
|
|
15591
15596
|
continue;
|
|
15592
15597
|
E = (h = p.Name) == null ? void 0 : h.value;
|
|
15593
15598
|
}
|
|
15594
15599
|
for (const p of f) {
|
|
15595
|
-
this.saveItem(t, r, E, p,
|
|
15600
|
+
this.saveItem(t, r, E, p, d);
|
|
15596
15601
|
const I = i.getEntityRelations(
|
|
15597
15602
|
t,
|
|
15598
15603
|
Number(p),
|
|
@@ -15600,7 +15605,7 @@ const Ii = class Ii extends Ft {
|
|
|
15600
15605
|
);
|
|
15601
15606
|
if (I)
|
|
15602
15607
|
for (const m of I)
|
|
15603
|
-
this.saveItem(t, r, E, m,
|
|
15608
|
+
this.saveItem(t, r, E, m, d);
|
|
15604
15609
|
}
|
|
15605
15610
|
}
|
|
15606
15611
|
}
|
|
@@ -15720,12 +15725,12 @@ const gi = class gi extends Ft {
|
|
|
15720
15725
|
for (const l in o) {
|
|
15721
15726
|
a.elements[13] = r * n * this.height;
|
|
15722
15727
|
for (const h in o[l].map) {
|
|
15723
|
-
const
|
|
15724
|
-
if (!
|
|
15728
|
+
const d = i.list.get(h), u = l + h, f = this.list.has(u);
|
|
15729
|
+
if (!d || t && f || !t && !f)
|
|
15725
15730
|
continue;
|
|
15726
|
-
t ? this.list.add(
|
|
15731
|
+
t ? this.list.add(u) : this.list.delete(u);
|
|
15727
15732
|
const E = o[l].map[h];
|
|
15728
|
-
|
|
15733
|
+
d.applyTransform(E, a), d.mesh.computeBoundingSphere(), d.mesh.computeBoundingBox();
|
|
15729
15734
|
}
|
|
15730
15735
|
r++;
|
|
15731
15736
|
}
|
|
@@ -15940,9 +15945,9 @@ const Ti = class Ti extends Ft {
|
|
|
15940
15945
|
I > l && (l += 0.01, l = Math.max(l, I), this.onProgress.trigger(Math.round(l * 100) / 100));
|
|
15941
15946
|
}
|
|
15942
15947
|
this._geometryCount && await this.streamGeometries(), this._assets.length && await this.streamAssets();
|
|
15943
|
-
const { opaque:
|
|
15948
|
+
const { opaque: d, transparent: u } = r.geometryIDs;
|
|
15944
15949
|
for (const [p, { index: I, uuid: m }] of this._visitedGeometries)
|
|
15945
|
-
r.keyFragments.set(I, m), (p > 1 ?
|
|
15950
|
+
r.keyFragments.set(I, m), (p > 1 ? d : u).set(p, I);
|
|
15946
15951
|
qr.get(r, this.webIfc);
|
|
15947
15952
|
const f = this.webIfc.GetCoordinationMatrix(0);
|
|
15948
15953
|
r.coordinationMatrix.fromArray(f), r.civilData = this._civil.read(this.webIfc);
|
|
@@ -15959,13 +15964,13 @@ const Ti = class Ti extends Ft {
|
|
|
15959
15964
|
getMesh(t, s, i) {
|
|
15960
15965
|
const n = s.geometries.size(), r = s.expressID, o = { id: r, geometries: [] };
|
|
15961
15966
|
for (let a = 0; a < n; a++) {
|
|
15962
|
-
const l = s.geometries.get(a), h = l.geometryExpressID,
|
|
15963
|
-
if (!this._visitedGeometries.has(
|
|
15967
|
+
const l = s.geometries.get(a), h = l.geometryExpressID, d = l.color.w === 1 ? 1 : -1, u = h * d;
|
|
15968
|
+
if (!this._visitedGeometries.has(u)) {
|
|
15964
15969
|
this._visitedGeometries.has(h) || this.getGeometry(t, h);
|
|
15965
15970
|
const R = this._visitedGeometries.size, F = v.MathUtils.generateUUID();
|
|
15966
|
-
this._visitedGeometries.set(
|
|
15971
|
+
this._visitedGeometries.set(u, { uuid: F, index: R });
|
|
15967
15972
|
}
|
|
15968
|
-
const f = this._visitedGeometries.get(
|
|
15973
|
+
const f = this._visitedGeometries.get(u);
|
|
15969
15974
|
if (f === void 0)
|
|
15970
15975
|
throw new Error("Error getting geometry data for streaming!");
|
|
15971
15976
|
const E = i.data.get(r);
|
|
@@ -15987,12 +15992,12 @@ const Ti = class Ti extends Ft {
|
|
|
15987
15992
|
), o = new Float32Array(r.length / 2), a = new Float32Array(r.length / 2);
|
|
15988
15993
|
for (let f = 0; f < r.length; f += 6)
|
|
15989
15994
|
o[f / 2] = r[f], o[f / 2 + 1] = r[f + 1], o[f / 2 + 2] = r[f + 2], a[f / 2] = r[f + 3], a[f / 2 + 1] = r[f + 4], a[f / 2 + 2] = r[f + 5];
|
|
15990
|
-
const l = ba(o), h = new Float32Array(l.transformation.elements),
|
|
15991
|
-
let
|
|
15995
|
+
const l = ba(o), h = new Float32Array(l.transformation.elements), d = [l.center.x, l.center.y, l.center.z];
|
|
15996
|
+
let u = !1;
|
|
15992
15997
|
for (let f = 0; f < o.length - 2; f += 3) {
|
|
15993
15998
|
const E = o[f], p = o[f + 1], I = o[f + 2], m = a[f], _ = a[f + 1], y = a[f + 2];
|
|
15994
|
-
if (Pa(
|
|
15995
|
-
|
|
15999
|
+
if (Pa(d, [E, p, I], [m, _, y])) {
|
|
16000
|
+
u = !0;
|
|
15996
16001
|
break;
|
|
15997
16002
|
}
|
|
15998
16003
|
}
|
|
@@ -16001,7 +16006,7 @@ const Ti = class Ti extends Ft {
|
|
|
16001
16006
|
normal: a,
|
|
16002
16007
|
index: n,
|
|
16003
16008
|
boundingBox: h,
|
|
16004
|
-
hasHoles:
|
|
16009
|
+
hasHoles: u
|
|
16005
16010
|
}), i.delete(), this._geometryCount++;
|
|
16006
16011
|
}
|
|
16007
16012
|
async streamAssets() {
|
|
@@ -16105,13 +16110,13 @@ class Ll extends Ft {
|
|
|
16105
16110
|
for (const l of s) {
|
|
16106
16111
|
if (r++, Xr.has(l))
|
|
16107
16112
|
continue;
|
|
16108
|
-
const h = i.has(l),
|
|
16113
|
+
const h = i.has(l), d = this.webIfc.GetLineIDsWithType(0, l), u = d.size();
|
|
16109
16114
|
let f = 0;
|
|
16110
|
-
for (let p = 0; p <
|
|
16115
|
+
for (let p = 0; p < u - t; p += t) {
|
|
16111
16116
|
const I = {};
|
|
16112
16117
|
for (let m = 0; m < t; m++) {
|
|
16113
16118
|
f++;
|
|
16114
|
-
const _ =
|
|
16119
|
+
const _ = d.get(p + m);
|
|
16115
16120
|
try {
|
|
16116
16121
|
const y = this.webIfc.GetLine(0, _, h);
|
|
16117
16122
|
I[y.expressID] = y;
|
|
@@ -16121,10 +16126,10 @@ class Ll extends Ft {
|
|
|
16121
16126
|
}
|
|
16122
16127
|
await this.onPropertiesStreamed.trigger({ type: l, data: I });
|
|
16123
16128
|
}
|
|
16124
|
-
if (f !==
|
|
16129
|
+
if (f !== u) {
|
|
16125
16130
|
const p = {};
|
|
16126
|
-
for (let I = f; I <
|
|
16127
|
-
const m =
|
|
16131
|
+
for (let I = f; I < u; I++) {
|
|
16132
|
+
const m = d.get(I);
|
|
16128
16133
|
try {
|
|
16129
16134
|
const _ = this.webIfc.GetLine(0, m, h);
|
|
16130
16135
|
p[_.expressID] = _;
|
|
@@ -16320,8 +16325,8 @@ class Kr {
|
|
|
16320
16325
|
const h = await o.getProperties(l);
|
|
16321
16326
|
if (!h)
|
|
16322
16327
|
continue;
|
|
16323
|
-
const
|
|
16324
|
-
|
|
16328
|
+
const d = (i = h.GlobalId) == null ? void 0 : i.value;
|
|
16329
|
+
d && this.selectionComponents.add(d);
|
|
16325
16330
|
}
|
|
16326
16331
|
}
|
|
16327
16332
|
this._components.get(te).list.set(this.guid, this);
|
|
@@ -16475,14 +16480,14 @@ class Kr {
|
|
|
16475
16480
|
if (!l)
|
|
16476
16481
|
continue;
|
|
16477
16482
|
const h = o[a];
|
|
16478
|
-
for (const
|
|
16479
|
-
const
|
|
16480
|
-
if (!
|
|
16483
|
+
for (const d of h) {
|
|
16484
|
+
const u = await l.getProperties(d);
|
|
16485
|
+
if (!u)
|
|
16481
16486
|
continue;
|
|
16482
|
-
const f = (n =
|
|
16487
|
+
const f = (n = u.GlobalId) == null ? void 0 : n.value;
|
|
16483
16488
|
if (!f)
|
|
16484
16489
|
continue;
|
|
16485
|
-
const E = (r =
|
|
16490
|
+
const E = (r = u.Tag) == null ? void 0 : r.value;
|
|
16486
16491
|
let p = null;
|
|
16487
16492
|
E && (p = `AuthoringToolId="${E}"`), i += `
|
|
16488
16493
|
<Component IfcGuid="${f}" ${p ?? ""} />`;
|
|
@@ -16525,32 +16530,32 @@ class Kr {
|
|
|
16525
16530
|
<Y>${-r.z}</Y>
|
|
16526
16531
|
<Z>${r.y}</Z>
|
|
16527
16532
|
</CameraUpVector>`, h = `<AspectRatio>${this.camera.aspectRatio}</AspectRatio>`;
|
|
16528
|
-
let
|
|
16529
|
-
"viewToWorld" in this.camera ?
|
|
16533
|
+
let d = "";
|
|
16534
|
+
"viewToWorld" in this.camera ? d = `<OrthogonalCamera>
|
|
16530
16535
|
${o}
|
|
16531
16536
|
${a}
|
|
16532
16537
|
${l}
|
|
16533
16538
|
${h}
|
|
16534
16539
|
<ViewToWorldScale>${this.camera.viewToWorld}</ViewToWorldScale>
|
|
16535
|
-
</OrthogonalCamera>` : "fov" in this.camera && (
|
|
16540
|
+
</OrthogonalCamera>` : "fov" in this.camera && (d = `<PerspectiveCamera>
|
|
16536
16541
|
${o}
|
|
16537
16542
|
${a}
|
|
16538
16543
|
${l}
|
|
16539
16544
|
${h}
|
|
16540
16545
|
<FieldOfView>${this.camera.fov}</FieldOfView>
|
|
16541
16546
|
</PerspectiveCamera>`);
|
|
16542
|
-
const
|
|
16547
|
+
const u = `<ViewSetupHints SpacesVisible="${this.spacesVisible ?? !1}" SpaceBoundariesVisible="${this.spaceBoundariesVisible ?? !1}" OpeningsVisible="${this.openingsVisible ?? !1}" />`, f = (await this.createComponentTags("selection")).trim(), E = (await this.createComponentTags("exception")).trim();
|
|
16543
16548
|
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
16544
16549
|
<VisualizationInfo Guid="${this.guid}">
|
|
16545
16550
|
<Components>
|
|
16546
|
-
${e === "2.1" ?
|
|
16551
|
+
${e === "2.1" ? u : ""}
|
|
16547
16552
|
${f.length !== 0 ? `<Selection>${f}</Selection>` : ""}
|
|
16548
16553
|
<Visibility DefaultVisibility="${this.defaultVisibility}">
|
|
16549
|
-
${e === "3" ?
|
|
16554
|
+
${e === "3" ? u : ""}
|
|
16550
16555
|
${E.length !== 0 ? `<Exceptions>${E}</Exceptions>` : ""}
|
|
16551
16556
|
</Visibility>
|
|
16552
16557
|
</Components>
|
|
16553
|
-
${
|
|
16558
|
+
${d}
|
|
16554
16559
|
</VisualizationInfo>`;
|
|
16555
16560
|
}
|
|
16556
16561
|
}
|
|
@@ -16852,17 +16857,17 @@ const Ri = class Ri extends Ft {
|
|
|
16852
16857
|
i,
|
|
16853
16858
|
t
|
|
16854
16859
|
), a = [];
|
|
16855
|
-
for (let
|
|
16856
|
-
const { plane: f, edges: E } = this.getFaceData(
|
|
16860
|
+
for (let u = 0; u < r.length / 3; u++) {
|
|
16861
|
+
const { plane: f, edges: E } = this.getFaceData(u, i, t);
|
|
16857
16862
|
if (f.equals(o)) {
|
|
16858
|
-
a.push({ index:
|
|
16863
|
+
a.push({ index: u, edges: E });
|
|
16859
16864
|
for (const { id: p, points: I, distance: m } of E)
|
|
16860
16865
|
n.set(p, { points: I, distance: m });
|
|
16861
16866
|
}
|
|
16862
16867
|
}
|
|
16863
16868
|
let l = 0;
|
|
16864
|
-
const h = /* @__PURE__ */ new Map(),
|
|
16865
|
-
for (const { index:
|
|
16869
|
+
const h = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map();
|
|
16870
|
+
for (const { index: u, edges: f } of a) {
|
|
16866
16871
|
const E = /* @__PURE__ */ new Map();
|
|
16867
16872
|
for (const { id: R } of f)
|
|
16868
16873
|
if (h.has(R)) {
|
|
@@ -16874,9 +16879,9 @@ const Ri = class Ri extends Ft {
|
|
|
16874
16879
|
const R = l++;
|
|
16875
16880
|
for (const { id: F } of f)
|
|
16876
16881
|
h.set(F, R);
|
|
16877
|
-
|
|
16882
|
+
d.set(R, {
|
|
16878
16883
|
edges: new Set(p),
|
|
16879
|
-
indices: /* @__PURE__ */ new Set([
|
|
16884
|
+
indices: /* @__PURE__ */ new Set([u])
|
|
16880
16885
|
});
|
|
16881
16886
|
continue;
|
|
16882
16887
|
}
|
|
@@ -16884,28 +16889,28 @@ const Ri = class Ri extends Ft {
|
|
|
16884
16889
|
const m = /* @__PURE__ */ new Set(), _ = new Set(p);
|
|
16885
16890
|
for (const [R, F] of E) {
|
|
16886
16891
|
I === null ? I = F : F !== I && m.add(F), h.delete(R);
|
|
16887
|
-
const { edges: O } =
|
|
16892
|
+
const { edges: O } = d.get(F);
|
|
16888
16893
|
O.delete(R), _.delete(R);
|
|
16889
16894
|
}
|
|
16890
16895
|
if (I === null)
|
|
16891
16896
|
throw new Error("Error computing face!");
|
|
16892
|
-
const y =
|
|
16893
|
-
C.add(
|
|
16897
|
+
const y = d.get(I), { indices: C } = y;
|
|
16898
|
+
C.add(u);
|
|
16894
16899
|
for (const R of _) {
|
|
16895
16900
|
h.set(R, I);
|
|
16896
16901
|
const { edges: F } = y;
|
|
16897
16902
|
F.add(R);
|
|
16898
16903
|
}
|
|
16899
16904
|
for (const R of m) {
|
|
16900
|
-
const F =
|
|
16905
|
+
const F = d.get(R), { edges: O, indices: L } = F, N = d.get(I), { edges: x, indices: k } = N;
|
|
16901
16906
|
for (const w of O)
|
|
16902
16907
|
x.add(w), h.set(w, I);
|
|
16903
16908
|
for (const w of L)
|
|
16904
16909
|
k.add(w);
|
|
16905
|
-
|
|
16910
|
+
d.delete(R);
|
|
16906
16911
|
}
|
|
16907
16912
|
}
|
|
16908
|
-
for (const [
|
|
16913
|
+
for (const [u, { indices: f, edges: E }] of d)
|
|
16909
16914
|
if (f.has(s)) {
|
|
16910
16915
|
const p = [];
|
|
16911
16916
|
for (const I of E) {
|
|
@@ -16929,14 +16934,14 @@ const Ri = class Ri extends Ft {
|
|
|
16929
16934
|
getVerticesAndNormal(t, s, i) {
|
|
16930
16935
|
if (!t.geometry.index)
|
|
16931
16936
|
throw new Error("Geometry must be indexed!");
|
|
16932
|
-
const n = t.geometry.index.array, r = t.geometry.attributes.position.array, o = t.geometry.attributes.normal.array, a = n[s * 3] * 3, l = n[s * 3 + 1] * 3, h = n[s * 3 + 2] * 3,
|
|
16937
|
+
const n = t.geometry.index.array, r = t.geometry.attributes.position.array, o = t.geometry.attributes.normal.array, a = n[s * 3] * 3, l = n[s * 3 + 1] * 3, h = n[s * 3 + 2] * 3, d = new v.Vector3(r[a], r[a + 1], r[a + 2]), u = new v.Vector3(r[l], r[l + 1], r[l + 2]), f = new v.Vector3(r[h], r[h + 1], r[h + 2]), E = new v.Vector3(o[a], o[a + 1], o[a + 2]), p = new v.Vector3(o[l], o[l + 1], o[l + 2]), I = new v.Vector3(o[h], o[h + 1], o[h + 2]), m = (E.x + p.x + I.x) / 3, _ = (E.y + p.y + I.y) / 3, y = (E.z + p.z + I.z) / 3, C = new v.Vector3(m, _, y);
|
|
16933
16938
|
if (i !== void 0 && t instanceof v.InstancedMesh) {
|
|
16934
16939
|
const R = new v.Matrix4();
|
|
16935
16940
|
t.getMatrixAt(i, R);
|
|
16936
16941
|
const F = new v.Matrix4();
|
|
16937
|
-
F.extractRotation(R), C.applyMatrix4(F),
|
|
16942
|
+
F.extractRotation(R), C.applyMatrix4(F), d.applyMatrix4(R), u.applyMatrix4(R), f.applyMatrix4(R);
|
|
16938
16943
|
}
|
|
16939
|
-
return { p1:
|
|
16944
|
+
return { p1: d, p2: u, p3: f, faceNormal: C };
|
|
16940
16945
|
}
|
|
16941
16946
|
/**
|
|
16942
16947
|
* Method to round the vector's components to a specified number of decimal places.
|
|
@@ -16973,19 +16978,19 @@ const Ri = class Ri extends Ft {
|
|
|
16973
16978
|
const E = a.getInstancesIDs(f);
|
|
16974
16979
|
E && (h += E.size);
|
|
16975
16980
|
}
|
|
16976
|
-
const
|
|
16981
|
+
const d = new v.InstancedMesh(
|
|
16977
16982
|
a.mesh.geometry,
|
|
16978
16983
|
void 0,
|
|
16979
16984
|
h
|
|
16980
16985
|
);
|
|
16981
|
-
let
|
|
16986
|
+
let u = 0;
|
|
16982
16987
|
for (const f of l) {
|
|
16983
16988
|
const E = a.getInstancesIDs(f);
|
|
16984
16989
|
if (E)
|
|
16985
16990
|
for (const p of E)
|
|
16986
|
-
a.mesh.getMatrixAt(p, i),
|
|
16991
|
+
a.mesh.getMatrixAt(p, i), d.setMatrixAt(u++, i);
|
|
16987
16992
|
}
|
|
16988
|
-
n.push(
|
|
16993
|
+
n.push(d);
|
|
16989
16994
|
}
|
|
16990
16995
|
const r = this.getVolumeFromMeshes(n);
|
|
16991
16996
|
for (const o of n)
|
|
@@ -17019,14 +17024,14 @@ const Ri = class Ri extends Ft {
|
|
|
17019
17024
|
];
|
|
17020
17025
|
h.sort((y, C) => y.id < C.id ? -1 : y.id > C.id ? 1 : 0);
|
|
17021
17026
|
const [
|
|
17022
|
-
{ id:
|
|
17027
|
+
{ id: d, value: u },
|
|
17023
17028
|
{ id: f, value: E },
|
|
17024
17029
|
{ id: p, value: I }
|
|
17025
17030
|
] = h, m = [
|
|
17026
17031
|
{
|
|
17027
|
-
id: `${
|
|
17028
|
-
distance:
|
|
17029
|
-
points: [
|
|
17032
|
+
id: `${d}|${f}`,
|
|
17033
|
+
distance: u.distanceTo(E),
|
|
17034
|
+
points: [u, E]
|
|
17030
17035
|
},
|
|
17031
17036
|
{
|
|
17032
17037
|
id: `${f}|${p}`,
|
|
@@ -17034,9 +17039,9 @@ const Ri = class Ri extends Ft {
|
|
|
17034
17039
|
points: [E, I]
|
|
17035
17040
|
},
|
|
17036
17041
|
{
|
|
17037
|
-
id: `${
|
|
17038
|
-
distance:
|
|
17039
|
-
points: [
|
|
17042
|
+
id: `${d}|${p}`,
|
|
17043
|
+
distance: u.distanceTo(I),
|
|
17044
|
+
points: [u, I]
|
|
17040
17045
|
}
|
|
17041
17046
|
], _ = new v.Plane();
|
|
17042
17047
|
return _.setFromNormalAndCoplanarPoint(l, r), _.constant = Math.round(_.constant * 10) / 10, { plane: _, edges: m };
|
|
@@ -17049,16 +17054,16 @@ const Ri = class Ri extends Ft {
|
|
|
17049
17054
|
return console.warn("Geometry must be indexed to compute its volume!"), 0;
|
|
17050
17055
|
const l = [];
|
|
17051
17056
|
if (t instanceof v.InstancedMesh)
|
|
17052
|
-
for (let
|
|
17053
|
-
const
|
|
17054
|
-
t.getMatrixAt(
|
|
17057
|
+
for (let d = 0; d < t.count; d++) {
|
|
17058
|
+
const u = new v.Matrix4();
|
|
17059
|
+
t.getMatrixAt(d, u), l.push(u);
|
|
17055
17060
|
}
|
|
17056
17061
|
else
|
|
17057
17062
|
l.push(new v.Matrix4().identity());
|
|
17058
17063
|
const { matrixWorld: h } = t;
|
|
17059
|
-
for (let
|
|
17060
|
-
for (const
|
|
17061
|
-
const f =
|
|
17064
|
+
for (let d = 0; d < o.array.length - 2; d += 3)
|
|
17065
|
+
for (const u of l) {
|
|
17066
|
+
const f = u.multiply(h), E = o.array[d] * 3, p = o.array[d + 1] * 3, I = o.array[d + 2] * 3;
|
|
17062
17067
|
i.set(a[E], a[E + 1], a[E + 2]).applyMatrix4(f), n.set(a[p], a[p + 1], a[p + 2]).applyMatrix4(f), r.set(a[I], a[I + 1], a[I + 2]).applyMatrix4(f), s += this.getSignedVolumeOfTriangle(i, n, r);
|
|
17063
17068
|
}
|
|
17064
17069
|
return Math.abs(s);
|