@tesouro/embedded-components-react 0.5.223 → 0.5.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/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index21.js +20 -10
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index26.js +251 -251
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
|
@@ -156,30 +156,40 @@ function A({ businessDetails: e, savedBusinessDetails: t, savedOwners: n, dirty:
|
|
|
156
156
|
};
|
|
157
157
|
return Object.keys(p).length > 0 ? p : null;
|
|
158
158
|
}
|
|
159
|
-
var j = (e) => e
|
|
160
|
-
function
|
|
159
|
+
var j = (e) => e;
|
|
160
|
+
function M(e, t) {
|
|
161
|
+
return e.applicant?.workEmailAddress || !m(f.workEmail, t.workEmail) ? e : {
|
|
162
|
+
...e,
|
|
163
|
+
applicant: {
|
|
164
|
+
...e.applicant,
|
|
165
|
+
workEmailAddress: t.workEmail
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
var N = (e, t) => e === "" && !!t;
|
|
170
|
+
function P(e, t, n) {
|
|
161
171
|
let r = { ...e };
|
|
162
172
|
for (let e of Object.keys(n)) n[e] || (r[e] = t[e]);
|
|
163
173
|
return r;
|
|
164
174
|
}
|
|
165
|
-
function
|
|
175
|
+
function F({ current: e, saved: t, dirty: n, ownersWrite: r }) {
|
|
166
176
|
let i = v(e.business) ?? "", a = b(e.business, t.business);
|
|
167
177
|
return {
|
|
168
|
-
business: n.business ?
|
|
178
|
+
business: n.business ? P(e.business, t.business, {
|
|
169
179
|
...a,
|
|
170
180
|
companyDbaName: !0,
|
|
171
181
|
website: m(d.website, e.business.website),
|
|
172
|
-
taxId: a.taxId ||
|
|
182
|
+
taxId: a.taxId || N(e.business.taxId, e.business.taxIdOnFileLast4)
|
|
173
183
|
}) : e.business,
|
|
174
|
-
personal: n.personal ?
|
|
184
|
+
personal: n.personal ? P(e.personal, t.personal, {
|
|
175
185
|
...w(e.personal, i),
|
|
176
|
-
ssn: g(e.personal.ssn) ||
|
|
186
|
+
ssn: g(e.personal.ssn) || N(e.personal.ssn, e.personal.ssnOnFileLast4)
|
|
177
187
|
}) : e.personal,
|
|
178
|
-
owners: r === "cleared" ? [] : r === "list" ? e.owners.filter(O).map((e) =>
|
|
188
|
+
owners: r === "cleared" ? [] : r === "list" ? e.owners.filter(O).map((e) => P(e, e.id && t.owners.find((t) => t.id === e.id) || c, {
|
|
179
189
|
...E(e),
|
|
180
|
-
ssn: g(e.ssn) ||
|
|
190
|
+
ssn: g(e.ssn) || N(e.ssn, e.ssnOnFileLast4)
|
|
181
191
|
})) : t.owners
|
|
182
192
|
};
|
|
183
193
|
}
|
|
184
194
|
//#endregion
|
|
185
|
-
export {
|
|
195
|
+
export { F as acceptDraftedValues, j as asCreateBody, A as buildDraftApplicationBody, D as draftOwners, M as withApplicantWorkEmail };
|
|
@@ -38,24 +38,24 @@ import { valuesKey as g } from "./index17.js";
|
|
|
38
38
|
import { AdditionalOwnersStep as be } from "./index18.js";
|
|
39
39
|
import { buildCreateApplicationBody as xe, buildUpdateApplicationBody as Se } from "./index19.js";
|
|
40
40
|
import { buildOnboardingPrefill as Ce } from "./index20.js";
|
|
41
|
-
import { acceptDraftedValues as we, asCreateBody as Te, buildDraftApplicationBody as Ee, draftOwners as De } from "./index21.js";
|
|
42
|
-
import { OnboardingApplicationView as
|
|
43
|
-
import { OnboardingAnalyticsEvent as
|
|
44
|
-
import { withoutResumeOnlyOwnerFields as
|
|
45
|
-
import { ApplicationClientSecretProvider as
|
|
46
|
-
import { useCreateApplication as
|
|
47
|
-
import { useUpdateApplication as
|
|
48
|
-
import { useSubmitApplication as
|
|
49
|
-
import { useDeleteApplication as
|
|
50
|
-
import { usePollApplicationCompletion as
|
|
51
|
-
import { useResumableBankAccountApplication as
|
|
52
|
-
import { useStartedBankAccountApplication as
|
|
41
|
+
import { acceptDraftedValues as we, asCreateBody as Te, buildDraftApplicationBody as Ee, draftOwners as De, withApplicantWorkEmail as Oe } from "./index21.js";
|
|
42
|
+
import { OnboardingApplicationView as ke, applicationStatusNoticeFor as Ae, hiddenViewReason as je, isNoticeView as Me, mergeApplicationStatusLabels as Ne, onboardingApplicationViewFor as Pe } from "./index23.js";
|
|
43
|
+
import { OnboardingAnalyticsEvent as Fe, WIDGET_NAME as Ie } from "./index24.js";
|
|
44
|
+
import { withoutResumeOnlyOwnerFields as Le, withoutStoredIdentifierMarkers as Re } from "./index25.js";
|
|
45
|
+
import { ApplicationClientSecretProvider as ze, useApplicationClientSecret as Be } from "../../data-access/dist/index3.js";
|
|
46
|
+
import { useCreateApplication as Ve } from "../../data-access/dist/index5.js";
|
|
47
|
+
import { useUpdateApplication as He } from "../../data-access/dist/index6.js";
|
|
48
|
+
import { useSubmitApplication as Ue } from "../../data-access/dist/index7.js";
|
|
49
|
+
import { useDeleteApplication as We } from "../../data-access/dist/index8.js";
|
|
50
|
+
import { usePollApplicationCompletion as Ge } from "../../data-access/dist/index9.js";
|
|
51
|
+
import { useResumableBankAccountApplication as Ke } from "../../data-access/dist/index11.js";
|
|
52
|
+
import { useStartedBankAccountApplication as qe } from "../../data-access/dist/index12.js";
|
|
53
53
|
import "../../data-access/dist/index.js";
|
|
54
|
-
import { useCallback as
|
|
55
|
-
import { Fragment as
|
|
54
|
+
import { useCallback as Je, useEffect as _, useMemo as v, useReducer as Ye, useRef as Xe, useState as y } from "react";
|
|
55
|
+
import { Fragment as Ze, jsx as b, jsxs as Qe } from "react/jsx-runtime";
|
|
56
56
|
//#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index26.js
|
|
57
|
-
var
|
|
58
|
-
function
|
|
57
|
+
var $e = 2 ** 31 - 1, et = "DRAFT", tt = [], x = (e) => m(e, void 0);
|
|
58
|
+
function nt(e) {
|
|
59
59
|
return {
|
|
60
60
|
...e,
|
|
61
61
|
taxId: "",
|
|
@@ -63,17 +63,17 @@ function et(e) {
|
|
|
63
63
|
taxIdOnFileStructure: e.companyStructure === "" ? void 0 : e.companyStructure
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function S(e) {
|
|
67
67
|
return {
|
|
68
68
|
...e,
|
|
69
69
|
ssn: "",
|
|
70
70
|
ssnOnFileLast4: _e(e.ssn)
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function rt(e, t) {
|
|
74
74
|
return t ? t.index === null ? [...e, t.owner] : e.map((e, n) => n === t.index ? t.owner : e) : e;
|
|
75
75
|
}
|
|
76
|
-
var
|
|
76
|
+
var it = {
|
|
77
77
|
companyLegalName: "",
|
|
78
78
|
companyDbaName: "",
|
|
79
79
|
businessAddress: "",
|
|
@@ -87,7 +87,7 @@ var nt = {
|
|
|
87
87
|
naicsCode: "",
|
|
88
88
|
isAuthorized: null,
|
|
89
89
|
isCheckboxChecked: !1
|
|
90
|
-
},
|
|
90
|
+
}, at = {
|
|
91
91
|
firstName: "",
|
|
92
92
|
lastName: "",
|
|
93
93
|
dateOfBirth: void 0,
|
|
@@ -101,7 +101,7 @@ var nt = {
|
|
|
101
101
|
ownsOver25Percent: null,
|
|
102
102
|
ownershipPercentage: null
|
|
103
103
|
};
|
|
104
|
-
function
|
|
104
|
+
function ot(e, t) {
|
|
105
105
|
if (e === 0) return {
|
|
106
106
|
title: t.businessReviewTitle,
|
|
107
107
|
subtitle: t.businessReviewSubtitle
|
|
@@ -119,12 +119,12 @@ function it(e, t) {
|
|
|
119
119
|
subtitle: n.subheading
|
|
120
120
|
};
|
|
121
121
|
}
|
|
122
|
-
function
|
|
123
|
-
let
|
|
122
|
+
function st({ onEmbeddedOnboardingCompletedSuccessfully: ie, onNavigateToDashboard: de, labels: m, initialBusinessDetails: Ce, initialPersonalDetails: Ie, initialAdditionalOwners: Re, initialApplicationId: ze = null, initialBoundAuthEpoch: Ke, onEditableDraftChange: qe, onApplicationDeleted: et, bankLogoSrc: st, disclosureLinks: ct, open: lt, defaultOpen: ut, onOpenChange: C, isFullScreenInline: w = !1 }) {
|
|
123
|
+
let T = re(), { authEpoch: dt } = s();
|
|
124
124
|
_(() => {
|
|
125
|
-
|
|
126
|
-
}, [
|
|
127
|
-
let
|
|
125
|
+
T(Fe.Mounted);
|
|
126
|
+
}, [T]);
|
|
127
|
+
let E = {
|
|
128
128
|
...p,
|
|
129
129
|
...m,
|
|
130
130
|
stepIndicator: {
|
|
@@ -140,40 +140,40 @@ function at({ onEmbeddedOnboardingCompletedSuccessfully: ie, onNavigateToDashboa
|
|
|
140
140
|
},
|
|
141
141
|
unsavedApplicationDialog: m?.unsavedApplicationDialog ?? {},
|
|
142
142
|
deleteApplicationDialog: m?.deleteApplicationDialog ?? {},
|
|
143
|
-
applicationStatus:
|
|
144
|
-
},
|
|
145
|
-
|
|
146
|
-
}, [
|
|
143
|
+
applicationStatus: Ne(m?.applicationStatus)
|
|
144
|
+
}, D = oe().initResponse, { termsHref: ft, privacyHref: pt, electronicCommunicationHref: mt, patriotActHref: ht } = ct ?? {}, gt = lt === void 0, [_t, vt] = y(() => ut ?? !1), O = gt ? _t : lt, yt = ut ?? !1, k = Je((e) => {
|
|
145
|
+
gt && vt(e), C?.(e);
|
|
146
|
+
}, [C, gt]), bt = Je(() => {
|
|
147
147
|
ie();
|
|
148
|
-
}, [ie]),
|
|
149
|
-
...
|
|
148
|
+
}, [ie]), xt = ae(), [A, St] = y(0), [j, M] = y(() => ({
|
|
149
|
+
...it,
|
|
150
150
|
...Ce
|
|
151
|
-
})), [
|
|
152
|
-
...
|
|
153
|
-
...
|
|
154
|
-
})), [
|
|
155
|
-
business:
|
|
156
|
-
personal:
|
|
157
|
-
owners:
|
|
158
|
-
})), [
|
|
151
|
+
})), [N, P] = y(() => ({
|
|
152
|
+
...at,
|
|
153
|
+
...Ie
|
|
154
|
+
})), [F, I] = y(() => Re ?? []), [L, Ct] = y(() => ({
|
|
155
|
+
business: j,
|
|
156
|
+
personal: N,
|
|
157
|
+
owners: F
|
|
158
|
+
})), [wt, Tt] = y(null);
|
|
159
159
|
_(() => {
|
|
160
|
-
if (!
|
|
160
|
+
if (!wt) return;
|
|
161
161
|
let e = {
|
|
162
|
-
business:
|
|
163
|
-
personal:
|
|
164
|
-
owners:
|
|
162
|
+
business: j,
|
|
163
|
+
personal: N,
|
|
164
|
+
owners: F
|
|
165
165
|
};
|
|
166
|
-
|
|
166
|
+
Ct((t) => wt.next(e, t)), Tt(null);
|
|
167
167
|
}, [
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
168
|
+
wt,
|
|
169
|
+
j,
|
|
170
|
+
N,
|
|
171
|
+
F
|
|
172
172
|
]);
|
|
173
|
-
let
|
|
173
|
+
let Et = (e, { owners: t = "none" } = {}) => Tt({ next: (n, r) => ({
|
|
174
174
|
business: e.includes("business") ? n.business : r.business,
|
|
175
175
|
personal: e.includes("personal") ? n.personal : r.personal,
|
|
176
|
-
owners: t === "cleared" ?
|
|
176
|
+
owners: t === "cleared" ? tt : t === "restored" ? we({
|
|
177
177
|
current: n,
|
|
178
178
|
saved: r,
|
|
179
179
|
dirty: {
|
|
@@ -183,121 +183,121 @@ function at({ onEmbeddedOnboardingCompletedSuccessfully: ie, onNavigateToDashboa
|
|
|
183
183
|
},
|
|
184
184
|
ownersWrite: "list"
|
|
185
185
|
}).owners : e.includes("owners") ? n.owners : r.owners
|
|
186
|
-
}) }), [
|
|
186
|
+
}) }), [Dt, Ot] = y(null), [kt, At] = y(0), [jt, R] = y(!1), [Mt, Nt] = y(!1), [z, Pt] = y(null), [B, Ft] = y(null), [It, Lt] = y(null), [V, Rt] = y(ze), [zt, Bt] = y(!1), [H, Vt] = y({}), Ht = (e) => Vt((t) => ({
|
|
187
187
|
...t,
|
|
188
|
-
...e.taxId &&
|
|
188
|
+
...e.taxId && x(e.taxId) && e.taxIdStructure ? {
|
|
189
189
|
taxId: e.taxId,
|
|
190
190
|
taxIdStructure: e.taxIdStructure
|
|
191
191
|
} : {},
|
|
192
|
-
...e.ssn &&
|
|
193
|
-
})),
|
|
194
|
-
let { taxId: t, taxIdStructure: n } = H, r = t !== void 0 && n !== void 0 && e.companyStructure !==
|
|
195
|
-
|
|
192
|
+
...e.ssn && x(e.ssn) ? { ssn: e.ssn } : {}
|
|
193
|
+
})), Ut = (e) => {
|
|
194
|
+
let { taxId: t, taxIdStructure: n } = H, r = t !== void 0 && n !== void 0 && e.companyStructure !== j.companyStructure && e.companyStructure !== "" && e.companyStructure === "SOLE_PROPRIETORSHIP" != (n === "SOLE_PROPRIETORSHIP");
|
|
195
|
+
M(r ? {
|
|
196
196
|
...e,
|
|
197
197
|
taxId: e.taxId === t ? "" : e.taxId,
|
|
198
198
|
taxIdOnFileLast4: _e(t),
|
|
199
199
|
taxIdOnFileStructure: n
|
|
200
200
|
} : e);
|
|
201
|
-
}, [
|
|
202
|
-
!
|
|
203
|
-
let [Xt, Zt] = y(!1), [Qt, $t] = y(null), en =
|
|
204
|
-
|
|
205
|
-
let
|
|
201
|
+
}, [Wt, Gt] = y(Ke ?? dt), [Kt, U] = y(null), [qt, Jt] = y(!1), [Yt, W] = y(!1);
|
|
202
|
+
!w && !O && Yt && W(!1);
|
|
203
|
+
let [Xt, Zt] = y(!1), [Qt, $t] = y(null), en = Ve(), G = He(), tn = Ue(), nn = We(), rn = Ge(), { setClientSecret: an } = Be(), { data: on, refetch: sn } = u(), { mutateAsync: cn } = l(), ln = ee(), K = f(), un = se(), [dn, fn] = Ye((e) => e + 1, 0), pn = v(() => ue(K.applications), [K.applications]), mn = Xe(null);
|
|
204
|
+
K.isResolved && (mn.current = { application: pn });
|
|
205
|
+
let q = K.isResolved ? pn : mn.current?.application ?? null, hn = le(q), J = Pe(q), gn = K.isResolved || mn.current !== null && J === ke.Form;
|
|
206
206
|
_(() => {
|
|
207
207
|
if (hn === null) return;
|
|
208
208
|
let e = hn - Date.now();
|
|
209
209
|
if (e < 0) return;
|
|
210
|
-
let t = setTimeout(fn, Math.min(e + 1,
|
|
210
|
+
let t = setTimeout(fn, Math.min(e + 1, $e));
|
|
211
211
|
return () => clearTimeout(t);
|
|
212
212
|
}, [hn, dn]);
|
|
213
|
-
let _n =
|
|
213
|
+
let _n = Xe(null);
|
|
214
214
|
_(() => () => _n.current?.abort(), []);
|
|
215
|
-
let vn = v(() => ce(
|
|
215
|
+
let vn = v(() => ce(E.businessDetails.naicsTitles), [E.businessDetails.naicsTitles]), yn = v(() => a(E.businessDetails.stateTitles), [E.businessDetails.stateTitles]), bn = v(() => a(E.personalDetails.stateTitles), [E.personalDetails.stateTitles]), xn = v(() => a(E.additionalOwners.stateTitles), [E.additionalOwners.stateTitles]), Y = Xt || Qt !== null, Sn = D?.status === "ACTIVE" || D?.status === "INACTIVE", Cn = D?.status === "INVITED", wn = Sn || Cn, Tn = ln.isResolved && gn, En = D && !Y && !wn && Tn && Me(J) ? J : null, Dn = !!D && !Y && En === null && (wn || Tn && (ln.isSuppressed || J === ke.Hidden)), On = Dn ? Sn ? d.UserAlreadyOnboarded : Cn ? d.UserInvitedToOrganization : J === ke.Hidden ? je(q) : ln.reason ?? je(q) : null;
|
|
216
216
|
_(() => {
|
|
217
|
-
Dn && On && (
|
|
217
|
+
Dn && On && (T(Fe.Suppressed, { reason: On }), console.info(`[onboarding] not shown: ${On}`));
|
|
218
218
|
}, [
|
|
219
219
|
Dn,
|
|
220
220
|
On,
|
|
221
|
-
|
|
221
|
+
T
|
|
222
222
|
]);
|
|
223
|
-
let kn = un || !(
|
|
223
|
+
let kn = un || !(w || O) ? null : En;
|
|
224
224
|
_(() => {
|
|
225
|
-
kn &&
|
|
226
|
-
}, [kn,
|
|
227
|
-
|
|
225
|
+
kn && T(Fe.ApplicationStatusShown, { view: kn });
|
|
226
|
+
}, [kn, T]), _(() => {
|
|
227
|
+
qe?.(Y || V === null ? null : {
|
|
228
228
|
applicationId: V,
|
|
229
|
-
authEpoch:
|
|
229
|
+
authEpoch: Wt
|
|
230
230
|
});
|
|
231
231
|
}, [
|
|
232
|
-
|
|
233
|
-
|
|
232
|
+
qe,
|
|
233
|
+
Y,
|
|
234
234
|
V,
|
|
235
|
-
|
|
235
|
+
Wt
|
|
236
236
|
]);
|
|
237
|
-
let An =
|
|
238
|
-
if (An.current =
|
|
239
|
-
if (!
|
|
237
|
+
let An = Xe(dt);
|
|
238
|
+
if (An.current = dt, !D) return null;
|
|
239
|
+
if (!Y) {
|
|
240
240
|
if (Dn || !Tn) return null;
|
|
241
241
|
if (En) {
|
|
242
242
|
if (un) return null;
|
|
243
|
-
let i =
|
|
243
|
+
let i = Ae(En, q, D.bankName?.trim() || E.fallbackBankName, E.applicationStatus), a = /* @__PURE__ */ b(pe, {
|
|
244
244
|
...i,
|
|
245
|
-
className: r("ttw:max-w-2xl", !
|
|
245
|
+
className: r("ttw:max-w-2xl", !w && "ttw:pr-12"),
|
|
246
246
|
testIds: {
|
|
247
247
|
root: h.statusCard,
|
|
248
248
|
chip: h.statusCardChip
|
|
249
249
|
}
|
|
250
250
|
});
|
|
251
|
-
return
|
|
251
|
+
return w ? /* @__PURE__ */ b("div", {
|
|
252
252
|
className: "ttw:grid ttw:h-full ttw:w-full ttw:place-items-center ttw:overflow-auto ttw:bg-background ttw:p-6",
|
|
253
253
|
children: a
|
|
254
254
|
}) : /* @__PURE__ */ b(e, {
|
|
255
|
-
open:
|
|
256
|
-
onOpenChange:
|
|
257
|
-
children: /* @__PURE__ */
|
|
255
|
+
open: O,
|
|
256
|
+
onOpenChange: k,
|
|
257
|
+
children: /* @__PURE__ */ Qe(t, {
|
|
258
258
|
showCloseButton: !0,
|
|
259
259
|
closeButtonTestId: h.statusCardClose,
|
|
260
|
-
labels: { close:
|
|
260
|
+
labels: { close: E.applicationStatus.close },
|
|
261
261
|
className: "ttw:max-h-[90vh] ttw:w-[720px] ttw:max-w-[calc(100vw-2rem)] ttw:gap-0 ttw:overflow-y-auto ttw:rounded-2xl ttw:border-0 ttw:p-0",
|
|
262
262
|
children: [/* @__PURE__ */ b(n, {
|
|
263
263
|
className: "ttw:sr-only",
|
|
264
|
-
children:
|
|
264
|
+
children: E.modalTitle
|
|
265
265
|
}), a]
|
|
266
266
|
})
|
|
267
267
|
});
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
|
-
let
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
], Mn =
|
|
275
|
-
U(null),
|
|
276
|
-
},
|
|
277
|
-
business: g(
|
|
278
|
-
personal: g(
|
|
279
|
-
owners: g(
|
|
280
|
-
}, Pn =
|
|
281
|
-
business: (e) => H.taxId && e.taxId === H.taxId ?
|
|
282
|
-
personal: (e) => H.ssn && e.ssn === H.ssn ?
|
|
283
|
-
owners: (e) => e.map((e) => e.id &&
|
|
284
|
-
}, Fn = () =>
|
|
285
|
-
business:
|
|
286
|
-
personal:
|
|
287
|
-
owners:
|
|
270
|
+
let X = z?.companyStructure === "SOLE_PROPRIETORSHIP", jn = [
|
|
271
|
+
E.stepIndicator.business,
|
|
272
|
+
E.stepIndicator.personal,
|
|
273
|
+
E.stepIndicator.ownership
|
|
274
|
+
], Mn = A === 0 ? z : A === 1 ? B : A === 2 ? It : null, Z = en.isPending || G.isPending || tn.isPending || nn.isPending || Xt, Nn = () => {
|
|
275
|
+
U(null), St((e) => e === 0 ? 0 : e - 1);
|
|
276
|
+
}, Q = {
|
|
277
|
+
business: g(j) !== g(L.business),
|
|
278
|
+
personal: g(N) !== g(L.personal),
|
|
279
|
+
owners: g(j.companyStructure === "SOLE_PROPRIETORSHIP" ? tt : rt(F, Dt)) !== g(L.owners)
|
|
280
|
+
}, Pn = Q.business || Q.personal || Q.owners, $ = {
|
|
281
|
+
business: (e) => H.taxId && e.taxId === H.taxId ? nt(e) : e,
|
|
282
|
+
personal: (e) => H.ssn && e.ssn === H.ssn ? S(e) : e,
|
|
283
|
+
owners: (e) => e.map((e) => e.id && x(e.ssn) ? S(e) : e)
|
|
284
|
+
}, Fn = () => Ct((e) => ({
|
|
285
|
+
business: $.business(e.business),
|
|
286
|
+
personal: $.personal(e.personal),
|
|
287
|
+
owners: $.owners(e.owners)
|
|
288
288
|
})), In = () => {
|
|
289
|
-
|
|
289
|
+
Z || (Pn ? R(!0) : (M($.business), P($.personal), I($.owners), Fn(), k(!1)));
|
|
290
290
|
}, Ln = (e) => {
|
|
291
|
-
e ?
|
|
291
|
+
e ? k(!0) : In();
|
|
292
292
|
}, Rn = In, zn = async (e) => {
|
|
293
|
-
Zt(!0),
|
|
293
|
+
Zt(!0), k(!0);
|
|
294
294
|
let t = new AbortController();
|
|
295
295
|
_n.current = t;
|
|
296
296
|
let n = !1;
|
|
297
297
|
try {
|
|
298
298
|
let r = await tn.mutateAsync({ path: { id: e } });
|
|
299
299
|
if (t.signal.aborted) return;
|
|
300
|
-
if (!r.id) throw Error(
|
|
300
|
+
if (!r.id) throw Error(E.submitFailedError);
|
|
301
301
|
if (n = !0, (await rn(e, { signal: t.signal })).status === "complete") {
|
|
302
302
|
let e = on;
|
|
303
303
|
if (e === void 0 && (e = (await sn()).data), t.signal.aborted) return;
|
|
@@ -305,7 +305,7 @@ function at({ onEmbeddedOnboardingCompletedSuccessfully: ie, onNavigateToDashboa
|
|
|
305
305
|
await cn({ displayedVersion: c(e)?.disclosureId ?? null });
|
|
306
306
|
} catch {}
|
|
307
307
|
if (t.signal.aborted) return;
|
|
308
|
-
$t("success"),
|
|
308
|
+
$t("success"), xt(), bt();
|
|
309
309
|
} else $t("pending");
|
|
310
310
|
} catch (e) {
|
|
311
311
|
if (e instanceof DOMException && e.name === "AbortError") return;
|
|
@@ -315,128 +315,128 @@ function at({ onEmbeddedOnboardingCompletedSuccessfully: ie, onNavigateToDashboa
|
|
|
315
315
|
_n.current = null, Zt(!1);
|
|
316
316
|
}
|
|
317
317
|
}, Bn = ({ evenWithoutMarker: e = !1 } = {}) => {
|
|
318
|
-
|
|
318
|
+
M((t) => (t.taxIdOnFileLast4 || e) && x(t.taxId) ? nt(t) : t);
|
|
319
319
|
}, Vn = ({ evenWithoutMarker: e = !1 } = {}) => {
|
|
320
|
-
|
|
320
|
+
P((t) => (t.ssnOnFileLast4 || e) && x(t.ssn) ? S(t) : t);
|
|
321
321
|
}, Hn = ({ evenWithoutMarker: e = !1 } = {}) => {
|
|
322
|
-
|
|
322
|
+
I((t) => t.map((t) => (t.ssnOnFileLast4 || e && t.id) && x(t.ssn) ? S(t) : t));
|
|
323
323
|
}, Un = () => {
|
|
324
|
-
|
|
324
|
+
I((e) => e.map(Le));
|
|
325
325
|
}, Wn = async (e) => {
|
|
326
|
-
let t = An.current, n = await en.mutateAsync({ body: e });
|
|
327
|
-
return
|
|
326
|
+
let t = An.current, n = await en.mutateAsync({ body: Oe(e, N) });
|
|
327
|
+
return Rt(n.id), Gt(t), n.clientSecret && an(n.id, n.clientSecret), n.id;
|
|
328
328
|
}, Gn = async () => {
|
|
329
|
-
let e =
|
|
330
|
-
if (
|
|
329
|
+
let e = L.business.companyStructure === "SOLE_PROPRIETORSHIP" && !X ? De(F) : [], t = e.length > 0 ? { businessOwners: e } : {};
|
|
330
|
+
if (A === 0) {
|
|
331
331
|
if (!z) return null;
|
|
332
332
|
let e = V;
|
|
333
|
-
return e ? await
|
|
333
|
+
return e ? await G.mutateAsync({
|
|
334
334
|
path: { id: e },
|
|
335
335
|
body: {
|
|
336
336
|
...Se({
|
|
337
337
|
businessDetails: z,
|
|
338
|
-
carryConsent: !
|
|
338
|
+
carryConsent: !zt
|
|
339
339
|
}),
|
|
340
340
|
...t
|
|
341
341
|
}
|
|
342
|
-
}) : (e = await Wn(xe(z)),
|
|
342
|
+
}) : (e = await Wn(xe(z)), Bt(!0)), Ht({
|
|
343
343
|
taxId: z.taxId,
|
|
344
344
|
taxIdStructure: z.companyStructure
|
|
345
|
-
}), Bn(),
|
|
345
|
+
}), Bn(), X && Un(), Et(["business"], { owners: X ? "cleared" : t.businessOwners ? "restored" : "none" }), e;
|
|
346
346
|
}
|
|
347
|
-
return
|
|
347
|
+
return A === 1 ? !B || !z || !V ? null : (await G.mutateAsync({
|
|
348
348
|
path: { id: V },
|
|
349
349
|
body: {
|
|
350
350
|
...Se({
|
|
351
351
|
businessDetails: z,
|
|
352
352
|
applicant: B,
|
|
353
|
-
carryConsent: !
|
|
353
|
+
carryConsent: !zt
|
|
354
354
|
}),
|
|
355
355
|
...t
|
|
356
356
|
}
|
|
357
|
-
}),
|
|
357
|
+
}), Ht({
|
|
358
358
|
taxId: z.taxId,
|
|
359
359
|
taxIdStructure: z.companyStructure,
|
|
360
360
|
ssn: B.ssn
|
|
361
|
-
}), Bn(), Vn(),
|
|
361
|
+
}), Bn(), Vn(), Et(["business", "personal"], { owners: X ? "cleared" : t.businessOwners ? "restored" : "none" }), V) : A === 2 ? !It || !V ? null : (await G.mutateAsync({
|
|
362
362
|
path: { id: V },
|
|
363
|
-
body: Se({ businessOwners:
|
|
364
|
-
}), Hn(),
|
|
365
|
-
},
|
|
363
|
+
body: Se({ businessOwners: It })
|
|
364
|
+
}), Hn(), Et(["owners"]), V) : null;
|
|
365
|
+
}, Kn = (e) => o(e) ?? (e instanceof Error ? e.message : void 0) ?? E.genericRetryError, qn = async () => {
|
|
366
366
|
U(null);
|
|
367
367
|
try {
|
|
368
368
|
let e = await Gn();
|
|
369
369
|
if (e === null) return;
|
|
370
|
-
|
|
370
|
+
A === 2 ? await zn(e) : St(A + 1);
|
|
371
371
|
} catch (e) {
|
|
372
|
-
U(
|
|
372
|
+
U(Kn(e));
|
|
373
373
|
}
|
|
374
|
-
},
|
|
375
|
-
U(null),
|
|
374
|
+
}, Jn = async () => {
|
|
375
|
+
U(null), Jt(!0);
|
|
376
376
|
try {
|
|
377
377
|
if (await Gn() === null) return;
|
|
378
|
-
Bn({ evenWithoutMarker: !0 }),
|
|
378
|
+
Bn({ evenWithoutMarker: !0 }), A >= 1 && Vn({ evenWithoutMarker: !0 }), A === 2 && Hn({ evenWithoutMarker: !0 }), i.success(E.applicationSavedToast), k(!1);
|
|
379
379
|
} catch (e) {
|
|
380
|
-
i.error(
|
|
380
|
+
i.error(Kn(e));
|
|
381
381
|
} finally {
|
|
382
|
-
|
|
382
|
+
Jt(!1);
|
|
383
383
|
}
|
|
384
|
-
},
|
|
385
|
-
let e =
|
|
386
|
-
businessDetails:
|
|
387
|
-
applicant:
|
|
384
|
+
}, Yn = async () => {
|
|
385
|
+
let e = rt(F, Dt), t = Ee({
|
|
386
|
+
businessDetails: j,
|
|
387
|
+
applicant: N,
|
|
388
388
|
businessOwners: e,
|
|
389
|
-
savedBusinessDetails:
|
|
390
|
-
savedOwners:
|
|
391
|
-
dirty:
|
|
392
|
-
}), n =
|
|
393
|
-
|
|
389
|
+
savedBusinessDetails: L.business,
|
|
390
|
+
savedOwners: L.owners,
|
|
391
|
+
dirty: Q
|
|
392
|
+
}), n = Q;
|
|
393
|
+
Nt(!0);
|
|
394
394
|
try {
|
|
395
395
|
if (!t) {
|
|
396
|
-
i.error(
|
|
396
|
+
i.error(E.saveDraftNothingValidError);
|
|
397
397
|
return;
|
|
398
398
|
}
|
|
399
399
|
let r = !V;
|
|
400
|
-
V ? await
|
|
400
|
+
V ? await G.mutateAsync({
|
|
401
401
|
path: { id: V },
|
|
402
402
|
body: t
|
|
403
|
-
}) : await Wn(Te(t)),
|
|
403
|
+
}) : await Wn(Te(t)), Dt && I(e), i.success(E.applicationSavedToast);
|
|
404
404
|
let a = t;
|
|
405
|
-
r && a.applicant?.isLegallyAuthorized && a.applicant?.hasAcceptedDisclosures &&
|
|
405
|
+
r && a.applicant?.isLegallyAuthorized && a.applicant?.hasAcceptedDisclosures && Bt(!0), Ht({
|
|
406
406
|
taxId: a.businessDetails?.taxId?.value,
|
|
407
|
-
taxIdStructure:
|
|
407
|
+
taxIdStructure: j.companyStructure,
|
|
408
408
|
ssn: a.applicant?.personalIdentificationNumber?.value
|
|
409
409
|
}), a.businessDetails?.taxId !== void 0 && Bn({ evenWithoutMarker: !0 }), a.applicant?.personalIdentificationNumber !== void 0 && Vn({ evenWithoutMarker: !0 }), Array.isArray(a.businessOwners) && Hn({ evenWithoutMarker: !0 }), a.businessOwners === null && e.length > 0 && Un();
|
|
410
410
|
let o = Array.isArray(a.businessOwners) ? "list" : a.businessOwners === null ? "cleared" : "none";
|
|
411
|
-
|
|
411
|
+
Tt({ next: (e, t) => we({
|
|
412
412
|
current: e,
|
|
413
413
|
saved: t,
|
|
414
414
|
dirty: n,
|
|
415
415
|
ownersWrite: o
|
|
416
|
-
}) }),
|
|
416
|
+
}) }), Ot(null), At((e) => e + 1), R(!1), k(!1);
|
|
417
417
|
} catch (e) {
|
|
418
|
-
i.error(
|
|
418
|
+
i.error(Kn(e));
|
|
419
419
|
} finally {
|
|
420
|
-
|
|
420
|
+
Nt(!1);
|
|
421
421
|
}
|
|
422
|
-
},
|
|
423
|
-
|
|
424
|
-
},
|
|
422
|
+
}, Xn = () => {
|
|
423
|
+
M($.business(L.business)), P($.personal(L.personal)), I($.owners(L.owners)), Fn(), Ot(null), At((e) => e + 1), U(null), R(!1), k(!1);
|
|
424
|
+
}, Zn = async () => {
|
|
425
425
|
if (V !== null) {
|
|
426
426
|
try {
|
|
427
427
|
await nn.mutateAsync({ path: { id: V } });
|
|
428
428
|
} catch (e) {
|
|
429
|
-
i.error(
|
|
429
|
+
i.error(Kn(e));
|
|
430
430
|
return;
|
|
431
431
|
}
|
|
432
|
-
i.success(
|
|
432
|
+
i.success(E.applicationDeletedToast);
|
|
433
433
|
}
|
|
434
|
-
|
|
435
|
-
},
|
|
436
|
-
if (
|
|
437
|
-
let r = z?.companyLegalName ?? "", i =
|
|
434
|
+
W(!1), k(!1), et?.();
|
|
435
|
+
}, Qn = ot(Math.min(A, 2), E), $n = D.bankName?.trim() || E.fallbackBankName, er = fe(E.shellFdicDisclaimer, $n);
|
|
436
|
+
if (Y) {
|
|
437
|
+
let r = z?.companyLegalName ?? "", i = D.bankName?.trim() || E.fallbackBankName, a = Qt ?? "pending", o = a === "success", s = {
|
|
438
438
|
...p.result,
|
|
439
|
-
...
|
|
439
|
+
...E.result
|
|
440
440
|
}, c = /* @__PURE__ */ b(me, {
|
|
441
441
|
testIds: {
|
|
442
442
|
processing: h.resultProcessing,
|
|
@@ -451,56 +451,56 @@ function at({ onEmbeddedOnboardingCompletedSuccessfully: ie, onNavigateToDashboa
|
|
|
451
451
|
followUpEmail: B?.workEmail ?? "",
|
|
452
452
|
emailBoxLead: s.pendingEmailBoxLead,
|
|
453
453
|
navigateToDashboardLabel: s.navigateToDashboard,
|
|
454
|
-
bankLogoSrc:
|
|
454
|
+
bankLogoSrc: st,
|
|
455
455
|
bankLogoAlt: fe(s.bankLogoAlt, i),
|
|
456
456
|
fdicDisclaimer: fe(s.fdicDisclaimer, i),
|
|
457
457
|
onNavigateToDashboard: de
|
|
458
458
|
});
|
|
459
|
-
return
|
|
459
|
+
return w ? /* @__PURE__ */ b("div", {
|
|
460
460
|
className: "ttw:grid ttw:h-full ttw:w-full ttw:grid-rows-[1fr] ttw:place-items-center ttw:gap-0 ttw:overflow-auto ttw:bg-background",
|
|
461
461
|
children: c
|
|
462
462
|
}) : /* @__PURE__ */ b(e, {
|
|
463
|
-
open:
|
|
464
|
-
onOpenChange:
|
|
465
|
-
children: /* @__PURE__ */
|
|
463
|
+
open: O,
|
|
464
|
+
onOpenChange: k,
|
|
465
|
+
children: /* @__PURE__ */ Qe(t, {
|
|
466
466
|
className: "ttw:grid ttw:max-h-[95vh] ttw:w-[720px] ttw:max-w-[calc(100vw-2rem)] ttw:grid-rows-[1fr] ttw:gap-0 ttw:overflow-hidden ttw:rounded-2xl ttw:p-0",
|
|
467
467
|
children: [/* @__PURE__ */ b(n, {
|
|
468
468
|
className: "ttw:sr-only",
|
|
469
|
-
children:
|
|
469
|
+
children: E.modalTitle
|
|
470
470
|
}), c]
|
|
471
471
|
})
|
|
472
472
|
});
|
|
473
473
|
}
|
|
474
|
-
let
|
|
475
|
-
return /* @__PURE__ */
|
|
476
|
-
/* @__PURE__ */
|
|
477
|
-
open:
|
|
478
|
-
defaultOpen:
|
|
474
|
+
let tr = A === 2 ? E.submit : E.next, nr = Mn === null || Z;
|
|
475
|
+
return /* @__PURE__ */ Qe(Ze, { children: [
|
|
476
|
+
/* @__PURE__ */ Qe(ne, {
|
|
477
|
+
open: O,
|
|
478
|
+
defaultOpen: yt,
|
|
479
479
|
onOpenChange: Ln,
|
|
480
|
-
isFullScreenInline:
|
|
481
|
-
title:
|
|
482
|
-
subtitle:
|
|
480
|
+
isFullScreenInline: w,
|
|
481
|
+
title: Qn.title,
|
|
482
|
+
subtitle: Qn.subtitle,
|
|
483
483
|
stepLabels: jn,
|
|
484
|
-
activeStep:
|
|
485
|
-
disclaimerText:
|
|
486
|
-
onBack:
|
|
487
|
-
onCancel:
|
|
488
|
-
onNext:
|
|
489
|
-
onSaveAndClose:
|
|
490
|
-
onDelete: () =>
|
|
484
|
+
activeStep: A,
|
|
485
|
+
disclaimerText: er,
|
|
486
|
+
onBack: A === 0 ? Rn : Nn,
|
|
487
|
+
onCancel: A > 0 ? Rn : void 0,
|
|
488
|
+
onNext: qn,
|
|
489
|
+
onSaveAndClose: Jn,
|
|
490
|
+
onDelete: () => W(!0),
|
|
491
491
|
showDismissButton: !1,
|
|
492
|
-
isNextDisabled:
|
|
493
|
-
isNextLoading:
|
|
494
|
-
isSaveAndCloseDisabled:
|
|
495
|
-
isSaveAndCloseLoading:
|
|
496
|
-
nextLabel:
|
|
492
|
+
isNextDisabled: nr,
|
|
493
|
+
isNextLoading: Z && !qt,
|
|
494
|
+
isSaveAndCloseDisabled: nr,
|
|
495
|
+
isSaveAndCloseLoading: qt,
|
|
496
|
+
nextLabel: tr,
|
|
497
497
|
nextIcon: null,
|
|
498
|
-
errorMessage:
|
|
498
|
+
errorMessage: Kt,
|
|
499
499
|
labels: {
|
|
500
|
-
backButton:
|
|
501
|
-
cancelButton:
|
|
502
|
-
saveAndCloseButton:
|
|
503
|
-
deleteButton:
|
|
500
|
+
backButton: A === 0 ? E.cancel : E.back,
|
|
501
|
+
cancelButton: E.cancel,
|
|
502
|
+
saveAndCloseButton: E.saveAndClose,
|
|
503
|
+
deleteButton: E.deleteApplication
|
|
504
504
|
},
|
|
505
505
|
testIds: {
|
|
506
506
|
root: h.shell,
|
|
@@ -517,48 +517,48 @@ function at({ onEmbeddedOnboardingCompletedSuccessfully: ie, onNavigateToDashboa
|
|
|
517
517
|
}
|
|
518
518
|
},
|
|
519
519
|
children: [
|
|
520
|
-
|
|
521
|
-
value:
|
|
522
|
-
onValueChange:
|
|
523
|
-
onSnapshotChange:
|
|
520
|
+
A === 0 ? /* @__PURE__ */ b(ve, {
|
|
521
|
+
value: j,
|
|
522
|
+
onValueChange: Ut,
|
|
523
|
+
onSnapshotChange: Pt,
|
|
524
524
|
naicsOptions: vn,
|
|
525
525
|
stateOptions: yn,
|
|
526
|
-
isSubmitting:
|
|
527
|
-
labels:
|
|
528
|
-
bankName:
|
|
529
|
-
termsHref:
|
|
530
|
-
privacyHref:
|
|
531
|
-
electronicCommunicationHref:
|
|
532
|
-
patriotActHref:
|
|
526
|
+
isSubmitting: Z,
|
|
527
|
+
labels: E.businessDetails,
|
|
528
|
+
bankName: $n,
|
|
529
|
+
termsHref: ft,
|
|
530
|
+
privacyHref: pt,
|
|
531
|
+
electronicCommunicationHref: mt,
|
|
532
|
+
patriotActHref: ht
|
|
533
533
|
}, "business") : null,
|
|
534
|
-
|
|
535
|
-
value:
|
|
536
|
-
onValueChange:
|
|
537
|
-
onSnapshotChange:
|
|
534
|
+
A === 1 ? /* @__PURE__ */ b(ye, {
|
|
535
|
+
value: N,
|
|
536
|
+
onValueChange: P,
|
|
537
|
+
onSnapshotChange: Ft,
|
|
538
538
|
stateOptions: bn,
|
|
539
|
-
isSubmitting:
|
|
540
|
-
labels:
|
|
539
|
+
isSubmitting: Z,
|
|
540
|
+
labels: E.personalDetails
|
|
541
541
|
}, "personal") : null,
|
|
542
|
-
|
|
543
|
-
owners:
|
|
544
|
-
onOwnersChange:
|
|
545
|
-
primaryOwnerName: `${
|
|
546
|
-
primaryOwnerPercentage:
|
|
542
|
+
A === 2 ? /* @__PURE__ */ b(be, {
|
|
543
|
+
owners: X ? tt : F,
|
|
544
|
+
onOwnersChange: I,
|
|
545
|
+
primaryOwnerName: `${N.firstName} ${N.lastName}`.trim(),
|
|
546
|
+
primaryOwnerPercentage: X ? 100 : B?.ownsOver25Percent === !0 ? B.ownershipPercentage ?? 0 : 0,
|
|
547
547
|
stateOptions: xn,
|
|
548
|
-
onSnapshotChange:
|
|
549
|
-
onPendingOwnerChange:
|
|
550
|
-
isSubmitting:
|
|
551
|
-
labels:
|
|
552
|
-
},
|
|
548
|
+
onSnapshotChange: Lt,
|
|
549
|
+
onPendingOwnerChange: Ot,
|
|
550
|
+
isSubmitting: Z,
|
|
551
|
+
labels: E.additionalOwners
|
|
552
|
+
}, kt) : null
|
|
553
553
|
]
|
|
554
554
|
}),
|
|
555
555
|
/* @__PURE__ */ b(he, {
|
|
556
|
-
open:
|
|
557
|
-
onSaveDraft:
|
|
558
|
-
onDiscard:
|
|
559
|
-
onCancel: () =>
|
|
560
|
-
isSaving:
|
|
561
|
-
labels:
|
|
556
|
+
open: jt,
|
|
557
|
+
onSaveDraft: Yn,
|
|
558
|
+
onDiscard: Xn,
|
|
559
|
+
onCancel: () => R(!1),
|
|
560
|
+
isSaving: Mt,
|
|
561
|
+
labels: E.unsavedApplicationDialog,
|
|
562
562
|
testIds: {
|
|
563
563
|
root: h.unsavedDialog,
|
|
564
564
|
saveDraft: h.unsavedDialogSaveDraft,
|
|
@@ -567,13 +567,13 @@ function at({ onEmbeddedOnboardingCompletedSuccessfully: ie, onNavigateToDashboa
|
|
|
567
567
|
}
|
|
568
568
|
}),
|
|
569
569
|
/* @__PURE__ */ b(ge, {
|
|
570
|
-
open:
|
|
571
|
-
onConfirm:
|
|
572
|
-
onCancel: () =>
|
|
570
|
+
open: Yt,
|
|
571
|
+
onConfirm: Zn,
|
|
572
|
+
onCancel: () => W(!1),
|
|
573
573
|
isDeleting: nn.isPending,
|
|
574
574
|
labels: {
|
|
575
|
-
descriptionEmphasis:
|
|
576
|
-
...
|
|
575
|
+
descriptionEmphasis: E.saveAndClose,
|
|
576
|
+
...E.deleteApplicationDialog
|
|
577
577
|
},
|
|
578
578
|
testIds: {
|
|
579
579
|
root: h.deleteDialog,
|
|
@@ -584,7 +584,7 @@ function at({ onEmbeddedOnboardingCompletedSuccessfully: ie, onNavigateToDashboa
|
|
|
584
584
|
/* @__PURE__ */ b(te, {})
|
|
585
585
|
] });
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function ct({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: i, linkComponent: a, implementation: o, uiFramework: s, errorFallback: c, onError: l, analytics: u, disclosuresAcceptance: d, providerLabels: ee, ...f }) {
|
|
588
588
|
return /* @__PURE__ */ b(ie, {
|
|
589
589
|
baseUrl: e,
|
|
590
590
|
widgetToken: t,
|
|
@@ -599,38 +599,38 @@ function ot({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, ga
|
|
|
599
599
|
analytics: u,
|
|
600
600
|
disclosuresAcceptance: d,
|
|
601
601
|
providerLabels: ee,
|
|
602
|
-
widgetName:
|
|
603
|
-
children: /* @__PURE__ */ b(
|
|
602
|
+
widgetName: Ie,
|
|
603
|
+
children: /* @__PURE__ */ b(lt, { ...f })
|
|
604
604
|
});
|
|
605
605
|
}
|
|
606
|
-
function
|
|
606
|
+
function lt(e) {
|
|
607
607
|
let { initResponse: t } = oe(), { client: n } = s(), r = t?.userId ?? null, [i, a] = y(r), [o, c] = y(0);
|
|
608
608
|
r !== i && (a(r), i !== null && r !== null && c((e) => e + 1));
|
|
609
609
|
let [l, u] = y(n);
|
|
610
|
-
return n !== l && (u(n), c((e) => e + 1)), /* @__PURE__ */ b(
|
|
610
|
+
return n !== l && (u(n), c((e) => e + 1)), /* @__PURE__ */ b(ut, { ...e }, o);
|
|
611
611
|
}
|
|
612
|
-
function
|
|
613
|
-
let { authEpoch: t } = s(), { ownApplicationIds: n } =
|
|
612
|
+
function ut(e) {
|
|
613
|
+
let { authEpoch: t } = s(), { ownApplicationIds: n } = Ke(), [r, i] = y(null), [a, o] = y(0), [c, l] = y(!1), u = Je(() => {
|
|
614
614
|
i(null), l(!0), o((e) => e + 1);
|
|
615
615
|
}, []);
|
|
616
|
-
return r !== null && t !== r.authEpoch && n !== null && !n.includes(r.applicationId) && (i(null), o((e) => e + 1)), /* @__PURE__ */ b(
|
|
616
|
+
return r !== null && t !== r.authEpoch && n !== null && !n.includes(r.applicationId) && (i(null), o((e) => e + 1)), /* @__PURE__ */ b(ze, { children: /* @__PURE__ */ b(w, {
|
|
617
617
|
...e,
|
|
618
618
|
defaultOpen: !c && e.defaultOpen,
|
|
619
619
|
onEditableDraftChange: i,
|
|
620
620
|
onApplicationDeleted: u
|
|
621
621
|
}, a) }, a);
|
|
622
622
|
}
|
|
623
|
-
var
|
|
624
|
-
function
|
|
625
|
-
let { authEpoch: t } = s(), { applicationId: n, clientSecret: r, isResolved: i } =
|
|
623
|
+
var C = { canRender: !1 };
|
|
624
|
+
function w(e) {
|
|
625
|
+
let { authEpoch: t } = s(), { applicationId: n, clientSecret: r, isResolved: i } = Ke(), { application: a, isResolved: o, isUnavailable: c } = qe(n, r), [l, u] = y(null);
|
|
626
626
|
if (_(() => {
|
|
627
627
|
if (l?.canRender !== !0 && i && o) {
|
|
628
628
|
if (c) {
|
|
629
|
-
u(
|
|
629
|
+
u(C);
|
|
630
630
|
return;
|
|
631
631
|
}
|
|
632
|
-
if (a !== null && a.status !== void 0 && a.status !==
|
|
633
|
-
u(
|
|
632
|
+
if (a !== null && a.status !== void 0 && a.status !== et) {
|
|
633
|
+
u(C);
|
|
634
634
|
return;
|
|
635
635
|
}
|
|
636
636
|
u({
|
|
@@ -650,20 +650,20 @@ function T(e) {
|
|
|
650
650
|
n
|
|
651
651
|
]), l === null || !l.canRender) return null;
|
|
652
652
|
let { applicationId: d, authEpoch: ee, prefill: f } = l;
|
|
653
|
-
return /* @__PURE__ */ b(
|
|
653
|
+
return /* @__PURE__ */ b(st, {
|
|
654
654
|
...e,
|
|
655
655
|
initialApplicationId: d,
|
|
656
656
|
initialBoundAuthEpoch: ee,
|
|
657
657
|
initialBusinessDetails: {
|
|
658
|
-
...
|
|
658
|
+
...Re(e.initialBusinessDetails),
|
|
659
659
|
...f?.businessDetails
|
|
660
660
|
},
|
|
661
661
|
initialPersonalDetails: {
|
|
662
|
-
...
|
|
662
|
+
...Re(e.initialPersonalDetails),
|
|
663
663
|
...f?.personalDetails
|
|
664
664
|
},
|
|
665
|
-
initialAdditionalOwners: f?.additionalOwners ?? e.initialAdditionalOwners?.map(
|
|
665
|
+
initialAdditionalOwners: f?.additionalOwners ?? e.initialAdditionalOwners?.map(Le)
|
|
666
666
|
});
|
|
667
667
|
}
|
|
668
668
|
//#endregion
|
|
669
|
-
export {
|
|
669
|
+
export { ct as BankAccountOnboardingWidget, ct as default };
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.5.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.5.224", n = "ee46d41f68068d1e82dafcf6e07dd3c1c3f14c22", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|