@wise/dynamic-flow-client-internal 4.38.0 → 5.0.0-experimental-feace93

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
@@ -1,7 +1,11 @@
1
+ var __create = Object.create;
1
2
  var __defProp = Object.defineProperty;
2
3
  var __defProps = Object.defineProperties;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
5
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
7
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
+ var __getProtoOf = Object.getPrototypeOf;
5
9
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
10
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
11
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
@@ -29,10 +33,97 @@ var __objRest = (source, exclude) => {
29
33
  }
30
34
  return target;
31
35
  };
36
+ var __commonJS = (cb, mod) => function __require() {
37
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
38
+ };
39
+ var __copyProps = (to, from, except, desc) => {
40
+ if (from && typeof from === "object" || typeof from === "function") {
41
+ for (let key of __getOwnPropNames(from))
42
+ if (!__hasOwnProp.call(to, key) && key !== except)
43
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
44
+ }
45
+ return to;
46
+ };
47
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
48
+ // If the importer is in node compatibility mode or this is not an ESM
49
+ // file that has been converted to a CommonJS file using a Babel-
50
+ // compatible transform (i.e. "__esModule" has not been set), then set
51
+ // "default" to the CommonJS "module.exports" for node compatibility.
52
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
53
+ mod
54
+ ));
55
+
56
+ // ../../node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js
57
+ var require_classnames = __commonJS({
58
+ "../../node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js"(exports, module) {
59
+ "use strict";
60
+ (function() {
61
+ "use strict";
62
+ var hasOwn = {}.hasOwnProperty;
63
+ function classNames6() {
64
+ var classes = "";
65
+ for (var i = 0; i < arguments.length; i++) {
66
+ var arg = arguments[i];
67
+ if (arg) {
68
+ classes = appendClass(classes, parseValue(arg));
69
+ }
70
+ }
71
+ return classes;
72
+ }
73
+ function parseValue(arg) {
74
+ if (typeof arg === "string" || typeof arg === "number") {
75
+ return arg;
76
+ }
77
+ if (typeof arg !== "object") {
78
+ return "";
79
+ }
80
+ if (Array.isArray(arg)) {
81
+ return classNames6.apply(null, arg);
82
+ }
83
+ if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
84
+ return arg.toString();
85
+ }
86
+ var classes = "";
87
+ for (var key in arg) {
88
+ if (hasOwn.call(arg, key) && arg[key]) {
89
+ classes = appendClass(classes, key);
90
+ }
91
+ }
92
+ return classes;
93
+ }
94
+ function appendClass(value, newClass) {
95
+ if (!newClass) {
96
+ return value;
97
+ }
98
+ if (value) {
99
+ return value + " " + newClass;
100
+ }
101
+ return value + newClass;
102
+ }
103
+ if (typeof module !== "undefined" && module.exports) {
104
+ classNames6.default = classNames6;
105
+ module.exports = classNames6;
106
+ } else if (typeof define === "function" && typeof define.amd === "object" && define.amd) {
107
+ define("classnames", [], function() {
108
+ return classNames6;
109
+ });
110
+ } else {
111
+ window.classNames = classNames6;
112
+ }
113
+ })();
114
+ }
115
+ });
32
116
 
33
117
  // src/index.ts
34
118
  import { makeHttpClient } from "@wise/dynamic-flow-client";
35
- import { findRendererPropsByType, isValidSchema, JsonSchemaForm } from "@wise/dynamic-flow-client";
119
+
120
+ // src/dynamicFlow/DynamicFlow.tsx
121
+ import { forwardRef, useCallback, useMemo as useMemo2 } from "react";
122
+ import { useIntl as useIntl15 } from "react-intl";
123
+ import {
124
+ DynamicFlow as DynamicFlowCore,
125
+ DynamicForm as DynamicFormCore
126
+ } from "@wise/dynamic-flow-client";
36
127
 
37
128
  // ../renderers/src/AlertRenderer.tsx
38
129
  import { Alert } from "@transferwise/components";
@@ -86,14 +177,14 @@ var mapCtaToAlertAction = (callToAction) => {
86
177
  return __spreadValues(__spreadValues({
87
178
  text: callToAction.title,
88
179
  "aria-label": callToAction.accessibilityDescription
89
- }, "onClick" in callToAction ? { onClick: callToAction.onClick } : {}), callToAction.type === "link" ? { href: callToAction.href, target: "_blank" } : {});
180
+ }, "onClick" in callToAction ? { onClick: callToAction.onClick } : {}), callToAction.href ? { href: callToAction.href, target: "_blank" } : {});
90
181
  }
91
182
  return void 0;
92
183
  };
93
184
  var AlertRenderer_default = AlertRenderer;
94
185
 
95
186
  // ../renderers/src/BoxRenderer.tsx
96
- import classNames from "classnames";
187
+ var import_classnames = __toESM(require_classnames());
97
188
  import { jsx as jsx2 } from "react/jsx-runtime";
