@iyulab/u-doe 0.6.0 → 0.6.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/README.md CHANGED
@@ -242,6 +242,19 @@ Compute Derringer-Suich desirability for multiple responses.
242
242
 
243
243
  Compute statistical power of a 2^(k-p) factorial design. Returns power in [0, 1].
244
244
 
245
+ ## npm (WebAssembly)
246
+
247
+ ```bash
248
+ npm install @iyulab/u-doe
249
+ ```
250
+
251
+ The package resolves per environment via a conditional `exports` map:
252
+
253
+ | Environment | Entry |
254
+ |---|---|
255
+ | Bundlers (webpack, Vite, …) | ESM + WebAssembly ESM-integration (`default` condition) |
256
+ | Node.js — `require()`, ESM `import`, CJS TS runners (`tsx`, `ts-node`) | CJS glue loading the wasm from the filesystem (`node` condition) — no loader hooks or flags |
257
+
245
258
  ## Related
246
259
 
247
260
  - [`u-analytics`](https://crates.io/crates/u-analytics) — SPC, process capability, statistical analysis
package/node/u_doe.cjs ADDED
@@ -0,0 +1,813 @@
1
+ /* @ts-self-types="./u_doe.d.cts" */
2
+
3
+ /**
4
+ * Generate a Box-Behnken Design (BBD).
5
+ *
6
+ * Supported: k = 3, 4, or 5.
7
+ *
8
+ * Returns `{ data: [[f64]], factor_names: [str], run_count: usize, factor_count: usize }`.
9
+ *
10
+ * # Errors
11
+ * Returns an error string if `k` is not 3, 4, or 5, or `n_center == 0`.
12
+ * @param {number} k
13
+ * @param {number} n_center
14
+ * @returns {any}
15
+ */
16
+ function box_behnken(k, n_center) {
17
+ const ret = wasm.box_behnken(k, n_center);
18
+ if (ret[2]) {
19
+ throw takeFromExternrefTable0(ret[1]);
20
+ }
21
+ return takeFromExternrefTable0(ret[0]);
22
+ }
23
+ exports.box_behnken = box_behnken;
24
+
25
+ /**
26
+ * Generate a Central Composite Design (CCD).
27
+ *
28
+ * `design_type`: `"FaceCentered"` | `"Rotatable"` | `"Inscribed"`
29
+ *
30
+ * `n_center`: number of center point replicates (≥ 1, default 3 if 0 is passed is rejected).
31
+ *
32
+ * Returns `{ data: [[f64]], factor_names: [str], run_count: usize, factor_count: usize }`.
33
+ *
34
+ * # Errors
35
+ * Returns an error string if `k` is out of range (2..=6), `n_center == 0`,
36
+ * or `design_type` is unrecognised.
37
+ * @param {number} k
38
+ * @param {string} design_type
39
+ * @param {number} n_center
40
+ * @returns {any}
41
+ */
42
+ function ccd(k, design_type, n_center) {
43
+ const ptr0 = passStringToWasm0(design_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
44
+ const len0 = WASM_VECTOR_LEN;
45
+ const ret = wasm.ccd(k, ptr0, len0, n_center);
46
+ if (ret[2]) {
47
+ throw takeFromExternrefTable0(ret[1]);
48
+ }
49
+ return takeFromExternrefTable0(ret[0]);
50
+ }
51
+ exports.ccd = ccd;
52
+
53
+ /**
54
+ * Generate a Definitive Screening Design (DSD).
55
+ *
56
+ * Returns `{ data: [[f64]], factor_names: [str], run_count: usize, factor_count: usize }`.
57
+ *
58
+ * # Errors
59
+ * Returns an error string if `k` is out of the supported range.
60
+ * @param {number} k
61
+ * @returns {any}
62
+ */
63
+ function definitive_screening(k) {
64
+ const ret = wasm.definitive_screening(k);
65
+ if (ret[2]) {
66
+ throw takeFromExternrefTable0(ret[1]);
67
+ }
68
+ return takeFromExternrefTable0(ret[0]);
69
+ }
70
+ exports.definitive_screening = definitive_screening;
71
+
72
+ /**
73
+ * Compute Derringer-Suich desirability for multiple responses.
74
+ *
75
+ * `specs`: native array of response specification objects, each:
76
+ * `{ goal: "Maximize"|"Minimize"|"Target", lower, target, upper, s1, s2 }`
77
+ * `responses`: flat array of observed response values (one per spec).
78
+ *
79
+ * Returns `{ individual: [f64], overall: f64 }`.
80
+ *
81
+ * # Errors
82
+ * Returns an error string if `specs` has the wrong shape (native JS values,
83
+ * not JSON strings), specs/responses length mismatch, or goal string is
84
+ * unrecognised.
85
+ * @param {any} specs
86
+ * @param {Float64Array} responses
87
+ * @returns {any}
88
+ */
89
+ function desirability(specs, responses) {
90
+ const ptr0 = passArrayF64ToWasm0(responses, wasm.__wbindgen_malloc);
91
+ const len0 = WASM_VECTOR_LEN;
92
+ const ret = wasm.desirability(specs, ptr0, len0);
93
+ if (ret[2]) {
94
+ throw takeFromExternrefTable0(ret[1]);
95
+ }
96
+ return takeFromExternrefTable0(ret[0]);
97
+ }
98
+ exports.desirability = desirability;
99
+
100
+ /**
101
+ * Perform DOE ANOVA.
102
+ *
103
+ * `design`: native array-of-arrays `[[f64]]` — the coded design matrix (rows = runs).
104
+ * `responses`: flat array of response values, one per run.
105
+ * `factor_names`: native array of factor name strings used as column labels.
106
+ * `effect_names`: native array of effect names to include (e.g. `["A","B","A:B"]`).
107
+ *
108
+ * Returns an ANOVA result object with `effects`, `residual_ss`, `residual_df`,
109
+ * `total_ss`, `r_squared`, `r_squared_adj`.
110
+ *
111
+ * # Errors
112
+ * Returns an error string if dimensions do not match or an argument has the
113
+ * wrong shape (arguments are native JS values, not JSON strings).
114
+ * @param {any} design
115
+ * @param {Float64Array} responses
116
+ * @param {any} factor_names
117
+ * @param {any} effect_names
118
+ * @returns {any}
119
+ */
120
+ function doe_anova(design, responses, factor_names, effect_names) {
121
+ const ptr0 = passArrayF64ToWasm0(responses, wasm.__wbindgen_malloc);
122
+ const len0 = WASM_VECTOR_LEN;
123
+ const ret = wasm.doe_anova(design, ptr0, len0, factor_names, effect_names);
124
+ if (ret[2]) {
125
+ throw takeFromExternrefTable0(ret[1]);
126
+ }
127
+ return takeFromExternrefTable0(ret[0]);
128
+ }
129
+ exports.doe_anova = doe_anova;
130
+
131
+ /**
132
+ * Estimate main effects and interactions for a 2-level factorial design,
133
+ * plus half-normal plot data for identifying active effects.
134
+ *
135
+ * `design`: native array-of-arrays `[[f64]]` — the coded design matrix (rows = runs).
136
+ * `responses`: flat array of response values, one per run.
137
+ * `factor_names`: native array of factor name strings.
138
+ * `max_order`: maximum interaction order (1 = main effects only, 2 = + 2FI, 3 = + 3FI).
139
+ *
140
+ * Returns `{ effects: [{ name, columns, estimate, sum_of_squares, percent_contribution }],
141
+ * half_normal: [[abs_effect, quantile]] }`.
142
+ *
143
+ * # Errors
144
+ * Returns an error string if dimensions do not match or an argument has the
145
+ * wrong shape (arguments are native JS values, not JSON strings).
146
+ * @param {any} design
147
+ * @param {Float64Array} responses
148
+ * @param {any} factor_names
149
+ * @param {number} max_order
150
+ * @returns {any}
151
+ */
152
+ function estimate_effects(design, responses, factor_names, max_order) {
153
+ const ptr0 = passArrayF64ToWasm0(responses, wasm.__wbindgen_malloc);
154
+ const len0 = WASM_VECTOR_LEN;
155
+ const ret = wasm.estimate_effects(design, ptr0, len0, factor_names, max_order);
156
+ if (ret[2]) {
157
+ throw takeFromExternrefTable0(ret[1]);
158
+ }
159
+ return takeFromExternrefTable0(ret[0]);
160
+ }
161
+ exports.estimate_effects = estimate_effects;
162
+
163
+ /**
164
+ * Fit a second-order Response Surface Model (RSM) using OLS.
165
+ *
166
+ * `design`: native array-of-arrays `[[f64]]` — the coded design matrix.
167
+ * `responses`: flat array of response values, one per run.
168
+ * `factor_names`: native array of factor name strings.
169
+ *
170
+ * Returns `{ coefficients: [f64], r_squared: f64, factor_count: usize }`.
171
+ * Coefficient order: [intercept, linear..., quadratic..., interactions...].
172
+ *
173
+ * # Errors
174
+ * Returns an error string if dimensions do not match, an argument has the
175
+ * wrong shape (arguments are native JS values, not JSON strings),
176
+ * or the model matrix is singular.
177
+ * @param {any} design
178
+ * @param {Float64Array} responses
179
+ * @param {any} factor_names
180
+ * @returns {any}
181
+ */
182
+ function fit_rsm(design, responses, factor_names) {
183
+ const ptr0 = passArrayF64ToWasm0(responses, wasm.__wbindgen_malloc);
184
+ const len0 = WASM_VECTOR_LEN;
185
+ const ret = wasm.fit_rsm(design, ptr0, len0, factor_names);
186
+ if (ret[2]) {
187
+ throw takeFromExternrefTable0(ret[1]);
188
+ }
189
+ return takeFromExternrefTable0(ret[0]);
190
+ }
191
+ exports.fit_rsm = fit_rsm;
192
+
193
+ /**
194
+ * Generate a 2^(k-p) fractional factorial design.
195
+ *
196
+ * Uses standard generators from Montgomery (2019) Table 8.14.
197
+ * Supported: k=4..7, p=1..3 (standard combinations only).
198
+ *
199
+ * Returns `{ data: [[f64]], factor_names: [str], run_count: usize, factor_count: usize }`.
200
+ *
201
+ * # Errors
202
+ * Returns an error string if the (k, p) combination is not in the standard table.
203
+ * @param {number} k
204
+ * @param {number} p
205
+ * @returns {any}
206
+ */
207
+ function fractional_factorial(k, p) {
208
+ const ret = wasm.fractional_factorial(k, p);
209
+ if (ret[2]) {
210
+ throw takeFromExternrefTable0(ret[1]);
211
+ }
212
+ return takeFromExternrefTable0(ret[0]);
213
+ }
214
+ exports.fractional_factorial = fractional_factorial;
215
+
216
+ /**
217
+ * Generate a 2^k full factorial design.
218
+ *
219
+ * Returns `{ data: [[f64]], factor_names: [str], run_count: usize, factor_count: usize }`.
220
+ *
221
+ * # Errors
222
+ * Returns an error string if `k` is out of range (1..=7).
223
+ * @param {number} k
224
+ * @returns {any}
225
+ */
226
+ function full_factorial(k) {
227
+ const ret = wasm.full_factorial(k);
228
+ if (ret[2]) {
229
+ throw takeFromExternrefTable0(ret[1]);
230
+ }
231
+ return takeFromExternrefTable0(ret[0]);
232
+ }
233
+ exports.full_factorial = full_factorial;
234
+
235
+ /**
236
+ * Generate a Plackett-Burman screening design for `k` factors (1 ≤ k ≤ 19).
237
+ *
238
+ * Automatically selects the smallest N (multiple of 4) such that N − 1 ≥ k.
239
+ *
240
+ * Returns `{ data: [[f64]], factor_names: [str], run_count: usize, factor_count: usize }`.
241
+ *
242
+ * # Errors
243
+ * Returns an error string if `k == 0` or `k > 19`.
244
+ * @param {number} k
245
+ * @returns {any}
246
+ */
247
+ function plackett_burman(k) {
248
+ const ret = wasm.plackett_burman(k);
249
+ if (ret[2]) {
250
+ throw takeFromExternrefTable0(ret[1]);
251
+ }
252
+ return takeFromExternrefTable0(ret[0]);
253
+ }
254
+ exports.plackett_burman = plackett_burman;
255
+
256
+ /**
257
+ * Compute Taguchi Signal-to-Noise ratios.
258
+ *
259
+ * `responses`: native array-of-arrays `[[f64]]` — one inner array per run,
260
+ * containing the replicate measurements for that run.
261
+ * `goal`: `"LargerIsBetter"` | `"SmallerIsBetter"` | `"NominalIsBest"`
262
+ *
263
+ * Returns a flat `[f64]` of SN values in dB, one per run.
264
+ *
265
+ * # Errors
266
+ * Returns an error string if the goal string is unrecognised, or if the
267
+ * response data violates the requirements for the chosen goal.
268
+ * @param {any} responses
269
+ * @param {string} goal
270
+ * @returns {any}
271
+ */
272
+ function signal_to_noise(responses, goal) {
273
+ const ptr0 = passStringToWasm0(goal, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
274
+ const len0 = WASM_VECTOR_LEN;
275
+ const ret = wasm.signal_to_noise(responses, ptr0, len0);
276
+ if (ret[2]) {
277
+ throw takeFromExternrefTable0(ret[1]);
278
+ }
279
+ return takeFromExternrefTable0(ret[0]);
280
+ }
281
+ exports.signal_to_noise = signal_to_noise;
282
+
283
+ /**
284
+ * Generate a Simplex Centroid Design for `q`-component mixture experiments.
285
+ *
286
+ * Produces 2^q − 1 points: the centroid of every non-empty subset of the
287
+ * q components. Example: q=3 → 7 points (3 vertices + 3 edge midpoints +
288
+ * 1 overall centroid), q=4 → 15 points.
289
+ *
290
+ * Returns `{ data: [[f64]], factor_names: [str], run_count: usize, factor_count: usize }`.
291
+ * Factor names are "X1", "X2", ..., "Xq".
292
+ * @param {number} q
293
+ * @returns {any}
294
+ */
295
+ function simplex_centroid(q) {
296
+ const ret = wasm.simplex_centroid(q);
297
+ if (ret[2]) {
298
+ throw takeFromExternrefTable0(ret[1]);
299
+ }
300
+ return takeFromExternrefTable0(ret[0]);
301
+ }
302
+ exports.simplex_centroid = simplex_centroid;
303
+
304
+ /**
305
+ * Generate a Simplex Lattice Design {q, m} for mixture experiments.
306
+ *
307
+ * Each of the `q` components takes values in {0, 1/m, 2/m, ..., 1} subject
308
+ * to the constraint that all components sum to 1.0 for every run.
309
+ *
310
+ * Run count: C(q + m − 1, m) (e.g. {3,2} → 6 runs, {3,3} → 10 runs).
311
+ *
312
+ * Returns `{ data: [[f64]], factor_names: [str], run_count: usize, factor_count: usize }`.
313
+ * Factor names are "X1", "X2", ..., "Xq".
314
+ * @param {number} q
315
+ * @param {number} m
316
+ * @returns {any}
317
+ */
318
+ function simplex_lattice(q, m) {
319
+ const ret = wasm.simplex_lattice(q, m);
320
+ if (ret[2]) {
321
+ throw takeFromExternrefTable0(ret[1]);
322
+ }
323
+ return takeFromExternrefTable0(ret[0]);
324
+ }
325
+ exports.simplex_lattice = simplex_lattice;
326
+
327
+ /**
328
+ * Compute the steepest ascent path from a fitted RSM model.
329
+ *
330
+ * `coefficients`: native array of model coefficients (from `fit_rsm`).
331
+ * `factor_count`: number of factors in the model.
332
+ * `n_steps`: number of steps along the ascent path.
333
+ * `step_size`: step size in coded units.
334
+ *
335
+ * Returns `{ steps: [{ coded: [f64], step_number: usize }] }`.
336
+ * @param {any} coefficients
337
+ * @param {number} factor_count
338
+ * @param {number} n_steps
339
+ * @param {number} step_size
340
+ * @returns {any}
341
+ */
342
+ function steepest_ascent(coefficients, factor_count, n_steps, step_size) {
343
+ const ret = wasm.steepest_ascent(coefficients, factor_count, n_steps, step_size);
344
+ if (ret[2]) {
345
+ throw takeFromExternrefTable0(ret[1]);
346
+ }
347
+ return takeFromExternrefTable0(ret[0]);
348
+ }
349
+ exports.steepest_ascent = steepest_ascent;
350
+
351
+ /**
352
+ * Get a Taguchi orthogonal array.
353
+ *
354
+ * `name`: `"L4"` | `"L8"` | `"L9"` | `"L12"` | `"L16"` | `"L18"` | `"L27"`
355
+ *
356
+ * `k`: number of factors to use (must be ≤ max columns for the array).
357
+ *
358
+ * Returns `{ data: [[f64]], factor_names: [str], run_count: usize, factor_count: usize }`.
359
+ *
360
+ * # Errors
361
+ * Returns an error string if the array name is unknown or `k` exceeds capacity.
362
+ * @param {string} name
363
+ * @param {number} k
364
+ * @returns {any}
365
+ */
366
+ function taguchi_array(name, k) {
367
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
368
+ const len0 = WASM_VECTOR_LEN;
369
+ const ret = wasm.taguchi_array(ptr0, len0, k);
370
+ if (ret[2]) {
371
+ throw takeFromExternrefTable0(ret[1]);
372
+ }
373
+ return takeFromExternrefTable0(ret[0]);
374
+ }
375
+ exports.taguchi_array = taguchi_array;
376
+
377
+ /**
378
+ * Compute the statistical power of a 2^(k-p) factorial design.
379
+ *
380
+ * Uses the normal approximation. Returns power in [0, 1], or 0.0 for invalid
381
+ * inputs (k=0, p≥k, n_replicates=0, effect_size≤0, sigma≤0).
382
+ *
383
+ * # Arguments
384
+ * * `k` — total number of factors
385
+ * * `p` — number of generators (p=0 = full factorial)
386
+ * * `n_replicates` — number of replicates
387
+ * * `effect_size` — detectable effect δ (in response units)
388
+ * * `sigma` — process standard deviation σ
389
+ * * `alpha` — type-I error rate (e.g. 0.05)
390
+ * @param {number} k
391
+ * @param {number} p
392
+ * @param {number} n_replicates
393
+ * @param {number} effect_size
394
+ * @param {number} sigma
395
+ * @param {number} alpha
396
+ * @returns {number}
397
+ */
398
+ function two_level_factorial_power(k, p, n_replicates, effect_size, sigma, alpha) {
399
+ const ret = wasm.two_level_factorial_power(k, p, n_replicates, effect_size, sigma, alpha);
400
+ return ret;
401
+ }
402
+ exports.two_level_factorial_power = two_level_factorial_power;
403
+ function __wbg_get_imports() {
404
+ const import0 = {
405
+ __proto__: null,
406
+ __wbg_Error_92b29b0548f8b746: function(arg0, arg1) {
407
+ const ret = Error(getStringFromWasm0(arg0, arg1));
408
+ return ret;
409
+ },
410
+ __wbg_String_8564e559799eccda: function(arg0, arg1) {
411
+ const ret = String(arg1);
412
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
413
+ const len1 = WASM_VECTOR_LEN;
414
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
415
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
416
+ },
417
+ __wbg___wbindgen_bigint_get_as_i64_d968e41184ae354f: function(arg0, arg1) {
418
+ const v = arg1;
419
+ const ret = typeof(v) === 'bigint' ? v : undefined;
420
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
421
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
422
+ },
423
+ __wbg___wbindgen_boolean_get_fa956cfa2d1bd751: function(arg0) {
424
+ const v = arg0;
425
+ const ret = typeof(v) === 'boolean' ? v : undefined;
426
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
427
+ },
428
+ __wbg___wbindgen_debug_string_c25d447a39f5578f: function(arg0, arg1) {
429
+ const ret = debugString(arg1);
430
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
431
+ const len1 = WASM_VECTOR_LEN;
432
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
433
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
434
+ },
435
+ __wbg___wbindgen_in_aca499c5de7ff5e5: function(arg0, arg1) {
436
+ const ret = arg0 in arg1;
437
+ return ret;
438
+ },
439
+ __wbg___wbindgen_is_bigint_2f76dc55065b4273: function(arg0) {
440
+ const ret = typeof(arg0) === 'bigint';
441
+ return ret;
442
+ },
443
+ __wbg___wbindgen_is_function_1ff95bcc5517c252: function(arg0) {
444
+ const ret = typeof(arg0) === 'function';
445
+ return ret;
446
+ },
447
+ __wbg___wbindgen_is_object_a27215656b807791: function(arg0) {
448
+ const val = arg0;
449
+ const ret = typeof(val) === 'object' && val !== null;
450
+ return ret;
451
+ },
452
+ __wbg___wbindgen_jsval_eq_e659fcf7b0e32763: function(arg0, arg1) {
453
+ const ret = arg0 === arg1;
454
+ return ret;
455
+ },
456
+ __wbg___wbindgen_jsval_loose_eq_db4c3b15f63fc170: function(arg0, arg1) {
457
+ const ret = arg0 == arg1;
458
+ return ret;
459
+ },
460
+ __wbg___wbindgen_number_get_394265ed1e1b84ee: function(arg0, arg1) {
461
+ const obj = arg1;
462
+ const ret = typeof(obj) === 'number' ? obj : undefined;
463
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
464
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
465
+ },
466
+ __wbg___wbindgen_string_get_b0ca35b86a603356: function(arg0, arg1) {
467
+ const obj = arg1;
468
+ const ret = typeof(obj) === 'string' ? obj : undefined;
469
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
470
+ var len1 = WASM_VECTOR_LEN;
471
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
472
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
473
+ },
474
+ __wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
475
+ throw new Error(getStringFromWasm0(arg0, arg1));
476
+ },
477
+ __wbg_call_8a2dd23819f8a60a: function() { return handleError(function (arg0, arg1) {
478
+ const ret = arg0.call(arg1);
479
+ return ret;
480
+ }, arguments); },
481
+ __wbg_done_89b2b13e91a60321: function(arg0) {
482
+ const ret = arg0.done;
483
+ return ret;
484
+ },
485
+ __wbg_entries_015dc610cd81ede0: function(arg0) {
486
+ const ret = Object.entries(arg0);
487
+ return ret;
488
+ },
489
+ __wbg_get_507a50627bffa49b: function(arg0, arg1) {
490
+ const ret = arg0[arg1 >>> 0];
491
+ return ret;
492
+ },
493
+ __wbg_get_c7eb1f358a7654df: function() { return handleError(function (arg0, arg1) {
494
+ const ret = Reflect.get(arg0, arg1);
495
+ return ret;
496
+ }, arguments); },
497
+ __wbg_get_unchecked_6e0ad6d2a41b06f6: function(arg0, arg1) {
498
+ const ret = arg0[arg1 >>> 0];
499
+ return ret;
500
+ },
501
+ __wbg_instanceof_ArrayBuffer_4480b9e0068a8adb: function(arg0) {
502
+ let result;
503
+ try {
504
+ result = arg0 instanceof ArrayBuffer;
505
+ } catch (_) {
506
+ result = false;
507
+ }
508
+ const ret = result;
509
+ return ret;
510
+ },
511
+ __wbg_instanceof_Map_e5b5e3db98422fcc: function(arg0) {
512
+ let result;
513
+ try {
514
+ result = arg0 instanceof Map;
515
+ } catch (_) {
516
+ result = false;
517
+ }
518
+ const ret = result;
519
+ return ret;
520
+ },
521
+ __wbg_instanceof_Uint8Array_309b927aaf7a3fc7: function(arg0) {
522
+ let result;
523
+ try {
524
+ result = arg0 instanceof Uint8Array;
525
+ } catch (_) {
526
+ result = false;
527
+ }
528
+ const ret = result;
529
+ return ret;
530
+ },
531
+ __wbg_isArray_0677c962b281d01a: function(arg0) {
532
+ const ret = Array.isArray(arg0);
533
+ return ret;
534
+ },
535
+ __wbg_isSafeInteger_04f36e4056f1b851: function(arg0) {
536
+ const ret = Number.isSafeInteger(arg0);
537
+ return ret;
538
+ },
539
+ __wbg_iterator_6f722e4a93058b71: function() {
540
+ const ret = Symbol.iterator;
541
+ return ret;
542
+ },
543
+ __wbg_length_1f0964f4a5e2c6d8: function(arg0) {
544
+ const ret = arg0.length;
545
+ return ret;
546
+ },
547
+ __wbg_length_370319915dc99107: function(arg0) {
548
+ const ret = arg0.length;
549
+ return ret;
550
+ },
551
+ __wbg_new_32b398fb48b6d94a: function() {
552
+ const ret = new Array();
553
+ return ret;
554
+ },
555
+ __wbg_new_cd45aabdf6073e84: function(arg0) {
556
+ const ret = new Uint8Array(arg0);
557
+ return ret;
558
+ },
559
+ __wbg_new_da52cf8fe3429cb2: function() {
560
+ const ret = new Object();
561
+ return ret;
562
+ },
563
+ __wbg_next_6dbf2c0ac8cde20f: function(arg0) {
564
+ const ret = arg0.next;
565
+ return ret;
566
+ },
567
+ __wbg_next_71f2aa1cb3d1e37e: function() { return handleError(function (arg0) {
568
+ const ret = arg0.next();
569
+ return ret;
570
+ }, arguments); },
571
+ __wbg_prototypesetcall_4770620bbe4688a0: function(arg0, arg1, arg2) {
572
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
573
+ },
574
+ __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
575
+ arg0[arg1] = arg2;
576
+ },
577
+ __wbg_set_8a16b38e4805b298: function(arg0, arg1, arg2) {
578
+ arg0[arg1 >>> 0] = arg2;
579
+ },
580
+ __wbg_value_a5d5488a9589444a: function(arg0) {
581
+ const ret = arg0.value;
582
+ return ret;
583
+ },
584
+ __wbindgen_cast_0000000000000001: function(arg0) {
585
+ // Cast intrinsic for `F64 -> Externref`.
586
+ const ret = arg0;
587
+ return ret;
588
+ },
589
+ __wbindgen_cast_0000000000000002: function(arg0) {
590
+ // Cast intrinsic for `I64 -> Externref`.
591
+ const ret = arg0;
592
+ return ret;
593
+ },
594
+ __wbindgen_cast_0000000000000003: function(arg0, arg1) {
595
+ // Cast intrinsic for `Ref(String) -> Externref`.
596
+ const ret = getStringFromWasm0(arg0, arg1);
597
+ return ret;
598
+ },
599
+ __wbindgen_cast_0000000000000004: function(arg0) {
600
+ // Cast intrinsic for `U64 -> Externref`.
601
+ const ret = BigInt.asUintN(64, arg0);
602
+ return ret;
603
+ },
604
+ __wbindgen_init_externref_table: function() {
605
+ const table = wasm.__wbindgen_externrefs;
606
+ const offset = table.grow(4);
607
+ table.set(0, undefined);
608
+ table.set(offset + 0, undefined);
609
+ table.set(offset + 1, null);
610
+ table.set(offset + 2, true);
611
+ table.set(offset + 3, false);
612
+ },
613
+ };
614
+ return {
615
+ __proto__: null,
616
+ "./u_doe_bg.js": import0,
617
+ };
618
+ }
619
+
620
+ function addToExternrefTable0(obj) {
621
+ const idx = wasm.__externref_table_alloc();
622
+ wasm.__wbindgen_externrefs.set(idx, obj);
623
+ return idx;
624
+ }
625
+
626
+ function debugString(val) {
627
+ // primitive types
628
+ const type = typeof val;
629
+ if (type == 'number' || type == 'boolean' || val == null) {
630
+ return `${val}`;
631
+ }
632
+ if (type == 'string') {
633
+ return `"${val}"`;
634
+ }
635
+ if (type == 'symbol') {
636
+ const description = val.description;
637
+ if (description == null) {
638
+ return 'Symbol';
639
+ } else {
640
+ return `Symbol(${description})`;
641
+ }
642
+ }
643
+ if (type == 'function') {
644
+ const name = val.name;
645
+ if (typeof name == 'string' && name.length > 0) {
646
+ return `Function(${name})`;
647
+ } else {
648
+ return 'Function';
649
+ }
650
+ }
651
+ // objects
652
+ if (Array.isArray(val)) {
653
+ const length = val.length;
654
+ let debug = '[';
655
+ if (length > 0) {
656
+ debug += debugString(val[0]);
657
+ }
658
+ for(let i = 1; i < length; i++) {
659
+ debug += ', ' + debugString(val[i]);
660
+ }
661
+ debug += ']';
662
+ return debug;
663
+ }
664
+ // Test for built-in
665
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
666
+ let className;
667
+ if (builtInMatches && builtInMatches.length > 1) {
668
+ className = builtInMatches[1];
669
+ } else {
670
+ // Failed to match the standard '[object ClassName]'
671
+ return toString.call(val);
672
+ }
673
+ if (className == 'Object') {
674
+ // we're a user defined class or Object
675
+ // JSON.stringify avoids problems with cycles, and is generally much
676
+ // easier than looping through ownProperties of `val`.
677
+ try {
678
+ return 'Object(' + JSON.stringify(val) + ')';
679
+ } catch (_) {
680
+ return 'Object';
681
+ }
682
+ }
683
+ // errors
684
+ if (val instanceof Error) {
685
+ return `${val.name}: ${val.message}\n${val.stack}`;
686
+ }
687
+ // TODO we could test for more things here, like `Set`s and `Map`s.
688
+ return className;
689
+ }
690
+
691
+ function getArrayU8FromWasm0(ptr, len) {
692
+ ptr = ptr >>> 0;
693
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
694
+ }
695
+
696
+ let cachedDataViewMemory0 = null;
697
+ function getDataViewMemory0() {
698
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
699
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
700
+ }
701
+ return cachedDataViewMemory0;
702
+ }
703
+
704
+ let cachedFloat64ArrayMemory0 = null;
705
+ function getFloat64ArrayMemory0() {
706
+ if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
707
+ cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
708
+ }
709
+ return cachedFloat64ArrayMemory0;
710
+ }
711
+
712
+ function getStringFromWasm0(ptr, len) {
713
+ return decodeText(ptr >>> 0, len);
714
+ }
715
+
716
+ let cachedUint8ArrayMemory0 = null;
717
+ function getUint8ArrayMemory0() {
718
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
719
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
720
+ }
721
+ return cachedUint8ArrayMemory0;
722
+ }
723
+
724
+ function handleError(f, args) {
725
+ try {
726
+ return f.apply(this, args);
727
+ } catch (e) {
728
+ const idx = addToExternrefTable0(e);
729
+ wasm.__wbindgen_exn_store(idx);
730
+ }
731
+ }
732
+
733
+ function isLikeNone(x) {
734
+ return x === undefined || x === null;
735
+ }
736
+
737
+ function passArrayF64ToWasm0(arg, malloc) {
738
+ const ptr = malloc(arg.length * 8, 8) >>> 0;
739
+ getFloat64ArrayMemory0().set(arg, ptr / 8);
740
+ WASM_VECTOR_LEN = arg.length;
741
+ return ptr;
742
+ }
743
+
744
+ function passStringToWasm0(arg, malloc, realloc) {
745
+ if (realloc === undefined) {
746
+ const buf = cachedTextEncoder.encode(arg);
747
+ const ptr = malloc(buf.length, 1) >>> 0;
748
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
749
+ WASM_VECTOR_LEN = buf.length;
750
+ return ptr;
751
+ }
752
+
753
+ let len = arg.length;
754
+ let ptr = malloc(len, 1) >>> 0;
755
+
756
+ const mem = getUint8ArrayMemory0();
757
+
758
+ let offset = 0;
759
+
760
+ for (; offset < len; offset++) {
761
+ const code = arg.charCodeAt(offset);
762
+ if (code > 0x7F) break;
763
+ mem[ptr + offset] = code;
764
+ }
765
+ if (offset !== len) {
766
+ if (offset !== 0) {
767
+ arg = arg.slice(offset);
768
+ }
769
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
770
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
771
+ const ret = cachedTextEncoder.encodeInto(arg, view);
772
+
773
+ offset += ret.written;
774
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
775
+ }
776
+
777
+ WASM_VECTOR_LEN = offset;
778
+ return ptr;
779
+ }
780
+
781
+ function takeFromExternrefTable0(idx) {
782
+ const value = wasm.__wbindgen_externrefs.get(idx);
783
+ wasm.__externref_table_dealloc(idx);
784
+ return value;
785
+ }
786
+
787
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
788
+ cachedTextDecoder.decode();
789
+ function decodeText(ptr, len) {
790
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
791
+ }
792
+
793
+ const cachedTextEncoder = new TextEncoder();
794
+
795
+ if (!('encodeInto' in cachedTextEncoder)) {
796
+ cachedTextEncoder.encodeInto = function (arg, view) {
797
+ const buf = cachedTextEncoder.encode(arg);
798
+ view.set(buf);
799
+ return {
800
+ read: arg.length,
801
+ written: buf.length
802
+ };
803
+ };
804
+ }
805
+
806
+ let WASM_VECTOR_LEN = 0;
807
+
808
+ const wasmPath = `${__dirname}/u_doe_bg.wasm`;
809
+ const wasmBytes = require('fs').readFileSync(wasmPath);
810
+ const wasmModule = new WebAssembly.Module(wasmBytes);
811
+ let wasmInstance = new WebAssembly.Instance(wasmModule, __wbg_get_imports());
812
+ let wasm = wasmInstance.exports;
813
+ wasm.__wbindgen_start();
@@ -0,0 +1,224 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+
4
+ /**
5
+ * Generate a Box-Behnken Design (BBD).
6
+ *
7
+ * Supported: k = 3, 4, or 5.
8
+ *
9
+ * Returns `{ data: [[f64]], factor_names: [str], run_count: usize, factor_count: usize }`.
10
+ *
11
+ * # Errors
12
+ * Returns an error string if `k` is not 3, 4, or 5, or `n_center == 0`.
13
+ */
14
+ export function box_behnken(k: number, n_center: number): any;
15
+
16
+ /**
17
+ * Generate a Central Composite Design (CCD).
18
+ *
19
+ * `design_type`: `"FaceCentered"` | `"Rotatable"` | `"Inscribed"`
20
+ *
21
+ * `n_center`: number of center point replicates (≥ 1, default 3 if 0 is passed is rejected).
22
+ *
23
+ * Returns `{ data: [[f64]], factor_names: [str], run_count: usize, factor_count: usize }`.
24
+ *
25
+ * # Errors
26
+ * Returns an error string if `k` is out of range (2..=6), `n_center == 0`,
27
+ * or `design_type` is unrecognised.
28
+ */
29
+ export function ccd(k: number, design_type: string, n_center: number): any;
30
+
31
+ /**
32
+ * Generate a Definitive Screening Design (DSD).
33
+ *
34
+ * Returns `{ data: [[f64]], factor_names: [str], run_count: usize, factor_count: usize }`.
35
+ *
36
+ * # Errors
37
+ * Returns an error string if `k` is out of the supported range.
38
+ */
39
+ export function definitive_screening(k: number): any;
40
+
41
+ /**
42
+ * Compute Derringer-Suich desirability for multiple responses.
43
+ *
44
+ * `specs`: native array of response specification objects, each:
45
+ * `{ goal: "Maximize"|"Minimize"|"Target", lower, target, upper, s1, s2 }`
46
+ * `responses`: flat array of observed response values (one per spec).
47
+ *
48
+ * Returns `{ individual: [f64], overall: f64 }`.
49
+ *
50
+ * # Errors
51
+ * Returns an error string if `specs` has the wrong shape (native JS values,
52
+ * not JSON strings), specs/responses length mismatch, or goal string is
53
+ * unrecognised.
54
+ */
55
+ export function desirability(specs: any, responses: Float64Array): any;
56
+
57
+ /**
58
+ * Perform DOE ANOVA.
59
+ *
60
+ * `design`: native array-of-arrays `[[f64]]` — the coded design matrix (rows = runs).
61
+ * `responses`: flat array of response values, one per run.
62
+ * `factor_names`: native array of factor name strings used as column labels.
63
+ * `effect_names`: native array of effect names to include (e.g. `["A","B","A:B"]`).
64
+ *
65
+ * Returns an ANOVA result object with `effects`, `residual_ss`, `residual_df`,
66
+ * `total_ss`, `r_squared`, `r_squared_adj`.
67
+ *
68
+ * # Errors
69
+ * Returns an error string if dimensions do not match or an argument has the
70
+ * wrong shape (arguments are native JS values, not JSON strings).
71
+ */
72
+ export function doe_anova(design: any, responses: Float64Array, factor_names: any, effect_names: any): any;
73
+
74
+ /**
75
+ * Estimate main effects and interactions for a 2-level factorial design,
76
+ * plus half-normal plot data for identifying active effects.
77
+ *
78
+ * `design`: native array-of-arrays `[[f64]]` — the coded design matrix (rows = runs).
79
+ * `responses`: flat array of response values, one per run.
80
+ * `factor_names`: native array of factor name strings.
81
+ * `max_order`: maximum interaction order (1 = main effects only, 2 = + 2FI, 3 = + 3FI).
82
+ *
83
+ * Returns `{ effects: [{ name, columns, estimate, sum_of_squares, percent_contribution }],
84
+ * half_normal: [[abs_effect, quantile]] }`.
85
+ *
86
+ * # Errors
87
+ * Returns an error string if dimensions do not match or an argument has the
88
+ * wrong shape (arguments are native JS values, not JSON strings).
89
+ */
90
+ export function estimate_effects(design: any, responses: Float64Array, factor_names: any, max_order: number): any;
91
+
92
+ /**
93
+ * Fit a second-order Response Surface Model (RSM) using OLS.
94
+ *
95
+ * `design`: native array-of-arrays `[[f64]]` — the coded design matrix.
96
+ * `responses`: flat array of response values, one per run.
97
+ * `factor_names`: native array of factor name strings.
98
+ *
99
+ * Returns `{ coefficients: [f64], r_squared: f64, factor_count: usize }`.
100
+ * Coefficient order: [intercept, linear..., quadratic..., interactions...].
101
+ *
102
+ * # Errors
103
+ * Returns an error string if dimensions do not match, an argument has the
104
+ * wrong shape (arguments are native JS values, not JSON strings),
105
+ * or the model matrix is singular.
106
+ */
107
+ export function fit_rsm(design: any, responses: Float64Array, factor_names: any): any;
108
+
109
+ /**
110
+ * Generate a 2^(k-p) fractional factorial design.
111
+ *
112
+ * Uses standard generators from Montgomery (2019) Table 8.14.
113
+ * Supported: k=4..7, p=1..3 (standard combinations only).
114
+ *
115
+ * Returns `{ data: [[f64]], factor_names: [str], run_count: usize, factor_count: usize }`.
116
+ *
117
+ * # Errors
118
+ * Returns an error string if the (k, p) combination is not in the standard table.
119
+ */
120
+ export function fractional_factorial(k: number, p: number): any;
121
+
122
+ /**
123
+ * Generate a 2^k full factorial design.
124
+ *
125
+ * Returns `{ data: [[f64]], factor_names: [str], run_count: usize, factor_count: usize }`.
126
+ *
127
+ * # Errors
128
+ * Returns an error string if `k` is out of range (1..=7).
129
+ */
130
+ export function full_factorial(k: number): any;
131
+
132
+ /**
133
+ * Generate a Plackett-Burman screening design for `k` factors (1 ≤ k ≤ 19).
134
+ *
135
+ * Automatically selects the smallest N (multiple of 4) such that N − 1 ≥ k.
136
+ *
137
+ * Returns `{ data: [[f64]], factor_names: [str], run_count: usize, factor_count: usize }`.
138
+ *
139
+ * # Errors
140
+ * Returns an error string if `k == 0` or `k > 19`.
141
+ */
142
+ export function plackett_burman(k: number): any;
143
+
144
+ /**
145
+ * Compute Taguchi Signal-to-Noise ratios.
146
+ *
147
+ * `responses`: native array-of-arrays `[[f64]]` — one inner array per run,
148
+ * containing the replicate measurements for that run.
149
+ * `goal`: `"LargerIsBetter"` | `"SmallerIsBetter"` | `"NominalIsBest"`
150
+ *
151
+ * Returns a flat `[f64]` of SN values in dB, one per run.
152
+ *
153
+ * # Errors
154
+ * Returns an error string if the goal string is unrecognised, or if the
155
+ * response data violates the requirements for the chosen goal.
156
+ */
157
+ export function signal_to_noise(responses: any, goal: string): any;
158
+
159
+ /**
160
+ * Generate a Simplex Centroid Design for `q`-component mixture experiments.
161
+ *
162
+ * Produces 2^q − 1 points: the centroid of every non-empty subset of the
163
+ * q components. Example: q=3 → 7 points (3 vertices + 3 edge midpoints +
164
+ * 1 overall centroid), q=4 → 15 points.
165
+ *
166
+ * Returns `{ data: [[f64]], factor_names: [str], run_count: usize, factor_count: usize }`.
167
+ * Factor names are "X1", "X2", ..., "Xq".
168
+ */
169
+ export function simplex_centroid(q: number): any;
170
+
171
+ /**
172
+ * Generate a Simplex Lattice Design {q, m} for mixture experiments.
173
+ *
174
+ * Each of the `q` components takes values in {0, 1/m, 2/m, ..., 1} subject
175
+ * to the constraint that all components sum to 1.0 for every run.
176
+ *
177
+ * Run count: C(q + m − 1, m) (e.g. {3,2} → 6 runs, {3,3} → 10 runs).
178
+ *
179
+ * Returns `{ data: [[f64]], factor_names: [str], run_count: usize, factor_count: usize }`.
180
+ * Factor names are "X1", "X2", ..., "Xq".
181
+ */
182
+ export function simplex_lattice(q: number, m: number): any;
183
+
184
+ /**
185
+ * Compute the steepest ascent path from a fitted RSM model.
186
+ *
187
+ * `coefficients`: native array of model coefficients (from `fit_rsm`).
188
+ * `factor_count`: number of factors in the model.
189
+ * `n_steps`: number of steps along the ascent path.
190
+ * `step_size`: step size in coded units.
191
+ *
192
+ * Returns `{ steps: [{ coded: [f64], step_number: usize }] }`.
193
+ */
194
+ export function steepest_ascent(coefficients: any, factor_count: number, n_steps: number, step_size: number): any;
195
+
196
+ /**
197
+ * Get a Taguchi orthogonal array.
198
+ *
199
+ * `name`: `"L4"` | `"L8"` | `"L9"` | `"L12"` | `"L16"` | `"L18"` | `"L27"`
200
+ *
201
+ * `k`: number of factors to use (must be ≤ max columns for the array).
202
+ *
203
+ * Returns `{ data: [[f64]], factor_names: [str], run_count: usize, factor_count: usize }`.
204
+ *
205
+ * # Errors
206
+ * Returns an error string if the array name is unknown or `k` exceeds capacity.
207
+ */
208
+ export function taguchi_array(name: string, k: number): any;
209
+
210
+ /**
211
+ * Compute the statistical power of a 2^(k-p) factorial design.
212
+ *
213
+ * Uses the normal approximation. Returns power in [0, 1], or 0.0 for invalid
214
+ * inputs (k=0, p≥k, n_replicates=0, effect_size≤0, sigma≤0).
215
+ *
216
+ * # Arguments
217
+ * * `k` — total number of factors
218
+ * * `p` — number of generators (p=0 = full factorial)
219
+ * * `n_replicates` — number of replicates
220
+ * * `effect_size` — detectable effect δ (in response units)
221
+ * * `sigma` — process standard deviation σ
222
+ * * `alpha` — type-I error rate (e.g. 0.05)
223
+ */
224
+ export function two_level_factorial_power(k: number, p: number, n_replicates: number, effect_size: number, sigma: number, alpha: number): number;
Binary file
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "iyulab"
6
6
  ],
