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/assets/{worker-uI0K1NG6.js → worker-bkz0CBX9.js} +383 -404
- package/dist/engine_bg.wasm +0 -0
- package/dist/glassjar.js +1613 -905
- package/dist/glassjar.umd.cjs +5 -2
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/python-packages.d.ts +72 -0
- package/dist/python-packages.d.ts.map +1 -0
- package/dist/python-stdlib-modules.json.d.ts +4 -0
- package/package.json +1 -1
package/dist/glassjar.js
CHANGED
|
@@ -1,228 +1,228 @@
|
|
|
1
|
-
function
|
|
1
|
+
function OA(Q) {
|
|
2
2
|
return Q && Q.__esModule && Object.prototype.hasOwnProperty.call(Q, "default") ? Q.default : Q;
|
|
3
3
|
}
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
if (
|
|
7
|
-
|
|
8
|
-
var Q = typeof Reflect == "object" ? Reflect : null, A = Q && typeof Q.apply == "function" ? Q.apply : function(
|
|
9
|
-
return Function.prototype.apply.call(
|
|
10
|
-
},
|
|
11
|
-
Q && typeof Q.ownKeys == "function" ?
|
|
12
|
-
return Object.getOwnPropertyNames(
|
|
13
|
-
} :
|
|
14
|
-
return Object.getOwnPropertyNames(
|
|
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
|
|
17
|
-
console && console.warn && console.warn(
|
|
16
|
+
function g(o) {
|
|
17
|
+
console && console.warn && console.warn(o);
|
|
18
18
|
}
|
|
19
|
-
var C = Number.isNaN || function(
|
|
20
|
-
return
|
|
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
|
-
|
|
26
|
-
var
|
|
27
|
-
function D(
|
|
28
|
-
if (typeof
|
|
29
|
-
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof
|
|
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
|
|
34
|
+
return E;
|
|
35
35
|
},
|
|
36
|
-
set: function(
|
|
37
|
-
if (typeof
|
|
38
|
-
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' +
|
|
39
|
-
|
|
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(
|
|
44
|
-
if (typeof
|
|
45
|
-
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' +
|
|
46
|
-
return this._maxListeners =
|
|
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
|
|
49
|
-
return
|
|
48
|
+
function w(o) {
|
|
49
|
+
return o._maxListeners === void 0 ? B.defaultMaxListeners : o._maxListeners;
|
|
50
50
|
}
|
|
51
51
|
B.prototype.getMaxListeners = function() {
|
|
52
|
-
return
|
|
53
|
-
}, B.prototype.emit = function(
|
|
54
|
-
for (var
|
|
55
|
-
var
|
|
56
|
-
if (
|
|
57
|
-
|
|
58
|
-
else if (!
|
|
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 (
|
|
61
|
-
var
|
|
62
|
-
if (
|
|
63
|
-
throw
|
|
64
|
-
var
|
|
65
|
-
throw
|
|
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
|
|
68
|
-
if (
|
|
67
|
+
var t = S[i];
|
|
68
|
+
if (t === void 0)
|
|
69
69
|
return !1;
|
|
70
|
-
if (typeof
|
|
71
|
-
A(
|
|
70
|
+
if (typeof t == "function")
|
|
71
|
+
A(t, this, F);
|
|
72
72
|
else
|
|
73
|
-
for (var
|
|
74
|
-
A(
|
|
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
|
|
78
|
-
var
|
|
79
|
-
if (D(
|
|
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
|
-
|
|
82
|
-
|
|
83
|
-
),
|
|
84
|
-
|
|
85
|
-
else if (typeof
|
|
86
|
-
|
|
87
|
-
var
|
|
88
|
-
|
|
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
|
|
90
|
+
return o;
|
|
91
91
|
}
|
|
92
|
-
B.prototype.addListener = function(
|
|
93
|
-
return
|
|
94
|
-
}, B.prototype.on = B.prototype.addListener, B.prototype.prependListener = function(
|
|
95
|
-
return
|
|
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
|
|
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
|
|
102
|
-
var
|
|
103
|
-
return
|
|
104
|
-
}
|
|
105
|
-
B.prototype.once = function(
|
|
106
|
-
return D(
|
|
107
|
-
}, B.prototype.prependOnceListener = function(
|
|
108
|
-
return D(
|
|
109
|
-
}, B.prototype.removeListener = function(
|
|
110
|
-
var
|
|
111
|
-
if (D(
|
|
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 (
|
|
113
|
+
if (M = y[i], M === void 0)
|
|
114
114
|
return this;
|
|
115
|
-
if (
|
|
116
|
-
--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete
|
|
117
|
-
else if (typeof
|
|
118
|
-
for (
|
|
119
|
-
if (
|
|
120
|
-
|
|
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 (
|
|
123
|
+
if (S < 0)
|
|
124
124
|
return this;
|
|
125
|
-
|
|
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(
|
|
129
|
-
var
|
|
130
|
-
if (
|
|
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 (
|
|
133
|
-
return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) :
|
|
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
|
|
136
|
-
for (
|
|
137
|
-
|
|
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 (
|
|
141
|
-
this.removeListener(
|
|
142
|
-
else if (
|
|
143
|
-
for (
|
|
144
|
-
this.removeListener(
|
|
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
|
|
148
|
-
var
|
|
149
|
-
if (
|
|
147
|
+
function h(o, i, F) {
|
|
148
|
+
var M = o._events;
|
|
149
|
+
if (M === void 0)
|
|
150
150
|
return [];
|
|
151
|
-
var
|
|
152
|
-
return
|
|
153
|
-
}
|
|
154
|
-
B.prototype.listeners = function(
|
|
155
|
-
return
|
|
156
|
-
}, B.prototype.rawListeners = function(
|
|
157
|
-
return
|
|
158
|
-
}, B.listenerCount = function(
|
|
159
|
-
return typeof
|
|
160
|
-
}, B.prototype.listenerCount =
|
|
161
|
-
function
|
|
162
|
-
var
|
|
163
|
-
if (
|
|
164
|
-
var
|
|
165
|
-
if (typeof
|
|
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 (
|
|
168
|
-
return
|
|
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 ?
|
|
173
|
+
return this._eventsCount > 0 ? I(this._events) : [];
|
|
174
174
|
};
|
|
175
|
-
function
|
|
176
|
-
for (var
|
|
177
|
-
|
|
178
|
-
return
|
|
179
|
-
}
|
|
180
|
-
function
|
|
181
|
-
for (;
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}
|
|
185
|
-
function
|
|
186
|
-
for (var
|
|
187
|
-
|
|
188
|
-
return
|
|
189
|
-
}
|
|
190
|
-
function
|
|
191
|
-
return new Promise(function(
|
|
192
|
-
function
|
|
193
|
-
|
|
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
|
|
196
|
-
typeof
|
|
195
|
+
function S() {
|
|
196
|
+
typeof o.removeListener == "function" && o.removeListener("error", y), F([].slice.call(arguments));
|
|
197
197
|
}
|
|
198
|
-
|
|
198
|
+
V(o, i, S, { once: !0 }), i !== "error" && u(o, y, { once: !0 });
|
|
199
199
|
});
|
|
200
200
|
}
|
|
201
|
-
function
|
|
202
|
-
typeof
|
|
201
|
+
function u(o, i, F) {
|
|
202
|
+
typeof o.on == "function" && V(o, "error", i, F);
|
|
203
203
|
}
|
|
204
|
-
function
|
|
205
|
-
if (typeof
|
|
206
|
-
|
|
207
|
-
else if (typeof
|
|
208
|
-
|
|
209
|
-
|
|
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
|
|
212
|
+
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof o);
|
|
213
213
|
}
|
|
214
|
-
return
|
|
214
|
+
return e.exports;
|
|
215
215
|
}
|
|
216
|
-
var
|
|
217
|
-
const
|
|
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,
|
|
221
|
+
return this.__wbg_ptr = 0, kA.unregister(this), A;
|
|
222
222
|
}
|
|
223
223
|
free() {
|
|
224
224
|
const A = this.__destroy_into_raw();
|
|
225
|
-
|
|
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
|
-
|
|
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
|
-
|
|
242
|
+
G.dapadapter_detach(this.__wbg_ptr);
|
|
243
243
|
}
|
|
244
244
|
constructor() {
|
|
245
|
-
const A =
|
|
246
|
-
return this.__wbg_ptr = A >>> 0,
|
|
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
|
-
|
|
252
|
+
G.dapadapter_on(this.__wbg_ptr, A);
|
|
253
253
|
}
|
|
254
254
|
resetRun() {
|
|
255
|
-
|
|
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
|
|
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
|
-
|
|
268
|
+
G.dapadapter_setFilterInternals(this.__wbg_ptr, A);
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
|
-
Symbol.dispose && (
|
|
272
|
-
class
|
|
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
|
|
276
|
-
return
|
|
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,
|
|
280
|
+
return this.__wbg_ptr = 0, KA.unregister(this), A;
|
|
281
281
|
}
|
|
282
282
|
free() {
|
|
283
283
|
const A = this.__destroy_into_raw();
|
|
284
|
-
|
|
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
|
-
|
|
291
|
+
G.trap___wbg_wasmer_trap();
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
|
-
Symbol.dispose && (
|
|
295
|
-
function
|
|
294
|
+
Symbol.dispose && (n.prototype[Symbol.dispose] = n.prototype.free);
|
|
295
|
+
function dA() {
|
|
296
296
|
let Q, A;
|
|
297
297
|
try {
|
|
298
|
-
const
|
|
299
|
-
return Q =
|
|
298
|
+
const I = G.cpp_exception_hash();
|
|
299
|
+
return Q = I[0], A = I[1], q(I[0], I[1]);
|
|
300
300
|
} finally {
|
|
301
|
-
|
|
301
|
+
G.__wbindgen_free(Q, A, 1);
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
|
-
function
|
|
305
|
-
const A =
|
|
306
|
-
var C =
|
|
307
|
-
return
|
|
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
|
|
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,
|
|
318
|
-
return Error(
|
|
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,
|
|
324
|
-
const
|
|
325
|
-
|
|
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,
|
|
328
|
-
const
|
|
329
|
-
|
|
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
|
|
333
|
-
return
|
|
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,
|
|
336
|
-
const
|
|
337
|
-
|
|
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
|
|
340
|
+
return G.__wbindgen_export;
|
|
341
341
|
},
|
|
342
|
-
__wbg___wbindgen_in_47fa6863be6f2f25: function(A,
|
|
343
|
-
return A in
|
|
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
|
|
353
|
-
return typeof
|
|
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,
|
|
362
|
-
return A ===
|
|
361
|
+
__wbg___wbindgen_jsval_eq_11888390b0186270: function(A, I) {
|
|
362
|
+
return A === I;
|
|
363
363
|
},
|
|
364
|
-
__wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811: function(A,
|
|
365
|
-
return A ==
|
|
364
|
+
__wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811: function(A, I) {
|
|
365
|
+
return A == I;
|
|
366
366
|
},
|
|
367
|
-
__wbg___wbindgen_lt_bb59cc3d23526e0d: function(A,
|
|
368
|
-
return A <
|
|
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,
|
|
374
|
-
const
|
|
375
|
-
|
|
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,
|
|
381
|
-
return A >>
|
|
380
|
+
__wbg___wbindgen_shr_ef8e07cce709eb54: function(A, I) {
|
|
381
|
+
return A >> I;
|
|
382
382
|
},
|
|
383
|
-
__wbg___wbindgen_string_get_72fb696202c56729: function(A,
|
|
384
|
-
const
|
|
385
|
-
var B =
|
|
386
|
-
|
|
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,
|
|
389
|
-
throw new Error(
|
|
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
|
|
396
|
-
A.addEventListener(
|
|
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
|
|
401
|
-
return Reflect.apply(A,
|
|
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
|
|
406
|
-
return A.apply(
|
|
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
|
|
410
|
+
return J(function(A) {
|
|
411
411
|
return A.arrayBuffer();
|
|
412
412
|
}, arguments);
|
|
413
413
|
},
|
|
414
|
-
__wbg_bind_1dc37de2b9939128: function(A,
|
|
415
|
-
return A.bind(
|
|
414
|
+
__wbg_bind_1dc37de2b9939128: function(A, I, g, C) {
|
|
415
|
+
return A.bind(I, g, C);
|
|
416
416
|
},
|
|
417
|
-
__wbg_bind_29ba380591735d8c: function(A,
|
|
418
|
-
return A.bind(
|
|
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
|
|
431
|
-
return A.call(
|
|
430
|
+
return J(function(A, I) {
|
|
431
|
+
return A.call(I);
|
|
432
432
|
}, arguments);
|
|
433
433
|
},
|
|
434
434
|
__wbg_call_4708e0c13bdc8e95: function() {
|
|
435
|
-
return
|
|
436
|
-
return A.call(
|
|
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
|
|
441
|
-
return Atomics.compareExchange(A,
|
|
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,
|
|
451
|
-
return WebAssembly.Module.customSections(A,
|
|
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,
|
|
463
|
-
let
|
|
462
|
+
__wbg_error_7534b8e9a36f1ab4: function(A, I) {
|
|
463
|
+
let g, C;
|
|
464
464
|
try {
|
|
465
|
-
|
|
465
|
+
g = A, C = I, console.error(q(A, I));
|
|
466
466
|
} finally {
|
|
467
|
-
|
|
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,
|
|
477
|
-
return A.fetch(
|
|
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
|
|
483
|
+
return J(function(A) {
|
|
484
484
|
return Reflect.getPrototypeOf(A);
|
|
485
485
|
}, arguments);
|
|
486
486
|
},
|
|
487
487
|
__wbg_getRandomValues_b3f15fcbfabb0f8b: function() {
|
|
488
|
-
return
|
|
489
|
-
A.getRandomValues(
|
|
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,
|
|
499
|
-
return A.getUint32(
|
|
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
|
|
503
|
-
return A.get(
|
|
502
|
+
return J(function(A, I) {
|
|
503
|
+
return A.get(I >>> 0);
|
|
504
504
|
}, arguments);
|
|
505
505
|
},
|
|
506
|
-
__wbg_get_9b94d73e6221f75c: function(A,
|
|
507
|
-
return A[
|
|
506
|
+
__wbg_get_9b94d73e6221f75c: function(A, I) {
|
|
507
|
+
return A[I >>> 0];
|
|
508
508
|
},
|
|
509
509
|
__wbg_get_b3ed3ad4be2bc8ac: function() {
|
|
510
|
-
return
|
|
511
|
-
return Reflect.get(A,
|
|
510
|
+
return J(function(A, I) {
|
|
511
|
+
return Reflect.get(A, I);
|
|
512
512
|
}, arguments);
|
|
513
513
|
},
|
|
514
|
-
__wbg_get_index_253dd2a9e007656d: function(A,
|
|
515
|
-
return A[
|
|
514
|
+
__wbg_get_index_253dd2a9e007656d: function(A, I) {
|
|
515
|
+
return A[I >>> 0];
|
|
516
516
|
},
|
|
517
|
-
__wbg_get_index_9a5bfdd2ca49c65f: function(A,
|
|
518
|
-
return A[
|
|
517
|
+
__wbg_get_index_9a5bfdd2ca49c65f: function(A, I) {
|
|
518
|
+
return A[I >>> 0];
|
|
519
519
|
},
|
|
520
|
-
__wbg_get_with_ref_key_1dc361bd10053bfe: function(A,
|
|
521
|
-
return A[
|
|
520
|
+
__wbg_get_with_ref_key_1dc361bd10053bfe: function(A, I) {
|
|
521
|
+
return A[I];
|
|
522
522
|
},
|
|
523
523
|
__wbg_grow_5d42bf28c2da22cb: function() {
|
|
524
|
-
return
|
|
525
|
-
return A.grow(
|
|
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
|
|
530
|
-
return A.grow(
|
|
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
|
|
537
|
+
let I;
|
|
538
538
|
try {
|
|
539
|
-
|
|
539
|
+
I = A instanceof ArrayBuffer;
|
|
540
540
|
} catch {
|
|
541
|
-
|
|
541
|
+
I = !1;
|
|
542
542
|
}
|
|
543
|
-
return
|
|
543
|
+
return I;
|
|
544
544
|
},
|
|
545
545
|
__wbg_instanceof_Error_8573fe0b0b480f46: function(A) {
|
|
546
|
-
let
|
|
546
|
+
let I;
|
|
547
547
|
try {
|
|
548
|
-
|
|
548
|
+
I = A instanceof Error;
|
|
549
549
|
} catch {
|
|
550
|
-
|
|
550
|
+
I = !1;
|
|
551
551
|
}
|
|
552
|
-
return
|
|
552
|
+
return I;
|
|
553
553
|
},
|
|
554
554
|
__wbg_instanceof_Function_2a29eec978bb3b11: function(A) {
|
|
555
|
-
let
|
|
555
|
+
let I;
|
|
556
556
|
try {
|
|
557
|
-
|
|
557
|
+
I = A instanceof Function;
|
|
558
558
|
} catch {
|
|
559
|
-
|
|
559
|
+
I = !1;
|
|
560
560
|
}
|
|
561
|
-
return
|
|
561
|
+
return I;
|
|
562
562
|
},
|
|
563
563
|
__wbg_instanceof_Global_2db767b6b2347f01: function(A) {
|
|
564
|
-
let
|
|
564
|
+
let I;
|
|
565
565
|
try {
|
|
566
|
-
|
|
566
|
+
I = A instanceof WebAssembly.Global;
|
|
567
567
|
} catch {
|
|
568
|
-
|
|
568
|
+
I = !1;
|
|
569
569
|
}
|
|
570
|
-
return
|
|
570
|
+
return I;
|
|
571
571
|
},
|
|
572
572
|
__wbg_instanceof_Map_53af74335dec57f4: function(A) {
|
|
573
|
-
let
|
|
573
|
+
let I;
|
|
574
574
|
try {
|
|
575
|
-
|
|
575
|
+
I = A instanceof Map;
|
|
576
576
|
} catch {
|
|
577
|
-
|
|
577
|
+
I = !1;
|
|
578
578
|
}
|
|
579
|
-
return
|
|
579
|
+
return I;
|
|
580
580
|
},
|
|
581
581
|
__wbg_instanceof_Memory_dc8c61e3f831ee37: function(A) {
|
|
582
|
-
let
|
|
582
|
+
let I;
|
|
583
583
|
try {
|
|
584
|
-
|
|
584
|
+
I = A instanceof WebAssembly.Memory;
|
|
585
585
|
} catch {
|
|
586
|
-
|
|
586
|
+
I = !1;
|
|
587
587
|
}
|
|
588
|
-
return
|
|
588
|
+
return I;
|
|
589
589
|
},
|
|
590
590
|
__wbg_instanceof_Module_d0d412b14363ba9a: function(A) {
|
|
591
|
-
let
|
|
591
|
+
let I;
|
|
592
592
|
try {
|
|
593
|
-
|
|
593
|
+
I = A instanceof WebAssembly.Module;
|
|
594
594
|
} catch {
|
|
595
|
-
|
|
595
|
+
I = !1;
|
|
596
596
|
}
|
|
597
|
-
return
|
|
597
|
+
return I;
|
|
598
598
|
},
|
|
599
599
|
__wbg_instanceof_Object_1c6af87502b733ed: function(A) {
|
|
600
|
-
let
|
|
600
|
+
let I;
|
|
601
601
|
try {
|
|
602
|
-
|
|
602
|
+
I = A instanceof Object;
|
|
603
603
|
} catch {
|
|
604
|
-
|
|
604
|
+
I = !1;
|
|
605
605
|
}
|
|
606
|
-
return
|
|
606
|
+
return I;
|
|
607
607
|
},
|
|
608
608
|
__wbg_instanceof_RangeError_0b0dd056bc557b89: function(A) {
|
|
609
|
-
let
|
|
609
|
+
let I;
|
|
610
610
|
try {
|
|
611
|
-
|
|
611
|
+
I = A instanceof RangeError;
|
|
612
612
|
} catch {
|
|
613
|
-
|
|
613
|
+
I = !1;
|
|
614
614
|
}
|
|
615
|
-
return
|
|
615
|
+
return I;
|
|
616
616
|
},
|
|
617
617
|
__wbg_instanceof_Response_ee1d54d79ae41977: function(A) {
|
|
618
|
-
let
|
|
618
|
+
let I;
|
|
619
619
|
try {
|
|
620
|
-
|
|
620
|
+
I = A instanceof Response;
|
|
621
621
|
} catch {
|
|
622
|
-
|
|
622
|
+
I = !1;
|
|
623
623
|
}
|
|
624
|
-
return
|
|
624
|
+
return I;
|
|
625
625
|
},
|
|
626
626
|
__wbg_instanceof_SharedArrayBuffer_91d8a2fa16a2cc26: function(A) {
|
|
627
|
-
let
|
|
627
|
+
let I;
|
|
628
628
|
try {
|
|
629
|
-
|
|
629
|
+
I = A instanceof SharedArrayBuffer;
|
|
630
630
|
} catch {
|
|
631
|
-
|
|
631
|
+
I = !1;
|
|
632
632
|
}
|
|
633
|
-
return
|
|
633
|
+
return I;
|
|
634
634
|
},
|
|
635
635
|
__wbg_instanceof_Table_127f216e592f4159: function(A) {
|
|
636
|
-
let
|
|
636
|
+
let I;
|
|
637
637
|
try {
|
|
638
|
-
|
|
638
|
+
I = A instanceof WebAssembly.Table;
|
|
639
639
|
} catch {
|
|
640
|
-
|
|
640
|
+
I = !1;
|
|
641
641
|
}
|
|
642
|
-
return
|
|
642
|
+
return I;
|
|
643
643
|
},
|
|
644
644
|
__wbg_instanceof_Tag_f1d6b24a98b95210: function(A) {
|
|
645
|
-
let
|
|
645
|
+
let I;
|
|
646
646
|
try {
|
|
647
|
-
|
|
647
|
+
I = A instanceof WebAssembly.Tag;
|
|
648
648
|
} catch {
|
|
649
|
-
|
|
649
|
+
I = !1;
|
|
650
650
|
}
|
|
651
|
-
return
|
|
651
|
+
return I;
|
|
652
652
|
},
|
|
653
653
|
__wbg_instanceof_Uint8Array_9b9075935c74707c: function(A) {
|
|
654
|
-
let
|
|
654
|
+
let I;
|
|
655
655
|
try {
|
|
656
|
-
|
|
656
|
+
I = A instanceof Uint8Array;
|
|
657
657
|
} catch {
|
|
658
|
-
|
|
658
|
+
I = !1;
|
|
659
659
|
}
|
|
660
|
-
return
|
|
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,
|
|
669
|
-
return Object.is(A,
|
|
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
|
|
685
|
-
return Atomics.load(A,
|
|
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,
|
|
706
|
-
return new DataView(A,
|
|
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
|
|
716
|
-
return new WebAssembly.Global(A,
|
|
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
|
|
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
|
|
734
|
-
return new WebAssembly.Instance(A,
|
|
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
|
|
728
|
+
return J(function(A) {
|
|
739
729
|
return new WebAssembly.Memory(A);
|
|
740
730
|
}, arguments);
|
|
741
731
|
},
|
|
742
|
-
__wbg_new_b5d9e2fb389fef91: function(A,
|
|
732
|
+
__wbg_new_b5d9e2fb389fef91: function(A, I) {
|
|
743
733
|
try {
|
|
744
|
-
var
|
|
745
|
-
const
|
|
746
|
-
|
|
734
|
+
var g = { a: A, b: I }, C = (E, D) => {
|
|
735
|
+
const w = g.a;
|
|
736
|
+
g.a = 0;
|
|
747
737
|
try {
|
|
748
|
-
return
|
|
738
|
+
return zA(w, g.b, E, D);
|
|
749
739
|
} finally {
|
|
750
|
-
|
|
740
|
+
g.a = w;
|
|
751
741
|
}
|
|
752
742
|
};
|
|
753
743
|
return new Promise(C);
|
|
754
744
|
} finally {
|
|
755
|
-
|
|
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,
|
|
768
|
-
return new Uint8Array(
|
|
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,
|
|
771
|
-
return new Function(
|
|
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,
|
|
774
|
-
return new Function(
|
|
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,
|
|
777
|
-
return new Uint8Array(A,
|
|
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,
|
|
780
|
-
return new Uint8Array(A,
|
|
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,
|
|
783
|
-
return new Int32Array(A,
|
|
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
|
|
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
|
|
804
|
-
return Atomics.notify(A,
|
|
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
|
|
818
|
-
A.postMessage(
|
|
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,
|
|
825
|
-
Uint8Array.prototype.set.call(
|
|
814
|
+
__wbg_prototypesetcall_bdcdcc5842e4d77d: function(A, I, g) {
|
|
815
|
+
Uint8Array.prototype.set.call(_(A, I), g);
|
|
826
816
|
},
|
|
827
|
-
__wbg_push_8ffdcb2063340ba5: function(A,
|
|
828
|
-
return A.push(
|
|
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
|
|
838
|
-
A.randomFillSync(
|
|
827
|
+
return J(function(A, I) {
|
|
828
|
+
A.randomFillSync(I);
|
|
839
829
|
}, arguments);
|
|
840
830
|
},
|
|
841
831
|
__wbg_removeEventListener_e63328781a5b9af9: function() {
|
|
842
|
-
return
|
|
843
|
-
A.removeEventListener(
|
|
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
|
|
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
|
|
856
|
-
return A.setTimeout(
|
|
845
|
+
return J(function(A, I, g) {
|
|
846
|
+
return A.setTimeout(I, g);
|
|
857
847
|
}, arguments);
|
|
858
848
|
},
|
|
859
|
-
__wbg_setUint32_d168af7751a8557e: function(A,
|
|
860
|
-
A.setUint32(
|
|
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
|
|
864
|
-
A.set(
|
|
853
|
+
return J(function(A, I, g) {
|
|
854
|
+
A.set(I >>> 0, g);
|
|
865
855
|
}, arguments);
|
|
866
856
|
},
|
|
867
|
-
__wbg_set_1eb0999cf5d27fc8: function(A,
|
|
868
|
-
return A.set(
|
|
857
|
+
__wbg_set_1eb0999cf5d27fc8: function(A, I, g) {
|
|
858
|
+
return A.set(I, g);
|
|
869
859
|
},
|
|
870
|
-
__wbg_set_25cf9deff6bf0ea8: function(A,
|
|
871
|
-
A.set(
|
|
860
|
+
__wbg_set_25cf9deff6bf0ea8: function(A, I, g) {
|
|
861
|
+
A.set(I, g >>> 0);
|
|
872
862
|
},
|
|
873
|
-
__wbg_set_3f1d0b984ed272ed: function(A,
|
|
874
|
-
A[
|
|
863
|
+
__wbg_set_3f1d0b984ed272ed: function(A, I, g) {
|
|
864
|
+
A[I] = g;
|
|
875
865
|
},
|
|
876
866
|
__wbg_set_6cb8631f80447a67: function() {
|
|
877
|
-
return
|
|
878
|
-
return Reflect.set(A,
|
|
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,
|
|
882
|
-
A.set(
|
|
871
|
+
__wbg_set_cc56eefd2dd91957: function(A, I, g) {
|
|
872
|
+
A.set(_(I, g));
|
|
883
873
|
},
|
|
884
|
-
__wbg_set_f43e577aea94465b: function(A,
|
|
885
|
-
A[
|
|
874
|
+
__wbg_set_f43e577aea94465b: function(A, I, g) {
|
|
875
|
+
A[I >>> 0] = g;
|
|
886
876
|
},
|
|
887
|
-
__wbg_set_index_b3244a6c458021e4: function(A,
|
|
888
|
-
A[
|
|
877
|
+
__wbg_set_index_b3244a6c458021e4: function(A, I, g) {
|
|
878
|
+
A[I >>> 0] = g;
|
|
889
879
|
},
|
|
890
|
-
__wbg_set_index_f259b54e97f7b177: function(A,
|
|
891
|
-
A[
|
|
880
|
+
__wbg_set_index_f259b54e97f7b177: function(A, I, g) {
|
|
881
|
+
A[I >>> 0] = g;
|
|
892
882
|
},
|
|
893
|
-
__wbg_set_onmessage_ea7cc2ba099021cd: function(A,
|
|
894
|
-
A.onmessage =
|
|
883
|
+
__wbg_set_onmessage_ea7cc2ba099021cd: function(A, I) {
|
|
884
|
+
A.onmessage = I;
|
|
895
885
|
},
|
|
896
|
-
__wbg_set_value_fc06e541de098215: function(A,
|
|
897
|
-
A.value =
|
|
886
|
+
__wbg_set_value_fc06e541de098215: function(A, I) {
|
|
887
|
+
A.value = I;
|
|
898
888
|
},
|
|
899
|
-
__wbg_slice_8bbd46adb2100583: function(A,
|
|
900
|
-
return A.slice(
|
|
889
|
+
__wbg_slice_8bbd46adb2100583: function(A, I, g) {
|
|
890
|
+
return A.slice(I >>> 0, g >>> 0);
|
|
901
891
|
},
|
|
902
|
-
__wbg_stack_0ed75d68575b0f3c: function(A,
|
|
903
|
-
const
|
|
904
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
910
|
+
return x(A) ? 0 : f(A);
|
|
921
911
|
},
|
|
922
912
|
__wbg_store_d1d951c98d9bed41: function() {
|
|
923
|
-
return
|
|
924
|
-
return Atomics.store(A,
|
|
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,
|
|
928
|
-
return A.subarray(
|
|
917
|
+
__wbg_subarray_a96e1fef17ed23cb: function(A, I, g) {
|
|
918
|
+
return A.subarray(I >>> 0, g >>> 0);
|
|
929
919
|
},
|
|
930
|
-
__wbg_then_0d9fe2c7b1857d32: function(A,
|
|
931
|
-
return A.then(
|
|
920
|
+
__wbg_then_0d9fe2c7b1857d32: function(A, I, g) {
|
|
921
|
+
return A.then(I, g);
|
|
932
922
|
},
|
|
933
|
-
__wbg_then_b9e7b3b5f1a9e1b5: function(A,
|
|
934
|
-
return A.then(
|
|
923
|
+
__wbg_then_b9e7b3b5f1a9e1b5: function(A, I) {
|
|
924
|
+
return A.then(I);
|
|
935
925
|
},
|
|
936
|
-
__wbg_toString_56d946daff83867b: function(A,
|
|
937
|
-
const C =
|
|
938
|
-
|
|
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
|
|
934
|
+
return n.__wrap(A);
|
|
945
935
|
},
|
|
946
936
|
__wbg_validate_71c2d02a71bda62f: function() {
|
|
947
|
-
return
|
|
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
|
|
962
|
-
return Atomics.wait(A,
|
|
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,
|
|
966
|
-
console.warn(A,
|
|
955
|
+
__wbg_warn_81ab00e6e16e886d: function(A, I, g) {
|
|
956
|
+
console.warn(A, I, g);
|
|
967
957
|
},
|
|
968
|
-
__wbindgen_cast_0000000000000001: function(A,
|
|
969
|
-
return
|
|
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,
|
|
972
|
-
return
|
|
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,
|
|
975
|
-
return
|
|
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,
|
|
978
|
-
return
|
|
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,
|
|
981
|
-
return
|
|
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,
|
|
984
|
-
return
|
|
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,
|
|
993
|
-
return
|
|
982
|
+
__wbindgen_cast_0000000000000009: function(A, I) {
|
|
983
|
+
return _(A, I);
|
|
994
984
|
},
|
|
995
|
-
__wbindgen_cast_000000000000000a: function(A,
|
|
996
|
-
return
|
|
985
|
+
__wbindgen_cast_000000000000000a: function(A, I) {
|
|
986
|
+
return q(A, I);
|
|
997
987
|
},
|
|
998
|
-
__wbindgen_cast_000000000000000b: function(A,
|
|
999
|
-
return BigInt.asUintN(64, A) | BigInt.asUintN(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 =
|
|
1010
|
-
A.set(0, void 0), A.set(
|
|
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
|
|
1016
|
-
|
|
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
|
|
1019
|
-
|
|
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
|
|
1022
|
-
|
|
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
|
|
1025
|
-
const
|
|
1026
|
-
if (
|
|
1027
|
-
throw
|
|
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
|
|
1030
|
-
const
|
|
1031
|
-
if (
|
|
1032
|
-
throw
|
|
1033
|
-
return
|
|
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
|
|
1036
|
-
|
|
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
|
|
1024
|
+
const kA = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
1039
1025
|
}, unregister: () => {
|
|
1040
|
-
} } : new FinalizationRegistry((Q) =>
|
|
1026
|
+
} } : new FinalizationRegistry((Q) => G.__wbg_dapadapter_free(Q >>> 0, 1)), KA = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
1041
1027
|
}, unregister: () => {
|
|
1042
|
-
} } : new FinalizationRegistry((Q) =>
|
|
1043
|
-
function
|
|
1044
|
-
const A =
|
|
1045
|
-
return
|
|
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
|
|
1033
|
+
const gA = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
1048
1034
|
}, unregister: () => {
|
|
1049
1035
|
} } : new FinalizationRegistry((Q) => Q.dtor(Q.a, Q.b));
|
|
1050
|
-
function
|
|
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 +=
|
|
1068
|
-
for (let
|
|
1069
|
-
B += ", " +
|
|
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
|
|
1073
|
-
let
|
|
1074
|
-
if (
|
|
1075
|
-
|
|
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 (
|
|
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}` :
|
|
1071
|
+
${Q.stack}` : g;
|
|
1086
1072
|
}
|
|
1087
|
-
function
|
|
1073
|
+
function lA(Q, A) {
|
|
1088
1074
|
Q = Q >>> 0;
|
|
1089
|
-
const
|
|
1075
|
+
const I = a(), g = [];
|
|
1090
1076
|
for (let C = Q; C < Q + 4 * A; C += 4)
|
|
1091
|
-
|
|
1092
|
-
return
|
|
1077
|
+
g.push(G.__wbindgen_externrefs.get(I.getUint32(C, !0)));
|
|
1078
|
+
return G.__externref_drop_slice(Q, A), g;
|
|
1093
1079
|
}
|
|
1094
|
-
function
|
|
1095
|
-
return Q = Q >>> 0,
|
|
1080
|
+
function _(Q, A) {
|
|
1081
|
+
return Q = Q >>> 0, m().subarray(Q / 1, Q / 1 + A);
|
|
1096
1082
|
}
|
|
1097
|
-
let
|
|
1098
|
-
function
|
|
1099
|
-
return (
|
|
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
|
|
1102
|
-
return Q = Q >>> 0,
|
|
1087
|
+
function q(Q, A) {
|
|
1088
|
+
return Q = Q >>> 0, bA(Q, A);
|
|
1103
1089
|
}
|
|
1104
|
-
let
|
|
1105
|
-
function
|
|
1106
|
-
return (
|
|
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
|
|
1094
|
+
function J(Q, A) {
|
|
1109
1095
|
try {
|
|
1110
1096
|
return Q.apply(this, A);
|
|
1111
|
-
} catch (
|
|
1112
|
-
const
|
|
1113
|
-
|
|
1097
|
+
} catch (I) {
|
|
1098
|
+
const g = f(I);
|
|
1099
|
+
G.__wbindgen_exn_store(g);
|
|
1114
1100
|
}
|
|
1115
1101
|
}
|
|
1116
|
-
function
|
|
1102
|
+
function x(Q) {
|
|
1117
1103
|
return Q == null;
|
|
1118
1104
|
}
|
|
1119
|
-
function
|
|
1120
|
-
const C = { a: Q, b: A, cnt: 1, dtor:
|
|
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
|
|
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,
|
|
1130
|
-
},
|
|
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
|
|
1133
|
-
const C = { a: Q, b: A, cnt: 1, dtor:
|
|
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
|
|
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,
|
|
1145
|
-
},
|
|
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
|
|
1148
|
-
if (
|
|
1149
|
-
const D =
|
|
1150
|
-
return
|
|
1151
|
-
}
|
|
1152
|
-
let
|
|
1153
|
-
const B =
|
|
1154
|
-
let
|
|
1155
|
-
for (;
|
|
1156
|
-
const D = Q.charCodeAt(
|
|
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 +
|
|
1144
|
+
B[C + E] = D;
|
|
1159
1145
|
}
|
|
1160
|
-
if (
|
|
1161
|
-
|
|
1162
|
-
const D =
|
|
1163
|
-
|
|
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
|
|
1151
|
+
return d = E, C;
|
|
1166
1152
|
}
|
|
1167
|
-
function
|
|
1168
|
-
const A =
|
|
1169
|
-
return
|
|
1153
|
+
function wA(Q) {
|
|
1154
|
+
const A = G.__wbindgen_externrefs.get(Q);
|
|
1155
|
+
return G.__externref_table_dealloc(Q), A;
|
|
1170
1156
|
}
|
|
1171
|
-
let
|
|
1172
|
-
|
|
1173
|
-
const
|
|
1174
|
-
let
|
|
1175
|
-
function
|
|
1176
|
-
return
|
|
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
|
|
1179
|
-
"encodeInto" in
|
|
1180
|
-
const
|
|
1181
|
-
return A.set(
|
|
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:
|
|
1169
|
+
written: I.length
|
|
1184
1170
|
};
|
|
1185
1171
|
});
|
|
1186
|
-
let
|
|
1187
|
-
function
|
|
1188
|
-
return
|
|
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
|
|
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 &&
|
|
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
|
|
1202
|
-
return await WebAssembly.instantiate(
|
|
1187
|
+
const g = await Q.arrayBuffer();
|
|
1188
|
+
return await WebAssembly.instantiate(g, A);
|
|
1203
1189
|
} else {
|
|
1204
|
-
const
|
|
1205
|
-
return
|
|
1190
|
+
const g = await WebAssembly.instantiate(Q, A);
|
|
1191
|
+
return g instanceof WebAssembly.Instance ? { instance: g, module: Q } : g;
|
|
1206
1192
|
}
|
|
1207
|
-
function g
|
|
1208
|
-
switch (
|
|
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
|
|
1218
|
-
if (
|
|
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 =
|
|
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:
|
|
1223
|
-
return
|
|
1208
|
+
const { instance: I, module: g } = await XA(await Q, A);
|
|
1209
|
+
return mA(I);
|
|
1224
1210
|
}
|
|
1225
|
-
const
|
|
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
|
|
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({ ...
|
|
1242
|
-
for (const
|
|
1243
|
-
if (!Number.isSafeInteger(
|
|
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
|
|
1253
|
-
if (
|
|
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
|
|
1258
|
-
for (; this.records.size && (this.records.size + this.staged.size >=
|
|
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 >=
|
|
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:
|
|
1268
|
-
}), this.objectBytes += A.object.byteLength, this.metadataBytes +=
|
|
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((
|
|
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
|
|
1291
|
-
if (!
|
|
1292
|
-
const
|
|
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(
|
|
1280
|
+
new Uint8Array(g),
|
|
1295
1281
|
(B) => B.toString(16).padStart(2, "0")
|
|
1296
|
-
).join("") !==
|
|
1282
|
+
).join("") !== I.object_hash) return !1;
|
|
1297
1283
|
}
|
|
1298
1284
|
return !0;
|
|
1299
1285
|
}
|
|
1300
1286
|
commitBatch() {
|
|
1301
|
-
for (const [A,
|
|
1302
|
-
this.remove(A), this.records.set(A,
|
|
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:
|
|
1297
|
+
return [...this.records.values()].map(({ source: A, key: I, object_hash: g, object: C, receipt: B }) => ({
|
|
1312
1298
|
source: A,
|
|
1313
|
-
key:
|
|
1314
|
-
object_hash:
|
|
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
|
|
1322
|
-
|
|
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
|
|
1328
|
-
if (
|
|
1329
|
-
const
|
|
1330
|
-
if (this.remove(A.source),
|
|
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 >=
|
|
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:
|
|
1337
|
-
this.records.set(A.source, C), this.objectBytes += C.object.byteLength, this.metadataBytes +=
|
|
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
|
|
1344
|
-
|
|
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,
|
|
1342
|
+
(A, I) => A + I.object.byteLength,
|
|
1357
1343
|
0
|
|
1358
1344
|
),
|
|
1359
1345
|
stagingMetadataBytes: [...this.staged.values()].reduce(
|
|
1360
|
-
(A,
|
|
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
|
|
1354
|
+
function eA(Q) {
|
|
1369
1355
|
if (!WebAssembly.validate(Q) || Q.length < 8) return !1;
|
|
1370
|
-
let A = 8,
|
|
1371
|
-
const
|
|
1356
|
+
let A = 8, I = !1;
|
|
1357
|
+
const g = () => {
|
|
1372
1358
|
let C = 0, B = 0;
|
|
1373
|
-
for (let
|
|
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 =
|
|
1382
|
-
if (
|
|
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 =
|
|
1385
|
-
if (A + D >
|
|
1386
|
-
const
|
|
1387
|
-
if (A += D,
|
|
1388
|
-
if (
|
|
1389
|
-
|
|
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 =
|
|
1378
|
+
A = E;
|
|
1393
1379
|
}
|
|
1394
|
-
return
|
|
1380
|
+
return I;
|
|
1395
1381
|
} catch {
|
|
1396
1382
|
return !1;
|
|
1397
1383
|
}
|
|
1398
1384
|
}
|
|
1399
|
-
const
|
|
1400
|
-
function
|
|
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
|
|
1395
|
+
class _A {
|
|
1410
1396
|
name;
|
|
1411
1397
|
data;
|
|
1412
|
-
constructor(A,
|
|
1413
|
-
this.name = A, this.data =
|
|
1398
|
+
constructor(A, I) {
|
|
1399
|
+
this.name = A, this.data = I;
|
|
1414
1400
|
}
|
|
1415
1401
|
download() {
|
|
1416
|
-
const A = new Uint8Array(this.data),
|
|
1417
|
-
C.href =
|
|
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
|
|
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
|
-
[
|
|
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[
|
|
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
|
|
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
|
|
1455
|
-
this.emit("artifact",
|
|
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
|
|
1468
|
-
function
|
|
1469
|
-
const
|
|
1470
|
-
if (
|
|
1471
|
-
throw new TypeError(`Engine Wasm must be served over http(s), not ${
|
|
1472
|
-
return
|
|
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
|
|
1460
|
+
function gI(Q) {
|
|
1475
1461
|
return new Worker(
|
|
1476
|
-
"" + new URL("assets/worker-
|
|
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
|
|
1484
|
-
return new
|
|
1469
|
+
function CI(Q) {
|
|
1470
|
+
return new gI(Q ? { name: AI + Q } : void 0);
|
|
1485
1471
|
}
|
|
1486
|
-
const
|
|
1487
|
-
class
|
|
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
|
|
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
|
|
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
|
|
1497
|
+
return iA(A);
|
|
1512
1498
|
}
|
|
1513
1499
|
}
|
|
1514
|
-
class
|
|
1500
|
+
class QI {
|
|
1515
1501
|
constructor(A) {
|
|
1516
1502
|
this.onFailure = A;
|
|
1517
1503
|
}
|
|
1518
|
-
incoming = new
|
|
1519
|
-
outgoing = new
|
|
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
|
|
1516
|
+
let I;
|
|
1531
1517
|
try {
|
|
1532
|
-
|
|
1518
|
+
I = A({
|
|
1533
1519
|
signal: this.abort.signal,
|
|
1534
|
-
onData: (
|
|
1535
|
-
if (this.assertOpen(), typeof
|
|
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(
|
|
1538
|
-
this.listeners.delete(
|
|
1523
|
+
return this.listeners.add(g), () => {
|
|
1524
|
+
this.listeners.delete(g);
|
|
1539
1525
|
};
|
|
1540
1526
|
},
|
|
1541
|
-
write: (
|
|
1527
|
+
write: (g) => this.write(g)
|
|
1542
1528
|
});
|
|
1543
|
-
} catch (
|
|
1544
|
-
throw
|
|
1529
|
+
} catch (g) {
|
|
1530
|
+
throw iA(g);
|
|
1545
1531
|
}
|
|
1546
|
-
if (
|
|
1547
|
-
throw Promise.resolve(
|
|
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
|
|
1535
|
+
if (typeof I == "function")
|
|
1550
1536
|
if (this.abort.signal.aborted) {
|
|
1551
|
-
const
|
|
1552
|
-
if (
|
|
1553
|
-
} else this.cleanup =
|
|
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
|
|
1553
|
+
const I = new Uint8Array(A), g = this.outgoing;
|
|
1568
1554
|
let C = 0;
|
|
1569
|
-
for (; C <
|
|
1555
|
+
for (; C < I.length; ) {
|
|
1570
1556
|
this.assertOpen();
|
|
1571
|
-
const B = Atomics.load(
|
|
1557
|
+
const B = Atomics.load(g.length, 0);
|
|
1572
1558
|
if (B !== 0) {
|
|
1573
|
-
await Atomics.waitAsync(
|
|
1559
|
+
await Atomics.waitAsync(g.length, 0, B).value;
|
|
1574
1560
|
continue;
|
|
1575
1561
|
}
|
|
1576
|
-
const
|
|
1577
|
-
|
|
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
|
|
1587
|
-
if (
|
|
1588
|
-
const
|
|
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(
|
|
1578
|
+
Promise.resolve(C(g)).catch((B) => this.fail(B));
|
|
1593
1579
|
}
|
|
1594
|
-
} catch (
|
|
1595
|
-
this.fail(
|
|
1580
|
+
} catch (I) {
|
|
1581
|
+
this.fail(I);
|
|
1596
1582
|
}
|
|
1597
1583
|
};
|
|
1598
1584
|
fail(A) {
|
|
1599
|
-
this.abort.signal.aborted || (this.close(), this.onFailure(
|
|
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,
|
|
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
|
-
|
|
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
|
-
],
|
|
2288
|
+
], CA = Object.freeze({
|
|
1611
2289
|
compiler: "d6b8d6e4596136fc6ae451fe3b81b1be5a1829505cbc993179247c75a764ce87",
|
|
1612
2290
|
sysroot: "8745c6af23fd841fa507d0c73f6b6b8e8da1b4ec216a6339739a28b38ff7227b",
|
|
1613
2291
|
exceptions: "20986166552953de0e3ca5c1e9f341e7aec8b9ba54dcb244d0d2b2f9ca843ab4"
|
|
1614
2292
|
});
|
|
1615
|
-
function
|
|
1616
|
-
if (Q === "legacy") return { profile: Q, digests:
|
|
1617
|
-
if (Q === "stock-certified-v1" &&
|
|
1618
|
-
return { profile: Q, digests:
|
|
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
|
|
2299
|
+
class r {
|
|
1622
2300
|
#A;
|
|
1623
2301
|
hashCount = 3;
|
|
1624
2302
|
hashMs;
|
|
1625
|
-
constructor(A,
|
|
1626
|
-
this.#A = A, this.hashMs =
|
|
2303
|
+
constructor(A, I) {
|
|
2304
|
+
this.#A = A, this.hashMs = I;
|
|
1627
2305
|
}
|
|
1628
|
-
static async load(A,
|
|
1629
|
-
const
|
|
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,
|
|
1632
|
-
const
|
|
1633
|
-
A.map(async (
|
|
2309
|
+
let D, w;
|
|
2310
|
+
const N = await Promise.allSettled(
|
|
2311
|
+
A.map(async (H, j) => {
|
|
1634
2312
|
try {
|
|
1635
|
-
const
|
|
1636
|
-
if (!
|
|
1637
|
-
return
|
|
1638
|
-
})), new Uint8Array(await
|
|
1639
|
-
} catch (
|
|
1640
|
-
throw D ??= { error:
|
|
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 (
|
|
2322
|
+
if (N[0].status === "rejected" || N[1].status === "rejected")
|
|
1645
2323
|
throw D?.error;
|
|
1646
|
-
const [
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
(
|
|
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 (
|
|
1653
|
-
const
|
|
1654
|
-
if (
|
|
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 (
|
|
1657
|
-
if (
|
|
1658
|
-
return
|
|
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,
|
|
1662
|
-
const C = new Uint8Array(A), B = new Uint8Array(
|
|
1663
|
-
return
|
|
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
|
-
|
|
1667
|
-
|
|
2344
|
+
g,
|
|
2345
|
+
CA.exceptions
|
|
1668
2346
|
);
|
|
1669
2347
|
}
|
|
1670
|
-
static async ingestOwned(A,
|
|
1671
|
-
const B = performance.now(),
|
|
1672
|
-
if (
|
|
1673
|
-
if (
|
|
1674
|
-
const [D,
|
|
1675
|
-
return new
|
|
1676
|
-
{ compiler: A, sysroot:
|
|
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,
|
|
2371
|
+
configure(A, I) {
|
|
1694
2372
|
try {
|
|
1695
|
-
return A.postMessage({ ...
|
|
1696
|
-
} catch (
|
|
1697
|
-
if (!(
|
|
1698
|
-
throw
|
|
1699
|
-
return A.postMessage({ ...
|
|
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
|
|
2381
|
+
async function LA(Q) {
|
|
1704
2382
|
const A = await crypto.subtle.digest("SHA-256", Q);
|
|
1705
|
-
return Array.from(new Uint8Array(A), (
|
|
2383
|
+
return Array.from(new Uint8Array(A), (I) => I.toString(16).padStart(2, "0")).join("");
|
|
1706
2384
|
}
|
|
1707
|
-
let
|
|
1708
|
-
class
|
|
1709
|
-
stdout = new
|
|
1710
|
-
stderr = new
|
|
1711
|
-
stdin = new
|
|
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,
|
|
1750
|
-
const { wasmUrl:
|
|
1751
|
-
|
|
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
|
-
|
|
1754
|
-
throw
|
|
1755
|
-
}), await
|
|
1756
|
-
const N = new
|
|
1757
|
-
if (N.wasmUrl =
|
|
1758
|
-
for (const
|
|
1759
|
-
fetch(
|
|
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,
|
|
1764
|
-
const
|
|
1765
|
-
this.retain =
|
|
1766
|
-
const C =
|
|
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,
|
|
2453
|
+
if (this.idleTimeoutMs = C, g) {
|
|
1770
2454
|
if (A !== "c") throw new TypeError("C++ performance options require C/C++");
|
|
1771
|
-
if (!
|
|
2455
|
+
if (!g.scope?.projectId || !g.scope.accountId)
|
|
1772
2456
|
throw new TypeError("C++ performance options require project and account identity");
|
|
1773
|
-
if (
|
|
2457
|
+
if (g.compilerLifetime !== void 0 && !["idle", "project"].includes(g.compilerLifetime))
|
|
1774
2458
|
throw new TypeError("Invalid compiler lifetime");
|
|
1775
|
-
|
|
2459
|
+
HA(g.toolchainProfile), this.scope = Object.freeze({ ...g.scope }), this.options = Object.freeze({ ...g, scope: this.scope, idleTimeoutMs: C });
|
|
1776
2460
|
}
|
|
1777
|
-
|
|
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,
|
|
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
|
|
1822
|
-
this.cancellationDraining ===
|
|
2509
|
+
const g = Promise.allSettled([A, I]).then(() => {
|
|
2510
|
+
this.cancellationDraining === g && (this.cancellationDraining = void 0);
|
|
1823
2511
|
});
|
|
1824
|
-
return this.cancellationDraining =
|
|
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
|
|
1829
|
-
return
|
|
1830
|
-
const C = { resolve:
|
|
1831
|
-
this.releases.add(C),
|
|
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,
|
|
1835
|
-
this.releases.delete(A) && (A.signal?.removeEventListener("abort", A.abort), A.resolve(
|
|
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(
|
|
1864
|
-
const
|
|
1865
|
-
return this.submit(!0, !0,
|
|
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,
|
|
1876
|
-
if (this.disposed) return Promise.resolve(
|
|
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(
|
|
2585
|
+
return Promise.resolve(c(new Error("An engine job is already active")));
|
|
1879
2586
|
if (A && this.lang !== "c")
|
|
1880
|
-
return Promise.resolve(
|
|
2587
|
+
return Promise.resolve(c(new Error("Compile-only is supported for C/C++")));
|
|
1881
2588
|
this.cacheValidation = void 0;
|
|
1882
|
-
const
|
|
1883
|
-
let
|
|
2589
|
+
const B = I && !g;
|
|
2590
|
+
let E;
|
|
1884
2591
|
try {
|
|
1885
|
-
const
|
|
1886
|
-
if (
|
|
1887
|
-
const
|
|
1888
|
-
(typeof
|
|
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
|
-
|
|
1891
|
-
fs:
|
|
2597
|
+
E = {
|
|
2598
|
+
fs: B ? {} : structuredClone(this.fs),
|
|
1892
2599
|
binary_files: Object.fromEntries(
|
|
1893
|
-
Object.entries(
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
])
|
|
2600
|
+
Object.entries(B ? {} : { ...C, ...this.binaryFiles }).map(
|
|
2601
|
+
([R, H]) => [R, new Uint8Array(H)]
|
|
2602
|
+
)
|
|
1897
2603
|
),
|
|
1898
|
-
cpp_artifacts: structuredClone(
|
|
2604
|
+
cpp_artifacts: structuredClone(K)
|
|
1899
2605
|
};
|
|
1900
|
-
} catch (
|
|
1901
|
-
return Promise.resolve(
|
|
2606
|
+
} catch (K) {
|
|
2607
|
+
return Promise.resolve(c(K));
|
|
1902
2608
|
}
|
|
1903
|
-
const
|
|
1904
|
-
if (
|
|
1905
|
-
return Promise.resolve(
|
|
1906
|
-
clearTimeout(this.idleTimer), this.stdin[
|
|
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
|
|
1909
|
-
const U = new Promise((
|
|
1910
|
-
|
|
2614
|
+
let k;
|
|
2615
|
+
const U = new Promise((K) => {
|
|
2616
|
+
k = K;
|
|
1911
2617
|
});
|
|
1912
2618
|
this.promise = U;
|
|
1913
|
-
const
|
|
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:
|
|
1919
|
-
validateCacheInputs:
|
|
2624
|
+
prepareOnly: I,
|
|
2625
|
+
validateCacheInputs: g,
|
|
1920
2626
|
settled: !1,
|
|
1921
2627
|
buildOnly: A,
|
|
1922
|
-
debug:
|
|
1923
|
-
opener:
|
|
2628
|
+
debug: D,
|
|
2629
|
+
opener: w,
|
|
1924
2630
|
startedAt: performance.now(),
|
|
1925
|
-
resolve:
|
|
2631
|
+
resolve: k,
|
|
1926
2632
|
stats: {
|
|
1927
|
-
operation:
|
|
2633
|
+
operation: I ? "prepare_compiler" : A ? "compile" : "run",
|
|
1928
2634
|
workerReadyMs: 0,
|
|
1929
2635
|
workerReused: N
|
|
1930
2636
|
},
|
|
1931
2637
|
start: {
|
|
1932
|
-
...
|
|
2638
|
+
...E,
|
|
1933
2639
|
lang: this.lang,
|
|
1934
|
-
prepare_compiler:
|
|
1935
|
-
validate_cache_inputs:
|
|
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:
|
|
2645
|
+
is_debug: D,
|
|
1940
2646
|
build_only: A,
|
|
1941
|
-
stdin_buffer: this.stdin[
|
|
1942
|
-
cpp_cache: this.options?.objectCache && !
|
|
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 =
|
|
2659
|
+
this.objects.beginBatch(), this.active = h;
|
|
1954
2660
|
try {
|
|
1955
|
-
if (this.slot || this.makeWorker(), !this.current(
|
|
1956
|
-
const
|
|
1957
|
-
this.lang === "c" && !this.toolchain && this.ensureToolchain().catch((
|
|
1958
|
-
this.current(
|
|
1959
|
-
}), this.slot.ready && this.dispatch(
|
|
1960
|
-
} catch (
|
|
1961
|
-
this.finish(
|
|
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 =
|
|
2675
|
+
const A = CI(this.wasmUrl), I = { worker: A, ready: !1, remove: () => {
|
|
1970
2676
|
} };
|
|
1971
|
-
this.slot =
|
|
1972
|
-
const
|
|
1973
|
-
if (this.slot !==
|
|
1974
|
-
const D =
|
|
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 (
|
|
1977
|
-
|
|
2682
|
+
if (I.ready) return;
|
|
2683
|
+
I.ready = !0, w && this.current(w) && this.dispatch(w);
|
|
1978
2684
|
return;
|
|
1979
2685
|
}
|
|
1980
|
-
if (!(!
|
|
1981
|
-
if (!
|
|
1982
|
-
this.finish(
|
|
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 !==
|
|
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" ||
|
|
2694
|
+
if (this.options?.toolchainProfile !== "stock-certified-v1" || w.prepareOnly && !w.validateCacheInputs)
|
|
1989
2695
|
return;
|
|
1990
|
-
const
|
|
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:
|
|
1993
|
-
certificate:
|
|
1994
|
-
snapshot:
|
|
1995
|
-
operationId:
|
|
1996
|
-
reason:
|
|
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(
|
|
2705
|
+
this.finish(w, {
|
|
2000
2706
|
type: "completed",
|
|
2001
2707
|
exitCode: D.exit_code,
|
|
2002
2708
|
timing: {
|
|
2003
|
-
totalMs: performance.now() -
|
|
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(
|
|
2010
|
-
else if (D.type === "cpp_cache_object" && D.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 ===
|
|
2017
|
-
} catch (
|
|
2018
|
-
this.finish(
|
|
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 = (
|
|
2022
|
-
this.slot ===
|
|
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[
|
|
2025
|
-
A.removeEventListener("message",
|
|
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,
|
|
2029
|
-
let
|
|
2734
|
+
async publishObjects(A, I) {
|
|
2735
|
+
let g = !1;
|
|
2030
2736
|
try {
|
|
2031
|
-
|
|
2737
|
+
g = await this.objects.validateBatch();
|
|
2032
2738
|
} catch {
|
|
2033
2739
|
}
|
|
2034
|
-
if (!(!this.current(A) || this.slot !==
|
|
2740
|
+
if (!(!this.current(A) || this.slot !== I)) {
|
|
2035
2741
|
try {
|
|
2036
|
-
|
|
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) &&
|
|
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 =
|
|
2063
|
-
|
|
2768
|
+
const A = r.load(
|
|
2769
|
+
GA("c"),
|
|
2064
2770
|
this.cacheCompilerModule,
|
|
2065
2771
|
this.toolchainController.signal,
|
|
2066
|
-
|
|
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
|
|
2078
|
-
if (!(!this.current(A) || !
|
|
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,
|
|
2082
|
-
if (!this.current(A) || this.slot !==
|
|
2083
|
-
const
|
|
2084
|
-
if (
|
|
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
|
-
|
|
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
|
-
}),
|
|
2803
|
+
}), I.toolchain = w);
|
|
2098
2804
|
}
|
|
2099
|
-
if (!this.current(A) || this.slot !==
|
|
2100
|
-
const
|
|
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[
|
|
2104
|
-
if (A.device = new
|
|
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) && (
|
|
2108
|
-
} catch (
|
|
2109
|
-
this.current(A) && (this.toolchainLoading = void 0, this.finish(A,
|
|
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,
|
|
2818
|
+
finish(A, I) {
|
|
2113
2819
|
if (!this.current(A)) return;
|
|
2114
|
-
(
|
|
2115
|
-
const
|
|
2116
|
-
|
|
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 && (
|
|
2119
|
-
const B =
|
|
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 (
|
|
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[
|
|
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(
|
|
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[
|
|
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
|
|
2840
|
+
class sA extends cA {
|
|
2135
2841
|
constructor(A) {
|
|
2136
|
-
super(), this.mode = A, this.callback = ((
|
|
2137
|
-
const
|
|
2138
|
-
if (this.accepts && !this.accepts(
|
|
2139
|
-
const C =
|
|
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[
|
|
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
|
-
[
|
|
2149
|
-
attach(A,
|
|
2150
|
-
this.accepts =
|
|
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
|
|
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 =
|
|
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(
|
|
2876
|
+
buffer = new SharedArrayBuffer(O.BUFFER_SIZE);
|
|
2171
2877
|
generation = 0;
|
|
2172
2878
|
indices;
|
|
2173
2879
|
data;
|
|
2174
|
-
[
|
|
2880
|
+
[L];
|
|
2175
2881
|
constructor() {
|
|
2176
|
-
this.indices = new Int32Array(this.buffer, 0, 2), this.data = new Int8Array(this.buffer,
|
|
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[
|
|
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,
|
|
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
|
|
2190
|
-
return this.writeBytes(
|
|
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:
|
|
2899
|
+
const { DATA_SIZE: I, READ_IDX: g, WRITE_IDX: C } = O;
|
|
2194
2900
|
let B = 0;
|
|
2195
|
-
const
|
|
2196
|
-
for (; B < A.length &&
|
|
2197
|
-
const D = Atomics.load(this.indices,
|
|
2198
|
-
let
|
|
2199
|
-
|
|
2200
|
-
const
|
|
2201
|
-
if (
|
|
2202
|
-
await Atomics.waitAsync(this.indices,
|
|
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
|
|
2206
|
-
this.data.set(A.subarray(B, B +
|
|
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
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
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
|
};
|