@rivetkit/rivetkit-wasm 0.0.0-sqlite-uds.2015d80 → 0.0.0-sqlite-profiling-compat.4a9a623

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.
@@ -1,1970 +0,0 @@
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
- function passArray8ToWasm0(arg, malloc) {
207
- const ptr = malloc(arg.length * 1, 1) >>> 0;
208
- getUint8ArrayMemory0().set(arg, ptr / 1);
209
- WASM_VECTOR_LEN = arg.length;
210
- return ptr;
211
- }
212
-
213
- function takeFromExternrefTable0(idx) {
214
- const value = wasm.__wbindgen_export_4.get(idx);
215
- wasm.__externref_table_dealloc(idx);
216
- return value;
217
- }
218
-
219
- function _assertClass(instance, klass) {
220
- if (!(instance instanceof klass)) {
221
- throw new Error(`expected instance of ${klass.name}`);
222
- }
223
- }
224
-
225
- export function start() {
226
- wasm.start();
227
- }
228
-
229
- /**
230
- * @returns {string}
231
- */
232
- export function bridgeRivetErrorPrefix() {
233
- let deferred1_0;
234
- let deferred1_1;
235
- try {
236
- const ret = wasm.bridgeRivetErrorPrefix();
237
- deferred1_0 = ret[0];
238
- deferred1_1 = ret[1];
239
- return getStringFromWasm0(ret[0], ret[1]);
240
- } finally {
241
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
242
- }
243
- }
244
-
245
- /**
246
- * @param {Uint8Array} bytes
247
- * @returns {Uint8Array}
248
- */
249
- export function roundTripBytes(bytes) {
250
- const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
251
- const len0 = WASM_VECTOR_LEN;
252
- const ret = wasm.roundTripBytes(ptr0, len0);
253
- var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
254
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
255
- return v2;
256
- }
257
-
258
- /**
259
- * @param {Uint8Array} bytes
260
- * @returns {Uint8Array}
261
- */
262
- export function uint8ArrayFromBytes(bytes) {
263
- const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
264
- const len0 = WASM_VECTOR_LEN;
265
- const ret = wasm.uint8ArrayFromBytes(ptr0, len0);
266
- return ret;
267
- }
268
-
269
- /**
270
- * @param {Promise<any>} promise
271
- * @returns {Promise<any>}
272
- */
273
- export function awaitPromise(promise) {
274
- const ret = wasm.awaitPromise(promise);
275
- return ret;
276
- }
277
-
278
- function __wbg_adapter_46(arg0, arg1, arg2) {
279
- wasm.closure1608_externref_shim(arg0, arg1, arg2);
280
- }
281
-
282
- function __wbg_adapter_55(arg0, arg1, arg2) {
283
- wasm.closure1960_externref_shim(arg0, arg1, arg2);
284
- }
285
-
286
- function __wbg_adapter_239(arg0, arg1, arg2, arg3) {
287
- wasm.closure2191_externref_shim(arg0, arg1, arg2, arg3);
288
- }
289
-
290
- const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
291
-
292
- const ActorContextFinalization = (typeof FinalizationRegistry === 'undefined')
293
- ? { register: () => {}, unregister: () => {} }
294
- : new FinalizationRegistry(ptr => wasm.__wbg_actorcontext_free(ptr >>> 0, 1));
295
-
296
- export class ActorContext {
297
-
298
- static __wrap(ptr) {
299
- ptr = ptr >>> 0;
300
- const obj = Object.create(ActorContext.prototype);
301
- obj.__wbg_ptr = ptr;
302
- ActorContextFinalization.register(obj, obj.__wbg_ptr, obj);
303
- return obj;
304
- }
305
-
306
- __destroy_into_raw() {
307
- const ptr = this.__wbg_ptr;
308
- this.__wbg_ptr = 0;
309
- ActorContextFinalization.unregister(this);
310
- return ptr;
311
- }
312
-
313
- free() {
314
- const ptr = this.__destroy_into_raw();
315
- wasm.__wbg_actorcontext_free(ptr, 0);
316
- }
317
- /**
318
- * @param {Promise<any>} promise
319
- */
320
- keepAwake(promise) {
321
- wasm.actorcontext_keepAwake(this.__wbg_ptr, promise);
322
- }
323
- /**
324
- * @param {any} payload
325
- * @returns {Promise<void>}
326
- */
327
- saveState(payload) {
328
- const ret = wasm.actorcontext_saveState(this.__wbg_ptr, payload);
329
- return ret;
330
- }
331
- /**
332
- * @param {Promise<any>} promise
333
- */
334
- waitUntil(promise) {
335
- wasm.actorcontext_waitUntil(this.__wbg_ptr, promise);
336
- }
337
- /**
338
- * @returns {any}
339
- */
340
- abortSignal() {
341
- const ret = wasm.actorcontext_abortSignal(this.__wbg_ptr);
342
- if (ret[2]) {
343
- throw takeFromExternrefTable0(ret[1]);
344
- }
345
- return takeFromExternrefTable0(ret[0]);
346
- }
347
- /**
348
- * @param {Uint8Array} params
349
- * @param {any} request
350
- * @returns {Promise<ConnHandle>}
351
- */
352
- connectConn(params, request) {
353
- const ptr0 = passArray8ToWasm0(params, wasm.__wbindgen_malloc);
354
- const len0 = WASM_VECTOR_LEN;
355
- const ret = wasm.actorcontext_connectConn(this.__wbg_ptr, ptr0, len0, request);
356
- return ret;
357
- }
358
- /**
359
- * @param {any} opts
360
- */
361
- requestSave(opts) {
362
- wasm.actorcontext_requestSave(this.__wbg_ptr, opts);
363
- }
364
- /**
365
- * @param {Promise<any>} promise
366
- */
367
- registerTask(promise) {
368
- wasm.actorcontext_registerTask(this.__wbg_ptr, promise);
369
- }
370
- /**
371
- * @returns {any}
372
- */
373
- runtimeState() {
374
- const ret = wasm.actorcontext_runtimeState(this.__wbg_ptr);
375
- return ret;
376
- }
377
- /**
378
- * @param {number} region_id
379
- */
380
- endKeepAwake(region_id) {
381
- wasm.actorcontext_endKeepAwake(this.__wbg_ptr, region_id);
382
- }
383
- /**
384
- * @returns {number}
385
- */
386
- beginKeepAwake() {
387
- const ret = wasm.actorcontext_beginKeepAwake(this.__wbg_ptr);
388
- return ret >>> 0;
389
- }
390
- /**
391
- * @returns {object}
392
- */
393
- inspectorSnapshot() {
394
- const ret = wasm.actorcontext_inspectorSnapshot(this.__wbg_ptr);
395
- if (ret[2]) {
396
- throw takeFromExternrefTable0(ret[1]);
397
- }
398
- return takeFromExternrefTable0(ret[0]);
399
- }
400
- endOnStateChange() {
401
- wasm.actorcontext_endOnStateChange(this.__wbg_ptr);
402
- }
403
- restartRunHandler() {
404
- wasm.actorcontext_restartRunHandler(this.__wbg_ptr);
405
- }
406
- beginOnStateChange() {
407
- wasm.actorcontext_beginOnStateChange(this.__wbg_ptr);
408
- }
409
- /**
410
- * @param {any} opts
411
- * @returns {Promise<void>}
412
- */
413
- requestSaveAndWait(opts) {
414
- const ret = wasm.actorcontext_requestSaveAndWait(this.__wbg_ptr, opts);
415
- return ret;
416
- }
417
- /**
418
- * @param {string | null} [bearer_token]
419
- * @returns {Promise<void>}
420
- */
421
- verifyInspectorAuth(bearer_token) {
422
- var ptr0 = isLikeNone(bearer_token) ? 0 : passStringToWasm0(bearer_token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
423
- var len0 = WASM_VECTOR_LEN;
424
- const ret = wasm.actorcontext_verifyInspectorAuth(this.__wbg_ptr, ptr0, len0);
425
- return ret;
426
- }
427
- /**
428
- * @param {number} region_id
429
- */
430
- endWebsocketCallback(region_id) {
431
- wasm.actorcontext_endWebsocketCallback(this.__wbg_ptr, region_id);
432
- }
433
- /**
434
- * @returns {number}
435
- */
436
- beginWebsocketCallback() {
437
- const ret = wasm.actorcontext_beginWebsocketCallback(this.__wbg_ptr);
438
- return ret >>> 0;
439
- }
440
- /**
441
- * @returns {Array<any>}
442
- */
443
- dirtyHibernatableConns() {
444
- const ret = wasm.actorcontext_dirtyHibernatableConns(this.__wbg_ptr);
445
- return ret;
446
- }
447
- /**
448
- * @returns {Kv}
449
- */
450
- kv() {
451
- const ret = wasm.actorcontext_kv(this.__wbg_ptr);
452
- return Kv.__wrap(ret);
453
- }
454
- /**
455
- * @returns {Promise<boolean>}
456
- */
457
- waitForTrackedShutdownWork() {
458
- const ret = wasm.actorcontext_waitForTrackedShutdownWork(this.__wbg_ptr);
459
- return ret;
460
- }
461
- /**
462
- * @returns {Array<any>}
463
- */
464
- takePendingHibernationChanges() {
465
- const ret = wasm.actorcontext_takePendingHibernationChanges(this.__wbg_ptr);
466
- return ret;
467
- }
468
- /**
469
- * @returns {any}
470
- */
471
- key() {
472
- const ret = wasm.actorcontext_key(this.__wbg_ptr);
473
- if (ret[2]) {
474
- throw takeFromExternrefTable0(ret[1]);
475
- }
476
- return takeFromExternrefTable0(ret[0]);
477
- }
478
- constructor() {
479
- const ret = wasm.actorcontext_new();
480
- if (ret[2]) {
481
- throw takeFromExternrefTable0(ret[1]);
482
- }
483
- this.__wbg_ptr = ret[0] >>> 0;
484
- ActorContextFinalization.register(this, this.__wbg_ptr, this);
485
- return this;
486
- }
487
- /**
488
- * @returns {SqliteDb}
489
- */
490
- sql() {
491
- const ret = wasm.actorcontext_sql(this.__wbg_ptr);
492
- return SqliteDb.__wrap(ret);
493
- }
494
- /**
495
- * @returns {Promise<void>}
496
- */
497
- waitForTrackedShutdownWorkUnbounded() {
498
- const ret = wasm.actorcontext_waitForTrackedShutdownWorkUnbounded(this.__wbg_ptr);
499
- return ret;
500
- }
501
- /**
502
- * @returns {string}
503
- */
504
- name() {
505
- let deferred1_0;
506
- let deferred1_1;
507
- try {
508
- const ret = wasm.actorcontext_name(this.__wbg_ptr);
509
- deferred1_0 = ret[0];
510
- deferred1_1 = ret[1];
511
- return getStringFromWasm0(ret[0], ret[1]);
512
- } finally {
513
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
514
- }
515
- }
516
- /**
517
- * @returns {Array<any>}
518
- */
519
- conns() {
520
- const ret = wasm.actorcontext_conns(this.__wbg_ptr);
521
- return ret;
522
- }
523
- /**
524
- * @returns {Queue}
525
- */
526
- queue() {
527
- const ret = wasm.actorcontext_kv(this.__wbg_ptr);
528
- return Queue.__wrap(ret);
529
- }
530
- sleep() {
531
- const ret = wasm.actorcontext_sleep(this.__wbg_ptr);
532
- if (ret[1]) {
533
- throw takeFromExternrefTable0(ret[0]);
534
- }
535
- }
536
- /**
537
- * @returns {Uint8Array}
538
- */
539
- state() {
540
- const ret = wasm.actorcontext_state(this.__wbg_ptr);
541
- var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
542
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
543
- return v1;
544
- }
545
- /**
546
- * @returns {string}
547
- */
548
- region() {
549
- let deferred1_0;
550
- let deferred1_1;
551
- try {
552
- const ret = wasm.actorcontext_region(this.__wbg_ptr);
553
- deferred1_0 = ret[0];
554
- deferred1_1 = ret[1];
555
- return getStringFromWasm0(ret[0], ret[1]);
556
- } finally {
557
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
558
- }
559
- }
560
- destroy() {
561
- const ret = wasm.actorcontext_destroy(this.__wbg_ptr);
562
- if (ret[1]) {
563
- throw takeFromExternrefTable0(ret[0]);
564
- }
565
- }
566
- /**
567
- * @returns {string}
568
- */
569
- actorId() {
570
- let deferred1_0;
571
- let deferred1_1;
572
- try {
573
- const ret = wasm.actorcontext_actorId(this.__wbg_ptr);
574
- deferred1_0 = ret[0];
575
- deferred1_1 = ret[1];
576
- return getStringFromWasm0(ret[0], ret[1]);
577
- } finally {
578
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
579
- }
580
- }
581
- /**
582
- * @returns {Schedule}
583
- */
584
- schedule() {
585
- const ret = wasm.actorcontext_kv(this.__wbg_ptr);
586
- return Schedule.__wrap(ret);
587
- }
588
- /**
589
- * @param {string} name
590
- * @param {Uint8Array} args
591
- */
592
- broadcast(name, args) {
593
- const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
594
- const len0 = WASM_VECTOR_LEN;
595
- const ptr1 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
596
- const len1 = WASM_VECTOR_LEN;
597
- wasm.actorcontext_broadcast(this.__wbg_ptr, ptr0, len0, ptr1, len1);
598
- }
599
- /**
600
- * @param {number | null} [timestamp_ms]
601
- */
602
- setAlarm(timestamp_ms) {
603
- const ret = wasm.actorcontext_setAlarm(this.__wbg_ptr, !isLikeNone(timestamp_ms), isLikeNone(timestamp_ms) ? 0 : timestamp_ms);
604
- if (ret[1]) {
605
- throw takeFromExternrefTable0(ret[0]);
606
- }
607
- }
608
- }
609
-
610
- const ActorFactoryFinalization = (typeof FinalizationRegistry === 'undefined')
611
- ? { register: () => {}, unregister: () => {} }
612
- : new FinalizationRegistry(ptr => wasm.__wbg_actorfactory_free(ptr >>> 0, 1));
613
-
614
- export class ActorFactory {
615
-
616
- __destroy_into_raw() {
617
- const ptr = this.__wbg_ptr;
618
- this.__wbg_ptr = 0;
619
- ActorFactoryFinalization.unregister(this);
620
- return ptr;
621
- }
622
-
623
- free() {
624
- const ptr = this.__destroy_into_raw();
625
- wasm.__wbg_actorfactory_free(ptr, 0);
626
- }
627
- /**
628
- * @param {any} callbacks
629
- * @param {any} config
630
- */
631
- constructor(callbacks, config) {
632
- const ret = wasm.actorfactory_new(callbacks, config);
633
- if (ret[2]) {
634
- throw takeFromExternrefTable0(ret[1]);
635
- }
636
- this.__wbg_ptr = ret[0] >>> 0;
637
- ActorFactoryFinalization.register(this, this.__wbg_ptr, this);
638
- return this;
639
- }
640
- }
641
-
642
- const CancellationTokenFinalization = (typeof FinalizationRegistry === 'undefined')
643
- ? { register: () => {}, unregister: () => {} }
644
- : new FinalizationRegistry(ptr => wasm.__wbg_cancellationtoken_free(ptr >>> 0, 1));
645
-
646
- export class CancellationToken {
647
-
648
- __destroy_into_raw() {
649
- const ptr = this.__wbg_ptr;
650
- this.__wbg_ptr = 0;
651
- CancellationTokenFinalization.unregister(this);
652
- return ptr;
653
- }
654
-
655
- free() {
656
- const ptr = this.__destroy_into_raw();
657
- wasm.__wbg_cancellationtoken_free(ptr, 0);
658
- }
659
- /**
660
- * @param {Function} callback
661
- */
662
- onCancelled(callback) {
663
- wasm.cancellationtoken_onCancelled(this.__wbg_ptr, callback);
664
- }
665
- constructor() {
666
- const ret = wasm.cancellationtoken_new();
667
- this.__wbg_ptr = ret >>> 0;
668
- CancellationTokenFinalization.register(this, this.__wbg_ptr, this);
669
- return this;
670
- }
671
- cancel() {
672
- wasm.cancellationtoken_cancel(this.__wbg_ptr);
673
- }
674
- /**
675
- * @returns {boolean}
676
- */
677
- aborted() {
678
- const ret = wasm.cancellationtoken_aborted(this.__wbg_ptr);
679
- return ret !== 0;
680
- }
681
- }
682
-
683
- const ConnHandleFinalization = (typeof FinalizationRegistry === 'undefined')
684
- ? { register: () => {}, unregister: () => {} }
685
- : new FinalizationRegistry(ptr => wasm.__wbg_connhandle_free(ptr >>> 0, 1));
686
-
687
- export class ConnHandle {
688
-
689
- static __wrap(ptr) {
690
- ptr = ptr >>> 0;
691
- const obj = Object.create(ConnHandle.prototype);
692
- obj.__wbg_ptr = ptr;
693
- ConnHandleFinalization.register(obj, obj.__wbg_ptr, obj);
694
- return obj;
695
- }
696
-
697
- __destroy_into_raw() {
698
- const ptr = this.__wbg_ptr;
699
- this.__wbg_ptr = 0;
700
- ConnHandleFinalization.unregister(this);
701
- return ptr;
702
- }
703
-
704
- free() {
705
- const ptr = this.__destroy_into_raw();
706
- wasm.__wbg_connhandle_free(ptr, 0);
707
- }
708
- /**
709
- * @param {string | null} [reason]
710
- * @returns {Promise<void>}
711
- */
712
- disconnect(reason) {
713
- var ptr0 = isLikeNone(reason) ? 0 : passStringToWasm0(reason, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
714
- var len0 = WASM_VECTOR_LEN;
715
- const ret = wasm.connhandle_disconnect(this.__wbg_ptr, ptr0, len0);
716
- return ret;
717
- }
718
- /**
719
- * @returns {boolean}
720
- */
721
- isHibernatable() {
722
- const ret = wasm.connhandle_isHibernatable(this.__wbg_ptr);
723
- return ret !== 0;
724
- }
725
- /**
726
- * @returns {string}
727
- */
728
- id() {
729
- let deferred1_0;
730
- let deferred1_1;
731
- try {
732
- const ret = wasm.connhandle_id(this.__wbg_ptr);
733
- deferred1_0 = ret[0];
734
- deferred1_1 = ret[1];
735
- return getStringFromWasm0(ret[0], ret[1]);
736
- } finally {
737
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
738
- }
739
- }
740
- /**
741
- * @param {string} name
742
- * @param {Uint8Array} args
743
- */
744
- send(name, args) {
745
- const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
746
- const len0 = WASM_VECTOR_LEN;
747
- const ptr1 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
748
- const len1 = WASM_VECTOR_LEN;
749
- wasm.connhandle_send(this.__wbg_ptr, ptr0, len0, ptr1, len1);
750
- }
751
- /**
752
- * @returns {Uint8Array}
753
- */
754
- state() {
755
- const ret = wasm.connhandle_state(this.__wbg_ptr);
756
- var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
757
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
758
- return v1;
759
- }
760
- /**
761
- * @returns {Uint8Array}
762
- */
763
- params() {
764
- const ret = wasm.connhandle_params(this.__wbg_ptr);
765
- var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
766
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
767
- return v1;
768
- }
769
- /**
770
- * @param {Uint8Array} state
771
- */
772
- setState(state) {
773
- const ptr0 = passArray8ToWasm0(state, wasm.__wbindgen_malloc);
774
- const len0 = WASM_VECTOR_LEN;
775
- wasm.connhandle_setState(this.__wbg_ptr, ptr0, len0);
776
- }
777
- }
778
-
779
- const CoreRegistryFinalization = (typeof FinalizationRegistry === 'undefined')
780
- ? { register: () => {}, unregister: () => {} }
781
- : new FinalizationRegistry(ptr => wasm.__wbg_coreregistry_free(ptr >>> 0, 1));
782
-
783
- export class CoreRegistry {
784
-
785
- __destroy_into_raw() {
786
- const ptr = this.__wbg_ptr;
787
- this.__wbg_ptr = 0;
788
- CoreRegistryFinalization.unregister(this);
789
- return ptr;
790
- }
791
-
792
- free() {
793
- const ptr = this.__destroy_into_raw();
794
- wasm.__wbg_coreregistry_free(ptr, 0);
795
- }
796
- /**
797
- * @param {any} req
798
- * @param {Function} on_stream_event
799
- * @param {CancellationToken} cancel_token
800
- * @param {any} config
801
- * @returns {Promise<any>}
802
- */
803
- handleServerlessRequest(req, on_stream_event, cancel_token, config) {
804
- _assertClass(cancel_token, CancellationToken);
805
- const ret = wasm.coreregistry_handleServerlessRequest(this.__wbg_ptr, req, on_stream_event, cancel_token.__wbg_ptr, config);
806
- return ret;
807
- }
808
- constructor() {
809
- const ret = wasm.coreregistry_new();
810
- this.__wbg_ptr = ret >>> 0;
811
- CoreRegistryFinalization.register(this, this.__wbg_ptr, this);
812
- return this;
813
- }
814
- /**
815
- * @param {any} config
816
- * @returns {Promise<void>}
817
- */
818
- serve(config) {
819
- const ret = wasm.coreregistry_serve(this.__wbg_ptr, config);
820
- return ret;
821
- }
822
- /**
823
- * @param {string} name
824
- * @param {ActorFactory} factory
825
- */
826
- register(name, factory) {
827
- const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
828
- const len0 = WASM_VECTOR_LEN;
829
- _assertClass(factory, ActorFactory);
830
- const ret = wasm.coreregistry_register(this.__wbg_ptr, ptr0, len0, factory.__wbg_ptr);
831
- if (ret[1]) {
832
- throw takeFromExternrefTable0(ret[0]);
833
- }
834
- }
835
- /**
836
- * @returns {Promise<void>}
837
- */
838
- shutdown() {
839
- const ret = wasm.coreregistry_shutdown(this.__wbg_ptr);
840
- return ret;
841
- }
842
- }
843
-
844
- const KvFinalization = (typeof FinalizationRegistry === 'undefined')
845
- ? { register: () => {}, unregister: () => {} }
846
- : new FinalizationRegistry(ptr => wasm.__wbg_kv_free(ptr >>> 0, 1));
847
-
848
- export class Kv {
849
-
850
- static __wrap(ptr) {
851
- ptr = ptr >>> 0;
852
- const obj = Object.create(Kv.prototype);
853
- obj.__wbg_ptr = ptr;
854
- KvFinalization.register(obj, obj.__wbg_ptr, obj);
855
- return obj;
856
- }
857
-
858
- __destroy_into_raw() {
859
- const ptr = this.__wbg_ptr;
860
- this.__wbg_ptr = 0;
861
- KvFinalization.unregister(this);
862
- return ptr;
863
- }
864
-
865
- free() {
866
- const ptr = this.__destroy_into_raw();
867
- wasm.__wbg_kv_free(ptr, 0);
868
- }
869
- /**
870
- * @param {Uint8Array} key
871
- * @returns {Promise<void>}
872
- */
873
- delete(key) {
874
- const ptr0 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
875
- const len0 = WASM_VECTOR_LEN;
876
- const ret = wasm.kv_delete(this.__wbg_ptr, ptr0, len0);
877
- return ret;
878
- }
879
- /**
880
- * @param {Uint8Array} start
881
- * @param {Uint8Array} end
882
- * @param {any} options
883
- * @returns {Promise<any>}
884
- */
885
- listRange(start, end, options) {
886
- const ptr0 = passArray8ToWasm0(start, wasm.__wbindgen_malloc);
887
- const len0 = WASM_VECTOR_LEN;
888
- const ptr1 = passArray8ToWasm0(end, wasm.__wbindgen_malloc);
889
- const len1 = WASM_VECTOR_LEN;
890
- const ret = wasm.kv_listRange(this.__wbg_ptr, ptr0, len0, ptr1, len1, options);
891
- return ret;
892
- }
893
- /**
894
- * @param {Uint8Array} prefix
895
- * @param {any} options
896
- * @returns {Promise<any>}
897
- */
898
- listPrefix(prefix, options) {
899
- const ptr0 = passArray8ToWasm0(prefix, wasm.__wbindgen_malloc);
900
- const len0 = WASM_VECTOR_LEN;
901
- const ret = wasm.kv_listPrefix(this.__wbg_ptr, ptr0, len0, options);
902
- return ret;
903
- }
904
- /**
905
- * @param {Array<any>} keys
906
- * @returns {Promise<void>}
907
- */
908
- batchDelete(keys) {
909
- const ret = wasm.kv_batchDelete(this.__wbg_ptr, keys);
910
- return ret;
911
- }
912
- /**
913
- * @param {Uint8Array} start
914
- * @param {Uint8Array} end
915
- * @returns {Promise<void>}
916
- */
917
- deleteRange(start, end) {
918
- const ptr0 = passArray8ToWasm0(start, wasm.__wbindgen_malloc);
919
- const len0 = WASM_VECTOR_LEN;
920
- const ptr1 = passArray8ToWasm0(end, wasm.__wbindgen_malloc);
921
- const len1 = WASM_VECTOR_LEN;
922
- const ret = wasm.kv_deleteRange(this.__wbg_ptr, ptr0, len0, ptr1, len1);
923
- return ret;
924
- }
925
- /**
926
- * @param {Uint8Array} key
927
- * @returns {Promise<any>}
928
- */
929
- get(key) {
930
- const ptr0 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
931
- const len0 = WASM_VECTOR_LEN;
932
- const ret = wasm.kv_get(this.__wbg_ptr, ptr0, len0);
933
- return ret;
934
- }
935
- /**
936
- * @param {Uint8Array} key
937
- * @param {Uint8Array} value
938
- * @returns {Promise<void>}
939
- */
940
- put(key, value) {
941
- const ptr0 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
942
- const len0 = WASM_VECTOR_LEN;
943
- const ptr1 = passArray8ToWasm0(value, wasm.__wbindgen_malloc);
944
- const len1 = WASM_VECTOR_LEN;
945
- const ret = wasm.kv_put(this.__wbg_ptr, ptr0, len0, ptr1, len1);
946
- return ret;
947
- }
948
- /**
949
- * @param {Array<any>} keys
950
- * @returns {Promise<any>}
951
- */
952
- batchGet(keys) {
953
- const ret = wasm.kv_batchGet(this.__wbg_ptr, keys);
954
- return ret;
955
- }
956
- /**
957
- * @param {Array<any>} entries
958
- * @returns {Promise<void>}
959
- */
960
- batchPut(entries) {
961
- const ret = wasm.kv_batchPut(this.__wbg_ptr, entries);
962
- return ret;
963
- }
964
- }
965
-
966
- const QueueFinalization = (typeof FinalizationRegistry === 'undefined')
967
- ? { register: () => {}, unregister: () => {} }
968
- : new FinalizationRegistry(ptr => wasm.__wbg_queue_free(ptr >>> 0, 1));
969
-
970
- export class Queue {
971
-
972
- static __wrap(ptr) {
973
- ptr = ptr >>> 0;
974
- const obj = Object.create(Queue.prototype);
975
- obj.__wbg_ptr = ptr;
976
- QueueFinalization.register(obj, obj.__wbg_ptr, obj);
977
- return obj;
978
- }
979
-
980
- __destroy_into_raw() {
981
- const ptr = this.__wbg_ptr;
982
- this.__wbg_ptr = 0;
983
- QueueFinalization.unregister(this);
984
- return ptr;
985
- }
986
-
987
- free() {
988
- const ptr = this.__destroy_into_raw();
989
- wasm.__wbg_queue_free(ptr, 0);
990
- }
991
- /**
992
- * @param {any} options
993
- * @param {CancellationToken | null} [signal]
994
- * @returns {Promise<Array<any>>}
995
- */
996
- nextBatch(options, signal) {
997
- let ptr0 = 0;
998
- if (!isLikeNone(signal)) {
999
- _assertClass(signal, CancellationToken);
1000
- ptr0 = signal.__destroy_into_raw();
1001
- }
1002
- const ret = wasm.queue_nextBatch(this.__wbg_ptr, options, ptr0);
1003
- return ret;
1004
- }
1005
- /**
1006
- * @param {any} options
1007
- * @returns {Array<any>}
1008
- */
1009
- tryNextBatch(options) {
1010
- const ret = wasm.queue_tryNextBatch(this.__wbg_ptr, options);
1011
- if (ret[2]) {
1012
- throw takeFromExternrefTable0(ret[1]);
1013
- }
1014
- return takeFromExternrefTable0(ret[0]);
1015
- }
1016
- /**
1017
- * @param {any} names
1018
- * @param {any} options
1019
- * @param {CancellationToken | null} [signal]
1020
- * @returns {Promise<QueueMessage>}
1021
- */
1022
- waitForNames(names, options, signal) {
1023
- let ptr0 = 0;
1024
- if (!isLikeNone(signal)) {
1025
- _assertClass(signal, CancellationToken);
1026
- ptr0 = signal.__destroy_into_raw();
1027
- }
1028
- const ret = wasm.queue_waitForNames(this.__wbg_ptr, names, options, ptr0);
1029
- return ret;
1030
- }
1031
- /**
1032
- * @param {string} name
1033
- * @param {Uint8Array} body
1034
- * @param {any} options
1035
- * @param {CancellationToken | null} [signal]
1036
- * @returns {Promise<Uint8Array | undefined>}
1037
- */
1038
- enqueueAndWait(name, body, options, signal) {
1039
- const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1040
- const len0 = WASM_VECTOR_LEN;
1041
- const ptr1 = passArray8ToWasm0(body, wasm.__wbindgen_malloc);
1042
- const len1 = WASM_VECTOR_LEN;
1043
- let ptr2 = 0;
1044
- if (!isLikeNone(signal)) {
1045
- _assertClass(signal, CancellationToken);
1046
- ptr2 = signal.__destroy_into_raw();
1047
- }
1048
- const ret = wasm.queue_enqueueAndWait(this.__wbg_ptr, ptr0, len0, ptr1, len1, options, ptr2);
1049
- return ret;
1050
- }
1051
- /**
1052
- * @returns {Promise<Array<any>>}
1053
- */
1054
- inspectMessages() {
1055
- const ret = wasm.queue_inspectMessages(this.__wbg_ptr);
1056
- return ret;
1057
- }
1058
- /**
1059
- * @param {any} names
1060
- * @param {any} options
1061
- * @returns {Promise<void>}
1062
- */
1063
- waitForNamesAvailable(names, options) {
1064
- const ret = wasm.queue_waitForNamesAvailable(this.__wbg_ptr, names, options);
1065
- return ret;
1066
- }
1067
- /**
1068
- * @param {string} name
1069
- * @param {Uint8Array} body
1070
- * @returns {Promise<QueueMessage>}
1071
- */
1072
- send(name, body) {
1073
- const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1074
- const len0 = WASM_VECTOR_LEN;
1075
- const ptr1 = passArray8ToWasm0(body, wasm.__wbindgen_malloc);
1076
- const len1 = WASM_VECTOR_LEN;
1077
- const ret = wasm.queue_send(this.__wbg_ptr, ptr0, len0, ptr1, len1);
1078
- return ret;
1079
- }
1080
- /**
1081
- * @returns {Promise<void>}
1082
- */
1083
- reset() {
1084
- const ret = wasm.queue_reset(this.__wbg_ptr);
1085
- return ret;
1086
- }
1087
- /**
1088
- * @returns {number}
1089
- */
1090
- maxSize() {
1091
- const ret = wasm.queue_maxSize(this.__wbg_ptr);
1092
- return ret >>> 0;
1093
- }
1094
- }
1095
-
1096
- const QueueMessageFinalization = (typeof FinalizationRegistry === 'undefined')
1097
- ? { register: () => {}, unregister: () => {} }
1098
- : new FinalizationRegistry(ptr => wasm.__wbg_queuemessage_free(ptr >>> 0, 1));
1099
-
1100
- export class QueueMessage {
1101
-
1102
- static __wrap(ptr) {
1103
- ptr = ptr >>> 0;
1104
- const obj = Object.create(QueueMessage.prototype);
1105
- obj.__wbg_ptr = ptr;
1106
- QueueMessageFinalization.register(obj, obj.__wbg_ptr, obj);
1107
- return obj;
1108
- }
1109
-
1110
- __destroy_into_raw() {
1111
- const ptr = this.__wbg_ptr;
1112
- this.__wbg_ptr = 0;
1113
- QueueMessageFinalization.unregister(this);
1114
- return ptr;
1115
- }
1116
-
1117
- free() {
1118
- const ptr = this.__destroy_into_raw();
1119
- wasm.__wbg_queuemessage_free(ptr, 0);
1120
- }
1121
- /**
1122
- * @returns {number}
1123
- */
1124
- createdAt() {
1125
- const ret = wasm.queuemessage_createdAt(this.__wbg_ptr);
1126
- return ret;
1127
- }
1128
- /**
1129
- * @returns {boolean}
1130
- */
1131
- isCompletable() {
1132
- const ret = wasm.queuemessage_isCompletable(this.__wbg_ptr);
1133
- return ret !== 0;
1134
- }
1135
- /**
1136
- * @returns {bigint}
1137
- */
1138
- id() {
1139
- const ret = wasm.queuemessage_id(this.__wbg_ptr);
1140
- return BigInt.asUintN(64, ret);
1141
- }
1142
- /**
1143
- * @returns {Uint8Array}
1144
- */
1145
- body() {
1146
- const ret = wasm.queuemessage_body(this.__wbg_ptr);
1147
- var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
1148
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
1149
- return v1;
1150
- }
1151
- /**
1152
- * @returns {string}
1153
- */
1154
- name() {
1155
- let deferred1_0;
1156
- let deferred1_1;
1157
- try {
1158
- const ret = wasm.queuemessage_name(this.__wbg_ptr);
1159
- deferred1_0 = ret[0];
1160
- deferred1_1 = ret[1];
1161
- return getStringFromWasm0(ret[0], ret[1]);
1162
- } finally {
1163
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1164
- }
1165
- }
1166
- /**
1167
- * @param {any} response
1168
- * @returns {Promise<void>}
1169
- */
1170
- complete(response) {
1171
- const ret = wasm.queuemessage_complete(this.__wbg_ptr, response);
1172
- return ret;
1173
- }
1174
- }
1175
-
1176
- const ScheduleFinalization = (typeof FinalizationRegistry === 'undefined')
1177
- ? { register: () => {}, unregister: () => {} }
1178
- : new FinalizationRegistry(ptr => wasm.__wbg_schedule_free(ptr >>> 0, 1));
1179
-
1180
- export class Schedule {
1181
-
1182
- static __wrap(ptr) {
1183
- ptr = ptr >>> 0;
1184
- const obj = Object.create(Schedule.prototype);
1185
- obj.__wbg_ptr = ptr;
1186
- ScheduleFinalization.register(obj, obj.__wbg_ptr, obj);
1187
- return obj;
1188
- }
1189
-
1190
- __destroy_into_raw() {
1191
- const ptr = this.__wbg_ptr;
1192
- this.__wbg_ptr = 0;
1193
- ScheduleFinalization.unregister(this);
1194
- return ptr;
1195
- }
1196
-
1197
- free() {
1198
- const ptr = this.__destroy_into_raw();
1199
- wasm.__wbg_schedule_free(ptr, 0);
1200
- }
1201
- /**
1202
- * @param {number} timestamp_ms
1203
- * @param {string} action_name
1204
- * @param {Uint8Array} args
1205
- */
1206
- at(timestamp_ms, action_name, args) {
1207
- const ptr0 = passStringToWasm0(action_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1208
- const len0 = WASM_VECTOR_LEN;
1209
- const ptr1 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
1210
- const len1 = WASM_VECTOR_LEN;
1211
- wasm.schedule_at(this.__wbg_ptr, timestamp_ms, ptr0, len0, ptr1, len1);
1212
- }
1213
- /**
1214
- * @param {number} duration_ms
1215
- * @param {string} action_name
1216
- * @param {Uint8Array} args
1217
- */
1218
- after(duration_ms, action_name, args) {
1219
- const ptr0 = passStringToWasm0(action_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1220
- const len0 = WASM_VECTOR_LEN;
1221
- const ptr1 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
1222
- const len1 = WASM_VECTOR_LEN;
1223
- wasm.schedule_after(this.__wbg_ptr, duration_ms, ptr0, len0, ptr1, len1);
1224
- }
1225
- }
1226
-
1227
- const SqliteDbFinalization = (typeof FinalizationRegistry === 'undefined')
1228
- ? { register: () => {}, unregister: () => {} }
1229
- : new FinalizationRegistry(ptr => wasm.__wbg_sqlitedb_free(ptr >>> 0, 1));
1230
-
1231
- export class SqliteDb {
1232
-
1233
- static __wrap(ptr) {
1234
- ptr = ptr >>> 0;
1235
- const obj = Object.create(SqliteDb.prototype);
1236
- obj.__wbg_ptr = ptr;
1237
- SqliteDbFinalization.register(obj, obj.__wbg_ptr, obj);
1238
- return obj;
1239
- }
1240
-
1241
- __destroy_into_raw() {
1242
- const ptr = this.__wbg_ptr;
1243
- this.__wbg_ptr = 0;
1244
- SqliteDbFinalization.unregister(this);
1245
- return ptr;
1246
- }
1247
-
1248
- free() {
1249
- const ptr = this.__destroy_into_raw();
1250
- wasm.__wbg_sqlitedb_free(ptr, 0);
1251
- }
1252
- /**
1253
- * @param {string} sql
1254
- * @param {any} params
1255
- * @returns {Promise<any>}
1256
- */
1257
- run(sql, params) {
1258
- const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1259
- const len0 = WASM_VECTOR_LEN;
1260
- const ret = wasm.sqlitedb_run(this.__wbg_ptr, ptr0, len0, params);
1261
- return ret;
1262
- }
1263
- /**
1264
- * @param {string} sql
1265
- * @returns {Promise<any>}
1266
- */
1267
- exec(sql) {
1268
- const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1269
- const len0 = WASM_VECTOR_LEN;
1270
- const ret = wasm.sqlitedb_exec(this.__wbg_ptr, ptr0, len0);
1271
- return ret;
1272
- }
1273
- /**
1274
- * @returns {Promise<void>}
1275
- */
1276
- close() {
1277
- const ret = wasm.sqlitedb_close(this.__wbg_ptr);
1278
- return ret;
1279
- }
1280
- /**
1281
- * @param {string} sql
1282
- * @param {any} params
1283
- * @returns {Promise<any>}
1284
- */
1285
- query(sql, params) {
1286
- const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1287
- const len0 = WASM_VECTOR_LEN;
1288
- const ret = wasm.sqlitedb_query(this.__wbg_ptr, ptr0, len0, params);
1289
- return ret;
1290
- }
1291
- /**
1292
- * @param {string} sql
1293
- * @param {any} params
1294
- * @returns {Promise<any>}
1295
- */
1296
- execute(sql, params) {
1297
- const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1298
- const len0 = WASM_VECTOR_LEN;
1299
- const ret = wasm.sqlitedb_execute(this.__wbg_ptr, ptr0, len0, params);
1300
- return ret;
1301
- }
1302
- }
1303
-
1304
- const WebSocketHandleFinalization = (typeof FinalizationRegistry === 'undefined')
1305
- ? { register: () => {}, unregister: () => {} }
1306
- : new FinalizationRegistry(ptr => wasm.__wbg_websockethandle_free(ptr >>> 0, 1));
1307
-
1308
- export class WebSocketHandle {
1309
-
1310
- static __wrap(ptr) {
1311
- ptr = ptr >>> 0;
1312
- const obj = Object.create(WebSocketHandle.prototype);
1313
- obj.__wbg_ptr = ptr;
1314
- WebSocketHandleFinalization.register(obj, obj.__wbg_ptr, obj);
1315
- return obj;
1316
- }
1317
-
1318
- __destroy_into_raw() {
1319
- const ptr = this.__wbg_ptr;
1320
- this.__wbg_ptr = 0;
1321
- WebSocketHandleFinalization.unregister(this);
1322
- return ptr;
1323
- }
1324
-
1325
- free() {
1326
- const ptr = this.__destroy_into_raw();
1327
- wasm.__wbg_websockethandle_free(ptr, 0);
1328
- }
1329
- /**
1330
- * @param {Function} callback
1331
- */
1332
- setEventCallback(callback) {
1333
- wasm.websockethandle_setEventCallback(this.__wbg_ptr, callback);
1334
- }
1335
- /**
1336
- * @param {Uint8Array} data
1337
- * @param {boolean} binary
1338
- */
1339
- send(data, binary) {
1340
- const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
1341
- const len0 = WASM_VECTOR_LEN;
1342
- const ret = wasm.websockethandle_send(this.__wbg_ptr, ptr0, len0, binary);
1343
- if (ret[1]) {
1344
- throw takeFromExternrefTable0(ret[0]);
1345
- }
1346
- }
1347
- /**
1348
- * @param {number | null} [code]
1349
- * @param {string | null} [reason]
1350
- * @returns {Promise<void>}
1351
- */
1352
- close(code, reason) {
1353
- var ptr0 = isLikeNone(reason) ? 0 : passStringToWasm0(reason, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1354
- var len0 = WASM_VECTOR_LEN;
1355
- const ret = wasm.websockethandle_close(this.__wbg_ptr, isLikeNone(code) ? 0xFFFFFF : code, ptr0, len0);
1356
- return ret;
1357
- }
1358
- }
1359
-
1360
- async function __wbg_load(module, imports) {
1361
- if (typeof Response === 'function' && module instanceof Response) {
1362
- if (typeof WebAssembly.instantiateStreaming === 'function') {
1363
- try {
1364
- return await WebAssembly.instantiateStreaming(module, imports);
1365
-
1366
- } catch (e) {
1367
- if (module.headers.get('Content-Type') != 'application/wasm') {
1368
- 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);
1369
-
1370
- } else {
1371
- throw e;
1372
- }
1373
- }
1374
- }
1375
-
1376
- const bytes = await module.arrayBuffer();
1377
- return await WebAssembly.instantiate(bytes, imports);
1378
-
1379
- } else {
1380
- const instance = await WebAssembly.instantiate(module, imports);
1381
-
1382
- if (instance instanceof WebAssembly.Instance) {
1383
- return { instance, module };
1384
-
1385
- } else {
1386
- return instance;
1387
- }
1388
- }
1389
- }
1390
-
1391
- function __wbg_get_imports() {
1392
- const imports = {};
1393
- imports.wbg = {};
1394
- imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
1395
- const ret = String(arg1);
1396
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1397
- const len1 = WASM_VECTOR_LEN;
1398
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1399
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1400
- };
1401
- imports.wbg.__wbg_actorcontext_new = function(arg0) {
1402
- const ret = ActorContext.__wrap(arg0);
1403
- return ret;
1404
- };
1405
- imports.wbg.__wbg_buffer_09165b52af8c5237 = function(arg0) {
1406
- const ret = arg0.buffer;
1407
- return ret;
1408
- };
1409
- imports.wbg.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
1410
- const ret = arg0.buffer;
1411
- return ret;
1412
- };
1413
- imports.wbg.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
1414
- const ret = arg0.call(arg1);
1415
- return ret;
1416
- }, arguments) };
1417
- imports.wbg.__wbg_call_7cccdd69e0791ae2 = function() { return handleError(function (arg0, arg1, arg2) {
1418
- const ret = arg0.call(arg1, arg2);
1419
- return ret;
1420
- }, arguments) };
1421
- imports.wbg.__wbg_call_833bed5770ea2041 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
1422
- const ret = arg0.call(arg1, arg2, arg3);
1423
- return ret;
1424
- }, arguments) };
1425
- imports.wbg.__wbg_close_2893b7d056a0627d = function() { return handleError(function (arg0) {
1426
- arg0.close();
1427
- }, arguments) };
1428
- imports.wbg.__wbg_close_e1253d480ed93ce3 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
1429
- arg0.close(arg1, getStringFromWasm0(arg2, arg3));
1430
- }, arguments) };
1431
- imports.wbg.__wbg_code_f4ec1e6e2e1b0417 = function(arg0) {
1432
- const ret = arg0.code;
1433
- return ret;
1434
- };
1435
- imports.wbg.__wbg_connhandle_new = function(arg0) {
1436
- const ret = ConnHandle.__wrap(arg0);
1437
- return ret;
1438
- };
1439
- imports.wbg.__wbg_construct_b91ff0e53b60c0c3 = function() { return handleError(function (arg0, arg1) {
1440
- const ret = Reflect.construct(arg0, arg1);
1441
- return ret;
1442
- }, arguments) };
1443
- imports.wbg.__wbg_crypto_574e78ad8b13b65f = function(arg0) {
1444
- const ret = arg0.crypto;
1445
- return ret;
1446
- };
1447
- imports.wbg.__wbg_data_432d9c3df2630942 = function(arg0) {
1448
- const ret = arg0.data;
1449
- return ret;
1450
- };
1451
- imports.wbg.__wbg_done_769e5ede4b31c67b = function(arg0) {
1452
- const ret = arg0.done;
1453
- return ret;
1454
- };
1455
- imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
1456
- let deferred0_0;
1457
- let deferred0_1;
1458
- try {
1459
- deferred0_0 = arg0;
1460
- deferred0_1 = arg1;
1461
- console.error(getStringFromWasm0(arg0, arg1));
1462
- } finally {
1463
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1464
- }
1465
- };
1466
- imports.wbg.__wbg_getRandomValues_6c498bf966d88108 = function() { return handleError(function (arg0, arg1) {
1467
- globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
1468
- }, arguments) };
1469
- imports.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
1470
- arg0.getRandomValues(arg1);
1471
- }, arguments) };
1472
- imports.wbg.__wbg_get_67b2ba62fc30de12 = function() { return handleError(function (arg0, arg1) {
1473
- const ret = Reflect.get(arg0, arg1);
1474
- return ret;
1475
- }, arguments) };
1476
- imports.wbg.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
1477
- const ret = arg0[arg1 >>> 0];
1478
- return ret;
1479
- };
1480
- imports.wbg.__wbg_getwithrefkey_1dc361bd10053bfe = function(arg0, arg1) {
1481
- const ret = arg0[arg1];
1482
- return ret;
1483
- };
1484
- imports.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {
1485
- let result;
1486
- try {
1487
- result = arg0 instanceof ArrayBuffer;
1488
- } catch (_) {
1489
- result = false;
1490
- }
1491
- const ret = result;
1492
- return ret;
1493
- };
1494
- imports.wbg.__wbg_instanceof_Error_4d54113b22d20306 = function(arg0) {
1495
- let result;
1496
- try {
1497
- result = arg0 instanceof Error;
1498
- } catch (_) {
1499
- result = false;
1500
- }
1501
- const ret = result;
1502
- return ret;
1503
- };
1504
- imports.wbg.__wbg_instanceof_Object_7f2dcef8f78644a4 = function(arg0) {
1505
- let result;
1506
- try {
1507
- result = arg0 instanceof Object;
1508
- } catch (_) {
1509
- result = false;
1510
- }
1511
- const ret = result;
1512
- return ret;
1513
- };
1514
- imports.wbg.__wbg_instanceof_Promise_935168b8f4b49db3 = function(arg0) {
1515
- let result;
1516
- try {
1517
- result = arg0 instanceof Promise;
1518
- } catch (_) {
1519
- result = false;
1520
- }
1521
- const ret = result;
1522
- return ret;
1523
- };
1524
- imports.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function(arg0) {
1525
- let result;
1526
- try {
1527
- result = arg0 instanceof Uint8Array;
1528
- } catch (_) {
1529
- result = false;
1530
- }
1531
- const ret = result;
1532
- return ret;
1533
- };
1534
- imports.wbg.__wbg_isArray_a1eab7e0d067391b = function(arg0) {
1535
- const ret = Array.isArray(arg0);
1536
- return ret;
1537
- };
1538
- imports.wbg.__wbg_isSafeInteger_343e2beeeece1bb0 = function(arg0) {
1539
- const ret = Number.isSafeInteger(arg0);
1540
- return ret;
1541
- };
1542
- imports.wbg.__wbg_iterator_9a24c88df860dc65 = function() {
1543
- const ret = Symbol.iterator;
1544
- return ret;
1545
- };
1546
- imports.wbg.__wbg_keys_5c77a08ddc2fb8a6 = function(arg0) {
1547
- const ret = Object.keys(arg0);
1548
- return ret;
1549
- };
1550
- imports.wbg.__wbg_length_a446193dc22c12f8 = function(arg0) {
1551
- const ret = arg0.length;
1552
- return ret;
1553
- };
1554
- imports.wbg.__wbg_length_e2d2a49132c1b256 = function(arg0) {
1555
- const ret = arg0.length;
1556
- return ret;
1557
- };
1558
- imports.wbg.__wbg_message_97a2af9b89d693a3 = function(arg0) {
1559
- const ret = arg0.message;
1560
- return ret;
1561
- };
1562
- imports.wbg.__wbg_message_d1685a448ba00178 = function(arg0, arg1) {
1563
- const ret = arg1.message;
1564
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1565
- const len1 = WASM_VECTOR_LEN;
1566
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1567
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1568
- };
1569
- imports.wbg.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
1570
- const ret = arg0.msCrypto;
1571
- return ret;
1572
- };
1573
- imports.wbg.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
1574
- try {
1575
- var state0 = {a: arg0, b: arg1};
1576
- var cb0 = (arg0, arg1) => {
1577
- const a = state0.a;
1578
- state0.a = 0;
1579
- try {
1580
- return __wbg_adapter_239(a, state0.b, arg0, arg1);
1581
- } finally {
1582
- state0.a = a;
1583
- }
1584
- };
1585
- const ret = new Promise(cb0);
1586
- return ret;
1587
- } finally {
1588
- state0.a = state0.b = 0;
1589
- }
1590
- };
1591
- imports.wbg.__wbg_new_405e22f390576ce2 = function() {
1592
- const ret = new Object();
1593
- return ret;
1594
- };
1595
- imports.wbg.__wbg_new_78feb108b6472713 = function() {
1596
- const ret = new Array();
1597
- return ret;
1598
- };
1599
- imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
1600
- const ret = new Error();
1601
- return ret;
1602
- };
1603
- imports.wbg.__wbg_new_a12002a7f91c75be = function(arg0) {
1604
- const ret = new Uint8Array(arg0);
1605
- return ret;
1606
- };
1607
- imports.wbg.__wbg_new_c68d7209be747379 = function(arg0, arg1) {
1608
- const ret = new Error(getStringFromWasm0(arg0, arg1));
1609
- return ret;
1610
- };
1611
- imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
1612
- const ret = new Function(getStringFromWasm0(arg0, arg1));
1613
- return ret;
1614
- };
1615
- imports.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(arg0, arg1, arg2) {
1616
- const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
1617
- return ret;
1618
- };
1619
- imports.wbg.__wbg_newwithlength_a381634e90c276d4 = function(arg0) {
1620
- const ret = new Uint8Array(arg0 >>> 0);
1621
- return ret;
1622
- };
1623
- imports.wbg.__wbg_newwithstrsequence_6e9d6479e1cf978d = function() { return handleError(function (arg0, arg1, arg2) {
1624
- const ret = new WebSocket(getStringFromWasm0(arg0, arg1), arg2);
1625
- return ret;
1626
- }, arguments) };
1627
- imports.wbg.__wbg_next_25feadfc0913fea9 = function(arg0) {
1628
- const ret = arg0.next;
1629
- return ret;
1630
- };
1631
- imports.wbg.__wbg_next_6574e1a8a62d1055 = function() { return handleError(function (arg0) {
1632
- const ret = arg0.next();
1633
- return ret;
1634
- }, arguments) };
1635
- imports.wbg.__wbg_node_905d3e251edff8a2 = function(arg0) {
1636
- const ret = arg0.node;
1637
- return ret;
1638
- };
1639
- imports.wbg.__wbg_now_2c95c9de01293173 = function(arg0) {
1640
- const ret = arg0.now();
1641
- return ret;
1642
- };
1643
- imports.wbg.__wbg_now_807e54c39636c349 = function() {
1644
- const ret = Date.now();
1645
- return ret;
1646
- };
1647
- imports.wbg.__wbg_performance_7a3ffd0b17f663ad = function(arg0) {
1648
- const ret = arg0.performance;
1649
- return ret;
1650
- };
1651
- imports.wbg.__wbg_process_dc0fbacc7c1c06f7 = function(arg0) {
1652
- const ret = arg0.process;
1653
- return ret;
1654
- };
1655
- imports.wbg.__wbg_push_737cfc8c1432c2c6 = function(arg0, arg1) {
1656
- const ret = arg0.push(arg1);
1657
- return ret;
1658
- };
1659
- imports.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function(arg0) {
1660
- queueMicrotask(arg0);
1661
- };
1662
- imports.wbg.__wbg_queueMicrotask_d3219def82552485 = function(arg0) {
1663
- const ret = arg0.queueMicrotask;
1664
- return ret;
1665
- };
1666
- imports.wbg.__wbg_queuemessage_new = function(arg0) {
1667
- const ret = QueueMessage.__wrap(arg0);
1668
- return ret;
1669
- };
1670
- imports.wbg.__wbg_randomFillSync_ac0988aba3254290 = function() { return handleError(function (arg0, arg1) {
1671
- arg0.randomFillSync(arg1);
1672
- }, arguments) };
1673
- imports.wbg.__wbg_readyState_7ef6e63c349899ed = function(arg0) {
1674
- const ret = arg0.readyState;
1675
- return ret;
1676
- };
1677
- imports.wbg.__wbg_reason_49f1cede8bcf23dd = function(arg0, arg1) {
1678
- const ret = arg1.reason;
1679
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1680
- const len1 = WASM_VECTOR_LEN;
1681
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1682
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1683
- };
1684
- imports.wbg.__wbg_require_60cc747a6bc5215a = function() { return handleError(function () {
1685
- const ret = module.require;
1686
- return ret;
1687
- }, arguments) };
1688
- imports.wbg.__wbg_resolve_4851785c9c5f573d = function(arg0) {
1689
- const ret = Promise.resolve(arg0);
1690
- return ret;
1691
- };
1692
- imports.wbg.__wbg_send_7c4769e24cf1d784 = function() { return handleError(function (arg0, arg1) {
1693
- arg0.send(arg1);
1694
- }, arguments) };
1695
- imports.wbg.__wbg_set_37837023f3d740e8 = function(arg0, arg1, arg2) {
1696
- arg0[arg1 >>> 0] = arg2;
1697
- };
1698
- imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
1699
- arg0[arg1] = arg2;
1700
- };
1701
- imports.wbg.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
1702
- arg0.set(arg1, arg2 >>> 0);
1703
- };
1704
- imports.wbg.__wbg_set_bb8cecf6a62b9f46 = function() { return handleError(function (arg0, arg1, arg2) {
1705
- const ret = Reflect.set(arg0, arg1, arg2);
1706
- return ret;
1707
- }, arguments) };
1708
- imports.wbg.__wbg_setbinaryType_92fa1ffd873b327c = function(arg0, arg1) {
1709
- arg0.binaryType = __wbindgen_enum_BinaryType[arg1];
1710
- };
1711
- imports.wbg.__wbg_setonclose_14fc475a49d488fc = function(arg0, arg1) {
1712
- arg0.onclose = arg1;
1713
- };
1714
- imports.wbg.__wbg_setonerror_8639efe354b947cd = function(arg0, arg1) {
1715
- arg0.onerror = arg1;
1716
- };
1717
- imports.wbg.__wbg_setonmessage_6eccab530a8fb4c7 = function(arg0, arg1) {
1718
- arg0.onmessage = arg1;
1719
- };
1720
- imports.wbg.__wbg_setonopen_2da654e1f39745d5 = function(arg0, arg1) {
1721
- arg0.onopen = arg1;
1722
- };
1723
- imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
1724
- const ret = arg1.stack;
1725
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1726
- const len1 = WASM_VECTOR_LEN;
1727
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1728
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1729
- };
1730
- imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
1731
- const ret = typeof global === 'undefined' ? null : global;
1732
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1733
- };
1734
- imports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
1735
- const ret = typeof globalThis === 'undefined' ? null : globalThis;
1736
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1737
- };
1738
- imports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
1739
- const ret = typeof self === 'undefined' ? null : self;
1740
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1741
- };
1742
- imports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
1743
- const ret = typeof window === 'undefined' ? null : window;
1744
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1745
- };
1746
- imports.wbg.__wbg_stringify_f7ed6987935b4a24 = function() { return handleError(function (arg0) {
1747
- const ret = JSON.stringify(arg0);
1748
- return ret;
1749
- }, arguments) };
1750
- imports.wbg.__wbg_subarray_aa9065fa9dc5df96 = function(arg0, arg1, arg2) {
1751
- const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
1752
- return ret;
1753
- };
1754
- imports.wbg.__wbg_then_44b73946d2fb3e7d = function(arg0, arg1) {
1755
- const ret = arg0.then(arg1);
1756
- return ret;
1757
- };
1758
- imports.wbg.__wbg_then_48b406749878a531 = function(arg0, arg1, arg2) {
1759
- const ret = arg0.then(arg1, arg2);
1760
- return ret;
1761
- };
1762
- imports.wbg.__wbg_value_cd1ffa7b1ab794f1 = function(arg0) {
1763
- const ret = arg0.value;
1764
- return ret;
1765
- };
1766
- imports.wbg.__wbg_versions_c01dfd4722a88165 = function(arg0) {
1767
- const ret = arg0.versions;
1768
- return ret;
1769
- };
1770
- imports.wbg.__wbg_websockethandle_new = function(arg0) {
1771
- const ret = WebSocketHandle.__wrap(arg0);
1772
- return ret;
1773
- };
1774
- imports.wbg.__wbindgen_as_number = function(arg0) {
1775
- const ret = +arg0;
1776
- return ret;
1777
- };
1778
- imports.wbg.__wbindgen_boolean_get = function(arg0) {
1779
- const v = arg0;
1780
- const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
1781
- return ret;
1782
- };
1783
- imports.wbg.__wbindgen_cb_drop = function(arg0) {
1784
- const obj = arg0.original;
1785
- if (obj.cnt-- == 1) {
1786
- obj.a = 0;
1787
- return true;
1788
- }
1789
- const ret = false;
1790
- return ret;
1791
- };
1792
- imports.wbg.__wbindgen_closure_wrapper3780 = function(arg0, arg1, arg2) {
1793
- const ret = makeMutClosure(arg0, arg1, 1609, __wbg_adapter_46);
1794
- return ret;
1795
- };
1796
- imports.wbg.__wbindgen_closure_wrapper3782 = function(arg0, arg1, arg2) {
1797
- const ret = makeMutClosure(arg0, arg1, 1609, __wbg_adapter_46);
1798
- return ret;
1799
- };
1800
- imports.wbg.__wbindgen_closure_wrapper3784 = function(arg0, arg1, arg2) {
1801
- const ret = makeMutClosure(arg0, arg1, 1609, __wbg_adapter_46);
1802
- return ret;
1803
- };
1804
- imports.wbg.__wbindgen_closure_wrapper3786 = function(arg0, arg1, arg2) {
1805
- const ret = makeMutClosure(arg0, arg1, 1609, __wbg_adapter_46);
1806
- return ret;
1807
- };
1808
- imports.wbg.__wbindgen_closure_wrapper4627 = function(arg0, arg1, arg2) {
1809
- const ret = makeMutClosure(arg0, arg1, 1961, __wbg_adapter_55);
1810
- return ret;
1811
- };
1812
- imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
1813
- const ret = debugString(arg1);
1814
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1815
- const len1 = WASM_VECTOR_LEN;
1816
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1817
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1818
- };
1819
- imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
1820
- const ret = new Error(getStringFromWasm0(arg0, arg1));
1821
- return ret;
1822
- };
1823
- imports.wbg.__wbindgen_in = function(arg0, arg1) {
1824
- const ret = arg0 in arg1;
1825
- return ret;
1826
- };
1827
- imports.wbg.__wbindgen_init_externref_table = function() {
1828
- const table = wasm.__wbindgen_export_4;
1829
- const offset = table.grow(4);
1830
- table.set(0, undefined);
1831
- table.set(offset + 0, undefined);
1832
- table.set(offset + 1, null);
1833
- table.set(offset + 2, true);
1834
- table.set(offset + 3, false);
1835
- ;
1836
- };
1837
- imports.wbg.__wbindgen_is_function = function(arg0) {
1838
- const ret = typeof(arg0) === 'function';
1839
- return ret;
1840
- };
1841
- imports.wbg.__wbindgen_is_null = function(arg0) {
1842
- const ret = arg0 === null;
1843
- return ret;
1844
- };
1845
- imports.wbg.__wbindgen_is_object = function(arg0) {
1846
- const val = arg0;
1847
- const ret = typeof(val) === 'object' && val !== null;
1848
- return ret;
1849
- };
1850
- imports.wbg.__wbindgen_is_string = function(arg0) {
1851
- const ret = typeof(arg0) === 'string';
1852
- return ret;
1853
- };
1854
- imports.wbg.__wbindgen_is_undefined = function(arg0) {
1855
- const ret = arg0 === undefined;
1856
- return ret;
1857
- };
1858
- imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
1859
- const ret = arg0 == arg1;
1860
- return ret;
1861
- };
1862
- imports.wbg.__wbindgen_memory = function() {
1863
- const ret = wasm.memory;
1864
- return ret;
1865
- };
1866
- imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
1867
- const obj = arg1;
1868
- const ret = typeof(obj) === 'number' ? obj : undefined;
1869
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1870
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1871
- };
1872
- imports.wbg.__wbindgen_number_new = function(arg0) {
1873
- const ret = arg0;
1874
- return ret;
1875
- };
1876
- imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
1877
- const obj = arg1;
1878
- const ret = typeof(obj) === 'string' ? obj : undefined;
1879
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1880
- var len1 = WASM_VECTOR_LEN;
1881
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1882
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1883
- };
1884
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
1885
- const ret = getStringFromWasm0(arg0, arg1);
1886
- return ret;
1887
- };
1888
- imports.wbg.__wbindgen_throw = function(arg0, arg1) {
1889
- throw new Error(getStringFromWasm0(arg0, arg1));
1890
- };
1891
- imports.wbg.__wbindgen_uint8_array_new = function(arg0, arg1) {
1892
- var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
1893
- wasm.__wbindgen_free(arg0, arg1 * 1, 1);
1894
- const ret = v0;
1895
- return ret;
1896
- };
1897
-
1898
- return imports;
1899
- }
1900
-
1901
- function __wbg_init_memory(imports, memory) {
1902
-
1903
- }
1904
-
1905
- function __wbg_finalize_init(instance, module) {
1906
- wasm = instance.exports;
1907
- __wbg_init.__wbindgen_wasm_module = module;
1908
- cachedDataViewMemory0 = null;
1909
- cachedUint8ArrayMemory0 = null;
1910
-
1911
-
1912
- wasm.__wbindgen_start();
1913
- return wasm;
1914
- }
1915
-
1916
- function initSync(module) {
1917
- if (wasm !== undefined) return wasm;
1918
-
1919
-
1920
- if (typeof module !== 'undefined') {
1921
- if (Object.getPrototypeOf(module) === Object.prototype) {
1922
- ({module} = module)
1923
- } else {
1924
- console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
1925
- }
1926
- }
1927
-
1928
- const imports = __wbg_get_imports();
1929
-
1930
- __wbg_init_memory(imports);
1931
-
1932
- if (!(module instanceof WebAssembly.Module)) {
1933
- module = new WebAssembly.Module(module);
1934
- }
1935
-
1936
- const instance = new WebAssembly.Instance(module, imports);
1937
-
1938
- return __wbg_finalize_init(instance, module);
1939
- }
1940
-
1941
- async function __wbg_init(module_or_path) {
1942
- if (wasm !== undefined) return wasm;
1943
-
1944
-
1945
- if (typeof module_or_path !== 'undefined') {
1946
- if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
1947
- ({module_or_path} = module_or_path)
1948
- } else {
1949
- console.warn('using deprecated parameters for the initialization function; pass a single object instead')
1950
- }
1951
- }
1952
-
1953
- if (typeof module_or_path === 'undefined') {
1954
- module_or_path = new URL('rivetkit_wasm_bg.wasm', import.meta.url);
1955
- }
1956
- const imports = __wbg_get_imports();
1957
-
1958
- if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
1959
- module_or_path = fetch(module_or_path);
1960
- }
1961
-
1962
- __wbg_init_memory(imports);
1963
-
1964
- const { instance, module } = await __wbg_load(await module_or_path, imports);
1965
-
1966
- return __wbg_finalize_init(instance, module);
1967
- }
1968
-
1969
- export { initSync };
1970
- export default __wbg_init;