7
7
  "description": "Design of Experiments (DOE) framework: factorial, Plackett-Burman, CCD, Box-Behnken, Taguchi, effects analysis, RSM, and desirability optimization.",
8
- "version": "0.6.0",
8
+ "version": "0.6.2",
9
9
  "license": "MIT",
10
10
  "repository": {
11
11
  "type": "git",
@@ -15,13 +15,15 @@
15
15
  "u_doe_bg.wasm",
16
16
  "u_doe.js",
17
17
  "u_doe_bg.js",
18
- "u_doe.d.ts"
18
+ "u_doe.d.ts",
19
+ "node"
19
20
  ],
20
21
  "main": "u_doe.js",
21
22
  "types": "u_doe.d.ts",
22
23
  "sideEffects": [
23
24
  "./u_doe.js",
24
- "./snippets/*"
25
+ "./snippets/*",
26
+ "./node/u_doe.cjs"
25
27
  ],
26
28
  "keywords": [
27
29
  "doe",
@@ -29,5 +31,16 @@
29
31
  "rsm",
30
32
  "factorial",
31
33
  "statistics"
32
- ]
34
+ ],
35
+ "exports": {
36
+ ".": {
37
+ "node": {
38
+ "types": "./node/u_doe.d.cts",
39
+ "default": "./node/u_doe.cjs"
40
+ },
41
+ "types": "./u_doe.d.ts",
42
+ "default": "./u_doe.js"
43
+ },
44
+ "./package.json": "./package.json"
45
+ }
33
46
  }
