@bitwarden/sdk-internal 0.2.0-main.1 → 0.2.0-main.100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -295
- package/VERSION +1 -0
- package/bitwarden_wasm_internal.d.ts +224 -35
- package/bitwarden_wasm_internal.js +1 -0
- package/bitwarden_wasm_internal_bg.js +765 -484
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +52 -25
- package/bitwarden_wasm_internal_bg.wasm.js +1 -1
- package/node/bitwarden_wasm_internal.d.ts +224 -35
- package/node/bitwarden_wasm_internal.js +769 -485
- package/node/bitwarden_wasm_internal_bg.wasm +0 -0
- package/node/bitwarden_wasm_internal_bg.wasm.d.ts +52 -25
- package/package.json +5 -4
|
@@ -3,14 +3,6 @@ export function __wbg_set_wasm(val) {
|
|
|
3
3
|
wasm = val;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
const heap = new Array(128).fill(undefined);
|
|
7
|
-
|
|
8
|
-
heap.push(undefined, null, true, false);
|
|
9
|
-
|
|
10
|
-
function getObject(idx) {
|
|
11
|
-
return heap[idx];
|
|
12
|
-
}
|
|
13
|
-
|
|
14
6
|
let WASM_VECTOR_LEN = 0;
|
|
15
7
|
|
|
16
8
|
let cachedUint8ArrayMemory0 = null;
|
|
@@ -81,10 +73,6 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
81
73
|
return ptr;
|
|
82
74
|
}
|
|
83
75
|
|
|
84
|
-
function isLikeNone(x) {
|
|
85
|
-
return x === undefined || x === null;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
76
|
let cachedDataViewMemory0 = null;
|
|
89
77
|
|
|
90
78
|
function getDataViewMemory0() {
|
|
@@ -99,29 +87,6 @@ function getDataViewMemory0() {
|
|
|
99
87
|
return cachedDataViewMemory0;
|
|
100
88
|
}
|
|
101
89
|
|
|
102
|
-
let heap_next = heap.length;
|
|
103
|
-
|
|
104
|
-
function dropObject(idx) {
|
|
105
|
-
if (idx < 132) return;
|
|
106
|
-
heap[idx] = heap_next;
|
|
107
|
-
heap_next = idx;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
function takeObject(idx) {
|
|
111
|
-
const ret = getObject(idx);
|
|
112
|
-
dropObject(idx);
|
|
113
|
-
return ret;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
function addHeapObject(obj) {
|
|
117
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
118
|
-
const idx = heap_next;
|
|
119
|
-
heap_next = heap[idx];
|
|
120
|
-
|
|
121
|
-
heap[idx] = obj;
|
|
122
|
-
return idx;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
90
|
const lTextDecoder =
|
|
126
91
|
typeof TextDecoder === "undefined" ? (0, module.require)("util").TextDecoder : TextDecoder;
|
|
127
92
|
|
|
@@ -134,6 +99,57 @@ function getStringFromWasm0(ptr, len) {
|
|
|
134
99
|
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
135
100
|
}
|
|
136
101
|
|
|
102
|
+
function addToExternrefTable0(obj) {
|
|
103
|
+
const idx = wasm.__externref_table_alloc();
|
|
104
|
+
wasm.__wbindgen_export_4.set(idx, obj);
|
|
105
|
+
return idx;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function handleError(f, args) {
|
|
109
|
+
try {
|
|
110
|
+
return f.apply(this, args);
|
|
111
|
+
} catch (e) {
|
|
112
|
+
const idx = addToExternrefTable0(e);
|
|
113
|
+
wasm.__wbindgen_exn_store(idx);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function isLikeNone(x) {
|
|
118
|
+
return x === undefined || x === null;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const CLOSURE_DTORS =
|
|
122
|
+
typeof FinalizationRegistry === "undefined"
|
|
123
|
+
? { register: () => {}, unregister: () => {} }
|
|
124
|
+
: new FinalizationRegistry((state) => {
|
|
125
|
+
wasm.__wbindgen_export_6.get(state.dtor)(state.a, state.b);
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
129
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
130
|
+
const real = (...args) => {
|
|
131
|
+
// First up with a closure we increment the internal reference
|
|
132
|
+
// count. This ensures that the Rust closure environment won't
|
|
133
|
+
// be deallocated while we're invoking it.
|
|
134
|
+
state.cnt++;
|
|
135
|
+
const a = state.a;
|
|
136
|
+
state.a = 0;
|
|
137
|
+
try {
|
|
138
|
+
return f(a, state.b, ...args);
|
|
139
|
+
} finally {
|
|
140
|
+
if (--state.cnt === 0) {
|
|
141
|
+
wasm.__wbindgen_export_6.get(state.dtor)(a, state.b);
|
|
142
|
+
CLOSURE_DTORS.unregister(state);
|
|
143
|
+
} else {
|
|
144
|
+
state.a = a;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
real.original = state;
|
|
149
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
150
|
+
return real;
|
|
151
|
+
}
|
|
152
|
+
|
|
137
153
|
function debugString(val) {
|
|
138
154
|
// primitive types
|
|
139
155
|
const type = typeof val;
|
|
@@ -175,7 +191,7 @@ function debugString(val) {
|
|
|
175
191
|
// Test for built-in
|
|
176
192
|
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
177
193
|
let className;
|
|
178
|
-
if (builtInMatches.length > 1) {
|
|
194
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
179
195
|
className = builtInMatches[1];
|
|
180
196
|
} else {
|
|
181
197
|
// Failed to match the standard '[object ClassName]'
|
|
@@ -198,62 +214,173 @@ function debugString(val) {
|
|
|
198
214
|
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
199
215
|
return className;
|
|
200
216
|
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
217
|
+
/**
|
|
218
|
+
* @param {any} error
|
|
219
|
+
* @returns {boolean}
|
|
220
|
+
*/
|
|
221
|
+
export function isEncryptionSettingsError(error) {
|
|
222
|
+
const ret = wasm.isEncryptionSettingsError(error);
|
|
223
|
+
return ret !== 0;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* @param {any} error
|
|
228
|
+
* @returns {boolean}
|
|
229
|
+
*/
|
|
230
|
+
export function isCryptoError(error) {
|
|
231
|
+
const ret = wasm.isCryptoError(error);
|
|
232
|
+
return ret !== 0;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* @param {any} error
|
|
237
|
+
* @returns {boolean}
|
|
238
|
+
*/
|
|
239
|
+
export function isSshKeyExportError(error) {
|
|
240
|
+
const ret = wasm.isSshKeyExportError(error);
|
|
241
|
+
return ret !== 0;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* @param {any} error
|
|
246
|
+
* @returns {boolean}
|
|
247
|
+
*/
|
|
248
|
+
export function isSshKeyImportError(error) {
|
|
249
|
+
const ret = wasm.isSshKeyImportError(error);
|
|
250
|
+
return ret !== 0;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* @param {any} error
|
|
255
|
+
* @returns {boolean}
|
|
256
|
+
*/
|
|
257
|
+
export function isKeyGenerationError(error) {
|
|
258
|
+
const ret = wasm.isKeyGenerationError(error);
|
|
259
|
+
return ret !== 0;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* @param {any} error
|
|
264
|
+
* @returns {boolean}
|
|
265
|
+
*/
|
|
266
|
+
export function isDecryptFileError(error) {
|
|
267
|
+
const ret = wasm.isDecryptFileError(error);
|
|
268
|
+
return ret !== 0;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* @param {any} error
|
|
273
|
+
* @returns {boolean}
|
|
274
|
+
*/
|
|
275
|
+
export function isEncryptFileError(error) {
|
|
276
|
+
const ret = wasm.isEncryptFileError(error);
|
|
277
|
+
return ret !== 0;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* @param {any} error
|
|
282
|
+
* @returns {boolean}
|
|
283
|
+
*/
|
|
284
|
+
export function isDecryptError(error) {
|
|
285
|
+
const ret = wasm.isDecryptError(error);
|
|
286
|
+
return ret !== 0;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* @param {any} error
|
|
291
|
+
* @returns {boolean}
|
|
292
|
+
*/
|
|
293
|
+
export function isEncryptError(error) {
|
|
294
|
+
const ret = wasm.isEncryptError(error);
|
|
295
|
+
return ret !== 0;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* @param {any} error
|
|
300
|
+
* @returns {boolean}
|
|
301
|
+
*/
|
|
302
|
+
export function isTotpError(error) {
|
|
303
|
+
const ret = wasm.isTotpError(error);
|
|
304
|
+
return ret !== 0;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
function takeFromExternrefTable0(idx) {
|
|
308
|
+
const value = wasm.__wbindgen_export_4.get(idx);
|
|
309
|
+
wasm.__externref_table_dealloc(idx);
|
|
310
|
+
return value;
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Generate a new SSH key pair
|
|
314
|
+
*
|
|
315
|
+
* # Arguments
|
|
316
|
+
* - `key_algorithm` - The algorithm to use for the key pair
|
|
317
|
+
*
|
|
318
|
+
* # Returns
|
|
319
|
+
* - `Ok(SshKey)` if the key was successfully generated
|
|
320
|
+
* - `Err(KeyGenerationError)` if the key could not be generated
|
|
321
|
+
* @param {KeyAlgorithm} key_algorithm
|
|
322
|
+
* @returns {SshKeyView}
|
|
323
|
+
*/
|
|
324
|
+
export function generate_ssh_key(key_algorithm) {
|
|
325
|
+
const ret = wasm.generate_ssh_key(key_algorithm);
|
|
326
|
+
if (ret[2]) {
|
|
327
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
328
|
+
}
|
|
329
|
+
return takeFromExternrefTable0(ret[0]);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* Convert a PCKS8 or OpenSSH encrypted or unencrypted private key
|
|
334
|
+
* to an OpenSSH private key with public key and fingerprint
|
|
335
|
+
*
|
|
336
|
+
* # Arguments
|
|
337
|
+
* - `imported_key` - The private key to convert
|
|
338
|
+
* - `password` - The password to use for decrypting the key
|
|
339
|
+
*
|
|
340
|
+
* # Returns
|
|
341
|
+
* - `Ok(SshKey)` if the key was successfully coneverted
|
|
342
|
+
* - `Err(PasswordRequired)` if the key is encrypted and no password was provided
|
|
343
|
+
* - `Err(WrongPassword)` if the password provided is incorrect
|
|
344
|
+
* - `Err(ParsingError)` if the key could not be parsed
|
|
345
|
+
* - `Err(UnsupportedKeyType)` if the key type is not supported
|
|
346
|
+
* @param {string} imported_key
|
|
347
|
+
* @param {string | null} [password]
|
|
348
|
+
* @returns {SshKeyView}
|
|
349
|
+
*/
|
|
350
|
+
export function import_ssh_key(imported_key, password) {
|
|
351
|
+
const ptr0 = passStringToWasm0(imported_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
352
|
+
const len0 = WASM_VECTOR_LEN;
|
|
353
|
+
var ptr1 = isLikeNone(password)
|
|
354
|
+
? 0
|
|
355
|
+
: passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
356
|
+
var len1 = WASM_VECTOR_LEN;
|
|
357
|
+
const ret = wasm.import_ssh_key(ptr0, len0, ptr1, len1);
|
|
358
|
+
if (ret[2]) {
|
|
359
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
360
|
+
}
|
|
361
|
+
return takeFromExternrefTable0(ret[0]);
|
|
232
362
|
}
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* @param {any} error
|
|
366
|
+
* @returns {boolean}
|
|
367
|
+
*/
|
|
368
|
+
export function isTestError(error) {
|
|
369
|
+
const ret = wasm.isTestError(error);
|
|
370
|
+
return ret !== 0;
|
|
239
371
|
}
|
|
240
372
|
|
|
241
|
-
function
|
|
242
|
-
|
|
243
|
-
return f.apply(this, args);
|
|
244
|
-
} catch (e) {
|
|
245
|
-
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
246
|
-
}
|
|
373
|
+
function __wbg_adapter_42(arg0, arg1, arg2) {
|
|
374
|
+
wasm.closure605_externref_shim(arg0, arg1, arg2);
|
|
247
375
|
}
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
arg1,
|
|
252
|
-
addHeapObject(arg2),
|
|
253
|
-
addHeapObject(arg3),
|
|
254
|
-
);
|
|
376
|
+
|
|
377
|
+
function __wbg_adapter_145(arg0, arg1, arg2, arg3) {
|
|
378
|
+
wasm.closure453_externref_shim(arg0, arg1, arg2, arg3);
|
|
255
379
|
}
|
|
256
380
|
|
|
381
|
+
/**
|
|
382
|
+
* @enum {0 | 1 | 2 | 3 | 4}
|
|
383
|
+
*/
|
|
257
384
|
export const LogLevel = Object.freeze({
|
|
258
385
|
Trace: 0,
|
|
259
386
|
0: "Trace",
|
|
@@ -289,12 +416,12 @@ export class BitwardenClient {
|
|
|
289
416
|
wasm.__wbg_bitwardenclient_free(ptr, 0);
|
|
290
417
|
}
|
|
291
418
|
/**
|
|
292
|
-
* @param {ClientSettings |
|
|
293
|
-
* @param {LogLevel |
|
|
419
|
+
* @param {ClientSettings | null} [settings]
|
|
420
|
+
* @param {LogLevel | null} [log_level]
|
|
294
421
|
*/
|
|
295
422
|
constructor(settings, log_level) {
|
|
296
423
|
const ret = wasm.bitwardenclient_new(
|
|
297
|
-
isLikeNone(settings) ? 0 :
|
|
424
|
+
isLikeNone(settings) ? 0 : addToExternrefTable0(settings),
|
|
298
425
|
isLikeNone(log_level) ? 5 : log_level,
|
|
299
426
|
);
|
|
300
427
|
this.__wbg_ptr = ret >>> 0;
|
|
@@ -310,17 +437,13 @@ export class BitwardenClient {
|
|
|
310
437
|
let deferred2_0;
|
|
311
438
|
let deferred2_1;
|
|
312
439
|
try {
|
|
313
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
314
440
|
const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
315
441
|
const len0 = WASM_VECTOR_LEN;
|
|
316
|
-
wasm.bitwardenclient_echo(
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
deferred2_1 = r1;
|
|
321
|
-
return getStringFromWasm0(r0, r1);
|
|
442
|
+
const ret = wasm.bitwardenclient_echo(this.__wbg_ptr, ptr0, len0);
|
|
443
|
+
deferred2_0 = ret[0];
|
|
444
|
+
deferred2_1 = ret[1];
|
|
445
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
322
446
|
} finally {
|
|
323
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
324
447
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
325
448
|
}
|
|
326
449
|
}
|
|
@@ -331,15 +454,11 @@ export class BitwardenClient {
|
|
|
331
454
|
let deferred1_0;
|
|
332
455
|
let deferred1_1;
|
|
333
456
|
try {
|
|
334
|
-
const
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
deferred1_0 = r0;
|
|
339
|
-
deferred1_1 = r1;
|
|
340
|
-
return getStringFromWasm0(r0, r1);
|
|
457
|
+
const ret = wasm.bitwardenclient_version(this.__wbg_ptr);
|
|
458
|
+
deferred1_0 = ret[0];
|
|
459
|
+
deferred1_1 = ret[1];
|
|
460
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
341
461
|
} finally {
|
|
342
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
343
462
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
344
463
|
}
|
|
345
464
|
}
|
|
@@ -347,18 +466,11 @@ export class BitwardenClient {
|
|
|
347
466
|
* @param {string} msg
|
|
348
467
|
*/
|
|
349
468
|
throw(msg) {
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
356
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
357
|
-
if (r1) {
|
|
358
|
-
throw takeObject(r0);
|
|
359
|
-
}
|
|
360
|
-
} finally {
|
|
361
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
469
|
+
const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
470
|
+
const len0 = WASM_VECTOR_LEN;
|
|
471
|
+
const ret = wasm.bitwardenclient_throw(this.__wbg_ptr, ptr0, len0);
|
|
472
|
+
if (ret[1]) {
|
|
473
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
362
474
|
}
|
|
363
475
|
}
|
|
364
476
|
/**
|
|
@@ -370,142 +482,222 @@ export class BitwardenClient {
|
|
|
370
482
|
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
371
483
|
const len0 = WASM_VECTOR_LEN;
|
|
372
484
|
const ret = wasm.bitwardenclient_http_get(this.__wbg_ptr, ptr0, len0);
|
|
373
|
-
return
|
|
485
|
+
return ret;
|
|
374
486
|
}
|
|
375
487
|
/**
|
|
376
|
-
* @returns {
|
|
488
|
+
* @returns {CryptoClient}
|
|
377
489
|
*/
|
|
378
490
|
crypto() {
|
|
379
491
|
const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
|
|
380
|
-
return
|
|
492
|
+
return CryptoClient.__wrap(ret);
|
|
381
493
|
}
|
|
382
494
|
/**
|
|
383
|
-
* @returns {
|
|
495
|
+
* @returns {VaultClient}
|
|
384
496
|
*/
|
|
385
497
|
vault() {
|
|
386
498
|
const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
|
|
387
|
-
return
|
|
499
|
+
return VaultClient.__wrap(ret);
|
|
388
500
|
}
|
|
389
501
|
}
|
|
390
502
|
|
|
391
|
-
const
|
|
503
|
+
const ClientFoldersFinalization =
|
|
392
504
|
typeof FinalizationRegistry === "undefined"
|
|
393
505
|
? { register: () => {}, unregister: () => {} }
|
|
394
|
-
: new FinalizationRegistry((ptr) => wasm.
|
|
506
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_clientfolders_free(ptr >>> 0, 1));
|
|
395
507
|
|
|
396
|
-
export class
|
|
508
|
+
export class ClientFolders {
|
|
397
509
|
static __wrap(ptr) {
|
|
398
510
|
ptr = ptr >>> 0;
|
|
399
|
-
const obj = Object.create(
|
|
511
|
+
const obj = Object.create(ClientFolders.prototype);
|
|
400
512
|
obj.__wbg_ptr = ptr;
|
|
401
|
-
|
|
513
|
+
ClientFoldersFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
402
514
|
return obj;
|
|
403
515
|
}
|
|
404
516
|
|
|
405
517
|
__destroy_into_raw() {
|
|
406
518
|
const ptr = this.__wbg_ptr;
|
|
407
519
|
this.__wbg_ptr = 0;
|
|
408
|
-
|
|
520
|
+
ClientFoldersFinalization.unregister(this);
|
|
409
521
|
return ptr;
|
|
410
522
|
}
|
|
411
523
|
|
|
412
524
|
free() {
|
|
413
525
|
const ptr = this.__destroy_into_raw();
|
|
414
|
-
wasm.
|
|
526
|
+
wasm.__wbg_clientfolders_free(ptr, 0);
|
|
415
527
|
}
|
|
416
528
|
/**
|
|
417
|
-
*
|
|
418
|
-
*
|
|
419
|
-
* @
|
|
420
|
-
* @returns {Promise<void>}
|
|
529
|
+
* Decrypt folder
|
|
530
|
+
* @param {Folder} folder
|
|
531
|
+
* @returns {FolderView}
|
|
421
532
|
*/
|
|
422
|
-
|
|
423
|
-
const ret = wasm.
|
|
424
|
-
|
|
533
|
+
decrypt(folder) {
|
|
534
|
+
const ret = wasm.clientfolders_decrypt(this.__wbg_ptr, folder);
|
|
535
|
+
if (ret[2]) {
|
|
536
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
537
|
+
}
|
|
538
|
+
return takeFromExternrefTable0(ret[0]);
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
const ClientTotpFinalization =
|
|
543
|
+
typeof FinalizationRegistry === "undefined"
|
|
544
|
+
? { register: () => {}, unregister: () => {} }
|
|
545
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_clienttotp_free(ptr >>> 0, 1));
|
|
546
|
+
|
|
547
|
+
export class ClientTotp {
|
|
548
|
+
static __wrap(ptr) {
|
|
549
|
+
ptr = ptr >>> 0;
|
|
550
|
+
const obj = Object.create(ClientTotp.prototype);
|
|
551
|
+
obj.__wbg_ptr = ptr;
|
|
552
|
+
ClientTotpFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
553
|
+
return obj;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
__destroy_into_raw() {
|
|
557
|
+
const ptr = this.__wbg_ptr;
|
|
558
|
+
this.__wbg_ptr = 0;
|
|
559
|
+
ClientTotpFinalization.unregister(this);
|
|
560
|
+
return ptr;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
free() {
|
|
564
|
+
const ptr = this.__destroy_into_raw();
|
|
565
|
+
wasm.__wbg_clienttotp_free(ptr, 0);
|
|
425
566
|
}
|
|
426
567
|
/**
|
|
427
|
-
*
|
|
428
|
-
*
|
|
429
|
-
*
|
|
430
|
-
*
|
|
568
|
+
* Generates a TOTP code from a provided key
|
|
569
|
+
*
|
|
570
|
+
* # Arguments
|
|
571
|
+
* - `key` - Can be:
|
|
572
|
+
* - A base32 encoded string
|
|
573
|
+
* - OTP Auth URI
|
|
574
|
+
* - Steam URI
|
|
575
|
+
* - `time_ms` - Optional timestamp in milliseconds
|
|
576
|
+
*
|
|
577
|
+
* # Returns
|
|
578
|
+
* - `Ok(TotpResponse)` containing the generated code and period
|
|
579
|
+
* - `Err(TotpError)` if code generation fails
|
|
580
|
+
* @param {string} key
|
|
581
|
+
* @param {number | null} [time_ms]
|
|
582
|
+
* @returns {TotpResponse}
|
|
431
583
|
*/
|
|
432
|
-
|
|
433
|
-
const
|
|
434
|
-
|
|
584
|
+
generate_totp(key, time_ms) {
|
|
585
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
586
|
+
const len0 = WASM_VECTOR_LEN;
|
|
587
|
+
const ret = wasm.clienttotp_generate_totp(
|
|
588
|
+
this.__wbg_ptr,
|
|
589
|
+
ptr0,
|
|
590
|
+
len0,
|
|
591
|
+
!isLikeNone(time_ms),
|
|
592
|
+
isLikeNone(time_ms) ? 0 : time_ms,
|
|
593
|
+
);
|
|
594
|
+
if (ret[2]) {
|
|
595
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
596
|
+
}
|
|
597
|
+
return takeFromExternrefTable0(ret[0]);
|
|
435
598
|
}
|
|
436
599
|
}
|
|
437
600
|
|
|
438
|
-
const
|
|
601
|
+
const CryptoClientFinalization =
|
|
439
602
|
typeof FinalizationRegistry === "undefined"
|
|
440
603
|
? { register: () => {}, unregister: () => {} }
|
|
441
|
-
: new FinalizationRegistry((ptr) => wasm.
|
|
604
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_cryptoclient_free(ptr >>> 0, 1));
|
|
442
605
|
|
|
443
|
-
export class
|
|
606
|
+
export class CryptoClient {
|
|
444
607
|
static __wrap(ptr) {
|
|
445
608
|
ptr = ptr >>> 0;
|
|
446
|
-
const obj = Object.create(
|
|
609
|
+
const obj = Object.create(CryptoClient.prototype);
|
|
447
610
|
obj.__wbg_ptr = ptr;
|
|
448
|
-
|
|
611
|
+
CryptoClientFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
449
612
|
return obj;
|
|
450
613
|
}
|
|
451
614
|
|
|
452
615
|
__destroy_into_raw() {
|
|
453
616
|
const ptr = this.__wbg_ptr;
|
|
454
617
|
this.__wbg_ptr = 0;
|
|
455
|
-
|
|
618
|
+
CryptoClientFinalization.unregister(this);
|
|
456
619
|
return ptr;
|
|
457
620
|
}
|
|
458
621
|
|
|
459
622
|
free() {
|
|
460
623
|
const ptr = this.__destroy_into_raw();
|
|
461
|
-
wasm.
|
|
624
|
+
wasm.__wbg_cryptoclient_free(ptr, 0);
|
|
462
625
|
}
|
|
463
626
|
/**
|
|
464
|
-
*
|
|
465
|
-
*
|
|
466
|
-
* @
|
|
627
|
+
* Initialization method for the user crypto. Needs to be called before any other crypto
|
|
628
|
+
* operations.
|
|
629
|
+
* @param {InitUserCryptoRequest} req
|
|
630
|
+
* @returns {Promise<void>}
|
|
467
631
|
*/
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
632
|
+
initialize_user_crypto(req) {
|
|
633
|
+
const ret = wasm.cryptoclient_initialize_user_crypto(this.__wbg_ptr, req);
|
|
634
|
+
return ret;
|
|
635
|
+
}
|
|
636
|
+
/**
|
|
637
|
+
* Initialization method for the organization crypto. Needs to be called after
|
|
638
|
+
* `initialize_user_crypto` but before any other crypto operations.
|
|
639
|
+
* @param {InitOrgCryptoRequest} req
|
|
640
|
+
* @returns {Promise<void>}
|
|
641
|
+
*/
|
|
642
|
+
initialize_org_crypto(req) {
|
|
643
|
+
const ret = wasm.cryptoclient_initialize_org_crypto(this.__wbg_ptr, req);
|
|
644
|
+
return ret;
|
|
645
|
+
}
|
|
646
|
+
/**
|
|
647
|
+
* Generates a new key pair and encrypts the private key with the provided user key.
|
|
648
|
+
* Crypto initialization not required.
|
|
649
|
+
* @param {string} user_key
|
|
650
|
+
* @returns {MakeKeyPairResponse}
|
|
651
|
+
*/
|
|
652
|
+
make_key_pair(user_key) {
|
|
653
|
+
const ptr0 = passStringToWasm0(user_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
654
|
+
const len0 = WASM_VECTOR_LEN;
|
|
655
|
+
const ret = wasm.cryptoclient_make_key_pair(this.__wbg_ptr, ptr0, len0);
|
|
656
|
+
if (ret[2]) {
|
|
657
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
658
|
+
}
|
|
659
|
+
return takeFromExternrefTable0(ret[0]);
|
|
660
|
+
}
|
|
661
|
+
/**
|
|
662
|
+
* Verifies a user's asymmetric keys by decrypting the private key with the provided user
|
|
663
|
+
* key. Returns if the private key is decryptable and if it is a valid matching key.
|
|
664
|
+
* Crypto initialization not required.
|
|
665
|
+
* @param {VerifyAsymmetricKeysRequest} request
|
|
666
|
+
* @returns {VerifyAsymmetricKeysResponse}
|
|
667
|
+
*/
|
|
668
|
+
verify_asymmetric_keys(request) {
|
|
669
|
+
const ret = wasm.cryptoclient_verify_asymmetric_keys(this.__wbg_ptr, request);
|
|
670
|
+
if (ret[2]) {
|
|
671
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
481
672
|
}
|
|
673
|
+
return takeFromExternrefTable0(ret[0]);
|
|
482
674
|
}
|
|
483
675
|
}
|
|
484
676
|
|
|
485
|
-
const
|
|
677
|
+
const VaultClientFinalization =
|
|
486
678
|
typeof FinalizationRegistry === "undefined"
|
|
487
679
|
? { register: () => {}, unregister: () => {} }
|
|
488
|
-
: new FinalizationRegistry((ptr) => wasm.
|
|
680
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_vaultclient_free(ptr >>> 0, 1));
|
|
489
681
|
|
|
490
|
-
export class
|
|
682
|
+
export class VaultClient {
|
|
491
683
|
static __wrap(ptr) {
|
|
492
684
|
ptr = ptr >>> 0;
|
|
493
|
-
const obj = Object.create(
|
|
685
|
+
const obj = Object.create(VaultClient.prototype);
|
|
494
686
|
obj.__wbg_ptr = ptr;
|
|
495
|
-
|
|
687
|
+
VaultClientFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
496
688
|
return obj;
|
|
497
689
|
}
|
|
498
690
|
|
|
499
691
|
__destroy_into_raw() {
|
|
500
692
|
const ptr = this.__wbg_ptr;
|
|
501
693
|
this.__wbg_ptr = 0;
|
|
502
|
-
|
|
694
|
+
VaultClientFinalization.unregister(this);
|
|
503
695
|
return ptr;
|
|
504
696
|
}
|
|
505
697
|
|
|
506
698
|
free() {
|
|
507
699
|
const ptr = this.__destroy_into_raw();
|
|
508
|
-
wasm.
|
|
700
|
+
wasm.__wbg_vaultclient_free(ptr, 0);
|
|
509
701
|
}
|
|
510
702
|
/**
|
|
511
703
|
* @returns {ClientFolders}
|
|
@@ -514,167 +706,163 @@ export class ClientVault {
|
|
|
514
706
|
const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
|
|
515
707
|
return ClientFolders.__wrap(ret);
|
|
516
708
|
}
|
|
709
|
+
/**
|
|
710
|
+
* @returns {ClientTotp}
|
|
711
|
+
*/
|
|
712
|
+
totp() {
|
|
713
|
+
const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
|
|
714
|
+
return ClientTotp.__wrap(ret);
|
|
715
|
+
}
|
|
517
716
|
}
|
|
518
717
|
|
|
519
|
-
export function
|
|
520
|
-
const
|
|
521
|
-
const
|
|
522
|
-
|
|
523
|
-
? 0
|
|
524
|
-
: passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
525
|
-
var len1 = WASM_VECTOR_LEN;
|
|
718
|
+
export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) {
|
|
719
|
+
const ret = String(arg1);
|
|
720
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
721
|
+
const len1 = WASM_VECTOR_LEN;
|
|
526
722
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
527
723
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
528
724
|
}
|
|
529
725
|
|
|
530
|
-
export function
|
|
531
|
-
|
|
726
|
+
export function __wbg_abort_775ef1d17fc65868(arg0) {
|
|
727
|
+
arg0.abort();
|
|
532
728
|
}
|
|
533
729
|
|
|
534
|
-
export function
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
730
|
+
export function __wbg_append_299d5d48292c0495() {
|
|
731
|
+
return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
732
|
+
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
733
|
+
}, arguments);
|
|
538
734
|
}
|
|
539
735
|
|
|
540
|
-
export function
|
|
541
|
-
|
|
542
|
-
|
|
736
|
+
export function __wbg_append_8c7dd8d641a5f01b() {
|
|
737
|
+
return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
738
|
+
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
739
|
+
}, arguments);
|
|
543
740
|
}
|
|
544
741
|
|
|
545
|
-
export function
|
|
546
|
-
|
|
547
|
-
|
|
742
|
+
export function __wbg_append_b2d1fc16de2a0e81() {
|
|
743
|
+
return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
|
|
744
|
+
arg0.append(getStringFromWasm0(arg1, arg2), arg3, getStringFromWasm0(arg4, arg5));
|
|
745
|
+
}, arguments);
|
|
548
746
|
}
|
|
549
747
|
|
|
550
|
-
export function
|
|
551
|
-
|
|
552
|
-
|
|
748
|
+
export function __wbg_append_b44785ebeb668479() {
|
|
749
|
+
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
750
|
+
arg0.append(getStringFromWasm0(arg1, arg2), arg3);
|
|
751
|
+
}, arguments);
|
|
553
752
|
}
|
|
554
753
|
|
|
555
|
-
export function
|
|
556
|
-
const ret =
|
|
754
|
+
export function __wbg_buffer_609cc3eee51ed158(arg0) {
|
|
755
|
+
const ret = arg0.buffer;
|
|
557
756
|
return ret;
|
|
558
757
|
}
|
|
559
758
|
|
|
560
|
-
export function
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
export function __wbindgen_is_string(arg0) {
|
|
566
|
-
const ret = typeof getObject(arg0) === "string";
|
|
567
|
-
return ret;
|
|
759
|
+
export function __wbg_call_672a4d21634d4a24() {
|
|
760
|
+
return handleError(function (arg0, arg1) {
|
|
761
|
+
const ret = arg0.call(arg1);
|
|
762
|
+
return ret;
|
|
763
|
+
}, arguments);
|
|
568
764
|
}
|
|
569
765
|
|
|
570
|
-
export function
|
|
571
|
-
|
|
572
|
-
|
|
766
|
+
export function __wbg_call_7cccdd69e0791ae2() {
|
|
767
|
+
return handleError(function (arg0, arg1, arg2) {
|
|
768
|
+
const ret = arg0.call(arg1, arg2);
|
|
769
|
+
return ret;
|
|
770
|
+
}, arguments);
|
|
573
771
|
}
|
|
574
772
|
|
|
575
|
-
export function
|
|
576
|
-
const ret =
|
|
773
|
+
export function __wbg_crypto_ed58b8e10a292839(arg0) {
|
|
774
|
+
const ret = arg0.crypto;
|
|
577
775
|
return ret;
|
|
578
776
|
}
|
|
579
777
|
|
|
580
|
-
export function
|
|
581
|
-
|
|
582
|
-
return addHeapObject(ret);
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
export function __wbindgen_object_clone_ref(arg0) {
|
|
586
|
-
const ret = getObject(arg0);
|
|
587
|
-
return addHeapObject(ret);
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
export function __wbg_next_b06e115d1b01e10b() {
|
|
591
|
-
return handleError(function (arg0) {
|
|
592
|
-
const ret = getObject(arg0).next();
|
|
593
|
-
return addHeapObject(ret);
|
|
594
|
-
}, arguments);
|
|
778
|
+
export function __wbg_debug_e17b51583ca6a632(arg0, arg1, arg2, arg3) {
|
|
779
|
+
console.debug(arg0, arg1, arg2, arg3);
|
|
595
780
|
}
|
|
596
781
|
|
|
597
|
-
export function
|
|
598
|
-
const ret =
|
|
782
|
+
export function __wbg_done_769e5ede4b31c67b(arg0) {
|
|
783
|
+
const ret = arg0.done;
|
|
599
784
|
return ret;
|
|
600
785
|
}
|
|
601
786
|
|
|
602
|
-
export function
|
|
603
|
-
const ret =
|
|
604
|
-
return
|
|
787
|
+
export function __wbg_entries_3265d4158b33e5dc(arg0) {
|
|
788
|
+
const ret = Object.entries(arg0);
|
|
789
|
+
return ret;
|
|
605
790
|
}
|
|
606
791
|
|
|
607
|
-
export function
|
|
792
|
+
export function __wbg_error_7534b8e9a36f1ab4(arg0, arg1) {
|
|
608
793
|
let deferred0_0;
|
|
609
794
|
let deferred0_1;
|
|
610
795
|
try {
|
|
611
796
|
deferred0_0 = arg0;
|
|
612
797
|
deferred0_1 = arg1;
|
|
613
|
-
|
|
614
|
-
return addHeapObject(ret);
|
|
798
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
615
799
|
} finally {
|
|
616
800
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
617
801
|
}
|
|
618
802
|
}
|
|
619
803
|
|
|
620
|
-
export function
|
|
621
|
-
|
|
622
|
-
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
623
|
-
return addHeapObject(ret);
|
|
624
|
-
}, arguments);
|
|
804
|
+
export function __wbg_error_80de38b3f7cc3c3c(arg0, arg1, arg2, arg3) {
|
|
805
|
+
console.error(arg0, arg1, arg2, arg3);
|
|
625
806
|
}
|
|
626
807
|
|
|
627
|
-
export function
|
|
628
|
-
const ret =
|
|
629
|
-
return
|
|
808
|
+
export function __wbg_fetch_4465c2b10f21a927(arg0) {
|
|
809
|
+
const ret = fetch(arg0);
|
|
810
|
+
return ret;
|
|
630
811
|
}
|
|
631
812
|
|
|
632
|
-
export function
|
|
633
|
-
|
|
813
|
+
export function __wbg_fetch_509096533071c657(arg0, arg1) {
|
|
814
|
+
const ret = arg0.fetch(arg1);
|
|
815
|
+
return ret;
|
|
634
816
|
}
|
|
635
817
|
|
|
636
|
-
export function
|
|
637
|
-
return handleError(function () {
|
|
638
|
-
|
|
639
|
-
return addHeapObject(ret);
|
|
818
|
+
export function __wbg_getRandomValues_bcb4912f16000dc4() {
|
|
819
|
+
return handleError(function (arg0, arg1) {
|
|
820
|
+
arg0.getRandomValues(arg1);
|
|
640
821
|
}, arguments);
|
|
641
822
|
}
|
|
642
823
|
|
|
643
|
-
export function
|
|
644
|
-
|
|
824
|
+
export function __wbg_getTime_46267b1c24877e30(arg0) {
|
|
825
|
+
const ret = arg0.getTime();
|
|
826
|
+
return ret;
|
|
645
827
|
}
|
|
646
828
|
|
|
647
|
-
export function
|
|
648
|
-
|
|
829
|
+
export function __wbg_get_67b2ba62fc30de12() {
|
|
830
|
+
return handleError(function (arg0, arg1) {
|
|
831
|
+
const ret = Reflect.get(arg0, arg1);
|
|
832
|
+
return ret;
|
|
833
|
+
}, arguments);
|
|
649
834
|
}
|
|
650
835
|
|
|
651
|
-
export function
|
|
652
|
-
|
|
836
|
+
export function __wbg_get_b9b93047fe3cf45b(arg0, arg1) {
|
|
837
|
+
const ret = arg0[arg1 >>> 0];
|
|
838
|
+
return ret;
|
|
653
839
|
}
|
|
654
840
|
|
|
655
|
-
export function
|
|
656
|
-
|
|
841
|
+
export function __wbg_getwithrefkey_1dc361bd10053bfe(arg0, arg1) {
|
|
842
|
+
const ret = arg0[arg1];
|
|
843
|
+
return ret;
|
|
657
844
|
}
|
|
658
845
|
|
|
659
|
-
export function
|
|
660
|
-
|
|
661
|
-
|
|
846
|
+
export function __wbg_has_a5ea9117f258a0ec() {
|
|
847
|
+
return handleError(function (arg0, arg1) {
|
|
848
|
+
const ret = Reflect.has(arg0, arg1);
|
|
849
|
+
return ret;
|
|
850
|
+
}, arguments);
|
|
662
851
|
}
|
|
663
852
|
|
|
664
|
-
export function
|
|
665
|
-
|
|
853
|
+
export function __wbg_headers_9cb51cfd2ac780a4(arg0) {
|
|
854
|
+
const ret = arg0.headers;
|
|
855
|
+
return ret;
|
|
666
856
|
}
|
|
667
857
|
|
|
668
|
-
export function
|
|
669
|
-
|
|
670
|
-
getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
671
|
-
}, arguments);
|
|
858
|
+
export function __wbg_info_033d8b8a0838f1d3(arg0, arg1, arg2, arg3) {
|
|
859
|
+
console.info(arg0, arg1, arg2, arg3);
|
|
672
860
|
}
|
|
673
861
|
|
|
674
|
-
export function
|
|
862
|
+
export function __wbg_instanceof_ArrayBuffer_e14585432e3737fc(arg0) {
|
|
675
863
|
let result;
|
|
676
864
|
try {
|
|
677
|
-
result =
|
|
865
|
+
result = arg0 instanceof ArrayBuffer;
|
|
678
866
|
} catch (_) {
|
|
679
867
|
result = false;
|
|
680
868
|
}
|
|
@@ -682,392 +870,485 @@ export function __wbg_instanceof_Response_3c0e210a57ff751d(arg0) {
|
|
|
682
870
|
return ret;
|
|
683
871
|
}
|
|
684
872
|
|
|
685
|
-
export function
|
|
686
|
-
|
|
873
|
+
export function __wbg_instanceof_Response_f2cc20d9f7dfd644(arg0) {
|
|
874
|
+
let result;
|
|
875
|
+
try {
|
|
876
|
+
result = arg0 instanceof Response;
|
|
877
|
+
} catch (_) {
|
|
878
|
+
result = false;
|
|
879
|
+
}
|
|
880
|
+
const ret = result;
|
|
687
881
|
return ret;
|
|
688
882
|
}
|
|
689
883
|
|
|
690
|
-
export function
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
884
|
+
export function __wbg_instanceof_Uint8Array_17156bcf118086a9(arg0) {
|
|
885
|
+
let result;
|
|
886
|
+
try {
|
|
887
|
+
result = arg0 instanceof Uint8Array;
|
|
888
|
+
} catch (_) {
|
|
889
|
+
result = false;
|
|
890
|
+
}
|
|
891
|
+
const ret = result;
|
|
892
|
+
return ret;
|
|
696
893
|
}
|
|
697
894
|
|
|
698
|
-
export function
|
|
699
|
-
const ret =
|
|
700
|
-
return
|
|
895
|
+
export function __wbg_isSafeInteger_343e2beeeece1bb0(arg0) {
|
|
896
|
+
const ret = Number.isSafeInteger(arg0);
|
|
897
|
+
return ret;
|
|
701
898
|
}
|
|
702
899
|
|
|
703
|
-
export function
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
return addHeapObject(ret);
|
|
707
|
-
}, arguments);
|
|
900
|
+
export function __wbg_iterator_9a24c88df860dc65() {
|
|
901
|
+
const ret = Symbol.iterator;
|
|
902
|
+
return ret;
|
|
708
903
|
}
|
|
709
904
|
|
|
710
|
-
export function
|
|
711
|
-
|
|
905
|
+
export function __wbg_length_a446193dc22c12f8(arg0) {
|
|
906
|
+
const ret = arg0.length;
|
|
907
|
+
return ret;
|
|
712
908
|
}
|
|
713
909
|
|
|
714
|
-
export function
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
return addHeapObject(ret);
|
|
718
|
-
}, arguments);
|
|
910
|
+
export function __wbg_length_e2d2a49132c1b256(arg0) {
|
|
911
|
+
const ret = arg0.length;
|
|
912
|
+
return ret;
|
|
719
913
|
}
|
|
720
914
|
|
|
721
|
-
export function
|
|
722
|
-
|
|
723
|
-
return addHeapObject(ret);
|
|
915
|
+
export function __wbg_log_cad59bb680daec67(arg0, arg1, arg2, arg3) {
|
|
916
|
+
console.log(arg0, arg1, arg2, arg3);
|
|
724
917
|
}
|
|
725
918
|
|
|
726
|
-
export function
|
|
727
|
-
const ret =
|
|
919
|
+
export function __wbg_msCrypto_0a36e2ec3a343d26(arg0) {
|
|
920
|
+
const ret = arg0.msCrypto;
|
|
728
921
|
return ret;
|
|
729
922
|
}
|
|
730
923
|
|
|
731
|
-
export function
|
|
732
|
-
const
|
|
733
|
-
if (obj.cnt-- == 1) {
|
|
734
|
-
obj.a = 0;
|
|
735
|
-
return true;
|
|
736
|
-
}
|
|
737
|
-
const ret = false;
|
|
924
|
+
export function __wbg_new0_f788a2397c7ca929() {
|
|
925
|
+
const ret = new Date();
|
|
738
926
|
return ret;
|
|
739
927
|
}
|
|
740
928
|
|
|
741
|
-
export function
|
|
742
|
-
|
|
743
|
-
|
|
929
|
+
export function __wbg_new_018dcc2d6c8c2f6a() {
|
|
930
|
+
return handleError(function () {
|
|
931
|
+
const ret = new Headers();
|
|
932
|
+
return ret;
|
|
933
|
+
}, arguments);
|
|
744
934
|
}
|
|
745
935
|
|
|
746
|
-
export function
|
|
936
|
+
export function __wbg_new_23a2665fac83c611(arg0, arg1) {
|
|
747
937
|
try {
|
|
748
938
|
var state0 = { a: arg0, b: arg1 };
|
|
749
939
|
var cb0 = (arg0, arg1) => {
|
|
750
940
|
const a = state0.a;
|
|
751
941
|
state0.a = 0;
|
|
752
942
|
try {
|
|
753
|
-
return
|
|
943
|
+
return __wbg_adapter_145(a, state0.b, arg0, arg1);
|
|
754
944
|
} finally {
|
|
755
945
|
state0.a = a;
|
|
756
946
|
}
|
|
757
947
|
};
|
|
758
948
|
const ret = new Promise(cb0);
|
|
759
|
-
return
|
|
949
|
+
return ret;
|
|
760
950
|
} finally {
|
|
761
951
|
state0.a = state0.b = 0;
|
|
762
952
|
}
|
|
763
953
|
}
|
|
764
954
|
|
|
765
|
-
export function
|
|
766
|
-
|
|
955
|
+
export function __wbg_new_405e22f390576ce2() {
|
|
956
|
+
const ret = new Object();
|
|
957
|
+
return ret;
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
export function __wbg_new_78feb108b6472713() {
|
|
961
|
+
const ret = new Array();
|
|
962
|
+
return ret;
|
|
767
963
|
}
|
|
768
964
|
|
|
769
|
-
export function
|
|
965
|
+
export function __wbg_new_8a6f238a6ece86ea() {
|
|
770
966
|
const ret = new Error();
|
|
771
|
-
return
|
|
967
|
+
return ret;
|
|
772
968
|
}
|
|
773
969
|
|
|
774
|
-
export function
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
970
|
+
export function __wbg_new_9fd39a253424609a() {
|
|
971
|
+
return handleError(function () {
|
|
972
|
+
const ret = new FormData();
|
|
973
|
+
return ret;
|
|
974
|
+
}, arguments);
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
export function __wbg_new_a12002a7f91c75be(arg0) {
|
|
978
|
+
const ret = new Uint8Array(arg0);
|
|
979
|
+
return ret;
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
export function __wbg_new_c68d7209be747379(arg0, arg1) {
|
|
983
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
984
|
+
return ret;
|
|
780
985
|
}
|
|
781
986
|
|
|
782
|
-
export function
|
|
987
|
+
export function __wbg_new_e25e5aab09ff45db() {
|
|
988
|
+
return handleError(function () {
|
|
989
|
+
const ret = new AbortController();
|
|
990
|
+
return ret;
|
|
991
|
+
}, arguments);
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
export function __wbg_new_f24b6d53abe5bc82(arg0, arg1) {
|
|
783
995
|
let deferred0_0;
|
|
784
996
|
let deferred0_1;
|
|
785
997
|
try {
|
|
786
998
|
deferred0_0 = arg0;
|
|
787
999
|
deferred0_1 = arg1;
|
|
788
|
-
|
|
1000
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1001
|
+
return ret;
|
|
789
1002
|
} finally {
|
|
790
1003
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
791
1004
|
}
|
|
792
1005
|
}
|
|
793
1006
|
|
|
794
|
-
export function
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
return addHeapObject(ret);
|
|
798
|
-
}, arguments);
|
|
1007
|
+
export function __wbg_newnoargs_105ed471475aaf50(arg0, arg1) {
|
|
1008
|
+
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
1009
|
+
return ret;
|
|
799
1010
|
}
|
|
800
1011
|
|
|
801
|
-
export function
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
return addHeapObject(ret);
|
|
805
|
-
}, arguments);
|
|
1012
|
+
export function __wbg_newwithbyteoffsetandlength_d97e637ebe145a9a(arg0, arg1, arg2) {
|
|
1013
|
+
const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
|
|
1014
|
+
return ret;
|
|
806
1015
|
}
|
|
807
1016
|
|
|
808
|
-
export function
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
return addHeapObject(ret);
|
|
812
|
-
}, arguments);
|
|
1017
|
+
export function __wbg_newwithlength_a381634e90c276d4(arg0) {
|
|
1018
|
+
const ret = new Uint8Array(arg0 >>> 0);
|
|
1019
|
+
return ret;
|
|
813
1020
|
}
|
|
814
1021
|
|
|
815
|
-
export function
|
|
816
|
-
return handleError(function () {
|
|
817
|
-
const ret =
|
|
818
|
-
return
|
|
1022
|
+
export function __wbg_newwithstrandinit_06c535e0a867c635() {
|
|
1023
|
+
return handleError(function (arg0, arg1, arg2) {
|
|
1024
|
+
const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
|
|
1025
|
+
return ret;
|
|
819
1026
|
}, arguments);
|
|
820
1027
|
}
|
|
821
1028
|
|
|
822
|
-
export function
|
|
823
|
-
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
824
|
-
return addHeapObject(ret);
|
|
825
|
-
}
|
|
826
|
-
|
|
827
|
-
export function __wbg_call_a9ef466721e824f2() {
|
|
1029
|
+
export function __wbg_newwithu8arraysequenceandoptions_068570c487f69127() {
|
|
828
1030
|
return handleError(function (arg0, arg1) {
|
|
829
|
-
const ret =
|
|
830
|
-
return
|
|
1031
|
+
const ret = new Blob(arg0, arg1);
|
|
1032
|
+
return ret;
|
|
831
1033
|
}, arguments);
|
|
832
1034
|
}
|
|
833
1035
|
|
|
834
|
-
export function
|
|
835
|
-
const ret =
|
|
836
|
-
return
|
|
1036
|
+
export function __wbg_next_25feadfc0913fea9(arg0) {
|
|
1037
|
+
const ret = arg0.next;
|
|
1038
|
+
return ret;
|
|
837
1039
|
}
|
|
838
1040
|
|
|
839
|
-
export function
|
|
840
|
-
return handleError(function (arg0
|
|
841
|
-
const ret =
|
|
842
|
-
return
|
|
1041
|
+
export function __wbg_next_6574e1a8a62d1055() {
|
|
1042
|
+
return handleError(function (arg0) {
|
|
1043
|
+
const ret = arg0.next();
|
|
1044
|
+
return ret;
|
|
843
1045
|
}, arguments);
|
|
844
1046
|
}
|
|
845
1047
|
|
|
846
|
-
export function
|
|
847
|
-
const ret =
|
|
1048
|
+
export function __wbg_node_02999533c4ea02e3(arg0) {
|
|
1049
|
+
const ret = arg0.node;
|
|
848
1050
|
return ret;
|
|
849
1051
|
}
|
|
850
1052
|
|
|
851
|
-
export function
|
|
852
|
-
const ret =
|
|
853
|
-
return
|
|
1053
|
+
export function __wbg_process_5c1d670bc53614b8(arg0) {
|
|
1054
|
+
const ret = arg0.process;
|
|
1055
|
+
return ret;
|
|
854
1056
|
}
|
|
855
1057
|
|
|
856
|
-
export function
|
|
857
|
-
const ret =
|
|
858
|
-
return
|
|
1058
|
+
export function __wbg_push_737cfc8c1432c2c6(arg0, arg1) {
|
|
1059
|
+
const ret = arg0.push(arg1);
|
|
1060
|
+
return ret;
|
|
859
1061
|
}
|
|
860
1062
|
|
|
861
|
-
export function
|
|
862
|
-
|
|
863
|
-
return ret;
|
|
1063
|
+
export function __wbg_queueMicrotask_97d92b4fcc8a61c5(arg0) {
|
|
1064
|
+
queueMicrotask(arg0);
|
|
864
1065
|
}
|
|
865
1066
|
|
|
866
|
-
export function
|
|
867
|
-
|
|
868
|
-
try {
|
|
869
|
-
result = getObject(arg0) instanceof ArrayBuffer;
|
|
870
|
-
} catch (_) {
|
|
871
|
-
result = false;
|
|
872
|
-
}
|
|
873
|
-
const ret = result;
|
|
1067
|
+
export function __wbg_queueMicrotask_d3219def82552485(arg0) {
|
|
1068
|
+
const ret = arg0.queueMicrotask;
|
|
874
1069
|
return ret;
|
|
875
1070
|
}
|
|
876
1071
|
|
|
877
|
-
export function
|
|
878
|
-
|
|
879
|
-
|
|
1072
|
+
export function __wbg_randomFillSync_ab2cfe79ebbf2740() {
|
|
1073
|
+
return handleError(function (arg0, arg1) {
|
|
1074
|
+
arg0.randomFillSync(arg1);
|
|
1075
|
+
}, arguments);
|
|
880
1076
|
}
|
|
881
1077
|
|
|
882
|
-
export function
|
|
883
|
-
return handleError(function (
|
|
884
|
-
const ret =
|
|
1078
|
+
export function __wbg_require_79b1e9274cde3c87() {
|
|
1079
|
+
return handleError(function () {
|
|
1080
|
+
const ret = module.require;
|
|
885
1081
|
return ret;
|
|
886
1082
|
}, arguments);
|
|
887
1083
|
}
|
|
888
1084
|
|
|
889
|
-
export function
|
|
890
|
-
const ret = Promise.resolve(
|
|
891
|
-
return
|
|
1085
|
+
export function __wbg_resolve_4851785c9c5f573d(arg0) {
|
|
1086
|
+
const ret = Promise.resolve(arg0);
|
|
1087
|
+
return ret;
|
|
892
1088
|
}
|
|
893
1089
|
|
|
894
|
-
export function
|
|
895
|
-
|
|
896
|
-
return addHeapObject(ret);
|
|
1090
|
+
export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
|
|
1091
|
+
arg0[arg1] = arg2;
|
|
897
1092
|
}
|
|
898
1093
|
|
|
899
|
-
export function
|
|
900
|
-
|
|
901
|
-
return addHeapObject(ret);
|
|
1094
|
+
export function __wbg_set_65595bdd868b3009(arg0, arg1, arg2) {
|
|
1095
|
+
arg0.set(arg1, arg2 >>> 0);
|
|
902
1096
|
}
|
|
903
1097
|
|
|
904
|
-
export function
|
|
905
|
-
|
|
906
|
-
return addHeapObject(ret);
|
|
1098
|
+
export function __wbg_setbody_5923b78a95eedf29(arg0, arg1) {
|
|
1099
|
+
arg0.body = arg1;
|
|
907
1100
|
}
|
|
908
1101
|
|
|
909
|
-
export function
|
|
910
|
-
|
|
911
|
-
return addHeapObject(ret);
|
|
1102
|
+
export function __wbg_setcredentials_c3a22f1cd105a2c6(arg0, arg1) {
|
|
1103
|
+
arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
912
1104
|
}
|
|
913
1105
|
|
|
914
|
-
export function
|
|
915
|
-
|
|
916
|
-
return addHeapObject(ret);
|
|
1106
|
+
export function __wbg_setheaders_834c0bdb6a8949ad(arg0, arg1) {
|
|
1107
|
+
arg0.headers = arg1;
|
|
917
1108
|
}
|
|
918
1109
|
|
|
919
|
-
export function
|
|
920
|
-
|
|
921
|
-
|
|
1110
|
+
export function __wbg_setmethod_3c5280fe5d890842(arg0, arg1, arg2) {
|
|
1111
|
+
arg0.method = getStringFromWasm0(arg1, arg2);
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
export function __wbg_setmode_5dc300b865044b65(arg0, arg1) {
|
|
1115
|
+
arg0.mode = __wbindgen_enum_RequestMode[arg1];
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
export function __wbg_setname_c0e2d6f348c746f4(arg0, arg1, arg2) {
|
|
1119
|
+
let deferred0_0;
|
|
1120
|
+
let deferred0_1;
|
|
1121
|
+
try {
|
|
1122
|
+
deferred0_0 = arg1;
|
|
1123
|
+
deferred0_1 = arg2;
|
|
1124
|
+
arg0.name = getStringFromWasm0(arg1, arg2);
|
|
1125
|
+
} finally {
|
|
1126
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
1127
|
+
}
|
|
922
1128
|
}
|
|
923
1129
|
|
|
924
|
-
export function
|
|
925
|
-
|
|
926
|
-
return addHeapObject(ret);
|
|
1130
|
+
export function __wbg_setsignal_75b21ef3a81de905(arg0, arg1) {
|
|
1131
|
+
arg0.signal = arg1;
|
|
927
1132
|
}
|
|
928
1133
|
|
|
929
|
-
export function
|
|
930
|
-
|
|
1134
|
+
export function __wbg_settype_39ed370d3edd403c(arg0, arg1, arg2) {
|
|
1135
|
+
arg0.type = getStringFromWasm0(arg1, arg2);
|
|
931
1136
|
}
|
|
932
1137
|
|
|
933
|
-
export function
|
|
934
|
-
let
|
|
1138
|
+
export function __wbg_setvariant_d1d41b778dfe9c17(arg0, arg1, arg2) {
|
|
1139
|
+
let deferred0_0;
|
|
1140
|
+
let deferred0_1;
|
|
935
1141
|
try {
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
1142
|
+
deferred0_0 = arg1;
|
|
1143
|
+
deferred0_1 = arg2;
|
|
1144
|
+
arg0.variant = getStringFromWasm0(arg1, arg2);
|
|
1145
|
+
} finally {
|
|
1146
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
939
1147
|
}
|
|
940
|
-
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
export function __wbg_signal_aaf9ad74119f20a4(arg0) {
|
|
1151
|
+
const ret = arg0.signal;
|
|
941
1152
|
return ret;
|
|
942
1153
|
}
|
|
943
1154
|
|
|
944
|
-
export function
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
1155
|
+
export function __wbg_stack_0ed75d68575b0f3c(arg0, arg1) {
|
|
1156
|
+
const ret = arg1.stack;
|
|
1157
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1158
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1159
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1160
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
949
1161
|
}
|
|
950
1162
|
|
|
951
|
-
export function
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
}, arguments);
|
|
1163
|
+
export function __wbg_static_accessor_GLOBAL_88a902d13a557d07() {
|
|
1164
|
+
const ret = typeof global === "undefined" ? null : global;
|
|
1165
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
955
1166
|
}
|
|
956
1167
|
|
|
957
|
-
export function
|
|
958
|
-
|
|
1168
|
+
export function __wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0() {
|
|
1169
|
+
const ret = typeof globalThis === "undefined" ? null : globalThis;
|
|
1170
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
959
1171
|
}
|
|
960
1172
|
|
|
961
|
-
export function
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
return addHeapObject(ret);
|
|
965
|
-
}, arguments);
|
|
1173
|
+
export function __wbg_static_accessor_SELF_37c5d418e4bf5819() {
|
|
1174
|
+
const ret = typeof self === "undefined" ? null : self;
|
|
1175
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
966
1176
|
}
|
|
967
1177
|
|
|
968
|
-
export function
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
}, arguments);
|
|
1178
|
+
export function __wbg_static_accessor_WINDOW_5de37043a91a9c40() {
|
|
1179
|
+
const ret = typeof window === "undefined" ? null : window;
|
|
1180
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
972
1181
|
}
|
|
973
1182
|
|
|
974
|
-
export function
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
getStringFromWasm0(arg1, arg2),
|
|
978
|
-
getObject(arg3),
|
|
979
|
-
getStringFromWasm0(arg4, arg5),
|
|
980
|
-
);
|
|
981
|
-
}, arguments);
|
|
1183
|
+
export function __wbg_status_f6360336ca686bf0(arg0) {
|
|
1184
|
+
const ret = arg0.status;
|
|
1185
|
+
return ret;
|
|
982
1186
|
}
|
|
983
1187
|
|
|
984
|
-
export function
|
|
985
|
-
|
|
986
|
-
|
|
1188
|
+
export function __wbg_stringify_f7ed6987935b4a24() {
|
|
1189
|
+
return handleError(function (arg0) {
|
|
1190
|
+
const ret = JSON.stringify(arg0);
|
|
1191
|
+
return ret;
|
|
1192
|
+
}, arguments);
|
|
987
1193
|
}
|
|
988
1194
|
|
|
989
|
-
export function
|
|
990
|
-
const ret =
|
|
991
|
-
return
|
|
1195
|
+
export function __wbg_subarray_aa9065fa9dc5df96(arg0, arg1, arg2) {
|
|
1196
|
+
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1197
|
+
return ret;
|
|
992
1198
|
}
|
|
993
1199
|
|
|
994
|
-
export function
|
|
995
|
-
return handleError(function () {
|
|
996
|
-
const ret =
|
|
997
|
-
return
|
|
1200
|
+
export function __wbg_text_7805bea50de2af49() {
|
|
1201
|
+
return handleError(function (arg0) {
|
|
1202
|
+
const ret = arg0.text();
|
|
1203
|
+
return ret;
|
|
998
1204
|
}, arguments);
|
|
999
1205
|
}
|
|
1000
1206
|
|
|
1001
|
-
export function
|
|
1002
|
-
const
|
|
1003
|
-
const ret = typeof v === "boolean" ? (v ? 1 : 0) : 2;
|
|
1207
|
+
export function __wbg_then_44b73946d2fb3e7d(arg0, arg1) {
|
|
1208
|
+
const ret = arg0.then(arg1);
|
|
1004
1209
|
return ret;
|
|
1005
1210
|
}
|
|
1006
1211
|
|
|
1007
|
-
export function
|
|
1008
|
-
const
|
|
1009
|
-
|
|
1010
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1011
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1212
|
+
export function __wbg_then_48b406749878a531(arg0, arg1, arg2) {
|
|
1213
|
+
const ret = arg0.then(arg1, arg2);
|
|
1214
|
+
return ret;
|
|
1012
1215
|
}
|
|
1013
1216
|
|
|
1014
|
-
export function
|
|
1015
|
-
const ret =
|
|
1217
|
+
export function __wbg_url_ae10c34ca209681d(arg0, arg1) {
|
|
1218
|
+
const ret = arg1.url;
|
|
1016
1219
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1017
1220
|
const len1 = WASM_VECTOR_LEN;
|
|
1018
1221
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1019
1222
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1020
1223
|
}
|
|
1021
1224
|
|
|
1225
|
+
export function __wbg_value_cd1ffa7b1ab794f1(arg0) {
|
|
1226
|
+
const ret = arg0.value;
|
|
1227
|
+
return ret;
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
export function __wbg_versions_c71aa1626a93e0a1(arg0) {
|
|
1231
|
+
const ret = arg0.versions;
|
|
1232
|
+
return ret;
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
export function __wbg_warn_aaf1f4664a035bd6(arg0, arg1, arg2, arg3) {
|
|
1236
|
+
console.warn(arg0, arg1, arg2, arg3);
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
export function __wbindgen_as_number(arg0) {
|
|
1240
|
+
const ret = +arg0;
|
|
1241
|
+
return ret;
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
export function __wbindgen_boolean_get(arg0) {
|
|
1245
|
+
const v = arg0;
|
|
1246
|
+
const ret = typeof v === "boolean" ? (v ? 1 : 0) : 2;
|
|
1247
|
+
return ret;
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
export function __wbindgen_cb_drop(arg0) {
|
|
1251
|
+
const obj = arg0.original;
|
|
1252
|
+
if (obj.cnt-- == 1) {
|
|
1253
|
+
obj.a = 0;
|
|
1254
|
+
return true;
|
|
1255
|
+
}
|
|
1256
|
+
const ret = false;
|
|
1257
|
+
return ret;
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
export function __wbindgen_closure_wrapper2160(arg0, arg1, arg2) {
|
|
1261
|
+
const ret = makeMutClosure(arg0, arg1, 606, __wbg_adapter_42);
|
|
1262
|
+
return ret;
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1022
1265
|
export function __wbindgen_debug_string(arg0, arg1) {
|
|
1023
|
-
const ret = debugString(
|
|
1266
|
+
const ret = debugString(arg1);
|
|
1024
1267
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1025
1268
|
const len1 = WASM_VECTOR_LEN;
|
|
1026
1269
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1027
1270
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1028
1271
|
}
|
|
1029
1272
|
|
|
1030
|
-
export function
|
|
1031
|
-
|
|
1273
|
+
export function __wbindgen_error_new(arg0, arg1) {
|
|
1274
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1275
|
+
return ret;
|
|
1032
1276
|
}
|
|
1033
1277
|
|
|
1034
|
-
export function
|
|
1035
|
-
const ret =
|
|
1036
|
-
return
|
|
1278
|
+
export function __wbindgen_in(arg0, arg1) {
|
|
1279
|
+
const ret = arg0 in arg1;
|
|
1280
|
+
return ret;
|
|
1037
1281
|
}
|
|
1038
1282
|
|
|
1039
|
-
export function
|
|
1040
|
-
|
|
1283
|
+
export function __wbindgen_init_externref_table() {
|
|
1284
|
+
const table = wasm.__wbindgen_export_4;
|
|
1285
|
+
const offset = table.grow(4);
|
|
1286
|
+
table.set(0, undefined);
|
|
1287
|
+
table.set(offset + 0, undefined);
|
|
1288
|
+
table.set(offset + 1, null);
|
|
1289
|
+
table.set(offset + 2, true);
|
|
1290
|
+
table.set(offset + 3, false);
|
|
1041
1291
|
}
|
|
1042
1292
|
|
|
1043
|
-
export function
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
return addHeapObject(ret);
|
|
1047
|
-
}, arguments);
|
|
1293
|
+
export function __wbindgen_is_function(arg0) {
|
|
1294
|
+
const ret = typeof arg0 === "function";
|
|
1295
|
+
return ret;
|
|
1048
1296
|
}
|
|
1049
1297
|
|
|
1050
|
-
export function
|
|
1051
|
-
|
|
1298
|
+
export function __wbindgen_is_object(arg0) {
|
|
1299
|
+
const val = arg0;
|
|
1300
|
+
const ret = typeof val === "object" && val !== null;
|
|
1301
|
+
return ret;
|
|
1052
1302
|
}
|
|
1053
1303
|
|
|
1054
|
-
export function
|
|
1055
|
-
|
|
1304
|
+
export function __wbindgen_is_string(arg0) {
|
|
1305
|
+
const ret = typeof arg0 === "string";
|
|
1306
|
+
return ret;
|
|
1056
1307
|
}
|
|
1057
1308
|
|
|
1058
|
-
export function
|
|
1059
|
-
|
|
1309
|
+
export function __wbindgen_is_undefined(arg0) {
|
|
1310
|
+
const ret = arg0 === undefined;
|
|
1311
|
+
return ret;
|
|
1060
1312
|
}
|
|
1061
1313
|
|
|
1062
|
-
export function
|
|
1063
|
-
|
|
1314
|
+
export function __wbindgen_jsval_loose_eq(arg0, arg1) {
|
|
1315
|
+
const ret = arg0 == arg1;
|
|
1316
|
+
return ret;
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
export function __wbindgen_memory() {
|
|
1320
|
+
const ret = wasm.memory;
|
|
1321
|
+
return ret;
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
export function __wbindgen_number_get(arg0, arg1) {
|
|
1325
|
+
const obj = arg1;
|
|
1326
|
+
const ret = typeof obj === "number" ? obj : undefined;
|
|
1327
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1328
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1064
1329
|
}
|
|
1065
1330
|
|
|
1066
|
-
export function
|
|
1067
|
-
|
|
1331
|
+
export function __wbindgen_number_new(arg0) {
|
|
1332
|
+
const ret = arg0;
|
|
1333
|
+
return ret;
|
|
1068
1334
|
}
|
|
1069
1335
|
|
|
1070
|
-
export function
|
|
1071
|
-
const
|
|
1072
|
-
|
|
1336
|
+
export function __wbindgen_string_get(arg0, arg1) {
|
|
1337
|
+
const obj = arg1;
|
|
1338
|
+
const ret = typeof obj === "string" ? obj : undefined;
|
|
1339
|
+
var ptr1 = isLikeNone(ret)
|
|
1340
|
+
? 0
|
|
1341
|
+
: passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1342
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1343
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1344
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1347
|
+
export function __wbindgen_string_new(arg0, arg1) {
|
|
1348
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
1349
|
+
return ret;
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
export function __wbindgen_throw(arg0, arg1) {
|
|
1353
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1073
1354
|
}
|