@wise/dynamic-flow-client-internal 5.23.0-experimental-2dcb025 → 5.23.1

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.js CHANGED
@@ -145,7 +145,7 @@ var import_dynamic_flow_client4 = require("@wise/dynamic-flow-client");
145
145
  // src/dynamicFlow/telemetry/app-version.ts
146
146
  var appVersion = (
147
147
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
148
- typeof process !== "undefined" ? "5.22.0" : "0.0.0"
148
+ typeof process !== "undefined" ? "5.23.1" : "0.0.0"
149
149
  );
150
150
 
151
151
  // src/dynamicFlow/context-menu/useContextMenu.tsx
@@ -660,7 +660,7 @@ var AvatarMedia = ({
660
660
  }
661
661
  );
662
662
  }
663
- const avatarsWithoutBadges = avatars.filter(({ asset, icon }) => asset || icon).slice(0, 2).map(({ asset, icon, backgroundColor, color }) => ({
663
+ const avatarsWithoutBadges = avatars.filter(({ asset, icon }) => Boolean(asset || icon)).slice(0, 2).map(({ asset, icon, backgroundColor, color }) => ({
664
664
  asset: icon != null ? icon : asset,
665
665
  style: { backgroundColor, color }
666
666
  }));
@@ -747,16 +747,19 @@ var LegacyMedia = ({ image, icon, preferAvatar, size }) => {
747
747
  const iconNode = getIconNode(icon);
748
748
  const badge = getBadgedMedia(iconNode, imageNode, size);
749
749
  if (badge) {
750
- return badge;
750
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_jsx_runtime12.Fragment, { children: badge });
751
751
  }
752
752
  if (imageNode) {
753
- return preferAvatar ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_components5.AvatarView, { children: imageNode }) : imageNode;
753
+ return preferAvatar ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_components5.AvatarView, { children: imageNode }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
754
+ imageNode,
755
+ " "
756
+ ] });
754
757
  }
755
758
  if (iconNode && icon) {
756
759
  if ("text" in icon || size === 48) {
757
760
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_components5.AvatarView, { size, children: iconNode });
758
761
  }
759
- return iconNode;
762
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_jsx_runtime12.Fragment, { children: iconNode });
760
763
  }
761
764
  return null;
762
765
  };
@@ -1085,1417 +1088,83 @@ var CheckboxItemComponent = (props) => {
1085
1088
  };
