wcl_wasm 0.2.3-alpha

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/package.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "wcl_wasm",
3
+ "type": "module",
4
+ "description": "WebAssembly bindings for WCL (Wil's Configuration Language)",
5
+ "version": "0.2.3-alpha",
6
+ "license": "MIT",
7
+ "files": [
8
+ "wcl_wasm_bg.wasm",
9
+ "wcl_wasm.js",
10
+ "wcl_wasm.d.ts"
11
+ ],
12
+ "main": "wcl_wasm.js",
13
+ "types": "wcl_wasm.d.ts",
14
+ "sideEffects": [
15
+ "./snippets/*"
16
+ ]
17
+ }
package/wcl_wasm.d.ts ADDED
@@ -0,0 +1,59 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+
4
+ /**
5
+ * Parse a WCL source string and return a document object.
6
+ *
7
+ * Returns `{ values, hasErrors, diagnostics }`.
8
+ */
9
+ export function parse(source: string, options?: any | null): any;
10
+
11
+ /**
12
+ * Parse a WCL source string and return just the values object.
13
+ *
14
+ * Returns a plain object with the evaluated values.
15
+ * Throws if there are parse errors.
16
+ */
17
+ export function parseValues(source: string, options?: any | null): any;
18
+
19
+ /**
20
+ * Parse a WCL source string and execute a query against it.
21
+ *
22
+ * Returns the query result as a JS value.
23
+ */
24
+ export function query(source: string, query_str: string, options?: any | null): any;
25
+
26
+ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
27
+
28
+ export interface InitOutput {
29
+ readonly memory: WebAssembly.Memory;
30
+ readonly parse: (a: number, b: number, c: number, d: number) => void;
31
+ readonly parseValues: (a: number, b: number, c: number, d: number) => void;
32
+ readonly query: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
33
+ readonly __wbindgen_export: (a: number, b: number) => number;
34
+ readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
35
+ readonly __wbindgen_export3: (a: number) => void;
36
+ readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
37
+ }
38
+
39
+ export type SyncInitInput = BufferSource | WebAssembly.Module;
40
+
41
+ /**
42
+ * Instantiates the given `module`, which can either be bytes or
43
+ * a precompiled `WebAssembly.Module`.
44
+ *
45
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
46
+ *
47
+ * @returns {InitOutput}
48
+ */
49
+ export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
50
+
51
+ /**
52
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
53
+ * for everything else, calls `WebAssembly.instantiate` directly.
54
+ *
55
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
56
+ *
57
+ * @returns {Promise<InitOutput>}
58
+ */
59
+ export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
package/wcl_wasm.js ADDED
@@ -0,0 +1,500 @@
1
+ /* @ts-self-types="./wcl_wasm.d.ts" */
2
+
3
+ /**
4
+ * Parse a WCL source string and return a document object.
5
+ *
6
+ * Returns `{ values, hasErrors, diagnostics }`.
7
+ * @param {string} source
8
+ * @param {any | null} [options]
9
+ * @returns {any}
10
+ */
11
+ export function parse(source, options) {
12
+ try {
13
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
14
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_export, wasm.__wbindgen_export2);
15
+ const len0 = WASM_VECTOR_LEN;
16
+ wasm.parse(retptr, ptr0, len0, isLikeNone(options) ? 0 : addHeapObject(options));
17
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
18
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
19
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
20
+ if (r2) {
21
+ throw takeObject(r1);
22
+ }
23
+ return takeObject(r0);
24
+ } finally {
25
+ wasm.__wbindgen_add_to_stack_pointer(16);
26
+ }
27
+ }
28
+
29
+ /**
30
+ * Parse a WCL source string and return just the values object.
31
+ *
32
+ * Returns a plain object with the evaluated values.
33
+ * Throws if there are parse errors.
34
+ * @param {string} source
35
+ * @param {any | null} [options]
36
+ * @returns {any}
37
+ */
38
+ export function parseValues(source, options) {
39
+ try {
40
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
41
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_export, wasm.__wbindgen_export2);
42
+ const len0 = WASM_VECTOR_LEN;
43
+ wasm.parseValues(retptr, ptr0, len0, isLikeNone(options) ? 0 : addHeapObject(options));
44
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
45
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
46
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
47
+ if (r2) {
48
+ throw takeObject(r1);
49
+ }
50
+ return takeObject(r0);
51
+ } finally {
52
+ wasm.__wbindgen_add_to_stack_pointer(16);
53
+ }
54
+ }
55
+
56
+ /**
57
+ * Parse a WCL source string and execute a query against it.
58
+ *
59
+ * Returns the query result as a JS value.
60
+ * @param {string} source
61
+ * @param {string} query_str
62
+ * @param {any | null} [options]
63
+ * @returns {any}
64
+ */
65
+ export function query(source, query_str, options) {
66
+ try {
67
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
68
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_export, wasm.__wbindgen_export2);
69
+ const len0 = WASM_VECTOR_LEN;
70
+ const ptr1 = passStringToWasm0(query_str, wasm.__wbindgen_export, wasm.__wbindgen_export2);
71
+ const len1 = WASM_VECTOR_LEN;
72
+ wasm.query(retptr, ptr0, len0, ptr1, len1, isLikeNone(options) ? 0 : addHeapObject(options));
73
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
74
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
75
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
76
+ if (r2) {
77
+ throw takeObject(r1);
78
+ }
79
+ return takeObject(r0);
80
+ } finally {
81
+ wasm.__wbindgen_add_to_stack_pointer(16);
82
+ }
83
+ }
84
+
85
+ function __wbg_get_imports() {
86
+ const import0 = {
87
+ __proto__: null,
88
+ __wbg___wbindgen_boolean_get_c0f3f60bac5a78d1: function(arg0) {
89
+ const v = getObject(arg0);
90
+ const ret = typeof(v) === 'boolean' ? v : undefined;
91
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
92
+ },
93
+ __wbg___wbindgen_debug_string_5398f5bb970e0daa: function(arg0, arg1) {
94
+ const ret = debugString(getObject(arg1));
95
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
96
+ const len1 = WASM_VECTOR_LEN;
97
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
98
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
99
+ },
100
+ __wbg___wbindgen_is_function_3c846841762788c1: function(arg0) {
101
+ const ret = typeof(getObject(arg0)) === 'function';
102
+ return ret;
103
+ },
104
+ __wbg___wbindgen_is_null_0b605fc6b167c56f: function(arg0) {
105
+ const ret = getObject(arg0) === null;
106
+ return ret;
107
+ },
108
+ __wbg___wbindgen_is_object_781bc9f159099513: function(arg0) {
109
+ const val = getObject(arg0);
110
+ const ret = typeof(val) === 'object' && val !== null;
111
+ return ret;
112
+ },
113
+ __wbg___wbindgen_is_undefined_52709e72fb9f179c: function(arg0) {
114
+ const ret = getObject(arg0) === undefined;
115
+ return ret;
116
+ },
117
+ __wbg___wbindgen_number_get_34bb9d9dcfa21373: function(arg0, arg1) {
118
+ const obj = getObject(arg1);
119
+ const ret = typeof(obj) === 'number' ? obj : undefined;
120
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
121
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
122
+ },
123
+ __wbg___wbindgen_string_get_395e606bd0ee4427: function(arg0, arg1) {
124
+ const obj = getObject(arg1);
125
+ const ret = typeof(obj) === 'string' ? obj : undefined;
126
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
127
+ var len1 = WASM_VECTOR_LEN;
128
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
129
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
130
+ },
131
+ __wbg___wbindgen_throw_6ddd609b62940d55: function(arg0, arg1) {
132
+ throw new Error(getStringFromWasm0(arg0, arg1));
133
+ },
134
+ __wbg_add_fe24b809ecd53906: function(arg0, arg1) {
135
+ const ret = getObject(arg0).add(getObject(arg1));
136
+ return addHeapObject(ret);
137
+ },
138
+ __wbg_apply_ac9afb97ca32f169: function() { return handleError(function (arg0, arg1, arg2) {
139
+ const ret = getObject(arg0).apply(getObject(arg1), getObject(arg2));
140
+ return addHeapObject(ret);
141
+ }, arguments); },
142
+ __wbg_call_2d781c1f4d5c0ef8: function() { return handleError(function (arg0, arg1, arg2) {
143
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
144
+ return addHeapObject(ret);
145
+ }, arguments); },
146
+ __wbg_from_4bdf88943703fd48: function(arg0) {
147
+ const ret = Array.from(getObject(arg0));
148
+ return addHeapObject(ret);
149
+ },
150
+ __wbg_get_3ef1eba1850ade27: function() { return handleError(function (arg0, arg1) {
151
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
152
+ return addHeapObject(ret);
153
+ }, arguments); },
154
+ __wbg_get_a8ee5c45dabc1b3b: function(arg0, arg1) {
155
+ const ret = getObject(arg0)[arg1 >>> 0];
156
+ return addHeapObject(ret);
157
+ },
158
+ __wbg_get_unchecked_329cfe50afab7352: function(arg0, arg1) {
159
+ const ret = getObject(arg0)[arg1 >>> 0];
160
+ return addHeapObject(ret);
161
+ },
162
+ __wbg_isArray_33b91feb269ff46e: function(arg0) {
163
+ const ret = Array.isArray(getObject(arg0));
164
+ return ret;
165
+ },
166
+ __wbg_keys_ab0d051a1c55236d: function(arg0) {
167
+ const ret = Object.keys(getObject(arg0));
168
+ return addHeapObject(ret);
169
+ },
170
+ __wbg_length_b3416cf66a5452c8: function(arg0) {
171
+ const ret = getObject(arg0).length;
172
+ return ret;
173
+ },
174
+ __wbg_new_76edacb349be146a: function(arg0) {
175
+ const ret = new Set(getObject(arg0));
176
+ return addHeapObject(ret);
177
+ },
178
+ __wbg_new_a70fbab9066b301f: function() {
179
+ const ret = new Array();
180
+ return addHeapObject(ret);
181
+ },
182
+ __wbg_new_ab79df5bd7c26067: function() {
183
+ const ret = new Object();
184
+ return addHeapObject(ret);
185
+ },
186
+ __wbg_push_e87b0e732085a946: function(arg0, arg1) {
187
+ const ret = getObject(arg0).push(getObject(arg1));
188
+ return ret;
189
+ },
190
+ __wbg_set_7eaa4f96924fd6b3: function() { return handleError(function (arg0, arg1, arg2) {
191
+ const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
192
+ return ret;
193
+ }, arguments); },
194
+ __wbindgen_cast_0000000000000001: function(arg0) {
195
+ // Cast intrinsic for `F64 -> Externref`.
196
+ const ret = arg0;
197
+ return addHeapObject(ret);
198
+ },
199
+ __wbindgen_cast_0000000000000002: function(arg0, arg1) {
200
+ // Cast intrinsic for `Ref(String) -> Externref`.
201
+ const ret = getStringFromWasm0(arg0, arg1);
202
+ return addHeapObject(ret);
203
+ },
204
+ __wbindgen_object_clone_ref: function(arg0) {
205
+ const ret = getObject(arg0);
206
+ return addHeapObject(ret);
207
+ },
208
+ __wbindgen_object_drop_ref: function(arg0) {
209
+ takeObject(arg0);
210
+ },
211
+ };
212
+ return {
213
+ __proto__: null,
214
+ "./wcl_wasm_bg.js": import0,
215
+ };
216
+ }
217
+
218
+ function addHeapObject(obj) {
219
+ if (heap_next === heap.length) heap.push(heap.length + 1);
220
+ const idx = heap_next;
221
+ heap_next = heap[idx];
222
+
223
+ heap[idx] = obj;
224
+ return idx;
225
+ }
226
+
227
+ function debugString(val) {
228
+ // primitive types
229
+ const type = typeof val;
230
+ if (type == 'number' || type == 'boolean' || val == null) {
231
+ return `${val}`;
232
+ }
233
+ if (type == 'string') {
234
+ return `"${val}"`;
235
+ }
236
+ if (type == 'symbol') {
237
+ const description = val.description;
238
+ if (description == null) {
239
+ return 'Symbol';
240
+ } else {
241
+ return `Symbol(${description})`;
242
+ }
243
+ }
244
+ if (type == 'function') {
245
+ const name = val.name;
246
+ if (typeof name == 'string' && name.length > 0) {
247
+ return `Function(${name})`;
248
+ } else {
249
+ return 'Function';
250
+ }
251
+ }
252
+ // objects
253
+ if (Array.isArray(val)) {
254
+ const length = val.length;
255
+ let debug = '[';
256
+ if (length > 0) {
257
+ debug += debugString(val[0]);
258
+ }
259
+ for(let i = 1; i < length; i++) {
260
+ debug += ', ' + debugString(val[i]);
261
+ }
262
+ debug += ']';
263
+ return debug;
264
+ }
265
+ // Test for built-in
266
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
267
+ let className;
268
+ if (builtInMatches && builtInMatches.length > 1) {
269
+ className = builtInMatches[1];
270
+ } else {
271
+ // Failed to match the standard '[object ClassName]'
272
+ return toString.call(val);
273
+ }
274
+ if (className == 'Object') {
275
+ // we're a user defined class or Object
276
+ // JSON.stringify avoids problems with cycles, and is generally much
277
+ // easier than looping through ownProperties of `val`.
278
+ try {
279
+ return 'Object(' + JSON.stringify(val) + ')';
280
+ } catch (_) {
281
+ return 'Object';
282
+ }
283
+ }
284
+ // errors
285
+ if (val instanceof Error) {
286
+ return `${val.name}: ${val.message}\n${val.stack}`;
287
+ }
288
+ // TODO we could test for more things here, like `Set`s and `Map`s.
289
+ return className;
290
+ }
291
+
292
+ function dropObject(idx) {
293
+ if (idx < 1028) return;
294
+ heap[idx] = heap_next;
295
+ heap_next = idx;
296
+ }
297
+
298
+ let cachedDataViewMemory0 = null;
299
+ function getDataViewMemory0() {
300
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
301
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
302
+ }
303
+ return cachedDataViewMemory0;
304
+ }
305
+
306
+ function getStringFromWasm0(ptr, len) {
307
+ ptr = ptr >>> 0;
308
+ return decodeText(ptr, len);
309
+ }
310
+
311
+ let cachedUint8ArrayMemory0 = null;
312
+ function getUint8ArrayMemory0() {
313
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
314
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
315
+ }
316
+ return cachedUint8ArrayMemory0;
317
+ }
318
+
319
+ function getObject(idx) { return heap[idx]; }
320
+
321
+ function handleError(f, args) {
322
+ try {
323
+ return f.apply(this, args);
324
+ } catch (e) {
325
+ wasm.__wbindgen_export3(addHeapObject(e));
326
+ }
327
+ }
328
+
329
+ let heap = new Array(1024).fill(undefined);
330
+ heap.push(undefined, null, true, false);
331
+
332
+ let heap_next = heap.length;
333
+
334
+ function isLikeNone(x) {
335
+ return x === undefined || x === null;
336
+ }
337
+
338
+ function passStringToWasm0(arg, malloc, realloc) {
339
+ if (realloc === undefined) {
340
+ const buf = cachedTextEncoder.encode(arg);
341
+ const ptr = malloc(buf.length, 1) >>> 0;
342
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
343
+ WASM_VECTOR_LEN = buf.length;
344
+ return ptr;
345
+ }
346
+
347
+ let len = arg.length;
348
+ let ptr = malloc(len, 1) >>> 0;
349
+
350
+ const mem = getUint8ArrayMemory0();
351
+
352
+ let offset = 0;
353
+
354
+ for (; offset < len; offset++) {
355
+ const code = arg.charCodeAt(offset);
356
+ if (code > 0x7F) break;
357
+ mem[ptr + offset] = code;
358
+ }
359
+ if (offset !== len) {
360
+ if (offset !== 0) {
361
+ arg = arg.slice(offset);
362
+ }
363
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
364
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
365
+ const ret = cachedTextEncoder.encodeInto(arg, view);
366
+
367
+ offset += ret.written;
368
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
369
+ }
370
+
371
+ WASM_VECTOR_LEN = offset;
372
+ return ptr;
373
+ }
374
+
375
+ function takeObject(idx) {
376
+ const ret = getObject(idx);
377
+ dropObject(idx);
378
+ return ret;
379
+ }
380
+
381
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
382
+ cachedTextDecoder.decode();
383
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
384
+ let numBytesDecoded = 0;
385
+ function decodeText(ptr, len) {
386
+ numBytesDecoded += len;
387
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
388
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
389
+ cachedTextDecoder.decode();
390
+ numBytesDecoded = len;
391
+ }
392
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
393
+ }
394
+
395
+ const cachedTextEncoder = new TextEncoder();
396
+
397
+ if (!('encodeInto' in cachedTextEncoder)) {
398
+ cachedTextEncoder.encodeInto = function (arg, view) {
399
+ const buf = cachedTextEncoder.encode(arg);
400
+ view.set(buf);
401
+ return {
402
+ read: arg.length,
403
+ written: buf.length
404
+ };
405
+ };
406
+ }
407
+
408
+ let WASM_VECTOR_LEN = 0;
409
+
410
+ let wasmModule, wasm;
411
+ function __wbg_finalize_init(instance, module) {
412
+ wasm = instance.exports;
413
+ wasmModule = module;
414
+ cachedDataViewMemory0 = null;
415
+ cachedUint8ArrayMemory0 = null;
416
+ return wasm;
417
+ }
418
+
419
+ async function __wbg_load(module, imports) {
420
+ if (typeof Response === 'function' && module instanceof Response) {
421
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
422
+ try {
423
+ return await WebAssembly.instantiateStreaming(module, imports);
424
+ } catch (e) {
425
+ const validResponse = module.ok && expectedResponseType(module.type);
426
+
427
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
428
+ 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);
429
+
430
+ } else { throw e; }
431
+ }
432
+ }
433
+
434
+ const bytes = await module.arrayBuffer();
435
+ return await WebAssembly.instantiate(bytes, imports);
436
+ } else {
437
+ const instance = await WebAssembly.instantiate(module, imports);
438
+
439
+ if (instance instanceof WebAssembly.Instance) {
440
+ return { instance, module };
441
+ } else {
442
+ return instance;
443
+ }
444
+ }
445
+
446
+ function expectedResponseType(type) {
447
+ switch (type) {
448
+ case 'basic': case 'cors': case 'default': return true;
449
+ }
450
+ return false;
451
+ }
452
+ }
453
+
454
+ function initSync(module) {
455
+ if (wasm !== undefined) return wasm;
456
+
457
+
458
+ if (module !== undefined) {
459
+ if (Object.getPrototypeOf(module) === Object.prototype) {
460
+ ({module} = module)
461
+ } else {
462
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
463
+ }
464
+ }
465
+
466
+ const imports = __wbg_get_imports();
467
+ if (!(module instanceof WebAssembly.Module)) {
468
+ module = new WebAssembly.Module(module);
469
+ }
470
+ const instance = new WebAssembly.Instance(module, imports);
471
+ return __wbg_finalize_init(instance, module);
472
+ }
473
+
474
+ async function __wbg_init(module_or_path) {
475
+ if (wasm !== undefined) return wasm;
476
+
477
+
478
+ if (module_or_path !== undefined) {
479
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
480
+ ({module_or_path} = module_or_path)
481
+ } else {
482
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
483
+ }
484
+ }
485
+
486
+ if (module_or_path === undefined) {
487
+ module_or_path = new URL('wcl_wasm_bg.wasm', import.meta.url);
488
+ }
489
+ const imports = __wbg_get_imports();
490
+
491
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
492
+ module_or_path = fetch(module_or_path);
493
+ }
494
+
495
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
496
+
497
+ return __wbg_finalize_init(instance, module);
498
+ }
499
+
500
+ export { initSync, __wbg_init as default };
Binary file