@ory/elements-react 1.0.0-next.30 → 1.0.0-next.31

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.
@@ -187,7 +187,10 @@ function RegistrationCardFooter() {
187
187
  function handleScreenSelection() {
188
188
  setValue("method", "profile");
189
189
  if (screenSelectionNode) {
190
- setValue("screen", "credential-selection");
190
+ setValue(
191
+ screenSelectionNode.attributes.name,
192
+ screenSelectionNode.attributes.value
193
+ );
191
194
  }
192
195
  }
193
196
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "font-normal leading-normal antialiased", children: formState.current === "method_active" ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, { children: screenSelectionNode && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
@@ -195,6 +198,8 @@ function RegistrationCardFooter() {
195
198
  {
196
199
  className: "font-medium text-button-link-brand-brand hover:text-button-link-brand-brand-hover",
197
200
  type: "submit",
201
+ name: screenSelectionNode.attributes.name,
202
+ value: screenSelectionNode.attributes.value,
198
203
  onClick: handleScreenSelection,
199
204
  children: intl.formatMessage({
200
205
  id: "card.footer.select-another-method",
@@ -586,6 +591,10 @@ var import_client_fetch4 = require("@ory/client-fetch");
586
591
 
587
592
  // src/theme/default/components/form/social.tsx
588
593
  var import_elements_react5 = require("@ory/elements-react");
594
+ var import_react = require("react");
595
+ var import_react_hook_form2 = require("react-hook-form");
596
+ var import_react_intl3 = require("react-intl");
597
+ var import_usehooks_ts = require("usehooks-ts");
589
598
 
590
599
  // src/theme/default/provider-logos/apple.svg
591
600
  var React4 = __toESM(require("react"));
@@ -775,11 +784,6 @@ var logos = {
775
784
  };
776
785
  var provider_logos_default = logos;
777
786
 
778
- // src/theme/default/components/form/social.tsx
779
- var import_react_intl3 = require("react-intl");
780
- var import_react = require("react");
781
- var import_react_hook_form2 = require("react-hook-form");
782
-
783
787
  // src/theme/default/components/form/spinner.tsx
784
788
  var import_jsx_runtime25 = require("react/jsx-runtime");
785
789
  function Spinner({ className }) {
@@ -845,7 +849,7 @@ function DefaultButtonSocial({
845
849
  const {
846
850
  flow: { ui }
847
851
  } = (0, import_elements_react5.useOryFlow)();
848
- const [clicked, setClicked] = (0, import_react.useState)(false);
852
+ const [clicked, setClicked] = (0, import_usehooks_ts.useDebounceValue)(false, 100);
849
853
  const intl = (0, import_react_intl3.useIntl)();
850
854
  const {
851
855
  formState: { isSubmitting }
@@ -855,14 +859,14 @@ function DefaultButtonSocial({
855
859
  const showLabel = _showLabel != null ? _showLabel : oidcNodeCount % 3 !== 0 && oidcNodeCount % 4 !== 0;
856
860
  const provider = (_c = extractProvider((_b = node.meta.label) == null ? void 0 : _b.context)) != null ? _c : "";
857
861
  const localOnClick = () => {
858
- setClicked(true);
859
862
  onClick == null ? void 0 : onClick();
863
+ setClicked(true);
860
864
  };
861
865
  (0, import_react.useEffect)(() => {
862
866
  if (!isSubmitting) {
863
867
  setClicked(false);
864
868
  }
865
- }, [isSubmitting]);
869
+ }, [isSubmitting, setClicked]);
866
870
  return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
867
871
  "button",
868
872
  {
@@ -877,7 +881,10 @@ function DefaultButtonSocial({
877
881
  disabled: isSubmitting,
878
882
  children: [
879
883
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "size-5 relative", children: !clicked ? Logo ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Logo, { size: 20 }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "flex aspect-square items-center justify-center rounded-[999px] border text-xs", children: provider.slice(0, 2) }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Spinner, { className: "size-5" }) }),
880
- showLabel && node.meta.label ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "grow text-left font-medium leading-none text-button-social-foreground-default", children: (0, import_elements_react5.uiTextToFormattedMessage)(node.meta.label, intl) }) : null
884
+ showLabel && node.meta.label ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
885
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "grow text-center font-medium leading-none text-button-social-foreground-default", children: (0, import_elements_react5.uiTextToFormattedMessage)(node.meta.label, intl) }),
886
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "size-5 block" })
887
+ ] }) : null
881
888
  ]
882
889
  }
883
890
  );
