@contentauth/c2pa-web 0.12.1 → 0.12.3
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/{c2pa-Sp6ssDto.js → c2pa-LNRKNp10.js} +85 -85
- package/dist/c2pa_worker.js +137 -132
- package/dist/index.js +1 -1
- package/dist/inline.js +5 -5
- package/dist/resources/c2pa_bg.wasm +0 -0
- package/package.json +3 -3
package/dist/c2pa_worker.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var C = (r, e) => () => (e || r((e = { exports: {} }).exports, e), e.exports);
|
|
2
|
+
var ie = C((ue, q) => {
|
|
3
3
|
class h {
|
|
4
4
|
static __wrap(e) {
|
|
5
5
|
const t = Object.create(h.prototype);
|
|
@@ -30,7 +30,7 @@ var se = V((ue, C) => {
|
|
|
30
30
|
* @param {string} json
|
|
31
31
|
*/
|
|
32
32
|
addIngredient(e) {
|
|
33
|
-
const t =
|
|
33
|
+
const t = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n = u, _ = o.wasmbuilder_addIngredient(this.__wbg_ptr, t, n);
|
|
34
34
|
if (_[1])
|
|
35
35
|
throw d(_[0]);
|
|
36
36
|
}
|
|
@@ -47,8 +47,8 @@ var se = V((ue, C) => {
|
|
|
47
47
|
* @returns {Promise<void>}
|
|
48
48
|
*/
|
|
49
49
|
addIngredientFromBlob(e, t, n) {
|
|
50
|
-
const _ =
|
|
51
|
-
return o.wasmbuilder_addIngredientFromBlob(this.__wbg_ptr, _, c,
|
|
50
|
+
const _ = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), c = u, s = f(t, o.__wbindgen_malloc, o.__wbindgen_realloc), i = u;
|
|
51
|
+
return o.wasmbuilder_addIngredientFromBlob(this.__wbg_ptr, _, c, s, i, n);
|
|
52
52
|
}
|
|
53
53
|
/**
|
|
54
54
|
* Add a redaction for a JUMBF URI with the given reason.
|
|
@@ -59,7 +59,7 @@ var se = V((ue, C) => {
|
|
|
59
59
|
* @param {any} reason
|
|
60
60
|
*/
|
|
61
61
|
addRedaction(e, t) {
|
|
62
|
-
const n =
|
|
62
|
+
const n = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = u, c = o.wasmbuilder_addRedaction(this.__wbg_ptr, n, _, t);
|
|
63
63
|
if (c[1])
|
|
64
64
|
throw d(c[0]);
|
|
65
65
|
}
|
|
@@ -69,7 +69,7 @@ var se = V((ue, C) => {
|
|
|
69
69
|
* @param {Blob} blob
|
|
70
70
|
*/
|
|
71
71
|
addResourceFromBlob(e, t) {
|
|
72
|
-
const n =
|
|
72
|
+
const n = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = u, c = o.wasmbuilder_addResourceFromBlob(this.__wbg_ptr, n, _, t);
|
|
73
73
|
if (c[1])
|
|
74
74
|
throw d(c[0]);
|
|
75
75
|
}
|
|
@@ -81,7 +81,7 @@ var se = V((ue, C) => {
|
|
|
81
81
|
* @returns {WasmBuilder}
|
|
82
82
|
*/
|
|
83
83
|
static fromArchive(e, t) {
|
|
84
|
-
var n = w(t) ? 0 :
|
|
84
|
+
var n = w(t) ? 0 : f(t, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = u;
|
|
85
85
|
const c = o.wasmbuilder_fromArchive(e, n, _);
|
|
86
86
|
if (c[2])
|
|
87
87
|
throw d(c[1]);
|
|
@@ -95,12 +95,12 @@ var se = V((ue, C) => {
|
|
|
95
95
|
* @returns {WasmBuilder}
|
|
96
96
|
*/
|
|
97
97
|
static fromJson(e, t) {
|
|
98
|
-
const n =
|
|
99
|
-
var c = w(t) ? 0 :
|
|
100
|
-
const
|
|
101
|
-
if (
|
|
102
|
-
throw d(
|
|
103
|
-
return h.__wrap(
|
|
98
|
+
const n = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = u;
|
|
99
|
+
var c = w(t) ? 0 : f(t, o.__wbindgen_malloc, o.__wbindgen_realloc), s = u;
|
|
100
|
+
const i = o.wasmbuilder_fromJson(n, _, c, s);
|
|
101
|
+
if (i[2])
|
|
102
|
+
throw d(i[1]);
|
|
103
|
+
return h.__wrap(i[0]);
|
|
104
104
|
}
|
|
105
105
|
/**
|
|
106
106
|
* Get the current manifest definition.
|
|
@@ -119,7 +119,7 @@ var se = V((ue, C) => {
|
|
|
119
119
|
* @returns {WasmBuilder}
|
|
120
120
|
*/
|
|
121
121
|
static new(e) {
|
|
122
|
-
var t = w(e) ? 0 :
|
|
122
|
+
var t = w(e) ? 0 : f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n = u;
|
|
123
123
|
const _ = o.wasmbuilder_new(t, n);
|
|
124
124
|
if (_[2])
|
|
125
125
|
throw d(_[1]);
|
|
@@ -149,7 +149,7 @@ var se = V((ue, C) => {
|
|
|
149
149
|
* @param {string} url
|
|
150
150
|
*/
|
|
151
151
|
setRemoteUrl(e) {
|
|
152
|
-
const t =
|
|
152
|
+
const t = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n = u;
|
|
153
153
|
o.wasmbuilder_setRemoteUrl(this.__wbg_ptr, t, n);
|
|
154
154
|
}
|
|
155
155
|
/**
|
|
@@ -158,7 +158,7 @@ var se = V((ue, C) => {
|
|
|
158
158
|
* @param {Blob} blob
|
|
159
159
|
*/
|
|
160
160
|
setThumbnailFromBlob(e, t) {
|
|
161
|
-
const n =
|
|
161
|
+
const n = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), _ = u, c = o.wasmbuilder_setThumbnailFromBlob(this.__wbg_ptr, n, _, t);
|
|
162
162
|
if (c[1])
|
|
163
163
|
throw d(c[0]);
|
|
164
164
|
}
|
|
@@ -170,7 +170,7 @@ var se = V((ue, C) => {
|
|
|
170
170
|
* @returns {Promise<Uint8Array>}
|
|
171
171
|
*/
|
|
172
172
|
sign(e, t, n) {
|
|
173
|
-
const _ =
|
|
173
|
+
const _ = f(t, o.__wbindgen_malloc, o.__wbindgen_realloc), c = u;
|
|
174
174
|
return o.wasmbuilder_sign(this.__wbg_ptr, e, _, c, n);
|
|
175
175
|
}
|
|
176
176
|
/**
|
|
@@ -182,7 +182,7 @@ var se = V((ue, C) => {
|
|
|
182
182
|
* @returns {Promise<any>}
|
|
183
183
|
*/
|
|
184
184
|
signAndGetManifestBytes(e, t, n) {
|
|
185
|
-
const _ =
|
|
185
|
+
const _ = f(t, o.__wbindgen_malloc, o.__wbindgen_realloc), c = u;
|
|
186
186
|
return o.wasmbuilder_signAndGetManifestBytes(this.__wbg_ptr, e, _, c, n);
|
|
187
187
|
}
|
|
188
188
|
/**
|
|
@@ -251,9 +251,9 @@ var se = V((ue, C) => {
|
|
|
251
251
|
* @returns {Promise<WasmReader>}
|
|
252
252
|
*/
|
|
253
253
|
static fromBlob(e, t, n) {
|
|
254
|
-
const _ =
|
|
255
|
-
var
|
|
256
|
-
return o.wasmreader_fromBlob(_, c, t,
|
|
254
|
+
const _ = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), c = u;
|
|
255
|
+
var s = w(n) ? 0 : f(n, o.__wbindgen_malloc, o.__wbindgen_realloc), i = u;
|
|
256
|
+
return o.wasmreader_fromBlob(_, c, t, s, i);
|
|
257
257
|
}
|
|
258
258
|
/**
|
|
259
259
|
* Attempts to create a new `WasmReader` from an asset format, a `Blob` of the bytes of the initial segment, and a fragment `Blob`.
|
|
@@ -265,9 +265,9 @@ var se = V((ue, C) => {
|
|
|
265
265
|
* @returns {Promise<WasmReader>}
|
|
266
266
|
*/
|
|
267
267
|
static fromBlobFragment(e, t, n, _) {
|
|
268
|
-
const c =
|
|
269
|
-
var
|
|
270
|
-
return o.wasmreader_fromBlobFragment(c,
|
|
268
|
+
const c = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), s = u;
|
|
269
|
+
var i = w(_) ? 0 : f(_, o.__wbindgen_malloc, o.__wbindgen_realloc), a = u;
|
|
270
|
+
return o.wasmreader_fromBlobFragment(c, s, t, n, i, a);
|
|
271
271
|
}
|
|
272
272
|
/**
|
|
273
273
|
* Returns a JSON representation of the asset's manifest store.
|
|
@@ -298,7 +298,7 @@ var se = V((ue, C) => {
|
|
|
298
298
|
* @returns {Uint8Array}
|
|
299
299
|
*/
|
|
300
300
|
resourceToBytes(e) {
|
|
301
|
-
const t =
|
|
301
|
+
const t = f(e, o.__wbindgen_malloc, o.__wbindgen_realloc), n = u, _ = o.wasmreader_resourceToBytes(this.__wbg_ptr, t, n);
|
|
302
302
|
if (_[2])
|
|
303
303
|
throw d(_[1]);
|
|
304
304
|
return d(_[0]);
|
|
@@ -306,7 +306,7 @@ var se = V((ue, C) => {
|
|
|
306
306
|
}
|
|
307
307
|
Symbol.dispose && (F.prototype[Symbol.dispose] = F.prototype.free);
|
|
308
308
|
function P(r) {
|
|
309
|
-
const e =
|
|
309
|
+
const e = f(r, o.__wbindgen_malloc, o.__wbindgen_realloc), t = u, n = o.loadSettings(e, t);
|
|
310
310
|
if (n[1])
|
|
311
311
|
throw d(n[0]);
|
|
312
312
|
}
|
|
@@ -330,7 +330,7 @@ var se = V((ue, C) => {
|
|
|
330
330
|
return w(n) ? 16777215 : n ? 1 : 0;
|
|
331
331
|
},
|
|
332
332
|
__wbg___wbindgen_debug_string_0accd80f45e5faa2: function(e, t) {
|
|
333
|
-
const n =
|
|
333
|
+
const n = O(t), _ = f(n, o.__wbindgen_malloc, o.__wbindgen_realloc), c = u;
|
|
334
334
|
m().setInt32(e + 4, c, !0), m().setInt32(e + 0, _, !0);
|
|
335
335
|
},
|
|
336
336
|
__wbg___wbindgen_in_70a403a56e771704: function(e, t) {
|
|
@@ -364,8 +364,8 @@ var se = V((ue, C) => {
|
|
|
364
364
|
},
|
|
365
365
|
__wbg___wbindgen_string_get_72bdf95d3ae505b1: function(e, t) {
|
|
366
366
|
const n = t, _ = typeof n == "string" ? n : void 0;
|
|
367
|
-
var c = w(_) ? 0 :
|
|
368
|
-
m().setInt32(e + 4,
|
|
367
|
+
var c = w(_) ? 0 : f(_, o.__wbindgen_malloc, o.__wbindgen_realloc), s = u;
|
|
368
|
+
m().setInt32(e + 4, s, !0), m().setInt32(e + 0, c, !0);
|
|
369
369
|
},
|
|
370
370
|
__wbg___wbindgen_throw_1506f2235d1bdba0: function(e, t) {
|
|
371
371
|
throw new Error(y(e, t));
|
|
@@ -380,12 +380,12 @@ var se = V((ue, C) => {
|
|
|
380
380
|
e.abort(t);
|
|
381
381
|
},
|
|
382
382
|
__wbg_append_e1746995edcb0170: function() {
|
|
383
|
-
return
|
|
383
|
+
return b(function(e, t, n, _, c) {
|
|
384
384
|
e.append(y(t, n), y(_, c));
|
|
385
385
|
}, arguments);
|
|
386
386
|
},
|
|
387
387
|
__wbg_arrayBuffer_05927079aabe6d46: function() {
|
|
388
|
-
return
|
|
388
|
+
return b(function(e) {
|
|
389
389
|
return e.arrayBuffer();
|
|
390
390
|
}, arguments);
|
|
391
391
|
},
|
|
@@ -393,12 +393,12 @@ var se = V((ue, C) => {
|
|
|
393
393
|
return e.byteLength;
|
|
394
394
|
},
|
|
395
395
|
__wbg_call_8a89609d89f6608a: function() {
|
|
396
|
-
return
|
|
396
|
+
return b(function(e, t) {
|
|
397
397
|
return e.call(t);
|
|
398
398
|
}, arguments);
|
|
399
399
|
},
|
|
400
400
|
__wbg_call_9c758de292015997: function() {
|
|
401
|
-
return
|
|
401
|
+
return b(function(e, t, n) {
|
|
402
402
|
return e.call(t, n);
|
|
403
403
|
}, arguments);
|
|
404
404
|
},
|
|
@@ -432,17 +432,22 @@ var se = V((ue, C) => {
|
|
|
432
432
|
return Array.from(e);
|
|
433
433
|
},
|
|
434
434
|
__wbg_getRandomValues_3f44b700395062e5: function() {
|
|
435
|
-
return
|
|
435
|
+
return b(function(e, t) {
|
|
436
|
+
globalThis.crypto.getRandomValues(v(e, t));
|
|
437
|
+
}, arguments);
|
|
438
|
+
},
|
|
439
|
+
__wbg_getRandomValues_76dfc69825c9c552: function() {
|
|
440
|
+
return b(function(e, t) {
|
|
436
441
|
globalThis.crypto.getRandomValues(v(e, t));
|
|
437
442
|
}, arguments);
|
|
438
443
|
},
|
|
439
444
|
__wbg_getRandomValues_8aa3112c6615eef6: function() {
|
|
440
|
-
return
|
|
445
|
+
return b(function(e, t) {
|
|
441
446
|
globalThis.crypto.getRandomValues(v(e, t));
|
|
442
447
|
}, arguments);
|
|
443
448
|
},
|
|
444
449
|
__wbg_getRandomValues_c44a50d8cfdaebeb: function() {
|
|
445
|
-
return
|
|
450
|
+
return b(function(e, t) {
|
|
446
451
|
e.getRandomValues(t);
|
|
447
452
|
}, arguments);
|
|
448
453
|
},
|
|
@@ -450,7 +455,7 @@ var se = V((ue, C) => {
|
|
|
450
455
|
return e.getTime();
|
|
451
456
|
},
|
|
452
457
|
__wbg_get_1f8f054ddbaa7db2: function() {
|
|
453
|
-
return
|
|
458
|
+
return b(function(e, t) {
|
|
454
459
|
return Reflect.get(e, t);
|
|
455
460
|
}, arguments);
|
|
456
461
|
},
|
|
@@ -458,7 +463,7 @@ var se = V((ue, C) => {
|
|
|
458
463
|
return e[t >>> 0];
|
|
459
464
|
},
|
|
460
465
|
__wbg_get_de6a0f7d4d18a304: function() {
|
|
461
|
-
return
|
|
466
|
+
return b(function(e, t) {
|
|
462
467
|
return Reflect.get(e, t);
|
|
463
468
|
}, arguments);
|
|
464
469
|
},
|
|
@@ -469,7 +474,7 @@ var se = V((ue, C) => {
|
|
|
469
474
|
return e[t];
|
|
470
475
|
},
|
|
471
476
|
__wbg_has_73740b27f436fed3: function() {
|
|
472
|
-
return
|
|
477
|
+
return b(function(e, t) {
|
|
473
478
|
return Reflect.has(e, t);
|
|
474
479
|
}, arguments);
|
|
475
480
|
},
|
|
@@ -543,7 +548,7 @@ var se = V((ue, C) => {
|
|
|
543
548
|
return /* @__PURE__ */ new Date();
|
|
544
549
|
},
|
|
545
550
|
__wbg_new_0d09705104e164af: function() {
|
|
546
|
-
return
|
|
551
|
+
return b(function() {
|
|
547
552
|
return new AbortController();
|
|
548
553
|
}, arguments);
|
|
549
554
|
},
|
|
@@ -557,7 +562,7 @@ var se = V((ue, C) => {
|
|
|
557
562
|
return /* @__PURE__ */ new Map();
|
|
558
563
|
},
|
|
559
564
|
__wbg_new_a1b9f645bba64f0f: function() {
|
|
560
|
-
return
|
|
565
|
+
return b(function() {
|
|
561
566
|
return new FileReaderSync();
|
|
562
567
|
}, arguments);
|
|
563
568
|
},
|
|
@@ -568,7 +573,7 @@ var se = V((ue, C) => {
|
|
|
568
573
|
return new Array();
|
|
569
574
|
},
|
|
570
575
|
__wbg_new_e436d06bc8e77460: function() {
|
|
571
|
-
return
|
|
576
|
+
return b(function() {
|
|
572
577
|
return new Headers();
|
|
573
578
|
}, arguments);
|
|
574
579
|
},
|
|
@@ -577,11 +582,11 @@ var se = V((ue, C) => {
|
|
|
577
582
|
},
|
|
578
583
|
__wbg_new_typed_bf31d18f92484486: function(e, t) {
|
|
579
584
|
try {
|
|
580
|
-
var n = { a: e, b: t }, _ = (
|
|
585
|
+
var n = { a: e, b: t }, _ = (s, i) => {
|
|
581
586
|
const a = n.a;
|
|
582
587
|
n.a = 0;
|
|
583
588
|
try {
|
|
584
|
-
return X(a, n.b,
|
|
589
|
+
return X(a, n.b, s, i);
|
|
585
590
|
} finally {
|
|
586
591
|
n.a = a;
|
|
587
592
|
}
|
|
@@ -595,7 +600,7 @@ var se = V((ue, C) => {
|
|
|
595
600
|
return new Uint8Array(e >>> 0);
|
|
596
601
|
},
|
|
597
602
|
__wbg_new_with_str_and_init_bcd02b79a793d27f: function() {
|
|
598
|
-
return
|
|
603
|
+
return b(function(e, t, n) {
|
|
599
604
|
return new Request(y(e, t), n);
|
|
600
605
|
}, arguments);
|
|
601
606
|
},
|
|
@@ -603,7 +608,7 @@ var se = V((ue, C) => {
|
|
|
603
608
|
return e.next;
|
|
604
609
|
},
|
|
605
610
|
__wbg_next_eb8ca7351fa27906: function() {
|
|
606
|
-
return
|
|
611
|
+
return b(function(e) {
|
|
607
612
|
return e.next();
|
|
608
613
|
}, arguments);
|
|
609
614
|
},
|
|
@@ -626,18 +631,18 @@ var se = V((ue, C) => {
|
|
|
626
631
|
return e.queueMicrotask;
|
|
627
632
|
},
|
|
628
633
|
__wbg_randomFillSync_6c25eac9869eb53c: function() {
|
|
629
|
-
return
|
|
634
|
+
return b(function(e, t) {
|
|
630
635
|
e.randomFillSync(t);
|
|
631
636
|
}, arguments);
|
|
632
637
|
},
|
|
633
638
|
__wbg_readAsArrayBuffer_f1b8da05559618d9: function() {
|
|
634
|
-
return
|
|
639
|
+
return b(function(e, t) {
|
|
635
640
|
return e.readAsArrayBuffer(t);
|
|
636
641
|
}, arguments);
|
|
637
642
|
},
|
|
638
643
|
__wbg_require_b4edbdcf3e2a1ef0: function() {
|
|
639
|
-
return
|
|
640
|
-
return
|
|
644
|
+
return b(function() {
|
|
645
|
+
return q.require;
|
|
641
646
|
}, arguments);
|
|
642
647
|
},
|
|
643
648
|
__wbg_resolve_25a7e548d5881dca: function(e) {
|
|
@@ -686,35 +691,35 @@ var se = V((ue, C) => {
|
|
|
686
691
|
return e.size;
|
|
687
692
|
},
|
|
688
693
|
__wbg_slice_02bb778501725738: function() {
|
|
689
|
-
return
|
|
694
|
+
return b(function(e, t, n) {
|
|
690
695
|
return e.slice(t, n);
|
|
691
696
|
}, arguments);
|
|
692
697
|
},
|
|
693
698
|
__wbg_stack_3b0d974bbf31e44f: function(e, t) {
|
|
694
|
-
const n = t.stack, _ =
|
|
699
|
+
const n = t.stack, _ = f(n, o.__wbindgen_malloc, o.__wbindgen_realloc), c = u;
|
|
695
700
|
m().setInt32(e + 4, c, !0), m().setInt32(e + 0, _, !0);
|
|
696
701
|
},
|
|
697
702
|
__wbg_static_accessor_GLOBAL_9d53f2689e622ca1: function() {
|
|
698
703
|
const e = typeof global > "u" ? null : global;
|
|
699
|
-
return w(e) ? 0 :
|
|
704
|
+
return w(e) ? 0 : M(e);
|
|
700
705
|
},
|
|
701
706
|
__wbg_static_accessor_GLOBAL_THIS_a1a35cec07001a8a: function() {
|
|
702
707
|
const e = typeof globalThis > "u" ? null : globalThis;
|
|
703
|
-
return w(e) ? 0 :
|
|
708
|
+
return w(e) ? 0 : M(e);
|
|
704
709
|
},
|
|
705
710
|
__wbg_static_accessor_SELF_4c59f6c7ea29a144: function() {
|
|
706
711
|
const e = typeof self > "u" ? null : self;
|
|
707
|
-
return w(e) ? 0 :
|
|
712
|
+
return w(e) ? 0 : M(e);
|
|
708
713
|
},
|
|
709
714
|
__wbg_static_accessor_WINDOW_e70ae9f2eb052253: function() {
|
|
710
715
|
const e = typeof window > "u" ? null : window;
|
|
711
|
-
return w(e) ? 0 :
|
|
716
|
+
return w(e) ? 0 : M(e);
|
|
712
717
|
},
|
|
713
718
|
__wbg_status_00549d55b78d949e: function(e) {
|
|
714
719
|
return e.status;
|
|
715
720
|
},
|
|
716
721
|
__wbg_stringify_8286df6dcc591521: function() {
|
|
717
|
-
return
|
|
722
|
+
return b(function(e) {
|
|
718
723
|
return JSON.stringify(e);
|
|
719
724
|
}, arguments);
|
|
720
725
|
},
|
|
@@ -728,7 +733,7 @@ var se = V((ue, C) => {
|
|
|
728
733
|
return e.then(t);
|
|
729
734
|
},
|
|
730
735
|
__wbg_url_6808f1c468f2d0cd: function(e, t) {
|
|
731
|
-
const n = t.url, _ =
|
|
736
|
+
const n = t.url, _ = f(n, o.__wbindgen_malloc, o.__wbindgen_realloc), c = u;
|
|
732
737
|
m().setInt32(e + 4, c, !0), m().setInt32(e + 0, _, !0);
|
|
733
738
|
},
|
|
734
739
|
__wbg_valueOf_41ae57308c1f031c: function(e) {
|
|
@@ -776,15 +781,15 @@ var se = V((ue, C) => {
|
|
|
776
781
|
};
|
|
777
782
|
}
|
|
778
783
|
function $(r, e) {
|
|
779
|
-
o.
|
|
784
|
+
o.wasm_bindgen_304c265eb9e6f0af___convert__closures_____invoke_______true_(r, e);
|
|
780
785
|
}
|
|
781
786
|
function H(r, e, t) {
|
|
782
|
-
const n = o.
|
|
787
|
+
const n = o.wasm_bindgen_304c265eb9e6f0af___convert__closures_____invoke___wasm_bindgen_304c265eb9e6f0af___JsValue__core_9b3796e30d99ddb7___result__Result_____wasm_bindgen_304c265eb9e6f0af___JsError___true_(r, e, t);
|
|
783
788
|
if (n[1])
|
|
784
789
|
throw d(n[0]);
|
|
785
790
|
}
|
|
786
791
|
function X(r, e, t, n) {
|
|
787
|
-
o.
|
|
792
|
+
o.wasm_bindgen_304c265eb9e6f0af___convert__closures_____invoke___js_sys_74e7014fb12660c3___Function_fn_wasm_bindgen_304c265eb9e6f0af___JsValue_____wasm_bindgen_304c265eb9e6f0af___sys__Undefined___js_sys_74e7014fb12660c3___Function_fn_wasm_bindgen_304c265eb9e6f0af___JsValue_____wasm_bindgen_304c265eb9e6f0af___sys__Undefined_______true_(r, e, t, n);
|
|
788
793
|
}
|
|
789
794
|
const Y = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"], K = ["omit", "same-origin", "include"], Q = ["same-origin", "no-cors", "cors", "navigate"], x = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
790
795
|
}, unregister: () => {
|
|
@@ -792,14 +797,14 @@ var se = V((ue, C) => {
|
|
|
792
797
|
}, unregister: () => {
|
|
793
798
|
} } : new FinalizationRegistry((r) => o.__wbg_wasmreader_free(r, 1));
|
|
794
799
|
typeof FinalizationRegistry > "u" || new FinalizationRegistry((r) => o.__wbg_wasmsigner_free(r, 1));
|
|
795
|
-
function
|
|
800
|
+
function M(r) {
|
|
796
801
|
const e = o.__externref_table_alloc();
|
|
797
802
|
return o.__wbindgen_externrefs.set(e, r), e;
|
|
798
803
|
}
|
|
799
804
|
const N = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
800
805
|
}, unregister: () => {
|
|
801
806
|
} } : new FinalizationRegistry((r) => o.__wbindgen_destroy_closure(r.a, r.b));
|
|
802
|
-
function
|
|
807
|
+
function O(r) {
|
|
803
808
|
const e = typeof r;
|
|
804
809
|
if (e == "number" || e == "boolean" || r == null)
|
|
805
810
|
return `${r}`;
|
|
@@ -816,9 +821,9 @@ var se = V((ue, C) => {
|
|
|
816
821
|
if (Array.isArray(r)) {
|
|
817
822
|
const _ = r.length;
|
|
818
823
|
let c = "[";
|
|
819
|
-
_ > 0 && (c +=
|
|
820
|
-
for (let
|
|
821
|
-
c += ", " +
|
|
824
|
+
_ > 0 && (c += O(r[0]));
|
|
825
|
+
for (let s = 1; s < _; s++)
|
|
826
|
+
c += ", " + O(r[s]);
|
|
822
827
|
return c += "]", c;
|
|
823
828
|
}
|
|
824
829
|
const t = /\[object ([^\]]+)\]/.exec(toString.call(r));
|
|
@@ -846,15 +851,15 @@ ${r.stack}` : n;
|
|
|
846
851
|
function y(r, e) {
|
|
847
852
|
return ee(r >>> 0, e);
|
|
848
853
|
}
|
|
849
|
-
let
|
|
854
|
+
let S = null;
|
|
850
855
|
function B() {
|
|
851
|
-
return (
|
|
856
|
+
return (S === null || S.byteLength === 0) && (S = new Uint8Array(o.memory.buffer)), S;
|
|
852
857
|
}
|
|
853
|
-
function
|
|
858
|
+
function b(r, e) {
|
|
854
859
|
try {
|
|
855
860
|
return r.apply(this, e);
|
|
856
861
|
} catch (t) {
|
|
857
|
-
const n =
|
|
862
|
+
const n = M(t);
|
|
858
863
|
o.__wbindgen_exn_store(n);
|
|
859
864
|
}
|
|
860
865
|
}
|
|
@@ -864,52 +869,52 @@ ${r.stack}` : n;
|
|
|
864
869
|
function z(r, e, t) {
|
|
865
870
|
const n = { a: r, b: e, cnt: 1 }, _ = (...c) => {
|
|
866
871
|
n.cnt++;
|
|
867
|
-
const
|
|
872
|
+
const s = n.a;
|
|
868
873
|
n.a = 0;
|
|
869
874
|
try {
|
|
870
|
-
return t(
|
|
875
|
+
return t(s, n.b, ...c);
|
|
871
876
|
} finally {
|
|
872
|
-
n.a =
|
|
877
|
+
n.a = s, _._wbg_cb_unref();
|
|
873
878
|
}
|
|
874
879
|
};
|
|
875
880
|
return _._wbg_cb_unref = () => {
|
|
876
881
|
--n.cnt === 0 && (o.__wbindgen_destroy_closure(n.a, n.b), n.a = 0, N.unregister(n));
|
|
877
882
|
}, N.register(_, n, n), _;
|
|
878
883
|
}
|
|
879
|
-
function
|
|
884
|
+
function f(r, e, t) {
|
|
880
885
|
if (t === void 0) {
|
|
881
|
-
const
|
|
882
|
-
return B().subarray(a, a +
|
|
886
|
+
const i = j.encode(r), a = e(i.length, 1) >>> 0;
|
|
887
|
+
return B().subarray(a, a + i.length).set(i), u = i.length, a;
|
|
883
888
|
}
|
|
884
889
|
let n = r.length, _ = e(n, 1) >>> 0;
|
|
885
890
|
const c = B();
|
|
886
|
-
let
|
|
887
|
-
for (;
|
|
888
|
-
const
|
|
889
|
-
if (
|
|
890
|
-
c[_ +
|
|
891
|
+
let s = 0;
|
|
892
|
+
for (; s < n; s++) {
|
|
893
|
+
const i = r.charCodeAt(s);
|
|
894
|
+
if (i > 127) break;
|
|
895
|
+
c[_ + s] = i;
|
|
891
896
|
}
|
|
892
|
-
if (
|
|
893
|
-
|
|
894
|
-
const
|
|
895
|
-
|
|
897
|
+
if (s !== n) {
|
|
898
|
+
s !== 0 && (r = r.slice(s)), _ = t(_, n, n = s + r.length * 3, 1) >>> 0;
|
|
899
|
+
const i = B().subarray(_ + s, _ + n), a = j.encodeInto(r, i);
|
|
900
|
+
s += a.written, _ = t(_, n, s, 1) >>> 0;
|
|
896
901
|
}
|
|
897
|
-
return u =
|
|
902
|
+
return u = s, _;
|
|
898
903
|
}
|
|
899
904
|
function d(r) {
|
|
900
905
|
const e = o.__wbindgen_externrefs.get(r);
|
|
901
906
|
return o.__externref_table_dealloc(r), e;
|
|
902
907
|
}
|
|
903
|
-
let
|
|
904
|
-
|
|
908
|
+
let T = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 });
|
|
909
|
+
T.decode();
|
|
905
910
|
const Z = 2146435072;
|
|
906
|
-
let
|
|
911
|
+
let E = 0;
|
|
907
912
|
function ee(r, e) {
|
|
908
|
-
return
|
|
913
|
+
return E += e, E >= Z && (T = new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }), T.decode(), E = e), T.decode(B().subarray(r, r + e));
|
|
909
914
|
}
|
|
910
|
-
const
|
|
911
|
-
"encodeInto" in
|
|
912
|
-
const t =
|
|
915
|
+
const j = new TextEncoder();
|
|
916
|
+
"encodeInto" in j || (j.encodeInto = function(r, e) {
|
|
917
|
+
const t = j.encode(r);
|
|
913
918
|
return e.set(t), {
|
|
914
919
|
read: r.length,
|
|
915
920
|
written: t.length
|
|
@@ -917,7 +922,7 @@ ${r.stack}` : n;
|
|
|
917
922
|
});
|
|
918
923
|
let u = 0, o;
|
|
919
924
|
function te(r, e) {
|
|
920
|
-
return o = r.exports, A = null,
|
|
925
|
+
return o = r.exports, A = null, S = null, o.__wbindgen_start(), o;
|
|
921
926
|
}
|
|
922
927
|
function ne(r) {
|
|
923
928
|
if (o !== void 0) return o;
|
|
@@ -927,7 +932,7 @@ ${r.stack}` : n;
|
|
|
927
932
|
const t = new WebAssembly.Instance(r, e);
|
|
928
933
|
return te(t);
|
|
929
934
|
}
|
|
930
|
-
function
|
|
935
|
+
function V() {
|
|
931
936
|
let r = 0;
|
|
932
937
|
const e = /* @__PURE__ */ new Map();
|
|
933
938
|
return {
|
|
@@ -946,18 +951,18 @@ ${r.stack}` : n;
|
|
|
946
951
|
}
|
|
947
952
|
};
|
|
948
953
|
}
|
|
949
|
-
const
|
|
950
|
-
function
|
|
954
|
+
const D = Symbol("transfer");
|
|
955
|
+
function I(r, e) {
|
|
951
956
|
return {
|
|
952
|
-
type:
|
|
957
|
+
type: D,
|
|
953
958
|
value: r,
|
|
954
959
|
transfer: e ? Array.isArray(e) ? e : [e] : [r]
|
|
955
960
|
};
|
|
956
961
|
}
|
|
957
|
-
function
|
|
958
|
-
return !!(r && typeof r == "object" && Reflect.get(r, "type") ===
|
|
962
|
+
function U(r) {
|
|
963
|
+
return !!(r && typeof r == "object" && Reflect.get(r, "type") === D);
|
|
959
964
|
}
|
|
960
|
-
function
|
|
965
|
+
function L(r = "default") {
|
|
961
966
|
return {
|
|
962
967
|
createTx(e) {
|
|
963
968
|
const t = /* @__PURE__ */ new Map(), n = e ?? self;
|
|
@@ -965,21 +970,21 @@ ${r.stack}` : n;
|
|
|
965
970
|
const { data: c } = _;
|
|
966
971
|
if (c.channelName !== r)
|
|
967
972
|
return;
|
|
968
|
-
const { id:
|
|
969
|
-
g && (a ? g.reject(a) : g.resolve(
|
|
973
|
+
const { id: s, result: i, error: a } = c, g = t.get(s);
|
|
974
|
+
g && (a ? g.reject(a) : g.resolve(i), t.delete(s));
|
|
970
975
|
}), new Proxy(
|
|
971
976
|
{},
|
|
972
977
|
{
|
|
973
978
|
get(_, c) {
|
|
974
|
-
return (...
|
|
975
|
-
const
|
|
976
|
-
return
|
|
977
|
-
|
|
979
|
+
return (...s) => {
|
|
980
|
+
const i = re(), a = [], g = [];
|
|
981
|
+
return s.forEach((R) => {
|
|
982
|
+
U(R) ? (a.push(R.value), g.push(...R.transfer)) : a.push(R);
|
|
978
983
|
}), n.postMessage(
|
|
979
|
-
{ method: c, args: a, id:
|
|
984
|
+
{ method: c, args: a, id: i, channelName: r },
|
|
980
985
|
{ transfer: g }
|
|
981
|
-
), new Promise((
|
|
982
|
-
t.set(
|
|
986
|
+
), new Promise((R, W) => {
|
|
987
|
+
t.set(i, { resolve: R, reject: W });
|
|
983
988
|
});
|
|
984
989
|
};
|
|
985
990
|
}
|
|
@@ -992,10 +997,10 @@ ${r.stack}` : n;
|
|
|
992
997
|
const { data: c } = _;
|
|
993
998
|
if (c.channelName !== r)
|
|
994
999
|
return;
|
|
995
|
-
const { method:
|
|
1000
|
+
const { method: s, args: i, id: a } = c;
|
|
996
1001
|
try {
|
|
997
|
-
const g = await e[
|
|
998
|
-
|
|
1002
|
+
const g = await e[s](...i);
|
|
1003
|
+
U(g) ? n.postMessage(
|
|
999
1004
|
{ result: g.value, id: a, channelName: r },
|
|
1000
1005
|
{ transfer: g.transfer }
|
|
1001
1006
|
) : n.postMessage({ result: g, id: a, channelName: r });
|
|
@@ -1009,16 +1014,16 @@ ${r.stack}` : n;
|
|
|
1009
1014
|
function re() {
|
|
1010
1015
|
return new Array(4).fill(0).map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16)).join("-");
|
|
1011
1016
|
}
|
|
1012
|
-
const { rx: _e } =
|
|
1017
|
+
const { rx: _e } = L(), { createTx: oe } = L("worker");
|
|
1013
1018
|
function ce(r) {
|
|
1014
1019
|
if (!(r != null && r.manifests))
|
|
1015
1020
|
return r;
|
|
1016
1021
|
const e = r.manifests, t = Object.assign(/* @__PURE__ */ Object.create(null), e), n = Object.getPrototypeOf(e);
|
|
1017
1022
|
return n !== null && n !== Object.prototype && r.active_manifest && (t[r.active_manifest] = n), r.manifests = t, r;
|
|
1018
1023
|
}
|
|
1019
|
-
const p =
|
|
1024
|
+
const p = V(), l = V(), J = oe();
|
|
1020
1025
|
_e(
|
|
1021
|
-
|
|
1026
|
+
se({
|
|
1022
1027
|
async initWorker(r, e) {
|
|
1023
1028
|
ne({ module: r }), e && P(e);
|
|
1024
1029
|
},
|
|
@@ -1053,7 +1058,7 @@ ${r.stack}` : n;
|
|
|
1053
1058
|
},
|
|
1054
1059
|
reader_resourceToBytes(r, e) {
|
|
1055
1060
|
const n = p.get(r).resourceToBytes(e);
|
|
1056
|
-
return
|
|
1061
|
+
return I(n, n.buffer);
|
|
1057
1062
|
},
|
|
1058
1063
|
reader_free(r) {
|
|
1059
1064
|
p.get(r).free(), p.remove(r);
|
|
@@ -1102,44 +1107,44 @@ ${r.stack}` : n;
|
|
|
1102
1107
|
},
|
|
1103
1108
|
builder_toArchive(r) {
|
|
1104
1109
|
const t = l.get(r).toArchive();
|
|
1105
|
-
return
|
|
1110
|
+
return I(t, t.buffer);
|
|
1106
1111
|
},
|
|
1107
1112
|
async builder_sign(r, e, t, n, _) {
|
|
1108
|
-
const
|
|
1113
|
+
const s = await l.get(r).sign(
|
|
1109
1114
|
{
|
|
1110
1115
|
reserveSize: t.reserveSize,
|
|
1111
1116
|
alg: t.alg,
|
|
1112
|
-
sign: async (
|
|
1117
|
+
sign: async (i) => await J.sign(
|
|
1113
1118
|
e,
|
|
1114
|
-
|
|
1119
|
+
I(i, i.buffer),
|
|
1115
1120
|
t.reserveSize
|
|
1116
1121
|
)
|
|
1117
1122
|
},
|
|
1118
1123
|
n,
|
|
1119
1124
|
_
|
|
1120
1125
|
);
|
|
1121
|
-
return
|
|
1126
|
+
return I(s, s.buffer);
|
|
1122
1127
|
},
|
|
1123
1128
|
async builder_signAndGetManifestBytes(r, e, t, n, _) {
|
|
1124
|
-
const c = l.get(r), { manifest:
|
|
1129
|
+
const c = l.get(r), { manifest: s, asset: i } = await c.signAndGetManifestBytes(
|
|
1125
1130
|
{
|
|
1126
1131
|
reserveSize: t.reserveSize,
|
|
1127
1132
|
alg: t.alg,
|
|
1128
|
-
sign: async (a) => await
|
|
1133
|
+
sign: async (a) => await J.sign(
|
|
1129
1134
|
e,
|
|
1130
|
-
|
|
1135
|
+
I(a, a.buffer),
|
|
1131
1136
|
t.reserveSize
|
|
1132
1137
|
)
|
|
1133
1138
|
},
|
|
1134
1139
|
n,
|
|
1135
1140
|
_
|
|
1136
1141
|
);
|
|
1137
|
-
return
|
|
1142
|
+
return I(
|
|
1138
1143
|
{
|
|
1139
|
-
manifest:
|
|
1140
|
-
asset:
|
|
1144
|
+
manifest: s,
|
|
1145
|
+
asset: i
|
|
1141
1146
|
},
|
|
1142
|
-
[
|
|
1147
|
+
[s.buffer, i.buffer]
|
|
1143
1148
|
);
|
|
1144
1149
|
},
|
|
1145
1150
|
builder_free(r) {
|
|
@@ -1147,7 +1152,7 @@ ${r.stack}` : n;
|
|
|
1147
1152
|
}
|
|
1148
1153
|
})
|
|
1149
1154
|
);
|
|
1150
|
-
function
|
|
1155
|
+
function se(r) {
|
|
1151
1156
|
const e = {};
|
|
1152
1157
|
for (const [t, n] of Object.entries(r))
|
|
1153
1158
|
e[t] = async (..._) => {
|
|
@@ -1160,4 +1165,4 @@ ${r.stack}` : n;
|
|
|
1160
1165
|
return e;
|
|
1161
1166
|
}
|
|
1162
1167
|
});
|
|
1163
|
-
export default
|
|
1168
|
+
export default ie();
|