@ory/elements-react 0.0.0-pr.4a28a8f → 0.0.0-pr.7af5f16

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.
@@ -40,8 +40,7 @@ function DefaultCardContent({ children }) {
40
40
 
41
41
  // src/theme/default/components/card/footer.tsx
42
42
  import { FlowType } from "@ory/client-fetch";
43
- import { useOryFlow } from "@ory/elements-react";
44
- import { useFormContext } from "react-hook-form";
43
+ import { useComponents, useOryFlow } from "@ory/elements-react";
45
44
  import { useIntl } from "react-intl";
46
45
 
47
46
  // src/theme/default/utils/url.ts
@@ -89,6 +88,10 @@ function appendRefresh(url, refresh) {
89
88
  }
90
89
 
91
90
  // src/util/ui/index.ts
91
+ import {
92
+ isUiNodeInputAttributes as isUiNodeInputAttributes2,
93
+ isUiNodeScriptAttributes
94
+ } from "@ory/client-fetch";
92
95
  import { UiNodeGroupEnum as UiNodeGroupEnum2 } from "@ory/client-fetch";
93
96
  import { useMemo } from "react";
94
97
 
@@ -142,12 +145,22 @@ function nodesToAuthMethodGroups(nodes, excludeAuthMethods = []) {
142
145
  ].includes(group)
143
146
  );
144
147
  }
148
+ var findNode = (nodes, opt) => nodes.find((n) => {
149
+ return n.attributes.node_type === opt.node_type && (opt.group instanceof RegExp ? n.group.match(opt.group) : n.group === opt.group) && (opt.name && n.attributes.node_type === "input" ? opt.name instanceof RegExp ? n.attributes.name.match(opt.name) : n.attributes.name === opt.name : !opt.name);
150
+ });
151
+
152
+ // src/util/nodes.ts
153
+ function findScreenSelectionButton(nodes) {
154
+ return nodes.find(
155
+ (node) => node.attributes.node_type === "input" && node.attributes.type === "submit" && node.attributes.name === "screen"
156
+ );
157
+ }
145
158
 
146
159
  // src/theme/default/components/card/footer.tsx
147
160
  import { Fragment, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
148
161
  function DefaultCardFooter() {
149
- const { flowType } = useOryFlow();
150
- switch (flowType) {
162
+ const oryFlow = useOryFlow();
163
+ switch (oryFlow.flowType) {
151
164
  case FlowType.Login:
152
165
  return /* @__PURE__ */ jsx5(LoginCardFooter, {});
153
166
  case FlowType.Registration:
@@ -156,6 +169,8 @@ function DefaultCardFooter() {
156
169
  return /* @__PURE__ */ jsx5(RecoveryCardFooter, {});
157
170
  case FlowType.Verification:
158
171
  return /* @__PURE__ */ jsx5(VerificationCardFooter, {});
172
+ case FlowType.OAuth2Consent:
173
+ return /* @__PURE__ */ jsx5(ConsentCardFooter, { flow: oryFlow.flow });
159
174
  default:
160
175
  return null;
161
176
  }
@@ -234,60 +249,45 @@ function LoginCardFooter() {
234
249
  ] })
235
250
  ] });
236
251
  }
