@wise/dynamic-flow-client-internal 3.1.0 → 3.1.2

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
@@ -51,14 +51,14 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
51
51
  var require_main_min = __commonJS({
52
52
  "../core/build/main.min.js"(exports, module2) {
53
53
  "use strict";
54
- var sg = Object.create;
54
+ var mg = Object.create;
55
55
  var br = Object.defineProperty;
56
- var mg = Object.defineProperties;
57
- var lg = Object.getOwnPropertyDescriptor;
58
- var cg = Object.getOwnPropertyDescriptors;
59
- var dg = Object.getOwnPropertyNames;
56
+ var lg = Object.defineProperties;
57
+ var cg = Object.getOwnPropertyDescriptor;
58
+ var dg = Object.getOwnPropertyDescriptors;
59
+ var pg = Object.getOwnPropertyNames;
60
60
  var rn = Object.getOwnPropertySymbols;
61
- var pg = Object.getPrototypeOf;
61
+ var ug = Object.getPrototypeOf;
62
62
  var _a = Object.prototype.hasOwnProperty;
63
63
  var nm = Object.prototype.propertyIsEnumerable;
64
64
  var rm = (e, t, o) => t in e ? br(e, t, { enumerable: true, configurable: true, writable: true, value: o }) : e[t] = o;
@@ -70,7 +70,7 @@ var require_main_min = __commonJS({
70
70
  nm.call(t, o) && rm(e, o, t[o]);
71
71
  return e;
72
72
  };
73
- var C = (e, t) => mg(e, cg(t));
73
+ var C = (e, t) => lg(e, dg(t));
74
74
  var am = (e) => typeof e == "symbol" ? e : e + "";
75
75
  var E = (e, t) => {
76
76
  var o = {};
@@ -83,19 +83,19 @@ var require_main_min = __commonJS({
83
83
  };
84
84
  var im = (e, t) => () => (e && (t = e(e = 0)), t);
85
85
  var Ka = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports);
86
- var ug = (e, t) => {
86
+ var yg = (e, t) => {
87
87
  for (var o in t)
88
88
  br(e, o, { get: t[o], enumerable: true });
89
89
  };
90
90
  var sm = (e, t, o, r) => {
91
91
  if (t && typeof t == "object" || typeof t == "function")
92
- for (let n of dg(t))
93
- !_a.call(e, n) && n !== o && br(e, n, { get: () => t[n], enumerable: !(r = lg(t, n)) || r.enumerable });
92
+ for (let n of pg(t))
93
+ !_a.call(e, n) && n !== o && br(e, n, { get: () => t[n], enumerable: !(r = cg(t, n)) || r.enumerable });
94
94
  return e;
95
95
  };
96
- var pe = (e, t, o) => (o = e != null ? sg(pg(e)) : {}, sm(t || !e || !e.__esModule ? br(o, "default", { value: e, enumerable: true }) : o, e));
97
- var yg = (e) => sm(br({}, "__esModule", { value: true }), e);
98
- var Re = Ka((Zv, Fn) => {
96
+ var pe = (e, t, o) => (o = e != null ? mg(ug(e)) : {}, sm(t || !e || !e.__esModule ? br(o, "default", { value: e, enumerable: true }) : o, e));
97
+ var fg = (e) => sm(br({}, "__esModule", { value: true }), e);
98
+ var Re = Ka((rP, Fn) => {
99
99
  "use strict";
100
100
  (function() {
101
101
  "use strict";
@@ -150,24 +150,24 @@ var require_main_min = __commonJS({
150
150
  var Li = im(() => {
151
151
  "use strict";
152
152
  });
153
- var fo;
153
+ var yo;
154
154
  var Dn;
155
- var KC;
155
+ var JC;
156
156
  var Di;
157
157
  var Lt;
158
- var vA;
159
- var PA;
158
+ var RA;
159
+ var kA;
160
160
  var Ti;
161
161
  var gc;
162
162
  var Cc = im(() => {
163
163
  "use strict";
164
164
  Li();
165
- fo = require("react"), Dn = require("react/jsx-runtime"), KC = "wise", Di = ({ code: e, intrinsicSize: t = 64, className: o = void 0 }) => {
166
- let [r, n] = (0, fo.useState)(null);
167
- (0, fo.useEffect)(() => {
165
+ yo = require("react"), Dn = require("react/jsx-runtime"), JC = "wise", Di = ({ code: e, intrinsicSize: t = 64, className: o = void 0 }) => {
166
+ let [r, n] = (0, yo.useState)(null);
167
+ (0, yo.useEffect)(() => {
168
168
  n(null);
169
169
  }, [e]);
170
- let a = t >= 150, i = r !== "unknown" ? `${e.toLowerCase()}${r == null && a ? "-detailed" : ""}` : KC;
170
+ let a = t >= 150, i = r !== "unknown" ? `${e.toLowerCase()}${r == null && a ? "-detailed" : ""}` : JC;
171
171
  return (0, Dn.jsx)("img", { className: hc(`wds-flag wds-flag-${i}`, o), src: `https://wise.com/web-art/assets/flags/${i}.svg`, alt: "", width: t, height: t, onError: () => {
172
172
  n((m) => m == null && a ? "simple" : "unknown");
173
173
  } });
@@ -175,7 +175,7 @@ var require_main_min = __commonJS({
175
175
  (function(e) {
176
176
  e.SMALL = "small", e.MEDIUM = "medium", e.LARGE = "large";
177
177
  })(Lt || (Lt = {}));
178
- vA = { [Lt.SMALL]: 200, [Lt.MEDIUM]: 300, [Lt.LARGE]: 500 }, PA = { [Lt.SMALL]: 200, [Lt.MEDIUM]: 300, [Lt.LARGE]: 500 };
178
+ RA = { [Lt.SMALL]: 200, [Lt.MEDIUM]: 300, [Lt.LARGE]: 500 }, kA = { [Lt.SMALL]: 200, [Lt.MEDIUM]: 300, [Lt.LARGE]: 500 };
179
179
  (function(e) {
180
180
  e.BELL = "bell", e.BRIEFCASE = "briefcase", e.BUSINESS_CARD = "business-card", e.CALENDAR = "calendar", e.CHECK_MARK = "check-mark", e.CLOSED_WINDOW = "closed-window", e.COIN_PILE_DOWN = "coin-pile-down", e.COIN_PILE_UP = "coin-pile-up", e.CONFETTI = "confetti", e.CONSTRUCTION_FENCE = "construction-fence", e.CONVERT = "convert", e.COOKIE = "cookie", e.DIGITAL_CARD_2 = "digital-card-2", e.DIGITAL_CARD = "digital-card", e.DOCUMENTS = "documents", e.DOOR = "door", e.ECO_CARD = "eco-card", e.ELECTRIC_PLUG = "electric-plug", e.EMAIL_SUCCESS = "email-success", e.EMAIL = "email", e.EXCLAMATION_MARK = "exclamation-mark", e.FLAG = "flag", e.FLOWER = "flower", e.GEAR = "gear", e.GLOBE = "globe", e.GRAPH = "graph", e.HEART_2 = "heart-2", e.HEART_3 = "heart-3", e.HEART_4 = "heart-4", e.HEART_5 = "heart-5", e.HEART = "heart", e.HOUSE = "house", e.ID_CARD = "id-card", e.INFINITE = "infinite", e.INVITE_LETTER = "invite-letter", e.JARS = "jars", e.KEY = "key", e.LIGHT_BULB = "light-bulb", e.LOCK = "lock", e.MAGNIFYING_GLASS = "magnifying-glass", e.MAP = "map", e.MARBLE_CARD_BUSINESS = "marble-card-business", e.MARBLE_CARD = "marble-card", e.MARBLE = "marble", e.MEGAPHONE = "megaphone", e.MULTI_CURRENCY = "multi-currency", e.ONE_INVITE_LETTER_OPENED = "one-invite-letter-opened", e.PALM_TREE = "palm-tree", e.PERCENTAGE = "percentage", e.PERSONAL_CARD = "personal-card", e.PHONES = "phones", e.PIE_CHART = "pie-chart", e.PLANE_2 = "plane-2", e.PLANE = "plane", e.PUZZLE_PIECES = "puzzle-pieces", e.QUESTION_MARK = "question-mark", e.RECEIVE = "receive", e.REMINDER_LETTER = "reminder-letter", e.SAND_TIMER = "sand-timer", e.SHOPPING_BAG = "shopping-bag", e.SKIP_AUTHENTICATION = "skip-authentication", e.SPEECH_BUBBLE = "speech-bubble", e.TOOL = "tool", e.TWO_INVITE_LETTERS_OPENED = "two-invite-letters-opened", e.WALLET = "wallet";
181
181
  })(Ti || (Ti = {}));
@@ -379,7 +379,7 @@ var require_main_min = __commonJS({
379
379
  } }).default;
380
380
  });
381
381
  });
382
- var Od = Ka((XO, zr) => {
382
+ var Od = Ka((tE, zr) => {
383
383
  "use strict";
384
384
  (function() {
385
385
  "use strict";
@@ -439,21 +439,21 @@ var require_main_min = __commonJS({
439
439
  } } }), t ? zr.exports = n : window.screenfull = n;
440
440
  })();
441
441
  });
442
- var vx = {};
443
- ug(vx, { DynamicFlow: () => xs, DynamicFlowRevamp: () => rg, JsonSchemaForm: () => vs, Layout: () => ke, convertStepToLayout: () => wr, inlineReferences: () => Mt, isValidSchema: () => ee, makeHttpClient: () => gn, translations: () => Bp });
444
- module2.exports = yg(vx);
442
+ var Rx = {};
443
+ yg(Rx, { DynamicFlow: () => xs, DynamicFlowRevamp: () => ng, JsonSchemaForm: () => vs, Layout: () => ke, convertStepToLayout: () => wr, inlineReferences: () => Mt, isValidSchema: () => ee, makeHttpClient: () => gn, translations: () => Bp });
444
+ module2.exports = fg(Rx);
445
445
  function wr(e, { displayStepTitle: t = true } = {}) {
446
446
  if (e.layout)
447
- return Mg(e, t);
447
+ return Rg(e, t);
448
448
  switch (e.type) {
449
449
  case "final":
450
- return Cg(e);
451
- case "decision":
452
450
  return Sg(e);
451
+ case "decision":
452
+ return bg(e);
453
453
  case "external":
454
- return fg(e);
454
+ return hg(e);
455
455
  default:
456
- return gg(e);
456
+ return Cg(e);
457
457
  }
458
458
  }
459
459
  function Ja(e) {
@@ -464,25 +464,25 @@ var require_main_min = __commonJS({
464
464
  }
465
465
  return e.description && t.push(Za(e.description)), t;
466
466
  }
467
- function fg(e) {
468
- return [...Ja(e), hg(e)];
469
- }
470
467
  function hg(e) {
471
- return { type: "external", requestUrl: e.requestUrl, polling: e.polling, responseHandlers: e.responseHandlers, retryTitle: e.retryTitle };
468
+ return [...Ja(e), gg(e)];
472
469
  }
473
470
  function gg(e) {
471
+ return { type: "external", requestUrl: e.requestUrl, polling: e.polling, responseHandlers: e.responseHandlers, retryTitle: e.retryTitle };
472
+ }
473
+ function Cg(e) {
474
474
  let t = Ja(e);
475
- if (e.reviewFields && t.push(vg(e.reviewFields)), e.schemas && t.push(...Ig(e)), e.actions) {
475
+ if (e.reviewFields && t.push(Pg(e.reviewFields)), e.schemas && t.push(...Ag(e)), e.actions) {
476
476
  let o = e.actions.map(nn);
477
477
  t.push(Xa(o, "md"));
478
478
  }
479
479
  return t;
480
480
  }
481
- function Cg(e) {
481
+ function Sg(e) {
482
482
  let t = [];
483
483
  if (e.details) {
484
484
  if (e.details.image) {
485
- let o = xg(e.details.image);
485
+ let o = vg(e.details.image);
486
486
  t.push(o);
487
487
  }
488
488
  e.details.title && t.push(Ya(e.details.title)), e.details.description && t.push(Za(e.details.description));
@@ -493,9 +493,9 @@ var require_main_min = __commonJS({
493
493
  }
494
494
  return t;
495
495
  }
496
- function Sg(e) {
496
+ function bg(e) {
497
497
  let t = Ja(e);
498
- return e.options && t.push(wg(e.options)), t;
498
+ return e.options && t.push(Fg(e.options)), t;
499
499
  }
500
500
  function Xa(e, t) {
501
501
  return { type: "box", width: t || "md", components: e };
@@ -506,48 +506,48 @@ var require_main_min = __commonJS({
506
506
  function Za(e) {
507
507
  return { type: "paragraph", text: e, align: "center" };
508
508
  }
509
- function bg(e) {
510
- return { type: "form", schema: e };
511
- }
512
509
  function wg(e) {
513
- return { type: "decision", options: e.map(Fg) };
510
+ return { type: "form", schema: e };
514
511
  }
515
512
  function Fg(e) {
513
+ return { type: "decision", options: e.map(xg) };
514
+ }
515
+ function xg(e) {
516
516
  return { title: e.title, description: e.description, action: { title: e.title, method: "GET", url: e.url, disabled: e.disabled } };
517
517
  }
518
518
  function mm(e) {
519
519
  return { type: "image", url: e.url, text: e.text, margin: e.margin || "lg", size: e.size || "md" };
520
520
  }
521
- function xg(e) {
521
+ function vg(e) {
522
522
  return typeof e == "string" ? { type: "image", url: e, text: void 0, margin: "lg", size: "md" } : mm(e);
523
523
  }
524
524
  function nn(e) {
525
525
  return { type: "button", action: C(s({}, e), { title: e.title }) };
526
526
  }
527
- function vg(e) {
528
- return { type: "review", title: e.title, fields: e.fields.map(Pg) };
529
- }
530
527
  function Pg(e) {
531
- return { label: e.title, value: e.value };
528
+ return { type: "review", title: e.title, fields: e.fields.map(Ig) };
532
529
  }
533
530
  function Ig(e) {
531
+ return { label: e.title, value: e.value };
532
+ }
533
+ function Ag(e) {
534
534
  let t = [];
535
535
  if (e.schemas && e.schemas[0]) {
536
- let o = e.schemas[0], r = bg(o);
537
- Ag() ? t.push(r) : t.push(Xa([r], "md"));
536
+ let o = e.schemas[0], r = wg(o);
537
+ Mg() ? t.push(r) : t.push(Xa([r], "md"));
538
538
  }
539
539
  return t;
540
540
  }
541
- function Ag() {
541
+ function Mg() {
542
542
  return false;
543
543
  }
544
- function Mg(e, t) {
544
+ function Rg(e, t) {
545
545
  return [...t && e.title ? [Ya(e.title)] : [], ...e.description ? [Za(e.description)] : [], ...e.layout || []];
546
546
  }
547
547
  function Mt({ layout: e, schemas: t, actions: o, model: r }) {
548
- return e ? t ? e.map((n) => n.type === "form" ? Rg({ formComponent: n, schemas: t }) : n.type === "decision" ? kg({ decisionComponent: n, actions: o }) : n.type === "button" ? Og({ actionComponent: n, actions: o }) : n.type === "box" ? C(s({}, n), { components: Mt({ layout: n.components, schemas: t, actions: o, model: r }) }) : n.type === "modal" ? C(s({}, n), { components: Mt({ layout: n.content.components, schemas: t, actions: o, model: r }) }) : n.type === "columns" ? C(s({}, n), { left: Mt({ layout: n.left, schemas: t, actions: o, model: r }), right: Mt({ layout: n.right, schemas: t, actions: o, model: r }) }) : n) : e : [];
548
+ return e ? t ? e.map((n) => n.type === "form" ? kg({ formComponent: n, schemas: t }) : n.type === "decision" ? Og({ decisionComponent: n, actions: o }) : n.type === "button" ? Eg({ actionComponent: n, actions: o }) : n.type === "box" ? C(s({}, n), { components: Mt({ layout: n.components, schemas: t, actions: o, model: r }) }) : n.type === "modal" ? C(s({}, n), { components: Mt({ layout: n.content.components, schemas: t, actions: o, model: r }) }) : n.type === "columns" ? C(s({}, n), { left: Mt({ layout: n.left, schemas: t, actions: o, model: r }), right: Mt({ layout: n.right, schemas: t, actions: o, model: r }) }) : n) : e : [];
549
549
  }
550
- function Rg({ formComponent: e, schemas: t }) {
550
+ function kg({ formComponent: e, schemas: t }) {
551
551
  if (e.schemaId)
552
552
  return { type: "form", margin: e.margin, schema: lm(t, e.schemaId) };
553
553
  if (e.schema && an(e.schema) && e.schema.$ref)
@@ -556,12 +556,12 @@ var require_main_min = __commonJS({
556
556
  return s({}, e);
557
557
  throw new Error('Invalid form layout component. Missing "schema" or "schemaId" properties.');
558
558
  }
559
- function kg({ decisionComponent: e, actions: t }) {
559
+ function Og({ decisionComponent: e, actions: t }) {
560
560
  var r;
561
561
  let o = (r = e == null ? void 0 : e.options) == null ? void 0 : r.map((n) => n.action && an(n.action) ? C(s({}, n), { action: cm(t, n.action.$ref) }) : n);
562
562
  return C(s({}, e), { options: o });
563
563
  }
564
- function Og({ actionComponent: e, actions: t }) {
564
+ function Eg({ actionComponent: e, actions: t }) {
565
565
  var o;
566
566
  if (e.action && an(e.action) && ((o = e.action) != null && o.$ref)) {
567
567
  let r = cm(t, e.action.$ref);
@@ -591,11 +591,11 @@ var require_main_min = __commonJS({
591
591
  function dm() {
592
592
  let [e, t] = (0, sn.useState)(0);
593
593
  return { addPendingPromise: (0, sn.useCallback)((r) => {
594
- t((n) => n + 1), r.catch(Lg).finally(() => Eg(() => t((n) => Math.max(0, n - 1))));
594
+ t((n) => n + 1), r.catch(Tg).finally(() => Lg(() => t((n) => Math.max(0, n - 1))));
595
595
  }, [t]), pendingPromises: e };
596
596
  }
597
- var Eg = (e) => setTimeout(() => e(), 0);
598
- var Lg = () => {
597
+ var Lg = (e) => setTimeout(() => e(), 0);
598
+ var Tg = () => {
599
599
  };
600
600
  var fm = require("react/jsx-runtime");
601
601
  var pm = { loading: false, registerPersistAsyncPromise: (e) => {
@@ -645,9 +645,9 @@ var require_main_min = __commonJS({
645
645
  };
646
646
  var ei = require("react");
647
647
  var wm = require("react/jsx-runtime");
648
- var Tg = (0, ei.createContext)([]);
648
+ var Dg = (0, ei.createContext)([]);
649
649
  function bm({ features: e, children: t }) {
650
- return (0, wm.jsx)(Tg.Provider, { value: e, children: t });
650
+ return (0, wm.jsx)(Dg.Provider, { value: e, children: t });
651
651
  }
652
652
  function Fm(e) {
653
653
  return e >= 200 && e < 300;
@@ -669,10 +669,10 @@ var require_main_min = __commonJS({
669
669
  }
670
670
  function Pm(e, t) {
671
671
  var r;
672
- let o = t.oneOf.map((n) => Dg(e, n)).filter((n) => n !== null);
672
+ let o = t.oneOf.map((n) => Vg(e, n)).filter((n) => n !== null);
673
673
  return o.length === 0 ? null : (r = o.find((n) => n.some((a) => a !== null))) != null ? r : o[0];
674
674
  }
675
- function Dg(e, t) {
675
+ function Vg(e, t) {
676
676
  return !Rt(t) || !ht(t) ? null : ti(e, t);
677
677
  }
678
678
  function Im(e) {
@@ -719,7 +719,7 @@ var require_main_min = __commonJS({
719
719
  return re(n) && re(a) ? C(s({}, o), { [r]: Em(n, a) }) : C(s({}, o), { [r]: t[r] });
720
720
  }, s({}, e));
721
721
  }
722
- var Mo = (e, t) => re(e) ? Ne(e, t) : oi(e) ? Vg(e, t) : qt(e, t);
722
+ var Mo = (e, t) => re(e) ? Ne(e, t) : oi(e) ? Ng(e, t) : qt(e, t);
723
723
  function qt(e, t) {
724
724
  if (T(e))
725
725
  return null;
@@ -744,7 +744,7 @@ var require_main_min = __commonJS({
744
744
  function Ne(e, t) {
745
745
  return kt(t) || Rt(t) || T(e) ? null : t.allOf ? km(e, t) : t.oneOf ? Om(e, t) : !ue(t.const) && Ge(e, t.const) ? e : gt(t) ? Rm(e, t) : null;
746
746
  }
747
- function Vg(e, t) {
747
+ function Ng(e, t) {
748
748
  return rt(t) ? Pm(e, t) : Rt(t) ? ti(e, t) : null;
749
749
  }
750
750
  function Fr(e, t = false) {
@@ -791,7 +791,7 @@ var require_main_min = __commonJS({
791
791
  case "array":
792
792
  return Ro(e, t, o);
793
793
  case "object":
794
- return Ng(e, t);
794
+ return Bg(e, t);
795
795
  default:
796
796
  return [];
797
797
  }
@@ -833,69 +833,69 @@ var require_main_min = __commonJS({
833
833
  function Um(e, t) {
834
834
  return T(e) ? ["type"] : [];
835
835
  }
836
- function Ng(e, t) {
836
+ function Bg(e, t) {
837
837
  return re(e) ? W(t.required) ? t.required.map((r) => typeof e[r] != "undefined").reduce((r, n) => r && n, true) ? [] : ["required"] : [] : ["type"];
838
838
  }
839
- function Bg(e, t) {
839
+ function Ug(e, t) {
840
840
  return !ai(e, t).length;
841
841
  }
842
- function Ug(e, t) {
842
+ function zg(e, t) {
843
843
  return !dn(e, t).length;
844
844
  }
845
- function zg(e, t) {
845
+ function jg(e, t) {
846
846
  return !ii(e, t).length;
847
847
  }
848
- function jg(e, t) {
848
+ function Hg(e, t) {
849
849
  return !si(e, t).length;
850
850
  }
851
- function Hg(e, t) {
851
+ function qg(e, t) {
852
852
  return !mi(e, t).length;
853
853
  }
854
- function qg(e, t) {
855
- return !N(e) || t.type !== "object" || !N(t.properties) ? false : Object.keys(t.properties).map((o) => $g(e[o], t.properties[o], t.required && t.required.includes(o))).every((o) => o);
854
+ function $g(e, t) {
855
+ return !N(e) || t.type !== "object" || !N(t.properties) ? false : Object.keys(t.properties).map((o) => Gg(e[o], t.properties[o], t.required && t.required.includes(o))).every((o) => o);
856
856
  }
857
- function $g(e, t, o) {
857
+ function Gg(e, t, o) {
858
858
  return t.hidden ? true : typeof e == "undefined" ? !o : ee(e, t);
859
859
  }
860
- function Gg(e, t) {
860
+ function Wg(e, t) {
861
861
  return t.type !== "array" || !N(t.items) || Ro(e, t).length > 0 ? false : Array.isArray(e) && ht(t) && e.map((o) => ee(o, t.items)).every((o) => o);
862
862
  }
863
- function Wg(e, t) {
863
+ function _g(e, t) {
864
864
  return W(t.oneOf) ? t.oneOf.some((o) => ee(e, o)) : false;
865
865
  }
866
- function _g(e, t) {
866
+ function Kg(e, t) {
867
867
  return W(t.allOf) ? t.allOf.map((o) => ee(e, o)).every((o) => o) : false;
868
868
  }
869
- function Kg(e, t) {
869
+ function Jg(e, t) {
870
870
  return !Um(e, t).length;
871
871
  }
872
872
  function ee(e, t) {
873
873
  if (t.oneOf)
874
- return Wg(e, t);
875
- if (t.allOf)
876
874
  return _g(e, t);
875
+ if (t.allOf)
876
+ return Kg(e, t);
877
877
  if (t.const)
878
- return Hg(e, t);
878
+ return qg(e, t);
879
879
  switch (t.type) {
880
880
  case "string":
881
- return Bg(e, t);
882
- case "number":
883
881
  return Ug(e, t);
884
- case "integer":
882
+ case "number":
885
883
  return zg(e, t);
886
- case "boolean":
884
+ case "integer":
887
885
  return jg(e, t);
886
+ case "boolean":
887
+ return Hg(e, t);
888
888
  case "array":
889
- return Gg(e, t);
889
+ return Wg(e, t);
890
890
  case "object":
891
- return qg(e, t);
891
+ return $g(e, t);
892
892
  case "blob":
893
- return Kg(e, t);
893
+ return Jg(e, t);
894
894
  default:
895
895
  return false;
896
896
  }
897
897
  }
898
- function Jg(e) {
898
+ function Xg(e) {
899
899
  let t = new Date(e), o = String(t.getMonth() + 1), r = String(t.getDate()), n = t.getFullYear(), a = o.length < 2 ? `0${o}` : o, i = r.length < 2 ? `0${r}` : r;
900
900
  return [n, a, i].join("-");
901
901
  }
@@ -905,7 +905,7 @@ var require_main_min = __commonJS({
905
905
  let [t, o, r] = e.split("-").map((n) => parseInt(n, 10));
906
906
  return !$(t) || !$(o) || !$(r) ? null : new Date(t, o - 1, r);
907
907
  };
908
- var jm = (e) => Jg(e);
908
+ var jm = (e) => Xg(e);
909
909
  var $t = (e, t) => {
910
910
  let o, r, n = () => {
911
911
  o && (clearTimeout(o), o = null), r = null;
@@ -920,8 +920,8 @@ var require_main_min = __commonJS({
920
920
  o !== null && (e(...r), n());
921
921
  }, a;
922
922
  };
923
- var Ge = (e, t) => e === t ? true : Array.isArray(e) && Array.isArray(t) ? e.length === t.length && e.every((o, r) => Ge(o, t[r])) : !!(Hm(e) && Hm(t) && Xg(e, t));
924
- var Xg = (e, t) => {
923
+ var Ge = (e, t) => e === t ? true : Array.isArray(e) && Array.isArray(t) ? e.length === t.length && e.every((o, r) => Ge(o, t[r])) : !!(Hm(e) && Hm(t) && Yg(e, t));
924
+ var Yg = (e, t) => {
925
925
  let o = Object.keys(e), r = Object.keys(t);
926
926
  return o.length === r.length && o.every((n) => Object.hasOwnProperty.call(t, n) && Ge(e[n], t[n]));
927
927
  };
@@ -949,16 +949,16 @@ var require_main_min = __commonJS({
949
949
  function xr(e) {
950
950
  return !!e && !nt(e);
951
951
  }
952
- var Yg = (e) => !!e.readOnly && kt(e);
953
- var Zg = (e) => !!e.oneOf && !!e.promotion;
954
- var Qg = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean"]);
952
+ var Zg = (e) => !!e.readOnly && kt(e);
953
+ var Qg = (e) => !!e.oneOf && !!e.promotion;
954
+ var eC = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean"]);
955
955
  function kt(e) {
956
- return Qg.has(e.type || "") || "const" in e && e.const !== void 0 && !N(e.const);
956
+ return eC.has(e.type || "") || "const" in e && e.const !== void 0 && !N(e.const);
957
957
  }
958
958
  function gt(e) {
959
959
  return e.type === "object";
960
960
  }
961
- function ao(e) {
961
+ function no(e) {
962
962
  return rt(e) && e.oneOf.every((t) => t.type === "object");
963
963
  }
964
964
  function rt(e) {
@@ -983,25 +983,25 @@ var require_main_min = __commonJS({
983
983
  function yn(e) {
984
984
  return !!e.persistAsync;
985
985
  }
986
- function eC(e) {
987
- return yn(e) && (ko(e.persistAsync.schema) || tC(e.persistAsync.schema));
986
+ function tC(e) {
987
+ return yn(e) && (ko(e.persistAsync.schema) || oC(e.persistAsync.schema));
988
988
  }
989
989
  var ci = (e) => kt(e) && !!e.validationAsync;
990
- function tC(e) {
990
+ function oC(e) {
991
991
  return e.type === "string" && e.format === "base64url";
992
992
  }
993
993
  function Gm(e) {
994
994
  return e.type === "string" && e.format === "base64url";
995
995
  }
996
- var Wm = (e) => Rt(e) && ht(e) && eC(e.items);
997
- var io = (e) => Yg(e) ? "readOnly" : yn(e) ? "persistAsync" : ci(e) ? "validationAsync" : gt(e) ? "object" : Rt(e) ? "array" : Zg(e) ? "promotedOneOf" : rt(e) ? "oneOf" : li(e) ? "allOf" : kt(e) ? "basic" : null;
998
- var _m = (e) => oC(e) && rC(e) && nC(e);
999
- var oC = (e) => !e.type || e.type === "form";
1000
- var rC = (e) => {
996
+ var Wm = (e) => Rt(e) && ht(e) && tC(e.items);
997
+ var ao = (e) => Zg(e) ? "readOnly" : yn(e) ? "persistAsync" : ci(e) ? "validationAsync" : gt(e) ? "object" : Rt(e) ? "array" : Qg(e) ? "promotedOneOf" : rt(e) ? "oneOf" : li(e) ? "allOf" : kt(e) ? "basic" : null;
998
+ var _m = (e) => rC(e) && nC(e) && aC(e);
999
+ var rC = (e) => !e.type || e.type === "form";
1000
+ var nC = (e) => {
1001
1001
  var t;
1002
1002
  return ((t = e == null ? void 0 : e.actions) == null ? void 0 : t.length) === 1;
1003
1003
  };
1004
- var nC = (e) => {
1004
+ var aC = (e) => {
1005
1005
  if (!e.schemas)
1006
1006
  return false;
1007
1007
  let t = fn(e.schemas);
@@ -1021,10 +1021,10 @@ var require_main_min = __commonJS({
1021
1021
  var oi = (e) => W(e) ? e.length === 0 ? true : e.every((t) => typeof t == "string" || typeof t == "number" || typeof t == "boolean" || typeof t == "object") : false;
1022
1022
  var Km = (e) => T(e) ? true : oi(e);
1023
1023
  var vr = (e) => D(e) || T(e);
1024
- var Jm = () => iC() && (sC() || aC());
1025
- var aC = (e = window.navigator.userAgent) => /mobi|\b(iphone|android|blackberry|webos|windows phone)\b/i.test(e);
1026
- var iC = (e = window.screen.width, t = window.screen.height) => e < 768 || t < 768;
1027
- var sC = (e = window.navigator, t = window.matchMedia) => {
1024
+ var Jm = () => sC() && (mC() || iC());
1025
+ var iC = (e = window.navigator.userAgent) => /mobi|\b(iphone|android|blackberry|webos|windows phone)\b/i.test(e);
1026
+ var sC = (e = window.screen.width, t = window.screen.height) => e < 768 || t < 768;
1027
+ var mC = (e = window.navigator, t = window.matchMedia) => {
1028
1028
  if ("maxTouchPoints" in e)
1029
1029
  return e.maxTouchPoints > 0;
1030
1030
  let o = t == null ? void 0 : t("(pointer:coarse)");
@@ -1042,17 +1042,17 @@ var require_main_min = __commonJS({
1042
1042
  }, [e]), { requiresManualTrigger: !!(e && !t && !r), dismissConfirmation: a };
1043
1043
  }
1044
1044
  var Ir = require("react");
1045
- var so = require("react");
1045
+ var io = require("react");
1046
1046
  function Oo(e = "") {
1047
1047
  return !["https://", "http://", "data:"].some((t) => e.startsWith(t) && e.length > t.length);
1048
1048
  }
1049
1049
  var gn = (e, t) => (o, r) => {
1050
- let n = mC(o, e || "");
1050
+ let n = lC(o, e || "");
1051
1051
  return fetch(n, ui(r != null ? r : {}, { headers: t }));
1052
1052
  };
1053
- var mC = (e, t) => typeof e == "string" && Oo(e) ? t + e : e;
1054
- var ui = (e, t) => C(s(s({}, e), t), { headers: lC(e == null ? void 0 : e.headers, t == null ? void 0 : t.headers) });
1055
- var lC = (e, t) => {
1053
+ var lC = (e, t) => typeof e == "string" && Oo(e) ? t + e : e;
1054
+ var ui = (e, t) => C(s(s({}, e), t), { headers: cC(e == null ? void 0 : e.headers, t == null ? void 0 : t.headers) });
1055
+ var cC = (e, t) => {
1056
1056
  if (!e && !t)
1057
1057
  return {};
1058
1058
  let o = new Headers(e);
@@ -1061,19 +1061,19 @@ var require_main_min = __commonJS({
1061
1061
  return o;
1062
1062
  };
1063
1063
  var yi = require("react/jsx-runtime");
1064
- var Cn = (0, so.createContext)(void 0);
1064
+ var Cn = (0, io.createContext)(void 0);
1065
1065
  function Sn({ httpClient: e, children: t }) {
1066
1066
  return (0, yi.jsx)(Cn.Provider, { value: e, children: t });
1067
1067
  }
1068
1068
  function bn({ baseUrl: e, children: t }) {
1069
- let o = (0, so.useMemo)(() => gn(e), [e]);
1069
+ let o = (0, io.useMemo)(() => gn(e), [e]);
1070
1070
  return (0, yi.jsx)(Cn.Provider, { value: o, children: t });
1071
1071
  }
1072
1072
  var Se = () => {
1073
- let e = (0, so.useContext)(Cn);
1073
+ let e = (0, io.useContext)(Cn);
1074
1074
  return e != null ? e : fetch;
1075
1075
  };
1076
- var Qm = () => !!(0, so.useContext)(Cn);
1076
+ var Qm = () => !!(0, io.useContext)(Cn);
1077
1077
  function el(e, t) {
1078
1078
  let o = Se(), r = (0, Ir.useMemo)(() => {
1079
1079
  if (e)
@@ -1111,8 +1111,8 @@ var require_main_min = __commonJS({
1111
1111
  var bd = require("react");
1112
1112
  var wd = require("react-intl");
1113
1113
  var tl = require("react-intl");
1114
- var ve = (0, tl.defineMessages)({ genericErrorRetryHint: { id: "dynamicFlows.PersistAsyncSchema.genericError", defaultMessage: "Something went wrong, please try again.", description: "Generic error message for persist async schema" }, genericError: { id: "dynamicFlows.ErrorBoundary.errorAlert", defaultMessage: "Something went wrong.", description: "Generic error message for when something has gone wrong." }, retry: { id: "dynamicFlows.ErrorBoundary.retry", defaultMessage: "Retry", description: "Usually this follows the generic error and contains a link." } });
1115
- var bo = require("react");
1114
+ var xe = (0, tl.defineMessages)({ genericErrorRetryHint: { id: "dynamicFlows.PersistAsyncSchema.genericError", defaultMessage: "Something went wrong, please try again.", description: "Generic error message for persist async schema" }, genericError: { id: "dynamicFlows.ErrorBoundary.errorAlert", defaultMessage: "Something went wrong.", description: "Generic error message for when something has gone wrong." }, retry: { id: "dynamicFlows.ErrorBoundary.retry", defaultMessage: "Retry", description: "Usually this follows the generic error and contains a link." } });
1115
+ var So = require("react");
1116
1116
  var fd = require("react-intl");
1117
1117
  var ol = { DAY_MONTH_YEAR: "day-month-year", MONTH_YEAR: "month-year" };
1118
1118
  var j = { RADIO: "radio", CHECKBOX: "checkbox", SELECT: "select", EMAIL: "email", FILE: "file", DATE: "date", DATETIME: "date-time", DATELOOKUP: "date-lookup", TEL: "tel", NUMERIC: "numeric", NUMBER: "number", HIDDEN: "hidden", PASSWORD: "password", TEXT: "text", TEXTAREA: "textarea", UPLOAD: "upload", TAB: "tab" };
@@ -1123,17 +1123,17 @@ var require_main_min = __commonJS({
1123
1123
  var dl = require("@transferwise/components");
1124
1124
  var Lo = require("@transferwise/components");
1125
1125
  var il = require("react/jsx-runtime");
1126
- var Eo = (e) => cC(e) || dC(e);
1127
- var cC = (e) => pC.some((t) => e === `flag-${t}`);
1126
+ var Eo = (e) => dC(e) || pC(e);
1128
1127
  var dC = (e) => uC.some((t) => e === `flag-${t}`);
1128
+ var pC = (e) => yC.some((t) => e === `flag-${t}`);
1129
1129
  function al({ name: e }) {
1130
1130
  if (!Eo(e))
1131
1131
  return null;
1132
1132
  let t = e.substring(5);
1133
1133
  return (0, il.jsx)("img", { src: `https://wise.com/web-art/assets/flags/${t}.svg`, alt: "", "data-testid": `img-flag-${t}`, width: "24px" });
1134
1134
  }
1135
- var pC = ["aed", "ars", "aud", "bdt", "bgn", "bhd", "bnd", "brl", "bwp", "cad", "chf", "clp", "cny", "cop", "crc", "czk", "dkk", "egp", "eur", "fjd", "gbp", "gel", "ghs", "gtq", "hkd", "hrk", "huf", "idr", "ils", "imp", "inr", "isk", "jmd", "jpy", "kes", "krw", "kwd", "lak", "lkr", "lsl", "mad", "mur", "mxn", "myr", "mzn", "nad", "ngn", "nok", "npr", "nzd", "omr", "pab", "pen", "php", "pkr", "pln", "qar", "ron", "rub", "sar", "sek", "sgd", "thb", "tmt", "try", "twd", "tzs", "uah", "ugx", "usd", "uyu", "vnd", "xof", "zar", "zmw"];
1136
- var uC = ["ad", "ae", "ar", "at", "au", "bd", "be", "bg", "bh", "bn", "br", "bw", "ca", "ch", "cl", "cn", "co", "cr", "cy", "cz", "de", "dk", "ee", "eg", "es", "eu", "fi", "fj", "fr", "gb", "ge", "gg", "gh", "gp", "gr", "gt", "hk", "hr", "hu", "id", "ie", "il", "im", "in", "is", "it", "je", "jm", "jp", "ke", "kr", "kw", "la", "li", "lk", "ls", "lt", "lu", "lv", "ma", "mc", "mt", "mu", "mx", "my", "mz", "na", "ng", "nl", "no", "np", "nz", "om", "pa", "pe", "ph", "pk", "pl", "pt", "qa", "ro", "ru", "sa", "se", "sg", "si", "sk", "sm", "th", "tm", "tr", "tw", "tz", "ua", "ug", "us", "uy", "va", "vn", "wi", "xo", "za", "zm"];
1135
+ var uC = ["aed", "ars", "aud", "bdt", "bgn", "bhd", "bnd", "brl", "bwp", "cad", "chf", "clp", "cny", "cop", "crc", "czk", "dkk", "egp", "eur", "fjd", "gbp", "gel", "ghs", "gtq", "hkd", "hrk", "huf", "idr", "ils", "imp", "inr", "isk", "jmd", "jpy", "kes", "krw", "kwd", "lak", "lkr", "lsl", "mad", "mur", "mxn", "myr", "mzn", "nad", "ngn", "nok", "npr", "nzd", "omr", "pab", "pen", "php", "pkr", "pln", "qar", "ron", "rub", "sar", "sek", "sgd", "thb", "tmt", "try", "twd", "tzs", "uah", "ugx", "usd", "uyu", "vnd", "xof", "zar", "zmw"];
1136
+ var yC = ["ad", "ae", "ar", "at", "au", "bd", "be", "bg", "bh", "bn", "br", "bw", "ca", "ch", "cl", "cn", "co", "cr", "cy", "cz", "de", "dk", "ee", "eg", "es", "eu", "fi", "fj", "fr", "gb", "ge", "gg", "gh", "gp", "gr", "gt", "hk", "hr", "hu", "id", "ie", "il", "im", "in", "is", "it", "je", "jm", "jp", "ke", "kr", "kw", "la", "li", "lk", "ls", "lt", "lu", "lv", "ma", "mc", "mt", "mu", "mx", "my", "mz", "na", "ng", "nl", "no", "np", "nz", "om", "pa", "pe", "ph", "pk", "pl", "pt", "qa", "ro", "ru", "sa", "se", "sg", "si", "sk", "sm", "th", "tm", "tr", "tw", "tz", "ua", "ug", "us", "uy", "va", "vn", "wi", "xo", "za", "zm"];
1137
1137
  var sl = pe(require("@transferwise/icons"));
1138
1138
  var cl = require("react/jsx-runtime");
1139
1139
  var xn = (e) => {
@@ -1146,18 +1146,18 @@ var require_main_min = __commonJS({
1146
1146
  let t = ll(e), o = sl[t];
1147
1147
  return (0, cl.jsx)(o, { size: 24 });
1148
1148
  }
1149
- var ll = (e) => e.split("-").map(yC).join("");
1150
- var yC = (e) => `${e[0].toUpperCase()}${e.slice(1)}`;
1149
+ var ll = (e) => e.split("-").map(fC).join("");
1150
+ var fC = (e) => `${e[0].toUpperCase()}${e.slice(1)}`;
1151
1151
  var fi = require("react/jsx-runtime");
1152
- function fC({ type: e }) {
1152
+ function hC({ type: e }) {
1153
1153
  return Eo(e) ? (0, fi.jsx)(al, { name: e }) : xn(e) ? (0, fi.jsx)(ml, { name: e }) : null;
1154
1154
  }
1155
1155
  function hi(e) {
1156
1156
  return xn(e) || Eo(e);
1157
1157
  }
1158
- var Gt = fC;
1158
+ var Gt = hC;
1159
1159
  var Ar = require("react/jsx-runtime");
1160
- var mo = ({ icon: e, image: t }) => {
1160
+ var so = ({ icon: e, image: t }) => {
1161
1161
  if (e != null && e.name)
1162
1162
  return (0, Ar.jsx)(Lo.Avatar, { type: Lo.AvatarType.ICON, children: (0, Ar.jsx)(Gt, { type: e.name }) });
1163
1163
  if (e != null && e.text)
@@ -1184,7 +1184,7 @@ var require_main_min = __commonJS({
1184
1184
  return "";
1185
1185
  }
1186
1186
  };
1187
- var hC = (e) => {
1187
+ var gC = (e) => {
1188
1188
  switch (e) {
1189
1189
  case "right":
1190
1190
  return "text-xs-right";
@@ -1195,13 +1195,13 @@ var require_main_min = __commonJS({
1195
1195
  return "";
1196
1196
  }
1197
1197
  };
1198
- var at = (e) => `${hC(e.align)} ${_(e.margin)}`;
1198
+ var at = (e) => `${gC(e.align)} ${_(e.margin)}`;
1199
1199
  var pl = require("react/jsx-runtime");
1200
- var gC = (e) => {
1200
+ var CC = (e) => {
1201
1201
  let t = e.component;
1202
- return (0, pl.jsx)(dl.Alert, { type: SC(CC(t.context)), className: _(t.margin), message: t.markdown });
1202
+ return (0, pl.jsx)(dl.Alert, { type: bC(SC(t.context)), className: _(t.margin), message: t.markdown });
1203
1203
  };
1204
- var CC = (e) => {
1204
+ var SC = (e) => {
1205
1205
  switch (e) {
1206
1206
  case "success":
1207
1207
  return "positive";
@@ -1216,15 +1216,15 @@ var require_main_min = __commonJS({
1216
1216
  return e;
1217
1217
  }
1218
1218
  };
1219
- var SC = (e) => !e || !["neutral", "warning", "negative", "positive"].includes(e) ? "neutral" : e;
1220
- var Ee = gC;
1221
- var lo = require("react/jsx-runtime");
1222
- var bC = (e) => {
1219
+ var bC = (e) => !e || !["neutral", "warning", "negative", "positive"].includes(e) ? "neutral" : e;
1220
+ var Ee = CC;
1221
+ var mo = require("react/jsx-runtime");
1222
+ var wC = (e) => {
1223
1223
  let t = e.component, o = _(t.margin || t.border ? "lg" : "xs");
1224
- return !t.width || t.width === "xl" ? (0, lo.jsx)("div", { className: o + ul(t.border), children: (0, lo.jsx)(ke, { components: t.components, model: e.model, submitted: e.submitted, errors: e.errors, onModelChange: e.onModelChange, onAction: e.onAction, onPersistAsync: e.onPersistAsync }) }) : (0, lo.jsx)("div", { className: "row", children: (0, lo.jsx)("div", { className: o + wC(t), children: (0, lo.jsx)("div", { className: ul(t.border), children: (0, lo.jsx)(ke, { components: t.components, model: e.model, submitted: e.submitted, errors: e.errors, onModelChange: e.onModelChange, onAction: e.onAction, onPersistAsync: e.onPersistAsync }) }) }) });
1224
+ return !t.width || t.width === "xl" ? (0, mo.jsx)("div", { className: o + ul(t.border), children: (0, mo.jsx)(ke, { components: t.components, model: e.model, submitted: e.submitted, errors: e.errors, onModelChange: e.onModelChange, onAction: e.onAction, onPersistAsync: e.onPersistAsync }) }) : (0, mo.jsx)("div", { className: "row", children: (0, mo.jsx)("div", { className: o + FC(t), children: (0, mo.jsx)("div", { className: ul(t.border), children: (0, mo.jsx)(ke, { components: t.components, model: e.model, submitted: e.submitted, errors: e.errors, onModelChange: e.onModelChange, onAction: e.onAction, onPersistAsync: e.onPersistAsync }) }) }) });
1225
1225
  };
1226
1226
  var ul = (e) => e ? " well p-b-0" : "";
1227
- var wC = (e) => {
1227
+ var FC = (e) => {
1228
1228
  switch (e.width) {
1229
1229
  case "xs":
1230
1230
  return " col-md-4 col-md-offset-4";
@@ -1239,21 +1239,21 @@ var require_main_min = __commonJS({
1239
1239
  return " col-xs-12";
1240
1240
  }
1241
1241
  };
1242
- var gi = bC;
1242
+ var gi = wC;
1243
1243
  var gl = require("@transferwise/components");
1244
- var FC = { primary: "primary", secondary: "secondary", link: "tertiary", positive: "primary", negative: "primary" };
1244
+ var xC = { primary: "primary", secondary: "secondary", link: "tertiary", positive: "primary", negative: "primary" };
1245
1245
  var yl = (e) => {
1246
1246
  var o;
1247
1247
  let t = e.action.type;
1248
- return (o = e.control) != null ? o : t ? FC[t] : "secondary";
1248
+ return (o = e.control) != null ? o : t ? xC[t] : "secondary";
1249
1249
  };
1250
- var xC = { positive: "positive", negative: "negative", neutral: "accent", warning: "accent" };
1251
- var vC = { primary: "accent", secondary: "accent", link: "accent", positive: "positive", negative: "negative" };
1250
+ var vC = { positive: "positive", negative: "negative", neutral: "accent", warning: "accent" };
1251
+ var PC = { primary: "accent", secondary: "accent", link: "accent", positive: "positive", negative: "negative" };
1252
1252
  var fl = (e) => {
1253
1253
  if (e.context)
1254
- return xC[e.context];
1254
+ return vC[e.context];
1255
1255
  let t = e.action.type;
1256
- return t ? vC[t] : "accent";
1256
+ return t ? PC[t] : "accent";
1257
1257
  };
1258
1258
  var hl = (e) => {
1259
1259
  switch (e) {
@@ -1269,39 +1269,39 @@ var require_main_min = __commonJS({
1269
1269
  }
1270
1270
  };
1271
1271
  var Cl = require("react/jsx-runtime");
1272
- function PC(e) {
1272
+ function IC(e) {
1273
1273
  var l;
1274
1274
  let { component: t, onAction: o } = e, r = t.action, n = fl(t), a = yl(t), { loading: i } = vo(), m = _(t.margin || "md");
1275
1275
  return (0, Cl.jsx)(gl.Button, { size: hl(t.size), type: a === "tertiary" ? void 0 : n, priority: a, block: true, className: m, disabled: i || t.disabled || r.disabled, onClick: () => o(r), children: (l = t.title) != null ? l : r.title });
1276
1276
  }
1277
- var Ci = PC;
1278
- var co = require("react/jsx-runtime");
1279
- var IC = (e) => {
1280
- let t = e.component, { leftWidth: o, rightWidth: r } = AC(t.bias);
1281
- return (0, co.jsxs)("div", { className: `${_(t.margin || "xs")} row`, children: [(0, co.jsx)("div", { className: `${o} m-b-0`, children: (0, co.jsx)(ke, { components: t.left, model: e.model, submitted: e.submitted, errors: e.errors, onModelChange: e.onModelChange, onAction: e.onAction, onPersistAsync: e.onPersistAsync }) }), (0, co.jsx)("div", { className: `${r} m-b-0`, children: (0, co.jsx)(ke, { components: t.right, model: e.model, submitted: e.submitted, errors: e.errors, onModelChange: e.onModelChange, onAction: e.onAction, onPersistAsync: e.onPersistAsync }) })] });
1277
+ var Ci = IC;
1278
+ var lo = require("react/jsx-runtime");
1279
+ var AC = (e) => {
1280
+ let t = e.component, { leftWidth: o, rightWidth: r } = MC(t.bias);
1281
+ return (0, lo.jsxs)("div", { className: `${_(t.margin || "xs")} row`, children: [(0, lo.jsx)("div", { className: `${o} m-b-0`, children: (0, lo.jsx)(ke, { components: t.left, model: e.model, submitted: e.submitted, errors: e.errors, onModelChange: e.onModelChange, onAction: e.onAction, onPersistAsync: e.onPersistAsync }) }), (0, lo.jsx)("div", { className: `${r} m-b-0`, children: (0, lo.jsx)(ke, { components: t.right, model: e.model, submitted: e.submitted, errors: e.errors, onModelChange: e.onModelChange, onAction: e.onAction, onPersistAsync: e.onPersistAsync }) })] });
1282
1282
  };
1283
- var AC = (e) => e === "left" ? { leftWidth: "col-md-8", rightWidth: "col-md-4" } : e === "right" ? { leftWidth: "col-md-4", rightWidth: "col-md-8" } : { leftWidth: "col-md-6", rightWidth: "col-md-6" };
1284
- var Si = IC;
1283
+ var MC = (e) => e === "left" ? { leftWidth: "col-md-8", rightWidth: "col-md-4" } : e === "right" ? { leftWidth: "col-md-4", rightWidth: "col-md-8" } : { leftWidth: "col-md-6", rightWidth: "col-md-6" };
1284
+ var Si = AC;
1285
1285
  var Pn = require("@transferwise/components");
1286
1286
  var vn = require("react/jsx-runtime");
1287
- function MC({ component: e, onAction: t }) {
1287
+ function RC({ component: e, onAction: t }) {
1288
1288
  let { loading: o } = vo();
1289
- return (0, vn.jsx)("div", { className: _(e.margin), children: (0, vn.jsx)(Pn.NavigationOptionsList, { children: e.options.map((r) => (0, vn.jsx)(Pn.NavigationOption, { title: r.title, content: r.description, disabled: o || r.disabled, media: mo(r), showMediaCircle: false, showMediaAtAllSizes: true, onClick: () => t(r.action) }, JSON.stringify(r))) }) });
1289
+ return (0, vn.jsx)("div", { className: _(e.margin), children: (0, vn.jsx)(Pn.NavigationOptionsList, { children: e.options.map((r) => (0, vn.jsx)(Pn.NavigationOption, { title: r.title, content: r.description, disabled: o || r.disabled, media: so(r), showMediaCircle: false, showMediaAtAllSizes: true, onClick: () => t(r.action) }, JSON.stringify(r))) }) });
1290
1290
  }
1291
- var bi = MC;
1291
+ var bi = RC;
1292
1292
  var Sl = require("react/jsx-runtime");
1293
- var RC = ({ component: e }) => {
1293
+ var kC = ({ component: e }) => {
1294
1294
  let o = `m-t-0 ${_(e.margin)}`;
1295
1295
  return (0, Sl.jsx)("hr", { className: o });
1296
1296
  };
1297
- var wi = RC;
1297
+ var wi = kC;
1298
1298
  var To = require("@transferwise/components");
1299
1299
  var In = require("react");
1300
1300
  var Fl = require("react-intl");
1301
1301
  var bl = require("react-intl");
1302
1302
  var wl = (0, bl.defineMessages)({ retryTitle: { id: "dynamicFlows.DynamicExternal.retryTitle", defaultMessage: "Reopen window", description: "" } });
1303
1303
  var Wt = require("react/jsx-runtime");
1304
- var kC = ({ component: e, onAction: t }) => {
1304
+ var OC = ({ component: e, onAction: t }) => {
1305
1305
  let { requestUrl: o, responseHandlers: r, polling: n, retryTitle: a } = e, i = (0, Fl.useIntl)(), m = (0, In.useCallback)(() => window.open(o, "df-external-window"), [o]);
1306
1306
  (0, In.useEffect)(() => {
1307
1307
  m();
@@ -1309,21 +1309,21 @@ var require_main_min = __commonJS({
1309
1309
  let l = n && r ? C(s({}, n), { responseHandlers: r }) : void 0;
1310
1310
  return el(l, t), (0, Wt.jsxs)(Wt.Fragment, { children: [(0, Wt.jsx)(To.Loader, { size: To.Size.LARGE, classNames: { "tw-loader": "tw-loader m-x-auto" } }), (0, Wt.jsx)("br", {}), (0, Wt.jsx)(To.Button, { priority: "tertiary", block: true, onClick: m, children: a || i.formatMessage(wl.retryTitle) })] });
1311
1311
  };
1312
- var Fi = kC;
1312
+ var Fi = OC;
1313
1313
  var _c = require("react");
1314
1314
  var xl = require("@transferwise/components");
1315
1315
  var vl = pe(Re());
1316
1316
  var Pl = require("react");
1317
1317
  var St = require("react/jsx-runtime");
1318
- var OC = (e, t) => t.map((o) => Ne(e, o) || {});
1319
- var EC = (e) => e.reduce((t, o) => s(s({}, o), t), {});
1320
- var LC = (e) => ({ "col-xs-12": true, "col-sm-6": e === "md", "col-sm-4": e === "sm" });
1318
+ var EC = (e, t) => t.map((o) => Ne(e, o) || {});
1319
+ var LC = (e) => e.reduce((t, o) => s(s({}, o), t), {});
1320
+ var TC = (e) => ({ "col-xs-12": true, "col-sm-6": e === "md", "col-sm-4": e === "sm" });
1321
1321
  function Il(e) {
1322
1322
  let t = (n, a) => {
1323
1323
  let i = e.schema.allOf[n];
1324
- o[n] = Ne(a.model, i) || {}, r(o), e.onChange(C(s({}, a), { model: EC(o) }));
1325
- }, [o, r] = (0, Pl.useState)(OC(e.model, e.schema.allOf));
1326
- return (0, St.jsxs)(St.Fragment, { children: [e.schema.title && (0, St.jsx)(xl.Header, { title: e.schema.title }), e.schema.description && (0, St.jsx)("p", { children: e.schema.description }), (0, St.jsx)("div", { className: "row", children: e.schema.allOf.map((n, a) => (0, St.jsx)("div", { className: (0, vl.default)(LC(n.width)), children: (0, St.jsx)(Be, { schema: n, model: o[a], errors: e.errors, submitted: e.submitted, disabled: e.disabled, onChange: (i) => t(a, C(s({}, i), { model: i.model })), onPersistAsync: e.onPersistAsync }) }, a)) })] });
1324
+ o[n] = Ne(a.model, i) || {}, r(o), e.onChange(C(s({}, a), { model: LC(o) }));
1325
+ }, [o, r] = (0, Pl.useState)(EC(e.model, e.schema.allOf));
1326
+ return (0, St.jsxs)(St.Fragment, { children: [e.schema.title && (0, St.jsx)(xl.Header, { title: e.schema.title }), e.schema.description && (0, St.jsx)("p", { children: e.schema.description }), (0, St.jsx)("div", { className: "row", children: e.schema.allOf.map((n, a) => (0, St.jsx)("div", { className: (0, vl.default)(TC(n.width)), children: (0, St.jsx)(Be, { schema: n, model: o[a], errors: e.errors, submitted: e.submitted, disabled: e.disabled, onChange: (i) => t(a, C(s({}, i), { model: i.model })), onPersistAsync: e.onPersistAsync }) }, a)) })] });
1327
1327
  }
1328
1328
  Il.defaultProps = { disabled: false };
1329
1329
  var xi = Il;
@@ -1340,11 +1340,11 @@ var require_main_min = __commonJS({
1340
1340
  var Ot = require("react/jsx-runtime");
1341
1341
  function kl(e) {
1342
1342
  var m;
1343
- let t = TC(e.schema), o = s(s(s({}, t), e.validationMessages), e.schema.validationMessages), r = (e.submitted || !e.changed) && !!e.errors, n = !r && (e.submitted || e.changed && e.blurred) && !!((m = e.validations) != null && m.length), a = e.schema.description && !r && !n, i = !!e.infoMessage;
1343
+ let t = DC(e.schema), o = s(s(s({}, t), e.validationMessages), e.schema.validationMessages), r = (e.submitted || !e.changed) && !!e.errors, n = !r && (e.submitted || e.changed && e.blurred) && !!((m = e.validations) != null && m.length), a = e.schema.description && !r && !n, i = !!e.infoMessage;
1344
1344
  return (0, Ot.jsxs)("div", { id: e.id, children: [r ? (0, Ot.jsx)(An.InlineAlert, { type: "error", children: e.errors }) : null, n ? (0, Ot.jsx)(An.InlineAlert, { type: "error", children: e.validations.map((l) => (0, Ot.jsx)("div", { children: o[l] }, l)) }) : null, (a || i) && (0, Ot.jsxs)(An.InlineAlert, { type: "info", children: [a && (0, Ot.jsx)("div", { children: e.schema.description }), i && (0, Ot.jsx)("div", { children: e.infoMessage })] })] });
1345
1345
  }
1346
1346
  kl.defaultProps = { errors: "", validations: [], validationMessages: {}, validationAsyncSuccessMessage: null };
1347
- function TC(e) {
1347
+ function DC(e) {
1348
1348
  let { formatMessage: t, locale: o } = (0, Rl.useIntl)(), r = { type: t(ae.type), minimum: t(ae.minimum, { minimum: e.minimum }), maximum: t(ae.maximum, { maximum: e.maximum }), minLength: t(ae.minLength, { minLength: e.minLength }), maxLength: t(ae.maxLength, { maxLength: e.maxLength }), minItems: t(Do.minItemsError, { minItems: e.minItems }), maxItems: t(Do.maxItemsError, { maxItems: e.maxItems }), pattern: t(ae.pattern), required: t(ae.required) };
1349
1349
  if (e.format === "date") {
1350
1350
  let n = { pattern: t(ae.patternDate), minimum: e.minimum ? t(ae.minimumDate, { minimum: (0, vi.formatDate)(new Date(e.minimum), o, { timeZone: "UTC", dateStyle: "long" }) }) : void 0, maximum: e.maximum ? t(ae.maximumDate, { maximum: (0, vi.formatDate)(new Date(e.maximum), o, { timeZone: "UTC", dateStyle: "long" }) }) : void 0 };
@@ -1383,10 +1383,10 @@ var require_main_min = __commonJS({
1383
1383
  let { formatMessage: o } = (0, Nl.useIntl)(), { maxFileSizeError: r, maxItemsError: n, minItemsError: a } = Mr;
1384
1384
  return { maxFileSizeErrorMessage: o(r), maxItemsErrorMessage: o(n, { maxItems: e }), minItemsErrorMessage: o(a, { minItems: t }), requiredMessage: o(Dl.required) };
1385
1385
  }
1386
- var po = require("react/jsx-runtime");
1386
+ var co = require("react/jsx-runtime");
1387
1387
  function zl(e) {
1388
1388
  var R, A;
1389
- let { onChange: t, schema: o } = e, r = Ce(), n = Mn(o), a = (0, Rr.useMemo)(() => o.$id || We(), [o.$id]), [i, m] = (0, Rr.useState)(false), [l, c] = (0, Rr.useState)(() => DC(e.model || [])), p = jl(o.items.persistAsync), y = o.items.persistAsync.schema, f = ko(y), u = async (O) => {
1389
+ let { onChange: t, schema: o } = e, r = Ce(), n = Mn(o), a = (0, Rr.useMemo)(() => o.$id || We(), [o.$id]), [i, m] = (0, Rr.useState)(false), [l, c] = (0, Rr.useState)(() => VC(e.model || [])), p = jl(o.items.persistAsync), y = o.items.persistAsync.schema, f = ko(y), u = async (O) => {
1390
1390
  m(true);
1391
1391
  try {
1392
1392
  let v = await Ol(O, f);
@@ -1405,38 +1405,38 @@ var require_main_min = __commonJS({
1405
1405
  t({ model: L, triggerSchema: o, triggerModel: L });
1406
1406
  }
1407
1407
  let h = Bl(l).map((O) => O.id), S = Ro(h, o, e.required), b = !!e.errors || (i || e.submitted) && !!S.length, w = "accepts" in y && y.accepts, F = "maxSize" in y && y.maxSize, x = C(s(s({ multiple: true, className: "form-control", files: l, fileInputName: a, id: a }, w ? { fileTypes: w } : void 0), F ? { sizeLimit: un(F) } : void 0), { sizeLimitErrorMessage: ((R = y.validationMessages) == null ? void 0 : R.maxSize) || n.maxFileSizeErrorMessage, maxFiles: e.schema.maxItems, maxFilesErrorMessage: ((A = e.schema.validationMessages) == null ? void 0 : A.maxItems) || n.maxItemsErrorMessage, uploadButtonTitle: y.title, description: y.description, disabled: e.disabled, onUploadFile: (O) => u(O.get(a)), onFilesChange: d, onDeleteFile: () => Promise.resolve() }), P = `${a}-feedback`;
1408
- return (0, po.jsxs)("div", { className: (0, Ul.default)("form-group", { "has-error": b }), children: [(0, po.jsx)("label", { className: "d-block control-label", htmlFor: a, children: e.schema.title }), (0, po.jsx)("div", { "aria-describedby": P, children: (0, po.jsx)(Rn.UploadInput, s({}, x)) }), (0, po.jsx)(it, { id: P, changed: i, submitted: e.submitted, errors: e.errors, schema: e.schema, validations: S, validationMessages: NC(o, !!e.required, n), infoMessage: null, focused: false, blurred: true })] });
1408
+ return (0, co.jsxs)("div", { className: (0, Ul.default)("form-group", { "has-error": b }), children: [(0, co.jsx)("label", { className: "d-block control-label", htmlFor: a, children: e.schema.title }), (0, co.jsx)("div", { "aria-describedby": P, children: (0, co.jsx)(Rn.UploadInput, s({}, x)) }), (0, co.jsx)(it, { id: P, changed: i, submitted: e.submitted, errors: e.errors, schema: e.schema, validations: S, validationMessages: BC(o, !!e.required, n), infoMessage: null, focused: false, blurred: true })] });
1409
1409
  }
1410
1410
  zl.defaultProps = { errors: null, required: false };
1411
1411
  var Pi = zl;
1412
1412
  function Bl(e) {
1413
1413
  return e.filter((t) => !t.error && t.status === "succeeded");
1414
1414
  }
1415
- function DC(e) {
1416
- return e.map((t) => VC(t) ? { id: t, status: Rn.Status.SUCCEEDED } : null).filter((t) => t !== null);
1417
- }
1418
1415
  function VC(e) {
1416
+ return e.map((t) => NC(t) ? { id: t, status: Rn.Status.SUCCEEDED } : null).filter((t) => t !== null);
1417
+ }
1418
+ function NC(e) {
1419
1419
  return $(e) || D(e);
1420
1420
  }
1421
- function NC(e, t, o) {
1421
+ function BC(e, t, o) {
1422
1422
  let { minItems: r, maxItems: n } = e;
1423
1423
  return s(s(s({}, t && { required: o.requiredMessage }), r && { minItems: o.minItemsErrorMessage }), n && { maxItems: o.maxItemsErrorMessage });
1424
1424
  }
1425
1425
  var No = require("@transferwise/components");
1426
1426
  var Yl = require("@transferwise/icons");
1427
- var uo = require("react");
1427
+ var po = require("react");
1428
1428
  var Zl = require("react-intl");
1429
1429
  var Hl = require("@transferwise/components");
1430
1430
  var $l = require("react/jsx-runtime");
1431
1431
  function ql({ item: e, onClick: t }) {
1432
- return (0, $l.jsx)(Hl.NavigationOption, { media: mo(e), title: e.title, content: e.description, showMediaAtAllSizes: true, onClick: t });
1432
+ return (0, $l.jsx)(Hl.NavigationOption, { media: so(e), title: e.title, content: e.description, showMediaAtAllSizes: true, onClick: t });
1433
1433
  }
1434
1434
  var Gl = require("react-intl");
1435
1435
  var _e = (0, Gl.defineMessages)({ addItemTitle: { id: "dynamicFlows.ArraySchema.addItemTitle", defaultMessage: "Add Item", description: "Label on the button used to open a form to add an item" }, addItem: { id: "dynamicFlows.ArraySchema.addItem", defaultMessage: "Save", description: "Label on the add button used to submit a form that adds an item" }, editItem: { id: "dynamicFlows.ArraySchema.editItem", defaultMessage: "Save", description: "Label on the edit button used to submit a form that edits an item" }, removeItem: { id: "dynamicFlows.ArraySchema.removeItem", defaultMessage: "Remove", description: "Label on the remove button used to confirm deletion of an item" } });
1436
1436
  var Wl = require("react");
1437
1437
  var _l = require("react-intl");
1438
1438
  var Jl = require("react/jsx-runtime");
1439
- function BC({ type: e, schema: t, model: o, errors: r, submitted: n, onModelChange: a, onAction: i }) {
1439
+ function UC({ type: e, schema: t, model: o, errors: r, submitted: n, onModelChange: a, onAction: i }) {
1440
1440
  let { formatMessage: m } = (0, _l.useIntl)(), [l, c] = (0, Wl.useState)(void 0), p = { layout: [{ type: "form", schema: t.items }, { type: "button", control: "primary", action: { url: e, title: m(e === "add" ? _e.addItem : _e.editItem) } }, ...e === "edit" ? [{ type: "button", context: "negative", action: { url: "remove", title: m(_e.removeItem) } }] : []], title: "", actions: [], schemas: [] };
1441
1441
  return (0, Jl.jsx)(kn, { step: p, model: o, stepLayoutOptions: { displayStepTitle: false }, submitted: n, formErrors: r, globalError: null, onAction: (f) => {
1442
1442
  i(f.url, l), c(void 0);
@@ -1445,7 +1445,7 @@ var require_main_min = __commonJS({
1445
1445
  t.items.format === "base64url" && typeof d == "string" && typeof (u == null ? void 0 : u.filename) == "string" && c(u.filename), a(C(s({}, g), { model: d }));
1446
1446
  } });
1447
1447
  }
1448
- var Kl = BC;
1448
+ var Kl = UC;
1449
1449
  var On = (e, t) => {
1450
1450
  let o = kr(e, t);
1451
1451
  if (o >= 0)
@@ -1457,7 +1457,7 @@ var require_main_min = __commonJS({
1457
1457
  if (r >= 0)
1458
1458
  return r;
1459
1459
  }
1460
- return ao(e) && re(t) && Object.keys(t).length >= 1 ? Vo(e, t) : ao(e) && !ue(e.default) && re(e.default) && Object.keys(e.default).length >= 1 ? Vo(e, e.default) : null;
1460
+ return no(e) && re(t) && Object.keys(t).length >= 1 ? Vo(e, t) : no(e) && !ue(e.default) && re(e.default) && Object.keys(e.default).length >= 1 ? Vo(e, e.default) : null;
1461
1461
  };
1462
1462
  var kr = (e, t) => {
1463
1463
  let o = (r) => !ue(t) && ee(t, r);
@@ -1466,10 +1466,10 @@ var require_main_min = __commonJS({
1466
1466
  function Vo(e, t) {
1467
1467
  if (t == null)
1468
1468
  return null;
1469
- let o = e.oneOf.map((r) => UC(r).reduce((n, [a, i]) => nt(i) && i.const === t[a] ? n + 2 : xr(i) && typeof t[a] != "undefined" ? n + 1 : n, 0));
1469
+ let o = e.oneOf.map((r) => zC(r).reduce((n, [a, i]) => nt(i) && i.const === t[a] ? n + 2 : xr(i) && typeof t[a] != "undefined" ? n + 1 : n, 0));
1470
1470
  return o.every((r) => r === o[0]) ? null : o.indexOf(Math.max(...o));
1471
1471
  }
1472
- function UC(e) {
1472
+ function zC(e) {
1473
1473
  return e.properties !== null && typeof e.properties == "object" ? Object.entries(e.properties) : [];
1474
1474
  }
1475
1475
  var Ii = (e, t, o = {}, r) => {
@@ -1483,21 +1483,21 @@ var require_main_min = __commonJS({
1483
1483
  return { value: t, title: l || n, description: c || a, icon: p || i, image: y || m };
1484
1484
  };
1485
1485
  var _t = (e) => {
1486
- let { schema: t, model: o, providesProp: r, getValueFromSchema: n } = e, a = io(t);
1487
- if (qC(t.summary, r))
1486
+ let { schema: t, model: o, providesProp: r, getValueFromSchema: n } = e, a = ao(t);
1487
+ if ($C(t.summary, r))
1488
1488
  return n(t, o);
1489
1489
  switch (a) {
1490
1490
  case "object":
1491
- return zC(e);
1492
- case "oneOf":
1493
1491
  return jC(e);
1494
- case "allOf":
1492
+ case "oneOf":
1495
1493
  return HC(e);
1494
+ case "allOf":
1495
+ return qC(e);
1496
1496
  default:
1497
1497
  return null;
1498
1498
  }
1499
1499
  };
1500
- var zC = (e) => {
1500
+ var jC = (e) => {
1501
1501
  let { schema: t, model: o } = e, r = t;
1502
1502
  for (let n in r.properties) {
1503
1503
  let a = r.properties[n], i = re(o) && n in o ? o[n] : null, m = _t(C(s({}, e), { schema: a, model: i }));
@@ -1506,9 +1506,9 @@ var require_main_min = __commonJS({
1506
1506
  }
1507
1507
  return null;
1508
1508
  };
1509
- var jC = (e) => {
1509
+ var HC = (e) => {
1510
1510
  let { schema: t, model: o } = e;
1511
- if (ao(t)) {
1511
+ if (no(t)) {
1512
1512
  if (!re(o))
1513
1513
  return null;
1514
1514
  let a = Vo(t, o);
@@ -1520,7 +1520,7 @@ var require_main_min = __commonJS({
1520
1520
  let r = t, n = On(r, o);
1521
1521
  return n === null || n < 0 ? null : _t(C(s({}, e), { schema: r.oneOf[n] }));
1522
1522
  };
1523
- var HC = (e) => {
1523
+ var qC = (e) => {
1524
1524
  let { schema: t } = e, o = t;
1525
1525
  for (let r of o.allOf) {
1526
1526
  let n = _t(C(s({}, e), { schema: r }));
@@ -1530,16 +1530,16 @@ var require_main_min = __commonJS({
1530
1530
  return null;
1531
1531
  };
1532
1532
  var Xl = (e, t) => nt(e) ? e.title ? e.title : D(e.const) ? e.const : null : hn(t) ? t : null;
1533
- var qC = (e, t) => !!e && Object.hasOwnProperty.call(e, t) && !!e[t];
1533
+ var $C = (e, t) => !!e && Object.hasOwnProperty.call(e, t) && !!e[t];
1534
1534
  var Ql = pe(Re());
1535
1535
  var bt = require("react/jsx-runtime");
1536
- function $C({ schema: e, model: t, errors: o, submitted: r, required: n = false, onChange: a }) {
1536
+ function GC({ schema: e, model: t, errors: o, submitted: r, required: n = false, onChange: a }) {
1537
1537
  var O;
1538
- let [i, m] = (0, uo.useState)(null), [l, c] = (0, uo.useState)(false), [p, y] = (0, uo.useState)(() => {
1538
+ let [i, m] = (0, po.useState)(null), [l, c] = (0, po.useState)(false), [p, y] = (0, po.useState)(() => {
1539
1539
  if (N(t) && !W(t))
1540
1540
  throw new Error("RepeatableSchema does not support object models. Ensure your array schema is wrapped inside an object schema.");
1541
1541
  return t ? t.map((v) => Ii(e.items, v, e == null ? void 0 : e.summary)) : null;
1542
- }), [f, u] = (0, uo.useState)({ item: null, model: null }), d = (0, uo.useMemo)(() => e.$id || We(), [e.$id]), g = (v) => {
1542
+ }), [f, u] = (0, po.useState)({ item: null, model: null }), d = (0, po.useMemo)(() => e.$id || We(), [e.$id]), g = (v) => {
1543
1543
  let L = v ? v.map(({ value: k }) => k) : null;
1544
1544
  a({ model: L, triggerSchema: e.items, triggerModel: L });
1545
1545
  }, h = () => {
@@ -1552,14 +1552,14 @@ var require_main_min = __commonJS({
1552
1552
  let k = v === "remove" ? null : Ii(e.items, f.model, e.summary, L);
1553
1553
  if (v !== "remove" && !ee((U = k == null ? void 0 : k.value) != null ? U : null, e.items))
1554
1554
  return;
1555
- let q = GC(v, { originalItem: f.item, updatedItem: k, itemSummaries: p });
1555
+ let q = WC(v, { originalItem: f.item, updatedItem: k, itemSummaries: p });
1556
1556
  y(q), g(q), u({ item: null, model: null }), m(null);
1557
1557
  }, w = () => {
1558
1558
  u({ item: null, model: null }), m(null);
1559
1559
  }, { formatMessage: F } = (0, Zl.useIntl)(), x = Ct(t, e, n), P = Mn({ minItems: e.minItems, maxItems: e.maxItems }), R = e.items.type === "string" && e.items.format === "base64url" ? { minItems: P.minItemsErrorMessage, maxItems: P.maxItemsErrorMessage, required: P.requiredMessage } : void 0, A = { "has-error": (O = o && !Ht(o)) != null ? O : r && x.length };
1560
1560
  return (0, bt.jsxs)("div", { id: d, className: (0, Ql.default)(A), children: [e.title && (0, bt.jsx)(No.Header, { title: e.title }), p == null ? void 0 : p.map((v) => (0, bt.jsx)(ql, { item: v, onClick: () => S(v) }, JSON.stringify(v))), (0, bt.jsx)(No.NavigationOption, { media: (0, bt.jsx)(Yl.Plus, {}), title: e.addItemTitle || F(_e.addItemTitle), showMediaAtAllSizes: true, onClick: h }), (0, bt.jsx)(No.Modal, { open: i !== null, title: (i === "add" ? e.addItemTitle : e.editItemTitle) || F(_e.addItemTitle), body: (0, bt.jsx)(Kl, { type: i != null ? i : "add", schema: e, model: f.model, errors: o, submitted: r, onAction: b, onModelChange: ({ model: v }) => u(C(s({}, f), { model: v })) }), onClose: w }), (0, bt.jsx)(it, { id: `${d}-feedback`, changed: l, focused: false, blurred: false, errors: typeof o == "string" ? o : void 0, submitted: r, schema: e, validations: x, validationMessages: R, infoMessage: null })] });
1561
1561
  }
1562
- var GC = (e, { originalItem: t, updatedItem: o, itemSummaries: r }) => {
1562
+ var WC = (e, { originalItem: t, updatedItem: o, itemSummaries: r }) => {
1563
1563
  if (e === "remove")
1564
1564
  return (r || []).filter((n) => n !== t);
1565
1565
  if (!o)
@@ -1573,7 +1573,7 @@ var require_main_min = __commonJS({
1573
1573
  return null;
1574
1574
  }
1575
1575
  };
1576
- var ec = $C;
1576
+ var ec = GC;
1577
1577
  var Ai = require("react/jsx-runtime");
1578
1578
  var tc = (e) => {
1579
1579
  let { schema: t } = e;
@@ -1598,7 +1598,7 @@ var require_main_min = __commonJS({
1598
1598
  var ic = pe(Re());
1599
1599
  var En = require("react");
1600
1600
  var Ke = require("react/jsx-runtime");
1601
- var WC = (e) => ({ "col-xs-12": true, "col-sm-6": e === "md", "col-sm-4": e === "sm" });
1601
+ var _C = (e) => ({ "col-xs-12": true, "col-sm-6": e === "md", "col-sm-4": e === "sm" });
1602
1602
  function sc(e) {
1603
1603
  let [t, o] = (0, En.useState)(() => s({}, Ne(e.model, e.schema))), r = (c, p) => {
1604
1604
  p.model !== null ? t[c] = p.model : delete t[c], o(t), e.onChange(C(s({}, p), { model: t }));
@@ -1608,7 +1608,7 @@ var require_main_min = __commonJS({
1608
1608
  o(c), Ge(c, t) || e.onChange({ model: c, triggerSchema: e.schema, triggerModel: c });
1609
1609
  }, [e.schema]);
1610
1610
  let a = /* @__PURE__ */ new Set([...e.schema.displayOrder || [], ...Object.keys(e.schema.properties)]), i = (c) => typeof e.schema.properties[c] != "undefined", m = Array.from(a).filter(i), l = e.errors;
1611
- return (0, Ke.jsxs)(Ke.Fragment, { children: [e.schema.alert && (0, Ke.jsx)(Ee, { component: e.schema.alert }), (0, Ke.jsxs)("fieldset", { children: [e.schema.title && !e.hideTitle && (0, Ke.jsx)(ac.Header, { title: e.schema.title, as: "legend" }), e.schema.description && !e.hideTitle && (0, Ke.jsxs)("p", { children: [" ", e.schema.description, " "] }), (0, Ke.jsx)("div", { className: "row", children: m.map((c) => (0, Ke.jsx)("div", { className: (0, ic.default)(WC(e.schema.properties[c].width)), children: (0, Ke.jsx)(Be, { schema: e.schema.properties[c], model: e.model && e.model[c], errors: l == null ? void 0 : l[c], submitted: e.submitted, required: n(c), disabled: e.disabled, onChange: (p) => r(c, p), onPersistAsync: e.onPersistAsync }) }, c)) })] })] });
1611
+ return (0, Ke.jsxs)(Ke.Fragment, { children: [e.schema.alert && (0, Ke.jsx)(Ee, { component: e.schema.alert }), (0, Ke.jsxs)("fieldset", { children: [e.schema.title && !e.hideTitle && (0, Ke.jsx)(ac.Header, { title: e.schema.title, as: "legend" }), e.schema.description && !e.hideTitle && (0, Ke.jsxs)("p", { children: [" ", e.schema.description, " "] }), (0, Ke.jsx)("div", { className: "row", children: m.map((c) => (0, Ke.jsx)("div", { className: (0, ic.default)(_C(e.schema.properties[c].width)), children: (0, Ke.jsx)(Be, { schema: e.schema.properties[c], model: e.model && e.model[c], errors: l == null ? void 0 : l[c], submitted: e.submitted, required: n(c), disabled: e.disabled, onChange: (p) => r(c, p), onPersistAsync: e.onPersistAsync }) }, c)) })] })] });
1612
1612
  }
1613
1613
  sc.defaultProps = { hideTitle: false, disabled: false };
1614
1614
  var Or = sc;
@@ -1620,11 +1620,11 @@ var require_main_min = __commonJS({
1620
1620
  var mc = require("react-intl");
1621
1621
  var Ln = (0, mc.defineMessages)({ helpAria: { id: "dynamicFlows.Help.ariaLabel", defaultMessage: "Click here for more info.", description: "Aria label for help." } });
1622
1622
  var Ri = require("react/jsx-runtime");
1623
- function _C(e) {
1623
+ function KC(e) {
1624
1624
  let t = (0, lc.useIntl)();
1625
1625
  return (0, Ri.jsx)(Tn.Info, { className: "m-l-1", content: (0, Ri.jsx)(Tn.Markdown, { config: { link: { target: "_blank" } }, children: e.help.markdown }), presentation: "POPOVER", size: "sm", "aria-label": t.formatMessage(Ln.helpAria) });
1626
1626
  }
1627
- var Et = _C;
1627
+ var Et = KC;
1628
1628
  var wc = require("react");
1629
1629
  var te = require("@transferwise/components");
1630
1630
  var yc = require("react");
@@ -1632,13 +1632,13 @@ var require_main_min = __commonJS({
1632
1632
  let { coerceValue: o = false } = t;
1633
1633
  if (!T(e)) {
1634
1634
  if (N(e)) {
1635
- yo({ received: "object", expected: "string" });
1635
+ uo({ received: "object", expected: "string" });
1636
1636
  return;
1637
1637
  }
1638
1638
  if (!D(e)) {
1639
1639
  if (o)
1640
1640
  return Oi({ received: typeof e, expected: "string" }), String(e);
1641
- yo({ received: typeof e, expected: "string" });
1641
+ uo({ received: typeof e, expected: "string" });
1642
1642
  return;
1643
1643
  }
1644
1644
  return e;
@@ -1652,13 +1652,13 @@ var require_main_min = __commonJS({
1652
1652
  return e;
1653
1653
  let r = { received: typeof e, expected: "string or number" };
1654
1654
  if (N(e)) {
1655
- yo(r);
1655
+ uo(r);
1656
1656
  return;
1657
1657
  }
1658
1658
  if (!D(e)) {
1659
1659
  if (o)
1660
1660
  return Oi(r), String(e);
1661
- yo(r);
1661
+ uo(r);
1662
1662
  return;
1663
1663
  }
1664
1664
  return e;
@@ -1670,7 +1670,7 @@ var require_main_min = __commonJS({
1670
1670
  if (!ft(e)) {
1671
1671
  if (o)
1672
1672
  return Oi({ received: typeof e, expected: "boolean" }), !!e;
1673
- yo({ received: typeof e, expected: "boolean" });
1673
+ uo({ received: typeof e, expected: "boolean" });
1674
1674
  return;
1675
1675
  }
1676
1676
  return e;
@@ -1678,7 +1678,7 @@ var require_main_min = __commonJS({
1678
1678
  var dc = (e) => {
1679
1679
  if (!T(e)) {
1680
1680
  if (!(e instanceof Date) && !D(e)) {
1681
- yo({ received: typeof e, expected: "string or Date" });
1681
+ uo({ received: typeof e, expected: "string or Date" });
1682
1682
  return;
1683
1683
  }
1684
1684
  return e;
@@ -1688,14 +1688,14 @@ var require_main_min = __commonJS({
1688
1688
  if (T(e))
1689
1689
  return null;
1690
1690
  if (!D(e))
1691
- return yo({ received: typeof e, expected: "string", fallback: "null" }), null;
1691
+ return uo({ received: typeof e, expected: "string", fallback: "null" }), null;
1692
1692
  let t = zm(e);
1693
1693
  return t === null && console.warn("Incorrectly formatted date string. Falling back to null."), t;
1694
1694
  };
1695
1695
  var Oi = ({ received: e, expected: t }) => {
1696
1696
  console.warn(`Value with type ${e} passed to control that only accepts type ${t}. Type will be coerced, but this behaviour will change in the future, so please fix your code.`);
1697
1697
  };
1698
- var yo = ({ received: e, expected: t, fallback: o = "undefined" }) => {
1698
+ var uo = ({ received: e, expected: t, fallback: o = "undefined" }) => {
1699
1699
  console.warn(`Value with type ${e} passed to control that only accepts type ${t}. Falling back to ${o}`);
1700
1700
  };
1701
1701
  var Ei = (e) => {
@@ -1811,30 +1811,30 @@ var require_main_min = __commonJS({
1811
1811
  var Kt = require("@transferwise/components");
1812
1812
  Cc();
1813
1813
  Li();
1814
- var OA = require("react");
1815
- var EA = require("react/jsx-runtime");
1814
+ var VA = require("react");
1815
+ var NA = require("react/jsx-runtime");
1816
1816
  var Je = require("react/jsx-runtime");
1817
1817
  var Sc = (e, t) => {
1818
1818
  switch (t) {
1819
1819
  case "select":
1820
- return XC(e);
1820
+ return YC(e);
1821
1821
  case "radio":
1822
1822
  default:
1823
- return JC(e);
1823
+ return XC(e);
1824
1824
  }
1825
1825
  };
1826
- var JC = (e) => s(s(s({ label: e.title, value: e.const }, tS(e.title, e.description)), zo(e)), bc(e.disabled));
1827
- var XC = (e) => s(s(s(s(s({ label: e.title, value: e.const }, eS(e.title, e.description)), QC(e.icon)), ZC(e.image)), bc(e.disabled)), YC(e.keywords));
1828
- var YC = (e) => W(e) ? { searchStrings: e } : {};
1829
- var ZC = (e) => e != null && e.url ? { icon: (0, Je.jsx)("div", { className: "media", children: (0, Je.jsx)("div", { className: "np-option__no-media-circle", children: (0, Je.jsx)("img", { src: e.url, alt: e.name || "" }) }) }), hideIconInTrigger: true } : null;
1830
- var QC = (e) => e != null && e.name && Eo(e.name) ? { icon: (0, Je.jsx)(Di, { code: e.name.substring(5), intrinsicSize: 24 }) } : e != null && e.name && hi(e.name) ? { icon: (0, Je.jsx)(Gt, { type: e.name }) } : e != null && e.text ? { icon: (0, Je.jsx)("span", { children: e.text }) } : null;
1826
+ var XC = (e) => s(s(s({ label: e.title, value: e.const }, oS(e.title, e.description)), zo(e)), bc(e.disabled));
1827
+ var YC = (e) => s(s(s(s(s({ label: e.title, value: e.const }, tS(e.title, e.description)), eS(e.icon)), QC(e.image)), bc(e.disabled)), ZC(e.keywords));
1828
+ var ZC = (e) => W(e) ? { searchStrings: e } : {};
1829
+ var QC = (e) => e != null && e.url ? { icon: (0, Je.jsx)("div", { className: "media", children: (0, Je.jsx)("div", { className: "np-option__no-media-circle", children: (0, Je.jsx)("img", { src: e.url, alt: e.name || "" }) }) }), hideIconInTrigger: true } : null;
1830
+ var eS = (e) => e != null && e.name && Eo(e.name) ? { icon: (0, Je.jsx)(Di, { code: e.name.substring(5), intrinsicSize: 24 }) } : e != null && e.name && hi(e.name) ? { icon: (0, Je.jsx)(Gt, { type: e.name }) } : e != null && e.text ? { icon: (0, Je.jsx)("span", { children: e.text }) } : null;
1831
1831
  var zo = ({ image: e, icon: t }) => e != null && e.url ? { avatar: (0, Je.jsx)(Kt.Avatar, { type: Kt.AvatarType.THUMBNAIL, children: (0, Je.jsx)("img", { src: e.url, alt: "" }) }) } : t != null && t.name && hi(t.name) ? { avatar: (0, Je.jsx)(Kt.Avatar, { type: Kt.AvatarType.ICON, children: (0, Je.jsx)(Gt, { type: t.name }) }) } : t != null && t.text ? { avatar: (0, Je.jsx)(Kt.Avatar, { type: Kt.AvatarType.INITIALS, children: t.text }) } : null;
1832
1832
  var Vn = ({ accepts: e }) => s({}, W(e) && { usAccept: e.join(",") });
1833
- var eS = (e, t) => {
1833
+ var tS = (e, t) => {
1834
1834
  if (e && t)
1835
1835
  return (e + t).length > 50 ? { secondary: t } : { note: t };
1836
1836
  };
1837
- var tS = (e, t) => {
1837
+ var oS = (e, t) => {
1838
1838
  if (e && t)
1839
1839
  return { note: t };
1840
1840
  };
@@ -1843,30 +1843,30 @@ var require_main_min = __commonJS({
1843
1843
  return { disabled: e };
1844
1844
  };
1845
1845
  var Vi = require("react/jsx-runtime");
1846
- var oS = (e) => e === "string" || e === "number";
1847
- var Ni = (e) => rt(e) ? e.control === j.TAB && e.oneOf.length > 3 ? j.SELECT : e.control || j.SELECT : pn(e) ? rS(e) : "control" in e && e.control ? e.control : e.type === "boolean" ? "checkbox" : e.type === "integer" ? "number" : e.type;
1848
- var rS = ({ format: e, control: t }) => t ? nS[t] || t : e && aS[e] || "text";
1849
- var nS = { "date-lookup": "date-lookup", password: "password", textarea: "textarea", email: "email", numeric: "numeric", "phone-number": "tel" };
1850
- var aS = { date: "date", email: "email", base64url: "file", password: "password", "phone-number": "tel" };
1851
- var iS = (e, t) => e.oneOf ? e.oneOf.map((o) => Sc(o, t)) : null;
1846
+ var rS = (e) => e === "string" || e === "number";
1847
+ var Ni = (e) => rt(e) ? e.control === j.TAB && e.oneOf.length > 3 ? j.SELECT : e.control || j.SELECT : pn(e) ? nS(e) : "control" in e && e.control ? e.control : e.type === "boolean" ? "checkbox" : e.type === "integer" ? "number" : e.type;
1848
+ var nS = ({ format: e, control: t }) => t ? aS[t] || t : e && iS[e] || "text";
1849
+ var aS = { "date-lookup": "date-lookup", password: "password", textarea: "textarea", email: "email", numeric: "numeric", "phone-number": "tel" };
1850
+ var iS = { date: "date", email: "email", base64url: "file", password: "password", "phone-number": "tel" };
1851
+ var sS = (e, t) => e.oneOf ? e.oneOf.map((o) => Sc(o, t)) : null;
1852
1852
  function Fc(e) {
1853
- let { id: t, schema: o, value: r, disabled: n, onChange: a, onFocus: i, onBlur: m, onSearchChange: l, describedBy: c } = e, p = Ao(), y = (b) => oS(o.type) && (T(b) || ue(b)) ? "" : b, f = (b, w, F) => {
1853
+ let { id: t, schema: o, value: r, disabled: n, onChange: a, onFocus: i, onBlur: m, onSearchChange: l, describedBy: c } = e, p = Ao(), y = (b) => rS(o.type) && (T(b) || ue(b)) ? "" : b, f = (b, w, F) => {
1854
1854
  a(qt(b, o), w, F);
1855
1855
  }, u = Ni(o);
1856
1856
  (0, wc.useEffect)(() => {
1857
- sS(o, p, u);
1857
+ mS(o, p, u);
1858
1858
  }, [JSON.stringify(o), p, u]);
1859
- let d = o.values || iS(o, u), g = { onFocus: i, onBlur: m, onSearchChange: l, onChange: f }, h = y(r), S = { id: t, name: t, label: o.title, options: d || [], placeholder: o.placeholder, autoComplete: !o.help, autocompleteHint: o.autocompleteHint, disabled: n || o.disabled, displayPattern: o.displayFormat, uploadProps: Vn(o), describedBy: c };
1859
+ let d = o.values || sS(o, u), g = { onFocus: i, onBlur: m, onSearchChange: l, onChange: f }, h = y(r), S = { id: t, name: t, label: o.title, options: d || [], placeholder: o.placeholder, autoComplete: !o.help, autocompleteHint: o.autocompleteHint, disabled: n || o.disabled, displayPattern: o.displayFormat, uploadProps: Vn(o), describedBy: c };
1860
1860
  return (0, Vi.jsx)("div", { "aria-describedby": c, children: (0, Vi.jsx)(Uo, s(s({ type: u, value: h }, g), S)) });
1861
1861
  }
1862
1862
  Fc.defaultProps = { value: null, onFocus: null, onBlur: null, onSearchChange: null, disabled: false };
1863
- var sS = (e, t, o) => {
1863
+ var mS = (e, t, o) => {
1864
1864
  rt(e) && e.oneOf.length === 2 && !e.control && t.warning("Deprecation warning", 'A oneOf schema with 2 options and no control type currently renders as a "radio" but will be changed to render as a "select". Please specify control radio to retain the existing behaviour.'), o === "file" && t.warning("Deprecation warning", "Please use a persist-async blob schema instead of string with base64url for file uploads. The base64url does not perform well on low end devices. Support for this schema will be removed in a later release."), e.values && t.warning("Deprecated schema", "Schema.values is a legacy approach. Please use oneOf.");
1865
1865
  };
1866
1866
  var Er = Fc;
1867
1867
  var ye = require("react/jsx-runtime");
1868
1868
  function Pc(e) {
1869
- let t = Ce(), [o, r] = (0, wt.useState)(false), [n, a] = (0, wt.useState)(false), [i, m] = (0, wt.useState)(false), l = (0, wt.useMemo)(() => e.schema.$id || We(), [e.schema.$id]), [c, p] = (0, wt.useState)(On(e.schema, e.model)), [y, f] = (0, wt.useState)(dS(e.model, e.schema.oneOf)), u = Ym(t, 200), d = (R) => {
1869
+ let t = Ce(), [o, r] = (0, wt.useState)(false), [n, a] = (0, wt.useState)(false), [i, m] = (0, wt.useState)(false), l = (0, wt.useMemo)(() => e.schema.$id || We(), [e.schema.$id]), [c, p] = (0, wt.useState)(On(e.schema, e.model)), [y, f] = (0, wt.useState)(pS(e.model, e.schema.oneOf)), u = Ym(t, 200), d = (R) => {
1870
1870
  u("Dynamic Flow - OneOf Searched", { oneOfId: e.schema.analyticsId, searchValueLength: R.length });
1871
1871
  };
1872
1872
  if ((0, wt.useEffect)(() => {
@@ -1889,35 +1889,35 @@ var require_main_min = __commonJS({
1889
1889
  } else
1890
1890
  e.onChange({ model: y[R], triggerSchema: v, triggerModel: y[R], type: A, metadata: O });
1891
1891
  A !== "init" && e.schema.analyticsId && t("Dynamic Flow - OneOf Selected", { oneOfId: e.schema.analyticsId, schemaId: v == null ? void 0 : v.analyticsId });
1892
- }, w = pS(e.schema), F = lS(e, c), x = { "form-group": true, "has-error": !o && e.errors && !Ht(e.errors) || (e.submitted || o && i) && F.length }, P = `${l}-feedback`;
1893
- return (0, ye.jsxs)(ye.Fragment, { children: [(e.schema.oneOf.length > 1 || nt(e.schema.oneOf[0])) && (0, ye.jsxs)(ye.Fragment, { children: [e.schema.alert && (0, ye.jsx)(Ee, { component: e.schema.alert }), (0, ye.jsxs)("div", { className: (0, vc.default)(x), children: [mS(e.schema, l), (0, ye.jsx)(Er, { id: l, schema: w, value: c, disabled: e.disabled, describedBy: P, onChange: b, onFocus: h, onBlur: S, onSearchChange: d }), (0, ye.jsx)(it, { id: P, changed: o, focused: n, blurred: i, submitted: e.submitted, errors: cS(e.errors), schema: e.schema, validations: F, infoMessage: null })] })] }), xr(e.schema.oneOf[c]) && (0, ye.jsx)(Be, { schema: e.schema.oneOf[c], model: y[c], errors: e.errors, submitted: e.submitted, hideTitle: true, disabled: e.disabled, onChange: (R) => g(c, R), onPersistAsync: e.onPersistAsync })] });
1892
+ }, w = uS(e.schema), F = cS(e, c), x = { "form-group": true, "has-error": !o && e.errors && !Ht(e.errors) || (e.submitted || o && i) && F.length }, P = `${l}-feedback`;
1893
+ return (0, ye.jsxs)(ye.Fragment, { children: [(e.schema.oneOf.length > 1 || nt(e.schema.oneOf[0])) && (0, ye.jsxs)(ye.Fragment, { children: [e.schema.alert && (0, ye.jsx)(Ee, { component: e.schema.alert }), (0, ye.jsxs)("div", { className: (0, vc.default)(x), children: [lS(e.schema, l), (0, ye.jsx)(Er, { id: l, schema: w, value: c, disabled: e.disabled, describedBy: P, onChange: b, onFocus: h, onBlur: S, onSearchChange: d }), (0, ye.jsx)(it, { id: P, changed: o, focused: n, blurred: i, submitted: e.submitted, errors: dS(e.errors), schema: e.schema, validations: F, infoMessage: null })] })] }), xr(e.schema.oneOf[c]) && (0, ye.jsx)(Be, { schema: e.schema.oneOf[c], model: y[c], errors: e.errors, submitted: e.submitted, hideTitle: true, disabled: e.disabled, onChange: (R) => g(c, R), onPersistAsync: e.onPersistAsync })] });
1894
1894
  }
1895
- function mS(e, t) {
1895
+ function lS(e, t) {
1896
1896
  var n;
1897
1897
  let o = e.help ? (0, ye.jsx)(Et, { help: e.help }) : null, r = nt(e.oneOf[0]) ? (0, ye.jsx)("div", { className: "m-b-1", children: (0, ye.jsxs)("label", { className: "control-label d-inline", htmlFor: t, children: [e.title, " ", o] }) }) : (0, ye.jsx)(ye.Fragment, { children: o ? (0, ye.jsxs)("h4", { className: "m-b-2", children: [e.title, " ", o] }) : (0, ye.jsx)(xc.Header, { title: (n = e.title) != null ? n : "" }) });
1898
1898
  return e.title ? r : o;
1899
1899
  }
1900
- function lS(e, t) {
1900
+ function cS(e, t) {
1901
1901
  let o = e.schema.oneOf[t != null ? t : -1];
1902
1902
  return nt(o) ? Ct(o.const, e.schema, !!e.required) : t === null || t < 0 ? Ct(null, e.schema, !!e.required) : [];
1903
1903
  }
1904
- function cS(e) {
1904
+ function dS(e) {
1905
1905
  return typeof e == "string" ? e : null;
1906
1906
  }
1907
- function dS(e, t) {
1907
+ function pS(e, t) {
1908
1908
  return t.map((o) => Mo(e, o));
1909
1909
  }
1910
- function pS(e) {
1911
- return C(s({}, e), { oneOf: e.oneOf.map(uS) });
1910
+ function uS(e) {
1911
+ return C(s({}, e), { oneOf: e.oneOf.map(yS) });
1912
1912
  }
1913
- function uS(e, t) {
1913
+ function yS(e, t) {
1914
1914
  let { title: o, description: r, disabled: n = false, icon: a, image: i, keywords: m } = e;
1915
1915
  return { title: o, description: r, disabled: n, icon: a, image: i, const: t, keywords: m };
1916
1916
  }
1917
1917
  Pc.defaultProps = { required: false, disabled: false };
1918
1918
  var Bi = Pc;
1919
1919
  var Rc = pe(Re());
1920
- var ho = require("react");
1920
+ var fo = require("react");
1921
1921
  var Nn = require("@transferwise/components");
1922
1922
  var Ic = require("react");
1923
1923
  var Mc = require("react/jsx-runtime");
@@ -1927,8 +1927,8 @@ var require_main_min = __commonJS({
1927
1927
  }
1928
1928
  var jo = require("react/jsx-runtime");
1929
1929
  function kc(e) {
1930
- let { model: t, schema: o, submitted: r, required: n, errors: a, onChange: i } = e, [m, l] = (0, ho.useState)({}), [c, p] = (0, ho.useState)(null), [y, f] = (0, ho.useState)([]), [u, d] = (0, ho.useState)(false), g = Se(), h = Ce();
1931
- (0, ho.useEffect)(() => {
1930
+ let { model: t, schema: o, submitted: r, required: n, errors: a, onChange: i } = e, [m, l] = (0, fo.useState)({}), [c, p] = (0, fo.useState)(null), [y, f] = (0, fo.useState)([]), [u, d] = (0, fo.useState)(false), g = Se(), h = Ce();
1931
+ (0, fo.useEffect)(() => {
1932
1932
  f(r ? Ct(t, o, !!n) : []);
1933
1933
  }, [t, o, r, n]);
1934
1934
  let S = async (v, L) => {
@@ -1993,41 +1993,41 @@ var require_main_min = __commonJS({
1993
1993
  var zc = Uc;
1994
1994
  var Tt = require("react/jsx-runtime");
1995
1995
  var Hc = (e) => e.promoted === true;
1996
- var yS = (e) => {
1996
+ var fS = (e) => {
1997
1997
  var m;
1998
- let [t, o] = (0, jc.useState)(Ec(e.schema, e.model) || ((m = e.schema.promotion) == null ? void 0 : m.default) || "promoted"), r = e.schema.alert, n = e.schema.oneOf.find(Hc), a = fS(n), i = hS(e.schema);
1998
+ let [t, o] = (0, jc.useState)(Ec(e.schema, e.model) || ((m = e.schema.promotion) == null ? void 0 : m.default) || "promoted"), r = e.schema.alert, n = e.schema.oneOf.find(Hc), a = hS(n), i = gS(e.schema);
1999
1999
  return (0, Tt.jsxs)(Tt.Fragment, { children: [r && (0, Tt.jsx)(Ee, { component: r }), (0, Tt.jsx)(zc, { id: e.schema.$id, title: e.schema.title, promotedOneOf: n, promotion: e.schema.promotion, selection: t, setSelection: o }), t === "promoted" && (0, Tt.jsx)(Or, C(s({}, e), { schema: a })), t === "other" && (0, Tt.jsx)(Be, C(s({}, e), { schema: i }))] });
2000
2000
  };
2001
- function fS(e) {
2001
+ function hS(e) {
2002
2002
  return C(s({}, e), { title: void 0, description: void 0 });
2003
2003
  }
2004
- function hS(e) {
2004
+ function gS(e) {
2005
2005
  var r, n, a;
2006
2006
  let t = (r = e.promotion) != null && r.displayTwice ? [...e.oneOf] : e.oneOf.filter((i) => !Hc(i)), o = (a = (n = e.promotion) == null ? void 0 : n.other.heading) == null ? void 0 : a.text;
2007
2007
  return t.length === 1 ? C(s({}, t[0]), { title: o }) : t.length > 1 ? { title: o, oneOf: t, control: e.control } : null;
2008
2008
  }
2009
- var Gi = yS;
2009
+ var Gi = fS;
2010
2010
  var Bn = require("@transferwise/components");
2011
2011
  var $c = require("react-intl");
2012
2012
  var qc = require("react-intl");
2013
2013
  var Wi = (0, qc.defineMessages)({ yes: { id: "dynamicFlows.ReadOnlySchema.yes", defaultMessage: "Yes", description: "Yes, used for boolean schemas with a value of true." }, no: { id: "dynamicFlows.ReadOnlySchema.no", defaultMessage: "No", description: "No: used for boolean schemas with a value of false." } });
2014
2014
  var qo = require("react/jsx-runtime");
2015
- function gS({ schema: e, model: t }) {
2016
- let { title: o = "" } = e, { formatMessage: r } = (0, $c.useIntl)(), n = CS({ schema: e, model: t, formatMessage: r });
2015
+ function CS({ schema: e, model: t }) {
2016
+ let { title: o = "" } = e, { formatMessage: r } = (0, $c.useIntl)(), n = SS({ schema: e, model: t, formatMessage: r });
2017
2017
  return (0, qo.jsx)(Bn.DefinitionList, { layout: Bn.Layout.VERTICAL_ONE_COLUMN, definitions: [{ title: o, value: n, key: "" }] });
2018
2018
  }
2019
- var _i = gS;
2020
- function CS({ schema: e, model: t, formatMessage: o }) {
2021
- return kt(e) ? rt(e) ? SS(e, t) : e.type === "boolean" && ft(t) ? o(t ? Wi.yes : Wi.no) : t && t.toString() || "" : "";
2022
- }
2023
- function SS(e, t) {
2024
- let o = bS(e, t);
2025
- return o ? wS(o) : t;
2019
+ var _i = CS;
2020
+ function SS({ schema: e, model: t, formatMessage: o }) {
2021
+ return kt(e) ? rt(e) ? bS(e, t) : e.type === "boolean" && ft(t) ? o(t ? Wi.yes : Wi.no) : t && t.toString() || "" : "";
2026
2022
  }
2027
2023
  function bS(e, t) {
2024
+ let o = wS(e, t);
2025
+ return o ? FS(o) : t;
2026
+ }
2027
+ function wS(e, t) {
2028
2028
  return e.oneOf.find((o) => "const" in o ? t === o.const : false);
2029
2029
  }
2030
- function wS(e) {
2030
+ function FS(e) {
2031
2031
  let t = e.title && e.description ? `${e.title} - ${e.description}` : e.title || "", o = zo({ icon: e.icon });
2032
2032
  return o != null && o.avatar ? (0, qo.jsxs)(qo.Fragment, { children: [o.avatar, " ", t] }) : t;
2033
2033
  }
@@ -2055,7 +2055,7 @@ var require_main_min = __commonJS({
2055
2055
  let v = new AbortController();
2056
2056
  return S(v), v.signal;
2057
2057
  };
2058
- return (0, Wc.jsx)(go, s({}, { submitted: n || d, model: m, errors: f || a, infoMessage: p, onChange: (v) => {
2058
+ return (0, Wc.jsx)(ho, s({}, { submitted: n || d, model: m, errors: f || a, infoMessage: p, onChange: (v) => {
2059
2059
  i(C(s({}, v), { triggerSchema: t, triggerModel: v.model })), u(null), y(null), l(v.model);
2060
2060
  }, onBlur: () => {
2061
2061
  !T(m) && !Ge(m, c.current) && ee(m, t) && x(m, t.validationAsync);
@@ -2065,10 +2065,10 @@ var require_main_min = __commonJS({
2065
2065
  var Ki = Gc;
2066
2066
  var Xe = require("react/jsx-runtime");
2067
2067
  var Kc = require("react");
2068
- function FS(e) {
2069
- let { schema: t, model: o = null, errors: r = null, hideTitle: n = false, disabled: a = false } = e, i = C(s({}, e), { model: o, errors: r, hideTitle: n, disabled: a }), m = io(t), l = Ao();
2068
+ function xS(e) {
2069
+ let { schema: t, model: o = null, errors: r = null, hideTitle: n = false, disabled: a = false } = e, i = C(s({}, e), { model: o, errors: r, hideTitle: n, disabled: a }), m = ao(t), l = Ao();
2070
2070
  switch ((0, _c.useEffect)(() => {
2071
- xS(t, o, r) || l.error("Invalid schema or model", `Schema of type ${m || "undefined"} requested, but schema did not pass validation.`);
2071
+ vS(t, o, r) || l.error("Invalid schema or model", `Schema of type ${m || "undefined"} requested, but schema did not pass validation.`);
2072
2072
  }, [JSON.stringify(t), JSON.stringify(o), JSON.stringify(r), m, l]), m) {
2073
2073
  case "readOnly":
2074
2074
  return (0, Xe.jsx)(_i, s({}, i));
@@ -2078,7 +2078,7 @@ var require_main_min = __commonJS({
2078
2078
  return (0, Xe.jsx)(Ki, s({}, i));
2079
2079
  case "basic": {
2080
2080
  let c = s({ infoMessage: null }, i);
2081
- return (0, Xe.jsx)(go, s({}, c));
2081
+ return (0, Xe.jsx)(ho, s({}, c));
2082
2082
  }
2083
2083
  case "object":
2084
2084
  return (0, Kc.createElement)(Or, C(s({}, i), { key: JSON.stringify(t) }));
@@ -2093,9 +2093,9 @@ var require_main_min = __commonJS({
2093
2093
  }
2094
2094
  return (0, Xe.jsx)(Xe.Fragment, {});
2095
2095
  }
2096
- var Be = FS;
2097
- var xS = (e, t, o) => {
2098
- switch (io(e)) {
2096
+ var Be = xS;
2097
+ var vS = (e, t, o) => {
2098
+ switch (ao(e)) {
2099
2099
  case "persistAsync":
2100
2100
  return yn(e) && hn(t) && vr(o);
2101
2101
  case "validationAsync":
@@ -2107,7 +2107,7 @@ var require_main_min = __commonJS({
2107
2107
  case "array":
2108
2108
  return Rt(e) && Km(t) && vr(o);
2109
2109
  case "promotedOneOf":
2110
- return ao(e) && di(t);
2110
+ return no(e) && di(t);
2111
2111
  case "oneOf":
2112
2112
  return rt(e);
2113
2113
  case "allOf":
@@ -2116,21 +2116,21 @@ var require_main_min = __commonJS({
2116
2116
  return false;
2117
2117
  };
2118
2118
  var Ji = require("react/jsx-runtime");
2119
- function vS({ component: e, model: t = null, errors: o = null, submitted: r, onModelChange: n, onPersistAsync: a }) {
2119
+ function PS({ component: e, model: t = null, errors: o = null, submitted: r, onModelChange: n, onPersistAsync: a }) {
2120
2120
  let i = e.schema;
2121
2121
  return (0, Ji.jsx)("div", { className: _(e.margin || "md"), children: (0, Ji.jsx)(Be, { schema: i, model: t, errors: o, submitted: r, onChange: (m) => {
2122
2122
  n(s({ formSchema: i }, m));
2123
2123
  }, onPersistAsync: a }) });
2124
2124
  }
2125
- var Xi = vS;
2125
+ var Xi = PS;
2126
2126
  var Un = require("@transferwise/components");
2127
2127
  var Jc = pe(Re());
2128
2128
  var mt = require("react/jsx-runtime");
2129
- var PS = (e) => {
2129
+ var IS = (e) => {
2130
2130
  let { text: t, size: o = "md", align: r = "left", margin: n = "md", control: a } = e.component, i = (0, Jc.default)(at({ align: r, margin: n }));
2131
- return a === "display" ? (0, mt.jsx)(AS, { size: o, text: t, classes: i }) : (0, mt.jsx)(IS, { size: o, text: t, classes: i });
2131
+ return a === "display" ? (0, mt.jsx)(MS, { size: o, text: t, classes: i }) : (0, mt.jsx)(AS, { size: o, text: t, classes: i });
2132
2132
  };
2133
- var IS = ({ size: e, text: t, classes: o }) => {
2133
+ var AS = ({ size: e, text: t, classes: o }) => {
2134
2134
  switch (e) {
2135
2135
  case "xs":
2136
2136
  return (0, mt.jsx)("h5", { className: o, children: t });
@@ -2145,7 +2145,7 @@ var require_main_min = __commonJS({
2145
2145
  return (0, mt.jsx)("h3", { className: o, children: t });
2146
2146
  }
2147
2147
  };
2148
- var AS = ({ size: e, text: t, classes: o }) => {
2148
+ var MS = ({ size: e, text: t, classes: o }) => {
2149
2149
  switch (e) {
2150
2150
  case "xs":
2151
2151
  case "sm":
@@ -2158,7 +2158,7 @@ var require_main_min = __commonJS({
2158
2158
  return (0, mt.jsx)(Un.Display, { type: "display-medium", className: o, children: t });
2159
2159
  }
2160
2160
  };
2161
- var Yi = PS;
2161
+ var Yi = IS;
2162
2162
  var Zi = require("@transferwise/components");
2163
2163
  var Tr = require("react/jsx-runtime");
2164
2164
  var Qi = ({ component: e }) => {
@@ -2169,43 +2169,43 @@ var require_main_min = __commonJS({
2169
2169
  var Xc = require("@transferwise/components");
2170
2170
  var zn = require("react");
2171
2171
  var ts = require("react/jsx-runtime");
2172
- function MS({ component: e }) {
2172
+ function RS({ component: e }) {
2173
2173
  let { url: t, size: o, text: r, margin: n, accessibilityDescription: a } = e, i = Se(), [m, l] = (0, zn.useState)("");
2174
2174
  (0, zn.useEffect)(() => {
2175
- kS(i, t).then(l);
2175
+ OS(i, t).then(l);
2176
2176
  }, [t, i]);
2177
2177
  let c = { alt: a || r || "", src: m, stretch: true, shrink: true };
2178
2178
  return m ? (0, ts.jsx)("div", { className: `df-image ${o || "md"}`, children: (0, ts.jsx)(Xc.Image, s({ className: `img-responsive ${_(n || "md")}` }, c)) }) : null;
2179
2179
  }
2180
- var RS = (e) => new Promise((t, o) => {
2180
+ var kS = (e) => new Promise((t, o) => {
2181
2181
  let r = new FileReader();
2182
2182
  r.addEventListener("loadend", () => t(r.result)), r.addEventListener("error", (n) => o(n)), r.readAsDataURL(e);
2183
2183
  });
2184
- var kS = async (e, t) => {
2184
+ var OS = async (e, t) => {
2185
2185
  var o;
2186
2186
  try {
2187
2187
  return Oo(t) || t != null && t.startsWith(`${(o = window == null ? void 0 : window.location) == null ? void 0 : o.origin}/`) ? e(t, { method: "GET", headers: { "Content-Type": "image/image" }, credentials: "same-origin" }).then((r) => {
2188
2188
  if (r.ok)
2189
2189
  return r.blob();
2190
2190
  throw new Error("Image fetching failed");
2191
- }).then(RS).catch(() => t) : t;
2191
+ }).then(kS).catch(() => t) : t;
2192
2192
  } catch (r) {
2193
2193
  return t;
2194
2194
  }
2195
2195
  };
2196
- var os = MS;
2196
+ var os = RS;
2197
2197
  var jn = require("@transferwise/components");
2198
2198
  var Dr = require("react/jsx-runtime");
2199
- var OS = ["positive", "neutral"];
2200
- var ES = ["warning", "negative"];
2201
- var LS = ({ component: e }) => {
2202
- let { items: t } = e, o = t.filter((n) => OS.includes(n.context)).map(({ text: n }) => n), r = t.filter((n) => ES.includes(n.context)).map(({ text: n }) => n);
2199
+ var ES = ["positive", "neutral"];
2200
+ var LS = ["warning", "negative"];
2201
+ var TS = ({ component: e }) => {
2202
+ let { items: t } = e, o = t.filter((n) => ES.includes(n.context)).map(({ text: n }) => n), r = t.filter((n) => LS.includes(n.context)).map(({ text: n }) => n);
2203
2203
  return (0, Dr.jsxs)("div", { className: _(e.margin || "md"), children: [e.title ? (0, Dr.jsx)(jn.Header, { title: e.title }) : null, (0, Dr.jsx)(jn.InstructionsList, { dos: o, donts: r })] });
2204
2204
  };
2205
- var rs = LS;
2205
+ var rs = TS;
2206
2206
  var X = require("react/jsx-runtime");
2207
2207
  var ie = (e) => JSON.stringify(e);
2208
- function TS(e) {
2208
+ function DS(e) {
2209
2209
  let { components: t, model: o, submitted: r, errors: n, onModelChange: a, onAction: i, onPersistAsync: m, baseUrl: l } = e, c = (p) => {
2210
2210
  switch (p.type) {
2211
2211
  case "heading":
@@ -2253,25 +2253,25 @@ var require_main_min = __commonJS({
2253
2253
  };
2254
2254
  return Qm() || l == null ? (0, X.jsx)(X.Fragment, { children: t.map(c) }) : (0, X.jsx)(bn, { baseUrl: l, children: t.map(c) });
2255
2255
  }
2256
- var ke = TS;
2256
+ var ke = DS;
2257
2257
  var Hn = require("@transferwise/components");
2258
2258
  var $o = require("react/jsx-runtime");
2259
- var DS = ({ component: e }) => (0, $o.jsxs)("div", { className: _(e.margin || "md"), children: [e.title ? (0, $o.jsx)(Hn.Header, { title: e.title }) : null, e.items.map(VS)] });
2260
- var VS = ({ title: e, description: t, icon: o, status: r }) => {
2261
- let n = s(s({ key: `${e}/${t || ""}`, title: e, description: t }, o != null && o.name ? { icon: (0, $o.jsx)(Gt, { type: o.name }) } : {}), r ? { status: US[r] } : {});
2259
+ var VS = ({ component: e }) => (0, $o.jsxs)("div", { className: _(e.margin || "md"), children: [e.title ? (0, $o.jsx)(Hn.Header, { title: e.title }) : null, e.items.map(NS)] });
2260
+ var NS = ({ title: e, description: t, icon: o, status: r }) => {
2261
+ let n = s(s({ key: `${e}/${t || ""}`, title: e, description: t }, o != null && o.name ? { icon: (0, $o.jsx)(Gt, { type: o.name }) } : {}), r ? { status: zS[r] } : {});
2262
2262
  return (0, $o.jsx)(Hn.Summary, s({}, n));
2263
2263
  };
2264
- var NS = { done: "done", pending: "pending", "not-done": "notDone" };
2265
- var BS = { positive: "done", warning: "pending", neutral: "notDone" };
2266
- var US = s(s({}, NS), BS);
2267
- var ns = DS;
2264
+ var BS = { done: "done", pending: "pending", "not-done": "notDone" };
2265
+ var US = { positive: "done", warning: "pending", neutral: "notDone" };
2266
+ var zS = s(s({}, BS), US);
2267
+ var ns = VS;
2268
2268
  var Yc = require("@transferwise/components");
2269
2269
  var Zc = require("react/jsx-runtime");
2270
- var zS = ({ component: e }) => {
2270
+ var jS = ({ component: e }) => {
2271
2271
  let { margin: t = "md", size: o = "md" } = e;
2272
2272
  return (0, Zc.jsx)(Yc.Loader, { size: o, classNames: { "tw-loader": `tw-loader m-x-auto ${_(t)}` }, "data-testid": "loading-indicator" });
2273
2273
  };
2274
- var Vr = zS;
2274
+ var Vr = jS;
2275
2275
  var rd = require("@transferwise/components");
2276
2276
  var nd = require("react-intl");
2277
2277
  var Qc = require("react-intl");
@@ -2280,54 +2280,54 @@ var require_main_min = __commonJS({
2280
2280
  var td = require("react");
2281
2281
  function od() {
2282
2282
  let e = (0, td.useContext)(ed.SnackbarContext);
2283
- return e ? e.createSnackbar : jS;
2283
+ return e ? e.createSnackbar : HS;
2284
2284
  }
2285
- function jS() {
2285
+ function HS() {
2286
2286
  }
2287
2287
  var Jt = require("react/jsx-runtime");
2288
- function HS({ component: e }) {
2289
- return e.control === "copyable" ? (0, Jt.jsx)($S, { component: e }) : (0, Jt.jsx)(qS, { component: e });
2290
- }
2291
2288
  function qS({ component: e }) {
2292
- return (0, Jt.jsxs)("p", { className: at(e), children: [" ", e.text, " "] });
2289
+ return e.control === "copyable" ? (0, Jt.jsx)(GS, { component: e }) : (0, Jt.jsx)($S, { component: e });
2293
2290
  }
2294
2291
  function $S({ component: e }) {
2292
+ return (0, Jt.jsxs)("p", { className: at(e), children: [" ", e.text, " "] });
2293
+ }
2294
+ function GS({ component: e }) {
2295
2295
  let { formatMessage: t } = (0, nd.useIntl)(), o = od(), { text: r } = e, n = () => {
2296
2296
  var i;
2297
- (i = navigator.clipboard) == null || i.writeText(r).then(() => o({ text: t(Go.copied) })).catch(GS);
2297
+ (i = navigator.clipboard) == null || i.writeText(r).then(() => o({ text: t(Go.copied) })).catch(WS);
2298
2298
  }, a = `${at({ align: e.align, margin: "sm" })} form-control`;
2299
2299
  return (0, Jt.jsxs)("div", { className: at(e), children: [(0, Jt.jsx)("input", { type: "text", className: a, value: r, readOnly: true, style: { textOverflow: "ellipsis" } }), (0, Jt.jsx)(rd.Button, { block: true, onClick: n, children: t(Go.copy) })] });
2300
2300
  }
2301
- function GS() {
2301
+ function WS() {
2302
2302
  }
2303
- var as = HS;
2303
+ var as = qS;
2304
2304
  var qn = require("@transferwise/components");
2305
2305
  var Ue = require("react/jsx-runtime");
2306
- var WS = (e, t) => t.fields.map(({ label: o, value: r, help: n }, a) => ({ key: String(a), title: o, value: _S(r, n, e) }));
2307
- var _S = (e, t, o) => t ? o === "HORIZONTAL_RIGHT_ALIGNED" ? (0, Ue.jsxs)(Ue.Fragment, { children: [(0, Ue.jsx)(Et, { help: t }), " ", e] }) : (0, Ue.jsxs)(Ue.Fragment, { children: [e, " ", (0, Ue.jsx)(Et, { help: t })] }) : e;
2308
- var KS = (e) => (e.control || e.orientation) === "horizontal" ? "HORIZONTAL_RIGHT_ALIGNED" : "VERTICAL_ONE_COLUMN";
2309
- function JS(e) {
2306
+ var _S = (e, t) => t.fields.map(({ label: o, value: r, help: n }, a) => ({ key: String(a), title: o, value: KS(r, n, e) }));
2307
+ var KS = (e, t, o) => t ? o === "HORIZONTAL_RIGHT_ALIGNED" ? (0, Ue.jsxs)(Ue.Fragment, { children: [(0, Ue.jsx)(Et, { help: t }), " ", e] }) : (0, Ue.jsxs)(Ue.Fragment, { children: [e, " ", (0, Ue.jsx)(Et, { help: t })] }) : e;
2308
+ var JS = (e) => (e.control || e.orientation) === "horizontal" ? "HORIZONTAL_RIGHT_ALIGNED" : "VERTICAL_ONE_COLUMN";
2309
+ function XS(e) {
2310
2310
  let t = e.component, o = _(t.margin || "xs"), r = (m, l) => ({ text: m != null ? m : "", href: l.url, onClick: (c) => {
2311
2311
  c.preventDefault(), l && e.onAction(l);
2312
- } }), n = KS(t), a = t.callToAction ? r(t.callToAction.title, t.callToAction.action) : null, i = !a && t.action ? r(t.action.title || "", t.action) : null;
2313
- return (0, Ue.jsxs)("div", { className: o, children: [t.title && (0, Ue.jsx)(qn.Header, { title: t.title, action: a || i || void 0 }), (0, Ue.jsx)("div", { className: o, children: (0, Ue.jsx)(qn.DefinitionList, { layout: n, definitions: WS(n, t) }) })] });
2312
+ } }), n = JS(t), a = t.callToAction ? r(t.callToAction.title, t.callToAction.action) : null, i = !a && t.action ? r(t.action.title || "", t.action) : null;
2313
+ return (0, Ue.jsxs)("div", { className: o, children: [t.title && (0, Ue.jsx)(qn.Header, { title: t.title, action: a || i || void 0 }), (0, Ue.jsx)("div", { className: o, children: (0, Ue.jsx)(qn.DefinitionList, { layout: n, definitions: _S(n, t) }) })] });
2314
2314
  }
2315
- var is = JS;
2315
+ var is = XS;
2316
2316
  var Wn = require("react");
2317
2317
  var ad = require("@transferwise/components");
2318
2318
  var $n = require("react/jsx-runtime");
2319
2319
  var id = ({ title: e, value: t, onFocus: o, onChange: r }) => (0, $n.jsxs)("label", { className: "control-label d-inline", children: [e, (0, $n.jsx)(ad.Input, { type: "text", value: t, className: "m-t-1", onFocus: o, onChange: (n) => r(n.currentTarget.value) })] });
2320
2320
  var Gn = require("@transferwise/components");
2321
2321
  var sd = require("react-intl");
2322
- var Co = require("react/jsx-runtime");
2322
+ var go = require("react/jsx-runtime");
2323
2323
  function md({ results: e, emptyMessage: t, onSelect: o }) {
2324
- return e.length === 0 ? (0, Co.jsx)("p", { className: "m-t-2", children: t }) : (0, Co.jsx)(Gn.NavigationOptionsList, { children: e.map((r) => (0, Co.jsx)(Gn.NavigationOption, { title: r.title, content: r.description, media: mo(r), showMediaCircle: false, showMediaAtAllSizes: true, onClick: () => o(r) }, JSON.stringify(r))) });
2324
+ return e.length === 0 ? (0, go.jsx)("p", { className: "m-t-2", children: t }) : (0, go.jsx)(Gn.NavigationOptionsList, { children: e.map((r) => (0, go.jsx)(Gn.NavigationOption, { title: r.title, content: r.description, media: so(r), showMediaCircle: false, showMediaAtAllSizes: true, onClick: () => o(r) }, JSON.stringify(r))) });
2325
2325
  }
2326
2326
  function ld({ onRetrySearch: e }) {
2327
2327
  let t = (0, sd.useIntl)();
2328
- return (0, Co.jsxs)("p", { className: "m-t-2", children: [t.formatMessage(ve.genericError), "\xA0", (0, Co.jsx)("a", { href: "/", onClick: (o) => {
2328
+ return (0, go.jsxs)("p", { className: "m-t-2", children: [t.formatMessage(xe.genericError), "\xA0", (0, go.jsx)("a", { href: "/", onClick: (o) => {
2329
2329
  o.preventDefault(), e();
2330
- }, children: t.formatMessage(ve.retry) })] });
2330
+ }, children: t.formatMessage(xe.retry) })] });
2331
2331
  }
2332
2332
  var Wo = require("react");
2333
2333
  var cd = { "Content-Type": "application/json" };
@@ -2342,7 +2342,7 @@ var require_main_min = __commonJS({
2342
2342
  let { signal: u } = r.current;
2343
2343
  o({ status: "loading" });
2344
2344
  try {
2345
- let h = await (y === "GET" ? n(ZS(p, f, c), { method: y, signal: u, headers: cd }) : n(p, { method: y, signal: u, headers: cd, body: JSON.stringify({ [f]: c }) }));
2345
+ let h = await (y === "GET" ? n(QS(p, f, c), { method: y, signal: u, headers: cd }) : n(p, { method: y, signal: u, headers: cd, body: JSON.stringify({ [f]: c }) }));
2346
2346
  i(h, c);
2347
2347
  } catch (g) {
2348
2348
  m(g, c);
@@ -2350,27 +2350,27 @@ var require_main_min = __commonJS({
2350
2350
  }, [n, JSON.stringify(e)]), i = async (c, p) => {
2351
2351
  if (c.ok) {
2352
2352
  let y = await c.json().catch(() => null);
2353
- if (XS(y)) {
2353
+ if (YS(y)) {
2354
2354
  o({ status: "success", results: y.results });
2355
2355
  return;
2356
2356
  }
2357
2357
  }
2358
2358
  o({ status: "error" });
2359
2359
  }, m = (c, p) => {
2360
- YS(c) || o({ status: "error" });
2360
+ ZS(c) || o({ status: "error" });
2361
2361
  }, l = t.status === "success" ? t.results : [];
2362
2362
  return { status: t.status, results: l, search: a };
2363
2363
  };
2364
- var XS = (e) => N(e) && "results" in e && W(e.results) && e.results.every((t) => N(t) && "title" in t && "type" in t && "value" in t);
2365
- var YS = (e) => e instanceof DOMException && e.name === "AbortError";
2366
- var ZS = (e, t, o) => {
2364
+ var YS = (e) => N(e) && "results" in e && W(e.results) && e.results.every((t) => N(t) && "title" in t && "type" in t && "value" in t);
2365
+ var ZS = (e) => e instanceof DOMException && e.name === "AbortError";
2366
+ var QS = (e, t, o) => {
2367
2367
  let [r, n] = e.split("?"), a = new URLSearchParams(n);
2368
2368
  return a.set(t, o), `${r}?${a.toString()}`;
2369
2369
  };
2370
- var So = require("react/jsx-runtime");
2371
- var QS = 400;
2372
- function eb({ component: e, onAction: t }) {
2373
- let [o, r] = (0, Wn.useState)(""), { title: n, margin: a, url: i, method: m, param: l, emptyMessage: c } = e, { status: p, results: y, search: f } = dd({ url: i, method: m, param: l }), u = Ce(), d = (0, Wn.useMemo)(() => $t(f, QS), [f]), g = () => {
2370
+ var Co = require("react/jsx-runtime");
2371
+ var eb = 400;
2372
+ function tb({ component: e, onAction: t }) {
2373
+ let [o, r] = (0, Wn.useState)(""), { title: n, margin: a, url: i, method: m, param: l, emptyMessage: c } = e, { status: p, results: y, search: f } = dd({ url: i, method: m, param: l }), u = Ce(), d = (0, Wn.useMemo)(() => $t(f, eb), [f]), g = () => {
2374
2374
  u("Dynamic Flow - Search Started", {});
2375
2375
  }, h = (w) => {
2376
2376
  r(w), d(w);
@@ -2383,22 +2383,22 @@ var require_main_min = __commonJS({
2383
2383
  }, b = () => {
2384
2384
  r(o), f(o);
2385
2385
  };
2386
- return (0, So.jsxs)("div", { className: _(a || "md"), children: [(0, So.jsx)(id, { title: n, value: o, onChange: h, onFocus: g }), p === "loading" && (0, So.jsx)(Vr, { component: { type: "loading-indicator", size: "sm" } }), p === "error" && (0, So.jsx)(ld, { onRetrySearch: b }), p === "success" && (0, So.jsx)(md, { results: y, emptyMessage: c, onSelect: S })] });
2386
+ return (0, Co.jsxs)("div", { className: _(a || "md"), children: [(0, Co.jsx)(id, { title: n, value: o, onChange: h, onFocus: g }), p === "loading" && (0, Co.jsx)(Vr, { component: { type: "loading-indicator", size: "sm" } }), p === "error" && (0, Co.jsx)(ld, { onRetrySearch: b }), p === "success" && (0, Co.jsx)(md, { results: y, emptyMessage: c, onSelect: S })] });
2387
2387
  }
2388
- var ss = eb;
2388
+ var ss = tb;
2389
2389
  var _n = require("@transferwise/components");
2390
2390
  var pd = require("react");
2391
2391
  var _o = require("react/jsx-runtime");
2392
- function tb(e) {
2392
+ function ob(e) {
2393
2393
  let [t, o] = (0, pd.useState)(false), { component: r, onAction: n } = e, { margin: a = "md" } = r;
2394
2394
  return (0, _o.jsxs)("div", { className: at({ margin: a }), children: [(0, _o.jsx)(_n.Button, { priority: "tertiary", block: true, onClick: () => o(true), children: r.trigger.title }), (0, _o.jsx)(_n.Modal, { scroll: "content", open: t, size: "lg", body: (0, _o.jsx)(ke, C(s({}, e), { components: r.content.components, onAction: (i) => {
2395
2395
  o(false), n(i);
2396
2396
  } })), onClose: () => o(false) })] });
2397
2397
  }
2398
- var ms = tb;
2398
+ var ms = ob;
2399
2399
  var je = require("react/jsx-runtime");
2400
2400
  var ls = (e) => T(e) || ue(e);
2401
- var ob = (e) => e.type === "boolean" && ls(e.default) ? false : e.default;
2401
+ var rb = (e) => e.type === "boolean" && ls(e.default) ? false : e.default;
2402
2402
  var yd = (e) => {
2403
2403
  var k, q, U;
2404
2404
  let t = (M, z, V) => {
@@ -2412,7 +2412,7 @@ var require_main_min = __commonJS({
2412
2412
  }, n = (M) => qt(M, e.schema), a = () => d(true), i = () => {
2413
2413
  d(false), h(true), e.onBlur && e.onBlur();
2414
2414
  }, [m, l] = (0, ze.useState)((k = e.model) != null ? k : null), [c, p] = (0, ze.useState)((q = e.model) != null ? q : null), [y, f] = (0, ze.useState)(false), [u, d] = (0, ze.useState)(false), [g, h] = (0, ze.useState)(false), [S, b] = (0, ze.useState)([]), w = (0, ze.useMemo)(() => e.schema.$id || We(), [e.schema.$id]), F = () => {
2415
- let M = ob(e.schema);
2415
+ let M = rb(e.schema);
2416
2416
  ls(m) && !ls(M) && r(M, "init"), e.schema.const && r(e.schema.const, "init");
2417
2417
  }, x = () => {
2418
2418
  b(o(m));
@@ -2426,20 +2426,20 @@ var require_main_min = __commonJS({
2426
2426
  return R ? null : (0, je.jsxs)(je.Fragment, { children: [e.schema.alert && (0, je.jsx)(Ee, { component: e.schema.alert }), (0, je.jsxs)("div", { className: (0, ud.default)(A), children: [O && (0, je.jsxs)("div", { className: "d-inline-block m-b-1", children: [(0, je.jsx)("label", { className: "control-label d-inline", htmlFor: w, children: e.schema.title }), !!v && (0, je.jsx)(Et, { help: v })] }), !O && !!v && (0, je.jsx)(Et, { help: v }), (0, je.jsx)(Er, { id: w, schema: e.schema, value: m, disabled: !!e.disabled, onChange: t, onFocus: a, onBlur: i, describedBy: L }), (0, je.jsx)(it, { id: L, changed: y, focused: u, blurred: g, submitted: e.submitted, errors: (U = e.errors) != null ? U : null, schema: e.schema, validations: S, infoMessage: e.infoMessage })] })] });
2427
2427
  };
2428
2428
  yd.defaultProps = { required: false, disabled: false, onBlur: null };
2429
- var go = yd;
2429
+ var ho = yd;
2430
2430
  var Cd = require("react/jsx-runtime");
2431
2431
  var ji = (e, t) => t[e];
2432
2432
  var hd = (e, t) => {
2433
2433
  var o;
2434
2434
  return (o = t.validation) == null ? void 0 : o[e];
2435
2435
  };
2436
- var rb = /* @__PURE__ */ new Set([j.RADIO, j.SELECT, j.DATELOOKUP, j.FILE, j.UPLOAD]);
2436
+ var nb = /* @__PURE__ */ new Set([j.RADIO, j.SELECT, j.DATELOOKUP, j.FILE, j.UPLOAD]);
2437
2437
  function gd(e) {
2438
- let { schema: t, required: o, submitted: r, errors: n, onChange: a, onPersistAsync: i } = e, m = (0, fd.useIntl)(), l = Se(), c = Ce(), [p, y] = (0, bo.useState)(null), f = Sd(p), [u, d] = (0, bo.useState)(null), [g, h] = (0, bo.useState)(false), [S, b] = (0, bo.useState)(null);
2439
- (0, bo.useEffect)(() => {
2440
- rb.has(Ni(t.persistAsync.schema)) && P();
2438
+ let { schema: t, required: o, submitted: r, errors: n, onChange: a, onPersistAsync: i } = e, m = (0, fd.useIntl)(), l = Se(), c = Ce(), [p, y] = (0, So.useState)(null), f = Sd(p), [u, d] = (0, So.useState)(null), [g, h] = (0, So.useState)(false), [S, b] = (0, So.useState)(null);
2439
+ (0, So.useEffect)(() => {
2440
+ nb.has(Ni(t.persistAsync.schema)) && P();
2441
2441
  }, [p]);
2442
- let w = () => d(m.formatMessage(ve.genericErrorRetryHint)), F = async (O, v) => {
2442
+ let w = () => d(m.formatMessage(xe.genericErrorRetryHint)), F = async (O, v) => {
2443
2443
  let L = x(), k = { [v.param]: O };
2444
2444
  h(true);
2445
2445
  try {
@@ -2473,7 +2473,7 @@ var require_main_min = __commonJS({
2473
2473
  }, A = ({ model: O }) => {
2474
2474
  d(null), ee(O, t.persistAsync.schema) && y(O);
2475
2475
  };
2476
- return (0, Cd.jsx)(go, { required: o, submitted: r || g, schema: t.persistAsync.schema, errors: u || n, model: null, infoMessage: null, onChange: A, onBlur: R });
2476
+ return (0, Cd.jsx)(ho, { required: o, submitted: r || g, schema: t.persistAsync.schema, errors: u || n, model: null, infoMessage: null, onChange: A, onBlur: R });
2477
2477
  }
2478
2478
  gd.defaultProps = { required: false };
2479
2479
  var Ui = gd;
@@ -2489,7 +2489,7 @@ var require_main_min = __commonJS({
2489
2489
  return o(f), f.signal;
2490
2490
  };
2491
2491
  function l(f) {
2492
- let u = ko(a), d = m(), g = e.param, h = u ? nb(g, f) : JSON.stringify({ [g]: f });
2492
+ let u = ko(a), d = m(), g = e.param, h = u ? ab(g, f) : JSON.stringify({ [g]: f });
2493
2493
  return { method: e.method, headers: s({}, !u && { "Content-Type": "application/json" }), body: h, signal: d };
2494
2494
  }
2495
2495
  async function c(f) {
@@ -2517,24 +2517,24 @@ var require_main_min = __commonJS({
2517
2517
  throw new Error(d);
2518
2518
  }
2519
2519
  }
2520
- throw new Error(n.formatMessage(ve.genericErrorRetryHint));
2520
+ throw new Error(n.formatMessage(xe.genericErrorRetryHint));
2521
2521
  }
2522
2522
  let y = (f) => {
2523
- let u = ab(f) ? f.message : n.formatMessage(ve.genericErrorRetryHint);
2523
+ let u = ib(f) ? f.message : n.formatMessage(xe.genericErrorRetryHint);
2524
2524
  throw new Error(u);
2525
2525
  };
2526
2526
  return i;
2527
2527
  };
2528
- function nb(e, t) {
2528
+ function ab(e, t) {
2529
2529
  let o = new FormData();
2530
2530
  return t !== null && o.append(e, t), o;
2531
2531
  }
2532
- function ab(e) {
2532
+ function ib(e) {
2533
2533
  return N(e) && "message" in e && typeof e.message == "string";
2534
2534
  }
2535
2535
  var Xt = require("react");
2536
2536
  function wn({ asyncFn: e, interval: t, maxAttempts: o, maxConsecutiveFails: r, onPollingResponse: n, onFailure: a }) {
2537
- let i = (0, Xt.useRef)(n), m = (0, Xt.useRef)(a), l = (0, Xt.useMemo)(() => ib(e, o, r, (c) => i.current(c), () => m.current()), [e, o, r]);
2537
+ let i = (0, Xt.useRef)(n), m = (0, Xt.useRef)(a), l = (0, Xt.useMemo)(() => sb(e, o, r, (c) => i.current(c), () => m.current()), [e, o, r]);
2538
2538
  (0, Xt.useEffect)(() => {
2539
2539
  if (t > 0) {
2540
2540
  let c = setInterval(() => {
@@ -2546,7 +2546,7 @@ var require_main_min = __commonJS({
2546
2546
  i.current = n, m.current = a;
2547
2547
  }, [n, a]);
2548
2548
  }
2549
- function ib(e, t, o, r, n) {
2549
+ function sb(e, t, o, r, n) {
2550
2550
  let a = true, i = 0, m = 0;
2551
2551
  return e ? () => {
2552
2552
  a && (m++, e().then((l) => {
@@ -2583,20 +2583,20 @@ var require_main_min = __commonJS({
2583
2583
  }, [t, e]) });
2584
2584
  }
2585
2585
  var xd = require("react/jsx-runtime");
2586
- var sb = (e, t) => {
2586
+ var mb = (e, t) => {
2587
2587
  var r;
2588
2588
  if (Ht(e))
2589
2589
  return [];
2590
2590
  let o = wr(e, t);
2591
2591
  return Mt({ layout: o, schemas: e.schemas || [], actions: e.actions || [], model: (r = e.model) != null ? r : null });
2592
2592
  };
2593
- var mb = (e) => {
2594
- let { stepSpecification: t, stepLayoutOptions: o, submitted: r, model: n, formErrors: a, onModelChange: i } = e, m = sb(t, o), { loading: l, registerPersistAsyncPromise: c } = vo(), p = Ce(), y = l ? () => {
2593
+ var lb = (e) => {
2594
+ let { stepSpecification: t, stepLayoutOptions: o, submitted: r, model: n, formErrors: a, onModelChange: i } = e, m = mb(t, o), { loading: l, registerPersistAsyncPromise: c } = vo(), p = Ce(), y = l ? () => {
2595
2595
  p("Dynamic Flow - onAction supressed", { reason: "LayoutStep - loading state" });
2596
2596
  } : e.onAction;
2597
2597
  return Fd(t.polling, y), (0, xd.jsx)(ke, { components: m, submitted: r, model: n, errors: a, onAction: y, onModelChange: i, onPersistAsync: c });
2598
2598
  };
2599
- var Jn = mb;
2599
+ var Jn = lb;
2600
2600
  var ea = require("react");
2601
2601
  var Pe = require("react");
2602
2602
  var Gd = require("react-intl");
@@ -2606,27 +2606,27 @@ var require_main_min = __commonJS({
2606
2606
  var ct = require("@transferwise/components");
2607
2607
  var Id = require("react-intl");
2608
2608
  var lt = require("react/jsx-runtime");
2609
- var ds = ({ onCapture: e }) => (0, lt.jsx)("div", { className: "bottom-bar", children: (0, lt.jsx)(lb, { onClick: e }) });
2609
+ var ds = ({ onCapture: e }) => (0, lt.jsx)("div", { className: "bottom-bar", children: (0, lt.jsx)(cb, { onClick: e }) });
2610
2610
  var ps = ({ onSubmit: e, onRetry: t }) => {
2611
2611
  let o = (0, Id.useIntl)();
2612
2612
  return (0, lt.jsx)("div", { className: "bottom-bar p-x-2", children: (0, lt.jsx)("div", { className: "row", children: (0, lt.jsxs)("div", { className: "col-xs-12 col-md-6 col-md-offset-3", children: [(0, lt.jsx)(ct.Button, { className: "m-b-1", block: true, size: ct.Size.MEDIUM, type: ct.ControlType.ACCENT, onClick: e, children: o.formatMessage(He.reviewSubmit) }), (0, lt.jsx)(ct.Button, { className: "m-b-2", block: true, size: ct.Size.MEDIUM, type: ct.ControlType.ACCENT, priority: ct.Priority.SECONDARY, onClick: t, children: o.formatMessage(He.reviewRetry) })] }) }) });
2613
2613
  };
2614
- var lb = ({ onClick: e }) => (0, lt.jsx)("button", { type: "button", className: "camera-capture-btn m-b-2", "data-testid": "camera-capture-button", onClick: e, children: (0, lt.jsx)("span", { className: "camera-capture-btn-inner" }) });
2614
+ var cb = ({ onClick: e }) => (0, lt.jsx)("button", { type: "button", className: "camera-capture-btn m-b-2", "data-testid": "camera-capture-button", onClick: e, children: (0, lt.jsx)("span", { className: "camera-capture-btn-inner" }) });
2615
2615
  var Rd = require("react-intl");
2616
2616
  var Ad = require("react-intl");
2617
2617
  var Md = (0, Ad.defineMessages)({ text: { id: "dynamicFlows.CameraCapture.rotatePhone.text", defaultMessage: "Rotate your phone to portrait view to take a photo", description: "Prompt the user to rotate their phone from landscape to portrait mode when attempting to take a photo" } });
2618
2618
  var Ur = require("react/jsx-runtime");
2619
- function cb() {
2619
+ function db() {
2620
2620
  let e = (0, Rd.useIntl)();
2621
2621
  return (0, Ur.jsxs)("div", { className: "orientation-lock-overlay", children: [(0, Ur.jsx)("img", { className: "m-b-3", src: "https://wise.com/public-resources/assets/camera-guidelines/icon-rotate-phone.svg", width: "96", height: "96", alt: "" }), (0, Ur.jsx)("p", { className: "text-center m-b-0", children: e.formatMessage(Md.text) })] });
2622
2622
  }
2623
- var us = cb;
2623
+ var us = db;
2624
2624
  var kd = require("@transferwise/components");
2625
2625
  var Yt = require("react/jsx-runtime");
2626
- function db({ title: e, description: t, actionButton: o, onAction: r }) {
2626
+ function pb({ title: e, description: t, actionButton: o, onAction: r }) {
2627
2627
  return (0, Yt.jsx)("div", { className: "container p-t-5", children: (0, Yt.jsx)("div", { className: "row", children: (0, Yt.jsxs)("div", { className: "col-md-6 col-md-offset-3", children: [(0, Yt.jsx)("h2", { className: "text-xs-center m-b-3", children: e }), (0, Yt.jsx)("p", { className: "text-xs-center m-b-5", children: t }), r && o && (0, Yt.jsx)(kd.Button, { block: true, onClick: r, children: o })] }) }) });
2628
2628
  }
2629
- var ys = db;
2629
+ var ys = pb;
2630
2630
  var Zt = require("react");
2631
2631
  var Ko = pe(Od());
2632
2632
  var Ed = (e) => {
@@ -2667,10 +2667,10 @@ var require_main_min = __commonJS({
2667
2667
  var t, o;
2668
2668
  return (o = (t = Xn(e)) == null ? void 0 : t.getCapabilities) == null ? void 0 : o.call(t);
2669
2669
  };
2670
- var Yn = (e, t, o) => t == null ? void 0 : t(e, { Error: pb(o) });
2671
- var pb = (e) => e instanceof DOMException ? JSON.stringify({ name: e == null ? void 0 : e.name, message: e == null ? void 0 : e.message }) : e;
2672
- var Bd = async (e, t, o) => e == null ? void 0 : e("Dynamic Flow - Camera Feed Started", await ub(t, o));
2673
- var ub = async (e, t) => {
2670
+ var Yn = (e, t, o) => t == null ? void 0 : t(e, { Error: ub(o) });
2671
+ var ub = (e) => e instanceof DOMException ? JSON.stringify({ name: e == null ? void 0 : e.name, message: e == null ? void 0 : e.message }) : e;
2672
+ var Bd = async (e, t, o) => e == null ? void 0 : e("Dynamic Flow - Camera Feed Started", await yb(t, o));
2673
+ var yb = async (e, t) => {
2674
2674
  var a;
2675
2675
  let o = Xn(t), r = fs(t), n = (a = o == null ? void 0 : o.getSettings) == null ? void 0 : a.call(o);
2676
2676
  return C(s({}, o && { "Available Video Devices (by label)": await Vd(), "Active Video Device (by label)": await Nd(t), "Camera Capabilities": r, "Camera Settings": n }), { "Camera Direction (Asked)": e == null ? void 0 : e.direction });
@@ -2727,14 +2727,14 @@ var require_main_min = __commonJS({
2727
2727
  };
2728
2728
  var Qn = require("react");
2729
2729
  var se = require("react/jsx-runtime");
2730
- var yb = 92;
2730
+ var fb = 92;
2731
2731
  var qd = 120;
2732
- var fb = 40;
2733
- var hb = 32;
2734
- var gb = 48;
2735
- var Cb = 40;
2732
+ var hb = 40;
2733
+ var gb = 32;
2734
+ var Cb = 48;
2735
+ var Sb = 40;
2736
2736
  var $d = 800;
2737
- function Sb({ overlay: e, outline: t, imageUrl: o, title: r, instructions: n, reviewInstructions: a }) {
2737
+ function bb({ overlay: e, outline: t, imageUrl: o, title: r, instructions: n, reviewInstructions: a }) {
2738
2738
  let i = (0, Qn.useRef)(null);
2739
2739
  (0, Qn.useEffect)(() => {
2740
2740
  let f = $t(() => {
@@ -2746,18 +2746,18 @@ var require_main_min = __commonJS({
2746
2746
  }, 100);
2747
2747
  return window.addEventListener("resize", f), () => window.removeEventListener("resize", f);
2748
2748
  });
2749
- let m = (o ? fb : 0) + (r ? hb : 0) + (n ? gb : 0), l = (0, se.jsxs)(se.Fragment, { children: [o && (0, se.jsx)("img", { className: "camera-capture-img", src: o, alt: "" }), r && (0, se.jsx)("h4", { className: "camera-capture-title", children: r }), n && (0, se.jsx)("small", { className: "camera-capture-instructions", children: n })] }), c = yb + m;
2749
+ let m = (o ? hb : 0) + (r ? gb : 0) + (n ? Cb : 0), l = (0, se.jsxs)(se.Fragment, { children: [o && (0, se.jsx)("img", { className: "camera-capture-img", src: o, alt: "" }), r && (0, se.jsx)("h4", { className: "camera-capture-title", children: r }), n && (0, se.jsx)("small", { className: "camera-capture-instructions", children: n })] }), c = fb + m;
2750
2750
  if (a) {
2751
2751
  m = c - qd, l = (0, se.jsx)("small", { className: "camera-capture-instructions", children: a });
2752
- let f = qd + Cb;
2752
+ let f = qd + Sb;
2753
2753
  c < f && (l = (0, se.jsx)(se.Fragment, {}));
2754
2754
  }
2755
2755
  let p = { x: "50%", y: "5%", width: `min(90%, ${$d}px)`, height: `calc(90% - ${c}px)`, style: { transform: `translateX(max(-45%, -${$d / 2}px))` } }, y = { style: { left: "5%", top: `calc(100% - ${c}px - 5%)`, height: `calc(${m}px + 5%)`, width: "90%" } };
2756
2756
  return (0, se.jsxs)("svg", { ref: i, xmlns: "http://www.w3.org/2000/svg", children: [(0, se.jsx)("defs", { children: (0, se.jsxs)("mask", { id: "mask", children: [(0, se.jsx)("rect", { width: "100%", height: "100%", fill: "#fff" }), (0, se.jsx)("image", s({ href: e }, p))] }) }), e && (0, se.jsx)("rect", { width: "100%", height: "100%", mask: "url(#mask)", fillOpacity: "0.72" }), t && (0, se.jsx)("image", s({ href: t }, p)), (0, se.jsx)("foreignObject", { width: "100%", height: "100%", children: (0, se.jsx)("div", C(s({ className: "camera-capture-text-and-image-container" }, y), { children: l })) })] });
2757
2757
  }
2758
- var gs = Sb;
2758
+ var gs = bb;
2759
2759
  var qe = require("react/jsx-runtime");
2760
- function bb({ direction: e = "back", overlay: t = "", outline: o = "", imageUrl: r = "", title: n = "", instructions: a = "", showReview: i = false, onCapture: m, onEvent: l }) {
2760
+ function wb({ direction: e = "back", overlay: t = "", outline: o = "", imageUrl: r = "", title: n = "", instructions: a = "", showReview: i = false, onCapture: m, onEvent: l }) {
2761
2761
  let [c, p] = (0, Pe.useState)("CAPTURE"), [y, f] = (0, Pe.useState)(), [u, d] = (0, Pe.useState)(false), [g, h] = (0, Pe.useState)(false), [S, b] = (0, Pe.useState)(), w = (0, Pe.useRef)(null), { videoConstraints: F } = Hd(e), x = (0, Pe.useMemo)(() => !!(Jm() && c === "CAPTURE"), [c]), { enterFullScreen: P, exitFullScreen: R } = jd(x, l), A = (0, Gd.useIntl)(), O = (0, Pe.useCallback)(async () => {
2762
2762
  var V, J, G, de, yt, ot;
2763
2763
  if ((V = w == null ? void 0 : w.current) != null && V.video && ((G = (J = w == null ? void 0 : w.current) == null ? void 0 : J.video) == null ? void 0 : G.readyState) >= 3) {
@@ -2801,23 +2801,23 @@ var require_main_min = __commonJS({
2801
2801
  } })] }), z = (0, qe.jsxs)("div", { className: "camera-capture", children: [(0, qe.jsx)("img", { className: "review-image", src: S == null ? void 0 : S.source, alt: "" }), (0, qe.jsx)(gs, { overlay: t, imageUrl: r, title: n, instructions: a, reviewInstructions: A.formatMessage(He.reviewInstructions) }), (0, qe.jsx)(ps, { onSubmit: k, onRetry: q })] });
2802
2802
  return (0, qe.jsxs)("section", { children: [c === "CAPTURE" && M, c === "REVIEW" && z, c === "ERROR" && y && (0, qe.jsx)(ys, s({}, y))] });
2803
2803
  }
2804
- var Cs = bb;
2804
+ var Cs = wb;
2805
2805
  var Kd = require("react/jsx-runtime");
2806
- function wb(e) {
2806
+ function Fb(e) {
2807
2807
  return new Promise((t, o) => {
2808
2808
  let r = new FileReader();
2809
2809
  r.onloadend = () => t(r.result), r.readAsDataURL(e);
2810
2810
  });
2811
2811
  }
2812
- function Fb(e) {
2813
- let { step: t, model: o, onModelChange: r, onAction: n } = e, a = Ce(), i = _d(t), m = xb(t), l = vb(t), { title: c, image: p, cameraConfig: y } = m, { assets: f, direction: u, instructions: d } = y || {}, { overlay: g, outline: h } = f || {}, { url: S } = p || {}, [b, w] = (0, ea.useState)(false);
2812
+ function xb(e) {
2813
+ let { step: t, model: o, onModelChange: r, onAction: n } = e, a = Ce(), i = _d(t), m = vb(t), l = Pb(t), { title: c, image: p, cameraConfig: y } = m, { assets: f, direction: u, instructions: d } = y || {}, { overlay: g, outline: h } = f || {}, { url: S } = p || {}, [b, w] = (0, ea.useState)(false);
2814
2814
  (0, ea.useEffect)(() => {
2815
2815
  b && n(l);
2816
2816
  }, [o]);
2817
2817
  let F = async (x) => {
2818
2818
  let { $id: P } = m;
2819
2819
  if (x) {
2820
- let R = await wb(x), A = { [P || ""]: R };
2820
+ let R = await Fb(x), A = { [P || ""]: R };
2821
2821
  w(true), r({ model: A, formSchema: i, triggerModel: R, triggerSchema: m });
2822
2822
  }
2823
2823
  };
@@ -2825,20 +2825,20 @@ var require_main_min = __commonJS({
2825
2825
  F(x);
2826
2826
  } });
2827
2827
  }
2828
- var ta = Fb;
2828
+ var ta = xb;
2829
2829
  function _d(e) {
2830
2830
  let o = fn(e.schemas || [])[0];
2831
2831
  if (!o || !gt(o))
2832
2832
  throw new Error("The first schema in a camera step is expected to be of type object and have at least one property with a schema...");
2833
2833
  return o;
2834
2834
  }
2835
- function xb(e) {
2835
+ function vb(e) {
2836
2836
  let t = _d(e), o = Object.values(t.properties)[0];
2837
2837
  if (!o)
2838
2838
  throw new Error("The first schema in a camera step is expected to be of type object and have at least one property with a schema...");
2839
2839
  return o;
2840
2840
  }
2841
- function vb(e) {
2841
+ function Pb(e) {
2842
2842
  var t, o;
2843
2843
  if (!e.schemas || ((t = fn(e.schemas)) == null ? void 0 : t.length) !== 1)
2844
2844
  throw new Error("camera step expects 1 non-hidden object schema");
@@ -2852,14 +2852,14 @@ var require_main_min = __commonJS({
2852
2852
  var Zd = require("react/jsx-runtime");
2853
2853
  var Xd = () => {
2854
2854
  };
2855
- var Pb = ({ url: e, onClose: t }) => {
2855
+ var Ib = ({ url: e, onClose: t }) => {
2856
2856
  let { formatMessage: o } = (0, Yd.useIntl)();
2857
- return (0, Zd.jsx)(ke, { components: [{ type: "box", width: "lg", components: [{ type: "heading", text: o(jr.title), size: "lg", align: "center", margin: "xl" }, { type: "info", markdown: o(jr.description, { origin: Ib(e) }), align: "center", margin: "xl" }, { type: "box", width: "md", components: [{ type: "button", action: { title: o(jr.open), type: "primary", url: e, exit: true } }, { type: "button", action: { title: o(jr.cancel), type: "link", url: "", exit: true } }] }] }], submitted: false, onAction: (r) => {
2857
+ return (0, Zd.jsx)(ke, { components: [{ type: "box", width: "lg", components: [{ type: "heading", text: o(jr.title), size: "lg", align: "center", margin: "xl" }, { type: "info", markdown: o(jr.description, { origin: Ab(e) }), align: "center", margin: "xl" }, { type: "box", width: "md", components: [{ type: "button", action: { title: o(jr.open), type: "primary", url: e, exit: true } }, { type: "button", action: { title: o(jr.cancel), type: "link", url: "", exit: true } }] }] }], submitted: false, onAction: (r) => {
2858
2858
  r.url && window.open(r.url, "_blank"), t();
2859
2859
  }, onModelChange: Xd, onPersistAsync: Xd });
2860
2860
  };
2861
- var oa = Pb;
2862
- function Ib(e) {
2861
+ var oa = Ib;
2862
+ function Ab(e) {
2863
2863
  try {
2864
2864
  return new URL(e).origin;
2865
2865
  } catch (t) {
@@ -2869,12 +2869,12 @@ var require_main_min = __commonJS({
2869
2869
  var Qd = require("@transferwise/components");
2870
2870
  var ep = require("@transferwise/icons");
2871
2871
  var Jo = require("react/jsx-runtime");
2872
- function Ab({ title: e, action: t, onAction: o }) {
2872
+ function Mb({ title: e, action: t, onAction: o }) {
2873
2873
  return (0, Jo.jsxs)("a", { href: "/", className: "df-back-btn", "aria-label": e, onClick: (r) => {
2874
2874
  r.preventDefault(), o(C(s({}, t), { skipValidation: true }));
2875
2875
  }, children: [(0, Jo.jsx)("span", { className: "sr-only", children: e }), (0, Jo.jsx)(Qd.Avatar, { type: "icon", children: (0, Jo.jsx)(ep.ArrowLeft, { size: "24" }) })] });
2876
2876
  }
2877
- var tp = Ab;
2877
+ var tp = Mb;
2878
2878
  var dt = require("react/jsx-runtime");
2879
2879
  function kn(e) {
2880
2880
  var l, c, p;
@@ -2882,20 +2882,20 @@ var require_main_min = __commonJS({
2882
2882
  return t === void 0 ? o ? (0, dt.jsx)(Ee, { component: { context: "negative", markdown: o, margin: "lg" } }) : null : n && i ? (0, dt.jsx)(oa, { url: n, onClose: m }) : _m(t) ? (0, dt.jsx)(ta, C(s({}, e), { step: t })) : (0, dt.jsxs)(dt.Fragment, { children: [a && (0, dt.jsx)(tp, C(s({}, a), { onAction: r })), o ? (0, dt.jsx)(Ee, { component: { context: "negative", markdown: o, margin: "lg" } }) : null, (0, dt.jsx)(Jn, C(s({}, e), { stepSpecification: t }))] });
2883
2883
  }
2884
2884
  var op = require("react");
2885
- var Mb = 1e3;
2885
+ var Rb = 1e3;
2886
2886
  function rp(e) {
2887
2887
  let t = (0, op.useRef)(/* @__PURE__ */ new Map()), o = (r) => {
2888
2888
  if (t.current.has(r))
2889
2889
  return t.current.get(r);
2890
- let n = $t((a, i, m) => e(a, i, m), Mb);
2890
+ let n = $t((a, i, m) => e(a, i, m), Rb);
2891
2891
  return t.current.set(r, n), n;
2892
2892
  };
2893
2893
  return function(r, n, a, i) {
2894
2894
  let m = o(r);
2895
- m(r, n, a), (!i || !Rb(i)) && m.flush();
2895
+ m(r, n, a), (!i || !kb(i)) && m.flush();
2896
2896
  };
2897
2897
  }
2898
- var Rb = (e) => io(e) === "basic" && e.type !== "boolean" && e.format !== "base64url";
2898
+ var kb = (e) => ao(e) === "basic" && e.type !== "boolean" && e.format !== "base64url";
2899
2899
  var Xo = require("react");
2900
2900
  var ip = (e) => {
2901
2901
  var u, d;
@@ -2907,7 +2907,7 @@ var require_main_min = __commonJS({
2907
2907
  let w = C(s({}, b.models), { [g]: h }), F = { step: b.step, models: w, etag: b.etag };
2908
2908
  return S(w), F;
2909
2909
  });
2910
- }, f = (0, Xo.useMemo)(() => Ob(l, kb(m)), [l, m]);
2910
+ }, f = (0, Xo.useMemo)(() => Eb(l, Ob(m)), [l, m]);
2911
2911
  return { formErrors: t, globalError: r, step: m, models: l, etag: c, modelIsValid: f, setFormErrors: o, setGlobalError: n, setStepAndEtag: p, setSchemaModel: y };
2912
2912
  };
2913
2913
  var np = (e, t = []) => t.reduce((o, r) => (r.$id || console.warn("Schema without $id property found."), C(s({}, o), { [r.$id || ""]: Ne(e, r) || {} })), {});
@@ -2924,7 +2924,7 @@ var require_main_min = __commonJS({
2924
2924
  return [];
2925
2925
  }
2926
2926
  });
2927
- var kb = (e) => [...Ss((e == null ? void 0 : e.layout) || []).map((t) => ((e == null ? void 0 : e.schemas) || []).find((o) => o.$id === t)).filter(Boolean), ...ra((e == null ? void 0 : e.layout) || [])];
2927
+ var Ob = (e) => [...Ss((e == null ? void 0 : e.layout) || []).map((t) => ((e == null ? void 0 : e.schemas) || []).find((o) => o.$id === t)).filter(Boolean), ...ra((e == null ? void 0 : e.layout) || [])];
2928
2928
  var Ss = (e) => e.flatMap((t) => {
2929
2929
  switch (t.type) {
2930
2930
  case "columns":
@@ -2932,13 +2932,13 @@ var require_main_min = __commonJS({
2932
2932
  case "box":
2933
2933
  return Ss(t.components);
2934
2934
  case "form":
2935
- return [Eb(t)];
2935
+ return [Lb(t)];
2936
2936
  default:
2937
2937
  return [];
2938
2938
  }
2939
2939
  }).filter(Boolean);
2940
- var Ob = (e, t = []) => !(t != null && t.some((o) => (o.$id || console.warn("Schema without $id property found."), !ee(e[o.$id || ""] || {}, o))));
2941
- var Eb = (e) => e.schema && !sp(e.schema) ? e.schema.$ref : e.schemaId;
2940
+ var Eb = (e, t = []) => !(t != null && t.some((o) => (o.$id || console.warn("Schema without $id property found."), !ee(e[o.$id || ""] || {}, o))));
2941
+ var Lb = (e) => e.schema && !sp(e.schema) ? e.schema.$ref : e.schemaId;
2942
2942
  var sp = (e) => e !== void 0 && typeof e == "object" && !Object.hasOwnProperty.call(e, "$ref");
2943
2943
  var na = require("@transferwise/components");
2944
2944
  var mp = require("react");
@@ -2953,10 +2953,10 @@ var require_main_min = __commonJS({
2953
2953
  var up = require("react/jsx-runtime");
2954
2954
  function pp({ onDismiss: e }) {
2955
2955
  let { formatMessage: t } = (0, dp.useIntl)();
2956
- return (0, up.jsx)(aa.Alert, { action: { text: t(ve.retry), href: window.location.href }, message: t(ve.genericError), type: aa.Sentiment.NEGATIVE, className: "m-b-3", onDismiss: e });
2956
+ return (0, up.jsx)(aa.Alert, { action: { text: t(xe.retry), href: window.location.href }, message: t(xe.genericError), type: aa.Sentiment.NEGATIVE, className: "m-b-3", onDismiss: e });
2957
2957
  }
2958
2958
  var Yo = require("react/jsx-runtime");
2959
- var Lb = () => {
2959
+ var Tb = () => {
2960
2960
  };
2961
2961
  var bs = class extends yp.Component {
2962
2962
  constructor(o) {
@@ -2970,7 +2970,7 @@ var require_main_min = __commonJS({
2970
2970
  return { hasError: true, isFatalError: true };
2971
2971
  }
2972
2972
  componentDidCatch(o) {
2973
- let { onError: r = Lb } = this.props;
2973
+ let { onError: r = Tb } = this.props;
2974
2974
  r(o);
2975
2975
  }
2976
2976
  render() {
@@ -2979,7 +2979,7 @@ var require_main_min = __commonJS({
2979
2979
  }
2980
2980
  };
2981
2981
  var Hr = bs;
2982
- var Tb = async (e, t) => {
2982
+ var Db = async (e, t) => {
2983
2983
  switch (t) {
2984
2984
  case "step":
2985
2985
  return fp(e);
@@ -3012,7 +3012,7 @@ var require_main_min = __commonJS({
3012
3012
  var o, r;
3013
3013
  if (Fs(e), (o = e.headers) != null && o.has("X-Df-Response-Type")) {
3014
3014
  let n = e.headers.get("X-Df-Response-Type");
3015
- return Tb(e, n);
3015
+ return Db(e, n);
3016
3016
  }
3017
3017
  if ((r = e.headers) != null && r.has("X-Df-Exit"))
3018
3018
  return gp(e);
@@ -3041,24 +3041,24 @@ var require_main_min = __commonJS({
3041
3041
  }
3042
3042
  };
3043
3043
  var Fs = (e) => {
3044
- if (!Db(e))
3044
+ if (!Vb(e))
3045
3045
  throw new Error("Incorrect type of response from fetch. Expected object of type Response.");
3046
3046
  if (e.bodyUsed)
3047
3047
  throw new Error("The body of the provided Response object has already been used. Every request must respond with a new Response object.");
3048
3048
  };
3049
- var Db = (e) => typeof e == "object" && e !== null && "clone" in e && "bodyUsed" in e;
3049
+ var Vb = (e) => typeof e == "object" && e !== null && "clone" in e && "bodyUsed" in e;
3050
3050
  var Dt = require("react/jsx-runtime");
3051
3051
  var bp = () => {
3052
3052
  };
3053
- var Vb = ({ flowId: e, httpClient: t, initialAction: o, initialStep: r, loaderConfig: n, displayStepTitle: a = true, features: i, onCompletion: m, onError: l, onEvent: c = bp, onLog: p = bp }) => {
3053
+ var Nb = ({ flowId: e, httpClient: t, initialAction: o, initialStep: r, loaderConfig: n, displayStepTitle: a = true, features: i, onCompletion: m, onError: l, onEvent: c = bp, onLog: p = bp }) => {
3054
3054
  let { locale: y } = (0, wp.useIntl)(), { formErrors: f, globalError: u, step: d, models: g, etag: h, modelIsValid: S, setFormErrors: b, setGlobalError: w, setStepAndEtag: F, setSchemaModel: x } = ip(r), [P, R] = (0, pt.useState)(false), { isLoading: A, loader: O, setLoadingState: v } = lp(n, r ? "idle" : "initial"), L = jt("critical", p, e, (d == null ? void 0 : d.id) || (d == null ? void 0 : d.key)), k = jt("warning", p, e, (d == null ? void 0 : d.id) || (d == null ? void 0 : d.key)), q = (I) => {
3055
3055
  I && !I.layout && k("Deprecation warning", "Support for steps with no layout is being dropped. Please add a layout array to your step.", { stepId: I.id || I.key });
3056
3056
  }, U = (0, pt.useMemo)(() => {
3057
3057
  var I;
3058
3058
  return s({ flowId: e, stepId: (d == null ? void 0 : d.id) || (d == null ? void 0 : d.key) }, (I = d == null ? void 0 : d.analytics) != null ? I : {});
3059
3059
  }, [e, d]), M = (0, pt.useMemo)(() => Qa(c, U), [c, U]), z = (0, pt.useCallback)(({ action: I, data: Y, etag: B }) => {
3060
- let { url: ge, method: no = "POST" } = I;
3061
- return t(ge != null ? ge : "", { method: no, headers: s({ "accept-language": y, "Content-Type": "application/json" }, B ? { "If-None-Match": B } : {}), credentials: "include", body: no === "GET" ? void 0 : JSON.stringify(Y) });
3060
+ let { url: ge, method: ro = "POST" } = I;
3061
+ return t(ge != null ? ge : "", { method: ro, headers: s({ "accept-language": y, "Content-Type": "application/json" }, B ? { "If-None-Match": B } : {}), credentials: "include", body: ro === "GET" ? void 0 : JSON.stringify(Y) });
3062
3062
  }, [t, y]), V = async (I, Y = {}) => {
3063
3063
  v(d ? "submission" : "initial"), M("Dynamic Flow - Step Submitted", { actionId: I.id || I.$id });
3064
3064
  try {
@@ -3117,47 +3117,47 @@ var require_main_min = __commonJS({
3117
3117
  Y && await J(Y, ia(g), h), I.validation && b(I.validation), I.error && w(I.error), v("idle");
3118
3118
  }, Sr = (I, Y, B, ge) => {
3119
3119
  L("Error fetching", Y), B === "refresh" && M("Dynamic Flow - Step Refreshed", { status: "failure" }), M("Dynamic Flow - Flow Finished", { status: "failure" }), l(I, ge), v("idle");
3120
- }, ng = (I) => {
3120
+ }, ag = (I) => {
3121
3121
  let { model: Y, formSchema: B } = I, { $id: ge = "" } = B;
3122
3122
  w(null), re(Y) || L("Invalid model on change", "onModelChange was called but the model argument is not an object"), x(ge, Y, (on) => {
3123
- ag(I, on);
3123
+ ig(I, on);
3124
3124
  });
3125
- }, ag = (I, Y) => {
3125
+ }, ig = (I, Y) => {
3126
3126
  let { triggerSchema: B } = I;
3127
- if (Ub(I)) {
3128
- let ge = B.refreshUrl || B.refreshFormUrl, no = (d == null ? void 0 : d.refreshUrl) || (d == null ? void 0 : d.refreshFormUrl), on = ge || no;
3127
+ if (zb(I)) {
3128
+ let ge = B.refreshUrl || B.refreshFormUrl, ro = (d == null ? void 0 : d.refreshUrl) || (d == null ? void 0 : d.refreshFormUrl), on = ge || ro;
3129
3129
  on && de(on, ia(Y), h, B);
3130
3130
  }
3131
- }, ig = async (I) => {
3131
+ }, sg = async (I) => {
3132
3132
  if (A || I.disabled)
3133
3133
  return;
3134
3134
  if (I.exit && !I.url) {
3135
3135
  yt(I.result);
3136
3136
  return;
3137
3137
  }
3138
- let { data: Y, method: B, skipValidation: ge } = I, no = s(s({}, ia(g)), Y);
3139
- Bb(B) ? (b(null), ge || R(true), (S || ge) && await V(I, no)) : await V(I);
3138
+ let { data: Y, method: B, skipValidation: ge } = I, ro = s(s({}, ia(g)), Y);
3139
+ Ub(B) ? (b(null), ge || R(true), (S || ge) && await V(I, ro)) : await V(I);
3140
3140
  };
3141
3141
  return (0, Dt.jsx)(ln, { flowId: e, stepId: (d == null ? void 0 : d.id) || (d == null ? void 0 : d.key), onLog: p, children: (0, Dt.jsx)(mn, { metadata: U, onEvent: c, children: (0, Dt.jsx)(ym, { loading: A, children: (0, Dt.jsx)(Sn, { httpClient: t, children: (0, Dt.jsx)(bm, { features: i, children: O !== null ? O : (0, Dt.jsx)(kn, { step: d, model: ia(g), submitted: P, globalError: u, formErrors: f, stepLayoutOptions: { displayStepTitle: a }, onAction: (I) => {
3142
- ig(I);
3143
- }, onModelChange: ng }) }) }) }) }) });
3142
+ sg(I);
3143
+ }, onModelChange: ag }) }) }) }) }) });
3144
3144
  };
3145
- function Nb(e) {
3146
- return (0, Dt.jsx)(Hr, { onError: e.onError, children: (0, Dt.jsx)(Vb, s({}, e)) });
3145
+ function Bb(e) {
3146
+ return (0, Dt.jsx)(Hr, { onError: e.onError, children: (0, Dt.jsx)(Nb, s({}, e)) });
3147
3147
  }
3148
- var xs = Nb;
3148
+ var xs = Bb;
3149
3149
  var ia = (e) => Object.values(e).reduce((t, o) => s(s({}, t), o), {});
3150
- var Bb = (e = "POST") => ["POST", "PUT", "PATCH"].includes(e.toUpperCase());
3151
- var Ub = (e) => {
3150
+ var Ub = (e = "POST") => ["POST", "PUT", "PATCH"].includes(e.toUpperCase());
3151
+ var zb = (e) => {
3152
3152
  let { type: t, triggerSchema: o, triggerModel: r, lastTriggerModel: n = null } = e, a = () => ee(r, o), i = () => ee(n, o), m = (o == null ? void 0 : o.refreshStepOnChange) || (o == null ? void 0 : o.refreshFormOnChange);
3153
3153
  return t !== "init" && m && (a() || i());
3154
3154
  };
3155
3155
  var $r = require("react/jsx-runtime");
3156
- function zb(e) {
3156
+ function jb(e) {
3157
3157
  let t = s({ model: null, errors: null }, e), { baseUrl: o = "", onEvent: r = Fp, onLog: n = Fp } = e;
3158
3158
  return (0, $r.jsx)(ln, { flowId: "JsonSchemaForm", stepId: "JsonSchemaForm", onLog: n, children: (0, $r.jsx)(mn, { metadata: { flowId: "JsonSchemaForm", stepId: "JsonSchemaForm" }, onEvent: r, children: (0, $r.jsx)(bn, { baseUrl: o, children: (0, $r.jsx)(Be, s({}, t)) }) }) });
3159
3159
  }
3160
- var vs = zb;
3160
+ var vs = jb;
3161
3161
  var Fp = () => {
3162
3162
  };
3163
3163
  var xp = { "dynamicFlows.ArraySchema.addItem": "Speichern", "dynamicFlows.ArraySchema.addItemTitle": "Artikel hinzuf\xFCgen", "dynamicFlows.ArraySchema.editItem": "Speichern", "dynamicFlows.ArraySchema.maxItemsError": "Bitte f\xFCge {maxItems} oder weniger hinzu.", "dynamicFlows.ArraySchema.minItemsError": "Bitte f\xFCge mindestens {minItems} hinzu.", "dynamicFlows.ArraySchema.removeItem": "Entfernen", "dynamicFlows.CameraCapture.CameraConnectionIssue.action": "Erneut versuchen", "dynamicFlows.CameraCapture.CameraConnectionIssue.paragraph": "Bitte pr\xFCfe, ob deine Kamera verbunden ist, und versuche es dann erneut.", "dynamicFlows.CameraCapture.CameraConnectionIssue.title": "Wir k\xF6nnen nicht auf deine Kamera zugreifen", "dynamicFlows.CameraCapture.CameraNotSupported.paragraph": "Der von dir verwendete Browser unterst\xFCtzt keine Kameras. Bitte verwende einen anderen Browser oder ein anderes Ger\xE4t, oder lade unsere App herunter", "dynamicFlows.CameraCapture.CameraNotSupported.title": "Kamera wird nicht unterst\xFCtzt", "dynamicFlows.CameraCapture.NoCameraAccess.action": "Kamerazugriff genehmigen", "dynamicFlows.CameraCapture.NoCameraAccess.paragraph": "Aktiviere den Kamerazugriff in den Einstellungen deines Browsers, um weitermachen zu k\xF6nnen.", "dynamicFlows.CameraCapture.NoCameraAccess.title": "Wir k\xF6nnen nicht auf deine Kamera zugreifen", "dynamicFlows.CameraCapture.reviewInstructions": "Ist das aufgenommene Bild deutlich erkennbar und vollst\xE4ndig?", "dynamicFlows.CameraCapture.reviewRetry": "Nein, erneut versuchen", "dynamicFlows.CameraCapture.reviewSubmit": "Ja, senden", "dynamicFlows.CameraCapture.rotatePhone.text": "Drehe dein Ger\xE4t in die Hochformatansicht, um ein Foto aufzunehmen", "dynamicFlows.ControlFeedback.maxLength": "Bitte gib nicht mehr als {maxLength} Zeichen ein.", "dynamicFlows.ControlFeedback.maximum": "Bitte gib eine Zahl ein, die {maximum} oder weniger betr\xE4gt.", "dynamicFlows.ControlFeedback.maximumDate": "Bitte gib ein Datum ein, das am oder vor dem {maximum} liegt.", "dynamicFlows.ControlFeedback.minLength": "Bitte gib mindestens {minLength} Zeichen ein.", "dynamicFlows.ControlFeedback.minimum": "Bitte gib eine Zahl ein, die {minimum} oder mehr betr\xE4gt.", "dynamicFlows.ControlFeedback.minimumDate": "Bitte gib ein Datum ein, das am oder nach dem {minimum} liegt.", "dynamicFlows.ControlFeedback.pattern": "Bitte gib die Angabe im richtigen Format ein.", "dynamicFlows.ControlFeedback.patternDate": "Bitte gib ein Datum im richtigen Format ein.", "dynamicFlows.ControlFeedback.required": "Bitte f\xFClle dieses Feld aus.", "dynamicFlows.ControlFeedback.type": "Falscher Typ", "dynamicFlows.DefaultErrorMessages.required": "Bitte f\xFClle dieses Feld aus.", "dynamicFlows.DynamicExternal.retryTitle": "Fenster erneut \xF6ffnen", "dynamicFlows.DynamicParagraph.copied": "In Zwischenablage kopiert", "dynamicFlows.DynamicParagraph.copy": "Kopieren", "dynamicFlows.ErrorBoundary.errorAlert": "Da ist etwas schiefgelaufen.", "dynamicFlows.ErrorBoundary.retry": "Erneut versuchen", "dynamicFlows.ExternalConfirmation.cancel": "Abbrechen", "dynamicFlows.ExternalConfirmation.description": "Bitte best\xE4tige, dass du **{origin}** in einem neuen Browser-Tab \xF6ffnen m\xF6chtest.", "dynamicFlows.ExternalConfirmation.open": "In neuem Tab \xF6ffnen", "dynamicFlows.ExternalConfirmation.title": "Bitte best\xE4tigen", "dynamicFlows.Help.ariaLabel": "Klicke hier f\xFCr mehr Informationen.", "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "Diese Datei ist leider zu gro\xDF. Bitte lade eine kleinere Datei hoch.", "dynamicFlows.MultipleFileUploadSchema.maxItemsError": "Bitte lade {maxItems} oder weniger Dateien hoch.", "dynamicFlows.MultipleFileUploadSchema.minItemsError": "Bitte lade mindestens {minItems} Datei(en) hoch.", "dynamicFlows.PersistAsyncSchema.genericError": "Da ist etwas schiefgegangen. Versuche es bitte nochmal.", "dynamicFlows.ReadOnlySchema.no": "Nein", "dynamicFlows.ReadOnlySchema.yes": "Ja" };
@@ -3176,10 +3176,10 @@ var require_main_min = __commonJS({
3176
3176
  var Vp = { "dynamicFlows.ArraySchema.addItem": "Kaydet", "dynamicFlows.ArraySchema.addItemTitle": "\xD6\u011Fe ekle", "dynamicFlows.ArraySchema.editItem": "Kaydet", "dynamicFlows.ArraySchema.maxItemsError": "L\xFCtfen {maxItems} veya daha az ekleme yap\u0131n", "dynamicFlows.ArraySchema.minItemsError": "L\xFCtfen en az {minItems} ekleme yap\u0131n.", "dynamicFlows.ArraySchema.removeItem": "Kald\u0131r", "dynamicFlows.CameraCapture.CameraConnectionIssue.action": "Tekrar deneyin", "dynamicFlows.CameraCapture.CameraConnectionIssue.paragraph": "L\xFCtfen ba\u011Fl\u0131 olup olmad\u0131\u011F\u0131n\u0131 kontrol edip tekrar deneyin.", "dynamicFlows.CameraCapture.CameraConnectionIssue.title": "Kameran\u0131za eri\u015Femiyoruz", "dynamicFlows.CameraCapture.CameraNotSupported.paragraph": "Kulland\u0131\u011F\u0131n\u0131z taray\u0131c\u0131da kamera deste\u011Fi yok. Farkl\u0131 bir taray\u0131c\u0131 / cihaz deneyin veya mobil uygulamam\u0131z\u0131 indirin.", "dynamicFlows.CameraCapture.CameraNotSupported.title": "Kamera desteklenmiyor", "dynamicFlows.CameraCapture.NoCameraAccess.action": "Kamera eri\u015Fimi verin", "dynamicFlows.CameraCapture.NoCameraAccess.paragraph": "Tekrar ba\u015Flamak i\xE7in taray\u0131c\u0131n\u0131z\u0131n ayarlar\u0131nda kamera eri\u015Fimini etkinle\u015Ftirin.", "dynamicFlows.CameraCapture.NoCameraAccess.title": "Kameran\u0131za eri\u015Femiyoruz", "dynamicFlows.CameraCapture.reviewInstructions": "Foto\u011Fraf\u0131n\u0131z net, okunakl\u0131 ve eksiksiz mi?", "dynamicFlows.CameraCapture.reviewRetry": "Hay\u0131r, tekrar dene", "dynamicFlows.CameraCapture.reviewSubmit": "Evet, g\xF6nder", "dynamicFlows.CameraCapture.rotatePhone.text": "Foto\u011Fraf \xE7ekmek i\xE7in telefonunuzu dik pozisyonda tutun", "dynamicFlows.ControlFeedback.maxLength": "L\xFCtfen {maxLength} veya daha az karakter girin.", "dynamicFlows.ControlFeedback.maximum": "L\xFCtfen {maximum} veya daha d\xFC\u015F\xFCk bir say\u0131 girin.", "dynamicFlows.ControlFeedback.maximumDate": "L\xFCtfen {maximum} veya daha erken bir tarih girin.", "dynamicFlows.ControlFeedback.minLength": "En az {minLength} karakter girebilirsiniz.", "dynamicFlows.ControlFeedback.minimum": "L\xFCtfen {minimum} veya daha y\xFCksek bir say\u0131 girin.", "dynamicFlows.ControlFeedback.minimumDate": "L\xFCtfen {minimum} veya daha ge\xE7 bir tarih girin.", "dynamicFlows.ControlFeedback.pattern": "Yanl\u0131\u015F bi\xE7im", "dynamicFlows.ControlFeedback.patternDate": "L\xFCtfen tarihi do\u011Fru bi\xE7imde girin.", "dynamicFlows.ControlFeedback.required": "L\xFCtfen bu alan\u0131 doldurun.", "dynamicFlows.ControlFeedback.type": "Ge\xE7ersiz se\xE7im", "dynamicFlows.DefaultErrorMessages.required": "L\xFCtfen bu alan\u0131 doldurun.", "dynamicFlows.DynamicExternal.retryTitle": "Pencereyi yeniden a\xE7", "dynamicFlows.DynamicParagraph.copied": "Panoya kopyaland\u0131", "dynamicFlows.DynamicParagraph.copy": "Kopyala", "dynamicFlows.ErrorBoundary.errorAlert": "Bir \u015Fey yanl\u0131\u015F gitti.", "dynamicFlows.ErrorBoundary.retry": "Tekrar dene", "dynamicFlows.ExternalConfirmation.cancel": "\u0130ptal edin", "dynamicFlows.ExternalConfirmation.description": "L\xFCtfen yeni bir taray\u0131c\u0131 sekmesinde **{origin}** a\xE7mak istedi\u011Finizi onaylay\u0131n.", "dynamicFlows.ExternalConfirmation.open": "Yeni sekmede a\xE7", "dynamicFlows.ExternalConfirmation.title": "L\xFCtfen onaylay\u0131n", "dynamicFlows.Help.ariaLabel": "Ayr\u0131nt\u0131lar i\xE7in t\u0131klay\u0131n.", "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "\xDCzg\xFCn\xFCz, bu dosya \xE7ok b\xFCy\xFCk. L\xFCtfen daha k\xFC\xE7\xFCk bir dosya y\xFCkleyin.", "dynamicFlows.MultipleFileUploadSchema.maxItemsError": "L\xFCtfen {maxItems} veya daha az dosya y\xFCkleyin.", "dynamicFlows.MultipleFileUploadSchema.minItemsError": "L\xFCtfen en az {minItems} dosya y\xFCkleyin.", "dynamicFlows.PersistAsyncSchema.genericError": "Bir \u015Feyler ters gitti, l\xFCtfen tekrar deneyin.", "dynamicFlows.ReadOnlySchema.no": "Hay\u0131r", "dynamicFlows.ReadOnlySchema.yes": "Evet" };
3177
3177
  var Ps = { "dynamicFlows.ArraySchema.addItem": "\u4FDD\u5B58", "dynamicFlows.ArraySchema.addItemTitle": "\u6DFB\u52A0\u9879\u76EE", "dynamicFlows.ArraySchema.editItem": "\u4FDD\u5B58", "dynamicFlows.ArraySchema.maxItemsError": "\u8BF7\u6DFB\u52A0\u4E0D\u8D85\u8FC7 {maxItems} \u9879\u3002", "dynamicFlows.ArraySchema.minItemsError": "\u8BF7\u81F3\u5C11\u6DFB\u52A0 {minItems} \u9879\u3002", "dynamicFlows.ArraySchema.removeItem": "\u79FB\u9664", "dynamicFlows.CameraCapture.CameraConnectionIssue.action": "\u91CD\u8BD5", "dynamicFlows.CameraCapture.CameraConnectionIssue.paragraph": "\u8BF7\u68C0\u67E5\u662F\u5426\u8FDE\u63A5\uFF0C\u7136\u540E\u91CD\u8BD5\u3002", "dynamicFlows.CameraCapture.CameraConnectionIssue.title": "\u6211\u4EEC\u65E0\u6CD5\u8BBF\u95EE\u60A8\u7684\u6444\u50CF\u5934", "dynamicFlows.CameraCapture.CameraNotSupported.paragraph": "\u60A8\u76EE\u524D\u4F7F\u7528\u7684\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u6444\u50CF\u5934\u3002\u8BF7\u5C1D\u8BD5\u5176\u4ED6\u6D4F\u89C8\u5668\u3001\u8BBE\u5907\u6216\u4E0B\u8F7D\u6211\u4EEC\u7684\u5E94\u7528\u3002", "dynamicFlows.CameraCapture.CameraNotSupported.title": "\u4E0D\u652F\u6301\u6444\u50CF\u5934", "dynamicFlows.CameraCapture.NoCameraAccess.action": "\u5141\u8BB8\u8BBF\u95EE\u6444\u50CF\u5934", "dynamicFlows.CameraCapture.NoCameraAccess.paragraph": "\u5728\u6D4F\u89C8\u5668\u8BBE\u7F6E\u4E2D\u542F\u7528\u76F8\u673A\u8BBF\u95EE\u6743\u9650\uFF0C\u518D\u91CD\u65B0\u5C1D\u8BD5\u3002", "dynamicFlows.CameraCapture.NoCameraAccess.title": "\u6211\u4EEC\u65E0\u6CD5\u8BBF\u95EE\u60A8\u7684\u6444\u50CF\u5934", "dynamicFlows.CameraCapture.reviewInstructions": "\u60A8\u7684\u56FE\u7247\u662F\u5426\u6E05\u6670\u3001\u53EF\u8BFB\u548C\u5B8C\u6574\uFF1F", "dynamicFlows.CameraCapture.reviewRetry": "\u5426\uFF0C\u518D\u8BD5\u4E00\u6B21", "dynamicFlows.CameraCapture.reviewSubmit": "\u662F\uFF0C\u63D0\u4EA4", "dynamicFlows.CameraCapture.rotatePhone.text": "\u5C06\u624B\u673A\u65CB\u8F6C\u5230\u7EB5\u5411\u89C6\u56FE\u4EE5\u62CD\u7167", "dynamicFlows.ControlFeedback.maxLength": "\u8BF7\u8F93\u5165\u4E0D\u8D85\u8FC7 {maxLength} \u4E2A\u5B57\u7B26\u3002", "dynamicFlows.ControlFeedback.maximum": "\u8BF7\u8F93\u5165\u4E00\u4E2A\u5C0F\u4E8E\u6216\u7B49\u4E8E {maximum} \u7684\u6570\u5B57\u3002", "dynamicFlows.ControlFeedback.maximumDate": "\u8BF7\u8F93\u5165 {maximum} \u6216\u4E4B\u524D\u7684\u65E5\u671F", "dynamicFlows.ControlFeedback.minLength": "\u8BF7\u81F3\u5C11\u8F93\u5165 {minLength} \u4E2A\u5B57\u7B26", "dynamicFlows.ControlFeedback.minimum": "\u8BF7\u8F93\u5165\u4E00\u4E2A\u5927\u4E8E\u6216\u7B49\u4E8E {minimum} \u7684\u6570\u5B57", "dynamicFlows.ControlFeedback.minimumDate": "\u8BF7\u8F93\u5165 {minimum} \u6216\u4E4B\u540E\u7684\u65E5\u671F", "dynamicFlows.ControlFeedback.pattern": "\u8BF7\u4EE5\u6B63\u786E\u7684\u683C\u5F0F\u8F93\u5165", "dynamicFlows.ControlFeedback.patternDate": "\u8BF7\u4EE5\u6B63\u786E\u7684\u683C\u5F0F\u8F93\u5165\u65E5\u671F", "dynamicFlows.ControlFeedback.required": "\u8BF7\u586B\u5199\u6B64\u5B57\u6BB5\u3002", "dynamicFlows.ControlFeedback.type": "\u7C7B\u578B\u9519\u8BEF", "dynamicFlows.DefaultErrorMessages.required": "\u8BF7\u586B\u5199\u6B64\u5B57\u6BB5\u3002", "dynamicFlows.DynamicExternal.retryTitle": "\u91CD\u65B0\u6253\u5F00\u7A97\u53E3", "dynamicFlows.DynamicParagraph.copied": "\u5DF2\u590D\u5236\u5230\u526A\u8D34\u677F", "dynamicFlows.DynamicParagraph.copy": "\u590D\u5236", "dynamicFlows.ErrorBoundary.errorAlert": "\u51FA\u9519\u4E86\u3002", "dynamicFlows.ErrorBoundary.retry": "\u91CD\u8BD5", "dynamicFlows.ExternalConfirmation.cancel": "\u53D6\u6D88", "dynamicFlows.ExternalConfirmation.description": "\u8BF7\u786E\u8BA4\u60A8\u662F\u5426\u8981\u5728\u65B0\u6807\u7B7E\u9875\u4E2D\u6253\u5F00**{origin}**\u3002", "dynamicFlows.ExternalConfirmation.open": "\u5728\u65B0\u6807\u7B7E\u9875\u4E2D\u6253\u5F00", "dynamicFlows.ExternalConfirmation.title": "\u8BF7\u786E\u8BA4", "dynamicFlows.Help.ariaLabel": "\u70B9\u51FB\u6B64\u5904\u83B7\u53D6\u66F4\u591A\u4FE1\u606F\u3002", "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "\u62B1\u6B49\uFF0C\u8BE5\u6587\u4EF6\u592A\u5927\u3002\u8BF7\u4E0A\u4F20\u4E00\u4E2A\u66F4\u5C0F\u7684\u6587\u4EF6\u3002", "dynamicFlows.MultipleFileUploadSchema.maxItemsError": "\u8BF7\u4E0A\u4F20\u4E0D\u8D85\u8FC7 {maxItems} \u4E2A\u6587\u4EF6\u3002", "dynamicFlows.MultipleFileUploadSchema.minItemsError": "\u8BF7\u4E0A\u4F20\u81F3\u5C11 {minItems} \u4E2A\u6587\u4EF6\u3002", "dynamicFlows.PersistAsyncSchema.genericError": "\u51FA\u9519\u4E86\uFF0C\u8BF7\u91CD\u8BD5\u3002", "dynamicFlows.ReadOnlySchema.no": "\u5426", "dynamicFlows.ReadOnlySchema.yes": "\u662F" };
3178
3178
  var Np = { "dynamicFlows.ArraySchema.addItem": "\u5132\u5B58", "dynamicFlows.ArraySchema.addItemTitle": "\u6DFB\u52A0\u9805\u76EE", "dynamicFlows.ArraySchema.editItem": "\u5132\u5B58", "dynamicFlows.ArraySchema.maxItemsError": "\u8ACB\u6DFB\u52A0\u4E0D\u8D85\u904E{maxItems}\u9805\u3002", "dynamicFlows.ArraySchema.minItemsError": "\u8ACB\u81F3\u5C11\u6DFB\u52A0{minItems}\u9805\u3002", "dynamicFlows.ArraySchema.removeItem": "\u79FB\u9664", "dynamicFlows.CameraCapture.CameraConnectionIssue.action": "\u518D\u8A66\u4E00\u6B21", "dynamicFlows.CameraCapture.CameraConnectionIssue.paragraph": "\u8ACB\u6AA2\u67E5\u9023\u7DDA\u72C0\u614B\uFF0C\u7136\u5F8C\u518D\u8A66\u4E00\u6B21\u3002", "dynamicFlows.CameraCapture.CameraConnectionIssue.title": "\u6211\u5011\u7121\u6CD5\u53D6\u7528\u4F60\u7684\u76F8\u6A5F", "dynamicFlows.CameraCapture.CameraNotSupported.paragraph": "\u4F60\u76EE\u524D\u4F7F\u7528\u7684\u700F\u89BD\u5668\u4E0D\u652F\u6301\u76F8\u6A5F\u3002\u8ACB\u5617\u8A66\u4F7F\u7528\u5176\u4ED6\u700F\u89BD\u5668\u6216\u5176\u4ED6\u88DD\u7F6E\uFF0C\u6216\u8005\u4F60\u53EF\u4EE5\u4E0B\u8F09\u6211\u5011\u7684\u61C9\u7528\u7A0B\u5F0F\u3002", "dynamicFlows.CameraCapture.CameraNotSupported.title": "\u4E0D\u652F\u6301\u76F8\u6A5F", "dynamicFlows.CameraCapture.NoCameraAccess.action": "\u5141\u8A31\u53D6\u7528\u76F8\u6A5F", "dynamicFlows.CameraCapture.NoCameraAccess.paragraph": "\u4F60\u53EF\u4EE5\u5728\u700F\u89BD\u5668\u7684\u8A2D\u5B9A\u4E2D\u958B\u555F\u76F8\u6A5F\u5B58\u53D6\u6B0A\u9650\u3002", "dynamicFlows.CameraCapture.NoCameraAccess.title": "\u6211\u5011\u7121\u6CD5\u53D6\u7528\u4F60\u7684\u76F8\u6A5F", "dynamicFlows.CameraCapture.reviewInstructions": "\u4F60\u7684\u7167\u7247\u662F\u5426\u5B8C\u6574\u3001\u6E05\u6670\u53CA\u53EF\u8B80\uFF1F", "dynamicFlows.CameraCapture.reviewRetry": "\u5426\uFF0C\u518D\u8A66\u4E00\u6B21", "dynamicFlows.CameraCapture.reviewSubmit": "\u662F\uFF0C\u63D0\u4EA4", "dynamicFlows.CameraCapture.rotatePhone.text": "\u5C07\u624B\u6A5F\u65CB\u8F49\u81F3\u5782\u76F4\u756B\u9762\u4EE5\u62CD\u7167", "dynamicFlows.ControlFeedback.maxLength": "\u8ACB\u8F38\u5165\u6700\u591A{maxLength}\u500B\u5B57\u5143\u3002", "dynamicFlows.ControlFeedback.maximum": "\u8ACB\u8F38\u5165\u4E00\u500B\u5C0F\u65BC\u6216\u7B49\u65BC{maximum}\u7684\u6578\u5B57\u3002", "dynamicFlows.ControlFeedback.maximumDate": "\u8ACB\u8F38\u5165{maximum}\u6216\u4E4B\u524D\u7684\u65E5\u671F\u3002", "dynamicFlows.ControlFeedback.minLength": "\u8ACB\u8F38\u5165\u81F3\u5C11{minLength}\u500B\u5B57\u5143\u3002", "dynamicFlows.ControlFeedback.minimum": "\u8ACB\u8F38\u5165\u4E00\u500B\u5927\u65BC\u6216\u7B49\u65BC{minimum}\u7684\u6578\u5B57\u3002", "dynamicFlows.ControlFeedback.minimumDate": "\u8ACB\u8F38\u5165{minimum}\u6216\u4E4B\u5F8C\u7684\u65E5\u671F\u3002", "dynamicFlows.ControlFeedback.pattern": "\u8ACB\u4EE5\u6B63\u78BA\u683C\u5F0F\u8F38\u5165\u5185\u5BB9\u3002", "dynamicFlows.ControlFeedback.patternDate": "\u8ACB\u4EE5\u6B63\u78BA\u683C\u5F0F\u8F38\u5165\u65E5\u671F\u3002", "dynamicFlows.ControlFeedback.required": "\u8ACB\u586B\u5BEB\u6B64\u6B04\u4F4D\u3002", "dynamicFlows.ControlFeedback.type": "\u932F\u8AA4\u7684\u985E\u578B", "dynamicFlows.DefaultErrorMessages.required": "\u8ACB\u586B\u5BEB\u6B64\u6B04\u4F4D\u3002", "dynamicFlows.DynamicExternal.retryTitle": "\u91CD\u65B0\u6253\u958B\u8996\u7A97", "dynamicFlows.DynamicParagraph.copied": "\u8907\u88FD\u5230\u526A\u8CBC\u677F", "dynamicFlows.DynamicParagraph.copy": "\u8907\u88FD", "dynamicFlows.ErrorBoundary.errorAlert": "\u51FA\u4E86\u4E9B\u554F\u984C\u3002", "dynamicFlows.ErrorBoundary.retry": "\u91CD\u8A66", "dynamicFlows.ExternalConfirmation.cancel": "\u53D6\u6D88", "dynamicFlows.ExternalConfirmation.description": "\u8ACB\u78BA\u8A8D\u4F60\u662F\u5426\u8981\u5728\u700F\u89BD\u5668\u7684\u65B0\u5206\u9801\u6253\u958B**{origin}**\u3002", "dynamicFlows.ExternalConfirmation.open": "\u5728\u65B0\u5206\u9801\u4E2D\u958B\u555F", "dynamicFlows.ExternalConfirmation.title": "\u8ACB\u78BA\u8A8D", "dynamicFlows.Help.ariaLabel": "\u6309\u6B64\u67E5\u770B\u8A73\u60C5\u3002", "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "\u62B1\u6B49\uFF0C\u8A72\u6A94\u6848\u592A\u5927\u3002\u8ACB\u4E0A\u8F09\u4E00\u500B\u8F03\u5C0F\u7684\u6A94\u6848\u3002", "dynamicFlows.MultipleFileUploadSchema.maxItemsError": "\u8ACB\u4E0D\u8981\u4E0A\u8F09\u8D85\u904E{maxItems}\u500B\u6A94\u6848\u3002", "dynamicFlows.MultipleFileUploadSchema.minItemsError": "\u8ACB\u4E0A\u8F09\u81F3\u5C11{minItems}\u500B\u6A94\u6848\u3002", "dynamicFlows.PersistAsyncSchema.genericError": "\u51FA\u73FE\u4E86\u554F\u984C\uFF0C\u8ACB\u518D\u8A66\u4E00\u6B21\u3002", "dynamicFlows.ReadOnlySchema.no": "\u5426", "dynamicFlows.ReadOnlySchema.yes": "\u662F" };
3179
- var rw = { en: vp, de: xp, es: Pp, fr: Ip, hu: Ap, id: Mp, it: Rp, ja: kp, pl: Op, pt: Ep, ro: Lp, ru: Tp, th: Dp, tr: Vp, zh: Ps, "zh-CN": Ps, "zh-HK": Np };
3180
- var Bp = rw;
3181
- var tg = require("react");
3182
- var og = require("react-intl");
3179
+ var nw = { en: vp, de: xp, es: Pp, fr: Ip, hu: Ap, id: Mp, it: Rp, ja: kp, pl: Op, pt: Ep, ro: Lp, ru: Tp, th: Dp, tr: Vp, zh: Ps, "zh-CN": Ps, "zh-HK": Np };
3180
+ var Bp = nw;
3181
+ var og = require("react");
3182
+ var rg = require("react-intl");
3183
3183
  var Up = require("@transferwise/components");
3184
3184
  var H = (e) => {
3185
3185
  switch (e) {
@@ -3197,7 +3197,7 @@ var require_main_min = __commonJS({
3197
3197
  return "";
3198
3198
  }
3199
3199
  };
3200
- var nw = (e) => {
3200
+ var aw = (e) => {
3201
3201
  switch (e) {
3202
3202
  case "end":
3203
3203
  return "text-xs-right";
@@ -3208,69 +3208,69 @@ var require_main_min = __commonJS({
3208
3208
  return "";
3209
3209
  }
3210
3210
  };
3211
- var wo = (e) => `${nw(e.align)} ${H(e.margin)}`;
3211
+ var bo = (e) => `${aw(e.align)} ${H(e.margin)}`;
3212
3212
  var jp = require("react/jsx-runtime");
3213
- var aw = { canRenderType: "alert", render: ({ context: e, markdown: t, margin: o }) => (0, jp.jsx)(Up.Alert, { type: e, className: H(o), message: t }) };
3214
- var zp = aw;
3213
+ var iw = { canRenderType: "alert", render: ({ context: e, markdown: t, margin: o }) => (0, jp.jsx)(Up.Alert, { type: e, className: H(o), message: t }) };
3214
+ var zp = iw;
3215
3215
  var sa = pe(require("react"), 1);
3216
3216
  var Hp = require("react");
3217
3217
  var qp = globalThis != null && globalThis.document ? Hp.useLayoutEffect : () => {
3218
3218
  };
3219
- var iw = sa.useId || (() => {
3219
+ var sw = sa.useId || (() => {
3220
3220
  });
3221
- var sw = 0;
3221
+ var mw = 0;
3222
3222
  function Is(e) {
3223
- let [t, o] = sa.useState(iw());
3223
+ let [t, o] = sa.useState(sw());
3224
3224
  return qp(() => {
3225
- e || o((r) => r != null ? r : String(sw++));
3225
+ e || o((r) => r != null ? r : String(mw++));
3226
3226
  }, [e]), e || (t ? `radix-${t}` : "");
3227
3227
  }
3228
3228
  var Qt = require("@transferwise/components");
3229
3229
  var As = pe(Re());
3230
3230
  var Zo = require("react");
3231
3231
  var xt = require("react/jsx-runtime");
3232
- var mw = (0, Zo.createContext)(void 0);
3233
- var lw = mw.Provider;
3234
- var cw = (0, Zo.createContext)(void 0);
3235
- var dw = cw.Provider;
3236
- var pw = (0, Zo.createContext)(void 0);
3237
- var uw = pw.Provider;
3238
- var yw = ({ htmlFor: e, className: t, children: o }) => (0, xt.jsx)("label", { htmlFor: e, className: (0, As.default)("control-label d-flex flex-column gap-y-1 m-b-0", t), children: o });
3232
+ var lw = (0, Zo.createContext)(void 0);
3233
+ var cw = lw.Provider;
3234
+ var dw = (0, Zo.createContext)(void 0);
3235
+ var pw = dw.Provider;
3236
+ var uw = (0, Zo.createContext)(void 0);
3237
+ var yw = uw.Provider;
3238
+ var fw = ({ htmlFor: e, className: t, children: o }) => (0, xt.jsx)("label", { htmlFor: e, className: (0, As.default)("control-label d-flex flex-column gap-y-1 m-b-0", t), children: o });
3239
3239
  var $p = ({ id: e, label: t, hint: o, error: r, className: n, children: a }) => {
3240
3240
  let i = !!r, m = !!o && !i, l = Is(), c = e != null ? e : l, p = Is();
3241
- return (0, xt.jsx)(lw, { value: c, children: (0, xt.jsx)(dw, { value: i || m ? p : void 0, children: (0, xt.jsx)(uw, { value: i, children: (0, xt.jsxs)("div", { className: (0, As.default)("form-group d-block", { "has-error": i, "has-info": m }, n), children: [(0, xt.jsxs)(yw, { htmlFor: c, children: [t, a] }), m && (0, xt.jsx)(Qt.InlineAlert, { type: Qt.Sentiment.NEUTRAL, id: p, children: o }), i && (0, xt.jsx)(Qt.InlineAlert, { type: Qt.Sentiment.NEGATIVE, id: p, children: r })] }) }) }) });
3241
+ return (0, xt.jsx)(cw, { value: c, children: (0, xt.jsx)(pw, { value: i || m ? p : void 0, children: (0, xt.jsx)(yw, { value: i, children: (0, xt.jsxs)("div", { className: (0, As.default)("form-group d-block", { "has-error": i, "has-info": m }, n), children: [(0, xt.jsxs)(fw, { htmlFor: c, children: [t, a] }), m && (0, xt.jsx)(Qt.InlineAlert, { type: Qt.Sentiment.NEUTRAL, id: p, children: o }), i && (0, xt.jsx)(Qt.InlineAlert, { type: Qt.Sentiment.NEGATIVE, id: p, children: r })] }) }) }) });
3242
3242
  };
3243
3243
  var ma = require("@transferwise/components");
3244
3244
  var Gp = require("react-intl");
3245
3245
  var Ms = require("react/jsx-runtime");
3246
- function fw({ help: e }) {
3246
+ function hw({ help: e }) {
3247
3247
  let t = (0, Gp.useIntl)();
3248
3248
  return (0, Ms.jsx)(ma.Info, { className: "m-l-1", content: (0, Ms.jsx)(ma.Markdown, { config: { link: { target: "_blank" } }, children: e }), presentation: "POPOVER", size: "sm", "aria-label": t.formatMessage(Ln.helpAria) });
3249
3249
  }
3250
- var Gr = fw;
3250
+ var Gr = hw;
3251
3251
  var ca = require("react/jsx-runtime");
3252
3252
  function la({ text: e, help: t }) {
3253
3253
  return (0, ca.jsxs)("div", { children: [e, (0, ca.jsx)(Gr, { help: t })] });
3254
3254
  }
3255
3255
  var Rs = require("react/jsx-runtime");
3256
- function hw({ id: e, children: t, label: o, error: r, description: n, help: a }) {
3256
+ function gw({ id: e, children: t, label: o, error: r, description: n, help: a }) {
3257
3257
  return (0, Rs.jsx)($p, { id: e, label: o && a ? (0, Rs.jsx)(la, { text: o, help: a }) : o, hint: n, error: r, children: t });
3258
3258
  }
3259
- var me = hw;
3259
+ var me = gw;
3260
3260
  var Wp = require("@transferwise/components");
3261
3261
  var ks = require("react/jsx-runtime");
3262
- var gw = { canRenderType: "input-boolean", render: (e) => {
3262
+ var Cw = { canRenderType: "input-boolean", render: (e) => {
3263
3263
  let y = e, { id: t, control: o, label: r = "", description: n, help: a, error: i, type: m, value: l } = y, c = E(y, ["id", "control", "label", "description", "help", "error", "type", "value"]), p = C(s({}, c), { label: r, checked: l });
3264
3264
  return (0, ks.jsx)(me, { id: t, label: "", description: n, error: i, help: a, children: (0, ks.jsx)(Wp.Checkbox, s({ id: t }, p)) });
3265
3265
  } };
3266
- var _p = gw;
3266
+ var _p = Cw;
3267
3267
  var Os = pe(Re());
3268
3268
  var Es = require("react/jsx-runtime");
3269
- var Cw = { canRenderType: "box", render: ({ border: e, children: t, margin: o, width: r }) => {
3269
+ var Sw = { canRenderType: "box", render: ({ border: e, children: t, margin: o, width: r }) => {
3270
3270
  let n = r !== "xl", a = (0, Es.jsx)("div", { className: (0, Os.default)({ "df-box-renderer-border": e, [`df-box-renderer-width-${r}`]: n, [H(o)]: !n }), children: t });
3271
3271
  return n ? (0, Es.jsx)("div", { className: (0, Os.default)("df-box-renderer-fixed-width", H(o)), children: a }) : a;
3272
3272
  } };
3273
- var Kp = Cw;
3273
+ var Kp = Sw;
3274
3274
  var Zp = require("@transferwise/components");
3275
3275
  var da = require("react");
3276
3276
  var Jp = (0, da.createContext)({ loadingState: "idle" });
@@ -3280,12 +3280,12 @@ var require_main_min = __commonJS({
3280
3280
  return { loadingState: e, isLoading: e !== "idle" };
3281
3281
  };
3282
3282
  var eu = require("react/jsx-runtime");
3283
- var Sw = { canRenderType: "button", render: bw };
3284
- function bw({ control: e, context: t, disabled: o, margin: r, title: n, size: a, onClick: i }) {
3285
- let m = H(r), c = Yp(e) === "tertiary" ? void 0 : ww(t), { isLoading: p } = pa();
3286
- return (0, eu.jsx)(Zp.Button, { block: true, className: m, disabled: p || o, priority: Yp(e), size: Fw(a), type: c, onClick: i, children: n });
3283
+ var bw = { canRenderType: "button", render: ww };
3284
+ function ww({ control: e, context: t, disabled: o, margin: r, title: n, size: a, onClick: i }) {
3285
+ let m = H(r), c = Yp(e) === "tertiary" ? void 0 : Fw(t), { isLoading: p } = pa();
3286
+ return (0, eu.jsx)(Zp.Button, { block: true, className: m, disabled: p || o, priority: Yp(e), size: xw(a), type: c, onClick: i, children: n });
3287
3287
  }
3288
- var ww = (e) => {
3288
+ var Fw = (e) => {
3289
3289
  switch (e) {
3290
3290
  case "neutral":
3291
3291
  case "warning":
@@ -3303,7 +3303,7 @@ var require_main_min = __commonJS({
3303
3303
  return "secondary";
3304
3304
  }
3305
3305
  };
3306
- var Fw = (e) => {
3306
+ var xw = (e) => {
3307
3307
  if (e)
3308
3308
  switch (e) {
3309
3309
  case "xs":
@@ -3317,16 +3317,16 @@ var require_main_min = __commonJS({
3317
3317
  return "md";
3318
3318
  }
3319
3319
  };
3320
- var Qp = Sw;
3320
+ var Qp = bw;
3321
3321
  var tu = pe(Re());
3322
3322
  var Wr = require("react/jsx-runtime");
3323
- var xw = { canRenderType: "columns", render: ({ bias: e, margin: t, startChildren: o, endChildren: r }) => (0, Wr.jsxs)("div", { className: (0, tu.default)("df-columns-renderer-container", H(t), { "df-columns-renderer-bias-start": e === "start", "df-columns-renderer-bias-end": e === "end" }), children: [(0, Wr.jsx)("div", { className: "df-columns-renderer-column", children: o }), (0, Wr.jsx)("div", { className: "df-columns-renderer-column", children: r })] }) };
3324
- var ou = xw;
3323
+ var vw = { canRenderType: "columns", render: ({ bias: e, margin: t, startChildren: o, endChildren: r }) => (0, Wr.jsxs)("div", { className: (0, tu.default)("df-columns-renderer-container", H(t), { "df-columns-renderer-bias-start": e === "start", "df-columns-renderer-bias-end": e === "end" }), children: [(0, Wr.jsx)("div", { className: "df-columns-renderer-column", children: o }), (0, Wr.jsx)("div", { className: "df-columns-renderer-column", children: r })] }) };
3324
+ var ou = vw;
3325
3325
  var fa = require("@transferwise/components");
3326
3326
  var ua = (e) => typeof e == "number" && !Number.isNaN(e);
3327
- var vw = (e) => e === null;
3328
- var Pw = (e) => typeof e == "undefined";
3329
- var ru = (e) => vw(e) || Pw(e);
3327
+ var Pw = (e) => e === null;
3328
+ var Iw = (e) => typeof e == "undefined";
3329
+ var ru = (e) => Pw(e) || Iw(e);
3330
3330
  var Ls = (e) => /^\d+$/.test(e) && !Number.isNaN(Number.parseFloat(e)) ? e : null;
3331
3331
  var ya = (e) => {
3332
3332
  if (!e)
@@ -3339,32 +3339,32 @@ var require_main_min = __commonJS({
3339
3339
  return [n, a, i].join("-");
3340
3340
  };
3341
3341
  var Ts = require("react/jsx-runtime");
3342
- function Iw({ control: e, inputProps: t }) {
3342
+ function Aw({ control: e, inputProps: t }) {
3343
3343
  let { minimumDate: o, maximumDate: r, placeholder: n, disabled: a, onBlur: i, onChange: m, onFocus: l } = t;
3344
3344
  return e === "date-lookup" ? (0, Ts.jsx)(fa.DateLookup, { value: ya(t.value), min: ya(o), max: ya(r), placeholder: n, disabled: a, onChange: (c) => {
3345
3345
  m(nu(c));
3346
3346
  }, onBlur: i, onFocus: l }) : (0, Ts.jsx)(fa.DateInput, s({}, t));
3347
3347
  }
3348
- var au = Iw;
3348
+ var au = Aw;
3349
3349
  var Ds = require("react/jsx-runtime");
3350
- var Aw = { canRenderType: "input-date", render: (e) => {
3350
+ var Mw = { canRenderType: "input-date", render: (e) => {
3351
3351
  let f = e, { id: t, control: o, label: r, description: n, error: a, type: i, help: m, value: l } = f, c = E(f, ["id", "control", "label", "description", "error", "type", "help", "value"]), p = l != null ? l : "", y = C(s({}, c), { value: p, id: t });
3352
3352
  return (0, Ds.jsx)(me, { id: t, label: r, description: n, error: a, help: m, children: (0, Ds.jsx)(au, { control: o, inputProps: y }) });
3353
3353
  } };
3354
- var iu = Aw;
3354
+ var iu = Mw;
3355
3355
  var ha = require("@transferwise/components");
3356
3356
  var mu = require("react/jsx-runtime");
3357
- var Vs = (e) => Mw(e) || Rw(e);
3358
- var Mw = (e) => kw.some((t) => e === `flag-${t}`);
3357
+ var Vs = (e) => Rw(e) || kw(e);
3359
3358
  var Rw = (e) => Ow.some((t) => e === `flag-${t}`);
3359
+ var kw = (e) => Ew.some((t) => e === `flag-${t}`);
3360
3360
  function su({ name: e }) {
3361
3361
  if (!Vs(e))
3362
3362
  return null;
3363
3363
  let t = e.substring(5);
3364
3364
  return (0, mu.jsx)("img", { src: `https://wise.com/web-art/assets/flags/${t}.svg`, alt: "", "data-testid": `img-flag-${t}` });
3365
3365
  }
3366
- var kw = ["aed", "ars", "aud", "bdt", "bgn", "bhd", "bnd", "brl", "bwp", "cad", "chf", "clp", "cny", "cop", "crc", "czk", "dkk", "egp", "eur", "fjd", "gbp", "gel", "ghs", "gtq", "hkd", "hrk", "huf", "idr", "ils", "imp", "inr", "isk", "jmd", "jpy", "kes", "krw", "kwd", "lak", "lkr", "lsl", "mad", "mur", "mxn", "myr", "mzn", "nad", "ngn", "nok", "npr", "nzd", "omr", "pab", "pen", "php", "pkr", "pln", "qar", "ron", "rub", "sar", "sek", "sgd", "thb", "tmt", "try", "twd", "tzs", "uah", "ugx", "usd", "uyu", "vnd", "xof", "zar", "zmw"];
3367
- var Ow = ["ad", "ae", "ar", "at", "au", "bd", "be", "bg", "bh", "bn", "br", "bw", "ca", "ch", "cl", "cn", "co", "cr", "cy", "cz", "de", "dk", "ee", "eg", "es", "eu", "fi", "fj", "fr", "gb", "ge", "gg", "gh", "gp", "gr", "gt", "hk", "hr", "hu", "id", "ie", "il", "im", "in", "is", "it", "je", "jm", "jp", "ke", "kr", "kw", "la", "li", "lk", "ls", "lt", "lu", "lv", "ma", "mc", "mt", "mu", "mx", "my", "mz", "na", "ng", "nl", "no", "np", "nz", "om", "pa", "pe", "ph", "pk", "pl", "pt", "qa", "ro", "ru", "sa", "se", "sg", "si", "sk", "sm", "th", "tm", "tr", "tw", "tz", "ua", "ug", "us", "uy", "va", "vn", "wi", "xo", "za", "zm"];
3366
+ var Ow = ["aed", "ars", "aud", "bdt", "bgn", "bhd", "bnd", "brl", "bwp", "cad", "chf", "clp", "cny", "cop", "crc", "czk", "dkk", "egp", "eur", "fjd", "gbp", "gel", "ghs", "gtq", "hkd", "hrk", "huf", "idr", "ils", "imp", "inr", "isk", "jmd", "jpy", "kes", "krw", "kwd", "lak", "lkr", "lsl", "mad", "mur", "mxn", "myr", "mzn", "nad", "ngn", "nok", "npr", "nzd", "omr", "pab", "pen", "php", "pkr", "pln", "qar", "ron", "rub", "sar", "sek", "sgd", "thb", "tmt", "try", "twd", "tzs", "uah", "ugx", "usd", "uyu", "vnd", "xof", "zar", "zmw"];
3367
+ var Ew = ["ad", "ae", "ar", "at", "au", "bd", "be", "bg", "bh", "bn", "br", "bw", "ca", "ch", "cl", "cn", "co", "cr", "cy", "cz", "de", "dk", "ee", "eg", "es", "eu", "fi", "fj", "fr", "gb", "ge", "gg", "gh", "gp", "gr", "gt", "hk", "hr", "hu", "id", "ie", "il", "im", "in", "is", "it", "je", "jm", "jp", "ke", "kr", "kw", "la", "li", "lk", "ls", "lt", "lu", "lv", "ma", "mc", "mt", "mu", "mx", "my", "mz", "na", "ng", "nl", "no", "np", "nz", "om", "pa", "pe", "ph", "pk", "pl", "pt", "qa", "ro", "ru", "sa", "se", "sg", "si", "sk", "sm", "th", "tm", "tr", "tw", "tz", "ua", "ug", "us", "uy", "va", "vn", "wi", "xo", "za", "zm"];
3368
3368
  var lu = pe(require("@transferwise/icons"));
3369
3369
  var pu = require("react/jsx-runtime");
3370
3370
  var Ns = (e) => {
@@ -3377,13 +3377,13 @@ var require_main_min = __commonJS({
3377
3377
  let t = du(e), o = lu[t];
3378
3378
  return (0, pu.jsx)(o, { size: 24 });
3379
3379
  }
3380
- var du = (e) => e.split("-").map(Ew).join("");
3381
- var Ew = (e) => `${e[0].toUpperCase()}${e.slice(1)}`;
3380
+ var du = (e) => e.split("-").map(Lw).join("");
3381
+ var Lw = (e) => `${e[0].toUpperCase()}${e.slice(1)}`;
3382
3382
  var Bs = require("react/jsx-runtime");
3383
- function Lw({ name: e }) {
3383
+ function Tw({ name: e }) {
3384
3384
  return Vs(e) ? (0, Bs.jsx)(su, { name: e }) : Ns(e) ? (0, Bs.jsx)(cu, { name: e }) : null;
3385
3385
  }
3386
- var eo = Lw;
3386
+ var eo = Tw;
3387
3387
  var Qo = require("@transferwise/components");
3388
3388
  var _r = require("react/jsx-runtime");
3389
3389
  function er({ icon: e, image: t }) {
@@ -3400,33 +3400,33 @@ var require_main_min = __commonJS({
3400
3400
  return null;
3401
3401
  }
3402
3402
  var Kr = require("react/jsx-runtime");
3403
- var Tw = { canRenderType: "decision", render: Dw };
3404
- var uu = Tw;
3405
- function Dw({ margin: e, options: t }) {
3403
+ var Dw = { canRenderType: "decision", render: Vw };
3404
+ var uu = Dw;
3405
+ function Vw({ margin: e, options: t }) {
3406
3406
  let { isLoading: o } = pa();
3407
3407
  return (0, Kr.jsx)("div", { className: H(e), children: (0, Kr.jsx)(ha.NavigationOptionsList, { children: t.map(({ description: r, disabled: n, icon: a, image: i, title: m, onClick: l }) => (0, Kr.jsx)(ha.NavigationOption, { title: m, content: r, disabled: o || n, media: (0, Kr.jsx)(er, { icon: a, image: i }), showMediaCircle: false, showMediaAtAllSizes: true, onClick: l }, JSON.stringify(m))) }) });
3408
3408
  }
3409
3409
  var fu = require("react/jsx-runtime");
3410
- var Vw = { canRenderType: "divider", render: ({ margin: e }) => (0, fu.jsx)("hr", { className: `m-t-0 ${H(e)}` }) };
3411
- var yu = Vw;
3410
+ var Nw = { canRenderType: "divider", render: ({ margin: e }) => (0, fu.jsx)("hr", { className: `m-t-0 ${H(e)}` }) };
3411
+ var yu = Nw;
3412
3412
  var gu = require("react/jsx-runtime");
3413
- var Nw = { canRenderType: "form", render: ({ children: e, margin: t }) => (0, gu.jsx)("div", { className: H(t), children: e }) };
3414
- var hu = Nw;
3413
+ var Bw = { canRenderType: "form", render: ({ children: e, margin: t }) => (0, gu.jsx)("div", { className: H(t), children: e }) };
3414
+ var hu = Bw;
3415
3415
  var Cu = require("@transferwise/components");
3416
3416
  var Jr = require("react/jsx-runtime");
3417
- var Bw = { canRenderType: "form-section", render: ({ title: e, description: t, children: o }) => (0, Jr.jsxs)("fieldset", { children: [e && (0, Jr.jsx)(Cu.Header, { as: "h2", title: e }), t && (0, Jr.jsx)("p", { children: t }), o] }) };
3418
- var Su = Bw;
3417
+ var Uw = { canRenderType: "form-section", render: ({ title: e, description: t, children: o }) => (0, Jr.jsxs)("fieldset", { children: [e && (0, Jr.jsx)(Cu.Header, { as: "h2", title: e }), t && (0, Jr.jsx)("p", { children: t }), o] }) };
3418
+ var Su = Uw;
3419
3419
  var bu = require("@transferwise/components");
3420
3420
  var vt = require("react/jsx-runtime");
3421
- var Uw = { canRenderType: "heading", render: (e) => (0, vt.jsx)(zw, s({}, e)) };
3422
- function zw(e) {
3423
- let { text: t, size: o, align: r, margin: n, control: a } = e, i = wo({ align: r, margin: n });
3424
- return a === "display" ? (0, vt.jsx)(jw, { size: o, text: t, className: i }) : (0, vt.jsx)(Hw, { size: o, text: t, className: i });
3425
- }
3426
- function jw({ size: e, text: t, className: o }) {
3427
- return (0, vt.jsx)(bu.Display, { type: qw(e), className: o, children: t });
3421
+ var zw = { canRenderType: "heading", render: (e) => (0, vt.jsx)(jw, s({}, e)) };
3422
+ function jw(e) {
3423
+ let { text: t, size: o, align: r, margin: n, control: a } = e, i = bo({ align: r, margin: n });
3424
+ return a === "display" ? (0, vt.jsx)(Hw, { size: o, text: t, className: i }) : (0, vt.jsx)(qw, { size: o, text: t, className: i });
3428
3425
  }
3429
3426
  function Hw({ size: e, text: t, className: o }) {
3427
+ return (0, vt.jsx)(bu.Display, { type: $w(e), className: o, children: t });
3428
+ }
3429
+ function qw({ size: e, text: t, className: o }) {
3430
3430
  switch (e) {
3431
3431
  case "xs":
3432
3432
  return (0, vt.jsx)("h5", { className: o, children: t });
@@ -3441,7 +3441,7 @@ var require_main_min = __commonJS({
3441
3441
  return (0, vt.jsx)("h3", { className: o, children: t });
3442
3442
  }
3443
3443
  }
3444
- var qw = (e) => {
3444
+ var $w = (e) => {
3445
3445
  switch (e) {
3446
3446
  case "xs":
3447
3447
  case "sm":
@@ -3454,70 +3454,70 @@ var require_main_min = __commonJS({
3454
3454
  return "display-medium";
3455
3455
  }
3456
3456
  };
3457
- var wu = Uw;
3457
+ var wu = zw;
3458
3458
  var Fu = require("@transferwise/components");
3459
3459
  var Ca = require("react");
3460
3460
  var ga = require("react/jsx-runtime");
3461
- var $w = { canRenderType: "image", render: (e) => (0, ga.jsx)(Gw, s({}, e)) };
3462
- var xu = $w;
3463
- function Gw({ accessibilityDescription: e, margin: t, size: o, url: r }) {
3461
+ var Gw = { canRenderType: "image", render: (e) => (0, ga.jsx)(Ww, s({}, e)) };
3462
+ var xu = Gw;
3463
+ function Ww({ accessibilityDescription: e, margin: t, size: o, url: r }) {
3464
3464
  let [n, a] = (0, Ca.useState)(""), i = Se();
3465
3465
  return (0, Ca.useEffect)(() => {
3466
- _w(i, r).then(a);
3466
+ Kw(i, r).then(a);
3467
3467
  }, [r, i]), (0, ga.jsx)("div", { className: `df-image ${o || "md"}`, children: (0, ga.jsx)(Fu.Image, { className: `img-responsive ${H(t)}`, alt: e != null ? e : "", src: n, stretch: true, shrink: true }) });
3468
3468
  }
3469
- var Ww = async (e) => new Promise((t, o) => {
3469
+ var _w = async (e) => new Promise((t, o) => {
3470
3470
  let r = new FileReader();
3471
3471
  r.addEventListener("loadend", () => t(r.result)), r.addEventListener("error", (n) => o(n)), r.readAsDataURL(e);
3472
3472
  });
3473
- var _w = async (e, t) => {
3473
+ var Kw = async (e, t) => {
3474
3474
  var o;
3475
3475
  try {
3476
3476
  return Oo(t) || t != null && t.startsWith(`${(o = window == null ? void 0 : window.location) == null ? void 0 : o.origin}/`) ? await e(t, { method: "GET", headers: { "Content-Type": "image/image" }, credentials: "same-origin" }).then(async (r) => {
3477
3477
  if (r.ok)
3478
3478
  return r.blob();
3479
3479
  throw new Error("Image fetching failed");
3480
- }).then(Ww).catch(() => t) : t;
3480
+ }).then(_w).catch(() => t) : t;
3481
3481
  } catch (r) {
3482
3482
  return t;
3483
3483
  }
3484
3484
  };
3485
3485
  var Sa = require("@transferwise/components");
3486
3486
  var Xr = require("react/jsx-runtime");
3487
- var Kw = ["positive", "neutral"];
3488
- var Jw = ["warning", "negative"];
3489
- var Xw = { canRenderType: "instructions", render: ({ items: e, margin: t, title: o }) => {
3490
- let r = e.filter((a) => Kw.includes(a.context)).map(({ text: a }) => a), n = e.filter((a) => Jw.includes(a.context)).map(({ text: a }) => a);
3487
+ var Jw = ["positive", "neutral"];
3488
+ var Xw = ["warning", "negative"];
3489
+ var Yw = { canRenderType: "instructions", render: ({ items: e, margin: t, title: o }) => {
3490
+ let r = e.filter((a) => Jw.includes(a.context)).map(({ text: a }) => a), n = e.filter((a) => Xw.includes(a.context)).map(({ text: a }) => a);
3491
3491
  return (0, Xr.jsxs)("div", { className: H(t), children: [o ? (0, Xr.jsx)(Sa.Header, { title: o }) : null, (0, Xr.jsx)(Sa.InstructionsList, { dos: r, donts: n })] });
3492
3492
  } };
3493
- var vu = Xw;
3493
+ var vu = Yw;
3494
3494
  var Pu = require("@transferwise/components");
3495
3495
  var tr = (e) => {
3496
3496
  e.target instanceof HTMLElement && e.target.blur();
3497
3497
  };
3498
3498
  var Us = require("react/jsx-runtime");
3499
- var Yw = { canRenderType: "input-integer", render: (e) => {
3499
+ var Zw = { canRenderType: "input-integer", render: (e) => {
3500
3500
  let p = e, { id: t, label: o, error: r, description: n, help: a, type: i, value: m, onChange: l } = p, c = E(p, ["id", "label", "error", "description", "help", "type", "value", "onChange"]);
3501
3501
  return (0, Us.jsx)(me, { id: t, label: o, description: n, error: r, help: a, children: (0, Us.jsx)(Pu.Input, s({ id: t, name: t, type: "number", step: "1", pattern: "\\d+", value: m != null ? m : "", onChange: ({ target: { value: y } }) => {
3502
3502
  let f = Number.parseInt(y, 10);
3503
3503
  l(Number.isNaN(f) ? null : f);
3504
3504
  }, onWheel: tr }, c)) });
3505
3505
  } };
3506
- var Iu = Yw;
3506
+ var Iu = Zw;
3507
3507
  var Au = require("@transferwise/components");
3508
3508
  var Ru = require("react/jsx-runtime");
3509
- var Zw = { canRenderType: "loading-indicator", render: ({ margin: e, size: t }) => (0, Ru.jsx)(Au.Loader, { size: t, classNames: { "tw-loader": `tw-loader m-x-auto ${H(e)}` }, "data-testid": "loading-indicator" }) };
3510
- var Mu = Zw;
3509
+ var Qw = { canRenderType: "loading-indicator", render: ({ margin: e, size: t }) => (0, Ru.jsx)(Au.Loader, { size: t, classNames: { "tw-loader": `tw-loader m-x-auto ${H(e)}` }, "data-testid": "loading-indicator" }) };
3510
+ var Mu = Qw;
3511
3511
  var ku = require("@transferwise/components");
3512
3512
  var zs = require("react/jsx-runtime");
3513
- var Qw = { canRenderType: "markdown", render: ({ content: e, align: t, margin: o }) => (0, zs.jsx)("div", { className: wo({ align: t, margin: o }), children: (0, zs.jsx)(ku.Markdown, { config: { link: { target: "_blank" } }, children: e }) }) };
3514
- var Ou = Qw;
3513
+ var eF = { canRenderType: "markdown", render: ({ content: e, align: t, margin: o }) => (0, zs.jsx)("div", { className: bo({ align: t, margin: o }), children: (0, zs.jsx)(ku.Markdown, { config: { link: { target: "_blank" } }, children: e }) }) };
3514
+ var Ou = eF;
3515
3515
  var ba = require("@transferwise/components");
3516
3516
  var Eu = require("react");
3517
3517
  var or = require("react/jsx-runtime");
3518
- var eF = { canRenderType: "modal", render: (e) => (0, or.jsx)(tF, s({}, e)) };
3519
- var Lu = eF;
3520
- function tF({ content: e, margin: t, trigger: o }) {
3518
+ var tF = { canRenderType: "modal", render: (e) => (0, or.jsx)(oF, s({}, e)) };
3519
+ var Lu = tF;
3520
+ function oF({ content: e, margin: t, trigger: o }) {
3521
3521
  let [r, n] = (0, Eu.useState)(false);
3522
3522
  return (0, or.jsxs)("div", { className: H(t), children: [(0, or.jsx)(ba.Button, { priority: "tertiary", block: true, onClick: () => n(true), children: o.title }), (0, or.jsx)(ba.Modal, { scroll: "content", open: r, size: "lg", body: e.components, onClose: () => n(false) })] });
3523
3523
  }
@@ -3525,50 +3525,50 @@ var require_main_min = __commonJS({
3525
3525
  var Tu = require("@transferwise/components");
3526
3526
  var Du = pe(Re());
3527
3527
  var rr = require("react/jsx-runtime");
3528
- function oF({ id: e, children: t, label: o, description: r, error: n, help: a }) {
3528
+ function rF({ id: e, children: t, label: o, description: r, error: n, help: a }) {
3529
3529
  let i = o && a ? (0, rr.jsx)(la, { text: o, help: a }) : o, m = r ? `${e}-description` : void 0;
3530
3530
  return (0, rr.jsxs)("div", { className: (0, Du.default)("form-group d-block", { "has-error": !!n }), children: [(0, rr.jsx)("label", { htmlFor: e, className: "control-label", children: i }), t, n && (0, rr.jsx)(Tu.InlineAlert, { type: "negative", id: m, children: n })] });
3531
3531
  }
3532
- var wa = oF;
3532
+ var wa = rF;
3533
3533
  var Yr = (e) => Array.isArray(e) && e.length >= 1 ? e.join(",") : "*";
3534
3534
  var Fa = (e) => Math.floor(e / 1024);
3535
3535
  var Vu = async (e, t) => {
3536
- let o = nF(e), r = await rF(e);
3536
+ let o = aF(e), r = await nF(e);
3537
3537
  return new File([r], t, { type: o });
3538
3538
  };
3539
- var rF = async (e) => (await fetch(e)).blob();
3540
- var nF = (e) => {
3539
+ var nF = async (e) => (await fetch(e)).blob();
3540
+ var aF = (e) => {
3541
3541
  let o = /^data:(.+);/.exec(e);
3542
3542
  if (o && o.length > 1)
3543
3543
  return o[1];
3544
3544
  };
3545
- var aF = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
3545
+ var iF = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
3546
3546
  var Nu = (e = 21) => {
3547
3547
  let t = "", o = e;
3548
3548
  for (; o--; )
3549
- t += aF[Math.random() * 64 | 0];
3549
+ t += iF[Math.random() * 64 | 0];
3550
3550
  return t;
3551
3551
  };
3552
3552
  var xa = () => Nu(10);
3553
3553
  var js = require("react/jsx-runtime");
3554
- var iF = { canRenderType: "input-upload-multi", render: (e) => {
3554
+ var sF = { canRenderType: "input-upload-multi", render: (e) => {
3555
3555
  let { id: t, accepts: o, help: r, label: n, description: a, disabled: i, error: m, maxSize: l, maxItems: c, uploadLabel: p, onUpload: y, onDelete: f } = e, u = async (h) => {
3556
3556
  let S = h.get("file"), b = xa();
3557
3557
  return y(S, b).then(() => ({ id: b }));
3558
3558
  }, d = async (h) => f(String(h)), g = a ? `${t}-description` : void 0;
3559
3559
  return (0, js.jsx)(wa, { id: t, label: n, description: a, error: m, help: r, children: (0, js.jsx)(Bu.UploadInput, { id: t, "aria-describedby": g, className: "form-control", description: a, disabled: i, fileTypes: Yr(o), maxFiles: c, multiple: true, sizeLimit: l ? Fa(l) : void 0, uploadButtonTitle: p, onDeleteFile: d, onUploadFile: u }) });
3560
3560
  } };
3561
- var Uu = iF;
3561
+ var Uu = sF;
3562
3562
  var zu = require("@transferwise/components");
3563
3563
  var Hs = require("react/jsx-runtime");
3564
- var sF = { canRenderType: "input-number", render: (e) => {
3564
+ var mF = { canRenderType: "input-number", render: (e) => {
3565
3565
  let p = e, { id: t, label: o, error: r, description: n, help: a, type: i, value: m, onChange: l } = p, c = E(p, ["id", "label", "error", "description", "help", "type", "value", "onChange"]);
3566
3566
  return (0, Hs.jsx)(me, { id: t, label: o, description: n, error: r, help: a, children: (0, Hs.jsx)(zu.Input, s({ id: t, name: t, type: "number", value: m != null ? m : "", onChange: ({ target: { value: y } }) => {
3567
3567
  let f = Number.parseFloat(y);
3568
3568
  l(Number.isNaN(f) ? null : f);
3569
3569
  }, onWheel: tr }, c)) });
3570
3570
  } };
3571
- var ju = sF;
3571
+ var ju = mF;
3572
3572
  var Gu = require("react-intl");
3573
3573
  var Hu = require("@transferwise/components");
3574
3574
  var qu = require("react");
@@ -3580,30 +3580,30 @@ var require_main_min = __commonJS({
3580
3580
  var va = require("@transferwise/components");
3581
3581
  var Wu = pe(Re());
3582
3582
  var Vt = require("react/jsx-runtime");
3583
- var mF = { canRenderType: "paragraph", render: (e) => (0, Vt.jsx)(lF, s({}, e)) };
3584
- function lF({ align: e, control: t, margin: o, text: r }) {
3585
- let n = wo({ align: e, margin: o });
3586
- return t === "copyable" ? (0, Vt.jsx)(dF, { className: n, align: e, text: r }) : (0, Vt.jsx)(cF, { className: n, text: r });
3583
+ var lF = { canRenderType: "paragraph", render: (e) => (0, Vt.jsx)(cF, s({}, e)) };
3584
+ function cF({ align: e, control: t, margin: o, text: r }) {
3585
+ let n = bo({ align: e, margin: o });
3586
+ return t === "copyable" ? (0, Vt.jsx)(pF, { className: n, align: e, text: r }) : (0, Vt.jsx)(dF, { className: n, text: r });
3587
3587
  }
3588
- function cF({ text: e, className: t }) {
3588
+ function dF({ text: e, className: t }) {
3589
3589
  return (0, Vt.jsx)("p", { className: t, children: e });
3590
3590
  }
3591
- function dF({ text: e, align: t, className: o }) {
3591
+ function pF({ text: e, align: t, className: o }) {
3592
3592
  let { formatMessage: r } = (0, Gu.useIntl)(), n = $u(), a = () => {
3593
3593
  navigator.clipboard.writeText(e).then(() => n({ text: r(Go.copied) })).catch(() => {
3594
3594
  });
3595
- }, i = wo({ align: t, margin: "sm" });
3595
+ }, i = bo({ align: t, margin: "sm" });
3596
3596
  return (0, Vt.jsxs)("div", { className: o, children: [(0, Vt.jsx)(va.Input, { type: "text", value: e, readOnly: true, className: (0, Wu.default)("text-ellipsis", i) }), (0, Vt.jsx)(va.Button, { block: true, onClick: a, children: r(Go.copy) })] });
3597
3597
  }
3598
- var _u = mF;
3598
+ var _u = lF;
3599
3599
  var Ye = require("@transferwise/components");
3600
3600
  var Ku = require("react");
3601
3601
  var Ju = require("@transferwise/icons");
3602
3602
  var Xu = require("react-intl");
3603
3603
  var Yu = pe(Re());
3604
3604
  var oe = require("react/jsx-runtime");
3605
- var pF = { canRenderType: "repeatable", render: (e) => (0, oe.jsx)(uF, s({}, e)) };
3606
- function uF(e) {
3605
+ var uF = { canRenderType: "repeatable", render: (e) => (0, oe.jsx)(yF, s({}, e)) };
3606
+ function yF(e) {
3607
3607
  let { addItemTitle: t, description: o, editableItem: r, editItemTitle: n, error: a, items: i, title: m, onEdit: l, onAdd: c, onSave: p, onRemove: y } = e, { formatMessage: f } = (0, Xu.useIntl)(), [u, d] = (0, Ku.useState)(null), g = () => {
3608
3608
  c(), d("add");
3609
3609
  }, h = (F) => {
@@ -3615,45 +3615,45 @@ var require_main_min = __commonJS({
3615
3615
  }, w = () => {
3616
3616
  d(null);
3617
3617
  };
3618
- return (0, oe.jsxs)(oe.Fragment, { children: [m && (0, oe.jsx)(Ye.Header, { title: m }), o && (0, oe.jsx)("p", { children: o }), (0, oe.jsxs)("div", { className: (0, Yu.default)("form-group", { "has-error": a }), children: [i == null ? void 0 : i.map((F, x) => (0, oe.jsx)(yF, { item: F, onClick: () => h(x) }, F.id)), (0, oe.jsx)(Ye.NavigationOption, { media: (0, oe.jsx)(Ju.Plus, {}), title: t || f(_e.addItemTitle), showMediaAtAllSizes: true, onClick: () => g() }), a && (0, oe.jsx)(Ye.InlineAlert, { type: "negative", children: a })] }), (0, oe.jsx)(Ye.Modal, { open: u !== null, title: (u === "add" ? t : n) || f(_e.addItemTitle), body: (0, oe.jsxs)(oe.Fragment, { children: [(0, oe.jsx)("div", { className: "m-b-2", children: r }), (0, oe.jsxs)("div", { children: [(0, oe.jsx)(Ye.Button, { priority: "primary", block: true, className: "m-b-2", onClick: () => S(), children: f(_e.addItem) }), (0, oe.jsx)(Ye.Button, { priority: "secondary", type: "negative", block: true, onClick: () => b(), children: f(_e.removeItem) })] })] }), onClose: () => w() })] });
3618
+ return (0, oe.jsxs)(oe.Fragment, { children: [m && (0, oe.jsx)(Ye.Header, { title: m }), o && (0, oe.jsx)("p", { children: o }), (0, oe.jsxs)("div", { className: (0, Yu.default)("form-group", { "has-error": a }), children: [i == null ? void 0 : i.map((F, x) => (0, oe.jsx)(fF, { item: F, onClick: () => h(x) }, F.id)), (0, oe.jsx)(Ye.NavigationOption, { media: (0, oe.jsx)(Ju.Plus, {}), title: t || f(_e.addItemTitle), showMediaAtAllSizes: true, onClick: () => g() }), a && (0, oe.jsx)(Ye.InlineAlert, { type: "negative", children: a })] }), (0, oe.jsx)(Ye.Modal, { open: u !== null, title: (u === "add" ? t : n) || f(_e.addItemTitle), body: (0, oe.jsxs)(oe.Fragment, { children: [(0, oe.jsx)("div", { className: "m-b-2", children: r }), (0, oe.jsxs)("div", { children: [(0, oe.jsx)(Ye.Button, { priority: "primary", block: true, className: "m-b-2", onClick: () => S(), children: f(_e.addItem) }), (0, oe.jsx)(Ye.Button, { priority: "secondary", type: "negative", block: true, onClick: () => b(), children: f(_e.removeItem) })] })] }), onClose: () => w() })] });
3619
3619
  }
3620
- function yF({ item: e, onClick: t }) {
3620
+ function fF({ item: e, onClick: t }) {
3621
3621
  return (0, oe.jsx)(Ye.NavigationOption, { media: (0, oe.jsx)(er, s({}, e)), title: e.title, content: e.description, showMediaAtAllSizes: true, onClick: t });
3622
3622
  }
3623
- var Zu = pF;
3623
+ var Zu = uF;
3624
3624
  var nr = require("@transferwise/components");
3625
3625
  var Qu = require("react-intl");
3626
3626
  var fe = require("react/jsx-runtime");
3627
- var fF = { canRenderType: "search", render: ({ id: e, isLoading: t, margin: o, onChange: r, query: n, state: a, title: i }) => (0, fe.jsxs)("div", { className: H(o), children: [(0, fe.jsx)(me, { id: e, description: "", error: "", help: "", label: i, children: (0, fe.jsx)(gF, { id: e, query: n, onChange: r }) }), t ? (0, fe.jsx)(fe.Fragment, { children: "Loading..." }) : (0, fe.jsx)(hF, { state: a, onChange: r })] }) };
3628
- function hF({ state: e, onChange: t }) {
3627
+ var hF = { canRenderType: "search", render: ({ id: e, isLoading: t, margin: o, onChange: r, query: n, state: a, title: i }) => (0, fe.jsxs)("div", { className: H(o), children: [(0, fe.jsx)(me, { id: e, description: "", error: "", help: "", label: i, children: (0, fe.jsx)(CF, { id: e, query: n, onChange: r }) }), t ? (0, fe.jsx)(fe.Fragment, { children: "Loading..." }) : (0, fe.jsx)(gF, { state: a, onChange: r })] }) };
3628
+ function gF({ state: e, onChange: t }) {
3629
3629
  switch (e.type) {
3630
3630
  case "error":
3631
- return (0, fe.jsx)(CF, { state: e });
3631
+ return (0, fe.jsx)(SF, { state: e });
3632
3632
  case "results":
3633
- return (0, fe.jsx)(bF, { state: e, onChange: t });
3633
+ return (0, fe.jsx)(wF, { state: e, onChange: t });
3634
3634
  case "noResults":
3635
- return (0, fe.jsx)(SF, { state: e });
3635
+ return (0, fe.jsx)(bF, { state: e });
3636
3636
  case "pending":
3637
3637
  default:
3638
3638
  return null;
3639
3639
  }
3640
3640
  }
3641
- function gF({ id: e, query: t, onChange: o }) {
3641
+ function CF({ id: e, query: t, onChange: o }) {
3642
3642
  return (0, fe.jsx)(nr.Input, { id: e, name: e, type: "text", value: t, className: "m-t-1", onChange: ({ currentTarget: { value: r } }) => o(r) });
3643
3643
  }
3644
- function CF({ state: e }) {
3644
+ function SF({ state: e }) {
3645
3645
  let t = (0, Qu.useIntl)();
3646
- return (0, fe.jsxs)("p", { className: "m-t-2", children: [t.formatMessage(ve.genericError), "\xA0", (0, fe.jsx)("button", { type: "submit", onClick: (o) => {
3646
+ return (0, fe.jsxs)("p", { className: "m-t-2", children: [t.formatMessage(xe.genericError), "\xA0", (0, fe.jsx)("button", { type: "submit", onClick: (o) => {
3647
3647
  o.preventDefault(), e.onRetry();
3648
- }, children: t.formatMessage(ve.retry) })] });
3648
+ }, children: t.formatMessage(xe.retry) })] });
3649
3649
  }
3650
- function SF({ state: e }) {
3650
+ function bF({ state: e }) {
3651
3651
  return (0, fe.jsx)("p", { className: "m-t-2", children: e.message });
3652
3652
  }
3653
- function bF({ state: e }) {
3653
+ function wF({ state: e }) {
3654
3654
  return (0, fe.jsx)(nr.NavigationOptionsList, { children: e.results.map((t) => (0, fe.jsx)(nr.NavigationOption, { title: t.title, content: t.description, media: (0, fe.jsx)(er, s({}, t)), showMediaCircle: false, showMediaAtAllSizes: true, onClick: () => t.onClick() }, JSON.stringify(t))) });
3655
3655
  }
3656
- var ey = fF;
3656
+ var ey = hF;
3657
3657
  var ty = require("@transferwise/components");
3658
3658
  var ar = require("@transferwise/components");
3659
3659
  var Zr = require("react/jsx-runtime");
@@ -3666,15 +3666,19 @@ var require_main_min = __commonJS({
3666
3666
  return (0, Nt.jsxs)(Nt.Fragment, { children: [(0, Nt.jsx)(me, { id: t, label: m, help: i, description: r, error: a, children: (0, Nt.jsx)("span", { children: (0, Nt.jsx)(ty.RadioGroup, { name: t, radios: l.map((y, f) => ({ label: y.title, value: String(f), secondary: y.description, disabled: y.disabled || n, avatar: (0, Nt.jsx)(Pa, { icon: y.icon, image: y.image }) })), selectedValue: String(c), onChange: p }) }) }), o] });
3667
3667
  }
3668
3668
  var ry = require("@transferwise/components");
3669
+ var ny = require("react");
3669
3670
  var Bt = require("react/jsx-runtime");
3670
- function ny(e) {
3671
+ function ay(e) {
3671
3672
  let { id: t, children: o, description: r, disabled: n, error: a, help: i, label: m, options: l, selectedIndex: c, onSelect: p } = e;
3672
- return (0, Bt.jsxs)(Bt.Fragment, { children: [(0, Bt.jsx)(me, { id: t, label: m, help: i, description: r, error: a, children: (0, Bt.jsx)(ry.Tabs, { name: t, selected: c != null ? c : 0, tabs: l.map((y) => ({ title: y.title, content: (0, Bt.jsx)(Bt.Fragment, {}), disabled: y.disabled || n })), onTabSelect: p }) }), o] });
3673
+ return (0, ny.useEffect)(() => {
3674
+ FF(c, l.length) || p(0);
3675
+ }, [c, p, l.length]), (0, Bt.jsxs)(Bt.Fragment, { children: [(0, Bt.jsx)(me, { id: t, label: m, help: i, description: r, error: a, children: (0, Bt.jsx)(ry.Tabs, { name: t, selected: c != null ? c : 0, tabs: l.map((y) => ({ title: y.title, content: (0, Bt.jsx)(Bt.Fragment, {}), disabled: y.disabled || n })), onTabSelect: p }) }), o] });
3673
3676
  }
3677
+ var FF = (e, t) => e !== null && e >= 0 && e < t;
3674
3678
  var Aa = require("@transferwise/components");
3675
3679
  var ir = require("@transferwise/components");
3676
3680
  var Ia = require("react/jsx-runtime");
3677
- function ay({ icon: e, image: t }) {
3681
+ function iy({ icon: e, image: t }) {
3678
3682
  return t != null && t.url ? null : e && "name" in e ? (0, Ia.jsx)(ir.Avatar, { type: ir.AvatarType.ICON, size: 24, children: (0, Ia.jsx)(eo, { name: e.name }) }) : e && "text" in e ? (0, Ia.jsx)(ir.Avatar, { type: ir.AvatarType.ICON, size: 24, children: e.text }) : null;
3679
3683
  }
3680
3684
  var Pt = require("react/jsx-runtime");
@@ -3687,42 +3691,42 @@ var require_main_min = __commonJS({
3687
3691
  let h = d >= 0 ? l[d] : null;
3688
3692
  if (h === null)
3689
3693
  return null;
3690
- let S = g ? { title: h.title, note: h.description, icon: (0, Pt.jsx)(ay, { icon: h.icon, image: h.image }) } : { title: h.title, description: h.description, icon: (0, Pt.jsx)(Pa, { icon: h.icon, image: h.image }) };
3694
+ let S = g ? { title: h.title, note: h.description, icon: (0, Pt.jsx)(iy, { icon: h.icon, image: h.image }) } : { title: h.title, description: h.description, icon: (0, Pt.jsx)(Pa, { icon: h.icon, image: h.image }) };
3691
3695
  return (0, Pt.jsx)(Aa.SelectInputOptionContent, s({}, S));
3692
3696
  }, filterable: f.length >= 8, onChange: y, onClear: () => y(null) }) }), o] });
3693
3697
  }
3694
3698
  var Qr = require("react/jsx-runtime");
3695
- var wF = { canRenderType: "input-select", render: (e) => {
3699
+ var xF = { canRenderType: "input-select", render: (e) => {
3696
3700
  switch (e.control) {
3697
3701
  case "radio":
3698
3702
  return (0, Qr.jsx)(oy, s({}, e));
3699
3703
  case "tab":
3700
- return e.options.length > 3 ? (0, Qr.jsx)(qs, s({}, e)) : (0, Qr.jsx)(ny, s({}, e));
3704
+ return e.options.length > 3 ? (0, Qr.jsx)(qs, s({}, e)) : (0, Qr.jsx)(ay, s({}, e));
3701
3705
  case "select":
3702
3706
  default:
3703
3707
  return (0, Qr.jsx)(qs, s({}, e));
3704
3708
  }
3705
3709
  } };
3706
- var iy = wF;
3710
+ var sy = xF;
3707
3711
  var Ma = require("@transferwise/components");
3708
3712
  var sr = require("react/jsx-runtime");
3709
- var FF = { canRenderType: "status-list", render: ({ margin: e, items: t, title: o }) => (0, sr.jsxs)("div", { className: H(e), children: [o ? (0, sr.jsx)(Ma.Header, { title: o }) : null, t.map(({ description: r, icon: n, status: a, title: i }) => (0, sr.jsx)(Ma.Summary, { title: i, description: r, icon: n && "name" in n ? (0, sr.jsx)(eo, { name: n.name }) : null, status: xF(a) }, `${o}/${r || ""}`))] }) };
3710
- var sy = FF;
3711
- var xF = (e) => e === "not-done" ? "notDone" : e;
3713
+ var vF = { canRenderType: "status-list", render: ({ margin: e, items: t, title: o }) => (0, sr.jsxs)("div", { className: H(e), children: [o ? (0, sr.jsx)(Ma.Header, { title: o }) : null, t.map(({ description: r, icon: n, status: a, title: i }) => (0, sr.jsx)(Ma.Summary, { title: i, description: r, icon: n && "name" in n ? (0, sr.jsx)(eo, { name: n.name }) : null, status: PF(a) }, `${o}/${r || ""}`))] }) };
3714
+ var my = vF;
3715
+ var PF = (e) => e === "not-done" ? "notDone" : e;
3712
3716
  var Ze = require("@transferwise/components");
3713
3717
  var Le = require("react/jsx-runtime");
3714
- function vF({ control: e, inputProps: t }) {
3718
+ function IF({ control: e, inputProps: t }) {
3715
3719
  switch (e) {
3716
3720
  case "password":
3717
3721
  return (0, Le.jsx)($s, s({ type: "password" }, t));
3718
3722
  case "email":
3719
3723
  return (0, Le.jsx)($s, s({ type: "email" }, t));
3720
3724
  case "textarea":
3721
- return (0, Le.jsx)(PF, s({}, t));
3725
+ return (0, Le.jsx)(AF, s({}, t));
3722
3726
  case "numeric":
3723
- return (0, Le.jsx)(IF, s({ type: "number" }, t));
3727
+ return (0, Le.jsx)(MF, s({ type: "number" }, t));
3724
3728
  case "phone-number":
3725
- return (0, Le.jsx)(AF, s({}, t));
3729
+ return (0, Le.jsx)(RF, s({}, t));
3726
3730
  default:
3727
3731
  return (0, Le.jsx)($s, s({ type: "text" }, t));
3728
3732
  }
@@ -3735,30 +3739,30 @@ var require_main_min = __commonJS({
3735
3739
  }
3736
3740
  return (0, Le.jsx)(Ze.Input, s({ id: e, name: e, onChange: (i) => o(i.target.value) }, r));
3737
3741
  }
3738
- function PF(n) {
3742
+ function AF(n) {
3739
3743
  var a = n, { id: e, displayFormat: t, onChange: o } = a, r = E(a, ["id", "displayFormat", "onChange"]);
3740
3744
  let i = s({ id: e, name: e }, r);
3741
3745
  return typeof t == "string" ? (0, Le.jsx)(Ze.TextareaWithDisplayFormat, s({ displayPattern: t, onChange: (m) => o(m) }, i)) : (0, Le.jsx)(Ze.TextArea, s({ onChange: (m) => o(m.target.value) }, i));
3742
3746
  }
3743
- function IF(n) {
3747
+ function MF(n) {
3744
3748
  var a = n, { id: e, displayFormat: t, onChange: o } = a, r = E(a, ["id", "displayFormat", "onChange"]);
3745
3749
  let i = s({ id: e, name: e, onWheel: tr }, r);
3746
3750
  return typeof t == "string" ? (0, Le.jsx)(Ze.InputWithDisplayFormat, s({ displayPattern: t, onChange: (m) => o(Ls(m)) }, i)) : (0, Le.jsx)(Ze.Input, s({ onChange: ({ target: { value: m } }) => o(Ls(m)) }, i));
3747
3751
  }
3748
- function AF(o) {
3752
+ function RF(o) {
3749
3753
  var r = o, { value: e } = r, t = E(r, ["value"]);
3750
3754
  return (0, Le.jsx)(Ze.PhoneNumberInput, s({ initialValue: e }, t));
3751
3755
  }
3752
- var my = vF;
3756
+ var ly = IF;
3753
3757
  var Gs = require("react/jsx-runtime");
3754
- var MF = { canRenderType: "input-text", render: (e) => {
3758
+ var kF = { canRenderType: "input-text", render: (e) => {
3755
3759
  let f = e, { id: t, control: o, label: r, description: n, help: a, error: i, type: m, value: l } = f, c = E(f, ["id", "control", "label", "description", "help", "error", "type", "value"]), p = l != null ? l : "", y = C(s({}, c), { value: p, id: t });
3756
- return (0, Gs.jsx)(me, { id: t, label: r, description: n, error: i, help: a, children: (0, Gs.jsx)(my, { control: o, inputProps: y }) });
3760
+ return (0, Gs.jsx)(me, { id: t, label: r, description: n, error: i, help: a, children: (0, Gs.jsx)(ly, { control: o, inputProps: y }) });
3757
3761
  } };
3758
- var ly = MF;
3762
+ var cy = kF;
3759
3763
  var Ra = require("@transferwise/components");
3760
3764
  var en = require("react/jsx-runtime");
3761
- var cy = { canRenderType: "input-upload", render: (e) => {
3765
+ var dy = { canRenderType: "input-upload", render: (e) => {
3762
3766
  let { id: t, accepts: o, error: r, label: n, description: a, disabled: i, maxSize: m, onUpload: l } = e, c = async (y) => {
3763
3767
  let f = y.get("file");
3764
3768
  return l(f).then(() => ({ id: xa() }));
@@ -3767,7 +3771,7 @@ var require_main_min = __commonJS({
3767
3771
  };
3768
3772
  return (0, en.jsx)(wa, { id: t, label: void 0, description: void 0, error: r, children: (0, en.jsx)(Ra.UploadInput, { id: t, description: a, disabled: i, fileTypes: Yr(o), sizeLimit: m ? Fa(m) : void 0, uploadButtonTitle: n, onDeleteFile: p, onUploadFile: c }) });
3769
3773
  } };
3770
- var dy = { canRenderType: "input-upload", canRender: (e) => e.control === "upload-large", render: (e) => {
3774
+ var py = { canRenderType: "input-upload", canRender: (e) => e.control === "upload-large", render: (e) => {
3771
3775
  let g = e, { id: t, accepts: o, control: r, label: n, description: a, disabled: i, error: m, help: l, maxSize: c, type: p, onUpload: y } = g, f = E(g, ["id", "accepts", "control", "label", "description", "disabled", "error", "help", "maxSize", "type", "onUpload"]), u = C(s({}, f), { id: t, name: t }), d = async (h, S) => {
3772
3776
  try {
3773
3777
  let b = h ? await Vu(h, S) : null;
@@ -3780,28 +3784,28 @@ var require_main_min = __commonJS({
3780
3784
  } };
3781
3785
  var ka = require("@transferwise/components");
3782
3786
  var $e = require("react/jsx-runtime");
3783
- var RF = { canRenderType: "review", render: ({ callToAction: e, control: t, fields: o, margin: r, title: n }) => {
3787
+ var OF = { canRenderType: "review", render: ({ callToAction: e, control: t, fields: o, margin: r, title: n }) => {
3784
3788
  let a = t === "horizontal" ? "HORIZONTAL_RIGHT_ALIGNED" : "VERTICAL_ONE_COLUMN", i = e ? { text: e.title, onClick: (m) => {
3785
3789
  m.preventDefault(), e.onClick();
3786
3790
  } } : void 0;
3787
- return (0, $e.jsxs)("div", { className: H(r), children: [(n || e) && (0, $e.jsx)(ka.Header, { title: n != null ? n : "", action: i }), (0, $e.jsx)("div", { className: r, children: (0, $e.jsx)(ka.DefinitionList, { layout: a, definitions: o.map(({ label: m, value: l, help: c }, p) => ({ key: String(p), title: m, value: kF(l, c, a) })) }) })] });
3791
+ return (0, $e.jsxs)("div", { className: H(r), children: [(n || e) && (0, $e.jsx)(ka.Header, { title: n != null ? n : "", action: i }), (0, $e.jsx)("div", { className: r, children: (0, $e.jsx)(ka.DefinitionList, { layout: a, definitions: o.map(({ label: m, value: l, help: c }, p) => ({ key: String(p), title: m, value: EF(l, c, a) })) }) })] });
3788
3792
  } };
3789
- var py = RF;
3790
- var kF = (e, t, o) => t ? o === "HORIZONTAL_RIGHT_ALIGNED" ? (0, $e.jsxs)($e.Fragment, { children: [(0, $e.jsx)(Gr, { help: t }), " ", e] }) : (0, $e.jsxs)($e.Fragment, { children: [e, " ", (0, $e.jsx)(Gr, { help: t })] }) : e;
3791
- var uy = () => [zp, _p, Kp, Qp, ou, iu, uu, yu, hu, Su, wu, xu, vu, Iu, dy, Mu, Ou, Lu, Uu, ju, _u, Zu, py, ey, iy, sy, ly, cy];
3793
+ var uy = OF;
3794
+ var EF = (e, t, o) => t ? o === "HORIZONTAL_RIGHT_ALIGNED" ? (0, $e.jsxs)($e.Fragment, { children: [(0, $e.jsx)(Gr, { help: t }), " ", e] }) : (0, $e.jsxs)($e.Fragment, { children: [e, " ", (0, $e.jsx)(Gr, { help: t })] }) : e;
3795
+ var yy = () => [zp, _p, Kp, Qp, ou, iu, uu, yu, hu, Su, wu, xu, vu, Iu, py, Mu, Ou, Lu, Uu, ju, _u, Zu, uy, ey, sy, my, cy, dy];
3792
3796
  var he = require("react");
3793
- var Qh = require("react-intl");
3794
- var yy = ({ flowId: e, stepId: t, analytics: o, onEvent: r }) => {
3797
+ var eg = require("react-intl");
3798
+ var fy = ({ flowId: e, stepId: t, analytics: o, onEvent: r }) => {
3795
3799
  let n = s(s({ flowId: e }, t ? { stepId: t } : {}), o != null ? o : {});
3796
3800
  return (a, i = {}) => {
3797
3801
  try {
3798
- r == null || r(`${OF}${a}`, s(s({}, n), i));
3802
+ r == null || r(`${LF}${a}`, s(s({}, n), i));
3799
3803
  } catch (m) {
3800
3804
  }
3801
3805
  };
3802
3806
  };
3803
- var OF = "Dynamic Flow - ";
3804
- var fy = (e) => (t, o, r = {}) => {
3807
+ var LF = "Dynamic Flow - ";
3808
+ var hy = (e) => (t, o, r = {}) => {
3805
3809
  try {
3806
3810
  e == null || e(t, o, r);
3807
3811
  } catch (n) {
@@ -3812,18 +3816,18 @@ var require_main_min = __commonJS({
3812
3816
  var Ws = (e) => Oe(e) && Math.floor(e) === e;
3813
3817
  var Oa = (e) => typeof e == "boolean";
3814
3818
  var Q = (e) => !le(e) && (e == null ? void 0 : e.constructor) === Object;
3815
- var be = (e) => Array.isArray(e);
3816
- var EF = (e) => e === null;
3817
- var LF = (e) => typeof e == "undefined";
3818
- var le = (e) => EF(e) || LF(e);
3819
+ var ve = (e) => Array.isArray(e);
3820
+ var TF = (e) => e === null;
3821
+ var DF = (e) => typeof e == "undefined";
3822
+ var le = (e) => TF(e) || DF(e);
3819
3823
  var mr = (e) => e instanceof File;
3820
- var hy = (e) => {
3821
- if (!TF(e))
3824
+ var gy = (e) => {
3825
+ if (!VF(e))
3822
3826
  throw new Error("Incorrect type of response from fetch. Expected object of type Response.");
3823
3827
  if (e.bodyUsed)
3824
3828
  throw new Error("The body of the provided Response object has already been used. Every request must respond with a new Response object.");
3825
3829
  };
3826
- var TF = (e) => typeof e == "object" && e !== null && "clone" in e && "bodyUsed" in e;
3830
+ var VF = (e) => typeof e == "object" && e !== null && "clone" in e && "bodyUsed" in e;
3827
3831
  var to = async (e) => {
3828
3832
  try {
3829
3833
  return await e.json();
@@ -3831,7 +3835,7 @@ var require_main_min = __commonJS({
3831
3835
  return null;
3832
3836
  }
3833
3837
  };
3834
- function gy(e) {
3838
+ function Cy(e) {
3835
3839
  if (!Q(e) || !Q(e.action))
3836
3840
  throw new Error("Incorrect response body in action response. Expected an object satisfying the type { action: Action }.");
3837
3841
  }
@@ -3860,46 +3864,46 @@ var require_main_min = __commonJS({
3860
3864
  }
3861
3865
  };
3862
3866
  var La = (e) => "getChildren" in e && typeof e.getChildren == "function";
3863
- var Cy = (e) => Object.hasOwnProperty.call(e, "startComponents") && Object.hasOwnProperty.call(e, "endComponents");
3864
- var Sy = (e) => "hidden" in e && e.hidden;
3865
- var by = (e) => Object.hasOwnProperty.call(e, "editableComponent");
3866
- var oo = (e) => e != null && typeof e == "object" && !Array.isArray(e);
3867
+ var Sy = (e) => Object.hasOwnProperty.call(e, "startComponents") && Object.hasOwnProperty.call(e, "endComponents");
3868
+ var by = (e) => "hidden" in e && e.hidden;
3869
+ var wy = (e) => Object.hasOwnProperty.call(e, "editableComponent");
3870
+ var wo = (e) => e != null && typeof e == "object" && !Array.isArray(e);
3867
3871
  var tn = (e) => e != null && typeof e == "object" && !Array.isArray(e);
3868
- var wy = (e) => Array.isArray(e);
3869
- var Fy = (e) => "allOf" in e && !le(e.allOf);
3870
- var xy = (e) => "type" in e && e.type === "boolean";
3872
+ var Fy = (e) => Array.isArray(e);
3873
+ var xy = (e) => "allOf" in e && !le(e.allOf);
3874
+ var vy = (e) => "type" in e && e.type === "boolean";
3871
3875
  var cr = (e) => "type" in e && e.type === "blob";
3872
- var vy = (e) => "const" in e && e.const !== void 0;
3873
- var Py = (e) => "type" in e && e.type === "integer";
3874
- var Iy = (e) => "type" in e && e.type === "number";
3875
- var Ay = (e) => "type" in e && e.type === "object";
3876
- var My = (e) => "oneOf" in e && !le(e.oneOf);
3877
- var Ry = (e) => "items" in e && !le(e.items);
3878
- var Ks = (e) => "items" in e && Q(e.items) && !be(e.items);
3876
+ var Py = (e) => "const" in e && e.const !== void 0;
3877
+ var Iy = (e) => "type" in e && e.type === "integer";
3878
+ var Ay = (e) => "type" in e && e.type === "number";
3879
+ var My = (e) => "type" in e && e.type === "object";
3880
+ var Ry = (e) => "oneOf" in e && !le(e.oneOf);
3881
+ var ky = (e) => "items" in e && !le(e.items);
3882
+ var Ks = (e) => "items" in e && Q(e.items) && !ve(e.items);
3879
3883
  var Js = (e) => "type" in e && e.type === "string";
3880
3884
  var dr = (e) => Js(e) && e.format === "base64url";
3881
3885
  var pr = (e) => "persistAsync" in e && !le(e.persistAsync);
3882
3886
  var Te = async (e) => Promise.all(e.map(async (t) => t.getSubmittableValue())).then((t) => t.reduce((o, r) => ur(o, r), null));
3883
- var De = (e) => e.map((t) => t.getLocalValue()).reduce((t, o) => DF(t, o), null);
3884
- var DF = (e, t) => e === null ? t : t === null ? e : oo(e) && oo(t) ? s(s({}, e), t) : t;
3887
+ var De = (e) => e.map((t) => t.getLocalValue()).reduce((t, o) => NF(t, o), null);
3888
+ var NF = (e, t) => e === null ? t : t === null ? e : wo(e) && wo(t) ? s(s({}, e), t) : t;
3885
3889
  var ur = (e, t) => e === null ? t : t === null ? e : tn(e) && tn(t) ? s(s({}, e), t) : t;
3886
- var VF = ["step", "action", "exit"];
3887
- var ky = async (e) => {
3890
+ var BF = ["step", "action", "exit"];
3891
+ var Oy = async (e) => {
3888
3892
  var o, r;
3889
- if (hy(e), (o = e.headers) != null && o.has("X-Df-Response-Type")) {
3893
+ if (gy(e), (o = e.headers) != null && o.has("X-Df-Response-Type")) {
3890
3894
  let n = e.headers.get("X-Df-Response-Type");
3891
- return NF(n), n;
3895
+ return UF(n), n;
3892
3896
  }
3893
3897
  if ((r = e.headers) != null && r.has("X-Df-Exit"))
3894
3898
  return "exit";
3895
3899
  let t = await to(e.clone());
3896
3900
  return Q(t) && t.action ? "action" : "step";
3897
3901
  };
3898
- function NF(e) {
3899
- if (!VF.includes(e))
3902
+ function UF(e) {
3903
+ if (!BF.includes(e))
3900
3904
  throw new Error("Unsupported X-Df-Response-Type. Allowed values are 'step', 'action', 'exit', 'error'.");
3901
3905
  }
3902
- var Oy = async (e) => {
3906
+ var Ey = async (e) => {
3903
3907
  let { httpClient: t, trackEvent: o } = e, r = async (a, i, m) => {
3904
3908
  let { exit: l, url: c, method: p = "POST", result: y = null, id: f } = a, u = m ? () => {
3905
3909
  } : o;
@@ -3909,7 +3913,7 @@ var require_main_min = __commonJS({
3909
3913
  let d = await t(c != null ? c : "", { method: p, body: p === "GET" ? void 0 : JSON.stringify(i), headers: { "Content-Type": "application/json" } });
3910
3914
  if (!d.ok)
3911
3915
  return await n(d, f);
3912
- let g = await ky(d), h = await to(d);
3916
+ let g = await Oy(d), h = await to(d);
3913
3917
  if (l)
3914
3918
  return { type: "complete", result: ur(y, h) };
3915
3919
  switch (g) {
@@ -3920,7 +3924,7 @@ var require_main_min = __commonJS({
3920
3924
  case "exit":
3921
3925
  return u("Action Succeeded", { actionId: f }), { type: "complete", result: ur(y, h) };
3922
3926
  case "action":
3923
- return gy(h), u("Action Succeeded", { actionId: f }), await r(h.action, null, false);
3927
+ return Cy(h), u("Action Succeeded", { actionId: f }), await r(h.action, null, false);
3924
3928
  default:
3925
3929
  throw new Error(`Unsupported response type: ${String(g)}`);
3926
3930
  }
@@ -3940,31 +3944,31 @@ var require_main_min = __commonJS({
3940
3944
  return r(e.action, e.model, e.isInitial);
3941
3945
  };
3942
3946
  var Ta = require("react/jsx-runtime");
3943
- var Ey = { canRenderType: "container", render: ({ children: e }) => (0, Ta.jsx)(Ta.Fragment, { children: e }) };
3944
- var Ly = require("react");
3945
- var Dy = require("react/jsx-runtime");
3946
- var Ty = { canRenderType: "step", render: BF };
3947
- function BF({ children: e, loadingState: t }) {
3948
- let o = (0, Ly.useMemo)(() => ({ loadingState: t }), [t]);
3949
- return (0, Dy.jsx)(Xp, { value: o, children: e });
3947
+ var Ly = { canRenderType: "container", render: ({ children: e }) => (0, Ta.jsx)(Ta.Fragment, { children: e }) };
3948
+ var Ty = require("react");
3949
+ var Vy = require("react/jsx-runtime");
3950
+ var Dy = { canRenderType: "step", render: zF };
3951
+ function zF({ children: e, loadingState: t }) {
3952
+ let o = (0, Ty.useMemo)(() => ({ loadingState: t }), [t]);
3953
+ return (0, Vy.jsx)(Xp, { value: o, children: e });
3950
3954
  }
3951
3955
  var tt = require("react");
3952
- var we = (e) => e.reduce((t, o) => o.validate() && t, true);
3956
+ var be = (e) => e.reduce((t, o) => o.validate() && t, true);
3953
3957
  var Ie = (e) => (t) => e.map((o) => o(t)).filter(K);
3954
- var Vy = (e) => (t) => {
3958
+ var Ny = (e) => (t) => {
3955
3959
  let { summary: o, icon: r, image: n } = e, a = K(t) ? t : null;
3956
- return By(o, { value: a, icon: r, image: n });
3960
+ return Uy(o, { value: a, icon: r, image: n });
3957
3961
  };
3958
- var Ny = (e, t) => {
3962
+ var By = (e, t) => {
3959
3963
  let { summary: o, icon: r, image: n } = e, a = K(t) ? t : null;
3960
- return By(o, { value: a, icon: r, image: n });
3964
+ return Uy(o, { value: a, icon: r, image: n });
3961
3965
  };
3962
3966
  var Ae = (e) => e.reduce((t, o) => Xs(t, o.getSummary()), {});
3963
3967
  var Xs = (e, t) => {
3964
3968
  var o, r, n, a;
3965
3969
  return { title: (o = e.title) != null ? o : t.title, description: (r = e.description) != null ? r : t.description, icon: (n = e.icon) != null ? n : t.icon, image: (a = e.image) != null ? a : t.image };
3966
3970
  };
3967
- var By = (e, { value: t, icon: o, image: r }) => e ? { title: e.providesTitle && t || void 0, description: e.providesDescription && t || void 0, icon: e.providesIcon && o || void 0, image: e.providesImage && r || void 0 } : {};
3971
+ var Uy = (e, { value: t, icon: o, image: r }) => e ? { title: e.providesTitle && t || void 0, description: e.providesDescription && t || void 0, icon: e.providesIcon && o || void 0, image: e.providesImage && r || void 0 } : {};
3968
3972
  var Ys = (e) => C(s({}, e), { type: "step", getChildren() {
3969
3973
  return this.components;
3970
3974
  }, async getSubmittableValue() {
@@ -3974,10 +3978,10 @@ var require_main_min = __commonJS({
3974
3978
  }, getLocalValue() {
3975
3979
  return De(this.components);
3976
3980
  }, validate() {
3977
- return we(this.getChildren());
3981
+ return be(this.getChildren());
3978
3982
  } });
3979
- var Uy = () => Ys({ uid: "", loadingState: "idle", components: [] });
3980
- var zy = (e) => C(s({ type: "alert" }, e), { getSubmittableValue: async () => null, getLocalValue: () => null, getSummary: () => ({}), validate: () => true });
3983
+ var zy = () => Ys({ uid: "", loadingState: "idle", components: [] });
3984
+ var jy = (e) => C(s({ type: "alert" }, e), { getSubmittableValue: async () => null, getLocalValue: () => null, getSummary: () => ({}), validate: () => true });
3981
3985
  var yr = (e) => {
3982
3986
  switch (e) {
3983
3987
  case "success":
@@ -3991,7 +3995,7 @@ var require_main_min = __commonJS({
3991
3995
  return e;
3992
3996
  }
3993
3997
  };
3994
- var qy = (e) => {
3998
+ var $y = (e) => {
3995
3999
  switch (e) {
3996
4000
  case "left":
3997
4001
  return "start";
@@ -4001,7 +4005,7 @@ var require_main_min = __commonJS({
4001
4005
  return e;
4002
4006
  }
4003
4007
  };
4004
- var ro = (e) => {
4008
+ var oo = (e) => {
4005
4009
  switch (e) {
4006
4010
  case "left":
4007
4011
  return "start";
@@ -4011,14 +4015,14 @@ var require_main_min = __commonJS({
4011
4015
  return e;
4012
4016
  }
4013
4017
  };
4014
- var jy = { positive: "positive", negative: "negative", primary: "neutral", secondary: "neutral", link: "neutral" };
4015
- var $y = (e) => e && e in jy ? jy[e] : "neutral";
4016
- var Hy = { primary: "primary", secondary: "secondary", link: "tertiary", positive: "primary", negative: "primary" };
4017
- var Gy = (e) => e && e in Hy ? Hy[e] : "secondary";
4018
- var fr = (e, { control: t, markdown: o, margin: r = "md", context: n = "neutral" }) => zy({ uid: e, control: t, markdown: o, margin: r, context: yr(n) });
4019
- var Wy = (e) => C(s({ type: "heading" }, e), { getSubmittableValue: async () => null, getSummary: () => ({}), getLocalValue: () => null, validate: () => true });
4020
- var Da = (e, { align: t = "left", margin: o = "md", size: r = "md", control: n, text: a }) => Wy({ uid: e, align: ro(t), control: n, margin: o, size: r, text: a });
4021
- var _y = (e) => C(s({}, e), { type: "box", getChildren() {
4018
+ var Hy = { positive: "positive", negative: "negative", primary: "neutral", secondary: "neutral", link: "neutral" };
4019
+ var Gy = (e) => e && e in Hy ? Hy[e] : "neutral";
4020
+ var qy = { primary: "primary", secondary: "secondary", link: "tertiary", positive: "primary", negative: "primary" };
4021
+ var Wy = (e) => e && e in qy ? qy[e] : "secondary";
4022
+ var fr = (e, { control: t, markdown: o, margin: r = "md", context: n = "neutral" }) => jy({ uid: e, control: t, markdown: o, margin: r, context: yr(n) });
4023
+ var _y = (e) => C(s({ type: "heading" }, e), { getSubmittableValue: async () => null, getSummary: () => ({}), getLocalValue: () => null, validate: () => true });
4024
+ var Da = (e, { align: t = "left", margin: o = "md", size: r = "md", control: n, text: a }) => _y({ uid: e, align: oo(t), control: n, margin: o, size: r, text: a });
4025
+ var Ky = (e) => C(s({}, e), { type: "box", getChildren() {
4022
4026
  return this.components;
4023
4027
  }, async getSubmittableValue() {
4024
4028
  return Te(this.components);
@@ -4027,24 +4031,33 @@ var require_main_min = __commonJS({
4027
4031
  }, getLocalValue() {
4028
4032
  return De(this.components);
4029
4033
  }, validate() {
4030
- return we(this.getChildren());
4031
- } });
4032
- var Ky = (e, { border: t = false, components: o, control: r, margin: n = "md", width: a = "xl" }, i) => _y({ uid: e, border: t, control: r, margin: n, width: a, components: o.map((m, l) => Ut(`${e}.box-${l}`, m, i)) });
4033
- var Jy = (e) => C(s({ type: "button" }, e), { getSubmittableValue: async () => null, getLocalValue: () => null, getSummary: () => ({}), validate: () => true });
4034
- var Xy = (e, { action: t, context: o, control: r, disabled: n, margin: a = "md", pinOrder: i, size: m, title: l }, { onAction: c }) => Jy({ uid: e, context: HF({ context: o, action: t }), control: jF({ control: r, action: t }), disabled: zF({ disabled: n, action: t }), margin: a, pinOrder: i, size: m, title: UF({ title: l, action: t }), onClick: () => {
4035
- c(t);
4034
+ return be(this.getChildren());
4036
4035
  } });
4037
- var UF = ({ title: e, action: t }) => {
4036
+ var Jy = (e, { border: t = false, components: o, control: r, margin: n = "md", width: a = "xl" }, i) => Ky({ uid: e, border: t, control: r, margin: n, width: a, components: o.map((m, l) => Ut(`${e}.box-${l}`, m, i)) });
4037
+ var Xy = (e) => C(s({ type: "button" }, e), { getSubmittableValue: async () => null, getLocalValue: () => null, getSummary: () => ({}), validate: () => true });
4038
+ var Yy = (e, { action: t, context: o, control: r, disabled: n, margin: a = "md", pinOrder: i, size: m, title: l }, { onAction: c, step: p }) => {
4039
+ let y = t != null && t.$ref ? s(s({}, GF(t.$ref, p == null ? void 0 : p.actions)), t) : t;
4040
+ return Xy({ uid: e, context: $F({ context: o, action: y }), control: qF({ control: r, action: y }), disabled: HF({ disabled: n, action: y }), margin: a, pinOrder: i, size: m, title: jF({ title: l, action: y }), onClick: () => {
4041
+ c(y);
4042
+ } });
4043
+ };
4044
+ var jF = ({ title: e, action: t }) => {
4038
4045
  var o;
4039
4046
  return (o = e != null ? e : t == null ? void 0 : t.title) != null ? o : "";
4040
4047
  };
4041
- var zF = ({ disabled: e, action: t }) => {
4048
+ var HF = ({ disabled: e, action: t }) => {
4042
4049
  var o;
4043
4050
  return (o = e != null ? e : t == null ? void 0 : t.disabled) != null ? o : false;
4044
4051
  };
4045
- var jF = ({ control: e, action: t }) => e || (t != null && t.type ? Gy(t.type) : void 0);
4046
- var HF = ({ context: e, action: t }) => e ? yr(e) : t != null && t.type ? $y(t.type) : "neutral";
4047
- var Yy = (e) => C(s({}, e), { type: "columns", getChildren() {
4052
+ var qF = ({ control: e, action: t }) => e || (t != null && t.type ? Wy(t.type) : void 0);
4053
+ var $F = ({ context: e, action: t }) => e ? yr(e) : t != null && t.type ? Gy(t.type) : "neutral";
4054
+ var GF = (e, t = []) => {
4055
+ let o = t.find((r) => r.$id === e);
4056
+ if (!o)
4057
+ throw new Error("Action reference not found in actions array.");
4058
+ return o;
4059
+ };
4060
+ var Zy = (e) => C(s({}, e), { type: "columns", getChildren() {
4048
4061
  return [...this.startComponents, ...this.endComponents];
4049
4062
  }, async getSubmittableValue() {
4050
4063
  return Te(this.getChildren());
@@ -4053,26 +4066,26 @@ var require_main_min = __commonJS({
4053
4066
  }, getLocalValue() {
4054
4067
  return De(this.getChildren());
4055
4068
  }, validate() {
4056
- return we(this.getChildren());
4069
+ return be(this.getChildren());
4057
4070
  } });
4058
- var Zy = (e, { control: t, left: o, right: r, bias: n = "none", margin: a = "md" }, i) => Yy({ uid: e, control: t, margin: a, bias: qy(n), startComponents: o.map((m, l) => Ut(`${e}.columns-start-${l}`, m, i)), endComponents: r.map((m, l) => Ut(`${e}.columns-end-${l}`, m, i)) });
4059
- var Qy = (e) => C(s({ type: "decision" }, e), { getSubmittableValue: async () => null, getLocalValue: () => null, getSummary: () => ({}), validate: () => true });
4060
- var ef = (e, { control: t, margin: o = "md", options: r }, { onAction: n }) => Qy({ uid: e, control: t, margin: o, options: r.map((m) => {
4071
+ var Qy = (e, { control: t, left: o, right: r, bias: n = "none", margin: a = "md" }, i) => Zy({ uid: e, control: t, margin: a, bias: $y(n), startComponents: o.map((m, l) => Ut(`${e}.columns-start-${l}`, m, i)), endComponents: r.map((m, l) => Ut(`${e}.columns-end-${l}`, m, i)) });
4072
+ var ef = (e) => C(s({ type: "decision" }, e), { getSubmittableValue: async () => null, getLocalValue: () => null, getSummary: () => ({}), validate: () => true });
4073
+ var tf = (e, { control: t, margin: o = "md", options: r }, { onAction: n }) => ef({ uid: e, control: t, margin: o, options: r.map((m) => {
4061
4074
  var l = m, { action: a } = l, i = E(l, ["action"]);
4062
4075
  return C(s({}, i), { onClick: () => n(a) });
4063
4076
  }) });
4064
- var tf = (e) => C(s({ type: "divider" }, e), { getSubmittableValue: async () => null, getLocalValue: () => null, getSummary: () => ({}), validate: () => true });
4065
- var of = (e, { control: t, margin: o = "md" }) => tf({ uid: e, control: t, margin: o });
4077
+ var of = (e) => C(s({ type: "divider" }, e), { getSubmittableValue: async () => null, getLocalValue: () => null, getSummary: () => ({}), validate: () => true });
4078
+ var rf = (e, { control: t, margin: o = "md" }) => of({ uid: e, control: t, margin: o });
4066
4079
  var ce = (e, t) => (o) => {
4067
4080
  t(e, (r) => {
4068
4081
  o(r);
4069
4082
  });
4070
4083
  };
4071
4084
  function Va({ value: e, signal: t, requestConfig: o }) {
4072
- let r = e instanceof File, { method: n, param: a } = o, i = r ? qF(a, e) : JSON.stringify({ [a]: e }), m = s({}, !r && { "Content-Type": "application/json" });
4085
+ let r = e instanceof File, { method: n, param: a } = o, i = r ? WF(a, e) : JSON.stringify({ [a]: e }), m = s({}, !r && { "Content-Type": "application/json" });
4073
4086
  return { method: n, headers: m, body: i, signal: t };
4074
4087
  }
4075
- var qF = (e, t) => {
4088
+ var WF = (e, t) => {
4076
4089
  let o = new FormData();
4077
4090
  return o.append(e, t), o;
4078
4091
  };
@@ -4092,14 +4105,14 @@ var require_main_min = __commonJS({
4092
4105
  if (p instanceof DOMException && p.name === "AbortError")
4093
4106
  return null;
4094
4107
  throw e((y) => {
4095
- y.errors = [p.message];
4108
+ y.errors = [p.message], y.persistedState.lastSubmitted = null;
4096
4109
  }), p;
4097
4110
  });
4098
4111
  return e((p) => {
4099
4112
  p.persistedState = { abortController: m, lastSubmitted: r, submission: c };
4100
4113
  }), c;
4101
4114
  };
4102
- var rf = (e, t) => async (o, r) => {
4115
+ var nf = (e, t) => async (o, r) => {
4103
4116
  if (le(o))
4104
4117
  throw new Error("Value must be a file or base64 string.");
4105
4118
  let n = new AbortController(), { signal: a } = n, i = t({ value: o, signal: a }).catch((m) => {
@@ -4135,7 +4148,7 @@ var require_main_min = __commonJS({
4135
4148
  c.validationState = { abortController: i, lastSubmitted: r, messages: {} };
4136
4149
  }), l;
4137
4150
  };
4138
- var nf = (e, t) => {
4151
+ var af = (e, t) => {
4139
4152
  let d = e, { uid: o, id: r, checks: n, performPersistAsync: a, performRefresh: i, performValidationAsync: m, summariser: l } = d, c = E(d, ["uid", "id", "checks", "performPersistAsync", "performRefresh", "performValidationAsync", "summariser"]), p = ce(o, t), y = Ie(n), f = (g) => {
4140
4153
  let h = y(g);
4141
4154
  return p((S) => {
@@ -4162,7 +4175,7 @@ var require_main_min = __commonJS({
4162
4175
  return u;
4163
4176
  if (a) {
4164
4177
  let g = Ve(p, a);
4165
- return C(s({}, u), { onBlur() {
4178
+ return C(s({}, u), { isPersisted: true, onBlur() {
4166
4179
  this.validate() && g(this.persistedState, this.getLocalValue()).catch(() => {
4167
4180
  });
4168
4181
  }, async getSubmittableValue() {
@@ -4203,32 +4216,32 @@ var require_main_min = __commonJS({
4203
4216
  let o = Ba(t, 1e3);
4204
4217
  return zt(e, o);
4205
4218
  };
4206
- var af = ({ maxItems: e }, t) => (o) => Oe(e) && be(o) && o.length > e ? t.maxItems(e) : null;
4207
- var sf = ({ minItems: e }, t) => (o) => Oe(e) && be(o) && o.length > 0 && o.length < e ? t.minFiles(e) : null;
4208
- var mf = ({ maxItems: e }, t) => (o) => Oe(e) && be(o) && o.length > e ? t.maxFiles(e) : null;
4209
- var lf = ({ minItems: e }, t) => (o) => Oe(e) && be(o) && o.length > 0 && o.length < e ? t.minItems(e) : null;
4210
- var cf = ({ maxLength: e }, t) => (o) => Oe(e) && K(o) && o.length > e ? t.maxLength(e) : null;
4211
- var df = ({ minLength: e }, t) => (o) => Oe(e) && K(o) && o.length < e ? t.minLength(e) : null;
4219
+ var sf = ({ maxItems: e }, t) => (o) => Oe(e) && ve(o) && o.length > e ? t.maxItems(e) : null;
4220
+ var mf = ({ minItems: e }, t) => (o) => Oe(e) && ve(o) && o.length > 0 && o.length < e ? t.minFiles(e) : null;
4221
+ var lf = ({ maxItems: e }, t) => (o) => Oe(e) && ve(o) && o.length > e ? t.maxFiles(e) : null;
4222
+ var cf = ({ minItems: e }, t) => (o) => Oe(e) && ve(o) && o.length > 0 && o.length < e ? t.minItems(e) : null;
4223
+ var df = ({ maxLength: e }, t) => (o) => Oe(e) && K(o) && o.length > e ? t.maxLength(e) : null;
4224
+ var pf = ({ minLength: e }, t) => (o) => Oe(e) && K(o) && o.length < e ? t.minLength(e) : null;
4212
4225
  var Ua = ({ maximum: e }, t) => (o) => Oe(e) && Oe(o) && o > e ? t.maximum(e) : null;
4213
4226
  var za = ({ minimum: e }, t) => (o) => Oe(e) && Oe(o) && o < e ? t.minimum(e) : null;
4214
- var pf = ({ maximum: e }, t) => (o) => K(e) && K(o) && o > e ? t.maximumDate(e) : null;
4215
- var uf = ({ minimum: e }, t) => (o) => K(e) && K(o) && o < e ? t.minimumDate(e) : null;
4216
- var yf = ({ pattern: e }, t) => (o) => K(e) && K(o) && !new RegExp(e).test(o) ? t.pattern() : null;
4217
- var Fe = (e, t) => (o) => e && (be(o) && o.length === 0 || le(o)) ? t.required() : null;
4227
+ var uf = ({ maximum: e }, t) => (o) => K(e) && K(o) && o > e ? t.maximumDate(e) : null;
4228
+ var yf = ({ minimum: e }, t) => (o) => K(e) && K(o) && o < e ? t.minimumDate(e) : null;
4229
+ var ff = ({ pattern: e }, t) => (o) => K(e) && K(o) && !new RegExp(e).test(o) ? t.pattern() : null;
4230
+ var we = (e, t) => (o) => e && (ve(o) && o.length === 0 || le(o)) ? t.required() : null;
4218
4231
  var Qe = (e) => {
4219
4232
  if (!e || e.length === 0)
4220
4233
  return "off";
4221
- let t = e.filter((o) => ff[o]);
4222
- return t.length === 0 ? "off" : t.map((o) => ff[o]).join(" ");
4234
+ let t = e.filter((o) => hf[o]);
4235
+ return t.length === 0 ? "off" : t.map((o) => hf[o]).join(" ");
4223
4236
  };
4224
- var ff = { on: "on", name: "name", "name-prefix": "honorific-prefix", "given-name": "given-name", "additional-name": "additional-name", "family-name": "family-name", "name-suffix": "honorific-suffix", nickname: "nickname", email: "email", "new-username": "username", username: "username", "new-password": "new-password", password: "current-password", "one-time-code": "one-time-code", "job-title": "organization-title", "organization-name": "organization", "full-street-address": "street-address", "street-address-line-1": "address-line1", "street-address-line-2": "address-line2", "street-address-line-3": "address-line3", "address-level-1": "address-level1", "address-level-2": "address-level2", "address-level-3": "address-level3", "address-level-4": "address-level4", "country-code": "country", "country-name": "country-name", "postal-code": "postal-code", "credit-card-name": "cc-name", "credit-card-given-name": "cc-given-name", "credit-card-middle-name": "cc-additional-name", "credit-card-family-name": "cc-family-name", "credit-card-number": "cc-number", "credit-card-expiration": "cc-exp", "credit-card-expiration-month": "cc-exp-month", "credit-card-expiration-year": "cc-exp-year", "credit-card-security-code": "cc-csc", "credit-card-type": "cc-type", "transaction-currency": "transaction-currency", "transaction-amount": "transaction-amount", language: "language", birthdate: "bday", "birthdate-day": "bday-day", "birthdate-month": "bday-month", "birthdate-year": "bday-year", gender: "sex", "phone-number": "tel", "phone-country-code": "tel-country-code", "phone-national": "tel-national", "phone-area-code": "tel-area-code", "phone-local": "tel-local", "phone-local-prefix": "tel-local-prefix", "phone-local-suffix": "tel-local-suffix", "phone-extension": "tel-extension", url: "url", photo: "photo", impp: "impp", shipping: "shipping", billing: "billing", home: "home", work: "work", mobile: "mobile", fax: "fax", pager: "pager" };
4237
+ var hf = { on: "on", name: "name", "name-prefix": "honorific-prefix", "given-name": "given-name", "additional-name": "additional-name", "family-name": "family-name", "name-suffix": "honorific-suffix", nickname: "nickname", email: "email", "new-username": "username", username: "username", "new-password": "new-password", password: "current-password", "one-time-code": "one-time-code", "job-title": "organization-title", "organization-name": "organization", "full-street-address": "street-address", "street-address-line-1": "address-line1", "street-address-line-2": "address-line2", "street-address-line-3": "address-line3", "address-level-1": "address-level1", "address-level-2": "address-level2", "address-level-3": "address-level3", "address-level-4": "address-level4", "country-code": "country", "country-name": "country-name", "postal-code": "postal-code", "credit-card-name": "cc-name", "credit-card-given-name": "cc-given-name", "credit-card-middle-name": "cc-additional-name", "credit-card-family-name": "cc-family-name", "credit-card-number": "cc-number", "credit-card-expiration": "cc-exp", "credit-card-expiration-month": "cc-exp-month", "credit-card-expiration-year": "cc-exp-year", "credit-card-security-code": "cc-csc", "credit-card-type": "cc-type", "transaction-currency": "transaction-currency", "transaction-amount": "transaction-amount", language: "language", birthdate: "bday", "birthdate-day": "bday-day", "birthdate-month": "bday-month", "birthdate-year": "bday-year", gender: "sex", "phone-number": "tel", "phone-country-code": "tel-country-code", "phone-national": "tel-national", "phone-area-code": "tel-area-code", "phone-local": "tel-local", "phone-local-prefix": "tel-local-prefix", "phone-local-suffix": "tel-local-suffix", "phone-extension": "tel-extension", url: "url", photo: "photo", impp: "impp", shipping: "shipping", billing: "billing", home: "home", work: "work", mobile: "mobile", fax: "fax", pager: "pager" };
4225
4238
  var ja = (e) => {
4226
4239
  if (!lr(e))
4227
4240
  return;
4228
4241
  let { analytics: t } = e;
4229
4242
  return Q(t) ? t : void 0;
4230
4243
  };
4231
- var hf = ({ genericErrorMessage: e, httpClient: t, persistAsyncConfig: o, schemaId: r, logEvent: n, trackEvent: a }) => {
4244
+ var gf = ({ genericErrorMessage: e, httpClient: t, persistAsyncConfig: o, schemaId: r, logEvent: n, trackEvent: a }) => {
4232
4245
  let { idProperty: i, param: m, method: l, url: c } = o, p = (y) => {
4233
4246
  let f = ja(y);
4234
4247
  a("PersistAsync Failed", s({ schemaId: r }, f));
@@ -4244,37 +4257,37 @@ var require_main_min = __commonJS({
4244
4257
  } catch (S) {
4245
4258
  throw p(), new Error(e);
4246
4259
  }
4247
- let h = d.status === 422 && Q(g) ? $F(m, g) : null;
4260
+ let h = d.status === 422 && Q(g) ? _F(m, g) : null;
4248
4261
  throw p(g), new Error(h != null ? h : e);
4249
4262
  };
4250
4263
  };
4251
- var $F = (e, t) => {
4264
+ var _F = (e, t) => {
4252
4265
  var r;
4253
4266
  let o = (r = t.validation) == null ? void 0 : r[e];
4254
4267
  return K(o) ? o : null;
4255
4268
  };
4256
4269
  var ut = (e, t) => ({ abortController: new AbortController(), lastSubmitted: le(t) ? null : e != null ? e : null, submission: Promise.resolve(t != null ? t : null) });
4257
- var xe = (e, t) => {
4258
- let { localValue: o, model: r } = e, n = GF(e, t), a = n ? ut(o, r) : ut();
4270
+ var Fe = (e, t) => {
4271
+ let { localValue: o, model: r } = e, n = KF(e, t), a = n ? ut(o, r) : ut();
4259
4272
  return { performPersistAsync: n, persistedState: a };
4260
4273
  };
4261
- var GF = (e, t) => {
4274
+ var KF = (e, t) => {
4262
4275
  let { schema: o, persistAsyncConfig: r } = e, { trackEvent: n, logEvent: a } = t;
4263
4276
  if (!r)
4264
4277
  return;
4265
- let { $id: i, analyticsId: m } = o, { getErrorMessageFunctions: l, httpClient: c } = t, p = WF(o) ? o.validationMessages : void 0, f = l(p).genericError();
4266
- return hf({ genericErrorMessage: f, httpClient: c, logEvent: a, persistAsyncConfig: r, schemaId: m != null ? m : i, trackEvent: n });
4278
+ let { $id: i, analyticsId: m } = o, { getErrorMessageFunctions: l, httpClient: c } = t, p = JF(o) ? o.validationMessages : void 0, f = l(p).genericError();
4279
+ return gf({ genericErrorMessage: f, httpClient: c, logEvent: a, persistAsyncConfig: r, schemaId: m != null ? m : i, trackEvent: n });
4267
4280
  };
4268
- var WF = (e) => !!("validationMessages" in e && e.validationMessages);
4281
+ var JF = (e) => !!("validationMessages" in e && e.validationMessages);
4269
4282
  var Z = (e) => {
4270
4283
  var f;
4271
4284
  let { uid: t, schema: o, required: r, validationErrors: n } = e, { $id: a, analyticsId: i, control: m, description: l, keywords: c, title: p, hidden: y } = o;
4272
- return s(s({ uid: t, id: a != null ? a : t, analyticsId: (f = i != null ? i : a) != null ? f : "", control: m, description: l, disabled: _F(o) ? o.disabled : false, errors: K(n) ? [n] : [], hidden: !!y, keywords: c, required: !!r, title: p, summariser: Vy(o) }, KF(o) ? { help: o.help.markdown } : {}), JF(o) ? { placeholder: o.placeholder } : {});
4285
+ return s(s({ uid: t, id: a != null ? a : t, analyticsId: (f = i != null ? i : a) != null ? f : "", control: m, description: l, disabled: XF(o) ? o.disabled : false, errors: K(n) ? [n] : [], hidden: !!y, keywords: c, required: !!r, title: p, summariser: Ny(o) }, YF(o) ? { help: o.help.markdown } : {}), ZF(o) ? { placeholder: o.placeholder } : {});
4273
4286
  };
4274
- var _F = (e) => "disabled" in e && e.disabled !== void 0;
4275
- var KF = (e) => !!("help" in e && e.help);
4276
- var JF = (e) => !!("placeholder" in e && e.placeholder);
4277
- var gf = ({ httpClient: e, validationAsyncConfig: t, schemaId: o, trackEvent: r }) => {
4287
+ var XF = (e) => "disabled" in e && e.disabled !== void 0;
4288
+ var YF = (e) => !!("help" in e && e.help);
4289
+ var ZF = (e) => !!("placeholder" in e && e.placeholder);
4290
+ var Cf = ({ httpClient: e, validationAsyncConfig: t, schemaId: o, trackEvent: r }) => {
4278
4291
  let { method: n, param: a, url: i } = t, m = (l) => {
4279
4292
  let c = ja(l);
4280
4293
  return r("ValidationAsync Failed", s({ schemaId: o }, c)), null;
@@ -4287,7 +4300,7 @@ var require_main_min = __commonJS({
4287
4300
  } catch (d) {
4288
4301
  return m();
4289
4302
  }
4290
- let f = await y.json().catch(() => null), u = XF(f);
4303
+ let f = await y.json().catch(() => null), u = QF(f);
4291
4304
  if (y.ok)
4292
4305
  return r("ValidationAsync Succeeded", { schemaId: o }), u;
4293
4306
  if (y.status === 422 && u)
@@ -4295,30 +4308,30 @@ var require_main_min = __commonJS({
4295
4308
  return m(f);
4296
4309
  };
4297
4310
  };
4298
- var XF = (e) => {
4311
+ var QF = (e) => {
4299
4312
  if (!Q(e))
4300
4313
  return null;
4301
4314
  let { message: t } = e;
4302
4315
  return K(t) ? t : null;
4303
4316
  };
4304
- var Cf = () => ({ abortController: new AbortController(), lastSubmitted: null, messages: {} });
4317
+ var Sf = () => ({ abortController: new AbortController(), lastSubmitted: null, messages: {} });
4305
4318
  var At = (e, t) => {
4306
- let o = YF(e, t), r = Cf();
4319
+ let o = ex(e, t), r = Sf();
4307
4320
  return { performValidationAsync: o, validationState: r };
4308
4321
  };
4309
- var YF = (e, t) => {
4322
+ var ex = (e, t) => {
4310
4323
  let { schema: o } = e, { trackEvent: r } = t;
4311
- if (!ZF(o))
4324
+ if (!tx(o))
4312
4325
  return;
4313
4326
  let { $id: n, analyticsId: a, validationAsync: i } = o, { httpClient: m } = t;
4314
- return gf({ httpClient: m, validationAsyncConfig: i, schemaId: a != null ? a : n, trackEvent: r });
4327
+ return Cf({ httpClient: m, validationAsyncConfig: i, schemaId: a != null ? a : n, trackEvent: r });
4315
4328
  };
4316
- var ZF = (e) => !!("validationAsync" in e && e.validationAsync);
4317
- var Sf = (e, t) => {
4318
- let { schema: o, model: r, localValue: n, required: a = false } = e, { autocompleteHint: i, validationMessages: m, default: l } = o, { getErrorMessageFunctions: c, updateComponent: p, onRefresh: y } = t, f = c(m), { performPersistAsync: u, persistedState: d } = xe(e, t), { performValidationAsync: g, validationState: h } = At(e, t), S = Oe(n) ? n : null, b = Oe(r) ? r : l != null ? l : null, w = u ? S : b;
4319
- return nf(C(s({}, Z(e)), { autoComplete: Qe(i), checks: [Fe(a, f), za(o, f), Ua(o, f)], value: w, persistedState: d, validationState: h, performPersistAsync: u, performRefresh: hr(o, y), performValidationAsync: g }), p);
4329
+ var tx = (e) => !!("validationAsync" in e && e.validationAsync);
4330
+ var bf = (e, t) => {
4331
+ let { schema: o, model: r, localValue: n, required: a = false } = e, { autocompleteHint: i, validationMessages: m, default: l } = o, { getErrorMessageFunctions: c, updateComponent: p, onRefresh: y } = t, f = c(m), { performPersistAsync: u, persistedState: d } = Fe(e, t), { performValidationAsync: g, validationState: h } = At(e, t), S = Oe(n) ? n : null, b = Oe(r) ? r : l != null ? l : null, w = u ? S : b;
4332
+ return af(C(s({}, Z(e)), { autoComplete: Qe(i), checks: [we(a, f), za(o, f), Ua(o, f)], value: w, persistedState: d, validationState: h, performPersistAsync: u, performRefresh: hr(o, y), performValidationAsync: g }), p);
4320
4333
  };
4321
- var bf = (e) => {
4334
+ var wf = (e) => {
4322
4335
  let { uid: t, analyticsId: o, componentMap: r, control: n, description: a, displayOrder: i, help: m, hidden: l, summariser: c, title: p } = e;
4323
4336
  return { type: "object", uid: t, analyticsId: o, componentMap: r, control: n, description: a, help: m, hidden: l, title: p, getChildren() {
4324
4337
  return i.map((y) => this.componentMap[y]);
@@ -4328,16 +4341,16 @@ var require_main_min = __commonJS({
4328
4341
  let y = c(this.getLocalValue()), f = Ae(this.getChildren());
4329
4342
  return Xs(y, f);
4330
4343
  }, getLocalValue() {
4331
- return QF(i, (y) => this.componentMap[y].getLocalValue());
4344
+ return ox(i, (y) => this.componentMap[y].getLocalValue());
4332
4345
  }, validate() {
4333
- return we(this.getChildren());
4346
+ return be(this.getChildren());
4334
4347
  } };
4335
4348
  };
4336
- var QF = (e, t) => e.reduce((o, r) => {
4349
+ var ox = (e, t) => e.reduce((o, r) => {
4337
4350
  let n = t(r);
4338
4351
  return s(s({}, o), n === null ? {} : { [r]: n });
4339
4352
  }, {});
4340
- var wf = (e, t) => {
4353
+ var Ff = (e, t) => {
4341
4354
  let { uid: o, localValue: r, schema: n, model: a, validationErrors: i } = e, { $id: m, displayOrder: l, properties: c, required: p } = n, y = Object.keys(c);
4342
4355
  if (l.length !== y.length)
4343
4356
  throw new Error(`Object schema ${m} has ${y.length} properties but only ${l.length} are listed in displayOrder`);
@@ -4346,11 +4359,11 @@ var require_main_min = __commonJS({
4346
4359
  let g = c[d];
4347
4360
  if (g === void 0)
4348
4361
  throw new Error(`Object schema ${m} has no property named ${d}`);
4349
- return C(s({}, u), { [d]: et({ uid: `${o}.obj-${d}`, schema: g, model: tn(a) ? a[d] : null, localValue: oo(r) ? r[d] : null, required: (h = p == null ? void 0 : p.includes(d)) != null ? h : false, validationErrors: Q(i) ? i[d] : void 0 }, t) });
4362
+ return C(s({}, u), { [d]: et({ uid: `${o}.obj-${d}`, schema: g, model: tn(a) ? a[d] : null, localValue: wo(r) ? r[d] : null, required: (h = p == null ? void 0 : p.includes(d)) != null ? h : false, validationErrors: Q(i) ? i[d] : void 0 }, t) });
4350
4363
  }, {});
4351
- return bf(C(s({}, Z(e)), { componentMap: f, displayOrder: l }));
4364
+ return wf(C(s({}, Z(e)), { componentMap: f, displayOrder: l }));
4352
4365
  };
4353
- var Ff = (e) => {
4366
+ var xf = (e) => {
4354
4367
  let { uid: t, analyticsId: o, components: r, control: n, description: a, help: i, hidden: m, title: l } = e;
4355
4368
  return { type: "all-of", uid: t, analyticsId: o, components: r, control: n, description: a, help: i, hidden: m, title: l, getChildren() {
4356
4369
  return this.components;
@@ -4361,23 +4374,23 @@ var require_main_min = __commonJS({
4361
4374
  }, getLocalValue() {
4362
4375
  return De(this.components);
4363
4376
  }, validate() {
4364
- return we(this.getChildren());
4377
+ return be(this.getChildren());
4365
4378
  } };
4366
4379
  };
4367
- var xf = (e, t) => {
4380
+ var vf = (e, t) => {
4368
4381
  let { uid: o, schema: r, localValue: n, model: a, required: i, validationErrors: m } = e, { allOf: l } = r, c = l.map((p, y) => et({ uid: `${o}.allOf-${y}`, schema: p, model: a, localValue: n, required: i, validationErrors: m }, t));
4369
- return Ff(C(s({}, Z(e)), { components: c }));
4382
+ return xf(C(s({}, Z(e)), { components: c }));
4370
4383
  };
4371
- var vf = (e) => {
4384
+ var Pf = (e) => {
4372
4385
  let { uid: t, analyticsId: o, value: r, summary: n } = e;
4373
4386
  return { type: "const", uid: t, analyticsId: o, getLocalValue: () => r, getSubmittableValue: async () => r, getSummary: () => n, validate: () => true };
4374
4387
  };
4375
- var Pf = (e, t) => {
4388
+ var If = (e, t) => {
4376
4389
  var l;
4377
4390
  let { schema: o } = t, { title: r, const: n, analyticsId: a, $id: i } = o, m = (l = r != null ? r : n) != null ? l : null;
4378
- return vf({ uid: e, analyticsId: a != null ? a : i, summary: Ny(o, m), value: o.const });
4391
+ return Pf({ uid: e, analyticsId: a != null ? a : i, summary: By(o, m), value: o.const });
4379
4392
  };
4380
- var If = (e, t) => {
4393
+ var Af = (e, t) => {
4381
4394
  let g = e, { uid: o, id: r, checks: n, value: a, performPersistAsync: i, performRefresh: m, performValidationAsync: l, summariser: c } = g, p = E(g, ["uid", "id", "checks", "value", "performPersistAsync", "performRefresh", "performValidationAsync", "summariser"]), y = ce(o, t), f = Ie(n), u = (h) => {
4382
4395
  let S = f(h);
4383
4396
  return y((b) => {
@@ -4404,7 +4417,7 @@ var require_main_min = __commonJS({
4404
4417
  return d;
4405
4418
  if (i) {
4406
4419
  let h = Ve(y, i);
4407
- return C(s({}, d), { onBlur() {
4420
+ return C(s({}, d), { isPersisted: true, onBlur() {
4408
4421
  this.validate() && h(this.persistedState, this.getLocalValue()).catch(() => {
4409
4422
  });
4410
4423
  }, async getSubmittableValue() {
@@ -4420,65 +4433,79 @@ var require_main_min = __commonJS({
4420
4433
  }
4421
4434
  return d;
4422
4435
  };
4423
- var Af = (e, t) => {
4424
- let { schema: o, localValue: r, model: n, required: a = false } = e, { autocompleteHint: i, validationMessages: m, default: l } = o, { getErrorMessageFunctions: c, updateComponent: p, onRefresh: y } = t, f = c(m), { performPersistAsync: u, persistedState: d } = xe(e, t), { performValidationAsync: g, validationState: h } = At(e, t), S = Ws(r) ? r : null, b = Ws(n) ? n : l != null ? l : null, w = u ? S : b, F = [Fe(a, f), za(o, f), Ua(o, f)];
4425
- return If(C(s({}, Z(e)), { autoComplete: Qe(i), checks: F, persistedState: d, value: w, validationState: h, performPersistAsync: u, performRefresh: hr(o, y), performValidationAsync: g }), p);
4426
- };
4427
- var Ha = (e, t) => be(e) && be(t) ? e.every((o, r) => Ha(e[r], t[r])) : oo(e) && oo(t) ? Array.from(/* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)])).filter((n) => !le(e[n]) && !le(t[n])).every((n) => Ha(e[n], t[n])) : e === t;
4428
4436
  var Mf = (e, t) => {
4429
- let S = e, { uid: o, checks: r, initialValue: n, options: a, performPersistAsync: i, performRefresh: m, summariser: l } = S, c = E(S, ["uid", "checks", "initialValue", "options", "performPersistAsync", "performRefresh", "summariser"]), p = a.map((b) => b.component), y = a.findIndex((b) => Ha(e.initialValue, b.component.getLocalValue())), f = ce(o, t), u = Ie(r), d = (b) => {
4430
- let w = u(b);
4431
- return f((F) => {
4432
- F.errors = w;
4433
- }), w;
4434
- }, g = C(s({ uid: o, type: "select", children: p, options: a, selectedIndex: y, value: null }, c), { getChildren() {
4437
+ let { schema: o, localValue: r, model: n, required: a = false } = e, { autocompleteHint: i, validationMessages: m, default: l } = o, { getErrorMessageFunctions: c, updateComponent: p, onRefresh: y } = t, f = c(m), { performPersistAsync: u, persistedState: d } = Fe(e, t), { performValidationAsync: g, validationState: h } = At(e, t), S = Ws(r) ? r : null, b = Ws(n) ? n : l != null ? l : null, w = u ? S : b, F = [we(a, f), za(o, f), Ua(o, f)];
4438
+ return Af(C(s({}, Z(e)), { autoComplete: Qe(i), checks: F, persistedState: d, value: w, validationState: h, performPersistAsync: u, performRefresh: hr(o, y), performValidationAsync: g }), p);
4439
+ };
4440
+ var Ha = (e, t) => {
4441
+ if (ve(e) && t.type === "repeatable") {
4442
+ let r = t.getChildren();
4443
+ return e.every((n, a) => {
4444
+ let i = r[a];
4445
+ return i ? Ha(n, i) : false;
4446
+ });
4447
+ }
4448
+ if (wo(e) && t.type === "object")
4449
+ return Array.from(/* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t.componentMap)])).filter((a) => !le(e[a]) && !le(t.componentMap[a])).every((a) => Ha(e[a], t.componentMap[a]));
4450
+ let o = t.getLocalValue();
4451
+ return e instanceof File && o instanceof File ? rx(e, o) : "isPersisted" in t && t.isPersisted ? true : e === o;
4452
+ };
4453
+ var rx = (e, t) => e.name === t.name && e.type === t.type && e.size === t.size;
4454
+ var Rf = (e, t) => {
4455
+ let b = e, { uid: o, checks: r, initialValue: n, options: a, performPersistAsync: i, performRefresh: m, summariser: l } = b, c = E(b, ["uid", "checks", "initialValue", "options", "performPersistAsync", "performRefresh", "summariser"]), p = a.map((w) => w.component), y = a.map((w) => Ha(e.initialValue, w.component)), f = y.filter(nx).length === 1 ? y.indexOf(true) : null, u = ce(o, t), d = Ie(r), g = (w) => {
4456
+ let F = d(w);
4457
+ return u((x) => {
4458
+ x.errors = F;
4459
+ }), F;
4460
+ }, h = C(s({ uid: o, type: "select", children: p, options: a, selectedIndex: f, value: null }, c), { getChildren() {
4435
4461
  return this.children;
4436
4462
  }, getSelectedChild() {
4437
4463
  return this.selectedIndex !== null ? this.children[this.selectedIndex] : null;
4438
4464
  }, async getSubmittableValue() {
4439
- var b, w;
4440
- return (w = await ((b = this.getSelectedChild()) == null ? void 0 : b.getSubmittableValue())) != null ? w : null;
4465
+ var w, F;
4466
+ return (F = await ((w = this.getSelectedChild()) == null ? void 0 : w.getSubmittableValue())) != null ? F : null;
4441
4467
  }, getSummary() {
4442
- var b, w;
4443
- return (w = (b = this.getSelectedChild()) == null ? void 0 : b.getSummary()) != null ? w : {};
4468
+ var w, F;
4469
+ return (F = (w = this.getSelectedChild()) == null ? void 0 : w.getSummary()) != null ? F : {};
4444
4470
  }, getLocalValue() {
4445
- var b, w;
4446
- return (w = (b = this.getSelectedChild()) == null ? void 0 : b.getLocalValue()) != null ? w : null;
4471
+ var w, F;
4472
+ return (F = (w = this.getSelectedChild()) == null ? void 0 : w.getLocalValue()) != null ? F : null;
4447
4473
  }, onBlur() {
4448
- d(this.getLocalValue());
4474
+ g(this.getLocalValue());
4449
4475
  }, onFocus() {
4450
- }, onSelect(b) {
4451
- b !== null && this.analyticsId && e.trackEvent("OneOf Selected", { oneOfId: this.analyticsId, schemaId: this.children[b].analyticsId }), f((w) => {
4452
- w.errors = [], w.selectedIndex = b;
4476
+ }, onSelect(w) {
4477
+ w !== null && this.analyticsId && e.trackEvent("OneOf Selected", { oneOfId: this.analyticsId, schemaId: this.children[w].analyticsId }), u((F) => {
4478
+ F.errors = [], F.selectedIndex = w;
4453
4479
  }), m == null || m();
4454
4480
  }, validate() {
4455
- var F, x;
4456
- let b = (x = (F = this.getSelectedChild()) == null ? void 0 : F.validate()) != null ? x : true;
4457
- return d(this.getLocalValue()).length === 0 && b;
4481
+ var x, P;
4482
+ let w = (P = (x = this.getSelectedChild()) == null ? void 0 : x.validate()) != null ? P : true;
4483
+ return g(this.getLocalValue()).length === 0 && w;
4458
4484
  } });
4459
4485
  if (!i)
4460
- return g;
4461
- let h = Ve(f, i);
4462
- return C(s({}, g), { onSelect(b) {
4463
- g.onSelect.call(this, b), u(this.getLocalValue()).length === 0 && b !== null && h(this.persistedState, this.getLocalValue()).catch(() => {
4486
+ return h;
4487
+ let S = Ve(u, i);
4488
+ return C(s({}, h), { isPersisted: true, onSelect(w) {
4489
+ h.onSelect.call(this, w), d(this.getLocalValue()).length === 0 && w !== null && S(this.persistedState, this.getLocalValue()).catch(() => {
4464
4490
  });
4465
4491
  }, async getSubmittableValue() {
4466
- return h(this.persistedState, this.getLocalValue());
4492
+ return S(this.persistedState, this.getLocalValue());
4467
4493
  } });
4468
4494
  };
4469
- var Rf = (e, t) => {
4495
+ var nx = (e) => e;
4496
+ var kf = (e, t) => {
4470
4497
  var F, x;
4471
4498
  let { uid: o, localValue: r, schema: n, model: a, validationErrors: i, required: m = false } = e, l = (F = a != null ? a : n.default) != null ? F : null, c = n.oneOf.map((P, R) => {
4472
4499
  let { title: A = "", description: O, image: v, icon: L, keywords: k = [] } = P;
4473
- return { title: A, description: O, image: v, icon: L, keywords: k, disabled: "disabled" in P ? !!P.disabled : false, component: et({ uid: `${o}.oneOf-${R}`, schema: ex(P), model: l, localValue: r, validationErrors: i, required: m }, t) };
4474
- }), { getErrorMessageFunctions: p, updateComponent: y, trackEvent: f, onRefresh: u } = t, { default: d, validationMessages: g } = n, h = p(g), { performPersistAsync: S, persistedState: b } = xe(e, t), w = S ? r : (x = a != null ? a : d) != null ? x : null;
4475
- return Mf(C(s({}, Z(e)), { autoComplete: Qe(n.autocompleteHint), checks: n.hidden ? [] : [Fe(m, h)], options: c, initialValue: w, persistedState: b, performPersistAsync: S, performRefresh: zt(n, u), trackEvent: f }), y);
4500
+ return { title: A, description: O, image: v, icon: L, keywords: k, disabled: "disabled" in P ? !!P.disabled : false, component: et({ uid: `${o}.oneOf-${R}`, schema: ax(P), model: l, localValue: r, validationErrors: i, required: m }, t) };
4501
+ }), { getErrorMessageFunctions: p, updateComponent: y, trackEvent: f, onRefresh: u } = t, { default: d, validationMessages: g } = n, h = p(g), { performPersistAsync: S, persistedState: b } = Fe(e, t), w = S ? r : (x = a != null ? a : d) != null ? x : null;
4502
+ return Rf(C(s({}, Z(e)), { autoComplete: Qe(n.autocompleteHint), checks: n.hidden ? [] : [we(m, h)], options: c, initialValue: w, persistedState: b, performPersistAsync: S, performRefresh: zt(n, u), trackEvent: f }), y);
4476
4503
  };
4477
- var ex = (e) => {
4504
+ var ax = (e) => {
4478
4505
  let n = e, { title: t, description: o } = n;
4479
4506
  return E(n, ["title", "description"]);
4480
4507
  };
4481
- var kf = (e, t) => {
4508
+ var Of = (e, t) => {
4482
4509
  let g = e, { uid: o, id: r, checks: n, performPersistAsync: a, performRefresh: i, performValidationAsync: m, summariser: l, value: c } = g, p = E(g, ["uid", "id", "checks", "performPersistAsync", "performRefresh", "performValidationAsync", "summariser", "value"]), y = ce(o, t), f = Ie(n), u = (h) => {
4483
4510
  let S = f(h);
4484
4511
  return y((b) => {
@@ -4505,7 +4532,7 @@ var require_main_min = __commonJS({
4505
4532
  return d;
4506
4533
  if (a) {
4507
4534
  let h = Ve(y, a);
4508
- return C(s({}, d), { onChange(S) {
4535
+ return C(s({}, d), { isPersisted: true, onChange(S) {
4509
4536
  d.onChange.call(this, S), f(S).length === 0 && h(this.persistedState, this.getLocalValue()).catch(() => {
4510
4537
  });
4511
4538
  }, async getSubmittableValue() {
@@ -4521,9 +4548,9 @@ var require_main_min = __commonJS({
4521
4548
  }
4522
4549
  return d;
4523
4550
  };
4524
- var Of = (e, t) => {
4525
- let { schema: o, localValue: r, model: n, required: a = false } = e, { autocompleteHint: i, default: m, minimum: l, maximum: c } = o, { getErrorMessageFunctions: p, updateComponent: y, onRefresh: f } = t, u = p(o.validationMessages), { performPersistAsync: d, persistedState: g } = xe(e, t), { performValidationAsync: h, validationState: S } = At(e, t), b = K(r) ? r : null, w = K(n) ? n : m != null ? m : null, F = d ? b : w;
4526
- return kf(C(s({}, Z(e)), { autoComplete: Qe(i), checks: o.hidden ? [] : [Fe(a, u), pf(o, u), uf(o, u)], minimumDate: l, maximumDate: c, value: F, persistedState: g, validationState: S, performPersistAsync: d, performRefresh: zt(o, f), performValidationAsync: h }), y);
4551
+ var Ef = (e, t) => {
4552
+ let { schema: o, localValue: r, model: n, required: a = false } = e, { autocompleteHint: i, default: m, minimum: l, maximum: c } = o, { getErrorMessageFunctions: p, updateComponent: y, onRefresh: f } = t, u = p(o.validationMessages), { performPersistAsync: d, persistedState: g } = Fe(e, t), { performValidationAsync: h, validationState: S } = At(e, t), b = K(r) ? r : null, w = K(n) ? n : m != null ? m : null, F = d ? b : w;
4553
+ return Of(C(s({}, Z(e)), { autoComplete: Qe(i), checks: o.hidden ? [] : [we(a, u), uf(o, u), yf(o, u)], minimumDate: l, maximumDate: c, value: F, persistedState: g, validationState: S, performPersistAsync: d, performRefresh: zt(o, f), performValidationAsync: h }), y);
4527
4554
  };
4528
4555
  var gr = async (e) => new Promise((t, o) => {
4529
4556
  let r = new FileReader();
@@ -4556,7 +4583,7 @@ var require_main_min = __commonJS({
4556
4583
  if (!m)
4557
4584
  return d;
4558
4585
  let g = Ve(y, m);
4559
- return C(s({}, d), { format: a, async onUpload(S) {
4586
+ return C(s({}, d), { format: a, isPersisted: true, async onUpload(S) {
4560
4587
  y((w) => {
4561
4588
  w.errors = [], w.value = S;
4562
4589
  });
@@ -4570,11 +4597,11 @@ var require_main_min = __commonJS({
4570
4597
  return this.persistedState.submission;
4571
4598
  } });
4572
4599
  };
4573
- var Ef = (e, t) => {
4574
- let { schema: o, localValue: r, model: n, required: a = false } = e, { accepts: i, autocompleteHint: m, maxSize: l, validationMessages: c } = o, { getErrorMessageFunctions: p, updateComponent: y, onRefresh: f } = t, u = p(c), { performPersistAsync: d } = xe(e, t), g = d ? ut(null, n) : ut(), h = mr(r) ? r : null, S = d ? h : null;
4575
- return qa(C(s({}, Z(e)), { accepts: i, autoComplete: Qe(m), checks: o.hidden ? [] : [Fe(a, u)], format: "base64", maxSize: l, value: S, persistedState: g, performPersistAsync: d, performRefresh: zt(o, f) }), y);
4576
- };
4577
4600
  var Lf = (e, t) => {
4601
+ let { schema: o, localValue: r, model: n, required: a = false } = e, { accepts: i, autocompleteHint: m, maxSize: l, validationMessages: c } = o, { getErrorMessageFunctions: p, updateComponent: y, onRefresh: f } = t, u = p(c), { performPersistAsync: d } = Fe(e, t), g = d ? ut(null, n) : ut(), h = mr(r) ? r : null, S = d ? h : null;
4602
+ return qa(C(s({}, Z(e)), { accepts: i, autoComplete: Qe(m), checks: o.hidden ? [] : [we(a, u)], format: "base64", maxSize: l, value: S, persistedState: g, performPersistAsync: d, performRefresh: zt(o, f) }), y);
4603
+ };
4604
+ var Tf = (e, t) => {
4578
4605
  let g = e, { uid: o, id: r, checks: n, performPersistAsync: a, performRefresh: i, performValidationAsync: m, summariser: l, value: c } = g, p = E(g, ["uid", "id", "checks", "performPersistAsync", "performRefresh", "performValidationAsync", "summariser", "value"]), y = ce(o, t), f = Ie(n), u = (h) => {
4579
4606
  let S = f(h);
4580
4607
  return y((b) => {
@@ -4601,7 +4628,7 @@ var require_main_min = __commonJS({
4601
4628
  return d;
4602
4629
  if (a) {
4603
4630
  let h = Ve(y, a);
4604
- return C(s({}, d), { onBlur() {
4631
+ return C(s({}, d), { isPersisted: true, onBlur() {
4605
4632
  this.validate() && h(this.persistedState, this.getLocalValue()).catch(() => {
4606
4633
  });
4607
4634
  }, async getSubmittableValue() {
@@ -4617,26 +4644,26 @@ var require_main_min = __commonJS({
4617
4644
  }
4618
4645
  return d;
4619
4646
  };
4620
- var Tf = (e, t) => {
4621
- let { schema: o, localValue: r, model: n, required: a = false } = e, { autocompleteHint: i, control: m, default: l, displayFormat: c, format: p, validationMessages: y } = o, { getErrorMessageFunctions: f, updateComponent: u, onRefresh: d } = t, g = tx(p), h = f(y), { performPersistAsync: S, persistedState: b } = xe(e, t), { performValidationAsync: w, validationState: F } = At(e, t), x = K(r) ? r : null, P = K(n) ? n : l != null ? l : null, R = S ? x : P;
4622
- return Lf(C(s({}, Z(e)), { autoComplete: Qe(i), checks: o.hidden ? [] : [Fe(a, h), cf(o, h), df(o, h), yf(o, h)], control: m != null ? m : g, displayFormat: c, value: R, persistedState: b, validationState: F, performPersistAsync: S, performRefresh: hr(o, d), performValidationAsync: w }), u);
4647
+ var Df = (e, t) => {
4648
+ let { schema: o, localValue: r, model: n, required: a = false } = e, { autocompleteHint: i, control: m, default: l, displayFormat: c, format: p, validationMessages: y } = o, { getErrorMessageFunctions: f, updateComponent: u, onRefresh: d } = t, g = ix(p), h = f(y), { performPersistAsync: S, persistedState: b } = Fe(e, t), { performValidationAsync: w, validationState: F } = At(e, t), x = K(r) ? r : null, P = K(n) ? n : l != null ? l : null, R = S ? x : P;
4649
+ return Tf(C(s({}, Z(e)), { autoComplete: Qe(i), checks: o.hidden ? [] : [we(a, h), df(o, h), pf(o, h), ff(o, h)], control: m != null ? m : g, displayFormat: c, value: R, persistedState: b, validationState: F, performPersistAsync: S, performRefresh: hr(o, d), performValidationAsync: w }), u);
4623
4650
  };
4624
- var tx = (e) => {
4651
+ var ix = (e) => {
4625
4652
  if (e && ["numeric", "phone-number", "email", "password"].includes(e))
4626
4653
  return e;
4627
4654
  };
4628
- var Df = (e, t) => {
4655
+ var Vf = (e, t) => {
4629
4656
  let { schema: o } = e;
4630
4657
  switch (o.format) {
4631
4658
  case "date":
4632
- return Of(e, t);
4633
- case "base64url":
4634
4659
  return Ef(e, t);
4660
+ case "base64url":
4661
+ return Lf(e, t);
4635
4662
  default:
4636
- return Tf(e, t);
4663
+ return Df(e, t);
4637
4664
  }
4638
4665
  };
4639
- var Vf = (e) => C(s({}, e), { type: "container", getChildren() {
4666
+ var Nf = (e) => C(s({}, e), { type: "container", getChildren() {
4640
4667
  return this.components;
4641
4668
  }, async getSubmittableValue() {
4642
4669
  return Te(this.components);
@@ -4645,9 +4672,9 @@ var require_main_min = __commonJS({
4645
4672
  }, getLocalValue() {
4646
4673
  return De(this.components);
4647
4674
  }, validate() {
4648
- return we(this.getChildren());
4675
+ return be(this.getChildren());
4649
4676
  } });
4650
- var Nf = (e, t) => {
4677
+ var Bf = (e, t) => {
4651
4678
  let f = e, { uid: o, id: r, checks: n, components: a, summary: i, createEditableComponent: m, summariser: l } = f, c = E(f, ["uid", "id", "checks", "components", "summary", "createEditableComponent", "summariser"]), p = ce(o, t), y = Ie(n);
4652
4679
  return C(s({ uid: o, id: r, type: "repeatable", components: a, editableComponent: null, editableIndex: null, summaryDefaults: { title: i == null ? void 0 : i.defaultTitle, description: i == null ? void 0 : i.defaultDescription, icon: i == null ? void 0 : i.defaultIcon, image: i == null ? void 0 : i.defaultImage } }, c), { onEdit(u) {
4653
4680
  p((d) => {
@@ -4682,19 +4709,19 @@ var require_main_min = __commonJS({
4682
4709
  }, getLocalValue() {
4683
4710
  return this.components.map((u) => u.getLocalValue());
4684
4711
  }, validate() {
4685
- let u = y(this.getLocalValue()), d = we(this.getChildren());
4712
+ let u = y(this.getLocalValue()), d = be(this.getChildren());
4686
4713
  return p((g) => {
4687
4714
  g.errors = u;
4688
4715
  }), u.length === 0 && d;
4689
4716
  } });
4690
4717
  };
4691
- var Bf = (e, t) => {
4692
- let { getErrorMessageFunctions: o } = t, { uid: r, localValue: n, schema: a, model: i, required: m = false, validationErrors: l } = e, { items: c, addItemTitle: p, editItemTitle: y, summary: f } = a, u = be(n) ? n : [], d = i == null ? void 0 : i.map((S, b) => et({ uid: `${r}.arr-${b}`, schema: c, model: S, localValue: u == null ? void 0 : u[b], validationErrors: l }, t)), g = (S) => et({ uid: `${r}.arr-rnd-${ox()}`, schema: c, localValue: S, model: Zs(S), validationErrors: void 0 }, t), h = o(a.validationMessages);
4693
- return Nf(C(s({}, Z(e)), { addItemTitle: p, checks: a.hidden ? [] : [Fe(m, h), af(a, h), lf(a, h)], components: d != null ? d : [], editItemTitle: y, summary: f, createEditableComponent: g }), t.updateComponent);
4718
+ var Uf = (e, t) => {
4719
+ let { getErrorMessageFunctions: o } = t, { uid: r, localValue: n, schema: a, model: i, required: m = false, validationErrors: l } = e, { items: c, addItemTitle: p, editItemTitle: y, summary: f } = a, u = ve(n) ? n : [], d = i == null ? void 0 : i.map((S, b) => et({ uid: `${r}.arr-${b}`, schema: c, model: S, localValue: u == null ? void 0 : u[b], validationErrors: l }, t)), g = (S) => et({ uid: `${r}.arr-rnd-${sx()}`, schema: c, localValue: S, model: Zs(S), validationErrors: void 0 }, t), h = o(a.validationMessages);
4720
+ return Bf(C(s({}, Z(e)), { addItemTitle: p, checks: a.hidden ? [] : [we(m, h), sf(a, h), cf(a, h)], components: d != null ? d : [], editItemTitle: y, summary: f, createEditableComponent: g }), t.updateComponent);
4694
4721
  };
4695
4722
  var Zs = (e) => e instanceof Array ? e.map(Zs) : Q(e) ? Object.fromEntries(Object.entries(e).map(([t, o]) => [t, Zs(o)])) : e instanceof File ? e.name : e;
4696
- var ox = () => Math.floor(Math.random() * 1e8);
4697
- var Uf = (e, t) => {
4723
+ var sx = () => Math.floor(Math.random() * 1e8);
4724
+ var zf = (e, t) => {
4698
4725
  let d = e, { uid: o, id: r, checks: n, format: a, performPersistAsync: i, summariser: m } = d, l = E(d, ["uid", "id", "checks", "format", "performPersistAsync", "summariser"]), c = ce(o, t), p = Ie(n), y = (g) => {
4699
4726
  let h = p(g);
4700
4727
  return c((S) => {
@@ -4726,8 +4753,8 @@ var require_main_min = __commonJS({
4726
4753
  } }, l);
4727
4754
  if (!i)
4728
4755
  return f;
4729
- let u = rf(c, i);
4730
- return C(s({}, f), { format: a, async onUpload(g, h) {
4756
+ let u = nf(c, i);
4757
+ return C(s({}, f), { format: a, isPersisted: true, async onUpload(g, h) {
4731
4758
  await f.onUpload.call(this, g, h);
4732
4759
  let S = a === "blob" ? g : await gr(g);
4733
4760
  await u(S, h);
@@ -4740,30 +4767,30 @@ var require_main_min = __commonJS({
4740
4767
  return Promise.all(this.persistedState.map(async ({ submission: g }) => g));
4741
4768
  } });
4742
4769
  };
4743
- var zf = (e, t) => {
4744
- let { getErrorMessageFunctions: o } = t, { localValue: r, model: n, schema: a, required: i = false } = e, m = nx(a.items), { accepts: l, maxSize: c } = m, { minItems: p, maxItems: y, title: f, validationMessages: u } = a, d = o(u), g = [Fe(i, d), mf(a, d), sf(a, d)], h = ax(a.items), S = rx(a.items), b = C(s({}, e), { persistAsyncConfig: h, schema: m }), { performPersistAsync: w } = xe(b, t), F = w ? ix(r) : [], x = w && be(n) ? n.map((P) => ut(null, P)) : [];
4745
- return Uf(C(s({}, Z(b)), { title: f, uploadLabel: m.title, accepts: l, autoComplete: "off", checks: a.hidden ? [] : g, format: S, maxSize: c, minItems: p, maxItems: y, required: i, value: F, persistedState: x, performPersistAsync: w }), t.updateComponent);
4770
+ var jf = (e, t) => {
4771
+ let { getErrorMessageFunctions: o } = t, { localValue: r, model: n, schema: a, required: i = false } = e, m = lx(a.items), { accepts: l, maxSize: c } = m, { minItems: p, maxItems: y, title: f, validationMessages: u } = a, d = o(u), g = [we(i, d), lf(a, d), mf(a, d)], h = cx(a.items), S = mx(a.items), b = C(s({}, e), { persistAsyncConfig: h, schema: m }), { performPersistAsync: w } = Fe(b, t), F = w ? dx(r) : [], x = w && ve(n) ? n.map((P) => ut(null, P)) : [];
4772
+ return zf(C(s({}, Z(b)), { title: f, uploadLabel: m.title, accepts: l, autoComplete: "off", checks: a.hidden ? [] : g, format: S, maxSize: c, minItems: p, maxItems: y, required: i, value: F, persistedState: x, performPersistAsync: w }), t.updateComponent);
4746
4773
  };
4747
- var rx = (e) => dr(e) ? "base64" : cr(e.persistAsync.schema) ? "blob" : "base64";
4748
- var nx = (e) => dr(e) ? e : e.persistAsync.schema;
4749
- var ax = (e) => {
4774
+ var mx = (e) => dr(e) ? "base64" : cr(e.persistAsync.schema) ? "blob" : "base64";
4775
+ var lx = (e) => dr(e) ? e : e.persistAsync.schema;
4776
+ var cx = (e) => {
4750
4777
  if (!pr(e))
4751
4778
  return;
4752
4779
  let { persistAsync: t } = e, { idProperty: o, method: r, param: n, url: a } = t;
4753
4780
  return { idProperty: o, method: r, param: n, url: a };
4754
4781
  };
4755
- var ix = (e) => be(e) && e.every(mr) ? e : [];
4756
- var jf = (e, t) => {
4757
- let { schema: o, model: r } = e, n = le(r) || wy(r) ? r : null;
4758
- if (sx(o))
4759
- return zf(C(s({}, e), { schema: o, model: n }), t);
4782
+ var dx = (e) => ve(e) && e.every(mr) ? e : [];
4783
+ var Hf = (e, t) => {
4784
+ let { schema: o, model: r } = e, n = le(r) || Fy(r) ? r : null;
4785
+ if (px(o))
4786
+ return jf(C(s({}, e), { schema: o, model: n }), t);
4760
4787
  if (Ks(o))
4761
- return Bf(C(s({}, e), { schema: o, model: n }), t);
4788
+ return Uf(C(s({}, e), { schema: o, model: n }), t);
4762
4789
  throw new Error("Currently only repeatable array schemas are supported");
4763
4790
  };
4764
- var sx = (e) => Ks(e) && (mx(e.items) || dr(e.items));
4765
- var mx = (e) => pr(e) && (cr(e.persistAsync.schema) || dr(e.persistAsync.schema));
4766
- var Hf = (e, t) => {
4791
+ var px = (e) => Ks(e) && (ux(e.items) || dr(e.items));
4792
+ var ux = (e) => pr(e) && (cr(e.persistAsync.schema) || dr(e.persistAsync.schema));
4793
+ var qf = (e, t) => {
4767
4794
  let f = e, { uid: o, id: r, value: n, performPersistAsync: a, performRefresh: i, performValidationAsync: m, summariser: l } = f, c = E(f, ["uid", "id", "value", "performPersistAsync", "performRefresh", "performValidationAsync", "summariser"]), p = ce(o, t), y = s({ type: "boolean", uid: o, id: r, autoComplete: "", value: n, onBlur() {
4768
4795
  }, onFocus() {
4769
4796
  }, onChange(u) {
@@ -4781,7 +4808,7 @@ var require_main_min = __commonJS({
4781
4808
  return y;
4782
4809
  if (a) {
4783
4810
  let u = Ve(p, a);
4784
- return C(s({}, y), { onChange(d) {
4811
+ return C(s({}, y), { isPersisted: true, onChange(d) {
4785
4812
  y.onChange.call(this, d), u(this.persistedState, this.getLocalValue()).catch(() => {
4786
4813
  });
4787
4814
  }, async getSubmittableValue() {
@@ -4797,51 +4824,51 @@ var require_main_min = __commonJS({
4797
4824
  }
4798
4825
  return y;
4799
4826
  };
4800
- var qf = (e, t) => {
4801
- let { schema: o, localValue: r, model: n } = e, { default: a } = o, { updateComponent: i, onRefresh: m } = t, l = zt(o, m), { performPersistAsync: c, persistedState: p } = xe(e, t), { performValidationAsync: y, validationState: f } = At(e, t), u = Oa(r) ? r : false, d = lx(n, a), g = c ? u : d;
4802
- return Hf(C(s({}, Z(e)), { value: g != null ? g : false, persistedState: p, validationState: f, performPersistAsync: c, performRefresh: l, performValidationAsync: y }), i);
4803
- };
4804
- var lx = (e, t) => Oa(e) ? e : Oa(t) ? t : false;
4805
4827
  var $f = (e, t) => {
4806
- let { schema: o, localValue: r, model: n, required: a = false } = e, { accepts: i, maxSize: m, validationMessages: l } = o, { getErrorMessageFunctions: c, updateComponent: p } = t, y = c(l), { performPersistAsync: f } = xe(e, t), u = f ? ut(null, n) : ut(), d = mr(r) ? r : null, g = f ? d : null;
4807
- return qa(C(s({}, Z(e)), { accepts: i, autoComplete: "off", format: "blob", maxSize: m, value: g, persistedState: u, performPersistAsync: f, checks: o.hidden ? [] : [Fe(a, y)] }), p);
4828
+ let { schema: o, localValue: r, model: n } = e, { default: a } = o, { updateComponent: i, onRefresh: m } = t, l = zt(o, m), { performPersistAsync: c, persistedState: p } = Fe(e, t), { performValidationAsync: y, validationState: f } = At(e, t), u = Oa(r) ? r : false, d = yx(n, a), g = c ? u : d;
4829
+ return qf(C(s({}, Z(e)), { value: g != null ? g : false, persistedState: p, validationState: f, performPersistAsync: c, performRefresh: l, performValidationAsync: y }), i);
4830
+ };
4831
+ var yx = (e, t) => Oa(e) ? e : Oa(t) ? t : false;
4832
+ var Gf = (e, t) => {
4833
+ let { schema: o, localValue: r, model: n, required: a = false } = e, { accepts: i, maxSize: m, validationMessages: l } = o, { getErrorMessageFunctions: c, updateComponent: p } = t, y = c(l), { performPersistAsync: f } = Fe(e, t), u = f ? ut(null, n) : ut(), d = mr(r) ? r : null, g = f ? d : null;
4834
+ return qa(C(s({}, Z(e)), { accepts: i, autoComplete: "off", format: "blob", maxSize: m, value: g, persistedState: u, performPersistAsync: f, checks: o.hidden ? [] : [we(a, y)] }), p);
4808
4835
  };
4809
4836
  var et = (e, t) => {
4810
4837
  let { uid: o, schema: r } = e, { alert: n } = r;
4811
- return n ? Vf({ uid: o, components: [fr(`${o}.container.alert`, n), Gf(C(s({}, e), { uid: `${o}.container` }), t)] }) : Gf(e, t);
4838
+ return n ? Nf({ uid: o, components: [fr(`${o}.container.alert`, n), Wf(C(s({}, e), { uid: `${o}.container` }), t)] }) : Wf(e, t);
4812
4839
  };
4813
- var Gf = (e, t) => {
4840
+ var Wf = (e, t) => {
4814
4841
  let { uid: o, schema: r } = e;
4815
- if (vy(r))
4816
- return Pf(o, C(s({}, e), { schema: r }));
4842
+ if (Py(r))
4843
+ return If(o, C(s({}, e), { schema: r }));
4817
4844
  if (pr(r)) {
4818
4845
  let { persistAsync: n } = r, { idProperty: a, method: i, param: m, url: l } = n, c = { idProperty: a, method: i, param: m, url: l };
4819
4846
  return et(C(s({}, e), { persistAsyncConfig: c, schema: n.schema }), t);
4820
4847
  }
4821
- if (Fy(r))
4822
- return xf(C(s({}, e), { schema: r }), t);
4823
- if (My(r))
4824
- return Rf(C(s({}, e), { schema: r }), t);
4825
4848
  if (xy(r))
4826
- return qf(C(s({}, e), { schema: r }), t);
4827
- if (Ay(r))
4828
- return wf(C(s({}, e), { schema: r }), t);
4829
- if (Py(r))
4830
- return Af(C(s({}, e), { schema: r }), t);
4849
+ return vf(C(s({}, e), { schema: r }), t);
4850
+ if (Ry(r))
4851
+ return kf(C(s({}, e), { schema: r }), t);
4852
+ if (vy(r))
4853
+ return $f(C(s({}, e), { schema: r }), t);
4854
+ if (My(r))
4855
+ return Ff(C(s({}, e), { schema: r }), t);
4831
4856
  if (Iy(r))
4832
- return Sf(C(s({}, e), { schema: r }), t);
4857
+ return Mf(C(s({}, e), { schema: r }), t);
4858
+ if (Ay(r))
4859
+ return bf(C(s({}, e), { schema: r }), t);
4833
4860
  if (Js(r))
4834
- return Df(C(s({}, e), { schema: r }), t);
4835
- if (Ry(r))
4836
- return jf(C(s({}, e), { schema: r }), t);
4861
+ return Vf(C(s({}, e), { schema: r }), t);
4862
+ if (ky(r))
4863
+ return Hf(C(s({}, e), { schema: r }), t);
4837
4864
  if (cr(r)) {
4838
4865
  if (!e.persistAsyncConfig)
4839
4866
  throw new Error("Blob schemas can only be used as the schema of a persist async configuration.");
4840
- return $f(C(s({}, e), { schema: r }), t);
4867
+ return Gf(C(s({}, e), { schema: r }), t);
4841
4868
  }
4842
4869
  throw new Error("Not yet supported");
4843
4870
  };
4844
- var Wf = (e) => C(s({}, e), { type: "form", getChildren() {
4871
+ var _f = (e) => C(s({}, e), { type: "form", getChildren() {
4845
4872
  return this.components;
4846
4873
  }, async getSubmittableValue() {
4847
4874
  return Te(this.getChildren());
@@ -4850,24 +4877,24 @@ var require_main_min = __commonJS({
4850
4877
  }, getLocalValue() {
4851
4878
  return De(this.getChildren());
4852
4879
  }, validate() {
4853
- return we(this.getChildren());
4880
+ return be(this.getChildren());
4854
4881
  } });
4855
- var _f = (e, { schemaId: t, control: o, margin: r = "md" }, n) => {
4856
- let { step: a, stepLocalValue: i } = n, { model: m, errors: l, schemas: c } = a, p = c.find((y) => y.$id === t);
4857
- if (!p)
4858
- throw new Error("Bad layout schemaId");
4859
- return Wf({ uid: e, components: [et({ uid: `${e}.form`, schema: p, model: m != null ? m : null, localValue: i, validationErrors: l == null ? void 0 : l.validation }, n)], control: o, margin: r });
4860
- };
4861
- var Kf = (e) => C(s({ type: "image" }, e), { getSubmittableValue: async () => null, getLocalValue: () => null, getSummary: () => ({}), validate: () => true });
4862
- var Jf = (e, { accessibilityDescription: t, control: o, margin: r = "md", size: n = "md", text: a, url: i }) => Kf({ uid: e, accessibilityDescription: t != null ? t : a, control: o, margin: r, size: n, url: i });
4882
+ var Kf = (e, { schemaId: t, schema: o, control: r, margin: n = "md" }, a) => {
4883
+ let { step: i, stepLocalValue: m } = a, { model: l, errors: c, schemas: p } = i, y = t != null ? t : o == null ? void 0 : o.$ref, f = p.find((u) => u.$id === y);
4884
+ if (!f)
4885
+ throw new Error("Schema not found in schemas array.");
4886
+ return _f({ uid: e, components: [et({ uid: `${e}.form`, schema: f, model: l != null ? l : null, localValue: m, validationErrors: c == null ? void 0 : c.validation }, a)], control: r, margin: n });
4887
+ };
4888
+ var Jf = (e) => C(s({ type: "image" }, e), { getSubmittableValue: async () => null, getLocalValue: () => null, getSummary: () => ({}), validate: () => true });
4889
+ var Xf = (e, { accessibilityDescription: t, control: o, margin: r = "md", size: n = "md", text: a, url: i }) => Jf({ uid: e, accessibilityDescription: t != null ? t : a, control: o, margin: r, size: n, url: i });
4863
4890
  var $a = (e) => C(s({ type: "markdown" }, e), { getSubmittableValue: async () => null, getLocalValue: () => null, getSummary: () => ({}), validate: () => true });
4864
- var Xf = (e, { align: t = "left", control: o, margin: r = "md", markdown: n }) => $a({ uid: e, align: ro(t), content: n, control: o, margin: r });
4865
- var Yf = (e) => C(s({ type: "instructions" }, e), { getLocalValue: () => null, getSubmittableValue: async () => null, getSummary: () => ({}), validate: () => true });
4866
- var Zf = (e, { control: t, items: o, margin: r = "md", title: n }) => Yf({ uid: e, control: t, items: o.map(({ context: a, text: i }) => ({ context: yr(a), text: i })), margin: r, title: n });
4867
- var Qf = (e) => C(s({ type: "loading-indicator" }, e), { getSubmittableValue: async () => null, getLocalValue: () => null, getSummary: () => ({}), validate: () => true });
4868
- var eh = (e, { size: t = "md", margin: o = "md", control: r }) => Qf({ uid: e, size: t, control: r, margin: o });
4869
- var th = (e, { align: t = "left", margin: o = "md", control: r, content: n }) => $a({ uid: e, align: ro(t), control: r, content: n, margin: o });
4870
- var oh = (e) => C(s({ type: "modal" }, e), { getChildren() {
4891
+ var Yf = (e, { align: t = "left", control: o, margin: r = "md", markdown: n }) => $a({ uid: e, align: oo(t), content: n, control: o, margin: r });
4892
+ var Zf = (e) => C(s({ type: "instructions" }, e), { getLocalValue: () => null, getSubmittableValue: async () => null, getSummary: () => ({}), validate: () => true });
4893
+ var Qf = (e, { control: t, items: o, margin: r = "md", title: n }) => Zf({ uid: e, control: t, items: o.map(({ context: a, text: i }) => ({ context: yr(a), text: i })), margin: r, title: n });
4894
+ var eh = (e) => C(s({ type: "loading-indicator" }, e), { getSubmittableValue: async () => null, getLocalValue: () => null, getSummary: () => ({}), validate: () => true });
4895
+ var th = (e, { size: t = "md", margin: o = "md", control: r }) => eh({ uid: e, size: t, control: r, margin: o });
4896
+ var oh = (e, { align: t = "left", margin: o = "md", control: r, content: n }) => $a({ uid: e, align: oo(t), control: r, content: n, margin: o });
4897
+ var rh = (e) => C(s({ type: "modal" }, e), { getChildren() {
4871
4898
  return this.content.components;
4872
4899
  }, getLocalValue() {
4873
4900
  return De(this.getChildren());
@@ -4876,33 +4903,33 @@ var require_main_min = __commonJS({
4876
4903
  }, getSummary() {
4877
4904
  return Ae(this.getChildren());
4878
4905
  }, validate() {
4879
- return we(this.getChildren());
4906
+ return be(this.getChildren());
4880
4907
  } });
4881
- var rh = (e, { content: t, control: o, margin: r = "md", trigger: n }, a) => {
4908
+ var nh = (e, { content: t, control: o, margin: r = "md", trigger: n }, a) => {
4882
4909
  let { components: i } = t;
4883
- return oh({ uid: e, content: { components: i.map((m, l) => Ut(`${e}.modal-${l}`, m, a)) }, control: o, margin: r, trigger: n });
4910
+ return rh({ uid: e, content: { components: i.map((m, l) => Ut(`${e}.modal-${l}`, m, a)) }, control: o, margin: r, trigger: n });
4884
4911
  };
4885
- var nh = (e) => C(s({ type: "paragraph" }, e), { getSubmittableValue: async () => null, getSummary: () => ({}), getLocalValue: () => null, validate: () => true });
4886
- var ah = (e, { align: t = "left", control: o, margin: r = "md", text: n }) => nh({ uid: e, text: n, control: o, align: ro(t), margin: r });
4887
- var ih = (e) => C(s({ type: "review" }, e), { getLocalValue: () => null, getSubmittableValue: async () => null, getSummary: () => ({}), validate: () => true });
4888
- var sh = (e, { fields: t, title: o, callToAction: r, control: n, margin: a = "md", orientation: i, action: m }, { onAction: l }) => ih({ uid: e, callToAction: cx(l, r, m), control: dx({ control: n, orientation: i }), fields: t.map((c) => {
4912
+ var ah = (e) => C(s({ type: "paragraph" }, e), { getSubmittableValue: async () => null, getSummary: () => ({}), getLocalValue: () => null, validate: () => true });
4913
+ var ih = (e, { align: t = "left", control: o, margin: r = "md", text: n }) => ah({ uid: e, text: n, control: o, align: oo(t), margin: r });
4914
+ var sh = (e) => C(s({ type: "review" }, e), { getLocalValue: () => null, getSubmittableValue: async () => null, getSummary: () => ({}), validate: () => true });
4915
+ var mh = (e, { fields: t, title: o, callToAction: r, control: n, margin: a = "md", orientation: i, action: m }, { onAction: l }) => sh({ uid: e, callToAction: fx(l, r, m), control: hx({ control: n, orientation: i }), fields: t.map((c) => {
4889
4916
  var p;
4890
4917
  return C(s({}, c), { help: (p = c.help) == null ? void 0 : p.markdown });
4891
4918
  }), margin: a, title: o });
4892
- var cx = (e, t, o) => {
4919
+ var fx = (e, t, o) => {
4893
4920
  if (t)
4894
4921
  return { title: t.title, onClick: () => e(t.action) };
4895
4922
  if (o != null && o.title)
4896
4923
  return { title: o.title, onClick: () => e(o) };
4897
4924
  };
4898
- var dx = ({ control: e, orientation: t }) => {
4925
+ var hx = ({ control: e, orientation: t }) => {
4899
4926
  if (e)
4900
4927
  return e;
4901
4928
  if (t)
4902
4929
  return t;
4903
4930
  };
4904
- var px = 400;
4905
- var mh = (e, t, o, r) => {
4931
+ var gx = 400;
4932
+ var lh = (e, t, o, r) => {
4906
4933
  let { uid: n, control: a, emptyMessage: i, margin: m, title: l } = e, c = ce(n, r), p = new AbortController(), y = (g, h) => {
4907
4934
  p.abort(), p = new AbortController();
4908
4935
  let { signal: S } = p;
@@ -4919,40 +4946,40 @@ var require_main_min = __commonJS({
4919
4946
  g === "action" ? o(h) : (c((S) => {
4920
4947
  S.query = h.query;
4921
4948
  }), y(h.query, { method: h.method, param: h.param, url: h.url }));
4922
- }, u = Ba(y, px);
4949
+ }, u = Ba(y, gx);
4923
4950
  return { type: "search", uid: n, control: a, emptyMessage: i, margin: m, title: l, isLoading: false, query: "", results: [], getSubmittableValue: async () => null, getLocalValue: () => null, getSummary: () => ({}), validate: () => true, onChange: (g) => {
4924
4951
  c((h) => {
4925
4952
  h.query = g, h.isLoading = true;
4926
4953
  }), u(g);
4927
4954
  }, onSelect: f };
4928
4955
  };
4929
- var lh = (e, t) => async ({ config: o = t, query: r, signal: n }) => {
4956
+ var ch = (e, t) => async ({ config: o = t, query: r, signal: n }) => {
4930
4957
  if (!r)
4931
4958
  return [];
4932
- let { method: a, param: i, url: m } = o, l = { "Content-Type": "application/json" }, p = await (a === "GET" ? e(yx(m, i, r), { method: a, headers: l, signal: n }) : e(m, { method: a, headers: l, signal: n, body: JSON.stringify({ [i]: r }) }));
4933
- return ux(p);
4959
+ let { method: a, param: i, url: m } = o, l = { "Content-Type": "application/json" }, p = await (a === "GET" ? e(Sx(m, i, r), { method: a, headers: l, signal: n }) : e(m, { method: a, headers: l, signal: n, body: JSON.stringify({ [i]: r }) }));
4960
+ return Cx(p);
4934
4961
  };
4935
- var ux = async (e) => {
4962
+ var Cx = async (e) => {
4936
4963
  if (e.ok) {
4937
4964
  let t = await e.json().catch(() => null);
4938
- if (fx(t))
4965
+ if (bx(t))
4939
4966
  return t.results.length === 0 ? [] : t.results;
4940
4967
  }
4941
4968
  throw Error("error response");
4942
4969
  };
4943
- var yx = (e, t, o) => {
4970
+ var Sx = (e, t, o) => {
4944
4971
  let [r, n] = e.split("?"), a = new URLSearchParams(n);
4945
4972
  return a.set(t, o), `${r}?${a.toString()}`;
4946
4973
  };
4947
- var fx = (e) => Q(e) && "results" in e && be(e.results) && e.results.every((t) => Q(t) && "title" in t && "type" in t && "value" in t);
4948
- var ch = (e, { control: t, emptyMessage: o = "", method: r, param: n, title: a, url: i, margin: m = "md" }, l) => {
4949
- let { httpClient: c, onAction: p, updateComponent: y } = l, f = lh(c, { method: r, param: n, url: i });
4950
- return mh({ uid: e, control: t, emptyMessage: o, margin: m, title: a }, f, p, y);
4974
+ var bx = (e) => Q(e) && "results" in e && ve(e.results) && e.results.every((t) => Q(t) && "title" in t && "type" in t && "value" in t);
4975
+ var dh = (e, { control: t, emptyMessage: o = "", method: r, param: n, title: a, url: i, margin: m = "md" }, l) => {
4976
+ let { httpClient: c, onAction: p, updateComponent: y } = l, f = ch(c, { method: r, param: n, url: i });
4977
+ return lh({ uid: e, control: t, emptyMessage: o, margin: m, title: a }, f, p, y);
4951
4978
  };
4952
4979
  var Ga = (e) => C(s({ type: "status-list" }, e), { getLocalValue: () => null, getSubmittableValue: async () => null, getSummary: () => ({}), validate: () => true });
4953
- var dh = (e, { control: t, items: o, margin: r = "md", title: n }) => Ga({ uid: e, control: t, items: o, margin: r, title: n });
4954
- var ph = (e, { control: t, items: o, margin: r = "md", title: n }) => Ga({ uid: e, control: t, items: o.map(({ description: a, icon: i, status: m, title: l }) => ({ description: a, icon: i, title: l, status: m ? hx(m) : void 0 })), margin: r, title: n });
4955
- var hx = (e) => {
4980
+ var ph = (e, { control: t, items: o, margin: r = "md", title: n }) => Ga({ uid: e, control: t, items: o, margin: r, title: n });
4981
+ var uh = (e, { control: t, items: o, margin: r = "md", title: n }) => Ga({ uid: e, control: t, items: o.map(({ description: a, icon: i, status: m, title: l }) => ({ description: a, icon: i, title: l, status: m ? wx(m) : void 0 })), margin: r, title: n });
4982
+ var wx = (e) => {
4956
4983
  switch (e) {
4957
4984
  case "positive":
4958
4985
  return "done";
@@ -4968,65 +4995,65 @@ var require_main_min = __commonJS({
4968
4995
  case "alert":
4969
4996
  return fr(e, t);
4970
4997
  case "box":
4971
- return Ky(e, t, o);
4998
+ return Jy(e, t, o);
4972
4999
  case "button":
4973
- return Xy(e, t, o);
5000
+ return Yy(e, t, o);
4974
5001
  case "columns":
4975
- return Zy(e, t, o);
5002
+ return Qy(e, t, o);
4976
5003
  case "decision":
4977
- return ef(e, t, o);
5004
+ return tf(e, t, o);
4978
5005
  case "divider":
4979
- return of(e, t);
5006
+ return rf(e, t);
4980
5007
  case "form":
4981
- return _f(e, t, o);
5008
+ return Kf(e, t, o);
4982
5009
  case "heading":
4983
5010
  return Da(e, t);
4984
5011
  case "image":
4985
- return Jf(e, t);
4986
- case "info":
4987
5012
  return Xf(e, t);
5013
+ case "info":
5014
+ return Yf(e, t);
4988
5015
  case "instructions":
4989
- return Zf(e, t);
5016
+ return Qf(e, t);
4990
5017
  case "list":
4991
- return ph(e, t);
5018
+ return uh(e, t);
4992
5019
  case "loading-indicator":
4993
- return eh(e, t);
4994
- case "markdown":
4995
5020
  return th(e, t);
5021
+ case "markdown":
5022
+ return oh(e, t);
4996
5023
  case "modal":
4997
- return rh(e, t, o);
5024
+ return nh(e, t, o);
4998
5025
  case "paragraph":
4999
- return ah(e, t);
5026
+ return ih(e, t);
5000
5027
  case "review":
5001
- return sh(e, t, o);
5028
+ return mh(e, t, o);
5002
5029
  case "search":
5003
- return ch(e, t, o);
5030
+ return dh(e, t, o);
5004
5031
  case "status-list":
5005
- return dh(e, t);
5032
+ return ph(e, t);
5006
5033
  default:
5007
5034
  throw new Error(`Invalid layout type in ${JSON.stringify(t)}`);
5008
5035
  }
5009
5036
  };
5010
- var uh = (r) => {
5037
+ var yh = (r) => {
5011
5038
  var n = r, { loadingState: e, displayStepTitle: t } = n, o = E(n, ["loadingState", "displayStepTitle"]);
5012
5039
  let { id: a, key: i, title: m, layout: l = [], errors: c } = o.step, p = a || i, y = p != null ? p : "step", f = m && t ? Da(`${y}.title`, { type: "heading", text: m, align: "center", size: "lg" }) : void 0, u = c != null && c.error ? fr(`${y}.global-error`, { type: "alert", markdown: c.error, context: "negative" }) : void 0, d = [...f ? [f] : [], ...u ? [u] : []], g = l.map((h, S) => Ut(`${y}.layout-${S}`, h, o));
5013
5040
  if (p === void 0)
5014
5041
  throw new Error("Step must have an id or a key");
5015
5042
  return Ys({ uid: y, loadingState: e, components: [...d, ...g] });
5016
5043
  };
5017
- var yh = (e, t) => {
5018
- let r = fh(e).filter((n) => n.uid === t);
5044
+ var fh = (e, t) => {
5045
+ let r = hh(e).filter((n) => n.uid === t);
5019
5046
  if (r.length === 1)
5020
5047
  return r[0];
5021
5048
  throw r.length > 1 ? new Error(`Multiple components with the same uid: ${t}`) : new Error(`Failed to find any components with uid: ${t}`);
5022
5049
  };
5023
- var fh = (e) => e.reduce((t, o) => La(o) ? [...t, o, ...fh(o.getChildren())] : [...t, o], []);
5050
+ var hh = (e) => e.reduce((t, o) => La(o) ? [...t, o, ...hh(o.getChildren())] : [...t, o], []);
5024
5051
  var Wa = require("react/jsx-runtime");
5025
- var hh = Uy();
5026
- function gx({ localValue: e, step: t, displayStepTitle: o = true, loadingState: r, getErrorMessageFunctions: n, render: a, httpClient: i, trackEvent: m, logEvent: l, triggerSubmission: c, triggerRefresh: p }) {
5052
+ var gh = zy();
5053
+ function Fx({ localValue: e, step: t, displayStepTitle: o = true, loadingState: r, getErrorMessageFunctions: n, render: a, httpClient: i, trackEvent: m, logEvent: l, triggerSubmission: c, triggerRefresh: p }) {
5027
5054
  var S;
5028
- let [y, f] = (0, tt.useState)(hh), u = (0, tt.useRef)(hh), d = (0, tt.useCallback)((b, w) => {
5029
- w(yh([u.current], b)), f(() => {
5055
+ let [y, f] = (0, tt.useState)(gh), u = (0, tt.useRef)(gh), d = (0, tt.useCallback)((b, w) => {
5056
+ w(fh([u.current], b)), f(() => {
5030
5057
  let F = s({}, u.current);
5031
5058
  return u.current = F, F;
5032
5059
  });
@@ -5055,152 +5082,152 @@ var require_main_min = __commonJS({
5055
5082
  }
5056
5083
  }, [t.refreshUrl, t.refreshFormUrl, p]);
5057
5084
  return (0, tt.useEffect)(() => {
5058
- let b = uh({ stepLocalValue: e, step: t, displayStepTitle: o, loadingState: r, updateComponent: d, getErrorMessageFunctions: n, trackEvent: m, logEvent: l, httpClient: i, onAction: g, onRefresh: h });
5085
+ let b = yh({ stepLocalValue: e, step: t, displayStepTitle: o, loadingState: r, updateComponent: d, getErrorMessageFunctions: n, trackEvent: m, logEvent: l, httpClient: i, onAction: g, onRefresh: h });
5059
5086
  f(b), u.current = b, t.key && l("warning", 'Step.key is deprecated, please use "id" instead');
5060
5087
  }, [t, o, d, g, n, i, m, l, h]), (0, tt.useEffect)(() => {
5061
5088
  m("Step Shown");
5062
5089
  }, [(S = t.id) != null ? S : t.key]), (0, Wa.jsx)(Wa.Fragment, { children: a(y) });
5063
5090
  }
5064
- var gh = gx;
5065
- var Ch = ({ loadingState: e }, t) => ({ type: "step", loadingState: e, children: t });
5066
- var Sh = ({ context: e, control: t, margin: o, markdown: r }) => ({ type: "alert", context: e, control: t, margin: o, markdown: r });
5067
- var bh = ({ control: e, description: t, help: o, title: r }, n) => ({ type: "form-section", children: n, control: e, description: t, help: o, title: r });
5091
+ var Ch = Fx;
5092
+ var Sh = ({ loadingState: e }, t) => ({ type: "step", loadingState: e, children: t });
5093
+ var bh = ({ context: e, control: t, margin: o, markdown: r }) => ({ type: "alert", context: e, control: t, margin: o, markdown: r });
5094
+ var wh = ({ control: e, description: t, help: o, title: r }, n) => ({ type: "form-section", children: n, control: e, description: t, help: o, title: r });
5068
5095
  var Me = (e, t) => {
5069
5096
  var h, S;
5070
- let { autoComplete: o, control: r, description: n, disabled: a, errors: i, help: m, id: l, placeholder: c, required: p, title: y, onBlur: f, onFocus: u } = e, d = Cx(e) ? e.validationState : void 0, { messages: g } = d != null ? d : {};
5097
+ let { autoComplete: o, control: r, description: n, disabled: a, errors: i, help: m, id: l, placeholder: c, required: p, title: y, onBlur: f, onFocus: u } = e, d = xx(e) ? e.validationState : void 0, { messages: g } = d != null ? d : {};
5071
5098
  return { type: t, autoComplete: o, control: r, description: (h = g == null ? void 0 : g.success) != null ? h : n, disabled: a, error: (S = g == null ? void 0 : g.error) != null ? S : i[0], help: m, id: l, label: y, placeholder: c, required: p, value: e.getLocalValue(), onBlur: f.bind(e), onFocus: u.bind(e) };
5072
5099
  };
5073
- var Cx = (e) => !!("validationState" in e && e.validationState);
5074
- var wh = (e) => {
5100
+ var xx = (e) => !!("validationState" in e && e.validationState);
5101
+ var Fh = (e) => {
5075
5102
  var t;
5076
5103
  return C(s({}, Me(e, "input-boolean")), { value: (t = e.value) != null ? t : false, onChange: e.onChange.bind(e) });
5077
5104
  };
5078
- var Fh = ({ border: e, control: t, width: o, margin: r }, n) => ({ type: "box", border: e, children: n, control: t, margin: r, width: o });
5079
- var xh = (e) => {
5105
+ var xh = ({ border: e, control: t, width: o, margin: r }, n) => ({ type: "box", border: e, children: n, control: t, margin: r, width: o });
5106
+ var vh = (e) => {
5080
5107
  let { title: t, control: o, context: r, disabled: n, margin: a, pinOrder: i, size: m, onClick: l } = e;
5081
5108
  return { type: "button", title: t, control: o, context: r, disabled: n, margin: a, pinOrder: i, size: m, onClick: l };
5082
5109
  };
5083
- var vh = ({ bias: e, control: t, margin: o }, r, n) => ({ type: "columns", bias: e, control: t, margin: o, startChildren: r, endChildren: n });
5084
- var Ph = (e) => ({ type: "container", children: e });
5085
- var Ih = (e) => C(s({}, Me(e, "input-date")), { minimumDate: e.minimumDate, maximumDate: e.maximumDate, onChange: e.onChange.bind(e) });
5086
- var Ah = ({ options: e, margin: t }) => ({ type: "decision", options: e, margin: t });
5087
- var Mh = ({ control: e, margin: t }) => ({ type: "divider", control: e, margin: t });
5088
- var Rh = ({ control: e, margin: t }, o) => ({ type: "form", children: o, control: e, margin: t });
5089
- var kh = ({ align: e, control: t, margin: o, size: r, text: n }) => ({ type: "heading", align: e, control: t, margin: o, size: r, text: n });
5110
+ var Ph = ({ bias: e, control: t, margin: o }, r, n) => ({ type: "columns", bias: e, control: t, margin: o, startChildren: r, endChildren: n });
5111
+ var Ih = (e) => ({ type: "container", children: e });
5112
+ var Ah = (e) => C(s({}, Me(e, "input-date")), { minimumDate: e.minimumDate, maximumDate: e.maximumDate, onChange: e.onChange.bind(e) });
5113
+ var Mh = ({ options: e, margin: t }) => ({ type: "decision", options: e, margin: t });
5114
+ var Rh = ({ control: e, margin: t }) => ({ type: "divider", control: e, margin: t });
5115
+ var kh = ({ control: e, margin: t }, o) => ({ type: "form", children: o, control: e, margin: t });
5116
+ var Oh = ({ align: e, control: t, margin: o, size: r, text: n }) => ({ type: "heading", align: e, control: t, margin: o, size: r, text: n });
5090
5117
  var Qs = () => ({ type: "hidden" });
5091
- var Oh = ({ accessibilityDescription: e, control: t, margin: o, size: r, url: n }) => ({ type: "image", accessibilityDescription: e, control: t, margin: o, size: r, url: n });
5092
- var Eh = ({ control: e, items: t, margin: o, title: r }) => ({ type: "instructions", control: e, items: t, margin: o, title: r });
5093
- var Lh = (e) => C(s({}, Me(e, "input-integer")), { onChange: e.onChange.bind(e) });
5094
- var Th = ({ control: e, margin: t, size: o }) => ({ type: "loading-indicator", control: e, margin: t, size: o });
5095
- var Dh = ({ align: e, content: t, control: o, margin: r }) => ({ type: "markdown", align: e, margin: r, content: t, control: o });
5096
- var Vh = ({ control: e, margin: t, trigger: o }, r) => ({ type: "modal", content: { components: r }, control: e, margin: t, trigger: o });
5097
- var Nh = (e) => {
5118
+ var Eh = ({ accessibilityDescription: e, control: t, margin: o, size: r, url: n }) => ({ type: "image", accessibilityDescription: e, control: t, margin: o, size: r, url: n });
5119
+ var Lh = ({ control: e, items: t, margin: o, title: r }) => ({ type: "instructions", control: e, items: t, margin: o, title: r });
5120
+ var Th = (e) => C(s({}, Me(e, "input-integer")), { onChange: e.onChange.bind(e) });
5121
+ var Dh = ({ control: e, margin: t, size: o }) => ({ type: "loading-indicator", control: e, margin: t, size: o });
5122
+ var Vh = ({ align: e, content: t, control: o, margin: r }) => ({ type: "markdown", align: e, margin: r, content: t, control: o });
5123
+ var Nh = ({ control: e, margin: t, trigger: o }, r) => ({ type: "modal", content: { components: r }, control: e, margin: t, trigger: o });
5124
+ var Bh = (e) => {
5098
5125
  let { accepts: t, fileMap: o, maxSize: r, minItems: n, maxItems: a, uploadLabel: i } = e, m = (c) => Object.keys(o).find((p) => o[p] === c), l = Object.values(o).map((c) => {
5099
5126
  var p;
5100
5127
  return { id: (p = m(c)) != null ? p : "", file: c };
5101
5128
  });
5102
5129
  return C(s({}, Me(e, "input-upload-multi")), { accepts: t, maxSize: r, minItems: n, maxItems: a, uploadLabel: i, value: l, onUpload: e.onUpload.bind(e), onDelete: e.onDelete.bind(e) });
5103
5130
  };
5104
- var Bh = (e) => C(s({}, Me(e, "input-number")), { onChange: e.onChange.bind(e) });
5105
- var Uh = ({ control: e, description: t, help: o, title: r }, n) => ({ type: "form-section", children: n, control: e, description: t, help: o, title: r });
5106
- var zh = ({ align: e, control: t, margin: o, text: r }) => ({ type: "paragraph", align: e, control: t, margin: o, text: r });
5107
- var jh = (e, t, o) => {
5131
+ var Uh = (e) => C(s({}, Me(e, "input-number")), { onChange: e.onChange.bind(e) });
5132
+ var zh = ({ control: e, description: t, help: o, title: r }, n) => ({ type: "form-section", children: n, control: e, description: t, help: o, title: r });
5133
+ var jh = ({ align: e, control: t, margin: o, text: r }) => ({ type: "paragraph", align: e, control: t, margin: o, text: r });
5134
+ var Hh = (e, t, o) => {
5108
5135
  let { addItemTitle: r, control: n, components: a, description: i, editItemTitle: m, errors: l, summaryDefaults: c, title: p = "", onEdit: y, onAdd: f, onSave: u, onRemove: d } = e, g = (S) => {
5109
5136
  var b, w, F, x;
5110
5137
  return { title: (b = S.title) != null ? b : c.title, description: (w = S.description) != null ? w : c.description, icon: (F = S.icon) != null ? F : c.icon, image: (x = S.image) != null ? x : c.image };
5111
5138
  }, h = a.map((S) => C(s({}, g(S.getSummary())), { id: `${S.uid}-summary` }));
5112
5139
  return { type: "repeatable", children: t, control: n, items: h, editableItem: o, title: p, description: i, addItemTitle: r, editItemTitle: m, error: l[0], onAdd: f.bind(e), onEdit: y.bind(e), onSave: u.bind(e), onRemove: d.bind(e) };
5113
5140
  };
5114
- var Hh = ({ callToAction: e, control: t, fields: o, margin: r, title: n }) => ({ type: "review", callToAction: e, control: t, fields: o, margin: r, title: n });
5115
- var qh = (e) => {
5116
- let { uid: t, control: o, emptyMessage: r, error: n, isLoading: a, margin: i, query: m, results: l, title: c } = e, p = e.onChange.bind(e), y = e.onSelect.bind(e), f = Sx({ emptyMessage: r, error: n, query: m, results: l, onChange: p, onSelect: y });
5141
+ var qh = ({ callToAction: e, control: t, fields: o, margin: r, title: n }) => ({ type: "review", callToAction: e, control: t, fields: o, margin: r, title: n });
5142
+ var $h = (e) => {
5143
+ let { uid: t, control: o, emptyMessage: r, error: n, isLoading: a, margin: i, query: m, results: l, title: c } = e, p = e.onChange.bind(e), y = e.onSelect.bind(e), f = vx({ emptyMessage: r, error: n, query: m, results: l, onChange: p, onSelect: y });
5117
5144
  return { type: "search", id: t, control: o, isLoading: a, margin: i, query: m, state: f, title: c, onChange: p };
5118
5145
  };
5119
- var Sx = ({ emptyMessage: e, error: t, query: o, results: r, onChange: n, onSelect: a }) => o ? t ? { type: "error", onRetry: () => n(o) } : r.length === 0 ? { type: "noResults", message: e } : { type: "results", results: r.map((m) => C(s({}, m), { onClick: () => a(m) })) } : { type: "pending" };
5120
- var $h = (e, t) => {
5146
+ var vx = ({ emptyMessage: e, error: t, query: o, results: r, onChange: n, onSelect: a }) => o ? t ? { type: "error", onRetry: () => n(o) } : r.length === 0 ? { type: "noResults", message: e } : { type: "results", results: r.map((m) => C(s({}, m), { onClick: () => a(m) })) } : { type: "pending" };
5147
+ var Gh = (e, t) => {
5121
5148
  var l;
5122
5149
  let { options: o, selectedIndex: r, onSelect: n } = e, m = Me(e, "input-select"), { value: a } = m, i = E(m, ["value"]);
5123
5150
  return C(s({}, i), { options: o, selectedIndex: r, onSelect: n.bind(e), children: (l = t[r != null ? r : -1]) != null ? l : null });
5124
5151
  };
5125
- var Gh = ({ control: e, items: t, margin: o, title: r }) => ({ type: "status-list", control: e, items: t, margin: o, title: r });
5126
- var Wh = (e) => C(s({}, Me(e, "input-text")), { displayFormat: e.displayFormat, onChange: e.onChange.bind(e) });
5127
- var _h = (e) => {
5152
+ var Wh = ({ control: e, items: t, margin: o, title: r }) => ({ type: "status-list", control: e, items: t, margin: o, title: r });
5153
+ var _h = (e) => C(s({}, Me(e, "input-text")), { displayFormat: e.displayFormat, onChange: e.onChange.bind(e) });
5154
+ var Kh = (e) => {
5128
5155
  let { accepts: t, maxSize: o } = e;
5129
5156
  return C(s({}, Me(e, "input-upload")), { accepts: t, maxSize: o, onUpload: e.onUpload.bind(e) });
5130
5157
  };
5131
- var Kh = (e, t) => {
5158
+ var Jh = (e, t) => {
5132
5159
  let { children: o, startChildren: r, endChildren: n, editableItemChildren: a } = t;
5133
- if (Sy(e))
5160
+ if (by(e))
5134
5161
  return Qs();
5135
5162
  switch (e.type) {
5136
5163
  case "step":
5137
- return Ch(e, o);
5164
+ return Sh(e, o);
5138
5165
  case "alert":
5139
- return Sh(e);
5166
+ return bh(e);
5140
5167
  case "all-of":
5141
- return bh(e, o);
5168
+ return wh(e, o);
5142
5169
  case "boolean":
5143
- return wh(e);
5170
+ return Fh(e);
5144
5171
  case "box":
5145
- return Fh(e, o);
5172
+ return xh(e, o);
5146
5173
  case "button":
5147
- return xh(e);
5174
+ return vh(e);
5148
5175
  case "columns":
5149
- return vh(e, r, n);
5176
+ return Ph(e, r, n);
5150
5177
  case "container":
5151
- return Ph(o);
5178
+ return Ih(o);
5152
5179
  case "date":
5153
- return Ih(e);
5154
- case "decision":
5155
5180
  return Ah(e);
5156
- case "divider":
5181
+ case "decision":
5157
5182
  return Mh(e);
5183
+ case "divider":
5184
+ return Rh(e);
5158
5185
  case "form":
5159
- return Rh(e, o);
5186
+ return kh(e, o);
5160
5187
  case "heading":
5161
- return kh(e);
5188
+ return Oh(e);
5162
5189
  case "const":
5163
5190
  return Qs();
5164
5191
  case "image":
5165
- return Oh(e);
5166
- case "instructions":
5167
5192
  return Eh(e);
5168
- case "integer":
5193
+ case "instructions":
5169
5194
  return Lh(e);
5170
- case "loading-indicator":
5195
+ case "integer":
5171
5196
  return Th(e);
5172
- case "markdown":
5197
+ case "loading-indicator":
5173
5198
  return Dh(e);
5199
+ case "markdown":
5200
+ return Vh(e);
5174
5201
  case "modal":
5175
- return Vh(e, o);
5202
+ return Nh(e, o);
5176
5203
  case "multi-upload":
5177
- return Nh(e);
5178
- case "number":
5179
5204
  return Bh(e);
5205
+ case "number":
5206
+ return Uh(e);
5180
5207
  case "object":
5181
- return Uh(e, o);
5208
+ return zh(e, o);
5182
5209
  case "paragraph":
5183
- return zh(e);
5210
+ return jh(e);
5184
5211
  case "repeatable":
5185
- return jh(e, o != null ? o : [], a);
5212
+ return Hh(e, o != null ? o : [], a);
5186
5213
  case "review":
5187
- return Hh(e);
5188
- case "search":
5189
5214
  return qh(e);
5215
+ case "search":
5216
+ return $h(e);
5190
5217
  case "select":
5191
- return $h(e, o != null ? o : []);
5218
+ return Gh(e, o != null ? o : []);
5192
5219
  case "status-list":
5193
- return Gh(e);
5194
- case "text":
5195
5220
  return Wh(e);
5196
- case "upload":
5221
+ case "text":
5197
5222
  return _h(e);
5223
+ case "upload":
5224
+ return Kh(e);
5198
5225
  default:
5199
5226
  throw new Error("Unknown component type");
5200
5227
  }
5201
5228
  };
5202
- var Xh = require("react/jsx-runtime");
5203
- var Jh = (e) => {
5229
+ var Yh = require("react/jsx-runtime");
5230
+ var Xh = (e) => {
5204
5231
  function t(n) {
5205
5232
  let { type: a } = n;
5206
5233
  if (a === "hidden")
@@ -5210,14 +5237,14 @@ var require_main_min = __commonJS({
5210
5237
  throw new Error(`Could not find a renderer for ${a}`);
5211
5238
  return i.render(n);
5212
5239
  }
5213
- let o = (n) => La(n) ? Cy(n) ? { startChildren: n.startComponents.map(r), endChildren: n.endComponents.map(r) } : by(n) ? { children: n.components.map(r), editableItemChildren: n.editableComponent !== null ? r(n.editableComponent) : null } : { children: n.getChildren().map(r) } : {}, r = (n) => (0, Xh.jsx)(t, s({}, Kh(n, o(n))), n.uid);
5240
+ let o = (n) => La(n) ? Sy(n) ? { startChildren: n.startComponents.map(r), endChildren: n.endComponents.map(r) } : wy(n) ? { children: n.components.map(r), editableItemChildren: n.editableComponent !== null ? r(n.editableComponent) : null } : { children: n.getChildren().map(r) } : {}, r = (n) => (0, Yh.jsx)(t, s({}, Jh(n, o(n))), n.uid);
5214
5241
  return r;
5215
5242
  };
5216
5243
  var em = require("@transferwise/formatting");
5217
- function Zh(e, t) {
5218
- return (o) => bx(o != null ? o : {}, e, t);
5244
+ function Qh(e, t) {
5245
+ return (o) => Px(o != null ? o : {}, e, t);
5219
5246
  }
5220
- var bx = (e, t, o) => ({ minimum(r) {
5247
+ var Px = (e, t, o) => ({ minimum(r) {
5221
5248
  var n;
5222
5249
  return (n = e.minimum) != null ? n : t(ae.minimum, { minimum: r });
5223
5250
  }, maximum(r) {
@@ -5225,10 +5252,10 @@ var require_main_min = __commonJS({
5225
5252
  return (n = e.maximum) != null ? n : t(ae.maximum, { maximum: r });
5226
5253
  }, minimumDate(r) {
5227
5254
  var n;
5228
- return (n = e.minimum) != null ? n : t(ae.minimumDate, { minimum: (0, em.formatDate)(new Date(r), o, Yh) });
5255
+ return (n = e.minimum) != null ? n : t(ae.minimumDate, { minimum: (0, em.formatDate)(new Date(r), o, Zh) });
5229
5256
  }, maximumDate(r) {
5230
5257
  var n;
5231
- return (n = e.maximum) != null ? n : t(ae.maximumDate, { maximum: (0, em.formatDate)(new Date(r), o, Yh) });
5258
+ return (n = e.maximum) != null ? n : t(ae.maximumDate, { maximum: (0, em.formatDate)(new Date(r), o, Zh) });
5232
5259
  }, minLength(r) {
5233
5260
  var n;
5234
5261
  return (n = e.minLength) != null ? n : t(ae.minLength, { minLength: r });
@@ -5254,20 +5281,20 @@ var require_main_min = __commonJS({
5254
5281
  var r;
5255
5282
  return (r = e.required) != null ? r : t(ae.required);
5256
5283
  }, genericError() {
5257
- return t(ve.genericError);
5284
+ return t(xe.genericError);
5258
5285
  }, genericErrorWithRetry() {
5259
- return t(ve.genericErrorRetryHint);
5286
+ return t(xe.genericErrorRetryHint);
5260
5287
  } });
5261
- var Yh = { timeZone: "UTC", dateStyle: "long" };
5288
+ var Zh = { timeZone: "UTC", dateStyle: "long" };
5262
5289
  var tm = require("react/jsx-runtime");
5263
- function eg(e) {
5290
+ function tg(e) {
5264
5291
  var M;
5265
- let { flowId: t, displayStepTitle: o, httpClient: r, initialAction: n, initialStep: a, renderers: i, onCompletion: m, onError: l, onEvent: c, onLog: p } = e, { formatMessage: y, locale: f } = (0, Qh.useIntl)(), u = (0, he.useMemo)(() => Zh(y, f), [y, f]);
5292
+ let { flowId: t, displayStepTitle: o, httpClient: r, initialAction: n, initialStep: a, renderers: i, onCompletion: m, onError: l, onEvent: c, onLog: p } = e, { formatMessage: y, locale: f } = (0, eg.useIntl)(), u = (0, he.useMemo)(() => Qh(y, f), [y, f]);
5266
5293
  (0, he.useEffect)(() => {
5267
5294
  var z;
5268
5295
  !a && n && k(n, (z = n.data) != null ? z : {}, null);
5269
5296
  }, []);
5270
- let [d, g] = (0, he.useState)(a != null ? a : null), h = (0, he.useRef)(null), [S, b] = (0, he.useState)(null), w = (0, he.useRef)(new AbortController()), [F, x] = (0, he.useState)(a ? "idle" : "loading"), P = () => (w.current.abort(), w.current = new AbortController(), w.current.signal), R = (M = d == null ? void 0 : d.id) != null ? M : d == null ? void 0 : d.key, A = d == null ? void 0 : d.analytics, O = (0, he.useMemo)(() => yy({ flowId: t, stepId: R, analytics: A, onEvent: c }), [t, R, JSON.stringify(A), c]), v = (0, he.useMemo)(() => fy(p), [p]);
5297
+ let [d, g] = (0, he.useState)(a != null ? a : null), h = (0, he.useRef)(null), [S, b] = (0, he.useState)(null), w = (0, he.useRef)(new AbortController()), [F, x] = (0, he.useState)(a ? "idle" : "loading"), P = () => (w.current.abort(), w.current = new AbortController(), w.current.signal), R = (M = d == null ? void 0 : d.id) != null ? M : d == null ? void 0 : d.key, A = d == null ? void 0 : d.analytics, O = (0, he.useMemo)(() => fy({ flowId: t, stepId: R, analytics: A, onEvent: c }), [t, R, JSON.stringify(A), c]), v = (0, he.useMemo)(() => hy(p), [p]);
5271
5298
  (0, he.useEffect)(() => O("Flow Started"), []);
5272
5299
  let L = (0, he.useCallback)((z, V) => {
5273
5300
  O("Flow Failed", s({}, V)), l(z);
@@ -5275,7 +5302,7 @@ var require_main_min = __commonJS({
5275
5302
  console.log("\u23EF\uFE0F triggerSubmission", JSON.stringify({ action: z, model: V }, null, 2));
5276
5303
  try {
5277
5304
  x("loading");
5278
- let G = await Oy({ action: z, model: V, isInitial: d === null, httpClient: r, trackEvent: O });
5305
+ let G = await Ey({ action: z, model: V, isInitial: d === null, httpClient: r, trackEvent: O });
5279
5306
  switch (G.type) {
5280
5307
  case "complete": {
5281
5308
  h.current = null, m(G.result), O("Flow Succeeded");
@@ -5331,17 +5358,17 @@ var require_main_min = __commonJS({
5331
5358
  } catch (de) {
5332
5359
  L(de, void 0);
5333
5360
  }
5334
- }, [S, r, O, L]), U = (0, he.useMemo)(() => Jh([Ey, ...i, Ty]), [i]);
5335
- return (0, tm.jsx)(Hr, { onError: l, children: d ? (0, tm.jsx)(gh, { displayStepTitle: o, step: d, localValue: h.current, loadingState: F, getErrorMessageFunctions: u, render: U, httpClient: r, trackEvent: O, logEvent: v, triggerSubmission: k, triggerRefresh: q }) : null });
5361
+ }, [S, r, O, L]), U = (0, he.useMemo)(() => Xh([Ly, ...i, Dy]), [i]);
5362
+ return (0, tm.jsx)(Hr, { onError: L, children: d ? (0, tm.jsx)(Ch, { displayStepTitle: o, step: d, localValue: h.current, loadingState: F, getErrorMessageFunctions: u, render: U, httpClient: r, trackEvent: O, logEvent: v, triggerSubmission: k, triggerRefresh: q }) : null });
5336
5363
  }
5337
5364
  var om = require("react/jsx-runtime");
5338
- var wx = uy();
5339
- function Fx(e) {
5340
- let { httpClient: t } = e, { locale: o } = (0, og.useIntl)(), r = (0, tg.useMemo)(() => xx(t, o), [t, o]);
5341
- return (0, om.jsx)(Sn, { httpClient: r, children: (0, om.jsx)(eg, C(s({}, e), { renderers: wx })) });
5365
+ var Ix = yy();
5366
+ function Ax(e) {
5367
+ let { httpClient: t } = e, { locale: o } = (0, rg.useIntl)(), r = (0, og.useMemo)(() => Mx(t, o), [t, o]);
5368
+ return (0, om.jsx)(Sn, { httpClient: r, children: (0, om.jsx)(tg, C(s({}, e), { renderers: Ix })) });
5342
5369
  }
5343
- var rg = Fx;
5344
- var xx = (e, t) => async (o, r) => e(o, ui(r, { credentials: "include", headers: { "accept-language": t } }));
5370
+ var ng = Ax;
5371
+ var Mx = (e, t) => async (o, r) => e(o, ui(r, { credentials: "include", headers: { "accept-language": t } }));
5345
5372
  }
5346
5373
  });
5347
5374