@tesouro/embedded-components-react 0.11.222 → 0.11.224
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/README.md +12 -2
- package/dist/index.d.ts +14 -2
- package/dist/lib/BankAccountOnboardingWidget.d.ts +12 -0
- package/dist/lib/WidgetProvider.d.ts +2 -2
- package/dist/lib/WidgetSuite.d.ts +12 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index13.js +17 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BankAccountOnboardingWidget.js +335 -321
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/labels.js +9 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/testIds.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/analytics/events.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/deviceProfiling/DeviceProfiling.js +50 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/deviceProfiling/deviceProfilingPage.js +119 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/deviceProfiling/index.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/deviceProfiling/useDeviceProfiling.js +88 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/mocks/bankAccountOnboarding.js +57 -54
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/index.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/csp.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/loadScript.js +17 -0
- package/package.json +1 -1
|
@@ -44,21 +44,23 @@ import { buildCreateApplicationBody as De, buildUpdateApplicationBody as Oe } fr
|
|
|
44
44
|
import { buildOnboardingPrefill as _ } from "./buildOnboardingPrefill.js";
|
|
45
45
|
import { acceptDraftedValues as ke, asCreateBody as Ae, buildDraftApplicationBody as je, withApplicantWorkEmail as Me } from "./draftApplicationMapping.js";
|
|
46
46
|
import { OnboardingAnalyticsEvent as Ne, WIDGET_NAME as Pe } from "../analytics/events.js";
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import { useStartedBankAccountApplication as Ge } from "../../../../data-access/dist/index12.js";
|
|
47
|
+
import { ApplicationClientSecretProvider as Fe, useApplicationClientSecret as Ie } from "../../../../data-access/dist/index3.js";
|
|
48
|
+
import { useCreateApplication as Le } from "../../../../data-access/dist/index5.js";
|
|
49
|
+
import { useUpdateApplication as Re } from "../../../../data-access/dist/index6.js";
|
|
50
|
+
import { useSubmitApplication as ze } from "../../../../data-access/dist/index7.js";
|
|
51
|
+
import { useDeleteApplication as Be } from "../../../../data-access/dist/index8.js";
|
|
52
|
+
import { usePollApplicationCompletion as Ve } from "../../../../data-access/dist/index9.js";
|
|
53
|
+
import { useResumableBankAccountApplication as He } from "../../../../data-access/dist/index11.js";
|
|
54
|
+
import { useStartedBankAccountApplication as Ue } from "../../../../data-access/dist/index12.js";
|
|
56
55
|
import "../../../../data-access/dist/index.js";
|
|
57
|
-
import {
|
|
58
|
-
import
|
|
56
|
+
import { DeviceProfilingGate as We, DeviceProfilingProvider as Ge } from "../deviceProfiling/DeviceProfiling.js";
|
|
57
|
+
import "../deviceProfiling/index.js";
|
|
58
|
+
import { withoutResumeOnlyOwnerFields as Ke, withoutStoredIdentifierMarkers as qe } from "./hostInitialValues.js";
|
|
59
|
+
import { useCallback as v, useEffect as y, useMemo as Je, useReducer as Ye, useRef as b, useState as x } from "react";
|
|
60
|
+
import { Fragment as Xe, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
59
61
|
// ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BankAccountOnboardingWidget.js
|
|
60
|
-
var
|
|
61
|
-
function
|
|
62
|
+
var Ze = 2 ** 31 - 1, Qe = "DRAFT", $e = [], et = "ttw:grid ttw:w-full ttw:place-items-center ttw:overflow-auto ttw:bg-background ttw:p-6", w = (e) => be(e, void 0);
|
|
63
|
+
function tt(e) {
|
|
62
64
|
return {
|
|
63
65
|
...e,
|
|
64
66
|
taxId: "",
|
|
@@ -66,23 +68,23 @@ function $e(e) {
|
|
|
66
68
|
taxIdOnFileStructure: e.companyStructure === "" ? void 0 : e.companyStructure
|
|
67
69
|
};
|
|
68
70
|
}
|
|
69
|
-
function
|
|
71
|
+
function nt(e) {
|
|
70
72
|
return {
|
|
71
73
|
...e,
|
|
72
74
|
ssn: "",
|
|
73
75
|
ssnOnFileLast4: ye(e.ssn)
|
|
74
76
|
};
|
|
75
77
|
}
|
|
76
|
-
function
|
|
78
|
+
function rt(e, t) {
|
|
77
79
|
return t ? t.index === null ? [...e, {
|
|
78
80
|
...t.owner,
|
|
79
81
|
reviewed: !1
|
|
80
82
|
}] : e.map((e, n) => n === t.index ? t.owner : e) : e;
|
|
81
83
|
}
|
|
82
|
-
function
|
|
84
|
+
function it(e) {
|
|
83
85
|
return e.map(({ reviewed: e, ...t }) => t);
|
|
84
86
|
}
|
|
85
|
-
var
|
|
87
|
+
var at = {
|
|
86
88
|
companyLegalName: "",
|
|
87
89
|
companyDbaName: "",
|
|
88
90
|
businessAddress: "",
|
|
@@ -96,7 +98,7 @@ var rt = {
|
|
|
96
98
|
naicsCode: "",
|
|
97
99
|
isAuthorized: null,
|
|
98
100
|
isCheckboxChecked: !1
|
|
99
|
-
},
|
|
101
|
+
}, ot = {
|
|
100
102
|
firstName: "",
|
|
101
103
|
lastName: "",
|
|
102
104
|
dateOfBirth: void 0,
|
|
@@ -115,7 +117,7 @@ var rt = {
|
|
|
115
117
|
review: 2,
|
|
116
118
|
terms: 3
|
|
117
119
|
};
|
|
118
|
-
function
|
|
120
|
+
function st(e, t) {
|
|
119
121
|
return e === T.personal ? {
|
|
120
122
|
title: t.personalReviewTitle,
|
|
121
123
|
subtitle: t.personalReviewSubtitle
|
|
@@ -130,13 +132,13 @@ function at(e, t) {
|
|
|
130
132
|
subtitle: t.termsSubtitle
|
|
131
133
|
};
|
|
132
134
|
}
|
|
133
|
-
function
|
|
135
|
+
function ct({ callback: e }) {
|
|
134
136
|
return y(() => {
|
|
135
137
|
e?.();
|
|
136
138
|
}, [e]), null;
|
|
137
139
|
}
|
|
138
|
-
function
|
|
139
|
-
let D = f(), { authEpoch:
|
|
140
|
+
function lt({ onEmbeddedOnboardingCompletedSuccessfully: p, onNavigateToDashboard: fe, onSuppressed: be, labels: _, initialBusinessDetails: Pe, initialPersonalDetails: Fe, initialAdditionalOwners: He, initialApplicationId: Ue = null, initialWrittenSections: Ge, initialBoundAuthEpoch: qe, onEditableDraftChange: Qe, onApplicationDeleted: lt, onNoticeReplacedByForm: ut, focusFormOnMount: E = !1, onFocusFormOnMountDone: dt, bankLogoSrc: ft, disclosureLinks: pt, showApplicationStatusRefresh: mt = !1, onResultPhaseChange: ht }) {
|
|
141
|
+
let D = f(), { authEpoch: gt } = i();
|
|
140
142
|
y(() => {
|
|
141
143
|
D(Ne.Mounted);
|
|
142
144
|
}, [D]);
|
|
@@ -165,57 +167,61 @@ function st({ onEmbeddedOnboardingCompletedSuccessfully: p, onNavigateToDashboar
|
|
|
165
167
|
..._?.result
|
|
166
168
|
},
|
|
167
169
|
deleteApplicationDialog: _?.deleteApplicationDialog ?? {},
|
|
168
|
-
applicationStatus: _e(_?.applicationStatus)
|
|
169
|
-
|
|
170
|
+
applicationStatus: _e(_?.applicationStatus),
|
|
171
|
+
deviceProfiling: {
|
|
172
|
+
...m.deviceProfiling,
|
|
173
|
+
..._?.deviceProfiling
|
|
174
|
+
}
|
|
175
|
+
}, k = ne().initResponse, { termsHref: _t, privacyHref: vt, electronicCommunicationHref: yt, patriotActHref: bt } = pt ?? {}, xt = v(() => {
|
|
170
176
|
p();
|
|
171
|
-
}, [p]),
|
|
172
|
-
...
|
|
177
|
+
}, [p]), St = te(), [A, j] = x(T.personal), [M, Ct] = x(() => ({
|
|
178
|
+
...at,
|
|
173
179
|
...Pe
|
|
174
|
-
})), [N,
|
|
175
|
-
...
|
|
176
|
-
...
|
|
177
|
-
})), [P, F] =
|
|
180
|
+
})), [N, wt] = x(() => ({
|
|
181
|
+
...ot,
|
|
182
|
+
...Fe
|
|
183
|
+
})), [P, F] = x(() => He ?? []), [I, Tt] = x(() => ({
|
|
178
184
|
business: M,
|
|
179
185
|
personal: N,
|
|
180
186
|
owners: P
|
|
181
|
-
})), [
|
|
187
|
+
})), [Et, Dt] = x(null);
|
|
182
188
|
y(() => {
|
|
183
|
-
if (!
|
|
189
|
+
if (!Et) return;
|
|
184
190
|
let e = {
|
|
185
191
|
business: M,
|
|
186
192
|
personal: N,
|
|
187
193
|
owners: P
|
|
188
194
|
};
|
|
189
|
-
|
|
195
|
+
Tt((t) => Et.next(e, t)), Dt(null);
|
|
190
196
|
}, [
|
|
191
|
-
|
|
197
|
+
Et,
|
|
192
198
|
M,
|
|
193
199
|
N,
|
|
194
200
|
P
|
|
195
201
|
]);
|
|
196
|
-
let
|
|
202
|
+
let Ot = (e, { ownersCleared: t = !1 } = {}) => Dt({ next: (n, r) => ({
|
|
197
203
|
business: e.includes("business") ? n.business : r.business,
|
|
198
204
|
personal: e.includes("personal") ? n.personal : r.personal,
|
|
199
|
-
owners: t ?
|
|
200
|
-
}) }), [L,
|
|
205
|
+
owners: t ? $e : e.includes("owners") ? n.owners : r.owners
|
|
206
|
+
}) }), [L, kt] = x(null), [At, jt] = x(0), [Mt, Nt] = x(null), [Pt, Ft] = x(!1), [R, It] = x(null), [z, Lt] = x(null), [Rt, zt] = x(null), [B, Bt] = x(Ue), [Vt, Ht] = x(() => Ge ?? {
|
|
201
207
|
business: !1,
|
|
202
208
|
owners: !1
|
|
203
|
-
}), [Ut, Wt] =
|
|
209
|
+
}), [Ut, Wt] = x({}), Gt = (e) => Wt((t) => ({
|
|
204
210
|
...t,
|
|
205
|
-
...e.taxId &&
|
|
211
|
+
...e.taxId && w(e.taxId) && e.taxIdStructure ? {
|
|
206
212
|
taxId: e.taxId,
|
|
207
213
|
taxIdStructure: e.taxIdStructure
|
|
208
214
|
} : {},
|
|
209
|
-
...e.ssn &&
|
|
215
|
+
...e.ssn && w(e.ssn) ? { ssn: e.ssn } : {}
|
|
210
216
|
})), Kt = (e) => {
|
|
211
217
|
let { taxId: t, taxIdStructure: n } = Ut, r = t !== void 0 && n !== void 0 && e.companyStructure !== M.companyStructure && e.companyStructure !== "" && e.companyStructure === "SOLE_PROPRIETORSHIP" != (n === "SOLE_PROPRIETORSHIP");
|
|
212
|
-
|
|
218
|
+
Ct(r ? {
|
|
213
219
|
...e,
|
|
214
220
|
taxId: e.taxId === t ? "" : e.taxId,
|
|
215
221
|
taxIdOnFileLast4: ye(t),
|
|
216
222
|
taxIdOnFileStructure: n
|
|
217
223
|
} : e);
|
|
218
|
-
}, [qt, Jt] =
|
|
224
|
+
}, [qt, Jt] = x(qe ?? gt), [Yt, V] = x(null), [Xt, Zt] = x(null), [Qt, $t] = x(0), en = b(null);
|
|
219
225
|
y(() => {
|
|
220
226
|
if (Qt === 0) return;
|
|
221
227
|
let e = en.current, t = (t) => {
|
|
@@ -224,72 +230,72 @@ function st({ onEmbeddedOnboardingCompletedSuccessfully: p, onNavigateToDashboar
|
|
|
224
230
|
};
|
|
225
231
|
(t("[aria-invalid=\"true\"]") ?? t("[data-needs-attention]"))?.focus();
|
|
226
232
|
}, [Qt]);
|
|
227
|
-
let [tn, nn] =
|
|
228
|
-
|
|
229
|
-
let
|
|
233
|
+
let [tn, nn] = x(!1), [rn, an] = x(!1), [on, sn] = x(!1), [cn, ln] = x(null), un = Le(), H = Re(), dn = ze(), fn = Be(), pn = Ve(), { setClientSecret: mn } = Ie(), { data: hn, refetch: gn } = s(), { mutateAsync: _n } = o(), vn = l(), U = u(), yn = re(), [bn, xn] = Ye((e) => e + 1, 0), Sn = Je(() => se(U.applications), [U.applications]), Cn = b(null);
|
|
234
|
+
U.isResolved && (Cn.current = { application: Sn });
|
|
235
|
+
let W = U.isResolved ? Sn : Cn.current?.application ?? null, wn = oe(W), G = ve(W), Tn = U.isResolved || Cn.current !== null && G === pe.Form;
|
|
230
236
|
y(() => {
|
|
231
237
|
if (wn === null) return;
|
|
232
238
|
let e = wn - Date.now();
|
|
233
239
|
if (e < 0) return;
|
|
234
|
-
let t = setTimeout(xn, Math.min(e + 1,
|
|
240
|
+
let t = setTimeout(xn, Math.min(e + 1, Ze));
|
|
235
241
|
return () => clearTimeout(t);
|
|
236
242
|
}, [wn, bn]);
|
|
237
|
-
let En =
|
|
243
|
+
let En = b(null);
|
|
238
244
|
y(() => () => En.current?.abort(), []);
|
|
239
|
-
let Dn =
|
|
240
|
-
jn.current =
|
|
241
|
-
if (
|
|
242
|
-
}, [
|
|
243
|
-
let Mn = k?.status === "ACTIVE" || k?.status === "INACTIVE", Nn = k?.status === "INVITED", Pn = Mn || Nn,
|
|
244
|
-
Ln && Rn !== (
|
|
245
|
-
let
|
|
246
|
-
Ln &&
|
|
247
|
-
let
|
|
248
|
-
|
|
249
|
-
let
|
|
245
|
+
let Dn = Je(() => ae(O.businessDetails.naicsTitles), [O.businessDetails.naicsTitles]), On = Je(() => r(O.businessDetails.stateTitles), [O.businessDetails.stateTitles]), kn = Je(() => r(O.personalDetails.stateTitles), [O.personalDetails.stateTitles]), An = Je(() => r(O.additionalOwners.stateTitles), [O.additionalOwners.stateTitles]), K = on || cn !== null, jn = b(ht);
|
|
246
|
+
jn.current = ht, y(() => {
|
|
247
|
+
if (K) return jn.current?.(!0), () => jn.current?.(!1);
|
|
248
|
+
}, [K]);
|
|
249
|
+
let Mn = k?.status === "ACTIVE" || k?.status === "INACTIVE", Nn = k?.status === "INVITED", Pn = Mn || Nn, q = vn.isResolved && Tn, Fn = k && !K && !Pn && q && ge(G) ? G : null, In = !!k && !K && Fn === null && (Pn || q && (vn.isSuppressed || G === pe.Hidden)), J = In ? Mn ? c.UserAlreadyOnboarded : Nn ? c.UserInvitedToOrganization : G === pe.Hidden ? he(W) : vn.reason ?? he(W) : null, Ln = !!k && q && !K, [Rn, zn] = x(!1), Bn = Rn && In && !Pn && J !== c.OrganizationApplicationDenialExpired, Y = Fn ?? (Bn ? "unavailable" : null);
|
|
250
|
+
Ln && Rn !== (Y !== null) && zn(Y !== null);
|
|
251
|
+
let Vn = Bn && J === c.OrganizationApplicationComplete, Hn = ie(), [Un, Wn] = x("idle"), [Gn, Kn] = x(!1);
|
|
252
|
+
Ln && Vn !== Gn && (Kn(Vn), Vn && Wn("requested")), Un === "requested" && Hn && Wn("inFlight"), Un === "inFlight" && !Hn && Wn("idle");
|
|
253
|
+
let qn = Vn && Un !== "idle", Jn = b(be);
|
|
254
|
+
Jn.current = be;
|
|
255
|
+
let Yn = In && Y === null;
|
|
250
256
|
y(() => {
|
|
251
|
-
|
|
257
|
+
Yn && J && (D(Ne.Suppressed, { reason: J }), console.info(`[onboarding] not shown: ${J}`), Jn.current?.(J));
|
|
252
258
|
}, [
|
|
253
|
-
|
|
254
|
-
|
|
259
|
+
Yn,
|
|
260
|
+
J,
|
|
255
261
|
D
|
|
256
262
|
]);
|
|
257
|
-
let
|
|
263
|
+
let Xn = yn ? null : Fn;
|
|
258
264
|
y(() => {
|
|
259
|
-
|
|
260
|
-
}, [
|
|
261
|
-
let
|
|
262
|
-
|
|
263
|
-
let
|
|
264
|
-
|
|
265
|
-
if (!
|
|
266
|
-
let e =
|
|
267
|
-
|
|
265
|
+
Xn && D(Ne.ApplicationStatusShown, { view: Xn });
|
|
266
|
+
}, [Xn, D]);
|
|
267
|
+
let Zn = b(Y), Qn = b(ut);
|
|
268
|
+
Qn.current = ut;
|
|
269
|
+
let $n = b(St);
|
|
270
|
+
$n.current = St, y(() => {
|
|
271
|
+
if (!q || K) return;
|
|
272
|
+
let e = Zn.current !== null;
|
|
273
|
+
Zn.current = Y, e && Y === null && G === pe.Form && Qn.current?.();
|
|
268
274
|
}, [
|
|
269
|
-
W,
|
|
270
275
|
G,
|
|
271
276
|
K,
|
|
272
|
-
|
|
277
|
+
q,
|
|
278
|
+
Y
|
|
273
279
|
]), y(() => {
|
|
274
|
-
|
|
275
|
-
}, [
|
|
276
|
-
|
|
277
|
-
applicationId:
|
|
280
|
+
Un === "requested" && $n.current();
|
|
281
|
+
}, [Un]), y(() => {
|
|
282
|
+
Qe?.(K || B === null ? null : {
|
|
283
|
+
applicationId: B,
|
|
278
284
|
authEpoch: qt
|
|
279
285
|
});
|
|
280
286
|
}, [
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
287
|
+
Qe,
|
|
288
|
+
K,
|
|
289
|
+
B,
|
|
284
290
|
qt
|
|
285
291
|
]);
|
|
286
|
-
let
|
|
287
|
-
if (
|
|
288
|
-
if (!
|
|
289
|
-
if (In && !
|
|
290
|
-
if (
|
|
292
|
+
let er = b(gt);
|
|
293
|
+
if (er.current = gt, !k) return null;
|
|
294
|
+
if (!K) {
|
|
295
|
+
if (In && !Y || qn || !q) return null;
|
|
296
|
+
if (Y) {
|
|
291
297
|
if (yn) return null;
|
|
292
|
-
let e = me(
|
|
298
|
+
let e = me(Y, W, k.bankName?.trim() || O.fallbackBankName, O.applicationStatus), n = /* @__PURE__ */ S(le, {
|
|
293
299
|
...e,
|
|
294
300
|
className: "ttw:max-w-2xl",
|
|
295
301
|
focusTitleOnMount: E,
|
|
@@ -297,47 +303,47 @@ function st({ onEmbeddedOnboardingCompletedSuccessfully: p, onNavigateToDashboar
|
|
|
297
303
|
root: h.statusCard,
|
|
298
304
|
chip: h.statusCardChip
|
|
299
305
|
},
|
|
300
|
-
action:
|
|
306
|
+
action: mt ? /* @__PURE__ */ S(t, {
|
|
301
307
|
variant: "outline",
|
|
302
|
-
onClick:
|
|
308
|
+
onClick: Vn ? () => Wn("requested") : vn.refetch,
|
|
303
309
|
"data-testid": h.statusCardCheckAgain,
|
|
304
310
|
children: O.applicationStatus.checkAgain
|
|
305
311
|
}) : void 0
|
|
306
312
|
});
|
|
307
|
-
return /* @__PURE__ */
|
|
308
|
-
className:
|
|
309
|
-
children: [n, E ? /* @__PURE__ */
|
|
313
|
+
return /* @__PURE__ */ C("div", {
|
|
314
|
+
className: et,
|
|
315
|
+
children: [n, E ? /* @__PURE__ */ S(ct, { callback: dt }) : null]
|
|
310
316
|
});
|
|
311
317
|
}
|
|
312
318
|
}
|
|
313
|
-
let X = M.companyStructure === "SOLE_PROPRIETORSHIP",
|
|
314
|
-
...
|
|
319
|
+
let X = M.companyStructure === "SOLE_PROPRIETORSHIP", tr = M.companyStructure !== "" && !X, nr = tr ? Rt : $e, Z = z && {
|
|
320
|
+
...z,
|
|
315
321
|
ownsOver25Percent: N.ownsOver25Percent,
|
|
316
322
|
ownershipPercentage: N.ownershipPercentage
|
|
317
|
-
},
|
|
323
|
+
}, rr = [
|
|
318
324
|
O.stepIndicator.personal,
|
|
319
325
|
O.stepIndicator.business,
|
|
320
326
|
O.stepIndicator.review,
|
|
321
327
|
O.stepIndicator.terms
|
|
322
|
-
],
|
|
323
|
-
|
|
328
|
+
], ir = z !== null && R !== null && nr !== null, ar = A === T.personal ? z !== null : A === T.business ? R !== null && nr !== null : A === T.review ? ir : ir && xe(M), Q = un.isPending || H.isPending || dn.isPending || fn.isPending || on, or = () => {
|
|
329
|
+
Ct((e) => e.isAuthorized === null && !e.isCheckboxChecked ? e : {
|
|
324
330
|
...e,
|
|
325
331
|
isAuthorized: null,
|
|
326
332
|
isCheckboxChecked: !1
|
|
327
333
|
});
|
|
328
|
-
}, or = () => {
|
|
329
|
-
B(null), ar(), j(T.personal);
|
|
330
334
|
}, sr = () => {
|
|
331
|
-
|
|
335
|
+
V(null), or(), j(T.personal);
|
|
332
336
|
}, cr = () => {
|
|
333
|
-
|
|
334
|
-
}, lr = (
|
|
335
|
-
|
|
337
|
+
V(null), or(), j(T.business);
|
|
338
|
+
}, lr = () => {
|
|
339
|
+
V(null), A === T.review && or(), L && F(rt(P, L)), j((e) => e === T.personal ? e : e - 1);
|
|
340
|
+
}, ur = (e) => {
|
|
341
|
+
e < T.personal || e >= A || (V(null), e <= T.business && or(), L && F(rt(P, L)), j(e));
|
|
336
342
|
}, $ = {
|
|
337
343
|
business: g(M) !== g(I.business),
|
|
338
344
|
personal: g(N) !== g(I.personal),
|
|
339
|
-
owners: g(
|
|
340
|
-
},
|
|
345
|
+
owners: g(it(M.companyStructure === "SOLE_PROPRIETORSHIP" ? $e : rt(P, L))) !== g(it(I.owners))
|
|
346
|
+
}, dr = $.business || $.personal || $.owners, fr = async (e) => {
|
|
341
347
|
sn(!0);
|
|
342
348
|
let t = new AbortController();
|
|
343
349
|
En.current = t;
|
|
@@ -353,7 +359,7 @@ function st({ onEmbeddedOnboardingCompletedSuccessfully: p, onNavigateToDashboar
|
|
|
353
359
|
await _n({ displayedVersion: a(e)?.disclosureId ?? null });
|
|
354
360
|
} catch {}
|
|
355
361
|
if (t.signal.aborted) return;
|
|
356
|
-
ln("success"),
|
|
362
|
+
ln("success"), St(), xt();
|
|
357
363
|
} else ln("pending");
|
|
358
364
|
} catch (e) {
|
|
359
365
|
if (e instanceof DOMException && e.name === "AbortError") return;
|
|
@@ -362,47 +368,47 @@ function st({ onEmbeddedOnboardingCompletedSuccessfully: p, onNavigateToDashboar
|
|
|
362
368
|
} finally {
|
|
363
369
|
En.current = null, sn(!1);
|
|
364
370
|
}
|
|
365
|
-
}, fr = ({ evenWithoutMarker: e = !1 } = {}) => {
|
|
366
|
-
St((t) => (t.taxIdOnFileLast4 || e) && Qe(t.taxId) ? $e(t) : t);
|
|
367
371
|
}, pr = ({ evenWithoutMarker: e = !1 } = {}) => {
|
|
368
|
-
Ct((t) => (t.
|
|
372
|
+
Ct((t) => (t.taxIdOnFileLast4 || e) && w(t.taxId) ? tt(t) : t);
|
|
369
373
|
}, mr = ({ evenWithoutMarker: e = !1 } = {}) => {
|
|
370
|
-
|
|
371
|
-
}, hr = () => {
|
|
372
|
-
F((
|
|
373
|
-
}, gr =
|
|
374
|
-
|
|
374
|
+
wt((t) => (t.ssnOnFileLast4 || e) && w(t.ssn) ? nt(t) : t);
|
|
375
|
+
}, hr = ({ evenWithoutMarker: e = !1 } = {}) => {
|
|
376
|
+
F((t) => t.map((t) => (t.ssnOnFileLast4 || e && t.id) && w(t.ssn) ? nt(t) : t));
|
|
377
|
+
}, gr = () => {
|
|
378
|
+
F((e) => e.map(Ke));
|
|
379
|
+
}, _r = async (e) => {
|
|
380
|
+
let t = er.current, n = await un.mutateAsync({ body: Me(e, N) });
|
|
375
381
|
return Bt(n.id), Jt(t), n.clientSecret && mn(n.id, n.clientSecret), n.id;
|
|
376
|
-
},
|
|
382
|
+
}, vr = async () => {
|
|
377
383
|
if (A === T.personal) {
|
|
378
384
|
if (!Z) return null;
|
|
379
|
-
let e = I.business.companyStructure === "SOLE_PROPRIETORSHIP", t =
|
|
380
|
-
return t ? await
|
|
385
|
+
let e = I.business.companyStructure === "SOLE_PROPRIETORSHIP", t = B;
|
|
386
|
+
return t ? await H.mutateAsync({
|
|
381
387
|
path: { id: t },
|
|
382
388
|
body: Oe({
|
|
383
389
|
applicant: Z,
|
|
384
390
|
isSoleProprietor: e
|
|
385
391
|
})
|
|
386
|
-
}) : t = await
|
|
392
|
+
}) : t = await _r(De({
|
|
387
393
|
applicant: Z,
|
|
388
394
|
isSoleProprietor: e
|
|
389
|
-
})), Gt({ ssn: Z.ssn }),
|
|
395
|
+
})), Gt({ ssn: Z.ssn }), mr(), Ot(["personal"]), t;
|
|
390
396
|
}
|
|
391
397
|
if (A === T.business) {
|
|
392
|
-
if (!Z || !R || !
|
|
398
|
+
if (!Z || !R || !nr) return null;
|
|
393
399
|
let e = {
|
|
394
400
|
businessDetails: R,
|
|
395
401
|
applicant: Z,
|
|
396
|
-
businessOwners:
|
|
397
|
-
}, t =
|
|
398
|
-
return t ? await
|
|
402
|
+
businessOwners: nr
|
|
403
|
+
}, t = B;
|
|
404
|
+
return t ? await H.mutateAsync({
|
|
399
405
|
path: { id: t },
|
|
400
406
|
body: Oe(e)
|
|
401
|
-
}) : t = await
|
|
407
|
+
}) : t = await _r(Oe(e)), Gt({
|
|
402
408
|
taxId: R.taxId,
|
|
403
409
|
taxIdStructure: R.companyStructure,
|
|
404
410
|
ssn: Z.ssn
|
|
405
|
-
}),
|
|
411
|
+
}), pr(), mr(), X ? gr() : hr(), Ot([
|
|
406
412
|
"business",
|
|
407
413
|
"personal",
|
|
408
414
|
"owners"
|
|
@@ -411,48 +417,48 @@ function st({ onEmbeddedOnboardingCompletedSuccessfully: p, onNavigateToDashboar
|
|
|
411
417
|
owners: !0
|
|
412
418
|
}), t;
|
|
413
419
|
}
|
|
414
|
-
return A === T.review ?
|
|
415
|
-
path: { id:
|
|
420
|
+
return A === T.review ? ir ? B : null : !B || !xe(M) ? null : (await H.mutateAsync({
|
|
421
|
+
path: { id: B },
|
|
416
422
|
body: Oe({ consent: {
|
|
417
423
|
isLegallyAuthorized: !0,
|
|
418
424
|
hasAcceptedDisclosures: !0
|
|
419
425
|
} })
|
|
420
|
-
}),
|
|
421
|
-
},
|
|
422
|
-
if (
|
|
426
|
+
}), Ot(["business"]), B);
|
|
427
|
+
}, yr = async () => {
|
|
428
|
+
if (V(null), !ar) {
|
|
423
429
|
Zt(A), $t((e) => e + 1);
|
|
424
430
|
return;
|
|
425
431
|
}
|
|
426
432
|
let e;
|
|
427
433
|
try {
|
|
428
|
-
e = await
|
|
434
|
+
e = await vr();
|
|
429
435
|
} catch {
|
|
430
|
-
|
|
436
|
+
V(O.genericRetryError);
|
|
431
437
|
return;
|
|
432
438
|
}
|
|
433
439
|
if (e !== null) {
|
|
434
440
|
if (Zt(null), A === T.terms) try {
|
|
435
|
-
await
|
|
441
|
+
await fr(e);
|
|
436
442
|
} catch {
|
|
437
|
-
|
|
443
|
+
V(O.submitFailedError);
|
|
438
444
|
}
|
|
439
445
|
else j(A + 1);
|
|
440
446
|
}
|
|
441
|
-
},
|
|
442
|
-
|
|
447
|
+
}, br = async () => {
|
|
448
|
+
V(null), nn(!0);
|
|
443
449
|
try {
|
|
444
|
-
if (await
|
|
445
|
-
|
|
450
|
+
if (await vr() === null) return;
|
|
451
|
+
mr({ evenWithoutMarker: !0 }), A >= T.business && (pr({ evenWithoutMarker: !0 }), hr({ evenWithoutMarker: !0 })), e.success(O.applicationSavedToast);
|
|
446
452
|
} catch {
|
|
447
453
|
e.error(O.genericRetryError);
|
|
448
454
|
} finally {
|
|
449
455
|
nn(!1);
|
|
450
456
|
}
|
|
451
|
-
},
|
|
452
|
-
let t =
|
|
457
|
+
}, xr = async () => {
|
|
458
|
+
let t = rt(P, L), n = {
|
|
453
459
|
...$,
|
|
454
|
-
business: $.business ||
|
|
455
|
-
owners: $.owners ||
|
|
460
|
+
business: $.business || B !== null && !Vt.business,
|
|
461
|
+
owners: $.owners || B !== null && !Vt.owners
|
|
456
462
|
}, r = je({
|
|
457
463
|
businessDetails: M,
|
|
458
464
|
applicant: N,
|
|
@@ -461,55 +467,55 @@ function st({ onEmbeddedOnboardingCompletedSuccessfully: p, onNavigateToDashboar
|
|
|
461
467
|
savedOwners: I.owners,
|
|
462
468
|
dirty: n
|
|
463
469
|
});
|
|
464
|
-
|
|
470
|
+
Ft(!0);
|
|
465
471
|
try {
|
|
466
472
|
if (!r) {
|
|
467
|
-
if (!
|
|
473
|
+
if (!dr) {
|
|
468
474
|
e.success(O.applicationSavedToast);
|
|
469
475
|
return;
|
|
470
476
|
}
|
|
471
477
|
e.error(O.saveDraftNothingValidError);
|
|
472
478
|
return;
|
|
473
479
|
}
|
|
474
|
-
|
|
475
|
-
path: { id:
|
|
480
|
+
B ? await H.mutateAsync({
|
|
481
|
+
path: { id: B },
|
|
476
482
|
body: r
|
|
477
|
-
}) : await
|
|
483
|
+
}) : await _r(Ae(r)), L && F(t), e.success(O.applicationSavedToast);
|
|
478
484
|
let i = r;
|
|
479
485
|
Gt({
|
|
480
486
|
taxId: i.businessDetails?.taxId?.value,
|
|
481
487
|
taxIdStructure: M.companyStructure,
|
|
482
488
|
ssn: i.applicant?.personalIdentificationNumber?.value
|
|
483
|
-
}), i.businessDetails?.taxId !== void 0 &&
|
|
489
|
+
}), i.businessDetails?.taxId !== void 0 && pr({ evenWithoutMarker: !0 }), i.applicant?.personalIdentificationNumber !== void 0 && mr({ evenWithoutMarker: !0 }), Array.isArray(i.businessOwners) && hr({ evenWithoutMarker: !0 }), i.businessOwners === null && t.length > 0 && gr(), Ht((e) => ({
|
|
484
490
|
business: e.business || i.businessDetails !== void 0,
|
|
485
491
|
owners: e.owners || i.businessOwners !== void 0
|
|
486
492
|
}));
|
|
487
493
|
let a = Array.isArray(i.businessOwners) ? "list" : i.businessOwners === null ? "cleared" : "none";
|
|
488
|
-
|
|
494
|
+
Dt({ next: (e, t) => ke({
|
|
489
495
|
current: e,
|
|
490
496
|
saved: t,
|
|
491
497
|
dirty: n,
|
|
492
498
|
ownersWrite: a
|
|
493
|
-
}) }),
|
|
499
|
+
}) }), kt(null), jt((e) => e + 1);
|
|
494
500
|
} catch {
|
|
495
501
|
e.error(O.genericRetryError);
|
|
496
502
|
} finally {
|
|
497
|
-
|
|
503
|
+
Ft(!1);
|
|
498
504
|
}
|
|
499
|
-
},
|
|
500
|
-
if (
|
|
501
|
-
await fn.mutateAsync({ path: { id:
|
|
505
|
+
}, Sr = async () => {
|
|
506
|
+
if (B !== null) try {
|
|
507
|
+
await fn.mutateAsync({ path: { id: B } });
|
|
502
508
|
} catch {
|
|
503
509
|
e.error(O.deleteFailedError);
|
|
504
510
|
return;
|
|
505
511
|
}
|
|
506
|
-
an(!1),
|
|
507
|
-
},
|
|
508
|
-
if (
|
|
512
|
+
an(!1), lt?.();
|
|
513
|
+
}, Cr = st(A, O), wr = k.bankName?.trim() || O.fallbackBankName, Tr = ce(O.shellFdicDisclaimer, wr);
|
|
514
|
+
if (K) {
|
|
509
515
|
let e = R?.companyLegalName ?? "", t = k.bankName?.trim() || O.fallbackBankName, n = cn ?? "pending", r = n === "success", i = {
|
|
510
516
|
...m.result,
|
|
511
517
|
...O.result
|
|
512
|
-
}, a = /* @__PURE__ */
|
|
518
|
+
}, a = /* @__PURE__ */ S(ue, {
|
|
513
519
|
testIds: {
|
|
514
520
|
processing: h.resultProcessing,
|
|
515
521
|
success: h.resultSuccess,
|
|
@@ -522,164 +528,172 @@ function st({ onEmbeddedOnboardingCompletedSuccessfully: p, onNavigateToDashboar
|
|
|
522
528
|
headingLine1: r ? i.successHeadingLine1 : i.pendingHeadingLine1,
|
|
523
529
|
headingLine2: `${e}!`,
|
|
524
530
|
body: r ? i.successBody : i.pendingBody,
|
|
525
|
-
followUpEmail:
|
|
531
|
+
followUpEmail: z?.workEmail ?? "",
|
|
526
532
|
emailBoxLead: i.pendingEmailBoxLead,
|
|
527
533
|
navigateToDashboardLabel: i.navigateToDashboard,
|
|
528
|
-
bankLogoSrc:
|
|
534
|
+
bankLogoSrc: ft,
|
|
529
535
|
bankLogoAlt: ce(i.bankLogoAlt, t),
|
|
530
536
|
fdicDisclaimer: ce(i.fdicDisclaimer, t),
|
|
531
537
|
onNavigateToDashboard: fe
|
|
532
538
|
});
|
|
533
|
-
return /* @__PURE__ */
|
|
539
|
+
return /* @__PURE__ */ S("div", {
|
|
534
540
|
className: "ttw:grid ttw:w-full ttw:place-items-center ttw:gap-0 ttw:overflow-auto ttw:bg-background",
|
|
535
541
|
children: a
|
|
536
542
|
});
|
|
537
543
|
}
|
|
538
|
-
let
|
|
539
|
-
return /* @__PURE__ */
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
root: h.
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
544
|
+
let Er = A === T.personal ? O.nextToStep.business : A === T.business ? O.nextToStep.review : A === T.review ? O.nextToStep.terms : O.submit, Dr = A === T.business ? O.backToStepAriaLabel.personal : A === T.review ? O.backToStepAriaLabel.business : A === T.terms ? O.backToStepAriaLabel.review : void 0, Or = Q, kr = Xt === A, Ar = ar ? br : xr, jr = Q || Pt || !ar && !dr && B === null, Mr = `${N.firstName} ${N.lastName}`.trim(), Nr = X ? 100 : N.ownsOver25Percent === !0 ? N.ownershipPercentage ?? 0 : 0, Pr = M.companyDbaName.trim() || M.companyLegalName.trim(), Fr = X ? $e : P, Ir = Xt === T.business && A === T.business && Fr.some((e) => !e.reviewed) ? O.ownersNeedReviewError : null;
|
|
545
|
+
return /* @__PURE__ */ C(We, {
|
|
546
|
+
labels: O.deviceProfiling,
|
|
547
|
+
className: et,
|
|
548
|
+
testIds: {
|
|
549
|
+
loading: h.deviceProfilingLoading,
|
|
550
|
+
blocked: h.deviceProfilingBlocked
|
|
551
|
+
},
|
|
552
|
+
children: [
|
|
553
|
+
/* @__PURE__ */ S(ee, {
|
|
554
|
+
title: Cr.title,
|
|
555
|
+
subtitle: Cr.subtitle,
|
|
556
|
+
focusTitleOnMount: E,
|
|
557
|
+
stepLabels: rr,
|
|
558
|
+
activeStep: A,
|
|
559
|
+
onStepClick: ur,
|
|
560
|
+
disclaimerText: Tr,
|
|
561
|
+
onBack: lr,
|
|
562
|
+
showBackButton: A !== T.personal,
|
|
563
|
+
backAriaLabel: Dr,
|
|
564
|
+
onNext: yr,
|
|
565
|
+
onSaveAndClose: Ar,
|
|
566
|
+
onDelete: () => an(!0),
|
|
567
|
+
isNextDisabled: Or,
|
|
568
|
+
isNextLoading: Q && !tn,
|
|
569
|
+
isSaveAndCloseDisabled: jr,
|
|
570
|
+
isSaveAndCloseLoading: tn || Pt,
|
|
571
|
+
nextLabel: Er,
|
|
572
|
+
nextIcon: null,
|
|
573
|
+
nextTone: A === T.terms ? "success" : "primary",
|
|
574
|
+
isTitleVisuallyHidden: A === T.terms,
|
|
575
|
+
errorMessage: Yt,
|
|
576
|
+
labels: {
|
|
577
|
+
backButton: O.back,
|
|
578
|
+
saveAndCloseButton: O.saveAndClose,
|
|
579
|
+
deleteButton: O.deleteApplication
|
|
580
|
+
},
|
|
581
|
+
testIds: {
|
|
582
|
+
root: h.shell,
|
|
583
|
+
back: h.shellBack,
|
|
584
|
+
stepButton: h.shellStepButton,
|
|
585
|
+
saveAndClose: h.shellSaveAndClose,
|
|
586
|
+
delete: h.shellDelete,
|
|
587
|
+
next: h.shellNext,
|
|
588
|
+
scrollRegion: {
|
|
589
|
+
root: h.shellScrollRegion,
|
|
590
|
+
fade: h.shellScrollFade
|
|
591
|
+
}
|
|
592
|
+
},
|
|
593
|
+
children: /* @__PURE__ */ C("div", {
|
|
594
|
+
ref: en,
|
|
595
|
+
className: "ttw:contents",
|
|
596
|
+
children: [
|
|
597
|
+
A === T.personal ? /* @__PURE__ */ S("div", { children: /* @__PURE__ */ S(Ce, {
|
|
598
|
+
value: N,
|
|
599
|
+
onValueChange: wt,
|
|
600
|
+
onSnapshotChange: Lt,
|
|
601
|
+
stateOptions: kn,
|
|
602
|
+
isSubmitting: Q,
|
|
603
|
+
showAllErrors: kr,
|
|
604
|
+
labels: O.personalDetails
|
|
605
|
+
}, "personal") }) : null,
|
|
606
|
+
A === T.business ? /* @__PURE__ */ C("div", {
|
|
607
|
+
className: "ttw:flex ttw:flex-col ttw:gap-10",
|
|
608
|
+
children: [/* @__PURE__ */ S(Se, {
|
|
609
|
+
value: M,
|
|
610
|
+
onValueChange: Kt,
|
|
611
|
+
onSnapshotChange: It,
|
|
612
|
+
naicsOptions: Dn,
|
|
613
|
+
stateOptions: On,
|
|
614
|
+
isSubmitting: Q,
|
|
615
|
+
showAllErrors: kr,
|
|
616
|
+
labels: O.businessDetails
|
|
617
|
+
}, "business"), tr ? /* @__PURE__ */ C(Xe, { children: [/* @__PURE__ */ S(n, {}), /* @__PURE__ */ S(Ee, {
|
|
618
|
+
owners: Fr,
|
|
619
|
+
onOwnersChange: F,
|
|
620
|
+
primaryOwnerName: Mr,
|
|
621
|
+
applicantOwnership: {
|
|
622
|
+
ownsOver25Percent: N.ownsOver25Percent,
|
|
623
|
+
ownershipPercentage: N.ownershipPercentage
|
|
624
|
+
},
|
|
625
|
+
onApplicantOwnershipChange: (e) => wt((t) => ({
|
|
626
|
+
...t,
|
|
627
|
+
...e
|
|
628
|
+
})),
|
|
629
|
+
applicantOwnershipBaseline: Mt,
|
|
630
|
+
onApplicantOwnershipBaselineChange: Nt,
|
|
631
|
+
businessName: Pr,
|
|
632
|
+
applicantPersonalDetails: N,
|
|
633
|
+
onEditPersonalDetails: sr,
|
|
634
|
+
stateOptions: An,
|
|
635
|
+
onSnapshotChange: zt,
|
|
636
|
+
onPendingOwnerChange: kt,
|
|
637
|
+
isSubmitting: Q,
|
|
638
|
+
showAllErrors: kr,
|
|
639
|
+
revealErrorsAttempt: Qt,
|
|
640
|
+
reviewError: Ir,
|
|
641
|
+
labels: O.additionalOwners
|
|
642
|
+
}, At)] }) : null]
|
|
643
|
+
}) : null,
|
|
644
|
+
A === T.review ? /* @__PURE__ */ S("div", { children: /* @__PURE__ */ S(we, {
|
|
645
|
+
personalDetails: N,
|
|
646
|
+
businessDetails: M,
|
|
647
|
+
additionalOwners: Fr,
|
|
648
|
+
primaryOwnerName: Mr,
|
|
649
|
+
primaryOwnerPercentage: Nr,
|
|
650
|
+
isSoleProprietor: X,
|
|
651
|
+
personalStateOptions: kn,
|
|
652
|
+
businessStateOptions: On,
|
|
599
653
|
naicsOptions: Dn,
|
|
600
|
-
|
|
654
|
+
onEditPersonal: sr,
|
|
655
|
+
onEditBusiness: cr,
|
|
656
|
+
ownersEditAriaLabel: O.reviewOwnersEditAriaLabel,
|
|
601
657
|
isSubmitting: Q,
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
primaryOwnerName: jr,
|
|
608
|
-
applicantOwnership: {
|
|
609
|
-
ownsOver25Percent: N.ownsOver25Percent,
|
|
610
|
-
ownershipPercentage: N.ownershipPercentage
|
|
611
|
-
},
|
|
612
|
-
onApplicantOwnershipChange: (e) => Ct((t) => ({
|
|
613
|
-
...t,
|
|
614
|
-
...e
|
|
615
|
-
})),
|
|
616
|
-
applicantOwnershipBaseline: jt,
|
|
617
|
-
onApplicantOwnershipBaselineChange: Mt,
|
|
618
|
-
businessName: Nr,
|
|
619
|
-
applicantPersonalDetails: N,
|
|
620
|
-
onEditPersonalDetails: or,
|
|
621
|
-
stateOptions: An,
|
|
622
|
-
onSnapshotChange: zt,
|
|
623
|
-
onPendingOwnerChange: Ot,
|
|
658
|
+
labels: O
|
|
659
|
+
}) }) : null,
|
|
660
|
+
A === T.terms ? /* @__PURE__ */ S(Te, {
|
|
661
|
+
value: M,
|
|
662
|
+
onValueChange: Ct,
|
|
624
663
|
isSubmitting: Q,
|
|
625
|
-
showAllErrors:
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
privacyHref: _t,
|
|
656
|
-
electronicCommunicationHref: vt,
|
|
657
|
-
patriotActHref: yt
|
|
658
|
-
}) : null
|
|
659
|
-
]
|
|
660
|
-
})
|
|
661
|
-
}),
|
|
662
|
-
E ? /* @__PURE__ */ C(ot, { callback: ut }) : null,
|
|
663
|
-
/* @__PURE__ */ C(de, {
|
|
664
|
-
open: rn,
|
|
665
|
-
onConfirm: xr,
|
|
666
|
-
onCancel: () => an(!1),
|
|
667
|
-
isDeleting: fn.isPending,
|
|
668
|
-
labels: {
|
|
669
|
-
descriptionEmphasis: O.saveAndClose,
|
|
670
|
-
...O.deleteApplicationDialog
|
|
671
|
-
},
|
|
672
|
-
testIds: {
|
|
673
|
-
root: h.deleteDialog,
|
|
674
|
-
confirm: h.deleteDialogConfirm,
|
|
675
|
-
cancel: h.deleteDialogCancel
|
|
676
|
-
}
|
|
677
|
-
}),
|
|
678
|
-
/* @__PURE__ */ C(d, {})
|
|
679
|
-
] });
|
|
664
|
+
showAllErrors: kr,
|
|
665
|
+
labels: O.businessDetails,
|
|
666
|
+
bankName: wr,
|
|
667
|
+
termsHref: _t,
|
|
668
|
+
privacyHref: vt,
|
|
669
|
+
electronicCommunicationHref: yt,
|
|
670
|
+
patriotActHref: bt
|
|
671
|
+
}) : null
|
|
672
|
+
]
|
|
673
|
+
})
|
|
674
|
+
}),
|
|
675
|
+
E ? /* @__PURE__ */ S(ct, { callback: dt }) : null,
|
|
676
|
+
/* @__PURE__ */ S(de, {
|
|
677
|
+
open: rn,
|
|
678
|
+
onConfirm: Sr,
|
|
679
|
+
onCancel: () => an(!1),
|
|
680
|
+
isDeleting: fn.isPending,
|
|
681
|
+
labels: {
|
|
682
|
+
descriptionEmphasis: O.saveAndClose,
|
|
683
|
+
...O.deleteApplicationDialog
|
|
684
|
+
},
|
|
685
|
+
testIds: {
|
|
686
|
+
root: h.deleteDialog,
|
|
687
|
+
confirm: h.deleteDialogConfirm,
|
|
688
|
+
cancel: h.deleteDialogCancel
|
|
689
|
+
}
|
|
690
|
+
}),
|
|
691
|
+
/* @__PURE__ */ S(d, {})
|
|
692
|
+
]
|
|
693
|
+
});
|
|
680
694
|
}
|
|
681
|
-
function
|
|
682
|
-
return /* @__PURE__ */
|
|
695
|
+
function ut({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: i, linkComponent: a, uiFramework: o, errorFallback: s, onError: c, analytics: l, disclosuresAcceptance: u, providerLabels: d, ...ee }) {
|
|
696
|
+
return /* @__PURE__ */ S(p, {
|
|
683
697
|
baseUrl: e,
|
|
684
698
|
widgetToken: t,
|
|
685
699
|
organizationId: n,
|
|
@@ -693,17 +707,17 @@ function ct({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, ga
|
|
|
693
707
|
disclosuresAcceptance: u,
|
|
694
708
|
providerLabels: d,
|
|
695
709
|
widgetName: Pe,
|
|
696
|
-
children: /* @__PURE__ */
|
|
710
|
+
children: /* @__PURE__ */ S(Ge, { children: /* @__PURE__ */ S(E, { ...ee }) })
|
|
697
711
|
});
|
|
698
712
|
}
|
|
699
|
-
function
|
|
700
|
-
let { initResponse: t } = ne(), { client: n } = i(), r = t?.userId ?? null, [a, o] =
|
|
713
|
+
function E(e) {
|
|
714
|
+
let { initResponse: t } = ne(), { client: n } = i(), r = t?.userId ?? null, [a, o] = x(r), [s, c] = x(0);
|
|
701
715
|
r !== a && (o(r), a !== null && r !== null && c((e) => e + 1));
|
|
702
|
-
let [l, u] =
|
|
703
|
-
return n !== l && (u(n), c((e) => e + 1)), /* @__PURE__ */
|
|
716
|
+
let [l, u] = x(n);
|
|
717
|
+
return n !== l && (u(n), c((e) => e + 1)), /* @__PURE__ */ S(dt, { ...e }, s);
|
|
704
718
|
}
|
|
705
|
-
function
|
|
706
|
-
let { authEpoch: t } = i(), { ownApplicationIds: n } =
|
|
719
|
+
function dt(e) {
|
|
720
|
+
let { authEpoch: t } = i(), { ownApplicationIds: n } = He(), [r, a] = x(null), [o, s] = x(0), [c, l] = x(null), [u, d] = x(null), [ee, f] = x(null), p = v(() => {
|
|
707
721
|
f(null);
|
|
708
722
|
}, []), te = v(() => {
|
|
709
723
|
a(null), s((e) => e + 1);
|
|
@@ -712,16 +726,16 @@ function E(e) {
|
|
|
712
726
|
}, [t, r]), re = v(() => {
|
|
713
727
|
l(null), d(null), f(o + 1), s(o + 1);
|
|
714
728
|
}, [o]);
|
|
715
|
-
return r !== null && t !== r.authEpoch && n !== null && !n.includes(r.applicationId) && (a(null), s((e) => e + 1)), c !== null && t !== c && n !== null && n.some((e) => e !== u) && (l(null), d(null), f(o + 1), s(o + 1)), c === null ? /* @__PURE__ */
|
|
729
|
+
return r !== null && t !== r.authEpoch && n !== null && !n.includes(r.applicationId) && (a(null), s((e) => e + 1)), c !== null && t !== c && n !== null && n.some((e) => e !== u) && (l(null), d(null), f(o + 1), s(o + 1)), c === null ? /* @__PURE__ */ S(Fe, { children: /* @__PURE__ */ S(pt, {
|
|
716
730
|
...e,
|
|
717
731
|
onEditableDraftChange: a,
|
|
718
732
|
onApplicationDeleted: ne,
|
|
719
733
|
onNoticeReplacedByForm: te,
|
|
720
734
|
focusFormOnMount: ee === o,
|
|
721
735
|
onFocusFormOnMountDone: p
|
|
722
|
-
}, o) }, o) : /* @__PURE__ */
|
|
723
|
-
className:
|
|
724
|
-
children: /* @__PURE__ */
|
|
736
|
+
}, o) }, o) : /* @__PURE__ */ S("div", {
|
|
737
|
+
className: et,
|
|
738
|
+
children: /* @__PURE__ */ S(fe, {
|
|
725
739
|
className: "ttw:max-w-2xl",
|
|
726
740
|
onStartNewApplication: re,
|
|
727
741
|
labels: e.labels?.applicationDeleted,
|
|
@@ -732,11 +746,11 @@ function E(e) {
|
|
|
732
746
|
})
|
|
733
747
|
});
|
|
734
748
|
}
|
|
735
|
-
var
|
|
736
|
-
function
|
|
737
|
-
let { authEpoch: t } = i(), { applicationId: n, clientSecret: r, isResolved: a } =
|
|
749
|
+
var ft = { canRender: !1 };
|
|
750
|
+
function pt(e) {
|
|
751
|
+
let { authEpoch: t } = i(), { applicationId: n, clientSecret: r, isResolved: a } = He(), { application: o, isResolved: s, isUnavailable: c } = Ue(n, r), [l, u] = x(null);
|
|
738
752
|
if (y(() => {
|
|
739
|
-
l?.canRender !== !0 && a && s && (c || o !== null && o.status !== void 0 && o.status !==
|
|
753
|
+
l?.canRender !== !0 && a && s && (c || o !== null && o.status !== void 0 && o.status !== Qe ? u(ft) : u({
|
|
740
754
|
canRender: !0,
|
|
741
755
|
applicationId: o === null ? null : n,
|
|
742
756
|
authEpoch: t,
|
|
@@ -751,8 +765,8 @@ function dt(e) {
|
|
|
751
765
|
o,
|
|
752
766
|
n
|
|
753
767
|
]), l === null || !l.canRender) return null;
|
|
754
|
-
let { applicationId: d, authEpoch: ee, prefill: f } = l, p =
|
|
755
|
-
return /* @__PURE__ */
|
|
768
|
+
let { applicationId: d, authEpoch: ee, prefill: f } = l, p = qe(e.initialBusinessDetails);
|
|
769
|
+
return /* @__PURE__ */ S(lt, {
|
|
756
770
|
...e,
|
|
757
771
|
initialApplicationId: d,
|
|
758
772
|
initialBoundAuthEpoch: ee,
|
|
@@ -765,10 +779,10 @@ function dt(e) {
|
|
|
765
779
|
...f?.businessDetails
|
|
766
780
|
},
|
|
767
781
|
initialPersonalDetails: {
|
|
768
|
-
...
|
|
782
|
+
...qe(e.initialPersonalDetails),
|
|
769
783
|
...f?.personalDetails
|
|
770
784
|
},
|
|
771
|
-
initialAdditionalOwners: f?.additionalOwners ?? e.initialAdditionalOwners?.map(
|
|
785
|
+
initialAdditionalOwners: f?.additionalOwners ?? e.initialAdditionalOwners?.map(Ke)
|
|
772
786
|
});
|
|
773
787
|
}
|
|
774
|
-
export {
|
|
788
|
+
export { ut as BankAccountOnboardingWidget, ut as default, c as OnboardingSuppressionReason };
|