@janssenproject/cedarling_wasm 0.0.312-nodejs → 0.0.313

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.
@@ -227,3 +227,96 @@ export function init(config: any): Promise<Cedarling>;
227
227
  * ```
228
228
  */
229
229
  export function init_from_archive_bytes(config: any, archive_bytes: Uint8Array): Promise<Cedarling>;
230
+
231
+ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
232
+
233
+ export interface InitOutput {
234
+ readonly memory: WebAssembly.Memory;
235
+ readonly __wbg_cedarling_free: (a: number, b: number) => void;
236
+ readonly __wbg_multiissuerauthorizeresult_free: (a: number, b: number) => void;
237
+ readonly __wbg_get_multiissuerauthorizeresult_response: (a: number) => number;
238
+ readonly __wbg_set_multiissuerauthorizeresult_response: (a: number, b: number) => void;
239
+ readonly __wbg_get_multiissuerauthorizeresult_decision: (a: number) => number;
240
+ readonly __wbg_set_multiissuerauthorizeresult_decision: (a: number, b: number) => void;
241
+ readonly __wbg_get_multiissuerauthorizeresult_request_id: (a: number) => [number, number];
242
+ readonly __wbg_set_multiissuerauthorizeresult_request_id: (a: number, b: number, c: number) => void;
243
+ readonly multiissuerauthorizeresult_json_string: (a: number) => [number, number];
244
+ readonly init: (a: any) => any;
245
+ readonly init_from_archive_bytes: (a: any, b: any) => any;
246
+ readonly cedarling_new: (a: any) => any;
247
+ readonly cedarling_new_from_map: (a: any) => any;
248
+ readonly cedarling_authorize: (a: number, b: any) => any;
249
+ readonly cedarling_authorize_unsigned: (a: number, b: any) => any;
250
+ readonly cedarling_authorize_multi_issuer: (a: number, b: any) => any;
251
+ readonly cedarling_pop_logs: (a: number) => [number, number, number];
252
+ readonly cedarling_get_log_by_id: (a: number, b: number, c: number) => [number, number, number];
253
+ readonly cedarling_get_log_ids: (a: number) => any;
254
+ readonly cedarling_get_logs_by_tag: (a: number, b: number, c: number) => [number, number, number, number];
255
+ readonly cedarling_get_logs_by_request_id: (a: number, b: number, c: number) => [number, number, number, number];
256
+ readonly cedarling_get_logs_by_request_id_and_tag: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
257
+ readonly cedarling_shut_down: (a: number) => any;
258
+ readonly __wbg_authorizeresult_free: (a: number, b: number) => void;
259
+ readonly __wbg_get_authorizeresult_workload: (a: number) => number;
260
+ readonly __wbg_set_authorizeresult_workload: (a: number, b: number) => void;
261
+ readonly __wbg_get_authorizeresult_person: (a: number) => number;
262
+ readonly __wbg_set_authorizeresult_person: (a: number, b: number) => void;
263
+ readonly __wbg_get_authorizeresult_decision: (a: number) => number;
264
+ readonly __wbg_set_authorizeresult_decision: (a: number, b: number) => void;
265
+ readonly __wbg_get_authorizeresult_request_id: (a: number) => [number, number];
266
+ readonly __wbg_set_authorizeresult_request_id: (a: number, b: number, c: number) => void;
267
+ readonly authorizeresult_json_string: (a: number) => [number, number];
268
+ readonly authorizeresult_principal: (a: number, b: number, c: number) => number;
269
+ readonly __wbg_authorizeresultresponse_free: (a: number, b: number) => void;
270
+ readonly authorizeresultresponse_decision: (a: number) => number;
271
+ readonly authorizeresultresponse_diagnostics: (a: number) => number;
272
+ readonly __wbg_diagnostics_free: (a: number, b: number) => void;
273
+ readonly diagnostics_reason: (a: number) => [number, number];
274
+ readonly diagnostics_errors: (a: number) => [number, number];
275
+ readonly __wbg_policyevaluationerror_free: (a: number, b: number) => void;
276
+ readonly policyevaluationerror_id: (a: number) => [number, number];
277
+ readonly policyevaluationerror_error: (a: number) => [number, number];
278
+ readonly rust_zstd_wasm_shim_qsort: (a: number, b: number, c: number, d: number) => void;
279
+ readonly rust_zstd_wasm_shim_malloc: (a: number) => number;
280
+ readonly rust_zstd_wasm_shim_memcmp: (a: number, b: number, c: number) => number;
281
+ readonly rust_zstd_wasm_shim_calloc: (a: number, b: number) => number;
282
+ readonly rust_zstd_wasm_shim_free: (a: number) => void;
283
+ readonly rust_zstd_wasm_shim_memcpy: (a: number, b: number, c: number) => number;
284
+ readonly rust_zstd_wasm_shim_memmove: (a: number, b: number, c: number) => number;
285
+ readonly rust_zstd_wasm_shim_memset: (a: number, b: number, c: number) => number;
286
+ readonly wasm_bindgen__closure__destroy__hd529f22c34389d0f: (a: number, b: number) => void;
287
+ readonly wasm_bindgen__closure__destroy__h0bd98a3a1d60a5b1: (a: number, b: number) => void;
288
+ readonly wasm_bindgen__convert__closures_____invoke__h826419d66d164abb: (a: number, b: number, c: any) => [number, number];
289
+ readonly wasm_bindgen__convert__closures_____invoke__h494d783032f4344f: (a: number, b: number, c: any, d: any) => void;
290
+ readonly wasm_bindgen__convert__closures_____invoke__hbf3e188fe995424e: (a: number, b: number) => void;
291
+ readonly __wbindgen_malloc: (a: number, b: number) => number;
292
+ readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
293
+ readonly __wbindgen_exn_store: (a: number) => void;
294
+ readonly __externref_table_alloc: () => number;
295
+ readonly __wbindgen_externrefs: WebAssembly.Table;
296
+ readonly __wbindgen_free: (a: number, b: number, c: number) => void;
297
+ readonly __externref_table_dealloc: (a: number) => void;
298
+ readonly __externref_drop_slice: (a: number, b: number) => void;
299
+ readonly __wbindgen_start: () => void;
300
+ }
301
+
302
+ export type SyncInitInput = BufferSource | WebAssembly.Module;
303
+
304
+ /**
305
+ * Instantiates the given `module`, which can either be bytes or
306
+ * a precompiled `WebAssembly.Module`.
307
+ *
308
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
309
+ *
310
+ * @returns {InitOutput}
311
+ */
312
+ export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
313
+
314
+ /**
315
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
316
+ * for everything else, calls `WebAssembly.instantiate` directly.
317
+ *
318
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
319
+ *
320
+ * @returns {Promise<InitOutput>}
321
+ */
322
+ export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
package/cedarling_wasm.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * A WASM wrapper for the Rust `cedarling::AuthorizeResult` struct.
5
5
  * Represents the result of an authorization request.
6
6
  */
7
- class AuthorizeResult {
7
+ export class AuthorizeResult {
8
8
  static __wrap(ptr) {
9
9
  ptr = ptr >>> 0;
10
10
  const obj = Object.create(AuthorizeResult.prototype);
@@ -138,13 +138,12 @@ class AuthorizeResult {
138
138
  }
139
139
  }
140
140
  if (Symbol.dispose) AuthorizeResult.prototype[Symbol.dispose] = AuthorizeResult.prototype.free;
141
- exports.AuthorizeResult = AuthorizeResult;
142
141
 
143
142
  /**
144
143
  * A WASM wrapper for the Rust `cedar_policy::Response` struct.
145
144
  * Represents the result of an authorization request.
146
145
  */
147
- class AuthorizeResultResponse {
146
+ export class AuthorizeResultResponse {
148
147
  static __wrap(ptr) {
149
148
  ptr = ptr >>> 0;
150
149
  const obj = Object.create(AuthorizeResultResponse.prototype);
@@ -180,12 +179,11 @@ class AuthorizeResultResponse {
180
179
  }
181
180
  }
182
181
  if (Symbol.dispose) AuthorizeResultResponse.prototype[Symbol.dispose] = AuthorizeResultResponse.prototype.free;
183
- exports.AuthorizeResultResponse = AuthorizeResultResponse;
184
182
 
185
183
  /**
186
184
  * The instance of the Cedarling application.
187
185
  */
188
- class Cedarling {
186
+ export class Cedarling {
189
187
  static __wrap(ptr) {
190
188
  ptr = ptr >>> 0;
191
189
  const obj = Object.create(Cedarling.prototype);
@@ -354,7 +352,6 @@ class Cedarling {
354
352
  }
355
353
  }
356
354
  if (Symbol.dispose) Cedarling.prototype[Symbol.dispose] = Cedarling.prototype.free;
357
- exports.Cedarling = Cedarling;
358
355
 
359
356
  /**
360
357
  * Diagnostics
@@ -362,7 +359,7 @@ exports.Cedarling = Cedarling;
362
359
  *
363
360
  * Provides detailed information about how a policy decision was made, including policies that contributed to the decision and any errors encountered during evaluation.
364
361
  */
365
- class Diagnostics {
362
+ export class Diagnostics {
366
363
  static __wrap(ptr) {
367
364
  ptr = ptr >>> 0;
368
365
  const obj = Object.create(Diagnostics.prototype);
@@ -406,13 +403,12 @@ class Diagnostics {
406
403
  }
407
404
  }
408
405
  if (Symbol.dispose) Diagnostics.prototype[Symbol.dispose] = Diagnostics.prototype.free;
409
- exports.Diagnostics = Diagnostics;
410
406
 
411
407
  /**
412
408
  * A WASM wrapper for the Rust `cedarling::MultiIssuerAuthorizeResult` struct.
413
409
  * Represents the result of a multi-issuer authorization request.
414
410
  */
415
- class MultiIssuerAuthorizeResult {
411
+ export class MultiIssuerAuthorizeResult {
416
412
  static __wrap(ptr) {
417
413
  ptr = ptr >>> 0;
418
414
  const obj = Object.create(MultiIssuerAuthorizeResult.prototype);
@@ -509,7 +505,6 @@ class MultiIssuerAuthorizeResult {
509
505
  }
510
506
  }
511
507
  if (Symbol.dispose) MultiIssuerAuthorizeResult.prototype[Symbol.dispose] = MultiIssuerAuthorizeResult.prototype.free;
512
- exports.MultiIssuerAuthorizeResult = MultiIssuerAuthorizeResult;
513
508
 
514
509
  /**
515
510
  * PolicyEvaluationError
@@ -517,7 +512,7 @@ exports.MultiIssuerAuthorizeResult = MultiIssuerAuthorizeResult;
517
512
  *
518
513
  * Represents an error that occurred when evaluating a Cedar policy.
519
514
  */
520
- class PolicyEvaluationError {
515
+ export class PolicyEvaluationError {
521
516
  static __wrap(ptr) {
522
517
  ptr = ptr >>> 0;
523
518
  const obj = Object.create(PolicyEvaluationError.prototype);
@@ -569,7 +564,6 @@ class PolicyEvaluationError {
569
564
  }
570
565
  }
571
566
  if (Symbol.dispose) PolicyEvaluationError.prototype[Symbol.dispose] = PolicyEvaluationError.prototype.free;
572
- exports.PolicyEvaluationError = PolicyEvaluationError;
573
567
 
574
568
  /**
575
569
  * Create a new instance of the Cedarling application.
@@ -577,11 +571,10 @@ exports.PolicyEvaluationError = PolicyEvaluationError;
577
571
  * @param {any} config
578
572
  * @returns {Promise<Cedarling>}
579
573
  */
580
- function init(config) {
574
+ export function init(config) {
581
575
  const ret = wasm.init(config);
582
576
  return ret;
583
577
  }
584
- exports.init = init;
585
578
 
586
579
  /**
587
580
  * Create a new instance of the Cedarling application from archive bytes.
@@ -603,81 +596,80 @@ exports.init = init;
603
596
  * @param {Uint8Array} archive_bytes
604
597
  * @returns {Promise<Cedarling>}
605
598
  */
606
- function init_from_archive_bytes(config, archive_bytes) {
599
+ export function init_from_archive_bytes(config, archive_bytes) {
607
600
  const ret = wasm.init_from_archive_bytes(config, archive_bytes);
608
601
  return ret;
609
602
  }
610
- exports.init_from_archive_bytes = init_from_archive_bytes;
611
603
 
612
604
  function __wbg_get_imports() {
613
605
  const import0 = {
614
606
  __proto__: null,
615
- __wbg_Error_dbcd8782dbb273a2: function(arg0, arg1) {
607
+ __wbg_Error_4577686b3a6d9b3a: function(arg0, arg1) {
616
608
  const ret = Error(getStringFromWasm0(arg0, arg1));
617
609
  return ret;
618
610
  },
619
- __wbg_Number_012552ac4683228d: function(arg0) {
611
+ __wbg_Number_e89e48a2fe1a6355: function(arg0) {
620
612
  const ret = Number(arg0);
621
613
  return ret;
622
614
  },
623
- __wbg___wbindgen_bigint_get_as_i64_25c638f64ce0e2e0: function(arg0, arg1) {
615
+ __wbg___wbindgen_bigint_get_as_i64_578010f8442e0319: function(arg0, arg1) {
624
616
  const v = arg1;
625
617
  const ret = typeof(v) === 'bigint' ? v : undefined;
626
618
  getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
627
619
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
628
620
  },
629
- __wbg___wbindgen_boolean_get_7f1c4dd217655ab6: function(arg0) {
621
+ __wbg___wbindgen_boolean_get_18c4ed9422296fff: function(arg0) {
630
622
  const v = arg0;
631
623
  const ret = typeof(v) === 'boolean' ? v : undefined;
632
624
  return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
633
625
  },
634
- __wbg___wbindgen_debug_string_6cf0badf0b90f6ef: function(arg0, arg1) {
626
+ __wbg___wbindgen_debug_string_ddde1867f49c2442: function(arg0, arg1) {
635
627
  const ret = debugString(arg1);
636
628
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
637
629
  const len1 = WASM_VECTOR_LEN;
638
630
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
639
631
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
640
632
  },
641
- __wbg___wbindgen_in_e32cbbbf71fdc915: function(arg0, arg1) {
633
+ __wbg___wbindgen_in_1064a108f4d18b9e: function(arg0, arg1) {
642
634
  const ret = arg0 in arg1;
643
635
  return ret;
644
636
  },
645
- __wbg___wbindgen_is_bigint_95f22c948ca1bbe1: function(arg0) {
637
+ __wbg___wbindgen_is_bigint_a157f0734ca85901: function(arg0) {
646
638
  const ret = typeof(arg0) === 'bigint';
647
639
  return ret;
648
640
  },
649
- __wbg___wbindgen_is_function_4500d4795b15e70b: function(arg0) {
641
+ __wbg___wbindgen_is_function_d633e708baf0d146: function(arg0) {
650
642
  const ret = typeof(arg0) === 'function';
651
643
  return ret;
652
644
  },
653
- __wbg___wbindgen_is_object_f8b6723c60349a13: function(arg0) {
645
+ __wbg___wbindgen_is_object_4b3de556756ee8a8: function(arg0) {
654
646
  const val = arg0;
655
647
  const ret = typeof(val) === 'object' && val !== null;
656
648
  return ret;
657
649
  },
658
- __wbg___wbindgen_is_string_89134e23eba104e4: function(arg0) {
650
+ __wbg___wbindgen_is_string_7debe47dc1e045c2: function(arg0) {
659
651
  const ret = typeof(arg0) === 'string';
660
652
  return ret;
661
653
  },
662
- __wbg___wbindgen_is_undefined_1296fcc83c2da07a: function(arg0) {
654
+ __wbg___wbindgen_is_undefined_c18285b9fc34cb7d: function(arg0) {
663
655
  const ret = arg0 === undefined;
664
656
  return ret;
665
657
  },
666
- __wbg___wbindgen_jsval_eq_39cab0b49f8188e9: function(arg0, arg1) {
658
+ __wbg___wbindgen_jsval_eq_a6afb59d8c5e78d6: function(arg0, arg1) {
667
659
  const ret = arg0 === arg1;
668
660
  return ret;
669
661
  },
670
- __wbg___wbindgen_jsval_loose_eq_3173dea557396a92: function(arg0, arg1) {
662
+ __wbg___wbindgen_jsval_loose_eq_1562ceb9af84e990: function(arg0, arg1) {
671
663
  const ret = arg0 == arg1;
672
664
  return ret;
673
665
  },
674
- __wbg___wbindgen_number_get_3330675b4e5c3680: function(arg0, arg1) {
666
+ __wbg___wbindgen_number_get_5854912275df1894: function(arg0, arg1) {
675
667
  const obj = arg1;
676
668
  const ret = typeof(obj) === 'number' ? obj : undefined;
677
669
  getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
678
670
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
679
671
  },
680
- __wbg___wbindgen_string_get_7b8bc463f6cbeefe: function(arg0, arg1) {
672
+ __wbg___wbindgen_string_get_3e5751597f39a112: function(arg0, arg1) {
681
673
  const obj = arg1;
682
674
  const ret = typeof(obj) === 'string' ? obj : undefined;
683
675
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -685,22 +677,22 @@ function __wbg_get_imports() {
685
677
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
686
678
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
687
679
  },
688
- __wbg___wbindgen_throw_89ca9e2c67795ec1: function(arg0, arg1) {
680
+ __wbg___wbindgen_throw_39bc967c0e5a9b58: function(arg0, arg1) {
689
681
  throw new Error(getStringFromWasm0(arg0, arg1));
690
682
  },
691
- __wbg__wbg_cb_unref_f00ff3c6385bd6fa: function(arg0) {
683
+ __wbg__wbg_cb_unref_b6d832240a919168: function(arg0) {
692
684
  arg0._wbg_cb_unref();
693
685
  },
694
- __wbg_abort_d5982476775d2739: function(arg0, arg1) {
695
- arg0.abort(arg1);
696
- },
697
- __wbg_abort_e6a92d5623297220: function(arg0) {
686
+ __wbg_abort_695597a7a37354a1: function(arg0) {
698
687
  arg0.abort();
699
688
  },
700
- __wbg_append_bddb95024c591a53: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
689
+ __wbg_abort_e104a8a255db427b: function(arg0, arg1) {
690
+ arg0.abort(arg1);
691
+ },
692
+ __wbg_append_83740b7c5805e38d: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
701
693
  arg0.append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
702
694
  }, arguments); },
703
- __wbg_arrayBuffer_c95edc576c2724fe: function() { return handleError(function (arg0) {
695
+ __wbg_arrayBuffer_8fd4b7df096647f9: function() { return handleError(function (arg0) {
704
696
  const ret = arg0.arrayBuffer();
705
697
  return ret;
706
698
  }, arguments); },
@@ -708,11 +700,11 @@ function __wbg_get_imports() {
708
700
  const ret = AuthorizeResult.__wrap(arg0);
709
701
  return ret;
710
702
  },
711
- __wbg_call_3eadb5cea0462653: function() { return handleError(function (arg0, arg1, arg2) {
703
+ __wbg_call_08ad0d89caa7cb79: function() { return handleError(function (arg0, arg1, arg2) {
712
704
  const ret = arg0.call(arg1, arg2);
713
705
  return ret;
714
706
  }, arguments); },
715
- __wbg_call_eb691bc2f5533064: function() { return handleError(function (arg0, arg1) {
707
+ __wbg_call_73af281463ec8b58: function() { return handleError(function (arg0, arg1) {
716
708
  const ret = arg0.call(arg1);
717
709
  return ret;
718
710
  }, arguments); },
@@ -728,37 +720,37 @@ function __wbg_get_imports() {
728
720
  const ret = arg0.crypto;
729
721
  return ret;
730
722
  },
731
- __wbg_debug_4aa822a1af5d039c: function(arg0) {
723
+ __wbg_debug_55a0d5307b3f43af: function(arg0) {
732
724
  console.debug(...arg0);
733
725
  },
734
- __wbg_done_82b14aeb31e98db6: function(arg0) {
726
+ __wbg_done_5aad55ec6b1954b1: function(arg0) {
735
727
  const ret = arg0.done;
736
728
  return ret;
737
729
  },
738
- __wbg_entries_279f7c28f13d750a: function(arg0) {
739
- const ret = arg0.entries();
730
+ __wbg_entries_28d32ba4cd93f5fc: function(arg0) {
731
+ const ret = Object.entries(arg0);
740
732
  return ret;
741
733
  },
742
- __wbg_entries_46c64fadfaa3b525: function(arg0) {
743
- const ret = Object.entries(arg0);
734
+ __wbg_entries_728df8ae891bd59c: function(arg0) {
735
+ const ret = arg0.entries();
744
736
  return ret;
745
737
  },
746
- __wbg_entries_70ed5a7af0d07177: function(arg0) {
738
+ __wbg_entries_a004d41a2064144e: function(arg0) {
747
739
  const ret = arg0.entries();
748
740
  return ret;
749
741
  },
750
- __wbg_error_5fc0bc226aeb2474: function(arg0) {
742
+ __wbg_error_b21ccef52463b9ca: function(arg0) {
751
743
  console.error(...arg0);
752
744
  },
753
745
  __wbg_fetch_43b2f110608a59ff: function(arg0) {
754
746
  const ret = fetch(arg0);
755
747
  return ret;
756
748
  },
757
- __wbg_fetch_c170c157e1a111d4: function(arg0, arg1) {
749
+ __wbg_fetch_59df3bdc0a4c0e4b: function(arg0, arg1) {
758
750
  const ret = arg0.fetch(arg1);
759
751
  return ret;
760
752
  },
761
- __wbg_fromEntries_cdb610e02cd25f1c: function() { return handleError(function (arg0) {
753
+ __wbg_fromEntries_2f51c4024e2a7aa3: function() { return handleError(function (arg0) {
762
754
  const ret = Object.fromEntries(arg0);
763
755
  return ret;
764
756
  }, arguments); },
@@ -768,27 +760,27 @@ function __wbg_get_imports() {
768
760
  __wbg_getRandomValues_c44a50d8cfdaebeb: function() { return handleError(function (arg0, arg1) {
769
761
  arg0.getRandomValues(arg1);
770
762
  }, arguments); },
771
- __wbg_getTime_4b23931c93d819bb: function(arg0) {
763
+ __wbg_getTime_9429d05129287418: function(arg0) {
772
764
  const ret = arg0.getTime();
773
765
  return ret;
774
766
  },
775
- __wbg_getTimezoneOffset_4f1ae12e19a7e5cb: function(arg0) {
767
+ __wbg_getTimezoneOffset_eeb05f23347950d1: function(arg0) {
776
768
  const ret = arg0.getTimezoneOffset();
777
769
  return ret;
778
770
  },
779
- __wbg_get_229657ec2da079cd: function(arg0, arg1) {
780
- const ret = arg0[arg1 >>> 0];
781
- return ret;
782
- },
783
- __wbg_get_89f3a4c398b4872e: function() { return handleError(function (arg0, arg1) {
771
+ __wbg_get_18349afdb36339a9: function() { return handleError(function (arg0, arg1) {
784
772
  const ret = Reflect.get(arg0, arg1);
785
773
  return ret;
786
774
  }, arguments); },
787
- __wbg_get_ed44f5f876f22351: function() { return handleError(function (arg0, arg1) {
775
+ __wbg_get_4920fefd3451364b: function() { return handleError(function (arg0, arg1) {
788
776
  const ret = Reflect.get(arg0, arg1);
789
777
  return ret;
790
778
  }, arguments); },
791
- __wbg_get_unchecked_ae4d1600970be7c3: function(arg0, arg1) {
779
+ __wbg_get_f09c3a16f8848381: function(arg0, arg1) {
780
+ const ret = arg0[arg1 >>> 0];
781
+ return ret;
782
+ },
783
+ __wbg_get_unchecked_3d0f4b91c8eca4f0: function(arg0, arg1) {
792
784
  const ret = arg0[arg1 >>> 0];
793
785
  return ret;
794
786
  },
@@ -796,18 +788,18 @@ function __wbg_get_imports() {
796
788
  const ret = arg0[arg1];
797
789
  return ret;
798
790
  },
799
- __wbg_has_01b31fbd88bb3e8f: function() { return handleError(function (arg0, arg1) {
791
+ __wbg_has_14f08fae2dc367dc: function() { return handleError(function (arg0, arg1) {
800
792
  const ret = Reflect.has(arg0, arg1);
801
793
  return ret;
802
794
  }, arguments); },
803
- __wbg_headers_fa752b79db86f8b3: function(arg0) {
795
+ __wbg_headers_028b9b1c907f9362: function(arg0) {
804
796
  const ret = arg0.headers;
805
797
  return ret;
806
798
  },
807
- __wbg_info_93be0cc78448065a: function(arg0) {
799
+ __wbg_info_53eab27aae9168ec: function(arg0) {
808
800
  console.info(...arg0);
809
801
  },
810
- __wbg_instanceof_ArrayBuffer_4f2b9b5ed416155d: function(arg0) {
802
+ __wbg_instanceof_ArrayBuffer_15859862b80b732d: function(arg0) {
811
803
  let result;
812
804
  try {
813
805
  result = arg0 instanceof ArrayBuffer;
@@ -817,7 +809,7 @@ function __wbg_get_imports() {
817
809
  const ret = result;
818
810
  return ret;
819
811
  },
820
- __wbg_instanceof_Array_c6fd13bcae830167: function(arg0) {
812
+ __wbg_instanceof_Array_461ec6d7afd45fda: function(arg0) {
821
813
  let result;
822
814
  try {
823
815
  result = arg0 instanceof Array;
@@ -827,7 +819,7 @@ function __wbg_get_imports() {
827
819
  const ret = result;
828
820
  return ret;
829
821
  },
830
- __wbg_instanceof_Map_3ad422261e078a42: function(arg0) {
822
+ __wbg_instanceof_Map_9df16bf25ceb4ecb: function(arg0) {
831
823
  let result;
832
824
  try {
833
825
  result = arg0 instanceof Map;
@@ -837,7 +829,7 @@ function __wbg_get_imports() {
837
829
  const ret = result;
838
830
  return ret;
839
831
  },
840
- __wbg_instanceof_Response_1844be67dbd5e161: function(arg0) {
832
+ __wbg_instanceof_Response_8ec0057b1e5c71bf: function(arg0) {
841
833
  let result;
842
834
  try {
843
835
  result = arg0 instanceof Response;
@@ -847,7 +839,7 @@ function __wbg_get_imports() {
847
839
  const ret = result;
848
840
  return ret;
849
841
  },
850
- __wbg_instanceof_Uint8Array_6482c66fce35827d: function(arg0) {
842
+ __wbg_instanceof_Uint8Array_2240b7046ac16f05: function(arg0) {
851
843
  let result;
852
844
  try {
853
845
  result = arg0 instanceof Uint8Array;
@@ -857,31 +849,31 @@ function __wbg_get_imports() {
857
849
  const ret = result;
858
850
  return ret;
859
851
  },
860
- __wbg_isArray_fe5201bfdab7e39d: function(arg0) {
852
+ __wbg_isArray_fad08a0d12828686: function(arg0) {
861
853
  const ret = Array.isArray(arg0);
862
854
  return ret;
863
855
  },
864
- __wbg_isSafeInteger_d6215c7562dbc4db: function(arg0) {
856
+ __wbg_isSafeInteger_10e4151eb694e42a: function(arg0) {
865
857
  const ret = Number.isSafeInteger(arg0);
866
858
  return ret;
867
859
  },
868
- __wbg_iterator_63c3a1857203cf2f: function() {
860
+ __wbg_iterator_fc7ad8d33bab9e26: function() {
869
861
  const ret = Symbol.iterator;
870
862
  return ret;
871
863
  },
872
- __wbg_keys_31cd32ffa3aa3d32: function(arg0) {
864
+ __wbg_keys_e20e1368162303e0: function(arg0) {
873
865
  const ret = Object.keys(arg0);
874
866
  return ret;
875
867
  },
876
- __wbg_length_f875d3a041bab91a: function(arg0) {
868
+ __wbg_length_5855c1f289dfffc1: function(arg0) {
877
869
  const ret = arg0.length;
878
870
  return ret;
879
871
  },
880
- __wbg_length_feaf2a40e5f9755a: function(arg0) {
872
+ __wbg_length_a31e05262e09b7f8: function(arg0) {
881
873
  const ret = arg0.length;
882
874
  return ret;
883
875
  },
884
- __wbg_log_c6f597dffc84d4f3: function(arg0) {
876
+ __wbg_log_ecffbec35822c498: function(arg0) {
885
877
  console.log(...arg0);
886
878
  },
887
879
  __wbg_msCrypto_bd5a034af96bcba6: function(arg0) {
@@ -892,50 +884,50 @@ function __wbg_get_imports() {
892
884
  const ret = MultiIssuerAuthorizeResult.__wrap(arg0);
893
885
  return ret;
894
886
  },
895
- __wbg_new_08d33c204155a3e2: function() { return handleError(function () {
896
- const ret = new AbortController();
887
+ __wbg_new_0765f05b3e3b4625: function() { return handleError(function () {
888
+ const ret = new Headers();
897
889
  return ret;
898
890
  }, arguments); },
899
- __wbg_new_0_e8782c8df6122565: function() {
900
- const ret = new Date();
891
+ __wbg_new_09959f7b4c92c246: function(arg0) {
892
+ const ret = new Uint8Array(arg0);
901
893
  return ret;
902
894
  },
903
- __wbg_new_5947ca72f3fee3e6: function() {
904
- const ret = new Map();
895
+ __wbg_new_0_a719938e6f92ddf4: function() {
896
+ const ret = new Date();
905
897
  return ret;
906
898
  },
907
- __wbg_new_61cfa1e9627505e2: function(arg0) {
899
+ __wbg_new_223944ca37c18764: function(arg0) {
908
900
  const ret = new Date(arg0);
909
901
  return ret;
910
902
  },
911
- __wbg_new_6e7681a5f6f98ceb: function(arg0) {
912
- const ret = new Uint8Array(arg0);
903
+ __wbg_new_92df58a8ec3bfb6b: function() {
904
+ const ret = new Map();
905
+ return ret;
906
+ },
907
+ __wbg_new_cbee8c0d5c479eac: function() {
908
+ const ret = new Array();
913
909
  return ret;
914
910
  },
915
- __wbg_new_6feff3e11e4d0799: function() {
911
+ __wbg_new_ed69e637b553a997: function() {
916
912
  const ret = new Object();
917
913
  return ret;
918
914
  },
919
- __wbg_new_e88efd8ca5aef956: function() { return handleError(function () {
920
- const ret = new Headers();
915
+ __wbg_new_fe53f8c71bd1e95b: function() { return handleError(function () {
916
+ const ret = new AbortController();
921
917
  return ret;
922
918
  }, arguments); },
923
- __wbg_new_ff7f9cc4c9a4a0cf: function() {
924
- const ret = new Array();
925
- return ret;
926
- },
927
- __wbg_new_from_slice_a5be53238f31f9f7: function(arg0, arg1) {
919
+ __wbg_new_from_slice_d7e202fdbee3c396: function(arg0, arg1) {
928
920
  const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
929
921
  return ret;
930
922
  },
931
- __wbg_new_typed_f79896f0ea5f7de8: function(arg0, arg1) {
923
+ __wbg_new_typed_8258a0d8488ef2a2: function(arg0, arg1) {
932
924
  try {
933
925
  var state0 = {a: arg0, b: arg1};
934
926
  var cb0 = (arg0, arg1) => {
935
927
  const a = state0.a;
936
928
  state0.a = 0;
937
929
  try {
938
- return wasm_bindgen__convert__closures_____invoke__hd96d811f18675791(a, state0.b, arg0, arg1);
930
+ return wasm_bindgen__convert__closures_____invoke__h494d783032f4344f(a, state0.b, arg0, arg1);
939
931
  } finally {
940
932
  state0.a = a;
941
933
  }
@@ -946,22 +938,22 @@ function __wbg_get_imports() {
946
938
  state0.a = state0.b = 0;
947
939
  }
948
940
  },
949
- __wbg_new_with_length_3217a89bbca17214: function(arg0) {
941
+ __wbg_new_with_length_c8449d782396d344: function(arg0) {
950
942
  const ret = new Uint8Array(arg0 >>> 0);
951
943
  return ret;
952
944
  },
953
- __wbg_new_with_str_and_init_66de5344635d3590: function() { return handleError(function (arg0, arg1, arg2) {
945
+ __wbg_new_with_str_and_init_5fdb105df3907de1: function() { return handleError(function (arg0, arg1, arg2) {
954
946
  const ret = new Request(getStringFromWasm0(arg0, arg1), arg2);
955
947
  return ret;
956
948
  }, arguments); },
957
- __wbg_next_ae5b710aea83f41e: function() { return handleError(function (arg0) {
958
- const ret = arg0.next();
959
- return ret;
960
- }, arguments); },
961
- __wbg_next_f577b3e02c9be709: function(arg0) {
949
+ __wbg_next_a5fe6f328f7affc2: function(arg0) {
962
950
  const ret = arg0.next;
963
951
  return ret;
964
952
  },
953
+ __wbg_next_e592122bb4ed4c67: function() { return handleError(function (arg0) {
954
+ const ret = arg0.next();
955
+ return ret;
956
+ }, arguments); },
965
957
  __wbg_node_84ea875411254db1: function(arg0) {
966
958
  const ret = arg0.node;
967
959
  return ret;
@@ -974,20 +966,20 @@ function __wbg_get_imports() {
974
966
  const ret = arg0.process;
975
967
  return ret;
976
968
  },
977
- __wbg_prototypesetcall_37f00e1be5c4015a: function(arg0, arg1, arg2) {
969
+ __wbg_prototypesetcall_f034d444741426c3: function(arg0, arg1, arg2) {
978
970
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
979
971
  },
980
- __wbg_push_3584053bd77475ee: function(arg0, arg1) {
972
+ __wbg_push_a6f9488ffd3fae3b: function(arg0, arg1) {
981
973
  const ret = arg0.push(arg1);
982
974
  return ret;
983
975
  },
984
- __wbg_queueMicrotask_5e387cf4d8e3f63e: function(arg0) {
985
- queueMicrotask(arg0);
986
- },
987
- __wbg_queueMicrotask_77bf5a3ad712168b: function(arg0) {
976
+ __wbg_queueMicrotask_2c8dfd1056f24fdc: function(arg0) {
988
977
  const ret = arg0.queueMicrotask;
989
978
  return ret;
990
979
  },
980
+ __wbg_queueMicrotask_8985ad63815852e7: function(arg0) {
981
+ queueMicrotask(arg0);
982
+ },
991
983
  __wbg_randomFillSync_6c25eac9869eb53c: function() { return handleError(function (arg0, arg1) {
992
984
  arg0.randomFillSync(arg1);
993
985
  }, arguments); },
@@ -995,7 +987,7 @@ function __wbg_get_imports() {
995
987
  const ret = module.require;
996
988
  return ret;
997
989
  }, arguments); },
998
- __wbg_resolve_2e8556632715b12f: function(arg0) {
990
+ __wbg_resolve_5d61e0d10c14730a: function(arg0) {
999
991
  const ret = Promise.resolve(arg0);
1000
992
  return ret;
1001
993
  },
@@ -1003,92 +995,92 @@ function __wbg_get_imports() {
1003
995
  const ret = setTimeout(arg0, arg1);
1004
996
  return ret;
1005
997
  },
1006
- __wbg_set_409333732b484ee7: function() { return handleError(function (arg0, arg1, arg2) {
1007
- const ret = Reflect.set(arg0, arg1, arg2);
1008
- return ret;
1009
- }, arguments); },
1010
- __wbg_set_601f3e1d081df3ac: function(arg0, arg1, arg2) {
998
+ __wbg_set_4c81cfb5dc3a333c: function(arg0, arg1, arg2) {
1011
999
  arg0[arg1 >>> 0] = arg2;
1012
1000
  },
1013
1001
  __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
1014
1002
  arg0[arg1] = arg2;
1015
1003
  },
1016
- __wbg_set_b1226382f10be917: function(arg0, arg1, arg2) {
1017
- const ret = arg0.set(arg1, arg2);
1004
+ __wbg_set_bad5c505cc70b5f8: function() { return handleError(function (arg0, arg1, arg2) {
1005
+ const ret = Reflect.set(arg0, arg1, arg2);
1018
1006
  return ret;
1019
- },
1020
- __wbg_set_body_42d5ed933a1840a1: function(arg0, arg1) {
1007
+ }, arguments); },
1008
+ __wbg_set_body_cced363f7703790d: function(arg0, arg1) {
1021
1009
  arg0.body = arg1;
1022
1010
  },
1023
- __wbg_set_cache_546c3dda0e43ae0c: function(arg0, arg1) {
1011
+ __wbg_set_cache_d1e60189f19e54cf: function(arg0, arg1) {
1024
1012
  arg0.cache = __wbindgen_enum_RequestCache[arg1];
1025
1013
  },
1026
- __wbg_set_credentials_328fbf29cfdfa342: function(arg0, arg1) {
1014
+ __wbg_set_cfc6de03f990decf: function(arg0, arg1, arg2) {
1015
+ const ret = arg0.set(arg1, arg2);
1016
+ return ret;
1017
+ },
1018
+ __wbg_set_credentials_b80a80dfa15201af: function(arg0, arg1) {
1027
1019
  arg0.credentials = __wbindgen_enum_RequestCredentials[arg1];
1028
1020
  },
1029
- __wbg_set_headers_1f8bdee11d576059: function(arg0, arg1) {
1021
+ __wbg_set_headers_9144e2163352af57: function(arg0, arg1) {
1030
1022
  arg0.headers = arg1;
1031
1023
  },
1032
- __wbg_set_method_5a35896632ca213d: function(arg0, arg1, arg2) {
1024
+ __wbg_set_method_c1be4686b152fe29: function(arg0, arg1, arg2) {
1033
1025
  arg0.method = getStringFromWasm0(arg1, arg2);
1034
1026
  },
1035
- __wbg_set_mode_6fa10db5d133ac26: function(arg0, arg1) {
1027
+ __wbg_set_mode_13fad253f291265c: function(arg0, arg1) {
1036
1028
  arg0.mode = __wbindgen_enum_RequestMode[arg1];
1037
1029
  },
1038
- __wbg_set_signal_0d93209e168efc85: function(arg0, arg1) {
1030
+ __wbg_set_signal_0ad1579122fc44a7: function(arg0, arg1) {
1039
1031
  arg0.signal = arg1;
1040
1032
  },
1041
- __wbg_signal_a0d9fead74a07e34: function(arg0) {
1033
+ __wbg_signal_147ce1e013d09714: function(arg0) {
1042
1034
  const ret = arg0.signal;
1043
1035
  return ret;
1044
1036
  },
1045
- __wbg_static_accessor_GLOBAL_280fe6a619bbfbf6: function() {
1046
- const ret = typeof global === 'undefined' ? null : global;
1037
+ __wbg_static_accessor_GLOBAL_THIS_14325d8cca34bb77: function() {
1038
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
1047
1039
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1048
1040
  },
1049
- __wbg_static_accessor_GLOBAL_THIS_12c1f4811ec605d1: function() {
1050
- const ret = typeof globalThis === 'undefined' ? null : globalThis;
1041
+ __wbg_static_accessor_GLOBAL_f3a1e69f9c5a7e8e: function() {
1042
+ const ret = typeof global === 'undefined' ? null : global;
1051
1043
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1052
1044
  },
1053
- __wbg_static_accessor_SELF_3a156961626f54d9: function() {
1045
+ __wbg_static_accessor_SELF_50cdb5b517789aca: function() {
1054
1046
  const ret = typeof self === 'undefined' ? null : self;
1055
1047
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1056
1048
  },
1057
- __wbg_static_accessor_WINDOW_210015b3eb6018a4: function() {
1049
+ __wbg_static_accessor_WINDOW_d6c4126e4c244380: function() {
1058
1050
  const ret = typeof window === 'undefined' ? null : window;
1059
1051
  return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1060
1052
  },
1061
- __wbg_status_1544422a8c64aef0: function(arg0) {
1053
+ __wbg_status_acf2080bc55aa324: function(arg0) {
1062
1054
  const ret = arg0.status;
1063
1055
  return ret;
1064
1056
  },
1065
- __wbg_subarray_a61f483a625b1793: function(arg0, arg1, arg2) {
1057
+ __wbg_subarray_7ad5f01d4a9c1c4d: function(arg0, arg1, arg2) {
1066
1058
  const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
1067
1059
  return ret;
1068
1060
  },
1069
- __wbg_text_667415a14b08e789: function() { return handleError(function (arg0) {
1061
+ __wbg_text_b1b162595ee5251d: function() { return handleError(function (arg0) {
1070
1062
  const ret = arg0.text();
1071
1063
  return ret;
1072
1064
  }, arguments); },
1073
- __wbg_then_5ce48a9e69c0d3cd: function(arg0, arg1) {
1074
- const ret = arg0.then(arg1);
1065
+ __wbg_then_d4163530723f56f4: function(arg0, arg1, arg2) {
1066
+ const ret = arg0.then(arg1, arg2);
1075
1067
  return ret;
1076
1068
  },
1077
- __wbg_then_f73127af3894d61c: function(arg0, arg1, arg2) {
1078
- const ret = arg0.then(arg1, arg2);
1069
+ __wbg_then_f1c954fe00733701: function(arg0, arg1) {
1070
+ const ret = arg0.then(arg1);
1079
1071
  return ret;
1080
1072
  },
1081
- __wbg_trace_62f38a2e54f4cc2a: function(arg0) {
1073
+ __wbg_trace_fe7b51ac14177e75: function(arg0) {
1082
1074
  console.trace(...arg0);
1083
1075
  },
1084
- __wbg_url_271945e420831f05: function(arg0, arg1) {
1076
+ __wbg_url_86ac63f11d20b46f: function(arg0, arg1) {
1085
1077
  const ret = arg1.url;
1086
1078
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1087
1079
  const len1 = WASM_VECTOR_LEN;
1088
1080
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1089
1081
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1090
1082
  },
1091
- __wbg_value_3e1fdb73e1353fb3: function(arg0) {
1083
+ __wbg_value_667dcb90597486a6: function(arg0) {
1092
1084
  const ret = arg0.value;
1093
1085
  return ret;
1094
1086
  },
@@ -1096,17 +1088,17 @@ function __wbg_get_imports() {
1096
1088
  const ret = arg0.versions;
1097
1089
  return ret;
1098
1090
  },
1099
- __wbg_warn_3af8b0e50ab410d5: function(arg0) {
1091
+ __wbg_warn_7639dad0f12218d7: function(arg0) {
1100
1092
  console.warn(...arg0);
1101
1093
  },
1102
1094
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
1103
- // Cast intrinsic for `Closure(Closure { dtor_idx: 577, function: Function { arguments: [], shim_idx: 578, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1104
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h6040ec9204f8ec90, wasm_bindgen__convert__closures_____invoke__h9354621fa201e4f1);
1095
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 581, function: Function { arguments: [], shim_idx: 582, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1096
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hd529f22c34389d0f, wasm_bindgen__convert__closures_____invoke__hbf3e188fe995424e);
1105
1097
  return ret;
1106
1098
  },
1107
1099
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
1108
- // Cast intrinsic for `Closure(Closure { dtor_idx: 621, function: Function { arguments: [Externref], shim_idx: 2034, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1109
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h5ca61ceeccdb4050, wasm_bindgen__convert__closures_____invoke__h662f8e0721b9d210);
1100
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 625, function: Function { arguments: [Externref], shim_idx: 2038, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1101
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h0bd98a3a1d60a5b1, wasm_bindgen__convert__closures_____invoke__h826419d66d164abb);
1110
1102
  return ret;
