@wise/dynamic-flow-client-internal 3.28.2 → 3.28.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/main.mjs CHANGED
@@ -139,7 +139,7 @@ var init_clsx = __esm({
139
139
 
140
140
  // ../../node_modules/.pnpm/@wise+art@2.19.0_@transferwise+neptune-css@14.20.1_@types+react@18.3.18_react-dom@18.3.1_reac_mzw7cg6j4wc7ddwlhxck7linn4/node_modules/@wise/art/dist/index-8Fxev6OI.esm.js
141
141
  import { useState, useEffect, forwardRef, Suspense, lazy } from "react";
142
- import { jsx as jsx11, jsxs as jsxs3, Fragment } from "react/jsx-runtime";
142
+ import { jsx as jsx12, jsxs as jsxs3, Fragment } from "react/jsx-runtime";
143
143
  var unknownFlagName, Flag, Sizes, ImageSizes, imageSizes, Assets, RenderMode;
144
144
  var init_index_8Fxev6OI_esm = __esm({
145
145
  "../../node_modules/.pnpm/@wise+art@2.19.0_@transferwise+neptune-css@14.20.1_@types+react@18.3.18_react-dom@18.3.1_reac_mzw7cg6j4wc7ddwlhxck7linn4/node_modules/@wise/art/dist/index-8Fxev6OI.esm.js"() {
@@ -158,7 +158,7 @@ var init_index_8Fxev6OI_esm = __esm({
158
158
  }, [code]);
159
159
  const detailed = intrinsicSize >= 150;
160
160
  const name = fallback !== "unknown" ? `${code.toLowerCase()}${fallback == null && detailed ? "-detailed" : ""}` : unknownFlagName;
161
- return /* @__PURE__ */ jsx11("img", {
161
+ return /* @__PURE__ */ jsx12("img", {
162
162
  className: clsx(`wds-flag wds-flag-${name}`, className),
163
163
  src: false ? `${name}.svg` : `https://wise.com/web-art/assets/flags/${name}.svg`,
164
164
  loading,
@@ -862,7 +862,7 @@ var translations = languages.reduce(
862
862
  var i18n_default = translations;
863
863
 
864
864
  // src/dynamicFlow/DynamicFlow.tsx
865
- import { forwardRef as forwardRef2, useCallback, useMemo } from "react";
865
+ import { forwardRef as forwardRef2, useCallback, useMemo as useMemo2 } from "react";
866
866
  import { useIntl as useIntl9 } from "react-intl";
867
867
  import {
868
868
  DynamicFlow as DynamicFlowCoreLegacy,
@@ -870,22 +870,16 @@ import {
870
870
  DynamicFragmentCore
871
871
  } from "@wise/dynamic-flow-client";
872
872
 
873
- // ../renderers/src/contexts/RendererContext.tsx
873
+ // ../renderers/src/contexts/RendererHttpClientContext.tsx
874
874
  import { createContext, useContext } from "react";
875
- var RendererContext = createContext({ loadingState: "idle", httpClient: null, trackEvent: () => {
876
- } });
877
- var RendererContextProvider = RendererContext.Provider;
878
- var useLoadingContext = () => {
879
- const { loadingState } = useContext(RendererContext);
880
- return { loadingState, isLoading: loadingState !== "idle" };
881
- };
882
- var useTrackEvent = () => {
883
- const { trackEvent } = useContext(RendererContext);
884
- return trackEvent;
885
- };
875
+ import { jsx } from "react/jsx-runtime";
876
+ var HttpClientContext = createContext(void 0);
877
+ function RendererHttpClientProvider({ httpClient, children }) {
878
+ return /* @__PURE__ */ jsx(HttpClientContext.Provider, { value: httpClient, children });
879
+ }
886
880
  var useRendererHttpClient = () => {
887
- const { httpClient } = useContext(RendererContext);
888
- return httpClient != null ? httpClient : fetch;
881
+ const contextFetch = useContext(HttpClientContext);
882
+ return contextFetch != null ? contextFetch : fetch;
889
883
  };
890
884
 
891
885
  // ../renderers/src/AlertRenderer.tsx
@@ -922,10 +916,10 @@ var getTextAlignment = (align) => {
922
916
  var getTextAlignmentAndMargin = (component) => `${getTextAlignment(component.align)} ${getMargin(component.margin)}`;
923
917
 
924
918
  // ../renderers/src/AlertRenderer.tsx
925
- import { jsx } from "react/jsx-runtime";
919
+ import { jsx as jsx2 } from "react/jsx-runtime";
926
920
  var AlertRenderer = {
927
921
  canRenderType: "alert",
928
- render: ({ context, markdown, margin, callToAction }) => /* @__PURE__ */ jsx(
922
+ render: ({ context, markdown, margin, callToAction }) => /* @__PURE__ */ jsx2(
929
923
  Alert,
930
924
  {
931
925
  type: context,
@@ -979,14 +973,14 @@ var help_messages_default = defineMessages({
979
973
  });
980
974
 
981
975
  // ../renderers/src/components/Help.tsx
982
- import { jsx as jsx2 } from "react/jsx-runtime";
976
+ import { jsx as jsx3 } from "react/jsx-runtime";
983
977
  function Help({ help }) {
984
978
  const intl = useIntl();
985
- return /* @__PURE__ */ jsx2(
979
+ return /* @__PURE__ */ jsx3(
986
980
  Info,
987
981
  {
988
982
  className: "m-l-1",
989
- content: /* @__PURE__ */ jsx2(Markdown, { config: { link: { target: "_blank" } }, children: help }),
983
+ content: /* @__PURE__ */ jsx3(Markdown, { config: { link: { target: "_blank" } }, children: help }),
990
984
  presentation: "POPOVER",
991
985
  size: "sm",
992
986
  "aria-label": intl.formatMessage(help_messages_default.helpAria)
@@ -996,19 +990,19 @@ function Help({ help }) {
996
990
  var Help_default = Help;
997
991
 
998
992
  // ../renderers/src/components/LabelContentWithHelp.tsx
999
- import { jsx as jsx3, jsxs } from "react/jsx-runtime";
993
+ import { jsx as jsx4, jsxs } from "react/jsx-runtime";
1000
994
  function LabelContentWithHelp({ text, help }) {
1001
995
  return /* @__PURE__ */ jsxs("div", { children: [
1002
996
  text,
1003
- /* @__PURE__ */ jsx3(Help_default, { help })
997
+ /* @__PURE__ */ jsx4(Help_default, { help })
1004
998
  ] });
1005
999
  }
1006
1000
 
1007
1001
  // ../renderers/src/components/FieldInput.tsx
1008
- import { jsx as jsx4 } from "react/jsx-runtime";
1002
+ import { jsx as jsx5 } from "react/jsx-runtime";
1009
1003
  function FieldInput({ id, children, label, validation, description, help }) {
1010
- const labelContent = label && help ? /* @__PURE__ */ jsx4(LabelContentWithHelp, { text: label, help }) : label;
1011
- return /* @__PURE__ */ jsx4(
1004
+ const labelContent = label && help ? /* @__PURE__ */ jsx5(LabelContentWithHelp, { text: label, help }) : label;
1005
+ return /* @__PURE__ */ jsx5(
1012
1006
  Field,
1013
1007
  {
1014
1008
  id,
@@ -1033,7 +1027,7 @@ var FieldInput_default = FieldInput;
1033
1027
 
1034
1028
  // ../renderers/src/BooleanInputRenderer.tsx
1035
1029
  import { Checkbox } from "@transferwise/components";
1036
- import { jsx as jsx5 } from "react/jsx-runtime";
1030
+ import { jsx as jsx6 } from "react/jsx-runtime";
1037
1031
  var BooleanInputRenderer = {
1038
1032
  canRenderType: "input-boolean",
1039
1033
  render: (props) => {
@@ -1057,20 +1051,20 @@ var BooleanInputRenderer = {
1057
1051
  "value"
1058
1052
  ]);
1059
1053
  const checkboxProps = __spreadProps(__spreadValues({}, rest), { label, secondary: description, checked: value });
1060
- return /* @__PURE__ */ jsx5(FieldInput_default, { id, label: "", description: "", validation: validationState, help, children: /* @__PURE__ */ jsx5(Checkbox, __spreadValues({ id }, checkboxProps)) });
1054
+ return /* @__PURE__ */ jsx6(FieldInput_default, { id, label: "", description: "", validation: validationState, help, children: /* @__PURE__ */ jsx6(Checkbox, __spreadValues({ id }, checkboxProps)) });
1061
1055
  }
1062
1056
  };
1063
1057
  var BooleanInputRenderer_default = BooleanInputRenderer;
1064
1058
 
1065
1059
  // ../renderers/src/BoxRenderer.tsx
1066
1060
  var import_classnames = __toESM(require_classnames());
1067
- import { jsx as jsx6 } from "react/jsx-runtime";
1061
+ import { jsx as jsx7 } from "react/jsx-runtime";
1068
1062
  var BoxRenderer = {
1069
1063
  canRenderType: "box",
1070
1064
  render: ({ border, children, control, margin, width }) => {
1071
1065
  const hasFixedWidth = width !== "xl";
1072
1066
  const hasBorder = control === "bordered" || control === "bordered-web" || border;
1073
- const contents = /* @__PURE__ */ jsx6(
1067
+ const contents = /* @__PURE__ */ jsx7(
1074
1068
  "div",
1075
1069
  {
1076
1070
  className: (0, import_classnames.default)({
@@ -1081,14 +1075,30 @@ var BoxRenderer = {
1081
1075
  children
1082
1076
  }
1083
1077
  );
1084
- return hasFixedWidth ? /* @__PURE__ */ jsx6("div", { className: (0, import_classnames.default)("df-box-renderer-fixed-width", getMargin(margin)), children: contents }) : contents;
1078
+ return hasFixedWidth ? /* @__PURE__ */ jsx7("div", { className: (0, import_classnames.default)("df-box-renderer-fixed-width", getMargin(margin)), children: contents }) : contents;
1085
1079
  }
1086
1080
  };
1087
1081
  var BoxRenderer_default = BoxRenderer;
1088
1082
 
1089
1083
  // ../renderers/src/ButtonRenderer.tsx
1090
1084
  import { Button } from "@transferwise/components";
1091
- import { jsx as jsx7 } from "react/jsx-runtime";
1085
+
1086
+ // ../renderers/src/step/StepRendererContext.tsx
1087
+ import { createContext as createContext2, useContext as useContext2 } from "react";
1088
+ var StepRendererContext = createContext2({ loadingState: "idle", trackEvent: () => {
1089
+ } });
1090
+ var StepRendererContextProvider = StepRendererContext.Provider;
1091
+ var useLoadingContext = () => {
1092
+ const { loadingState } = useContext2(StepRendererContext);
1093
+ return { loadingState, isLoading: loadingState !== "idle" };
1094
+ };
1095
+ var useTrackEvent = () => {
1096
+ const { trackEvent } = useContext2(StepRendererContext);
1097
+ return trackEvent;
1098
+ };
1099
+
1100
+ // ../renderers/src/ButtonRenderer.tsx
1101
+ import { jsx as jsx8 } from "react/jsx-runtime";
1092
1102
  var ButtonRenderer = {
1093
1103
  canRenderType: "button",
1094
1104
  render: ButtonRendererComponent
@@ -1106,7 +1116,7 @@ function ButtonRendererComponent({
1106
1116
  const priority = mapControl(control);
1107
1117
  const type = priority === "tertiary" ? void 0 : mapContext(context);
1108
1118
  const { isLoading } = useLoadingContext();
1109
- return /* @__PURE__ */ jsx7(
1119
+ return /* @__PURE__ */ jsx8(
1110
1120
  Button,
1111
1121
  {
1112
1122
  block: true,
@@ -1158,7 +1168,7 @@ var ButtonRenderer_default = ButtonRenderer;
1158
1168
 
1159
1169
  // ../renderers/src/ColumnsRenderer.tsx
1160
1170
  var import_classnames2 = __toESM(require_classnames());
1161
- import { jsx as jsx8, jsxs as jsxs2 } from "react/jsx-runtime";
1171
+ import { jsx as jsx9, jsxs as jsxs2 } from "react/jsx-runtime";
1162
1172
  var ColumnsRenderer = {
1163
1173
  canRenderType: "columns",
1164
1174
  render: ({ bias, margin, startChildren, endChildren }) => /* @__PURE__ */ jsxs2(
@@ -1169,8 +1179,8 @@ var ColumnsRenderer = {
1169
1179
  "df-columns-renderer-bias-end": bias === "end"
1170
1180
  }),
1171
1181
  children: [
1172
- /* @__PURE__ */ jsx8("div", { className: "df-columns-renderer-column", children: startChildren }),
1173
- /* @__PURE__ */ jsx8("div", { className: "df-columns-renderer-column", children: endChildren })
1182
+ /* @__PURE__ */ jsx9("div", { className: "df-columns-renderer-column", children: startChildren }),
1183
+ /* @__PURE__ */ jsx9("div", { className: "df-columns-renderer-column", children: endChildren })
1174
1184
  ]
1175
1185
  }
1176
1186
  )
@@ -1209,7 +1219,7 @@ var dateToDateString = (date) => {
1209
1219
  };
1210
1220
 
1211
1221
  // ../renderers/src/components/VariableDateInput.tsx
1212
- import { jsx as jsx9 } from "react/jsx-runtime";
1222
+ import { jsx as jsx10 } from "react/jsx-runtime";
1213
1223
  function VariableDateInput({
1214
1224
  control,
1215
1225
  inputProps
@@ -1225,7 +1235,7 @@ function VariableDateInput({
1225
1235
  onFocus
1226
1236
  } = inputProps;
1227
1237
  if (control === "date-lookup") {
1228
- return /* @__PURE__ */ jsx9(
1238
+ return /* @__PURE__ */ jsx10(
1229
1239
  DateLookup,
1230
1240
  {
1231
1241
  value: dateStringToDateOrNull(inputProps.value),
@@ -1241,7 +1251,7 @@ function VariableDateInput({
1241
1251
  }
1242
1252
  );
1243
1253
  }
1244
- return /* @__PURE__ */ jsx9(
1254
+ return /* @__PURE__ */ jsx10(
1245
1255
  DateInput,
1246
1256
  __spreadProps(__spreadValues({}, inputProps), {
1247
1257
  dayAutoComplete: getAutocompleteString(autoComplete, "day"),
@@ -1258,7 +1268,7 @@ var getAutocompleteString = (value, suffix) => {
1258
1268
  var VariableDateInput_default = VariableDateInput;
1259
1269
 
1260
1270
  // ../renderers/src/DateInputRenderer.tsx
1261
- import { jsx as jsx10 } from "react/jsx-runtime";
1271
+ import { jsx as jsx11 } from "react/jsx-runtime";
1262
1272
  var DateInputRenderer = {
1263
1273
  canRenderType: "input-date",
1264
1274
  render: (props) => {
@@ -1283,7 +1293,7 @@ var DateInputRenderer = {
1283
1293
  ]);
1284
1294
  const value = initialValue != null ? initialValue : "";
1285
1295
  const inputProps = __spreadProps(__spreadValues({}, rest), { value, id });
1286
- return /* @__PURE__ */ jsx10(
1296
+ return /* @__PURE__ */ jsx11(
1287
1297
  FieldInput_default,
1288
1298
  {
1289
1299
  id,
@@ -1291,7 +1301,7 @@ var DateInputRenderer = {
1291
1301
  description,
1292
1302
  validation: validationState,
1293
1303
  help,
1294
- children: /* @__PURE__ */ jsx10(VariableDateInput_default, { control, inputProps })
1304
+ children: /* @__PURE__ */ jsx11(VariableDateInput_default, { control, inputProps })
1295
1305
  }
1296
1306
  );
1297
1307
  }
@@ -1308,19 +1318,19 @@ import "react";
1308
1318
  import "react/jsx-runtime";
1309
1319
 
1310
1320
  // ../renderers/src/components/icon/FlagIcon.tsx
1311
- import { jsx as jsx12 } from "react/jsx-runtime";
1321
+ import { jsx as jsx13 } from "react/jsx-runtime";
1312
1322
  var isFlagIcon = (name) => name.startsWith("flag-");
1313
1323
  function FlagIcon({ name }) {
1314
1324
  if (!isFlagIcon(name)) {
1315
1325
  return null;
1316
1326
  }
1317
1327
  const code = name.substring(5);
1318
- return /* @__PURE__ */ jsx12(Flag, { code });
1328
+ return /* @__PURE__ */ jsx13(Flag, { code });
1319
1329
  }
1320
1330
 
1321
1331
  // ../renderers/src/components/icon/NamedIcon.tsx
1322
1332
  import * as icons from "@transferwise/icons";
1323
- import { jsx as jsx13 } from "react/jsx-runtime";
1333
+ import { jsx as jsx14 } from "react/jsx-runtime";
1324
1334
  var isNamedIcon = (name) => {
1325
1335
  const iconName = toCapitalisedCamelCase(name);
1326
1336
  return Object.keys(icons).includes(iconName);
@@ -1331,19 +1341,19 @@ function NamedIcon({ name }) {
1331
1341
  }
1332
1342
  const iconName = toCapitalisedCamelCase(name);
1333
1343
  const Icon = icons[iconName];
1334
- return /* @__PURE__ */ jsx13(Icon, { size: 24 });
1344
+ return /* @__PURE__ */ jsx14(Icon, { size: 24 });
1335
1345
  }
1336
1346
  var toCapitalisedCamelCase = (value) => value.split("-").map(capitaliseFirstChar).join("");
1337
1347
  var capitaliseFirstChar = (value) => `${value[0].toUpperCase()}${value.slice(1)}`;
1338
1348
 
1339
1349
  // ../renderers/src/components/icon/DynamicIcon.tsx
1340
- import { jsx as jsx14 } from "react/jsx-runtime";
1350
+ import { jsx as jsx15 } from "react/jsx-runtime";
1341
1351
  function DynamicIcon({ name }) {
1342
1352
  if (isFlagIcon(name)) {
1343
- return /* @__PURE__ */ jsx14(FlagIcon, { name });
1353
+ return /* @__PURE__ */ jsx15(FlagIcon, { name });
1344
1354
  }
1345
1355
  if (isNamedIcon(name)) {
1346
- return /* @__PURE__ */ jsx14(NamedIcon, { name });
1356
+ return /* @__PURE__ */ jsx15(NamedIcon, { name });
1347
1357
  }
1348
1358
  return null;
1349
1359
  }
@@ -1351,25 +1361,25 @@ var DynamicIcon_default = DynamicIcon;
1351
1361
 
1352
1362
  // ../renderers/src/components/icon/NavigationOptionMedia.tsx
1353
1363
  import { Avatar, AvatarType } from "@transferwise/components";
1354
- import { jsx as jsx15 } from "react/jsx-runtime";
1364
+ import { jsx as jsx16 } from "react/jsx-runtime";
1355
1365
  function NavigationOptionMedia({ icon, image }) {
1356
1366
  if (!isNullish(icon)) {
1357
1367
  if ("name" in icon) {
1358
- return /* @__PURE__ */ jsx15(Avatar, { type: AvatarType.ICON, children: /* @__PURE__ */ jsx15(DynamicIcon_default, { name: icon.name }) });
1368
+ return /* @__PURE__ */ jsx16(Avatar, { type: AvatarType.ICON, children: /* @__PURE__ */ jsx16(DynamicIcon_default, { name: icon.name }) });
1359
1369
  }
1360
1370
  if (icon.text) {
1361
- return /* @__PURE__ */ jsx15(Avatar, { type: AvatarType.INITIALS, children: icon.text });
1371
+ return /* @__PURE__ */ jsx16(Avatar, { type: AvatarType.INITIALS, children: icon.text });
1362
1372
  }
1363
1373
  }
1364
1374
  if (image == null ? void 0 : image.url) {
1365
1375
  const { url, accessibilityDescription } = image;
1366
- return /* @__PURE__ */ jsx15("img", { src: url, alt: accessibilityDescription });
1376
+ return /* @__PURE__ */ jsx16("img", { src: url, alt: accessibilityDescription });
1367
1377
  }
1368
1378
  return null;
1369
1379
  }
1370
1380
 
1371
1381
  // ../renderers/src/DecisionRenderer.tsx
1372
- import { jsx as jsx16, jsxs as jsxs4 } from "react/jsx-runtime";
1382
+ import { jsx as jsx17, jsxs as jsxs4 } from "react/jsx-runtime";
1373
1383
  var DecisionRenderer = {
1374
1384
  canRenderType: "decision",
1375
1385
  render: DecisionRendererComponent
@@ -1378,14 +1388,14 @@ var DecisionRenderer_default = DecisionRenderer;
1378
1388
  function DecisionRendererComponent({ margin, options, title }) {
1379
1389
  const { isLoading } = useLoadingContext();
1380
1390
  return /* @__PURE__ */ jsxs4("div", { className: getMargin(margin), children: [
1381
- title && /* @__PURE__ */ jsx16(Header, { as: "h2", title }),
1382
- /* @__PURE__ */ jsx16(NavigationOptionsList, { children: options.map(({ description, disabled, icon, image, title: title2, onClick }) => /* @__PURE__ */ jsx16(
1391
+ title && /* @__PURE__ */ jsx17(Header, { as: "h2", title }),
1392
+ /* @__PURE__ */ jsx17(NavigationOptionsList, { children: options.map(({ description, disabled, icon, image, title: title2, onClick }) => /* @__PURE__ */ jsx17(
1383
1393
  NavigationOption,
1384
1394
  {
1385
1395
  title: title2,
1386
1396
  content: description,
1387
1397
  disabled: isLoading || disabled,
1388
- media: /* @__PURE__ */ jsx16(NavigationOptionMedia, { icon, image }),
1398
+ media: /* @__PURE__ */ jsx17(NavigationOptionMedia, { icon, image }),
1389
1399
  showMediaCircle: false,
1390
1400
  showMediaAtAllSizes: true,
1391
1401
  onClick
@@ -1396,36 +1406,36 @@ function DecisionRendererComponent({ margin, options, title }) {
1396
1406
  }
1397
1407
 
1398
1408
  // ../renderers/src/DividerRenderer.tsx
1399
- import { jsx as jsx17 } from "react/jsx-runtime";
1409
+ import { jsx as jsx18 } from "react/jsx-runtime";
1400
1410
  var DividerRenderer = {
1401
1411
  canRenderType: "divider",
1402
- render: ({ margin }) => /* @__PURE__ */ jsx17("hr", { className: `m-t-0 ${getMargin(margin)}` })
1412
+ render: ({ margin }) => /* @__PURE__ */ jsx18("hr", { className: `m-t-0 ${getMargin(margin)}` })
1403
1413
  };
1404
1414
  var DividerRenderer_default = DividerRenderer;
1405
1415
 
1406
1416
  // ../renderers/src/FormRenderer.tsx
1407
- import { jsx as jsx18 } from "react/jsx-runtime";
1417
+ import { jsx as jsx19 } from "react/jsx-runtime";
1408
1418
  var FormRenderer = {
1409
1419
  canRenderType: "form",
1410
- render: ({ children, margin }) => /* @__PURE__ */ jsx18("div", { className: getMargin(margin), children })
1420
+ render: ({ children, margin }) => /* @__PURE__ */ jsx19("div", { className: getMargin(margin), children })
1411
1421
  };
1412
1422
  var FormRenderer_default = FormRenderer;
1413
1423
 
1414
1424
  // ../renderers/src/FormSectionRenderer.tsx
1415
1425
  import { Header as Header2 } from "@transferwise/components";
1416
- import { jsx as jsx19, jsxs as jsxs5 } from "react/jsx-runtime";
1426
+ import { jsx as jsx20, jsxs as jsxs5 } from "react/jsx-runtime";
1417
1427
  var FormSectionRenderer = {
1418
1428
  canRenderType: "form-section",
1419
1429
  render: ({ title, description, children }) => /* @__PURE__ */ jsxs5("fieldset", { children: [
1420
1430
  title && // TODO - once section headers support help, we could show help in here
1421
- /* @__PURE__ */ jsx19(
1431
+ /* @__PURE__ */ jsx20(
1422
1432
  Header2,
1423
1433
  {
1424
1434
  as: "h2",
1425
1435
  title
1426
1436
  }
1427
1437
  ),
1428
- description && /* @__PURE__ */ jsx19("p", { children: description }),
1438
+ description && /* @__PURE__ */ jsx20("p", { children: description }),
1429
1439
  children
1430
1440
  ] })
1431
1441
  };
@@ -1433,32 +1443,32 @@ var FormSectionRenderer_default = FormSectionRenderer;
1433
1443
 
1434
1444
  // ../renderers/src/HeadingRenderer.tsx
1435
1445
  import { Display } from "@transferwise/components";
1436
- import { jsx as jsx20 } from "react/jsx-runtime";
1446
+ import { jsx as jsx21 } from "react/jsx-runtime";
1437
1447
  var HeadingRenderer = {
1438
1448
  canRenderType: "heading",
1439
- render: (props) => /* @__PURE__ */ jsx20(Heading, __spreadValues({}, props))
1449
+ render: (props) => /* @__PURE__ */ jsx21(Heading, __spreadValues({}, props))
1440
1450
  };
1441
1451
  function Heading(props) {
1442
1452
  const { text, size: size2, align, margin, control } = props;
1443
1453
  const className = getTextAlignmentAndMargin({ align, margin });
1444
- return control === "display" ? /* @__PURE__ */ jsx20(DisplayHeading, { size: size2, text, className }) : /* @__PURE__ */ jsx20(StandardHeading, { size: size2, text, className });
1454
+ return control === "display" ? /* @__PURE__ */ jsx21(DisplayHeading, { size: size2, text, className }) : /* @__PURE__ */ jsx21(StandardHeading, { size: size2, text, className });
1445
1455
  }
1446
1456
  function DisplayHeading({ size: size2, text, className }) {
1447
- return /* @__PURE__ */ jsx20(Display, { type: getDisplayType(size2), className, children: text });
1457
+ return /* @__PURE__ */ jsx21(Display, { type: getDisplayType(size2), className, children: text });
1448
1458
  }
1449
1459
  function StandardHeading({ size: size2, text, className }) {
1450
1460
  switch (size2) {
1451
1461
  case "xs":
1452
- return /* @__PURE__ */ jsx20("h5", { className, children: text });
1462
+ return /* @__PURE__ */ jsx21("h5", { className, children: text });
1453
1463
  case "sm":
1454
- return /* @__PURE__ */ jsx20("h4", { className, children: text });
1464
+ return /* @__PURE__ */ jsx21("h4", { className, children: text });
1455
1465
  case "lg":
1456
- return /* @__PURE__ */ jsx20("h2", { className, children: text });
1466
+ return /* @__PURE__ */ jsx21("h2", { className, children: text });
1457
1467
  case "xl":
1458
- return /* @__PURE__ */ jsx20("h1", { className, children: text });
1468
+ return /* @__PURE__ */ jsx21("h1", { className, children: text });
1459
1469
  case "md":
1460
1470
  default:
1461
- return /* @__PURE__ */ jsx20("h3", { className, children: text });
1471
+ return /* @__PURE__ */ jsx21("h3", { className, children: text });
1462
1472
  }
1463
1473
  }
1464
1474
  var getDisplayType = (size2) => {
@@ -1488,10 +1498,10 @@ function isRelativePath(url = "") {
1488
1498
  }
1489
1499
 
1490
1500
  // ../renderers/src/ImageRenderer.tsx
1491
- import { jsx as jsx21 } from "react/jsx-runtime";
1501
+ import { jsx as jsx22 } from "react/jsx-runtime";
1492
1502
  var ImageRenderer = {
1493
1503
  canRenderType: "image",
1494
- render: (props) => /* @__PURE__ */ jsx21(ImageRendererComponent, __spreadValues({}, props))
1504
+ render: (props) => /* @__PURE__ */ jsx22(ImageRendererComponent, __spreadValues({}, props))
1495
1505
  };
1496
1506
  var ImageRenderer_default = ImageRenderer;
1497
1507
  function ImageRendererComponent({
@@ -1505,7 +1515,7 @@ function ImageRendererComponent({
1505
1515
  useEffect2(() => {
1506
1516
  void getImageSource(httpClient, url).then(setImageSource);
1507
1517
  }, [url, httpClient]);
1508
- return /* @__PURE__ */ jsx21("div", { className: `df-image ${size2 || "md"}`, children: /* @__PURE__ */ jsx21(
1518
+ return /* @__PURE__ */ jsx22("div", { className: `df-image ${size2 || "md"}`, children: /* @__PURE__ */ jsx22(
1509
1519
  Image,
1510
1520
  {
1511
1521
  className: `img-responsive ${getMargin(margin)}`,
@@ -1550,7 +1560,7 @@ var getImageSource = async (httpClient, imageUrl) => {
1550
1560
 
1551
1561
  // ../renderers/src/InstructionsRenderer.tsx
1552
1562
  import { Header as Header3, InstructionsList } from "@transferwise/components";
1553
- import { jsx as jsx22, jsxs as jsxs6 } from "react/jsx-runtime";
1563
+ import { jsx as jsx23, jsxs as jsxs6 } from "react/jsx-runtime";
1554
1564
  var doContext = ["positive", "neutral"];
1555
1565
  var dontContext = ["warning", "negative"];
1556
1566
  var InstructionsRenderer = {
@@ -1559,8 +1569,8 @@ var InstructionsRenderer = {
1559
1569
  const dos = items.filter((item) => doContext.includes(item.context)).map(({ text }) => text);
1560
1570
  const donts = items.filter((item) => dontContext.includes(item.context)).map(({ text }) => text);
1561
1571
  return /* @__PURE__ */ jsxs6("div", { className: getMargin(margin), children: [
1562
- title ? /* @__PURE__ */ jsx22(Header3, { title }) : null,
1563
- /* @__PURE__ */ jsx22(InstructionsList, { dos, donts })
1572
+ title ? /* @__PURE__ */ jsx23(Header3, { title }) : null,
1573
+ /* @__PURE__ */ jsx23(InstructionsList, { dos, donts })
1564
1574
  ] });
1565
1575
  }
1566
1576
  };
@@ -1578,11 +1588,11 @@ var onWheel = (event) => {
1578
1588
 
1579
1589
  // ../renderers/src/utils/getIconAvatar.tsx
1580
1590
  import { Avatar as Avatar2, AvatarType as AvatarType2 } from "@transferwise/components";
1581
- import { jsx as jsx23 } from "react/jsx-runtime";
1591
+ import { jsx as jsx24 } from "react/jsx-runtime";
1582
1592
  var size = 24;
1583
1593
  function getIconAvatar({ icon, image }) {
1584
1594
  if (image == null ? void 0 : image.url) {
1585
- return /* @__PURE__ */ jsx23(
1595
+ return /* @__PURE__ */ jsx24(
1586
1596
  "img",
1587
1597
  {
1588
1598
  src: image.url,
@@ -1593,13 +1603,13 @@ function getIconAvatar({ icon, image }) {
1593
1603
  );
1594
1604
  }
1595
1605
  if (isFlagIcon2(icon)) {
1596
- return /* @__PURE__ */ jsx23(Avatar2, { type: AvatarType2.ICON, size, children: /* @__PURE__ */ jsx23(DynamicIcon_default, { name: icon.name }) });
1606
+ return /* @__PURE__ */ jsx24(Avatar2, { type: AvatarType2.ICON, size, children: /* @__PURE__ */ jsx24(DynamicIcon_default, { name: icon.name }) });
1597
1607
  }
1598
1608
  if (isNamedIcon2(icon)) {
1599
- return /* @__PURE__ */ jsx23(DynamicIcon_default, { name: icon.name });
1609
+ return /* @__PURE__ */ jsx24(DynamicIcon_default, { name: icon.name });
1600
1610
  }
1601
1611
  if (icon && "text" in icon) {
1602
- return /* @__PURE__ */ jsx23(Avatar2, { type: AvatarType2.ICON, size, children: icon.text });
1612
+ return /* @__PURE__ */ jsx24(Avatar2, { type: AvatarType2.ICON, size, children: icon.text });
1603
1613
  }
1604
1614
  return null;
1605
1615
  }
@@ -1613,7 +1623,7 @@ var getInputGroupAddonStart = ({ icon, image }) => {
1613
1623
  };
1614
1624
 
1615
1625
  // ../renderers/src/IntegerInputRenderer.tsx
1616
- import { jsx as jsx24 } from "react/jsx-runtime";
1626
+ import { jsx as jsx25 } from "react/jsx-runtime";
1617
1627
  var IntegerInputRenderer = {
1618
1628
  canRenderType: "input-integer",
1619
1629
  render: (props) => {
@@ -1640,7 +1650,7 @@ var IntegerInputRenderer = {
1640
1650
  "value",
1641
1651
  "onChange"
1642
1652
  ]);
1643
- return /* @__PURE__ */ jsx24(
1653
+ return /* @__PURE__ */ jsx25(
1644
1654
  FieldInput_default,
1645
1655
  {
1646
1656
  id,
@@ -1648,7 +1658,7 @@ var IntegerInputRenderer = {
1648
1658
  description,
1649
1659
  validation: validationState,
1650
1660
  help,
1651
- children: /* @__PURE__ */ jsx24(InputGroup, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ jsx24(
1661
+ children: /* @__PURE__ */ jsx25(InputGroup, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ jsx25(
1652
1662
  Input,
1653
1663
  __spreadValues({
1654
1664
  id,
@@ -1672,10 +1682,10 @@ var IntegerInputRenderer_default = IntegerInputRenderer;
1672
1682
 
1673
1683
  // ../renderers/src/LoadingIndicatorRenderer.tsx
1674
1684
  import { Loader } from "@transferwise/components";
1675
- import { jsx as jsx25 } from "react/jsx-runtime";
1685
+ import { jsx as jsx26 } from "react/jsx-runtime";
1676
1686
  var LoadingIndicatorRenderer = {
1677
1687
  canRenderType: "loading-indicator",
1678
- render: ({ margin, size: size2 }) => /* @__PURE__ */ jsx25(
1688
+ render: ({ margin, size: size2 }) => /* @__PURE__ */ jsx26(
1679
1689
  Loader,
1680
1690
  {
1681
1691
  size: size2,
@@ -1688,28 +1698,28 @@ var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
1688
1698
 
1689
1699
  // ../renderers/src/MarkdownRenderer.tsx
1690
1700
  import { Markdown as Markdown2 } from "@transferwise/components";
1691
- import { jsx as jsx26 } from "react/jsx-runtime";
1701
+ import { jsx as jsx27 } from "react/jsx-runtime";
1692
1702
  var MarkdownRenderer = {
1693
1703
  canRenderType: "markdown",
1694
- render: ({ content, align, margin }) => /* @__PURE__ */ jsx26("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ jsx26(Markdown2, { config: { link: { target: "_blank" } }, children: content }) })
1704
+ render: ({ content, align, margin }) => /* @__PURE__ */ jsx27("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ jsx27(Markdown2, { config: { link: { target: "_blank" } }, children: content }) })
1695
1705
  };
1696
1706
  var MarkdownRenderer_default = MarkdownRenderer;
1697
1707
 
1698
1708
  // ../renderers/src/ModalRenderer.tsx
1699
1709
  import { Button as Button2, Modal } from "@transferwise/components";
1700
1710
  import { useState as useState3 } from "react";
1701
- import { jsx as jsx27, jsxs as jsxs7 } from "react/jsx-runtime";
1711
+ import { jsx as jsx28, jsxs as jsxs7 } from "react/jsx-runtime";
1702
1712
  var ModalRenderer = {
1703
1713
  canRenderType: "modal",
1704
- render: (props) => /* @__PURE__ */ jsx27(DFModal, __spreadValues({}, props))
1714
+ render: (props) => /* @__PURE__ */ jsx28(DFModal, __spreadValues({}, props))
1705
1715
  };
1706
1716
  var ModalRenderer_default = ModalRenderer;
1707
1717
  function DFModal({ content, margin, trigger }) {
1708
1718
  const [visible, setVisible] = useState3(false);
1709
1719
  const { components, title } = content;
1710
1720
  return /* @__PURE__ */ jsxs7("div", { className: getMargin(margin), children: [
1711
- /* @__PURE__ */ jsx27(Button2, { priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
1712
- /* @__PURE__ */ jsx27(
1721
+ /* @__PURE__ */ jsx28(Button2, { priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
1722
+ /* @__PURE__ */ jsx28(
1713
1723
  Modal,
1714
1724
  {
1715
1725
  scroll: "content",
@@ -1728,16 +1738,16 @@ import { SelectInput, SelectInputOptionContent } from "@transferwise/components"
1728
1738
 
1729
1739
  // ../renderers/src/SelectInputRenderer/OptionMedia.tsx
1730
1740
  import { Avatar as Avatar3, AvatarType as AvatarType3 } from "@transferwise/components";
1731
- import { jsx as jsx28 } from "react/jsx-runtime";
1741
+ import { jsx as jsx29 } from "react/jsx-runtime";
1732
1742
  function OptionMedia({ icon, image }) {
1733
1743
  if (image == null ? void 0 : image.url) {
1734
- return /* @__PURE__ */ jsx28("img", { src: image.url, alt: image.accessibilityDescription || "", width: "64px" });
1744
+ return /* @__PURE__ */ jsx29("img", { src: image.url, alt: image.accessibilityDescription || "", width: "64px" });
1735
1745
  }
1736
1746
  if (icon && "name" in icon) {
1737
- return /* @__PURE__ */ jsx28(Avatar3, { type: AvatarType3.ICON, children: /* @__PURE__ */ jsx28(DynamicIcon_default, { name: icon.name }) });
1747
+ return /* @__PURE__ */ jsx29(Avatar3, { type: AvatarType3.ICON, children: /* @__PURE__ */ jsx29(DynamicIcon_default, { name: icon.name }) });
1738
1748
  }
1739
1749
  if (icon && "text" in icon) {
1740
- return /* @__PURE__ */ jsx28(Avatar3, { type: AvatarType3.INITIALS, children: icon.text });
1750
+ return /* @__PURE__ */ jsx29(Avatar3, { type: AvatarType3.INITIALS, children: icon.text });
1741
1751
  }
1742
1752
  return null;
1743
1753
  }
@@ -1757,10 +1767,10 @@ var multi_select_messages_default = defineMessages2({
1757
1767
 
1758
1768
  // ../renderers/src/MultiSelectInputRenderer.tsx
1759
1769
  import { useState as useState4 } from "react";
1760
- import { jsx as jsx29 } from "react/jsx-runtime";
1770
+ import { jsx as jsx30 } from "react/jsx-runtime";
1761
1771
  var MultiSelectInputRenderer = {
1762
1772
  canRenderType: "input-multi-select",
1763
- render: (props) => /* @__PURE__ */ jsx29(MultiSelectInputRendererComponent, __spreadValues({}, props))
1773
+ render: (props) => /* @__PURE__ */ jsx30(MultiSelectInputRendererComponent, __spreadValues({}, props))
1764
1774
  };
1765
1775
  function MultiSelectInputRendererComponent(props) {
1766
1776
  const { formatMessage } = useIntl2();
@@ -1802,12 +1812,12 @@ function MultiSelectInputRendererComponent(props) {
1802
1812
  const contentProps = {
1803
1813
  title: option.title,
1804
1814
  description: option.description,
1805
- icon: /* @__PURE__ */ jsx29(OptionMedia, { icon: option.icon, image: option.image })
1815
+ icon: /* @__PURE__ */ jsx30(OptionMedia, { icon: option.icon, image: option.image })
1806
1816
  };
1807
- return /* @__PURE__ */ jsx29(SelectInputOptionContent, __spreadValues({}, contentProps));
1817
+ return /* @__PURE__ */ jsx30(SelectInputOptionContent, __spreadValues({}, contentProps));
1808
1818
  };
1809
1819
  const extraProps = { autoComplete };
1810
- return /* @__PURE__ */ jsx29(
1820
+ return /* @__PURE__ */ jsx30(
1811
1821
  FieldInput_default,
1812
1822
  {
1813
1823
  id,
@@ -1815,7 +1825,7 @@ function MultiSelectInputRendererComponent(props) {
1815
1825
  help,
1816
1826
  description,
1817
1827
  validation: validationState,
1818
- children: /* @__PURE__ */ jsx29(
1828
+ children: /* @__PURE__ */ jsx30(
1819
1829
  SelectInput,
1820
1830
  __spreadValues({
1821
1831
  id,
@@ -1859,7 +1869,7 @@ import { UploadInput } from "@transferwise/components";
1859
1869
  // ../renderers/src/components/UploadFieldInput.tsx
1860
1870
  var import_classnames3 = __toESM(require_classnames());
1861
1871
  import { InlineAlert } from "@transferwise/components";
1862
- import { jsx as jsx30, jsxs as jsxs8 } from "react/jsx-runtime";
1872
+ import { jsx as jsx31, jsxs as jsxs8 } from "react/jsx-runtime";
1863
1873
  function UploadFieldInput({
1864
1874
  id,
1865
1875
  children,
@@ -1868,7 +1878,7 @@ function UploadFieldInput({
1868
1878
  help,
1869
1879
  validation
1870
1880
  }) {
1871
- const labelContent = label && help ? /* @__PURE__ */ jsx30(LabelContentWithHelp, { text: label, help }) : label;
1881
+ const labelContent = label && help ? /* @__PURE__ */ jsx31(LabelContentWithHelp, { text: label, help }) : label;
1872
1882
  const descriptionId = description ? `${id}-description` : void 0;
1873
1883
  return /* @__PURE__ */ jsxs8(
1874
1884
  "div",
@@ -1877,9 +1887,9 @@ function UploadFieldInput({
1877
1887
  "has-error": (validation == null ? void 0 : validation.status) === "invalid"
1878
1888
  }),
1879
1889
  children: [
1880
- /* @__PURE__ */ jsx30("label", { htmlFor: id, className: "control-label", children: labelContent }),
1890
+ /* @__PURE__ */ jsx31("label", { htmlFor: id, className: "control-label", children: labelContent }),
1881
1891
  children,
1882
- (validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ jsx30(InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
1892
+ (validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ jsx31(InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
1883
1893
  ]
1884
1894
  }
1885
1895
  );
@@ -1911,7 +1921,7 @@ var getFileType = (base64Url) => {
1911
1921
  var getRandomId = () => Math.random().toString(36).substring(2);
1912
1922
 
1913
1923
  // ../renderers/src/MultiUploadInputRenderer.tsx
1914
- import { jsx as jsx31 } from "react/jsx-runtime";
1924
+ import { jsx as jsx32 } from "react/jsx-runtime";
1915
1925
  var MultiUploadInputRenderer = {
1916
1926
  canRenderType: "input-upload-multi",
1917
1927
  render: (props) => {
@@ -1938,7 +1948,7 @@ var MultiUploadInputRenderer = {
1938
1948
  };
1939
1949
  const onDeleteFile = async (fileId) => onDelete(String(fileId));
1940
1950
  const descriptionId = description ? `${id}-description` : void 0;
1941
- return /* @__PURE__ */ jsx31(
1951
+ return /* @__PURE__ */ jsx32(
1942
1952
  UploadFieldInput_default,
1943
1953
  {
1944
1954
  id,
@@ -1946,7 +1956,7 @@ var MultiUploadInputRenderer = {
1946
1956
  description,
1947
1957
  validation: validationState,
1948
1958
  help,
1949
- children: /* @__PURE__ */ jsx31(
1959
+ children: /* @__PURE__ */ jsx32(
1950
1960
  UploadInput,
1951
1961
  {
1952
1962
  id,
@@ -1970,7 +1980,7 @@ var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
1970
1980
 
1971
1981
  // ../renderers/src/NumberInputRenderer.tsx
1972
1982
  import { Input as Input2, InputGroup as InputGroup2 } from "@transferwise/components";
1973
- import { jsx as jsx32 } from "react/jsx-runtime";
1983
+ import { jsx as jsx33 } from "react/jsx-runtime";
1974
1984
  var NumberInputRenderer = {
1975
1985
  canRenderType: "input-number",
1976
1986
  render: (props) => {
@@ -1997,7 +2007,7 @@ var NumberInputRenderer = {
1997
2007
  "value",
1998
2008
  "onChange"
1999
2009
  ]);
2000
- return /* @__PURE__ */ jsx32(
2010
+ return /* @__PURE__ */ jsx33(
2001
2011
  FieldInput_default,
2002
2012
  {
2003
2013
  id,
@@ -2005,7 +2015,7 @@ var NumberInputRenderer = {
2005
2015
  description,
2006
2016
  validation: validationState,
2007
2017
  help,
2008
- children: /* @__PURE__ */ jsx32(InputGroup2, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ jsx32(
2018
+ children: /* @__PURE__ */ jsx33(InputGroup2, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ jsx33(
2009
2019
  Input2,
2010
2020
  __spreadValues({
2011
2021
  id,
@@ -2030,9 +2040,9 @@ import { useIntl as useIntl3 } from "react-intl";
2030
2040
 
2031
2041
  // ../renderers/src/hooks/useSnackBarIfAvailable.ts
2032
2042
  import { SnackbarContext } from "@transferwise/components";
2033
- import { useContext as useContext2 } from "react";
2043
+ import { useContext as useContext3 } from "react";
2034
2044
  function useSnackBarIfAvailable() {
2035
- const context = useContext2(SnackbarContext);
2045
+ const context = useContext3(SnackbarContext);
2036
2046
  return context ? context.createSnackbar : () => {
2037
2047
  };
2038
2048
  }
@@ -2057,17 +2067,17 @@ var paragraph_messages_default = defineMessages3({
2057
2067
  });
2058
2068
 
2059
2069
  // ../renderers/src/ParagraphRenderer.tsx
2060
- import { jsx as jsx33, jsxs as jsxs9 } from "react/jsx-runtime";
2070
+ import { jsx as jsx34, jsxs as jsxs9 } from "react/jsx-runtime";
2061
2071
  var ParagraphRenderer = {
2062
2072
  canRenderType: "paragraph",
2063
- render: (props) => /* @__PURE__ */ jsx33(Paragraph, __spreadValues({}, props))
2073
+ render: (props) => /* @__PURE__ */ jsx34(Paragraph, __spreadValues({}, props))
2064
2074
  };
2065
2075
  function Paragraph({ align, control, margin, text }) {
2066
2076
  const className = getTextAlignmentAndMargin({ align, margin });
2067
- return control === "copyable" ? /* @__PURE__ */ jsx33(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ jsx33(StandardParagraph, { className, text });
2077
+ return control === "copyable" ? /* @__PURE__ */ jsx34(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ jsx34(StandardParagraph, { className, text });
2068
2078
  }
2069
2079
  function StandardParagraph({ text, className }) {
2070
- return /* @__PURE__ */ jsx33("p", { className: `np-text-body-large ${className}`, children: text });
2080
+ return /* @__PURE__ */ jsx34("p", { className: `np-text-body-large ${className}`, children: text });
2071
2081
  }
2072
2082
  function CopyableParagraph({
2073
2083
  text,
@@ -2082,7 +2092,7 @@ function CopyableParagraph({
2082
2092
  };
2083
2093
  const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
2084
2094
  return /* @__PURE__ */ jsxs9("div", { className, children: [
2085
- /* @__PURE__ */ jsx33(
2095
+ /* @__PURE__ */ jsx34(
2086
2096
  Input3,
2087
2097
  {
2088
2098
  type: "text",
@@ -2091,7 +2101,7 @@ function CopyableParagraph({
2091
2101
  className: (0, import_classnames4.default)("text-ellipsis", inputAlignmentClasses)
2092
2102
  }
2093
2103
  ),
2094
- /* @__PURE__ */ jsx33(Button3, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
2104
+ /* @__PURE__ */ jsx34(Button3, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
2095
2105
  ] });
2096
2106
  }
2097
2107
  var ParagraphRenderer_default = ParagraphRenderer;
@@ -2129,10 +2139,10 @@ var repeatable_messages_default = defineMessages4({
2129
2139
 
2130
2140
  // ../renderers/src/RepeatableRenderer.tsx
2131
2141
  var import_classnames5 = __toESM(require_classnames());
2132
- import { Fragment as Fragment2, jsx as jsx34, jsxs as jsxs10 } from "react/jsx-runtime";
2142
+ import { Fragment as Fragment2, jsx as jsx35, jsxs as jsxs10 } from "react/jsx-runtime";
2133
2143
  var RepeatableRenderer = {
2134
2144
  canRenderType: "repeatable",
2135
- render: (props) => /* @__PURE__ */ jsx34(Repeatable, __spreadValues({}, props))
2145
+ render: (props) => /* @__PURE__ */ jsx35(Repeatable, __spreadValues({}, props))
2136
2146
  };
2137
2147
  function Repeatable(props) {
2138
2148
  const {
@@ -2172,8 +2182,8 @@ function Repeatable(props) {
2172
2182
  setOpenModalType(null);
2173
2183
  };
2174
2184
  return /* @__PURE__ */ jsxs10(Fragment2, { children: [
2175
- title && /* @__PURE__ */ jsx34(Header4, { title }),
2176
- description && /* @__PURE__ */ jsx34("p", { children: description }),
2185
+ title && /* @__PURE__ */ jsx35(Header4, { title }),
2186
+ description && /* @__PURE__ */ jsx35("p", { children: description }),
2177
2187
  /* @__PURE__ */ jsxs10(
2178
2188
  "div",
2179
2189
  {
@@ -2181,30 +2191,30 @@ function Repeatable(props) {
2181
2191
  "has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
2182
2192
  }),
2183
2193
  children: [
2184
- items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsx34(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
2185
- /* @__PURE__ */ jsx34(
2194
+ items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsx35(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
2195
+ /* @__PURE__ */ jsx35(
2186
2196
  NavigationOption2,
2187
2197
  {
2188
- media: /* @__PURE__ */ jsx34(Plus, {}),
2198
+ media: /* @__PURE__ */ jsx35(Plus, {}),
2189
2199
  title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
2190
2200
  showMediaAtAllSizes: true,
2191
2201
  onClick: () => onAddItem()
2192
2202
  }
2193
2203
  ),
2194
- (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ jsx34(InlineAlert2, { type: "negative", children: validationState.message })
2204
+ (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ jsx35(InlineAlert2, { type: "negative", children: validationState.message })
2195
2205
  ]
2196
2206
  }
2197
2207
  ),
2198
- /* @__PURE__ */ jsx34(
2208
+ /* @__PURE__ */ jsx35(
2199
2209
  Modal2,
2200
2210
  {
2201
2211
  open: openModalType !== null,
2202
2212
  title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
2203
2213
  body: /* @__PURE__ */ jsxs10(Fragment2, { children: [
2204
- /* @__PURE__ */ jsx34("div", { className: "m-b-2", children: editableItem }),
2214
+ /* @__PURE__ */ jsx35("div", { className: "m-b-2", children: editableItem }),
2205
2215
  /* @__PURE__ */ jsxs10("div", { children: [
2206
- /* @__PURE__ */ jsx34(Button4, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
2207
- /* @__PURE__ */ jsx34(Button4, { priority: "secondary", type: "negative", block: true, onClick: () => onRemoveItem(), children: formatMessage(repeatable_messages_default.removeItem) })
2216
+ /* @__PURE__ */ jsx35(Button4, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
2217
+ /* @__PURE__ */ jsx35(Button4, { priority: "secondary", type: "negative", block: true, onClick: () => onRemoveItem(), children: formatMessage(repeatable_messages_default.removeItem) })
2208
2218
  ] })
2209
2219
  ] }),
2210
2220
  onClose: () => onCancelEdit()
@@ -2216,10 +2226,10 @@ function ItemSummaryOption({
2216
2226
  item,
2217
2227
  onClick
2218
2228
  }) {
2219
- return /* @__PURE__ */ jsx34(
2229
+ return /* @__PURE__ */ jsx35(
2220
2230
  NavigationOption2,
2221
2231
  {
2222
- media: /* @__PURE__ */ jsx34(NavigationOptionMedia, __spreadValues({}, item)),
2232
+ media: /* @__PURE__ */ jsx35(NavigationOptionMedia, __spreadValues({}, item)),
2223
2233
  title: item.title,
2224
2234
  content: item.description,
2225
2235
  showMediaAtAllSizes: true,
@@ -2257,7 +2267,7 @@ var generic_error_messages_default = defineMessages5({
2257
2267
 
2258
2268
  // ../renderers/src/SearchRenderer/ErrorResult.tsx
2259
2269
  import { Button as Button5 } from "@transferwise/components";
2260
- import { jsx as jsx35, jsxs as jsxs11 } from "react/jsx-runtime";
2270
+ import { jsx as jsx36, jsxs as jsxs11 } from "react/jsx-runtime";
2261
2271
  function ErrorResult({ state }) {
2262
2272
  const intl = useIntl5();
2263
2273
  const buttonVisualProps = {
@@ -2268,7 +2278,7 @@ function ErrorResult({ state }) {
2268
2278
  return /* @__PURE__ */ jsxs11("p", { className: "m-t-2", children: [
2269
2279
  intl.formatMessage(generic_error_messages_default.genericError),
2270
2280
  "\xA0",
2271
- /* @__PURE__ */ jsx35(
2281
+ /* @__PURE__ */ jsx36(
2272
2282
  Button5,
2273
2283
  __spreadProps(__spreadValues({}, buttonVisualProps), {
2274
2284
  onClick: () => {
@@ -2295,7 +2305,7 @@ var search_messages_default = defineMessages6({
2295
2305
 
2296
2306
  // ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
2297
2307
  import { useIntl as useIntl6 } from "react-intl";
2298
- import { Fragment as Fragment3, jsx as jsx36, jsxs as jsxs12 } from "react/jsx-runtime";
2308
+ import { Fragment as Fragment3, jsx as jsx37, jsxs as jsxs12 } from "react/jsx-runtime";
2299
2309
  function BlockSearchRendererComponent({
2300
2310
  id,
2301
2311
  isLoading,
@@ -2309,7 +2319,7 @@ function BlockSearchRendererComponent({
2309
2319
  const trackEvent = useTrackEvent();
2310
2320
  const { formatMessage } = useIntl6();
2311
2321
  return /* @__PURE__ */ jsxs12("div", { className: getMargin(margin), children: [
2312
- /* @__PURE__ */ jsx36(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx36(
2322
+ /* @__PURE__ */ jsx37(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx37(
2313
2323
  Input4,
2314
2324
  {
2315
2325
  id,
@@ -2326,7 +2336,7 @@ function BlockSearchRendererComponent({
2326
2336
  }
2327
2337
  }
2328
2338
  ) }),
2329
- isLoading ? /* @__PURE__ */ jsx36(Fragment3, { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ jsx36(SearchResultContent, { state, onChange })
2339
+ isLoading ? /* @__PURE__ */ jsx37(Fragment3, { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ jsx37(SearchResultContent, { state, onChange })
2330
2340
  ] });
2331
2341
  }
2332
2342
  function SearchResultContent({
@@ -2335,26 +2345,26 @@ function SearchResultContent({
2335
2345
  }) {
2336
2346
  switch (state.type) {
2337
2347
  case "error":
2338
- return /* @__PURE__ */ jsx36(ErrorResult, { state });
2348
+ return /* @__PURE__ */ jsx37(ErrorResult, { state });
2339
2349
  case "results":
2340
- return /* @__PURE__ */ jsx36(SearchResults, { state, onChange });
2350
+ return /* @__PURE__ */ jsx37(SearchResults, { state, onChange });
2341
2351
  case "noResults":
2342
- return /* @__PURE__ */ jsx36(EmptySearchResult, { state });
2352
+ return /* @__PURE__ */ jsx37(EmptySearchResult, { state });
2343
2353
  case "pending":
2344
2354
  default:
2345
2355
  return null;
2346
2356
  }
2347
2357
  }
2348
2358
  function EmptySearchResult({ state }) {
2349
- return /* @__PURE__ */ jsx36(Markdown3, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
2359
+ return /* @__PURE__ */ jsx37(Markdown3, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
2350
2360
  }
2351
2361
  function SearchResults({
2352
2362
  state
2353
2363
  }) {
2354
2364
  const trackEvent = useTrackEvent();
2355
- return /* @__PURE__ */ jsx36(NavigationOptionsList2, { children: state.results.map((result) => {
2365
+ return /* @__PURE__ */ jsx37(NavigationOptionsList2, { children: state.results.map((result) => {
2356
2366
  const { icon, image } = result;
2357
- return /* @__PURE__ */ jsx36(
2367
+ return /* @__PURE__ */ jsx37(
2358
2368
  NavigationOption3,
2359
2369
  {
2360
2370
  title: result.title,
@@ -2380,7 +2390,7 @@ import { Markdown as Markdown4, Typeahead } from "@transferwise/components";
2380
2390
  import { Search } from "@transferwise/icons";
2381
2391
  import { useState as useState7 } from "react";
2382
2392
  import { useIntl as useIntl7 } from "react-intl";
2383
- import { jsx as jsx37 } from "react/jsx-runtime";
2393
+ import { jsx as jsx38 } from "react/jsx-runtime";
2384
2394
  function InlineSearchRenderer({
2385
2395
  id,
2386
2396
  isLoading,
@@ -2392,7 +2402,7 @@ function InlineSearchRenderer({
2392
2402
  const [hasSearched, setHasSearched] = useState7(false);
2393
2403
  const trackEvent = useTrackEvent();
2394
2404
  const intl = useIntl7();
2395
- return /* @__PURE__ */ jsx37("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx37(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx37(
2405
+ return /* @__PURE__ */ jsx38("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx38(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx38(
2396
2406
  Typeahead,
2397
2407
  {
2398
2408
  id: "typeahead-input-id",
@@ -2400,10 +2410,10 @@ function InlineSearchRenderer({
2400
2410
  name: "typeahead-input-name",
2401
2411
  size: "md",
2402
2412
  maxHeight: 100,
2403
- footer: /* @__PURE__ */ jsx37(TypeaheadFooter, { state, isLoading }),
2413
+ footer: /* @__PURE__ */ jsx38(TypeaheadFooter, { state, isLoading }),
2404
2414
  multiple: false,
2405
2415
  clearable: false,
2406
- addon: /* @__PURE__ */ jsx37(Search, { size: 24 }),
2416
+ addon: /* @__PURE__ */ jsx38(Search, { size: 24 }),
2407
2417
  options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
2408
2418
  minQueryLength: 1,
2409
2419
  onChange: (values) => {
@@ -2440,29 +2450,29 @@ function mapResultToTypeaheadOption(result) {
2440
2450
  function TypeaheadFooter({ state, isLoading }) {
2441
2451
  const { formatMessage } = useIntl7();
2442
2452
  if (state.type === "noResults") {
2443
- return /* @__PURE__ */ jsx37(Markdown4, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
2453
+ return /* @__PURE__ */ jsx38(Markdown4, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
2444
2454
  }
2445
2455
  if (state.type === "error") {
2446
- return /* @__PURE__ */ jsx37("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx37(ErrorResult, { state }) });
2456
+ return /* @__PURE__ */ jsx38("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx38(ErrorResult, { state }) });
2447
2457
  }
2448
2458
  if (state.type === "pending" || isLoading) {
2449
- return /* @__PURE__ */ jsx37("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
2459
+ return /* @__PURE__ */ jsx38("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
2450
2460
  }
2451
2461
  return null;
2452
2462
  }
2453
2463
  var InlineSearchRendererComponent_default = InlineSearchRenderer;
2454
2464
 
2455
2465
  // ../renderers/src/SearchRenderer/SearchRenderer.tsx
2456
- import { jsx as jsx38 } from "react/jsx-runtime";
2466
+ import { jsx as jsx39 } from "react/jsx-runtime";
2457
2467
  var SearchRenderer = {
2458
2468
  canRenderType: "search",
2459
- render: (props) => props.control === "inline" ? /* @__PURE__ */ jsx38(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ jsx38(BlockSearchRendererComponent_default, __spreadValues({}, props))
2469
+ render: (props) => props.control === "inline" ? /* @__PURE__ */ jsx39(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ jsx39(BlockSearchRendererComponent_default, __spreadValues({}, props))
2460
2470
  };
2461
2471
  var SearchRenderer_default = SearchRenderer;
2462
2472
 
2463
2473
  // ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
2464
2474
  import { RadioGroup } from "@transferwise/components";
2465
- import { Fragment as Fragment4, jsx as jsx39, jsxs as jsxs13 } from "react/jsx-runtime";
2475
+ import { Fragment as Fragment4, jsx as jsx40, jsxs as jsxs13 } from "react/jsx-runtime";
2466
2476
  function RadioInputRendererComponent(props) {
2467
2477
  const {
2468
2478
  id,
@@ -2477,7 +2487,7 @@ function RadioInputRendererComponent(props) {
2477
2487
  onSelect
2478
2488
  } = props;
2479
2489
  return /* @__PURE__ */ jsxs13(Fragment4, { children: [
2480
- /* @__PURE__ */ jsx39(
2490
+ /* @__PURE__ */ jsx40(
2481
2491
  FieldInput_default,
2482
2492
  {
2483
2493
  id,
@@ -2485,7 +2495,7 @@ function RadioInputRendererComponent(props) {
2485
2495
  help,
2486
2496
  description,
2487
2497
  validation: validationState,
2488
- children: /* @__PURE__ */ jsx39("span", { children: /* @__PURE__ */ jsx39(
2498
+ children: /* @__PURE__ */ jsx40("span", { children: /* @__PURE__ */ jsx40(
2489
2499
  RadioGroup,
2490
2500
  {
2491
2501
  name: id,
@@ -2494,7 +2504,7 @@ function RadioInputRendererComponent(props) {
2494
2504
  value: index,
2495
2505
  secondary: option.description,
2496
2506
  disabled: option.disabled || disabled,
2497
- avatar: /* @__PURE__ */ jsx39(OptionMedia, { icon: option.icon, image: option.image })
2507
+ avatar: /* @__PURE__ */ jsx40(OptionMedia, { icon: option.icon, image: option.image })
2498
2508
  })),
2499
2509
  selectedValue: selectedIndex != null ? selectedIndex : void 0,
2500
2510
  onChange: onSelect
@@ -2510,7 +2520,7 @@ function RadioInputRendererComponent(props) {
2510
2520
  // ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
2511
2521
  import { Tabs } from "@transferwise/components";
2512
2522
  import { useEffect as useEffect3 } from "react";
2513
- import { Fragment as Fragment5, jsx as jsx40, jsxs as jsxs14 } from "react/jsx-runtime";
2523
+ import { Fragment as Fragment5, jsx as jsx41, jsxs as jsxs14 } from "react/jsx-runtime";
2514
2524
  function TabInputRendererComponent(props) {
2515
2525
  const {
2516
2526
  id,
@@ -2530,7 +2540,7 @@ function TabInputRendererComponent(props) {
2530
2540
  }
2531
2541
  }, [selectedIndex, onSelect, options.length]);
2532
2542
  return /* @__PURE__ */ jsxs14(Fragment5, { children: [
2533
- /* @__PURE__ */ jsx40(
2543
+ /* @__PURE__ */ jsx41(
2534
2544
  FieldInput_default,
2535
2545
  {
2536
2546
  id,
@@ -2538,7 +2548,7 @@ function TabInputRendererComponent(props) {
2538
2548
  help,
2539
2549
  description,
2540
2550
  validation: validationState,
2541
- children: /* @__PURE__ */ jsx40(
2551
+ children: /* @__PURE__ */ jsx41(
2542
2552
  Tabs,
2543
2553
  {
2544
2554
  name: id,
@@ -2547,7 +2557,7 @@ function TabInputRendererComponent(props) {
2547
2557
  title: option.title,
2548
2558
  // if we pass null, we get some props-types console errors
2549
2559
  // eslint-disable-next-line react/jsx-no-useless-fragment
2550
- content: /* @__PURE__ */ jsx40(Fragment5, {}),
2560
+ content: /* @__PURE__ */ jsx41(Fragment5, {}),
2551
2561
  disabled: option.disabled || disabled
2552
2562
  })),
2553
2563
  onTabSelect: onSelect
@@ -2562,7 +2572,7 @@ var isValidIndex = (index, options) => index !== null && index >= 0 && index < o
2562
2572
 
2563
2573
  // ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
2564
2574
  import { SelectInput as SelectInput2, SelectInputOptionContent as SelectInputOptionContent2 } from "@transferwise/components";
2565
- import { Fragment as Fragment6, jsx as jsx41, jsxs as jsxs15 } from "react/jsx-runtime";
2575
+ import { Fragment as Fragment6, jsx as jsx42, jsxs as jsxs15 } from "react/jsx-runtime";
2566
2576
  function SelectInputRendererComponent(props) {
2567
2577
  const {
2568
2578
  id,
@@ -2602,13 +2612,13 @@ function SelectInputRendererComponent(props) {
2602
2612
  } : {
2603
2613
  title: option.title,
2604
2614
  description: option.description,
2605
- icon: /* @__PURE__ */ jsx41(OptionMedia, { icon: option.icon, image: option.image })
2615
+ icon: /* @__PURE__ */ jsx42(OptionMedia, { icon: option.icon, image: option.image })
2606
2616
  };
2607
- return /* @__PURE__ */ jsx41(SelectInputOptionContent2, __spreadValues({}, contentProps));
2617
+ return /* @__PURE__ */ jsx42(SelectInputOptionContent2, __spreadValues({}, contentProps));
2608
2618
  };
2609
2619
  const extraProps = { autoComplete };
2610
2620
  return /* @__PURE__ */ jsxs15(Fragment6, { children: [
2611
- /* @__PURE__ */ jsx41(
2621
+ /* @__PURE__ */ jsx42(
2612
2622
  FieldInput_default,
2613
2623
  {
2614
2624
  id,
@@ -2616,7 +2626,7 @@ function SelectInputRendererComponent(props) {
2616
2626
  help,
2617
2627
  description,
2618
2628
  validation: validationState,
2619
- children: /* @__PURE__ */ jsx41(
2629
+ children: /* @__PURE__ */ jsx42(
2620
2630
  SelectInput2,
2621
2631
  __spreadValues({
2622
2632
  name: id,
@@ -2639,7 +2649,7 @@ function SelectInputRendererComponent(props) {
2639
2649
  // ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
2640
2650
  import { useEffect as useEffect4 } from "react";
2641
2651
  import { SegmentedControl } from "@transferwise/components";
2642
- import { Fragment as Fragment7, jsx as jsx42, jsxs as jsxs16 } from "react/jsx-runtime";
2652
+ import { Fragment as Fragment7, jsx as jsx43, jsxs as jsxs16 } from "react/jsx-runtime";
2643
2653
  function SegmentedInputRendererComponent(props) {
2644
2654
  const {
2645
2655
  id,
@@ -2658,7 +2668,7 @@ function SegmentedInputRendererComponent(props) {
2658
2668
  }
2659
2669
  }, [selectedIndex, onSelect, options.length]);
2660
2670
  return /* @__PURE__ */ jsxs16(Fragment7, { children: [
2661
- /* @__PURE__ */ jsx42(
2671
+ /* @__PURE__ */ jsx43(
2662
2672
  FieldInput_default,
2663
2673
  {
2664
2674
  id,
@@ -2666,7 +2676,7 @@ function SegmentedInputRendererComponent(props) {
2666
2676
  help,
2667
2677
  description,
2668
2678
  validation: validationState,
2669
- children: /* @__PURE__ */ jsx42(
2679
+ children: /* @__PURE__ */ jsx43(
2670
2680
  SegmentedControl,
2671
2681
  {
2672
2682
  name: `${id}-segmented-control`,
@@ -2683,26 +2693,26 @@ function SegmentedInputRendererComponent(props) {
2683
2693
  )
2684
2694
  }
2685
2695
  ),
2686
- /* @__PURE__ */ jsx42("div", { id: `${id}-children`, children })
2696
+ /* @__PURE__ */ jsx43("div", { id: `${id}-children`, children })
2687
2697
  ] });
2688
2698
  }
2689
2699
  var isValidIndex2 = (index, options) => index !== null && index >= 0 && index < options;
2690
2700
 
2691
2701
  // ../renderers/src/SelectInputRenderer/SelectInputRenderer.tsx
2692
- import { jsx as jsx43 } from "react/jsx-runtime";
2702
+ import { jsx as jsx44 } from "react/jsx-runtime";
2693
2703
  var SelectInputRenderer = {
2694
2704
  canRenderType: "input-select",
2695
2705
  render: (props) => {
2696
2706
  switch (props.control) {
2697
2707
  case "radio":
2698
- return /* @__PURE__ */ jsx43(RadioInputRendererComponent, __spreadValues({}, props));
2708
+ return /* @__PURE__ */ jsx44(RadioInputRendererComponent, __spreadValues({}, props));
2699
2709
  case "tab":
2700
- return props.options.length > 3 ? /* @__PURE__ */ jsx43(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx43(TabInputRendererComponent, __spreadValues({}, props));
2710
+ return props.options.length > 3 ? /* @__PURE__ */ jsx44(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx44(TabInputRendererComponent, __spreadValues({}, props));
2701
2711
  case "segmented":
2702
- return props.options.length > 3 ? /* @__PURE__ */ jsx43(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx43(SegmentedInputRendererComponent, __spreadValues({}, props));
2712
+ return props.options.length > 3 ? /* @__PURE__ */ jsx44(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx44(SegmentedInputRendererComponent, __spreadValues({}, props));
2703
2713
  case "select":
2704
2714
  default:
2705
- return /* @__PURE__ */ jsx43(SelectInputRendererComponent, __spreadValues({}, props));
2715
+ return /* @__PURE__ */ jsx44(SelectInputRendererComponent, __spreadValues({}, props));
2706
2716
  }
2707
2717
  }
2708
2718
  };
@@ -2710,17 +2720,17 @@ var SelectInputRenderer_default = SelectInputRenderer;
2710
2720
 
2711
2721
  // ../renderers/src/StatusListRenderer.tsx
2712
2722
  import { Header as Header5, Summary } from "@transferwise/components";
2713
- import { jsx as jsx44, jsxs as jsxs17 } from "react/jsx-runtime";
2723
+ import { jsx as jsx45, jsxs as jsxs17 } from "react/jsx-runtime";
2714
2724
  var StatusListRenderer = {
2715
2725
  canRenderType: "status-list",
2716
2726
  render: ({ margin, items, title }) => /* @__PURE__ */ jsxs17("div", { className: getMargin(margin), children: [
2717
- title ? /* @__PURE__ */ jsx44(Header5, { title, className: "m-b-2" }) : null,
2718
- items.map(({ callToAction, description, icon, status, title: itemTitle }) => /* @__PURE__ */ jsx44(
2727
+ title ? /* @__PURE__ */ jsx45(Header5, { title, className: "m-b-2" }) : null,
2728
+ items.map(({ callToAction, description, icon, status, title: itemTitle }) => /* @__PURE__ */ jsx45(
2719
2729
  Summary,
2720
2730
  {
2721
2731
  title: itemTitle,
2722
2732
  description,
2723
- icon: icon && "name" in icon ? /* @__PURE__ */ jsx44(DynamicIcon_default, { name: icon.name }) : null,
2733
+ icon: icon && "name" in icon ? /* @__PURE__ */ jsx45(DynamicIcon_default, { name: icon.name }) : null,
2724
2734
  status: mapStatus(status),
2725
2735
  action: getSummaryAction(callToAction)
2726
2736
  },
@@ -2766,31 +2776,31 @@ import {
2766
2776
  TextArea,
2767
2777
  TextareaWithDisplayFormat
2768
2778
  } from "@transferwise/components";
2769
- import { jsx as jsx45 } from "react/jsx-runtime";
2779
+ import { jsx as jsx46 } from "react/jsx-runtime";
2770
2780
  function VariableTextInput({
2771
2781
  control,
2772
2782
  inputProps
2773
2783
  }) {
2774
2784
  switch (control) {
2775
2785
  case "password":
2776
- return /* @__PURE__ */ jsx45(TextInput, __spreadValues({ type: "password" }, inputProps));
2786
+ return /* @__PURE__ */ jsx46(TextInput, __spreadValues({ type: "password" }, inputProps));
2777
2787
  case "email":
2778
- return /* @__PURE__ */ jsx45(TextInput, __spreadValues({ type: "email" }, inputProps));
2788
+ return /* @__PURE__ */ jsx46(TextInput, __spreadValues({ type: "email" }, inputProps));
2779
2789
  case "textarea":
2780
- return /* @__PURE__ */ jsx45(TextAreaInput, __spreadValues({}, inputProps));
2790
+ return /* @__PURE__ */ jsx46(TextAreaInput, __spreadValues({}, inputProps));
2781
2791
  case "numeric":
2782
- return /* @__PURE__ */ jsx45(NumericInput, __spreadValues({ type: "number" }, inputProps));
2792
+ return /* @__PURE__ */ jsx46(NumericInput, __spreadValues({ type: "number" }, inputProps));
2783
2793
  case "phone-number":
2784
- return /* @__PURE__ */ jsx45(PhoneNumberInput, __spreadValues({}, inputProps));
2794
+ return /* @__PURE__ */ jsx46(PhoneNumberInput, __spreadValues({}, inputProps));
2785
2795
  default:
2786
- return /* @__PURE__ */ jsx45(TextInput, __spreadValues({ type: "text" }, inputProps));
2796
+ return /* @__PURE__ */ jsx46(TextInput, __spreadValues({ type: "text" }, inputProps));
2787
2797
  }
2788
2798
  }
2789
2799
  function TextInput(_a) {
2790
2800
  var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
2791
2801
  if (typeof displayFormat === "string") {
2792
2802
  const inputProps = __spreadValues({ id, name: id, className: "form-control" }, rest);
2793
- return /* @__PURE__ */ jsx45(
2803
+ return /* @__PURE__ */ jsx46(
2794
2804
  InputWithDisplayFormat,
2795
2805
  __spreadValues({
2796
2806
  displayPattern: displayFormat,
@@ -2798,29 +2808,29 @@ function TextInput(_a) {
2798
2808
  }, inputProps)
2799
2809
  );
2800
2810
  }
2801
- return /* @__PURE__ */ jsx45(Input5, __spreadValues({ id, name: id, onChange: (e) => onChange(e.target.value) }, rest));
2811
+ return /* @__PURE__ */ jsx46(Input5, __spreadValues({ id, name: id, onChange: (e) => onChange(e.target.value) }, rest));
2802
2812
  }
2803
2813
  function TextAreaInput(_a) {
2804
2814
  var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
2805
2815
  const textAreaProps = __spreadValues({ id, name: id }, rest);
2806
- return typeof displayFormat === "string" ? /* @__PURE__ */ jsx45(
2816
+ return typeof displayFormat === "string" ? /* @__PURE__ */ jsx46(
2807
2817
  TextareaWithDisplayFormat,
2808
2818
  __spreadValues({
2809
2819
  displayPattern: displayFormat,
2810
2820
  onChange: (newValue) => onChange(newValue)
2811
2821
  }, textAreaProps)
2812
- ) : /* @__PURE__ */ jsx45(TextArea, __spreadValues({ onChange: (e) => onChange(e.target.value) }, textAreaProps));
2822
+ ) : /* @__PURE__ */ jsx46(TextArea, __spreadValues({ onChange: (e) => onChange(e.target.value) }, textAreaProps));
2813
2823
  }
2814
2824
  function NumericInput(_a) {
2815
2825
  var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
2816
2826
  const numericProps = __spreadValues({ id, name: id, onWheel }, rest);
2817
- return typeof displayFormat === "string" ? /* @__PURE__ */ jsx45(
2827
+ return typeof displayFormat === "string" ? /* @__PURE__ */ jsx46(
2818
2828
  InputWithDisplayFormat,
2819
2829
  __spreadValues({
2820
2830
  displayPattern: displayFormat,
2821
2831
  onChange: (newValue) => onChange(numericValueOrNull(newValue))
2822
2832
  }, numericProps)
2823
- ) : /* @__PURE__ */ jsx45(
2833
+ ) : /* @__PURE__ */ jsx46(
2824
2834
  Input5,
2825
2835
  __spreadValues({
2826
2836
  onChange: ({ target: { value: newValue } }) => onChange(numericValueOrNull(newValue))
@@ -2829,12 +2839,12 @@ function NumericInput(_a) {
2829
2839
  }
2830
2840
  function PhoneNumberInput(_a) {
2831
2841
  var _b = _a, { value } = _b, rest = __objRest(_b, ["value"]);
2832
- return /* @__PURE__ */ jsx45(PhoneNumber, __spreadValues({ initialValue: value }, rest));
2842
+ return /* @__PURE__ */ jsx46(PhoneNumber, __spreadValues({ initialValue: value }, rest));
2833
2843
  }
2834
2844
  var VariableTextInput_default = VariableTextInput;
2835
2845
 
2836
2846
  // ../renderers/src/TextInputRenderer.tsx
2837
- import { jsx as jsx46 } from "react/jsx-runtime";
2847
+ import { jsx as jsx47 } from "react/jsx-runtime";
2838
2848
  var TextInputRenderer = {
2839
2849
  canRenderType: "input-text",
2840
2850
  render: (props) => {
@@ -2869,7 +2879,7 @@ var TextInputRenderer = {
2869
2879
  ]);
2870
2880
  const value = initialValue != null ? initialValue : "";
2871
2881
  const inputProps = __spreadProps(__spreadValues({}, rest), { value, id });
2872
- return /* @__PURE__ */ jsx46(
2882
+ return /* @__PURE__ */ jsx47(
2873
2883
  FieldInput_default,
2874
2884
  {
2875
2885
  id,
@@ -2877,7 +2887,7 @@ var TextInputRenderer = {
2877
2887
  description,
2878
2888
  validation: validationState,
2879
2889
  help,
2880
- children: /* @__PURE__ */ jsx46(InputGroup3, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ jsx46(VariableTextInput_default, { control, inputProps }) })
2890
+ children: /* @__PURE__ */ jsx47(InputGroup3, { addonStart: getInputGroupAddonStart({ icon, image }), children: /* @__PURE__ */ jsx47(VariableTextInput_default, { control, inputProps }) })
2881
2891
  }
2882
2892
  );
2883
2893
  }
@@ -2886,7 +2896,7 @@ var TextInputRenderer_default = TextInputRenderer;
2886
2896
 
2887
2897
  // ../renderers/src/UploadInputRenderer.tsx
2888
2898
  import { Upload, UploadInput as UploadInput2 } from "@transferwise/components";
2889
- import { jsx as jsx47 } from "react/jsx-runtime";
2899
+ import { jsx as jsx48 } from "react/jsx-runtime";
2890
2900
  var UploadInputRenderer = {
2891
2901
  canRenderType: "input-upload",
2892
2902
  render: (props) => {
@@ -2902,14 +2912,14 @@ var UploadInputRenderer = {
2902
2912
  };
2903
2913
  return (
2904
2914
  // We don't pass help here as there is no sensible place to display it
2905
- /* @__PURE__ */ jsx47(
2915
+ /* @__PURE__ */ jsx48(
2906
2916
  UploadFieldInput_default,
2907
2917
  {
2908
2918
  id,
2909
2919
  label: void 0,
2910
2920
  description: void 0,
2911
2921
  validation: validationState,
2912
- children: /* @__PURE__ */ jsx47(
2922
+ children: /* @__PURE__ */ jsx48(
2913
2923
  UploadInput2,
2914
2924
  {
2915
2925
  id,
@@ -2966,7 +2976,7 @@ var LargeUploadRenderer = {
2966
2976
  throw e;
2967
2977
  }
2968
2978
  };
2969
- return /* @__PURE__ */ jsx47(
2979
+ return /* @__PURE__ */ jsx48(
2970
2980
  FieldInput_default,
2971
2981
  {
2972
2982
  id,
@@ -2974,7 +2984,7 @@ var LargeUploadRenderer = {
2974
2984
  description,
2975
2985
  validation: validationState,
2976
2986
  help,
2977
- children: /* @__PURE__ */ jsx47(
2987
+ children: /* @__PURE__ */ jsx48(
2978
2988
  Upload,
2979
2989
  __spreadProps(__spreadValues({}, uploadProps), {
2980
2990
  usAccept: getAcceptsString(accepts),
@@ -2991,14 +3001,14 @@ var LargeUploadRenderer = {
2991
3001
 
2992
3002
  // ../renderers/src/ReviewRenderer.tsx
2993
3003
  import { DefinitionList, Header as Header6 } from "@transferwise/components";
2994
- import { Fragment as Fragment8, jsx as jsx48, jsxs as jsxs18 } from "react/jsx-runtime";
3004
+ import { Fragment as Fragment8, jsx as jsx49, jsxs as jsxs18 } from "react/jsx-runtime";
2995
3005
  var ReviewRenderer = {
2996
3006
  canRenderType: "review",
2997
3007
  render: ({ callToAction, control, fields, margin, title }) => {
2998
3008
  const orientation = mapControlToDefinitionListLayout(control);
2999
3009
  return /* @__PURE__ */ jsxs18("div", { className: getMargin(margin), children: [
3000
- (title || callToAction) && /* @__PURE__ */ jsx48(Header6, { title: title != null ? title : "", action: getReviewAction(callToAction) }),
3001
- /* @__PURE__ */ jsx48("div", { className: margin, children: /* @__PURE__ */ jsx48(
3010
+ (title || callToAction) && /* @__PURE__ */ jsx49(Header6, { title: title != null ? title : "", action: getReviewAction(callToAction) }),
3011
+ /* @__PURE__ */ jsx49("div", { className: margin, children: /* @__PURE__ */ jsx49(
3002
3012
  DefinitionList,
3003
3013
  {
3004
3014
  layout: orientation,
@@ -3031,13 +3041,13 @@ var mapControlToDefinitionListLayout = (control) => {
3031
3041
  var getFieldValue = (value, help, orientation) => {
3032
3042
  if (help) {
3033
3043
  return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ jsxs18(Fragment8, { children: [
3034
- /* @__PURE__ */ jsx48(Help_default, { help }),
3044
+ /* @__PURE__ */ jsx49(Help_default, { help }),
3035
3045
  " ",
3036
3046
  value
3037
3047
  ] }) : /* @__PURE__ */ jsxs18(Fragment8, { children: [
3038
3048
  value,
3039
3049
  " ",
3040
- /* @__PURE__ */ jsx48(Help_default, { help })
3050
+ /* @__PURE__ */ jsx49(Help_default, { help })
3041
3051
  ] });
3042
3052
  }
3043
3053
  return value;
@@ -3066,29 +3076,7 @@ var getReviewAction = (callToAction) => {
3066
3076
  };
3067
3077
 
3068
3078
  // ../renderers/src/step/StepRenderer.tsx
3069
- import { Alert as Alert2, Title } from "@transferwise/components";
3070
-
3071
- // ../renderers/src/step/BackButton.tsx
3072
- import { Avatar as Avatar4 } from "@transferwise/components";
3073
- import { ArrowLeft } from "@transferwise/icons";
3074
- import { jsx as jsx49, jsxs as jsxs19 } from "react/jsx-runtime";
3075
- function BackButton({ title, onClick }) {
3076
- return /* @__PURE__ */ jsx49("div", { className: "m-b-2", children: /* @__PURE__ */ jsxs19(
3077
- "button",
3078
- {
3079
- type: "button",
3080
- className: "df-back-btn",
3081
- title,
3082
- "aria-label": title,
3083
- onClick,
3084
- children: [
3085
- /* @__PURE__ */ jsx49("span", { className: "sr-only", children: title }),
3086
- /* @__PURE__ */ jsx49(Avatar4, { type: "icon", children: /* @__PURE__ */ jsx49(ArrowLeft, { size: "24" }) })
3087
- ]
3088
- }
3089
- ) });
3090
- }
3091
- var BackButton_default = BackButton;
3079
+ import { useMemo } from "react";
3092
3080
 
3093
3081
  // ../renderers/src/step/ExternalConfirmationDialog.tsx
3094
3082
  import { useIntl as useIntl8 } from "react-intl";
@@ -3120,16 +3108,16 @@ var external_confirmation_messages_default = defineMessages7({
3120
3108
 
3121
3109
  // ../renderers/src/step/ExternalConfirmationDialog.tsx
3122
3110
  import { Button as Button6, Markdown as Markdown5 } from "@transferwise/components";
3123
- import { jsx as jsx50, jsxs as jsxs20 } from "react/jsx-runtime";
3111
+ import { jsx as jsx50, jsxs as jsxs19 } from "react/jsx-runtime";
3124
3112
  function ExternalConfirmationDialog({
3125
3113
  external,
3126
3114
  onClose
3127
3115
  }) {
3128
3116
  const { formatMessage } = useIntl8();
3129
- return /* @__PURE__ */ jsx50("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ jsxs20("div", { className: "df-box-renderer-width-lg", children: [
3117
+ return /* @__PURE__ */ jsx50("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ jsxs19("div", { className: "df-box-renderer-width-lg", children: [
3130
3118
  /* @__PURE__ */ jsx50("h2", { className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.title) }),
3131
3119
  /* @__PURE__ */ jsx50(Markdown5, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(external.url) }) }),
3132
- /* @__PURE__ */ jsx50("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ jsxs20("div", { className: "df-box-renderer-width-lg", children: [
3120
+ /* @__PURE__ */ jsx50("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ jsxs19("div", { className: "df-box-renderer-width-lg", children: [
3133
3121
  /* @__PURE__ */ jsx50(
3134
3122
  Button6,
3135
3123
  {
@@ -3172,25 +3160,49 @@ function useExternal(url) {
3172
3160
  return { requiresUserConfirmation, dismissConfirmation };
3173
3161
  }
3174
3162
 
3163
+ // ../renderers/src/step/BackButton.tsx
3164
+ import { Avatar as Avatar4 } from "@transferwise/components";
3165
+ import { ArrowLeft } from "@transferwise/icons";
3166
+ import { jsx as jsx51, jsxs as jsxs20 } from "react/jsx-runtime";
3167
+ function BackButton({ title, onClick }) {
3168
+ return /* @__PURE__ */ jsx51("div", { className: "m-b-2", children: /* @__PURE__ */ jsxs20(
3169
+ "button",
3170
+ {
3171
+ type: "button",
3172
+ className: "df-back-btn",
3173
+ title,
3174
+ "aria-label": title,
3175
+ onClick,
3176
+ children: [
3177
+ /* @__PURE__ */ jsx51("span", { className: "sr-only", children: title }),
3178
+ /* @__PURE__ */ jsx51(Avatar4, { type: "icon", children: /* @__PURE__ */ jsx51(ArrowLeft, { size: "24" }) })
3179
+ ]
3180
+ }
3181
+ ) });
3182
+ }
3183
+ var BackButton_default = BackButton;
3184
+
3175
3185
  // ../renderers/src/step/StepRenderer.tsx
3176
- import { Fragment as Fragment9, jsx as jsx51, jsxs as jsxs21 } from "react/jsx-runtime";
3186
+ import { Alert as Alert2, Title } from "@transferwise/components";
3187
+ import { jsx as jsx52, jsxs as jsxs21 } from "react/jsx-runtime";
3177
3188
  var StepRenderer = {
3178
3189
  canRenderType: "step",
3179
3190
  render: StepRendererComponent
3180
3191
  };
3181
3192
  function StepRendererComponent(props) {
3182
- const { back, description, error, external, title, children } = props;
3193
+ const { back, description, error, external, loadingState, title, trackEvent, children } = props;
3194
+ const value = useMemo(() => ({ loadingState, trackEvent }), [loadingState, trackEvent]);
3183
3195
  const { requiresUserConfirmation, dismissConfirmation } = useExternal(external == null ? void 0 : external.url);
3184
3196
  if ((external == null ? void 0 : external.url) && requiresUserConfirmation) {
3185
- return /* @__PURE__ */ jsx51(ExternalConfirmationDialog, { external, onClose: dismissConfirmation });
3197
+ return /* @__PURE__ */ jsx52(ExternalConfirmationDialog, { external, onClose: dismissConfirmation });
3186
3198
  }
3187
- return /* @__PURE__ */ jsxs21(Fragment9, { children: [
3188
- back ? /* @__PURE__ */ jsx51(BackButton_default, __spreadValues({}, back)) : null,
3199
+ return /* @__PURE__ */ jsxs21(StepRendererContextProvider, { value, children: [
3200
+ back ? /* @__PURE__ */ jsx52(BackButton_default, __spreadValues({}, back)) : null,
3189
3201
  title || description ? /* @__PURE__ */ jsxs21("div", { className: "m-b-4", children: [
3190
- title ? /* @__PURE__ */ jsx51(Title, { as: "h1", type: "title-section", className: "text-xs-center m-b-2", children: title }) : void 0,
3191
- description ? /* @__PURE__ */ jsx51("p", { className: "text-xs-center np-text-body-large", children: description }) : void 0
3202
+ title ? /* @__PURE__ */ jsx52(Title, { as: "h1", type: "title-section", className: "text-xs-center m-b-2", children: title }) : void 0,
3203
+ description ? /* @__PURE__ */ jsx52("p", { className: "text-xs-center np-text-body-large", children: description }) : void 0
3192
3204
  ] }) : void 0,
3193
- error ? /* @__PURE__ */ jsx51(Alert2, { type: "negative", className: "m-b-2", message: error }) : void 0,
3205
+ error ? /* @__PURE__ */ jsx52(Alert2, { type: "negative", className: "m-b-2", message: error }) : void 0,
3194
3206
  children
3195
3207
  ] });
3196
3208
  }
@@ -3230,26 +3242,26 @@ var getWiseRenderers = () => [
3230
3242
  ];
3231
3243
 
3232
3244
  // src/dynamicFlow/DynamicFlow.tsx
3233
- import { jsx as jsx52 } from "react/jsx-runtime";
3245
+ import { jsx as jsx53 } from "react/jsx-runtime";
3234
3246
  var wiseRenderers = getWiseRenderers();
3235
3247
  function DynamicFlowLegacy(props) {
3236
3248
  const { customFetch = globalThis.fetch } = props;
3237
3249
  const coreProps = __spreadProps(__spreadValues({}, props), { httpClient: customFetch });
3238
- return /* @__PURE__ */ jsx52(DynamicFlowCoreLegacy, __spreadValues({}, coreProps));
3250
+ return /* @__PURE__ */ jsx53(DynamicFlowCoreLegacy, __spreadValues({}, coreProps));
3239
3251
  }
3240
3252
  function DynamicFlowRevamp(props) {
3241
3253
  const { customFetch = globalThis.fetch, renderers, onLink = openLinkInNewTab } = props;
3242
3254
  const httpClient = useWiseHttpClient(customFetch);
3243
- const mergedRenderers = useMemo(() => [...renderers != null ? renderers : [], ...wiseRenderers], [renderers]);
3255
+ const mergedRenderers = useMemo2(() => [...renderers != null ? renderers : [], ...wiseRenderers], [renderers]);
3244
3256
  const coreProps = __spreadProps(__spreadValues({}, props), { httpClient, renderers: mergedRenderers, onLink });
3245
- return /* @__PURE__ */ jsx52(DynamicFlowCoreRevamp, __spreadValues({}, coreProps));
3257
+ return /* @__PURE__ */ jsx53(RendererHttpClientProvider, { httpClient, children: /* @__PURE__ */ jsx53(DynamicFlowCoreRevamp, __spreadValues({}, coreProps)) });
3246
3258
  }
3247
3259
  var DynamicFragment = forwardRef2(function DynamicFragment2(props, ref) {
3248
3260
  const { customFetch = globalThis.fetch, renderers, onLink = openLinkInNewTab } = props;
3249
3261
  const httpClient = useWiseHttpClient(customFetch);
3250
- const mergedRenderers = useMemo(() => [...renderers != null ? renderers : [], ...wiseRenderers], [renderers]);
3262
+ const mergedRenderers = useMemo2(() => [...renderers != null ? renderers : [], ...wiseRenderers], [renderers]);
3251
3263
  const coreProps = __spreadProps(__spreadValues({}, props), { httpClient, renderers: mergedRenderers, onLink });
3252
- return /* @__PURE__ */ jsx52(DynamicFragmentCore, __spreadProps(__spreadValues({}, coreProps), { ref }));
3264
+ return /* @__PURE__ */ jsx53(RendererHttpClientProvider, { httpClient, children: /* @__PURE__ */ jsx53(DynamicFragmentCore, __spreadProps(__spreadValues({}, coreProps), { ref })) });
3253
3265
  });
3254
3266
  var useWiseHttpClient = (httpClient) => {
3255
3267
  const { locale } = useIntl9();