237
- function findScreenSelectionButton(nodes) {
238
- return nodes.find(
239
- (node) => node.attributes.node_type === "input" && node.attributes.type === "submit" && node.attributes.name === "screen"
240
- );
241
- }
242
252
  function RegistrationCardFooter() {
243
253
  const intl = useIntl();
244
254
  const { config, flow, formState } = useOryFlow();
245
- const { setValue } = useFormContext();
246
- if (formState.current === "select_method") {
247
- return null;
248
- }
249
255
  const screenSelectionNode = findScreenSelectionButton(flow.ui.nodes);
250
- function handleScreenSelection() {
251
- setValue("method", "profile");
252
- if (screenSelectionNode) {
253
- setValue(
254
- screenSelectionNode.attributes.name,
255
- screenSelectionNode.attributes.value
256
- );
257
- }
256
+ switch (formState.current) {
257
+ case "method_active":
258
+ return /* @__PURE__ */ jsx5("span", { className: "font-normal leading-normal antialiased", children: screenSelectionNode && /* @__PURE__ */ jsx5(
259
+ "a",
260
+ {
261
+ className: "font-medium text-button-link-brand-brand hover:text-button-link-brand-brand-hover",
262
+ href: "",
263
+ children: intl.formatMessage({
264
+ id: "card.footer.select-another-method",
265
+ defaultMessage: "Select another method"
266
+ })
267
+ }
268
+ ) });
269
+ case "select_method":
270
+ default:
271
+ return /* @__PURE__ */ jsxs4("span", { className: "font-normal leading-normal antialiased", children: [
272
+ intl.formatMessage({
273
+ id: "registration.login-label",
274
+ defaultMessage: "Already have an account?"
275
+ }),
276
+ " ",
277
+ /* @__PURE__ */ jsx5(
278
+ "a",
279
+ {
280
+ className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
281
+ href: initFlowUrl(config.sdk.url, "login", flow),
282
+ "data-testid": "ory/screen/registration/action/login",
283
+ children: intl.formatMessage({
284
+ id: "registration.login-button",
285
+ defaultMessage: "Sign in"
286
+ })
287
+ }
288
+ )
289
+ ] });
258
290
  }
259
- return /* @__PURE__ */ jsx5("span", { className: "font-normal leading-normal antialiased", children: formState.current === "method_active" ? /* @__PURE__ */ jsx5(Fragment, { children: screenSelectionNode && /* @__PURE__ */ jsx5(
260
- "button",
261
- {
262
- className: "font-medium text-button-link-brand-brand hover:text-button-link-brand-brand-hover",
263
- type: "submit",
264
- name: screenSelectionNode.attributes.name,
265
- value: screenSelectionNode.attributes.value,
266
- onClick: handleScreenSelection,
267
- children: intl.formatMessage({
268
- id: "card.footer.select-another-method",
269
- defaultMessage: "Select another method"
270
- })
271
- }
272
- ) }) : /* @__PURE__ */ jsxs4(Fragment, { children: [
273
- intl.formatMessage({
274
- id: "registration.login-label",
275
- defaultMessage: "Already have an account?"
276
- }),
277
- " ",
278
- /* @__PURE__ */ jsx5(
279
- "a",
280
- {
281
- className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
282
- href: initFlowUrl(config.sdk.url, "login", flow),
283
- "data-testid": "ory/screen/registration/action/login",
284
- children: intl.formatMessage({
285
- id: "registration.login-button",
286
- defaultMessage: "Sign in"
287
- })
288
- }
289
- )
290
- ] }) });
291
291
  }
292
292
  function RecoveryCardFooter() {
293
293
  return null;
@@ -295,14 +295,59 @@ function RecoveryCardFooter() {
295
295
  function VerificationCardFooter() {
296
296
  return null;
297
297
  }
298
+ function ConsentCardFooter({ flow }) {
299
+ var _a, _b;
300
+ const { Node: Node2 } = useComponents();
301
+ const rememberNode = findNode(flow.ui.nodes, {
302
+ group: "oauth2_consent",
303
+ node_type: "input",
304
+ name: "remember"
305
+ });
306
+ return /* @__PURE__ */ jsxs4("div", { className: "flex gap-8 flex-col", children: [
307
+ /* @__PURE__ */ jsxs4("div", { children: [
308
+ /* @__PURE__ */ jsxs4("p", { className: "text-interface-foreground-default-secondary leading-normal font-medium", children: [
309
+ "Make sure you trust ",
310
+ (_a = flow.consent_request.client) == null ? void 0 : _a.client_name
311
+ ] }),
312
+ /* @__PURE__ */ jsx5("p", { className: "text-interface-foreground-default-secondary leading-normal", children: "You may be sharing sensitive information with this site or application." })
313
+ ] }),
314
+ rememberNode && /* @__PURE__ */ jsx5(
315
+ Node2.Checkbox,
316
+ {
317
+ attributes: rememberNode.attributes,
318
+ node: rememberNode
319
+ }
320
+ ),
321
+ /* @__PURE__ */ jsx5("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-2", children: flow.ui.nodes.filter(
322
+ (n) => n.attributes.node_type === "input" && n.attributes.type === "submit"
323
+ ).map((n) => {
324
+ const attributes = n.attributes;
325
+ return /* @__PURE__ */ jsx5(
326
+ Node2.Button,
327
+ {
328
+ node: n,
329
+ attributes
330
+ },
331
+ attributes.value
332
+ );
333
+ }) }),
334
+ /* @__PURE__ */ jsxs4("p", { className: "text-sm", children: [
335
+ /* @__PURE__ */ jsxs4("span", { className: "text-interface-foreground-default-tertiary", children: [
336
+ "Authorizing will redirect to",
337
+ " "
338
+ ] }),
339
+ (_b = flow.consent_request.client) == null ? void 0 : _b.client_name
340
+ ] })
341
+ ] });
342
+ }
298
343
 
299
344
  // src/theme/default/components/card/header.tsx
300
- import { useComponents, useOryFlow as useOryFlow3 } from "@ory/elements-react";
345
+ import { useComponents as useComponents2, useOryFlow as useOryFlow3 } from "@ory/elements-react";
301
346
 
302
347
  // src/theme/default/utils/constructCardHeader.ts
303
348
  import {
304
349
  FlowType as FlowType2,
305
- isUiNodeInputAttributes as isUiNodeInputAttributes2
350
+ isUiNodeInputAttributes as isUiNodeInputAttributes3
306
351
  } from "@ory/client-fetch";
307
352
  import { useIntl as useIntl2 } from "react-intl";
308
353
  function joinWithCommaOr(list, orText = "or") {
@@ -316,7 +361,7 @@ function joinWithCommaOr(list, orText = "or") {
316
361
  }
317
362
  }
318
363
  function useCardHeaderText(container, opts) {
319
- var _a, _b, _c;
364
+ var _a, _b, _c, _d, _e, _f;
320
365
  const nodes = container.nodes;
321
366
  const intl = useIntl2();
322
367
  switch (opts.flowType) {
@@ -430,7 +475,7 @@ function useCardHeaderText(container, opts) {
430
475
  }
431
476
  if (nodes.find((node) => node.group === "identifier_first")) {
432
477
  const identifier = nodes.find(
433
- (node) => isUiNodeInputAttributes2(node.attributes) && node.attributes.name.startsWith("identifier") && node.attributes.type !== "hidden"
478
+ (node) => isUiNodeInputAttributes3(node.attributes) && node.attributes.name.startsWith("identifier") && node.attributes.type !== "hidden"
434
479
  );
435
480
  if (identifier) {
436
481
  parts.push(
@@ -504,6 +549,25 @@ function useCardHeaderText(container, opts) {
504
549
  }
505
550
  ) : ""
506
551
  };
552
+ case FlowType2.OAuth2Consent:
553
+ return {
554
+ title: intl.formatMessage(
555
+ {
556
+ id: "consent.title"
557
+ },
558
+ {
559
+ party: (_d = opts.flow.consent_request.client) == null ? void 0 : _d.client_name
560
+ }
561
+ ),
562
+ description: intl.formatMessage(
563
+ {
564
+ id: "consent.subtitle"
565
+ },
566
+ {
567
+ identifier: (_f = (_e = opts.flow.session.identity) == null ? void 0 : _e.traits.email) != null ? _f : ""
568
+ }
569
+ )
570
+ };
507
571
  }
508
572
  return {
509
573
  title: "Error",
@@ -512,7 +576,10 @@ function useCardHeaderText(container, opts) {
512
576
  }
513
577
 
514
578
  // src/theme/default/components/card/current-identifier-button.tsx
515
- import { FlowType as FlowType3 } from "@ory/client-fetch";
579
+ import {
580
+ FlowType as FlowType3,
581
+ isUiNodeInputAttributes as isUiNodeInputAttributes4
582
+ } from "@ory/client-fetch";
516
583
  import { useOryFlow as useOryFlow2 } from "@ory/elements-react";
517
584
 
518
585
  // src/theme/default/assets/icons/arrow-left.svg
@@ -534,9 +601,11 @@ function omit(obj, keys) {
534
601
  }
535
602
 
536
603
  // src/theme/default/components/card/current-identifier-button.tsx
604
+ import { useFormContext } from "react-hook-form";
537
605
  import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
538
606
  function DefaultCurrentIdentifierButton() {
539
607
  const { flow, flowType, config, formState } = useOryFlow2();
608
+ const { setValue } = useFormContext();
540
609
  const ui = flow.ui;
541
610
  if (formState.current === "provide_identifier") {
542
611
  return null;
@@ -544,26 +613,78 @@ function DefaultCurrentIdentifierButton() {
544
613
  if (flowType === FlowType3.Login && flow.requested_aal === "aal2") {
545
614
  return null;
546
615
  }
547
- const nodeBackButton = getBackButtonNode(flowType, ui.nodes);
548
- if ((nodeBackButton == null ? void 0 : nodeBackButton.attributes.node_type) !== "input" || !nodeBackButton.attributes.value) {
616
+ const nodeBackButton = getBackButtonNodeAttributes(flowType, ui.nodes);
617
+ if (!nodeBackButton) {
549
618
  return null;
550
619
  }
551
620
  const initFlowUrl2 = restartFlowUrl(
552
621
  flow,
553
622
  `${config.sdk.url}/self-service/${flowType}/browser`
554
623
  );
555
- const attributes = omit(nodeBackButton.attributes, [
624
+ const attributes = omit(nodeBackButton, [
556
625
  "autocomplete",
557
626
  "node_type",
558
627
  "maxlength"
559
628
  ]);
629
+ const screenSelectionNode = findScreenSelectionButton(flow.ui.nodes);
630
+ if (screenSelectionNode) {
631
+ return /* @__PURE__ */ jsxs5("form", { action: flow.ui.action, method: flow.ui.method, children: [
632
+ flow.ui.nodes.filter((n) => {
633
+ if (isUiNodeInputAttributes4(n.attributes)) {
634
+ return n.attributes.type === "hidden";
635
+ }
636
+ return false;
637
+ }).map((n) => {
638
+ const attrs = n.attributes;
639
+ return /* @__PURE__ */ jsx7(
640
+ "input",
641
+ {
642
+ type: "hidden",
643
+ name: attrs.name,
644
+ value: attrs.value
645
+ },
646
+ attrs.name
647
+ );
648
+ }),
649
+ /* @__PURE__ */ jsx7(
650
+ "button",
651
+ {
652
+ className: "group inline-flex max-w-full cursor-pointer items-center gap-1 self-start rounded-identifier border px-[11px] py-[5px] transition-colors border-button-identifier-border-border-default bg-button-identifier-background-default hover:border-button-identifier-border-border-hover hover:bg-button-identifier-background-hover",
653
+ ...attributes,
654
+ type: "submit",
655
+ onClick: () => {
656
+ setValue(
657
+ screenSelectionNode.attributes.name,
658
+ screenSelectionNode.attributes.value
659
+ );
660
+ setValue("method", "profile");
661
+ },
662
+ name: screenSelectionNode.attributes.name,
663
+ value: screenSelectionNode.attributes.value,
664
+ title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.value}`,
665
+ "data-testid": "ory/screen/login/action/restart",
666
+ children: /* @__PURE__ */ jsxs5("span", { className: "inline-flex min-h-5 items-center gap-2 overflow-hidden text-ellipsis", children: [
667
+ /* @__PURE__ */ jsx7(
668
+ arrow_left_default,
669
+ {
670
+ size: 16,
671
+ stroke: "1",
672
+ className: "shrink-0 text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover"
673
+ }
674
+ ),
675
+ /* @__PURE__ */ jsx7("span", { className: "overflow-hidden text-ellipsis text-nowrap text-sm font-medium text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover", children: nodeBackButton == null ? void 0 : nodeBackButton.value })
676
+ ] })
677
+ }
678
+ )
679
+ ] });
680
+ }
560
681
  return /* @__PURE__ */ jsx7(
561
682
  "a",
562
683
  {
563
684
  className: "group inline-flex max-w-full cursor-pointer items-center gap-1 self-start rounded-identifier border px-[11px] py-[5px] transition-colors border-button-identifier-border-border-default bg-button-identifier-background-default hover:border-button-identifier-border-border-hover hover:bg-button-identifier-background-hover",
564
685
  ...attributes,
565
686
  href: initFlowUrl2,
566
- title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.attributes.value}`,
687
+ title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.value}`,
567
688
  "data-testid": "ory/screen/login/action/restart",
568
689
  children: /* @__PURE__ */ jsxs5("span", { className: "inline-flex min-h-5 items-center gap-2 overflow-hidden text-ellipsis", children: [
569
690
  /* @__PURE__ */ jsx7(
@@ -574,30 +695,34 @@ function DefaultCurrentIdentifierButton() {
574
695
  className: "shrink-0 text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover"
575
696
  }
576
697
  ),
577
- /* @__PURE__ */ jsx7("span", { className: "overflow-hidden text-ellipsis text-nowrap text-sm font-medium text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover", children: nodeBackButton == null ? void 0 : nodeBackButton.attributes.value })
698
+ /* @__PURE__ */ jsx7("span", { className: "overflow-hidden text-ellipsis text-nowrap text-sm font-medium text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover", children: nodeBackButton == null ? void 0 : nodeBackButton.value })
578
699
  ] })
579
700
  }
580
701
  );
581
702
  }
582
- function getBackButtonNode(flowType, nodes) {
583
- let nodeBackButton;
703
+ function getBackButtonNodeAttributes(flowType, nodes) {
704
+ var _a, _b;
705
+ let nodeBackButtonAttributes;
584
706
  switch (flowType) {
585
707
  case FlowType3.Login:
586
- nodeBackButton = nodes.find(
587
- (node) => "name" in node.attributes && node.attributes.name === "identifier" && ["default", "identifier_first"].includes(node.group)
588
- );
708
+ nodeBackButtonAttributes = (_a = nodes.find(
709
+ (node) => isUiNodeInputAttributes4(node.attributes) && node.attributes.name === "identifier" && ["default", "identifier_first"].includes(node.group)
710
+ )) == null ? void 0 : _a.attributes;
589
711
  break;
590
712
  case FlowType3.Registration:
591
- nodeBackButton = guessRegistrationBackButton(nodes);
713
+ nodeBackButtonAttributes = guessRegistrationBackButton(nodes);
592
714
  break;
593
715
  case FlowType3.Recovery:
594
716
  case FlowType3.Verification:
595
- nodeBackButton = nodes.find(
596
- (n) => "name" in n.attributes && n.attributes.name === "email"
597
- );
717
+ nodeBackButtonAttributes = (_b = nodes.find(
718
+ (n) => isUiNodeInputAttributes4(n.attributes) && n.attributes.name === "email"
719
+ )) == null ? void 0 : _b.attributes;
598
720
  break;
599
721
  }
600
- return nodeBackButton;
722
+ if ((nodeBackButtonAttributes == null ? void 0 : nodeBackButtonAttributes.node_type) !== "input" || !(nodeBackButtonAttributes == null ? void 0 : nodeBackButtonAttributes.value)) {
723
+ return void 0;
724
+ }
725
+ return nodeBackButtonAttributes;
601
726
  }
602
727
  var backButtonCandiates = [
603
728
  "traits.email",
@@ -605,15 +730,16 @@ var backButtonCandiates = [
605
730
  "traits.phone_number"
606
731
  ];
607
732
  function guessRegistrationBackButton(uiNodes) {
608
- return uiNodes.find(
609
- (node) => "name" in node.attributes && backButtonCandiates.includes(node.attributes.name) && node.group === "default"
610
- );
733
+ var _a;
734
+ return (_a = uiNodes.find(
735
+ (node) => isUiNodeInputAttributes4(node.attributes) && backButtonCandiates.includes(node.attributes.name) && node.group === "default"
736
+ )) == null ? void 0 : _a.attributes;
611
737
  }
612
738
 
613
739
  // src/theme/default/components/card/header.tsx
614
740
  import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
615
741
  function InnerCardHeader({ title, text }) {
616
- const { Card } = useComponents();
742
+ const { Card } = useComponents2();
617
743
  return /* @__PURE__ */ jsxs6("header", { className: "flex flex-col gap-8 antialiased", children: [
618
744
  /* @__PURE__ */ jsx8(Card.Logo, {}),
619
745
  /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-2", children: [
@@ -955,6 +1081,7 @@ function DefaultButtonSocial({
955
1081
  setClicked(false);
956
1082
  }
957
1083
  }, [isSubmitting, setClicked]);
1084
+ const label = node.meta.label ? uiTextToFormattedMessage(node.meta.label, intl) : "";
958
1085
  return /* @__PURE__ */ jsxs19(
959
1086
  "button",
960
1087
  {
@@ -967,10 +1094,11 @@ function DefaultButtonSocial({
967
1094
  onClick: localOnClick,
968
1095
  "data-loading": clicked,
969
1096
  disabled: isSubmitting,
1097
+ "aria-label": label,
970
1098
  children: [
971
1099
  /* @__PURE__ */ jsx27("span", { className: "size-5 relative", children: !clicked ? Logo ? /* @__PURE__ */ jsx27(Logo, { size: 20 }) : /* @__PURE__ */ jsx27("span", { className: "flex aspect-square items-center justify-center rounded-[999px] border text-xs", children: provider.slice(0, 2) }) : /* @__PURE__ */ jsx27(Spinner, { className: "size-5" }) }),
972
1100
  showLabel && node.meta.label ? /* @__PURE__ */ jsxs19(Fragment2, { children: [
973
- /* @__PURE__ */ jsx27("span", { className: "grow text-center font-medium leading-none text-button-social-foreground-default", children: uiTextToFormattedMessage(node.meta.label, intl) }),
1101
+ /* @__PURE__ */ jsx27("span", { className: "grow text-center font-medium leading-none text-button-social-foreground-default", children: label }),
974
1102
  /* @__PURE__ */ jsx27("span", { className: "size-5 block" })
975
1103
  ] }) : null
976
1104
  ]
@@ -1002,11 +1130,13 @@ function DefaultFormContainer({
1002
1130
  children,
1003
1131
  onSubmit,
1004
1132
  action,
1005
- method
1133
+ method,
1134
+ "data-testid": dataTestId
1006
1135
  }) {
1007
1136
  return /* @__PURE__ */ jsx28(
1008
1137
  "form",
1009
1138
  {
1139
+ "data-testid": dataTestId,
1010
1140
  onSubmit,
1011
1141
  noValidate: true,
1012
1142
  action,
@@ -1110,8 +1240,40 @@ function isGroupImmediateSubmit(group) {
1110
1240
  return group === "code";
1111
1241
  }
1112
1242
 
1113
- // src/theme/default/components/card/auth-method-list-item.tsx
1243
+ // src/theme/default/components/card/list-item.tsx
1114
1244
  import { jsx as jsx35, jsxs as jsxs20 } from "react/jsx-runtime";
1245
+ function ListItem({
1246
+ icon: Icon,
1247
+ as,
1248
+ title,
1249
+ description,
1250
+ children,
1251
+ className,
1252
+ ...props
1253
+ }) {
1254
+ const Comp = as || "div";
1255
+ return /* @__PURE__ */ jsxs20(
1256
+ Comp,
1257
+ {
1258
+ ...props,
1259
+ className: cn(
1260
+ "flex cursor-pointer gap-3 text-left items-start w-full rounded-buttons p-2 hover:bg-interface-background-default-primary-hover",
1261
+ className
1262
+ ),
1263
+ children: [
1264
+ /* @__PURE__ */ jsx35("span", { className: "mt-1", children: Icon && /* @__PURE__ */ jsx35(Icon, { size: 16, className: "text-interface-foreground-brand-primary" }) }),
1265
+ /* @__PURE__ */ jsxs20("span", { className: "flex-1 leading-normal inline-flex flex-col max-w-full min-w-1", children: [
1266
+ /* @__PURE__ */ jsx35("span", { className: "text-interface-foreground-default-primary break-words", children: title }),
1267
+ /* @__PURE__ */ jsx35("span", { className: "text-interface-foreground-default-secondary", children: description })
1268
+ ] }),
1269
+ children
1270
+ ]
1271
+ }
1272
+ );
1273
+ }
1274
+
1275
+ // src/theme/default/components/card/auth-method-list-item.tsx
1276
+ import { jsx as jsx36 } from "react/jsx-runtime";
1115
1277
  var iconsMap = {
1116
1278
  code: code_default,
1117
1279
  passkey: passkey_default,
@@ -1130,28 +1292,21 @@ function DefaultAuthMethodListItem({
1130
1292
  var _a;
1131
1293
  const intl = useIntl5();
1132
1294
  const Icon = iconsMap[group] || null;
1133
- return /* @__PURE__ */ jsxs20(
1134
- "button",
1295
+ return /* @__PURE__ */ jsx36(
1296
+ ListItem,
1135
1297
  {
1136
- className: "flex cursor-pointer gap-3 text-left items-start w-full rounded-buttons p-2 hover:bg-interface-background-default-primary-hover",
1298
+ as: "button",
1299
+ icon: Icon,
1300
+ title: intl.formatMessage(
1301
+ { id: (_a = title == null ? void 0 : title.id) != null ? _a : `two-step.${group}.title` },
1302
+ title == null ? void 0 : title.values
1303
+ ),
1304
+ description: intl.formatMessage({
1305
+ id: `two-step.${group}.description`
1306
+ }),
1137
1307
  onClick,
1138
1308
  type: isGroupImmediateSubmit(group) ? "submit" : "button",
1139
- "data-testid": `ory/form/auth-picker/${group}`,
1140
- children: [
1141
- /* @__PURE__ */ jsx35("span", { className: "mt-1", children: Icon && /* @__PURE__ */ jsx35(Icon, { size: 16, className: "text-interface-foreground-brand-primary" }) }),
1142
- /* @__PURE__ */ jsxs20("span", { className: "flex-1 leading-normal inline-flex flex-col w-full", children: [
1143
- /* @__PURE__ */ jsxs20("span", { className: "text-interface-foreground-default-primary truncate mr-6", children: [
1144
- intl.formatMessage(
1145
- { id: (_a = title == null ? void 0 : title.id) != null ? _a : `two-step.${group}.title` },
1146
- title == null ? void 0 : title.values
1147
- ),
1148
- " "
1149
- ] }),
1150
- /* @__PURE__ */ jsx35("span", { className: "text-interface-foreground-default-secondary", children: intl.formatMessage({
1151
- id: `two-step.${group}.description`
1152
- }) })
1153
- ] })
1154
- ]
1309
+ "data-testid": `ory/form/auth-picker/${group}`
1155
1310
  }
1156
1311
  );
1157
1312
  }
@@ -1165,7 +1320,7 @@ import { cva } from "class-variance-authority";
1165
1320
  import { useFormContext as useFormContext3 } from "react-hook-form";
1166
1321
  import { useIntl as useIntl6 } from "react-intl";
1167
1322
  import { useEffect as useEffect2, useState } from "react";
1168
- import { jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
1323
+ import { jsx as jsx37, jsxs as jsxs21 } from "react/jsx-runtime";
1169
1324
  var buttonStyles = cva(
1170
1325
  [
1171
1326
  "relative flex justify-center gap-3 overflow-hidden rounded-buttons leading-none ring-1 ring-inset font-medium",
@@ -1213,6 +1368,7 @@ var DefaultButton = ({
1213
1368
  label: _ignoredLabel,
1214
1369
  node_type: _ignoredNodeType,
1215
1370
  maxlength: _ignoredMaxLength,
1371
+ onclick: _ignoredOnClick,
1216
1372
  // End of skipped attributes
1217
1373
  ...rest
1218
1374
  } = attributes;
@@ -1228,7 +1384,7 @@ var DefaultButton = ({
1228
1384
  setClicked(false);
1229
1385
  }
1230
1386
  }, [isSubmitting]);
1231
- const isPrimary = attributes.name === "method" || attributes.name.includes("passkey") || attributes.name.includes("webauthn") || attributes.name.includes("lookup_secret");
1387
+ const isPrimary = attributes.name === "method" || attributes.name.includes("passkey") || attributes.name.includes("webauthn") || attributes.name.includes("lookup_secret") || attributes.name.includes("action") && attributes.value === "accept";
1232
1388
  return /* @__PURE__ */ jsxs21(
1233
1389
  "button",
1234
1390
  {
@@ -1249,8 +1405,8 @@ var DefaultButton = ({
1249
1405
  disabled: (_a = rest.disabled) != null ? _a : isSubmitting,
1250
1406
  "data-loading": clicked,
1251
1407
  children: [
1252
- clicked ? /* @__PURE__ */ jsx36(Spinner, {}) : null,
1253
- label ? /* @__PURE__ */ jsx36("span", { children: uiTextToFormattedMessage3(label, intl) }) : ""
1408
+ clicked ? /* @__PURE__ */ jsx37(Spinner, {}) : null,
1409
+ label ? /* @__PURE__ */ jsx37("span", { children: uiTextToFormattedMessage3(label, intl) }) : ""
1254
1410
  ]
1255
1411
  }
1256
1412
  );
@@ -1263,7 +1419,7 @@ import {
1263
1419
  messageTestId as messageTestId2,
1264
1420
  uiTextToFormattedMessage as uiTextToFormattedMessage5
1265
1421
  } from "@ory/elements-react";
1266
- import { useForm } from "react-hook-form";
1422
+ import { useFormContext as useFormContext4 } from "react-hook-form";
1267
1423
  import { useIntl as useIntl8 } from "react-intl";
1268
1424
 
1269
1425
  // src/theme/default/components/ui/checkbox-label.tsx
@@ -1326,7 +1482,7 @@ var uiTextToFormattedMessage4 = ({ id, context = {}, text }, intl) => {
1326
1482
  };
1327
1483
 
1328
1484
  // src/theme/default/components/ui/checkbox-label.tsx
1329
- import { Fragment as Fragment3, jsx as jsx37 } from "react/jsx-runtime";
1485
+ import { Fragment as Fragment3, jsx as jsx38 } from "react/jsx-runtime";
1330
1486
  var linkRegex = /\[([^\]]+)\]\(([^)]+)\)/g;
1331
1487
  function computeLabelElements(labelText) {
1332
1488
  const elements = [];
@@ -1342,7 +1498,7 @@ function computeLabelElements(labelText) {
1342
1498
  elements.push(labelText.slice(lastIndex, matchStart));
1343
1499
  }
1344
1500
  elements.push(
1345
- /* @__PURE__ */ jsx37(
1501
+ /* @__PURE__ */ jsx38(
1346
1502
  "a",
1347
1503
  {
1348
1504
  href: url,
@@ -1367,13 +1523,13 @@ function CheckboxLabel({ label }) {
1367
1523
  return null;
1368
1524
  }
1369
1525
  const labelText = uiTextToFormattedMessage4(label, intl);
1370
- return /* @__PURE__ */ jsx37(Fragment3, { children: computeLabelElements(labelText) });
1526
+ return /* @__PURE__ */ jsx38(Fragment3, { children: computeLabelElements(labelText) });
1371
1527
  }
1372
1528
 
1373
1529
  // src/theme/default/components/form/checkbox.tsx
1374
- import { jsx as jsx38, jsxs as jsxs22 } from "react/jsx-runtime";
1530
+ import { jsx as jsx39, jsxs as jsxs22 } from "react/jsx-runtime";
1375
1531
  function CheckboxSVG() {
1376
- return /* @__PURE__ */ jsx38(
1532
+ return /* @__PURE__ */ jsx39(
1377
1533
  "svg",
1378
1534
  {
1379
1535
  className: "absolute hidden size-4 peer-checked:block fill-checkbox-foreground-checked",
@@ -1382,7 +1538,7 @@ function CheckboxSVG() {
1382
1538
  height: "16",
1383
1539
  viewBox: "0 0 16 16",
1384
1540
  fill: "none",
1385
- children: /* @__PURE__ */ jsx38(
1541
+ children: /* @__PURE__ */ jsx39(
1386
1542
  "path",
1387
1543
  {
1388
1544
  fillRule: "evenodd",
@@ -1409,29 +1565,28 @@ var DefaultCheckbox = ({
1409
1565
  } = initialAttributes;
1410
1566
  const intl = useIntl8();
1411
1567
  const label = getNodeLabel2(node);
1412
- const { register } = useForm();
1568
+ const { register } = useFormContext4();
1413
1569
  const hasError = node.messages.some((m) => m.type === "error");
1414
1570
  return /* @__PURE__ */ jsxs22("label", { className: "flex items-start gap-3 self-stretch antialiased", children: [
1415
1571
  /* @__PURE__ */ jsxs22("span", { className: "flex h-5 items-center", children: [
1416
- /* @__PURE__ */ jsx38(
1572
+ /* @__PURE__ */ jsx39(
1417
1573
  "input",
1418
1574
  {
1419
1575
  ...attributes,
1420
- value: 1,
1421
1576
  defaultChecked: Boolean(value),
1422
1577
  type: "checkbox",
1423
1578
  className: cn(
1424
1579
  "peer size-4 border appearance-none rounded-forms bg-checkbox-background-default border-checkbox-border-checkbox-border-default checked:bg-checkbox-background-checked checked:border-checkbox-border-checkbox-border-checked",
1425
1580
  hasError && "border-interface-border-validation-danger"
1426
1581
  ),
1427
- ...register(name, { value })
1582
+ ...register(name)
1428
1583
  }
1429
1584
  ),
1430
- /* @__PURE__ */ jsx38(CheckboxSVG, {})
1585
+ /* @__PURE__ */ jsx39(CheckboxSVG, {})
1431
1586
  ] }),
1432
1587
  /* @__PURE__ */ jsxs22("span", { className: "flex flex-col", children: [
1433
- /* @__PURE__ */ jsx38("span", { className: "font-normal leading-tight text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx38(CheckboxLabel, { label }) }),
1434
- node.messages.map((message) => /* @__PURE__ */ jsx38(
1588
+ /* @__PURE__ */ jsx39("span", { className: "font-normal leading-tight text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx39(CheckboxLabel, { label }) }),
1589
+ node.messages.map((message) => /* @__PURE__ */ jsx39(
1435
1590
  "span",
1436
1591
  {
1437
1592
  className: cn(
@@ -1448,63 +1603,93 @@ var DefaultCheckbox = ({
1448
1603
  };
1449
1604
 
1450
1605
  // src/theme/default/components/form/group-container.tsx
1451
- import { jsx as jsx39 } from "react/jsx-runtime";
1606
+ import { useOryFlow as useOryFlow7 } from "@ory/elements-react";
1607
+ import { FlowType as FlowType5 } from "@ory/client-fetch";
1608
+
1609
+ // src/util/childCounter.ts
1610
+ import { Children, isValidElement } from "react";
1611
+ function countRenderableChildren(children) {
1612
+ return Children.toArray(children).filter((c) => {
1613
+ if (isValidElement(c)) {
1614
+ return true;
1615
+ }
1616
+ return false;
1617
+ }).length;
1618
+ }
1619
+
1620
+ // src/theme/default/components/form/group-container.tsx
1621
+ import { jsx as jsx40 } from "react/jsx-runtime";
1452
1622
  function DefaultGroupContainer({ children }) {
1453
- return /* @__PURE__ */ jsx39("div", { className: "grid grid-cols-1 gap-8", children });
1623
+ const { flowType } = useOryFlow7();
1624
+ const count = countRenderableChildren(children);
1625
+ if (count === 0) {
1626
+ return null;
1627
+ }
1628
+ return /* @__PURE__ */ jsx40(
1629
+ "div",
1630
+ {
1631
+ className: cn(
1632
+ "grid",
1633
+ flowType === FlowType5.OAuth2Consent ? "grid-cols-2 gap-2" : "grid-cols-1 gap-8"
1634
+ ),
1635
+ children
1636
+ }
1637
+ );
1454
1638
  }
1455
1639
 
1456
1640
  // src/theme/default/components/form/horizontal-divider.tsx
1457
- import { jsx as jsx40 } from "react/jsx-runtime";
1641
+ import { jsx as jsx41 } from "react/jsx-runtime";
1458
1642
  function DefaultHorizontalDivider() {
1459
- return /* @__PURE__ */ jsx40("hr", { className: "border-interface-border-default-primary" });
1643
+ return /* @__PURE__ */ jsx41("hr", { className: "border-interface-border-default-primary" });
1460
1644
  }
1461
1645
 
1462
1646
  // src/theme/default/components/form/image.tsx
1463
- import { jsx as jsx41 } from "react/jsx-runtime";
1464
- function DefaultImage({ attributes }) {
1465
- return /* @__PURE__ */ jsx41("figure", { children: /* @__PURE__ */ jsx41("img", { ...attributes }) });
1647
+ import { jsx as jsx42 } from "react/jsx-runtime";
1648
+ function DefaultImage({ attributes, node }) {
1649
+ var _a;
1650
+ return /* @__PURE__ */ jsx42("figure", { children: /* @__PURE__ */ jsx42("img", { ...attributes, alt: ((_a = node.meta.label) == null ? void 0 : _a.text) || "" }) });
1466
1651
  }
1467
1652
 
1468
1653
  // src/theme/default/components/form/input.tsx
1469
- import { FlowType as FlowType5, getNodeLabel as getNodeLabel3 } from "@ory/client-fetch";
1654
+ import { FlowType as FlowType6, getNodeLabel as getNodeLabel3 } from "@ory/client-fetch";
1470
1655
  import {
1471
1656
  uiTextToFormattedMessage as uiTextToFormattedMessage6,
1472
- useOryFlow as useOryFlow7
1657
+ useOryFlow as useOryFlow8
1473
1658
  } from "@ory/elements-react";
1474
1659
  import { useRef, useState as useState2 } from "react";
1475
- import { useFormContext as useFormContext4 } from "react-hook-form";
1660
+ import { useFormContext as useFormContext5 } from "react-hook-form";
1476
1661
  import { useIntl as useIntl9 } from "react-intl";
1477
1662
 
1478
1663
  // src/theme/default/assets/icons/eye-off.svg
1479
1664
  import * as React24 from "react";
1480
- import { jsx as jsx42 } from "react/jsx-runtime";
1665
+ import { jsx as jsx43 } from "react/jsx-runtime";
1481
1666
  var SvgEyeOff = (props) => {
1482
1667
  var _a, _b;
1483
- return /* @__PURE__ */ jsx42("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx42("path", { stroke: "#000", strokeLinecap: "round", strokeLinejoin: "round", d: "M10.585 10.587a2 2 0 0 0 2.829 2.828m3.267 3.258A8.7 8.7 0 0 1 12 18q-5.4 0-9-6 1.908-3.18 4.32-4.674m2.86-1.146A9 9 0 0 1 12 6q5.4 0 9 6-1 1.665-2.138 2.87M3 3l18 18" }) });
1668
+ return /* @__PURE__ */ jsx43("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx43("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M10.585 10.587a2 2 0 0 0 2.829 2.828m3.267 3.258A8.7 8.7 0 0 1 12 18q-5.4 0-9-6 1.908-3.18 4.32-4.674m2.86-1.146A9 9 0 0 1 12 6q5.4 0 9 6-1 1.665-2.138 2.87M3 3l18 18" }) });
1484
1669
  };
1485
1670
  var eye_off_default = SvgEyeOff;
1486
1671
 
1487
1672
  // src/theme/default/assets/icons/eye.svg
1488
1673
  import * as React25 from "react";
1489
- import { jsx as jsx43, jsxs as jsxs23 } from "react/jsx-runtime";
1674
+ import { jsx as jsx44, jsxs as jsxs23 } from "react/jsx-runtime";
1490
1675
  var SvgEye = (props) => {
1491
1676
  var _a, _b;
1492
- return /* @__PURE__ */ jsx43("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsxs23("g", { strokeLinecap: "round", strokeLinejoin: "round", children: [
1493
- /* @__PURE__ */ jsx43("path", { stroke: "currentColor", d: "M10 12a2 2 0 1 0 4 0 2 2 0 0 0-4 0" }),
1494
- /* @__PURE__ */ jsx43("path", { stroke: "#64748B", d: "M21 12q-3.6 6-9 6t-9-6q3.6-6 9-6t9 6" })
1677
+ return /* @__PURE__ */ jsx44("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsxs23("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", children: [
1678
+ /* @__PURE__ */ jsx44("path", { d: "M10 12a2 2 0 1 0 4 0 2 2 0 0 0-4 0" }),
1679
+ /* @__PURE__ */ jsx44("path", { d: "M21 12q-3.6 6-9 6t-9-6q3.6-6 9-6t9 6" })
1495
1680
  ] }) });
1496
1681
  };
1497
1682
  var eye_default = SvgEye;
1498
1683
 
1499
1684
  // src/theme/default/components/form/input.tsx
1500
- import { jsx as jsx44, jsxs as jsxs24 } from "react/jsx-runtime";
1685
+ import { jsx as jsx45, jsxs as jsxs24 } from "react/jsx-runtime";
1501
1686
  var DefaultInput = ({
1502
1687
  node,
1503
1688
  attributes,
1504
1689
  onClick
1505
1690
  }) => {
1506
1691
  const label = getNodeLabel3(node);
1507
- const { register } = useFormContext4();
1692
+ const { register } = useFormContext5();
1508
1693
  const {
1509
1694
  value,
1510
1695
  autocomplete,
@@ -1514,7 +1699,7 @@ var DefaultInput = ({
1514
1699
  ...rest
1515
1700
  } = attributes;
1516
1701
  const intl = useIntl9();
1517
- const { flowType } = useOryFlow7();
1702
+ const { flowType } = useOryFlow8();
1518
1703
  const inputRef = useRef(null);
1519
1704
  const formattedLabel = label ? intl.formatMessage(
1520
1705
  {
@@ -1526,7 +1711,7 @@ var DefaultInput = ({
1526
1711
  }
1527
1712
  ) : "";
1528
1713
  if (rest.type === "hidden") {
1529
- return /* @__PURE__ */ jsx44(
1714
+ return /* @__PURE__ */ jsx45(
1530
1715
  "input",
1531
1716
  {
1532
1717
  ...rest,
@@ -1546,10 +1731,10 @@ var DefaultInput = ({
1546
1731
  className: cn(
1547
1732
  "relative flex justify-stretch",
1548
1733
  // The settings flow input fields are supposed to be dense, so we don't need the extra padding we want on the user flows.
1549
- flowType === FlowType5.Settings && "max-w-[488px]"
1734
+ flowType === FlowType6.Settings && "max-w-[488px]"
1550
1735
  ),
1551
1736
  children: [
1552
- /* @__PURE__ */ jsx44(
1737
+ /* @__PURE__ */ jsx45(
1553
1738
  "input",
1554
1739
  {
1555
1740
  ...rest,
@@ -1573,7 +1758,7 @@ var DefaultInput = ({
1573
1758
  ...restRegister
1574
1759
  }
1575
1760
  ),
1576
- rest.type === "password" && /* @__PURE__ */ jsx44(PasswordToggle, { inputRef })
1761
+ rest.type === "password" && /* @__PURE__ */ jsx45(PasswordToggle, { inputRef })
1577
1762
  ]
1578
1763
  }
1579
1764
  );
@@ -1588,32 +1773,33 @@ function PasswordToggle({
1588
1773
  inputRef.current.type = shown ? "password" : "text";
1589
1774
  }
1590
1775
  };
1591
- return /* @__PURE__ */ jsx44(
1776
+ return /* @__PURE__ */ jsx45(
1592
1777
  "button",
1593
1778
  {
1594
1779
  onClick: handleClick,
1595
1780
  className: "absolute right-0 h-full w-12 flex items-center justify-center",
1596
1781
  type: "button",
1597
- children: shown ? /* @__PURE__ */ jsx44(eye_off_default, {}) : /* @__PURE__ */ jsx44(eye_default, {})
1782
+ "aria-label": "Toggle password visibility",
1783
+ children: shown ? /* @__PURE__ */ jsx45(eye_off_default, {}) : /* @__PURE__ */ jsx45(eye_default, {})
1598
1784
  }
1599
1785
  );
1600
1786
  }
1601
1787
 
1602
1788
  // src/theme/default/components/form/label.tsx
1603
1789
  import {
1604
- FlowType as FlowType6,
1790
+ FlowType as FlowType7,
1605
1791
  getNodeLabel as getNodeLabel4,
1606
1792
  instanceOfUiText
1607
1793
  } from "@ory/client-fetch";
1608
1794
  import {
1609
1795
  messageTestId as messageTestId3,
1610
1796
  uiTextToFormattedMessage as uiTextToFormattedMessage7,
1611
- useComponents as useComponents2,
1612
- useOryFlow as useOryFlow8
1797
+ useComponents as useComponents3,
1798
+ useOryFlow as useOryFlow9
1613
1799
  } from "@ory/elements-react";
1614
- import { useFormContext as useFormContext5 } from "react-hook-form";
1800
+ import { useFormContext as useFormContext6 } from "react-hook-form";
1615
1801
  import { useIntl as useIntl10 } from "react-intl";
1616
- import { jsx as jsx45, jsxs as jsxs25 } from "react/jsx-runtime";
1802
+ import { jsx as jsx46, jsxs as jsxs25 } from "react/jsx-runtime";
1617
1803
  function findResendNode(nodes) {
1618
1804
  return nodes.find(
1619
1805
  (n) => "name" in n.attributes && (n.attributes.name === "email" && n.attributes.type === "submit" || n.attributes.name === "resend")
@@ -1627,9 +1813,9 @@ function DefaultLabel({
1627
1813
  }) {
1628
1814
  const intl = useIntl10();
1629
1815
  const label = getNodeLabel4(node);
1630
- const { Message } = useComponents2();
1631
- const { config, flowType, flow } = useOryFlow8();
1632
- const { setValue, formState } = useFormContext5();
1816
+ const { Message } = useComponents3();
1817
+ const { config, flowType, flow } = useOryFlow9();
1818
+ const { setValue, formState } = useFormContext6();
1633
1819
  const isPassword = attributes.type === "password";
1634
1820
  const resendNode = findResendNode(flow.ui.nodes);
1635
1821
  const handleResend = () => {
@@ -1640,7 +1826,7 @@ function DefaultLabel({
1640
1826
  const fieldError = formState.errors[attributes.name];
1641
1827
  return /* @__PURE__ */ jsxs25("div", { className: "flex flex-col gap-1 antialiased", children: [
1642
1828
  label && /* @__PURE__ */ jsxs25("span", { className: "inline-flex justify-between", children: [
1643
- /* @__PURE__ */ jsx45(
1829
+ /* @__PURE__ */ jsx46(
1644
1830
  "label",
1645
1831
  {
1646
1832
  ...messageTestId3(label),
@@ -1651,8 +1837,8 @@ function DefaultLabel({
1651
1837
  children: uiTextToFormattedMessage7(label, intl)
1652
1838
  }
1653
1839
  ),
1654
- isPassword && config.project.recovery_enabled && flowType === FlowType6.Login && // TODO: make it possible to override with a custom component
1655
- /* @__PURE__ */ jsx45(
1840
+ isPassword && config.project.recovery_enabled && flowType === FlowType7.Login && // TODO: make it possible to override with a custom component
1841
+ /* @__PURE__ */ jsx46(
1656
1842
  "a",
1657
1843
  {
1658
1844
  href: initFlowUrl(config.sdk.url, "recovery", flow),
@@ -1663,7 +1849,7 @@ function DefaultLabel({
1663
1849
  })
1664
1850
  }
1665
1851
  ),
1666
- (resendNode == null ? void 0 : resendNode.attributes.node_type) === "input" && /* @__PURE__ */ jsx45(
1852
+ (resendNode == null ? void 0 : resendNode.attributes.node_type) === "input" && /* @__PURE__ */ jsx46(
1667
1853
  "button",
1668
1854
  {
1669
1855
  type: "submit",
@@ -1676,8 +1862,8 @@ function DefaultLabel({
1676
1862
  )
1677
1863
  ] }),
1678
1864
  children,
1679
- node.messages.map((message) => /* @__PURE__ */ jsx45(Message.Content, { message }, message.id)),
1680
- fieldError && instanceOfUiText(fieldError) && /* @__PURE__ */ jsx45(Message.Content, { message: fieldError })
1865
+ node.messages.map((message) => /* @__PURE__ */ jsx46(Message.Content, { message }, message.id)),
1866
+ fieldError && instanceOfUiText(fieldError) && /* @__PURE__ */ jsx46(Message.Content, { message: fieldError })
1681
1867
  ] });
1682
1868
  }
1683
1869
 
@@ -1688,11 +1874,11 @@ import {
1688
1874
  } from "@ory/elements-react";
1689
1875
  import { forwardRef } from "react";
1690
1876
  import { useIntl as useIntl11 } from "react-intl";
1691
- import { jsx as jsx46 } from "react/jsx-runtime";
1877
+ import { jsx as jsx47 } from "react/jsx-runtime";
1692
1878
  var DefaultLinkButton = forwardRef(({ attributes, node }, ref) => {
1693
1879
  const intl = useIntl11();
1694
1880
  const label = getNodeLabel5(node);
1695
- return /* @__PURE__ */ jsx46(
1881
+ return /* @__PURE__ */ jsx47(
1696
1882
  "a",
1697
1883
  {
1698
1884
  ...attributes,
@@ -1709,13 +1895,13 @@ var DefaultLinkButton = forwardRef(({ attributes, node }, ref) => {
1709
1895
  DefaultLinkButton.displayName = "DefaultLinkButton";
1710
1896
 
1711
1897
  // src/theme/default/components/form/pin-code-input.tsx
1712
- import { useFormContext as useFormContext6 } from "react-hook-form";
1898
+ import { useFormContext as useFormContext7 } from "react-hook-form";
1713
1899
 
1714
1900
  // src/theme/default/components/form/shadcn/otp-input.tsx
1715
1901
  import { OTPInput, OTPInputContext } from "input-otp";
1716
1902
  import * as React26 from "react";
1717
- import { jsx as jsx47, jsxs as jsxs26 } from "react/jsx-runtime";
1718
- var InputOTP = React26.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx47(
1903
+ import { jsx as jsx48, jsxs as jsxs26 } from "react/jsx-runtime";
1904
+ var InputOTP = React26.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx48(
1719
1905
  OTPInput,
1720
1906
  {
1721
1907
  ref,
@@ -1728,7 +1914,7 @@ var InputOTP = React26.forwardRef(({ className, containerClassName, ...props },
1728
1914
  }
1729
1915
  ));
1730
1916
  InputOTP.displayName = "InputOTP";
1731
- var InputOTPGroup = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx47("div", { ref, className: cn("flex items-center", className), ...props }));
1917
+ var InputOTPGroup = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx48("div", { ref, className: cn("flex items-center", className), ...props }));
1732
1918
  InputOTPGroup.displayName = "InputOTPGroup";
1733
1919
  var InputOTPSlot = React26.forwardRef(({ index, className, ...props }, ref) => {
1734
1920
  const inputOTPContext = React26.useContext(OTPInputContext);
@@ -1745,8 +1931,8 @@ var InputOTPSlot = React26.forwardRef(({ index, className, ...props }, ref) => {
1745
1931
  ),
1746
1932
  ...props,
1747
1933
  children: [
1748
- /* @__PURE__ */ jsx47("span", { className: "inline-block size-4", children: char }),
1749
- hasFakeCaret && /* @__PURE__ */ jsx47("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx47("div", { className: "h-4 w-px animate-caret-blink bg-interface-background-brand-primary duration-700" }) })
1934
+ /* @__PURE__ */ jsx48("span", { className: "inline-block size-4", children: char }),
1935
+ hasFakeCaret && /* @__PURE__ */ jsx48("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx48("div", { className: "h-4 w-px animate-caret-blink bg-interface-background-brand-primary duration-700" }) })
1750
1936
  ]
1751
1937
  }
1752
1938
  );
@@ -1754,34 +1940,34 @@ var InputOTPSlot = React26.forwardRef(({ index, className, ...props }, ref) => {
1754
1940
  InputOTPSlot.displayName = "InputOTPSlot";
1755
1941
 
1756
1942
  // src/theme/default/components/form/pin-code-input.tsx
1757
- import { useOryFlow as useOryFlow9 } from "@ory/elements-react";
1758
- import { FlowType as FlowType7 } from "@ory/client-fetch";
1759
- import { jsx as jsx48 } from "react/jsx-runtime";
1943
+ import { useOryFlow as useOryFlow10 } from "@ory/elements-react";
1944
+ import { FlowType as FlowType8 } from "@ory/client-fetch";
1945
+ import { jsx as jsx49 } from "react/jsx-runtime";
1760
1946
  var DefaultPinCodeInput = ({ attributes }) => {
1761
- const { setValue, watch } = useFormContext6();
1947
+ const { setValue, watch } = useFormContext7();
1762
1948
  const { maxlength, name } = attributes;
1763
1949
  const elements = maxlength != null ? maxlength : 6;
1764
- const { flowType } = useOryFlow9();
1950
+ const { flowType } = useOryFlow10();
1765
1951
  const handleInputChange = (v) => {
1766
1952
  setValue(name, v);
1767
1953
  };
1768
1954
  const value = watch(name);
1769
- return /* @__PURE__ */ jsx48(
1955
+ return /* @__PURE__ */ jsx49(
1770
1956
  InputOTP,
1771
1957
  {
1772
1958
  maxLength: maxlength != null ? maxlength : 6,
1773
1959
  onChange: handleInputChange,
1774
1960
  name,
1775
1961
  value,
1776
- children: /* @__PURE__ */ jsx48(
1962
+ children: /* @__PURE__ */ jsx49(
1777
1963
  InputOTPGroup,
1778
1964
  {
1779
1965
  className: cn(
1780
1966
  "w-full flex gap-2 justify-stretch",
1781
1967
  // The settings flow input fields are supposed to be dense, so we don't need the extra padding we want on the user flows.
1782
- flowType === FlowType7.Settings && "max-w-[488px]"
1968
+ flowType === FlowType8.Settings && "max-w-[488px]"
1783
1969
  ),
1784
- children: [...Array(elements)].map((_, index) => /* @__PURE__ */ jsx48(InputOTPSlot, { index }, index))
1970
+ children: [...Array(elements)].map((_, index) => /* @__PURE__ */ jsx49(InputOTPSlot, { index }, index))
1785
1971
  }
1786
1972
  )
1787
1973
  }
@@ -1789,13 +1975,13 @@ var DefaultPinCodeInput = ({ attributes }) => {
1789
1975
  };
1790
1976
 
1791
1977
  // src/theme/default/components/form/section.tsx
1792
- import { jsx as jsx49, jsxs as jsxs27 } from "react/jsx-runtime";
1978
+ import { jsx as jsx50, jsxs as jsxs27 } from "react/jsx-runtime";
1793
1979
  var DefaultFormSection = ({
1794
1980
  children,
1795
1981
  nodes: _nodes,
1796
1982
  ...rest
1797
1983
  }) => {
1798
- return /* @__PURE__ */ jsx49(
1984
+ return /* @__PURE__ */ jsx50(
1799
1985
  "form",
1800
1986
  {
1801
1987
  className: "flex w-full max-w-screen-sm flex-col md:max-w-[712px] lg:max-w-[802px] xl:max-w-[896px] px-4",
@@ -1811,8 +1997,8 @@ var DefaultFormSectionContent = ({
1811
1997
  }) => {
1812
1998
  return /* @__PURE__ */ jsxs27("div", { className: "flex flex-col gap-8 rounded-t-cards border border-b-0 border-interface-border-default-primary bg-interface-background-default-primary px-6 py-8", children: [
1813
1999
  /* @__PURE__ */ jsxs27("div", { className: "flex flex-col gap-2", children: [
1814
- /* @__PURE__ */ jsx49("h3", { className: "font-medium text-interface-foreground-default-primary", children: title }),
1815
- /* @__PURE__ */ jsx49("span", { className: "text-interface-foreground-default-secondary", children: description })
2000
+ /* @__PURE__ */ jsx50("h3", { className: "font-medium text-interface-foreground-default-primary", children: title }),
2001
+ /* @__PURE__ */ jsx50("span", { className: "text-interface-foreground-default-secondary", children: description })
1816
2002
  ] }),
1817
2003
  children
1818
2004
  ] });
@@ -1828,7 +2014,7 @@ var DefaultFormSectionFooter = ({
1828
2014
  "flex min-h-[72px] items-center justify-between gap-2 rounded-b-cards border border-interface-border-default-primary bg-interface-background-default-secondary px-6 py-4 text-interface-foreground-default-tertiary"
1829
2015
  ),
1830
2016
  children: [
1831
- /* @__PURE__ */ jsx49("span", { children: text }),
2017
+ /* @__PURE__ */ jsx50("span", { children: text }),
1832
2018
  children
1833
2019
  ]
1834
2020
  }
@@ -1838,31 +2024,31 @@ var DefaultFormSectionFooter = ({
1838
2024
  // src/theme/default/components/form/text.tsx
1839
2025
  import { uiTextToFormattedMessage as uiTextToFormattedMessage9 } from "@ory/elements-react";
1840
2026
  import { useIntl as useIntl12 } from "react-intl";
1841
- import { Fragment as Fragment4, jsx as jsx50, jsxs as jsxs28 } from "react/jsx-runtime";
2027
+ import { Fragment as Fragment4, jsx as jsx51, jsxs as jsxs28 } from "react/jsx-runtime";
1842
2028
  function DefaultText({ node, attributes }) {
1843
2029
  var _a;
1844
2030
  const intl = useIntl12();
1845
2031
  const lookup = (_a = attributes.text.context) == null ? void 0 : _a.secrets;
1846
2032
  if (lookup) {
1847
2033
  return /* @__PURE__ */ jsxs28(Fragment4, { children: [
1848
- /* @__PURE__ */ jsx50("p", { "data-testid": `ory/form/node/text/${attributes.id}/label`, children: node.meta.label ? uiTextToFormattedMessage9(node.meta.label, intl) : "" }),
1849
- lookup.map((text, index) => /* @__PURE__ */ jsx50(
2034
+ /* @__PURE__ */ jsx51("p", { "data-testid": `ory/form/node/text/${attributes.id}/label`, children: node.meta.label ? uiTextToFormattedMessage9(node.meta.label, intl) : "" }),
2035
+ lookup.map((text, index) => /* @__PURE__ */ jsx51(
1850
2036
  "pre",
1851
2037
  {
1852
2038
  "data-testid": `ory/form/node/text/lookup_secret_codes/text`,
1853
- children: /* @__PURE__ */ jsx50("code", { children: text ? uiTextToFormattedMessage9(text, intl) : "" })
2039
+ children: /* @__PURE__ */ jsx51("code", { children: text ? uiTextToFormattedMessage9(text, intl) : "" })
1854
2040
  },
1855
2041
  index
1856
2042
  ))
1857
2043
  ] });
1858
2044
  }
1859
- return /* @__PURE__ */ jsx50(Fragment4, { children: /* @__PURE__ */ jsxs28(
2045
+ return /* @__PURE__ */ jsx51(Fragment4, { children: /* @__PURE__ */ jsxs28(
1860
2046
  "p",
1861
2047
  {
1862
2048
  "data-testid": `ory/form/node/text/${attributes.id}/label`,
1863
2049
  id: attributes.id,
1864
2050
  children: [
1865
- node.meta.label ? /* @__PURE__ */ jsx50("label", { children: uiTextToFormattedMessage9(node.meta.label, intl) }) : null,
2051
+ node.meta.label ? /* @__PURE__ */ jsx51("label", { children: uiTextToFormattedMessage9(node.meta.label, intl) }) : null,
1866
2052
  attributes.text ? uiTextToFormattedMessage9(attributes.text, intl) : ""
1867
2053
  ]
1868
2054
  }
@@ -1870,29 +2056,29 @@ function DefaultText({ node, attributes }) {
1870
2056
  }
1871
2057
 
1872
2058
  // src/theme/default/components/generic/page-header.tsx
1873
- import { useComponents as useComponents3 } from "@ory/elements-react";
2059
+ import { useComponents as useComponents4 } from "@ory/elements-react";
1874
2060
 
1875
2061
  // src/theme/default/components/ui/user-menu.tsx
1876
- import { useOryFlow as useOryFlow10 } from "@ory/elements-react";
2062
+ import { useOryFlow as useOryFlow11 } from "@ory/elements-react";
1877
2063
  import { DropdownMenuLabel as DropdownMenuLabel2 } from "@radix-ui/react-dropdown-menu";
1878
2064
 
1879
2065
  // src/theme/default/assets/icons/logout.svg
1880
2066
  import * as React27 from "react";
1881
- import { jsx as jsx51 } from "react/jsx-runtime";
2067
+ import { jsx as jsx52 } from "react/jsx-runtime";
1882
2068
  var SvgLogout = (props) => {
1883
2069
  var _a, _b;
1884
- return /* @__PURE__ */ jsx51("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx51("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.333 5.334V4A1.333 1.333 0 0 0 8 2.667H3.333A1.333 1.333 0 0 0 2 4v8a1.333 1.333 0 0 0 1.333 1.334H8A1.333 1.333 0 0 0 9.333 12v-1.333M4.667 8H14m0 0-2-2m2 2-2 2" }) });
2070
+ return /* @__PURE__ */ jsx52("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx52("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.333 5.334V4A1.333 1.333 0 0 0 8 2.667H3.333A1.333 1.333 0 0 0 2 4v8a1.333 1.333 0 0 0 1.333 1.334H8A1.333 1.333 0 0 0 9.333 12v-1.333M4.667 8H14m0 0-2-2m2 2-2 2" }) });
1885
2071
  };
1886
2072
  var logout_default = SvgLogout;
1887
2073
 
1888
2074
  // src/theme/default/assets/icons/settings.svg
1889
2075
  import * as React28 from "react";
1890
- import { jsx as jsx52, jsxs as jsxs29 } from "react/jsx-runtime";
2076
+ import { jsx as jsx53, jsxs as jsxs29 } from "react/jsx-runtime";
1891
2077
  var SvgSettings = (props) => {
1892
2078
  var _a, _b;
1893
- return /* @__PURE__ */ jsx52("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsxs29("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", children: [
1894
- /* @__PURE__ */ jsx52("path", { d: "M6.883 2.878c.284-1.17 1.95-1.17 2.234 0a1.15 1.15 0 0 0 1.715.71c1.029-.626 2.207.551 1.58 1.58a1.148 1.148 0 0 0 .71 1.715c1.17.284 1.17 1.95 0 2.234a1.15 1.15 0 0 0-.71 1.715c.626 1.029-.551 2.207-1.58 1.58a1.148 1.148 0 0 0-1.715.71c-.284 1.17-1.95 1.17-2.234 0a1.15 1.15 0 0 0-1.715-.71c-1.029.626-2.207-.551-1.58-1.58a1.15 1.15 0 0 0-.71-1.715c-1.17-.284-1.17-1.95 0-2.234a1.15 1.15 0 0 0 .71-1.715c-.626-1.029.551-2.207 1.58-1.58.667.405 1.531.047 1.715-.71" }),
1895
- /* @__PURE__ */ jsx52("path", { d: "M6 8a2 2 0 1 0 4 0 2 2 0 0 0-4 0" })
2079
+ return /* @__PURE__ */ jsx53("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsxs29("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", children: [
2080
+ /* @__PURE__ */ jsx53("path", { d: "M6.883 2.878c.284-1.17 1.95-1.17 2.234 0a1.15 1.15 0 0 0 1.715.71c1.029-.626 2.207.551 1.58 1.58a1.148 1.148 0 0 0 .71 1.715c1.17.284 1.17 1.95 0 2.234a1.15 1.15 0 0 0-.71 1.715c.626 1.029-.551 2.207-1.58 1.58a1.148 1.148 0 0 0-1.715.71c-.284 1.17-1.95 1.17-2.234 0a1.15 1.15 0 0 0-1.715-.71c-1.029.626-2.207-.551-1.58-1.58a1.15 1.15 0 0 0-.71-1.715c-1.17-.284-1.17-1.95 0-2.234a1.15 1.15 0 0 0 .71-1.715c-.626-1.029.551-2.207 1.58-1.58.667.405 1.531.047 1.715-.71" }),
2081
+ /* @__PURE__ */ jsx53("path", { d: "M6 8a2 2 0 1 0 4 0 2 2 0 0 0-4 0" })
1896
2082
  ] }) });
1897
2083
  };
1898
2084
  var settings_default = SvgSettings;
@@ -1972,10 +2158,10 @@ var getUserInitials = (session) => {
1972
2158
  // src/theme/default/components/ui/dropdown-menu.tsx
1973
2159
  import { forwardRef as forwardRef3 } from "react";
1974
2160
  import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
1975
- import { jsx as jsx53 } from "react/jsx-runtime";
2161
+ import { jsx as jsx54 } from "react/jsx-runtime";
1976
2162
  var DropdownMenu = DropdownMenuPrimitive.Root;
1977
2163
  var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
1978
- var DropdownMenuContent = forwardRef3(({ className, sideOffset = 16, ...props }, ref) => /* @__PURE__ */ jsx53(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx53(
2164
+ var DropdownMenuContent = forwardRef3(({ className, sideOffset = 16, ...props }, ref) => /* @__PURE__ */ jsx54(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx54(
1979
2165
  DropdownMenuPrimitive.Content,
1980
2166
  {
1981
2167
  ref,
@@ -1990,7 +2176,7 @@ var DropdownMenuContent = forwardRef3(({ className, sideOffset = 16, ...props },
1990
2176
  }
1991
2177
  ) }));
1992
2178
  DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
1993
- var DropdownMenuItem = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx53(
2179
+ var DropdownMenuItem = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx54(
1994
2180
  DropdownMenuPrimitive.Item,
1995
2181
  {
1996
2182
  ref,
@@ -2008,7 +2194,7 @@ var DropdownMenuItem = forwardRef3(({ className, inset, ...props }, ref) => /* @
2008
2194
  }
2009
2195
  ));
2010
2196
  DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
2011
- var DropdownMenuLabel = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx53(
2197
+ var DropdownMenuLabel = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx54(
2012
2198
  DropdownMenuPrimitive.Label,
2013
2199
  {
2014
2200
  ref,
@@ -2027,31 +2213,31 @@ import { forwardRef as forwardRef4 } from "react";
2027
2213
 
2028
2214
  // src/theme/default/assets/icons/user.svg
2029
2215
  import * as React29 from "react";
2030
- import { jsx as jsx54 } from "react/jsx-runtime";
2216
+ import { jsx as jsx55 } from "react/jsx-runtime";
2031
2217
  var SvgUser = (props) => {
2032
2218
  var _a, _b;
2033
- return /* @__PURE__ */ jsx54("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx54("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M6 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2M8 7a4 4 0 1 0 8 0 4 4 0 0 0-8 0" }) });
2219
+ return /* @__PURE__ */ jsx55("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx55("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M6 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2M8 7a4 4 0 1 0 8 0 4 4 0 0 0-8 0" }) });
2034
2220
  };
2035
2221
  var user_default = SvgUser;
2036
2222
 
2037
2223
  // src/theme/default/components/ui/user-avater.tsx
2038
- import { jsx as jsx55 } from "react/jsx-runtime";
2224
+ import { jsx as jsx56 } from "react/jsx-runtime";
2039
2225
  var UserAvatar = forwardRef4(
2040
2226
  ({ initials, ...rest }, ref) => {
2041
- return /* @__PURE__ */ jsx55(
2227
+ return /* @__PURE__ */ jsx56(
2042
2228
  "button",
2043
2229
  {
2044
2230
  ref,
2045
2231
  className: "relative flex size-10 items-center justify-center overflow-hidden rounded-[999px] bg-button-primary-background-default hover:bg-button-primary-background-hover",
2046
2232
  ...rest,
2047
- children: /* @__PURE__ */ jsx55("div", { className: "relative flex size-full items-center justify-center", children: initials.avatar ? /* @__PURE__ */ jsx55(
2233
+ children: /* @__PURE__ */ jsx56("div", { className: "relative flex size-full items-center justify-center", children: initials.avatar ? /* @__PURE__ */ jsx56(
2048
2234
  "img",
2049
2235
  {
2050
2236
  src: initials.avatar,
2051
2237
  alt: initials.primary,
2052
2238
  className: "w-full object-contain"
2053
2239
  }
2054
- ) : /* @__PURE__ */ jsx55(
2240
+ ) : /* @__PURE__ */ jsx56(
2055
2241
  user_default,
2056
2242
  {
2057
2243
  size: 24,
@@ -2065,27 +2251,27 @@ var UserAvatar = forwardRef4(
2065
2251
  UserAvatar.displayName = "UserAvatar";
2066
2252
 
2067
2253
  // src/theme/default/components/ui/user-menu.tsx
2068
- import { jsx as jsx56, jsxs as jsxs30 } from "react/jsx-runtime";
2254
+ import { jsx as jsx57, jsxs as jsxs30 } from "react/jsx-runtime";
2069
2255
  var UserMenu = ({ session }) => {
2070
- const { config } = useOryFlow10();
2256
+ const { config } = useOryFlow11();
2071
2257
  const initials = getUserInitials(session);
2072
2258
  const logoutFlow = useClientLogout(config);
2073
2259
  return /* @__PURE__ */ jsxs30(DropdownMenu, { children: [
2074
- /* @__PURE__ */ jsx56(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx56(UserAvatar, { initials }) }),
2260
+ /* @__PURE__ */ jsx57(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx57(UserAvatar, { initials, title: "User Menu" }) }),
2075
2261
  /* @__PURE__ */ jsxs30(DropdownMenuContent, { children: [
2076
2262
  /* @__PURE__ */ jsxs30(DropdownMenuLabel2, { className: "flex gap-3 px-5 py-4.5", children: [
2077
- /* @__PURE__ */ jsx56(UserAvatar, { disabled: true, initials }),
2263
+ /* @__PURE__ */ jsx57(UserAvatar, { disabled: true, initials }),
2078
2264
  /* @__PURE__ */ jsxs30("div", { className: "flex flex-col justify-center text-sm leading-tight", children: [
2079
- /* @__PURE__ */ jsx56("div", { className: "text-interface-foreground-default-primary leading-tight font-medium", children: initials.primary }),
2080
- initials.secondary && /* @__PURE__ */ jsx56("div", { className: "text-interface-foreground-default-tertiary leading-tight", children: initials.secondary })
2265
+ /* @__PURE__ */ jsx57("div", { className: "text-interface-foreground-default-primary leading-tight font-medium", children: initials.primary }),
2266
+ initials.secondary && /* @__PURE__ */ jsx57("div", { className: "text-interface-foreground-default-tertiary leading-tight", children: initials.secondary })
2081
2267
  ] })
2082
2268
  ] }),
2083
- /* @__PURE__ */ jsx56(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsxs30("a", { href: "/settings", children: [
2084
- /* @__PURE__ */ jsx56(settings_default, { size: 16 }),
2269
+ /* @__PURE__ */ jsx57(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsxs30("a", { href: "/settings", children: [
2270
+ /* @__PURE__ */ jsx57(settings_default, { size: 16 }),
2085
2271
  " User settings"
2086
2272
  ] }) }),
2087
- /* @__PURE__ */ jsx56(DropdownMenuItem, { asChild: true, disabled: !(logoutFlow == null ? void 0 : logoutFlow.logout_url), children: /* @__PURE__ */ jsxs30("a", { href: logoutFlow == null ? void 0 : logoutFlow.logout_url, children: [
2088
- /* @__PURE__ */ jsx56(logout_default, { size: 16 }),
2273
+ /* @__PURE__ */ jsx57(DropdownMenuItem, { asChild: true, disabled: !(logoutFlow == null ? void 0 : logoutFlow.logout_url), children: /* @__PURE__ */ jsxs30("a", { href: logoutFlow == null ? void 0 : logoutFlow.logout_url, children: [
2274
+ /* @__PURE__ */ jsx57(logout_default, { size: 16 }),
2089
2275
  " Logout"
2090
2276
  ] }) })
2091
2277
  ] })
@@ -2094,32 +2280,32 @@ var UserMenu = ({ session }) => {
2094
2280
 
2095
2281
  // src/theme/default/components/generic/page-header.tsx
2096
2282
  import { useSession } from "@ory/elements-react/client";
2097
- import { jsx as jsx57, jsxs as jsxs31 } from "react/jsx-runtime";
2283
+ import { jsx as jsx58, jsxs as jsxs31 } from "react/jsx-runtime";
2098
2284
  var DefaultPageHeader = (_props) => {
2099
- const { Card } = useComponents3();
2285
+ const { Card } = useComponents4();
2100
2286
  const { session } = useSession();
2101
- return /* @__PURE__ */ jsx57("div", { className: "mt-16 flex max-w-screen-sm w-full md:max-w-[712px] lg:max-w-[802px] xl:max-w-[896px] flex-col gap-3 px-4", children: /* @__PURE__ */ jsx57("div", { className: "flex flex-col gap-12", children: /* @__PURE__ */ jsxs31("div", { className: "flex max-h-10 flex-1 justify-between gap-2", children: [
2102
- /* @__PURE__ */ jsx57("div", { className: "relative h-10 flex-1", children: /* @__PURE__ */ jsx57(Card.Logo, {}) }),
2103
- /* @__PURE__ */ jsx57(UserMenu, { session })
2287
+ return /* @__PURE__ */ jsx58("div", { className: "mt-16 flex max-w-screen-sm w-full md:max-w-[712px] lg:max-w-[802px] xl:max-w-[896px] flex-col gap-3 px-4", children: /* @__PURE__ */ jsx58("div", { className: "flex flex-col gap-12", children: /* @__PURE__ */ jsxs31("div", { className: "flex max-h-10 flex-1 justify-between gap-2", children: [
2288
+ /* @__PURE__ */ jsx58("div", { className: "relative h-10 flex-1", children: /* @__PURE__ */ jsx58(Card.Logo, {}) }),
2289
+ /* @__PURE__ */ jsx58(UserMenu, { session })
2104
2290
  ] }) }) });
2105
2291
  };
2106
2292
 
2107
2293
  // src/theme/default/components/settings/settings-oidc.tsx
2108
2294
  import { useEffect as useEffect4 } from "react";
2109
- import { useFormContext as useFormContext7 } from "react-hook-form";
2295
+ import { useFormContext as useFormContext8 } from "react-hook-form";
2110
2296
  import { useDebounceValue as useDebounceValue2 } from "usehooks-ts";
2111
2297
 
2112
2298
  // src/theme/default/assets/icons/trash.svg
2113
2299
  import * as React30 from "react";
2114
- import { jsx as jsx58 } from "react/jsx-runtime";
2300
+ import { jsx as jsx59 } from "react/jsx-runtime";
2115
2301
  var SvgTrash = (props) => {
2116
2302
  var _a, _b;
2117
- return /* @__PURE__ */ jsx58("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx58("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 7h16m-10 4v6m4-6v6M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2l1-12M9 7V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3" }) });
2303
+ return /* @__PURE__ */ jsx59("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx59("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 7h16m-10 4v6m4-6v6M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2l1-12M9 7V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3" }) });
2118
2304
  };
2119
2305
  var trash_default = SvgTrash;
2120
2306
 
2121
2307
  // src/theme/default/components/settings/settings-oidc.tsx
2122
- import { jsx as jsx59, jsxs as jsxs32 } from "react/jsx-runtime";
2308
+ import { jsx as jsx60, jsxs as jsxs32 } from "react/jsx-runtime";
2123
2309
  function DefaultSettingsOidc({
2124
2310
  linkButtons,
2125
2311
  unlinkButtons
@@ -2127,9 +2313,9 @@ function DefaultSettingsOidc({
2127
2313
  const hasLinkButtons = linkButtons.length > 0;
2128
2314
  const hasUnlinkButtons = unlinkButtons.length > 0;
2129
2315
  return /* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-8", children: [
2130
- hasLinkButtons && /* @__PURE__ */ jsx59("div", { className: "grid items-start gap-3 grid-cols-1 sm:grid-cols-2 md:grid-cols-3", children: linkButtons.map((button) => {
2316
+ hasLinkButtons && /* @__PURE__ */ jsx60("div", { className: "grid items-start gap-3 grid-cols-1 sm:grid-cols-2 md:grid-cols-3", children: linkButtons.map((button) => {
2131
2317
  const attrs = button.attributes;
2132
- return /* @__PURE__ */ jsx59(
2318
+ return /* @__PURE__ */ jsx60(
2133
2319
  DefaultButtonSocial,
2134
2320
  {
2135
2321
  showLabel: true,
@@ -2140,12 +2326,12 @@ function DefaultSettingsOidc({
2140
2326
  attrs.value
2141
2327
  );
2142
2328
  }) }),
2143
- hasUnlinkButtons && hasLinkButtons ? /* @__PURE__ */ jsx59(DefaultHorizontalDivider, {}) : null,
2329
+ hasUnlinkButtons && hasLinkButtons ? /* @__PURE__ */ jsx60(DefaultHorizontalDivider, {}) : null,
2144
2330
  unlinkButtons.map((button) => {
2145
2331
  if (button.attributes.node_type !== "input") {
2146
2332
  return null;
2147
2333
  }
2148
- return /* @__PURE__ */ jsx59(UnlinkRow, { button }, button.attributes.value);
2334
+ return /* @__PURE__ */ jsx60(UnlinkRow, { button }, button.attributes.value);
2149
2335
  })
2150
2336
  ] });
2151
2337
  }
@@ -2154,7 +2340,7 @@ function UnlinkRow({ button }) {
2154
2340
  const [clicked, setClicked] = useDebounceValue2(false, 100);
2155
2341
  const {
2156
2342
  formState: { isSubmitting }
2157
- } = useFormContext7();
2343
+ } = useFormContext8();
2158
2344
  const attrs = button.attributes;
2159
2345
  const provider = (_b = extractProvider((_a = button.meta.label) == null ? void 0 : _a.context)) != null ? _b : "";
2160
2346
  const Logo = provider_logos_default[attrs.value.split("-")[0]];
@@ -2169,10 +2355,10 @@ function UnlinkRow({ button }) {
2169
2355
  }, [isSubmitting, setClicked]);
2170
2356
  return /* @__PURE__ */ jsxs32("div", { className: "flex justify-between", children: [
2171
2357
  /* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-6", children: [
2172
- Logo ? /* @__PURE__ */ jsx59(Logo, { size: 32 }) : /* @__PURE__ */ jsx59(provider_logos_default.generic, { size: 32 }),
2173
- /* @__PURE__ */ jsx59("p", { className: "text-sm font-medium text-interface-foreground-default-secondary", children: provider })
2358
+ Logo ? /* @__PURE__ */ jsx60(Logo, { size: 32 }) : /* @__PURE__ */ jsx60(provider_logos_default.generic, { size: 32 }),
2359
+ /* @__PURE__ */ jsx60("p", { className: "text-sm font-medium text-interface-foreground-default-secondary", children: provider })
2174
2360
  ] }),
2175
- /* @__PURE__ */ jsx59(
2361
+ /* @__PURE__ */ jsx60(
2176
2362
  "button",
2177
2363
  {
2178
2364
  ...attrs,
@@ -2181,7 +2367,7 @@ function UnlinkRow({ button }) {
2181
2367
  disabled: isSubmitting,
2182
2368
  className: "relative",
2183
2369
  title: `Unlink ${provider}`,
2184
- children: clicked ? /* @__PURE__ */ jsx59(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx59(
2370
+ children: clicked ? /* @__PURE__ */ jsx60(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx60(
2185
2371
  trash_default,
2186
2372
  {
2187
2373
  className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
@@ -2194,20 +2380,20 @@ function UnlinkRow({ button }) {
2194
2380
  }
2195
2381
 
2196
2382
  // src/theme/default/components/settings/settings-passkey.tsx
2197
- import { useComponents as useComponents4 } from "@ory/elements-react";
2198
- import { useFormContext as useFormContext8 } from "react-hook-form";
2199
- import { jsx as jsx60, jsxs as jsxs33 } from "react/jsx-runtime";
2383
+ import { useComponents as useComponents5 } from "@ory/elements-react";
2384
+ import { useFormContext as useFormContext9 } from "react-hook-form";
2385
+ import { jsx as jsx61, jsxs as jsxs33 } from "react/jsx-runtime";
2200
2386
  function DefaultSettingsPasskey({
2201
2387
  triggerButton,
2202
2388
  removeButtons
2203
2389
  }) {
2204
2390
  const {
2205
2391
  formState: { isSubmitting }
2206
- } = useFormContext8();
2207
- const { Node: Node2 } = useComponents4();
2392
+ } = useFormContext9();
2393
+ const { Node: Node2 } = useComponents5();
2208
2394
  const hasRemoveButtons = removeButtons.length > 0;
2209
2395
  return /* @__PURE__ */ jsxs33("div", { className: "flex flex-col gap-8", children: [
2210
- /* @__PURE__ */ jsx60("div", { className: "flex max-w-[60%] items-end gap-3", children: triggerButton && /* @__PURE__ */ jsx60(
2396
+ /* @__PURE__ */ jsx61("div", { className: "flex max-w-[60%] items-end gap-3", children: triggerButton && /* @__PURE__ */ jsx61(
2211
2397
  Node2.Button,
2212
2398
  {
2213
2399
  node: triggerButton,
@@ -2216,8 +2402,8 @@ function DefaultSettingsPasskey({
2216
2402
  }
2217
2403
  ) }),
2218
2404
  hasRemoveButtons ? /* @__PURE__ */ jsxs33("div", { className: "flex flex-col gap-8", children: [
2219
- /* @__PURE__ */ jsx60(DefaultHorizontalDivider, {}),
2220
- /* @__PURE__ */ jsx60("div", { className: "flex flex-col gap-2", children: removeButtons.map((node, i) => {
2405
+ /* @__PURE__ */ jsx61(DefaultHorizontalDivider, {}),
2406
+ /* @__PURE__ */ jsx61("div", { className: "flex flex-col gap-2", children: removeButtons.map((node, i) => {
2221
2407
  var _a, _b;
2222
2408
  const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
2223
2409
  const addedAt = "added_at" in context ? context.added_at : null;
@@ -2229,7 +2415,7 @@ function DefaultSettingsPasskey({
2229
2415
  className: "flex justify-between gap-6 md:items-center",
2230
2416
  children: [
2231
2417
  /* @__PURE__ */ jsxs33("div", { className: "flex gap-2 items-center flex-1 truncate", children: [
2232
- /* @__PURE__ */ jsx60(
2418
+ /* @__PURE__ */ jsx61(
2233
2419
  passkey_default,
2234
2420
  {
2235
2421
  size: 32,
@@ -2238,15 +2424,15 @@ function DefaultSettingsPasskey({
2238
2424
  ),
2239
2425
  /* @__PURE__ */ jsxs33("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4 truncate", children: [
2240
2426
  /* @__PURE__ */ jsxs33("div", { className: "flex-1 flex-col truncate", children: [
2241
- /* @__PURE__ */ jsx60("p", { className: "text-sm font-medium text-interface-foreground-default-secondary truncate", children: displayName }),
2242
- /* @__PURE__ */ jsx60("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block truncate", children: keyId })
2427
+ /* @__PURE__ */ jsx61("p", { className: "text-sm font-medium text-interface-foreground-default-secondary truncate", children: displayName }),
2428
+ /* @__PURE__ */ jsx61("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block truncate", children: keyId })
2243
2429
  ] }),
2244
- addedAt && /* @__PURE__ */ jsx60("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
2430
+ addedAt && /* @__PURE__ */ jsx61("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
2245
2431
  dateStyle: "long"
2246
2432
  }).format(new Date(addedAt)) })
2247
2433
  ] })
2248
2434
  ] }),
2249
- /* @__PURE__ */ jsx60(
2435
+ /* @__PURE__ */ jsx61(
2250
2436
  "button",
2251
2437
  {
2252
2438
  ...node.attributes,
@@ -2254,7 +2440,7 @@ function DefaultSettingsPasskey({
2254
2440
  onClick: node.onClick,
2255
2441
  disabled: isSubmitting,
2256
2442
  className: "relative",
2257
- children: isSubmitting ? /* @__PURE__ */ jsx60(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx60(
2443
+ children: isSubmitting ? /* @__PURE__ */ jsx61(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx61(
2258
2444
  trash_default,
2259
2445
  {
2260
2446
  className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
@@ -2274,25 +2460,25 @@ function DefaultSettingsPasskey({
2274
2460
 
2275
2461
  // src/theme/default/assets/icons/download.svg
2276
2462
  import * as React31 from "react";
2277
- import { jsx as jsx61 } from "react/jsx-runtime";
2463
+ import { jsx as jsx62 } from "react/jsx-runtime";
2278
2464
  var SvgDownload = (props) => {
2279
2465
  var _a, _b;
2280
- return /* @__PURE__ */ jsx61("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ jsx61("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5m0 0 5-5m-5 5V4" }) });
2466
+ return /* @__PURE__ */ jsx62("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ jsx62("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5m0 0 5-5m-5 5V4" }) });
2281
2467
  };
2282
2468
  var download_default = SvgDownload;
2283
2469
 
2284
2470
  // src/theme/default/assets/icons/refresh.svg
2285
2471
  import * as React32 from "react";
2286
- import { jsx as jsx62 } from "react/jsx-runtime";
2472
+ import { jsx as jsx63 } from "react/jsx-runtime";
2287
2473
  var SvgRefresh = (props) => {
2288
2474
  var _a, _b;
2289
- return /* @__PURE__ */ jsx62("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ jsx62("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4m-4 4a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4" }) });
2475
+ return /* @__PURE__ */ jsx63("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ jsx63("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4m-4 4a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4" }) });
2290
2476
  };
2291
2477
  var refresh_default = SvgRefresh;
2292
2478
 
2293
2479
  // src/theme/default/components/settings/settings-recovery-codes.tsx
2294
- import { useFormContext as useFormContext9 } from "react-hook-form";
2295
- import { Fragment as Fragment5, jsx as jsx63, jsxs as jsxs34 } from "react/jsx-runtime";
2480
+ import { useFormContext as useFormContext10 } from "react-hook-form";
2481
+ import { Fragment as Fragment5, jsx as jsx64, jsxs as jsxs34 } from "react/jsx-runtime";
2296
2482
  function DefaultSettingsRecoveryCodes({
2297
2483
  codes,
2298
2484
  regnerateButton,
@@ -2302,7 +2488,7 @@ function DefaultSettingsRecoveryCodes({
2302
2488
  }) {
2303
2489
  const {
2304
2490
  formState: { isSubmitting }
2305
- } = useFormContext9();
2491
+ } = useFormContext10();
2306
2492
  const onDownload = () => {
2307
2493
  const element = document.createElement("a");
2308
2494
  const file = new Blob([codes.join("\n")], {
@@ -2315,11 +2501,11 @@ function DefaultSettingsRecoveryCodes({
2315
2501
  };
2316
2502
  const hasCodes = codes.length >= 1;
2317
2503
  return /* @__PURE__ */ jsxs34("div", { className: "flex flex-col gap-8", children: [
2318
- codes.length > 0 && /* @__PURE__ */ jsx63(DefaultHorizontalDivider, {}),
2504
+ codes.length > 0 && /* @__PURE__ */ jsx64(DefaultHorizontalDivider, {}),
2319
2505
  /* @__PURE__ */ jsxs34("div", { className: "flex gap-4 justify-between", children: [
2320
- /* @__PURE__ */ jsx63("span", { className: "text-interface-foreground-default-tertiary", children: revealButton && "Reveal recovery codes" }),
2506
+ /* @__PURE__ */ jsx64("span", { className: "text-interface-foreground-default-tertiary", children: revealButton && "Reveal recovery codes" }),
2321
2507
  /* @__PURE__ */ jsxs34("div", { className: "flex gap-2", children: [
2322
- regnerateButton && codes.length > 0 && /* @__PURE__ */ jsx63(
2508
+ regnerateButton && codes.length > 0 && /* @__PURE__ */ jsx64(
2323
2509
  "button",
2324
2510
  {
2325
2511
  ...regnerateButton.attributes,
@@ -2328,7 +2514,7 @@ function DefaultSettingsRecoveryCodes({
2328
2514
  onClick: onRegenerate,
2329
2515
  disabled: isSubmitting,
2330
2516
  "data-loading": isSubmitting,
2331
- children: /* @__PURE__ */ jsx63(
2517
+ children: /* @__PURE__ */ jsx64(
2332
2518
  refresh_default,
2333
2519
  {
2334
2520
  size: 24,
@@ -2337,7 +2523,7 @@ function DefaultSettingsRecoveryCodes({
2337
2523
  )
2338
2524
  }
2339
2525
  ),
2340
- revealButton && /* @__PURE__ */ jsx63(Fragment5, { children: /* @__PURE__ */ jsx63(
2526
+ revealButton && /* @__PURE__ */ jsx64(Fragment5, { children: /* @__PURE__ */ jsx64(
2341
2527
  "button",
2342
2528
  {
2343
2529
  ...revealButton.attributes,
@@ -2345,7 +2531,7 @@ function DefaultSettingsRecoveryCodes({
2345
2531
  className: "ml-auto",
2346
2532
  onClick: onReveal,
2347
2533
  title: "Reveal recovery codes",
2348
- children: /* @__PURE__ */ jsx63(
2534
+ children: /* @__PURE__ */ jsx64(
2349
2535
  eye_default,
2350
2536
  {
2351
2537
  size: 24,
@@ -2354,7 +2540,7 @@ function DefaultSettingsRecoveryCodes({
2354
2540
  )
2355
2541
  }
2356
2542
  ) }),
2357
- hasCodes && /* @__PURE__ */ jsx63(
2543
+ hasCodes && /* @__PURE__ */ jsx64(
2358
2544
  "button",
2359
2545
  {
2360
2546
  onClick: onDownload,
@@ -2362,7 +2548,7 @@ function DefaultSettingsRecoveryCodes({
2362
2548
  className: "ml-auto",
2363
2549
  "data-testid": "ory/screen/settings/group/recovery_code/download",
2364
2550
  title: "Download recovery codes",
2365
- children: /* @__PURE__ */ jsx63(
2551
+ children: /* @__PURE__ */ jsx64(
2366
2552
  download_default,
2367
2553
  {
2368
2554
  size: 24,
@@ -2373,32 +2559,32 @@ function DefaultSettingsRecoveryCodes({
2373
2559
  )
2374
2560
  ] })
2375
2561
  ] }),
2376
- hasCodes ? /* @__PURE__ */ jsx63("div", { className: "rounded-general p-6 bg-interface-background-default-secondary border-interface-border-default-primary", children: /* @__PURE__ */ jsx63(
2562
+ hasCodes ? /* @__PURE__ */ jsx64("div", { className: "rounded-general p-6 bg-interface-background-default-secondary border-interface-border-default-primary", children: /* @__PURE__ */ jsx64(
2377
2563
  "div",
2378
2564
  {
2379
2565
  className: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-5 flex-wrap gap-4 text-sm text-interface-foreground-default-primary",
2380
2566
  "data-testid": "ory/screen/settings/group/recovery_code/codes",
2381
- children: codes.map((code) => /* @__PURE__ */ jsx63("p", { children: code }, code))
2567
+ children: codes.map((code) => /* @__PURE__ */ jsx64("p", { children: code }, code))
2382
2568
  }
2383
2569
  ) }) : null
2384
2570
  ] });
2385
2571
  }
2386
2572
 
2387
2573
  // src/theme/default/components/settings/settings-totp.tsx
2388
- import { useComponents as useComponents5 } from "@ory/elements-react";
2574
+ import { useComponents as useComponents6 } from "@ory/elements-react";
2389
2575
 
2390
2576
  // src/theme/default/assets/icons/qrcode.svg
2391
2577
  import * as React33 from "react";
2392
- import { jsx as jsx64 } from "react/jsx-runtime";
2578
+ import { jsx as jsx65 } from "react/jsx-runtime";
2393
2579
  var SvgQrcode = (props) => {
2394
2580
  var _a, _b;
2395
- return /* @__PURE__ */ jsx64("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ jsx64("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.333 22.667v.013m0-13.346v.013m13.333-.013v.013m0 9.32h-4v4m8-4v.013m-8 7.987h4m0-4h4v4m-21.333-20a1.333 1.333 0 0 1 1.333-1.333H12a1.333 1.333 0 0 1 1.333 1.333V12A1.334 1.334 0 0 1 12 13.334H6.666A1.334 1.334 0 0 1 5.333 12zm13.333 0A1.333 1.333 0 0 1 20 5.334h5.333a1.333 1.333 0 0 1 1.333 1.333V12a1.333 1.333 0 0 1-1.333 1.334H20A1.333 1.333 0 0 1 18.666 12zM5.333 20a1.333 1.333 0 0 1 1.333-1.333H12A1.333 1.333 0 0 1 13.333 20v5.334A1.333 1.333 0 0 1 12 26.667H6.666a1.333 1.333 0 0 1-1.333-1.334z" }) });
2581
+ return /* @__PURE__ */ jsx65("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ jsx65("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.333 22.667v.013m0-13.346v.013m13.333-.013v.013m0 9.32h-4v4m8-4v.013m-8 7.987h4m0-4h4v4m-21.333-20a1.333 1.333 0 0 1 1.333-1.333H12a1.333 1.333 0 0 1 1.333 1.333V12A1.334 1.334 0 0 1 12 13.334H6.666A1.334 1.334 0 0 1 5.333 12zm13.333 0A1.333 1.333 0 0 1 20 5.334h5.333a1.333 1.333 0 0 1 1.333 1.333V12a1.333 1.333 0 0 1-1.333 1.334H20A1.333 1.333 0 0 1 18.666 12zM5.333 20a1.333 1.333 0 0 1 1.333-1.333H12A1.333 1.333 0 0 1 13.333 20v5.334A1.333 1.333 0 0 1 12 26.667H6.666a1.333 1.333 0 0 1-1.333-1.334z" }) });
2396
2582
  };
2397
2583
  var qrcode_default = SvgQrcode;
2398
2584
 
2399
2585
  // src/theme/default/components/settings/settings-totp.tsx
2400
- import { useFormContext as useFormContext10 } from "react-hook-form";
2401
- import { jsx as jsx65, jsxs as jsxs35 } from "react/jsx-runtime";
2586
+ import { useFormContext as useFormContext11 } from "react-hook-form";
2587
+ import { jsx as jsx66, jsxs as jsxs35 } from "react/jsx-runtime";
2402
2588
  function DefaultSettingsTotp({
2403
2589
  totpImage,
2404
2590
  totpInput,
@@ -2406,10 +2592,10 @@ function DefaultSettingsTotp({
2406
2592
  totpUnlink,
2407
2593
  onUnlink
2408
2594
  }) {
2409
- const { Node: Node2, Card } = useComponents5();
2595
+ const { Node: Node2, Card } = useComponents6();
2410
2596
  const {
2411
2597
  formState: { isSubmitting }
2412
- } = useFormContext10();
2598
+ } = useFormContext11();
2413
2599
  if (totpUnlink) {
2414
2600
  const {
2415
2601
  type,
@@ -2419,18 +2605,18 @@ function DefaultSettingsTotp({
2419
2605
  ...buttonAttrs
2420
2606
  } = totpUnlink.attributes;
2421
2607
  return /* @__PURE__ */ jsxs35("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
2422
- /* @__PURE__ */ jsx65("div", { className: "col-span-full", children: /* @__PURE__ */ jsx65(Card.Divider, {}) }),
2608
+ /* @__PURE__ */ jsx66("div", { className: "col-span-full", children: /* @__PURE__ */ jsx66(Card.Divider, {}) }),
2423
2609
  /* @__PURE__ */ jsxs35("div", { className: "col-span-full flex items-center gap-6", children: [
2424
- /* @__PURE__ */ jsx65("div", { className: "aspect-square size-8 ", children: /* @__PURE__ */ jsx65(qrcode_default, { size: 32 }) }),
2425
- /* @__PURE__ */ jsx65("div", { className: "mr-auto flex flex-col", children: /* @__PURE__ */ jsx65("p", { className: "text-sm font-medium text-interface-foreground-default-primary", children: "Authenticator app" }) }),
2426
- /* @__PURE__ */ jsx65(
2610
+ /* @__PURE__ */ jsx66("div", { className: "aspect-square size-8 ", children: /* @__PURE__ */ jsx66(qrcode_default, { size: 32 }) }),
2611
+ /* @__PURE__ */ jsx66("div", { className: "mr-auto flex flex-col", children: /* @__PURE__ */ jsx66("p", { className: "text-sm font-medium text-interface-foreground-default-primary", children: "Authenticator app" }) }),
2612
+ /* @__PURE__ */ jsx66(
2427
2613
  "button",
2428
2614
  {
2429
2615
  type: type === "button" ? "button" : "submit",
2430
2616
  ...buttonAttrs,
2431
2617
  onClick: onUnlink,
2432
2618
  disabled: isSubmitting,
2433
- children: isSubmitting ? /* @__PURE__ */ jsx65(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx65(
2619
+ children: isSubmitting ? /* @__PURE__ */ jsx66(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx66(
2434
2620
  trash_default,
2435
2621
  {
2436
2622
  className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
@@ -2444,8 +2630,8 @@ function DefaultSettingsTotp({
2444
2630
  }
2445
2631
  if (totpImage && totpSecret && totpInput) {
2446
2632
  return /* @__PURE__ */ jsxs35("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
2447
- /* @__PURE__ */ jsx65("div", { className: "col-span-full", children: /* @__PURE__ */ jsx65(DefaultHorizontalDivider, {}) }),
2448
- /* @__PURE__ */ jsx65("div", { className: "flex justify-center rounded-cards bg-interface-background-default-secondary p-8", children: /* @__PURE__ */ jsx65("div", { className: "aspect-square h-44 rounded bg-[white]", children: /* @__PURE__ */ jsx65("div", { className: "-m-3 antialiased mix-blend-multiply", children: /* @__PURE__ */ jsx65(
2633
+ /* @__PURE__ */ jsx66("div", { className: "col-span-full", children: /* @__PURE__ */ jsx66(DefaultHorizontalDivider, {}) }),
2634
+ /* @__PURE__ */ jsx66("div", { className: "flex justify-center rounded-cards bg-interface-background-default-secondary p-8", children: /* @__PURE__ */ jsx66("div", { className: "aspect-square h-44 rounded bg-[white]", children: /* @__PURE__ */ jsx66("div", { className: "-m-3 antialiased mix-blend-multiply", children: /* @__PURE__ */ jsx66(
2449
2635
  Node2.Image,
2450
2636
  {
2451
2637
  node: totpImage,
@@ -2455,12 +2641,12 @@ function DefaultSettingsTotp({
2455
2641
  }
2456
2642
  ) }) }) }),
2457
2643
  /* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-6", children: [
2458
- /* @__PURE__ */ jsx65(
2644
+ /* @__PURE__ */ jsx66(
2459
2645
  Node2.Label,
2460
2646
  {
2461
2647
  node: totpSecret,
2462
2648
  attributes: totpSecret.attributes,
2463
- children: /* @__PURE__ */ jsx65(
2649
+ children: /* @__PURE__ */ jsx66(
2464
2650
  Node2.Input,
2465
2651
  {
2466
2652
  node: totpSecret,
@@ -2475,12 +2661,12 @@ function DefaultSettingsTotp({
2475
2661
  )
2476
2662
  }
2477
2663
  ),
2478
- /* @__PURE__ */ jsx65(
2664
+ /* @__PURE__ */ jsx66(
2479
2665
  Node2.Label,
2480
2666
  {
2481
2667
  attributes: totpInput.attributes,
2482
2668
  node: totpInput,
2483
- children: /* @__PURE__ */ jsx65(
2669
+ children: /* @__PURE__ */ jsx66(
2484
2670
  Node2.CodeInput,
2485
2671
  {
2486
2672
  node: totpInput,
@@ -2495,20 +2681,20 @@ function DefaultSettingsTotp({
2495
2681
  }
2496
2682
 
2497
2683
  // src/theme/default/components/settings/settings-webauthn.tsx
2498
- import { useComponents as useComponents6 } from "@ory/elements-react";
2684
+ import { useComponents as useComponents7 } from "@ory/elements-react";
2499
2685
 
2500
2686
  // src/theme/default/assets/icons/key.svg
2501
2687
  import * as React34 from "react";
2502
- import { jsx as jsx66 } from "react/jsx-runtime";
2688
+ import { jsx as jsx67 } from "react/jsx-runtime";
2503
2689
  var SvgKey = (props) => {
2504
2690
  var _a, _b;
2505
- return /* @__PURE__ */ jsx66("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx66("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M20 12h.013m2.06-6.876 4.803 4.803a3.836 3.836 0 0 1 0 5.425l-3.524 3.524a3.835 3.835 0 0 1-5.425 0l-.402-.401-8.744 8.744a2.67 2.67 0 0 1-1.652.77L6.896 28H5.333a1.334 1.334 0 0 1-1.324-1.177L4 26.667v-1.563c0-.626.22-1.232.623-1.712l.158-.173.552-.552H8V20h2.667v-2.667l2.858-2.858-.401-.402a3.835 3.835 0 0 1 0-5.425l3.524-3.524a3.835 3.835 0 0 1 5.425 0" }) });
2691
+ return /* @__PURE__ */ jsx67("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx67("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M20 12h.013m2.06-6.876 4.803 4.803a3.836 3.836 0 0 1 0 5.425l-3.524 3.524a3.835 3.835 0 0 1-5.425 0l-.402-.401-8.744 8.744a2.67 2.67 0 0 1-1.652.77L6.896 28H5.333a1.334 1.334 0 0 1-1.324-1.177L4 26.667v-1.563c0-.626.22-1.232.623-1.712l.158-.173.552-.552H8V20h2.667v-2.667l2.858-2.858-.401-.402a3.835 3.835 0 0 1 0-5.425l3.524-3.524a3.835 3.835 0 0 1 5.425 0" }) });
2506
2692
  };
2507
2693
  var key_default = SvgKey;
2508
2694
 
2509
2695
  // src/theme/default/components/settings/settings-webauthn.tsx
2510
- import { useFormContext as useFormContext11 } from "react-hook-form";
2511
- import { jsx as jsx67, jsxs as jsxs36 } from "react/jsx-runtime";
2696
+ import { useFormContext as useFormContext12 } from "react-hook-form";
2697
+ import { jsx as jsx68, jsxs as jsxs36 } from "react/jsx-runtime";
2512
2698
  function DefaultSettingsWebauthn({
2513
2699
  nameInput,
2514
2700
  triggerButton,
@@ -2516,17 +2702,17 @@ function DefaultSettingsWebauthn({
2516
2702
  }) {
2517
2703
  const {
2518
2704
  formState: { isSubmitting }
2519
- } = useFormContext11();
2520
- const { Node: Node2, Card } = useComponents6();
2705
+ } = useFormContext12();
2706
+ const { Node: Node2, Card } = useComponents7();
2521
2707
  const hasRemoveButtons = removeButtons.length > 0;
2522
2708
  return /* @__PURE__ */ jsxs36("div", { className: "flex flex-col gap-8", children: [
2523
2709
  /* @__PURE__ */ jsxs36("div", { className: "flex md:max-w-96 sm:items-end gap-3 flex-col sm:flex-row", children: [
2524
- /* @__PURE__ */ jsx67("div", { className: "flex-1", children: /* @__PURE__ */ jsx67(
2710
+ /* @__PURE__ */ jsx68("div", { className: "flex-1", children: /* @__PURE__ */ jsx68(
2525
2711
  Node2.Label,
2526
2712
  {
2527
2713
  node: nameInput,
2528
2714
  attributes: nameInput.attributes,
2529
- children: /* @__PURE__ */ jsx67(
2715
+ children: /* @__PURE__ */ jsx68(
2530
2716
  Node2.Input,
2531
2717
  {
2532
2718
  node: nameInput,
@@ -2535,7 +2721,7 @@ function DefaultSettingsWebauthn({
2535
2721
  )
2536
2722
  }
2537
2723
  ) }),
2538
- triggerButton ? /* @__PURE__ */ jsx67(
2724
+ triggerButton ? /* @__PURE__ */ jsx68(
2539
2725
  Node2.Button,
2540
2726
  {
2541
2727
  node: triggerButton,
@@ -2545,8 +2731,8 @@ function DefaultSettingsWebauthn({
2545
2731
  ) : null
2546
2732
  ] }),
2547
2733
  hasRemoveButtons ? /* @__PURE__ */ jsxs36("div", { className: "flex flex-col gap-8", children: [
2548
- /* @__PURE__ */ jsx67(Card.Divider, {}),
2549
- /* @__PURE__ */ jsx67("div", { className: "flex flex-col gap-4", children: removeButtons.map((node, i) => {
2734
+ /* @__PURE__ */ jsx68(Card.Divider, {}),
2735
+ /* @__PURE__ */ jsx68("div", { className: "flex flex-col gap-4", children: removeButtons.map((node, i) => {
2550
2736
  var _a, _b;
2551
2737
  const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
2552
2738
  const addedAt = "added_at" in context ? context.added_at : null;
@@ -2558,7 +2744,7 @@ function DefaultSettingsWebauthn({
2558
2744
  className: "flex justify-between gap-6 md:items-center",
2559
2745
  children: [
2560
2746
  /* @__PURE__ */ jsxs36("div", { className: "flex gap-2 items-center flex-1 truncate", children: [
2561
- /* @__PURE__ */ jsx67(
2747
+ /* @__PURE__ */ jsx68(
2562
2748
  key_default,
2563
2749
  {
2564
2750
  size: 32,
@@ -2567,15 +2753,15 @@ function DefaultSettingsWebauthn({
2567
2753
  ),
2568
2754
  /* @__PURE__ */ jsxs36("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4 truncate", children: [
2569
2755
  /* @__PURE__ */ jsxs36("div", { className: "flex-1 flex-col truncate", children: [
2570
- /* @__PURE__ */ jsx67("p", { className: "text-sm font-medium text-interface-foreground-default-secondary truncate", children: displayName }),
2571
- /* @__PURE__ */ jsx67("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block truncate", children: keyId })
2756
+ /* @__PURE__ */ jsx68("p", { className: "text-sm font-medium text-interface-foreground-default-secondary truncate", children: displayName }),
2757
+ /* @__PURE__ */ jsx68("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block truncate", children: keyId })
2572
2758
  ] }),
2573
- addedAt && /* @__PURE__ */ jsx67("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
2759
+ addedAt && /* @__PURE__ */ jsx68("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
2574
2760
  dateStyle: "long"
2575
2761
  }).format(new Date(addedAt)) })
2576
2762
  ] })
2577
2763
  ] }),
2578
- /* @__PURE__ */ jsx67(
2764
+ /* @__PURE__ */ jsx68(
2579
2765
  "button",
2580
2766
  {
2581
2767
  ...node.attributes,
@@ -2583,7 +2769,7 @@ function DefaultSettingsWebauthn({
2583
2769
  onClick: node.onClick,
2584
2770
  disabled: isSubmitting,
2585
2771
  className: "relative",
2586
- children: isSubmitting ? /* @__PURE__ */ jsx67(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx67(
2772
+ children: isSubmitting ? /* @__PURE__ */ jsx68(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx68(
2587
2773
  trash_default,
2588
2774
  {
2589
2775
  className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
@@ -2602,34 +2788,34 @@ function DefaultSettingsWebauthn({
2602
2788
  }
2603
2789
 
2604
2790
  // src/theme/default/components/card/auth-method-list-container.tsx
2605
- import { jsx as jsx68 } from "react/jsx-runtime";
2791
+ import { jsx as jsx69 } from "react/jsx-runtime";
2606
2792
  function DefaultAuthMethodListContainer({
2607
2793
  children
2608
2794
  }) {
2609
- return /* @__PURE__ */ jsx68("div", { className: "grid grid-cols-1 gap-2", children });
2795
+ return /* @__PURE__ */ jsx69("div", { className: "grid grid-cols-1 gap-2", children });
2610
2796
  }
2611
2797
 
2612
2798
  // src/theme/default/components/form/captcha.tsx
2613
- import { isUiNodeInputAttributes as isUiNodeInputAttributes3 } from "@ory/client-fetch";
2799
+ import { isUiNodeInputAttributes as isUiNodeInputAttributes5 } from "@ory/client-fetch";
2614
2800
  import { Turnstile } from "@marsidev/react-turnstile";
2615
2801
  import { useRef as useRef2 } from "react";
2616
- import { useFormContext as useFormContext12 } from "react-hook-form";
2617
- import { jsx as jsx69 } from "react/jsx-runtime";
2802
+ import { useFormContext as useFormContext13 } from "react-hook-form";
2803
+ import { jsx as jsx70 } from "react/jsx-runtime";
2618
2804
  var DefaultCaptcha = ({ node }) => {
2619
- const { setValue } = useFormContext12();
2805
+ const { setValue } = useFormContext13();
2620
2806
  const ref = useRef2();
2621
2807
  const nodes = [];
2622
- if (isUiNodeInputAttributes3(node.attributes)) {
2808
+ if (isUiNodeInputAttributes5(node.attributes)) {
2623
2809
  if (node.attributes.name === "transient_payload.captcha_turnstile_response") {
2624
2810
  nodes.push(
2625
- /* @__PURE__ */ jsx69(DefaultInput, { node, attributes: node.attributes }, 1)
2811
+ /* @__PURE__ */ jsx70(DefaultInput, { node, attributes: node.attributes }, 1)
2626
2812
  );
2627
2813
  }
2628
2814
  }
2629
- if (isUiNodeInputAttributes3(node.attributes) && node.attributes.name === "captcha_turnstile_options") {
2815
+ if (isUiNodeInputAttributes5(node.attributes) && node.attributes.name === "captcha_turnstile_options") {
2630
2816
  const options = JSON.parse(node.attributes.value);
2631
2817
  nodes.push(
2632
- /* @__PURE__ */ jsx69(
2818
+ /* @__PURE__ */ jsx70(
2633
2819
  Turnstile,
2634
2820
  {
2635
2821
  ref,
@@ -2656,9 +2842,84 @@ var DefaultCaptcha = ({ node }) => {
2656
2842
  return nodes;
2657
2843
  };
2658
2844
 
2845
+ // src/theme/default/assets/icons/personal.svg
2846
+ import * as React35 from "react";
2847
+ import { jsx as jsx71 } from "react/jsx-runtime";
2848
+ var SvgPersonal = (props) => {
2849
+ var _a, _b;
2850
+ return /* @__PURE__ */ jsx71("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx71("path", { stroke: "#0F172A", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 14v-1.333A2.667 2.667 0 0 1 6.667 10h1m5.8 3.467 1.2 1.2m-9.334-10a2.667 2.667 0 1 0 5.334 0 2.667 2.667 0 0 0-5.334 0M10 12a2 2 0 1 0 4 0 2 2 0 0 0-4 0" }) });
2851
+ };
2852
+ var personal_default = SvgPersonal;
2853
+
2854
+ // src/theme/default/assets/icons/message.svg
2855
+ import * as React36 from "react";
2856
+ import { jsx as jsx72 } from "react/jsx-runtime";
2857
+ var SvgMessage = (props) => {
2858
+ var _a, _b;
2859
+ return /* @__PURE__ */ jsx72("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 25", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx72("path", { stroke: "#000", strokeLinecap: "round", strokeLinejoin: "round", d: "M3 7.325a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2m-18 0v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-10m-18 0 9 6 9-6" }) });
2860
+ };
2861
+ var message_default = SvgMessage;
2862
+
2863
+ // src/theme/default/assets/icons/phone.svg
2864
+ import * as React37 from "react";
2865
+ import { jsx as jsx73 } from "react/jsx-runtime";
2866
+ var SvgPhone = (props) => {
2867
+ var _a, _b;
2868
+ return /* @__PURE__ */ jsx73("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 25", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx73("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M5 4.325h4l2 5-2.5 1.5a11 11 0 0 0 5 5l1.5-2.5 5 2v4a2 2 0 0 1-2 2 16 16 0 0 1-15-15 2 2 0 0 1 2-2" }) });
2869
+ };
2870
+ var phone_default = SvgPhone;
2871
+
2872
+ // src/theme/default/components/form/consent-scope-checkbox.tsx
2873
+ import { useIntl as useIntl13 } from "react-intl";
2874
+ import * as Switch from "@radix-ui/react-switch";
2875
+ import { jsx as jsx74 } from "react/jsx-runtime";
2876
+ var ScopeIcons = {
2877
+ openid: personal_default,
2878
+ offline_access: personal_default,
2879
+ profile: personal_default,
2880
+ email: message_default,
2881
+ phone: phone_default
2882
+ };
2883
+ function DefaultConsentScopeCheckbox({
2884
+ attributes,
2885
+ onCheckedChange
2886
+ }) {
2887
+ var _a;
2888
+ const intl = useIntl13();
2889
+ const Icon = (_a = ScopeIcons[attributes.value]) != null ? _a : personal_default;
2890
+ return /* @__PURE__ */ jsx74(
2891
+ ListItem,
2892
+ {
2893
+ as: "label",
2894
+ icon: Icon,
2895
+ title: intl.formatMessage({
2896
+ id: `consent.scope.${attributes.value}.title`,
2897
+ defaultMessage: attributes.value
2898
+ }),
2899
+ description: intl.formatMessage({
2900
+ id: `consent.scope.${attributes.value}.description`,
2901
+ defaultMessage: []
2902
+ }),
2903
+ className: "col-span-2",
2904
+ "data-testid": "ory/screen/consent/scope-checkbox-label",
2905
+ children: /* @__PURE__ */ jsx74(
2906
+ Switch.Root,
2907
+ {
2908
+ className: "relative w-7 h-4 bg-toggle-background-default rounded-identifier border-toggle-border-default border p-[3px] data-[state=checked]:bg-toggle-background-checked transition-all data-[state=checked]:border-toggle-border-checked",
2909
+ "data-testid": `ory/screen/consent/scope-checkbox`,
2910
+ value: attributes.value,
2911
+ onCheckedChange,
2912
+ defaultChecked: true,
2913
+ children: /* @__PURE__ */ jsx74(Switch.Thumb, { className: "size-2 block bg-toggle-foreground-default rounded-identifier data-[state=checked]:bg-toggle-foreground-checked transition-all data-[state=checked]:translate-x-3" })
2914
+ }
2915
+ )
2916
+ }
2917
+ );
2918
+ }
2919
+
2659
2920
  // src/theme/default/components/default-components.tsx
2660
2921
  function getOryComponents(overrides) {
2661
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja;
2922
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la;
2662
2923
  return {
2663
2924
  Card: {
2664
2925
  Root: (_b = (_a = overrides == null ? void 0 : overrides.Card) == null ? void 0 : _a.Root) != null ? _b : DefaultCard,
@@ -2683,24 +2944,25 @@ function getOryComponents(overrides) {
2683
2944
  Checkbox: (_J = (_I = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _I.Checkbox) != null ? _J : DefaultCheckbox,
2684
2945
  Text: (_L = (_K = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _K.Text) != null ? _L : DefaultText,
2685
2946
  Anchor: (_N = (_M = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _M.Anchor) != null ? _N : DefaultLinkButton,
2686
- Captcha: (_P = (_O = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _O.Captcha) != null ? _P : DefaultCaptcha
2947
+ Captcha: (_P = (_O = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _O.Captcha) != null ? _P : DefaultCaptcha,
2948
+ ConsentScopeCheckbox: (_R = (_Q = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _Q.ConsentScopeCheckbox) != null ? _R : DefaultConsentScopeCheckbox
2687
2949
  },
2688
2950
  Form: {
2689
- Root: (_R = (_Q = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _Q.Root) != null ? _R : DefaultFormContainer,
2690
- Group: (_T = (_S = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _S.Group) != null ? _T : DefaultGroupContainer,
2691
- OidcRoot: (_V = (_U = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _U.OidcRoot) != null ? _V : DefaultSocialButtonContainer,
2692
- RecoveryCodesSettings: (_X = (_W = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _W.RecoveryCodesSettings) != null ? _X : DefaultSettingsRecoveryCodes,
2693
- TotpSettings: (_Z = (_Y = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _Y.TotpSettings) != null ? _Z : DefaultSettingsTotp,
2694
- OidcSettings: (_$ = (__ = overrides == null ? void 0 : overrides.Form) == null ? void 0 : __.OidcSettings) != null ? _$ : DefaultSettingsOidc,
2695
- WebauthnSettings: (_ba = (_aa = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _aa.WebauthnSettings) != null ? _ba : DefaultSettingsWebauthn,
2696
- PasskeySettings: (_da = (_ca = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _ca.PasskeySettings) != null ? _da : DefaultSettingsPasskey
2951
+ Root: (_T = (_S = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _S.Root) != null ? _T : DefaultFormContainer,
2952
+ Group: (_V = (_U = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _U.Group) != null ? _V : DefaultGroupContainer,
2953
+ OidcRoot: (_X = (_W = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _W.OidcRoot) != null ? _X : DefaultSocialButtonContainer,
2954
+ RecoveryCodesSettings: (_Z = (_Y = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _Y.RecoveryCodesSettings) != null ? _Z : DefaultSettingsRecoveryCodes,
2955
+ TotpSettings: (_$ = (__ = overrides == null ? void 0 : overrides.Form) == null ? void 0 : __.TotpSettings) != null ? _$ : DefaultSettingsTotp,
2956
+ OidcSettings: (_ba = (_aa = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _aa.OidcSettings) != null ? _ba : DefaultSettingsOidc,
2957
+ WebauthnSettings: (_da = (_ca = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _ca.WebauthnSettings) != null ? _da : DefaultSettingsWebauthn,
2958
+ PasskeySettings: (_fa = (_ea = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _ea.PasskeySettings) != null ? _fa : DefaultSettingsPasskey
2697
2959
  },
2698
2960
  Message: {
2699
- Root: (_fa = (_ea = overrides == null ? void 0 : overrides.Message) == null ? void 0 : _ea.Root) != null ? _fa : DefaultMessageContainer,
2700
- Content: (_ha = (_ga = overrides == null ? void 0 : overrides.Message) == null ? void 0 : _ga.Content) != null ? _ha : DefaultMessage
2961
+ Root: (_ha = (_ga = overrides == null ? void 0 : overrides.Message) == null ? void 0 : _ga.Root) != null ? _ha : DefaultMessageContainer,
2962
+ Content: (_ja = (_ia = overrides == null ? void 0 : overrides.Message) == null ? void 0 : _ia.Content) != null ? _ja : DefaultMessage
2701
2963
  },
2702
2964
  Page: {
2703
- Header: (_ja = (_ia = overrides == null ? void 0 : overrides.Page) == null ? void 0 : _ia.Header) != null ? _ja : DefaultPageHeader
2965
+ Header: (_la = (_ka = overrides == null ? void 0 : overrides.Page) == null ? void 0 : _ka.Header) != null ? _la : DefaultPageHeader
2704
2966
  }
2705
2967
  };
2706
2968
  }
@@ -2723,81 +2985,81 @@ import {
2723
2985
  } from "react";
2724
2986
 
2725
2987
  // src/context/form-state.ts
2726
- import { FlowType as FlowType9 } from "@ory/client-fetch";
2988
+ import { FlowType as FlowType10 } from "@ory/client-fetch";
2727
2989
  import { useReducer, useState as useState4 } from "react";
2728
2990
 
2729
2991
  // src/components/card/card-two-step.utils.ts
2730
- import { FlowType as FlowType8, UiNodeGroupEnum as UiNodeGroupEnum4 } from "@ory/client-fetch";
2992
+ import { FlowType as FlowType9, UiNodeGroupEnum as UiNodeGroupEnum4 } from "@ory/client-fetch";
2731
2993
 
2732
2994
  // src/context/flow-context.tsx
2733
- import { jsx as jsx70 } from "react/jsx-runtime";
2995
+ import { jsx as jsx75 } from "react/jsx-runtime";
2734
2996
  var OryFlowContext = createContext2(null);
2735
2997
 
2736
2998
  // src/context/provider.tsx
2737
- import { jsx as jsx71 } from "react/jsx-runtime";
2999
+ import { jsx as jsx76 } from "react/jsx-runtime";
2738
3000
 
2739
3001
  // src/components/card/header.tsx
2740
- import { jsx as jsx72 } from "react/jsx-runtime";
3002
+ import { jsx as jsx77 } from "react/jsx-runtime";
2741
3003
 
2742
3004
  // src/components/form/form-provider.tsx
2743
3005
  import { UiNodeGroupEnum as UiNodeGroupEnum6 } from "@ory/client-fetch";
2744
- import { FormProvider, useForm as useForm2 } from "react-hook-form";
3006
+ import { FormProvider, useForm } from "react-hook-form";
2745
3007
 
2746
3008
  // src/components/form/form-helpers.ts
2747
- import { isUiNodeInputAttributes as isUiNodeInputAttributes4 } from "@ory/client-fetch";
3009
+ import { isUiNodeInputAttributes as isUiNodeInputAttributes6 } from "@ory/client-fetch";
2748
3010
 
2749
3011
  // src/components/form/form-resolver.ts
2750
- import { isUiNodeInputAttributes as isUiNodeInputAttributes5 } from "@ory/client-fetch";
3012
+ import { isUiNodeInputAttributes as isUiNodeInputAttributes7 } from "@ory/client-fetch";
2751
3013
 
2752
3014
  // src/components/form/form-provider.tsx
2753
- import { jsx as jsx73 } from "react/jsx-runtime";
3015
+ import { jsx as jsx78 } from "react/jsx-runtime";
2754
3016
 
2755
3017
  // src/components/card/card.tsx
2756
- import { jsx as jsx74 } from "react/jsx-runtime";
3018
+ import { jsx as jsx79 } from "react/jsx-runtime";
2757
3019
 
2758
3020
  // src/components/card/footer.tsx
2759
- import { jsx as jsx75 } from "react/jsx-runtime";
3021
+ import { jsx as jsx80 } from "react/jsx-runtime";
2760
3022
 
2761
3023
  // src/components/card/content.tsx
2762
- import { jsx as jsx76 } from "react/jsx-runtime";
3024
+ import { jsx as jsx81 } from "react/jsx-runtime";
2763
3025
 
2764
3026
  // src/components/card/card-two-step.tsx
2765
3027
  import {
2766
- isUiNodeInputAttributes as isUiNodeInputAttributes8,
2767
- isUiNodeScriptAttributes as isUiNodeScriptAttributes3,
3028
+ isUiNodeInputAttributes as isUiNodeInputAttributes10,
3029
+ isUiNodeScriptAttributes as isUiNodeScriptAttributes4,
2768
3030
  UiNodeGroupEnum as UiNodeGroupEnum11,
2769
3031
  UiNodeInputAttributesTypeEnum as UiNodeInputAttributesTypeEnum2
2770
3032
  } from "@ory/client-fetch";
2771
- import { useFormContext as useFormContext17 } from "react-hook-form";
3033
+ import { useFormContext as useFormContext18 } from "react-hook-form";
2772
3034
 
2773
3035
  // src/components/form/form.tsx
2774
3036
  import {
2775
- FlowType as FlowType16,
3037
+ FlowType as FlowType17,
2776
3038
  isUiNodeAnchorAttributes,
2777
3039
  isUiNodeImageAttributes,
2778
- isUiNodeInputAttributes as isUiNodeInputAttributes6,
2779
- isUiNodeScriptAttributes
3040
+ isUiNodeInputAttributes as isUiNodeInputAttributes8,
3041
+ isUiNodeScriptAttributes as isUiNodeScriptAttributes2
2780
3042
  } from "@ory/client-fetch";
2781
- import { useFormContext as useFormContext14 } from "react-hook-form";
2782
- import { useIntl as useIntl13 } from "react-intl";
3043
+ import { useFormContext as useFormContext15 } from "react-hook-form";
3044
+ import { useIntl as useIntl14 } from "react-intl";
2783
3045
 
2784
3046
  // src/components/form/useOryFormSubmit.ts
2785
3047
  import {
2786
- FlowType as FlowType15,
3048
+ FlowType as FlowType16,
2787
3049
  UiNodeGroupEnum as UiNodeGroupEnum7
2788
3050
  } from "@ory/client-fetch";
2789
- import { useFormContext as useFormContext13 } from "react-hook-form";
3051
+ import { useFormContext as useFormContext14 } from "react-hook-form";
2790
3052
 
2791
3053
  // src/util/onSubmitLogin.ts
2792
3054
  import {
2793
- FlowType as FlowType10,
3055
+ FlowType as FlowType11,
2794
3056
  handleFlowError,
2795
3057
  loginUrl
2796
3058
  } from "@ory/client-fetch";
2797
3059
 
2798
3060
  // src/util/onSubmitRecovery.ts
2799
3061
  import {
2800
- FlowType as FlowType11,
3062
+ FlowType as FlowType12,
2801
3063
  handleContinueWith,
2802
3064
  handleFlowError as handleFlowError2,
2803
3065
  instanceOfContinueWithRecoveryUi,
@@ -2806,7 +3068,7 @@ import {
2806
3068
 
2807
3069
  // src/util/onSubmitRegistration.ts
2808
3070
  import {
2809
- FlowType as FlowType12,
3071
+ FlowType as FlowType13,
2810
3072
  handleContinueWith as handleContinueWith2,
2811
3073
  handleFlowError as handleFlowError3,
2812
3074
  registrationUrl
@@ -2814,7 +3076,7 @@ import {
2814
3076
 
2815
3077
  // src/util/onSubmitSettings.ts
2816
3078
  import {
2817
- FlowType as FlowType13,
3079
+ FlowType as FlowType14,
2818
3080
  handleContinueWith as handleContinueWith3,
2819
3081
  handleFlowError as handleFlowError4,
2820
3082
  isResponseError,
@@ -2824,16 +3086,16 @@ import {
2824
3086
 
2825
3087
  // src/util/onSubmitVerification.ts
2826
3088
  import {
2827
- FlowType as FlowType14,
3089
+ FlowType as FlowType15,
2828
3090
  handleFlowError as handleFlowError5,
2829
3091
  verificationUrl
2830
3092
  } from "@ory/client-fetch";
2831
3093
 
2832
3094
  // src/components/form/form.tsx
2833
- import { Fragment as Fragment6, jsx as jsx77, jsxs as jsxs37 } from "react/jsx-runtime";
3095
+ import { jsx as jsx82, jsxs as jsxs37 } from "react/jsx-runtime";
2834
3096
 
2835
3097
  // src/components/form/messages.tsx
2836
- import { jsx as jsx78 } from "react/jsx-runtime";
3098
+ import { jsx as jsx83 } from "react/jsx-runtime";
2837
3099
 
2838
3100
  // src/components/form/nodes/input.tsx
2839
3101
  import {
@@ -2841,75 +3103,81 @@ import {
2841
3103
  UiNodeInputAttributesTypeEnum
2842
3104
  } from "@ory/client-fetch";
2843
3105
  import { useEffect as useEffect5, useRef as useRef3 } from "react";
2844
- import { useFormContext as useFormContext15 } from "react-hook-form";
2845
- import { jsx as jsx79 } from "react/jsx-runtime";
3106
+ import { useFormContext as useFormContext16 } from "react-hook-form";
3107
+ import { jsx as jsx84 } from "react/jsx-runtime";
2846
3108
 
2847
3109
  // src/components/form/nodes/node.tsx
2848
3110
  import {
2849
3111
  isUiNodeAnchorAttributes as isUiNodeAnchorAttributes2,
2850
3112
  isUiNodeImageAttributes as isUiNodeImageAttributes2,
2851
- isUiNodeInputAttributes as isUiNodeInputAttributes7,
2852
- isUiNodeScriptAttributes as isUiNodeScriptAttributes2,
3113
+ isUiNodeInputAttributes as isUiNodeInputAttributes9,
3114
+ isUiNodeScriptAttributes as isUiNodeScriptAttributes3,
2853
3115
  isUiNodeTextAttributes,
2854
3116
  UiNodeGroupEnum as UiNodeGroupEnum9
2855
3117
  } from "@ory/client-fetch";
2856
- import { jsx as jsx80 } from "react/jsx-runtime";
3118
+ import { jsx as jsx85 } from "react/jsx-runtime";
2857
3119
 
2858
3120
  // src/components/form/social.tsx
2859
3121
  import {
2860
3122
  UiNodeGroupEnum as UiNodeGroupEnum10
2861
3123
  } from "@ory/client-fetch";
2862
- import { useFormContext as useFormContext16 } from "react-hook-form";
2863
- import { jsx as jsx81 } from "react/jsx-runtime";
3124
+ import { useFormContext as useFormContext17 } from "react-hook-form";
3125
+ import { jsx as jsx86 } from "react/jsx-runtime";
2864
3126
 
2865
3127
  // src/components/card/card-two-step.tsx
2866
- import { Fragment as Fragment7, jsx as jsx82, jsxs as jsxs38 } from "react/jsx-runtime";
3128
+ import { jsx as jsx87, jsxs as jsxs38 } from "react/jsx-runtime";
2867
3129
 
2868
3130
  // src/components/form/groups.tsx
2869
- import { jsx as jsx83 } from "react/jsx-runtime";
3131
+ import { jsx as jsx88 } from "react/jsx-runtime";
2870
3132
 
2871
3133
  // src/components/form/section.tsx
2872
- import { useFormContext as useFormContext18 } from "react-hook-form";
2873
- import { jsx as jsx84 } from "react/jsx-runtime";
3134
+ import { useFormContext as useFormContext19 } from "react-hook-form";
3135
+ import { jsx as jsx89 } from "react/jsx-runtime";
3136
+
3137
+ // src/components/card/card-consent.tsx
3138
+ import { jsx as jsx90, jsxs as jsxs39 } from "react/jsx-runtime";
2874
3139
 
2875
3140
  // src/components/generic/divider.tsx
2876
3141
  import { UiNodeGroupEnum as UiNodeGroupEnum12 } from "@ory/client-fetch";
2877
- import { jsx as jsx85 } from "react/jsx-runtime";
3142
+ import { jsx as jsx91 } from "react/jsx-runtime";
2878
3143
 
2879
3144
  // src/components/generic/page-header.tsx
2880
- import { jsx as jsx86 } from "react/jsx-runtime";
3145
+ import { jsx as jsx92 } from "react/jsx-runtime";
2881
3146
 
2882
3147
  // src/components/settings/settings-card.tsx
2883
- import { UiNodeGroupEnum as UiNodeGroupEnum13 } from "@ory/client-fetch";
2884
- import { useIntl as useIntl19 } from "react-intl";
3148
+ import {
3149
+ isUiNodeScriptAttributes as isUiNodeScriptAttributes5,
3150
+ UiNodeGroupEnum as UiNodeGroupEnum13
3151
+ } from "@ory/client-fetch";
3152
+ import { useIntl as useIntl20 } from "react-intl";
2885
3153
 
2886
3154
  // src/components/settings/oidc-settings.tsx
2887
- import { useIntl as useIntl14 } from "react-intl";
2888
- import { useFormContext as useFormContext19 } from "react-hook-form";
2889
- import { Fragment as Fragment8, jsx as jsx87, jsxs as jsxs39 } from "react/jsx-runtime";
2890
-
2891
- // src/components/settings/passkey-settings.tsx
2892
- import { useFormContext as useFormContext20 } from "react-hook-form";
2893
3155
  import { useIntl as useIntl15 } from "react-intl";
2894
- import { Fragment as Fragment9, jsx as jsx88, jsxs as jsxs40 } from "react/jsx-runtime";
3156
+ import { useFormContext as useFormContext20 } from "react-hook-form";
3157
+ import { Fragment as Fragment6, jsx as jsx93, jsxs as jsxs40 } from "react/jsx-runtime";
2895
3158
 
2896
- // src/components/settings/recovery-codes-settings.tsx
2897
- import { useIntl as useIntl16 } from "react-intl";
3159
+ // src/components/settings/passkey-settings.tsx
2898
3160
  import { useFormContext as useFormContext21 } from "react-hook-form";
2899
- import { Fragment as Fragment10, jsx as jsx89, jsxs as jsxs41 } from "react/jsx-runtime";
3161
+ import { useIntl as useIntl16 } from "react-intl";
3162
+ import { Fragment as Fragment7, jsx as jsx94, jsxs as jsxs41 } from "react/jsx-runtime";
2900
3163
 
2901
- // src/components/settings/totp-settings.tsx
2902
- import { useFormContext as useFormContext22 } from "react-hook-form";
3164
+ // src/components/settings/recovery-codes-settings.tsx
2903
3165
  import { useIntl as useIntl17 } from "react-intl";
2904
- import { Fragment as Fragment11, jsx as jsx90, jsxs as jsxs42 } from "react/jsx-runtime";
3166
+ import { useFormContext as useFormContext22 } from "react-hook-form";
3167
+ import { Fragment as Fragment8, jsx as jsx95, jsxs as jsxs42 } from "react/jsx-runtime";
2905
3168
 
2906
- // src/components/settings/webauthn-settings.tsx
3169
+ // src/components/settings/totp-settings.tsx
2907
3170
  import { useFormContext as useFormContext23 } from "react-hook-form";
2908
3171
  import { useIntl as useIntl18 } from "react-intl";
2909
- import { Fragment as Fragment12, jsx as jsx91, jsxs as jsxs43 } from "react/jsx-runtime";
3172
+ import { Fragment as Fragment9, jsx as jsx96, jsxs as jsxs43 } from "react/jsx-runtime";
3173
+
3174
+ // src/components/settings/webauthn-settings.tsx
3175
+ import { useFormContext as useFormContext24 } from "react-hook-form";
3176
+ import { useIntl as useIntl19 } from "react-intl";
3177
+ import { Fragment as Fragment10, jsx as jsx97, jsxs as jsxs44 } from "react/jsx-runtime";
2910
3178
 
2911
3179
  // src/components/settings/settings-card.tsx
2912
- import { Fragment as Fragment13, jsx as jsx92, jsxs as jsxs44 } from "react/jsx-runtime";
3180
+ import { Fragment as Fragment11, jsx as jsx98, jsxs as jsxs45 } from "react/jsx-runtime";
2913
3181
 
2914
3182
  // src/locales/en.json
2915
3183
  var en_default = {
@@ -3174,6 +3442,20 @@ var en_default = {
3174
3442
  "property.username": "username",
3175
3443
  "property.identifier": "identifier",
3176
3444
  "property.code": "code",
3445
+ "consent.title": "Authorize {party}",
3446
+ "consent.subtitle": "A third party application wants to access information associated with your account {identifier}.",
3447
+ "consent.scope.openid.title": "Identity",
3448
+ "consent.scope.openid.description": "Allows the application to verify your identity. This is required for authentication and a trusted login experience.",
3449
+ "consent.scope.offline_access.title": "Offline Access",
3450
+ "consent.scope.offline_access.description": "Allows this application to keep you signed in even when you're not actively using it.",
3451
+ "consent.scope.profile.title": "Profile Information",
3452
+ "consent.scope.profile.description": "Allows access to your basic profile details, including your username, first name, and last name.",
3453
+ "consent.scope.email.title": "Email Address",
3454
+ "consent.scope.email.description": "Retrieve your email address and its verification status.",
3455
+ "consent.scope.address.title": "Physical Address",
3456
+ "consent.scope.address.description": "Access your postal address.",
3457
+ "consent.scope.phone.title": "Phone Number",
3458
+ "consent.scope.phone.description": "Retrieve your phone number and its verification status.",
3177
3459
  "error.title.what-happened": "What happened?",
3178
3460
  "error.title.what-can-i-do": "What can I do?",
3179
3461
  "error.instructions": "Please try again in a few minutes or contact the website operator.",
@@ -3350,7 +3632,7 @@ var de_default = {
3350
3632
  "two-step.code.description": "Ein Best\xE4tigungscode wird an Ihre E-Mail gesendet.",
3351
3633
  "two-step.code.title": "E-Mail-Code",
3352
3634
  "two-step.passkey.description": "Verwenden Sie die Fingerabdruck- oder Gesichtserkennung Ihres Ger\xE4ts",
3353
- "two-step.passkey.title": "Passwort (empfohlen)",
3635
+ "two-step.passkey.title": "Passkey (empfohlen)",
3354
3636
  "two-step.password.description": "Geben Sie Ihr Passwort ein, das mit Ihrem Konto verkn\xFCpft ist",
3355
3637
  "two-step.password.title": "Passwort",
3356
3638
  "two-step.webauthn.title": "Sicherheitsschl\xFCssel",
@@ -3445,6 +3727,20 @@ var de_default = {
3445
3727
  "property.phone": "Telefon",
3446
3728
  "property.code": "Code",
3447
3729
  "property.username": "Benutzername",
3730
+ "consent.title": "Autorisieren {party}",
3731
+ "consent.subtitle": "Eine Drittanbieteranwendung m\xF6chte auf Informationen zugreifen, die mit Ihrem Konto {identifier} verkn\xFCpft sind.",
3732
+ "consent.scope.openid.title": "Identit\xE4t",
3733
+ "consent.scope.openid.description": "Erm\xF6glicht der Anwendung, Ihre Identit\xE4t zu \xFCberpr\xFCfen. Dies ist f\xFCr die Authentifizierung und eine vertrauensw\xFCrdige Login-Erfahrung erforderlich.",
3734
+ "consent.scope.offline_access.title": "Offline-Zugriff",
3735
+ "consent.scope.offline_access.description": "Erm\xF6glicht dieser Anwendung, Sie angemeldet zu lassen, auch wenn Sie sie nicht aktiv nutzen.",
3736
+ "consent.scope.profile.title": "Profilinformationen",
3737
+ "consent.scope.profile.description": "Erm\xF6glicht den Zugriff auf Ihre grundlegenden Profildetails, einschlie\xDFlich Ihres Benutzernamens, Vornamens und Nachnamens.",
3738
+ "consent.scope.email.title": "E-Mail-Adresse",
3739
+ "consent.scope.email.description": "Erm\xF6glicht den Abruf Ihrer E-Mail-Adresse und deren \xDCberpr\xFCfungsstatus.",
3740
+ "consent.scope.address.title": "Physische Adresse",
3741
+ "consent.scope.address.description": "Erm\xF6glicht den Zugriff auf Ihre Postanschrift.",
3742
+ "consent.scope.phone.title": "Telefonnummer",
3743
+ "consent.scope.phone.description": "Erm\xF6glicht den Abruf Ihrer Telefonnummer und deren \xDCberpr\xFCfungsstatus.",
3448
3744
  "error.title.what-happened": "Was ist passiert?",
3449
3745
  "error.footer.copy": "Kopieren",
3450
3746
  "error.footer.text": "Bitte f\xFCgen Sie bei der Meldung dieses Fehlers die folgenden Informationen hinzu:",
@@ -3716,6 +4012,20 @@ var es_default = {
3716
4012
  "property.password": "",
3717
4013
  "property.phone": "",
3718
4014
  "property.username": "",
4015
+ "consent.title": "Autorizar {party}",
4016
+ "consent.subtitle": "Una aplicaci\xF3n de terceros quiere acceder a la informaci\xF3n asociada a su cuenta {identifier}.",
4017
+ "consent.scope.openid.title": "Identidad",
4018
+ "consent.scope.openid.description": "Permite que la aplicaci\xF3n verifique su identidad. Esto es necesario para la autenticaci\xF3n y una experiencia de inicio de sesi\xF3n confiable.",
4019
+ "consent.scope.offline_access.title": "Acceso sin conexi\xF3n",
4020
+ "consent.scope.offline_access.description": "Permite que esta aplicaci\xF3n le mantenga conectado incluso cuando no la est\xE9 utilizando activamente.",
4021
+ "consent.scope.profile.title": "Informaci\xF3n del perfil",
4022
+ "consent.scope.profile.description": "Permite el acceso a los detalles b\xE1sicos de su perfil, incluyendo su nombre de usuario, nombre y apellido.",
4023
+ "consent.scope.email.title": "Direcci\xF3n de correo electr\xF3nico",
4024
+ "consent.scope.email.description": "Recupere su direcci\xF3n de correo electr\xF3nico y su estado de verificaci\xF3n.",
4025
+ "consent.scope.address.title": "Direcci\xF3n f\xEDsica",
4026
+ "consent.scope.address.description": "Acceda a su direcci\xF3n postal.",
4027
+ "consent.scope.phone.title": "N\xFAmero de tel\xE9fono",
4028
+ "consent.scope.phone.description": "Recupere su n\xFAmero de tel\xE9fono y su estado de verificaci\xF3n.",
3719
4029
  "error.action.go-back": "",
3720
4030
  "error.footer.copy": "",
3721
4031
  "error.footer.text": "",
@@ -3987,6 +4297,20 @@ var fr_default = {
3987
4297
  "property.password": "",
3988
4298
  "property.phone": "",
3989
4299
  "property.username": "",
4300
+ "consent.title": "Autoriser {party}",
4301
+ "consent.subtitle": "Une application tierce souhaite acc\xE9der aux informations associ\xE9es \xE0 votre compte {identifier}.",
4302
+ "consent.scope.openid.title": "Identit\xE9",
4303
+ "consent.scope.openid.description": "Permet \xE0 l'application de v\xE9rifier votre identit\xE9. Cela est n\xE9cessaire pour l'authentification et une exp\xE9rience de connexion fiable.",
4304
+ "consent.scope.offline_access.title": "Acc\xE8s hors ligne",
4305
+ "consent.scope.offline_access.description": "Permet \xE0 cette application de vous maintenir connect\xE9 m\xEAme lorsque vous ne l'utilisez pas activement.",
4306
+ "consent.scope.profile.title": "Informations de profil",
4307
+ "consent.scope.profile.description": "Permet l'acc\xE8s aux d\xE9tails de base de votre profil, y compris votre nom d'utilisateur, pr\xE9nom et nom.",
4308
+ "consent.scope.email.title": "Adresse e-mail",
4309
+ "consent.scope.email.description": "R\xE9cup\xE8re votre adresse e-mail et son statut de v\xE9rification.",
4310
+ "consent.scope.address.title": "Adresse physique",
4311
+ "consent.scope.address.description": "Acc\xE8de \xE0 votre adresse postale.",
4312
+ "consent.scope.phone.title": "Num\xE9ro de t\xE9l\xE9phone",
4313
+ "consent.scope.phone.description": "R\xE9cup\xE8re votre num\xE9ro de t\xE9l\xE9phone et son statut de v\xE9rification.",
3990
4314
  "error.action.go-back": "",
3991
4315
  "error.footer.copy": "",
3992
4316
  "error.footer.text": "",
@@ -4258,6 +4582,20 @@ var nl_default = {
4258
4582
  "property.password": "",
4259
4583
  "property.phone": "",
4260
4584
  "property.username": "",
4585
+ "consent.title": "Autoriseren {party}",
4586
+ "consent.subtitle": "Een derde partij applicatie wil toegang tot informatie die aan uw account {identifier} is gekoppeld.",
4587
+ "consent.scope.openid.title": "Identiteit",
4588
+ "consent.scope.openid.description": "Stelt de applicatie in staat uw identiteit te verifi\xEBren. Dit is vereist voor authenticatie en een betrouwbare inlogervaring.",
4589
+ "consent.scope.offline_access.title": "Offline toegang",
4590
+ "consent.scope.offline_access.description": "Stelt deze applicatie in staat u ingelogd te houden, zelfs wanneer u deze niet actief gebruikt.",
4591
+ "consent.scope.profile.title": "Profielinformatie",
4592
+ "consent.scope.profile.description": "Geeft toegang tot uw basisprofielgegevens, inclusief uw gebruikersnaam, voornaam en achternaam.",
4593
+ "consent.scope.email.title": "E-mailadres",
4594
+ "consent.scope.email.description": "Haal uw e-mailadres en de verificatiestatus ervan op.",
4595
+ "consent.scope.address.title": "Fysiek adres",
4596
+ "consent.scope.address.description": "Toegang tot uw postadres.",
4597
+ "consent.scope.phone.title": "Telefoonnummer",
4598
+ "consent.scope.phone.description": "Haal uw telefoonnummer en de verificatiestatus ervan op.",
4261
4599
  "error.action.go-back": "",
4262
4600
  "error.footer.copy": "",
4263
4601
  "error.footer.text": "",
@@ -4529,6 +4867,20 @@ var pl_default = {
4529
4867
  "property.phone": "",
4530
4868
  "property.username": "",
4531
4869
  "property.identifier": "",
4870
+ "consent.title": "Autoryzuj {party}",
4871
+ "consent.subtitle": "Aplikacja trzeciej strony chce uzyska\u0107 dost\u0119p do informacji powi\u0105zanych z Twoim kontem {identifier}.",
4872
+ "consent.scope.openid.title": "To\u017Csamo\u015B\u0107",
4873
+ "consent.scope.openid.description": "Pozwala aplikacji zweryfikowa\u0107 Twoj\u0105 to\u017Csamo\u015B\u0107. Jest to wymagane do uwierzytelniania i zapewnienia zaufanej sesji logowania.",
4874
+ "consent.scope.offline_access.title": "Dost\u0119p offline",
4875
+ "consent.scope.offline_access.description": "Pozwala aplikacji utrzyma\u0107 Twoje logowanie, nawet gdy nie korzystasz z niej aktywnie.",
4876
+ "consent.scope.profile.title": "Informacje profilowe",
4877
+ "consent.scope.profile.description": "Pozwala na dost\u0119p do podstawowych danych profilowych, w tym nazwy u\u017Cytkownika, imienia i nazwiska.",
4878
+ "consent.scope.email.title": "Adres e-mail",
4879
+ "consent.scope.email.description": "Pobierz sw\xF3j adres e-mail oraz status jego weryfikacji.",
4880
+ "consent.scope.address.title": "Adres fizyczny",
4881
+ "consent.scope.address.description": "Dost\u0119p do Twojego adresu pocztowego.",
4882
+ "consent.scope.phone.title": "Numer telefonu",
4883
+ "consent.scope.phone.description": "Pobierz sw\xF3j numer telefonu oraz status jego weryfikacji.",
4532
4884
  "error.action.go-back": "",
4533
4885
  "error.footer.copy": "",
4534
4886
  "error.footer.text": "",
@@ -4800,6 +5152,20 @@ var pt_default = {
4800
5152
  "property.password": "",
4801
5153
  "property.phone": "",
4802
5154
  "property.username": "",
5155
+ "consent.title": "Autorizar {party}",
5156
+ "consent.subtitle": "Um aplicativo de terceiros deseja acessar as informa\xE7\xF5es associadas \xE0 sua conta {identifier}.",
5157
+ "consent.scope.openid.title": "Identidade",
5158
+ "consent.scope.openid.description": "Permite que a aplica\xE7\xE3o verifique sua identidade. Isso \xE9 necess\xE1rio para a autentica\xE7\xE3o e uma experi\xEAncia de login confi\xE1vel.",
5159
+ "consent.scope.offline_access.title": "Acesso Offline",
5160
+ "consent.scope.offline_access.description": "Permite que este aplicativo mantenha voc\xEA conectado mesmo quando n\xE3o estiver usando-o ativamente.",
5161
+ "consent.scope.profile.title": "Informa\xE7\xF5es do Perfil",
5162
+ "consent.scope.profile.description": "Permite o acesso aos detalhes b\xE1sicos do seu perfil, incluindo seu nome de usu\xE1rio, primeiro nome e sobrenome.",
5163
+ "consent.scope.email.title": "Endere\xE7o de E-mail",
5164
+ "consent.scope.email.description": "Recupere seu endere\xE7o de e-mail e seu status de verifica\xE7\xE3o.",
5165
+ "consent.scope.address.title": "Endere\xE7o F\xEDsico",
5166
+ "consent.scope.address.description": "Acesse seu endere\xE7o postal.",
5167
+ "consent.scope.phone.title": "N\xFAmero de Telefone",
5168
+ "consent.scope.phone.description": "Recupere seu n\xFAmero de telefone e seu status de verifica\xE7\xE3o.",
4803
5169
  "error.action.go-back": "",
4804
5170
  "error.footer.copy": "",
4805
5171
  "error.footer.text": "",
@@ -5071,6 +5437,20 @@ var sv_default = {
5071
5437
  "property.username": "anv\xE4ndarnamn",
5072
5438
  "property.identifier": "identifier",
5073
5439
  "property.code": "kod",
5440
+ "consent.title": "Auktorisera {party}",
5441
+ "consent.subtitle": "En tredjepartsapplikation vill f\xE5 tillg\xE5ng till information kopplad till ditt konto {identifier}.",
5442
+ "consent.scope.openid.title": "Identitet",
5443
+ "consent.scope.openid.description": "G\xF6r det m\xF6jligt f\xF6r applikationen att verifiera din identitet. Detta kr\xE4vs f\xF6r autentisering och en p\xE5litlig inloggningsupplevelse.",
5444
+ "consent.scope.offline_access.title": "Offline-\xE5tkomst",
5445
+ "consent.scope.offline_access.description": "G\xF6r det m\xF6jligt f\xF6r denna applikation att h\xE5lla dig inloggad \xE4ven n\xE4r du inte aktivt anv\xE4nder den.",
5446
+ "consent.scope.profile.title": "Profilinformation",
5447
+ "consent.scope.profile.description": "Ger tillg\xE5ng till dina grundl\xE4ggande profiluppgifter, inklusive ditt anv\xE4ndarnamn, f\xF6rnamn och efternamn.",
5448
+ "consent.scope.email.title": "E-postadress",
5449
+ "consent.scope.email.description": "H\xE4mta din e-postadress och dess verifieringsstatus.",
5450
+ "consent.scope.address.title": "Fysisk adress",
5451
+ "consent.scope.address.description": "F\xE5 \xE5tkomst till din postadress.",
5452
+ "consent.scope.phone.title": "Telefonnummer",
5453
+ "consent.scope.phone.description": "H\xE4mta ditt telefonnummer och dess verifieringsstatus.",
5074
5454
  "error.action.go-back": "",
5075
5455
  "error.footer.copy": "",
5076
5456
  "error.footer.text": "",
@@ -5092,7 +5472,7 @@ var OryLocales = {
5092
5472
  };
5093
5473
 
5094
5474
  // src/context/intl-context.tsx
5095
- import { jsx as jsx93 } from "react/jsx-runtime";
5475
+ import { jsx as jsx99 } from "react/jsx-runtime";
5096
5476
  function mergeTranslations(customTranslations) {
5097
5477
  return Object.keys(customTranslations).reduce((acc, key) => {
5098
5478
  acc[key] = { ...OryLocales[key], ...customTranslations[key] };
@@ -5105,12 +5485,12 @@ var IntlProvider = ({
5105
5485
  customTranslations
5106
5486
  }) => {
5107
5487
  const messages = mergeTranslations(customTranslations != null ? customTranslations : {});
5108
- return /* @__PURE__ */ jsx93(
5488
+ return /* @__PURE__ */ jsx99(
5109
5489
  OriginalIntlProvider,
5110
5490
  {
5111
5491
  onWarn: () => ({}),
5112
5492
  defaultRichTextElements: {
5113
- del: (chunks) => /* @__PURE__ */ jsx93("del", { children: chunks })
5493
+ del: (chunks) => /* @__PURE__ */ jsx99("del", { children: chunks })
5114
5494
  },
5115
5495
  locale,
5116
5496
  messages: messages[locale],
@@ -5122,7 +5502,7 @@ var IntlProvider = ({
5122
5502
 
5123
5503
  // src/theme/default/flows/error.tsx
5124
5504
  import { FormattedMessage } from "react-intl";
5125
- import { jsx as jsx94, jsxs as jsxs45 } from "react/jsx-runtime";
5505
+ import { jsx as jsx100, jsxs as jsxs46 } from "react/jsx-runtime";
5126
5506
  function isOAuth2Error(error) {
5127
5507
  return !!error && typeof error === "object" && "error" in error && "error_description" in error;
5128
5508
  }
@@ -5175,47 +5555,47 @@ function Error2({
5175
5555
  const Divider = (_d = (_c = Components == null ? void 0 : Components.Card) == null ? void 0 : _c.Divider) != null ? _d : DefaultHorizontalDivider;
5176
5556
  const parsed = useStandardize(error);
5177
5557
  const description = errorDescriptions[Math.floor(parsed.code / 100)];
5178
- return /* @__PURE__ */ jsx94(
5558
+ return /* @__PURE__ */ jsx100(
5179
5559
  IntlProvider,
5180
5560
  {
5181
5561
  locale: (_f = (_e = config.intl) == null ? void 0 : _e.locale) != null ? _f : "en",
5182
5562
  customTranslations: (_g = config.intl) == null ? void 0 : _g.customTranslations,
5183
- children: /* @__PURE__ */ jsx94(Card, { children: /* @__PURE__ */ jsxs45(
5563
+ children: /* @__PURE__ */ jsx100(Card, { children: /* @__PURE__ */ jsxs46(
5184
5564
  "div",
5185
5565
  {
5186
5566
  className: "flex flex-col gap-6 antialiased",
5187
5567
  "data-testid": "ory/screen/error",
5188
5568
  children: [
5189
- /* @__PURE__ */ jsxs45("header", { className: "flex flex-col gap-8 antialiased", children: [
5190
- /* @__PURE__ */ jsx94(ErrorLogo, { config }),
5191
- /* @__PURE__ */ jsxs45("div", { className: "flex flex-col gap-2", children: [
5192
- /* @__PURE__ */ jsx94("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx94(FormattedMessage, { id: "error.title.what-happened" }) }),
5193
- /* @__PURE__ */ jsx94("p", { className: "leading-normal text-interface-foreground-default-secondary", children: (_h = parsed.message) != null ? _h : description }),
5194
- parsed.reason && /* @__PURE__ */ jsx94("p", { className: "leading-normal text-interface-foreground-default-secondary", children: parsed.reason })
5569
+ /* @__PURE__ */ jsxs46("header", { className: "flex flex-col gap-8 antialiased", children: [
5570
+ /* @__PURE__ */ jsx100(ErrorLogo, { config }),
5571
+ /* @__PURE__ */ jsxs46("div", { className: "flex flex-col gap-2", children: [
5572
+ /* @__PURE__ */ jsx100("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx100(FormattedMessage, { id: "error.title.what-happened" }) }),
5573
+ /* @__PURE__ */ jsx100("p", { className: "leading-normal text-interface-foreground-default-secondary", children: (_h = parsed.message) != null ? _h : description }),
5574
+ parsed.reason && /* @__PURE__ */ jsx100("p", { className: "leading-normal text-interface-foreground-default-secondary", children: parsed.reason })
5195
5575
  ] })
5196
5576
  ] }),
5197
- /* @__PURE__ */ jsx94(Divider, {}),
5198
- /* @__PURE__ */ jsxs45("div", { className: "flex flex-col gap-2", children: [
5199
- /* @__PURE__ */ jsx94("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx94(FormattedMessage, { id: "error.title.what-can-i-do" }) }),
5200
- /* @__PURE__ */ jsx94("p", { className: "leading-normal text-interface-foreground-default-secondary", children: /* @__PURE__ */ jsx94(FormattedMessage, { id: "error.instructions" }) }),
5201
- /* @__PURE__ */ jsx94("div", { children: session ? /* @__PURE__ */ jsx94(LoggedInActions, { config }) : /* @__PURE__ */ jsx94(GoBackButton, { config }) })
5577
+ /* @__PURE__ */ jsx100(Divider, {}),
5578
+ /* @__PURE__ */ jsxs46("div", { className: "flex flex-col gap-2", children: [
5579
+ /* @__PURE__ */ jsx100("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx100(FormattedMessage, { id: "error.title.what-can-i-do" }) }),
5580
+ /* @__PURE__ */ jsx100("p", { className: "leading-normal text-interface-foreground-default-secondary", children: /* @__PURE__ */ jsx100(FormattedMessage, { id: "error.instructions" }) }),
5581
+ /* @__PURE__ */ jsx100("div", { children: session ? /* @__PURE__ */ jsx100(LoggedInActions, { config }) : /* @__PURE__ */ jsx100(GoBackButton, { config }) })
5202
5582
  ] }),
5203
- /* @__PURE__ */ jsx94(Divider, {}),
5204
- /* @__PURE__ */ jsxs45("div", { className: "font-normal leading-normal antialiased gap-2 flex flex-col", children: [
5205
- /* @__PURE__ */ jsx94("span", { className: "text-interface-foreground-default-primary text-sm", children: /* @__PURE__ */ jsx94(FormattedMessage, { id: "error.footer.text" }) }),
5206
- parsed.id && /* @__PURE__ */ jsxs45("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
5583
+ /* @__PURE__ */ jsx100(Divider, {}),
5584
+ /* @__PURE__ */ jsxs46("div", { className: "font-normal leading-normal antialiased gap-2 flex flex-col", children: [
5585
+ /* @__PURE__ */ jsx100("span", { className: "text-interface-foreground-default-primary text-sm", children: /* @__PURE__ */ jsx100(FormattedMessage, { id: "error.footer.text" }) }),
5586
+ parsed.id && /* @__PURE__ */ jsxs46("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
5207
5587
  "ID: ",
5208
- /* @__PURE__ */ jsx94("code", { children: parsed.id })
5588
+ /* @__PURE__ */ jsx100("code", { children: parsed.id })
5209
5589
  ] }),
5210
- /* @__PURE__ */ jsxs45("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
5590
+ /* @__PURE__ */ jsxs46("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
5211
5591
  "Time: ",
5212
- /* @__PURE__ */ jsx94("code", { children: (_i = parsed.timestamp) == null ? void 0 : _i.toUTCString() })
5592
+ /* @__PURE__ */ jsx100("code", { children: (_i = parsed.timestamp) == null ? void 0 : _i.toUTCString() })
5213
5593
  ] }),
5214
- /* @__PURE__ */ jsxs45("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
5594
+ /* @__PURE__ */ jsxs46("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
5215
5595
  "Message: ",
5216
- /* @__PURE__ */ jsx94("code", { children: parsed.reason })
5596
+ /* @__PURE__ */ jsx100("code", { children: parsed.reason })
5217
5597
  ] }),
5218
- /* @__PURE__ */ jsx94("div", { children: /* @__PURE__ */ jsx94(
5598
+ /* @__PURE__ */ jsx100("div", { children: /* @__PURE__ */ jsx100(
5219
5599
  "button",
5220
5600
  {
5221
5601
  className: "text-interface-foreground-default-primary underline",
@@ -5227,7 +5607,7 @@ ${parsed.reason ? `Message: ${parsed.reason}` : ""}
5227
5607
  `;
5228
5608
  void navigator.clipboard.writeText(text);
5229
5609
  },
5230
- children: /* @__PURE__ */ jsx94(FormattedMessage, { id: "error.footer.copy" })
5610
+ children: /* @__PURE__ */ jsx100(FormattedMessage, { id: "error.footer.copy" })
5231
5611
  }
5232
5612
  ) })
5233
5613
  ] })
@@ -5239,7 +5619,7 @@ ${parsed.reason ? `Message: ${parsed.reason}` : ""}
5239
5619
  }
5240
5620
  function LoggedInActions({ config }) {
5241
5621
  const logoutFlow = useClientLogout(config);
5242
- return /* @__PURE__ */ jsx94(
5622
+ return /* @__PURE__ */ jsx100(
5243
5623
  "a",
5244
5624
  {
5245
5625
  href: logoutFlow == null ? void 0 : logoutFlow.logout_url,
@@ -5250,12 +5630,12 @@ function LoggedInActions({ config }) {
5250
5630
  }
5251
5631
  function GoBackButton({ config }) {
5252
5632
  if ("default_redirect_url" in config.project) {
5253
- return /* @__PURE__ */ jsx94(
5633
+ return /* @__PURE__ */ jsx100(
5254
5634
  "a",
5255
5635
  {
5256
5636
  className: "text-interface-foreground-default-primary underline",
5257
5637
  href: config.project.default_redirect_url,
5258
- children: /* @__PURE__ */ jsx94(FormattedMessage, { id: "error.action.go-back" })
5638
+ children: /* @__PURE__ */ jsx100(FormattedMessage, { id: "error.action.go-back" })
5259
5639
  }
5260
5640
  );
5261
5641
  }
@@ -5263,18 +5643,18 @@ function GoBackButton({ config }) {
5263
5643
  }
5264
5644
  function ErrorLogo({ config }) {
5265
5645
  if (config.logoUrl) {
5266
- return /* @__PURE__ */ jsx94("img", { src: config.logoUrl, width: 100, height: 36, alt: "Logo" });
5646
+ return /* @__PURE__ */ jsx100("img", { src: config.logoUrl, width: 100, height: 36, alt: "Logo" });
5267
5647
  }
5268
- return /* @__PURE__ */ jsx94("h1", { className: "text-xl font-semibold leading-normal text-interface-foreground-default-primary", children: config.name });
5648
+ return /* @__PURE__ */ jsx100("h1", { className: "text-xl font-semibold leading-normal text-interface-foreground-default-primary", children: config.name });
5269
5649
  }
5270
5650
 
5271
5651
  // src/theme/default/flows/login.tsx
5272
- import { FlowType as FlowType17 } from "@ory/client-fetch";
5652
+ import { FlowType as FlowType18 } from "@ory/client-fetch";
5273
5653
  import {
5274
5654
  OryProvider,
5275
5655
  OryTwoStepCard as OryTwoStepCard2
5276
5656
  } from "@ory/elements-react";
5277
- import { jsx as jsx95 } from "react/jsx-runtime";
5657
+ import { jsx as jsx101 } from "react/jsx-runtime";
5278
5658
  function Login({
5279
5659
  flow,
5280
5660
  config,
@@ -5282,25 +5662,25 @@ function Login({
5282
5662
  components: flowOverrideComponents
5283
5663
  }) {
5284
5664
  const components = getOryComponents(flowOverrideComponents);
5285
- return /* @__PURE__ */ jsx95(
5665
+ return /* @__PURE__ */ jsx101(
5286
5666
  OryProvider,
5287
5667
  {
5288
5668
  config,
5289
5669
  flow,
5290
- flowType: FlowType17.Login,
5670
+ flowType: FlowType18.Login,
5291
5671
  components,
5292
- children: children != null ? children : /* @__PURE__ */ jsx95(OryTwoStepCard2, {})
5672
+ children: children != null ? children : /* @__PURE__ */ jsx101(OryTwoStepCard2, {})
5293
5673
  }
5294
5674
  );
5295
5675
  }
5296
5676
 
5297
5677
  // src/theme/default/flows/recovery.tsx
5298
- import { FlowType as FlowType18 } from "@ory/client-fetch";
5678
+ import { FlowType as FlowType19 } from "@ory/client-fetch";
5299
5679
  import {
5300
5680
  OryProvider as OryProvider2,
5301
5681
  OryTwoStepCard as OryTwoStepCard3
5302
5682
  } from "@ory/elements-react";
5303
- import { jsx as jsx96 } from "react/jsx-runtime";
5683
+ import { jsx as jsx102 } from "react/jsx-runtime";
5304
5684
  function Recovery({
5305
5685
  flow,
5306
5686
  config,
@@ -5308,25 +5688,25 @@ function Recovery({
5308
5688
  components: flowOverrideComponents
5309
5689
  }) {
5310
5690
  const components = getOryComponents(flowOverrideComponents);
5311
- return /* @__PURE__ */ jsx96(
5691
+ return /* @__PURE__ */ jsx102(
5312
5692
  OryProvider2,
5313
5693
  {
5314
5694
  config,
5315
5695
  flow,
5316
- flowType: FlowType18.Recovery,
5696
+ flowType: FlowType19.Recovery,
5317
5697
  components,
5318
- children: children != null ? children : /* @__PURE__ */ jsx96(OryTwoStepCard3, {})
5698
+ children: children != null ? children : /* @__PURE__ */ jsx102(OryTwoStepCard3, {})
5319
5699
  }
5320
5700
  );
5321
5701
  }
5322
5702
 
5323
5703
  // src/theme/default/flows/registration.tsx
5324
- import { FlowType as FlowType19 } from "@ory/client-fetch";
5704
+ import { FlowType as FlowType20 } from "@ory/client-fetch";
5325
5705
  import {
5326
5706
  OryProvider as OryProvider3,
5327
5707
  OryTwoStepCard as OryTwoStepCard4
5328
5708
  } from "@ory/elements-react";
5329
- import { jsx as jsx97 } from "react/jsx-runtime";
5709
+ import { jsx as jsx103 } from "react/jsx-runtime";
5330
5710
  function Registration({
5331
5711
  flow,
5332
5712
  children,
@@ -5334,26 +5714,26 @@ function Registration({
5334
5714
  config
5335
5715
  }) {
5336
5716
  const components = getOryComponents(flowOverrideComponents);
5337
- return /* @__PURE__ */ jsx97(
5717
+ return /* @__PURE__ */ jsx103(
5338
5718
  OryProvider3,
5339
5719
  {
5340
5720
  config,
5341
5721
  flow,
5342
- flowType: FlowType19.Registration,
5722
+ flowType: FlowType20.Registration,
5343
5723
  components,
5344
- children: children != null ? children : /* @__PURE__ */ jsx97(OryTwoStepCard4, {})
5724
+ children: children != null ? children : /* @__PURE__ */ jsx103(OryTwoStepCard4, {})
5345
5725
  }
5346
5726
  );
5347
5727
  }
5348
5728
 
5349
5729
  // src/theme/default/flows/settings.tsx
5350
- import { FlowType as FlowType20 } from "@ory/client-fetch";
5730
+ import { FlowType as FlowType21 } from "@ory/client-fetch";
5351
5731
  import {
5352
5732
  HeadlessPageHeader,
5353
5733
  OryProvider as OryProvider4,
5354
5734
  OrySettingsCard
5355
5735
  } from "@ory/elements-react";
5356
- import { Fragment as Fragment14, jsx as jsx98, jsxs as jsxs46 } from "react/jsx-runtime";
5736
+ import { Fragment as Fragment12, jsx as jsx104, jsxs as jsxs47 } from "react/jsx-runtime";
5357
5737
  function Settings({
5358
5738
  flow,
5359
5739
  config,
@@ -5361,28 +5741,28 @@ function Settings({
5361
5741
  components: flowOverrideComponents
5362
5742
  }) {
5363
5743
  const components = getOryComponents(flowOverrideComponents);
5364
- return /* @__PURE__ */ jsx98(
5744
+ return /* @__PURE__ */ jsx104(
5365
5745
  OryProvider4,
5366
5746
  {
5367
5747
  config,
5368
5748
  flow,
5369
- flowType: FlowType20.Settings,
5749
+ flowType: FlowType21.Settings,
5370
5750
  components,
5371
- children: children != null ? children : /* @__PURE__ */ jsxs46(Fragment14, { children: [
5372
- /* @__PURE__ */ jsx98(HeadlessPageHeader, {}),
5373
- /* @__PURE__ */ jsx98(OrySettingsCard, {})
5751
+ children: children != null ? children : /* @__PURE__ */ jsxs47(Fragment12, { children: [
5752
+ /* @__PURE__ */ jsx104(HeadlessPageHeader, {}),
5753
+ /* @__PURE__ */ jsx104(OrySettingsCard, {})
5374
5754
  ] })
5375
5755
  }
5376
5756
  );
5377
5757
  }
5378
5758
 
5379
5759
  // src/theme/default/flows/verification.tsx
5380
- import { FlowType as FlowType21 } from "@ory/client-fetch";
5760
+ import { FlowType as FlowType22 } from "@ory/client-fetch";
5381
5761
  import {
5382
5762
  OryProvider as OryProvider5,
5383
5763
  OryTwoStepCard as OryTwoStepCard5
5384
5764
  } from "@ory/elements-react";
5385
- import { jsx as jsx99 } from "react/jsx-runtime";
5765
+ import { jsx as jsx105 } from "react/jsx-runtime";
5386
5766
  function Verification({
5387
5767
  flow,
5388
5768
  config,
@@ -5390,18 +5770,196 @@ function Verification({
5390
5770
  components: flowOverrideComponents
5391
5771
  }) {
5392
5772
  const components = getOryComponents(flowOverrideComponents);
5393
- return /* @__PURE__ */ jsx99(
5773
+ return /* @__PURE__ */ jsx105(
5394
5774
  OryProvider5,
5395
5775
  {
5396
5776
  config,
5397
5777
  flow,
5398
- flowType: FlowType21.Verification,
5778
+ flowType: FlowType22.Verification,
5779
+ components,
5780
+ children: children != null ? children : /* @__PURE__ */ jsx105(OryTwoStepCard5, {})
5781
+ }
5782
+ );
5783
+ }
5784
+
5785
+ // src/theme/default/flows/consent.tsx
5786
+ import { FlowType as FlowType23 } from "@ory/client-fetch";
5787
+ import {
5788
+ OryConsentCard as OryConsentCard2,
5789
+ OryProvider as OryProvider6
5790
+ } from "@ory/elements-react";
5791
+
5792
+ // src/theme/default/utils/oauth2.ts
5793
+ import {
5794
+ UiTextTypeEnum
5795
+ } from "@ory/client-fetch";
5796
+ var rememberCheckbox = {
5797
+ type: "input",
5798
+ group: "oauth2_consent",
5799
+ meta: {
5800
+ label: {
5801
+ id: 9999111,
5802
+ text: "Remember my decision",
5803
+ type: UiTextTypeEnum.Info
5804
+ }
5805
+ },
5806
+ attributes: {
5807
+ node_type: "input",
5808
+ name: "remember",
5809
+ value: false,
5810
+ type: "checkbox",
5811
+ disabled: false
5812
+ },
5813
+ messages: []
5814
+ };
5815
+ var acceptButton = {
5816
+ type: "input",
5817
+ group: "oauth2_consent",
5818
+ meta: {
5819
+ label: {
5820
+ id: 9999111,
5821
+ text: "Accept",
5822
+ type: UiTextTypeEnum.Info
5823
+ }
5824
+ },
5825
+ attributes: {
5826
+ node_type: "input",
5827
+ name: "action",
5828
+ value: "accept",
5829
+ type: "submit",
5830
+ disabled: false
5831
+ },
5832
+ messages: []
5833
+ };
5834
+ var rejectButton = {
5835
+ type: "input",
5836
+ group: "oauth2_consent",
5837
+ meta: {
5838
+ label: {
5839
+ id: 9999111,
5840
+ text: "Reject",
5841
+ type: UiTextTypeEnum.Info
5842
+ }
5843
+ },
5844
+ attributes: {
5845
+ node_type: "input",
5846
+ name: "action",
5847
+ value: "reject",
5848
+ type: "submit",
5849
+ disabled: false
5850
+ },
5851
+ messages: []
5852
+ };
5853
+ function translateConsentChallengeToUiNodes(consentChallenge, csrfToken, formAction, session) {
5854
+ var _a;
5855
+ const ui = {
5856
+ action: formAction,
5857
+ nodes: [
5858
+ ...scopesToUiNodes((_a = consentChallenge.requested_scope) != null ? _a : []),
5859
+ rememberCheckbox,
5860
+ rejectButton,
5861
+ acceptButton,
5862
+ csrfTokenNode(csrfToken),
5863
+ challengeNode(consentChallenge.challenge)
5864
+ ],
5865
+ method: "POST",
5866
+ messages: []
5867
+ };
5868
+ return {
5869
+ id: "UNSET",
5870
+ created_at: /* @__PURE__ */ new Date(),
5871
+ expires_at: /* @__PURE__ */ new Date(),
5872
+ issued_at: /* @__PURE__ */ new Date(),
5873
+ state: "show_form",
5874
+ active: "oauth2_consent",
5875
+ ui,
5876
+ consent_request: consentChallenge,
5877
+ session
5878
+ };
5879
+ }
5880
+ function scopesToUiNodes(scopes) {
5881
+ return scopes.map((scope) => ({
5882
+ type: "input",
5883
+ group: "oauth2_consent",
5884
+ meta: {
5885
+ label: {
5886
+ id: 9999111,
5887
+ text: scope,
5888
+ type: UiTextTypeEnum.Info
5889
+ }
5890
+ },
5891
+ attributes: {
5892
+ node_type: "input",
5893
+ name: `grant_scope`,
5894
+ value: scope,
5895
+ type: "checkbox",
5896
+ disabled: false
5897
+ },
5898
+ messages: []
5899
+ }));
5900
+ }
5901
+ function csrfTokenNode(csrfToken) {
5902
+ return {
5903
+ type: "input",
5904
+ group: "default",
5905
+ meta: {},
5906
+ attributes: {
5907
+ node_type: "input",
5908
+ name: "csrf_token",
5909
+ value: csrfToken,
5910
+ type: "hidden",
5911
+ disabled: false
5912
+ },
5913
+ messages: []
5914
+ };
5915
+ }
5916
+ function challengeNode(challenge) {
5917
+ return {
5918
+ type: "input",
5919
+ group: "oauth2_consent",
5920
+ meta: {},
5921
+ attributes: {
5922
+ node_type: "input",
5923
+ name: "consent_challenge",
5924
+ value: challenge,
5925
+ type: "hidden",
5926
+ disabled: false
5927
+ },
5928
+ messages: []
5929
+ };
5930
+ }
5931
+
5932
+ // src/theme/default/flows/consent.tsx
5933
+ import { jsx as jsx106 } from "react/jsx-runtime";
5934
+ function Consent({
5935
+ consentChallenge,
5936
+ session,
5937
+ config,
5938
+ components: Passed,
5939
+ children,
5940
+ csrfToken,
5941
+ formActionUrl
5942
+ }) {
5943
+ const components = getOryComponents(Passed);
5944
+ const flow = translateConsentChallengeToUiNodes(
5945
+ consentChallenge,
5946
+ csrfToken,
5947
+ formActionUrl,
5948
+ session
5949
+ );
5950
+ return /* @__PURE__ */ jsx106(
5951
+ OryProvider6,
5952
+ {
5953
+ config,
5954
+ flow,
5955
+ flowType: FlowType23.OAuth2Consent,
5399
5956
  components,
5400
- children: children != null ? children : /* @__PURE__ */ jsx99(OryTwoStepCard5, {})
5957
+ children: children != null ? children : /* @__PURE__ */ jsx106(OryConsentCard2, {})
5401
5958
  }
5402
5959
  );
5403
5960
  }
5404
5961
  export {
5962
+ Consent,
5405
5963
  DefaultButtonSocial,
5406
5964
  DefaultCard,
5407
5965
  DefaultCardContent,