1086
1089
  var SwitchItemComponent = (props) => {
1087
1090
  const {
1088
- additionalText,
1089
- description,
1090
- disabled,
1091
- inlineAlert,
1092
- media,
1093
- supportingValues,
1094
- title,
1095
- validationState,
1096
- value,
1097
- features,
1098
- onChange
1099
- } = props;
1100
- const { ref } = useScrollToError(validationState, features);
1101
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { ref, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1102
- import_components11.ListItem,
1103
- __spreadValues({
1104
- title,
1105
- subtitle: description,
1106
- additionalInfo: getAdditionalText(additionalText),
1107
- media: getMedia(media, false),
1108
- disabled,
1109
- prompt: getInlineAlertOrValidation(validationState, inlineAlert),
1110
- control: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components11.ListItem.Switch, { checked: value, onClick: () => onChange(!value) })
1111
- }, getSupportingValues(supportingValues))
1112
- ) });
1113
- };
1114
- var getInlineAlertOrValidation = (validationState, inlineAlert) => {
1115
- if ((validationState == null ? void 0 : validationState.status) === "invalid") {
1116
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components11.ListItem.Prompt, { sentiment: "negative", children: validationState.message });
1117
- }
1118
- return getInlineAlert(inlineAlert);
1119
- };
1120
- var CheckboxInputRenderer_default = CheckboxInputRenderer;
1121
-
1122
- // ../renderers/src/CollectionRenderer/CollectionRenderer.tsx
1123
- var import_components19 = require("@transferwise/components");
1124
-
1125
- // ../../node_modules/.pnpm/@tanstack+react-virtual@3.13.24_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-virtual/dist/esm/index.js
1126
- var React = __toESM(require("react"), 1);
1127
- var import_react_dom = require("react-dom");
1128
-
1129
- // ../../node_modules/.pnpm/@tanstack+virtual-core@3.14.0/node_modules/@tanstack/virtual-core/dist/esm/utils.js
1130
- function memo(getDeps, fn, opts) {
1131
- var _a;
1132
- let deps = (_a = opts.initialDeps) != null ? _a : [];
1133
- let result;
1134
- let isInitial = true;
1135
- function memoizedFunction() {
1136
- var _a2, _b, _c;
1137
- let depTime;
1138
- if (opts.key && ((_a2 = opts.debug) == null ? void 0 : _a2.call(opts))) depTime = Date.now();
1139
- const newDeps = getDeps();
1140
- const depsChanged = newDeps.length !== deps.length || newDeps.some((dep, index) => deps[index] !== dep);
1141
- if (!depsChanged) {
1142
- return result;
1143
- }
1144
- deps = newDeps;
1145
- let resultTime;
1146
- if (opts.key && ((_b = opts.debug) == null ? void 0 : _b.call(opts))) resultTime = Date.now();
1147
- result = fn(...newDeps);
1148
- if (opts.key && ((_c = opts.debug) == null ? void 0 : _c.call(opts))) {
1149
- const depEndTime = Math.round((Date.now() - depTime) * 100) / 100;
1150
- const resultEndTime = Math.round((Date.now() - resultTime) * 100) / 100;
1151
- const resultFpsPercentage = resultEndTime / 16;
1152
- const pad = (str, num) => {
1153
- str = String(str);
1154
- while (str.length < num) {
1155
- str = " " + str;
1156
- }
1157
- return str;
1158
- };
1159
- console.info(
1160
- `%c\u23F1 ${pad(resultEndTime, 5)} /${pad(depEndTime, 5)} ms`,
1161
- `
1162
- font-size: .6rem;
1163
- font-weight: bold;
1164
- color: hsl(${Math.max(
1165
- 0,
1166
- Math.min(120 - 120 * resultFpsPercentage, 120)
1167
- )}deg 100% 31%);`,
1168
- opts == null ? void 0 : opts.key
1169
- );
1170
- }
1171
- if ((opts == null ? void 0 : opts.onChange) && !(isInitial && opts.skipInitialOnChange)) {
1172
- opts.onChange(result);
1173
- }
1174
- isInitial = false;
1175
- return result;
1176
- }
1177
- memoizedFunction.updateDeps = (newDeps) => {
1178
- deps = newDeps;
1179
- };
1180
- return memoizedFunction;
1181
- }
1182
- function notUndefined(value, msg) {
1183
- if (value === void 0) {
1184
- throw new Error(`Unexpected undefined${msg ? `: ${msg}` : ""}`);
1185
- } else {
1186
- return value;
1187
- }
1188
- }
1189
- var approxEqual = (a, b) => Math.abs(a - b) < 1.01;
1190
- var debounce = (targetWindow, fn, ms) => {
1191
- let timeoutId;
1192
- return function(...args) {
1193
- targetWindow.clearTimeout(timeoutId);
1194
- timeoutId = targetWindow.setTimeout(() => fn.apply(this, args), ms);
1195
- };
1196
- };
1197
-
1198
- // ../../node_modules/.pnpm/@tanstack+virtual-core@3.14.0/node_modules/@tanstack/virtual-core/dist/esm/index.js
1199
- var defaultKeyExtractor = (index) => index;
1200
- var defaultRangeExtractor = (range) => {
1201
- const start = Math.max(range.startIndex - range.overscan, 0);
1202
- const end = Math.min(range.endIndex + range.overscan, range.count - 1);
1203
- const arr = [];
1204
- for (let i = start; i <= end; i++) {
1205
- arr.push(i);
1206
- }
1207
- return arr;
1208
- };
1209
- var addEventListenerOptions = {
1210
- passive: true
1211
- };
1212
- var observeWindowRect = (instance, cb) => {
1213
- const element = instance.scrollElement;
1214
- if (!element) {
1215
- return;
1216
- }
1217
- const handler = () => {
1218
- cb({ width: element.innerWidth, height: element.innerHeight });
1219
- };
1220
- handler();
1221
- element.addEventListener("resize", handler, addEventListenerOptions);
1222
- return () => {
1223
- element.removeEventListener("resize", handler);
1224
- };
1225
- };
1226
- var supportsScrollend = typeof window == "undefined" ? true : "onscrollend" in window;
1227
- var observeWindowOffset = (instance, cb) => {
1228
- const element = instance.scrollElement;
1229
- if (!element) {
1230
- return;
1231
- }
1232
- const targetWindow = instance.targetWindow;
1233
- if (!targetWindow) {
1234
- return;
1235
- }
1236
- let offset = 0;
1237
- const fallback = instance.options.useScrollendEvent && supportsScrollend ? () => void 0 : debounce(
1238
- targetWindow,
1239
- () => {
1240
- cb(offset, false);
1241
- },
1242
- instance.options.isScrollingResetDelay
1243
- );
1244
- const createHandler = (isScrolling) => () => {
1245
- offset = element[instance.options.horizontal ? "scrollX" : "scrollY"];
1246
- fallback();
1247
- cb(offset, isScrolling);
1248
- };
1249
- const handler = createHandler(true);
1250
- const endHandler = createHandler(false);
1251
- element.addEventListener("scroll", handler, addEventListenerOptions);
1252
- const registerScrollendEvent = instance.options.useScrollendEvent && supportsScrollend;
1253
- if (registerScrollendEvent) {
1254
- element.addEventListener("scrollend", endHandler, addEventListenerOptions);
1255
- }
1256
- return () => {
1257
- element.removeEventListener("scroll", handler);
1258
- if (registerScrollendEvent) {
1259
- element.removeEventListener("scrollend", endHandler);
1260
- }
1261
- };
1262
- };
1263
- var measureElement = (element, entry, instance) => {
1264
- if (entry == null ? void 0 : entry.borderBoxSize) {
1265
- const box = entry.borderBoxSize[0];
1266
- if (box) {
1267
- const size = Math.round(
1268
- box[instance.options.horizontal ? "inlineSize" : "blockSize"]
1269
- );
1270
- return size;
1271
- }
1272
- }
1273
- return element[instance.options.horizontal ? "offsetWidth" : "offsetHeight"];
1274
- };
1275
- var windowScroll = (offset, {
1276
- adjustments = 0,
1277
- behavior
1278
- }, instance) => {
1279
- var _a, _b;
1280
- const toOffset = offset + adjustments;
1281
- (_b = (_a = instance.scrollElement) == null ? void 0 : _a.scrollTo) == null ? void 0 : _b.call(_a, {
1282
- [instance.options.horizontal ? "left" : "top"]: toOffset,
1283
- behavior
1284
- });
1285
- };
1286
- var Virtualizer = class {
1287
- constructor(opts) {
1288
- this.unsubs = [];
1289
- this.scrollElement = null;
1290
- this.targetWindow = null;
1291
- this.isScrolling = false;
1292
- this.scrollState = null;
1293
- this.measurementsCache = [];
1294
- this.itemSizeCache = /* @__PURE__ */ new Map();
1295
- this.laneAssignments = /* @__PURE__ */ new Map();
1296
- this.pendingMeasuredCacheIndexes = [];
1297
- this.prevLanes = void 0;
1298
- this.lanesChangedFlag = false;
1299
- this.lanesSettling = false;
1300
- this.scrollRect = null;
1301
- this.scrollOffset = null;
1302
- this.scrollDirection = null;
1303
- this.scrollAdjustments = 0;
1304
- this.elementsCache = /* @__PURE__ */ new Map();
1305
- this.now = () => {
1306
- var _a2;
1307
- var _a, _b, _c;
1308
- return (_a2 = (_c = (_b = (_a = this.targetWindow) == null ? void 0 : _a.performance) == null ? void 0 : _b.now) == null ? void 0 : _c.call(_b)) != null ? _a2 : Date.now();
1309
- };
1310
- this.observer = /* @__PURE__ */ (() => {
1311
- let _ro = null;
1312
- const get = () => {
1313
- if (_ro) {
1314
- return _ro;
1315
- }
1316
- if (!this.targetWindow || !this.targetWindow.ResizeObserver) {
1317
- return null;
1318
- }
1319
- return _ro = new this.targetWindow.ResizeObserver((entries) => {
1320
- entries.forEach((entry) => {
1321
- const run = () => {
1322
- const node = entry.target;
1323
- const index = this.indexFromElement(node);
1324
- if (!node.isConnected) {
1325
- this.observer.unobserve(node);
1326
- return;
1327
- }
1328
- if (this.shouldMeasureDuringScroll(index)) {
1329
- this.resizeItem(
1330
- index,
1331
- this.options.measureElement(node, entry, this)
1332
- );
1333
- }
1334
- };
1335
- this.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(run) : run();
1336
- });
1337
- });
1338
- };
1339
- return {
1340
- disconnect: () => {
1341
- var _a;
1342
- (_a = get()) == null ? void 0 : _a.disconnect();
1343
- _ro = null;
1344
- },
1345
- observe: (target) => {
1346
- var _a;
1347
- return (_a = get()) == null ? void 0 : _a.observe(target, { box: "border-box" });
1348
- },
1349
- unobserve: (target) => {
1350
- var _a;
1351
- return (_a = get()) == null ? void 0 : _a.unobserve(target);
1352
- }
1353
- };
1354
- })();
1355
- this.range = null;
1356
- this.setOptions = (opts2) => {
1357
- Object.entries(opts2).forEach(([key, value]) => {
1358
- if (typeof value === "undefined") delete opts2[key];
1359
- });
1360
- this.options = __spreadValues({
1361
- debug: false,
1362
- initialOffset: 0,
1363
- overscan: 1,
1364
- paddingStart: 0,
1365
- paddingEnd: 0,
1366
- scrollPaddingStart: 0,
1367
- scrollPaddingEnd: 0,
1368
- horizontal: false,
1369
- getItemKey: defaultKeyExtractor,
1370
- rangeExtractor: defaultRangeExtractor,
1371
- onChange: () => {
1372
- },
1373
- measureElement,
1374
- initialRect: { width: 0, height: 0 },
1375
- scrollMargin: 0,
1376
- gap: 0,
1377
- indexAttribute: "data-index",
1378
- initialMeasurementsCache: [],
1379
- lanes: 1,
1380
- isScrollingResetDelay: 150,
1381
- enabled: true,
1382
- isRtl: false,
1383
- useScrollendEvent: false,
1384
- useAnimationFrameWithResizeObserver: false,
1385
- laneAssignmentMode: "estimate"
1386
- }, opts2);
1387
- };
1388
- this.notify = (sync) => {
1389
- var _a, _b;
1390
- (_b = (_a = this.options).onChange) == null ? void 0 : _b.call(_a, this, sync);
1391
- };
1392
- this.maybeNotify = memo(
1393
- () => {
1394
- this.calculateRange();
1395
- return [
1396
- this.isScrolling,
1397
- this.range ? this.range.startIndex : null,
1398
- this.range ? this.range.endIndex : null
1399
- ];
1400
- },
1401
- (isScrolling) => {
1402
- this.notify(isScrolling);
1403
- },
1404
- {
1405
- key: "maybeNotify",
1406
- debug: () => this.options.debug,
1407
- initialDeps: [
1408
- this.isScrolling,
1409
- this.range ? this.range.startIndex : null,
1410
- this.range ? this.range.endIndex : null
1411
- ]
1412
- }
1413
- );
1414
- this.cleanup = () => {
1415
- this.unsubs.filter(Boolean).forEach((d) => d());
1416
- this.unsubs = [];
1417
- this.observer.disconnect();
1418
- if (this.rafId != null && this.targetWindow) {
1419
- this.targetWindow.cancelAnimationFrame(this.rafId);
1420
- this.rafId = null;
1421
- }
1422
- this.scrollState = null;
1423
- this.scrollElement = null;
1424
- this.targetWindow = null;
1425
- };
1426
- this._didMount = () => {
1427
- return () => {
1428
- this.cleanup();
1429
- };
1430
- };
1431
- this._willUpdate = () => {
1432
- var _a2;
1433
- var _a;
1434
- const scrollElement = this.options.enabled ? this.options.getScrollElement() : null;
1435
- if (this.scrollElement !== scrollElement) {
1436
- this.cleanup();
1437
- if (!scrollElement) {
1438
- this.maybeNotify();
1439
- return;
1440
- }
1441
- this.scrollElement = scrollElement;
1442
- if (this.scrollElement && "ownerDocument" in this.scrollElement) {
1443
- this.targetWindow = this.scrollElement.ownerDocument.defaultView;
1444
- } else {
1445
- this.targetWindow = (_a2 = (_a = this.scrollElement) == null ? void 0 : _a.window) != null ? _a2 : null;
1446
- }
1447
- this.elementsCache.forEach((cached) => {
1448
- this.observer.observe(cached);
1449
- });
1450
- this.unsubs.push(
1451
- this.options.observeElementRect(this, (rect) => {
1452
- this.scrollRect = rect;
1453
- this.maybeNotify();
1454
- })
1455
- );
1456
- this.unsubs.push(
1457
- this.options.observeElementOffset(this, (offset, isScrolling) => {
1458
- this.scrollAdjustments = 0;
1459
- this.scrollDirection = isScrolling ? this.getScrollOffset() < offset ? "forward" : "backward" : null;
1460
- this.scrollOffset = offset;
1461
- this.isScrolling = isScrolling;
1462
- if (this.scrollState) {
1463
- this.scheduleScrollReconcile();
1464
- }
1465
- this.maybeNotify();
1466
- })
1467
- );
1468
- this._scrollToOffset(this.getScrollOffset(), {
1469
- adjustments: void 0,
1470
- behavior: void 0
1471
- });
1472
- }
1473
- };
1474
- this.rafId = null;
1475
- this.getSize = () => {
1476
- var _a;
1477
- if (!this.options.enabled) {
1478
- this.scrollRect = null;
1479
- return 0;
1480
- }
1481
- this.scrollRect = (_a = this.scrollRect) != null ? _a : this.options.initialRect;
1482
- return this.scrollRect[this.options.horizontal ? "width" : "height"];
1483
- };
1484
- this.getScrollOffset = () => {
1485
- var _a;
1486
- if (!this.options.enabled) {
1487
- this.scrollOffset = null;
1488
- return 0;
1489
- }
1490
- this.scrollOffset = (_a = this.scrollOffset) != null ? _a : typeof this.options.initialOffset === "function" ? this.options.initialOffset() : this.options.initialOffset;
1491
- return this.scrollOffset;
1492
- };
1493
- this.getFurthestMeasurement = (measurements, index) => {
1494
- const furthestMeasurementsFound = /* @__PURE__ */ new Map();
1495
- const furthestMeasurements = /* @__PURE__ */ new Map();
1496
- for (let m = index - 1; m >= 0; m--) {
1497
- const measurement = measurements[m];
1498
- if (furthestMeasurementsFound.has(measurement.lane)) {
1499
- continue;
1500
- }
1501
- const previousFurthestMeasurement = furthestMeasurements.get(
1502
- measurement.lane
1503
- );
1504
- if (previousFurthestMeasurement == null || measurement.end > previousFurthestMeasurement.end) {
1505
- furthestMeasurements.set(measurement.lane, measurement);
1506
- } else if (measurement.end < previousFurthestMeasurement.end) {
1507
- furthestMeasurementsFound.set(measurement.lane, true);
1508
- }
1509
- if (furthestMeasurementsFound.size === this.options.lanes) {
1510
- break;
1511
- }
1512
- }
1513
- return furthestMeasurements.size === this.options.lanes ? Array.from(furthestMeasurements.values()).sort((a, b) => {
1514
- if (a.end === b.end) {
1515
- return a.index - b.index;
1516
- }
1517
- return a.end - b.end;
1518
- })[0] : void 0;
1519
- };
1520
- this.getMeasurementOptions = memo(
1521
- () => [
1522
- this.options.count,
1523
- this.options.paddingStart,
1524
- this.options.scrollMargin,
1525
- this.options.getItemKey,
1526
- this.options.enabled,
1527
- this.options.lanes,
1528
- this.options.laneAssignmentMode
1529
- ],
1530
- (count, paddingStart, scrollMargin, getItemKey, enabled, lanes, laneAssignmentMode) => {
1531
- const lanesChanged = this.prevLanes !== void 0 && this.prevLanes !== lanes;
1532
- if (lanesChanged) {
1533
- this.lanesChangedFlag = true;
1534
- }
1535
- this.prevLanes = lanes;
1536
- this.pendingMeasuredCacheIndexes = [];
1537
- return {
1538
- count,
1539
- paddingStart,
1540
- scrollMargin,
1541
- getItemKey,
1542
- enabled,
1543
- lanes,
1544
- laneAssignmentMode
1545
- };
1546
- },
1547
- {
1548
- key: false
1549
- }
1550
- );
1551
- this.getMeasurements = memo(
1552
- () => [this.getMeasurementOptions(), this.itemSizeCache],
1553
- ({
1554
- count,
1555
- paddingStart,
1556
- scrollMargin,
1557
- getItemKey,
1558
- enabled,
1559
- lanes,
1560
- laneAssignmentMode
1561
- }, itemSizeCache) => {
1562
- if (!enabled) {
1563
- this.measurementsCache = [];
1564
- this.itemSizeCache.clear();
1565
- this.laneAssignments.clear();
1566
- return [];
1567
- }
1568
- if (this.laneAssignments.size > count) {
1569
- for (const index of this.laneAssignments.keys()) {
1570
- if (index >= count) {
1571
- this.laneAssignments.delete(index);
1572
- }
1573
- }
1574
- }
1575
- if (this.lanesChangedFlag) {
1576
- this.lanesChangedFlag = false;
1577
- this.lanesSettling = true;
1578
- this.measurementsCache = [];
1579
- this.itemSizeCache.clear();
1580
- this.laneAssignments.clear();
1581
- this.pendingMeasuredCacheIndexes = [];
1582
- }
1583
- if (this.measurementsCache.length === 0 && !this.lanesSettling) {
1584
- this.measurementsCache = this.options.initialMeasurementsCache;
1585
- this.measurementsCache.forEach((item) => {
1586
- this.itemSizeCache.set(item.key, item.size);
1587
- });
1588
- }
1589
- const min = this.lanesSettling ? 0 : this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
1590
- this.pendingMeasuredCacheIndexes = [];
1591
- if (this.lanesSettling && this.measurementsCache.length === count) {
1592
- this.lanesSettling = false;
1593
- }
1594
- const measurements = this.measurementsCache.slice(0, min);
1595
- const laneLastIndex = new Array(lanes).fill(
1596
- void 0
1597
- );
1598
- for (let m = 0; m < min; m++) {
1599
- const item = measurements[m];
1600
- if (item) {
1601
- laneLastIndex[item.lane] = m;
1602
- }
1603
- }
1604
- for (let i = min; i < count; i++) {
1605
- const key = getItemKey(i);
1606
- const cachedLane = this.laneAssignments.get(i);
1607
- let lane;
1608
- let start;
1609
- const shouldCacheLane = laneAssignmentMode === "estimate" || itemSizeCache.has(key);
1610
- if (cachedLane !== void 0 && this.options.lanes > 1) {
1611
- lane = cachedLane;
1612
- const prevIndex = laneLastIndex[lane];
1613
- const prevInLane = prevIndex !== void 0 ? measurements[prevIndex] : void 0;
1614
- start = prevInLane ? prevInLane.end + this.options.gap : paddingStart + scrollMargin;
1615
- } else {
1616
- const furthestMeasurement = this.options.lanes === 1 ? measurements[i - 1] : this.getFurthestMeasurement(measurements, i);
1617
- start = furthestMeasurement ? furthestMeasurement.end + this.options.gap : paddingStart + scrollMargin;
1618
- lane = furthestMeasurement ? furthestMeasurement.lane : i % this.options.lanes;
1619
- if (this.options.lanes > 1 && shouldCacheLane) {
1620
- this.laneAssignments.set(i, lane);
1621
- }
1622
- }
1623
- const measuredSize = itemSizeCache.get(key);
1624
- const size = typeof measuredSize === "number" ? measuredSize : this.options.estimateSize(i);
1625
- const end = start + size;
1626
- measurements[i] = {
1627
- index: i,
1628
- start,
1629
- size,
1630
- end,
1631
- key,
1632
- lane
1633
- };
1634
- laneLastIndex[lane] = i;
1635
- }
1636
- this.measurementsCache = measurements;
1637
- return measurements;
1638
- },
1639
- {
1640
- key: "getMeasurements",
1641
- debug: () => this.options.debug
1642
- }
1643
- );
1644
- this.calculateRange = memo(
1645
- () => [
1646
- this.getMeasurements(),
1647
- this.getSize(),
1648
- this.getScrollOffset(),
1649
- this.options.lanes
1650
- ],
1651
- (measurements, outerSize, scrollOffset, lanes) => {
1652
- return this.range = measurements.length > 0 && outerSize > 0 ? calculateRange({
1653
- measurements,
1654
- outerSize,
1655
- scrollOffset,
1656
- lanes
1657
- }) : null;
1658
- },
1659
- {
1660
- key: "calculateRange",
1661
- debug: () => this.options.debug
1662
- }
1663
- );
1664
- this.getVirtualIndexes = memo(
1665
- () => {
1666
- let startIndex = null;
1667
- let endIndex = null;
1668
- const range = this.calculateRange();
1669
- if (range) {
1670
- startIndex = range.startIndex;
1671
- endIndex = range.endIndex;
1672
- }
1673
- this.maybeNotify.updateDeps([this.isScrolling, startIndex, endIndex]);
1674
- return [
1675
- this.options.rangeExtractor,
1676
- this.options.overscan,
1677
- this.options.count,
1678
- startIndex,
1679
- endIndex
1680
- ];
1681
- },
1682
- (rangeExtractor, overscan, count, startIndex, endIndex) => {
1683
- return startIndex === null || endIndex === null ? [] : rangeExtractor({
1684
- startIndex,
1685
- endIndex,
1686
- overscan,
1687
- count
1688
- });
1689
- },
1690
- {
1691
- key: "getVirtualIndexes",
1692
- debug: () => this.options.debug
1693
- }
1694
- );
1695
- this.indexFromElement = (node) => {
1696
- const attributeName = this.options.indexAttribute;
1697
- const indexStr = node.getAttribute(attributeName);
1698
- if (!indexStr) {
1699
- console.warn(
1700
- `Missing attribute name '${attributeName}={index}' on measured element.`
1701
- );
1702
- return -1;
1703
- }
1704
- return parseInt(indexStr, 10);
1705
- };
1706
- this.shouldMeasureDuringScroll = (index) => {
1707
- var _a2;
1708
- var _a;
1709
- if (!this.scrollState || this.scrollState.behavior !== "smooth") {
1710
- return true;
1711
- }
1712
- const scrollIndex = (_a2 = this.scrollState.index) != null ? _a2 : (_a = this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)) == null ? void 0 : _a.index;
1713
- if (scrollIndex !== void 0 && this.range) {
1714
- const bufferSize = Math.max(
1715
- this.options.overscan,
1716
- Math.ceil((this.range.endIndex - this.range.startIndex) / 2)
1717
- );
1718
- const minIndex = Math.max(0, scrollIndex - bufferSize);
1719
- const maxIndex = Math.min(
1720
- this.options.count - 1,
1721
- scrollIndex + bufferSize
1722
- );
1723
- return index >= minIndex && index <= maxIndex;
1724
- }
1725
- return true;
1726
- };
1727
- this.measureElement = (node) => {
1728
- if (!node) {
1729
- this.elementsCache.forEach((cached, key2) => {
1730
- if (!cached.isConnected) {
1731
- this.observer.unobserve(cached);
1732
- this.elementsCache.delete(key2);
1733
- }
1734
- });
1735
- return;
1736
- }
1737
- const index = this.indexFromElement(node);
1738
- const key = this.options.getItemKey(index);
1739
- const prevNode = this.elementsCache.get(key);
1740
- if (prevNode !== node) {
1741
- if (prevNode) {
1742
- this.observer.unobserve(prevNode);
1743
- }
1744
- this.observer.observe(node);
1745
- this.elementsCache.set(key, node);
1746
- }
1747
- if ((!this.isScrolling || this.scrollState) && this.shouldMeasureDuringScroll(index)) {
1748
- this.resizeItem(index, this.options.measureElement(node, void 0, this));
1749
- }
1750
- };
1751
- this.resizeItem = (index, size) => {
1752
- var _a2;
1753
- var _a;
1754
- const item = this.measurementsCache[index];
1755
- if (!item) return;
1756
- const itemSize = (_a2 = this.itemSizeCache.get(item.key)) != null ? _a2 : item.size;
1757
- const delta = size - itemSize;
1758
- if (delta !== 0) {
1759
- if (((_a = this.scrollState) == null ? void 0 : _a.behavior) !== "smooth" && (this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(item, delta, this) : item.start < this.getScrollOffset() + this.scrollAdjustments)) {
1760
- if (this.options.debug) {
1761
- console.info("correction", delta);
1762
- }
1763
- this._scrollToOffset(this.getScrollOffset(), {
1764
- adjustments: this.scrollAdjustments += delta,
1765
- behavior: void 0
1766
- });
1767
- }
1768
- this.pendingMeasuredCacheIndexes.push(item.index);
1769
- this.itemSizeCache = new Map(this.itemSizeCache.set(item.key, size));
1770
- this.notify(false);
1771
- }
1772
- };
1773
- this.getVirtualItems = memo(
1774
- () => [this.getVirtualIndexes(), this.getMeasurements()],
1775
- (indexes, measurements) => {
1776
- const virtualItems = [];
1777
- for (let k = 0, len = indexes.length; k < len; k++) {
1778
- const i = indexes[k];
1779
- const measurement = measurements[i];
1780
- virtualItems.push(measurement);
1781
- }
1782
- return virtualItems;
1783
- },
1784
- {
1785
- key: "getVirtualItems",
1786
- debug: () => this.options.debug
1787
- }
1788
- );
1789
- this.getVirtualItemForOffset = (offset) => {
1790
- const measurements = this.getMeasurements();
1791
- if (measurements.length === 0) {
1792
- return void 0;
1793
- }
1794
- return notUndefined(
1795
- measurements[findNearestBinarySearch(
1796
- 0,
1797
- measurements.length - 1,
1798
- (index) => notUndefined(measurements[index]).start,
1799
- offset
1800
- )]
1801
- );
1802
- };
1803
- this.getMaxScrollOffset = () => {
1804
- if (!this.scrollElement) return 0;
1805
- if ("scrollHeight" in this.scrollElement) {
1806
- return this.options.horizontal ? this.scrollElement.scrollWidth - this.scrollElement.clientWidth : this.scrollElement.scrollHeight - this.scrollElement.clientHeight;
1807
- } else {
1808
- const doc = this.scrollElement.document.documentElement;
1809
- return this.options.horizontal ? doc.scrollWidth - this.scrollElement.innerWidth : doc.scrollHeight - this.scrollElement.innerHeight;
1810
- }
1811
- };
1812
- this.getOffsetForAlignment = (toOffset, align, itemSize = 0) => {
1813
- if (!this.scrollElement) return 0;
1814
- const size = this.getSize();
1815
- const scrollOffset = this.getScrollOffset();
1816
- if (align === "auto") {
1817
- align = toOffset >= scrollOffset + size ? "end" : "start";
1818
- }
1819
- if (align === "center") {
1820
- toOffset += (itemSize - size) / 2;
1821
- } else if (align === "end") {
1822
- toOffset -= size;
1823
- }
1824
- const maxOffset = this.getMaxScrollOffset();
1825
- return Math.max(Math.min(maxOffset, toOffset), 0);
1826
- };
1827
- this.getOffsetForIndex = (index, align = "auto") => {
1828
- index = Math.max(0, Math.min(index, this.options.count - 1));
1829
- const size = this.getSize();
1830
- const scrollOffset = this.getScrollOffset();
1831
- const item = this.measurementsCache[index];
1832
- if (!item) return;
1833
- if (align === "auto") {
1834
- if (item.end >= scrollOffset + size - this.options.scrollPaddingEnd) {
1835
- align = "end";
1836
- } else if (item.start <= scrollOffset + this.options.scrollPaddingStart) {
1837
- align = "start";
1838
- } else {
1839
- return [scrollOffset, align];
1840
- }
1841
- }
1842
- if (align === "end" && index === this.options.count - 1) {
1843
- return [this.getMaxScrollOffset(), align];
1844
- }
1845
- const toOffset = align === "end" ? item.end + this.options.scrollPaddingEnd : item.start - this.options.scrollPaddingStart;
1846
- return [
1847
- this.getOffsetForAlignment(toOffset, align, item.size),
1848
- align
1849
- ];
1850
- };
1851
- this.scrollToOffset = (toOffset, { align = "start", behavior = "auto" } = {}) => {
1852
- const offset = this.getOffsetForAlignment(toOffset, align);
1853
- const now = this.now();
1854
- this.scrollState = {
1855
- index: null,
1856
- align,
1857
- behavior,
1858
- startedAt: now,
1859
- lastTargetOffset: offset,
1860
- stableFrames: 0
1861
- };
1862
- this._scrollToOffset(offset, { adjustments: void 0, behavior });
1863
- this.scheduleScrollReconcile();
1864
- };
1865
- this.scrollToIndex = (index, {
1866
- align: initialAlign = "auto",
1867
- behavior = "auto"
1868
- } = {}) => {
1869
- index = Math.max(0, Math.min(index, this.options.count - 1));
1870
- const offsetInfo = this.getOffsetForIndex(index, initialAlign);
1871
- if (!offsetInfo) {
1872
- return;
1873
- }
1874
- const [offset, align] = offsetInfo;
1875
- const now = this.now();
1876
- this.scrollState = {
1877
- index,
1878
- align,
1879
- behavior,
1880
- startedAt: now,
1881
- lastTargetOffset: offset,
1882
- stableFrames: 0
1883
- };
1884
- this._scrollToOffset(offset, { adjustments: void 0, behavior });
1885
- this.scheduleScrollReconcile();
1886
- };
1887
- this.scrollBy = (delta, { behavior = "auto" } = {}) => {
1888
- const offset = this.getScrollOffset() + delta;
1889
- const now = this.now();
1890
- this.scrollState = {
1891
- index: null,
1892
- align: "start",
1893
- behavior,
1894
- startedAt: now,
1895
- lastTargetOffset: offset,
1896
- stableFrames: 0
1897
- };
1898
- this._scrollToOffset(offset, { adjustments: void 0, behavior });
1899
- this.scheduleScrollReconcile();
1900
- };
1901
- this.getTotalSize = () => {
1902
- var _a2;
1903
- var _a;
1904
- const measurements = this.getMeasurements();
1905
- let end;
1906
- if (measurements.length === 0) {
1907
- end = this.options.paddingStart;
1908
- } else if (this.options.lanes === 1) {
1909
- end = (_a2 = (_a = measurements[measurements.length - 1]) == null ? void 0 : _a.end) != null ? _a2 : 0;
1910
- } else {
1911
- const endByLane = Array(this.options.lanes).fill(null);
1912
- let endIndex = measurements.length - 1;
1913
- while (endIndex >= 0 && endByLane.some((val) => val === null)) {
1914
- const item = measurements[endIndex];
1915
- if (endByLane[item.lane] === null) {
1916
- endByLane[item.lane] = item.end;
1917
- }
1918
- endIndex--;
1919
- }
1920
- end = Math.max(...endByLane.filter((val) => val !== null));
1921
- }
1922
- return Math.max(
1923
- end - this.options.scrollMargin + this.options.paddingEnd,
1924
- 0
1925
- );
1926
- };
1927
- this._scrollToOffset = (offset, {
1928
- adjustments,
1929
- behavior
1930
- }) => {
1931
- this.options.scrollToFn(offset, { behavior, adjustments }, this);
1932
- };
1933
- this.measure = () => {
1934
- this.itemSizeCache = /* @__PURE__ */ new Map();
1935
- this.laneAssignments = /* @__PURE__ */ new Map();
1936
- this.notify(false);
1937
- };
1938
- this.setOptions(opts);
1939
- }
1940
- scheduleScrollReconcile() {
1941
- if (!this.targetWindow) {
1942
- this.scrollState = null;
1943
- return;
1944
- }
1945
- if (this.rafId != null) return;
1946
- this.rafId = this.targetWindow.requestAnimationFrame(() => {
1947
- this.rafId = null;
1948
- this.reconcileScroll();
1949
- });
1950
- }
1951
- reconcileScroll() {
1952
- if (!this.scrollState) return;
1953
- const el = this.scrollElement;
1954
- if (!el) return;
1955
- const MAX_RECONCILE_MS = 5e3;
1956
- if (this.now() - this.scrollState.startedAt > MAX_RECONCILE_MS) {
1957
- this.scrollState = null;
1958
- return;
1959
- }
1960
- const offsetInfo = this.scrollState.index != null ? this.getOffsetForIndex(this.scrollState.index, this.scrollState.align) : void 0;
1961
- const targetOffset = offsetInfo ? offsetInfo[0] : this.scrollState.lastTargetOffset;
1962
- const STABLE_FRAMES = 1;
1963
- const targetChanged = targetOffset !== this.scrollState.lastTargetOffset;
1964
- if (!targetChanged && approxEqual(targetOffset, this.getScrollOffset())) {
1965
- this.scrollState.stableFrames++;
1966
- if (this.scrollState.stableFrames >= STABLE_FRAMES) {
1967
- this.scrollState = null;
1968
- return;
1969
- }
1970
- } else {
1971
- this.scrollState.stableFrames = 0;
1972
- if (targetChanged) {
1973
- this.scrollState.lastTargetOffset = targetOffset;
1974
- this.scrollState.behavior = "auto";
1975
- this._scrollToOffset(targetOffset, {
1976
- adjustments: void 0,
1977
- behavior: "auto"
1978
- });
1979
- }
1980
- }
1981
- this.scheduleScrollReconcile();
1982
- }
1983
- };
1984
- var findNearestBinarySearch = (low, high, getCurrentValue, value) => {
1985
- while (low <= high) {
1986
- const middle = (low + high) / 2 | 0;
1987
- const currentValue = getCurrentValue(middle);
1988
- if (currentValue < value) {
1989
- low = middle + 1;
1990
- } else if (currentValue > value) {
1991
- high = middle - 1;
1992
- } else {
1993
- return middle;
1994
- }
1995
- }
1996
- if (low > 0) {
1997
- return low - 1;
1998
- } else {
1999
- return 0;
2000
- }
2001
- };
2002
- function calculateRange({
2003
- measurements,
2004
- outerSize,
2005
- scrollOffset,
2006
- lanes
2007
- }) {
2008
- const lastIndex = measurements.length - 1;
2009
- const getOffset = (index) => measurements[index].start;
2010
- if (measurements.length <= lanes) {
2011
- return {
2012
- startIndex: 0,
2013
- endIndex: lastIndex
2014
- };
2015
- }
2016
- let startIndex = findNearestBinarySearch(
2017
- 0,
2018
- lastIndex,
2019
- getOffset,
2020
- scrollOffset
2021
- );
2022
- let endIndex = startIndex;
2023
- if (lanes === 1) {
2024
- while (endIndex < lastIndex && measurements[endIndex].end < scrollOffset + outerSize) {
2025
- endIndex++;
2026
- }
2027
- } else if (lanes > 1) {
2028
- const endPerLane = Array(lanes).fill(0);
2029
- while (endIndex < lastIndex && endPerLane.some((pos) => pos < scrollOffset + outerSize)) {
2030
- const item = measurements[endIndex];
2031
- endPerLane[item.lane] = item.end;
2032
- endIndex++;
2033
- }
2034
- const startPerLane = Array(lanes).fill(scrollOffset + outerSize);
2035
- while (startIndex >= 0 && startPerLane.some((pos) => pos >= scrollOffset)) {
2036
- const item = measurements[startIndex];
2037
- startPerLane[item.lane] = item.start;
2038
- startIndex--;
2039
- }
2040
- startIndex = Math.max(0, startIndex - startIndex % lanes);
2041
- endIndex = Math.min(lastIndex, endIndex + (lanes - 1 - endIndex % lanes));
2042
- }
2043
- return { startIndex, endIndex };
2044
- }
2045
-
2046
- // ../../node_modules/.pnpm/@tanstack+react-virtual@3.13.24_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-virtual/dist/esm/index.js
2047
- var useIsomorphicLayoutEffect = typeof document !== "undefined" ? React.useLayoutEffect : React.useEffect;
2048
- function useVirtualizerBase(_a) {
2049
- var _b = _a, {
2050
- useFlushSync = true
2051
- } = _b, options = __objRest(_b, [
2052
- "useFlushSync"
2053
- ]);
2054
- const rerender = React.useReducer(() => ({}), {})[1];
2055
- const resolvedOptions = __spreadProps(__spreadValues({}, options), {
2056
- onChange: (instance2, sync) => {
2057
- var _a2;
2058
- if (useFlushSync && sync) {
2059
- (0, import_react_dom.flushSync)(rerender);
2060
- } else {
2061
- rerender();
2062
- }
2063
- (_a2 = options.onChange) == null ? void 0 : _a2.call(options, instance2, sync);
2064
- }
2065
- });
2066
- const [instance] = React.useState(
2067
- () => new Virtualizer(resolvedOptions)
2068
- );
2069
- instance.setOptions(resolvedOptions);
2070
- useIsomorphicLayoutEffect(() => {
2071
- return instance._didMount();
2072
- }, []);
2073
- useIsomorphicLayoutEffect(() => {
2074
- return instance._willUpdate();
2075
- });
2076
- return instance;
2077
- }
2078
- function useWindowVirtualizer(options) {
2079
- return useVirtualizerBase(__spreadValues({
2080
- getScrollElement: () => typeof document !== "undefined" ? window : null,
2081
- observeElementRect: observeWindowRect,
2082
- observeElementOffset: observeWindowOffset,
2083
- scrollToFn: windowScroll,
2084
- initialOffset: () => typeof document !== "undefined" ? window.scrollY : 0
2085
- }, options));
2086
- }
2087
-
2088
- // ../renderers/src/CollectionRenderer/components/ContentComponent.tsx
2089
- var import_components13 = require("@transferwise/components");
2090
- var import_react6 = require("react");
2091
-
2092
- // ../renderers/src/step/StepFooter.tsx
2093
- var import_components12 = require("@transferwise/components");
2094
- var import_react5 = require("react");
2095
- var import_react_intl6 = require("react-intl");
2096
-
2097
- // ../renderers/src/messages/step.messages.ts
2098
- var import_react_intl5 = require("react-intl");
2099
- var step_messages_default = (0, import_react_intl5.defineMessages)({
2100
- scrollToBottom: {
2101
- id: "df.wise.step.scrollToBottom",
2102
- defaultMessage: "Scroll to bottom",
2103
- description: "Label for a button that appears when the content of a step is too long and the user needs to scroll to the bottom to see all the content."
2104
- }
2105
- });
2106
-
2107
- // ../renderers/src/step/StepFooter.tsx
2108
- var import_jsx_runtime24 = require("react/jsx-runtime");
2109
- var SCROLL_TO_BOTTOM = "scroll-to-bottom";
2110
- var StepFooter = ({ footer, tags }) => {
2111
- if (tags == null ? void 0 : tags.includes(SCROLL_TO_BOTTOM)) {
2112
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(FooterWithScrollButton, { footer });
2113
- }
2114
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DefaultFooter, { footer });
2115
- };
2116
- var DefaultFooter = ({ footer }) => {
2117
- const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
2118
- return hasFooter ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "df-step-fixed__footer", children: footer }) : void 0;
2119
- };
2120
- var FooterWithScrollButton = ({ footer }) => {
2121
- const { formatMessage } = (0, import_react_intl6.useIntl)();
2122
- const endOfLayoutRef = (0, import_react5.useRef)(null);
2123
- const isElementVisible = useIsElementVisible(endOfLayoutRef);
2124
- const scrollButton = /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2125
- import_components12.Button,
2126
- {
2127
- className: "m-b-1",
2128
- v2: true,
2129
- block: true,
2130
- priority: "tertiary",
2131
- onClick: () => {
2132
- var _a;
2133
- (_a = endOfLayoutRef.current) == null ? void 0 : _a.scrollIntoView({ behavior: "smooth" });
2134
- },
2135
- children: formatMessage(step_messages_default.scrollToBottom)
2136
- }
2137
- );
2138
- const hasStepFooterContent = footer && Array.isArray(footer) && footer.length > 0;
2139
- if (isElementVisible && !hasStepFooterContent) {
2140
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" });
2141
- }
2142
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
2143
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" }),
2144
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "df-step-fixed__footer", children: [
2145
- !isElementVisible && scrollButton,
2146
- footer
2147
- ] })
2148
- ] });
2149
- };
2150
- var useIsElementVisible = (elementRef) => {
2151
- const [isVisible, setIsVisible] = (0, import_react5.useState)(false);
2152
- (0, import_react5.useEffect)(() => {
2153
- const element = elementRef.current;
2154
- if (!element) return;
2155
- const observer = new IntersectionObserver(([entry]) => {
2156
- setIsVisible(entry.isIntersecting);
2157
- });
2158
- observer.observe(element);
2159
- return () => observer.disconnect();
2160
- }, [elementRef]);
2161
- return isVisible;
2162
- };
2163
-
2164
- // ../renderers/src/CollectionRenderer/components/ContentComponent.tsx
2165
- var import_jsx_runtime25 = require("react/jsx-runtime");
2166
- var ContentComponent = (props) => {
2167
- const { state, status, SectionHeader, Item } = props;
2168
- const endOfContentRef = (0, import_react6.useRef)(null);
2169
- const isBottomVisible = useIsElementVisible(endOfContentRef);
2170
- (0, import_react6.useEffect)(() => {
2171
- var _a;
2172
- if (isBottomVisible && status.type === "idle" && status.loadMore) {
2173
- (_a = status.loadMore) == null ? void 0 : _a.call(status);
2174
- }
2175
- }, [isBottomVisible]);
2176
- const stateCount = state.sections.reduce(
2177
- (total, section) => section.items.length + total + (section.title ? 1 : 0),
2178
- 0
2179
- );
2180
- const items = (0, import_react6.useMemo)(() => {
2181
- return state.sections.reduce((acc, section) => {
2182
- return [
2183
- ...acc,
2184
- ...section.title ? [
2185
- {
2186
- type: "header",
2187
- title: section.title,
2188
- items: section.items,
2189
- id: section.id
2190
- }
2191
- ] : [],
2192
- ...section.items.map((item) => ({
2193
- item,
2194
- type: "item"
2195
- }))
2196
- ];
2197
- }, []);
2198
- }, [stateCount]);
2199
- const listRef = (0, import_react6.useRef)(null);
2200
- const listOffsetRef = (0, import_react6.useRef)(0);
2201
- (0, import_react6.useLayoutEffect)(() => {
2202
- var _a, _b;
2203
- listOffsetRef.current = (_b = (_a = listRef.current) == null ? void 0 : _a.offsetTop) != null ? _b : 0;
2204
- });
2205
- const virtualizer = useWindowVirtualizer({
2206
- count: stateCount,
2207
- estimateSize: () => 120,
2208
- // todo, we could be clever here. Is it worth it?
2209
- overscan: 10,
2210
- scrollMargin: listOffsetRef.current
2211
- });
2212
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { ref: listRef, children: [
2213
- state.beforeSections,
2214
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2215
- "div",
2216
- {
2217
- style: {
2218
- height: `${virtualizer.getTotalSize()}px`,
2219
- width: "100%",
2220
- position: "relative"
2221
- },
2222
- children: virtualizer.getVirtualItems().map((item) => {
2223
- const i = items[item.index];
2224
- if (!i) {
2225
- return null;
2226
- }
2227
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2228
- "div",
2229
- {
2230
- ref: virtualizer.measureElement,
2231
- "data-index": item.index,
2232
- style: {
2233
- position: "absolute",
2234
- top: 0,
2235
- left: 0,
2236
- width: "100%",
2237
- transform: `translateY(${item.start - virtualizer.options.scrollMargin}px)`
2238
- },
2239
- children: i.type === "header" ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SectionHeader, __spreadValues({}, i)) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Item, __spreadValues({}, i.item))
2240
- },
2241
- item.key
2242
- );
2243
- })
2244
- }
2245
- ),
2246
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { ref: endOfContentRef, className: "d-flex m-x-auto m-y-2", children: [
2247
- status.type === "idle" || status.type === "loading" && status.reason === "pagination" ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_components13.ProcessIndicator, { size: "xs" }) : null,
2248
- status.type === "error" && status.reason === "pagination" ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "d-flex m-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_components13.Button, { v2: true, size: "sm", priority: "secondary-neutral", onClick: status.retry, children: "Load more" }) }) : null
2249
- ] }),
2250
- state.afterSections
2251
- ] });
2252
- };
2253
-
2254
- // ../renderers/src/CollectionRenderer/components/SearchComponent.tsx
2255
- var import_components14 = require("@transferwise/components");
2256
- var import_icons = require("@transferwise/icons");
2257
- var import_jsx_runtime26 = require("react/jsx-runtime");
2258
- var SearchComponent = ({ state, features }) => {
2259
- const { search } = state;
2260
- if (!search) {
2261
- return;
2262
- }
2263
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2264
- FieldInput_default,
2265
- {
2266
- id: "search",
2267
- description: "",
2268
- validation: void 0,
2269
- help: "",
2270
- label: search.title,
2271
- features,
2272
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_components14.InputGroup, { addonStart: { content: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_icons.Search, { size: 24 }) }, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2273
- import_components14.Input,
2274
- {
2275
- id: "search",
2276
- name: "search",
2277
- shape: "pill",
2278
- placeholder: search.hint,
2279
- type: "text",
2280
- value: search.query,
2281
- onChange: ({ currentTarget: { value } }) => {
2282
- search.onChange(value);
2283
- }
2284
- }
2285
- ) })
2286
- }
2287
- );
2288
- };
2289
-
2290
- // ../renderers/src/CollectionRenderer/components/FilterComponent.tsx
2291
- var import_components15 = require("@transferwise/components");
2292
- var import_jsx_runtime27 = require("react/jsx-runtime");
2293
- var FiltersComponent = ({ state }) => {
2294
- const { filters } = state;
2295
- return filters.map((filter) => {
2296
- var _a;
2297
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(FilterComponent, __spreadValues({}, filter), JSON.stringify((_a = filter.options) == null ? void 0 : _a.map((o) => o.value)));
2298
- });
2299
- };
2300
- var FilterComponent = (filter) => {
2301
- const { multiSelect, options } = filter;
2302
- if (!options) {
2303
- return null;
2304
- }
2305
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2306
- import_components15.Chips,
2307
- {
2308
- className: "m-b-1",
2309
- multiple: multiSelect,
2310
- selected: options.some((option) => option.selected) ? options.filter((option) => option.selected).map((option) => option.value) : multiSelect ? [] : "",
2311
- chips: [
2312
- ...multiSelect ? [
2313
- {
2314
- value: "",
2315
- // this is a placeholder for now, only for single selects, when it is not possible to de-select options
2316
- label: "All"
2317
- }
2318
- ] : [],
2319
- ...options.map((option) => ({
2320
- value: option.value,
2321
- label: option.title
2322
- }))
2323
- ],
2324
- onChange: (value) => {
2325
- var _a;
2326
- if (value.selectedValue === "") {
2327
- options == null ? void 0 : options.filter((option) => option.selected).map((option) => option == null ? void 0 : option.onSelect());
2328
- return;
2329
- }
2330
- (_a = options == null ? void 0 : options.find((option) => value.selectedValue === option.value)) == null ? void 0 : _a.onSelect();
2331
- }
2332
- },
2333
- JSON.stringify(options)
2334
- );
2335
- };
2336
-
2337
- // ../renderers/src/CollectionRenderer/components/ItemComponent.tsx
2338
- var import_components18 = require("@transferwise/components");
2339
-
2340
- // ../renderers/src/utils/listItem/getAdditionalInfo.tsx
2341
- var import_components16 = require("@transferwise/components");
2342
- var import_jsx_runtime28 = require("react/jsx-runtime");
2343
- var getAdditionalInfo = (additionalInfo) => {
2344
- var _a, _b;
2345
- if (!additionalInfo) {
2346
- return void 0;
2347
- }
2348
- const { href, text, onClick } = additionalInfo;
2349
- if (href || onClick) {
2350
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2351
- import_components16.ListItem.AdditionalInfo,
2352
- {
2353
- action: __spreadValues({
2354
- label: text
2355
- }, (_b = (_a = additionalInfo.getAnchorProps) == null ? void 0 : _a.call(additionalInfo)) != null ? _b : { onClick })
2356
- }
2357
- );
2358
- }
2359
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_components16.ListItem.AdditionalInfo, { children: additionalInfo == null ? void 0 : additionalInfo.text });
2360
- };
2361
-
2362
- // ../renderers/src/utils/listItem/getCTAControl.tsx
2363
- var import_components17 = require("@transferwise/components");
2364
- var import_jsx_runtime29 = require("react/jsx-runtime");
2365
- var getCTAControl = (callToAction, { ctaSecondary, fullyInteractive }) => {
2366
- if (!callToAction) {
2367
- return void 0;
2368
- }
2369
- const { accessibilityDescription, title, context } = callToAction;
2370
- const { priority, sentiment } = getPriorityAndSentiment(ctaSecondary, context);
2371
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2372
- import_components17.ListItem.Button,
2373
- __spreadProps(__spreadValues({}, callToAction.getAnchorProps()), {
2374
- partiallyInteractive: !fullyInteractive,
2375
- priority,
2376
- "aria-description": accessibilityDescription,
2377
- sentiment,
2378
- children: title
2379
- })
2380
- );
2381
- };
2382
- var getPriorityAndSentiment = (ctaSecondary, context) => {
2383
- if (context === "negative") {
2384
- return { priority: "secondary", sentiment: "negative" };
2385
- }
2386
- return { priority: ctaSecondary ? "secondary" : "secondary-neutral", sentiment: "default" };
2387
- };
2388
-
2389
- // ../renderers/src/utils/listItem/shouldUseAvatar.ts
2390
- var shouldUseAvatar = (control, tags) => {
2391
- var _a;
2392
- return control === "with-avatar" || ((_a = tags == null ? void 0 : tags.includes("with-avatar")) != null ? _a : false);
2393
- };
2394
-
2395
- // ../renderers/src/CollectionRenderer/components/ItemComponent.tsx
2396
- var import_jsx_runtime30 = require("react/jsx-runtime");
2397
- var ItemComponent = (props) => {
2398
- var _a, _b;
2399
- const {
2400
- title,
1091
+ additionalText,
2401
1092
  description,
2402
- supportingValues,
2403
- media,
2404
- additionalInfo,
1093
+ disabled,
2405
1094
  inlineAlert,
2406
- href,
2407
- onClick,
2408
- callToAction,
2409
- tags,
2410
- parentTags,
2411
- control
1095
+ media,
1096
+ supportingValues,
1097
+ title,
1098
+ validationState,
1099
+ value,
1100
+ features,
1101
+ onChange
2412
1102
  } = props;
2413
- const controlOptions = {
2414
- ctaSecondary: (_a = tags == null ? void 0 : tags.includes("cta-secondary")) != null ? _a : false,
2415
- fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
2416
- };
2417
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2418
- import_components18.ListItem,
2419
- {
1103
+ const { ref } = useScrollToError(validationState, features);
1104
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { ref, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1105
+ import_components11.ListItem,
1106
+ __spreadValues({
2420
1107
  title,
2421
1108
  subtitle: description,
2422
- valueTitle: supportingValues == null ? void 0 : supportingValues.value,
2423
- valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
2424
- media: getMedia(media, shouldUseAvatar(control, parentTags)),
2425
- prompt: getInlineAlert(inlineAlert),
2426
- additionalInfo: getAdditionalInfo(additionalInfo),
2427
- control: onClick || href ? getNavigationControl(onClick, href) : getCTAControl(callToAction, controlOptions)
2428
- },
2429
- title
2430
- );
1109
+ additionalInfo: getAdditionalText(additionalText),
1110
+ media: getMedia(media, false),
1111
+ disabled,
1112
+ prompt: getInlineAlertOrValidation(validationState, inlineAlert),
1113
+ control: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components11.ListItem.Switch, { checked: value, onClick: () => onChange(!value) })
1114
+ }, getSupportingValues(supportingValues))
1115
+ ) });
2431
1116
  };
