@leancodepl/kratos 7.8.2 → 8.1.0

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/index.esm.js CHANGED
@@ -3,7 +3,6 @@ import axios from 'axios';
3
3
  import { createContext, useContext, useMemo, useState, useCallback, useEffect } from 'react';
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
  import { ReplaySubject, map, shareReplay, Subject, switchMap, from, catchError, of } from 'rxjs';
6
- import { useLocation, useNavigate } from 'react-router';
7
6
  import { omit, isObject, isString } from 'lodash';
8
7
  import yn from 'yn';
9
8
 
@@ -159,7 +158,7 @@ function useKratosContext() {
159
158
  return context;
160
159
  }
161
160
 
162
- function _define_property$l(obj, key, value) {
161
+ function _define_property$p(obj, key, value) {
163
162
  if (key in obj) {
164
163
  Object.defineProperty(obj, key, {
165
164
  value: value,
@@ -172,7 +171,7 @@ function _define_property$l(obj, key, value) {
172
171
  }
173
172
  return obj;
174
173
  }
175
- function _object_spread$k(target) {
174
+ function _object_spread$o(target) {
176
175
  for(var i = 1; i < arguments.length; i++){
177
176
  var source = arguments[i] != null ? arguments[i] : {};
178
177
  var ownKeys = Object.keys(source);
@@ -182,30 +181,25 @@ function _object_spread$k(target) {
182
181
  }));
183
182
  }
184
183
  ownKeys.forEach(function(key) {
185
- _define_property$l(target, key, source[key]);
184
+ _define_property$p(target, key, source[key]);
186
185
  });
187
186
  }
188
187
  return target;
189
188
  }
190
- function ownKeys$b(object, enumerableOnly) {
189
+ function ownKeys$f(object, enumerableOnly) {
191
190
  var keys = Object.keys(object);
192
191
  if (Object.getOwnPropertySymbols) {
193
192
  var symbols = Object.getOwnPropertySymbols(object);
194
- if (enumerableOnly) {
195
- symbols = symbols.filter(function(sym) {
196
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
197
- });
198
- }
199
193
  keys.push.apply(keys, symbols);
200
194
  }
201
195
  return keys;
202
196
  }
203
- function _object_spread_props$b(target, source) {
197
+ function _object_spread_props$f(target, source) {
204
198
  source = source != null ? source : {};
205
199
  if (Object.getOwnPropertyDescriptors) {
206
200
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
207
201
  } else {
208
- ownKeys$b(Object(source)).forEach(function(key) {
202
+ ownKeys$f(Object(source)).forEach(function(key) {
209
203
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
210
204
  });
211
205
  }
@@ -242,12 +236,12 @@ function DefaultButtonComponent(_param) {
242
236
  var header = _param.header, props = _object_without_properties$7(_param, [
243
237
  "header"
244
238
  ]);
245
- return /*#__PURE__*/ jsx("button", _object_spread_props$b(_object_spread$k({}, props), {
239
+ return /*#__PURE__*/ jsx("button", _object_spread_props$f(_object_spread$o({}, props), {
246
240
  children: header
247
241
  }));
248
242
  }
249
243
 
250
- function _define_property$k(obj, key, value) {
244
+ function _define_property$o(obj, key, value) {
251
245
  if (key in obj) {
252
246
  Object.defineProperty(obj, key, {
253
247
  value: value,
@@ -260,7 +254,7 @@ function _define_property$k(obj, key, value) {
260
254
  }
261
255
  return obj;
262
256
  }
263
- function _object_spread$j(target) {
257
+ function _object_spread$n(target) {
264
258
  for(var i = 1; i < arguments.length; i++){
265
259
  var source = arguments[i] != null ? arguments[i] : {};
266
260
  var ownKeys = Object.keys(source);
@@ -270,30 +264,25 @@ function _object_spread$j(target) {
270
264
  }));
271
265
  }
272
266
  ownKeys.forEach(function(key) {
273
- _define_property$k(target, key, source[key]);
267
+ _define_property$o(target, key, source[key]);
274
268
  });
275
269
  }
276
270
  return target;
277
271
  }
278
- function ownKeys$a(object, enumerableOnly) {
272
+ function ownKeys$e(object, enumerableOnly) {
279
273
  var keys = Object.keys(object);
280
274
  if (Object.getOwnPropertySymbols) {
281
275
  var symbols = Object.getOwnPropertySymbols(object);
282
- if (enumerableOnly) {
283
- symbols = symbols.filter(function(sym) {
284
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
285
- });
286
- }
287
276
  keys.push.apply(keys, symbols);
288
277
  }
289
278
  return keys;
290
279
  }
291
- function _object_spread_props$a(target, source) {
280
+ function _object_spread_props$e(target, source) {
292
281
  source = source != null ? source : {};
293
282
  if (Object.getOwnPropertyDescriptors) {
294
283
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
295
284
  } else {
296
- ownKeys$a(Object(source)).forEach(function(key) {
285
+ ownKeys$e(Object(source)).forEach(function(key) {
297
286
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
298
287
  });
299
288
  }
@@ -335,7 +324,7 @@ function DefaultCheckboxComponent(_param) {
335
324
  children: [
336
325
  /*#__PURE__*/ jsxs("label", {
337
326
  children: [
338
- /*#__PURE__*/ jsx("input", _object_spread_props$a(_object_spread$j({}, props), {
327
+ /*#__PURE__*/ jsx("input", _object_spread_props$e(_object_spread$n({}, props), {
339
328
  type: "checkbox"
340
329
  })),
341
330
  label
@@ -346,7 +335,7 @@ function DefaultCheckboxComponent(_param) {
346
335
  });
347
336
  }
348
337
 
349
- function _define_property$j(obj, key, value) {
338
+ function _define_property$n(obj, key, value) {
350
339
  if (key in obj) {
351
340
  Object.defineProperty(obj, key, {
352
341
  value: value,
@@ -359,7 +348,7 @@ function _define_property$j(obj, key, value) {
359
348
  }
360
349
  return obj;
361
350
  }
362
- function _object_spread$i(target) {
351
+ function _object_spread$m(target) {
363
352
  for(var i = 1; i < arguments.length; i++){
364
353
  var source = arguments[i] != null ? arguments[i] : {};
365
354
  var ownKeys = Object.keys(source);
@@ -369,7 +358,7 @@ function _object_spread$i(target) {
369
358
  }));
370
359
  }
371
360
  ownKeys.forEach(function(key) {
372
- _define_property$j(target, key, source[key]);
361
+ _define_property$n(target, key, source[key]);
373
362
  });
374
363
  }
375
364
  return target;
@@ -410,12 +399,12 @@ function DefaultImageComponent(_param) {
410
399
  header && /*#__PURE__*/ jsx("p", {
411
400
  children: header
412
401
  }),
413
- /*#__PURE__*/ jsx("img", _object_spread$i({}, props))
402
+ /*#__PURE__*/ jsx("img", _object_spread$m({}, props))
414
403
  ]
415
404
  });
416
405
  }
417
406
 
418
- function _define_property$i(obj, key, value) {
407
+ function _define_property$m(obj, key, value) {
419
408
  if (key in obj) {
420
409
  Object.defineProperty(obj, key, {
421
410
  value: value,
@@ -428,7 +417,7 @@ function _define_property$i(obj, key, value) {
428
417
  }
429
418
  return obj;
430
419
  }
431
- function _object_spread$h(target) {
420
+ function _object_spread$l(target) {
432
421
  for(var i = 1; i < arguments.length; i++){
433
422
  var source = arguments[i] != null ? arguments[i] : {};
434
423
  var ownKeys = Object.keys(source);
@@ -438,7 +427,7 @@ function _object_spread$h(target) {
438
427
  }));
439
428
  }
440
429
  ownKeys.forEach(function(key) {
441
- _define_property$i(target, key, source[key]);
430
+ _define_property$m(target, key, source[key]);
442
431
  });
443
432
  }
444
433
  return target;
@@ -482,7 +471,7 @@ function DefaultInputComponent(_param) {
482
471
  header && /*#__PURE__*/ jsx("p", {
483
472
  children: header
484
473
  }),
485
- /*#__PURE__*/ jsx("input", _object_spread$h({}, props))
474
+ /*#__PURE__*/ jsx("input", _object_spread$l({}, props))
486
475
  ]
487
476
  }),
488
477
  helperMessage
@@ -490,7 +479,7 @@ function DefaultInputComponent(_param) {
490
479
  });
491
480
  }
492
481
 
493
- function _define_property$h(obj, key, value) {
482
+ function _define_property$l(obj, key, value) {
494
483
  if (key in obj) {
495
484
  Object.defineProperty(obj, key, {
496
485
  value: value,
@@ -503,7 +492,7 @@ function _define_property$h(obj, key, value) {
503
492
  }
504
493
  return obj;
505
494
  }
506
- function _object_spread$g(target) {
495
+ function _object_spread$k(target) {
507
496
  for(var i = 1; i < arguments.length; i++){
508
497
  var source = arguments[i] != null ? arguments[i] : {};
509
498
  var ownKeys = Object.keys(source);
@@ -513,7 +502,7 @@ function _object_spread$g(target) {
513
502
  }));
514
503
  }
515
504
  ownKeys.forEach(function(key) {
516
- _define_property$h(target, key, source[key]);
505
+ _define_property$l(target, key, source[key]);
517
506
  });
518
507
  }
519
508
  return target;
@@ -550,12 +539,11 @@ function DefaultLinkComponent(_param) {
550
539
  "href"
551
540
  ]);
552
541
  // eslint-disable-next-line jsx-a11y/anchor-has-content
553
- return /*#__PURE__*/ jsx("a", _object_spread$g({}, props));
542
+ return /*#__PURE__*/ jsx("a", _object_spread$k({}, props));
554
543
  }
555
544
 
556
545
  function DefaultMessageComponent(param) {
557
546
  var children = param.children;
558
- // eslint-disable-next-line react/jsx-no-useless-fragment
559
547
  return /*#__PURE__*/ jsx(Fragment, {
560
548
  children: children
561
549
  });
@@ -568,7 +556,7 @@ function DefaultMessageFormatComponent(param) {
568
556
  });
569
557
  }
570
558
 
571
- function _define_property$g(obj, key, value) {
559
+ function _define_property$k(obj, key, value) {
572
560
  if (key in obj) {
573
561
  Object.defineProperty(obj, key, {
574
562
  value: value,
@@ -581,7 +569,7 @@ function _define_property$g(obj, key, value) {
581
569
  }
582
570
  return obj;
583
571
  }
584
- function _object_spread$f(target) {
572
+ function _object_spread$j(target) {
585
573
  for(var i = 1; i < arguments.length; i++){
586
574
  var source = arguments[i] != null ? arguments[i] : {};
587
575
  var ownKeys = Object.keys(source);
@@ -591,7 +579,7 @@ function _object_spread$f(target) {
591
579
  }));
592
580
  }
593
581
  ownKeys.forEach(function(key) {
594
- _define_property$g(target, key, source[key]);
582
+ _define_property$k(target, key, source[key]);
595
583
  });
596
584
  }
597
585
  return target;
@@ -600,7 +588,7 @@ function FormattedMessage(param) {
600
588
  var message = param.message;
601
589
  var _useKratosContext = useKratosContext(), MessageFormat = _useKratosContext.components.MessageFormat;
602
590
  if (!message) return null;
603
- return /*#__PURE__*/ jsx(MessageFormat, _object_spread$f({}, message));
591
+ return /*#__PURE__*/ jsx(MessageFormat, _object_spread$j({}, message));
604
592
  }
605
593
 
606
594
  function DefaultTextComponent(param) {
@@ -623,15 +611,15 @@ function DefaultTextComponent(param) {
623
611
  });
624
612
  }
625
613
 
626
- function _array_like_to_array$8(arr, len) {
614
+ function _array_like_to_array$7(arr, len) {
627
615
  if (len == null || len > arr.length) len = arr.length;
628
616
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
629
617
  return arr2;
630
618
  }
631
619
  function _array_without_holes$1(arr) {
632
- if (Array.isArray(arr)) return _array_like_to_array$8(arr);
620
+ if (Array.isArray(arr)) return _array_like_to_array$7(arr);
633
621
  }
634
- function _define_property$f(obj, key, value) {
622
+ function _define_property$j(obj, key, value) {
635
623
  if (key in obj) {
636
624
  Object.defineProperty(obj, key, {
637
625
  value: value,
@@ -650,7 +638,7 @@ function _iterable_to_array$1(iter) {
650
638
  function _non_iterable_spread$1() {
651
639
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
652
640
  }
653
- function _object_spread$e(target) {
641
+ function _object_spread$i(target) {
654
642
  for(var i = 1; i < arguments.length; i++){
655
643
  var source = arguments[i] != null ? arguments[i] : {};
656
644
  var ownKeys = Object.keys(source);
@@ -660,30 +648,25 @@ function _object_spread$e(target) {
660
648
  }));
661
649
  }
662
650
  ownKeys.forEach(function(key) {
663
- _define_property$f(target, key, source[key]);
651
+ _define_property$j(target, key, source[key]);
664
652
  });
665
653
  }
666
654
  return target;
667
655
  }
668
- function ownKeys$9(object, enumerableOnly) {
656
+ function ownKeys$d(object, enumerableOnly) {
669
657
  var keys = Object.keys(object);
670
658
  if (Object.getOwnPropertySymbols) {
671
659
  var symbols = Object.getOwnPropertySymbols(object);
672
- if (enumerableOnly) {
673
- symbols = symbols.filter(function(sym) {
674
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
675
- });
676
- }
677
660
  keys.push.apply(keys, symbols);
678
661
  }
679
662
  return keys;
680
663
  }
681
- function _object_spread_props$9(target, source) {
664
+ function _object_spread_props$d(target, source) {
682
665
  source = source != null ? source : {};
683
666
  if (Object.getOwnPropertyDescriptors) {
684
667
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
685
668
  } else {
686
- ownKeys$9(Object(source)).forEach(function(key) {
669
+ ownKeys$d(Object(source)).forEach(function(key) {
687
670
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
688
671
  });
689
672
  }
@@ -717,22 +700,22 @@ function _object_without_properties_loose$2(source, excluded) {
717
700
  return target;
718
701
  }
719
702
  function _to_consumable_array$1(arr) {
720
- return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$8(arr) || _non_iterable_spread$1();
703
+ return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$7(arr) || _non_iterable_spread$1();
721
704
  }
722
- function _unsupported_iterable_to_array$8(o, minLen) {
705
+ function _unsupported_iterable_to_array$7(o, minLen) {
723
706
  if (!o) return;
724
- if (typeof o === "string") return _array_like_to_array$8(o, minLen);
707
+ if (typeof o === "string") return _array_like_to_array$7(o, minLen);
725
708
  var n = Object.prototype.toString.call(o).slice(8, -1);
726
709
  if (n === "Object" && o.constructor) n = o.constructor.name;
727
710
  if (n === "Map" || n === "Set") return Array.from(n);
728
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
711
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
729
712
  }
730
713
  function NodeMessage(_param) {
731
714
  var message = _param.message, props = _object_without_properties$2(_param, [
732
715
  "message"
733
716
  ]);
734
717
  var _useKratosContext = useKratosContext(), Message = _useKratosContext.components.Message;
735
- return /*#__PURE__*/ jsx(Message, _object_spread_props$9(_object_spread$e({
718
+ return /*#__PURE__*/ jsx(Message, _object_spread_props$d(_object_spread$i({
736
719
  message: message,
737
720
  severity: message.type
738
721
  }, props), {
@@ -767,7 +750,7 @@ function NodeMessages(param) {
767
750
  });
768
751
  }
769
752
 
770
- function _define_property$e(obj, key, value) {
753
+ function _define_property$i(obj, key, value) {
771
754
  if (key in obj) {
772
755
  Object.defineProperty(obj, key, {
773
756
  value: value,
@@ -780,7 +763,7 @@ function _define_property$e(obj, key, value) {
780
763
  }
781
764
  return obj;
782
765
  }
783
- function _object_spread$d(target) {
766
+ function _object_spread$h(target) {
784
767
  for(var i = 1; i < arguments.length; i++){
785
768
  var source = arguments[i] != null ? arguments[i] : {};
786
769
  var ownKeys = Object.keys(source);
@@ -790,13 +773,13 @@ function _object_spread$d(target) {
790
773
  }));
791
774
  }
792
775
  ownKeys.forEach(function(key) {
793
- _define_property$e(target, key, source[key]);
776
+ _define_property$i(target, key, source[key]);
794
777
  });
795
778
  }
796
779
  return target;
797
780
  }
798
781
  function DefaultUiMessagesComponent(props) {
799
- return /*#__PURE__*/ jsx(NodeMessages, _object_spread$d({}, props));
782
+ return /*#__PURE__*/ jsx(NodeMessages, _object_spread$h({}, props));
800
783
  }
801
784
 
802
785
  var defaultComponents = {
@@ -826,7 +809,7 @@ var defaultComponents = {
826
809
  ProfileRegistrationSectionWrapper: "div"
827
810
  };
828
811
 
829
- function _define_property$d(obj, key, value) {
812
+ function _define_property$h(obj, key, value) {
830
813
  if (key in obj) {
831
814
  Object.defineProperty(obj, key, {
832
815
  value: value,
@@ -839,7 +822,7 @@ function _define_property$d(obj, key, value) {
839
822
  }
840
823
  return obj;
841
824
  }
842
- function _object_spread$c(target) {
825
+ function _object_spread$g(target) {
843
826
  for(var i = 1; i < arguments.length; i++){
844
827
  var source = arguments[i] != null ? arguments[i] : {};
845
828
  var ownKeys = Object.keys(source);
@@ -849,7 +832,7 @@ function _object_spread$c(target) {
849
832
  }));
850
833
  }
851
834
  ownKeys.forEach(function(key) {
852
- _define_property$d(target, key, source[key]);
835
+ _define_property$h(target, key, source[key]);
853
836
  });
854
837
  }
855
838
  return target;
@@ -859,7 +842,7 @@ function KratosContextProvider(param) {
859
842
  var _useContext = useContext(kratosContext), baseComponents = _useContext.components, baseUseHandleFlowError = _useContext.useHandleFlowError, baseExcludeScripts = _useContext.excludeScripts;
860
843
  var value = useMemo(function() {
861
844
  return {
862
- components: _object_spread$c({}, baseComponents !== null && baseComponents !== void 0 ? baseComponents : defaultComponents, components),
845
+ components: _object_spread$g({}, baseComponents !== null && baseComponents !== void 0 ? baseComponents : defaultComponents, components),
863
846
  useHandleFlowError: useHandleFlowError !== null && useHandleFlowError !== void 0 ? useHandleFlowError : baseUseHandleFlowError,
864
847
  excludeScripts: excludeScripts !== null && excludeScripts !== void 0 ? excludeScripts : baseExcludeScripts
865
848
  };
@@ -880,6 +863,7 @@ function KratosContextProvider(param) {
880
863
  var returnToParameterName = "return_to";
881
864
  var aalParameterName = "aal";
882
865
  var flowIdParameterName = "flow";
866
+ var refreshParameterName = "refresh";
883
867
 
884
868
  // https://pkg.go.dev/github.com/ory/kratos/text#pkg-types
885
869
  var ErrorId;
@@ -916,10 +900,9 @@ function _defineProperties(target, props) {
916
900
  }
917
901
  function _create_class(Constructor, protoProps, staticProps) {
918
902
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
919
- if (staticProps) _defineProperties(Constructor, staticProps);
920
903
  return Constructor;
921
904
  }
922
- function _define_property$c(obj, key, value) {
905
+ function _define_property$g(obj, key, value) {
923
906
  if (key in obj) {
924
907
  Object.defineProperty(obj, key, {
925
908
  value: value,
@@ -936,19 +919,19 @@ var BaseSessionManager = /*#__PURE__*/ function() {
936
919
  function BaseSessionManager(authUrl, loginRoute) {
937
920
  var _this = this;
938
921
  _class_call_check(this, BaseSessionManager);
939
- _define_property$c(this, "authUrl", void 0);
940
- _define_property$c(this, "loginRoute", void 0);
941
- _define_property$c(this, "session$", new ReplaySubject(1));
942
- _define_property$c(this, "isLoggedIn", this.session$.pipe(map(function(session) {
922
+ _define_property$g(this, "authUrl", void 0);
923
+ _define_property$g(this, "loginRoute", void 0);
924
+ _define_property$g(this, "session$", new ReplaySubject(1));
925
+ _define_property$g(this, "isLoggedIn", this.session$.pipe(map(function(session) {
943
926
  return !!(session === null || session === void 0 ? void 0 : session.active);
944
927
  }), shareReplay(1)));
945
- _define_property$c(this, "identity$", this.session$.pipe(map(function(session) {
928
+ _define_property$g(this, "identity$", this.session$.pipe(map(function(session) {
946
929
  return session === null || session === void 0 ? void 0 : session.identity;
947
930
  }), shareReplay(1)));
948
- _define_property$c(this, "userId$", this.identity$.pipe(map(function(identity) {
931
+ _define_property$g(this, "userId$", this.identity$.pipe(map(function(identity) {
949
932
  return identity === null || identity === void 0 ? void 0 : identity.id;
950
933
  }), shareReplay(1)));
951
- _define_property$c(this, "checkIfLoggedIn", function() {
934
+ _define_property$g(this, "checkIfLoggedIn", function() {
952
935
  var fetchSubject = new Subject();
953
936
  fetchSubject.pipe(switchMap(function() {
954
937
  return from(axios.get("".concat(_this.authUrl, "/sessions/whoami"), {
@@ -976,7 +959,7 @@ var BaseSessionManager = /*#__PURE__*/ function() {
976
959
  redirectUrl.search = searchParams1.toString();
977
960
  } else {
978
961
  var _obj;
979
- redirectUrl.search = new URLSearchParams((_obj = {}, _define_property$c(_obj, aalParameterName, AuthenticatorAssuranceLevel.Aal2), _define_property$c(_obj, returnToParameterName, "".concat(window.location.pathname).concat(window.location.search)), _obj)).toString();
962
+ redirectUrl.search = new URLSearchParams((_obj = {}, _define_property$g(_obj, aalParameterName, AuthenticatorAssuranceLevel.Aal2), _define_property$g(_obj, returnToParameterName, "".concat(window.location.pathname).concat(window.location.search)), _obj)).toString();
980
963
  }
981
964
  window.location.href = redirectUrl.toString();
982
965
  }
@@ -1355,15 +1338,15 @@ function _handleCancelError() {
1355
1338
  return _handleCancelError.apply(this, arguments);
1356
1339
  }
1357
1340
 
1358
- function _array_like_to_array$7(arr, len) {
1341
+ function _array_like_to_array$6(arr, len) {
1359
1342
  if (len == null || len > arr.length) len = arr.length;
1360
1343
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1361
1344
  return arr2;
1362
1345
  }
1363
- function _array_with_holes$6(arr) {
1346
+ function _array_with_holes$5(arr) {
1364
1347
  if (Array.isArray(arr)) return arr;
1365
1348
  }
1366
- function _iterable_to_array_limit$6(arr, i) {
1349
+ function _iterable_to_array_limit$5(arr, i) {
1367
1350
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1368
1351
  if (_i == null) return;
1369
1352
  var _arr = [];
@@ -1387,24 +1370,24 @@ function _iterable_to_array_limit$6(arr, i) {
1387
1370
  }
1388
1371
  return _arr;
1389
1372
  }
1390
- function _non_iterable_rest$6() {
1373
+ function _non_iterable_rest$5() {
1391
1374
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1392
1375
  }
1393
- function _sliced_to_array$6(arr, i) {
1394
- return _array_with_holes$6(arr) || _iterable_to_array_limit$6(arr, i) || _unsupported_iterable_to_array$7(arr, i) || _non_iterable_rest$6();
1376
+ function _sliced_to_array$5(arr, i) {
1377
+ return _array_with_holes$5(arr) || _iterable_to_array_limit$5(arr, i) || _unsupported_iterable_to_array$6(arr, i) || _non_iterable_rest$5();
1395
1378
  }
1396
- function _unsupported_iterable_to_array$7(o, minLen) {
1379
+ function _unsupported_iterable_to_array$6(o, minLen) {
1397
1380
  if (!o) return;
1398
- if (typeof o === "string") return _array_like_to_array$7(o, minLen);
1381
+ if (typeof o === "string") return _array_like_to_array$6(o, minLen);
1399
1382
  var n = Object.prototype.toString.call(o).slice(8, -1);
1400
1383
  if (n === "Object" && o.constructor) n = o.constructor.name;
1401
1384
  if (n === "Map" || n === "Set") return Array.from(n);
1402
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
1385
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
1403
1386
  }
1404
1387
  function useReauthenticationFlow(param) {
1405
1388
  var kratosClient = param.kratosClient, onReauthenticated = param.onReauthenticated;
1406
1389
  var useHandleFlowError = useKratosContext().useHandleFlowError;
1407
- var _useState = _sliced_to_array$6(useState(), 2), flow = _useState[0], setFlow = _useState[1];
1390
+ var _useState = _sliced_to_array$5(useState(), 2), flow = _useState[0], setFlow = _useState[1];
1408
1391
  var handleFlowError = useHandleFlowError({
1409
1392
  resetFlow: useCallback(function() {
1410
1393
  return void setFlow(undefined);
@@ -1459,15 +1442,28 @@ function useReauthenticationFlow(param) {
1459
1442
  };
1460
1443
  }
1461
1444
 
1462
- function _array_like_to_array$6(arr, len) {
1445
+ function _array_like_to_array$5(arr, len) {
1463
1446
  if (len == null || len > arr.length) len = arr.length;
1464
1447
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1465
1448
  return arr2;
1466
1449
  }
1467
- function _array_with_holes$5(arr) {
1450
+ function _array_with_holes$4(arr) {
1468
1451
  if (Array.isArray(arr)) return arr;
1469
1452
  }
1470
- function _iterable_to_array_limit$5(arr, i) {
1453
+ function _define_property$f(obj, key, value) {
1454
+ if (key in obj) {
1455
+ Object.defineProperty(obj, key, {
1456
+ value: value,
1457
+ enumerable: true,
1458
+ configurable: true,
1459
+ writable: true
1460
+ });
1461
+ } else {
1462
+ obj[key] = value;
1463
+ }
1464
+ return obj;
1465
+ }
1466
+ function _iterable_to_array_limit$4(arr, i) {
1471
1467
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1472
1468
  if (_i == null) return;
1473
1469
  var _arr = [];
@@ -1491,80 +1487,42 @@ function _iterable_to_array_limit$5(arr, i) {
1491
1487
  }
1492
1488
  return _arr;
1493
1489
  }
1494
- function _non_iterable_rest$5() {
1490
+ function _non_iterable_rest$4() {
1495
1491
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1496
1492
  }
1497
- function _sliced_to_array$5(arr, i) {
1498
- return _array_with_holes$5(arr) || _iterable_to_array_limit$5(arr, i) || _unsupported_iterable_to_array$6(arr, i) || _non_iterable_rest$5();
1499
- }
1500
- function _unsupported_iterable_to_array$6(o, minLen) {
1501
- if (!o) return;
1502
- if (typeof o === "string") return _array_like_to_array$6(o, minLen);
1503
- var n = Object.prototype.toString.call(o).slice(8, -1);
1504
- if (n === "Object" && o.constructor) n = o.constructor.name;
1505
- if (n === "Map" || n === "Set") return Array.from(n);
1506
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
1507
- }
1508
- function parseSearchParams(search) {
1509
- var resultObject = {};
1510
- var searchParams = new URLSearchParams(search);
1511
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
1512
- try {
1513
- for(var _iterator = searchParams.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
1514
- var _step_value = _sliced_to_array$5(_step.value, 2), key = _step_value[0], value = _step_value[1];
1515
- resultObject[key] = value;
1516
- }
1517
- } catch (err) {
1518
- _didIteratorError = true;
1519
- _iteratorError = err;
1520
- } finally{
1521
- try {
1522
- if (!_iteratorNormalCompletion && _iterator.return != null) {
1523
- _iterator.return();
1524
- }
1525
- } finally{
1526
- if (_didIteratorError) {
1527
- throw _iteratorError;
1528
- }
1493
+ function _object_spread$f(target) {
1494
+ for(var i = 1; i < arguments.length; i++){
1495
+ var source = arguments[i] != null ? arguments[i] : {};
1496
+ var ownKeys = Object.keys(source);
1497
+ if (typeof Object.getOwnPropertySymbols === "function") {
1498
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
1499
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1500
+ }));
1529
1501
  }
1502
+ ownKeys.forEach(function(key) {
1503
+ _define_property$f(target, key, source[key]);
1504
+ });
1530
1505
  }
1531
- return resultObject;
1532
- }
1533
-
1534
- function _array_like_to_array$5(arr, len) {
1535
- if (len == null || len > arr.length) len = arr.length;
1536
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1537
- return arr2;
1538
- }
1539
- function _array_with_holes$4(arr) {
1540
- if (Array.isArray(arr)) return arr;
1506
+ return target;
1541
1507
  }
1542
- function _iterable_to_array_limit$4(arr, i) {
1543
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1544
- if (_i == null) return;
1545
- var _arr = [];
1546
- var _n = true;
1547
- var _d = false;
1548
- var _s, _e;
1549
- try {
1550
- for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
1551
- _arr.push(_s.value);
1552
- if (i && _arr.length === i) break;
1553
- }
1554
- } catch (err) {
1555
- _d = true;
1556
- _e = err;
1557
- } finally{
1558
- try {
1559
- if (!_n && _i["return"] != null) _i["return"]();
1560
- } finally{
1561
- if (_d) throw _e;
1562
- }
1508
+ function ownKeys$c(object, enumerableOnly) {
1509
+ var keys = Object.keys(object);
1510
+ if (Object.getOwnPropertySymbols) {
1511
+ var symbols = Object.getOwnPropertySymbols(object);
1512
+ keys.push.apply(keys, symbols);
1563
1513
  }
1564
- return _arr;
1514
+ return keys;
1565
1515
  }
1566
- function _non_iterable_rest$4() {
1567
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1516
+ function _object_spread_props$c(target, source) {
1517
+ source = source != null ? source : {};
1518
+ if (Object.getOwnPropertyDescriptors) {
1519
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1520
+ } else {
1521
+ ownKeys$c(Object(source)).forEach(function(key) {
1522
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1523
+ });
1524
+ }
1525
+ return target;
1568
1526
  }
1569
1527
  function _sliced_to_array$4(arr, i) {
1570
1528
  return _array_with_holes$4(arr) || _iterable_to_array_limit$4(arr, i) || _unsupported_iterable_to_array$5(arr, i) || _non_iterable_rest$4();
@@ -1578,25 +1536,20 @@ function _unsupported_iterable_to_array$5(o, minLen) {
1578
1536
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
1579
1537
  }
1580
1538
  function useRecoveryFlow(param) {
1581
- var kratosClient = param.kratosClient, recoveryRoute = param.recoveryRoute, onSessionAlreadyAvailable = param.onSessionAlreadyAvailable, onContinueWith = param.onContinueWith;
1539
+ var kratosClient = param.kratosClient, onSessionAlreadyAvailable = param.onSessionAlreadyAvailable, onContinueWith = param.onContinueWith, _param_searchParams = param.searchParams, searchParams = _param_searchParams === void 0 ? {} : _param_searchParams, updateSearchParams = param.updateSearchParams;
1582
1540
  var useHandleFlowError = useKratosContext().useHandleFlowError;
1583
1541
  var _useState = _sliced_to_array$4(useState(), 2), flow = _useState[0], setFlow = _useState[1];
1584
- var search = useLocation().search;
1585
- var nav = useNavigate();
1586
- var _useMemo = useMemo(function() {
1587
- return parseSearchParams(search);
1588
- }, [
1589
- search
1590
- ]), flowId = _useMemo[flowIdParameterName], returnTo = _useMemo[returnToParameterName];
1542
+ var flowId = searchParams[flowIdParameterName], returnTo = searchParams[returnToParameterName];
1591
1543
  var handleFlowError = useHandleFlowError({
1592
1544
  resetFlow: useCallback(function() {
1593
- nav(recoveryRoute, {
1594
- replace: true
1595
- });
1545
+ var newParams = omit(_object_spread$f({}, searchParams), [
1546
+ flowIdParameterName
1547
+ ]);
1548
+ updateSearchParams(newParams);
1596
1549
  setFlow(undefined);
1597
1550
  }, [
1598
- nav,
1599
- recoveryRoute
1551
+ searchParams,
1552
+ updateSearchParams
1600
1553
  ]),
1601
1554
  onSessionAlreadyAvailable: onSessionAlreadyAvailable
1602
1555
  });
@@ -1631,15 +1584,12 @@ function useRecoveryFlow(param) {
1631
1584
  returnTo,
1632
1585
  flow,
1633
1586
  handleFlowError,
1634
- kratosClient,
1635
- nav
1587
+ kratosClient
1636
1588
  ]);
1637
1589
  var submit = useCallback(function(param) {
1638
1590
  var body = param.body;
1639
1591
  if (!flow) return;
1640
- nav("".concat(recoveryRoute, "?").concat(flowIdParameterName, "=").concat(flow.id), {
1641
- replace: true
1642
- });
1592
+ updateSearchParams(_object_spread_props$c(_object_spread$f({}, searchParams), _define_property$f({}, flowIdParameterName, flow.id)));
1643
1593
  return kratosClient.updateRecoveryFlow({
1644
1594
  flow: flow.id,
1645
1595
  updateRecoveryFlowBody: body
@@ -1660,8 +1610,8 @@ function useRecoveryFlow(param) {
1660
1610
  });
1661
1611
  }, [
1662
1612
  flow,
1663
- nav,
1664
- recoveryRoute,
1613
+ updateSearchParams,
1614
+ searchParams,
1665
1615
  kratosClient,
1666
1616
  handleFlowError,
1667
1617
  onContinueWith
@@ -1681,6 +1631,19 @@ function _array_like_to_array$4(arr, len) {
1681
1631
  function _array_with_holes$3(arr) {
1682
1632
  if (Array.isArray(arr)) return arr;
1683
1633
  }
1634
+ function _define_property$e(obj, key, value) {
1635
+ if (key in obj) {
1636
+ Object.defineProperty(obj, key, {
1637
+ value: value,
1638
+ enumerable: true,
1639
+ configurable: true,
1640
+ writable: true
1641
+ });
1642
+ } else {
1643
+ obj[key] = value;
1644
+ }
1645
+ return obj;
1646
+ }
1684
1647
  function _iterable_to_array_limit$3(arr, i) {
1685
1648
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1686
1649
  if (_i == null) return;
@@ -1708,6 +1671,40 @@ function _iterable_to_array_limit$3(arr, i) {
1708
1671
  function _non_iterable_rest$3() {
1709
1672
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1710
1673
  }
1674
+ function _object_spread$e(target) {
1675
+ for(var i = 1; i < arguments.length; i++){
1676
+ var source = arguments[i] != null ? arguments[i] : {};
1677
+ var ownKeys = Object.keys(source);
1678
+ if (typeof Object.getOwnPropertySymbols === "function") {
1679
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
1680
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1681
+ }));
1682
+ }
1683
+ ownKeys.forEach(function(key) {
1684
+ _define_property$e(target, key, source[key]);
1685
+ });
1686
+ }
1687
+ return target;
1688
+ }
1689
+ function ownKeys$b(object, enumerableOnly) {
1690
+ var keys = Object.keys(object);
1691
+ if (Object.getOwnPropertySymbols) {
1692
+ var symbols = Object.getOwnPropertySymbols(object);
1693
+ keys.push.apply(keys, symbols);
1694
+ }
1695
+ return keys;
1696
+ }
1697
+ function _object_spread_props$b(target, source) {
1698
+ source = source != null ? source : {};
1699
+ if (Object.getOwnPropertyDescriptors) {
1700
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1701
+ } else {
1702
+ ownKeys$b(Object(source)).forEach(function(key) {
1703
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1704
+ });
1705
+ }
1706
+ return target;
1707
+ }
1711
1708
  function _sliced_to_array$3(arr, i) {
1712
1709
  return _array_with_holes$3(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$4(arr, i) || _non_iterable_rest$3();
1713
1710
  }
@@ -1720,25 +1717,20 @@ function _unsupported_iterable_to_array$4(o, minLen) {
1720
1717
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
1721
1718
  }
1722
1719
  function useSettingsFlow(param) {
1723
- var kratosClient = param.kratosClient, settingsRoute = param.settingsRoute, params = param.params, onContinueWith = param.onContinueWith;
1720
+ var kratosClient = param.kratosClient, params = param.params, onContinueWith = param.onContinueWith, _param_searchParams = param.searchParams, searchParams = _param_searchParams === void 0 ? {} : _param_searchParams, updateSearchParams = param.updateSearchParams;
1724
1721
  var useHandleFlowError = useKratosContext().useHandleFlowError;
1725
1722
  var _useState = _sliced_to_array$3(useState(), 2), flow = _useState[0], setFlow = _useState[1];
1726
- var search = useLocation().search;
1727
- var nav = useNavigate();
1728
- var _useMemo = useMemo(function() {
1729
- return parseSearchParams(search);
1730
- }, [
1731
- search
1732
- ]), flowId = _useMemo[flowIdParameterName], returnTo = _useMemo[returnToParameterName];
1723
+ var flowId = searchParams[flowIdParameterName], returnTo = searchParams[returnToParameterName];
1733
1724
  var handleFlowError = useHandleFlowError({
1734
1725
  resetFlow: useCallback(function() {
1735
- nav(settingsRoute, {
1736
- replace: true
1737
- });
1726
+ var newParams = omit(_object_spread$e({}, searchParams), [
1727
+ flowIdParameterName
1728
+ ]);
1729
+ updateSearchParams(newParams);
1738
1730
  setFlow(undefined);
1739
1731
  }, [
1740
- nav,
1741
- settingsRoute
1732
+ searchParams,
1733
+ updateSearchParams
1742
1734
  ])
1743
1735
  });
1744
1736
  useEffect(function() {
@@ -1773,15 +1765,12 @@ function useSettingsFlow(param) {
1773
1765
  handleFlowError,
1774
1766
  kratosClient,
1775
1767
  params,
1776
- returnTo,
1777
- settingsRoute
1768
+ returnTo
1778
1769
  ]);
1779
1770
  var submit = useCallback(function(param) {
1780
1771
  var body = param.body;
1781
1772
  if (!flow) return;
1782
- nav("".concat(settingsRoute, "?").concat(flowIdParameterName, "=").concat(flow.id), {
1783
- replace: true
1784
- });
1773
+ updateSearchParams(_object_spread_props$b(_object_spread$e({}, searchParams), _define_property$e({}, flowIdParameterName, flow.id)));
1785
1774
  return kratosClient.updateSettingsFlow({
1786
1775
  flow: flow.id,
1787
1776
  updateSettingsFlowBody: body
@@ -1806,8 +1795,8 @@ function useSettingsFlow(param) {
1806
1795
  });
1807
1796
  }, [
1808
1797
  flow,
1809
- nav,
1810
- settingsRoute,
1798
+ updateSearchParams,
1799
+ searchParams,
1811
1800
  kratosClient,
1812
1801
  handleFlowError,
1813
1802
  onContinueWith
@@ -1826,7 +1815,7 @@ function _array_like_to_array$3(arr, len) {
1826
1815
  function _array_with_holes$2(arr) {
1827
1816
  if (Array.isArray(arr)) return arr;
1828
1817
  }
1829
- function _define_property$b(obj, key, value) {
1818
+ function _define_property$d(obj, key, value) {
1830
1819
  if (key in obj) {
1831
1820
  Object.defineProperty(obj, key, {
1832
1821
  value: value,
@@ -1866,7 +1855,7 @@ function _iterable_to_array_limit$2(arr, i) {
1866
1855
  function _non_iterable_rest$2() {
1867
1856
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1868
1857
  }
1869
- function _object_spread$b(target) {
1858
+ function _object_spread$d(target) {
1870
1859
  for(var i = 1; i < arguments.length; i++){
1871
1860
  var source = arguments[i] != null ? arguments[i] : {};
1872
1861
  var ownKeys = Object.keys(source);
@@ -1876,30 +1865,25 @@ function _object_spread$b(target) {
1876
1865
  }));
1877
1866
  }
1878
1867
  ownKeys.forEach(function(key) {
1879
- _define_property$b(target, key, source[key]);
1868
+ _define_property$d(target, key, source[key]);
1880
1869
  });
1881
1870
  }
1882
1871
  return target;
1883
1872
  }
1884
- function ownKeys$8(object, enumerableOnly) {
1873
+ function ownKeys$a(object, enumerableOnly) {
1885
1874
  var keys = Object.keys(object);
1886
1875
  if (Object.getOwnPropertySymbols) {
1887
1876
  var symbols = Object.getOwnPropertySymbols(object);
1888
- if (enumerableOnly) {
1889
- symbols = symbols.filter(function(sym) {
1890
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
1891
- });
1892
- }
1893
1877
  keys.push.apply(keys, symbols);
1894
1878
  }
1895
1879
  return keys;
1896
1880
  }
1897
- function _object_spread_props$8(target, source) {
1881
+ function _object_spread_props$a(target, source) {
1898
1882
  source = source != null ? source : {};
1899
1883
  if (Object.getOwnPropertyDescriptors) {
1900
1884
  Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1901
1885
  } else {
1902
- ownKeys$8(Object(source)).forEach(function(key) {
1886
+ ownKeys$a(Object(source)).forEach(function(key) {
1903
1887
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1904
1888
  });
1905
1889
  }
@@ -1917,17 +1901,10 @@ function _unsupported_iterable_to_array$3(o, minLen) {
1917
1901
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
1918
1902
  }
1919
1903
  function useLoginFlow(param) {
1920
- var kratosClient = param.kratosClient, loginRoute = param.loginRoute, returnTo = param.returnTo, onLoggedIn = param.onLoggedIn, onSessionAlreadyAvailable = param.onSessionAlreadyAvailable;
1904
+ var kratosClient = param.kratosClient, returnTo = param.returnTo, onLoggedIn = param.onLoggedIn, onSessionAlreadyAvailable = param.onSessionAlreadyAvailable, _param_searchParams = param.searchParams, searchParams = _param_searchParams === void 0 ? {} : _param_searchParams, updateSearchParams = param.updateSearchParams;
1921
1905
  var useHandleFlowError = useKratosContext().useHandleFlowError;
1922
1906
  var _useState = _sliced_to_array$2(useState(), 2), flow = _useState[0], setFlow = _useState[1];
1923
- var search = useLocation().search;
1924
- var nav = useNavigate();
1925
- var searchParams = useMemo(function() {
1926
- return parseSearchParams(search);
1927
- }, [
1928
- search
1929
- ]);
1930
- var flowId = searchParams[flowIdParameterName], returnToFromSearch = searchParams[returnToParameterName], refresh = searchParams.refresh, authorizationAssuranceLevel = searchParams[aalParameterName];
1907
+ var flowId = searchParams[flowIdParameterName], returnToFromSearch = searchParams[returnToParameterName], refresh = searchParams[refreshParameterName], authorizationAssuranceLevel = searchParams[aalParameterName];
1931
1908
  useEffect(function() {
1932
1909
  setFlow(undefined);
1933
1910
  }, [
@@ -1935,18 +1912,15 @@ function useLoginFlow(param) {
1935
1912
  ]);
1936
1913
  var handleFlowError = useHandleFlowError({
1937
1914
  resetFlow: useCallback(function() {
1938
- var newParams = omit(_object_spread$b({}, searchParams), [
1915
+ var newParams = omit(_object_spread$d({}, searchParams), [
1939
1916
  flowIdParameterName,
1940
1917
  aalParameterName
1941
1918
  ]);
1942
- nav("".concat(loginRoute, "?").concat(new URLSearchParams(newParams)), {
1943
- replace: true
1944
- });
1919
+ updateSearchParams(newParams);
1945
1920
  setFlow(undefined);
1946
1921
  }, [
1947
- nav,
1948
1922
  searchParams,
1949
- loginRoute
1923
+ updateSearchParams
1950
1924
  ]),
1951
1925
  onSessionAlreadyAvailable: onSessionAlreadyAvailable
1952
1926
  });
@@ -1990,9 +1964,7 @@ function useLoginFlow(param) {
1990
1964
  var submit = useCallback(function(param) {
1991
1965
  var body = param.body;
1992
1966
  if (!flow) return;
1993
- nav("".concat(loginRoute, "?").concat(new URLSearchParams(_object_spread_props$8(_object_spread$b({}, searchParams), _define_property$b({}, flowIdParameterName, flow.id)))), {
1994
- replace: true
1995
- });
1967
+ updateSearchParams(_object_spread_props$a(_object_spread$d({}, searchParams), _define_property$d({}, flowIdParameterName, flow.id)));
1996
1968
  kratosClient.updateLoginFlow({
1997
1969
  flow: flow.id,
1998
1970
  updateLoginFlowBody: body
@@ -2014,8 +1986,7 @@ function useLoginFlow(param) {
2014
1986
  });
2015
1987
  }, [
2016
1988
  flow,
2017
- nav,
2018
- loginRoute,
1989
+ updateSearchParams,
2019
1990
  searchParams,
2020
1991
  kratosClient,
2021
1992
  handleFlowError,
@@ -2035,6 +2006,19 @@ function _array_like_to_array$2(arr, len) {
2035
2006
  function _array_with_holes$1(arr) {
2036
2007
  if (Array.isArray(arr)) return arr;
2037
2008
  }
2009
+ function _define_property$c(obj, key, value) {
2010
+ if (key in obj) {
2011
+ Object.defineProperty(obj, key, {
2012
+ value: value,
2013
+ enumerable: true,
2014
+ configurable: true,
2015
+ writable: true
2016
+ });
2017
+ } else {
2018
+ obj[key] = value;
2019
+ }
2020
+ return obj;
2021
+ }
2038
2022
  function _iterable_to_array_limit$1(arr, i) {
2039
2023
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
2040
2024
  if (_i == null) return;
@@ -2062,6 +2046,40 @@ function _iterable_to_array_limit$1(arr, i) {
2062
2046
  function _non_iterable_rest$1() {
2063
2047
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2064
2048
  }
2049
+ function _object_spread$c(target) {
2050
+ for(var i = 1; i < arguments.length; i++){
2051
+ var source = arguments[i] != null ? arguments[i] : {};
2052
+ var ownKeys = Object.keys(source);
2053
+ if (typeof Object.getOwnPropertySymbols === "function") {
2054
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
2055
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
2056
+ }));
2057
+ }
2058
+ ownKeys.forEach(function(key) {
2059
+ _define_property$c(target, key, source[key]);
2060
+ });
2061
+ }
2062
+ return target;
2063
+ }
2064
+ function ownKeys$9(object, enumerableOnly) {
2065
+ var keys = Object.keys(object);
2066
+ if (Object.getOwnPropertySymbols) {
2067
+ var symbols = Object.getOwnPropertySymbols(object);
2068
+ keys.push.apply(keys, symbols);
2069
+ }
2070
+ return keys;
2071
+ }
2072
+ function _object_spread_props$9(target, source) {
2073
+ source = source != null ? source : {};
2074
+ if (Object.getOwnPropertyDescriptors) {
2075
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
2076
+ } else {
2077
+ ownKeys$9(Object(source)).forEach(function(key) {
2078
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
2079
+ });
2080
+ }
2081
+ return target;
2082
+ }
2065
2083
  function _sliced_to_array$1(arr, i) {
2066
2084
  return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest$1();
2067
2085
  }
@@ -2074,26 +2092,21 @@ function _unsupported_iterable_to_array$2(o, minLen) {
2074
2092
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
2075
2093
  }
2076
2094
  function useRegisterFlow(param) {
2077
- var kratosClient = param.kratosClient, registrationRoute = param.registrationRoute, onSessionAlreadyAvailable = param.onSessionAlreadyAvailable, onContinueWith = param.onContinueWith;
2095
+ var kratosClient = param.kratosClient, onSessionAlreadyAvailable = param.onSessionAlreadyAvailable, onContinueWith = param.onContinueWith, _param_searchParams = param.searchParams, searchParams = _param_searchParams === void 0 ? {} : _param_searchParams, updateSearchParams = param.updateSearchParams;
2078
2096
  var useHandleFlowError = useKratosContext().useHandleFlowError;
2079
2097
  var _useState = _sliced_to_array$1(useState(), 2), flow = _useState[0], setFlow = _useState[1];
2080
2098
  var _useState1 = _sliced_to_array$1(useState(false), 2), isRegistered = _useState1[0], setIsRegistered = _useState1[1];
2081
- var search = useLocation().search;
2082
- var nav = useNavigate();
2083
- var _useMemo = useMemo(function() {
2084
- return parseSearchParams(search);
2085
- }, [
2086
- search
2087
- ]), flowId = _useMemo[flowIdParameterName], returnTo = _useMemo[returnToParameterName];
2099
+ var flowId = searchParams[flowIdParameterName], returnTo = searchParams[returnToParameterName];
2088
2100
  var handleFlowError = useHandleFlowError({
2089
2101
  resetFlow: useCallback(function() {
2090
- nav(registrationRoute, {
2091
- replace: true
2092
- });
2102
+ var newParams = omit(_object_spread$c({}, searchParams), [
2103
+ flowIdParameterName
2104
+ ]);
2105
+ updateSearchParams(newParams);
2093
2106
  setFlow(undefined);
2094
2107
  }, [
2095
- nav,
2096
- registrationRoute
2108
+ searchParams,
2109
+ updateSearchParams
2097
2110
  ]),
2098
2111
  onSessionAlreadyAvailable: onSessionAlreadyAvailable
2099
2112
  });
@@ -2132,9 +2145,7 @@ function useRegisterFlow(param) {
2132
2145
  var submit = useCallback(function(param) {
2133
2146
  var body = param.body;
2134
2147
  if (!flow) return;
2135
- nav("".concat(registrationRoute, "?").concat(flowIdParameterName, "=").concat(flow.id), {
2136
- replace: true
2137
- });
2148
+ updateSearchParams(_object_spread_props$9(_object_spread$c({}, searchParams), _define_property$c({}, flowIdParameterName, flow.id)));
2138
2149
  return kratosClient.updateRegistrationFlow({
2139
2150
  flow: flow.id,
2140
2151
  updateRegistrationFlowBody: body
@@ -2154,8 +2165,8 @@ function useRegisterFlow(param) {
2154
2165
  });
2155
2166
  }, [
2156
2167
  flow,
2157
- nav,
2158
- registrationRoute,
2168
+ updateSearchParams,
2169
+ searchParams,
2159
2170
  kratosClient,
2160
2171
  handleFlowError,
2161
2172
  onContinueWith
@@ -2175,6 +2186,19 @@ function _array_like_to_array$1(arr, len) {
2175
2186
  function _array_with_holes(arr) {
2176
2187
  if (Array.isArray(arr)) return arr;
2177
2188
  }
2189
+ function _define_property$b(obj, key, value) {
2190
+ if (key in obj) {
2191
+ Object.defineProperty(obj, key, {
2192
+ value: value,
2193
+ enumerable: true,
2194
+ configurable: true,
2195
+ writable: true
2196
+ });
2197
+ } else {
2198
+ obj[key] = value;
2199
+ }
2200
+ return obj;
2201
+ }
2178
2202
  function _iterable_to_array_limit(arr, i) {
2179
2203
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
2180
2204
  if (_i == null) return;
@@ -2202,6 +2226,40 @@ function _iterable_to_array_limit(arr, i) {
2202
2226
  function _non_iterable_rest() {
2203
2227
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2204
2228
  }
2229
+ function _object_spread$b(target) {
2230
+ for(var i = 1; i < arguments.length; i++){
2231
+ var source = arguments[i] != null ? arguments[i] : {};
2232
+ var ownKeys = Object.keys(source);
2233
+ if (typeof Object.getOwnPropertySymbols === "function") {
2234
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
2235
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
2236
+ }));
2237
+ }
2238
+ ownKeys.forEach(function(key) {
2239
+ _define_property$b(target, key, source[key]);
2240
+ });
2241
+ }
2242
+ return target;
2243
+ }
2244
+ function ownKeys$8(object, enumerableOnly) {
2245
+ var keys = Object.keys(object);
2246
+ if (Object.getOwnPropertySymbols) {
2247
+ var symbols = Object.getOwnPropertySymbols(object);
2248
+ keys.push.apply(keys, symbols);
2249
+ }
2250
+ return keys;
2251
+ }
2252
+ function _object_spread_props$8(target, source) {
2253
+ source = source != null ? source : {};
2254
+ if (Object.getOwnPropertyDescriptors) {
2255
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
2256
+ } else {
2257
+ ownKeys$8(Object(source)).forEach(function(key) {
2258
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
2259
+ });
2260
+ }
2261
+ return target;
2262
+ }
2205
2263
  function _sliced_to_array(arr, i) {
2206
2264
  return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array$1(arr, i) || _non_iterable_rest();
2207
2265
  }
@@ -2214,32 +2272,16 @@ function _unsupported_iterable_to_array$1(o, minLen) {
2214
2272
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
2215
2273
  }
2216
2274
  function useVerificationFlow(param) {
2217
- var initialFlowId = param.initialFlowId, kratosClient = param.kratosClient, onVerified = param.onVerified;
2275
+ var initialFlowId = param.initialFlowId, kratosClient = param.kratosClient, onVerified = param.onVerified, _param_searchParams = param.searchParams, searchParams = _param_searchParams === void 0 ? {} : _param_searchParams, updateSearchParams = param.updateSearchParams;
2218
2276
  var useHandleFlowError = useKratosContext().useHandleFlowError;
2219
2277
  var _useState = _sliced_to_array(useState(), 2), flow = _useState[0], setFlow = _useState[1];
2220
- var search = useLocation().search;
2221
- var nav = useNavigate();
2222
- var _useMemo = useMemo(function() {
2223
- return parseSearchParams(search);
2224
- }, [
2225
- search
2226
- ]), tmp = _useMemo[flowIdParameterName], flowId = tmp === void 0 ? initialFlowId : tmp, returnTo = _useMemo[returnToParameterName];
2278
+ var tmp = searchParams[flowIdParameterName], flowId = tmp === void 0 ? initialFlowId : tmp, returnTo = searchParams[returnToParameterName];
2227
2279
  var resetFlow = useCallback(function(flowId) {
2228
- var params = new URLSearchParams(search);
2229
- if (flowId) {
2230
- params.set(flowIdParameterName, flowId);
2231
- } else {
2232
- params.delete(flowIdParameterName);
2233
- }
2234
- nav({
2235
- search: params.toString()
2236
- }, {
2237
- replace: true
2238
- });
2280
+ updateSearchParams(_object_spread_props$8(_object_spread$b({}, searchParams), _define_property$b({}, flowIdParameterName, flowId)));
2239
2281
  setFlow(undefined);
2240
2282
  }, [
2241
- nav,
2242
- search
2283
+ searchParams,
2284
+ updateSearchParams
2243
2285
  ]);
2244
2286
  var reset = function() {
2245
2287
  resetFlow();
@@ -2248,7 +2290,7 @@ function useVerificationFlow(param) {
2248
2290
  resetFlow: resetFlow
2249
2291
  });
2250
2292
  useEffect(function() {
2251
- (flow === null || flow === void 0 ? void 0 : flow.state) === "passed_challenge" && onVerified();
2293
+ if ((flow === null || flow === void 0 ? void 0 : flow.state) === "passed_challenge") onVerified();
2252
2294
  }, [
2253
2295
  flow === null || flow === void 0 ? void 0 : flow.state,
2254
2296
  onVerified
@@ -2284,19 +2326,12 @@ function useVerificationFlow(param) {
2284
2326
  flow,
2285
2327
  handleFlowError,
2286
2328
  kratosClient,
2287
- nav,
2288
2329
  onVerified
2289
2330
  ]);
2290
2331
  var submit = useCallback(function(param) {
2291
2332
  var body = param.body;
2292
2333
  if (!flow) return;
2293
- var params = new URLSearchParams(search);
2294
- params.set(flowIdParameterName, flow.id);
2295
- nav({
2296
- search: params.toString()
2297
- }, {
2298
- replace: true
2299
- });
2334
+ updateSearchParams(_object_spread_props$8(_object_spread$b({}, searchParams), _define_property$b({}, flowIdParameterName, flow.id)));
2300
2335
  return kratosClient.updateVerificationFlow({
2301
2336
  flow: flow.id,
2302
2337
  updateVerificationFlowBody: body
@@ -2314,8 +2349,8 @@ function useVerificationFlow(param) {
2314
2349
  });
2315
2350
  }, [
2316
2351
  flow,
2317
- search,
2318
- nav,
2352
+ updateSearchParams,
2353
+ searchParams,
2319
2354
  kratosClient,
2320
2355
  handleFlowError
2321
2356
  ]);
@@ -2801,71 +2836,6 @@ function FilterFlowNodes(_param) {
2801
2836
  });
2802
2837
  }
2803
2838
 
2804
- function _array_like_to_array(arr, len) {
2805
- if (len == null || len > arr.length) len = arr.length;
2806
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
2807
- return arr2;
2808
- }
2809
- function _array_without_holes(arr) {
2810
- if (Array.isArray(arr)) return _array_like_to_array(arr);
2811
- }
2812
- function _iterable_to_array(iter) {
2813
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
2814
- }
2815
- function _non_iterable_spread() {
2816
- throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2817
- }
2818
- function _to_consumable_array(arr) {
2819
- return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
2820
- }
2821
- function _unsupported_iterable_to_array(o, minLen) {
2822
- if (!o) return;
2823
- if (typeof o === "string") return _array_like_to_array(o, minLen);
2824
- var n = Object.prototype.toString.call(o).slice(8, -1);
2825
- if (n === "Object" && o.constructor) n = o.constructor.name;
2826
- if (n === "Map" || n === "Set") return Array.from(n);
2827
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
2828
- }
2829
- function useScriptNodes(param) {
2830
- var nodes = param.nodes, excludeScripts = param.excludeScripts;
2831
- useEffect(function() {
2832
- if (excludeScripts) {
2833
- return;
2834
- }
2835
- var scriptNodes = filterNodesByGroups({
2836
- nodes: nodes,
2837
- groups: UiNodeGroupEnum.Webauthn,
2838
- attributes: "text/javascript",
2839
- withoutDefaultGroup: true,
2840
- withoutDefaultAttributes: true
2841
- }).reduce(function(accumulator, node) {
2842
- var attr = node.attributes;
2843
- if (document.querySelector('script[src="'.concat(attr.src, '"]'))) {
2844
- return accumulator;
2845
- }
2846
- var script = document.createElement("script");
2847
- script.src = attr.src;
2848
- script.type = attr.type;
2849
- script.async = attr.async;
2850
- script.referrerPolicy = attr.referrerpolicy;
2851
- script.crossOrigin = attr.crossorigin;
2852
- script.integrity = attr.integrity;
2853
- document.body.appendChild(script);
2854
- return _to_consumable_array(accumulator).concat([
2855
- script
2856
- ]);
2857
- }, []);
2858
- return function() {
2859
- scriptNodes.forEach(function(script) {
2860
- document.body.removeChild(script);
2861
- });
2862
- };
2863
- }, [
2864
- excludeScripts,
2865
- nodes
2866
- ]);
2867
- }
2868
-
2869
2839
  /* eslint-disable jsx-a11y/no-noninteractive-element-interactions */ function _define_property$8(obj, key, value) {
2870
2840
  if (key in obj) {
2871
2841
  Object.defineProperty(obj, key, {
@@ -2898,11 +2868,6 @@ function ownKeys$7(object, enumerableOnly) {
2898
2868
  var keys = Object.keys(object);
2899
2869
  if (Object.getOwnPropertySymbols) {
2900
2870
  var symbols = Object.getOwnPropertySymbols(object);
2901
- if (enumerableOnly) {
2902
- symbols = symbols.filter(function(sym) {
2903
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
2904
- });
2905
- }
2906
2871
  keys.push.apply(keys, symbols);
2907
2872
  }
2908
2873
  return keys;
@@ -2975,7 +2940,6 @@ function _object_without_properties_loose(source, excluded) {
2975
2940
  var form = event.currentTarget;
2976
2941
  var formData = new FormData(form);
2977
2942
  // map the entire form data to JSON for the request body
2978
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2979
2943
  var body = Object.fromEntries(formData);
2980
2944
  // We need the method specified from the name and value of the submit button.
2981
2945
  // when multiple submit buttons are present, the clicked one's value is used.
@@ -3003,6 +2967,71 @@ function _object_without_properties_loose(source, excluded) {
3003
2967
  }));
3004
2968
  }
3005
2969
 
2970
+ function _array_like_to_array(arr, len) {
2971
+ if (len == null || len > arr.length) len = arr.length;
2972
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
2973
+ return arr2;
2974
+ }
2975
+ function _array_without_holes(arr) {
2976
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
2977
+ }
2978
+ function _iterable_to_array(iter) {
2979
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
2980
+ }
2981
+ function _non_iterable_spread() {
2982
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2983
+ }
2984
+ function _to_consumable_array(arr) {
2985
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
2986
+ }
2987
+ function _unsupported_iterable_to_array(o, minLen) {
2988
+ if (!o) return;
2989
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
2990
+ var n = Object.prototype.toString.call(o).slice(8, -1);
2991
+ if (n === "Object" && o.constructor) n = o.constructor.name;
2992
+ if (n === "Map" || n === "Set") return Array.from(n);
2993
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
2994
+ }
2995
+ function useScriptNodes(param) {
2996
+ var nodes = param.nodes, excludeScripts = param.excludeScripts;
2997
+ useEffect(function() {
2998
+ if (excludeScripts) {
2999
+ return;
3000
+ }
3001
+ var scriptNodes = filterNodesByGroups({
3002
+ nodes: nodes,
3003
+ groups: UiNodeGroupEnum.Webauthn,
3004
+ attributes: "text/javascript",
3005
+ withoutDefaultGroup: true,
3006
+ withoutDefaultAttributes: true
3007
+ }).reduce(function(accumulator, node) {
3008
+ var attr = node.attributes;
3009
+ if (document.querySelector('script[src="'.concat(attr.src, '"]'))) {
3010
+ return accumulator;
3011
+ }
3012
+ var script = document.createElement("script");
3013
+ script.src = attr.src;
3014
+ script.type = attr.type;
3015
+ script.async = attr.async;
3016
+ script.referrerPolicy = attr.referrerpolicy;
3017
+ script.crossOrigin = attr.crossorigin;
3018
+ script.integrity = attr.integrity;
3019
+ document.body.appendChild(script);
3020
+ return _to_consumable_array(accumulator).concat([
3021
+ script
3022
+ ]);
3023
+ }, []);
3024
+ return function() {
3025
+ scriptNodes.forEach(function(script) {
3026
+ document.body.removeChild(script);
3027
+ });
3028
+ };
3029
+ }, [
3030
+ excludeScripts,
3031
+ nodes
3032
+ ]);
3033
+ }
3034
+
3006
3035
  function hasOidc(nodes) {
3007
3036
  return nodes.some(function(param) {
3008
3037
  var group = param.group;
@@ -3261,11 +3290,6 @@ function ownKeys$6(object, enumerableOnly) {
3261
3290
  var keys = Object.keys(object);
3262
3291
  if (Object.getOwnPropertySymbols) {
3263
3292
  var symbols = Object.getOwnPropertySymbols(object);
3264
- if (enumerableOnly) {
3265
- symbols = symbols.filter(function(sym) {
3266
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
3267
- });
3268
- }
3269
3293
  keys.push.apply(keys, symbols);
3270
3294
  }
3271
3295
  return keys;
@@ -3404,11 +3428,6 @@ function ownKeys$5(object, enumerableOnly) {
3404
3428
  var keys = Object.keys(object);
3405
3429
  if (Object.getOwnPropertySymbols) {
3406
3430
  var symbols = Object.getOwnPropertySymbols(object);
3407
- if (enumerableOnly) {
3408
- symbols = symbols.filter(function(sym) {
3409
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
3410
- });
3411
- }
3412
3431
  keys.push.apply(keys, symbols);
3413
3432
  }
3414
3433
  return keys;
@@ -3751,11 +3770,6 @@ function ownKeys$4(object, enumerableOnly) {
3751
3770
  var keys = Object.keys(object);
3752
3771
  if (Object.getOwnPropertySymbols) {
3753
3772
  var symbols = Object.getOwnPropertySymbols(object);
3754
- if (enumerableOnly) {
3755
- symbols = symbols.filter(function(sym) {
3756
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
3757
- });
3758
- }
3759
3773
  keys.push.apply(keys, symbols);
3760
3774
  }
3761
3775
  return keys;
@@ -3841,11 +3855,6 @@ function ownKeys$3(object, enumerableOnly) {
3841
3855
  var keys = Object.keys(object);
3842
3856
  if (Object.getOwnPropertySymbols) {
3843
3857
  var symbols = Object.getOwnPropertySymbols(object);
3844
- if (enumerableOnly) {
3845
- symbols = symbols.filter(function(sym) {
3846
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
3847
- });
3848
- }
3849
3858
  keys.push.apply(keys, symbols);
3850
3859
  }
3851
3860
  return keys;
@@ -3917,11 +3926,6 @@ function ownKeys$2(object, enumerableOnly) {
3917
3926
  var keys = Object.keys(object);
3918
3927
  if (Object.getOwnPropertySymbols) {
3919
3928
  var symbols = Object.getOwnPropertySymbols(object);
3920
- if (enumerableOnly) {
3921
- symbols = symbols.filter(function(sym) {
3922
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
3923
- });
3924
- }
3925
3929
  keys.push.apply(keys, symbols);
3926
3930
  }
3927
3931
  return keys;
@@ -3993,11 +3997,6 @@ function ownKeys$1(object, enumerableOnly) {
3993
3997
  var keys = Object.keys(object);
3994
3998
  if (Object.getOwnPropertySymbols) {
3995
3999
  var symbols = Object.getOwnPropertySymbols(object);
3996
- if (enumerableOnly) {
3997
- symbols = symbols.filter(function(sym) {
3998
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
3999
- });
4000
- }
4001
4000
  keys.push.apply(keys, symbols);
4002
4001
  }
4003
4002
  return keys;
@@ -4067,11 +4066,6 @@ function ownKeys(object, enumerableOnly) {
4067
4066
  var keys = Object.keys(object);
4068
4067
  if (Object.getOwnPropertySymbols) {
4069
4068
  var symbols = Object.getOwnPropertySymbols(object);
4070
- if (enumerableOnly) {
4071
- symbols = symbols.filter(function(sym) {
4072
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
4073
- });
4074
- }
4075
4069
  keys.push.apply(keys, symbols);
4076
4070
  }
4077
4071
  return keys;
@@ -4165,4 +4159,4 @@ function UserSettingsCard(param) {
4165
4159
  });
4166
4160
  }
4167
4161
 
4168
- export { BaseSessionManager, ErrorId, ErrorSystem, ErrorValidation, ErrorValidationLogin, ErrorValidationRecovery, ErrorValidationRegistration, ErrorValidationSettings, ErrorValidationVerification, InfoNodeLabel, InfoSelfServiceLogin, InfoSelfServiceLogout, InfoSelfServiceMFA, InfoSelfServiceRecovery, InfoSelfServiceRegistration, InfoSelfServiceSettings, InfoSelfServiceVerification, KratosContextProvider, LoginCard, RecoveryCard, RegistrationCard, UserSettingsCard, VerificationCard, aalParameterName, createKratosClient, flowIdParameterName, isUiNodeAnchorAttributes, isUiNodeImageAttributes, isUiNodeInputAttributes, isUiNodeScriptAttributes, isUiNodeTextAttributes, isUiNodeTextSecretsAttributes, kratosContext, returnToParameterName, useKratosContext, useLoginFlow, useLogoutFlow, useReauthenticationFlow, useRecoveryFlow, useRegisterFlow, useSettingsFlow, useVerificationFlow };
4162
+ export { BaseSessionManager, ErrorId, ErrorSystem, ErrorValidation, ErrorValidationLogin, ErrorValidationRecovery, ErrorValidationRegistration, ErrorValidationSettings, ErrorValidationVerification, InfoNodeLabel, InfoSelfServiceLogin, InfoSelfServiceLogout, InfoSelfServiceMFA, InfoSelfServiceRecovery, InfoSelfServiceRegistration, InfoSelfServiceSettings, InfoSelfServiceVerification, KratosContextProvider, LoginCard, RecoveryCard, RegistrationCard, UserSettingsCard, VerificationCard, aalParameterName, createKratosClient, flowIdParameterName, isUiNodeAnchorAttributes, isUiNodeImageAttributes, isUiNodeInputAttributes, isUiNodeScriptAttributes, isUiNodeTextAttributes, isUiNodeTextSecretsAttributes, kratosContext, refreshParameterName, returnToParameterName, useKratosContext, useLoginFlow, useLogoutFlow, useReauthenticationFlow, useRecoveryFlow, useRegisterFlow, useSettingsFlow, useVerificationFlow };