ferroreport 0.0.0-stage → 0.2.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.
@@ -0,0 +1,601 @@
1
+ /* @ts-self-types="./ferroreport.d.ts" */
2
+
3
+ /**
4
+ * Parses a template: `{ name, parameters, fields, warnings }`, where `warnings` lists what
5
+ * this engine does not support in it.
6
+ * @param {string} template
7
+ * @returns {any}
8
+ */
9
+ export function inspect(template) {
10
+ const ptr0 = passStringToWasm0(template, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
11
+ const len0 = WASM_VECTOR_LEN;
12
+ const ret = wasm.inspect(ptr0, len0);
13
+ if (ret[2]) {
14
+ throw takeFromExternrefTable0(ret[1]);
15
+ }
16
+ return takeFromExternrefTable0(ret[0]);
17
+ }
18
+
19
+ /**
20
+ * Renders a JRXML template to PDF.
21
+ *
22
+ * - `template`: the JRXML source.
23
+ * - `data`: rows (an array of objects) or JSON text.
24
+ * - `params`: report parameters (an object) or JSON text.
25
+ * - `options`: `{ locale?: string, now?: string | Date, resources?: { [path]: Uint8Array | string } }`.
26
+ * @param {string} template
27
+ * @param {any} data
28
+ * @param {any} params
29
+ * @param {any} options
30
+ * @returns {Uint8Array}
31
+ */
32
+ export function render(template, data, params, options) {
33
+ const ptr0 = passStringToWasm0(template, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
34
+ const len0 = WASM_VECTOR_LEN;
35
+ const ret = wasm.render(ptr0, len0, data, params, options);
36
+ if (ret[3]) {
37
+ throw takeFromExternrefTable0(ret[2]);
38
+ }
39
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
40
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
41
+ return v2;
42
+ }
43
+
44
+ /**
45
+ * Version of the engine.
46
+ * @returns {string}
47
+ */
48
+ export function version() {
49
+ let deferred1_0;
50
+ let deferred1_1;
51
+ try {
52
+ const ret = wasm.version();
53
+ deferred1_0 = ret[0];
54
+ deferred1_1 = ret[1];
55
+ return getStringFromWasm0(ret[0], ret[1]);
56
+ } finally {
57
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
58
+ }
59
+ }
60
+ function __wbg_get_imports() {
61
+ const import0 = {
62
+ __proto__: null,
63
+ __wbg_Error_208446807d0d1e30: function(arg0, arg1) {
64
+ const ret = Error(getStringFromWasm0(arg0, arg1));
65
+ return ret;
66
+ },
67
+ __wbg_String_8564e559799eccda: function(arg0, arg1) {
68
+ const ret = String(arg1);
69
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
70
+ const len1 = WASM_VECTOR_LEN;
71
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
72
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
73
+ },
74
+ __wbg___wbindgen_bigint_get_as_i64_11da4b52cd0aedef: function(arg0, arg1) {
75
+ const v = arg1;
76
+ const ret = typeof(v) === 'bigint' ? v : undefined;
77
+ getDataViewMemory0().setBigInt64((arg0 >>> 0) + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
78
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, !isLikeNone(ret), true);
79
+ },
80
+ __wbg___wbindgen_boolean_get_4f1baf9a00be3c74: function(arg0) {
81
+ const v = arg0;
82
+ const ret = typeof(v) === 'boolean' ? v : undefined;
83
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
84
+ },
85
+ __wbg___wbindgen_debug_string_f249a2a76caa9a55: function(arg0, arg1) {
86
+ const ret = debugString(arg1);
87
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
88
+ const len1 = WASM_VECTOR_LEN;
89
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
90
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
91
+ },
92
+ __wbg___wbindgen_in_3f58a9d3b3a7eed2: function(arg0, arg1) {
93
+ const ret = arg0 in arg1;
94
+ return ret;
95
+ },
96
+ __wbg___wbindgen_is_bigint_5fa10641e039d3ef: function(arg0) {
97
+ const ret = typeof(arg0) === 'bigint';
98
+ return ret;
99
+ },
100
+ __wbg___wbindgen_is_function_741ff2bb612836f5: function(arg0) {
101
+ const ret = typeof(arg0) === 'function';
102
+ return ret;
103
+ },
104
+ __wbg___wbindgen_is_null_c22311b1cc228e3a: function(arg0) {
105
+ const ret = arg0 === null;
106
+ return ret;
107
+ },
108
+ __wbg___wbindgen_is_object_8b968c3ab8e96595: function(arg0) {
109
+ const val = arg0;
110
+ const ret = typeof(val) === 'object' && val !== null;
111
+ return ret;
112
+ },
113
+ __wbg___wbindgen_is_string_fc456fee5d3317de: function(arg0) {
114
+ const ret = typeof(arg0) === 'string';
115
+ return ret;
116
+ },
117
+ __wbg___wbindgen_is_undefined_be5b34249ff1fc15: function(arg0) {
118
+ const ret = arg0 === undefined;
119
+ return ret;
120
+ },
121
+ __wbg___wbindgen_jsval_eq_38d7bfbe4cc84039: function(arg0, arg1) {
122
+ const ret = arg0 === arg1;
123
+ return ret;
124
+ },
125
+ __wbg___wbindgen_jsval_loose_eq_b2f214e2e4b30e36: function(arg0, arg1) {
126
+ const ret = arg0 == arg1;
127
+ return ret;
128
+ },
129
+ __wbg___wbindgen_number_get_934b640d0889af78: function(arg0, arg1) {
130
+ const obj = arg1;
131
+ const ret = typeof(obj) === 'number' ? obj : undefined;
132
+ getDataViewMemory0().setFloat64((arg0 >>> 0) + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
133
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, !isLikeNone(ret), true);
134
+ },
135
+ __wbg___wbindgen_string_get_7ce8eee7fd327545: function(arg0, arg1) {
136
+ const obj = arg1;
137
+ const ret = typeof(obj) === 'string' ? obj : undefined;
138
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
139
+ var len1 = WASM_VECTOR_LEN;
140
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
141
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
142
+ },
143
+ __wbg___wbindgen_throw_4c88d8bf264fd984: function(arg0, arg1) {
144
+ throw new Error(getStringFromWasm0(arg0, arg1));
145
+ },
146
+ __wbg_call_40b008ba32f73991: function() { return handleError(function (arg0, arg1) {
147
+ const ret = arg0.call(arg1);
148
+ return ret;
149
+ }, arguments); },
150
+ __wbg_done_57e08d0be6e30c02: function(arg0) {
151
+ const ret = arg0.done;
152
+ return ret;
153
+ },
154
+ __wbg_entries_7bb1459bd9b5c2b9: function(arg0) {
155
+ const ret = Object.entries(arg0);
156
+ return ret;
157
+ },
158
+ __wbg_from_eac91875c8a5ffa4: function(arg0) {
159
+ const ret = Array.from(arg0);
160
+ return ret;
161
+ },
162
+ __wbg_get_2080c49015e35254: function() { return handleError(function (arg0, arg1) {
163
+ const ret = Reflect.get(arg0, arg1);
164
+ return ret;
165
+ }, arguments); },
166
+ __wbg_get_635eea311fa1a291: function() { return handleError(function (arg0, arg1) {
167
+ const ret = Reflect.get(arg0, arg1);
168
+ return ret;
169
+ }, arguments); },
170
+ __wbg_get_d7176cfb76d71114: function(arg0, arg1) {
171
+ const ret = arg0[arg1 >>> 0];
172
+ return ret;
173
+ },
174
+ __wbg_get_unchecked_e6325ad374eff861: function(arg0, arg1) {
175
+ const ret = arg0[arg1 >>> 0];
176
+ return ret;
177
+ },
178
+ __wbg_instanceof_ArrayBuffer_12cdaa4161423e6b: function(arg0) {
179
+ let result;
180
+ try {
181
+ result = arg0 instanceof ArrayBuffer;
182
+ } catch (_) {
183
+ result = false;
184
+ }
185
+ const ret = result;
186
+ return ret;
187
+ },
188
+ __wbg_instanceof_Date_99b6a345bf39e8f4: function(arg0) {
189
+ let result;
190
+ try {
191
+ result = arg0 instanceof Date;
192
+ } catch (_) {
193
+ result = false;
194
+ }
195
+ const ret = result;
196
+ return ret;
197
+ },
198
+ __wbg_instanceof_Map_0b4fc8b62e73f163: function(arg0) {
199
+ let result;
200
+ try {
201
+ result = arg0 instanceof Map;
202
+ } catch (_) {
203
+ result = false;
204
+ }
205
+ const ret = result;
206
+ return ret;
207
+ },
208
+ __wbg_instanceof_Uint8Array_d7aeb0dcb3108fea: function(arg0) {
209
+ let result;
210
+ try {
211
+ result = arg0 instanceof Uint8Array;
212
+ } catch (_) {
213
+ result = false;
214
+ }
215
+ const ret = result;
216
+ return ret;
217
+ },
218
+ __wbg_isArray_bcf1376d0d732d08: function(arg0) {
219
+ const ret = Array.isArray(arg0);
220
+ return ret;
221
+ },
222
+ __wbg_isSafeInteger_1a35ba4d31e71d38: function(arg0) {
223
+ const ret = Number.isSafeInteger(arg0);
224
+ return ret;
225
+ },
226
+ __wbg_iterator_e4c5e8f68ada7b58: function() {
227
+ const ret = Symbol.iterator;
228
+ return ret;
229
+ },
230
+ __wbg_length_186163212ffe79c3: function(arg0) {
231
+ const ret = arg0.length;
232
+ return ret;
233
+ },
234
+ __wbg_length_b03a0fabb109b1e9: function(arg0) {
235
+ const ret = arg0.length;
236
+ return ret;
237
+ },
238
+ __wbg_new_0_36d738a0c8cfac43: function() {
239
+ const ret = new Date();
240
+ return ret;
241
+ },
242
+ __wbg_new_13de428334042d26: function(arg0) {
243
+ const ret = new Uint8Array(arg0);
244
+ return ret;
245
+ },
246
+ __wbg_new_37eb45aaf5eeb820: function() {
247
+ const ret = new Array();
248
+ return ret;
249
+ },
250
+ __wbg_new_7075786089b89c5e: function() {
251
+ const ret = new Map();
252
+ return ret;
253
+ },
254
+ __wbg_new_cd4348290afae586: function() {
255
+ const ret = new Object();
256
+ return ret;
257
+ },
258
+ __wbg_next_178c1651c11432b3: function(arg0) {
259
+ const ret = arg0.next;
260
+ return ret;
261
+ },
262
+ __wbg_next_af5ac6a08bb0a717: function() { return handleError(function (arg0) {
263
+ const ret = arg0.next();
264
+ return ret;
265
+ }, arguments); },
266
+ __wbg_prototypesetcall_13162965d1fe7aa3: function(arg0, arg1, arg2) {
267
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
268
+ },
269
+ __wbg_set_8282f7e0d2d01336: function(arg0, arg1, arg2) {
270
+ const ret = arg0.set(arg1, arg2);
271
+ return ret;
272
+ },
273
+ __wbg_set_d2d33b52458e984a: function(arg0, arg1, arg2) {
274
+ arg0[arg1 >>> 0] = arg2;
275
+ },
276
+ __wbg_set_e4b9a833d288759a: function(arg0, arg1, arg2) {
277
+ arg0[arg1] = arg2;
278
+ },
279
+ __wbg_toISOString_51ebc75332aba76a: function(arg0) {
280
+ const ret = arg0.toISOString();
281
+ return ret;
282
+ },
283
+ __wbg_value_e0f328965e184931: function(arg0) {
284
+ const ret = arg0.value;
285
+ return ret;
286
+ },
287
+ __wbindgen_generic_0000000000000001: function(arg0) {
288
+ // Cast intrinsic for `F64 -> Externref`.
289
+ const ret = arg0;
290
+ return ret;
291
+ },
292
+ __wbindgen_generic_0000000000000002: function(arg0) {
293
+ // Cast intrinsic for `I64 -> Externref`.
294
+ const ret = arg0;
295
+ return ret;
296
+ },
297
+ __wbindgen_generic_0000000000000003: function(arg0, arg1) {
298
+ // Cast intrinsic for `Ref(String) -> Externref`.
299
+ const ret = getStringFromWasm0(arg0, arg1);
300
+ return ret;
301
+ },
302
+ __wbindgen_generic_0000000000000004: function(arg0) {
303
+ // Cast intrinsic for `U64 -> Externref`.
304
+ const ret = BigInt.asUintN(64, arg0);
305
+ return ret;
306
+ },
307
+ __wbindgen_init_externref_table: function() {
308
+ const table = wasm.__wbindgen_externrefs;
309
+ table.set(0, undefined);
310
+ table.set(1024, undefined);
311
+ table.set(1025, null);
312
+ table.set(1026, true);
313
+ table.set(1027, false);
314
+ },
315
+ };
316
+ return {
317
+ __proto__: null,
318
+ "./ferroreport_bg.js": import0,
319
+ };
320
+ }
321
+
322
+ function addToExternrefTable0(obj) {
323
+ const idx = wasm.__externref_table_alloc();
324
+ wasm.__wbindgen_externrefs.set(idx, obj);
325
+ return idx;
326
+ }
327
+
328
+ function debugString(val) {
329
+ switch (typeof val) {
330
+ // primitive types
331
+ case 'number':
332
+ case 'boolean':
333
+ case 'undefined':
334
+ return `${val}`;
335
+ case 'string':
336
+ return JSON.stringify(val);
337
+ case 'bigint':
338
+ return `${val}n`;
339
+ case 'symbol':
340
+ return val.description !== undefined
341
+ ? `Symbol(${val.description})`
342
+ : 'Symbol';
343
+ case 'function':
344
+ return typeof val.name === 'string' && val.name !== ''
345
+ ? `Function(${val.name})`
346
+ : 'Function';
347
+ case 'object': {
348
+ if (val === null) {
349
+ return 'null';
350
+ }
351
+ // objects
352
+ if (Array.isArray(val)) {
353
+ return '[' + Array.from(val, debugString).join(', ') + ']';
354
+ }
355
+ // errors
356
+ if (val instanceof Error) {
357
+ return `${val.name}: ${val.message}\n${val.stack}`;
358
+ }
359
+
360
+ const toStringOutput = toString.call(val);
361
+ // Test for built-in
362
+ const className = /\[object ([^\]]+)\]/.exec(toStringOutput)?.[1];
363
+
364
+ // Failed to match the standard '[object ClassName]'
365
+ if (className === undefined) {
366
+ return toStringOutput;
367
+ }
368
+ if (className === 'Object') {
369
+ // we're a user defined class or Object
370
+ // JSON.stringify avoids problems with cycles, and is generally much
371
+ // easier than looping through ownProperties of `val`.
372
+ try {
373
+ return 'Object(' + JSON.stringify(val) + ')';
374
+ } catch (_) {
375
+ return 'Object';
376
+ }
377
+ }
378
+ // TODO we could test for more things here, like `Set`s and `Map`s.
379
+ return className;
380
+ }
381
+ // Per MDN: 'This list of values is exhaustive.'
382
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof#description
383
+ }
384
+ }
385
+
386
+ function getArrayU8FromWasm0(ptr, len) {
387
+ ptr = ptr >>> 0;
388
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
389
+ }
390
+
391
+ let cachedDataViewMemory0 = null;
392
+ function getDataViewMemory0() {
393
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
394
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
395
+ }
396
+ return cachedDataViewMemory0;
397
+ }
398
+
399
+ function getStringFromWasm0(ptr, len) {
400
+ ptr = ptr >>> 0;
401
+ return decodeText(getUint8ArrayMemory0().subarray(ptr, ptr + len));
402
+ }
403
+
404
+ let cachedUint8ArrayMemory0 = null;
405
+ function getUint8ArrayMemory0() {
406
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
407
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
408
+ }
409
+ return cachedUint8ArrayMemory0;
410
+ }
411
+
412
+ function handleError(f, args) {
413
+ try {
414
+ return f.apply(this, args);
415
+ } catch (e) {
416
+ const idx = addToExternrefTable0(e);
417
+ wasm.__wbindgen_exn_store(idx);
418
+ }
419
+ }
420
+
421
+ function isLikeNone(x) {
422
+ return x === undefined || x === null;
423
+ }
424
+
425
+ function passStringToWasm0(arg, malloc, realloc) {
426
+ if (realloc === undefined) {
427
+ const buf = cachedTextEncoder.encode(arg);
428
+ const ptr = malloc(buf.length, 1) >>> 0;
429
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
430
+ WASM_VECTOR_LEN = buf.length;
431
+ return ptr;
432
+ }
433
+
434
+ let len = arg.length;
435
+ let ptr = malloc(len, 1) >>> 0;
436
+
437
+ const mem = getUint8ArrayMemory0();
438
+
439
+ let offset = 0;
440
+
441
+ for (; offset < len; offset++) {
442
+ const code = arg.charCodeAt(offset);
443
+ if (code > 0x7F) break;
444
+ mem[ptr + offset] = code;
445
+ }
446
+ if (offset !== len) {
447
+ if (offset !== 0) {
448
+ arg = arg.slice(offset);
449
+ }
450
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
451
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
452
+ const ret = cachedTextEncoder.encodeInto(arg, view);
453
+
454
+ offset += ret.written;
455
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
456
+ }
457
+
458
+ WASM_VECTOR_LEN = offset;
459
+ return ptr;
460
+ }
461
+
462
+ function takeFromExternrefTable0(idx) {
463
+ const value = wasm.__wbindgen_externrefs.get(idx);
464
+ wasm.__externref_table_dealloc(idx);
465
+ return value;
466
+ }
467
+
468
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true });
469
+ cachedTextDecoder.decode();
470
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
471
+ let numBytesDecoded = 0;
472
+ function decodeText(bytes) {
473
+ numBytesDecoded += bytes.length;
474
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
475
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true });
476
+ cachedTextDecoder.decode();
477
+ numBytesDecoded = bytes.length;
478
+ }
479
+ return cachedTextDecoder.decode(bytes);
480
+ }
481
+
482
+ const cachedTextEncoder = new TextEncoder();
483
+
484
+ if (!('encodeInto' in cachedTextEncoder)) {
485
+ cachedTextEncoder.encodeInto = function (arg, view) {
486
+ const buf = cachedTextEncoder.encode(arg);
487
+ view.set(buf);
488
+ return {
489
+ read: arg.length,
490
+ written: buf.length
491
+ };
492
+ };
493
+ }
494
+
495
+ let WASM_VECTOR_LEN = 0;
496
+
497
+ let wasmModule, wasmInstance, wasm;
498
+ function __wbg_finalize_init(instance, module) {
499
+ wasmInstance = instance;
500
+ wasm = instance.exports;
501
+ wasmModule = module;
502
+ cachedDataViewMemory0 = null;
503
+ cachedUint8ArrayMemory0 = null;
504
+ wasm.__wbindgen_start();
505
+ return wasm;
506
+ }
507
+
508
+ async function __wbg_load(module, imports) {
509
+ if (typeof Response === 'function' && module instanceof Response) {
510
+ if (!module.ok) {
511
+ throw new Error(`failed to fetch Wasm: ${module.status} ${module.statusText} fetching '${module.url}'`);
512
+ }
513
+
514
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
515
+ try {
516
+ return await WebAssembly.instantiateStreaming(module, imports);
517
+ } catch (e) {
518
+ const validResponse = expectedResponseType(module.type);
519
+
520
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
521
+ 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);
522
+
523
+ } else { throw e; }
524
+ }
525
+ }
526
+
527
+ const bytes = await module.arrayBuffer();
528
+ return await WebAssembly.instantiate(bytes, imports);
529
+ } else {
530
+ const instance = await WebAssembly.instantiate(module, imports);
531
+
532
+ if (instance instanceof WebAssembly.Instance) {
533
+ return { instance, module };
534
+ } else {
535
+ return instance;
536
+ }
537
+ }
538
+
539
+ function expectedResponseType(type) {
540
+ switch (type) {
541
+ case 'basic': case 'cors': case 'default': return true;
542
+ }
543
+ return false;
544
+ }
545
+ }
546
+
547
+ function initSync(module) {
548
+ if (wasm !== undefined) return wasm;
549
+
550
+
551
+ if (module !== undefined) {
552
+ if (Object.getPrototypeOf(module) === Object.prototype) {
553
+ ({module} = module)
554
+ } else {
555
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
556
+ }
557
+ }
558
+
559
+ const imports = __wbg_get_imports();
560
+ if (!(module instanceof WebAssembly.Module)) {
561
+ module = new WebAssembly.Module(module);
562
+ }
563
+ const instance = new WebAssembly.Instance(module, imports);
564
+ return __wbg_finalize_init(instance, module);
565
+ }
566
+
567
+ let __wbg_init_promise;
568
+ async function __wbg_init(module_or_path) {
569
+ if (wasm !== undefined) return wasm;
570
+ if (__wbg_init_promise === undefined) {
571
+ __wbg_init_promise = __wbg_init_once(module_or_path);
572
+ __wbg_init_promise.catch(() => { __wbg_init_promise = undefined; });
573
+ }
574
+ return __wbg_init_promise;
575
+ }
576
+
577
+ async function __wbg_init_once(module_or_path) {
578
+
579
+ if (module_or_path !== undefined) {
580
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
581
+ ({module_or_path} = module_or_path)
582
+ } else {
583
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
584
+ }
585
+ }
586
+
587
+ if (module_or_path === undefined) {
588
+ module_or_path = new URL('ferroreport_bg.wasm', import.meta.url);
589
+ }
590
+ const imports = __wbg_get_imports();
591
+
592
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
593
+ module_or_path = fetch(module_or_path);
594
+ }
595
+
596
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
597
+
598
+ return __wbg_finalize_init(instance, module);
599
+ }
600
+
601
+ export { initSync, __wbg_init as default };
Binary file
@@ -0,0 +1,14 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export const memory: WebAssembly.Memory;
4
+ export const inspect: (a: number, b: number) => [number, number, number];
5
+ export const render: (a: number, b: number, c: any, d: any, e: any) => [number, number, number, number];
6
+ export const version: () => [number, number];
7
+ export const __wbindgen_malloc: (a: number, b: number) => number;
8
+ export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
9
+ export const __wbindgen_free: (a: number, b: number, c: number) => void;
10
+ export const __wbindgen_exn_store: (a: number) => void;
11
+ export const __externref_table_alloc: () => number;
12
+ export const __wbindgen_externrefs: WebAssembly.Table;
13
+ export const __externref_table_dealloc: (a: number) => void;
14
+ export const __wbindgen_start: () => void;