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