@ultralytics/yolo 0.0.59 → 0.0.61

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.
@@ -37,7 +37,7 @@ export class YoloModel {
37
37
  let deferred1_0;
38
38
  let deferred1_1;
39
39
  try {
40
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
40
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
41
41
  wasm.yolomodel_device(retptr, this.__wbg_ptr);
42
42
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
43
43
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
@@ -46,7 +46,7 @@ export class YoloModel {
46
46
  return getStringFromWasm0(r0, r1);
47
47
  } finally {
48
48
  wasm.__wbindgen_add_to_stack_pointer(16);
49
- wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
49
+ wasm.__wbindgen_export3(deferred1_0, deferred1_1, 1);
50
50
  }
51
51
  }
52
52
  /**
@@ -64,20 +64,28 @@ export class YoloModel {
64
64
  * # Errors
65
65
  * Returns a JS error if the backend cannot start, the bytes are not a valid
66
66
  * model, or the model lacks Ultralytics metadata.
67
- * @param {Uint8Array} bytes
67
+ * @param {Uint8Array | number[]} bytes
68
68
  * @param {string | null | undefined} ort_base_url
69
69
  * @param {string} device
70
70
  * @returns {Promise<YoloModel>}
71
71
  */
72
72
  static load_bytes(bytes, ort_base_url, device) {
73
- const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
74
- const len0 = WASM_VECTOR_LEN;
75
- var ptr1 = isLikeNone(ort_base_url) ? 0 : passStringToWasm0(ort_base_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
76
- var len1 = WASM_VECTOR_LEN;
77
- const ptr2 = passStringToWasm0(device, wasm.__wbindgen_export, wasm.__wbindgen_export2);
78
- const len2 = WASM_VECTOR_LEN;
73
+ let ptr0, len0, ptr1, len1, ptr2, len2;
74
+ try {
75
+ ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
76
+ len0 = WASM_VECTOR_LEN;
77
+ ptr1 = isLikeNone(ort_base_url) ? 0 : passStringToWasm0(ort_base_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
78
+ len1 = WASM_VECTOR_LEN;
79
+ ptr2 = passStringToWasm0(device, wasm.__wbindgen_export, wasm.__wbindgen_export2);
80
+ len2 = WASM_VECTOR_LEN;
81
+ } catch (e) {
82
+ if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
83
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
84
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
85
+ throw e;
86
+ }
79
87
  const ret = wasm.yolomodel_load_bytes(ptr0, len0, ptr1, len1, ptr2, len2);
80
- return takeObject(ret);
88
+ return ret;
81
89
  }
82
90
  /**
83
91
  * Class id -> name map (like Ultralytics `model.names`), as a JS object.
@@ -88,15 +96,15 @@ export class YoloModel {
88
96
  */
89
97
  get names() {
90
98
  try {
91
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
99
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
92
100
  wasm.yolomodel_names(retptr, this.__wbg_ptr);
93
101
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
94
102
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
95
103
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
96
104
  if (r2) {
97
- throw takeObject(r1);
105
+ throw takeFromExternrefTable0(r1);
98
106
  }
99
- return takeObject(r0);
107
+ return takeFromExternrefTable0(r0);
100
108
  } finally {
101
109
  wasm.__wbindgen_add_to_stack_pointer(16);
102
110
  }
@@ -107,29 +115,47 @@ export class YoloModel {
107
115
  * `conf` and `iou` are the confidence and NMS IoU thresholds (omit them for the
108
116
  * Ultralytics defaults 0.25 / 0.5); `classes` optionally keeps only
109
117
  * the given class ids (for semantic, other pixels become background).
118
+ * `tracker` (`"tracktrack.yaml"`, `"botsort.yaml"`, ...) tracks the detections across
119
+ * calls like Ultralytics `model.track(persist=True)`, starting anew when it changes.
110
120
  * Returns a plain JS object whose shape mirrors the Ultralytics `Results` API.
111
121
  *
112
122
  * # Errors
113
- * Returns a JS error if the image cannot be decoded or inference fails.
114
- * @param {Uint8Array} image
123
+ * Returns a JS error if the image cannot be decoded, the tracker is unknown or
124
+ * inference fails.
125
+ * @param {Uint8Array | number[]} image
115
126
  * @param {number | null | undefined} conf
116
127
  * @param {number | null | undefined} iou
117
- * @param {Uint32Array | null | undefined} classes
128
+ * @param {Uint32Array | number[] | null | undefined} classes
118
129
  * @param {string} colormap
119
130
  * @param {string} depth_viz
131
+ * @param {string | null} [tracker]
120
132
  * @returns {Promise<any>}
121
133
  */
122
- predict(image, conf, iou, classes, colormap, depth_viz) {
123
- const ptr0 = passArray8ToWasm0(image, wasm.__wbindgen_export);
124
- const len0 = WASM_VECTOR_LEN;
125
- var ptr1 = isLikeNone(classes) ? 0 : passArray32ToWasm0(classes, wasm.__wbindgen_export);
126
- var len1 = WASM_VECTOR_LEN;
127
- const ptr2 = passStringToWasm0(colormap, wasm.__wbindgen_export, wasm.__wbindgen_export2);
128
- const len2 = WASM_VECTOR_LEN;
129
- const ptr3 = passStringToWasm0(depth_viz, wasm.__wbindgen_export, wasm.__wbindgen_export2);
130
- const len3 = WASM_VECTOR_LEN;
131
- const ret = wasm.yolomodel_predict(this.__wbg_ptr, ptr0, len0, isLikeNone(conf) ? Number.MAX_SAFE_INTEGER : Math.fround(conf), isLikeNone(iou) ? Number.MAX_SAFE_INTEGER : Math.fround(iou), ptr1, len1, ptr2, len2, ptr3, len3);
132
- return takeObject(ret);
134
+ predict(image, conf, iou, classes, colormap, depth_viz, tracker) {
135
+ const val6 = +(isLikeNone(conf) ? Number.MAX_SAFE_INTEGER : Math.fround(conf));
136
+ const val7 = +(isLikeNone(iou) ? Number.MAX_SAFE_INTEGER : Math.fround(iou));
137
+ let ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4;
138
+ try {
139
+ ptr0 = passArray8ToWasm0(image, wasm.__wbindgen_export);
140
+ len0 = WASM_VECTOR_LEN;
141
+ ptr1 = isLikeNone(classes) ? 0 : passArray32ToWasm0(classes, wasm.__wbindgen_export);
142
+ len1 = WASM_VECTOR_LEN;
143
+ ptr2 = passStringToWasm0(colormap, wasm.__wbindgen_export, wasm.__wbindgen_export2);
144
+ len2 = WASM_VECTOR_LEN;
145
+ ptr3 = passStringToWasm0(depth_viz, wasm.__wbindgen_export, wasm.__wbindgen_export2);
146
+ len3 = WASM_VECTOR_LEN;
147
+ ptr4 = isLikeNone(tracker) ? 0 : passStringToWasm0(tracker, wasm.__wbindgen_export, wasm.__wbindgen_export2);
148
+ len4 = WASM_VECTOR_LEN;
149
+ } catch (e) {
150
+ if (ptr4) { wasm.__wbindgen_export3(ptr4, len4 * 1, 1); }
151
+ if (ptr3) { wasm.__wbindgen_export3(ptr3, len3 * 1, 1); }
152
+ if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
153
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 4, 4); }
154
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
155
+ throw e;
156
+ }
157
+ const ret = wasm.yolomodel_predict(this.__wbg_ptr, ptr0, len0, val6, val7, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4);
158
+ return ret;
133
159
  }
134
160
  /**
135
161
  * Run inference on raw `RGBA` pixels (e.g. a canvas/webcam `ImageData`).
@@ -139,27 +165,50 @@ export class YoloModel {
139
165
  *
140
166
  * # Errors
141
167
  * Returns a JS error if the buffer size is wrong or inference fails.
142
- * @param {Uint8Array} rgba
168
+ * @param {Uint8Array | number[]} rgba
143
169
  * @param {number} width
144
170
  * @param {number} height
145
171
  * @param {number | null | undefined} conf
146
172
  * @param {number | null | undefined} iou
147
- * @param {Uint32Array | null | undefined} classes
173
+ * @param {Uint32Array | number[] | null | undefined} classes
148
174
  * @param {string} colormap
149
175
  * @param {string} depth_viz
176
+ * @param {string | null} [tracker]
150
177
  * @returns {Promise<any>}
151
178
  */
152
- predict_rgba(rgba, width, height, conf, iou, classes, colormap, depth_viz) {
153
- const ptr0 = passArray8ToWasm0(rgba, wasm.__wbindgen_export);
154
- const len0 = WASM_VECTOR_LEN;
155
- var ptr1 = isLikeNone(classes) ? 0 : passArray32ToWasm0(classes, wasm.__wbindgen_export);
156
- var len1 = WASM_VECTOR_LEN;
157
- const ptr2 = passStringToWasm0(colormap, wasm.__wbindgen_export, wasm.__wbindgen_export2);
158
- const len2 = WASM_VECTOR_LEN;
159
- const ptr3 = passStringToWasm0(depth_viz, wasm.__wbindgen_export, wasm.__wbindgen_export2);
160
- const len3 = WASM_VECTOR_LEN;
161
- const ret = wasm.yolomodel_predict_rgba(this.__wbg_ptr, ptr0, len0, width, height, isLikeNone(conf) ? Number.MAX_SAFE_INTEGER : Math.fround(conf), isLikeNone(iou) ? Number.MAX_SAFE_INTEGER : Math.fround(iou), ptr1, len1, ptr2, len2, ptr3, len3);
162
- return takeObject(ret);
179
+ predict_rgba(rgba, width, height, conf, iou, classes, colormap, depth_viz, tracker) {
180
+ const val6 = +width;
181
+ const val7 = +height;
182
+ const val8 = +(isLikeNone(conf) ? Number.MAX_SAFE_INTEGER : Math.fround(conf));
183
+ const val9 = +(isLikeNone(iou) ? Number.MAX_SAFE_INTEGER : Math.fround(iou));
184
+ let ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4;
185
+ try {
186
+ ptr0 = passArray8ToWasm0(rgba, wasm.__wbindgen_export);
187
+ len0 = WASM_VECTOR_LEN;
188
+ ptr1 = isLikeNone(classes) ? 0 : passArray32ToWasm0(classes, wasm.__wbindgen_export);
189
+ len1 = WASM_VECTOR_LEN;
190
+ ptr2 = passStringToWasm0(colormap, wasm.__wbindgen_export, wasm.__wbindgen_export2);
191
+ len2 = WASM_VECTOR_LEN;
192
+ ptr3 = passStringToWasm0(depth_viz, wasm.__wbindgen_export, wasm.__wbindgen_export2);
193
+ len3 = WASM_VECTOR_LEN;
194
+ ptr4 = isLikeNone(tracker) ? 0 : passStringToWasm0(tracker, wasm.__wbindgen_export, wasm.__wbindgen_export2);
195
+ len4 = WASM_VECTOR_LEN;
196
+ } catch (e) {
197
+ if (ptr4) { wasm.__wbindgen_export3(ptr4, len4 * 1, 1); }
198
+ if (ptr3) { wasm.__wbindgen_export3(ptr3, len3 * 1, 1); }
199
+ if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
200
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 4, 4); }
201
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
202
+ throw e;
203
+ }
204
+ const ret = wasm.yolomodel_predict_rgba(this.__wbg_ptr, ptr0, len0, val6, val7, val8, val9, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4);
205
+ return ret;
206
+ }
207
+ /**
208
+ * Forget the tracks, so the next frame starts a new video.
209
+ */
210
+ reset_tracker() {
211
+ wasm.yolomodel_reset_tracker(this.__wbg_ptr);
163
212
  }
164
213
  /**
165
214
  * The model's task (`"detect"`, `"segment"`, `"semantic"`, `"depth"`,
@@ -170,7 +219,7 @@ export class YoloModel {
170
219
  let deferred1_0;
171
220
  let deferred1_1;
172
221
  try {
173
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
222
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
174
223
  wasm.yolomodel_task(retptr, this.__wbg_ptr);
175
224
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
176
225
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
@@ -179,7 +228,7 @@ export class YoloModel {
179
228
  return getStringFromWasm0(r0, r1);
180
229
  } finally {
181
230
  wasm.__wbindgen_add_to_stack_pointer(16);
182
- wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
231
+ wasm.__wbindgen_export3(deferred1_0, deferred1_1, 1);
183
232
  }
184
233
  }
185
234
  }
@@ -215,12 +264,12 @@ export class YoloPipeline {
215
264
  */
216
265
  get inputShape() {
217
266
  try {
218
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
267
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
219
268
  wasm.yolopipeline_inputShape(retptr, this.__wbg_ptr);
220
269
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
221
270
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
222
271
  var v1 = getArrayU32FromWasm0(r0, r1).slice();
223
- wasm.__wbindgen_export4(r0, r1 * 4, 4);
272
+ wasm.__wbindgen_export3(r0, r1 * 4, 4);
224
273
  return v1;
225
274
  } finally {
226
275
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -235,15 +284,15 @@ export class YoloPipeline {
235
284
  */
236
285
  get names() {
237
286
  try {
238
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
287
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
239
288
  wasm.yolopipeline_names(retptr, this.__wbg_ptr);
240
289
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
241
290
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
242
291
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
243
292
  if (r2) {
244
- throw takeObject(r1);
293
+ throw takeFromExternrefTable0(r1);
245
294
  }
246
- return takeObject(r0);
295
+ return takeFromExternrefTable0(r0);
247
296
  } finally {
248
297
  wasm.__wbindgen_add_to_stack_pointer(16);
249
298
  }
@@ -257,11 +306,11 @@ export class YoloPipeline {
257
306
  * # Errors
258
307
  * Returns a JS error if the model carries no Ultralytics metadata or it
259
308
  * cannot be parsed.
260
- * @param {Uint8Array} tflite
309
+ * @param {Uint8Array | number[]} tflite
261
310
  */
262
311
  constructor(tflite) {
263
312
  try {
264
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
313
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
265
314
  const ptr0 = passArray8ToWasm0(tflite, wasm.__wbindgen_export);
266
315
  const len0 = WASM_VECTOR_LEN;
267
316
  wasm.yolopipeline_new(retptr, ptr0, len0);
@@ -269,7 +318,7 @@ export class YoloPipeline {
269
318
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
270
319
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
271
320
  if (r2) {
272
- throw takeObject(r1);
321
+ throw takeFromExternrefTable0(r1);
273
322
  }
274
323
  this.__wbg_ptr = r0;
275
324
  YoloPipelineFinalization.register(this, this.__wbg_ptr, this);
@@ -285,43 +334,61 @@ export class YoloPipeline {
285
334
  * segmentation: detection head + mask prototypes), with one entry of dims per
286
335
  * output in `shapes`. `inference_ms`
287
336
  * is the time the JS engine reported, used only for the `speed` breakdown.
337
+ * `tracker` tracks the detections as in [`YoloModel::predict`].
288
338
  * Consumes the frame stashed by the preceding
289
339
  * [`preprocess_rgba`](Self::preprocess_rgba).
290
340
  *
291
341
  * # Errors
292
342
  * Returns a JS error if called before `preprocess_rgba`, if `shapes` does not
293
- * have one entry per output, or on serialization failure.
343
+ * have one entry per output, if the tracker is unknown, or on serialization failure.
294
344
  * @param {Float32Array[]} outputs
295
345
  * @param {Uint32Array[]} shapes
296
346
  * @param {number} inference_ms
297
347
  * @param {number | null | undefined} conf
298
348
  * @param {number | null | undefined} iou
299
- * @param {Uint32Array | null | undefined} classes
349
+ * @param {Uint32Array | number[] | null | undefined} classes
300
350
  * @param {string} colormap
301
351
  * @param {string} depth_viz
352
+ * @param {string | null} [tracker]
302
353
  * @returns {any}
303
354
  */
304
- postprocess(outputs, shapes, inference_ms, conf, iou, classes, colormap, depth_viz) {
355
+ postprocess(outputs, shapes, inference_ms, conf, iou, classes, colormap, depth_viz, tracker) {
305
356
  try {
306
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
307
- const ptr0 = passArrayJsValueToWasm0(outputs, wasm.__wbindgen_export);
308
- const len0 = WASM_VECTOR_LEN;
309
- const ptr1 = passArrayJsValueToWasm0(shapes, wasm.__wbindgen_export);
310
- const len1 = WASM_VECTOR_LEN;
311
- var ptr2 = isLikeNone(classes) ? 0 : passArray32ToWasm0(classes, wasm.__wbindgen_export);
312
- var len2 = WASM_VECTOR_LEN;
313
- const ptr3 = passStringToWasm0(colormap, wasm.__wbindgen_export, wasm.__wbindgen_export2);
314
- const len3 = WASM_VECTOR_LEN;
315
- const ptr4 = passStringToWasm0(depth_viz, wasm.__wbindgen_export, wasm.__wbindgen_export2);
316
- const len4 = WASM_VECTOR_LEN;
317
- wasm.yolopipeline_postprocess(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, inference_ms, isLikeNone(conf) ? Number.MAX_SAFE_INTEGER : Math.fround(conf), isLikeNone(iou) ? Number.MAX_SAFE_INTEGER : Math.fround(iou), ptr2, len2, ptr3, len3, ptr4, len4);
357
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
358
+ const val7 = +inference_ms;
359
+ const val8 = +(isLikeNone(conf) ? Number.MAX_SAFE_INTEGER : Math.fround(conf));
360
+ const val9 = +(isLikeNone(iou) ? Number.MAX_SAFE_INTEGER : Math.fround(iou));
361
+ let ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5;
362
+ try {
363
+ ptr0 = passArrayJsValueToWasm0(outputs, wasm.__wbindgen_export);
364
+ len0 = WASM_VECTOR_LEN;
365
+ ptr1 = passArrayJsValueToWasm0(shapes, wasm.__wbindgen_export);
366
+ len1 = WASM_VECTOR_LEN;
367
+ ptr2 = isLikeNone(classes) ? 0 : passArray32ToWasm0(classes, wasm.__wbindgen_export);
368
+ len2 = WASM_VECTOR_LEN;
369
+ ptr3 = passStringToWasm0(colormap, wasm.__wbindgen_export, wasm.__wbindgen_export2);
370
+ len3 = WASM_VECTOR_LEN;
371
+ ptr4 = passStringToWasm0(depth_viz, wasm.__wbindgen_export, wasm.__wbindgen_export2);
372
+ len4 = WASM_VECTOR_LEN;
373
+ ptr5 = isLikeNone(tracker) ? 0 : passStringToWasm0(tracker, wasm.__wbindgen_export, wasm.__wbindgen_export2);
374
+ len5 = WASM_VECTOR_LEN;
375
+ } catch (e) {
376
+ if (ptr5) { wasm.__wbindgen_export3(ptr5, len5 * 1, 1); }
377
+ if (ptr4) { wasm.__wbindgen_export3(ptr4, len4 * 1, 1); }
378
+ if (ptr3) { wasm.__wbindgen_export3(ptr3, len3 * 1, 1); }
379
+ if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 4, 4); }
380
+ if (ptr1) { wasm.__wbindgen_export6(ptr1, len1); wasm.__wbindgen_export3(ptr1, len1 * 4, 4); }
381
+ if (ptr0) { wasm.__wbindgen_export6(ptr0, len0); wasm.__wbindgen_export3(ptr0, len0 * 4, 4); }
382
+ throw e;
383
+ }
384
+ wasm.yolopipeline_postprocess(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, val7, val8, val9, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5);
318
385
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
319
386
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
320
387
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
321
388
  if (r2) {
322
- throw takeObject(r1);
389
+ throw takeFromExternrefTable0(r1);
323
390
  }
324
- return takeObject(r0);
391
+ return takeFromExternrefTable0(r0);
325
392
  } finally {
326
393
  wasm.__wbindgen_add_to_stack_pointer(16);
327
394
  }
@@ -337,28 +404,36 @@ export class YoloPipeline {
337
404
  *
338
405
  * # Errors
339
406
  * Returns a JS error if the buffer size is not `width * height * 4`.
340
- * @param {Uint8Array} rgba
407
+ * @param {Uint8Array | number[]} rgba
341
408
  * @param {number} width
342
409
  * @param {number} height
343
410
  * @returns {Float32Array}
344
411
  */
345
412
  preprocess_rgba(rgba, width, height) {
346
413
  try {
347
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
414
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
415
+ const val2 = +width;
416
+ const val3 = +height;
348
417
  const ptr0 = passArray8ToWasm0(rgba, wasm.__wbindgen_export);
349
418
  const len0 = WASM_VECTOR_LEN;
350
- wasm.yolopipeline_preprocess_rgba(retptr, this.__wbg_ptr, ptr0, len0, width, height);
419
+ wasm.yolopipeline_preprocess_rgba(retptr, this.__wbg_ptr, ptr0, len0, val2, val3);
351
420
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
352
421
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
353
422
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
354
423
  if (r2) {
355
- throw takeObject(r1);
424
+ throw takeFromExternrefTable0(r1);
356
425
  }
357
- return takeObject(r0);
426
+ return takeFromExternrefTable0(r0);
358
427
  } finally {
359
428
  wasm.__wbindgen_add_to_stack_pointer(16);
360
429
  }
361
430
  }
431
+ /**
432
+ * Forget the tracks, so the next frame starts a new video.
433
+ */
434
+ reset_tracker() {
435
+ wasm.yolopipeline_reset_tracker(this.__wbg_ptr);
436
+ }
362
437
  /**
363
438
  * Adopt the input shape the engine reports for the compiled model.
364
439
  *
@@ -372,7 +447,7 @@ export class YoloPipeline {
372
447
  * the engine reports. Any other rank or layout (a channels-last `[N, H, W, 3]`) and any
373
448
  * non-positive axis, which is how a dynamic dimension is reported, is ignored and leaves
374
449
  * the metadata size in place.
375
- * @param {Int32Array} shape
450
+ * @param {Int32Array | number[]} shape
376
451
  */
377
452
  setInputShape(shape) {
378
453
  const ptr0 = passArray32ToWasm0(shape, wasm.__wbindgen_export);
@@ -387,7 +462,7 @@ export class YoloPipeline {
387
462
  let deferred1_0;
388
463
  let deferred1_1;
389
464
  try {
390
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
465
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
391
466
  wasm.yolopipeline_task(retptr, this.__wbg_ptr);
392
467
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
393
468
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
@@ -396,7 +471,7 @@ export class YoloPipeline {
396
471
  return getStringFromWasm0(r0, r1);
397
472
  } finally {
398
473
  wasm.__wbindgen_add_to_stack_pointer(16);
399
- wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
474
+ wasm.__wbindgen_export3(deferred1_0, deferred1_1, 1);
400
475
  }
401
476
  }
402
477
  }
@@ -413,14 +488,14 @@ if (Symbol.dispose) YoloPipeline.prototype[Symbol.dispose] = YoloPipeline.protot
413
488
  */
414
489
  export function bidi_runs(text) {
415
490
  try {
416
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
491
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
417
492
  const ptr0 = passStringToWasm0(text, wasm.__wbindgen_export, wasm.__wbindgen_export2);
418
493
  const len0 = WASM_VECTOR_LEN;
419
494
  wasm.bidi_runs(retptr, ptr0, len0);
420
495
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
421
496
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
422
497
  var v2 = getArrayJsValueFromWasm0(r0, r1);
423
- wasm.__wbindgen_export4(r0, r1 * 4, 4);
498
+ wasm.__wbindgen_export3(r0, r1 * 4, 4);
424
499
  return v2;
425
500
  } finally {
426
501
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -437,15 +512,15 @@ export function bidi_runs(text) {
437
512
  */
438
513
  export function pose_palette() {
439
514
  try {
440
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
515
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
441
516
  wasm.pose_palette(retptr);
442
517
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
443
518
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
444
519
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
445
520
  if (r2) {
446
- throw takeObject(r1);
521
+ throw takeFromExternrefTable0(r1);
447
522
  }
448
- return takeObject(r0);
523
+ return takeFromExternrefTable0(r0);
449
524
  } finally {
450
525
  wasm.__wbindgen_add_to_stack_pointer(16);
451
526
  }
@@ -460,137 +535,137 @@ export function start() {
460
535
  function __wbg_get_imports() {
461
536
  const import0 = {
462
537
  __proto__: null,
463
- __wbg_Error_30c8987f7c2ed4e2: function(arg0, arg1) {
538
+ __wbg_Error_208446807d0d1e30: function(arg0, arg1) {
464
539
  const ret = Error(getStringFromWasm0(arg0, arg1));
465
- return addHeapObject(ret);
540
+ return ret;
466
541
  },
467
542
  __wbg_String_8564e559799eccda: function(arg0, arg1) {
468
- const ret = String(getObject(arg1));
543
+ const ret = String(arg1);
469
544
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
470
545
  const len1 = WASM_VECTOR_LEN;
471
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
472
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
546
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
547
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
473
548
  },
474
- __wbg___wbindgen_bigint_get_as_i64_a2383202b9353e4c: function(arg0, arg1) {
475
- const v = getObject(arg1);
549
+ __wbg___wbindgen_bigint_get_as_i64_11da4b52cd0aedef: function(arg0, arg1) {
550
+ const v = arg1;
476
551
  const ret = typeof(v) === 'bigint' ? v : undefined;
477
- getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
478
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
552
+ getDataViewMemory0().setBigInt64((arg0 >>> 0) + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
553
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, !isLikeNone(ret), true);
479
554
  },
480
- __wbg___wbindgen_boolean_get_5b446f51afd21013: function(arg0) {
481
- const v = getObject(arg0);
555
+ __wbg___wbindgen_boolean_get_4f1baf9a00be3c74: function(arg0) {
556
+ const v = arg0;
482
557
  const ret = typeof(v) === 'boolean' ? v : undefined;
483
558
  return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
484
559
  },
485
- __wbg___wbindgen_debug_string_4687d8d8c2017d52: function(arg0, arg1) {
486
- const ret = debugString(getObject(arg1));
560
+ __wbg___wbindgen_debug_string_f249a2a76caa9a55: function(arg0, arg1) {
561
+ const ret = debugString(arg1);
487
562
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
488
563
  const len1 = WASM_VECTOR_LEN;
489
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
490
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
564
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
565
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
491
566
  },
492
- __wbg___wbindgen_in_92f62ee1427d9e49: function(arg0, arg1) {
493
- const ret = getObject(arg0) in getObject(arg1);
567
+ __wbg___wbindgen_in_3f58a9d3b3a7eed2: function(arg0, arg1) {
568
+ const ret = arg0 in arg1;
494
569
  return ret;
495
570
  },
496
- __wbg___wbindgen_is_bigint_b123553bed3bb382: function(arg0) {
497
- const ret = typeof(getObject(arg0)) === 'bigint';
571
+ __wbg___wbindgen_is_bigint_5fa10641e039d3ef: function(arg0) {
572
+ const ret = typeof(arg0) === 'bigint';
498
573
  return ret;
499
574
  },
500
- __wbg___wbindgen_is_function_1f9d30630b8b1d3d: function(arg0) {
501
- const ret = typeof(getObject(arg0)) === 'function';
575
+ __wbg___wbindgen_is_function_741ff2bb612836f5: function(arg0) {
576
+ const ret = typeof(arg0) === 'function';
502
577
  return ret;
503
578
  },
504
- __wbg___wbindgen_is_object_3c45d4f2dde4e749: function(arg0) {
505
- const val = getObject(arg0);
579
+ __wbg___wbindgen_is_object_8b968c3ab8e96595: function(arg0) {
580
+ const val = arg0;
506
581
  const ret = typeof(val) === 'object' && val !== null;
507
582
  return ret;
508
583
  },
509
- __wbg___wbindgen_is_string_90b56bc79aad6f6c: function(arg0) {
510
- const ret = typeof(getObject(arg0)) === 'string';
584
+ __wbg___wbindgen_is_string_fc456fee5d3317de: function(arg0) {
585
+ const ret = typeof(arg0) === 'string';
511
586
  return ret;
512
587
  },
513
- __wbg___wbindgen_is_undefined_8865fb403f8fe9d8: function(arg0) {
514
- const ret = getObject(arg0) === undefined;
588
+ __wbg___wbindgen_is_undefined_be5b34249ff1fc15: function(arg0) {
589
+ const ret = arg0 === undefined;
515
590
  return ret;
516
591
  },
517
- __wbg___wbindgen_jsval_eq_02babf21faa37971: function(arg0, arg1) {
518
- const ret = getObject(arg0) === getObject(arg1);
592
+ __wbg___wbindgen_jsval_eq_38d7bfbe4cc84039: function(arg0, arg1) {
593
+ const ret = arg0 === arg1;
519
594
  return ret;
520
595
  },
521
- __wbg___wbindgen_jsval_loose_eq_677f21e468d6b461: function(arg0, arg1) {
522
- const ret = getObject(arg0) == getObject(arg1);
596
+ __wbg___wbindgen_jsval_loose_eq_b2f214e2e4b30e36: function(arg0, arg1) {
597
+ const ret = arg0 == arg1;
523
598
  return ret;
524
599
  },
525
- __wbg___wbindgen_number_get_2e0e7dee9f701a71: function(arg0, arg1) {
526
- const obj = getObject(arg1);
600
+ __wbg___wbindgen_number_get_934b640d0889af78: function(arg0, arg1) {
601
+ const obj = arg1;
527
602
  const ret = typeof(obj) === 'number' ? obj : undefined;
528
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
529
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
603
+ getDataViewMemory0().setFloat64((arg0 >>> 0) + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
604
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, !isLikeNone(ret), true);
530
605
  },
531
- __wbg___wbindgen_string_get_0380ccaa2f57f0d9: function(arg0, arg1) {
532
- const obj = getObject(arg1);
606
+ __wbg___wbindgen_string_get_7ce8eee7fd327545: function(arg0, arg1) {
607
+ const obj = arg1;
533
608
  const ret = typeof(obj) === 'string' ? obj : undefined;
534
609
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
535
610
  var len1 = WASM_VECTOR_LEN;
536
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
537
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
611
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
612
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
538
613
  },
539
- __wbg___wbindgen_throw_41e9ee4f547fc59a: function(arg0, arg1) {
614
+ __wbg___wbindgen_throw_4c88d8bf264fd984: function(arg0, arg1) {
540
615
  throw new Error(getStringFromWasm0(arg0, arg1));
541
616
  },
542
- __wbg__wbg_cb_unref_dcc1a90847f04c41: function(arg0) {
543
- getObject(arg0)._wbg_cb_unref();
617
+ __wbg__wbg_cb_unref_09736879a3f67559: function(arg0) {
618
+ arg0._wbg_cb_unref();
544
619
  },
545
- __wbg_buffer_56ec2905a66f58b9: function(arg0) {
546
- const ret = getObject(arg0).buffer;
547
- return addHeapObject(ret);
620
+ __wbg_buffer_aca05a93c046db1a: function(arg0) {
621
+ const ret = arg0.buffer;
622
+ return ret;
548
623
  },
549
- __wbg_byteLength_9f985b8373f1f3fe: function(arg0) {
550
- const ret = getObject(arg0).byteLength;
624
+ __wbg_byteLength_c5f3c188d5252e5b: function(arg0) {
625
+ const ret = arg0.byteLength;
551
626
  return ret;
552
627
  },
553
- __wbg_byteOffset_0bd5a6a03553639c: function(arg0) {
554
- const ret = getObject(arg0).byteOffset;
628
+ __wbg_byteOffset_63cdc7b38f33a45e: function(arg0) {
629
+ const ret = arg0.byteOffset;
555
630
  return ret;
556
631
  },
557
- __wbg_call_187d372bd5fdd4aa: function() { return handleError(function (arg0, arg1, arg2) {
558
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
559
- return addHeapObject(ret);
632
+ __wbg_call_40b008ba32f73991: function() { return handleError(function (arg0, arg1) {
633
+ const ret = arg0.call(arg1);
634
+ return ret;
560
635
  }, arguments); },
561
- __wbg_call_6137034ef55c9d0f: function() { return handleError(function (arg0, arg1) {
562
- const ret = getObject(arg0).call(getObject(arg1));
563
- return addHeapObject(ret);
636
+ __wbg_call_a410eb4b59ed5965: function() { return handleError(function (arg0, arg1, arg2) {
637
+ const ret = arg0.call(arg1, arg2);
638
+ return ret;
564
639
  }, arguments); },
565
- __wbg_create_07db378e252080ec: function() { return handleError(function (arg0, arg1, arg2) {
566
- const ret = ort.InferenceSession.create(getStringFromWasm0(arg0, arg1), takeObject(arg2));
567
- return addHeapObject(ret);
640
+ __wbg_create_d7666802f5ae6eeb: function() { return handleError(function (arg0, arg1, arg2) {
641
+ const ret = ort.InferenceSession.create(getStringFromWasm0(arg0, arg1), arg2);
642
+ return ret;
568
643
  }, arguments); },
569
- __wbg_create_573b47018e76ad99: function() { return handleError(function (arg0, arg1) {
570
- const ret = ort.InferenceSession.create(getObject(arg0), takeObject(arg1));
571
- return addHeapObject(ret);
644
+ __wbg_create_dc710521629ee436: function() { return handleError(function (arg0, arg1) {
645
+ const ret = ort.InferenceSession.create(arg0, arg1);
646
+ return ret;
572
647
  }, arguments); },
573
- __wbg_data_e242aa3d2f3b3ce2: function() { return handleError(function (arg0) {
574
- const ret = getObject(arg0).data;
575
- return addHeapObject(ret);
648
+ __wbg_data_a24b5aaa619be2c9: function() { return handleError(function (arg0) {
649
+ const ret = arg0.data;
650
+ return ret;
576
651
  }, arguments); },
577
- __wbg_dims_b9c966d20c2a4d79: function(arg0, arg1) {
578
- const ret = getObject(arg1).dims;
652
+ __wbg_dims_7fd35ebcec0e468d: function(arg0, arg1) {
653
+ const ret = arg1.dims;
579
654
  const ptr1 = passArrayF64ToWasm0(ret, wasm.__wbindgen_export);
580
655
  const len1 = WASM_VECTOR_LEN;
581
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
582
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
656
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
657
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
583
658
  },
584
- __wbg_dispose_17a92fe091ac456b: function() { return handleError(function (arg0) {
585
- getObject(arg0).dispose();
659
+ __wbg_dispose_1c127b4bca3ac16f: function() { return handleError(function (arg0) {
660
+ arg0.dispose();
586
661
  }, arguments); },
587
- __wbg_done_b41a1d26cdb37fb6: function(arg0) {
588
- const ret = getObject(arg0).done;
662
+ __wbg_done_57e08d0be6e30c02: function(arg0) {
663
+ const ret = arg0.done;
589
664
  return ret;
590
665
  },
591
- __wbg_entries_fb6397112b1de25f: function(arg0) {
592
- const ret = Object.entries(getObject(arg0));
593
- return addHeapObject(ret);
666
+ __wbg_entries_7bb1459bd9b5c2b9: function(arg0) {
667
+ const ret = Object.entries(arg0);
668
+ return ret;
594
669
  },
595
670
  __wbg_error_757e9472f8410341: function(arg0, arg1) {
596
671
  let deferred0_0;
@@ -600,452 +675,453 @@ function __wbg_get_imports() {
600
675
  deferred0_1 = arg1;
601
676
  console.error(getStringFromWasm0(arg0, arg1));
602
677
  } finally {
603
- wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
678
+ wasm.__wbindgen_export3(deferred0_0, deferred0_1, 1);
604
679
  }
605
680
  },
606
- __wbg_from_296ca31f8d0f1c52: function(arg0) {
607
- const ret = Array.from(getObject(arg0));
608
- return addHeapObject(ret);
681
+ __wbg_from_eac91875c8a5ffa4: function(arg0) {
682
+ const ret = Array.from(arg0);
683
+ return ret;
609
684
  },
610
- __wbg_getData_ae0be7023598e2c2: function() { return handleError(function (arg0) {
611
- const ret = getObject(arg0).getData();
612
- return addHeapObject(ret);
685
+ __wbg_getData_7affaf0601c8d174: function() { return handleError(function (arg0) {
686
+ const ret = arg0.getData();
687
+ return ret;
613
688
  }, arguments); },
614
- __wbg_get_31af05bd4842a84f: function() { return handleError(function (arg0, arg1) {
615
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
616
- return addHeapObject(ret);
689
+ __wbg_get_2080c49015e35254: function() { return handleError(function (arg0, arg1) {
690
+ const ret = Reflect.get(arg0, arg1);
691
+ return ret;
617
692
  }, arguments); },
618
- __wbg_get_658f6698067d9515: function() { return handleError(function (arg0, arg1) {
619
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
620
- return addHeapObject(ret);
693
+ __wbg_get_635eea311fa1a291: function() { return handleError(function (arg0, arg1) {
694
+ const ret = Reflect.get(arg0, arg1);
695
+ return ret;
621
696
  }, arguments); },
622
- __wbg_get_6c896e0571ddae51: function(arg0, arg1) {
623
- const ret = getObject(arg0)[arg1 >>> 0];
624
- return addHeapObject(ret);
697
+ __wbg_get_d7176cfb76d71114: function(arg0, arg1) {
698
+ const ret = arg0[arg1 >>> 0];
699
+ return ret;
625
700
  },
626
- __wbg_get_unchecked_288889d017702237: function(arg0, arg1) {
627
- const ret = getObject(arg0)[arg1 >>> 0];
628
- return addHeapObject(ret);
701
+ __wbg_get_unchecked_e6325ad374eff861: function(arg0, arg1) {
702
+ const ret = arg0[arg1 >>> 0];
703
+ return ret;
629
704
  },
630
- __wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
631
- const ret = getObject(arg0)[getObject(arg1)];
632
- return addHeapObject(ret);
705
+ __wbg_get_with_ref_key_fc601247060b7204: function(arg0, arg1) {
706
+ const ret = arg0[arg1];
707
+ return ret;
633
708
  },
634
- __wbg_initRuntime_cfc81535b182a89a: function() { return handleError(function (arg0, arg1) {
635
- const ret = initRuntime(arg0, takeObject(arg1));
636
- return addHeapObject(ret);
709
+ __wbg_initRuntime_2d0128e21d688a1e: function() { return handleError(function (arg0, arg1) {
710
+ const ret = initRuntime(arg0, arg1);
711
+ return ret;
637
712
  }, arguments); },
638
- __wbg_inputMetadata_b0480cebe7a00667: function(arg0, arg1) {
639
- const ret = getObject(arg1).inputMetadata;
713
+ __wbg_inputMetadata_77b0d5a106ed1eab: function(arg0, arg1) {
714
+ const ret = arg1.inputMetadata;
640
715
  const ptr1 = passArrayJsValueToWasm0(ret, wasm.__wbindgen_export);
641
716
  const len1 = WASM_VECTOR_LEN;
642
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
643
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
717
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
718
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
644
719
  },
645
- __wbg_inputNames_2897599e914f9792: function(arg0, arg1) {
646
- const ret = getObject(arg1).inputNames;
720
+ __wbg_inputNames_8f4c4f6fe930f9c3: function(arg0, arg1) {
721
+ const ret = arg1.inputNames;
647
722
  const ptr1 = passArrayJsValueToWasm0(ret, wasm.__wbindgen_export);
648
723
  const len1 = WASM_VECTOR_LEN;
649
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
650
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
724
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
725
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
651
726
  },
652
- __wbg_instanceof_ArrayBuffer_a99f175873e5d9b8: function(arg0) {
727
+ __wbg_instanceof_ArrayBuffer_12cdaa4161423e6b: function(arg0) {
653
728
  let result;
654
729
  try {
655
- result = getObject(arg0) instanceof ArrayBuffer;
730
+ result = arg0 instanceof ArrayBuffer;
656
731
  } catch (_) {
657
732
  result = false;
658
733
  }
659
734
  const ret = result;
660
735
  return ret;
661
736
  },
662
- __wbg_instanceof_Map_b2611749102d7ba3: function(arg0) {
737
+ __wbg_instanceof_Map_0b4fc8b62e73f163: function(arg0) {
663
738
  let result;
664
739
  try {
665
- result = getObject(arg0) instanceof Map;
740
+ result = arg0 instanceof Map;
666
741
  } catch (_) {
667
742
  result = false;
668
743
  }
669
744
  const ret = result;
670
745
  return ret;
671
746
  },
672
- __wbg_instanceof_Performance_cbec0dbedaa91be1: function(arg0) {
747
+ __wbg_instanceof_Performance_2b9444a94b6a603f: function(arg0) {
673
748
  let result;
674
749
  try {
675
- result = getObject(arg0) instanceof Performance;
750
+ result = arg0 instanceof Performance;
676
751
  } catch (_) {
677
752
  result = false;
678
753
  }
679
754
  const ret = result;
680
755
  return ret;
681
756
  },
682
- __wbg_instanceof_Uint8Array_828cef2aaacafc31: function(arg0) {
757
+ __wbg_instanceof_Uint8Array_d7aeb0dcb3108fea: function(arg0) {
683
758
  let result;
684
759
  try {
685
- result = getObject(arg0) instanceof Uint8Array;
760
+ result = arg0 instanceof Uint8Array;
686
761
  } catch (_) {
687
762
  result = false;
688
763
  }
689
764
  const ret = result;
690
765
  return ret;
691
766
  },
692
- __wbg_isArray_e15a2ff68ffdbef2: function(arg0) {
693
- const ret = Array.isArray(getObject(arg0));
767
+ __wbg_isArray_bcf1376d0d732d08: function(arg0) {
768
+ const ret = Array.isArray(arg0);
694
769
  return ret;
695
770
  },
696
- __wbg_isSafeInteger_717808ad6a54bd9e: function(arg0) {
697
- const ret = Number.isSafeInteger(getObject(arg0));
771
+ __wbg_isSafeInteger_1a35ba4d31e71d38: function(arg0) {
772
+ const ret = Number.isSafeInteger(arg0);
698
773
  return ret;
699
774
  },
700
- __wbg_iterator_e3c31c892080e444: function() {
775
+ __wbg_iterator_e4c5e8f68ada7b58: function() {
701
776
  const ret = Symbol.iterator;
702
- return addHeapObject(ret);
777
+ return ret;
703
778
  },
704
- __wbg_length_511b1f84719d3462: function(arg0) {
705
- const ret = getObject(arg0).length;
779
+ __wbg_length_186163212ffe79c3: function(arg0) {
780
+ const ret = arg0.length;
706
781
  return ret;
707
782
  },
708
- __wbg_length_58572db4c38f3c3e: function(arg0) {
709
- const ret = getObject(arg0).length;
783
+ __wbg_length_6e9d2869242cabf3: function(arg0) {
784
+ const ret = arg0.length;
710
785
  return ret;
711
786
  },
712
- __wbg_length_7f3c00c40364105e: function(arg0) {
713
- const ret = getObject(arg0).length;
787
+ __wbg_length_b03a0fabb109b1e9: function(arg0) {
788
+ const ret = arg0.length;
714
789
  return ret;
715
790
  },
716
- __wbg_length_d4bdea10311bd9cf: function(arg0) {
717
- const ret = getObject(arg0).length;
791
+ __wbg_length_c702d06d28b96b72: function(arg0) {
792
+ const ret = arg0.length;
718
793
  return ret;
719
794
  },
720
- __wbg_location_02e5bf0e6b80a0f5: function(arg0) {
721
- const ret = getObject(arg0).location;
795
+ __wbg_location_c11d259837414607: function(arg0) {
796
+ const ret = arg0.location;
722
797
  return (__wbindgen_enum_DataLocation.indexOf(ret) + 1 || 7) - 1;
723
798
  },
724
- __wbg_message_5f8387f0c32b90a7: function(arg0) {
725
- const ret = getObject(arg0).message;
726
- return addHeapObject(ret);
799
+ __wbg_message_43d8c8f1d543a349: function(arg0) {
800
+ const ret = arg0.message;
801
+ return ret;
727
802
  },
728
- __wbg_new_1dbf7428bba60a42: function(arg0) {
729
- const ret = new Uint8Array(getObject(arg0));
730
- return addHeapObject(ret);
803
+ __wbg_new_13de428334042d26: function(arg0) {
804
+ const ret = new Uint8Array(arg0);
805
+ return ret;
731
806
  },
732
- __wbg_new_227d7c05414eb861: function() {
733
- const ret = new Error();
734
- return addHeapObject(ret);
807
+ __wbg_new_37eb45aaf5eeb820: function() {
808
+ const ret = new Array();
809
+ return ret;
735
810
  },
736
- __wbg_new_28744009d011f847: function() {
811
+ __wbg_new_7075786089b89c5e: function() {
737
812
  const ret = new Map();
738
- return addHeapObject(ret);
813
+ return ret;
739
814
  },
740
- __wbg_new_617a8cdb8bb1130e: function() {
741
- const ret = new Object();
742
- return addHeapObject(ret);
815
+ __wbg_new_bb74001155cb8ca8: function() {
816
+ const ret = new Error();
817
+ return ret;
743
818
  },
744
- __wbg_new_ee2291f50781bf1d: function() {
745
- const ret = new Array();
746
- return addHeapObject(ret);
819
+ __wbg_new_cd4348290afae586: function() {
820
+ const ret = new Object();
821
+ return ret;
747
822
  },
748
- __wbg_new_from_buffer_raw_eb33cdffdf32a27b: function() { return handleError(function (arg0, arg1, arg2) {
749
- const ret = new ort.Tensor(__wbindgen_enum_DataType[arg0], takeObject(arg1), takeObject(arg2));
750
- return addHeapObject(ret);
823
+ __wbg_new_from_buffer_raw_965a1e692b3f72c1: function() { return handleError(function (arg0, arg1, arg2) {
824
+ const ret = new ort.Tensor(__wbindgen_enum_DataType[arg0], arg1, arg2);
825
+ return ret;
751
826
  }, arguments); },
752
- __wbg_new_from_slice_9a868026ffa4208a: function(arg0, arg1) {
753
- const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
754
- return addHeapObject(ret);
755
- },
756
- __wbg_new_from_slice_ca6ad97db1f4779a: function(arg0, arg1) {
827
+ __wbg_new_from_slice_355c10c5d8f2addb: function(arg0, arg1) {
757
828
  const ret = new Float32Array(getArrayF32FromWasm0(arg0, arg1));
758
- return addHeapObject(ret);
829
+ return ret;
830
+ },
831
+ __wbg_new_from_slice_b8daf545a41c6aa0: function(arg0, arg1) {
832
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
833
+ return ret;
759
834
  },
760
- __wbg_new_typed_b01cb72a8af741a3: function(arg0, arg1) {
835
+ __wbg_new_typed_e09da9dae6ee5935: function(arg0, arg1) {
761
836
  try {
762
837
  var state0 = {a: arg0, b: arg1};
763
838
  var cb0 = (arg0, arg1) => {
764
839
  const a = state0.a;
765
840
  state0.a = 0;
766
841
  try {
767
- return __wasm_bindgen_func_elem_1891(a, state0.b, arg0, arg1);
842
+ return __wasm_bindgen_func_elem_1996(a, state0.b, arg0, arg1);
768
843
  } finally {
769
844
  state0.a = a;
770
845
  }
771
846
  };
772
847
  const ret = new Promise(cb0);
773
- return addHeapObject(ret);
848
+ return ret;
774
849
  } finally {
775
850
  state0.a = 0;
776
851
  }
777
852
  },
778
- __wbg_new_with_byte_offset_and_length_1dc9f6fbbe046da6: function(arg0, arg1, arg2) {
779
- const ret = new Uint16Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
780
- return addHeapObject(ret);
853
+ __wbg_new_with_byte_offset_and_length_0ed64ba86fd30b62: function(arg0, arg1, arg2) {
854
+ const ret = new BigInt64Array(arg0, arg1 >>> 0, arg2 >>> 0);
855
+ return ret;
781
856
  },
782
- __wbg_new_with_byte_offset_and_length_2f5d7fc2a828b74d: function(arg0, arg1, arg2) {
783
- const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
784
- return addHeapObject(ret);
857
+ __wbg_new_with_byte_offset_and_length_1ea36b9f0c3bc55a: function(arg0, arg1, arg2) {
858
+ const ret = new Float32Array(arg0, arg1 >>> 0, arg2 >>> 0);
859
+ return ret;
785
860
  },
786
- __wbg_new_with_byte_offset_and_length_40c170286adc9005: function(arg0, arg1, arg2) {
787
- const ret = new Float32Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
788
- return addHeapObject(ret);
861
+ __wbg_new_with_byte_offset_and_length_2d2fa37a22f87186: function(arg0, arg1, arg2) {
862
+ const ret = new Uint32Array(arg0, arg1 >>> 0, arg2 >>> 0);
863
+ return ret;
789
864
  },
790
- __wbg_new_with_byte_offset_and_length_6e8c68600a3ecb84: function(arg0, arg1, arg2) {
791
- const ret = new BigUint64Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
792
- return addHeapObject(ret);
865
+ __wbg_new_with_byte_offset_and_length_3cd32055a417f095: function(arg0, arg1, arg2) {
866
+ const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
867
+ return ret;
793
868
  },
794
- __wbg_new_with_byte_offset_and_length_820ea3ecbd1a4828: function(arg0, arg1, arg2) {
795
- const ret = new Int16Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
796
- return addHeapObject(ret);
869
+ __wbg_new_with_byte_offset_and_length_48227b70d0579fd3: function(arg0, arg1, arg2) {
870
+ const ret = new Int8Array(arg0, arg1 >>> 0, arg2 >>> 0);
871
+ return ret;
797
872
  },
798
- __wbg_new_with_byte_offset_and_length_915c5de4270ab7e5: function(arg0, arg1, arg2) {
799
- const ret = new Int8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
800
- return addHeapObject(ret);
873
+ __wbg_new_with_byte_offset_and_length_a867c16cdba43308: function(arg0, arg1, arg2) {
874
+ const ret = new BigUint64Array(arg0, arg1 >>> 0, arg2 >>> 0);
875
+ return ret;
801
876
  },
802
- __wbg_new_with_byte_offset_and_length_b93e61c4e9440336: function(arg0, arg1, arg2) {
803
- const ret = new Int32Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
804
- return addHeapObject(ret);
877
+ __wbg_new_with_byte_offset_and_length_c42676f2f088d709: function(arg0, arg1, arg2) {
878
+ const ret = new Float64Array(arg0, arg1 >>> 0, arg2 >>> 0);
879
+ return ret;
805
880
  },
806
- __wbg_new_with_byte_offset_and_length_bf3e693fe2fffb6f: function(arg0, arg1, arg2) {
807
- const ret = new Uint32Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
808
- return addHeapObject(ret);
881
+ __wbg_new_with_byte_offset_and_length_c71f41284ed576da: function(arg0, arg1, arg2) {
882
+ const ret = new Uint16Array(arg0, arg1 >>> 0, arg2 >>> 0);
883
+ return ret;
809
884
  },
810
- __wbg_new_with_byte_offset_and_length_c14d867a5878f875: function(arg0, arg1, arg2) {
811
- const ret = new BigInt64Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
812
- return addHeapObject(ret);
885
+ __wbg_new_with_byte_offset_and_length_d462c70bf9b35a75: function(arg0, arg1, arg2) {
886
+ const ret = new Int32Array(arg0, arg1 >>> 0, arg2 >>> 0);
887
+ return ret;
813
888
  },
814
- __wbg_new_with_byte_offset_and_length_edf873b0b3173456: function(arg0, arg1, arg2) {
815
- const ret = new Float64Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
816
- return addHeapObject(ret);
889
+ __wbg_new_with_byte_offset_and_length_d8c50823dc14d76f: function(arg0, arg1, arg2) {
890
+ const ret = new Int16Array(arg0, arg1 >>> 0, arg2 >>> 0);
891
+ return ret;
817
892
  },
818
- __wbg_next_33784799010f1bbe: function(arg0) {
819
- const ret = getObject(arg0).next;
820
- return addHeapObject(ret);
893
+ __wbg_next_178c1651c11432b3: function(arg0) {
894
+ const ret = arg0.next;
895
+ return ret;
821
896
  },
822
- __wbg_next_f4aac29c42af995c: function() { return handleError(function (arg0) {
823
- const ret = getObject(arg0).next();
824
- return addHeapObject(ret);
897
+ __wbg_next_af5ac6a08bb0a717: function() { return handleError(function (arg0) {
898
+ const ret = arg0.next();
899
+ return ret;
825
900
  }, arguments); },
826
- __wbg_now_d0b7f4bea9f38490: function(arg0) {
827
- const ret = getObject(arg0).now();
901
+ __wbg_now_043d245551b22f9c: function(arg0) {
902
+ const ret = arg0.now();
828
903
  return ret;
829
904
  },
830
- __wbg_outputMetadata_d74fba311b0cce30: function(arg0, arg1) {
831
- const ret = getObject(arg1).outputMetadata;
905
+ __wbg_outputMetadata_0bac175f09361817: function(arg0, arg1) {
906
+ const ret = arg1.outputMetadata;
832
907
  const ptr1 = passArrayJsValueToWasm0(ret, wasm.__wbindgen_export);
833
908
  const len1 = WASM_VECTOR_LEN;
834
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
835
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
909
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
910
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
836
911
  },
837
- __wbg_outputNames_26deb7d052bac410: function(arg0, arg1) {
838
- const ret = getObject(arg1).outputNames;
912
+ __wbg_outputNames_0840e8d28f5268b9: function(arg0, arg1) {
913
+ const ret = arg1.outputNames;
839
914
  const ptr1 = passArrayJsValueToWasm0(ret, wasm.__wbindgen_export);
840
915
  const len1 = WASM_VECTOR_LEN;
841
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
842
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
916
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
917
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
843
918
  },
844
- __wbg_ownKeys_7f46b96dc7311fe8: function() { return handleError(function (arg0) {
845
- const ret = Reflect.ownKeys(getObject(arg0));
846
- return addHeapObject(ret);
919
+ __wbg_ownKeys_c9890d5405932253: function() { return handleError(function (arg0) {
920
+ const ret = Reflect.ownKeys(arg0);
921
+ return ret;
847
922
  }, arguments); },
848
- __wbg_prototypesetcall_06eb15da165dee8f: function(arg0, arg1, arg2) {
849
- Uint32Array.prototype.set.call(getArrayU32FromWasm0(arg0, arg1), getObject(arg2));
923
+ __wbg_prototypesetcall_13162965d1fe7aa3: function(arg0, arg1, arg2) {
924
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
850
925
  },
851
- __wbg_prototypesetcall_8b03c01e2c0f8066: function(arg0, arg1, arg2) {
852
- Float32Array.prototype.set.call(getArrayF32FromWasm0(arg0, arg1), getObject(arg2));
926
+ __wbg_prototypesetcall_22b1bb88c4ec5c5a: function(arg0, arg1, arg2) {
927
+ Float32Array.prototype.set.call(getArrayF32FromWasm0(arg0, arg1), arg2);
853
928
  },
854
- __wbg_prototypesetcall_bc27214492979395: function(arg0, arg1, arg2) {
855
- Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
929
+ __wbg_prototypesetcall_4aea6470234c8414: function(arg0, arg1, arg2) {
930
+ Uint32Array.prototype.set.call(getArrayU32FromWasm0(arg0, arg1), arg2);
856
931
  },
857
- __wbg_push_2baf45db356cf468: function(arg0, arg1) {
858
- const ret = getObject(arg0).push(getObject(arg1));
932
+ __wbg_push_c9f4893fc209f768: function(arg0, arg1) {
933
+ const ret = arg0.push(arg1);
859
934
  return ret;
860
935
  },
861
- __wbg_queueMicrotask_9833f9a49df95a49: function(arg0) {
862
- const ret = getObject(arg0).queueMicrotask;
863
- return addHeapObject(ret);
936
+ __wbg_queueMicrotask_1e8503a8a690f0a3: function(arg0) {
937
+ const ret = arg0.queueMicrotask;
938
+ return ret;
864
939
  },
865
- __wbg_queueMicrotask_a72f977e97f23c5f: function(arg0) {
866
- queueMicrotask(getObject(arg0));
940
+ __wbg_queueMicrotask_4a1a4d8dd332373b: function(arg0) {
941
+ queueMicrotask(arg0);
867
942
  },
868
- __wbg_release_0dd02e33b7cd324c: function() { return handleError(function (arg0) {
869
- const ret = getObject(arg0).release();
870
- return addHeapObject(ret);
943
+ __wbg_release_0c2bb01f2bc48732: function() { return handleError(function (arg0) {
944
+ const ret = arg0.release();
945
+ return ret;
871
946
  }, arguments); },
872
- __wbg_resolve_0076e10020304ede: function(arg0) {
873
- const ret = Promise.resolve(getObject(arg0));
874
- return addHeapObject(ret);
947
+ __wbg_resolve_dbf78ab4942478b0: function(arg0) {
948
+ const ret = Promise.resolve(arg0);
949
+ return ret;
875
950
  },
876
- __wbg_run_2893666784c8891d: function() { return handleError(function (arg0, arg1, arg2, arg3) {
877
- const ret = getObject(arg0).run(takeObject(arg1), takeObject(arg2), takeObject(arg3));
878
- return addHeapObject(ret);
879
- }, arguments); },
880
- __wbg_set_145a351398b48c65: function() { return handleError(function (arg0, arg1, arg2) {
881
- const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
951
+ __wbg_run_1e8a187576bdf206: function() { return handleError(function (arg0, arg1, arg2, arg3) {
952
+ const ret = arg0.run(arg1, arg2, arg3);
882
953
  return ret;
883
954
  }, arguments); },
884
- __wbg_set_34d08fd992d43d61: function(arg0, arg1, arg2) {
885
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
955
+ __wbg_set_118fefd528ab0a79: function(arg0, arg1, arg2) {
956
+ arg0.set(arg1, arg2 >>> 0);
886
957
  },
887
- __wbg_set_575d3ddb70fe831d: function(arg0, arg1, arg2) {
888
- getObject(arg0).set(getArrayU8FromWasm0(arg1, arg2));
958
+ __wbg_set_2793479888329cb6: function() { return handleError(function (arg0, arg1, arg2) {
959
+ const ret = Reflect.set(arg0, arg1, arg2);
960
+ return ret;
961
+ }, arguments); },
962
+ __wbg_set_8282f7e0d2d01336: function(arg0, arg1, arg2) {
963
+ const ret = arg0.set(arg1, arg2);
964
+ return ret;
889
965
  },
890
- __wbg_set_6ae97e73113c4f0b: function(arg0, arg1, arg2) {
891
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
892
- return addHeapObject(ret);
966
+ __wbg_set_d2d33b52458e984a: function(arg0, arg1, arg2) {
967
+ arg0[arg1 >>> 0] = arg2;
893
968
  },
894
- __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
895
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
969
+ __wbg_set_e4b9a833d288759a: function(arg0, arg1, arg2) {
970
+ arg0[arg1] = arg2;
896
971
  },
897
- __wbg_set_bea140a88be9b277: function(arg0, arg1, arg2) {
898
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
972
+ __wbg_set_feb3714f475485ba: function(arg0, arg1, arg2) {
973
+ arg0.set(getArrayU8FromWasm0(arg1, arg2));
899
974
  },
900
- __wbg_slice_6da4cdc5d543fcd0: function(arg0, arg1) {
901
- const ret = getObject(arg1).slice();
975
+ __wbg_slice_984d22ab53865879: function(arg0, arg1) {
976
+ const ret = arg1.slice();
902
977
  const ptr1 = passArrayJsValueToWasm0(ret, wasm.__wbindgen_export);
903
978
  const len1 = WASM_VECTOR_LEN;
904
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
905
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
979
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
980
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
906
981
  },
907
- __wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
908
- const ret = getObject(arg1).stack;
982
+ __wbg_stack_575c4e0918581b9c: function(arg0, arg1) {
983
+ const ret = arg1.stack;
909
984
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
910
985
  const len1 = WASM_VECTOR_LEN;
911
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
912
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
986
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
987
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
913
988
  },
914
- __wbg_static_accessor_GLOBAL_266715b9d96ba635: function() {
915
- const ret = typeof global === 'undefined' ? null : global;
916
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
989
+ __wbg_static_accessor_GLOBAL_THIS_003ee833af9699fc: function() {
990
+ const ret = typeof globalThis === 'undefined' ? undefined : globalThis;
991
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
917
992
  },
918
- __wbg_static_accessor_GLOBAL_THIS_10fb7dc1ae063179: function() {
919
- const ret = typeof globalThis === 'undefined' ? null : globalThis;
920
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
993
+ __wbg_static_accessor_GLOBAL_e4293fb22cbe77da: function() {
994
+ const ret = typeof global === 'undefined' ? undefined : global;
995
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
921
996
  },
922
- __wbg_static_accessor_SELF_0b583911f537483a: function() {
923
- const ret = typeof self === 'undefined' ? null : self;
924
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
997
+ __wbg_static_accessor_SELF_53bb20457401453d: function() {
998
+ const ret = typeof self === 'undefined' ? undefined : self;
999
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
925
1000
  },
926
- __wbg_static_accessor_WINDOW_d7f903d1508cbdc4: function() {
927
- const ret = typeof window === 'undefined' ? null : window;
928
- return isLikeNone(ret) ? 0 : addHeapObject(ret);
1001
+ __wbg_static_accessor_WINDOW_b5e0810bfecb7feb: function() {
1002
+ const ret = typeof window === 'undefined' ? undefined : window;
1003
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
929
1004
  },
930
- __wbg_then_c949d5a25a4e78f8: function(arg0, arg1, arg2) {
931
- const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
932
- return addHeapObject(ret);
1005
+ __wbg_then_656f253a5dd7d8ea: function(arg0, arg1, arg2) {
1006
+ const ret = arg0.then(arg1, arg2);
1007
+ return ret;
933
1008
  },
934
- __wbg_then_e71170d78fcf8954: function(arg0, arg1) {
935
- const ret = getObject(arg0).then(getObject(arg1));
936
- return addHeapObject(ret);
1009
+ __wbg_then_e3f7f2d365708be8: function(arg0, arg1) {
1010
+ const ret = arg0.then(arg1);
1011
+ return ret;
937
1012
  },
938
- __wbg_toString_c58c5795e09f80e1: function(arg0) {
939
- const ret = getObject(arg0).toString();
940
- return addHeapObject(ret);
1013
+ __wbg_toString_f4b4edcadc38f18a: function(arg0) {
1014
+ const ret = arg0.toString();
1015
+ return ret;
941
1016
  },
942
- __wbg_trackSessionInit_b37a6598a5541f10: function() { return handleError(function (arg0, arg1) {
1017
+ __wbg_trackSessionInit_f0d12f5bbc56f15c: function() { return handleError(function (arg0, arg1) {
943
1018
  const ret = trackSessionInit(getStringFromWasm0(arg0, arg1));
944
- return addHeapObject(ret);
1019
+ return ret;
945
1020
  }, arguments); },
946
- __wbg_type_e1fd5cc29b264a06: function(arg0) {
947
- const ret = getObject(arg0).type;
1021
+ __wbg_type_a992828c4d47b9b1: function(arg0) {
1022
+ const ret = arg0.type;
948
1023
  return (__wbindgen_enum_DataType.indexOf(ret) + 1 || 16) - 1;
949
1024
  },
950
- __wbg_value_f3c585ee8f5ba40c: function(arg0) {
951
- const ret = getObject(arg0).value;
952
- return addHeapObject(ret);
1025
+ __wbg_value_e0f328965e184931: function(arg0) {
1026
+ const ret = arg0.value;
1027
+ return ret;
953
1028
  },
954
1029
  __wbg_yolomodel_new: function(arg0) {
955
1030
  const ret = YoloModel.__wrap(arg0);
956
- return addHeapObject(ret);
1031
+ return ret;
957
1032
  },
958
1033
  __wbindgen_generic_0000000000000001: function(arg0, arg1) {
959
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 371, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
960
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_1236);
961
- return addHeapObject(ret);
1034
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 377, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1035
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_1334);
1036
+ return ret;
962
1037
  },
963
1038
  __wbindgen_generic_0000000000000002: function(arg0, arg1) {
964
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 655, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
965
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_1867);
966
- return addHeapObject(ret);
1039
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 661, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1040
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_1970);
1041
+ return ret;
967
1042
  },
968
1043
  __wbindgen_generic_0000000000000003: function(arg0, arg1) {
969
1044
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("boolean")], shim_idx: 21, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
970
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_382);
971
- return addHeapObject(ret);
1045
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_397);
1046
+ return ret;
972
1047
  },
973
1048
  __wbindgen_generic_0000000000000004: function(arg0) {
974
1049
  // Cast intrinsic for `F64 -> Externref`.
975
1050
  const ret = arg0;
976
- return addHeapObject(ret);
1051
+ return ret;
977
1052
  },
978
1053
  __wbindgen_generic_0000000000000005: function(arg0) {
979
1054
  // Cast intrinsic for `I64 -> Externref`.
980
1055
  const ret = arg0;
981
- return addHeapObject(ret);
1056
+ return ret;
982
1057
  },
983
1058
  __wbindgen_generic_0000000000000006: function(arg0, arg1) {
984
1059
  // Cast intrinsic for `Ref(Slice(F32)) -> NamedExternref("Float32Array")`.
985
1060
  const ret = getArrayF32FromWasm0(arg0, arg1);
986
- return addHeapObject(ret);
1061
+ return ret;
987
1062
  },
988
1063
  __wbindgen_generic_0000000000000007: function(arg0, arg1) {
989
1064
  // Cast intrinsic for `Ref(Slice(F64)) -> NamedExternref("Float64Array")`.
990
1065
  const ret = getArrayF64FromWasm0(arg0, arg1);
991
- return addHeapObject(ret);
1066
+ return ret;
992
1067
  },
993
1068
  __wbindgen_generic_0000000000000008: function(arg0, arg1) {
994
1069
  // Cast intrinsic for `Ref(Slice(I16)) -> NamedExternref("Int16Array")`.
995
1070
  const ret = getArrayI16FromWasm0(arg0, arg1);
996
- return addHeapObject(ret);
1071
+ return ret;
997
1072
  },
998
1073
  __wbindgen_generic_0000000000000009: function(arg0, arg1) {
999
1074
  // Cast intrinsic for `Ref(Slice(I32)) -> NamedExternref("Int32Array")`.
1000
1075
  const ret = getArrayI32FromWasm0(arg0, arg1);
1001
- return addHeapObject(ret);
1076
+ return ret;
1002
1077
  },
1003
1078
  __wbindgen_generic_000000000000000a: function(arg0, arg1) {
1004
1079
  // Cast intrinsic for `Ref(Slice(I64)) -> NamedExternref("BigInt64Array")`.
1005
1080
  const ret = getArrayI64FromWasm0(arg0, arg1);
1006
- return addHeapObject(ret);
1081
+ return ret;
1007
1082
  },
1008
1083
  __wbindgen_generic_000000000000000b: function(arg0, arg1) {
1009
1084
  // Cast intrinsic for `Ref(Slice(I8)) -> NamedExternref("Int8Array")`.
1010
1085
  const ret = getArrayI8FromWasm0(arg0, arg1);
1011
- return addHeapObject(ret);
1086
+ return ret;
1012
1087
  },
1013
1088
  __wbindgen_generic_000000000000000c: function(arg0, arg1) {
1014
1089
  // Cast intrinsic for `Ref(Slice(U16)) -> NamedExternref("Uint16Array")`.
1015
1090
  const ret = getArrayU16FromWasm0(arg0, arg1);
1016
- return addHeapObject(ret);
1091
+ return ret;
1017
1092
  },
1018
1093
  __wbindgen_generic_000000000000000d: function(arg0, arg1) {
1019
1094
  // Cast intrinsic for `Ref(Slice(U32)) -> NamedExternref("Uint32Array")`.
1020
1095
  const ret = getArrayU32FromWasm0(arg0, arg1);
1021
- return addHeapObject(ret);
1096
+ return ret;
1022
1097
  },
1023
1098
  __wbindgen_generic_000000000000000e: function(arg0, arg1) {
1024
1099
  // Cast intrinsic for `Ref(Slice(U64)) -> NamedExternref("BigUint64Array")`.
1025
1100
  const ret = getArrayU64FromWasm0(arg0, arg1);
1026
- return addHeapObject(ret);
1101
+ return ret;
1027
1102
  },
1028
1103
  __wbindgen_generic_000000000000000f: function(arg0, arg1) {
1029
1104
  // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
1030
1105
  const ret = getArrayU8FromWasm0(arg0, arg1);
1031
- return addHeapObject(ret);
1106
+ return ret;
1032
1107
  },
1033
1108
  __wbindgen_generic_0000000000000010: function(arg0, arg1) {
1034
1109
  // Cast intrinsic for `Ref(String) -> Externref`.
1035
1110
  const ret = getStringFromWasm0(arg0, arg1);
1036
- return addHeapObject(ret);
1111
+ return ret;
1037
1112
  },
1038
1113
  __wbindgen_generic_0000000000000011: function(arg0) {
1039
1114
  // Cast intrinsic for `U64 -> Externref`.
1040
1115
  const ret = BigInt.asUintN(64, arg0);
1041
- return addHeapObject(ret);
1042
- },
1043
- __wbindgen_object_clone_ref: function(arg0) {
1044
- const ret = getObject(arg0);
1045
- return addHeapObject(ret);
1116
+ return ret;
1046
1117
  },
1047
- __wbindgen_object_drop_ref: function(arg0) {
1048
- takeObject(arg0);
1118
+ __wbindgen_init_externref_table: function() {
1119
+ const table = wasm.__wbindgen_externrefs;
1120
+ table.set(0, undefined);
1121
+ table.set(1024, undefined);
1122
+ table.set(1025, null);
1123
+ table.set(1026, true);
1124
+ table.set(1027, false);
1049
1125
  },
1050
1126
  };
1051
1127
  return {
@@ -1054,46 +1130,46 @@ function __wbg_get_imports() {
1054
1130
  };
1055
1131
  }
1056
1132
 
1057
- function __wasm_bindgen_func_elem_1891(arg0, arg1, arg2, arg3) {
1058
- wasm.__wasm_bindgen_func_elem_1891(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1133
+ function __wasm_bindgen_func_elem_1996(arg0, arg1, arg2, arg3) {
1134
+ wasm.__wasm_bindgen_func_elem_1996(arg0, arg1, arg2, arg3);
1059
1135
  }
1060
1136
 
1061
- function __wasm_bindgen_func_elem_1236(arg0, arg1, arg2) {
1137
+ function __wasm_bindgen_func_elem_1334(arg0, arg1, arg2) {
1062
1138
  try {
1063
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1064
- wasm.__wasm_bindgen_func_elem_1236(retptr, arg0, arg1, addHeapObject(arg2));
1139
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
1140
+ wasm.__wasm_bindgen_func_elem_1334(retptr, arg0, arg1, arg2);
1065
1141
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1066
1142
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1067
1143
  if (r1) {
1068
- throw takeObject(r0);
1144
+ throw takeFromExternrefTable0(r0);
1069
1145
  }
1070
1146
  } finally {
1071
1147
  wasm.__wbindgen_add_to_stack_pointer(16);
1072
1148
  }
1073
1149
  }
1074
1150
 
1075
- function __wasm_bindgen_func_elem_1867(arg0, arg1, arg2) {
1151
+ function __wasm_bindgen_func_elem_1970(arg0, arg1, arg2) {
1076
1152
  try {
1077
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1078
- wasm.__wasm_bindgen_func_elem_1867(retptr, arg0, arg1, addHeapObject(arg2));
1153
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
1154
+ wasm.__wasm_bindgen_func_elem_1970(retptr, arg0, arg1, arg2);
1079
1155
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1080
1156
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1081
1157
  if (r1) {
1082
- throw takeObject(r0);
1158
+ throw takeFromExternrefTable0(r0);
1083
1159
  }
1084
1160
  } finally {
1085
1161
  wasm.__wbindgen_add_to_stack_pointer(16);
1086
1162
  }
1087
1163
  }
1088
1164
 
1089
- function __wasm_bindgen_func_elem_382(arg0, arg1, arg2) {
1165
+ function __wasm_bindgen_func_elem_397(arg0, arg1, arg2) {
1090
1166
  try {
1091
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1092
- wasm.__wasm_bindgen_func_elem_382(retptr, arg0, arg1, addHeapObject(arg2));
1167
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16) >>> 0;
1168
+ wasm.__wasm_bindgen_func_elem_397(retptr, arg0, arg1, arg2);
1093
1169
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1094
1170
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1095
1171
  if (r1) {
1096
- throw takeObject(r0);
1172
+ throw takeFromExternrefTable0(r0);
1097
1173
  }
1098
1174
  } finally {
1099
1175
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -1112,88 +1188,72 @@ const YoloPipelineFinalization = (typeof FinalizationRegistry === 'undefined')
1112
1188
  ? { register: () => {}, unregister: () => {} }
1113
1189
  : new FinalizationRegistry(ptr => wasm.__wbg_yolopipeline_free(ptr, 1));
1114
1190
 
1115
- function addHeapObject(obj) {
1116
- if (heap_next === heap.length) heap.push(heap.length + 1);
1117
- const idx = heap_next;
1118
- heap_next = heap[idx];
1119
-
1120
- heap[idx] = obj;
1191
+ function addToExternrefTable0(obj) {
1192
+ const idx = wasm.__wbindgen_export5();
1193
+ wasm.__wbindgen_externrefs.set(idx, obj);
1121
1194
  return idx;
1122
1195
  }
1123
1196
 
1124
1197
  const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
1125
1198
  ? { register: () => {}, unregister: () => {} }
1126
- : new FinalizationRegistry(state => wasm.__wbindgen_export5(state.a, state.b));
1199
+ : new FinalizationRegistry(state => wasm.__wbindgen_export7(state.a, state.b));
1127
1200
 
1128
1201
  function debugString(val) {
1129
- // primitive types
1130
- const type = typeof val;
1131
- if (type == 'number' || type == 'boolean' || val == null) {
1132
- return `${val}`;
1133
- }
1134
- if (type == 'string') {
1135
- return `"${val}"`;
1136
- }
1137
- if (type == 'symbol') {
1138
- const description = val.description;
1139
- if (description == null) {
1140
- return 'Symbol';
1141
- } else {
1142
- return `Symbol(${description})`;
1143
- }
1144
- }
1145
- if (type == 'function') {
1146
- const name = val.name;
1147
- if (typeof name == 'string' && name.length > 0) {
1148
- return `Function(${name})`;
1149
- } else {
1150
- return 'Function';
1151
- }
1152
- }
1153
- // objects
1154
- if (Array.isArray(val)) {
1155
- const length = val.length;
1156
- let debug = '[';
1157
- if (length > 0) {
1158
- debug += debugString(val[0]);
1159
- }
1160
- for(let i = 1; i < length; i++) {
1161
- debug += ', ' + debugString(val[i]);
1162
- }
1163
- debug += ']';
1164
- return debug;
1165
- }
1166
- // Test for built-in
1167
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
1168
- let className;
1169
- if (builtInMatches && builtInMatches.length > 1) {
1170
- className = builtInMatches[1];
1171
- } else {
1172
- // Failed to match the standard '[object ClassName]'
1173
- return toString.call(val);
1174
- }
1175
- if (className == 'Object') {
1176
- // we're a user defined class or Object
1177
- // JSON.stringify avoids problems with cycles, and is generally much
1178
- // easier than looping through ownProperties of `val`.
1179
- try {
1180
- return 'Object(' + JSON.stringify(val) + ')';
1181
- } catch (_) {
1182
- return 'Object';
1202
+ switch (typeof val) {
1203
+ // primitive types
1204
+ case 'number':
1205
+ case 'boolean':
1206
+ case 'undefined':
1207
+ return `${val}`;
1208
+ case 'string':
1209
+ return JSON.stringify(val);
1210
+ case 'bigint':
1211
+ return `${val}n`;
1212
+ case 'symbol':
1213
+ return val.description !== undefined
1214
+ ? `Symbol(${val.description})`
1215
+ : 'Symbol';
1216
+ case 'function':
1217
+ return typeof val.name === 'string' && val.name !== ''
1218
+ ? `Function(${val.name})`
1219
+ : 'Function';
1220
+ case 'object': {
1221
+ if (val === null) {
1222
+ return 'null';
1223
+ }
1224
+ // objects
1225
+ if (Array.isArray(val)) {
1226
+ return '[' + Array.from(val, debugString).join(', ') + ']';
1227
+ }
1228
+ // errors
1229
+ if (val instanceof Error) {
1230
+ return `${val.name}: ${val.message}\n${val.stack}`;
1231
+ }
1232
+
1233
+ const toStringOutput = toString.call(val);
1234
+ // Test for built-in
1235
+ const className = /\[object ([^\]]+)\]/.exec(toStringOutput)?.[1];
1236
+
1237
+ // Failed to match the standard '[object ClassName]'
1238
+ if (className === undefined) {
1239
+ return toStringOutput;
1240
+ }
1241
+ if (className === 'Object') {
1242
+ // we're a user defined class or Object
1243
+ // JSON.stringify avoids problems with cycles, and is generally much
1244
+ // easier than looping through ownProperties of `val`.
1245
+ try {
1246
+ return 'Object(' + JSON.stringify(val) + ')';
1247
+ } catch (_) {
1248
+ return 'Object';
1249
+ }
1250
+ }
1251
+ // TODO we could test for more things here, like `Set`s and `Map`s.
1252
+ return className;
1183
1253
  }
1254
+ // Per MDN: 'This list of values is exhaustive.'
1255
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof#description
1184
1256
  }
1185
- // errors
1186
- if (val instanceof Error) {
1187
- return `${val.name}: ${val.message}\n${val.stack}`;
1188
- }
1189
- // TODO we could test for more things here, like `Set`s and `Map`s.
1190
- return className;
1191
- }
1192
-
1193
- function dropObject(idx) {
1194
- if (idx < 1028) return;
1195
- heap[idx] = heap_next;
1196
- heap_next = idx;
1197
1257
  }
1198
1258
 
1199
1259
  function getArrayF32FromWasm0(ptr, len) {
@@ -1231,8 +1291,9 @@ function getArrayJsValueFromWasm0(ptr, len) {
1231
1291
  const mem = getDataViewMemory0();
1232
1292
  const result = [];
1233
1293
  for (let i = ptr; i < ptr + 4 * len; i += 4) {
1234
- result.push(takeObject(mem.getUint32(i, true)));
1294
+ result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
1235
1295
  }
1296
+ wasm.__wbindgen_export6(ptr, len);
1236
1297
  return result;
1237
1298
  }
1238
1299
 
@@ -1321,7 +1382,8 @@ function getInt8ArrayMemory0() {
1321
1382
  }
1322
1383
 
1323
1384
  function getStringFromWasm0(ptr, len) {
1324
- return decodeText(ptr >>> 0, len);
1385
+ ptr = ptr >>> 0;
1386
+ return decodeText(getUint8ArrayMemory0().subarray(ptr, ptr + len));
1325
1387
  }
1326
1388
 
1327
1389
  let cachedUint16ArrayMemory0 = null;
@@ -1348,21 +1410,15 @@ function getUint8ArrayMemory0() {
1348
1410
  return cachedUint8ArrayMemory0;
1349
1411
  }
1350
1412
 
1351
- function getObject(idx) { return heap[idx]; }
1352
-
1353
1413
  function handleError(f, args) {
1354
1414
  try {
1355
1415
  return f.apply(this, args);
1356
1416
  } catch (e) {
1357
- wasm.__wbindgen_export3(addHeapObject(e));
1417
+ const idx = addToExternrefTable0(e);
1418
+ wasm.__wbindgen_export4(idx);
1358
1419
  }
1359
1420
  }
1360
1421
 
1361
- let heap = new Array(1024).fill(undefined);
1362
- heap.push(undefined, null, true, false);
1363
-
1364
- let heap_next = heap.length;
1365
-
1366
1422
  function isLikeNone(x) {
1367
1423
  return x === undefined || x === null;
1368
1424
  }
@@ -1386,7 +1442,7 @@ function makeMutClosure(arg0, arg1, f) {
1386
1442
  };
1387
1443
  real._wbg_cb_unref = () => {
1388
1444
  if (--state.cnt === 0) {
1389
- wasm.__wbindgen_export5(state.a, state.b);
1445
+ wasm.__wbindgen_export7(state.a, state.b);
1390
1446
  state.a = 0;
1391
1447
  CLOSURE_DTORS.unregister(state);
1392
1448
  }
@@ -1418,9 +1474,9 @@ function passArrayF64ToWasm0(arg, malloc) {
1418
1474
 
1419
1475
  function passArrayJsValueToWasm0(array, malloc) {
1420
1476
  const ptr = malloc(array.length * 4, 4) >>> 0;
1421
- const mem = getDataViewMemory0();
1422
1477
  for (let i = 0; i < array.length; i++) {
1423
- mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
1478
+ const add = addToExternrefTable0(array[i]);
1479
+ getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
1424
1480
  }
1425
1481
  WASM_VECTOR_LEN = array.length;
1426
1482
  return ptr;
@@ -1463,24 +1519,24 @@ function passStringToWasm0(arg, malloc, realloc) {
1463
1519
  return ptr;
1464
1520
  }
1465
1521
 
1466
- function takeObject(idx) {
1467
- const ret = getObject(idx);
1468
- dropObject(idx);
1469
- return ret;
1522
+ function takeFromExternrefTable0(idx) {
1523
+ const value = wasm.__wbindgen_externrefs.get(idx);
1524
+ wasm.__wbindgen_export8(idx);
1525
+ return value;
1470
1526
  }
1471
1527
 
1472
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1528
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true });
1473
1529
  cachedTextDecoder.decode();
1474
1530
  const MAX_SAFARI_DECODE_BYTES = 2146435072;
1475
1531
  let numBytesDecoded = 0;
1476
- function decodeText(ptr, len) {
1477
- numBytesDecoded += len;
1532
+ function decodeText(bytes) {
1533
+ numBytesDecoded += bytes.length;
1478
1534
  if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
1479
- cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1535
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true });
1480
1536
  cachedTextDecoder.decode();
1481
- numBytesDecoded = len;
1537
+ numBytesDecoded = bytes.length;
1482
1538
  }
1483
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
1539
+ return cachedTextDecoder.decode(bytes);
1484
1540
  }
1485
1541
 
1486
1542
  const cachedTextEncoder = new TextEncoder();
@@ -1577,9 +1633,17 @@ function initSync(module) {
1577
1633
  return __wbg_finalize_init(instance, module);
1578
1634
  }
1579
1635
 
1636
+ let __wbg_init_promise;
1580
1637
  async function __wbg_init(module_or_path) {
1581
1638
  if (wasm !== undefined) return wasm;
1639
+ if (__wbg_init_promise === undefined) {
1640
+ __wbg_init_promise = __wbg_init_once(module_or_path);
1641
+ __wbg_init_promise.catch(() => { __wbg_init_promise = undefined; });
1642
+ }
1643
+ return __wbg_init_promise;
1644
+ }
1582
1645
 
1646
+ async function __wbg_init_once(module_or_path) {
1583
1647
 
1584
1648
  if (module_or_path !== undefined) {
1585
1649
  if (Object.getPrototypeOf(module_or_path) === Object.prototype) {