@janssenproject/cedarling_wasm 1.15.0 → 2.0.0-nodejs
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/README.md +361 -29
- package/cedarling_wasm.d.ts +496 -248
- package/cedarling_wasm.js +2007 -1247
- package/cedarling_wasm_bg.wasm +0 -0
- package/package.json +2 -6
package/cedarling_wasm.js
CHANGED
|
@@ -1,482 +1,479 @@
|
|
|
1
|
-
|
|
1
|
+
/* @ts-self-types="./cedarling_wasm.d.ts" */
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
/**
|
|
4
|
+
* A WASM wrapper for the Rust `cedarling::AuthorizeResult` struct.
|
|
5
|
+
* Represents the result of an authorization request.
|
|
6
|
+
*/
|
|
7
|
+
class AuthorizeResult {
|
|
8
|
+
static __wrap(ptr) {
|
|
9
|
+
ptr = ptr >>> 0;
|
|
10
|
+
const obj = Object.create(AuthorizeResult.prototype);
|
|
11
|
+
obj.__wbg_ptr = ptr;
|
|
12
|
+
AuthorizeResultFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
13
|
+
return obj;
|
|
12
14
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
function debugString(val) {
|
|
20
|
-
// primitive types
|
|
21
|
-
const type = typeof val;
|
|
22
|
-
if (type == 'number' || type == 'boolean' || val == null) {
|
|
23
|
-
return `${val}`;
|
|
15
|
+
__destroy_into_raw() {
|
|
16
|
+
const ptr = this.__wbg_ptr;
|
|
17
|
+
this.__wbg_ptr = 0;
|
|
18
|
+
AuthorizeResultFinalization.unregister(this);
|
|
19
|
+
return ptr;
|
|
24
20
|
}
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
free() {
|
|
22
|
+
const ptr = this.__destroy_into_raw();
|
|
23
|
+
wasm.__wbg_authorizeresult_free(ptr, 0);
|
|
27
24
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Convert `AuthorizeResult` to json string value
|
|
27
|
+
* @returns {string}
|
|
28
|
+
*/
|
|
29
|
+
json_string() {
|
|
30
|
+
let deferred1_0;
|
|
31
|
+
let deferred1_1;
|
|
32
|
+
try {
|
|
33
|
+
const ret = wasm.authorizeresult_json_string(this.__wbg_ptr);
|
|
34
|
+
deferred1_0 = ret[0];
|
|
35
|
+
deferred1_1 = ret[1];
|
|
36
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
37
|
+
} finally {
|
|
38
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
34
39
|
}
|
|
35
40
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
/**
|
|
42
|
+
* Result of authorization
|
|
43
|
+
* true means `ALLOW`
|
|
44
|
+
* false means `Deny`
|
|
45
|
+
*
|
|
46
|
+
* this field is [`bool`] type to be compatible with [authzen Access Evaluation Decision](https://openid.github.io/authzen/#section-6.2.1).
|
|
47
|
+
* @returns {boolean}
|
|
48
|
+
*/
|
|
49
|
+
get decision() {
|
|
50
|
+
const ret = wasm.__wbg_get_authorizeresult_decision(this.__wbg_ptr);
|
|
51
|
+
return ret !== 0;
|
|
43
52
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
+
/**
|
|
54
|
+
* Request ID of the authorization request
|
|
55
|
+
* @returns {string}
|
|
56
|
+
*/
|
|
57
|
+
get request_id() {
|
|
58
|
+
let deferred1_0;
|
|
59
|
+
let deferred1_1;
|
|
60
|
+
try {
|
|
61
|
+
const ret = wasm.__wbg_get_authorizeresult_request_id(this.__wbg_ptr);
|
|
62
|
+
deferred1_0 = ret[0];
|
|
63
|
+
deferred1_1 = ret[1];
|
|
64
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
65
|
+
} finally {
|
|
66
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
53
67
|
}
|
|
54
|
-
debug += ']';
|
|
55
|
-
return debug;
|
|
56
68
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
return toString.call(val);
|
|
69
|
+
/**
|
|
70
|
+
* Cedar authorization response for the request.
|
|
71
|
+
* @returns {AuthorizeResultResponse}
|
|
72
|
+
*/
|
|
73
|
+
get response() {
|
|
74
|
+
const ret = wasm.__wbg_get_authorizeresult_response(this.__wbg_ptr);
|
|
75
|
+
return AuthorizeResultResponse.__wrap(ret);
|
|
65
76
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
77
|
+
/**
|
|
78
|
+
* Result of authorization
|
|
79
|
+
* true means `ALLOW`
|
|
80
|
+
* false means `Deny`
|
|
81
|
+
*
|
|
82
|
+
* this field is [`bool`] type to be compatible with [authzen Access Evaluation Decision](https://openid.github.io/authzen/#section-6.2.1).
|
|
83
|
+
* @param {boolean} arg0
|
|
84
|
+
*/
|
|
85
|
+
set decision(arg0) {
|
|
86
|
+
wasm.__wbg_set_authorizeresult_decision(this.__wbg_ptr, arg0);
|
|
75
87
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
88
|
+
/**
|
|
89
|
+
* Request ID of the authorization request
|
|
90
|
+
* @param {string} arg0
|
|
91
|
+
*/
|
|
92
|
+
set request_id(arg0) {
|
|
93
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
94
|
+
const len0 = WASM_VECTOR_LEN;
|
|
95
|
+
wasm.__wbg_set_authorizeresult_request_id(this.__wbg_ptr, ptr0, len0);
|
|
79
96
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
89
|
-
result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
|
|
97
|
+
/**
|
|
98
|
+
* Cedar authorization response for the request.
|
|
99
|
+
* @param {AuthorizeResultResponse} arg0
|
|
100
|
+
*/
|
|
101
|
+
set response(arg0) {
|
|
102
|
+
_assertClass(arg0, AuthorizeResultResponse);
|
|
103
|
+
var ptr0 = arg0.__destroy_into_raw();
|
|
104
|
+
wasm.__wbg_set_authorizeresult_response(this.__wbg_ptr, ptr0);
|
|
90
105
|
}
|
|
91
|
-
wasm.__externref_drop_slice(ptr, len);
|
|
92
|
-
return result;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
96
|
-
ptr = ptr >>> 0;
|
|
97
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
98
106
|
}
|
|
107
|
+
if (Symbol.dispose) AuthorizeResult.prototype[Symbol.dispose] = AuthorizeResult.prototype.free;
|
|
108
|
+
exports.AuthorizeResult = AuthorizeResult;
|
|
99
109
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
110
|
+
/**
|
|
111
|
+
* A WASM wrapper for the Rust `cedar_policy::Response` struct.
|
|
112
|
+
* Represents the result of an authorization request.
|
|
113
|
+
*/
|
|
114
|
+
class AuthorizeResultResponse {
|
|
115
|
+
static __wrap(ptr) {
|
|
116
|
+
ptr = ptr >>> 0;
|
|
117
|
+
const obj = Object.create(AuthorizeResultResponse.prototype);
|
|
118
|
+
obj.__wbg_ptr = ptr;
|
|
119
|
+
AuthorizeResultResponseFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
120
|
+
return obj;
|
|
104
121
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
return decodeText(ptr, len);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
let cachedUint8ArrayMemory0 = null;
|
|
114
|
-
function getUint8ArrayMemory0() {
|
|
115
|
-
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
116
|
-
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
122
|
+
__destroy_into_raw() {
|
|
123
|
+
const ptr = this.__wbg_ptr;
|
|
124
|
+
this.__wbg_ptr = 0;
|
|
125
|
+
AuthorizeResultResponseFinalization.unregister(this);
|
|
126
|
+
return ptr;
|
|
117
127
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
128
|
+
free() {
|
|
129
|
+
const ptr = this.__destroy_into_raw();
|
|
130
|
+
wasm.__wbg_authorizeresultresponse_free(ptr, 0);
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Authorization decision
|
|
134
|
+
* @returns {boolean}
|
|
135
|
+
*/
|
|
136
|
+
get decision() {
|
|
137
|
+
const ret = wasm.authorizeresultresponse_decision(this.__wbg_ptr);
|
|
138
|
+
return ret !== 0;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Diagnostics providing more information on how this decision was reached
|
|
142
|
+
* @returns {Diagnostics}
|
|
143
|
+
*/
|
|
144
|
+
get diagnostics() {
|
|
145
|
+
const ret = wasm.authorizeresultresponse_diagnostics(this.__wbg_ptr);
|
|
146
|
+
return Diagnostics.__wrap(ret);
|
|
127
147
|
}
|
|
128
148
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
return x === undefined || x === null;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
function makeMutClosure(arg0, arg1, dtor, f) {
|
|
135
|
-
const state = { a: arg0, b: arg1, cnt: 1, dtor };
|
|
136
|
-
const real = (...args) => {
|
|
137
|
-
|
|
138
|
-
// First up with a closure we increment the internal reference
|
|
139
|
-
// count. This ensures that the Rust closure environment won't
|
|
140
|
-
// be deallocated while we're invoking it.
|
|
141
|
-
state.cnt++;
|
|
142
|
-
const a = state.a;
|
|
143
|
-
state.a = 0;
|
|
144
|
-
try {
|
|
145
|
-
return f(a, state.b, ...args);
|
|
146
|
-
} finally {
|
|
147
|
-
state.a = a;
|
|
148
|
-
real._wbg_cb_unref();
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
real._wbg_cb_unref = () => {
|
|
152
|
-
if (--state.cnt === 0) {
|
|
153
|
-
state.dtor(state.a, state.b);
|
|
154
|
-
state.a = 0;
|
|
155
|
-
CLOSURE_DTORS.unregister(state);
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
CLOSURE_DTORS.register(real, state, state);
|
|
159
|
-
return real;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
163
|
-
if (realloc === undefined) {
|
|
164
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
165
|
-
const ptr = malloc(buf.length, 1) >>> 0;
|
|
166
|
-
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
167
|
-
WASM_VECTOR_LEN = buf.length;
|
|
168
|
-
return ptr;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
let len = arg.length;
|
|
172
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
173
|
-
|
|
174
|
-
const mem = getUint8ArrayMemory0();
|
|
175
|
-
|
|
176
|
-
let offset = 0;
|
|
177
|
-
|
|
178
|
-
for (; offset < len; offset++) {
|
|
179
|
-
const code = arg.charCodeAt(offset);
|
|
180
|
-
if (code > 0x7F) break;
|
|
181
|
-
mem[ptr + offset] = code;
|
|
182
|
-
}
|
|
183
|
-
if (offset !== len) {
|
|
184
|
-
if (offset !== 0) {
|
|
185
|
-
arg = arg.slice(offset);
|
|
186
|
-
}
|
|
187
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
188
|
-
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
189
|
-
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
190
|
-
|
|
191
|
-
offset += ret.written;
|
|
192
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
WASM_VECTOR_LEN = offset;
|
|
196
|
-
return ptr;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
function takeFromExternrefTable0(idx) {
|
|
200
|
-
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
201
|
-
wasm.__externref_table_dealloc(idx);
|
|
202
|
-
return value;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
206
|
-
cachedTextDecoder.decode();
|
|
207
|
-
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
208
|
-
let numBytesDecoded = 0;
|
|
209
|
-
function decodeText(ptr, len) {
|
|
210
|
-
numBytesDecoded += len;
|
|
211
|
-
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
212
|
-
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
213
|
-
cachedTextDecoder.decode();
|
|
214
|
-
numBytesDecoded = len;
|
|
215
|
-
}
|
|
216
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
const cachedTextEncoder = new TextEncoder();
|
|
220
|
-
|
|
221
|
-
if (!('encodeInto' in cachedTextEncoder)) {
|
|
222
|
-
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
223
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
224
|
-
view.set(buf);
|
|
225
|
-
return {
|
|
226
|
-
read: arg.length,
|
|
227
|
-
written: buf.length
|
|
228
|
-
};
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
let WASM_VECTOR_LEN = 0;
|
|
233
|
-
|
|
234
|
-
function wasm_bindgen__convert__closures_____invoke__h8a10b0fb25c32ce7(arg0, arg1) {
|
|
235
|
-
wasm.wasm_bindgen__convert__closures_____invoke__h8a10b0fb25c32ce7(arg0, arg1);
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
function wasm_bindgen__convert__closures_____invoke__h7f8b71809a8d7577(arg0, arg1, arg2) {
|
|
239
|
-
wasm.wasm_bindgen__convert__closures_____invoke__h7f8b71809a8d7577(arg0, arg1, arg2);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
function wasm_bindgen__convert__closures_____invoke__h3a7d0d99d266e2f8(arg0, arg1, arg2, arg3) {
|
|
243
|
-
wasm.wasm_bindgen__convert__closures_____invoke__h3a7d0d99d266e2f8(arg0, arg1, arg2, arg3);
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
|
|
247
|
-
|
|
248
|
-
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
249
|
-
|
|
250
|
-
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
251
|
-
|
|
252
|
-
const AuthorizeResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
253
|
-
? { register: () => {}, unregister: () => {} }
|
|
254
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_authorizeresult_free(ptr >>> 0, 1));
|
|
255
|
-
|
|
256
|
-
const AuthorizeResultResponseFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
257
|
-
? { register: () => {}, unregister: () => {} }
|
|
258
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_authorizeresultresponse_free(ptr >>> 0, 1));
|
|
259
|
-
|
|
260
|
-
const CedarlingFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
261
|
-
? { register: () => {}, unregister: () => {} }
|
|
262
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_cedarling_free(ptr >>> 0, 1));
|
|
263
|
-
|
|
264
|
-
const DiagnosticsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
265
|
-
? { register: () => {}, unregister: () => {} }
|
|
266
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_diagnostics_free(ptr >>> 0, 1));
|
|
267
|
-
|
|
268
|
-
const JsJsonLogicFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
269
|
-
? { register: () => {}, unregister: () => {} }
|
|
270
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_jsjsonlogic_free(ptr >>> 0, 1));
|
|
271
|
-
|
|
272
|
-
const MultiIssuerAuthorizeResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
273
|
-
? { register: () => {}, unregister: () => {} }
|
|
274
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_multiissuerauthorizeresult_free(ptr >>> 0, 1));
|
|
275
|
-
|
|
276
|
-
const PolicyEvaluationErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
277
|
-
? { register: () => {}, unregister: () => {} }
|
|
278
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_policyevaluationerror_free(ptr >>> 0, 1));
|
|
149
|
+
if (Symbol.dispose) AuthorizeResultResponse.prototype[Symbol.dispose] = AuthorizeResultResponse.prototype.free;
|
|
150
|
+
exports.AuthorizeResultResponse = AuthorizeResultResponse;
|
|
279
151
|
|
|
280
152
|
/**
|
|
281
|
-
*
|
|
282
|
-
* Represents the result of an authorization request.
|
|
153
|
+
* The instance of the Cedarling application.
|
|
283
154
|
*/
|
|
284
|
-
|
|
155
|
+
class Cedarling {
|
|
285
156
|
static __wrap(ptr) {
|
|
286
157
|
ptr = ptr >>> 0;
|
|
287
|
-
const obj = Object.create(
|
|
158
|
+
const obj = Object.create(Cedarling.prototype);
|
|
288
159
|
obj.__wbg_ptr = ptr;
|
|
289
|
-
|
|
160
|
+
CedarlingFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
290
161
|
return obj;
|
|
291
162
|
}
|
|
292
163
|
__destroy_into_raw() {
|
|
293
164
|
const ptr = this.__wbg_ptr;
|
|
294
165
|
this.__wbg_ptr = 0;
|
|
295
|
-
|
|
166
|
+
CedarlingFinalization.unregister(this);
|
|
296
167
|
return ptr;
|
|
297
168
|
}
|
|
298
169
|
free() {
|
|
299
170
|
const ptr = this.__destroy_into_raw();
|
|
300
|
-
wasm.
|
|
171
|
+
wasm.__wbg_cedarling_free(ptr, 0);
|
|
301
172
|
}
|
|
302
173
|
/**
|
|
303
|
-
*
|
|
304
|
-
*
|
|
174
|
+
* Authorize multi-issuer request.
|
|
175
|
+
* Makes authorization decision based on multiple JWT tokens from different issuers
|
|
176
|
+
* @param {any} request
|
|
177
|
+
* @returns {Promise<MultiIssuerAuthorizeResult>}
|
|
305
178
|
*/
|
|
306
|
-
|
|
307
|
-
const ret = wasm.
|
|
308
|
-
return ret
|
|
179
|
+
authorize_multi_issuer(request) {
|
|
180
|
+
const ret = wasm.cedarling_authorize_multi_issuer(this.__wbg_ptr, request);
|
|
181
|
+
return ret;
|
|
309
182
|
}
|
|
310
183
|
/**
|
|
311
|
-
*
|
|
312
|
-
*
|
|
184
|
+
* Authorize an unsigned request carrying an optional single principal.
|
|
185
|
+
* Makes an authorization decision based on the [`RequestUnsigned`].
|
|
186
|
+
*
|
|
187
|
+
* When `principal` is omitted / `null` on the JS side the core uses Cedar
|
|
188
|
+
* partial evaluation; residual-dependent requests fail closed with
|
|
189
|
+
* `Decision::Deny` and surface residual policy ids in
|
|
190
|
+
* `response.diagnostics.reason`.
|
|
191
|
+
* @param {any} request
|
|
192
|
+
* @returns {Promise<AuthorizeResult>}
|
|
313
193
|
*/
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
_assertClass(arg0, AuthorizeResultResponse);
|
|
318
|
-
ptr0 = arg0.__destroy_into_raw();
|
|
319
|
-
}
|
|
320
|
-
wasm.__wbg_set_authorizeresult_workload(this.__wbg_ptr, ptr0);
|
|
194
|
+
authorize_unsigned(request) {
|
|
195
|
+
const ret = wasm.cedarling_authorize_unsigned(this.__wbg_ptr, request);
|
|
196
|
+
return ret;
|
|
321
197
|
}
|
|
322
198
|
/**
|
|
323
|
-
*
|
|
324
|
-
*
|
|
199
|
+
* Clear all entries from the data store.
|
|
200
|
+
*
|
|
201
|
+
* # Example
|
|
202
|
+
*
|
|
203
|
+
* ```javascript
|
|
204
|
+
* cedarling.clear_data_ctx();
|
|
205
|
+
* console.log("All data entries cleared");
|
|
206
|
+
* ```
|
|
325
207
|
*/
|
|
326
|
-
|
|
327
|
-
const ret = wasm.
|
|
328
|
-
|
|
208
|
+
clear_data_ctx() {
|
|
209
|
+
const ret = wasm.cedarling_clear_data_ctx(this.__wbg_ptr);
|
|
210
|
+
if (ret[1]) {
|
|
211
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
212
|
+
}
|
|
329
213
|
}
|
|
330
214
|
/**
|
|
331
|
-
*
|
|
332
|
-
*
|
|
215
|
+
* Get trusted issuer identifiers that failed to load.
|
|
216
|
+
*
|
|
217
|
+
* # Example
|
|
218
|
+
*
|
|
219
|
+
* ```javascript
|
|
220
|
+
* const ids = cedarling.failed_trusted_issuer_ids();
|
|
221
|
+
* ```
|
|
222
|
+
* @returns {Array<any>}
|
|
333
223
|
*/
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
_assertClass(arg0, AuthorizeResultResponse);
|
|
338
|
-
ptr0 = arg0.__destroy_into_raw();
|
|
339
|
-
}
|
|
340
|
-
wasm.__wbg_set_authorizeresult_person(this.__wbg_ptr, ptr0);
|
|
224
|
+
failed_trusted_issuer_ids() {
|
|
225
|
+
const ret = wasm.cedarling_failed_trusted_issuer_ids(this.__wbg_ptr);
|
|
226
|
+
return ret;
|
|
341
227
|
}
|
|
342
228
|
/**
|
|
343
|
-
*
|
|
344
|
-
*
|
|
345
|
-
* false means `Deny`
|
|
229
|
+
* Get a value from the data store by key.
|
|
230
|
+
* Returns null if the key doesn't exist or the entry has expired.
|
|
346
231
|
*
|
|
347
|
-
*
|
|
348
|
-
*
|
|
232
|
+
* # Arguments
|
|
233
|
+
*
|
|
234
|
+
* * `key` - A string key for the data entry to retrieve
|
|
235
|
+
*
|
|
236
|
+
* # Example
|
|
237
|
+
*
|
|
238
|
+
* ```javascript
|
|
239
|
+
* const value = cedarling.get_data_ctx("user:123");
|
|
240
|
+
* if (value !== null) {
|
|
241
|
+
* console.log(value.name); // "John"
|
|
242
|
+
* }
|
|
243
|
+
* ```
|
|
244
|
+
* @param {string} key
|
|
245
|
+
* @returns {any}
|
|
349
246
|
*/
|
|
350
|
-
|
|
351
|
-
const
|
|
352
|
-
|
|
247
|
+
get_data_ctx(key) {
|
|
248
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
249
|
+
const len0 = WASM_VECTOR_LEN;
|
|
250
|
+
const ret = wasm.cedarling_get_data_ctx(this.__wbg_ptr, ptr0, len0);
|
|
251
|
+
if (ret[2]) {
|
|
252
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
253
|
+
}
|
|
254
|
+
return takeFromExternrefTable0(ret[0]);
|
|
353
255
|
}
|
|
354
256
|
/**
|
|
355
|
-
*
|
|
356
|
-
*
|
|
357
|
-
* false means `Deny`
|
|
257
|
+
* Get a data entry with full metadata by key.
|
|
258
|
+
* Returns null if the key doesn't exist or the entry has expired.
|
|
358
259
|
*
|
|
359
|
-
*
|
|
360
|
-
*
|
|
260
|
+
* # Arguments
|
|
261
|
+
*
|
|
262
|
+
* * `key` - A string key for the data entry to retrieve
|
|
263
|
+
*
|
|
264
|
+
* # Example
|
|
265
|
+
*
|
|
266
|
+
* ```javascript
|
|
267
|
+
* const entry = cedarling.get_data_entry_ctx("user:123");
|
|
268
|
+
* if (entry !== null) {
|
|
269
|
+
* console.log(entry.key); // "user:123"
|
|
270
|
+
* console.log(entry.value); // { name: "John", age: 30 }
|
|
271
|
+
* console.log(entry.data_type); // "Record"
|
|
272
|
+
* console.log(entry.created_at); // "2024-01-01T12:00:00Z"
|
|
273
|
+
* console.log(entry.access_count); // 5
|
|
274
|
+
* }
|
|
275
|
+
* ```
|
|
276
|
+
* @param {string} key
|
|
277
|
+
* @returns {DataEntry | undefined}
|
|
361
278
|
*/
|
|
362
|
-
|
|
363
|
-
wasm.
|
|
279
|
+
get_data_entry_ctx(key) {
|
|
280
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
281
|
+
const len0 = WASM_VECTOR_LEN;
|
|
282
|
+
const ret = wasm.cedarling_get_data_entry_ctx(this.__wbg_ptr, ptr0, len0);
|
|
283
|
+
if (ret[2]) {
|
|
284
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
285
|
+
}
|
|
286
|
+
return ret[0] === 0 ? undefined : DataEntry.__wrap(ret[0]);
|
|
364
287
|
}
|
|
365
288
|
/**
|
|
366
|
-
*
|
|
367
|
-
*
|
|
289
|
+
* Get specific log entry.
|
|
290
|
+
* Returns `Map` with values or `null`.
|
|
291
|
+
* @param {string} id
|
|
292
|
+
* @returns {any}
|
|
368
293
|
*/
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
deferred1_1 = ret[1];
|
|
376
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
377
|
-
} finally {
|
|
378
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
294
|
+
get_log_by_id(id) {
|
|
295
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
296
|
+
const len0 = WASM_VECTOR_LEN;
|
|
297
|
+
const ret = wasm.cedarling_get_log_by_id(this.__wbg_ptr, ptr0, len0);
|
|
298
|
+
if (ret[2]) {
|
|
299
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
379
300
|
}
|
|
301
|
+
return takeFromExternrefTable0(ret[0]);
|
|
380
302
|
}
|
|
381
303
|
/**
|
|
382
|
-
*
|
|
383
|
-
*
|
|
304
|
+
* Returns a list of all log ids.
|
|
305
|
+
* Returns `Array` of `String`
|
|
306
|
+
* @returns {Array<any>}
|
|
384
307
|
*/
|
|
385
|
-
|
|
386
|
-
const
|
|
387
|
-
|
|
388
|
-
wasm.__wbg_set_authorizeresult_request_id(this.__wbg_ptr, ptr0, len0);
|
|
308
|
+
get_log_ids() {
|
|
309
|
+
const ret = wasm.cedarling_get_log_ids(this.__wbg_ptr);
|
|
310
|
+
return ret;
|
|
389
311
|
}
|
|
390
312
|
/**
|
|
391
|
-
*
|
|
392
|
-
*
|
|
313
|
+
* Get logs by request_id.
|
|
314
|
+
* Return log entries that match the given request_id.
|
|
315
|
+
* @param {string} request_id
|
|
316
|
+
* @returns {any[]}
|
|
393
317
|
*/
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
deferred1_1 = ret[1];
|
|
401
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
402
|
-
} finally {
|
|
403
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
318
|
+
get_logs_by_request_id(request_id) {
|
|
319
|
+
const ptr0 = passStringToWasm0(request_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
320
|
+
const len0 = WASM_VECTOR_LEN;
|
|
321
|
+
const ret = wasm.cedarling_get_logs_by_request_id(this.__wbg_ptr, ptr0, len0);
|
|
322
|
+
if (ret[3]) {
|
|
323
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
404
324
|
}
|
|
325
|
+
var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
326
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
327
|
+
return v2;
|
|
405
328
|
}
|
|
406
329
|
/**
|
|
407
|
-
*
|
|
408
|
-
*
|
|
330
|
+
* Get log by request_id and tag, like composite key `request_id` + `log_kind`.
|
|
331
|
+
* Tag can be `log_kind`, `log_level`.
|
|
332
|
+
* Return log entries that match the given request_id and tag.
|
|
333
|
+
* @param {string} request_id
|
|
334
|
+
* @param {string} tag
|
|
335
|
+
* @returns {any[]}
|
|
409
336
|
*/
|
|
410
|
-
|
|
411
|
-
const ptr0 = passStringToWasm0(
|
|
337
|
+
get_logs_by_request_id_and_tag(request_id, tag) {
|
|
338
|
+
const ptr0 = passStringToWasm0(request_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
412
339
|
const len0 = WASM_VECTOR_LEN;
|
|
413
|
-
const
|
|
414
|
-
|
|
340
|
+
const ptr1 = passStringToWasm0(tag, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
341
|
+
const len1 = WASM_VECTOR_LEN;
|
|
342
|
+
const ret = wasm.cedarling_get_logs_by_request_id_and_tag(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
343
|
+
if (ret[3]) {
|
|
344
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
345
|
+
}
|
|
346
|
+
var v3 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
347
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
348
|
+
return v3;
|
|
415
349
|
}
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
const ptr = this.__wbg_ptr;
|
|
433
|
-
this.__wbg_ptr = 0;
|
|
434
|
-
AuthorizeResultResponseFinalization.unregister(this);
|
|
435
|
-
return ptr;
|
|
350
|
+
/**
|
|
351
|
+
* Get logs by tag, like `log_kind` or `log level`.
|
|
352
|
+
* Tag can be `log_kind`, `log_level`.
|
|
353
|
+
* @param {string} tag
|
|
354
|
+
* @returns {any[]}
|
|
355
|
+
*/
|
|
356
|
+
get_logs_by_tag(tag) {
|
|
357
|
+
const ptr0 = passStringToWasm0(tag, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
358
|
+
const len0 = WASM_VECTOR_LEN;
|
|
359
|
+
const ret = wasm.cedarling_get_logs_by_tag(this.__wbg_ptr, ptr0, len0);
|
|
360
|
+
if (ret[3]) {
|
|
361
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
362
|
+
}
|
|
363
|
+
var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
364
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
365
|
+
return v2;
|
|
436
366
|
}
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
367
|
+
/**
|
|
368
|
+
* Get statistics about the data store.
|
|
369
|
+
*
|
|
370
|
+
* # Example
|
|
371
|
+
*
|
|
372
|
+
* ```javascript
|
|
373
|
+
* const stats = cedarling.get_stats_ctx();
|
|
374
|
+
* console.log(`Entries: ${stats.entry_count}/${stats.max_entries || 'unlimited'}`);
|
|
375
|
+
* console.log(`Capacity: ${stats.capacity_usage_percent.toFixed(2)}%`);
|
|
376
|
+
* console.log(`Total size: ${stats.total_size_bytes} bytes`);
|
|
377
|
+
* ```
|
|
378
|
+
* @returns {DataStoreStats}
|
|
379
|
+
*/
|
|
380
|
+
get_stats_ctx() {
|
|
381
|
+
const ret = wasm.cedarling_get_stats_ctx(this.__wbg_ptr);
|
|
382
|
+
if (ret[2]) {
|
|
383
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
384
|
+
}
|
|
385
|
+
return DataStoreStats.__wrap(ret[0]);
|
|
440
386
|
}
|
|
441
387
|
/**
|
|
442
|
-
*
|
|
388
|
+
* Check whether a trusted issuer was loaded by `iss` claim.
|
|
389
|
+
*
|
|
390
|
+
* # Arguments
|
|
391
|
+
*
|
|
392
|
+
* * `iss_claim` - Issuer `iss` claim value to check.
|
|
393
|
+
*
|
|
394
|
+
* # Example
|
|
395
|
+
*
|
|
396
|
+
* ```javascript
|
|
397
|
+
* const ok = cedarling.is_trusted_issuer_loaded_by_iss("https://issuer.example.org");
|
|
398
|
+
* ```
|
|
399
|
+
* @param {string} iss_claim
|
|
443
400
|
* @returns {boolean}
|
|
444
401
|
*/
|
|
445
|
-
|
|
446
|
-
const
|
|
402
|
+
is_trusted_issuer_loaded_by_iss(iss_claim) {
|
|
403
|
+
const ptr0 = passStringToWasm0(iss_claim, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
404
|
+
const len0 = WASM_VECTOR_LEN;
|
|
405
|
+
const ret = wasm.cedarling_is_trusted_issuer_loaded_by_iss(this.__wbg_ptr, ptr0, len0);
|
|
447
406
|
return ret !== 0;
|
|
448
407
|
}
|
|
449
408
|
/**
|
|
450
|
-
*
|
|
451
|
-
*
|
|
409
|
+
* Check whether a trusted issuer was loaded by issuer identifier.
|
|
410
|
+
*
|
|
411
|
+
* # Arguments
|
|
412
|
+
*
|
|
413
|
+
* * `issuer_id` - Trusted issuer identifier to check.
|
|
414
|
+
*
|
|
415
|
+
* # Example
|
|
416
|
+
*
|
|
417
|
+
* ```javascript
|
|
418
|
+
* const ok = cedarling.is_trusted_issuer_loaded_by_name("issuer_id");
|
|
419
|
+
* ```
|
|
420
|
+
* @param {string} issuer_id
|
|
421
|
+
* @returns {boolean}
|
|
452
422
|
*/
|
|
453
|
-
|
|
454
|
-
const
|
|
455
|
-
|
|
423
|
+
is_trusted_issuer_loaded_by_name(issuer_id) {
|
|
424
|
+
const ptr0 = passStringToWasm0(issuer_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
425
|
+
const len0 = WASM_VECTOR_LEN;
|
|
426
|
+
const ret = wasm.cedarling_is_trusted_issuer_loaded_by_name(this.__wbg_ptr, ptr0, len0);
|
|
427
|
+
return ret !== 0;
|
|
456
428
|
}
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
429
|
+
/**
|
|
430
|
+
* List all entries with their metadata.
|
|
431
|
+
* Returns an array of DataEntry objects.
|
|
432
|
+
*
|
|
433
|
+
* # Example
|
|
434
|
+
*
|
|
435
|
+
* ```javascript
|
|
436
|
+
* const entries = cedarling.list_data_ctx();
|
|
437
|
+
* entries.forEach(entry => {
|
|
438
|
+
* console.log(`${entry.key}: ${entry.data_type} (accessed ${entry.access_count} times)`);
|
|
439
|
+
* });
|
|
440
|
+
* ```
|
|
441
|
+
* @returns {Array<any>}
|
|
442
|
+
*/
|
|
443
|
+
list_data_ctx() {
|
|
444
|
+
const ret = wasm.cedarling_list_data_ctx(this.__wbg_ptr);
|
|
445
|
+
if (ret[2]) {
|
|
446
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
447
|
+
}
|
|
448
|
+
return takeFromExternrefTable0(ret[0]);
|
|
470
449
|
}
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
450
|
+
/**
|
|
451
|
+
* Get trusted issuer identifiers loaded successfully.
|
|
452
|
+
*
|
|
453
|
+
* # Example
|
|
454
|
+
*
|
|
455
|
+
* ```javascript
|
|
456
|
+
* const ids = cedarling.loaded_trusted_issuer_ids();
|
|
457
|
+
* ```
|
|
458
|
+
* @returns {Array<any>}
|
|
459
|
+
*/
|
|
460
|
+
loaded_trusted_issuer_ids() {
|
|
461
|
+
const ret = wasm.cedarling_loaded_trusted_issuer_ids(this.__wbg_ptr);
|
|
462
|
+
return ret;
|
|
476
463
|
}
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
464
|
+
/**
|
|
465
|
+
* Get the number of trusted issuers loaded successfully.
|
|
466
|
+
*
|
|
467
|
+
* # Example
|
|
468
|
+
*
|
|
469
|
+
* ```javascript
|
|
470
|
+
* const loadedCount = cedarling.loaded_trusted_issuers_count();
|
|
471
|
+
* ```
|
|
472
|
+
* @returns {number}
|
|
473
|
+
*/
|
|
474
|
+
loaded_trusted_issuers_count() {
|
|
475
|
+
const ret = wasm.cedarling_loaded_trusted_issuers_count(this.__wbg_ptr);
|
|
476
|
+
return ret >>> 0;
|
|
480
477
|
}
|
|
481
478
|
/**
|
|
482
479
|
* Create a new instance of the Cedarling application.
|
|
@@ -498,36 +495,6 @@ export class Cedarling {
|
|
|
498
495
|
const ret = wasm.cedarling_new_from_map(config);
|
|
499
496
|
return ret;
|
|
500
497
|
}
|
|
501
|
-
/**
|
|
502
|
-
* Authorize request
|
|
503
|
-
* makes authorization decision based on the [`Request`]
|
|
504
|
-
* @param {any} request
|
|
505
|
-
* @returns {Promise<AuthorizeResult>}
|
|
506
|
-
*/
|
|
507
|
-
authorize(request) {
|
|
508
|
-
const ret = wasm.cedarling_authorize(this.__wbg_ptr, request);
|
|
509
|
-
return ret;
|
|
510
|
-
}
|
|
511
|
-
/**
|
|
512
|
-
* Authorize request for unsigned principals.
|
|
513
|
-
* makes authorization decision based on the [`RequestUnsigned`]
|
|
514
|
-
* @param {any} request
|
|
515
|
-
* @returns {Promise<AuthorizeResult>}
|
|
516
|
-
*/
|
|
517
|
-
authorize_unsigned(request) {
|
|
518
|
-
const ret = wasm.cedarling_authorize_unsigned(this.__wbg_ptr, request);
|
|
519
|
-
return ret;
|
|
520
|
-
}
|
|
521
|
-
/**
|
|
522
|
-
* Authorize multi-issuer request.
|
|
523
|
-
* Makes authorization decision based on multiple JWT tokens from different issuers
|
|
524
|
-
* @param {any} request
|
|
525
|
-
* @returns {Promise<MultiIssuerAuthorizeResult>}
|
|
526
|
-
*/
|
|
527
|
-
authorize_multi_issuer(request) {
|
|
528
|
-
const ret = wasm.cedarling_authorize_multi_issuer(this.__wbg_ptr, request);
|
|
529
|
-
return ret;
|
|
530
|
-
}
|
|
531
498
|
/**
|
|
532
499
|
* Get logs and remove them from the storage.
|
|
533
500
|
* Returns `Array` of `Map`
|
|
@@ -541,83 +508,61 @@ export class Cedarling {
|
|
|
541
508
|
return takeFromExternrefTable0(ret[0]);
|
|
542
509
|
}
|
|
543
510
|
/**
|
|
544
|
-
*
|
|
545
|
-
*
|
|
546
|
-
*
|
|
547
|
-
*
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
*
|
|
560
|
-
*
|
|
561
|
-
* @
|
|
562
|
-
|
|
563
|
-
get_log_ids() {
|
|
564
|
-
const ret = wasm.cedarling_get_log_ids(this.__wbg_ptr);
|
|
565
|
-
return ret;
|
|
566
|
-
}
|
|
567
|
-
/**
|
|
568
|
-
* Get logs by tag, like `log_kind` or `log level`.
|
|
569
|
-
* Tag can be `log_kind`, `log_level`.
|
|
570
|
-
* @param {string} tag
|
|
571
|
-
* @returns {any[]}
|
|
572
|
-
*/
|
|
573
|
-
get_logs_by_tag(tag) {
|
|
574
|
-
const ptr0 = passStringToWasm0(tag, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
575
|
-
const len0 = WASM_VECTOR_LEN;
|
|
576
|
-
const ret = wasm.cedarling_get_logs_by_tag(this.__wbg_ptr, ptr0, len0);
|
|
577
|
-
if (ret[3]) {
|
|
578
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
579
|
-
}
|
|
580
|
-
var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
581
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
582
|
-
return v2;
|
|
583
|
-
}
|
|
584
|
-
/**
|
|
585
|
-
* Get logs by request_id.
|
|
586
|
-
* Return log entries that match the given request_id.
|
|
587
|
-
* @param {string} request_id
|
|
588
|
-
* @returns {any[]}
|
|
511
|
+
* Push a value into the data store with an optional TTL.
|
|
512
|
+
* If the key already exists, the value will be replaced.
|
|
513
|
+
* If TTL is not provided, the default TTL from configuration is used.
|
|
514
|
+
*
|
|
515
|
+
* # Arguments
|
|
516
|
+
*
|
|
517
|
+
* * `key` - A string key for the data entry (must not be empty)
|
|
518
|
+
* * `value` - The value to store (any JSON-serializable JavaScript value: object, array, string, number, boolean)
|
|
519
|
+
* * `ttl_secs` - Optional TTL in seconds (undefined/null uses default from config)
|
|
520
|
+
*
|
|
521
|
+
* # Example
|
|
522
|
+
*
|
|
523
|
+
* ```javascript
|
|
524
|
+
* cedarling.push_data_ctx("user:123", { name: "John", age: 30 }, 3600);
|
|
525
|
+
* cedarling.push_data_ctx("config", { setting: "value" }); // Uses default TTL
|
|
526
|
+
* ```
|
|
527
|
+
* @param {string} key
|
|
528
|
+
* @param {any} value
|
|
529
|
+
* @param {bigint | null} [ttl_secs]
|
|
589
530
|
*/
|
|
590
|
-
|
|
591
|
-
const ptr0 = passStringToWasm0(
|
|
531
|
+
push_data_ctx(key, value, ttl_secs) {
|
|
532
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
592
533
|
const len0 = WASM_VECTOR_LEN;
|
|
593
|
-
const ret = wasm.
|
|
594
|
-
if (ret[
|
|
595
|
-
throw takeFromExternrefTable0(ret[
|
|
534
|
+
const ret = wasm.cedarling_push_data_ctx(this.__wbg_ptr, ptr0, len0, value, !isLikeNone(ttl_secs), isLikeNone(ttl_secs) ? BigInt(0) : ttl_secs);
|
|
535
|
+
if (ret[1]) {
|
|
536
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
596
537
|
}
|
|
597
|
-
var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
598
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
599
|
-
return v2;
|
|
600
538
|
}
|
|
601
539
|
/**
|
|
602
|
-
*
|
|
603
|
-
*
|
|
604
|
-
*
|
|
605
|
-
*
|
|
606
|
-
*
|
|
607
|
-
*
|
|
540
|
+
* Remove a value from the data store by key.
|
|
541
|
+
* Returns true if the key existed and was removed, false otherwise.
|
|
542
|
+
*
|
|
543
|
+
* # Arguments
|
|
544
|
+
*
|
|
545
|
+
* * `key` - A string key for the data entry to remove
|
|
546
|
+
*
|
|
547
|
+
* # Example
|
|
548
|
+
*
|
|
549
|
+
* ```javascript
|
|
550
|
+
* const removed = cedarling.remove_data_ctx("user:123");
|
|
551
|
+
* if (removed) {
|
|
552
|
+
* console.log("Entry was successfully removed");
|
|
553
|
+
* }
|
|
554
|
+
* ```
|
|
555
|
+
* @param {string} key
|
|
556
|
+
* @returns {boolean}
|
|
608
557
|
*/
|
|
609
|
-
|
|
610
|
-
const ptr0 = passStringToWasm0(
|
|
558
|
+
remove_data_ctx(key) {
|
|
559
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
611
560
|
const len0 = WASM_VECTOR_LEN;
|
|
612
|
-
const
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
if (ret[3]) {
|
|
616
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
561
|
+
const ret = wasm.cedarling_remove_data_ctx(this.__wbg_ptr, ptr0, len0);
|
|
562
|
+
if (ret[2]) {
|
|
563
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
617
564
|
}
|
|
618
|
-
|
|
619
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
620
|
-
return v3;
|
|
565
|
+
return ret[0] !== 0;
|
|
621
566
|
}
|
|
622
567
|
/**
|
|
623
568
|
* Closes the connections to the Lock Server and pushes all available logs.
|
|
@@ -627,159 +572,106 @@ export class Cedarling {
|
|
|
627
572
|
const ret = wasm.cedarling_shut_down(this.__wbg_ptr);
|
|
628
573
|
return ret;
|
|
629
574
|
}
|
|
575
|
+
/**
|
|
576
|
+
* Get the total number of trusted issuer entries discovered.
|
|
577
|
+
*
|
|
578
|
+
* # Example
|
|
579
|
+
*
|
|
580
|
+
* ```javascript
|
|
581
|
+
* const total = cedarling.total_issuers();
|
|
582
|
+
* ```
|
|
583
|
+
* @returns {number}
|
|
584
|
+
*/
|
|
585
|
+
total_issuers() {
|
|
586
|
+
const ret = wasm.cedarling_total_issuers(this.__wbg_ptr);
|
|
587
|
+
return ret >>> 0;
|
|
588
|
+
}
|
|
630
589
|
}
|
|
631
590
|
if (Symbol.dispose) Cedarling.prototype[Symbol.dispose] = Cedarling.prototype.free;
|
|
591
|
+
exports.Cedarling = Cedarling;
|
|
632
592
|
|
|
633
593
|
/**
|
|
634
|
-
*
|
|
635
|
-
*
|
|
636
|
-
*
|
|
637
|
-
* Provides detailed information about how a policy decision was made, including policies that contributed to the decision and any errors encountered during evaluation.
|
|
594
|
+
* A WASM wrapper for the Rust `cedarling::DataEntry` struct.
|
|
595
|
+
* Represents a data entry in the DataStore with value and metadata.
|
|
638
596
|
*/
|
|
639
|
-
|
|
597
|
+
class DataEntry {
|
|
640
598
|
static __wrap(ptr) {
|
|
641
599
|
ptr = ptr >>> 0;
|
|
642
|
-
const obj = Object.create(
|
|
600
|
+
const obj = Object.create(DataEntry.prototype);
|
|
643
601
|
obj.__wbg_ptr = ptr;
|
|
644
|
-
|
|
602
|
+
DataEntryFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
645
603
|
return obj;
|
|
646
604
|
}
|
|
647
605
|
__destroy_into_raw() {
|
|
648
606
|
const ptr = this.__wbg_ptr;
|
|
649
607
|
this.__wbg_ptr = 0;
|
|
650
|
-
|
|
608
|
+
DataEntryFinalization.unregister(this);
|
|
651
609
|
return ptr;
|
|
652
610
|
}
|
|
653
611
|
free() {
|
|
654
612
|
const ptr = this.__destroy_into_raw();
|
|
655
|
-
wasm.
|
|
656
|
-
}
|
|
657
|
-
/**
|
|
658
|
-
* `PolicyId`s of the policies that contributed to the decision.
|
|
659
|
-
* If no policies applied to the request, this set will be empty.
|
|
660
|
-
*
|
|
661
|
-
* The ids should be treated as unordered,
|
|
662
|
-
* @returns {string[]}
|
|
663
|
-
*/
|
|
664
|
-
get reason() {
|
|
665
|
-
const ret = wasm.diagnostics_reason(this.__wbg_ptr);
|
|
666
|
-
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
667
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
668
|
-
return v1;
|
|
613
|
+
wasm.__wbg_dataentry_free(ptr, 0);
|
|
669
614
|
}
|
|
670
615
|
/**
|
|
671
|
-
*
|
|
672
|
-
*
|
|
673
|
-
* @returns {PolicyEvaluationError[]}
|
|
616
|
+
* Convert `DataEntry` to json string value
|
|
617
|
+
* @returns {string}
|
|
674
618
|
*/
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
const ptr = this.__wbg_ptr;
|
|
687
|
-
this.__wbg_ptr = 0;
|
|
688
|
-
JsJsonLogicFinalization.unregister(this);
|
|
689
|
-
return ptr;
|
|
690
|
-
}
|
|
691
|
-
free() {
|
|
692
|
-
const ptr = this.__destroy_into_raw();
|
|
693
|
-
wasm.__wbg_jsjsonlogic_free(ptr, 0);
|
|
694
|
-
}
|
|
695
|
-
constructor() {
|
|
696
|
-
const ret = wasm.jsjsonlogic_new();
|
|
697
|
-
this.__wbg_ptr = ret >>> 0;
|
|
698
|
-
JsJsonLogicFinalization.register(this, this.__wbg_ptr, this);
|
|
699
|
-
return this;
|
|
619
|
+
json_string() {
|
|
620
|
+
let deferred1_0;
|
|
621
|
+
let deferred1_1;
|
|
622
|
+
try {
|
|
623
|
+
const ret = wasm.dataentry_json_string(this.__wbg_ptr);
|
|
624
|
+
deferred1_0 = ret[0];
|
|
625
|
+
deferred1_1 = ret[1];
|
|
626
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
627
|
+
} finally {
|
|
628
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
629
|
+
}
|
|
700
630
|
}
|
|
701
631
|
/**
|
|
702
|
-
*
|
|
703
|
-
* @param {any} data
|
|
632
|
+
* Get the value stored in this entry as a JavaScript object
|
|
704
633
|
* @returns {any}
|
|
705
634
|
*/
|
|
706
|
-
|
|
707
|
-
const ret = wasm.
|
|
635
|
+
value() {
|
|
636
|
+
const ret = wasm.dataentry_value(this.__wbg_ptr);
|
|
708
637
|
if (ret[2]) {
|
|
709
638
|
throw takeFromExternrefTable0(ret[1]);
|
|
710
639
|
}
|
|
711
640
|
return takeFromExternrefTable0(ret[0]);
|
|
712
641
|
}
|
|
713
|
-
}
|
|
714
|
-
if (Symbol.dispose) JsJsonLogic.prototype[Symbol.dispose] = JsJsonLogic.prototype.free;
|
|
715
|
-
|
|
716
|
-
/**
|
|
717
|
-
* A WASM wrapper for the Rust `cedarling::MultiIssuerAuthorizeResult` struct.
|
|
718
|
-
* Represents the result of a multi-issuer authorization request.
|
|
719
|
-
*/
|
|
720
|
-
export class MultiIssuerAuthorizeResult {
|
|
721
|
-
static __wrap(ptr) {
|
|
722
|
-
ptr = ptr >>> 0;
|
|
723
|
-
const obj = Object.create(MultiIssuerAuthorizeResult.prototype);
|
|
724
|
-
obj.__wbg_ptr = ptr;
|
|
725
|
-
MultiIssuerAuthorizeResultFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
726
|
-
return obj;
|
|
727
|
-
}
|
|
728
|
-
__destroy_into_raw() {
|
|
729
|
-
const ptr = this.__wbg_ptr;
|
|
730
|
-
this.__wbg_ptr = 0;
|
|
731
|
-
MultiIssuerAuthorizeResultFinalization.unregister(this);
|
|
732
|
-
return ptr;
|
|
733
|
-
}
|
|
734
|
-
free() {
|
|
735
|
-
const ptr = this.__destroy_into_raw();
|
|
736
|
-
wasm.__wbg_multiissuerauthorizeresult_free(ptr, 0);
|
|
737
|
-
}
|
|
738
|
-
/**
|
|
739
|
-
* Result of Cedar policy authorization
|
|
740
|
-
* @returns {AuthorizeResultResponse}
|
|
741
|
-
*/
|
|
742
|
-
get response() {
|
|
743
|
-
const ret = wasm.__wbg_get_multiissuerauthorizeresult_response(this.__wbg_ptr);
|
|
744
|
-
return AuthorizeResultResponse.__wrap(ret);
|
|
745
|
-
}
|
|
746
|
-
/**
|
|
747
|
-
* Result of Cedar policy authorization
|
|
748
|
-
* @param {AuthorizeResultResponse} arg0
|
|
749
|
-
*/
|
|
750
|
-
set response(arg0) {
|
|
751
|
-
_assertClass(arg0, AuthorizeResultResponse);
|
|
752
|
-
var ptr0 = arg0.__destroy_into_raw();
|
|
753
|
-
wasm.__wbg_set_multiissuerauthorizeresult_response(this.__wbg_ptr, ptr0);
|
|
754
|
-
}
|
|
755
642
|
/**
|
|
756
|
-
*
|
|
757
|
-
*
|
|
758
|
-
* false means `Deny`
|
|
759
|
-
* @returns {boolean}
|
|
643
|
+
* Number of times this entry has been accessed
|
|
644
|
+
* @returns {bigint}
|
|
760
645
|
*/
|
|
761
|
-
get
|
|
762
|
-
const ret = wasm.
|
|
763
|
-
return ret
|
|
646
|
+
get access_count() {
|
|
647
|
+
const ret = wasm.__wbg_get_dataentry_access_count(this.__wbg_ptr);
|
|
648
|
+
return BigInt.asUintN(64, ret);
|
|
764
649
|
}
|
|
765
650
|
/**
|
|
766
|
-
*
|
|
767
|
-
*
|
|
768
|
-
* false means `Deny`
|
|
769
|
-
* @param {boolean} arg0
|
|
651
|
+
* Timestamp when this entry was created (RFC 3339 format)
|
|
652
|
+
* @returns {string}
|
|
770
653
|
*/
|
|
771
|
-
|
|
772
|
-
|
|
654
|
+
get created_at() {
|
|
655
|
+
let deferred1_0;
|
|
656
|
+
let deferred1_1;
|
|
657
|
+
try {
|
|
658
|
+
const ret = wasm.__wbg_get_dataentry_created_at(this.__wbg_ptr);
|
|
659
|
+
deferred1_0 = ret[0];
|
|
660
|
+
deferred1_1 = ret[1];
|
|
661
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
662
|
+
} finally {
|
|
663
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
664
|
+
}
|
|
773
665
|
}
|
|
774
666
|
/**
|
|
775
|
-
*
|
|
667
|
+
* The inferred Cedar type of the value
|
|
776
668
|
* @returns {string}
|
|
777
669
|
*/
|
|
778
|
-
get
|
|
670
|
+
get data_type() {
|
|
779
671
|
let deferred1_0;
|
|
780
672
|
let deferred1_1;
|
|
781
673
|
try {
|
|
782
|
-
const ret = wasm.
|
|
674
|
+
const ret = wasm.__wbg_get_dataentry_data_type(this.__wbg_ptr);
|
|
783
675
|
deferred1_0 = ret[0];
|
|
784
676
|
deferred1_1 = ret[1];
|
|
785
677
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -788,23 +680,27 @@ export class MultiIssuerAuthorizeResult {
|
|
|
788
680
|
}
|
|
789
681
|
}
|
|
790
682
|
/**
|
|
791
|
-
*
|
|
792
|
-
* @
|
|
683
|
+
* Timestamp when this entry expires (RFC 3339 format), or null if no TTL
|
|
684
|
+
* @returns {string | undefined}
|
|
793
685
|
*/
|
|
794
|
-
|
|
795
|
-
const
|
|
796
|
-
|
|
797
|
-
|
|
686
|
+
get expires_at() {
|
|
687
|
+
const ret = wasm.__wbg_get_dataentry_expires_at(this.__wbg_ptr);
|
|
688
|
+
let v1;
|
|
689
|
+
if (ret[0] !== 0) {
|
|
690
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
691
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
692
|
+
}
|
|
693
|
+
return v1;
|
|
798
694
|
}
|
|
799
695
|
/**
|
|
800
|
-
*
|
|
696
|
+
* The key for this entry
|
|
801
697
|
* @returns {string}
|
|
802
698
|
*/
|
|
803
|
-
|
|
699
|
+
get key() {
|
|
804
700
|
let deferred1_0;
|
|
805
701
|
let deferred1_1;
|
|
806
702
|
try {
|
|
807
|
-
const ret = wasm.
|
|
703
|
+
const ret = wasm.__wbg_get_dataentry_key(this.__wbg_ptr);
|
|
808
704
|
deferred1_0 = ret[0];
|
|
809
705
|
deferred1_1 = ret[1];
|
|
810
706
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -812,42 +708,84 @@ export class MultiIssuerAuthorizeResult {
|
|
|
812
708
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
813
709
|
}
|
|
814
710
|
}
|
|
711
|
+
/**
|
|
712
|
+
* Number of times this entry has been accessed
|
|
713
|
+
* @param {bigint} arg0
|
|
714
|
+
*/
|
|
715
|
+
set access_count(arg0) {
|
|
716
|
+
wasm.__wbg_set_dataentry_access_count(this.__wbg_ptr, arg0);
|
|
717
|
+
}
|
|
718
|
+
/**
|
|
719
|
+
* Timestamp when this entry was created (RFC 3339 format)
|
|
720
|
+
* @param {string} arg0
|
|
721
|
+
*/
|
|
722
|
+
set created_at(arg0) {
|
|
723
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
724
|
+
const len0 = WASM_VECTOR_LEN;
|
|
725
|
+
wasm.__wbg_set_dataentry_created_at(this.__wbg_ptr, ptr0, len0);
|
|
726
|
+
}
|
|
727
|
+
/**
|
|
728
|
+
* The inferred Cedar type of the value
|
|
729
|
+
* @param {string} arg0
|
|
730
|
+
*/
|
|
731
|
+
set data_type(arg0) {
|
|
732
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
733
|
+
const len0 = WASM_VECTOR_LEN;
|
|
734
|
+
wasm.__wbg_set_dataentry_data_type(this.__wbg_ptr, ptr0, len0);
|
|
735
|
+
}
|
|
736
|
+
/**
|
|
737
|
+
* Timestamp when this entry expires (RFC 3339 format), or null if no TTL
|
|
738
|
+
* @param {string | null} [arg0]
|
|
739
|
+
*/
|
|
740
|
+
set expires_at(arg0) {
|
|
741
|
+
var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
742
|
+
var len0 = WASM_VECTOR_LEN;
|
|
743
|
+
wasm.__wbg_set_dataentry_expires_at(this.__wbg_ptr, ptr0, len0);
|
|
744
|
+
}
|
|
745
|
+
/**
|
|
746
|
+
* The key for this entry
|
|
747
|
+
* @param {string} arg0
|
|
748
|
+
*/
|
|
749
|
+
set key(arg0) {
|
|
750
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
751
|
+
const len0 = WASM_VECTOR_LEN;
|
|
752
|
+
wasm.__wbg_set_dataentry_key(this.__wbg_ptr, ptr0, len0);
|
|
753
|
+
}
|
|
815
754
|
}
|
|
816
|
-
if (Symbol.dispose)
|
|
755
|
+
if (Symbol.dispose) DataEntry.prototype[Symbol.dispose] = DataEntry.prototype.free;
|
|
756
|
+
exports.DataEntry = DataEntry;
|
|
817
757
|
|
|
818
758
|
/**
|
|
819
|
-
*
|
|
820
|
-
*
|
|
821
|
-
*
|
|
822
|
-
* Represents an error that occurred when evaluating a Cedar policy.
|
|
759
|
+
* A WASM wrapper for the Rust `cedarling::DataStoreStats` struct.
|
|
760
|
+
* Statistics about the DataStore.
|
|
823
761
|
*/
|
|
824
|
-
|
|
762
|
+
class DataStoreStats {
|
|
825
763
|
static __wrap(ptr) {
|
|
826
764
|
ptr = ptr >>> 0;
|
|
827
|
-
const obj = Object.create(
|
|
765
|
+
const obj = Object.create(DataStoreStats.prototype);
|
|
828
766
|
obj.__wbg_ptr = ptr;
|
|
829
|
-
|
|
767
|
+
DataStoreStatsFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
830
768
|
return obj;
|
|
831
769
|
}
|
|
832
770
|
__destroy_into_raw() {
|
|
833
771
|
const ptr = this.__wbg_ptr;
|
|
834
772
|
this.__wbg_ptr = 0;
|
|
835
|
-
|
|
773
|
+
DataStoreStatsFinalization.unregister(this);
|
|
836
774
|
return ptr;
|
|
837
775
|
}
|
|
838
776
|
free() {
|
|
839
777
|
const ptr = this.__destroy_into_raw();
|
|
840
|
-
wasm.
|
|
778
|
+
wasm.__wbg_datastorestats_free(ptr, 0);
|
|
841
779
|
}
|
|
842
780
|
/**
|
|
843
|
-
*
|
|
781
|
+
* Convert `DataStoreStats` to json string value
|
|
844
782
|
* @returns {string}
|
|
845
783
|
*/
|
|
846
|
-
|
|
784
|
+
json_string() {
|
|
847
785
|
let deferred1_0;
|
|
848
786
|
let deferred1_1;
|
|
849
787
|
try {
|
|
850
|
-
const ret = wasm.
|
|
788
|
+
const ret = wasm.datastorestats_json_string(this.__wbg_ptr);
|
|
851
789
|
deferred1_0 = ret[0];
|
|
852
790
|
deferred1_1 = ret[1];
|
|
853
791
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -856,668 +794,1490 @@ export class PolicyEvaluationError {
|
|
|
856
794
|
}
|
|
857
795
|
}
|
|
858
796
|
/**
|
|
859
|
-
*
|
|
860
|
-
* @returns {
|
|
797
|
+
* Average size per entry in bytes (0 if no entries)
|
|
798
|
+
* @returns {number}
|
|
861
799
|
*/
|
|
862
|
-
get
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
800
|
+
get avg_entry_size_bytes() {
|
|
801
|
+
const ret = wasm.__wbg_get_datastorestats_avg_entry_size_bytes(this.__wbg_ptr);
|
|
802
|
+
return ret >>> 0;
|
|
803
|
+
}
|
|
804
|
+
/**
|
|
805
|
+
* Percentage of capacity used (0.0-100.0, based on entry count)
|
|
806
|
+
* @returns {number}
|
|
807
|
+
*/
|
|
808
|
+
get capacity_usage_percent() {
|
|
809
|
+
const ret = wasm.__wbg_get_datastorestats_capacity_usage_percent(this.__wbg_ptr);
|
|
810
|
+
return ret;
|
|
811
|
+
}
|
|
812
|
+
/**
|
|
813
|
+
* Number of entries currently stored
|
|
814
|
+
* @returns {number}
|
|
815
|
+
*/
|
|
816
|
+
get entry_count() {
|
|
817
|
+
const ret = wasm.__wbg_get_datastorestats_entry_count(this.__wbg_ptr);
|
|
818
|
+
return ret >>> 0;
|
|
819
|
+
}
|
|
820
|
+
/**
|
|
821
|
+
* Maximum number of entries allowed (0 = unlimited)
|
|
822
|
+
* @returns {number}
|
|
823
|
+
*/
|
|
824
|
+
get max_entries() {
|
|
825
|
+
const ret = wasm.__wbg_get_datastorestats_max_entries(this.__wbg_ptr);
|
|
826
|
+
return ret >>> 0;
|
|
827
|
+
}
|
|
828
|
+
/**
|
|
829
|
+
* Maximum size per entry in bytes (0 = unlimited)
|
|
830
|
+
* @returns {number}
|
|
831
|
+
*/
|
|
832
|
+
get max_entry_size() {
|
|
833
|
+
const ret = wasm.__wbg_get_datastorestats_max_entry_size(this.__wbg_ptr);
|
|
834
|
+
return ret >>> 0;
|
|
835
|
+
}
|
|
836
|
+
/**
|
|
837
|
+
* Memory usage threshold percentage (from config)
|
|
838
|
+
* @returns {number}
|
|
839
|
+
*/
|
|
840
|
+
get memory_alert_threshold() {
|
|
841
|
+
const ret = wasm.__wbg_get_datastorestats_memory_alert_threshold(this.__wbg_ptr);
|
|
842
|
+
return ret;
|
|
843
|
+
}
|
|
844
|
+
/**
|
|
845
|
+
* Whether memory usage exceeds the alert threshold
|
|
846
|
+
* @returns {boolean}
|
|
847
|
+
*/
|
|
848
|
+
get memory_alert_triggered() {
|
|
849
|
+
const ret = wasm.__wbg_get_datastorestats_memory_alert_triggered(this.__wbg_ptr);
|
|
850
|
+
return ret !== 0;
|
|
851
|
+
}
|
|
852
|
+
/**
|
|
853
|
+
* Whether metrics tracking is enabled
|
|
854
|
+
* @returns {boolean}
|
|
855
|
+
*/
|
|
856
|
+
get metrics_enabled() {
|
|
857
|
+
const ret = wasm.__wbg_get_datastorestats_metrics_enabled(this.__wbg_ptr);
|
|
858
|
+
return ret !== 0;
|
|
859
|
+
}
|
|
860
|
+
/**
|
|
861
|
+
* Total size of all entries in bytes (approximate, based on JSON serialization)
|
|
862
|
+
* @returns {number}
|
|
863
|
+
*/
|
|
864
|
+
get total_size_bytes() {
|
|
865
|
+
const ret = wasm.__wbg_get_datastorestats_total_size_bytes(this.__wbg_ptr);
|
|
866
|
+
return ret >>> 0;
|
|
867
|
+
}
|
|
868
|
+
/**
|
|
869
|
+
* Average size per entry in bytes (0 if no entries)
|
|
870
|
+
* @param {number} arg0
|
|
871
|
+
*/
|
|
872
|
+
set avg_entry_size_bytes(arg0) {
|
|
873
|
+
wasm.__wbg_set_datastorestats_avg_entry_size_bytes(this.__wbg_ptr, arg0);
|
|
874
|
+
}
|
|
875
|
+
/**
|
|
876
|
+
* Percentage of capacity used (0.0-100.0, based on entry count)
|
|
877
|
+
* @param {number} arg0
|
|
878
|
+
*/
|
|
879
|
+
set capacity_usage_percent(arg0) {
|
|
880
|
+
wasm.__wbg_set_datastorestats_capacity_usage_percent(this.__wbg_ptr, arg0);
|
|
881
|
+
}
|
|
882
|
+
/**
|
|
883
|
+
* Number of entries currently stored
|
|
884
|
+
* @param {number} arg0
|
|
885
|
+
*/
|
|
886
|
+
set entry_count(arg0) {
|
|
887
|
+
wasm.__wbg_set_datastorestats_entry_count(this.__wbg_ptr, arg0);
|
|
888
|
+
}
|
|
889
|
+
/**
|
|
890
|
+
* Maximum number of entries allowed (0 = unlimited)
|
|
891
|
+
* @param {number} arg0
|
|
892
|
+
*/
|
|
893
|
+
set max_entries(arg0) {
|
|
894
|
+
wasm.__wbg_set_datastorestats_max_entries(this.__wbg_ptr, arg0);
|
|
895
|
+
}
|
|
896
|
+
/**
|
|
897
|
+
* Maximum size per entry in bytes (0 = unlimited)
|
|
898
|
+
* @param {number} arg0
|
|
899
|
+
*/
|
|
900
|
+
set max_entry_size(arg0) {
|
|
901
|
+
wasm.__wbg_set_datastorestats_max_entry_size(this.__wbg_ptr, arg0);
|
|
902
|
+
}
|
|
903
|
+
/**
|
|
904
|
+
* Memory usage threshold percentage (from config)
|
|
905
|
+
* @param {number} arg0
|
|
906
|
+
*/
|
|
907
|
+
set memory_alert_threshold(arg0) {
|
|
908
|
+
wasm.__wbg_set_datastorestats_memory_alert_threshold(this.__wbg_ptr, arg0);
|
|
909
|
+
}
|
|
910
|
+
/**
|
|
911
|
+
* Whether memory usage exceeds the alert threshold
|
|
912
|
+
* @param {boolean} arg0
|
|
913
|
+
*/
|
|
914
|
+
set memory_alert_triggered(arg0) {
|
|
915
|
+
wasm.__wbg_set_datastorestats_memory_alert_triggered(this.__wbg_ptr, arg0);
|
|
916
|
+
}
|
|
917
|
+
/**
|
|
918
|
+
* Whether metrics tracking is enabled
|
|
919
|
+
* @param {boolean} arg0
|
|
920
|
+
*/
|
|
921
|
+
set metrics_enabled(arg0) {
|
|
922
|
+
wasm.__wbg_set_datastorestats_metrics_enabled(this.__wbg_ptr, arg0);
|
|
923
|
+
}
|
|
924
|
+
/**
|
|
925
|
+
* Total size of all entries in bytes (approximate, based on JSON serialization)
|
|
926
|
+
* @param {number} arg0
|
|
927
|
+
*/
|
|
928
|
+
set total_size_bytes(arg0) {
|
|
929
|
+
wasm.__wbg_set_datastorestats_total_size_bytes(this.__wbg_ptr, arg0);
|
|
873
930
|
}
|
|
874
931
|
}
|
|
875
|
-
if (Symbol.dispose)
|
|
932
|
+
if (Symbol.dispose) DataStoreStats.prototype[Symbol.dispose] = DataStoreStats.prototype.free;
|
|
933
|
+
exports.DataStoreStats = DataStoreStats;
|
|
876
934
|
|
|
877
935
|
/**
|
|
878
|
-
*
|
|
879
|
-
*
|
|
880
|
-
*
|
|
881
|
-
*
|
|
936
|
+
* Diagnostics
|
|
937
|
+
* ===========
|
|
938
|
+
*
|
|
939
|
+
* Provides detailed information about how a policy decision was made, including policies that contributed to the decision and any errors encountered during evaluation.
|
|
882
940
|
*/
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
const
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
941
|
+
class Diagnostics {
|
|
942
|
+
static __wrap(ptr) {
|
|
943
|
+
ptr = ptr >>> 0;
|
|
944
|
+
const obj = Object.create(Diagnostics.prototype);
|
|
945
|
+
obj.__wbg_ptr = ptr;
|
|
946
|
+
DiagnosticsFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
947
|
+
return obj;
|
|
948
|
+
}
|
|
949
|
+
__destroy_into_raw() {
|
|
950
|
+
const ptr = this.__wbg_ptr;
|
|
951
|
+
this.__wbg_ptr = 0;
|
|
952
|
+
DiagnosticsFinalization.unregister(this);
|
|
953
|
+
return ptr;
|
|
954
|
+
}
|
|
955
|
+
free() {
|
|
956
|
+
const ptr = this.__destroy_into_raw();
|
|
957
|
+
wasm.__wbg_diagnostics_free(ptr, 0);
|
|
958
|
+
}
|
|
959
|
+
/**
|
|
960
|
+
* Errors that occurred during authorization. The errors should be
|
|
961
|
+
* treated as unordered, since policies may be evaluated in any order.
|
|
962
|
+
* @returns {PolicyEvaluationError[]}
|
|
963
|
+
*/
|
|
964
|
+
get errors() {
|
|
965
|
+
const ret = wasm.diagnostics_errors(this.__wbg_ptr);
|
|
966
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
967
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
968
|
+
return v1;
|
|
969
|
+
}
|
|
970
|
+
/**
|
|
971
|
+
* `PolicyId`s of the policies that contributed to the decision.
|
|
972
|
+
* If no policies applied to the request, this set will be empty.
|
|
973
|
+
*
|
|
974
|
+
* The ids should be treated as unordered,
|
|
975
|
+
* @returns {string[]}
|
|
976
|
+
*/
|
|
977
|
+
get reason() {
|
|
978
|
+
const ret = wasm.diagnostics_reason(this.__wbg_ptr);
|
|
979
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
980
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
981
|
+
return v1;
|
|
917
982
|
}
|
|
918
983
|
}
|
|
984
|
+
if (Symbol.dispose) Diagnostics.prototype[Symbol.dispose] = Diagnostics.prototype.free;
|
|
985
|
+
exports.Diagnostics = Diagnostics;
|
|
919
986
|
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
return
|
|
926
|
-
}
|
|
927
|
-
|
|
928
|
-
const
|
|
929
|
-
|
|
930
|
-
}
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
}
|
|
938
|
-
|
|
939
|
-
const
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
};
|
|
949
|
-
imports.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {
|
|
950
|
-
const ret = debugString(arg1);
|
|
951
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
952
|
-
const len1 = WASM_VECTOR_LEN;
|
|
953
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
954
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
955
|
-
};
|
|
956
|
-
imports.wbg.__wbg___wbindgen_in_0d3e1e8f0c669317 = function(arg0, arg1) {
|
|
957
|
-
const ret = arg0 in arg1;
|
|
958
|
-
return ret;
|
|
959
|
-
};
|
|
960
|
-
imports.wbg.__wbg___wbindgen_is_bigint_0e1a2e3f55cfae27 = function(arg0) {
|
|
961
|
-
const ret = typeof(arg0) === 'bigint';
|
|
962
|
-
return ret;
|
|
963
|
-
};
|
|
964
|
-
imports.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
|
|
965
|
-
const ret = typeof(arg0) === 'function';
|
|
966
|
-
return ret;
|
|
967
|
-
};
|
|
968
|
-
imports.wbg.__wbg___wbindgen_is_object_ce774f3490692386 = function(arg0) {
|
|
969
|
-
const val = arg0;
|
|
970
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
971
|
-
return ret;
|
|
972
|
-
};
|
|
973
|
-
imports.wbg.__wbg___wbindgen_is_string_704ef9c8fc131030 = function(arg0) {
|
|
974
|
-
const ret = typeof(arg0) === 'string';
|
|
975
|
-
return ret;
|
|
976
|
-
};
|
|
977
|
-
imports.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {
|
|
978
|
-
const ret = arg0 === undefined;
|
|
979
|
-
return ret;
|
|
980
|
-
};
|
|
981
|
-
imports.wbg.__wbg___wbindgen_jsval_eq_b6101cc9cef1fe36 = function(arg0, arg1) {
|
|
982
|
-
const ret = arg0 === arg1;
|
|
983
|
-
return ret;
|
|
984
|
-
};
|
|
985
|
-
imports.wbg.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d = function(arg0, arg1) {
|
|
986
|
-
const ret = arg0 == arg1;
|
|
987
|
-
return ret;
|
|
988
|
-
};
|
|
989
|
-
imports.wbg.__wbg___wbindgen_number_get_9619185a74197f95 = function(arg0, arg1) {
|
|
990
|
-
const obj = arg1;
|
|
991
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
992
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
993
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
994
|
-
};
|
|
995
|
-
imports.wbg.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) {
|
|
996
|
-
const obj = arg1;
|
|
997
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
998
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
999
|
-
var len1 = WASM_VECTOR_LEN;
|
|
1000
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1001
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1002
|
-
};
|
|
1003
|
-
imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
|
|
1004
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1005
|
-
};
|
|
1006
|
-
imports.wbg.__wbg__wbg_cb_unref_87dfb5aaa0cbcea7 = function(arg0) {
|
|
1007
|
-
arg0._wbg_cb_unref();
|
|
1008
|
-
};
|
|
1009
|
-
imports.wbg.__wbg_abort_07646c894ebbf2bd = function(arg0) {
|
|
1010
|
-
arg0.abort();
|
|
1011
|
-
};
|
|
1012
|
-
imports.wbg.__wbg_abort_399ecbcfd6ef3c8e = function(arg0, arg1) {
|
|
1013
|
-
arg0.abort(arg1);
|
|
1014
|
-
};
|
|
1015
|
-
imports.wbg.__wbg_append_c5cbdf46455cc776 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1016
|
-
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1017
|
-
}, arguments) };
|
|
1018
|
-
imports.wbg.__wbg_arrayBuffer_c04af4fce566092d = function() { return handleError(function (arg0) {
|
|
1019
|
-
const ret = arg0.arrayBuffer();
|
|
1020
|
-
return ret;
|
|
1021
|
-
}, arguments) };
|
|
1022
|
-
imports.wbg.__wbg_authorizeresult_new = function(arg0) {
|
|
1023
|
-
const ret = AuthorizeResult.__wrap(arg0);
|
|
1024
|
-
return ret;
|
|
1025
|
-
};
|
|
1026
|
-
imports.wbg.__wbg_call_3020136f7a2d6e44 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1027
|
-
const ret = arg0.call(arg1, arg2);
|
|
1028
|
-
return ret;
|
|
1029
|
-
}, arguments) };
|
|
1030
|
-
imports.wbg.__wbg_call_abb4ff46ce38be40 = function() { return handleError(function (arg0, arg1) {
|
|
1031
|
-
const ret = arg0.call(arg1);
|
|
1032
|
-
return ret;
|
|
1033
|
-
}, arguments) };
|
|
1034
|
-
imports.wbg.__wbg_cedarling_new = function(arg0) {
|
|
1035
|
-
const ret = Cedarling.__wrap(arg0);
|
|
1036
|
-
return ret;
|
|
1037
|
-
};
|
|
1038
|
-
imports.wbg.__wbg_clearTimeout_b716ecb44bea14ed = function(arg0) {
|
|
1039
|
-
const ret = clearTimeout(arg0);
|
|
1040
|
-
return ret;
|
|
1041
|
-
};
|
|
1042
|
-
imports.wbg.__wbg_crypto_574e78ad8b13b65f = function(arg0) {
|
|
1043
|
-
const ret = arg0.crypto;
|
|
1044
|
-
return ret;
|
|
1045
|
-
};
|
|
1046
|
-
imports.wbg.__wbg_debug_24d884048190fccc = function(arg0) {
|
|
1047
|
-
console.debug(...arg0);
|
|
1048
|
-
};
|
|
1049
|
-
imports.wbg.__wbg_done_62ea16af4ce34b24 = function(arg0) {
|
|
1050
|
-
const ret = arg0.done;
|
|
1051
|
-
return ret;
|
|
1052
|
-
};
|
|
1053
|
-
imports.wbg.__wbg_entries_83c79938054e065f = function(arg0) {
|
|
1054
|
-
const ret = Object.entries(arg0);
|
|
1055
|
-
return ret;
|
|
1056
|
-
};
|
|
1057
|
-
imports.wbg.__wbg_entries_9af46b7eaf7dfefa = function(arg0) {
|
|
1058
|
-
const ret = arg0.entries();
|
|
1059
|
-
return ret;
|
|
1060
|
-
};
|
|
1061
|
-
imports.wbg.__wbg_error_98d791de55bc7c97 = function(arg0) {
|
|
1062
|
-
console.error(...arg0);
|
|
1063
|
-
};
|
|
1064
|
-
imports.wbg.__wbg_fetch_7fb7602a1bf647ec = function(arg0) {
|
|
1065
|
-
const ret = fetch(arg0);
|
|
1066
|
-
return ret;
|
|
1067
|
-
};
|
|
1068
|
-
imports.wbg.__wbg_fetch_90447c28cc0b095e = function(arg0, arg1) {
|
|
1069
|
-
const ret = arg0.fetch(arg1);
|
|
1070
|
-
return ret;
|
|
1071
|
-
};
|
|
1072
|
-
imports.wbg.__wbg_fromEntries_743eaaa008e6db37 = function() { return handleError(function (arg0) {
|
|
1073
|
-
const ret = Object.fromEntries(arg0);
|
|
1074
|
-
return ret;
|
|
1075
|
-
}, arguments) };
|
|
1076
|
-
imports.wbg.__wbg_getRandomValues_1c61fac11405ffdc = function() { return handleError(function (arg0, arg1) {
|
|
1077
|
-
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
1078
|
-
}, arguments) };
|
|
1079
|
-
imports.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
|
|
1080
|
-
arg0.getRandomValues(arg1);
|
|
1081
|
-
}, arguments) };
|
|
1082
|
-
imports.wbg.__wbg_getTime_ad1e9878a735af08 = function(arg0) {
|
|
1083
|
-
const ret = arg0.getTime();
|
|
1084
|
-
return ret;
|
|
1085
|
-
};
|
|
1086
|
-
imports.wbg.__wbg_getTimezoneOffset_45389e26d6f46823 = function(arg0) {
|
|
1087
|
-
const ret = arg0.getTimezoneOffset();
|
|
1088
|
-
return ret;
|
|
1089
|
-
};
|
|
1090
|
-
imports.wbg.__wbg_get_6b7bd52aca3f9671 = function(arg0, arg1) {
|
|
1091
|
-
const ret = arg0[arg1 >>> 0];
|
|
1092
|
-
return ret;
|
|
1093
|
-
};
|
|
1094
|
-
imports.wbg.__wbg_get_af9dab7e9603ea93 = function() { return handleError(function (arg0, arg1) {
|
|
1095
|
-
const ret = Reflect.get(arg0, arg1);
|
|
1096
|
-
return ret;
|
|
1097
|
-
}, arguments) };
|
|
1098
|
-
imports.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
|
|
1099
|
-
const ret = arg0[arg1];
|
|
1100
|
-
return ret;
|
|
1101
|
-
};
|
|
1102
|
-
imports.wbg.__wbg_has_0e670569d65d3a45 = function() { return handleError(function (arg0, arg1) {
|
|
1103
|
-
const ret = Reflect.has(arg0, arg1);
|
|
1104
|
-
return ret;
|
|
1105
|
-
}, arguments) };
|
|
1106
|
-
imports.wbg.__wbg_headers_654c30e1bcccc552 = function(arg0) {
|
|
1107
|
-
const ret = arg0.headers;
|
|
987
|
+
class IntoUnderlyingByteSource {
|
|
988
|
+
__destroy_into_raw() {
|
|
989
|
+
const ptr = this.__wbg_ptr;
|
|
990
|
+
this.__wbg_ptr = 0;
|
|
991
|
+
IntoUnderlyingByteSourceFinalization.unregister(this);
|
|
992
|
+
return ptr;
|
|
993
|
+
}
|
|
994
|
+
free() {
|
|
995
|
+
const ptr = this.__destroy_into_raw();
|
|
996
|
+
wasm.__wbg_intounderlyingbytesource_free(ptr, 0);
|
|
997
|
+
}
|
|
998
|
+
/**
|
|
999
|
+
* @returns {number}
|
|
1000
|
+
*/
|
|
1001
|
+
get autoAllocateChunkSize() {
|
|
1002
|
+
const ret = wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr);
|
|
1003
|
+
return ret >>> 0;
|
|
1004
|
+
}
|
|
1005
|
+
cancel() {
|
|
1006
|
+
const ptr = this.__destroy_into_raw();
|
|
1007
|
+
wasm.intounderlyingbytesource_cancel(ptr);
|
|
1008
|
+
}
|
|
1009
|
+
/**
|
|
1010
|
+
* @param {ReadableByteStreamController} controller
|
|
1011
|
+
* @returns {Promise<any>}
|
|
1012
|
+
*/
|
|
1013
|
+
pull(controller) {
|
|
1014
|
+
const ret = wasm.intounderlyingbytesource_pull(this.__wbg_ptr, controller);
|
|
1108
1015
|
return ret;
|
|
1109
|
-
}
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
const ret =
|
|
1016
|
+
}
|
|
1017
|
+
/**
|
|
1018
|
+
* @param {ReadableByteStreamController} controller
|
|
1019
|
+
*/
|
|
1020
|
+
start(controller) {
|
|
1021
|
+
wasm.intounderlyingbytesource_start(this.__wbg_ptr, controller);
|
|
1022
|
+
}
|
|
1023
|
+
/**
|
|
1024
|
+
* @returns {ReadableStreamType}
|
|
1025
|
+
*/
|
|
1026
|
+
get type() {
|
|
1027
|
+
const ret = wasm.intounderlyingbytesource_type(this.__wbg_ptr);
|
|
1028
|
+
return __wbindgen_enum_ReadableStreamType[ret];
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
if (Symbol.dispose) IntoUnderlyingByteSource.prototype[Symbol.dispose] = IntoUnderlyingByteSource.prototype.free;
|
|
1032
|
+
exports.IntoUnderlyingByteSource = IntoUnderlyingByteSource;
|
|
1033
|
+
|
|
1034
|
+
class IntoUnderlyingSink {
|
|
1035
|
+
__destroy_into_raw() {
|
|
1036
|
+
const ptr = this.__wbg_ptr;
|
|
1037
|
+
this.__wbg_ptr = 0;
|
|
1038
|
+
IntoUnderlyingSinkFinalization.unregister(this);
|
|
1039
|
+
return ptr;
|
|
1040
|
+
}
|
|
1041
|
+
free() {
|
|
1042
|
+
const ptr = this.__destroy_into_raw();
|
|
1043
|
+
wasm.__wbg_intounderlyingsink_free(ptr, 0);
|
|
1044
|
+
}
|
|
1045
|
+
/**
|
|
1046
|
+
* @param {any} reason
|
|
1047
|
+
* @returns {Promise<any>}
|
|
1048
|
+
*/
|
|
1049
|
+
abort(reason) {
|
|
1050
|
+
const ptr = this.__destroy_into_raw();
|
|
1051
|
+
const ret = wasm.intounderlyingsink_abort(ptr, reason);
|
|
1121
1052
|
return ret;
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
}
|
|
1130
|
-
const ret = result;
|
|
1053
|
+
}
|
|
1054
|
+
/**
|
|
1055
|
+
* @returns {Promise<any>}
|
|
1056
|
+
*/
|
|
1057
|
+
close() {
|
|
1058
|
+
const ptr = this.__destroy_into_raw();
|
|
1059
|
+
const ret = wasm.intounderlyingsink_close(ptr);
|
|
1131
1060
|
return ret;
|
|
1132
|
-
}
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
}
|
|
1140
|
-
const ret = result;
|
|
1061
|
+
}
|
|
1062
|
+
/**
|
|
1063
|
+
* @param {any} chunk
|
|
1064
|
+
* @returns {Promise<any>}
|
|
1065
|
+
*/
|
|
1066
|
+
write(chunk) {
|
|
1067
|
+
const ret = wasm.intounderlyingsink_write(this.__wbg_ptr, chunk);
|
|
1141
1068
|
return ret;
|
|
1142
|
-
}
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
if (Symbol.dispose) IntoUnderlyingSink.prototype[Symbol.dispose] = IntoUnderlyingSink.prototype.free;
|
|
1072
|
+
exports.IntoUnderlyingSink = IntoUnderlyingSink;
|
|
1073
|
+
|
|
1074
|
+
class IntoUnderlyingSource {
|
|
1075
|
+
__destroy_into_raw() {
|
|
1076
|
+
const ptr = this.__wbg_ptr;
|
|
1077
|
+
this.__wbg_ptr = 0;
|
|
1078
|
+
IntoUnderlyingSourceFinalization.unregister(this);
|
|
1079
|
+
return ptr;
|
|
1080
|
+
}
|
|
1081
|
+
free() {
|
|
1082
|
+
const ptr = this.__destroy_into_raw();
|
|
1083
|
+
wasm.__wbg_intounderlyingsource_free(ptr, 0);
|
|
1084
|
+
}
|
|
1085
|
+
cancel() {
|
|
1086
|
+
const ptr = this.__destroy_into_raw();
|
|
1087
|
+
wasm.intounderlyingsource_cancel(ptr);
|
|
1088
|
+
}
|
|
1089
|
+
/**
|
|
1090
|
+
* @param {ReadableStreamDefaultController} controller
|
|
1091
|
+
* @returns {Promise<any>}
|
|
1092
|
+
*/
|
|
1093
|
+
pull(controller) {
|
|
1094
|
+
const ret = wasm.intounderlyingsource_pull(this.__wbg_ptr, controller);
|
|
1151
1095
|
return ret;
|
|
1152
|
-
}
|
|
1153
|
-
|
|
1154
|
-
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
if (Symbol.dispose) IntoUnderlyingSource.prototype[Symbol.dispose] = IntoUnderlyingSource.prototype.free;
|
|
1099
|
+
exports.IntoUnderlyingSource = IntoUnderlyingSource;
|
|
1100
|
+
|
|
1101
|
+
/**
|
|
1102
|
+
* A WASM wrapper for the Rust `cedarling::MultiIssuerAuthorizeResult` struct.
|
|
1103
|
+
* Represents the result of a multi-issuer authorization request.
|
|
1104
|
+
*/
|
|
1105
|
+
class MultiIssuerAuthorizeResult {
|
|
1106
|
+
static __wrap(ptr) {
|
|
1107
|
+
ptr = ptr >>> 0;
|
|
1108
|
+
const obj = Object.create(MultiIssuerAuthorizeResult.prototype);
|
|
1109
|
+
obj.__wbg_ptr = ptr;
|
|
1110
|
+
MultiIssuerAuthorizeResultFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1111
|
+
return obj;
|
|
1112
|
+
}
|
|
1113
|
+
__destroy_into_raw() {
|
|
1114
|
+
const ptr = this.__wbg_ptr;
|
|
1115
|
+
this.__wbg_ptr = 0;
|
|
1116
|
+
MultiIssuerAuthorizeResultFinalization.unregister(this);
|
|
1117
|
+
return ptr;
|
|
1118
|
+
}
|
|
1119
|
+
free() {
|
|
1120
|
+
const ptr = this.__destroy_into_raw();
|
|
1121
|
+
wasm.__wbg_multiissuerauthorizeresult_free(ptr, 0);
|
|
1122
|
+
}
|
|
1123
|
+
/**
|
|
1124
|
+
* Result of authorization
|
|
1125
|
+
* true means `ALLOW`
|
|
1126
|
+
* false means `Deny`
|
|
1127
|
+
* @returns {boolean}
|
|
1128
|
+
*/
|
|
1129
|
+
get decision() {
|
|
1130
|
+
const ret = wasm.__wbg_get_multiissuerauthorizeresult_decision(this.__wbg_ptr);
|
|
1131
|
+
return ret !== 0;
|
|
1132
|
+
}
|
|
1133
|
+
/**
|
|
1134
|
+
* Request ID of the authorization request
|
|
1135
|
+
* @returns {string}
|
|
1136
|
+
*/
|
|
1137
|
+
get request_id() {
|
|
1138
|
+
let deferred1_0;
|
|
1139
|
+
let deferred1_1;
|
|
1155
1140
|
try {
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1141
|
+
const ret = wasm.__wbg_get_multiissuerauthorizeresult_request_id(this.__wbg_ptr);
|
|
1142
|
+
deferred1_0 = ret[0];
|
|
1143
|
+
deferred1_1 = ret[1];
|
|
1144
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1145
|
+
} finally {
|
|
1146
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1159
1147
|
}
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
const ret = Object.keys(arg0);
|
|
1177
|
-
return ret;
|
|
1178
|
-
};
|
|
1179
|
-
imports.wbg.__wbg_length_22ac23eaec9d8053 = function(arg0) {
|
|
1180
|
-
const ret = arg0.length;
|
|
1181
|
-
return ret;
|
|
1182
|
-
};
|
|
1183
|
-
imports.wbg.__wbg_length_d45040a40c570362 = function(arg0) {
|
|
1184
|
-
const ret = arg0.length;
|
|
1185
|
-
return ret;
|
|
1186
|
-
};
|
|
1187
|
-
imports.wbg.__wbg_log_3f650af133a6de58 = function(arg0) {
|
|
1188
|
-
console.log(...arg0);
|
|
1189
|
-
};
|
|
1190
|
-
imports.wbg.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
|
|
1191
|
-
const ret = arg0.msCrypto;
|
|
1192
|
-
return ret;
|
|
1193
|
-
};
|
|
1194
|
-
imports.wbg.__wbg_multiissuerauthorizeresult_new = function(arg0) {
|
|
1195
|
-
const ret = MultiIssuerAuthorizeResult.__wrap(arg0);
|
|
1196
|
-
return ret;
|
|
1197
|
-
};
|
|
1198
|
-
imports.wbg.__wbg_new_0_23cedd11d9b40c9d = function() {
|
|
1199
|
-
const ret = new Date();
|
|
1200
|
-
return ret;
|
|
1201
|
-
};
|
|
1202
|
-
imports.wbg.__wbg_new_1ba21ce319a06297 = function() {
|
|
1203
|
-
const ret = new Object();
|
|
1204
|
-
return ret;
|
|
1205
|
-
};
|
|
1206
|
-
imports.wbg.__wbg_new_25f239778d6112b9 = function() {
|
|
1207
|
-
const ret = new Array();
|
|
1208
|
-
return ret;
|
|
1209
|
-
};
|
|
1210
|
-
imports.wbg.__wbg_new_3c79b3bb1b32b7d3 = function() { return handleError(function () {
|
|
1211
|
-
const ret = new Headers();
|
|
1212
|
-
return ret;
|
|
1213
|
-
}, arguments) };
|
|
1214
|
-
imports.wbg.__wbg_new_6421f6084cc5bc5a = function(arg0) {
|
|
1215
|
-
const ret = new Uint8Array(arg0);
|
|
1216
|
-
return ret;
|
|
1217
|
-
};
|
|
1218
|
-
imports.wbg.__wbg_new_881a222c65f168fc = function() { return handleError(function () {
|
|
1219
|
-
const ret = new AbortController();
|
|
1220
|
-
return ret;
|
|
1221
|
-
}, arguments) };
|
|
1222
|
-
imports.wbg.__wbg_new_b2db8aa2650f793a = function(arg0) {
|
|
1223
|
-
const ret = new Date(arg0);
|
|
1224
|
-
return ret;
|
|
1225
|
-
};
|
|
1226
|
-
imports.wbg.__wbg_new_b546ae120718850e = function() {
|
|
1227
|
-
const ret = new Map();
|
|
1228
|
-
return ret;
|
|
1229
|
-
};
|
|
1230
|
-
imports.wbg.__wbg_new_ff12d2b041fb48f1 = function(arg0, arg1) {
|
|
1148
|
+
}
|
|
1149
|
+
/**
|
|
1150
|
+
* Result of Cedar policy authorization
|
|
1151
|
+
* @returns {AuthorizeResultResponse}
|
|
1152
|
+
*/
|
|
1153
|
+
get response() {
|
|
1154
|
+
const ret = wasm.__wbg_get_multiissuerauthorizeresult_response(this.__wbg_ptr);
|
|
1155
|
+
return AuthorizeResultResponse.__wrap(ret);
|
|
1156
|
+
}
|
|
1157
|
+
/**
|
|
1158
|
+
* Convert `MultiIssuerAuthorizeResult` to json string value
|
|
1159
|
+
* @returns {string}
|
|
1160
|
+
*/
|
|
1161
|
+
json_string() {
|
|
1162
|
+
let deferred1_0;
|
|
1163
|
+
let deferred1_1;
|
|
1231
1164
|
try {
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
try {
|
|
1237
|
-
return wasm_bindgen__convert__closures_____invoke__h3a7d0d99d266e2f8(a, state0.b, arg0, arg1);
|
|
1238
|
-
} finally {
|
|
1239
|
-
state0.a = a;
|
|
1240
|
-
}
|
|
1241
|
-
};
|
|
1242
|
-
const ret = new Promise(cb0);
|
|
1243
|
-
return ret;
|
|
1165
|
+
const ret = wasm.multiissuerauthorizeresult_json_string(this.__wbg_ptr);
|
|
1166
|
+
deferred1_0 = ret[0];
|
|
1167
|
+
deferred1_1 = ret[1];
|
|
1168
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1244
1169
|
} finally {
|
|
1245
|
-
|
|
1170
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1246
1171
|
}
|
|
1172
|
+
}
|
|
1173
|
+
/**
|
|
1174
|
+
* Result of authorization
|
|
1175
|
+
* true means `ALLOW`
|
|
1176
|
+
* false means `Deny`
|
|
1177
|
+
* @param {boolean} arg0
|
|
1178
|
+
*/
|
|
1179
|
+
set decision(arg0) {
|
|
1180
|
+
wasm.__wbg_set_multiissuerauthorizeresult_decision(this.__wbg_ptr, arg0);
|
|
1181
|
+
}
|
|
1182
|
+
/**
|
|
1183
|
+
* Request ID of the authorization request
|
|
1184
|
+
* @param {string} arg0
|
|
1185
|
+
*/
|
|
1186
|
+
set request_id(arg0) {
|
|
1187
|
+
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1188
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1189
|
+
wasm.__wbg_set_multiissuerauthorizeresult_request_id(this.__wbg_ptr, ptr0, len0);
|
|
1190
|
+
}
|
|
1191
|
+
/**
|
|
1192
|
+
* Result of Cedar policy authorization
|
|
1193
|
+
* @param {AuthorizeResultResponse} arg0
|
|
1194
|
+
*/
|
|
1195
|
+
set response(arg0) {
|
|
1196
|
+
_assertClass(arg0, AuthorizeResultResponse);
|
|
1197
|
+
var ptr0 = arg0.__destroy_into_raw();
|
|
1198
|
+
wasm.__wbg_set_multiissuerauthorizeresult_response(this.__wbg_ptr, ptr0);
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
if (Symbol.dispose) MultiIssuerAuthorizeResult.prototype[Symbol.dispose] = MultiIssuerAuthorizeResult.prototype.free;
|
|
1202
|
+
exports.MultiIssuerAuthorizeResult = MultiIssuerAuthorizeResult;
|
|
1203
|
+
|
|
1204
|
+
/**
|
|
1205
|
+
* PolicyEvaluationError
|
|
1206
|
+
* =====================
|
|
1207
|
+
*
|
|
1208
|
+
* Represents an error that occurred when evaluating a Cedar policy.
|
|
1209
|
+
*/
|
|
1210
|
+
class PolicyEvaluationError {
|
|
1211
|
+
static __wrap(ptr) {
|
|
1212
|
+
ptr = ptr >>> 0;
|
|
1213
|
+
const obj = Object.create(PolicyEvaluationError.prototype);
|
|
1214
|
+
obj.__wbg_ptr = ptr;
|
|
1215
|
+
PolicyEvaluationErrorFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1216
|
+
return obj;
|
|
1217
|
+
}
|
|
1218
|
+
__destroy_into_raw() {
|
|
1219
|
+
const ptr = this.__wbg_ptr;
|
|
1220
|
+
this.__wbg_ptr = 0;
|
|
1221
|
+
PolicyEvaluationErrorFinalization.unregister(this);
|
|
1222
|
+
return ptr;
|
|
1223
|
+
}
|
|
1224
|
+
free() {
|
|
1225
|
+
const ptr = this.__destroy_into_raw();
|
|
1226
|
+
wasm.__wbg_policyevaluationerror_free(ptr, 0);
|
|
1227
|
+
}
|
|
1228
|
+
/**
|
|
1229
|
+
* Underlying evaluation error string representation
|
|
1230
|
+
* @returns {string}
|
|
1231
|
+
*/
|
|
1232
|
+
get error() {
|
|
1233
|
+
let deferred1_0;
|
|
1234
|
+
let deferred1_1;
|
|
1235
|
+
try {
|
|
1236
|
+
const ret = wasm.policyevaluationerror_error(this.__wbg_ptr);
|
|
1237
|
+
deferred1_0 = ret[0];
|
|
1238
|
+
deferred1_1 = ret[1];
|
|
1239
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1240
|
+
} finally {
|
|
1241
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
/**
|
|
1245
|
+
* Id of the policy with an error
|
|
1246
|
+
* @returns {string}
|
|
1247
|
+
*/
|
|
1248
|
+
get id() {
|
|
1249
|
+
let deferred1_0;
|
|
1250
|
+
let deferred1_1;
|
|
1251
|
+
try {
|
|
1252
|
+
const ret = wasm.policyevaluationerror_id(this.__wbg_ptr);
|
|
1253
|
+
deferred1_0 = ret[0];
|
|
1254
|
+
deferred1_1 = ret[1];
|
|
1255
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1256
|
+
} finally {
|
|
1257
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
if (Symbol.dispose) PolicyEvaluationError.prototype[Symbol.dispose] = PolicyEvaluationError.prototype.free;
|
|
1262
|
+
exports.PolicyEvaluationError = PolicyEvaluationError;
|
|
1263
|
+
|
|
1264
|
+
/**
|
|
1265
|
+
* Create a new instance of the Cedarling application.
|
|
1266
|
+
* This function can take as config parameter the eather `Map` other `Object`
|
|
1267
|
+
* @param {any} config
|
|
1268
|
+
* @returns {Promise<Cedarling>}
|
|
1269
|
+
*/
|
|
1270
|
+
function init(config) {
|
|
1271
|
+
const ret = wasm.init(config);
|
|
1272
|
+
return ret;
|
|
1273
|
+
}
|
|
1274
|
+
exports.init = init;
|
|
1275
|
+
|
|
1276
|
+
/**
|
|
1277
|
+
* Create a new instance of the Cedarling application from archive bytes.
|
|
1278
|
+
*
|
|
1279
|
+
* This function allows loading a policy store from a Cedar Archive (.cjar)
|
|
1280
|
+
* that was fetched with custom logic (e.g., with authentication headers).
|
|
1281
|
+
*
|
|
1282
|
+
* # Arguments
|
|
1283
|
+
* * `config` - Bootstrap configuration (Map or Object). Policy store config is ignored.
|
|
1284
|
+
* * `archive_bytes` - The .cjar archive bytes (Uint8Array)
|
|
1285
|
+
*
|
|
1286
|
+
* # Example
|
|
1287
|
+
* ```javascript
|
|
1288
|
+
* const response = await fetch(url, { headers: { Authorization: 'Bearer ...' } });
|
|
1289
|
+
* const bytes = new Uint8Array(await response.arrayBuffer());
|
|
1290
|
+
* const cedarling = await init_from_archive_bytes(config, bytes);
|
|
1291
|
+
* ```
|
|
1292
|
+
* @param {any} config
|
|
1293
|
+
* @param {Uint8Array} archive_bytes
|
|
1294
|
+
* @returns {Promise<Cedarling>}
|
|
1295
|
+
*/
|
|
1296
|
+
function init_from_archive_bytes(config, archive_bytes) {
|
|
1297
|
+
const ret = wasm.init_from_archive_bytes(config, archive_bytes);
|
|
1298
|
+
return ret;
|
|
1299
|
+
}
|
|
1300
|
+
exports.init_from_archive_bytes = init_from_archive_bytes;
|
|
1301
|
+
function __wbg_get_imports() {
|
|
1302
|
+
const import0 = {
|
|
1303
|
+
__proto__: null,
|
|
1304
|
+
__wbg_Error_960c155d3d49e4c2: function(arg0, arg1) {
|
|
1305
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
1306
|
+
return ret;
|
|
1307
|
+
},
|
|
1308
|
+
__wbg_Number_32bf70a599af1d4b: function(arg0) {
|
|
1309
|
+
const ret = Number(arg0);
|
|
1310
|
+
return ret;
|
|
1311
|
+
},
|
|
1312
|
+
__wbg___wbindgen_bigint_get_as_i64_3d3aba5d616c6a51: function(arg0, arg1) {
|
|
1313
|
+
const v = arg1;
|
|
1314
|
+
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
1315
|
+
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
1316
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1317
|
+
},
|
|
1318
|
+
__wbg___wbindgen_boolean_get_6ea149f0a8dcc5ff: function(arg0) {
|
|
1319
|
+
const v = arg0;
|
|
1320
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
1321
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
1322
|
+
},
|
|
1323
|
+
__wbg___wbindgen_debug_string_ab4b34d23d6778bd: function(arg0, arg1) {
|
|
1324
|
+
const ret = debugString(arg1);
|
|
1325
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1326
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1327
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1328
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1329
|
+
},
|
|
1330
|
+
__wbg___wbindgen_in_a5d8b22e52b24dd1: function(arg0, arg1) {
|
|
1331
|
+
const ret = arg0 in arg1;
|
|
1332
|
+
return ret;
|
|
1333
|
+
},
|
|
1334
|
+
__wbg___wbindgen_is_bigint_ec25c7f91b4d9e93: function(arg0) {
|
|
1335
|
+
const ret = typeof(arg0) === 'bigint';
|
|
1336
|
+
return ret;
|
|
1337
|
+
},
|
|
1338
|
+
__wbg___wbindgen_is_function_3baa9db1a987f47d: function(arg0) {
|
|
1339
|
+
const ret = typeof(arg0) === 'function';
|
|
1340
|
+
return ret;
|
|
1341
|
+
},
|
|
1342
|
+
__wbg___wbindgen_is_object_63322ec0cd6ea4ef: function(arg0) {
|
|
1343
|
+
const val = arg0;
|
|
1344
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
1345
|
+
return ret;
|
|
1346
|
+
},
|
|
1347
|
+
__wbg___wbindgen_is_string_6df3bf7ef1164ed3: function(arg0) {
|
|
1348
|
+
const ret = typeof(arg0) === 'string';
|
|
1349
|
+
return ret;
|
|
1350
|
+
},
|
|
1351
|
+
__wbg___wbindgen_is_undefined_29a43b4d42920abd: function(arg0) {
|
|
1352
|
+
const ret = arg0 === undefined;
|
|
1353
|
+
return ret;
|
|
1354
|
+
},
|
|
1355
|
+
__wbg___wbindgen_jsval_eq_d3465d8a07697228: function(arg0, arg1) {
|
|
1356
|
+
const ret = arg0 === arg1;
|
|
1357
|
+
return ret;
|
|
1358
|
+
},
|
|
1359
|
+
__wbg___wbindgen_jsval_loose_eq_cac3565e89b4134c: function(arg0, arg1) {
|
|
1360
|
+
const ret = arg0 == arg1;
|
|
1361
|
+
return ret;
|
|
1362
|
+
},
|
|
1363
|
+
__wbg___wbindgen_number_get_c7f42aed0525c451: function(arg0, arg1) {
|
|
1364
|
+
const obj = arg1;
|
|
1365
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
1366
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1367
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1368
|
+
},
|
|
1369
|
+
__wbg___wbindgen_string_get_7ed5322991caaec5: function(arg0, arg1) {
|
|
1370
|
+
const obj = arg1;
|
|
1371
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
1372
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1373
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1374
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1375
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1376
|
+
},
|
|
1377
|
+
__wbg___wbindgen_throw_6b64449b9b9ed33c: function(arg0, arg1) {
|
|
1378
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1379
|
+
},
|
|
1380
|
+
__wbg__wbg_cb_unref_b46c9b5a9f08ec37: function(arg0) {
|
|
1381
|
+
arg0._wbg_cb_unref();
|
|
1382
|
+
},
|
|
1383
|
+
__wbg_abort_4ce5b484434ef6fd: function(arg0) {
|
|
1384
|
+
arg0.abort();
|
|
1385
|
+
},
|
|
1386
|
+
__wbg_abort_d53712380a54cc81: function(arg0, arg1) {
|
|
1387
|
+
arg0.abort(arg1);
|
|
1388
|
+
},
|
|
1389
|
+
__wbg_append_e8fc56ce7c00e874: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1390
|
+
arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1391
|
+
}, arguments); },
|
|
1392
|
+
__wbg_arrayBuffer_848c392b70c67d3d: function() { return handleError(function (arg0) {
|
|
1393
|
+
const ret = arg0.arrayBuffer();
|
|
1394
|
+
return ret;
|
|
1395
|
+
}, arguments); },
|
|
1396
|
+
__wbg_authorizeresult_new: function(arg0) {
|
|
1397
|
+
const ret = AuthorizeResult.__wrap(arg0);
|
|
1398
|
+
return ret;
|
|
1399
|
+
},
|
|
1400
|
+
__wbg_body_0c3a51aec038a31a: function(arg0) {
|
|
1401
|
+
const ret = arg0.body;
|
|
1402
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1403
|
+
},
|
|
1404
|
+
__wbg_buffer_d0f5ea0926a691fd: function(arg0) {
|
|
1405
|
+
const ret = arg0.buffer;
|
|
1406
|
+
return ret;
|
|
1407
|
+
},
|
|
1408
|
+
__wbg_byobRequest_dc6aed9db01b12c6: function(arg0) {
|
|
1409
|
+
const ret = arg0.byobRequest;
|
|
1410
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1411
|
+
},
|
|
1412
|
+
__wbg_byteLength_3e660e5661f3327e: function(arg0) {
|
|
1413
|
+
const ret = arg0.byteLength;
|
|
1414
|
+
return ret;
|
|
1415
|
+
},
|
|
1416
|
+
__wbg_byteOffset_ecd62abe44dd28d4: function(arg0) {
|
|
1417
|
+
const ret = arg0.byteOffset;
|
|
1418
|
+
return ret;
|
|
1419
|
+
},
|
|
1420
|
+
__wbg_call_14b169f759b26747: function() { return handleError(function (arg0, arg1) {
|
|
1421
|
+
const ret = arg0.call(arg1);
|
|
1422
|
+
return ret;
|
|
1423
|
+
}, arguments); },
|
|
1424
|
+
__wbg_call_a24592a6f349a97e: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1425
|
+
const ret = arg0.call(arg1, arg2);
|
|
1426
|
+
return ret;
|
|
1427
|
+
}, arguments); },
|
|
1428
|
+
__wbg_cancel_ceb1bda02e29f0a9: function(arg0) {
|
|
1429
|
+
const ret = arg0.cancel();
|
|
1430
|
+
return ret;
|
|
1431
|
+
},
|
|
1432
|
+
__wbg_catch_e9362815fd0b24cf: function(arg0, arg1) {
|
|
1433
|
+
const ret = arg0.catch(arg1);
|
|
1434
|
+
return ret;
|
|
1435
|
+
},
|
|
1436
|
+
__wbg_cedarling_new: function(arg0) {
|
|
1437
|
+
const ret = Cedarling.__wrap(arg0);
|
|
1438
|
+
return ret;
|
|
1439
|
+
},
|
|
1440
|
+
__wbg_clearTimeout_2256f1e7b94ef517: function(arg0) {
|
|
1441
|
+
const ret = clearTimeout(arg0);
|
|
1442
|
+
return ret;
|
|
1443
|
+
},
|
|
1444
|
+
__wbg_clearTimeout_3629d6209dfcc46e: function(arg0) {
|
|
1445
|
+
const ret = clearTimeout(arg0);
|
|
1446
|
+
return ret;
|
|
1447
|
+
},
|
|
1448
|
+
__wbg_clearTimeout_c122f92fd48cd749: function(arg0) {
|
|
1449
|
+
const ret = clearTimeout(arg0);
|
|
1450
|
+
return ret;
|
|
1451
|
+
},
|
|
1452
|
+
__wbg_close_e6c8977a002e9e13: function() { return handleError(function (arg0) {
|
|
1453
|
+
arg0.close();
|
|
1454
|
+
}, arguments); },
|
|
1455
|
+
__wbg_close_fb954dfaf67b5732: function() { return handleError(function (arg0) {
|
|
1456
|
+
arg0.close();
|
|
1457
|
+
}, arguments); },
|
|
1458
|
+
__wbg_crypto_38df2bab126b63dc: function(arg0) {
|
|
1459
|
+
const ret = arg0.crypto;
|
|
1460
|
+
return ret;
|
|
1461
|
+
},
|
|
1462
|
+
__wbg_dataentry_new: function(arg0) {
|
|
1463
|
+
const ret = DataEntry.__wrap(arg0);
|
|
1464
|
+
return ret;
|
|
1465
|
+
},
|
|
1466
|
+
__wbg_debug_e679aee1a146ce33: function(arg0) {
|
|
1467
|
+
console.debug(...arg0);
|
|
1468
|
+
},
|
|
1469
|
+
__wbg_done_9158f7cc8751ba32: function(arg0) {
|
|
1470
|
+
const ret = arg0.done;
|
|
1471
|
+
return ret;
|
|
1472
|
+
},
|
|
1473
|
+
__wbg_enqueue_4767ce322820c94d: function() { return handleError(function (arg0, arg1) {
|
|
1474
|
+
arg0.enqueue(arg1);
|
|
1475
|
+
}, arguments); },
|
|
1476
|
+
__wbg_entries_2bf997cf82353e47: function(arg0) {
|
|
1477
|
+
const ret = arg0.entries();
|
|
1478
|
+
return ret;
|
|
1479
|
+
},
|
|
1480
|
+
__wbg_entries_bf727fcd7bf35a41: function(arg0) {
|
|
1481
|
+
const ret = arg0.entries();
|
|
1482
|
+
return ret;
|
|
1483
|
+
},
|
|
1484
|
+
__wbg_entries_e0b73aa8571ddb56: function(arg0) {
|
|
1485
|
+
const ret = Object.entries(arg0);
|
|
1486
|
+
return ret;
|
|
1487
|
+
},
|
|
1488
|
+
__wbg_error_290de5487bca6d05: function(arg0) {
|
|
1489
|
+
console.error(...arg0);
|
|
1490
|
+
},
|
|
1491
|
+
__wbg_fetch_0d322c0aed196b8b: function(arg0, arg1) {
|
|
1492
|
+
const ret = arg0.fetch(arg1);
|
|
1493
|
+
return ret;
|
|
1494
|
+
},
|
|
1495
|
+
__wbg_fetch_28a97b69c20078bb: function(arg0, arg1, arg2) {
|
|
1496
|
+
const ret = arg0.fetch(arg1, arg2);
|
|
1497
|
+
return ret;
|
|
1498
|
+
},
|
|
1499
|
+
__wbg_fetch_43b2f110608a59ff: function(arg0) {
|
|
1500
|
+
const ret = fetch(arg0);
|
|
1501
|
+
return ret;
|
|
1502
|
+
},
|
|
1503
|
+
__wbg_fetch_5e2e4a3d60c8d1d3: function(arg0, arg1) {
|
|
1504
|
+
const ret = fetch(arg0, arg1);
|
|
1505
|
+
return ret;
|
|
1506
|
+
},
|
|
1507
|
+
__wbg_fromEntries_ce99d7540610a555: function() { return handleError(function (arg0) {
|
|
1508
|
+
const ret = Object.fromEntries(arg0);
|
|
1509
|
+
return ret;
|
|
1510
|
+
}, arguments); },
|
|
1511
|
+
__wbg_getRandomValues_76dfc69825c9c552: function() { return handleError(function (arg0, arg1) {
|
|
1512
|
+
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
1513
|
+
}, arguments); },
|
|
1514
|
+
__wbg_getRandomValues_c44a50d8cfdaebeb: function() { return handleError(function (arg0, arg1) {
|
|
1515
|
+
arg0.getRandomValues(arg1);
|
|
1516
|
+
}, arguments); },
|
|
1517
|
+
__wbg_getReader_9facd4f899beac89: function() { return handleError(function (arg0) {
|
|
1518
|
+
const ret = arg0.getReader();
|
|
1519
|
+
return ret;
|
|
1520
|
+
}, arguments); },
|
|
1521
|
+
__wbg_getTime_da7c55f52b71e8c6: function(arg0) {
|
|
1522
|
+
const ret = arg0.getTime();
|
|
1523
|
+
return ret;
|
|
1524
|
+
},
|
|
1525
|
+
__wbg_getTimezoneOffset_31f57a5389d0d57c: function(arg0) {
|
|
1526
|
+
const ret = arg0.getTimezoneOffset();
|
|
1527
|
+
return ret;
|
|
1528
|
+
},
|
|
1529
|
+
__wbg_get_1affdbdd5573b16a: function() { return handleError(function (arg0, arg1) {
|
|
1530
|
+
const ret = Reflect.get(arg0, arg1);
|
|
1531
|
+
return ret;
|
|
1532
|
+
}, arguments); },
|
|
1533
|
+
__wbg_get_6011fa3a58f61074: function() { return handleError(function (arg0, arg1) {
|
|
1534
|
+
const ret = Reflect.get(arg0, arg1);
|
|
1535
|
+
return ret;
|
|
1536
|
+
}, arguments); },
|
|
1537
|
+
__wbg_get_8360291721e2339f: function(arg0, arg1) {
|
|
1538
|
+
const ret = arg0[arg1 >>> 0];
|
|
1539
|
+
return ret;
|
|
1540
|
+
},
|
|
1541
|
+
__wbg_get_done_282bca5d3f90e0a8: function(arg0) {
|
|
1542
|
+
const ret = arg0.done;
|
|
1543
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
1544
|
+
},
|
|
1545
|
+
__wbg_get_unchecked_17f53dad852b9588: function(arg0, arg1) {
|
|
1546
|
+
const ret = arg0[arg1 >>> 0];
|
|
1547
|
+
return ret;
|
|
1548
|
+
},
|
|
1549
|
+
__wbg_get_value_65a7a2c60b42fd75: function(arg0) {
|
|
1550
|
+
const ret = arg0.value;
|
|
1551
|
+
return ret;
|
|
1552
|
+
},
|
|
1553
|
+
__wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
|
|
1554
|
+
const ret = arg0[arg1];
|
|
1555
|
+
return ret;
|
|
1556
|
+
},
|
|
1557
|
+
__wbg_has_880f1d472f7cecba: function() { return handleError(function (arg0, arg1) {
|
|
1558
|
+
const ret = Reflect.has(arg0, arg1);
|
|
1559
|
+
return ret;
|
|
1560
|
+
}, arguments); },
|
|
1561
|
+
__wbg_headers_6022deb4e576fb8e: function(arg0) {
|
|
1562
|
+
const ret = arg0.headers;
|
|
1563
|
+
return ret;
|
|
1564
|
+
},
|
|
1565
|
+
__wbg_info_cd965dfbcb78a57d: function(arg0) {
|
|
1566
|
+
console.info(...arg0);
|
|
1567
|
+
},
|
|
1568
|
+
__wbg_instanceof_ArrayBuffer_7c8433c6ed14ffe3: function(arg0) {
|
|
1569
|
+
let result;
|
|
1570
|
+
try {
|
|
1571
|
+
result = arg0 instanceof ArrayBuffer;
|
|
1572
|
+
} catch (_) {
|
|
1573
|
+
result = false;
|
|
1574
|
+
}
|
|
1575
|
+
const ret = result;
|
|
1576
|
+
return ret;
|
|
1577
|
+
},
|
|
1578
|
+
__wbg_instanceof_Array_d0200cccb1297a10: function(arg0) {
|
|
1579
|
+
let result;
|
|
1580
|
+
try {
|
|
1581
|
+
result = arg0 instanceof Array;
|
|
1582
|
+
} catch (_) {
|
|
1583
|
+
result = false;
|
|
1584
|
+
}
|
|
1585
|
+
const ret = result;
|
|
1586
|
+
return ret;
|
|
1587
|
+
},
|
|
1588
|
+
__wbg_instanceof_Map_1b76fd4635be43eb: function(arg0) {
|
|
1589
|
+
let result;
|
|
1590
|
+
try {
|
|
1591
|
+
result = arg0 instanceof Map;
|
|
1592
|
+
} catch (_) {
|
|
1593
|
+
result = false;
|
|
1594
|
+
}
|
|
1595
|
+
const ret = result;
|
|
1596
|
+
return ret;
|
|
1597
|
+
},
|
|
1598
|
+
__wbg_instanceof_Response_9b2d111407865ff2: function(arg0) {
|
|
1599
|
+
let result;
|
|
1600
|
+
try {
|
|
1601
|
+
result = arg0 instanceof Response;
|
|
1602
|
+
} catch (_) {
|
|
1603
|
+
result = false;
|
|
1604
|
+
}
|
|
1605
|
+
const ret = result;
|
|
1606
|
+
return ret;
|
|
1607
|
+
},
|
|
1608
|
+
__wbg_instanceof_Uint8Array_152ba1f289edcf3f: function(arg0) {
|
|
1609
|
+
let result;
|
|
1610
|
+
try {
|
|
1611
|
+
result = arg0 instanceof Uint8Array;
|
|
1612
|
+
} catch (_) {
|
|
1613
|
+
result = false;
|
|
1614
|
+
}
|
|
1615
|
+
const ret = result;
|
|
1616
|
+
return ret;
|
|
1617
|
+
},
|
|
1618
|
+
__wbg_isArray_c3109d14ffc06469: function(arg0) {
|
|
1619
|
+
const ret = Array.isArray(arg0);
|
|
1620
|
+
return ret;
|
|
1621
|
+
},
|
|
1622
|
+
__wbg_isSafeInteger_4fc213d1989d6d2a: function(arg0) {
|
|
1623
|
+
const ret = Number.isSafeInteger(arg0);
|
|
1624
|
+
return ret;
|
|
1625
|
+
},
|
|
1626
|
+
__wbg_iterator_013bc09ec998c2a7: function() {
|
|
1627
|
+
const ret = Symbol.iterator;
|
|
1628
|
+
return ret;
|
|
1629
|
+
},
|
|
1630
|
+
__wbg_keys_2fd1bfdda7e278ca: function(arg0) {
|
|
1631
|
+
const ret = Object.keys(arg0);
|
|
1632
|
+
return ret;
|
|
1633
|
+
},
|
|
1634
|
+
__wbg_length_3d4ecd04bd8d22f1: function(arg0) {
|
|
1635
|
+
const ret = arg0.length;
|
|
1636
|
+
return ret;
|
|
1637
|
+
},
|
|
1638
|
+
__wbg_length_9f1775224cf1d815: function(arg0) {
|
|
1639
|
+
const ret = arg0.length;
|
|
1640
|
+
return ret;
|
|
1641
|
+
},
|
|
1642
|
+
__wbg_log_3e08aa4d12dba7f3: function(arg0) {
|
|
1643
|
+
console.log(...arg0);
|
|
1644
|
+
},
|
|
1645
|
+
__wbg_msCrypto_bd5a034af96bcba6: function(arg0) {
|
|
1646
|
+
const ret = arg0.msCrypto;
|
|
1647
|
+
return ret;
|
|
1648
|
+
},
|
|
1649
|
+
__wbg_multiissuerauthorizeresult_new: function(arg0) {
|
|
1650
|
+
const ret = MultiIssuerAuthorizeResult.__wrap(arg0);
|
|
1651
|
+
return ret;
|
|
1652
|
+
},
|
|
1653
|
+
__wbg_new_0_4d657201ced14de3: function() {
|
|
1654
|
+
const ret = new Date();
|
|
1655
|
+
return ret;
|
|
1656
|
+
},
|
|
1657
|
+
__wbg_new_0c7403db6e782f19: function(arg0) {
|
|
1658
|
+
const ret = new Uint8Array(arg0);
|
|
1659
|
+
return ret;
|
|
1660
|
+
},
|
|
1661
|
+
__wbg_new_15a4889b4b90734d: function() { return handleError(function () {
|
|
1662
|
+
const ret = new Headers();
|
|
1663
|
+
return ret;
|
|
1664
|
+
}, arguments); },
|
|
1665
|
+
__wbg_new_34d45cc8e36aaead: function() {
|
|
1666
|
+
const ret = new Map();
|
|
1667
|
+
return ret;
|
|
1668
|
+
},
|
|
1669
|
+
__wbg_new_5e360d2ff7b9e1c3: function(arg0, arg1) {
|
|
1670
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1671
|
+
return ret;
|
|
1672
|
+
},
|
|
1673
|
+
__wbg_new_682678e2f47e32bc: function() {
|
|
1674
|
+
const ret = new Array();
|
|
1675
|
+
return ret;
|
|
1676
|
+
},
|
|
1677
|
+
__wbg_new_7913666fe5070684: function(arg0) {
|
|
1678
|
+
const ret = new Date(arg0);
|
|
1679
|
+
return ret;
|
|
1680
|
+
},
|
|
1681
|
+
__wbg_new_98c22165a42231aa: function() { return handleError(function () {
|
|
1682
|
+
const ret = new AbortController();
|
|
1683
|
+
return ret;
|
|
1684
|
+
}, arguments); },
|
|
1685
|
+
__wbg_new_aa8d0fa9762c29bd: function() {
|
|
1686
|
+
const ret = new Object();
|
|
1687
|
+
return ret;
|
|
1688
|
+
},
|
|
1689
|
+
__wbg_new_from_slice_b5ea43e23f6008c0: function(arg0, arg1) {
|
|
1690
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
1691
|
+
return ret;
|
|
1692
|
+
},
|
|
1693
|
+
__wbg_new_typed_323f37fd55ab048d: function(arg0, arg1) {
|
|
1694
|
+
try {
|
|
1695
|
+
var state0 = {a: arg0, b: arg1};
|
|
1696
|
+
var cb0 = (arg0, arg1) => {
|
|
1697
|
+
const a = state0.a;
|
|
1698
|
+
state0.a = 0;
|
|
1699
|
+
try {
|
|
1700
|
+
return wasm_bindgen__convert__closures_____invoke__h66f11f9242c621fe(a, state0.b, arg0, arg1);
|
|
1701
|
+
} finally {
|
|
1702
|
+
state0.a = a;
|
|
1703
|
+
}
|
|
1704
|
+
};
|
|
1705
|
+
const ret = new Promise(cb0);
|
|
1706
|
+
return ret;
|
|
1707
|
+
} finally {
|
|
1708
|
+
state0.a = 0;
|
|
1709
|
+
}
|
|
1710
|
+
},
|
|
1711
|
+
__wbg_new_with_byte_offset_and_length_01848e8d6a3d49ad: function(arg0, arg1, arg2) {
|
|
1712
|
+
const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
|
|
1713
|
+
return ret;
|
|
1714
|
+
},
|
|
1715
|
+
__wbg_new_with_length_8c854e41ea4dae9b: function(arg0) {
|
|
1716
|
+
const ret = new Uint8Array(arg0 >>> 0);
|
|
1717
|
+
return ret;
|
|
1718
|
+
},
|
|
1719
|
+
__wbg_new_with_str_and_init_897be1708e42f39d: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1720
|
+
const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
|
|
1721
|
+
return ret;
|
|
1722
|
+
}, arguments); },
|
|
1723
|
+
__wbg_next_0340c4ae324393c3: function() { return handleError(function (arg0) {
|
|
1724
|
+
const ret = arg0.next();
|
|
1725
|
+
return ret;
|
|
1726
|
+
}, arguments); },
|
|
1727
|
+
__wbg_next_7646edaa39458ef7: function(arg0) {
|
|
1728
|
+
const ret = arg0.next;
|
|
1729
|
+
return ret;
|
|
1730
|
+
},
|
|
1731
|
+
__wbg_node_84ea875411254db1: function(arg0) {
|
|
1732
|
+
const ret = arg0.node;
|
|
1733
|
+
return ret;
|
|
1734
|
+
},
|
|
1735
|
+
__wbg_policyevaluationerror_new: function(arg0) {
|
|
1736
|
+
const ret = PolicyEvaluationError.__wrap(arg0);
|
|
1737
|
+
return ret;
|
|
1738
|
+
},
|
|
1739
|
+
__wbg_process_44c7a14e11e9f69e: function(arg0) {
|
|
1740
|
+
const ret = arg0.process;
|
|
1741
|
+
return ret;
|
|
1742
|
+
},
|
|
1743
|
+
__wbg_prototypesetcall_a6b02eb00b0f4ce2: function(arg0, arg1, arg2) {
|
|
1744
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
1745
|
+
},
|
|
1746
|
+
__wbg_push_471a5b068a5295f6: function(arg0, arg1) {
|
|
1747
|
+
const ret = arg0.push(arg1);
|
|
1748
|
+
return ret;
|
|
1749
|
+
},
|
|
1750
|
+
__wbg_queueMicrotask_5d15a957e6aa920e: function(arg0) {
|
|
1751
|
+
queueMicrotask(arg0);
|
|
1752
|
+
},
|
|
1753
|
+
__wbg_queueMicrotask_f8819e5ffc402f36: function(arg0) {
|
|
1754
|
+
const ret = arg0.queueMicrotask;
|
|
1755
|
+
return ret;
|
|
1756
|
+
},
|
|
1757
|
+
__wbg_randomFillSync_6c25eac9869eb53c: function() { return handleError(function (arg0, arg1) {
|
|
1758
|
+
arg0.randomFillSync(arg1);
|
|
1759
|
+
}, arguments); },
|
|
1760
|
+
__wbg_read_ddc2d178d2e57272: function(arg0) {
|
|
1761
|
+
const ret = arg0.read();
|
|
1762
|
+
return ret;
|
|
1763
|
+
},
|
|
1764
|
+
__wbg_releaseLock_9baaf3ccc5cfad69: function(arg0) {
|
|
1765
|
+
arg0.releaseLock();
|
|
1766
|
+
},
|
|
1767
|
+
__wbg_require_b4edbdcf3e2a1ef0: function() { return handleError(function () {
|
|
1768
|
+
const ret = module.require;
|
|
1769
|
+
return ret;
|
|
1770
|
+
}, arguments); },
|
|
1771
|
+
__wbg_resolve_e6c466bc1052f16c: function(arg0) {
|
|
1772
|
+
const ret = Promise.resolve(arg0);
|
|
1773
|
+
return ret;
|
|
1774
|
+
},
|
|
1775
|
+
__wbg_respond_008ca9525ae22847: function() { return handleError(function (arg0, arg1) {
|
|
1776
|
+
arg0.respond(arg1 >>> 0);
|
|
1777
|
+
}, arguments); },
|
|
1778
|
+
__wbg_setTimeout_56bcdccbad22fd44: function() { return handleError(function (arg0, arg1) {
|
|
1779
|
+
const ret = setTimeout(arg0, arg1);
|
|
1780
|
+
return ret;
|
|
1781
|
+
}, arguments); },
|
|
1782
|
+
__wbg_setTimeout_9f4169770fc5a5c3: function(arg0, arg1) {
|
|
1783
|
+
const ret = setTimeout(arg0, arg1);
|
|
1784
|
+
return ret;
|
|
1785
|
+
},
|
|
1786
|
+
__wbg_setTimeout_b188b3bcc8977c7d: function(arg0, arg1) {
|
|
1787
|
+
const ret = setTimeout(arg0, arg1);
|
|
1788
|
+
return ret;
|
|
1789
|
+
},
|
|
1790
|
+
__wbg_set_022bee52d0b05b19: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1791
|
+
const ret = Reflect.set(arg0, arg1, arg2);
|
|
1792
|
+
return ret;
|
|
1793
|
+
}, arguments); },
|
|
1794
|
+
__wbg_set_1ffc463d4c541483: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
1795
|
+
arg0.set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1796
|
+
}, arguments); },
|
|
1797
|
+
__wbg_set_3bf1de9fab0cd644: function(arg0, arg1, arg2) {
|
|
1798
|
+
arg0[arg1 >>> 0] = arg2;
|
|
1799
|
+
},
|
|
1800
|
+
__wbg_set_3d484eb794afec82: function(arg0, arg1, arg2) {
|
|
1801
|
+
arg0.set(getArrayU8FromWasm0(arg1, arg2));
|
|
1802
|
+
},
|
|
1803
|
+
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
1804
|
+
arg0[arg1] = arg2;
|
|
1805
|
+
},
|
|
1806
|
+
__wbg_set_body_be11680f34217f75: function(arg0, arg1) {
|
|
1807
|
+
arg0.body = arg1;
|
|
1808
|
+
},
|
|
1809
|
+
__wbg_set_cache_968edea422613d1b: function(arg0, arg1) {
|
|
1810
|
+
arg0.cache = __wbindgen_enum_RequestCache[arg1];
|
|
1811
|
+
},
|
|
1812
|
+
__wbg_set_credentials_6577be90e0e85eb6: function(arg0, arg1) {
|
|
1813
|
+
arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
1814
|
+
},
|
|
1815
|
+
__wbg_set_fde2cec06c23692b: function(arg0, arg1, arg2) {
|
|
1816
|
+
const ret = arg0.set(arg1, arg2);
|
|
1817
|
+
return ret;
|
|
1818
|
+
},
|
|
1819
|
+
__wbg_set_headers_50fc01786240a440: function(arg0, arg1) {
|
|
1820
|
+
arg0.headers = arg1;
|
|
1821
|
+
},
|
|
1822
|
+
__wbg_set_integrity_5c3b8dfca7ecca82: function(arg0, arg1, arg2) {
|
|
1823
|
+
arg0.integrity = getStringFromWasm0(arg1, arg2);
|
|
1824
|
+
},
|
|
1825
|
+
__wbg_set_method_c9f1f985f6b6c427: function(arg0, arg1, arg2) {
|
|
1826
|
+
arg0.method = getStringFromWasm0(arg1, arg2);
|
|
1827
|
+
},
|
|
1828
|
+
__wbg_set_mode_5e08d503428c06b9: function(arg0, arg1) {
|
|
1829
|
+
arg0.mode = __wbindgen_enum_RequestMode[arg1];
|
|
1830
|
+
},
|
|
1831
|
+
__wbg_set_redirect_af80b8bace117f0e: function(arg0, arg1) {
|
|
1832
|
+
arg0.redirect = __wbindgen_enum_RequestRedirect[arg1];
|
|
1833
|
+
},
|
|
1834
|
+
__wbg_set_referrer_478d9a69d0d97a98: function(arg0, arg1, arg2) {
|
|
1835
|
+
arg0.referrer = getStringFromWasm0(arg1, arg2);
|
|
1836
|
+
},
|
|
1837
|
+
__wbg_set_referrer_policy_84fedaa88bc9d667: function(arg0, arg1) {
|
|
1838
|
+
arg0.referrerPolicy = __wbindgen_enum_ReferrerPolicy[arg1];
|
|
1839
|
+
},
|
|
1840
|
+
__wbg_set_signal_1d4e73c2305a0e7c: function(arg0, arg1) {
|
|
1841
|
+
arg0.signal = arg1;
|
|
1842
|
+
},
|
|
1843
|
+
__wbg_signal_fdc54643b47bf85b: function(arg0) {
|
|
1844
|
+
const ret = arg0.signal;
|
|
1845
|
+
return ret;
|
|
1846
|
+
},
|
|
1847
|
+
__wbg_static_accessor_GLOBAL_8cfadc87a297ca02: function() {
|
|
1848
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
1849
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1850
|
+
},
|
|
1851
|
+
__wbg_static_accessor_GLOBAL_THIS_602256ae5c8f42cf: function() {
|
|
1852
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
1853
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1854
|
+
},
|
|
1855
|
+
__wbg_static_accessor_SELF_e445c1c7484aecc3: function() {
|
|
1856
|
+
const ret = typeof self === 'undefined' ? null : self;
|
|
1857
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1858
|
+
},
|
|
1859
|
+
__wbg_static_accessor_WINDOW_f20e8576ef1e0f17: function() {
|
|
1860
|
+
const ret = typeof window === 'undefined' ? null : window;
|
|
1861
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1862
|
+
},
|
|
1863
|
+
__wbg_status_43e0d2f15b22d69f: function(arg0) {
|
|
1864
|
+
const ret = arg0.status;
|
|
1865
|
+
return ret;
|
|
1866
|
+
},
|
|
1867
|
+
__wbg_subarray_f8ca46a25b1f5e0d: function(arg0, arg1, arg2) {
|
|
1868
|
+
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1869
|
+
return ret;
|
|
1870
|
+
},
|
|
1871
|
+
__wbg_text_595ef75535aa25c1: function() { return handleError(function (arg0) {
|
|
1872
|
+
const ret = arg0.text();
|
|
1873
|
+
return ret;
|
|
1874
|
+
}, arguments); },
|
|
1875
|
+
__wbg_then_792e0c862b060889: function(arg0, arg1, arg2) {
|
|
1876
|
+
const ret = arg0.then(arg1, arg2);
|
|
1877
|
+
return ret;
|
|
1878
|
+
},
|
|
1879
|
+
__wbg_then_8e16ee11f05e4827: function(arg0, arg1) {
|
|
1880
|
+
const ret = arg0.then(arg1);
|
|
1881
|
+
return ret;
|
|
1882
|
+
},
|
|
1883
|
+
__wbg_toString_306ed0b9f320c1ca: function(arg0) {
|
|
1884
|
+
const ret = arg0.toString();
|
|
1885
|
+
return ret;
|
|
1886
|
+
},
|
|
1887
|
+
__wbg_trace_6a5731c8f9d2bfdf: function(arg0) {
|
|
1888
|
+
console.trace(...arg0);
|
|
1889
|
+
},
|
|
1890
|
+
__wbg_url_2bf741820e6563a0: function(arg0, arg1) {
|
|
1891
|
+
const ret = arg1.url;
|
|
1892
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1893
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1894
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1895
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1896
|
+
},
|
|
1897
|
+
__wbg_value_ee3a06f4579184fa: function(arg0) {
|
|
1898
|
+
const ret = arg0.value;
|
|
1899
|
+
return ret;
|
|
1900
|
+
},
|
|
1901
|
+
__wbg_versions_276b2795b1c6a219: function(arg0) {
|
|
1902
|
+
const ret = arg0.versions;
|
|
1903
|
+
return ret;
|
|
1904
|
+
},
|
|
1905
|
+
__wbg_view_701664ffb3b1ce67: function(arg0) {
|
|
1906
|
+
const ret = arg0.view;
|
|
1907
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1908
|
+
},
|
|
1909
|
+
__wbg_warn_2dcbaf81b6d99110: function(arg0) {
|
|
1910
|
+
console.warn(...arg0);
|
|
1911
|
+
},
|
|
1912
|
+
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
1913
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 2179, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1914
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h80274e53af2c4a90);
|
|
1915
|
+
return ret;
|
|
1916
|
+
},
|
|
1917
|
+
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
1918
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 619, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1919
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h170c6019ccfd853a);
|
|
1920
|
+
return ret;
|
|
1921
|
+
},
|
|
1922
|
+
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
1923
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 526, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1924
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__ha272cf34a0c89527);
|
|
1925
|
+
return ret;
|
|
1926
|
+
},
|
|
1927
|
+
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
1928
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 575, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1929
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h1f68ebdd661f92ac);
|
|
1930
|
+
return ret;
|
|
1931
|
+
},
|
|
1932
|
+
__wbindgen_cast_0000000000000005: function(arg0, arg1) {
|
|
1933
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 733, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1934
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hc6d79abdb072c199);
|
|
1935
|
+
return ret;
|
|
1936
|
+
},
|
|
1937
|
+
__wbindgen_cast_0000000000000006: function(arg0) {
|
|
1938
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
1939
|
+
const ret = arg0;
|
|
1940
|
+
return ret;
|
|
1941
|
+
},
|
|
1942
|
+
__wbindgen_cast_0000000000000007: function(arg0) {
|
|
1943
|
+
// Cast intrinsic for `I64 -> Externref`.
|
|
1944
|
+
const ret = arg0;
|
|
1945
|
+
return ret;
|
|
1946
|
+
},
|
|
1947
|
+
__wbindgen_cast_0000000000000008: function(arg0, arg1) {
|
|
1948
|
+
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
1949
|
+
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
1950
|
+
return ret;
|
|
1951
|
+
},
|
|
1952
|
+
__wbindgen_cast_0000000000000009: function(arg0, arg1) {
|
|
1953
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1954
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
1955
|
+
return ret;
|
|
1956
|
+
},
|
|
1957
|
+
__wbindgen_cast_000000000000000a: function(arg0) {
|
|
1958
|
+
// Cast intrinsic for `U64 -> Externref`.
|
|
1959
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
1960
|
+
return ret;
|
|
1961
|
+
},
|
|
1962
|
+
__wbindgen_init_externref_table: function() {
|
|
1963
|
+
const table = wasm.__wbindgen_externrefs;
|
|
1964
|
+
const offset = table.grow(4);
|
|
1965
|
+
table.set(0, undefined);
|
|
1966
|
+
table.set(offset + 0, undefined);
|
|
1967
|
+
table.set(offset + 1, null);
|
|
1968
|
+
table.set(offset + 2, true);
|
|
1969
|
+
table.set(offset + 3, false);
|
|
1970
|
+
},
|
|
1971
|
+
};
|
|
1972
|
+
return {
|
|
1973
|
+
__proto__: null,
|
|
1974
|
+
"./cedarling_wasm_bg.js": import0,
|
|
1247
1975
|
};
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
const ret = new Function(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
|
|
1258
|
-
return ret;
|
|
1259
|
-
};
|
|
1260
|
-
imports.wbg.__wbg_new_with_length_aa5eaf41d35235e5 = function(arg0) {
|
|
1261
|
-
const ret = new Uint8Array(arg0 >>> 0);
|
|
1262
|
-
return ret;
|
|
1263
|
-
};
|
|
1264
|
-
imports.wbg.__wbg_new_with_str_and_init_c5748f76f5108934 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1265
|
-
const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
|
|
1266
|
-
return ret;
|
|
1267
|
-
}, arguments) };
|
|
1268
|
-
imports.wbg.__wbg_next_138a17bbf04e926c = function(arg0) {
|
|
1269
|
-
const ret = arg0.next;
|
|
1270
|
-
return ret;
|
|
1271
|
-
};
|
|
1272
|
-
imports.wbg.__wbg_next_3cfe5c0fe2a4cc53 = function() { return handleError(function (arg0) {
|
|
1273
|
-
const ret = arg0.next();
|
|
1274
|
-
return ret;
|
|
1275
|
-
}, arguments) };
|
|
1276
|
-
imports.wbg.__wbg_node_905d3e251edff8a2 = function(arg0) {
|
|
1277
|
-
const ret = arg0.node;
|
|
1278
|
-
return ret;
|
|
1279
|
-
};
|
|
1280
|
-
imports.wbg.__wbg_policyevaluationerror_new = function(arg0) {
|
|
1281
|
-
const ret = PolicyEvaluationError.__wrap(arg0);
|
|
1282
|
-
return ret;
|
|
1283
|
-
};
|
|
1284
|
-
imports.wbg.__wbg_process_dc0fbacc7c1c06f7 = function(arg0) {
|
|
1285
|
-
const ret = arg0.process;
|
|
1286
|
-
return ret;
|
|
1287
|
-
};
|
|
1288
|
-
imports.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
|
|
1289
|
-
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
1290
|
-
};
|
|
1291
|
-
imports.wbg.__wbg_push_7d9be8f38fc13975 = function(arg0, arg1) {
|
|
1292
|
-
const ret = arg0.push(arg1);
|
|
1293
|
-
return ret;
|
|
1294
|
-
};
|
|
1295
|
-
imports.wbg.__wbg_queueMicrotask_9b549dfce8865860 = function(arg0) {
|
|
1296
|
-
const ret = arg0.queueMicrotask;
|
|
1297
|
-
return ret;
|
|
1298
|
-
};
|
|
1299
|
-
imports.wbg.__wbg_queueMicrotask_fca69f5bfad613a5 = function(arg0) {
|
|
1300
|
-
queueMicrotask(arg0);
|
|
1301
|
-
};
|
|
1302
|
-
imports.wbg.__wbg_randomFillSync_ac0988aba3254290 = function() { return handleError(function (arg0, arg1) {
|
|
1303
|
-
arg0.randomFillSync(arg1);
|
|
1304
|
-
}, arguments) };
|
|
1305
|
-
imports.wbg.__wbg_require_60cc747a6bc5215a = function() { return handleError(function () {
|
|
1306
|
-
const ret = module.require;
|
|
1307
|
-
return ret;
|
|
1308
|
-
}, arguments) };
|
|
1309
|
-
imports.wbg.__wbg_resolve_fd5bfbaa4ce36e1e = function(arg0) {
|
|
1310
|
-
const ret = Promise.resolve(arg0);
|
|
1311
|
-
return ret;
|
|
1312
|
-
};
|
|
1313
|
-
imports.wbg.__wbg_setTimeout_4302406184dcc5be = function(arg0, arg1) {
|
|
1314
|
-
const ret = setTimeout(arg0, arg1);
|
|
1315
|
-
return ret;
|
|
1316
|
-
};
|
|
1317
|
-
imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
1318
|
-
arg0[arg1] = arg2;
|
|
1319
|
-
};
|
|
1320
|
-
imports.wbg.__wbg_set_781438a03c0c3c81 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1321
|
-
const ret = Reflect.set(arg0, arg1, arg2);
|
|
1322
|
-
return ret;
|
|
1323
|
-
}, arguments) };
|
|
1324
|
-
imports.wbg.__wbg_set_7df433eea03a5c14 = function(arg0, arg1, arg2) {
|
|
1325
|
-
arg0[arg1 >>> 0] = arg2;
|
|
1326
|
-
};
|
|
1327
|
-
imports.wbg.__wbg_set_body_8e743242d6076a4f = function(arg0, arg1) {
|
|
1328
|
-
arg0.body = arg1;
|
|
1329
|
-
};
|
|
1330
|
-
imports.wbg.__wbg_set_cache_0e437c7c8e838b9b = function(arg0, arg1) {
|
|
1331
|
-
arg0.cache = __wbindgen_enum_RequestCache[arg1];
|
|
1332
|
-
};
|
|
1333
|
-
imports.wbg.__wbg_set_credentials_55ae7c3c106fd5be = function(arg0, arg1) {
|
|
1334
|
-
arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
1335
|
-
};
|
|
1336
|
-
imports.wbg.__wbg_set_efaaf145b9377369 = function(arg0, arg1, arg2) {
|
|
1337
|
-
const ret = arg0.set(arg1, arg2);
|
|
1338
|
-
return ret;
|
|
1339
|
-
};
|
|
1340
|
-
imports.wbg.__wbg_set_headers_5671cf088e114d2b = function(arg0, arg1) {
|
|
1341
|
-
arg0.headers = arg1;
|
|
1342
|
-
};
|
|
1343
|
-
imports.wbg.__wbg_set_method_76c69e41b3570627 = function(arg0, arg1, arg2) {
|
|
1344
|
-
arg0.method = getStringFromWasm0(arg1, arg2);
|
|
1345
|
-
};
|
|
1346
|
-
imports.wbg.__wbg_set_mode_611016a6818fc690 = function(arg0, arg1) {
|
|
1347
|
-
arg0.mode = __wbindgen_enum_RequestMode[arg1];
|
|
1348
|
-
};
|
|
1349
|
-
imports.wbg.__wbg_set_signal_e89be862d0091009 = function(arg0, arg1) {
|
|
1350
|
-
arg0.signal = arg1;
|
|
1351
|
-
};
|
|
1352
|
-
imports.wbg.__wbg_signal_3c14fbdc89694b39 = function(arg0) {
|
|
1353
|
-
const ret = arg0.signal;
|
|
1354
|
-
return ret;
|
|
1355
|
-
};
|
|
1356
|
-
imports.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335 = function() {
|
|
1357
|
-
const ret = typeof global === 'undefined' ? null : global;
|
|
1358
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1359
|
-
};
|
|
1360
|
-
imports.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1 = function() {
|
|
1361
|
-
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
1362
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1363
|
-
};
|
|
1364
|
-
imports.wbg.__wbg_static_accessor_SELF_08f5a74c69739274 = function() {
|
|
1365
|
-
const ret = typeof self === 'undefined' ? null : self;
|
|
1366
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1367
|
-
};
|
|
1368
|
-
imports.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024 = function() {
|
|
1369
|
-
const ret = typeof window === 'undefined' ? null : window;
|
|
1370
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1371
|
-
};
|
|
1372
|
-
imports.wbg.__wbg_status_9bfc680efca4bdfd = function(arg0) {
|
|
1373
|
-
const ret = arg0.status;
|
|
1374
|
-
return ret;
|
|
1375
|
-
};
|
|
1376
|
-
imports.wbg.__wbg_stringify_655a6390e1f5eb6b = function() { return handleError(function (arg0) {
|
|
1377
|
-
const ret = JSON.stringify(arg0);
|
|
1378
|
-
return ret;
|
|
1379
|
-
}, arguments) };
|
|
1380
|
-
imports.wbg.__wbg_subarray_845f2f5bce7d061a = function(arg0, arg1, arg2) {
|
|
1381
|
-
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1382
|
-
return ret;
|
|
1383
|
-
};
|
|
1384
|
-
imports.wbg.__wbg_text_51046bb33d257f63 = function() { return handleError(function (arg0) {
|
|
1385
|
-
const ret = arg0.text();
|
|
1386
|
-
return ret;
|
|
1387
|
-
}, arguments) };
|
|
1388
|
-
imports.wbg.__wbg_then_429f7caf1026411d = function(arg0, arg1, arg2) {
|
|
1389
|
-
const ret = arg0.then(arg1, arg2);
|
|
1390
|
-
return ret;
|
|
1391
|
-
};
|
|
1392
|
-
imports.wbg.__wbg_then_4f95312d68691235 = function(arg0, arg1) {
|
|
1393
|
-
const ret = arg0.then(arg1);
|
|
1394
|
-
return ret;
|
|
1395
|
-
};
|
|
1396
|
-
imports.wbg.__wbg_trace_b213249bfc587469 = function(arg0) {
|
|
1397
|
-
console.trace(...arg0);
|
|
1398
|
-
};
|
|
1399
|
-
imports.wbg.__wbg_url_b6d11838a4f95198 = function(arg0, arg1) {
|
|
1400
|
-
const ret = arg1.url;
|
|
1401
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1402
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1403
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1404
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1405
|
-
};
|
|
1406
|
-
imports.wbg.__wbg_value_57b7b035e117f7ee = function(arg0) {
|
|
1407
|
-
const ret = arg0.value;
|
|
1408
|
-
return ret;
|
|
1409
|
-
};
|
|
1410
|
-
imports.wbg.__wbg_versions_c01dfd4722a88165 = function(arg0) {
|
|
1411
|
-
const ret = arg0.versions;
|
|
1412
|
-
return ret;
|
|
1413
|
-
};
|
|
1414
|
-
imports.wbg.__wbg_warn_14a9fd75d0abe5d7 = function(arg0) {
|
|
1415
|
-
console.warn(...arg0);
|
|
1416
|
-
};
|
|
1417
|
-
imports.wbg.__wbindgen_cast_0e8a9f348831646f = function(arg0, arg1) {
|
|
1418
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 510, function: Function { arguments: [], shim_idx: 511, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1419
|
-
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h3edd0da2e16650db, wasm_bindgen__convert__closures_____invoke__h8a10b0fb25c32ce7);
|
|
1420
|
-
return ret;
|
|
1421
|
-
};
|
|
1422
|
-
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
1423
|
-
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1424
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
1425
|
-
return ret;
|
|
1426
|
-
};
|
|
1427
|
-
imports.wbg.__wbindgen_cast_317cf9338e91f114 = function(arg0, arg1) {
|
|
1428
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 555, function: Function { arguments: [Externref], shim_idx: 556, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1429
|
-
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h8554173f80599467, wasm_bindgen__convert__closures_____invoke__h7f8b71809a8d7577);
|
|
1430
|
-
return ret;
|
|
1431
|
-
};
|
|
1432
|
-
imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
|
|
1433
|
-
// Cast intrinsic for `U64 -> Externref`.
|
|
1434
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
1435
|
-
return ret;
|
|
1436
|
-
};
|
|
1437
|
-
imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
|
|
1438
|
-
// Cast intrinsic for `I64 -> Externref`.
|
|
1439
|
-
const ret = arg0;
|
|
1440
|
-
return ret;
|
|
1441
|
-
};
|
|
1442
|
-
imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
|
|
1443
|
-
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
1444
|
-
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
1445
|
-
return ret;
|
|
1446
|
-
};
|
|
1447
|
-
imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
1448
|
-
// Cast intrinsic for `F64 -> Externref`.
|
|
1449
|
-
const ret = arg0;
|
|
1450
|
-
return ret;
|
|
1451
|
-
};
|
|
1452
|
-
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
1453
|
-
const table = wasm.__wbindgen_externrefs;
|
|
1454
|
-
const offset = table.grow(4);
|
|
1455
|
-
table.set(0, undefined);
|
|
1456
|
-
table.set(offset + 0, undefined);
|
|
1457
|
-
table.set(offset + 1, null);
|
|
1458
|
-
table.set(offset + 2, true);
|
|
1459
|
-
table.set(offset + 3, false);
|
|
1460
|
-
};
|
|
1976
|
+
}
|
|
1977
|
+
|
|
1978
|
+
function wasm_bindgen__convert__closures_____invoke__ha272cf34a0c89527(arg0, arg1) {
|
|
1979
|
+
wasm.wasm_bindgen__convert__closures_____invoke__ha272cf34a0c89527(arg0, arg1);
|
|
1980
|
+
}
|
|
1981
|
+
|
|
1982
|
+
function wasm_bindgen__convert__closures_____invoke__h1f68ebdd661f92ac(arg0, arg1) {
|
|
1983
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h1f68ebdd661f92ac(arg0, arg1);
|
|
1984
|
+
}
|
|
1461
1985
|
|
|
1462
|
-
|
|
1986
|
+
function wasm_bindgen__convert__closures_____invoke__hc6d79abdb072c199(arg0, arg1) {
|
|
1987
|
+
wasm.wasm_bindgen__convert__closures_____invoke__hc6d79abdb072c199(arg0, arg1);
|
|
1463
1988
|
}
|
|
1464
1989
|
|
|
1465
|
-
function
|
|
1466
|
-
wasm
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1990
|
+
function wasm_bindgen__convert__closures_____invoke__h170c6019ccfd853a(arg0, arg1, arg2) {
|
|
1991
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h170c6019ccfd853a(arg0, arg1, arg2);
|
|
1992
|
+
}
|
|
1993
|
+
|
|
1994
|
+
function wasm_bindgen__convert__closures_____invoke__h80274e53af2c4a90(arg0, arg1, arg2) {
|
|
1995
|
+
const ret = wasm.wasm_bindgen__convert__closures_____invoke__h80274e53af2c4a90(arg0, arg1, arg2);
|
|
1996
|
+
if (ret[1]) {
|
|
1997
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1998
|
+
}
|
|
1999
|
+
}
|
|
2000
|
+
|
|
2001
|
+
function wasm_bindgen__convert__closures_____invoke__h66f11f9242c621fe(arg0, arg1, arg2, arg3) {
|
|
2002
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h66f11f9242c621fe(arg0, arg1, arg2, arg3);
|
|
2003
|
+
}
|
|
2004
|
+
|
|
2005
|
+
|
|
2006
|
+
const __wbindgen_enum_ReadableStreamType = ["bytes"];
|
|
2007
|
+
|
|
2008
|
+
|
|
2009
|
+
const __wbindgen_enum_ReferrerPolicy = ["", "no-referrer", "no-referrer-when-downgrade", "origin", "origin-when-cross-origin", "unsafe-url", "same-origin", "strict-origin", "strict-origin-when-cross-origin"];
|
|
2010
|
+
|
|
2011
|
+
|
|
2012
|
+
const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
|
|
2013
|
+
|
|
2014
|
+
|
|
2015
|
+
const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
|
|
2016
|
+
|
|
2017
|
+
|
|
2018
|
+
const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
|
|
2019
|
+
|
|
1470
2020
|
|
|
2021
|
+
const __wbindgen_enum_RequestRedirect = ["follow", "error", "manual"];
|
|
2022
|
+
const AuthorizeResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2023
|
+
? { register: () => {}, unregister: () => {} }
|
|
2024
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_authorizeresult_free(ptr >>> 0, 1));
|
|
2025
|
+
const AuthorizeResultResponseFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2026
|
+
? { register: () => {}, unregister: () => {} }
|
|
2027
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_authorizeresultresponse_free(ptr >>> 0, 1));
|
|
2028
|
+
const CedarlingFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2029
|
+
? { register: () => {}, unregister: () => {} }
|
|
2030
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_cedarling_free(ptr >>> 0, 1));
|
|
2031
|
+
const DataEntryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2032
|
+
? { register: () => {}, unregister: () => {} }
|
|
2033
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_dataentry_free(ptr >>> 0, 1));
|
|
2034
|
+
const DataStoreStatsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2035
|
+
? { register: () => {}, unregister: () => {} }
|
|
2036
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_datastorestats_free(ptr >>> 0, 1));
|
|
2037
|
+
const DiagnosticsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2038
|
+
? { register: () => {}, unregister: () => {} }
|
|
2039
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_diagnostics_free(ptr >>> 0, 1));
|
|
2040
|
+
const IntoUnderlyingByteSourceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2041
|
+
? { register: () => {}, unregister: () => {} }
|
|
2042
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingbytesource_free(ptr >>> 0, 1));
|
|
2043
|
+
const IntoUnderlyingSinkFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2044
|
+
? { register: () => {}, unregister: () => {} }
|
|
2045
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsink_free(ptr >>> 0, 1));
|
|
2046
|
+
const IntoUnderlyingSourceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2047
|
+
? { register: () => {}, unregister: () => {} }
|
|
2048
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_intounderlyingsource_free(ptr >>> 0, 1));
|
|
2049
|
+
const MultiIssuerAuthorizeResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2050
|
+
? { register: () => {}, unregister: () => {} }
|
|
2051
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_multiissuerauthorizeresult_free(ptr >>> 0, 1));
|
|
2052
|
+
const PolicyEvaluationErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2053
|
+
? { register: () => {}, unregister: () => {} }
|
|
2054
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_policyevaluationerror_free(ptr >>> 0, 1));
|
|
1471
2055
|
|
|
1472
|
-
|
|
1473
|
-
|
|
2056
|
+
function addToExternrefTable0(obj) {
|
|
2057
|
+
const idx = wasm.__externref_table_alloc();
|
|
2058
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
2059
|
+
return idx;
|
|
1474
2060
|
}
|
|
1475
2061
|
|
|
1476
|
-
function
|
|
1477
|
-
if (
|
|
2062
|
+
function _assertClass(instance, klass) {
|
|
2063
|
+
if (!(instance instanceof klass)) {
|
|
2064
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
2065
|
+
}
|
|
2066
|
+
}
|
|
1478
2067
|
|
|
2068
|
+
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
2069
|
+
? { register: () => {}, unregister: () => {} }
|
|
2070
|
+
: new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b));
|
|
1479
2071
|
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
2072
|
+
function debugString(val) {
|
|
2073
|
+
// primitive types
|
|
2074
|
+
const type = typeof val;
|
|
2075
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
2076
|
+
return `${val}`;
|
|
2077
|
+
}
|
|
2078
|
+
if (type == 'string') {
|
|
2079
|
+
return `"${val}"`;
|
|
2080
|
+
}
|
|
2081
|
+
if (type == 'symbol') {
|
|
2082
|
+
const description = val.description;
|
|
2083
|
+
if (description == null) {
|
|
2084
|
+
return 'Symbol';
|
|
2085
|
+
} else {
|
|
2086
|
+
return `Symbol(${description})`;
|
|
2087
|
+
}
|
|
2088
|
+
}
|
|
2089
|
+
if (type == 'function') {
|
|
2090
|
+
const name = val.name;
|
|
2091
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
2092
|
+
return `Function(${name})`;
|
|
1483
2093
|
} else {
|
|
1484
|
-
|
|
2094
|
+
return 'Function';
|
|
2095
|
+
}
|
|
2096
|
+
}
|
|
2097
|
+
// objects
|
|
2098
|
+
if (Array.isArray(val)) {
|
|
2099
|
+
const length = val.length;
|
|
2100
|
+
let debug = '[';
|
|
2101
|
+
if (length > 0) {
|
|
2102
|
+
debug += debugString(val[0]);
|
|
2103
|
+
}
|
|
2104
|
+
for(let i = 1; i < length; i++) {
|
|
2105
|
+
debug += ', ' + debugString(val[i]);
|
|
2106
|
+
}
|
|
2107
|
+
debug += ']';
|
|
2108
|
+
return debug;
|
|
2109
|
+
}
|
|
2110
|
+
// Test for built-in
|
|
2111
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
2112
|
+
let className;
|
|
2113
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
2114
|
+
className = builtInMatches[1];
|
|
2115
|
+
} else {
|
|
2116
|
+
// Failed to match the standard '[object ClassName]'
|
|
2117
|
+
return toString.call(val);
|
|
2118
|
+
}
|
|
2119
|
+
if (className == 'Object') {
|
|
2120
|
+
// we're a user defined class or Object
|
|
2121
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
2122
|
+
// easier than looping through ownProperties of `val`.
|
|
2123
|
+
try {
|
|
2124
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
2125
|
+
} catch (_) {
|
|
2126
|
+
return 'Object';
|
|
1485
2127
|
}
|
|
1486
2128
|
}
|
|
2129
|
+
// errors
|
|
2130
|
+
if (val instanceof Error) {
|
|
2131
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
2132
|
+
}
|
|
2133
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
2134
|
+
return className;
|
|
2135
|
+
}
|
|
1487
2136
|
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
2137
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
2138
|
+
ptr = ptr >>> 0;
|
|
2139
|
+
const mem = getDataViewMemory0();
|
|
2140
|
+
const result = [];
|
|
2141
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
2142
|
+
result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
|
|
1491
2143
|
}
|
|
1492
|
-
|
|
1493
|
-
return
|
|
2144
|
+
wasm.__externref_drop_slice(ptr, len);
|
|
2145
|
+
return result;
|
|
2146
|
+
}
|
|
2147
|
+
|
|
2148
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
2149
|
+
ptr = ptr >>> 0;
|
|
2150
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
1494
2151
|
}
|
|
1495
2152
|
|
|
1496
|
-
|
|
1497
|
-
|
|
2153
|
+
let cachedDataViewMemory0 = null;
|
|
2154
|
+
function getDataViewMemory0() {
|
|
2155
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
2156
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
2157
|
+
}
|
|
2158
|
+
return cachedDataViewMemory0;
|
|
2159
|
+
}
|
|
1498
2160
|
|
|
2161
|
+
function getStringFromWasm0(ptr, len) {
|
|
2162
|
+
ptr = ptr >>> 0;
|
|
2163
|
+
return decodeText(ptr, len);
|
|
2164
|
+
}
|
|
1499
2165
|
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
2166
|
+
let cachedUint8ArrayMemory0 = null;
|
|
2167
|
+
function getUint8ArrayMemory0() {
|
|
2168
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
2169
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
2170
|
+
}
|
|
2171
|
+
return cachedUint8ArrayMemory0;
|
|
2172
|
+
}
|
|
2173
|
+
|
|
2174
|
+
function handleError(f, args) {
|
|
2175
|
+
try {
|
|
2176
|
+
return f.apply(this, args);
|
|
2177
|
+
} catch (e) {
|
|
2178
|
+
const idx = addToExternrefTable0(e);
|
|
2179
|
+
wasm.__wbindgen_exn_store(idx);
|
|
2180
|
+
}
|
|
2181
|
+
}
|
|
2182
|
+
|
|
2183
|
+
function isLikeNone(x) {
|
|
2184
|
+
return x === undefined || x === null;
|
|
2185
|
+
}
|
|
2186
|
+
|
|
2187
|
+
function makeMutClosure(arg0, arg1, f) {
|
|
2188
|
+
const state = { a: arg0, b: arg1, cnt: 1 };
|
|
2189
|
+
const real = (...args) => {
|
|
2190
|
+
|
|
2191
|
+
// First up with a closure we increment the internal reference
|
|
2192
|
+
// count. This ensures that the Rust closure environment won't
|
|
2193
|
+
// be deallocated while we're invoking it.
|
|
2194
|
+
state.cnt++;
|
|
2195
|
+
const a = state.a;
|
|
2196
|
+
state.a = 0;
|
|
2197
|
+
try {
|
|
2198
|
+
return f(a, state.b, ...args);
|
|
2199
|
+
} finally {
|
|
2200
|
+
state.a = a;
|
|
2201
|
+
real._wbg_cb_unref();
|
|
2202
|
+
}
|
|
2203
|
+
};
|
|
2204
|
+
real._wbg_cb_unref = () => {
|
|
2205
|
+
if (--state.cnt === 0) {
|
|
2206
|
+
wasm.__wbindgen_destroy_closure(state.a, state.b);
|
|
2207
|
+
state.a = 0;
|
|
2208
|
+
CLOSURE_DTORS.unregister(state);
|
|
1505
2209
|
}
|
|
2210
|
+
};
|
|
2211
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
2212
|
+
return real;
|
|
2213
|
+
}
|
|
2214
|
+
|
|
2215
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
2216
|
+
if (realloc === undefined) {
|
|
2217
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
2218
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
2219
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
2220
|
+
WASM_VECTOR_LEN = buf.length;
|
|
2221
|
+
return ptr;
|
|
1506
2222
|
}
|
|
1507
2223
|
|
|
1508
|
-
|
|
1509
|
-
|
|
2224
|
+
let len = arg.length;
|
|
2225
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
2226
|
+
|
|
2227
|
+
const mem = getUint8ArrayMemory0();
|
|
2228
|
+
|
|
2229
|
+
let offset = 0;
|
|
2230
|
+
|
|
2231
|
+
for (; offset < len; offset++) {
|
|
2232
|
+
const code = arg.charCodeAt(offset);
|
|
2233
|
+
if (code > 0x7F) break;
|
|
2234
|
+
mem[ptr + offset] = code;
|
|
1510
2235
|
}
|
|
1511
|
-
|
|
2236
|
+
if (offset !== len) {
|
|
2237
|
+
if (offset !== 0) {
|
|
2238
|
+
arg = arg.slice(offset);
|
|
2239
|
+
}
|
|
2240
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
2241
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
2242
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
1512
2243
|
|
|
1513
|
-
|
|
1514
|
-
|
|
2244
|
+
offset += ret.written;
|
|
2245
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
1515
2246
|
}
|
|
1516
2247
|
|
|
1517
|
-
|
|
2248
|
+
WASM_VECTOR_LEN = offset;
|
|
2249
|
+
return ptr;
|
|
2250
|
+
}
|
|
2251
|
+
|
|
2252
|
+
function takeFromExternrefTable0(idx) {
|
|
2253
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
2254
|
+
wasm.__externref_table_dealloc(idx);
|
|
2255
|
+
return value;
|
|
2256
|
+
}
|
|
2257
|
+
|
|
2258
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
2259
|
+
cachedTextDecoder.decode();
|
|
2260
|
+
function decodeText(ptr, len) {
|
|
2261
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2264
|
+
const cachedTextEncoder = new TextEncoder();
|
|
1518
2265
|
|
|
1519
|
-
|
|
2266
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
2267
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
2268
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
2269
|
+
view.set(buf);
|
|
2270
|
+
return {
|
|
2271
|
+
read: arg.length,
|
|
2272
|
+
written: buf.length
|
|
2273
|
+
};
|
|
2274
|
+
};
|
|
1520
2275
|
}
|
|
1521
2276
|
|
|
1522
|
-
|
|
1523
|
-
|
|
2277
|
+
let WASM_VECTOR_LEN = 0;
|
|
2278
|
+
|
|
2279
|
+
const wasmPath = `${__dirname}/cedarling_wasm_bg.wasm`;
|
|
2280
|
+
const wasmBytes = require('fs').readFileSync(wasmPath);
|
|
2281
|
+
const wasmModule = new WebAssembly.Module(wasmBytes);
|
|
2282
|
+
let wasm = new WebAssembly.Instance(wasmModule, __wbg_get_imports()).exports;
|
|
2283
|
+
wasm.__wbindgen_start();
|