package/u_doe_bg.js CHANGED
@@ -382,7 +382,7 @@ export function two_level_factorial_power(k, p, n_replicates, effect_size, sigma
382
382
  const ret = wasm.two_level_factorial_power(k, p, n_replicates, effect_size, sigma, alpha);
383
383
  return ret;
384
384
  }
385
- export function __wbg_Error_9dc85fe1bc224456(arg0, arg1) {
385
+ export function __wbg_Error_92b29b0548f8b746(arg0, arg1) {
386
386
  const ret = Error(getStringFromWasm0(arg0, arg1));
387
387
  return ret;
388
388
  }
@@ -393,56 +393,56 @@ export function __wbg_String_8564e559799eccda(arg0, arg1) {
393
393
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
394
394
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
395
395
  }
396
- export function __wbg___wbindgen_bigint_get_as_i64_8ea6736501f396b6(arg0, arg1) {
396
+ export function __wbg___wbindgen_bigint_get_as_i64_d968e41184ae354f(arg0, arg1) {
397
397
  const v = arg1;
398
398
  const ret = typeof(v) === 'bigint' ? v : undefined;
399
399
  getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
400
400
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
401
401
  }
402
- export function __wbg___wbindgen_boolean_get_b131b2f36d6b2f55(arg0) {
402
+ export function __wbg___wbindgen_boolean_get_fa956cfa2d1bd751(arg0) {
403
403
  const v = arg0;
404
404
  const ret = typeof(v) === 'boolean' ? v : undefined;
405
405
  return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
406
406
  }
407
- export function __wbg___wbindgen_debug_string_56c147eb1a51f0c4(arg0, arg1) {
407
+ export function __wbg___wbindgen_debug_string_c25d447a39f5578f(arg0, arg1) {
408
408
  const ret = debugString(arg1);
409
409
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
410
410
  const len1 = WASM_VECTOR_LEN;
411
411
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
412
412
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
413
413
  }
414
- export function __wbg___wbindgen_in_ce8569b2fc6f5088(arg0, arg1) {
414
+ export function __wbg___wbindgen_in_aca499c5de7ff5e5(arg0, arg1) {
415
415
  const ret = arg0 in arg1;
416
416
  return ret;
417
417
  }
418
- export function __wbg___wbindgen_is_bigint_df272c65456269c2(arg0) {
418
+ export function __wbg___wbindgen_is_bigint_2f76dc55065b4273(arg0) {
419
419
  const ret = typeof(arg0) === 'bigint';
420
420
  return ret;
421
421
  }
422
- export function __wbg___wbindgen_is_function_147961669f068cd4(arg0) {
422
+ export function __wbg___wbindgen_is_function_1ff95bcc5517c252(arg0) {
423
423
  const ret = typeof(arg0) === 'function';
424
424
  return ret;
425
425
  }
426
- export function __wbg___wbindgen_is_object_3a2c414391dbf751(arg0) {
426
+ export function __wbg___wbindgen_is_object_a27215656b807791(arg0) {
427
427
  const val = arg0;
428
428
  const ret = typeof(val) === 'object' && val !== null;
429
429
  return ret;
430
430
  }
431
- export function __wbg___wbindgen_jsval_eq_174c93ec61bab0c5(arg0, arg1) {
431
+ export function __wbg___wbindgen_jsval_eq_e659fcf7b0e32763(arg0, arg1) {
432
432
  const ret = arg0 === arg1;
433
433
  return ret;
434
434
  }
435
- export function __wbg___wbindgen_jsval_loose_eq_e07e3b1f5db6da6c(arg0, arg1) {
435
+ export function __wbg___wbindgen_jsval_loose_eq_db4c3b15f63fc170(arg0, arg1) {
436
436
  const ret = arg0 == arg1;
437
437
  return ret;
438
438
  }
439
- export function __wbg___wbindgen_number_get_588ed6b97f0d7e14(arg0, arg1) {
439
+ export function __wbg___wbindgen_number_get_394265ed1e1b84ee(arg0, arg1) {
440
440
  const obj = arg1;
441
441
  const ret = typeof(obj) === 'number' ? obj : undefined;
442
442
  getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
443
443
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
444
444
  }
445
- export function __wbg___wbindgen_string_get_fa2687d531ed17a5(arg0, arg1) {
445
+ export function __wbg___wbindgen_string_get_b0ca35b86a603356(arg0, arg1) {
446
446
  const obj = arg1;
447
447
  const ret = typeof(obj) === 'string' ? obj : undefined;
448
448
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -450,34 +450,34 @@ export function __wbg___wbindgen_string_get_fa2687d531ed17a5(arg0, arg1) {
450
450
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
451
451
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
452
452
  }
453
- export function __wbg___wbindgen_throw_bbadd78c1bac3a77(arg0, arg1) {
453
+ export function __wbg___wbindgen_throw_344f42d3211c4765(arg0, arg1) {
454
454
  throw new Error(getStringFromWasm0(arg0, arg1));
455
455
  }
456
- export function __wbg_call_91f00ddc43e01490() { return handleError(function (arg0, arg1) {
456
+ export function __wbg_call_8a2dd23819f8a60a() { return handleError(function (arg0, arg1) {
457
457
  const ret = arg0.call(arg1);
458
458
  return ret;
459
459
  }, arguments); }
460
- export function __wbg_done_6a8439e544ec6206(arg0) {
460
+ export function __wbg_done_89b2b13e91a60321(arg0) {
461
461
  const ret = arg0.done;
462
462
  return ret;
463
463
  }
464
- export function __wbg_entries_5a6a7e7e0df09fe5(arg0) {
464
+ export function __wbg_entries_015dc610cd81ede0(arg0) {
465
465
  const ret = Object.entries(arg0);
466
466
  return ret;
467
467
  }
468
- export function __wbg_get_44e98e27bda25b5b() { return handleError(function (arg0, arg1) {
469
- const ret = Reflect.get(arg0, arg1);
470
- return ret;
471
- }, arguments); }
472
- export function __wbg_get_4b90d6d8c5deb5d5(arg0, arg1) {
468
+ export function __wbg_get_507a50627bffa49b(arg0, arg1) {
473
469
  const ret = arg0[arg1 >>> 0];
474
470
  return ret;
475
471
  }
476
- export function __wbg_get_unchecked_46e778e3cec74b5e(arg0, arg1) {
472
+ export function __wbg_get_c7eb1f358a7654df() { return handleError(function (arg0, arg1) {
473
+ const ret = Reflect.get(arg0, arg1);
474
+ return ret;
475
+ }, arguments); }
476
+ export function __wbg_get_unchecked_6e0ad6d2a41b06f6(arg0, arg1) {
477
477
  const ret = arg0[arg1 >>> 0];
478
478
  return ret;
479
479
  }
480
- export function __wbg_instanceof_ArrayBuffer_a581da923203f29f(arg0) {
480
+ export function __wbg_instanceof_ArrayBuffer_4480b9e0068a8adb(arg0) {
481
481
  let result;
482
482
  try {
483
483
  result = arg0 instanceof ArrayBuffer;
@@ -487,7 +487,7 @@ export function __wbg_instanceof_ArrayBuffer_a581da923203f29f(arg0) {
487
487
  const ret = result;
488
488
  return ret;
489
489
  }
490
- export function __wbg_instanceof_Map_7f94c740225003e2(arg0) {
490
+ export function __wbg_instanceof_Map_e5b5e3db98422fcc(arg0) {
491
491
  let result;
492
492
  try {
493
493
  result = arg0 instanceof Map;
@@ -497,7 +497,7 @@ export function __wbg_instanceof_Map_7f94c740225003e2(arg0) {
497
497
  const ret = result;
498
498
  return ret;
499
499
  }
500
- export function __wbg_instanceof_Uint8Array_b6fe1ac89eba107e(arg0) {
500
+ export function __wbg_instanceof_Uint8Array_309b927aaf7a3fc7(arg0) {
501
501
  let result;
502
502
  try {
503
503
  result = arg0 instanceof Uint8Array;
@@ -507,56 +507,56 @@ export function __wbg_instanceof_Uint8Array_b6fe1ac89eba107e(arg0) {
507
507
  const ret = result;
508
508
  return ret;
509
509
  }
510
- export function __wbg_isArray_139f48e3c057ede8(arg0) {
510
+ export function __wbg_isArray_0677c962b281d01a(arg0) {
511
511
  const ret = Array.isArray(arg0);
512
512
  return ret;
513
513
  }
514
- export function __wbg_isSafeInteger_c22ccb4af2201fe9(arg0) {
514
+ export function __wbg_isSafeInteger_04f36e4056f1b851(arg0) {
515
515
  const ret = Number.isSafeInteger(arg0);
516
516
  return ret;
517
517
  }
518
- export function __wbg_iterator_9b36cebf3be7b7cd() {
518
+ export function __wbg_iterator_6f722e4a93058b71() {
519
519
  const ret = Symbol.iterator;
520
520
  return ret;
521
521
  }
522
- export function __wbg_length_68a9d5278d084f4f(arg0) {
522
+ export function __wbg_length_1f0964f4a5e2c6d8(arg0) {
523
523
  const ret = arg0.length;
524
524
  return ret;
525
525
  }
526
- export function __wbg_length_fb04d16d7bdf6d4c(arg0) {
526
+ export function __wbg_length_370319915dc99107(arg0) {
527
527
  const ret = arg0.length;
528
528
  return ret;
529
529
  }
530
- export function __wbg_new_0b303268aa395a38() {
530
+ export function __wbg_new_32b398fb48b6d94a() {
531
531
  const ret = new Array();
532
532
  return ret;
533
533
  }
534
- export function __wbg_new_20b778a4c5c691c3() {
534
+ export function __wbg_new_cd45aabdf6073e84(arg0) {
535
+ const ret = new Uint8Array(arg0);
536
+ return ret;
537
+ }
538
+ export function __wbg_new_da52cf8fe3429cb2() {
535
539
  const ret = new Object();
536
540
  return ret;
537
541
  }
538
- export function __wbg_new_b06772b280cc6e52(arg0) {
539
- const ret = new Uint8Array(arg0);
542
+ export function __wbg_next_6dbf2c0ac8cde20f(arg0) {
543
+ const ret = arg0.next;
540
544
  return ret;
541
545
  }
542
- export function __wbg_next_8cb028b6ba50743f() { return handleError(function (arg0) {
546
+ export function __wbg_next_71f2aa1cb3d1e37e() { return handleError(function (arg0) {
543
547
  const ret = arg0.next();
544
548
  return ret;
545
549
  }, arguments); }
546
- export function __wbg_next_cfd0b146c9538df8(arg0) {
547
- const ret = arg0.next;
548
- return ret;
549
- }
550
- export function __wbg_prototypesetcall_956c7493c68e29b4(arg0, arg1, arg2) {
550
+ export function __wbg_prototypesetcall_4770620bbe4688a0(arg0, arg1, arg2) {
551
551
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
552
552
  }
553
553
  export function __wbg_set_6be42768c690e380(arg0, arg1, arg2) {
554
554
  arg0[arg1] = arg2;
555
555
  }
556
- export function __wbg_set_da33c120a6584674(arg0, arg1, arg2) {
556
+ export function __wbg_set_8a16b38e4805b298(arg0, arg1, arg2) {
557
557
  arg0[arg1 >>> 0] = arg2;
558
558
  }
559
- export function __wbg_value_3d3defe09fb1ffca(arg0) {
559
+ export function __wbg_value_a5d5488a9589444a(arg0) {
560
560
  const ret = arg0.value;
561
561
  return ret;
562
562
  }
package/u_doe_bg.wasm CHANGED
Binary file