@rivetkit/rivetkit-wasm 0.0.0-0-0-0-preview-guard-stops.9d82529

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2293 @@
1
+ let wasm;
2
+
3
+ let WASM_VECTOR_LEN = 0;
4
+
5
+ let cachedUint8ArrayMemory0 = null;
6
+
7
+ function getUint8ArrayMemory0() {
8
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
9
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
10
+ }
11
+ return cachedUint8ArrayMemory0;
12
+ }
13
+
14
+ const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
15
+
16
+ const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
17
+ ? function (arg, view) {
18
+ return cachedTextEncoder.encodeInto(arg, view);
19
+ }
20
+ : function (arg, view) {
21
+ const buf = cachedTextEncoder.encode(arg);
22
+ view.set(buf);
23
+ return {
24
+ read: arg.length,
25
+ written: buf.length
26
+ };
27
+ });
28
+
29
+ function passStringToWasm0(arg, malloc, realloc) {
30
+
31
+ if (realloc === undefined) {
32
+ const buf = cachedTextEncoder.encode(arg);
33
+ const ptr = malloc(buf.length, 1) >>> 0;
34
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
35
+ WASM_VECTOR_LEN = buf.length;
36
+ return ptr;
37
+ }
38
+
39
+ let len = arg.length;
40
+ let ptr = malloc(len, 1) >>> 0;
41
+
42
+ const mem = getUint8ArrayMemory0();
43
+
44
+ let offset = 0;
45
+
46
+ for (; offset < len; offset++) {
47
+ const code = arg.charCodeAt(offset);
48
+ if (code > 0x7F) break;
49
+ mem[ptr + offset] = code;
50
+ }
51
+
52
+ if (offset !== len) {
53
+ if (offset !== 0) {
54
+ arg = arg.slice(offset);
55
+ }
56
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
57
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
58
+ const ret = encodeString(arg, view);
59
+
60
+ offset += ret.written;
61
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
62
+ }
63
+
64
+ WASM_VECTOR_LEN = offset;
65
+ return ptr;
66
+ }
67
+
68
+ let cachedDataViewMemory0 = null;
69
+
70
+ function getDataViewMemory0() {
71
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
72
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
73
+ }
74
+ return cachedDataViewMemory0;
75
+ }
76
+
77
+ function addToExternrefTable0(obj) {
78
+ const idx = wasm.__externref_table_alloc();
79
+ wasm.__wbindgen_export_4.set(idx, obj);
80
+ return idx;
81
+ }
82
+
83
+ function handleError(f, args) {
84
+ try {
85
+ return f.apply(this, args);
86
+ } catch (e) {
87
+ const idx = addToExternrefTable0(e);
88
+ wasm.__wbindgen_exn_store(idx);
89
+ }
90
+ }
91
+
92
+ const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
93
+
94
+ if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
95
+
96
+ function getStringFromWasm0(ptr, len) {
97
+ ptr = ptr >>> 0;
98
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
99
+ }
100
+
101
+ function getArrayU8FromWasm0(ptr, len) {
102
+ ptr = ptr >>> 0;
103
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
104
+ }
105
+
106
+ function isLikeNone(x) {
107
+ return x === undefined || x === null;
108
+ }
109
+
110
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
111
+ ? { register: () => {}, unregister: () => {} }
112
+ : new FinalizationRegistry(state => {
113
+ wasm.__wbindgen_export_6.get(state.dtor)(state.a, state.b)
114
+ });
115
+
116
+ function makeMutClosure(arg0, arg1, dtor, f) {
117
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
118
+ const real = (...args) => {
119
+ // First up with a closure we increment the internal reference
120
+ // count. This ensures that the Rust closure environment won't
121
+ // be deallocated while we're invoking it.
122
+ state.cnt++;
123
+ const a = state.a;
124
+ state.a = 0;
125
+ try {
126
+ return f(a, state.b, ...args);
127
+ } finally {
128
+ if (--state.cnt === 0) {
129
+ wasm.__wbindgen_export_6.get(state.dtor)(a, state.b);
130
+ CLOSURE_DTORS.unregister(state);
131
+ } else {
132
+ state.a = a;
133
+ }
134
+ }
135
+ };
136
+ real.original = state;
137
+ CLOSURE_DTORS.register(real, state, state);
138
+ return real;
139
+ }
140
+
141
+ function debugString(val) {
142
+ // primitive types
143
+ const type = typeof val;
144
+ if (type == 'number' || type == 'boolean' || val == null) {
145
+ return `${val}`;
146
+ }
147
+ if (type == 'string') {
148
+ return `"${val}"`;
149
+ }
150
+ if (type == 'symbol') {
151
+ const description = val.description;
152
+ if (description == null) {
153
+ return 'Symbol';
154
+ } else {
155
+ return `Symbol(${description})`;
156
+ }
157
+ }
158
+ if (type == 'function') {
159
+ const name = val.name;
160
+ if (typeof name == 'string' && name.length > 0) {
161
+ return `Function(${name})`;
162
+ } else {
163
+ return 'Function';
164
+ }
165
+ }
166
+ // objects
167
+ if (Array.isArray(val)) {
168
+ const length = val.length;
169
+ let debug = '[';
170
+ if (length > 0) {
171
+ debug += debugString(val[0]);
172
+ }
173
+ for(let i = 1; i < length; i++) {
174
+ debug += ', ' + debugString(val[i]);
175
+ }
176
+ debug += ']';
177
+ return debug;
178
+ }
179
+ // Test for built-in
180
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
181
+ let className;
182
+ if (builtInMatches && builtInMatches.length > 1) {
183
+ className = builtInMatches[1];
184
+ } else {
185
+ // Failed to match the standard '[object ClassName]'
186
+ return toString.call(val);
187
+ }
188
+ if (className == 'Object') {
189
+ // we're a user defined class or Object
190
+ // JSON.stringify avoids problems with cycles, and is generally much
191
+ // easier than looping through ownProperties of `val`.
192
+ try {
193
+ return 'Object(' + JSON.stringify(val) + ')';
194
+ } catch (_) {
195
+ return 'Object';
196
+ }
197
+ }
198
+ // errors
199
+ if (val instanceof Error) {
200
+ return `${val.name}: ${val.message}\n${val.stack}`;
201
+ }
202
+ // TODO we could test for more things here, like `Set`s and `Map`s.
203
+ return className;
204
+ }
205
+
206
+ export function start() {
207
+ wasm.start();
208
+ }
209
+
210
+ /**
211
+ * @returns {string}
212
+ */
213
+ export function bridgeRivetErrorPrefix() {
214
+ let deferred1_0;
215
+ let deferred1_1;
216
+ try {
217
+ const ret = wasm.bridgeRivetErrorPrefix();
218
+ deferred1_0 = ret[0];
219
+ deferred1_1 = ret[1];
220
+ return getStringFromWasm0(ret[0], ret[1]);
221
+ } finally {
222
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
223
+ }
224
+ }
225
+
226
+ function passArray8ToWasm0(arg, malloc) {
227
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
228
+ getUint8ArrayMemory0().set(arg, ptr / 1);
229
+ WASM_VECTOR_LEN = arg.length;
230
+ return ptr;
231
+ }
232
+ /**
233
+ * @param {Uint8Array} bytes
234
+ * @returns {Uint8Array}
235
+ */
236
+ export function roundTripBytes(bytes) {
237
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
238
+ const len0 = WASM_VECTOR_LEN;
239
+ const ret = wasm.roundTripBytes(ptr0, len0);
240
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
241
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
242
+ return v2;
243
+ }
244
+
245
+ /**
246
+ * @param {Uint8Array} bytes
247
+ * @returns {Uint8Array}
248
+ */
249
+ export function uint8ArrayFromBytes(bytes) {
250
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
251
+ const len0 = WASM_VECTOR_LEN;
252
+ const ret = wasm.uint8ArrayFromBytes(ptr0, len0);
253
+ return ret;
254
+ }
255
+
256
+ /**
257
+ * @param {Promise<any>} promise
258
+ * @returns {Promise<any>}
259
+ */
260
+ export function awaitPromise(promise) {
261
+ const ret = wasm.awaitPromise(promise);
262
+ return ret;
263
+ }
264
+
265
+ function _assertClass(instance, klass) {
266
+ if (!(instance instanceof klass)) {
267
+ throw new Error(`expected instance of ${klass.name}`);
268
+ }
269
+ }
270
+
271
+ function takeFromExternrefTable0(idx) {
272
+ const value = wasm.__wbindgen_export_4.get(idx);
273
+ wasm.__externref_table_dealloc(idx);
274
+ return value;
275
+ }
276
+ function __wbg_adapter_50(arg0, arg1, arg2) {
277
+ wasm.closure1987_externref_shim(arg0, arg1, arg2);
278
+ }
279
+
280
+ function __wbg_adapter_59(arg0, arg1, arg2) {
281
+ wasm.closure2385_externref_shim(arg0, arg1, arg2);
282
+ }
283
+
284
+ function __wbg_adapter_297(arg0, arg1, arg2, arg3) {
285
+ wasm.closure2622_externref_shim(arg0, arg1, arg2, arg3);
286
+ }
287
+
288
+ const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
289
+
290
+ const ActorContextFinalization = (typeof FinalizationRegistry === 'undefined')
291
+ ? { register: () => {}, unregister: () => {} }
292
+ : new FinalizationRegistry(ptr => wasm.__wbg_actorcontext_free(ptr >>> 0, 1));
293
+
294
+ export class ActorContext {
295
+
296
+ static __wrap(ptr) {
297
+ ptr = ptr >>> 0;
298
+ const obj = Object.create(ActorContext.prototype);
299
+ obj.__wbg_ptr = ptr;
300
+ ActorContextFinalization.register(obj, obj.__wbg_ptr, obj);
301
+ return obj;
302
+ }
303
+
304
+ __destroy_into_raw() {
305
+ const ptr = this.__wbg_ptr;
306
+ this.__wbg_ptr = 0;
307
+ ActorContextFinalization.unregister(this);
308
+ return ptr;
309
+ }
310
+
311
+ free() {
312
+ const ptr = this.__destroy_into_raw();
313
+ wasm.__wbg_actorcontext_free(ptr, 0);
314
+ }
315
+ /**
316
+ * @param {any} payload
317
+ * @returns {Promise<void>}
318
+ */
319
+ saveState(payload) {
320
+ const ret = wasm.actorcontext_saveState(this.__wbg_ptr, payload);
321
+ return ret;
322
+ }
323
+ /**
324
+ * @param {Uint8Array} params
325
+ * @param {any} request
326
+ * @returns {Promise<ConnHandle>}
327
+ */
328
+ connectConn(params, request) {
329
+ const ptr0 = passArray8ToWasm0(params, wasm.__wbindgen_malloc);
330
+ const len0 = WASM_VECTOR_LEN;
331
+ const ret = wasm.actorcontext_connectConn(this.__wbg_ptr, ptr0, len0, request);
332
+ return ret;
333
+ }
334
+ /**
335
+ * @param {number | null} [timestamp_ms]
336
+ * @returns {Promise<void>}
337
+ */
338
+ setRunWakeAt(timestamp_ms) {
339
+ const ret = wasm.actorcontext_setRunWakeAt(this.__wbg_ptr, !isLikeNone(timestamp_ms), isLikeNone(timestamp_ms) ? 0 : timestamp_ms);
340
+ return ret;
341
+ }
342
+ /**
343
+ * @param {any} opts
344
+ * @returns {Promise<void>}
345
+ */
346
+ requestSaveAndWait(opts) {
347
+ const ret = wasm.actorcontext_requestSaveAndWait(this.__wbg_ptr, opts);
348
+ return ret;
349
+ }
350
+ /**
351
+ * @param {string | null} [bearer_token]
352
+ * @returns {Promise<void>}
353
+ */
354
+ verifyInspectorAuth(bearer_token) {
355
+ var ptr0 = isLikeNone(bearer_token) ? 0 : passStringToWasm0(bearer_token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
356
+ var len0 = WASM_VECTOR_LEN;
357
+ const ret = wasm.actorcontext_verifyInspectorAuth(this.__wbg_ptr, ptr0, len0);
358
+ return ret;
359
+ }
360
+ /**
361
+ * @param {number | null} [timeout_ms]
362
+ * @returns {Promise<ActorStateTransaction>}
363
+ */
364
+ beginStateTransaction(timeout_ms) {
365
+ const ret = wasm.actorcontext_beginStateTransaction(this.__wbg_ptr, !isLikeNone(timeout_ms), isLikeNone(timeout_ms) ? 0 : timeout_ms);
366
+ return ret;
367
+ }
368
+ /**
369
+ * @param {any} writes
370
+ * @returns {Promise<void>}
371
+ */
372
+ saveStateAndWorkflowBatch(writes) {
373
+ const ret = wasm.actorcontext_saveStateAndWorkflowBatch(this.__wbg_ptr, writes);
374
+ return ret;
375
+ }
376
+ /**
377
+ * @returns {Promise<boolean>}
378
+ */
379
+ waitForTrackedShutdownWork() {
380
+ const ret = wasm.actorcontext_waitForTrackedShutdownWork(this.__wbg_ptr);
381
+ return ret;
382
+ }
383
+ /**
384
+ * @returns {Promise<void>}
385
+ */
386
+ waitForTrackedShutdownWorkUnbounded() {
387
+ const ret = wasm.actorcontext_waitForTrackedShutdownWorkUnbounded(this.__wbg_ptr);
388
+ return ret;
389
+ }
390
+ /**
391
+ * @param {Promise<any>} promise
392
+ */
393
+ keepAwake(promise) {
394
+ wasm.actorcontext_keepAwake(this.__wbg_ptr, promise);
395
+ }
396
+ /**
397
+ * @param {Promise<any>} promise
398
+ */
399
+ waitUntil(promise) {
400
+ wasm.actorcontext_waitUntil(this.__wbg_ptr, promise);
401
+ }
402
+ /**
403
+ * @returns {any}
404
+ */
405
+ abortSignal() {
406
+ const ret = wasm.actorcontext_abortSignal(this.__wbg_ptr);
407
+ if (ret[2]) {
408
+ throw takeFromExternrefTable0(ret[1]);
409
+ }
410
+ return takeFromExternrefTable0(ret[0]);
411
+ }
412
+ /**
413
+ * @param {any} opts
414
+ */
415
+ requestSave(opts) {
416
+ wasm.actorcontext_requestSave(this.__wbg_ptr, opts);
417
+ }
418
+ /**
419
+ * @param {Promise<any>} promise
420
+ */
421
+ registerTask(promise) {
422
+ wasm.actorcontext_registerTask(this.__wbg_ptr, promise);
423
+ }
424
+ /**
425
+ * @returns {any}
426
+ */
427
+ runtimeState() {
428
+ const ret = wasm.actorcontext_runtimeState(this.__wbg_ptr);
429
+ return ret;
430
+ }
431
+ /**
432
+ * @param {number} region_id
433
+ */
434
+ endKeepAwake(region_id) {
435
+ wasm.actorcontext_endKeepAwake(this.__wbg_ptr, region_id);
436
+ }
437
+ /**
438
+ * @returns {number}
439
+ */
440
+ beginKeepAwake() {
441
+ const ret = wasm.actorcontext_beginKeepAwake(this.__wbg_ptr);
442
+ return ret >>> 0;
443
+ }
444
+ /**
445
+ * @returns {object}
446
+ */
447
+ inspectorSnapshot() {
448
+ const ret = wasm.actorcontext_inspectorSnapshot(this.__wbg_ptr);
449
+ if (ret[2]) {
450
+ throw takeFromExternrefTable0(ret[1]);
451
+ }
452
+ return takeFromExternrefTable0(ret[0]);
453
+ }
454
+ endOnStateChange() {
455
+ wasm.actorcontext_endOnStateChange(this.__wbg_ptr);
456
+ }
457
+ restartRunHandler() {
458
+ const ret = wasm.actorcontext_restartRunHandler(this.__wbg_ptr);
459
+ if (ret[1]) {
460
+ throw takeFromExternrefTable0(ret[0]);
461
+ }
462
+ }
463
+ beginOnStateChange() {
464
+ wasm.actorcontext_beginOnStateChange(this.__wbg_ptr);
465
+ }
466
+ /**
467
+ * @param {number} region_id
468
+ */
469
+ endWebsocketCallback(region_id) {
470
+ wasm.actorcontext_endWebsocketCallback(this.__wbg_ptr, region_id);
471
+ }
472
+ /**
473
+ * @returns {number}
474
+ */
475
+ beginWebsocketCallback() {
476
+ const ret = wasm.actorcontext_beginWebsocketCallback(this.__wbg_ptr);
477
+ return ret >>> 0;
478
+ }
479
+ /**
480
+ * @returns {Array<any>}
481
+ */
482
+ dirtyHibernatableConns() {
483
+ const ret = wasm.actorcontext_dirtyHibernatableConns(this.__wbg_ptr);
484
+ return ret;
485
+ }
486
+ /**
487
+ * @returns {Kv}
488
+ */
489
+ kv() {
490
+ const ret = wasm.actorcontext_kv(this.__wbg_ptr);
491
+ return Kv.__wrap(ret);
492
+ }
493
+ /**
494
+ * @returns {Array<any>}
495
+ */
496
+ takePendingHibernationChanges() {
497
+ const ret = wasm.actorcontext_takePendingHibernationChanges(this.__wbg_ptr);
498
+ return ret;
499
+ }
500
+ /**
501
+ * @returns {any}
502
+ */
503
+ key() {
504
+ const ret = wasm.actorcontext_key(this.__wbg_ptr);
505
+ if (ret[2]) {
506
+ throw takeFromExternrefTable0(ret[1]);
507
+ }
508
+ return takeFromExternrefTable0(ret[0]);
509
+ }
510
+ constructor() {
511
+ const ret = wasm.actorcontext_new();
512
+ if (ret[2]) {
513
+ throw takeFromExternrefTable0(ret[1]);
514
+ }
515
+ this.__wbg_ptr = ret[0] >>> 0;
516
+ ActorContextFinalization.register(this, this.__wbg_ptr, this);
517
+ return this;
518
+ }
519
+ /**
520
+ * @returns {SqliteDb}
521
+ */
522
+ sql() {
523
+ const ret = wasm.actorcontext_sql(this.__wbg_ptr);
524
+ return SqliteDb.__wrap(ret);
525
+ }
526
+ /**
527
+ * @returns {string}
528
+ */
529
+ name() {
530
+ let deferred1_0;
531
+ let deferred1_1;
532
+ try {
533
+ const ret = wasm.actorcontext_name(this.__wbg_ptr);
534
+ deferred1_0 = ret[0];
535
+ deferred1_1 = ret[1];
536
+ return getStringFromWasm0(ret[0], ret[1]);
537
+ } finally {
538
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
539
+ }
540
+ }
541
+ /**
542
+ * @returns {Array<any>}
543
+ */
544
+ conns() {
545
+ const ret = wasm.actorcontext_conns(this.__wbg_ptr);
546
+ return ret;
547
+ }
548
+ /**
549
+ * @returns {Queue}
550
+ */
551
+ queue() {
552
+ const ret = wasm.actorcontext_kv(this.__wbg_ptr);
553
+ return Queue.__wrap(ret);
554
+ }
555
+ sleep() {
556
+ const ret = wasm.actorcontext_sleep(this.__wbg_ptr);
557
+ if (ret[1]) {
558
+ throw takeFromExternrefTable0(ret[0]);
559
+ }
560
+ }
561
+ /**
562
+ * @returns {Uint8Array}
563
+ */
564
+ state() {
565
+ const ret = wasm.actorcontext_state(this.__wbg_ptr);
566
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
567
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
568
+ return v1;
569
+ }
570
+ /**
571
+ * @returns {string}
572
+ */
573
+ region() {
574
+ let deferred1_0;
575
+ let deferred1_1;
576
+ try {
577
+ const ret = wasm.actorcontext_region(this.__wbg_ptr);
578
+ deferred1_0 = ret[0];
579
+ deferred1_1 = ret[1];
580
+ return getStringFromWasm0(ret[0], ret[1]);
581
+ } finally {
582
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
583
+ }
584
+ }
585
+ destroy() {
586
+ const ret = wasm.actorcontext_destroy(this.__wbg_ptr);
587
+ if (ret[1]) {
588
+ throw takeFromExternrefTable0(ret[0]);
589
+ }
590
+ }
591
+ /**
592
+ * @returns {string}
593
+ */
594
+ actorId() {
595
+ let deferred1_0;
596
+ let deferred1_1;
597
+ try {
598
+ const ret = wasm.actorcontext_actorId(this.__wbg_ptr);
599
+ deferred1_0 = ret[0];
600
+ deferred1_1 = ret[1];
601
+ return getStringFromWasm0(ret[0], ret[1]);
602
+ } finally {
603
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
604
+ }
605
+ }
606
+ /**
607
+ * @returns {Schedule}
608
+ */
609
+ schedule() {
610
+ const ret = wasm.actorcontext_kv(this.__wbg_ptr);
611
+ return Schedule.__wrap(ret);
612
+ }
613
+ /**
614
+ * @param {string} name
615
+ * @param {Uint8Array} args
616
+ */
617
+ broadcast(name, args) {
618
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
619
+ const len0 = WASM_VECTOR_LEN;
620
+ const ptr1 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
621
+ const len1 = WASM_VECTOR_LEN;
622
+ wasm.actorcontext_broadcast(this.__wbg_ptr, ptr0, len0, ptr1, len1);
623
+ }
624
+ /**
625
+ * @param {number | null} [timestamp_ms]
626
+ */
627
+ setAlarm(timestamp_ms) {
628
+ const ret = wasm.actorcontext_setAlarm(this.__wbg_ptr, !isLikeNone(timestamp_ms), isLikeNone(timestamp_ms) ? 0 : timestamp_ms);
629
+ if (ret[1]) {
630
+ throw takeFromExternrefTable0(ret[0]);
631
+ }
632
+ }
633
+ }
634
+
635
+ const ActorFactoryFinalization = (typeof FinalizationRegistry === 'undefined')
636
+ ? { register: () => {}, unregister: () => {} }
637
+ : new FinalizationRegistry(ptr => wasm.__wbg_actorfactory_free(ptr >>> 0, 1));
638
+
639
+ export class ActorFactory {
640
+
641
+ __destroy_into_raw() {
642
+ const ptr = this.__wbg_ptr;
643
+ this.__wbg_ptr = 0;
644
+ ActorFactoryFinalization.unregister(this);
645
+ return ptr;
646
+ }
647
+
648
+ free() {
649
+ const ptr = this.__destroy_into_raw();
650
+ wasm.__wbg_actorfactory_free(ptr, 0);
651
+ }
652
+ /**
653
+ * @param {any} callbacks
654
+ * @param {any} config
655
+ */
656
+ constructor(callbacks, config) {
657
+ const ret = wasm.actorfactory_new(callbacks, config);
658
+ if (ret[2]) {
659
+ throw takeFromExternrefTable0(ret[1]);
660
+ }
661
+ this.__wbg_ptr = ret[0] >>> 0;
662
+ ActorFactoryFinalization.register(this, this.__wbg_ptr, this);
663
+ return this;
664
+ }
665
+ }
666
+
667
+ const ActorStateTransactionFinalization = (typeof FinalizationRegistry === 'undefined')
668
+ ? { register: () => {}, unregister: () => {} }
669
+ : new FinalizationRegistry(ptr => wasm.__wbg_actorstatetransaction_free(ptr >>> 0, 1));
670
+
671
+ export class ActorStateTransaction {
672
+
673
+ static __wrap(ptr) {
674
+ ptr = ptr >>> 0;
675
+ const obj = Object.create(ActorStateTransaction.prototype);
676
+ obj.__wbg_ptr = ptr;
677
+ ActorStateTransactionFinalization.register(obj, obj.__wbg_ptr, obj);
678
+ return obj;
679
+ }
680
+
681
+ __destroy_into_raw() {
682
+ const ptr = this.__wbg_ptr;
683
+ this.__wbg_ptr = 0;
684
+ ActorStateTransactionFinalization.unregister(this);
685
+ return ptr;
686
+ }
687
+
688
+ free() {
689
+ const ptr = this.__destroy_into_raw();
690
+ wasm.__wbg_actorstatetransaction_free(ptr, 0);
691
+ }
692
+ /**
693
+ * @param {any} payload
694
+ * @returns {Promise<void>}
695
+ */
696
+ commit(payload) {
697
+ const ret = wasm.actorstatetransaction_commit(this.__wbg_ptr, payload);
698
+ return ret;
699
+ }
700
+ /**
701
+ * @param {string} sql
702
+ * @param {any} params
703
+ * @returns {Promise<any>}
704
+ */
705
+ execute(sql, params) {
706
+ const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
707
+ const len0 = WASM_VECTOR_LEN;
708
+ const ret = wasm.actorstatetransaction_execute(this.__wbg_ptr, ptr0, len0, params);
709
+ return ret;
710
+ }
711
+ /**
712
+ * @returns {Promise<void>}
713
+ */
714
+ rollback() {
715
+ const ret = wasm.actorstatetransaction_rollback(this.__wbg_ptr);
716
+ return ret;
717
+ }
718
+ }
719
+
720
+ const CancellationTokenFinalization = (typeof FinalizationRegistry === 'undefined')
721
+ ? { register: () => {}, unregister: () => {} }
722
+ : new FinalizationRegistry(ptr => wasm.__wbg_cancellationtoken_free(ptr >>> 0, 1));
723
+
724
+ export class CancellationToken {
725
+
726
+ static __wrap(ptr) {
727
+ ptr = ptr >>> 0;
728
+ const obj = Object.create(CancellationToken.prototype);
729
+ obj.__wbg_ptr = ptr;
730
+ CancellationTokenFinalization.register(obj, obj.__wbg_ptr, obj);
731
+ return obj;
732
+ }
733
+
734
+ __destroy_into_raw() {
735
+ const ptr = this.__wbg_ptr;
736
+ this.__wbg_ptr = 0;
737
+ CancellationTokenFinalization.unregister(this);
738
+ return ptr;
739
+ }
740
+
741
+ free() {
742
+ const ptr = this.__destroy_into_raw();
743
+ wasm.__wbg_cancellationtoken_free(ptr, 0);
744
+ }
745
+ /**
746
+ * @param {Function} callback
747
+ */
748
+ onCancelled(callback) {
749
+ wasm.cancellationtoken_onCancelled(this.__wbg_ptr, callback);
750
+ }
751
+ constructor() {
752
+ const ret = wasm.cancellationtoken_new();
753
+ this.__wbg_ptr = ret >>> 0;
754
+ CancellationTokenFinalization.register(this, this.__wbg_ptr, this);
755
+ return this;
756
+ }
757
+ cancel() {
758
+ wasm.cancellationtoken_cancel(this.__wbg_ptr);
759
+ }
760
+ /**
761
+ * @returns {boolean}
762
+ */
763
+ aborted() {
764
+ const ret = wasm.cancellationtoken_aborted(this.__wbg_ptr);
765
+ return ret !== 0;
766
+ }
767
+ }
768
+
769
+ const ConnHandleFinalization = (typeof FinalizationRegistry === 'undefined')
770
+ ? { register: () => {}, unregister: () => {} }
771
+ : new FinalizationRegistry(ptr => wasm.__wbg_connhandle_free(ptr >>> 0, 1));
772
+
773
+ export class ConnHandle {
774
+
775
+ static __wrap(ptr) {
776
+ ptr = ptr >>> 0;
777
+ const obj = Object.create(ConnHandle.prototype);
778
+ obj.__wbg_ptr = ptr;
779
+ ConnHandleFinalization.register(obj, obj.__wbg_ptr, obj);
780
+ return obj;
781
+ }
782
+
783
+ __destroy_into_raw() {
784
+ const ptr = this.__wbg_ptr;
785
+ this.__wbg_ptr = 0;
786
+ ConnHandleFinalization.unregister(this);
787
+ return ptr;
788
+ }
789
+
790
+ free() {
791
+ const ptr = this.__destroy_into_raw();
792
+ wasm.__wbg_connhandle_free(ptr, 0);
793
+ }
794
+ /**
795
+ * @param {string | null} [reason]
796
+ * @returns {Promise<void>}
797
+ */
798
+ disconnect(reason) {
799
+ var ptr0 = isLikeNone(reason) ? 0 : passStringToWasm0(reason, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
800
+ var len0 = WASM_VECTOR_LEN;
801
+ const ret = wasm.connhandle_disconnect(this.__wbg_ptr, ptr0, len0);
802
+ return ret;
803
+ }
804
+ /**
805
+ * @returns {boolean}
806
+ */
807
+ isHibernatable() {
808
+ const ret = wasm.connhandle_isHibernatable(this.__wbg_ptr);
809
+ return ret !== 0;
810
+ }
811
+ /**
812
+ * @returns {string}
813
+ */
814
+ id() {
815
+ let deferred1_0;
816
+ let deferred1_1;
817
+ try {
818
+ const ret = wasm.connhandle_id(this.__wbg_ptr);
819
+ deferred1_0 = ret[0];
820
+ deferred1_1 = ret[1];
821
+ return getStringFromWasm0(ret[0], ret[1]);
822
+ } finally {
823
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
824
+ }
825
+ }
826
+ /**
827
+ * @param {string} name
828
+ * @param {Uint8Array} args
829
+ */
830
+ send(name, args) {
831
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
832
+ const len0 = WASM_VECTOR_LEN;
833
+ const ptr1 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
834
+ const len1 = WASM_VECTOR_LEN;
835
+ wasm.connhandle_send(this.__wbg_ptr, ptr0, len0, ptr1, len1);
836
+ }
837
+ /**
838
+ * @returns {Uint8Array}
839
+ */
840
+ state() {
841
+ const ret = wasm.connhandle_state(this.__wbg_ptr);
842
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
843
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
844
+ return v1;
845
+ }
846
+ /**
847
+ * @returns {Uint8Array}
848
+ */
849
+ params() {
850
+ const ret = wasm.connhandle_params(this.__wbg_ptr);
851
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
852
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
853
+ return v1;
854
+ }
855
+ /**
856
+ * @param {Uint8Array} state
857
+ */
858
+ setState(state) {
859
+ const ptr0 = passArray8ToWasm0(state, wasm.__wbindgen_malloc);
860
+ const len0 = WASM_VECTOR_LEN;
861
+ wasm.connhandle_setState(this.__wbg_ptr, ptr0, len0);
862
+ }
863
+ }
864
+
865
+ const CoreRegistryFinalization = (typeof FinalizationRegistry === 'undefined')
866
+ ? { register: () => {}, unregister: () => {} }
867
+ : new FinalizationRegistry(ptr => wasm.__wbg_coreregistry_free(ptr >>> 0, 1));
868
+
869
+ export class CoreRegistry {
870
+
871
+ __destroy_into_raw() {
872
+ const ptr = this.__wbg_ptr;
873
+ this.__wbg_ptr = 0;
874
+ CoreRegistryFinalization.unregister(this);
875
+ return ptr;
876
+ }
877
+
878
+ free() {
879
+ const ptr = this.__destroy_into_raw();
880
+ wasm.__wbg_coreregistry_free(ptr, 0);
881
+ }
882
+ /**
883
+ * @param {any} req
884
+ * @param {Function} on_stream_event
885
+ * @param {CancellationToken} cancel_token
886
+ * @param {any} config
887
+ * @returns {Promise<any>}
888
+ */
889
+ handleServerlessRequest(req, on_stream_event, cancel_token, config) {
890
+ _assertClass(cancel_token, CancellationToken);
891
+ const ret = wasm.coreregistry_handleServerlessRequest(this.__wbg_ptr, req, on_stream_event, cancel_token.__wbg_ptr, config);
892
+ return ret;
893
+ }
894
+ /**
895
+ * @param {any} config
896
+ * @returns {Promise<void>}
897
+ */
898
+ serve(config) {
899
+ const ret = wasm.coreregistry_serve(this.__wbg_ptr, config);
900
+ return ret;
901
+ }
902
+ /**
903
+ * @returns {Promise<void>}
904
+ */
905
+ shutdown() {
906
+ const ret = wasm.coreregistry_shutdown(this.__wbg_ptr);
907
+ return ret;
908
+ }
909
+ constructor() {
910
+ const ret = wasm.coreregistry_new();
911
+ this.__wbg_ptr = ret >>> 0;
912
+ CoreRegistryFinalization.register(this, this.__wbg_ptr, this);
913
+ return this;
914
+ }
915
+ /**
916
+ * @param {string} name
917
+ * @param {ActorFactory} factory
918
+ */
919
+ register(name, factory) {
920
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
921
+ const len0 = WASM_VECTOR_LEN;
922
+ _assertClass(factory, ActorFactory);
923
+ const ret = wasm.coreregistry_register(this.__wbg_ptr, ptr0, len0, factory.__wbg_ptr);
924
+ if (ret[1]) {
925
+ throw takeFromExternrefTable0(ret[0]);
926
+ }
927
+ }
928
+ }
929
+
930
+ const KvFinalization = (typeof FinalizationRegistry === 'undefined')
931
+ ? { register: () => {}, unregister: () => {} }
932
+ : new FinalizationRegistry(ptr => wasm.__wbg_kv_free(ptr >>> 0, 1));
933
+
934
+ export class Kv {
935
+
936
+ static __wrap(ptr) {
937
+ ptr = ptr >>> 0;
938
+ const obj = Object.create(Kv.prototype);
939
+ obj.__wbg_ptr = ptr;
940
+ KvFinalization.register(obj, obj.__wbg_ptr, obj);
941
+ return obj;
942
+ }
943
+
944
+ __destroy_into_raw() {
945
+ const ptr = this.__wbg_ptr;
946
+ this.__wbg_ptr = 0;
947
+ KvFinalization.unregister(this);
948
+ return ptr;
949
+ }
950
+
951
+ free() {
952
+ const ptr = this.__destroy_into_raw();
953
+ wasm.__wbg_kv_free(ptr, 0);
954
+ }
955
+ /**
956
+ * @param {Uint8Array} key
957
+ * @returns {Promise<void>}
958
+ */
959
+ delete(key) {
960
+ const ptr0 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
961
+ const len0 = WASM_VECTOR_LEN;
962
+ const ret = wasm.kv_delete(this.__wbg_ptr, ptr0, len0);
963
+ return ret;
964
+ }
965
+ /**
966
+ * @param {Uint8Array} start
967
+ * @param {Uint8Array} end
968
+ * @param {any} options
969
+ * @returns {Promise<any>}
970
+ */
971
+ listRange(start, end, options) {
972
+ const ptr0 = passArray8ToWasm0(start, wasm.__wbindgen_malloc);
973
+ const len0 = WASM_VECTOR_LEN;
974
+ const ptr1 = passArray8ToWasm0(end, wasm.__wbindgen_malloc);
975
+ const len1 = WASM_VECTOR_LEN;
976
+ const ret = wasm.kv_listRange(this.__wbg_ptr, ptr0, len0, ptr1, len1, options);
977
+ return ret;
978
+ }
979
+ /**
980
+ * @param {Uint8Array} prefix
981
+ * @param {any} options
982
+ * @returns {Promise<any>}
983
+ */
984
+ listPrefix(prefix, options) {
985
+ const ptr0 = passArray8ToWasm0(prefix, wasm.__wbindgen_malloc);
986
+ const len0 = WASM_VECTOR_LEN;
987
+ const ret = wasm.kv_listPrefix(this.__wbg_ptr, ptr0, len0, options);
988
+ return ret;
989
+ }
990
+ /**
991
+ * @param {Array<any>} keys
992
+ * @returns {Promise<void>}
993
+ */
994
+ batchDelete(keys) {
995
+ const ret = wasm.kv_batchDelete(this.__wbg_ptr, keys);
996
+ return ret;
997
+ }
998
+ /**
999
+ * @param {Uint8Array} start
1000
+ * @param {Uint8Array} end
1001
+ * @returns {Promise<void>}
1002
+ */
1003
+ deleteRange(start, end) {
1004
+ const ptr0 = passArray8ToWasm0(start, wasm.__wbindgen_malloc);
1005
+ const len0 = WASM_VECTOR_LEN;
1006
+ const ptr1 = passArray8ToWasm0(end, wasm.__wbindgen_malloc);
1007
+ const len1 = WASM_VECTOR_LEN;
1008
+ const ret = wasm.kv_deleteRange(this.__wbg_ptr, ptr0, len0, ptr1, len1);
1009
+ return ret;
1010
+ }
1011
+ /**
1012
+ * @param {Uint8Array} key
1013
+ * @returns {Promise<any>}
1014
+ */
1015
+ get(key) {
1016
+ const ptr0 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
1017
+ const len0 = WASM_VECTOR_LEN;
1018
+ const ret = wasm.kv_get(this.__wbg_ptr, ptr0, len0);
1019
+ return ret;
1020
+ }
1021
+ /**
1022
+ * @param {Uint8Array} key
1023
+ * @param {Uint8Array} value
1024
+ * @returns {Promise<void>}
1025
+ */
1026
+ put(key, value) {
1027
+ const ptr0 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
1028
+ const len0 = WASM_VECTOR_LEN;
1029
+ const ptr1 = passArray8ToWasm0(value, wasm.__wbindgen_malloc);
1030
+ const len1 = WASM_VECTOR_LEN;
1031
+ const ret = wasm.kv_put(this.__wbg_ptr, ptr0, len0, ptr1, len1);
1032
+ return ret;
1033
+ }
1034
+ /**
1035
+ * @param {Array<any>} keys
1036
+ * @returns {Promise<any>}
1037
+ */
1038
+ batchGet(keys) {
1039
+ const ret = wasm.kv_batchGet(this.__wbg_ptr, keys);
1040
+ return ret;
1041
+ }
1042
+ /**
1043
+ * @param {Array<any>} entries
1044
+ * @returns {Promise<void>}
1045
+ */
1046
+ batchPut(entries) {
1047
+ const ret = wasm.kv_batchPut(this.__wbg_ptr, entries);
1048
+ return ret;
1049
+ }
1050
+ }
1051
+
1052
+ const QueueFinalization = (typeof FinalizationRegistry === 'undefined')
1053
+ ? { register: () => {}, unregister: () => {} }
1054
+ : new FinalizationRegistry(ptr => wasm.__wbg_queue_free(ptr >>> 0, 1));
1055
+
1056
+ export class Queue {
1057
+
1058
+ static __wrap(ptr) {
1059
+ ptr = ptr >>> 0;
1060
+ const obj = Object.create(Queue.prototype);
1061
+ obj.__wbg_ptr = ptr;
1062
+ QueueFinalization.register(obj, obj.__wbg_ptr, obj);
1063
+ return obj;
1064
+ }
1065
+
1066
+ __destroy_into_raw() {
1067
+ const ptr = this.__wbg_ptr;
1068
+ this.__wbg_ptr = 0;
1069
+ QueueFinalization.unregister(this);
1070
+ return ptr;
1071
+ }
1072
+
1073
+ free() {
1074
+ const ptr = this.__destroy_into_raw();
1075
+ wasm.__wbg_queue_free(ptr, 0);
1076
+ }
1077
+ /**
1078
+ * @param {any} options
1079
+ * @param {CancellationToken | null} [signal]
1080
+ * @returns {Promise<Array<any>>}
1081
+ */
1082
+ nextBatch(options, signal) {
1083
+ let ptr0 = 0;
1084
+ if (!isLikeNone(signal)) {
1085
+ _assertClass(signal, CancellationToken);
1086
+ ptr0 = signal.__destroy_into_raw();
1087
+ }
1088
+ const ret = wasm.queue_nextBatch(this.__wbg_ptr, options, ptr0);
1089
+ return ret;
1090
+ }
1091
+ /**
1092
+ * @param {any} names
1093
+ * @param {any} options
1094
+ * @param {CancellationToken | null} [signal]
1095
+ * @returns {Promise<QueueMessage>}
1096
+ */
1097
+ waitForNames(names, options, signal) {
1098
+ let ptr0 = 0;
1099
+ if (!isLikeNone(signal)) {
1100
+ _assertClass(signal, CancellationToken);
1101
+ ptr0 = signal.__destroy_into_raw();
1102
+ }
1103
+ const ret = wasm.queue_waitForNames(this.__wbg_ptr, names, options, ptr0);
1104
+ return ret;
1105
+ }
1106
+ /**
1107
+ * @param {string} name
1108
+ * @param {Uint8Array} body
1109
+ * @param {any} options
1110
+ * @param {CancellationToken | null} [signal]
1111
+ * @returns {Promise<Uint8Array | undefined>}
1112
+ */
1113
+ enqueueAndWait(name, body, options, signal) {
1114
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1115
+ const len0 = WASM_VECTOR_LEN;
1116
+ const ptr1 = passArray8ToWasm0(body, wasm.__wbindgen_malloc);
1117
+ const len1 = WASM_VECTOR_LEN;
1118
+ let ptr2 = 0;
1119
+ if (!isLikeNone(signal)) {
1120
+ _assertClass(signal, CancellationToken);
1121
+ ptr2 = signal.__destroy_into_raw();
1122
+ }
1123
+ const ret = wasm.queue_enqueueAndWait(this.__wbg_ptr, ptr0, len0, ptr1, len1, options, ptr2);
1124
+ return ret;
1125
+ }
1126
+ /**
1127
+ * @returns {Promise<Array<any>>}
1128
+ */
1129
+ inspectMessages() {
1130
+ const ret = wasm.queue_inspectMessages(this.__wbg_ptr);
1131
+ return ret;
1132
+ }
1133
+ /**
1134
+ * @param {bigint} message_id
1135
+ * @param {string} expected_name
1136
+ * @param {Uint8Array | null} [response]
1137
+ * @returns {Promise<boolean>}
1138
+ */
1139
+ completePersisted(message_id, expected_name, response) {
1140
+ const ptr0 = passStringToWasm0(expected_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1141
+ const len0 = WASM_VECTOR_LEN;
1142
+ var ptr1 = isLikeNone(response) ? 0 : passArray8ToWasm0(response, wasm.__wbindgen_malloc);
1143
+ var len1 = WASM_VECTOR_LEN;
1144
+ const ret = wasm.queue_completePersisted(this.__wbg_ptr, message_id, ptr0, len0, ptr1, len1);
1145
+ return ret;
1146
+ }
1147
+ /**
1148
+ * @param {any} names
1149
+ * @param {any} options
1150
+ * @returns {Promise<void>}
1151
+ */
1152
+ waitForNamesAvailable(names, options) {
1153
+ const ret = wasm.queue_waitForNamesAvailable(this.__wbg_ptr, names, options);
1154
+ return ret;
1155
+ }
1156
+ /**
1157
+ * @param {string} name
1158
+ * @param {Uint8Array} body
1159
+ * @returns {Promise<QueueMessage>}
1160
+ */
1161
+ send(name, body) {
1162
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1163
+ const len0 = WASM_VECTOR_LEN;
1164
+ const ptr1 = passArray8ToWasm0(body, wasm.__wbindgen_malloc);
1165
+ const len1 = WASM_VECTOR_LEN;
1166
+ const ret = wasm.queue_send(this.__wbg_ptr, ptr0, len0, ptr1, len1);
1167
+ return ret;
1168
+ }
1169
+ /**
1170
+ * @returns {Promise<void>}
1171
+ */
1172
+ reset() {
1173
+ const ret = wasm.queue_reset(this.__wbg_ptr);
1174
+ return ret;
1175
+ }
1176
+ /**
1177
+ * @param {any} options
1178
+ * @returns {Array<any>}
1179
+ */
1180
+ tryNextBatch(options) {
1181
+ const ret = wasm.queue_tryNextBatch(this.__wbg_ptr, options);
1182
+ if (ret[2]) {
1183
+ throw takeFromExternrefTable0(ret[1]);
1184
+ }
1185
+ return takeFromExternrefTable0(ret[0]);
1186
+ }
1187
+ /**
1188
+ * @returns {number}
1189
+ */
1190
+ maxSize() {
1191
+ const ret = wasm.queue_maxSize(this.__wbg_ptr);
1192
+ return ret >>> 0;
1193
+ }
1194
+ }
1195
+
1196
+ const QueueMessageFinalization = (typeof FinalizationRegistry === 'undefined')
1197
+ ? { register: () => {}, unregister: () => {} }
1198
+ : new FinalizationRegistry(ptr => wasm.__wbg_queuemessage_free(ptr >>> 0, 1));
1199
+
1200
+ export class QueueMessage {
1201
+
1202
+ static __wrap(ptr) {
1203
+ ptr = ptr >>> 0;
1204
+ const obj = Object.create(QueueMessage.prototype);
1205
+ obj.__wbg_ptr = ptr;
1206
+ QueueMessageFinalization.register(obj, obj.__wbg_ptr, obj);
1207
+ return obj;
1208
+ }
1209
+
1210
+ __destroy_into_raw() {
1211
+ const ptr = this.__wbg_ptr;
1212
+ this.__wbg_ptr = 0;
1213
+ QueueMessageFinalization.unregister(this);
1214
+ return ptr;
1215
+ }
1216
+
1217
+ free() {
1218
+ const ptr = this.__destroy_into_raw();
1219
+ wasm.__wbg_queuemessage_free(ptr, 0);
1220
+ }
1221
+ /**
1222
+ * @param {any} response
1223
+ * @returns {Promise<void>}
1224
+ */
1225
+ complete(response) {
1226
+ const ret = wasm.queuemessage_complete(this.__wbg_ptr, response);
1227
+ return ret;
1228
+ }
1229
+ /**
1230
+ * @returns {number}
1231
+ */
1232
+ createdAt() {
1233
+ const ret = wasm.queuemessage_createdAt(this.__wbg_ptr);
1234
+ return ret;
1235
+ }
1236
+ /**
1237
+ * @returns {boolean}
1238
+ */
1239
+ isCompletable() {
1240
+ const ret = wasm.queuemessage_isCompletable(this.__wbg_ptr);
1241
+ return ret !== 0;
1242
+ }
1243
+ /**
1244
+ * @returns {bigint}
1245
+ */
1246
+ id() {
1247
+ const ret = wasm.queuemessage_id(this.__wbg_ptr);
1248
+ return BigInt.asUintN(64, ret);
1249
+ }
1250
+ /**
1251
+ * @returns {Uint8Array}
1252
+ */
1253
+ body() {
1254
+ const ret = wasm.queuemessage_body(this.__wbg_ptr);
1255
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
1256
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
1257
+ return v1;
1258
+ }
1259
+ /**
1260
+ * @returns {string}
1261
+ */
1262
+ name() {
1263
+ let deferred1_0;
1264
+ let deferred1_1;
1265
+ try {
1266
+ const ret = wasm.queuemessage_name(this.__wbg_ptr);
1267
+ deferred1_0 = ret[0];
1268
+ deferred1_1 = ret[1];
1269
+ return getStringFromWasm0(ret[0], ret[1]);
1270
+ } finally {
1271
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1272
+ }
1273
+ }
1274
+ }
1275
+
1276
+ const ScheduleFinalization = (typeof FinalizationRegistry === 'undefined')
1277
+ ? { register: () => {}, unregister: () => {} }
1278
+ : new FinalizationRegistry(ptr => wasm.__wbg_schedule_free(ptr >>> 0, 1));
1279
+
1280
+ export class Schedule {
1281
+
1282
+ static __wrap(ptr) {
1283
+ ptr = ptr >>> 0;
1284
+ const obj = Object.create(Schedule.prototype);
1285
+ obj.__wbg_ptr = ptr;
1286
+ ScheduleFinalization.register(obj, obj.__wbg_ptr, obj);
1287
+ return obj;
1288
+ }
1289
+
1290
+ __destroy_into_raw() {
1291
+ const ptr = this.__wbg_ptr;
1292
+ this.__wbg_ptr = 0;
1293
+ ScheduleFinalization.unregister(this);
1294
+ return ptr;
1295
+ }
1296
+
1297
+ free() {
1298
+ const ptr = this.__destroy_into_raw();
1299
+ wasm.__wbg_schedule_free(ptr, 0);
1300
+ }
1301
+ /**
1302
+ * @param {string} name
1303
+ * @param {number} interval_ms
1304
+ * @param {string} action_name
1305
+ * @param {Uint8Array} args
1306
+ * @param {number | null} [max_history]
1307
+ * @returns {Promise<void>}
1308
+ */
1309
+ cronEvery(name, interval_ms, action_name, args, max_history) {
1310
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1311
+ const len0 = WASM_VECTOR_LEN;
1312
+ const ptr1 = passStringToWasm0(action_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1313
+ const len1 = WASM_VECTOR_LEN;
1314
+ const ptr2 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
1315
+ const len2 = WASM_VECTOR_LEN;
1316
+ const ret = wasm.schedule_cronEvery(this.__wbg_ptr, ptr0, len0, interval_ms, ptr1, len1, ptr2, len2, !isLikeNone(max_history), isLikeNone(max_history) ? 0 : max_history);
1317
+ return ret;
1318
+ }
1319
+ /**
1320
+ * @param {string} name
1321
+ * @returns {Promise<boolean>}
1322
+ */
1323
+ cronDelete(name) {
1324
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1325
+ const len0 = WASM_VECTOR_LEN;
1326
+ const ret = wasm.schedule_cronDelete(this.__wbg_ptr, ptr0, len0);
1327
+ return ret;
1328
+ }
1329
+ /**
1330
+ * @param {string} name
1331
+ * @param {number | null} [limit]
1332
+ * @returns {Promise<any>}
1333
+ */
1334
+ cronHistory(name, limit) {
1335
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1336
+ const len0 = WASM_VECTOR_LEN;
1337
+ const ret = wasm.schedule_cronHistory(this.__wbg_ptr, ptr0, len0, !isLikeNone(limit), isLikeNone(limit) ? 0 : limit);
1338
+ return ret;
1339
+ }
1340
+ /**
1341
+ * @param {number} timestamp_ms
1342
+ * @param {string} action_name
1343
+ * @param {Uint8Array} args
1344
+ * @returns {Promise<string>}
1345
+ */
1346
+ at(timestamp_ms, action_name, args) {
1347
+ const ptr0 = passStringToWasm0(action_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1348
+ const len0 = WASM_VECTOR_LEN;
1349
+ const ptr1 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
1350
+ const len1 = WASM_VECTOR_LEN;
1351
+ const ret = wasm.schedule_at(this.__wbg_ptr, timestamp_ms, ptr0, len0, ptr1, len1);
1352
+ return ret;
1353
+ }
1354
+ /**
1355
+ * @param {string} id
1356
+ * @returns {Promise<any>}
1357
+ */
1358
+ get(id) {
1359
+ const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1360
+ const len0 = WASM_VECTOR_LEN;
1361
+ const ret = wasm.schedule_get(this.__wbg_ptr, ptr0, len0);
1362
+ return ret;
1363
+ }
1364
+ /**
1365
+ * @returns {Promise<any>}
1366
+ */
1367
+ list() {
1368
+ const ret = wasm.schedule_list(this.__wbg_ptr);
1369
+ return ret;
1370
+ }
1371
+ /**
1372
+ * @param {number} duration_ms
1373
+ * @param {string} action_name
1374
+ * @param {Uint8Array} args
1375
+ * @returns {Promise<string>}
1376
+ */
1377
+ after(duration_ms, action_name, args) {
1378
+ const ptr0 = passStringToWasm0(action_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1379
+ const len0 = WASM_VECTOR_LEN;
1380
+ const ptr1 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
1381
+ const len1 = WASM_VECTOR_LEN;
1382
+ const ret = wasm.schedule_after(this.__wbg_ptr, duration_ms, ptr0, len0, ptr1, len1);
1383
+ return ret;
1384
+ }
1385
+ /**
1386
+ * @param {string} id
1387
+ * @returns {Promise<boolean>}
1388
+ */
1389
+ cancel(id) {
1390
+ const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1391
+ const len0 = WASM_VECTOR_LEN;
1392
+ const ret = wasm.schedule_cancel(this.__wbg_ptr, ptr0, len0);
1393
+ return ret;
1394
+ }
1395
+ /**
1396
+ * @param {string} name
1397
+ * @returns {Promise<any>}
1398
+ */
1399
+ cronGet(name) {
1400
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1401
+ const len0 = WASM_VECTOR_LEN;
1402
+ const ret = wasm.schedule_cronGet(this.__wbg_ptr, ptr0, len0);
1403
+ return ret;
1404
+ }
1405
+ /**
1406
+ * @param {string} name
1407
+ * @param {string} expression
1408
+ * @param {string | null | undefined} timezone
1409
+ * @param {string} action_name
1410
+ * @param {Uint8Array} args
1411
+ * @param {number | null} [max_history]
1412
+ * @returns {Promise<void>}
1413
+ */
1414
+ cronSet(name, expression, timezone, action_name, args, max_history) {
1415
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1416
+ const len0 = WASM_VECTOR_LEN;
1417
+ const ptr1 = passStringToWasm0(expression, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1418
+ const len1 = WASM_VECTOR_LEN;
1419
+ var ptr2 = isLikeNone(timezone) ? 0 : passStringToWasm0(timezone, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1420
+ var len2 = WASM_VECTOR_LEN;
1421
+ const ptr3 = passStringToWasm0(action_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1422
+ const len3 = WASM_VECTOR_LEN;
1423
+ const ptr4 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
1424
+ const len4 = WASM_VECTOR_LEN;
1425
+ const ret = wasm.schedule_cronSet(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, !isLikeNone(max_history), isLikeNone(max_history) ? 0 : max_history);
1426
+ return ret;
1427
+ }
1428
+ /**
1429
+ * @returns {Promise<any>}
1430
+ */
1431
+ cronList() {
1432
+ const ret = wasm.schedule_cronList(this.__wbg_ptr);
1433
+ return ret;
1434
+ }
1435
+ }
1436
+
1437
+ const SqliteDbFinalization = (typeof FinalizationRegistry === 'undefined')
1438
+ ? { register: () => {}, unregister: () => {} }
1439
+ : new FinalizationRegistry(ptr => wasm.__wbg_sqlitedb_free(ptr >>> 0, 1));
1440
+
1441
+ export class SqliteDb {
1442
+
1443
+ static __wrap(ptr) {
1444
+ ptr = ptr >>> 0;
1445
+ const obj = Object.create(SqliteDb.prototype);
1446
+ obj.__wbg_ptr = ptr;
1447
+ SqliteDbFinalization.register(obj, obj.__wbg_ptr, obj);
1448
+ return obj;
1449
+ }
1450
+
1451
+ __destroy_into_raw() {
1452
+ const ptr = this.__wbg_ptr;
1453
+ this.__wbg_ptr = 0;
1454
+ SqliteDbFinalization.unregister(this);
1455
+ return ptr;
1456
+ }
1457
+
1458
+ free() {
1459
+ const ptr = this.__destroy_into_raw();
1460
+ wasm.__wbg_sqlitedb_free(ptr, 0);
1461
+ }
1462
+ /**
1463
+ * @param {any} statements
1464
+ * @returns {Promise<any>}
1465
+ */
1466
+ executeBatch(statements) {
1467
+ const ret = wasm.sqlitedb_executeBatch(this.__wbg_ptr, statements);
1468
+ return ret;
1469
+ }
1470
+ /**
1471
+ * @param {number | null} [timeout_ms]
1472
+ * @param {string | null} [name]
1473
+ * @returns {Promise<SqliteTransaction>}
1474
+ */
1475
+ beginTransaction(timeout_ms, name) {
1476
+ var ptr0 = isLikeNone(name) ? 0 : passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1477
+ var len0 = WASM_VECTOR_LEN;
1478
+ const ret = wasm.sqlitedb_beginTransaction(this.__wbg_ptr, !isLikeNone(timeout_ms), isLikeNone(timeout_ms) ? 0 : timeout_ms, ptr0, len0);
1479
+ return ret;
1480
+ }
1481
+ /**
1482
+ * @param {string} sql
1483
+ * @param {any} params
1484
+ * @returns {Promise<any>}
1485
+ */
1486
+ run(sql, params) {
1487
+ const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1488
+ const len0 = WASM_VECTOR_LEN;
1489
+ const ret = wasm.sqlitedb_run(this.__wbg_ptr, ptr0, len0, params);
1490
+ return ret;
1491
+ }
1492
+ /**
1493
+ * @param {string} sql
1494
+ * @returns {Promise<any>}
1495
+ */
1496
+ exec(sql) {
1497
+ const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1498
+ const len0 = WASM_VECTOR_LEN;
1499
+ const ret = wasm.sqlitedb_exec(this.__wbg_ptr, ptr0, len0);
1500
+ return ret;
1501
+ }
1502
+ /**
1503
+ * @returns {Promise<void>}
1504
+ */
1505
+ close() {
1506
+ const ret = wasm.sqlitedb_close(this.__wbg_ptr);
1507
+ return ret;
1508
+ }
1509
+ /**
1510
+ * @param {string} sql
1511
+ * @param {any} params
1512
+ * @returns {Promise<any>}
1513
+ */
1514
+ query(sql, params) {
1515
+ const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1516
+ const len0 = WASM_VECTOR_LEN;
1517
+ const ret = wasm.sqlitedb_query(this.__wbg_ptr, ptr0, len0, params);
1518
+ return ret;
1519
+ }
1520
+ /**
1521
+ * @param {string} sql
1522
+ * @param {any} params
1523
+ * @returns {Promise<any>}
1524
+ */
1525
+ execute(sql, params) {
1526
+ const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1527
+ const len0 = WASM_VECTOR_LEN;
1528
+ const ret = wasm.sqlitedb_execute(this.__wbg_ptr, ptr0, len0, params);
1529
+ return ret;
1530
+ }
1531
+ }
1532
+
1533
+ const SqliteTransactionFinalization = (typeof FinalizationRegistry === 'undefined')
1534
+ ? { register: () => {}, unregister: () => {} }
1535
+ : new FinalizationRegistry(ptr => wasm.__wbg_sqlitetransaction_free(ptr >>> 0, 1));
1536
+
1537
+ export class SqliteTransaction {
1538
+
1539
+ static __wrap(ptr) {
1540
+ ptr = ptr >>> 0;
1541
+ const obj = Object.create(SqliteTransaction.prototype);
1542
+ obj.__wbg_ptr = ptr;
1543
+ SqliteTransactionFinalization.register(obj, obj.__wbg_ptr, obj);
1544
+ return obj;
1545
+ }
1546
+
1547
+ __destroy_into_raw() {
1548
+ const ptr = this.__wbg_ptr;
1549
+ this.__wbg_ptr = 0;
1550
+ SqliteTransactionFinalization.unregister(this);
1551
+ return ptr;
1552
+ }
1553
+
1554
+ free() {
1555
+ const ptr = this.__destroy_into_raw();
1556
+ wasm.__wbg_sqlitetransaction_free(ptr, 0);
1557
+ }
1558
+ /**
1559
+ * @param {string} sql
1560
+ * @returns {Promise<any>}
1561
+ */
1562
+ exec(sql) {
1563
+ const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1564
+ const len0 = WASM_VECTOR_LEN;
1565
+ const ret = wasm.sqlitetransaction_exec(this.__wbg_ptr, ptr0, len0);
1566
+ return ret;
1567
+ }
1568
+ /**
1569
+ * @returns {Promise<void>}
1570
+ */
1571
+ commit() {
1572
+ const ret = wasm.sqlitetransaction_commit(this.__wbg_ptr);
1573
+ return ret;
1574
+ }
1575
+ /**
1576
+ * @param {string} sql
1577
+ * @param {any} params
1578
+ * @returns {Promise<any>}
1579
+ */
1580
+ execute(sql, params) {
1581
+ const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1582
+ const len0 = WASM_VECTOR_LEN;
1583
+ const ret = wasm.sqlitetransaction_execute(this.__wbg_ptr, ptr0, len0, params);
1584
+ return ret;
1585
+ }
1586
+ /**
1587
+ * @returns {Promise<void>}
1588
+ */
1589
+ rollback() {
1590
+ const ret = wasm.sqlitetransaction_rollback(this.__wbg_ptr);
1591
+ return ret;
1592
+ }
1593
+ }
1594
+
1595
+ const WebSocketHandleFinalization = (typeof FinalizationRegistry === 'undefined')
1596
+ ? { register: () => {}, unregister: () => {} }
1597
+ : new FinalizationRegistry(ptr => wasm.__wbg_websockethandle_free(ptr >>> 0, 1));
1598
+
1599
+ export class WebSocketHandle {
1600
+
1601
+ static __wrap(ptr) {
1602
+ ptr = ptr >>> 0;
1603
+ const obj = Object.create(WebSocketHandle.prototype);
1604
+ obj.__wbg_ptr = ptr;
1605
+ WebSocketHandleFinalization.register(obj, obj.__wbg_ptr, obj);
1606
+ return obj;
1607
+ }
1608
+
1609
+ __destroy_into_raw() {
1610
+ const ptr = this.__wbg_ptr;
1611
+ this.__wbg_ptr = 0;
1612
+ WebSocketHandleFinalization.unregister(this);
1613
+ return ptr;
1614
+ }
1615
+
1616
+ free() {
1617
+ const ptr = this.__destroy_into_raw();
1618
+ wasm.__wbg_websockethandle_free(ptr, 0);
1619
+ }
1620
+ /**
1621
+ * @param {number | null} [code]
1622
+ * @param {string | null} [reason]
1623
+ * @returns {Promise<void>}
1624
+ */
1625
+ close(code, reason) {
1626
+ var ptr0 = isLikeNone(reason) ? 0 : passStringToWasm0(reason, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1627
+ var len0 = WASM_VECTOR_LEN;
1628
+ const ret = wasm.websockethandle_close(this.__wbg_ptr, isLikeNone(code) ? 0xFFFFFF : code, ptr0, len0);
1629
+ return ret;
1630
+ }
1631
+ /**
1632
+ * @param {Function} callback
1633
+ */
1634
+ setEventCallback(callback) {
1635
+ wasm.websockethandle_setEventCallback(this.__wbg_ptr, callback);
1636
+ }
1637
+ /**
1638
+ * @param {Uint8Array} data
1639
+ * @param {boolean} binary
1640
+ */
1641
+ send(data, binary) {
1642
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
1643
+ const len0 = WASM_VECTOR_LEN;
1644
+ const ret = wasm.websockethandle_send(this.__wbg_ptr, ptr0, len0, binary);
1645
+ if (ret[1]) {
1646
+ throw takeFromExternrefTable0(ret[0]);
1647
+ }
1648
+ }
1649
+ }
1650
+
1651
+ async function __wbg_load(module, imports) {
1652
+ if (typeof Response === 'function' && module instanceof Response) {
1653
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
1654
+ try {
1655
+ return await WebAssembly.instantiateStreaming(module, imports);
1656
+
1657
+ } catch (e) {
1658
+ if (module.headers.get('Content-Type') != 'application/wasm') {
1659
+ console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
1660
+
1661
+ } else {
1662
+ throw e;
1663
+ }
1664
+ }
1665
+ }
1666
+
1667
+ const bytes = await module.arrayBuffer();
1668
+ return await WebAssembly.instantiate(bytes, imports);
1669
+
1670
+ } else {
1671
+ const instance = await WebAssembly.instantiate(module, imports);
1672
+
1673
+ if (instance instanceof WebAssembly.Instance) {
1674
+ return { instance, module };
1675
+
1676
+ } else {
1677
+ return instance;
1678
+ }
1679
+ }
1680
+ }
1681
+
1682
+ function __wbg_get_imports() {
1683
+ const imports = {};
1684
+ imports.wbg = {};
1685
+ imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
1686
+ const ret = String(arg1);
1687
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1688
+ const len1 = WASM_VECTOR_LEN;
1689
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1690
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1691
+ };
1692
+ imports.wbg.__wbg_actorcontext_new = function(arg0) {
1693
+ const ret = ActorContext.__wrap(arg0);
1694
+ return ret;
1695
+ };
1696
+ imports.wbg.__wbg_actorstatetransaction_new = function(arg0) {
1697
+ const ret = ActorStateTransaction.__wrap(arg0);
1698
+ return ret;
1699
+ };
1700
+ imports.wbg.__wbg_buffer_09165b52af8c5237 = function(arg0) {
1701
+ const ret = arg0.buffer;
1702
+ return ret;
1703
+ };
1704
+ imports.wbg.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
1705
+ const ret = arg0.buffer;
1706
+ return ret;
1707
+ };
1708
+ imports.wbg.__wbg_bufferedAmount_a482960ac51b25e8 = function(arg0) {
1709
+ const ret = arg0.bufferedAmount;
1710
+ return ret;
1711
+ };
1712
+ imports.wbg.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
1713
+ const ret = arg0.call(arg1);
1714
+ return ret;
1715
+ }, arguments) };
1716
+ imports.wbg.__wbg_call_7cccdd69e0791ae2 = function() { return handleError(function (arg0, arg1, arg2) {
1717
+ const ret = arg0.call(arg1, arg2);
1718
+ return ret;
1719
+ }, arguments) };
1720
+ imports.wbg.__wbg_call_833bed5770ea2041 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
1721
+ const ret = arg0.call(arg1, arg2, arg3);
1722
+ return ret;
1723
+ }, arguments) };
1724
+ imports.wbg.__wbg_cancellationtoken_new = function(arg0) {
1725
+ const ret = CancellationToken.__wrap(arg0);
1726
+ return ret;
1727
+ };
1728
+ imports.wbg.__wbg_close_2893b7d056a0627d = function() { return handleError(function (arg0) {
1729
+ arg0.close();
1730
+ }, arguments) };
1731
+ imports.wbg.__wbg_close_e1253d480ed93ce3 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
1732
+ arg0.close(arg1, getStringFromWasm0(arg2, arg3));
1733
+ }, arguments) };
1734
+ imports.wbg.__wbg_code_f4ec1e6e2e1b0417 = function(arg0) {
1735
+ const ret = arg0.code;
1736
+ return ret;
1737
+ };
1738
+ imports.wbg.__wbg_connhandle_new = function(arg0) {
1739
+ const ret = ConnHandle.__wrap(arg0);
1740
+ return ret;
1741
+ };
1742
+ imports.wbg.__wbg_construct_b91ff0e53b60c0c3 = function() { return handleError(function (arg0, arg1) {
1743
+ const ret = Reflect.construct(arg0, arg1);
1744
+ return ret;
1745
+ }, arguments) };
1746
+ imports.wbg.__wbg_crypto_574e78ad8b13b65f = function(arg0) {
1747
+ const ret = arg0.crypto;
1748
+ return ret;
1749
+ };
1750
+ imports.wbg.__wbg_data_432d9c3df2630942 = function(arg0) {
1751
+ const ret = arg0.data;
1752
+ return ret;
1753
+ };
1754
+ imports.wbg.__wbg_done_769e5ede4b31c67b = function(arg0) {
1755
+ const ret = arg0.done;
1756
+ return ret;
1757
+ };
1758
+ imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
1759
+ let deferred0_0;
1760
+ let deferred0_1;
1761
+ try {
1762
+ deferred0_0 = arg0;
1763
+ deferred0_1 = arg1;
1764
+ console.error(getStringFromWasm0(arg0, arg1));
1765
+ } finally {
1766
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1767
+ }
1768
+ };
1769
+ imports.wbg.__wbg_getRandomValues_430b4ece0366b997 = function() { return handleError(function (arg0, arg1) {
1770
+ globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
1771
+ }, arguments) };
1772
+ imports.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
1773
+ arg0.getRandomValues(arg1);
1774
+ }, arguments) };
1775
+ imports.wbg.__wbg_get_67b2ba62fc30de12 = function() { return handleError(function (arg0, arg1) {
1776
+ const ret = Reflect.get(arg0, arg1);
1777
+ return ret;
1778
+ }, arguments) };
1779
+ imports.wbg.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
1780
+ const ret = arg0[arg1 >>> 0];
1781
+ return ret;
1782
+ };
1783
+ imports.wbg.__wbg_getwithrefkey_1dc361bd10053bfe = function(arg0, arg1) {
1784
+ const ret = arg0[arg1];
1785
+ return ret;
1786
+ };
1787
+ imports.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {
1788
+ let result;
1789
+ try {
1790
+ result = arg0 instanceof ArrayBuffer;
1791
+ } catch (_) {
1792
+ result = false;
1793
+ }
1794
+ const ret = result;
1795
+ return ret;
1796
+ };
1797
+ imports.wbg.__wbg_instanceof_Error_4d54113b22d20306 = function(arg0) {
1798
+ let result;
1799
+ try {
1800
+ result = arg0 instanceof Error;
1801
+ } catch (_) {
1802
+ result = false;
1803
+ }
1804
+ const ret = result;
1805
+ return ret;
1806
+ };
1807
+ imports.wbg.__wbg_instanceof_Object_7f2dcef8f78644a4 = function(arg0) {
1808
+ let result;
1809
+ try {
1810
+ result = arg0 instanceof Object;
1811
+ } catch (_) {
1812
+ result = false;
1813
+ }
1814
+ const ret = result;
1815
+ return ret;
1816
+ };
1817
+ imports.wbg.__wbg_instanceof_Promise_935168b8f4b49db3 = function(arg0) {
1818
+ let result;
1819
+ try {
1820
+ result = arg0 instanceof Promise;
1821
+ } catch (_) {
1822
+ result = false;
1823
+ }
1824
+ const ret = result;
1825
+ return ret;
1826
+ };
1827
+ imports.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function(arg0) {
1828
+ let result;
1829
+ try {
1830
+ result = arg0 instanceof Uint8Array;
1831
+ } catch (_) {
1832
+ result = false;
1833
+ }
1834
+ const ret = result;
1835
+ return ret;
1836
+ };
1837
+ imports.wbg.__wbg_isArray_a1eab7e0d067391b = function(arg0) {
1838
+ const ret = Array.isArray(arg0);
1839
+ return ret;
1840
+ };
1841
+ imports.wbg.__wbg_isSafeInteger_343e2beeeece1bb0 = function(arg0) {
1842
+ const ret = Number.isSafeInteger(arg0);
1843
+ return ret;
1844
+ };
1845
+ imports.wbg.__wbg_iterator_9a24c88df860dc65 = function() {
1846
+ const ret = Symbol.iterator;
1847
+ return ret;
1848
+ };
1849
+ imports.wbg.__wbg_keys_5c77a08ddc2fb8a6 = function(arg0) {
1850
+ const ret = Object.keys(arg0);
1851
+ return ret;
1852
+ };
1853
+ imports.wbg.__wbg_length_a446193dc22c12f8 = function(arg0) {
1854
+ const ret = arg0.length;
1855
+ return ret;
1856
+ };
1857
+ imports.wbg.__wbg_length_e2d2a49132c1b256 = function(arg0) {
1858
+ const ret = arg0.length;
1859
+ return ret;
1860
+ };
1861
+ imports.wbg.__wbg_message_97a2af9b89d693a3 = function(arg0) {
1862
+ const ret = arg0.message;
1863
+ return ret;
1864
+ };
1865
+ imports.wbg.__wbg_message_d1685a448ba00178 = function(arg0, arg1) {
1866
+ const ret = arg1.message;
1867
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1868
+ const len1 = WASM_VECTOR_LEN;
1869
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1870
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1871
+ };
1872
+ imports.wbg.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
1873
+ const ret = arg0.msCrypto;
1874
+ return ret;
1875
+ };
1876
+ imports.wbg.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
1877
+ try {
1878
+ var state0 = {a: arg0, b: arg1};
1879
+ var cb0 = (arg0, arg1) => {
1880
+ const a = state0.a;
1881
+ state0.a = 0;
1882
+ try {
1883
+ return __wbg_adapter_297(a, state0.b, arg0, arg1);
1884
+ } finally {
1885
+ state0.a = a;
1886
+ }
1887
+ };
1888
+ const ret = new Promise(cb0);
1889
+ return ret;
1890
+ } finally {
1891
+ state0.a = state0.b = 0;
1892
+ }
1893
+ };
1894
+ imports.wbg.__wbg_new_405e22f390576ce2 = function() {
1895
+ const ret = new Object();
1896
+ return ret;
1897
+ };
1898
+ imports.wbg.__wbg_new_5e0be73521bc8c17 = function() {
1899
+ const ret = new Map();
1900
+ return ret;
1901
+ };
1902
+ imports.wbg.__wbg_new_78feb108b6472713 = function() {
1903
+ const ret = new Array();
1904
+ return ret;
1905
+ };
1906
+ imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
1907
+ const ret = new Error();
1908
+ return ret;
1909
+ };
1910
+ imports.wbg.__wbg_new_a12002a7f91c75be = function(arg0) {
1911
+ const ret = new Uint8Array(arg0);
1912
+ return ret;
1913
+ };
1914
+ imports.wbg.__wbg_new_c68d7209be747379 = function(arg0, arg1) {
1915
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
1916
+ return ret;
1917
+ };
1918
+ imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
1919
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
1920
+ return ret;
1921
+ };
1922
+ imports.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(arg0, arg1, arg2) {
1923
+ const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
1924
+ return ret;
1925
+ };
1926
+ imports.wbg.__wbg_newwithlength_a381634e90c276d4 = function(arg0) {
1927
+ const ret = new Uint8Array(arg0 >>> 0);
1928
+ return ret;
1929
+ };
1930
+ imports.wbg.__wbg_newwithstrsequence_6e9d6479e1cf978d = function() { return handleError(function (arg0, arg1, arg2) {
1931
+ const ret = new WebSocket(getStringFromWasm0(arg0, arg1), arg2);
1932
+ return ret;
1933
+ }, arguments) };
1934
+ imports.wbg.__wbg_next_25feadfc0913fea9 = function(arg0) {
1935
+ const ret = arg0.next;
1936
+ return ret;
1937
+ };
1938
+ imports.wbg.__wbg_next_6574e1a8a62d1055 = function() { return handleError(function (arg0) {
1939
+ const ret = arg0.next();
1940
+ return ret;
1941
+ }, arguments) };
1942
+ imports.wbg.__wbg_node_905d3e251edff8a2 = function(arg0) {
1943
+ const ret = arg0.node;
1944
+ return ret;
1945
+ };
1946
+ imports.wbg.__wbg_now_2c95c9de01293173 = function(arg0) {
1947
+ const ret = arg0.now();
1948
+ return ret;
1949
+ };
1950
+ imports.wbg.__wbg_now_807e54c39636c349 = function() {
1951
+ const ret = Date.now();
1952
+ return ret;
1953
+ };
1954
+ imports.wbg.__wbg_performance_7a3ffd0b17f663ad = function(arg0) {
1955
+ const ret = arg0.performance;
1956
+ return ret;
1957
+ };
1958
+ imports.wbg.__wbg_process_dc0fbacc7c1c06f7 = function(arg0) {
1959
+ const ret = arg0.process;
1960
+ return ret;
1961
+ };
1962
+ imports.wbg.__wbg_push_737cfc8c1432c2c6 = function(arg0, arg1) {
1963
+ const ret = arg0.push(arg1);
1964
+ return ret;
1965
+ };
1966
+ imports.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function(arg0) {
1967
+ queueMicrotask(arg0);
1968
+ };
1969
+ imports.wbg.__wbg_queueMicrotask_d3219def82552485 = function(arg0) {
1970
+ const ret = arg0.queueMicrotask;
1971
+ return ret;
1972
+ };
1973
+ imports.wbg.__wbg_queuemessage_new = function(arg0) {
1974
+ const ret = QueueMessage.__wrap(arg0);
1975
+ return ret;
1976
+ };
1977
+ imports.wbg.__wbg_randomFillSync_ac0988aba3254290 = function() { return handleError(function (arg0, arg1) {
1978
+ arg0.randomFillSync(arg1);
1979
+ }, arguments) };
1980
+ imports.wbg.__wbg_readyState_7ef6e63c349899ed = function(arg0) {
1981
+ const ret = arg0.readyState;
1982
+ return ret;
1983
+ };
1984
+ imports.wbg.__wbg_reason_49f1cede8bcf23dd = function(arg0, arg1) {
1985
+ const ret = arg1.reason;
1986
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1987
+ const len1 = WASM_VECTOR_LEN;
1988
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1989
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1990
+ };
1991
+ imports.wbg.__wbg_require_60cc747a6bc5215a = function() { return handleError(function () {
1992
+ const ret = module.require;
1993
+ return ret;
1994
+ }, arguments) };
1995
+ imports.wbg.__wbg_resolve_4851785c9c5f573d = function(arg0) {
1996
+ const ret = Promise.resolve(arg0);
1997
+ return ret;
1998
+ };
1999
+ imports.wbg.__wbg_send_7c4769e24cf1d784 = function() { return handleError(function (arg0, arg1) {
2000
+ arg0.send(arg1);
2001
+ }, arguments) };
2002
+ imports.wbg.__wbg_set_37837023f3d740e8 = function(arg0, arg1, arg2) {
2003
+ arg0[arg1 >>> 0] = arg2;
2004
+ };
2005
+ imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
2006
+ arg0[arg1] = arg2;
2007
+ };
2008
+ imports.wbg.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
2009
+ arg0.set(arg1, arg2 >>> 0);
2010
+ };
2011
+ imports.wbg.__wbg_set_8fc6bf8a5b1071d1 = function(arg0, arg1, arg2) {
2012
+ const ret = arg0.set(arg1, arg2);
2013
+ return ret;
2014
+ };
2015
+ imports.wbg.__wbg_set_bb8cecf6a62b9f46 = function() { return handleError(function (arg0, arg1, arg2) {
2016
+ const ret = Reflect.set(arg0, arg1, arg2);
2017
+ return ret;
2018
+ }, arguments) };
2019
+ imports.wbg.__wbg_setbinaryType_92fa1ffd873b327c = function(arg0, arg1) {
2020
+ arg0.binaryType = __wbindgen_enum_BinaryType[arg1];
2021
+ };
2022
+ imports.wbg.__wbg_setonclose_14fc475a49d488fc = function(arg0, arg1) {
2023
+ arg0.onclose = arg1;
2024
+ };
2025
+ imports.wbg.__wbg_setonerror_8639efe354b947cd = function(arg0, arg1) {
2026
+ arg0.onerror = arg1;
2027
+ };
2028
+ imports.wbg.__wbg_setonmessage_6eccab530a8fb4c7 = function(arg0, arg1) {
2029
+ arg0.onmessage = arg1;
2030
+ };
2031
+ imports.wbg.__wbg_setonopen_2da654e1f39745d5 = function(arg0, arg1) {
2032
+ arg0.onopen = arg1;
2033
+ };
2034
+ imports.wbg.__wbg_sqlitetransaction_new = function(arg0) {
2035
+ const ret = SqliteTransaction.__wrap(arg0);
2036
+ return ret;
2037
+ };
2038
+ imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
2039
+ const ret = arg1.stack;
2040
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2041
+ const len1 = WASM_VECTOR_LEN;
2042
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2043
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2044
+ };
2045
+ imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
2046
+ const ret = typeof global === 'undefined' ? null : global;
2047
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2048
+ };
2049
+ imports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
2050
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
2051
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2052
+ };
2053
+ imports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
2054
+ const ret = typeof self === 'undefined' ? null : self;
2055
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2056
+ };
2057
+ imports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
2058
+ const ret = typeof window === 'undefined' ? null : window;
2059
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
2060
+ };
2061
+ imports.wbg.__wbg_stringify_f7ed6987935b4a24 = function() { return handleError(function (arg0) {
2062
+ const ret = JSON.stringify(arg0);
2063
+ return ret;
2064
+ }, arguments) };
2065
+ imports.wbg.__wbg_subarray_aa9065fa9dc5df96 = function(arg0, arg1, arg2) {
2066
+ const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
2067
+ return ret;
2068
+ };
2069
+ imports.wbg.__wbg_then_44b73946d2fb3e7d = function(arg0, arg1) {
2070
+ const ret = arg0.then(arg1);
2071
+ return ret;
2072
+ };
2073
+ imports.wbg.__wbg_then_48b406749878a531 = function(arg0, arg1, arg2) {
2074
+ const ret = arg0.then(arg1, arg2);
2075
+ return ret;
2076
+ };
2077
+ imports.wbg.__wbg_value_cd1ffa7b1ab794f1 = function(arg0) {
2078
+ const ret = arg0.value;
2079
+ return ret;
2080
+ };
2081
+ imports.wbg.__wbg_versions_c01dfd4722a88165 = function(arg0) {
2082
+ const ret = arg0.versions;
2083
+ return ret;
2084
+ };
2085
+ imports.wbg.__wbg_websockethandle_new = function(arg0) {
2086
+ const ret = WebSocketHandle.__wrap(arg0);
2087
+ return ret;
2088
+ };
2089
+ imports.wbg.__wbindgen_as_number = function(arg0) {
2090
+ const ret = +arg0;
2091
+ return ret;
2092
+ };
2093
+ imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
2094
+ const ret = arg0;
2095
+ return ret;
2096
+ };
2097
+ imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
2098
+ const ret = BigInt.asUintN(64, arg0);
2099
+ return ret;
2100
+ };
2101
+ imports.wbg.__wbindgen_boolean_get = function(arg0) {
2102
+ const v = arg0;
2103
+ const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
2104
+ return ret;
2105
+ };
2106
+ imports.wbg.__wbindgen_cb_drop = function(arg0) {
2107
+ const obj = arg0.original;
2108
+ if (obj.cnt-- == 1) {
2109
+ obj.a = 0;
2110
+ return true;
2111
+ }
2112
+ const ret = false;
2113
+ return ret;
2114
+ };
2115
+ imports.wbg.__wbindgen_closure_wrapper4953 = function(arg0, arg1, arg2) {
2116
+ const ret = makeMutClosure(arg0, arg1, 1988, __wbg_adapter_50);
2117
+ return ret;
2118
+ };
2119
+ imports.wbg.__wbindgen_closure_wrapper4955 = function(arg0, arg1, arg2) {
2120
+ const ret = makeMutClosure(arg0, arg1, 1988, __wbg_adapter_50);
2121
+ return ret;
2122
+ };
2123
+ imports.wbg.__wbindgen_closure_wrapper4957 = function(arg0, arg1, arg2) {
2124
+ const ret = makeMutClosure(arg0, arg1, 1988, __wbg_adapter_50);
2125
+ return ret;
2126
+ };
2127
+ imports.wbg.__wbindgen_closure_wrapper4959 = function(arg0, arg1, arg2) {
2128
+ const ret = makeMutClosure(arg0, arg1, 1988, __wbg_adapter_50);
2129
+ return ret;
2130
+ };
2131
+ imports.wbg.__wbindgen_closure_wrapper5602 = function(arg0, arg1, arg2) {
2132
+ const ret = makeMutClosure(arg0, arg1, 2386, __wbg_adapter_59);
2133
+ return ret;
2134
+ };
2135
+ imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
2136
+ const ret = debugString(arg1);
2137
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2138
+ const len1 = WASM_VECTOR_LEN;
2139
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2140
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2141
+ };
2142
+ imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
2143
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
2144
+ return ret;
2145
+ };
2146
+ imports.wbg.__wbindgen_in = function(arg0, arg1) {
2147
+ const ret = arg0 in arg1;
2148
+ return ret;
2149
+ };
2150
+ imports.wbg.__wbindgen_init_externref_table = function() {
2151
+ const table = wasm.__wbindgen_export_4;
2152
+ const offset = table.grow(4);
2153
+ table.set(0, undefined);
2154
+ table.set(offset + 0, undefined);
2155
+ table.set(offset + 1, null);
2156
+ table.set(offset + 2, true);
2157
+ table.set(offset + 3, false);
2158
+ ;
2159
+ };
2160
+ imports.wbg.__wbindgen_is_function = function(arg0) {
2161
+ const ret = typeof(arg0) === 'function';
2162
+ return ret;
2163
+ };
2164
+ imports.wbg.__wbindgen_is_null = function(arg0) {
2165
+ const ret = arg0 === null;
2166
+ return ret;
2167
+ };
2168
+ imports.wbg.__wbindgen_is_object = function(arg0) {
2169
+ const val = arg0;
2170
+ const ret = typeof(val) === 'object' && val !== null;
2171
+ return ret;
2172
+ };
2173
+ imports.wbg.__wbindgen_is_string = function(arg0) {
2174
+ const ret = typeof(arg0) === 'string';
2175
+ return ret;
2176
+ };
2177
+ imports.wbg.__wbindgen_is_undefined = function(arg0) {
2178
+ const ret = arg0 === undefined;
2179
+ return ret;
2180
+ };
2181
+ imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
2182
+ const ret = arg0 == arg1;
2183
+ return ret;
2184
+ };
2185
+ imports.wbg.__wbindgen_memory = function() {
2186
+ const ret = wasm.memory;
2187
+ return ret;
2188
+ };
2189
+ imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
2190
+ const obj = arg1;
2191
+ const ret = typeof(obj) === 'number' ? obj : undefined;
2192
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
2193
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
2194
+ };
2195
+ imports.wbg.__wbindgen_number_new = function(arg0) {
2196
+ const ret = arg0;
2197
+ return ret;
2198
+ };
2199
+ imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
2200
+ const obj = arg1;
2201
+ const ret = typeof(obj) === 'string' ? obj : undefined;
2202
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2203
+ var len1 = WASM_VECTOR_LEN;
2204
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2205
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2206
+ };
2207
+ imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
2208
+ const ret = getStringFromWasm0(arg0, arg1);
2209
+ return ret;
2210
+ };
2211
+ imports.wbg.__wbindgen_throw = function(arg0, arg1) {
2212
+ throw new Error(getStringFromWasm0(arg0, arg1));
2213
+ };
2214
+ imports.wbg.__wbindgen_uint8_array_new = function(arg0, arg1) {
2215
+ var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
2216
+ wasm.__wbindgen_free(arg0, arg1 * 1, 1);
2217
+ const ret = v0;
2218
+ return ret;
2219
+ };
2220
+
2221
+ return imports;
2222
+ }
2223
+
2224
+ function __wbg_init_memory(imports, memory) {
2225
+
2226
+ }
2227
+
2228
+ function __wbg_finalize_init(instance, module) {
2229
+ wasm = instance.exports;
2230
+ __wbg_init.__wbindgen_wasm_module = module;
2231
+ cachedDataViewMemory0 = null;
2232
+ cachedUint8ArrayMemory0 = null;
2233
+
2234
+
2235
+ wasm.__wbindgen_start();
2236
+ return wasm;
2237
+ }
2238
+
2239
+ function initSync(module) {
2240
+ if (wasm !== undefined) return wasm;
2241
+
2242
+
2243
+ if (typeof module !== 'undefined') {
2244
+ if (Object.getPrototypeOf(module) === Object.prototype) {
2245
+ ({module} = module)
2246
+ } else {
2247
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
2248
+ }
2249
+ }
2250
+
2251
+ const imports = __wbg_get_imports();
2252
+
2253
+ __wbg_init_memory(imports);
2254
+
2255
+ if (!(module instanceof WebAssembly.Module)) {
2256
+ module = new WebAssembly.Module(module);
2257
+ }
2258
+
2259
+ const instance = new WebAssembly.Instance(module, imports);
2260
+
2261
+ return __wbg_finalize_init(instance, module);
2262
+ }
2263
+
2264
+ async function __wbg_init(module_or_path) {
2265
+ if (wasm !== undefined) return wasm;
2266
+
2267
+
2268
+ if (typeof module_or_path !== 'undefined') {
2269
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
2270
+ ({module_or_path} = module_or_path)
2271
+ } else {
2272
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
2273
+ }
2274
+ }
2275
+
2276
+ if (typeof module_or_path === 'undefined') {
2277
+ module_or_path = new URL('rivetkit_wasm_bg.wasm', import.meta.url);
2278
+ }
2279
+ const imports = __wbg_get_imports();
2280
+
2281
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
2282
+ module_or_path = fetch(module_or_path);
2283
+ }
2284
+
2285
+ __wbg_init_memory(imports);
2286
+
2287
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
2288
+
2289
+ return __wbg_finalize_init(instance, module);
2290
+ }
2291
+
2292
+ export { initSync };
2293
+ export default __wbg_init;