2432
- var getNavigationControl = (onClick, href) => {
2433
- if (href) {
2434
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_components18.ListItem.Navigation, { href });
2435
- }
2436
- if (onClick) {
2437
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_components18.ListItem.Navigation, { onClick });
1117
+ var getInlineAlertOrValidation = (validationState, inlineAlert) => {
1118
+ if ((validationState == null ? void 0 : validationState.status) === "invalid") {
1119
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components11.ListItem.Prompt, { sentiment: "negative", children: validationState.message });
2438
1120
  }
2439
- return null;
1121
+ return getInlineAlert(inlineAlert);
2440
1122
  };
1123
+ var CheckboxInputRenderer_default = CheckboxInputRenderer;
2441
1124
 
2442
- // ../renderers/src/CollectionRenderer/components/SectionHeaderComponent.tsx
2443
- var import_jsx_runtime31 = require("react/jsx-runtime");
2444
- var SectionHeaderComponent = ({
2445
- title,
2446
- callToAction
2447
- }) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Header, { title, callToAction });
1125
+ // ../renderers/src/ColumnsRenderer.tsx
1126
+ var import_classnames3 = __toESM(require_classnames());
2448
1127
 
2449
- // ../renderers/src/CollectionRenderer/createCollectionRenderer.tsx
2450
- var import_jsx_runtime32 = require("react/jsx-runtime");
2451
- var createCollectionRenderer = (canRender, components) => {
2452
- const componeontsWithDefaults = __spreadValues({
2453
- Search: SearchComponent,
2454
- Filters: FiltersComponent,
2455
- Filter: FilterComponent,
2456
- Item: ItemComponent,
2457
- SectionHeader: SectionHeaderComponent,
2458
- Results: ContentComponent
2459
- }, components);
2460
- return {
2461
- canRenderType: "collection",
2462
- canRender,
2463
- render: (props) => {
2464
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(CollectionRendererComponent, __spreadValues(__spreadValues({}, props), componeontsWithDefaults));
1128
+ // ../renderers/src/utils/useIsCollapsed.ts
1129
+ var import_react5 = require("react");
1130
+ var COLLAPSE_QUERY = "(max-width: 767.98px)";
1131
+ var supportsMatchMedia = () => typeof window !== "undefined" && !!window.matchMedia;
1132
+ var useIsCollapsed = () => {
1133
+ const [collapsed, setCollapsed] = (0, import_react5.useState)(
1134
+ () => supportsMatchMedia() && window.matchMedia(COLLAPSE_QUERY).matches
1135
+ );
1136
+ (0, import_react5.useEffect)(() => {
1137
+ if (supportsMatchMedia()) {
1138
+ const mql = window.matchMedia(COLLAPSE_QUERY);
1139
+ const update = () => setCollapsed(mql.matches);
1140
+ mql.addEventListener("change", update);
1141
+ return () => mql.removeEventListener("change", update);
2465
1142
  }
2466
- };
2467
- };
2468
-
2469
- // ../renderers/src/CollectionRenderer/CollectionRenderer.tsx
2470
- var import_jsx_runtime33 = require("react/jsx-runtime");
2471
- var CollectionRendererComponent = (props) => {
2472
- const { status, Search: Search4, Filters, Results } = props;
2473
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
2474
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Search4, __spreadValues({}, props)),
2475
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Filters, __spreadValues({}, props)),
2476
- status.type === "idle" || status.reason === "pagination" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Results, __spreadValues({}, props)) : void 0,
2477
- status.type === "error" && status.reason === "search" && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_components19.InlinePrompt, { width: "full", sentiment: "negative", children: [
2478
- "Something went wrong,\xA0",
2479
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components19.Link, { onClick: status.retry, children: "click here to retry" })
2480
- ] })
2481
- ] });
1143
+ return void 0;
1144
+ }, []);
1145
+ return collapsed;
2482
1146
  };
2483
- var CollectionRenderer = createCollectionRenderer(() => true, {
2484
- Search: (props) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SearchComponent, __spreadValues({}, props)),
2485
- Filters: (props) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(FiltersComponent, __spreadValues({}, props)),
2486
- Filter: (props) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(FilterComponent, __spreadValues({}, props)),
2487
- Item: (props) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ItemComponent, __spreadValues({}, props)),
2488
- SectionHeader: (props) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SectionHeaderComponent, __spreadValues({}, props)),
2489
- Results: (props) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ContentComponent, __spreadValues({}, props))
2490
- });
2491
- var CollectionRenderer_default = CollectionRenderer;
2492
1147
 
2493
1148
  // ../renderers/src/ColumnsRenderer.tsx
2494
- var import_classnames3 = __toESM(require_classnames());
2495
- var import_jsx_runtime34 = require("react/jsx-runtime");
1149
+ var import_jsx_runtime24 = require("react/jsx-runtime");
1150
+ var RIGHT_FIRST_STACKING = "right-first-stacking";
2496
1151
  var ColumnsRenderer = {
2497
1152
  canRenderType: "columns",
2498
- render: ({ bias, margin, startChildren, endChildren }) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
1153
+ render: ColumnsRendererComponent
1154
+ };
1155
+ function ColumnsRendererComponent({
1156
+ bias,
1157
+ margin,
1158
+ startChildren,
1159
+ endChildren,
1160
+ tags
1161
+ }) {
1162
+ var _a;
1163
+ const isCollapsed = useIsCollapsed();
1164
+ const reverse = isCollapsed && ((_a = tags == null ? void 0 : tags.includes(RIGHT_FIRST_STACKING)) != null ? _a : false);
1165
+ const startColumn = /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "df-columns-renderer-column", children: startChildren });
1166
+ const endColumn = /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "df-columns-renderer-column", children: endChildren });
1167
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
2499
1168
  "div",
2500
1169
  {
2501
1170
  className: (0, import_classnames3.default)("df-columns-renderer-container", getMargin(margin), {
@@ -2503,16 +1172,16 @@ var ColumnsRenderer = {
2503
1172
  "df-columns-renderer-bias-end": bias === "end"
2504
1173
  }),
2505
1174
  children: [
2506
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "df-columns-renderer-column", children: startChildren }),
2507
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "df-columns-renderer-column", children: endChildren })
1175
+ reverse ? endColumn : startColumn,
1176
+ reverse ? startColumn : endColumn
2508
1177
  ]
2509
1178
  }
2510
- )
2511
- };
1179
+ );
1180
+ }
2512
1181
  var ColumnsRenderer_default = ColumnsRenderer;
2513
1182
 
2514
1183
  // ../renderers/src/components/VariableDateInput.tsx
2515
- var import_components20 = require("@transferwise/components");
1184
+ var import_components12 = require("@transferwise/components");
2516
1185
 
2517
1186
  // ../renderers/src/validators/type-validators.ts
2518
1187
  var isNumber = (value) => typeof value === "number" && !Number.isNaN(value);
@@ -2539,7 +1208,7 @@ var dateToDateString = (date) => {
2539
1208
  };
2540
1209
 
2541
1210
  // ../renderers/src/components/VariableDateInput.tsx