@@ -1086,6 +1093,7 @@ var DefaultButton = ({
1086
1093
  autocomplete: _ignoredAutocomplete,
1087
1094
  label: _ignoredLabel,
1088
1095
  node_type: _ignoredNodeType,
1096
+ maxlength: _ignoredMaxLength,
1089
1097
  // End of skipped attributes
1090
1098
  ...rest
1091
1099
  } = attributes;
@@ -1623,17 +1631,31 @@ var import_jsx_runtime45 = require("react/jsx-runtime");
1623
1631
  function DefaultText({ node, attributes }) {
1624
1632
  var _a;
1625
1633
  const intl = (0, import_react_intl12.useIntl)();
1626
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
1627
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { "data-testid": `ory/form/node/text/${attributes.id}/label`, children: node.meta.label ? (0, import_elements_react13.uiTextToFormattedMessage)(node.meta.label, intl) : "" }),
1628
- (_a = attributes.text.context.secrets) == null ? void 0 : _a.map((text, index) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
1629
- "pre",
1630
- {
1631
- "data-testid": `ory/form/node/text/lookup_secret_codes/text`,
1632
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("code", { children: text ? (0, import_elements_react13.uiTextToFormattedMessage)(text, intl) : "" })
1633
- },
1634
- index
1635
- ))
1636
- ] });
1634
+ const lookup = (_a = attributes.text.context) == null ? void 0 : _a.secrets;
1635
+ if (lookup) {
1636
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
1637
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { "data-testid": `ory/form/node/text/${attributes.id}/label`, children: node.meta.label ? (0, import_elements_react13.uiTextToFormattedMessage)(node.meta.label, intl) : "" }),
1638
+ lookup.map((text, index) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
1639
+ "pre",
1640
+ {
1641
+ "data-testid": `ory/form/node/text/lookup_secret_codes/text`,
1642
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("code", { children: text ? (0, import_elements_react13.uiTextToFormattedMessage)(text, intl) : "" })
1643
+ },
1644
+ index
1645
+ ))
1646
+ ] });
1647
+ }
1648
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
1649
+ "p",
1650
+ {
1651
+ "data-testid": `ory/form/node/text/${attributes.id}/label`,
1652
+ id: attributes.id,
1653
+ children: [
1654
+ node.meta.label ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("label", { children: (0, import_elements_react13.uiTextToFormattedMessage)(node.meta.label, intl) }) : null,
1655
+ attributes.text ? (0, import_elements_react13.uiTextToFormattedMessage)(attributes.text, intl) : ""
1656
+ ]
1657
+ }
1658
+ ) });
1637
1659
  }
1638
1660
 
1639
1661
  // src/theme/default/components/generic/page-header.tsx
@@ -1863,6 +1885,7 @@ var DefaultPageHeader = (_props) => {
1863
1885
  // src/theme/default/components/settings/settings-oidc.tsx
1864
1886
  var import_react7 = require("react");
1865
1887
  var import_react_hook_form8 = require("react-hook-form");
1888
+ var import_usehooks_ts2 = require("usehooks-ts");
1866
1889
 
1867
1890
  // src/theme/default/assets/icons/trash.svg
1868
1891
  var React26 = __toESM(require("react"));
@@ -1906,27 +1929,25 @@ function DefaultSettingsOidc({
1906
1929
  }
1907
1930
  function UnlinkRow({ button }) {
1908
1931
  var _a, _b;
1909
- const [clicked, setClicked] = (0, import_react7.useState)(false);
1932
+ const [clicked, setClicked] = (0, import_usehooks_ts2.useDebounceValue)(false, 100);
1910
1933
  const {
1911
1934
  formState: { isSubmitting }
1912
1935
  } = (0, import_react_hook_form8.useFormContext)();
1913
1936
  const attrs = button.attributes;
1914
1937
  const provider = (_b = extractProvider((_a = button.meta.label) == null ? void 0 : _a.context)) != null ? _b : "";
1915
- const Logo = attrs.value in provider_logos_default ? provider_logos_default[attrs.value] : provider_logos_default.generic;
1938
+ const Logo = provider_logos_default[attrs.value.split("-")[0]];
1916
1939
  const localOnClick = () => {
1917
1940
  button.onClick();
1918
- setTimeout(() => {
1919
- setClicked(true);
1920
- }, 100);
1941
+ setClicked(true);
1921
1942
  };
1922
1943
  (0, import_react7.useEffect)(() => {
1923
1944
  if (!isSubmitting) {
1924
1945
  setClicked(false);
1925
1946
  }
1926
- }, [isSubmitting]);
1947
+ }, [isSubmitting, setClicked]);
1927
1948
  return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex justify-between", children: [
1928
1949
  /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex items-center gap-6", children: [
1929
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Logo, { size: 32 }),
1950
+ Logo ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Logo, { size: 32 }) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(provider_logos_default.generic, { size: 32 }),
1930
1951
  /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-sm font-medium text-interface-foreground-default-secondary", children: provider })
1931
1952
  ] }),
1932
1953
  /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
