@learncard/didkit-plugin 1.5.36 → 1.6.1
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/dist/didkit/didkit_wasm.d.ts +2 -2
- package/dist/didkit/didkit_wasm.js +201 -226
- package/dist/didkit/didkit_wasm_bg.wasm +0 -0
- package/dist/didkit/didkit_wasm_bg.wasm.d.ts +2 -2
- package/dist/didkit-plugin.cjs.development.js +250 -280
- package/dist/didkit-plugin.cjs.development.js.map +2 -2
- package/dist/didkit-plugin.cjs.production.min.js +2 -2
- package/dist/didkit-plugin.cjs.production.min.js.map +3 -3
- package/dist/didkit-plugin.esm.js +247 -277
- package/dist/didkit-plugin.esm.js.map +2 -2
- package/dist/didkit_wasm.d.ts +2 -2
- package/dist/didkit_wasm.js +201 -226
- package/dist/didkit_wasm_bg.wasm +0 -0
- package/dist/didkit_wasm_bg.wasm.d.ts +2 -2
- package/package.json +7 -7
|
@@ -3,6 +3,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
3
3
|
|
|
4
4
|
// src/didkit/pkg/didkit_wasm.js
|
|
5
5
|
var wasm;
|
|
6
|
+
var WASM_VECTOR_LEN = 0;
|
|
6
7
|
var cachedUint8ArrayMemory0 = null;
|
|
7
8
|
function getUint8ArrayMemory0() {
|
|
8
9
|
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
@@ -11,35 +12,9 @@ function getUint8ArrayMemory0() {
|
|
|
11
12
|
return cachedUint8ArrayMemory0;
|
|
12
13
|
}
|
|
13
14
|
__name(getUint8ArrayMemory0, "getUint8ArrayMemory0");
|
|
14
|
-
var
|
|
15
|
-
throw Error("TextDecoder not available");
|
|
16
|
-
} };
|
|
17
|
-
if (typeof TextDecoder !== "undefined") {
|
|
18
|
-
cachedTextDecoder.decode();
|
|
19
|
-
}
|
|
20
|
-
var MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
21
|
-
var numBytesDecoded = 0;
|
|
22
|
-
function decodeText(ptr, len) {
|
|
23
|
-
numBytesDecoded += len;
|
|
24
|
-
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
25
|
-
cachedTextDecoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf-8", { ignoreBOM: true, fatal: true }) : { decode: () => {
|
|
26
|
-
throw Error("TextDecoder not available");
|
|
27
|
-
} };
|
|
28
|
-
cachedTextDecoder.decode();
|
|
29
|
-
numBytesDecoded = len;
|
|
30
|
-
}
|
|
31
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
32
|
-
}
|
|
33
|
-
__name(decodeText, "decodeText");
|
|
34
|
-
function getStringFromWasm0(ptr, len) {
|
|
35
|
-
ptr = ptr >>> 0;
|
|
36
|
-
return decodeText(ptr, len);
|
|
37
|
-
}
|
|
38
|
-
__name(getStringFromWasm0, "getStringFromWasm0");
|
|
39
|
-
var WASM_VECTOR_LEN = 0;
|
|
40
|
-
var cachedTextEncoder = typeof TextEncoder !== "undefined" ? new TextEncoder("utf-8") : { encode: () => {
|
|
15
|
+
var cachedTextEncoder = typeof TextEncoder !== "undefined" ? new TextEncoder("utf-8") : { encode: /* @__PURE__ */ __name(() => {
|
|
41
16
|
throw Error("TextEncoder not available");
|
|
42
|
-
} };
|
|
17
|
+
}, "encode") };
|
|
43
18
|
var encodeString = typeof cachedTextEncoder.encodeInto === "function" ? function(arg, view) {
|
|
44
19
|
return cachedTextEncoder.encodeInto(arg, view);
|
|
45
20
|
} : function(arg, view) {
|
|
@@ -64,8 +39,7 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
64
39
|
let offset = 0;
|
|
65
40
|
for (; offset < len; offset++) {
|
|
66
41
|
const code = arg.charCodeAt(offset);
|
|
67
|
-
if (code > 127)
|
|
68
|
-
break;
|
|
42
|
+
if (code > 127) break;
|
|
69
43
|
mem[ptr + offset] = code;
|
|
70
44
|
}
|
|
71
45
|
if (offset !== len) {
|
|
@@ -90,6 +64,17 @@ function getDataViewMemory0() {
|
|
|
90
64
|
return cachedDataViewMemory0;
|
|
91
65
|
}
|
|
92
66
|
__name(getDataViewMemory0, "getDataViewMemory0");
|
|
67
|
+
var cachedTextDecoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf-8", { ignoreBOM: true, fatal: true }) : { decode: /* @__PURE__ */ __name(() => {
|
|
68
|
+
throw Error("TextDecoder not available");
|
|
69
|
+
}, "decode") };
|
|
70
|
+
if (typeof TextDecoder !== "undefined") {
|
|
71
|
+
cachedTextDecoder.decode();
|
|
72
|
+
}
|
|
73
|
+
function getStringFromWasm0(ptr, len) {
|
|
74
|
+
ptr = ptr >>> 0;
|
|
75
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
76
|
+
}
|
|
77
|
+
__name(getStringFromWasm0, "getStringFromWasm0");
|
|
93
78
|
function addToExternrefTable0(obj) {
|
|
94
79
|
const idx = wasm.__externref_table_alloc();
|
|
95
80
|
wasm.__wbindgen_export_4.set(idx, obj);
|
|
@@ -114,6 +99,33 @@ function isLikeNone(x) {
|
|
|
114
99
|
return x === void 0 || x === null;
|
|
115
100
|
}
|
|
116
101
|
__name(isLikeNone, "isLikeNone");
|
|
102
|
+
var CLOSURE_DTORS = typeof FinalizationRegistry === "undefined" ? { register: /* @__PURE__ */ __name(() => {
|
|
103
|
+
}, "register"), unregister: /* @__PURE__ */ __name(() => {
|
|
104
|
+
}, "unregister") } : new FinalizationRegistry((state) => {
|
|
105
|
+
wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b);
|
|
106
|
+
});
|
|
107
|
+
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
108
|
+
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
109
|
+
const real = /* @__PURE__ */ __name((...args) => {
|
|
110
|
+
state.cnt++;
|
|
111
|
+
const a = state.a;
|
|
112
|
+
state.a = 0;
|
|
113
|
+
try {
|
|
114
|
+
return f(a, state.b, ...args);
|
|
115
|
+
} finally {
|
|
116
|
+
if (--state.cnt === 0) {
|
|
117
|
+
wasm.__wbindgen_export_5.get(state.dtor)(a, state.b);
|
|
118
|
+
CLOSURE_DTORS.unregister(state);
|
|
119
|
+
} else {
|
|
120
|
+
state.a = a;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}, "real");
|
|
124
|
+
real.original = state;
|
|
125
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
126
|
+
return real;
|
|
127
|
+
}
|
|
128
|
+
__name(makeMutClosure, "makeMutClosure");
|
|
117
129
|
function debugString(val) {
|
|
118
130
|
const type = typeof val;
|
|
119
131
|
if (type == "number" || type == "boolean" || val == null) {
|
|
@@ -171,35 +183,6 @@ ${val.stack}`;
|
|
|
171
183
|
return className;
|
|
172
184
|
}
|
|
173
185
|
__name(debugString, "debugString");
|
|
174
|
-
var CLOSURE_DTORS = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
175
|
-
}, unregister: () => {
|
|
176
|
-
} } : new FinalizationRegistry(
|
|
177
|
-
(state) => {
|
|
178
|
-
wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b);
|
|
179
|
-
}
|
|
180
|
-
);
|
|
181
|
-
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
182
|
-
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
183
|
-
const real = /* @__PURE__ */ __name((...args) => {
|
|
184
|
-
state.cnt++;
|
|
185
|
-
const a = state.a;
|
|
186
|
-
state.a = 0;
|
|
187
|
-
try {
|
|
188
|
-
return f(a, state.b, ...args);
|
|
189
|
-
} finally {
|
|
190
|
-
if (--state.cnt === 0) {
|
|
191
|
-
wasm.__wbindgen_export_5.get(state.dtor)(a, state.b);
|
|
192
|
-
CLOSURE_DTORS.unregister(state);
|
|
193
|
-
} else {
|
|
194
|
-
state.a = a;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
}, "real");
|
|
198
|
-
real.original = state;
|
|
199
|
-
CLOSURE_DTORS.register(real, state, state);
|
|
200
|
-
return real;
|
|
201
|
-
}
|
|
202
|
-
__name(makeMutClosure, "makeMutClosure");
|
|
203
186
|
function clearCache() {
|
|
204
187
|
const ret = wasm.clearCache();
|
|
205
188
|
return ret;
|
|
@@ -419,25 +402,23 @@ function contextLoader(url) {
|
|
|
419
402
|
return ret;
|
|
420
403
|
}
|
|
421
404
|
__name(contextLoader, "contextLoader");
|
|
422
|
-
function
|
|
423
|
-
wasm.
|
|
405
|
+
function __wbg_adapter_54(arg0, arg1, arg2) {
|
|
406
|
+
wasm.closure4184_externref_shim(arg0, arg1, arg2);
|
|
424
407
|
}
|
|
425
|
-
__name(
|
|
426
|
-
function
|
|
427
|
-
wasm.
|
|
408
|
+
__name(__wbg_adapter_54, "__wbg_adapter_54");
|
|
409
|
+
function __wbg_adapter_222(arg0, arg1, arg2, arg3) {
|
|
410
|
+
wasm.closure4586_externref_shim(arg0, arg1, arg2, arg3);
|
|
428
411
|
}
|
|
429
|
-
__name(
|
|
412
|
+
__name(__wbg_adapter_222, "__wbg_adapter_222");
|
|
430
413
|
var __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
431
414
|
var __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
432
|
-
var EXPECTED_RESPONSE_TYPES = /* @__PURE__ */ new Set(["basic", "cors", "default"]);
|
|
433
415
|
async function __wbg_load(module2, imports) {
|
|
434
416
|
if (typeof Response === "function" && module2 instanceof Response) {
|
|
435
417
|
if (typeof WebAssembly.instantiateStreaming === "function") {
|
|
436
418
|
try {
|
|
437
419
|
return await WebAssembly.instantiateStreaming(module2, imports);
|
|
438
420
|
} catch (e) {
|
|
439
|
-
|
|
440
|
-
if (validResponse && module2.headers.get("Content-Type") !== "application/wasm") {
|
|
421
|
+
if (module2.headers.get("Content-Type") != "application/wasm") {
|
|
441
422
|
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);
|
|
442
423
|
} else {
|
|
443
424
|
throw e;
|
|
@@ -459,10 +440,6 @@ __name(__wbg_load, "__wbg_load");
|
|
|
459
440
|
function __wbg_get_imports() {
|
|
460
441
|
const imports = {};
|
|
461
442
|
imports.wbg = {};
|
|
462
|
-
imports.wbg.__wbg_Error_1f3748b298f99708 = function(arg0, arg1) {
|
|
463
|
-
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
464
|
-
return ret;
|
|
465
|
-
};
|
|
466
443
|
imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
467
444
|
const ret = String(arg1);
|
|
468
445
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -470,27 +447,31 @@ function __wbg_get_imports() {
|
|
|
470
447
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
471
448
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
472
449
|
};
|
|
473
|
-
imports.wbg.
|
|
450
|
+
imports.wbg.__wbg_abort_775ef1d17fc65868 = function(arg0) {
|
|
474
451
|
arg0.abort();
|
|
475
452
|
};
|
|
476
|
-
imports.wbg.
|
|
453
|
+
imports.wbg.__wbg_append_8c7dd8d641a5f01b = function() {
|
|
477
454
|
return handleError(function(arg0, arg1, arg2, arg3, arg4) {
|
|
478
455
|
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
479
456
|
}, arguments);
|
|
480
457
|
};
|
|
481
|
-
imports.wbg.
|
|
458
|
+
imports.wbg.__wbg_arrayBuffer_d1b44c4390db422f = function() {
|
|
482
459
|
return handleError(function(arg0) {
|
|
483
460
|
const ret = arg0.arrayBuffer();
|
|
484
461
|
return ret;
|
|
485
462
|
}, arguments);
|
|
486
463
|
};
|
|
487
|
-
imports.wbg.
|
|
464
|
+
imports.wbg.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
|
|
465
|
+
const ret = arg0.buffer;
|
|
466
|
+
return ret;
|
|
467
|
+
};
|
|
468
|
+
imports.wbg.__wbg_call_672a4d21634d4a24 = function() {
|
|
488
469
|
return handleError(function(arg0, arg1) {
|
|
489
470
|
const ret = arg0.call(arg1);
|
|
490
471
|
return ret;
|
|
491
472
|
}, arguments);
|
|
492
473
|
};
|
|
493
|
-
imports.wbg.
|
|
474
|
+
imports.wbg.__wbg_call_7cccdd69e0791ae2 = function() {
|
|
494
475
|
return handleError(function(arg0, arg1, arg2) {
|
|
495
476
|
const ret = arg0.call(arg1, arg2);
|
|
496
477
|
return ret;
|
|
@@ -504,15 +485,15 @@ function __wbg_get_imports() {
|
|
|
504
485
|
const ret = arg0.crypto;
|
|
505
486
|
return ret;
|
|
506
487
|
};
|
|
507
|
-
imports.wbg.
|
|
488
|
+
imports.wbg.__wbg_done_769e5ede4b31c67b = function(arg0) {
|
|
508
489
|
const ret = arg0.done;
|
|
509
490
|
return ret;
|
|
510
491
|
};
|
|
511
|
-
imports.wbg.
|
|
492
|
+
imports.wbg.__wbg_entries_3265d4158b33e5dc = function(arg0) {
|
|
512
493
|
const ret = Object.entries(arg0);
|
|
513
494
|
return ret;
|
|
514
495
|
};
|
|
515
|
-
imports.wbg.
|
|
496
|
+
imports.wbg.__wbg_fetch_509096533071c657 = function(arg0, arg1) {
|
|
516
497
|
const ret = arg0.fetch(arg1);
|
|
517
498
|
return ret;
|
|
518
499
|
};
|
|
@@ -520,7 +501,7 @@ function __wbg_get_imports() {
|
|
|
520
501
|
const ret = fetch(arg0);
|
|
521
502
|
return ret;
|
|
522
503
|
};
|
|
523
|
-
imports.wbg.
|
|
504
|
+
imports.wbg.__wbg_from_2a5d3e218e67aa85 = function(arg0) {
|
|
524
505
|
const ret = Array.from(arg0);
|
|
525
506
|
return ret;
|
|
526
507
|
};
|
|
@@ -541,31 +522,31 @@ function __wbg_get_imports() {
|
|
|
541
522
|
arg0.getRandomValues(arg1);
|
|
542
523
|
}, arguments);
|
|
543
524
|
};
|
|
544
|
-
imports.wbg.
|
|
525
|
+
imports.wbg.__wbg_getTime_46267b1c24877e30 = function(arg0) {
|
|
545
526
|
const ret = arg0.getTime();
|
|
546
527
|
return ret;
|
|
547
528
|
};
|
|
548
|
-
imports.wbg.
|
|
529
|
+
imports.wbg.__wbg_get_67b2ba62fc30de12 = function() {
|
|
549
530
|
return handleError(function(arg0, arg1) {
|
|
550
531
|
const ret = Reflect.get(arg0, arg1);
|
|
551
532
|
return ret;
|
|
552
533
|
}, arguments);
|
|
553
534
|
};
|
|
554
|
-
imports.wbg.
|
|
535
|
+
imports.wbg.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
|
|
555
536
|
const ret = arg0[arg1 >>> 0];
|
|
556
537
|
return ret;
|
|
557
538
|
};
|
|
558
|
-
imports.wbg.
|
|
539
|
+
imports.wbg.__wbg_has_a5ea9117f258a0ec = function() {
|
|
559
540
|
return handleError(function(arg0, arg1) {
|
|
560
541
|
const ret = Reflect.has(arg0, arg1);
|
|
561
542
|
return ret;
|
|
562
543
|
}, arguments);
|
|
563
544
|
};
|
|
564
|
-
imports.wbg.
|
|
545
|
+
imports.wbg.__wbg_headers_9cb51cfd2ac780a4 = function(arg0) {
|
|
565
546
|
const ret = arg0.headers;
|
|
566
547
|
return ret;
|
|
567
548
|
};
|
|
568
|
-
imports.wbg.
|
|
549
|
+
imports.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {
|
|
569
550
|
let result;
|
|
570
551
|
try {
|
|
571
552
|
result = arg0 instanceof ArrayBuffer;
|
|
@@ -575,7 +556,7 @@ function __wbg_get_imports() {
|
|
|
575
556
|
const ret = result;
|
|
576
557
|
return ret;
|
|
577
558
|
};
|
|
578
|
-
imports.wbg.
|
|
559
|
+
imports.wbg.__wbg_instanceof_Map_f3469ce2244d2430 = function(arg0) {
|
|
579
560
|
let result;
|
|
580
561
|
try {
|
|
581
562
|
result = arg0 instanceof Map;
|
|
@@ -585,7 +566,7 @@ function __wbg_get_imports() {
|
|
|
585
566
|
const ret = result;
|
|
586
567
|
return ret;
|
|
587
568
|
};
|
|
588
|
-
imports.wbg.
|
|
569
|
+
imports.wbg.__wbg_instanceof_Response_f2cc20d9f7dfd644 = function(arg0) {
|
|
589
570
|
let result;
|
|
590
571
|
try {
|
|
591
572
|
result = arg0 instanceof Response;
|
|
@@ -595,7 +576,7 @@ function __wbg_get_imports() {
|
|
|
595
576
|
const ret = result;
|
|
596
577
|
return ret;
|
|
597
578
|
};
|
|
598
|
-
imports.wbg.
|
|
579
|
+
imports.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function(arg0) {
|
|
599
580
|
let result;
|
|
600
581
|
try {
|
|
601
582
|
result = arg0 instanceof Uint8Array;
|
|
@@ -605,27 +586,27 @@ function __wbg_get_imports() {
|
|
|
605
586
|
const ret = result;
|
|
606
587
|
return ret;
|
|
607
588
|
};
|
|
608
|
-
imports.wbg.
|
|
589
|
+
imports.wbg.__wbg_isArray_a1eab7e0d067391b = function(arg0) {
|
|
609
590
|
const ret = Array.isArray(arg0);
|
|
610
591
|
return ret;
|
|
611
592
|
};
|
|
612
|
-
imports.wbg.
|
|
593
|
+
imports.wbg.__wbg_isSafeInteger_343e2beeeece1bb0 = function(arg0) {
|
|
613
594
|
const ret = Number.isSafeInteger(arg0);
|
|
614
595
|
return ret;
|
|
615
596
|
};
|
|
616
|
-
imports.wbg.
|
|
597
|
+
imports.wbg.__wbg_iterator_9a24c88df860dc65 = function() {
|
|
617
598
|
const ret = Symbol.iterator;
|
|
618
599
|
return ret;
|
|
619
600
|
};
|
|
620
|
-
imports.wbg.
|
|
601
|
+
imports.wbg.__wbg_keys_5c77a08ddc2fb8a6 = function(arg0) {
|
|
621
602
|
const ret = Object.keys(arg0);
|
|
622
603
|
return ret;
|
|
623
604
|
};
|
|
624
|
-
imports.wbg.
|
|
605
|
+
imports.wbg.__wbg_length_a446193dc22c12f8 = function(arg0) {
|
|
625
606
|
const ret = arg0.length;
|
|
626
607
|
return ret;
|
|
627
608
|
};
|
|
628
|
-
imports.wbg.
|
|
609
|
+
imports.wbg.__wbg_length_e2d2a49132c1b256 = function(arg0) {
|
|
629
610
|
const ret = arg0.length;
|
|
630
611
|
return ret;
|
|
631
612
|
};
|
|
@@ -637,42 +618,24 @@ function __wbg_get_imports() {
|
|
|
637
618
|
const ret = arg0.msCrypto;
|
|
638
619
|
return ret;
|
|
639
620
|
};
|
|
640
|
-
imports.wbg.
|
|
641
|
-
const ret = new Date();
|
|
621
|
+
imports.wbg.__wbg_new0_f788a2397c7ca929 = function() {
|
|
622
|
+
const ret = /* @__PURE__ */ new Date();
|
|
642
623
|
return ret;
|
|
643
624
|
};
|
|
644
|
-
imports.wbg.
|
|
625
|
+
imports.wbg.__wbg_new_018dcc2d6c8c2f6a = function() {
|
|
645
626
|
return handleError(function() {
|
|
646
627
|
const ret = new Headers();
|
|
647
628
|
return ret;
|
|
648
629
|
}, arguments);
|
|
649
630
|
};
|
|
650
|
-
imports.wbg.
|
|
651
|
-
const ret = new Object();
|
|
652
|
-
return ret;
|
|
653
|
-
};
|
|
654
|
-
imports.wbg.__wbg_new_56407f99198feff7 = function() {
|
|
655
|
-
const ret = /* @__PURE__ */ new Map();
|
|
656
|
-
return ret;
|
|
657
|
-
};
|
|
658
|
-
imports.wbg.__wbg_new_6a8b180049d9484e = function() {
|
|
659
|
-
return handleError(function() {
|
|
660
|
-
const ret = new AbortController();
|
|
661
|
-
return ret;
|
|
662
|
-
}, arguments);
|
|
663
|
-
};
|
|
664
|
-
imports.wbg.__wbg_new_9190433fb67ed635 = function(arg0) {
|
|
665
|
-
const ret = new Uint8Array(arg0);
|
|
666
|
-
return ret;
|
|
667
|
-
};
|
|
668
|
-
imports.wbg.__wbg_new_d5e3800b120e37e1 = function(arg0, arg1) {
|
|
631
|
+
imports.wbg.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
|
|
669
632
|
try {
|
|
670
633
|
var state0 = { a: arg0, b: arg1 };
|
|
671
634
|
var cb0 = /* @__PURE__ */ __name((arg02, arg12) => {
|
|
672
635
|
const a = state0.a;
|
|
673
636
|
state0.a = 0;
|
|
674
637
|
try {
|
|
675
|
-
return
|
|
638
|
+
return __wbg_adapter_222(a, state0.b, arg02, arg12);
|
|
676
639
|
} finally {
|
|
677
640
|
state0.a = a;
|
|
678
641
|
}
|
|
@@ -683,43 +646,61 @@ function __wbg_get_imports() {
|
|
|
683
646
|
state0.a = state0.b = 0;
|
|
684
647
|
}
|
|
685
648
|
};
|
|
686
|
-
imports.wbg.
|
|
649
|
+
imports.wbg.__wbg_new_405e22f390576ce2 = function() {
|
|
650
|
+
const ret = new Object();
|
|
651
|
+
return ret;
|
|
652
|
+
};
|
|
653
|
+
imports.wbg.__wbg_new_5e0be73521bc8c17 = function() {
|
|
654
|
+
const ret = /* @__PURE__ */ new Map();
|
|
655
|
+
return ret;
|
|
656
|
+
};
|
|
657
|
+
imports.wbg.__wbg_new_78feb108b6472713 = function() {
|
|
687
658
|
const ret = new Array();
|
|
688
659
|
return ret;
|
|
689
660
|
};
|
|
690
|
-
imports.wbg.
|
|
691
|
-
const ret = new Uint8Array(
|
|
661
|
+
imports.wbg.__wbg_new_a12002a7f91c75be = function(arg0) {
|
|
662
|
+
const ret = new Uint8Array(arg0);
|
|
692
663
|
return ret;
|
|
693
664
|
};
|
|
694
|
-
imports.wbg.
|
|
665
|
+
imports.wbg.__wbg_new_e25e5aab09ff45db = function() {
|
|
666
|
+
return handleError(function() {
|
|
667
|
+
const ret = new AbortController();
|
|
668
|
+
return ret;
|
|
669
|
+
}, arguments);
|
|
670
|
+
};
|
|
671
|
+
imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
|
|
695
672
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
696
673
|
return ret;
|
|
697
674
|
};
|
|
698
|
-
imports.wbg.
|
|
675
|
+
imports.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(arg0, arg1, arg2) {
|
|
676
|
+
const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
|
|
677
|
+
return ret;
|
|
678
|
+
};
|
|
679
|
+
imports.wbg.__wbg_newwithlength_a381634e90c276d4 = function(arg0) {
|
|
699
680
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
700
681
|
return ret;
|
|
701
682
|
};
|
|
702
|
-
imports.wbg.
|
|
683
|
+
imports.wbg.__wbg_newwithstrandinit_06c535e0a867c635 = function() {
|
|
703
684
|
return handleError(function(arg0, arg1, arg2) {
|
|
704
685
|
const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
|
|
705
686
|
return ret;
|
|
706
687
|
}, arguments);
|
|
707
688
|
};
|
|
708
|
-
imports.wbg.
|
|
689
|
+
imports.wbg.__wbg_next_25feadfc0913fea9 = function(arg0) {
|
|
690
|
+
const ret = arg0.next;
|
|
691
|
+
return ret;
|
|
692
|
+
};
|
|
693
|
+
imports.wbg.__wbg_next_6574e1a8a62d1055 = function() {
|
|
709
694
|
return handleError(function(arg0) {
|
|
710
695
|
const ret = arg0.next();
|
|
711
696
|
return ret;
|
|
712
697
|
}, arguments);
|
|
713
698
|
};
|
|
714
|
-
imports.wbg.__wbg_next_3de8f2669431a3ff = function(arg0) {
|
|
715
|
-
const ret = arg0.next;
|
|
716
|
-
return ret;
|
|
717
|
-
};
|
|
718
699
|
imports.wbg.__wbg_node_905d3e251edff8a2 = function(arg0) {
|
|
719
700
|
const ret = arg0.node;
|
|
720
701
|
return ret;
|
|
721
702
|
};
|
|
722
|
-
imports.wbg.
|
|
703
|
+
imports.wbg.__wbg_now_d18023d54d4e5500 = function(arg0) {
|
|
723
704
|
const ret = arg0.now();
|
|
724
705
|
return ret;
|
|
725
706
|
};
|
|
@@ -727,20 +708,17 @@ function __wbg_get_imports() {
|
|
|
727
708
|
const ret = arg0.process;
|
|
728
709
|
return ret;
|
|
729
710
|
};
|
|
730
|
-
imports.wbg.
|
|
731
|
-
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
732
|
-
};
|
|
733
|
-
imports.wbg.__wbg_push_cd3ac7d5b094565d = function(arg0, arg1) {
|
|
711
|
+
imports.wbg.__wbg_push_737cfc8c1432c2c6 = function(arg0, arg1) {
|
|
734
712
|
const ret = arg0.push(arg1);
|
|
735
713
|
return ret;
|
|
736
714
|
};
|
|
737
|
-
imports.wbg.
|
|
715
|
+
imports.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function(arg0) {
|
|
716
|
+
queueMicrotask(arg0);
|
|
717
|
+
};
|
|
718
|
+
imports.wbg.__wbg_queueMicrotask_d3219def82552485 = function(arg0) {
|
|
738
719
|
const ret = arg0.queueMicrotask;
|
|
739
720
|
return ret;
|
|
740
721
|
};
|
|
741
|
-
imports.wbg.__wbg_queueMicrotask_f24a794d09c42640 = function(arg0) {
|
|
742
|
-
queueMicrotask(arg0);
|
|
743
|
-
};
|
|
744
722
|
imports.wbg.__wbg_randomFillSync_994ac6d9ade7a695 = function(arg0, arg1, arg2) {
|
|
745
723
|
arg0.randomFillSync(getArrayU8FromWasm0(arg1, arg2));
|
|
746
724
|
};
|
|
@@ -759,7 +737,7 @@ function __wbg_get_imports() {
|
|
|
759
737
|
return ret;
|
|
760
738
|
}, arguments);
|
|
761
739
|
};
|
|
762
|
-
imports.wbg.
|
|
740
|
+
imports.wbg.__wbg_resolve_4851785c9c5f573d = function(arg0) {
|
|
763
741
|
const ret = Promise.resolve(arg0);
|
|
764
742
|
return ret;
|
|
765
743
|
};
|
|
@@ -769,52 +747,52 @@ function __wbg_get_imports() {
|
|
|
769
747
|
return ret;
|
|
770
748
|
}, arguments);
|
|
771
749
|
};
|
|
772
|
-
imports.wbg.
|
|
773
|
-
arg0
|
|
774
|
-
};
|
|
775
|
-
imports.wbg.__wbg_set_31197016f65a6a19 = function(arg0, arg1, arg2) {
|
|
776
|
-
const ret = arg0.set(arg1, arg2);
|
|
777
|
-
return ret;
|
|
750
|
+
imports.wbg.__wbg_set_37837023f3d740e8 = function(arg0, arg1, arg2) {
|
|
751
|
+
arg0[arg1 >>> 0] = arg2;
|
|
778
752
|
};
|
|
779
753
|
imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
780
754
|
arg0[arg1] = arg2;
|
|
781
755
|
};
|
|
782
|
-
imports.wbg.
|
|
756
|
+
imports.wbg.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
|
|
757
|
+
arg0.set(arg1, arg2 >>> 0);
|
|
758
|
+
};
|
|
759
|
+
imports.wbg.__wbg_set_8fc6bf8a5b1071d1 = function(arg0, arg1, arg2) {
|
|
760
|
+
const ret = arg0.set(arg1, arg2);
|
|
761
|
+
return ret;
|
|
762
|
+
};
|
|
763
|
+
imports.wbg.__wbg_set_bb8cecf6a62b9f46 = function() {
|
|
783
764
|
return handleError(function(arg0, arg1, arg2) {
|
|
784
765
|
const ret = Reflect.set(arg0, arg1, arg2);
|
|
785
766
|
return ret;
|
|
786
767
|
}, arguments);
|
|
787
768
|
};
|
|
788
|
-
imports.wbg.
|
|
789
|
-
arg0[arg1 >>> 0] = arg2;
|
|
790
|
-
};
|
|
791
|
-
imports.wbg.__wbg_setbody_e324371c31597f2a = function(arg0, arg1) {
|
|
769
|
+
imports.wbg.__wbg_setbody_5923b78a95eedf29 = function(arg0, arg1) {
|
|
792
770
|
arg0.body = arg1;
|
|
793
771
|
};
|
|
794
|
-
imports.wbg.
|
|
772
|
+
imports.wbg.__wbg_setcredentials_c3a22f1cd105a2c6 = function(arg0, arg1) {
|
|
795
773
|
arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
796
774
|
};
|
|
797
|
-
imports.wbg.
|
|
775
|
+
imports.wbg.__wbg_setheaders_834c0bdb6a8949ad = function(arg0, arg1) {
|
|
798
776
|
arg0.headers = arg1;
|
|
799
777
|
};
|
|
800
|
-
imports.wbg.
|
|
778
|
+
imports.wbg.__wbg_setmethod_3c5280fe5d890842 = function(arg0, arg1, arg2) {
|
|
801
779
|
arg0.method = getStringFromWasm0(arg1, arg2);
|
|
802
780
|
};
|
|
803
|
-
imports.wbg.
|
|
781
|
+
imports.wbg.__wbg_setmode_5dc300b865044b65 = function(arg0, arg1) {
|
|
804
782
|
arg0.mode = __wbindgen_enum_RequestMode[arg1];
|
|
805
783
|
};
|
|
806
|
-
imports.wbg.
|
|
784
|
+
imports.wbg.__wbg_setsignal_75b21ef3a81de905 = function(arg0, arg1) {
|
|
807
785
|
arg0.signal = arg1;
|
|
808
786
|
};
|
|
809
|
-
imports.wbg.
|
|
787
|
+
imports.wbg.__wbg_signal_aaf9ad74119f20a4 = function(arg0) {
|
|
810
788
|
const ret = arg0.signal;
|
|
811
789
|
return ret;
|
|
812
790
|
};
|
|
813
|
-
imports.wbg.
|
|
791
|
+
imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
|
|
814
792
|
const ret = typeof global === "undefined" ? null : global;
|
|
815
793
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
816
794
|
};
|
|
817
|
-
imports.wbg.
|
|
795
|
+
imports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
|
|
818
796
|
const ret = typeof globalThis === "undefined" ? null : globalThis;
|
|
819
797
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
820
798
|
};
|
|
@@ -822,44 +800,44 @@ function __wbg_get_imports() {
|
|
|
822
800
|
const ret = module;
|
|
823
801
|
return ret;
|
|
824
802
|
};
|
|
825
|
-
imports.wbg.
|
|
803
|
+
imports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
|
|
826
804
|
const ret = typeof self === "undefined" ? null : self;
|
|
827
805
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
828
806
|
};
|
|
829
|
-
imports.wbg.
|
|
807
|
+
imports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
|
|
830
808
|
const ret = typeof window === "undefined" ? null : window;
|
|
831
809
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
832
810
|
};
|
|
833
|
-
imports.wbg.
|
|
811
|
+
imports.wbg.__wbg_status_f6360336ca686bf0 = function(arg0) {
|
|
834
812
|
const ret = arg0.status;
|
|
835
813
|
return ret;
|
|
836
814
|
};
|
|
837
|
-
imports.wbg.
|
|
815
|
+
imports.wbg.__wbg_stringify_f7ed6987935b4a24 = function() {
|
|
838
816
|
return handleError(function(arg0) {
|
|
839
817
|
const ret = JSON.stringify(arg0);
|
|
840
818
|
return ret;
|
|
841
819
|
}, arguments);
|
|
842
820
|
};
|
|
843
|
-
imports.wbg.
|
|
821
|
+
imports.wbg.__wbg_subarray_aa9065fa9dc5df96 = function(arg0, arg1, arg2) {
|
|
844
822
|
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
845
823
|
return ret;
|
|
846
824
|
};
|
|
847
|
-
imports.wbg.
|
|
848
|
-
const ret = arg0.then(arg1
|
|
825
|
+
imports.wbg.__wbg_then_44b73946d2fb3e7d = function(arg0, arg1) {
|
|
826
|
+
const ret = arg0.then(arg1);
|
|
849
827
|
return ret;
|
|
850
828
|
};
|
|
851
|
-
imports.wbg.
|
|
852
|
-
const ret = arg0.then(arg1);
|
|
829
|
+
imports.wbg.__wbg_then_48b406749878a531 = function(arg0, arg1, arg2) {
|
|
830
|
+
const ret = arg0.then(arg1, arg2);
|
|
853
831
|
return ret;
|
|
854
832
|
};
|
|
855
|
-
imports.wbg.
|
|
833
|
+
imports.wbg.__wbg_url_ae10c34ca209681d = function(arg0, arg1) {
|
|
856
834
|
const ret = arg1.url;
|
|
857
835
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
858
836
|
const len1 = WASM_VECTOR_LEN;
|
|
859
837
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
860
838
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
861
839
|
};
|
|
862
|
-
imports.wbg.
|
|
840
|
+
imports.wbg.__wbg_value_cd1ffa7b1ab794f1 = function(arg0) {
|
|
863
841
|
const ret = arg0.value;
|
|
864
842
|
return ret;
|
|
865
843
|
};
|
|
@@ -867,18 +845,30 @@ function __wbg_get_imports() {
|
|
|
867
845
|
const ret = arg0.versions;
|
|
868
846
|
return ret;
|
|
869
847
|
};
|
|
870
|
-
imports.wbg.
|
|
848
|
+
imports.wbg.__wbindgen_bigint_from_i128 = function(arg0, arg1) {
|
|
849
|
+
const ret = arg0 << BigInt(64) | BigInt.asUintN(64, arg1);
|
|
850
|
+
return ret;
|
|
851
|
+
};
|
|
852
|
+
imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
|
|
853
|
+
const ret = arg0;
|
|
854
|
+
return ret;
|
|
855
|
+
};
|
|
856
|
+
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
857
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
858
|
+
return ret;
|
|
859
|
+
};
|
|
860
|
+
imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
|
|
871
861
|
const v = arg1;
|
|
872
862
|
const ret = typeof v === "bigint" ? v : void 0;
|
|
873
863
|
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
874
864
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
875
865
|
};
|
|
876
|
-
imports.wbg.
|
|
866
|
+
imports.wbg.__wbindgen_boolean_get = function(arg0) {
|
|
877
867
|
const v = arg0;
|
|
878
|
-
const ret = typeof v === "boolean" ? v :
|
|
879
|
-
return
|
|
868
|
+
const ret = typeof v === "boolean" ? v ? 1 : 0 : 2;
|
|
869
|
+
return ret;
|
|
880
870
|
};
|
|
881
|
-
imports.wbg.
|
|
871
|
+
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
882
872
|
const obj = arg0.original;
|
|
883
873
|
if (obj.cnt-- == 1) {
|
|
884
874
|
obj.a = 0;
|
|
@@ -887,57 +877,83 @@ function __wbg_get_imports() {
|
|
|
887
877
|
const ret = false;
|
|
888
878
|
return ret;
|
|
889
879
|
};
|
|
890
|
-
imports.wbg.
|
|
880
|
+
imports.wbg.__wbindgen_closure_wrapper12250 = function(arg0, arg1, arg2) {
|
|
881
|
+
const ret = makeMutClosure(arg0, arg1, 4185, __wbg_adapter_54);
|
|
882
|
+
return ret;
|
|
883
|
+
};
|
|
884
|
+
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
891
885
|
const ret = debugString(arg1);
|
|
892
886
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
893
887
|
const len1 = WASM_VECTOR_LEN;
|
|
894
888
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
895
889
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
896
890
|
};
|
|
897
|
-
imports.wbg.
|
|
891
|
+
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
892
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
893
|
+
return ret;
|
|
894
|
+
};
|
|
895
|
+
imports.wbg.__wbindgen_in = function(arg0, arg1) {
|
|
898
896
|
const ret = arg0 in arg1;
|
|
899
897
|
return ret;
|
|
900
898
|
};
|
|
901
|
-
imports.wbg.
|
|
899
|
+
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
900
|
+
const table = wasm.__wbindgen_export_4;
|
|
901
|
+
const offset = table.grow(4);
|
|
902
|
+
table.set(0, void 0);
|
|
903
|
+
table.set(offset + 0, void 0);
|
|
904
|
+
table.set(offset + 1, null);
|
|
905
|
+
table.set(offset + 2, true);
|
|
906
|
+
table.set(offset + 3, false);
|
|
907
|
+
;
|
|
908
|
+
};
|
|
909
|
+
imports.wbg.__wbindgen_is_bigint = function(arg0) {
|
|
902
910
|
const ret = typeof arg0 === "bigint";
|
|
903
911
|
return ret;
|
|
904
912
|
};
|
|
905
|
-
imports.wbg.
|
|
913
|
+
imports.wbg.__wbindgen_is_function = function(arg0) {
|
|
906
914
|
const ret = typeof arg0 === "function";
|
|
907
915
|
return ret;
|
|
908
916
|
};
|
|
909
|
-
imports.wbg.
|
|
917
|
+
imports.wbg.__wbindgen_is_null = function(arg0) {
|
|
910
918
|
const ret = arg0 === null;
|
|
911
919
|
return ret;
|
|
912
920
|
};
|
|
913
|
-
imports.wbg.
|
|
921
|
+
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
914
922
|
const val = arg0;
|
|
915
923
|
const ret = typeof val === "object" && val !== null;
|
|
916
924
|
return ret;
|
|
917
925
|
};
|
|
918
|
-
imports.wbg.
|
|
926
|
+
imports.wbg.__wbindgen_is_string = function(arg0) {
|
|
919
927
|
const ret = typeof arg0 === "string";
|
|
920
928
|
return ret;
|
|
921
929
|
};
|
|
922
|
-
imports.wbg.
|
|
930
|
+
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
923
931
|
const ret = arg0 === void 0;
|
|
924
932
|
return ret;
|
|
925
933
|
};
|
|
926
|
-
imports.wbg.
|
|
934
|
+
imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
|
|
927
935
|
const ret = arg0 === arg1;
|
|
928
936
|
return ret;
|
|
929
937
|
};
|
|
930
|
-
imports.wbg.
|
|
938
|
+
imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
931
939
|
const ret = arg0 == arg1;
|
|
932
940
|
return ret;
|
|
933
941
|
};
|
|
934
|
-
imports.wbg.
|
|
942
|
+
imports.wbg.__wbindgen_memory = function() {
|
|
943
|
+
const ret = wasm.memory;
|
|
944
|
+
return ret;
|
|
945
|
+
};
|
|
946
|
+
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
935
947
|
const obj = arg1;
|
|
936
948
|
const ret = typeof obj === "number" ? obj : void 0;
|
|
937
949
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
938
950
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
939
951
|
};
|
|
940
|
-
imports.wbg.
|
|
952
|
+
imports.wbg.__wbindgen_number_new = function(arg0) {
|
|
953
|
+
const ret = arg0;
|
|
954
|
+
return ret;
|
|
955
|
+
};
|
|
956
|
+
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
941
957
|
const obj = arg1;
|
|
942
958
|
const ret = typeof obj === "string" ? obj : void 0;
|
|
943
959
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -945,46 +961,12 @@ function __wbg_get_imports() {
|
|
|
945
961
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
946
962
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
947
963
|
};
|
|
948
|
-
imports.wbg.
|
|
949
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
950
|
-
};
|
|
951
|
-
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
964
|
+
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
952
965
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
953
966
|
return ret;
|
|
954
967
|
};
|
|
955
|
-
imports.wbg.
|
|
956
|
-
|
|
957
|
-
return ret;
|
|
958
|
-
};
|
|
959
|
-
imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
960
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
961
|
-
return ret;
|
|
962
|
-
};
|
|
963
|
-
imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
|
|
964
|
-
const ret = arg0;
|
|
965
|
-
return ret;
|
|
966
|
-
};
|
|
967
|
-
imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
|
|
968
|
-
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
969
|
-
return ret;
|
|
970
|
-
};
|
|
971
|
-
imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
972
|
-
const ret = arg0;
|
|
973
|
-
return ret;
|
|
974
|
-
};
|
|
975
|
-
imports.wbg.__wbindgen_cast_f7331b0818e1ba43 = function(arg0, arg1) {
|
|
976
|
-
const ret = makeMutClosure(arg0, arg1, 4201, __wbg_adapter_10);
|
|
977
|
-
return ret;
|
|
978
|
-
};
|
|
979
|
-
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
980
|
-
const table = wasm.__wbindgen_export_4;
|
|
981
|
-
const offset = table.grow(4);
|
|
982
|
-
table.set(0, void 0);
|
|
983
|
-
table.set(offset + 0, void 0);
|
|
984
|
-
table.set(offset + 1, null);
|
|
985
|
-
table.set(offset + 2, true);
|
|
986
|
-
table.set(offset + 3, false);
|
|
987
|
-
;
|
|
968
|
+
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
969
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
988
970
|
};
|
|
989
971
|
return imports;
|
|
990
972
|
}
|
|
@@ -1002,8 +984,7 @@ function __wbg_finalize_init(instance, module2) {
|
|
|
1002
984
|
}
|
|
1003
985
|
__name(__wbg_finalize_init, "__wbg_finalize_init");
|
|
1004
986
|
async function __wbg_init(module_or_path) {
|
|
1005
|
-
if (wasm !== void 0)
|
|
1006
|
-
return wasm;
|
|
987
|
+
if (wasm !== void 0) return wasm;
|
|
1007
988
|
if (typeof module_or_path !== "undefined") {
|
|
1008
989
|
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
1009
990
|
({ module_or_path } = module_or_path);
|
|
@@ -1028,11 +1009,9 @@ var didkit_wasm_default = __wbg_init;
|
|
|
1028
1009
|
// src/didkit/index.ts
|
|
1029
1010
|
var initialized = false;
|
|
1030
1011
|
var generating = false;
|
|
1031
|
-
var init = /* @__PURE__ */ __name(async (arg = "https://cdn.filestackcontent.com/
|
|
1032
|
-
while (generating)
|
|
1033
|
-
|
|
1034
|
-
if (initialized)
|
|
1035
|
-
return;
|
|
1012
|
+
var init = /* @__PURE__ */ __name(async (arg = "https://cdn.filestackcontent.com/HReKwBTm2Wha4Wlo4uwe") => {
|
|
1013
|
+
while (generating) await new Promise((res) => setTimeout(res, 250));
|
|
1014
|
+
if (initialized) return;
|
|
1036
1015
|
try {
|
|
1037
1016
|
generating = true;
|
|
1038
1017
|
await didkit_wasm_default({ module_or_path: arg });
|
|
@@ -1049,13 +1028,10 @@ var didkit_default = init;
|
|
|
1049
1028
|
var getContextURIs = /* @__PURE__ */ __name((jsonld) => {
|
|
1050
1029
|
const contexts = [];
|
|
1051
1030
|
const traverse = /* @__PURE__ */ __name((obj) => {
|
|
1052
|
-
if (typeof obj !== "object" || obj === null)
|
|
1053
|
-
return;
|
|
1031
|
+
if (typeof obj !== "object" || obj === null) return;
|
|
1054
1032
|
if (obj["@context"]) {
|
|
1055
|
-
if (Array.isArray(obj["@context"]))
|
|
1056
|
-
|
|
1057
|
-
else
|
|
1058
|
-
contexts.push(obj["@context"]);
|
|
1033
|
+
if (Array.isArray(obj["@context"])) contexts.push(...obj["@context"]);
|
|
1034
|
+
else contexts.push(obj["@context"]);
|
|
1059
1035
|
}
|
|
1060
1036
|
Object.keys(obj).forEach((key) => {
|
|
1061
1037
|
traverse(obj[key]);
|
|
@@ -1071,8 +1047,7 @@ var getDocumentMap = /* @__PURE__ */ __name(async (learnCard, obj, allowRemoteCo
|
|
|
1071
1047
|
);
|
|
1072
1048
|
return uris.reduce((acc, cur, index) => {
|
|
1073
1049
|
const resolvedDoc = resolvedDocs[index];
|
|
1074
|
-
if (resolvedDoc)
|
|
1075
|
-
acc[cur] = JSON.stringify(resolvedDoc);
|
|
1050
|
+
if (resolvedDoc) acc[cur] = JSON.stringify(resolvedDoc);
|
|
1076
1051
|
return acc;
|
|
1077
1052
|
}, {});
|
|
1078
1053
|
}, "getDocumentMap");
|
|
@@ -1086,24 +1061,24 @@ var getDidKitPlugin = /* @__PURE__ */ __name(async (input, allowRemoteContexts =
|
|
|
1086
1061
|
displayName: "DIDKit",
|
|
1087
1062
|
description: "Provides an interface to DIDKit, which allows for the generation of key material, as well as signing and verifying credentials and presentations",
|
|
1088
1063
|
context: {
|
|
1089
|
-
resolveStaticDocument: async (_learnCard, url) => {
|
|
1064
|
+
resolveStaticDocument: /* @__PURE__ */ __name(async (_learnCard, url) => {
|
|
1090
1065
|
try {
|
|
1091
1066
|
return JSON.parse(await contextLoader(url) ?? "") || void 0;
|
|
1092
1067
|
} catch (error) {
|
|
1093
1068
|
_learnCard.debug?.(error);
|
|
1094
1069
|
return void 0;
|
|
1095
1070
|
}
|
|
1096
|
-
}
|
|
1071
|
+
}, "resolveStaticDocument")
|
|
1097
1072
|
},
|
|
1098
1073
|
methods: {
|
|
1099
|
-
generateEd25519KeyFromBytes: (_learnCard, bytes) => JSON.parse(generateEd25519KeyFromBytes(bytes)),
|
|
1100
|
-
generateSecp256k1KeyFromBytes: (_learnCard, bytes) => JSON.parse(generateSecp256k1KeyFromBytes(bytes)),
|
|
1101
|
-
keyToDid: (_learnCard, type, keypair) => {
|
|
1074
|
+
generateEd25519KeyFromBytes: /* @__PURE__ */ __name((_learnCard, bytes) => JSON.parse(generateEd25519KeyFromBytes(bytes)), "generateEd25519KeyFromBytes"),
|
|
1075
|
+
generateSecp256k1KeyFromBytes: /* @__PURE__ */ __name((_learnCard, bytes) => JSON.parse(generateSecp256k1KeyFromBytes(bytes)), "generateSecp256k1KeyFromBytes"),
|
|
1076
|
+
keyToDid: /* @__PURE__ */ __name((_learnCard, type, keypair) => {
|
|
1102
1077
|
return keyToDID(type, JSON.stringify(keypair));
|
|
1103
|
-
},
|
|
1104
|
-
keyToVerificationMethod: async (_learnCard, type, keypair) => keyToVerificationMethod(type, JSON.stringify(keypair)),
|
|
1105
|
-
didToVerificationMethod: async (_learnCard, did) => didToVerificationMethod(did),
|
|
1106
|
-
issueCredential: async (_learnCard, credential, options, keypair) => {
|
|
1078
|
+
}, "keyToDid"),
|
|
1079
|
+
keyToVerificationMethod: /* @__PURE__ */ __name(async (_learnCard, type, keypair) => keyToVerificationMethod(type, JSON.stringify(keypair)), "keyToVerificationMethod"),
|
|
1080
|
+
didToVerificationMethod: /* @__PURE__ */ __name(async (_learnCard, did) => didToVerificationMethod(did), "didToVerificationMethod"),
|
|
1081
|
+
issueCredential: /* @__PURE__ */ __name(async (_learnCard, credential, options, keypair) => {
|
|
1107
1082
|
return JSON.parse(
|
|
1108
1083
|
await issueCredential(
|
|
1109
1084
|
JSON.stringify(credential),
|
|
@@ -1114,8 +1089,8 @@ var getDidKitPlugin = /* @__PURE__ */ __name(async (input, allowRemoteContexts =
|
|
|
1114
1089
|
)
|
|
1115
1090
|
)
|
|
1116
1091
|
);
|
|
1117
|
-
},
|
|
1118
|
-
verifyCredential: async (_learnCard, credential, options = {}) => {
|
|
1092
|
+
}, "issueCredential"),
|
|
1093
|
+
verifyCredential: /* @__PURE__ */ __name(async (_learnCard, credential, options = {}) => {
|
|
1119
1094
|
return JSON.parse(
|
|
1120
1095
|
await verifyCredential(
|
|
1121
1096
|
JSON.stringify(credential),
|
|
@@ -1125,8 +1100,8 @@ var getDidKitPlugin = /* @__PURE__ */ __name(async (input, allowRemoteContexts =
|
|
|
1125
1100
|
)
|
|
1126
1101
|
)
|
|
1127
1102
|
);
|
|
1128
|
-
},
|
|
1129
|
-
issuePresentation: async (_learnCard, presentation, options, keypair) => {
|
|
1103
|
+
}, "verifyCredential"),
|
|
1104
|
+
issuePresentation: /* @__PURE__ */ __name(async (_learnCard, presentation, options, keypair) => {
|
|
1130
1105
|
const isJwt = options.proofFormat === "jwt";
|
|
1131
1106
|
const result = await issuePresentation(
|
|
1132
1107
|
JSON.stringify(presentation),
|
|
@@ -1137,8 +1112,8 @@ var getDidKitPlugin = /* @__PURE__ */ __name(async (input, allowRemoteContexts =
|
|
|
1137
1112
|
)
|
|
1138
1113
|
);
|
|
1139
1114
|
return isJwt ? result : JSON.parse(result);
|
|
1140
|
-
},
|
|
1141
|
-
verifyPresentation: async (_learnCard, presentation, options = {}) => {
|
|
1115
|
+
}, "issuePresentation"),
|
|
1116
|
+
verifyPresentation: /* @__PURE__ */ __name(async (_learnCard, presentation, options = {}) => {
|
|
1142
1117
|
const isJwt = typeof presentation === "string";
|
|
1143
1118
|
return JSON.parse(
|
|
1144
1119
|
await verifyPresentation(
|
|
@@ -1153,38 +1128,33 @@ var getDidKitPlugin = /* @__PURE__ */ __name(async (input, allowRemoteContexts =
|
|
|
1153
1128
|
)
|
|
1154
1129
|
)
|
|
1155
1130
|
);
|
|
1156
|
-
},
|
|
1157
|
-
contextLoader: async (_learnCard, url) => {
|
|
1131
|
+
}, "verifyPresentation"),
|
|
1132
|
+
contextLoader: /* @__PURE__ */ __name(async (_learnCard, url) => {
|
|
1158
1133
|
try {
|
|
1159
1134
|
return JSON.parse(await contextLoader(url) ?? "") || void 0;
|
|
1160
1135
|
} catch (error) {
|
|
1161
1136
|
_learnCard.debug?.(error);
|
|
1162
1137
|
return void 0;
|
|
1163
1138
|
}
|
|
1164
|
-
},
|
|
1165
|
-
resolveDid: async (_learnCard, did, inputMetadata = {}) => JSON.parse(await resolveDID(did, JSON.stringify(inputMetadata))),
|
|
1166
|
-
didResolver: async (_learnCard, did, inputMetadata = {}) => JSON.parse(await didResolver(did, JSON.stringify(inputMetadata))),
|
|
1167
|
-
createJwe: async (_learnCard, cleartext, recipients) => JSON.parse(await createJwe(cleartext, recipients)),
|
|
1168
|
-
decryptJwe: async (_learnCard, jwe, jwks) => decryptJwe(
|
|
1139
|
+
}, "contextLoader"),
|
|
1140
|
+
resolveDid: /* @__PURE__ */ __name(async (_learnCard, did, inputMetadata = {}) => JSON.parse(await resolveDID(did, JSON.stringify(inputMetadata))), "resolveDid"),
|
|
1141
|
+
didResolver: /* @__PURE__ */ __name(async (_learnCard, did, inputMetadata = {}) => JSON.parse(await didResolver(did, JSON.stringify(inputMetadata))), "didResolver"),
|
|
1142
|
+
createJwe: /* @__PURE__ */ __name(async (_learnCard, cleartext, recipients) => JSON.parse(await createJwe(cleartext, recipients)), "createJwe"),
|
|
1143
|
+
decryptJwe: /* @__PURE__ */ __name(async (_learnCard, jwe, jwks) => decryptJwe(
|
|
1169
1144
|
JSON.stringify(jwe),
|
|
1170
1145
|
jwks.map((jwk) => JSON.stringify(jwk))
|
|
1171
|
-
),
|
|
1172
|
-
createDagJwe: async (_learnCard, cleartext, recipients) => JSON.parse(await createDagJwe(cleartext, recipients)),
|
|
1173
|
-
decryptDagJwe: async (_learnCard, jwe, jwks) => {
|
|
1146
|
+
), "decryptJwe"),
|
|
1147
|
+
createDagJwe: /* @__PURE__ */ __name(async (_learnCard, cleartext, recipients) => JSON.parse(await createDagJwe(cleartext, recipients)), "createDagJwe"),
|
|
1148
|
+
decryptDagJwe: /* @__PURE__ */ __name(async (_learnCard, jwe, jwks) => {
|
|
1174
1149
|
const convertBigIntsToNumbers = /* @__PURE__ */ __name((obj) => {
|
|
1175
|
-
if (obj === null || obj === void 0)
|
|
1176
|
-
|
|
1177
|
-
if (
|
|
1178
|
-
|
|
1179
|
-
if (Array.isArray(obj))
|
|
1180
|
-
return obj.map(convertBigIntsToNumbers);
|
|
1181
|
-
if (typeof obj !== "object")
|
|
1182
|
-
return obj;
|
|
1150
|
+
if (obj === null || obj === void 0) return obj;
|
|
1151
|
+
if (typeof obj === "bigint") return Number(obj);
|
|
1152
|
+
if (Array.isArray(obj)) return obj.map(convertBigIntsToNumbers);
|
|
1153
|
+
if (typeof obj !== "object") return obj;
|
|
1183
1154
|
const hasNestedObjects = Object.values(obj).some(
|
|
1184
1155
|
(val) => typeof val === "bigint" || typeof val === "object" && val !== null
|
|
1185
1156
|
);
|
|
1186
|
-
if (!hasNestedObjects)
|
|
1187
|
-
return obj;
|
|
1157
|
+
if (!hasNestedObjects) return obj;
|
|
1188
1158
|
const result = {};
|
|
1189
1159
|
for (const key in obj) {
|
|
1190
1160
|
result[key] = convertBigIntsToNumbers(obj[key]);
|
|
@@ -1197,10 +1167,10 @@ var getDidKitPlugin = /* @__PURE__ */ __name(async (input, allowRemoteContexts =
|
|
|
1197
1167
|
jwks.map((jwk) => JSON.stringify(jwk))
|
|
1198
1168
|
)
|
|
1199
1169
|
);
|
|
1200
|
-
},
|
|
1201
|
-
clearDidWebCache: async () => {
|
|
1170
|
+
}, "decryptDagJwe"),
|
|
1171
|
+
clearDidWebCache: /* @__PURE__ */ __name(async () => {
|
|
1202
1172
|
await clearCache();
|
|
1203
|
-
}
|
|
1173
|
+
}, "clearDidWebCache")
|
|
1204
1174
|
}
|
|
1205
1175
|
};
|
|
1206
1176
|
}, "getDidKitPlugin");
|