1111
1103
  },
1112
1104
  __wbindgen_cast_0000000000000003: function(arg0) {
@@ -1150,19 +1142,19 @@ function __wbg_get_imports() {
1150
1142
  };
1151
1143
  }
1152
1144
 
1153
- function wasm_bindgen__convert__closures_____invoke__h9354621fa201e4f1(arg0, arg1) {
1154
- wasm.wasm_bindgen__convert__closures_____invoke__h9354621fa201e4f1(arg0, arg1);
1145
+ function wasm_bindgen__convert__closures_____invoke__hbf3e188fe995424e(arg0, arg1) {
1146
+ wasm.wasm_bindgen__convert__closures_____invoke__hbf3e188fe995424e(arg0, arg1);
1155
1147
  }
1156
1148
 
1157
- function wasm_bindgen__convert__closures_____invoke__h662f8e0721b9d210(arg0, arg1, arg2) {
1158
- const ret = wasm.wasm_bindgen__convert__closures_____invoke__h662f8e0721b9d210(arg0, arg1, arg2);
1149
+ function wasm_bindgen__convert__closures_____invoke__h826419d66d164abb(arg0, arg1, arg2) {
1150
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h826419d66d164abb(arg0, arg1, arg2);
1159
1151
  if (ret[1]) {
1160
1152
  throw takeFromExternrefTable0(ret[0]);
1161
1153
  }
1162
1154
  }
1163
1155
 
1164
- function wasm_bindgen__convert__closures_____invoke__hd96d811f18675791(arg0, arg1, arg2, arg3) {
1165
- wasm.wasm_bindgen__convert__closures_____invoke__hd96d811f18675791(arg0, arg1, arg2, arg3);
1156
+ function wasm_bindgen__convert__closures_____invoke__h494d783032f4344f(arg0, arg1, arg2, arg3) {
1157
+ wasm.wasm_bindgen__convert__closures_____invoke__h494d783032f4344f(arg0, arg1, arg2, arg3);
1166
1158
  }
1167
1159
 
1168
1160
 
@@ -1396,7 +1388,15 @@ function takeFromExternrefTable0(idx) {
1396
1388
 
1397
1389
  let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1398
1390
  cachedTextDecoder.decode();
1391
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
1392
+ let numBytesDecoded = 0;
1399
1393
  function decodeText(ptr, len) {
1394
+ numBytesDecoded += len;
1395
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
1396
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
1397
+ cachedTextDecoder.decode();
1398
+ numBytesDecoded = len;
1399
+ }
1400
1400
  return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
1401
1401
  }
1402
1402
 
@@ -1415,8 +1415,95 @@ if (!('encodeInto' in cachedTextEncoder)) {
1415
1415
 
1416
1416
  let WASM_VECTOR_LEN = 0;
1417
1417
 
1418
- const wasmPath = `${__dirname}/cedarling_wasm_bg.wasm`;
1419
- const wasmBytes = require('fs').readFileSync(wasmPath);
1420
- const wasmModule = new WebAssembly.Module(wasmBytes);
1421
- let wasm = new WebAssembly.Instance(wasmModule, __wbg_get_imports()).exports;
1422
- wasm.__wbindgen_start();
1418
+ let wasmModule, wasm;
1419
+ function __wbg_finalize_init(instance, module) {
1420
+ wasm = instance.exports;
1421
+ wasmModule = module;
1422
+ cachedDataViewMemory0 = null;
1423
+ cachedUint8ArrayMemory0 = null;
1424
+ wasm.__wbindgen_start();
1425
+ return wasm;
1426
+ }
1427
+
1428
+ async function __wbg_load(module, imports) {
1429
+ if (typeof Response === 'function' && module instanceof Response) {
1430
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
1431
+ try {
1432
+ return await WebAssembly.instantiateStreaming(module, imports);
1433
+ } catch (e) {
1434
+ const validResponse = module.ok && expectedResponseType(module.type);
1435
+
1436
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
1437
+ 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);
1438
+
1439
+ } else { throw e; }
1440
+ }
1441
+ }
1442
+
1443
+ const bytes = await module.arrayBuffer();
1444
+ return await WebAssembly.instantiate(bytes, imports);
1445
+ } else {
1446
+ const instance = await WebAssembly.instantiate(module, imports);
1447
+
1448
+ if (instance instanceof WebAssembly.Instance) {
1449
+ return { instance, module };
1450
+ } else {
1451
+ return instance;
1452
+ }
1453
+ }
1454
+
1455
+ function expectedResponseType(type) {
1456
+ switch (type) {
1457
+ case 'basic': case 'cors': case 'default': return true;
1458
+ }
1459
+ return false;
1460
+ }
1461
+ }
1462
+
1463
+ function initSync(module) {
1464
+ if (wasm !== undefined) return wasm;
1465
+
1466
+
1467
+ if (module !== undefined) {
1468
+ if (Object.getPrototypeOf(module) === Object.prototype) {
1469
+ ({module} = module)
1470
+ } else {
1471
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
1472
+ }
1473
+ }
1474
+
1475
+ const imports = __wbg_get_imports();
1476
+ if (!(module instanceof WebAssembly.Module)) {
1477
+ module = new WebAssembly.Module(module);
1478
+ }
1479
+ const instance = new WebAssembly.Instance(module, imports);
1480
+ return __wbg_finalize_init(instance, module);
1481
+ }
1482
+
1483
+ async function __wbg_init(module_or_path) {
1484
+ if (wasm !== undefined) return wasm;
1485
+
1486
+
1487
+ if (module_or_path !== undefined) {
1488
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
1489
+ ({module_or_path} = module_or_path)
1490
+ } else {
1491
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
1492
+ }
1493
+ }
1494
+
1495
+ if (module_or_path === undefined) {
1496
+ module_or_path = new URL('cedarling_wasm_bg.wasm', import.meta.url);
1497
+ }
1498
+ const imports = __wbg_get_imports();
1499
+
1500
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
1501
+ module_or_path = fetch(module_or_path);
1502
+ }
1503
+
1504
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
1505
+
1506
+ return __wbg_finalize_init(instance, module);
1507
+ }
1508
+
1509
+ export { initSync, __wbg_init as default };
Binary file
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@janssenproject/cedarling_wasm",
3
+ "type": "module",
3
4
  "description": "The Cedarling is a performant local authorization service that runs the Rust Cedar Engine",
4
- "version": "0.0.312-nodejs",
5
+ "version": "0.0.313",
5
6
  "license": "Apache-2.0",
6
7
  "repository": {
7
8
  "type": "git",
@@ -13,5 +14,8 @@
13
14
  "cedarling_wasm.d.ts"
14
15
  ],
15
16
  "main": "cedarling_wasm.js",
16
- "types": "cedarling_wasm.d.ts"
17
+ "types": "cedarling_wasm.d.ts",
18
+ "sideEffects": [
19
+ "./snippets/*"
20
+ ]
17
21
  }