2542
- var import_jsx_runtime35 = require("react/jsx-runtime");
1211
+ var import_jsx_runtime25 = require("react/jsx-runtime");
2543
1212
  function VariableDateInput({
2544
1213
  control,
2545
1214
  inputProps
@@ -2555,8 +1224,8 @@ function VariableDateInput({
2555
1224
  onFocus
2556
1225
  } = inputProps;
2557
1226
  if (control === "date-lookup") {
2558
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2559
- import_components20.DateLookup,
1227
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1228
+ import_components12.DateLookup,
2560
1229
  {
2561
1230
  value: dateStringToDateOrNull(inputProps.value),
2562
1231
  min: dateStringToDateOrNull(minimumDate),
@@ -2571,8 +1240,8 @@ function VariableDateInput({
2571
1240
  }
2572
1241
  );
2573
1242
  }
2574
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2575
- import_components20.DateInput,
1243
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1244
+ import_components12.DateInput,
2576
1245
  __spreadProps(__spreadValues({}, inputProps), {
2577
1246
  dayAutoComplete: getAutocompleteString(autoComplete, "day"),
2578
1247
  yearAutoComplete: getAutocompleteString(autoComplete, "year")
@@ -2588,7 +1257,7 @@ var getAutocompleteString = (value, suffix) => {
2588
1257
  var VariableDateInput_default = VariableDateInput;
2589
1258
 
2590
1259
  // ../renderers/src/DateInputRenderer.tsx
2591
- var import_jsx_runtime36 = require("react/jsx-runtime");
1260
+ var import_jsx_runtime26 = require("react/jsx-runtime");
2592
1261
  var DateInputRenderer = {
2593
1262
  canRenderType: "input-date",
2594
1263
  render: (props) => {
@@ -2613,7 +1282,7 @@ var DateInputRenderer = {
2613
1282
  ]);
2614
1283
  const value = initialValue != null ? initialValue : "";
2615
1284
  const inputProps = __spreadProps(__spreadValues({}, rest), { value, id });
2616
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
1285
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2617
1286
  FieldInput_default,
2618
1287
  {
2619
1288
  id,
@@ -2624,7 +1293,7 @@ var DateInputRenderer = {
2624
1293
  loadingState: props.fieldLoadingState,
2625
1294
  help,
2626
1295
  features: props.features,
2627
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(VariableDateInput_default, { control, inputProps })
1296
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(VariableDateInput_default, { control, inputProps })
2628
1297
  }
2629
1298
  );
2630
1299
  }
@@ -2632,16 +1301,44 @@ var DateInputRenderer = {
2632
1301
  var DateInputRenderer_default = DateInputRenderer;
2633
1302
 
2634
1303
  // ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
2635
- var import_components23 = require("@transferwise/components");
1304
+ var import_components16 = require("@transferwise/components");
1305
+
1306
+ // ../renderers/src/utils/listItem/getAdditionalInfo.tsx
1307
+ var import_components13 = require("@transferwise/components");
1308
+ var import_jsx_runtime27 = require("react/jsx-runtime");
1309
+ var getAdditionalInfo = (additionalInfo) => {
1310
+ var _a, _b;
1311
+ if (!additionalInfo) {
1312
+ return void 0;
1313
+ }
1314
+ const { href, text, onClick } = additionalInfo;
1315
+ if (href || onClick) {
1316
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1317
+ import_components13.ListItem.AdditionalInfo,
1318
+ {
1319
+ action: __spreadValues({
1320
+ label: text
1321
+ }, (_b = (_a = additionalInfo.getAnchorProps) == null ? void 0 : _a.call(additionalInfo)) != null ? _b : { onClick })
1322
+ }
1323
+ );
1324
+ }
1325
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_components13.ListItem.AdditionalInfo, { children: additionalInfo == null ? void 0 : additionalInfo.text });
1326
+ };
1327
+
1328
+ // ../renderers/src/utils/listItem/shouldUseAvatar.ts
1329
+ var shouldUseAvatar = (control, tags) => {
1330
+ var _a;
1331
+ return control === "with-avatar" || ((_a = tags == null ? void 0 : tags.includes("with-avatar")) != null ? _a : false);
1332
+ };
2636
1333
 
2637
1334
  // ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
2638
- var import_components22 = require("@transferwise/components");
2639
- var import_react7 = require("react");
2640
- var import_react_intl10 = require("react-intl");
1335
+ var import_components15 = require("@transferwise/components");
1336
+ var import_react6 = require("react");
1337
+ var import_react_intl8 = require("react-intl");
2641
1338
 
2642
1339
  // ../renderers/src/messages/filter.messages.ts
2643
- var import_react_intl7 = require("react-intl");
2644
- var filter_messages_default = (0, import_react_intl7.defineMessages)({
1340
+ var import_react_intl5 = require("react-intl");
1341
+ var filter_messages_default = (0, import_react_intl5.defineMessages)({
2645
1342
  placeholder: {
2646
1343
  id: "df.wise.filter.placeholder",
2647
1344
  defaultMessage: "Start typing to search",
@@ -2707,12 +1404,12 @@ function filterAndSortDecisionOptions(selectOptions, query) {
2707
1404
  var normalizeAndRemoveAccents = (text) => text.trim().toLowerCase().normalize("NFKD").replace(new RegExp("\\p{Diacritic}", "gu"), "");
2708
1405
 
2709
1406
  // ../renderers/src/DecisionRenderer/GroupedDecisionList.tsx
2710
- var import_components21 = require("@transferwise/components");
2711
- var import_react_intl9 = require("react-intl");
1407
+ var import_components14 = require("@transferwise/components");
1408
+ var import_react_intl7 = require("react-intl");
2712
1409
 
2713
1410
  // ../renderers/src/messages/group.messages.ts
2714
- var import_react_intl8 = require("react-intl");
2715
- var group_messages_default = (0, import_react_intl8.defineMessages)({
1411
+ var import_react_intl6 = require("react-intl");
1412
+ var group_messages_default = (0, import_react_intl6.defineMessages)({
2716
1413
  all: {
2717
1414
  id: "df.wise.group.all",
2718
1415
  defaultMessage: "All",
@@ -2746,19 +1443,19 @@ var getGroupsFromTags = (knownTags, items) => {
2746
1443
  };
2747
1444
 
2748
1445
  // ../renderers/src/DecisionRenderer/GroupedDecisionList.tsx
2749
- var import_jsx_runtime37 = require("react/jsx-runtime");
1446
+ var import_jsx_runtime28 = require("react/jsx-runtime");
2750
1447
  var groupingTags = Object.keys(group_messages_default).filter((key) => key !== "all");
2751
1448
  var isGroupedDecision = (options) => {
2752
1449
  return getGroupsFromTags(groupingTags, options).length > 0;
2753
1450
  };
2754
1451
  var GroupedDecisionList = (_a) => {
2755
1452
  var _b = _a, { renderDecisionList: renderDecisionList2 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
2756
- const { formatMessage } = (0, import_react_intl9.useIntl)();
1453
+ const { formatMessage } = (0, import_react_intl7.useIntl)();
2757
1454
  const { options } = rest;
2758
1455
  const itemsByTag = [...getGroupsFromTags(groupingTags, options), { tag: "all", items: options }];
2759
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_jsx_runtime37.Fragment, { children: itemsByTag.map(({ tag, items }) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_components21.Section, { children: [
2760
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2761
- import_components21.Header,
1456
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_jsx_runtime28.Fragment, { children: itemsByTag.map(({ tag, items }) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_components14.Section, { children: [
1457
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1458
+ import_components14.Header,
2762
1459
  {
2763
1460
  as: "h2",
2764
1461
  title: tag in group_messages_default ? formatMessage(group_messages_default[tag]) : tag
@@ -2769,26 +1466,26 @@ var GroupedDecisionList = (_a) => {
2769
1466
  };
2770
1467
 
2771
1468
  // ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
2772
- var import_jsx_runtime38 = require("react/jsx-runtime");
1469
+ var import_jsx_runtime29 = require("react/jsx-runtime");
2773
1470
  var DecisionWrapper = (props) => {
2774
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: getMargin(props.margin), children: [
2775
- props.title && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_components22.Header, { as: "h2", title: props.title }),
2776
- props.control === "filtered" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(FilteredDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(UnfilteredDecisionList, __spreadValues({}, props))
1471
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: getMargin(props.margin), children: [
1472
+ props.title && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_components15.Header, { as: "h2", title: props.title }),
1473
+ props.control === "filtered" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(FilteredDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(UnfilteredDecisionList, __spreadValues({}, props))
2777
1474
  ] });
2778
1475
  };
2779
1476
  var UnfilteredDecisionList = (_a) => {
2780
1477
  var _b = _a, { renderDecisionList: renderDecisionList2 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
2781
- return isGroupedDecision(rest.options) ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(GroupedDecisionList, __spreadProps(__spreadValues({}, rest), { renderDecisionList: renderDecisionList2 })) : renderDecisionList2(rest);
1478
+ return isGroupedDecision(rest.options) ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(GroupedDecisionList, __spreadProps(__spreadValues({}, rest), { renderDecisionList: renderDecisionList2 })) : renderDecisionList2(rest);
2782
1479
  };
2783
1480
  var FilteredDecisionList = (props) => {
2784
- const { formatMessage } = (0, import_react_intl10.useIntl)();
2785
- const [query, setQuery] = (0, import_react7.useState)("");
1481
+ const { formatMessage } = (0, import_react_intl8.useIntl)();
1482
+ const [query, setQuery] = (0, import_react6.useState)("");
2786
1483
  const { control, options, renderDecisionList: renderDecisionList2 } = props;
2787
1484
  const filteredOptions = (query == null ? void 0 : query.length) > 0 ? filterAndSortDecisionOptions(options, query) : options;
2788
1485
  const isGrouped = isGroupedDecision(options);
2789
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
2790
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2791
- import_components22.SearchInput,
1486
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
1487
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1488
+ import_components15.SearchInput,
2792
1489
  {
2793
1490
  placeholder: formatMessage(filter_messages_default.placeholder),
2794
1491
  value: query,
@@ -2799,25 +1496,25 @@ var FilteredDecisionList = (props) => {
2799
1496
  }
2800
1497
  }
2801
1498
  ),
2802
- isGrouped && query.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(GroupedDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
2803
- query.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_components22.Header, { as: "h2", title: formatMessage(filter_messages_default.results), className: "m-t-4" }),
1499
+ isGrouped && query.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(GroupedDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
1500
+ query.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_components15.Header, { as: "h2", title: formatMessage(filter_messages_default.results), className: "m-t-4" }),
2804
1501
  filteredOptions.length > 0 ? renderDecisionList2({
2805
1502
  control,
2806
1503
  className: query.length === 0 ? "m-t-3" : "",
2807
1504
  options: filteredOptions
2808
- }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { children: formatMessage(filter_messages_default.noResults) })
1505
+ }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { children: formatMessage(filter_messages_default.noResults) })
2809
1506
  ] })
2810
1507
  ] });
2811
1508
  };
2812
1509
 
2813
1510
  // ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
2814
- var import_jsx_runtime39 = require("react/jsx-runtime");
1511
+ var import_jsx_runtime30 = require("react/jsx-runtime");
2815
1512
  var DecisionRenderer = {
2816
1513
  canRenderType: "decision",
2817
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList }))
1514
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList }))
2818
1515
  };
2819
1516
  var renderDecisionList = ({ options, control }) => {
2820
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_jsx_runtime39.Fragment, { children: options.map((_a) => {
1517
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_jsx_runtime30.Fragment, { children: options.map((_a) => {
2821
1518
  var _b = _a, { onClick } = _b, rest = __objRest(_b, ["onClick"]);
2822
1519
  const {
2823
1520
  description,
@@ -2830,8 +1527,8 @@ var renderDecisionList = ({ options, control }) => {
2830
1527
  supportingValues,
2831
1528
  tags
2832
1529
  } = rest;
2833
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2834
- import_components23.ListItem,
1530
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1531
+ import_components16.ListItem,
2835
1532
  {
2836
1533
  title: itemTitle,
2837
1534
  subtitle: description,
@@ -2842,7 +1539,7 @@ var renderDecisionList = ({ options, control }) => {
2842
1539
  media: getMedia(media, shouldUseAvatar(control, tags)),
2843
1540
  prompt: getInlineAlert(inlineAlert),
2844
1541
  additionalInfo: additionalText ? getAdditionalInfo({ text: additionalText }) : void 0,
2845
- control: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_components23.ListItem.Navigation, __spreadValues({}, getAnchorProps()))
1542
+ control: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_components16.ListItem.Navigation, __spreadValues({}, getAnchorProps()))
2846
1543
  },
2847
1544
  JSON.stringify(rest)
2848
1545
  );
@@ -2851,8 +1548,8 @@ var renderDecisionList = ({ options, control }) => {
2851
1548
  var DecisionRenderer_default = DecisionRenderer;
2852
1549
 
2853
1550
  // ../renderers/src/DividerRenderer.tsx
2854
- var import_components24 = require("@transferwise/components");
2855
- var import_jsx_runtime40 = require("react/jsx-runtime");
1551
+ var import_components17 = require("@transferwise/components");
1552
+ var import_jsx_runtime31 = require("react/jsx-runtime");
2856
1553
  var mapControlToLevel = (control) => {
2857
1554
  switch (control) {
2858
1555
  case "section":
@@ -2865,16 +1562,16 @@ var mapControlToLevel = (control) => {
2865
1562
  };
2866
1563
  var DividerRenderer = {
2867
1564
  canRenderType: "divider",
2868
- render: ({ margin, control }) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_components24.Divider, { className: `m-t-0 d-block ${getMargin(margin)}`, level: mapControlToLevel(control) })
1565
+ render: ({ margin, control }) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components17.Divider, { className: `m-t-0 d-block ${getMargin(margin)}`, level: mapControlToLevel(control) })
2869
1566
  };
2870
1567
  var DividerRenderer_default = DividerRenderer;
2871
1568
 
2872
1569
  // ../renderers/src/ExternalConfirmationRenderer.tsx
2873
- var import_components25 = require("@transferwise/components");
1570
+ var import_components18 = require("@transferwise/components");
2874
1571
 
2875
1572
  // ../renderers/src/messages/external-confirmation.messages.ts
2876
- var import_react_intl11 = require("react-intl");
2877
- var external_confirmation_messages_default = (0, import_react_intl11.defineMessages)({
1573
+ var import_react_intl9 = require("react-intl");
1574
+ var external_confirmation_messages_default = (0, import_react_intl9.defineMessages)({
2878
1575
  title: {
2879
1576
  id: "df.wise.ExternalConfirmation.title",
2880
1577
  defaultMessage: "Please confirm",
@@ -2898,9 +1595,9 @@ var external_confirmation_messages_default = (0, import_react_intl11.defineMessa
2898
1595
  });
2899
1596
 
2900
1597
  // ../renderers/src/ExternalConfirmationRenderer.tsx
2901
- var import_react_intl12 = require("react-intl");
2902
- var import_react8 = require("react");
2903
- var import_jsx_runtime41 = require("react/jsx-runtime");
1598
+ var import_react_intl10 = require("react-intl");
1599
+ var import_react7 = require("react");
1600
+ var import_jsx_runtime32 = require("react/jsx-runtime");
2904
1601
  var ExternalConfirmationRenderer = {
2905
1602
  canRenderType: "external-confirmation",
2906
1603
  render: ExternalConfirmationRendererComponent
@@ -2911,20 +1608,20 @@ function ExternalConfirmationRendererComponent({
2911
1608
  open,
2912
1609
  onCancel
2913
1610
  }) {
2914
- const { formatMessage } = (0, import_react_intl12.useIntl)();
2915
- (0, import_react8.useEffect)(() => {
1611
+ const { formatMessage } = (0, import_react_intl10.useIntl)();
1612
+ (0, import_react7.useEffect)(() => {
2916
1613
  open();
2917
1614
  }, []);
2918
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2919
- import_components25.Modal,
1615
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
1616
+ import_components18.Modal,
2920
1617
  {
2921
1618
  open: visible,
2922
1619
  title: formatMessage(external_confirmation_messages_default.title),
2923
- body: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
2924
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components25.Markdown, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
2925
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
2926
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2927
- import_components25.Button,
1620
+ body: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
1621
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_components18.Markdown, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
1622
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
1623
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
1624
+ import_components18.Button,
2928
1625
  {
2929
1626
  v2: true,
2930
1627
  block: true,
@@ -2937,7 +1634,7 @@ function ExternalConfirmationRendererComponent({
2937
1634
  children: formatMessage(external_confirmation_messages_default.open)
2938
1635
  }
2939
1636
  ),
2940
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components25.Button, { v2: true, block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
1637
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_components18.Button, { v2: true, block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
2941
1638
  ] }) })
2942
1639
  ] }),
2943
1640
  onClose: onCancel
@@ -2954,46 +1651,46 @@ function getOrigin(url) {
2954
1651
  var ExternalConfirmationRenderer_default = ExternalConfirmationRenderer;
2955
1652
 
2956
1653
  // ../renderers/src/FormRenderer.tsx
2957
- var import_jsx_runtime42 = require("react/jsx-runtime");
1654
+ var import_jsx_runtime33 = require("react/jsx-runtime");
2958
1655
  var FormRenderer = {
2959
1656
  canRenderType: "form",
2960
- render: ({ children, margin }) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: getMargin(margin), children })
1657
+ render: ({ children, margin }) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: getMargin(margin), children })
2961
1658
  };
2962
1659
  var FormRenderer_default = FormRenderer;
2963
1660
 
2964
1661
  // ../renderers/src/FormSectionRenderer.tsx
2965
- var import_components26 = require("@transferwise/components");
2966
- var import_jsx_runtime43 = require("react/jsx-runtime");
1662
+ var import_components19 = require("@transferwise/components");
1663
+ var import_jsx_runtime34 = require("react/jsx-runtime");
2967
1664
  var FormSectionRenderer = {
2968
1665
  canRenderType: "form-section",
2969
- render: ({ title, description, children }) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("fieldset", { children: [
2970
- title && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2971
- import_components26.Header,
1666
+ render: ({ title, description, children }) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("fieldset", { children: [
1667
+ title && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1668
+ import_components19.Header,
2972
1669
  {
2973
1670
  as: "h2",
2974
1671
  title
2975
1672
  }
2976
1673
  ),
2977
- description && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { children: description }),
1674
+ description && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { children: description }),
2978
1675
  children
2979
1676
  ] })
2980
1677
  };
2981
1678
  var FormSectionRenderer_default = FormSectionRenderer;
2982
1679
 
2983
1680
  // ../renderers/src/HeadingRenderer.tsx
2984
- var import_components27 = require("@transferwise/components");
2985
- var import_jsx_runtime44 = require("react/jsx-runtime");
1681
+ var import_components20 = require("@transferwise/components");
1682
+ var import_jsx_runtime35 = require("react/jsx-runtime");
2986
1683
  var HeadingRenderer = {
2987
1684
  canRenderType: "heading",
2988
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Heading, __spreadValues({}, props))
1685
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Heading, __spreadValues({}, props))
2989
1686
  };
2990
1687
  function Heading(props) {
2991
1688
  const { text, size, align, margin, control } = props;
2992
1689
  const className = getTextAlignmentAndMargin({ align, margin });
2993
- return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DisplayHeading, { size, text, className }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(StandardHeading, { size, text, className });
1690
+ return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DisplayHeading, { size, text, className }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(StandardHeading, { size, text, className });
2994
1691
  }
2995
1692
  function DisplayHeading({ size, text, className }) {
2996
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_components27.Display, { type: getDisplayType(size), className, children: text });
1693
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_components20.Display, { type: getDisplayType(size), className, children: text });
2997
1694
  }
2998
1695
  var getDisplayType = (size) => {
2999
1696
  switch (size) {
@@ -3009,7 +1706,7 @@ var getDisplayType = (size) => {
3009
1706
  }
3010
1707
  };
3011
1708
  function StandardHeading({ size, text, className }) {
3012
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_components27.Title, { type: getTitleTypeBySize(size), className, children: text });
1709
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_components20.Title, { type: getTitleTypeBySize(size), className, children: text });
3013
1710
  }
3014
1711
  var getTitleTypeBySize = (size) => {
3015
1712
  var _a;
@@ -3025,8 +1722,8 @@ var getTitleTypeBySize = (size) => {
3025
1722
  var HeadingRenderer_default = HeadingRenderer;
3026
1723
 
3027
1724
  // ../renderers/src/ImageRenderer/UrlImage.tsx
3028
- var import_components28 = require("@transferwise/components");
3029
- var import_react9 = require("react");
1725
+ var import_components21 = require("@transferwise/components");
1726
+ var import_react8 = require("react");
3030
1727
 
3031
1728
  // ../renderers/src/utils/api-utils.ts
3032
1729
  function isRelativePath(url = "") {
@@ -3036,7 +1733,7 @@ function isRelativePath(url = "") {
3036
1733
  }
3037
1734
 
3038
1735
  // ../renderers/src/ImageRenderer/UrlImage.tsx
3039
- var import_jsx_runtime45 = require("react/jsx-runtime");
1736
+ var import_jsx_runtime36 = require("react/jsx-runtime");
3040
1737
  function UrlImage({
3041
1738
  accessibilityDescription,
3042
1739
  align,
@@ -3045,14 +1742,14 @@ function UrlImage({
3045
1742
  uri,
3046
1743
  httpClient
3047
1744
  }) {
3048
- const [imageSource, setImageSource] = (0, import_react9.useState)("");
3049
- (0, import_react9.useEffect)(() => {
1745
+ const [imageSource, setImageSource] = (0, import_react8.useState)("");
1746
+ (0, import_react8.useEffect)(() => {
3050
1747
  if (!uri.startsWith("urn:")) {
3051
1748
  void getImageSource(httpClient, uri).then(setImageSource);
3052
1749
  }
3053
1750
  }, [uri, httpClient]);
3054
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: `df-image ${align} ${size || "md"} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3055
- import_components28.Image,
1751
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: `df-image ${align} ${size || "md"} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
1752
+ import_components21.Image,
3056
1753
  {
3057
1754
  className: "df-reserve-space",
3058
1755
  alt: accessibilityDescription != null ? accessibilityDescription : "",
@@ -3095,7 +1792,7 @@ var getImageSource = async (httpClient, imageUrl) => {
3095
1792
  };
3096
1793
 
3097
1794
  // ../renderers/src/ImageRenderer/UrnFlagImage.tsx
3098
- var import_jsx_runtime46 = require("react/jsx-runtime");
1795
+ var import_jsx_runtime37 = require("react/jsx-runtime");
3099
1796
  var maxFlagSize = 600;
3100
1797
  function UrnFlagImage({
3101
1798
  accessibilityDescription,
@@ -3104,24 +1801,24 @@ function UrnFlagImage({
3104
1801
  size,
3105
1802
  uri
3106
1803
  }) {
3107
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: `df-image ${align} ${size || "md"} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(UrnFlag, { size: maxFlagSize, urn: uri, accessibilityDescription }) });
1804
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: `df-image ${align} ${size || "md"} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(UrnFlag, { size: maxFlagSize, urn: uri, accessibilityDescription }) });
3108
1805
  }
3109
1806
 
3110
1807
  // ../renderers/src/ImageRenderer/UrnIllustration.tsx
3111
1808
  var import_art4 = require("@wise/art");
3112
- var import_react11 = require("react");
1809
+ var import_react10 = require("react");
3113
1810
 
3114
1811
  // ../renderers/src/ImageRenderer/isAnimated.ts
3115
1812
  var isAnimated = (uri) => {
3116
1813
  const { rComponents } = stringToURN(uri);
3117
- return rComponents["type"] === "animated";
1814
+ return rComponents.type === "animated";
3118
1815
  };
3119
1816
 
3120
1817
  // ../renderers/src/ImageRenderer/SafeIllustration3D.tsx
3121
1818
  var import_art3 = require("@wise/art");
3122
- var import_react10 = require("react");
3123
- var import_jsx_runtime47 = require("react/jsx-runtime");
3124
- var Illustration3DErrorBoundary = class extends import_react10.Component {
1819
+ var import_react9 = require("react");
1820
+ var import_jsx_runtime38 = require("react/jsx-runtime");
1821
+ var Illustration3DErrorBoundary = class extends import_react9.Component {
3125
1822
  constructor(props) {
3126
1823
  super(props);
3127
1824
  this.state = { hasError: false };
@@ -3132,7 +1829,7 @@ var Illustration3DErrorBoundary = class extends import_react10.Component {
3132
1829
  componentDidCatch() {
3133
1830
  this.props.onError();
3134
1831
  }
3135
- render() {
1832
+ async render() {
3136
1833
  if (this.state.hasError) {
3137
1834
  return null;
3138
1835
  }
@@ -3144,12 +1841,12 @@ var SafeIllustration3D = ({
3144
1841
  size,
3145
1842
  onError
3146
1843
  }) => {
3147
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Illustration3DErrorBoundary, { onError, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_art3.Illustration3D, { name, size }) });
1844
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Illustration3DErrorBoundary, { onError, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_art3.Illustration3D, { name, size }) });
3148
1845
  };
3149
1846
  var SafeIllustration3D_default = SafeIllustration3D;
3150
1847
 
3151
1848
  // ../renderers/src/ImageRenderer/UrnIllustration.tsx
3152
- var import_jsx_runtime48 = require("react/jsx-runtime");
1849
+ var import_jsx_runtime39 = require("react/jsx-runtime");
3153
1850
  var urnPrefix = "urn:wise:illustrations:";
3154
1851
  var isUrnIllustration = (uri) => uri.startsWith(urnPrefix);
3155
1852
  function UrnIllustration({
@@ -3159,12 +1856,12 @@ function UrnIllustration({
3159
1856
  size,
3160
1857
  uri
3161
1858
  }) {
3162
- const [has3DFailed, setHas3DFailed] = (0, import_react11.useState)(false);
1859
+ const [has3DFailed, setHas3DFailed] = (0, import_react10.useState)(false);
3163
1860
  const illustrationSize = getIllustrationSize(size);
3164
1861
  const illustrationName = getIllustrationName(uri);
3165
1862
  const illustration3DName = getIllustration3DName(uri);
3166
1863
  if (illustration3DName && isAnimated(uri) && !has3DFailed) {
3167
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
1864
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3168
1865
  SafeIllustration3D_default,
3169
1866
  {
3170
1867
  name: illustration3DName,
@@ -3173,7 +1870,7 @@ function UrnIllustration({
3173
1870
  }
3174
1871
  ) });
3175
1872
  }
3176
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
1873
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3177
1874
  import_art4.Illustration,
3178
1875
  {
3179
1876
  className: "df-illustration",
@@ -3193,32 +1890,32 @@ var getIllustration3DName = (uri) => {
3193
1890
  };
3194
1891
 
3195
1892
  // ../renderers/src/ImageRenderer/UrnImage.tsx
3196
- var import_jsx_runtime49 = require("react/jsx-runtime");
1893
+ var import_jsx_runtime40 = require("react/jsx-runtime");
3197
1894
  var isUrnImage = (uri) => uri.startsWith("urn:");
3198
1895
  function UrnImage(props) {
3199
1896
  const { uri } = props;
3200
1897
  if (isUrnIllustration(uri)) {
3201
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(UrnIllustration, __spreadValues({}, props));
1898
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(UrnIllustration, __spreadValues({}, props));
3202
1899
  }
3203
1900
  if (isUrnFlag(uri)) {
3204
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(UrnFlagImage, __spreadValues({}, props));
1901
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(UrnFlagImage, __spreadValues({}, props));
3205
1902
  }
3206
1903
  return null;
3207
1904
  }
3208
1905
 
3209
1906
  // ../renderers/src/ImageRenderer/ImageRenderer.tsx
3210
- var import_jsx_runtime50 = require("react/jsx-runtime");
1907
+ var import_jsx_runtime41 = require("react/jsx-runtime");
3211
1908
  var ImageRenderer = {
3212
1909
  canRenderType: "image",
3213
- render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(UrnImage, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(UrlImage, __spreadValues({}, props))
1910
+ render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(UrnImage, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(UrlImage, __spreadValues({}, props))
3214
1911
  };
3215
1912
 
3216
1913
  // ../renderers/src/ImageRenderer/index.tsx
3217
1914
  var ImageRenderer_default = ImageRenderer;
3218
1915
 
3219
1916
  // ../renderers/src/InstructionsRenderer.tsx
3220
- var import_components29 = require("@transferwise/components");
3221
- var import_jsx_runtime51 = require("react/jsx-runtime");
1917
+ var import_components22 = require("@transferwise/components");
1918
+ var import_jsx_runtime42 = require("react/jsx-runtime");
3222
1919
  var doContext = ["positive", "neutral"];
3223
1920
  var dontContext = ["warning", "negative"];
3224
1921
  var InstructionsRenderer = {
@@ -3226,16 +1923,16 @@ var InstructionsRenderer = {
3226
1923
  render: ({ items, margin, title }) => {
3227
1924
  const dos = items.filter((item) => doContext.includes(item.context)).map(({ text }) => text);
3228
1925
  const donts = items.filter((item) => dontContext.includes(item.context)).map(({ text }) => text);
3229
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: getMargin(margin), children: [
3230
- title ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components29.Header, { title }) : null,
3231
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components29.InstructionsList, { dos, donts })
1926
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: getMargin(margin), children: [
1927
+ title ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components22.Header, { title }) : null,
1928
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components22.InstructionsList, { dos, donts })
3232
1929
  ] });
3233
1930
  }
3234
1931
  };
3235
1932
  var InstructionsRenderer_default = InstructionsRenderer;
3236
1933
 
3237
1934
  // ../renderers/src/IntegerInputRenderer.tsx
3238
- var import_components30 = require("@transferwise/components");
1935
+ var import_components23 = require("@transferwise/components");
3239
1936
 
3240
1937
  // ../renderers/src/utils/input-utils.ts
3241
1938
  var onWheel = (event) => {
@@ -3260,7 +1957,7 @@ function pick(obj, ...keys) {
3260
1957
  }
3261
1958
 
3262
1959
  // ../renderers/src/IntegerInputRenderer.tsx
3263
- var import_jsx_runtime52 = require("react/jsx-runtime");
1960
+ var import_jsx_runtime43 = require("react/jsx-runtime");
3264
1961
  var IntegerInputRenderer = {
3265
1962
  canRenderType: "input-integer",
3266
1963
  render: (props) => {
@@ -3275,7 +1972,7 @@ var IntegerInputRenderer = {
3275
1972
  "maximum",
3276
1973
  "minimum"
3277
1974
  );
3278
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
1975
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3279
1976
  FieldInput_default,
3280
1977
  {
3281
1978
  id,
@@ -3286,8 +1983,8 @@ var IntegerInputRenderer = {
3286
1983
  loadingState: props.fieldLoadingState,
3287
1984
  help,
3288
1985
  features: props.features,
3289
- children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components30.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
3290
- import_components30.Input,
1986
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components23.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
1987
+ import_components23.Input,
3291
1988
  __spreadValues({
3292
1989
  id,
3293
1990
  name: id,
@@ -3309,12 +2006,39 @@ var IntegerInputRenderer = {
3309
2006
  var IntegerInputRenderer_default = IntegerInputRenderer;
3310
2007
 
3311
2008
  // ../renderers/src/ListRenderer.tsx
3312
- var import_components32 = require("@transferwise/components");
2009
+ var import_components26 = require("@transferwise/components");
2010
+
2011
+ // ../renderers/src/utils/listItem/getCTAControl.tsx
2012
+ var import_components24 = require("@transferwise/components");
2013
+ var import_jsx_runtime44 = require("react/jsx-runtime");
2014
+ var getCTAControl = (callToAction, { ctaSecondary, fullyInteractive }) => {
2015
+ if (!callToAction) {
2016
+ return void 0;
2017
+ }
2018
+ const { accessibilityDescription, title, context } = callToAction;
2019
+ const { priority, sentiment } = getPriorityAndSentiment(ctaSecondary, context);
2020
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
2021
+ import_components24.ListItem.Button,
2022
+ __spreadProps(__spreadValues({}, callToAction.getAnchorProps()), {
2023
+ partiallyInteractive: !fullyInteractive,
2024
+ priority,
2025
+ "aria-description": accessibilityDescription,
2026
+ sentiment,
2027
+ children: title
2028
+ })
2029
+ );
2030
+ };
2031
+ var getPriorityAndSentiment = (ctaSecondary, context) => {
2032
+ if (context === "negative") {
2033
+ return { priority: "secondary", sentiment: "negative" };
2034
+ }
2035
+ return { priority: ctaSecondary ? "secondary" : "secondary-neutral", sentiment: "default" };
2036
+ };
3313
2037
 
3314
2038
  // ../renderers/src/components/Header.tsx
3315
- var import_components31 = require("@transferwise/components");
3316
- var import_jsx_runtime53 = require("react/jsx-runtime");
3317
- var Header = ({ title, callToAction }) => (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components31.Header, { title: title != null ? title : "", action: getHeaderAction(callToAction) });
2039
+ var import_components25 = require("@transferwise/components");
2040
+ var import_jsx_runtime45 = require("react/jsx-runtime");
2041
+ var Header5 = ({ title, callToAction }) => (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_components25.Header, { title: title != null ? title : "", action: getHeaderAction(callToAction) });
3318
2042
  var getHeaderAction = (callToAction) => {
3319
2043
  if (!callToAction) {
3320
2044
  return void 0;
@@ -3326,11 +2050,11 @@ var getHeaderAction = (callToAction) => {
3326
2050
  };
3327
2051
 
3328
2052
  // ../renderers/src/ListRenderer.tsx
3329
- var import_jsx_runtime54 = require("react/jsx-runtime");
2053
+ var import_jsx_runtime46 = require("react/jsx-runtime");
3330
2054
  var ListRenderer = {
3331
2055
  canRenderType: "list",
3332
- render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: getMargin(margin), children: [
3333
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Header, { title, callToAction }),
2056
+ render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: getMargin(margin), children: [
2057
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Header5, { title, callToAction }),
3334
2058
  items.map((item) => {
3335
2059
  var _a, _b;
3336
2060
  const {
@@ -3347,8 +2071,8 @@ var ListRenderer = {
3347
2071
  ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
3348
2072
  fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
3349
2073
  };
3350
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
3351
- import_components32.ListItem,
2074
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
2075
+ import_components26.ListItem,
3352
2076
  {
3353
2077
  title: itemTitle,
3354
2078
  subtitle: description,
@@ -3367,12 +2091,12 @@ var ListRenderer = {
3367
2091
  var ListRenderer_default = ListRenderer;
3368
2092
 
3369
2093
  // ../renderers/src/LoadingIndicatorRenderer.tsx
3370
- var import_components33 = require("@transferwise/components");
3371
- var import_jsx_runtime55 = require("react/jsx-runtime");
2094
+ var import_components27 = require("@transferwise/components");
2095
+ var import_jsx_runtime47 = require("react/jsx-runtime");
3372
2096
  var LoadingIndicatorRenderer = {
3373
2097
  canRenderType: "loading-indicator",
3374
- render: ({ margin, size }) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
3375
- import_components33.Loader,
2098
+ render: ({ margin, size }) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
2099
+ import_components27.Loader,
3376
2100
  {
3377
2101
  size,
3378
2102
  classNames: { "tw-loader": `tw-loader m-x-auto ${getMargin(margin)}` },
@@ -3383,13 +2107,13 @@ var LoadingIndicatorRenderer = {
3383
2107
  var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
3384
2108
 
3385
2109
  // ../renderers/src/MarkdownRenderer.tsx
3386
- var import_components34 = require("@transferwise/components");
2110
+ var import_components28 = require("@transferwise/components");
3387
2111
  var import_classnames4 = __toESM(require_classnames());
3388
- var import_jsx_runtime56 = require("react/jsx-runtime");
2112
+ var import_jsx_runtime48 = require("react/jsx-runtime");
3389
2113
  var MarkdownRenderer = {
3390
2114
  canRenderType: "markdown",
3391
- render: ({ content, align, margin, size }) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
3392
- import_components34.Markdown,
2115
+ render: ({ content, align, margin, size }) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
2116
+ import_components28.Markdown,
3393
2117
  {
3394
2118
  className: (0, import_classnames4.default)(
3395
2119
  "df-markdown",
@@ -3403,16 +2127,16 @@ var MarkdownRenderer = {
3403
2127
  var MarkdownRenderer_default = MarkdownRenderer;
3404
2128
 
3405
2129
  // ../renderers/src/MediaRenderer.tsx
3406
- var import_jsx_runtime57 = require("react/jsx-runtime");
2130
+ var import_jsx_runtime49 = require("react/jsx-runtime");
3407
2131
  var MediaRenderer = {
3408
2132
  canRenderType: "media",
3409
2133
  render: (_a) => {
3410
2134
  var _b = _a, { media } = _b, rest = __objRest(_b, ["media"]);
3411
2135
  switch (media.type) {
3412
2136
  case "avatar":
3413
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(AvatarMediaRendererComponent, __spreadValues({ media }, rest));
2137
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(AvatarMediaRendererComponent, __spreadValues({ media }, rest));
3414
2138
  case "image":
3415
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ImageMediaRendererComponent, __spreadValues({ media }, rest));
2139
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ImageMediaRendererComponent, __spreadValues({ media }, rest));
3416
2140
  case "legacy":
3417
2141
  return null;
3418
2142
  }
@@ -3424,7 +2148,7 @@ var AvatarMediaRendererComponent = ({
3424
2148
  margin,
3425
2149
  size
3426
2150
  }) => {
3427
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: `df-media-layout-avatar ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Media, { media, size: mapAvatarMediaSize(size) }) });
2151
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: `df-media-layout-avatar ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Media, { media, size: mapAvatarMediaSize(size) }) });
3428
2152
  };
3429
2153
  var ImageMediaRendererComponent = (_a) => {
3430
2154
  var _b = _a, {
@@ -3432,7 +2156,7 @@ var ImageMediaRendererComponent = (_a) => {
3432
2156
  } = _b, rest = __objRest(_b, [
3433
2157
  "media"
3434
2158
  ]);
3435
- return isUrnImage(media.uri) ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(UrnImage, __spreadValues({ uri: media.uri, accessibilityDescription: media.accessibilityDescription }, rest)) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(UrlImage, __spreadValues({ uri: media.uri, accessibilityDescription: media.accessibilityDescription }, rest));
2159
+ return isUrnImage(media.uri) ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(UrnImage, __spreadValues({ uri: media.uri, accessibilityDescription: media.accessibilityDescription }, rest)) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(UrlImage, __spreadValues({ uri: media.uri, accessibilityDescription: media.accessibilityDescription }, rest));
3436
2160
  };
3437
2161
  var mapAvatarMediaSize = (size) => {
3438
2162
  switch (size) {
@@ -3450,21 +2174,21 @@ var mapAvatarMediaSize = (size) => {
3450
2174
  };
3451
2175
 
3452
2176
  // ../renderers/src/ModalLayoutRenderer.tsx
3453
- var import_components35 = require("@transferwise/components");
3454
- var import_react12 = require("react");
3455
- var import_jsx_runtime58 = require("react/jsx-runtime");
2177
+ var import_components29 = require("@transferwise/components");
2178
+ var import_react11 = require("react");
2179
+ var import_jsx_runtime50 = require("react/jsx-runtime");
3456
2180
  var ModalLayoutRenderer = {
3457
2181
  canRenderType: "modal-layout",
3458
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DFModal, __spreadValues({}, props))
2182
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(DFModal, __spreadValues({}, props))
3459
2183
  };
3460
2184
  var ModalLayoutRenderer_default = ModalLayoutRenderer;
3461
2185
  function DFModal({ content, margin, trigger }) {
3462
- const [visible, setVisible] = (0, import_react12.useState)(false);
2186
+ const [visible, setVisible] = (0, import_react11.useState)(false);
3463
2187
  const { children, title } = content;
3464
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: getMargin(margin), children: [
3465
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_components35.Button, { v2: true, priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
3466
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
3467
- import_components35.Modal,
2188
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: getMargin(margin), children: [
2189
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_components29.Button, { v2: true, priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
2190
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
2191
+ import_components29.Modal,
3468
2192
  {
3469
2193
  scroll: "content",
3470
2194
  open: visible,
@@ -3478,20 +2202,20 @@ function DFModal({ content, margin, trigger }) {
3478
2202
  }
3479
2203
 
3480
2204
  // ../renderers/src/ModalRenderer.tsx
3481
- var import_components36 = require("@transferwise/components");
3482
- var import_jsx_runtime59 = require("react/jsx-runtime");
2205
+ var import_components30 = require("@transferwise/components");
2206
+ var import_jsx_runtime51 = require("react/jsx-runtime");
3483
2207
  var ModalRenderer = {
3484
2208
  canRenderType: "modal",
3485
2209
  render: ({ title, children, open, onClose }) => {
3486
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_components36.Modal, { open, title, body: children, onClose });
2210
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components30.Modal, { open, title, body: children, onClose });
3487
2211
  }
3488
2212
  };
3489
2213
 
3490
2214
  // ../renderers/src/MoneyInputRenderer.tsx
3491
- var import_components37 = require("@transferwise/components");
3492
- var import_react13 = require("react");
3493
- var import_react_intl13 = require("react-intl");
3494
- var import_jsx_runtime60 = require("react/jsx-runtime");
2215
+ var import_components31 = require("@transferwise/components");
2216
+ var import_react12 = require("react");
2217
+ var import_react_intl11 = require("react-intl");
2218
+ var import_jsx_runtime52 = require("react/jsx-runtime");
3495
2219
  var groupingTags2 = Object.keys(group_messages_default).filter((key) => key !== "all");
3496
2220
  var MoneyInputRenderer = {
3497
2221
  canRenderType: "money-input",
@@ -3512,13 +2236,13 @@ function MoneyInputRendererComponent(props) {
3512
2236
  onAmountChange,
3513
2237
  onCurrencyChange
3514
2238
  } = props;
3515
- (0, import_react13.useEffect)(() => {
2239
+ (0, import_react12.useEffect)(() => {
3516
2240
  if (!isValidIndex(selectedCurrencyIndex, currencies.length)) {
3517
2241
  onCurrencyChange(0);
3518
2242
  }
3519
2243
  }, [selectedCurrencyIndex, onCurrencyChange, currencies.length]);
3520
- const { formatMessage } = (0, import_react_intl13.useIntl)();
3521
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
2244
+ const { formatMessage } = (0, import_react_intl11.useIntl)();
2245
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
3522
2246
  FieldInput_default,
3523
2247
  {
3524
2248
  id: uid,
@@ -3527,8 +2251,8 @@ function MoneyInputRendererComponent(props) {
3527
2251
  validation: validationState,
3528
2252
  help,
3529
2253
  features: props.features,
3530
- children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
3531
- import_components37.MoneyInput,
2254
+ children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
2255
+ import_components31.MoneyInput,
3532
2256
  {
3533
2257
  amount: parseFloatOrNull(amountValue),
3534
2258
  searchPlaceholder: "",
@@ -3589,8 +2313,8 @@ function assertCurrencyCodeIsString(currencyCode) {
3589
2313
  }
3590
2314
 
3591
2315
  // ../renderers/src/MultiSelectInputRenderer/InlineComponent.tsx
3592
- var import_components38 = require("@transferwise/components");
3593
- var import_jsx_runtime61 = require("react/jsx-runtime");
2316
+ var import_components32 = require("@transferwise/components");
2317
+ var import_jsx_runtime53 = require("react/jsx-runtime");
3594
2318
  function InlineComponent(props) {
3595
2319
  const {
3596
2320
  id,
@@ -3604,7 +2328,7 @@ function InlineComponent(props) {
3604
2328
  validationState,
3605
2329
  onSelect
3606
2330
  } = props;
3607
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
2331
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
3608
2332
  FieldInput_default,
3609
2333
  {
3610
2334
  id,
@@ -3626,8 +2350,8 @@ function InlineComponent(props) {
3626
2350
  childrenProps
3627
2351
  } = option;
3628
2352
  const key = (_a = childrenProps == null ? void 0 : childrenProps.uid) != null ? _a : index;
3629
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
3630
- import_components38.ListItem,
2353
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
2354
+ import_components32.ListItem,
3631
2355
  {
3632
2356
  title: itemTitle,
3633
2357
  subtitle,
@@ -3635,10 +2359,10 @@ function InlineComponent(props) {
3635
2359
  valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
3636
2360
  media: getMedia(media, false),
3637
2361
  prompt: getInlineAlert(inlineAlert),
3638
- additionalInfo: additionalText ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_components38.ListItem.AdditionalInfo, { children: additionalText }) : void 0,
2362
+ additionalInfo: additionalText ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components32.ListItem.AdditionalInfo, { children: additionalText }) : void 0,
3639
2363
  disabled: disabled || optionDisabled,
3640
- control: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
3641
- import_components38.ListItem.Checkbox,
2364
+ control: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
2365
+ import_components32.ListItem.Checkbox,
3642
2366
  {
3643
2367
  checked: selectedIndices.includes(index),
3644
2368
  onChange: (e) => {
@@ -3656,13 +2380,13 @@ function InlineComponent(props) {
3656
2380
  }
3657
2381
 
3658
2382
  // ../renderers/src/MultiSelectInputRenderer/DefaultComponent.tsx
3659
- var import_components39 = require("@transferwise/components");
3660
- var import_react14 = require("react");
3661
- var import_react_intl15 = require("react-intl");
2383
+ var import_components33 = require("@transferwise/components");
2384
+ var import_react13 = require("react");
2385
+ var import_react_intl13 = require("react-intl");
3662
2386
 
3663
2387
  // ../renderers/src/messages/multi-select.messages.ts
3664
- var import_react_intl14 = require("react-intl");
3665
- var multi_select_messages_default = (0, import_react_intl14.defineMessages)({
2388
+ var import_react_intl12 = require("react-intl");
2389
+ var multi_select_messages_default = (0, import_react_intl12.defineMessages)({
3666
2390
  summary: {
3667
2391
  id: "df.wise.MultiSelect.summary",
3668
2392
  defaultMessage: "{first} and {count} more",
@@ -3671,10 +2395,10 @@ var multi_select_messages_default = (0, import_react_intl14.defineMessages)({
3671
2395
  });
3672
2396
 
3673
2397
  // ../renderers/src/MultiSelectInputRenderer/DefaultComponent.tsx
3674
- var import_jsx_runtime62 = require("react/jsx-runtime");
2398
+ var import_jsx_runtime54 = require("react/jsx-runtime");
3675
2399
  function DefaultComponent(props) {
3676
- const { formatMessage } = (0, import_react_intl15.useIntl)();
3677
- const [stagedIndices, setStagedIndices] = (0, import_react14.useState)();
2400
+ const { formatMessage } = (0, import_react_intl13.useIntl)();
2401
+ const [stagedIndices, setStagedIndices] = (0, import_react13.useState)();
3678
2402
  const {
3679
2403
  id,
3680
2404
  autoComplete,
@@ -3713,12 +2437,12 @@ function DefaultComponent(props) {
3713
2437
  const contentProps = {
3714
2438
  title: option.title,
3715
2439
  description: option.description,
3716
- icon: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
2440
+ icon: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
3717
2441
  };
3718
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_components39.SelectInputOptionContent, __spreadValues({}, contentProps));
2442
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components33.SelectInputOptionContent, __spreadValues({}, contentProps));
3719
2443
  };
3720
2444
  const extraProps = { autoComplete };
3721
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
2445
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
3722
2446
  FieldInput_default,
3723
2447
  {
3724
2448
  id,
@@ -3727,8 +2451,8 @@ function DefaultComponent(props) {
3727
2451
  description,
3728
2452
  validation: validationState,
3729
2453
  features,
3730
- children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
3731
- import_components39.SelectInput,
2454
+ children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
2455
+ import_components33.SelectInput,
3732
2456
  __spreadValues({
3733
2457
  id,
3734
2458
  items: options.map((option, index) => {
@@ -3765,9 +2489,9 @@ function DefaultComponent(props) {
3765
2489
  );
3766
2490
  }
3767
2491
 
3768
- // ../renderers/src/MultiSelectInputRenderer/InlineCheckboxComponent.tsx
3769
- var import_components40 = require("@transferwise/components");
3770
- var import_jsx_runtime63 = require("react/jsx-runtime");
2492
+ // ../renderers/src/MultiSelectInputRenderer/InlineCheckboxComponent.tsx
2493
+ var import_components34 = require("@transferwise/components");
2494
+ var import_jsx_runtime55 = require("react/jsx-runtime");
3771
2495
  function InlineCheckboxComponent(props) {
3772
2496
  const {
3773
2497
  id,
@@ -3781,7 +2505,7 @@ function InlineCheckboxComponent(props) {
3781
2505
  validationState,
3782
2506
  onSelect
3783
2507
  } = props;
3784
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
2508
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
3785
2509
  FieldInput_default,
3786
2510
  {
3787
2511
  id,
@@ -3810,35 +2534,35 @@ function InlineCheckboxComponent(props) {
3810
2534
  onSelect(newSelectedIndices);
3811
2535
  }
3812
2536
  };
3813
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_components40.Checkbox, __spreadProps(__spreadValues({}, checkboxProps), { className: "m-t-1" }), key);
2537
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_components34.Checkbox, __spreadProps(__spreadValues({}, checkboxProps), { className: "m-t-1" }), key);
3814
2538
  })
3815
2539
  }
3816
2540
  );
3817
2541
  }
3818
2542
 
3819
2543
  // ../renderers/src/MultiSelectInputRenderer/MultiSelectInputRenderer.tsx
3820
- var import_jsx_runtime64 = require("react/jsx-runtime");
2544
+ var import_jsx_runtime56 = require("react/jsx-runtime");
3821
2545
  var MultiSelectInputRenderer = {
3822
2546
  canRenderType: "input-multi-select",
3823
2547
  render: (props) => {
3824
2548
  switch (props.control) {
3825
2549
  case "inline":
3826
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(InlineComponent, __spreadValues({}, props));
2550
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(InlineComponent, __spreadValues({}, props));
3827
2551
  case "inline-checkbox-group":
3828
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(InlineCheckboxComponent, __spreadValues({}, props));
2552
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(InlineCheckboxComponent, __spreadValues({}, props));
3829
2553
  default:
3830
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(DefaultComponent, __spreadValues({}, props));
2554
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DefaultComponent, __spreadValues({}, props));
3831
2555
  }
3832
2556
  }
3833
2557
  };
3834
2558
 
3835
2559
  // ../renderers/src/MultiUploadInputRenderer.tsx
3836
- var import_components42 = require("@transferwise/components");
2560
+ var import_components36 = require("@transferwise/components");
3837
2561
 
3838
2562
  // ../renderers/src/components/UploadFieldInput.tsx
3839
- var import_components41 = require("@transferwise/components");
2563
+ var import_components35 = require("@transferwise/components");
3840
2564
  var import_classnames5 = __toESM(require_classnames());
3841
- var import_jsx_runtime65 = require("react/jsx-runtime");
2565
+ var import_jsx_runtime57 = require("react/jsx-runtime");
3842
2566
  function UploadFieldInput({
3843
2567
  id,
3844
2568
  children,
@@ -3848,10 +2572,10 @@ function UploadFieldInput({
3848
2572
  validation,
3849
2573
  features
3850
2574
  }) {
3851
- const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(LabelContentWithHelp, { text: label, help }) : label;
2575
+ const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(LabelContentWithHelp, { text: label, help }) : label;
3852
2576
  const descriptionId = description ? `${id}-description` : void 0;
3853
2577
  const { ref } = useScrollToError(validation, features);
3854
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
2578
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
3855
2579
  "div",
3856
2580
  {
3857
2581
  ref,
@@ -3859,9 +2583,9 @@ function UploadFieldInput({
3859
2583
  "has-error": (validation == null ? void 0 : validation.status) === "invalid"
3860
2584
  }),
3861
2585
  children: [
3862
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("label", { htmlFor: id, className: "control-label", children: labelContent }),
2586
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("label", { htmlFor: id, className: "control-label", children: labelContent }),
3863
2587
  children,
3864
- (validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_components41.InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
2588
+ (validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_components35.InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
3865
2589
  ]
3866
2590
  }
3867
2591
  );
@@ -3896,7 +2620,7 @@ var getSizeLimit = (maxSize) => {
3896
2620
  };
3897
2621
 
3898
2622
  // ../renderers/src/MultiUploadInputRenderer.tsx
3899
- var import_jsx_runtime66 = require("react/jsx-runtime");
2623
+ var import_jsx_runtime58 = require("react/jsx-runtime");
3900
2624
  var MultiUploadInputRenderer = {
3901
2625
  canRenderType: "input-upload-multi",
3902
2626
  render: (props) => {
@@ -3922,7 +2646,7 @@ var MultiUploadInputRenderer = {
3922
2646
  };
3923
2647
  const onDeleteFile = async (fileId) => onRemoveFile(value.findIndex((file) => file.id === fileId));
3924
2648
  const descriptionId = description ? `${id}-description` : void 0;
3925
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
2649
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
3926
2650
  UploadFieldInput_default,
3927
2651
  {
3928
2652
  id,
@@ -3931,17 +2655,17 @@ var MultiUploadInputRenderer = {
3931
2655
  validation: validationState,
3932
2656
  help,
3933
2657
  features,
3934
- children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
3935
- import_components42.UploadInput,
2658
+ children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
2659
+ import_components36.UploadInput,
3936
2660
  {
3937
2661
  id,
3938
2662
  "aria-describedby": descriptionId,
3939
2663
  description,
3940
2664
  disabled,
3941
- files: value.map(({ id: id2, file, validationState: validationState2 }) => ({
3942
- id: id2,
2665
+ files: value.map(({ id: fileId, file, validationState: fileValidationState }) => ({
2666
+ id: fileId,
3943
2667
  filename: file.name,
3944
- status: (validationState2 == null ? void 0 : validationState2.status) === "invalid" ? import_components42.Status.FAILED : import_components42.Status.SUCCEEDED
2668
+ status: (fileValidationState == null ? void 0 : fileValidationState.status) === "invalid" ? import_components36.Status.FAILED : import_components36.Status.SUCCEEDED
3945
2669
  })),
3946
2670
  fileTypes: acceptsToFileTypes(accepts),
3947
2671
  maxFiles: maxItems,
@@ -3959,8 +2683,8 @@ var MultiUploadInputRenderer = {
3959
2683
  var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
3960
2684
 
3961
2685
  // ../renderers/src/NumberInputRenderer.tsx
3962
- var import_components43 = require("@transferwise/components");
3963
- var import_jsx_runtime67 = require("react/jsx-runtime");
2686
+ var import_components37 = require("@transferwise/components");
2687
+ var import_jsx_runtime59 = require("react/jsx-runtime");
3964
2688
  var NumberInputRenderer = {
3965
2689
  canRenderType: "input-number",
3966
2690
  render: (props) => {
@@ -3974,7 +2698,7 @@ var NumberInputRenderer = {
3974
2698
  "maximum",
3975
2699
  "minimum"
3976
2700
  );
3977
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
2701
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
3978
2702
  FieldInput_default,
3979
2703
  {
3980
2704
  id,
@@ -3985,8 +2709,8 @@ var NumberInputRenderer = {
3985
2709
  loadingState: props.fieldLoadingState,
3986
2710
  help,
3987
2711
  features: props.features,
3988
- children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_components43.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
3989
- import_components43.Input,
2712
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_components37.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
2713
+ import_components37.Input,
3990
2714
  __spreadValues({
3991
2715
  id,
3992
2716
  name: id,
@@ -4006,24 +2730,24 @@ var NumberInputRenderer = {
4006
2730
  var NumberInputRenderer_default = NumberInputRenderer;
4007
2731
 
4008
2732
  // ../renderers/src/ParagraphRenderer.tsx
4009
- var import_react_intl17 = require("react-intl");
2733
+ var import_react_intl15 = require("react-intl");
4010
2734
 
4011
2735
  // ../renderers/src/hooks/useSnackBarIfAvailable.ts
4012
- var import_components44 = require("@transferwise/components");
4013
- var import_react15 = require("react");
2736
+ var import_components38 = require("@transferwise/components");
2737
+ var import_react14 = require("react");
4014
2738
  function useSnackBarIfAvailable() {
4015
- const context = (0, import_react15.useContext)(import_components44.SnackbarContext);
2739
+ const context = (0, import_react14.useContext)(import_components38.SnackbarContext);
4016
2740
  return context ? context.createSnackbar : () => {
4017
2741
  };
4018
2742
  }
4019
2743
 
4020
2744
  // ../renderers/src/ParagraphRenderer.tsx
4021
- var import_components45 = require("@transferwise/components");
2745
+ var import_components39 = require("@transferwise/components");
4022
2746
  var import_classnames6 = __toESM(require_classnames());
4023
2747
 
4024
2748
  // ../renderers/src/messages/paragraph.messages.ts
4025
- var import_react_intl16 = require("react-intl");
4026
- var paragraph_messages_default = (0, import_react_intl16.defineMessages)({
2749
+ var import_react_intl14 = require("react-intl");
2750
+ var paragraph_messages_default = (0, import_react_intl14.defineMessages)({
4027
2751
  copy: {
4028
2752
  id: "df.wise.DynamicParagraph.copy",
4029
2753
  defaultMessage: "Copy",
@@ -4037,14 +2761,14 @@ var paragraph_messages_default = (0, import_react_intl16.defineMessages)({
4037
2761
  });
4038
2762
 
4039
2763
  // ../renderers/src/ParagraphRenderer.tsx
4040
- var import_jsx_runtime68 = require("react/jsx-runtime");
2764
+ var import_jsx_runtime60 = require("react/jsx-runtime");
4041
2765
  var ParagraphRenderer = {
4042
2766
  canRenderType: "paragraph",
4043
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Paragraph, __spreadValues({}, props))
2767
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Paragraph, __spreadValues({}, props))
4044
2768
  };
4045
2769
  function Paragraph({ align, control, margin, size, text }) {
4046
2770
  const className = getTextAlignmentAndMargin({ align, margin });
4047
- return control === "copyable" ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
2771
+ return control === "copyable" ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
4048
2772
  "p",
4049
2773
  {
4050
2774
  className: `${["xs", "sm"].includes(size) ? "np-text-body-default" : "np-text-body-large"} ${className}`,
@@ -4057,16 +2781,16 @@ function CopyableParagraph({
4057
2781
  align,
4058
2782
  className
4059
2783
  }) {
4060
- const { formatMessage } = (0, import_react_intl17.useIntl)();
2784
+ const { formatMessage } = (0, import_react_intl15.useIntl)();
4061
2785
  const createSnackbar = useSnackBarIfAvailable();
4062
2786
  const copy = () => {
4063
2787
  navigator.clipboard.writeText(text).then(() => createSnackbar({ text: formatMessage(paragraph_messages_default.copied) })).catch(() => {
4064
2788
  });
4065
2789
  };
4066
2790
  const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
4067
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className, children: [
4068
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
4069
- import_components45.Input,
2791
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className, children: [
2792
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
2793
+ import_components39.Input,
4070
2794
  {
4071
2795
  type: "text",
4072
2796
  value: text,
@@ -4074,23 +2798,23 @@ function CopyableParagraph({
4074
2798
  className: (0, import_classnames6.default)("text-ellipsis", inputAlignmentClasses)
4075
2799
  }
4076
2800
  ),
4077
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_components45.Button, { v2: true, block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
2801
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_components39.Button, { v2: true, block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
4078
2802
  ] });
4079
2803
  }
4080
2804
  var ParagraphRenderer_default = ParagraphRenderer;
4081
2805
 
4082
2806
  // ../renderers/src/ProgressRenderer.tsx
4083
- var import_components46 = require("@transferwise/components");
4084
- var import_jsx_runtime69 = require("react/jsx-runtime");
2807
+ var import_components40 = require("@transferwise/components");
2808
+ var import_jsx_runtime61 = require("react/jsx-runtime");
4085
2809
  var ProgressRenderer = {
4086
2810
  canRenderType: "progress",
4087
2811
  render: ({ uid, title, help, progress, progressText, margin, description }) => {
4088
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
4089
- import_components46.ProgressBar,
2812
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
2813
+ import_components40.ProgressBar,
4090
2814
  {
4091
2815
  id: uid,
4092
2816
  className: getMargin(margin),
4093
- title: title && help ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(LabelContentWithHelp, { text: title, help }) : title,
2817
+ title: title && help ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(LabelContentWithHelp, { text: title, help }) : title,
4094
2818
  description,
4095
2819
  progress: {
4096
2820
  max: 1,
@@ -4103,15 +2827,15 @@ var ProgressRenderer = {
4103
2827
  };
4104
2828
 
4105
2829
  // ../renderers/src/RepeatableRenderer.tsx
4106
- var import_components47 = require("@transferwise/components");
4107
- var import_icons2 = require("@transferwise/icons");
2830
+ var import_components41 = require("@transferwise/components");
2831
+ var import_icons = require("@transferwise/icons");
4108
2832
  var import_classnames7 = __toESM(require_classnames());
4109
- var import_react16 = require("react");
4110
- var import_react_intl19 = require("react-intl");
2833
+ var import_react15 = require("react");
2834
+ var import_react_intl17 = require("react-intl");
4111
2835
 
4112
2836
  // ../renderers/src/messages/repeatable.messages.ts
4113
- var import_react_intl18 = require("react-intl");
4114
- var repeatable_messages_default = (0, import_react_intl18.defineMessages)({
2837
+ var import_react_intl16 = require("react-intl");
2838
+ var repeatable_messages_default = (0, import_react_intl16.defineMessages)({
4115
2839
  addItemTitle: {
4116
2840
  id: "df.wise.ArraySchema.addItemTitle",
4117
2841
  defaultMessage: "Add Item",
@@ -4135,10 +2859,10 @@ var repeatable_messages_default = (0, import_react_intl18.defineMessages)({
4135
2859
  });
4136
2860
 
4137
2861
  // ../renderers/src/RepeatableRenderer.tsx
4138
- var import_jsx_runtime70 = require("react/jsx-runtime");
2862
+ var import_jsx_runtime62 = require("react/jsx-runtime");
4139
2863
  var RepeatableRenderer = {
4140
2864
  canRenderType: "repeatable",
4141
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Repeatable, __spreadValues({}, props))
2865
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Repeatable, __spreadValues({}, props))
4142
2866
  };
4143
2867
  function Repeatable(props) {
4144
2868
  const {
@@ -4155,8 +2879,8 @@ function Repeatable(props) {
4155
2879
  onSave,
4156
2880
  onRemove
4157
2881
  } = props;
4158
- const { formatMessage } = (0, import_react_intl19.useIntl)();
4159
- const [openModalType, setOpenModalType] = (0, import_react16.useState)(null);
2882
+ const { formatMessage } = (0, import_react_intl17.useIntl)();
2883
+ const [openModalType, setOpenModalType] = (0, import_react15.useState)(null);
4160
2884
  const { ref } = useScrollToError(validationState, features);
4161
2885
  const onAddItem = () => {
4162
2886
  onAdd();
@@ -4179,43 +2903,43 @@ function Repeatable(props) {
4179
2903
  const onCancelEdit = () => {
4180
2904
  setOpenModalType(null);
4181
2905
  };
4182
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_jsx_runtime70.Fragment, { children: [
4183
- /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { ref, children: [
4184
- title && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_components47.Header, { title }),
4185
- description && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("p", { children: description }),
4186
- /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
2906
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
2907
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { ref, children: [
2908
+ title && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_components41.Header, { title }),
2909
+ description && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("p", { children: description }),
2910
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
4187
2911
  "div",
4188
2912
  {
4189
2913
  className: (0, import_classnames7.default)("form-group", {
4190
2914
  "has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
4191
2915
  }),
4192
2916
  children: [
4193
- items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
4194
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
4195
- import_components47.NavigationOption,
2917
+ items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
2918
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
2919
+ import_components41.NavigationOption,
4196
2920
  {
4197
- media: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_icons2.Plus, {}),
2921
+ media: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_icons.Plus, {}),
4198
2922
  title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
4199
2923
  showMediaAtAllSizes: true,
4200
2924
  onClick: () => onAddItem()
4201
2925
  }
4202
2926
  ),
4203
- (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_components47.InlineAlert, { type: "negative", children: validationState.message })
2927
+ (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_components41.InlineAlert, { type: "negative", children: validationState.message })
4204
2928
  ]
4205
2929
  }
4206
2930
  )
4207
2931
  ] }),
4208
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
4209
- import_components47.Modal,
2932
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
2933
+ import_components41.Modal,
4210
2934
  {
4211
2935
  open: openModalType !== null,
4212
2936
  title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
4213
- body: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_jsx_runtime70.Fragment, { children: [
4214
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "m-b-2", children: editableItem }),
4215
- /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { children: [
4216
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_components47.Button, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
4217
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
4218
- import_components47.Button,
2937
+ body: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
2938
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "m-b-2", children: editableItem }),
2939
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { children: [
2940
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_components41.Button, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
2941
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
2942
+ import_components41.Button,
4219
2943
  {
4220
2944
  v2: true,
4221
2945
  priority: "secondary",
@@ -4236,10 +2960,10 @@ function ItemSummaryOption({
4236
2960
  item,
4237
2961
  onClick
4238
2962
  }) {
4239
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
4240
- import_components47.NavigationOption,
2963
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
2964
+ import_components41.NavigationOption,
4241
2965
  {
4242
- media: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(OptionMedia, { media: item.media, preferAvatar: false }),
2966
+ media: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(OptionMedia, { media: item.media, preferAvatar: false }),
4243
2967
  title: item.title,
4244
2968
  content: item.description,
4245
2969
  showMediaAtAllSizes: true,
@@ -4251,16 +2975,16 @@ function ItemSummaryOption({
4251
2975
  var RepeatableRenderer_default = RepeatableRenderer;
4252
2976
 
4253
2977
  // ../renderers/src/ReviewLegacyRenderer.tsx
4254
- var import_components48 = require("@transferwise/components");
4255
- var import_jsx_runtime71 = require("react/jsx-runtime");
2978
+ var import_components42 = require("@transferwise/components");
2979
+ var import_jsx_runtime63 = require("react/jsx-runtime");
4256
2980
  var ReviewRenderer = {
4257
2981
  canRenderType: "review",
4258
2982
  render: ({ callToAction, control, fields, margin, title, trackEvent }) => {
4259
2983
  const orientation = mapControlToDefinitionListLayout(control);
4260
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: getMargin(margin), children: [
4261
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Header, { title, callToAction }),
4262
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
4263
- import_components48.DefinitionList,
2984
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: getMargin(margin), children: [
2985
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Header5, { title, callToAction }),
2986
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
2987
+ import_components42.DefinitionList,
4264
2988
  {
4265
2989
  layout: orientation,
4266
2990
  definitions: fields.map(
@@ -4297,20 +3021,20 @@ var mapControlToDefinitionListLayout = (control) => {
4297
3021
  };
4298
3022
  var getFieldLabel = (label, help, onClick) => {
4299
3023
  if (help) {
4300
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_jsx_runtime71.Fragment, { children: [
3024
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_jsx_runtime63.Fragment, { children: [
4301
3025
  label,
4302
3026
  " ",
4303
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Help_default, { help, onClick })
3027
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Help_default, { help, onClick })
4304
3028
  ] });
4305
3029
  }
4306
3030
  return label;
4307
3031
  };
4308
3032
 
4309
3033
  // ../renderers/src/ReviewRenderer.tsx
4310
- var import_components49 = require("@transferwise/components");
4311
- var import_icons3 = require("@transferwise/icons");
4312
- var import_react_intl20 = require("react-intl");
4313
- var import_jsx_runtime72 = require("react/jsx-runtime");
3034
+ var import_components43 = require("@transferwise/components");
3035
+ var import_icons2 = require("@transferwise/icons");
3036
+ var import_react_intl18 = require("react-intl");
3037
+ var import_jsx_runtime64 = require("react/jsx-runtime");
4314
3038
  var IGNORED_CONTROLS = [
4315
3039
  "horizontal",
4316
3040
  "horizontal-end-aligned",
@@ -4320,7 +3044,7 @@ var IGNORED_CONTROLS = [
4320
3044
  var ReviewRenderer2 = {
4321
3045
  canRenderType: "review",
4322
3046
  canRender: ({ control }) => control ? !IGNORED_CONTROLS.includes(control) : true,
4323
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Review, __spreadValues({}, props))
3047
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Review, __spreadValues({}, props))
4324
3048
  };
4325
3049
  var Review = ({
4326
3050
  callToAction,
@@ -4331,9 +3055,9 @@ var Review = ({
4331
3055
  title,
4332
3056
  trackEvent
4333
3057
  }) => {
4334
- const intl = (0, import_react_intl20.useIntl)();
4335
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: getMargin(margin), children: [
4336
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Header, { title, callToAction }),
3058
+ const intl = (0, import_react_intl18.useIntl)();
3059
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: getMargin(margin), children: [
3060
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Header5, { title, callToAction }),
4337
3061
  fields.map((field) => {
4338
3062
  var _a, _b, _c;
4339
3063
  const {
@@ -4351,8 +3075,8 @@ var Review = ({
4351
3075
  ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
4352
3076
  fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
4353
3077
  };
4354
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
4355
- import_components49.ListItem,
3078
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
3079
+ import_components43.ListItem,
4356
3080
  {
4357
3081
  title: value,
4358
3082
  subtitle: label,
@@ -4372,18 +3096,18 @@ var Review = ({
4372
3096
  ] });
4373
3097
  };
4374
3098
  var getHelpControl = (help, ariaLabel, onClick) => {
4375
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_components49.Popover, { content: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_components49.Markdown, { config: { link: { target: "_blank" } }, children: help }), children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_components49.ListItem.IconButton, { partiallyInteractive: true, "aria-label": ariaLabel, onClick, children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_icons3.QuestionMarkCircle, {}) }) });
3099
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_components43.Popover, { content: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_components43.Markdown, { config: { link: { target: "_blank" } }, children: help }), children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_components43.ListItem.IconButton, { partiallyInteractive: true, "aria-label": ariaLabel, onClick, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_icons2.QuestionMarkCircle, {}) }) });
4376
3100
  };
4377
3101
  var ReviewRenderer_default = ReviewRenderer2;
4378
3102
 
4379
3103
  // ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
4380
- var import_components51 = require("@transferwise/components");
4381
- var import_react17 = require("react");
4382
- var import_react_intl24 = require("react-intl");
3104
+ var import_components45 = require("@transferwise/components");
3105
+ var import_react16 = require("react");
3106
+ var import_react_intl22 = require("react-intl");
4383
3107
 
4384
3108
  // ../renderers/src/messages/search.messages.ts
4385
- var import_react_intl21 = require("react-intl");
4386
- var search_messages_default = (0, import_react_intl21.defineMessages)({
3109
+ var import_react_intl19 = require("react-intl");
3110
+ var search_messages_default = (0, import_react_intl19.defineMessages)({
4387
3111
  loading: {
4388
3112
  id: "df.wise.SearchLayout.loading",
4389
3113
  defaultMessage: "Loading...",
@@ -4392,11 +3116,11 @@ var search_messages_default = (0, import_react_intl21.defineMessages)({
4392
3116
  });
4393
3117
 
4394
3118
  // ../renderers/src/SearchRenderer/ErrorResult.tsx
4395
- var import_react_intl23 = require("react-intl");
3119
+ var import_react_intl21 = require("react-intl");
4396
3120
 
4397
3121
  // ../renderers/src/messages/generic-error.messages.ts
4398
- var import_react_intl22 = require("react-intl");
4399
- var generic_error_messages_default = (0, import_react_intl22.defineMessages)({
3122
+ var import_react_intl20 = require("react-intl");
3123
+ var generic_error_messages_default = (0, import_react_intl20.defineMessages)({
4400
3124
  genericErrorRetryHint: {
4401
3125
  id: "df.wise.PersistAsyncSchema.genericError",
4402
3126
  defaultMessage: "Something went wrong, please try again.",
@@ -4415,20 +3139,20 @@ var generic_error_messages_default = (0, import_react_intl22.defineMessages)({
4415
3139
  });
4416
3140
 
4417
3141
  // ../renderers/src/SearchRenderer/ErrorResult.tsx
4418
- var import_components50 = require("@transferwise/components");
4419
- var import_jsx_runtime73 = require("react/jsx-runtime");
3142
+ var import_components44 = require("@transferwise/components");
3143
+ var import_jsx_runtime65 = require("react/jsx-runtime");
4420
3144
  function ErrorResult({ state }) {
4421
- const intl = (0, import_react_intl23.useIntl)();
4422
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("p", { className: "m-t-2", children: [
3145
+ const intl = (0, import_react_intl21.useIntl)();
3146
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("p", { className: "m-t-2", children: [
4423
3147
  intl.formatMessage(generic_error_messages_default.genericError),
4424
3148
  "\xA0",
4425
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_components50.Link, { onClick: () => state.onRetry(), children: intl.formatMessage(generic_error_messages_default.retry) })
3149
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_components44.Link, { onClick: () => state.onRetry(), children: intl.formatMessage(generic_error_messages_default.retry) })
4426
3150
  ] });
4427
3151
  }
4428
3152
 
4429
3153
  // ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
4430
- var import_icons4 = require("@transferwise/icons");
4431
- var import_jsx_runtime74 = require("react/jsx-runtime");
3154
+ var import_icons3 = require("@transferwise/icons");
3155
+ var import_jsx_runtime66 = require("react/jsx-runtime");
4432
3156
  function BlockSearchRendererComponent({
4433
3157
  id,
4434
3158
  hint,
@@ -4441,10 +3165,10 @@ function BlockSearchRendererComponent({
4441
3165
  trackEvent,
4442
3166
  onChange
4443
3167
  }) {
4444
- const [hasSearched, setHasSearched] = (0, import_react17.useState)(false);
4445
- const { formatMessage } = (0, import_react_intl24.useIntl)();
4446
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: getMargin(margin), children: [
4447
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
3168
+ const [hasSearched, setHasSearched] = (0, import_react16.useState)(false);
3169
+ const { formatMessage } = (0, import_react_intl22.useIntl)();
3170
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: getMargin(margin), children: [
3171
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
4448
3172
  FieldInput_default,
4449
3173
  {
4450
3174
  id,
@@ -4453,12 +3177,13 @@ function BlockSearchRendererComponent({
4453
3177
  help: "",
4454
3178
  label: title,
4455
3179
  features,
4456
- children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_components51.InputGroup, { addonStart: { content: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_icons4.Search, { size: 24 }) }, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
4457
- import_components51.Input,
3180
+ children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_components45.InputGroup, { addonStart: { content: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_icons3.Search, { size: 24 }) }, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
3181
+ import_components45.Input,
4458
3182
  {
4459
3183
  id,
4460
3184
  name: id,
4461
3185
  placeholder: hint,
3186
+ shape: "pill",
4462
3187
  type: "text",
4463
3188
  value: query,
4464
3189
  onChange: ({ currentTarget: { value } }) => {
@@ -4472,7 +3197,7 @@ function BlockSearchRendererComponent({
4472
3197
  ) })
4473
3198
  }
4474
3199
  ),
4475
- isLoading ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(SearchResultContent, { state, trackEvent })
3200
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(SearchResultContent, { state, trackEvent })
4476
3201
  ] });
4477
3202
  }
4478
3203
  function SearchResultContent({
@@ -4481,39 +3206,39 @@ function SearchResultContent({
4481
3206
  }) {
4482
3207
  switch (state.type) {
4483
3208
  case "error":
4484
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(ErrorResult, { state });
3209
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(ErrorResult, { state });
4485
3210
  case "results":
4486
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(SearchResults, { state, trackEvent });
3211
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(SearchResults, { state, trackEvent });
4487
3212
  case "layout":
4488
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_jsx_runtime74.Fragment, { children: [
3213
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
4489
3214
  " ",
4490
3215
  state.layout,
4491
3216
  " "
4492
3217
  ] });
4493
3218
  case "noResults":
4494
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(EmptySearchResult, { state });
3219
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(EmptySearchResult, { state });
4495
3220
  case "pending":
4496
3221
  default:
4497
3222
  return null;
4498
3223
  }
4499
3224
  }
4500
3225
  function EmptySearchResult({ state }) {
4501
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_components51.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
3226
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_components45.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
4502
3227
  }
4503
3228
  function SearchResults({
4504
3229
  state,
4505
3230
  trackEvent
4506
3231
  }) {
4507
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_components51.List, { children: state.results.map((result) => {
3232
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_components45.List, { children: state.results.map((result) => {
4508
3233
  const { media } = result;
4509
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
4510
- import_components51.ListItem,
3234
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
3235
+ import_components45.ListItem,
4511
3236
  {
4512
3237
  title: result.title,
4513
3238
  subtitle: result.description,
4514
- media: media ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(OptionMedia, { media, preferAvatar: false }) : void 0,
4515
- control: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
4516
- import_components51.ListItem.Navigation,
3239
+ media: media ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(OptionMedia, { media, preferAvatar: false }) : void 0,
3240
+ control: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
3241
+ import_components45.ListItem.Navigation,
4517
3242
  {
4518
3243
  onClick: () => {
4519
3244
  trackEvent("Search Result Selected", __spreadValues({
@@ -4531,11 +3256,11 @@ function SearchResults({
4531
3256
  var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
4532
3257
 
4533
3258
  // ../renderers/src/SearchRenderer/InlineSearchRendererComponent.tsx
4534
- var import_components52 = require("@transferwise/components");
4535
- var import_icons5 = require("@transferwise/icons");
4536
- var import_react18 = require("react");
4537
- var import_react_intl25 = require("react-intl");
4538
- var import_jsx_runtime75 = require("react/jsx-runtime");
3259
+ var import_components46 = require("@transferwise/components");
3260
+ var import_icons4 = require("@transferwise/icons");
3261
+ var import_react17 = require("react");
3262
+ var import_react_intl23 = require("react-intl");
3263
+ var import_jsx_runtime67 = require("react/jsx-runtime");
4539
3264
  function InlineSearchRenderer({
4540
3265
  id,
4541
3266
  hint,
@@ -4547,9 +3272,9 @@ function InlineSearchRenderer({
4547
3272
  onChange,
4548
3273
  trackEvent
4549
3274
  }) {
4550
- const [hasSearched, setHasSearched] = (0, import_react18.useState)(false);
4551
- const intl = (0, import_react_intl25.useIntl)();
4552
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
3275
+ const [hasSearched, setHasSearched] = (0, import_react17.useState)(false);
3276
+ const intl = (0, import_react_intl23.useIntl)();
3277
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
4553
3278
  FieldInput_default,
4554
3279
  {
4555
3280
  id,
@@ -4558,8 +3283,8 @@ function InlineSearchRenderer({
4558
3283
  help: "",
4559
3284
  label: title,
4560
3285
  features,
4561
- children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
4562
- import_components52.Typeahead,
3286
+ children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
3287
+ import_components46.Typeahead,
4563
3288
  {
4564
3289
  id: "typeahead-input-id",
4565
3290
  intl,
@@ -4567,10 +3292,10 @@ function InlineSearchRenderer({
4567
3292
  size: "md",
4568
3293
  placeholder: hint,
4569
3294
  maxHeight: 100,
4570
- footer: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(TypeaheadFooter, { state, isLoading }),
3295
+ footer: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(TypeaheadFooter, { state, isLoading }),
4571
3296
  multiple: false,
4572
3297
  clearable: false,
4573
- addon: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_icons5.Search, { size: 24 }),
3298
+ addon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_icons4.Search, { size: 24 }),
4574
3299
  options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
4575
3300
  minQueryLength: 1,
4576
3301
  onChange: (values) => {
@@ -4607,33 +3332,33 @@ function mapResultToTypeaheadOption(result) {
4607
3332
  };
4608
3333
  }
4609
3334
  function TypeaheadFooter({ state, isLoading }) {
4610
- const { formatMessage } = (0, import_react_intl25.useIntl)();
3335
+ const { formatMessage } = (0, import_react_intl23.useIntl)();
4611
3336
  if (state.type === "layout") {
4612
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "m-x-1 m-y-1", children: state.layout });
3337
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "m-x-1 m-y-1", children: state.layout });
4613
3338
  }
4614
3339
  if (state.type === "noResults") {
4615
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_components52.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
3340
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_components46.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
4616
3341
  }
4617
3342
  if (state.type === "error") {
4618
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(ErrorResult, { state }) });
3343
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(ErrorResult, { state }) });
4619
3344
  }
4620
3345
  if (state.type === "pending" || isLoading) {
4621
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
3346
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
4622
3347
  }
4623
3348
  return null;
4624
3349
  }
4625
3350
  var InlineSearchRendererComponent_default = InlineSearchRenderer;
4626
3351
 
4627
3352
  // ../renderers/src/SearchRenderer/SearchRenderer.tsx
4628
- var import_jsx_runtime76 = require("react/jsx-runtime");
3353
+ var import_jsx_runtime68 = require("react/jsx-runtime");
4629
3354
  var SearchRenderer = {
4630
3355
  canRenderType: "search",
4631
- render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
3356
+ render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
4632
3357
  };
4633
3358
  var SearchRenderer_default = SearchRenderer;
4634
3359
 
4635
3360
  // ../renderers/src/SectionRenderer.tsx
4636
- var import_components53 = require("@transferwise/components");
3361
+ var import_components47 = require("@transferwise/components");
4637
3362
 
4638
3363
  // ../renderers/src/utils/getHeaderAction.tsx
4639
3364
  var getHeaderAction2 = (callToAction) => {
@@ -4657,12 +3382,12 @@ var getHeaderAction2 = (callToAction) => {
4657
3382
  };
4658
3383
 
4659
3384
  // ../renderers/src/SectionRenderer.tsx
4660
- var import_jsx_runtime77 = require("react/jsx-runtime");
3385
+ var import_jsx_runtime69 = require("react/jsx-runtime");
4661
3386
  var SectionRenderer = {
4662
3387
  canRenderType: "section",
4663
3388
  render: ({ children, callToAction, margin, title }) => {
4664
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("section", { className: getMargin(margin), children: [
4665
- (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_components53.Header, { title: title != null ? title : "", action: getHeaderAction2(callToAction) }),
3389
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("section", { className: getMargin(margin), children: [
3390
+ (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_components47.Header, { title: title != null ? title : "", action: getHeaderAction2(callToAction) }),
4666
3391
  children
4667
3392
  ] });
4668
3393
  }
@@ -4670,8 +3395,8 @@ var SectionRenderer = {
4670
3395
  var SectionRenderer_default = SectionRenderer;
4671
3396
 
4672
3397
  // ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
4673
- var import_components54 = require("@transferwise/components");
4674
- var import_jsx_runtime78 = require("react/jsx-runtime");
3398
+ var import_components48 = require("@transferwise/components");
3399
+ var import_jsx_runtime70 = require("react/jsx-runtime");
4675
3400
  function RadioInputRendererComponent(props) {
4676
3401
  const {
4677
3402
  id,
@@ -4686,8 +3411,8 @@ function RadioInputRendererComponent(props) {
4686
3411
  validationState,
4687
3412
  onSelect
4688
3413
  } = props;
4689
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
4690
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
3414
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_jsx_runtime70.Fragment, { children: [
3415
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
4691
3416
  FieldInput_default,
4692
3417
  {
4693
3418
  id,
@@ -4696,8 +3421,8 @@ function RadioInputRendererComponent(props) {
4696
3421
  description,
4697
3422
  validation: validationState,
4698
3423
  features,
4699
- children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
4700
- import_components54.RadioGroup,
3424
+ children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
3425
+ import_components48.RadioGroup,
4701
3426
  {
4702
3427
  name: id,
4703
3428
  radios: options.map((option, index) => ({
@@ -4705,7 +3430,7 @@ function RadioInputRendererComponent(props) {
4705
3430
  value: index,
4706
3431
  secondary: option.description,
4707
3432
  disabled: option.disabled || disabled,
4708
- avatar: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
3433
+ avatar: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
4709
3434
  })),
4710
3435
  selectedValue: selectedIndex != null ? selectedIndex : void 0,
4711
3436
  onChange: onSelect
@@ -4719,9 +3444,9 @@ function RadioInputRendererComponent(props) {
4719
3444
  }
4720
3445
 
4721
3446
  // ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
4722
- var import_components55 = require("@transferwise/components");
4723
- var import_react19 = require("react");
4724
- var import_jsx_runtime79 = require("react/jsx-runtime");
3447
+ var import_components49 = require("@transferwise/components");
3448
+ var import_react18 = require("react");
3449
+ var import_jsx_runtime71 = require("react/jsx-runtime");
4725
3450
  function TabInputRendererComponent(props) {
4726
3451
  const {
4727
3452
  id,
@@ -4736,13 +3461,13 @@ function TabInputRendererComponent(props) {
4736
3461
  validationState,
4737
3462
  onSelect
4738
3463
  } = props;
4739
- (0, import_react19.useEffect)(() => {
3464
+ (0, import_react18.useEffect)(() => {
4740
3465
  if (!isValidIndex2(selectedIndex, options.length)) {
4741
3466
  onSelect(0);
4742
3467
  }
4743
3468
  }, [selectedIndex, onSelect, options.length]);
4744
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
4745
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
3469
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_jsx_runtime71.Fragment, { children: [
3470
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
4746
3471
  FieldInput_default,
4747
3472
  {
4748
3473
  id,
@@ -4751,8 +3476,8 @@ function TabInputRendererComponent(props) {
4751
3476
  description,
4752
3477
  validation: validationState,
4753
3478
  features,
4754
- children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
4755
- import_components55.Tabs,
3479
+ children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
3480
+ import_components49.Tabs,
4756
3481
  {
4757
3482
  name: id,
4758
3483
  selected: selectedIndex != null ? selectedIndex : 0,
@@ -4760,7 +3485,7 @@ function TabInputRendererComponent(props) {
4760
3485
  title: option.title,
4761
3486
  // if we pass null, we get some props-types console errors
4762
3487
  // eslint-disable-next-line react/jsx-no-useless-fragment
4763
- content: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_jsx_runtime79.Fragment, {}),
3488
+ content: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_jsx_runtime71.Fragment, {}),
4764
3489
  disabled: option.disabled || disabled
4765
3490
  })),
4766
3491
  onTabSelect: onSelect
@@ -4774,8 +3499,8 @@ function TabInputRendererComponent(props) {
4774
3499
  var isValidIndex2 = (index, options) => index !== null && index >= 0 && index < options;
4775
3500
 
4776
3501
  // ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
4777
- var import_components56 = require("@transferwise/components");
4778
- var import_jsx_runtime80 = require("react/jsx-runtime");
3502
+ var import_components50 = require("@transferwise/components");
3503
+ var import_jsx_runtime72 = require("react/jsx-runtime");
4779
3504
  function SelectInputRendererComponent(props) {
4780
3505
  const {
4781
3506
  id,
@@ -4816,13 +3541,13 @@ function SelectInputRendererComponent(props) {
4816
3541
  } : {
4817
3542
  title: option.title,
4818
3543
  description: option.description,
4819
- icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
3544
+ icon: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
4820
3545
  };
4821
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_components56.SelectInputOptionContent, __spreadValues({}, contentProps));
3546
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_components50.SelectInputOptionContent, __spreadValues({}, contentProps));
4822
3547
  };
4823
3548
  const extraProps = { autoComplete };
4824
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
4825
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
3549
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_jsx_runtime72.Fragment, { children: [
3550
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
4826
3551
  FieldInput_default,
4827
3552
  {
4828
3553
  id,
@@ -4831,8 +3556,8 @@ function SelectInputRendererComponent(props) {
4831
3556
  description,
4832
3557
  validation: validationState,
4833
3558
  features,
4834
- children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
4835
- import_components56.SelectInput,
3559
+ children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
3560
+ import_components50.SelectInput,
4836
3561
  __spreadValues({
4837
3562
  name: id,
4838
3563
  placeholder,
@@ -4852,9 +3577,9 @@ function SelectInputRendererComponent(props) {
4852
3577
  }
4853
3578
 
4854
3579
  // ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
4855
- var import_react20 = require("react");
4856
- var import_components57 = require("@transferwise/components");
4857
- var import_jsx_runtime81 = require("react/jsx-runtime");
3580
+ var import_react19 = require("react");
3581
+ var import_components51 = require("@transferwise/components");
3582
+ var import_jsx_runtime73 = require("react/jsx-runtime");
4858
3583
  function SegmentedInputRendererComponent(props) {
4859
3584
  const {
4860
3585
  id,
@@ -4868,13 +3593,13 @@ function SegmentedInputRendererComponent(props) {
4868
3593
  validationState,
4869
3594
  onSelect
4870
3595
  } = props;
4871
- (0, import_react20.useEffect)(() => {
3596
+ (0, import_react19.useEffect)(() => {
4872
3597
  if (!isValidIndex3(selectedIndex, options.length)) {
4873
3598
  onSelect(0);
4874
3599
  }
4875
3600
  }, [selectedIndex, onSelect, options.length]);
4876
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
4877
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
3601
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
3602
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
4878
3603
  FieldInput_default,
4879
3604
  {
4880
3605
  id,
@@ -4883,8 +3608,8 @@ function SegmentedInputRendererComponent(props) {
4883
3608
  description,
4884
3609
  validation: validationState,
4885
3610
  features,
4886
- children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
4887
- import_components57.SegmentedControl,
3611
+ children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
3612
+ import_components51.SegmentedControl,
4888
3613
  {
4889
3614
  name: `${id}-segmented-control`,
4890
3615
  value: String(selectedIndex),
@@ -4900,14 +3625,14 @@ function SegmentedInputRendererComponent(props) {
4900
3625
  )
4901
3626
  }
4902
3627
  ),
4903
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { id: `${id}-children`, children })
3628
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { id: `${id}-children`, children })
4904
3629
  ] });
4905
3630
  }
4906
3631
  var isValidIndex3 = (index, options) => index !== null && index >= 0 && index < options;
4907
3632
 
4908
3633
  // ../renderers/src/SelectInputRenderer/RadioItemRendererComponent.tsx
4909
- var import_components58 = require("@transferwise/components");
4910
- var import_jsx_runtime82 = require("react/jsx-runtime");
3634
+ var import_components52 = require("@transferwise/components");
3635
+ var import_jsx_runtime74 = require("react/jsx-runtime");
4911
3636
  function RadioItemRendererComponent(props) {
4912
3637
  const {
4913
3638
  id,
@@ -4923,23 +3648,23 @@ function RadioItemRendererComponent(props) {
4923
3648
  onSelect
4924
3649
  } = props;
4925
3650
  const { ref } = useScrollToError(validationState, features);
4926
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { ref, children: [
4927
- rootTitle && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
4928
- import_components58.Header,
3651
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { ref, children: [
3652
+ rootTitle && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
3653
+ import_components52.Header,
4929
3654
  {
4930
3655
  as: "h2",
4931
- title: help ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(LabelContentWithHelp, { text: rootTitle, help }) : rootTitle
3656
+ title: help ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(LabelContentWithHelp, { text: rootTitle, help }) : rootTitle
4932
3657
  }
4933
3658
  ),
4934
- rootDescription && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("p", { children: rootDescription }),
4935
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_components58.List, { children: options.map(
4936
- ({ title, description, additionalText, inlineAlert, disabled, media, supportingValues }, index) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
4937
- import_components58.ListItem,
3659
+ rootDescription && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("p", { children: rootDescription }),
3660
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_components52.List, { children: options.map(
3661
+ ({ title, description, additionalText, inlineAlert, disabled, media, supportingValues }, index) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
3662
+ import_components52.ListItem,
4938
3663
  __spreadValues({
4939
3664
  title,
4940
3665
  subtitle: description,
4941
- control: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
4942
- import_components58.ListItem.Radio,
3666
+ control: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
3667
+ import_components52.ListItem.Radio,
4943
3668
  {
4944
3669
  name: title,
4945
3670
  checked: selectedIndex === index,
@@ -4954,50 +3679,50 @@ function RadioItemRendererComponent(props) {
4954
3679
  title
4955
3680
  )
4956
3681
  ) }, `${id}-${selectedIndex}`),
4957
- (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_components58.InlineAlert, { type: "negative", children: validationState.message }),
3682
+ (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_components52.InlineAlert, { type: "negative", children: validationState.message }),
4958
3683
  children
4959
3684
  ] });
4960
3685
  }
4961
3686
 
4962
3687
  // ../renderers/src/SelectInputRenderer/SelectInputRenderer.tsx
4963
- var import_jsx_runtime83 = require("react/jsx-runtime");
3688
+ var import_jsx_runtime75 = require("react/jsx-runtime");
4964
3689
  var SelectInputRenderer = {
4965
3690
  canRenderType: "input-select",
4966
3691
  render: (props) => {
4967
3692
  switch (props.control) {
4968
3693
  case "radio":
4969
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(RadioInputRendererComponent, __spreadValues({}, props));
3694
+ return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(RadioInputRendererComponent, __spreadValues({}, props));
4970
3695
  case "radio-item":
4971
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(RadioItemRendererComponent, __spreadValues({}, props));
3696
+ return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(RadioItemRendererComponent, __spreadValues({}, props));
4972
3697
  case "tab":
4973
- return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(TabInputRendererComponent, __spreadValues({}, props));
3698
+ return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(TabInputRendererComponent, __spreadValues({}, props));
4974
3699
  case "segmented":
4975
- return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(SegmentedInputRendererComponent, __spreadValues({}, props));
3700
+ return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(SegmentedInputRendererComponent, __spreadValues({}, props));
4976
3701
  case "select":
4977
3702
  default:
4978
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(SelectInputRendererComponent, __spreadValues({}, props));
3703
+ return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(SelectInputRendererComponent, __spreadValues({}, props));
4979
3704
  }
4980
3705
  }
4981
3706
  };
4982
3707
  var SelectInputRenderer_default = SelectInputRenderer;
4983
3708
 
4984
3709
  // ../renderers/src/StatusListRenderer.tsx
4985
- var import_components59 = require("@transferwise/components");
4986
- var import_jsx_runtime84 = require("react/jsx-runtime");
3710
+ var import_components53 = require("@transferwise/components");
3711
+ var import_jsx_runtime76 = require("react/jsx-runtime");
4987
3712
  var StatusListRenderer = {
4988
3713
  canRenderType: "status-list",
4989
- render: ({ margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: getMargin(margin), children: [
4990
- title ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_components59.Header, { title }) : null,
3714
+ render: ({ margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: getMargin(margin), children: [
3715
+ title ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_components53.Header, { title }) : null,
4991
3716
  items.map((item) => {
4992
3717
  const { callToAction, description, title: itemTitle } = item;
4993
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
4994
- import_components59.ListItem,
3718
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
3719
+ import_components53.ListItem,
4995
3720
  {
4996
3721
  title: itemTitle,
4997
3722
  subtitle: description,
4998
- media: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(StatusListItemMedia, __spreadValues({}, item)),
4999
- additionalInfo: callToAction ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
5000
- import_components59.ListItem.AdditionalInfo,
3723
+ media: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(StatusListItemMedia, __spreadValues({}, item)),
3724
+ additionalInfo: callToAction ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
3725
+ import_components53.ListItem.AdditionalInfo,
5001
3726
  {
5002
3727
  action: __spreadValues({
5003
3728
  label: callToAction.title
@@ -5015,10 +3740,10 @@ var StatusListItemMedia = ({ icon, status }) => {
5015
3740
  return void 0;
5016
3741
  }
5017
3742
  if ("name" in icon) {
5018
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_components59.AvatarView, { badge: { status: mapStatus(status) }, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(DynamicIcon_default, { name: icon.name }) });
3743
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_components53.AvatarView, { badge: { status: mapStatus(status) }, children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(DynamicIcon_default, { name: icon.name }) });
5019
3744
  }
5020
3745
  if ("text" in icon) {
5021
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_components59.AvatarView, { badge: { status: mapStatus(status) }, children: icon.text });
3746
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_components53.AvatarView, { badge: { status: mapStatus(status) }, children: icon.text });
5022
3747
  }
5023
3748
  return void 0;
5024
3749
  };
@@ -5036,12 +3761,12 @@ var StatusListRenderer_default = StatusListRenderer;
5036
3761
 
5037
3762
  // ../renderers/src/utils/useCustomTheme.ts
5038
3763
  var import_components_theming = require("@wise/components-theming");
5039
- var import_react21 = require("react");
3764
+ var import_react20 = require("react");
5040
3765
  var ThemeRequiredEventName = "Theme Required";
5041
3766
  var useCustomTheme = (theme, trackEvent) => {
5042
3767
  const theming = (0, import_components_theming.useTheme)();
5043
- const previousTheme = (0, import_react21.useMemo)(() => theming.theme, []);
5044
- (0, import_react21.useEffect)(() => {
3768
+ const previousTheme = (0, import_react20.useMemo)(() => theming.theme, []);
3769
+ (0, import_react20.useEffect)(() => {
5045
3770
  theming.setTheme(theme);
5046
3771
  trackEvent(ThemeRequiredEventName, { theme });
5047
3772
  return theme !== previousTheme ? () => {
@@ -5052,14 +3777,86 @@ var useCustomTheme = (theme, trackEvent) => {
5052
3777
  }, []);
5053
3778
  };
5054
3779
 
3780
+ // ../renderers/src/step/StepFooter.tsx
3781
+ var import_components54 = require("@transferwise/components");
3782
+ var import_react21 = require("react");
3783
+ var import_react_intl25 = require("react-intl");
3784
+
3785
+ // ../renderers/src/messages/step.messages.ts
3786
+ var import_react_intl24 = require("react-intl");
3787
+ var step_messages_default = (0, import_react_intl24.defineMessages)({
3788
+ scrollToBottom: {
3789
+ id: "df.wise.step.scrollToBottom",
3790
+ defaultMessage: "Scroll to bottom",
3791
+ description: "Label for a button that appears when the content of a step is too long and the user needs to scroll to the bottom to see all the content."
3792
+ }
3793
+ });
3794
+
3795
+ // ../renderers/src/step/StepFooter.tsx
3796
+ var import_jsx_runtime77 = require("react/jsx-runtime");
3797
+ var SCROLL_TO_BOTTOM = "scroll-to-bottom";
3798
+ var StepFooter = ({ footer, tags }) => {
3799
+ if (tags == null ? void 0 : tags.includes(SCROLL_TO_BOTTOM)) {
3800
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(FooterWithScrollButton, { footer });
3801
+ }
3802
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(DefaultFooter, { footer });
3803
+ };
3804
+ var DefaultFooter = ({ footer }) => {
3805
+ const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
3806
+ return hasFooter ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "df-step-fixed__footer", children: footer }) : void 0;
3807
+ };
3808
+ var FooterWithScrollButton = ({ footer }) => {
3809
+ const { formatMessage } = (0, import_react_intl25.useIntl)();
3810
+ const endOfLayoutRef = (0, import_react21.useRef)(null);
3811
+ const isElementVisible = useIsElementVisible(endOfLayoutRef);
3812
+ const scrollButton = /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
3813
+ import_components54.Button,
3814
+ {
3815
+ className: "m-b-1",
3816
+ v2: true,
3817
+ block: true,
3818
+ priority: "tertiary",
3819
+ onClick: () => {
3820
+ var _a;
3821
+ (_a = endOfLayoutRef.current) == null ? void 0 : _a.scrollIntoView({ behavior: "smooth" });
3822
+ },
3823
+ children: formatMessage(step_messages_default.scrollToBottom)
3824
+ }
3825
+ );
3826
+ const hasStepFooterContent = footer && Array.isArray(footer) && footer.length > 0;
3827
+ if (isElementVisible && !hasStepFooterContent) {
3828
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" });
3829
+ }
3830
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
3831
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" }),
3832
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "df-step-fixed__footer", children: [
3833
+ !isElementVisible && scrollButton,
3834
+ footer
3835
+ ] })
3836
+ ] });
3837
+ };
3838
+ var useIsElementVisible = (elementRef) => {
3839
+ const [isVisible, setIsVisible] = (0, import_react21.useState)(false);
3840
+ (0, import_react21.useEffect)(() => {
3841
+ const element = elementRef.current;
3842
+ if (!element) return;
3843
+ const observer = new IntersectionObserver(([entry]) => {
3844
+ setIsVisible(entry.isIntersecting);
3845
+ });
3846
+ observer.observe(element);
3847
+ return () => observer.disconnect();
3848
+ }, [elementRef]);
3849
+ return isVisible;
3850
+ };
3851
+
5055
3852
  // ../renderers/src/step/StepHeader.tsx
5056
- var import_components60 = require("@transferwise/components");
5057
- var import_jsx_runtime85 = require("react/jsx-runtime");
3853
+ var import_components55 = require("@transferwise/components");
3854
+ var import_jsx_runtime78 = require("react/jsx-runtime");
5058
3855
  var StepHeader = ({ title, description, tags }) => {
5059
3856
  const { titleType, alignmentClassName } = getHeaderStyle(tags);
5060
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_jsx_runtime85.Fragment, { children: [
5061
- title ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_components60.Title, { as: "h1", type: titleType, className: `${alignmentClassName} m-b-2`, children: title }) : void 0,
5062
- description ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("p", { className: `${alignmentClassName} np-text-body-large`, children: description }) : void 0
3857
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
3858
+ title ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_components55.Title, { as: "h1", type: titleType, className: `${alignmentClassName} m-b-2`, children: title }) : void 0,
3859
+ description ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("p", { className: `${alignmentClassName} np-text-body-large`, children: description }) : void 0
5063
3860
  ] });
5064
3861
  };
5065
3862
  var getHeaderStyle = (tags) => {
@@ -5070,8 +3867,8 @@ var getHeaderStyle = (tags) => {
5070
3867
  };
5071
3868
 
5072
3869
  // ../renderers/src/step/topbar/BackButton.tsx
5073
- var import_components61 = require("@transferwise/components");
5074
- var import_icons6 = require("@transferwise/icons");
3870
+ var import_components56 = require("@transferwise/components");
3871
+ var import_icons5 = require("@transferwise/icons");
5075
3872
  var import_react_intl27 = require("react-intl");
5076
3873
 
5077
3874
  // ../renderers/src/messages/back.messages.ts
@@ -5085,31 +3882,31 @@ var back_messages_default = (0, import_react_intl26.defineMessages)({
5085
3882
  });
5086
3883
 
5087
3884
  // ../renderers/src/step/topbar/BackButton.tsx
5088
- var import_jsx_runtime86 = require("react/jsx-runtime");
3885
+ var import_jsx_runtime79 = require("react/jsx-runtime");
5089
3886
  function BackButton({ title, onClick }) {
5090
3887
  const { formatMessage } = (0, import_react_intl27.useIntl)();
5091
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_components61.IconButton, { className: "df-back-button", priority: "tertiary", onClick, children: [
5092
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "sr-only", children: title != null ? title : formatMessage(back_messages_default.back) }),
5093
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_icons6.ArrowLeft, {})
3888
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_components56.IconButton, { className: "df-back-button", priority: "tertiary", onClick, children: [
3889
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "sr-only", children: title != null ? title : formatMessage(back_messages_default.back) }),
3890
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_icons5.ArrowLeft, {})
5094
3891
  ] });
5095
3892
  }
5096
3893
 
5097
3894
  // ../renderers/src/step/topbar/Toolbar.tsx
5098
- var import_components62 = require("@transferwise/components");
5099
- var import_jsx_runtime87 = require("react/jsx-runtime");
3895
+ var import_components57 = require("@transferwise/components");
3896
+ var import_jsx_runtime80 = require("react/jsx-runtime");
5100
3897
  var Toolbar = ({ items }) => {
5101
- return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "df-toolbar", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(ToolbarButton, __spreadValues({}, item), `${item.type}-${index}-${item.title}`)) }) : null;
3898
+ return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "df-toolbar", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(ToolbarButton, __spreadValues({}, item), `${item.type}-${index}-${item.title}`)) }) : null;
5102
3899
  };
5103
3900
  function ToolbarButton(props) {
5104
- return prefersMedia(props.control) ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(TextToolbarButton, __spreadValues({}, props));
3901
+ return prefersMedia(props.control) ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(TextToolbarButton, __spreadValues({}, props));
5105
3902
  }
5106
3903
  function MediaToolbarButton(props) {
5107
3904
  var _a;
5108
3905
  const { context, control, media, accessibilityDescription, disabled, onClick } = props;
5109
3906
  const priority = getIconButtonPriority(control);
5110
3907
  const type = getSentiment2(context);
5111
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
5112
- import_components62.IconButton,
3908
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
3909
+ import_components57.IconButton,
5113
3910
  {
5114
3911
  className: "df-toolbar-button",
5115
3912
  disabled,
@@ -5118,7 +3915,7 @@ function MediaToolbarButton(props) {
5118
3915
  type,
5119
3916
  onClick,
5120
3917
  children: [
5121
- accessibilityDescription ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "sr-only", children: accessibilityDescription }) : null,
3918
+ accessibilityDescription ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "sr-only", children: accessibilityDescription }) : null,
5122
3919
  media ? (_a = getAddonStartMedia(media)) == null ? void 0 : _a.value : null
5123
3920
  ]
5124
3921
  }
@@ -5129,8 +3926,8 @@ function TextToolbarButton(props) {
5129
3926
  const addonStart = media ? getAddonStartMedia(media) : void 0;
5130
3927
  const priority = getPriority2(control);
5131
3928
  const sentiment = getSentiment2(context);
5132
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
5133
- import_components62.Button,
3929
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
3930
+ import_components57.Button,
5134
3931
  {
5135
3932
  v2: true,
5136
3933
  size: "sm",
@@ -5159,18 +3956,18 @@ var getIconButtonPriority = (control) => {
5159
3956
  };
5160
3957
 
5161
3958
  // ../renderers/src/step/topbar/TopBar.tsx
5162
- var import_jsx_runtime88 = require("react/jsx-runtime");
3959
+ var import_jsx_runtime81 = require("react/jsx-runtime");
5163
3960
  function TopBar({ back, toolbar, tags }) {
5164
3961
  const isBackAllowed = !(tags == null ? void 0 : tags.includes("non-dismissible"));
5165
3962
  const backCTA = isBackAllowed ? back : void 0;
5166
- return backCTA || toolbar ? /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "d-flex m-b-2", children: [
5167
- backCTA ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(BackButton, __spreadValues({}, backCTA)) : null,
5168
- toolbar ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Toolbar, __spreadValues({}, toolbar)) : null
3963
+ return backCTA || toolbar ? /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "d-flex m-b-2", children: [
3964
+ backCTA ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(BackButton, __spreadValues({}, backCTA)) : null,
3965
+ toolbar ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Toolbar, __spreadValues({}, toolbar)) : null
5169
3966
  ] }) : null;
5170
3967
  }
5171
3968
 
5172
3969
  // ../renderers/src/step/SplashCelebrationStepRenderer.tsx
5173
- var import_jsx_runtime89 = require("react/jsx-runtime");
3970
+ var import_jsx_runtime82 = require("react/jsx-runtime");
5174
3971
  var SplashCelebrationStepRenderer = {
5175
3972
  canRenderType: "step",
5176
3973
  canRender: ({ control }) => control === "splash-celebration",
@@ -5179,16 +3976,16 @@ var SplashCelebrationStepRenderer = {
5179
3976
  function SplashCelebrationStepRendererComponent(props) {
5180
3977
  const { back, title, description, toolbar, children, footer, tags, trackEvent } = props;
5181
3978
  useCustomTheme("forest-green", trackEvent);
5182
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "splash-screen m-t-5", children: [
5183
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(TopBar, { back, toolbar, tags }),
5184
- title || description ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(StepHeader, { title, description, tags }) }) : void 0,
3979
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "splash-screen m-t-5", children: [
3980
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(TopBar, { back, toolbar, tags }),
3981
+ title || description ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(StepHeader, { title, description, tags }) }) : void 0,
5185
3982
  children,
5186
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(StepFooter, { footer, tags })
3983
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(StepFooter, { footer, tags })
5187
3984
  ] });
5188
3985
  }
5189
3986
 
5190
3987
  // ../renderers/src/step/SplashStepRenderer.tsx
5191
- var import_jsx_runtime90 = require("react/jsx-runtime");
3988
+ var import_jsx_runtime83 = require("react/jsx-runtime");
5192
3989
  var SplashStepRenderer = {
5193
3990
  canRenderType: "step",
5194
3991
  canRender: ({ control }) => control === "splash",
@@ -5196,63 +3993,63 @@ var SplashStepRenderer = {
5196
3993
  };
5197
3994
  function SplashStepRendererComponent(props) {
5198
3995
  const { back, title, description, toolbar, children, footer, tags } = props;
5199
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "splash-screen m-t-5", children: [
5200
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(TopBar, { back, toolbar, tags }),
5201
- title || description ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(StepHeader, { title, description, tags }) }) : void 0,
3996
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "splash-screen m-t-5", children: [
3997
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(TopBar, { back, toolbar, tags }),
3998
+ title || description ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(StepHeader, { title, description, tags }) }) : void 0,
5202
3999
  children,
5203
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(StepFooter, { footer, tags })
4000
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(StepFooter, { footer, tags })
5204
4001
  ] });
5205
4002
  }
5206
4003
 
5207
4004
  // ../renderers/src/step/StepRenderer.tsx
5208
- var import_components63 = require("@transferwise/components");
5209
- var import_jsx_runtime91 = require("react/jsx-runtime");
4005
+ var import_components58 = require("@transferwise/components");
4006
+ var import_jsx_runtime84 = require("react/jsx-runtime");
5210
4007
  var StepRenderer = {
5211
4008
  canRenderType: "step",
5212
4009
  render: StepRendererComponent
5213
4010
  };
5214
4011
  function StepRendererComponent(props) {
5215
4012
  const { back, description, error, title, children, toolbar, footer, tags } = props;
5216
- return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { children: [
5217
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(TopBar, { back, toolbar, tags }),
5218
- title || description ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(StepHeader, { title, description, tags }) }) : void 0,
5219
- error ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_components63.Alert, { type: "negative", className: "m-b-2", message: error }) : null,
4013
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { children: [
4014
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(TopBar, { back, toolbar, tags }),
4015
+ title || description ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(StepHeader, { title, description, tags }) }) : void 0,
4016
+ error ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_components58.Alert, { type: "negative", className: "m-b-2", message: error }) : null,
5220
4017
  children,
5221
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(StepFooter, { footer, tags })
4018
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(StepFooter, { footer, tags })
5222
4019
  ] });
5223
4020
  }
5224
4021
 
5225
4022
  // ../renderers/src/TabsRenderer.tsx
5226
- var import_components64 = require("@transferwise/components");
4023
+ var import_components59 = require("@transferwise/components");
5227
4024
  var import_react22 = require("react");
5228
- var import_jsx_runtime92 = require("react/jsx-runtime");
4025
+ var import_jsx_runtime85 = require("react/jsx-runtime");
5229
4026
  var TabsRenderer = {
5230
4027
  canRenderType: "tabs",
5231
4028
  render: (props) => {
5232
4029
  switch (props.control) {
5233
4030
  case "segmented":
5234
4031
  if (props.tabs.length > 3) {
5235
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(TabsRendererComponent, __spreadValues({}, props));
4032
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(TabsRendererComponent, __spreadValues({}, props));
5236
4033
  }
5237
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(SegmentedTabsRendererComponent, __spreadValues({}, props));
4034
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(SegmentedTabsRendererComponent, __spreadValues({}, props));
5238
4035
  case "chips":
5239
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ChipsTabsRendererComponent, __spreadValues({}, props));
4036
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ChipsTabsRendererComponent, __spreadValues({}, props));
5240
4037
  default:
5241
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(TabsRendererComponent, __spreadValues({}, props));
4038
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(TabsRendererComponent, __spreadValues({}, props));
5242
4039
  }
5243
4040
  }
5244
4041
  };
5245
4042
  function TabsRendererComponent({ uid, margin, tabs }) {
5246
4043
  const [selectedIndex, setSelectedIndex] = (0, import_react22.useState)(0);
5247
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
5248
- import_components64.Tabs,
4044
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
4045
+ import_components59.Tabs,
5249
4046
  {
5250
4047
  name: uid,
5251
4048
  selected: selectedIndex != null ? selectedIndex : 0,
5252
4049
  tabs: tabs.map((option) => ({
5253
4050
  title: option.title,
5254
4051
  disabled: false,
5255
- content: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "m-t-2", children: [
4052
+ content: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "m-t-2", children: [
5256
4053
  " ",
5257
4054
  option.children,
5258
4055
  " "
@@ -5265,9 +4062,9 @@ function TabsRendererComponent({ uid, margin, tabs }) {
5265
4062
  function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
5266
4063
  var _a;
5267
4064
  const [selectedIndex, setSelectedIndex] = (0, import_react22.useState)(0);
5268
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: getMargin(margin), children: [
5269
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
5270
- import_components64.SegmentedControl,
4065
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: getMargin(margin), children: [
4066
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
4067
+ import_components59.SegmentedControl,
5271
4068
  {
5272
4069
  name: uid,
5273
4070
  value: String(selectedIndex),
@@ -5281,31 +4078,31 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
5281
4078
  onChange: (value) => setSelectedIndex(Number(value))
5282
4079
  }
5283
4080
  ),
5284
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
4081
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
5285
4082
  ] });
5286
4083
  }
5287
4084
  function ChipsTabsRendererComponent({ margin, tabs }) {
5288
4085
  var _a;
5289
4086
  const [selectedIndex, setSelectedIndex] = (0, import_react22.useState)(0);
5290
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: getMargin(margin), children: [
5291
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "chips-container", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
5292
- import_components64.Chips,
4087
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: getMargin(margin), children: [
4088
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "chips-container", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
4089
+ import_components59.Chips,
5293
4090
  {
5294
4091
  chips: tabs.map((tab, index) => ({ label: tab.title, value: index })),
5295
4092
  selected: selectedIndex,
5296
4093
  onChange: ({ selectedValue }) => setSelectedIndex(Number(selectedValue))
5297
4094
  }
5298
4095
  ) }),
5299
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
4096
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
5300
4097
  ] });
5301
4098
  }
5302
4099
 
5303
4100
  // ../renderers/src/TextInputRenderer.tsx
5304
- var import_components66 = require("@transferwise/components");
4101
+ var import_components61 = require("@transferwise/components");
5305
4102
 
5306
4103
  // ../renderers/src/components/VariableTextInput.tsx
5307
- var import_components65 = require("@transferwise/components");
5308
- var import_jsx_runtime93 = require("react/jsx-runtime");
4104
+ var import_components60 = require("@transferwise/components");
4105
+ var import_jsx_runtime86 = require("react/jsx-runtime");
5309
4106
  var commonKeys = [
5310
4107
  "autoComplete",
5311
4108
  "autoCapitalize",
@@ -5324,12 +4121,12 @@ function VariableTextInput(inputProps) {
5324
4121
  const commonProps = __spreadProps(__spreadValues({}, pick(inputProps, ...commonKeys)), { name: id });
5325
4122
  switch (control) {
5326
4123
  case "email":
5327
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
4124
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
5328
4125
  case "password":
5329
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
4126
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
5330
4127
  case "numeric": {
5331
4128
  const numericProps = __spreadProps(__spreadValues({}, commonProps), { type: "number", onWheel });
5332
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
4129
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
5333
4130
  TextInput,
5334
4131
  __spreadProps(__spreadValues({}, numericProps), {
5335
4132
  onChange: (newValue) => {
@@ -5340,21 +4137,21 @@ function VariableTextInput(inputProps) {
5340
4137
  );
5341
4138
  }
5342
4139
  case "phone-number":
5343
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_components65.PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
4140
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_components60.PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
5344
4141
  default: {
5345
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
4142
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
5346
4143
  }
5347
4144
  }
5348
4145
  }
5349
4146
  function TextInput(props) {
5350
4147
  const _a = props, { control, displayFormat, onChange } = _a, commonProps = __objRest(_a, ["control", "displayFormat", "onChange"]);
5351
- const InputWithPattern = control === "textarea" ? import_components65.TextareaWithDisplayFormat : import_components65.InputWithDisplayFormat;
5352
- const InputWithoutPattern = control === "textarea" ? import_components65.TextArea : import_components65.Input;
5353
- return displayFormat ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { onChange: (e) => onChange(e.target.value) }));
4148
+ const InputWithPattern = control === "textarea" ? import_components60.TextareaWithDisplayFormat : import_components60.InputWithDisplayFormat;
4149
+ const InputWithoutPattern = control === "textarea" ? import_components60.TextArea : import_components60.Input;
4150
+ return displayFormat ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { onChange: (e) => onChange(e.target.value) }));
5354
4151
  }
5355
4152
 
5356
4153
  // ../renderers/src/TextInputRenderer.tsx
5357
- var import_jsx_runtime94 = require("react/jsx-runtime");
4154
+ var import_jsx_runtime87 = require("react/jsx-runtime");
5358
4155
  var TextInputRenderer = {
5359
4156
  canRenderType: "input-text",
5360
4157
  render: (props) => {
@@ -5387,7 +4184,7 @@ var TextInputRenderer = {
5387
4184
  }
5388
4185
  }
5389
4186
  });
5390
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
4187
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
5391
4188
  FieldInput_default,
5392
4189
  {
5393
4190
  id,
@@ -5398,7 +4195,7 @@ var TextInputRenderer = {
5398
4195
  loadingState: props.fieldLoadingState,
5399
4196
  help,
5400
4197
  features: props.features,
5401
- children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_components66.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(VariableTextInput, __spreadValues({}, inputProps)) })
4198
+ children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_components61.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(VariableTextInput, __spreadValues({}, inputProps)) })
5402
4199
  }
5403
4200
  );
5404
4201
  }
@@ -5406,13 +4203,13 @@ var TextInputRenderer = {
5406
4203
  var TextInputRenderer_default = TextInputRenderer;
5407
4204
 
5408
4205
  // ../renderers/src/UploadInputRenderer.tsx
5409
- var import_components67 = require("@transferwise/components");
4206
+ var import_components62 = require("@transferwise/components");
5410
4207
 
5411
4208
  // ../renderers/src/utils/getRandomId.ts
5412
4209
  var getRandomId = () => Math.random().toString(36).substring(2);
5413
4210
 
5414
4211
  // ../renderers/src/UploadInputRenderer.tsx
5415
- var import_jsx_runtime95 = require("react/jsx-runtime");
4212
+ var import_jsx_runtime88 = require("react/jsx-runtime");
5416
4213
  var UploadInputRenderer = {
5417
4214
  canRenderType: "input-upload",
5418
4215
  render: (props) => {
@@ -5439,7 +4236,7 @@ var UploadInputRenderer = {
5439
4236
  };
5440
4237
  return (
5441
4238
  // We don't pass help here as there is no sensible place to display it
5442
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
4239
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
5443
4240
  UploadFieldInput_default,
5444
4241
  {
5445
4242
  id,
@@ -5447,8 +4244,8 @@ var UploadInputRenderer = {
5447
4244
  description: void 0,
5448
4245
  validation: validationState,
5449
4246
  features,
5450
- children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
5451
- import_components67.UploadInput,
4247
+ children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
4248
+ import_components62.UploadInput,
5452
4249
  {
5453
4250
  id,
5454
4251
  description,
@@ -5458,7 +4255,7 @@ var UploadInputRenderer = {
5458
4255
  {
5459
4256
  id: "my-file",
5460
4257
  filename: value.name,
5461
- status: (validationState == null ? void 0 : validationState.status) === "invalid" ? import_components67.Status.FAILED : import_components67.Status.SUCCEEDED
4258
+ status: (validationState == null ? void 0 : validationState.status) === "invalid" ? import_components62.Status.FAILED : import_components62.Status.SUCCEEDED
5462
4259
  }
5463
4260
  ] : void 0,
5464
4261
  fileTypes: acceptsToFileTypes(accepts),
@@ -5515,7 +4312,7 @@ var LargeUploadRenderer = {
5515
4312
  };
5516
4313
  const filetypes = acceptsToFileTypes(accepts);
5517
4314
  const usAccept = filetypes === "*" ? "*" : filetypes.join(",");
5518
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
4315
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
5519
4316
  FieldInput_default,
5520
4317
  {
5521
4318
  id,
@@ -5524,8 +4321,8 @@ var LargeUploadRenderer = {
5524
4321
  validation: validationState,
5525
4322
  help,
5526
4323
  features,
5527
- children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
5528
- import_components67.Upload,
4324
+ children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
4325
+ import_components62.Upload,
5529
4326
  __spreadProps(__spreadValues({}, uploadProps), {
5530
4327
  usAccept,
5531
4328
  usDisabled: disabled,
@@ -5540,9 +4337,9 @@ var LargeUploadRenderer = {
5540
4337
  };
5541
4338
 
5542
4339
  // ../renderers/src/UpsellRenderer.tsx
5543
- var import_components68 = require("@transferwise/components");
4340
+ var import_components63 = require("@transferwise/components");
5544
4341
  var import_react23 = require("react");
5545
- var import_jsx_runtime96 = require("react/jsx-runtime");
4342
+ var import_jsx_runtime89 = require("react/jsx-runtime");
5546
4343
  var UpsellRenderer = {
5547
4344
  canRenderType: "upsell",
5548
4345
  render: UpsellRendererComponent
@@ -5550,8 +4347,8 @@ var UpsellRenderer = {
5550
4347
  function UpsellRendererComponent(props) {
5551
4348
  const { text, callToAction, media, margin, onDismiss } = props;
5552
4349
  const [isVisible, setIsVisible] = (0, import_react23.useState)(true);
5553
- return isVisible ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
5554
- import_components68.Nudge,
4350
+ return isVisible ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
4351
+ import_components63.Nudge,
5555
4352
  {
5556
4353
  className: getMargin(margin),
5557
4354
  mediaName: getMediaName(media),
@@ -5597,9 +4394,9 @@ var supportedMediaNames = [
5597
4394
  ];
5598
4395
 
5599
4396
  // ../renderers/src/ButtonRenderer/CircularButtonRenderer.tsx
5600
- var import_components69 = require("@transferwise/components");
4397
+ var import_components64 = require("@transferwise/components");
5601
4398
  var import_classnames8 = __toESM(require_classnames());
5602
- var import_jsx_runtime97 = require("react/jsx-runtime");
4399
+ var import_jsx_runtime90 = require("react/jsx-runtime");
5603
4400
  var CircularButtonRenderer = {
5604
4401
  canRenderType: "button",
5605
4402
  canRender: ({ control }) => control === "circular",
@@ -5609,8 +4406,8 @@ function CircularButtonComponent(props) {
5609
4406
  var _a;
5610
4407
  const { context, disabled, margin, media, tags, title, onClick } = props;
5611
4408
  const priority = tags == null ? void 0 : tags.find((tag) => tag === "primary" || tag === "secondary");
5612
- return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: (0, import_classnames8.default)(getMargin(margin), "df-button", "circular"), children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
5613
- import_components69.CircularButton,
4409
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: (0, import_classnames8.default)(getMargin(margin), "df-button", "circular"), children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
4410
+ import_components64.CircularButton,
5614
4411
  {
5615
4412
  disabled,
5616
4413
  priority: priority != null ? priority : "secondary",
@@ -5629,7 +4426,6 @@ var getWiseRenderers = () => [
5629
4426
  CheckboxInputRenderer_default,
5630
4427
  CircularButtonRenderer,
5631
4428
  BoxRenderer_default,
5632
- CollectionRenderer_default,
5633
4429
  ButtonRenderer,
5634
4430
  ColumnsRenderer_default,
5635
4431
  DateInputRenderer_default,
@@ -5673,13 +4469,13 @@ var getWiseRenderers = () => [
5673
4469
  ];
5674
4470
 
5675
4471
  // ../renderers/src/InitialLoadingStateRenderer.tsx
5676
- var import_components70 = require("@transferwise/components");
5677
- var import_jsx_runtime98 = require("react/jsx-runtime");
4472
+ var import_components65 = require("@transferwise/components");
4473
+ var import_jsx_runtime91 = require("react/jsx-runtime");
5678
4474
  var InitialLoadingStateRenderer = {
5679
4475
  canRenderType: "loading-state",
5680
4476
  canRender: ({ stepLoadingState }) => stepLoadingState === "initial",
5681
- render: () => /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
5682
- import_components70.Loader,
4477
+ render: () => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
4478
+ import_components65.Loader,
5683
4479
  {
5684
4480
  size: "md",
5685
4481
  classNames: { "tw-loader": `tw-loader m-x-auto ${getMargin("md")}` },
@@ -5690,25 +4486,25 @@ var InitialLoadingStateRenderer = {
5690
4486
 
5691
4487
  // src/dynamicFlow/DynamicFlowModal.tsx
5692
4488
  var import_dynamic_flow_client = require("@wise/dynamic-flow-client");
5693
- var import_components71 = require("@transferwise/components");
5694
- var import_jsx_runtime99 = require("react/jsx-runtime");
4489
+ var import_components66 = require("@transferwise/components");
4490
+ var import_jsx_runtime92 = require("react/jsx-runtime");
5695
4491
  function DynamicFlowModal(props) {
5696
4492
  const _a = props, { className = "" } = _a, rest = __objRest(_a, ["className"]);
5697
4493
  const dfProps = useWiseToCoreProps(rest);
5698
4494
  const df = (0, import_dynamic_flow_client.useDynamicFlowModal)(dfProps);
5699
- return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
5700
- import_components71.Modal,
4495
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
4496
+ import_components66.Modal,
5701
4497
  __spreadProps(__spreadValues({
5702
4498
  className: `dynamic-flow-modal ${className}`,
5703
4499
  disableDimmerClickToClose: true
5704
4500
  }, df.modal), {
5705
- body: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "dynamic-flow-modal", children: df.modal.body })
4501
+ body: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "dynamic-flow-modal", children: df.modal.body })
5706
4502
  })
5707
4503
  );
5708
4504
  }
5709
4505
 
5710
4506
  // src/dynamicFlow/getMergedRenderers.tsx
5711
- var import_jsx_runtime100 = require("react/jsx-runtime");
4507
+ var import_jsx_runtime93 = require("react/jsx-runtime");
5712
4508
  var wiseRenderers = getWiseRenderers();
5713
4509
  var getMergedRenderers = (props) => {
5714
4510
  var _d, _e;
@@ -5722,7 +4518,7 @@ var getMergedRenderers = (props) => {
5722
4518
  method: initialRequest.method,
5723
4519
  data: initialRequest.body
5724
4520
  };
5725
- return presentation.type === "push" ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(DynamicFlow, __spreadProps(__spreadValues(__spreadValues({}, restProps), rest), { features: subflowFeatures, initialAction: action })) : /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
4521
+ return presentation.type === "push" ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(DynamicFlow, __spreadProps(__spreadValues(__spreadValues({}, restProps), rest), { features: subflowFeatures, initialAction: action })) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
5726
4522
  DynamicFlowModal,
5727
4523
  __spreadProps(__spreadValues(__spreadValues({}, restProps), rest), {
5728
4524
  features: subflowFeatures,
@@ -5916,13 +4712,13 @@ var openLinkInNewTab = (url) => {
5916
4712
  };
5917
4713
 
5918
4714
  // src/dynamicFlow/DynamicFlow.tsx
5919
- var import_jsx_runtime101 = require("react/jsx-runtime");
4715
+ var import_jsx_runtime94 = require("react/jsx-runtime");
5920
4716
  function DynamicFlow(props) {
5921
4717
  const { className = "" } = props;
5922
4718
  const dfProps = useWiseToCoreProps(props);
5923
4719
  const df = (0, import_dynamic_flow_client4.useDynamicFlow)(dfProps);
5924
4720
  const { onContextMenu, contextMenu } = useDFContextMenu(df.controller);
5925
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className, onContextMenu, children: [
4721
+ return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className, onContextMenu, children: [
5926
4722
  df.view,
5927
4723
  contextMenu
5928
4724
  ] });
@@ -5931,7 +4727,7 @@ function DynamicFlow(props) {
5931
4727
  // src/dynamicFlow/DynamicFlowWithRef.tsx
5932
4728
  var import_react27 = require("react");
5933
4729
  var import_dynamic_flow_client5 = require("@wise/dynamic-flow-client");
5934
- var import_jsx_runtime102 = require("react/jsx-runtime");
4730
+ var import_jsx_runtime95 = require("react/jsx-runtime");
5935
4731
  var DynamicFlowWithRef = (0, import_react27.forwardRef)(function DynamicFlowWithRef2(props, ref) {
5936
4732
  const { className = "" } = props;
5937
4733
  const dfProps = useWiseToCoreProps(props);
@@ -5947,14 +4743,14 @@ var DynamicFlowWithRef = (0, import_react27.forwardRef)(function DynamicFlowWith
5947
4743
  }),
5948
4744
  [df]
5949
4745
  );
5950
- return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className, children: df.view });
4746
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className, children: df.view });
5951
4747
  });
5952
4748
 
5953
4749
  // src/index.ts
5954
4750
  var import_dynamic_flow_client8 = require("@wise/dynamic-flow-client");
5955
4751
 
5956
4752
  // src/dynamicFlow/renderers.tsx
5957
- var Header10 = Header;
4753
+ var Header10 = Header5;
5958
4754
  var Media2 = Media;
5959
4755
  var getMargin2 = getMargin;
5960
4756