brs-js 3.2.3 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dist.mjs CHANGED
@@ -162,41 +162,41 @@ var h = 0, g = 1, _ = 2, v = 29, y = 256, b = 286, x = 30, S = 19, C = 573, w =
162
162
  14,
163
163
  1,
164
164
  15
165
- ]), ne = 512, re = Array(288 * 2);
165
+ ]), ne = 512, N = Array(288 * 2);
166
+ m(N);
167
+ var re = Array(x * 2);
166
168
  m(re);
167
- var ie = Array(x * 2);
169
+ var ie = Array(ne);
168
170
  m(ie);
169
- var ae = Array(ne);
171
+ var ae = Array(256);
170
172
  m(ae);
171
- var oe = Array(256);
173
+ var oe = Array(v);
172
174
  m(oe);
173
- var se = Array(v);
175
+ var se = Array(x);
174
176
  m(se);
175
- var ce = Array(x);
176
- m(ce);
177
- var le = class {
177
+ var ce = class {
178
178
  constructor(e, t, n, r, i) {
179
179
  this.static_tree = e, this.extra_bits = t, this.extra_base = n, this.elems = r, this.max_length = i, this.has_stree = e && e.length;
180
180
  }
181
- }, ue, de, fe, pe = class {
181
+ }, le, ue, de, fe = class {
182
182
  constructor(e, t) {
183
183
  this.dyn_tree = e, this.max_code = 0, this.stat_desc = t;
184
184
  }
185
- }, me = (e) => e < 256 ? ae[e] : ae[256 + (e >>> 7)], he = (e, t) => {
185
+ }, pe = (e) => e < 256 ? ie[e] : ie[256 + (e >>> 7)], me = (e, t) => {
186
186
  e.pending_buf[e.pending++] = t & 255, e.pending_buf[e.pending++] = t >>> 8 & 255;
187
- }, N = (e, t, n) => {
188
- e.bi_valid > T - n ? (e.bi_buf |= t << e.bi_valid & 65535, he(e, e.bi_buf), e.bi_buf = t >> T - e.bi_valid, e.bi_valid += n - T) : (e.bi_buf |= t << e.bi_valid & 65535, e.bi_valid += n);
189
- }, ge = (e, t, n) => {
190
- N(e, n[t * 2], n[t * 2 + 1]);
191
- }, _e = (e, t) => {
187
+ }, P = (e, t, n) => {
188
+ e.bi_valid > T - n ? (e.bi_buf |= t << e.bi_valid & 65535, me(e, e.bi_buf), e.bi_buf = t >> T - e.bi_valid, e.bi_valid += n - T) : (e.bi_buf |= t << e.bi_valid & 65535, e.bi_valid += n);
189
+ }, he = (e, t, n) => {
190
+ P(e, n[t * 2], n[t * 2 + 1]);
191
+ }, ge = (e, t) => {
192
192
  let n = 0;
193
193
  do
194
194
  n |= e & 1, e >>>= 1, n <<= 1;
195
195
  while (--t > 0);
196
196
  return n >>> 1;
197
- }, ve = (e) => {
198
- e.bi_valid === 16 ? (he(e, e.bi_buf), e.bi_buf = 0, e.bi_valid = 0) : e.bi_valid >= 8 && (e.pending_buf[e.pending++] = e.bi_buf & 255, e.bi_buf >>= 8, e.bi_valid -= 8);
199
- }, ye = (e, t) => {
197
+ }, _e = (e) => {
198
+ e.bi_valid === 16 ? (me(e, e.bi_buf), e.bi_buf = 0, e.bi_valid = 0) : e.bi_valid >= 8 && (e.pending_buf[e.pending++] = e.bi_buf & 255, e.bi_buf >>= 8, e.bi_valid -= 8);
199
+ }, ve = (e, t) => {
200
200
  let n = t.dyn_tree, r = t.max_code, i = t.stat_desc.static_tree, a = t.stat_desc.has_stree, o = t.stat_desc.extra_bits, s = t.stat_desc.extra_base, c = t.stat_desc.max_length, l, u, d, f, p, m, h = 0;
201
201
  for (f = 0; f <= w; f++) e.bl_count[f] = 0;
202
202
  for (n[e.heap[e.heap_max] * 2 + 1] = 0, l = e.heap_max + 1; l < C; l++) u = e.heap[l], f = n[n[u * 2 + 1] * 2 + 1] + 1, f > c && (f = c, h++), n[u * 2 + 1] = f, !(u > r) && (e.bl_count[f]++, p = 0, u >= s && (p = o[u - s]), m = n[u * 2], e.opt_len += m * (f + p), a && (e.static_len += m * (i[u * 2 + 1] + p)));
@@ -207,92 +207,92 @@ var le = class {
207
207
  } while (h > 0);
208
208
  for (f = c; f !== 0; f--) for (u = e.bl_count[f]; u !== 0;) d = e.heap[--l], !(d > r) && (n[d * 2 + 1] !== f && (e.opt_len += (f - n[d * 2 + 1]) * n[d * 2], n[d * 2 + 1] = f), u--);
209
209
  }
210
- }, be = (e, t, n) => {
210
+ }, ye = (e, t, n) => {
211
211
  let r = Array(16), i = 0, a, o;
212
212
  for (a = 1; a <= w; a++) i = i + n[a - 1] << 1, r[a] = i;
213
213
  for (o = 0; o <= t; o++) {
214
214
  let t = e[o * 2 + 1];
215
- t !== 0 && (e[o * 2] = _e(r[t]++, t));
215
+ t !== 0 && (e[o * 2] = ge(r[t]++, t));
216
216
  }
217
- }, xe = () => {
217
+ }, be = () => {
218
218
  let e, t, n, r, i, a = Array(16);
219
- for (n = 0, r = 0; r < v - 1; r++) for (se[r] = n, e = 0; e < 1 << j[r]; e++) oe[n++] = r;
220
- for (oe[n - 1] = r, i = 0, r = 0; r < 16; r++) for (ce[r] = i, e = 0; e < 1 << M[r]; e++) ae[i++] = r;
221
- for (i >>= 7; r < x; r++) for (ce[r] = i << 7, e = 0; e < 1 << M[r] - 7; e++) ae[256 + i++] = r;
219
+ for (n = 0, r = 0; r < v - 1; r++) for (oe[r] = n, e = 0; e < 1 << j[r]; e++) ae[n++] = r;
220
+ for (ae[n - 1] = r, i = 0, r = 0; r < 16; r++) for (se[r] = i, e = 0; e < 1 << M[r]; e++) ie[i++] = r;
221
+ for (i >>= 7; r < x; r++) for (se[r] = i << 7, e = 0; e < 1 << M[r] - 7; e++) ie[256 + i++] = r;
222
222
  for (t = 0; t <= w; t++) a[t] = 0;
223
- for (e = 0; e <= 143;) re[e * 2 + 1] = 8, e++, a[8]++;
224
- for (; e <= 255;) re[e * 2 + 1] = 9, e++, a[9]++;
225
- for (; e <= 279;) re[e * 2 + 1] = 7, e++, a[7]++;
226
- for (; e <= 287;) re[e * 2 + 1] = 8, e++, a[8]++;
227
- for (be(re, 287, a), e = 0; e < x; e++) ie[e * 2 + 1] = 5, ie[e * 2] = _e(e, 5);
228
- ue = new le(re, j, 257, b, w), de = new le(ie, M, 0, x, w), fe = new le([], ee, 0, S, E);
229
- }, Se = (e) => {
223
+ for (e = 0; e <= 143;) N[e * 2 + 1] = 8, e++, a[8]++;
224
+ for (; e <= 255;) N[e * 2 + 1] = 9, e++, a[9]++;
225
+ for (; e <= 279;) N[e * 2 + 1] = 7, e++, a[7]++;
226
+ for (; e <= 287;) N[e * 2 + 1] = 8, e++, a[8]++;
227
+ for (ye(N, 287, a), e = 0; e < x; e++) re[e * 2 + 1] = 5, re[e * 2] = ge(e, 5);
228
+ le = new ce(N, j, 257, b, w), ue = new ce(re, M, 0, x, w), de = new ce([], ee, 0, S, E);
229
+ }, xe = (e) => {
230
230
  let t;
231
231
  for (t = 0; t < b; t++) e.dyn_ltree[t * 2] = 0;
232
232
  for (t = 0; t < x; t++) e.dyn_dtree[t * 2] = 0;
233
233
  for (t = 0; t < S; t++) e.bl_tree[t * 2] = 0;
234
234
  e.dyn_ltree[D * 2] = 1, e.opt_len = e.static_len = 0, e.sym_next = e.matches = 0;
235
- }, Ce = (e) => {
236
- e.bi_valid > 8 ? he(e, e.bi_buf) : e.bi_valid > 0 && (e.pending_buf[e.pending++] = e.bi_buf), e.bi_buf = 0, e.bi_valid = 0;
237
- }, we = (e, t, n, r) => {
235
+ }, Se = (e) => {
236
+ e.bi_valid > 8 ? me(e, e.bi_buf) : e.bi_valid > 0 && (e.pending_buf[e.pending++] = e.bi_buf), e.bi_buf = 0, e.bi_valid = 0;
237
+ }, Ce = (e, t, n, r) => {
238
238
  let i = t * 2, a = n * 2;
239
239
  return e[i] < e[a] || e[i] === e[a] && r[t] <= r[n];
240
- }, Te = (e, t, n) => {
240
+ }, we = (e, t, n) => {
241
241
  let r = e.heap[n], i = n << 1;
242
- for (; i <= e.heap_len && (i < e.heap_len && we(t, e.heap[i + 1], e.heap[i], e.depth) && i++, !we(t, r, e.heap[i], e.depth));) e.heap[n] = e.heap[i], n = i, i <<= 1;
242
+ for (; i <= e.heap_len && (i < e.heap_len && Ce(t, e.heap[i + 1], e.heap[i], e.depth) && i++, !Ce(t, r, e.heap[i], e.depth));) e.heap[n] = e.heap[i], n = i, i <<= 1;
243
243
  e.heap[n] = r;
244
- }, Ee = (e, t, n) => {
244
+ }, Te = (e, t, n) => {
245
245
  let r, i, a = 0, o, s;
246
246
  if (e.sym_next !== 0) do
247
- r = e.pending_buf[e.sym_buf + a++] & 255, r += (e.pending_buf[e.sym_buf + a++] & 255) << 8, i = e.pending_buf[e.sym_buf + a++], r === 0 ? ge(e, i, t) : (o = oe[i], ge(e, o + y + 1, t), s = j[o], s !== 0 && (i -= se[o], N(e, i, s)), r--, o = me(r), ge(e, o, n), s = M[o], s !== 0 && (r -= ce[o], N(e, r, s)));
247
+ r = e.pending_buf[e.sym_buf + a++] & 255, r += (e.pending_buf[e.sym_buf + a++] & 255) << 8, i = e.pending_buf[e.sym_buf + a++], r === 0 ? he(e, i, t) : (o = ae[i], he(e, o + y + 1, t), s = j[o], s !== 0 && (i -= oe[o], P(e, i, s)), r--, o = pe(r), he(e, o, n), s = M[o], s !== 0 && (r -= se[o], P(e, r, s)));
248
248
  while (a < e.sym_next);
249
- ge(e, D, t);
250
- }, De = (e, t) => {
249
+ he(e, D, t);
250
+ }, Ee = (e, t) => {
251
251
  let n = t.dyn_tree, r = t.stat_desc.static_tree, i = t.stat_desc.has_stree, a = t.stat_desc.elems, o, s, c = -1, l;
252
252
  for (e.heap_len = 0, e.heap_max = C, o = 0; o < a; o++) n[o * 2] === 0 ? n[o * 2 + 1] = 0 : (e.heap[++e.heap_len] = c = o, e.depth[o] = 0);
253
253
  for (; e.heap_len < 2;) l = e.heap[++e.heap_len] = c < 2 ? ++c : 0, n[l * 2] = 1, e.depth[l] = 0, e.opt_len--, i && (e.static_len -= r[l * 2 + 1]);
254
- for (t.max_code = c, o = e.heap_len >> 1; o >= 1; o--) Te(e, n, o);
254
+ for (t.max_code = c, o = e.heap_len >> 1; o >= 1; o--) we(e, n, o);
255
255
  l = a;
256
256
  do
257
- o = e.heap[1], e.heap[1] = e.heap[e.heap_len--], Te(e, n, 1), s = e.heap[1], e.heap[--e.heap_max] = o, e.heap[--e.heap_max] = s, n[l * 2] = n[o * 2] + n[s * 2], e.depth[l] = (e.depth[o] >= e.depth[s] ? e.depth[o] : e.depth[s]) + 1, n[o * 2 + 1] = n[s * 2 + 1] = l, e.heap[1] = l++, Te(e, n, 1);
257
+ o = e.heap[1], e.heap[1] = e.heap[e.heap_len--], we(e, n, 1), s = e.heap[1], e.heap[--e.heap_max] = o, e.heap[--e.heap_max] = s, n[l * 2] = n[o * 2] + n[s * 2], e.depth[l] = (e.depth[o] >= e.depth[s] ? e.depth[o] : e.depth[s]) + 1, n[o * 2 + 1] = n[s * 2 + 1] = l, e.heap[1] = l++, we(e, n, 1);
258
258
  while (e.heap_len >= 2);
259
- e.heap[--e.heap_max] = e.heap[1], ye(e, t), be(n, c, e.bl_count);
260
- }, Oe = (e, t, n) => {
259
+ e.heap[--e.heap_max] = e.heap[1], ve(e, t), ye(n, c, e.bl_count);
260
+ }, De = (e, t, n) => {
261
261
  let r, i = -1, a, o = t[1], s = 0, c = 7, l = 4;
262
262
  for (o === 0 && (c = 138, l = 3), t[(n + 1) * 2 + 1] = 65535, r = 0; r <= n; r++) a = o, o = t[(r + 1) * 2 + 1], !(++s < c && a === o) && (s < l ? e.bl_tree[a * 2] += s : a === 0 ? s <= 10 ? e.bl_tree[k * 2]++ : e.bl_tree[A * 2]++ : (a !== i && e.bl_tree[a * 2]++, e.bl_tree[O * 2]++), s = 0, i = a, o === 0 ? (c = 138, l = 3) : a === o ? (c = 6, l = 3) : (c = 7, l = 4));
263
- }, ke = (e, t, n) => {
263
+ }, Oe = (e, t, n) => {
264
264
  let r, i = -1, a, o = t[1], s = 0, c = 7, l = 4;
265
265
  for (o === 0 && (c = 138, l = 3), r = 0; r <= n; r++) if (a = o, o = t[(r + 1) * 2 + 1], !(++s < c && a === o)) {
266
266
  if (s < l) do
267
- ge(e, a, e.bl_tree);
267
+ he(e, a, e.bl_tree);
268
268
  while (--s !== 0);
269
- else a === 0 ? s <= 10 ? (ge(e, k, e.bl_tree), N(e, s - 3, 3)) : (ge(e, A, e.bl_tree), N(e, s - 11, 7)) : (a !== i && (ge(e, a, e.bl_tree), s--), ge(e, O, e.bl_tree), N(e, s - 3, 2));
269
+ else a === 0 ? s <= 10 ? (he(e, k, e.bl_tree), P(e, s - 3, 3)) : (he(e, A, e.bl_tree), P(e, s - 11, 7)) : (a !== i && (he(e, a, e.bl_tree), s--), he(e, O, e.bl_tree), P(e, s - 3, 2));
270
270
  s = 0, i = a, o === 0 ? (c = 138, l = 3) : a === o ? (c = 6, l = 3) : (c = 7, l = 4);
271
271
  }
272
- }, Ae = (e) => {
272
+ }, ke = (e) => {
273
273
  let t;
274
- for (Oe(e, e.dyn_ltree, e.l_desc.max_code), Oe(e, e.dyn_dtree, e.d_desc.max_code), De(e, e.bl_desc), t = S - 1; t >= 3 && e.bl_tree[te[t] * 2 + 1] === 0; t--);
274
+ for (De(e, e.dyn_ltree, e.l_desc.max_code), De(e, e.dyn_dtree, e.d_desc.max_code), Ee(e, e.bl_desc), t = S - 1; t >= 3 && e.bl_tree[te[t] * 2 + 1] === 0; t--);
275
275
  return e.opt_len += 3 * (t + 1) + 5 + 5 + 4, t;
276
- }, je = (e, t, n, r) => {
276
+ }, Ae = (e, t, n, r) => {
277
277
  let i;
278
- for (N(e, t - 257, 5), N(e, n - 1, 5), N(e, r - 4, 4), i = 0; i < r; i++) N(e, e.bl_tree[te[i] * 2 + 1], 3);
279
- ke(e, e.dyn_ltree, t - 1), ke(e, e.dyn_dtree, n - 1);
280
- }, Me = (e) => {
278
+ for (P(e, t - 257, 5), P(e, n - 1, 5), P(e, r - 4, 4), i = 0; i < r; i++) P(e, e.bl_tree[te[i] * 2 + 1], 3);
279
+ Oe(e, e.dyn_ltree, t - 1), Oe(e, e.dyn_dtree, n - 1);
280
+ }, je = (e) => {
281
281
  let t = 4093624447, n;
282
282
  for (n = 0; n <= 31; n++, t >>>= 1) if (t & 1 && e.dyn_ltree[n * 2] !== 0) return d;
283
283
  if (e.dyn_ltree[18] !== 0 || e.dyn_ltree[20] !== 0 || e.dyn_ltree[26] !== 0) return f;
284
284
  for (n = 32; n < y; n++) if (e.dyn_ltree[n * 2] !== 0) return f;
285
285
  return d;
286
- }, Ne = !1, Pe = (e) => {
287
- Ne || (xe(), Ne = !0), e.l_desc = new pe(e.dyn_ltree, ue), e.d_desc = new pe(e.dyn_dtree, de), e.bl_desc = new pe(e.bl_tree, fe), e.bi_buf = 0, e.bi_valid = 0, Se(e);
288
- }, Fe = (e, t, n, r) => {
289
- N(e, (h << 1) + +!!r, 3), Ce(e), he(e, n), he(e, ~n), n && e.pending_buf.set(e.window.subarray(t, t + n), e.pending), e.pending += n;
290
- }, Ie = (e) => {
291
- N(e, g << 1, 3), ge(e, D, re), ve(e);
292
- }, Le = (e, t, n, r) => {
286
+ }, Me = !1, Ne = (e) => {
287
+ Me || (be(), Me = !0), e.l_desc = new fe(e.dyn_ltree, le), e.d_desc = new fe(e.dyn_dtree, ue), e.bl_desc = new fe(e.bl_tree, de), e.bi_buf = 0, e.bi_valid = 0, xe(e);
288
+ }, Pe = (e, t, n, r) => {
289
+ P(e, (h << 1) + +!!r, 3), Se(e), me(e, n), me(e, ~n), n && e.pending_buf.set(e.window.subarray(t, t + n), e.pending), e.pending += n;
290
+ }, Fe = (e) => {
291
+ P(e, g << 1, 3), he(e, D, N), _e(e);
292
+ }, Ie = (e, t, n, r) => {
293
293
  let i, a, o = 0;
294
- e.level > 0 ? (e.strm.data_type === p && (e.strm.data_type = Me(e)), De(e, e.l_desc), De(e, e.d_desc), o = Ae(e), i = e.opt_len + 3 + 7 >>> 3, a = e.static_len + 3 + 7 >>> 3, a <= i && (i = a)) : i = a = n + 5, n + 4 <= i && t !== -1 ? Fe(e, t, n, r) : e.strategy === u || a === i ? (N(e, (g << 1) + +!!r, 3), Ee(e, re, ie)) : (N(e, (_ << 1) + +!!r, 3), je(e, e.l_desc.max_code + 1, e.d_desc.max_code + 1, o + 1), Ee(e, e.dyn_ltree, e.dyn_dtree)), Se(e), r && Ce(e);
295
- }, Re = (e, t, n) => (e.pending_buf[e.sym_buf + e.sym_next++] = t, e.pending_buf[e.sym_buf + e.sym_next++] = t >> 8, e.pending_buf[e.sym_buf + e.sym_next++] = n, t === 0 ? e.dyn_ltree[n * 2]++ : (e.matches++, t--, e.dyn_ltree[(oe[n] + y + 1) * 2]++, e.dyn_dtree[me(t) * 2]++), e.sym_next === e.sym_end), ze = (e, t, n, r) => {
294
+ e.level > 0 ? (e.strm.data_type === p && (e.strm.data_type = je(e)), Ee(e, e.l_desc), Ee(e, e.d_desc), o = ke(e), i = e.opt_len + 3 + 7 >>> 3, a = e.static_len + 3 + 7 >>> 3, a <= i && (i = a)) : i = a = n + 5, n + 4 <= i && t !== -1 ? Pe(e, t, n, r) : e.strategy === u || a === i ? (P(e, (g << 1) + +!!r, 3), Te(e, N, re)) : (P(e, (_ << 1) + +!!r, 3), Ae(e, e.l_desc.max_code + 1, e.d_desc.max_code + 1, o + 1), Te(e, e.dyn_ltree, e.dyn_dtree)), xe(e), r && Se(e);
295
+ }, Le = (e, t, n) => (e.pending_buf[e.sym_buf + e.sym_next++] = t, e.pending_buf[e.sym_buf + e.sym_next++] = t >> 8, e.pending_buf[e.sym_buf + e.sym_next++] = n, t === 0 ? e.dyn_ltree[n * 2]++ : (e.matches++, t--, e.dyn_ltree[(ae[n] + y + 1) * 2]++, e.dyn_dtree[pe(t) * 2]++), e.sym_next === e.sym_end), Re = (e, t, n, r) => {
296
296
  let i = e & 65535 | 0, a = e >>> 16 & 65535 | 0, o = 0;
297
297
  for (; n !== 0;) {
298
298
  o = n > 2e3 ? 2e3 : n, n -= o;
@@ -302,7 +302,7 @@ var le = class {
302
302
  i %= 65521, a %= 65521;
303
303
  }
304
304
  return i | a << 16 | 0;
305
- }, Be = new Uint32Array((() => {
305
+ }, ze = new Uint32Array((() => {
306
306
  let e, t = [];
307
307
  for (var n = 0; n < 256; n++) {
308
308
  e = n;
@@ -310,12 +310,12 @@ var le = class {
310
310
  t[n] = e;
311
311
  }
312
312
  return t;
313
- })()), P = (e, t, n, r) => {
314
- let i = Be, a = r + n;
313
+ })()), F = (e, t, n, r) => {
314
+ let i = ze, a = r + n;
315
315
  e ^= -1;
316
316
  for (let n = r; n < a; n++) e = e >>> 8 ^ i[(e ^ t[n]) & 255];
317
317
  return e ^ -1;
318
- }, Ve = {
318
+ }, Be = {
319
319
  2: "need dictionary",
320
320
  1: "stream end",
321
321
  0: "",
@@ -325,10 +325,10 @@ var le = class {
325
325
  "-4": "insufficient memory",
326
326
  "-5": "buffer error",
327
327
  "-6": "incompatible version"
328
- }, He = 9, Ue = 573, F = 3, We = 258, Ge = 262, Ke = 32, qe = 42, Je = 57, Ye = 69, Xe = 73, Ze = 91, Qe = 103, $e = 113, et = 666, I = 1, tt = 2, nt = 3, rt = 4, it = 3, at = (e, t) => (e.msg = Ve[t], t), ot = (e) => e * 2 - (e > 4 ? 9 : 0), st = (e) => {
328
+ }, Ve = 9, He = 573, I = 3, Ue = 258, We = 262, Ge = 32, Ke = 42, qe = 57, Je = 69, Ye = 73, Xe = 91, Ze = 103, Qe = 113, $e = 666, L = 1, et = 2, tt = 3, nt = 4, rt = 3, it = (e, t) => (e.msg = Be[t], t), at = (e) => e * 2 - (e > 4 ? 9 : 0), ot = (e) => {
329
329
  let t = e.length;
330
330
  for (; --t >= 0;) e[t] = 0;
331
- }, ct = (e) => {
331
+ }, st = (e) => {
332
332
  let t, n, r, i = e.w_size;
333
333
  t = e.hash_size, r = t;
334
334
  do
@@ -338,254 +338,254 @@ var le = class {
338
338
  do
339
339
  n = e.prev[--r], e.prev[r] = n >= i ? n - i : 0;
340
340
  while (--t);
341
- }, lt = (e, t, n) => (t << e.hash_shift ^ n) & e.hash_mask, ut = (e, t) => {
341
+ }, ct = (e, t, n) => (t << e.hash_shift ^ n) & e.hash_mask, lt = (e, t) => {
342
342
  let n;
343
- if (e.legacy_hash) n = e.ins_h = lt(e, e.ins_h, e.window[t + F - 1]);
343
+ if (e.legacy_hash) n = e.ins_h = ct(e, e.ins_h, e.window[t + I - 1]);
344
344
  else {
345
345
  let r = e.window, i = r[t] | r[t + 1] << 8 | r[t + 2] << 16 | r[t + 3] << 24;
346
346
  n = e.ins_h = Math.imul(i, 66521) + 66521 >>> 16 & e.hash_mask;
347
347
  }
348
348
  let r = e.prev[t & e.w_mask] = e.head[n];
349
349
  return e.head[n] = t, r;
350
- }, L = (e) => {
350
+ }, R = (e) => {
351
351
  let t = e.state, n = t.pending;
352
352
  n > e.avail_out && (n = e.avail_out), n !== 0 && (e.output.set(t.pending_buf.subarray(t.pending_out, t.pending_out + n), e.next_out), e.next_out += n, t.pending_out += n, e.total_out += n, e.avail_out -= n, t.pending -= n, t.pending === 0 && (t.pending_out = 0));
353
- }, R = (e, t) => {
354
- Le(e, e.block_start >= 0 ? e.block_start : -1, e.strstart - e.block_start, t), e.block_start = e.strstart, L(e.strm);
355
353
  }, z = (e, t) => {
354
+ Ie(e, e.block_start >= 0 ? e.block_start : -1, e.strstart - e.block_start, t), e.block_start = e.strstart, R(e.strm);
355
+ }, B = (e, t) => {
356
356
  e.pending_buf[e.pending++] = t;
357
- }, dt = (e, t) => {
357
+ }, ut = (e, t) => {
358
358
  e.pending_buf[e.pending++] = t >>> 8 & 255, e.pending_buf[e.pending++] = t & 255;
359
- }, ft = (e, t, n, r) => {
359
+ }, dt = (e, t, n, r) => {
360
360
  let i = e.avail_in;
361
- return i > r && (i = r), i === 0 ? 0 : (e.avail_in -= i, t.set(e.input.subarray(e.next_in, e.next_in + i), n), e.state.wrap === 1 ? e.adler = ze(e.adler, t, i, n) : e.state.wrap === 2 && (e.adler = P(e.adler, t, i, n)), e.next_in += i, e.total_in += i, i);
362
- }, pt = (e, t) => {
363
- let n = e.max_chain_length, r = e.strstart, i, a, o = e.prev_length, s = e.nice_match, c = e.strstart > e.w_size - Ge ? e.strstart - (e.w_size - Ge) : 0, l = e.window, u = e.w_mask, d = e.prev, f = e.strstart + We, p = l[r + o - 1], m = l[r + o];
361
+ return i > r && (i = r), i === 0 ? 0 : (e.avail_in -= i, t.set(e.input.subarray(e.next_in, e.next_in + i), n), e.state.wrap === 1 ? e.adler = Re(e.adler, t, i, n) : e.state.wrap === 2 && (e.adler = F(e.adler, t, i, n)), e.next_in += i, e.total_in += i, i);
362
+ }, ft = (e, t) => {
363
+ let n = e.max_chain_length, r = e.strstart, i, a, o = e.prev_length, s = e.nice_match, c = e.strstart > e.w_size - We ? e.strstart - (e.w_size - We) : 0, l = e.window, u = e.w_mask, d = e.prev, f = e.strstart + Ue, p = l[r + o - 1], m = l[r + o];
364
364
  e.prev_length >= e.good_match && (n >>= 2), s > e.lookahead && (s = e.lookahead);
365
365
  do {
366
366
  if (i = t, l[i + o] !== m || l[i + o - 1] !== p || l[i] !== l[r] || l[++i] !== l[r + 1]) continue;
367
367
  r += 2, i++;
368
368
  do ;
369
369
  while (l[++r] === l[++i] && l[++r] === l[++i] && l[++r] === l[++i] && l[++r] === l[++i] && l[++r] === l[++i] && l[++r] === l[++i] && l[++r] === l[++i] && l[++r] === l[++i] && r < f);
370
- if (a = We - (f - r), r = f - We, a > o) {
370
+ if (a = Ue - (f - r), r = f - Ue, a > o) {
371
371
  if (e.match_start = t, o = a, a >= s) break;
372
372
  p = l[r + o - 1], m = l[r + o];
373
373
  }
374
374
  } while ((t = d[t & u]) > c && --n !== 0);
375
375
  return o <= e.lookahead ? o : e.lookahead;
376
- }, mt = (e) => {
376
+ }, pt = (e) => {
377
377
  let t = e.w_size, n, r, i;
378
378
  do {
379
- if (r = e.window_size - e.lookahead - e.strstart, e.strstart >= t + (t - Ge) && (e.window.set(e.window.subarray(t, t + t - r), 0), e.match_start -= t, e.strstart -= t, e.block_start -= t, e.insert > e.strstart && (e.insert = e.strstart), ct(e), r += t), e.strm.avail_in === 0) break;
380
- if (n = ft(e.strm, e.window, e.strstart + e.lookahead, r), e.lookahead += n, !e.legacy_hash) {
381
- if (e.lookahead + e.insert > F) for (i = e.strstart - e.insert; e.insert && (ut(e, i), i++, e.insert--, !(e.lookahead + e.insert <= F)););
382
- } else if (e.lookahead + e.insert >= F) for (i = e.strstart - e.insert, e.ins_h = e.window[i], e.ins_h = lt(e, e.ins_h, e.window[i + 1]); e.insert && (ut(e, i), i++, e.insert--, !(e.lookahead + e.insert < F)););
383
- } while (e.lookahead < Ge && e.strm.avail_in !== 0);
384
- }, ht = (e, t) => {
379
+ if (r = e.window_size - e.lookahead - e.strstart, e.strstart >= t + (t - We) && (e.window.set(e.window.subarray(t, t + t - r), 0), e.match_start -= t, e.strstart -= t, e.block_start -= t, e.insert > e.strstart && (e.insert = e.strstart), st(e), r += t), e.strm.avail_in === 0) break;
380
+ if (n = dt(e.strm, e.window, e.strstart + e.lookahead, r), e.lookahead += n, !e.legacy_hash) {
381
+ if (e.lookahead + e.insert > I) for (i = e.strstart - e.insert; e.insert && (lt(e, i), i++, e.insert--, !(e.lookahead + e.insert <= I)););
382
+ } else if (e.lookahead + e.insert >= I) for (i = e.strstart - e.insert, e.ins_h = e.window[i], e.ins_h = ct(e, e.ins_h, e.window[i + 1]); e.insert && (lt(e, i), i++, e.insert--, !(e.lookahead + e.insert < I)););
383
+ } while (e.lookahead < We && e.strm.avail_in !== 0);
384
+ }, mt = (e, t) => {
385
385
  let n = e.pending_buf_size - 5 > e.w_size ? e.w_size : e.pending_buf_size - 5, r, i, a, o = 0, s = e.strm.avail_in;
386
386
  do {
387
387
  if (r = 65535, a = e.bi_valid + 42 >> 3, e.strm.avail_out < a || (a = e.strm.avail_out - a, i = e.strstart - e.block_start, r > i + e.strm.avail_in && (r = i + e.strm.avail_in), r > a && (r = a), r < n && (r === 0 && t !== 4 || t === 0 || r !== i + e.strm.avail_in))) break;
388
- o = +(t === 4 && r === i + e.strm.avail_in), Fe(e, 0, 0, o), e.pending_buf[e.pending - 4] = r, e.pending_buf[e.pending - 3] = r >> 8, e.pending_buf[e.pending - 2] = ~r, e.pending_buf[e.pending - 1] = ~r >> 8, L(e.strm), i && (i > r && (i = r), e.strm.output.set(e.window.subarray(e.block_start, e.block_start + i), e.strm.next_out), e.strm.next_out += i, e.strm.avail_out -= i, e.strm.total_out += i, e.block_start += i, r -= i), r && (ft(e.strm, e.strm.output, e.strm.next_out, r), e.strm.next_out += r, e.strm.avail_out -= r, e.strm.total_out += r);
388
+ o = +(t === 4 && r === i + e.strm.avail_in), Pe(e, 0, 0, o), e.pending_buf[e.pending - 4] = r, e.pending_buf[e.pending - 3] = r >> 8, e.pending_buf[e.pending - 2] = ~r, e.pending_buf[e.pending - 1] = ~r >> 8, R(e.strm), i && (i > r && (i = r), e.strm.output.set(e.window.subarray(e.block_start, e.block_start + i), e.strm.next_out), e.strm.next_out += i, e.strm.avail_out -= i, e.strm.total_out += i, e.block_start += i, r -= i), r && (dt(e.strm, e.strm.output, e.strm.next_out, r), e.strm.next_out += r, e.strm.avail_out -= r, e.strm.total_out += r);
389
389
  } while (o === 0);
390
- return s -= e.strm.avail_in, s && (s >= e.w_size ? (e.matches = 2, e.window.set(e.strm.input.subarray(e.strm.next_in - e.w_size, e.strm.next_in), 0), e.strstart = e.w_size, e.insert = e.strstart) : (e.window_size - e.strstart <= s && (e.strstart -= e.w_size, e.window.set(e.window.subarray(e.w_size, e.w_size + e.strstart), 0), e.matches < 2 && e.matches++, e.insert > e.strstart && (e.insert = e.strstart)), e.window.set(e.strm.input.subarray(e.strm.next_in - s, e.strm.next_in), e.strstart), e.strstart += s, e.insert += s > e.w_size - e.insert ? e.w_size - e.insert : s), e.block_start = e.strstart), e.high_water < e.strstart && (e.high_water = e.strstart), o ? rt : t !== 0 && t !== 4 && e.strm.avail_in === 0 && e.strstart === e.block_start ? tt : (a = e.window_size - e.strstart, e.strm.avail_in > a && e.block_start >= e.w_size && (e.block_start -= e.w_size, e.strstart -= e.w_size, e.window.set(e.window.subarray(e.w_size, e.w_size + e.strstart), 0), e.matches < 2 && e.matches++, a += e.w_size, e.insert > e.strstart && (e.insert = e.strstart)), a > e.strm.avail_in && (a = e.strm.avail_in), a && (ft(e.strm, e.window, e.strstart, a), e.strstart += a, e.insert += a > e.w_size - e.insert ? e.w_size - e.insert : a), e.high_water < e.strstart && (e.high_water = e.strstart), a = e.bi_valid + 42 >> 3, a = e.pending_buf_size - a > 65535 ? 65535 : e.pending_buf_size - a, n = a > e.w_size ? e.w_size : a, i = e.strstart - e.block_start, (i >= n || (i || t === 4) && t !== 0 && e.strm.avail_in === 0 && i <= a) && (r = i > a ? a : i, o = +(t === 4 && e.strm.avail_in === 0 && r === i), Fe(e, e.block_start, r, o), e.block_start += r, L(e.strm)), o ? nt : I);
391
- }, gt = (e, t) => {
390
+ return s -= e.strm.avail_in, s && (s >= e.w_size ? (e.matches = 2, e.window.set(e.strm.input.subarray(e.strm.next_in - e.w_size, e.strm.next_in), 0), e.strstart = e.w_size, e.insert = e.strstart) : (e.window_size - e.strstart <= s && (e.strstart -= e.w_size, e.window.set(e.window.subarray(e.w_size, e.w_size + e.strstart), 0), e.matches < 2 && e.matches++, e.insert > e.strstart && (e.insert = e.strstart)), e.window.set(e.strm.input.subarray(e.strm.next_in - s, e.strm.next_in), e.strstart), e.strstart += s, e.insert += s > e.w_size - e.insert ? e.w_size - e.insert : s), e.block_start = e.strstart), e.high_water < e.strstart && (e.high_water = e.strstart), o ? nt : t !== 0 && t !== 4 && e.strm.avail_in === 0 && e.strstart === e.block_start ? et : (a = e.window_size - e.strstart, e.strm.avail_in > a && e.block_start >= e.w_size && (e.block_start -= e.w_size, e.strstart -= e.w_size, e.window.set(e.window.subarray(e.w_size, e.w_size + e.strstart), 0), e.matches < 2 && e.matches++, a += e.w_size, e.insert > e.strstart && (e.insert = e.strstart)), a > e.strm.avail_in && (a = e.strm.avail_in), a && (dt(e.strm, e.window, e.strstart, a), e.strstart += a, e.insert += a > e.w_size - e.insert ? e.w_size - e.insert : a), e.high_water < e.strstart && (e.high_water = e.strstart), a = e.bi_valid + 42 >> 3, a = e.pending_buf_size - a > 65535 ? 65535 : e.pending_buf_size - a, n = a > e.w_size ? e.w_size : a, i = e.strstart - e.block_start, (i >= n || (i || t === 4) && t !== 0 && e.strm.avail_in === 0 && i <= a) && (r = i > a ? a : i, o = +(t === 4 && e.strm.avail_in === 0 && r === i), Pe(e, e.block_start, r, o), e.block_start += r, R(e.strm)), o ? tt : L);
391
+ }, ht = (e, t) => {
392
392
  let n, r;
393
393
  for (;;) {
394
- if (e.lookahead < Ge) {
395
- if (mt(e), e.lookahead < Ge && t === 0) return I;
394
+ if (e.lookahead < We) {
395
+ if (pt(e), e.lookahead < We && t === 0) return L;
396
396
  if (e.lookahead === 0) break;
397
397
  }
398
- if (n = 0, e.lookahead >= F && (n = ut(e, e.strstart)), n !== 0 && e.strstart - n <= e.w_size - Ge && (e.match_length = pt(e, n)), e.match_length >= F) if (r = Re(e, e.strstart - e.match_start, e.match_length - F), e.lookahead -= e.match_length, e.match_length <= e.max_lazy_match && e.lookahead >= F) {
398
+ if (n = 0, e.lookahead >= I && (n = lt(e, e.strstart)), n !== 0 && e.strstart - n <= e.w_size - We && (e.match_length = ft(e, n)), e.match_length >= I) if (r = Le(e, e.strstart - e.match_start, e.match_length - I), e.lookahead -= e.match_length, e.match_length <= e.max_lazy_match && e.lookahead >= I) {
399
399
  e.match_length--;
400
400
  do
401
- e.strstart++, n = ut(e, e.strstart);
401
+ e.strstart++, n = lt(e, e.strstart);
402
402
  while (--e.match_length !== 0);
403
403
  e.strstart++;
404
- } else e.strstart += e.match_length, e.match_length = 0, e.legacy_hash && (e.ins_h = e.window[e.strstart], e.ins_h = lt(e, e.ins_h, e.window[e.strstart + 1]));
405
- else r = Re(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++;
406
- if (r && (R(e, !1), e.strm.avail_out === 0)) return I;
404
+ } else e.strstart += e.match_length, e.match_length = 0, e.legacy_hash && (e.ins_h = e.window[e.strstart], e.ins_h = ct(e, e.ins_h, e.window[e.strstart + 1]));
405
+ else r = Le(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++;
406
+ if (r && (z(e, !1), e.strm.avail_out === 0)) return L;
407
407
  }
408
- return e.insert = e.strstart < F - 1 ? e.strstart : F - 1, t === 4 ? (R(e, !0), e.strm.avail_out === 0 ? nt : rt) : e.sym_next && (R(e, !1), e.strm.avail_out === 0) ? I : tt;
409
- }, _t = (e, t) => {
408
+ return e.insert = e.strstart < I - 1 ? e.strstart : I - 1, t === 4 ? (z(e, !0), e.strm.avail_out === 0 ? tt : nt) : e.sym_next && (z(e, !1), e.strm.avail_out === 0) ? L : et;
409
+ }, gt = (e, t) => {
410
410
  let n, r, i;
411
411
  for (;;) {
412
- if (e.lookahead < Ge) {
413
- if (mt(e), e.lookahead < Ge && t === 0) return I;
412
+ if (e.lookahead < We) {
413
+ if (pt(e), e.lookahead < We && t === 0) return L;
414
414
  if (e.lookahead === 0) break;
415
415
  }
416
- if (n = 0, e.lookahead >= F && (n = ut(e, e.strstart)), e.prev_length = e.match_length, e.prev_match = e.match_start, e.match_length = F - 1, n !== 0 && e.prev_length < e.max_lazy_match && e.strstart - n <= e.w_size - Ge && (e.match_length = pt(e, n), e.match_length <= 5 && (e.strategy === 1 || e.match_length === F && e.strstart - e.match_start > 4096) && (e.match_length = F - 1)), e.prev_length >= F && e.match_length <= e.prev_length) {
417
- i = e.strstart + e.lookahead - F, r = Re(e, e.strstart - 1 - e.prev_match, e.prev_length - F), e.lookahead -= e.prev_length - 1, e.prev_length -= 2;
416
+ if (n = 0, e.lookahead >= I && (n = lt(e, e.strstart)), e.prev_length = e.match_length, e.prev_match = e.match_start, e.match_length = I - 1, n !== 0 && e.prev_length < e.max_lazy_match && e.strstart - n <= e.w_size - We && (e.match_length = ft(e, n), e.match_length <= 5 && (e.strategy === 1 || e.match_length === I && e.strstart - e.match_start > 4096) && (e.match_length = I - 1)), e.prev_length >= I && e.match_length <= e.prev_length) {
417
+ i = e.strstart + e.lookahead - I, r = Le(e, e.strstart - 1 - e.prev_match, e.prev_length - I), e.lookahead -= e.prev_length - 1, e.prev_length -= 2;
418
418
  do
419
- ++e.strstart <= i && (n = ut(e, e.strstart));
419
+ ++e.strstart <= i && (n = lt(e, e.strstart));
420
420
  while (--e.prev_length !== 0);
421
- if (e.match_available = 0, e.match_length = F - 1, e.strstart++, r && (R(e, !1), e.strm.avail_out === 0)) return I;
421
+ if (e.match_available = 0, e.match_length = I - 1, e.strstart++, r && (z(e, !1), e.strm.avail_out === 0)) return L;
422
422
  } else if (e.match_available) {
423
- if (r = Re(e, 0, e.window[e.strstart - 1]), r && R(e, !1), e.strstart++, e.lookahead--, e.strm.avail_out === 0) return I;
423
+ if (r = Le(e, 0, e.window[e.strstart - 1]), r && z(e, !1), e.strstart++, e.lookahead--, e.strm.avail_out === 0) return L;
424
424
  } else e.match_available = 1, e.strstart++, e.lookahead--;
425
425
  }
426
- return e.match_available && (r = Re(e, 0, e.window[e.strstart - 1]), e.match_available = 0), e.insert = e.strstart < F - 1 ? e.strstart : F - 1, t === 4 ? (R(e, !0), e.strm.avail_out === 0 ? nt : rt) : e.sym_next && (R(e, !1), e.strm.avail_out === 0) ? I : tt;
427
- }, vt = (e, t) => {
426
+ return e.match_available && (r = Le(e, 0, e.window[e.strstart - 1]), e.match_available = 0), e.insert = e.strstart < I - 1 ? e.strstart : I - 1, t === 4 ? (z(e, !0), e.strm.avail_out === 0 ? tt : nt) : e.sym_next && (z(e, !1), e.strm.avail_out === 0) ? L : et;
427
+ }, _t = (e, t) => {
428
428
  let n, r, i, a, o = e.window;
429
429
  for (;;) {
430
- if (e.lookahead <= We) {
431
- if (mt(e), e.lookahead <= We && t === 0) return I;
430
+ if (e.lookahead <= Ue) {
431
+ if (pt(e), e.lookahead <= Ue && t === 0) return L;
432
432
  if (e.lookahead === 0) break;
433
433
  }
434
- if (e.match_length = 0, e.lookahead >= F && e.strstart > 0 && (i = e.strstart - 1, r = o[i], r === o[++i] && r === o[++i] && r === o[++i])) {
435
- a = e.strstart + We;
434
+ if (e.match_length = 0, e.lookahead >= I && e.strstart > 0 && (i = e.strstart - 1, r = o[i], r === o[++i] && r === o[++i] && r === o[++i])) {
435
+ a = e.strstart + Ue;
436
436
  do ;
437
437
  while (r === o[++i] && r === o[++i] && r === o[++i] && r === o[++i] && r === o[++i] && r === o[++i] && r === o[++i] && r === o[++i] && i < a);
438
- e.match_length = We - (a - i), e.match_length > e.lookahead && (e.match_length = e.lookahead);
438
+ e.match_length = Ue - (a - i), e.match_length > e.lookahead && (e.match_length = e.lookahead);
439
439
  }
440
- if (e.match_length >= F ? (n = Re(e, 1, e.match_length - F), e.lookahead -= e.match_length, e.strstart += e.match_length, e.match_length = 0) : (n = Re(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++), n && (R(e, !1), e.strm.avail_out === 0)) return I;
440
+ if (e.match_length >= I ? (n = Le(e, 1, e.match_length - I), e.lookahead -= e.match_length, e.strstart += e.match_length, e.match_length = 0) : (n = Le(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++), n && (z(e, !1), e.strm.avail_out === 0)) return L;
441
441
  }
442
- return e.insert = 0, t === 4 ? (R(e, !0), e.strm.avail_out === 0 ? nt : rt) : e.sym_next && (R(e, !1), e.strm.avail_out === 0) ? I : tt;
443
- }, yt = (e, t) => {
442
+ return e.insert = 0, t === 4 ? (z(e, !0), e.strm.avail_out === 0 ? tt : nt) : e.sym_next && (z(e, !1), e.strm.avail_out === 0) ? L : et;
443
+ }, vt = (e, t) => {
444
444
  let n;
445
445
  for (;;) {
446
- if (e.lookahead === 0 && (mt(e), e.lookahead === 0)) {
447
- if (t === 0) return I;
446
+ if (e.lookahead === 0 && (pt(e), e.lookahead === 0)) {
447
+ if (t === 0) return L;
448
448
  break;
449
449
  }
450
- if (e.match_length = 0, n = Re(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++, n && (R(e, !1), e.strm.avail_out === 0)) return I;
450
+ if (e.match_length = 0, n = Le(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++, n && (z(e, !1), e.strm.avail_out === 0)) return L;
451
451
  }
452
- return e.insert = 0, t === 4 ? (R(e, !0), e.strm.avail_out === 0 ? nt : rt) : e.sym_next && (R(e, !1), e.strm.avail_out === 0) ? I : tt;
453
- }, bt = class {
452
+ return e.insert = 0, t === 4 ? (z(e, !0), e.strm.avail_out === 0 ? tt : nt) : e.sym_next && (z(e, !1), e.strm.avail_out === 0) ? L : et;
453
+ }, yt = class {
454
454
  constructor(e, t, n, r, i) {
455
455
  this.good_length = e, this.max_lazy = t, this.nice_length = n, this.max_chain = r, this.func = i;
456
456
  }
457
- }, xt = [
458
- new bt(0, 0, 0, 0, ht),
459
- new bt(4, 4, 8, 4, gt),
460
- new bt(4, 5, 16, 8, gt),
461
- new bt(4, 6, 32, 32, gt),
462
- new bt(4, 4, 16, 16, _t),
463
- new bt(8, 16, 32, 32, _t),
464
- new bt(8, 16, 128, 128, _t),
465
- new bt(8, 32, 128, 256, _t),
466
- new bt(32, 128, 258, 1024, _t),
467
- new bt(32, 258, 258, 4096, _t)
468
- ], St = (e) => {
469
- e.window_size = 2 * e.w_size, st(e.head), e.max_lazy_match = xt[e.level].max_lazy, e.good_match = xt[e.level].good_length, e.nice_match = xt[e.level].nice_length, e.max_chain_length = xt[e.level].max_chain, e.strstart = 0, e.block_start = 0, e.lookahead = 0, e.insert = 0, e.match_length = e.prev_length = F - 1, e.match_available = 0, e.ins_h = 0;
470
- }, Ct = class {
457
+ }, bt = [
458
+ new yt(0, 0, 0, 0, mt),
459
+ new yt(4, 4, 8, 4, ht),
460
+ new yt(4, 5, 16, 8, ht),
461
+ new yt(4, 6, 32, 32, ht),
462
+ new yt(4, 4, 16, 16, gt),
463
+ new yt(8, 16, 32, 32, gt),
464
+ new yt(8, 16, 128, 128, gt),
465
+ new yt(8, 32, 128, 256, gt),
466
+ new yt(32, 128, 258, 1024, gt),
467
+ new yt(32, 258, 258, 4096, gt)
468
+ ], xt = (e) => {
469
+ e.window_size = 2 * e.w_size, ot(e.head), e.max_lazy_match = bt[e.level].max_lazy, e.good_match = bt[e.level].good_length, e.nice_match = bt[e.level].nice_length, e.max_chain_length = bt[e.level].max_chain, e.strstart = 0, e.block_start = 0, e.lookahead = 0, e.insert = 0, e.match_length = e.prev_length = I - 1, e.match_available = 0, e.ins_h = 0;
470
+ }, St = class {
471
471
  constructor() {
472
- this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = 8, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.legacy_hash = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new Uint16Array(Ue * 2), this.dyn_dtree = /* @__PURE__ */ new Uint16Array(122), this.bl_tree = /* @__PURE__ */ new Uint16Array(78), st(this.dyn_ltree), st(this.dyn_dtree), st(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = /* @__PURE__ */ new Uint16Array(16), this.heap = /* @__PURE__ */ new Uint16Array(573), st(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = /* @__PURE__ */ new Uint16Array(573), st(this.depth), this.sym_buf = 0, this.lit_bufsize = 0, this.sym_next = 0, this.sym_end = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
472
+ this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = 8, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.legacy_hash = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new Uint16Array(He * 2), this.dyn_dtree = /* @__PURE__ */ new Uint16Array(122), this.bl_tree = /* @__PURE__ */ new Uint16Array(78), ot(this.dyn_ltree), ot(this.dyn_dtree), ot(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = /* @__PURE__ */ new Uint16Array(16), this.heap = /* @__PURE__ */ new Uint16Array(573), ot(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = /* @__PURE__ */ new Uint16Array(573), ot(this.depth), this.sym_buf = 0, this.lit_bufsize = 0, this.sym_next = 0, this.sym_end = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
473
473
  }
474
- }, wt = (e) => {
474
+ }, Ct = (e) => {
475
475
  if (!e) return 1;
476
476
  let t = e.state;
477
- return +(!t || t.strm !== e || t.status !== qe && t.status !== Je && t.status !== Ye && t.status !== Xe && t.status !== Ze && t.status !== Qe && t.status !== $e && t.status !== et);
478
- }, Tt = (e) => {
479
- if (wt(e)) return at(e, -2);
477
+ return +(!t || t.strm !== e || t.status !== Ke && t.status !== qe && t.status !== Je && t.status !== Ye && t.status !== Xe && t.status !== Ze && t.status !== Qe && t.status !== $e);
478
+ }, wt = (e) => {
479
+ if (Ct(e)) return it(e, -2);
480
480
  e.total_in = e.total_out = 0, e.data_type = 2;
481
481
  let t = e.state;
482
- return t.pending = 0, t.pending_out = 0, t.wrap < 0 && (t.wrap = -t.wrap), t.status = t.wrap === 2 ? Je : t.wrap ? qe : $e, e.adler = t.wrap === 2 ? 0 : 1, t.last_flush = -2, Pe(t), 0;
483
- }, Et = (e) => {
484
- let t = Tt(e);
485
- return t === 0 && St(e.state), t;
486
- }, Dt = (e, t, n, r, i, a, o) => {
482
+ return t.pending = 0, t.pending_out = 0, t.wrap < 0 && (t.wrap = -t.wrap), t.status = t.wrap === 2 ? qe : t.wrap ? Ke : Qe, e.adler = t.wrap === 2 ? 0 : 1, t.last_flush = -2, Ne(t), 0;
483
+ }, Tt = (e) => {
484
+ let t = wt(e);
485
+ return t === 0 && xt(e.state), t;
486
+ }, Et = (e, t, n, r, i, a, o) => {
487
487
  if (!e) return -2;
488
488
  let s = 1;
489
- if (t === -1 && (t = 6), r < 0 ? (s = 0, r = -r) : r > 15 && (s = 2, r -= 16), i < 1 || i > He || n !== 8 || r < 8 || r > 15 || t < 0 || t > 9 || a < 0 || a > 4 || r === 8 && s !== 1) return at(e, -2);
489
+ if (t === -1 && (t = 6), r < 0 ? (s = 0, r = -r) : r > 15 && (s = 2, r -= 16), i < 1 || i > Ve || n !== 8 || r < 8 || r > 15 || t < 0 || t > 9 || a < 0 || a > 4 || r === 8 && s !== 1) return it(e, -2);
490
490
  r === 8 && (r = 9);
491
- let c = new Ct();
492
- return e.state = c, c.strm = e, c.status = qe, c.wrap = s, c.gzhead = null, c.w_bits = r, c.w_size = 1 << c.w_bits, c.w_mask = c.w_size - 1, c.legacy_hash = +!!o, c.hash_bits = i + 7, !c.legacy_hash && c.hash_bits < 15 && (c.hash_bits = 15), c.hash_size = 1 << c.hash_bits, c.hash_mask = c.hash_size - 1, c.hash_shift = ~~((c.hash_bits + F - 1) / F), c.window = new Uint8Array(c.w_size * 2), c.head = new Uint16Array(c.hash_size), c.prev = new Uint16Array(c.w_size), c.lit_bufsize = 1 << i + 6, c.pending_buf_size = c.lit_bufsize * 4, c.pending_buf = new Uint8Array(c.pending_buf_size), c.sym_buf = c.lit_bufsize, c.sym_end = (c.lit_bufsize - 1) * 3, c.level = t, c.strategy = a, c.method = n, Et(e);
493
- }, Ot = (e, t) => {
494
- if (wt(e) || t > 5 || t < 0) return e ? at(e, -2) : -2;
491
+ let c = new St();
492
+ return e.state = c, c.strm = e, c.status = Ke, c.wrap = s, c.gzhead = null, c.w_bits = r, c.w_size = 1 << c.w_bits, c.w_mask = c.w_size - 1, c.legacy_hash = +!!o, c.hash_bits = i + 7, !c.legacy_hash && c.hash_bits < 15 && (c.hash_bits = 15), c.hash_size = 1 << c.hash_bits, c.hash_mask = c.hash_size - 1, c.hash_shift = ~~((c.hash_bits + I - 1) / I), c.window = new Uint8Array(c.w_size * 2), c.head = new Uint16Array(c.hash_size), c.prev = new Uint16Array(c.w_size), c.lit_bufsize = 1 << i + 6, c.pending_buf_size = c.lit_bufsize * 4, c.pending_buf = new Uint8Array(c.pending_buf_size), c.sym_buf = c.lit_bufsize, c.sym_end = (c.lit_bufsize - 1) * 3, c.level = t, c.strategy = a, c.method = n, Tt(e);
493
+ }, Dt = (e, t) => {
494
+ if (Ct(e) || t > 5 || t < 0) return e ? it(e, -2) : -2;
495
495
  let n = e.state;
496
- if (!e.output || e.avail_in !== 0 && !e.input || n.status === et && t !== 4) return at(e, e.avail_out === 0 ? -5 : -2);
496
+ if (!e.output || e.avail_in !== 0 && !e.input || n.status === $e && t !== 4) return it(e, e.avail_out === 0 ? -5 : -2);
497
497
  let r = n.last_flush;
498
498
  if (n.last_flush = t, n.pending !== 0) {
499
- if (L(e), e.avail_out === 0) return n.last_flush = -1, 0;
500
- } else if (e.avail_in === 0 && ot(t) <= ot(r) && t !== 4) return at(e, -5);
501
- if (n.status === et && e.avail_in !== 0) return at(e, -5);
502
- if (n.status === qe && n.wrap === 0 && (n.status = $e), n.status === qe) {
499
+ if (R(e), e.avail_out === 0) return n.last_flush = -1, 0;
500
+ } else if (e.avail_in === 0 && at(t) <= at(r) && t !== 4) return it(e, -5);
501
+ if (n.status === $e && e.avail_in !== 0) return it(e, -5);
502
+ if (n.status === Ke && n.wrap === 0 && (n.status = Qe), n.status === Ke) {
503
503
  let t = 8 + (n.w_bits - 8 << 4) << 8, r = -1;
504
- if (r = n.strategy >= 2 || n.level < 2 ? 0 : n.level < 6 ? 1 : n.level === 6 ? 2 : 3, t |= r << 6, n.strstart !== 0 && (t |= Ke), t += 31 - t % 31, dt(n, t), n.strstart !== 0 && (dt(n, e.adler >>> 16), dt(n, e.adler & 65535)), e.adler = 1, n.status = $e, L(e), n.pending !== 0) return n.last_flush = -1, 0;
504
+ if (r = n.strategy >= 2 || n.level < 2 ? 0 : n.level < 6 ? 1 : n.level === 6 ? 2 : 3, t |= r << 6, n.strstart !== 0 && (t |= Ge), t += 31 - t % 31, ut(n, t), n.strstart !== 0 && (ut(n, e.adler >>> 16), ut(n, e.adler & 65535)), e.adler = 1, n.status = Qe, R(e), n.pending !== 0) return n.last_flush = -1, 0;
505
505
  }
506
- if (n.status === Je) {
507
- if (e.adler = 0, z(n, 31), z(n, 139), z(n, 8), n.gzhead) z(n, +!!n.gzhead.text + (n.gzhead.hcrc ? 2 : 0) + (n.gzhead.extra ? 4 : 0) + (n.gzhead.name ? 8 : 0) + (n.gzhead.comment ? 16 : 0)), z(n, n.gzhead.time & 255), z(n, n.gzhead.time >> 8 & 255), z(n, n.gzhead.time >> 16 & 255), z(n, n.gzhead.time >> 24 & 255), z(n, n.level === 9 ? 2 : n.strategy >= 2 || n.level < 2 ? 4 : 0), z(n, n.gzhead.os & 255), n.gzhead.extra && n.gzhead.extra.length && (z(n, n.gzhead.extra.length & 255), z(n, n.gzhead.extra.length >> 8 & 255)), n.gzhead.hcrc && (e.adler = P(e.adler, n.pending_buf, n.pending, 0)), n.gzindex = 0, n.status = Ye;
508
- else if (z(n, 0), z(n, 0), z(n, 0), z(n, 0), z(n, 0), z(n, n.level === 9 ? 2 : n.strategy >= 2 || n.level < 2 ? 4 : 0), z(n, it), n.status = $e, L(e), n.pending !== 0) return n.last_flush = -1, 0;
506
+ if (n.status === qe) {
507
+ if (e.adler = 0, B(n, 31), B(n, 139), B(n, 8), n.gzhead) B(n, +!!n.gzhead.text + (n.gzhead.hcrc ? 2 : 0) + (n.gzhead.extra ? 4 : 0) + (n.gzhead.name ? 8 : 0) + (n.gzhead.comment ? 16 : 0)), B(n, n.gzhead.time & 255), B(n, n.gzhead.time >> 8 & 255), B(n, n.gzhead.time >> 16 & 255), B(n, n.gzhead.time >> 24 & 255), B(n, n.level === 9 ? 2 : n.strategy >= 2 || n.level < 2 ? 4 : 0), B(n, n.gzhead.os & 255), n.gzhead.extra && n.gzhead.extra.length && (B(n, n.gzhead.extra.length & 255), B(n, n.gzhead.extra.length >> 8 & 255)), n.gzhead.hcrc && (e.adler = F(e.adler, n.pending_buf, n.pending, 0)), n.gzindex = 0, n.status = Je;
508
+ else if (B(n, 0), B(n, 0), B(n, 0), B(n, 0), B(n, 0), B(n, n.level === 9 ? 2 : n.strategy >= 2 || n.level < 2 ? 4 : 0), B(n, rt), n.status = Qe, R(e), n.pending !== 0) return n.last_flush = -1, 0;
509
509
  }
510
- if (n.status === Ye) {
510
+ if (n.status === Je) {
511
511
  if (n.gzhead.extra) {
512
512
  let t = n.pending, r = (n.gzhead.extra.length & 65535) - n.gzindex;
513
513
  for (; n.pending + r > n.pending_buf_size;) {
514
514
  let i = n.pending_buf_size - n.pending;
515
- if (n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex, n.gzindex + i), n.pending), n.pending = n.pending_buf_size, n.gzhead.hcrc && n.pending > t && (e.adler = P(e.adler, n.pending_buf, n.pending - t, t)), n.gzindex += i, L(e), n.pending !== 0) return n.last_flush = -1, 0;
515
+ if (n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex, n.gzindex + i), n.pending), n.pending = n.pending_buf_size, n.gzhead.hcrc && n.pending > t && (e.adler = F(e.adler, n.pending_buf, n.pending - t, t)), n.gzindex += i, R(e), n.pending !== 0) return n.last_flush = -1, 0;
516
516
  t = 0, r -= i;
517
517
  }
518
518
  let i = new Uint8Array(n.gzhead.extra);
519
- n.pending_buf.set(i.subarray(n.gzindex, n.gzindex + r), n.pending), n.pending += r, n.gzhead.hcrc && n.pending > t && (e.adler = P(e.adler, n.pending_buf, n.pending - t, t)), n.gzindex = 0;
519
+ n.pending_buf.set(i.subarray(n.gzindex, n.gzindex + r), n.pending), n.pending += r, n.gzhead.hcrc && n.pending > t && (e.adler = F(e.adler, n.pending_buf, n.pending - t, t)), n.gzindex = 0;
520
520
  }
521
- n.status = Xe;
521
+ n.status = Ye;
522
522
  }
523
- if (n.status === Xe) {
523
+ if (n.status === Ye) {
524
524
  if (n.gzhead.name) {
525
525
  let t = n.pending, r;
526
526
  do {
527
527
  if (n.pending === n.pending_buf_size) {
528
- if (n.gzhead.hcrc && n.pending > t && (e.adler = P(e.adler, n.pending_buf, n.pending - t, t)), L(e), n.pending !== 0) return n.last_flush = -1, 0;
528
+ if (n.gzhead.hcrc && n.pending > t && (e.adler = F(e.adler, n.pending_buf, n.pending - t, t)), R(e), n.pending !== 0) return n.last_flush = -1, 0;
529
529
  t = 0;
530
530
  }
531
- r = n.gzindex < n.gzhead.name.length ? n.gzhead.name.charCodeAt(n.gzindex++) & 255 : 0, z(n, r);
531
+ r = n.gzindex < n.gzhead.name.length ? n.gzhead.name.charCodeAt(n.gzindex++) & 255 : 0, B(n, r);
532
532
  } while (r !== 0);
533
- n.gzhead.hcrc && n.pending > t && (e.adler = P(e.adler, n.pending_buf, n.pending - t, t)), n.gzindex = 0;
533
+ n.gzhead.hcrc && n.pending > t && (e.adler = F(e.adler, n.pending_buf, n.pending - t, t)), n.gzindex = 0;
534
534
  }
535
- n.status = Ze;
535
+ n.status = Xe;
536
536
  }
537
- if (n.status === Ze) {
537
+ if (n.status === Xe) {
538
538
  if (n.gzhead.comment) {
539
539
  let t = n.pending, r;
540
540
  do {
541
541
  if (n.pending === n.pending_buf_size) {
542
- if (n.gzhead.hcrc && n.pending > t && (e.adler = P(e.adler, n.pending_buf, n.pending - t, t)), L(e), n.pending !== 0) return n.last_flush = -1, 0;
542
+ if (n.gzhead.hcrc && n.pending > t && (e.adler = F(e.adler, n.pending_buf, n.pending - t, t)), R(e), n.pending !== 0) return n.last_flush = -1, 0;
543
543
  t = 0;
544
544
  }
545
- r = n.gzindex < n.gzhead.comment.length ? n.gzhead.comment.charCodeAt(n.gzindex++) & 255 : 0, z(n, r);
545
+ r = n.gzindex < n.gzhead.comment.length ? n.gzhead.comment.charCodeAt(n.gzindex++) & 255 : 0, B(n, r);
546
546
  } while (r !== 0);
547
- n.gzhead.hcrc && n.pending > t && (e.adler = P(e.adler, n.pending_buf, n.pending - t, t));
547
+ n.gzhead.hcrc && n.pending > t && (e.adler = F(e.adler, n.pending_buf, n.pending - t, t));
548
548
  }
549
- n.status = Qe;
549
+ n.status = Ze;
550
550
  }
551
- if (n.status === Qe) {
551
+ if (n.status === Ze) {
552
552
  if (n.gzhead.hcrc) {
553
- if (n.pending + 2 > n.pending_buf_size && (L(e), n.pending !== 0)) return n.last_flush = -1, 0;
554
- z(n, e.adler & 255), z(n, e.adler >> 8 & 255), e.adler = 0;
553
+ if (n.pending + 2 > n.pending_buf_size && (R(e), n.pending !== 0)) return n.last_flush = -1, 0;
554
+ B(n, e.adler & 255), B(n, e.adler >> 8 & 255), e.adler = 0;
555
555
  }
556
- if (n.status = $e, L(e), n.pending !== 0) return n.last_flush = -1, 0;
556
+ if (n.status = Qe, R(e), n.pending !== 0) return n.last_flush = -1, 0;
557
557
  }
558
- if (e.avail_in !== 0 || n.lookahead !== 0 || t !== 0 && n.status !== et) {
559
- let r = n.level === 0 ? ht(n, t) : n.strategy === 2 ? yt(n, t) : n.strategy === 3 ? vt(n, t) : xt[n.level].func(n, t);
560
- if ((r === nt || r === rt) && (n.status = et), r === I || r === nt) return e.avail_out === 0 && (n.last_flush = -1), 0;
561
- if (r === tt && (t === 1 ? Ie(n) : t !== 5 && (Fe(n, 0, 0, !1), t === 3 && (st(n.head), n.lookahead === 0 && (n.strstart = 0, n.block_start = 0, n.insert = 0))), L(e), e.avail_out === 0)) return n.last_flush = -1, 0;
558
+ if (e.avail_in !== 0 || n.lookahead !== 0 || t !== 0 && n.status !== $e) {
559
+ let r = n.level === 0 ? mt(n, t) : n.strategy === 2 ? vt(n, t) : n.strategy === 3 ? _t(n, t) : bt[n.level].func(n, t);
560
+ if ((r === tt || r === nt) && (n.status = $e), r === L || r === tt) return e.avail_out === 0 && (n.last_flush = -1), 0;
561
+ if (r === et && (t === 1 ? Fe(n) : t !== 5 && (Pe(n, 0, 0, !1), t === 3 && (ot(n.head), n.lookahead === 0 && (n.strstart = 0, n.block_start = 0, n.insert = 0))), R(e), e.avail_out === 0)) return n.last_flush = -1, 0;
562
562
  }
563
- return t === 4 ? n.wrap <= 0 ? 1 : (n.wrap === 2 ? (z(n, e.adler & 255), z(n, e.adler >> 8 & 255), z(n, e.adler >> 16 & 255), z(n, e.adler >> 24 & 255), z(n, e.total_in & 255), z(n, e.total_in >> 8 & 255), z(n, e.total_in >> 16 & 255), z(n, e.total_in >> 24 & 255)) : (dt(n, e.adler >>> 16), dt(n, e.adler & 65535)), L(e), n.wrap > 0 && (n.wrap = -n.wrap), +(n.pending === 0)) : 0;
564
- }, kt = (e) => {
565
- if (wt(e)) return -2;
563
+ return t === 4 ? n.wrap <= 0 ? 1 : (n.wrap === 2 ? (B(n, e.adler & 255), B(n, e.adler >> 8 & 255), B(n, e.adler >> 16 & 255), B(n, e.adler >> 24 & 255), B(n, e.total_in & 255), B(n, e.total_in >> 8 & 255), B(n, e.total_in >> 16 & 255), B(n, e.total_in >> 24 & 255)) : (ut(n, e.adler >>> 16), ut(n, e.adler & 65535)), R(e), n.wrap > 0 && (n.wrap = -n.wrap), +(n.pending === 0)) : 0;
564
+ }, Ot = (e) => {
565
+ if (Ct(e)) return -2;
566
566
  let t = e.state.status;
567
- return e.state = null, t === $e ? at(e, -3) : 0;
568
- }, At = (e, t) => {
567
+ return e.state = null, t === Qe ? it(e, -3) : 0;
568
+ }, kt = (e, t) => {
569
569
  let n = t.length;
570
- if (wt(e)) return -2;
570
+ if (Ct(e)) return -2;
571
571
  let r = e.state, i = r.wrap;
572
- if (i === 2 || i === 1 && r.status !== qe || r.lookahead) return -2;
573
- if (i === 1 && (e.adler = ze(e.adler, t, n, 0)), r.wrap = 0, n >= r.w_size) {
574
- i === 0 && (st(r.head), r.strstart = 0, r.block_start = 0, r.insert = 0);
572
+ if (i === 2 || i === 1 && r.status !== Ke || r.lookahead) return -2;
573
+ if (i === 1 && (e.adler = Re(e.adler, t, n, 0)), r.wrap = 0, n >= r.w_size) {
574
+ i === 0 && (ot(r.head), r.strstart = 0, r.block_start = 0, r.insert = 0);
575
575
  let e = new Uint8Array(r.w_size);
576
576
  e.set(t.subarray(n - r.w_size, n), 0), t = e, n = r.w_size;
577
577
  }
578
578
  let a = e.avail_in, o = e.next_in, s = e.input;
579
- for (e.avail_in = n, e.next_in = 0, e.input = t, mt(r); r.lookahead >= F;) {
580
- let e = r.strstart, t = r.lookahead - (F - 1);
579
+ for (e.avail_in = n, e.next_in = 0, e.input = t, pt(r); r.lookahead >= I;) {
580
+ let e = r.strstart, t = r.lookahead - (I - 1);
581
581
  do
582
- ut(r, e), e++;
582
+ lt(r, e), e++;
583
583
  while (--t);
584
- r.strstart = e, r.lookahead = F - 1, mt(r);
584
+ r.strstart = e, r.lookahead = I - 1, pt(r);
585
585
  }
586
- return r.strstart += r.lookahead, r.block_start = r.strstart, r.insert = r.lookahead, r.lookahead = 0, r.match_length = r.prev_length = F - 1, r.match_available = 0, e.next_in = o, e.input = s, e.avail_in = a, r.wrap = i, 0;
587
- }, jt = 16209, Mt = 16191;
588
- function Nt(e, t) {
586
+ return r.strstart += r.lookahead, r.block_start = r.strstart, r.insert = r.lookahead, r.lookahead = 0, r.match_length = r.prev_length = I - 1, r.match_available = 0, e.next_in = o, e.input = s, e.avail_in = a, r.wrap = i, 0;
587
+ }, At = 16209, jt = 16191;
588
+ function Mt(e, t) {
589
589
  let n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C, w, T, E = e.state;
590
590
  n = e.next_in, w = e.input, r = n + (e.avail_in - 5), i = e.next_out, T = e.output, a = i - (t - e.avail_out), o = i + (e.avail_out - 257), s = E.dmax, c = E.wsize, l = E.whave, u = E.wnext, d = E.window, f = E.hold, p = E.bits, m = E.lencode, h = E.distcode, g = (1 << E.lenbits) - 1, _ = (1 << E.distbits) - 1;
591
591
  top: do {
@@ -597,12 +597,12 @@ function Nt(e, t) {
597
597
  dodist: for (;;) {
598
598
  if (y = v >>> 24, f >>>= y, p -= y, y = v >>> 16 & 255, y & 16) {
599
599
  if (x = v & 65535, y &= 15, p < y && (f += w[n++] << p, p += 8, p < y && (f += w[n++] << p, p += 8)), x += f & (1 << y) - 1, x > s) {
600
- e.msg = "invalid distance too far back", E.mode = jt;
600
+ e.msg = "invalid distance too far back", E.mode = At;
601
601
  break top;
602
602
  }
603
603
  if (f >>>= y, p -= y, y = i - a, x > y) {
604
604
  if (y = x - y, y > l && E.sane) {
605
- e.msg = "invalid distance too far back", E.mode = jt;
605
+ e.msg = "invalid distance too far back", E.mode = At;
606
606
  break top;
607
607
  }
608
608
  if (S = 0, C = d, u === 0) {
@@ -644,7 +644,7 @@ function Nt(e, t) {
644
644
  b && (T[i++] = T[S++], b > 1 && (T[i++] = T[S++]));
645
645
  }
646
646
  } else if (y & 64) {
647
- e.msg = "invalid distance code", E.mode = jt;
647
+ e.msg = "invalid distance code", E.mode = At;
648
648
  break top;
649
649
  } else {
650
650
  v = h[(v & 65535) + (f & (1 << y) - 1)];
@@ -656,10 +656,10 @@ function Nt(e, t) {
656
656
  v = m[(v & 65535) + (f & (1 << y) - 1)];
657
657
  continue dolen;
658
658
  } else if (y & 32) {
659
- E.mode = Mt;
659
+ E.mode = jt;
660
660
  break top;
661
661
  } else {
662
- e.msg = "invalid literal/length code", E.mode = jt;
662
+ e.msg = "invalid literal/length code", E.mode = At;
663
663
  break top;
664
664
  }
665
665
  break;
@@ -667,7 +667,7 @@ function Nt(e, t) {
667
667
  } while (n < r && i < o);
668
668
  b = p >> 3, n -= b, p -= b << 3, f &= (1 << p) - 1, e.next_in = n, e.next_out = i, e.avail_in = n < r ? 5 + (r - n) : 5 - (n - r), e.avail_out = i < o ? 257 + (o - i) : 257 - (i - o), E.hold = f, E.bits = p;
669
669
  }
670
- var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
670
+ var Nt = 15, Pt = 852, Ft = 592, It = 0, Lt = 1, Rt = 2, zt = new Uint16Array([
671
671
  3,
672
672
  4,
673
673
  5,
@@ -699,7 +699,7 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
699
699
  258,
700
700
  0,
701
701
  0
702
- ]), Vt = new Uint8Array([
702
+ ]), Bt = new Uint8Array([
703
703
  16,
704
704
  16,
705
705
  16,
@@ -731,7 +731,7 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
731
731
  16,
732
732
  199,
733
733
  75
734
- ]), Ht = new Uint16Array([
734
+ ]), Vt = new Uint16Array([
735
735
  1,
736
736
  2,
737
737
  3,
@@ -764,7 +764,7 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
764
764
  24577,
765
765
  0,
766
766
  0
767
- ]), Ut = new Uint8Array([
767
+ ]), Ht = new Uint8Array([
768
768
  16,
769
769
  16,
770
770
  16,
@@ -797,18 +797,18 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
797
797
  29,
798
798
  64,
799
799
  64
800
- ]), Wt = (e, t, n, r, i, a, o, s) => {
800
+ ]), Ut = (e, t, n, r, i, a, o, s) => {
801
801
  let c = s.bits, l = 0, u = 0, d = 0, f = 0, p = 0, m = 0, h = 0, g = 0, _ = 0, v = 0, y, b, x, S, C, w = null, T, E = /* @__PURE__ */ new Uint16Array(16), D = /* @__PURE__ */ new Uint16Array(16), O = null, k, A, j;
802
- for (l = 0; l <= Pt; l++) E[l] = 0;
802
+ for (l = 0; l <= Nt; l++) E[l] = 0;
803
803
  for (u = 0; u < r; u++) E[t[n + u]]++;
804
- for (p = c, f = Pt; f >= 1 && E[f] === 0; f--);
804
+ for (p = c, f = Nt; f >= 1 && E[f] === 0; f--);
805
805
  if (p > f && (p = f), f === 0) return i[a++] = 20971520, i[a++] = 20971520, s.bits = 1, 0;
806
806
  for (d = 1; d < f && E[d] === 0; d++);
807
- for (p < d && (p = d), g = 1, l = 1; l <= Pt; l++) if (g <<= 1, g -= E[l], g < 0) return -1;
808
- if (g > 0 && (e === Lt || f !== 1)) return -1;
809
- for (D[1] = 0, l = 1; l < Pt; l++) D[l + 1] = D[l] + E[l];
807
+ for (p < d && (p = d), g = 1, l = 1; l <= Nt; l++) if (g <<= 1, g -= E[l], g < 0) return -1;
808
+ if (g > 0 && (e === It || f !== 1)) return -1;
809
+ for (D[1] = 0, l = 1; l < Nt; l++) D[l + 1] = D[l] + E[l];
810
810
  for (u = 0; u < r; u++) t[n + u] !== 0 && (o[D[t[n + u]]++] = u);
811
- if (e === Lt ? (w = O = o, T = 20) : e === Rt ? (w = Bt, O = Vt, T = 257) : (w = Ht, O = Ut, T = 0), v = 0, u = 0, l = d, C = a, m = p, h = 0, x = -1, _ = 1 << p, S = _ - 1, e === Rt && _ > Ft || e === zt && _ > It) return 1;
811
+ if (e === It ? (w = O = o, T = 20) : e === Lt ? (w = zt, O = Bt, T = 257) : (w = Vt, O = Ht, T = 0), v = 0, u = 0, l = d, C = a, m = p, h = 0, x = -1, _ = 1 << p, S = _ - 1, e === Lt && _ > Pt || e === Rt && _ > Ft) return 1;
812
812
  for (;;) {
813
813
  k = l - h, o[u] + 1 < T ? (A = 0, j = o[u]) : o[u] >= T ? (A = O[o[u] - T], j = w[o[u] - T]) : (A = 96, j = 0), y = 1 << l - h, b = 1 << m, d = b;
814
814
  do
@@ -821,54 +821,54 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
821
821
  }
822
822
  if (l > p && (v & S) !== x) {
823
823
  for (h === 0 && (h = p), C += d, m = l - h, g = 1 << m; m + h < f && (g -= E[m + h], !(g <= 0));) m++, g <<= 1;
824
- if (_ += 1 << m, e === Rt && _ > Ft || e === zt && _ > It) return 1;
824
+ if (_ += 1 << m, e === Lt && _ > Pt || e === Rt && _ > Ft) return 1;
825
825
  x = v & S, i[x] = p << 24 | m << 16 | C - a | 0;
826
826
  }
827
827
  }
828
828
  return v !== 0 && (i[C + v] = l - h << 24 | 4194304), s.bits = p, 0;
829
- }, Gt = 0, Kt = 1, qt = 2, Jt = 16180, Yt = 16181, Xt = 16182, Zt = 16183, Qt = 16184, $t = 16185, en = 16186, tn = 16187, nn = 16188, rn = 16189, an = 16190, on = 16191, sn = 16192, cn = 16193, ln = 16194, un = 16195, dn = 16196, fn = 16197, pn = 16198, mn = 16199, hn = 16200, gn = 16201, _n = 16202, vn = 16203, yn = 16204, bn = 16205, xn = 16206, Sn = 16207, Cn = 16208, B = 16209, wn = 16210, Tn = 16211, En = 852, Dn = 592, On = (e) => (e >>> 24 & 255) + (e >>> 8 & 65280) + ((e & 65280) << 8) + ((e & 255) << 24), kn = class {
829
+ }, Wt = 0, Gt = 1, Kt = 2, qt = 16180, Jt = 16181, Yt = 16182, Xt = 16183, Zt = 16184, Qt = 16185, $t = 16186, en = 16187, tn = 16188, nn = 16189, rn = 16190, an = 16191, on = 16192, sn = 16193, cn = 16194, ln = 16195, un = 16196, dn = 16197, fn = 16198, pn = 16199, mn = 16200, hn = 16201, gn = 16202, _n = 16203, vn = 16204, yn = 16205, bn = 16206, xn = 16207, Sn = 16208, V = 16209, Cn = 16210, wn = 16211, Tn = 852, En = 592, Dn = (e) => (e >>> 24 & 255) + (e >>> 8 & 65280) + ((e & 65280) << 8) + ((e & 255) << 24), On = class {
830
830
  constructor() {
831
831
  this.strm = null, this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = /* @__PURE__ */ new Uint16Array(320), this.work = /* @__PURE__ */ new Uint16Array(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
832
832
  }
833
- }, An = (e) => {
833
+ }, kn = (e) => {
834
834
  if (!e) return 1;
835
835
  let t = e.state;
836
- return +(!t || t.strm !== e || t.mode < Jt || t.mode > Tn);
837
- }, jn = (e) => {
838
- if (An(e)) return -2;
836
+ return +(!t || t.strm !== e || t.mode < qt || t.mode > wn);
837
+ }, An = (e) => {
838
+ if (kn(e)) return -2;
839
839
  let t = e.state;
840
- return e.total_in = e.total_out = t.total = 0, e.msg = "", t.wrap && (e.adler = t.wrap & 1), t.mode = Jt, t.last = 0, t.havedict = 0, t.flags = -1, t.dmax = 32768, t.head = null, t.hold = 0, t.bits = 0, t.lencode = t.lendyn = new Int32Array(En), t.distcode = t.distdyn = new Int32Array(Dn), t.sane = 1, t.back = -1, 0;
841
- }, Mn = (e) => {
842
- if (An(e)) return -2;
840
+ return e.total_in = e.total_out = t.total = 0, e.msg = "", t.wrap && (e.adler = t.wrap & 1), t.mode = qt, t.last = 0, t.havedict = 0, t.flags = -1, t.dmax = 32768, t.head = null, t.hold = 0, t.bits = 0, t.lencode = t.lendyn = new Int32Array(Tn), t.distcode = t.distdyn = new Int32Array(En), t.sane = 1, t.back = -1, 0;
841
+ }, jn = (e) => {
842
+ if (kn(e)) return -2;
843
843
  let t = e.state;
844
- return t.wsize = 0, t.whave = 0, t.wnext = 0, jn(e);
845
- }, Nn = (e, t) => {
844
+ return t.wsize = 0, t.whave = 0, t.wnext = 0, An(e);
845
+ }, Mn = (e, t) => {
846
846
  let n;
847
- if (An(e)) return -2;
847
+ if (kn(e)) return -2;
848
848
  let r = e.state;
849
- return t < 0 ? (n = 0, t = -t) : (n = (t >> 4) + 5, t < 48 && (t &= 15)), t && (t < 8 || t > 15) ? -2 : (r.window !== null && r.wbits !== t && (r.window = null), r.wrap = n, r.wbits = t, Mn(e));
850
- }, Pn = (e, t) => {
849
+ return t < 0 ? (n = 0, t = -t) : (n = (t >> 4) + 5, t < 48 && (t &= 15)), t && (t < 8 || t > 15) ? -2 : (r.window !== null && r.wbits !== t && (r.window = null), r.wrap = n, r.wbits = t, jn(e));
850
+ }, Nn = (e, t) => {
851
851
  if (!e) return -2;
852
- let n = new kn();
853
- e.state = n, n.strm = e, n.window = null, n.mode = Jt;
854
- let r = Nn(e, t);
852
+ let n = new On();
853
+ e.state = n, n.strm = e, n.window = null, n.mode = qt;
854
+ let r = Mn(e, t);
855
855
  return r !== 0 && (e.state = null), r;
856
- }, Fn = !0, In, Ln, Rn = (e) => {
857
- if (Fn) {
858
- In = /* @__PURE__ */ new Int32Array(512), Ln = /* @__PURE__ */ new Int32Array(32);
856
+ }, Pn = !0, Fn, In, Ln = (e) => {
857
+ if (Pn) {
858
+ Fn = /* @__PURE__ */ new Int32Array(512), In = /* @__PURE__ */ new Int32Array(32);
859
859
  let t = 0;
860
860
  for (; t < 144;) e.lens[t++] = 8;
861
861
  for (; t < 256;) e.lens[t++] = 9;
862
862
  for (; t < 280;) e.lens[t++] = 7;
863
863
  for (; t < 288;) e.lens[t++] = 8;
864
- for (Wt(Kt, e.lens, 0, 288, In, 0, e.work, { bits: 9 }), t = 0; t < 32;) e.lens[t++] = 5;
865
- Wt(qt, e.lens, 0, 32, Ln, 0, e.work, { bits: 5 }), Fn = !1;
864
+ for (Ut(Gt, e.lens, 0, 288, Fn, 0, e.work, { bits: 9 }), t = 0; t < 32;) e.lens[t++] = 5;
865
+ Ut(Kt, e.lens, 0, 32, In, 0, e.work, { bits: 5 }), Pn = !1;
866
866
  }
867
- e.lencode = In, e.lenbits = 9, e.distcode = Ln, e.distbits = 5;
868
- }, zn = (e, t, n, r) => {
867
+ e.lencode = Fn, e.lenbits = 9, e.distcode = In, e.distbits = 5;
868
+ }, Rn = (e, t, n, r) => {
869
869
  let i, a = e.state;
870
870
  return a.window === null && (a.window = new Uint8Array(1 << a.wbits)), a.wsize === 0 && (a.wsize = 1 << a.wbits, a.wnext = 0, a.whave = 0), r >= a.wsize ? (a.window.set(t.subarray(n - a.wsize, n), 0), a.wnext = 0, a.whave = a.wsize) : (i = a.wsize - a.wnext, i > r && (i = r), a.window.set(t.subarray(n - r, n - r + i), a.wnext), r -= i, r ? (a.window.set(t.subarray(n - r, n), 0), a.wnext = r, a.whave = a.wsize) : (a.wnext += i, a.wnext === a.wsize && (a.wnext = 0), a.whave < a.wsize && (a.whave += i))), 0;
871
- }, Bn = (e, t) => {
871
+ }, zn = (e, t) => {
872
872
  let n, r, i, a, o, s, c, l, u, d, f, p, m, h, g = 0, _, v, y, b, x, S, C, w, T = /* @__PURE__ */ new Uint8Array(4), E, D, O = new Uint8Array([
873
873
  16,
874
874
  17,
@@ -890,12 +890,12 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
890
890
  1,
891
891
  15
892
892
  ]);
893
- if (An(e) || !e.output || !e.input && e.avail_in !== 0) return -2;
894
- n = e.state, n.mode === on && (n.mode = sn), o = e.next_out, i = e.output, c = e.avail_out, a = e.next_in, r = e.input, s = e.avail_in, l = n.hold, u = n.bits, d = s, f = c, w = 0;
893
+ if (kn(e) || !e.output || !e.input && e.avail_in !== 0) return -2;
894
+ n = e.state, n.mode === an && (n.mode = on), o = e.next_out, i = e.output, c = e.avail_out, a = e.next_in, r = e.input, s = e.avail_in, l = n.hold, u = n.bits, d = s, f = c, w = 0;
895
895
  inf_leave: for (;;) switch (n.mode) {
896
- case Jt:
896
+ case qt:
897
897
  if (n.wrap === 0) {
898
- n.mode = sn;
898
+ n.mode = on;
899
899
  break;
900
900
  }
901
901
  for (; u < 16;) {
@@ -903,108 +903,108 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
903
903
  s--, l += r[a++] << u, u += 8;
904
904
  }
905
905
  if (n.wrap & 2 && l === 35615) {
906
- n.wbits === 0 && (n.wbits = 15), n.check = 0, T[0] = l & 255, T[1] = l >>> 8 & 255, n.check = P(n.check, T, 2, 0), l = 0, u = 0, n.mode = Yt;
906
+ n.wbits === 0 && (n.wbits = 15), n.check = 0, T[0] = l & 255, T[1] = l >>> 8 & 255, n.check = F(n.check, T, 2, 0), l = 0, u = 0, n.mode = Jt;
907
907
  break;
908
908
  }
909
909
  if (n.head && (n.head.done = !1), !(n.wrap & 1) || (((l & 255) << 8) + (l >> 8)) % 31) {
910
- e.msg = "incorrect header check", n.mode = B;
910
+ e.msg = "incorrect header check", n.mode = V;
911
911
  break;
912
912
  }
913
913
  if ((l & 15) != 8) {
914
- e.msg = "unknown compression method", n.mode = B;
914
+ e.msg = "unknown compression method", n.mode = V;
915
915
  break;
916
916
  }
917
917
  if (l >>>= 4, u -= 4, C = (l & 15) + 8, n.wbits === 0 && (n.wbits = C), C > 15 || C > n.wbits) {
918
- e.msg = "invalid window size", n.mode = B;
918
+ e.msg = "invalid window size", n.mode = V;
919
919
  break;
920
920
  }
921
- n.dmax = 1 << n.wbits, n.flags = 0, e.adler = n.check = 1, n.mode = l & 512 ? rn : on, l = 0, u = 0;
921
+ n.dmax = 1 << n.wbits, n.flags = 0, e.adler = n.check = 1, n.mode = l & 512 ? nn : an, l = 0, u = 0;
922
922
  break;
923
- case Yt:
923
+ case Jt:
924
924
  for (; u < 16;) {
925
925
  if (s === 0) break inf_leave;
926
926
  s--, l += r[a++] << u, u += 8;
927
927
  }
928
928
  if (n.flags = l, (n.flags & 255) != 8) {
929
- e.msg = "unknown compression method", n.mode = B;
929
+ e.msg = "unknown compression method", n.mode = V;
930
930
  break;
931
931
  }
932
932
  if (n.flags & 57344) {
933
- e.msg = "unknown header flags set", n.mode = B;
933
+ e.msg = "unknown header flags set", n.mode = V;
934
934
  break;
935
935
  }
936
- n.head && (n.head.text = l >> 8 & 1), n.flags & 512 && n.wrap & 4 && (T[0] = l & 255, T[1] = l >>> 8 & 255, n.check = P(n.check, T, 2, 0)), l = 0, u = 0, n.mode = Xt;
937
- case Xt:
936
+ n.head && (n.head.text = l >> 8 & 1), n.flags & 512 && n.wrap & 4 && (T[0] = l & 255, T[1] = l >>> 8 & 255, n.check = F(n.check, T, 2, 0)), l = 0, u = 0, n.mode = Yt;
937
+ case Yt:
938
938
  for (; u < 32;) {
939
939
  if (s === 0) break inf_leave;
940
940
  s--, l += r[a++] << u, u += 8;
941
941
  }
942
- n.head && (n.head.time = l), n.flags & 512 && n.wrap & 4 && (T[0] = l & 255, T[1] = l >>> 8 & 255, T[2] = l >>> 16 & 255, T[3] = l >>> 24 & 255, n.check = P(n.check, T, 4, 0)), l = 0, u = 0, n.mode = Zt;
943
- case Zt:
942
+ n.head && (n.head.time = l), n.flags & 512 && n.wrap & 4 && (T[0] = l & 255, T[1] = l >>> 8 & 255, T[2] = l >>> 16 & 255, T[3] = l >>> 24 & 255, n.check = F(n.check, T, 4, 0)), l = 0, u = 0, n.mode = Xt;
943
+ case Xt:
944
944
  for (; u < 16;) {
945
945
  if (s === 0) break inf_leave;
946
946
  s--, l += r[a++] << u, u += 8;
947
947
  }
948
- n.head && (n.head.xflags = l & 255, n.head.os = l >> 8), n.flags & 512 && n.wrap & 4 && (T[0] = l & 255, T[1] = l >>> 8 & 255, n.check = P(n.check, T, 2, 0)), l = 0, u = 0, n.mode = Qt;
949
- case Qt:
948
+ n.head && (n.head.xflags = l & 255, n.head.os = l >> 8), n.flags & 512 && n.wrap & 4 && (T[0] = l & 255, T[1] = l >>> 8 & 255, n.check = F(n.check, T, 2, 0)), l = 0, u = 0, n.mode = Zt;
949
+ case Zt:
950
950
  if (n.flags & 1024) {
951
951
  for (; u < 16;) {
952
952
  if (s === 0) break inf_leave;
953
953
  s--, l += r[a++] << u, u += 8;
954
954
  }
955
- n.length = l, n.head && (n.head.extra_len = l), n.flags & 512 && n.wrap & 4 && (T[0] = l & 255, T[1] = l >>> 8 & 255, n.check = P(n.check, T, 2, 0)), l = 0, u = 0;
955
+ n.length = l, n.head && (n.head.extra_len = l), n.flags & 512 && n.wrap & 4 && (T[0] = l & 255, T[1] = l >>> 8 & 255, n.check = F(n.check, T, 2, 0)), l = 0, u = 0;
956
956
  } else n.head && (n.head.extra = null);
957
- n.mode = $t;
957
+ n.mode = Qt;
958
+ case Qt:
959
+ if (n.flags & 1024 && (p = n.length, p > s && (p = s), p && (n.head && (C = n.head.extra_len - n.length, n.head.extra || (n.head.extra = new Uint8Array(n.head.extra_len)), n.head.extra.set(r.subarray(a, a + p), C)), n.flags & 512 && n.wrap & 4 && (n.check = F(n.check, r, p, a)), s -= p, a += p, n.length -= p), n.length)) break inf_leave;
960
+ n.length = 0, n.mode = $t;
958
961
  case $t:
959
- if (n.flags & 1024 && (p = n.length, p > s && (p = s), p && (n.head && (C = n.head.extra_len - n.length, n.head.extra || (n.head.extra = new Uint8Array(n.head.extra_len)), n.head.extra.set(r.subarray(a, a + p), C)), n.flags & 512 && n.wrap & 4 && (n.check = P(n.check, r, p, a)), s -= p, a += p, n.length -= p), n.length)) break inf_leave;
960
- n.length = 0, n.mode = en;
961
- case en:
962
962
  if (n.flags & 2048) {
963
963
  if (s === 0) break inf_leave;
964
964
  p = 0;
965
965
  do
966
966
  C = r[a + p++], n.head && C && n.length < 65536 && (n.head.name += String.fromCharCode(C));
967
967
  while (C && p < s);
968
- if (n.flags & 512 && n.wrap & 4 && (n.check = P(n.check, r, p, a)), s -= p, a += p, C) break inf_leave;
968
+ if (n.flags & 512 && n.wrap & 4 && (n.check = F(n.check, r, p, a)), s -= p, a += p, C) break inf_leave;
969
969
  } else n.head && (n.head.name = null);
970
- n.length = 0, n.mode = tn;
971
- case tn:
970
+ n.length = 0, n.mode = en;
971
+ case en:
972
972
  if (n.flags & 4096) {
973
973
  if (s === 0) break inf_leave;
974
974
  p = 0;
975
975
  do
976
976
  C = r[a + p++], n.head && C && n.length < 65536 && (n.head.comment += String.fromCharCode(C));
977
977
  while (C && p < s);
978
- if (n.flags & 512 && n.wrap & 4 && (n.check = P(n.check, r, p, a)), s -= p, a += p, C) break inf_leave;
978
+ if (n.flags & 512 && n.wrap & 4 && (n.check = F(n.check, r, p, a)), s -= p, a += p, C) break inf_leave;
979
979
  } else n.head && (n.head.comment = null);
980
- n.mode = nn;
981
- case nn:
980
+ n.mode = tn;
981
+ case tn:
982
982
  if (n.flags & 512) {
983
983
  for (; u < 16;) {
984
984
  if (s === 0) break inf_leave;
985
985
  s--, l += r[a++] << u, u += 8;
986
986
  }
987
987
  if (n.wrap & 4 && l !== (n.check & 65535)) {
988
- e.msg = "header crc mismatch", n.mode = B;
988
+ e.msg = "header crc mismatch", n.mode = V;
989
989
  break;
990
990
  }
991
991
  l = 0, u = 0;
992
992
  }
993
- n.head && (n.head.hcrc = n.flags >> 9 & 1, n.head.done = !0), e.adler = n.check = 0, n.mode = on;
993
+ n.head && (n.head.hcrc = n.flags >> 9 & 1, n.head.done = !0), e.adler = n.check = 0, n.mode = an;
994
994
  break;
995
- case rn:
995
+ case nn:
996
996
  for (; u < 32;) {
997
997
  if (s === 0) break inf_leave;
998
998
  s--, l += r[a++] << u, u += 8;
999
999
  }
1000
- e.adler = n.check = On(l), l = 0, u = 0, n.mode = an;
1001
- case an:
1000
+ e.adler = n.check = Dn(l), l = 0, u = 0, n.mode = rn;
1001
+ case rn:
1002
1002
  if (n.havedict === 0) return e.next_out = o, e.avail_out = c, e.next_in = a, e.avail_in = s, n.hold = l, n.bits = u, 2;
1003
- e.adler = n.check = 1, n.mode = on;
1004
- case on: if (t === 5 || t === 6) break inf_leave;
1005
- case sn:
1003
+ e.adler = n.check = 1, n.mode = an;
1004
+ case an: if (t === 5 || t === 6) break inf_leave;
1005
+ case on:
1006
1006
  if (n.last) {
1007
- l >>>= u & 7, u -= u & 7, n.mode = xn;
1007
+ l >>>= u & 7, u -= u & 7, n.mode = bn;
1008
1008
  break;
1009
1009
  }
1010
1010
  for (; u < 3;) {
@@ -1013,51 +1013,51 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
1013
1013
  }
1014
1014
  switch (n.last = l & 1, l >>>= 1, --u, l & 3) {
1015
1015
  case 0:
1016
- n.mode = cn;
1016
+ n.mode = sn;
1017
1017
  break;
1018
1018
  case 1:
1019
- if (Rn(n), n.mode = mn, t === 6) {
1019
+ if (Ln(n), n.mode = pn, t === 6) {
1020
1020
  l >>>= 2, u -= 2;
1021
1021
  break inf_leave;
1022
1022
  }
1023
1023
  break;
1024
1024
  case 2:
1025
- n.mode = dn;
1025
+ n.mode = un;
1026
1026
  break;
1027
- case 3: e.msg = "invalid block type", n.mode = B;
1027
+ case 3: e.msg = "invalid block type", n.mode = V;
1028
1028
  }
1029
1029
  l >>>= 2, u -= 2;
1030
1030
  break;
1031
- case cn:
1031
+ case sn:
1032
1032
  for (l >>>= u & 7, u -= u & 7; u < 32;) {
1033
1033
  if (s === 0) break inf_leave;
1034
1034
  s--, l += r[a++] << u, u += 8;
1035
1035
  }
1036
1036
  if ((l & 65535) != (l >>> 16 ^ 65535)) {
1037
- e.msg = "invalid stored block lengths", n.mode = B;
1037
+ e.msg = "invalid stored block lengths", n.mode = V;
1038
1038
  break;
1039
1039
  }
1040
- if (n.length = l & 65535, l = 0, u = 0, n.mode = ln, t === 6) break inf_leave;
1041
- case ln: n.mode = un;
1042
- case un:
1040
+ if (n.length = l & 65535, l = 0, u = 0, n.mode = cn, t === 6) break inf_leave;
1041
+ case cn: n.mode = ln;
1042
+ case ln:
1043
1043
  if (p = n.length, p) {
1044
1044
  if (p > s && (p = s), p > c && (p = c), p === 0) break inf_leave;
1045
1045
  i.set(r.subarray(a, a + p), o), s -= p, a += p, c -= p, o += p, n.length -= p;
1046
1046
  break;
1047
1047
  }
1048
- n.mode = on;
1048
+ n.mode = an;
1049
1049
  break;
1050
- case dn:
1050
+ case un:
1051
1051
  for (; u < 14;) {
1052
1052
  if (s === 0) break inf_leave;
1053
1053
  s--, l += r[a++] << u, u += 8;
1054
1054
  }
1055
1055
  if (n.nlen = (l & 31) + 257, l >>>= 5, u -= 5, n.ndist = (l & 31) + 1, l >>>= 5, u -= 5, n.ncode = (l & 15) + 4, l >>>= 4, u -= 4, n.nlen > 286 || n.ndist > 30) {
1056
- e.msg = "too many length or distance symbols", n.mode = B;
1056
+ e.msg = "too many length or distance symbols", n.mode = V;
1057
1057
  break;
1058
1058
  }
1059
- n.have = 0, n.mode = fn;
1060
- case fn:
1059
+ n.have = 0, n.mode = dn;
1060
+ case dn:
1061
1061
  for (; n.have < n.ncode;) {
1062
1062
  for (; u < 3;) {
1063
1063
  if (s === 0) break inf_leave;
@@ -1066,12 +1066,12 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
1066
1066
  n.lens[O[n.have++]] = l & 7, l >>>= 3, u -= 3;
1067
1067
  }
1068
1068
  for (; n.have < 19;) n.lens[O[n.have++]] = 0;
1069
- if (n.lencode = n.lendyn, n.lenbits = 7, E = { bits: n.lenbits }, w = Wt(Gt, n.lens, 0, 19, n.lencode, 0, n.work, E), n.lenbits = E.bits, w) {
1070
- e.msg = "invalid code lengths set", n.mode = B;
1069
+ if (n.lencode = n.lendyn, n.lenbits = 7, E = { bits: n.lenbits }, w = Ut(Wt, n.lens, 0, 19, n.lencode, 0, n.work, E), n.lenbits = E.bits, w) {
1070
+ e.msg = "invalid code lengths set", n.mode = V;
1071
1071
  break;
1072
1072
  }
1073
- n.have = 0, n.mode = pn;
1074
- case pn:
1073
+ n.have = 0, n.mode = fn;
1074
+ case fn:
1075
1075
  for (; n.have < n.nlen + n.ndist;) {
1076
1076
  for (; g = n.lencode[l & (1 << n.lenbits) - 1], _ = g >>> 24, v = g >>> 16 & 255, y = g & 65535, !(_ <= u);) {
1077
1077
  if (s === 0) break inf_leave;
@@ -1085,7 +1085,7 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
1085
1085
  s--, l += r[a++] << u, u += 8;
1086
1086
  }
1087
1087
  if (l >>>= _, u -= _, n.have === 0) {
1088
- e.msg = "invalid bit length repeat", n.mode = B;
1088
+ e.msg = "invalid bit length repeat", n.mode = V;
1089
1089
  break;
1090
1090
  }
1091
1091
  C = n.lens[n.have - 1], p = 3 + (l & 3), l >>>= 2, u -= 2;
@@ -1103,30 +1103,30 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
1103
1103
  l >>>= _, u -= _, C = 0, p = 11 + (l & 127), l >>>= 7, u -= 7;
1104
1104
  }
1105
1105
  if (n.have + p > n.nlen + n.ndist) {
1106
- e.msg = "invalid bit length repeat", n.mode = B;
1106
+ e.msg = "invalid bit length repeat", n.mode = V;
1107
1107
  break;
1108
1108
  }
1109
1109
  for (; p--;) n.lens[n.have++] = C;
1110
1110
  }
1111
1111
  }
1112
- if (n.mode === B) break;
1112
+ if (n.mode === V) break;
1113
1113
  if (n.lens[256] === 0) {
1114
- e.msg = "invalid code -- missing end-of-block", n.mode = B;
1114
+ e.msg = "invalid code -- missing end-of-block", n.mode = V;
1115
1115
  break;
1116
1116
  }
1117
- if (n.lenbits = 9, E = { bits: n.lenbits }, w = Wt(Kt, n.lens, 0, n.nlen, n.lencode, 0, n.work, E), n.lenbits = E.bits, w) {
1118
- e.msg = "invalid literal/lengths set", n.mode = B;
1117
+ if (n.lenbits = 9, E = { bits: n.lenbits }, w = Ut(Gt, n.lens, 0, n.nlen, n.lencode, 0, n.work, E), n.lenbits = E.bits, w) {
1118
+ e.msg = "invalid literal/lengths set", n.mode = V;
1119
1119
  break;
1120
1120
  }
1121
- if (n.distbits = 6, n.distcode = n.distdyn, E = { bits: n.distbits }, w = Wt(qt, n.lens, n.nlen, n.ndist, n.distcode, 0, n.work, E), n.distbits = E.bits, w) {
1122
- e.msg = "invalid distances set", n.mode = B;
1121
+ if (n.distbits = 6, n.distcode = n.distdyn, E = { bits: n.distbits }, w = Ut(Kt, n.lens, n.nlen, n.ndist, n.distcode, 0, n.work, E), n.distbits = E.bits, w) {
1122
+ e.msg = "invalid distances set", n.mode = V;
1123
1123
  break;
1124
1124
  }
1125
- if (n.mode = mn, t === 6) break inf_leave;
1126
- case mn: n.mode = hn;
1127
- case hn:
1125
+ if (n.mode = pn, t === 6) break inf_leave;
1126
+ case pn: n.mode = mn;
1127
+ case mn:
1128
1128
  if (s >= 6 && c >= 258) {
1129
- e.next_out = o, e.avail_out = c, e.next_in = a, e.avail_in = s, n.hold = l, n.bits = u, Nt(e, f), o = e.next_out, i = e.output, c = e.avail_out, a = e.next_in, r = e.input, s = e.avail_in, l = n.hold, u = n.bits, n.mode === on && (n.back = -1);
1129
+ e.next_out = o, e.avail_out = c, e.next_in = a, e.avail_in = s, n.hold = l, n.bits = u, Mt(e, f), o = e.next_out, i = e.output, c = e.avail_out, a = e.next_in, r = e.input, s = e.avail_in, l = n.hold, u = n.bits, n.mode === an && (n.back = -1);
1130
1130
  break;
1131
1131
  }
1132
1132
  for (n.back = 0; g = n.lencode[l & (1 << n.lenbits) - 1], _ = g >>> 24, v = g >>> 16 & 255, y = g & 65535, !(_ <= u);) {
@@ -1141,19 +1141,19 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
1141
1141
  l >>>= b, u -= b, n.back += b;
1142
1142
  }
1143
1143
  if (l >>>= _, u -= _, n.back += _, n.length = y, v === 0) {
1144
- n.mode = bn;
1144
+ n.mode = yn;
1145
1145
  break;
1146
1146
  }
1147
1147
  if (v & 32) {
1148
- n.back = -1, n.mode = on;
1148
+ n.back = -1, n.mode = an;
1149
1149
  break;
1150
1150
  }
1151
1151
  if (v & 64) {
1152
- e.msg = "invalid literal/length code", n.mode = B;
1152
+ e.msg = "invalid literal/length code", n.mode = V;
1153
1153
  break;
1154
1154
  }
1155
- n.extra = v & 15, n.mode = gn;
1156
- case gn:
1155
+ n.extra = v & 15, n.mode = hn;
1156
+ case hn:
1157
1157
  if (n.extra) {
1158
1158
  for (D = n.extra; u < D;) {
1159
1159
  if (s === 0) break inf_leave;
@@ -1161,8 +1161,8 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
1161
1161
  }
1162
1162
  n.length += l & (1 << n.extra) - 1, l >>>= n.extra, u -= n.extra, n.back += n.extra;
1163
1163
  }
1164
- n.was = n.length, n.mode = _n;
1165
- case _n:
1164
+ n.was = n.length, n.mode = gn;
1165
+ case gn:
1166
1166
  for (; g = n.distcode[l & (1 << n.distbits) - 1], _ = g >>> 24, v = g >>> 16 & 255, y = g & 65535, !(_ <= u);) {
1167
1167
  if (s === 0) break inf_leave;
1168
1168
  s--, l += r[a++] << u, u += 8;
@@ -1175,11 +1175,11 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
1175
1175
  l >>>= b, u -= b, n.back += b;
1176
1176
  }
1177
1177
  if (l >>>= _, u -= _, n.back += _, v & 64) {
1178
- e.msg = "invalid distance code", n.mode = B;
1178
+ e.msg = "invalid distance code", n.mode = V;
1179
1179
  break;
1180
1180
  }
1181
- n.offset = y, n.extra = v & 15, n.mode = vn;
1182
- case vn:
1181
+ n.offset = y, n.extra = v & 15, n.mode = _n;
1182
+ case _n:
1183
1183
  if (n.extra) {
1184
1184
  for (D = n.extra; u < D;) {
1185
1185
  if (s === 0) break inf_leave;
@@ -1188,15 +1188,15 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
1188
1188
  n.offset += l & (1 << n.extra) - 1, l >>>= n.extra, u -= n.extra, n.back += n.extra;
1189
1189
  }
1190
1190
  if (n.offset > n.dmax) {
1191
- e.msg = "invalid distance too far back", n.mode = B;
1191
+ e.msg = "invalid distance too far back", n.mode = V;
1192
1192
  break;
1193
1193
  }
1194
- n.mode = yn;
1195
- case yn:
1194
+ n.mode = vn;
1195
+ case vn:
1196
1196
  if (c === 0) break inf_leave;
1197
1197
  if (p = f - c, n.offset > p) {
1198
1198
  if (p = n.offset - p, p > n.whave && n.sane) {
1199
- e.msg = "invalid distance too far back", n.mode = B;
1199
+ e.msg = "invalid distance too far back", n.mode = V;
1200
1200
  break;
1201
1201
  }
1202
1202
  p > n.wnext ? (p -= n.wnext, m = n.wsize - p) : m = n.wnext - p, p > n.length && (p = n.length), h = n.window;
@@ -1205,65 +1205,65 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
1205
1205
  do
1206
1206
  i[o++] = h[m++];
1207
1207
  while (--p);
1208
- n.length === 0 && (n.mode = hn);
1208
+ n.length === 0 && (n.mode = mn);
1209
1209
  break;
1210
- case bn:
1210
+ case yn:
1211
1211
  if (c === 0) break inf_leave;
1212
- i[o++] = n.length, c--, n.mode = hn;
1212
+ i[o++] = n.length, c--, n.mode = mn;
1213
1213
  break;
1214
- case xn:
1214
+ case bn:
1215
1215
  if (n.wrap) {
1216
1216
  for (; u < 32;) {
1217
1217
  if (s === 0) break inf_leave;
1218
1218
  s--, l |= r[a++] << u, u += 8;
1219
1219
  }
1220
- if (f -= c, e.total_out += f, n.total += f, n.wrap & 4 && f && (e.adler = n.check = n.flags ? P(n.check, i, f, o - f) : ze(n.check, i, f, o - f)), f = c, n.wrap & 4 && (n.flags ? l : On(l)) !== n.check) {
1221
- e.msg = "incorrect data check", n.mode = B;
1220
+ if (f -= c, e.total_out += f, n.total += f, n.wrap & 4 && f && (e.adler = n.check = n.flags ? F(n.check, i, f, o - f) : Re(n.check, i, f, o - f)), f = c, n.wrap & 4 && (n.flags ? l : Dn(l)) !== n.check) {
1221
+ e.msg = "incorrect data check", n.mode = V;
1222
1222
  break;
1223
1223
  }
1224
1224
  l = 0, u = 0;
1225
1225
  }
1226
- n.mode = Sn;
1227
- case Sn:
1226
+ n.mode = xn;
1227
+ case xn:
1228
1228
  if (n.wrap && n.flags) {
1229
1229
  for (; u < 32;) {
1230
1230
  if (s === 0) break inf_leave;
1231
1231
  s--, l += r[a++] << u, u += 8;
1232
1232
  }
1233
1233
  if (n.wrap & 4 && l !== (n.total & 4294967295)) {
1234
- e.msg = "incorrect length check", n.mode = B;
1234
+ e.msg = "incorrect length check", n.mode = V;
1235
1235
  break;
1236
1236
  }
1237
1237
  l = 0, u = 0;
1238
1238
  }
1239
- n.mode = Cn;
1240
- case Cn:
1239
+ n.mode = Sn;
1240
+ case Sn:
1241
1241
  w = 1;
1242
1242
  break inf_leave;
1243
- case B:
1243
+ case V:
1244
1244
  w = -3;
1245
1245
  break inf_leave;
1246
- case wn: return -4;
1247
- case Tn:
1246
+ case Cn: return -4;
1247
+ case wn:
1248
1248
  default: return -2;
1249
1249
  }
1250
- return e.next_out = o, e.avail_out = c, e.next_in = a, e.avail_in = s, n.hold = l, n.bits = u, (n.wsize || f !== e.avail_out && n.mode < B && (n.mode < xn || t !== 4)) && zn(e, e.output, e.next_out, f - e.avail_out) ? (n.mode = wn, -4) : (d -= e.avail_in, f -= e.avail_out, e.total_in += d, e.total_out += f, n.total += f, n.wrap & 4 && f && (e.adler = n.check = n.flags ? P(n.check, i, f, e.next_out - f) : ze(n.check, i, f, e.next_out - f)), e.data_type = n.bits + (n.last ? 64 : 0) + (n.mode === on ? 128 : 0) + (n.mode === mn || n.mode === ln ? 256 : 0), (d === 0 && f === 0 || t === 4) && w === 0 && (w = -5), w);
1251
- }, Vn = (e) => {
1252
- if (An(e)) return -2;
1250
+ return e.next_out = o, e.avail_out = c, e.next_in = a, e.avail_in = s, n.hold = l, n.bits = u, (n.wsize || f !== e.avail_out && n.mode < V && (n.mode < bn || t !== 4)) && Rn(e, e.output, e.next_out, f - e.avail_out) ? (n.mode = Cn, -4) : (d -= e.avail_in, f -= e.avail_out, e.total_in += d, e.total_out += f, n.total += f, n.wrap & 4 && f && (e.adler = n.check = n.flags ? F(n.check, i, f, e.next_out - f) : Re(n.check, i, f, e.next_out - f)), e.data_type = n.bits + (n.last ? 64 : 0) + (n.mode === an ? 128 : 0) + (n.mode === pn || n.mode === cn ? 256 : 0), (d === 0 && f === 0 || t === 4) && w === 0 && (w = -5), w);
1251
+ }, Bn = (e) => {
1252
+ if (kn(e)) return -2;
1253
1253
  let t = e.state;
1254
1254
  return t.window && (t.window = null), e.state = null, 0;
1255
- }, Hn = (e, t) => {
1255
+ }, Vn = (e, t) => {
1256
1256
  let n = t.length, r, i, a;
1257
- return An(e) || (r = e.state, r.wrap !== 0 && r.mode !== an) ? -2 : r.mode === an && (i = 1, i = ze(i, t, n, 0), i !== r.check) ? -3 : (a = zn(e, t, n, n), a ? (r.mode = wn, -4) : (r.havedict = 1, 0));
1258
- }, Un = class {
1257
+ return kn(e) || (r = e.state, r.wrap !== 0 && r.mode !== rn) ? -2 : r.mode === rn && (i = 1, i = Re(i, t, n, 0), i !== r.check) ? -3 : (a = Rn(e, t, n, n), a ? (r.mode = Cn, -4) : (r.havedict = 1, 0));
1258
+ }, Hn = class {
1259
1259
  constructor() {
1260
1260
  this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = "", this.state = null, this.data_type = 2, this.adler = 0;
1261
1261
  }
1262
- }, Wn = (e) => {
1262
+ }, Un = (e) => {
1263
1263
  let t = new Uint8Array(e.reduce((e, t) => e + t.length, 0)), n = 0;
1264
1264
  for (let r of e) t.set(r, n), n += r.length;
1265
1265
  return t;
1266
- }, Gn = Object.prototype.toString, Kn = {
1266
+ }, Wn = Object.prototype.toString, Gn = {
1267
1267
  level: -1,
1268
1268
  chunkSize: 16384,
1269
1269
  windowBits: 15,
@@ -1273,30 +1273,30 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
1273
1273
  gzip: !1,
1274
1274
  legacyHash: !1,
1275
1275
  dictionary: /* @__PURE__ */ new Uint8Array()
1276
- }, qn = class {
1276
+ }, Kn = class {
1277
1277
  constructor(e = {}) {
1278
- l(this, "options", void 0), l(this, "err", void 0), l(this, "msg", void 0), l(this, "ended", void 0), l(this, "started", void 0), l(this, "chunks", void 0), l(this, "strm", void 0), l(this, "result", void 0), this.options = Object.assign({}, Kn, e);
1278
+ l(this, "options", void 0), l(this, "err", void 0), l(this, "msg", void 0), l(this, "ended", void 0), l(this, "started", void 0), l(this, "chunks", void 0), l(this, "strm", void 0), l(this, "result", void 0), this.options = Object.assign({}, Gn, e);
1279
1279
  let t = this.options;
1280
- t.raw && t.windowBits > 0 ? t.windowBits = -t.windowBits : t.gzip && t.windowBits > 0 && t.windowBits < 16 && (t.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.started = !1, this.chunks = [], this.result = /* @__PURE__ */ new Uint8Array(), this.strm = new Un(), this.strm.avail_out = 0;
1281
- let n = Dt(this.strm, t.level, 8, t.windowBits, t.memLevel, t.strategy, t.legacyHash);
1282
- if (n !== 0) throw Error(Ve[n]);
1283
- Gn.call(t.dictionary) === "[object ArrayBuffer]" && (t.dictionary = new Uint8Array(t.dictionary));
1280
+ t.raw && t.windowBits > 0 ? t.windowBits = -t.windowBits : t.gzip && t.windowBits > 0 && t.windowBits < 16 && (t.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.started = !1, this.chunks = [], this.result = /* @__PURE__ */ new Uint8Array(), this.strm = new Hn(), this.strm.avail_out = 0;
1281
+ let n = Et(this.strm, t.level, 8, t.windowBits, t.memLevel, t.strategy, t.legacyHash);
1282
+ if (n !== 0) throw Error(Be[n]);
1283
+ Wn.call(t.dictionary) === "[object ArrayBuffer]" && (t.dictionary = new Uint8Array(t.dictionary));
1284
1284
  let r = t.dictionary;
1285
1285
  if (r.length) {
1286
1286
  if (t.gzip) throw Error("dictionary is not supported with gzip");
1287
- if (n = At(this.strm, r), n !== 0) throw Error(Ve[n]);
1287
+ if (n = kt(this.strm, r), n !== 0) throw Error(Be[n]);
1288
1288
  }
1289
1289
  }
1290
1290
  push(e, t = !1) {
1291
1291
  let n = this.strm, r = this.options.chunkSize, i, a;
1292
1292
  if (this.ended) return !1;
1293
- for (a = typeof t == "number" ? t : t === !0 ? 4 : 0, typeof e == "string" ? n.input = new TextEncoder().encode(e) : Gn.call(e) === "[object ArrayBuffer]" ? n.input = new Uint8Array(e) : n.input = e, n.next_in = 0, n.avail_in = n.input.length, this.started || (this.started = !0, this.onStart(n));;) {
1293
+ for (a = typeof t == "number" ? t : t === !0 ? 4 : 0, typeof e == "string" ? n.input = new TextEncoder().encode(e) : Wn.call(e) === "[object ArrayBuffer]" ? n.input = new Uint8Array(e) : n.input = e, n.next_in = 0, n.avail_in = n.input.length, this.started || (this.started = !0, this.onStart(n));;) {
1294
1294
  if (n.avail_out === 0 && (n.output = new Uint8Array(r), n.next_out = 0, n.avail_out = r), (a === 2 || a === 3) && n.avail_out <= 6) {
1295
1295
  this.onData(n.output.subarray(0, n.next_out)), n.avail_out = 0;
1296
1296
  continue;
1297
1297
  }
1298
- if (i = Ot(n, a), i === 1) {
1299
- n.next_out > 0 && this.onData(n.output.subarray(0, n.next_out)), i = kt(this.strm);
1298
+ if (i = Dt(n, a), i === 1) {
1299
+ n.next_out > 0 && this.onData(n.output.subarray(0, n.next_out)), i = Ot(this.strm);
1300
1300
  break;
1301
1301
  }
1302
1302
  if (n.avail_out === 0) {
@@ -1309,140 +1309,140 @@ var Pt = 15, Ft = 852, It = 592, Lt = 0, Rt = 1, zt = 2, Bt = new Uint16Array([
1309
1309
  }
1310
1310
  if (n.avail_in === 0) return !0;
1311
1311
  }
1312
- return this.err = i, this.msg = n.msg || Ve[i], this.ended = !0, this.onEnd(i), i === 0;
1312
+ return this.err = i, this.msg = n.msg || Be[i], this.ended = !0, this.onEnd(i), i === 0;
1313
1313
  }
1314
1314
  onStart(e) {}
1315
1315
  onData(e) {
1316
1316
  this.chunks.push(e);
1317
1317
  }
1318
1318
  onEnd(e) {
1319
- e === 0 && (this.result = Wn(this.chunks)), this.chunks = [];
1319
+ e === 0 && (this.result = Un(this.chunks)), this.chunks = [];
1320
1320
  }
1321
1321
  };
1322
- function Jn(e, t = {}) {
1323
- let n = new qn(t);
1322
+ function qn(e, t = {}) {
1323
+ let n = new Kn(t);
1324
1324
  if (n.push(e, !0), n.err) throw Error(n.msg);
1325
1325
  return n.result;
1326
1326
  }
1327
- var Yn = Object.prototype.toString, Xn = {
1327
+ var Jn = Object.prototype.toString, Yn = {
1328
1328
  chunkSize: 1024 * 64,
1329
1329
  windowBits: 15,
1330
1330
  raw: !1,
1331
1331
  dictionary: /* @__PURE__ */ new Uint8Array()
1332
- }, Zn = class {
1332
+ }, Xn = class {
1333
1333
  constructor(e = {}) {
1334
- l(this, "options", void 0), l(this, "err", void 0), l(this, "msg", void 0), l(this, "ended", void 0), l(this, "started", void 0), l(this, "chunks", void 0), l(this, "strm", void 0), l(this, "result", void 0), this.options = Object.assign({}, Xn, e);
1334
+ l(this, "options", void 0), l(this, "err", void 0), l(this, "msg", void 0), l(this, "ended", void 0), l(this, "started", void 0), l(this, "chunks", void 0), l(this, "strm", void 0), l(this, "result", void 0), this.options = Object.assign({}, Yn, e);
1335
1335
  let t = this.options;
1336
- t.raw && t.windowBits >= 0 && t.windowBits < 16 && (t.windowBits = -t.windowBits, t.windowBits === 0 && (t.windowBits = -15)), t.windowBits >= 0 && t.windowBits < 16 && !e.windowBits && (t.windowBits += 32), t.windowBits > 15 && t.windowBits < 48 && (t.windowBits & 15 || (t.windowBits |= 15)), this.err = 0, this.msg = "", this.ended = !1, this.started = !1, this.chunks = [], this.result = /* @__PURE__ */ new Uint8Array(), this.strm = new Un(), this.strm.avail_out = 0;
1337
- let n = Pn(this.strm, t.windowBits);
1338
- if (n !== 0) throw Error(Ve[n]);
1339
- Yn.call(t.dictionary) === "[object ArrayBuffer]" && (t.dictionary = new Uint8Array(t.dictionary));
1336
+ t.raw && t.windowBits >= 0 && t.windowBits < 16 && (t.windowBits = -t.windowBits, t.windowBits === 0 && (t.windowBits = -15)), t.windowBits >= 0 && t.windowBits < 16 && !e.windowBits && (t.windowBits += 32), t.windowBits > 15 && t.windowBits < 48 && (t.windowBits & 15 || (t.windowBits |= 15)), this.err = 0, this.msg = "", this.ended = !1, this.started = !1, this.chunks = [], this.result = /* @__PURE__ */ new Uint8Array(), this.strm = new Hn(), this.strm.avail_out = 0;
1337
+ let n = Nn(this.strm, t.windowBits);
1338
+ if (n !== 0) throw Error(Be[n]);
1339
+ Jn.call(t.dictionary) === "[object ArrayBuffer]" && (t.dictionary = new Uint8Array(t.dictionary));
1340
1340
  let r = t.dictionary;
1341
- if (t.raw && r.length && (n = Hn(this.strm, r), n !== 0)) throw Error(Ve[n]);
1341
+ if (t.raw && r.length && (n = Vn(this.strm, r), n !== 0)) throw Error(Be[n]);
1342
1342
  }
1343
1343
  push(e, t = !1) {
1344
1344
  let n = this.strm, r = this.options.chunkSize, i, a, o;
1345
1345
  if (this.ended) return this.err === 0;
1346
- for (a = typeof t == "number" ? t : t === !0 ? 4 : 0, Yn.call(e) === "[object ArrayBuffer]" ? n.input = new Uint8Array(e) : n.input = e, n.next_in = 0, n.avail_in = n.input.length, this.started || (this.started = !0, this.onStart(n));;) {
1347
- if (n.avail_out === 0 && (n.output = new Uint8Array(r), n.next_out = 0, n.avail_out = r), i = Bn(n, a), i === 2) {
1346
+ for (a = typeof t == "number" ? t : t === !0 ? 4 : 0, Jn.call(e) === "[object ArrayBuffer]" ? n.input = new Uint8Array(e) : n.input = e, n.next_in = 0, n.avail_in = n.input.length, this.started || (this.started = !0, this.onStart(n));;) {
1347
+ if (n.avail_out === 0 && (n.output = new Uint8Array(r), n.next_out = 0, n.avail_out = r), i = zn(n, a), i === 2) {
1348
1348
  let e = this.options.dictionary;
1349
- e.length && (i = Hn(n, e), i === 0 ? i = Bn(n, a) : i === -3 && (i = 2));
1349
+ e.length && (i = Vn(n, e), i === 0 ? i = zn(n, a) : i === -3 && (i = 2));
1350
1350
  }
1351
- for (; n.avail_in > 0 && i === 1 && n.state.wrap & 2 && n.state.flags !== 0 && n.input[n.next_in] !== 0;) Mn(n), i = Bn(n, a);
1351
+ for (; n.avail_in > 0 && i === 1 && n.state.wrap & 2 && n.state.flags !== 0 && n.input[n.next_in] !== 0;) jn(n), i = zn(n, a);
1352
1352
  if (i === -2 || i === -3 || i === 2 || i === -4) break;
1353
1353
  if (o = n.avail_out, n.next_out && (n.avail_out === 0 || i === 1 || a > 0) && (this.onData(n.output.length === n.next_out ? n.output : n.output.subarray(0, n.next_out)), n.avail_out = 0, n.next_out = 0), !((i === 0 || i === -5) && o === 0)) {
1354
1354
  if (i === 1) {
1355
- i = Vn(this.strm);
1355
+ i = Bn(this.strm);
1356
1356
  break;
1357
1357
  }
1358
1358
  if (n.avail_in === 0) {
1359
1359
  if (a === 4) {
1360
- i = Vn(this.strm), i === 0 && (i = -5);
1360
+ i = Bn(this.strm), i === 0 && (i = -5);
1361
1361
  break;
1362
1362
  }
1363
1363
  return !0;
1364
1364
  }
1365
1365
  }
1366
1366
  }
1367
- return this.err = i, this.msg = n.msg || Ve[i], this.ended = !0, this.onEnd(i), i === 0;
1367
+ return this.err = i, this.msg = n.msg || Be[i], this.ended = !0, this.onEnd(i), i === 0;
1368
1368
  }
1369
1369
  onStart(e) {}
1370
1370
  onData(e) {
1371
1371
  this.chunks.push(e);
1372
1372
  }
1373
1373
  onEnd(e) {
1374
- e === 0 && (this.result = Wn(this.chunks)), this.chunks = [];
1374
+ e === 0 && (this.result = Un(this.chunks)), this.chunks = [];
1375
1375
  }
1376
1376
  };
1377
- function Qn(e, t = {}) {
1378
- let n = new Zn(t);
1377
+ function Zn(e, t = {}) {
1378
+ let n = new Xn(t);
1379
1379
  if (n.push(e, !0), n.err) throw Error(n.msg);
1380
1380
  let r = n.result;
1381
1381
  return t.toText ? new TextDecoder().decode(r) : r;
1382
1382
  }
1383
1383
  //#endregion
1384
1384
  //#region src/uuid.ts
1385
- var V = Array.from({ length: 256 }).map((e, t) => (t + 256).toString(16).substr(1));
1386
- function $n(e) {
1387
- return (V[e[0]] + V[e[1]] + V[e[2]] + V[e[3]] + "-" + V[e[4]] + V[e[5]] + "-" + V[e[6]] + V[e[7]] + "-" + V[e[8]] + V[e[9]] + "-" + V[e[10]] + V[e[11]] + V[e[12]] + V[e[13]] + V[e[14]] + V[e[15]]).toLowerCase();
1385
+ var H = Array.from({ length: 256 }).map((e, t) => (t + 256).toString(16).substr(1));
1386
+ function Qn(e) {
1387
+ return (H[e[0]] + H[e[1]] + H[e[2]] + H[e[3]] + "-" + H[e[4]] + H[e[5]] + "-" + H[e[6]] + H[e[7]] + "-" + H[e[8]] + H[e[9]] + "-" + H[e[10]] + H[e[11]] + H[e[12]] + H[e[13]] + H[e[14]] + H[e[15]]).toLowerCase();
1388
1388
  }
1389
- function er(e) {
1389
+ function $n(e) {
1390
1390
  let t, n = /* @__PURE__ */ new Uint8Array(16);
1391
1391
  return n[0] = (t = parseInt(e.slice(0, 8), 16)) >>> 24, n[1] = t >>> 16 & 255, n[2] = t >>> 8 & 255, n[3] = t & 255, n[4] = (t = parseInt(e.slice(9, 13), 16)) >>> 8, n[5] = t & 255, n[6] = (t = parseInt(e.slice(14, 18), 16)) >>> 8, n[7] = t & 255, n[8] = (t = parseInt(e.slice(19, 23), 16)) >>> 8, n[9] = t & 255, n[10] = (t = parseInt(e.slice(24, 36), 16)) / 1099511627776 & 255, n[11] = t / 4294967296 & 255, n[12] = t >>> 24 & 255, n[13] = t >>> 16 & 255, n[14] = t >>> 8 & 255, n[15] = t & 255, n;
1392
1392
  }
1393
1393
  //#endregion
1394
1394
  //#region src/brs/utils.ts
1395
- var tr = /* @__PURE__ */ t({
1396
- BitReader: () => br,
1397
- BitWriter: () => xr,
1398
- bgra: () => H,
1399
- chunk: () => or,
1400
- concat: () => W,
1401
- isEqual: () => rr,
1402
- read: () => G,
1403
- subarray: () => ar,
1404
- write: () => K
1395
+ var er = /* @__PURE__ */ t({
1396
+ BitReader: () => yr,
1397
+ BitWriter: () => br,
1398
+ bgra: () => U,
1399
+ chunk: () => ar,
1400
+ concat: () => G,
1401
+ isEqual: () => nr,
1402
+ read: () => K,
1403
+ subarray: () => ir,
1404
+ write: () => q
1405
1405
  });
1406
- function nr(e) {
1406
+ function tr(e) {
1407
1407
  return /^[\x00-\x7F]*$/.test(e);
1408
1408
  }
1409
- var H = ([e, t, n, r]) => [
1409
+ var U = ([e, t, n, r]) => [
1410
1410
  n,
1411
1411
  t,
1412
1412
  e,
1413
1413
  r
1414
1414
  ];
1415
- function rr(e, t) {
1415
+ function nr(e, t) {
1416
1416
  return e.length === t.length && e.every((e, n) => t[n] === e);
1417
1417
  }
1418
- function ir(e) {
1418
+ function rr(e) {
1419
1419
  return e.brsOffset !== void 0;
1420
1420
  }
1421
- function ar(e, t, n = !1) {
1421
+ function ir(e, t, n = !1) {
1422
1422
  if (!(e instanceof Uint8Array)) throw Error(`Invalid data type in bytes reader (${typeof e})`);
1423
1423
  let r;
1424
- ir(e) ? r = e : (r = e, r.brsOffset = 0);
1424
+ rr(e) ? r = e : (r = e, r.brsOffset = 0);
1425
1425
  let i = r[n ? "slice" : "subarray"](r.brsOffset, r.brsOffset + t);
1426
1426
  return r.brsOffset += t, i;
1427
1427
  }
1428
- function or(e, t) {
1429
- let n = e.length - (ir(e) ? e.brsOffset : 0), r = Array(Math.floor(n / t));
1430
- for (let i = 0; i < n / t; i++) r[i] = ar(e, t, !0);
1428
+ function ar(e, t) {
1429
+ let n = e.length - (rr(e) ? e.brsOffset : 0), r = Array(Math.floor(n / t));
1430
+ for (let i = 0; i < n / t; i++) r[i] = ir(e, t, !0);
1431
1431
  return r;
1432
1432
  }
1433
- function U(e, t = !0) {
1434
- let [n, r] = ar(e, 2);
1433
+ function W(e, t = !0) {
1434
+ let [n, r] = ir(e, 2);
1435
1435
  return t ? r << 8 | n : n << 8 | r;
1436
1436
  }
1437
- function sr(e, t = !0) {
1437
+ function or(e, t = !0) {
1438
1438
  let n = [e & 255, e >> 8 & 255];
1439
1439
  return new Uint8Array(t ? n : n.reverse());
1440
1440
  }
1441
- function cr(e, t = !0) {
1442
- let [n, r, i, a] = ar(e, 4);
1441
+ function sr(e, t = !0) {
1442
+ let [n, r, i, a] = ir(e, 4);
1443
1443
  return t ? a << 24 | i << 16 | r << 8 | n : n << 24 | r << 16 | i << 8 | a;
1444
1444
  }
1445
- function lr(e, t = !0) {
1445
+ function cr(e, t = !0) {
1446
1446
  let n = new Uint8Array([
1447
1447
  e & 255,
1448
1448
  e >> 8 & 255,
@@ -1451,64 +1451,64 @@ function lr(e, t = !0) {
1451
1451
  ]);
1452
1452
  return t ? n : n.reverse();
1453
1453
  }
1454
- function ur(e) {
1455
- let t = cr(e), n = cr(e);
1454
+ function lr(e) {
1455
+ let t = sr(e), n = sr(e);
1456
1456
  if (n < 0 || t < 0 || n >= t) throw Error(`Invalid compressed section size (comp: ${n}, uncomp: ${t})`);
1457
- return n === 0 ? ar(e, t) : Qn(ar(e, n));
1457
+ return n === 0 ? ir(e, t) : Zn(ir(e, n));
1458
1458
  }
1459
- function dr(...e) {
1460
- let t = W(...e);
1461
- return W(lr(t.length), lr(0), t);
1459
+ function ur(...e) {
1460
+ let t = G(...e);
1461
+ return G(cr(t.length), cr(0), t);
1462
1462
  }
1463
- function fr(...e) {
1464
- let t = W(...e), n = Jn(t), r = t.length, i = n.length;
1463
+ function dr(...e) {
1464
+ let t = G(...e), n = qn(t), r = t.length, i = n.length;
1465
1465
  if (r > 2147483647) throw Error(`uncompressedSize (${r}) out of range`);
1466
1466
  if (i > 2147483647) throw Error(`compressedSize (${i}) out of range`);
1467
1467
  let a = i >= r;
1468
- return W(lr(r), lr(a ? 0 : i), a ? t : n);
1468
+ return G(cr(r), cr(a ? 0 : i), a ? t : n);
1469
1469
  }
1470
- function pr(e) {
1471
- let t = cr(e), n = t < 0, r = n ? -t * 2 : t;
1470
+ function fr(e) {
1471
+ let t = sr(e), n = t < 0, r = n ? -t * 2 : t;
1472
1472
  if (n) {
1473
1473
  if (r % 2 != 0) throw Error("Invalid UCS-2 data size");
1474
- return String.fromCodePoint(...or(ar(e, r), 2).map((e) => U(e)));
1474
+ return String.fromCodePoint(...ar(ir(e, r), 2).map((e) => W(e)));
1475
1475
  } else {
1476
- let t = ar(e, r).subarray(0, -1);
1476
+ let t = ir(e, r).subarray(0, -1);
1477
1477
  return String.fromCharCode.apply(null, t);
1478
1478
  }
1479
1479
  }
1480
- function mr(e) {
1481
- return nr(e) ? W(lr(e.length + 1), new Uint8Array(e.split("").map((e) => e.charCodeAt(0))), new Uint8Array([0])) : W(lr(-e.length), new Uint8Array(e.split("").flatMap((e) => [e.charCodeAt(0) & 255, e.charCodeAt(0) >> 8])));
1480
+ function pr(e) {
1481
+ return tr(e) ? G(cr(e.length + 1), new Uint8Array(e.split("").map((e) => e.charCodeAt(0))), new Uint8Array([0])) : G(cr(-e.length), new Uint8Array(e.split("").flatMap((e) => [e.charCodeAt(0) & 255, e.charCodeAt(0) >> 8])));
1482
1482
  }
1483
- function hr(e) {
1484
- return $n(or(ar(e, 16), 4).flatMap(([e, t, n, r]) => [
1483
+ function mr(e) {
1484
+ return Qn(ar(ir(e, 16), 4).flatMap(([e, t, n, r]) => [
1485
1485
  r,
1486
1486
  n,
1487
1487
  t,
1488
1488
  e
1489
1489
  ]));
1490
1490
  }
1491
- function gr(e) {
1492
- return W(...or(er(e), 4).map(([e, t, n, r]) => new Uint8Array([
1491
+ function hr(e) {
1492
+ return G(...ar($n(e), 4).map(([e, t, n, r]) => new Uint8Array([
1493
1493
  r,
1494
1494
  n,
1495
1495
  t,
1496
1496
  e
1497
1497
  ])));
1498
1498
  }
1499
- function _r(e, t) {
1500
- let n = cr(e), r = Array(n);
1499
+ function gr(e, t) {
1500
+ let n = sr(e), r = Array(n);
1501
1501
  for (let i = 0; i < n; i++) r[i] = t(e);
1502
1502
  return r;
1503
1503
  }
1504
- function vr(e, t) {
1505
- let n = cr(e);
1504
+ function _r(e, t) {
1505
+ let n = sr(e);
1506
1506
  for (let r = 0; r < n; r++) t(e);
1507
1507
  }
1508
- function yr(e, t) {
1509
- return W(lr(e.length), ...e.map((e) => t(e)));
1508
+ function vr(e, t) {
1509
+ return G(cr(e.length), ...e.map((e) => t(e)));
1510
1510
  }
1511
- var br = class {
1511
+ var yr = class {
1512
1512
  constructor(e) {
1513
1513
  this.pos = 0, this.buffer = e;
1514
1514
  }
@@ -1555,36 +1555,36 @@ var br = class {
1555
1555
  return this.bits(e * 8);
1556
1556
  }
1557
1557
  array(e) {
1558
- let t = cr(this.bytes(4)), n = Array(t);
1558
+ let t = sr(this.bytes(4)), n = Array(t);
1559
1559
  for (let r = 0; r < t; r++) n[r] = e(this);
1560
1560
  return n;
1561
1561
  }
1562
1562
  each(e) {
1563
- let t = cr(this.bytes(4));
1563
+ let t = sr(this.bytes(4));
1564
1564
  for (let n = 0; n < t; n++) e(this);
1565
1565
  }
1566
1566
  string() {
1567
- let e = this.bytesArr(4), t = cr(new Uint8Array(e));
1568
- return t < 0 && (t = -t * 2), pr(new Uint8Array(e.concat(this.bytesArr(t))));
1567
+ let e = this.bytesArr(4), t = sr(new Uint8Array(e));
1568
+ return t < 0 && (t = -t * 2), fr(new Uint8Array(e.concat(this.bytesArr(t))));
1569
1569
  }
1570
1570
  float() {
1571
1571
  let e = /* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(4));
1572
- return e.setUint16(2, U(this.bytes(2))), e.setUint16(0, U(this.bytes(2))), e.getFloat32(0);
1572
+ return e.setUint16(2, W(this.bytes(2))), e.setUint16(0, W(this.bytes(2))), e.getFloat32(0);
1573
1573
  }
1574
1574
  integer() {
1575
1575
  let e = /* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(4));
1576
- return e.setUint16(2, U(this.bytes(2))), e.setUint16(0, U(this.bytes(2))), e.getInt32(0);
1576
+ return e.setUint16(2, W(this.bytes(2))), e.setUint16(0, W(this.bytes(2))), e.getInt32(0);
1577
1577
  }
1578
1578
  int64() {
1579
1579
  let e = /* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(8));
1580
- e.setUint16(6, U(this.bytes(2))), e.setUint16(4, U(this.bytes(2))), e.setUint16(2, U(this.bytes(2))), e.setUint16(0, U(this.bytes(2)));
1580
+ e.setUint16(6, W(this.bytes(2))), e.setUint16(4, W(this.bytes(2))), e.setUint16(2, W(this.bytes(2))), e.setUint16(0, W(this.bytes(2)));
1581
1581
  let t = e.getBigInt64(0);
1582
1582
  if (t <= 1n << 64n) return Number(t);
1583
1583
  throw Error(`Cannot read 64-bit integer ${t} as a JavaScript number...`);
1584
1584
  }
1585
1585
  double() {
1586
1586
  let e = /* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(8));
1587
- return e.setUint16(6, U(this.bytes(2))), e.setUint16(4, U(this.bytes(2))), e.setUint16(2, U(this.bytes(2))), e.setUint16(0, U(this.bytes(2))), e.getFloat64(0);
1587
+ return e.setUint16(6, W(this.bytes(2))), e.setUint16(4, W(this.bytes(2))), e.setUint16(2, W(this.bytes(2))), e.setUint16(0, W(this.bytes(2))), e.getFloat64(0);
1588
1588
  }
1589
1589
  wireGraphVariant() {
1590
1590
  let e = this.bytes(1)[0];
@@ -1602,12 +1602,12 @@ var br = class {
1602
1602
  case "String":
1603
1603
  case "Class":
1604
1604
  case "Object": return this.string();
1605
- case "Boolean": return !!cr(this.bytes(4));
1605
+ case "Boolean": return !!sr(this.bytes(4));
1606
1606
  case "Integer": return this.integer();
1607
1607
  case "Integer64": return this.int64();
1608
1608
  case "Float": return this.float();
1609
1609
  case "Double": return this.double();
1610
- case "Color": return H(this.bytesArr(4));
1610
+ case "Color": return U(this.bytesArr(4));
1611
1611
  case "Byte": return this.bytes(1)[0];
1612
1612
  case "Rotator":
1613
1613
  case "Rotator3d": return [
@@ -1631,7 +1631,7 @@ var br = class {
1631
1631
  }
1632
1632
  throw Error("Unknown unreal type " + e);
1633
1633
  }
1634
- }, xr = class {
1634
+ }, br = class {
1635
1635
  constructor() {
1636
1636
  this.buffer = [], this.cur = 0, this.bitNum = 0;
1637
1637
  }
@@ -1666,10 +1666,10 @@ var br = class {
1666
1666
  return this.align(), new Uint8Array(this.buffer);
1667
1667
  }
1668
1668
  finishSection() {
1669
- return this.align(), W(lr(this.buffer.length), new Uint8Array(this.buffer));
1669
+ return this.align(), G(cr(this.buffer.length), new Uint8Array(this.buffer));
1670
1670
  }
1671
1671
  string(e) {
1672
- this.bytes(mr(e));
1672
+ this.bytes(pr(e));
1673
1673
  }
1674
1674
  float(e) {
1675
1675
  let t = /* @__PURE__ */ new Float32Array(1);
@@ -1724,7 +1724,7 @@ var br = class {
1724
1724
  return e.bind(this)(), this;
1725
1725
  }
1726
1726
  array(e, t) {
1727
- return this.bytes(lr(e.length)), e.forEach(t.bind(this)), this;
1727
+ return this.bytes(cr(e.length)), e.forEach(t.bind(this)), this;
1728
1728
  }
1729
1729
  each(e, t) {
1730
1730
  return e.forEach(t.bind(this)), this;
@@ -1745,7 +1745,7 @@ var br = class {
1745
1745
  return;
1746
1746
  case "Boolean":
1747
1747
  if (typeof t != "boolean") throw Error(`writing unreal type Boolean, did not receive boolean (${t})`);
1748
- this.bytes(lr(+!!t));
1748
+ this.bytes(cr(+!!t));
1749
1749
  return;
1750
1750
  case "Float":
1751
1751
  if (typeof t != "number") throw Error(`writing unreal type Float, did not receive float (${t})`);
@@ -1757,7 +1757,7 @@ var br = class {
1757
1757
  return;
1758
1758
  case "Color":
1759
1759
  if (!Array.isArray(t) || t.length !== 4) throw Error(`writing unreal type Color, did not receive Array (${t})`);
1760
- this.bytes(H(t));
1760
+ this.bytes(U(t));
1761
1761
  return;
1762
1762
  case "Rotator":
1763
1763
  case "Rotator3d":
@@ -1800,38 +1800,38 @@ var br = class {
1800
1800
  throw Error("Unknown unreal type " + e);
1801
1801
  }
1802
1802
  };
1803
- function W(...e) {
1803
+ function G(...e) {
1804
1804
  let t = e.reduce((e, t) => e + t.length, 0), n = new Uint8Array(t), r = 0;
1805
1805
  for (let t of e) n.set(t, r), r += t.length;
1806
1806
  return n;
1807
1807
  }
1808
- var G = {
1809
- bytes: ar,
1810
- u16: U,
1808
+ var K = {
1809
+ bytes: ir,
1810
+ u16: W,
1811
+ i32: sr,
1812
+ compressed: lr,
1813
+ string: fr,
1814
+ uuid: mr,
1815
+ array: gr,
1816
+ each: _r,
1817
+ bits: (e) => new yr(e)
1818
+ }, q = {
1819
+ u16: or,
1811
1820
  i32: cr,
1812
- compressed: ur,
1821
+ compressed: dr,
1822
+ uncompressed: ur,
1813
1823
  string: pr,
1814
1824
  uuid: hr,
1815
- array: _r,
1816
- each: vr,
1817
- bits: (e) => new br(e)
1818
- }, K = {
1819
- u16: sr,
1820
- i32: lr,
1821
- compressed: fr,
1822
- uncompressed: dr,
1823
- string: mr,
1824
- uuid: gr,
1825
- array: yr,
1826
- bits: () => new xr()
1825
+ array: vr,
1826
+ bits: () => new br()
1827
1827
  };
1828
1828
  //#endregion
1829
1829
  //#region src/brs/read.v1.ts
1830
- function Sr(e, t = {}) {
1831
- let n = G.compressed(e), r = G.compressed(e), i = G.string(n), a = G.string(n), o = G.string(n), s = G.uuid(n), c = G.i32(n), l = G.array(r, G.string), u = G.array(r, G.string), d = G.array(r, (e) => H(Array.from(G.bytes(e, 4)))), f = [], p = Math.max(u.length, 2);
1830
+ function xr(e, t = {}) {
1831
+ let n = K.compressed(e), r = K.compressed(e), i = K.string(n), a = K.string(n), o = K.string(n), s = K.uuid(n), c = K.i32(n), l = K.array(r, K.string), u = K.array(r, K.string), d = K.array(r, (e) => U(Array.from(K.bytes(e, 4)))), f = [], p = Math.max(u.length, 2);
1832
1832
  if (t.bricks) {
1833
1833
  f = Array(c);
1834
- let t = G.compressed(e), n = G.bits(t);
1834
+ let t = K.compressed(e), n = K.bits(t);
1835
1835
  for (let e = 0; !n.empty() && e < c; e++) {
1836
1836
  n.align();
1837
1837
  let t = n.int(p), r = n.bit() ? [
@@ -1846,7 +1846,7 @@ function Sr(e, t = {}) {
1846
1846
  n.int_packed(),
1847
1847
  n.int_packed(),
1848
1848
  n.int_packed()
1849
- ], a = n.int(24), o = (a >> 2) % 6, s = a & 3, c = n.bit(), l = n.bit(), u = n.bit() ? H(n.bytesArr(4)) : n.int(d.length);
1849
+ ], a = n.int(24), o = (a >> 2) % 6, s = a & 3, c = n.bit(), l = n.bit(), u = n.bit() ? U(n.bytesArr(4)) : n.int(d.length);
1850
1850
  f[e] = {
1851
1851
  asset_name_index: t,
1852
1852
  size: r,
@@ -1876,23 +1876,23 @@ function Sr(e, t = {}) {
1876
1876
  }
1877
1877
  //#endregion
1878
1878
  //#region src/brs/read.v10.ts
1879
- function Cr(e, t = {}) {
1880
- let n = G.i32(e), r = G.compressed(e), i = G.compressed(e), a = G.string(r), o = G.string(r), s = G.string(r), c = G.uuid(r), l = {
1881
- name: G.string(r),
1882
- id: G.uuid(r)
1883
- }, u = G.bytes(r, 8), d = G.i32(r), f = G.array(i, G.string), p = G.array(i, G.string), m = G.array(i, (e) => H(Array.from(G.bytes(e, 4)))), h = G.array(i, G.string), g = G.array(i, (e) => ({
1884
- id: G.uuid(e),
1885
- name: G.string(e),
1886
- bricks: G.i32(e)
1887
- })), _ = G.array(i, G.string), v = null;
1888
- if (G.bytes(e, 1)[0]) {
1889
- let n = G.i32(e);
1890
- t.preview ? v = G.bytes(e, n) : e.brsOffset += n;
1879
+ function Sr(e, t = {}) {
1880
+ let n = K.i32(e), r = K.compressed(e), i = K.compressed(e), a = K.string(r), o = K.string(r), s = K.string(r), c = K.uuid(r), l = {
1881
+ name: K.string(r),
1882
+ id: K.uuid(r)
1883
+ }, u = K.bytes(r, 8), d = K.i32(r), f = K.array(i, K.string), p = K.array(i, K.string), m = K.array(i, (e) => U(Array.from(K.bytes(e, 4)))), h = K.array(i, K.string), g = K.array(i, (e) => ({
1884
+ id: K.uuid(e),
1885
+ name: K.string(e),
1886
+ bricks: K.i32(e)
1887
+ })), _ = K.array(i, K.string), v = null;
1888
+ if (K.bytes(e, 1)[0]) {
1889
+ let n = K.i32(e);
1890
+ t.preview ? v = K.bytes(e, n) : e.brsOffset += n;
1891
1891
  }
1892
1892
  let y = [], b = {}, x = Math.max(_.length, 2), S = Math.max(h.length, 2), C = Math.max(p.length, 2);
1893
1893
  if (t.bricks) {
1894
1894
  y = Array(d);
1895
- let t = G.compressed(e), n = G.bits(t);
1895
+ let t = K.compressed(e), n = K.bits(t);
1896
1896
  for (let e = 0; !n.empty() && e < d; e++) {
1897
1897
  n.align();
1898
1898
  let t = n.int(C), r = n.bit() ? [
@@ -1930,9 +1930,9 @@ function Cr(e, t = {}) {
1930
1930
  components: {}
1931
1931
  };
1932
1932
  }
1933
- let r = G.compressed(e), i = Math.max(y.length, 2);
1934
- G.each(r, (e) => {
1935
- let t = G.string(e), n = G.bits(G.bytes(e, G.i32(e))), r = G.i32(n.bytes(4)), a = n.array(() => n.int(i)), o = n.array(() => [n.string(), n.string()]);
1933
+ let r = K.compressed(e), i = Math.max(y.length, 2);
1934
+ K.each(r, (e) => {
1935
+ let t = K.string(e), n = K.bits(K.bytes(e, K.i32(e))), r = K.i32(n.bytes(4)), a = n.array(() => n.int(i)), o = n.array(() => [n.string(), n.string()]);
1936
1936
  for (let e of a) {
1937
1937
  let r = {};
1938
1938
  for (let [e, t] of o) r[e] = n.unreal(t);
@@ -1970,24 +1970,24 @@ function Cr(e, t = {}) {
1970
1970
  }
1971
1971
  //#endregion
1972
1972
  //#region src/brs/read.v14.ts
1973
- function wr(e, t = {}) {
1974
- let n = G.i32(e), r = G.compressed(e), i = G.compressed(e), a = G.string(r), o = G.string(r), s = G.string(r), c = G.uuid(r), l = {
1975
- name: G.string(r),
1976
- id: G.uuid(r)
1977
- }, u = G.bytes(r, 8), d = G.i32(r), f = G.array(i, G.string), p = G.array(i, G.string), m = G.array(i, (e) => H(Array.from(G.bytes(e, 4)))), h = G.array(i, G.string), g = G.array(i, (e) => ({
1978
- id: G.uuid(e),
1979
- name: G.string(e),
1980
- display_name: G.string(e),
1981
- bricks: G.i32(e)
1982
- })), _ = G.array(i, G.string), v = null;
1983
- if (G.bytes(e, 1)[0]) {
1984
- let n = G.i32(e);
1985
- t.preview ? v = G.bytes(e, n) : e.brsOffset += n;
1973
+ function Cr(e, t = {}) {
1974
+ let n = K.i32(e), r = K.compressed(e), i = K.compressed(e), a = K.string(r), o = K.string(r), s = K.string(r), c = K.uuid(r), l = {
1975
+ name: K.string(r),
1976
+ id: K.uuid(r)
1977
+ }, u = K.bytes(r, 8), d = K.i32(r), f = K.array(i, K.string), p = K.array(i, K.string), m = K.array(i, (e) => U(Array.from(K.bytes(e, 4)))), h = K.array(i, K.string), g = K.array(i, (e) => ({
1978
+ id: K.uuid(e),
1979
+ name: K.string(e),
1980
+ display_name: K.string(e),
1981
+ bricks: K.i32(e)
1982
+ })), _ = K.array(i, K.string), v = null;
1983
+ if (K.bytes(e, 1)[0]) {
1984
+ let n = K.i32(e);
1985
+ t.preview ? v = K.bytes(e, n) : e.brsOffset += n;
1986
1986
  }
1987
1987
  let y = [], b = {}, x = [], S = Math.max(_.length, 2), C = Math.max(h.length, 2), w = Math.max(p.length, 2);
1988
1988
  if (t.bricks) {
1989
1989
  y = Array(d);
1990
- let t = G.compressed(e), n = G.bits(t);
1990
+ let t = K.compressed(e), n = K.bits(t);
1991
1991
  for (let e = 0; !n.empty() && e < d; e++) {
1992
1992
  n.align();
1993
1993
  let t = n.int(w), r = n.bit() ? [
@@ -2025,9 +2025,9 @@ function wr(e, t = {}) {
2025
2025
  components: {}
2026
2026
  };
2027
2027
  }
2028
- let r = G.compressed(e), i = G.compressed(e), a = Math.max(y.length, 2), o = [];
2029
- G.each(r, (e) => {
2030
- let t = G.string(e), n = G.bits(G.bytes(e, G.i32(e))), r = G.i32(n.bytes(4)), i = n.array(() => n.int(a)), s = n.array(() => [n.string(), n.string()]);
2028
+ let r = K.compressed(e), i = K.compressed(e), a = Math.max(y.length, 2), o = [];
2029
+ K.each(r, (e) => {
2030
+ let t = K.string(e), n = K.bits(K.bytes(e, K.i32(e))), r = K.i32(n.bytes(4)), i = n.array(() => n.int(a)), s = n.array(() => [n.string(), n.string()]);
2031
2031
  for (let e of i) {
2032
2032
  let r = {};
2033
2033
  for (let [e, t] of s) r[e] = n.unreal(t);
@@ -2041,7 +2041,7 @@ function wr(e, t = {}) {
2041
2041
  });
2042
2042
  let s = Math.max(o.length, 2);
2043
2043
  {
2044
- let e = G.bits(i), t = e.int(4294967295);
2044
+ let e = K.bits(i), t = e.int(4294967295);
2045
2045
  for (let n = 0; n < t; n++) {
2046
2046
  let t = e.int(a), n = e.int(s), r = e.string(), i = e.int(a), c = e.int(s), l = e.string();
2047
2047
  e.bit(), e.align(), x.push({
@@ -2085,11 +2085,11 @@ function wr(e, t = {}) {
2085
2085
  }
2086
2086
  //#endregion
2087
2087
  //#region src/brs/read.v2.ts
2088
- function Tr(e, t = {}) {
2089
- let n = G.compressed(e), r = G.compressed(e), i = G.string(n), a = G.string(n), o = G.string(n), s = G.uuid(n), c = G.i32(n), l = G.array(r, G.string), u = G.array(r, G.string), d = G.array(r, (e) => H(Array.from(G.bytes(e, 4)))), f = G.array(r, G.string), p = [], m = Math.max(u.length, 2);
2088
+ function wr(e, t = {}) {
2089
+ let n = K.compressed(e), r = K.compressed(e), i = K.string(n), a = K.string(n), o = K.string(n), s = K.uuid(n), c = K.i32(n), l = K.array(r, K.string), u = K.array(r, K.string), d = K.array(r, (e) => U(Array.from(K.bytes(e, 4)))), f = K.array(r, K.string), p = [], m = Math.max(u.length, 2);
2090
2090
  if (t.bricks) {
2091
2091
  p = Array(c);
2092
- let t = G.compressed(e), n = G.bits(t);
2092
+ let t = K.compressed(e), n = K.bits(t);
2093
2093
  for (let e = 0; !n.empty() && e < c; e++) {
2094
2094
  n.align();
2095
2095
  let t = n.int(m), r = n.bit() ? [
@@ -2104,7 +2104,7 @@ function Tr(e, t = {}) {
2104
2104
  n.int_packed(),
2105
2105
  n.int_packed(),
2106
2106
  n.int_packed()
2107
- ], a = n.int(24), o = (a >> 2) % 6, s = a & 3, c = n.bit(), l = n.bit(), u = n.bit() ? n.uint_packed() : 1, f = n.bit() ? H(n.bytesArr(4)) : n.int(d.length);
2107
+ ], a = n.int(24), o = (a >> 2) % 6, s = a & 3, c = n.bit(), l = n.bit(), u = n.bit() ? n.uint_packed() : 1, f = n.bit() ? U(n.bytesArr(4)) : n.int(d.length);
2108
2108
  p[e] = {
2109
2109
  asset_name_index: t,
2110
2110
  size: r,
@@ -2136,14 +2136,14 @@ function Tr(e, t = {}) {
2136
2136
  }
2137
2137
  //#endregion
2138
2138
  //#region src/brs/read.v3.ts
2139
- function Er(e, t = {}) {
2140
- let n = G.compressed(e), r = G.compressed(e), i = G.string(n), a = G.string(n), o = G.string(n), s = G.uuid(n), c = G.i32(n), l = G.array(r, G.string), u = G.array(r, G.string), d = G.array(r, (e) => H(Array.from(G.bytes(e, 4)))), f = G.array(r, G.string), p = G.array(r, (e) => ({
2141
- id: G.uuid(e),
2142
- name: G.string(e)
2139
+ function Tr(e, t = {}) {
2140
+ let n = K.compressed(e), r = K.compressed(e), i = K.string(n), a = K.string(n), o = K.string(n), s = K.uuid(n), c = K.i32(n), l = K.array(r, K.string), u = K.array(r, K.string), d = K.array(r, (e) => U(Array.from(K.bytes(e, 4)))), f = K.array(r, K.string), p = K.array(r, (e) => ({
2141
+ id: K.uuid(e),
2142
+ name: K.string(e)
2143
2143
  })), m = [], h = Math.max(u.length, 2);
2144
2144
  if (t.bricks) {
2145
2145
  m = Array(c);
2146
- let t = G.compressed(e), n = G.bits(t);
2146
+ let t = K.compressed(e), n = K.bits(t);
2147
2147
  for (let e = 0; !n.empty() && e < c; e++) {
2148
2148
  n.align();
2149
2149
  let t = n.int(h), r = n.bit() ? [
@@ -2158,7 +2158,7 @@ function Er(e, t = {}) {
2158
2158
  n.int_packed(),
2159
2159
  n.int_packed(),
2160
2160
  n.int_packed()
2161
- ], a = n.int(24), o = (a >> 2) % 6, s = a & 3, c = n.bit(), l = n.bit(), u = n.bit() ? n.uint_packed() : 1, f = n.bit() ? H(n.bytesArr(4)) : n.int(d.length), p = n.uint_packed();
2161
+ ], a = n.int(24), o = (a >> 2) % 6, s = a & 3, c = n.bit(), l = n.bit(), u = n.bit() ? n.uint_packed() : 1, f = n.bit() ? U(n.bytesArr(4)) : n.int(d.length), p = n.uint_packed();
2162
2162
  m[e] = {
2163
2163
  asset_name_index: t,
2164
2164
  size: r,
@@ -2192,14 +2192,14 @@ function Er(e, t = {}) {
2192
2192
  }
2193
2193
  //#endregion
2194
2194
  //#region src/brs/read.v4.ts
2195
- function Dr(e, t = {}) {
2196
- let n = G.compressed(e), r = G.compressed(e), i = G.string(n), a = G.string(n), o = G.string(n), s = G.uuid(n), c = G.bytes(n, 8), l = G.i32(n), u = G.array(r, G.string), d = G.array(r, G.string), f = G.array(r, (e) => H(Array.from(G.bytes(e, 4)))), p = G.array(r, G.string), m = G.array(r, (e) => ({
2197
- id: G.uuid(e),
2198
- name: G.string(e)
2195
+ function Er(e, t = {}) {
2196
+ let n = K.compressed(e), r = K.compressed(e), i = K.string(n), a = K.string(n), o = K.string(n), s = K.uuid(n), c = K.bytes(n, 8), l = K.i32(n), u = K.array(r, K.string), d = K.array(r, K.string), f = K.array(r, (e) => U(Array.from(K.bytes(e, 4)))), p = K.array(r, K.string), m = K.array(r, (e) => ({
2197
+ id: K.uuid(e),
2198
+ name: K.string(e)
2199
2199
  })), h = [], g = Math.max(d.length, 2);
2200
2200
  if (t.bricks) {
2201
2201
  h = Array(l);
2202
- let t = G.compressed(e), n = G.bits(t);
2202
+ let t = K.compressed(e), n = K.bits(t);
2203
2203
  for (let e = 0; !n.empty() && e < l; e++) {
2204
2204
  n.align();
2205
2205
  let t = n.int(g), r = n.bit() ? [
@@ -2214,7 +2214,7 @@ function Dr(e, t = {}) {
2214
2214
  n.int_packed(),
2215
2215
  n.int_packed(),
2216
2216
  n.int_packed()
2217
- ], a = n.int(24), o = (a >> 2) % 6, s = a & 3, c = n.bit(), l = n.bit(), u = n.bit() ? n.uint_packed() : 1, d = n.bit() ? H(n.bytesArr(4)) : n.int(f.length), p = n.uint_packed();
2217
+ ], a = n.int(24), o = (a >> 2) % 6, s = a & 3, c = n.bit(), l = n.bit(), u = n.bit() ? n.uint_packed() : 1, d = n.bit() ? U(n.bytesArr(4)) : n.int(f.length), p = n.uint_packed();
2218
2218
  h[e] = {
2219
2219
  asset_name_index: t,
2220
2220
  size: r,
@@ -2249,23 +2249,23 @@ function Dr(e, t = {}) {
2249
2249
  }
2250
2250
  //#endregion
2251
2251
  //#region src/brs/read.v8.ts
2252
- function Or(e, t = {}) {
2253
- let n = G.i32(e), r = G.compressed(e), i = G.compressed(e), a = G.string(r), o = G.string(r), s = G.string(r), c = G.uuid(r), l = {
2254
- name: G.string(r),
2255
- id: G.uuid(r)
2256
- }, u = G.bytes(r, 8), d = G.i32(r), f = G.array(i, G.string), p = G.array(i, G.string), m = G.array(i, (e) => H(Array.from(G.bytes(e, 4)))), h = G.array(i, G.string), g = G.array(i, (e) => ({
2257
- id: G.uuid(e),
2258
- name: G.string(e),
2259
- bricks: G.i32(e)
2252
+ function Dr(e, t = {}) {
2253
+ let n = K.i32(e), r = K.compressed(e), i = K.compressed(e), a = K.string(r), o = K.string(r), s = K.string(r), c = K.uuid(r), l = {
2254
+ name: K.string(r),
2255
+ id: K.uuid(r)
2256
+ }, u = K.bytes(r, 8), d = K.i32(r), f = K.array(i, K.string), p = K.array(i, K.string), m = K.array(i, (e) => U(Array.from(K.bytes(e, 4)))), h = K.array(i, K.string), g = K.array(i, (e) => ({
2257
+ id: K.uuid(e),
2258
+ name: K.string(e),
2259
+ bricks: K.i32(e)
2260
2260
  })), _ = null;
2261
- if (G.bytes(e, 1)[0]) {
2262
- let n = G.i32(e);
2263
- t.preview ? _ = G.bytes(e, n) : e.brsOffset += n;
2261
+ if (K.bytes(e, 1)[0]) {
2262
+ let n = K.i32(e);
2263
+ t.preview ? _ = K.bytes(e, n) : e.brsOffset += n;
2264
2264
  }
2265
2265
  let v = [], y = {}, b = Math.max(h.length, 2), x = Math.max(p.length, 2);
2266
2266
  if (t.bricks) {
2267
2267
  v = Array(d);
2268
- let t = G.compressed(e), n = G.bits(t);
2268
+ let t = K.compressed(e), n = K.bits(t);
2269
2269
  for (let e = 0; !n.empty() && e < d; e++) {
2270
2270
  n.align();
2271
2271
  let t = n.int(x), r = n.bit() ? [
@@ -2280,7 +2280,7 @@ function Or(e, t = {}) {
2280
2280
  n.int_packed(),
2281
2281
  n.int_packed(),
2282
2282
  n.int_packed()
2283
- ], a = n.int(24), o = (a >> 2) % 6, s = a & 3, c = n.bit(), l = n.bit(), u = n.int(b), d = n.bit() ? H(n.bytesArr(4)) : n.int(m.length), f = n.uint_packed();
2283
+ ], a = n.int(24), o = (a >> 2) % 6, s = a & 3, c = n.bit(), l = n.bit(), u = n.int(b), d = n.bit() ? U(n.bytesArr(4)) : n.int(m.length), f = n.uint_packed();
2284
2284
  v[e] = {
2285
2285
  asset_name_index: t,
2286
2286
  size: r,
@@ -2295,9 +2295,9 @@ function Or(e, t = {}) {
2295
2295
  components: {}
2296
2296
  };
2297
2297
  }
2298
- let r = G.compressed(e), i = Math.max(v.length, 2);
2299
- G.each(r, (e) => {
2300
- let t = G.string(e), n = G.bits(G.bytes(e, G.i32(e))), r = G.i32(n.bytes(4)), a = n.array(() => n.int(i)), o = n.array(() => [n.string(), n.string()]);
2298
+ let r = K.compressed(e), i = Math.max(v.length, 2);
2299
+ K.each(r, (e) => {
2300
+ let t = K.string(e), n = K.bits(K.bytes(e, K.i32(e))), r = K.i32(n.bytes(4)), a = n.array(() => n.int(i)), o = n.array(() => [n.string(), n.string()]);
2301
2301
  for (let e of a) {
2302
2302
  let r = {};
2303
2303
  for (let [e, t] of o) r[e] = n.unreal(t);
@@ -2334,23 +2334,23 @@ function Or(e, t = {}) {
2334
2334
  }
2335
2335
  //#endregion
2336
2336
  //#region src/brs/read.v9.ts
2337
- function kr(e, t = {}) {
2338
- let n = G.i32(e), r = G.compressed(e), i = G.compressed(e), a = G.string(r), o = G.string(r), s = G.string(r), c = G.uuid(r), l = {
2339
- name: G.string(r),
2340
- id: G.uuid(r)
2341
- }, u = G.bytes(r, 8), d = G.i32(r), f = G.array(i, G.string), p = G.array(i, G.string), m = G.array(i, (e) => H(Array.from(G.bytes(e, 4)))), h = G.array(i, G.string), g = G.array(i, (e) => ({
2342
- id: G.uuid(e),
2343
- name: G.string(e),
2344
- bricks: G.i32(e)
2345
- })), _ = G.array(i, G.string), v = null;
2346
- if (G.bytes(e, 1)[0]) {
2347
- let n = G.i32(e);
2348
- t.preview ? v = G.bytes(e, n) : e.brsOffset += n;
2337
+ function Or(e, t = {}) {
2338
+ let n = K.i32(e), r = K.compressed(e), i = K.compressed(e), a = K.string(r), o = K.string(r), s = K.string(r), c = K.uuid(r), l = {
2339
+ name: K.string(r),
2340
+ id: K.uuid(r)
2341
+ }, u = K.bytes(r, 8), d = K.i32(r), f = K.array(i, K.string), p = K.array(i, K.string), m = K.array(i, (e) => U(Array.from(K.bytes(e, 4)))), h = K.array(i, K.string), g = K.array(i, (e) => ({
2342
+ id: K.uuid(e),
2343
+ name: K.string(e),
2344
+ bricks: K.i32(e)
2345
+ })), _ = K.array(i, K.string), v = null;
2346
+ if (K.bytes(e, 1)[0]) {
2347
+ let n = K.i32(e);
2348
+ t.preview ? v = K.bytes(e, n) : e.brsOffset += n;
2349
2349
  }
2350
2350
  let y = [], b = {}, x = Math.max(_.length, 2), S = Math.max(h.length, 2), C = Math.max(p.length, 2);
2351
2351
  if (t.bricks) {
2352
2352
  y = Array(d);
2353
- let t = G.compressed(e), n = G.bits(t);
2353
+ let t = K.compressed(e), n = K.bits(t);
2354
2354
  for (let e = 0; !n.empty() && e < d; e++) {
2355
2355
  n.align();
2356
2356
  let t = n.int(C), r = n.bit() ? [
@@ -2382,9 +2382,9 @@ function kr(e, t = {}) {
2382
2382
  components: {}
2383
2383
  };
2384
2384
  }
2385
- let r = G.compressed(e), i = Math.max(y.length, 2);
2386
- G.each(r, (e) => {
2387
- let t = G.string(e), n = G.bits(G.bytes(e, G.i32(e))), r = G.i32(n.bytes(4)), a = n.array(() => n.int(i)), o = n.array(() => [n.string(), n.string()]);
2385
+ let r = K.compressed(e), i = Math.max(y.length, 2);
2386
+ K.each(r, (e) => {
2387
+ let t = K.string(e), n = K.bits(K.bytes(e, K.i32(e))), r = K.i32(n.bytes(4)), a = n.array(() => n.int(i)), o = n.array(() => [n.string(), n.string()]);
2388
2388
  for (let e of a) {
2389
2389
  let r = {};
2390
2390
  for (let [e, t] of o) r[e] = n.unreal(t);
@@ -2422,27 +2422,27 @@ function kr(e, t = {}) {
2422
2422
  }
2423
2423
  //#endregion
2424
2424
  //#region src/brs/read.ts
2425
- function Ar(e, t = {}) {
2425
+ function kr(e, t = {}) {
2426
2426
  if (typeof t != "object") throw Error("Invalid options");
2427
2427
  if (typeof t.bricks != "boolean" && (t.bricks = !0), typeof t.preview != "boolean" && (t.preview = !1), e[0] !== r[0] || e[1] !== r[1] || e[2] !== r[2]) throw Error("Invalid starting bytes");
2428
2428
  let n = e;
2429
2429
  n.brsOffset = 3;
2430
- let i = G.u16(n);
2430
+ let i = K.u16(n);
2431
2431
  switch (i) {
2432
- case 1: return Sr(n, t);
2433
- case 2: return Tr(n, t);
2434
- case 3: return Er(n, t);
2435
- case 4: return Dr(n, t);
2436
- case 8: return Or(n, t);
2437
- case 9: return kr(n, t);
2438
- case 10: return Cr(n, t);
2439
- case 14: return wr(n, t);
2432
+ case 1: return xr(n, t);
2433
+ case 2: return wr(n, t);
2434
+ case 3: return Tr(n, t);
2435
+ case 4: return Er(n, t);
2436
+ case 8: return Dr(n, t);
2437
+ case 9: return Or(n, t);
2438
+ case 10: return Sr(n, t);
2439
+ case 14: return Cr(n, t);
2440
2440
  default: throw Error("Unsupported version " + i);
2441
2441
  }
2442
2442
  }
2443
2443
  //#endregion
2444
2444
  //#region src/brs/write.ts
2445
- var jr = new Uint8Array([]), Mr = {
2445
+ var Ar = new Uint8Array([]), jr = {
2446
2446
  BCD_SpotLight: {
2447
2447
  version: 1,
2448
2448
  properties: {
@@ -2747,11 +2747,11 @@ var jr = new Uint8Array([]), Mr = {
2747
2747
  }
2748
2748
  }
2749
2749
  };
2750
- function Nr(e, t = {}) {
2750
+ function Mr(e, t = {}) {
2751
2751
  if (typeof e != "object") throw Error("Expected save to be an object");
2752
2752
  if (!Array.isArray(e.bricks) || e.bricks.length === 0) throw Error("Expected save to have bricks field");
2753
2753
  if (e.bricks.length > 2147483647) throw Error("Brick count out of range");
2754
- let n = t.compress ? K.compressed : K.uncompressed, i = ([e, t, n, r]) => new Uint8Array([
2754
+ let n = t.compress ? q.compressed : q.uncompressed, i = ([e, t, n, r]) => new Uint8Array([
2755
2755
  n,
2756
2756
  t,
2757
2757
  e,
@@ -2759,7 +2759,7 @@ function Nr(e, t = {}) {
2759
2759
  ]), o = {}, s = Math.max(e.colors?.length ?? 0, 2), c = Math.max(e.brick_assets?.length ?? 0, 2), l = Math.max(e.materials?.length ?? 0, 2), u = Math.max(e.physical_materials?.length ?? 0, 2);
2760
2760
  if (e.preview && !Array.isArray(e.preview)) throw Error("Expected preview to be an array");
2761
2761
  let d = {}, f = 0;
2762
- return W(r, K.u16(14), K.i32(e.game_version ?? 0), n(K.string(e.map ?? "Unknown"), K.string(e.author?.name ?? "Unknown"), K.string(e.description ?? ""), K.uuid(e.author?.id ?? "00000000-0000-0000-0000-000000000000"), W(K.string(e.host?.name ?? "Unknown"), K.uuid(e.host?.id ?? "00000000-0000-0000-0000-000000000000")), new Uint8Array(e.save_time && (Array.isArray(e.save_time) || e.save_time instanceof Uint8Array) && e.save_time.length === 8 ? e.save_time : [
2762
+ return G(r, q.u16(14), q.i32(e.game_version ?? 0), n(q.string(e.map ?? "Unknown"), q.string(e.author?.name ?? "Unknown"), q.string(e.description ?? ""), q.uuid(e.author?.id ?? "00000000-0000-0000-0000-000000000000"), G(q.string(e.host?.name ?? "Unknown"), q.uuid(e.host?.id ?? "00000000-0000-0000-0000-000000000000")), new Uint8Array(e.save_time && (Array.isArray(e.save_time) || e.save_time instanceof Uint8Array) && e.save_time.length === 8 ? e.save_time : [
2763
2763
  0,
2764
2764
  0,
2765
2765
  0,
@@ -2768,12 +2768,12 @@ function Nr(e, t = {}) {
2768
2768
  0,
2769
2769
  0,
2770
2770
  0
2771
- ]), K.i32(e.bricks.length)), n(K.array(e.mods ?? [], K.string), K.array(e.brick_assets ?? ["PB_DefaultBrick"], K.string), K.array(e.colors ?? [], i), K.array(e.materials ?? ["BMC_Plastic"], K.string), K.array(e.brick_owners ?? [], ({ id: e = a, name: t = "Unknown", display_name: n = "Unknown", bricks: r = 0 }) => W(K.uuid(e), K.string(t), K.string(n), K.i32(r))), K.array(e.physical_materials ?? ["BPMC_Default"], K.string)), W(new Uint8Array([+!!e.preview]), e.preview ? K.i32(e.preview.length) : jr, e.preview ?? jr), n(K.bits().each(e.bricks, function(e, t) {
2771
+ ]), q.i32(e.bricks.length)), n(q.array(e.mods ?? [], q.string), q.array(e.brick_assets ?? ["PB_DefaultBrick"], q.string), q.array(e.colors ?? [], i), q.array(e.materials ?? ["BMC_Plastic"], q.string), q.array(e.brick_owners ?? [], ({ id: e = a, name: t = "Unknown", display_name: n = "Unknown", bricks: r = 0 }) => G(q.uuid(e), q.string(t), q.string(n), q.i32(r))), q.array(e.physical_materials ?? ["BPMC_Default"], q.string)), G(new Uint8Array([+!!e.preview]), e.preview ? q.i32(e.preview.length) : Ar, e.preview ?? Ar), n(q.bits().each(e.bricks, function(e, t) {
2772
2772
  if (typeof e != "object") throw Error(`Expected save.bricks[${t}] to be an object`);
2773
2773
  if (!Array.isArray(e.size) || e.size.length !== 3) throw Error(`Expected save.bricks[${t}].size to be an array of length 3`);
2774
2774
  if (!Array.isArray(e.position) || e.position.length !== 3) throw Error(`Expected save.bricks[${t}].position to be an array of length 3`);
2775
2775
  this.align(), this.int(e.asset_name_index ?? 0, c);
2776
- let n = e.size === null || rr(e.size, [
2776
+ let n = e.size === null || nr(e.size, [
2777
2777
  0,
2778
2778
  0,
2779
2779
  0
@@ -2789,9 +2789,9 @@ function Nr(e, t = {}) {
2789
2789
  }
2790
2790
  this.uint_packed(e.owner_index >= 0 ? e.owner_index : 0);
2791
2791
  for (let n in e.components ?? {}) o[n] ?? (o[n] = []), o[n].push(t);
2792
- }).finish()), n(K.array(Object.keys(e.components ?? Mr).filter((e) => o[e]), (t) => W(K.string(t), K.bits().self(function() {
2793
- let n = e.components?.[t] ?? Mr[t], r = o[t], i = Object.entries(n.properties);
2794
- t in d || (d[t] = f, f++), this.bytes(K.i32(n.version)), this.array(r, (t) => {
2792
+ }).finish()), n(q.array(Object.keys(e.components ?? jr).filter((e) => o[e]), (t) => G(q.string(t), q.bits().self(function() {
2793
+ let n = e.components?.[t] ?? jr[t], r = o[t], i = Object.entries(n.properties);
2794
+ t in d || (d[t] = f, f++), this.bytes(q.i32(n.version)), this.array(r, (t) => {
2795
2795
  this.int(t, Math.max(e.bricks.length, 2));
2796
2796
  }), this.array(i, ([e, t]) => {
2797
2797
  this.string(e), this.string(t);
@@ -2801,7 +2801,7 @@ function Nr(e, t = {}) {
2801
2801
  this.unreal(a, e.bricks[n].components[t][r]);
2802
2802
  }
2803
2803
  this.align();
2804
- }).finishSection()))), n(K.bits().self(function() {
2804
+ }).finishSection()))), n(q.bits().self(function() {
2805
2805
  let t = 4294967295;
2806
2806
  if (!e.wires || !Array.isArray(e.wires) || e.wires.length === 0) {
2807
2807
  this.int(0, t);
@@ -2820,30 +2820,20 @@ function Nr(e, t = {}) {
2820
2820
  }
2821
2821
  //#endregion
2822
2822
  //#region src/brs/types.ts
2823
- var Pr = /* @__PURE__ */ t({
2824
- Direction: () => Fr,
2825
- Rotation: () => Ir
2826
- }), Fr = /* @__PURE__ */ function(e) {
2823
+ var Nr = /* @__PURE__ */ t({
2824
+ Direction: () => Pr,
2825
+ Rotation: () => Fr
2826
+ }), Pr = /* @__PURE__ */ function(e) {
2827
2827
  return e[e.XPositive = 0] = "XPositive", e[e.XNegative = 1] = "XNegative", e[e.YPositive = 2] = "YPositive", e[e.YNegative = 3] = "YNegative", e[e.ZPositive = 4] = "ZPositive", e[e.ZNegative = 5] = "ZNegative", e;
2828
- }({}), Ir = /* @__PURE__ */ function(e) {
2828
+ }({}), Fr = /* @__PURE__ */ function(e) {
2829
2829
  return e[e.Deg0 = 0] = "Deg0", e[e.Deg90 = 1] = "Deg90", e[e.Deg180 = 2] = "Deg180", e[e.Deg270 = 3] = "Deg270", e;
2830
- }({}), Lr = (e, t) => ((e.Flags[t >> 3] ?? 0) >> (t & 7) & 1) == 1, Rr = class {
2831
- constructor() {
2832
- this.bytes = [], this.bits = 0;
2833
- }
2834
- push(e) {
2835
- this.bits >= this.bytes.length * 8 && this.bytes.push(0), e && (this.bytes[this.bits >> 3] |= 1 << (this.bits & 7)), this.bits += 1;
2836
- }
2837
- toValue() {
2838
- return { Flags: this.bytes };
2839
- }
2840
- };
2830
+ }({});
2841
2831
  //#endregion
2842
2832
  //#region node_modules/@noble/hashes/utils.js
2843
- function zr(e) {
2833
+ function Ir(e) {
2844
2834
  return e instanceof Uint8Array || ArrayBuffer.isView(e) && e.constructor.name === "Uint8Array" && "BYTES_PER_ELEMENT" in e && e.BYTES_PER_ELEMENT === 1;
2845
2835
  }
2846
- function Br(e, t = "") {
2836
+ function Lr(e, t = "") {
2847
2837
  if (typeof e != "number") {
2848
2838
  let n = t && `"${t}" `;
2849
2839
  throw TypeError(`${n}expected number, got ${typeof e}`);
@@ -2853,61 +2843,61 @@ function Br(e, t = "") {
2853
2843
  throw RangeError(`${n}expected integer >= 0, got ${e}`);
2854
2844
  }
2855
2845
  }
2856
- function Vr(e, t, n = "") {
2857
- let r = zr(e), i = e?.length, a = t !== void 0;
2846
+ function Rr(e, t, n = "") {
2847
+ let r = Ir(e), i = e?.length, a = t !== void 0;
2858
2848
  if (!r || a && i !== t) {
2859
2849
  let o = n && `"${n}" `, s = a ? ` of length ${t}` : "", c = r ? `length=${i}` : `type=${typeof e}`, l = o + "expected Uint8Array" + s + ", got " + c;
2860
2850
  throw r ? RangeError(l) : TypeError(l);
2861
2851
  }
2862
2852
  return e;
2863
2853
  }
2864
- function Hr(e) {
2865
- return Uint8Array.from(Vr(e));
2854
+ function zr(e) {
2855
+ return Uint8Array.from(Rr(e));
2866
2856
  }
2867
- function Ur(e, t = !0) {
2857
+ function Br(e, t = !0) {
2868
2858
  if (e.destroyed) throw Error("Hash instance has been destroyed");
2869
2859
  if (t && e.finished) throw Error("Hash#digest() has already been called");
2870
2860
  }
2871
- function Wr(e, t) {
2872
- Vr(e, void 0, "digestInto() output");
2861
+ function Vr(e, t) {
2862
+ Rr(e, void 0, "digestInto() output");
2873
2863
  let n = t.outputLen;
2874
2864
  if (e.length < n) throw RangeError("\"digestInto() output\" expected to be of length >=" + n);
2875
2865
  }
2876
- function Gr(e) {
2866
+ function Hr(e) {
2877
2867
  return new Uint8Array(e.buffer, e.byteOffset, e.byteLength);
2878
2868
  }
2879
- function Kr(e) {
2869
+ function Ur(e) {
2880
2870
  return new Uint32Array(e.buffer, e.byteOffset, Math.floor(e.byteLength / 4));
2881
2871
  }
2882
- function qr(...e) {
2872
+ function Wr(...e) {
2883
2873
  for (let t = 0; t < e.length; t++) e[t].fill(0);
2884
2874
  }
2885
- function Jr(e, t) {
2875
+ function Gr(e, t) {
2886
2876
  return e << 32 - t | e >>> t;
2887
2877
  }
2888
- var Yr = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
2889
- function Xr(e) {
2878
+ var Kr = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
2879
+ function qr(e) {
2890
2880
  return e << 24 & 4278190080 | e << 8 & 16711680 | e >>> 8 & 65280 | e >>> 24 & 255;
2891
2881
  }
2892
- var Zr = Yr ? (e) => e : (e) => Xr(e) >>> 0;
2893
- function Qr(e) {
2894
- for (let t = 0; t < e.length; t++) e[t] = Xr(e[t]);
2882
+ var Jr = Kr ? (e) => e : (e) => qr(e) >>> 0;
2883
+ function Yr(e) {
2884
+ for (let t = 0; t < e.length; t++) e[t] = qr(e[t]);
2895
2885
  return e;
2896
2886
  }
2897
- var q = Yr ? (e) => e : Qr, $r = typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", ei = /* @__PURE__ */ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
2898
- function ti(e) {
2899
- if (Vr(e), $r) return e.toHex();
2887
+ var Xr = Kr ? (e) => e : Yr, Zr = typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", Qr = /* @__PURE__ */ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
2888
+ function $r(e) {
2889
+ if (Rr(e), Zr) return e.toHex();
2900
2890
  let t = "";
2901
- for (let n = 0; n < e.length; n++) t += ei[e[n]];
2891
+ for (let n = 0; n < e.length; n++) t += Qr[e[n]];
2902
2892
  return t;
2903
2893
  }
2904
- function ni(e, t = {}) {
2894
+ function ei(e, t = {}) {
2905
2895
  let n = (t, n) => e(n).update(t).digest(), r = e(void 0);
2906
2896
  return n.outputLen = r.outputLen, n.blockLen = r.blockLen, n.canXOF = r.canXOF, n.create = (t) => e(t), Object.assign(n, t), Object.freeze(n);
2907
2897
  }
2908
2898
  //#endregion
2909
2899
  //#region node_modules/@noble/hashes/_md.js
2910
- var ri = /* @__PURE__ */ Uint32Array.from([
2900
+ var ti = /* @__PURE__ */ Uint32Array.from([
2911
2901
  1779033703,
2912
2902
  3144134277,
2913
2903
  1013904242,
@@ -2916,28 +2906,28 @@ var ri = /* @__PURE__ */ Uint32Array.from([
2916
2906
  2600822924,
2917
2907
  528734635,
2918
2908
  1541459225
2919
- ]), ii = /* @__PURE__ */ BigInt(2 ** 32 - 1), ai = /* @__PURE__ */ BigInt(32);
2920
- function oi(e, t = !1) {
2909
+ ]), ni = /* @__PURE__ */ BigInt(2 ** 32 - 1), ri = /* @__PURE__ */ BigInt(32);
2910
+ function ii(e, t = !1) {
2921
2911
  return t ? {
2922
- h: Number(e & ii),
2923
- l: Number(e >> ai & ii)
2912
+ h: Number(e & ni),
2913
+ l: Number(e >> ri & ni)
2924
2914
  } : {
2925
- h: Number(e >> ai & ii) | 0,
2926
- l: Number(e & ii) | 0
2915
+ h: Number(e >> ri & ni) | 0,
2916
+ l: Number(e & ni) | 0
2927
2917
  };
2928
2918
  }
2929
2919
  //#endregion
2930
2920
  //#region node_modules/@noble/hashes/_blake.js
2931
- function si(e, t, n, r, i) {
2932
- return e = e + t + i | 0, r = Jr(r ^ e, 16), n = n + r | 0, t = Jr(t ^ n, 12), {
2921
+ function ai(e, t, n, r, i) {
2922
+ return e = e + t + i | 0, r = Gr(r ^ e, 16), n = n + r | 0, t = Gr(t ^ n, 12), {
2933
2923
  a: e,
2934
2924
  b: t,
2935
2925
  c: n,
2936
2926
  d: r
2937
2927
  };
2938
2928
  }
2939
- function ci(e, t, n, r, i) {
2940
- return e = e + t + i | 0, r = Jr(r ^ e, 8), n = n + r | 0, t = Jr(t ^ n, 7), {
2929
+ function oi(e, t, n, r, i) {
2930
+ return e = e + t + i | 0, r = Gr(r ^ e, 8), n = n + r | 0, t = Gr(t ^ n, 7), {
2941
2931
  a: e,
2942
2932
  b: t,
2943
2933
  c: n,
@@ -2946,21 +2936,21 @@ function ci(e, t, n, r, i) {
2946
2936
  }
2947
2937
  //#endregion
2948
2938
  //#region node_modules/@noble/hashes/blake2.js
2949
- var li = class {
2939
+ var si = class {
2950
2940
  constructor(e, t) {
2951
- l(this, "buffer", void 0), l(this, "buffer32", void 0), l(this, "finished", !1), l(this, "destroyed", !1), l(this, "length", 0), l(this, "pos", 0), l(this, "blockLen", void 0), l(this, "outputLen", void 0), l(this, "canXOF", !1), Br(e), Br(t), this.blockLen = e, this.outputLen = t, this.buffer = new Uint8Array(e), this.buffer32 = Kr(this.buffer);
2941
+ l(this, "buffer", void 0), l(this, "buffer32", void 0), l(this, "finished", !1), l(this, "destroyed", !1), l(this, "length", 0), l(this, "pos", 0), l(this, "blockLen", void 0), l(this, "outputLen", void 0), l(this, "canXOF", !1), Lr(e), Lr(t), this.blockLen = e, this.outputLen = t, this.buffer = new Uint8Array(e), this.buffer32 = Ur(this.buffer);
2952
2942
  }
2953
2943
  update(e) {
2954
- Ur(this), Vr(e);
2944
+ Br(this), Rr(e);
2955
2945
  let { blockLen: t, buffer: n, buffer32: r } = this, i = e.length, a = e.byteOffset, o = e.buffer;
2956
2946
  for (let s = 0; s < i;) {
2957
- this.pos === t && (q(r), this.compress(r, 0, !1), q(r), this.pos = 0);
2947
+ this.pos === t && (Xr(r), this.compress(r, 0, !1), Xr(r), this.pos = 0);
2958
2948
  let c = Math.min(t - this.pos, i - s), l = a + s;
2959
2949
  if (c === t && !(l % 4) && s + c < i) {
2960
2950
  let e = new Uint32Array(o, l, Math.floor((i - s) / 4));
2961
- q(e);
2951
+ Xr(e);
2962
2952
  for (let n = 0; s + t < i; n += r.length, s += t) this.length += t, this.compress(e, n, !1);
2963
- q(e);
2953
+ Xr(e);
2964
2954
  continue;
2965
2955
  }
2966
2956
  n.set(e.subarray(s, s + c), this.pos), this.pos += c, this.length += c, s += c;
@@ -2968,11 +2958,11 @@ var li = class {
2968
2958
  return this;
2969
2959
  }
2970
2960
  digestInto(e) {
2971
- Ur(this), Wr(e, this);
2961
+ Br(this), Vr(e, this);
2972
2962
  let { pos: t, buffer32: n } = this;
2973
- if (this.finished = !0, qr(this.buffer.subarray(t)), q(n), this.compress(n, 0, !0), q(n), e.byteOffset & 3) throw RangeError("\"digestInto() output\" expected 4-byte aligned byteOffset, got " + e.byteOffset);
2974
- let r = this.get(), i = Kr(e), a = Math.floor(this.outputLen / 4);
2975
- for (let e = 0; e < a; e++) i[e] = Zr(r[e]);
2963
+ if (this.finished = !0, Wr(this.buffer.subarray(t)), Xr(n), this.compress(n, 0, !0), Xr(n), e.byteOffset & 3) throw RangeError("\"digestInto() output\" expected 4-byte aligned byteOffset, got " + e.byteOffset);
2964
+ let r = this.get(), i = Ur(e), a = Math.floor(this.outputLen / 4);
2965
+ for (let e = 0; e < a; e++) i[e] = Jr(r[e]);
2976
2966
  let o = this.outputLen % 4;
2977
2967
  if (!o) return;
2978
2968
  let s = a * 4, c = r[a];
@@ -2992,9 +2982,9 @@ var li = class {
2992
2982
  return this._cloneInto();
2993
2983
  }
2994
2984
  };
2995
- function ui(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _, v, y) {
2985
+ function ci(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _, v, y) {
2996
2986
  let b = 0;
2997
- for (let x = 0; x < r; x++) ({a: i, b: c, c: f, d: g} = si(i, c, f, g, n[t + e[b++]])), {a: i, b: c, c: f, d: g} = ci(i, c, f, g, n[t + e[b++]]), {a: a, b: l, c: p, d: _} = si(a, l, p, _, n[t + e[b++]]), {a: a, b: l, c: p, d: _} = ci(a, l, p, _, n[t + e[b++]]), {a: o, b: u, c: m, d: v} = si(o, u, m, v, n[t + e[b++]]), {a: o, b: u, c: m, d: v} = ci(o, u, m, v, n[t + e[b++]]), {a: s, b: d, c: h, d: y} = si(s, d, h, y, n[t + e[b++]]), {a: s, b: d, c: h, d: y} = ci(s, d, h, y, n[t + e[b++]]), {a: i, b: l, c: m, d: y} = si(i, l, m, y, n[t + e[b++]]), {a: i, b: l, c: m, d: y} = ci(i, l, m, y, n[t + e[b++]]), {a: a, b: u, c: h, d: g} = si(a, u, h, g, n[t + e[b++]]), {a: a, b: u, c: h, d: g} = ci(a, u, h, g, n[t + e[b++]]), {a: o, b: d, c: f, d: _} = si(o, d, f, _, n[t + e[b++]]), {a: o, b: d, c: f, d: _} = ci(o, d, f, _, n[t + e[b++]]), {a: s, b: c, c: p, d: v} = si(s, c, p, v, n[t + e[b++]]), {a: s, b: c, c: p, d: v} = ci(s, c, p, v, n[t + e[b++]]);
2987
+ for (let x = 0; x < r; x++) ({a: i, b: c, c: f, d: g} = ai(i, c, f, g, n[t + e[b++]])), {a: i, b: c, c: f, d: g} = oi(i, c, f, g, n[t + e[b++]]), {a: a, b: l, c: p, d: _} = ai(a, l, p, _, n[t + e[b++]]), {a: a, b: l, c: p, d: _} = oi(a, l, p, _, n[t + e[b++]]), {a: o, b: u, c: m, d: v} = ai(o, u, m, v, n[t + e[b++]]), {a: o, b: u, c: m, d: v} = oi(o, u, m, v, n[t + e[b++]]), {a: s, b: d, c: h, d: y} = ai(s, d, h, y, n[t + e[b++]]), {a: s, b: d, c: h, d: y} = oi(s, d, h, y, n[t + e[b++]]), {a: i, b: l, c: m, d: y} = ai(i, l, m, y, n[t + e[b++]]), {a: i, b: l, c: m, d: y} = oi(i, l, m, y, n[t + e[b++]]), {a: a, b: u, c: h, d: g} = ai(a, u, h, g, n[t + e[b++]]), {a: a, b: u, c: h, d: g} = oi(a, u, h, g, n[t + e[b++]]), {a: o, b: d, c: f, d: _} = ai(o, d, f, _, n[t + e[b++]]), {a: o, b: d, c: f, d: _} = oi(o, d, f, _, n[t + e[b++]]), {a: s, b: c, c: p, d: v} = ai(s, c, p, v, n[t + e[b++]]), {a: s, b: c, c: p, d: v} = oi(s, c, p, v, n[t + e[b++]]);
2998
2988
  return {
2999
2989
  v0: i,
3000
2990
  v1: a,
@@ -3016,7 +3006,7 @@ function ui(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _, v, y) {
3016
3006
  }
3017
3007
  //#endregion
3018
3008
  //#region node_modules/@noble/hashes/blake3.js
3019
- var di = {
3009
+ var li = {
3020
3010
  CHUNK_START: 1,
3021
3011
  CHUNK_END: 2,
3022
3012
  PARENT: 4,
@@ -3024,7 +3014,7 @@ var di = {
3024
3014
  KEYED_HASH: 16,
3025
3015
  DERIVE_KEY_CONTEXT: 32,
3026
3016
  DERIVE_KEY_MATERIAL: 64
3027
- }, fi = /* @__PURE__ */ ri.slice(), pi = /* @__PURE__ */ (() => {
3017
+ }, ui = /* @__PURE__ */ ti.slice(), di = /* @__PURE__ */ (() => {
3028
3018
  let e = Array.from({ length: 16 }, (e, t) => t), t = (e) => [
3029
3019
  2,
3030
3020
  6,
@@ -3045,36 +3035,36 @@ var di = {
3045
3035
  ].map((t) => e[t]), n = [];
3046
3036
  for (let r = 0, i = e; r < 7; r++, i = t(i)) n.push(...i);
3047
3037
  return Uint8Array.from(n);
3048
- })(), mi = class e extends li {
3038
+ })(), fi = class e extends si {
3049
3039
  constructor(t = {}, n = 0) {
3050
3040
  super(64, t.dkLen === void 0 ? 32 : t.dkLen), l(this, "canXOF", !0), l(this, "chunkPos", 0), l(this, "chunksDone", 0), l(this, "flags", 0), l(this, "IV", void 0), l(this, "state", void 0), l(this, "stack", []), l(this, "posOut", 0), l(this, "bufferOut32", /* @__PURE__ */ new Uint32Array(16)), l(this, "bufferOut", void 0), l(this, "chunkOut", 0), l(this, "enableXOF", !0);
3051
3041
  let { key: r, context: i } = t, a = i !== void 0;
3052
3042
  if (r !== void 0) {
3053
3043
  if (a) throw Error("Only \"key\" or \"context\" can be specified at same time");
3054
- Vr(r, 32, "key");
3055
- let e = Hr(r);
3056
- this.IV = Kr(e), q(this.IV), this.flags = n | di.KEYED_HASH;
3044
+ Rr(r, 32, "key");
3045
+ let e = zr(r);
3046
+ this.IV = Ur(e), Xr(this.IV), this.flags = n | li.KEYED_HASH;
3057
3047
  } else if (a) {
3058
- Vr(i, void 0, "context");
3059
- let t = i, r = new e({ dkLen: 32 }, di.DERIVE_KEY_CONTEXT).update(t).digest();
3060
- this.IV = Kr(r), q(this.IV), this.flags = n | di.DERIVE_KEY_MATERIAL;
3061
- } else this.IV = fi.slice(), this.flags = n;
3062
- this.state = this.IV.slice(), this.bufferOut = Gr(this.bufferOut32);
3048
+ Rr(i, void 0, "context");
3049
+ let t = i, r = new e({ dkLen: 32 }, li.DERIVE_KEY_CONTEXT).update(t).digest();
3050
+ this.IV = Ur(r), Xr(this.IV), this.flags = n | li.DERIVE_KEY_MATERIAL;
3051
+ } else this.IV = ui.slice(), this.flags = n;
3052
+ this.state = this.IV.slice(), this.bufferOut = Hr(this.bufferOut32);
3063
3053
  }
3064
3054
  get() {
3065
3055
  return [];
3066
3056
  }
3067
3057
  set() {}
3068
3058
  b2Compress(e, t, n, r = 0) {
3069
- let { state: i, pos: a } = this, { h: o, l: s } = oi(BigInt(e), !0), { v0: c, v1: l, v2: u, v3: d, v4: f, v5: p, v6: m, v7: h, v8: g, v9: _, v10: v, v11: y, v12: b, v13: x, v14: S, v15: C } = ui(pi, r, n, 7, i[0], i[1], i[2], i[3], i[4], i[5], i[6], i[7], fi[0], fi[1], fi[2], fi[3], o, s, a, t);
3059
+ let { state: i, pos: a } = this, { h: o, l: s } = ii(BigInt(e), !0), { v0: c, v1: l, v2: u, v3: d, v4: f, v5: p, v6: m, v7: h, v8: g, v9: _, v10: v, v11: y, v12: b, v13: x, v14: S, v15: C } = ci(di, r, n, 7, i[0], i[1], i[2], i[3], i[4], i[5], i[6], i[7], ui[0], ui[1], ui[2], ui[3], o, s, a, t);
3070
3060
  i[0] = c ^ g, i[1] = l ^ _, i[2] = u ^ v, i[3] = d ^ y, i[4] = f ^ b, i[5] = p ^ x, i[6] = m ^ S, i[7] = h ^ C;
3071
3061
  }
3072
3062
  compress(e, t = 0, n = !1) {
3073
3063
  let r = this.flags;
3074
- if (this.chunkPos || (r |= di.CHUNK_START), (this.chunkPos === 15 || n) && (r |= di.CHUNK_END), n || (this.pos = this.blockLen), this.b2Compress(this.chunksDone, r, e, t), this.chunkPos += 1, this.chunkPos === 16 || n) {
3064
+ if (this.chunkPos || (r |= li.CHUNK_START), (this.chunkPos === 15 || n) && (r |= li.CHUNK_END), n || (this.pos = this.blockLen), this.b2Compress(this.chunksDone, r, e, t), this.chunkPos += 1, this.chunkPos === 16 || n) {
3075
3065
  let e = this.state;
3076
3066
  this.state = this.IV.slice();
3077
- for (let t, r = this.chunksDone + 1; (n || !(r & 1)) && (t = this.stack.pop()); r >>= 1) this.buffer32.set(t, 0), this.buffer32.set(e, 8), this.pos = this.blockLen, this.b2Compress(0, this.flags | di.PARENT, this.buffer32, 0), e = this.state, this.state = this.IV.slice();
3067
+ for (let t, r = this.chunksDone + 1; (n || !(r & 1)) && (t = this.stack.pop()); r >>= 1) this.buffer32.set(t, 0), this.buffer32.set(e, 8), this.pos = this.blockLen, this.b2Compress(0, this.flags | li.PARENT, this.buffer32, 0), e = this.state, this.state = this.IV.slice();
3078
3068
  this.chunksDone++, this.chunkPos = 0, this.stack.push(e);
3079
3069
  }
3080
3070
  this.pos = 0;
@@ -3085,22 +3075,22 @@ var di = {
3085
3075
  return e.state.set(r.slice()), e.stack = s.map((e) => Uint32Array.from(e)), e.IV.set(t), e.flags = n, e.chunkPos = i, e.chunksDone = c, e.posOut = a, e.chunkOut = o, e.enableXOF = this.enableXOF, e.bufferOut32.set(this.bufferOut32), e;
3086
3076
  }
3087
3077
  destroy() {
3088
- this.destroyed = !0, qr(this.state, this.buffer32, this.IV, this.bufferOut32), qr(...this.stack);
3078
+ this.destroyed = !0, Wr(this.state, this.buffer32, this.IV, this.bufferOut32), Wr(...this.stack);
3089
3079
  }
3090
3080
  b2CompressOut() {
3091
- let { state: e, pos: t, flags: n, buffer32: r, bufferOut32: i } = this, { h: a, l: o } = oi(BigInt(this.chunkOut++));
3092
- q(r);
3093
- let { v0: s, v1: c, v2: l, v3: u, v4: d, v5: f, v6: p, v7: m, v8: h, v9: g, v10: _, v11: v, v12: y, v13: b, v14: x, v15: S } = ui(pi, 0, r, 7, e[0], e[1], e[2], e[3], e[4], e[5], e[6], e[7], fi[0], fi[1], fi[2], fi[3], o, a, t, n);
3094
- i[0] = s ^ h, i[1] = c ^ g, i[2] = l ^ _, i[3] = u ^ v, i[4] = d ^ y, i[5] = f ^ b, i[6] = p ^ x, i[7] = m ^ S, i[8] = e[0] ^ h, i[9] = e[1] ^ g, i[10] = e[2] ^ _, i[11] = e[3] ^ v, i[12] = e[4] ^ y, i[13] = e[5] ^ b, i[14] = e[6] ^ x, i[15] = e[7] ^ S, q(r), q(i), this.posOut = 0;
3081
+ let { state: e, pos: t, flags: n, buffer32: r, bufferOut32: i } = this, { h: a, l: o } = ii(BigInt(this.chunkOut++));
3082
+ Xr(r);
3083
+ let { v0: s, v1: c, v2: l, v3: u, v4: d, v5: f, v6: p, v7: m, v8: h, v9: g, v10: _, v11: v, v12: y, v13: b, v14: x, v15: S } = ci(di, 0, r, 7, e[0], e[1], e[2], e[3], e[4], e[5], e[6], e[7], ui[0], ui[1], ui[2], ui[3], o, a, t, n);
3084
+ i[0] = s ^ h, i[1] = c ^ g, i[2] = l ^ _, i[3] = u ^ v, i[4] = d ^ y, i[5] = f ^ b, i[6] = p ^ x, i[7] = m ^ S, i[8] = e[0] ^ h, i[9] = e[1] ^ g, i[10] = e[2] ^ _, i[11] = e[3] ^ v, i[12] = e[4] ^ y, i[13] = e[5] ^ b, i[14] = e[6] ^ x, i[15] = e[7] ^ S, Xr(r), Xr(i), this.posOut = 0;
3095
3085
  }
3096
3086
  finish() {
3097
3087
  if (this.finished) return;
3098
- this.finished = !0, qr(this.buffer.subarray(this.pos));
3099
- let e = this.flags | di.ROOT;
3100
- this.stack.length ? (e |= di.PARENT, q(this.buffer32), this.compress(this.buffer32, 0, !0), q(this.buffer32), this.chunksDone = 0, this.pos = this.blockLen) : e |= (this.chunkPos ? 0 : di.CHUNK_START) | di.CHUNK_END, this.flags = e, this.b2CompressOut();
3088
+ this.finished = !0, Wr(this.buffer.subarray(this.pos));
3089
+ let e = this.flags | li.ROOT;
3090
+ this.stack.length ? (e |= li.PARENT, Xr(this.buffer32), this.compress(this.buffer32, 0, !0), Xr(this.buffer32), this.chunksDone = 0, this.pos = this.blockLen) : e |= (this.chunkPos ? 0 : li.CHUNK_START) | li.CHUNK_END, this.flags = e, this.b2CompressOut();
3101
3091
  }
3102
3092
  writeInto(e) {
3103
- Ur(this, !1), Vr(e), this.finish();
3093
+ Br(this, !1), Rr(e), this.finish();
3104
3094
  let { blockLen: t, bufferOut: n } = this;
3105
3095
  for (let r = 0, i = e.length; r < i;) {
3106
3096
  this.posOut >= t && this.b2CompressOut();
@@ -3114,17 +3104,27 @@ var di = {
3114
3104
  return this.writeInto(e);
3115
3105
  }
3116
3106
  xof(e) {
3117
- return Br(e), this.xofInto(new Uint8Array(e));
3107
+ return Lr(e), this.xofInto(new Uint8Array(e));
3118
3108
  }
3119
3109
  digestInto(e) {
3120
- if (Wr(e, this), this.finished) throw Error("digest() was already called");
3110
+ if (Vr(e, this), this.finished) throw Error("digest() was already called");
3121
3111
  this.enableXOF = !1, this.writeInto(e.subarray(0, this.outputLen)), this.destroy();
3122
3112
  }
3123
3113
  digest() {
3124
3114
  let e = new Uint8Array(this.outputLen);
3125
3115
  return this.digestInto(e), e;
3126
3116
  }
3127
- }, hi = /* @__PURE__ */ ni((e = {}) => new mi(e)), gi = ArrayBuffer, J = Uint8Array, _i = Uint16Array, vi = Int16Array, yi = Int32Array, bi = function(e, t, n) {
3117
+ }, pi = /* @__PURE__ */ ei((e = {}) => new fi(e)), mi = (e, t) => ((e.Flags[t >> 3] ?? 0) >> (t & 7) & 1) == 1, hi = class {
3118
+ constructor() {
3119
+ this.bytes = [], this.bits = 0;
3120
+ }
3121
+ push(e) {
3122
+ this.bits >= this.bytes.length * 8 && this.bytes.push(0), e && (this.bytes[this.bits >> 3] |= 1 << (this.bits & 7)), this.bits += 1;
3123
+ }
3124
+ toValue() {
3125
+ return { Flags: this.bytes };
3126
+ }
3127
+ }, gi = ArrayBuffer, J = Uint8Array, _i = Uint16Array, vi = Int16Array, yi = Int32Array, bi = function(e, t, n) {
3128
3128
  if (J.prototype.slice) return J.prototype.slice.call(e, t, n);
3129
3129
  (t == null || t < 0) && (t = 0), (n == null || n > e.length) && (n = e.length);
3130
3130
  var r = new J(n - t);
@@ -3419,29 +3419,29 @@ var di = {
3419
3419
  j = (A -= E.b) >> 3;
3420
3420
  var ne = (e[j] | e[j + 1] << 8) >> (A & 7) & (1 << E.b) - 1;
3421
3421
  for (++y; --y;) {
3422
- var re = O.s[ee], ie = O.n[ee], ae = E.s[ne], oe = E.n[ne], se = D.s[te], ce = D.n[te];
3423
- j = (A -= se) >> 3;
3424
- var le = 1 << se, ue = le + ((e[j] | e[j + 1] << 8 | e[j + 2] << 16 | e[j + 3] << 24) >>> (A & 7) & le - 1);
3425
- j = (A -= Ii[ae]) >> 3;
3426
- var de = Li[ae] + ((e[j] | e[j + 1] << 8 | e[j + 2] << 16) >> (A & 7) & (1 << Ii[ae]) - 1);
3427
- j = (A -= Pi[re]) >> 3;
3428
- var fe = Fi[re] + ((e[j] | e[j + 1] << 8 | e[j + 2] << 16) >> (A & 7) & (1 << Pi[re]) - 1);
3429
- if (j = (A -= ie) >> 3, ee = O.t[ee] + ((e[j] | e[j + 1] << 8) >> (A & 7) & (1 << ie) - 1), j = (A -= oe) >> 3, ne = E.t[ne] + ((e[j] | e[j + 1] << 8) >> (A & 7) & (1 << oe) - 1), j = (A -= ce) >> 3, te = D.t[te] + ((e[j] | e[j + 1] << 8) >> (A & 7) & (1 << ce) - 1), ue > 3) t.o[2] = t.o[1], t.o[1] = t.o[0], t.o[0] = ue -= 3;
3422
+ var N = O.s[ee], re = O.n[ee], ie = E.s[ne], ae = E.n[ne], oe = D.s[te], se = D.n[te];
3423
+ j = (A -= oe) >> 3;
3424
+ var ce = 1 << oe, le = ce + ((e[j] | e[j + 1] << 8 | e[j + 2] << 16 | e[j + 3] << 24) >>> (A & 7) & ce - 1);
3425
+ j = (A -= Ii[ie]) >> 3;
3426
+ var ue = Li[ie] + ((e[j] | e[j + 1] << 8 | e[j + 2] << 16) >> (A & 7) & (1 << Ii[ie]) - 1);
3427
+ j = (A -= Pi[N]) >> 3;
3428
+ var de = Fi[N] + ((e[j] | e[j + 1] << 8 | e[j + 2] << 16) >> (A & 7) & (1 << Pi[N]) - 1);
3429
+ if (j = (A -= re) >> 3, ee = O.t[ee] + ((e[j] | e[j + 1] << 8) >> (A & 7) & (1 << re) - 1), j = (A -= ae) >> 3, ne = E.t[ne] + ((e[j] | e[j + 1] << 8) >> (A & 7) & (1 << ae) - 1), j = (A -= se) >> 3, te = D.t[te] + ((e[j] | e[j + 1] << 8) >> (A & 7) & (1 << se) - 1), le > 3) t.o[2] = t.o[1], t.o[1] = t.o[0], t.o[0] = le -= 3;
3430
3430
  else {
3431
- var pe = ue - (fe != 0);
3432
- pe ? (ue = pe == 3 ? t.o[0] - 1 : t.o[pe], pe > 1 && (t.o[2] = t.o[1]), t.o[1] = t.o[0], t.o[0] = ue) : ue = t.o[0];
3431
+ var fe = le - (de != 0);
3432
+ fe ? (le = fe == 3 ? t.o[0] - 1 : t.o[fe], fe > 1 && (t.o[2] = t.o[1]), t.o[1] = t.o[0], t.o[0] = le) : le = t.o[0];
3433
3433
  }
3434
- for (var S = 0; S < fe; ++S) h[M + S] = h[g + S];
3435
- M += fe, g += fe;
3436
- var me = M - ue;
3437
- if (me < 0) {
3438
- var he = -me, N = t.e + me;
3439
- he > de && (he = de);
3440
- for (var S = 0; S < he; ++S) h[M + S] = t.w[N + S];
3441
- M += he, de -= he, me = 0;
3434
+ for (var S = 0; S < de; ++S) h[M + S] = h[g + S];
3435
+ M += de, g += de;
3436
+ var pe = M - le;
3437
+ if (pe < 0) {
3438
+ var me = -pe, P = t.e + pe;
3439
+ me > ue && (me = ue);
3440
+ for (var S = 0; S < me; ++S) h[M + S] = t.w[P + S];
3441
+ M += me, ue -= me, pe = 0;
3442
3442
  }
3443
- for (var S = 0; S < de; ++S) h[M + S] = h[me + S];
3444
- M += de;
3443
+ for (var S = 0; S < ue; ++S) h[M + S] = h[pe + S];
3444
+ M += ue;
3445
3445
  }
3446
3446
  if (M != g) for (; g < h.length;) h[M++] = h[g++];
3447
3447
  else M = h.length;
@@ -3680,7 +3680,7 @@ function Gi(e, t = {}) {
3680
3680
  let e = g.content, n;
3681
3681
  if (e.length === 0) n = -1;
3682
3682
  else {
3683
- let r = hi(e), i = ti(r), a = p.get(i);
3683
+ let r = pi(e), i = $r(r), a = p.get(i);
3684
3684
  if (a !== void 0) n = a;
3685
3685
  else {
3686
3686
  n = d.length, p.set(i, n), d.push(r), l.push(e.length);
@@ -3711,7 +3711,7 @@ function Gi(e, t = {}) {
3711
3711
  66,
3712
3712
  82,
3713
3713
  90
3714
- ]), y.u8(0), y.u8(0), y.i32le(v.length), y.i32le(v.length), y.bytes(hi(v)), y.bytes(v);
3714
+ ]), y.u8(0), y.u8(0), y.i32le(v.length), y.i32le(v.length), y.bytes(pi(v)), y.bytes(v);
3715
3715
  for (let e of f) y.bytes(e);
3716
3716
  return y.toBytes();
3717
3717
  }
@@ -3733,7 +3733,7 @@ var Ki = class e {
3733
3733
  let c = n.bytes(32), l;
3734
3734
  if (a === 0) l = n.bytes(o);
3735
3735
  else if (l = Hi(n.bytes(s), new Uint8Array(o)), l.length !== o) throw Error("brdb: index decompressed to the wrong size");
3736
- if (ti(hi(l)) !== ti(c)) throw Error("brdb: index hash mismatch");
3736
+ if ($r(pi(l)) !== $r(c)) throw Error("brdb: index hash mismatch");
3737
3737
  let u = n.bytes(n.remaining), d = new Wi(l), f = d.i32le(), p = d.i32le(), m = d.i32le();
3738
3738
  if (f < 0 || p < 0 || m < 0) throw Error("brdb: negative index count");
3739
3739
  let h = (e, t) => Array.from({ length: e }, t), g = h(f, () => d.i32le()), _ = h(f, () => d.u16le()), v = new TextDecoder("utf-8", { fatal: !0 }), y = _.map((e) => v.decode(d.bytes(e))), b = h(p, () => d.i32le()), x = h(p, () => d.i32le()), S = h(p, () => d.u16le()).map((e) => v.decode(d.bytes(e))), C = h(m, () => d.u8()), w = h(m, () => d.i32le()), T = h(m, () => d.i32le()), E = h(m, () => d.bytes(32).slice());
@@ -3799,7 +3799,7 @@ var Ki = class e {
3799
3799
  r = Hi(n, new Uint8Array(t.sizeUncompressed));
3800
3800
  }
3801
3801
  if (r.length !== t.sizeUncompressed) throw Error("brdb: blob uncompressed size mismatch");
3802
- if (ti(hi(r)) !== ti(t.hash)) throw Error("brdb: blob hash mismatch");
3802
+ if ($r(pi(r)) !== $r(t.hash)) throw Error("brdb: blob hash mismatch");
3803
3803
  return r;
3804
3804
  }
3805
3805
  readFile(e) {
@@ -3839,7 +3839,7 @@ var Ki = class e {
3839
3839
  return r === -1 ? t : `${e[r]}/${t}`;
3840
3840
  }), this.pathCache;
3841
3841
  }
3842
- }, qi = /* @__PURE__ */ "B_1x1_Reroute_Node.B_1x1_Gate_AND.B_1x1_Gate_OR.B_1x1_Gate_XOR.B_1x1_Gate_NAND.B_1x1_Gate_NOR.B_1x1_NOT_Gate.B_1x1_Gate_AND_Bitwise.B_1x1_Gate_OR_Bitwise.B_1x1_Gate_XOR_Bitwise.B_1x1_Gate_NAND_Bitwise.B_1x1_Gate_NOR_Bitwise.B_1x1_Gate_NOT_Bitwise.B_1x1_Gate_ShiftLeft_Bitwise.B_1x1_Gate_ShiftRight_Bitwise.B_1x1_Gate_Add.B_1x1_Gate_Subtract.B_1x1_Gate_Multiply.B_1x1_Gate_ModFloored.B_1x1_Gate_Mod.B_1x1_Gate_Divide.B_1x1_Gate_Equal.B_1x1_Gate_NotEqual.B_1x1_Gate_LessThan.B_1x1_Gate_LessThanEqual.B_1x1_Gate_GreaterThan.B_1x1_Gate_GreaterThanEqual.B_1x1_Gate_Ceiling.B_1x1_Gate_Floor.B_1x1_Gate_Constant.B_1x1_Gate_Blend.B_1x1_Gate_EdgeDetector.B_1x1_Gate_Timer.B_1x1_Gate_Timer_Tick.B_1x1_Microchip.B_1x1_Gate_MicrochipInput.B_1x1_Gate_MicrochipOutput.B_2x2_Overhang.B_1x4_Brick_Side.B_1x2_Overhang.B_1x1_Brick_Side_Lip.B_1x1_Brick_Side.B_Jar.B_Chalice.B_Cauldron.B_Small_Flower.B_Pine_Tree.B_Leaf_Bush.B_Hedge_1x4.B_Hedge_1x2.B_Hedge_1x1_Corner.B_Hedge_1x1.B_Flower.B_Fern.B_Branch.B_2x4_Door_Frame.B_Turkey_Leg.B_Turkey_Body.B_Swirl_Plate.B_Sausage.B_Pumpkin_Carved.B_Pumpkin.B_Ladder.B_Inverted_Cone.B_Handle.B_Gravestone.B_Frog_Small.B_Frog.B_Flame.B_Coffin_Lid.B_Coffin.B_BoneStraight.B_Bone.B_1x1_Coin_Diagonal.B_1x1_Coin.B_Spoon.B_Fork.B_2x2_Corner.B_2x2f_Plate_Center_Inv.B_2x2f_Plate_Center.B_1x2f_Plate_Center_Inv.B_4x4_Round.B_2x2_Round.B_2x2F_Round.B_2x_Octo_T_Inv.B_2x_Octo_T.B_2x2F_Octo_Converter_Inv.B_2x2F_Octo_Converter.B_2x2F_Octo.B_8x8_Lattice_Plate.B_1x2_MetalIngot.B_1x1f_Tile_Corner.B_1x1f_Inverse_Tile_Corner.B_Rook.B_Queen.B_Pawn.B_Knight.B_King.B_Bishop.B_1x2f_Plate_Center.B_2x2_Cone.B_1x1_Round.B_1x1_Cone.B_1x1F_Round.B_2x_Octo_Cone.B_2x_Octo_90Deg_Inv.B_2x_Octo_90Deg.B_2x_Octo.B_1x_Octo_T_Inv.B_1x_Octo_T.B_1x_Octo_90Deg_Inv.B_1x_Octo_90Deg.B_1x_Octo.B_1x1F_Octo.B_2x2_Slipper.B_2x1_Slipper.B_Joint_Wheel_Micro.B_Joint_Wheel.B_Joint_Socket_Micro.B_Joint_Servo_Micro.B_Joint_Servo.B_Joint_Motor_Micro.B_Joint_Motor.B_Joint_Coupler.B_Joint_Bearing_Micro.B_Joint_Bearing.B_1x1_SoundEmitter.B_1x1_Gate_Teleport.B_1x1_Gate_RelativeTeleport.B_1x1_EntityGate_SetVelocity.B_1x1_EntityGate_SetLocationAndRotation.B_1x1_EntityGate_SetLocation.B_1x1_EntityGate_ReadBrickGrid.B_1x1_EntityGate_PlayAudioAt.B_1x1_EntityGate_AddVelocity.B_1x1_EntityGate_AddLocationAndRotation.B_1x1_CharacterGate_SetGravityDirection.B_Vehicle_Engine.B_Switch_Test.B_SpawnPoint.B_Seat.B_GoalPoint.B_DestinationPoint.B_CheckPoint.B_Button_Square.B_Button.B_Bot_Spawn_Point.B_2x2F_Target.B_2x2F_Speaker.B_1x1_Gate_WheelEngineSlim.B_1x1F_Speaker.B_1x1_Gate_AudioReference.B_1x1_Gate_BrickAssetReference.B_1x1_Gate_Clock.B_1x1_Gate_DeltaTime.B_1x1_Gate_EntityTypeReference.B_1x1_Gate_Exec_ArrayVar_Append.B_1x1_Gate_Exec_ArrayVar_Average.B_1x1_Gate_Exec_ArrayVar_Clear.B_1x1_Gate_Exec_ArrayVar_CopyFrom.B_1x1_Gate_Exec_ArrayVar_Fill.B_1x1_Gate_Exec_ArrayVar_Find.B_1x1_Gate_Exec_ArrayVar_Get.B_1x1_Gate_Exec_ArrayVar_GetLength.B_1x1_Gate_Exec_ArrayVar_Insert.B_1x1_Gate_Exec_ArrayVar_Max.B_1x1_Gate_Exec_ArrayVar_Min.B_1x1_Gate_Exec_ArrayVar_Pop.B_1x1_Gate_Exec_ArrayVar_Push.B_1x1_Gate_Exec_ArrayVar_RemoveAtIndex.B_1x1_Gate_Exec_ArrayVar_Resize.B_1x1_Gate_Exec_ArrayVar_Reverse.B_1x1_Gate_Exec_ArrayVar_SetAtIndex.B_1x1_Gate_Exec_ArrayVar_Shuffle.B_1x1_Gate_Exec_ArrayVar_Slice.B_1x1_Gate_Exec_ArrayVar_Sort.B_1x1_Gate_Exec_ArrayVar_Sum.B_1x1_Gate_Exec_ArrayVar_Swap.B_1x1_Gate_Exec_Branch.B_1x1_Gate_Exec_Character_AddInventoryBrick.B_1x1_Gate_Exec_Character_AddInventoryEntity.B_1x1_Gate_Exec_Character_AddInventoryEntry.B_1x1_Gate_Exec_Character_AddInventoryItem.B_1x1_Gate_Exec_Character_AddInventoryItemAdv.B_1x1_Gate_Exec_Character_GetAim.B_1x1_Gate_Exec_Character_GetDamage.B_1x1_Gate_Exec_Character_GetFromController.B_1x1_Gate_Exec_Character_IncDamage.B_1x1_Gate_Exec_Character_SetDamage.B_1x1_Gate_Exec_Character_SetInventoryBrick.B_1x1_Gate_Exec_Character_SetInventoryEntity.B_1x1_Gate_Exec_Character_SetInventoryEntry.B_1x1_Gate_Exec_Character_SetInventoryItem.B_1x1_Gate_Exec_Character_SetInventoryItemAdv.B_1x1_Gate_Exec_Character_SetTempPermission.B_1x1_Gate_Exec_Character_ShowHint.B_1x1_Gate_Exec_ChatCommand.B_1x1_Gate_Exec_Controller_DisplayText.B_1x1_Gate_Exec_Controller_GetDisplayName.B_1x1_Gate_Exec_Controller_GetFromEntity.B_1x1_Gate_Exec_Controller_GetUserId.B_1x1_Gate_Exec_Controller_GetUserName.B_1x1_Gate_Exec_Controller_HasPermission.B_1x1_Gate_Exec_Controller_HasRole.B_1x1_Gate_Exec_Controller_IsTrustedByBrickOwner.B_1x1_Gate_Exec_Controller_SetCanRespawn.B_1x1_Gate_Exec_Controller_ShowChatMessage.B_1x1_Gate_Exec_Controller_ShowMessageBox.B_1x1_Gate_Exec_Controller_ShowStatusMessage.B_1x1_Gate_Exec_Cycle.B_1x1_Gate_Exec_Entity_AddLocationRotation.B_1x1_Gate_Exec_Entity_AddVelocity.B_1x1_Gate_Exec_Entity_GetAngularVelocity.B_1x1_Gate_Exec_Entity_GetLinearVelocity.B_1x1_Gate_Exec_Entity_GetLocation.B_1x1_Gate_Exec_Entity_GetLocationRotation.B_1x1_Gate_Exec_Entity_GetRotation.B_1x1_Gate_Exec_Entity_GetTag.B_1x1_Gate_Exec_Entity_GetVelocity.B_1x1_Gate_Exec_Entity_PlayAudioAt.B_1x1_Gate_Exec_Entity_RelativeTeleport.B_1x1_Gate_Exec_Entity_SetAngularVelocity.B_1x1_Gate_Exec_Entity_SetFrozen.B_1x1_Gate_Exec_Entity_SetGravityDirection.B_1x1_Gate_Exec_Entity_SetLinearVelocity.B_1x1_Gate_Exec_Entity_SetLocation.B_1x1_Gate_Exec_Entity_SetLocationRotation.B_1x1_Gate_Exec_Entity_SetRotation.B_1x1_Gate_Exec_Entity_SetTag.B_1x1_Gate_Exec_Entity_SetVelocity.B_1x1_Gate_Exec_Entity_Teleport.B_1x1_Gate_Exec_Gamemode_BroadcastChatMessage.B_1x1_Gate_Exec_Gamemode_BroadcastStatusMessage.B_1x1_Gate_Exec_Gamemode_FillArrayFromPlayers.B_1x1_Gate_Exec_Gamemode_FillArrayFromTeamMembers.B_1x1_Gate_Exec_Gamemode_GetCurrentRound.B_1x1_Gate_Exec_Gamemode_GetLeaderboardValue.B_1x1_Gate_Exec_Gamemode_GetTeam.B_1x1_Gate_Exec_Gamemode_GetTeamByName.B_1x1_Gate_Exec_Gamemode_GetTeamLeaderboardValue.B_1x1_Gate_Exec_Gamemode_GetTeamName.B_1x1_Gate_Exec_Gamemode_IncrementLeaderboardValue.B_1x1_Gate_Exec_Gamemode_IncrementTeamLeaderboardValue.B_1x1_Gate_Exec_Gamemode_PlayerWins.B_1x1_Gate_Exec_Gamemode_SetLeaderboardValue.B_1x1_Gate_Exec_Gamemode_SetTeam.B_1x1_Gate_Exec_Gamemode_SetTeamLeaderboardValue.B_1x1_Gate_Exec_Gamemode_SetTeamPinned.B_1x1_Gate_Exec_Gamemode_TeamWins.B_1x1_Gate_Exec_PlayGlobalAudio.B_1x1_Gate_Exec_PrefabSpawner.B_1x1_Gate_Exec_PrintToConsole.B_1x1_Gate_Exec_Random.B_1x1_Gate_Exec_Sweep.B_1x1_Gate_Exec_Toggle.B_1x1_Gate_Exec_Union.B_1x1_Gate_Exec_Var_Get.B_1x1_Gate_Exec_Var_Increment.B_1x1_Gate_Exec_Var_Set.B_1x1_Gate_Expr_BitwiseAND.B_1x1_Gate_Expr_BitwiseBitCount.B_1x1_Gate_Expr_BitwiseNAND.B_1x1_Gate_Expr_BitwiseNOR.B_1x1_Gate_Expr_BitwiseNOT.B_1x1_Gate_Expr_BitwiseOR.B_1x1_Gate_Expr_BitwiseShiftLeft.B_1x1_Gate_Expr_BitwiseShiftRight.B_1x1_Gate_Expr_BitwiseXOR.B_1x1_Gate_Expr_Ceil.B_1x1_Gate_Expr_ChangeDetector.B_1x1_Gate_Expr_ColorBlend.B_1x1_Gate_Expr_ColorConvert.B_1x1_Gate_Expr_ColorToHex.B_1x1_Gate_Expr_CompareEqual.B_1x1_Gate_Expr_CompareGreater.B_1x1_Gate_Expr_CompareGreaterOrEqual.B_1x1_Gate_Expr_CompareLess.B_1x1_Gate_Expr_CompareLessOrEqual.B_1x1_Gate_Expr_CompareNotEqual.B_1x1_Gate_Expr_Convert.B_1x1_Gate_Expr_DirectionToRotation.B_1x1_Gate_Expr_EdgeDetector.B_1x1_Gate_Expr_Floor.B_1x1_Gate_Expr_InvertRotation.B_1x1_Gate_Expr_LogicalAND.B_1x1_Gate_Expr_LogicalNAND.B_1x1_Gate_Expr_LogicalNOR.B_1x1_Gate_Expr_LogicalNOT.B_1x1_Gate_Expr_LogicalOR.B_1x1_Gate_Expr_LogicalXOR.B_1x1_Gate_Expr_MakeColor.B_1x1_Gate_Expr_MakeColorHex.B_1x1_Gate_Expr_MakeColorSRGB.B_1x1_Gate_Expr_MakeQuaternion.B_1x1_Gate_Expr_MakeRotation.B_1x1_Gate_Expr_MakeVector.B_1x1_Gate_Expr_MathAbs.B_1x1_Gate_Expr_MathAcos.B_1x1_Gate_Expr_MathAcosh.B_1x1_Gate_Expr_MathAdd.B_1x1_Gate_Expr_MathAsin.B_1x1_Gate_Expr_MathAsinh.B_1x1_Gate_Expr_MathAtan.B_1x1_Gate_Expr_MathAtan2.B_1x1_Gate_Expr_MathAtanh.B_1x1_Gate_Expr_MathBlend.B_1x1_Gate_Expr_MathClamp.B_1x1_Gate_Expr_MathCos.B_1x1_Gate_Expr_MathCosh.B_1x1_Gate_Expr_MathDegreesToRadians.B_1x1_Gate_Expr_MathDivide.B_1x1_Gate_Expr_MathEasing.B_1x1_Gate_Expr_MathExp.B_1x1_Gate_Expr_MathLn.B_1x1_Gate_Expr_MathLogBase.B_1x1_Gate_Expr_MathMax.B_1x1_Gate_Expr_MathMin.B_1x1_Gate_Expr_MathModulo.B_1x1_Gate_Expr_MathModuloFloored.B_1x1_Gate_Expr_MathMultiply.B_1x1_Gate_Expr_MathNegate.B_1x1_Gate_Expr_MathPow.B_1x1_Gate_Expr_MathRadiansToDegrees.B_1x1_Gate_Expr_MathSign.B_1x1_Gate_Expr_MathSin.B_1x1_Gate_Expr_MathSinh.B_1x1_Gate_Expr_MathSqrt.B_1x1_Gate_Expr_MathSubtract.B_1x1_Gate_Expr_MathTan.B_1x1_Gate_Expr_MathTanh.B_1x1_Gate_Expr_NearlyEqual.B_1x1_Gate_Expr_QuatAngleBetween.B_1x1_Gate_Expr_QuatBetween.B_1x1_Gate_Expr_QuatDotProduct.B_1x1_Gate_Expr_QuatFromAxisAngle.B_1x1_Gate_Expr_QuatSlerp.B_1x1_Gate_Expr_QuatToAxisAngle.B_1x1_Gate_Expr_RotateVector.B_1x1_Gate_Expr_RotationToDirection.B_1x1_Gate_Expr_Round.B_1x1_Gate_Expr_Select.B_1x1_Gate_Expr_SplitColor.B_1x1_Gate_Expr_SplitColorSRGB.B_1x1_Gate_Expr_SplitQuaternion.B_1x1_Gate_Expr_SplitRotation.B_1x1_Gate_Expr_SplitVector.B_1x1_Gate_Expr_String_Concatenate.B_1x1_Gate_Expr_String_Contains.B_1x1_Gate_Expr_String_EndsWith.B_1x1_Gate_Expr_String_Find.B_1x1_Gate_Expr_String_FormatText.B_1x1_Gate_Expr_String_Length.B_1x1_Gate_Expr_String_ParseInt.B_1x1_Gate_Expr_String_ParseNumber.B_1x1_Gate_Expr_String_Replace.B_1x1_Gate_Expr_String_Split.B_1x1_Gate_Expr_String_StartsWith.B_1x1_Gate_Expr_String_Substring.B_1x1_Gate_Expr_String_ToLower.B_1x1_Gate_Expr_String_ToUpper.B_1x1_Gate_Expr_String_Trim.B_1x1_Gate_Expr_Swap.B_1x1_Gate_Expr_VecCrossProduct.B_1x1_Gate_Expr_VecDistance.B_1x1_Gate_Expr_VecDistanceSquared.B_1x1_Gate_Expr_VecDotProduct.B_1x1_Gate_Expr_VecMagnitude.B_1x1_Gate_Expr_VecMagnitudeSquared.B_1x1_Gate_Expr_VecNormalize.B_1x1_Gate_Expr_VecScale.B_1x1_Gate_Fake_Gamemode_CharacterDamagedEvent.B_1x1_Gate_Fake_Gamemode_CharacterDiedEvent.B_1x1_Gate_Fake_Gamemode_CharacterSpawnedEvent.B_1x1_Gate_Fake_Gamemode_ControllerJoinedEvent.B_1x1_Gate_Fake_Gamemode_ControllerLeftEvent.B_1x1_Gate_Fake_Gamemode_RoundEndEvent.B_1x1_Gate_Fake_Gamemode_RoundStartEvent.B_1x1_Gate_FindPlayer.B_1x1_Gate_FontReference.B_1x1_Gate_Internal_CharacterZoneEvent_Entered.B_1x1_Gate_Internal_CharacterZoneEvent_Left.B_1x1_Gate_Internal_EntityZoneEvent_Entered.B_1x1_Gate_Internal_EntityZoneEvent_Left.B_1x1_Gate_Internal_ProjectileZoneEvent_Entered.B_1x1_Gate_Internal_ProjectileZoneEvent_Left.B_1x1_Gate_Internal_ReadBrickGrid.B_1x1_Gate_Internal_ZoneEvent_BrickChanged.B_1x1_Gate_Internal_ZoneEvent_BrickRemoved.B_1x1_Gate_ItemReference.B_1x1_Gate_OneShotAudioReference.B_1x1_Gate_PickupReference.B_1x1_Gate_ProjectileReference.B_1x1_Gate_Pseudo_BufferSeconds.B_1x1_Gate_Pseudo_BufferTicks.B_1x1_Gate_Pseudo_Dampen.B_1x1_Gate_Pseudo_QueueSeconds.B_1x1_Gate_Pseudo_QueueTicks.B_1x1_Gate_Pseudo_Timer.B_1x1_Gate_Pseudo_Tween.B_1x1_Gate_SeatControlSplitter.B_1x1_Gate_ServerUptime.B_1x1_Gate_Variable.B_1x1_Gate_Variable_Array.B_1x1_Gate_WeightBrick.B_1x1_Gate_WheelEngineAudioReference.B_2x2_Cannon.B_2x2_Thruster.B_Bush.B_Button_Pressed.B_Button_Square_Pressed.B_Gyroscope.B_Joint_RigidBearing.B_Joint_RigidBearing_Micro.B_Joint_Socket.B_Joint_Wheel_Micro_Suspension.B_Joint_Wheel_Suspension.B_Switch_Flipped".split("."), Ji = /* @__PURE__ */ "PB_DefaultBrick.PB_DefaultStudded.PB_DefaultRampInnerCornerInverted.PB_DefaultRampCrestEnd.PB_DefaultRampCrestCorner.PB_DefaultRampCrest.PB_DefaultRamp.PB_PicketFence.BP_LatticeThin.PB_DefaultWedge.PB_DefaultTile.PB_DefaultSmoothTile.PB_DefaultSideWedge.PB_DefaultRampInverted.PB_DefaultRampInnerCorner.PB_DefaultRampCornerInverted.PB_DefaultRampCorner.PB_DefaultPole.PB_DefaultMicroWedgeTriangleCorner.PB_DefaultMicroWedgeOuterCorner.PB_DefaultMicroWedgeInnerCorner.PB_DefaultMicroWedgeHalfOuterCorner.PB_DefaultMicroWedgeHalfInnerCornerInverted.PB_DefaultMicroWedgeHalfInnerCorner.PB_DefaultMicroWedgeCorner.PB_DefaultMicroWedge.PB_DefaultMicroRamp.PB_DefaultMicroBrick.PB_DefaultArch.BP_SquarePlate.BP_SpikePlate.PB_Spike.PB_SliderJoint.PB_ServoSliderJoint.PB_MotorSliderJoint.BP_RoundPlate.PB_RoundedCap.PB_Baguette".split("."), Yi = {
3842
+ }, qi = /* @__PURE__ */ "B_1x1_Reroute_Node.B_1x1_Gate_AND.B_1x1_Gate_OR.B_1x1_Gate_XOR.B_1x1_Gate_NAND.B_1x1_Gate_NOR.B_1x1_NOT_Gate.B_1x1_Gate_AND_Bitwise.B_1x1_Gate_OR_Bitwise.B_1x1_Gate_XOR_Bitwise.B_1x1_Gate_NAND_Bitwise.B_1x1_Gate_NOR_Bitwise.B_1x1_Gate_NOT_Bitwise.B_1x1_Gate_ShiftLeft_Bitwise.B_1x1_Gate_ShiftRight_Bitwise.B_1x1_Gate_Add.B_1x1_Gate_Subtract.B_1x1_Gate_Multiply.B_1x1_Gate_ModFloored.B_1x1_Gate_Mod.B_1x1_Gate_Divide.B_1x1_Gate_Equal.B_1x1_Gate_NotEqual.B_1x1_Gate_LessThan.B_1x1_Gate_LessThanEqual.B_1x1_Gate_GreaterThan.B_1x1_Gate_GreaterThanEqual.B_1x1_Gate_Ceiling.B_1x1_Gate_Floor.B_1x1_Gate_Constant.B_1x1_Gate_Blend.B_1x1_Gate_EdgeDetector.B_1x1_Gate_Timer.B_1x1_Gate_Timer_Tick.B_1x1_Microchip.B_1x1_Gate_MicrochipInput.B_1x1_Gate_MicrochipOutput.B_2x2_Overhang.B_1x4_Brick_Side.B_1x2_Overhang.B_1x1_Brick_Side_Lip.B_1x1_Brick_Side.B_Jar.B_Chalice.B_Cauldron.B_Small_Flower.B_Pine_Tree.B_Leaf_Bush.B_Hedge_1x4.B_Hedge_1x2.B_Hedge_1x1_Corner.B_Hedge_1x1.B_Flower.B_Fern.B_Branch.B_2x4_Door_Frame.B_Turkey_Leg.B_Turkey_Body.B_Swirl_Plate.B_Sausage.B_Pumpkin_Carved.B_Pumpkin.B_Ladder.B_Inverted_Cone.B_Handle.B_Gravestone.B_Frog_Small.B_Frog.B_Flame.B_Coffin_Lid.B_Coffin.B_BoneStraight.B_Bone.B_1x1_Coin_Diagonal.B_1x1_Coin.B_Spoon.B_Fork.B_2x2_Corner.B_2x2f_Plate_Center_Inv.B_2x2f_Plate_Center.B_1x2f_Plate_Center_Inv.B_4x4_Round.B_2x2_Round.B_2x2F_Round.B_2x_Octo_T_Inv.B_2x_Octo_T.B_2x2F_Octo_Converter_Inv.B_2x2F_Octo_Converter.B_2x2F_Octo.B_8x8_Lattice_Plate.B_1x2_MetalIngot.B_1x1f_Tile_Corner.B_1x1f_Inverse_Tile_Corner.B_Rook.B_Queen.B_Pawn.B_Knight.B_King.B_Bishop.B_1x2f_Plate_Center.B_2x2_Cone.B_1x1_Round.B_1x1_Cone.B_1x1F_Round.B_2x_Octo_Cone.B_2x_Octo_90Deg_Inv.B_2x_Octo_90Deg.B_2x_Octo.B_1x_Octo_T_Inv.B_1x_Octo_T.B_1x_Octo_90Deg_Inv.B_1x_Octo_90Deg.B_1x_Octo.B_1x1F_Octo.B_2x2_Slipper.B_2x1_Slipper.B_Joint_Wheel_Micro.B_Joint_Wheel.B_Joint_Socket_Micro.B_Joint_Servo_Micro.B_Joint_Servo.B_Joint_Motor_Micro.B_Joint_Motor.B_Joint_Coupler.B_Joint_Bearing_Micro.B_Joint_Bearing.B_1x1_SoundEmitter.B_1x1_Gate_Teleport.B_1x1_Gate_RelativeTeleport.B_1x1_EntityGate_SetVelocity.B_1x1_EntityGate_SetLocationAndRotation.B_1x1_EntityGate_SetLocation.B_1x1_EntityGate_ReadBrickGrid.B_1x1_EntityGate_PlayAudioAt.B_1x1_EntityGate_AddVelocity.B_1x1_EntityGate_AddLocationAndRotation.B_1x1_CharacterGate_SetGravityDirection.B_Vehicle_Engine.B_Switch_Test.B_SpawnPoint.B_Seat.B_GoalPoint.B_DestinationPoint.B_CheckPoint.B_Button_Square.B_Button.B_Bot_Spawn_Point.B_2x2F_Target.B_2x2F_Speaker.B_1x1_Gate_WheelEngineSlim.B_1x1F_Speaker.B_1x1_Gate_AudioReference.B_1x1_Gate_BrickAssetReference.B_1x1_Gate_Clock.B_1x1_Gate_DeltaTime.B_1x1_Gate_EntityTypeReference.B_1x1_Gate_Exec_ArrayVar_Append.B_1x1_Gate_Exec_ArrayVar_Average.B_1x1_Gate_Exec_ArrayVar_Clear.B_1x1_Gate_Exec_ArrayVar_CopyFrom.B_1x1_Gate_Exec_ArrayVar_Fill.B_1x1_Gate_Exec_ArrayVar_Find.B_1x1_Gate_Exec_ArrayVar_Get.B_1x1_Gate_Exec_ArrayVar_GetLength.B_1x1_Gate_Exec_ArrayVar_Insert.B_1x1_Gate_Exec_ArrayVar_Max.B_1x1_Gate_Exec_ArrayVar_Min.B_1x1_Gate_Exec_ArrayVar_Pop.B_1x1_Gate_Exec_ArrayVar_Push.B_1x1_Gate_Exec_ArrayVar_RemoveAtIndex.B_1x1_Gate_Exec_ArrayVar_Resize.B_1x1_Gate_Exec_ArrayVar_Reverse.B_1x1_Gate_Exec_ArrayVar_SetAtIndex.B_1x1_Gate_Exec_ArrayVar_Shuffle.B_1x1_Gate_Exec_ArrayVar_Slice.B_1x1_Gate_Exec_ArrayVar_Sort.B_1x1_Gate_Exec_ArrayVar_Sum.B_1x1_Gate_Exec_ArrayVar_Swap.B_1x1_Gate_Exec_Branch.B_1x1_Gate_Exec_Character_AddInventoryBrick.B_1x1_Gate_Exec_Character_AddInventoryEntity.B_1x1_Gate_Exec_Character_AddInventoryEntry.B_1x1_Gate_Exec_Character_AddInventoryItem.B_1x1_Gate_Exec_Character_AddInventoryItemAdv.B_1x1_Gate_Exec_Character_GetAim.B_1x1_Gate_Exec_Character_GetDamage.B_1x1_Gate_Exec_Character_GetFromController.B_1x1_Gate_Exec_Character_IncDamage.B_1x1_Gate_Exec_Character_SetDamage.B_1x1_Gate_Exec_Character_SetInventoryBrick.B_1x1_Gate_Exec_Character_SetInventoryEntity.B_1x1_Gate_Exec_Character_SetInventoryEntry.B_1x1_Gate_Exec_Character_SetInventoryItem.B_1x1_Gate_Exec_Character_SetInventoryItemAdv.B_1x1_Gate_Exec_Character_SetTempPermission.B_1x1_Gate_Exec_Character_ShowHint.B_1x1_Gate_Exec_ChatCommand.B_1x1_Gate_Exec_Controller_DisplayText.B_1x1_Gate_Exec_Controller_GetDisplayName.B_1x1_Gate_Exec_Controller_GetFromEntity.B_1x1_Gate_Exec_Controller_GetUserId.B_1x1_Gate_Exec_Controller_GetUserName.B_1x1_Gate_Exec_Controller_HasPermission.B_1x1_Gate_Exec_Controller_HasRole.B_1x1_Gate_Exec_Controller_IsTrustedByBrickOwner.B_1x1_Gate_Exec_Controller_SetCanRespawn.B_1x1_Gate_Exec_Controller_ShowChatMessage.B_1x1_Gate_Exec_Controller_ShowMessageBox.B_1x1_Gate_Exec_Controller_ShowStatusMessage.B_1x1_Gate_Exec_Cycle.B_1x1_Gate_Exec_Entity_AddLocationRotation.B_1x1_Gate_Exec_Entity_AddVelocity.B_1x1_Gate_Exec_Entity_GetAngularVelocity.B_1x1_Gate_Exec_Entity_GetLinearVelocity.B_1x1_Gate_Exec_Entity_GetLocation.B_1x1_Gate_Exec_Entity_GetLocationRotation.B_1x1_Gate_Exec_Entity_GetRotation.B_1x1_Gate_Exec_Entity_GetTag.B_1x1_Gate_Exec_Entity_GetVelocity.B_1x1_Gate_Exec_Entity_PlayAudioAt.B_1x1_Gate_Exec_Entity_RelativeTeleport.B_1x1_Gate_Exec_Entity_SetAngularVelocity.B_1x1_Gate_Exec_Entity_SetFrozen.B_1x1_Gate_Exec_Entity_SetGravityDirection.B_1x1_Gate_Exec_Entity_SetLinearVelocity.B_1x1_Gate_Exec_Entity_SetLocation.B_1x1_Gate_Exec_Entity_SetLocationRotation.B_1x1_Gate_Exec_Entity_SetRotation.B_1x1_Gate_Exec_Entity_SetTag.B_1x1_Gate_Exec_Entity_SetVelocity.B_1x1_Gate_Exec_Entity_Teleport.B_1x1_Gate_Exec_Gamemode_BroadcastChatMessage.B_1x1_Gate_Exec_Gamemode_BroadcastStatusMessage.B_1x1_Gate_Exec_Gamemode_FillArrayFromPlayers.B_1x1_Gate_Exec_Gamemode_FillArrayFromTeamMembers.B_1x1_Gate_Exec_Gamemode_GetCurrentRound.B_1x1_Gate_Exec_Gamemode_GetLeaderboardValue.B_1x1_Gate_Exec_Gamemode_GetTeam.B_1x1_Gate_Exec_Gamemode_GetTeamByName.B_1x1_Gate_Exec_Gamemode_GetTeamLeaderboardValue.B_1x1_Gate_Exec_Gamemode_GetTeamName.B_1x1_Gate_Exec_Gamemode_IncrementLeaderboardValue.B_1x1_Gate_Exec_Gamemode_IncrementTeamLeaderboardValue.B_1x1_Gate_Exec_Gamemode_PlayerWins.B_1x1_Gate_Exec_Gamemode_SetLeaderboardValue.B_1x1_Gate_Exec_Gamemode_SetTeam.B_1x1_Gate_Exec_Gamemode_SetTeamLeaderboardValue.B_1x1_Gate_Exec_Gamemode_SetTeamPinned.B_1x1_Gate_Exec_Gamemode_TeamWins.B_1x1_Gate_Exec_PlayGlobalAudio.B_1x1_Gate_Exec_PrefabSpawner.B_1x1_Gate_Exec_PrintToConsole.B_1x1_Gate_Exec_Random.B_1x1_Gate_Exec_Sweep.B_1x1_Gate_Exec_Toggle.B_1x1_Gate_Exec_Union.B_1x1_Gate_Exec_Var_Get.B_1x1_Gate_Exec_Var_Increment.B_1x1_Gate_Exec_Var_Set.B_1x1_Gate_Expr_BitwiseAND.B_1x1_Gate_Expr_BitwiseBitCount.B_1x1_Gate_Expr_BitwiseNAND.B_1x1_Gate_Expr_BitwiseNOR.B_1x1_Gate_Expr_BitwiseNOT.B_1x1_Gate_Expr_BitwiseOR.B_1x1_Gate_Expr_BitwiseShiftLeft.B_1x1_Gate_Expr_BitwiseShiftRight.B_1x1_Gate_Expr_BitwiseXOR.B_1x1_Gate_Expr_Ceil.B_1x1_Gate_Expr_ChangeDetector.B_1x1_Gate_Expr_ChangeDetectorExec.B_1x1_Gate_Expr_ColorBlend.B_1x1_Gate_Expr_ColorConvert.B_1x1_Gate_Expr_ColorToHex.B_1x1_Gate_Expr_CompareEqual.B_1x1_Gate_Expr_CompareGreater.B_1x1_Gate_Expr_CompareGreaterOrEqual.B_1x1_Gate_Expr_CompareLess.B_1x1_Gate_Expr_CompareLessOrEqual.B_1x1_Gate_Expr_CompareNotEqual.B_1x1_Gate_Expr_Convert.B_1x1_Gate_Expr_DirectionToRotation.B_1x1_Gate_Expr_EdgeDetector.B_1x1_Gate_Expr_EdgeDetectorExec.B_1x1_Gate_Expr_Floor.B_1x1_Gate_Expr_InvertRotation.B_1x1_Gate_Expr_LogicalAND.B_1x1_Gate_Expr_LogicalNAND.B_1x1_Gate_Expr_LogicalNOR.B_1x1_Gate_Expr_LogicalNOT.B_1x1_Gate_Expr_LogicalOR.B_1x1_Gate_Expr_LogicalXOR.B_1x1_Gate_Expr_MakeColor.B_1x1_Gate_Expr_MakeColorHex.B_1x1_Gate_Expr_MakeColorSRGB.B_1x1_Gate_Expr_MakeQuaternion.B_1x1_Gate_Expr_MakeRotation.B_1x1_Gate_Expr_MakeVector.B_1x1_Gate_Expr_MathAbs.B_1x1_Gate_Expr_MathAcos.B_1x1_Gate_Expr_MathAcosh.B_1x1_Gate_Expr_MathAdd.B_1x1_Gate_Expr_MathAsin.B_1x1_Gate_Expr_MathAsinh.B_1x1_Gate_Expr_MathAtan.B_1x1_Gate_Expr_MathAtan2.B_1x1_Gate_Expr_MathAtanh.B_1x1_Gate_Expr_MathBlend.B_1x1_Gate_Expr_MathClamp.B_1x1_Gate_Expr_MathCos.B_1x1_Gate_Expr_MathCosh.B_1x1_Gate_Expr_MathDegreesToRadians.B_1x1_Gate_Expr_MathDivide.B_1x1_Gate_Expr_MathEasing.B_1x1_Gate_Expr_MathExp.B_1x1_Gate_Expr_MathLn.B_1x1_Gate_Expr_MathLogBase.B_1x1_Gate_Expr_MathMax.B_1x1_Gate_Expr_MathMin.B_1x1_Gate_Expr_MathModulo.B_1x1_Gate_Expr_MathModuloFloored.B_1x1_Gate_Expr_MathMultiply.B_1x1_Gate_Expr_MathNegate.B_1x1_Gate_Expr_MathPow.B_1x1_Gate_Expr_MathRadiansToDegrees.B_1x1_Gate_Expr_MathSign.B_1x1_Gate_Expr_MathSin.B_1x1_Gate_Expr_MathSinh.B_1x1_Gate_Expr_MathSqrt.B_1x1_Gate_Expr_MathSubtract.B_1x1_Gate_Expr_MathTan.B_1x1_Gate_Expr_MathTanh.B_1x1_Gate_Expr_NearlyEqual.B_1x1_Gate_Expr_QuatAngleBetween.B_1x1_Gate_Expr_QuatBetween.B_1x1_Gate_Expr_QuatDotProduct.B_1x1_Gate_Expr_QuatFromAxisAngle.B_1x1_Gate_Expr_QuatSlerp.B_1x1_Gate_Expr_QuatToAxisAngle.B_1x1_Gate_Expr_RotateVector.B_1x1_Gate_Expr_RotationToDirection.B_1x1_Gate_Expr_Round.B_1x1_Gate_Expr_Select.B_1x1_Gate_Expr_SplitColor.B_1x1_Gate_Expr_SplitColorSRGB.B_1x1_Gate_Expr_SplitQuaternion.B_1x1_Gate_Expr_SplitRotation.B_1x1_Gate_Expr_SplitVector.B_1x1_Gate_Expr_String_Concatenate.B_1x1_Gate_Expr_String_Contains.B_1x1_Gate_Expr_String_EndsWith.B_1x1_Gate_Expr_String_Find.B_1x1_Gate_Expr_String_FormatText.B_1x1_Gate_Expr_String_Length.B_1x1_Gate_Expr_String_ParseInt.B_1x1_Gate_Expr_String_ParseNumber.B_1x1_Gate_Expr_String_Replace.B_1x1_Gate_Expr_String_Split.B_1x1_Gate_Expr_String_StartsWith.B_1x1_Gate_Expr_String_Substring.B_1x1_Gate_Expr_String_ToLower.B_1x1_Gate_Expr_String_ToUpper.B_1x1_Gate_Expr_String_Trim.B_1x1_Gate_Expr_Swap.B_1x1_Gate_Expr_VecCrossProduct.B_1x1_Gate_Expr_VecDistance.B_1x1_Gate_Expr_VecDistanceSquared.B_1x1_Gate_Expr_VecDotProduct.B_1x1_Gate_Expr_VecMagnitude.B_1x1_Gate_Expr_VecMagnitudeSquared.B_1x1_Gate_Expr_VecNormalize.B_1x1_Gate_Expr_VecScale.B_1x1_Gate_Fake_Gamemode_CharacterDamagedEvent.B_1x1_Gate_Fake_Gamemode_CharacterDiedEvent.B_1x1_Gate_Fake_Gamemode_CharacterSpawnedEvent.B_1x1_Gate_Fake_Gamemode_ControllerJoinedEvent.B_1x1_Gate_Fake_Gamemode_ControllerLeftEvent.B_1x1_Gate_Fake_Gamemode_RoundEndEvent.B_1x1_Gate_Fake_Gamemode_RoundStartEvent.B_1x1_Gate_FindPlayer.B_1x1_Gate_FontReference.B_1x1_Gate_Internal_CharacterZoneEvent_Entered.B_1x1_Gate_Internal_CharacterZoneEvent_Left.B_1x1_Gate_Internal_EntityZoneEvent_Entered.B_1x1_Gate_Internal_EntityZoneEvent_Left.B_1x1_Gate_Internal_ProjectileZoneEvent_Entered.B_1x1_Gate_Internal_ProjectileZoneEvent_Left.B_1x1_Gate_Internal_ReadBrickGrid.B_1x1_Gate_Internal_ZoneEvent_BrickChanged.B_1x1_Gate_Internal_ZoneEvent_BrickRemoved.B_1x1_Gate_ItemReference.B_1x1_Gate_OneShotAudioReference.B_1x1_Gate_PickupReference.B_1x1_Gate_ProjectileReference.B_1x1_Gate_Pseudo_BufferSeconds.B_1x1_Gate_Pseudo_BufferTicks.B_1x1_Gate_Pseudo_Dampen.B_1x1_Gate_Pseudo_QueueSeconds.B_1x1_Gate_Pseudo_QueueTicks.B_1x1_Gate_Pseudo_Timer.B_1x1_Gate_Pseudo_Tween.B_1x1_Gate_SeatControlSplitter.B_1x1_Gate_ServerUptime.B_1x1_Gate_Variable.B_1x1_Gate_Variable_Array.B_1x1_Gate_WeightBrick.B_1x1_Gate_WheelEngineAudioReference.B_2x2_Cannon.B_2x2_Thruster.B_Bush.B_Button_Pressed.B_Button_Square_Pressed.B_Gyroscope.B_Joint_RigidBearing.B_Joint_RigidBearing_Micro.B_Joint_Socket.B_Joint_Wheel_Micro_Suspension.B_Joint_Wheel_Suspension.B_Switch_Flipped".split("."), Ji = /* @__PURE__ */ "PB_DefaultBrick.PB_DefaultStudded.PB_DefaultRampInnerCornerInverted.PB_DefaultRampCrestEnd.PB_DefaultRampCrestCorner.PB_DefaultRampCrest.PB_DefaultRamp.PB_PicketFence.BP_LatticeThin.PB_DefaultWedge.PB_DefaultTile.PB_DefaultSmoothTile.PB_DefaultSideWedge.PB_DefaultRampInverted.PB_DefaultRampInnerCorner.PB_DefaultRampCornerInverted.PB_DefaultRampCorner.PB_DefaultPole.PB_DefaultMicroWedgeTriangleCorner.PB_DefaultMicroWedgeOuterCorner.PB_DefaultMicroWedgeInnerCorner.PB_DefaultMicroWedgeHalfOuterCorner.PB_DefaultMicroWedgeHalfInnerCornerInverted.PB_DefaultMicroWedgeHalfInnerCorner.PB_DefaultMicroWedgeCorner.PB_DefaultMicroWedge.PB_DefaultMicroRamp.PB_DefaultMicroBrick.PB_DefaultArch.BP_SquarePlate.BP_SpikePlate.PB_Spike.PB_SliderJoint.PB_ServoSliderJoint.PB_MotorSliderJoint.BP_RoundPlate.PB_RoundedCap.PB_Baguette".split("."), Yi = {
3843
3843
  BP_LatticeThin: "BP_LatticeThin",
3844
3844
  BP_RoundPlate: "BP_RoundPlate",
3845
3845
  BP_SpikePlate: "BP_SpikePlate",
@@ -3988,6 +3988,7 @@ var Ki = class e {
3988
3988
  B_1x1_Gate_Expr_BitwiseXOR: "B_1x1_Gate_Expr_BitwiseXOR",
3989
3989
  B_1x1_Gate_Expr_Ceil: "B_1x1_Gate_Expr_Ceil",
3990
3990
  B_1x1_Gate_Expr_ChangeDetector: "B_1x1_Gate_Expr_ChangeDetector",
3991
+ B_1x1_Gate_Expr_ChangeDetectorExec: "B_1x1_Gate_Expr_ChangeDetectorExec",
3991
3992
  B_1x1_Gate_Expr_ColorBlend: "B_1x1_Gate_Expr_ColorBlend",
3992
3993
  B_1x1_Gate_Expr_ColorConvert: "B_1x1_Gate_Expr_ColorConvert",
3993
3994
  B_1x1_Gate_Expr_ColorToHex: "B_1x1_Gate_Expr_ColorToHex",
@@ -4000,6 +4001,7 @@ var Ki = class e {
4000
4001
  B_1x1_Gate_Expr_Convert: "B_1x1_Gate_Expr_Convert",
4001
4002
  B_1x1_Gate_Expr_DirectionToRotation: "B_1x1_Gate_Expr_DirectionToRotation",
4002
4003
  B_1x1_Gate_Expr_EdgeDetector: "B_1x1_Gate_Expr_EdgeDetector",
4004
+ B_1x1_Gate_Expr_EdgeDetectorExec: "B_1x1_Gate_Expr_EdgeDetectorExec",
4003
4005
  B_1x1_Gate_Expr_Floor: "B_1x1_Gate_Expr_Floor",
4004
4006
  B_1x1_Gate_Expr_InvertRotation: "B_1x1_Gate_Expr_InvertRotation",
4005
4007
  B_1x1_Gate_Expr_LogicalAND: "B_1x1_Gate_Expr_LogicalAND",
@@ -4441,6 +4443,7 @@ var $i = /* @__PURE__ */ new Map([
4441
4443
  ["BrickComponentType_WireGraph_Expr_BitwiseXOR", "BrickComponentData_WireGraph_Expr_IntInt_Int"],
4442
4444
  ["BrickComponentType_WireGraph_Expr_Ceil", "BrickComponentData_WireGraph_Expr_Float_Float"],
4443
4445
  ["BrickComponentType_WireGraph_Expr_ChangeDetector", "BrickComponentData_WireGraph_Expr_ChangeDetector"],
4446
+ ["BrickComponentType_WireGraph_Expr_ChangeDetectorExec", "BrickComponentData_WireGraph_Expr_ChangeDetectorExec"],
4444
4447
  ["BrickComponentType_WireGraph_Expr_ColorBlend", "BrickComponentData_WireGraph_Expr_ColorBlend"],
4445
4448
  ["BrickComponentType_WireGraph_Expr_ColorConvert", "BrickComponentData_WireGraph_Expr_ColorConvert"],
4446
4449
  ["BrickComponentType_WireGraph_Expr_ColorToHex", "BrickComponentData_WireGraph_Expr_ColorToHex"],
@@ -4453,6 +4456,7 @@ var $i = /* @__PURE__ */ new Map([
4453
4456
  ["BrickComponentType_WireGraph_Expr_Convert", "BrickComponentData_WireGraph_Expr_Convert"],
4454
4457
  ["BrickComponentType_WireGraph_Expr_DirectionToRotation", "BrickComponentData_WireGraph_Expr_DirectionToRotation"],
4455
4458
  ["BrickComponentType_WireGraph_Expr_EdgeDetector", "BrickComponentData_WireGraph_Expr_EdgeDetector"],
4459
+ ["BrickComponentType_WireGraph_Expr_EdgeDetectorExec", "BrickComponentData_WireGraph_Expr_EdgeDetectorExec"],
4456
4460
  ["BrickComponentType_WireGraph_Expr_Floor", "BrickComponentData_WireGraph_Expr_Float_Float"],
4457
4461
  ["BrickComponentType_WireGraph_Expr_InvertRotation", "BrickComponentData_WireGraph_Expr_InvertRotation"],
4458
4462
  ["BrickComponentType_WireGraph_Expr_LogicalAND", "BrickComponentData_WireGraph_Expr_BoolBool_Bool"],
@@ -4734,7 +4738,7 @@ var $i = /* @__PURE__ */ new Map([
4734
4738
  PickupSpinSpeed: .2,
4735
4739
  PickupBobSpeed: .1,
4736
4740
  PickupBobHeight: 4,
4737
- PickupAnimationPhase: .61543626
4741
+ PickupAnimationPhase: .6645405
4738
4742
  },
4739
4743
  BrickComponentData_Joint_Wheel: {
4740
4744
  bEnabled: !0,
@@ -5192,6 +5196,7 @@ var $i = /* @__PURE__ */ new Map([
5192
5196
  bInputB: !1
5193
5197
  },
5194
5198
  BrickComponentData_WireGraph_Expr_Bool_Bool: { bInput: !1 },
5199
+ BrickComponentData_WireGraph_Expr_ChangeDetector: { bPulseOnChange: !1 },
5195
5200
  BrickComponentData_WireGraph_Expr_ColorBlend: {
5196
5201
  Alpha: .5,
5197
5202
  BlendSpace: 0,
@@ -5201,7 +5206,12 @@ var $i = /* @__PURE__ */ new Map([
5201
5206
  FromSpace: 0,
5202
5207
  ToSpace: 0
5203
5208
  },
5204
- BrickComponentData_WireGraph_Expr_EdgeDetector: { Input: 0 },
5209
+ BrickComponentData_WireGraph_Expr_EdgeDetector: {
5210
+ Input: 0,
5211
+ bPulseOnRisingEdge: !1,
5212
+ bPulseOnFallingEdge: !1
5213
+ },
5214
+ BrickComponentData_WireGraph_Expr_EdgeDetectorExec: { Input: 0 },
5205
5215
  BrickComponentData_WireGraph_Expr_Float_Float: { Input: 0 },
5206
5216
  BrickComponentData_WireGraph_Expr_IntInt_Int: {
5207
5217
  InputA: 0,
@@ -5318,7 +5328,7 @@ var $i = /* @__PURE__ */ new Map([
5318
5328
  BrickComponentData_WireGraph_Expr_VecFloat_Vec: { Scalar: 0 },
5319
5329
  BrickComponentData_WireGraph_Fake_RoundEvent: { RoundNumber: 0 },
5320
5330
  BrickComponentData_WireGraph_FindPlayer: { Query: "" }
5321
- })), ta = /* @__PURE__ */ "A,ActiveDamping,AdditionalIgnoredEntities,AggroRange,Agression,Alpha,Amount,Anchor,Anchor.X,Anchor.Y,AnchorX,AnchorY,Angle,AngularVelocity,AngularVelocity.X,AngularVelocity.Y,AngularVelocity.Z,Arguments,ArrayVarRef,Arrived,AttackDamageMultiplier,AttackMovementAmount,Attacker,AttackerWeapon,AttackerWeaponName,AudioDescriptor,Axis,Axis.X,Axis.Y,Axis.Z,B,Base,BeginTouchSound,Billboard,Blend,BotName,BotWeapon,BrickAsset,BrickGrid,Brightness,CenterOfSteering,Character,CharacterThatJustHit,Color,Color.A,Color.B,Color.G,Color.R,ColorA,ColorA.A,ColorA.B,ColorA.G,ColorA.R,ColorB,ColorB.A,ColorB.B,ColorB.G,ColorB.R,ConsoleTag,Control_DriveAndSteer,Controller,CorpseTimeout,Count,CurrentAngle,CurrentPosition,CustomMass,CustomMassVerticalOffset,Damage,DamageLimit,DamageMultiplier,Damping,DataIn1,DataIn2,DataIn3,DataIn4,DataIn5,DataIn6,DataIn7,DataIn8,DataOut1,DataOut2,DataOut3,DataOut4,DataOut5,DataOut6,DataOut7,DataOut8,Delimiter,DeltaTime,Destination,DestroyAll,Direction,Direction.X,Direction.Y,Direction.Z,DisplayName,Distance,DistanceToTarget,DriveAcceleratingPowerMultiplier,DriveBrakingPowerMultiplier,DriveDampingMultiplier,DriveInterpSpeed,DrivePower,DriveSpeed,Duration,EndTouchSound,Entity,EntityType,Exec,ExecA,ExecB,ExecDown,ExecIn,ExecOut,ExecOutA,ExecOutB,ExecOutDown,ExitOffset,ExitOffset.X,ExitOffset.Y,ExitOffset.Z,Expired,Exponent,Face,FireRate,FireSound,FocusAzimuth,FocusCharacter,Font,FontColor,FontColor.A,FontColor.B,FontColor.G,FontColor.R,Force,ForceLimit,FormatString,From,From.X,From.Y,From.Z,Function,G,GraffitiAngleLimit,GraffitiDepthLimit,GraffitiLayer,GunSkill,HealthMultiplier,Hex,Hit,HitDistance,HitEntity,HitLocation,HitNormal,IgnoreEntity,Index,IndexA,IndexB,InnerConeAngle,InnerRadius,Input,Input.A,Input.B,Input.G,Input.Pitch,Input.R,Input.Roll,Input.W,Input.X,Input.Y,Input.Yaw,Input.Z,InputA,InputA.W,InputA.X,InputA.Y,InputA.Z,InputB,InputB.W,InputB.X,InputB.Y,InputB.Z,InputC,InputD,InputE,InputF,InputForward,InputG,InputRight,Instigator,InteractSound,InterpMode,Item,ItemNameOverride,ItemScale,ItemType,JointDistance,Jumpyness,Kerning,Key,Killer,KillerWeapon,KillerWeaponName,Left,Length,Lifetime,Limit,LimitAngle,LineHeight,LineOffset,LinearVelocity,LinearVelocity.X,LinearVelocity.Y,LinearVelocity.Z,ManualInput_Drive,ManualInput_Steer,Mass,MassOffset,MassOffset.X,MassOffset.Y,MassOffset.Z,MassSize,MassSize.X,MassSize.Y,MassSize.Z,Material,MaterialAlpha,MaterialSlider,Max,MaxDistance,MaxForce,Message,Min,Miss,MoveTarget,MoveTarget.X,MoveTarget.Y,MoveTarget.Z,MovementAmount,MovementGoalDummy,MovementRandomness,Name,NonFocusAzimuth,NonFocusVolumeAttenuation,NumberOfShots,OccupantCount,Offset,Offset.X,Offset.Y,Offset.Z,OnChanged,OnFallingEdge,OnFired,OnRisingEdge,OnTime,Origin,Origin.X,Origin.Y,Origin.Z,OuterConeAngle,Outline,OutlineColor,OutlineColor.A,OutlineColor.B,OutlineColor.G,OutlineColor.R,OutlineSize,OutlineWidth,Output,OutputB,Pause,PickupAnimationAxis,PickupAnimationPhase,PickupBobHeight,PickupBobSpeed,PickupClass,PickupMeshColors,PickupMinigameResetRespawnDelay,PickupOffsetDirection,PickupOffsetDistance,PickupRespawnTime,PickupRotation,PickupRotation.Pitch,PickupRotation.Roll,PickupRotation.Yaw,PickupScale,PickupSpinSpeed,Pitch,PitchMultiplier,Play,Player,PositionX,PositionY,Power,Prefix,PressCount,PressSound,ProceduralSize,ProceduralSize.X,ProceduralSize.Y,ProceduralSize.Z,Projectile,ProjectileClass,ProjectileOverride,PromptCustomLabel,Query,R,RER_Input,RER_Output,Radius,ReactionTime,ReleaseSound,RepeatCount,RepeatDelay,RepeatTime,RepeatVariance,Replacement,RespawnTime,Restart,Resume,Right,Roll,Rotation,Rotation.Pitch,Rotation.Roll,Rotation.W,Rotation.X,Rotation.Y,Rotation.Yaw,Rotation.Z,RoundNumber,RunSpeed,Scalar,ScaleMultiplier,ScaleX,ScaleY,ScuffWidth,Search,SecondsToWait,Separator,Shading,ShadingWidth,SittingCharacter,Size,Skew,Skin,Skin.Parts,Slot,SmoothTime,Source,SourceRef,SpawnLocation,SpawnMargin,SpawnOffset,SpawnOffset.X,SpawnOffset.Y,SpawnOffset.Z,SpawnOffsetRotation,SpawnOffsetRotation.Pitch,SpawnOffsetRotation.Roll,SpawnOffsetRotation.Yaw,SpawnVelocity,SpawnVelocity.X,SpawnVelocity.Y,SpawnVelocity.Z,SpawnedCharacter,SpawnedEntity,Speed,SpeedMultiplier,SpreadConeAngle,Start,Steer,SteerInterpSpeed,SteerLimitDegree,SteerLimitSpeedFalloff,SteerPower,SteerPowerMultiplier,Stop,Strength,Suffix,SuspensionDamping,SuspensionLength,SuspensionOffset,SuspensionStiffness,Tag,TagFilter,TankSteerSpeedMultiplier,Target,TargetAngle,TargetAxis,TargetAxis.X,TargetAxis.Y,TargetAxis.Z,TargetPosition,Team,TeamCollisionChannel,TeamName,Text,TextId,TextIdOut,ThisDestination,Throttle,TicksToWait,Time,Title,To,To.X,To.Y,To.Z,Tolerance,TopSpeed,TouchCount,Transition,Typeface,Uptime,UserId,UserName,Value,VarRef,Vector,Vector.X,Vector.Y,Vector.Z,VolumeMultiplier,W,WaterDriveForce,WaterSteeringForce,Weapon,WeaponName,WeaponNameThatJustHit,WeaponSpeedMultiplier,WeaponThatJustHit,WheelFrictionMultiplier,X,Y,Yaw,Z,ZeroSecondsToWait,ZeroTicksToWait,Zone,ZoneEndDistance,ZoneRef,ZoneStartDistance,bActiveBot,bAlignToWedge,bAllowEngineSteerCorrect,bAllowNearbyInteraction,bAnglesArePercentages,bAutoRight,bBackVision,bCanBrake,bCanJump,bCanRespawn,bCanTargetBots,bCanTargetPlayers,bCaseSensitive,bCastShadows,bCollisionEnabled,bCollisionEnabled_Interaction,bCollisionEnabled_Physics,bCollisionEnabled_Player,bCollisionEnabled_Player1,bCollisionEnabled_Player2,bCollisionEnabled_Player3,bCollisionEnabled_Weapon,bCond,bDeleteBot,bDescending,bDetectBricks,bDetectEntities,bDetectMap,bDetectPhysics,bDetectPlayers,bDetectPlayers1,bDetectPlayers2,bDetectPlayers3,bDetectPlayers4,bDetectProjectiles,bDriveWhenNotAttachedToEngine,bEnable,bEnableManualControl,bEnableRepeat,bEnabled,bFlashIfUnchanged,bFlipShading,bForeground,bFound,bFrozen,bHasPermission,bHasRole,bHeld,bHiddenInteraction,bIgnoreOwningGrid,bInput,bInputA,bInputB,bIsBuildingZone,bIsEmpty,bIsLooseZone,bIsOccupied,bIsShareZone,bIsTrusted,bJustHit,bLimitAngle,bManualInput_Brake,bMatchBrickShape,bOccupied,bOutOfBounds,bOutput,bOverrideColor,bOverrideOutlineColor,bOverridePickupColors,bPermissionEnable,bPickupAnimationAxisLocal,bPickupAnimationEnabled,bPickupAutoDisableOnPickup,bPickupEnabled,bPickupRespawnOnMinigameReset,bPinPlayerToTeam,bPinned,bPositionsArePercentages,bPressedJump,bRelative,bRenderTranslucentWhenDisabled,bReversed,bRollCameraInThirdPerson,bRotatePlayerGravityOnSpawn,bSelectB,bSharpCorners,bSharpOutlines,bShowPickupEnabled,bSpatialization,bSpawnEnable,bSpawnLight,bSpreadBiasedTowardsCenter,bSteerEnabled,bStopped,bSuccess,bSuspensionEnabled,bSwap,bTankSteering,bTeamCollision,bTeamCollision1,bTeamCollision2,bTeamCollision3,bTeamWinsInstead,bTouching,bUseBrickColor,bVisibility,bVisionRaycasting,bWelded".split(","), na = /* @__PURE__ */ new Map([["Entity_DynamicBrickGrid", "BrickGridDynamicActor"], ["Entity_MicrochipDynamicBrickGrid", "BP_MicrochipBrickGridDynamicActor_C"]]), ra = new Map(Object.entries({
5331
+ })), ta = /* @__PURE__ */ "A,ActiveDamping,AdditionalIgnoredEntities,AggroRange,Agression,Alpha,Amount,Anchor,Anchor.X,Anchor.Y,AnchorX,AnchorY,Angle,AngularVelocity,AngularVelocity.X,AngularVelocity.Y,AngularVelocity.Z,Arguments,ArrayVarRef,Arrived,AttackDamageMultiplier,AttackMovementAmount,Attacker,AttackerWeapon,AttackerWeaponName,AudioDescriptor,Axis,Axis.X,Axis.Y,Axis.Z,B,Base,BeginTouchSound,Billboard,Blend,BotName,BotWeapon,BrickAsset,BrickGrid,Brightness,CenterOfSteering,Character,CharacterThatJustHit,Color,Color.A,Color.B,Color.G,Color.R,ColorA,ColorA.A,ColorA.B,ColorA.G,ColorA.R,ColorB,ColorB.A,ColorB.B,ColorB.G,ColorB.R,ConsoleTag,Control_DriveAndSteer,Controller,CorpseTimeout,Count,CurrentAngle,CurrentPosition,CustomMass,CustomMassVerticalOffset,Damage,DamageLimit,DamageMultiplier,Damping,DataIn1,DataIn2,DataIn3,DataIn4,DataIn5,DataIn6,DataIn7,DataIn8,DataOut1,DataOut2,DataOut3,DataOut4,DataOut5,DataOut6,DataOut7,DataOut8,Delimiter,DeltaTime,Destination,DestroyAll,Direction,Direction.X,Direction.Y,Direction.Z,DisplayName,Distance,DistanceToTarget,DriveAcceleratingPowerMultiplier,DriveBrakingPowerMultiplier,DriveDampingMultiplier,DriveInterpSpeed,DrivePower,DriveSpeed,Duration,EndTouchSound,Entity,EntityType,Exec,ExecA,ExecB,ExecDown,ExecIn,ExecOut,ExecOutA,ExecOutB,ExecOutDown,ExitOffset,ExitOffset.X,ExitOffset.Y,ExitOffset.Z,Expired,Exponent,Face,FireRate,FireSound,FocusAzimuth,FocusCharacter,Font,FontColor,FontColor.A,FontColor.B,FontColor.G,FontColor.R,Force,ForceLimit,FormatString,From,From.X,From.Y,From.Z,Function,G,GraffitiAngleLimit,GraffitiDepthLimit,GraffitiLayer,GunSkill,HealthMultiplier,Hex,Hit,HitDistance,HitEntity,HitLocation,HitNormal,IgnoreEntity,Index,IndexA,IndexB,InnerConeAngle,InnerRadius,Input,Input.A,Input.B,Input.G,Input.Pitch,Input.R,Input.Roll,Input.W,Input.X,Input.Y,Input.Yaw,Input.Z,InputA,InputA.W,InputA.X,InputA.Y,InputA.Z,InputB,InputB.W,InputB.X,InputB.Y,InputB.Z,InputC,InputD,InputE,InputF,InputForward,InputG,InputRight,Instigator,InteractSound,InterpMode,Item,ItemNameOverride,ItemScale,ItemType,JointDistance,Jumpyness,Kerning,Key,Killer,KillerWeapon,KillerWeaponName,Left,Length,Lifetime,Limit,LimitAngle,LineHeight,LineOffset,LinearVelocity,LinearVelocity.X,LinearVelocity.Y,LinearVelocity.Z,ManualInput_Drive,ManualInput_Steer,Mass,MassOffset,MassOffset.X,MassOffset.Y,MassOffset.Z,MassSize,MassSize.X,MassSize.Y,MassSize.Z,Material,MaterialAlpha,MaterialSlider,Max,MaxDistance,MaxForce,Message,Min,Miss,MoveTarget,MoveTarget.X,MoveTarget.Y,MoveTarget.Z,MovementAmount,MovementGoalDummy,MovementRandomness,Name,NonFocusAzimuth,NonFocusVolumeAttenuation,NumberOfShots,OccupantCount,Offset,Offset.X,Offset.Y,Offset.Z,OnChanged,OnFallingEdge,OnFired,OnRisingEdge,OnTime,Origin,Origin.X,Origin.Y,Origin.Z,OuterConeAngle,Outline,OutlineColor,OutlineColor.A,OutlineColor.B,OutlineColor.G,OutlineColor.R,OutlineSize,OutlineWidth,Output,OutputB,Pause,PickupAnimationAxis,PickupAnimationPhase,PickupBobHeight,PickupBobSpeed,PickupClass,PickupMeshColors,PickupMinigameResetRespawnDelay,PickupOffsetDirection,PickupOffsetDistance,PickupRespawnTime,PickupRotation,PickupRotation.Pitch,PickupRotation.Roll,PickupRotation.Yaw,PickupScale,PickupSpinSpeed,Pitch,PitchMultiplier,Play,Player,PositionX,PositionY,Power,Prefix,PressCount,PressSound,ProceduralSize,ProceduralSize.X,ProceduralSize.Y,ProceduralSize.Z,Projectile,ProjectileClass,ProjectileOverride,PromptCustomLabel,Query,R,RER_Input,RER_Output,Radius,ReactionTime,ReleaseSound,RepeatCount,RepeatDelay,RepeatTime,RepeatVariance,Replacement,RespawnTime,Restart,Resume,Right,Roll,Rotation,Rotation.Pitch,Rotation.Roll,Rotation.W,Rotation.X,Rotation.Y,Rotation.Yaw,Rotation.Z,RoundNumber,RunSpeed,Scalar,ScaleMultiplier,ScaleX,ScaleY,ScuffWidth,Search,SecondsToWait,Separator,Shading,ShadingWidth,SittingCharacter,Size,Skew,Skin,Skin.Parts,Slot,SmoothTime,Source,SourceRef,SpawnLocation,SpawnMargin,SpawnOffset,SpawnOffset.X,SpawnOffset.Y,SpawnOffset.Z,SpawnOffsetRotation,SpawnOffsetRotation.Pitch,SpawnOffsetRotation.Roll,SpawnOffsetRotation.Yaw,SpawnVelocity,SpawnVelocity.X,SpawnVelocity.Y,SpawnVelocity.Z,SpawnedCharacter,SpawnedEntity,Speed,SpeedMultiplier,SpreadConeAngle,Start,Steer,SteerInterpSpeed,SteerLimitDegree,SteerLimitSpeedFalloff,SteerPower,SteerPowerMultiplier,Stop,Strength,Suffix,SuspensionDamping,SuspensionLength,SuspensionOffset,SuspensionStiffness,Tag,TagFilter,TankSteerSpeedMultiplier,Target,TargetAngle,TargetAxis,TargetAxis.X,TargetAxis.Y,TargetAxis.Z,TargetPosition,Team,TeamCollisionChannel,TeamName,Text,TextId,TextIdOut,ThisDestination,Throttle,TicksToWait,Time,Title,To,To.X,To.Y,To.Z,Tolerance,TopSpeed,TouchCount,Transition,Typeface,Uptime,UserId,UserName,Value,VarRef,Vector,Vector.X,Vector.Y,Vector.Z,VolumeMultiplier,W,WaterDriveForce,WaterSteeringForce,Weapon,WeaponName,WeaponNameThatJustHit,WeaponSpeedMultiplier,WeaponThatJustHit,WheelFrictionMultiplier,X,Y,Yaw,Z,ZeroSecondsToWait,ZeroTicksToWait,Zone,ZoneEndDistance,ZoneRef,ZoneStartDistance,bActiveBot,bAlignToWedge,bAllowEngineSteerCorrect,bAllowNearbyInteraction,bAnglesArePercentages,bAutoRight,bBackVision,bCanBrake,bCanJump,bCanRespawn,bCanTargetBots,bCanTargetPlayers,bCaseSensitive,bCastShadows,bCollisionEnabled,bCollisionEnabled_Interaction,bCollisionEnabled_Physics,bCollisionEnabled_Player,bCollisionEnabled_Player1,bCollisionEnabled_Player2,bCollisionEnabled_Player3,bCollisionEnabled_Weapon,bCond,bDeleteBot,bDescending,bDetectBricks,bDetectEntities,bDetectMap,bDetectPhysics,bDetectPlayers,bDetectPlayers1,bDetectPlayers2,bDetectPlayers3,bDetectPlayers4,bDetectProjectiles,bDriveWhenNotAttachedToEngine,bEnable,bEnableManualControl,bEnableRepeat,bEnabled,bFlashIfUnchanged,bFlipShading,bForeground,bFound,bFrozen,bHasPermission,bHasRole,bHeld,bHiddenInteraction,bIgnoreOwningGrid,bInput,bInputA,bInputB,bIsBuildingZone,bIsEmpty,bIsLooseZone,bIsOccupied,bIsShareZone,bIsTrusted,bJustHit,bLimitAngle,bManualInput_Brake,bMatchBrickShape,bOccupied,bOutOfBounds,bOutput,bOverrideColor,bOverrideOutlineColor,bOverridePickupColors,bPermissionEnable,bPickupAnimationAxisLocal,bPickupAnimationEnabled,bPickupAutoDisableOnPickup,bPickupEnabled,bPickupRespawnOnMinigameReset,bPinPlayerToTeam,bPinned,bPositionsArePercentages,bPressedJump,bPulseOnChange,bPulseOnFallingEdge,bPulseOnRisingEdge,bRelative,bRenderTranslucentWhenDisabled,bReversed,bRollCameraInThirdPerson,bRotatePlayerGravityOnSpawn,bSelectB,bSharpCorners,bSharpOutlines,bShowPickupEnabled,bSpatialization,bSpawnEnable,bSpawnLight,bSpreadBiasedTowardsCenter,bSteerEnabled,bStopped,bSuccess,bSuspensionEnabled,bSwap,bTankSteering,bTeamCollision,bTeamCollision1,bTeamCollision2,bTeamCollision3,bTeamWinsInstead,bTouching,bUseBrickColor,bVisibility,bVisionRaycasting,bWelded".split(","), na = /* @__PURE__ */ new Map([["Entity_DynamicBrickGrid", "BrickGridDynamicActor"], ["Entity_MicrochipDynamicBrickGrid", "BP_MicrochipBrickGridDynamicActor_C"]]), ra = new Map(Object.entries({
5322
5332
  BrickComponentType_Internal_CharacterZoneEvent_Entered: {
5323
5333
  bricks: ["B_1x1_Gate_Internal_CharacterZoneEvent_Entered"],
5324
5334
  inputs: [
@@ -6437,6 +6447,11 @@ var $i = /* @__PURE__ */ new Map([
6437
6447
  BrickComponentType_WireGraph_Expr_ChangeDetector: {
6438
6448
  bricks: ["B_1x1_Gate_Expr_ChangeDetector"],
6439
6449
  inputs: ["Input"],
6450
+ outputs: ["bPulseOnChange"]
6451
+ },
6452
+ BrickComponentType_WireGraph_Expr_ChangeDetectorExec: {
6453
+ bricks: ["B_1x1_Gate_Expr_ChangeDetectorExec"],
6454
+ inputs: ["Input"],
6440
6455
  outputs: ["OnChanged"]
6441
6456
  },
6442
6457
  BrickComponentType_WireGraph_Expr_ColorBlend: {
@@ -6526,6 +6541,11 @@ var $i = /* @__PURE__ */ new Map([
6526
6541
  BrickComponentType_WireGraph_Expr_EdgeDetector: {
6527
6542
  bricks: ["B_1x1_Gate_Expr_EdgeDetector"],
6528
6543
  inputs: ["Input"],
6544
+ outputs: ["bPulseOnFallingEdge", "bPulseOnRisingEdge"]
6545
+ },
6546
+ BrickComponentType_WireGraph_Expr_EdgeDetectorExec: {
6547
+ bricks: ["B_1x1_Gate_Expr_EdgeDetectorExec"],
6548
+ inputs: ["Input"],
6529
6549
  outputs: ["OnFallingEdge", "OnRisingEdge"]
6530
6550
  },
6531
6551
  BrickComponentType_WireGraph_Expr_Floor: {
@@ -9570,6 +9590,15 @@ var $i = /* @__PURE__ */ new Map([
9570
9590
  NAME: "BrickComponentType_WireGraph_Expr_ChangeDetector",
9571
9591
  BRICK: "B_1x1_Gate_Expr_ChangeDetector",
9572
9592
  BRICKS: ["B_1x1_Gate_Expr_ChangeDetector"],
9593
+ PORTS: {
9594
+ Input: "Input",
9595
+ bPulseOnChange: "bPulseOnChange"
9596
+ }
9597
+ },
9598
+ Expr_ChangeDetectorExec: {
9599
+ NAME: "BrickComponentType_WireGraph_Expr_ChangeDetectorExec",
9600
+ BRICK: "B_1x1_Gate_Expr_ChangeDetectorExec",
9601
+ BRICKS: ["B_1x1_Gate_Expr_ChangeDetectorExec"],
9573
9602
  PORTS: {
9574
9603
  Input: "Input",
9575
9604
  OnChanged: "OnChanged"
@@ -9705,6 +9734,16 @@ var $i = /* @__PURE__ */ new Map([
9705
9734
  NAME: "BrickComponentType_WireGraph_Expr_EdgeDetector",
9706
9735
  BRICK: "B_1x1_Gate_Expr_EdgeDetector",
9707
9736
  BRICKS: ["B_1x1_Gate_Expr_EdgeDetector"],
9737
+ PORTS: {
9738
+ Input: "Input",
9739
+ bPulseOnFallingEdge: "bPulseOnFallingEdge",
9740
+ bPulseOnRisingEdge: "bPulseOnRisingEdge"
9741
+ }
9742
+ },
9743
+ Expr_EdgeDetectorExec: {
9744
+ NAME: "BrickComponentType_WireGraph_Expr_EdgeDetectorExec",
9745
+ BRICK: "B_1x1_Gate_Expr_EdgeDetectorExec",
9746
+ BRICKS: ["B_1x1_Gate_Expr_EdgeDetectorExec"],
9708
9747
  PORTS: {
9709
9748
  Input: "Input",
9710
9749
  OnFallingEdge: "OnFallingEdge",
@@ -11722,7 +11761,7 @@ var $i = /* @__PURE__ */ new Map([
11722
11761
  D: 4294967295
11723
11762
  };
11724
11763
  function oa(e) {
11725
- let t = er(e), n = new DataView(t.buffer, t.byteOffset, 16);
11764
+ let t = $n(e), n = new DataView(t.buffer, t.byteOffset, 16);
11726
11765
  return {
11727
11766
  A: n.getUint32(0, !1),
11728
11767
  B: n.getUint32(4, !1),
@@ -11732,7 +11771,7 @@ function oa(e) {
11732
11771
  }
11733
11772
  function sa(e) {
11734
11773
  let t = /* @__PURE__ */ new Uint8Array(16), n = new DataView(t.buffer);
11735
- return n.setUint32(0, e.A, !1), n.setUint32(4, e.B, !1), n.setUint32(8, e.C, !1), n.setUint32(12, e.D, !1), $n(Array.from(t));
11774
+ return n.setUint32(0, e.A, !1), n.setUint32(4, e.B, !1), n.setUint32(8, e.C, !1), n.setUint32(12, e.D, !1), Qn(Array.from(t));
11736
11775
  }
11737
11776
  //#endregion
11738
11777
  //#region src/brdb/pending.ts
@@ -12687,7 +12726,11 @@ var Ba = {
12687
12726
  bInputA: "bool",
12688
12727
  bInputB: "bool"
12689
12728
  },
12690
- BrickComponentData_WireGraph_Expr_ChangeDetector: { Input: "WireGraphVariant" },
12729
+ BrickComponentData_WireGraph_Expr_ChangeDetector: {
12730
+ Input: "WireGraphVariant",
12731
+ bPulseOnChange: "bool"
12732
+ },
12733
+ BrickComponentData_WireGraph_Expr_ChangeDetectorExec: { Input: "WireGraphVariant" },
12691
12734
  BrickComponentData_WireGraph_Expr_Compare: {
12692
12735
  InputA: "WireGraphVariant",
12693
12736
  InputB: "WireGraphVariant"
@@ -12697,7 +12740,12 @@ var Ba = {
12697
12740
  Output: "WireGraphVariant",
12698
12741
  TargetType: "WireGraphVariant"
12699
12742
  },
12700
- BrickComponentData_WireGraph_Expr_EdgeDetector: { Input: "f64" },
12743
+ BrickComponentData_WireGraph_Expr_EdgeDetector: {
12744
+ Input: "f64",
12745
+ bPulseOnRisingEdge: "bool",
12746
+ bPulseOnFallingEdge: "bool"
12747
+ },
12748
+ BrickComponentData_WireGraph_Expr_EdgeDetectorExec: { Input: "f64" },
12701
12749
  BrickComponentData_WireGraph_Expr_Float_Float: { Input: "f64" },
12702
12750
  BrickComponentData_WireGraph_Expr_Int_Int: { Input: "i64" },
12703
12751
  BrickComponentData_WireGraph_Expr_IntInt_Int: {
@@ -14195,7 +14243,7 @@ var ro = class {
14195
14243
  }
14196
14244
  }, io = class {
14197
14245
  constructor() {
14198
- this.sizeCounters = [], this.sizes = [], this.typeIndices = [], this.ownerIndices = [], this.originalOwnerIndices = [], this.relPositions = [], this.orientations = [], this.colPlayer = new Rr(), this.colPlayer1 = new Rr(), this.colPlayer2 = new Rr(), this.colPlayer3 = new Rr(), this.colWeapon = new Rr(), this.colInteraction = new Rr(), this.colPhysics = new Rr(), this.visibility = new Rr(), this.materialIndices = [], this.colors = [], this.sizeIndexMap = /* @__PURE__ */ new Map(), this.numBrickSizes = 0, this.numBricks = 0;
14246
+ this.sizeCounters = [], this.sizes = [], this.typeIndices = [], this.ownerIndices = [], this.originalOwnerIndices = [], this.relPositions = [], this.orientations = [], this.colPlayer = new hi(), this.colPlayer1 = new hi(), this.colPlayer2 = new hi(), this.colPlayer3 = new hi(), this.colWeapon = new hi(), this.colInteraction = new hi(), this.colPhysics = new hi(), this.visibility = new hi(), this.materialIndices = [], this.colors = [], this.sizeIndexMap = /* @__PURE__ */ new Map(), this.numBrickSizes = 0, this.numBricks = 0;
14199
14247
  }
14200
14248
  addBrick(e, t, n, r) {
14201
14249
  let i;
@@ -14300,7 +14348,11 @@ function so(e, t = {}) {
14300
14348
  let n = no(e), r = (e.wires ?? []).filter((e) => "component_type" in e.source);
14301
14349
  return co({
14302
14350
  description: e.description,
14303
- authorName: e.author?.name,
14351
+ author: e.author?.name ? {
14352
+ id: e.author.id,
14353
+ name: e.author.name
14354
+ } : void 0,
14355
+ prefabs: [],
14304
14356
  ownerRows: oo(e.brick_owners),
14305
14357
  grids: [n],
14306
14358
  gridIds: [1],
@@ -14324,41 +14376,41 @@ function so(e, t = {}) {
14324
14376
  }, t);
14325
14377
  }
14326
14378
  function co(e, t = {}) {
14327
- let n = e.grids.flat(), r = new ro(), i = new ro(), a = new ro();
14328
- for (let e of n) r.add(e.materialName), (e.procedural ? a : i).add(e.assetName);
14379
+ let n = e.grids.flat(), r = new ro(), i = new ro(), o = new ro();
14380
+ for (let e of n) r.add(e.materialName), (e.procedural ? o : i).add(e.assetName);
14329
14381
  if (r.size > 256) throw Error(`brdb: too many distinct materials (${r.size}); MaterialIndices is u8 (max 256)`);
14330
- let o = {
14382
+ let s = {
14331
14383
  materials: r,
14332
14384
  basic: i,
14333
- procedural: a
14334
- }, s = i.size, c = new ro(), l = [];
14385
+ procedural: o
14386
+ }, c = i.size, l = new ro(), u = [];
14335
14387
  for (let e of n) for (let t of e.components) {
14336
- let e = c.size;
14337
- c.add(t.type) === e && l.push($i.get(t.type));
14388
+ let e = l.size;
14389
+ l.add(t.type) === e && u.push($i.get(t.type));
14338
14390
  }
14339
- let u = new ro();
14391
+ let d = new ro();
14340
14392
  e.wires.forEach((t, n) => {
14341
14393
  for (let [r, i] of [["source", t.source], ["target", t.target]]) {
14342
14394
  let t = e.grids[i.gridSlot]?.length ?? 0;
14343
14395
  if (!Number.isInteger(i.brickIndex) || i.brickIndex < 0 || i.brickIndex >= t) throw Error(`brdb: wires[${n}].${r}: brick_index ${i.brickIndex} out of range`);
14344
- if (!c.has(i.componentType)) throw Error(`brdb: wires[${n}].${r}: component type '${i.componentType}' is not used by any brick`);
14345
- u.add(i.port);
14396
+ if (!l.has(i.componentType)) throw Error(`brdb: wires[${n}].${r}: component type '${i.componentType}' is not used by any brick`);
14397
+ d.add(i.port);
14346
14398
  }
14347
14399
  });
14348
- let d = new ro(), f = [];
14400
+ let f = new ro(), p = [];
14349
14401
  for (let t of e.entities) {
14350
- let e = d.size;
14351
- d.add(t.type) === e && f.push(t.className);
14402
+ let e = f.size;
14403
+ f.add(t.type) === e && p.push(t.className);
14352
14404
  }
14353
- let p = Ja.fromData(Ba.BRSavedComponentChunkSoA);
14354
- if (c.size > 0) {
14405
+ let m = Ja.fromData(Ba.BRSavedComponentChunkSoA);
14406
+ if (l.size > 0) {
14355
14407
  let e = [];
14356
- for (let t of l) t !== "None" && !e.includes(t) && e.push(t);
14357
- p.merge(Xa("BRSavedComponentChunkSoA_max").extractStructsTransitive(e));
14408
+ for (let t of u) t !== "None" && !e.includes(t) && e.push(t);
14409
+ m.merge(Xa("BRSavedComponentChunkSoA_max").extractStructsTransitive(e));
14358
14410
  }
14359
- let m = e.ownerRows, h = m.map(() => 0), g = m.map(() => 0), _ = m.map(() => 0);
14360
- for (let t of e.entities) _[t.ownerIndex] += 1;
14361
- let v = e.grids.map((e) => {
14411
+ let h = e.ownerRows, g = h.map(() => 0), _ = h.map(() => 0), v = h.map(() => 0);
14412
+ for (let t of e.entities) v[t.ownerIndex] += 1;
14413
+ let y = e.grids.map((e) => {
14362
14414
  let t = {
14363
14415
  chunkOrder: [],
14364
14416
  chunks: /* @__PURE__ */ new Map(),
@@ -14373,34 +14425,34 @@ function co(e, t = {}) {
14373
14425
  index: e,
14374
14426
  builder: new io()
14375
14427
  }, t.chunks.set(i, a), t.chunkOrder.push(i));
14376
- let u = a.builder.numBricks;
14377
- if (a.builder.addBrick(n, r, o, s), t.brickLocations.push({
14428
+ let o = a.builder.numBricks;
14429
+ if (a.builder.addBrick(n, r, s, c), t.brickLocations.push({
14378
14430
  key: i,
14379
14431
  chunk: e,
14380
- localIndex: u
14381
- }), h[n.ownerIndex] += 1, n.components.length > 0) {
14382
- g[n.ownerIndex] += n.components.length;
14432
+ localIndex: o
14433
+ }), g[n.ownerIndex] += 1, n.components.length > 0) {
14434
+ _[n.ownerIndex] += n.components.length;
14383
14435
  let e = t.componentChunks.get(i);
14384
14436
  e || t.componentChunks.set(i, e = new ao());
14385
14437
  for (let t of n.components) {
14386
- let n = c.indexOf(t.type);
14387
- e.add(n, u, l[n], t.data ?? {});
14438
+ let n = l.indexOf(t.type);
14439
+ e.add(n, o, u[n], t.data ?? {});
14388
14440
  }
14389
14441
  }
14390
14442
  }
14391
14443
  return t;
14392
14444
  });
14393
14445
  for (let t of e.microchipLinks) {
14394
- let e = v[t.gridSlot], n = e?.brickLocations[t.brickIndex];
14446
+ let e = y[t.gridSlot], n = e?.brickLocations[t.brickIndex];
14395
14447
  if (!n) throw Error(`brdb: microchip link brick index ${t.brickIndex} out of range`);
14396
14448
  let r = e.componentChunks.get(n.key);
14397
14449
  r || e.componentChunks.set(n.key, r = new ao()), r.addMicrochipLink(n.localIndex, t.gridReference);
14398
14450
  }
14399
14451
  for (let t of e.wires) {
14400
- let n = v[t.source.gridSlot].brickLocations[t.source.brickIndex], r = v[t.target.gridSlot], i = r.brickLocations[t.target.brickIndex], a = {
14452
+ let n = y[t.source.gridSlot].brickLocations[t.source.brickIndex], r = y[t.target.gridSlot], i = r.brickLocations[t.target.brickIndex], a = {
14401
14453
  BrickIndexInChunk: i.localIndex,
14402
- ComponentTypeIndex: c.indexOf(t.target.componentType),
14403
- PortIndex: u.indexOf(t.target.port)
14454
+ ComponentTypeIndex: l.indexOf(t.target.componentType),
14455
+ PortIndex: d.indexOf(t.target.port)
14404
14456
  }, o = r.wireChunks.get(i.key);
14405
14457
  o || r.wireChunks.set(i.key, o = {
14406
14458
  remoteSources: [],
@@ -14409,8 +14461,8 @@ function co(e, t = {}) {
14409
14461
  localTargets: []
14410
14462
  }), r.chunkWireCounts.set(i.key, (r.chunkWireCounts.get(i.key) ?? 0) + 1), t.source.gridSlot === t.target.gridSlot && n.key === i.key ? (o.localSources.push({
14411
14463
  BrickIndexInChunk: n.localIndex,
14412
- ComponentTypeIndex: c.indexOf(t.source.componentType),
14413
- PortIndex: u.indexOf(t.source.port)
14464
+ ComponentTypeIndex: l.indexOf(t.source.componentType),
14465
+ PortIndex: d.indexOf(t.source.port)
14414
14466
  }), o.localTargets.push(a)) : (o.remoteSources.push({
14415
14467
  GridPersistentIndex: e.gridIds[t.source.gridSlot],
14416
14468
  ChunkIndex: {
@@ -14419,54 +14471,54 @@ function co(e, t = {}) {
14419
14471
  Z: n.chunk[2]
14420
14472
  },
14421
14473
  BrickIndexInChunk: n.localIndex,
14422
- ComponentTypeIndex: c.indexOf(t.source.componentType),
14423
- PortIndex: u.indexOf(t.source.port)
14474
+ ComponentTypeIndex: l.indexOf(t.source.componentType),
14475
+ PortIndex: d.indexOf(t.source.port)
14424
14476
  }), o.remoteTargets.push(a));
14425
14477
  }
14426
- let y = Xa("BRSavedGlobalDataSoA"), b = Xa("BRSavedOwnerTableSoA"), x = Xa("BRSavedBrickChunkIndexSoA"), S = Xa("BRSavedBrickChunkSoA"), C = Xa("BRSavedWireChunkSoA"), w = Xa("BRSavedEntityChunkIndexSoA"), T = Xa("BRSavedEntityChunkSoA"), E = y.encode("BRSavedGlobalDataSoA", {
14427
- EntityTypeNames: d.names,
14428
- EntityDataClassNames: f,
14478
+ let b = Xa("BRSavedGlobalDataSoA"), x = Xa("BRSavedOwnerTableSoA"), S = Xa("BRSavedBrickChunkIndexSoA"), C = Xa("BRSavedBrickChunkSoA"), w = Xa("BRSavedWireChunkSoA"), T = Xa("BRSavedEntityChunkIndexSoA"), E = Xa("BRSavedEntityChunkSoA"), D = b.encode("BRSavedGlobalDataSoA", {
14479
+ EntityTypeNames: f.names,
14480
+ EntityDataClassNames: p,
14429
14481
  BasicBrickAssetNames: i.names,
14430
- ProceduralBrickAssetNames: a.names,
14482
+ ProceduralBrickAssetNames: o.names,
14431
14483
  MaterialAssetNames: r.names,
14432
- ComponentTypeNames: c.names,
14433
- ComponentDataStructNames: l,
14434
- ComponentWirePortNames: u.names,
14484
+ ComponentTypeNames: l.names,
14485
+ ComponentDataStructNames: u,
14486
+ ComponentWirePortNames: d.names,
14435
14487
  ExternalAssetReferences: [],
14436
14488
  GlobalGridEntityTypeIndex: -1
14437
- }), D = b.encode("BRSavedOwnerTableSoA", {
14438
- UserIds: m.map((e) => ({
14489
+ }), O = x.encode("BRSavedOwnerTableSoA", {
14490
+ UserIds: h.map((e) => ({
14439
14491
  A: e.guid.A,
14440
14492
  B: e.guid.B,
14441
14493
  C: e.guid.C,
14442
14494
  D: e.guid.D
14443
14495
  })),
14444
- UserNames: m.map((e) => e.name),
14445
- DisplayNames: m.map((e) => e.display),
14446
- EntityCounts: _,
14447
- BrickCounts: h,
14448
- ComponentCounts: g,
14449
- WireCounts: m.map(() => 0)
14450
- }), O = e.entities.length, k = w.encode("BRSavedEntityChunkIndexSoA", {
14451
- NextPersistentIndex: 2 + O,
14452
- Chunk3DIndices: O ? [{
14496
+ UserNames: h.map((e) => e.name),
14497
+ DisplayNames: h.map((e) => e.display),
14498
+ EntityCounts: v,
14499
+ BrickCounts: g,
14500
+ ComponentCounts: _,
14501
+ WireCounts: h.map(() => 0)
14502
+ }), k = e.entities.length, A = T.encode("BRSavedEntityChunkIndexSoA", {
14503
+ NextPersistentIndex: 2 + k,
14504
+ Chunk3DIndices: k ? [{
14453
14505
  X: 0,
14454
14506
  Y: 0,
14455
14507
  Z: 0
14456
14508
  }] : [],
14457
- NumEntities: O ? [O] : []
14458
- }), A = null;
14459
- if (O > 0) {
14460
- let t = [], n = new Rr(), r = new Rr();
14509
+ NumEntities: k ? [k] : []
14510
+ }), j = null;
14511
+ if (k > 0) {
14512
+ let t = [], n = new hi(), r = new hi();
14461
14513
  for (let i of e.entities) {
14462
- let e = d.indexOf(i.type), a = t[t.length - 1];
14514
+ let e = f.indexOf(i.type), a = t[t.length - 1];
14463
14515
  a && a.TypeIndex === e ? a.NumEntities += 1 : t.push({
14464
14516
  TypeIndex: e,
14465
14517
  NumEntities: 1
14466
14518
  }), n.push(i.frozen), r.push(i.sleeping);
14467
14519
  }
14468
14520
  let i = new Ui();
14469
- T.writeValue(i, "BRSavedEntityChunkSoA", {
14521
+ E.writeValue(i, "BRSavedEntityChunkSoA", {
14470
14522
  TypeCounters: t,
14471
14523
  PersistentIndices: e.entities.map((e, t) => 2 + t),
14472
14524
  OwnerIndices: e.entities.map((e) => e.ownerIndex),
@@ -14484,27 +14536,30 @@ function co(e, t = {}) {
14484
14536
  bColorsAreLinear: !1
14485
14537
  }), e.entities.forEach((e, t) => {
14486
14538
  if (e.className !== "None") try {
14487
- T.writeValue(i, e.className, T.fillStruct(e.className, e.data));
14539
+ E.writeValue(i, e.className, E.fillStruct(e.className, e.data));
14488
14540
  } catch (n) {
14489
14541
  throw Error(`brdb: entities[${t}] (${e.type}) data: ${n.message}`);
14490
14542
  }
14491
- }), A = i.toBytes();
14543
+ }), j = i.toBytes();
14492
14544
  }
14493
- let j = new TextEncoder(), M = {
14545
+ let M = new TextEncoder(), ee = {
14494
14546
  type: e.prefab ? "Prefab" : "World",
14495
- iD: "00000000-0000-0000-0000-000000000000",
14547
+ iD: a,
14496
14548
  name: "",
14497
14549
  version: "",
14498
14550
  tags: [],
14499
- authors: e.authorName ? [e.authorName] : [],
14551
+ authors: e.author ? [{
14552
+ iD: e.author.id ?? "00000000-0000-0000-0000-000000000000",
14553
+ name: e.author.name
14554
+ }] : [],
14500
14555
  createdAt: "0001.01.01-00.00.00",
14501
14556
  updatedAt: "0001.01.01-00.00.00",
14502
14557
  description: e.description ?? "A Generated World",
14503
14558
  dependencies: [],
14504
14559
  gameVersion: "CL0",
14505
14560
  ...t.bundle
14506
- }, ee = (e, t) => {
14507
- let n = t ? 0 : Qa, r = [["ChunkIndex.mps", X(x.encode("BRSavedBrickChunkIndexSoA", {
14561
+ }, te = (e, t) => {
14562
+ let n = t ? 0 : Qa, r = [["ChunkIndex.mps", X(S.encode("BRSavedBrickChunkIndexSoA", {
14508
14563
  Chunk3DIndices: e.chunkOrder.map((t) => {
14509
14564
  let [n, r, i] = e.chunks.get(t).index;
14510
14565
  return {
@@ -14523,9 +14578,9 @@ function co(e, t = {}) {
14523
14578
  NumComponents: e.chunkOrder.map((t) => e.componentChunks.get(t)?.numComponents ?? 0),
14524
14579
  NumWires: e.chunkOrder.map((t) => e.chunkWireCounts.get(t) ?? 0)
14525
14580
  }))]];
14526
- return e.chunkOrder.length > 0 && r.push(["Chunks", ca(e.chunkOrder.map((t) => [`${t}.mps`, X(S.encode("BRSavedBrickChunkSoA", e.chunks.get(t).builder.toValue(s)))]))]), e.componentChunks.size > 0 && r.push(["Components", ca(e.chunkOrder.filter((t) => e.componentChunks.has(t)).map((t) => [`${t}.mps`, X(e.componentChunks.get(t).toBytes(p))]))]), e.wireChunks.size > 0 && r.push(["Wires", ca(e.chunkOrder.filter((t) => e.wireChunks.has(t)).map((t) => {
14581
+ return e.chunkOrder.length > 0 && r.push(["Chunks", ca(e.chunkOrder.map((t) => [`${t}.mps`, X(C.encode("BRSavedBrickChunkSoA", e.chunks.get(t).builder.toValue(c)))]))]), e.componentChunks.size > 0 && r.push(["Components", ca(e.chunkOrder.filter((t) => e.componentChunks.has(t)).map((t) => [`${t}.mps`, X(e.componentChunks.get(t).toBytes(m))]))]), e.wireChunks.size > 0 && r.push(["Wires", ca(e.chunkOrder.filter((t) => e.wireChunks.has(t)).map((t) => {
14527
14582
  let n = e.wireChunks.get(t);
14528
- return [`${t}.mps`, X(C.encode("BRSavedWireChunkSoA", {
14583
+ return [`${t}.mps`, X(w.encode("BRSavedWireChunkSoA", {
14529
14584
  RemoteWireSources: n.remoteSources,
14530
14585
  LocalWireSources: n.localSources,
14531
14586
  RemoteWireTargets: n.remoteTargets,
@@ -14533,27 +14588,37 @@ function co(e, t = {}) {
14533
14588
  PendingPropagationFlags: { Flags: [] }
14534
14589
  }))];
14535
14590
  }))]), r;
14536
- }, te = [["Bundle.json", X(j.encode(JSON.stringify(M)))]];
14537
- e.prefab ? te.push(["Prefab.json", X(j.encode(JSON.stringify(e.prefab)))]) : te.push(["World.json", X(j.encode(JSON.stringify({ environment: t.environment ?? "Plate" })))]);
14538
- let ne = [
14539
- ["ChunkIndex.schema", X(w.toBinary())],
14540
- ["ChunkIndex.mps", X(k)],
14541
- ["ChunksShared.schema", X(T.toBinary())]
14591
+ }, ne = [["Bundle.json", X(M.encode(JSON.stringify(ee)))]];
14592
+ e.prefab ? (ne.push(["Prefab.json", X(M.encode(mo(e.prefab)))]), t.thumbnail && ne.push(["Thumbnail.png", X(t.thumbnail)])) : (t.thumbnail && ne.push(["Thumbnail.png", X(t.thumbnail)]), ne.push(["World.json", X(M.encode(JSON.stringify({ environment: t.environment ?? "Plate" })))]));
14593
+ let N = [
14594
+ ["ChunkIndex.schema", X(T.toBinary())],
14595
+ ["ChunkIndex.mps", X(A)],
14596
+ ["ChunksShared.schema", X(E.toBinary())]
14542
14597
  ];
14543
- return A && ne.push(["Chunks", ca([["0_0_0.mps", X(A)]])]), [["Meta", ca(te)], ["World", ca([["0", ca([
14544
- ["GlobalData.schema", X(y.toBinary())],
14545
- ["GlobalData.mps", X(E)],
14546
- ["Owners.schema", X(b.toBinary())],
14547
- ["Owners.mps", X(D)],
14598
+ j && N.push(["Chunks", ca([["0_0_0.mps", X(j)]])]);
14599
+ let re = [["Meta", ca(ne)], ["World", ca([["0", ca([
14600
+ ["GlobalData.schema", X(b.toBinary())],
14601
+ ["GlobalData.mps", X(D)],
14602
+ ["Owners.schema", X(x.toBinary())],
14603
+ ["Owners.mps", X(O)],
14548
14604
  ["Bricks", ca([
14549
- ["ChunkIndexShared.schema", X(x.toBinary())],
14550
- ["ChunksShared.schema", X(S.toBinary())],
14551
- ["WiresShared.schema", X(C.toBinary())],
14552
- ["ComponentsShared.schema", X(p.toBinary())],
14553
- ["Grids", ca(v.map((t, n) => [String(e.gridIds[n]), ca(ee(t, e.gridIds[n] === 1))]))]
14605
+ ["ChunkIndexShared.schema", X(S.toBinary())],
14606
+ ["ChunksShared.schema", X(C.toBinary())],
14607
+ ["WiresShared.schema", X(w.toBinary())],
14608
+ ["ComponentsShared.schema", X(m.toBinary())],
14609
+ ["Grids", ca(y.map((t, n) => [String(e.gridIds[n]), ca(te(t, e.gridIds[n] === 1))]))]
14554
14610
  ])],
14555
- ["Entities", ca(ne)]
14611
+ ["Entities", ca(N)]
14556
14612
  ])]])]];
14613
+ if (e.prefabs.length > 0) for (let [t, n] of e.prefabs) {
14614
+ let e = t.split("/"), r = re;
14615
+ for (let t = 0; t < e.length - 1; t++) {
14616
+ let n = r.find(([n, r]) => n === e[t] && r.type === "folder");
14617
+ n || (n = [e[t], ca([])], r.push(n)), r = n[1].children;
14618
+ }
14619
+ r.push([e[e.length - 1], X(n)]);
14620
+ }
14621
+ return re;
14557
14622
  }
14558
14623
  function lo(e, t, n) {
14559
14624
  let r = e.type ?? "Entity_DynamicBrickGrid", i = na.get(r);
@@ -14599,7 +14664,22 @@ function lo(e, t, n) {
14599
14664
  data: e.data ?? {}
14600
14665
  };
14601
14666
  }
14602
- function uo(e, t) {
14667
+ var uo = "@@f64:", fo = class {
14668
+ constructor(e) {
14669
+ this.value = e;
14670
+ }
14671
+ toJSON() {
14672
+ return `${uo}${this.value}`;
14673
+ }
14674
+ }, po = (e, t, n) => ({
14675
+ x: new fo(e),
14676
+ y: new fo(t),
14677
+ z: new fo(n)
14678
+ });
14679
+ function mo(e) {
14680
+ return JSON.stringify(e).replace(RegExp(`"${uo}(-?[\\d.eE+-]+)"`, "g"), (e, t) => Number.isInteger(Number(t)) ? `${t}.0` : t);
14681
+ }
14682
+ function ho(e, t) {
14603
14683
  let n = [
14604
14684
  0,
14605
14685
  0,
@@ -14625,16 +14705,8 @@ function uo(e, t) {
14625
14705
  }
14626
14706
  });
14627
14707
  let i = {
14628
- center: {
14629
- x: (n[0] + r[0]) / 2,
14630
- y: (n[1] + r[1]) / 2,
14631
- z: (n[2] + r[2]) / 2
14632
- },
14633
- halfExtent: {
14634
- x: (r[0] - n[0]) / 2,
14635
- y: (r[1] - n[1]) / 2,
14636
- z: (r[2] - n[2]) / 2
14637
- }
14708
+ center: po((n[0] + r[0]) / 2, (n[1] + r[1]) / 2, (n[2] + r[2]) / 2),
14709
+ halfExtent: po((r[0] - n[0]) / 2, (r[1] - n[1]) / 2, (r[2] - n[2]) / 2)
14638
14710
  };
14639
14711
  return {
14640
14712
  pivots: {
@@ -14658,9 +14730,9 @@ function uo(e, t) {
14658
14730
  bIsMicrochipPrefab: t.isMicrochipPrefab ?? !1
14659
14731
  };
14660
14732
  }
14661
- var fo = class {
14733
+ var go = class {
14662
14734
  constructor() {
14663
- this.gridBrickInputs = [[]], this.gridEntityOrders = [], this.entityInputs = [], this.wireList = [], this.chipLinks = [], this.ownerList = [], this.prefabOptions = null;
14735
+ this.gridBrickInputs = [[]], this.gridEntityOrders = [], this.entityInputs = [], this.wireList = [], this.chipLinks = [], this.ownerList = [], this.prefabOptions = null, this.prefabList = [];
14664
14736
  }
14665
14737
  addOwner(e) {
14666
14738
  return this.ownerList.push(e), this.ownerList.length;
@@ -14737,6 +14809,10 @@ var fo = class {
14737
14809
  makePrefab(e = {}) {
14738
14810
  this.prefabOptions = e;
14739
14811
  }
14812
+ addPrefab(e) {
14813
+ let t = `Prefabs/Uploads/${$r(pi(e)).toUpperCase()}.brz`;
14814
+ return this.prefabList.some(([e]) => e === t) || this.prefabList.push([t, e]), t;
14815
+ }
14740
14816
  toPendingFs(e = {}) {
14741
14817
  let t = new ro(), n = new ro();
14742
14818
  for (let e of this.gridBrickInputs) for (let r of e) t.add(r.asset ?? "PB_DefaultBrick"), n.add(r.material ?? "BMC_Plastic");
@@ -14785,35 +14861,36 @@ var fo = class {
14785
14861
  brickIndex: e.brick.index,
14786
14862
  gridReference: 2 + e.grid.entityOrder
14787
14863
  })),
14788
- prefab: this.prefabOptions ? uo(r[0], this.prefabOptions) : null
14864
+ prefab: this.prefabOptions ? ho(r[0], this.prefabOptions) : null,
14865
+ prefabs: this.prefabList
14789
14866
  }, e);
14790
14867
  }
14791
14868
  toBrz(e = {}) {
14792
14869
  return Gi(this.toPendingFs(e), { compress: e.compress });
14793
14870
  }
14794
14871
  };
14795
- function po(e, t = {}) {
14872
+ function _o(e, t = {}) {
14796
14873
  let n = { compress: t.compress };
14797
14874
  return Gi(so(e, t), n);
14798
14875
  }
14799
- function mo(e) {
14876
+ function vo(e) {
14800
14877
  let t = e <= 15 ? 15 : 255;
14801
14878
  return Math.trunc((e / 255) ** (1 / 2.2) * t);
14802
14879
  }
14803
- function ho(e) {
14880
+ function yo(e) {
14804
14881
  return {
14805
14882
  ...e,
14806
- R: mo(e.R),
14807
- G: mo(e.G),
14808
- B: mo(e.B)
14883
+ R: vo(e.R),
14884
+ G: vo(e.G),
14885
+ B: vo(e.B)
14809
14886
  };
14810
14887
  }
14811
- function go(e) {
14888
+ function bo(e) {
14812
14889
  let t = {};
14813
- for (let [n, r] of Object.entries(e)) t[n] = ho(r);
14890
+ for (let [n, r] of Object.entries(e)) t[n] = yo(r);
14814
14891
  return t;
14815
14892
  }
14816
- function _o(e, t, n) {
14893
+ function xo(e, t, n) {
14817
14894
  let r = 0;
14818
14895
  for (let t of e.BrickSizeCounters) r += t.NumSizes;
14819
14896
  if (r < 0 || r > e.BrickSizes.length) throw Error("brdb: brick size counters exceed size table");
@@ -14836,7 +14913,7 @@ function _o(e, t, n) {
14836
14913
  r.Z
14837
14914
  ];
14838
14915
  }
14839
- let d = e.RelativePositions[r], f = e.Orientations[r], p = e.ColorsAndAlphas[r], m = o ? ho(p) : p;
14916
+ let d = e.RelativePositions[r], f = e.Orientations[r], p = e.ColorsAndAlphas[r], m = o ? yo(p) : p;
14840
14917
  s.push({
14841
14918
  asset_name_index: l,
14842
14919
  size: u,
@@ -14848,13 +14925,13 @@ function _o(e, t, n) {
14848
14925
  direction: f >> 2 & 7,
14849
14926
  rotation: f & 3,
14850
14927
  collision: {
14851
- player: Lr(e.CollisionFlags_Player, r),
14852
- weapon: Lr(e.CollisionFlags_Weapon, r),
14853
- interaction: Lr(e.CollisionFlags_Interaction, r),
14928
+ player: mi(e.CollisionFlags_Player, r),
14929
+ weapon: mi(e.CollisionFlags_Weapon, r),
14930
+ interaction: mi(e.CollisionFlags_Interaction, r),
14854
14931
  tool: !0,
14855
- physics: Lr(e.CollisionFlags_Physics, r)
14932
+ physics: mi(e.CollisionFlags_Physics, r)
14856
14933
  },
14857
- visibility: Lr(e.VisibilityFlags, r),
14934
+ visibility: mi(e.VisibilityFlags, r),
14858
14935
  material_index: e.MaterialIndices[r],
14859
14936
  material_intensity: m.A,
14860
14937
  color: [
@@ -14867,7 +14944,7 @@ function _o(e, t, n) {
14867
14944
  }
14868
14945
  return s;
14869
14946
  }
14870
- var vo = class e {
14947
+ var So = class e {
14871
14948
  constructor(e, t = 0) {
14872
14949
  this.fs = e, this.worldId = t, this.schemas = /* @__PURE__ */ new Map(), this.values = /* @__PURE__ */ new Map();
14873
14950
  }
@@ -14905,6 +14982,25 @@ var vo = class e {
14905
14982
  environment() {
14906
14983
  return this.cached("Meta/World.json", () => JSON.parse(new TextDecoder().decode(this.fs.readFile("Meta/World.json"))));
14907
14984
  }
14985
+ prefabJson() {
14986
+ return this.cached("Meta/Prefab.json", () => this.fs.findFileByPath("Meta/Prefab.json") ? JSON.parse(new TextDecoder().decode(this.fs.readFile("Meta/Prefab.json"))) : null);
14987
+ }
14988
+ thumbnail() {
14989
+ return this.fs.findFileByPath("Meta/Thumbnail.png") ? this.fs.readFile("Meta/Thumbnail.png") : null;
14990
+ }
14991
+ prefabPaths() {
14992
+ let e = [], t = (n) => {
14993
+ for (let t of this.fs.childFiles(n)) e.push(`${n}/${t}`);
14994
+ for (let e of this.fs.childFolders(n)) t(`${n}/${e}`);
14995
+ };
14996
+ return this.fs.childFolders("").includes("Prefabs") && t("Prefabs"), e;
14997
+ }
14998
+ readPrefab(e) {
14999
+ return this.fs.readFile(e);
15000
+ }
15001
+ prefabReader(t) {
15002
+ return e.from(this.readPrefab(t));
15003
+ }
14908
15004
  globalData() {
14909
15005
  return this.cached(this.path("GlobalData.mps"), () => this.decode(this.path("GlobalData.mps"), this.path("GlobalData.schema"), "BRSavedGlobalDataSoA"));
14910
15006
  }
@@ -14962,7 +15058,7 @@ var vo = class e {
14962
15058
  }
14963
15059
  *bricks(e = 1) {
14964
15060
  let t = this.globalData().BasicBrickAssetNames.length;
14965
- for (let n of this.brickChunkIndex(e)) yield* _o(this.brickChunkSoa(e, n.index), n.index, t);
15061
+ for (let n of this.brickChunkIndex(e)) yield* xo(this.brickChunkSoa(e, n.index), n.index, t);
14966
15062
  }
14967
15063
  entityChunkIndex() {
14968
15064
  let e = this.decode(this.path("Entities/ChunkIndex.mps"), this.path("Entities/ChunkIndex.schema"), "BRSavedEntityChunkIndexSoA");
@@ -15044,11 +15140,11 @@ var vo = class e {
15044
15140
  originalOwnerIndex: s.OriginalOwnerIndices?.[f] ?? s.OwnerIndices[f],
15045
15141
  location: s.Locations[f],
15046
15142
  rotation: s.Rotations[f],
15047
- frozen: Lr(s.PhysicsLockedFlags, f),
15048
- sleeping: Lr(s.PhysicsSleepingFlags, f),
15143
+ frozen: mi(s.PhysicsLockedFlags, f),
15144
+ sleeping: mi(s.PhysicsSleepingFlags, f),
15049
15145
  linearVelocity: s.LinearVelocities[f],
15050
15146
  angularVelocity: s.AngularVelocities[f],
15051
- colors: u ? go(e) : e,
15147
+ colors: u ? bo(e) : e,
15052
15148
  remainingLifeSpan: s.RemainingLifeSpans?.[f] ?? 0,
15053
15149
  data: r ? i.readValue(o, r) : null
15054
15150
  }), f += 1;
@@ -15060,74 +15156,74 @@ var vo = class e {
15060
15156
  *entities() {
15061
15157
  for (let e of this.entityChunkIndex().chunks) yield* this.entityChunk(e.index);
15062
15158
  }
15063
- }, yo, $ = "\n ", bo = "\n ", xo = `CREATE TABLE blobs (${$}blob_id INTEGER PRIMARY KEY,${$}compression INTEGER,${$}size_uncompressed INTEGER,${$}size_compressed INTEGER,${$}delta_base_id INTEGER REFERENCES blobs(blob_id),${$}hash BLOB,${$}content BLOB${bo});\nCREATE TABLE revisions (${$}revision_id INTEGER PRIMARY KEY,${$}description TEXT,${$}created_at INTEGER${bo});\nCREATE TABLE folders (${$}folder_id INTEGER PRIMARY KEY,${$}parent_id INTEGER REFERENCES folders(folder_id),${$}name TEXT,${$}created_at INTEGER,${$}deleted_at INTEGER${bo});\nCREATE TABLE files (${$}file_id INTEGER PRIMARY KEY,${$}parent_id INTEGER REFERENCES folders(folder_id),${$}name TEXT,${$}content_id INTEGER REFERENCES blobs(blob_id),${$}created_at INTEGER,${$}deleted_at INTEGER${bo});\nCREATE INDEX blobs_size_hash ON blobs(size_uncompressed, hash);
15159
+ }, Co, $ = "\n ", wo = "\n ", To = `CREATE TABLE blobs (${$}blob_id INTEGER PRIMARY KEY,${$}compression INTEGER,${$}size_uncompressed INTEGER,${$}size_compressed INTEGER,${$}delta_base_id INTEGER REFERENCES blobs(blob_id),${$}hash BLOB,${$}content BLOB${wo});\nCREATE TABLE revisions (${$}revision_id INTEGER PRIMARY KEY,${$}description TEXT,${$}created_at INTEGER${wo});\nCREATE TABLE folders (${$}folder_id INTEGER PRIMARY KEY,${$}parent_id INTEGER REFERENCES folders(folder_id),${$}name TEXT,${$}created_at INTEGER,${$}deleted_at INTEGER${wo});\nCREATE TABLE files (${$}file_id INTEGER PRIMARY KEY,${$}parent_id INTEGER REFERENCES folders(folder_id),${$}name TEXT,${$}content_id INTEGER REFERENCES blobs(blob_id),${$}created_at INTEGER,${$}deleted_at INTEGER${wo});\nCREATE INDEX blobs_size_hash ON blobs(size_uncompressed, hash);
15064
15160
  CREATE INDEX folders_parent_name_deleted ON folders(parent_id, name, deleted_at);
15065
- CREATE INDEX files_parent_name_deleted ON files(parent_id, name, deleted_at);`, So = [
15161
+ CREATE INDEX files_parent_name_deleted ON files(parent_id, name, deleted_at);`, Eo = [
15066
15162
  "blobs",
15067
15163
  "revisions",
15068
15164
  "folders",
15069
15165
  "files"
15070
- ], Co = () => Math.floor(Date.now() / 1e3), wo = (e) => typeof Buffer > "u" ? e : Buffer.from(e.buffer, e.byteOffset, e.byteLength), To = (e) => {
15166
+ ], Do = () => Math.floor(Date.now() / 1e3), Oo = (e) => typeof Buffer > "u" ? e : Buffer.from(e.buffer, e.byteOffset, e.byteLength), ko = (e) => {
15071
15167
  try {
15072
15168
  return typeof process < "u" ? process?.getBuiltinModule?.(e) ?? null : null;
15073
15169
  } catch {
15074
15170
  return null;
15075
15171
  }
15076
- }, Eo = null, Do = (e) => (Eo ?? (Eo = Function("specifier", "return import(specifier)")), Eo(e));
15077
- async function Oo() {
15172
+ }, Ao = null, jo = (e) => (Ao ?? (Ao = Function("specifier", "return import(specifier)")), Ao(e));
15173
+ async function Mo() {
15078
15174
  try {
15079
- let e = await (Ao.engineLoader ?? (() => Do("better-sqlite3")))();
15175
+ let e = await (Po.engineLoader ?? (() => jo("better-sqlite3")))();
15080
15176
  return e.default ?? e;
15081
15177
  } catch {
15082
15178
  throw Error("brdb: the Brdb openers require better-sqlite3 (npm install better-sqlite3), or wrap your own handle with new Brdb(db)");
15083
15179
  }
15084
15180
  }
15085
- function ko() {
15086
- let e = To("node:zlib");
15181
+ function No() {
15182
+ let e = ko("node:zlib");
15087
15183
  if (typeof e?.zstdCompressSync != "function") return null;
15088
15184
  let t = e.constants.ZSTD_c_compressionLevel;
15089
15185
  return (n) => new Uint8Array(e.zstdCompressSync(n, { params: { [t]: 14 } }));
15090
15186
  }
15091
- var Ao = class e {
15187
+ var Po = class e {
15092
15188
  constructor(e) {
15093
15189
  this.db = e, this.defaultCompress = null;
15094
- for (let e of So) if (!this.db.prepare("SELECT name FROM sqlite_schema WHERE type = 'table' AND name = ?").get(e)) throw Error(`brdb: missing required table '${e}'`);
15190
+ for (let e of Eo) if (!this.db.prepare("SELECT name FROM sqlite_schema WHERE type = 'table' AND name = ?").get(e)) throw Error(`brdb: missing required table '${e}'`);
15095
15191
  }
15096
- static init(t, n = Co()) {
15097
- t.exec(xo);
15192
+ static init(t, n = Do()) {
15193
+ t.exec(To);
15098
15194
  let r = new e(t);
15099
15195
  return r.createRevision("Initial Revision", n), r;
15100
15196
  }
15101
15197
  static async wrap(t, n) {
15102
15198
  try {
15103
15199
  let r = n ? e.init(t) : new e(t);
15104
- return r.defaultCompress = ko(), r;
15200
+ return r.defaultCompress = No(), r;
15105
15201
  } catch (e) {
15106
15202
  throw t.close(), e;
15107
15203
  }
15108
15204
  }
15109
15205
  static async open(t) {
15110
- return e.wrap(new (await (Oo()))(t, { fileMustExist: !0 }), !1);
15206
+ return e.wrap(new (await (Mo()))(t, { fileMustExist: !0 }), !1);
15111
15207
  }
15112
15208
  static async openReadonly(t) {
15113
- return e.wrap(new (await (Oo()))(t, {
15209
+ return e.wrap(new (await (Mo()))(t, {
15114
15210
  readonly: !0,
15115
15211
  fileMustExist: !0
15116
15212
  }), !1);
15117
15213
  }
15118
15214
  static async create(t) {
15119
- return e.wrap(new (await (Oo()))(t), !0);
15215
+ return e.wrap(new (await (Mo()))(t), !0);
15120
15216
  }
15121
15217
  static async openOrCreate(t) {
15122
- let n = To("node:fs");
15218
+ let n = ko("node:fs");
15123
15219
  if (!n) throw Error("brdb: openOrCreate requires node 22.3 or newer; call open or create explicitly");
15124
15220
  return n.existsSync(t) ? e.open(t) : e.create(t);
15125
15221
  }
15126
15222
  static async memory() {
15127
- return e.wrap(new (await (Oo()))(":memory:"), !0);
15223
+ return e.wrap(new (await (Mo()))(":memory:"), !0);
15128
15224
  }
15129
15225
  static async fromBytes(t) {
15130
- return e.wrap(new (await (Oo()))(Buffer.from(t)), !1);
15226
+ return e.wrap(new (await (Mo()))(Buffer.from(t)), !1);
15131
15227
  }
15132
15228
  toBytes() {
15133
15229
  let e = this.db.serialize;
@@ -15135,15 +15231,15 @@ var Ao = class e {
15135
15231
  return new Uint8Array(e.call(this.db));
15136
15232
  }
15137
15233
  save(e, t, n = {}) {
15138
- this.writePending(e, t instanceof fo ? t.toPendingFs(n) : so(t, n), n);
15234
+ this.writePending(e, t instanceof go ? t.toPendingFs(n) : so(t, n), n);
15139
15235
  }
15140
15236
  worldReader() {
15141
- return new vo(this);
15237
+ return new So(this);
15142
15238
  }
15143
15239
  sqliteSchema() {
15144
15240
  return this.db.prepare("SELECT sql FROM sqlite_schema").all().map((e) => e.sql).join("\n");
15145
15241
  }
15146
- createRevision(e, t = Co()) {
15242
+ createRevision(e, t = Do()) {
15147
15243
  return Number(this.db.prepare("INSERT INTO revisions (description, created_at) VALUES (?, ?);").run(e, t).lastInsertRowid);
15148
15244
  }
15149
15245
  revisions() {
@@ -15163,16 +15259,16 @@ var Ao = class e {
15163
15259
  let r = this.findBlobByHash(e.length, t);
15164
15260
  if (r) return r.blobId;
15165
15261
  let i = e.length, a = i, o = 0, s = e, c = n ? n(e) : null;
15166
- return c && c.length < i && (a = c.length, o = 1, s = c), Number(this.db.prepare("INSERT INTO blobs (compression, size_uncompressed, size_compressed, delta_base_id, hash, content) VALUES (?, ?, ?, ?, ?, ?);").run(o, i, a, null, wo(t), wo(s)).lastInsertRowid);
15262
+ return c && c.length < i && (a = c.length, o = 1, s = c), Number(this.db.prepare("INSERT INTO blobs (compression, size_uncompressed, size_compressed, delta_base_id, hash, content) VALUES (?, ?, ?, ?, ?, ?);").run(o, i, a, null, Oo(t), Oo(s)).lastInsertRowid);
15167
15263
  }
15168
15264
  findBlobByHash(e, t) {
15169
- let n = this.db.prepare("SELECT blob_id, compression, size_uncompressed, size_compressed, delta_base_id, hash, content FROM blobs WHERE hash = ? AND size_uncompressed = ? LIMIT 1;").get(wo(t), e);
15170
- return n ? jo(n) : null;
15265
+ let n = this.db.prepare("SELECT blob_id, compression, size_uncompressed, size_compressed, delta_base_id, hash, content FROM blobs WHERE hash = ? AND size_uncompressed = ? LIMIT 1;").get(Oo(t), e);
15266
+ return n ? Fo(n) : null;
15171
15267
  }
15172
15268
  findBlob(e) {
15173
15269
  let t = this.db.prepare("SELECT blob_id, compression, size_uncompressed, size_compressed, delta_base_id, hash, content FROM blobs WHERE blob_id = ?;").get(e);
15174
15270
  if (!t) throw Error(`brdb: blob ${e} not found`);
15175
- return jo(t);
15271
+ return Fo(t);
15176
15272
  }
15177
15273
  deleteFile(e, t) {
15178
15274
  this.db.prepare("UPDATE files SET deleted_at = ? WHERE file_id = ?;").run(t, e);
@@ -15199,7 +15295,7 @@ var Ao = class e {
15199
15295
  }
15200
15296
  findFile(e, t) {
15201
15297
  let n = this.db.prepare(`SELECT content_id, created_at FROM files WHERE parent_id ${e === null ? "IS NULL" : "= ?"} AND name = ? AND deleted_at IS NULL;`).get(...e === null ? [t] : [e, t]);
15202
- return n ? Mo(n) : null;
15298
+ return n ? Io(n) : null;
15203
15299
  }
15204
15300
  findFileAtRevision(e, t, n) {
15205
15301
  let r = this.db.prepare(`SELECT content_id, created_at FROM files WHERE parent_id ${e === null ? "IS NULL" : "= ?"} AND name = ? AND created_at <= ? AND (deleted_at IS NULL OR deleted_at > ?) ORDER BY created_at ASC LIMIT 1;`).get(...e === null ? [
@@ -15212,13 +15308,13 @@ var Ao = class e {
15212
15308
  n,
15213
15309
  n
15214
15310
  ]);
15215
- return r ? Mo(r) : null;
15311
+ return r ? Io(r) : null;
15216
15312
  }
15217
15313
  close() {
15218
15314
  this.db.close();
15219
15315
  }
15220
15316
  writePending(e, t, n = {}) {
15221
- let r = n.createdAt ?? Co(), i = n.compress === void 0 ? this.defaultCompress : n.compress;
15317
+ let r = n.createdAt ?? Do(), i = n.compress === void 0 ? this.defaultCompress : n.compress;
15222
15318
  this.db.exec("BEGIN");
15223
15319
  try {
15224
15320
  this.createRevision(e, r), this.mergeFolder(null, t, r, i), this.db.exec("COMMIT");
@@ -15259,7 +15355,7 @@ var Ao = class e {
15259
15355
  this.insertPending(s, e, c, n, r);
15260
15356
  continue;
15261
15357
  }
15262
- let o = hi(c.content), l = this.findBlobByHash(c.content.length, o);
15358
+ let o = pi(c.content), l = this.findBlobByHash(c.content.length, o);
15263
15359
  if (l && t.contentId === l.blobId) continue;
15264
15360
  this.deleteFile(t.fileId, n);
15265
15361
  let u = this.insertBlob(c.content, o, r);
@@ -15277,7 +15373,7 @@ var Ao = class e {
15277
15373
  o.add(e), this.insertPending(e, a, t, r, i);
15278
15374
  }
15279
15375
  } else {
15280
- let a = this.insertBlob(n.content, hi(n.content), i);
15376
+ let a = this.insertBlob(n.content, pi(n.content), i);
15281
15377
  this.insertFile(e, t, a, r);
15282
15378
  }
15283
15379
  }
@@ -15345,8 +15441,8 @@ var Ao = class e {
15345
15441
  return e(null);
15346
15442
  }
15347
15443
  };
15348
- yo = Ao, yo.engineLoader = null;
15349
- var jo = (e) => ({
15444
+ Co = Po, Co.engineLoader = null;
15445
+ var Fo = (e) => ({
15350
15446
  blobId: Number(e.blob_id),
15351
15447
  compression: Number(e.compression),
15352
15448
  sizeUncompressed: Number(e.size_uncompressed),
@@ -15354,15 +15450,15 @@ var jo = (e) => ({
15354
15450
  deltaBaseId: e.delta_base_id === null ? null : Number(e.delta_base_id),
15355
15451
  hash: new Uint8Array(e.hash),
15356
15452
  content: new Uint8Array(e.content)
15357
- }), Mo = (e) => ({
15453
+ }), Io = (e) => ({
15358
15454
  contentId: e.content_id === null ? -1 : Number(e.content_id),
15359
15455
  createdAt: Number(e.created_at)
15360
- }), No = /* @__PURE__ */ t({
15456
+ }), Lo = /* @__PURE__ */ t({
15361
15457
  BASIC_BRICK_ASSETS: () => qi,
15362
- BRDB_SQLITE_SCHEMA: () => xo,
15458
+ BRDB_SQLITE_SCHEMA: () => To,
15363
15459
  BRICK_ASSETS: () => Yi,
15364
- BitFlags: () => Rr,
15365
- Brdb: () => Ao,
15460
+ BitFlags: () => hi,
15461
+ Brdb: () => Po,
15366
15462
  BrdbSchema: () => Ja,
15367
15463
  BrzReader: () => Ki,
15368
15464
  ByteReader: () => Wi,
@@ -15378,9 +15474,9 @@ var jo = (e) => ({
15378
15474
  PROCEDURAL_BRICK_ASSETS: () => Ji,
15379
15475
  PUBLIC_GUID: () => aa,
15380
15476
  WIRE_PORT_NAMES: () => ta,
15381
- World: () => fo,
15382
- WorldReader: () => vo,
15383
- bit: () => Lr,
15477
+ World: () => go,
15478
+ WorldReader: () => So,
15479
+ bit: () => mi,
15384
15480
  embeddedSchema: () => Xa,
15385
15481
  file: () => X,
15386
15482
  folder: () => ca,
@@ -15391,17 +15487,17 @@ var jo = (e) => ({
15391
15487
  toRelative: () => to,
15392
15488
  uuidToGuid: () => oa,
15393
15489
  writeBrzContainer: () => Gi,
15394
- writeBrzLegacy: () => po
15395
- }), Po = {
15396
- read: Ar,
15397
- write: Nr,
15398
- utils: tr,
15490
+ writeBrzLegacy: () => _o
15491
+ }), Ro = {
15492
+ read: kr,
15493
+ write: Mr,
15494
+ utils: er,
15399
15495
  constants: n,
15400
- types: Pr,
15401
- brdb: No
15496
+ types: Nr,
15497
+ brdb: Lo
15402
15498
  };
15403
- typeof window < "u" && (window.BRS = Po);
15499
+ typeof window < "u" && (window.BRS = Ro);
15404
15500
  //#endregion
15405
- export { Ao as Brdb, Fr as Direction, Ir as Rotation, fo as World, vo as WorldReader, No as brdb, n as constants, Po as default, Ar as read, Pr as types, tr as utils, Nr as write, po as writeBrzLegacy };
15501
+ export { Po as Brdb, Pr as Direction, Fr as Rotation, go as World, So as WorldReader, Lo as brdb, n as constants, Ro as default, kr as read, Nr as types, er as utils, Mr as write, _o as writeBrzLegacy };
15406
15502
 
15407
15503
  //# sourceMappingURL=dist.mjs.map