@inclavare-containers/tng 2.6.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/tng_wasm.js ADDED
@@ -0,0 +1,1298 @@
1
+ /* @ts-self-types="./tng_wasm.d.ts" */
2
+
3
+ export class IntoUnderlyingByteSource {
4
+ __destroy_into_raw() {
5
+ const ptr = this.__wbg_ptr;
6
+ this.__wbg_ptr = 0;
7
+ IntoUnderlyingByteSourceFinalization.unregister(this);
8
+ return ptr;
9
+ }
10
+ free() {
11
+ const ptr = this.__destroy_into_raw();
12
+ wasm.__wbg_intounderlyingbytesource_free(ptr, 0);
13
+ }
14
+ /**
15
+ * @returns {number}
16
+ */
17
+ get autoAllocateChunkSize() {
18
+ const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);
19
+ return ret >>> 0;
20
+ }
21
+ cancel() {
22
+ const ptr = this.__destroy_into_raw();
23
+ wasm.intounderlyingbytesource_cancel(ptr);
24
+ }
25
+ /**
26
+ * @param {ReadableByteStreamController} controller
27
+ * @returns {Promise<any>}
28
+ */
29
+ pull(controller) {
30
+ const ret = wasm.intounderlyingbytesource_pull(this.__wbg_ptr, controller);
31
+ return ret;
32
+ }
33
+ /**
34
+ * @param {ReadableByteStreamController} controller
35
+ */
36
+ start(controller) {
37
+ wasm.intounderlyingbytesource_start(this.__wbg_ptr, controller);
38
+ }
39
+ /**
40
+ * @returns {ReadableStreamType}
41
+ */
42
+ get type() {
43
+ const ret = wasm.intounderlyingbytesource_type(this.__wbg_ptr);
44
+ return __wbindgen_enum_ReadableStreamType[ret];
45
+ }
46
+ }
47
+ if (Symbol.dispose) IntoUnderlyingByteSource.prototype[Symbol.dispose] = IntoUnderlyingByteSource.prototype.free;
48
+
49
+ export class IntoUnderlyingSink {
50
+ __destroy_into_raw() {
51
+ const ptr = this.__wbg_ptr;
52
+ this.__wbg_ptr = 0;
53
+ IntoUnderlyingSinkFinalization.unregister(this);
54
+ return ptr;
55
+ }
56
+ free() {
57
+ const ptr = this.__destroy_into_raw();
58
+ wasm.__wbg_intounderlyingsink_free(ptr, 0);
59
+ }
60
+ /**
61
+ * @param {any} reason
62
+ * @returns {Promise<any>}
63
+ */
64
+ abort(reason) {
65
+ const ptr = this.__destroy_into_raw();
66
+ const ret = wasm.intounderlyingsink_abort(ptr, reason);
67
+ return ret;
68
+ }
69
+ /**
70
+ * @returns {Promise<any>}
71
+ */
72
+ close() {
73
+ const ptr = this.__destroy_into_raw();
74
+ const ret = wasm.intounderlyingsink_close(ptr);
75
+ return ret;
76
+ }
77
+ /**
78
+ * @param {any} chunk
79
+ * @returns {Promise<any>}
80
+ */
81
+ write(chunk) {
82
+ const ret = wasm.intounderlyingsink_write(this.__wbg_ptr, chunk);
83
+ return ret;
84
+ }
85
+ }
86
+ if (Symbol.dispose) IntoUnderlyingSink.prototype[Symbol.dispose] = IntoUnderlyingSink.prototype.free;
87
+
88
+ export class IntoUnderlyingSource {
89
+ static __wrap(ptr) {
90
+ ptr = ptr >>> 0;
91
+ const obj = Object.create(IntoUnderlyingSource.prototype);
92
+ obj.__wbg_ptr = ptr;
93
+ IntoUnderlyingSourceFinalization.register(obj, obj.__wbg_ptr, obj);
94
+ return obj;
95
+ }
96
+ __destroy_into_raw() {
97
+ const ptr = this.__wbg_ptr;
98
+ this.__wbg_ptr = 0;
99
+ IntoUnderlyingSourceFinalization.unregister(this);
100
+ return ptr;
101
+ }
102
+ free() {
103
+ const ptr = this.__destroy_into_raw();
104
+ wasm.__wbg_intounderlyingsource_free(ptr, 0);
105
+ }
106
+ cancel() {
107
+ const ptr = this.__destroy_into_raw();
108
+ wasm.intounderlyingsource_cancel(ptr);
109
+ }
110
+ /**
111
+ * @param {ReadableStreamDefaultController} controller
112
+ * @returns {Promise<any>}
113
+ */
114
+ pull(controller) {
115
+ const ret = wasm.intounderlyingsource_pull(this.__wbg_ptr, controller);
116
+ return ret;
117
+ }
118
+ }
119
+ if (Symbol.dispose) IntoUnderlyingSource.prototype[Symbol.dispose] = IntoUnderlyingSource.prototype.free;
120
+
121
+ /**
122
+ * @param {string} url
123
+ * @param {any} init
124
+ * @param {any} config
125
+ * @returns {Promise<Response>}
126
+ */
127
+ function fetch2(url, init, config) {
128
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
129
+ const len0 = WASM_VECTOR_LEN;
130
+ const ret = wasm.fetch(ptr0, len0, init, config);
131
+ return ret;
132
+ }
133
+ export { fetch2 as fetch }
134
+
135
+ export function init_tng() {
136
+ wasm.init_tng();
137
+ }
138
+
139
+ /**
140
+ * Entry point invoked by JavaScript in a worker.
141
+ * @param {number} ptr
142
+ */
143
+ export function task_worker_entry_point(ptr) {
144
+ const ret = wasm.task_worker_entry_point(ptr);
145
+ if (ret[1]) {
146
+ throw takeFromExternrefTable0(ret[0]);
147
+ }
148
+ }
149
+
150
+ function __wbg_get_imports(memory) {
151
+ const import0 = {
152
+ __proto__: null,
153
+ __wbg_Error_83742b46f01ce22d: function(arg0, arg1) {
154
+ const ret = Error(getStringFromWasm0(arg0, arg1));
155
+ return ret;
156
+ },
157
+ __wbg_Number_a5a435bd7bbec835: function(arg0) {
158
+ const ret = Number(arg0);
159
+ return ret;
160
+ },
161
+ __wbg___wbindgen_bigint_get_as_i64_447a76b5c6ef7bda: function(arg0, arg1) {
162
+ const v = arg1;
163
+ const ret = typeof(v) === 'bigint' ? v : undefined;
164
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
165
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
166
+ },
167
+ __wbg___wbindgen_boolean_get_c0f3f60bac5a78d1: function(arg0) {
168
+ const v = arg0;
169
+ const ret = typeof(v) === 'boolean' ? v : undefined;
170
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
171
+ },
172
+ __wbg___wbindgen_debug_string_5398f5bb970e0daa: function(arg0, arg1) {
173
+ const ret = debugString(arg1);
174
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
175
+ const len1 = WASM_VECTOR_LEN;
176
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
177
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
178
+ },
179
+ __wbg___wbindgen_in_41dbb8413020e076: function(arg0, arg1) {
180
+ const ret = arg0 in arg1;
181
+ return ret;
182
+ },
183
+ __wbg___wbindgen_is_bigint_e2141d4f045b7eda: function(arg0) {
184
+ const ret = typeof(arg0) === 'bigint';
185
+ return ret;
186
+ },
187
+ __wbg___wbindgen_is_function_3c846841762788c1: function(arg0) {
188
+ const ret = typeof(arg0) === 'function';
189
+ return ret;
190
+ },
191
+ __wbg___wbindgen_is_object_781bc9f159099513: function(arg0) {
192
+ const val = arg0;
193
+ const ret = typeof(val) === 'object' && val !== null;
194
+ return ret;
195
+ },
196
+ __wbg___wbindgen_is_string_7ef6b97b02428fae: function(arg0) {
197
+ const ret = typeof(arg0) === 'string';
198
+ return ret;
199
+ },
200
+ __wbg___wbindgen_is_undefined_52709e72fb9f179c: function(arg0) {
201
+ const ret = arg0 === undefined;
202
+ return ret;
203
+ },
204
+ __wbg___wbindgen_jsval_eq_ee31bfad3e536463: function(arg0, arg1) {
205
+ const ret = arg0 === arg1;
206
+ return ret;
207
+ },
208
+ __wbg___wbindgen_jsval_loose_eq_5bcc3bed3c69e72b: function(arg0, arg1) {
209
+ const ret = arg0 == arg1;
210
+ return ret;
211
+ },
212
+ __wbg___wbindgen_memory_edb3f01e3930bbf6: function() {
213
+ const ret = wasm.memory;
214
+ return ret;
215
+ },
216
+ __wbg___wbindgen_number_get_34bb9d9dcfa21373: function(arg0, arg1) {
217
+ const obj = arg1;
218
+ const ret = typeof(obj) === 'number' ? obj : undefined;
219
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
220
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
221
+ },
222
+ __wbg___wbindgen_rethrow_5d3a9250cec92549: function(arg0) {
223
+ throw arg0;
224
+ },
225
+ __wbg___wbindgen_string_get_395e606bd0ee4427: function(arg0, arg1) {
226
+ const obj = arg1;
227
+ const ret = typeof(obj) === 'string' ? obj : undefined;
228
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
229
+ var len1 = WASM_VECTOR_LEN;
230
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
231
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
232
+ },
233
+ __wbg___wbindgen_throw_6ddd609b62940d55: function(arg0, arg1) {
234
+ throw new Error(getStringFromWasm0(arg0, arg1));
235
+ },
236
+ __wbg__wbg_cb_unref_6b5b6b8576d35cb1: function(arg0) {
237
+ arg0._wbg_cb_unref();
238
+ },
239
+ __wbg_abort_5ef96933660780b7: function(arg0) {
240
+ arg0.abort();
241
+ },
242
+ __wbg_abort_6479c2d794ebf2ee: function(arg0, arg1) {
243
+ arg0.abort(arg1);
244
+ },
245
+ __wbg_append_608dfb635ee8998f: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
246
+ arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
247
+ }, arguments); },
248
+ __wbg_arrayBuffer_eb8e9ca620af2a19: function() { return handleError(function (arg0) {
249
+ const ret = arg0.arrayBuffer();
250
+ return ret;
251
+ }, arguments); },
252
+ __wbg_async_b33e4cb28c6b2093: function(arg0) {
253
+ const ret = arg0.async;
254
+ return ret;
255
+ },
256
+ __wbg_body_9fd07dcbb5b77be9: function(arg0) {
257
+ const ret = arg0.body;
258
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
259
+ },
260
+ __wbg_body_ac1dad652946e6da: function(arg0) {
261
+ const ret = arg0.body;
262
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
263
+ },
264
+ __wbg_buffer_60b8043cd926067d: function(arg0) {
265
+ const ret = arg0.buffer;
266
+ return ret;
267
+ },
268
+ __wbg_buffer_eb2779983eb67380: function(arg0) {
269
+ const ret = arg0.buffer;
270
+ return ret;
271
+ },
272
+ __wbg_byobRequest_6342e5f2b232c0f9: function(arg0) {
273
+ const ret = arg0.byobRequest;
274
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
275
+ },
276
+ __wbg_byteLength_607b856aa6c5a508: function(arg0) {
277
+ const ret = arg0.byteLength;
278
+ return ret;
279
+ },
280
+ __wbg_byteOffset_b26b63681c83856c: function(arg0) {
281
+ const ret = arg0.byteOffset;
282
+ return ret;
283
+ },
284
+ __wbg_call_2d781c1f4d5c0ef8: function() { return handleError(function (arg0, arg1, arg2) {
285
+ const ret = arg0.call(arg1, arg2);
286
+ return ret;
287
+ }, arguments); },
288
+ __wbg_call_e133b57c9155d22c: function() { return handleError(function (arg0, arg1) {
289
+ const ret = arg0.call(arg1);
290
+ return ret;
291
+ }, arguments); },
292
+ __wbg_cancel_79b3bea07a1028e7: function(arg0) {
293
+ const ret = arg0.cancel();
294
+ return ret;
295
+ },
296
+ __wbg_catch_d7ed0375ab6532a5: function(arg0, arg1) {
297
+ const ret = arg0.catch(arg1);
298
+ return ret;
299
+ },
300
+ __wbg_clearTimeout_4ce8abcdd5386a8f: function(arg0) {
301
+ const ret = clearTimeout(arg0);
302
+ return ret;
303
+ },
304
+ __wbg_close_690d36108c557337: function() { return handleError(function (arg0) {
305
+ arg0.close();
306
+ }, arguments); },
307
+ __wbg_close_737b4b1fbc658540: function() { return handleError(function (arg0) {
308
+ arg0.close();
309
+ }, arguments); },
310
+ __wbg_crypto_0a92367f02a93895: function(arg0) {
311
+ const ret = arg0.crypto;
312
+ return ret;
313
+ },
314
+ __wbg_data_a3d9ff9cdd801002: function(arg0) {
315
+ const ret = arg0.data;
316
+ return ret;
317
+ },
318
+ __wbg_done_08ce71ee07e3bd17: function(arg0) {
319
+ const ret = arg0.done;
320
+ return ret;
321
+ },
322
+ __wbg_enqueue_ec3552838b4b7fbf: function() { return handleError(function (arg0, arg1) {
323
+ arg0.enqueue(arg1);
324
+ }, arguments); },
325
+ __wbg_entries_850b70a4650cfe8b: function(arg0) {
326
+ const ret = arg0.entries();
327
+ return ret;
328
+ },
329
+ __wbg_entries_e8a20ff8c9757101: function(arg0) {
330
+ const ret = Object.entries(arg0);
331
+ return ret;
332
+ },
333
+ __wbg_error_9c9440b7640728e8: function(arg0, arg1) {
334
+ console.error(getStringFromWasm0(arg0, arg1));
335
+ },
336
+ __wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
337
+ let deferred0_0;
338
+ let deferred0_1;
339
+ try {
340
+ deferred0_0 = arg0;
341
+ deferred0_1 = arg1;
342
+ console.error(getStringFromWasm0(arg0, arg1));
343
+ } finally {
344
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
345
+ }
346
+ },
347
+ __wbg_fetch_4e11d9098857f1ae: function(arg0) {
348
+ const ret = fetch(arg0);
349
+ return ret;
350
+ },
351
+ __wbg_fetch_5550a88cf343aaa9: function(arg0, arg1) {
352
+ const ret = arg0.fetch(arg1);
353
+ return ret;
354
+ },
355
+ __wbg_fetch_b9ec7cc04e1ed641: function(arg0, arg1) {
356
+ const ret = fetch(arg0, arg1);
357
+ return ret;
358
+ },
359
+ __wbg_fetch_d77cded604d729e9: function(arg0, arg1, arg2) {
360
+ const ret = arg0.fetch(arg1, arg2);
361
+ return ret;
362
+ },
363
+ __wbg_getRandomValues_d3f1739dc62f980a: function() { return handleError(function (arg0, arg1) {
364
+ arg0.getRandomValues(arg1);
365
+ }, arguments); },
366
+ __wbg_getRandomValues_d48bff8ad930d4f4: function() { return handleError(function (arg0) {
367
+ globalThis.crypto.getRandomValues(arg0);
368
+ }, arguments); },
369
+ __wbg_getReader_b4b1868fbca77dbe: function() { return handleError(function (arg0) {
370
+ const ret = arg0.getReader();
371
+ return ret;
372
+ }, arguments); },
373
+ __wbg_getTime_1dad7b5386ddd2d9: function(arg0) {
374
+ const ret = arg0.getTime();
375
+ return ret;
376
+ },
377
+ __wbg_get_326e41e095fb2575: function() { return handleError(function (arg0, arg1) {
378
+ const ret = Reflect.get(arg0, arg1);
379
+ return ret;
380
+ }, arguments); },
381
+ __wbg_get_a8ee5c45dabc1b3b: function(arg0, arg1) {
382
+ const ret = arg0[arg1 >>> 0];
383
+ return ret;
384
+ },
385
+ __wbg_get_done_d0ab690f8df5501f: function(arg0) {
386
+ const ret = arg0.done;
387
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
388
+ },
389
+ __wbg_get_unchecked_329cfe50afab7352: function(arg0, arg1) {
390
+ const ret = arg0[arg1 >>> 0];
391
+ return ret;
392
+ },
393
+ __wbg_get_value_548ae6adf5a174e4: function(arg0) {
394
+ const ret = arg0.value;
395
+ return ret;
396
+ },
397
+ __wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
398
+ const ret = arg0[arg1];
399
+ return ret;
400
+ },
401
+ __wbg_has_926ef2ff40b308cf: function() { return handleError(function (arg0, arg1) {
402
+ const ret = Reflect.has(arg0, arg1);
403
+ return ret;
404
+ }, arguments); },
405
+ __wbg_headers_eb2234545f9ff993: function(arg0) {
406
+ const ret = arg0.headers;
407
+ return ret;
408
+ },
409
+ __wbg_headers_fc8c672cd757e0fd: function(arg0) {
410
+ const ret = arg0.headers;
411
+ return ret;
412
+ },
413
+ __wbg_instanceof_ArrayBuffer_101e2bf31071a9f6: function(arg0) {
414
+ let result;
415
+ try {
416
+ result = arg0 instanceof ArrayBuffer;
417
+ } catch (_) {
418
+ result = false;
419
+ }
420
+ const ret = result;
421
+ return ret;
422
+ },
423
+ __wbg_instanceof_Map_f194b366846aca0c: function(arg0) {
424
+ let result;
425
+ try {
426
+ result = arg0 instanceof Map;
427
+ } catch (_) {
428
+ result = false;
429
+ }
430
+ const ret = result;
431
+ return ret;
432
+ },
433
+ __wbg_instanceof_Response_9b4d9fd451e051b1: function(arg0) {
434
+ let result;
435
+ try {
436
+ result = arg0 instanceof Response;
437
+ } catch (_) {
438
+ result = false;
439
+ }
440
+ const ret = result;
441
+ return ret;
442
+ },
443
+ __wbg_instanceof_Uint8Array_740438561a5b956d: function(arg0) {
444
+ let result;
445
+ try {
446
+ result = arg0 instanceof Uint8Array;
447
+ } catch (_) {
448
+ result = false;
449
+ }
450
+ const ret = result;
451
+ return ret;
452
+ },
453
+ __wbg_instanceof_Window_23e677d2c6843922: function(arg0) {
454
+ let result;
455
+ try {
456
+ result = arg0 instanceof Window;
457
+ } catch (_) {
458
+ result = false;
459
+ }
460
+ const ret = result;
461
+ return ret;
462
+ },
463
+ __wbg_isArray_33b91feb269ff46e: function(arg0) {
464
+ const ret = Array.isArray(arg0);
465
+ return ret;
466
+ },
467
+ __wbg_isSafeInteger_ecd6a7f9c3e053cd: function(arg0) {
468
+ const ret = Number.isSafeInteger(arg0);
469
+ return ret;
470
+ },
471
+ __wbg_iterator_d8f549ec8fb061b1: function() {
472
+ const ret = Symbol.iterator;
473
+ return ret;
474
+ },
475
+ __wbg_length_b3416cf66a5452c8: function(arg0) {
476
+ const ret = arg0.length;
477
+ return ret;
478
+ },
479
+ __wbg_length_ea16607d7b61445b: function(arg0) {
480
+ const ret = arg0.length;
481
+ return ret;
482
+ },
483
+ __wbg_log_0c201ade58bb55e1: function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
484
+ let deferred0_0;
485
+ let deferred0_1;
486
+ try {
487
+ deferred0_0 = arg0;
488
+ deferred0_1 = arg1;
489
+ console.log(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5), getStringFromWasm0(arg6, arg7));
490
+ } finally {
491
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
492
+ }
493
+ },
494
+ __wbg_log_ce2c4456b290c5e7: function(arg0, arg1) {
495
+ let deferred0_0;
496
+ let deferred0_1;
497
+ try {
498
+ deferred0_0 = arg0;
499
+ deferred0_1 = arg1;
500
+ console.log(getStringFromWasm0(arg0, arg1));
501
+ } finally {
502
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
503
+ }
504
+ },
505
+ __wbg_mark_b4d943f3bc2d2404: function(arg0, arg1) {
506
+ performance.mark(getStringFromWasm0(arg0, arg1));
507
+ },
508
+ __wbg_measure_84362959e621a2c1: function() { return handleError(function (arg0, arg1, arg2, arg3) {
509
+ let deferred0_0;
510
+ let deferred0_1;
511
+ let deferred1_0;
512
+ let deferred1_1;
513
+ try {
514
+ deferred0_0 = arg0;
515
+ deferred0_1 = arg1;
516
+ deferred1_0 = arg2;
517
+ deferred1_1 = arg3;
518
+ performance.measure(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
519
+ } finally {
520
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
521
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
522
+ }
523
+ }, arguments); },
524
+ __wbg_method_23aa7d0d6ec9a08f: function(arg0, arg1) {
525
+ const ret = arg1.method;
526
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
527
+ const len1 = WASM_VECTOR_LEN;
528
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
529
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
530
+ },
531
+ __wbg_msCrypto_bcce18ddb1ca6c2d: function(arg0) {
532
+ const ret = arg0.msCrypto;
533
+ return ret;
534
+ },
535
+ __wbg_new_0837727332ac86ba: function() { return handleError(function () {
536
+ const ret = new Headers();
537
+ return ret;
538
+ }, arguments); },
539
+ __wbg_new_0_1dcafdf5e786e876: function() {
540
+ const ret = new Date();
541
+ return ret;
542
+ },
543
+ __wbg_new_227d7c05414eb861: function() {
544
+ const ret = new Error();
545
+ return ret;
546
+ },
547
+ __wbg_new_3acd383af1655b5f: function() { return handleError(function (arg0, arg1) {
548
+ const ret = new Worker(getStringFromWasm0(arg0, arg1));
549
+ return ret;
550
+ }, arguments); },
551
+ __wbg_new_5f486cdf45a04d78: function(arg0) {
552
+ const ret = new Uint8Array(arg0);
553
+ return ret;
554
+ },
555
+ __wbg_new_ab79df5bd7c26067: function() {
556
+ const ret = new Object();
557
+ return ret;
558
+ },
559
+ __wbg_new_af04f4c3ed7fd887: function(arg0) {
560
+ const ret = new Int32Array(arg0);
561
+ return ret;
562
+ },
563
+ __wbg_new_c518c60af666645b: function() { return handleError(function () {
564
+ const ret = new AbortController();
565
+ return ret;
566
+ }, arguments); },
567
+ __wbg_new_d098e265629cd10f: function(arg0, arg1) {
568
+ try {
569
+ var state0 = {a: arg0, b: arg1};
570
+ var cb0 = (arg0, arg1) => {
571
+ const a = state0.a;
572
+ state0.a = 0;
573
+ try {
574
+ return wasm_bindgen__convert__closures_____invoke__h4e91db2f1b7350bd(a, state0.b, arg0, arg1);
575
+ } finally {
576
+ state0.a = a;
577
+ }
578
+ };
579
+ const ret = new Promise(cb0);
580
+ return ret;
581
+ } finally {
582
+ state0.a = state0.b = 0;
583
+ }
584
+ },
585
+ __wbg_new_d15cb560a6a0e5f0: function(arg0, arg1) {
586
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
587
+ return ret;
588
+ },
589
+ __wbg_new_from_slice_22da9388ac046e50: function(arg0, arg1) {
590
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
591
+ return ret;
592
+ },
593
+ __wbg_new_typed_aaaeaf29cf802876: function(arg0, arg1) {
594
+ try {
595
+ var state0 = {a: arg0, b: arg1};
596
+ var cb0 = (arg0, arg1) => {
597
+ const a = state0.a;
598
+ state0.a = 0;
599
+ try {
600
+ return wasm_bindgen__convert__closures_____invoke__h4e91db2f1b7350bd(a, state0.b, arg0, arg1);
601
+ } finally {
602
+ state0.a = a;
603
+ }
604
+ };
605
+ const ret = new Promise(cb0);
606
+ return ret;
607
+ } finally {
608
+ state0.a = state0.b = 0;
609
+ }
610
+ },
611
+ __wbg_new_with_byte_offset_and_length_b2ec5bf7b2f35743: function(arg0, arg1, arg2) {
612
+ const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
613
+ return ret;
614
+ },
615
+ __wbg_new_with_into_underlying_source_b45133df5ff75afa: function(arg0, arg1) {
616
+ const ret = new ReadableStream(IntoUnderlyingSource.__wrap(arg0), arg1);
617
+ return ret;
618
+ },
619
+ __wbg_new_with_length_825018a1616e9e55: function(arg0) {
620
+ const ret = new Uint8Array(arg0 >>> 0);
621
+ return ret;
622
+ },
623
+ __wbg_new_with_opt_readable_stream_and_init_15b79ab5fa39d080: function() { return handleError(function (arg0, arg1) {
624
+ const ret = new Response(arg0, arg1);
625
+ return ret;
626
+ }, arguments); },
627
+ __wbg_new_with_str_and_init_b4b54d1a819bc724: function() { return handleError(function (arg0, arg1, arg2) {
628
+ const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
629
+ return ret;
630
+ }, arguments); },
631
+ __wbg_next_11b99ee6237339e3: function() { return handleError(function (arg0) {
632
+ const ret = arg0.next();
633
+ return ret;
634
+ }, arguments); },
635
+ __wbg_next_e01a967809d1aa68: function(arg0) {
636
+ const ret = arg0.next;
637
+ return ret;
638
+ },
639
+ __wbg_node_8ae12470cbc10fa7: function(arg0) {
640
+ const ret = arg0.node;
641
+ return ret;
642
+ },
643
+ __wbg_now_16f0c993d5dd6c27: function() {
644
+ const ret = Date.now();
645
+ return ret;
646
+ },
647
+ __wbg_of_8fd5dd402bc67165: function(arg0, arg1, arg2) {
648
+ const ret = Array.of(arg0, arg1, arg2);
649
+ return ret;
650
+ },
651
+ __wbg_parse_e9eddd2a82c706eb: function() { return handleError(function (arg0, arg1) {
652
+ const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
653
+ return ret;
654
+ }, arguments); },
655
+ __wbg_postMessage_564f0071531c08c3: function() { return handleError(function (arg0, arg1) {
656
+ arg0.postMessage(arg1);
657
+ }, arguments); },
658
+ __wbg_postMessage_edb4c90a528e5a8c: function() { return handleError(function (arg0, arg1) {
659
+ arg0.postMessage(arg1);
660
+ }, arguments); },
661
+ __wbg_process_c9cfbc1e2919260e: function(arg0) {
662
+ const ret = arg0.process;
663
+ return ret;
664
+ },
665
+ __wbg_prototypesetcall_d62e5099504357e6: function(arg0, arg1, arg2) {
666
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
667
+ },
668
+ __wbg_queueMicrotask_0c399741342fb10f: function(arg0) {
669
+ const ret = arg0.queueMicrotask;
670
+ return ret;
671
+ },
672
+ __wbg_queueMicrotask_a082d78ce798393e: function(arg0) {
673
+ queueMicrotask(arg0);
674
+ },
675
+ __wbg_randomFillSync_143a36904a882f2a: function() { return handleError(function (arg0, arg1) {
676
+ arg0.randomFillSync(arg1);
677
+ }, arguments); },
678
+ __wbg_read_7f593a961a7f80ed: function(arg0) {
679
+ const ret = arg0.read();
680
+ return ret;
681
+ },
682
+ __wbg_releaseLock_ef7766a5da654ff8: function(arg0) {
683
+ arg0.releaseLock();
684
+ },
685
+ __wbg_require_def5a4782aa802ec: function() { return handleError(function () {
686
+ const ret = module.require;
687
+ return ret;
688
+ }, arguments); },
689
+ __wbg_resolve_ae8d83246e5bcc12: function(arg0) {
690
+ const ret = Promise.resolve(arg0);
691
+ return ret;
692
+ },
693
+ __wbg_respond_e286ee502e7cf7e4: function() { return handleError(function (arg0, arg1) {
694
+ arg0.respond(arg1 >>> 0);
695
+ }, arguments); },
696
+ __wbg_setTimeout_3f4119f26240bd79: function(arg0, arg1) {
697
+ const ret = setTimeout(arg0, arg1);
698
+ return ret;
699
+ },
700
+ __wbg_setTimeout_52b7500e10b7731c: function(arg0, arg1) {
701
+ globalThis.setTimeout(arg0, arg1);
702
+ },
703
+ __wbg_set_7eaa4f96924fd6b3: function() { return handleError(function (arg0, arg1, arg2) {
704
+ const ret = Reflect.set(arg0, arg1, arg2);
705
+ return ret;
706
+ }, arguments); },
707
+ __wbg_set_8c0b3ffcf05d61c2: function(arg0, arg1, arg2) {
708
+ arg0.set(getArrayU8FromWasm0(arg1, arg2));
709
+ },
710
+ __wbg_set_body_a3d856b097dfda04: function(arg0, arg1) {
711
+ arg0.body = arg1;
712
+ },
713
+ __wbg_set_cache_ec7e430c6056ebda: function(arg0, arg1) {
714
+ arg0.cache = __wbindgen_enum_RequestCache[arg1];
715
+ },
716
+ __wbg_set_credentials_ed63183445882c65: function(arg0, arg1) {
717
+ arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
718
+ },
719
+ __wbg_set_e09648bea3f1af1e: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
720
+ arg0.set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
721
+ }, arguments); },
722
+ __wbg_set_headers_3c8fecc693b75327: function(arg0, arg1) {
723
+ arg0.headers = arg1;
724
+ },
725
+ __wbg_set_headers_bf56980ea1a65acb: function(arg0, arg1) {
726
+ arg0.headers = arg1;
727
+ },
728
+ __wbg_set_high_water_mark_1ac059fa0566c2fc: function(arg0, arg1) {
729
+ arg0.highWaterMark = arg1;
730
+ },
731
+ __wbg_set_integrity_6e605069e31cef0a: function(arg0, arg1, arg2) {
732
+ arg0.integrity = getStringFromWasm0(arg1, arg2);
733
+ },
734
+ __wbg_set_method_8c015e8bcafd7be1: function(arg0, arg1, arg2) {
735
+ arg0.method = getStringFromWasm0(arg1, arg2);
736
+ },
737
+ __wbg_set_mode_5a87f2c809cf37c2: function(arg0, arg1) {
738
+ arg0.mode = __wbindgen_enum_RequestMode[arg1];
739
+ },
740
+ __wbg_set_onmessage_d5dc11c291025af6: function(arg0, arg1) {
741
+ arg0.onmessage = arg1;
742
+ },
743
+ __wbg_set_redirect_c7b340412376b11a: function(arg0, arg1) {
744
+ arg0.redirect = __wbindgen_enum_RequestRedirect[arg1];
745
+ },
746
+ __wbg_set_referrer_4f2f273104bee6d0: function(arg0, arg1, arg2) {
747
+ arg0.referrer = getStringFromWasm0(arg1, arg2);
748
+ },
749
+ __wbg_set_referrer_policy_3cea8b6e31a9e636: function(arg0, arg1) {
750
+ arg0.referrerPolicy = __wbindgen_enum_ReferrerPolicy[arg1];
751
+ },
752
+ __wbg_set_signal_0cebecb698f25d21: function(arg0, arg1) {
753
+ arg0.signal = arg1;
754
+ },
755
+ __wbg_set_status_b80d37d9d23276c4: function(arg0, arg1) {
756
+ arg0.status = arg1;
757
+ },
758
+ __wbg_signal_166e1da31adcac18: function(arg0) {
759
+ const ret = arg0.signal;
760
+ return ret;
761
+ },
762
+ __wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
763
+ const ret = arg1.stack;
764
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
765
+ const len1 = WASM_VECTOR_LEN;
766
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
767
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
768
+ },
769
+ __wbg_static_accessor_GLOBAL_8adb955bd33fac2f: function() {
770
+ const ret = typeof global === 'undefined' ? null : global;
771
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
772
+ },
773
+ __wbg_static_accessor_GLOBAL_THIS_ad356e0db91c7913: function() {
774
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
775
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
776
+ },
777
+ __wbg_static_accessor_SELF_f207c857566db248: function() {
778
+ const ret = typeof self === 'undefined' ? null : self;
779
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
780
+ },
781
+ __wbg_static_accessor_WINDOW_bb9f1ba69d61b386: function() {
782
+ const ret = typeof window === 'undefined' ? null : window;
783
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
784
+ },
785
+ __wbg_status_318629ab93a22955: function(arg0) {
786
+ const ret = arg0.status;
787
+ return ret;
788
+ },
789
+ __wbg_stringify_5ae93966a84901ac: function() { return handleError(function (arg0) {
790
+ const ret = JSON.stringify(arg0);
791
+ return ret;
792
+ }, arguments); },
793
+ __wbg_subarray_a068d24e39478a8a: function(arg0, arg1, arg2) {
794
+ const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
795
+ return ret;
796
+ },
797
+ __wbg_text_372f5b91442c50f9: function() { return handleError(function (arg0) {
798
+ const ret = arg0.text();
799
+ return ret;
800
+ }, arguments); },
801
+ __wbg_then_098abe61755d12f6: function(arg0, arg1) {
802
+ const ret = arg0.then(arg1);
803
+ return ret;
804
+ },
805
+ __wbg_then_1d7a5273811a5cea: function(arg0, arg1) {
806
+ const ret = arg0.then(arg1);
807
+ return ret;
808
+ },
809
+ __wbg_then_9e335f6dd892bc11: function(arg0, arg1, arg2) {
810
+ const ret = arg0.then(arg1, arg2);
811
+ return ret;
812
+ },
813
+ __wbg_toString_3272fa0dfd05dd87: function(arg0) {
814
+ const ret = arg0.toString();
815
+ return ret;
816
+ },
817
+ __wbg_url_7fefc1820fba4e0c: function(arg0, arg1) {
818
+ const ret = arg1.url;
819
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
820
+ const len1 = WASM_VECTOR_LEN;
821
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
822
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
823
+ },
824
+ __wbg_url_b6f96880b733816c: function(arg0, arg1) {
825
+ const ret = arg1.url;
826
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
827
+ const len1 = WASM_VECTOR_LEN;
828
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
829
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
830
+ },
831
+ __wbg_value_21fc78aab0322612: function(arg0) {
832
+ const ret = arg0.value;
833
+ return ret;
834
+ },
835
+ __wbg_value_a529cd2f781749fd: function(arg0) {
836
+ const ret = arg0.value;
837
+ return ret;
838
+ },
839
+ __wbg_versions_a8a74c7ca68bfe73: function(arg0) {
840
+ const ret = arg0.versions;
841
+ return ret;
842
+ },
843
+ __wbg_view_f68a712e7315f8b2: function(arg0) {
844
+ const ret = arg0.view;
845
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
846
+ },
847
+ __wbg_waitAsync_91ab9cf292b5ab15: function(arg0, arg1, arg2) {
848
+ const ret = Atomics.waitAsync(arg0, arg1 >>> 0, arg2);
849
+ return ret;
850
+ },
851
+ __wbg_waitAsync_a4399d51368b6ce4: function() {
852
+ const ret = Atomics.waitAsync;
853
+ return ret;
854
+ },
855
+ __wbindgen_cast_0000000000000001: function(arg0, arg1) {
856
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 1818, function: Function { arguments: [], shim_idx: 1819, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
857
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h608d62b8eccc8f6e, wasm_bindgen__convert__closures_____invoke__h7938576e03ec4167);
858
+ return ret;
859
+ },
860
+ __wbindgen_cast_0000000000000002: function(arg0, arg1) {
861
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 2163, function: Function { arguments: [Externref], shim_idx: 2164, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
862
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hbb5960641dfaf99a, wasm_bindgen__convert__closures_____invoke__hdfdaa0711fe9a60e);
863
+ return ret;
864
+ },
865
+ __wbindgen_cast_0000000000000003: function(arg0, arg1) {
866
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 2180, function: Function { arguments: [Externref], shim_idx: 2183, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
867
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h2925d4d1c19a6d50, wasm_bindgen__convert__closures_____invoke__h38253c4a1aa54e27);
868
+ return ret;
869
+ },
870
+ __wbindgen_cast_0000000000000004: function(arg0, arg1) {
871
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 2180, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 2181, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
872
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h2925d4d1c19a6d50, wasm_bindgen__convert__closures_____invoke__hfa390009d5ba6f84);
873
+ return ret;
874
+ },
875
+ __wbindgen_cast_0000000000000005: function(arg0) {
876
+ // Cast intrinsic for `F64 -> Externref`.
877
+ const ret = arg0;
878
+ return ret;
879
+ },
880
+ __wbindgen_cast_0000000000000006: function(arg0) {
881
+ // Cast intrinsic for `I64 -> Externref`.
882
+ const ret = arg0;
883
+ return ret;
884
+ },
885
+ __wbindgen_cast_0000000000000007: function(arg0, arg1) {
886
+ // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
887
+ const ret = getArrayU8FromWasm0(arg0, arg1);
888
+ return ret;
889
+ },
890
+ __wbindgen_cast_0000000000000008: function(arg0, arg1) {
891
+ // Cast intrinsic for `Ref(String) -> Externref`.
892
+ const ret = getStringFromWasm0(arg0, arg1);
893
+ return ret;
894
+ },
895
+ __wbindgen_cast_0000000000000009: function(arg0) {
896
+ // Cast intrinsic for `U64 -> Externref`.
897
+ const ret = BigInt.asUintN(64, arg0);
898
+ return ret;
899
+ },
900
+ __wbindgen_cast_000000000000000a: function(arg0, arg1) {
901
+ var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
902
+ wasm.__wbindgen_free(arg0, arg1 * 1, 1);
903
+ // Cast intrinsic for `Vector(U8) -> Externref`.
904
+ const ret = v0;
905
+ return ret;
906
+ },
907
+ __wbindgen_init_externref_table: function() {
908
+ const table = wasm.__wbindgen_externrefs;
909
+ const offset = table.grow(4);
910
+ table.set(0, undefined);
911
+ table.set(offset + 0, undefined);
912
+ table.set(offset + 1, null);
913
+ table.set(offset + 2, true);
914
+ table.set(offset + 3, false);
915
+ },
916
+ __wbindgen_link_fcd7cf2a23e346d3: function(arg0) {
917
+ const val = `onmessage = function (ev) {
918
+ let [ia, index, value] = ev.data;
919
+ ia = new Int32Array(ia.buffer);
920
+ let result = Atomics.wait(ia, index, value);
921
+ postMessage(result);
922
+ };
923
+ `;
924
+ const ret = typeof URL.createObjectURL === 'undefined' ? "data:application/javascript," + encodeURIComponent(val) : URL.createObjectURL(new Blob([val], { type: "text/javascript" }));
925
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
926
+ const len1 = WASM_VECTOR_LEN;
927
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
928
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
929
+ },
930
+ memory: memory || new WebAssembly.Memory({initial:30,maximum:16384,shared:true}),
931
+ };
932
+ return {
933
+ __proto__: null,
934
+ "./tng_wasm_bg.js": import0,
935
+ };
936
+ }
937
+
938
+ function wasm_bindgen__convert__closures_____invoke__h7938576e03ec4167(arg0, arg1) {
939
+ wasm.wasm_bindgen__convert__closures_____invoke__h7938576e03ec4167(arg0, arg1);
940
+ }
941
+
942
+ function wasm_bindgen__convert__closures_____invoke__hdfdaa0711fe9a60e(arg0, arg1, arg2) {
943
+ wasm.wasm_bindgen__convert__closures_____invoke__hdfdaa0711fe9a60e(arg0, arg1, arg2);
944
+ }
945
+
946
+ function wasm_bindgen__convert__closures_____invoke__hfa390009d5ba6f84(arg0, arg1, arg2) {
947
+ wasm.wasm_bindgen__convert__closures_____invoke__hfa390009d5ba6f84(arg0, arg1, arg2);
948
+ }
949
+
950
+ function wasm_bindgen__convert__closures_____invoke__h38253c4a1aa54e27(arg0, arg1, arg2) {
951
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h38253c4a1aa54e27(arg0, arg1, arg2);
952
+ if (ret[1]) {
953
+ throw takeFromExternrefTable0(ret[0]);
954
+ }
955
+ }
956
+
957
+ function wasm_bindgen__convert__closures_____invoke__h4e91db2f1b7350bd(arg0, arg1, arg2, arg3) {
958
+ wasm.wasm_bindgen__convert__closures_____invoke__h4e91db2f1b7350bd(arg0, arg1, arg2, arg3);
959
+ }
960
+
961
+
962
+ const __wbindgen_enum_ReadableStreamType = ["bytes"];
963
+
964
+
965
+ const __wbindgen_enum_ReferrerPolicy = ["", "no-referrer", "no-referrer-when-downgrade", "origin", "origin-when-cross-origin", "unsafe-url", "same-origin", "strict-origin", "strict-origin-when-cross-origin"];
966
+
967
+
968
+ const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
969
+
970
+
971
+ const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
972
+
973
+
974
+ const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
975
+
976
+
977
+ const __wbindgen_enum_RequestRedirect = ["follow", "error", "manual"];
978
+ const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')
979
+ ? { register: () => {}, unregister: () => {} }
980
+ : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr >>> 0, 1));
981
+ const IntoUnderlyingSinkFinalization = (typeof FinalizationRegistry === 'undefined')
982
+ ? { register: () => {}, unregister: () => {} }
983
+ : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsink_free(ptr >>> 0, 1));
984
+ const IntoUnderlyingSourceFinalization = (typeof FinalizationRegistry === 'undefined')
985
+ ? { register: () => {}, unregister: () => {} }
986
+ : new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsource_free(ptr >>> 0, 1));
987
+
988
+ function addToExternrefTable0(obj) {
989
+ const idx = wasm.__externref_table_alloc();
990
+ wasm.__wbindgen_externrefs.set(idx, obj);
991
+ return idx;
992
+ }
993
+
994
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
995
+ ? { register: () => {}, unregister: () => {} }
996
+ : new FinalizationRegistry(state => state.dtor(state.a, state.b));
997
+
998
+ function debugString(val) {
999
+ // primitive types
1000
+ const type = typeof val;
1001
+ if (type == 'number' || type == 'boolean' || val == null) {
1002
+ return `${val}`;
1003
+ }
1004
+ if (type == 'string') {
1005
+ return `"${val}"`;
1006
+ }
1007
+ if (type == 'symbol') {
1008
+ const description = val.description;
1009
+ if (description == null) {
1010
+ return 'Symbol';
1011
+ } else {
1012
+ return `Symbol(${description})`;
1013
+ }
1014
+ }
1015
+ if (type == 'function') {
1016
+ const name = val.name;
1017
+ if (typeof name == 'string' && name.length > 0) {
1018
+ return `Function(${name})`;
1019
+ } else {
1020
+ return 'Function';
1021
+ }
1022
+ }
1023
+ // objects
1024
+ if (Array.isArray(val)) {
1025
+ const length = val.length;
1026
+ let debug = '[';
1027
+ if (length > 0) {
1028
+ debug += debugString(val[0]);
1029
+ }
1030
+ for(let i = 1; i < length; i++) {
1031
+ debug += ', ' + debugString(val[i]);
1032
+ }
1033
+ debug += ']';
1034
+ return debug;
1035
+ }
1036
+ // Test for built-in
1037
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
1038
+ let className;
1039
+ if (builtInMatches && builtInMatches.length > 1) {
1040
+ className = builtInMatches[1];
1041
+ } else {
1042
+ // Failed to match the standard '[object ClassName]'
1043
+ return toString.call(val);
1044
+ }
1045
+ if (className == 'Object') {
1046
+ // we're a user defined class or Object
1047
+ // JSON.stringify avoids problems with cycles, and is generally much
1048
+ // easier than looping through ownProperties of `val`.
1049
+ try {
1050
+ return 'Object(' + JSON.stringify(val) + ')';
1051
+ } catch (_) {
1052
+ return 'Object';
1053
+ }
1054
+ }
1055
+ // errors
1056
+ if (val instanceof Error) {
1057
+ return `${val.name}: ${val.message}\n${val.stack}`;
1058
+ }
1059
+ // TODO we could test for more things here, like `Set`s and `Map`s.
1060
+ return className;
1061
+ }
1062
+
1063
+ function getArrayU8FromWasm0(ptr, len) {
1064
+ ptr = ptr >>> 0;
1065
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
1066
+ }
1067
+
1068
+ let cachedDataViewMemory0 = null;
1069
+ function getDataViewMemory0() {
1070
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer !== wasm.memory.buffer) {
1071
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
1072
+ }
1073
+ return cachedDataViewMemory0;
1074
+ }
1075
+
1076
+ function getStringFromWasm0(ptr, len) {
1077
+ ptr = ptr >>> 0;
1078
+ return decodeText(ptr, len);
1079
+ }
1080
+
1081
+ let cachedUint8ArrayMemory0 = null;
1082
+ function getUint8ArrayMemory0() {
1083
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.buffer !== wasm.memory.buffer) {
1084
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
1085
+ }
1086
+ return cachedUint8ArrayMemory0;
1087
+ }
1088
+
1089
+ function handleError(f, args) {
1090
+ try {
1091
+ return f.apply(this, args);
1092
+ } catch (e) {
1093
+ const idx = addToExternrefTable0(e);
1094
+ wasm.__wbindgen_exn_store(idx);
1095
+ }
1096
+ }
1097
+
1098
+ function isLikeNone(x) {
1099
+ return x === undefined || x === null;
1100
+ }
1101
+
1102
+ function makeMutClosure(arg0, arg1, dtor, f) {
1103
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
1104
+ const real = (...args) => {
1105
+
1106
+ // First up with a closure we increment the internal reference
1107
+ // count. This ensures that the Rust closure environment won't
1108
+ // be deallocated while we're invoking it.
1109
+ state.cnt++;
1110
+ const a = state.a;
1111
+ state.a = 0;
1112
+ try {
1113
+ return f(a, state.b, ...args);
1114
+ } finally {
1115
+ state.a = a;
1116
+ real._wbg_cb_unref();
1117
+ }
1118
+ };
1119
+ real._wbg_cb_unref = () => {
1120
+ if (--state.cnt === 0) {
1121
+ state.dtor(state.a, state.b);
1122
+ state.a = 0;
1123
+ CLOSURE_DTORS.unregister(state);
1124
+ }
1125
+ };
1126
+ CLOSURE_DTORS.register(real, state, state);
1127
+ return real;
1128
+ }
1129
+
1130
+ function passStringToWasm0(arg, malloc, realloc) {
1131
+ if (realloc === undefined) {
1132
+ const buf = cachedTextEncoder.encode(arg);
1133
+ const ptr = malloc(buf.length, 1) >>> 0;
1134
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
1135
+ WASM_VECTOR_LEN = buf.length;
1136
+ return ptr;
1137
+ }
1138
+
1139
+ let len = arg.length;
1140
+ let ptr = malloc(len, 1) >>> 0;
1141
+
1142
+ const mem = getUint8ArrayMemory0();
1143
+
1144
+ let offset = 0;
1145
+
1146
+ for (; offset < len; offset++) {
1147
+ const code = arg.charCodeAt(offset);
1148
+ if (code > 0x7F) break;
1149
+ mem[ptr + offset] = code;
1150
+ }
1151
+ if (offset !== len) {
1152
+ if (offset !== 0) {
1153
+ arg = arg.slice(offset);
1154
+ }
1155
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
1156
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
1157
+ const ret = cachedTextEncoder.encodeInto(arg, view);
1158
+
1159
+ offset += ret.written;
1160
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
1161
+ }
1162
+
1163
+ WASM_VECTOR_LEN = offset;
1164
+ return ptr;
1165
+ }
1166
+
1167
+ function takeFromExternrefTable0(idx) {
1168
+ const value = wasm.__wbindgen_externrefs.get(idx);
1169
+ wasm.__externref_table_dealloc(idx);
1170
+ return value;
1171
+ }
1172
+
1173
+ let cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : undefined);
1174
+ if (cachedTextDecoder) cachedTextDecoder.decode();
1175
+
1176
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
1177
+ let numBytesDecoded = 0;
1178
+ function decodeText(ptr, len) {
1179
+ numBytesDecoded += len;
1180
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
1181
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1182
+ cachedTextDecoder.decode();
1183
+ numBytesDecoded = len;
1184
+ }
1185
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().slice(ptr, ptr + len));
1186
+ }
1187
+
1188
+ const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder() : undefined);
1189
+
1190
+ if (cachedTextEncoder) {
1191
+ cachedTextEncoder.encodeInto = function (arg, view) {
1192
+ const buf = cachedTextEncoder.encode(arg);
1193
+ view.set(buf);
1194
+ return {
1195
+ read: arg.length,
1196
+ written: buf.length
1197
+ };
1198
+ };
1199
+ }
1200
+
1201
+ let WASM_VECTOR_LEN = 0;
1202
+
1203
+ let wasmModule, wasm;
1204
+ function __wbg_finalize_init(instance, module, thread_stack_size) {
1205
+ wasm = instance.exports;
1206
+ wasmModule = module;
1207
+ cachedDataViewMemory0 = null;
1208
+ cachedUint8ArrayMemory0 = null;
1209
+ if (typeof thread_stack_size !== 'undefined' && (typeof thread_stack_size !== 'number' || thread_stack_size === 0 || thread_stack_size % 65536 !== 0)) {
1210
+ throw new Error('invalid stack size');
1211
+ }
1212
+
1213
+ wasm.__wbindgen_start(thread_stack_size);
1214
+ return wasm;
1215
+ }
1216
+
1217
+ async function __wbg_load(module, imports) {
1218
+ if (typeof Response === 'function' && module instanceof Response) {
1219
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
1220
+ try {
1221
+ return await WebAssembly.instantiateStreaming(module, imports);
1222
+ } catch (e) {
1223
+ const validResponse = module.ok && expectedResponseType(module.type);
1224
+
1225
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
1226
+ 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);
1227
+
1228
+ } else { throw e; }
1229
+ }
1230
+ }
1231
+
1232
+ const bytes = await module.arrayBuffer();
1233
+ return await WebAssembly.instantiate(bytes, imports);
1234
+ } else {
1235
+ const instance = await WebAssembly.instantiate(module, imports);
1236
+
1237
+ if (instance instanceof WebAssembly.Instance) {
1238
+ return { instance, module };
1239
+ } else {
1240
+ return instance;
1241
+ }
1242
+ }
1243
+
1244
+ function expectedResponseType(type) {
1245
+ switch (type) {
1246
+ case 'basic': case 'cors': case 'default': return true;
1247
+ }
1248
+ return false;
1249
+ }
1250
+ }
1251
+
1252
+ function initSync(module, memory) {
1253
+ if (wasm !== undefined) return wasm;
1254
+
1255
+ let thread_stack_size
1256
+ if (module !== undefined) {
1257
+ if (Object.getPrototypeOf(module) === Object.prototype) {
1258
+ ({module, memory, thread_stack_size} = module)
1259
+ } else {
1260
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
1261
+ }
1262
+ }
1263
+
1264
+ const imports = __wbg_get_imports(memory);
1265
+ if (!(module instanceof WebAssembly.Module)) {
1266
+ module = new WebAssembly.Module(module);
1267
+ }
1268
+ const instance = new WebAssembly.Instance(module, imports);
1269
+ return __wbg_finalize_init(instance, module, thread_stack_size);
1270
+ }
1271
+
1272
+ async function __wbg_init(module_or_path, memory) {
1273
+ if (wasm !== undefined) return wasm;
1274
+
1275
+ let thread_stack_size
1276
+ if (module_or_path !== undefined) {
1277
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
1278
+ ({module_or_path, memory, thread_stack_size} = module_or_path)
1279
+ } else {
1280
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
1281
+ }
1282
+ }
1283
+
1284
+ if (module_or_path === undefined) {
1285
+ module_or_path = new URL('tng_wasm_bg.wasm', import.meta.url);
1286
+ }
1287
+ const imports = __wbg_get_imports(memory);
1288
+
1289
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
1290
+ module_or_path = fetch(module_or_path);
1291
+ }
1292
+
1293
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
1294
+
1295
+ return __wbg_finalize_init(instance, module, thread_stack_size);
1296
+ }
1297
+
1298
+ export { initSync, __wbg_init as default };