@janssenproject/cedarling_wasm 0.0.307 → 0.0.308-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/cedarling_wasm.js CHANGED
@@ -1,426 +1,150 @@
1
- let wasm;
1
+ /* @ts-self-types="./cedarling_wasm.d.ts" */
2
2
 
3
- function addToExternrefTable0(obj) {
4
- const idx = wasm.__externref_table_alloc();
5
- wasm.__wbindgen_externrefs.set(idx, obj);
6
- return idx;
7
- }
8
-
9
- function _assertClass(instance, klass) {
10
- if (!(instance instanceof klass)) {
11
- throw new Error(`expected instance of ${klass.name}`);
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
- const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
16
- ? { register: () => {}, unregister: () => {} }
17
- : new FinalizationRegistry(state => state.dtor(state.a, state.b));
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
- if (type == 'string') {
26
- return `"${val}"`;
21
+ free() {
22
+ const ptr = this.__destroy_into_raw();
23
+ wasm.__wbg_authorizeresult_free(ptr, 0);
27
24
  }
28
- if (type == 'symbol') {
29
- const description = val.description;
30
- if (description == null) {
31
- return 'Symbol';
32
- } else {
33
- return `Symbol(${description})`;
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
- if (type == 'function') {
37
- const name = val.name;
38
- if (typeof name == 'string' && name.length > 0) {
39
- return `Function(${name})`;
40
- } else {
41
- return 'Function';
42
- }
41
+ /**
42
+ * @param {string} principal
43
+ * @returns {AuthorizeResultResponse | undefined}
44
+ */
45
+ principal(principal) {
46
+ const ptr0 = passStringToWasm0(principal, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
47
+ const len0 = WASM_VECTOR_LEN;
48
+ const ret = wasm.authorizeresult_principal(this.__wbg_ptr, ptr0, len0);
49
+ return ret === 0 ? undefined : AuthorizeResultResponse.__wrap(ret);
43
50
  }
44
- // objects
45
- if (Array.isArray(val)) {
46
- const length = val.length;
47
- let debug = '[';
48
- if (length > 0) {
49
- debug += debugString(val[0]);
50
- }
51
- for(let i = 1; i < length; i++) {
52
- debug += ', ' + debugString(val[i]);
53
- }
54
- debug += ']';
55
- return debug;
51
+ /**
52
+ * Result of authorization
53
+ * true means `ALLOW`
54
+ * false means `Deny`
55
+ *
56
+ * this field is [`bool`] type to be compatible with [authzen Access Evaluation Decision](https://openid.github.io/authzen/#section-6.2.1).
57
+ * @returns {boolean}
58
+ */
59
+ get decision() {
60
+ const ret = wasm.__wbg_get_authorizeresult_decision(this.__wbg_ptr);
61
+ return ret !== 0;
56
62
  }
57
- // Test for built-in
58
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
59
- let className;
60
- if (builtInMatches && builtInMatches.length > 1) {
61
- className = builtInMatches[1];
62
- } else {
63
- // Failed to match the standard '[object ClassName]'
64
- return toString.call(val);
63
+ /**
64
+ * Result of authorization where principal is `Jans::User`
65
+ * @returns {AuthorizeResultResponse | undefined}
66
+ */
67
+ get person() {
68
+ const ret = wasm.__wbg_get_authorizeresult_person(this.__wbg_ptr);
69
+ return ret === 0 ? undefined : AuthorizeResultResponse.__wrap(ret);
65
70
  }
66
- if (className == 'Object') {
67
- // we're a user defined class or Object
68
- // JSON.stringify avoids problems with cycles, and is generally much
69
- // easier than looping through ownProperties of `val`.
71
+ /**
72
+ * Request ID of the authorization request
73
+ * @returns {string}
74
+ */
75
+ get request_id() {
76
+ let deferred1_0;
77
+ let deferred1_1;
70
78
  try {
71
- return 'Object(' + JSON.stringify(val) + ')';
72
- } catch (_) {
73
- return 'Object';
79
+ const ret = wasm.__wbg_get_authorizeresult_request_id(this.__wbg_ptr);
80
+ deferred1_0 = ret[0];
81
+ deferred1_1 = ret[1];
82
+ return getStringFromWasm0(ret[0], ret[1]);
83
+ } finally {
84
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
74
85
  }
75
86
  }
76
- // errors
77
- if (val instanceof Error) {
78
- return `${val.name}: ${val.message}\n${val.stack}`;
87
+ /**
88
+ * Result of authorization where principal is `Jans::Workload`
89
+ * @returns {AuthorizeResultResponse | undefined}
90
+ */
91
+ get workload() {
92
+ const ret = wasm.__wbg_get_authorizeresult_workload(this.__wbg_ptr);
93
+ return ret === 0 ? undefined : AuthorizeResultResponse.__wrap(ret);
79
94
  }
80
- // TODO we could test for more things here, like `Set`s and `Map`s.
81
- return className;
82
- }
83
-
84
- function getArrayJsValueFromWasm0(ptr, len) {
85
- ptr = ptr >>> 0;
86
- const mem = getDataViewMemory0();
87
- const result = [];
88
- for (let i = ptr; i < ptr + 4 * len; i += 4) {
89
- result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
95
+ /**
96
+ * Result of authorization
97
+ * true means `ALLOW`
98
+ * false means `Deny`
99
+ *
100
+ * this field is [`bool`] type to be compatible with [authzen Access Evaluation Decision](https://openid.github.io/authzen/#section-6.2.1).
101
+ * @param {boolean} arg0
102
+ */
103
+ set decision(arg0) {
104
+ wasm.__wbg_set_authorizeresult_decision(this.__wbg_ptr, arg0);
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
- }
99
-
100
- let cachedDataViewMemory0 = null;
101
- function getDataViewMemory0() {
102
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
103
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
106
+ /**
107
+ * Result of authorization where principal is `Jans::User`
108
+ * @param {AuthorizeResultResponse | null} [arg0]
109
+ */
110
+ set person(arg0) {
111
+ let ptr0 = 0;
112
+ if (!isLikeNone(arg0)) {
113
+ _assertClass(arg0, AuthorizeResultResponse);
114
+ ptr0 = arg0.__destroy_into_raw();
115
+ }
116
+ wasm.__wbg_set_authorizeresult_person(this.__wbg_ptr, ptr0);
104
117
  }
105
- return cachedDataViewMemory0;
106
- }
107
-
108
- function getStringFromWasm0(ptr, len) {
109
- ptr = ptr >>> 0;
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);
118
+ /**
119
+ * Request ID of the authorization request
120
+ * @param {string} arg0
121
+ */
122
+ set request_id(arg0) {
123
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
124
+ const len0 = WASM_VECTOR_LEN;
125
+ wasm.__wbg_set_authorizeresult_request_id(this.__wbg_ptr, ptr0, len0);
117
126
  }
118
- return cachedUint8ArrayMemory0;
119
- }
120
-
121
- function handleError(f, args) {
122
- try {
123
- return f.apply(this, args);
124
- } catch (e) {
125
- const idx = addToExternrefTable0(e);
126
- wasm.__wbindgen_exn_store(idx);
127
+ /**
128
+ * Result of authorization where principal is `Jans::Workload`
129
+ * @param {AuthorizeResultResponse | null} [arg0]
130
+ */
131
+ set workload(arg0) {
132
+ let ptr0 = 0;
133
+ if (!isLikeNone(arg0)) {
134
+ _assertClass(arg0, AuthorizeResultResponse);
135
+ ptr0 = arg0.__destroy_into_raw();
136
+ }
137
+ wasm.__wbg_set_authorizeresult_workload(this.__wbg_ptr, ptr0);
127
138
  }
128
139
  }
129
-
130
- function isLikeNone(x) {
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__h7f8b71809a8d7577(arg0, arg1, arg2) {
235
- wasm.wasm_bindgen__convert__closures_____invoke__h7f8b71809a8d7577(arg0, arg1, arg2);
236
- }
237
-
238
- function wasm_bindgen__convert__closures_____invoke__h5208add59d64c287(arg0, arg1) {
239
- wasm.wasm_bindgen__convert__closures_____invoke__h5208add59d64c287(arg0, arg1);
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));
279
-
280
- /**
281
- * A WASM wrapper for the Rust `cedarling::AuthorizeResult` struct.
282
- * Represents the result of an authorization request.
283
- */
284
- export class AuthorizeResult {
285
- static __wrap(ptr) {
286
- ptr = ptr >>> 0;
287
- const obj = Object.create(AuthorizeResult.prototype);
288
- obj.__wbg_ptr = ptr;
289
- AuthorizeResultFinalization.register(obj, obj.__wbg_ptr, obj);
290
- return obj;
291
- }
292
- __destroy_into_raw() {
293
- const ptr = this.__wbg_ptr;
294
- this.__wbg_ptr = 0;
295
- AuthorizeResultFinalization.unregister(this);
296
- return ptr;
297
- }
298
- free() {
299
- const ptr = this.__destroy_into_raw();
300
- wasm.__wbg_authorizeresult_free(ptr, 0);
301
- }
302
- /**
303
- * Result of authorization where principal is `Jans::Workload`
304
- * @returns {AuthorizeResultResponse | undefined}
305
- */
306
- get workload() {
307
- const ret = wasm.__wbg_get_authorizeresult_workload(this.__wbg_ptr);
308
- return ret === 0 ? undefined : AuthorizeResultResponse.__wrap(ret);
309
- }
310
- /**
311
- * Result of authorization where principal is `Jans::Workload`
312
- * @param {AuthorizeResultResponse | null} [arg0]
313
- */
314
- set workload(arg0) {
315
- let ptr0 = 0;
316
- if (!isLikeNone(arg0)) {
317
- _assertClass(arg0, AuthorizeResultResponse);
318
- ptr0 = arg0.__destroy_into_raw();
319
- }
320
- wasm.__wbg_set_authorizeresult_workload(this.__wbg_ptr, ptr0);
321
- }
322
- /**
323
- * Result of authorization where principal is `Jans::User`
324
- * @returns {AuthorizeResultResponse | undefined}
325
- */
326
- get person() {
327
- const ret = wasm.__wbg_get_authorizeresult_person(this.__wbg_ptr);
328
- return ret === 0 ? undefined : AuthorizeResultResponse.__wrap(ret);
329
- }
330
- /**
331
- * Result of authorization where principal is `Jans::User`
332
- * @param {AuthorizeResultResponse | null} [arg0]
333
- */
334
- set person(arg0) {
335
- let ptr0 = 0;
336
- if (!isLikeNone(arg0)) {
337
- _assertClass(arg0, AuthorizeResultResponse);
338
- ptr0 = arg0.__destroy_into_raw();
339
- }
340
- wasm.__wbg_set_authorizeresult_person(this.__wbg_ptr, ptr0);
341
- }
342
- /**
343
- * Result of authorization
344
- * true means `ALLOW`
345
- * false means `Deny`
346
- *
347
- * this field is [`bool`] type to be compatible with [authzen Access Evaluation Decision](https://openid.github.io/authzen/#section-6.2.1).
348
- * @returns {boolean}
349
- */
350
- get decision() {
351
- const ret = wasm.__wbg_get_authorizeresult_decision(this.__wbg_ptr);
352
- return ret !== 0;
353
- }
354
- /**
355
- * Result of authorization
356
- * true means `ALLOW`
357
- * false means `Deny`
358
- *
359
- * this field is [`bool`] type to be compatible with [authzen Access Evaluation Decision](https://openid.github.io/authzen/#section-6.2.1).
360
- * @param {boolean} arg0
361
- */
362
- set decision(arg0) {
363
- wasm.__wbg_set_authorizeresult_decision(this.__wbg_ptr, arg0);
364
- }
365
- /**
366
- * Request ID of the authorization request
367
- * @returns {string}
368
- */
369
- get request_id() {
370
- let deferred1_0;
371
- let deferred1_1;
372
- try {
373
- const ret = wasm.__wbg_get_authorizeresult_request_id(this.__wbg_ptr);
374
- deferred1_0 = ret[0];
375
- deferred1_1 = ret[1];
376
- return getStringFromWasm0(ret[0], ret[1]);
377
- } finally {
378
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
379
- }
380
- }
381
- /**
382
- * Request ID of the authorization request
383
- * @param {string} arg0
384
- */
385
- set request_id(arg0) {
386
- const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
387
- const len0 = WASM_VECTOR_LEN;
388
- wasm.__wbg_set_authorizeresult_request_id(this.__wbg_ptr, ptr0, len0);
389
- }
390
- /**
391
- * Convert `AuthorizeResult` to json string value
392
- * @returns {string}
393
- */
394
- json_string() {
395
- let deferred1_0;
396
- let deferred1_1;
397
- try {
398
- const ret = wasm.authorizeresult_json_string(this.__wbg_ptr);
399
- deferred1_0 = ret[0];
400
- deferred1_1 = ret[1];
401
- return getStringFromWasm0(ret[0], ret[1]);
402
- } finally {
403
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
404
- }
405
- }
406
- /**
407
- * @param {string} principal
408
- * @returns {AuthorizeResultResponse | undefined}
409
- */
410
- principal(principal) {
411
- const ptr0 = passStringToWasm0(principal, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
412
- const len0 = WASM_VECTOR_LEN;
413
- const ret = wasm.authorizeresult_principal(this.__wbg_ptr, ptr0, len0);
414
- return ret === 0 ? undefined : AuthorizeResultResponse.__wrap(ret);
415
- }
416
- }
417
- if (Symbol.dispose) AuthorizeResult.prototype[Symbol.dispose] = AuthorizeResult.prototype.free;
140
+ if (Symbol.dispose) AuthorizeResult.prototype[Symbol.dispose] = AuthorizeResult.prototype.free;
141
+ exports.AuthorizeResult = AuthorizeResult;
418
142
 
419
143
  /**
420
144
  * A WASM wrapper for the Rust `cedar_policy::Response` struct.
421
145
  * Represents the result of an authorization request.
422
146
  */
423
- export class AuthorizeResultResponse {
147
+ class AuthorizeResultResponse {
424
148
  static __wrap(ptr) {
425
149
  ptr = ptr >>> 0;
426
150
  const obj = Object.create(AuthorizeResultResponse.prototype);
@@ -456,11 +180,12 @@ export class AuthorizeResultResponse {
456
180
  }
457
181
  }
458
182
  if (Symbol.dispose) AuthorizeResultResponse.prototype[Symbol.dispose] = AuthorizeResultResponse.prototype.free;
183
+ exports.AuthorizeResultResponse = AuthorizeResultResponse;
459
184
 
460
185
  /**
461
186
  * The instance of the Cedarling application.
462
187
  */
463
- export class Cedarling {
188
+ class Cedarling {
464
189
  static __wrap(ptr) {
465
190
  ptr = ptr >>> 0;
466
191
  const obj = Object.create(Cedarling.prototype);
@@ -479,45 +204,15 @@ export class Cedarling {
479
204
  wasm.__wbg_cedarling_free(ptr, 0);
480
205
  }
481
206
  /**
482
- * Create a new instance of the Cedarling application.
483
- * Assume that config is `Object`
484
- * @param {object} config
485
- * @returns {Promise<Cedarling>}
486
- */
487
- static new(config) {
488
- const ret = wasm.cedarling_new(config);
489
- return ret;
490
- }
491
- /**
492
- * Create a new instance of the Cedarling application.
493
- * Assume that config is `Map`
494
- * @param {Map<any, any>} config
495
- * @returns {Promise<Cedarling>}
496
- */
497
- static new_from_map(config) {
498
- const ret = wasm.cedarling_new_from_map(config);
499
- return ret;
500
- }
501
- /**
502
- * Authorize request
503
- * makes authorization decision based on the [`Request`]
504
- * @param {any} request
505
- * @returns {Promise<AuthorizeResult>}
207
+ * Authorize request
208
+ * makes authorization decision based on the [`Request`]
209
+ * @param {any} request
210
+ * @returns {Promise<AuthorizeResult>}
506
211
  */
507
212
  authorize(request) {
508
213
  const ret = wasm.cedarling_authorize(this.__wbg_ptr, request);
509
214
  return ret;
510
215
  }
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
216
  /**
522
217
  * Authorize multi-issuer request.
523
218
  * Makes authorization decision based on multiple JWT tokens from different issuers
@@ -529,16 +224,14 @@ export class Cedarling {
529
224
  return ret;
530
225
  }
531
226
  /**
532
- * Get logs and remove them from the storage.
533
- * Returns `Array` of `Map`
534
- * @returns {Array<any>}
227
+ * Authorize request for unsigned principals.
228
+ * makes authorization decision based on the [`RequestUnsigned`]
229
+ * @param {any} request
230
+ * @returns {Promise<AuthorizeResult>}
535
231
  */
536
- pop_logs() {
537
- const ret = wasm.cedarling_pop_logs(this.__wbg_ptr);
538
- if (ret[2]) {
539
- throw takeFromExternrefTable0(ret[1]);
540
- }
541
- return takeFromExternrefTable0(ret[0]);
232
+ authorize_unsigned(request) {
233
+ const ret = wasm.cedarling_authorize_unsigned(this.__wbg_ptr, request);
234
+ return ret;
542
235
  }
543
236
  /**
544
237
  * Get specific log entry.
@@ -564,23 +257,6 @@ export class Cedarling {
564
257
  const ret = wasm.cedarling_get_log_ids(this.__wbg_ptr);
565
258
  return ret;
566
259
  }
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
260
  /**
585
261
  * Get logs by request_id.
586
262
  * Return log entries that match the given request_id.
@@ -619,6 +295,55 @@ export class Cedarling {
619
295
  wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
620
296
  return v3;
621
297
  }
298
+ /**
299
+ * Get logs by tag, like `log_kind` or `log level`.
300
+ * Tag can be `log_kind`, `log_level`.
301
+ * @param {string} tag
302
+ * @returns {any[]}
303
+ */
304
+ get_logs_by_tag(tag) {
305
+ const ptr0 = passStringToWasm0(tag, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
306
+ const len0 = WASM_VECTOR_LEN;
307
+ const ret = wasm.cedarling_get_logs_by_tag(this.__wbg_ptr, ptr0, len0);
308
+ if (ret[3]) {
309
+ throw takeFromExternrefTable0(ret[2]);
310
+ }
311
+ var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
312
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
313
+ return v2;
314
+ }
315
+ /**
316
+ * Create a new instance of the Cedarling application.
317
+ * Assume that config is `Object`
318
+ * @param {object} config
319
+ * @returns {Promise<Cedarling>}
320
+ */
321
+ static new(config) {
322
+ const ret = wasm.cedarling_new(config);
323
+ return ret;
324
+ }
325
+ /**
326
+ * Create a new instance of the Cedarling application.
327
+ * Assume that config is `Map`
328
+ * @param {Map<any, any>} config
329
+ * @returns {Promise<Cedarling>}
330
+ */
331
+ static new_from_map(config) {
332
+ const ret = wasm.cedarling_new_from_map(config);
333
+ return ret;
334
+ }
335
+ /**
336
+ * Get logs and remove them from the storage.
337
+ * Returns `Array` of `Map`
338
+ * @returns {Array<any>}
339
+ */
340
+ pop_logs() {
341
+ const ret = wasm.cedarling_pop_logs(this.__wbg_ptr);
342
+ if (ret[2]) {
343
+ throw takeFromExternrefTable0(ret[1]);
344
+ }
345
+ return takeFromExternrefTable0(ret[0]);
346
+ }
622
347
  /**
623
348
  * Closes the connections to the Lock Server and pushes all available logs.
624
349
  * @returns {Promise<void>}
@@ -629,6 +354,7 @@ export class Cedarling {
629
354
  }
630
355
  }
631
356
  if (Symbol.dispose) Cedarling.prototype[Symbol.dispose] = Cedarling.prototype.free;
357
+ exports.Cedarling = Cedarling;
632
358
 
633
359
  /**
634
360
  * Diagnostics
@@ -636,7 +362,7 @@ if (Symbol.dispose) Cedarling.prototype[Symbol.dispose] = Cedarling.prototype.fr
636
362
  *
637
363
  * Provides detailed information about how a policy decision was made, including policies that contributed to the decision and any errors encountered during evaluation.
638
364
  */
639
- export class Diagnostics {
365
+ class Diagnostics {
640
366
  static __wrap(ptr) {
641
367
  ptr = ptr >>> 0;
642
368
  const obj = Object.create(Diagnostics.prototype);
@@ -654,6 +380,17 @@ export class Diagnostics {
654
380
  const ptr = this.__destroy_into_raw();
655
381
  wasm.__wbg_diagnostics_free(ptr, 0);
656
382
  }
383
+ /**
384
+ * Errors that occurred during authorization. The errors should be
385
+ * treated as unordered, since policies may be evaluated in any order.
386
+ * @returns {PolicyEvaluationError[]}
387
+ */
388
+ get errors() {
389
+ const ret = wasm.diagnostics_errors(this.__wbg_ptr);
390
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
391
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
392
+ return v1;
393
+ }
657
394
  /**
658
395
  * `PolicyId`s of the policies that contributed to the decision.
659
396
  * If no policies applied to the request, this set will be empty.
@@ -667,21 +404,11 @@ export class Diagnostics {
667
404
  wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
668
405
  return v1;
669
406
  }
670
- /**
671
- * Errors that occurred during authorization. The errors should be
672
- * treated as unordered, since policies may be evaluated in any order.
673
- * @returns {PolicyEvaluationError[]}
674
- */
675
- get errors() {
676
- const ret = wasm.diagnostics_errors(this.__wbg_ptr);
677
- var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
678
- wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
679
- return v1;
680
- }
681
407
  }
682
408
  if (Symbol.dispose) Diagnostics.prototype[Symbol.dispose] = Diagnostics.prototype.free;
409
+ exports.Diagnostics = Diagnostics;
683
410
 
684
- export class JsJsonLogic {
411
+ class JsJsonLogic {
685
412
  __destroy_into_raw() {
686
413
  const ptr = this.__wbg_ptr;
687
414
  this.__wbg_ptr = 0;
@@ -692,12 +419,6 @@ export class JsJsonLogic {
692
419
  const ptr = this.__destroy_into_raw();
693
420
  wasm.__wbg_jsjsonlogic_free(ptr, 0);
694
421
  }
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;
700
- }
701
422
  /**
702
423
  * @param {any} logic
703
424
  * @param {any} data
@@ -710,14 +431,21 @@ export class JsJsonLogic {
710
431
  }
711
432
  return takeFromExternrefTable0(ret[0]);
712
433
  }
434
+ constructor() {
435
+ const ret = wasm.jsjsonlogic_new();
436
+ this.__wbg_ptr = ret >>> 0;
437
+ JsJsonLogicFinalization.register(this, this.__wbg_ptr, this);
438
+ return this;
439
+ }
713
440
  }
714
441
  if (Symbol.dispose) JsJsonLogic.prototype[Symbol.dispose] = JsJsonLogic.prototype.free;
442
+ exports.JsJsonLogic = JsJsonLogic;
715
443
 
716
444
  /**
717
445
  * A WASM wrapper for the Rust `cedarling::MultiIssuerAuthorizeResult` struct.
718
446
  * Represents the result of a multi-issuer authorization request.
719
447
  */
720
- export class MultiIssuerAuthorizeResult {
448
+ class MultiIssuerAuthorizeResult {
721
449
  static __wrap(ptr) {
722
450
  ptr = ptr >>> 0;
723
451
  const obj = Object.create(MultiIssuerAuthorizeResult.prototype);
@@ -735,23 +463,6 @@ export class MultiIssuerAuthorizeResult {
735
463
  const ptr = this.__destroy_into_raw();
736
464
  wasm.__wbg_multiissuerauthorizeresult_free(ptr, 0);
737
465
  }
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
466
  /**
756
467
  * Result of authorization
757
468
  * true means `ALLOW`
@@ -762,15 +473,6 @@ export class MultiIssuerAuthorizeResult {
762
473
  const ret = wasm.__wbg_get_multiissuerauthorizeresult_decision(this.__wbg_ptr);
763
474
  return ret !== 0;
764
475
  }
765
- /**
766
- * Result of authorization
767
- * true means `ALLOW`
768
- * false means `Deny`
769
- * @param {boolean} arg0
770
- */
771
- set decision(arg0) {
772
- wasm.__wbg_set_multiissuerauthorizeresult_decision(this.__wbg_ptr, arg0);
773
- }
774
476
  /**
775
477
  * Request ID of the authorization request
776
478
  * @returns {string}
@@ -788,13 +490,12 @@ export class MultiIssuerAuthorizeResult {
788
490
  }
789
491
  }
790
492
  /**
791
- * Request ID of the authorization request
792
- * @param {string} arg0
493
+ * Result of Cedar policy authorization
494
+ * @returns {AuthorizeResultResponse}
793
495
  */
794
- set request_id(arg0) {
795
- const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
796
- const len0 = WASM_VECTOR_LEN;
797
- wasm.__wbg_set_multiissuerauthorizeresult_request_id(this.__wbg_ptr, ptr0, len0);
496
+ get response() {
497
+ const ret = wasm.__wbg_get_multiissuerauthorizeresult_response(this.__wbg_ptr);
498
+ return AuthorizeResultResponse.__wrap(ret);
798
499
  }
799
500
  /**
800
501
  * Convert `MultiIssuerAuthorizeResult` to json string value
@@ -812,8 +513,36 @@ export class MultiIssuerAuthorizeResult {
812
513
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
813
514
  }
814
515
  }
516
+ /**
517
+ * Result of authorization
518
+ * true means `ALLOW`
519
+ * false means `Deny`
520
+ * @param {boolean} arg0
521
+ */
522
+ set decision(arg0) {
523
+ wasm.__wbg_set_multiissuerauthorizeresult_decision(this.__wbg_ptr, arg0);
524
+ }
525
+ /**
526
+ * Request ID of the authorization request
527
+ * @param {string} arg0
528
+ */
529
+ set request_id(arg0) {
530
+ const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
531
+ const len0 = WASM_VECTOR_LEN;
532
+ wasm.__wbg_set_multiissuerauthorizeresult_request_id(this.__wbg_ptr, ptr0, len0);
533
+ }
534
+ /**
535
+ * Result of Cedar policy authorization
536
+ * @param {AuthorizeResultResponse} arg0
537
+ */
538
+ set response(arg0) {
539
+ _assertClass(arg0, AuthorizeResultResponse);
540
+ var ptr0 = arg0.__destroy_into_raw();
541
+ wasm.__wbg_set_multiissuerauthorizeresult_response(this.__wbg_ptr, ptr0);
542
+ }
815
543
  }
816
544
  if (Symbol.dispose) MultiIssuerAuthorizeResult.prototype[Symbol.dispose] = MultiIssuerAuthorizeResult.prototype.free;
545
+ exports.MultiIssuerAuthorizeResult = MultiIssuerAuthorizeResult;
817
546
 
818
547
  /**
819
548
  * PolicyEvaluationError
@@ -821,7 +550,7 @@ if (Symbol.dispose) MultiIssuerAuthorizeResult.prototype[Symbol.dispose] = Multi
821
550
  *
822
551
  * Represents an error that occurred when evaluating a Cedar policy.
823
552
  */
824
- export class PolicyEvaluationError {
553
+ class PolicyEvaluationError {
825
554
  static __wrap(ptr) {
826
555
  ptr = ptr >>> 0;
827
556
  const obj = Object.create(PolicyEvaluationError.prototype);
@@ -840,14 +569,14 @@ export class PolicyEvaluationError {
840
569
  wasm.__wbg_policyevaluationerror_free(ptr, 0);
841
570
  }
842
571
  /**
843
- * Id of the policy with an error
572
+ * Underlying evaluation error string representation
844
573
  * @returns {string}
845
574
  */
846
- get id() {
575
+ get error() {
847
576
  let deferred1_0;
848
577
  let deferred1_1;
849
578
  try {
850
- const ret = wasm.policyevaluationerror_id(this.__wbg_ptr);
579
+ const ret = wasm.policyevaluationerror_error(this.__wbg_ptr);
851
580
  deferred1_0 = ret[0];
852
581
  deferred1_1 = ret[1];
853
582
  return getStringFromWasm0(ret[0], ret[1]);
@@ -856,14 +585,14 @@ export class PolicyEvaluationError {
856
585
  }
857
586
  }
858
587
  /**
859
- * Underlying evaluation error string representation
588
+ * Id of the policy with an error
860
589
  * @returns {string}
861
590
  */
862
- get error() {
591
+ get id() {
863
592
  let deferred1_0;
864
593
  let deferred1_1;
865
594
  try {
866
- const ret = wasm.policyevaluationerror_error(this.__wbg_ptr);
595
+ const ret = wasm.policyevaluationerror_id(this.__wbg_ptr);
867
596
  deferred1_0 = ret[0];
868
597
  deferred1_1 = ret[1];
869
598
  return getStringFromWasm0(ret[0], ret[1]);
@@ -873,6 +602,7 @@ export class PolicyEvaluationError {
873
602
  }
874
603
  }
875
604
  if (Symbol.dispose) PolicyEvaluationError.prototype[Symbol.dispose] = PolicyEvaluationError.prototype.free;
605
+ exports.PolicyEvaluationError = PolicyEvaluationError;
876
606
 
877
607
  /**
878
608
  * Create a new instance of the Cedarling application.
@@ -880,644 +610,853 @@ if (Symbol.dispose) PolicyEvaluationError.prototype[Symbol.dispose] = PolicyEval
880
610
  * @param {any} config
881
611
  * @returns {Promise<Cedarling>}
882
612
  */
883
- export function init(config) {
613
+ function init(config) {
884
614
  const ret = wasm.init(config);
885
615
  return ret;
886
616
  }
617
+ exports.init = init;
887
618
 
888
- const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
889
-
890
- async function __wbg_load(module, imports) {
891
- if (typeof Response === 'function' && module instanceof Response) {
892
- if (typeof WebAssembly.instantiateStreaming === 'function') {
893
- try {
894
- return await WebAssembly.instantiateStreaming(module, imports);
895
- } catch (e) {
896
- const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
897
-
898
- if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
899
- console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
900
-
901
- } else {
902
- throw e;
903
- }
904
- }
905
- }
906
-
907
- const bytes = await module.arrayBuffer();
908
- return await WebAssembly.instantiate(bytes, imports);
909
- } else {
910
- const instance = await WebAssembly.instantiate(module, imports);
911
-
912
- if (instance instanceof WebAssembly.Instance) {
913
- return { instance, module };
914
- } else {
915
- return instance;
916
- }
917
- }
619
+ /**
620
+ * Create a new instance of the Cedarling application from archive bytes.
621
+ *
622
+ * This function allows loading a policy store from a Cedar Archive (.cjar)
623
+ * that was fetched with custom logic (e.g., with authentication headers).
624
+ *
625
+ * # Arguments
626
+ * * `config` - Bootstrap configuration (Map or Object). Policy store config is ignored.
627
+ * * `archive_bytes` - The .cjar archive bytes (Uint8Array)
628
+ *
629
+ * # Example
630
+ * ```javascript
631
+ * const response = await fetch(url, { headers: { Authorization: 'Bearer ...' } });
632
+ * const bytes = new Uint8Array(await response.arrayBuffer());
633
+ * const cedarling = await init_from_archive_bytes(config, bytes);
634
+ * ```
635
+ * @param {any} config
636
+ * @param {Uint8Array} archive_bytes
637
+ * @returns {Promise<Cedarling>}
638
+ */
639
+ function init_from_archive_bytes(config, archive_bytes) {
640
+ const ret = wasm.init_from_archive_bytes(config, archive_bytes);
641
+ return ret;
918
642
  }
643
+ exports.init_from_archive_bytes = init_from_archive_bytes;
919
644
 
920
645
  function __wbg_get_imports() {
921
- const imports = {};
922
- imports.wbg = {};
923
- imports.wbg.__wbg_Error_52673b7de5a0ca89 = function(arg0, arg1) {
924
- const ret = Error(getStringFromWasm0(arg0, arg1));
925
- return ret;
926
- };
927
- imports.wbg.__wbg_Number_2d1dcfcf4ec51736 = function(arg0) {
928
- const ret = Number(arg0);
929
- return ret;
930
- };
931
- imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
932
- const ret = String(arg1);
933
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
934
- const len1 = WASM_VECTOR_LEN;
935
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
936
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
937
- };
938
- imports.wbg.__wbg___wbindgen_bigint_get_as_i64_6e32f5e6aff02e1d = function(arg0, arg1) {
939
- const v = arg1;
940
- const ret = typeof(v) === 'bigint' ? v : undefined;
941
- getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
942
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
943
- };
944
- imports.wbg.__wbg___wbindgen_boolean_get_dea25b33882b895b = function(arg0) {
945
- const v = arg0;
946
- const ret = typeof(v) === 'boolean' ? v : undefined;
947
- return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
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;
1108
- return ret;
1109
- };
1110
- imports.wbg.__wbg_info_e951478d580c1573 = function(arg0) {
1111
- console.info(...arg0);
1112
- };
1113
- imports.wbg.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355 = function(arg0) {
1114
- let result;
1115
- try {
1116
- result = arg0 instanceof ArrayBuffer;
1117
- } catch (_) {
1118
- result = false;
1119
- }
1120
- const ret = result;
1121
- return ret;
1122
- };
1123
- imports.wbg.__wbg_instanceof_Array_bc64f5da83077362 = function(arg0) {
1124
- let result;
1125
- try {
1126
- result = arg0 instanceof Array;
1127
- } catch (_) {
1128
- result = false;
1129
- }
1130
- const ret = result;
1131
- return ret;
1132
- };
1133
- imports.wbg.__wbg_instanceof_Map_084be8da74364158 = function(arg0) {
1134
- let result;
1135
- try {
1136
- result = arg0 instanceof Map;
1137
- } catch (_) {
1138
- result = false;
1139
- }
1140
- const ret = result;
1141
- return ret;
1142
- };
1143
- imports.wbg.__wbg_instanceof_Response_cd74d1c2ac92cb0b = function(arg0) {
1144
- let result;
1145
- try {
1146
- result = arg0 instanceof Response;
1147
- } catch (_) {
1148
- result = false;
1149
- }
1150
- const ret = result;
1151
- return ret;
1152
- };
1153
- imports.wbg.__wbg_instanceof_Uint8Array_da54ccc9d3e09434 = function(arg0) {
1154
- let result;
1155
- try {
1156
- result = arg0 instanceof Uint8Array;
1157
- } catch (_) {
1158
- result = false;
1159
- }
1160
- const ret = result;
1161
- return ret;
1162
- };
1163
- imports.wbg.__wbg_isArray_51fd9e6422c0a395 = function(arg0) {
1164
- const ret = Array.isArray(arg0);
1165
- return ret;
1166
- };
1167
- imports.wbg.__wbg_isSafeInteger_ae7d3f054d55fa16 = function(arg0) {
1168
- const ret = Number.isSafeInteger(arg0);
1169
- return ret;
1170
- };
1171
- imports.wbg.__wbg_iterator_27b7c8b35ab3e86b = function() {
1172
- const ret = Symbol.iterator;
1173
- return ret;
1174
- };
1175
- imports.wbg.__wbg_keys_f5c6002ff150fc6c = function(arg0) {
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) {
1231
- try {
1232
- var state0 = {a: arg0, b: arg1};
1233
- var cb0 = (arg0, arg1) => {
1234
- const a = state0.a;
1235
- state0.a = 0;
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);
646
+ const import0 = {
647
+ __proto__: null,
648
+ __wbg_Error_8c4e43fe74559d73: function(arg0, arg1) {
649
+ const ret = Error(getStringFromWasm0(arg0, arg1));
1243
650
  return ret;
1244
- } finally {
1245
- state0.a = state0.b = 0;
1246
- }
1247
- };
1248
- imports.wbg.__wbg_new_from_slice_f9c22b9153b26992 = function(arg0, arg1) {
1249
- const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
1250
- return ret;
1251
- };
1252
- imports.wbg.__wbg_new_no_args_cb138f77cf6151ee = function(arg0, arg1) {
1253
- const ret = new Function(getStringFromWasm0(arg0, arg1));
1254
- return ret;
1255
- };
1256
- imports.wbg.__wbg_new_with_args_df9e7125ffe55248 = function(arg0, arg1, arg2, arg3) {
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_2241b6af4c4b2941 = function(arg0, arg1) {
1418
- // Cast intrinsic for `Ref(String) -> Externref`.
1419
- const ret = getStringFromWasm0(arg0, arg1);
1420
- return ret;
1421
- };
1422
- imports.wbg.__wbindgen_cast_2fb66661e8d075cf = function(arg0, arg1) {
1423
- // Cast intrinsic for `Closure(Closure { dtor_idx: 553, function: Function { arguments: [Externref], shim_idx: 554, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1424
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h8554173f80599467, wasm_bindgen__convert__closures_____invoke__h7f8b71809a8d7577);
1425
- return ret;
1426
- };
1427
- imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
1428
- // Cast intrinsic for `U64 -> Externref`.
1429
- const ret = BigInt.asUintN(64, arg0);
1430
- return ret;
1431
- };
1432
- imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
1433
- // Cast intrinsic for `I64 -> Externref`.
1434
- const ret = arg0;
1435
- return ret;
1436
- };
1437
- imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
1438
- // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
1439
- const ret = getArrayU8FromWasm0(arg0, arg1);
1440
- return ret;
1441
- };
1442
- imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
1443
- // Cast intrinsic for `F64 -> Externref`.
1444
- const ret = arg0;
1445
- return ret;
1446
- };
1447
- imports.wbg.__wbindgen_cast_f0904d98c773eedb = function(arg0, arg1) {
1448
- // Cast intrinsic for `Closure(Closure { dtor_idx: 508, function: Function { arguments: [], shim_idx: 509, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1449
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h8ab080f6f46e974c, wasm_bindgen__convert__closures_____invoke__h5208add59d64c287);
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);
651
+ },
652
+ __wbg_Number_04624de7d0e8332d: function(arg0) {
653
+ const ret = Number(arg0);
654
+ return ret;
655
+ },
656
+ __wbg_String_8f0eb39a4a4c2f66: function(arg0, arg1) {
657
+ const ret = String(arg1);
658
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
659
+ const len1 = WASM_VECTOR_LEN;
660
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
661
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
662
+ },
663
+ __wbg___wbindgen_bigint_get_as_i64_8fcf4ce7f1ca72a2: function(arg0, arg1) {
664
+ const v = arg1;
665
+ const ret = typeof(v) === 'bigint' ? v : undefined;
666
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
667
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
668
+ },
669
+ __wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25: function(arg0) {
670
+ const v = arg0;
671
+ const ret = typeof(v) === 'boolean' ? v : undefined;
672
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
673
+ },
674
+ __wbg___wbindgen_debug_string_0bc8482c6e3508ae: function(arg0, arg1) {
675
+ const ret = debugString(arg1);
676
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
677
+ const len1 = WASM_VECTOR_LEN;
678
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
679
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
680
+ },
681
+ __wbg___wbindgen_in_47fa6863be6f2f25: function(arg0, arg1) {
682
+ const ret = arg0 in arg1;
683
+ return ret;
684
+ },
685
+ __wbg___wbindgen_is_bigint_31b12575b56f32fc: function(arg0) {
686
+ const ret = typeof(arg0) === 'bigint';
687
+ return ret;
688
+ },
689
+ __wbg___wbindgen_is_function_0095a73b8b156f76: function(arg0) {
690
+ const ret = typeof(arg0) === 'function';
691
+ return ret;
692
+ },
693
+ __wbg___wbindgen_is_object_5ae8e5880f2c1fbd: function(arg0) {
694
+ const val = arg0;
695
+ const ret = typeof(val) === 'object' && val !== null;
696
+ return ret;
697
+ },
698
+ __wbg___wbindgen_is_string_cd444516edc5b180: function(arg0) {
699
+ const ret = typeof(arg0) === 'string';
700
+ return ret;
701
+ },
702
+ __wbg___wbindgen_is_undefined_9e4d92534c42d778: function(arg0) {
703
+ const ret = arg0 === undefined;
704
+ return ret;
705
+ },
706
+ __wbg___wbindgen_jsval_eq_11888390b0186270: function(arg0, arg1) {
707
+ const ret = arg0 === arg1;
708
+ return ret;
709
+ },
710
+ __wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811: function(arg0, arg1) {
711
+ const ret = arg0 == arg1;
712
+ return ret;
713
+ },
714
+ __wbg___wbindgen_number_get_8ff4255516ccad3e: function(arg0, arg1) {
715
+ const obj = arg1;
716
+ const ret = typeof(obj) === 'number' ? obj : undefined;
717
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
718
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
719
+ },
720
+ __wbg___wbindgen_string_get_72fb696202c56729: function(arg0, arg1) {
721
+ const obj = arg1;
722
+ const ret = typeof(obj) === 'string' ? obj : undefined;
723
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
724
+ var len1 = WASM_VECTOR_LEN;
725
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
726
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
727
+ },
728
+ __wbg___wbindgen_throw_be289d5034ed271b: function(arg0, arg1) {
729
+ throw new Error(getStringFromWasm0(arg0, arg1));
730
+ },
731
+ __wbg__wbg_cb_unref_d9b87ff7982e3b21: function(arg0) {
732
+ arg0._wbg_cb_unref();
733
+ },
734
+ __wbg_abort_2f0584e03e8e3950: function(arg0) {
735
+ arg0.abort();
736
+ },
737
+ __wbg_abort_d549b92d3c665de1: function(arg0, arg1) {
738
+ arg0.abort(arg1);
739
+ },
740
+ __wbg_append_a992ccc37aa62dc4: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
741
+ arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
742
+ }, arguments); },
743
+ __wbg_arrayBuffer_bb54076166006c39: function() { return handleError(function (arg0) {
744
+ const ret = arg0.arrayBuffer();
745
+ return ret;
746
+ }, arguments); },
747
+ __wbg_authorizeresult_new: function(arg0) {
748
+ const ret = AuthorizeResult.__wrap(arg0);
749
+ return ret;
750
+ },
751
+ __wbg_call_389efe28435a9388: function() { return handleError(function (arg0, arg1) {
752
+ const ret = arg0.call(arg1);
753
+ return ret;
754
+ }, arguments); },
755
+ __wbg_call_4708e0c13bdc8e95: function() { return handleError(function (arg0, arg1, arg2) {
756
+ const ret = arg0.call(arg1, arg2);
757
+ return ret;
758
+ }, arguments); },
759
+ __wbg_cedarling_new: function(arg0) {
760
+ const ret = Cedarling.__wrap(arg0);
761
+ return ret;
762
+ },
763
+ __wbg_clearTimeout_42d9ccd50822fd3a: function(arg0) {
764
+ const ret = clearTimeout(arg0);
765
+ return ret;
766
+ },
767
+ __wbg_crypto_86f2631e91b51511: function(arg0) {
768
+ const ret = arg0.crypto;
769
+ return ret;
770
+ },
771
+ __wbg_debug_8b4b5465cbd54cd3: function(arg0) {
772
+ console.debug(...arg0);
773
+ },
774
+ __wbg_done_57b39ecd9addfe81: function(arg0) {
775
+ const ret = arg0.done;
776
+ return ret;
777
+ },
778
+ __wbg_entries_200a450561fa274f: function(arg0) {
779
+ const ret = arg0.entries();
780
+ return ret;
781
+ },
782
+ __wbg_entries_58c7934c745daac7: function(arg0) {
783
+ const ret = Object.entries(arg0);
784
+ return ret;
785
+ },
786
+ __wbg_error_62201eec3c0d66f9: function(arg0) {
787
+ console.error(...arg0);
788
+ },
789
+ __wbg_fetch_6bbc32f991730587: function(arg0) {
790
+ const ret = fetch(arg0);
791
+ return ret;
792
+ },
793
+ __wbg_fetch_afb6a4b6cacf876d: function(arg0, arg1) {
794
+ const ret = arg0.fetch(arg1);
795
+ return ret;
796
+ },
797
+ __wbg_fromEntries_7fb5bc874dbe50d5: function() { return handleError(function (arg0) {
798
+ const ret = Object.fromEntries(arg0);
799
+ return ret;
800
+ }, arguments); },
801
+ __wbg_getRandomValues_1c61fac11405ffdc: function() { return handleError(function (arg0, arg1) {
802
+ globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
803
+ }, arguments); },
804
+ __wbg_getRandomValues_b3f15fcbfabb0f8b: function() { return handleError(function (arg0, arg1) {
805
+ arg0.getRandomValues(arg1);
806
+ }, arguments); },
807
+ __wbg_getTime_1e3cd1391c5c3995: function(arg0) {
808
+ const ret = arg0.getTime();
809
+ return ret;
810
+ },
811
+ __wbg_getTimezoneOffset_81776d10a4ec18a8: function(arg0) {
812
+ const ret = arg0.getTimezoneOffset();
813
+ return ret;
814
+ },
815
+ __wbg_get_9b94d73e6221f75c: function(arg0, arg1) {
816
+ const ret = arg0[arg1 >>> 0];
817
+ return ret;
818
+ },
819
+ __wbg_get_b3ed3ad4be2bc8ac: function() { return handleError(function (arg0, arg1) {
820
+ const ret = Reflect.get(arg0, arg1);
821
+ return ret;
822
+ }, arguments); },
823
+ __wbg_get_with_ref_key_1dc361bd10053bfe: function(arg0, arg1) {
824
+ const ret = arg0[arg1];
825
+ return ret;
826
+ },
827
+ __wbg_has_d4e53238966c12b6: function() { return handleError(function (arg0, arg1) {
828
+ const ret = Reflect.has(arg0, arg1);
829
+ return ret;
830
+ }, arguments); },
831
+ __wbg_headers_59a2938db9f80985: function(arg0) {
832
+ const ret = arg0.headers;
833
+ return ret;
834
+ },
835
+ __wbg_info_eb43cb09e10f8150: function(arg0) {
836
+ console.info(...arg0);
837
+ },
838
+ __wbg_instanceof_ArrayBuffer_c367199e2fa2aa04: function(arg0) {
839
+ let result;
840
+ try {
841
+ result = arg0 instanceof ArrayBuffer;
842
+ } catch (_) {
843
+ result = false;
844
+ }
845
+ const ret = result;
846
+ return ret;
847
+ },
848
+ __wbg_instanceof_Array_d9eac779cd191cbc: function(arg0) {
849
+ let result;
850
+ try {
851
+ result = arg0 instanceof Array;
852
+ } catch (_) {
853
+ result = false;
854
+ }
855
+ const ret = result;
856
+ return ret;
857
+ },
858
+ __wbg_instanceof_Map_53af74335dec57f4: function(arg0) {
859
+ let result;
860
+ try {
861
+ result = arg0 instanceof Map;
862
+ } catch (_) {
863
+ result = false;
864
+ }
865
+ const ret = result;
866
+ return ret;
867
+ },
868
+ __wbg_instanceof_Response_ee1d54d79ae41977: function(arg0) {
869
+ let result;
870
+ try {
871
+ result = arg0 instanceof Response;
872
+ } catch (_) {
873
+ result = false;
874
+ }
875
+ const ret = result;
876
+ return ret;
877
+ },
878
+ __wbg_instanceof_Uint8Array_9b9075935c74707c: function(arg0) {
879
+ let result;
880
+ try {
881
+ result = arg0 instanceof Uint8Array;
882
+ } catch (_) {
883
+ result = false;
884
+ }
885
+ const ret = result;
886
+ return ret;
887
+ },
888
+ __wbg_isArray_d314bb98fcf08331: function(arg0) {
889
+ const ret = Array.isArray(arg0);
890
+ return ret;
891
+ },
892
+ __wbg_isSafeInteger_bfbc7332a9768d2a: function(arg0) {
893
+ const ret = Number.isSafeInteger(arg0);
894
+ return ret;
895
+ },
896
+ __wbg_iterator_6ff6560ca1568e55: function() {
897
+ const ret = Symbol.iterator;
898
+ return ret;
899
+ },
900
+ __wbg_keys_b50a709a76add04e: function(arg0) {
901
+ const ret = Object.keys(arg0);
902
+ return ret;
903
+ },
904
+ __wbg_length_32ed9a279acd054c: function(arg0) {
905
+ const ret = arg0.length;
906
+ return ret;
907
+ },
908
+ __wbg_length_35a7bace40f36eac: function(arg0) {
909
+ const ret = arg0.length;
910
+ return ret;
911
+ },
912
+ __wbg_log_aa96eafb763b3303: function(arg0) {
913
+ console.log(...arg0);
914
+ },
915
+ __wbg_msCrypto_d562bbe83e0d4b91: function(arg0) {
916
+ const ret = arg0.msCrypto;
917
+ return ret;
918
+ },
919
+ __wbg_multiissuerauthorizeresult_new: function(arg0) {
920
+ const ret = MultiIssuerAuthorizeResult.__wrap(arg0);
921
+ return ret;
922
+ },
923
+ __wbg_new_0_73afc35eb544e539: function() {
924
+ const ret = new Date();
925
+ return ret;
926
+ },
927
+ __wbg_new_245cd5c49157e602: function(arg0) {
928
+ const ret = new Date(arg0);
929
+ return ret;
930
+ },
931
+ __wbg_new_361308b2356cecd0: function() {
932
+ const ret = new Object();
933
+ return ret;
934
+ },
935
+ __wbg_new_3eb36ae241fe6f44: function() {
936
+ const ret = new Array();
937
+ return ret;
938
+ },
939
+ __wbg_new_64284bd487f9d239: function() { return handleError(function () {
940
+ const ret = new Headers();
941
+ return ret;
942
+ }, arguments); },
943
+ __wbg_new_b5d9e2fb389fef91: function(arg0, arg1) {
944
+ try {
945
+ var state0 = {a: arg0, b: arg1};
946
+ var cb0 = (arg0, arg1) => {
947
+ const a = state0.a;
948
+ state0.a = 0;
949
+ try {
950
+ return wasm_bindgen__convert__closures_____invoke__h0faf1ddcbd616c7a(a, state0.b, arg0, arg1);
951
+ } finally {
952
+ state0.a = a;
953
+ }
954
+ };
955
+ const ret = new Promise(cb0);
956
+ return ret;
957
+ } finally {
958
+ state0.a = state0.b = 0;
959
+ }
960
+ },
961
+ __wbg_new_b949e7f56150a5d1: function() { return handleError(function () {
962
+ const ret = new AbortController();
963
+ return ret;
964
+ }, arguments); },
965
+ __wbg_new_dca287b076112a51: function() {
966
+ const ret = new Map();
967
+ return ret;
968
+ },
969
+ __wbg_new_dd2b680c8bf6ae29: function(arg0) {
970
+ const ret = new Uint8Array(arg0);
971
+ return ret;
972
+ },
973
+ __wbg_new_from_slice_a3d2629dc1826784: function(arg0, arg1) {
974
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
975
+ return ret;
976
+ },
977
+ __wbg_new_no_args_1c7c842f08d00ebb: function(arg0, arg1) {
978
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
979
+ return ret;
980
+ },
981
+ __wbg_new_with_args_7bba34e94b1cfa40: function(arg0, arg1, arg2, arg3) {
982
+ const ret = new Function(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
983
+ return ret;
984
+ },
985
+ __wbg_new_with_length_a2c39cbe88fd8ff1: function(arg0) {
986
+ const ret = new Uint8Array(arg0 >>> 0);
987
+ return ret;
988
+ },
989
+ __wbg_new_with_str_and_init_a61cbc6bdef21614: function() { return handleError(function (arg0, arg1, arg2) {
990
+ const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
991
+ return ret;
992
+ }, arguments); },
993
+ __wbg_next_3482f54c49e8af19: function() { return handleError(function (arg0) {
994
+ const ret = arg0.next();
995
+ return ret;
996
+ }, arguments); },
997
+ __wbg_next_418f80d8f5303233: function(arg0) {
998
+ const ret = arg0.next;
999
+ return ret;
1000
+ },
1001
+ __wbg_node_e1f24f89a7336c2e: function(arg0) {
1002
+ const ret = arg0.node;
1003
+ return ret;
1004
+ },
1005
+ __wbg_policyevaluationerror_new: function(arg0) {
1006
+ const ret = PolicyEvaluationError.__wrap(arg0);
1007
+ return ret;
1008
+ },
1009
+ __wbg_process_3975fd6c72f520aa: function(arg0) {
1010
+ const ret = arg0.process;
1011
+ return ret;
1012
+ },
1013
+ __wbg_prototypesetcall_bdcdcc5842e4d77d: function(arg0, arg1, arg2) {
1014
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
1015
+ },
1016
+ __wbg_push_8ffdcb2063340ba5: function(arg0, arg1) {
1017
+ const ret = arg0.push(arg1);
1018
+ return ret;
1019
+ },
1020
+ __wbg_queueMicrotask_0aa0a927f78f5d98: function(arg0) {
1021
+ const ret = arg0.queueMicrotask;
1022
+ return ret;
1023
+ },
1024
+ __wbg_queueMicrotask_5bb536982f78a56f: function(arg0) {
1025
+ queueMicrotask(arg0);
1026
+ },
1027
+ __wbg_randomFillSync_f8c153b79f285817: function() { return handleError(function (arg0, arg1) {
1028
+ arg0.randomFillSync(arg1);
1029
+ }, arguments); },
1030
+ __wbg_require_b74f47fc2d022fd6: function() { return handleError(function () {
1031
+ const ret = module.require;
1032
+ return ret;
1033
+ }, arguments); },
1034
+ __wbg_resolve_002c4b7d9d8f6b64: function(arg0) {
1035
+ const ret = Promise.resolve(arg0);
1036
+ return ret;
1037
+ },
1038
+ __wbg_setTimeout_4ec014681668a581: function(arg0, arg1) {
1039
+ const ret = setTimeout(arg0, arg1);
1040
+ return ret;
1041
+ },
1042
+ __wbg_set_1eb0999cf5d27fc8: function(arg0, arg1, arg2) {
1043
+ const ret = arg0.set(arg1, arg2);
1044
+ return ret;
1045
+ },
1046
+ __wbg_set_3f1d0b984ed272ed: function(arg0, arg1, arg2) {
1047
+ arg0[arg1] = arg2;
1048
+ },
1049
+ __wbg_set_6cb8631f80447a67: function() { return handleError(function (arg0, arg1, arg2) {
1050
+ const ret = Reflect.set(arg0, arg1, arg2);
1051
+ return ret;
1052
+ }, arguments); },
1053
+ __wbg_set_body_9a7e00afe3cfe244: function(arg0, arg1) {
1054
+ arg0.body = arg1;
1055
+ },
1056
+ __wbg_set_cache_315a3ed773a41543: function(arg0, arg1) {
1057
+ arg0.cache = __wbindgen_enum_RequestCache[arg1];
1058
+ },
1059
+ __wbg_set_credentials_c4a58d2e05ef24fb: function(arg0, arg1) {
1060
+ arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
1061
+ },
1062
+ __wbg_set_f43e577aea94465b: function(arg0, arg1, arg2) {
1063
+ arg0[arg1 >>> 0] = arg2;
1064
+ },
1065
+ __wbg_set_headers_cfc5f4b2c1f20549: function(arg0, arg1) {
1066
+ arg0.headers = arg1;
1067
+ },
1068
+ __wbg_set_method_c3e20375f5ae7fac: function(arg0, arg1, arg2) {
1069
+ arg0.method = getStringFromWasm0(arg1, arg2);
1070
+ },
1071
+ __wbg_set_mode_b13642c312648202: function(arg0, arg1) {
1072
+ arg0.mode = __wbindgen_enum_RequestMode[arg1];
1073
+ },
1074
+ __wbg_set_signal_f2d3f8599248896d: function(arg0, arg1) {
1075
+ arg0.signal = arg1;
1076
+ },
1077
+ __wbg_signal_d1285ecab4ebc5ad: function(arg0) {
1078
+ const ret = arg0.signal;
1079
+ return ret;
1080
+ },
1081
+ __wbg_static_accessor_GLOBAL_12837167ad935116: function() {
1082
+ const ret = typeof global === 'undefined' ? null : global;
1083
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1084
+ },
1085
+ __wbg_static_accessor_GLOBAL_THIS_e628e89ab3b1c95f: function() {
1086
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
1087
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1088
+ },
1089
+ __wbg_static_accessor_SELF_a621d3dfbb60d0ce: function() {
1090
+ const ret = typeof self === 'undefined' ? null : self;
1091
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1092
+ },
1093
+ __wbg_static_accessor_WINDOW_f8727f0cf888e0bd: function() {
1094
+ const ret = typeof window === 'undefined' ? null : window;
1095
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1096
+ },
1097
+ __wbg_status_89d7e803db911ee7: function(arg0) {
1098
+ const ret = arg0.status;
1099
+ return ret;
1100
+ },
1101
+ __wbg_stringify_8d1cc6ff383e8bae: function() { return handleError(function (arg0) {
1102
+ const ret = JSON.stringify(arg0);
1103
+ return ret;
1104
+ }, arguments); },
1105
+ __wbg_subarray_a96e1fef17ed23cb: function(arg0, arg1, arg2) {
1106
+ const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
1107
+ return ret;
1108
+ },
1109
+ __wbg_text_083b8727c990c8c0: function() { return handleError(function (arg0) {
1110
+ const ret = arg0.text();
1111
+ return ret;
1112
+ }, arguments); },
1113
+ __wbg_then_0d9fe2c7b1857d32: function(arg0, arg1, arg2) {
1114
+ const ret = arg0.then(arg1, arg2);
1115
+ return ret;
1116
+ },
1117
+ __wbg_then_b9e7b3b5f1a9e1b5: function(arg0, arg1) {
1118
+ const ret = arg0.then(arg1);
1119
+ return ret;
1120
+ },
1121
+ __wbg_trace_21a493b80d415f00: function(arg0) {
1122
+ console.trace(...arg0);
1123
+ },
1124
+ __wbg_url_c484c26b1fbf5126: function(arg0, arg1) {
1125
+ const ret = arg1.url;
1126
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1127
+ const len1 = WASM_VECTOR_LEN;
1128
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1129
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1130
+ },
1131
+ __wbg_value_0546255b415e96c1: function(arg0) {
1132
+ const ret = arg0.value;
1133
+ return ret;
1134
+ },
1135
+ __wbg_versions_4e31226f5e8dc909: function(arg0) {
1136
+ const ret = arg0.versions;
1137
+ return ret;
1138
+ },
1139
+ __wbg_warn_f3657073f42e55b4: function(arg0) {
1140
+ console.warn(...arg0);
1141
+ },
1142
+ __wbindgen_cast_0000000000000001: function(arg0, arg1) {
1143
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 553, function: Function { arguments: [], shim_idx: 554, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1144
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h093a13d1206f793f, wasm_bindgen__convert__closures_____invoke__h07e5bc5e1bd52c7a);
1145
+ return ret;
1146
+ },
1147
+ __wbindgen_cast_0000000000000002: function(arg0, arg1) {
1148
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 597, function: Function { arguments: [Externref], shim_idx: 598, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1149
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h203c69ac48ff2433, wasm_bindgen__convert__closures_____invoke__h409efd46af9acece);
1150
+ return ret;
1151
+ },
1152
+ __wbindgen_cast_0000000000000003: function(arg0) {
1153
+ // Cast intrinsic for `F64 -> Externref`.
1154
+ const ret = arg0;
1155
+ return ret;
1156
+ },
1157
+ __wbindgen_cast_0000000000000004: function(arg0) {
1158
+ // Cast intrinsic for `I64 -> Externref`.
1159
+ const ret = arg0;
1160
+ return ret;
1161
+ },
1162
+ __wbindgen_cast_0000000000000005: function(arg0, arg1) {
1163
+ // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
1164
+ const ret = getArrayU8FromWasm0(arg0, arg1);
1165
+ return ret;
1166
+ },
1167
+ __wbindgen_cast_0000000000000006: function(arg0, arg1) {
1168
+ // Cast intrinsic for `Ref(String) -> Externref`.
1169
+ const ret = getStringFromWasm0(arg0, arg1);
1170
+ return ret;
1171
+ },
1172
+ __wbindgen_cast_0000000000000007: function(arg0) {
1173
+ // Cast intrinsic for `U64 -> Externref`.
1174
+ const ret = BigInt.asUintN(64, arg0);
1175
+ return ret;
1176
+ },
1177
+ __wbindgen_init_externref_table: function() {
1178
+ const table = wasm.__wbindgen_externrefs;
1179
+ const offset = table.grow(4);
1180
+ table.set(0, undefined);
1181
+ table.set(offset + 0, undefined);
1182
+ table.set(offset + 1, null);
1183
+ table.set(offset + 2, true);
1184
+ table.set(offset + 3, false);
1185
+ },
1186
+ };
1187
+ return {
1188
+ __proto__: null,
1189
+ "./cedarling_wasm_bg.js": import0,
1460
1190
  };
1191
+ }
1192
+
1193
+ function wasm_bindgen__convert__closures_____invoke__h07e5bc5e1bd52c7a(arg0, arg1) {
1194
+ wasm.wasm_bindgen__convert__closures_____invoke__h07e5bc5e1bd52c7a(arg0, arg1);
1195
+ }
1196
+
1197
+ function wasm_bindgen__convert__closures_____invoke__h409efd46af9acece(arg0, arg1, arg2) {
1198
+ wasm.wasm_bindgen__convert__closures_____invoke__h409efd46af9acece(arg0, arg1, arg2);
1199
+ }
1461
1200
 
1462
- return imports;
1201
+ function wasm_bindgen__convert__closures_____invoke__h0faf1ddcbd616c7a(arg0, arg1, arg2, arg3) {
1202
+ wasm.wasm_bindgen__convert__closures_____invoke__h0faf1ddcbd616c7a(arg0, arg1, arg2, arg3);
1463
1203
  }
1464
1204
 
1465
- function __wbg_finalize_init(instance, module) {
1466
- wasm = instance.exports;
1467
- __wbg_init.__wbindgen_wasm_module = module;
1468
- cachedDataViewMemory0 = null;
1469
- cachedUint8ArrayMemory0 = null;
1470
1205
 
1206
+ const __wbindgen_enum_RequestCache = ["default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached"];
1207
+
1208
+
1209
+ const __wbindgen_enum_RequestCredentials = ["omit", "same-origin", "include"];
1210
+
1211
+
1212
+ const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"];
1213
+ const AuthorizeResultFinalization = (typeof FinalizationRegistry === 'undefined')
1214
+ ? { register: () => {}, unregister: () => {} }
1215
+ : new FinalizationRegistry(ptr => wasm.__wbg_authorizeresult_free(ptr >>> 0, 1));
1216
+ const AuthorizeResultResponseFinalization = (typeof FinalizationRegistry === 'undefined')
1217
+ ? { register: () => {}, unregister: () => {} }
1218
+ : new FinalizationRegistry(ptr => wasm.__wbg_authorizeresultresponse_free(ptr >>> 0, 1));
1219
+ const CedarlingFinalization = (typeof FinalizationRegistry === 'undefined')
1220
+ ? { register: () => {}, unregister: () => {} }
1221
+ : new FinalizationRegistry(ptr => wasm.__wbg_cedarling_free(ptr >>> 0, 1));
1222
+ const DiagnosticsFinalization = (typeof FinalizationRegistry === 'undefined')
1223
+ ? { register: () => {}, unregister: () => {} }
1224
+ : new FinalizationRegistry(ptr => wasm.__wbg_diagnostics_free(ptr >>> 0, 1));
1225
+ const JsJsonLogicFinalization = (typeof FinalizationRegistry === 'undefined')
1226
+ ? { register: () => {}, unregister: () => {} }
1227
+ : new FinalizationRegistry(ptr => wasm.__wbg_jsjsonlogic_free(ptr >>> 0, 1));
1228
+ const MultiIssuerAuthorizeResultFinalization = (typeof FinalizationRegistry === 'undefined')
1229
+ ? { register: () => {}, unregister: () => {} }
1230
+ : new FinalizationRegistry(ptr => wasm.__wbg_multiissuerauthorizeresult_free(ptr >>> 0, 1));
1231
+ const PolicyEvaluationErrorFinalization = (typeof FinalizationRegistry === 'undefined')
1232
+ ? { register: () => {}, unregister: () => {} }
1233
+ : new FinalizationRegistry(ptr => wasm.__wbg_policyevaluationerror_free(ptr >>> 0, 1));
1471
1234
 
1472
- wasm.__wbindgen_start();
1473
- return wasm;
1235
+ function addToExternrefTable0(obj) {
1236
+ const idx = wasm.__externref_table_alloc();
1237
+ wasm.__wbindgen_externrefs.set(idx, obj);
1238
+ return idx;
1474
1239
  }
1475
1240
 
1476
- function initSync(module) {
1477
- if (wasm !== undefined) return wasm;
1241
+ function _assertClass(instance, klass) {
1242
+ if (!(instance instanceof klass)) {
1243
+ throw new Error(`expected instance of ${klass.name}`);
1244
+ }
1245
+ }
1478
1246
 
1247
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
1248
+ ? { register: () => {}, unregister: () => {} }
1249
+ : new FinalizationRegistry(state => state.dtor(state.a, state.b));
1479
1250
 
1480
- if (typeof module !== 'undefined') {
1481
- if (Object.getPrototypeOf(module) === Object.prototype) {
1482
- ({module} = module)
1251
+ function debugString(val) {
1252
+ // primitive types
1253
+ const type = typeof val;
1254
+ if (type == 'number' || type == 'boolean' || val == null) {
1255
+ return `${val}`;
1256
+ }
1257
+ if (type == 'string') {
1258
+ return `"${val}"`;
1259
+ }
1260
+ if (type == 'symbol') {
1261
+ const description = val.description;
1262
+ if (description == null) {
1263
+ return 'Symbol';
1483
1264
  } else {
1484
- console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
1265
+ return `Symbol(${description})`;
1266
+ }
1267
+ }
1268
+ if (type == 'function') {
1269
+ const name = val.name;
1270
+ if (typeof name == 'string' && name.length > 0) {
1271
+ return `Function(${name})`;
1272
+ } else {
1273
+ return 'Function';
1274
+ }
1275
+ }
1276
+ // objects
1277
+ if (Array.isArray(val)) {
1278
+ const length = val.length;
1279
+ let debug = '[';
1280
+ if (length > 0) {
1281
+ debug += debugString(val[0]);
1282
+ }
1283
+ for(let i = 1; i < length; i++) {
1284
+ debug += ', ' + debugString(val[i]);
1285
+ }
1286
+ debug += ']';
1287
+ return debug;
1288
+ }
1289
+ // Test for built-in
1290
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
1291
+ let className;
1292
+ if (builtInMatches && builtInMatches.length > 1) {
1293
+ className = builtInMatches[1];
1294
+ } else {
1295
+ // Failed to match the standard '[object ClassName]'
1296
+ return toString.call(val);
1297
+ }
1298
+ if (className == 'Object') {
1299
+ // we're a user defined class or Object
1300
+ // JSON.stringify avoids problems with cycles, and is generally much
1301
+ // easier than looping through ownProperties of `val`.
1302
+ try {
1303
+ return 'Object(' + JSON.stringify(val) + ')';
1304
+ } catch (_) {
1305
+ return 'Object';
1485
1306
  }
1486
1307
  }
1308
+ // errors
1309
+ if (val instanceof Error) {
1310
+ return `${val.name}: ${val.message}\n${val.stack}`;
1311
+ }
1312
+ // TODO we could test for more things here, like `Set`s and `Map`s.
1313
+ return className;
1314
+ }
1315
+
1316
+ function getArrayJsValueFromWasm0(ptr, len) {
1317
+ ptr = ptr >>> 0;
1318
+ const mem = getDataViewMemory0();
1319
+ const result = [];
1320
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
1321
+ result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
1322
+ }
1323
+ wasm.__externref_drop_slice(ptr, len);
1324
+ return result;
1325
+ }
1326
+
1327
+ function getArrayU8FromWasm0(ptr, len) {
1328
+ ptr = ptr >>> 0;
1329
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
1330
+ }
1331
+
1332
+ let cachedDataViewMemory0 = null;
1333
+ function getDataViewMemory0() {
1334
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
1335
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
1336
+ }
1337
+ return cachedDataViewMemory0;
1338
+ }
1339
+
1340
+ function getStringFromWasm0(ptr, len) {
1341
+ ptr = ptr >>> 0;
1342
+ return decodeText(ptr, len);
1343
+ }
1344
+
1345
+ let cachedUint8ArrayMemory0 = null;
1346
+ function getUint8ArrayMemory0() {
1347
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
1348
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
1349
+ }
1350
+ return cachedUint8ArrayMemory0;
1351
+ }
1487
1352
 
1488
- const imports = __wbg_get_imports();
1489
- if (!(module instanceof WebAssembly.Module)) {
1490
- module = new WebAssembly.Module(module);
1353
+ function handleError(f, args) {
1354
+ try {
1355
+ return f.apply(this, args);
1356
+ } catch (e) {
1357
+ const idx = addToExternrefTable0(e);
1358
+ wasm.__wbindgen_exn_store(idx);
1491
1359
  }
1492
- const instance = new WebAssembly.Instance(module, imports);
1493
- return __wbg_finalize_init(instance, module);
1494
1360
  }
1495
1361
 
1496
- async function __wbg_init(module_or_path) {
1497
- if (wasm !== undefined) return wasm;
1362
+ function isLikeNone(x) {
1363
+ return x === undefined || x === null;
1364
+ }
1498
1365
 
1366
+ function makeMutClosure(arg0, arg1, dtor, f) {
1367
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
1368
+ const real = (...args) => {
1499
1369
 
1500
- if (typeof module_or_path !== 'undefined') {
1501
- if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
1502
- ({module_or_path} = module_or_path)
1503
- } else {
1504
- console.warn('using deprecated parameters for the initialization function; pass a single object instead')
1370
+ // First up with a closure we increment the internal reference
1371
+ // count. This ensures that the Rust closure environment won't
1372
+ // be deallocated while we're invoking it.
1373
+ state.cnt++;
1374
+ const a = state.a;
1375
+ state.a = 0;
1376
+ try {
1377
+ return f(a, state.b, ...args);
1378
+ } finally {
1379
+ state.a = a;
1380
+ real._wbg_cb_unref();
1381
+ }
1382
+ };
1383
+ real._wbg_cb_unref = () => {
1384
+ if (--state.cnt === 0) {
1385
+ state.dtor(state.a, state.b);
1386
+ state.a = 0;
1387
+ CLOSURE_DTORS.unregister(state);
1505
1388
  }
1389
+ };
1390
+ CLOSURE_DTORS.register(real, state, state);
1391
+ return real;
1392
+ }
1393
+
1394
+ function passStringToWasm0(arg, malloc, realloc) {
1395
+ if (realloc === undefined) {
1396
+ const buf = cachedTextEncoder.encode(arg);
1397
+ const ptr = malloc(buf.length, 1) >>> 0;
1398
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
1399
+ WASM_VECTOR_LEN = buf.length;
1400
+ return ptr;
1506
1401
  }
1507
1402
 
1508
- if (typeof module_or_path === 'undefined') {
1509
- module_or_path = new URL('cedarling_wasm_bg.wasm', import.meta.url);
1403
+ let len = arg.length;
1404
+ let ptr = malloc(len, 1) >>> 0;
1405
+
1406
+ const mem = getUint8ArrayMemory0();
1407
+
1408
+ let offset = 0;
1409
+
1410
+ for (; offset < len; offset++) {
1411
+ const code = arg.charCodeAt(offset);
1412
+ if (code > 0x7F) break;
1413
+ mem[ptr + offset] = code;
1510
1414
  }
1511
- const imports = __wbg_get_imports();
1415
+ if (offset !== len) {
1416
+ if (offset !== 0) {
1417
+ arg = arg.slice(offset);
1418
+ }
1419
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
1420
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
1421
+ const ret = cachedTextEncoder.encodeInto(arg, view);
1512
1422
 
1513
- if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
1514
- module_or_path = fetch(module_or_path);
1423
+ offset += ret.written;
1424
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
1515
1425
  }
1516
1426
 
1517
- const { instance, module } = await __wbg_load(await module_or_path, imports);
1427
+ WASM_VECTOR_LEN = offset;
1428
+ return ptr;
1429
+ }
1430
+
1431
+ function takeFromExternrefTable0(idx) {
1432
+ const value = wasm.__wbindgen_externrefs.get(idx);
1433
+ wasm.__externref_table_dealloc(idx);
1434
+ return value;
1435
+ }
1436
+
1437
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1438
+ cachedTextDecoder.decode();
1439
+ function decodeText(ptr, len) {
1440
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
1441
+ }
1442
+
1443
+ const cachedTextEncoder = new TextEncoder();
1518
1444
 
1519
- return __wbg_finalize_init(instance, module);
1445
+ if (!('encodeInto' in cachedTextEncoder)) {
1446
+ cachedTextEncoder.encodeInto = function (arg, view) {
1447
+ const buf = cachedTextEncoder.encode(arg);
1448
+ view.set(buf);
1449
+ return {
1450
+ read: arg.length,
1451
+ written: buf.length
1452
+ };
1453
+ };
1520
1454
  }
1521
1455
 
1522
- export { initSync };
1523
- export default __wbg_init;
1456
+ let WASM_VECTOR_LEN = 0;
1457
+
1458
+ const wasmPath = `${__dirname}/cedarling_wasm_bg.wasm`;
1459
+ const wasmBytes = require('fs').readFileSync(wasmPath);
1460
+ const wasmModule = new WebAssembly.Module(wasmBytes);
1461
+ const wasm = new WebAssembly.Instance(wasmModule, __wbg_get_imports()).exports;
1462
+ wasm.__wbindgen_start();