98
189
  var BoxRenderer = {
99
190
  canRenderType: "box",
@@ -103,7 +194,7 @@ var BoxRenderer = {
103
194
  const contents = /* @__PURE__ */ jsx2(
104
195
  "div",
105
196
  {
106
- className: classNames({
197
+ className: (0, import_classnames.default)({
107
198
  "df-box-renderer-border": hasBorder,
108
199
  [`df-box-renderer-width-${width}`]: hasFixedWidth,
109
200
  [getMargin(margin)]: !hasFixedWidth
@@ -111,7 +202,7 @@ var BoxRenderer = {
111
202
  children
112
203
  }
113
204
  );
114
- return hasFixedWidth ? /* @__PURE__ */ jsx2("div", { className: classNames("df-box-renderer-fixed-width", getMargin(margin)), children: contents }) : contents;
205
+ return hasFixedWidth ? /* @__PURE__ */ jsx2("div", { className: (0, import_classnames.default)("df-box-renderer-fixed-width", getMargin(margin)), children: contents }) : contents;
115
206
  }
116
207
  };
117
208
  var BoxRenderer_default = BoxRenderer;
@@ -171,7 +262,10 @@ var AddressValidationButtonRenderer_default = AddressValidationButtonRenderer;
171
262
 
172
263
  // ../renderers/src/ButtonRenderer/ButtonRenderer.tsx
173
264
  import { Button as Button2 } from "@transferwise/components";
174
- import { useEffect as useEffect2, useState as useState2 } from "react";
265
+
266
+ // ../renderers/src/utils/isButtonPriority.ts
267
+ var validPriorities = ["primary", "secondary", "secondary-neutral", "tertiary"];
268
+ var isButtonPriority = (control) => validPriorities.includes(control);
175
269
 
176
270
  // ../renderers/src/ButtonRenderer/mapButtonSize.tsx
177
271
  var mapButtonSize = (size) => {
@@ -192,6 +286,7 @@ var mapButtonSize = (size) => {
192
286
  };
193
287
 
194
288
  // ../renderers/src/ButtonRenderer/ButtonRenderer.tsx
289
+ import { useEffect as useEffect2, useState as useState2 } from "react";
195
290
  import { jsx as jsx4 } from "react/jsx-runtime";
196
291
  var ButtonRenderer = {
197
292
  canRenderType: "button",
@@ -205,19 +300,18 @@ function ButtonComponent(props) {
205
300
  setSpinny(false);
206
301
  }
207
302
  }, [stepLoadingState]);
208
- const priority = getPriority(control);
209
- const type = getButtonType(context, priority);
210
303
  const loading = spinny && stepLoadingState !== "idle";
211
304
  return /* @__PURE__ */ jsx4(
212
305
  Button2,
213
306
  {
307
+ v2: true,
214
308
  block: true,
215
309
  className: getMargin(margin),
216
310
  disabled,
217
- priority,
218
- size: mapButtonSize(size),
311
+ priority: getPriority(control),
219
312
  loading,
220
- type,
313
+ size: mapButtonSize(size),
314
+ sentiment: getSentiment(context),
221
315
  onClick: () => {
222
316
  setSpinny(true);
223
317
  onClick();
@@ -226,27 +320,8 @@ function ButtonComponent(props) {
226
320
  }
227
321
  );
228
322
  }
229
- var getPriority = (control) => {
230
- switch (control) {
231
- case "primary":
232
- case "tertiary":
233
- return control;
234
- default:
235
- return "secondary";
236
- }
237
- };
238
- var getButtonType = (context, priority) => {
239
- if (priority === "tertiary") {
240
- return void 0;
241
- }
242
- switch (context) {
243
- case "neutral":
244
- case "warning":
245
- return "accent";
246
- default:
247
- return context;
248
- }
249
- };
323
+ var getSentiment = (context) => context === "negative" ? "negative" : "default";
324
+ var getPriority = (control) => control && isButtonPriority(control) ? control : "secondary";
250
325
 
251
326
  // ../renderers/src/components/FieldInput.tsx
252
327
  import { Field } from "@transferwise/components";
@@ -608,11 +683,11 @@ function OptionMedia(props) {
608
683
  import { jsx as jsx18 } from "react/jsx-runtime";
609
684
  var getInlineMedia = (media) => media ? /* @__PURE__ */ jsx18(Media, { media, preferAvatar: false, size: 24 }) : null;
610
685
 
611
- // ../renderers/src/NewListItem/getMedia.tsx
686
+ // ../renderers/src/utils/listItem/getMedia.tsx
612
687
  import { jsx as jsx19 } from "react/jsx-runtime";
613
688
  var getMedia = (media, preferAvatar) => media ? /* @__PURE__ */ jsx19(OptionMedia, { media, preferAvatar }) : void 0;
614
689
 
615
- // ../renderers/src/NewListItem/getAdditionalText.tsx
690
+ // ../renderers/src/utils/listItem/getAdditionalText.tsx
616
691
  import { ListItem } from "@transferwise/components";
617
692
  import { jsx as jsx20 } from "react/jsx-runtime";
618
693
  var getAdditionalText = (additionalText) => {
@@ -622,12 +697,12 @@ var getAdditionalText = (additionalText) => {
622
697
  return /* @__PURE__ */ jsx20(ListItem.AdditionalInfo, { children: additionalText });
623
698
  };
624
699
 
625
- // ../renderers/src/NewListItem/getSupportingValues.ts
700
+ // ../renderers/src/utils/listItem/getSupportingValues.ts
626
701
  var getSupportingValues = (supportingValues) => {
627
702
  return __spreadValues(__spreadValues({}, (supportingValues == null ? void 0 : supportingValues.value) ? { valueTitle: supportingValues.value } : {}), (supportingValues == null ? void 0 : supportingValues.subvalue) ? { valueSubtitle: supportingValues.subvalue } : {});
628
703
  };
629
704
 
630
- // ../renderers/src/NewListItem/getInlineAlert.tsx
705
+ // ../renderers/src/utils/listItem/getInlineAlert.tsx
631
706
  import { ListItem as ListItem2 } from "@transferwise/components";
632
707
  import { jsx as jsx21 } from "react/jsx-runtime";
633
708
  var getInlineAlert = (inlineAlert) => inlineAlert ? /* @__PURE__ */ jsx21(ListItem2.Prompt, { sentiment: inlineAlert == null ? void 0 : inlineAlert.context, children: inlineAlert.content }) : void 0;
@@ -732,14 +807,14 @@ var getInlineAlertOrValidation = (validationState, inlineAlert) => {
732
807
  var CheckboxInputRenderer_default = CheckboxInputRenderer;
733
808
 
734
809
  // ../renderers/src/ColumnsRenderer.tsx
735
- import classNames2 from "classnames";
810
+ var import_classnames2 = __toESM(require_classnames());
736
811
  import { jsx as jsx23, jsxs as jsxs3 } from "react/jsx-runtime";
737
812
  var ColumnsRenderer = {
738
813
  canRenderType: "columns",
739
814
  render: ({ bias, margin, startChildren, endChildren }) => /* @__PURE__ */ jsxs3(
740
815
  "div",
741
816
  {
742
- className: classNames2("df-columns-renderer-container", getMargin(margin), {
817
+ className: (0, import_classnames2.default)("df-columns-renderer-container", getMargin(margin), {
743
818
  "df-columns-renderer-bias-start": bias === "start",
744
819
  "df-columns-renderer-bias-end": bias === "end"
745
820
  }),
@@ -869,222 +944,9 @@ var DateInputRenderer = {
869
944
  };
870
945
  var DateInputRenderer_default = DateInputRenderer;
871
946
 
872
- // ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
873
- import { NavigationOption, NavigationOptionsList } from "@transferwise/components";
874
-
875
- // ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
876
- import { Header as Header2, SearchInput } from "@transferwise/components";
877
- import { useState as useState3 } from "react";
878
- import { useIntl as useIntl4 } from "react-intl";
879
-
880
- // ../renderers/src/messages/filter.messages.ts
881
- import { defineMessages as defineMessages3 } from "react-intl";
882
- var filter_messages_default = defineMessages3({
883
- placeholder: {
884
- id: "df.wise.filter.placeholder",
885
- defaultMessage: "Start typing to search",
886
- description: "Placeholder for the filter input"
887
- },
888
- results: {
889
- id: "df.wise.filter.results",
890
- defaultMessage: "Search results",
891
- description: "Label for the results section"
892
- },
893
- noResults: {
894
- id: "df.wise.filter.noResults",
895
- defaultMessage: "No results",
896
- description: "Message for if there are no results"
897
- }
898
- });
899
-
900
- // ../renderers/src/DecisionRenderer/filter-and-sort-decision-options.ts
901
- function filterAndSortDecisionOptions(selectOptions, query) {
902
- const upperQuery = normalizeAndRemoveAccents(query);
903
- const filteredItems = selectOptions.filter((option) => {
904
- var _a, _b, _c, _d;
905
- const searchableWords = [
906
- option.title,
907
- option.description,
908
- option.additionalText,
909
- (_a = option.supportingValues) == null ? void 0 : _a.value,
910
- (_b = option.supportingValues) == null ? void 0 : _b.subvalue,
911
- ...(_c = option.keywords) != null ? _c : []
912
- ];
913
- return (_d = searchableWords.some(
914
- (word) => word && normalizeAndRemoveAccents(word).includes(upperQuery)
915
- )) != null ? _d : false;
916
- });
917
- return [...filteredItems].sort((a, b) => {
918
- if (a.disabled && !b.disabled) {
919
- return 1;
920
- }
921
- if (!a.disabled && b.disabled) {
922
- return -1;
923
- }
924
- const aTitleUpper = a.title.toUpperCase();
925
- const bTitleUpper = b.title.toUpperCase();
926
- const aTitleStarts = aTitleUpper.startsWith(upperQuery);
927
- const bTitleStarts = bTitleUpper.startsWith(upperQuery);
928
- if (aTitleStarts && !bTitleStarts) {
929
- return -1;
930
- }
931
- if (!aTitleStarts && bTitleStarts) {
932
- return 1;
933
- }
934
- const aWordStarts = aTitleUpper.split(" ").some((word) => word.startsWith(upperQuery));
935
- const bWordStarts = bTitleUpper.split(" ").some((word) => word.startsWith(upperQuery));
936
- if (aWordStarts && !bWordStarts) {
937
- return -1;
938
- }
939
- if (!aWordStarts && bWordStarts) {
940
- return 1;
941
- }
942
- return a.title.localeCompare(b.title);
943
- });
944
- }
945
- var normalizeAndRemoveAccents = (text) => text.trim().toLowerCase().normalize("NFKD").replace(new RegExp("\\p{Diacritic}", "gu"), "");
946
-
947
- // ../renderers/src/DecisionRenderer/GroupedDecisionList.tsx
948
- import { Header, Section } from "@transferwise/components";
949
- import { useIntl as useIntl3 } from "react-intl";
950
-
951
- // ../renderers/src/messages/group.messages.ts
952
- import { defineMessages as defineMessages4 } from "react-intl";
953
- var group_messages_default = defineMessages4({
954
- all: {
955
- id: "df.wise.group.all",
956
- defaultMessage: "All",
957
- description: "Label for the group of options that encompasses all options"
958
- },
959
- popular: {
960
- id: "df.wise.group.popular",
961
- defaultMessage: "Popular",
962
- description: "Label for the group of options that are tagged as popular"
963
- },
964
- recent: {
965
- id: "df.wise.group.recent",
966
- defaultMessage: "Recent",
967
- description: "Label for the group of options that are tagged as recent"
968
- },
969
- "currencies-with-account-details": {
970
- id: "df.wise.group.currencies-with-account-details",
971
- defaultMessage: "Currencies with account details",
972
- description: "Label for the group of options that are tagged as currencies with account details"
973
- }
974
- });
975
-
976
- // ../renderers/src/utils/grouping-utils.ts
977
- var getGroupsFromTags = (knownTags, items) => {
978
- return knownTags.map((tag) => {
979
- return { tag, items: items.filter((item) => {
980
- var _a;
981
- return (_a = item.tags) == null ? void 0 : _a.includes(tag);
982
- }) };
983
- }).filter((group) => group.items.length > 0);
984
- };
985
-
986
- // ../renderers/src/DecisionRenderer/GroupedDecisionList.tsx
987
- import { Fragment, jsx as jsx26, jsxs as jsxs4 } from "react/jsx-runtime";
988
- var groupingTags = Object.keys(group_messages_default).filter((key) => key !== "all");
989
- var isGroupedDecision = (options) => {
990
- return getGroupsFromTags(groupingTags, options).length > 0;
991
- };
992
- var GroupedDecisionList = (_a) => {
993
- var _b = _a, { renderDecisionList: renderDecisionList3 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
994
- const { formatMessage } = useIntl3();
995
- const { options } = rest;
996
- const itemsByTag = [...getGroupsFromTags(groupingTags, options), { tag: "all", items: options }];
997
- return /* @__PURE__ */ jsx26(Fragment, { children: itemsByTag.map(({ tag, items }) => /* @__PURE__ */ jsxs4(Section, { children: [
998
- /* @__PURE__ */ jsx26(
999
- Header,
1000
- {
1001
- as: "h2",
1002
- title: tag in group_messages_default ? formatMessage(group_messages_default[tag]) : tag
1003
- }
1004
- ),
1005
- renderDecisionList3(__spreadProps(__spreadValues({}, rest), { options: items }))
1006
- ] }, tag)) });
1007
- };
1008
-
1009
- // ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
1010
- import { Fragment as Fragment2, jsx as jsx27, jsxs as jsxs5 } from "react/jsx-runtime";
1011
- var DecisionWrapper = (props) => {
1012
- return /* @__PURE__ */ jsxs5("div", { className: getMargin(props.margin), children: [
1013
- props.title && /* @__PURE__ */ jsx27(Header2, { as: "h2", title: props.title }),
1014
- props.control === "filtered" ? /* @__PURE__ */ jsx27(FilteredDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ jsx27(UnfilteredDecisionList, __spreadValues({}, props))
1015
- ] });
1016
- };
1017
- var UnfilteredDecisionList = (_a) => {
1018
- var _b = _a, { renderDecisionList: renderDecisionList3 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
1019
- return isGroupedDecision(rest.options) ? /* @__PURE__ */ jsx27(GroupedDecisionList, __spreadProps(__spreadValues({}, rest), { renderDecisionList: renderDecisionList3 })) : renderDecisionList3(rest);
1020
- };
1021
- var FilteredDecisionList = (props) => {
1022
- const { formatMessage } = useIntl4();
1023
- const [query, setQuery] = useState3("");
1024
- const { control, options, renderDecisionList: renderDecisionList3 } = props;
1025
- const filteredOptions = (query == null ? void 0 : query.length) > 0 ? filterAndSortDecisionOptions(options, query) : options;
1026
- const isGrouped = isGroupedDecision(options);
1027
- return /* @__PURE__ */ jsxs5(Fragment2, { children: [
1028
- /* @__PURE__ */ jsx27(
1029
- SearchInput,
1030
- {
1031
- placeholder: formatMessage(filter_messages_default.placeholder),
1032
- value: query,
1033
- className: "m-b-2",
1034
- onChange: (e) => {
1035
- var _a;
1036
- return setQuery((_a = e.target.value) != null ? _a : "");
1037
- }
1038
- }
1039
- ),
1040
- isGrouped && query.length === 0 ? /* @__PURE__ */ jsx27(GroupedDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ jsxs5(Fragment2, { children: [
1041
- query.length > 0 && /* @__PURE__ */ jsx27(Header2, { as: "h2", title: formatMessage(filter_messages_default.results), className: "m-t-4" }),
1042
- filteredOptions.length > 0 ? renderDecisionList3({
1043
- control,
1044
- className: query.length === 0 ? "m-t-3" : "",
1045
- options: filteredOptions
1046
- }) : /* @__PURE__ */ jsx27("p", { children: formatMessage(filter_messages_default.noResults) })
1047
- ] })
1048
- ] });
1049
- };
1050
-
1051
- // ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
1052
- import { jsx as jsx28 } from "react/jsx-runtime";
1053
- var DecisionRenderer = {
1054
- canRenderType: "decision",
1055
- render: (props) => {
1056
- return /* @__PURE__ */ jsx28(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList }));
1057
- }
1058
- };
1059
- var renderDecisionList = ({ options, className, control }) => {
1060
- return /* @__PURE__ */ jsx28("div", { className, children: /* @__PURE__ */ jsx28(NavigationOptionsList, { children: options.map((option) => {
1061
- const { description, disabled, media, title: itemTitle, tag, onClick } = option;
1062
- return /* @__PURE__ */ jsx28(
1063
- NavigationOption,
1064
- {
1065
- title: itemTitle,
1066
- content: description,
1067
- disabled,
1068
- media: media ? /* @__PURE__ */ jsx28(
1069
- OptionMedia,
1070
- {
1071
- media,
1072
- preferAvatar: control === "with-avatar" || tag === "with-avatar"
1073
- }
1074
- ) : null,
1075
- showMediaCircle: false,
1076
- showMediaAtAllSizes: true,
1077
- onClick
1078
- },
1079
- JSON.stringify(option)
1080
- );
1081
- }) }) });
1082
- };
1083
- var DecisionRenderer_default = DecisionRenderer;
1084
-
1085
947
  // ../renderers/src/DividerRenderer.tsx
1086
948
  import { Divider } from "@transferwise/components";
1087
- import { jsx as jsx29 } from "react/jsx-runtime";
949
+ import { jsx as jsx26 } from "react/jsx-runtime";
1088
950
  var mapControlToLevel = (control) => {
1089
951
  switch (control) {
1090
952
  case "section":
@@ -1097,7 +959,7 @@ var mapControlToLevel = (control) => {
1097
959
  };
1098
960
  var DividerRenderer = {
1099
961
  canRenderType: "divider",
1100
- render: ({ margin, control }) => /* @__PURE__ */ jsx29(Divider, { className: `m-t-0 d-block ${getMargin(margin)}`, level: mapControlToLevel(control) })
962
+ render: ({ margin, control }) => /* @__PURE__ */ jsx26(Divider, { className: `m-t-0 d-block ${getMargin(margin)}`, level: mapControlToLevel(control) })
1101
963
  };
1102
964
  var DividerRenderer_default = DividerRenderer;
1103
965
 
@@ -1105,8 +967,8 @@ var DividerRenderer_default = DividerRenderer;
1105
967
  import { Button as Button3, Markdown as Markdown2, Modal } from "@transferwise/components";
1106
968
 
1107
969
  // ../renderers/src/messages/external-confirmation.messages.ts
1108
- import { defineMessages as defineMessages5 } from "react-intl";
1109
- var external_confirmation_messages_default = defineMessages5({
970
+ import { defineMessages as defineMessages3 } from "react-intl";
971
+ var external_confirmation_messages_default = defineMessages3({
1110
972
  title: {
1111
973
  id: "df.wise.ExternalConfirmation.title",
1112
974
  defaultMessage: "Please confirm",
@@ -1130,9 +992,9 @@ var external_confirmation_messages_default = defineMessages5({
1130
992
  });
1131
993
 
1132
994
  // ../renderers/src/ExternalConfirmationRenderer.tsx
1133
- import { useIntl as useIntl5 } from "react-intl";
995
+ import { useIntl as useIntl3 } from "react-intl";
1134
996
  import { useEffect as useEffect3 } from "react";
1135
- import { Fragment as Fragment3, jsx as jsx30, jsxs as jsxs6 } from "react/jsx-runtime";
997
+ import { Fragment, jsx as jsx27, jsxs as jsxs4 } from "react/jsx-runtime";
1136
998
  var ExternalConfirmationRenderer = {
1137
999
  canRenderType: "external-confirmation",
1138
1000
  render: ExternalConfirmationRendererComponent
@@ -1144,7 +1006,7 @@ function ExternalConfirmationRendererComponent({
1144
1006
  onFailure,
1145
1007
  onCancel
1146
1008
  }) {
1147
- const { formatMessage } = useIntl5();
1009
+ const { formatMessage } = useIntl3();
1148
1010
  useEffect3(() => {
1149
1011
  if (url) {
1150
1012
  const w = window.open(url, "_blank");
@@ -1155,15 +1017,15 @@ function ExternalConfirmationRendererComponent({
1155
1017
  }
1156
1018
  }
1157
1019
  }, []);
1158
- return /* @__PURE__ */ jsx30(
1020
+ return /* @__PURE__ */ jsx27(
1159
1021
  Modal,
1160
1022
  {
1161
1023
  open: status === "failure",
1162
1024
  title: formatMessage(external_confirmation_messages_default.title),
1163
- body: /* @__PURE__ */ jsxs6(Fragment3, { children: [
1164
- /* @__PURE__ */ jsx30(Markdown2, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
1165
- /* @__PURE__ */ jsx30("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ jsxs6("div", { className: "df-box-renderer-width-lg", children: [
1166
- /* @__PURE__ */ jsx30(
1025
+ body: /* @__PURE__ */ jsxs4(Fragment, { children: [
1026
+ /* @__PURE__ */ jsx27(Markdown2, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
1027
+ /* @__PURE__ */ jsx27("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ jsxs4("div", { className: "df-box-renderer-width-lg", children: [
1028
+ /* @__PURE__ */ jsx27(
1167
1029
  Button3,
1168
1030
  {
1169
1031
  v2: true,
@@ -1178,7 +1040,7 @@ function ExternalConfirmationRendererComponent({
1178
1040
  children: formatMessage(external_confirmation_messages_default.open)
1179
1041
  }
1180
1042
  ),
1181
- /* @__PURE__ */ jsx30(Button3, { v2: true, block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
1043
+ /* @__PURE__ */ jsx27(Button3, { v2: true, block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
1182
1044
  ] }) })
1183
1045
  ] }),
1184
1046
  onClose: onCancel
@@ -1195,27 +1057,27 @@ function getOrigin(url) {
1195
1057
  var ExternalConfirmationRenderer_default = ExternalConfirmationRenderer;
1196
1058
 
1197
1059
  // ../renderers/src/FormRenderer.tsx
1198
- import { jsx as jsx31 } from "react/jsx-runtime";
1060
+ import { jsx as jsx28 } from "react/jsx-runtime";
1199
1061
  var FormRenderer = {
1200
1062
  canRenderType: "form",
1201
- render: ({ children, margin }) => /* @__PURE__ */ jsx31("div", { className: getMargin(margin), children })
1063
+ render: ({ children, margin }) => /* @__PURE__ */ jsx28("div", { className: getMargin(margin), children })
1202
1064
  };
1203
1065
  var FormRenderer_default = FormRenderer;
1204
1066
 
1205
1067
  // ../renderers/src/FormSectionRenderer.tsx
1206
- import { Header as Header3 } from "@transferwise/components";
1207
- import { jsx as jsx32, jsxs as jsxs7 } from "react/jsx-runtime";
1068
+ import { Header } from "@transferwise/components";
1069
+ import { jsx as jsx29, jsxs as jsxs5 } from "react/jsx-runtime";
1208
1070
  var FormSectionRenderer = {
1209
1071
  canRenderType: "form-section",
1210
- render: ({ title, description, children }) => /* @__PURE__ */ jsxs7("fieldset", { children: [
1211
- title && /* @__PURE__ */ jsx32(
1212
- Header3,
1072
+ render: ({ title, description, children }) => /* @__PURE__ */ jsxs5("fieldset", { children: [
1073
+ title && /* @__PURE__ */ jsx29(
1074
+ Header,
1213
1075
  {
1214
1076
  as: "h2",
1215
1077
  title
1216
1078
  }
1217
1079
  ),
1218
- description && /* @__PURE__ */ jsx32("p", { children: description }),
1080
+ description && /* @__PURE__ */ jsx29("p", { children: description }),
1219
1081
  children
1220
1082
  ] })
1221
1083
  };
@@ -1223,18 +1085,18 @@ var FormSectionRenderer_default = FormSectionRenderer;
1223
1085
 
1224
1086
  // ../renderers/src/HeadingRenderer.tsx
1225
1087
  import { Display, Title } from "@transferwise/components";
1226
- import { jsx as jsx33 } from "react/jsx-runtime";
1088
+ import { jsx as jsx30 } from "react/jsx-runtime";
1227
1089
  var HeadingRenderer = {
1228
1090
  canRenderType: "heading",
1229
- render: (props) => /* @__PURE__ */ jsx33(Heading, __spreadValues({}, props))
1091
+ render: (props) => /* @__PURE__ */ jsx30(Heading, __spreadValues({}, props))
1230
1092
  };
1231
1093
  function Heading(props) {
1232
1094
  const { text, size, align, margin, control } = props;
1233
1095
  const className = getTextAlignmentAndMargin({ align, margin });
1234
- return control === "display" ? /* @__PURE__ */ jsx33(DisplayHeading, { size, text, className }) : /* @__PURE__ */ jsx33(StandardHeading, { size, text, className });
1096
+ return control === "display" ? /* @__PURE__ */ jsx30(DisplayHeading, { size, text, className }) : /* @__PURE__ */ jsx30(StandardHeading, { size, text, className });
1235
1097
  }
1236
1098
  function DisplayHeading({ size, text, className }) {
1237
- return /* @__PURE__ */ jsx33(Display, { type: getDisplayType(size), className, children: text });
1099
+ return /* @__PURE__ */ jsx30(Display, { type: getDisplayType(size), className, children: text });
1238
1100
  }
1239
1101
  var getDisplayType = (size) => {
1240
1102
  switch (size) {
@@ -1250,7 +1112,7 @@ var getDisplayType = (size) => {
1250
1112
  }
1251
1113
  };
1252
1114
  function StandardHeading({ size, text, className }) {
1253
- return /* @__PURE__ */ jsx33(Title, { type: getTitleTypeBySize(size), className, children: text });
1115
+ return /* @__PURE__ */ jsx30(Title, { type: getTitleTypeBySize(size), className, children: text });
1254
1116
  }
1255
1117
  var getTitleTypeBySize = (size) => {
1256
1118
  var _a;
@@ -1267,7 +1129,7 @@ var HeadingRenderer_default = HeadingRenderer;
1267
1129
 
1268
1130
  // ../renderers/src/ImageRenderer/UrlImage.tsx
1269
1131
  import { Image } from "@transferwise/components";
1270
- import { useEffect as useEffect4, useState as useState4 } from "react";
1132
+ import { useEffect as useEffect4, useState as useState3 } from "react";
1271
1133
 
1272
1134
  // ../renderers/src/utils/api-utils.ts
1273
1135
  function isRelativePath(url = "") {
@@ -1277,7 +1139,7 @@ function isRelativePath(url = "") {
1277
1139
  }
1278
1140
 
1279
1141
  // ../renderers/src/ImageRenderer/UrlImage.tsx
1280
- import { jsx as jsx34 } from "react/jsx-runtime";
1142
+ import { jsx as jsx31 } from "react/jsx-runtime";
1281
1143
  function UrlImage({
1282
1144
  accessibilityDescription,
1283
1145
  align,
@@ -1286,13 +1148,13 @@ function UrlImage({
1286
1148
  uri,
1287
1149
  httpClient
1288
1150
  }) {
1289
- const [imageSource, setImageSource] = useState4("");
1151
+ const [imageSource, setImageSource] = useState3("");
1290
1152
  useEffect4(() => {
1291
1153
  if (!uri.startsWith("urn:")) {
1292
1154
  void getImageSource(httpClient, uri).then(setImageSource);
1293
1155
  }
1294
1156
  }, [uri, httpClient]);
1295
- return /* @__PURE__ */ jsx34("div", { className: `df-image ${align} ${size || "md"}`, children: /* @__PURE__ */ jsx34(
1157
+ return /* @__PURE__ */ jsx31("div", { className: `df-image ${align} ${size || "md"}`, children: /* @__PURE__ */ jsx31(
1296
1158
  Image,
1297
1159
  {
1298
1160
  className: `img-responsive ${getMargin(margin)}`,
@@ -1336,7 +1198,7 @@ var getImageSource = async (httpClient, imageUrl) => {
1336
1198
  };
1337
1199
 
1338
1200
  // ../renderers/src/ImageRenderer/UrnFlagImage.tsx
1339
- import { jsx as jsx35 } from "react/jsx-runtime";
1201
+ import { jsx as jsx32 } from "react/jsx-runtime";
1340
1202
  var maxFlagSize = 600;
1341
1203
  function UrnFlagImage({
1342
1204
  accessibilityDescription,
@@ -1345,7 +1207,7 @@ function UrnFlagImage({
1345
1207
  size,
1346
1208
  uri
1347
1209
  }) {
1348
- return /* @__PURE__ */ jsx35("div", { className: `df-image ${align} ${size || "md"} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx35(UrnFlag, { size: maxFlagSize, urn: uri, accessibilityDescription }) });
1210
+ return /* @__PURE__ */ jsx32("div", { className: `df-image ${align} ${size || "md"} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx32(UrnFlag, { size: maxFlagSize, urn: uri, accessibilityDescription }) });
1349
1211
  }
1350
1212
 
1351
1213
  // ../renderers/src/ImageRenderer/UrnIllustration.tsx
@@ -1353,7 +1215,7 @@ import {
1353
1215
  Illustration,
1354
1216
  isIllustrationSupport3D
1355
1217
  } from "@wise/art";
1356
- import { useState as useState5 } from "react";
1218
+ import { useState as useState4 } from "react";
1357
1219
 
1358
1220
  // ../renderers/src/ImageRenderer/isAnimated.ts
1359
1221
  var isAnimated = (uri) => {
@@ -1364,7 +1226,7 @@ var isAnimated = (uri) => {
1364
1226
  // ../renderers/src/ImageRenderer/SafeIllustration3D.tsx
1365
1227
  import { Illustration3D } from "@wise/art";
1366
1228
  import { Component } from "react";
1367
- import { jsx as jsx36 } from "react/jsx-runtime";
1229
+ import { jsx as jsx33 } from "react/jsx-runtime";
1368
1230
  var Illustration3DErrorBoundary = class extends Component {
1369
1231
  constructor(props) {
1370
1232
  super(props);
@@ -1388,12 +1250,12 @@ var SafeIllustration3D = ({
1388
1250
  size,
1389
1251
  onError
1390
1252
  }) => {
1391
- return /* @__PURE__ */ jsx36(Illustration3DErrorBoundary, { onError, children: /* @__PURE__ */ jsx36(Illustration3D, { name, size }) });
1253
+ return /* @__PURE__ */ jsx33(Illustration3DErrorBoundary, { onError, children: /* @__PURE__ */ jsx33(Illustration3D, { name, size }) });
1392
1254
  };
1393
1255
  var SafeIllustration3D_default = SafeIllustration3D;
1394
1256
 
1395
1257
  // ../renderers/src/ImageRenderer/UrnIllustration.tsx
1396
- import { jsx as jsx37 } from "react/jsx-runtime";
1258
+ import { jsx as jsx34 } from "react/jsx-runtime";
1397
1259
  var urnPrefix = "urn:wise:illustrations:";
1398
1260
  var isUrnIllustration = (uri) => uri.startsWith(urnPrefix);
1399
1261
  function UrnIllustration({
@@ -1403,12 +1265,12 @@ function UrnIllustration({
1403
1265
  size,
1404
1266
  uri
1405
1267
  }) {
1406
- const [has3DFailed, setHas3DFailed] = useState5(false);
1268
+ const [has3DFailed, setHas3DFailed] = useState4(false);
1407
1269
  const illustrationSize = getIllustrationSize(size);
1408
1270
  const illustrationName = getIllustrationName(uri);
1409
1271
  const illustration3DName = getIllustration3DName(uri);
1410
1272
  if (illustration3DName && isAnimated(uri) && !has3DFailed) {
1411
- return /* @__PURE__ */ jsx37("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx37(
1273
+ return /* @__PURE__ */ jsx34("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx34(
1412
1274
  SafeIllustration3D_default,
1413
1275
  {
1414
1276
  name: illustration3DName,
@@ -1417,7 +1279,7 @@ function UrnIllustration({
1417
1279
  }
1418
1280
  ) });
1419
1281
  }
1420
- return /* @__PURE__ */ jsx37("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx37(
1282
+ return /* @__PURE__ */ jsx34("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ jsx34(
1421
1283
  Illustration,
1422
1284
  {
1423
1285
  className: "df-illustration",
@@ -1437,32 +1299,32 @@ var getIllustration3DName = (uri) => {
1437
1299
  };
1438
1300
 
1439
1301
  // ../renderers/src/ImageRenderer/UrnImage.tsx
1440
- import { jsx as jsx38 } from "react/jsx-runtime";
1302
+ import { jsx as jsx35 } from "react/jsx-runtime";
1441
1303
  var isUrnImage = (uri) => uri.startsWith("urn:");
1442
1304
  function UrnImage(props) {
1443
1305
  const { uri } = props;
1444
1306
  if (isUrnIllustration(uri)) {
1445
- return /* @__PURE__ */ jsx38(UrnIllustration, __spreadValues({}, props));
1307
+ return /* @__PURE__ */ jsx35(UrnIllustration, __spreadValues({}, props));
1446
1308
  }
1447
1309
  if (isUrnFlag(uri)) {
1448
- return /* @__PURE__ */ jsx38(UrnFlagImage, __spreadValues({}, props));
1310
+ return /* @__PURE__ */ jsx35(UrnFlagImage, __spreadValues({}, props));
1449
1311
  }
1450
1312
  return null;
1451
1313
  }
1452
1314
 
1453
1315
  // ../renderers/src/ImageRenderer/ImageRenderer.tsx
1454
- import { jsx as jsx39 } from "react/jsx-runtime";
1316
+ import { jsx as jsx36 } from "react/jsx-runtime";
1455
1317
  var ImageRenderer = {
1456
1318
  canRenderType: "image",
1457
- render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ jsx39(UrnImage, __spreadValues({}, props)) : /* @__PURE__ */ jsx39(UrlImage, __spreadValues({}, props))
1319
+ render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ jsx36(UrnImage, __spreadValues({}, props)) : /* @__PURE__ */ jsx36(UrlImage, __spreadValues({}, props))
1458
1320
  };
1459
1321
 
1460
1322
  // ../renderers/src/ImageRenderer/index.tsx
1461
1323
  var ImageRenderer_default = ImageRenderer;
1462
1324
 
1463
1325
  // ../renderers/src/InstructionsRenderer.tsx
1464
- import { Header as Header4, InstructionsList } from "@transferwise/components";
1465
- import { jsx as jsx40, jsxs as jsxs8 } from "react/jsx-runtime";
1326
+ import { Header as Header2, InstructionsList } from "@transferwise/components";
1327
+ import { jsx as jsx37, jsxs as jsxs6 } from "react/jsx-runtime";
1466
1328
  var doContext = ["positive", "neutral"];
1467
1329
  var dontContext = ["warning", "negative"];
1468
1330
  var InstructionsRenderer = {
@@ -1470,9 +1332,9 @@ var InstructionsRenderer = {
1470
1332
  render: ({ items, margin, title }) => {
1471
1333
  const dos = items.filter((item) => doContext.includes(item.context)).map(({ text }) => text);
1472
1334
  const donts = items.filter((item) => dontContext.includes(item.context)).map(({ text }) => text);
1473
- return /* @__PURE__ */ jsxs8("div", { className: getMargin(margin), children: [
1474
- title ? /* @__PURE__ */ jsx40(Header4, { title }) : null,
1475
- /* @__PURE__ */ jsx40(InstructionsList, { dos, donts })
1335
+ return /* @__PURE__ */ jsxs6("div", { className: getMargin(margin), children: [
1336
+ title ? /* @__PURE__ */ jsx37(Header2, { title }) : null,
1337
+ /* @__PURE__ */ jsx37(InstructionsList, { dos, donts })
1476
1338
  ] });
1477
1339
  }
1478
1340
  };
@@ -1504,7 +1366,7 @@ function pick(obj, ...keys) {
1504
1366
  }
1505
1367
 
1506
1368
  // ../renderers/src/IntegerInputRenderer.tsx
1507
- import { jsx as jsx41 } from "react/jsx-runtime";
1369
+ import { jsx as jsx38 } from "react/jsx-runtime";
1508
1370
  var IntegerInputRenderer = {
1509
1371
  canRenderType: "input-integer",
1510
1372
  render: (props) => {
@@ -1519,7 +1381,7 @@ var IntegerInputRenderer = {
1519
1381
  "maximum",
1520
1382
  "minimum"
1521
1383
  );
1522
- return /* @__PURE__ */ jsx41(
1384
+ return /* @__PURE__ */ jsx38(
1523
1385
  FieldInput_default,
1524
1386
  {
1525
1387
  id,
@@ -1527,7 +1389,7 @@ var IntegerInputRenderer = {
1527
1389
  description,
1528
1390
  validation: validationState,
1529
1391
  help,
1530
- children: /* @__PURE__ */ jsx41(InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx41(
1392
+ children: /* @__PURE__ */ jsx38(InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx38(
1531
1393
  Input,
1532
1394
  __spreadValues({
1533
1395
  id,
@@ -1549,100 +1411,28 @@ var IntegerInputRenderer = {
1549
1411
  };
1550
1412
  var IntegerInputRenderer_default = IntegerInputRenderer;
1551
1413
 
1552
- // ../renderers/src/ListRenderer.tsx
1553
- import { Body, Header as Header5 } from "@transferwise/components";
1554
- import classNames3 from "classnames";
1555
- import { jsx as jsx42, jsxs as jsxs9 } from "react/jsx-runtime";
1556
- var ListRenderer = {
1557
- canRenderType: "list",
1558
- render: ({ callToAction, control, margin, items, title }) => /* @__PURE__ */ jsxs9("div", { className: getMargin(margin), children: [
1559
- (title || callToAction) && /* @__PURE__ */ jsx42(Header5, { as: "h2", title: title != null ? title : "", action: getListAction(callToAction) }),
1560
- items.map((props) => /* @__PURE__ */ jsx42(DesignSystemListItem, __spreadProps(__spreadValues({}, props), { control }), props.title))
1561
- ] })
1562
- };
1563
- var DesignSystemListItem = ({
1564
- title,
1565
- description,
1566
- supportingValues,
1567
- icon,
1568
- image,
1569
- media,
1570
- control,
1571
- tag
1572
- }) => /* @__PURE__ */ jsx42(
1573
- "label",
1574
- {
1575
- className: classNames3("np-option p-a-2", {
1576
- "np-option__sm-media": true,
1577
- "np-option__container-aligned": true
1578
- }),
1579
- children: /* @__PURE__ */ jsxs9("div", { className: "media", children: [
1580
- icon || image || media ? /* @__PURE__ */ jsx42("div", { className: "media-left", children: /* @__PURE__ */ jsx42(
1581
- ListItemMedia,
1582
- {
1583
- icon,
1584
- media,
1585
- preferAvatar: control === "with-avatar" || tag === "with-avatar"
1586
- }
1587
- ) }) : null,
1588
- /* @__PURE__ */ jsxs9("div", { className: "media-body", children: [
1589
- /* @__PURE__ */ jsxs9("div", { className: "d-flex justify-content-between", children: [
1590
- /* @__PURE__ */ jsx42("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: title }),
1591
- /* @__PURE__ */ jsx42("h4", { className: "np-text-body-large-bold text-primary np-option__title", children: supportingValues == null ? void 0 : supportingValues.value })
1592
- ] }),
1593
- /* @__PURE__ */ jsxs9("div", { className: "d-flex justify-content-between", children: [
1594
- /* @__PURE__ */ jsx42(Body, { className: "d-block np-option__body", children: description }),
1595
- /* @__PURE__ */ jsx42(Body, { className: "d-block np-option__body", children: supportingValues == null ? void 0 : supportingValues.subvalue })
1596
- ] })
1597
- ] })
1598
- ] })
1599
- },
1600
- title
1601
- );
1602
- var ListItemMedia = ({
1603
- icon,
1604
- media,
1605
- preferAvatar
1606
- }) => {
1607
- if (icon) {
1608
- return /* @__PURE__ */ jsx42("div", { className: "circle circle-sm text-primary circle-inverse", children: /* @__PURE__ */ jsx42(OptionMedia, { media, preferAvatar }) });
1609
- }
1610
- return /* @__PURE__ */ jsx42("div", { className: "np-option__no-media-circle", children: /* @__PURE__ */ jsx42(OptionMedia, { media, preferAvatar }) });
1611
- };
1612
- var getListAction = (callToAction) => {
1613
- if (callToAction) {
1614
- return __spreadValues({
1615
- "aria-label": callToAction.accessibilityDescription,
1616
- text: callToAction.title,
1617
- onClick: callToAction.onClick
1618
- }, callToAction.type === "link" ? { href: callToAction.href, target: "_blank" } : {});
1619
- }
1620
- return void 0;
1621
- };
1622
- var ListRenderer_default = ListRenderer;
1623
-
1624
- // ../renderers/src/LoadingIndicatorRenderer.tsx
1625
- import { Loader } from "@transferwise/components";
1626
- import { jsx as jsx43 } from "react/jsx-runtime";
1627
- var LoadingIndicatorRenderer = {
1628
- canRenderType: "loading-indicator",
1629
- render: ({ margin, size }) => /* @__PURE__ */ jsx43(
1630
- Loader,
1631
- {
1632
- size,
1633
- classNames: { "tw-loader": `tw-loader m-x-auto ${getMargin(margin)}` },
1634
- "data-testid": "loading-indicator"
1635
- }
1636
- )
1414
+ // ../renderers/src/LoadingIndicatorRenderer.tsx
1415
+ import { Loader } from "@transferwise/components";
1416
+ import { jsx as jsx39 } from "react/jsx-runtime";
1417
+ var LoadingIndicatorRenderer = {
1418
+ canRenderType: "loading-indicator",
1419
+ render: ({ margin, size }) => /* @__PURE__ */ jsx39(
1420
+ Loader,
1421
+ {
1422
+ size,
1423
+ classNames: { "tw-loader": `tw-loader m-x-auto ${getMargin(margin)}` },
1424
+ "data-testid": "loading-indicator"
1425
+ }
1426
+ )
1637
1427
  };
1638
1428
  var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
1639
1429
 
1640
1430
  // ../renderers/src/MarkdownRenderer.tsx
1641
1431
  import { Markdown as Markdown3 } from "@transferwise/components";
1642
- import { jsx as jsx44 } from "react/jsx-runtime";
1432
+ import { jsx as jsx40 } from "react/jsx-runtime";
1643
1433
  var MarkdownRenderer = {
1644
1434
  canRenderType: "markdown",
1645
- render: ({ content, align, margin, size }) => /* @__PURE__ */ jsx44("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ jsx44(
1435
+ render: ({ content, align, margin, size }) => /* @__PURE__ */ jsx40("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ jsx40(
1646
1436
  Markdown3,
1647
1437
  {
1648
1438
  className: ["xs", "sm"].includes(size) ? "np-text-body-default" : "np-text-body-large",
@@ -1655,19 +1445,19 @@ var MarkdownRenderer_default = MarkdownRenderer;
1655
1445
 
1656
1446
  // ../renderers/src/ModalLayoutRenderer.tsx
1657
1447
  import { Button as Button4, Modal as Modal2 } from "@transferwise/components";
1658
- import { useState as useState6 } from "react";
1659
- import { jsx as jsx45, jsxs as jsxs10 } from "react/jsx-runtime";
1448
+ import { useState as useState5 } from "react";
1449
+ import { jsx as jsx41, jsxs as jsxs7 } from "react/jsx-runtime";
1660
1450
  var ModalLayoutRenderer = {
1661
1451
  canRenderType: "modal-layout",
1662
- render: (props) => /* @__PURE__ */ jsx45(DFModal, __spreadValues({}, props))
1452
+ render: (props) => /* @__PURE__ */ jsx41(DFModal, __spreadValues({}, props))
1663
1453
  };
1664
1454
  var ModalLayoutRenderer_default = ModalLayoutRenderer;
1665
1455
  function DFModal({ content, margin, trigger }) {
1666
- const [visible, setVisible] = useState6(false);
1456
+ const [visible, setVisible] = useState5(false);
1667
1457
  const { children, title } = content;
1668
- return /* @__PURE__ */ jsxs10("div", { className: getMargin(margin), children: [
1669
- /* @__PURE__ */ jsx45(Button4, { v2: true, priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
1670
- /* @__PURE__ */ jsx45(
1458
+ return /* @__PURE__ */ jsxs7("div", { className: getMargin(margin), children: [
1459
+ /* @__PURE__ */ jsx41(Button4, { v2: true, priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
1460
+ /* @__PURE__ */ jsx41(
1671
1461
  Modal2,
1672
1462
  {
1673
1463
  scroll: "content",
@@ -1683,20 +1473,59 @@ function DFModal({ content, margin, trigger }) {
1683
1473
 
1684
1474
  // ../renderers/src/ModalRenderer.tsx
1685
1475
  import { Modal as Modal3 } from "@transferwise/components";
1686
- import { jsx as jsx46 } from "react/jsx-runtime";
1476
+ import { jsx as jsx42 } from "react/jsx-runtime";
1687
1477
  var ModalRenderer = {
1688
1478
  canRenderType: "modal",
1689
1479
  render: ({ title, children, open, onClose }) => {
1690
- return /* @__PURE__ */ jsx46(Modal3, { open, title, body: children, onClose });
1480
+ return /* @__PURE__ */ jsx42(Modal3, { open, title, body: children, onClose });
1691
1481
  }
1692
1482
  };
1693
1483
 
1694
1484
  // ../renderers/src/MoneyInputRenderer.tsx
1695
1485
  import { MoneyInput } from "@transferwise/components";
1696
1486
  import { useEffect as useEffect5 } from "react";
1697
- import { useIntl as useIntl6 } from "react-intl";
1698
- import { jsx as jsx47 } from "react/jsx-runtime";
1699
- var groupingTags2 = Object.keys(group_messages_default).filter((key) => key !== "all");
1487
+
1488
+ // ../renderers/src/utils/grouping-utils.ts
1489
+ var getGroupsFromTags = (knownTags, items) => {
1490
+ return knownTags.map((tag) => {
1491
+ return { tag, items: items.filter((item) => {
1492
+ var _a;
1493
+ return (_a = item.tags) == null ? void 0 : _a.includes(tag);
1494
+ }) };
1495
+ }).filter((group) => group.items.length > 0);
1496
+ };
1497
+
1498
+ // ../renderers/src/MoneyInputRenderer.tsx
1499
+ import { useIntl as useIntl4 } from "react-intl";
1500
+
1501
+ // ../renderers/src/messages/group.messages.ts
1502
+ import { defineMessages as defineMessages4 } from "react-intl";
1503
+ var group_messages_default = defineMessages4({
1504
+ all: {
1505
+ id: "df.wise.group.all",
1506
+ defaultMessage: "All",
1507
+ description: "Label for the group of options that encompasses all options"
1508
+ },
1509
+ popular: {
1510
+ id: "df.wise.group.popular",
1511
+ defaultMessage: "Popular",
1512
+ description: "Label for the group of options that are tagged as popular"
1513
+ },
1514
+ recent: {
1515
+ id: "df.wise.group.recent",
1516
+ defaultMessage: "Recent",
1517
+ description: "Label for the group of options that are tagged as recent"
1518
+ },
1519
+ "currencies-with-account-details": {
1520
+ id: "df.wise.group.currencies-with-account-details",
1521
+ defaultMessage: "Currencies with account details",
1522
+ description: "Label for the group of options that are tagged as currencies with account details"
1523
+ }
1524
+ });
1525
+
1526
+ // ../renderers/src/MoneyInputRenderer.tsx
1527
+ import { jsx as jsx43 } from "react/jsx-runtime";
1528
+ var groupingTags = Object.keys(group_messages_default).filter((key) => key !== "all");
1700
1529
  var MoneyInputRenderer = {
1701
1530
  canRenderType: "money-input",
1702
1531
  render: MoneyInputRendererComponent
@@ -1721,8 +1550,8 @@ function MoneyInputRendererComponent(props) {
1721
1550
  onCurrencyChange(0);
1722
1551
  }
1723
1552
  }, [selectedCurrencyIndex, onCurrencyChange, currencies.length]);
1724
- const { formatMessage } = useIntl6();
1725
- return /* @__PURE__ */ jsx47(
1553
+ const { formatMessage } = useIntl4();
1554
+ return /* @__PURE__ */ jsx43(
1726
1555
  FieldInput_default,
1727
1556
  {
1728
1557
  id: uid,
@@ -1730,7 +1559,7 @@ function MoneyInputRendererComponent(props) {
1730
1559
  description,
1731
1560
  validation: validationState,
1732
1561
  help,
1733
- children: /* @__PURE__ */ jsx47(
1562
+ children: /* @__PURE__ */ jsx43(
1734
1563
  MoneyInput,
1735
1564
  {
1736
1565
  amount: parseFloatOrNull(amountValue),
@@ -1759,7 +1588,7 @@ var parseFloatOrNull = (value) => {
1759
1588
  return Number.isNaN(parsed) ? null : parsed;
1760
1589
  };
1761
1590
  var mapCurrencies = (options, formatMessage) => {
1762
- const groupsFromTags = getGroupsFromTags(groupingTags2, options);
1591
+ const groupsFromTags = getGroupsFromTags(groupingTags, options);
1763
1592
  if (groupsFromTags.length > 0) {
1764
1593
  return [...groupsFromTags, { tag: "all", items: options }].flatMap(({ tag, items }) => {
1765
1594
  return [
@@ -1793,12 +1622,12 @@ function assertCurrencyCodeIsString(currencyCode) {
1793
1622
 
1794
1623
  // ../renderers/src/MultiSelectInputRenderer.tsx
1795
1624
  import { SelectInput, SelectInputOptionContent } from "@transferwise/components";
1796
- import { useState as useState7 } from "react";
1797
- import { useIntl as useIntl7 } from "react-intl";
1625
+ import { useState as useState6 } from "react";
1626
+ import { useIntl as useIntl5 } from "react-intl";
1798
1627
 
1799
1628
  // ../renderers/src/messages/multi-select.messages.ts
1800
- import { defineMessages as defineMessages6 } from "react-intl";
1801
- var multi_select_messages_default = defineMessages6({
1629
+ import { defineMessages as defineMessages5 } from "react-intl";
1630
+ var multi_select_messages_default = defineMessages5({
1802
1631
  summary: {
1803
1632
  id: "df.wise.MultiSelect.summary",
1804
1633
  defaultMessage: "{first} and {count} more",
@@ -1807,14 +1636,14 @@ var multi_select_messages_default = defineMessages6({
1807
1636
  });
1808
1637
 
1809
1638
  // ../renderers/src/MultiSelectInputRenderer.tsx
1810
- import { jsx as jsx48 } from "react/jsx-runtime";
1639
+ import { jsx as jsx44 } from "react/jsx-runtime";
1811
1640
  var MultiSelectInputRenderer = {
1812
1641
  canRenderType: "input-multi-select",
1813
- render: (props) => /* @__PURE__ */ jsx48(MultiSelectInputRendererComponent, __spreadValues({}, props))
1642
+ render: (props) => /* @__PURE__ */ jsx44(MultiSelectInputRendererComponent, __spreadValues({}, props))
1814
1643
  };
1815
1644
  function MultiSelectInputRendererComponent(props) {
1816
- const { formatMessage } = useIntl7();
1817
- const [stagedIndices, setStagedIndices] = useState7();
1645
+ const { formatMessage } = useIntl5();
1646
+ const [stagedIndices, setStagedIndices] = useState6();
1818
1647
  const {
1819
1648
  id,
1820
1649
  autoComplete,
@@ -1852,12 +1681,12 @@ function MultiSelectInputRendererComponent(props) {
1852
1681
  const contentProps = {
1853
1682
  title: option.title,
1854
1683
  description: option.description,
1855
- icon: /* @__PURE__ */ jsx48(OptionMedia, { media: option.media, preferAvatar: false })
1684
+ icon: /* @__PURE__ */ jsx44(OptionMedia, { media: option.media, preferAvatar: false })
1856
1685
  };
1857
- return /* @__PURE__ */ jsx48(SelectInputOptionContent, __spreadValues({}, contentProps));
1686
+ return /* @__PURE__ */ jsx44(SelectInputOptionContent, __spreadValues({}, contentProps));
1858
1687
  };
1859
1688
  const extraProps = { autoComplete };
1860
- return /* @__PURE__ */ jsx48(
1689
+ return /* @__PURE__ */ jsx44(
1861
1690
  FieldInput_default,
1862
1691
  {
1863
1692
  id,
@@ -1865,7 +1694,7 @@ function MultiSelectInputRendererComponent(props) {
1865
1694
  help,
1866
1695
  description,
1867
1696
  validation: validationState,
1868
- children: /* @__PURE__ */ jsx48(
1697
+ children: /* @__PURE__ */ jsx44(
1869
1698
  SelectInput,
1870
1699
  __spreadValues({
1871
1700
  id,
@@ -1908,9 +1737,9 @@ var MultiSelectInputRenderer_default = MultiSelectInputRenderer;
1908
1737
  import { Status, UploadInput } from "@transferwise/components";
1909
1738
 
1910
1739
  // ../renderers/src/components/UploadFieldInput.tsx
1740
+ var import_classnames3 = __toESM(require_classnames());
1911
1741
  import { InlineAlert as InlineAlert2 } from "@transferwise/components";
1912
- import classNames4 from "classnames";
1913
- import { jsx as jsx49, jsxs as jsxs11 } from "react/jsx-runtime";
1742
+ import { jsx as jsx45, jsxs as jsxs8 } from "react/jsx-runtime";
1914
1743
  function UploadFieldInput({
1915
1744
  id,
1916
1745
  children,
@@ -1919,18 +1748,18 @@ function UploadFieldInput({
1919
1748
  help,
1920
1749
  validation
1921
1750
  }) {
1922
- const labelContent = label && help ? /* @__PURE__ */ jsx49(LabelContentWithHelp, { text: label, help }) : label;
1751
+ const labelContent = label && help ? /* @__PURE__ */ jsx45(LabelContentWithHelp, { text: label, help }) : label;
1923
1752
  const descriptionId = description ? `${id}-description` : void 0;
1924
- return /* @__PURE__ */ jsxs11(
1753
+ return /* @__PURE__ */ jsxs8(
1925
1754
  "div",
1926
1755
  {
1927
- className: classNames4("form-group d-block", {
1756
+ className: (0, import_classnames3.default)("form-group d-block", {
1928
1757
  "has-error": (validation == null ? void 0 : validation.status) === "invalid"
1929
1758
  }),
1930
1759
  children: [
1931
- /* @__PURE__ */ jsx49("label", { htmlFor: id, className: "control-label", children: labelContent }),
1760
+ /* @__PURE__ */ jsx45("label", { htmlFor: id, className: "control-label", children: labelContent }),
1932
1761
  children,
1933
- (validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ jsx49(InlineAlert2, { type: "negative", id: descriptionId, children: validation.message })
1762
+ (validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ jsx45(InlineAlert2, { type: "negative", id: descriptionId, children: validation.message })
1934
1763
  ]
1935
1764
  }
1936
1765
  );
@@ -1965,7 +1794,7 @@ var getSizeLimit = (maxSize) => {
1965
1794
  };
1966
1795
 
1967
1796
  // ../renderers/src/MultiUploadInputRenderer.tsx
1968
- import { jsx as jsx50 } from "react/jsx-runtime";
1797
+ import { jsx as jsx46 } from "react/jsx-runtime";
1969
1798
  var MultiUploadInputRenderer = {
1970
1799
  canRenderType: "input-upload-multi",
1971
1800
  render: (props) => {
@@ -1990,7 +1819,7 @@ var MultiUploadInputRenderer = {
1990
1819
  };
1991
1820
  const onDeleteFile = async (fileId) => onRemoveFile(value.findIndex((file) => file.id === fileId));
1992
1821
  const descriptionId = description ? `${id}-description` : void 0;
1993
- return /* @__PURE__ */ jsx50(
1822
+ return /* @__PURE__ */ jsx46(
1994
1823
  UploadFieldInput_default,
1995
1824
  {
1996
1825
  id,
@@ -1998,7 +1827,7 @@ var MultiUploadInputRenderer = {
1998
1827
  description,
1999
1828
  validation: validationState,
2000
1829
  help,
2001
- children: /* @__PURE__ */ jsx50(
1830
+ children: /* @__PURE__ */ jsx46(
2002
1831
  UploadInput,
2003
1832
  {
2004
1833
  id,
@@ -2027,7 +1856,7 @@ var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
2027
1856
 
2028
1857
  // ../renderers/src/NumberInputRenderer.tsx
2029
1858
  import { Input as Input2, InputGroup as InputGroup2 } from "@transferwise/components";
2030
- import { jsx as jsx51 } from "react/jsx-runtime";
1859
+ import { jsx as jsx47 } from "react/jsx-runtime";
2031
1860
  var NumberInputRenderer = {
2032
1861
  canRenderType: "input-number",
2033
1862
  render: (props) => {
@@ -2041,7 +1870,7 @@ var NumberInputRenderer = {
2041
1870
  "maximum",
2042
1871
  "minimum"
2043
1872
  );
2044
- return /* @__PURE__ */ jsx51(
1873
+ return /* @__PURE__ */ jsx47(
2045
1874
  FieldInput_default,
2046
1875
  {
2047
1876
  id,
@@ -2049,7 +1878,7 @@ var NumberInputRenderer = {
2049
1878
  description,
2050
1879
  validation: validationState,
2051
1880
  help,
2052
- children: /* @__PURE__ */ jsx51(InputGroup2, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx51(
1881
+ children: /* @__PURE__ */ jsx47(InputGroup2, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx47(
2053
1882
  Input2,
2054
1883
  __spreadValues({
2055
1884
  id,
@@ -2070,7 +1899,7 @@ var NumberInputRenderer = {
2070
1899
  var NumberInputRenderer_default = NumberInputRenderer;
2071
1900
 
2072
1901
  // ../renderers/src/ParagraphRenderer.tsx
2073
- import { useIntl as useIntl8 } from "react-intl";
1902
+ import { useIntl as useIntl6 } from "react-intl";
2074
1903
 
2075
1904
  // ../renderers/src/hooks/useSnackBarIfAvailable.ts
2076
1905
  import { SnackbarContext } from "@transferwise/components";
@@ -2082,12 +1911,12 @@ function useSnackBarIfAvailable() {
2082
1911
  }
2083
1912
 
2084
1913
  // ../renderers/src/ParagraphRenderer.tsx
1914
+ var import_classnames4 = __toESM(require_classnames());
2085
1915
  import { Button as Button5, Input as Input3 } from "@transferwise/components";
2086
- import classNames5 from "classnames";
2087
1916
 
2088
1917
  // ../renderers/src/messages/paragraph.messages.ts
2089
- import { defineMessages as defineMessages7 } from "react-intl";
2090
- var paragraph_messages_default = defineMessages7({
1918
+ import { defineMessages as defineMessages6 } from "react-intl";
1919
+ var paragraph_messages_default = defineMessages6({
2091
1920
  copy: {
2092
1921
  id: "df.wise.DynamicParagraph.copy",
2093
1922
  defaultMessage: "Copy",
@@ -2101,14 +1930,14 @@ var paragraph_messages_default = defineMessages7({
2101
1930
  });
2102
1931
 
2103
1932
  // ../renderers/src/ParagraphRenderer.tsx
2104
- import { jsx as jsx52, jsxs as jsxs12 } from "react/jsx-runtime";
1933
+ import { jsx as jsx48, jsxs as jsxs9 } from "react/jsx-runtime";
2105
1934
  var ParagraphRenderer = {
2106
1935
  canRenderType: "paragraph",
2107
- render: (props) => /* @__PURE__ */ jsx52(Paragraph, __spreadValues({}, props))
1936
+ render: (props) => /* @__PURE__ */ jsx48(Paragraph, __spreadValues({}, props))
2108
1937
  };
2109
1938
  function Paragraph({ align, control, margin, size, text }) {
2110
1939
  const className = getTextAlignmentAndMargin({ align, margin });
2111
- return control === "copyable" ? /* @__PURE__ */ jsx52(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ jsx52(
1940
+ return control === "copyable" ? /* @__PURE__ */ jsx48(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ jsx48(
2112
1941
  "p",
2113
1942
  {
2114
1943
  className: `${["xs", "sm"].includes(size) ? "np-text-body-default" : "np-text-body-large"} ${className}`,
@@ -2121,38 +1950,38 @@ function CopyableParagraph({
2121
1950
  align,
2122
1951
  className
2123
1952
  }) {
2124
- const { formatMessage } = useIntl8();
1953
+ const { formatMessage } = useIntl6();
2125
1954
  const createSnackbar = useSnackBarIfAvailable();
2126
1955
  const copy = () => {
2127
1956
  navigator.clipboard.writeText(text).then(() => createSnackbar({ text: formatMessage(paragraph_messages_default.copied) })).catch(() => {
2128
1957
  });
2129
1958
  };
2130
1959
  const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
2131
- return /* @__PURE__ */ jsxs12("div", { className, children: [
2132
- /* @__PURE__ */ jsx52(
1960
+ return /* @__PURE__ */ jsxs9("div", { className, children: [
1961
+ /* @__PURE__ */ jsx48(
2133
1962
  Input3,
2134
1963
  {
2135
1964
  type: "text",
2136
1965
  value: text,
2137
1966
  readOnly: true,
2138
- className: classNames5("text-ellipsis", inputAlignmentClasses)
1967
+ className: (0, import_classnames4.default)("text-ellipsis", inputAlignmentClasses)
2139
1968
  }
2140
1969
  ),
2141
- /* @__PURE__ */ jsx52(Button5, { v2: true, block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
1970
+ /* @__PURE__ */ jsx48(Button5, { v2: true, block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
2142
1971
  ] });
2143
1972
  }
2144
1973
  var ParagraphRenderer_default = ParagraphRenderer;
2145
1974
 
2146
1975
  // ../renderers/src/RepeatableRenderer.tsx
2147
- import { Button as Button6, Header as Header6, InlineAlert as InlineAlert3, Modal as Modal4, NavigationOption as NavigationOption2 } from "@transferwise/components";
1976
+ var import_classnames5 = __toESM(require_classnames());
1977
+ import { Button as Button6, Header as Header3, InlineAlert as InlineAlert3, Modal as Modal4, NavigationOption } from "@transferwise/components";
2148
1978
  import { Plus } from "@transferwise/icons";
2149
- import classNames6 from "classnames";
2150
- import { useState as useState8 } from "react";
2151
- import { useIntl as useIntl9 } from "react-intl";
1979
+ import { useState as useState7 } from "react";
1980
+ import { useIntl as useIntl7 } from "react-intl";
2152
1981
 
2153
1982
  // ../renderers/src/messages/repeatable.messages.ts
2154
- import { defineMessages as defineMessages8 } from "react-intl";
2155
- var repeatable_messages_default = defineMessages8({
1983
+ import { defineMessages as defineMessages7 } from "react-intl";
1984
+ var repeatable_messages_default = defineMessages7({
2156
1985
  addItemTitle: {
2157
1986
  id: "df.wise.ArraySchema.addItemTitle",
2158
1987
  defaultMessage: "Add Item",
@@ -2176,10 +2005,10 @@ var repeatable_messages_default = defineMessages8({
2176
2005
  });
2177
2006
 
2178
2007
  // ../renderers/src/RepeatableRenderer.tsx
2179
- import { Fragment as Fragment4, jsx as jsx53, jsxs as jsxs13 } from "react/jsx-runtime";
2008
+ import { Fragment as Fragment2, jsx as jsx49, jsxs as jsxs10 } from "react/jsx-runtime";
2180
2009
  var RepeatableRenderer = {
2181
2010
  canRenderType: "repeatable",
2182
- render: (props) => /* @__PURE__ */ jsx53(Repeatable, __spreadValues({}, props))
2011
+ render: (props) => /* @__PURE__ */ jsx49(Repeatable, __spreadValues({}, props))
2183
2012
  };
2184
2013
  function Repeatable(props) {
2185
2014
  const {
@@ -2195,8 +2024,8 @@ function Repeatable(props) {
2195
2024
  onSave,
2196
2025
  onRemove
2197
2026
  } = props;
2198
- const { formatMessage } = useIntl9();
2199
- const [openModalType, setOpenModalType] = useState8(null);
2027
+ const { formatMessage } = useIntl7();
2028
+ const [openModalType, setOpenModalType] = useState7(null);
2200
2029
  const onAddItem = () => {
2201
2030
  onAdd();
2202
2031
  setOpenModalType("add");
@@ -2218,40 +2047,40 @@ function Repeatable(props) {
2218
2047
  const onCancelEdit = () => {
2219
2048
  setOpenModalType(null);
2220
2049
  };
2221
- return /* @__PURE__ */ jsxs13(Fragment4, { children: [
2222
- title && /* @__PURE__ */ jsx53(Header6, { title }),
2223
- description && /* @__PURE__ */ jsx53("p", { children: description }),
2224
- /* @__PURE__ */ jsxs13(
2050
+ return /* @__PURE__ */ jsxs10(Fragment2, { children: [
2051
+ title && /* @__PURE__ */ jsx49(Header3, { title }),
2052
+ description && /* @__PURE__ */ jsx49("p", { children: description }),
2053
+ /* @__PURE__ */ jsxs10(
2225
2054
  "div",
2226
2055
  {
2227
- className: classNames6("form-group", {
2056
+ className: (0, import_classnames5.default)("form-group", {
2228
2057
  "has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
2229
2058
  }),
2230
2059
  children: [
2231
- items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsx53(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
2232
- /* @__PURE__ */ jsx53(
2233
- NavigationOption2,
2060
+ items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ jsx49(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
2061
+ /* @__PURE__ */ jsx49(
2062
+ NavigationOption,
2234
2063
  {
2235
- media: /* @__PURE__ */ jsx53(Plus, {}),
2064
+ media: /* @__PURE__ */ jsx49(Plus, {}),
2236
2065
  title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
2237
2066
  showMediaAtAllSizes: true,
2238
2067
  onClick: () => onAddItem()
2239
2068
  }
2240
2069
  ),
2241
- (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ jsx53(InlineAlert3, { type: "negative", children: validationState.message })
2070
+ (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ jsx49(InlineAlert3, { type: "negative", children: validationState.message })
2242
2071
  ]
2243
2072
  }
2244
2073
  ),
2245
- /* @__PURE__ */ jsx53(
2074
+ /* @__PURE__ */ jsx49(
2246
2075
  Modal4,
2247
2076
  {
2248
2077
  open: openModalType !== null,
2249
2078
  title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
2250
- body: /* @__PURE__ */ jsxs13(Fragment4, { children: [
2251
- /* @__PURE__ */ jsx53("div", { className: "m-b-2", children: editableItem }),
2252
- /* @__PURE__ */ jsxs13("div", { children: [
2253
- /* @__PURE__ */ jsx53(Button6, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
2254
- /* @__PURE__ */ jsx53(
2079
+ body: /* @__PURE__ */ jsxs10(Fragment2, { children: [
2080
+ /* @__PURE__ */ jsx49("div", { className: "m-b-2", children: editableItem }),
2081
+ /* @__PURE__ */ jsxs10("div", { children: [
2082
+ /* @__PURE__ */ jsx49(Button6, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
2083
+ /* @__PURE__ */ jsx49(
2255
2084
  Button6,
2256
2085
  {
2257
2086
  v2: true,
@@ -2273,10 +2102,10 @@ function ItemSummaryOption({
2273
2102
  item,
2274
2103
  onClick
2275
2104
  }) {
2276
- return /* @__PURE__ */ jsx53(
2277
- NavigationOption2,
2105
+ return /* @__PURE__ */ jsx49(
2106
+ NavigationOption,
2278
2107
  {
2279
- media: /* @__PURE__ */ jsx53(OptionMedia, { media: item.media, preferAvatar: false }),
2108
+ media: /* @__PURE__ */ jsx49(OptionMedia, { media: item.media, preferAvatar: false }),
2280
2109
  title: item.title,
2281
2110
  content: item.description,
2282
2111
  showMediaAtAllSizes: true,
@@ -2287,96 +2116,14 @@ function ItemSummaryOption({
2287
2116
  }
2288
2117
  var RepeatableRenderer_default = RepeatableRenderer;
2289
2118
 
2290
- // ../renderers/src/ReviewRenderer.tsx
2291
- import { DefinitionList } from "@transferwise/components";
2292
-
2293
- // ../renderers/src/components/Header.tsx
2294
- import { Header as DSHeader } from "@transferwise/components";
2295
- import { jsx as jsx54 } from "react/jsx-runtime";
2296
- var Header7 = ({ title, callToAction }) => (title || callToAction) && /* @__PURE__ */ jsx54(DSHeader, { title: title != null ? title : "", action: getHeaderAction(callToAction) });
2297
- var getHeaderAction = (callToAction) => {
2298
- if (!callToAction) {
2299
- return void 0;
2300
- }
2301
- const { accessibilityDescription, href, title, onClick } = callToAction;
2302
- return href ? {
2303
- "aria-label": accessibilityDescription,
2304
- text: title,
2305
- href,
2306
- target: "_blank"
2307
- } : {
2308
- "aria-label": accessibilityDescription,
2309
- text: title,
2310
- onClick: (event) => {
2311
- event.preventDefault();
2312
- onClick();
2313
- }
2314
- };
2315
- };
2316
-
2317
- // ../renderers/src/ReviewRenderer.tsx
2318
- import { Fragment as Fragment5, jsx as jsx55, jsxs as jsxs14 } from "react/jsx-runtime";
2319
- var ReviewRenderer = {
2320
- canRenderType: "review",
2321
- render: ({ callToAction, control, fields, margin, title, trackEvent }) => {
2322
- const orientation = mapControlToDefinitionListLayout(control);
2323
- return /* @__PURE__ */ jsxs14("div", { className: getMargin(margin), children: [
2324
- /* @__PURE__ */ jsx55(Header7, { title, callToAction }),
2325
- /* @__PURE__ */ jsx55("div", { className: margin, children: /* @__PURE__ */ jsx55(
2326
- DefinitionList,
2327
- {
2328
- layout: orientation,
2329
- definitions: fields.map(
2330
- ({ label, value, help, analyticsId: fieldAnalyticsId }, index) => ({
2331
- key: String(index),
2332
- value,
2333
- title: getFieldLabel(
2334
- label,
2335
- help,
2336
- () => trackEvent("Help Pressed", { layoutItemId: fieldAnalyticsId })
2337
- )
2338
- })
2339
- )
2340
- }
2341
- ) })
2342
- ] });
2343
- }
2344
- };
2345
- var ReviewRenderer_default = ReviewRenderer;
2346
- var mapControlToDefinitionListLayout = (control) => {
2347
- switch (control) {
2348
- case "horizontal":
2349
- case "horizontal-end-aligned":
2350
- return "HORIZONTAL_RIGHT_ALIGNED";
2351
- case "horizontal-start-aligned":
2352
- return "HORIZONTAL_LEFT_ALIGNED";
2353
- case "vertical-two-column":
2354
- return "VERTICAL_TWO_COLUMN";
2355
- case "vertical":
2356
- case "vertical-one-column":
2357
- default:
2358
- return "VERTICAL_ONE_COLUMN";
2359
- }
2360
- };
2361
- var getFieldLabel = (label, help, onClick) => {
2362
- if (help) {
2363
- return /* @__PURE__ */ jsxs14(Fragment5, { children: [
2364
- label,
2365
- " ",
2366
- /* @__PURE__ */ jsx55(Help_default, { help, onClick })
2367
- ] });
2368
- }
2369
- return label;
2370
- };
2371
-
2372
2119
  // ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
2373
- import { Input as Input4, Markdown as Markdown4, NavigationOption as NavigationOption3, NavigationOptionsList as NavigationOptionsList2 } from "@transferwise/components";
2374
- import { useState as useState9 } from "react";
2375
- import { useIntl as useIntl11 } from "react-intl";
2120
+ import { Input as Input4, Markdown as Markdown4, NavigationOption as NavigationOption2, NavigationOptionsList } from "@transferwise/components";
2121
+ import { useState as useState8 } from "react";
2122
+ import { useIntl as useIntl9 } from "react-intl";
2376
2123
 
2377
2124
  // ../renderers/src/messages/search.messages.ts
2378
- import { defineMessages as defineMessages9 } from "react-intl";
2379
- var search_messages_default = defineMessages9({
2125
+ import { defineMessages as defineMessages8 } from "react-intl";
2126
+ var search_messages_default = defineMessages8({
2380
2127
  loading: {
2381
2128
  id: "df.wise.SearchLayout.loading",
2382
2129
  defaultMessage: "Loading...",
@@ -2385,11 +2132,11 @@ var search_messages_default = defineMessages9({
2385
2132
  });
2386
2133
 
2387
2134
  // ../renderers/src/SearchRenderer/ErrorResult.tsx
2388
- import { useIntl as useIntl10 } from "react-intl";
2135
+ import { useIntl as useIntl8 } from "react-intl";
2389
2136
 
2390
2137
  // ../renderers/src/messages/generic-error.messages.ts
2391
- import { defineMessages as defineMessages10 } from "react-intl";
2392
- var generic_error_messages_default = defineMessages10({
2138
+ import { defineMessages as defineMessages9 } from "react-intl";
2139
+ var generic_error_messages_default = defineMessages9({
2393
2140
  genericErrorRetryHint: {
2394
2141
  id: "df.wise.PersistAsyncSchema.genericError",
2395
2142
  defaultMessage: "Something went wrong, please try again.",
@@ -2409,18 +2156,18 @@ var generic_error_messages_default = defineMessages10({
2409
2156
 
2410
2157
  // ../renderers/src/SearchRenderer/ErrorResult.tsx
2411
2158
  import { Link } from "@transferwise/components";
2412
- import { jsx as jsx56, jsxs as jsxs15 } from "react/jsx-runtime";
2159
+ import { jsx as jsx50, jsxs as jsxs11 } from "react/jsx-runtime";
2413
2160
  function ErrorResult({ state }) {
2414
- const intl = useIntl10();
2415
- return /* @__PURE__ */ jsxs15("p", { className: "m-t-2", children: [
2161
+ const intl = useIntl8();
2162
+ return /* @__PURE__ */ jsxs11("p", { className: "m-t-2", children: [
2416
2163
  intl.formatMessage(generic_error_messages_default.genericError),
2417
2164
  "\xA0",
2418
- /* @__PURE__ */ jsx56(Link, { onClick: () => state.onRetry(), children: intl.formatMessage(generic_error_messages_default.retry) })
2165
+ /* @__PURE__ */ jsx50(Link, { onClick: () => state.onRetry(), children: intl.formatMessage(generic_error_messages_default.retry) })
2419
2166
  ] });
2420
2167
  }
2421
2168
 
2422
2169
  // ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
2423
- import { jsx as jsx57, jsxs as jsxs16 } from "react/jsx-runtime";
2170
+ import { jsx as jsx51, jsxs as jsxs12 } from "react/jsx-runtime";
2424
2171
  function BlockSearchRendererComponent({
2425
2172
  id,
2426
2173
  isLoading,
@@ -2431,10 +2178,10 @@ function BlockSearchRendererComponent({
2431
2178
  trackEvent,
2432
2179
  onChange
2433
2180
  }) {
2434
- const [hasSearched, setHasSearched] = useState9(false);
2435
- const { formatMessage } = useIntl11();
2436
- return /* @__PURE__ */ jsxs16("div", { className: getMargin(margin), children: [
2437
- /* @__PURE__ */ jsx57(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx57(
2181
+ const [hasSearched, setHasSearched] = useState8(false);
2182
+ const { formatMessage } = useIntl9();
2183
+ return /* @__PURE__ */ jsxs12("div", { className: getMargin(margin), children: [
2184
+ /* @__PURE__ */ jsx51(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx51(
2438
2185
  Input4,
2439
2186
  {
2440
2187
  id,
@@ -2451,7 +2198,7 @@ function BlockSearchRendererComponent({
2451
2198
  }
2452
2199
  }
2453
2200
  ) }),
2454
- isLoading ? /* @__PURE__ */ jsx57("span", { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ jsx57(SearchResultContent, { state, trackEvent })
2201
+ isLoading ? /* @__PURE__ */ jsx51("span", { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ jsx51(SearchResultContent, { state, trackEvent })
2455
2202
  ] });
2456
2203
  }
2457
2204
  function SearchResultContent({
@@ -2460,31 +2207,31 @@ function SearchResultContent({
2460
2207
  }) {
2461
2208
  switch (state.type) {
2462
2209
  case "error":
2463
- return /* @__PURE__ */ jsx57(ErrorResult, { state });
2210
+ return /* @__PURE__ */ jsx51(ErrorResult, { state });
2464
2211
  case "results":
2465
- return /* @__PURE__ */ jsx57(SearchResults, { state, trackEvent });
2212
+ return /* @__PURE__ */ jsx51(SearchResults, { state, trackEvent });
2466
2213
  case "noResults":
2467
- return /* @__PURE__ */ jsx57(EmptySearchResult, { state });
2214
+ return /* @__PURE__ */ jsx51(EmptySearchResult, { state });
2468
2215
  case "pending":
2469
2216
  default:
2470
2217
  return null;
2471
2218
  }
2472
2219
  }
2473
2220
  function EmptySearchResult({ state }) {
2474
- return /* @__PURE__ */ jsx57(Markdown4, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
2221
+ return /* @__PURE__ */ jsx51(Markdown4, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
2475
2222
  }
2476
2223
  function SearchResults({
2477
2224
  state,
2478
2225
  trackEvent
2479
2226
  }) {
2480
- return /* @__PURE__ */ jsx57(NavigationOptionsList2, { children: state.results.map((result) => {
2227
+ return /* @__PURE__ */ jsx51(NavigationOptionsList, { children: state.results.map((result) => {
2481
2228
  const { media } = result;
2482
- return /* @__PURE__ */ jsx57(
2483
- NavigationOption3,
2229
+ return /* @__PURE__ */ jsx51(
2230
+ NavigationOption2,
2484
2231
  {
2485
2232
  title: result.title,
2486
2233
  content: result.description,
2487
- media: media ? /* @__PURE__ */ jsx57(OptionMedia, { media, preferAvatar: false }) : void 0,
2234
+ media: media ? /* @__PURE__ */ jsx51(OptionMedia, { media, preferAvatar: false }) : void 0,
2488
2235
  showMediaCircle: false,
2489
2236
  showMediaAtAllSizes: true,
2490
2237
  onClick: () => {
@@ -2503,9 +2250,9 @@ var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
2503
2250
  // ../renderers/src/SearchRenderer/InlineSearchRendererComponent.tsx
2504
2251
  import { Markdown as Markdown5, Typeahead } from "@transferwise/components";
2505
2252
  import { Search } from "@transferwise/icons";
2506
- import { useState as useState10 } from "react";
2507
- import { useIntl as useIntl12 } from "react-intl";
2508
- import { jsx as jsx58 } from "react/jsx-runtime";
2253
+ import { useState as useState9 } from "react";
2254
+ import { useIntl as useIntl10 } from "react-intl";
2255
+ import { jsx as jsx52 } from "react/jsx-runtime";
2509
2256
  function InlineSearchRenderer({
2510
2257
  id,
2511
2258
  isLoading,
@@ -2515,9 +2262,9 @@ function InlineSearchRenderer({
2515
2262
  title,
2516
2263
  trackEvent
2517
2264
  }) {
2518
- const [hasSearched, setHasSearched] = useState10(false);
2519
- const intl = useIntl12();
2520
- return /* @__PURE__ */ jsx58("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx58(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx58(
2265
+ const [hasSearched, setHasSearched] = useState9(false);
2266
+ const intl = useIntl10();
2267
+ return /* @__PURE__ */ jsx52("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx52(FieldInput_default, { id, description: "", validation: void 0, help: "", label: title, children: /* @__PURE__ */ jsx52(
2521
2268
  Typeahead,
2522
2269
  {
2523
2270
  id: "typeahead-input-id",
@@ -2525,10 +2272,10 @@ function InlineSearchRenderer({
2525
2272
  name: "typeahead-input-name",
2526
2273
  size: "md",
2527
2274
  maxHeight: 100,
2528
- footer: /* @__PURE__ */ jsx58(TypeaheadFooter, { state, isLoading }),
2275
+ footer: /* @__PURE__ */ jsx52(TypeaheadFooter, { state, isLoading }),
2529
2276
  multiple: false,
2530
2277
  clearable: false,
2531
- addon: /* @__PURE__ */ jsx58(Search, { size: 24 }),
2278
+ addon: /* @__PURE__ */ jsx52(Search, { size: 24 }),
2532
2279
  options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
2533
2280
  minQueryLength: 1,
2534
2281
  onChange: (values) => {
@@ -2563,33 +2310,33 @@ function mapResultToTypeaheadOption(result) {
2563
2310
  };
2564
2311
  }
2565
2312
  function TypeaheadFooter({ state, isLoading }) {
2566
- const { formatMessage } = useIntl12();
2313
+ const { formatMessage } = useIntl10();
2567
2314
  if (state.type === "noResults") {
2568
- return /* @__PURE__ */ jsx58(Markdown5, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
2315
+ return /* @__PURE__ */ jsx52(Markdown5, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
2569
2316
  }
2570
2317
  if (state.type === "error") {
2571
- return /* @__PURE__ */ jsx58("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx58(ErrorResult, { state }) });
2318
+ return /* @__PURE__ */ jsx52("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ jsx52(ErrorResult, { state }) });
2572
2319
  }
2573
2320
  if (state.type === "pending" || isLoading) {
2574
- return /* @__PURE__ */ jsx58("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
2321
+ return /* @__PURE__ */ jsx52("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
2575
2322
  }
2576
2323
  return null;
2577
2324
  }
2578
2325
  var InlineSearchRendererComponent_default = InlineSearchRenderer;
2579
2326
 
2580
2327
  // ../renderers/src/SearchRenderer/SearchRenderer.tsx
2581
- import { jsx as jsx59 } from "react/jsx-runtime";
2328
+ import { jsx as jsx53 } from "react/jsx-runtime";
2582
2329
  var SearchRenderer = {
2583
2330
  canRenderType: "search",
2584
- render: (props) => props.control === "inline" ? /* @__PURE__ */ jsx59(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ jsx59(BlockSearchRendererComponent_default, __spreadValues({}, props))
2331
+ render: (props) => props.control === "inline" ? /* @__PURE__ */ jsx53(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ jsx53(BlockSearchRendererComponent_default, __spreadValues({}, props))
2585
2332
  };
2586
2333
  var SearchRenderer_default = SearchRenderer;
2587
2334
 
2588
2335
  // ../renderers/src/SectionRenderer.tsx
2589
- import { Header as Header8 } from "@transferwise/components";
2336
+ import { Header as Header4 } from "@transferwise/components";
2590
2337
 
2591
2338
  // ../renderers/src/utils/getHeaderAction.tsx
2592
- var getHeaderAction2 = (callToAction) => {
2339
+ var getHeaderAction = (callToAction) => {
2593
2340
  if (!callToAction) {
2594
2341
  return void 0;
2595
2342
  }
@@ -2610,12 +2357,12 @@ var getHeaderAction2 = (callToAction) => {
2610
2357
  };
2611
2358
 
2612
2359
  // ../renderers/src/SectionRenderer.tsx
2613
- import { jsx as jsx60, jsxs as jsxs17 } from "react/jsx-runtime";
2360
+ import { jsx as jsx54, jsxs as jsxs13 } from "react/jsx-runtime";
2614
2361
  var SectionRenderer = {
2615
2362
  canRenderType: "section",
2616
2363
  render: ({ children, callToAction, margin, title }) => {
2617
- return /* @__PURE__ */ jsxs17("section", { className: getMargin(margin), children: [
2618
- (title || callToAction) && /* @__PURE__ */ jsx60(Header8, { title: title != null ? title : "", action: getHeaderAction2(callToAction) }),
2364
+ return /* @__PURE__ */ jsxs13("section", { className: getMargin(margin), children: [
2365
+ (title || callToAction) && /* @__PURE__ */ jsx54(Header4, { title: title != null ? title : "", action: getHeaderAction(callToAction) }),
2619
2366
  children
2620
2367
  ] });
2621
2368
  }
@@ -2624,7 +2371,7 @@ var SectionRenderer_default = SectionRenderer;
2624
2371
 
2625
2372
  // ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
2626
2373
  import { RadioGroup } from "@transferwise/components";
2627
- import { Fragment as Fragment6, jsx as jsx61, jsxs as jsxs18 } from "react/jsx-runtime";
2374
+ import { Fragment as Fragment3, jsx as jsx55, jsxs as jsxs14 } from "react/jsx-runtime";
2628
2375
  function RadioInputRendererComponent(props) {
2629
2376
  const {
2630
2377
  id,
@@ -2638,8 +2385,8 @@ function RadioInputRendererComponent(props) {
2638
2385
  validationState,
2639
2386
  onSelect
2640
2387
  } = props;
2641
- return /* @__PURE__ */ jsxs18(Fragment6, { children: [
2642
- /* @__PURE__ */ jsx61(
2388
+ return /* @__PURE__ */ jsxs14(Fragment3, { children: [
2389
+ /* @__PURE__ */ jsx55(
2643
2390
  FieldInput_default,
2644
2391
  {
2645
2392
  id,
@@ -2647,7 +2394,7 @@ function RadioInputRendererComponent(props) {
2647
2394
  help,
2648
2395
  description,
2649
2396
  validation: validationState,
2650
- children: /* @__PURE__ */ jsx61("span", { children: /* @__PURE__ */ jsx61(
2397
+ children: /* @__PURE__ */ jsx55("span", { children: /* @__PURE__ */ jsx55(
2651
2398
  RadioGroup,
2652
2399
  {
2653
2400
  name: id,
@@ -2656,7 +2403,7 @@ function RadioInputRendererComponent(props) {
2656
2403
  value: index,
2657
2404
  secondary: option.description,
2658
2405
  disabled: option.disabled || disabled,
2659
- avatar: /* @__PURE__ */ jsx61(OptionMedia, { media: option.media, preferAvatar: false })
2406
+ avatar: /* @__PURE__ */ jsx55(OptionMedia, { media: option.media, preferAvatar: false })
2660
2407
  })),
2661
2408
  selectedValue: selectedIndex != null ? selectedIndex : void 0,
2662
2409
  onChange: onSelect
@@ -2672,7 +2419,7 @@ function RadioInputRendererComponent(props) {
2672
2419
  // ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
2673
2420
  import { Tabs } from "@transferwise/components";
2674
2421
  import { useEffect as useEffect6 } from "react";
2675
- import { Fragment as Fragment7, jsx as jsx62, jsxs as jsxs19 } from "react/jsx-runtime";
2422
+ import { Fragment as Fragment4, jsx as jsx56, jsxs as jsxs15 } from "react/jsx-runtime";
2676
2423
  function TabInputRendererComponent(props) {
2677
2424
  const {
2678
2425
  id,
@@ -2691,8 +2438,8 @@ function TabInputRendererComponent(props) {
2691
2438
  onSelect(0);
2692
2439
  }
2693
2440
  }, [selectedIndex, onSelect, options.length]);
2694
- return /* @__PURE__ */ jsxs19(Fragment7, { children: [
2695
- /* @__PURE__ */ jsx62(
2441
+ return /* @__PURE__ */ jsxs15(Fragment4, { children: [
2442
+ /* @__PURE__ */ jsx56(
2696
2443
  FieldInput_default,
2697
2444
  {
2698
2445
  id,
@@ -2700,7 +2447,7 @@ function TabInputRendererComponent(props) {
2700
2447
  help,
2701
2448
  description,
2702
2449
  validation: validationState,
2703
- children: /* @__PURE__ */ jsx62(
2450
+ children: /* @__PURE__ */ jsx56(
2704
2451
  Tabs,
2705
2452
  {
2706
2453
  name: id,
@@ -2709,7 +2456,7 @@ function TabInputRendererComponent(props) {
2709
2456
  title: option.title,
2710
2457
  // if we pass null, we get some props-types console errors
2711
2458
  // eslint-disable-next-line react/jsx-no-useless-fragment
2712
- content: /* @__PURE__ */ jsx62(Fragment7, {}),
2459
+ content: /* @__PURE__ */ jsx56(Fragment4, {}),
2713
2460
  disabled: option.disabled || disabled
2714
2461
  })),
2715
2462
  onTabSelect: onSelect
@@ -2724,7 +2471,7 @@ var isValidIndex2 = (index, options) => index !== null && index >= 0 && index <
2724
2471
 
2725
2472
  // ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
2726
2473
  import { SelectInput as SelectInput2, SelectInputOptionContent as SelectInputOptionContent2 } from "@transferwise/components";
2727
- import { Fragment as Fragment8, jsx as jsx63, jsxs as jsxs20 } from "react/jsx-runtime";
2474
+ import { Fragment as Fragment5, jsx as jsx57, jsxs as jsxs16 } from "react/jsx-runtime";
2728
2475
  function SelectInputRendererComponent(props) {
2729
2476
  const {
2730
2477
  id,
@@ -2764,13 +2511,13 @@ function SelectInputRendererComponent(props) {
2764
2511
  } : {
2765
2512
  title: option.title,
2766
2513
  description: option.description,
2767
- icon: /* @__PURE__ */ jsx63(OptionMedia, { media: option.media, preferAvatar: false })
2514
+ icon: /* @__PURE__ */ jsx57(OptionMedia, { media: option.media, preferAvatar: false })
2768
2515
  };
2769
- return /* @__PURE__ */ jsx63(SelectInputOptionContent2, __spreadValues({}, contentProps));
2516
+ return /* @__PURE__ */ jsx57(SelectInputOptionContent2, __spreadValues({}, contentProps));
2770
2517
  };
2771
2518
  const extraProps = { autoComplete };
2772
- return /* @__PURE__ */ jsxs20(Fragment8, { children: [
2773
- /* @__PURE__ */ jsx63(
2519
+ return /* @__PURE__ */ jsxs16(Fragment5, { children: [
2520
+ /* @__PURE__ */ jsx57(
2774
2521
  FieldInput_default,
2775
2522
  {
2776
2523
  id,
@@ -2778,7 +2525,7 @@ function SelectInputRendererComponent(props) {
2778
2525
  help,
2779
2526
  description,
2780
2527
  validation: validationState,
2781
- children: /* @__PURE__ */ jsx63(
2528
+ children: /* @__PURE__ */ jsx57(
2782
2529
  SelectInput2,
2783
2530
  __spreadValues({
2784
2531
  name: id,
@@ -2801,7 +2548,7 @@ function SelectInputRendererComponent(props) {
2801
2548
  // ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
2802
2549
  import { useEffect as useEffect7 } from "react";
2803
2550
  import { SegmentedControl } from "@transferwise/components";
2804
- import { Fragment as Fragment9, jsx as jsx64, jsxs as jsxs21 } from "react/jsx-runtime";
2551
+ import { Fragment as Fragment6, jsx as jsx58, jsxs as jsxs17 } from "react/jsx-runtime";
2805
2552
  function SegmentedInputRendererComponent(props) {
2806
2553
  const {
2807
2554
  id,
@@ -2819,8 +2566,8 @@ function SegmentedInputRendererComponent(props) {
2819
2566
  onSelect(0);
2820
2567
  }
2821
2568
  }, [selectedIndex, onSelect, options.length]);
2822
- return /* @__PURE__ */ jsxs21(Fragment9, { children: [
2823
- /* @__PURE__ */ jsx64(
2569
+ return /* @__PURE__ */ jsxs17(Fragment6, { children: [
2570
+ /* @__PURE__ */ jsx58(
2824
2571
  FieldInput_default,
2825
2572
  {
2826
2573
  id,
@@ -2828,7 +2575,7 @@ function SegmentedInputRendererComponent(props) {
2828
2575
  help,
2829
2576
  description,
2830
2577
  validation: validationState,
2831
- children: /* @__PURE__ */ jsx64(
2578
+ children: /* @__PURE__ */ jsx58(
2832
2579
  SegmentedControl,
2833
2580
  {
2834
2581
  name: `${id}-segmented-control`,
@@ -2845,14 +2592,14 @@ function SegmentedInputRendererComponent(props) {
2845
2592
  )
2846
2593
  }
2847
2594
  ),
2848
- /* @__PURE__ */ jsx64("div", { id: `${id}-children`, children })
2595
+ /* @__PURE__ */ jsx58("div", { id: `${id}-children`, children })
2849
2596
  ] });
2850
2597
  }
2851
2598
  var isValidIndex3 = (index, options) => index !== null && index >= 0 && index < options;
2852
2599
 
2853
2600
  // ../renderers/src/SelectInputRenderer/RadioItemRendererComponent.tsx
2854
- import { Header as Header9, InlineAlert as InlineAlert4, List, ListItem as ListItem4 } from "@transferwise/components";
2855
- import { Fragment as Fragment10, jsx as jsx65, jsxs as jsxs22 } from "react/jsx-runtime";
2601
+ import { Header as Header5, InlineAlert as InlineAlert4, List, ListItem as ListItem4 } from "@transferwise/components";
2602
+ import { Fragment as Fragment7, jsx as jsx59, jsxs as jsxs18 } from "react/jsx-runtime";
2856
2603
  function RadioItemRendererComponent(props) {
2857
2604
  const {
2858
2605
  id,
@@ -2866,22 +2613,22 @@ function RadioItemRendererComponent(props) {
2866
2613
  validationState,
2867
2614
  onSelect
2868
2615
  } = props;
2869
- return /* @__PURE__ */ jsxs22(Fragment10, { children: [
2870
- rootTitle && /* @__PURE__ */ jsx65(
2871
- Header9,
2616
+ return /* @__PURE__ */ jsxs18(Fragment7, { children: [
2617
+ rootTitle && /* @__PURE__ */ jsx59(
2618
+ Header5,
2872
2619
  {
2873
2620
  as: "h2",
2874
- title: help ? /* @__PURE__ */ jsx65(LabelContentWithHelp, { text: rootTitle, help }) : rootTitle
2621
+ title: help ? /* @__PURE__ */ jsx59(LabelContentWithHelp, { text: rootTitle, help }) : rootTitle
2875
2622
  }
2876
2623
  ),
2877
- rootDescription && /* @__PURE__ */ jsx65("p", { children: rootDescription }),
2878
- /* @__PURE__ */ jsx65(List, { children: options.map(
2879
- ({ title, description, additionalText, inlineAlert, disabled, media, supportingValues }, index) => /* @__PURE__ */ jsx65(
2624
+ rootDescription && /* @__PURE__ */ jsx59("p", { children: rootDescription }),
2625
+ /* @__PURE__ */ jsx59(List, { children: options.map(
2626
+ ({ title, description, additionalText, inlineAlert, disabled, media, supportingValues }, index) => /* @__PURE__ */ jsx59(
2880
2627
  ListItem4,
2881
2628
  __spreadValues({
2882
2629
  title,
2883
2630
  subtitle: description,
2884
- control: /* @__PURE__ */ jsx65(
2631
+ control: /* @__PURE__ */ jsx59(
2885
2632
  ListItem4.Radio,
2886
2633
  {
2887
2634
  name: title,
@@ -2897,80 +2644,33 @@ function RadioItemRendererComponent(props) {
2897
2644
  title
2898
2645
  )
2899
2646
  ) }, `${id}-${selectedIndex}`),
2900
- (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ jsx65(InlineAlert4, { type: "negative", children: validationState.message }),
2647
+ (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ jsx59(InlineAlert4, { type: "negative", children: validationState.message }),
2901
2648
  children
2902
2649
  ] });
2903
2650
  }
2904
2651
 
2905
2652
  // ../renderers/src/SelectInputRenderer/SelectInputRenderer.tsx
2906
- import { jsx as jsx66 } from "react/jsx-runtime";
2653
+ import { jsx as jsx60 } from "react/jsx-runtime";
2907
2654
  var SelectInputRenderer = {
2908
2655
  canRenderType: "input-select",
2909
2656
  render: (props) => {
2910
2657
  switch (props.control) {
2911
2658
  case "radio":
2912
- return /* @__PURE__ */ jsx66(RadioInputRendererComponent, __spreadValues({}, props));
2659
+ return /* @__PURE__ */ jsx60(RadioInputRendererComponent, __spreadValues({}, props));
2913
2660
  case "radio-item":
2914
- return /* @__PURE__ */ jsx66(RadioItemRendererComponent, __spreadValues({}, props));
2661
+ return /* @__PURE__ */ jsx60(RadioItemRendererComponent, __spreadValues({}, props));
2915
2662
  case "tab":
2916
- return props.options.length > 3 ? /* @__PURE__ */ jsx66(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx66(TabInputRendererComponent, __spreadValues({}, props));
2663
+ return props.options.length > 3 ? /* @__PURE__ */ jsx60(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx60(TabInputRendererComponent, __spreadValues({}, props));
2917
2664
  case "segmented":
2918
- return props.options.length > 3 ? /* @__PURE__ */ jsx66(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx66(SegmentedInputRendererComponent, __spreadValues({}, props));
2665
+ return props.options.length > 3 ? /* @__PURE__ */ jsx60(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ jsx60(SegmentedInputRendererComponent, __spreadValues({}, props));
2919
2666
  case "select":
2920
2667
  default:
2921
- return /* @__PURE__ */ jsx66(SelectInputRendererComponent, __spreadValues({}, props));
2668
+ return /* @__PURE__ */ jsx60(SelectInputRendererComponent, __spreadValues({}, props));
2922
2669
  }
2923
2670
  }
2924
2671
  };
2925
2672
  var SelectInputRenderer_default = SelectInputRenderer;
2926
2673
 
2927
- // ../renderers/src/StatusListRenderer.tsx
2928
- import { Header as Header10, Summary } from "@transferwise/components";
2929
- import { jsx as jsx67, jsxs as jsxs23 } from "react/jsx-runtime";
2930
- var StatusListRenderer = {
2931
- canRenderType: "status-list",
2932
- render: ({ margin, items, title }) => /* @__PURE__ */ jsxs23("div", { className: getMargin(margin), children: [
2933
- title ? /* @__PURE__ */ jsx67(Header10, { title, className: "m-b-2" }) : null,
2934
- items.map(({ callToAction, description, icon, status, title: itemTitle }) => /* @__PURE__ */ jsx67(
2935
- Summary,
2936
- {
2937
- title: itemTitle,
2938
- description,
2939
- icon: icon && "name" in icon ? /* @__PURE__ */ jsx67(DynamicIcon_default, { name: icon.name }) : null,
2940
- status: mapStatus(status),
2941
- action: getSummaryAction(callToAction)
2942
- },
2943
- `${itemTitle}/${description || ""}`
2944
- ))
2945
- ] })
2946
- };
2947
- var StatusListRenderer_default = StatusListRenderer;
2948
- var getSummaryAction = (callToAction) => {
2949
- if (!callToAction) {
2950
- return void 0;
2951
- }
2952
- const { accessibilityDescription, href, title, onClick } = callToAction;
2953
- if (!href) {
2954
- return {
2955
- "aria-label": accessibilityDescription,
2956
- text: title,
2957
- onClick
2958
- };
2959
- }
2960
- return {
2961
- "aria-label": accessibilityDescription,
2962
- href,
2963
- target: "_blank",
2964
- text: title
2965
- };
2966
- };
2967
- var mapStatus = (status) => {
2968
- if (status === "not-done") {
2969
- return "notDone";
2970
- }
2971
- return status;
2972
- };
2973
-
2974
2674
  // ../renderers/src/utils/useCustomTheme.ts
2975
2675
  import { useTheme } from "@wise/components-theming";
2976
2676
  import { useEffect as useEffect8, useMemo } from "react";
@@ -2990,11 +2690,11 @@ var useCustomTheme = (theme, trackEvent) => {
2990
2690
  // ../renderers/src/step/topbar/BackButton.tsx
2991
2691
  import { IconButton } from "@transferwise/components";
2992
2692
  import { ArrowLeft } from "@transferwise/icons";
2993
- import { useIntl as useIntl13 } from "react-intl";
2693
+ import { useIntl as useIntl11 } from "react-intl";
2994
2694
 
2995
2695
  // ../renderers/src/messages/back.messages.ts
2996
- import { defineMessages as defineMessages11 } from "react-intl";
2997
- var back_messages_default = defineMessages11({
2696
+ import { defineMessages as defineMessages10 } from "react-intl";
2697
+ var back_messages_default = defineMessages10({
2998
2698
  back: {
2999
2699
  id: "df.wise.back.label",
3000
2700
  defaultMessage: "Back",
@@ -3003,30 +2703,30 @@ var back_messages_default = defineMessages11({
3003
2703
  });
3004
2704
 
3005
2705
  // ../renderers/src/step/topbar/BackButton.tsx
3006
- import { jsx as jsx68, jsxs as jsxs24 } from "react/jsx-runtime";
2706
+ import { jsx as jsx61, jsxs as jsxs19 } from "react/jsx-runtime";
3007
2707
  function BackButton({ title, onClick }) {
3008
- const { formatMessage } = useIntl13();
3009
- return /* @__PURE__ */ jsxs24(IconButton, { className: "df-back-button", priority: "tertiary", onClick, children: [
3010
- /* @__PURE__ */ jsx68("span", { className: "sr-only", children: title != null ? title : formatMessage(back_messages_default.back) }),
3011
- /* @__PURE__ */ jsx68(ArrowLeft, {})
2708
+ const { formatMessage } = useIntl11();
2709
+ return /* @__PURE__ */ jsxs19(IconButton, { className: "df-back-button", priority: "tertiary", onClick, children: [
2710
+ /* @__PURE__ */ jsx61("span", { className: "sr-only", children: title != null ? title : formatMessage(back_messages_default.back) }),
2711
+ /* @__PURE__ */ jsx61(ArrowLeft, {})
3012
2712
  ] });
3013
2713
  }
3014
2714
 
3015
2715
  // ../renderers/src/step/topbar/Toolbar.tsx
3016
2716
  import { Button as Button7, IconButton as IconButton2 } from "@transferwise/components";
3017
- import { jsx as jsx69, jsxs as jsxs25 } from "react/jsx-runtime";
2717
+ import { jsx as jsx62, jsxs as jsxs20 } from "react/jsx-runtime";
3018
2718
  var Toolbar = ({ items }) => {
3019
- return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ jsx69("div", { className: "df-toolbar", children: items.map((item, index) => /* @__PURE__ */ jsx69(ToolbarButton, __spreadValues({}, item), `${item.type}-${index}-${item.title}`)) }) : null;
2719
+ return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ jsx62("div", { className: "df-toolbar", children: items.map((item, index) => /* @__PURE__ */ jsx62(ToolbarButton, __spreadValues({}, item), `${item.type}-${index}-${item.title}`)) }) : null;
3020
2720
  };
3021
2721
  function ToolbarButton(props) {
3022
- return prefersMedia(props.control) ? /* @__PURE__ */ jsx69(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ jsx69(TextToolbarButton, __spreadValues({}, props));
2722
+ return prefersMedia(props.control) ? /* @__PURE__ */ jsx62(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ jsx62(TextToolbarButton, __spreadValues({}, props));
3023
2723
  }
3024
2724
  function MediaToolbarButton(props) {
3025
2725
  var _a;
3026
2726
  const { context, control, media, accessibilityDescription, disabled, onClick } = props;
3027
2727
  const priority = getIconButtonPriority(control);
3028
- const type = getSentiment(context);
3029
- return /* @__PURE__ */ jsxs25(
2728
+ const type = getSentiment2(context);
2729
+ return /* @__PURE__ */ jsxs20(
3030
2730
  IconButton2,
3031
2731
  {
3032
2732
  className: "df-toolbar-button",
@@ -3036,7 +2736,7 @@ function MediaToolbarButton(props) {
3036
2736
  type,
3037
2737
  onClick,
3038
2738
  children: [
3039
- accessibilityDescription ? /* @__PURE__ */ jsx69("span", { className: "sr-only", children: accessibilityDescription }) : null,
2739
+ accessibilityDescription ? /* @__PURE__ */ jsx62("span", { className: "sr-only", children: accessibilityDescription }) : null,
3040
2740
  media ? (_a = getAddonStart(media)) == null ? void 0 : _a.value : null
3041
2741
  ]
3042
2742
  }
@@ -3046,8 +2746,8 @@ function TextToolbarButton(props) {
3046
2746
  const { context, control, title, media, disabled, onClick } = props;
3047
2747
  const addonStart = media ? getAddonStart(media) : void 0;
3048
2748
  const priority = getPriority2(control);
3049
- const sentiment = getSentiment(context);
3050
- return /* @__PURE__ */ jsx69(
2749
+ const sentiment = getSentiment2(context);
2750
+ return /* @__PURE__ */ jsx62(
3051
2751
  Button7,
3052
2752
  {
3053
2753
  v2: true,
@@ -3083,7 +2783,7 @@ var prefersMedia = (control) => {
3083
2783
  };
3084
2784
  var knownControls = ["primary", "secondary", "secondary-neutral"];
3085
2785
  var isKnownControl = (control) => control !== void 0 && knownControls.includes(control);
3086
- var getSentiment = (context) => {
2786
+ var getSentiment2 = (context) => {
3087
2787
  return "default";
3088
2788
  };
3089
2789
  var getIconButtonPriority = (control) => {
@@ -3092,16 +2792,16 @@ var getIconButtonPriority = (control) => {
3092
2792
  };
3093
2793
 
3094
2794
  // ../renderers/src/step/topbar/TopBar.tsx
3095
- import { jsx as jsx70, jsxs as jsxs26 } from "react/jsx-runtime";
2795
+ import { jsx as jsx63, jsxs as jsxs21 } from "react/jsx-runtime";
3096
2796
  function TopBar({ back, toolbar }) {
3097
- return back || toolbar ? /* @__PURE__ */ jsxs26("div", { className: "d-flex m-b-2", children: [
3098
- back ? /* @__PURE__ */ jsx70(BackButton, __spreadValues({}, back)) : null,
3099
- toolbar ? /* @__PURE__ */ jsx70(Toolbar, __spreadValues({}, toolbar)) : null
2797
+ return back || toolbar ? /* @__PURE__ */ jsxs21("div", { className: "d-flex m-b-2", children: [
2798
+ back ? /* @__PURE__ */ jsx63(BackButton, __spreadValues({}, back)) : null,
2799
+ toolbar ? /* @__PURE__ */ jsx63(Toolbar, __spreadValues({}, toolbar)) : null
3100
2800
  ] }) : null;
3101
2801
  }
3102
2802
 
3103
2803
  // ../renderers/src/step/SplashCelebrationStepRenderer.tsx
3104
- import { jsx as jsx71, jsxs as jsxs27 } from "react/jsx-runtime";
2804
+ import { jsx as jsx64, jsxs as jsxs22 } from "react/jsx-runtime";
3105
2805
  var SplashCelebrationStepRenderer = {
3106
2806
  canRenderType: "step",
3107
2807
  canRender: ({ control }) => control === "splash-celebration",
@@ -3111,15 +2811,15 @@ function SplashCelebrationStepRendererComponent(props) {
3111
2811
  const { back, toolbar, children, footer, trackEvent } = props;
3112
2812
  const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
3113
2813
  useCustomTheme("forest-green", trackEvent);
3114
- return /* @__PURE__ */ jsxs27("div", { className: "splash-screen m-t-5", children: [
3115
- /* @__PURE__ */ jsx71(TopBar, { back, toolbar }),
2814
+ return /* @__PURE__ */ jsxs22("div", { className: "splash-screen m-t-5", children: [
2815
+ /* @__PURE__ */ jsx64(TopBar, { back, toolbar }),
3116
2816
  children,
3117
- hasFooter ? /* @__PURE__ */ jsx71("div", { className: "df-step-fixed__footer", children: footer }) : void 0
2817
+ hasFooter ? /* @__PURE__ */ jsx64("div", { className: "df-step-fixed__footer", children: footer }) : void 0
3118
2818
  ] });
3119
2819
  }
3120
2820
 
3121
2821
  // ../renderers/src/step/SplashStepRenderer.tsx
3122
- import { jsx as jsx72, jsxs as jsxs28 } from "react/jsx-runtime";
2822
+ import { jsx as jsx65, jsxs as jsxs23 } from "react/jsx-runtime";
3123
2823
  var SplashStepRenderer = {
3124
2824
  canRenderType: "step",
3125
2825
  canRender: ({ control }) => control === "splash",
@@ -3128,16 +2828,16 @@ var SplashStepRenderer = {
3128
2828
  function SplashStepRendererComponent(props) {
3129
2829
  const { back, toolbar, children, footer } = props;
3130
2830
  const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
3131
- return /* @__PURE__ */ jsxs28("div", { className: "splash-screen m-t-5", children: [
3132
- /* @__PURE__ */ jsx72(TopBar, { back, toolbar }),
2831
+ return /* @__PURE__ */ jsxs23("div", { className: "splash-screen m-t-5", children: [
2832
+ /* @__PURE__ */ jsx65(TopBar, { back, toolbar }),
3133
2833
  children,
3134
- hasFooter ? /* @__PURE__ */ jsx72("div", { className: "df-step-fixed__footer", children: footer }) : void 0
2834
+ hasFooter ? /* @__PURE__ */ jsx65("div", { className: "df-step-fixed__footer", children: footer }) : void 0
3135
2835
  ] });
3136
2836
  }
3137
2837
 
3138
2838
  // ../renderers/src/step/StepRenderer.tsx
3139
2839
  import { Alert as Alert2, Title as Title2 } from "@transferwise/components";
3140
- import { Fragment as Fragment11, jsx as jsx73, jsxs as jsxs29 } from "react/jsx-runtime";
2840
+ import { Fragment as Fragment8, jsx as jsx66, jsxs as jsxs24 } from "react/jsx-runtime";
3141
2841
  var StepRenderer = {
3142
2842
  canRenderType: "step",
3143
2843
  render: StepRendererComponent
@@ -3145,19 +2845,19 @@ var StepRenderer = {
3145
2845
  function StepRendererComponent(props) {
3146
2846
  const { back, description, error, title, children, toolbar, footer, tags } = props;
3147
2847
  const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
3148
- return /* @__PURE__ */ jsxs29("div", { children: [
3149
- /* @__PURE__ */ jsx73(TopBar, { back, toolbar }),
3150
- title || description ? /* @__PURE__ */ jsx73("div", { className: "m-b-4", children: /* @__PURE__ */ jsx73(Header11, { title, description, tags }) }) : void 0,
3151
- error ? /* @__PURE__ */ jsx73(Alert2, { type: "negative", className: "m-b-2", message: error }) : null,
2848
+ return /* @__PURE__ */ jsxs24("div", { children: [
2849
+ /* @__PURE__ */ jsx66(TopBar, { back, toolbar }),
2850
+ title || description ? /* @__PURE__ */ jsx66("div", { className: "m-b-4", children: /* @__PURE__ */ jsx66(Header6, { title, description, tags }) }) : void 0,
2851
+ error ? /* @__PURE__ */ jsx66(Alert2, { type: "negative", className: "m-b-2", message: error }) : null,
3152
2852
  children,
3153
- hasFooter ? /* @__PURE__ */ jsx73("div", { className: "df-step-fixed__footer", children: footer }) : void 0
2853
+ hasFooter ? /* @__PURE__ */ jsx66("div", { className: "df-step-fixed__footer", children: footer }) : void 0
3154
2854
  ] });
3155
2855
  }
3156
- var Header11 = ({ title, description, tags }) => {
2856
+ var Header6 = ({ title, description, tags }) => {
3157
2857
  const { titleType, alignmentClassName } = getHeaderStyle(tags);
3158
- return /* @__PURE__ */ jsxs29(Fragment11, { children: [
3159
- title ? /* @__PURE__ */ jsx73(Title2, { as: "h1", type: titleType, className: `${alignmentClassName} m-b-2`, children: title }) : void 0,
3160
- description ? /* @__PURE__ */ jsx73("p", { className: `${alignmentClassName} np-text-body-large`, children: description }) : void 0
2858
+ return /* @__PURE__ */ jsxs24(Fragment8, { children: [
2859
+ title ? /* @__PURE__ */ jsx66(Title2, { as: "h1", type: titleType, className: `${alignmentClassName} m-b-2`, children: title }) : void 0,
2860
+ description ? /* @__PURE__ */ jsx66("p", { className: `${alignmentClassName} np-text-body-large`, children: description }) : void 0
3161
2861
  ] });
3162
2862
  };
3163
2863
  var getHeaderStyle = (tags) => {
@@ -3169,27 +2869,27 @@ var getHeaderStyle = (tags) => {
3169
2869
 
3170
2870
  // ../renderers/src/TabsRenderer.tsx
3171
2871
  import { Chips, SegmentedControl as SegmentedControl2, Tabs as Tabs2 } from "@transferwise/components";
3172
- import { useState as useState11 } from "react";
3173
- import { jsx as jsx74, jsxs as jsxs30 } from "react/jsx-runtime";
2872
+ import { useState as useState10 } from "react";
2873
+ import { jsx as jsx67, jsxs as jsxs25 } from "react/jsx-runtime";
3174
2874
  var TabsRenderer = {
3175
2875
  canRenderType: "tabs",
3176
2876
  render: (props) => {
3177
2877
  switch (props.control) {
3178
2878
  case "segmented":
3179
2879
  if (props.tabs.length > 3) {
3180
- return /* @__PURE__ */ jsx74(TabsRendererComponent, __spreadValues({}, props));
2880
+ return /* @__PURE__ */ jsx67(TabsRendererComponent, __spreadValues({}, props));
3181
2881
  }
3182
- return /* @__PURE__ */ jsx74(SegmentedTabsRendererComponent, __spreadValues({}, props));
2882
+ return /* @__PURE__ */ jsx67(SegmentedTabsRendererComponent, __spreadValues({}, props));
3183
2883
  case "chips":
3184
- return /* @__PURE__ */ jsx74(ChipsTabsRendererComponent, __spreadValues({}, props));
2884
+ return /* @__PURE__ */ jsx67(ChipsTabsRendererComponent, __spreadValues({}, props));
3185
2885
  default:
3186
- return /* @__PURE__ */ jsx74(TabsRendererComponent, __spreadValues({}, props));
2886
+ return /* @__PURE__ */ jsx67(TabsRendererComponent, __spreadValues({}, props));
3187
2887
  }
3188
2888
  }
3189
2889
  };
3190
2890
  function TabsRendererComponent({ uid, margin, tabs }) {
3191
- const [selectedIndex, setSelectedIndex] = useState11(0);
3192
- return /* @__PURE__ */ jsx74("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx74(
2891
+ const [selectedIndex, setSelectedIndex] = useState10(0);
2892
+ return /* @__PURE__ */ jsx67("div", { className: getMargin(margin), children: /* @__PURE__ */ jsx67(
3193
2893
  Tabs2,
3194
2894
  {
3195
2895
  name: uid,
@@ -3197,7 +2897,7 @@ function TabsRendererComponent({ uid, margin, tabs }) {
3197
2897
  tabs: tabs.map((option) => ({
3198
2898
  title: option.title,
3199
2899
  disabled: false,
3200
- content: /* @__PURE__ */ jsxs30("div", { className: "m-t-2", children: [
2900
+ content: /* @__PURE__ */ jsxs25("div", { className: "m-t-2", children: [
3201
2901
  " ",
3202
2902
  option.children,
3203
2903
  " "
@@ -3209,9 +2909,9 @@ function TabsRendererComponent({ uid, margin, tabs }) {
3209
2909
  }
3210
2910
  function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
3211
2911
  var _a;
3212
- const [selectedIndex, setSelectedIndex] = useState11(0);
3213
- return /* @__PURE__ */ jsxs30("div", { className: getMargin(margin), children: [
3214
- /* @__PURE__ */ jsx74(
2912
+ const [selectedIndex, setSelectedIndex] = useState10(0);
2913
+ return /* @__PURE__ */ jsxs25("div", { className: getMargin(margin), children: [
2914
+ /* @__PURE__ */ jsx67(
3215
2915
  SegmentedControl2,
3216
2916
  {
3217
2917
  name: uid,
@@ -3226,14 +2926,14 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
3226
2926
  onChange: (value) => setSelectedIndex(Number(value))
3227
2927
  }
3228
2928
  ),
3229
- /* @__PURE__ */ jsx74("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
2929
+ /* @__PURE__ */ jsx67("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
3230
2930
  ] });
3231
2931
  }
3232
2932
  function ChipsTabsRendererComponent({ margin, tabs }) {
3233
2933
  var _a;
3234
- const [selectedIndex, setSelectedIndex] = useState11(0);
3235
- return /* @__PURE__ */ jsxs30("div", { className: getMargin(margin), children: [
3236
- /* @__PURE__ */ jsx74("div", { className: "chips-container", children: /* @__PURE__ */ jsx74(
2934
+ const [selectedIndex, setSelectedIndex] = useState10(0);
2935
+ return /* @__PURE__ */ jsxs25("div", { className: getMargin(margin), children: [
2936
+ /* @__PURE__ */ jsx67("div", { className: "chips-container", children: /* @__PURE__ */ jsx67(
3237
2937
  Chips,
3238
2938
  {
3239
2939
  chips: tabs.map((tab, index) => ({ label: tab.title, value: index })),
@@ -3241,7 +2941,7 @@ function ChipsTabsRendererComponent({ margin, tabs }) {
3241
2941
  onChange: ({ selectedValue }) => setSelectedIndex(Number(selectedValue))
3242
2942
  }
3243
2943
  ) }),
3244
- /* @__PURE__ */ jsx74("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
2944
+ /* @__PURE__ */ jsx67("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
3245
2945
  ] });
3246
2946
  }
3247
2947
 
@@ -3256,7 +2956,7 @@ import {
3256
2956
  TextArea,
3257
2957
  TextareaWithDisplayFormat
3258
2958
  } from "@transferwise/components";
3259
- import { jsx as jsx75 } from "react/jsx-runtime";
2959
+ import { jsx as jsx68 } from "react/jsx-runtime";
3260
2960
  var commonKeys = [
3261
2961
  "autoComplete",
3262
2962
  "autoCapitalize",
@@ -3275,12 +2975,12 @@ function VariableTextInput(inputProps) {
3275
2975
  const commonProps = __spreadProps(__spreadValues({}, pick(inputProps, ...commonKeys)), { name: id });
3276
2976
  switch (control) {
3277
2977
  case "email":
3278
- return /* @__PURE__ */ jsx75(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
2978
+ return /* @__PURE__ */ jsx68(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
3279
2979
  case "password":
3280
- return /* @__PURE__ */ jsx75(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
2980
+ return /* @__PURE__ */ jsx68(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
3281
2981
  case "numeric": {
3282
2982
  const numericProps = __spreadProps(__spreadValues({}, commonProps), { type: "number", onWheel });
3283
- return /* @__PURE__ */ jsx75(
2983
+ return /* @__PURE__ */ jsx68(
3284
2984
  TextInput,
3285
2985
  __spreadProps(__spreadValues({}, numericProps), {
3286
2986
  onChange: (newValue) => {
@@ -3291,9 +2991,9 @@ function VariableTextInput(inputProps) {
3291
2991
  );
3292
2992
  }
3293
2993
  case "phone-number":
3294
- return /* @__PURE__ */ jsx75(PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
2994
+ return /* @__PURE__ */ jsx68(PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
3295
2995
  default: {
3296
- return /* @__PURE__ */ jsx75(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
2996
+ return /* @__PURE__ */ jsx68(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
3297
2997
  }
3298
2998
  }
3299
2999
  }
@@ -3301,11 +3001,11 @@ function TextInput(props) {
3301
3001
  const _a = props, { control, displayFormat, onChange } = _a, commonProps = __objRest(_a, ["control", "displayFormat", "onChange"]);
3302
3002
  const InputWithPattern = control === "textarea" ? TextareaWithDisplayFormat : InputWithDisplayFormat;
3303
3003
  const InputWithoutPattern = control === "textarea" ? TextArea : Input5;
3304
- return displayFormat ? /* @__PURE__ */ jsx75(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ jsx75(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { onChange: (e) => onChange(e.target.value) }));
3004
+ return displayFormat ? /* @__PURE__ */ jsx68(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ jsx68(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { onChange: (e) => onChange(e.target.value) }));
3305
3005
  }
3306
3006
 
3307
3007
  // ../renderers/src/TextInputRenderer.tsx
3308
- import { jsx as jsx76 } from "react/jsx-runtime";
3008
+ import { jsx as jsx69 } from "react/jsx-runtime";
3309
3009
  var TextInputRenderer = {
3310
3010
  canRenderType: "input-text",
3311
3011
  render: (props) => {
@@ -3338,7 +3038,7 @@ var TextInputRenderer = {
3338
3038
  }
3339
3039
  }
3340
3040
  });
3341
- return /* @__PURE__ */ jsx76(
3041
+ return /* @__PURE__ */ jsx69(
3342
3042
  FieldInput_default,
3343
3043
  {
3344
3044
  id,
@@ -3346,7 +3046,7 @@ var TextInputRenderer = {
3346
3046
  description,
3347
3047
  validation: validationState,
3348
3048
  help,
3349
- children: /* @__PURE__ */ jsx76(InputGroup3, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx76(VariableTextInput, __spreadValues({}, inputProps)) })
3049
+ children: /* @__PURE__ */ jsx69(InputGroup3, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ jsx69(VariableTextInput, __spreadValues({}, inputProps)) })
3350
3050
  }
3351
3051
  );
3352
3052
  }
@@ -3360,7 +3060,7 @@ import { Status as Status2, Upload, UploadInput as UploadInput2 } from "@transfe
3360
3060
  var getRandomId = () => Math.random().toString(36).substring(2);
3361
3061
 
3362
3062
  // ../renderers/src/UploadInputRenderer.tsx
3363
- import { jsx as jsx77 } from "react/jsx-runtime";
3063
+ import { jsx as jsx70 } from "react/jsx-runtime";
3364
3064
  var UploadInputRenderer = {
3365
3065
  canRenderType: "input-upload",
3366
3066
  render: (props) => {
@@ -3376,14 +3076,14 @@ var UploadInputRenderer = {
3376
3076
  };
3377
3077
  return (
3378
3078
  // We don't pass help here as there is no sensible place to display it
3379
- /* @__PURE__ */ jsx77(
3079
+ /* @__PURE__ */ jsx70(
3380
3080
  UploadFieldInput_default,
3381
3081
  {
3382
3082
  id,
3383
3083
  label: void 0,
3384
3084
  description: void 0,
3385
3085
  validation: validationState,
3386
- children: /* @__PURE__ */ jsx77(
3086
+ children: /* @__PURE__ */ jsx70(
3387
3087
  UploadInput2,
3388
3088
  {
3389
3089
  id,
@@ -3449,7 +3149,7 @@ var LargeUploadRenderer = {
3449
3149
  };
3450
3150
  const filetypes = acceptsToFileTypes(accepts);
3451
3151
  const usAccept = filetypes === "*" ? "*" : filetypes.join(",");
3452
- return /* @__PURE__ */ jsx77(
3152
+ return /* @__PURE__ */ jsx70(
3453
3153
  FieldInput_default,
3454
3154
  {
3455
3155
  id,
@@ -3457,7 +3157,7 @@ var LargeUploadRenderer = {
3457
3157
  description,
3458
3158
  validation: validationState,
3459
3159
  help,
3460
- children: /* @__PURE__ */ jsx77(
3160
+ children: /* @__PURE__ */ jsx70(
3461
3161
  Upload,
3462
3162
  __spreadProps(__spreadValues({}, uploadProps), {
3463
3163
  usAccept,
@@ -3472,84 +3172,85 @@ var LargeUploadRenderer = {
3472
3172
  }
3473
3173
  };
3474
3174
 
3475
- // ../renderers/src/NewListItem/NewDecisionRenderer.tsx
3476
- import { ListItem as ListItem6 } from "@transferwise/components";
3477
-
3478
- // ../renderers/src/NewListItem/getAdditionalInfo.tsx
3479
- import { ListItem as ListItem5 } from "@transferwise/components";
3480
- import { jsx as jsx78 } from "react/jsx-runtime";
3481
- var getAdditionalInfo = (additionalInfo) => {
3482
- if (!additionalInfo) {
3483
- return void 0;
3484
- }
3485
- const { href, text, onClick } = additionalInfo;
3486
- if (href || onClick) {
3487
- return /* @__PURE__ */ jsx78(
3488
- ListItem5.AdditionalInfo,
3489
- {
3490
- action: {
3491
- label: text,
3492
- href,
3493
- onClick,
3494
- target: "_blank"
3495
- }
3175
+ // ../renderers/src/ProgressRenderer.tsx
3176
+ import { ProgressBar } from "@transferwise/components";
3177
+ import { jsx as jsx71 } from "react/jsx-runtime";
3178
+ var ProgressRenderer = {
3179
+ canRenderType: "progress",
3180
+ render: ({ uid, title, help, progress, progressText, margin, description }) => {
3181
+ return /* @__PURE__ */ jsx71(
3182
+ ProgressBar,
3183
+ {
3184
+ id: uid,
3185
+ className: getMargin(margin),
3186
+ title: title && help ? /* @__PURE__ */ jsx71(LabelContentWithHelp, { text: title, help }) : title,
3187
+ description,
3188
+ progress: {
3189
+ max: 1,
3190
+ value: progress
3191
+ },
3192
+ textEnd: progressText
3496
3193
  }
3497
3194
  );
3498
3195
  }
3499
- return /* @__PURE__ */ jsx78(ListItem5.AdditionalInfo, { children: additionalInfo == null ? void 0 : additionalInfo.text });
3500
3196
  };
3501
3197
 
3502
- // ../renderers/src/NewListItem/shouldUseAvatar.ts
3503
- var shouldUseAvatar = (control, tags) => {
3504
- var _a;
3505
- return control === "with-avatar" || ((_a = tags == null ? void 0 : tags.includes("with-avatar")) != null ? _a : false);
3506
- };
3198
+ // ../renderers/src/ReviewRenderer.tsx
3199
+ import { ListItem as ListItem7, Markdown as Markdown6, Popover } from "@transferwise/components";
3200
+ import { QuestionMarkCircle } from "@transferwise/icons";
3201
+ import { useIntl as useIntl12 } from "react-intl";
3507
3202
 
3508
- // ../renderers/src/NewListItem/NewDecisionRenderer.tsx
3509
- import { Fragment as Fragment12, jsx as jsx79 } from "react/jsx-runtime";
3510
- var DecisionRenderer2 = {
3511
- canRenderType: "decision",
3512
- render: (props) => /* @__PURE__ */ jsx79(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList: renderDecisionList2 }))
3203
+ // ../renderers/src/components/Header.tsx
3204
+ import { Header as DSHeader } from "@transferwise/components";
3205
+ import { jsx as jsx72 } from "react/jsx-runtime";
3206
+ var Header7 = ({ title, callToAction }) => (title || callToAction) && /* @__PURE__ */ jsx72(DSHeader, { title: title != null ? title : "", action: getHeaderAction2(callToAction) });
3207
+ var getHeaderAction2 = (callToAction) => {
3208
+ if (!callToAction) {
3209
+ return void 0;
3210
+ }
3211
+ const { accessibilityDescription, href, title, onClick } = callToAction;
3212
+ return href ? {
3213
+ "aria-label": accessibilityDescription,
3214
+ text: title,
3215
+ href,
3216
+ target: "_blank"
3217
+ } : {
3218
+ "aria-label": accessibilityDescription,
3219
+ text: title,
3220
+ onClick: (event) => {
3221
+ event.preventDefault();
3222
+ onClick();
3223
+ }
3224
+ };
3513
3225
  };
3514
- var renderDecisionList2 = ({ options, control }) => {
3515
- return /* @__PURE__ */ jsx79(Fragment12, { children: options.map((_a) => {
3516
- var _b = _a, { disabled, onClick } = _b, rest = __objRest(_b, ["disabled", "onClick"]);
3517
- const {
3518
- description,
3519
- media,
3520
- title: itemTitle,
3521
- href,
3522
- additionalText,
3523
- inlineAlert,
3524
- supportingValues,
3525
- tags
3526
- } = rest;
3527
- return /* @__PURE__ */ jsx79(
3528
- ListItem6,
3226
+
3227
+ // ../renderers/src/utils/listItem/getAdditionalInfo.tsx
3228
+ import { ListItem as ListItem5 } from "@transferwise/components";
3229
+ import { jsx as jsx73 } from "react/jsx-runtime";
3230
+ var getAdditionalInfo = (additionalInfo) => {
3231
+ if (!additionalInfo) {
3232
+ return void 0;
3233
+ }
3234
+ const { href, text, onClick } = additionalInfo;
3235
+ if (href || onClick) {
3236
+ return /* @__PURE__ */ jsx73(
3237
+ ListItem5.AdditionalInfo,
3529
3238
  {
3530
- title: itemTitle,
3531
- subtitle: description,
3532
- spotlight: control === "spotlight" ? (tags == null ? void 0 : tags.includes("spotlight-active")) ? "active" : "inactive" : void 0,
3533
- disabled,
3534
- valueTitle: supportingValues == null ? void 0 : supportingValues.value,
3535
- valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
3536
- media: getMedia(media, shouldUseAvatar(control, tags)),
3537
- prompt: getInlineAlert(inlineAlert),
3538
- additionalInfo: additionalText ? getAdditionalInfo({ text: additionalText }) : void 0,
3539
- control: href ? /* @__PURE__ */ jsx79(ListItem6.Navigation, { href, target: "_blank" }) : /* @__PURE__ */ jsx79(ListItem6.Navigation, { onClick })
3540
- },
3541
- JSON.stringify(rest)
3239
+ action: {
3240
+ label: text,
3241
+ href,
3242
+ onClick,
3243
+ target: "_blank"
3244
+ }
3245
+ }
3542
3246
  );
3543
- }) });
3247
+ }
3248
+ return /* @__PURE__ */ jsx73(ListItem5.AdditionalInfo, { children: additionalInfo == null ? void 0 : additionalInfo.text });
3544
3249
  };
3545
- var NewDecisionRenderer_default = DecisionRenderer2;
3546
-
3547
- // ../renderers/src/NewListItem/NewListRenderer.tsx
3548
- import { ListItem as ListItem8 } from "@transferwise/components";
3549
3250
 
3550
- // ../renderers/src/NewListItem/getCTAControl.tsx
3551
- import { ListItem as ListItem7 } from "@transferwise/components";
3552
- import { jsx as jsx80 } from "react/jsx-runtime";
3251
+ // ../renderers/src/utils/listItem/getCTAControl.tsx
3252
+ import { ListItem as ListItem6 } from "@transferwise/components";
3253
+ import { jsx as jsx74 } from "react/jsx-runtime";
3553
3254
  var getCTAControl = (callToAction, { ctaSecondary, fullyInteractive }) => {
3554
3255
  if (!callToAction) {
3555
3256
  return void 0;
@@ -3557,8 +3258,8 @@ var getCTAControl = (callToAction, { ctaSecondary, fullyInteractive }) => {
3557
3258
  const { accessibilityDescription, href, title, onClick } = callToAction;
3558
3259
  const priority = ctaSecondary ? "secondary" : "secondary-neutral";
3559
3260
  if (href) {
3560
- return /* @__PURE__ */ jsx80(
3561
- ListItem7.Button,
3261
+ return /* @__PURE__ */ jsx74(
3262
+ ListItem6.Button,
3562
3263
  {
3563
3264
  href,
3564
3265
  partiallyInteractive: !fullyInteractive,
@@ -3568,8 +3269,8 @@ var getCTAControl = (callToAction, { ctaSecondary, fullyInteractive }) => {
3568
3269
  }
3569
3270
  );
3570
3271
  }
3571
- return /* @__PURE__ */ jsx80(
3572
- ListItem7.Button,
3272
+ return /* @__PURE__ */ jsx74(
3273
+ ListItem6.Button,
3573
3274
  {
3574
3275
  "aria-description": accessibilityDescription,
3575
3276
  partiallyInteractive: !fullyInteractive,
@@ -3580,62 +3281,37 @@ var getCTAControl = (callToAction, { ctaSecondary, fullyInteractive }) => {
3580
3281
  );
3581
3282
  };
3582
3283
 
3583
- // ../renderers/src/NewListItem/NewListRenderer.tsx
3584
- import { jsx as jsx81, jsxs as jsxs31 } from "react/jsx-runtime";
3585
- var ListRenderer2 = {
3586
- canRenderType: "list",
3587
- render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */ jsxs31("div", { className: getMargin(margin), children: [
3588
- /* @__PURE__ */ jsx81(Header7, { title, callToAction }),
3589
- items.map((item) => {
3590
- var _a, _b;
3591
- const {
3592
- title: itemTitle,
3593
- description,
3594
- supportingValues,
3595
- media,
3596
- additionalInfo,
3597
- inlineAlert,
3598
- callToAction: itemCallToAction,
3599
- tags: itemTags
3600
- } = item;
3601
- const controlOptions = {
3602
- ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
3603
- fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
3604
- };
3605
- return /* @__PURE__ */ jsx81(
3606
- ListItem8,
3607
- {
3608
- title: itemTitle,
3609
- subtitle: description,
3610
- valueTitle: supportingValues == null ? void 0 : supportingValues.value,
3611
- valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
3612
- media: getMedia(media, shouldUseAvatar(control, itemTags)),
3613
- prompt: getInlineAlert(inlineAlert),
3614
- additionalInfo: getAdditionalInfo(additionalInfo),
3615
- control: getCTAControl(itemCallToAction, controlOptions)
3616
- },
3617
- itemTitle
3618
- );
3619
- })
3620
- ] })
3284
+ // ../renderers/src/utils/listItem/shouldUseAvatar.ts
3285
+ var shouldUseAvatar = (control, tags) => {
3286
+ var _a;
3287
+ return control === "with-avatar" || ((_a = tags == null ? void 0 : tags.includes("with-avatar")) != null ? _a : false);
3621
3288
  };
3622
- var NewListRenderer_default = ListRenderer2;
3623
3289
 
3624
- // ../renderers/src/NewListItem/NewReviewRenderer.tsx
3625
- import { ListItem as ListItem9, Markdown as Markdown6, Popover } from "@transferwise/components";
3626
- import { QuestionMarkCircle } from "@transferwise/icons";
3627
- import { jsx as jsx82, jsxs as jsxs32 } from "react/jsx-runtime";
3290
+ // ../renderers/src/ReviewRenderer.tsx
3291
+ import { jsx as jsx75, jsxs as jsxs26 } from "react/jsx-runtime";
3628
3292
  var IGNORED_CONTROLS = [
3629
3293
  "horizontal",
3630
3294
  "horizontal-end-aligned",
3631
3295
  "horizontal-start-aligned",
3632
3296
  "vertical-two-column"
3633
3297
  ];
3634
- var ReviewRenderer2 = {
3298
+ var ReviewRenderer = {
3635
3299
  canRenderType: "review",
3636
3300
  canRender: ({ control }) => control ? !IGNORED_CONTROLS.includes(control) : true,
3637
- render: ({ callToAction, control, margin, fields, tags, title }) => /* @__PURE__ */ jsxs32("div", { className: getMargin(margin), children: [
3638
- /* @__PURE__ */ jsx82(Header7, { title, callToAction }),
3301
+ render: (props) => /* @__PURE__ */ jsx75(Review, __spreadValues({}, props))
3302
+ };
3303
+ var Review = ({
3304
+ callToAction,
3305
+ control,
3306
+ margin,
3307
+ fields,
3308
+ tags,
3309
+ title,
3310
+ trackEvent
3311
+ }) => {
3312
+ const intl = useIntl12();
3313
+ return /* @__PURE__ */ jsxs26("div", { className: getMargin(margin), children: [
3314
+ /* @__PURE__ */ jsx75(Header7, { title, callToAction }),
3639
3315
  fields.map((field) => {
3640
3316
  var _a, _b, _c;
3641
3317
  const {
@@ -3645,6 +3321,7 @@ var ReviewRenderer2 = {
3645
3321
  additionalInfo,
3646
3322
  inlineAlert,
3647
3323
  help,
3324
+ analyticsId,
3648
3325
  callToAction: itemCallToAction,
3649
3326
  tags: itemTags
3650
3327
  } = field;
@@ -3652,199 +3329,579 @@ var ReviewRenderer2 = {
3652
3329
  ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
3653
3330
  fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
3654
3331
  };
3655
- return /* @__PURE__ */ jsx82(
3656
- ListItem9,
3332
+ return /* @__PURE__ */ jsx75(
3333
+ ListItem7,
3657
3334
  {
3658
3335
  title: value,
3659
3336
  subtitle: label,
3660
3337
  inverted: true,
3661
3338
  media: getMedia(media, shouldUseAvatar(control, itemTags)),
3662
- control: (_c = getCTAControl(itemCallToAction, controlOptions)) != null ? _c : getHelpControl(help),
3339
+ control: (_c = getCTAControl(itemCallToAction, controlOptions)) != null ? _c : help ? getHelpControl(
3340
+ help,
3341
+ intl.formatMessage(help_messages_default.helpAria),
3342
+ () => trackEvent("Help Pressed", { layoutItemId: analyticsId })
3343
+ ) : void 0,
3663
3344
  prompt: getInlineAlert(inlineAlert),
3664
3345
  additionalInfo: getAdditionalInfo(additionalInfo)
3665
3346
  },
3666
3347
  JSON.stringify(field)
3667
3348
  );
3668
3349
  })
3669
- ] })
3350
+ ] });
3670
3351
  };
3671
- var getHelpControl = (help) => {
3672
- if (!help) {
3673
- return void 0;
3674
- }
3675
- return /* @__PURE__ */ jsx82(Popover, { content: /* @__PURE__ */ jsx82(Markdown6, { config: { link: { target: "_blank" } }, children: help }), children: /* @__PURE__ */ jsx82(ListItem9.IconButton, { partiallyInteractive: true, children: /* @__PURE__ */ jsx82(QuestionMarkCircle, {}) }) });
3352
+ var getHelpControl = (help, ariaLabel, onClick) => {
3353
+ return /* @__PURE__ */ jsx75(Popover, { content: /* @__PURE__ */ jsx75(Markdown6, { config: { link: { target: "_blank" } }, children: help }), children: /* @__PURE__ */ jsx75(ListItem7.IconButton, { partiallyInteractive: true, "aria-label": ariaLabel, onClick, children: /* @__PURE__ */ jsx75(QuestionMarkCircle, {}) }) });
3676
3354
  };
3677
- var NewReviewRenderer_default = ReviewRenderer2;
3355
+ var ReviewRenderer_default = ReviewRenderer;
3678
3356
 
3679
- // ../renderers/src/NewListItem/NewStatusListRenderer.tsx
3680
- import { AvatarView as AvatarView4, Header as Header12, ListItem as ListItem10 } from "@transferwise/components";
3681
- import { jsx as jsx83, jsxs as jsxs33 } from "react/jsx-runtime";
3682
- var NewStatusListRenderer = {
3683
- canRenderType: "status-list",
3684
- render: ({ margin, items, title }) => /* @__PURE__ */ jsxs33("div", { className: getMargin(margin), children: [
3685
- title ? /* @__PURE__ */ jsx83(Header12, { title }) : null,
3686
- items.map((item) => {
3687
- const { callToAction, description, icon, status, title: itemTitle } = item;
3688
- return /* @__PURE__ */ jsx83(
3689
- ListItem10,
3690
- {
3691
- title: itemTitle,
3692
- subtitle: description,
3693
- media: icon && "name" in icon ? /* @__PURE__ */ jsx83(AvatarView4, { badge: { status: mapStatus2(status) }, children: /* @__PURE__ */ jsx83(DynamicIcon_default, { name: icon.name }) }) : void 0,
3694
- additionalInfo: callToAction ? /* @__PURE__ */ jsx83(
3695
- ListItem10.AdditionalInfo,
3696
- {
3697
- action: {
3698
- href: callToAction.href,
3699
- onClick: callToAction.href ? void 0 : callToAction.onClick,
3700
- label: callToAction.title,
3701
- target: "_blank"
3702
- }
3703
- }
3704
- ) : void 0
3705
- },
3706
- JSON.stringify(item)
3707
- );
3708
- })
3709
- ] })
3710
- };
3711
- var mapStatus2 = (status) => {
3712
- switch (status) {
3713
- case "done":
3714
- return "positive";
3715
- case "pending":
3716
- return "pending";
3717
- default:
3718
- return void 0;
3719
- }
3720
- };
3721
- var NewStatusListRenderer_default = NewStatusListRenderer;
3357
+ // ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
3358
+ import { ListItem as ListItem8 } from "@transferwise/components";
3722
3359
 
3723
- // ../renderers/src/ButtonRenderer/ButtonRendererV2.tsx
3724
- import { Button as Button8 } from "@transferwise/components";
3360
+ // ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
3361
+ import { Header as Header9, SearchInput } from "@transferwise/components";
3362
+ import { useState as useState11 } from "react";
3363
+ import { useIntl as useIntl14 } from "react-intl";
3725
3364
 
3726
- // ../renderers/src/utils/isButtonPriority.ts
3727
- var validPriorities = ["primary", "secondary", "secondary-neutral", "tertiary"];
3728
- var isButtonPriority = (control) => validPriorities.includes(control);
3365
+ // ../renderers/src/messages/filter.messages.ts
3366
+ import { defineMessages as defineMessages11 } from "react-intl";
3367
+ var filter_messages_default = defineMessages11({
3368
+ placeholder: {
3369
+ id: "df.wise.filter.placeholder",
3370
+ defaultMessage: "Start typing to search",
3371
+ description: "Placeholder for the filter input"
3372
+ },
3373
+ results: {
3374
+ id: "df.wise.filter.results",
3375
+ defaultMessage: "Search results",
3376
+ description: "Label for the results section"
3377
+ },
3378
+ noResults: {
3379
+ id: "df.wise.filter.noResults",
3380
+ defaultMessage: "No results",
3381
+ description: "Message for if there are no results"
3382
+ }
3383
+ });
3729
3384
 
3730
- // ../renderers/src/ButtonRenderer/ButtonRendererV2.tsx
3731
- import { useEffect as useEffect9, useState as useState12 } from "react";
3732
- import { jsx as jsx84 } from "react/jsx-runtime";
3733
- var ButtonRendererV2 = {
3734
- canRenderType: "button",
3735
- render: ButtonComponent2
3736
- };
3737
- function ButtonComponent2(props) {
3738
- const { control, context, disabled, margin, title, size, stepLoadingState, onClick } = props;
3739
- const [spinny, setSpinny] = useState12(false);
3740
- useEffect9(() => {
3741
- if (stepLoadingState === "idle") {
3742
- setSpinny(false);
3385
+ // ../renderers/src/DecisionRenderer/filter-and-sort-decision-options.ts
3386
+ function filterAndSortDecisionOptions(selectOptions, query) {
3387
+ const upperQuery = normalizeAndRemoveAccents(query);
3388
+ const filteredItems = selectOptions.filter((option) => {
3389
+ var _a, _b, _c, _d;
3390
+ const searchableWords = [
3391
+ option.title,
3392
+ option.description,
3393
+ option.additionalText,
3394
+ (_a = option.supportingValues) == null ? void 0 : _a.value,
3395
+ (_b = option.supportingValues) == null ? void 0 : _b.subvalue,
3396
+ ...(_c = option.keywords) != null ? _c : []
3397
+ ];
3398
+ return (_d = searchableWords.some(
3399
+ (word) => word && normalizeAndRemoveAccents(word).includes(upperQuery)
3400
+ )) != null ? _d : false;
3401
+ });
3402
+ return [...filteredItems].sort((a, b) => {
3403
+ if (a.disabled && !b.disabled) {
3404
+ return 1;
3743
3405
  }
3744
- }, [stepLoadingState]);
3745
- const loading = spinny && stepLoadingState !== "idle";
3746
- return /* @__PURE__ */ jsx84(
3747
- Button8,
3748
- {
3749
- v2: true,
3750
- block: true,
3751
- className: getMargin(margin),
3752
- disabled,
3753
- priority: getPriority3(control),
3754
- loading,
3755
- size: mapButtonSize(size),
3756
- sentiment: getSentiment2(context),
3757
- onClick: () => {
3758
- setSpinny(true);
3759
- onClick();
3760
- },
3761
- children: title
3406
+ if (!a.disabled && b.disabled) {
3407
+ return -1;
3762
3408
  }
3763
- );
3764
- }
3765
- var getSentiment2 = (context) => context === "negative" ? "negative" : "default";
3766
- var getPriority3 = (control) => control && isButtonPriority(control) ? control : "secondary";
3767
-
3768
- // ../renderers/src/ProgressRenderer.tsx
3769
- import { ProgressBar } from "@transferwise/components";
3770
- import { jsx as jsx85 } from "react/jsx-runtime";
3771
- var ProgressRenderer = {
3772
- canRenderType: "progress",
3773
- render: ({ uid, title, help, progress, progressText, margin, description }) => {
3774
- return /* @__PURE__ */ jsx85(
3775
- ProgressBar,
3776
- {
3777
- id: uid,
3778
- className: getMargin(margin),
3779
- title: title && help ? /* @__PURE__ */ jsx85(LabelContentWithHelp, { text: title, help }) : title,
3780
- description,
3781
- progress: {
3782
- max: 1,
3783
- value: progress
3409
+ const aTitleUpper = a.title.toUpperCase();
3410
+ const bTitleUpper = b.title.toUpperCase();
3411
+ const aTitleStarts = aTitleUpper.startsWith(upperQuery);
3412
+ const bTitleStarts = bTitleUpper.startsWith(upperQuery);
3413
+ if (aTitleStarts && !bTitleStarts) {
3414
+ return -1;
3415
+ }
3416
+ if (!aTitleStarts && bTitleStarts) {
3417
+ return 1;
3418
+ }
3419
+ const aWordStarts = aTitleUpper.split(" ").some((word) => word.startsWith(upperQuery));
3420
+ const bWordStarts = bTitleUpper.split(" ").some((word) => word.startsWith(upperQuery));
3421
+ if (aWordStarts && !bWordStarts) {
3422
+ return -1;
3423
+ }
3424
+ if (!aWordStarts && bWordStarts) {
3425
+ return 1;
3426
+ }
3427
+ return a.title.localeCompare(b.title);
3428
+ });
3429
+ }
3430
+ var normalizeAndRemoveAccents = (text) => text.trim().toLowerCase().normalize("NFKD").replace(new RegExp("\\p{Diacritic}", "gu"), "");
3431
+
3432
+ // ../renderers/src/DecisionRenderer/GroupedDecisionList.tsx
3433
+ import { Header as Header8, Section } from "@transferwise/components";
3434
+ import { useIntl as useIntl13 } from "react-intl";
3435
+ import { Fragment as Fragment9, jsx as jsx76, jsxs as jsxs27 } from "react/jsx-runtime";
3436
+ var groupingTags2 = Object.keys(group_messages_default).filter((key) => key !== "all");
3437
+ var isGroupedDecision = (options) => {
3438
+ return getGroupsFromTags(groupingTags2, options).length > 0;
3439
+ };
3440
+ var GroupedDecisionList = (_a) => {
3441
+ var _b = _a, { renderDecisionList: renderDecisionList2 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
3442
+ const { formatMessage } = useIntl13();
3443
+ const { options } = rest;
3444
+ const itemsByTag = [...getGroupsFromTags(groupingTags2, options), { tag: "all", items: options }];
3445
+ return /* @__PURE__ */ jsx76(Fragment9, { children: itemsByTag.map(({ tag, items }) => /* @__PURE__ */ jsxs27(Section, { children: [
3446
+ /* @__PURE__ */ jsx76(
3447
+ Header8,
3448
+ {
3449
+ as: "h2",
3450
+ title: tag in group_messages_default ? formatMessage(group_messages_default[tag]) : tag
3451
+ }
3452
+ ),
3453
+ renderDecisionList2(__spreadProps(__spreadValues({}, rest), { options: items }))
3454
+ ] }, tag)) });
3455
+ };
3456
+
3457
+ // ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
3458
+ import { Fragment as Fragment10, jsx as jsx77, jsxs as jsxs28 } from "react/jsx-runtime";
3459
+ var DecisionWrapper = (props) => {
3460
+ return /* @__PURE__ */ jsxs28("div", { className: getMargin(props.margin), children: [
3461
+ props.title && /* @__PURE__ */ jsx77(Header9, { as: "h2", title: props.title }),
3462
+ props.control === "filtered" ? /* @__PURE__ */ jsx77(FilteredDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ jsx77(UnfilteredDecisionList, __spreadValues({}, props))
3463
+ ] });
3464
+ };
3465
+ var UnfilteredDecisionList = (_a) => {
3466
+ var _b = _a, { renderDecisionList: renderDecisionList2 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
3467
+ return isGroupedDecision(rest.options) ? /* @__PURE__ */ jsx77(GroupedDecisionList, __spreadProps(__spreadValues({}, rest), { renderDecisionList: renderDecisionList2 })) : renderDecisionList2(rest);
3468
+ };
3469
+ var FilteredDecisionList = (props) => {
3470
+ const { formatMessage } = useIntl14();
3471
+ const [query, setQuery] = useState11("");
3472
+ const { control, options, renderDecisionList: renderDecisionList2 } = props;
3473
+ const filteredOptions = (query == null ? void 0 : query.length) > 0 ? filterAndSortDecisionOptions(options, query) : options;
3474
+ const isGrouped = isGroupedDecision(options);
3475
+ return /* @__PURE__ */ jsxs28(Fragment10, { children: [
3476
+ /* @__PURE__ */ jsx77(
3477
+ SearchInput,
3478
+ {
3479
+ placeholder: formatMessage(filter_messages_default.placeholder),
3480
+ value: query,
3481
+ className: "m-b-2",
3482
+ onChange: (e) => {
3483
+ var _a;
3484
+ return setQuery((_a = e.target.value) != null ? _a : "");
3485
+ }
3486
+ }
3487
+ ),
3488
+ isGrouped && query.length === 0 ? /* @__PURE__ */ jsx77(GroupedDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ jsxs28(Fragment10, { children: [
3489
+ query.length > 0 && /* @__PURE__ */ jsx77(Header9, { as: "h2", title: formatMessage(filter_messages_default.results), className: "m-t-4" }),
3490
+ filteredOptions.length > 0 ? renderDecisionList2({
3491
+ control,
3492
+ className: query.length === 0 ? "m-t-3" : "",
3493
+ options: filteredOptions
3494
+ }) : /* @__PURE__ */ jsx77("p", { children: formatMessage(filter_messages_default.noResults) })
3495
+ ] })
3496
+ ] });
3497
+ };
3498
+
3499
+ // ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
3500
+ import { Fragment as Fragment11, jsx as jsx78 } from "react/jsx-runtime";
3501
+ var DecisionRenderer = {
3502
+ canRenderType: "decision",
3503
+ render: (props) => /* @__PURE__ */ jsx78(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList }))
3504
+ };
3505
+ var renderDecisionList = ({ options, control }) => {
3506
+ return /* @__PURE__ */ jsx78(Fragment11, { children: options.map((_a) => {
3507
+ var _b = _a, { disabled, onClick } = _b, rest = __objRest(_b, ["disabled", "onClick"]);
3508
+ const {
3509
+ description,
3510
+ media,
3511
+ title: itemTitle,
3512
+ href,
3513
+ additionalText,
3514
+ inlineAlert,
3515
+ supportingValues,
3516
+ tags
3517
+ } = rest;
3518
+ return /* @__PURE__ */ jsx78(
3519
+ ListItem8,
3520
+ {
3521
+ title: itemTitle,
3522
+ subtitle: description,
3523
+ spotlight: control === "spotlight" ? (tags == null ? void 0 : tags.includes("spotlight-active")) ? "active" : "inactive" : void 0,
3524
+ disabled,
3525
+ valueTitle: supportingValues == null ? void 0 : supportingValues.value,
3526
+ valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
3527
+ media: getMedia(media, shouldUseAvatar(control, tags)),
3528
+ prompt: getInlineAlert(inlineAlert),
3529
+ additionalInfo: additionalText ? getAdditionalInfo({ text: additionalText }) : void 0,
3530
+ control: href ? /* @__PURE__ */ jsx78(ListItem8.Navigation, { href, target: "_blank" }) : /* @__PURE__ */ jsx78(ListItem8.Navigation, { onClick })
3531
+ },
3532
+ JSON.stringify(rest)
3533
+ );
3534
+ }) });
3535
+ };
3536
+ var DecisionRenderer_default = DecisionRenderer;
3537
+
3538
+ // ../renderers/src/ListRenderer.tsx
3539
+ import { ListItem as ListItem9 } from "@transferwise/components";
3540
+ import { jsx as jsx79, jsxs as jsxs29 } from "react/jsx-runtime";
3541
+ var ListRenderer = {
3542
+ canRenderType: "list",
3543
+ render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */ jsxs29("div", { className: getMargin(margin), children: [
3544
+ /* @__PURE__ */ jsx79(Header7, { title, callToAction }),
3545
+ items.map((item) => {
3546
+ var _a, _b;
3547
+ const {
3548
+ title: itemTitle,
3549
+ description,
3550
+ supportingValues,
3551
+ media,
3552
+ additionalInfo,
3553
+ inlineAlert,
3554
+ callToAction: itemCallToAction,
3555
+ tags: itemTags
3556
+ } = item;
3557
+ const controlOptions = {
3558
+ ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
3559
+ fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
3560
+ };
3561
+ return /* @__PURE__ */ jsx79(
3562
+ ListItem9,
3563
+ {
3564
+ title: itemTitle,
3565
+ subtitle: description,
3566
+ valueTitle: supportingValues == null ? void 0 : supportingValues.value,
3567
+ valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
3568
+ media: getMedia(media, shouldUseAvatar(control, itemTags)),
3569
+ prompt: getInlineAlert(inlineAlert),
3570
+ additionalInfo: getAdditionalInfo(additionalInfo),
3571
+ control: getCTAControl(itemCallToAction, controlOptions)
3784
3572
  },
3785
- textEnd: progressText
3573
+ itemTitle
3574
+ );
3575
+ })
3576
+ ] })
3577
+ };
3578
+ var ListRenderer_default = ListRenderer;
3579
+
3580
+ // ../renderers/src/StatusListRenderer.tsx
3581
+ import { AvatarView as AvatarView4, Header as Header10, ListItem as ListItem10 } from "@transferwise/components";
3582
+ import { jsx as jsx80, jsxs as jsxs30 } from "react/jsx-runtime";
3583
+ var StatusListRenderer = {
3584
+ canRenderType: "status-list",
3585
+ render: ({ margin, items, title }) => /* @__PURE__ */ jsxs30("div", { className: getMargin(margin), children: [
3586
+ title ? /* @__PURE__ */ jsx80(Header10, { title }) : null,
3587
+ items.map((item) => {
3588
+ const { callToAction, description, icon, status, title: itemTitle } = item;
3589
+ return /* @__PURE__ */ jsx80(
3590
+ ListItem10,
3591
+ {
3592
+ title: itemTitle,
3593
+ subtitle: description,
3594
+ media: icon && "name" in icon ? /* @__PURE__ */ jsx80(AvatarView4, { badge: { status: mapStatus(status) }, children: /* @__PURE__ */ jsx80(DynamicIcon_default, { name: icon.name }) }) : void 0,
3595
+ additionalInfo: callToAction ? /* @__PURE__ */ jsx80(
3596
+ ListItem10.AdditionalInfo,
3597
+ {
3598
+ action: {
3599
+ href: callToAction.href,
3600
+ onClick: callToAction.href ? void 0 : callToAction.onClick,
3601
+ label: callToAction.title,
3602
+ target: "_blank"
3603
+ }
3604
+ }
3605
+ ) : void 0
3606
+ },
3607
+ JSON.stringify(item)
3608
+ );
3609
+ })
3610
+ ] })
3611
+ };
3612
+ var mapStatus = (status) => {
3613
+ switch (status) {
3614
+ case "done":
3615
+ return "positive";
3616
+ case "pending":
3617
+ return "pending";
3618
+ default:
3619
+ return void 0;
3620
+ }
3621
+ };
3622
+ var StatusListRenderer_default = StatusListRenderer;
3623
+
3624
+ // ../renderers/src/ReviewLegacyRenderer.tsx
3625
+ import { DefinitionList } from "@transferwise/components";
3626
+ import { Fragment as Fragment12, jsx as jsx81, jsxs as jsxs31 } from "react/jsx-runtime";
3627
+ var ReviewRenderer2 = {
3628
+ canRenderType: "review",
3629
+ render: ({ callToAction, control, fields, margin, title, trackEvent }) => {
3630
+ const orientation = mapControlToDefinitionListLayout(control);
3631
+ return /* @__PURE__ */ jsxs31("div", { className: getMargin(margin), children: [
3632
+ /* @__PURE__ */ jsx81(Header7, { title, callToAction }),
3633
+ /* @__PURE__ */ jsx81("div", { className: margin, children: /* @__PURE__ */ jsx81(
3634
+ DefinitionList,
3635
+ {
3636
+ layout: orientation,
3637
+ definitions: fields.map(
3638
+ ({ label, value, help, analyticsId: fieldAnalyticsId }, index) => ({
3639
+ key: String(index),
3640
+ value,
3641
+ title: getFieldLabel(
3642
+ label,
3643
+ help,
3644
+ () => trackEvent("Help Pressed", { layoutItemId: fieldAnalyticsId })
3645
+ )
3646
+ })
3647
+ )
3648
+ }
3649
+ ) })
3650
+ ] });
3651
+ }
3652
+ };
3653
+ var ReviewLegacyRenderer_default = ReviewRenderer2;
3654
+ var mapControlToDefinitionListLayout = (control) => {
3655
+ switch (control) {
3656
+ case "horizontal":
3657
+ case "horizontal-end-aligned":
3658
+ return "HORIZONTAL_RIGHT_ALIGNED";
3659
+ case "horizontal-start-aligned":
3660
+ return "HORIZONTAL_LEFT_ALIGNED";
3661
+ case "vertical-two-column":
3662
+ return "VERTICAL_TWO_COLUMN";
3663
+ case "vertical":
3664
+ case "vertical-one-column":
3665
+ default:
3666
+ return "VERTICAL_ONE_COLUMN";
3667
+ }
3668
+ };
3669
+ var getFieldLabel = (label, help, onClick) => {
3670
+ if (help) {
3671
+ return /* @__PURE__ */ jsxs31(Fragment12, { children: [
3672
+ label,
3673
+ " ",
3674
+ /* @__PURE__ */ jsx81(Help_default, { help, onClick })
3675
+ ] });
3676
+ }
3677
+ return label;
3678
+ };
3679
+
3680
+ // ../renderers/src/getWiseRenderers.ts
3681
+ var getWiseRenderers = () => [
3682
+ AddressValidationButtonRenderer_default,
3683
+ AlertRenderer_default,
3684
+ CheckboxInputRenderer_default,
3685
+ BoxRenderer_default,
3686
+ ButtonRenderer,
3687
+ ColumnsRenderer_default,
3688
+ DateInputRenderer_default,
3689
+ DecisionRenderer_default,
3690
+ DividerRenderer_default,
3691
+ ExternalConfirmationRenderer_default,
3692
+ FormRenderer_default,
3693
+ FormSectionRenderer_default,
3694
+ HeadingRenderer_default,
3695
+ ImageRenderer_default,
3696
+ InstructionsRenderer_default,
3697
+ IntegerInputRenderer_default,
3698
+ LargeUploadRenderer,
3699
+ ListRenderer_default,
3700
+ LoadingIndicatorRenderer_default,
3701
+ MarkdownRenderer_default,
3702
+ ModalRenderer,
3703
+ ModalLayoutRenderer_default,
3704
+ MoneyInputRenderer,
3705
+ MultiSelectInputRenderer_default,
3706
+ MultiUploadInputRenderer_default,
3707
+ NumberInputRenderer_default,
3708
+ ParagraphRenderer_default,
3709
+ ProgressRenderer,
3710
+ RepeatableRenderer_default,
3711
+ ReviewRenderer_default,
3712
+ SearchRenderer_default,
3713
+ SelectInputRenderer_default,
3714
+ SectionRenderer_default,
3715
+ StatusListRenderer_default,
3716
+ TabsRenderer,
3717
+ TextInputRenderer_default,
3718
+ UploadInputRenderer,
3719
+ SplashStepRenderer,
3720
+ SplashCelebrationStepRenderer,
3721
+ StepRenderer,
3722
+ // Legacy renderer must come afterwards
3723
+ ReviewLegacyRenderer_default
3724
+ ];
3725
+
3726
+ // src/dynamicFlow/telemetry/app-version.ts
3727
+ var appVersion = (
3728
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
3729
+ typeof process !== "undefined" ? "4.38.0" : "0.0.0"
3730
+ );
3731
+
3732
+ // src/dynamicFlow/telemetry/getLogEvent.ts
3733
+ var getLogEvent = (onLog) => (level, message, extra) => {
3734
+ const extraWithVersion = __spreadProps(__spreadValues({}, extra), {
3735
+ dfWiseVersion: appVersion
3736
+ });
3737
+ if (level !== "info" && onLog) {
3738
+ if (onLog) {
3739
+ onLog(level, message, extraWithVersion);
3740
+ } else {
3741
+ logToRollbar(level, message, extraWithVersion);
3742
+ }
3743
+ }
3744
+ };
3745
+ var logToRollbar = (level, message, extra) => {
3746
+ try {
3747
+ const rollbar = typeof window.Rollbar !== "undefined" ? window.Rollbar : void 0;
3748
+ rollbar == null ? void 0 : rollbar[level](message, extra);
3749
+ } catch (error) {
3750
+ console.error("Failed to log to Rollbar", error);
3751
+ }
3752
+ };
3753
+
3754
+ // src/dynamicFlow/telemetry/getTrackEvent.ts
3755
+ import { isThemeModern } from "@wise/components-theming";
3756
+ var getTrackEvent = (onEvent, onAnalytics, onThemeChange) => (name, properties) => {
3757
+ onEvent == null ? void 0 : onEvent(name, properties);
3758
+ if (name.includes(ThemeRequiredEventName)) {
3759
+ const { theme } = properties != null ? properties : { theme: "personal" };
3760
+ if (theme && isThemeModern(theme)) {
3761
+ onThemeChange == null ? void 0 : onThemeChange(theme);
3762
+ }
3763
+ } else {
3764
+ onAnalytics == null ? void 0 : onAnalytics(name, properties);
3765
+ }
3766
+ };
3767
+
3768
+ // src/dynamicFlow/messages.ts
3769
+ import { defineMessages as defineMessages12 } from "react-intl";
3770
+ var messages_default = defineMessages12({
3771
+ copied: {
3772
+ id: "df.wise.CopyFeedback.copy",
3773
+ defaultMessage: "Copied to clipboard",
3774
+ description: "Appears in a snackbar when the copy operation succeeds."
3775
+ },
3776
+ copyFailed: {
3777
+ id: "df.wise.CopyFeedback.copyFailed",
3778
+ defaultMessage: "Failed to copy to clipboard",
3779
+ description: "Appears in a snackbar when the copy operation fails."
3780
+ }
3781
+ });
3782
+
3783
+ // src/dynamicFlow/DynamicFlow.tsx
3784
+ import { jsx as jsx82 } from "react/jsx-runtime";
3785
+ var wiseRenderers = getWiseRenderers();
3786
+ function DynamicFlow(props) {
3787
+ const {
3788
+ className = "",
3789
+ customFetch = globalThis.fetch,
3790
+ renderers,
3791
+ displayStepTitle = true,
3792
+ features = {},
3793
+ onAnalytics,
3794
+ onEvent,
3795
+ onLog,
3796
+ onLink = openLinkInNewTab,
3797
+ onThemeChange
3798
+ } = props;
3799
+ const { formatMessage } = useIntl15();
3800
+ const createSnackBar = useSnackBarIfAvailable();
3801
+ const httpClient = useWiseHttpClient(customFetch);
3802
+ const mergedRenderers = useMemo2(() => [...renderers != null ? renderers : [], ...wiseRenderers], [renderers]);
3803
+ const logEvent = useMemo2(() => getLogEvent(onLog), [onLog]);
3804
+ const trackEvent = useMemo2(
3805
+ () => getTrackEvent(onEvent, onAnalytics, onThemeChange),
3806
+ [onEvent, onAnalytics, onThemeChange]
3807
+ );
3808
+ const onCopy = (copiedContent) => {
3809
+ if (copiedContent) {
3810
+ createSnackBar({ text: formatMessage(messages_default.copied) });
3811
+ } else {
3812
+ createSnackBar({ text: formatMessage(messages_default.copyFailed) });
3813
+ }
3814
+ };
3815
+ const coreProps = __spreadProps(__spreadValues({}, props), {
3816
+ features: __spreadValues({ hideStepTitle: !displayStepTitle }, features),
3817
+ httpClient,
3818
+ renderers: mergedRenderers,
3819
+ onEvent: trackEvent,
3820
+ onLog: logEvent,
3821
+ onLink,
3822
+ onCopy
3823
+ });
3824
+ return /* @__PURE__ */ jsx82("div", { className, children: /* @__PURE__ */ jsx82(DynamicFlowCore, __spreadValues({}, coreProps)) });
3825
+ }
3826
+ var DynamicForm = forwardRef(function DynamicForm2(props, ref) {
3827
+ const {
3828
+ className = "",
3829
+ customFetch = globalThis.fetch,
3830
+ renderers,
3831
+ displayStepTitle = true,
3832
+ features = {},
3833
+ onAnalytics,
3834
+ onEvent,
3835
+ onLog,
3836
+ onLink = openLinkInNewTab,
3837
+ onThemeChange
3838
+ } = props;
3839
+ const { formatMessage } = useIntl15();
3840
+ const createSnackBar = useSnackBarIfAvailable();
3841
+ const httpClient = useWiseHttpClient(customFetch);
3842
+ const mergedRenderers = useMemo2(() => [...renderers != null ? renderers : [], ...wiseRenderers], [renderers]);
3843
+ const logEvent = useMemo2(() => getLogEvent(onLog), [onLog]);
3844
+ const trackEvent = useMemo2(
3845
+ () => getTrackEvent(onEvent, onAnalytics, onThemeChange),
3846
+ [onEvent, onAnalytics, onThemeChange]
3847
+ );
3848
+ const onCopy = (copiedContent) => {
3849
+ if (copiedContent) {
3850
+ createSnackBar({ text: formatMessage(messages_default.copied) });
3851
+ } else {
3852
+ createSnackBar({ text: formatMessage(messages_default.copyFailed) });
3853
+ }
3854
+ };
3855
+ const coreProps = __spreadProps(__spreadValues({}, props), {
3856
+ httpClient,
3857
+ renderers: mergedRenderers,
3858
+ features: __spreadValues({ hideStepTitle: !displayStepTitle }, features),
3859
+ onEvent: trackEvent,
3860
+ onLog: logEvent,
3861
+ onLink,
3862
+ onCopy
3863
+ });
3864
+ return /* @__PURE__ */ jsx82("div", { className, children: /* @__PURE__ */ jsx82(DynamicFormCore, __spreadProps(__spreadValues({}, coreProps), { ref })) });
3865
+ });
3866
+ var useWiseHttpClient = (httpClient) => {
3867
+ const { locale } = useIntl15();
3868
+ return useCallback(
3869
+ async (input, init = {}) => {
3870
+ const headers = new Headers(init.headers);
3871
+ headers.set("accept-language", locale);
3872
+ const timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone || void 0;
3873
+ if (timeZone) {
3874
+ headers.set("time-zone", timeZone);
3786
3875
  }
3787
- );
3876
+ const requestInit = __spreadProps(__spreadValues({}, init), { credentials: "include", headers });
3877
+ return httpClient(input, requestInit).catch(handleRejection);
3878
+ },
3879
+ [httpClient, locale]
3880
+ );
3881
+ };
3882
+ var handleRejection = (error) => {
3883
+ if (error instanceof Error && error.message === "SCA_MODAL_CLOSED") {
3884
+ return new Response(JSON.stringify({ validation: {} }), { status: 400 });
3885
+ }
3886
+ throw error;
3887
+ };
3888
+ var openLinkInNewTab = (url) => {
3889
+ var _a;
3890
+ try {
3891
+ const w = (_a = window == null ? void 0 : window.open) == null ? void 0 : _a.call(window, url, "_blank");
3892
+ return Boolean(w);
3893
+ } catch (e) {
3894
+ return false;
3788
3895
  }
3789
3896
  };
3790
3897
 
3791
- // ../renderers/src/getWiseRenderers.ts
3792
- var getListItemRenderers = () => [
3793
- NewDecisionRenderer_default,
3794
- NewListRenderer_default,
3795
- NewReviewRenderer_default,
3796
- NewStatusListRenderer_default
3797
- ];
3798
- var getButtonV2Renderers = () => [ButtonRendererV2];
3799
- var getWiseRenderers = () => [
3800
- AddressValidationButtonRenderer_default,
3801
- AlertRenderer_default,
3802
- CheckboxInputRenderer_default,
3803
- BoxRenderer_default,
3804
- ButtonRenderer,
3805
- ColumnsRenderer_default,
3806
- DateInputRenderer_default,
3807
- DecisionRenderer_default,
3808
- DividerRenderer_default,
3809
- ExternalConfirmationRenderer_default,
3810
- FormRenderer_default,
3811
- FormSectionRenderer_default,
3812
- HeadingRenderer_default,
3813
- ImageRenderer_default,
3814
- InstructionsRenderer_default,
3815
- IntegerInputRenderer_default,
3816
- LargeUploadRenderer,
3817
- ListRenderer_default,
3818
- LoadingIndicatorRenderer_default,
3819
- MarkdownRenderer_default,
3820
- ModalRenderer,
3821
- ModalLayoutRenderer_default,
3822
- MoneyInputRenderer,
3823
- MultiSelectInputRenderer_default,
3824
- MultiUploadInputRenderer_default,
3825
- NumberInputRenderer_default,
3826
- ParagraphRenderer_default,
3827
- ProgressRenderer,
3828
- RepeatableRenderer_default,
3829
- ReviewRenderer_default,
3830
- SearchRenderer_default,
3831
- SelectInputRenderer_default,
3832
- SectionRenderer_default,
3833
- StatusListRenderer_default,
3834
- TabsRenderer,
3835
- TextInputRenderer_default,
3836
- UploadInputRenderer,
3837
- SplashStepRenderer,
3838
- SplashCelebrationStepRenderer,
3839
- StepRenderer
3840
- ];
3898
+ // src/index.ts
3899
+ import { findRendererPropsByType } from "@wise/dynamic-flow-client";
3841
3900
 
3842
3901
  // src/dynamicFlow/renderers.ts
3843
- var Header13 = Header7;
3902
+ var Header11 = Header7;
3844
3903
  var Media2 = Media;
3845
3904
  var getMargin2 = getMargin;
3846
- var getListItemRenderers2 = getListItemRenderers;
3847
- var getButtonV2Renderers2 = getButtonV2Renderers;
3848
3905
 
3849
3906
  // src/i18n/index.ts
3850
3907
  import { translations as coreTranslations } from "@wise/dynamic-flow-client";
@@ -4707,198 +4764,22 @@ var translations = languages.reduce(
4707
4764
  {}
4708
4765
  );
4709
4766
  var i18n_default = translations;
4710
-
4711
- // src/dynamicFlow/DynamicFlow.tsx
4712
- import { forwardRef, useCallback, useMemo as useMemo2 } from "react";
4713
- import { useIntl as useIntl14 } from "react-intl";
4714
- import {
4715
- DynamicFlow as DynamicFlowCoreLegacy,
4716
- DynamicFlowCoreRevamp,
4717
- DynamicFormCore
4718
- } from "@wise/dynamic-flow-client";
4719
-
4720
- // src/dynamicFlow/telemetry/app-version.ts
4721
- var appVersion = (
4722
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
4723
- typeof process !== "undefined" ? "4.38.0" : "0.0.0"
4724
- );
4725
-
4726
- // src/dynamicFlow/telemetry/getLogEvent.ts
4727
- var getLogEvent = (onLog) => (level, message, extra) => {
4728
- const extraWithVersion = __spreadProps(__spreadValues({}, extra), {
4729
- dfWiseVersion: appVersion
4730
- });
4731
- if (level !== "info" && onLog) {
4732
- if (onLog) {
4733
- onLog(level, message, extraWithVersion);
4734
- } else {
4735
- logToRollbar(level, message, extraWithVersion);
4736
- }
4737
- }
4738
- };
4739
- var logToRollbar = (level, message, extra) => {
4740
- try {
4741
- const rollbar = typeof window.Rollbar !== "undefined" ? window.Rollbar : void 0;
4742
- rollbar == null ? void 0 : rollbar[level](message, extra);
4743
- } catch (error) {
4744
- console.error("Failed to log to Rollbar", error);
4745
- }
4746
- };
4747
-
4748
- // src/dynamicFlow/telemetry/getTrackEvent.ts
4749
- import { isThemeModern } from "@wise/components-theming";
4750
- var getTrackEvent = (onEvent, onAnalytics, onThemeChange) => (name, properties) => {
4751
- onEvent == null ? void 0 : onEvent(name, properties);
4752
- if (name.includes(ThemeRequiredEventName)) {
4753
- const { theme } = properties != null ? properties : { theme: "personal" };
4754
- if (theme && isThemeModern(theme)) {
4755
- onThemeChange == null ? void 0 : onThemeChange(theme);
4756
- }
4757
- } else {
4758
- onAnalytics == null ? void 0 : onAnalytics(name, properties);
4759
- }
4760
- };
4761
-
4762
- // src/dynamicFlow/messages.ts
4763
- import { defineMessages as defineMessages12 } from "react-intl";
4764
- var messages_default = defineMessages12({
4765
- copied: {
4766
- id: "df.wise.CopyFeedback.copy",
4767
- defaultMessage: "Copied to clipboard",
4768
- description: "Appears in a snackbar when the copy operation succeeds."
4769
- },
4770
- copyFailed: {
4771
- id: "df.wise.CopyFeedback.copyFailed",
4772
- defaultMessage: "Failed to copy to clipboard",
4773
- description: "Appears in a snackbar when the copy operation fails."
4774
- }
4775
- });
4776
-
4777
- // src/dynamicFlow/DynamicFlow.tsx
4778
- import { jsx as jsx86 } from "react/jsx-runtime";
4779
- var wiseRenderers = getWiseRenderers();
4780
- function DynamicFlowLegacy(props) {
4781
- const { customFetch = globalThis.fetch } = props;
4782
- const coreProps = __spreadProps(__spreadValues({}, props), { httpClient: customFetch });
4783
- return /* @__PURE__ */ jsx86(DynamicFlowCoreLegacy, __spreadValues({}, coreProps));
4784
- }
4785
- function DynamicFlowRevamp(props) {
4786
- const {
4787
- className = "",
4788
- customFetch = globalThis.fetch,
4789
- renderers,
4790
- onAnalytics,
4791
- onEvent,
4792
- onLog,
4793
- onLink = openLinkInNewTab,
4794
- onThemeChange
4795
- } = props;
4796
- const { formatMessage } = useIntl14();
4797
- const createSnackBar = useSnackBarIfAvailable();
4798
- const httpClient = useWiseHttpClient(customFetch);
4799
- const mergedRenderers = useMemo2(() => [...renderers != null ? renderers : [], ...wiseRenderers], [renderers]);
4800
- const logEvent = useMemo2(() => getLogEvent(onLog), [onLog]);
4801
- const trackEvent = useMemo2(
4802
- () => getTrackEvent(onEvent, onAnalytics, onThemeChange),
4803
- [onEvent, onAnalytics, onThemeChange]
4804
- );
4805
- const onCopy = (copiedContent) => {
4806
- if (copiedContent) {
4807
- createSnackBar({ text: formatMessage(messages_default.copied) });
4808
- } else {
4809
- createSnackBar({ text: formatMessage(messages_default.copyFailed) });
4810
- }
4811
- };
4812
- const coreProps = __spreadProps(__spreadValues({}, props), {
4813
- httpClient,
4814
- renderers: mergedRenderers,
4815
- onEvent: trackEvent,
4816
- onLog: logEvent,
4817
- onLink,
4818
- onCopy
4819
- });
4820
- return /* @__PURE__ */ jsx86("div", { className, children: /* @__PURE__ */ jsx86(DynamicFlowCoreRevamp, __spreadValues({}, coreProps)) });
4821
- }
4822
- var DynamicForm = forwardRef(function DynamicForm2(props, ref) {
4823
- const {
4824
- className = "",
4825
- customFetch = globalThis.fetch,
4826
- renderers,
4827
- onAnalytics,
4828
- onEvent,
4829
- onLog,
4830
- onLink = openLinkInNewTab,
4831
- onThemeChange
4832
- } = props;
4833
- const { formatMessage } = useIntl14();
4834
- const createSnackBar = useSnackBarIfAvailable();
4835
- const httpClient = useWiseHttpClient(customFetch);
4836
- const mergedRenderers = useMemo2(() => [...renderers != null ? renderers : [], ...wiseRenderers], [renderers]);
4837
- const logEvent = useMemo2(() => getLogEvent(onLog), [onLog]);
4838
- const trackEvent = useMemo2(
4839
- () => getTrackEvent(onEvent, onAnalytics, onThemeChange),
4840
- [onEvent, onAnalytics, onThemeChange]
4841
- );
4842
- const onCopy = (copiedContent) => {
4843
- if (copiedContent) {
4844
- createSnackBar({ text: formatMessage(messages_default.copied) });
4845
- } else {
4846
- createSnackBar({ text: formatMessage(messages_default.copyFailed) });
4847
- }
4848
- };
4849
- const coreProps = __spreadProps(__spreadValues({}, props), {
4850
- httpClient,
4851
- renderers: mergedRenderers,
4852
- onEvent: trackEvent,
4853
- onLog: logEvent,
4854
- onLink,
4855
- onCopy
4856
- });
4857
- return /* @__PURE__ */ jsx86("div", { className, children: /* @__PURE__ */ jsx86(DynamicFormCore, __spreadProps(__spreadValues({}, coreProps), { ref })) });
4858
- });
4859
- var useWiseHttpClient = (httpClient) => {
4860
- const { locale } = useIntl14();
4861
- return useCallback(
4862
- async (input, init = {}) => {
4863
- const headers = new Headers(init.headers);
4864
- headers.set("accept-language", locale);
4865
- const timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone || void 0;
4866
- if (timeZone) {
4867
- headers.set("time-zone", timeZone);
4868
- }
4869
- const requestInit = __spreadProps(__spreadValues({}, init), { credentials: "include", headers });
4870
- return httpClient(input, requestInit).catch(handleRejection);
4871
- },
4872
- [httpClient, locale]
4873
- );
4874
- };
4875
- var handleRejection = (error) => {
4876
- if (error instanceof Error && error.message === "SCA_MODAL_CLOSED") {
4877
- return new Response(JSON.stringify({ validation: {} }), { status: 400 });
4878
- }
4879
- throw error;
4880
- };
4881
- var openLinkInNewTab = (url) => {
4882
- var _a;
4883
- try {
4884
- const w = (_a = window == null ? void 0 : window.open) == null ? void 0 : _a.call(window, url, "_blank");
4885
- return Boolean(w);
4886
- } catch (e) {
4887
- return false;
4888
- }
4889
- };
4890
4767
  export {
4891
- DynamicFlowLegacy,
4892
- DynamicFlowRevamp,
4768
+ DynamicFlow,
4893
4769
  DynamicForm,
4894
- Header13 as Header,
4895
- JsonSchemaForm,
4770
+ Header11 as Header,
4896
4771
  Media2 as Media,
4897
4772
  findRendererPropsByType,
4898
- getButtonV2Renderers2 as getButtonV2Renderers,
4899
- getListItemRenderers2 as getListItemRenderers,
4900
4773
  getMargin2 as getMargin,
4901
- isValidSchema,
4902
4774
  makeHttpClient as makeCustomFetch,
4903
4775
  i18n_default as translations
4904
4776
  };
4777
+ /*! Bundled license information:
4778
+
4779
+ classnames/index.js:
4780
+ (*!
4781
+ Copyright (c) 2018 Jed Watson.
4782
+ Licensed under the MIT License (MIT), see
4783
+ http://jedwatson.github.io/classnames
4784
+ *)
4785
+ */