@@ -1961,11 +1982,11 @@ function DefaultSettingsPasskey({
1961
1982
  const {
1962
1983
  formState: { isSubmitting }
1963
1984
  } = (0, import_react_hook_form9.useFormContext)();
1964
- const { Node } = (0, import_elements_react16.useComponents)();
1985
+ const { Node: Node2 } = (0, import_elements_react16.useComponents)();
1965
1986
  const hasRemoveButtons = removeButtons.length > 0;
1966
1987
  return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex flex-col gap-8", children: [
1967
1988
  /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "flex max-w-[60%] items-end gap-3", children: triggerButton && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
1968
- Node.Button,
1989
+ Node2.Button,
1969
1990
  {
1970
1991
  node: triggerButton,
1971
1992
  attributes: triggerButton.attributes,
@@ -2175,7 +2196,7 @@ function DefaultSettingsTotp({
2175
2196
  totpUnlink,
2176
2197
  onUnlink
2177
2198
  }) {
2178
- const { Node, Card } = (0, import_elements_react17.useComponents)();
2199
+ const { Node: Node2, Card } = (0, import_elements_react17.useComponents)();
2179
2200
  const {
2180
2201
  formState: { isSubmitting }
2181
2202
  } = (0, import_react_hook_form11.useFormContext)();
@@ -2215,7 +2236,7 @@ function DefaultSettingsTotp({
2215
2236
  return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
2216
2237
  /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "col-span-full", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(DefaultHorizontalDivider, {}) }),
2217
2238
  /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "flex justify-center rounded-cards bg-interface-background-default-secondary p-8", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "aspect-square h-44 rounded bg-[white]", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "-m-3 antialiased mix-blend-multiply", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
2218
- Node.Image,
2239
+ Node2.Image,
2219
2240
  {
2220
2241
  node: totpImage,
2221
2242
  attributes: {
@@ -2225,12 +2246,12 @@ function DefaultSettingsTotp({
2225
2246
  ) }) }) }),
2226
2247
  /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex flex-col gap-6", children: [
2227
2248
  /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
2228
- Node.Label,
2249
+ Node2.Label,
2229
2250
  {
2230
2251
  node: totpSecret,
2231
2252
  attributes: totpSecret.attributes,
2232
2253
  children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
2233
- Node.Input,
2254
+ Node2.Input,
2234
2255
  {
2235
2256
  node: totpSecret,
2236
2257
  attributes: {
@@ -2245,12 +2266,12 @@ function DefaultSettingsTotp({
2245
2266
  }
2246
2267
  ),
2247
2268
  /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
2248
- Node.Label,
2269
+ Node2.Label,
2249
2270
  {
2250
2271
  attributes: totpInput.attributes,
2251
2272
  node: totpInput,
2252
2273
  children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
2253
- Node.CodeInput,
2274
+ Node2.CodeInput,
2254
2275
  {
2255
2276
  node: totpInput,
2256
2277
  attributes: totpInput.attributes
@@ -2286,17 +2307,17 @@ function DefaultSettingsWebauthn({
2286
2307
  const {
2287
2308
  formState: { isSubmitting }
2288
2309
  } = (0, import_react_hook_form12.useFormContext)();
2289
- const { Node, Card } = (0, import_elements_react18.useComponents)();
2310
+ const { Node: Node2, Card } = (0, import_elements_react18.useComponents)();
2290
2311
  const hasRemoveButtons = removeButtons.length > 0;
2291
2312
  return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex flex-col gap-8", children: [
2292
2313
  /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex md:max-w-96 sm:items-end gap-3 flex-col sm:flex-row", children: [
2293
2314
  /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
2294
- Node.Label,
2315
+ Node2.Label,
2295
2316
  {
2296
2317
  node: nameInput,
2297
2318
  attributes: nameInput.attributes,
2298
2319
  children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
2299
- Node.Input,
2320
+ Node2.Input,
2300
2321
  {
2301
2322
  node: nameInput,
2302
2323
  attributes: nameInput.attributes
@@ -2305,7 +2326,7 @@ function DefaultSettingsWebauthn({
2305
2326
  }
2306
2327
  ) }),
2307
2328
  triggerButton ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
2308
- Node.Button,
2329
+ Node2.Button,
2309
2330
  {
2310
2331
  node: triggerButton,
2311
2332
  attributes: triggerButton.attributes,
@@ -2378,9 +2399,369 @@ function DefaultAuthMethodListContainer({
2378
2399
  return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "grid grid-cols-1 gap-2", children });
2379
2400
  }
2380
2401
 
2402
+ // src/theme/default/components/form/captcha.tsx
2403
+ var import_client_fetch30 = require("@ory/client-fetch");
2404
+ var import_react_turnstile = require("@marsidev/react-turnstile");
2405
+ var import_react13 = require("react");
2406
+ var import_react_hook_form25 = require("react-hook-form");
2407
+
2408
+ // src/context/component.tsx
2409
+ var import_client_fetch12 = require("@ory/client-fetch");
2410
+ var import_react8 = require("react");
2411
+ var import_jsx_runtime65 = require("react/jsx-runtime");
2412
+ var ComponentContext = (0, import_react8.createContext)({
2413
+ components: null,
2414
+ // fine because we throw an error if it's not provided
2415
+ nodeSorter: () => 0,
2416
+ groupSorter: () => 0
2417
+ });
2418
+ function useComponents7() {
2419
+ const ctx = (0, import_react8.useContext)(ComponentContext);
2420
+ if (!ctx) {
2421
+ throw new Error("useComponents must be used within a ComponentProvider");
2422
+ }
2423
+ return ctx.components;
2424
+ }
2425
+ var defaultGroupOrder = [
2426
+ import_client_fetch12.UiNodeGroupEnum.Default,
2427
+ import_client_fetch12.UiNodeGroupEnum.Profile,
2428
+ import_client_fetch12.UiNodeGroupEnum.Password,
2429
+ import_client_fetch12.UiNodeGroupEnum.Oidc,
2430
+ import_client_fetch12.UiNodeGroupEnum.Code,
2431
+ import_client_fetch12.UiNodeGroupEnum.LookupSecret,
2432
+ import_client_fetch12.UiNodeGroupEnum.Passkey,
2433
+ import_client_fetch12.UiNodeGroupEnum.Webauthn,
2434
+ import_client_fetch12.UiNodeGroupEnum.Totp
2435
+ ];
2436
+
2437
+ // src/context/flow-context.tsx
2438
+ var import_react11 = require("react");
2439
+
2440
+ // src/context/form-state.ts
2441
+ var import_client_fetch15 = require("@ory/client-fetch");
2442
+ var import_react10 = require("react");
2443
+
2444
+ // src/components/card/card-two-step.utils.ts
2445
+ var import_client_fetch13 = require("@ory/client-fetch");
2446
+
2447
+ // src/util/ui/index.ts
2448
+ var import_client_fetch14 = require("@ory/client-fetch");
2449
+ var import_react9 = require("react");
2450
+ function triggerToWindowCall(trigger) {
2451
+ if (!trigger) {
2452
+ return;
2453
+ }
2454
+ const fn = triggerToFunction(trigger);
2455
+ if (fn) {
2456
+ fn();
2457
+ return;
2458
+ }
2459
+ let i = 0;
2460
+ const ms = 100;
2461
+ const interval = setInterval(() => {
2462
+ i++;
2463
+ if (i > 100) {
2464
+ clearInterval(interval);
2465
+ throw new Error(
2466
+ "Unable to load Ory's WebAuthn script. Is it being blocked or otherwise failing to load? If you are running an old version of Ory Elements, please upgrade. For more information, please check your browser's developer console."
2467
+ );
2468
+ }
2469
+ const fn2 = triggerToFunction(trigger);
2470
+ if (fn2) {
2471
+ clearInterval(interval);
2472
+ return fn2();
2473
+ }
2474
+ }, ms);
2475
+ return;
2476
+ }
2477
+ function triggerToFunction(trigger) {
2478
+ if (typeof window === "undefined") {
2479
+ console.debug(
2480
+ "The Ory SDK is missing a required function: window is undefined."
2481
+ );
2482
+ return void 0;
2483
+ }
2484
+ const typedWindow = window;
2485
+ if (!(trigger in typedWindow) || !typedWindow[trigger]) {
2486
+ console.debug(`The Ory SDK is missing a required function: ${trigger}.`);
2487
+ return void 0;
2488
+ }
2489
+ const triggerFn = typedWindow[trigger];
2490
+ if (typeof triggerFn !== "function") {
2491
+ console.debug(
2492
+ `The Ory SDK is missing a required function: ${trigger}. It is not a function.`
2493
+ );
2494
+ return void 0;
2495
+ }
2496
+ return triggerFn;
2497
+ }
2498
+
2499
+ // src/context/flow-context.tsx
2500
+ var import_jsx_runtime66 = require("react/jsx-runtime");
2501
+ var OryFlowContext = (0, import_react11.createContext)(null);
2502
+
2503
+ // src/context/intl-context.tsx
2504
+ var import_react_intl20 = require("react-intl");
2505
+
2506
+ // src/components/card/header.tsx
2507
+ var import_jsx_runtime67 = require("react/jsx-runtime");
2508
+
2509
+ // src/components/form/form-provider.tsx
2510
+ var import_client_fetch18 = require("@ory/client-fetch");
2511
+ var import_react_hook_form13 = require("react-hook-form");
2512
+
2513
+ // src/components/form/form-helpers.ts
2514
+ var import_client_fetch16 = require("@ory/client-fetch");
2515
+
2516
+ // src/components/form/form-resolver.ts
2517
+ var import_client_fetch17 = require("@ory/client-fetch");
2518
+
2519
+ // src/components/form/form-provider.tsx
2520
+ var import_jsx_runtime68 = require("react/jsx-runtime");
2521
+
2522
+ // src/components/card/card.tsx
2523
+ var import_jsx_runtime69 = require("react/jsx-runtime");
2524
+
2525
+ // src/components/card/footer.tsx
2526
+ var import_jsx_runtime70 = require("react/jsx-runtime");
2527
+
2528
+ // src/components/card/content.tsx
2529
+ var import_jsx_runtime71 = require("react/jsx-runtime");
2530
+
2531
+ // src/components/card/card-two-step.tsx
2532
+ var import_client_fetch27 = require("@ory/client-fetch");
2533
+ var import_react_hook_form17 = require("react-hook-form");
2534
+
2535
+ // src/components/form/form.tsx
2536
+ var import_client_fetch25 = require("@ory/client-fetch");
2537
+ var import_react_hook_form15 = require("react-hook-form");
2538
+ var import_react_intl13 = require("react-intl");
2539
+
2540
+ // src/components/form/useOryFormSubmit.ts
2541
+ var import_client_fetch24 = require("@ory/client-fetch");
2542
+ var import_react_hook_form14 = require("react-hook-form");
2543
+
2544
+ // src/util/onSubmitLogin.ts
2545
+ var import_client_fetch19 = require("@ory/client-fetch");
2546
+
2547
+ // src/util/onSubmitRecovery.ts
2548
+ var import_client_fetch20 = require("@ory/client-fetch");
2549
+
2550
+ // src/util/onSubmitRegistration.ts
2551
+ var import_client_fetch21 = require("@ory/client-fetch");
2552
+
2553
+ // src/util/onSubmitSettings.ts
2554
+ var import_client_fetch22 = require("@ory/client-fetch");
2555
+
2556
+ // src/util/onSubmitVerification.ts
2557
+ var import_client_fetch23 = require("@ory/client-fetch");
2558
+
2559
+ // src/components/form/form.tsx
2560
+ var import_jsx_runtime72 = require("react/jsx-runtime");
2561
+
2562
+ // src/components/form/messages.tsx
2563
+ var import_jsx_runtime73 = require("react/jsx-runtime");
2564
+
2565
+ // src/components/form/nodes/node.tsx
2566
+ var import_client_fetch26 = require("@ory/client-fetch");
2567
+ var import_jsx_runtime74 = require("react/jsx-runtime");
2568
+
2569
+ // src/components/form/social.tsx
2570
+ var import_react_hook_form16 = require("react-hook-form");
2571
+ var import_jsx_runtime75 = require("react/jsx-runtime");
2572
+
2573
+ // src/components/card/card-two-step.tsx
2574
+ var import_jsx_runtime76 = require("react/jsx-runtime");
2575
+
2576
+ // src/components/form/groups.tsx
2577
+ var import_jsx_runtime77 = require("react/jsx-runtime");
2578
+
2579
+ // src/components/form/section.tsx
2580
+ var import_react_hook_form18 = require("react-hook-form");
2581
+ var import_jsx_runtime78 = require("react/jsx-runtime");
2582
+
2583
+ // src/components/generic/divider.tsx
2584
+ var import_jsx_runtime79 = require("react/jsx-runtime");
2585
+
2586
+ // src/components/generic/page-header.tsx
2587
+ var import_jsx_runtime80 = require("react/jsx-runtime");
2588
+
2589
+ // src/components/settings/settings-card.tsx
2590
+ var import_client_fetch28 = require("@ory/client-fetch");
2591
+ var import_react_intl19 = require("react-intl");
2592
+
2593
+ // src/components/settings/oidc-settings.tsx
2594
+ var import_react_intl14 = require("react-intl");
2595
+ var import_react_hook_form19 = require("react-hook-form");
2596
+ var import_jsx_runtime81 = require("react/jsx-runtime");
2597
+
2598
+ // src/components/settings/passkey-settings.tsx
2599
+ var import_react_hook_form20 = require("react-hook-form");
2600
+ var import_react_intl15 = require("react-intl");
2601
+ var import_jsx_runtime82 = require("react/jsx-runtime");
2602
+
2603
+ // src/components/settings/recovery-codes-settings.tsx
2604
+ var import_react_intl16 = require("react-intl");
2605
+ var import_react_hook_form21 = require("react-hook-form");
2606
+ var import_jsx_runtime83 = require("react/jsx-runtime");
2607
+
2608
+ // src/components/settings/totp-settings.tsx
2609
+ var import_react_hook_form22 = require("react-hook-form");
2610
+ var import_react_intl17 = require("react-intl");
2611
+ var import_jsx_runtime84 = require("react/jsx-runtime");
2612
+
2613
+ // src/components/settings/webauthn-settings.tsx
2614
+ var import_react_hook_form23 = require("react-hook-form");
2615
+ var import_react_intl18 = require("react-intl");
2616
+ var import_jsx_runtime85 = require("react/jsx-runtime");
2617
+
2618
+ // src/components/settings/settings-card.tsx
2619
+ var import_jsx_runtime86 = require("react/jsx-runtime");
2620
+
2621
+ // src/context/intl-context.tsx
2622
+ var import_jsx_runtime87 = require("react/jsx-runtime");
2623
+
2624
+ // src/context/provider.tsx
2625
+ var import_jsx_runtime88 = require("react/jsx-runtime");
2626
+
2627
+ // src/components/form/nodes/input.tsx
2628
+ var import_client_fetch29 = require("@ory/client-fetch");
2629
+ var import_react12 = require("react");
2630
+ var import_react_hook_form24 = require("react-hook-form");
2631
+ var import_jsx_runtime89 = require("react/jsx-runtime");
2632
+ var NodeInput = ({
2633
+ node,
2634
+ attributes
2635
+ }) => {
2636
+ var _a;
2637
+ const { Node: Node2 } = useComponents7();
2638
+ const { setValue } = (0, import_react_hook_form24.useFormContext)();
2639
+ const {
2640
+ onloadTrigger,
2641
+ onclickTrigger,
2642
+ // These properties do not exist on input fields so we remove them (as we already have handled them).
2643
+ onclick: _ignoredOnclick,
2644
+ onload: _ignoredOnload,
2645
+ //
2646
+ ...attrs
2647
+ } = attributes;
2648
+ const isResendNode = ((_a = node.meta.label) == null ? void 0 : _a.id) === 1070008;
2649
+ const isScreenSelectionNode = "name" in node.attributes && node.attributes.name === "screen";
2650
+ const setFormValue = () => {
2651
+ if (attrs.value && !(isResendNode || isScreenSelectionNode)) {
2652
+ setValue(attrs.name, attrs.value);
2653
+ }
2654
+ };
2655
+ const hasRun = (0, import_react12.useRef)(false);
2656
+ (0, import_react12.useEffect)(
2657
+ () => {
2658
+ setFormValue();
2659
+ if (!hasRun.current && onloadTrigger) {
2660
+ hasRun.current = true;
2661
+ triggerToWindowCall(onloadTrigger);
2662
+ }
2663
+ },
2664
+ // TODO(jonas): make sure onloadTrigger is stable
2665
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- ignore onloadTrigger for now, until we make sure this is stable
2666
+ []
2667
+ );
2668
+ const handleClick = () => {
2669
+ setFormValue();
2670
+ if (onclickTrigger) {
2671
+ triggerToWindowCall(onclickTrigger);
2672
+ }
2673
+ };
2674
+ const isSocial = (attrs.name === "provider" || attrs.name === "link") && node.group === "oidc";
2675
+ const isPinCodeInput = attrs.name === "code" && node.group === "code" || attrs.name === "totp_code" && node.group === "totp";
2676
+ switch (attributes.type) {
2677
+ case import_client_fetch29.UiNodeInputAttributesTypeEnum.Submit:
2678
+ case import_client_fetch29.UiNodeInputAttributesTypeEnum.Button:
2679
+ if (isSocial) {
2680
+ return null;
2681
+ }
2682
+ if (isResendNode || isScreenSelectionNode) {
2683
+ return null;
2684
+ }
2685
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
2686
+ Node2.Label,
2687
+ {
2688
+ attributes: { ...attrs, label: void 0 },
2689
+ node: { ...node, meta: { ...node.meta, label: void 0 } },
2690
+ children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Node2.Button, { attributes: attrs, node, onClick: handleClick })
2691
+ }
2692
+ );
2693
+ case import_client_fetch29.UiNodeInputAttributesTypeEnum.DatetimeLocal:
2694
+ throw new Error("Not implemented");
2695
+ case import_client_fetch29.UiNodeInputAttributesTypeEnum.Checkbox:
2696
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
2697
+ Node2.Label,
2698
+ {
2699
+ attributes: { ...attrs, label: void 0 },
2700
+ node: { ...node, meta: { ...node.meta, label: void 0 } },
2701
+ children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Node2.Checkbox, { attributes: attrs, node, onClick: handleClick })
2702
+ }
2703
+ );
2704
+ case import_client_fetch29.UiNodeInputAttributesTypeEnum.Hidden:
2705
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Node2.Input, { attributes: attrs, node, onClick: handleClick });
2706
+ default:
2707
+ if (isPinCodeInput) {
2708
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Node2.Label, { attributes: attrs, node, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
2709
+ Node2.CodeInput,
2710
+ {
2711
+ attributes: attrs,
2712
+ node,
2713
+ onClick: handleClick
2714
+ }
2715
+ ) });
2716
+ }
2717
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Node2.Label, { attributes: attrs, node, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Node2.Input, { attributes: attrs, node, onClick: handleClick }) });
2718
+ }
2719
+ };
2720
+
2721
+ // src/theme/default/components/form/captcha.tsx
2722
+ var import_jsx_runtime90 = require("react/jsx-runtime");
2723
+ var DefaultCaptcha = ({ node }) => {
2724
+ const { setValue } = (0, import_react_hook_form25.useFormContext)();
2725
+ const ref = (0, import_react13.useRef)();
2726
+ const nodes = [];
2727
+ if ((0, import_client_fetch30.isUiNodeInputAttributes)(node.attributes)) {
2728
+ if (node.attributes.name === "transient_payload.captcha_turnstile_response") {
2729
+ nodes.push(/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(NodeInput, { node, attributes: node.attributes }, 1));
2730
+ }
2731
+ }
2732
+ if ((0, import_client_fetch30.isUiNodeInputAttributes)(node.attributes) && node.attributes.name === "captcha_turnstile_options") {
2733
+ const options = JSON.parse(node.attributes.value);
2734
+ nodes.push(
2735
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
2736
+ import_react_turnstile.Turnstile,
2737
+ {
2738
+ ref,
2739
+ siteKey: options.sitekey,
2740
+ options: {
2741
+ action: options.action,
2742
+ size: "flexible",
2743
+ theme: options.theme,
2744
+ responseField: false,
2745
+ responseFieldName: options.response_field_name
2746
+ },
2747
+ onExpire: () => {
2748
+ var _a;
2749
+ return (_a = ref.current) == null ? void 0 : _a.reset();
2750
+ },
2751
+ onSuccess: (token) => {
2752
+ setValue(options.response_field_name, token);
2753
+ }
2754
+ },
2755
+ 2
2756
+ )
2757
+ );
2758
+ }
2759
+ return nodes;
2760
+ };
2761
+
2381
2762
  // src/theme/default/components/default-components.tsx
