libchai 0.1.1 → 0.1.2
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/libchai.d.ts +35 -0
- package/libchai.js +644 -4
- package/libchai_bg.wasm +0 -0
- package/package.json +1 -3
- package/libchai_bg.js +0 -629
package/libchai.d.ts
CHANGED
|
@@ -15,3 +15,38 @@ export function optimize(js_input: any, post_message: Function): void;
|
|
|
15
15
|
export class WebInterface {
|
|
16
16
|
free(): void;
|
|
17
17
|
}
|
|
18
|
+
|
|
19
|
+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
20
|
+
|
|
21
|
+
export interface InitOutput {
|
|
22
|
+
readonly memory: WebAssembly.Memory;
|
|
23
|
+
readonly __wbg_webinterface_free: (a: number) => void;
|
|
24
|
+
readonly evaluate: (a: number, b: number) => void;
|
|
25
|
+
readonly optimize: (a: number, b: number) => void;
|
|
26
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
27
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
28
|
+
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
29
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
30
|
+
readonly __wbindgen_exn_store: (a: number) => void;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
34
|
+
/**
|
|
35
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
36
|
+
* a precompiled `WebAssembly.Module`.
|
|
37
|
+
*
|
|
38
|
+
* @param {SyncInitInput} module
|
|
39
|
+
*
|
|
40
|
+
* @returns {InitOutput}
|
|
41
|
+
*/
|
|
42
|
+
export function initSync(module: SyncInitInput): InitOutput;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
46
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
47
|
+
*
|
|
48
|
+
* @param {InitInput | Promise<InitInput>} module_or_path
|
|
49
|
+
*
|
|
50
|
+
* @returns {Promise<InitOutput>}
|
|
51
|
+
*/
|
|
52
|
+
export default function __wbg_init (module_or_path?: InitInput | Promise<InitInput>): Promise<InitOutput>;
|
package/libchai.js
CHANGED
|
@@ -1,4 +1,644 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
let wasm;
|
|
2
|
+
|
|
3
|
+
const heap = new Array(128).fill(undefined);
|
|
4
|
+
|
|
5
|
+
heap.push(undefined, null, true, false);
|
|
6
|
+
|
|
7
|
+
function getObject(idx) { return heap[idx]; }
|
|
8
|
+
|
|
9
|
+
let heap_next = heap.length;
|
|
10
|
+
|
|
11
|
+
function addHeapObject(obj) {
|
|
12
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
13
|
+
const idx = heap_next;
|
|
14
|
+
heap_next = heap[idx];
|
|
15
|
+
|
|
16
|
+
heap[idx] = obj;
|
|
17
|
+
return idx;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function dropObject(idx) {
|
|
21
|
+
if (idx < 132) return;
|
|
22
|
+
heap[idx] = heap_next;
|
|
23
|
+
heap_next = idx;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function takeObject(idx) {
|
|
27
|
+
const ret = getObject(idx);
|
|
28
|
+
dropObject(idx);
|
|
29
|
+
return ret;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function isLikeNone(x) {
|
|
33
|
+
return x === undefined || x === null;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
let cachedFloat64Memory0 = null;
|
|
37
|
+
|
|
38
|
+
function getFloat64Memory0() {
|
|
39
|
+
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
40
|
+
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
41
|
+
}
|
|
42
|
+
return cachedFloat64Memory0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
let cachedInt32Memory0 = null;
|
|
46
|
+
|
|
47
|
+
function getInt32Memory0() {
|
|
48
|
+
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
49
|
+
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
50
|
+
}
|
|
51
|
+
return cachedInt32Memory0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
let WASM_VECTOR_LEN = 0;
|
|
55
|
+
|
|
56
|
+
let cachedUint8Memory0 = null;
|
|
57
|
+
|
|
58
|
+
function getUint8Memory0() {
|
|
59
|
+
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
60
|
+
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
61
|
+
}
|
|
62
|
+
return cachedUint8Memory0;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
|
|
66
|
+
|
|
67
|
+
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
68
|
+
? function (arg, view) {
|
|
69
|
+
return cachedTextEncoder.encodeInto(arg, view);
|
|
70
|
+
}
|
|
71
|
+
: function (arg, view) {
|
|
72
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
73
|
+
view.set(buf);
|
|
74
|
+
return {
|
|
75
|
+
read: arg.length,
|
|
76
|
+
written: buf.length
|
|
77
|
+
};
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
81
|
+
|
|
82
|
+
if (realloc === undefined) {
|
|
83
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
84
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
85
|
+
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
86
|
+
WASM_VECTOR_LEN = buf.length;
|
|
87
|
+
return ptr;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
let len = arg.length;
|
|
91
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
92
|
+
|
|
93
|
+
const mem = getUint8Memory0();
|
|
94
|
+
|
|
95
|
+
let offset = 0;
|
|
96
|
+
|
|
97
|
+
for (; offset < len; offset++) {
|
|
98
|
+
const code = arg.charCodeAt(offset);
|
|
99
|
+
if (code > 0x7F) break;
|
|
100
|
+
mem[ptr + offset] = code;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (offset !== len) {
|
|
104
|
+
if (offset !== 0) {
|
|
105
|
+
arg = arg.slice(offset);
|
|
106
|
+
}
|
|
107
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
108
|
+
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
|
|
109
|
+
const ret = encodeString(arg, view);
|
|
110
|
+
|
|
111
|
+
offset += ret.written;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
WASM_VECTOR_LEN = offset;
|
|
115
|
+
return ptr;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
119
|
+
|
|
120
|
+
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
121
|
+
|
|
122
|
+
function getStringFromWasm0(ptr, len) {
|
|
123
|
+
ptr = ptr >>> 0;
|
|
124
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
let cachedBigInt64Memory0 = null;
|
|
128
|
+
|
|
129
|
+
function getBigInt64Memory0() {
|
|
130
|
+
if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.byteLength === 0) {
|
|
131
|
+
cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);
|
|
132
|
+
}
|
|
133
|
+
return cachedBigInt64Memory0;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function debugString(val) {
|
|
137
|
+
// primitive types
|
|
138
|
+
const type = typeof val;
|
|
139
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
140
|
+
return `${val}`;
|
|
141
|
+
}
|
|
142
|
+
if (type == 'string') {
|
|
143
|
+
return `"${val}"`;
|
|
144
|
+
}
|
|
145
|
+
if (type == 'symbol') {
|
|
146
|
+
const description = val.description;
|
|
147
|
+
if (description == null) {
|
|
148
|
+
return 'Symbol';
|
|
149
|
+
} else {
|
|
150
|
+
return `Symbol(${description})`;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
if (type == 'function') {
|
|
154
|
+
const name = val.name;
|
|
155
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
156
|
+
return `Function(${name})`;
|
|
157
|
+
} else {
|
|
158
|
+
return 'Function';
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
// objects
|
|
162
|
+
if (Array.isArray(val)) {
|
|
163
|
+
const length = val.length;
|
|
164
|
+
let debug = '[';
|
|
165
|
+
if (length > 0) {
|
|
166
|
+
debug += debugString(val[0]);
|
|
167
|
+
}
|
|
168
|
+
for(let i = 1; i < length; i++) {
|
|
169
|
+
debug += ', ' + debugString(val[i]);
|
|
170
|
+
}
|
|
171
|
+
debug += ']';
|
|
172
|
+
return debug;
|
|
173
|
+
}
|
|
174
|
+
// Test for built-in
|
|
175
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
176
|
+
let className;
|
|
177
|
+
if (builtInMatches.length > 1) {
|
|
178
|
+
className = builtInMatches[1];
|
|
179
|
+
} else {
|
|
180
|
+
// Failed to match the standard '[object ClassName]'
|
|
181
|
+
return toString.call(val);
|
|
182
|
+
}
|
|
183
|
+
if (className == 'Object') {
|
|
184
|
+
// we're a user defined class or Object
|
|
185
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
186
|
+
// easier than looping through ownProperties of `val`.
|
|
187
|
+
try {
|
|
188
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
189
|
+
} catch (_) {
|
|
190
|
+
return 'Object';
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
// errors
|
|
194
|
+
if (val instanceof Error) {
|
|
195
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
196
|
+
}
|
|
197
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
198
|
+
return className;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* @param {any} js_input
|
|
202
|
+
* @returns {string}
|
|
203
|
+
*/
|
|
204
|
+
export function evaluate(js_input) {
|
|
205
|
+
let deferred1_0;
|
|
206
|
+
let deferred1_1;
|
|
207
|
+
try {
|
|
208
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
209
|
+
wasm.evaluate(retptr, addHeapObject(js_input));
|
|
210
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
211
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
212
|
+
deferred1_0 = r0;
|
|
213
|
+
deferred1_1 = r1;
|
|
214
|
+
return getStringFromWasm0(r0, r1);
|
|
215
|
+
} finally {
|
|
216
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
217
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* @param {any} js_input
|
|
223
|
+
* @param {Function} post_message
|
|
224
|
+
*/
|
|
225
|
+
export function optimize(js_input, post_message) {
|
|
226
|
+
wasm.optimize(addHeapObject(js_input), addHeapObject(post_message));
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
function handleError(f, args) {
|
|
230
|
+
try {
|
|
231
|
+
return f.apply(this, args);
|
|
232
|
+
} catch (e) {
|
|
233
|
+
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
*/
|
|
238
|
+
export class WebInterface {
|
|
239
|
+
|
|
240
|
+
__destroy_into_raw() {
|
|
241
|
+
const ptr = this.__wbg_ptr;
|
|
242
|
+
this.__wbg_ptr = 0;
|
|
243
|
+
|
|
244
|
+
return ptr;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
free() {
|
|
248
|
+
const ptr = this.__destroy_into_raw();
|
|
249
|
+
wasm.__wbg_webinterface_free(ptr);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
async function __wbg_load(module, imports) {
|
|
254
|
+
if (typeof Response === 'function' && module instanceof Response) {
|
|
255
|
+
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
256
|
+
try {
|
|
257
|
+
return await WebAssembly.instantiateStreaming(module, imports);
|
|
258
|
+
|
|
259
|
+
} catch (e) {
|
|
260
|
+
if (module.headers.get('Content-Type') != 'application/wasm') {
|
|
261
|
+
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", e);
|
|
262
|
+
|
|
263
|
+
} else {
|
|
264
|
+
throw e;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
const bytes = await module.arrayBuffer();
|
|
270
|
+
return await WebAssembly.instantiate(bytes, imports);
|
|
271
|
+
|
|
272
|
+
} else {
|
|
273
|
+
const instance = await WebAssembly.instantiate(module, imports);
|
|
274
|
+
|
|
275
|
+
if (instance instanceof WebAssembly.Instance) {
|
|
276
|
+
return { instance, module };
|
|
277
|
+
|
|
278
|
+
} else {
|
|
279
|
+
return instance;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
function __wbg_get_imports() {
|
|
285
|
+
const imports = {};
|
|
286
|
+
imports.wbg = {};
|
|
287
|
+
imports.wbg.__wbindgen_boolean_get = function(arg0) {
|
|
288
|
+
const v = getObject(arg0);
|
|
289
|
+
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
290
|
+
return ret;
|
|
291
|
+
};
|
|
292
|
+
imports.wbg.__wbindgen_is_bigint = function(arg0) {
|
|
293
|
+
const ret = typeof(getObject(arg0)) === 'bigint';
|
|
294
|
+
return ret;
|
|
295
|
+
};
|
|
296
|
+
imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
|
|
297
|
+
const ret = arg0;
|
|
298
|
+
return addHeapObject(ret);
|
|
299
|
+
};
|
|
300
|
+
imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
|
|
301
|
+
const ret = getObject(arg0) === getObject(arg1);
|
|
302
|
+
return ret;
|
|
303
|
+
};
|
|
304
|
+
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
305
|
+
takeObject(arg0);
|
|
306
|
+
};
|
|
307
|
+
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
308
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
309
|
+
return addHeapObject(ret);
|
|
310
|
+
};
|
|
311
|
+
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
312
|
+
const obj = getObject(arg1);
|
|
313
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
314
|
+
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
315
|
+
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
316
|
+
};
|
|
317
|
+
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
318
|
+
const obj = getObject(arg1);
|
|
319
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
320
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
321
|
+
var len1 = WASM_VECTOR_LEN;
|
|
322
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
323
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
324
|
+
};
|
|
325
|
+
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
326
|
+
const val = getObject(arg0);
|
|
327
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
328
|
+
return ret;
|
|
329
|
+
};
|
|
330
|
+
imports.wbg.__wbindgen_in = function(arg0, arg1) {
|
|
331
|
+
const ret = getObject(arg0) in getObject(arg1);
|
|
332
|
+
return ret;
|
|
333
|
+
};
|
|
334
|
+
imports.wbg.__wbindgen_is_string = function(arg0) {
|
|
335
|
+
const ret = typeof(getObject(arg0)) === 'string';
|
|
336
|
+
return ret;
|
|
337
|
+
};
|
|
338
|
+
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
339
|
+
const ret = getObject(arg0) === undefined;
|
|
340
|
+
return ret;
|
|
341
|
+
};
|
|
342
|
+
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
343
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
344
|
+
return addHeapObject(ret);
|
|
345
|
+
};
|
|
346
|
+
imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
|
|
347
|
+
const ret = new Error();
|
|
348
|
+
return addHeapObject(ret);
|
|
349
|
+
};
|
|
350
|
+
imports.wbg.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
|
|
351
|
+
const ret = getObject(arg1).stack;
|
|
352
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
353
|
+
const len1 = WASM_VECTOR_LEN;
|
|
354
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
355
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
356
|
+
};
|
|
357
|
+
imports.wbg.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
|
|
358
|
+
let deferred0_0;
|
|
359
|
+
let deferred0_1;
|
|
360
|
+
try {
|
|
361
|
+
deferred0_0 = arg0;
|
|
362
|
+
deferred0_1 = arg1;
|
|
363
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
364
|
+
} finally {
|
|
365
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
369
|
+
const ret = getObject(arg0);
|
|
370
|
+
return addHeapObject(ret);
|
|
371
|
+
};
|
|
372
|
+
imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
373
|
+
const ret = getObject(arg0) == getObject(arg1);
|
|
374
|
+
return ret;
|
|
375
|
+
};
|
|
376
|
+
imports.wbg.__wbindgen_as_number = function(arg0) {
|
|
377
|
+
const ret = +getObject(arg0);
|
|
378
|
+
return ret;
|
|
379
|
+
};
|
|
380
|
+
imports.wbg.__wbindgen_number_new = function(arg0) {
|
|
381
|
+
const ret = arg0;
|
|
382
|
+
return addHeapObject(ret);
|
|
383
|
+
};
|
|
384
|
+
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
385
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
386
|
+
return addHeapObject(ret);
|
|
387
|
+
};
|
|
388
|
+
imports.wbg.__wbg_getwithrefkey_4a92a5eca60879b9 = function(arg0, arg1) {
|
|
389
|
+
const ret = getObject(arg0)[getObject(arg1)];
|
|
390
|
+
return addHeapObject(ret);
|
|
391
|
+
};
|
|
392
|
+
imports.wbg.__wbg_set_9182712abebf82ef = function(arg0, arg1, arg2) {
|
|
393
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
394
|
+
};
|
|
395
|
+
imports.wbg.__wbg_performance_bdf4f1a290fc5c5c = function(arg0) {
|
|
396
|
+
const ret = getObject(arg0).performance;
|
|
397
|
+
return addHeapObject(ret);
|
|
398
|
+
};
|
|
399
|
+
imports.wbg.__wbg_now_d87295c25be68e8b = function(arg0) {
|
|
400
|
+
const ret = getObject(arg0).now();
|
|
401
|
+
return ret;
|
|
402
|
+
};
|
|
403
|
+
imports.wbg.__wbg_crypto_58f13aa23ffcb166 = function(arg0) {
|
|
404
|
+
const ret = getObject(arg0).crypto;
|
|
405
|
+
return addHeapObject(ret);
|
|
406
|
+
};
|
|
407
|
+
imports.wbg.__wbg_process_5b786e71d465a513 = function(arg0) {
|
|
408
|
+
const ret = getObject(arg0).process;
|
|
409
|
+
return addHeapObject(ret);
|
|
410
|
+
};
|
|
411
|
+
imports.wbg.__wbg_versions_c2ab80650590b6a2 = function(arg0) {
|
|
412
|
+
const ret = getObject(arg0).versions;
|
|
413
|
+
return addHeapObject(ret);
|
|
414
|
+
};
|
|
415
|
+
imports.wbg.__wbg_node_523d7bd03ef69fba = function(arg0) {
|
|
416
|
+
const ret = getObject(arg0).node;
|
|
417
|
+
return addHeapObject(ret);
|
|
418
|
+
};
|
|
419
|
+
imports.wbg.__wbg_msCrypto_abcb1295e768d1f2 = function(arg0) {
|
|
420
|
+
const ret = getObject(arg0).msCrypto;
|
|
421
|
+
return addHeapObject(ret);
|
|
422
|
+
};
|
|
423
|
+
imports.wbg.__wbg_require_2784e593a4674877 = function() { return handleError(function () {
|
|
424
|
+
const ret = module.require;
|
|
425
|
+
return addHeapObject(ret);
|
|
426
|
+
}, arguments) };
|
|
427
|
+
imports.wbg.__wbindgen_is_function = function(arg0) {
|
|
428
|
+
const ret = typeof(getObject(arg0)) === 'function';
|
|
429
|
+
return ret;
|
|
430
|
+
};
|
|
431
|
+
imports.wbg.__wbg_randomFillSync_a0d98aa11c81fe89 = function() { return handleError(function (arg0, arg1) {
|
|
432
|
+
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
433
|
+
}, arguments) };
|
|
434
|
+
imports.wbg.__wbg_getRandomValues_504510b5564925af = function() { return handleError(function (arg0, arg1) {
|
|
435
|
+
getObject(arg0).getRandomValues(getObject(arg1));
|
|
436
|
+
}, arguments) };
|
|
437
|
+
imports.wbg.__wbg_get_f01601b5a68d10e3 = function(arg0, arg1) {
|
|
438
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
439
|
+
return addHeapObject(ret);
|
|
440
|
+
};
|
|
441
|
+
imports.wbg.__wbg_length_1009b1af0c481d7b = function(arg0) {
|
|
442
|
+
const ret = getObject(arg0).length;
|
|
443
|
+
return ret;
|
|
444
|
+
};
|
|
445
|
+
imports.wbg.__wbg_newnoargs_c62ea9419c21fbac = function(arg0, arg1) {
|
|
446
|
+
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
447
|
+
return addHeapObject(ret);
|
|
448
|
+
};
|
|
449
|
+
imports.wbg.__wbg_next_9b877f231f476d01 = function(arg0) {
|
|
450
|
+
const ret = getObject(arg0).next;
|
|
451
|
+
return addHeapObject(ret);
|
|
452
|
+
};
|
|
453
|
+
imports.wbg.__wbg_next_6529ee0cca8d57ed = function() { return handleError(function (arg0) {
|
|
454
|
+
const ret = getObject(arg0).next();
|
|
455
|
+
return addHeapObject(ret);
|
|
456
|
+
}, arguments) };
|
|
457
|
+
imports.wbg.__wbg_done_5fe336b092d60cf2 = function(arg0) {
|
|
458
|
+
const ret = getObject(arg0).done;
|
|
459
|
+
return ret;
|
|
460
|
+
};
|
|
461
|
+
imports.wbg.__wbg_value_0c248a78fdc8e19f = function(arg0) {
|
|
462
|
+
const ret = getObject(arg0).value;
|
|
463
|
+
return addHeapObject(ret);
|
|
464
|
+
};
|
|
465
|
+
imports.wbg.__wbg_iterator_db7ca081358d4fb2 = function() {
|
|
466
|
+
const ret = Symbol.iterator;
|
|
467
|
+
return addHeapObject(ret);
|
|
468
|
+
};
|
|
469
|
+
imports.wbg.__wbg_get_7b48513de5dc5ea4 = function() { return handleError(function (arg0, arg1) {
|
|
470
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
471
|
+
return addHeapObject(ret);
|
|
472
|
+
}, arguments) };
|
|
473
|
+
imports.wbg.__wbg_call_90c26b09837aba1c = function() { return handleError(function (arg0, arg1) {
|
|
474
|
+
const ret = getObject(arg0).call(getObject(arg1));
|
|
475
|
+
return addHeapObject(ret);
|
|
476
|
+
}, arguments) };
|
|
477
|
+
imports.wbg.__wbg_new_9fb8d994e1c0aaac = function() {
|
|
478
|
+
const ret = new Object();
|
|
479
|
+
return addHeapObject(ret);
|
|
480
|
+
};
|
|
481
|
+
imports.wbg.__wbg_length_36658cb09b6ec34a = function(arg0) {
|
|
482
|
+
const ret = getObject(arg0).length;
|
|
483
|
+
return ret;
|
|
484
|
+
};
|
|
485
|
+
imports.wbg.__wbg_codePointAt_8ce1187388f5c427 = function(arg0, arg1) {
|
|
486
|
+
const ret = getObject(arg0).codePointAt(arg1 >>> 0);
|
|
487
|
+
return addHeapObject(ret);
|
|
488
|
+
};
|
|
489
|
+
imports.wbg.__wbg_self_f0e34d89f33b99fd = function() { return handleError(function () {
|
|
490
|
+
const ret = self.self;
|
|
491
|
+
return addHeapObject(ret);
|
|
492
|
+
}, arguments) };
|
|
493
|
+
imports.wbg.__wbg_window_d3b084224f4774d7 = function() { return handleError(function () {
|
|
494
|
+
const ret = window.window;
|
|
495
|
+
return addHeapObject(ret);
|
|
496
|
+
}, arguments) };
|
|
497
|
+
imports.wbg.__wbg_globalThis_9caa27ff917c6860 = function() { return handleError(function () {
|
|
498
|
+
const ret = globalThis.globalThis;
|
|
499
|
+
return addHeapObject(ret);
|
|
500
|
+
}, arguments) };
|
|
501
|
+
imports.wbg.__wbg_global_35dfdd59a4da3e74 = function() { return handleError(function () {
|
|
502
|
+
const ret = global.global;
|
|
503
|
+
return addHeapObject(ret);
|
|
504
|
+
}, arguments) };
|
|
505
|
+
imports.wbg.__wbg_isArray_74fb723e24f76012 = function(arg0) {
|
|
506
|
+
const ret = Array.isArray(getObject(arg0));
|
|
507
|
+
return ret;
|
|
508
|
+
};
|
|
509
|
+
imports.wbg.__wbg_instanceof_ArrayBuffer_e7d53d51371448e2 = function(arg0) {
|
|
510
|
+
let result;
|
|
511
|
+
try {
|
|
512
|
+
result = getObject(arg0) instanceof ArrayBuffer;
|
|
513
|
+
} catch (_) {
|
|
514
|
+
result = false;
|
|
515
|
+
}
|
|
516
|
+
const ret = result;
|
|
517
|
+
return ret;
|
|
518
|
+
};
|
|
519
|
+
imports.wbg.__wbg_call_5da1969d7cd31ccd = function() { return handleError(function (arg0, arg1, arg2) {
|
|
520
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
521
|
+
return addHeapObject(ret);
|
|
522
|
+
}, arguments) };
|
|
523
|
+
imports.wbg.__wbg_isSafeInteger_f93fde0dca9820f8 = function(arg0) {
|
|
524
|
+
const ret = Number.isSafeInteger(getObject(arg0));
|
|
525
|
+
return ret;
|
|
526
|
+
};
|
|
527
|
+
imports.wbg.__wbg_entries_9e2e2aa45aa5094a = function(arg0) {
|
|
528
|
+
const ret = Object.entries(getObject(arg0));
|
|
529
|
+
return addHeapObject(ret);
|
|
530
|
+
};
|
|
531
|
+
imports.wbg.__wbg_buffer_a448f833075b71ba = function(arg0) {
|
|
532
|
+
const ret = getObject(arg0).buffer;
|
|
533
|
+
return addHeapObject(ret);
|
|
534
|
+
};
|
|
535
|
+
imports.wbg.__wbg_newwithbyteoffsetandlength_d0482f893617af71 = function(arg0, arg1, arg2) {
|
|
536
|
+
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
|
537
|
+
return addHeapObject(ret);
|
|
538
|
+
};
|
|
539
|
+
imports.wbg.__wbg_new_8f67e318f15d7254 = function(arg0) {
|
|
540
|
+
const ret = new Uint8Array(getObject(arg0));
|
|
541
|
+
return addHeapObject(ret);
|
|
542
|
+
};
|
|
543
|
+
imports.wbg.__wbg_set_2357bf09366ee480 = function(arg0, arg1, arg2) {
|
|
544
|
+
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
545
|
+
};
|
|
546
|
+
imports.wbg.__wbg_length_1d25fa9e4ac21ce7 = function(arg0) {
|
|
547
|
+
const ret = getObject(arg0).length;
|
|
548
|
+
return ret;
|
|
549
|
+
};
|
|
550
|
+
imports.wbg.__wbg_instanceof_Uint8Array_bced6f43aed8c1aa = function(arg0) {
|
|
551
|
+
let result;
|
|
552
|
+
try {
|
|
553
|
+
result = getObject(arg0) instanceof Uint8Array;
|
|
554
|
+
} catch (_) {
|
|
555
|
+
result = false;
|
|
556
|
+
}
|
|
557
|
+
const ret = result;
|
|
558
|
+
return ret;
|
|
559
|
+
};
|
|
560
|
+
imports.wbg.__wbg_newwithlength_6c2df9e2f3028c43 = function(arg0) {
|
|
561
|
+
const ret = new Uint8Array(arg0 >>> 0);
|
|
562
|
+
return addHeapObject(ret);
|
|
563
|
+
};
|
|
564
|
+
imports.wbg.__wbg_subarray_2e940e41c0f5a1d9 = function(arg0, arg1, arg2) {
|
|
565
|
+
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
566
|
+
return addHeapObject(ret);
|
|
567
|
+
};
|
|
568
|
+
imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
|
|
569
|
+
const v = getObject(arg1);
|
|
570
|
+
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
571
|
+
getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? BigInt(0) : ret;
|
|
572
|
+
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
573
|
+
};
|
|
574
|
+
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
575
|
+
const ret = debugString(getObject(arg1));
|
|
576
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
577
|
+
const len1 = WASM_VECTOR_LEN;
|
|
578
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
579
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
580
|
+
};
|
|
581
|
+
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
582
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
583
|
+
};
|
|
584
|
+
imports.wbg.__wbindgen_memory = function() {
|
|
585
|
+
const ret = wasm.memory;
|
|
586
|
+
return addHeapObject(ret);
|
|
587
|
+
};
|
|
588
|
+
|
|
589
|
+
return imports;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
function __wbg_init_memory(imports, maybe_memory) {
|
|
593
|
+
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
function __wbg_finalize_init(instance, module) {
|
|
597
|
+
wasm = instance.exports;
|
|
598
|
+
__wbg_init.__wbindgen_wasm_module = module;
|
|
599
|
+
cachedBigInt64Memory0 = null;
|
|
600
|
+
cachedFloat64Memory0 = null;
|
|
601
|
+
cachedInt32Memory0 = null;
|
|
602
|
+
cachedUint8Memory0 = null;
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
return wasm;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
function initSync(module) {
|
|
609
|
+
if (wasm !== undefined) return wasm;
|
|
610
|
+
|
|
611
|
+
const imports = __wbg_get_imports();
|
|
612
|
+
|
|
613
|
+
__wbg_init_memory(imports);
|
|
614
|
+
|
|
615
|
+
if (!(module instanceof WebAssembly.Module)) {
|
|
616
|
+
module = new WebAssembly.Module(module);
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
const instance = new WebAssembly.Instance(module, imports);
|
|
620
|
+
|
|
621
|
+
return __wbg_finalize_init(instance, module);
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
async function __wbg_init(input) {
|
|
625
|
+
if (wasm !== undefined) return wasm;
|
|
626
|
+
|
|
627
|
+
if (typeof input === 'undefined') {
|
|
628
|
+
input = new URL('libchai_bg.wasm', import.meta.url);
|
|
629
|
+
}
|
|
630
|
+
const imports = __wbg_get_imports();
|
|
631
|
+
|
|
632
|
+
if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {
|
|
633
|
+
input = fetch(input);
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
__wbg_init_memory(imports);
|
|
637
|
+
|
|
638
|
+
const { instance, module } = await __wbg_load(await input, imports);
|
|
639
|
+
|
|
640
|
+
return __wbg_finalize_init(instance, module);
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
export { initSync }
|
|
644
|
+
export default __wbg_init;
|
package/libchai_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -3,17 +3,15 @@
|
|
|
3
3
|
"collaborators": [
|
|
4
4
|
"Songchen Tan <i@tansongchen.com>"
|
|
5
5
|
],
|
|
6
|
-
"version": "0.1.
|
|
6
|
+
"version": "0.1.2",
|
|
7
7
|
"files": [
|
|
8
8
|
"libchai_bg.wasm",
|
|
9
9
|
"libchai.js",
|
|
10
|
-
"libchai_bg.js",
|
|
11
10
|
"libchai.d.ts"
|
|
12
11
|
],
|
|
13
12
|
"module": "libchai.js",
|
|
14
13
|
"types": "libchai.d.ts",
|
|
15
14
|
"sideEffects": [
|
|
16
|
-
"./libchai.js",
|
|
17
15
|
"./snippets/*"
|
|
18
16
|
]
|
|
19
17
|
}
|
package/libchai_bg.js
DELETED
|
@@ -1,629 +0,0 @@
|
|
|
1
|
-
let wasm;
|
|
2
|
-
export function __wbg_set_wasm(val) {
|
|
3
|
-
wasm = val;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const heap = new Array(128).fill(undefined);
|
|
8
|
-
|
|
9
|
-
heap.push(undefined, null, true, false);
|
|
10
|
-
|
|
11
|
-
function getObject(idx) { return heap[idx]; }
|
|
12
|
-
|
|
13
|
-
let heap_next = heap.length;
|
|
14
|
-
|
|
15
|
-
function addHeapObject(obj) {
|
|
16
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
17
|
-
const idx = heap_next;
|
|
18
|
-
heap_next = heap[idx];
|
|
19
|
-
|
|
20
|
-
heap[idx] = obj;
|
|
21
|
-
return idx;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function dropObject(idx) {
|
|
25
|
-
if (idx < 132) return;
|
|
26
|
-
heap[idx] = heap_next;
|
|
27
|
-
heap_next = idx;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function takeObject(idx) {
|
|
31
|
-
const ret = getObject(idx);
|
|
32
|
-
dropObject(idx);
|
|
33
|
-
return ret;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function isLikeNone(x) {
|
|
37
|
-
return x === undefined || x === null;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
let cachedFloat64Memory0 = null;
|
|
41
|
-
|
|
42
|
-
function getFloat64Memory0() {
|
|
43
|
-
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
44
|
-
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
45
|
-
}
|
|
46
|
-
return cachedFloat64Memory0;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
let cachedInt32Memory0 = null;
|
|
50
|
-
|
|
51
|
-
function getInt32Memory0() {
|
|
52
|
-
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
53
|
-
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
54
|
-
}
|
|
55
|
-
return cachedInt32Memory0;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
let WASM_VECTOR_LEN = 0;
|
|
59
|
-
|
|
60
|
-
let cachedUint8Memory0 = null;
|
|
61
|
-
|
|
62
|
-
function getUint8Memory0() {
|
|
63
|
-
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
64
|
-
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
65
|
-
}
|
|
66
|
-
return cachedUint8Memory0;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
|
|
70
|
-
|
|
71
|
-
let cachedTextEncoder = new lTextEncoder('utf-8');
|
|
72
|
-
|
|
73
|
-
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
74
|
-
? function (arg, view) {
|
|
75
|
-
return cachedTextEncoder.encodeInto(arg, view);
|
|
76
|
-
}
|
|
77
|
-
: function (arg, view) {
|
|
78
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
79
|
-
view.set(buf);
|
|
80
|
-
return {
|
|
81
|
-
read: arg.length,
|
|
82
|
-
written: buf.length
|
|
83
|
-
};
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
87
|
-
|
|
88
|
-
if (realloc === undefined) {
|
|
89
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
90
|
-
const ptr = malloc(buf.length, 1) >>> 0;
|
|
91
|
-
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
92
|
-
WASM_VECTOR_LEN = buf.length;
|
|
93
|
-
return ptr;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
let len = arg.length;
|
|
97
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
98
|
-
|
|
99
|
-
const mem = getUint8Memory0();
|
|
100
|
-
|
|
101
|
-
let offset = 0;
|
|
102
|
-
|
|
103
|
-
for (; offset < len; offset++) {
|
|
104
|
-
const code = arg.charCodeAt(offset);
|
|
105
|
-
if (code > 0x7F) break;
|
|
106
|
-
mem[ptr + offset] = code;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
if (offset !== len) {
|
|
110
|
-
if (offset !== 0) {
|
|
111
|
-
arg = arg.slice(offset);
|
|
112
|
-
}
|
|
113
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
114
|
-
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
|
|
115
|
-
const ret = encodeString(arg, view);
|
|
116
|
-
|
|
117
|
-
offset += ret.written;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
WASM_VECTOR_LEN = offset;
|
|
121
|
-
return ptr;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
|
|
125
|
-
|
|
126
|
-
let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
127
|
-
|
|
128
|
-
cachedTextDecoder.decode();
|
|
129
|
-
|
|
130
|
-
function getStringFromWasm0(ptr, len) {
|
|
131
|
-
ptr = ptr >>> 0;
|
|
132
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
let cachedBigInt64Memory0 = null;
|
|
136
|
-
|
|
137
|
-
function getBigInt64Memory0() {
|
|
138
|
-
if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.byteLength === 0) {
|
|
139
|
-
cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);
|
|
140
|
-
}
|
|
141
|
-
return cachedBigInt64Memory0;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
function debugString(val) {
|
|
145
|
-
// primitive types
|
|
146
|
-
const type = typeof val;
|
|
147
|
-
if (type == 'number' || type == 'boolean' || val == null) {
|
|
148
|
-
return `${val}`;
|
|
149
|
-
}
|
|
150
|
-
if (type == 'string') {
|
|
151
|
-
return `"${val}"`;
|
|
152
|
-
}
|
|
153
|
-
if (type == 'symbol') {
|
|
154
|
-
const description = val.description;
|
|
155
|
-
if (description == null) {
|
|
156
|
-
return 'Symbol';
|
|
157
|
-
} else {
|
|
158
|
-
return `Symbol(${description})`;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
if (type == 'function') {
|
|
162
|
-
const name = val.name;
|
|
163
|
-
if (typeof name == 'string' && name.length > 0) {
|
|
164
|
-
return `Function(${name})`;
|
|
165
|
-
} else {
|
|
166
|
-
return 'Function';
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
// objects
|
|
170
|
-
if (Array.isArray(val)) {
|
|
171
|
-
const length = val.length;
|
|
172
|
-
let debug = '[';
|
|
173
|
-
if (length > 0) {
|
|
174
|
-
debug += debugString(val[0]);
|
|
175
|
-
}
|
|
176
|
-
for(let i = 1; i < length; i++) {
|
|
177
|
-
debug += ', ' + debugString(val[i]);
|
|
178
|
-
}
|
|
179
|
-
debug += ']';
|
|
180
|
-
return debug;
|
|
181
|
-
}
|
|
182
|
-
// Test for built-in
|
|
183
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
184
|
-
let className;
|
|
185
|
-
if (builtInMatches.length > 1) {
|
|
186
|
-
className = builtInMatches[1];
|
|
187
|
-
} else {
|
|
188
|
-
// Failed to match the standard '[object ClassName]'
|
|
189
|
-
return toString.call(val);
|
|
190
|
-
}
|
|
191
|
-
if (className == 'Object') {
|
|
192
|
-
// we're a user defined class or Object
|
|
193
|
-
// JSON.stringify avoids problems with cycles, and is generally much
|
|
194
|
-
// easier than looping through ownProperties of `val`.
|
|
195
|
-
try {
|
|
196
|
-
return 'Object(' + JSON.stringify(val) + ')';
|
|
197
|
-
} catch (_) {
|
|
198
|
-
return 'Object';
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
// errors
|
|
202
|
-
if (val instanceof Error) {
|
|
203
|
-
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
204
|
-
}
|
|
205
|
-
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
206
|
-
return className;
|
|
207
|
-
}
|
|
208
|
-
/**
|
|
209
|
-
* @param {any} js_input
|
|
210
|
-
* @returns {string}
|
|
211
|
-
*/
|
|
212
|
-
export function evaluate(js_input) {
|
|
213
|
-
let deferred1_0;
|
|
214
|
-
let deferred1_1;
|
|
215
|
-
try {
|
|
216
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
217
|
-
wasm.evaluate(retptr, addHeapObject(js_input));
|
|
218
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
219
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
220
|
-
deferred1_0 = r0;
|
|
221
|
-
deferred1_1 = r1;
|
|
222
|
-
return getStringFromWasm0(r0, r1);
|
|
223
|
-
} finally {
|
|
224
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
225
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* @param {any} js_input
|
|
231
|
-
* @param {Function} post_message
|
|
232
|
-
*/
|
|
233
|
-
export function optimize(js_input, post_message) {
|
|
234
|
-
wasm.optimize(addHeapObject(js_input), addHeapObject(post_message));
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
function handleError(f, args) {
|
|
238
|
-
try {
|
|
239
|
-
return f.apply(this, args);
|
|
240
|
-
} catch (e) {
|
|
241
|
-
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
/**
|
|
245
|
-
*/
|
|
246
|
-
export class WebInterface {
|
|
247
|
-
|
|
248
|
-
__destroy_into_raw() {
|
|
249
|
-
const ptr = this.__wbg_ptr;
|
|
250
|
-
this.__wbg_ptr = 0;
|
|
251
|
-
|
|
252
|
-
return ptr;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
free() {
|
|
256
|
-
const ptr = this.__destroy_into_raw();
|
|
257
|
-
wasm.__wbg_webinterface_free(ptr);
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
export function __wbindgen_boolean_get(arg0) {
|
|
262
|
-
const v = getObject(arg0);
|
|
263
|
-
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
264
|
-
return ret;
|
|
265
|
-
};
|
|
266
|
-
|
|
267
|
-
export function __wbindgen_is_bigint(arg0) {
|
|
268
|
-
const ret = typeof(getObject(arg0)) === 'bigint';
|
|
269
|
-
return ret;
|
|
270
|
-
};
|
|
271
|
-
|
|
272
|
-
export function __wbindgen_bigint_from_i64(arg0) {
|
|
273
|
-
const ret = arg0;
|
|
274
|
-
return addHeapObject(ret);
|
|
275
|
-
};
|
|
276
|
-
|
|
277
|
-
export function __wbindgen_jsval_eq(arg0, arg1) {
|
|
278
|
-
const ret = getObject(arg0) === getObject(arg1);
|
|
279
|
-
return ret;
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
export function __wbindgen_object_drop_ref(arg0) {
|
|
283
|
-
takeObject(arg0);
|
|
284
|
-
};
|
|
285
|
-
|
|
286
|
-
export function __wbindgen_bigint_from_u64(arg0) {
|
|
287
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
288
|
-
return addHeapObject(ret);
|
|
289
|
-
};
|
|
290
|
-
|
|
291
|
-
export function __wbindgen_number_get(arg0, arg1) {
|
|
292
|
-
const obj = getObject(arg1);
|
|
293
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
294
|
-
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
295
|
-
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
296
|
-
};
|
|
297
|
-
|
|
298
|
-
export function __wbindgen_string_get(arg0, arg1) {
|
|
299
|
-
const obj = getObject(arg1);
|
|
300
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
301
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
302
|
-
var len1 = WASM_VECTOR_LEN;
|
|
303
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
304
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
305
|
-
};
|
|
306
|
-
|
|
307
|
-
export function __wbindgen_is_object(arg0) {
|
|
308
|
-
const val = getObject(arg0);
|
|
309
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
310
|
-
return ret;
|
|
311
|
-
};
|
|
312
|
-
|
|
313
|
-
export function __wbindgen_in(arg0, arg1) {
|
|
314
|
-
const ret = getObject(arg0) in getObject(arg1);
|
|
315
|
-
return ret;
|
|
316
|
-
};
|
|
317
|
-
|
|
318
|
-
export function __wbindgen_is_string(arg0) {
|
|
319
|
-
const ret = typeof(getObject(arg0)) === 'string';
|
|
320
|
-
return ret;
|
|
321
|
-
};
|
|
322
|
-
|
|
323
|
-
export function __wbindgen_is_undefined(arg0) {
|
|
324
|
-
const ret = getObject(arg0) === undefined;
|
|
325
|
-
return ret;
|
|
326
|
-
};
|
|
327
|
-
|
|
328
|
-
export function __wbindgen_error_new(arg0, arg1) {
|
|
329
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
330
|
-
return addHeapObject(ret);
|
|
331
|
-
};
|
|
332
|
-
|
|
333
|
-
export function __wbg_new_abda76e883ba8a5f() {
|
|
334
|
-
const ret = new Error();
|
|
335
|
-
return addHeapObject(ret);
|
|
336
|
-
};
|
|
337
|
-
|
|
338
|
-
export function __wbg_stack_658279fe44541cf6(arg0, arg1) {
|
|
339
|
-
const ret = getObject(arg1).stack;
|
|
340
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
341
|
-
const len1 = WASM_VECTOR_LEN;
|
|
342
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
343
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
344
|
-
};
|
|
345
|
-
|
|
346
|
-
export function __wbg_error_f851667af71bcfc6(arg0, arg1) {
|
|
347
|
-
let deferred0_0;
|
|
348
|
-
let deferred0_1;
|
|
349
|
-
try {
|
|
350
|
-
deferred0_0 = arg0;
|
|
351
|
-
deferred0_1 = arg1;
|
|
352
|
-
console.error(getStringFromWasm0(arg0, arg1));
|
|
353
|
-
} finally {
|
|
354
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
355
|
-
}
|
|
356
|
-
};
|
|
357
|
-
|
|
358
|
-
export function __wbindgen_object_clone_ref(arg0) {
|
|
359
|
-
const ret = getObject(arg0);
|
|
360
|
-
return addHeapObject(ret);
|
|
361
|
-
};
|
|
362
|
-
|
|
363
|
-
export function __wbindgen_jsval_loose_eq(arg0, arg1) {
|
|
364
|
-
const ret = getObject(arg0) == getObject(arg1);
|
|
365
|
-
return ret;
|
|
366
|
-
};
|
|
367
|
-
|
|
368
|
-
export function __wbindgen_as_number(arg0) {
|
|
369
|
-
const ret = +getObject(arg0);
|
|
370
|
-
return ret;
|
|
371
|
-
};
|
|
372
|
-
|
|
373
|
-
export function __wbindgen_number_new(arg0) {
|
|
374
|
-
const ret = arg0;
|
|
375
|
-
return addHeapObject(ret);
|
|
376
|
-
};
|
|
377
|
-
|
|
378
|
-
export function __wbindgen_string_new(arg0, arg1) {
|
|
379
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
380
|
-
return addHeapObject(ret);
|
|
381
|
-
};
|
|
382
|
-
|
|
383
|
-
export function __wbg_getwithrefkey_4a92a5eca60879b9(arg0, arg1) {
|
|
384
|
-
const ret = getObject(arg0)[getObject(arg1)];
|
|
385
|
-
return addHeapObject(ret);
|
|
386
|
-
};
|
|
387
|
-
|
|
388
|
-
export function __wbg_set_9182712abebf82ef(arg0, arg1, arg2) {
|
|
389
|
-
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
390
|
-
};
|
|
391
|
-
|
|
392
|
-
export function __wbg_performance_bdf4f1a290fc5c5c(arg0) {
|
|
393
|
-
const ret = getObject(arg0).performance;
|
|
394
|
-
return addHeapObject(ret);
|
|
395
|
-
};
|
|
396
|
-
|
|
397
|
-
export function __wbg_now_d87295c25be68e8b(arg0) {
|
|
398
|
-
const ret = getObject(arg0).now();
|
|
399
|
-
return ret;
|
|
400
|
-
};
|
|
401
|
-
|
|
402
|
-
export function __wbg_crypto_58f13aa23ffcb166(arg0) {
|
|
403
|
-
const ret = getObject(arg0).crypto;
|
|
404
|
-
return addHeapObject(ret);
|
|
405
|
-
};
|
|
406
|
-
|
|
407
|
-
export function __wbg_process_5b786e71d465a513(arg0) {
|
|
408
|
-
const ret = getObject(arg0).process;
|
|
409
|
-
return addHeapObject(ret);
|
|
410
|
-
};
|
|
411
|
-
|
|
412
|
-
export function __wbg_versions_c2ab80650590b6a2(arg0) {
|
|
413
|
-
const ret = getObject(arg0).versions;
|
|
414
|
-
return addHeapObject(ret);
|
|
415
|
-
};
|
|
416
|
-
|
|
417
|
-
export function __wbg_node_523d7bd03ef69fba(arg0) {
|
|
418
|
-
const ret = getObject(arg0).node;
|
|
419
|
-
return addHeapObject(ret);
|
|
420
|
-
};
|
|
421
|
-
|
|
422
|
-
export function __wbg_msCrypto_abcb1295e768d1f2(arg0) {
|
|
423
|
-
const ret = getObject(arg0).msCrypto;
|
|
424
|
-
return addHeapObject(ret);
|
|
425
|
-
};
|
|
426
|
-
|
|
427
|
-
export function __wbg_require_2784e593a4674877() { return handleError(function () {
|
|
428
|
-
const ret = module.require;
|
|
429
|
-
return addHeapObject(ret);
|
|
430
|
-
}, arguments) };
|
|
431
|
-
|
|
432
|
-
export function __wbindgen_is_function(arg0) {
|
|
433
|
-
const ret = typeof(getObject(arg0)) === 'function';
|
|
434
|
-
return ret;
|
|
435
|
-
};
|
|
436
|
-
|
|
437
|
-
export function __wbg_randomFillSync_a0d98aa11c81fe89() { return handleError(function (arg0, arg1) {
|
|
438
|
-
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
439
|
-
}, arguments) };
|
|
440
|
-
|
|
441
|
-
export function __wbg_getRandomValues_504510b5564925af() { return handleError(function (arg0, arg1) {
|
|
442
|
-
getObject(arg0).getRandomValues(getObject(arg1));
|
|
443
|
-
}, arguments) };
|
|
444
|
-
|
|
445
|
-
export function __wbg_get_f01601b5a68d10e3(arg0, arg1) {
|
|
446
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
|
447
|
-
return addHeapObject(ret);
|
|
448
|
-
};
|
|
449
|
-
|
|
450
|
-
export function __wbg_length_1009b1af0c481d7b(arg0) {
|
|
451
|
-
const ret = getObject(arg0).length;
|
|
452
|
-
return ret;
|
|
453
|
-
};
|
|
454
|
-
|
|
455
|
-
export function __wbg_newnoargs_c62ea9419c21fbac(arg0, arg1) {
|
|
456
|
-
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
457
|
-
return addHeapObject(ret);
|
|
458
|
-
};
|
|
459
|
-
|
|
460
|
-
export function __wbg_next_9b877f231f476d01(arg0) {
|
|
461
|
-
const ret = getObject(arg0).next;
|
|
462
|
-
return addHeapObject(ret);
|
|
463
|
-
};
|
|
464
|
-
|
|
465
|
-
export function __wbg_next_6529ee0cca8d57ed() { return handleError(function (arg0) {
|
|
466
|
-
const ret = getObject(arg0).next();
|
|
467
|
-
return addHeapObject(ret);
|
|
468
|
-
}, arguments) };
|
|
469
|
-
|
|
470
|
-
export function __wbg_done_5fe336b092d60cf2(arg0) {
|
|
471
|
-
const ret = getObject(arg0).done;
|
|
472
|
-
return ret;
|
|
473
|
-
};
|
|
474
|
-
|
|
475
|
-
export function __wbg_value_0c248a78fdc8e19f(arg0) {
|
|
476
|
-
const ret = getObject(arg0).value;
|
|
477
|
-
return addHeapObject(ret);
|
|
478
|
-
};
|
|
479
|
-
|
|
480
|
-
export function __wbg_iterator_db7ca081358d4fb2() {
|
|
481
|
-
const ret = Symbol.iterator;
|
|
482
|
-
return addHeapObject(ret);
|
|
483
|
-
};
|
|
484
|
-
|
|
485
|
-
export function __wbg_get_7b48513de5dc5ea4() { return handleError(function (arg0, arg1) {
|
|
486
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
487
|
-
return addHeapObject(ret);
|
|
488
|
-
}, arguments) };
|
|
489
|
-
|
|
490
|
-
export function __wbg_call_90c26b09837aba1c() { return handleError(function (arg0, arg1) {
|
|
491
|
-
const ret = getObject(arg0).call(getObject(arg1));
|
|
492
|
-
return addHeapObject(ret);
|
|
493
|
-
}, arguments) };
|
|
494
|
-
|
|
495
|
-
export function __wbg_new_9fb8d994e1c0aaac() {
|
|
496
|
-
const ret = new Object();
|
|
497
|
-
return addHeapObject(ret);
|
|
498
|
-
};
|
|
499
|
-
|
|
500
|
-
export function __wbg_length_36658cb09b6ec34a(arg0) {
|
|
501
|
-
const ret = getObject(arg0).length;
|
|
502
|
-
return ret;
|
|
503
|
-
};
|
|
504
|
-
|
|
505
|
-
export function __wbg_codePointAt_8ce1187388f5c427(arg0, arg1) {
|
|
506
|
-
const ret = getObject(arg0).codePointAt(arg1 >>> 0);
|
|
507
|
-
return addHeapObject(ret);
|
|
508
|
-
};
|
|
509
|
-
|
|
510
|
-
export function __wbg_self_f0e34d89f33b99fd() { return handleError(function () {
|
|
511
|
-
const ret = self.self;
|
|
512
|
-
return addHeapObject(ret);
|
|
513
|
-
}, arguments) };
|
|
514
|
-
|
|
515
|
-
export function __wbg_window_d3b084224f4774d7() { return handleError(function () {
|
|
516
|
-
const ret = window.window;
|
|
517
|
-
return addHeapObject(ret);
|
|
518
|
-
}, arguments) };
|
|
519
|
-
|
|
520
|
-
export function __wbg_globalThis_9caa27ff917c6860() { return handleError(function () {
|
|
521
|
-
const ret = globalThis.globalThis;
|
|
522
|
-
return addHeapObject(ret);
|
|
523
|
-
}, arguments) };
|
|
524
|
-
|
|
525
|
-
export function __wbg_global_35dfdd59a4da3e74() { return handleError(function () {
|
|
526
|
-
const ret = global.global;
|
|
527
|
-
return addHeapObject(ret);
|
|
528
|
-
}, arguments) };
|
|
529
|
-
|
|
530
|
-
export function __wbg_isArray_74fb723e24f76012(arg0) {
|
|
531
|
-
const ret = Array.isArray(getObject(arg0));
|
|
532
|
-
return ret;
|
|
533
|
-
};
|
|
534
|
-
|
|
535
|
-
export function __wbg_instanceof_ArrayBuffer_e7d53d51371448e2(arg0) {
|
|
536
|
-
let result;
|
|
537
|
-
try {
|
|
538
|
-
result = getObject(arg0) instanceof ArrayBuffer;
|
|
539
|
-
} catch (_) {
|
|
540
|
-
result = false;
|
|
541
|
-
}
|
|
542
|
-
const ret = result;
|
|
543
|
-
return ret;
|
|
544
|
-
};
|
|
545
|
-
|
|
546
|
-
export function __wbg_call_5da1969d7cd31ccd() { return handleError(function (arg0, arg1, arg2) {
|
|
547
|
-
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
548
|
-
return addHeapObject(ret);
|
|
549
|
-
}, arguments) };
|
|
550
|
-
|
|
551
|
-
export function __wbg_isSafeInteger_f93fde0dca9820f8(arg0) {
|
|
552
|
-
const ret = Number.isSafeInteger(getObject(arg0));
|
|
553
|
-
return ret;
|
|
554
|
-
};
|
|
555
|
-
|
|
556
|
-
export function __wbg_entries_9e2e2aa45aa5094a(arg0) {
|
|
557
|
-
const ret = Object.entries(getObject(arg0));
|
|
558
|
-
return addHeapObject(ret);
|
|
559
|
-
};
|
|
560
|
-
|
|
561
|
-
export function __wbg_buffer_a448f833075b71ba(arg0) {
|
|
562
|
-
const ret = getObject(arg0).buffer;
|
|
563
|
-
return addHeapObject(ret);
|
|
564
|
-
};
|
|
565
|
-
|
|
566
|
-
export function __wbg_newwithbyteoffsetandlength_d0482f893617af71(arg0, arg1, arg2) {
|
|
567
|
-
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
|
568
|
-
return addHeapObject(ret);
|
|
569
|
-
};
|
|
570
|
-
|
|
571
|
-
export function __wbg_new_8f67e318f15d7254(arg0) {
|
|
572
|
-
const ret = new Uint8Array(getObject(arg0));
|
|
573
|
-
return addHeapObject(ret);
|
|
574
|
-
};
|
|
575
|
-
|
|
576
|
-
export function __wbg_set_2357bf09366ee480(arg0, arg1, arg2) {
|
|
577
|
-
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
578
|
-
};
|
|
579
|
-
|
|
580
|
-
export function __wbg_length_1d25fa9e4ac21ce7(arg0) {
|
|
581
|
-
const ret = getObject(arg0).length;
|
|
582
|
-
return ret;
|
|
583
|
-
};
|
|
584
|
-
|
|
585
|
-
export function __wbg_instanceof_Uint8Array_bced6f43aed8c1aa(arg0) {
|
|
586
|
-
let result;
|
|
587
|
-
try {
|
|
588
|
-
result = getObject(arg0) instanceof Uint8Array;
|
|
589
|
-
} catch (_) {
|
|
590
|
-
result = false;
|
|
591
|
-
}
|
|
592
|
-
const ret = result;
|
|
593
|
-
return ret;
|
|
594
|
-
};
|
|
595
|
-
|
|
596
|
-
export function __wbg_newwithlength_6c2df9e2f3028c43(arg0) {
|
|
597
|
-
const ret = new Uint8Array(arg0 >>> 0);
|
|
598
|
-
return addHeapObject(ret);
|
|
599
|
-
};
|
|
600
|
-
|
|
601
|
-
export function __wbg_subarray_2e940e41c0f5a1d9(arg0, arg1, arg2) {
|
|
602
|
-
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
603
|
-
return addHeapObject(ret);
|
|
604
|
-
};
|
|
605
|
-
|
|
606
|
-
export function __wbindgen_bigint_get_as_i64(arg0, arg1) {
|
|
607
|
-
const v = getObject(arg1);
|
|
608
|
-
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
609
|
-
getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? BigInt(0) : ret;
|
|
610
|
-
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
611
|
-
};
|
|
612
|
-
|
|
613
|
-
export function __wbindgen_debug_string(arg0, arg1) {
|
|
614
|
-
const ret = debugString(getObject(arg1));
|
|
615
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
616
|
-
const len1 = WASM_VECTOR_LEN;
|
|
617
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
618
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
619
|
-
};
|
|
620
|
-
|
|
621
|
-
export function __wbindgen_throw(arg0, arg1) {
|
|
622
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
623
|
-
};
|
|
624
|
-
|
|
625
|
-
export function __wbindgen_memory() {
|
|
626
|
-
const ret = wasm.memory;
|
|
627
|
-
return addHeapObject(ret);
|
|
628
|
-
};
|
|
629
|
-
|