glassjar 0.7.0 → 0.9.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/glassjar.js CHANGED
@@ -1,228 +1,228 @@
1
- function UA(Q) {
1
+ function OA(Q) {
2
2
  return Q && Q.__esModule && Object.prototype.hasOwnProperty.call(Q, "default") ? Q.default : Q;
3
3
  }
4
- var b = { exports: {} }, BA;
5
- function JA() {
6
- if (BA) return b.exports;
7
- BA = 1;
8
- var Q = typeof Reflect == "object" ? Reflect : null, A = Q && typeof Q.apply == "function" ? Q.apply : function(E, o, k) {
9
- return Function.prototype.apply.call(E, o, k);
10
- }, g;
11
- Q && typeof Q.ownKeys == "function" ? g = Q.ownKeys : Object.getOwnPropertySymbols ? g = function(E) {
12
- return Object.getOwnPropertyNames(E).concat(Object.getOwnPropertySymbols(E));
13
- } : g = function(E) {
14
- return Object.getOwnPropertyNames(E);
4
+ var e = { exports: {} }, FA;
5
+ function xA() {
6
+ if (FA) return e.exports;
7
+ FA = 1;
8
+ var Q = typeof Reflect == "object" ? Reflect : null, A = Q && typeof Q.apply == "function" ? Q.apply : function(i, F, M) {
9
+ return Function.prototype.apply.call(i, F, M);
10
+ }, I;
11
+ Q && typeof Q.ownKeys == "function" ? I = Q.ownKeys : Object.getOwnPropertySymbols ? I = function(i) {
12
+ return Object.getOwnPropertyNames(i).concat(Object.getOwnPropertySymbols(i));
13
+ } : I = function(i) {
14
+ return Object.getOwnPropertyNames(i);
15
15
  };
16
- function I(w) {
17
- console && console.warn && console.warn(w);
16
+ function g(o) {
17
+ console && console.warn && console.warn(o);
18
18
  }
19
- var C = Number.isNaN || function(E) {
20
- return E !== E;
19
+ var C = Number.isNaN || function(i) {
20
+ return i !== i;
21
21
  };
22
22
  function B() {
23
23
  B.init.call(this);
24
24
  }
25
- b.exports = B, b.exports.once = j, B.EventEmitter = B, B.prototype._events = void 0, B.prototype._eventsCount = 0, B.prototype._maxListeners = void 0;
26
- var i = 10;
27
- function D(w) {
28
- if (typeof w != "function")
29
- throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof w);
25
+ e.exports = B, e.exports.once = s, B.EventEmitter = B, B.prototype._events = void 0, B.prototype._eventsCount = 0, B.prototype._maxListeners = void 0;
26
+ var E = 10;
27
+ function D(o) {
28
+ if (typeof o != "function")
29
+ throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof o);
30
30
  }
31
31
  Object.defineProperty(B, "defaultMaxListeners", {
32
32
  enumerable: !0,
33
33
  get: function() {
34
- return i;
34
+ return E;
35
35
  },
36
- set: function(w) {
37
- if (typeof w != "number" || w < 0 || C(w))
38
- throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + w + ".");
39
- i = w;
36
+ set: function(o) {
37
+ if (typeof o != "number" || o < 0 || C(o))
38
+ throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + o + ".");
39
+ E = o;
40
40
  }
41
41
  }), B.init = function() {
42
42
  (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
43
- }, B.prototype.setMaxListeners = function(E) {
44
- if (typeof E != "number" || E < 0 || C(E))
45
- throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + E + ".");
46
- return this._maxListeners = E, this;
43
+ }, B.prototype.setMaxListeners = function(i) {
44
+ if (typeof i != "number" || i < 0 || C(i))
45
+ throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + i + ".");
46
+ return this._maxListeners = i, this;
47
47
  };
48
- function N(w) {
49
- return w._maxListeners === void 0 ? B.defaultMaxListeners : w._maxListeners;
48
+ function w(o) {
49
+ return o._maxListeners === void 0 ? B.defaultMaxListeners : o._maxListeners;
50
50
  }
51
51
  B.prototype.getMaxListeners = function() {
52
- return N(this);
53
- }, B.prototype.emit = function(E) {
54
- for (var o = [], k = 1; k < arguments.length; k++) o.push(arguments[k]);
55
- var M = E === "error", R = this._events;
56
- if (R !== void 0)
57
- M = M && R.error === void 0;
58
- else if (!M)
52
+ return w(this);
53
+ }, B.prototype.emit = function(i) {
54
+ for (var F = [], M = 1; M < arguments.length; M++) F.push(arguments[M]);
55
+ var y = i === "error", S = this._events;
56
+ if (S !== void 0)
57
+ y = y && S.error === void 0;
58
+ else if (!y)
59
59
  return !1;
60
- if (M) {
61
- var G;
62
- if (o.length > 0 && (G = o[0]), G instanceof Error)
63
- throw G;
64
- var H = new Error("Unhandled error." + (G ? " (" + G.message + ")" : ""));
65
- throw H.context = G, H;
60
+ if (y) {
61
+ var Y;
62
+ if (F.length > 0 && (Y = F[0]), Y instanceof Error)
63
+ throw Y;
64
+ var p = new Error("Unhandled error." + (Y ? " (" + Y.message + ")" : ""));
65
+ throw p.context = Y, p;
66
66
  }
67
- var W = R[E];
68
- if (W === void 0)
67
+ var t = S[i];
68
+ if (t === void 0)
69
69
  return !1;
70
- if (typeof W == "function")
71
- A(W, this, o);
70
+ if (typeof t == "function")
71
+ A(t, this, F);
72
72
  else
73
- for (var QA = W.length, YA = a(W, QA), k = 0; k < QA; ++k)
74
- A(YA[k], this, o);
73
+ for (var NA = t.length, pA = R(t, NA), M = 0; M < NA; ++M)
74
+ A(pA[M], this, F);
75
75
  return !0;
76
76
  };
77
- function y(w, E, o, k) {
78
- var M, R, G;
79
- if (D(o), R = w._events, R === void 0 ? (R = w._events = /* @__PURE__ */ Object.create(null), w._eventsCount = 0) : (R.newListener !== void 0 && (w.emit(
77
+ function N(o, i, F, M) {
78
+ var y, S, Y;
79
+ if (D(F), S = o._events, S === void 0 ? (S = o._events = /* @__PURE__ */ Object.create(null), o._eventsCount = 0) : (S.newListener !== void 0 && (o.emit(
80
80
  "newListener",
81
- E,
82
- o.listener ? o.listener : o
83
- ), R = w._events), G = R[E]), G === void 0)
84
- G = R[E] = o, ++w._eventsCount;
85
- else if (typeof G == "function" ? G = R[E] = k ? [o, G] : [G, o] : k ? G.unshift(o) : G.push(o), M = N(w), M > 0 && G.length > M && !G.warned) {
86
- G.warned = !0;
87
- var H = new Error("Possible EventEmitter memory leak detected. " + G.length + " " + String(E) + " listeners added. Use emitter.setMaxListeners() to increase limit");
88
- H.name = "MaxListenersExceededWarning", H.emitter = w, H.type = E, H.count = G.length, I(H);
81
+ i,
82
+ F.listener ? F.listener : F
83
+ ), S = o._events), Y = S[i]), Y === void 0)
84
+ Y = S[i] = F, ++o._eventsCount;
85
+ else if (typeof Y == "function" ? Y = S[i] = M ? [F, Y] : [Y, F] : M ? Y.unshift(F) : Y.push(F), y = w(o), y > 0 && Y.length > y && !Y.warned) {
86
+ Y.warned = !0;
87
+ var p = new Error("Possible EventEmitter memory leak detected. " + Y.length + " " + String(i) + " listeners added. Use emitter.setMaxListeners() to increase limit");
88
+ p.name = "MaxListenersExceededWarning", p.emitter = o, p.type = i, p.count = Y.length, g(p);
89
89
  }
90
- return w;
90
+ return o;
91
91
  }
92
- B.prototype.addListener = function(E, o) {
93
- return y(this, E, o, !1);
94
- }, B.prototype.on = B.prototype.addListener, B.prototype.prependListener = function(E, o) {
95
- return y(this, E, o, !0);
92
+ B.prototype.addListener = function(i, F) {
93
+ return N(this, i, F, !1);
94
+ }, B.prototype.on = B.prototype.addListener, B.prototype.prependListener = function(i, F) {
95
+ return N(this, i, F, !0);
96
96
  };
97
- function U() {
97
+ function k() {
98
98
  if (!this.fired)
99
99
  return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
100
100
  }
101
- function L(w, E, o) {
102
- var k = { fired: !1, wrapFn: void 0, target: w, type: E, listener: o }, M = U.bind(k);
103
- return M.listener = o, k.wrapFn = M, M;
104
- }
105
- B.prototype.once = function(E, o) {
106
- return D(o), this.on(E, L(this, E, o)), this;
107
- }, B.prototype.prependOnceListener = function(E, o) {
108
- return D(o), this.prependListener(E, L(this, E, o)), this;
109
- }, B.prototype.removeListener = function(E, o) {
110
- var k, M, R, G, H;
111
- if (D(o), M = this._events, M === void 0)
101
+ function U(o, i, F) {
102
+ var M = { fired: !1, wrapFn: void 0, target: o, type: i, listener: F }, y = k.bind(M);
103
+ return y.listener = F, M.wrapFn = y, y;
104
+ }
105
+ B.prototype.once = function(i, F) {
106
+ return D(F), this.on(i, U(this, i, F)), this;
107
+ }, B.prototype.prependOnceListener = function(i, F) {
108
+ return D(F), this.prependListener(i, U(this, i, F)), this;
109
+ }, B.prototype.removeListener = function(i, F) {
110
+ var M, y, S, Y, p;
111
+ if (D(F), y = this._events, y === void 0)
112
112
  return this;
113
- if (k = M[E], k === void 0)
113
+ if (M = y[i], M === void 0)
114
114
  return this;
115
- if (k === o || k.listener === o)
116
- --this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete M[E], M.removeListener && this.emit("removeListener", E, k.listener || o));
117
- else if (typeof k != "function") {
118
- for (R = -1, G = k.length - 1; G >= 0; G--)
119
- if (k[G] === o || k[G].listener === o) {
120
- H = k[G].listener, R = G;
115
+ if (M === F || M.listener === F)
116
+ --this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete y[i], y.removeListener && this.emit("removeListener", i, M.listener || F));
117
+ else if (typeof M != "function") {
118
+ for (S = -1, Y = M.length - 1; Y >= 0; Y--)
119
+ if (M[Y] === F || M[Y].listener === F) {
120
+ p = M[Y].listener, S = Y;
121
121
  break;
122
122
  }
123
- if (R < 0)
123
+ if (S < 0)
124
124
  return this;
125
- R === 0 ? k.shift() : d(k, R), k.length === 1 && (M[E] = k[0]), M.removeListener !== void 0 && this.emit("removeListener", E, H || o);
125
+ S === 0 ? M.shift() : H(M, S), M.length === 1 && (y[i] = M[0]), y.removeListener !== void 0 && this.emit("removeListener", i, p || F);
126
126
  }
127
127
  return this;
128
- }, B.prototype.off = B.prototype.removeListener, B.prototype.removeAllListeners = function(E) {
129
- var o, k, M;
130
- if (k = this._events, k === void 0)
128
+ }, B.prototype.off = B.prototype.removeListener, B.prototype.removeAllListeners = function(i) {
129
+ var F, M, y;
130
+ if (M = this._events, M === void 0)
131
131
  return this;
132
- if (k.removeListener === void 0)
133
- return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : k[E] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete k[E]), this;
132
+ if (M.removeListener === void 0)
133
+ return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : M[i] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete M[i]), this;
134
134
  if (arguments.length === 0) {
135
- var R = Object.keys(k), G;
136
- for (M = 0; M < R.length; ++M)
137
- G = R[M], G !== "removeListener" && this.removeAllListeners(G);
135
+ var S = Object.keys(M), Y;
136
+ for (y = 0; y < S.length; ++y)
137
+ Y = S[y], Y !== "removeListener" && this.removeAllListeners(Y);
138
138
  return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
139
139
  }
140
- if (o = k[E], typeof o == "function")
141
- this.removeListener(E, o);
142
- else if (o !== void 0)
143
- for (M = o.length - 1; M >= 0; M--)
144
- this.removeListener(E, o[M]);
140
+ if (F = M[i], typeof F == "function")
141
+ this.removeListener(i, F);
142
+ else if (F !== void 0)
143
+ for (y = F.length - 1; y >= 0; y--)
144
+ this.removeListener(i, F[y]);
145
145
  return this;
146
146
  };
147
- function Y(w, E, o) {
148
- var k = w._events;
149
- if (k === void 0)
147
+ function h(o, i, F) {
148
+ var M = o._events;
149
+ if (M === void 0)
150
150
  return [];
151
- var M = k[E];
152
- return M === void 0 ? [] : typeof M == "function" ? o ? [M.listener || M] : [M] : o ? v(M) : a(M, M.length);
153
- }
154
- B.prototype.listeners = function(E) {
155
- return Y(this, E, !0);
156
- }, B.prototype.rawListeners = function(E) {
157
- return Y(this, E, !1);
158
- }, B.listenerCount = function(w, E) {
159
- return typeof w.listenerCount == "function" ? w.listenerCount(E) : c.call(w, E);
160
- }, B.prototype.listenerCount = c;
161
- function c(w) {
162
- var E = this._events;
163
- if (E !== void 0) {
164
- var o = E[w];
165
- if (typeof o == "function")
151
+ var y = M[i];
152
+ return y === void 0 ? [] : typeof y == "function" ? F ? [y.listener || y] : [y] : F ? j(y) : R(y, y.length);
153
+ }
154
+ B.prototype.listeners = function(i) {
155
+ return h(this, i, !0);
156
+ }, B.prototype.rawListeners = function(i) {
157
+ return h(this, i, !1);
158
+ }, B.listenerCount = function(o, i) {
159
+ return typeof o.listenerCount == "function" ? o.listenerCount(i) : K.call(o, i);
160
+ }, B.prototype.listenerCount = K;
161
+ function K(o) {
162
+ var i = this._events;
163
+ if (i !== void 0) {
164
+ var F = i[o];
165
+ if (typeof F == "function")
166
166
  return 1;
167
- if (o !== void 0)
168
- return o.length;
167
+ if (F !== void 0)
168
+ return F.length;
169
169
  }
170
170
  return 0;
171
171
  }
172
172
  B.prototype.eventNames = function() {
173
- return this._eventsCount > 0 ? g(this._events) : [];
173
+ return this._eventsCount > 0 ? I(this._events) : [];
174
174
  };
175
- function a(w, E) {
176
- for (var o = new Array(E), k = 0; k < E; ++k)
177
- o[k] = w[k];
178
- return o;
179
- }
180
- function d(w, E) {
181
- for (; E + 1 < w.length; E++)
182
- w[E] = w[E + 1];
183
- w.pop();
184
- }
185
- function v(w) {
186
- for (var E = new Array(w.length), o = 0; o < E.length; ++o)
187
- E[o] = w[o].listener || w[o];
188
- return E;
189
- }
190
- function j(w, E) {
191
- return new Promise(function(o, k) {
192
- function M(G) {
193
- w.removeListener(E, R), k(G);
175
+ function R(o, i) {
176
+ for (var F = new Array(i), M = 0; M < i; ++M)
177
+ F[M] = o[M];
178
+ return F;
179
+ }
180
+ function H(o, i) {
181
+ for (; i + 1 < o.length; i++)
182
+ o[i] = o[i + 1];
183
+ o.pop();
184
+ }
185
+ function j(o) {
186
+ for (var i = new Array(o.length), F = 0; F < i.length; ++F)
187
+ i[F] = o[F].listener || o[F];
188
+ return i;
189
+ }
190
+ function s(o, i) {
191
+ return new Promise(function(F, M) {
192
+ function y(Y) {
193
+ o.removeListener(i, S), M(Y);
194
194
  }
195
- function R() {
196
- typeof w.removeListener == "function" && w.removeListener("error", M), o([].slice.call(arguments));
195
+ function S() {
196
+ typeof o.removeListener == "function" && o.removeListener("error", y), F([].slice.call(arguments));
197
197
  }
198
- CA(w, E, R, { once: !0 }), E !== "error" && RA(w, M, { once: !0 });
198
+ V(o, i, S, { once: !0 }), i !== "error" && u(o, y, { once: !0 });
199
199
  });
200
200
  }
201
- function RA(w, E, o) {
202
- typeof w.on == "function" && CA(w, "error", E, o);
201
+ function u(o, i, F) {
202
+ typeof o.on == "function" && V(o, "error", i, F);
203
203
  }
204
- function CA(w, E, o, k) {
205
- if (typeof w.on == "function")
206
- k.once ? w.once(E, o) : w.on(E, o);
207
- else if (typeof w.addEventListener == "function")
208
- w.addEventListener(E, function M(R) {
209
- k.once && w.removeEventListener(E, M), o(R);
204
+ function V(o, i, F, M) {
205
+ if (typeof o.on == "function")
206
+ M.once ? o.once(i, F) : o.on(i, F);
207
+ else if (typeof o.addEventListener == "function")
208
+ o.addEventListener(i, function y(S) {
209
+ M.once && o.removeEventListener(i, y), F(S);
210
210
  });
211
211
  else
212
- throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof w);
212
+ throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof o);
213
213
  }
214
- return b.exports;
214
+ return e.exports;
215
215
  }
216
- var SA = JA();
217
- const MA = /* @__PURE__ */ UA(SA);
218
- class $ {
216
+ var jA = xA();
217
+ const cA = /* @__PURE__ */ OA(jA);
218
+ class EA {
219
219
  __destroy_into_raw() {
220
220
  const A = this.__wbg_ptr;
221
- return this.__wbg_ptr = 0, wA.unregister(this), A;
221
+ return this.__wbg_ptr = 0, kA.unregister(this), A;
222
222
  }
223
223
  free() {
224
224
  const A = this.__destroy_into_raw();
225
- F.__wbg_dapadapter_free(A, 0);
225
+ G.__wbg_dapadapter_free(A, 0);
226
226
  }
227
227
  /**
228
228
  * Attaches a worker to the adapter.
@@ -233,80 +233,80 @@ class $ {
233
233
  * @param {Worker} worker
234
234
  */
235
235
  attach(A) {
236
- F.dapadapter_attach(this.__wbg_ptr, A);
236
+ G.dapadapter_attach(this.__wbg_ptr, A);
237
237
  }
238
238
  /**
239
239
  * Retire the listener without borrowing session state (callbacks can synchronously Stop).
240
240
  */
241
241
  detach() {
242
- F.dapadapter_detach(this.__wbg_ptr);
242
+ G.dapadapter_detach(this.__wbg_ptr);
243
243
  }
244
244
  constructor() {
245
- const A = F.dapadapter_new();
246
- return this.__wbg_ptr = A >>> 0, wA.register(this, this.__wbg_ptr, this), this;
245
+ const A = G.dapadapter_new();
246
+ return this.__wbg_ptr = A >>> 0, kA.register(this, this.__wbg_ptr, this), this;
247
247
  }
248
248
  /**
249
249
  * @param {Function} callback
250
250
  */
251
251
  on(A) {
252
- F.dapadapter_on(this.__wbg_ptr, A);
252
+ G.dapadapter_on(this.__wbg_ptr, A);
253
253
  }
254
254
  resetRun() {
255
- F.dapadapter_resetRun(this.__wbg_ptr);
255
+ G.dapadapter_resetRun(this.__wbg_ptr);
256
256
  }
257
257
  /**
258
258
  * @param {any} msg
259
259
  * @returns {any}
260
260
  */
261
261
  sendMessage(A) {
262
- return F.dapadapter_sendMessage(this.__wbg_ptr, A);
262
+ return G.dapadapter_sendMessage(this.__wbg_ptr, A);
263
263
  }
264
264
  /**
265
265
  * @param {boolean} value
266
266
  */
267
267
  setFilterInternals(A) {
268
- F.dapadapter_setFilterInternals(this.__wbg_ptr, A);
268
+ G.dapadapter_setFilterInternals(this.__wbg_ptr, A);
269
269
  }
270
270
  }
271
- Symbol.dispose && ($.prototype[Symbol.dispose] = $.prototype.free);
272
- class P {
271
+ Symbol.dispose && (EA.prototype[Symbol.dispose] = EA.prototype.free);
272
+ class n {
273
273
  static __wrap(A) {
274
274
  A = A >>> 0;
275
- const g = Object.create(P.prototype);
276
- return g.__wbg_ptr = A, iA.register(g, g.__wbg_ptr, g), g;
275
+ const I = Object.create(n.prototype);
276
+ return I.__wbg_ptr = A, KA.register(I, I.__wbg_ptr, I), I;
277
277
  }
278
278
  __destroy_into_raw() {
279
279
  const A = this.__wbg_ptr;
280
- return this.__wbg_ptr = 0, iA.unregister(this), A;
280
+ return this.__wbg_ptr = 0, KA.unregister(this), A;
281
281
  }
282
282
  free() {
283
283
  const A = this.__destroy_into_raw();
284
- F.__wbg_trap_free(A, 0);
284
+ G.__wbg_trap_free(A, 0);
285
285
  }
286
286
  /**
287
287
  * A marker method to indicate that an object is an instance of the `Trap`
288
288
  * class.
289
289
  */
290
290
  static __wbg_wasmer_trap() {
291
- F.trap___wbg_wasmer_trap();
291
+ G.trap___wbg_wasmer_trap();
292
292
  }
293
293
  }
294
- Symbol.dispose && (P.prototype[Symbol.dispose] = P.prototype.free);
295
- function hA() {
294
+ Symbol.dispose && (n.prototype[Symbol.dispose] = n.prototype.free);
295
+ function dA() {
296
296
  let Q, A;
297
297
  try {
298
- const g = F.cpp_exception_hash();
299
- return Q = g[0], A = g[1], s(g[0], g[1]);
298
+ const I = G.cpp_exception_hash();
299
+ return Q = I[0], A = I[1], q(I[0], I[1]);
300
300
  } finally {
301
- F.__wbindgen_free(Q, A, 1);
301
+ G.__wbindgen_free(Q, A, 1);
302
302
  }
303
303
  }
304
- function EA(Q) {
305
- const A = x(Q, F.__wbindgen_malloc, F.__wbindgen_realloc), g = V, I = F.prefetch_urls(A, g);
306
- var C = GA(I[0], I[1]).slice();
307
- return F.__wbindgen_free(I[0], I[1] * 4, 4), C;
304
+ function GA(Q) {
305
+ const A = T(Q, G.__wbindgen_malloc, G.__wbindgen_realloc), I = d, g = G.prefetch_urls(A, I);
306
+ var C = lA(g[0], g[1]).slice();
307
+ return G.__wbindgen_free(g[0], g[1] * 4, 4), C;
308
308
  }
309
- function LA() {
309
+ function WA() {
310
310
  return {
311
311
  __proto__: null,
312
312
  "./engine_bg.js": {
@@ -314,33 +314,33 @@ function LA() {
314
314
  __wbg_BigInt_b7bbccdff258c9f2: function(A) {
315
315
  return BigInt(A);
316
316
  },
317
- __wbg_Error_8c4e43fe74559d73: function(A, g) {
318
- return Error(s(A, g));
317
+ __wbg_Error_8c4e43fe74559d73: function(A, I) {
318
+ return Error(q(A, I));
319
319
  },
320
320
  __wbg_Number_04624de7d0e8332d: function(A) {
321
321
  return Number(A);
322
322
  },
323
- __wbg_String_8f0eb39a4a4c2f66: function(A, g) {
324
- const I = String(g), C = x(I, F.__wbindgen_malloc, F.__wbindgen_realloc), B = V;
325
- h().setInt32(A + 4, B, !0), h().setInt32(A + 0, C, !0);
323
+ __wbg_String_8f0eb39a4a4c2f66: function(A, I) {
324
+ const g = String(I), C = T(g, G.__wbindgen_malloc, G.__wbindgen_realloc), B = d;
325
+ a().setInt32(A + 4, B, !0), a().setInt32(A + 0, C, !0);
326
326
  },
327
- __wbg___wbindgen_bigint_get_as_i64_8fcf4ce7f1ca72a2: function(A, g) {
328
- const I = g, C = typeof I == "bigint" ? I : void 0;
329
- h().setBigInt64(A + 8, p(C) ? BigInt(0) : C, !0), h().setInt32(A + 0, !p(C), !0);
327
+ __wbg___wbindgen_bigint_get_as_i64_8fcf4ce7f1ca72a2: function(A, I) {
328
+ const g = I, C = typeof g == "bigint" ? g : void 0;
329
+ a().setBigInt64(A + 8, x(C) ? BigInt(0) : C, !0), a().setInt32(A + 0, !x(C), !0);
330
330
  },
331
331
  __wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25: function(A) {
332
- const g = A, I = typeof g == "boolean" ? g : void 0;
333
- return p(I) ? 16777215 : I ? 1 : 0;
332
+ const I = A, g = typeof I == "boolean" ? I : void 0;
333
+ return x(g) ? 16777215 : g ? 1 : 0;
334
334
  },
335
- __wbg___wbindgen_debug_string_0bc8482c6e3508ae: function(A, g) {
336
- const I = AA(g), C = x(I, F.__wbindgen_malloc, F.__wbindgen_realloc), B = V;
337
- h().setInt32(A + 4, B, !0), h().setInt32(A + 0, C, !0);
335
+ __wbg___wbindgen_debug_string_0bc8482c6e3508ae: function(A, I) {
336
+ const g = DA(I), C = T(g, G.__wbindgen_malloc, G.__wbindgen_realloc), B = d;
337
+ a().setInt32(A + 4, B, !0), a().setInt32(A + 0, C, !0);
338
338
  },
339
339
  __wbg___wbindgen_function_table_5ae7216dfcbcc506: function() {
340
- return F.__wbindgen_export;
340
+ return G.__wbindgen_export;
341
341
  },
342
- __wbg___wbindgen_in_47fa6863be6f2f25: function(A, g) {
343
- return A in g;
342
+ __wbg___wbindgen_in_47fa6863be6f2f25: function(A, I) {
343
+ return A in I;
344
344
  },
345
345
  __wbg___wbindgen_is_bigint_31b12575b56f32fc: function(A) {
346
346
  return typeof A == "bigint";
@@ -349,8 +349,8 @@ function LA() {
349
349
  return typeof A == "function";
350
350
  },
351
351
  __wbg___wbindgen_is_object_5ae8e5880f2c1fbd: function(A) {
352
- const g = A;
353
- return typeof g == "object" && g !== null;
352
+ const I = A;
353
+ return typeof I == "object" && I !== null;
354
354
  },
355
355
  __wbg___wbindgen_is_string_cd444516edc5b180: function(A) {
356
356
  return typeof A == "string";
@@ -358,64 +358,64 @@ function LA() {
358
358
  __wbg___wbindgen_is_undefined_9e4d92534c42d778: function(A) {
359
359
  return A === void 0;
360
360
  },
361
- __wbg___wbindgen_jsval_eq_11888390b0186270: function(A, g) {
362
- return A === g;
361
+ __wbg___wbindgen_jsval_eq_11888390b0186270: function(A, I) {
362
+ return A === I;
363
363
  },
364
- __wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811: function(A, g) {
365
- return A == g;
364
+ __wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811: function(A, I) {
365
+ return A == I;
366
366
  },
367
- __wbg___wbindgen_lt_bb59cc3d23526e0d: function(A, g) {
368
- return A < g;
367
+ __wbg___wbindgen_lt_bb59cc3d23526e0d: function(A, I) {
368
+ return A < I;
369
369
  },
370
370
  __wbg___wbindgen_neg_6b4d356dff49dcc6: function(A) {
371
371
  return -A;
372
372
  },
373
- __wbg___wbindgen_number_get_8ff4255516ccad3e: function(A, g) {
374
- const I = g, C = typeof I == "number" ? I : void 0;
375
- h().setFloat64(A + 8, p(C) ? 0 : C, !0), h().setInt32(A + 0, !p(C), !0);
373
+ __wbg___wbindgen_number_get_8ff4255516ccad3e: function(A, I) {
374
+ const g = I, C = typeof g == "number" ? g : void 0;
375
+ a().setFloat64(A + 8, x(C) ? 0 : C, !0), a().setInt32(A + 0, !x(C), !0);
376
376
  },
377
377
  __wbg___wbindgen_rethrow_05525c567f154472: function(A) {
378
378
  throw A;
379
379
  },
380
- __wbg___wbindgen_shr_ef8e07cce709eb54: function(A, g) {
381
- return A >> g;
380
+ __wbg___wbindgen_shr_ef8e07cce709eb54: function(A, I) {
381
+ return A >> I;
382
382
  },
383
- __wbg___wbindgen_string_get_72fb696202c56729: function(A, g) {
384
- const I = g, C = typeof I == "string" ? I : void 0;
385
- var B = p(C) ? 0 : x(C, F.__wbindgen_malloc, F.__wbindgen_realloc), i = V;
386
- h().setInt32(A + 4, i, !0), h().setInt32(A + 0, B, !0);
383
+ __wbg___wbindgen_string_get_72fb696202c56729: function(A, I) {
384
+ const g = I, C = typeof g == "string" ? g : void 0;
385
+ var B = x(C) ? 0 : T(C, G.__wbindgen_malloc, G.__wbindgen_realloc), E = d;
386
+ a().setInt32(A + 4, E, !0), a().setInt32(A + 0, B, !0);
387
387
  },
388
- __wbg___wbindgen_throw_be289d5034ed271b: function(A, g) {
389
- throw new Error(s(A, g));
388
+ __wbg___wbindgen_throw_be289d5034ed271b: function(A, I) {
389
+ throw new Error(q(A, I));
390
390
  },
391
391
  __wbg__wbg_cb_unref_d9b87ff7982e3b21: function(A) {
392
392
  A._wbg_cb_unref();
393
393
  },
394
394
  __wbg_addEventListener_3acb0aad4483804c: function() {
395
- return K(function(A, g, I, C) {
396
- A.addEventListener(s(g, I), C);
395
+ return J(function(A, I, g, C) {
396
+ A.addEventListener(q(I, g), C);
397
397
  }, arguments);
398
398
  },
399
399
  __wbg_apply_2e22c45cb4f12415: function() {
400
- return K(function(A, g, I) {
401
- return Reflect.apply(A, g, I);
400
+ return J(function(A, I, g) {
401
+ return Reflect.apply(A, I, g);
402
402
  }, arguments);
403
403
  },
404
404
  __wbg_apply_ada2ee1a60ac7b3c: function() {
405
- return K(function(A, g, I) {
406
- return A.apply(g, I);
405
+ return J(function(A, I, g) {
406
+ return A.apply(I, g);
407
407
  }, arguments);
408
408
  },
409
409
  __wbg_arrayBuffer_bb54076166006c39: function() {
410
- return K(function(A) {
410
+ return J(function(A) {
411
411
  return A.arrayBuffer();
412
412
  }, arguments);
413
413
  },
414
- __wbg_bind_1dc37de2b9939128: function(A, g, I, C) {
415
- return A.bind(g, I, C);
414
+ __wbg_bind_1dc37de2b9939128: function(A, I, g, C) {
415
+ return A.bind(I, g, C);
416
416
  },
417
- __wbg_bind_29ba380591735d8c: function(A, g, I) {
418
- return A.bind(g, I);
417
+ __wbg_bind_29ba380591735d8c: function(A, I, g) {
418
+ return A.bind(I, g);
419
419
  },
420
420
  __wbg_buffer_7b5f53e46557d8f1: function(A) {
421
421
  return A.buffer;
@@ -427,18 +427,18 @@ function LA() {
427
427
  return A.byteLength;
428
428
  },
429
429
  __wbg_call_389efe28435a9388: function() {
430
- return K(function(A, g) {
431
- return A.call(g);
430
+ return J(function(A, I) {
431
+ return A.call(I);
432
432
  }, arguments);
433
433
  },
434
434
  __wbg_call_4708e0c13bdc8e95: function() {
435
- return K(function(A, g, I) {
436
- return A.call(g, I);
435
+ return J(function(A, I, g) {
436
+ return A.call(I, g);
437
437
  }, arguments);
438
438
  },
439
439
  __wbg_compareExchange_b578410c358e695e: function() {
440
- return K(function(A, g, I, C) {
441
- return Atomics.compareExchange(A, g >>> 0, I, C);
440
+ return J(function(A, I, g, C) {
441
+ return Atomics.compareExchange(A, I >>> 0, g, C);
442
442
  }, arguments);
443
443
  },
444
444
  __wbg_constructor_ad6c0ed428f55d34: function(A) {
@@ -447,8 +447,8 @@ function LA() {
447
447
  __wbg_crypto_86f2631e91b51511: function(A) {
448
448
  return A.crypto;
449
449
  },
450
- __wbg_customSections_193491b069139fb1: function(A, g, I) {
451
- return WebAssembly.Module.customSections(A, s(g, I));
450
+ __wbg_customSections_193491b069139fb1: function(A, I, g) {
451
+ return WebAssembly.Module.customSections(A, q(I, g));
452
452
  },
453
453
  __wbg_data_5330da50312d0bc1: function(A) {
454
454
  return A.data;
@@ -459,12 +459,12 @@ function LA() {
459
459
  __wbg_entries_58c7934c745daac7: function(A) {
460
460
  return Object.entries(A);
461
461
  },
462
- __wbg_error_7534b8e9a36f1ab4: function(A, g) {
463
- let I, C;
462
+ __wbg_error_7534b8e9a36f1ab4: function(A, I) {
463
+ let g, C;
464
464
  try {
465
- I = A, C = g, console.error(s(A, g));
465
+ g = A, C = I, console.error(q(A, I));
466
466
  } finally {
467
- F.__wbindgen_free(I, C, 1);
467
+ G.__wbindgen_free(g, C, 1);
468
468
  }
469
469
  },
470
470
  __wbg_exports_794a42000dacd046: function(A) {
@@ -473,20 +473,20 @@ function LA() {
473
473
  __wbg_exports_86b4926134c40288: function(A) {
474
474
  return A.exports;
475
475
  },
476
- __wbg_fetch_d1488f40cef1e210: function(A, g, I) {
477
- return A.fetch(s(g, I));
476
+ __wbg_fetch_d1488f40cef1e210: function(A, I, g) {
477
+ return A.fetch(q(I, g));
478
478
  },
479
479
  __wbg_from_bddd64e7d5ff6941: function(A) {
480
480
  return Array.from(A);
481
481
  },
482
482
  __wbg_getPrototypeOf_2653517f1dc884d5: function() {
483
- return K(function(A) {
483
+ return J(function(A) {
484
484
  return Reflect.getPrototypeOf(A);
485
485
  }, arguments);
486
486
  },
487
487
  __wbg_getRandomValues_b3f15fcbfabb0f8b: function() {
488
- return K(function(A, g) {
489
- A.getRandomValues(g);
488
+ return J(function(A, I) {
489
+ A.getRandomValues(I);
490
490
  }, arguments);
491
491
  },
492
492
  __wbg_getTime_1e3cd1391c5c3995: function(A) {
@@ -495,169 +495,169 @@ function LA() {
495
495
  __wbg_getTimezoneOffset_81776d10a4ec18a8: function(A) {
496
496
  return A.getTimezoneOffset();
497
497
  },
498
- __wbg_getUint32_bb6f5a401408e7fa: function(A, g, I) {
499
- return A.getUint32(g >>> 0, I !== 0);
498
+ __wbg_getUint32_bb6f5a401408e7fa: function(A, I, g) {
499
+ return A.getUint32(I >>> 0, g !== 0);
500
500
  },
501
501
  __wbg_get_7efbcc3819719b0f: function() {
502
- return K(function(A, g) {
503
- return A.get(g >>> 0);
502
+ return J(function(A, I) {
503
+ return A.get(I >>> 0);
504
504
  }, arguments);
505
505
  },
506
- __wbg_get_9b94d73e6221f75c: function(A, g) {
507
- return A[g >>> 0];
506
+ __wbg_get_9b94d73e6221f75c: function(A, I) {
507
+ return A[I >>> 0];
508
508
  },
509
509
  __wbg_get_b3ed3ad4be2bc8ac: function() {
510
- return K(function(A, g) {
511
- return Reflect.get(A, g);
510
+ return J(function(A, I) {
511
+ return Reflect.get(A, I);
512
512
  }, arguments);
513
513
  },
514
- __wbg_get_index_253dd2a9e007656d: function(A, g) {
515
- return A[g >>> 0];
514
+ __wbg_get_index_253dd2a9e007656d: function(A, I) {
515
+ return A[I >>> 0];
516
516
  },
517
- __wbg_get_index_9a5bfdd2ca49c65f: function(A, g) {
518
- return A[g >>> 0];
517
+ __wbg_get_index_9a5bfdd2ca49c65f: function(A, I) {
518
+ return A[I >>> 0];
519
519
  },
520
- __wbg_get_with_ref_key_1dc361bd10053bfe: function(A, g) {
521
- return A[g];
520
+ __wbg_get_with_ref_key_1dc361bd10053bfe: function(A, I) {
521
+ return A[I];
522
522
  },
523
523
  __wbg_grow_5d42bf28c2da22cb: function() {
524
- return K(function(A, g) {
525
- return A.grow(g >>> 0);
524
+ return J(function(A, I) {
525
+ return A.grow(I >>> 0);
526
526
  }, arguments);
527
527
  },
528
528
  __wbg_grow_d034989fce14cc8e: function() {
529
- return K(function(A, g) {
530
- return A.grow(g >>> 0);
529
+ return J(function(A, I) {
530
+ return A.grow(I >>> 0);
531
531
  }, arguments);
532
532
  },
533
533
  __wbg_imports_8333d40ab24779ad: function(A) {
534
534
  return WebAssembly.Module.imports(A);
535
535
  },
536
536
  __wbg_instanceof_ArrayBuffer_c367199e2fa2aa04: function(A) {
537
- let g;
537
+ let I;
538
538
  try {
539
- g = A instanceof ArrayBuffer;
539
+ I = A instanceof ArrayBuffer;
540
540
  } catch {
541
- g = !1;
541
+ I = !1;
542
542
  }
543
- return g;
543
+ return I;
544
544
  },
545
545
  __wbg_instanceof_Error_8573fe0b0b480f46: function(A) {
546
- let g;
546
+ let I;
547
547
  try {
548
- g = A instanceof Error;
548
+ I = A instanceof Error;
549
549
  } catch {
550
- g = !1;
550
+ I = !1;
551
551
  }
552
- return g;
552
+ return I;
553
553
  },
554
554
  __wbg_instanceof_Function_2a29eec978bb3b11: function(A) {
555
- let g;
555
+ let I;
556
556
  try {
557
- g = A instanceof Function;
557
+ I = A instanceof Function;
558
558
  } catch {
559
- g = !1;
559
+ I = !1;
560
560
  }
561
- return g;
561
+ return I;
562
562
  },
563
563
  __wbg_instanceof_Global_2db767b6b2347f01: function(A) {
564
- let g;
564
+ let I;
565
565
  try {
566
- g = A instanceof WebAssembly.Global;
566
+ I = A instanceof WebAssembly.Global;
567
567
  } catch {
568
- g = !1;
568
+ I = !1;
569
569
  }
570
- return g;
570
+ return I;
571
571
  },
572
572
  __wbg_instanceof_Map_53af74335dec57f4: function(A) {
573
- let g;
573
+ let I;
574
574
  try {
575
- g = A instanceof Map;
575
+ I = A instanceof Map;
576
576
  } catch {
577
- g = !1;
577
+ I = !1;
578
578
  }
579
- return g;
579
+ return I;
580
580
  },
581
581
  __wbg_instanceof_Memory_dc8c61e3f831ee37: function(A) {
582
- let g;
582
+ let I;
583
583
  try {
584
- g = A instanceof WebAssembly.Memory;
584
+ I = A instanceof WebAssembly.Memory;
585
585
  } catch {
586
- g = !1;
586
+ I = !1;
587
587
  }
588
- return g;
588
+ return I;
589
589
  },
590
590
  __wbg_instanceof_Module_d0d412b14363ba9a: function(A) {
591
- let g;
591
+ let I;
592
592
  try {
593
- g = A instanceof WebAssembly.Module;
593
+ I = A instanceof WebAssembly.Module;
594
594
  } catch {
595
- g = !1;
595
+ I = !1;
596
596
  }
597
- return g;
597
+ return I;
598
598
  },
599
599
  __wbg_instanceof_Object_1c6af87502b733ed: function(A) {
600
- let g;
600
+ let I;
601
601
  try {
602
- g = A instanceof Object;
602
+ I = A instanceof Object;
603
603
  } catch {
604
- g = !1;
604
+ I = !1;
605
605
  }
606
- return g;
606
+ return I;
607
607
  },
608
608
  __wbg_instanceof_RangeError_0b0dd056bc557b89: function(A) {
609
- let g;
609
+ let I;
610
610
  try {
611
- g = A instanceof RangeError;
611
+ I = A instanceof RangeError;
612
612
  } catch {
613
- g = !1;
613
+ I = !1;
614
614
  }
615
- return g;
615
+ return I;
616
616
  },
617
617
  __wbg_instanceof_Response_ee1d54d79ae41977: function(A) {
618
- let g;
618
+ let I;
619
619
  try {
620
- g = A instanceof Response;
620
+ I = A instanceof Response;
621
621
  } catch {
622
- g = !1;
622
+ I = !1;
623
623
  }
624
- return g;
624
+ return I;
625
625
  },
626
626
  __wbg_instanceof_SharedArrayBuffer_91d8a2fa16a2cc26: function(A) {
627
- let g;
627
+ let I;
628
628
  try {
629
- g = A instanceof SharedArrayBuffer;
629
+ I = A instanceof SharedArrayBuffer;
630
630
  } catch {
631
- g = !1;
631
+ I = !1;
632
632
  }
633
- return g;
633
+ return I;
634
634
  },
635
635
  __wbg_instanceof_Table_127f216e592f4159: function(A) {
636
- let g;
636
+ let I;
637
637
  try {
638
- g = A instanceof WebAssembly.Table;
638
+ I = A instanceof WebAssembly.Table;
639
639
  } catch {
640
- g = !1;
640
+ I = !1;
641
641
  }
642
- return g;
642
+ return I;
643
643
  },
644
644
  __wbg_instanceof_Tag_f1d6b24a98b95210: function(A) {
645
- let g;
645
+ let I;
646
646
  try {
647
- g = A instanceof WebAssembly.Tag;
647
+ I = A instanceof WebAssembly.Tag;
648
648
  } catch {
649
- g = !1;
649
+ I = !1;
650
650
  }
651
- return g;
651
+ return I;
652
652
  },
653
653
  __wbg_instanceof_Uint8Array_9b9075935c74707c: function(A) {
654
- let g;
654
+ let I;
655
655
  try {
656
- g = A instanceof Uint8Array;
656
+ I = A instanceof Uint8Array;
657
657
  } catch {
658
- g = !1;
658
+ I = !1;
659
659
  }
660
- return g;
660
+ return I;
661
661
  },
662
662
  __wbg_isArray_d314bb98fcf08331: function(A) {
663
663
  return Array.isArray(A);
@@ -665,8 +665,8 @@ function LA() {
665
665
  __wbg_isSafeInteger_bfbc7332a9768d2a: function(A) {
666
666
  return Number.isSafeInteger(A);
667
667
  },
668
- __wbg_is_f29129f676e5410c: function(A, g) {
669
- return Object.is(A, g);
668
+ __wbg_is_f29129f676e5410c: function(A, I) {
669
+ return Object.is(A, I);
670
670
  },
671
671
  __wbg_iterator_6ff6560ca1568e55: function() {
672
672
  return Symbol.iterator;
@@ -681,8 +681,8 @@ function LA() {
681
681
  return A.length;
682
682
  },
683
683
  __wbg_load_eff64ff5e429a422: function() {
684
- return K(function(A, g) {
685
- return Atomics.load(A, g >>> 0);
684
+ return J(function(A, I) {
685
+ return Atomics.load(A, I >>> 0);
686
686
  }, arguments);
687
687
  },
688
688
  __wbg_message_9ddc4b9a62a7c379: function(A) {
@@ -691,19 +691,14 @@ function LA() {
691
691
  __wbg_msCrypto_d562bbe83e0d4b91: function(A) {
692
692
  return A.msCrypto;
693
693
  },
694
- __wbg_new_0728bd2d4c5d41dd: function() {
695
- return K(function(A) {
696
- return new WebAssembly.Tag(A);
697
- }, arguments);
698
- },
699
694
  __wbg_new_0_73afc35eb544e539: function() {
700
695
  return /* @__PURE__ */ new Date();
701
696
  },
702
697
  __wbg_new_245cd5c49157e602: function(A) {
703
698
  return new Date(A);
704
699
  },
705
- __wbg_new_2ac7fa8be584d280: function(A, g, I) {
706
- return new DataView(A, g >>> 0, I >>> 0);
700
+ __wbg_new_2ac7fa8be584d280: function(A, I, g) {
701
+ return new DataView(A, I >>> 0, g >>> 0);
707
702
  },
708
703
  __wbg_new_361308b2356cecd0: function() {
709
704
  return new Object();
@@ -712,47 +707,42 @@ function LA() {
712
707
  return new Array();
713
708
  },
714
709
  __wbg_new_4a996a46a82782b6: function() {
715
- return K(function(A, g) {
716
- return new WebAssembly.Global(A, g);
710
+ return J(function(A, I) {
711
+ return new WebAssembly.Global(A, I);
717
712
  }, arguments);
718
713
  },
719
714
  __wbg_new_57c27ff3ddf5b62c: function() {
720
- return K(function(A) {
715
+ return J(function(A) {
721
716
  return new WebAssembly.Module(A);
722
717
  }, arguments);
723
718
  },
724
- __wbg_new_67274f72d5abea37: function() {
725
- return K(function(A) {
726
- return new WebAssembly.Table(A);
727
- }, arguments);
728
- },
729
719
  __wbg_new_8a6f238a6ece86ea: function() {
730
720
  return new Error();
731
721
  },
732
722
  __wbg_new_a4e3cab1cdd635ba: function() {
733
- return K(function(A, g) {
734
- return new WebAssembly.Instance(A, g);
723
+ return J(function(A, I) {
724
+ return new WebAssembly.Instance(A, I);
735
725
  }, arguments);
736
726
  },
737
727
  __wbg_new_b061c0550d9f3281: function() {
738
- return K(function(A) {
728
+ return J(function(A) {
739
729
  return new WebAssembly.Memory(A);
740
730
  }, arguments);
741
731
  },
742
- __wbg_new_b5d9e2fb389fef91: function(A, g) {
732
+ __wbg_new_b5d9e2fb389fef91: function(A, I) {
743
733
  try {
744
- var I = { a: A, b: g }, C = (i, D) => {
745
- const N = I.a;
746
- I.a = 0;
734
+ var g = { a: A, b: I }, C = (E, D) => {
735
+ const w = g.a;
736
+ g.a = 0;
747
737
  try {
748
- return qA(N, I.b, i, D);
738
+ return zA(w, g.b, E, D);
749
739
  } finally {
750
- I.a = N;
740
+ g.a = w;
751
741
  }
752
742
  };
753
743
  return new Promise(C);
754
744
  } finally {
755
- I.a = I.b = 0;
745
+ g.a = g.b = 0;
756
746
  }
757
747
  },
758
748
  __wbg_new_ca409f861989e0c5: function(A) {
@@ -764,23 +754,23 @@ function LA() {
764
754
  __wbg_new_dd2b680c8bf6ae29: function(A) {
765
755
  return new Uint8Array(A);
766
756
  },
767
- __wbg_new_from_slice_a3d2629dc1826784: function(A, g) {
768
- return new Uint8Array(X(A, g));
757
+ __wbg_new_from_slice_a3d2629dc1826784: function(A, I) {
758
+ return new Uint8Array(_(A, I));
769
759
  },
770
- __wbg_new_no_args_1c7c842f08d00ebb: function(A, g) {
771
- return new Function(s(A, g));
760
+ __wbg_new_no_args_1c7c842f08d00ebb: function(A, I) {
761
+ return new Function(q(A, I));
772
762
  },
773
- __wbg_new_with_args_7bba34e94b1cfa40: function(A, g, I, C) {
774
- return new Function(s(A, g), s(I, C));
763
+ __wbg_new_with_args_7bba34e94b1cfa40: function(A, I, g, C) {
764
+ return new Function(q(A, I), q(g, C));
775
765
  },
776
- __wbg_new_with_byte_offset_9120ba79e057895b: function(A, g) {
777
- return new Uint8Array(A, g >>> 0);
766
+ __wbg_new_with_byte_offset_9120ba79e057895b: function(A, I) {
767
+ return new Uint8Array(A, I >>> 0);
778
768
  },
779
- __wbg_new_with_byte_offset_and_length_aa261d9c9da49eb1: function(A, g, I) {
780
- return new Uint8Array(A, g >>> 0, I >>> 0);
769
+ __wbg_new_with_byte_offset_and_length_aa261d9c9da49eb1: function(A, I, g) {
770
+ return new Uint8Array(A, I >>> 0, g >>> 0);
781
771
  },
782
- __wbg_new_with_byte_offset_and_length_bc2e7b72cc96d1c1: function(A, g, I) {
783
- return new Int32Array(A, g >>> 0, I >>> 0);
772
+ __wbg_new_with_byte_offset_and_length_bc2e7b72cc96d1c1: function(A, I, g) {
773
+ return new Int32Array(A, I >>> 0, g >>> 0);
784
774
  },
785
775
  __wbg_new_with_length_1763c527b2923202: function(A) {
786
776
  return new Array(A >>> 0);
@@ -789,7 +779,7 @@ function LA() {
789
779
  return new Uint8Array(A >>> 0);
790
780
  },
791
781
  __wbg_next_3482f54c49e8af19: function() {
792
- return K(function(A) {
782
+ return J(function(A) {
793
783
  return A.next();
794
784
  }, arguments);
795
785
  },
@@ -800,8 +790,8 @@ function LA() {
800
790
  return A.node;
801
791
  },
802
792
  __wbg_notify_78a90977fab74963: function() {
803
- return K(function(A, g) {
804
- return Atomics.notify(A, g >>> 0);
793
+ return J(function(A, I) {
794
+ return Atomics.notify(A, I >>> 0);
805
795
  }, arguments);
806
796
  },
807
797
  __wbg_now_a3af9a2f4bbaa4d1: function() {
@@ -814,18 +804,18 @@ function LA() {
814
804
  return A.ok;
815
805
  },
816
806
  __wbg_postMessage_2041f4e90af61318: function() {
817
- return K(function(A, g) {
818
- A.postMessage(g);
807
+ return J(function(A, I) {
808
+ A.postMessage(I);
819
809
  }, arguments);
820
810
  },
821
811
  __wbg_process_3975fd6c72f520aa: function(A) {
822
812
  return A.process;
823
813
  },
824
- __wbg_prototypesetcall_bdcdcc5842e4d77d: function(A, g, I) {
825
- Uint8Array.prototype.set.call(X(A, g), I);
814
+ __wbg_prototypesetcall_bdcdcc5842e4d77d: function(A, I, g) {
815
+ Uint8Array.prototype.set.call(_(A, I), g);
826
816
  },
827
- __wbg_push_8ffdcb2063340ba5: function(A, g) {
828
- return A.push(g);
817
+ __wbg_push_8ffdcb2063340ba5: function(A, I) {
818
+ return A.push(I);
829
819
  },
830
820
  __wbg_queueMicrotask_0aa0a927f78f5d98: function(A) {
831
821
  return A.queueMicrotask;
@@ -834,17 +824,17 @@ function LA() {
834
824
  queueMicrotask(A);
835
825
  },
836
826
  __wbg_randomFillSync_f8c153b79f285817: function() {
837
- return K(function(A, g) {
838
- A.randomFillSync(g);
827
+ return J(function(A, I) {
828
+ A.randomFillSync(I);
839
829
  }, arguments);
840
830
  },
841
831
  __wbg_removeEventListener_e63328781a5b9af9: function() {
842
- return K(function(A, g, I, C) {
843
- A.removeEventListener(s(g, I), C);
832
+ return J(function(A, I, g, C) {
833
+ A.removeEventListener(q(I, g), C);
844
834
  }, arguments);
845
835
  },
846
836
  __wbg_require_b74f47fc2d022fd6: function() {
847
- return K(function() {
837
+ return J(function() {
848
838
  return module.require;
849
839
  }, arguments);
850
840
  },
@@ -852,99 +842,99 @@ function LA() {
852
842
  return Promise.resolve(A);
853
843
  },
854
844
  __wbg_setTimeout_e0aacd5a637418a6: function() {
855
- return K(function(A, g, I) {
856
- return A.setTimeout(g, I);
845
+ return J(function(A, I, g) {
846
+ return A.setTimeout(I, g);
857
847
  }, arguments);
858
848
  },
859
- __wbg_setUint32_d168af7751a8557e: function(A, g, I, C) {
860
- A.setUint32(g >>> 0, I >>> 0, C !== 0);
849
+ __wbg_setUint32_d168af7751a8557e: function(A, I, g, C) {
850
+ A.setUint32(I >>> 0, g >>> 0, C !== 0);
861
851
  },
862
852
  __wbg_set_0af2522656c2a71b: function() {
863
- return K(function(A, g, I) {
864
- A.set(g >>> 0, I);
853
+ return J(function(A, I, g) {
854
+ A.set(I >>> 0, g);
865
855
  }, arguments);
866
856
  },
867
- __wbg_set_1eb0999cf5d27fc8: function(A, g, I) {
868
- return A.set(g, I);
857
+ __wbg_set_1eb0999cf5d27fc8: function(A, I, g) {
858
+ return A.set(I, g);
869
859
  },
870
- __wbg_set_25cf9deff6bf0ea8: function(A, g, I) {
871
- A.set(g, I >>> 0);
860
+ __wbg_set_25cf9deff6bf0ea8: function(A, I, g) {
861
+ A.set(I, g >>> 0);
872
862
  },
873
- __wbg_set_3f1d0b984ed272ed: function(A, g, I) {
874
- A[g] = I;
863
+ __wbg_set_3f1d0b984ed272ed: function(A, I, g) {
864
+ A[I] = g;
875
865
  },
876
866
  __wbg_set_6cb8631f80447a67: function() {
877
- return K(function(A, g, I) {
878
- return Reflect.set(A, g, I);
867
+ return J(function(A, I, g) {
868
+ return Reflect.set(A, I, g);
879
869
  }, arguments);
880
870
  },
881
- __wbg_set_cc56eefd2dd91957: function(A, g, I) {
882
- A.set(X(g, I));
871
+ __wbg_set_cc56eefd2dd91957: function(A, I, g) {
872
+ A.set(_(I, g));
883
873
  },
884
- __wbg_set_f43e577aea94465b: function(A, g, I) {
885
- A[g >>> 0] = I;
874
+ __wbg_set_f43e577aea94465b: function(A, I, g) {
875
+ A[I >>> 0] = g;
886
876
  },
887
- __wbg_set_index_b3244a6c458021e4: function(A, g, I) {
888
- A[g >>> 0] = I;
877
+ __wbg_set_index_b3244a6c458021e4: function(A, I, g) {
878
+ A[I >>> 0] = g;
889
879
  },
890
- __wbg_set_index_f259b54e97f7b177: function(A, g, I) {
891
- A[g >>> 0] = I;
880
+ __wbg_set_index_f259b54e97f7b177: function(A, I, g) {
881
+ A[I >>> 0] = g;
892
882
  },
893
- __wbg_set_onmessage_ea7cc2ba099021cd: function(A, g) {
894
- A.onmessage = g;
883
+ __wbg_set_onmessage_ea7cc2ba099021cd: function(A, I) {
884
+ A.onmessage = I;
895
885
  },
896
- __wbg_set_value_fc06e541de098215: function(A, g) {
897
- A.value = g;
886
+ __wbg_set_value_fc06e541de098215: function(A, I) {
887
+ A.value = I;
898
888
  },
899
- __wbg_slice_8bbd46adb2100583: function(A, g, I) {
900
- return A.slice(g >>> 0, I >>> 0);
889
+ __wbg_slice_8bbd46adb2100583: function(A, I, g) {
890
+ return A.slice(I >>> 0, g >>> 0);
901
891
  },
902
- __wbg_stack_0ed75d68575b0f3c: function(A, g) {
903
- const I = g.stack, C = x(I, F.__wbindgen_malloc, F.__wbindgen_realloc), B = V;
904
- h().setInt32(A + 4, B, !0), h().setInt32(A + 0, C, !0);
892
+ __wbg_stack_0ed75d68575b0f3c: function(A, I) {
893
+ const g = I.stack, C = T(g, G.__wbindgen_malloc, G.__wbindgen_realloc), B = d;
894
+ a().setInt32(A + 4, B, !0), a().setInt32(A + 0, C, !0);
905
895
  },
906
896
  __wbg_static_accessor_GLOBAL_12837167ad935116: function() {
907
897
  const A = typeof global > "u" ? null : global;
908
- return p(A) ? 0 : Z(A);
898
+ return x(A) ? 0 : f(A);
909
899
  },
910
900
  __wbg_static_accessor_GLOBAL_THIS_e628e89ab3b1c95f: function() {
911
901
  const A = typeof globalThis > "u" ? null : globalThis;
912
- return p(A) ? 0 : Z(A);
902
+ return x(A) ? 0 : f(A);
913
903
  },
914
904
  __wbg_static_accessor_SELF_a621d3dfbb60d0ce: function() {
915
905
  const A = typeof self > "u" ? null : self;
916
- return p(A) ? 0 : Z(A);
906
+ return x(A) ? 0 : f(A);
917
907
  },
918
908
  __wbg_static_accessor_WINDOW_f8727f0cf888e0bd: function() {
919
909
  const A = typeof window > "u" ? null : window;
920
- return p(A) ? 0 : Z(A);
910
+ return x(A) ? 0 : f(A);
921
911
  },
922
912
  __wbg_store_d1d951c98d9bed41: function() {
923
- return K(function(A, g, I) {
924
- return Atomics.store(A, g >>> 0, I);
913
+ return J(function(A, I, g) {
914
+ return Atomics.store(A, I >>> 0, g);
925
915
  }, arguments);
926
916
  },
927
- __wbg_subarray_a96e1fef17ed23cb: function(A, g, I) {
928
- return A.subarray(g >>> 0, I >>> 0);
917
+ __wbg_subarray_a96e1fef17ed23cb: function(A, I, g) {
918
+ return A.subarray(I >>> 0, g >>> 0);
929
919
  },
930
- __wbg_then_0d9fe2c7b1857d32: function(A, g, I) {
931
- return A.then(g, I);
920
+ __wbg_then_0d9fe2c7b1857d32: function(A, I, g) {
921
+ return A.then(I, g);
932
922
  },
933
- __wbg_then_b9e7b3b5f1a9e1b5: function(A, g) {
934
- return A.then(g);
923
+ __wbg_then_b9e7b3b5f1a9e1b5: function(A, I) {
924
+ return A.then(I);
935
925
  },
936
- __wbg_toString_56d946daff83867b: function(A, g, I) {
937
- const C = g.toString(I), B = x(C, F.__wbindgen_malloc, F.__wbindgen_realloc), i = V;
938
- h().setInt32(A + 4, i, !0), h().setInt32(A + 0, B, !0);
926
+ __wbg_toString_56d946daff83867b: function(A, I, g) {
927
+ const C = I.toString(g), B = T(C, G.__wbindgen_malloc, G.__wbindgen_realloc), E = d;
928
+ a().setInt32(A + 4, E, !0), a().setInt32(A + 0, B, !0);
939
929
  },
940
930
  __wbg_toString_964ff7fe6eca8362: function(A) {
941
931
  return A.toString();
942
932
  },
943
933
  __wbg_trap_new: function(A) {
944
- return P.__wrap(A);
934
+ return n.__wrap(A);
945
935
  },
946
936
  __wbg_validate_71c2d02a71bda62f: function() {
947
- return K(function(A) {
937
+ return J(function(A) {
948
938
  return WebAssembly.validate(A);
949
939
  }, arguments);
950
940
  },
@@ -958,30 +948,30 @@ function LA() {
958
948
  return A.versions;
959
949
  },
960
950
  __wbg_wait_be5dae1e53f590f1: function() {
961
- return K(function(A, g, I) {
962
- return Atomics.wait(A, g >>> 0, I);
951
+ return J(function(A, I, g) {
952
+ return Atomics.wait(A, I >>> 0, g);
963
953
  }, arguments);
964
954
  },
965
- __wbg_warn_81ab00e6e16e886d: function(A, g, I) {
966
- console.warn(A, g, I);
955
+ __wbg_warn_81ab00e6e16e886d: function(A, I, g) {
956
+ console.warn(A, I, g);
967
957
  },
968
- __wbindgen_cast_0000000000000001: function(A, g) {
969
- return T(A, g, F.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_for__a__core_37ee0ce0c4cd57d5___ops__function__FnMut____a_js_sys_9eaf8169b8189500___Array____Output___core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue___, DA);
958
+ __wbindgen_cast_0000000000000001: function(A, I) {
959
+ return PA(A, I, G.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_core_37ee0ce0c4cd57d5___ops__function__Fn__web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent____Output_______, ZA);
970
960
  },
971
- __wbindgen_cast_0000000000000002: function(A, g) {
972
- return T(A, g, F.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_for__a__core_37ee0ce0c4cd57d5___ops__function__FnMut____a_js_sys_9eaf8169b8189500___Array____Output___core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue___, DA);
961
+ __wbindgen_cast_0000000000000002: function(A, I) {
962
+ return z(A, I, G.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_core_37ee0ce0c4cd57d5___ops__function__Fn__web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent____Output_______, TA);
973
963
  },
974
- __wbindgen_cast_0000000000000003: function(A, g) {
975
- return T(A, g, F.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_for__a__core_37ee0ce0c4cd57d5___ops__function__FnMut____a_js_sys_9eaf8169b8189500___Array____Output___core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue___, HA);
964
+ __wbindgen_cast_0000000000000003: function(A, I) {
965
+ return z(A, I, G.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_for__a__core_37ee0ce0c4cd57d5___ops__function__FnMut____a_js_sys_9eaf8169b8189500___Array____Output___core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue___, MA);
976
966
  },
977
- __wbindgen_cast_0000000000000004: function(A, g) {
978
- return T(A, g, F.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_core_37ee0ce0c4cd57d5___ops__function__FnMut__wasm_bindgen_36932265c58943ab___JsValue____Output_______, cA);
967
+ __wbindgen_cast_0000000000000004: function(A, I) {
968
+ return z(A, I, G.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_for__a__core_37ee0ce0c4cd57d5___ops__function__FnMut____a_js_sys_9eaf8169b8189500___Array____Output___core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue___, MA);
979
969
  },
980
- __wbindgen_cast_0000000000000005: function(A, g) {
981
- return jA(A, g, F.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_core_37ee0ce0c4cd57d5___ops__function__Fn__web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent____Output_______, sA);
970
+ __wbindgen_cast_0000000000000005: function(A, I) {
971
+ return z(A, I, G.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_for__a__core_37ee0ce0c4cd57d5___ops__function__FnMut____a_js_sys_9eaf8169b8189500___Array____Output___core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue___, tA);
982
972
  },
983
- __wbindgen_cast_0000000000000006: function(A, g) {
984
- return T(A, g, F.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_core_37ee0ce0c4cd57d5___ops__function__Fn__web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent____Output_______, aA);
973
+ __wbindgen_cast_0000000000000006: function(A, I) {
974
+ return z(A, I, G.wasm_bindgen_36932265c58943ab___closure__destroy___dyn_core_37ee0ce0c4cd57d5___ops__function__FnMut__wasm_bindgen_36932265c58943ab___JsValue____Output_______, VA);
985
975
  },
986
976
  __wbindgen_cast_0000000000000007: function(A) {
987
977
  return A;
@@ -989,65 +979,61 @@ function LA() {
989
979
  __wbindgen_cast_0000000000000008: function(A) {
990
980
  return A;
991
981
  },
992
- __wbindgen_cast_0000000000000009: function(A, g) {
993
- return X(A, g);
982
+ __wbindgen_cast_0000000000000009: function(A, I) {
983
+ return _(A, I);
994
984
  },
995
- __wbindgen_cast_000000000000000a: function(A, g) {
996
- return s(A, g);
985
+ __wbindgen_cast_000000000000000a: function(A, I) {
986
+ return q(A, I);
997
987
  },
998
- __wbindgen_cast_000000000000000b: function(A, g) {
999
- return BigInt.asUintN(64, A) | BigInt.asUintN(64, g) << BigInt(64);
988
+ __wbindgen_cast_000000000000000b: function(A, I) {
989
+ return BigInt.asUintN(64, A) | BigInt.asUintN(64, I) << BigInt(64);
1000
990
  },
1001
991
  __wbindgen_cast_000000000000000c: function(A) {
1002
992
  return BigInt.asUintN(64, A);
1003
993
  },
1004
- __wbindgen_cast_000000000000000d: function(A, g) {
1005
- var I = GA(A, g).slice();
1006
- return F.__wbindgen_free(A, g * 4, 4), I;
1007
- },
1008
994
  __wbindgen_init_externref_table: function() {
1009
- const A = F.__wbindgen_externrefs, g = A.grow(4);
1010
- A.set(0, void 0), A.set(g + 0, void 0), A.set(g + 1, null), A.set(g + 2, !0), A.set(g + 3, !1);
995
+ const A = G.__wbindgen_externrefs, I = A.grow(4);
996
+ A.set(0, void 0), A.set(I + 0, void 0), A.set(I + 1, null), A.set(I + 2, !0), A.set(I + 3, !1);
1011
997
  }
1012
998
  }
1013
999
  };
1014
1000
  }
1015
- function cA(Q, A, g) {
1016
- F.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___wasm_bindgen_36932265c58943ab___JsValue_____(Q, A, g);
1001
+ function ZA(Q, A, I) {
1002
+ G.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent_____(Q, A, I);
1017
1003
  }
1018
- function sA(Q, A, g) {
1019
- F.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent_____(Q, A, g);
1004
+ function TA(Q, A, I) {
1005
+ G.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent______1_(Q, A, I);
1020
1006
  }
1021
- function aA(Q, A, g) {
1022
- F.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___web_sys_ca373f7aaf47173f___features__gen_MessageEvent__MessageEvent______1_(Q, A, g);
1007
+ function VA(Q, A, I) {
1008
+ G.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___wasm_bindgen_36932265c58943ab___JsValue_____(Q, A, I);
1023
1009
  }
1024
- function HA(Q, A, g) {
1025
- const I = F.wasm_bindgen_36932265c58943ab___convert__closures________invoke___js_sys_9eaf8169b8189500___Array__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_36932265c58943ab___JsValue__(Q, A, g);
1026
- if (I[1])
1027
- throw gA(I[0]);
1010
+ function tA(Q, A, I) {
1011
+ const g = G.wasm_bindgen_36932265c58943ab___convert__closures________invoke___js_sys_9eaf8169b8189500___Array__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_36932265c58943ab___JsValue__(Q, A, I);
1012
+ if (g[1])
1013
+ throw wA(g[0]);
1028
1014
  }
1029
- function DA(Q, A, g) {
1030
- const I = F.wasm_bindgen_36932265c58943ab___convert__closures________invoke___js_sys_9eaf8169b8189500___Array__core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue__(Q, A, g);
1031
- if (I[2])
1032
- throw gA(I[1]);
1033
- return gA(I[0]);
1015
+ function MA(Q, A, I) {
1016
+ const g = G.wasm_bindgen_36932265c58943ab___convert__closures________invoke___js_sys_9eaf8169b8189500___Array__core_37ee0ce0c4cd57d5___result__Result_js_sys_9eaf8169b8189500___Array__wasm_bindgen_36932265c58943ab___JsValue__(Q, A, I);
1017
+ if (g[2])
1018
+ throw wA(g[1]);
1019
+ return wA(g[0]);
1034
1020
  }
1035
- function qA(Q, A, g, I) {
1036
- F.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___wasm_bindgen_36932265c58943ab___JsValue__wasm_bindgen_36932265c58943ab___JsValue_____(Q, A, g, I);
1021
+ function zA(Q, A, I, g) {
1022
+ G.wasm_bindgen_36932265c58943ab___convert__closures_____invoke___wasm_bindgen_36932265c58943ab___JsValue__wasm_bindgen_36932265c58943ab___JsValue_____(Q, A, I, g);
1037
1023
  }
1038
- const wA = typeof FinalizationRegistry > "u" ? { register: () => {
1024
+ const kA = typeof FinalizationRegistry > "u" ? { register: () => {
1039
1025
  }, unregister: () => {
1040
- } } : new FinalizationRegistry((Q) => F.__wbg_dapadapter_free(Q >>> 0, 1)), iA = typeof FinalizationRegistry > "u" ? { register: () => {
1026
+ } } : new FinalizationRegistry((Q) => G.__wbg_dapadapter_free(Q >>> 0, 1)), KA = typeof FinalizationRegistry > "u" ? { register: () => {
1041
1027
  }, unregister: () => {
1042
- } } : new FinalizationRegistry((Q) => F.__wbg_trap_free(Q >>> 0, 1));
1043
- function Z(Q) {
1044
- const A = F.__externref_table_alloc();
1045
- return F.__wbindgen_externrefs.set(A, Q), A;
1028
+ } } : new FinalizationRegistry((Q) => G.__wbg_trap_free(Q >>> 0, 1));
1029
+ function f(Q) {
1030
+ const A = G.__externref_table_alloc();
1031
+ return G.__wbindgen_externrefs.set(A, Q), A;
1046
1032
  }
1047
- const n = typeof FinalizationRegistry > "u" ? { register: () => {
1033
+ const gA = typeof FinalizationRegistry > "u" ? { register: () => {
1048
1034
  }, unregister: () => {
1049
1035
  } } : new FinalizationRegistry((Q) => Q.dtor(Q.a, Q.b));
1050
- function AA(Q) {
1036
+ function DA(Q) {
1051
1037
  const A = typeof Q;
1052
1038
  if (A == "number" || A == "boolean" || Q == null)
1053
1039
  return `${Q}`;
@@ -1064,148 +1050,148 @@ function AA(Q) {
1064
1050
  if (Array.isArray(Q)) {
1065
1051
  const C = Q.length;
1066
1052
  let B = "[";
1067
- C > 0 && (B += AA(Q[0]));
1068
- for (let i = 1; i < C; i++)
1069
- B += ", " + AA(Q[i]);
1053
+ C > 0 && (B += DA(Q[0]));
1054
+ for (let E = 1; E < C; E++)
1055
+ B += ", " + DA(Q[E]);
1070
1056
  return B += "]", B;
1071
1057
  }
1072
- const g = /\[object ([^\]]+)\]/.exec(toString.call(Q));
1073
- let I;
1074
- if (g && g.length > 1)
1075
- I = g[1];
1058
+ const I = /\[object ([^\]]+)\]/.exec(toString.call(Q));
1059
+ let g;
1060
+ if (I && I.length > 1)
1061
+ g = I[1];
1076
1062
  else
1077
1063
  return toString.call(Q);
1078
- if (I == "Object")
1064
+ if (g == "Object")
1079
1065
  try {
1080
1066
  return "Object(" + JSON.stringify(Q) + ")";
1081
1067
  } catch {
1082
1068
  return "Object";
1083
1069
  }
1084
1070
  return Q instanceof Error ? `${Q.name}: ${Q.message}
1085
- ${Q.stack}` : I;
1071
+ ${Q.stack}` : g;
1086
1072
  }
1087
- function GA(Q, A) {
1073
+ function lA(Q, A) {
1088
1074
  Q = Q >>> 0;
1089
- const g = h(), I = [];
1075
+ const I = a(), g = [];
1090
1076
  for (let C = Q; C < Q + 4 * A; C += 4)
1091
- I.push(F.__wbindgen_externrefs.get(g.getUint32(C, !0)));
1092
- return F.__externref_drop_slice(Q, A), I;
1077
+ g.push(G.__wbindgen_externrefs.get(I.getUint32(C, !0)));
1078
+ return G.__externref_drop_slice(Q, A), g;
1093
1079
  }
1094
- function X(Q, A) {
1095
- return Q = Q >>> 0, z().subarray(Q / 1, Q / 1 + A);
1080
+ function _(Q, A) {
1081
+ return Q = Q >>> 0, m().subarray(Q / 1, Q / 1 + A);
1096
1082
  }
1097
- let O = null;
1098
- function h() {
1099
- return (O === null || O.buffer.detached === !0 || O.buffer.detached === void 0 && O.buffer !== F.memory.buffer) && (O = new DataView(F.memory.buffer)), O;
1083
+ let Z = null;
1084
+ function a() {
1085
+ return (Z === null || Z.buffer.detached === !0 || Z.buffer.detached === void 0 && Z.buffer !== G.memory.buffer) && (Z = new DataView(G.memory.buffer)), Z;
1100
1086
  }
1101
- function s(Q, A) {
1102
- return Q = Q >>> 0, VA(Q, A);
1087
+ function q(Q, A) {
1088
+ return Q = Q >>> 0, bA(Q, A);
1103
1089
  }
1104
- let t = null;
1105
- function z() {
1106
- return (t === null || t.byteLength === 0) && (t = new Uint8Array(F.memory.buffer)), t;
1090
+ let b = null;
1091
+ function m() {
1092
+ return (b === null || b.byteLength === 0) && (b = new Uint8Array(G.memory.buffer)), b;
1107
1093
  }
1108
- function K(Q, A) {
1094
+ function J(Q, A) {
1109
1095
  try {
1110
1096
  return Q.apply(this, A);
1111
- } catch (g) {
1112
- const I = Z(g);
1113
- F.__wbindgen_exn_store(I);
1097
+ } catch (I) {
1098
+ const g = f(I);
1099
+ G.__wbindgen_exn_store(g);
1114
1100
  }
1115
1101
  }
1116
- function p(Q) {
1102
+ function x(Q) {
1117
1103
  return Q == null;
1118
1104
  }
1119
- function jA(Q, A, g, I) {
1120
- const C = { a: Q, b: A, cnt: 1, dtor: g }, B = (...i) => {
1105
+ function PA(Q, A, I, g) {
1106
+ const C = { a: Q, b: A, cnt: 1, dtor: I }, B = (...E) => {
1121
1107
  C.cnt++;
1122
1108
  try {
1123
- return I(C.a, C.b, ...i);
1109
+ return g(C.a, C.b, ...E);
1124
1110
  } finally {
1125
1111
  B._wbg_cb_unref();
1126
1112
  }
1127
1113
  };
1128
1114
  return B._wbg_cb_unref = () => {
1129
- --C.cnt === 0 && (C.dtor(C.a, C.b), C.a = 0, n.unregister(C));
1130
- }, n.register(B, C, C), B;
1115
+ --C.cnt === 0 && (C.dtor(C.a, C.b), C.a = 0, gA.unregister(C));
1116
+ }, gA.register(B, C, C), B;
1131
1117
  }
1132
- function T(Q, A, g, I) {
1133
- const C = { a: Q, b: A, cnt: 1, dtor: g }, B = (...i) => {
1118
+ function z(Q, A, I, g) {
1119
+ const C = { a: Q, b: A, cnt: 1, dtor: I }, B = (...E) => {
1134
1120
  C.cnt++;
1135
1121
  const D = C.a;
1136
1122
  C.a = 0;
1137
1123
  try {
1138
- return I(D, C.b, ...i);
1124
+ return g(D, C.b, ...E);
1139
1125
  } finally {
1140
1126
  C.a = D, B._wbg_cb_unref();
1141
1127
  }
1142
1128
  };
1143
1129
  return B._wbg_cb_unref = () => {
1144
- --C.cnt === 0 && (C.dtor(C.a, C.b), C.a = 0, n.unregister(C));
1145
- }, n.register(B, C, C), B;
1130
+ --C.cnt === 0 && (C.dtor(C.a, C.b), C.a = 0, gA.unregister(C));
1131
+ }, gA.register(B, C, C), B;
1146
1132
  }
1147
- function x(Q, A, g) {
1148
- if (g === void 0) {
1149
- const D = f.encode(Q), N = A(D.length, 1) >>> 0;
1150
- return z().subarray(N, N + D.length).set(D), V = D.length, N;
1151
- }
1152
- let I = Q.length, C = A(I, 1) >>> 0;
1153
- const B = z();
1154
- let i = 0;
1155
- for (; i < I; i++) {
1156
- const D = Q.charCodeAt(i);
1133
+ function T(Q, A, I) {
1134
+ if (I === void 0) {
1135
+ const D = X.encode(Q), w = A(D.length, 1) >>> 0;
1136
+ return m().subarray(w, w + D.length).set(D), d = D.length, w;
1137
+ }
1138
+ let g = Q.length, C = A(g, 1) >>> 0;
1139
+ const B = m();
1140
+ let E = 0;
1141
+ for (; E < g; E++) {
1142
+ const D = Q.charCodeAt(E);
1157
1143
  if (D > 127) break;
1158
- B[C + i] = D;
1144
+ B[C + E] = D;
1159
1145
  }
1160
- if (i !== I) {
1161
- i !== 0 && (Q = Q.slice(i)), C = g(C, I, I = i + Q.length * 3, 1) >>> 0;
1162
- const D = z().subarray(C + i, C + I), N = f.encodeInto(Q, D);
1163
- i += N.written, C = g(C, I, i, 1) >>> 0;
1146
+ if (E !== g) {
1147
+ E !== 0 && (Q = Q.slice(E)), C = I(C, g, g = E + Q.length * 3, 1) >>> 0;
1148
+ const D = m().subarray(C + E, C + g), w = X.encodeInto(Q, D);
1149
+ E += w.written, C = I(C, g, E, 1) >>> 0;
1164
1150
  }
1165
- return V = i, C;
1151
+ return d = E, C;
1166
1152
  }
1167
- function gA(Q) {
1168
- const A = F.__wbindgen_externrefs.get(Q);
1169
- return F.__externref_table_dealloc(Q), A;
1153
+ function wA(Q) {
1154
+ const A = G.__wbindgen_externrefs.get(Q);
1155
+ return G.__externref_table_dealloc(Q), A;
1170
1156
  }
1171
- let r = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 });
1172
- r.decode();
1173
- const pA = 2146435072;
1174
- let e = 0;
1175
- function VA(Q, A) {
1176
- return e += A, e >= pA && (r = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }), r.decode(), e = A), r.decode(z().subarray(Q, Q + A));
1157
+ let AA = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 });
1158
+ AA.decode();
1159
+ const fA = 2146435072;
1160
+ let QA = 0;
1161
+ function bA(Q, A) {
1162
+ return QA += A, QA >= fA && (AA = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }), AA.decode(), QA = A), AA.decode(m().subarray(Q, Q + A));
1177
1163
  }
1178
- const f = new TextEncoder();
1179
- "encodeInto" in f || (f.encodeInto = function(Q, A) {
1180
- const g = f.encode(Q);
1181
- return A.set(g), {
1164
+ const X = new TextEncoder();
1165
+ "encodeInto" in X || (X.encodeInto = function(Q, A) {
1166
+ const I = X.encode(Q);
1167
+ return A.set(I), {
1182
1168
  read: Q.length,
1183
- written: g.length
1169
+ written: I.length
1184
1170
  };
1185
1171
  });
1186
- let V = 0, F;
1187
- function OA(Q, A) {
1188
- return F = Q.exports, O = null, t = null, F.__wbindgen_start(), F;
1172
+ let d = 0, G;
1173
+ function mA(Q, A) {
1174
+ return G = Q.exports, Z = null, b = null, G.__wbindgen_start(), G;
1189
1175
  }
1190
- async function xA(Q, A) {
1176
+ async function XA(Q, A) {
1191
1177
  if (typeof Response == "function" && Q instanceof Response) {
1192
1178
  if (typeof WebAssembly.instantiateStreaming == "function")
1193
1179
  try {
1194
1180
  return await WebAssembly.instantiateStreaming(Q, A);
1195
1181
  } catch (C) {
1196
- if (Q.ok && g(Q.type) && Q.headers.get("Content-Type") !== "application/wasm")
1182
+ if (Q.ok && I(Q.type) && Q.headers.get("Content-Type") !== "application/wasm")
1197
1183
  console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", C);
1198
1184
  else
1199
1185
  throw C;
1200
1186
  }
1201
- const I = await Q.arrayBuffer();
1202
- return await WebAssembly.instantiate(I, A);
1187
+ const g = await Q.arrayBuffer();
1188
+ return await WebAssembly.instantiate(g, A);
1203
1189
  } else {
1204
- const I = await WebAssembly.instantiate(Q, A);
1205
- return I instanceof WebAssembly.Instance ? { instance: I, module: Q } : I;
1190
+ const g = await WebAssembly.instantiate(Q, A);
1191
+ return g instanceof WebAssembly.Instance ? { instance: g, module: Q } : g;
1206
1192
  }
1207
- function g(I) {
1208
- switch (I) {
1193
+ function I(g) {
1194
+ switch (g) {
1209
1195
  case "basic":
1210
1196
  case "cors":
1211
1197
  case "default":
@@ -1214,21 +1200,21 @@ async function xA(Q, A) {
1214
1200
  return !1;
1215
1201
  }
1216
1202
  }
1217
- async function dA(Q) {
1218
- if (F !== void 0) return F;
1203
+ async function rA(Q) {
1204
+ if (G !== void 0) return G;
1219
1205
  Q !== void 0 && (Object.getPrototypeOf(Q) === Object.prototype ? { module_or_path: Q } = Q : console.warn("using deprecated parameters for the initialization function; pass a single object instead")), Q === void 0 && (Q = new URL("", import.meta.url));
1220
- const A = LA();
1206
+ const A = WA();
1221
1207
  (typeof Q == "string" || typeof Request == "function" && Q instanceof Request || typeof URL == "function" && Q instanceof URL) && (Q = fetch(Q));
1222
- const { instance: g, module: I } = await xA(await Q, A);
1223
- return OA(g);
1208
+ const { instance: I, module: g } = await XA(await Q, A);
1209
+ return mA(I);
1224
1210
  }
1225
- const WA = new URL("https://cdn.jsdelivr.net/npm/glassjar@0.7.0/dist/engine_bg.wasm"), TA = Object.freeze({
1211
+ const nA = new URL("https://cdn.jsdelivr.net/npm/glassjar@0.9.0/dist/engine_bg.wasm"), vA = Object.freeze({
1226
1212
  maxObjectBytes: 128 * 1024 * 1024,
1227
1213
  maxEntries: 256,
1228
1214
  maxMetadataBytes: 8 * 1024 * 1024,
1229
1215
  maxEntryMetadataBytes: 1024 * 1024
1230
1216
  });
1231
- class ZA {
1217
+ class uA {
1232
1218
  records = /* @__PURE__ */ new Map();
1233
1219
  staged = /* @__PURE__ */ new Map();
1234
1220
  stagingFailed = !1;
@@ -1238,9 +1224,9 @@ class ZA {
1238
1224
  oversized = 0;
1239
1225
  limits;
1240
1226
  constructor(A = {}) {
1241
- this.limits = Object.freeze({ ...TA, ...A });
1242
- for (const g of Object.values(this.limits))
1243
- if (!Number.isSafeInteger(g) || g < 0)
1227
+ this.limits = Object.freeze({ ...vA, ...A });
1228
+ for (const I of Object.values(this.limits))
1229
+ if (!Number.isSafeInteger(I) || I < 0)
1244
1230
  throw new RangeError("C++ cache limits must be nonnegative safe integers");
1245
1231
  }
1246
1232
  beginBatch() {
@@ -1249,23 +1235,23 @@ class ZA {
1249
1235
  /** Stage against the same storage budget, before copying any optional object. */
1250
1236
  stage(A) {
1251
1237
  if (this.stagingFailed) return;
1252
- const g = this.recordSize(A);
1253
- if (g === void 0 || this.staged.has(A.source)) {
1238
+ const I = this.recordSize(A);
1239
+ if (I === void 0 || this.staged.has(A.source)) {
1254
1240
  this.failBatch();
1255
1241
  return;
1256
1242
  }
1257
- const I = this.limits;
1258
- for (; this.records.size && (this.records.size + this.staged.size >= I.maxEntries || this.objectBytes + A.object.byteLength > I.maxObjectBytes || this.metadataBytes + g > I.maxMetadataBytes); )
1243
+ const g = this.limits;
1244
+ for (; this.records.size && (this.records.size + this.staged.size >= g.maxEntries || this.objectBytes + A.object.byteLength > g.maxObjectBytes || this.metadataBytes + I > g.maxMetadataBytes); )
1259
1245
  this.remove(this.records.keys().next().value), this.evictions++;
1260
- if (this.records.size + this.staged.size >= I.maxEntries || this.objectBytes + A.object.byteLength > I.maxObjectBytes || this.metadataBytes + g > I.maxMetadataBytes || g > I.maxEntryMetadataBytes) {
1246
+ if (this.records.size + this.staged.size >= g.maxEntries || this.objectBytes + A.object.byteLength > g.maxObjectBytes || this.metadataBytes + I > g.maxMetadataBytes || I > g.maxEntryMetadataBytes) {
1261
1247
  this.oversized++, this.failBatch();
1262
1248
  return;
1263
1249
  }
1264
1250
  this.staged.set(A.source, {
1265
1251
  ...A,
1266
1252
  object: new Uint8Array(A.object),
1267
- metadataBytes: g
1268
- }), this.objectBytes += A.object.byteLength, this.metadataBytes += g;
1253
+ metadataBytes: I
1254
+ }), this.objectBytes += A.object.byteLength, this.metadataBytes += I;
1269
1255
  }
1270
1256
  abandonBatch() {
1271
1257
  this.failBatch();
@@ -1274,7 +1260,7 @@ class ZA {
1274
1260
  this.discardBatch(), this.stagingFailed = !0;
1275
1261
  }
1276
1262
  recordSize(A) {
1277
- if (!(typeof A.source != "string" || !A.source.startsWith("/") || A.source.split("/").slice(1).some((g) => !g || g === "." || g === "..") || typeof A.key != "string" || typeof A.object_hash != "string" || !/^[a-f0-9]{64}$/.test(A.key) || !/^[a-f0-9]{64}$/.test(A.object_hash) || A.receipt != null && typeof A.receipt != "string" || !(A.object instanceof Uint8Array)))
1263
+ if (!(typeof A.source != "string" || !A.source.startsWith("/") || A.source.split("/").slice(1).some((I) => !I || I === "." || I === "..") || typeof A.key != "string" || typeof A.object_hash != "string" || !/^[a-f0-9]{64}$/.test(A.key) || !/^[a-f0-9]{64}$/.test(A.object_hash) || A.receipt != null && typeof A.receipt != "string" || !(A.object instanceof Uint8Array)))
1278
1264
  return new TextEncoder().encode(
1279
1265
  JSON.stringify({
1280
1266
  source: A.source,
@@ -1287,19 +1273,19 @@ class ZA {
1287
1273
  async validateBatch() {
1288
1274
  if (this.stagingFailed) return !1;
1289
1275
  const A = [...this.staged.values()];
1290
- for (const g of A) {
1291
- if (!tA(g.object)) return !1;
1292
- const I = await crypto.subtle.digest("SHA-256", g.object);
1276
+ for (const I of A) {
1277
+ if (!eA(I.object)) return !1;
1278
+ const g = await crypto.subtle.digest("SHA-256", I.object);
1293
1279
  if (Array.from(
1294
- new Uint8Array(I),
1280
+ new Uint8Array(g),
1295
1281
  (B) => B.toString(16).padStart(2, "0")
1296
- ).join("") !== g.object_hash) return !1;
1282
+ ).join("") !== I.object_hash) return !1;
1297
1283
  }
1298
1284
  return !0;
1299
1285
  }
1300
1286
  commitBatch() {
1301
- for (const [A, g] of this.staged)
1302
- this.remove(A), this.records.set(A, g);
1287
+ for (const [A, I] of this.staged)
1288
+ this.remove(A), this.records.set(A, I);
1303
1289
  this.staged.clear(), this.stagingFailed = !1;
1304
1290
  }
1305
1291
  discardBatch() {
@@ -1308,40 +1294,40 @@ class ZA {
1308
1294
  this.staged.clear();
1309
1295
  }
1310
1296
  snapshot() {
1311
- return [...this.records.values()].map(({ source: A, key: g, object_hash: I, object: C, receipt: B }) => ({
1297
+ return [...this.records.values()].map(({ source: A, key: I, object_hash: g, object: C, receipt: B }) => ({
1312
1298
  source: A,
1313
- key: g,
1314
- object_hash: I,
1299
+ key: I,
1300
+ object_hash: g,
1315
1301
  ...B == null ? {} : { receipt: B },
1316
1302
  object: C.slice()
1317
1303
  }));
1318
1304
  }
1319
1305
  /** Worker hits are the only accesses that move an entry to the LRU tail. */
1320
1306
  touch(A) {
1321
- const g = this.records.get(A);
1322
- g && (this.records.delete(A), this.records.set(A, g));
1307
+ const I = this.records.get(A);
1308
+ I && (this.records.delete(A), this.records.set(A, I));
1323
1309
  }
1324
1310
  put(A) {
1325
1311
  if (typeof A.source != "string" || !A.source.startsWith("/") || A.source.split("/").slice(1).some((B) => !B || B === "." || B === "..") || typeof A.key != "string" || typeof A.object_hash != "string" || !/^[a-f0-9]{64}$/.test(A.object_hash) || !/^[a-f0-9]{64}$/.test(A.key) || !(A.object instanceof Uint8Array))
1326
1312
  return;
1327
- const g = this.recordSize(A);
1328
- if (g === void 0) return;
1329
- const I = this.limits;
1330
- if (this.remove(A.source), I.maxEntries === 0 || A.object.byteLength > I.maxObjectBytes || g > I.maxMetadataBytes || g > I.maxEntryMetadataBytes) {
1313
+ const I = this.recordSize(A);
1314
+ if (I === void 0) return;
1315
+ const g = this.limits;
1316
+ if (this.remove(A.source), g.maxEntries === 0 || A.object.byteLength > g.maxObjectBytes || I > g.maxMetadataBytes || I > g.maxEntryMetadataBytes) {
1331
1317
  this.oversized++;
1332
1318
  return;
1333
1319
  }
1334
- for (; this.records.size >= I.maxEntries || this.objectBytes + A.object.byteLength > I.maxObjectBytes || this.metadataBytes + g > I.maxMetadataBytes; )
1320
+ for (; this.records.size >= g.maxEntries || this.objectBytes + A.object.byteLength > g.maxObjectBytes || this.metadataBytes + I > g.maxMetadataBytes; )
1335
1321
  this.remove(this.records.keys().next().value), this.evictions++;
1336
- const C = { ...A, object: new Uint8Array(A.object), metadataBytes: g };
1337
- this.records.set(A.source, C), this.objectBytes += C.object.byteLength, this.metadataBytes += g;
1322
+ const C = { ...A, object: new Uint8Array(A.object), metadataBytes: I };
1323
+ this.records.set(A.source, C), this.objectBytes += C.object.byteLength, this.metadataBytes += I;
1338
1324
  }
1339
1325
  delete(A) {
1340
1326
  this.remove(A);
1341
1327
  }
1342
1328
  remove(A) {
1343
- const g = this.records.get(A);
1344
- g && (this.objectBytes -= g.object.byteLength, this.metadataBytes -= g.metadataBytes, this.records.delete(A));
1329
+ const I = this.records.get(A);
1330
+ I && (this.objectBytes -= I.object.byteLength, this.metadataBytes -= I.metadataBytes, this.records.delete(A));
1345
1331
  }
1346
1332
  clear() {
1347
1333
  this.records.clear(), this.staged.clear(), this.stagingFailed = !1, this.objectBytes = this.metadataBytes = 0;
@@ -1353,11 +1339,11 @@ class ZA {
1353
1339
  entries: this.records.size,
1354
1340
  stagingEntries: this.staged.size,
1355
1341
  stagingObjectBytes: [...this.staged.values()].reduce(
1356
- (A, g) => A + g.object.byteLength,
1342
+ (A, I) => A + I.object.byteLength,
1357
1343
  0
1358
1344
  ),
1359
1345
  stagingMetadataBytes: [...this.staged.values()].reduce(
1360
- (A, g) => A + g.metadataBytes,
1346
+ (A, I) => A + I.metadataBytes,
1361
1347
  0
1362
1348
  ),
1363
1349
  evictions: this.evictions,
@@ -1365,12 +1351,12 @@ class ZA {
1365
1351
  };
1366
1352
  }
1367
1353
  }
1368
- function tA(Q) {
1354
+ function eA(Q) {
1369
1355
  if (!WebAssembly.validate(Q) || Q.length < 8) return !1;
1370
- let A = 8, g = !1;
1371
- const I = () => {
1356
+ let A = 8, I = !1;
1357
+ const g = () => {
1372
1358
  let C = 0, B = 0;
1373
- for (let i = 0; i < 5 && A < Q.length; i++, B += 7) {
1359
+ for (let E = 0; E < 5 && A < Q.length; E++, B += 7) {
1374
1360
  const D = Q[A++];
1375
1361
  if (C += (D & 127) * 2 ** B, !(D & 128)) return C;
1376
1362
  }
@@ -1378,26 +1364,26 @@ function tA(Q) {
1378
1364
  };
1379
1365
  try {
1380
1366
  for (; A < Q.length; ) {
1381
- const C = Q[A++], B = I(), i = A + B;
1382
- if (i > Q.length || C === 8) return !1;
1367
+ const C = Q[A++], B = g(), E = A + B;
1368
+ if (E > Q.length || C === 8) return !1;
1383
1369
  if (C === 0) {
1384
- const D = I();
1385
- if (A + D > i) return !1;
1386
- const N = new TextDecoder().decode(Q.subarray(A, A + D));
1387
- if (A += D, N === "linking") {
1388
- if (g || I() !== 2) return !1;
1389
- g = !0;
1370
+ const D = g();
1371
+ if (A + D > E) return !1;
1372
+ const w = new TextDecoder().decode(Q.subarray(A, A + D));
1373
+ if (A += D, w === "linking") {
1374
+ if (I || g() !== 2) return !1;
1375
+ I = !0;
1390
1376
  }
1391
1377
  }
1392
- A = i;
1378
+ A = E;
1393
1379
  }
1394
- return g;
1380
+ return I;
1395
1381
  } catch {
1396
1382
  return !1;
1397
1383
  }
1398
1384
  }
1399
- const J = /* @__PURE__ */ Symbol();
1400
- function S(Q) {
1385
+ const L = /* @__PURE__ */ Symbol();
1386
+ function c(Q) {
1401
1387
  return Q instanceof Error ? {
1402
1388
  type: "error",
1403
1389
  error: { type: Q.constructor.name, message: Q.message }
@@ -1406,24 +1392,24 @@ function S(Q) {
1406
1392
  error: { type: typeof Q, message: String(Q) }
1407
1393
  };
1408
1394
  }
1409
- class zA {
1395
+ class _A {
1410
1396
  name;
1411
1397
  data;
1412
- constructor(A, g) {
1413
- this.name = A, this.data = g;
1398
+ constructor(A, I) {
1399
+ this.name = A, this.data = I;
1414
1400
  }
1415
1401
  download() {
1416
- const A = new Uint8Array(this.data), g = new Blob([A]), I = URL.createObjectURL(g), C = document.createElement("a");
1417
- C.href = I, C.download = this.name, document.body.appendChild(C), C.click(), document.body.removeChild(C), URL.revokeObjectURL(I);
1402
+ const A = new Uint8Array(this.data), I = new Blob([A]), g = URL.createObjectURL(I), C = document.createElement("a");
1403
+ C.href = g, C.download = this.name, document.body.appendChild(C), C.click(), document.body.removeChild(C), URL.revokeObjectURL(g);
1418
1404
  }
1419
1405
  }
1420
- class fA extends MA {
1406
+ class $A extends cA {
1421
1407
  /**
1422
1408
  * Access to internal properties of the debugger.
1423
1409
  * These are put under a special symbol so that they cannot be accessed by
1424
1410
  * clients of the library.
1425
1411
  */
1426
- [J];
1412
+ [L];
1427
1413
  dap;
1428
1414
  /**
1429
1415
  * Whether or not debugging is enabled.
@@ -1440,19 +1426,19 @@ class fA extends MA {
1440
1426
  this.dap.setFilterInternals(A);
1441
1427
  }
1442
1428
  constructor() {
1443
- super(), this[J] = {
1429
+ super(), this[L] = {
1444
1430
  attach: this.attach.bind(this),
1445
1431
  detach: this.detach.bind(this),
1446
1432
  beginRun: () => this.dap.resetRun()
1447
- }, this.onMessage = this.onMessage.bind(this), this.dap = new $(), this.dap.on(this.onMessage);
1433
+ }, this.onMessage = this.onMessage.bind(this), this.dap = new EA(), this.dap.on(this.onMessage);
1448
1434
  }
1449
1435
  send(A) {
1450
1436
  return this.dap.sendMessage(A);
1451
1437
  }
1452
1438
  artifactListener = (A) => {
1453
1439
  if (A.data.type !== "artifact") return;
1454
- const g = new zA(A.data.name, new Uint8Array(A.data.data));
1455
- this.emit("artifact", g);
1440
+ const I = new _A(A.data.name, new Uint8Array(A.data.data));
1441
+ this.emit("artifact", I);
1456
1442
  };
1457
1443
  attach(A) {
1458
1444
  A.addEventListener("message", this.artifactListener), this.dap.attach(A);
@@ -1464,27 +1450,27 @@ class fA extends MA {
1464
1450
  this.emit("event", A);
1465
1451
  }
1466
1452
  }
1467
- const lA = "glassjar-wasm:";
1468
- function PA(Q, A) {
1469
- const g = new URL(String(Q), A);
1470
- if (g.protocol !== "https:" && g.protocol !== "http:")
1471
- throw new TypeError(`Engine Wasm must be served over http(s), not ${g.protocol}`);
1472
- return g.href;
1453
+ const AI = "glassjar-wasm:";
1454
+ function II(Q, A) {
1455
+ const I = new URL(String(Q), A);
1456
+ if (I.protocol !== "https:" && I.protocol !== "http:")
1457
+ throw new TypeError(`Engine Wasm must be served over http(s), not ${I.protocol}`);
1458
+ return I.href;
1473
1459
  }
1474
- function bA(Q) {
1460
+ function gI(Q) {
1475
1461
  return new Worker(
1476
- "" + new URL("assets/worker-uI0K1NG6.js", import.meta.url).href,
1462
+ "" + new URL("assets/worker-bkz0CBX9.js", import.meta.url).href,
1477
1463
  {
1478
1464
  type: "module",
1479
1465
  name: Q?.name
1480
1466
  }
1481
1467
  );
1482
1468
  }
1483
- function XA(Q) {
1484
- return new bA(Q ? { name: lA + Q } : void 0);
1469
+ function CI(Q) {
1470
+ return new gI(Q ? { name: AI + Q } : void 0);
1485
1471
  }
1486
- const nA = "/dev/debugger-sh-host";
1487
- class oA {
1472
+ const JI = "/dev/debugger-sh-host";
1473
+ class yA {
1488
1474
  buffer = new SharedArrayBuffer(4 + 64 * 1024);
1489
1475
  length = new Int32Array(this.buffer, 0, 1);
1490
1476
  bytes = new Uint8Array(this.buffer, 4);
@@ -1492,7 +1478,7 @@ class oA {
1492
1478
  Atomics.store(this.length, 0, A), Atomics.notify(this.length, 0);
1493
1479
  }
1494
1480
  }
1495
- function IA(Q) {
1481
+ function iA(Q) {
1496
1482
  try {
1497
1483
  return new Error(
1498
1484
  `Host device callback failed: ${Q instanceof Error ? Q.message : String(Q)}`
@@ -1501,22 +1487,22 @@ function IA(Q) {
1501
1487
  return new Error("Host device callback failed");
1502
1488
  }
1503
1489
  }
1504
- function NA(Q) {
1490
+ function UA(Q) {
1505
1491
  try {
1506
1492
  const A = Q?.();
1507
1493
  if (A && typeof A.then == "function")
1508
1494
  return Promise.resolve(A).catch(() => {
1509
1495
  }), new TypeError("Host device cleanup must be synchronous");
1510
1496
  } catch (A) {
1511
- return IA(A);
1497
+ return iA(A);
1512
1498
  }
1513
1499
  }
1514
- class mA {
1500
+ class QI {
1515
1501
  constructor(A) {
1516
1502
  this.onFailure = A;
1517
1503
  }
1518
- incoming = new oA();
1519
- outgoing = new oA();
1504
+ incoming = new yA();
1505
+ outgoing = new yA();
1520
1506
  workerStart = {
1521
1507
  guest_to_host: this.incoming.buffer,
1522
1508
  host_to_guest: this.outgoing.buffer
@@ -1527,30 +1513,30 @@ class mA {
1527
1513
  worker;
1528
1514
  writing = !1;
1529
1515
  open(A) {
1530
- let g;
1516
+ let I;
1531
1517
  try {
1532
- g = A({
1518
+ I = A({
1533
1519
  signal: this.abort.signal,
1534
- onData: (I) => {
1535
- if (this.assertOpen(), typeof I != "function")
1520
+ onData: (g) => {
1521
+ if (this.assertOpen(), typeof g != "function")
1536
1522
  throw new TypeError("Host device listener must be a function");
1537
- return this.listeners.add(I), () => {
1538
- this.listeners.delete(I);
1523
+ return this.listeners.add(g), () => {
1524
+ this.listeners.delete(g);
1539
1525
  };
1540
1526
  },
1541
- write: (I) => this.write(I)
1527
+ write: (g) => this.write(g)
1542
1528
  });
1543
- } catch (I) {
1544
- throw IA(I);
1529
+ } catch (g) {
1530
+ throw iA(g);
1545
1531
  }
1546
- if (g !== void 0 && typeof g != "function")
1547
- throw Promise.resolve(g).catch(() => {
1532
+ if (I !== void 0 && typeof I != "function")
1533
+ throw Promise.resolve(I).catch(() => {
1548
1534
  }), new TypeError("Host device opener must return a cleanup function or undefined");
1549
- if (typeof g == "function")
1535
+ if (typeof I == "function")
1550
1536
  if (this.abort.signal.aborted) {
1551
- const I = NA(g);
1552
- if (I) throw I;
1553
- } else this.cleanup = g;
1537
+ const g = UA(I);
1538
+ if (g) throw g;
1539
+ } else this.cleanup = I;
1554
1540
  }
1555
1541
  attach(A) {
1556
1542
  this.assertOpen(), this.worker = A, A.addEventListener("message", this.onMessage);
@@ -1564,17 +1550,17 @@ class mA {
1564
1550
  if (this.writing) throw new Error("Await the previous host device write before writing again");
1565
1551
  this.writing = !0;
1566
1552
  try {
1567
- const g = new Uint8Array(A), I = this.outgoing;
1553
+ const I = new Uint8Array(A), g = this.outgoing;
1568
1554
  let C = 0;
1569
- for (; C < g.length; ) {
1555
+ for (; C < I.length; ) {
1570
1556
  this.assertOpen();
1571
- const B = Atomics.load(I.length, 0);
1557
+ const B = Atomics.load(g.length, 0);
1572
1558
  if (B !== 0) {
1573
- await Atomics.waitAsync(I.length, 0, B).value;
1559
+ await Atomics.waitAsync(g.length, 0, B).value;
1574
1560
  continue;
1575
1561
  }
1576
- const i = g.subarray(C, C + I.bytes.length);
1577
- I.bytes.set(i), I.publish(i.length), C += i.length;
1562
+ const E = I.subarray(C, C + g.bytes.length);
1563
+ g.bytes.set(E), g.publish(E.length), C += E.length;
1578
1564
  }
1579
1565
  } finally {
1580
1566
  this.writing = !1;
@@ -1583,97 +1569,789 @@ class mA {
1583
1569
  onMessage = (A) => {
1584
1570
  if (!(this.abort.signal.aborted || A.data?.type !== "host_wake"))
1585
1571
  try {
1586
- const g = Atomics.load(this.incoming.length, 0);
1587
- if (g <= 0) return;
1588
- const I = this.incoming.bytes.slice(0, g);
1572
+ const I = Atomics.load(this.incoming.length, 0);
1573
+ if (I <= 0) return;
1574
+ const g = this.incoming.bytes.slice(0, I);
1589
1575
  this.incoming.publish(0);
1590
1576
  for (const C of this.listeners) {
1591
1577
  if (this.abort.signal.aborted) break;
1592
- Promise.resolve(C(I)).catch((B) => this.fail(B));
1578
+ Promise.resolve(C(g)).catch((B) => this.fail(B));
1593
1579
  }
1594
- } catch (g) {
1595
- this.fail(g);
1580
+ } catch (I) {
1581
+ this.fail(I);
1596
1582
  }
1597
1583
  };
1598
1584
  fail(A) {
1599
- this.abort.signal.aborted || (this.close(), this.onFailure(IA(A)));
1585
+ this.abort.signal.aborted || (this.close(), this.onFailure(iA(A)));
1600
1586
  }
1601
1587
  close() {
1602
1588
  if (this.abort.signal.aborted) return;
1603
1589
  this.worker?.removeEventListener("message", this.onMessage), this.worker = void 0, this.incoming.publish(-1), this.outgoing.publish(-1), this.abort.abort(), this.listeners.clear();
1604
1590
  const A = this.cleanup;
1605
- return this.cleanup = void 0, NA(A);
1591
+ return this.cleanup = void 0, UA(A);
1592
+ }
1593
+ }
1594
+ const BI = [
1595
+ "__future__",
1596
+ "_abc",
1597
+ "_aix_support",
1598
+ "_android_support",
1599
+ "_apple_support",
1600
+ "_ast",
1601
+ "_ast_unparse",
1602
+ "_asyncio",
1603
+ "_bisect",
1604
+ "_blake2",
1605
+ "_bz2",
1606
+ "_codecs",
1607
+ "_codecs_cn",
1608
+ "_codecs_hk",
1609
+ "_codecs_iso2022",
1610
+ "_codecs_jp",
1611
+ "_codecs_kr",
1612
+ "_codecs_tw",
1613
+ "_collections",
1614
+ "_collections_abc",
1615
+ "_colorize",
1616
+ "_compat_pickle",
1617
+ "_contextvars",
1618
+ "_csv",
1619
+ "_ctypes",
1620
+ "_curses",
1621
+ "_curses_panel",
1622
+ "_datetime",
1623
+ "_dbm",
1624
+ "_decimal",
1625
+ "_elementtree",
1626
+ "_frozen_importlib",
1627
+ "_frozen_importlib_external",
1628
+ "_functools",
1629
+ "_gdbm",
1630
+ "_hashlib",
1631
+ "_heapq",
1632
+ "_hmac",
1633
+ "_imp",
1634
+ "_interpchannels",
1635
+ "_interpqueues",
1636
+ "_interpreters",
1637
+ "_io",
1638
+ "_ios_support",
1639
+ "_json",
1640
+ "_locale",
1641
+ "_lsprof",
1642
+ "_lzma",
1643
+ "_markupbase",
1644
+ "_math_integer",
1645
+ "_md5",
1646
+ "_multibytecodec",
1647
+ "_multiprocessing",
1648
+ "_opcode",
1649
+ "_opcode_metadata",
1650
+ "_operator",
1651
+ "_osx_support",
1652
+ "_overlapped",
1653
+ "_pickle",
1654
+ "_posixshmem",
1655
+ "_posixsubprocess",
1656
+ "_py_abc",
1657
+ "_py_warnings",
1658
+ "_pydatetime",
1659
+ "_pydecimal",
1660
+ "_pyio",
1661
+ "_pylong",
1662
+ "_pyrepl",
1663
+ "_queue",
1664
+ "_random",
1665
+ "_remote_debugging",
1666
+ "_scproxy",
1667
+ "_sha1",
1668
+ "_sha2",
1669
+ "_sha3",
1670
+ "_signal",
1671
+ "_sitebuiltins",
1672
+ "_socket",
1673
+ "_sqlite3",
1674
+ "_sre",
1675
+ "_ssl",
1676
+ "_stat",
1677
+ "_statistics",
1678
+ "_string",
1679
+ "_strptime",
1680
+ "_struct",
1681
+ "_suggestions",
1682
+ "_symtable",
1683
+ "_sysconfig",
1684
+ "_testbuffer",
1685
+ "_testcapi",
1686
+ "_testclinic",
1687
+ "_testclinic_limited",
1688
+ "_testinternalcapi",
1689
+ "_testlimitedcapi",
1690
+ "_thread",
1691
+ "_threading_local",
1692
+ "_tkinter",
1693
+ "_tokenize",
1694
+ "_tracemalloc",
1695
+ "_types",
1696
+ "_typing",
1697
+ "_uuid",
1698
+ "_warnings",
1699
+ "_weakref",
1700
+ "_weakrefset",
1701
+ "_winapi",
1702
+ "_wmi",
1703
+ "_xxtestfuzz",
1704
+ "_zoneinfo",
1705
+ "_zstd",
1706
+ "abc",
1707
+ "annotationlib",
1708
+ "antigravity",
1709
+ "argparse",
1710
+ "array",
1711
+ "ast",
1712
+ "asyncio",
1713
+ "atexit",
1714
+ "base64",
1715
+ "bdb",
1716
+ "binascii",
1717
+ "bisect",
1718
+ "builtins",
1719
+ "bz2",
1720
+ "cProfile",
1721
+ "calendar",
1722
+ "cmath",
1723
+ "cmd",
1724
+ "code",
1725
+ "codecs",
1726
+ "codeop",
1727
+ "collections",
1728
+ "colorsys",
1729
+ "compileall",
1730
+ "compression",
1731
+ "concurrent",
1732
+ "configparser",
1733
+ "contextlib",
1734
+ "contextvars",
1735
+ "copy",
1736
+ "copyreg",
1737
+ "csv",
1738
+ "ctypes",
1739
+ "curses",
1740
+ "dataclasses",
1741
+ "datetime",
1742
+ "dbm",
1743
+ "decimal",
1744
+ "difflib",
1745
+ "dis",
1746
+ "doctest",
1747
+ "email",
1748
+ "encodings",
1749
+ "ensurepip",
1750
+ "enum",
1751
+ "errno",
1752
+ "faulthandler",
1753
+ "fcntl",
1754
+ "filecmp",
1755
+ "fileinput",
1756
+ "fnmatch",
1757
+ "fractions",
1758
+ "ftplib",
1759
+ "functools",
1760
+ "gc",
1761
+ "genericpath",
1762
+ "getopt",
1763
+ "getpass",
1764
+ "gettext",
1765
+ "glob",
1766
+ "graphlib",
1767
+ "grp",
1768
+ "gzip",
1769
+ "hashlib",
1770
+ "heapq",
1771
+ "hmac",
1772
+ "html",
1773
+ "http",
1774
+ "idlelib",
1775
+ "imaplib",
1776
+ "importlib",
1777
+ "inspect",
1778
+ "io",
1779
+ "ipaddress",
1780
+ "itertools",
1781
+ "json",
1782
+ "keyword",
1783
+ "linecache",
1784
+ "locale",
1785
+ "logging",
1786
+ "lzma",
1787
+ "mailbox",
1788
+ "marshal",
1789
+ "math",
1790
+ "mimetypes",
1791
+ "mmap",
1792
+ "modulefinder",
1793
+ "msvcrt",
1794
+ "multiprocessing",
1795
+ "netrc",
1796
+ "nt",
1797
+ "ntpath",
1798
+ "nturl2path",
1799
+ "numbers",
1800
+ "opcode",
1801
+ "operator",
1802
+ "optparse",
1803
+ "os",
1804
+ "pathlib",
1805
+ "pdb",
1806
+ "pickle",
1807
+ "pickletools",
1808
+ "pkgutil",
1809
+ "platform",
1810
+ "plistlib",
1811
+ "poplib",
1812
+ "posix",
1813
+ "posixpath",
1814
+ "pprint",
1815
+ "profile",
1816
+ "profiling",
1817
+ "pstats",
1818
+ "pty",
1819
+ "pwd",
1820
+ "py_compile",
1821
+ "pyclbr",
1822
+ "pydoc",
1823
+ "pydoc_data",
1824
+ "pyexpat",
1825
+ "queue",
1826
+ "quopri",
1827
+ "random",
1828
+ "re",
1829
+ "readline",
1830
+ "reprlib",
1831
+ "resource",
1832
+ "rlcompleter",
1833
+ "runpy",
1834
+ "sched",
1835
+ "secrets",
1836
+ "select",
1837
+ "selectors",
1838
+ "shelve",
1839
+ "shlex",
1840
+ "shutil",
1841
+ "signal",
1842
+ "site",
1843
+ "smtplib",
1844
+ "socket",
1845
+ "socketserver",
1846
+ "sqlite3",
1847
+ "ssl",
1848
+ "stat",
1849
+ "statistics",
1850
+ "string",
1851
+ "stringprep",
1852
+ "struct",
1853
+ "subprocess",
1854
+ "symtable",
1855
+ "sys",
1856
+ "sysconfig",
1857
+ "syslog",
1858
+ "tabnanny",
1859
+ "tarfile",
1860
+ "tempfile",
1861
+ "termios",
1862
+ "textwrap",
1863
+ "this",
1864
+ "threading",
1865
+ "time",
1866
+ "timeit",
1867
+ "tkinter",
1868
+ "token",
1869
+ "tokenize",
1870
+ "tomllib",
1871
+ "trace",
1872
+ "traceback",
1873
+ "tracemalloc",
1874
+ "tty",
1875
+ "turtle",
1876
+ "turtledemo",
1877
+ "types",
1878
+ "typing",
1879
+ "unicodedata",
1880
+ "unittest",
1881
+ "urllib",
1882
+ "uuid",
1883
+ "venv",
1884
+ "warnings",
1885
+ "wave",
1886
+ "weakref",
1887
+ "webbrowser",
1888
+ "winreg",
1889
+ "winsound",
1890
+ "wsgiref",
1891
+ "xml",
1892
+ "xmlrpc",
1893
+ "xxsubtype",
1894
+ "zipapp",
1895
+ "zipfile",
1896
+ "zipimport",
1897
+ "zlib",
1898
+ "zoneinfo"
1899
+ ], IA = "3.15.2", EI = "/usr/local/lib/python3.15/site-packages", RA = "https://pypi.org/pypi", DI = "files.pythonhosted.org", l = {
1900
+ packages: 50,
1901
+ downloadBytes: 60 * 1024 * 1024,
1902
+ files: 5e3,
1903
+ unpackedBytes: 200 * 1024 * 1024
1904
+ }, wI = {
1905
+ python_version: IA.split(".").slice(0, 2).join("."),
1906
+ python_full_version: IA,
1907
+ implementation_name: "cpython",
1908
+ implementation_version: IA,
1909
+ platform_python_implementation: "CPython",
1910
+ os_name: "posix",
1911
+ sys_platform: "wasi",
1912
+ platform_system: "",
1913
+ platform_machine: "wasm32",
1914
+ platform_release: "0.0.0",
1915
+ platform_version: "0.0.0"
1916
+ }, YA = {
1917
+ yaml: "PyYAML",
1918
+ bs4: "beautifulsoup4",
1919
+ dateutil: "python-dateutil",
1920
+ attr: "attrs",
1921
+ dotenv: "python-dotenv",
1922
+ jwt: "PyJWT",
1923
+ serial: "pyserial",
1924
+ docx: "python-docx",
1925
+ pptx: "python-pptx",
1926
+ slugify: "python-slugify",
1927
+ PIL: "pillow",
1928
+ sklearn: "scikit-learn",
1929
+ cv2: "opencv-python",
1930
+ Crypto: "pycryptodome",
1931
+ skimage: "scikit-image",
1932
+ google: "protobuf",
1933
+ _pytest: "pytest"
1934
+ }, iI = new Set(BI), JA = /^[A-Za-z0-9]([A-Za-z0-9._-]*[A-Za-z0-9])?$/;
1935
+ function W(Q) {
1936
+ return Q.toLowerCase().replace(/[-_.]+/g, "-");
1937
+ }
1938
+ function oI(Q) {
1939
+ const A = /* @__PURE__ */ new Set();
1940
+ for (const I of Q.split(`
1941
+ `)) {
1942
+ const g = I.replace(/#.*/, "").trim();
1943
+ let C = /^import\s+(.+)$/.exec(g);
1944
+ if (C) {
1945
+ for (const B of C[1].split(",")) {
1946
+ const E = B.trim().split(/\s+/)[0]?.split(".")[0];
1947
+ E && A.add(E);
1948
+ }
1949
+ continue;
1950
+ }
1951
+ C = /^from\s+([A-Za-z_][\w.]*)\s+import\b/.exec(g), C && A.add(C[1].split(".")[0]);
1952
+ }
1953
+ return A;
1954
+ }
1955
+ function NI(Q) {
1956
+ const A = /* @__PURE__ */ new Set(), I = [];
1957
+ let g = "";
1958
+ const C = (E, D) => {
1959
+ for (const [w, N] of Object.entries(E))
1960
+ typeof N == "string" ? (w.endsWith(".py") && (I.push(N), D || A.add(w.slice(0, -3))), !D && w === "requirements.txt" && (g = N)) : (D || A.add(w), C(N, `${D}/${w}`));
1961
+ };
1962
+ C(Q, "");
1963
+ const B = /* @__PURE__ */ new Map();
1964
+ for (const E of I)
1965
+ for (const D of oI(E)) {
1966
+ if (iI.has(D) || A.has(D) || D.startsWith("_") && !(D in YA))
1967
+ continue;
1968
+ const w = YA[D] ?? D;
1969
+ B.set(W(w), w);
1970
+ }
1971
+ for (const E of g.split(`
1972
+ `)) {
1973
+ const D = E.replace(/#.*/, "").trim();
1974
+ if (!D || D.startsWith("-")) continue;
1975
+ const w = /^[A-Za-z0-9][A-Za-z0-9._-]*/.exec(D)?.[0];
1976
+ w && B.set(W(w), D);
1977
+ }
1978
+ return [...B.values()].sort();
1979
+ }
1980
+ function v(Q) {
1981
+ const A = /^v?(?:\d+!)?(\d+(?:\.\d+)*)(?:[-_.]?(a|b|c|rc|alpha|beta|pre|preview)[-_.]?(\d*))?(?:-(\d+)|[-_.]?(?:post|rev|r)[-_.]?(\d*))?(?:[-_.]?dev[-_.]?(\d*))?(?:\+[a-z0-9.]+)?$/i.exec(
1982
+ Q.trim()
1983
+ );
1984
+ if (!A) return null;
1985
+ const I = A[2]?.toLowerCase(), g = I ? { a: 0, alpha: 0, b: 1, beta: 1, c: 2, rc: 2, pre: 2, preview: 2 }[I] : void 0;
1986
+ return {
1987
+ release: A[1].split(".").map(Number),
1988
+ pre: g === void 0 ? void 0 : [g, Number(A[3] || 0)],
1989
+ post: A[4] !== void 0 ? Number(A[4]) : A[5] !== void 0 ? Number(A[5] || 0) : void 0,
1990
+ dev: A[6] !== void 0 ? Number(A[6] || 0) : void 0,
1991
+ text: Q
1992
+ };
1993
+ }
1994
+ function aA(Q, A) {
1995
+ const I = Math.max(Q.release.length, A.release.length);
1996
+ for (let E = 0; E < I; E++) {
1997
+ const D = (Q.release[E] ?? 0) - (A.release[E] ?? 0);
1998
+ if (D) return Math.sign(D);
1999
+ }
2000
+ const g = (E) => [
2001
+ E.pre ? 0 : E.dev !== void 0 && E.post === void 0 ? -1 : 1,
2002
+ E.pre?.[0] ?? 0,
2003
+ E.pre?.[1] ?? 0,
2004
+ E.post ?? -1,
2005
+ E.dev ?? Number.POSITIVE_INFINITY
2006
+ ], C = g(Q), B = g(A);
2007
+ for (let E = 0; E < C.length; E++) if (C[E] !== B[E]) return Math.sign(C[E] - B[E]);
2008
+ return 0;
2009
+ }
2010
+ const hA = (Q) => Q.pre !== void 0 || Q.dev !== void 0;
2011
+ function oA(Q, A) {
2012
+ for (const I of A.split(",")) {
2013
+ const g = I.trim();
2014
+ if (!g) continue;
2015
+ const C = /^(~=|===|==|!=|<=|>=|<|>)\s*(.+)$/.exec(g);
2016
+ if (!C) return !1;
2017
+ const [, B, E] = C;
2018
+ if ((B === "==" || B === "!=") && E.endsWith(".*")) {
2019
+ if (E.slice(0, -2).split(".").map(Number).every((U, h) => (Q.release[h] ?? 0) === U) !== (B === "==")) return !1;
2020
+ continue;
2021
+ }
2022
+ const D = v(E);
2023
+ if (!D) return !1;
2024
+ const w = aA(Q, D);
2025
+ if (B === "~=") {
2026
+ const N = D.release.slice(0, Math.max(1, D.release.length - 1));
2027
+ if (w < 0 || !N.every((k, U) => (Q.release[U] ?? 0) === k)) return !1;
2028
+ } else if (!(B === "==" || B === "===" ? w === 0 : B === "!=" ? w !== 0 : B === "<=" ? w <= 0 : B === ">=" ? w >= 0 : B === "<" ? w < 0 : w > 0))
2029
+ return !1;
1606
2030
  }
2031
+ return !0;
2032
+ }
2033
+ function SA(Q) {
2034
+ const [A, I] = Q.split(";", 2).map((C) => C.trim()), g = /^([A-Za-z0-9][A-Za-z0-9._-]*)\s*(?:\[([^\]]*)\])?\s*\(?\s*([^)]*?)\s*\)?$/.exec(
2035
+ A
2036
+ );
2037
+ return !g || g[3].includes("@") ? null : {
2038
+ name: g[1],
2039
+ extras: (g[2] ?? "").split(",").map((C) => C.trim()).filter(Boolean),
2040
+ specifiers: g[3].replace(/\s+/g, ""),
2041
+ marker: I || void 0
2042
+ };
1607
2043
  }
1608
- const rA = [
2044
+ function FI(Q, A = []) {
2045
+ const I = Q.match(
2046
+ /\(|\)|'[^']*'|"[^"]*"|===|==|!=|<=|>=|~=|<|>|\bnot\s+in\b|\bin\b|\band\b|\bor\b|[A-Za-z_][A-Za-z0-9_.]*/g
2047
+ ) ?? [];
2048
+ let g = 0;
2049
+ const C = (N) => /^['"]/.test(N) ? { text: N.slice(1, -1) } : N === "extra" ? { text: "", variable: "extra" } : { text: wI[N] ?? "", variable: N }, B = (N, k, U) => {
2050
+ if (N.variable === "extra" || U.variable === "extra") {
2051
+ const R = W((N.variable === "extra" ? U : N).text), H = A.some((j) => W(j) === R);
2052
+ return k === "!=" ? !H : H;
2053
+ }
2054
+ if (k === "in") return U.text.includes(N.text);
2055
+ if (/^not\s+in$/.test(k)) return !U.text.includes(N.text);
2056
+ if (!N.variable && U.variable)
2057
+ return B(U, { "<": ">", ">": "<", "<=": ">=", ">=": "<=" }[k] ?? k, N);
2058
+ const h = v(N.text), K = v(U.text);
2059
+ return h && K && /version/.test(N.variable ?? "") ? oA(h, `${k}${U.text}`) : k === "==" || k === "===" ? N.text === U.text : k === "!=" ? N.text !== U.text : !1;
2060
+ }, E = () => {
2061
+ if (I[g] === "(") {
2062
+ g++;
2063
+ const h = w();
2064
+ return g++, h;
2065
+ }
2066
+ const N = C(I[g++]), k = I[g++], U = C(I[g++]);
2067
+ return B(N, k, U);
2068
+ }, D = () => {
2069
+ let N = E();
2070
+ for (; I[g] === "and"; )
2071
+ g++, N = E() && N;
2072
+ return N;
2073
+ }, w = () => {
2074
+ let N = D();
2075
+ for (; I[g] === "or"; )
2076
+ g++, N = D() || N;
2077
+ return N;
2078
+ };
2079
+ try {
2080
+ return w();
2081
+ } catch {
2082
+ return !1;
2083
+ }
2084
+ }
2085
+ function GI(Q) {
2086
+ if (Q.packagetype !== "bdist_wheel" || Q.yanked) return !1;
2087
+ const A = Q.filename.replace(/\.whl$/, "").split("-").slice(-3);
2088
+ return A.length === 3 && A[1] === "none" && A[2] === "any" && A[0].split(".").some((I) => I === "py3" || I.startsWith("py3"));
2089
+ }
2090
+ function MI(Q) {
2091
+ return Q ? oA(v(IA), Q.replace(/\s+/g, "")) : !0;
2092
+ }
2093
+ class kI {
2094
+ constructor(A = (I, g) => fetch(I, g)) {
2095
+ this.fetchImpl = A;
2096
+ }
2097
+ projects = /* @__PURE__ */ new Map();
2098
+ metadata = /* @__PURE__ */ new Map();
2099
+ wheels = /* @__PURE__ */ new Map();
2100
+ project(A) {
2101
+ const I = W(A);
2102
+ let g = this.projects.get(I);
2103
+ return g || (g = this.fetchImpl(`${RA}/${encodeURIComponent(I)}/json`).then(
2104
+ async (C) => C.ok ? await C.json() : null,
2105
+ () => null
2106
+ ), this.projects.set(I, g)), g;
2107
+ }
2108
+ /** requires_dist of one release (the project JSON only carries the latest's). */
2109
+ requiresDist(A, I, g) {
2110
+ if (g.info.version === I) return Promise.resolve(g.info.requires_dist ?? []);
2111
+ const C = `${W(A)}@${I}`;
2112
+ let B = this.metadata.get(C);
2113
+ return B || (B = this.fetchImpl(
2114
+ `${RA}/${encodeURIComponent(W(A))}/${encodeURIComponent(I)}/json`
2115
+ ).then(
2116
+ async (E) => E.ok ? (await E.json()).info.requires_dist ?? [] : [],
2117
+ () => []
2118
+ ), this.metadata.set(C, B)), B;
2119
+ }
2120
+ /**
2121
+ * Resolves requirements and their dependencies to pure-Python wheels. Greedy: the newest
2122
+ * release that fits every constraint seen so far for that project.
2123
+ */
2124
+ async resolve(A, I = () => {
2125
+ }) {
2126
+ const g = /* @__PURE__ */ new Map(), C = [];
2127
+ for (const B of A) {
2128
+ const E = SA(B);
2129
+ E && JA.test(E.name) && C.push({ requirement: E, top: !0 });
2130
+ }
2131
+ for (; C.length; ) {
2132
+ const { requirement: B, top: E } = C.shift(), D = W(B.name);
2133
+ if (g.has(D)) continue;
2134
+ if (g.size >= l.packages) break;
2135
+ const w = await this.project(B.name);
2136
+ if (!w) {
2137
+ E && I({ kind: "skipped", message: `${B.name}: not found on PyPI` });
2138
+ continue;
2139
+ }
2140
+ const N = Object.entries(w.releases).map(([K, R]) => ({ version: v(K), files: R })).filter(
2141
+ (K) => K.version !== null && oA(K.version, B.specifiers)
2142
+ ).sort((K, R) => aA(R.version, K.version)), U = [...N.filter((K) => !hA(K.version)), ...N.filter((K) => hA(K.version))].map((K) => ({
2143
+ version: K.version,
2144
+ wheel: K.files.find((R) => GI(R) && MI(R.requires_python))
2145
+ })).find((K) => K.wheel);
2146
+ if (!U?.wheel) {
2147
+ const K = N.some(
2148
+ (R) => R.files.some((H) => H.packagetype === "bdist_wheel")
2149
+ );
2150
+ I({
2151
+ kind: "skipped",
2152
+ message: K ? `${w.info.name} has compiled code, which can't run in the browser` : `${w.info.name}: no Python 3.15 wheel on PyPI`
2153
+ });
2154
+ continue;
2155
+ }
2156
+ const h = new URL(U.wheel.url);
2157
+ if (!(h.protocol !== "https:" || h.hostname !== DI)) {
2158
+ g.set(D, {
2159
+ name: w.info.name,
2160
+ version: U.version.text,
2161
+ url: U.wheel.url,
2162
+ sha256: U.wheel.digests.sha256,
2163
+ size: U.wheel.size
2164
+ });
2165
+ for (const K of await this.requiresDist(
2166
+ B.name,
2167
+ U.version.text,
2168
+ w
2169
+ )) {
2170
+ const R = SA(K);
2171
+ !R || !JA.test(R.name) || R.marker && !FI(R.marker, B.extras) || C.push({ requirement: R, top: !1 });
2172
+ }
2173
+ }
2174
+ }
2175
+ return [...g.values()];
2176
+ }
2177
+ /** Files to mount, by absolute path in the run, for these resolved packages. */
2178
+ async install(A, I = () => {
2179
+ }) {
2180
+ const g = {};
2181
+ let C = 0, B = 0;
2182
+ for (const E of A) {
2183
+ if (C += E.size, C > l.downloadBytes) {
2184
+ I({
2185
+ kind: "skipped",
2186
+ message: `${E.name}: over the ${l.downloadBytes >> 20}MB package limit`
2187
+ });
2188
+ break;
2189
+ }
2190
+ const D = `${E.url}#${E.sha256}`;
2191
+ let w = this.wheels.get(D);
2192
+ w || (I({ kind: "installing", message: `Installing ${E.name} ${E.version}` }), w = this.download(E), this.wheels.set(D, w), w.catch(() => this.wheels.delete(D)));
2193
+ let N;
2194
+ try {
2195
+ N = await w;
2196
+ } catch (k) {
2197
+ I({
2198
+ kind: "skipped",
2199
+ message: `${E.name}: ${k instanceof Error ? k.message : String(k)}`
2200
+ });
2201
+ continue;
2202
+ }
2203
+ for (const [k, U] of N) {
2204
+ if (++B > l.files) break;
2205
+ g[`${EI}/${k}`] = U;
2206
+ }
2207
+ }
2208
+ return g;
2209
+ }
2210
+ async download(A) {
2211
+ const I = await this.fetchImpl(A.url, { cache: "force-cache" });
2212
+ if (!I.ok) throw new Error(`download failed (${I.status})`);
2213
+ const g = new Uint8Array(await I.arrayBuffer());
2214
+ if ([...new Uint8Array(await crypto.subtle.digest("SHA-256", g))].map((B) => B.toString(16).padStart(2, "0")).join("") !== A.sha256) throw new Error("download did not match PyPI's checksum");
2215
+ return KI(await UI(g, l.unpackedBytes));
2216
+ }
2217
+ }
2218
+ function KI(Q) {
2219
+ const A = /* @__PURE__ */ new Map();
2220
+ for (const [I, g] of Q) {
2221
+ const C = /^[^/]+\.data\/(purelib|platlib)\/(.+)$/.exec(I);
2222
+ C ? A.set(C[2], g) : /^[^/]+\.data\//.test(I) || A.set(I, g);
2223
+ }
2224
+ return A;
2225
+ }
2226
+ function yI(Q) {
2227
+ return Q.length > 0 && !Q.startsWith("/") && !Q.includes("\\") && !Q.includes("\0") && !Q.split("/").some((A) => A === ".." || A === ".");
2228
+ }
2229
+ async function UI(Q, A) {
2230
+ const I = new DataView(Q.buffer, Q.byteOffset, Q.byteLength);
2231
+ let g = -1;
2232
+ for (let N = Q.length - 22; N >= Math.max(0, Q.length - 22 - 65535); N--)
2233
+ if (I.getUint32(N, !0) === 101010256) {
2234
+ g = N;
2235
+ break;
2236
+ }
2237
+ if (g < 0) throw new Error("not a zip archive");
2238
+ const C = I.getUint16(g + 10, !0);
2239
+ let B = I.getUint32(g + 16, !0);
2240
+ const E = /* @__PURE__ */ new Map();
2241
+ let D = 0;
2242
+ const w = new TextDecoder();
2243
+ for (let N = 0; N < C; N++) {
2244
+ if (I.getUint32(B, !0) !== 33639248) throw new Error("corrupt zip directory");
2245
+ const k = I.getUint16(B + 10, !0), U = I.getUint32(B + 20, !0), h = I.getUint32(B + 24, !0), K = I.getUint16(B + 28, !0), R = I.getUint16(B + 30, !0), H = I.getUint16(B + 32, !0), j = I.getUint32(B + 42, !0), s = w.decode(Q.subarray(B + 46, B + 46 + K));
2246
+ if (B += 46 + K + R + H, s.endsWith("/")) continue;
2247
+ if (!yI(s)) throw new Error(`unsafe path in package: ${s}`);
2248
+ if (D += h, D > A) throw new Error("package too large");
2249
+ const u = j + 30 + I.getUint16(j + 26, !0) + I.getUint16(j + 28, !0), V = Q.subarray(u, u + U);
2250
+ let o;
2251
+ if (k === 0) o = V.slice();
2252
+ else if (k === 8)
2253
+ o = new Uint8Array(
2254
+ await new Response(
2255
+ new Blob([V.slice()]).stream().pipeThrough(new DecompressionStream("deflate-raw"))
2256
+ ).arrayBuffer()
2257
+ );
2258
+ else throw new Error(`unsupported compression in package: ${s}`);
2259
+ if (o.length !== h) throw new Error(`corrupt entry in package: ${s}`);
2260
+ E.set(s, o);
2261
+ }
2262
+ return E;
2263
+ }
2264
+ const P = {
2265
+ installer: void 0,
2266
+ sets: /* @__PURE__ */ new Map()
2267
+ };
2268
+ async function RI(Q, A = () => {
2269
+ }) {
2270
+ const I = NI(Q);
2271
+ if (!I.length) return {};
2272
+ const g = I.join(`
2273
+ `);
2274
+ let C = P.sets.get(g);
2275
+ if (!C) {
2276
+ P.installer ??= new kI();
2277
+ const D = P.installer, w = [], N = (k) => {
2278
+ k.kind === "skipped" ? w.push(k) : A(k);
2279
+ };
2280
+ C = D.resolve(I, N).then(async (k) => ({ files: await D.install(k, N), notes: w })), P.sets.set(g, C), C.catch(() => P.sets.delete(g));
2281
+ }
2282
+ const { files: B, notes: E } = await C;
2283
+ for (const D of E) A(D);
2284
+ return B;
2285
+ }
2286
+ const YI = [
1609
2287
  "4847c7cda81eb51b1cec18fe40b396605579fe84e17eca2760702b8a9666e4e1"
1610
- ], u = Object.freeze({
2288
+ ], CA = Object.freeze({
1611
2289
  compiler: "d6b8d6e4596136fc6ae451fe3b81b1be5a1829505cbc993179247c75a764ce87",
1612
2290
  sysroot: "8745c6af23fd841fa507d0c73f6b6b8e8da1b4ec216a6339739a28b38ff7227b",
1613
2291
  exceptions: "20986166552953de0e3ca5c1e9f341e7aec8b9ba54dcb244d0d2b2f9ca843ab4"
1614
2292
  });
1615
- function KA(Q = "legacy") {
1616
- if (Q === "legacy") return { profile: Q, digests: u };
1617
- if (Q === "stock-certified-v1" && rA.length > 0)
1618
- return { profile: Q, digests: u };
2293
+ function HA(Q = "legacy") {
2294
+ if (Q === "legacy") return { profile: Q, digests: CA };
2295
+ if (Q === "stock-certified-v1" && YI.length > 0)
2296
+ return { profile: Q, digests: CA };
1619
2297
  throw new Error(`The ${Q} toolchain is not available in this build`);
1620
2298
  }
1621
- class l {
2299
+ class r {
1622
2300
  #A;
1623
2301
  hashCount = 3;
1624
2302
  hashMs;
1625
- constructor(A, g) {
1626
- this.#A = A, this.hashMs = g;
2303
+ constructor(A, I) {
2304
+ this.#A = A, this.hashMs = I;
1627
2305
  }
1628
- static async load(A, g, I, C = u.exceptions, B = "legacy") {
1629
- const i = KA(B);
2306
+ static async load(A, I, g, C = CA.exceptions, B = "legacy") {
2307
+ const E = HA(B);
1630
2308
  if (A.length !== 2) throw new Error("Missing C++ toolchain assets");
1631
- let D, N;
1632
- const y = await Promise.allSettled(
1633
- A.map(async (d, v) => {
2309
+ let D, w;
2310
+ const N = await Promise.allSettled(
2311
+ A.map(async (H, j) => {
1634
2312
  try {
1635
- const j = await fetch(d, { cache: "force-cache", signal: I });
1636
- if (!j.ok) throw new Error(`Cannot load C++ toolchain (${j.status})`);
1637
- return v === 0 && g && typeof WebAssembly.compileStreaming == "function" && typeof j.clone == "function" && (N = WebAssembly.compileStreaming(j.clone()).catch(() => {
1638
- })), new Uint8Array(await j.arrayBuffer());
1639
- } catch (j) {
1640
- throw D ??= { error: j }, j;
2313
+ const s = await fetch(H, { cache: "force-cache", signal: g });
2314
+ if (!s.ok) throw new Error(`Cannot load C++ toolchain (${s.status})`);
2315
+ return j === 0 && I && typeof WebAssembly.compileStreaming == "function" && typeof s.clone == "function" && (w = WebAssembly.compileStreaming(s.clone()).catch(() => {
2316
+ })), new Uint8Array(await s.arrayBuffer());
2317
+ } catch (s) {
2318
+ throw D ??= { error: s }, s;
1641
2319
  }
1642
2320
  })
1643
2321
  );
1644
- if (y[0].status === "rejected" || y[1].status === "rejected")
2322
+ if (N[0].status === "rejected" || N[1].status === "rejected")
1645
2323
  throw D?.error;
1646
- const [U, L] = [y[0].value, y[1].value], [Y, c] = await Promise.allSettled([
1647
- l.ingestOwned(U, L, !1, C),
1648
- g ? (N ?? Promise.resolve(void 0)).then(
1649
- (d) => d ?? WebAssembly.compile(U)
2324
+ const [k, U] = [N[0].value, N[1].value], [h, K] = await Promise.allSettled([
2325
+ r.ingestOwned(k, U, !1, C),
2326
+ I ? (w ?? Promise.resolve(void 0)).then(
2327
+ (H) => H ?? WebAssembly.compile(k)
1650
2328
  ) : Promise.resolve(void 0)
1651
2329
  ]);
1652
- if (Y.status === "rejected") throw Y.reason;
1653
- const a = Y.value;
1654
- if (a.#A.compilerHash !== i.digests.compiler || a.#A.sysrootHash !== i.digests.sysroot || a.#A.exceptionsHash !== i.digests.exceptions)
2330
+ if (h.status === "rejected") throw h.reason;
2331
+ const R = h.value;
2332
+ if (R.#A.compilerHash !== E.digests.compiler || R.#A.sysrootHash !== E.digests.sysroot || R.#A.exceptionsHash !== E.digests.exceptions)
1655
2333
  throw new Error("C++ toolchain integrity mismatch");
1656
- if (I?.aborted) throw new DOMException("Toolchain loading aborted", "AbortError");
1657
- if (c.status === "rejected") throw c.reason;
1658
- return a.#A.stockProfile = i.profile === "stock-certified-v1", a.#A.module = c.value, a;
2334
+ if (g?.aborted) throw new DOMException("Toolchain loading aborted", "AbortError");
2335
+ if (K.status === "rejected") throw K.reason;
2336
+ return R.#A.stockProfile = E.profile === "stock-certified-v1", R.#A.module = K.value, R;
1659
2337
  }
1660
2338
  /** Captures even Buffer/subclass inputs before the first asynchronous boundary. */
1661
- static async fromBytes(A, g, I) {
1662
- const C = new Uint8Array(A), B = new Uint8Array(g);
1663
- return l.ingestOwned(
2339
+ static async fromBytes(A, I, g) {
2340
+ const C = new Uint8Array(A), B = new Uint8Array(I);
2341
+ return r.ingestOwned(
1664
2342
  C,
1665
2343
  B,
1666
- I,
1667
- u.exceptions
2344
+ g,
2345
+ CA.exceptions
1668
2346
  );
1669
2347
  }
1670
- static async ingestOwned(A, g, I, C) {
1671
- const B = performance.now(), i = await Promise.allSettled([FA(A), FA(g)]);
1672
- if (i[0].status === "rejected") throw i[0].reason;
1673
- if (i[1].status === "rejected") throw i[1].reason;
1674
- const [D, N] = [i[0].value, i[1].value], y = I ? await WebAssembly.compile(A) : void 0;
1675
- return new l(
1676
- { compiler: A, sysroot: g, compilerHash: D, sysrootHash: N, exceptionsHash: C, module: y },
2348
+ static async ingestOwned(A, I, g, C) {
2349
+ const B = performance.now(), E = await Promise.allSettled([LA(A), LA(I)]);
2350
+ if (E[0].status === "rejected") throw E[0].reason;
2351
+ if (E[1].status === "rejected") throw E[1].reason;
2352
+ const [D, w] = [E[0].value, E[1].value], N = g ? await WebAssembly.compile(A) : void 0;
2353
+ return new r(
2354
+ { compiler: A, sysroot: I, compilerHash: D, sysrootHash: w, exceptionsHash: C, module: N },
1677
2355
  performance.now() - B
1678
2356
  );
1679
2357
  }
@@ -1690,25 +2368,25 @@ class l {
1690
2368
  return this.#A.compiler.byteLength;
1691
2369
  }
1692
2370
  /** postMessage clones the private seed; never transfer/detach the restart owner. */
1693
- configure(A, g) {
2371
+ configure(A, I) {
1694
2372
  try {
1695
- return A.postMessage({ ...g, toolchain: this.#A }), !!this.#A.module;
1696
- } catch (I) {
1697
- if (!(I instanceof DOMException) || I.name !== "DataCloneError" || !this.#A.module)
1698
- throw I;
1699
- return A.postMessage({ ...g, toolchain: { ...this.#A, module: void 0 } }), !1;
2373
+ return A.postMessage({ ...I, toolchain: this.#A }), !!this.#A.module;
2374
+ } catch (g) {
2375
+ if (!(g instanceof DOMException) || g.name !== "DataCloneError" || !this.#A.module)
2376
+ throw g;
2377
+ return A.postMessage({ ...I, toolchain: { ...this.#A, module: void 0 } }), !1;
1700
2378
  }
1701
2379
  }
1702
2380
  }
1703
- async function FA(Q) {
2381
+ async function LA(Q) {
1704
2382
  const A = await crypto.subtle.digest("SHA-256", Q);
1705
- return Array.from(new Uint8Array(A), (g) => g.toString(16).padStart(2, "0")).join("");
2383
+ return Array.from(new Uint8Array(A), (I) => I.toString(16).padStart(2, "0")).join("");
1706
2384
  }
1707
- let _, m;
1708
- class yA {
1709
- stdout = new kA(1);
1710
- stderr = new kA(2);
1711
- stdin = new q();
2385
+ let BA, $;
2386
+ class qA {
2387
+ stdout = new sA(1);
2388
+ stderr = new sA(2);
2389
+ stdin = new O();
1712
2390
  debugger;
1713
2391
  lang;
1714
2392
  scope;
@@ -1717,6 +2395,7 @@ class yA {
1717
2395
  cppArtifacts;
1718
2396
  hostDevice;
1719
2397
  options;
2398
+ python;
1720
2399
  retain;
1721
2400
  idleTimeoutMs;
1722
2401
  /** Absolute `EngineOptions.wasmUrl`, handed to each worker; unset uses the default. */
@@ -1746,35 +2425,44 @@ class yA {
1746
2425
  retirements = 0;
1747
2426
  latest;
1748
2427
  cacheValidation;
1749
- static async create(A, g = {}) {
1750
- const { wasmUrl: I, ...C } = g, B = I === void 0 ? void 0 : PA(I, globalThis.location?.href), i = structuredClone(C), D = B ?? null;
1751
- if (m !== void 0 && m !== D)
2428
+ static async create(A, I = {}) {
2429
+ const { wasmUrl: g, python: C, ...B } = I, E = g === void 0 ? void 0 : II(g, globalThis.location?.href), D = structuredClone(B);
2430
+ C && (D.python = {
2431
+ packages: !!C.packages,
2432
+ onPackageStatus: typeof C.onPackageStatus == "function" ? C.onPackageStatus : void 0
2433
+ });
2434
+ const w = E ?? null;
2435
+ if ($ !== void 0 && $ !== w)
1752
2436
  throw new Error("The engine Wasm is already loaded from a different wasmUrl");
1753
- m = D, _ ??= dA({ module_or_path: B ?? WA }).catch((y) => {
1754
- throw _ = void 0, m = void 0, y;
1755
- }), await _;
1756
- const N = new yA(A, i);
1757
- if (N.wasmUrl = B, A !== "c" && typeof window < "u" && typeof fetch < "u")
1758
- for (const y of EA(A))
1759
- fetch(y, { cache: "force-cache" }).then((U) => U.arrayBuffer()).catch(() => {
2437
+ $ = w, BA ??= rA({ module_or_path: E ?? nA }).catch((k) => {
2438
+ throw BA = void 0, $ = void 0, k;
2439
+ }), await BA;
2440
+ const N = new qA(A, D);
2441
+ if (N.wasmUrl = E, A !== "c" && typeof window < "u" && typeof fetch < "u")
2442
+ for (const k of GA(A))
2443
+ fetch(k, { cache: "force-cache" }).then((U) => U.arrayBuffer()).catch(() => {
1760
2444
  });
1761
2445
  return N;
1762
2446
  }
1763
- constructor(A, g) {
1764
- const I = g.cpp;
1765
- this.retain = g.retainWorker ?? I?.retainWorker ?? !0;
1766
- const C = g.idleTimeoutMs ?? I?.idleTimeoutMs ?? 3e4;
2447
+ constructor(A, I) {
2448
+ const g = I.cpp;
2449
+ this.retain = I.retainWorker ?? g?.retainWorker ?? !0;
2450
+ const C = I.idleTimeoutMs ?? g?.idleTimeoutMs ?? 3e4;
1767
2451
  if (!Number.isSafeInteger(C) || C < 1 || C > 3e5)
1768
2452
  throw new RangeError("Worker idle timeout must be between 1 and 300000 milliseconds");
1769
- if (this.idleTimeoutMs = C, I) {
2453
+ if (this.idleTimeoutMs = C, g) {
1770
2454
  if (A !== "c") throw new TypeError("C++ performance options require C/C++");
1771
- if (!I.scope?.projectId || !I.scope.accountId)
2455
+ if (!g.scope?.projectId || !g.scope.accountId)
1772
2456
  throw new TypeError("C++ performance options require project and account identity");
1773
- if (I.compilerLifetime !== void 0 && !["idle", "project"].includes(I.compilerLifetime))
2457
+ if (g.compilerLifetime !== void 0 && !["idle", "project"].includes(g.compilerLifetime))
1774
2458
  throw new TypeError("Invalid compiler lifetime");
1775
- KA(I.toolchainProfile), this.scope = Object.freeze({ ...I.scope }), this.options = Object.freeze({ ...I, scope: this.scope, idleTimeoutMs: C });
2459
+ HA(g.toolchainProfile), this.scope = Object.freeze({ ...g.scope }), this.options = Object.freeze({ ...g, scope: this.scope, idleTimeoutMs: C });
1776
2460
  }
1777
- this.objects = new ZA(typeof I?.objectCache == "object" ? I.objectCache : {}), this.debugger = new fA(), this.lang = A;
2461
+ if (I.python) {
2462
+ if (A !== "python") throw new TypeError("Python options require Python");
2463
+ this.python = Object.freeze({ ...I.python });
2464
+ }
2465
+ this.objects = new uA(typeof g?.objectCache == "object" ? g.objectCache : {}), this.debugger = new $A(), this.lang = A;
1778
2466
  }
1779
2467
  /** A retained worker reuses clang, compiled once on this thread and cloned to it. */
1780
2468
  get cacheCompilerModule() {
@@ -1816,23 +2504,23 @@ class yA {
1816
2504
  cancelCurrentOperation() {
1817
2505
  if (this.cancellationDraining) return this.cancellationDraining;
1818
2506
  this.operationId++;
1819
- const A = this.promise, g = this.active?.publication;
2507
+ const A = this.promise, I = this.active?.publication;
1820
2508
  this.retireWorker(), this.objects.discardBatch(), this.active && this.finish(this.active, { type: "stopped" });
1821
- const I = Promise.allSettled([A, g]).then(() => {
1822
- this.cancellationDraining === I && (this.cancellationDraining = void 0);
2509
+ const g = Promise.allSettled([A, I]).then(() => {
2510
+ this.cancellationDraining === g && (this.cancellationDraining = void 0);
1823
2511
  });
1824
- return this.cancellationDraining = I, I;
2512
+ return this.cancellationDraining = g, g;
1825
2513
  }
1826
2514
  /** Release idle compiler resources, or defer behind an active guest without stopping it. */
1827
2515
  releaseCompilerResources(A = {}) {
1828
- const g = A.signal;
1829
- return g?.aborted ? Promise.resolve("cancelled") : this.disposed ? Promise.resolve("released") : new Promise((I) => {
1830
- const C = { resolve: I, signal: g, abort: () => this.settleRelease(C, "cancelled") };
1831
- this.releases.add(C), g?.addEventListener("abort", C.abort, { once: !0 }), this.flushReleases();
2516
+ const I = A.signal;
2517
+ return I?.aborted ? Promise.resolve("cancelled") : this.disposed ? Promise.resolve("released") : new Promise((g) => {
2518
+ const C = { resolve: g, signal: I, abort: () => this.settleRelease(C, "cancelled") };
2519
+ this.releases.add(C), I?.addEventListener("abort", C.abort, { once: !0 }), this.flushReleases();
1832
2520
  });
1833
2521
  }
1834
- settleRelease(A, g) {
1835
- this.releases.delete(A) && (A.signal?.removeEventListener("abort", A.abort), A.resolve(g));
2522
+ settleRelease(A, I) {
2523
+ this.releases.delete(A) && (A.signal?.removeEventListener("abort", A.abort), A.resolve(I));
1836
2524
  }
1837
2525
  flushReleases() {
1838
2526
  if (!(this.active || !this.releases.size || this.releaseDrain)) {
@@ -1860,86 +2548,104 @@ class yA {
1860
2548
  /** Load compiler resources. Optional input validation never invokes Clang, links, or runs a guest. */
1861
2549
  prepareCompiler(A) {
1862
2550
  if (A?.validateCacheInputs !== void 0 && typeof A.validateCacheInputs != "boolean")
1863
- return Promise.resolve(S(new TypeError("Invalid compiler preparation options")));
1864
- const g = A?.validateCacheInputs === !0 && this.options?.toolchainProfile === "stock-certified-v1" && !!this.options?.objectCache && this.objects.limits.maxEntries > 0 && this.objects.limits.maxObjectBytes > 0 && this.objects.limits.maxMetadataBytes > 0 && this.objects.limits.maxEntryMetadataBytes > 0;
1865
- return this.submit(!0, !0, g);
2551
+ return Promise.resolve(c(new TypeError("Invalid compiler preparation options")));
2552
+ const I = A?.validateCacheInputs === !0 && this.options?.toolchainProfile === "stock-certified-v1" && !!this.options?.objectCache && this.objects.limits.maxEntries > 0 && this.objects.limits.maxObjectBytes > 0 && this.objects.limits.maxMetadataBytes > 0 && this.objects.limits.maxEntryMetadataBytes > 0;
2553
+ return this.submit(!0, !0, I);
1866
2554
  }
1867
2555
  /** Every Run links current objects and starts a fresh student runtime. */
1868
2556
  run() {
1869
- return this.submit(!1);
2557
+ return this.lang === "python" && this.python?.packages ? this.runWithPackages() : this.submit(!1);
2558
+ }
2559
+ /** Installs what the program imports from PyPI, then runs it with those files mounted. */
2560
+ async runWithPackages() {
2561
+ const A = (g) => {
2562
+ try {
2563
+ this.python?.onPackageStatus?.(g);
2564
+ } catch {
2565
+ }
2566
+ };
2567
+ let I = {};
2568
+ try {
2569
+ I = await RI(this.fs, A);
2570
+ } catch (g) {
2571
+ A({
2572
+ kind: "skipped",
2573
+ message: `Packages: ${g instanceof Error ? g.message : String(g)}`
2574
+ });
2575
+ }
2576
+ return this.submit(!1, !1, !1, I);
1870
2577
  }
1871
2578
  /** Compiles Run-profile C++ translation units only; never links, runs, or opens devices. */
1872
2579
  compile() {
1873
2580
  return this.submit(!0);
1874
2581
  }
1875
- submit(A, g = !1, I = !1) {
1876
- if (this.disposed) return Promise.resolve(S(new Error("Engine is disposed")));
2582
+ submit(A, I = !1, g = !1, C = {}) {
2583
+ if (this.disposed) return Promise.resolve(c(new Error("Engine is disposed")));
1877
2584
  if (this.active || this.cancellationDraining)
1878
- return Promise.resolve(S(new Error("An engine job is already active")));
2585
+ return Promise.resolve(c(new Error("An engine job is already active")));
1879
2586
  if (A && this.lang !== "c")
1880
- return Promise.resolve(S(new Error("Compile-only is supported for C/C++")));
2587
+ return Promise.resolve(c(new Error("Compile-only is supported for C/C++")));
1881
2588
  this.cacheValidation = void 0;
1882
- const C = g && !I;
1883
- let B;
2589
+ const B = I && !g;
2590
+ let E;
1884
2591
  try {
1885
- const Y = C || !this.cppArtifacts ? null : { ...this.cppArtifacts };
1886
- if (Y?.cacheCertificate !== void 0) {
1887
- const c = Y.cacheCertificate;
1888
- (typeof c != "string" || c.length > 1024 * 1024 || new TextEncoder().encode(c).byteLength > 1024 * 1024) && delete Y.cacheCertificate;
2592
+ const K = B || !this.cppArtifacts ? null : { ...this.cppArtifacts };
2593
+ if (K?.cacheCertificate !== void 0) {
2594
+ const R = K.cacheCertificate;
2595
+ (typeof R != "string" || R.length > 1024 * 1024 || new TextEncoder().encode(R).byteLength > 1024 * 1024) && delete K.cacheCertificate;
1889
2596
  }
1890
- B = {
1891
- fs: C ? {} : structuredClone(this.fs),
2597
+ E = {
2598
+ fs: B ? {} : structuredClone(this.fs),
1892
2599
  binary_files: Object.fromEntries(
1893
- Object.entries(C ? {} : this.binaryFiles).map(([c, a]) => [
1894
- c,
1895
- new Uint8Array(a)
1896
- ])
2600
+ Object.entries(B ? {} : { ...C, ...this.binaryFiles }).map(
2601
+ ([R, H]) => [R, new Uint8Array(H)]
2602
+ )
1897
2603
  ),
1898
- cpp_artifacts: structuredClone(Y)
2604
+ cpp_artifacts: structuredClone(K)
1899
2605
  };
1900
- } catch (Y) {
1901
- return Promise.resolve(S(Y));
2606
+ } catch (K) {
2607
+ return Promise.resolve(c(K));
1902
2608
  }
1903
- const i = !A && this.debugger.enabled, D = A ? void 0 : this.hostDevice;
1904
- if (D !== void 0 && (typeof D != "function" || !["c", "python"].includes(this.lang)))
1905
- return Promise.resolve(S(new TypeError("Invalid host device configuration")));
1906
- clearTimeout(this.idleTimer), this.stdin[J].clear();
2609
+ const D = !A && this.debugger.enabled, w = A ? void 0 : this.hostDevice;
2610
+ if (w !== void 0 && (typeof w != "function" || !["c", "python"].includes(this.lang)))
2611
+ return Promise.resolve(c(new TypeError("Invalid host device configuration")));
2612
+ clearTimeout(this.idleTimer), this.stdin[L].clear();
1907
2613
  const N = !!this.slot;
1908
- let y;
1909
- const U = new Promise((Y) => {
1910
- y = Y;
2614
+ let k;
2615
+ const U = new Promise((K) => {
2616
+ k = K;
1911
2617
  });
1912
2618
  this.promise = U;
1913
- const L = {
2619
+ const h = {
1914
2620
  generation: this.generation,
1915
2621
  scopeEpoch: this.scopeEpoch,
1916
2622
  operationId: ++this.operationId,
1917
2623
  cacheEpoch: this.generation,
1918
- prepareOnly: g,
1919
- validateCacheInputs: I,
2624
+ prepareOnly: I,
2625
+ validateCacheInputs: g,
1920
2626
  settled: !1,
1921
2627
  buildOnly: A,
1922
- debug: i,
1923
- opener: D,
2628
+ debug: D,
2629
+ opener: w,
1924
2630
  startedAt: performance.now(),
1925
- resolve: y,
2631
+ resolve: k,
1926
2632
  stats: {
1927
- operation: g ? "prepare_compiler" : A ? "compile" : "run",
2633
+ operation: I ? "prepare_compiler" : A ? "compile" : "run",
1928
2634
  workerReadyMs: 0,
1929
2635
  workerReused: N
1930
2636
  },
1931
2637
  start: {
1932
- ...B,
2638
+ ...E,
1933
2639
  lang: this.lang,
1934
- prepare_compiler: g,
1935
- validate_cache_inputs: I,
2640
+ prepare_compiler: I,
2641
+ validate_cache_inputs: g,
1936
2642
  scope_epoch: this.scopeEpoch,
1937
2643
  operation_id: this.operationId,
1938
2644
  cache_epoch: this.generation,
1939
- is_debug: i,
2645
+ is_debug: D,
1940
2646
  build_only: A,
1941
- stdin_buffer: this.stdin[J].buffer,
1942
- cpp_cache: this.options?.objectCache && !i && !g ? {
2647
+ stdin_buffer: this.stdin[L].buffer,
2648
+ cpp_cache: this.options?.objectCache && !D && !I ? {
1943
2649
  generation: this.generation,
1944
2650
  entries: this.objects.snapshot(),
1945
2651
  max_entry_metadata_bytes: Math.min(
@@ -1950,15 +2656,15 @@ class yA {
1950
2656
  } : null
1951
2657
  }
1952
2658
  };
1953
- this.objects.beginBatch(), this.active = L;
2659
+ this.objects.beginBatch(), this.active = h;
1954
2660
  try {
1955
- if (this.slot || this.makeWorker(), !this.current(L)) return U;
1956
- const Y = this.slot;
1957
- this.lang === "c" && !this.toolchain && this.ensureToolchain().catch((c) => {
1958
- this.current(L) && this.slot === Y && this.finish(L, S(c));
1959
- }), this.slot.ready && this.dispatch(L);
1960
- } catch (Y) {
1961
- this.finish(L, S(Y));
2661
+ if (this.slot || this.makeWorker(), !this.current(h)) return U;
2662
+ const K = this.slot;
2663
+ this.lang === "c" && !this.toolchain && this.ensureToolchain().catch((R) => {
2664
+ this.current(h) && this.slot === K && this.finish(h, c(R));
2665
+ }), this.slot.ready && this.dispatch(h);
2666
+ } catch (K) {
2667
+ this.finish(h, c(K));
1962
2668
  }
1963
2669
  return U;
1964
2670
  }
@@ -1966,74 +2672,74 @@ class yA {
1966
2672
  return this.active === A && !A.settled;
1967
2673
  }
1968
2674
  makeWorker() {
1969
- const A = XA(this.wasmUrl), g = { worker: A, ready: !1, remove: () => {
2675
+ const A = CI(this.wasmUrl), I = { worker: A, ready: !1, remove: () => {
1970
2676
  } };
1971
- this.slot = g;
1972
- const I = (i) => {
1973
- if (this.slot !== g) return;
1974
- const D = i.data, N = this.active;
2677
+ this.slot = I;
2678
+ const g = (E) => {
2679
+ if (this.slot !== I) return;
2680
+ const D = E.data, w = this.active;
1975
2681
  if (D.type === "ready") {
1976
- if (g.ready) return;
1977
- g.ready = !0, N && this.current(N) && this.dispatch(N);
2682
+ if (I.ready) return;
2683
+ I.ready = !0, w && this.current(w) && this.dispatch(w);
1978
2684
  return;
1979
2685
  }
1980
- if (!(!N || !this.current(N))) {
1981
- if (!g.ready && D.type === "error") {
1982
- this.finish(N, S(new Error(D.message)));
2686
+ if (!(!w || !this.current(w))) {
2687
+ if (!I.ready && D.type === "error") {
2688
+ this.finish(w, c(new Error(D.message)));
1983
2689
  return;
1984
2690
  }
1985
- if (!(D.operationId !== N.operationId || D.scopeEpoch !== N.scopeEpoch))
2691
+ if (!(D.operationId !== w.operationId || D.scopeEpoch !== w.scopeEpoch))
1986
2692
  try {
1987
2693
  if (D.type === "cpp_cache_eligibility") {
1988
- if (this.options?.toolchainProfile !== "stock-certified-v1" || N.prepareOnly && !N.validateCacheInputs)
2694
+ if (this.options?.toolchainProfile !== "stock-certified-v1" || w.prepareOnly && !w.validateCacheInputs)
1989
2695
  return;
1990
- const y = (L) => typeof L == "string" && /^[0-9a-f]{64}$/.test(L), U = D.eligible === !0 && y(D.certificate_sha256) && y(D.snapshot);
2696
+ const N = (U) => typeof U == "string" && /^[0-9a-f]{64}$/.test(U), k = D.eligible === !0 && N(D.certificate_sha256) && N(D.snapshot);
1991
2697
  this.cacheValidation = {
1992
- eligible: U,
1993
- certificate: y(D.certificate_sha256) ? D.certificate_sha256 : void 0,
1994
- snapshot: U ? D.snapshot : void 0,
1995
- operationId: N.operationId,
1996
- reason: U ? void 0 : typeof D.reason == "string" ? D.reason.slice(0, 128) : "stock-input-validation"
2698
+ eligible: k,
2699
+ certificate: N(D.certificate_sha256) ? D.certificate_sha256 : void 0,
2700
+ snapshot: k ? D.snapshot : void 0,
2701
+ operationId: w.operationId,
2702
+ reason: k ? void 0 : typeof D.reason == "string" ? D.reason.slice(0, 128) : "stock-input-validation"
1997
2703
  };
1998
2704
  } else if (D.type === "stop")
1999
- this.finish(N, {
2705
+ this.finish(w, {
2000
2706
  type: "completed",
2001
2707
  exitCode: D.exit_code,
2002
2708
  timing: {
2003
- totalMs: performance.now() - N.startedAt,
2709
+ totalMs: performance.now() - w.startedAt,
2004
2710
  buildMs: D.build_ms,
2005
2711
  runMs: D.run_ms
2006
2712
  }
2007
2713
  });
2008
2714
  else if (D.type === "error")
2009
- this.finish(N, S(new Error(D.message)));
2010
- else if (D.type === "cpp_cache_object" && D.generation === this.generation && N.generation === this.generation)
2715
+ this.finish(w, c(new Error(D.message)));
2716
+ else if (D.type === "cpp_cache_object" && D.generation === this.generation && w.generation === this.generation)
2011
2717
  try {
2012
2718
  this.objects.stage(D);
2013
2719
  } catch {
2014
2720
  this.objects.abandonBatch();
2015
2721
  }
2016
- else D.type === "cpp_cache_stats" && D.generation === N.generation ? N.stats.cache = D.stats : D.type === "cpp_cache_abandon" ? this.objects.abandonBatch() : D.type === "object_build_complete" ? N.publication ??= this.publishObjects(N, g) : D.type === "compiler_module_stats" && (N.stats.compilerModule = D);
2017
- } catch (y) {
2018
- this.finish(N, S(y));
2722
+ else D.type === "cpp_cache_stats" && D.generation === w.generation ? w.stats.cache = D.stats : D.type === "cpp_cache_abandon" ? this.objects.abandonBatch() : D.type === "object_build_complete" ? w.publication ??= this.publishObjects(w, I) : D.type === "compiler_module_stats" && (w.stats.compilerModule = D);
2723
+ } catch (N) {
2724
+ this.finish(w, c(N));
2019
2725
  }
2020
2726
  }
2021
- }, C = (i) => {
2022
- this.slot === g && (this.clearCaches(), this.active ? this.finish(this.active, S(i.error ?? new Error(i.message))) : this.retireWorker());
2727
+ }, C = (E) => {
2728
+ this.slot === I && (this.clearCaches(), this.active ? this.finish(this.active, c(E.error ?? new Error(E.message))) : this.retireWorker());
2023
2729
  }, B = () => C({ message: "Unreadable execution worker message" });
2024
- this.debugger[J].attach(A), A.addEventListener("message", I), A.addEventListener("error", C), A.addEventListener("messageerror", B), g.remove = () => {
2025
- A.removeEventListener("message", I), A.removeEventListener("error", C), A.removeEventListener("messageerror", B), this.debugger[J].detach(A);
2730
+ this.debugger[L].attach(A), A.addEventListener("message", g), A.addEventListener("error", C), A.addEventListener("messageerror", B), I.remove = () => {
2731
+ A.removeEventListener("message", g), A.removeEventListener("error", C), A.removeEventListener("messageerror", B), this.debugger[L].detach(A);
2026
2732
  };
2027
2733
  }
2028
- async publishObjects(A, g) {
2029
- let I = !1;
2734
+ async publishObjects(A, I) {
2735
+ let g = !1;
2030
2736
  try {
2031
- I = await this.objects.validateBatch();
2737
+ g = await this.objects.validateBatch();
2032
2738
  } catch {
2033
2739
  }
2034
- if (!(!this.current(A) || this.slot !== g)) {
2740
+ if (!(!this.current(A) || this.slot !== I)) {
2035
2741
  try {
2036
- I && A.cacheEpoch === this.generation ? this.objects.commitBatch() : (this.objects.abandonBatch(), this.cacheValidation?.operationId === A.operationId && (this.cacheValidation = {
2742
+ g && A.cacheEpoch === this.generation ? this.objects.commitBatch() : (this.objects.abandonBatch(), this.cacheValidation?.operationId === A.operationId && (this.cacheValidation = {
2037
2743
  ...this.cacheValidation,
2038
2744
  eligible: !1,
2039
2745
  snapshot: void 0,
@@ -2047,7 +2753,7 @@ class yA {
2047
2753
  reason: "stock-publication-failure"
2048
2754
  });
2049
2755
  }
2050
- this.current(A) && g.worker.postMessage({
2756
+ this.current(A) && I.worker.postMessage({
2051
2757
  type: "object_build_ack",
2052
2758
  scopeEpoch: A.scopeEpoch,
2053
2759
  operationId: A.operationId,
@@ -2059,11 +2765,11 @@ class yA {
2059
2765
  if (this.toolchain) return Promise.resolve(this.toolchain);
2060
2766
  if (this.toolchainLoading) return this.toolchainLoading;
2061
2767
  this.toolchainController = new AbortController();
2062
- const A = l.load(
2063
- EA("c"),
2768
+ const A = r.load(
2769
+ GA("c"),
2064
2770
  this.cacheCompilerModule,
2065
2771
  this.toolchainController.signal,
2066
- hA(),
2772
+ dA(),
2067
2773
  this.options?.toolchainProfile
2068
2774
  );
2069
2775
  return this.toolchainLoading = A, this.initializing.add(A), A.then(
@@ -2074,14 +2780,14 @@ class yA {
2074
2780
  ), A;
2075
2781
  }
2076
2782
  async dispatch(A) {
2077
- const g = this.slot;
2078
- if (!(!this.current(A) || !g))
2783
+ const I = this.slot;
2784
+ if (!(!this.current(A) || !I))
2079
2785
  try {
2080
2786
  if (this.lang === "c") {
2081
- const B = this.scopeEpoch, i = this.generation, D = this.ensureToolchain(), N = this.toolchain ?? await D;
2082
- if (!this.current(A) || this.slot !== g || B !== this.scopeEpoch) return;
2083
- const y = A.start.cpp_artifacts?.requiredToolchain;
2084
- if (y && !N.matchesExpectation(y)) {
2787
+ const B = this.scopeEpoch, E = this.generation, D = this.ensureToolchain(), w = this.toolchain ?? await D;
2788
+ if (!this.current(A) || this.slot !== I || B !== this.scopeEpoch) return;
2789
+ const N = A.start.cpp_artifacts?.requiredToolchain;
2790
+ if (N && !w.matchesExpectation(N)) {
2085
2791
  this.finish(A, {
2086
2792
  type: "error",
2087
2793
  error: {
@@ -2091,69 +2797,69 @@ class yA {
2091
2797
  });
2092
2798
  return;
2093
2799
  }
2094
- i === this.generation && (this.toolchainIdentity && this.toolchainIdentity !== N.identity && (this.objects.clear(), A.start.cpp_cache = null), this.toolchain !== N && (this.toolchainIngestions++, this.toolchainHashCount += N.hashCount, this.toolchainHashMs += N.hashMs), this.toolchainIdentity = N.identity, this.toolchain = N, this.toolchainLoading === D && (this.toolchainLoading = void 0)), g.toolchain !== N && (this.compilerModuleCloned = N.configure(g.worker, {
2800
+ E === this.generation && (this.toolchainIdentity && this.toolchainIdentity !== w.identity && (this.objects.clear(), A.start.cpp_cache = null), this.toolchain !== w && (this.toolchainIngestions++, this.toolchainHashCount += w.hashCount, this.toolchainHashMs += w.hashMs), this.toolchainIdentity = w.identity, this.toolchain = w, this.toolchainLoading === D && (this.toolchainLoading = void 0)), I.toolchain !== w && (this.compilerModuleCloned = w.configure(I.worker, {
2095
2801
  type: "configure_cpp",
2096
2802
  cacheCompilerModule: this.cacheCompilerModule
2097
- }), g.toolchain = N);
2803
+ }), I.toolchain = w);
2098
2804
  }
2099
- if (!this.current(A) || this.slot !== g) return;
2100
- const I = g.worker;
2805
+ if (!this.current(A) || this.slot !== I) return;
2806
+ const g = I.worker;
2101
2807
  A.stats.workerReadyMs = performance.now() - A.startedAt;
2102
2808
  const C = (B) => this.current(A) && B.scopeEpoch === A.scopeEpoch && B.operationId === A.operationId;
2103
- if (this.stdout[J].attach(I, C), this.stderr[J].attach(I, C), A.prepareOnly || this.debugger[J].beginRun(), A.opener) {
2104
- if (A.device = new mA((B) => this.finish(A, S(B))), A.device.attach(I), A.device.open(A.opener), !this.current(A)) return;
2809
+ if (this.stdout[L].attach(g, C), this.stderr[L].attach(g, C), A.prepareOnly || this.debugger[L].beginRun(), A.opener) {
2810
+ if (A.device = new QI((B) => this.finish(A, c(B))), A.device.attach(g), A.device.open(A.opener), !this.current(A)) return;
2105
2811
  A.start.host_device = A.device.workerStart;
2106
2812
  }
2107
- this.current(A) && (I.postMessage(A.start), A.start.fs = {}, A.start.binary_files = {}, A.start.cpp_artifacts = null, A.start.cpp_cache = null);
2108
- } catch (I) {
2109
- this.current(A) && (this.toolchainLoading = void 0, this.finish(A, S(I)));
2813
+ this.current(A) && (g.postMessage(A.start), A.start.fs = {}, A.start.binary_files = {}, A.start.cpp_artifacts = null, A.start.cpp_cache = null);
2814
+ } catch (g) {
2815
+ this.current(A) && (this.toolchainLoading = void 0, this.finish(A, c(g)));
2110
2816
  }
2111
2817
  }
2112
- finish(A, g) {
2818
+ finish(A, I) {
2113
2819
  if (!this.current(A)) return;
2114
- (g.type !== "completed" || g.exitCode !== 0) && (this.cacheValidation = void 0), A.settled = !0;
2115
- const I = this.slot?.worker;
2116
- I && (this.stdout[J].detach(I), this.stderr[J].detach(I));
2820
+ (I.type !== "completed" || I.exitCode !== 0) && (this.cacheValidation = void 0), A.settled = !0;
2821
+ const g = this.slot?.worker;
2822
+ g && (this.stdout[L].detach(g), this.stderr[L].detach(g));
2117
2823
  const C = A.device?.close();
2118
- C && (g = S(C));
2119
- const B = g.type === "completed" && A.generation === this.generation && !this.disposed, i = B && g.type === "completed" && g.exitCode === 0;
2824
+ C && (I = c(C));
2825
+ const B = I.type === "completed" && A.generation === this.generation && !this.disposed, E = B && I.type === "completed" && I.exitCode === 0;
2120
2826
  if (A.generation === this.generation)
2121
2827
  for (const D of A.stats.cache?.invalid_sources ?? []) this.objects.delete(D);
2122
- if (i)
2828
+ if (E)
2123
2829
  for (const D of A.stats.cache?.hit_sources ?? []) this.objects.touch(D);
2124
- this.objects.discardBatch(), this.latest = A.stats, this.stdin[J].clear(), (!B || !this.retain) && this.retireWorker(), !this.disposed && A.cacheEpoch === this.generation && (this.slot || this.toolchain && this.cacheCompilerModule) && this.options?.compilerLifetime !== "project" && (this.idleTimer = setTimeout(() => {
2830
+ this.objects.discardBatch(), this.latest = A.stats, this.stdin[L].clear(), (!B || !this.retain) && this.retireWorker(), !this.disposed && A.cacheEpoch === this.generation && (this.slot || this.toolchain && this.cacheCompilerModule) && this.options?.compilerLifetime !== "project" && (this.idleTimer = setTimeout(() => {
2125
2831
  this.retireWorker(), this.toolchain = void 0, this.toolchainLoading = void 0;
2126
- }, this.idleTimeoutMs)), !this.retain && !this.cacheCompilerModule && (this.toolchain = void 0), A.cacheEpoch !== this.generation && (this.toolchainController?.abort(), this.toolchainLoading = void 0), this.active = void 0, this.promise = void 0, this.flushReleases(), A.resolve(g);
2832
+ }, this.idleTimeoutMs)), !this.retain && !this.cacheCompilerModule && (this.toolchain = void 0), A.cacheEpoch !== this.generation && (this.toolchainController?.abort(), this.toolchainLoading = void 0), this.active = void 0, this.promise = void 0, this.flushReleases(), A.resolve(I);
2127
2833
  }
2128
2834
  retireWorker() {
2129
2835
  clearTimeout(this.idleTimer);
2130
2836
  const A = this.slot;
2131
- A && (this.slot = void 0, A.remove(), this.stdout[J].detach(A.worker), this.stderr[J].detach(A.worker), A.worker.onerror = (g) => g.preventDefault(), A.worker.terminate(), this.retirements++);
2837
+ A && (this.slot = void 0, A.remove(), this.stdout[L].detach(A.worker), this.stderr[L].detach(A.worker), A.worker.onerror = (I) => I.preventDefault(), A.worker.terminate(), this.retirements++);
2132
2838
  }
2133
2839
  }
2134
- class kA extends MA {
2840
+ class sA extends cA {
2135
2841
  constructor(A) {
2136
- super(), this.mode = A, this.callback = ((g) => {
2137
- const I = g.data;
2138
- if (this.accepts && !this.accepts(I) || I.type !== "stdout" || I.mode !== this.mode) return;
2139
- const C = I.data;
2842
+ super(), this.mode = A, this.callback = ((I) => {
2843
+ const g = I.data;
2844
+ if (this.accepts && !this.accepts(g) || g.type !== "stdout" || g.mode !== this.mode) return;
2845
+ const C = g.data;
2140
2846
  this.emit("data", C);
2141
- }).bind(this), this[J] = {
2847
+ }).bind(this), this[L] = {
2142
2848
  attach: this.attach.bind(this),
2143
2849
  detach: this.detach.bind(this)
2144
2850
  };
2145
2851
  }
2146
2852
  callback;
2147
2853
  accepts;
2148
- [J];
2149
- attach(A, g) {
2150
- this.accepts = g, A.addEventListener("message", this.callback);
2854
+ [L];
2855
+ attach(A, I) {
2856
+ this.accepts = I, A.addEventListener("message", this.callback);
2151
2857
  }
2152
2858
  detach(A) {
2153
2859
  A.removeEventListener("message", this.callback);
2154
2860
  }
2155
2861
  }
2156
- class q {
2862
+ class O {
2157
2863
  /**
2158
2864
  * Ring buffer to store stdin data.
2159
2865
  *
@@ -2163,19 +2869,19 @@ class q {
2163
2869
  static BUFFER_SIZE = 2048;
2164
2870
  static HEADER_SIZE = 8;
2165
2871
  // 2 x i32
2166
- static DATA_SIZE = q.BUFFER_SIZE - q.HEADER_SIZE;
2872
+ static DATA_SIZE = O.BUFFER_SIZE - O.HEADER_SIZE;
2167
2873
  static READ_IDX = 0;
2168
2874
  static WRITE_IDX = 1;
2169
2875
  static encoder = new TextEncoder();
2170
- buffer = new SharedArrayBuffer(q.BUFFER_SIZE);
2876
+ buffer = new SharedArrayBuffer(O.BUFFER_SIZE);
2171
2877
  generation = 0;
2172
2878
  indices;
2173
2879
  data;
2174
- [J];
2880
+ [L];
2175
2881
  constructor() {
2176
- this.indices = new Int32Array(this.buffer, 0, 2), this.data = new Int8Array(this.buffer, q.HEADER_SIZE);
2882
+ this.indices = new Int32Array(this.buffer, 0, 2), this.data = new Int8Array(this.buffer, O.HEADER_SIZE);
2177
2883
  const A = () => this.buffer;
2178
- this[J] = {
2884
+ this[L] = {
2179
2885
  clear: this.clear.bind(this),
2180
2886
  get buffer() {
2181
2887
  return A();
@@ -2183,35 +2889,37 @@ class q {
2183
2889
  };
2184
2890
  }
2185
2891
  clear() {
2186
- this.generation++, Atomics.notify(this.indices, q.READ_IDX), this.buffer = new SharedArrayBuffer(q.BUFFER_SIZE), this.indices = new Int32Array(this.buffer, 0, 2), this.data = new Int8Array(this.buffer, q.HEADER_SIZE);
2892
+ this.generation++, Atomics.notify(this.indices, O.READ_IDX), this.buffer = new SharedArrayBuffer(O.BUFFER_SIZE), this.indices = new Int32Array(this.buffer, 0, 2), this.data = new Int8Array(this.buffer, O.HEADER_SIZE);
2187
2893
  }
2188
2894
  async write(A) {
2189
- const g = typeof A == "string" ? q.encoder.encode(A) : A;
2190
- return this.writeBytes(g);
2895
+ const I = typeof A == "string" ? O.encoder.encode(A) : A;
2896
+ return this.writeBytes(I);
2191
2897
  }
2192
2898
  async writeBytes(A) {
2193
- const { DATA_SIZE: g, READ_IDX: I, WRITE_IDX: C } = q;
2899
+ const { DATA_SIZE: I, READ_IDX: g, WRITE_IDX: C } = O;
2194
2900
  let B = 0;
2195
- const i = this.generation;
2196
- for (; B < A.length && i === this.generation; ) {
2197
- const D = Atomics.load(this.indices, I);
2198
- let N = Atomics.load(this.indices, C);
2199
- N === g - 1 && D > 0 && (N = 0);
2200
- const y = D <= N ? g - N - 1 : D - N - 1;
2201
- if (y === 0) {
2202
- await Atomics.waitAsync(this.indices, I, D).value;
2901
+ const E = this.generation;
2902
+ for (; B < A.length && E === this.generation; ) {
2903
+ const D = Atomics.load(this.indices, g);
2904
+ let w = Atomics.load(this.indices, C);
2905
+ w === I - 1 && D > 0 && (w = 0);
2906
+ const N = D <= w ? I - w - 1 : D - w - 1;
2907
+ if (N === 0) {
2908
+ await Atomics.waitAsync(this.indices, g, D).value;
2203
2909
  continue;
2204
2910
  }
2205
- const U = Math.min(A.length - B, y);
2206
- this.data.set(A.subarray(B, B + U), N), Atomics.store(this.indices, C, (N + U) % g), Atomics.notify(this.indices, C), B += U;
2911
+ const k = Math.min(A.length - B, N);
2912
+ this.data.set(A.subarray(B, B + k), w), Atomics.store(this.indices, C, (w + k) % I), Atomics.notify(this.indices, C), B += k;
2207
2913
  }
2208
2914
  }
2209
2915
  }
2210
2916
  export {
2211
- zA as Artifact,
2212
- fA as Debugger,
2213
- yA as Engine,
2214
- nA as HOST_DEVICE_PATH,
2215
- q as Stdin,
2216
- kA as Stdout
2917
+ _A as Artifact,
2918
+ $A as Debugger,
2919
+ qA as Engine,
2920
+ JI as HOST_DEVICE_PATH,
2921
+ EI as SITE_PACKAGES,
2922
+ O as Stdin,
2923
+ sA as Stdout,
2924
+ RI as pythonPackageFiles
2217
2925
  };