2382
2763
  function getOryComponents(overrides) {
2383
- 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;
2764
+ 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;
2384
2765
  return {
2385
2766
  Card: {
2386
2767
  Root: (_b = (_a = overrides == null ? void 0 : overrides.Card) == null ? void 0 : _a.Root) != null ? _b : DefaultCard,
@@ -2404,41 +2785,42 @@ function getOryComponents(overrides) {
2404
2785
  Label: (_H = (_G = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _G.Label) != null ? _H : DefaultLabel,
2405
2786
  Checkbox: (_J = (_I = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _I.Checkbox) != null ? _J : DefaultCheckbox,
2406
2787
  Text: (_L = (_K = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _K.Text) != null ? _L : DefaultText,
2407
- Anchor: (_N = (_M = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _M.Anchor) != null ? _N : DefaultLinkButton
2788
+ Anchor: (_N = (_M = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _M.Anchor) != null ? _N : DefaultLinkButton,
2789
+ Captcha: (_P = (_O = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _O.Captcha) != null ? _P : DefaultCaptcha
2408
2790
  },
2409
2791
  Form: {
2410
- Root: (_P = (_O = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _O.Root) != null ? _P : DefaultFormContainer,
2411
- Group: (_R = (_Q = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _Q.Group) != null ? _R : DefaultGroupContainer,
2412
- OidcRoot: (_T = (_S = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _S.OidcRoot) != null ? _T : DefaultSocialButtonContainer,
2413
- RecoveryCodesSettings: (_V = (_U = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _U.RecoveryCodesSettings) != null ? _V : DefaultSettingsRecoveryCodes,
2414
- TotpSettings: (_X = (_W = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _W.TotpSettings) != null ? _X : DefaultSettingsTotp,
2415
- OidcSettings: (_Z = (_Y = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _Y.OidcSettings) != null ? _Z : DefaultSettingsOidc,
2416
- WebauthnSettings: (_$ = (__ = overrides == null ? void 0 : overrides.Form) == null ? void 0 : __.WebauthnSettings) != null ? _$ : DefaultSettingsWebauthn,
2417
- PasskeySettings: (_ba = (_aa = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _aa.PasskeySettings) != null ? _ba : DefaultSettingsPasskey
2792
+ Root: (_R = (_Q = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _Q.Root) != null ? _R : DefaultFormContainer,
2793
+ Group: (_T = (_S = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _S.Group) != null ? _T : DefaultGroupContainer,
2794
+ OidcRoot: (_V = (_U = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _U.OidcRoot) != null ? _V : DefaultSocialButtonContainer,
2795
+ RecoveryCodesSettings: (_X = (_W = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _W.RecoveryCodesSettings) != null ? _X : DefaultSettingsRecoveryCodes,
2796
+ TotpSettings: (_Z = (_Y = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _Y.TotpSettings) != null ? _Z : DefaultSettingsTotp,
2797
+ OidcSettings: (_$ = (__ = overrides == null ? void 0 : overrides.Form) == null ? void 0 : __.OidcSettings) != null ? _$ : DefaultSettingsOidc,
2798
+ WebauthnSettings: (_ba = (_aa = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _aa.WebauthnSettings) != null ? _ba : DefaultSettingsWebauthn,
2799
+ PasskeySettings: (_da = (_ca = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _ca.PasskeySettings) != null ? _da : DefaultSettingsPasskey
2418
2800
  },
2419
2801
  Message: {
2420
- Root: (_da = (_ca = overrides == null ? void 0 : overrides.Message) == null ? void 0 : _ca.Root) != null ? _da : DefaultMessageContainer,
2421
- Content: (_fa = (_ea = overrides == null ? void 0 : overrides.Message) == null ? void 0 : _ea.Content) != null ? _fa : DefaultMessage
2802
+ Root: (_fa = (_ea = overrides == null ? void 0 : overrides.Message) == null ? void 0 : _ea.Root) != null ? _fa : DefaultMessageContainer,
2803
+ Content: (_ha = (_ga = overrides == null ? void 0 : overrides.Message) == null ? void 0 : _ga.Content) != null ? _ha : DefaultMessage
2422
2804
  },
2423
2805
  Page: {
2424
- Header: (_ha = (_ga = overrides == null ? void 0 : overrides.Page) == null ? void 0 : _ga.Header) != null ? _ha : DefaultPageHeader
2806
+ Header: (_ja = (_ia = overrides == null ? void 0 : overrides.Page) == null ? void 0 : _ia.Header) != null ? _ja : DefaultPageHeader
2425
2807
  }
2426
2808
  };
2427
2809
  }
2428
2810
 
2429
2811
  // src/theme/default/flows/error.tsx
2430
- var import_jsx_runtime65 = require("react/jsx-runtime");
2812
+ var import_jsx_runtime91 = require("react/jsx-runtime");
2431
2813
  function Error2({
2432
2814
  error,
2433
2815
  children
2434
2816
  }) {
2435
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { "data-testid": "ory/screen/error/raw", children: JSON.stringify(error) || children });
2817
+ return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { "data-testid": "ory/screen/error/raw", children: JSON.stringify(error) || children });
2436
2818
  }
2437
2819
 
2438
2820
  // src/theme/default/flows/login.tsx
2439
- var import_client_fetch12 = require("@ory/client-fetch");
2821
+ var import_client_fetch31 = require("@ory/client-fetch");
2440
2822
  var import_elements_react19 = require("@ory/elements-react");
2441
- var import_jsx_runtime66 = require("react/jsx-runtime");
2823
+ var import_jsx_runtime92 = require("react/jsx-runtime");
2442
2824
  function Login({
2443
2825
  flow,
2444
2826
  config,
@@ -2446,22 +2828,22 @@ function Login({
2446
2828
  components: flowOverrideComponents
2447
2829
  }) {
2448
2830
  const components = getOryComponents(flowOverrideComponents);
2449
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
2831
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
2450
2832
  import_elements_react19.OryProvider,
2451
2833
  {
2452
2834
  config,
2453
2835
  flow,
2454
- flowType: import_client_fetch12.FlowType.Login,
2836
+ flowType: import_client_fetch31.FlowType.Login,
2455
2837
  components,
2456
- children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_elements_react19.OryTwoStepCard, {})
2838
+ children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_elements_react19.OryTwoStepCard, {})
2457
2839
  }
2458
2840
  );
2459
2841
  }
2460
2842
 
2461
2843
  // src/theme/default/flows/recovery.tsx
2462
- var import_client_fetch13 = require("@ory/client-fetch");
2844
+ var import_client_fetch32 = require("@ory/client-fetch");
2463
2845
  var import_elements_react20 = require("@ory/elements-react");
2464
- var import_jsx_runtime67 = require("react/jsx-runtime");
2846
+ var import_jsx_runtime93 = require("react/jsx-runtime");
2465
2847
  function Recovery({
2466
2848
  flow,
2467
2849
  config,
@@ -2469,22 +2851,22 @@ function Recovery({
2469
2851
  components: flowOverrideComponents
2470
2852
  }) {
2471
2853
  const components = getOryComponents(flowOverrideComponents);
2472
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
2854
+ return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
2473
2855
  import_elements_react20.OryProvider,
2474
2856
  {
2475
2857
  config,
2476
2858
  flow,
2477
- flowType: import_client_fetch13.FlowType.Recovery,
2859
+ flowType: import_client_fetch32.FlowType.Recovery,
2478
2860
  components,
2479
- children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_elements_react20.OryTwoStepCard, {})
2861
+ children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_elements_react20.OryTwoStepCard, {})
2480
2862
  }
2481
2863
  );
2482
2864
  }
2483
2865
 
2484
2866
  // src/theme/default/flows/registration.tsx
2485
- var import_client_fetch14 = require("@ory/client-fetch");
2867
+ var import_client_fetch33 = require("@ory/client-fetch");
2486
2868
  var import_elements_react21 = require("@ory/elements-react");
2487
- var import_jsx_runtime68 = require("react/jsx-runtime");
2869
+ var import_jsx_runtime94 = require("react/jsx-runtime");
2488
2870
  function Registration({
2489
2871
  flow,
2490
2872
  children,
@@ -2492,22 +2874,22 @@ function Registration({
2492
2874
  config
2493
2875
  }) {
2494
2876
  const components = getOryComponents(flowOverrideComponents);
2495
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
2877
+ return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
2496
2878
  import_elements_react21.OryProvider,
2497
2879
  {
2498
2880
  config,
2499
2881
  flow,
2500
- flowType: import_client_fetch14.FlowType.Registration,
2882
+ flowType: import_client_fetch33.FlowType.Registration,
2501
2883
  components,
2502
- children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_elements_react21.OryTwoStepCard, {})
2884
+ children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_elements_react21.OryTwoStepCard, {})
2503
2885
  }
2504
2886
  );
2505
2887
  }
2506
2888
 
2507
2889
  // src/theme/default/flows/settings.tsx
2508
- var import_client_fetch15 = require("@ory/client-fetch");
2890
+ var import_client_fetch34 = require("@ory/client-fetch");
2509
2891
  var import_elements_react22 = require("@ory/elements-react");
2510
- var import_jsx_runtime69 = require("react/jsx-runtime");
2892
+ var import_jsx_runtime95 = require("react/jsx-runtime");
2511
2893
  function Settings({
2512
2894
  flow,
2513
2895
  config,
@@ -2515,25 +2897,25 @@ function Settings({
2515
2897
  components: flowOverrideComponents
2516
2898
  }) {
2517
2899
  const components = getOryComponents(flowOverrideComponents);
2518
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
2900
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
2519
2901
  import_elements_react22.OryProvider,
2520
2902
  {
2521
2903
  config,
2522
2904
  flow,
2523
- flowType: import_client_fetch15.FlowType.Settings,
2905
+ flowType: import_client_fetch34.FlowType.Settings,
2524
2906
  components,
2525
- children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_jsx_runtime69.Fragment, { children: [
2526
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_elements_react22.HeadlessPageHeader, {}),
2527
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_elements_react22.OrySettingsCard, {})
2907
+ children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_jsx_runtime95.Fragment, { children: [
2908
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_elements_react22.HeadlessPageHeader, {}),
2909
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_elements_react22.OrySettingsCard, {})
2528
2910
  ] })
2529
2911
  }
2530
2912
  );
2531
2913
  }
2532
2914
 
2533
2915
  // src/theme/default/flows/verification.tsx
2534
- var import_client_fetch16 = require("@ory/client-fetch");
2916
+ var import_client_fetch35 = require("@ory/client-fetch");
2535
2917
  var import_elements_react23 = require("@ory/elements-react");
2536
- var import_jsx_runtime70 = require("react/jsx-runtime");
2918
+ var import_jsx_runtime96 = require("react/jsx-runtime");
2537
2919
  function Verification({
2538
2920
  flow,
2539
2921
  config,
@@ -2541,14 +2923,14 @@ function Verification({
2541
2923
  components: flowOverrideComponents
2542
2924
  }) {
2543
2925
  const components = getOryComponents(flowOverrideComponents);
2544
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
2926
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
2545
2927
  import_elements_react23.OryProvider,
2546
2928
  {
2547
2929
  config,
2548
2930
  flow,
2549
- flowType: import_client_fetch16.FlowType.Verification,
2931
+ flowType: import_client_fetch35.FlowType.Verification,
2550
2932
  components,
2551
- children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_elements_react23.OryTwoStepCard, {})
2933
+ children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_elements_react23.OryTwoStepCard, {})
2552
2934
  }
2553
2935
  );
2554
2936
  }