@wise/dynamic-flow-client 3.31.2 → 3.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/main.mjs CHANGED
@@ -64,7 +64,7 @@ var require_classnames = __commonJS({
64
64
  (function() {
65
65
  "use strict";
66
66
  var hasOwn = {}.hasOwnProperty;
67
- function classNames16() {
67
+ function classNames17() {
68
68
  var classes = "";
69
69
  for (var i = 0; i < arguments.length; i++) {
70
70
  var arg = arguments[i];
@@ -82,7 +82,7 @@ var require_classnames = __commonJS({
82
82
  return "";
83
83
  }
84
84
  if (Array.isArray(arg)) {
85
- return classNames16.apply(null, arg);
85
+ return classNames17.apply(null, arg);
86
86
  }
87
87
  if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
88
88
  return arg.toString();
@@ -105,14 +105,14 @@ var require_classnames = __commonJS({
105
105
  return value + newClass;
106
106
  }
107
107
  if (typeof module !== "undefined" && module.exports) {
108
- classNames16.default = classNames16;
109
- module.exports = classNames16;
108
+ classNames17.default = classNames17;
109
+ module.exports = classNames17;
110
110
  } else if (typeof define === "function" && typeof define.amd === "object" && define.amd) {
111
111
  define("classnames", [], function() {
112
- return classNames16;
112
+ return classNames17;
113
113
  });
114
114
  } else {
115
- window.classNames = classNames16;
115
+ window.classNames = classNames17;
116
116
  }
117
117
  })();
118
118
  }
@@ -1495,7 +1495,7 @@ var mapErrorsToValidationState = (errors) => {
1495
1495
 
1496
1496
  // src/revamp/renderers/mappers/utils/inputComponentToProps.ts
1497
1497
  var inputComponentToProps = (component, type) => {
1498
- var _a;
1498
+ var _a, _b, _c, _d;
1499
1499
  const {
1500
1500
  autoComplete,
1501
1501
  control,
@@ -1524,7 +1524,11 @@ var inputComponentToProps = (component, type) => {
1524
1524
  help,
1525
1525
  icon,
1526
1526
  id,
1527
- image,
1527
+ image: image ? {
1528
+ accessibilityDescription: (_b = image.accessibilityDescription) != null ? _b : image.text,
1529
+ uri: image.uri,
1530
+ url: (_d = (_c = image.uri) != null ? _c : image.url) != null ? _d : ""
1531
+ } : void 0,
1528
1532
  label: title,
1529
1533
  placeholder,
1530
1534
  required,
@@ -1594,7 +1598,19 @@ var dateInputComponentToProps = (component) => __spreadProps(__spreadValues({},
1594
1598
  });
1595
1599
 
1596
1600
  // src/revamp/renderers/mappers/decisionComponentToProps.ts
1597
- var decisionComponentToProps = (component) => pick(component, "type", "control", "options", "margin", "title");
1601
+ var decisionComponentToProps = (component) => __spreadProps(__spreadValues({}, pick(component, "type", "control", "margin", "title")), {
1602
+ options: component.options.map((_a) => {
1603
+ var _b = _a, { image } = _b, rest = __objRest(_b, ["image"]);
1604
+ var _a2, _b2, _c;
1605
+ return __spreadProps(__spreadValues({}, rest), {
1606
+ image: image ? {
1607
+ accessibilityDescription: (_a2 = image.accessibilityDescription) != null ? _a2 : image.text,
1608
+ uri: image.uri,
1609
+ url: (_c = (_b2 = image.uri) != null ? _b2 : image.url) != null ? _c : ""
1610
+ } : image
1611
+ });
1612
+ })
1613
+ });
1598
1614
 
1599
1615
  // src/revamp/renderers/mappers/dividerComponentToProps.ts
1600
1616
  var dividerComponentToProps = (component) => pick(component, "type", "control", "margin");
@@ -1611,7 +1627,14 @@ var hiddenComponentToProps = () => ({
1611
1627
  });
1612
1628
 
1613
1629
  // src/revamp/renderers/mappers/imageComponentToProps.ts
1614
- var imageComponentToProps = (component) => pick(component, "type", "accessibilityDescription", "control", "margin", "size", "url");
1630
+ var imageComponentToProps = (component) => {
1631
+ var _a;
1632
+ return __spreadProps(__spreadValues({}, pick(component, "type", "control", "margin", "size")), {
1633
+ accessibilityDescription: component.content.accessibilityDescription,
1634
+ url: (_a = component.content.url) != null ? _a : "",
1635
+ uri: component.content.uri
1636
+ });
1637
+ };
1615
1638
 
1616
1639
  // src/revamp/renderers/mappers/instructionsComponentToProps.ts
1617
1640
  var instructionsComponentToProps = (component) => pick(component, "type", "control", "items", "margin", "title");
@@ -1668,17 +1691,25 @@ var numberInputComponentToProps = (component) => __spreadProps(__spreadValues({}
1668
1691
  });
1669
1692
 
1670
1693
  // src/revamp/renderers/mappers/objectComponentToProps.ts
1671
- var objectComponentToProps = (component, children) => __spreadProps(__spreadValues({
1672
- type: "form-section"
1673
- }, pick(component, "control", "description", "help", "icon", "image", "title")), {
1674
- children
1675
- });
1694
+ var objectComponentToProps = (component, children) => {
1695
+ var _a, _b;
1696
+ return __spreadProps(__spreadValues({
1697
+ type: "form-section"
1698
+ }, pick(component, "control", "description", "help", "icon", "title")), {
1699
+ // TODO: Remove when viewbindings are updated
1700
+ image: component.image ? __spreadProps(__spreadValues({}, component.image), {
1701
+ url: (_b = (_a = component.image) == null ? void 0 : _a.url) != null ? _b : ""
1702
+ }) : void 0,
1703
+ children
1704
+ });
1705
+ };
1676
1706
 
1677
1707
  // src/revamp/renderers/mappers/paragraphComponentToProps.ts
1678
1708
  var paragraphComponentToProps = (component) => pick(component, "type", "align", "control", "margin", "text");
1679
1709
 
1680
1710
  // src/revamp/renderers/mappers/repeatableComponentToProps.ts
1681
1711
  var repeatableComponentToProps = (component, children, editableItemChildren) => {
1712
+ var _a, _b;
1682
1713
  const {
1683
1714
  addItemTitle,
1684
1715
  control,
@@ -1697,13 +1728,26 @@ var repeatableComponentToProps = (component, children, editableItemChildren) =>
1697
1728
  onSave,
1698
1729
  onRemove
1699
1730
  } = component;
1731
+ const getSummaryImage = (componentSummary) => {
1732
+ var _a2, _b2;
1733
+ if (componentSummary.image) {
1734
+ return __spreadProps(__spreadValues({}, componentSummary.image), {
1735
+ url: (_a2 = componentSummary.image.url) != null ? _a2 : ""
1736
+ });
1737
+ }
1738
+ if (summaryDefaults.image) {
1739
+ return __spreadProps(__spreadValues({}, summaryDefaults.image), {
1740
+ url: (_b2 = summaryDefaults.image.url) != null ? _b2 : ""
1741
+ });
1742
+ }
1743
+ };
1700
1744
  const getSummary = (componentSummary) => {
1701
- var _a, _b, _c, _d;
1745
+ var _a2, _b2, _c;
1702
1746
  return {
1703
- title: (_a = componentSummary.title) != null ? _a : summaryDefaults.title,
1704
- description: (_b = componentSummary.description) != null ? _b : summaryDefaults.description,
1747
+ title: (_a2 = componentSummary.title) != null ? _a2 : summaryDefaults.title,
1748
+ description: (_b2 = componentSummary.description) != null ? _b2 : summaryDefaults.description,
1705
1749
  icon: (_c = componentSummary.icon) != null ? _c : summaryDefaults.icon,
1706
- image: (_d = componentSummary.image) != null ? _d : summaryDefaults.image
1750
+ image: getSummaryImage(componentSummary)
1707
1751
  };
1708
1752
  };
1709
1753
  const itemProps = components.map((childComponent) => __spreadProps(__spreadValues({}, getSummary(childComponent.getSummary())), {
@@ -1719,7 +1763,11 @@ var repeatableComponentToProps = (component, children, editableItemChildren) =>
1719
1763
  editItemTitle,
1720
1764
  error: errors == null ? void 0 : errors[0],
1721
1765
  icon,
1722
- image,
1766
+ image: image ? {
1767
+ accessibilityDescription: (_a = image.accessibilityDescription) != null ? _a : image.text,
1768
+ uri: image.uri,
1769
+ url: (_b = image.url) != null ? _b : ""
1770
+ } : void 0,
1723
1771
  items: itemProps,
1724
1772
  maxItems,
1725
1773
  minItems,
@@ -1837,10 +1885,32 @@ var uploadInputComponentToProps = (component) => {
1837
1885
  };
1838
1886
 
1839
1887
  // src/revamp/renderers/mappers/tupleComponentToProps.ts
1840
- var tupleComponentToProps = (component, children) => __spreadProps(__spreadValues({
1841
- type: "form-section"
1842
- }, pick(component, "control", "description", "help", "icon", "image", "title")), {
1843
- children
1888
+ var tupleComponentToProps = (component, children) => {
1889
+ var _a, _b;
1890
+ return __spreadProps(__spreadValues({
1891
+ type: "form-section"
1892
+ }, pick(component, "control", "description", "help", "icon", "title")), {
1893
+ // TODO Remove URL default after next types update (add back to `pick`)
1894
+ image: component.image ? __spreadProps(__spreadValues({}, component.image), {
1895
+ url: (_b = (_a = component.image) == null ? void 0 : _a.url) != null ? _b : ""
1896
+ }) : void 0,
1897
+ children
1898
+ });
1899
+ };
1900
+
1901
+ // src/revamp/renderers/mappers/listComponentToProps.ts
1902
+ var listComponentToProps = (component) => __spreadProps(__spreadValues({}, pick(component, "type", "callToAction", "control", "margin", "title")), {
1903
+ items: component.items.map((_a) => {
1904
+ var _b = _a, { image } = _b, rest = __objRest(_b, ["image"]);
1905
+ var _a2, _b2, _c;
1906
+ return __spreadProps(__spreadValues({}, rest), {
1907
+ image: image ? {
1908
+ accessibilityDescription: (_a2 = image == null ? void 0 : image.accessibilityDescription) != null ? _a2 : image == null ? void 0 : image.text,
1909
+ uri: image == null ? void 0 : image.uri,
1910
+ url: (_c = (_b2 = image == null ? void 0 : image.url) != null ? _b2 : image == null ? void 0 : image.url) != null ? _c : ""
1911
+ } : void 0
1912
+ });
1913
+ })
1844
1914
  });
1845
1915
 
1846
1916
  // src/revamp/renderers/mappers/componentToRendererProps.ts
@@ -1884,6 +1954,8 @@ var componentToRendererProps = (component, nestedContent) => {
1884
1954
  return instructionsComponentToProps(component);
1885
1955
  case "integer":
1886
1956
  return integerInputComponentToProps(component);
1957
+ case "list":
1958
+ return listComponentToProps(component);
1887
1959
  case "loading-indicator":
1888
1960
  return loadingIndicatorComponentToProps(component);
1889
1961
  case "markdown":
@@ -6206,10 +6278,14 @@ var actionSchema = z.object({
6206
6278
  skipValidation: z.boolean().optional()
6207
6279
  });
6208
6280
  var listLayoutItemSchema = z.object({
6209
- title: z.string(),
6210
6281
  description: z.string().optional(),
6211
- icon: iconSchema,
6212
- status: listLayoutStatusSchema.optional()
6282
+ status: listLayoutStatusSchema.optional(),
6283
+ icon: iconSchema.optional(),
6284
+ image: imageSchema.optional(),
6285
+ title: z.string(),
6286
+ subtitle: z.string().optional(),
6287
+ value: z.string().optional(),
6288
+ subvalue: z.string().optional()
6213
6289
  });
6214
6290
  var decisionLayoutOptionSchema = z.object({
6215
6291
  action: actionSchema,
@@ -6230,6 +6306,11 @@ var behaviorSchema = z.object({
6230
6306
  action: actionSchema.optional(),
6231
6307
  link: linkSchema.optional()
6232
6308
  });
6309
+ var itemCallToActionSchema = z.object({
6310
+ title: z.string(),
6311
+ accessibilityDescription: z.string().optional(),
6312
+ behavior: behaviorSchema
6313
+ });
6233
6314
  var buttonLayoutSchema = z.object({
6234
6315
  type: z.literal("button"),
6235
6316
  size: sizeSchema.optional(),
@@ -6293,12 +6374,10 @@ var alertLayoutCallToActionSchema = z.object({
6293
6374
  accessibilityDescription: z.string().optional(),
6294
6375
  behavior: behaviorSchema
6295
6376
  });
6296
- var listLayoutSchema = z.object({
6297
- type: z.literal("list"),
6298
- items: z.array(listLayoutItemSchema),
6299
- title: z.string().optional(),
6300
- control: z.string().optional(),
6301
- margin: sizeSchema.optional()
6377
+ var listLayoutCallToActionSchema = z.object({
6378
+ title: z.string(),
6379
+ accessibilityDescription: z.string().optional(),
6380
+ behavior: behaviorSchema
6302
6381
  });
6303
6382
  var decisionLayoutSchema = z.object({
6304
6383
  type: z.literal("decision"),
@@ -6307,10 +6386,12 @@ var decisionLayoutSchema = z.object({
6307
6386
  control: z.string().optional(),
6308
6387
  margin: sizeSchema.optional()
6309
6388
  });
6310
- var itemCallToActionSchema = z.object({
6389
+ var statusListLayoutItemSchema = z.object({
6311
6390
  title: z.string(),
6312
- accessibilityDescription: z.string().optional(),
6313
- behavior: behaviorSchema
6391
+ description: z.string().optional(),
6392
+ icon: iconSchema,
6393
+ status: statusListLayoutStatusSchema.optional(),
6394
+ callToAction: itemCallToActionSchema.optional()
6314
6395
  });
6315
6396
  var reviewLayoutSchema = z.object({
6316
6397
  type: z.literal("review"),
@@ -6344,12 +6425,20 @@ var alertLayoutSchema = z.object({
6344
6425
  margin: sizeSchema.optional(),
6345
6426
  callToAction: alertLayoutCallToActionSchema.optional()
6346
6427
  });
6347
- var statusListLayoutItemSchema = z.object({
6348
- title: z.string(),
6349
- description: z.string().optional(),
6350
- icon: iconSchema,
6351
- status: statusListLayoutStatusSchema.optional(),
6352
- callToAction: itemCallToActionSchema.optional()
6428
+ var listLayoutSchema = z.object({
6429
+ type: z.literal("list"),
6430
+ title: z.string().optional(),
6431
+ callToAction: listLayoutCallToActionSchema.optional(),
6432
+ items: z.array(listLayoutItemSchema),
6433
+ control: z.string().optional(),
6434
+ margin: sizeSchema.optional()
6435
+ });
6436
+ var statusListLayoutSchema = z.object({
6437
+ type: z.literal("status-list"),
6438
+ items: z.array(statusListLayoutItemSchema),
6439
+ title: z.string().optional(),
6440
+ control: z.string().optional(),
6441
+ margin: sizeSchema.optional()
6353
6442
  });
6354
6443
  var searchResponseBodySchema = z.object({
6355
6444
  results: z.array(searchResultSchema)
@@ -6392,13 +6481,6 @@ var constSchemaSchema = z.object({
6392
6481
  analyticsId: z.string().optional(),
6393
6482
  disabled: z.boolean().optional()
6394
6483
  });
6395
- var statusListLayoutSchema = z.object({
6396
- type: z.literal("status-list"),
6397
- items: z.array(statusListLayoutItemSchema),
6398
- title: z.string().optional(),
6399
- control: z.string().optional(),
6400
- margin: sizeSchema.optional()
6401
- });
6402
6484
  var layoutSchema = z.lazy(
6403
6485
  () => z.union([
6404
6486
  alertLayoutSchema,
@@ -7144,7 +7226,7 @@ var buttonLayoutToComponent = (uid, button, mapperProps) => {
7144
7226
  var buttonLayoutToComponentWithBehavior = (uid, button, mapperProps) => {
7145
7227
  const { onAction, onLink, step } = mapperProps;
7146
7228
  const { context, control, disabled, margin = "md", pinOrder, size: size2, title, behavior } = button;
7147
- const getOnClick = () => {
7229
+ const getOnClick2 = () => {
7148
7230
  if ("type" in behavior) {
7149
7231
  switch (behavior.type) {
7150
7232
  case "action": {
@@ -7188,7 +7270,7 @@ var buttonLayoutToComponentWithBehavior = (uid, button, mapperProps) => {
7188
7270
  pinOrder,
7189
7271
  size: size2,
7190
7272
  title: title != null ? title : "",
7191
- onClick: getOnClick()
7273
+ onClick: getOnClick2()
7192
7274
  });
7193
7275
  };
7194
7276
  var buttonLayoutToComponentWithAction = (uid, button, mapperProps) => {
@@ -7300,21 +7382,51 @@ var createDecisionComponent = (decisionProps) => __spreadProps(__spreadValues({
7300
7382
  });
7301
7383
 
7302
7384
  // src/revamp/domain/mappers/layout/decisionLayoutToComponent.ts
7303
- var decisionLayoutToComponent = (uid, { control, margin = "md", options, title }, { onAction, step }) => createDecisionComponent({
7385
+ var decisionLayoutToComponent = (uid, { control, margin = "md", options, title }, mapperProps) => createDecisionComponent({
7304
7386
  uid,
7305
7387
  control,
7306
7388
  margin,
7307
- options: options.map((_a) => {
7308
- var _b = _a, { action: optionAction } = _b, rest = __objRest(_b, ["action"]);
7309
- const action = inlineAction(optionAction, step == null ? void 0 : step.actions);
7310
- return __spreadProps(__spreadValues({}, rest), {
7311
- onClick: () => {
7312
- void onAction(action);
7313
- }
7389
+ options: options.map((option) => {
7390
+ return __spreadProps(__spreadValues({}, option), {
7391
+ href: getHref(option),
7392
+ onClick: getOnClick(option, mapperProps)
7314
7393
  });
7315
7394
  }),
7316
7395
  title
7317
7396
  });
7397
+ var getHref = (option) => {
7398
+ const { behavior } = option;
7399
+ if (behavior && "type" in behavior && behavior.type === "link") {
7400
+ return behavior.url;
7401
+ }
7402
+ return void 0;
7403
+ };
7404
+ var getOnClick = (option, { step, onAction, onLink }) => {
7405
+ const { behavior } = option;
7406
+ if (!behavior) {
7407
+ const action = inlineAction(option.action, step == null ? void 0 : step.actions);
7408
+ return () => {
7409
+ void onAction(action);
7410
+ };
7411
+ }
7412
+ if ("type" in behavior) {
7413
+ switch (behavior.type) {
7414
+ case "action": {
7415
+ const action = inlineAction(behavior.action, step == null ? void 0 : step.actions);
7416
+ return () => {
7417
+ void onAction(action);
7418
+ };
7419
+ }
7420
+ case "link": {
7421
+ return () => {
7422
+ void onLink(behavior.url);
7423
+ };
7424
+ }
7425
+ }
7426
+ }
7427
+ return () => {
7428
+ };
7429
+ };
7318
7430
 
7319
7431
  // src/revamp/domain/components/DividerComponent.ts
7320
7432
  var createDividerComponent = (props) => __spreadProps(__spreadValues({
@@ -10107,13 +10219,12 @@ var createImageComponent = (imageProps) => __spreadProps(__spreadValues({
10107
10219
  });
10108
10220
 
10109
10221
  // src/revamp/domain/mappers/layout/imageLayoutToComponent.ts
10110
- var imageLayoutToComponent = (uid, { accessibilityDescription, control, margin = "md", size: size2 = "md", text, url }) => createImageComponent({
10222
+ var imageLayoutToComponent = (uid, { accessibilityDescription, content, control, margin = "md", size: size2 = "md", text, url }) => createImageComponent({
10111
10223
  uid,
10112
- accessibilityDescription: accessibilityDescription != null ? accessibilityDescription : text,
10224
+ content: content != null ? content : { accessibilityDescription: accessibilityDescription != null ? accessibilityDescription : text, url },
10113
10225
  control,
10114
10226
  margin,
10115
- size: size2,
10116
- url
10227
+ size: size2
10117
10228
  });
10118
10229
 
10119
10230
  // src/revamp/domain/components/MarkdownComponent.ts
@@ -10593,14 +10704,14 @@ var getItemCallToAction = (callToAction, onAction, onLink) => {
10593
10704
  };
10594
10705
  };
10595
10706
 
10596
- // src/revamp/domain/mappers/layout/listLayoutToComponent.ts
10597
- var listLayoutToComponent = (uid, { control, items, margin = "md", title }) => createStatusListComponent({
10707
+ // src/revamp/domain/mappers/layout/deprecatedListLayoutToComponent.ts
10708
+ var deprecatedListLayoutToComponent = (uid, { control, items, margin = "md", title }) => createStatusListComponent({
10598
10709
  uid,
10599
10710
  control,
10600
10711
  items: items.map(({ description, icon, status, title: itemTitle }) => ({
10601
10712
  description,
10602
- icon,
10603
- title: itemTitle,
10713
+ icon: icon != null ? icon : { text: "" },
10714
+ title: itemTitle != null ? itemTitle : "",
10604
10715
  status: status ? mapLegacyStatus(status) : void 0
10605
10716
  })),
10606
10717
  margin,
@@ -10618,6 +10729,68 @@ var mapLegacyStatus = (status) => {
10618
10729
  }
10619
10730
  };
10620
10731
 
10732
+ // src/revamp/domain/components/ListComponent.ts
10733
+ var createListComponent = (listProps) => __spreadProps(__spreadValues({
10734
+ type: "list"
10735
+ }, listProps), {
10736
+ getLocalValue: () => null,
10737
+ getSubmittableValue: async () => null,
10738
+ getSubmittableValueSync: () => null,
10739
+ getSummary: () => ({}),
10740
+ // noop
10741
+ validate: () => true
10742
+ });
10743
+
10744
+ // src/revamp/domain/mappers/layout/listLayoutToComponent.ts
10745
+ var listLayoutToComponent = (uid, { callToAction, control, items, margin = "md", title }, mapperProps) => createListComponent({
10746
+ uid,
10747
+ control,
10748
+ items: items.map(({ value, subvalue, title: itemTitle, subtitle, icon, image }) => ({
10749
+ title: itemTitle,
10750
+ subtitle,
10751
+ value,
10752
+ subvalue,
10753
+ icon,
10754
+ image
10755
+ })),
10756
+ callToAction: getListCallToAction(callToAction, mapperProps),
10757
+ margin,
10758
+ title
10759
+ });
10760
+ var getListCallToAction = (callToAction, { onAction, onLink }) => {
10761
+ if (!callToAction) {
10762
+ return void 0;
10763
+ }
10764
+ const { accessibilityDescription, behavior, title } = callToAction;
10765
+ if ("type" in behavior) {
10766
+ switch (behavior.type) {
10767
+ case "action": {
10768
+ const { action } = behavior;
10769
+ return {
10770
+ type: "action",
10771
+ accessibilityDescription,
10772
+ title,
10773
+ onClick: () => {
10774
+ void onAction(action);
10775
+ }
10776
+ };
10777
+ }
10778
+ case "link": {
10779
+ return {
10780
+ type: "link",
10781
+ accessibilityDescription,
10782
+ href: behavior.url,
10783
+ title,
10784
+ onClick: () => {
10785
+ void onLink(behavior.url);
10786
+ }
10787
+ };
10788
+ }
10789
+ }
10790
+ }
10791
+ return void 0;
10792
+ };
10793
+
10621
10794
  // src/revamp/domain/mappers/mapLayoutToComponent.ts
10622
10795
  var mapLayoutToComponent = (uid, layout, mapperProps) => {
10623
10796
  switch (layout.type) {
@@ -10644,7 +10817,10 @@ var mapLayoutToComponent = (uid, layout, mapperProps) => {
10644
10817
  case "instructions":
10645
10818
  return instructionsLayoutToComponent(uid, layout);
10646
10819
  case "list":
10647
- return listLayoutToComponent(uid, layout);
10820
+ if (layout.items.some((item) => item.status || item.description)) {
10821
+ return deprecatedListLayoutToComponent(uid, layout);
10822
+ }
10823
+ return listLayoutToComponent(uid, layout, mapperProps);
10648
10824
  case "loading-indicator":
10649
10825
  return loadingIndicatorLayoutToComponent(uid, layout);
10650
10826
  case "markdown":
@@ -11977,9 +12153,14 @@ function NavigationOptionMedia({ icon, image }) {
11977
12153
  return /* @__PURE__ */ jsx21(Avatar, { type: AvatarType.INITIALS, children: icon.text });
11978
12154
  }
11979
12155
  }
11980
- if (image == null ? void 0 : image.url) {
11981
- const { url, accessibilityDescription } = image;
11982
- return /* @__PURE__ */ jsx21("img", { src: url, alt: accessibilityDescription });
12156
+ if (image) {
12157
+ const { accessibilityDescription, uri, url } = image;
12158
+ if (uri && !uri.startsWith("urn:")) {
12159
+ return /* @__PURE__ */ jsx21("img", { src: uri, alt: accessibilityDescription });
12160
+ }
12161
+ if (url) {
12162
+ return /* @__PURE__ */ jsx21("img", { src: url, alt: accessibilityDescription });
12163
+ }
11983
12164
  }
11984
12165
  return null;
11985
12166
  }
@@ -11995,10 +12176,10 @@ function DecisionRendererComponent({ margin, options, title }) {
11995
12176
  const { isLoading } = useLoadingContext();
11996
12177
  return /* @__PURE__ */ jsxs5("div", { className: getMargin(margin), children: [
11997
12178
  title && /* @__PURE__ */ jsx22(Header, { as: "h2", title }),
11998
- /* @__PURE__ */ jsx22(NavigationOptionsList, { children: options.map(({ description, disabled, icon, image, title: title2, onClick }) => /* @__PURE__ */ jsx22(
12179
+ /* @__PURE__ */ jsx22(NavigationOptionsList, { children: options.map(({ description, disabled, icon, image, title: itemTitle, onClick }) => /* @__PURE__ */ jsx22(
11999
12180
  NavigationOption,
12000
12181
  {
12001
- title: title2,
12182
+ title: itemTitle,
12002
12183
  content: description,
12003
12184
  disabled: isLoading || disabled,
12004
12185
  media: /* @__PURE__ */ jsx22(NavigationOptionMedia, { icon, image }),
@@ -12006,7 +12187,7 @@ function DecisionRendererComponent({ margin, options, title }) {
12006
12187
  showMediaAtAllSizes: true,
12007
12188
  onClick
12008
12189
  },
12009
- JSON.stringify(title2)
12190
+ JSON.stringify(itemTitle)
12010
12191
  )) })
12011
12192
  ] });
12012
12193
  }
@@ -12114,13 +12295,21 @@ function ImageRendererComponent({
12114
12295
  accessibilityDescription,
12115
12296
  margin,
12116
12297
  size: size2,
12298
+ uri,
12117
12299
  url
12118
12300
  }) {
12119
12301
  const [imageSource, setImageSource] = useState3("");
12120
12302
  const httpClient = useRendererHttpClient();
12121
12303
  useEffect3(() => {
12122
- void getImageSource(httpClient, url).then(setImageSource);
12123
- }, [url, httpClient]);
12304
+ if (!uri) {
12305
+ void getImageSource(httpClient, url).then(setImageSource);
12306
+ return;
12307
+ }
12308
+ if (!uri.startsWith("urn:")) {
12309
+ void getImageSource(httpClient, uri).then(setImageSource);
12310
+ return;
12311
+ }
12312
+ }, [uri, url, httpClient]);
12124
12313
  return /* @__PURE__ */ jsx27("div", { className: `df-image ${size2 || "md"}`, children: /* @__PURE__ */ jsx27(
12125
12314
  Image,
12126
12315
  {
@@ -13823,6 +14012,72 @@ function StepRendererComponent(props) {
13823
14012
  ] });
13824
14013
  }
13825
14014
 
14015
+ // ../renderers/src/ListRenderer.tsx
14016
+ var import_classnames6 = __toESM(require_classnames());
14017
+ import { Body, Header as Header7 } from "@transferwise/components";
14018
+ import { jsx as jsx58, jsxs as jsxs23 } from "react/jsx-runtime";
14019
+ var ListRenderer = {
14020
+ canRenderType: "list",
14021
+ render: ({ callToAction, margin, items, title }) => /* @__PURE__ */ jsxs23("div", { className: getMargin(margin), children: [
14022
+ title && /* @__PURE__ */ jsx58(Header7, { as: "h2", title, action: getListAction(callToAction) }),
14023
+ items.map((props) => /* @__PURE__ */ jsx58(DesignSystemListItem, __spreadValues({}, props), props.title))
14024
+ ] })
14025
+ };
14026
+ var DesignSystemListItem = ({ title, subtitle, value, subvalue, icon, image }) => /* @__PURE__ */ jsx58(
14027
+ "label",
14028
+ {
14029
+ className: (0, import_classnames6.default)("np-option p-a-2", {
14030
+ "np-option__sm-media": true,
14031
+ "np-option__container-aligned": true
14032
+ }),
14033
+ children: /* @__PURE__ */ jsxs23("div", { className: "media", children: [
14034
+ icon || image ? /* @__PURE__ */ jsx58("div", { className: "media-left", children: /* @__PURE__ */ jsx58(ListItemMedia, { image, icon }) }) : null,
14035
+ /* @__PURE__ */ jsxs23("div", { className: "media-body", children: [
14036
+ /* @__PURE__ */ jsxs23("div", { className: "d-flex justify-content-between", children: [
14037
+ /* @__PURE__ */ jsx58("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: title }),
14038
+ /* @__PURE__ */ jsx58("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: value })
14039
+ ] }),
14040
+ /* @__PURE__ */ jsxs23("div", { className: "d-flex justify-content-between", children: [
14041
+ /* @__PURE__ */ jsx58(Body, { className: "d-block np-option__body", children: subtitle }),
14042
+ /* @__PURE__ */ jsx58(Body, { className: "d-block np-option__body", children: subvalue })
14043
+ ] })
14044
+ ] })
14045
+ ] })
14046
+ },
14047
+ title
14048
+ );
14049
+ var ListItemMedia = ({ icon, image }) => {
14050
+ if (icon) {
14051
+ return /* @__PURE__ */ jsx58("div", { className: "circle circle-sm text-primary", children: /* @__PURE__ */ jsx58(NavigationOptionMedia, { icon, image }) });
14052
+ }
14053
+ if (image) {
14054
+ return /* @__PURE__ */ jsx58("div", { className: "np-option__no-media-circle", children: /* @__PURE__ */ jsx58(NavigationOptionMedia, { icon, image }) });
14055
+ }
14056
+ };
14057
+ var getListAction = (callToAction) => {
14058
+ if (!callToAction) {
14059
+ return void 0;
14060
+ }
14061
+ const { accessibilityDescription, title, onClick } = callToAction;
14062
+ if (callToAction.type === "action") {
14063
+ return {
14064
+ "aria-label": accessibilityDescription,
14065
+ text: title,
14066
+ onClick: (event) => {
14067
+ event.preventDefault();
14068
+ onClick();
14069
+ }
14070
+ };
14071
+ }
14072
+ return {
14073
+ "aria-label": accessibilityDescription,
14074
+ href: callToAction.href,
14075
+ target: "_blank",
14076
+ text: title
14077
+ };
14078
+ };
14079
+ var ListRenderer_default = ListRenderer;
14080
+
13826
14081
  // ../renderers/src/getWiseRenderers.ts
13827
14082
  var getWiseRenderers = () => [
13828
14083
  AlertRenderer_default,
@@ -13840,6 +14095,7 @@ var getWiseRenderers = () => [
13840
14095
  InstructionsRenderer_default,
13841
14096
  IntegerInputRenderer_default,
13842
14097
  LargeUploadRenderer,
14098
+ ListRenderer_default,
13843
14099
  LoadingIndicatorRenderer_default,
13844
14100
  MarkdownRenderer_default,
13845
14101
  ModalRenderer_default,
@@ -13869,12 +14125,12 @@ var openLinkInNewTab = (url) => {
13869
14125
  };
13870
14126
 
13871
14127
  // src/revamp/DynamicFlowWise.tsx
13872
- import { jsx as jsx58 } from "react/jsx-runtime";
14128
+ import { jsx as jsx59 } from "react/jsx-runtime";
13873
14129
  var wiseRenderers = getWiseRenderers();
13874
14130
  function DynamicFlowWise(props) {
13875
14131
  const { httpClient, renderers, onLink = openLinkInNewTab } = props;
13876
14132
  const mergedRenderers = useMemo4(() => [...renderers != null ? renderers : [], ...wiseRenderers], [renderers]);
13877
- return /* @__PURE__ */ jsx58(RendererHttpClientProvider, { httpClient, children: /* @__PURE__ */ jsx58(DynamicFlowCore, __spreadProps(__spreadValues({}, props), { renderers: mergedRenderers, onLink })) });
14133
+ return /* @__PURE__ */ jsx59(RendererHttpClientProvider, { httpClient, children: /* @__PURE__ */ jsx59(DynamicFlowCore, __spreadProps(__spreadValues({}, props), { renderers: mergedRenderers, onLink })) });
13878
14134
  }
13879
14135
  var DynamicFlowWise_default = DynamicFlowWise;
13880
14136
 
@@ -13883,14 +14139,14 @@ import { forwardRef as forwardRef2, useImperativeHandle, useMemo as useMemo6 } f
13883
14139
 
13884
14140
  // src/common/httpClientContext/HttpClientContext.tsx
13885
14141
  import { createContext as createContext3, useContext as useContext4, useMemo as useMemo5 } from "react";
13886
- import { jsx as jsx59 } from "react/jsx-runtime";
14142
+ import { jsx as jsx60 } from "react/jsx-runtime";
13887
14143
  var HttpClientContext2 = createContext3(void 0);
13888
14144
  function HttpClientProvider({ httpClient, children }) {
13889
- return /* @__PURE__ */ jsx59(HttpClientContext2.Provider, { value: httpClient, children });
14145
+ return /* @__PURE__ */ jsx60(HttpClientContext2.Provider, { value: httpClient, children });
13890
14146
  }
13891
14147
  function HttpClientProviderFromBaseUrl({ baseUrl, children }) {
13892
14148
  const httpClient = useMemo5(() => makeHttpClient(baseUrl), [baseUrl]);
13893
- return /* @__PURE__ */ jsx59(HttpClientContext2.Provider, { value: httpClient, children });
14149
+ return /* @__PURE__ */ jsx60(HttpClientContext2.Provider, { value: httpClient, children });
13894
14150
  }
13895
14151
  var useHttpClient = () => {
13896
14152
  const contextFetch = useContext4(HttpClientContext2);
@@ -13902,7 +14158,7 @@ var useHasHttpClientProvider = () => {
13902
14158
  };
13903
14159
 
13904
14160
  // src/revamp/DynamicFragmentWise.tsx
13905
- import { jsx as jsx60 } from "react/jsx-runtime";
14161
+ import { jsx as jsx61 } from "react/jsx-runtime";
13906
14162
  var wiseRenderers2 = getWiseRenderers();
13907
14163
  var DynamicFragmentWise = forwardRef2(function DynamicFragmentWise2(props, ref) {
13908
14164
  const {
@@ -13935,14 +14191,14 @@ var DynamicFragmentWise = forwardRef2(function DynamicFragmentWise2(props, ref)
13935
14191
  () => getRenderFunction([CoreContainerRenderer, ...mergedRenderers, StepRenderer]),
13936
14192
  [mergedRenderers]
13937
14193
  );
13938
- return /* @__PURE__ */ jsx60(
14194
+ return /* @__PURE__ */ jsx61(
13939
14195
  ErrorBoundary_default,
13940
14196
  {
13941
14197
  onError: (error) => {
13942
14198
  onEvent == null ? void 0 : onEvent("Dynamic Flow - Failed");
13943
14199
  onError(error);
13944
14200
  },
13945
- children: /* @__PURE__ */ jsx60(HttpClientProvider, { httpClient, children: stepComponentRef.current ? render(stepComponentRef.current) : null })
14201
+ children: /* @__PURE__ */ jsx61(HttpClientProvider, { httpClient, children: stepComponentRef.current ? render(stepComponentRef.current) : null })
13946
14202
  }
13947
14203
  );
13948
14204
  });
@@ -13950,7 +14206,7 @@ var DynamicFragmentWise_default = DynamicFragmentWise;
13950
14206
 
13951
14207
  // src/revamp/DynamicFragmentCore.tsx
13952
14208
  import { forwardRef as forwardRef3, useImperativeHandle as useImperativeHandle2, useMemo as useMemo7 } from "react";
13953
- import { jsx as jsx61 } from "react/jsx-runtime";
14209
+ import { jsx as jsx62 } from "react/jsx-runtime";
13954
14210
  var DynamicFragmentCore = forwardRef3(function DynamicFragmentCore2(props, ref) {
13955
14211
  const { onCompletion = () => {
13956
14212
  }, onEvent, onError, onLink = openLinkInNewTab, renderers } = props;
@@ -13974,7 +14230,7 @@ var DynamicFragmentCore = forwardRef3(function DynamicFragmentCore2(props, ref)
13974
14230
  () => getRenderFunction([CoreContainerRenderer, ...renderers]),
13975
14231
  [renderers]
13976
14232
  );
13977
- return /* @__PURE__ */ jsx61(
14233
+ return /* @__PURE__ */ jsx62(
13978
14234
  ErrorBoundary_default,
13979
14235
  {
13980
14236
  onError: (error) => {
@@ -14315,7 +14571,7 @@ var noop2 = () => {
14315
14571
  };
14316
14572
 
14317
14573
  // src/legacy/common/contexts/dynamicFlowContexts/DynamicFlowContexts.tsx
14318
- import { jsx as jsx62 } from "react/jsx-runtime";
14574
+ import { jsx as jsx63 } from "react/jsx-runtime";
14319
14575
  var defaultContextValue = {
14320
14576
  loading: false,
14321
14577
  registerPersistAsyncPromise: (promise) => {
@@ -14330,7 +14586,7 @@ var DynamicFlowProvider = ({ loading, children }) => {
14330
14586
  registerPersistAsyncPromise: addPendingPromise
14331
14587
  };
14332
14588
  }, [loading, pendingPromises, addPendingPromise]);
14333
- return /* @__PURE__ */ jsx62(DFContext.Provider, { value: providerValue, children });
14589
+ return /* @__PURE__ */ jsx63(DFContext.Provider, { value: providerValue, children });
14334
14590
  };
14335
14591
  var useDynamicFlow = () => {
14336
14592
  const context = useContext5(DFContext);
@@ -14339,7 +14595,7 @@ var useDynamicFlow = () => {
14339
14595
 
14340
14596
  // src/legacy/common/contexts/eventsContext/EventsContext.tsx
14341
14597
  import { createContext as createContext5, useContext as useContext6, useMemo as useMemo9 } from "react";
14342
- import { jsx as jsx63 } from "react/jsx-runtime";
14598
+ import { jsx as jsx64 } from "react/jsx-runtime";
14343
14599
  var EventsContext = createContext5({
14344
14600
  triggerEvent: () => {
14345
14601
  }
@@ -14349,7 +14605,7 @@ function EventsContextProvider({ metadata, children, onEvent }) {
14349
14605
  () => ({ triggerEvent: getEventDispatcher(onEvent, metadata) }),
14350
14606
  [onEvent, metadata]
14351
14607
  );
14352
- return /* @__PURE__ */ jsx63(EventsContext.Provider, { value, children });
14608
+ return /* @__PURE__ */ jsx64(EventsContext.Provider, { value, children });
14353
14609
  }
14354
14610
  function useEventDispatcher() {
14355
14611
  const { triggerEvent } = useContext6(EventsContext);
@@ -14364,7 +14620,7 @@ var getEventDispatcher = (onEvent, metadata) => (eventName, properties = {}) =>
14364
14620
 
14365
14621
  // src/legacy/common/contexts/logContext/LogContext.tsx
14366
14622
  import { createContext as createContext6, useContext as useContext7, useMemo as useMemo10 } from "react";
14367
- import { jsx as jsx64 } from "react/jsx-runtime";
14623
+ import { jsx as jsx65 } from "react/jsx-runtime";
14368
14624
  var getLogger = (level, onLog, flowId = "UNKNOWN-FLOW-ID", stepId = "UNKNOWN-FLOW-ID") => (title, description, extra) => {
14369
14625
  try {
14370
14626
  onLog(level, `Dynamic Flow ${level} - ${title} - ${description}`, __spreadValues({
@@ -14386,7 +14642,7 @@ function LogProvider({ flowId, stepId, children, onLog }) {
14386
14642
  }),
14387
14643
  [onLog, flowId, stepId]
14388
14644
  );
14389
- return /* @__PURE__ */ jsx64(LogContext.Provider, { value, children });
14645
+ return /* @__PURE__ */ jsx65(LogContext.Provider, { value, children });
14390
14646
  }
14391
14647
  var useLogger = () => {
14392
14648
  const logging = useContext7(LogContext);
@@ -14400,10 +14656,10 @@ var useLogger = () => {
14400
14656
 
14401
14657
  // src/legacy/common/contexts/featureContext/FeatureContext.tsx
14402
14658
  import { createContext as createContext7, useContext as useContext8 } from "react";
14403
- import { jsx as jsx65 } from "react/jsx-runtime";
14659
+ import { jsx as jsx66 } from "react/jsx-runtime";
14404
14660
  var FeatureContext = createContext7([]);
14405
14661
  function FeatureContextProvider({ features, children }) {
14406
- return /* @__PURE__ */ jsx65(FeatureContext.Provider, { value: features, children });
14662
+ return /* @__PURE__ */ jsx66(FeatureContext.Provider, { value: features, children });
14407
14663
  }
14408
14664
 
14409
14665
  // src/common/cameraCapture/utils/mobile-utils.ts
@@ -15262,7 +15518,7 @@ var Size = {
15262
15518
  };
15263
15519
 
15264
15520
  // src/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.tsx
15265
- var import_classnames15 = __toESM(require_classnames());
15521
+ var import_classnames16 = __toESM(require_classnames());
15266
15522
  import { useEffect as useEffect17, useMemo as useMemo19, useState as useState26 } from "react";
15267
15523
 
15268
15524
  // src/legacy/layout/alert/DynamicAlert.tsx
@@ -15272,19 +15528,19 @@ import { Alert as Alert4 } from "@transferwise/components";
15272
15528
  import { Avatar as Avatar5, AvatarType as AvatarType4 } from "@transferwise/components";
15273
15529
 
15274
15530
  // src/legacy/layout/icon/FlagIcon.tsx
15275
- import { jsx as jsx66 } from "react/jsx-runtime";
15531
+ import { jsx as jsx67 } from "react/jsx-runtime";
15276
15532
  var isFlagIcon3 = (name) => name.startsWith("flag-");
15277
15533
  function FlagIcon2({ name }) {
15278
15534
  if (!isFlagIcon3(name)) {
15279
15535
  return null;
15280
15536
  }
15281
15537
  const code = name.substring(5);
15282
- return /* @__PURE__ */ jsx66(Flag, { intrinsicSize: 24, code });
15538
+ return /* @__PURE__ */ jsx67(Flag, { intrinsicSize: 24, code });
15283
15539
  }
15284
15540
 
15285
15541
  // src/legacy/layout/icon/NamedIcon.tsx
15286
15542
  import * as icons2 from "@transferwise/icons";
15287
- import { jsx as jsx67 } from "react/jsx-runtime";
15543
+ import { jsx as jsx68 } from "react/jsx-runtime";
15288
15544
  var isNamedIcon3 = (name) => {
15289
15545
  const iconName = toCapitalisedCamelCase2(name);
15290
15546
  return Object.keys(icons2).includes(iconName);
@@ -15295,19 +15551,19 @@ function NamedIcon2({ name }) {
15295
15551
  }
15296
15552
  const iconName = toCapitalisedCamelCase2(name);
15297
15553
  const Icon = icons2[iconName];
15298
- return /* @__PURE__ */ jsx67(Icon, { size: 24 });
15554
+ return /* @__PURE__ */ jsx68(Icon, { size: 24 });
15299
15555
  }
15300
15556
  var toCapitalisedCamelCase2 = (value) => value.split("-").map(capitaliseFirstChar2).join("");
15301
15557
  var capitaliseFirstChar2 = (value) => `${value[0].toUpperCase()}${value.slice(1)}`;
15302
15558
 
15303
15559
  // src/legacy/layout/icon/DynamicIcon.tsx
15304
- import { jsx as jsx68 } from "react/jsx-runtime";
15560
+ import { jsx as jsx69 } from "react/jsx-runtime";
15305
15561
  function DynamicIcon2({ type }) {
15306
15562
  if (isFlagIcon3(type)) {
15307
- return /* @__PURE__ */ jsx68(FlagIcon2, { name: type });
15563
+ return /* @__PURE__ */ jsx69(FlagIcon2, { name: type });
15308
15564
  }
15309
15565
  if (isNamedIcon3(type)) {
15310
- return /* @__PURE__ */ jsx68(NamedIcon2, { name: type });
15566
+ return /* @__PURE__ */ jsx69(NamedIcon2, { name: type });
15311
15567
  }
15312
15568
  return null;
15313
15569
  }
@@ -15317,17 +15573,17 @@ function isValidIconName(name) {
15317
15573
  var DynamicIcon_default2 = DynamicIcon2;
15318
15574
 
15319
15575
  // src/legacy/layout/utils/getNavigationOptionMedia.tsx
15320
- import { jsx as jsx69 } from "react/jsx-runtime";
15576
+ import { jsx as jsx70 } from "react/jsx-runtime";
15321
15577
  var getNavigationOptionMedia = ({ icon, image }) => {
15322
15578
  if (icon == null ? void 0 : icon.name) {
15323
- return /* @__PURE__ */ jsx69(Avatar5, { type: AvatarType4.ICON, children: /* @__PURE__ */ jsx69(DynamicIcon_default2, { type: icon.name }) });
15579
+ return /* @__PURE__ */ jsx70(Avatar5, { type: AvatarType4.ICON, children: /* @__PURE__ */ jsx70(DynamicIcon_default2, { type: icon.name }) });
15324
15580
  }
15325
15581
  if (icon == null ? void 0 : icon.text) {
15326
- return /* @__PURE__ */ jsx69(Avatar5, { type: AvatarType4.INITIALS, children: icon.text });
15582
+ return /* @__PURE__ */ jsx70(Avatar5, { type: AvatarType4.INITIALS, children: icon.text });
15327
15583
  }
15328
15584
  if (image == null ? void 0 : image.url) {
15329
15585
  const { url, text } = image;
15330
- return /* @__PURE__ */ jsx69("img", { src: url, alt: text });
15586
+ return /* @__PURE__ */ jsx70("img", { src: url, alt: text });
15331
15587
  }
15332
15588
  return null;
15333
15589
  };
@@ -15363,10 +15619,10 @@ var getTextAlignment2 = (align) => {
15363
15619
  var getTextAlignmentAndMargin2 = (component) => `${getTextAlignment2(component.align)} ${getMargin2(component.margin)}`;
15364
15620
 
15365
15621
  // src/legacy/layout/alert/DynamicAlert.tsx
15366
- import { jsx as jsx70 } from "react/jsx-runtime";
15622
+ import { jsx as jsx71 } from "react/jsx-runtime";
15367
15623
  var DynamicAlert = ({ component: alert, onAction }) => {
15368
15624
  const { context, markdown, margin } = alert;
15369
- return /* @__PURE__ */ jsx70(
15625
+ return /* @__PURE__ */ jsx71(
15370
15626
  Alert4,
15371
15627
  {
15372
15628
  type: mapContextToAlertType(legacy_mapContext(context)),
@@ -15450,12 +15706,12 @@ var mapContextToAlertType = (context) => {
15450
15706
  var DynamicAlert_default = DynamicAlert;
15451
15707
 
15452
15708
  // src/legacy/layout/box/DynamicBox.tsx
15453
- import { jsx as jsx71 } from "react/jsx-runtime";
15709
+ import { jsx as jsx72 } from "react/jsx-runtime";
15454
15710
  var DynamicBox = (props) => {
15455
15711
  const box = props.component;
15456
15712
  const margin = getMargin2(box.margin || box.border ? "lg" : "xs");
15457
15713
  if (!box.width || box.width === "xl") {
15458
- return /* @__PURE__ */ jsx71("div", { className: margin + getBorderClass(box.border), children: /* @__PURE__ */ jsx71(
15714
+ return /* @__PURE__ */ jsx72("div", { className: margin + getBorderClass(box.border), children: /* @__PURE__ */ jsx72(
15459
15715
  DynamicLayout_default,
15460
15716
  {
15461
15717
  components: box.components,
@@ -15468,7 +15724,7 @@ var DynamicBox = (props) => {
15468
15724
  }
15469
15725
  ) });
15470
15726
  }
15471
- return /* @__PURE__ */ jsx71("div", { className: "row", children: /* @__PURE__ */ jsx71("div", { className: margin + getBoxWidthClasses(box), children: /* @__PURE__ */ jsx71("div", { className: getBorderClass(box.border), children: /* @__PURE__ */ jsx71(
15727
+ return /* @__PURE__ */ jsx72("div", { className: "row", children: /* @__PURE__ */ jsx72("div", { className: margin + getBoxWidthClasses(box), children: /* @__PURE__ */ jsx72("div", { className: getBorderClass(box.border), children: /* @__PURE__ */ jsx72(
15472
15728
  DynamicLayout_default,
15473
15729
  {
15474
15730
  components: box.components,
@@ -15554,9 +15810,9 @@ var getButtonSize = (size2) => {
15554
15810
  };
15555
15811
 
15556
15812
  // src/legacy/layout/button/DynamicButton.tsx
15557
- import { jsx as jsx72 } from "react/jsx-runtime";
15813
+ import { jsx as jsx73 } from "react/jsx-runtime";
15558
15814
  function DynamicButton(props) {
15559
- return props.component.behavior ? /* @__PURE__ */ jsx72(DynamicButtonWithBehavior, __spreadValues({}, props)) : /* @__PURE__ */ jsx72(DynamicButtonWithoutBehavior, __spreadValues({}, props));
15815
+ return props.component.behavior ? /* @__PURE__ */ jsx73(DynamicButtonWithBehavior, __spreadValues({}, props)) : /* @__PURE__ */ jsx73(DynamicButtonWithoutBehavior, __spreadValues({}, props));
15560
15816
  }
15561
15817
  function DynamicButtonWithoutBehavior(props) {
15562
15818
  var _a, _b;
@@ -15573,7 +15829,7 @@ function DynamicButtonWithoutBehavior(props) {
15573
15829
  onAction(componentAction);
15574
15830
  }
15575
15831
  };
15576
- return /* @__PURE__ */ jsx72(
15832
+ return /* @__PURE__ */ jsx73(
15577
15833
  Button7,
15578
15834
  {
15579
15835
  size: getButtonSize(component.size),
@@ -15625,7 +15881,7 @@ function DynamicButtonWithBehavior(props) {
15625
15881
  }
15626
15882
  }
15627
15883
  };
15628
- return /* @__PURE__ */ jsx72(
15884
+ return /* @__PURE__ */ jsx73(
15629
15885
  Button7,
15630
15886
  {
15631
15887
  size: getButtonSize(component.size),
@@ -15642,12 +15898,12 @@ function DynamicButtonWithBehavior(props) {
15642
15898
  var DynamicButton_default = DynamicButton;
15643
15899
 
15644
15900
  // src/legacy/layout/columns/DynamicColumns.tsx
15645
- import { jsx as jsx73, jsxs as jsxs23 } from "react/jsx-runtime";
15901
+ import { jsx as jsx74, jsxs as jsxs24 } from "react/jsx-runtime";
15646
15902
  var DynamicColumns = (props) => {
15647
15903
  const columns = props.component;
15648
15904
  const { leftWidth, rightWidth } = getWidth(columns.bias);
15649
- return /* @__PURE__ */ jsxs23("div", { className: `${getMargin2(columns.margin || "xs")} row`, children: [
15650
- /* @__PURE__ */ jsx73("div", { className: `${leftWidth} m-b-0`, children: /* @__PURE__ */ jsx73(
15905
+ return /* @__PURE__ */ jsxs24("div", { className: `${getMargin2(columns.margin || "xs")} row`, children: [
15906
+ /* @__PURE__ */ jsx74("div", { className: `${leftWidth} m-b-0`, children: /* @__PURE__ */ jsx74(
15651
15907
  DynamicLayout_default,
15652
15908
  {
15653
15909
  components: columns.left,
@@ -15659,7 +15915,7 @@ var DynamicColumns = (props) => {
15659
15915
  onPersistAsync: props.onPersistAsync
15660
15916
  }
15661
15917
  ) }),
15662
- /* @__PURE__ */ jsx73("div", { className: `${rightWidth} m-b-0`, children: /* @__PURE__ */ jsx73(
15918
+ /* @__PURE__ */ jsx74("div", { className: `${rightWidth} m-b-0`, children: /* @__PURE__ */ jsx74(
15663
15919
  DynamicLayout_default,
15664
15920
  {
15665
15921
  components: columns.right,
@@ -15694,14 +15950,14 @@ var getWidth = (bias) => {
15694
15950
  var DynamicColumns_default = DynamicColumns;
15695
15951
 
15696
15952
  // src/legacy/layout/decision/DynamicDecision.tsx
15697
- import { Header as Header7, NavigationOption as NavigationOption4, NavigationOptionsList as NavigationOptionsList3 } from "@transferwise/components";
15698
- import { jsx as jsx74, jsxs as jsxs24 } from "react/jsx-runtime";
15953
+ import { Header as Header8, NavigationOption as NavigationOption4, NavigationOptionsList as NavigationOptionsList3 } from "@transferwise/components";
15954
+ import { jsx as jsx75, jsxs as jsxs25 } from "react/jsx-runtime";
15699
15955
  function DynamicDecision({ component, onAction }) {
15700
15956
  const { loading } = useDynamicFlow();
15701
15957
  const { margin, options, title } = component;
15702
- return /* @__PURE__ */ jsxs24("div", { className: getMargin2(margin), children: [
15703
- title && /* @__PURE__ */ jsx74(Header7, { as: "h2", title }),
15704
- /* @__PURE__ */ jsx74(NavigationOptionsList3, { children: options.map((option) => /* @__PURE__ */ jsx74(
15958
+ return /* @__PURE__ */ jsxs25("div", { className: getMargin2(margin), children: [
15959
+ title && /* @__PURE__ */ jsx75(Header8, { as: "h2", title }),
15960
+ /* @__PURE__ */ jsx75(NavigationOptionsList3, { children: options.map((option) => /* @__PURE__ */ jsx75(
15705
15961
  NavigationOption4,
15706
15962
  {
15707
15963
  title: option.title,
@@ -15719,11 +15975,11 @@ function DynamicDecision({ component, onAction }) {
15719
15975
  var DynamicDecision_default = DynamicDecision;
15720
15976
 
15721
15977
  // src/legacy/layout/divider/DynamicDivider.tsx
15722
- import { jsx as jsx75 } from "react/jsx-runtime";
15978
+ import { jsx as jsx76 } from "react/jsx-runtime";
15723
15979
  var DynamicDivider = ({ component }) => {
15724
15980
  const margin = getMargin2(component.margin);
15725
15981
  const className = `m-t-0 ${margin}`;
15726
- return /* @__PURE__ */ jsx75("hr", { className });
15982
+ return /* @__PURE__ */ jsx76("hr", { className });
15727
15983
  };
15728
15984
  var DynamicDivider_default = DynamicDivider;
15729
15985
 
@@ -15743,7 +15999,7 @@ var DynamicExternal_messages_default = defineMessages13({
15743
15999
  });
15744
16000
 
15745
16001
  // src/legacy/layout/external/DynamicExternal.tsx
15746
- import { Fragment as Fragment11, jsx as jsx76, jsxs as jsxs25 } from "react/jsx-runtime";
16002
+ import { Fragment as Fragment11, jsx as jsx77, jsxs as jsxs26 } from "react/jsx-runtime";
15747
16003
  var DynamicExternal = ({ component, onAction }) => {
15748
16004
  const { requestUrl, responseHandlers, polling, retryTitle } = component;
15749
16005
  const intl = useIntl11();
@@ -15760,10 +16016,10 @@ var DynamicExternal = ({ component, onAction }) => {
15760
16016
  }) : void 0;
15761
16017
  }, [polling, responseHandlers]);
15762
16018
  useExternalStepPolling(pollingConfiguration, onAction);
15763
- return /* @__PURE__ */ jsxs25(Fragment11, { children: [
15764
- /* @__PURE__ */ jsx76(Loader2, { size: Size2.LARGE, classNames: { "tw-loader": "tw-loader m-x-auto" } }),
15765
- /* @__PURE__ */ jsx76("br", {}),
15766
- /* @__PURE__ */ jsx76(Button8, { priority: "tertiary", block: true, onClick: openExternalUrl, children: retryTitle || intl.formatMessage(DynamicExternal_messages_default.retryTitle) })
16019
+ return /* @__PURE__ */ jsxs26(Fragment11, { children: [
16020
+ /* @__PURE__ */ jsx77(Loader2, { size: Size2.LARGE, classNames: { "tw-loader": "tw-loader m-x-auto" } }),
16021
+ /* @__PURE__ */ jsx77("br", {}),
16022
+ /* @__PURE__ */ jsx77(Button8, { priority: "tertiary", block: true, onClick: openExternalUrl, children: retryTitle || intl.formatMessage(DynamicExternal_messages_default.retryTitle) })
15767
16023
  ] });
15768
16024
  };
15769
16025
  var DynamicExternal_default = DynamicExternal;
@@ -15772,10 +16028,10 @@ var DynamicExternal_default = DynamicExternal;
15772
16028
  import { useEffect as useEffect15 } from "react";
15773
16029
 
15774
16030
  // src/legacy/jsonSchemaForm/allOfSchema/AllOfSchema.tsx
15775
- var import_classnames6 = __toESM(require_classnames());
15776
- import { Header as Header8 } from "@transferwise/components";
16031
+ var import_classnames7 = __toESM(require_classnames());
16032
+ import { Header as Header9 } from "@transferwise/components";
15777
16033
  import { useState as useState12 } from "react";
15778
- import { Fragment as Fragment12, jsx as jsx77, jsxs as jsxs26 } from "react/jsx-runtime";
16034
+ import { Fragment as Fragment12, jsx as jsx78, jsxs as jsxs27 } from "react/jsx-runtime";
15779
16035
  var splitModel = (model, schemas) => schemas.map((schema) => getValidObjectModelParts(model, schema) || {});
15780
16036
  var combineModels = (models) => models.reduce((current, combined) => __spreadValues(__spreadValues({}, combined), current), {});
15781
16037
  var getSchemaColumnClasses = (width) => ({
@@ -15792,12 +16048,12 @@ function AllOfSchema(props) {
15792
16048
  props.onChange(__spreadProps(__spreadValues({}, onChangeProps), { model: combineModels(models) }));
15793
16049
  };
15794
16050
  const [models, setModels] = useState12(splitModel(props.model, props.schema.allOf));
15795
- return /* @__PURE__ */ jsxs26(Fragment12, { children: [
15796
- props.schema.title && !hideTitle && /* @__PURE__ */ jsx77(Header8, { title: props.schema.title }),
15797
- props.schema.description && /* @__PURE__ */ jsx77("p", { children: props.schema.description }),
15798
- /* @__PURE__ */ jsx77("div", { className: "row", children: props.schema.allOf.map((schema, index) => (
16051
+ return /* @__PURE__ */ jsxs27(Fragment12, { children: [
16052
+ props.schema.title && !hideTitle && /* @__PURE__ */ jsx78(Header9, { title: props.schema.title }),
16053
+ props.schema.description && /* @__PURE__ */ jsx78("p", { children: props.schema.description }),
16054
+ /* @__PURE__ */ jsx78("div", { className: "row", children: props.schema.allOf.map((schema, index) => (
15799
16055
  // eslint-disable-next-line react/no-array-index-key
15800
- /* @__PURE__ */ jsx77("div", { className: (0, import_classnames6.default)(getSchemaColumnClasses(schema.width)), children: /* @__PURE__ */ jsx77(
16056
+ /* @__PURE__ */ jsx78("div", { className: (0, import_classnames7.default)(getSchemaColumnClasses(schema.width)), children: /* @__PURE__ */ jsx78(
15801
16057
  GenericSchema_default,
15802
16058
  {
15803
16059
  schema,
@@ -15818,7 +16074,7 @@ function AllOfSchema(props) {
15818
16074
  var AllOfSchema_default = AllOfSchema;
15819
16075
 
15820
16076
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.tsx
15821
- var import_classnames7 = __toESM(require_classnames());
16077
+ var import_classnames8 = __toESM(require_classnames());
15822
16078
  import {
15823
16079
  Status,
15824
16080
  UploadInput as UploadInput3
@@ -15829,7 +16085,7 @@ import { useMemo as useMemo13, useState as useState13 } from "react";
15829
16085
  import { InlineAlert as InlineAlert3 } from "@transferwise/components";
15830
16086
  import { formatDate as formatDate3 } from "@transferwise/formatting";
15831
16087
  import { useIntl as useIntl12 } from "react-intl";
15832
- import { jsx as jsx78, jsxs as jsxs27 } from "react/jsx-runtime";
16088
+ import { jsx as jsx79, jsxs as jsxs28 } from "react/jsx-runtime";
15833
16089
  function ControlFeedback(props) {
15834
16090
  const { errors = "", validations = [], validationMessages = {} } = props;
15835
16091
  const defaultValidationMessages = useDefaultValidationMessages(props.schema);
@@ -15838,12 +16094,12 @@ function ControlFeedback(props) {
15838
16094
  const isValidationVisible = !isErrorVisible && (props.submitted || props.changed && props.blurred) && Boolean(validations == null ? void 0 : validations.length);
15839
16095
  const isDescriptionVisible = props.schema.type !== "boolean" && props.schema.description && !isErrorVisible && !isValidationVisible;
15840
16096
  const hasInfoMessage = Boolean(props.infoMessage);
15841
- return /* @__PURE__ */ jsxs27("div", { id: props.id, children: [
15842
- isErrorVisible ? /* @__PURE__ */ jsx78(InlineAlert3, { type: "error", children: errors }) : null,
15843
- isValidationVisible ? /* @__PURE__ */ jsx78(InlineAlert3, { type: "error", children: validations.map((validation) => /* @__PURE__ */ jsx78("div", { children: mergedValidationMessages[validation] }, validation)) }) : null,
15844
- (isDescriptionVisible || hasInfoMessage) && /* @__PURE__ */ jsxs27(InlineAlert3, { type: "info", children: [
15845
- isDescriptionVisible && /* @__PURE__ */ jsx78("div", { children: props.schema.description }),
15846
- hasInfoMessage && /* @__PURE__ */ jsx78("div", { children: props.infoMessage })
16097
+ return /* @__PURE__ */ jsxs28("div", { id: props.id, children: [
16098
+ isErrorVisible ? /* @__PURE__ */ jsx79(InlineAlert3, { type: "error", children: errors }) : null,
16099
+ isValidationVisible ? /* @__PURE__ */ jsx79(InlineAlert3, { type: "error", children: validations.map((validation) => /* @__PURE__ */ jsx79("div", { children: mergedValidationMessages[validation] }, validation)) }) : null,
16100
+ (isDescriptionVisible || hasInfoMessage) && /* @__PURE__ */ jsxs28(InlineAlert3, { type: "info", children: [
16101
+ isDescriptionVisible && /* @__PURE__ */ jsx79("div", { children: props.schema.description }),
16102
+ hasInfoMessage && /* @__PURE__ */ jsx79("div", { children: props.infoMessage })
15847
16103
  ] })
15848
16104
  ] });
15849
16105
  }
@@ -15963,7 +16219,7 @@ function useFormattedDefaultErrorMessages({
15963
16219
  }
15964
16220
 
15965
16221
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.tsx
15966
- import { jsx as jsx79, jsxs as jsxs28 } from "react/jsx-runtime";
16222
+ import { jsx as jsx80, jsxs as jsxs29 } from "react/jsx-runtime";
15967
16223
  function MultipleFileUploadSchema(props) {
15968
16224
  var _a, _b;
15969
16225
  const { onChange, errors = null, schema, required = false } = props;
@@ -16024,10 +16280,10 @@ function MultipleFileUploadSchema(props) {
16024
16280
  onDeleteFile: () => Promise.resolve()
16025
16281
  });
16026
16282
  const feedbackId = `${uid}-feedback`;
16027
- return /* @__PURE__ */ jsxs28("div", { className: (0, import_classnames7.default)("form-group", { "has-error": showError }), children: [
16028
- /* @__PURE__ */ jsx79("label", { className: "d-block control-label", htmlFor: uid, children: props.schema.title }),
16029
- /* @__PURE__ */ jsx79("div", { "aria-describedby": feedbackId, children: /* @__PURE__ */ jsx79(UploadInput3, __spreadValues({}, uploadInputProps)) }),
16030
- /* @__PURE__ */ jsx79(
16283
+ return /* @__PURE__ */ jsxs29("div", { className: (0, import_classnames8.default)("form-group", { "has-error": showError }), children: [
16284
+ /* @__PURE__ */ jsx80("label", { className: "d-block control-label", htmlFor: uid, children: props.schema.title }),
16285
+ /* @__PURE__ */ jsx80("div", { "aria-describedby": feedbackId, children: /* @__PURE__ */ jsx80(UploadInput3, __spreadValues({}, uploadInputProps)) }),
16286
+ /* @__PURE__ */ jsx80(
16031
16287
  ControlFeedback_default,
16032
16288
  {
16033
16289
  id: feedbackId,
@@ -16060,14 +16316,14 @@ function getValidationMessages(schema, required, defaultErrorMessages) {
16060
16316
  }
16061
16317
 
16062
16318
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multiSelectSchema/MultiSelectSchema.tsx
16063
- var import_classnames8 = __toESM(require_classnames());
16319
+ var import_classnames9 = __toESM(require_classnames());
16064
16320
  import { SelectInput as SelectInput3, SelectInputOptionContent as SelectInputOptionContent3 } from "@transferwise/components";
16065
16321
  import { useEffect as useEffect9, useMemo as useMemo14, useState as useState14 } from "react";
16066
16322
  import { useIntl as useIntl14 } from "react-intl";
16067
16323
 
16068
16324
  // src/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.tsx
16069
16325
  import { Avatar as Avatar6, AvatarType as AvatarType5 } from "@transferwise/components";
16070
- import { jsx as jsx80 } from "react/jsx-runtime";
16326
+ import { jsx as jsx81 } from "react/jsx-runtime";
16071
16327
  var mapConstSchemaToOption = (schema, controlType) => {
16072
16328
  switch (controlType) {
16073
16329
  case "select":
@@ -16091,7 +16347,7 @@ var mapKeywordsToSearchStrings = (searchStrings) => isArray2(searchStrings) ? {
16091
16347
  var mapImage = (image) => {
16092
16348
  if (image == null ? void 0 : image.url) {
16093
16349
  return {
16094
- icon: /* @__PURE__ */ jsx80("div", { className: "media", children: /* @__PURE__ */ jsx80("div", { className: "np-option__no-media-circle", children: /* @__PURE__ */ jsx80("img", { src: image.url, alt: image.name || "" }) }) }),
16350
+ icon: /* @__PURE__ */ jsx81("div", { className: "media", children: /* @__PURE__ */ jsx81("div", { className: "np-option__no-media-circle", children: /* @__PURE__ */ jsx81("img", { src: image.url, alt: image.name || "" }) }) }),
16095
16351
  hideIconInTrigger: true
16096
16352
  };
16097
16353
  }
@@ -16100,17 +16356,17 @@ var mapImage = (image) => {
16100
16356
  var getIconPropertyForSelectOption = (icon) => {
16101
16357
  if ((icon == null ? void 0 : icon.name) && isFlagIcon3(icon.name)) {
16102
16358
  return {
16103
- icon: /* @__PURE__ */ jsx80(Flag, { code: icon.name.substring(5), intrinsicSize: 24 })
16359
+ icon: /* @__PURE__ */ jsx81(Flag, { code: icon.name.substring(5), intrinsicSize: 24 })
16104
16360
  };
16105
16361
  }
16106
16362
  if ((icon == null ? void 0 : icon.name) && isValidIconName(icon.name)) {
16107
16363
  return {
16108
- icon: /* @__PURE__ */ jsx80(DynamicIcon_default2, { type: icon.name })
16364
+ icon: /* @__PURE__ */ jsx81(DynamicIcon_default2, { type: icon.name })
16109
16365
  };
16110
16366
  }
16111
16367
  if (icon == null ? void 0 : icon.text) {
16112
16368
  return {
16113
- icon: /* @__PURE__ */ jsx80("span", { children: icon.text })
16369
+ icon: /* @__PURE__ */ jsx81("span", { children: icon.text })
16114
16370
  };
16115
16371
  }
16116
16372
  return null;
@@ -16118,17 +16374,17 @@ var getIconPropertyForSelectOption = (icon) => {
16118
16374
  var getAvatarPropertyForRadioOption = ({ image, icon }) => {
16119
16375
  if (image == null ? void 0 : image.url) {
16120
16376
  return {
16121
- avatar: /* @__PURE__ */ jsx80(Avatar6, { type: AvatarType5.THUMBNAIL, children: /* @__PURE__ */ jsx80("img", { src: image.url, alt: "" }) })
16377
+ avatar: /* @__PURE__ */ jsx81(Avatar6, { type: AvatarType5.THUMBNAIL, children: /* @__PURE__ */ jsx81("img", { src: image.url, alt: "" }) })
16122
16378
  };
16123
16379
  }
16124
16380
  if ((icon == null ? void 0 : icon.name) && isValidIconName(icon.name)) {
16125
16381
  return {
16126
- avatar: /* @__PURE__ */ jsx80(Avatar6, { type: AvatarType5.ICON, children: /* @__PURE__ */ jsx80(DynamicIcon_default2, { type: icon.name }) })
16382
+ avatar: /* @__PURE__ */ jsx81(Avatar6, { type: AvatarType5.ICON, children: /* @__PURE__ */ jsx81(DynamicIcon_default2, { type: icon.name }) })
16127
16383
  };
16128
16384
  }
16129
16385
  if (icon == null ? void 0 : icon.text) {
16130
16386
  return {
16131
- avatar: /* @__PURE__ */ jsx80(Avatar6, { type: AvatarType5.INITIALS, children: icon.text })
16387
+ avatar: /* @__PURE__ */ jsx81(Avatar6, { type: AvatarType5.INITIALS, children: icon.text })
16132
16388
  };
16133
16389
  }
16134
16390
  return null;
@@ -16167,7 +16423,7 @@ var multi_select_messages_default2 = defineMessages15({
16167
16423
  });
16168
16424
 
16169
16425
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multiSelectSchema/MultiSelectSchema.tsx
16170
- import { jsx as jsx81, jsxs as jsxs29 } from "react/jsx-runtime";
16426
+ import { jsx as jsx82, jsxs as jsxs30 } from "react/jsx-runtime";
16171
16427
  function MultiSelectSchema({
16172
16428
  schema,
16173
16429
  model,
@@ -16221,9 +16477,9 @@ function MultiSelectSchema({
16221
16477
  "has-error": shouldShowInitialError || shouldShowValidationError,
16222
16478
  "has-info": !!schema.description
16223
16479
  };
16224
- return /* @__PURE__ */ jsxs29("div", { className: (0, import_classnames8.default)("d-flex flex-column", formGroupClasses), children: [
16225
- schema.title ? /* @__PURE__ */ jsx81("label", { className: "control-label d-inline m-b-1", htmlFor: id, children: schema.title }) : void 0,
16226
- /* @__PURE__ */ jsx81(
16480
+ return /* @__PURE__ */ jsxs30("div", { className: (0, import_classnames9.default)("d-flex flex-column", formGroupClasses), children: [
16481
+ schema.title ? /* @__PURE__ */ jsx82("label", { className: "control-label d-inline m-b-1", htmlFor: id, children: schema.title }) : void 0,
16482
+ /* @__PURE__ */ jsx82(
16227
16483
  SelectInput3,
16228
16484
  {
16229
16485
  id,
@@ -16249,12 +16505,12 @@ function MultiSelectSchema({
16249
16505
  if (withinTrigger) {
16250
16506
  return selected && index === selected[0] ? getFormattedMessage() : void 0;
16251
16507
  }
16252
- return /* @__PURE__ */ jsx81(SelectInputOptionContent3, { title: label, note: note != null ? note : secondary, icon });
16508
+ return /* @__PURE__ */ jsx82(SelectInputOptionContent3, { title: label, note: note != null ? note : secondary, icon });
16253
16509
  },
16254
16510
  onChange: broadcastModelChange
16255
16511
  }
16256
16512
  ),
16257
- /* @__PURE__ */ jsx81(
16513
+ /* @__PURE__ */ jsx82(
16258
16514
  ControlFeedback_default,
16259
16515
  {
16260
16516
  id: `${id}-feedback`,
@@ -16279,16 +16535,16 @@ var getInitialModelIndices2 = (model, options) => {
16279
16535
  };
16280
16536
 
16281
16537
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.tsx
16282
- import { Header as Header9, Modal as Modal3, NavigationOption as NavigationOption6 } from "@transferwise/components";
16538
+ import { Header as Header10, Modal as Modal3, NavigationOption as NavigationOption6 } from "@transferwise/components";
16283
16539
  import { Plus as Plus2 } from "@transferwise/icons";
16284
16540
  import { useMemo as useMemo15, useState as useState16 } from "react";
16285
16541
  import { useIntl as useIntl16 } from "react-intl";
16286
16542
 
16287
16543
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/ItemSummary.tsx
16288
16544
  import { NavigationOption as NavigationOption5 } from "@transferwise/components";
16289
- import { jsx as jsx82 } from "react/jsx-runtime";
16545
+ import { jsx as jsx83 } from "react/jsx-runtime";
16290
16546
  function ItemSummaryOption2({ item, onClick }) {
16291
- return /* @__PURE__ */ jsx82(
16547
+ return /* @__PURE__ */ jsx83(
16292
16548
  NavigationOption5,
16293
16549
  {
16294
16550
  media: getNavigationOptionMedia(item),
@@ -16328,7 +16584,7 @@ var repeatable_messages_default2 = defineMessages16({
16328
16584
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchemaStep.tsx
16329
16585
  import { useState as useState15 } from "react";
16330
16586
  import { useIntl as useIntl15 } from "react-intl";
16331
- import { jsx as jsx83 } from "react/jsx-runtime";
16587
+ import { jsx as jsx84 } from "react/jsx-runtime";
16332
16588
  function RepeatableSchemaStep({
16333
16589
  type,
16334
16590
  schema,
@@ -16376,7 +16632,7 @@ function RepeatableSchemaStep({
16376
16632
  }
16377
16633
  onModelChange(__spreadProps(__spreadValues({}, modelChangeProps), { model: model2 }));
16378
16634
  };
16379
- return /* @__PURE__ */ jsx83(
16635
+ return /* @__PURE__ */ jsx84(
16380
16636
  DynamicFlowStep,
16381
16637
  {
16382
16638
  step,
@@ -16581,8 +16837,8 @@ var schemaSummaryProvides = (summary, providesProp) => (
16581
16837
  );
16582
16838
 
16583
16839
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.tsx
16584
- var import_classnames9 = __toESM(require_classnames());
16585
- import { jsx as jsx84, jsxs as jsxs30 } from "react/jsx-runtime";
16840
+ var import_classnames10 = __toESM(require_classnames());
16841
+ import { jsx as jsx85, jsxs as jsxs31 } from "react/jsx-runtime";
16586
16842
  function RepeatableSchema({
16587
16843
  schema,
16588
16844
  model,
@@ -16659,9 +16915,9 @@ function RepeatableSchema({
16659
16915
  const formGroupClasses = {
16660
16916
  "has-error": (_a = errors && !isEmpty(errors)) != null ? _a : submitted && validations.length
16661
16917
  };
16662
- return /* @__PURE__ */ jsxs30("div", { id, className: (0, import_classnames9.default)(formGroupClasses), children: [
16663
- schema.title && /* @__PURE__ */ jsx84(Header9, { title: schema.title }),
16664
- itemSummaries == null ? void 0 : itemSummaries.map((itemSummary) => /* @__PURE__ */ jsx84(
16918
+ return /* @__PURE__ */ jsxs31("div", { id, className: (0, import_classnames10.default)(formGroupClasses), children: [
16919
+ schema.title && /* @__PURE__ */ jsx85(Header10, { title: schema.title }),
16920
+ itemSummaries == null ? void 0 : itemSummaries.map((itemSummary) => /* @__PURE__ */ jsx85(
16665
16921
  ItemSummaryOption2,
16666
16922
  {
16667
16923
  item: itemSummary,
@@ -16669,21 +16925,21 @@ function RepeatableSchema({
16669
16925
  },
16670
16926
  JSON.stringify(itemSummary)
16671
16927
  )),
16672
- /* @__PURE__ */ jsx84(
16928
+ /* @__PURE__ */ jsx85(
16673
16929
  NavigationOption6,
16674
16930
  {
16675
- media: /* @__PURE__ */ jsx84(Plus2, {}),
16931
+ media: /* @__PURE__ */ jsx85(Plus2, {}),
16676
16932
  title: schema.addItemTitle || formatMessage(repeatable_messages_default2.addItemTitle),
16677
16933
  showMediaAtAllSizes: true,
16678
16934
  onClick: onAddItem
16679
16935
  }
16680
16936
  ),
16681
- /* @__PURE__ */ jsx84(
16937
+ /* @__PURE__ */ jsx85(
16682
16938
  Modal3,
16683
16939
  {
16684
16940
  open: openModalType !== null,
16685
16941
  title: (openModalType === "add" ? schema.addItemTitle : schema.editItemTitle) || formatMessage(repeatable_messages_default2.addItemTitle),
16686
- body: /* @__PURE__ */ jsx84(
16942
+ body: /* @__PURE__ */ jsx85(
16687
16943
  RepeatableSchemaStep_default,
16688
16944
  {
16689
16945
  type: openModalType != null ? openModalType : "add",
@@ -16698,7 +16954,7 @@ function RepeatableSchema({
16698
16954
  onClose: onCancelEdit
16699
16955
  }
16700
16956
  ),
16701
- /* @__PURE__ */ jsx84(
16957
+ /* @__PURE__ */ jsx85(
16702
16958
  ControlFeedback_default,
16703
16959
  {
16704
16960
  id: `${id}-feedback`,
@@ -16740,38 +16996,38 @@ var getUpdatedItemSummaries = (action, {
16740
16996
  var RepeatableSchema_default = RepeatableSchema;
16741
16997
 
16742
16998
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/ArrayListSchema.tsx
16743
- import { jsx as jsx85 } from "react/jsx-runtime";
16999
+ import { jsx as jsx86 } from "react/jsx-runtime";
16744
17000
  function ArrayListSchema(props) {
16745
17001
  const { errors = null, schema } = props;
16746
17002
  if (isMultipleFileUploadSchema(schema)) {
16747
- return /* @__PURE__ */ jsx85(MultipleFileUploadSchema_default, __spreadProps(__spreadValues({}, props), { errors, schema }));
17003
+ return /* @__PURE__ */ jsx86(MultipleFileUploadSchema_default, __spreadProps(__spreadValues({}, props), { errors, schema }));
16748
17004
  }
16749
17005
  if (isMultiSelectConstSchema(schema)) {
16750
- return /* @__PURE__ */ jsx85(MultiSelectSchema, __spreadProps(__spreadValues({}, props), { errors, schema }));
17006
+ return /* @__PURE__ */ jsx86(MultiSelectSchema, __spreadProps(__spreadValues({}, props), { errors, schema }));
16751
17007
  }
16752
17008
  if (isListArraySchema(schema)) {
16753
- return /* @__PURE__ */ jsx85(RepeatableSchema_default, __spreadProps(__spreadValues({}, props), { errors, schema }));
17009
+ return /* @__PURE__ */ jsx86(RepeatableSchema_default, __spreadProps(__spreadValues({}, props), { errors, schema }));
16754
17010
  }
16755
17011
  throw new Error("Invalid array list schema");
16756
17012
  }
16757
17013
  var ArrayListSchema_default = ArrayListSchema;
16758
17014
 
16759
17015
  // src/legacy/jsonSchemaForm/arrayTypeSchema/ArraySchema.tsx
16760
- import { jsx as jsx86 } from "react/jsx-runtime";
17016
+ import { jsx as jsx87 } from "react/jsx-runtime";
16761
17017
  var ArraySchema = (props) => {
16762
17018
  const { schema } = props;
16763
17019
  if (isListArraySchema(schema)) {
16764
- return /* @__PURE__ */ jsx86(ArrayListSchema_default, __spreadValues({}, props));
17020
+ return /* @__PURE__ */ jsx87(ArrayListSchema_default, __spreadValues({}, props));
16765
17021
  }
16766
17022
  throw new Error("Not implemented");
16767
17023
  };
16768
17024
  var ArraySchema_default = ArraySchema;
16769
17025
 
16770
17026
  // src/legacy/jsonSchemaForm/objectSchema/ObjectSchema.tsx
16771
- var import_classnames10 = __toESM(require_classnames());
16772
- import { Header as Header10 } from "@transferwise/components";
17027
+ var import_classnames11 = __toESM(require_classnames());
17028
+ import { Header as Header11 } from "@transferwise/components";
16773
17029
  import { useState as useState17, useEffect as useEffect10 } from "react";
16774
- import { Fragment as Fragment13, jsx as jsx87, jsxs as jsxs31 } from "react/jsx-runtime";
17030
+ import { Fragment as Fragment13, jsx as jsx88, jsxs as jsxs32 } from "react/jsx-runtime";
16775
17031
  var getSchemaColumnClasses2 = (width) => ({
16776
17032
  "col-xs-12": true,
16777
17033
  "col-sm-6": width === "md",
@@ -16808,22 +17064,22 @@ function ObjectSchema(props) {
16808
17064
  const isPropertyDefined = (propertyName) => typeof props.schema.properties[propertyName] !== "undefined";
16809
17065
  const orderedPropertyNames = Array.from(allorderedPropertiesSet).filter(isPropertyDefined);
16810
17066
  const propsErrors = props.errors;
16811
- return /* @__PURE__ */ jsxs31(Fragment13, { children: [
16812
- props.schema.alert && /* @__PURE__ */ jsx87(DynamicAlert_default, { component: props.schema.alert }),
16813
- /* @__PURE__ */ jsxs31("fieldset", { children: [
16814
- props.schema.title && !hideTitle && /* @__PURE__ */ jsx87(Header10, { title: props.schema.title, as: "legend" }),
16815
- props.schema.description && !hideTitle && /* @__PURE__ */ jsxs31("p", { children: [
17067
+ return /* @__PURE__ */ jsxs32(Fragment13, { children: [
17068
+ props.schema.alert && /* @__PURE__ */ jsx88(DynamicAlert_default, { component: props.schema.alert }),
17069
+ /* @__PURE__ */ jsxs32("fieldset", { children: [
17070
+ props.schema.title && !hideTitle && /* @__PURE__ */ jsx88(Header11, { title: props.schema.title, as: "legend" }),
17071
+ props.schema.description && !hideTitle && /* @__PURE__ */ jsxs32("p", { children: [
16816
17072
  " ",
16817
17073
  props.schema.description,
16818
17074
  " "
16819
17075
  ] }),
16820
- /* @__PURE__ */ jsx87("div", { className: "row", children: orderedPropertyNames.map((propertyName) => /* @__PURE__ */ jsx87(
17076
+ /* @__PURE__ */ jsx88("div", { className: "row", children: orderedPropertyNames.map((propertyName) => /* @__PURE__ */ jsx88(
16821
17077
  "div",
16822
17078
  {
16823
- className: (0, import_classnames10.default)(
17079
+ className: (0, import_classnames11.default)(
16824
17080
  getSchemaColumnClasses2(props.schema.properties[propertyName].width)
16825
17081
  ),
16826
- children: /* @__PURE__ */ jsx87(
17082
+ children: /* @__PURE__ */ jsx88(
16827
17083
  GenericSchema_default,
16828
17084
  {
16829
17085
  schema: props.schema.properties[propertyName],
@@ -16845,8 +17101,8 @@ function ObjectSchema(props) {
16845
17101
  var ObjectSchema_default = ObjectSchema;
16846
17102
 
16847
17103
  // src/legacy/jsonSchemaForm/oneOfSchema/OneOfSchema.tsx
16848
- var import_classnames11 = __toESM(require_classnames());
16849
- import { Header as Header11 } from "@transferwise/components";
17104
+ var import_classnames12 = __toESM(require_classnames());
17105
+ import { Header as Header12 } from "@transferwise/components";
16850
17106
  import { useEffect as useEffect12, useMemo as useMemo16, useState as useState18 } from "react";
16851
17107
 
16852
17108
  // src/legacy/jsonSchemaForm/help/Help.tsx
@@ -16864,14 +17120,14 @@ var help_messages_default2 = defineMessages17({
16864
17120
  });
16865
17121
 
16866
17122
  // src/legacy/jsonSchemaForm/help/Help.tsx
16867
- import { jsx as jsx88 } from "react/jsx-runtime";
17123
+ import { jsx as jsx89 } from "react/jsx-runtime";
16868
17124
  function Help2(props) {
16869
17125
  const intl = useIntl17();
16870
- return /* @__PURE__ */ jsx88(
17126
+ return /* @__PURE__ */ jsx89(
16871
17127
  Info2,
16872
17128
  {
16873
17129
  className: "m-l-1",
16874
- content: /* @__PURE__ */ jsx88(Markdown6, { config: { link: { target: "_blank" } }, children: props.help.markdown }),
17130
+ content: /* @__PURE__ */ jsx89(Markdown6, { config: { link: { target: "_blank" } }, children: props.help.markdown }),
16875
17131
  presentation: "POPOVER",
16876
17132
  size: "sm",
16877
17133
  "aria-label": intl.formatMessage(help_messages_default2.helpAria)
@@ -17084,7 +17340,7 @@ var autocompleteTokenMap2 = {
17084
17340
  };
17085
17341
 
17086
17342
  // src/legacy/formControl/FormControl.tsx
17087
- import { Fragment as Fragment14, jsx as jsx89 } from "react/jsx-runtime";
17343
+ import { Fragment as Fragment14, jsx as jsx90 } from "react/jsx-runtime";
17088
17344
  var _FormControl = class _FormControl extends PureComponent {
17089
17345
  constructor(props) {
17090
17346
  super(props);
@@ -17174,7 +17430,7 @@ var _FormControl = class _FormControl extends PureComponent {
17174
17430
  } = this.props;
17175
17431
  switch (type) {
17176
17432
  case FormControlType.RADIO:
17177
- return /* @__PURE__ */ jsx89(
17433
+ return /* @__PURE__ */ jsx90(
17178
17434
  RadioGroup2,
17179
17435
  {
17180
17436
  radios: options.map(this.mapOption),
@@ -17190,7 +17446,7 @@ var _FormControl = class _FormControl extends PureComponent {
17190
17446
  }
17191
17447
  );
17192
17448
  case FormControlType.CHECKBOX:
17193
- return /* @__PURE__ */ jsx89(
17449
+ return /* @__PURE__ */ jsx90(
17194
17450
  Checkbox2,
17195
17451
  {
17196
17452
  checked: getSafeBooleanValue(value, { coerceValue: true }),
@@ -17208,7 +17464,7 @@ var _FormControl = class _FormControl extends PureComponent {
17208
17464
  const search = options.length >= 8;
17209
17465
  const items = options;
17210
17466
  const selected = this.getSelectedOption(options);
17211
- return /* @__PURE__ */ jsx89("div", { className: "d-flex flex-column", children: /* @__PURE__ */ jsx89(
17467
+ return /* @__PURE__ */ jsx90("div", { className: "d-flex flex-column", children: /* @__PURE__ */ jsx90(
17212
17468
  SelectInput4,
17213
17469
  {
17214
17470
  id,
@@ -17224,7 +17480,7 @@ var _FormControl = class _FormControl extends PureComponent {
17224
17480
  disabled: value2.disabled
17225
17481
  })),
17226
17482
  value: selected != null ? selected : null,
17227
- renderValue: ({ hideIconInTrigger, icon, label: label2, note, secondary }, withinTrigger) => /* @__PURE__ */ jsx89(
17483
+ renderValue: ({ hideIconInTrigger, icon, label: label2, note, secondary }, withinTrigger) => /* @__PURE__ */ jsx90(
17228
17484
  SelectInputOptionContent4,
17229
17485
  {
17230
17486
  title: label2,
@@ -17253,13 +17509,13 @@ var _FormControl = class _FormControl extends PureComponent {
17253
17509
  ) });
17254
17510
  }
17255
17511
  case FormControlType.TAB:
17256
- return /* @__PURE__ */ jsx89(
17512
+ return /* @__PURE__ */ jsx90(
17257
17513
  Tabs2,
17258
17514
  {
17259
17515
  selected: ((_a = this.getSelectedOption(options)) == null ? void 0 : _a.value) || 0,
17260
17516
  tabs: options.map((option) => ({
17261
17517
  title: option.label,
17262
- content: /* @__PURE__ */ jsx89(Fragment14, {}),
17518
+ content: /* @__PURE__ */ jsx90(Fragment14, {}),
17263
17519
  disabled: option.disabled || false
17264
17520
  })),
17265
17521
  name: id,
@@ -17274,7 +17530,7 @@ var _FormControl = class _FormControl extends PureComponent {
17274
17530
  );
17275
17531
  case FormControlType.NUMERIC:
17276
17532
  case FormControlType.NUMBER: {
17277
- return /* @__PURE__ */ jsx89(
17533
+ return /* @__PURE__ */ jsx90(
17278
17534
  "input",
17279
17535
  {
17280
17536
  autoComplete: this.getAutocompleteValue(),
@@ -17308,7 +17564,7 @@ var _FormControl = class _FormControl extends PureComponent {
17308
17564
  );
17309
17565
  }
17310
17566
  case FormControlType.HIDDEN:
17311
- return /* @__PURE__ */ jsx89(
17567
+ return /* @__PURE__ */ jsx90(
17312
17568
  "input",
17313
17569
  {
17314
17570
  type: "hidden",
@@ -17318,7 +17574,7 @@ var _FormControl = class _FormControl extends PureComponent {
17318
17574
  }
17319
17575
  );
17320
17576
  case FormControlType.PASSWORD:
17321
- return /* @__PURE__ */ jsx89(
17577
+ return /* @__PURE__ */ jsx90(
17322
17578
  "input",
17323
17579
  {
17324
17580
  autoComplete: this.getAutocompleteValue(),
@@ -17338,7 +17594,7 @@ var _FormControl = class _FormControl extends PureComponent {
17338
17594
  );
17339
17595
  case FormControlType.DATE:
17340
17596
  case FormControlType.DATETIME:
17341
- return /* @__PURE__ */ jsx89(
17597
+ return /* @__PURE__ */ jsx90(
17342
17598
  DateInput2,
17343
17599
  {
17344
17600
  "aria-labelledby": labelledBy,
@@ -17355,7 +17611,7 @@ var _FormControl = class _FormControl extends PureComponent {
17355
17611
  }
17356
17612
  );
17357
17613
  case FormControlType.DATELOOKUP: {
17358
- return /* @__PURE__ */ jsx89(
17614
+ return /* @__PURE__ */ jsx90(
17359
17615
  DateLookup2,
17360
17616
  {
17361
17617
  value: getSafeDateStringValue(value),
@@ -17373,7 +17629,7 @@ var _FormControl = class _FormControl extends PureComponent {
17373
17629
  );
17374
17630
  }
17375
17631
  case FormControlType.TEL:
17376
- return /* @__PURE__ */ jsx89(
17632
+ return /* @__PURE__ */ jsx90(
17377
17633
  PhoneNumberInput2,
17378
17634
  {
17379
17635
  disabled,
@@ -17405,7 +17661,7 @@ var _FormControl = class _FormControl extends PureComponent {
17405
17661
  autoComplete: this.getAutocompleteValue()
17406
17662
  };
17407
17663
  if (this.props.displayPattern) {
17408
- return /* @__PURE__ */ jsx89(
17664
+ return /* @__PURE__ */ jsx90(
17409
17665
  TextareaWithDisplayFormat2,
17410
17666
  __spreadProps(__spreadValues({
17411
17667
  displayPattern: this.props.displayPattern
@@ -17414,7 +17670,7 @@ var _FormControl = class _FormControl extends PureComponent {
17414
17670
  })
17415
17671
  );
17416
17672
  }
17417
- return /* @__PURE__ */ jsx89(
17673
+ return /* @__PURE__ */ jsx90(
17418
17674
  "textarea",
17419
17675
  __spreadProps(__spreadValues({}, textareaProps), {
17420
17676
  "aria-describedby": describedBy,
@@ -17424,7 +17680,7 @@ var _FormControl = class _FormControl extends PureComponent {
17424
17680
  }
17425
17681
  case FormControlType.FILE:
17426
17682
  case FormControlType.UPLOAD: {
17427
- return /* @__PURE__ */ jsx89(
17683
+ return /* @__PURE__ */ jsx90(
17428
17684
  Upload2,
17429
17685
  __spreadProps(__spreadValues({}, uploadProps), {
17430
17686
  usAccept: uploadProps.usAccept || "*",
@@ -17461,7 +17717,7 @@ var _FormControl = class _FormControl extends PureComponent {
17461
17717
  autoComplete: this.getAutocompleteValue()
17462
17718
  };
17463
17719
  if (this.props.displayPattern) {
17464
- return /* @__PURE__ */ jsx89(
17720
+ return /* @__PURE__ */ jsx90(
17465
17721
  InputWithDisplayFormat2,
17466
17722
  __spreadProps(__spreadValues({
17467
17723
  displayPattern: this.props.displayPattern
@@ -17470,7 +17726,7 @@ var _FormControl = class _FormControl extends PureComponent {
17470
17726
  })
17471
17727
  );
17472
17728
  }
17473
- return /* @__PURE__ */ jsx89(
17729
+ return /* @__PURE__ */ jsx90(
17474
17730
  "input",
17475
17731
  __spreadProps(__spreadValues({}, inputProps), {
17476
17732
  "aria-describedby": describedBy,
@@ -17520,7 +17776,7 @@ _FormControl.defaultProps = {
17520
17776
  var FormControl = _FormControl;
17521
17777
 
17522
17778
  // src/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.tsx
17523
- import { jsx as jsx90 } from "react/jsx-runtime";
17779
+ import { jsx as jsx91 } from "react/jsx-runtime";
17524
17780
  var isNativeInput = (propsSchemaType) => propsSchemaType === "string" || propsSchemaType === "number";
17525
17781
  var getControlType = (schema) => {
17526
17782
  if (isOneOfSchema2(schema)) {
@@ -17637,7 +17893,7 @@ function SchemaFormControl(props) {
17637
17893
  labelledBy,
17638
17894
  required
17639
17895
  };
17640
- return /* @__PURE__ */ jsx90("div", { "aria-describedby": describedBy, children: /* @__PURE__ */ jsx90(FormControl, __spreadValues(__spreadValues({ type: controlType, value: safeValue }, events), controlProps)) });
17896
+ return /* @__PURE__ */ jsx91("div", { "aria-describedby": describedBy, children: /* @__PURE__ */ jsx91(FormControl, __spreadValues(__spreadValues({ type: controlType, value: safeValue }, events), controlProps)) });
17641
17897
  }
17642
17898
  var warnIfInvalidSchema = (schema, log, controlType) => {
17643
17899
  if (isOneOfSchema2(schema) && schema.oneOf.length === 2 && !schema.control) {
@@ -17659,7 +17915,7 @@ var warnIfInvalidSchema = (schema, log, controlType) => {
17659
17915
  var SchemaFormControl_default = SchemaFormControl;
17660
17916
 
17661
17917
  // src/legacy/jsonSchemaForm/oneOfSchema/OneOfSchema.tsx
17662
- import { Fragment as Fragment15, jsx as jsx91, jsxs as jsxs32 } from "react/jsx-runtime";
17918
+ import { Fragment as Fragment15, jsx as jsx92, jsxs as jsxs33 } from "react/jsx-runtime";
17663
17919
  function OneOfSchema(props) {
17664
17920
  const onEvent = useEventDispatcher();
17665
17921
  const [changed, setChanged] = useState18(false);
@@ -17738,12 +17994,12 @@ function OneOfSchema(props) {
17738
17994
  const isHidden = props.schema.hidden;
17739
17995
  const feedbackId = `${id}-feedback`;
17740
17996
  const labelId = `${id}-label`;
17741
- return !isHidden ? /* @__PURE__ */ jsxs32(Fragment15, { children: [
17742
- (props.schema.oneOf.length > 1 || isConstSchema2(props.schema.oneOf[0])) && /* @__PURE__ */ jsxs32(Fragment15, { children: [
17743
- props.schema.alert && /* @__PURE__ */ jsx91(DynamicAlert_default, { component: props.schema.alert }),
17744
- /* @__PURE__ */ jsxs32("div", { className: (0, import_classnames11.default)(formGroupClasses), children: [
17997
+ return !isHidden ? /* @__PURE__ */ jsxs33(Fragment15, { children: [
17998
+ (props.schema.oneOf.length > 1 || isConstSchema2(props.schema.oneOf[0])) && /* @__PURE__ */ jsxs33(Fragment15, { children: [
17999
+ props.schema.alert && /* @__PURE__ */ jsx92(DynamicAlert_default, { component: props.schema.alert }),
18000
+ /* @__PURE__ */ jsxs33("div", { className: (0, import_classnames12.default)(formGroupClasses), children: [
17745
18001
  getTitleAndHelp(props.schema, id, labelId),
17746
- /* @__PURE__ */ jsx91(
18002
+ /* @__PURE__ */ jsx92(
17747
18003
  SchemaFormControl_default,
17748
18004
  {
17749
18005
  id,
@@ -17760,7 +18016,7 @@ function OneOfSchema(props) {
17760
18016
  onSearchChange
17761
18017
  }
17762
18018
  ),
17763
- /* @__PURE__ */ jsx91(
18019
+ /* @__PURE__ */ jsx92(
17764
18020
  ControlFeedback_default,
17765
18021
  {
17766
18022
  id: feedbackId,
@@ -17776,7 +18032,7 @@ function OneOfSchema(props) {
17776
18032
  )
17777
18033
  ] })
17778
18034
  ] }),
17779
- isNoNConstSchema(props.schema.oneOf[schemaIndex]) && /* @__PURE__ */ jsx91(
18035
+ isNoNConstSchema(props.schema.oneOf[schemaIndex]) && /* @__PURE__ */ jsx92(
17780
18036
  GenericSchema_default,
17781
18037
  {
17782
18038
  schema: props.schema.oneOf[schemaIndex],
@@ -17793,16 +18049,16 @@ function OneOfSchema(props) {
17793
18049
  }
17794
18050
  function getTitleAndHelp(schema, forId, labelId) {
17795
18051
  var _a;
17796
- const helpElement = schema.help ? /* @__PURE__ */ jsx91(Help_default2, { help: schema.help }) : null;
17797
- const titleElement = isConstSchema2(schema.oneOf[0]) ? /* @__PURE__ */ jsx91("div", { className: "m-b-1", children: /* @__PURE__ */ jsxs32("label", { className: "control-label d-inline", id: labelId, htmlFor: forId, children: [
18052
+ const helpElement = schema.help ? /* @__PURE__ */ jsx92(Help_default2, { help: schema.help }) : null;
18053
+ const titleElement = isConstSchema2(schema.oneOf[0]) ? /* @__PURE__ */ jsx92("div", { className: "m-b-1", children: /* @__PURE__ */ jsxs33("label", { className: "control-label d-inline", id: labelId, htmlFor: forId, children: [
17798
18054
  schema.title,
17799
18055
  " ",
17800
18056
  helpElement
17801
- ] }) }) : /* @__PURE__ */ jsx91(Fragment15, { children: helpElement ? /* @__PURE__ */ jsxs32("h4", { className: "m-b-2", children: [
18057
+ ] }) }) : /* @__PURE__ */ jsx92(Fragment15, { children: helpElement ? /* @__PURE__ */ jsxs33("h4", { className: "m-b-2", children: [
17802
18058
  schema.title,
17803
18059
  " ",
17804
18060
  helpElement
17805
- ] }) : /* @__PURE__ */ jsx91(Header11, { title: (_a = schema.title) != null ? _a : "" }) });
18061
+ ] }) : /* @__PURE__ */ jsx92(Header12, { title: (_a = schema.title) != null ? _a : "" }) });
17806
18062
  return schema.title ? titleElement : helpElement;
17807
18063
  }
17808
18064
  function getValidations(props, schemaIndex) {
@@ -17835,14 +18091,14 @@ function mapOneOfToConst(schema, index) {
17835
18091
  var OneOfSchema_default = OneOfSchema;
17836
18092
 
17837
18093
  // src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.tsx
17838
- var import_classnames12 = __toESM(require_classnames());
18094
+ var import_classnames13 = __toESM(require_classnames());
17839
18095
  import { useEffect as useEffect13, useState as useState19 } from "react";
17840
18096
  import { useIntl as useIntl19 } from "react-intl";
17841
18097
 
17842
18098
  // src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.tsx
17843
18099
  import { Status as Status2, UploadInput as UploadInput4 } from "@transferwise/components";
17844
18100
  import { useMemo as useMemo17 } from "react";
17845
- import { jsx as jsx92 } from "react/jsx-runtime";
18101
+ import { jsx as jsx93 } from "react/jsx-runtime";
17846
18102
  function UploadInputAdapter(props) {
17847
18103
  const {
17848
18104
  id,
@@ -17877,7 +18133,7 @@ function UploadInputAdapter(props) {
17877
18133
  return Promise.reject();
17878
18134
  });
17879
18135
  };
17880
- return /* @__PURE__ */ jsx92(
18136
+ return /* @__PURE__ */ jsx93(
17881
18137
  UploadInput4,
17882
18138
  {
17883
18139
  id,
@@ -17897,7 +18153,7 @@ function UploadInputAdapter(props) {
17897
18153
  }
17898
18154
 
17899
18155
  // src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.tsx
17900
- import { jsx as jsx93, jsxs as jsxs33 } from "react/jsx-runtime";
18156
+ import { jsx as jsx94, jsxs as jsxs34 } from "react/jsx-runtime";
17901
18157
  function PersistAsyncBlobSchema(props) {
17902
18158
  const { model, schema, submitted, required = false, errors, onChange } = props;
17903
18159
  const [persistAsyncValidationMessages, setPersistAsyncValidationMessages] = useState19({});
@@ -17945,8 +18201,8 @@ function PersistAsyncBlobSchema(props) {
17945
18201
  };
17946
18202
  const id = schema.$id || schema.persistAsync.schema.$id || schema.persistAsync.idProperty;
17947
18203
  const feedbackId = `${id}-feedback`;
17948
- return /* @__PURE__ */ jsxs33("div", { className: (0, import_classnames12.default)(formGroupClasses), children: [
17949
- /* @__PURE__ */ jsx93("div", { "aria-describedby": feedbackId, children: /* @__PURE__ */ jsx93(
18204
+ return /* @__PURE__ */ jsxs34("div", { className: (0, import_classnames13.default)(formGroupClasses), children: [
18205
+ /* @__PURE__ */ jsx94("div", { "aria-describedby": feedbackId, children: /* @__PURE__ */ jsx94(
17950
18206
  UploadInputAdapter,
17951
18207
  __spreadValues({
17952
18208
  id,
@@ -17964,7 +18220,7 @@ function PersistAsyncBlobSchema(props) {
17964
18220
  onCancel
17965
18221
  }, mapSchemaToUploadOptions(schema.persistAsync.schema))
17966
18222
  ) }),
17967
- /* @__PURE__ */ jsx93(
18223
+ /* @__PURE__ */ jsx94(
17968
18224
  ControlFeedback_default,
17969
18225
  {
17970
18226
  id: feedbackId,
@@ -17990,17 +18246,17 @@ var getResponseJsonObject = async (response) => {
17990
18246
  var PersistAsyncBlobSchema_default = PersistAsyncBlobSchema;
17991
18247
 
17992
18248
  // src/legacy/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.tsx
17993
- import { jsx as jsx94 } from "react/jsx-runtime";
18249
+ import { jsx as jsx95 } from "react/jsx-runtime";
17994
18250
  function PersistAsyncSchema(props) {
17995
18251
  const { schema } = props;
17996
18252
  const persistAsyncSchemaType = schema.persistAsync.schema.type;
17997
18253
  if (persistAsyncSchemaType === "blob") {
17998
- return /* @__PURE__ */ jsx94(
18254
+ return /* @__PURE__ */ jsx95(
17999
18255
  PersistAsyncBlobSchema_default,
18000
18256
  __spreadValues({}, props)
18001
18257
  );
18002
18258
  }
18003
- return /* @__PURE__ */ jsx94(PersistAsyncBasicSchema_default, __spreadValues({}, props));
18259
+ return /* @__PURE__ */ jsx95(PersistAsyncBasicSchema_default, __spreadValues({}, props));
18004
18260
  }
18005
18261
  var PersistAsyncSchema_default = PersistAsyncSchema;
18006
18262
 
@@ -18018,7 +18274,7 @@ var getSelectionFromModel = (schema, model) => {
18018
18274
 
18019
18275
  // src/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.tsx
18020
18276
  import { Checkbox as Checkbox3 } from "@transferwise/components";
18021
- import { jsx as jsx95 } from "react/jsx-runtime";
18277
+ import { jsx as jsx96 } from "react/jsx-runtime";
18022
18278
  var PromotedOneOfCheckboxControl = (props) => {
18023
18279
  const { id, selection, setSelection } = props;
18024
18280
  const { promoted, other, checkedMeans } = props.promotion;
@@ -18029,13 +18285,13 @@ var PromotedOneOfCheckboxControl = (props) => {
18029
18285
  const toggleSelection = () => {
18030
18286
  setSelection(checked ? selectionWhenUnchecked : selectionWhenChecked);
18031
18287
  };
18032
- return /* @__PURE__ */ jsx95("div", { className: "form-group", children: /* @__PURE__ */ jsx95(Checkbox3, { id, label: title, checked, onChange: toggleSelection }) });
18288
+ return /* @__PURE__ */ jsx96("div", { className: "form-group", children: /* @__PURE__ */ jsx96(Checkbox3, { id, label: title, checked, onChange: toggleSelection }) });
18033
18289
  };
18034
18290
  var PromotedOneOfCheckboxControl_default = PromotedOneOfCheckboxControl;
18035
18291
 
18036
18292
  // src/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.tsx
18037
18293
  import { RadioGroup as RadioGroup3 } from "@transferwise/components";
18038
- import { jsx as jsx96, jsxs as jsxs34 } from "react/jsx-runtime";
18294
+ import { jsx as jsx97, jsxs as jsxs35 } from "react/jsx-runtime";
18039
18295
  function PromotedOneOfRadioControl(props) {
18040
18296
  var _a, _b;
18041
18297
  const { id, selection, setSelection, promotion, promotedOneOf, title } = props;
@@ -18052,9 +18308,9 @@ function PromotedOneOfRadioControl(props) {
18052
18308
  secondary: promotion.other.description
18053
18309
  }, getAvatarPropertyForRadioOption(promotion.other))
18054
18310
  ];
18055
- return /* @__PURE__ */ jsxs34("div", { className: "form-group", children: [
18056
- title && /* @__PURE__ */ jsx96("label", { className: "control-label", htmlFor: id, children: title }),
18057
- /* @__PURE__ */ jsx96(
18311
+ return /* @__PURE__ */ jsxs35("div", { className: "form-group", children: [
18312
+ title && /* @__PURE__ */ jsx97("label", { className: "control-label", htmlFor: id, children: title }),
18313
+ /* @__PURE__ */ jsx97(
18058
18314
  RadioGroup3,
18059
18315
  {
18060
18316
  name: "promoted-selection",
@@ -18072,16 +18328,16 @@ PromotedOneOfRadioControl.defaultProps = {
18072
18328
  var PromotedOneOfRadioControl_default = PromotedOneOfRadioControl;
18073
18329
 
18074
18330
  // src/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.tsx
18075
- import { Fragment as Fragment16, jsx as jsx97 } from "react/jsx-runtime";
18331
+ import { Fragment as Fragment16, jsx as jsx98 } from "react/jsx-runtime";
18076
18332
  function PromotedOneOfControl(props) {
18077
18333
  const controlType = props.promotion.control || "radio";
18078
18334
  switch (controlType) {
18079
18335
  case "radio":
18080
- return /* @__PURE__ */ jsx97(PromotedOneOfRadioControl_default, __spreadValues({}, props));
18336
+ return /* @__PURE__ */ jsx98(PromotedOneOfRadioControl_default, __spreadValues({}, props));
18081
18337
  case "checkbox":
18082
- return /* @__PURE__ */ jsx97(PromotedOneOfCheckboxControl_default, __spreadValues({}, props));
18338
+ return /* @__PURE__ */ jsx98(PromotedOneOfCheckboxControl_default, __spreadValues({}, props));
18083
18339
  default:
18084
- return /* @__PURE__ */ jsx97(Fragment16, {});
18340
+ return /* @__PURE__ */ jsx98(Fragment16, {});
18085
18341
  }
18086
18342
  }
18087
18343
  PromotedOneOfControl.defaultProps = {
@@ -18091,7 +18347,7 @@ PromotedOneOfControl.defaultProps = {
18091
18347
  var PromotedOneOfControl_default = PromotedOneOfControl;
18092
18348
 
18093
18349
  // src/legacy/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.tsx
18094
- import { Fragment as Fragment17, jsx as jsx98, jsxs as jsxs35 } from "react/jsx-runtime";
18350
+ import { Fragment as Fragment17, jsx as jsx99, jsxs as jsxs36 } from "react/jsx-runtime";
18095
18351
  var isPromoted = (schema) => schema.promoted === true;
18096
18352
  var PromotedOneOfSchema = (props) => {
18097
18353
  var _a;
@@ -18102,9 +18358,9 @@ var PromotedOneOfSchema = (props) => {
18102
18358
  const promotedOneOf = props.schema.oneOf.find(isPromoted);
18103
18359
  const promotedObjectSchema = getPromotedObjectSchema(promotedOneOf);
18104
18360
  const otherOneOf = getOtherOneOf(props.schema);
18105
- return /* @__PURE__ */ jsxs35(Fragment17, { children: [
18106
- promotedAlert && /* @__PURE__ */ jsx98(DynamicAlert_default, { component: promotedAlert }),
18107
- /* @__PURE__ */ jsx98(
18361
+ return /* @__PURE__ */ jsxs36(Fragment17, { children: [
18362
+ promotedAlert && /* @__PURE__ */ jsx99(DynamicAlert_default, { component: promotedAlert }),
18363
+ /* @__PURE__ */ jsx99(
18108
18364
  PromotedOneOfControl_default,
18109
18365
  {
18110
18366
  id: props.schema.$id,
@@ -18115,8 +18371,8 @@ var PromotedOneOfSchema = (props) => {
18115
18371
  setSelection
18116
18372
  }
18117
18373
  ),
18118
- selection === "promoted" && /* @__PURE__ */ jsx98(ObjectSchema_default, __spreadProps(__spreadValues({}, props), { schema: promotedObjectSchema })),
18119
- selection === "other" && /* @__PURE__ */ jsx98(GenericSchema_default, __spreadProps(__spreadValues({}, props), { schema: otherOneOf }))
18374
+ selection === "promoted" && /* @__PURE__ */ jsx99(ObjectSchema_default, __spreadProps(__spreadValues({}, props), { schema: promotedObjectSchema })),
18375
+ selection === "other" && /* @__PURE__ */ jsx99(GenericSchema_default, __spreadProps(__spreadValues({}, props), { schema: otherOneOf }))
18120
18376
  ] });
18121
18377
  };
18122
18378
  function getPromotedObjectSchema(promotedSchema) {
@@ -18165,12 +18421,12 @@ var ReadOnlySchema_messages_default = defineMessages18({
18165
18421
  });
18166
18422
 
18167
18423
  // src/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.tsx
18168
- import { Fragment as Fragment18, jsx as jsx99, jsxs as jsxs36 } from "react/jsx-runtime";
18424
+ import { Fragment as Fragment18, jsx as jsx100, jsxs as jsxs37 } from "react/jsx-runtime";
18169
18425
  function ReadOnlySchema({ schema, model }) {
18170
18426
  const { title = "" } = schema;
18171
18427
  const { formatMessage } = useIntl20();
18172
18428
  const value = getValueForSchema({ schema, model, formatMessage });
18173
- return /* @__PURE__ */ jsx99(DefinitionList2, { layout: Layout.VERTICAL_ONE_COLUMN, definitions: [{ title, value, key: "" }] });
18429
+ return /* @__PURE__ */ jsx100(DefinitionList2, { layout: Layout.VERTICAL_ONE_COLUMN, definitions: [{ title, value, key: "" }] });
18174
18430
  }
18175
18431
  var ReadOnlySchema_default = ReadOnlySchema;
18176
18432
  function getValueForSchema({
@@ -18203,7 +18459,7 @@ function getSelectedOneOf(schema, model) {
18203
18459
  function getValueFromOption(option) {
18204
18460
  const text = option.title && option.description ? `${option.title} - ${option.description}` : option.title || "";
18205
18461
  const icon = getAvatarPropertyForRadioOption({ icon: option.icon });
18206
- return (icon == null ? void 0 : icon.avatar) ? /* @__PURE__ */ jsxs36(Fragment18, { children: [
18462
+ return (icon == null ? void 0 : icon.avatar) ? /* @__PURE__ */ jsxs37(Fragment18, { children: [
18207
18463
  icon.avatar,
18208
18464
  " ",
18209
18465
  text
@@ -18212,7 +18468,7 @@ function getValueFromOption(option) {
18212
18468
 
18213
18469
  // src/legacy/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.tsx
18214
18470
  import { useEffect as useEffect14, useRef as useRef3, useState as useState21 } from "react";
18215
- import { jsx as jsx100 } from "react/jsx-runtime";
18471
+ import { jsx as jsx101 } from "react/jsx-runtime";
18216
18472
  function ValidationAsyncSchema(props) {
18217
18473
  const { schema, model, required = false, submitted, errors, onChange } = props;
18218
18474
  const [validationAsyncModel, setValidationAsyncModel] = useState21(model);
@@ -18296,12 +18552,12 @@ function ValidationAsyncSchema(props) {
18296
18552
  required,
18297
18553
  schema
18298
18554
  };
18299
- return /* @__PURE__ */ jsx100(BasicTypeSchema_default, __spreadValues({}, basicTypeSchemaProps));
18555
+ return /* @__PURE__ */ jsx101(BasicTypeSchema_default, __spreadValues({}, basicTypeSchemaProps));
18300
18556
  }
18301
18557
  var ValidationAsyncSchema_default = ValidationAsyncSchema;
18302
18558
 
18303
18559
  // src/legacy/jsonSchemaForm/genericSchema/GenericSchema.tsx
18304
- import { Fragment as Fragment19, jsx as jsx101 } from "react/jsx-runtime";
18560
+ import { Fragment as Fragment19, jsx as jsx102 } from "react/jsx-runtime";
18305
18561
  import { createElement } from "react";
18306
18562
  function GenericSchemaForm(props) {
18307
18563
  const { schema, model = null, errors = null, hideTitle = false, disabled = false } = props;
@@ -18318,29 +18574,29 @@ function GenericSchemaForm(props) {
18318
18574
  }, [JSON.stringify(schema), JSON.stringify(model), JSON.stringify(errors), type, log]);
18319
18575
  switch (type) {
18320
18576
  case "readOnly":
18321
- return /* @__PURE__ */ jsx101(ReadOnlySchema_default, __spreadValues({}, schemaProps));
18577
+ return /* @__PURE__ */ jsx102(ReadOnlySchema_default, __spreadValues({}, schemaProps));
18322
18578
  case "persistAsync":
18323
- return /* @__PURE__ */ jsx101(PersistAsyncSchema_default, __spreadValues({}, schemaProps));
18579
+ return /* @__PURE__ */ jsx102(PersistAsyncSchema_default, __spreadValues({}, schemaProps));
18324
18580
  case "validationAsync":
18325
- return /* @__PURE__ */ jsx101(ValidationAsyncSchema_default, __spreadValues({}, schemaProps));
18581
+ return /* @__PURE__ */ jsx102(ValidationAsyncSchema_default, __spreadValues({}, schemaProps));
18326
18582
  case "basic": {
18327
18583
  const basicTypeProps = __spreadValues({
18328
18584
  infoMessage: null
18329
18585
  }, schemaProps);
18330
- return /* @__PURE__ */ jsx101(BasicTypeSchema_default, __spreadValues({}, basicTypeProps));
18586
+ return /* @__PURE__ */ jsx102(BasicTypeSchema_default, __spreadValues({}, basicTypeProps));
18331
18587
  }
18332
18588
  case "object":
18333
18589
  return /* @__PURE__ */ createElement(ObjectSchema_default, __spreadProps(__spreadValues({}, schemaProps), { key: JSON.stringify(schema) }));
18334
18590
  case "array":
18335
- return /* @__PURE__ */ jsx101(ArraySchema_default, __spreadValues({}, schemaProps));
18591
+ return /* @__PURE__ */ jsx102(ArraySchema_default, __spreadValues({}, schemaProps));
18336
18592
  case "promotedOneOf":
18337
- return /* @__PURE__ */ jsx101(PromotedOneOfSchema_default, __spreadValues({}, schemaProps));
18593
+ return /* @__PURE__ */ jsx102(PromotedOneOfSchema_default, __spreadValues({}, schemaProps));
18338
18594
  case "oneOf":
18339
- return /* @__PURE__ */ jsx101(OneOfSchema_default, __spreadValues({}, schemaProps));
18595
+ return /* @__PURE__ */ jsx102(OneOfSchema_default, __spreadValues({}, schemaProps));
18340
18596
  case "allOf":
18341
- return /* @__PURE__ */ jsx101(AllOfSchema_default, __spreadValues({}, schemaProps));
18597
+ return /* @__PURE__ */ jsx102(AllOfSchema_default, __spreadValues({}, schemaProps));
18342
18598
  }
18343
- return /* @__PURE__ */ jsx101(Fragment19, {});
18599
+ return /* @__PURE__ */ jsx102(Fragment19, {});
18344
18600
  }
18345
18601
  var GenericSchema_default = GenericSchemaForm;
18346
18602
  var isValidGenericSchema = (schema, model, errors) => {
@@ -18367,7 +18623,7 @@ var isValidGenericSchema = (schema, model, errors) => {
18367
18623
  };
18368
18624
 
18369
18625
  // src/legacy/layout/form/DynamicForm.tsx
18370
- import { jsx as jsx102 } from "react/jsx-runtime";
18626
+ import { jsx as jsx103 } from "react/jsx-runtime";
18371
18627
  function DynamicForm({
18372
18628
  component,
18373
18629
  model = null,
@@ -18377,7 +18633,7 @@ function DynamicForm({
18377
18633
  onPersistAsync
18378
18634
  }) {
18379
18635
  const formSchema = component.schema;
18380
- return /* @__PURE__ */ jsx102("div", { className: getMargin2(component.margin || "md"), children: /* @__PURE__ */ jsx102(
18636
+ return /* @__PURE__ */ jsx103("div", { className: getMargin2(component.margin || "md"), children: /* @__PURE__ */ jsx103(
18381
18637
  GenericSchema_default,
18382
18638
  {
18383
18639
  schema: formSchema,
@@ -18394,68 +18650,82 @@ function DynamicForm({
18394
18650
  var DynamicForm_default = DynamicForm;
18395
18651
 
18396
18652
  // src/legacy/layout/heading/DynamicHeading.tsx
18397
- var import_classnames13 = __toESM(require_classnames());
18653
+ var import_classnames14 = __toESM(require_classnames());
18398
18654
  import { Display as Display2 } from "@transferwise/components";
18399
- import { jsx as jsx103 } from "react/jsx-runtime";
18655
+ import { jsx as jsx104 } from "react/jsx-runtime";
18400
18656
  var DynamicHeading = (props) => {
18401
18657
  const { text, size: size2 = "md", align = "left", margin = "md", control } = props.component;
18402
- const classes = (0, import_classnames13.default)(getTextAlignmentAndMargin2({ align, margin }));
18403
- return control === "display" ? /* @__PURE__ */ jsx103(DisplayHeading2, { size: size2, text, classes }) : /* @__PURE__ */ jsx103(StandardHeading2, { size: size2, text, classes });
18658
+ const classes = (0, import_classnames14.default)(getTextAlignmentAndMargin2({ align, margin }));
18659
+ return control === "display" ? /* @__PURE__ */ jsx104(DisplayHeading2, { size: size2, text, classes }) : /* @__PURE__ */ jsx104(StandardHeading2, { size: size2, text, classes });
18404
18660
  };
18405
18661
  var StandardHeading2 = ({ size: size2, text, classes }) => {
18406
18662
  switch (size2) {
18407
18663
  case "xs":
18408
- return /* @__PURE__ */ jsx103("h5", { className: classes, children: text });
18664
+ return /* @__PURE__ */ jsx104("h5", { className: classes, children: text });
18409
18665
  case "sm":
18410
- return /* @__PURE__ */ jsx103("h4", { className: classes, children: text });
18666
+ return /* @__PURE__ */ jsx104("h4", { className: classes, children: text });
18411
18667
  case "lg":
18412
- return /* @__PURE__ */ jsx103("h2", { className: classes, children: text });
18668
+ return /* @__PURE__ */ jsx104("h2", { className: classes, children: text });
18413
18669
  case "xl":
18414
- return /* @__PURE__ */ jsx103("h1", { className: classes, children: text });
18670
+ return /* @__PURE__ */ jsx104("h1", { className: classes, children: text });
18415
18671
  case "md":
18416
18672
  default:
18417
- return /* @__PURE__ */ jsx103("h3", { className: classes, children: text });
18673
+ return /* @__PURE__ */ jsx104("h3", { className: classes, children: text });
18418
18674
  }
18419
18675
  };
18420
18676
  var DisplayHeading2 = ({ size: size2, text, classes }) => {
18421
18677
  switch (size2) {
18422
18678
  case "xs":
18423
18679
  case "sm":
18424
- return /* @__PURE__ */ jsx103(Display2, { type: "display-small", className: classes, children: text });
18680
+ return /* @__PURE__ */ jsx104(Display2, { type: "display-small", className: classes, children: text });
18425
18681
  case "xl":
18426
18682
  case "lg":
18427
- return /* @__PURE__ */ jsx103(Display2, { type: "display-large", className: classes, children: text });
18683
+ return /* @__PURE__ */ jsx104(Display2, { type: "display-large", className: classes, children: text });
18428
18684
  case "md":
18429
18685
  default:
18430
- return /* @__PURE__ */ jsx103(Display2, { type: "display-medium", className: classes, children: text });
18686
+ return /* @__PURE__ */ jsx104(Display2, { type: "display-medium", className: classes, children: text });
18431
18687
  }
18432
18688
  };
18433
18689
  var DynamicHeading_default = DynamicHeading;
18434
18690
 
18435
18691
  // src/legacy/layout/markdown/DynamicMarkdown.tsx
18436
18692
  import { Markdown as Markdown7 } from "@transferwise/components";
18437
- import { jsx as jsx104 } from "react/jsx-runtime";
18693
+ import { jsx as jsx105 } from "react/jsx-runtime";
18438
18694
  var DynamicMarkdown = ({ component }) => {
18439
18695
  const { content, align, margin } = component;
18440
- return /* @__PURE__ */ jsx104("div", { className: getTextAlignmentAndMargin2({ align, margin }), children: /* @__PURE__ */ jsx104(Markdown7, { config: { link: { target: "_blank" } }, children: content }) });
18696
+ return /* @__PURE__ */ jsx105("div", { className: getTextAlignmentAndMargin2({ align, margin }), children: /* @__PURE__ */ jsx105(Markdown7, { config: { link: { target: "_blank" } }, children: content }) });
18441
18697
  };
18442
18698
  var DynamicInfo = ({ component }) => {
18443
- return /* @__PURE__ */ jsx104("div", { className: getTextAlignmentAndMargin2(component), children: /* @__PURE__ */ jsx104(Markdown7, { config: { link: { target: "_blank" } }, children: component.markdown }) });
18699
+ return /* @__PURE__ */ jsx105("div", { className: getTextAlignmentAndMargin2(component), children: /* @__PURE__ */ jsx105(Markdown7, { config: { link: { target: "_blank" } }, children: component.markdown }) });
18444
18700
  };
18445
18701
 
18446
18702
  // src/legacy/layout/image/DynamicImage.tsx
18447
18703
  import { Image as Image2 } from "@transferwise/components";
18448
18704
  import { useEffect as useEffect16, useState as useState22 } from "react";
18449
- import { jsx as jsx105 } from "react/jsx-runtime";
18705
+ import { jsx as jsx106 } from "react/jsx-runtime";
18450
18706
  function DynamicImage({ component: image }) {
18451
- const { url, size: size2, text, margin, accessibilityDescription } = image;
18707
+ var _a, _b, _c;
18708
+ const { content, url, size: size2, text, margin, accessibilityDescription } = image;
18452
18709
  const httpClient = useHttpClient();
18453
18710
  const [imageSource, setImageSource] = useState22("");
18454
18711
  useEffect16(() => {
18455
- void getImageSource2(httpClient, url).then(setImageSource);
18456
- }, [url, httpClient]);
18712
+ if (content) {
18713
+ const { uri, url: contentUrl } = content;
18714
+ if (uri && !uri.startsWith("urn:")) {
18715
+ void getImageSource2(httpClient, uri).then(setImageSource);
18716
+ return;
18717
+ }
18718
+ if (contentUrl) {
18719
+ void getImageSource2(httpClient, contentUrl).then(setImageSource);
18720
+ return;
18721
+ }
18722
+ }
18723
+ if (url) {
18724
+ void getImageSource2(httpClient, url).then(setImageSource);
18725
+ }
18726
+ }, [content, url, httpClient]);
18457
18727
  const imageProps = {
18458
- alt: accessibilityDescription || text || "",
18728
+ alt: (_c = (_b = (_a = content == null ? void 0 : content.accessibilityDescription) != null ? _a : accessibilityDescription) != null ? _b : text) != null ? _c : "",
18459
18729
  src: imageSource,
18460
18730
  stretch: true,
18461
18731
  shrink: true
@@ -18463,7 +18733,7 @@ function DynamicImage({ component: image }) {
18463
18733
  if (!imageSource) {
18464
18734
  return null;
18465
18735
  }
18466
- return /* @__PURE__ */ jsx105("div", { className: `df-image ${size2 || "md"}`, children: /* @__PURE__ */ jsx105(Image2, __spreadValues({ className: `img-responsive ${getMargin2(margin || "md")}` }, imageProps)) });
18736
+ return /* @__PURE__ */ jsx106("div", { className: `df-image ${size2 || "md"}`, children: /* @__PURE__ */ jsx106(Image2, __spreadValues({ className: `img-responsive ${getMargin2(margin || "md")}` }, imageProps)) });
18467
18737
  }
18468
18738
  var readImageBlobAsDataURL2 = (imageBlob) => (
18469
18739
  // we can safely assume the type of reader.result is string
@@ -18499,48 +18769,48 @@ var getImageSource2 = async (httpClient, imageUrl) => {
18499
18769
  var DynamicImage_default = DynamicImage;
18500
18770
 
18501
18771
  // src/legacy/layout/instructions/DynamicInstructions.tsx
18502
- import { Header as Header12, InstructionsList as InstructionsList2 } from "@transferwise/components";
18503
- import { jsx as jsx106, jsxs as jsxs37 } from "react/jsx-runtime";
18772
+ import { Header as Header13, InstructionsList as InstructionsList2 } from "@transferwise/components";
18773
+ import { jsx as jsx107, jsxs as jsxs38 } from "react/jsx-runtime";
18504
18774
  var doContext2 = ["positive", "neutral"];
18505
18775
  var dontContext2 = ["warning", "negative"];
18506
18776
  var DynamicInstructions = ({ component }) => {
18507
18777
  const { items } = component;
18508
18778
  const dos = items.filter((item) => doContext2.includes(item.context)).map(({ text }) => text);
18509
18779
  const donts = items.filter((item) => dontContext2.includes(item.context)).map(({ text }) => text);
18510
- return /* @__PURE__ */ jsxs37("div", { className: getMargin2(component.margin || "md"), children: [
18511
- component.title ? /* @__PURE__ */ jsx106(Header12, { title: component.title }) : null,
18512
- /* @__PURE__ */ jsx106(InstructionsList2, { dos, donts })
18780
+ return /* @__PURE__ */ jsxs38("div", { className: getMargin2(component.margin || "md"), children: [
18781
+ component.title ? /* @__PURE__ */ jsx107(Header13, { title: component.title }) : null,
18782
+ /* @__PURE__ */ jsx107(InstructionsList2, { dos, donts })
18513
18783
  ] });
18514
18784
  };
18515
18785
  var DynamicInstructions_default = DynamicInstructions;
18516
18786
 
18517
18787
  // src/legacy/layout/DynamicLayout.tsx
18518
- import { Fragment as Fragment20, jsx as jsx107 } from "react/jsx-runtime";
18788
+ import { Fragment as Fragment20, jsx as jsx108 } from "react/jsx-runtime";
18519
18789
  var getKey = (component) => JSON.stringify(component);
18520
18790
  function DynamicLayout(props) {
18521
18791
  const { components, model, submitted, errors, onModelChange, onAction, onPersistAsync, baseUrl } = props;
18522
18792
  const renderComponent = (component) => {
18523
18793
  switch (component.type) {
18524
18794
  case "heading":
18525
- return /* @__PURE__ */ jsx107(DynamicHeading_default, { component }, getKey(component));
18795
+ return /* @__PURE__ */ jsx108(DynamicHeading_default, { component }, getKey(component));
18526
18796
  case "paragraph":
18527
- return /* @__PURE__ */ jsx107(DynamicParagraph_default, { component }, getKey(component));
18797
+ return /* @__PURE__ */ jsx108(DynamicParagraph_default, { component }, getKey(component));
18528
18798
  case "image":
18529
- return /* @__PURE__ */ jsx107(DynamicImage_default, { component }, getKey(component));
18799
+ return /* @__PURE__ */ jsx108(DynamicImage_default, { component }, getKey(component));
18530
18800
  case "alert":
18531
- return /* @__PURE__ */ jsx107(DynamicAlert_default, { component, onAction }, getKey(component));
18801
+ return /* @__PURE__ */ jsx108(DynamicAlert_default, { component, onAction }, getKey(component));
18532
18802
  case "review":
18533
- return /* @__PURE__ */ jsx107(DynamicReview_default, { component, onAction }, getKey(component));
18803
+ return /* @__PURE__ */ jsx108(DynamicReview_default, { component, onAction }, getKey(component));
18534
18804
  case "divider":
18535
- return /* @__PURE__ */ jsx107(DynamicDivider_default, { component }, getKey(component));
18805
+ return /* @__PURE__ */ jsx108(DynamicDivider_default, { component }, getKey(component));
18536
18806
  case "info":
18537
- return /* @__PURE__ */ jsx107(DynamicInfo, { component }, getKey(component));
18807
+ return /* @__PURE__ */ jsx108(DynamicInfo, { component }, getKey(component));
18538
18808
  case "instructions":
18539
- return /* @__PURE__ */ jsx107(DynamicInstructions_default, { component }, getKey(component));
18809
+ return /* @__PURE__ */ jsx108(DynamicInstructions_default, { component }, getKey(component));
18540
18810
  case "markdown":
18541
- return /* @__PURE__ */ jsx107(DynamicMarkdown, { component }, getKey(component));
18811
+ return /* @__PURE__ */ jsx108(DynamicMarkdown, { component }, getKey(component));
18542
18812
  case "columns":
18543
- return /* @__PURE__ */ jsx107(
18813
+ return /* @__PURE__ */ jsx108(
18544
18814
  DynamicColumns_default,
18545
18815
  {
18546
18816
  component,
@@ -18554,7 +18824,7 @@ function DynamicLayout(props) {
18554
18824
  getKey(component)
18555
18825
  );
18556
18826
  case "form":
18557
- return /* @__PURE__ */ jsx107(
18827
+ return /* @__PURE__ */ jsx108(
18558
18828
  DynamicForm_default,
18559
18829
  {
18560
18830
  component,
@@ -18567,9 +18837,9 @@ function DynamicLayout(props) {
18567
18837
  getKey(__spreadProps(__spreadValues({}, component), { errors: errors != null ? errors : null }))
18568
18838
  );
18569
18839
  case "button":
18570
- return /* @__PURE__ */ jsx107(DynamicButton_default, { component, onAction }, getKey(component));
18840
+ return /* @__PURE__ */ jsx108(DynamicButton_default, { component, onAction }, getKey(component));
18571
18841
  case "box":
18572
- return /* @__PURE__ */ jsx107(
18842
+ return /* @__PURE__ */ jsx108(
18573
18843
  DynamicBox_default,
18574
18844
  {
18575
18845
  component,
@@ -18583,18 +18853,18 @@ function DynamicLayout(props) {
18583
18853
  getKey(component)
18584
18854
  );
18585
18855
  case "decision":
18586
- return /* @__PURE__ */ jsx107(DynamicDecision_default, { component, onAction }, getKey(component));
18856
+ return /* @__PURE__ */ jsx108(DynamicDecision_default, { component, onAction }, getKey(component));
18587
18857
  case "external":
18588
- return /* @__PURE__ */ jsx107(DynamicExternal_default, { component, onAction }, getKey(component));
18858
+ return /* @__PURE__ */ jsx108(DynamicExternal_default, { component, onAction }, getKey(component));
18589
18859
  case "list":
18590
18860
  case "status-list":
18591
- return /* @__PURE__ */ jsx107(DynamicStatusList_default, { component, onAction }, getKey(component));
18861
+ return /* @__PURE__ */ jsx108(DynamicStatusList_default, { component, onAction }, getKey(component));
18592
18862
  case "loading-indicator":
18593
- return /* @__PURE__ */ jsx107(DynamicLoadingIndicator_default, { component }, getKey(component));
18863
+ return /* @__PURE__ */ jsx108(DynamicLoadingIndicator_default, { component }, getKey(component));
18594
18864
  case "search":
18595
- return /* @__PURE__ */ jsx107(DynamicSearch_default, { component, onAction }, getKey(component));
18865
+ return /* @__PURE__ */ jsx108(DynamicSearch_default, { component, onAction }, getKey(component));
18596
18866
  case "modal":
18597
- return /* @__PURE__ */ jsx107(
18867
+ return /* @__PURE__ */ jsx108(
18598
18868
  DynamicModal_default,
18599
18869
  {
18600
18870
  component,
@@ -18608,22 +18878,22 @@ function DynamicLayout(props) {
18608
18878
  getKey(component)
18609
18879
  );
18610
18880
  default:
18611
- return /* @__PURE__ */ jsx107("div", {}, getKey(component));
18881
+ return /* @__PURE__ */ jsx108("div", {}, getKey(component));
18612
18882
  }
18613
18883
  };
18614
18884
  if (useHasHttpClientProvider() || baseUrl == null) {
18615
- return /* @__PURE__ */ jsx107(Fragment20, { children: components.map(renderComponent) });
18885
+ return /* @__PURE__ */ jsx108(Fragment20, { children: components.map(renderComponent) });
18616
18886
  }
18617
- return /* @__PURE__ */ jsx107(HttpClientProviderFromBaseUrl, { baseUrl, children: components.map(renderComponent) });
18887
+ return /* @__PURE__ */ jsx108(HttpClientProviderFromBaseUrl, { baseUrl, children: components.map(renderComponent) });
18618
18888
  }
18619
18889
  var DynamicLayout_default = DynamicLayout;
18620
18890
 
18621
18891
  // src/legacy/layout/list/DynamicStatusList.tsx
18622
- import { Header as Header13, Summary as Summary2 } from "@transferwise/components";
18623
- import { jsx as jsx108, jsxs as jsxs38 } from "react/jsx-runtime";
18892
+ import { Header as Header14, Summary as Summary2 } from "@transferwise/components";
18893
+ import { jsx as jsx109, jsxs as jsxs39 } from "react/jsx-runtime";
18624
18894
  var DynamicStatusList = ({ component, onAction }) => {
18625
- return /* @__PURE__ */ jsxs38("div", { className: getMargin2(component.margin || "md"), children: [
18626
- component.title ? /* @__PURE__ */ jsx108(Header13, { title: component.title, className: "m-b-2" }) : null,
18895
+ return /* @__PURE__ */ jsxs39("div", { className: getMargin2(component.margin || "md"), children: [
18896
+ component.title ? /* @__PURE__ */ jsx109(Header14, { title: component.title, className: "m-b-2" }) : null,
18627
18897
  component.items.map((item) => mapListItemToSummary(item, onAction))
18628
18898
  ] });
18629
18899
  };
@@ -18633,8 +18903,8 @@ var mapListItemToSummary = (props, onAction) => {
18633
18903
  title,
18634
18904
  description,
18635
18905
  action: "callToAction" in props ? callToActionToSummaryAction(props == null ? void 0 : props.callToAction, onAction) : void 0
18636
- }, (icon == null ? void 0 : icon.name) ? { icon: /* @__PURE__ */ jsx108(DynamicIcon_default2, { type: icon.name }) } : {}), status ? { status: statusMap[status] } : {});
18637
- return /* @__PURE__ */ jsx108(Summary2, __spreadValues({}, summaryProps), `${title}/${description || ""}`);
18906
+ }, (icon == null ? void 0 : icon.name) ? { icon: /* @__PURE__ */ jsx109(DynamicIcon_default2, { type: icon.name }) } : {}), status ? { status: statusMap[status] } : {});
18907
+ return /* @__PURE__ */ jsx109(Summary2, __spreadValues({}, summaryProps), `${title}/${description || ""}`);
18638
18908
  };
18639
18909
  var callToActionToSummaryAction = (callToAction, onAction) => {
18640
18910
  if (!callToAction) {
@@ -18704,10 +18974,10 @@ var DynamicStatusList_default = DynamicStatusList;
18704
18974
 
18705
18975
  // src/legacy/layout/loadingIndicator/DynamicLoadingIndicator.tsx
18706
18976
  import { Loader as Loader3 } from "@transferwise/components";
18707
- import { jsx as jsx109 } from "react/jsx-runtime";
18977
+ import { jsx as jsx110 } from "react/jsx-runtime";
18708
18978
  var DynamicLoadingIndicator = ({ component }) => {
18709
18979
  const { margin = "md", size: size2 = "md" } = component;
18710
- return /* @__PURE__ */ jsx109(
18980
+ return /* @__PURE__ */ jsx110(
18711
18981
  Loader3,
18712
18982
  {
18713
18983
  size: size2,
@@ -18750,12 +19020,12 @@ function noop3() {
18750
19020
  }
18751
19021
 
18752
19022
  // src/legacy/layout/paragraph/DynamicParagraph.tsx
18753
- import { jsx as jsx110, jsxs as jsxs39 } from "react/jsx-runtime";
19023
+ import { jsx as jsx111, jsxs as jsxs40 } from "react/jsx-runtime";
18754
19024
  function DynamicParagraph({ component }) {
18755
- return component.control === "copyable" ? /* @__PURE__ */ jsx110(CopyableDynamicParagraph, { component }) : /* @__PURE__ */ jsx110(BasicDynamicParagraph, { component });
19025
+ return component.control === "copyable" ? /* @__PURE__ */ jsx111(CopyableDynamicParagraph, { component }) : /* @__PURE__ */ jsx111(BasicDynamicParagraph, { component });
18756
19026
  }
18757
19027
  function BasicDynamicParagraph({ component }) {
18758
- return /* @__PURE__ */ jsx110("p", { className: `np-text-body-large ${getTextAlignmentAndMargin2(component)}`, children: component.text });
19028
+ return /* @__PURE__ */ jsx111("p", { className: `np-text-body-large ${getTextAlignmentAndMargin2(component)}`, children: component.text });
18759
19029
  }
18760
19030
  function CopyableDynamicParagraph({ component }) {
18761
19031
  const { formatMessage } = useIntl21();
@@ -18765,22 +19035,22 @@ function CopyableDynamicParagraph({ component }) {
18765
19035
  var _a;
18766
19036
  (_a = navigator.clipboard) == null ? void 0 : _a.writeText(text).then(() => createSnackbar({ text: formatMessage(paragraph_messages_default2.copied) })).catch(noop4);
18767
19037
  };
18768
- const classNames16 = `${getTextAlignmentAndMargin2({
19038
+ const classNames17 = `${getTextAlignmentAndMargin2({
18769
19039
  align: component.align,
18770
19040
  margin: "sm"
18771
19041
  })} form-control`;
18772
- return /* @__PURE__ */ jsxs39("div", { className: getTextAlignmentAndMargin2(component), children: [
18773
- /* @__PURE__ */ jsx110(
19042
+ return /* @__PURE__ */ jsxs40("div", { className: getTextAlignmentAndMargin2(component), children: [
19043
+ /* @__PURE__ */ jsx111(
18774
19044
  "input",
18775
19045
  {
18776
19046
  type: "text",
18777
- className: classNames16,
19047
+ className: classNames17,
18778
19048
  value: text,
18779
19049
  readOnly: true,
18780
19050
  style: { textOverflow: "ellipsis" }
18781
19051
  }
18782
19052
  ),
18783
- /* @__PURE__ */ jsx110(Button9, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default2.copy) })
19053
+ /* @__PURE__ */ jsx111(Button9, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default2.copy) })
18784
19054
  ] });
18785
19055
  }
18786
19056
  function noop4() {
@@ -18788,8 +19058,8 @@ function noop4() {
18788
19058
  var DynamicParagraph_default = DynamicParagraph;
18789
19059
 
18790
19060
  // src/legacy/layout/review/DynamicReview.tsx
18791
- import { DefinitionList as DefinitionList3, Header as Header14 } from "@transferwise/components";
18792
- import { Fragment as Fragment21, jsx as jsx111, jsxs as jsxs40 } from "react/jsx-runtime";
19061
+ import { DefinitionList as DefinitionList3, Header as Header15 } from "@transferwise/components";
19062
+ import { Fragment as Fragment21, jsx as jsx112, jsxs as jsxs41 } from "react/jsx-runtime";
18793
19063
  var getDefinitions = (orientation, review) => review.fields.map(({ label, value, help }, index) => ({
18794
19064
  key: String(index),
18795
19065
  title: label,
@@ -18797,14 +19067,14 @@ var getDefinitions = (orientation, review) => review.fields.map(({ label, value,
18797
19067
  }));
18798
19068
  var getFieldValue2 = (value, help, orientation) => {
18799
19069
  if (help) {
18800
- return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ jsxs40(Fragment21, { children: [
18801
- /* @__PURE__ */ jsx111(Help_default2, { help }),
19070
+ return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ jsxs41(Fragment21, { children: [
19071
+ /* @__PURE__ */ jsx112(Help_default2, { help }),
18802
19072
  " ",
18803
19073
  value
18804
- ] }) : /* @__PURE__ */ jsxs40(Fragment21, { children: [
19074
+ ] }) : /* @__PURE__ */ jsxs41(Fragment21, { children: [
18805
19075
  value,
18806
19076
  " ",
18807
- /* @__PURE__ */ jsx111(Help_default2, { help })
19077
+ /* @__PURE__ */ jsx112(Help_default2, { help })
18808
19078
  ] });
18809
19079
  }
18810
19080
  return value;
@@ -18837,7 +19107,7 @@ function DynamicReview({ component: review, onAction }) {
18837
19107
  const { action: behaviorAction2 } = behavior;
18838
19108
  return {
18839
19109
  text: title != null ? title : "",
18840
- onClick: behaviorAction2 ? getOnClick(behaviorAction2) : void 0
19110
+ onClick: behaviorAction2 ? getOnClick2(behaviorAction2) : void 0
18841
19111
  };
18842
19112
  }
18843
19113
  case "link": {
@@ -18852,7 +19122,7 @@ function DynamicReview({ component: review, onAction }) {
18852
19122
  if (behaviorAction) {
18853
19123
  return {
18854
19124
  text: title != null ? title : "",
18855
- onClick: behaviorAction ? getOnClick(behaviorAction) : void 0
19125
+ onClick: behaviorAction ? getOnClick2(behaviorAction) : void 0
18856
19126
  };
18857
19127
  }
18858
19128
  if (link) {
@@ -18864,10 +19134,10 @@ function DynamicReview({ component: review, onAction }) {
18864
19134
  }
18865
19135
  return {
18866
19136
  text: title != null ? title : "",
18867
- onClick: action ? getOnClick(action) : void 0
19137
+ onClick: action ? getOnClick2(action) : void 0
18868
19138
  };
18869
19139
  };
18870
- const getOnClick = (action) => {
19140
+ const getOnClick2 = (action) => {
18871
19141
  return (event) => {
18872
19142
  event.preventDefault();
18873
19143
  if (action) {
@@ -18877,10 +19147,10 @@ function DynamicReview({ component: review, onAction }) {
18877
19147
  };
18878
19148
  const orientation = getDefinitionListLayout(review);
18879
19149
  const callToAction = review.callToAction ? getReviewAction3(review.callToAction) : null;
18880
- const legacyCallToAction = !callToAction && review.action ? { text: (_a = review.action.title) != null ? _a : "", onClick: getOnClick(review.action) } : null;
18881
- return /* @__PURE__ */ jsxs40("div", { className: margin, children: [
18882
- review.title && /* @__PURE__ */ jsx111(Header14, { title: review.title, action: (_b = callToAction != null ? callToAction : legacyCallToAction) != null ? _b : void 0 }),
18883
- /* @__PURE__ */ jsx111("div", { className: margin, children: /* @__PURE__ */ jsx111(DefinitionList3, { layout: orientation, definitions: getDefinitions(orientation, review) }) })
19150
+ const legacyCallToAction = !callToAction && review.action ? { text: (_a = review.action.title) != null ? _a : "", onClick: getOnClick2(review.action) } : null;
19151
+ return /* @__PURE__ */ jsxs41("div", { className: margin, children: [
19152
+ review.title && /* @__PURE__ */ jsx112(Header15, { title: review.title, action: (_b = callToAction != null ? callToAction : legacyCallToAction) != null ? _b : void 0 }),
19153
+ /* @__PURE__ */ jsx112("div", { className: margin, children: /* @__PURE__ */ jsx112(DefinitionList3, { layout: orientation, definitions: getDefinitions(orientation, review) }) })
18884
19154
  ] });
18885
19155
  }
18886
19156
  var DynamicReview_default = DynamicReview;
@@ -18891,11 +19161,11 @@ import { Search as Search2 } from "@transferwise/icons";
18891
19161
 
18892
19162
  // src/legacy/layout/search/SearchInput.tsx
18893
19163
  import { Input as Input6 } from "@transferwise/components";
18894
- import { jsx as jsx112, jsxs as jsxs41 } from "react/jsx-runtime";
19164
+ import { jsx as jsx113, jsxs as jsxs42 } from "react/jsx-runtime";
18895
19165
  var SearchInput = ({ title, value, onFocus, onChange }) => {
18896
- return /* @__PURE__ */ jsxs41("label", { className: "control-label d-inline", children: [
19166
+ return /* @__PURE__ */ jsxs42("label", { className: "control-label d-inline", children: [
18897
19167
  title,
18898
- /* @__PURE__ */ jsx112(
19168
+ /* @__PURE__ */ jsx113(
18899
19169
  Input6,
18900
19170
  {
18901
19171
  type: "text",
@@ -18911,12 +19181,12 @@ var SearchInput = ({ title, value, onFocus, onChange }) => {
18911
19181
  // src/legacy/layout/search/SearchResults.tsx
18912
19182
  import { NavigationOption as NavigationOption7, NavigationOptionsList as NavigationOptionsList4 } from "@transferwise/components";
18913
19183
  import { useIntl as useIntl22 } from "react-intl";
18914
- import { jsx as jsx113, jsxs as jsxs42 } from "react/jsx-runtime";
19184
+ import { jsx as jsx114, jsxs as jsxs43 } from "react/jsx-runtime";
18915
19185
  function SearchResults2({ results, emptyMessage, onSelect }) {
18916
19186
  if (results.length === 0) {
18917
- return /* @__PURE__ */ jsx113("p", { className: "m-t-2", children: emptyMessage });
19187
+ return /* @__PURE__ */ jsx114("p", { className: "m-t-2", children: emptyMessage });
18918
19188
  }
18919
- return /* @__PURE__ */ jsx113(NavigationOptionsList4, { children: results.map((result) => /* @__PURE__ */ jsx113(
19189
+ return /* @__PURE__ */ jsx114(NavigationOptionsList4, { children: results.map((result) => /* @__PURE__ */ jsx114(
18920
19190
  NavigationOption7,
18921
19191
  {
18922
19192
  title: result.title,
@@ -18931,10 +19201,10 @@ function SearchResults2({ results, emptyMessage, onSelect }) {
18931
19201
  }
18932
19202
  function ErrorResult2({ onRetrySearch }) {
18933
19203
  const intl = useIntl22();
18934
- return /* @__PURE__ */ jsxs42("p", { className: "m-t-2", children: [
19204
+ return /* @__PURE__ */ jsxs43("p", { className: "m-t-2", children: [
18935
19205
  intl.formatMessage(generic_error_messages_default.genericError),
18936
19206
  "\xA0",
18937
- /* @__PURE__ */ jsx113(
19207
+ /* @__PURE__ */ jsx114(
18938
19208
  "a",
18939
19209
  {
18940
19210
  href: "/",
@@ -19018,7 +19288,7 @@ var addQueryParameter2 = (url, key, value) => {
19018
19288
  };
19019
19289
 
19020
19290
  // src/legacy/layout/search/DynamicSearch.tsx
19021
- var import_classnames14 = __toESM(require_classnames());
19291
+ var import_classnames15 = __toESM(require_classnames());
19022
19292
  import { Markdown as Markdown8, Typeahead as Typeahead2 } from "@transferwise/components";
19023
19293
  import { useIntl as useIntl23 } from "react-intl";
19024
19294
 
@@ -19033,7 +19303,7 @@ var search_messages_default2 = defineMessages20({
19033
19303
  });
19034
19304
 
19035
19305
  // src/legacy/layout/search/DynamicSearch.tsx
19036
- import { jsx as jsx114, jsxs as jsxs43 } from "react/jsx-runtime";
19306
+ import { jsx as jsx115, jsxs as jsxs44 } from "react/jsx-runtime";
19037
19307
  var DEBOUNCE_TIME2 = 400;
19038
19308
  function DynamicSearch({ component, onAction }) {
19039
19309
  const [query, setQuery] = useState24("");
@@ -19071,9 +19341,9 @@ function DynamicSearch({ component, onAction }) {
19071
19341
  };
19072
19342
  const loadingMessage = intl.formatMessage(search_messages_default2.loading);
19073
19343
  if (control === "inline") {
19074
- return /* @__PURE__ */ jsx114("div", { className: (0, import_classnames14.default)(getMargin2(margin != null ? margin : "md"), "df-search-typeahead"), children: /* @__PURE__ */ jsxs43("label", { className: "control-label d-inline", children: [
19344
+ return /* @__PURE__ */ jsx115("div", { className: (0, import_classnames15.default)(getMargin2(margin != null ? margin : "md"), "df-search-typeahead"), children: /* @__PURE__ */ jsxs44("label", { className: "control-label d-inline", children: [
19075
19345
  title,
19076
- /* @__PURE__ */ jsx114("div", { className: "m-t-1", children: /* @__PURE__ */ jsx114(
19346
+ /* @__PURE__ */ jsx115("div", { className: "m-t-1", children: /* @__PURE__ */ jsx115(
19077
19347
  Typeahead2,
19078
19348
  {
19079
19349
  id: "typeahead-input-id",
@@ -19081,7 +19351,7 @@ function DynamicSearch({ component, onAction }) {
19081
19351
  name: "typeahead-input-name",
19082
19352
  size: "md",
19083
19353
  maxHeight: 100,
19084
- footer: /* @__PURE__ */ jsx114(
19354
+ footer: /* @__PURE__ */ jsx115(
19085
19355
  TypeaheadFooter2,
19086
19356
  {
19087
19357
  state: status,
@@ -19093,7 +19363,7 @@ function DynamicSearch({ component, onAction }) {
19093
19363
  ),
19094
19364
  multiple: false,
19095
19365
  clearable: false,
19096
- addon: /* @__PURE__ */ jsx114(Search2, { size: 24 }),
19366
+ addon: /* @__PURE__ */ jsx115(Search2, { size: 24 }),
19097
19367
  options: results.map(mapResultToTypeaheadOption2),
19098
19368
  onChange: (values) => {
19099
19369
  if (values.length > 0) {
@@ -19108,11 +19378,11 @@ function DynamicSearch({ component, onAction }) {
19108
19378
  ) })
19109
19379
  ] }) });
19110
19380
  }
19111
- return /* @__PURE__ */ jsxs43("div", { className: getMargin2(margin != null ? margin : "md"), children: [
19112
- /* @__PURE__ */ jsx114(SearchInput, { title, value: query, onChange, onFocus: onSearchStart }),
19113
- status === "loading" && /* @__PURE__ */ jsx114(DynamicLoadingIndicator_default, { component: { type: "loading-indicator", size: "sm" } }),
19114
- status === "error" && /* @__PURE__ */ jsx114(ErrorResult2, { onRetrySearch }),
19115
- status === "success" && /* @__PURE__ */ jsx114(SearchResults2, { results, emptyMessage, onSelect: onResultSelected })
19381
+ return /* @__PURE__ */ jsxs44("div", { className: getMargin2(margin != null ? margin : "md"), children: [
19382
+ /* @__PURE__ */ jsx115(SearchInput, { title, value: query, onChange, onFocus: onSearchStart }),
19383
+ status === "loading" && /* @__PURE__ */ jsx115(DynamicLoadingIndicator_default, { component: { type: "loading-indicator", size: "sm" } }),
19384
+ status === "error" && /* @__PURE__ */ jsx115(ErrorResult2, { onRetrySearch }),
19385
+ status === "success" && /* @__PURE__ */ jsx115(SearchResults2, { results, emptyMessage, onSelect: onResultSelected })
19116
19386
  ] });
19117
19387
  }
19118
19388
  function mapResultToTypeaheadOption2(result) {
@@ -19132,13 +19402,13 @@ function TypeaheadFooter2({
19132
19402
  onRetrySearch
19133
19403
  }) {
19134
19404
  if (state === "success" && results.length === 0) {
19135
- return /* @__PURE__ */ jsx114(Markdown8, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: emptyMessage });
19405
+ return /* @__PURE__ */ jsx115(Markdown8, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: emptyMessage });
19136
19406
  }
19137
19407
  if (state === "error" && results.length === 0) {
19138
- return /* @__PURE__ */ jsx114("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx114(ErrorResult2, { onRetrySearch }) });
19408
+ return /* @__PURE__ */ jsx115("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx115(ErrorResult2, { onRetrySearch }) });
19139
19409
  }
19140
19410
  if (state === "loading" || results.length === 0) {
19141
- return /* @__PURE__ */ jsx114("p", { className: "m-t-2 m-x-2", children: loadingMessage });
19411
+ return /* @__PURE__ */ jsx115("p", { className: "m-t-2 m-x-2", children: loadingMessage });
19142
19412
  }
19143
19413
  return null;
19144
19414
  }
@@ -19147,21 +19417,21 @@ var DynamicSearch_default = DynamicSearch;
19147
19417
  // src/legacy/layout/modal/DynamicModal.tsx
19148
19418
  import { Button as Button10, Modal as Modal4 } from "@transferwise/components";
19149
19419
  import { useState as useState25 } from "react";
19150
- import { jsx as jsx115, jsxs as jsxs44 } from "react/jsx-runtime";
19420
+ import { jsx as jsx116, jsxs as jsxs45 } from "react/jsx-runtime";
19151
19421
  function DynamicModal(props) {
19152
19422
  const [visible, isVisible] = useState25(false);
19153
19423
  const { component, onAction } = props;
19154
19424
  const { margin = "md" } = component;
19155
- return /* @__PURE__ */ jsxs44("div", { className: getTextAlignmentAndMargin2({ margin }), children: [
19156
- /* @__PURE__ */ jsx115(Button10, { priority: "tertiary", block: true, onClick: () => isVisible(true), children: component.trigger.title }),
19157
- /* @__PURE__ */ jsx115(
19425
+ return /* @__PURE__ */ jsxs45("div", { className: getTextAlignmentAndMargin2({ margin }), children: [
19426
+ /* @__PURE__ */ jsx116(Button10, { priority: "tertiary", block: true, onClick: () => isVisible(true), children: component.trigger.title }),
19427
+ /* @__PURE__ */ jsx116(
19158
19428
  Modal4,
19159
19429
  {
19160
19430
  scroll: "content",
19161
19431
  open: visible,
19162
19432
  size: "lg",
19163
19433
  title: component.content.title,
19164
- body: /* @__PURE__ */ jsx115(
19434
+ body: /* @__PURE__ */ jsx116(
19165
19435
  DynamicLayout_default,
19166
19436
  __spreadProps(__spreadValues({}, props), {
19167
19437
  components: component.content.components,
@@ -19179,7 +19449,7 @@ function DynamicModal(props) {
19179
19449
  var DynamicModal_default = DynamicModal;
19180
19450
 
19181
19451
  // src/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.tsx
19182
- import { Fragment as Fragment22, jsx as jsx116, jsxs as jsxs45 } from "react/jsx-runtime";
19452
+ import { Fragment as Fragment22, jsx as jsx117, jsxs as jsxs46 } from "react/jsx-runtime";
19183
19453
  var isNullish3 = (value) => isNull3(value) || isUndefined3(value);
19184
19454
  var getDefaultValue = (schema) => {
19185
19455
  return schema.type === "boolean" && isNullish3(schema.default) ? false : schema.default;
@@ -19257,15 +19527,15 @@ var BasicTypeSchema = (props) => {
19257
19527
  const schemaHelp = props.schema.help;
19258
19528
  const feedbackId = `${id}-feedback`;
19259
19529
  const labelId = `${id}-label`;
19260
- return !isHidden ? /* @__PURE__ */ jsxs45(Fragment22, { children: [
19261
- props.schema.alert && /* @__PURE__ */ jsx116(DynamicAlert_default, { component: props.schema.alert }),
19262
- /* @__PURE__ */ jsxs45("div", { className: (0, import_classnames15.default)(formGroupClasses), children: [
19263
- showLabel && /* @__PURE__ */ jsxs45("div", { className: "d-inline-block m-b-1", children: [
19264
- /* @__PURE__ */ jsx116("label", { className: "control-label d-inline", htmlFor: id, id: labelId, children: props.schema.title }),
19265
- !!schemaHelp && /* @__PURE__ */ jsx116(Help_default2, { help: schemaHelp })
19530
+ return !isHidden ? /* @__PURE__ */ jsxs46(Fragment22, { children: [
19531
+ props.schema.alert && /* @__PURE__ */ jsx117(DynamicAlert_default, { component: props.schema.alert }),
19532
+ /* @__PURE__ */ jsxs46("div", { className: (0, import_classnames16.default)(formGroupClasses), children: [
19533
+ showLabel && /* @__PURE__ */ jsxs46("div", { className: "d-inline-block m-b-1", children: [
19534
+ /* @__PURE__ */ jsx117("label", { className: "control-label d-inline", htmlFor: id, id: labelId, children: props.schema.title }),
19535
+ !!schemaHelp && /* @__PURE__ */ jsx117(Help_default2, { help: schemaHelp })
19266
19536
  ] }),
19267
- !showLabel && !!schemaHelp && /* @__PURE__ */ jsx116(Help_default2, { help: schemaHelp }),
19268
- /* @__PURE__ */ jsx116(
19537
+ !showLabel && !!schemaHelp && /* @__PURE__ */ jsx117(Help_default2, { help: schemaHelp }),
19538
+ /* @__PURE__ */ jsx117(
19269
19539
  SchemaFormControl_default,
19270
19540
  {
19271
19541
  id,
@@ -19279,7 +19549,7 @@ var BasicTypeSchema = (props) => {
19279
19549
  labelledBy: labelId
19280
19550
  }
19281
19551
  ),
19282
- /* @__PURE__ */ jsx116(
19552
+ /* @__PURE__ */ jsx117(
19283
19553
  ControlFeedback_default,
19284
19554
  {
19285
19555
  id: feedbackId,
@@ -19299,7 +19569,7 @@ var BasicTypeSchema = (props) => {
19299
19569
  var BasicTypeSchema_default = BasicTypeSchema;
19300
19570
 
19301
19571
  // src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.tsx
19302
- import { jsx as jsx117 } from "react/jsx-runtime";
19572
+ import { jsx as jsx118 } from "react/jsx-runtime";
19303
19573
  var getIdFromResponse = (idProperty, response) => response[idProperty];
19304
19574
  var getErrorFromResponse = (errorProperty, response) => {
19305
19575
  var _a;
@@ -19389,7 +19659,7 @@ function PersistAsyncBasicSchema(props) {
19389
19659
  setPersistAsyncModel(newPersistAsyncModel);
19390
19660
  }
19391
19661
  };
19392
- return /* @__PURE__ */ jsx117(
19662
+ return /* @__PURE__ */ jsx118(
19393
19663
  BasicTypeSchema_default,
19394
19664
  {
19395
19665
  required,
@@ -19603,7 +19873,7 @@ function useStepPolling(polling, onAction) {
19603
19873
  }
19604
19874
 
19605
19875
  // src/legacy/step/layoutStep/LayoutStep.tsx
19606
- import { jsx as jsx118 } from "react/jsx-runtime";
19876
+ import { jsx as jsx119 } from "react/jsx-runtime";
19607
19877
  var getComponents = (step, options) => {
19608
19878
  var _a;
19609
19879
  if (isEmpty(step)) {
@@ -19626,7 +19896,7 @@ var LayoutStep = (props) => {
19626
19896
  onEvent("Dynamic Flow - onAction supressed", { reason: "LayoutStep - loading state" });
19627
19897
  };
19628
19898
  useStepPolling(stepSpecification.polling, onAction);
19629
- return /* @__PURE__ */ jsx118(
19899
+ return /* @__PURE__ */ jsx119(
19630
19900
  DynamicLayout_default,
19631
19901
  {
19632
19902
  components,
@@ -19712,15 +19982,15 @@ var CameraCapture_messages_default = defineMessages21({
19712
19982
  // src/common/cameraCapture/components/bottomBar/BottomBar.tsx
19713
19983
  import { Button as Button11, ControlType, Priority, Size as Size3 } from "@transferwise/components";
19714
19984
  import { useIntl as useIntl26 } from "react-intl";
19715
- import { jsx as jsx119, jsxs as jsxs46 } from "react/jsx-runtime";
19716
- var CaptureBottomBar = ({ onCapture }) => /* @__PURE__ */ jsx119("div", { className: "bottom-bar", children: /* @__PURE__ */ jsx119(CaptureButton, { onClick: onCapture }) });
19985
+ import { jsx as jsx120, jsxs as jsxs47 } from "react/jsx-runtime";
19986
+ var CaptureBottomBar = ({ onCapture }) => /* @__PURE__ */ jsx120("div", { className: "bottom-bar", children: /* @__PURE__ */ jsx120(CaptureButton, { onClick: onCapture }) });
19717
19987
  var ReviewBottomBar = ({
19718
19988
  onSubmit,
19719
19989
  onRetry
19720
19990
  }) => {
19721
19991
  const intl = useIntl26();
19722
- return /* @__PURE__ */ jsx119("div", { className: "bottom-bar p-x-2", children: /* @__PURE__ */ jsx119("div", { className: "row", children: /* @__PURE__ */ jsxs46("div", { className: "col-xs-12 col-md-6 col-md-offset-3", children: [
19723
- /* @__PURE__ */ jsx119(
19992
+ return /* @__PURE__ */ jsx120("div", { className: "bottom-bar p-x-2", children: /* @__PURE__ */ jsx120("div", { className: "row", children: /* @__PURE__ */ jsxs47("div", { className: "col-xs-12 col-md-6 col-md-offset-3", children: [
19993
+ /* @__PURE__ */ jsx120(
19724
19994
  Button11,
19725
19995
  {
19726
19996
  className: "m-b-1",
@@ -19731,7 +20001,7 @@ var ReviewBottomBar = ({
19731
20001
  children: intl.formatMessage(CameraCapture_messages_default.reviewSubmit)
19732
20002
  }
19733
20003
  ),
19734
- /* @__PURE__ */ jsx119(
20004
+ /* @__PURE__ */ jsx120(
19735
20005
  Button11,
19736
20006
  {
19737
20007
  className: "m-b-2",
@@ -19745,14 +20015,14 @@ var ReviewBottomBar = ({
19745
20015
  )
19746
20016
  ] }) }) });
19747
20017
  };
19748
- var CaptureButton = ({ onClick }) => /* @__PURE__ */ jsx119(
20018
+ var CaptureButton = ({ onClick }) => /* @__PURE__ */ jsx120(
19749
20019
  "button",
19750
20020
  {
19751
20021
  type: "button",
19752
20022
  className: "camera-capture-btn m-b-2",
19753
20023
  "data-testid": "camera-capture-button",
19754
20024
  onClick,
19755
- children: /* @__PURE__ */ jsx119("span", { className: "camera-capture-btn-inner" })
20025
+ children: /* @__PURE__ */ jsx120("span", { className: "camera-capture-btn-inner" })
19756
20026
  }
19757
20027
  );
19758
20028
 
@@ -19770,11 +20040,11 @@ var OrientationLockOverlay_messages_default = defineMessages22({
19770
20040
  });
19771
20041
 
19772
20042
  // src/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.tsx
19773
- import { jsx as jsx120, jsxs as jsxs47 } from "react/jsx-runtime";
20043
+ import { jsx as jsx121, jsxs as jsxs48 } from "react/jsx-runtime";
19774
20044
  function OrientationLockOverlay() {
19775
20045
  const intl = useIntl27();
19776
- return /* @__PURE__ */ jsxs47("div", { className: "orientation-lock-overlay", children: [
19777
- /* @__PURE__ */ jsx120(
20046
+ return /* @__PURE__ */ jsxs48("div", { className: "orientation-lock-overlay", children: [
20047
+ /* @__PURE__ */ jsx121(
19778
20048
  "img",
19779
20049
  {
19780
20050
  className: "m-b-3",
@@ -19784,7 +20054,7 @@ function OrientationLockOverlay() {
19784
20054
  alt: ""
19785
20055
  }
19786
20056
  ),
19787
- /* @__PURE__ */ jsx120("p", { className: "text-center m-b-0", children: intl.formatMessage(OrientationLockOverlay_messages_default.text) })
20057
+ /* @__PURE__ */ jsx121("p", { className: "text-center m-b-0", children: intl.formatMessage(OrientationLockOverlay_messages_default.text) })
19788
20058
  ] });
19789
20059
  }
19790
20060
  var OrientationLockOverlay_default = OrientationLockOverlay;
@@ -19959,7 +20229,7 @@ var getVideoConstraints = async (dir) => {
19959
20229
 
19960
20230
  // src/common/cameraCapture/overlay/Overlay.tsx
19961
20231
  import { useEffect as useEffect23, useRef as useRef7 } from "react";
19962
- import { Fragment as Fragment23, jsx as jsx121, jsxs as jsxs48 } from "react/jsx-runtime";
20232
+ import { Fragment as Fragment23, jsx as jsx122, jsxs as jsxs49 } from "react/jsx-runtime";
19963
20233
  var captureButtonHeight = 92;
19964
20234
  var reviewButtonsHeight = 120;
19965
20235
  var imageHeight = 40;
@@ -19981,18 +20251,18 @@ function Overlay({ overlay, outline, imageUrl, title, instructions, reviewInstru
19981
20251
  return () => window.removeEventListener("resize", listener);
19982
20252
  });
19983
20253
  let helperBoxHeight = (imageUrl ? imageHeight : 0) + (title ? titleHeight : 0) + (instructions ? instructionsHeight : 0);
19984
- let helperBox = /* @__PURE__ */ jsxs48(Fragment23, { children: [
19985
- imageUrl && /* @__PURE__ */ jsx121("img", { className: "camera-capture-img", src: imageUrl, alt: "" }),
19986
- title && /* @__PURE__ */ jsx121("h4", { className: "camera-capture-title", children: title }),
19987
- instructions && /* @__PURE__ */ jsx121("small", { className: "camera-capture-instructions", children: instructions })
20254
+ let helperBox = /* @__PURE__ */ jsxs49(Fragment23, { children: [
20255
+ imageUrl && /* @__PURE__ */ jsx122("img", { className: "camera-capture-img", src: imageUrl, alt: "" }),
20256
+ title && /* @__PURE__ */ jsx122("h4", { className: "camera-capture-title", children: title }),
20257
+ instructions && /* @__PURE__ */ jsx122("small", { className: "camera-capture-instructions", children: instructions })
19988
20258
  ] });
19989
20259
  const frameBottomMargin = captureButtonHeight + helperBoxHeight;
19990
20260
  if (reviewInstructions) {
19991
20261
  helperBoxHeight = frameBottomMargin - reviewButtonsHeight;
19992
- helperBox = /* @__PURE__ */ jsx121("small", { className: "camera-capture-instructions", children: reviewInstructions });
20262
+ helperBox = /* @__PURE__ */ jsx122("small", { className: "camera-capture-instructions", children: reviewInstructions });
19993
20263
  const frameWithReviewInstructionsMinBottomMargin = reviewButtonsHeight + reviewInstructionsHeight;
19994
20264
  if (frameBottomMargin < frameWithReviewInstructionsMinBottomMargin) {
19995
- helperBox = /* @__PURE__ */ jsx121(Fragment23, {});
20265
+ helperBox = /* @__PURE__ */ jsx122(Fragment23, {});
19996
20266
  }
19997
20267
  }
19998
20268
  const framePosition = {
@@ -20010,32 +20280,32 @@ function Overlay({ overlay, outline, imageUrl, title, instructions, reviewInstru
20010
20280
  width: "90%"
20011
20281
  }
20012
20282
  };
20013
- return /* @__PURE__ */ jsxs48("svg", { ref: svgReference, xmlns: "http://www.w3.org/2000/svg", children: [
20014
- /* @__PURE__ */ jsx121("defs", { children: /* @__PURE__ */ jsxs48("mask", { id: "mask", children: [
20015
- /* @__PURE__ */ jsx121("rect", { width: "100%", height: "100%", fill: "#fff" }),
20016
- /* @__PURE__ */ jsx121("image", __spreadValues({ href: overlay }, framePosition))
20283
+ return /* @__PURE__ */ jsxs49("svg", { ref: svgReference, xmlns: "http://www.w3.org/2000/svg", children: [
20284
+ /* @__PURE__ */ jsx122("defs", { children: /* @__PURE__ */ jsxs49("mask", { id: "mask", children: [
20285
+ /* @__PURE__ */ jsx122("rect", { width: "100%", height: "100%", fill: "#fff" }),
20286
+ /* @__PURE__ */ jsx122("image", __spreadValues({ href: overlay }, framePosition))
20017
20287
  ] }) }),
20018
- overlay && /* @__PURE__ */ jsx121("rect", { width: "100%", height: "100%", mask: "url(#mask)", fillOpacity: "0.72" }),
20019
- outline && /* @__PURE__ */ jsx121("image", __spreadValues({ href: outline }, framePosition)),
20020
- /* @__PURE__ */ jsx121("foreignObject", { width: "100%", height: "100%", children: /* @__PURE__ */ jsx121("div", __spreadProps(__spreadValues({ className: "camera-capture-text-and-image-container" }, helperBoxPosition), { children: helperBox })) })
20288
+ overlay && /* @__PURE__ */ jsx122("rect", { width: "100%", height: "100%", mask: "url(#mask)", fillOpacity: "0.72" }),
20289
+ outline && /* @__PURE__ */ jsx122("image", __spreadValues({ href: outline }, framePosition)),
20290
+ /* @__PURE__ */ jsx122("foreignObject", { width: "100%", height: "100%", children: /* @__PURE__ */ jsx122("div", __spreadProps(__spreadValues({ className: "camera-capture-text-and-image-container" }, helperBoxPosition), { children: helperBox })) })
20021
20291
  ] });
20022
20292
  }
20023
20293
  var Overlay_default = Overlay;
20024
20294
 
20025
20295
  // src/common/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.tsx
20026
20296
  import { Button as Button12 } from "@transferwise/components";
20027
- import { jsx as jsx122, jsxs as jsxs49 } from "react/jsx-runtime";
20297
+ import { jsx as jsx123, jsxs as jsxs50 } from "react/jsx-runtime";
20028
20298
  function CameraErrorScreen({ title, description, actionButton, onAction }) {
20029
- return /* @__PURE__ */ jsx122("div", { className: "container p-t-5", children: /* @__PURE__ */ jsx122("div", { className: "row", children: /* @__PURE__ */ jsxs49("div", { className: "col-md-6 col-md-offset-3", children: [
20030
- /* @__PURE__ */ jsx122("h2", { className: "text-xs-center m-b-3", children: title }),
20031
- /* @__PURE__ */ jsx122("p", { className: "text-xs-center m-b-5", children: description }),
20032
- onAction && actionButton && /* @__PURE__ */ jsx122(Button12, { block: true, onClick: onAction, children: actionButton })
20299
+ return /* @__PURE__ */ jsx123("div", { className: "container p-t-5", children: /* @__PURE__ */ jsx123("div", { className: "row", children: /* @__PURE__ */ jsxs50("div", { className: "col-md-6 col-md-offset-3", children: [
20300
+ /* @__PURE__ */ jsx123("h2", { className: "text-xs-center m-b-3", children: title }),
20301
+ /* @__PURE__ */ jsx123("p", { className: "text-xs-center m-b-5", children: description }),
20302
+ onAction && actionButton && /* @__PURE__ */ jsx123(Button12, { block: true, onClick: onAction, children: actionButton })
20033
20303
  ] }) }) });
20034
20304
  }
20035
20305
  var CameraErrorScreen_default = CameraErrorScreen;
20036
20306
 
20037
20307
  // src/common/cameraCapture/CameraCapture.tsx
20038
- import { jsx as jsx123, jsxs as jsxs50 } from "react/jsx-runtime";
20308
+ import { jsx as jsx124, jsxs as jsxs51 } from "react/jsx-runtime";
20039
20309
  function CameraCapture({
20040
20310
  direction = "back",
20041
20311
  overlay = "",
@@ -20143,8 +20413,8 @@ function CameraCapture({
20143
20413
  exitFullScreen();
20144
20414
  }
20145
20415
  }, [mode, exitFullScreen]);
20146
- const captureScreen = /* @__PURE__ */ jsxs50("div", { className: "camera-capture", children: [
20147
- videoConstraints && /* @__PURE__ */ jsx123(
20416
+ const captureScreen = /* @__PURE__ */ jsxs51("div", { className: "camera-capture", children: [
20417
+ videoConstraints && /* @__PURE__ */ jsx124(
20148
20418
  Webcam,
20149
20419
  {
20150
20420
  ref: webcamReference,
@@ -20155,7 +20425,7 @@ function CameraCapture({
20155
20425
  onUserMedia: handleUserMedia
20156
20426
  }
20157
20427
  ),
20158
- /* @__PURE__ */ jsx123(
20428
+ /* @__PURE__ */ jsx124(
20159
20429
  Overlay_default,
20160
20430
  {
20161
20431
  overlay,
@@ -20165,8 +20435,8 @@ function CameraCapture({
20165
20435
  instructions
20166
20436
  }
20167
20437
  ),
20168
- shouldLockOrientation && /* @__PURE__ */ jsx123(OrientationLockOverlay_default, {}),
20169
- ready && /* @__PURE__ */ jsx123(
20438
+ shouldLockOrientation && /* @__PURE__ */ jsx124(OrientationLockOverlay_default, {}),
20439
+ ready && /* @__PURE__ */ jsx124(
20170
20440
  CaptureBottomBar,
20171
20441
  {
20172
20442
  onCapture: () => {
@@ -20175,9 +20445,9 @@ function CameraCapture({
20175
20445
  }
20176
20446
  )
20177
20447
  ] });
20178
- const reviewScreen = /* @__PURE__ */ jsxs50("div", { className: "camera-capture", children: [
20179
- /* @__PURE__ */ jsx123("img", { className: "review-image", src: reviewImage == null ? void 0 : reviewImage.source, alt: "" }),
20180
- /* @__PURE__ */ jsx123(
20448
+ const reviewScreen = /* @__PURE__ */ jsxs51("div", { className: "camera-capture", children: [
20449
+ /* @__PURE__ */ jsx124("img", { className: "review-image", src: reviewImage == null ? void 0 : reviewImage.source, alt: "" }),
20450
+ /* @__PURE__ */ jsx124(
20181
20451
  Overlay_default,
20182
20452
  {
20183
20453
  overlay,
@@ -20187,18 +20457,18 @@ function CameraCapture({
20187
20457
  reviewInstructions: intl.formatMessage(CameraCapture_messages_default.reviewInstructions)
20188
20458
  }
20189
20459
  ),
20190
- /* @__PURE__ */ jsx123(ReviewBottomBar, { onSubmit: handleReviewSubmit, onRetry: handleReviewRetry })
20460
+ /* @__PURE__ */ jsx124(ReviewBottomBar, { onSubmit: handleReviewSubmit, onRetry: handleReviewRetry })
20191
20461
  ] });
20192
- return /* @__PURE__ */ jsxs50("section", { children: [
20462
+ return /* @__PURE__ */ jsxs51("section", { children: [
20193
20463
  mode === "CAPTURE" /* CAPTURE */ && captureScreen,
20194
20464
  mode === "REVIEW" /* REVIEW */ && reviewScreen,
20195
- mode === "ERROR" /* ERROR */ && cameraError && /* @__PURE__ */ jsx123(CameraErrorScreen_default, __spreadValues({}, cameraError))
20465
+ mode === "ERROR" /* ERROR */ && cameraError && /* @__PURE__ */ jsx124(CameraErrorScreen_default, __spreadValues({}, cameraError))
20196
20466
  ] });
20197
20467
  }
20198
20468
  var CameraCapture_default = CameraCapture;
20199
20469
 
20200
20470
  // src/legacy/step/cameraStep/CameraStep.tsx
20201
- import { jsx as jsx124 } from "react/jsx-runtime";
20471
+ import { jsx as jsx125 } from "react/jsx-runtime";
20202
20472
  function blobToBase64(blob) {
20203
20473
  return new Promise((resolve, _) => {
20204
20474
  const reader = new FileReader();
@@ -20236,7 +20506,7 @@ function CameraStep(props) {
20236
20506
  });
20237
20507
  }
20238
20508
  };
20239
- return /* @__PURE__ */ jsx124(
20509
+ return /* @__PURE__ */ jsx125(
20240
20510
  CameraCapture_default,
20241
20511
  {
20242
20512
  overlay,
@@ -20313,12 +20583,12 @@ var external_confirmation_messages_default2 = defineMessages23({
20313
20583
  });
20314
20584
 
20315
20585
  // src/legacy/step/externalConfirmationStep/ExternalConfirmationStep.tsx
20316
- import { jsx as jsx125 } from "react/jsx-runtime";
20586
+ import { jsx as jsx126 } from "react/jsx-runtime";
20317
20587
  var noop6 = () => {
20318
20588
  };
20319
20589
  function ExternalConfirmationStep({ url, onClose }) {
20320
20590
  const { formatMessage } = useIntl29();
20321
- return /* @__PURE__ */ jsx125(
20591
+ return /* @__PURE__ */ jsx126(
20322
20592
  DynamicLayout_default,
20323
20593
  {
20324
20594
  components: [
@@ -20385,9 +20655,9 @@ function getOrigin2(url) {
20385
20655
  // src/legacy/dynamicFlow/BackButton.tsx
20386
20656
  import { Avatar as Avatar7 } from "@transferwise/components";
20387
20657
  import { ArrowLeft as ArrowLeft2 } from "@transferwise/icons";
20388
- import { jsx as jsx126, jsxs as jsxs51 } from "react/jsx-runtime";
20658
+ import { jsx as jsx127, jsxs as jsxs52 } from "react/jsx-runtime";
20389
20659
  function BackButton2({ title, action, onAction }) {
20390
- return /* @__PURE__ */ jsx126("div", { className: "m-b-2", children: /* @__PURE__ */ jsxs51(
20660
+ return /* @__PURE__ */ jsx127("div", { className: "m-b-2", children: /* @__PURE__ */ jsxs52(
20391
20661
  "a",
20392
20662
  {
20393
20663
  href: "/",
@@ -20398,8 +20668,8 @@ function BackButton2({ title, action, onAction }) {
20398
20668
  onAction(__spreadProps(__spreadValues({}, action), { skipValidation: true }));
20399
20669
  },
20400
20670
  children: [
20401
- /* @__PURE__ */ jsx126("span", { className: "sr-only", children: title }),
20402
- /* @__PURE__ */ jsx126(Avatar7, { type: "icon", children: /* @__PURE__ */ jsx126(ArrowLeft2, { size: "24" }) })
20671
+ /* @__PURE__ */ jsx127("span", { className: "sr-only", children: title }),
20672
+ /* @__PURE__ */ jsx127(Avatar7, { type: "icon", children: /* @__PURE__ */ jsx127(ArrowLeft2, { size: "24" }) })
20403
20673
  ]
20404
20674
  }
20405
20675
  ) });
@@ -20407,7 +20677,7 @@ function BackButton2({ title, action, onAction }) {
20407
20677
  var BackButton_default2 = BackButton2;
20408
20678
 
20409
20679
  // src/legacy/dynamicFlow/DynamicFlowStep.tsx
20410
- import { Fragment as Fragment24, jsx as jsx127, jsxs as jsxs52 } from "react/jsx-runtime";
20680
+ import { Fragment as Fragment24, jsx as jsx128, jsxs as jsxs53 } from "react/jsx-runtime";
20411
20681
  function DynamicFlowStep(props) {
20412
20682
  var _a, _b, _c;
20413
20683
  const { step, globalError, onAction } = props;
@@ -20416,20 +20686,20 @@ function DynamicFlowStep(props) {
20416
20686
  const { requiresManualTrigger, dismissConfirmation } = useExternal2(externalUrl);
20417
20687
  if (step === void 0) {
20418
20688
  if (globalError) {
20419
- return /* @__PURE__ */ jsx127(DynamicAlert_default, { component: { context: "negative", markdown: globalError, margin: "lg" } });
20689
+ return /* @__PURE__ */ jsx128(DynamicAlert_default, { component: { context: "negative", markdown: globalError, margin: "lg" } });
20420
20690
  }
20421
20691
  return null;
20422
20692
  }
20423
20693
  if (externalUrl && requiresManualTrigger) {
20424
- return /* @__PURE__ */ jsx127(ExternalConfirmationStep_default, { url: externalUrl, onClose: dismissConfirmation });
20694
+ return /* @__PURE__ */ jsx128(ExternalConfirmationStep_default, { url: externalUrl, onClose: dismissConfirmation });
20425
20695
  }
20426
20696
  if (isCameraStep(step)) {
20427
- return /* @__PURE__ */ jsx127(CameraStep_default, __spreadProps(__spreadValues({}, props), { step }));
20697
+ return /* @__PURE__ */ jsx128(CameraStep_default, __spreadProps(__spreadValues({}, props), { step }));
20428
20698
  }
20429
- return /* @__PURE__ */ jsxs52(Fragment24, { children: [
20430
- backButton && /* @__PURE__ */ jsx127(BackButton_default2, __spreadProps(__spreadValues({}, backButton), { onAction })),
20431
- globalError ? /* @__PURE__ */ jsx127(DynamicAlert_default, { component: { context: "negative", markdown: globalError, margin: "lg" } }) : null,
20432
- /* @__PURE__ */ jsx127(LayoutStep_default, __spreadProps(__spreadValues({}, props), { stepSpecification: step }))
20699
+ return /* @__PURE__ */ jsxs53(Fragment24, { children: [
20700
+ backButton && /* @__PURE__ */ jsx128(BackButton_default2, __spreadProps(__spreadValues({}, backButton), { onAction })),
20701
+ globalError ? /* @__PURE__ */ jsx128(DynamicAlert_default, { component: { context: "negative", markdown: globalError, margin: "lg" } }) : null,
20702
+ /* @__PURE__ */ jsx128(LayoutStep_default, __spreadProps(__spreadValues({}, props), { stepSpecification: step }))
20433
20703
  ] });
20434
20704
  }
20435
20705
 
@@ -20578,7 +20848,7 @@ var isInlineSchema = (schema) => schema !== void 0 && typeof schema === "object"
20578
20848
  // src/legacy/dynamicFlow/utils/useLoader.tsx
20579
20849
  import { Loader as Loader4, Size as Size4 } from "@transferwise/components";
20580
20850
  import { useState as useState33 } from "react";
20581
- import { jsx as jsx128 } from "react/jsx-runtime";
20851
+ import { jsx as jsx129 } from "react/jsx-runtime";
20582
20852
  function useLoader(loaderConfig, initialState) {
20583
20853
  const config = __spreadValues({
20584
20854
  size: Size4.EXTRA_LARGE,
@@ -20587,7 +20857,7 @@ function useLoader(loaderConfig, initialState) {
20587
20857
  }, loaderConfig);
20588
20858
  const [loadingState, setLoadingState] = useState33(initialState);
20589
20859
  const shouldDisplayLoader = config.initial && loadingState === "initial" || config.submission && loadingState === "submission";
20590
- const loader = shouldDisplayLoader ? /* @__PURE__ */ jsx128(
20860
+ const loader = shouldDisplayLoader ? /* @__PURE__ */ jsx129(
20591
20861
  Loader4,
20592
20862
  {
20593
20863
  size: config.size,
@@ -20707,7 +20977,7 @@ var useErrorResponse = () => {
20707
20977
  };
20708
20978
 
20709
20979
  // src/legacy/dynamicFlow/DynamicFlow.tsx
20710
- import { jsx as jsx129 } from "react/jsx-runtime";
20980
+ import { jsx as jsx130 } from "react/jsx-runtime";
20711
20981
  var noop7 = () => {
20712
20982
  };
20713
20983
  var DynamicFlowComponent = ({
@@ -20950,7 +21220,7 @@ var DynamicFlowComponent = ({
20950
21220
  await performAction(action);
20951
21221
  }
20952
21222
  };
20953
- return /* @__PURE__ */ jsx129(LogProvider, { flowId, stepId: (step == null ? void 0 : step.id) || (step == null ? void 0 : step.key), onLog, children: /* @__PURE__ */ jsx129(EventsContextProvider, { metadata: analyticsMetadata, onEvent, children: /* @__PURE__ */ jsx129(DynamicFlowProvider, { loading: isLoading || isDebouncing, children: /* @__PURE__ */ jsx129(HttpClientProvider, { httpClient, children: /* @__PURE__ */ jsx129(FeatureContextProvider, { features, children: loader !== null ? loader : /* @__PURE__ */ jsx129("div", { id: (step == null ? void 0 : step.id) || (step == null ? void 0 : step.key), className: "dynamic-flow-legacy", children: /* @__PURE__ */ jsx129(
21223
+ return /* @__PURE__ */ jsx130(LogProvider, { flowId, stepId: (step == null ? void 0 : step.id) || (step == null ? void 0 : step.key), onLog, children: /* @__PURE__ */ jsx130(EventsContextProvider, { metadata: analyticsMetadata, onEvent, children: /* @__PURE__ */ jsx130(DynamicFlowProvider, { loading: isLoading || isDebouncing, children: /* @__PURE__ */ jsx130(HttpClientProvider, { httpClient, children: /* @__PURE__ */ jsx130(FeatureContextProvider, { features, children: loader !== null ? loader : /* @__PURE__ */ jsx130("div", { id: (step == null ? void 0 : step.id) || (step == null ? void 0 : step.key), className: "dynamic-flow-legacy", children: /* @__PURE__ */ jsx130(
20954
21224
  DynamicFlowStep,
20955
21225
  {
20956
21226
  step,
@@ -20967,7 +21237,7 @@ var DynamicFlowComponent = ({
20967
21237
  ) }) }) }) }) }) });
20968
21238
  };
20969
21239
  function DynamicFlow(props) {
20970
- return /* @__PURE__ */ jsx129(ErrorBoundary_default, { onError: props.onError, children: /* @__PURE__ */ jsx129(DynamicFlowComponent, __spreadValues({}, props)) });
21240
+ return /* @__PURE__ */ jsx130(ErrorBoundary_default, { onError: props.onError, children: /* @__PURE__ */ jsx130(DynamicFlowComponent, __spreadValues({}, props)) });
20971
21241
  }
20972
21242
  var DynamicFlow_default = DynamicFlow;
20973
21243
  var combineModels2 = (formModels) => Object.values(formModels).reduce((previous, model) => __spreadValues(__spreadValues({}, previous), model), {});
@@ -20984,19 +21254,19 @@ var shouldTriggerRefresh = (props) => {
20984
21254
  };
20985
21255
 
20986
21256
  // src/legacy/jsonSchemaForm/JsonSchemaForm.tsx
20987
- import { jsx as jsx130 } from "react/jsx-runtime";
21257
+ import { jsx as jsx131 } from "react/jsx-runtime";
20988
21258
  function JsonSchemaForm(props) {
20989
21259
  const schemaProps = __spreadValues({
20990
21260
  model: null,
20991
21261
  errors: null
20992
21262
  }, props);
20993
21263
  const { baseUrl = "", onEvent = noop8, onLog = noop8 } = props;
20994
- return /* @__PURE__ */ jsx130(LogProvider, { flowId: "JsonSchemaForm", stepId: "JsonSchemaForm", onLog, children: /* @__PURE__ */ jsx130(
21264
+ return /* @__PURE__ */ jsx131(LogProvider, { flowId: "JsonSchemaForm", stepId: "JsonSchemaForm", onLog, children: /* @__PURE__ */ jsx131(
20995
21265
  EventsContextProvider,
20996
21266
  {
20997
21267
  metadata: { flowId: "JsonSchemaForm", stepId: "JsonSchemaForm" },
20998
21268
  onEvent,
20999
- children: /* @__PURE__ */ jsx130(HttpClientProviderFromBaseUrl, { baseUrl, children: /* @__PURE__ */ jsx130(GenericSchema_default, __spreadValues({}, schemaProps)) })
21269
+ children: /* @__PURE__ */ jsx131(HttpClientProviderFromBaseUrl, { baseUrl, children: /* @__PURE__ */ jsx131(GenericSchema_default, __spreadValues({}, schemaProps)) })
21000
21270
  }
21001
21271
  ) });
21002
21272
  }