@opendoor/partner-sdk-client-react 1.3.3-beta.113.1 → 1.3.3-beta.114.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client-react/src/components/DtcOnboardingFlow/DtcContext.d.ts +6 -0
- package/dist/client-react/src/components/DtcOnboardingFlow/DtcContext.d.ts.map +1 -1
- package/dist/client-react/src/components/DtcOnboardingFlow/DtcLayout.d.ts.map +1 -1
- package/dist/client-react/src/components/DtcOnboardingFlow/DtcPage.d.ts.map +1 -1
- package/dist/client-react/src/components/DtcOnboardingFlow/DtcProvider.d.ts +3 -0
- package/dist/client-react/src/components/DtcOnboardingFlow/DtcProvider.d.ts.map +1 -1
- package/dist/client-react/src/components/DtcOnboardingFlow/index.d.ts +25 -0
- package/dist/client-react/src/components/DtcOnboardingFlow/index.d.ts.map +1 -1
- package/dist/index.js +965 -941
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import wt, { createContext as Ye, useState as E, useEffect as
|
|
1
|
+
import wt, { createContext as Ye, useState as E, useEffect as ce, useContext as De, useRef as U, useMemo as Ie, useCallback as Ee, useLayoutEffect as Ut } from "react";
|
|
2
2
|
import { createPortal as Yt } from "react-dom";
|
|
3
3
|
var Ge = { exports: {} }, Ne = {};
|
|
4
4
|
/*
|
|
@@ -25,31 +25,31 @@ function kt() {
|
|
|
25
25
|
return !1;
|
|
26
26
|
for (var m = {}, f = 0; f < 10; f++)
|
|
27
27
|
m["_" + String.fromCharCode(f)] = f;
|
|
28
|
-
var
|
|
29
|
-
return m[
|
|
28
|
+
var u = Object.getOwnPropertyNames(m).map(function(c) {
|
|
29
|
+
return m[c];
|
|
30
30
|
});
|
|
31
|
-
if (
|
|
31
|
+
if (u.join("") !== "0123456789")
|
|
32
32
|
return !1;
|
|
33
|
-
var
|
|
34
|
-
return "abcdefghijklmnopqrst".split("").forEach(function(
|
|
35
|
-
|
|
36
|
-
}), Object.keys(Object.assign({},
|
|
33
|
+
var l = {};
|
|
34
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(c) {
|
|
35
|
+
l[c] = c;
|
|
36
|
+
}), Object.keys(Object.assign({}, l)).join("") === "abcdefghijklmnopqrst";
|
|
37
37
|
} catch {
|
|
38
38
|
return !1;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
return $e = o() ? Object.assign : function(i, m) {
|
|
42
|
-
for (var f,
|
|
43
|
-
f = Object(arguments[
|
|
42
|
+
for (var f, u = s(i), l, c = 1; c < arguments.length; c++) {
|
|
43
|
+
f = Object(arguments[c]);
|
|
44
44
|
for (var p in f)
|
|
45
|
-
r.call(f, p) && (
|
|
45
|
+
r.call(f, p) && (u[p] = f[p]);
|
|
46
46
|
if (e) {
|
|
47
|
-
|
|
48
|
-
for (var _ = 0; _ <
|
|
49
|
-
a.call(f,
|
|
47
|
+
l = e(f);
|
|
48
|
+
for (var _ = 0; _ < l.length; _++)
|
|
49
|
+
a.call(f, l[_]) && (u[l[_]] = f[l[_]]);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
return
|
|
52
|
+
return u;
|
|
53
53
|
}, $e;
|
|
54
54
|
}
|
|
55
55
|
/** @license React v17.0.2
|
|
@@ -70,12 +70,12 @@ function Zt() {
|
|
|
70
70
|
r = a("react.element"), Ne.Fragment = a("react.fragment");
|
|
71
71
|
}
|
|
72
72
|
var s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = Object.prototype.hasOwnProperty, i = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
73
|
-
function m(f,
|
|
74
|
-
var
|
|
75
|
-
|
|
76
|
-
for (
|
|
77
|
-
if (f && f.defaultProps) for (
|
|
78
|
-
return { $$typeof: r, type: f, key: _, ref:
|
|
73
|
+
function m(f, u, l) {
|
|
74
|
+
var c, p = {}, _ = null, x = null;
|
|
75
|
+
l !== void 0 && (_ = "" + l), u.key !== void 0 && (_ = "" + u.key), u.ref !== void 0 && (x = u.ref);
|
|
76
|
+
for (c in u) o.call(u, c) && !i.hasOwnProperty(c) && (p[c] = u[c]);
|
|
77
|
+
if (f && f.defaultProps) for (c in u = f.defaultProps, u) p[c] === void 0 && (p[c] = u[c]);
|
|
78
|
+
return { $$typeof: r, type: f, key: _, ref: x, props: p, _owner: s.current };
|
|
79
79
|
}
|
|
80
80
|
return Ne.jsx = m, Ne.jsxs = m, Ne;
|
|
81
81
|
}
|
|
@@ -94,51 +94,51 @@ function Kt() {
|
|
|
94
94
|
process.env.NODE_ENV !== "production" && function() {
|
|
95
95
|
var r = wt, a = kt(), s = 60103, o = 60106;
|
|
96
96
|
e.Fragment = 60107;
|
|
97
|
-
var i = 60108, m = 60114, f = 60109,
|
|
97
|
+
var i = 60108, m = 60114, f = 60109, u = 60110, l = 60112, c = 60113, p = 60120, _ = 60115, x = 60116, I = 60121, D = 60122, B = 60117, P = 60129, S = 60131;
|
|
98
98
|
if (typeof Symbol == "function" && Symbol.for) {
|
|
99
99
|
var j = Symbol.for;
|
|
100
|
-
s = j("react.element"), o = j("react.portal"), e.Fragment = j("react.fragment"), i = j("react.strict_mode"), m = j("react.profiler"), f = j("react.provider"),
|
|
100
|
+
s = j("react.element"), o = j("react.portal"), e.Fragment = j("react.fragment"), i = j("react.strict_mode"), m = j("react.profiler"), f = j("react.provider"), u = j("react.context"), l = j("react.forward_ref"), c = j("react.suspense"), p = j("react.suspense_list"), _ = j("react.memo"), x = j("react.lazy"), I = j("react.block"), D = j("react.server.block"), B = j("react.fundamental"), j("react.scope"), j("react.opaque.id"), P = j("react.debug_trace_mode"), j("react.offscreen"), S = j("react.legacy_hidden");
|
|
101
101
|
}
|
|
102
|
-
var
|
|
103
|
-
function
|
|
102
|
+
var ee = typeof Symbol == "function" && Symbol.iterator, V = "@@iterator";
|
|
103
|
+
function ae(n) {
|
|
104
104
|
if (n === null || typeof n != "object")
|
|
105
105
|
return null;
|
|
106
|
-
var
|
|
107
|
-
return typeof
|
|
106
|
+
var h = ee && n[ee] || n[V];
|
|
107
|
+
return typeof h == "function" ? h : null;
|
|
108
108
|
}
|
|
109
|
-
var
|
|
110
|
-
function
|
|
109
|
+
var Z = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
110
|
+
function L(n) {
|
|
111
111
|
{
|
|
112
|
-
for (var
|
|
113
|
-
b[
|
|
114
|
-
|
|
112
|
+
for (var h = arguments.length, b = new Array(h > 1 ? h - 1 : 0), N = 1; N < h; N++)
|
|
113
|
+
b[N - 1] = arguments[N];
|
|
114
|
+
se("error", n, b);
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function se(n, h, b) {
|
|
118
118
|
{
|
|
119
|
-
var
|
|
120
|
-
|
|
121
|
-
var W = b.map(function(
|
|
122
|
-
return "" +
|
|
119
|
+
var N = Z.ReactDebugCurrentFrame, H = N.getStackAddendum();
|
|
120
|
+
H !== "" && (h += "%s", b = b.concat([H]));
|
|
121
|
+
var W = b.map(function(O) {
|
|
122
|
+
return "" + O;
|
|
123
123
|
});
|
|
124
|
-
W.unshift("Warning: " +
|
|
124
|
+
W.unshift("Warning: " + h), Function.prototype.apply.call(console[n], console, W);
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
var
|
|
128
|
-
function
|
|
129
|
-
return !!(typeof n == "string" || typeof n == "function" || n === e.Fragment || n === m || n === P || n === i || n ===
|
|
127
|
+
var K = !1;
|
|
128
|
+
function ie(n) {
|
|
129
|
+
return !!(typeof n == "string" || typeof n == "function" || n === e.Fragment || n === m || n === P || n === i || n === c || n === p || n === S || K || typeof n == "object" && n !== null && (n.$$typeof === x || n.$$typeof === _ || n.$$typeof === f || n.$$typeof === u || n.$$typeof === l || n.$$typeof === B || n.$$typeof === I || n[0] === D));
|
|
130
130
|
}
|
|
131
|
-
function
|
|
132
|
-
var
|
|
133
|
-
return n.displayName || (
|
|
131
|
+
function Y(n, h, b) {
|
|
132
|
+
var N = h.displayName || h.name || "";
|
|
133
|
+
return n.displayName || (N !== "" ? b + "(" + N + ")" : b);
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function z(n) {
|
|
136
136
|
return n.displayName || "Context";
|
|
137
137
|
}
|
|
138
138
|
function q(n) {
|
|
139
139
|
if (n == null)
|
|
140
140
|
return null;
|
|
141
|
-
if (typeof n.tag == "number" &&
|
|
141
|
+
if (typeof n.tag == "number" && L("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."), typeof n == "function")
|
|
142
142
|
return n.displayName || n.name || null;
|
|
143
143
|
if (typeof n == "string")
|
|
144
144
|
return n;
|
|
@@ -151,29 +151,29 @@ function Kt() {
|
|
|
151
151
|
return "Profiler";
|
|
152
152
|
case i:
|
|
153
153
|
return "StrictMode";
|
|
154
|
-
case
|
|
154
|
+
case c:
|
|
155
155
|
return "Suspense";
|
|
156
156
|
case p:
|
|
157
157
|
return "SuspenseList";
|
|
158
158
|
}
|
|
159
159
|
if (typeof n == "object")
|
|
160
160
|
switch (n.$$typeof) {
|
|
161
|
-
case
|
|
162
|
-
var
|
|
163
|
-
return
|
|
161
|
+
case u:
|
|
162
|
+
var h = n;
|
|
163
|
+
return z(h) + ".Consumer";
|
|
164
164
|
case f:
|
|
165
165
|
var b = n;
|
|
166
|
-
return
|
|
167
|
-
case
|
|
168
|
-
return
|
|
166
|
+
return z(b._context) + ".Provider";
|
|
167
|
+
case l:
|
|
168
|
+
return Y(n, n.render, "ForwardRef");
|
|
169
169
|
case _:
|
|
170
170
|
return q(n.type);
|
|
171
|
-
case
|
|
171
|
+
case I:
|
|
172
172
|
return q(n._render);
|
|
173
|
-
case
|
|
174
|
-
var
|
|
173
|
+
case x: {
|
|
174
|
+
var N = n, H = N._payload, W = N._init;
|
|
175
175
|
try {
|
|
176
|
-
return q(W(
|
|
176
|
+
return q(W(H));
|
|
177
177
|
} catch {
|
|
178
178
|
return null;
|
|
179
179
|
}
|
|
@@ -181,18 +181,18 @@ function Kt() {
|
|
|
181
181
|
}
|
|
182
182
|
return null;
|
|
183
183
|
}
|
|
184
|
-
var
|
|
185
|
-
function
|
|
184
|
+
var J = 0, ue, y, k, C, fe, G, oe;
|
|
185
|
+
function M() {
|
|
186
186
|
}
|
|
187
|
-
|
|
188
|
-
function
|
|
187
|
+
M.__reactDisabledLog = !0;
|
|
188
|
+
function le() {
|
|
189
189
|
{
|
|
190
|
-
if (
|
|
191
|
-
ue = console.log,
|
|
190
|
+
if (J === 0) {
|
|
191
|
+
ue = console.log, y = console.info, k = console.warn, C = console.error, fe = console.group, G = console.groupCollapsed, oe = console.groupEnd;
|
|
192
192
|
var n = {
|
|
193
193
|
configurable: !0,
|
|
194
194
|
enumerable: !0,
|
|
195
|
-
value:
|
|
195
|
+
value: M,
|
|
196
196
|
writable: !0
|
|
197
197
|
};
|
|
198
198
|
Object.defineProperties(console, {
|
|
@@ -205,12 +205,12 @@ function Kt() {
|
|
|
205
205
|
groupEnd: n
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
|
-
|
|
208
|
+
J++;
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
|
-
function
|
|
211
|
+
function ge() {
|
|
212
212
|
{
|
|
213
|
-
if (
|
|
213
|
+
if (J--, J === 0) {
|
|
214
214
|
var n = {
|
|
215
215
|
configurable: !0,
|
|
216
216
|
enumerable: !0,
|
|
@@ -221,184 +221,184 @@ function Kt() {
|
|
|
221
221
|
value: ue
|
|
222
222
|
}),
|
|
223
223
|
info: a({}, n, {
|
|
224
|
-
value:
|
|
224
|
+
value: y
|
|
225
225
|
}),
|
|
226
226
|
warn: a({}, n, {
|
|
227
|
-
value:
|
|
227
|
+
value: k
|
|
228
228
|
}),
|
|
229
229
|
error: a({}, n, {
|
|
230
|
-
value:
|
|
230
|
+
value: C
|
|
231
231
|
}),
|
|
232
232
|
group: a({}, n, {
|
|
233
|
-
value:
|
|
233
|
+
value: fe
|
|
234
234
|
}),
|
|
235
235
|
groupCollapsed: a({}, n, {
|
|
236
|
-
value:
|
|
236
|
+
value: G
|
|
237
237
|
}),
|
|
238
238
|
groupEnd: a({}, n, {
|
|
239
|
-
value:
|
|
239
|
+
value: oe
|
|
240
240
|
})
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
|
-
|
|
243
|
+
J < 0 && L("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
|
-
var
|
|
247
|
-
function
|
|
246
|
+
var w = Z.ReactCurrentDispatcher, T;
|
|
247
|
+
function F(n, h, b) {
|
|
248
248
|
{
|
|
249
|
-
if (
|
|
249
|
+
if (T === void 0)
|
|
250
250
|
try {
|
|
251
251
|
throw Error();
|
|
252
|
-
} catch (
|
|
253
|
-
var
|
|
254
|
-
|
|
252
|
+
} catch (H) {
|
|
253
|
+
var N = H.stack.trim().match(/\n( *(at )?)/);
|
|
254
|
+
T = N && N[1] || "";
|
|
255
255
|
}
|
|
256
256
|
return `
|
|
257
|
-
` +
|
|
257
|
+
` + T + n;
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
|
-
var
|
|
260
|
+
var $ = !1, de;
|
|
261
261
|
{
|
|
262
262
|
var xe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
263
|
-
|
|
263
|
+
de = new xe();
|
|
264
264
|
}
|
|
265
|
-
function
|
|
266
|
-
if (!n ||
|
|
265
|
+
function _e(n, h) {
|
|
266
|
+
if (!n || $)
|
|
267
267
|
return "";
|
|
268
268
|
{
|
|
269
|
-
var b =
|
|
269
|
+
var b = de.get(n);
|
|
270
270
|
if (b !== void 0)
|
|
271
271
|
return b;
|
|
272
272
|
}
|
|
273
|
-
var
|
|
274
|
-
|
|
275
|
-
var
|
|
273
|
+
var N;
|
|
274
|
+
$ = !0;
|
|
275
|
+
var H = Error.prepareStackTrace;
|
|
276
276
|
Error.prepareStackTrace = void 0;
|
|
277
277
|
var W;
|
|
278
|
-
W =
|
|
278
|
+
W = w.current, w.current = null, le();
|
|
279
279
|
try {
|
|
280
|
-
if (
|
|
281
|
-
var
|
|
280
|
+
if (h) {
|
|
281
|
+
var O = function() {
|
|
282
282
|
throw Error();
|
|
283
283
|
};
|
|
284
|
-
if (Object.defineProperty(
|
|
284
|
+
if (Object.defineProperty(O.prototype, "props", {
|
|
285
285
|
set: function() {
|
|
286
286
|
throw Error();
|
|
287
287
|
}
|
|
288
288
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
289
289
|
try {
|
|
290
|
-
Reflect.construct(
|
|
291
|
-
} catch (
|
|
292
|
-
|
|
290
|
+
Reflect.construct(O, []);
|
|
291
|
+
} catch (ye) {
|
|
292
|
+
N = ye;
|
|
293
293
|
}
|
|
294
|
-
Reflect.construct(n, [],
|
|
294
|
+
Reflect.construct(n, [], O);
|
|
295
295
|
} else {
|
|
296
296
|
try {
|
|
297
|
-
|
|
298
|
-
} catch (
|
|
299
|
-
|
|
297
|
+
O.call();
|
|
298
|
+
} catch (ye) {
|
|
299
|
+
N = ye;
|
|
300
300
|
}
|
|
301
|
-
n.call(
|
|
301
|
+
n.call(O.prototype);
|
|
302
302
|
}
|
|
303
303
|
} else {
|
|
304
304
|
try {
|
|
305
305
|
throw Error();
|
|
306
|
-
} catch (
|
|
307
|
-
|
|
306
|
+
} catch (ye) {
|
|
307
|
+
N = ye;
|
|
308
308
|
}
|
|
309
309
|
n();
|
|
310
310
|
}
|
|
311
|
-
} catch (
|
|
312
|
-
if (
|
|
313
|
-
for (var
|
|
314
|
-
`),
|
|
315
|
-
`), Q =
|
|
316
|
-
|
|
317
|
-
for (; Q >= 1 &&
|
|
318
|
-
if (
|
|
319
|
-
if (Q !== 1 ||
|
|
311
|
+
} catch (ye) {
|
|
312
|
+
if (ye && N && typeof ye.stack == "string") {
|
|
313
|
+
for (var A = ye.stack.split(`
|
|
314
|
+
`), he = N.stack.split(`
|
|
315
|
+
`), Q = A.length - 1, re = he.length - 1; Q >= 1 && re >= 0 && A[Q] !== he[re]; )
|
|
316
|
+
re--;
|
|
317
|
+
for (; Q >= 1 && re >= 0; Q--, re--)
|
|
318
|
+
if (A[Q] !== he[re]) {
|
|
319
|
+
if (Q !== 1 || re !== 1)
|
|
320
320
|
do
|
|
321
|
-
if (Q--,
|
|
322
|
-
var
|
|
323
|
-
` +
|
|
324
|
-
return typeof n == "function" &&
|
|
321
|
+
if (Q--, re--, re < 0 || A[Q] !== he[re]) {
|
|
322
|
+
var be = `
|
|
323
|
+
` + A[Q].replace(" at new ", " at ");
|
|
324
|
+
return typeof n == "function" && de.set(n, be), be;
|
|
325
325
|
}
|
|
326
|
-
while (Q >= 1 &&
|
|
326
|
+
while (Q >= 1 && re >= 0);
|
|
327
327
|
break;
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
330
|
} finally {
|
|
331
|
-
|
|
331
|
+
$ = !1, w.current = W, ge(), Error.prepareStackTrace = H;
|
|
332
332
|
}
|
|
333
|
-
var je = n ? n.displayName || n.name : "", ot = je ?
|
|
334
|
-
return typeof n == "function" &&
|
|
333
|
+
var je = n ? n.displayName || n.name : "", ot = je ? F(je) : "";
|
|
334
|
+
return typeof n == "function" && de.set(n, ot), ot;
|
|
335
335
|
}
|
|
336
|
-
function Le(n,
|
|
337
|
-
return
|
|
336
|
+
function Le(n, h, b) {
|
|
337
|
+
return _e(n, !1);
|
|
338
338
|
}
|
|
339
339
|
function ve(n) {
|
|
340
|
-
var
|
|
341
|
-
return !!(
|
|
340
|
+
var h = n.prototype;
|
|
341
|
+
return !!(h && h.isReactComponent);
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function v(n, h, b) {
|
|
344
344
|
if (n == null)
|
|
345
345
|
return "";
|
|
346
346
|
if (typeof n == "function")
|
|
347
|
-
return
|
|
347
|
+
return _e(n, ve(n));
|
|
348
348
|
if (typeof n == "string")
|
|
349
|
-
return
|
|
349
|
+
return F(n);
|
|
350
350
|
switch (n) {
|
|
351
|
-
case
|
|
352
|
-
return
|
|
351
|
+
case c:
|
|
352
|
+
return F("Suspense");
|
|
353
353
|
case p:
|
|
354
|
-
return
|
|
354
|
+
return F("SuspenseList");
|
|
355
355
|
}
|
|
356
356
|
if (typeof n == "object")
|
|
357
357
|
switch (n.$$typeof) {
|
|
358
|
-
case
|
|
358
|
+
case l:
|
|
359
359
|
return Le(n.render);
|
|
360
360
|
case _:
|
|
361
|
-
return
|
|
362
|
-
case
|
|
361
|
+
return v(n.type, h, b);
|
|
362
|
+
case I:
|
|
363
363
|
return Le(n._render);
|
|
364
|
-
case
|
|
365
|
-
var
|
|
364
|
+
case x: {
|
|
365
|
+
var N = n, H = N._payload, W = N._init;
|
|
366
366
|
try {
|
|
367
|
-
return
|
|
367
|
+
return v(W(H), h, b);
|
|
368
368
|
} catch {
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
372
|
return "";
|
|
373
373
|
}
|
|
374
|
-
var X = {},
|
|
374
|
+
var X = {}, te = Z.ReactDebugCurrentFrame;
|
|
375
375
|
function Ce(n) {
|
|
376
376
|
if (n) {
|
|
377
|
-
var
|
|
378
|
-
|
|
377
|
+
var h = n._owner, b = v(n.type, n._source, h ? h.type : null);
|
|
378
|
+
te.setExtraStackFrame(b);
|
|
379
379
|
} else
|
|
380
|
-
|
|
380
|
+
te.setExtraStackFrame(null);
|
|
381
381
|
}
|
|
382
|
-
function we(n,
|
|
382
|
+
function we(n, h, b, N, H) {
|
|
383
383
|
{
|
|
384
384
|
var W = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
385
|
-
for (var
|
|
386
|
-
if (W(n,
|
|
387
|
-
var
|
|
385
|
+
for (var O in n)
|
|
386
|
+
if (W(n, O)) {
|
|
387
|
+
var A = void 0;
|
|
388
388
|
try {
|
|
389
|
-
if (typeof n[
|
|
390
|
-
var
|
|
391
|
-
throw
|
|
389
|
+
if (typeof n[O] != "function") {
|
|
390
|
+
var he = Error((N || "React class") + ": " + b + " type `" + O + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof n[O] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
391
|
+
throw he.name = "Invariant Violation", he;
|
|
392
392
|
}
|
|
393
|
-
|
|
393
|
+
A = n[O](h, O, N, b, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
394
394
|
} catch (Q) {
|
|
395
|
-
|
|
395
|
+
A = Q;
|
|
396
396
|
}
|
|
397
|
-
|
|
397
|
+
A && !(A instanceof Error) && (Ce(H), L("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", N || "React class", b, O, typeof A), Ce(null)), A instanceof Error && !(A.message in X) && (X[A.message] = !0, Ce(H), L("Failed %s type: %s", b, A.message), Ce(null));
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
|
-
var
|
|
401
|
+
var Se = Z.ReactCurrentOwner, Re = Object.prototype.hasOwnProperty, Pt = {
|
|
402
402
|
key: !0,
|
|
403
403
|
ref: !0,
|
|
404
404
|
__self: !0,
|
|
@@ -406,27 +406,27 @@ function Kt() {
|
|
|
406
406
|
}, Xe, Qe;
|
|
407
407
|
function Lt(n) {
|
|
408
408
|
if (Re.call(n, "ref")) {
|
|
409
|
-
var
|
|
410
|
-
if (
|
|
409
|
+
var h = Object.getOwnPropertyDescriptor(n, "ref").get;
|
|
410
|
+
if (h && h.isReactWarning)
|
|
411
411
|
return !1;
|
|
412
412
|
}
|
|
413
413
|
return n.ref !== void 0;
|
|
414
414
|
}
|
|
415
415
|
function Tt(n) {
|
|
416
416
|
if (Re.call(n, "key")) {
|
|
417
|
-
var
|
|
418
|
-
if (
|
|
417
|
+
var h = Object.getOwnPropertyDescriptor(n, "key").get;
|
|
418
|
+
if (h && h.isReactWarning)
|
|
419
419
|
return !1;
|
|
420
420
|
}
|
|
421
421
|
return n.key !== void 0;
|
|
422
422
|
}
|
|
423
|
-
function At(n,
|
|
424
|
-
typeof n.ref == "string" &&
|
|
423
|
+
function At(n, h) {
|
|
424
|
+
typeof n.ref == "string" && Se.current;
|
|
425
425
|
}
|
|
426
|
-
function Dt(n,
|
|
426
|
+
function Dt(n, h) {
|
|
427
427
|
{
|
|
428
428
|
var b = function() {
|
|
429
|
-
Xe || (Xe = !0,
|
|
429
|
+
Xe || (Xe = !0, L("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
|
|
430
430
|
};
|
|
431
431
|
b.isReactWarning = !0, Object.defineProperty(n, "key", {
|
|
432
432
|
get: b,
|
|
@@ -434,10 +434,10 @@ function Kt() {
|
|
|
434
434
|
});
|
|
435
435
|
}
|
|
436
436
|
}
|
|
437
|
-
function Ot(n,
|
|
437
|
+
function Ot(n, h) {
|
|
438
438
|
{
|
|
439
439
|
var b = function() {
|
|
440
|
-
Qe || (Qe = !0,
|
|
440
|
+
Qe || (Qe = !0, L("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
|
|
441
441
|
};
|
|
442
442
|
b.isReactWarning = !0, Object.defineProperty(n, "ref", {
|
|
443
443
|
get: b,
|
|
@@ -445,57 +445,57 @@ function Kt() {
|
|
|
445
445
|
});
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
|
-
var Rt = function(n,
|
|
449
|
-
var
|
|
448
|
+
var Rt = function(n, h, b, N, H, W, O) {
|
|
449
|
+
var A = {
|
|
450
450
|
// This tag allows us to uniquely identify this as a React Element
|
|
451
451
|
$$typeof: s,
|
|
452
452
|
// Built-in properties that belong on the element
|
|
453
453
|
type: n,
|
|
454
|
-
key:
|
|
454
|
+
key: h,
|
|
455
455
|
ref: b,
|
|
456
|
-
props:
|
|
456
|
+
props: O,
|
|
457
457
|
// Record the component responsible for creating this element.
|
|
458
458
|
_owner: W
|
|
459
459
|
};
|
|
460
|
-
return
|
|
460
|
+
return A._store = {}, Object.defineProperty(A._store, "validated", {
|
|
461
461
|
configurable: !1,
|
|
462
462
|
enumerable: !1,
|
|
463
463
|
writable: !0,
|
|
464
464
|
value: !1
|
|
465
|
-
}), Object.defineProperty(
|
|
465
|
+
}), Object.defineProperty(A, "_self", {
|
|
466
466
|
configurable: !1,
|
|
467
467
|
enumerable: !1,
|
|
468
468
|
writable: !1,
|
|
469
|
-
value:
|
|
470
|
-
}), Object.defineProperty(
|
|
469
|
+
value: N
|
|
470
|
+
}), Object.defineProperty(A, "_source", {
|
|
471
471
|
configurable: !1,
|
|
472
472
|
enumerable: !1,
|
|
473
473
|
writable: !1,
|
|
474
|
-
value:
|
|
475
|
-
}), Object.freeze && (Object.freeze(
|
|
474
|
+
value: H
|
|
475
|
+
}), Object.freeze && (Object.freeze(A.props), Object.freeze(A)), A;
|
|
476
476
|
};
|
|
477
|
-
function Bt(n,
|
|
477
|
+
function Bt(n, h, b, N, H) {
|
|
478
478
|
{
|
|
479
|
-
var W,
|
|
480
|
-
b !== void 0 && (
|
|
481
|
-
for (W in
|
|
482
|
-
Re.call(
|
|
479
|
+
var W, O = {}, A = null, he = null;
|
|
480
|
+
b !== void 0 && (A = "" + b), Tt(h) && (A = "" + h.key), Lt(h) && (he = h.ref, At(h, H));
|
|
481
|
+
for (W in h)
|
|
482
|
+
Re.call(h, W) && !Pt.hasOwnProperty(W) && (O[W] = h[W]);
|
|
483
483
|
if (n && n.defaultProps) {
|
|
484
484
|
var Q = n.defaultProps;
|
|
485
485
|
for (W in Q)
|
|
486
|
-
|
|
486
|
+
O[W] === void 0 && (O[W] = Q[W]);
|
|
487
487
|
}
|
|
488
|
-
if (
|
|
489
|
-
var
|
|
490
|
-
|
|
488
|
+
if (A || he) {
|
|
489
|
+
var re = typeof n == "function" ? n.displayName || n.name || "Unknown" : n;
|
|
490
|
+
A && Dt(O, re), he && Ot(O, re);
|
|
491
491
|
}
|
|
492
|
-
return Rt(n,
|
|
492
|
+
return Rt(n, A, he, H, N, Se.current, O);
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
|
-
var Be =
|
|
495
|
+
var Be = Z.ReactCurrentOwner, et = Z.ReactDebugCurrentFrame;
|
|
496
496
|
function ke(n) {
|
|
497
497
|
if (n) {
|
|
498
|
-
var
|
|
498
|
+
var h = n._owner, b = v(n.type, n._source, h ? h.type : null);
|
|
499
499
|
et.setExtraStackFrame(b);
|
|
500
500
|
} else
|
|
501
501
|
et.setExtraStackFrame(null);
|
|
@@ -523,120 +523,120 @@ Check the render method of \`` + n + "`.";
|
|
|
523
523
|
var rt = {};
|
|
524
524
|
function Ft(n) {
|
|
525
525
|
{
|
|
526
|
-
var
|
|
527
|
-
if (!
|
|
526
|
+
var h = tt();
|
|
527
|
+
if (!h) {
|
|
528
528
|
var b = typeof n == "string" ? n : n.displayName || n.name;
|
|
529
|
-
b && (
|
|
529
|
+
b && (h = `
|
|
530
530
|
|
|
531
531
|
Check the top-level render call using <` + b + ">.");
|
|
532
532
|
}
|
|
533
|
-
return
|
|
533
|
+
return h;
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
|
-
function nt(n,
|
|
536
|
+
function nt(n, h) {
|
|
537
537
|
{
|
|
538
538
|
if (!n._store || n._store.validated || n.key != null)
|
|
539
539
|
return;
|
|
540
540
|
n._store.validated = !0;
|
|
541
|
-
var b = Ft(
|
|
541
|
+
var b = Ft(h);
|
|
542
542
|
if (rt[b])
|
|
543
543
|
return;
|
|
544
544
|
rt[b] = !0;
|
|
545
|
-
var
|
|
546
|
-
n && n._owner && n._owner !== Be.current && (
|
|
545
|
+
var N = "";
|
|
546
|
+
n && n._owner && n._owner !== Be.current && (N = " It was passed a child from " + q(n._owner.type) + "."), ke(n), L('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', b, N), ke(null);
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
|
-
function at(n,
|
|
549
|
+
function at(n, h) {
|
|
550
550
|
{
|
|
551
551
|
if (typeof n != "object")
|
|
552
552
|
return;
|
|
553
553
|
if (Array.isArray(n))
|
|
554
554
|
for (var b = 0; b < n.length; b++) {
|
|
555
|
-
var
|
|
556
|
-
Fe(
|
|
555
|
+
var N = n[b];
|
|
556
|
+
Fe(N) && nt(N, h);
|
|
557
557
|
}
|
|
558
558
|
else if (Fe(n))
|
|
559
559
|
n._store && (n._store.validated = !0);
|
|
560
560
|
else if (n) {
|
|
561
|
-
var
|
|
562
|
-
if (typeof
|
|
563
|
-
for (var W =
|
|
564
|
-
Fe(
|
|
561
|
+
var H = ae(n);
|
|
562
|
+
if (typeof H == "function" && H !== n.entries)
|
|
563
|
+
for (var W = H.call(n), O; !(O = W.next()).done; )
|
|
564
|
+
Fe(O.value) && nt(O.value, h);
|
|
565
565
|
}
|
|
566
566
|
}
|
|
567
567
|
}
|
|
568
568
|
function $t(n) {
|
|
569
569
|
{
|
|
570
|
-
var
|
|
571
|
-
if (
|
|
570
|
+
var h = n.type;
|
|
571
|
+
if (h == null || typeof h == "string")
|
|
572
572
|
return;
|
|
573
573
|
var b;
|
|
574
|
-
if (typeof
|
|
575
|
-
b =
|
|
576
|
-
else if (typeof
|
|
574
|
+
if (typeof h == "function")
|
|
575
|
+
b = h.propTypes;
|
|
576
|
+
else if (typeof h == "object" && (h.$$typeof === l || // Note: Memo only checks outer props here.
|
|
577
577
|
// Inner props are checked in the reconciler.
|
|
578
|
-
|
|
579
|
-
b =
|
|
578
|
+
h.$$typeof === _))
|
|
579
|
+
b = h.propTypes;
|
|
580
580
|
else
|
|
581
581
|
return;
|
|
582
582
|
if (b) {
|
|
583
|
-
var
|
|
584
|
-
we(b, n.props, "prop",
|
|
585
|
-
} else if (
|
|
583
|
+
var N = q(h);
|
|
584
|
+
we(b, n.props, "prop", N, n);
|
|
585
|
+
} else if (h.PropTypes !== void 0 && !Me) {
|
|
586
586
|
Me = !0;
|
|
587
|
-
var
|
|
588
|
-
|
|
587
|
+
var H = q(h);
|
|
588
|
+
L("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", H || "Unknown");
|
|
589
589
|
}
|
|
590
|
-
typeof
|
|
590
|
+
typeof h.getDefaultProps == "function" && !h.getDefaultProps.isReactClassApproved && L("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
591
591
|
}
|
|
592
592
|
}
|
|
593
593
|
function Wt(n) {
|
|
594
594
|
{
|
|
595
|
-
for (var
|
|
596
|
-
var
|
|
597
|
-
if (
|
|
598
|
-
ke(n),
|
|
595
|
+
for (var h = Object.keys(n.props), b = 0; b < h.length; b++) {
|
|
596
|
+
var N = h[b];
|
|
597
|
+
if (N !== "children" && N !== "key") {
|
|
598
|
+
ke(n), L("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", N), ke(null);
|
|
599
599
|
break;
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
|
-
n.ref !== null && (ke(n),
|
|
602
|
+
n.ref !== null && (ke(n), L("Invalid attribute `ref` supplied to `React.Fragment`."), ke(null));
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
|
-
function st(n,
|
|
605
|
+
function st(n, h, b, N, H, W) {
|
|
606
606
|
{
|
|
607
|
-
var
|
|
608
|
-
if (!
|
|
609
|
-
var
|
|
610
|
-
(n === void 0 || typeof n == "object" && n !== null && Object.keys(n).length === 0) && (
|
|
611
|
-
var
|
|
612
|
-
|
|
607
|
+
var O = ie(n);
|
|
608
|
+
if (!O) {
|
|
609
|
+
var A = "";
|
|
610
|
+
(n === void 0 || typeof n == "object" && n !== null && Object.keys(n).length === 0) && (A += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
611
|
+
var he = Mt();
|
|
612
|
+
he ? A += he : A += tt();
|
|
613
613
|
var Q;
|
|
614
|
-
n === null ? Q = "null" : Array.isArray(n) ? Q = "array" : n !== void 0 && n.$$typeof === s ? (Q = "<" + (q(n.type) || "Unknown") + " />",
|
|
614
|
+
n === null ? Q = "null" : Array.isArray(n) ? Q = "array" : n !== void 0 && n.$$typeof === s ? (Q = "<" + (q(n.type) || "Unknown") + " />", A = " Did you accidentally export a JSX literal instead of a component?") : Q = typeof n, L("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Q, A);
|
|
615
615
|
}
|
|
616
|
-
var
|
|
617
|
-
if (
|
|
618
|
-
return
|
|
619
|
-
if (
|
|
620
|
-
var
|
|
621
|
-
if (
|
|
622
|
-
if (
|
|
623
|
-
if (Array.isArray(
|
|
624
|
-
for (var je = 0; je <
|
|
625
|
-
at(
|
|
626
|
-
Object.freeze && Object.freeze(
|
|
616
|
+
var re = Bt(n, h, b, H, W);
|
|
617
|
+
if (re == null)
|
|
618
|
+
return re;
|
|
619
|
+
if (O) {
|
|
620
|
+
var be = h.children;
|
|
621
|
+
if (be !== void 0)
|
|
622
|
+
if (N)
|
|
623
|
+
if (Array.isArray(be)) {
|
|
624
|
+
for (var je = 0; je < be.length; je++)
|
|
625
|
+
at(be[je], n);
|
|
626
|
+
Object.freeze && Object.freeze(be);
|
|
627
627
|
} else
|
|
628
|
-
|
|
628
|
+
L("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
629
629
|
else
|
|
630
|
-
at(
|
|
630
|
+
at(be, n);
|
|
631
631
|
}
|
|
632
|
-
return n === e.Fragment ? Wt(
|
|
632
|
+
return n === e.Fragment ? Wt(re) : $t(re), re;
|
|
633
633
|
}
|
|
634
634
|
}
|
|
635
|
-
function Ht(n,
|
|
636
|
-
return st(n,
|
|
635
|
+
function Ht(n, h, b) {
|
|
636
|
+
return st(n, h, b, !0);
|
|
637
637
|
}
|
|
638
|
-
function Vt(n,
|
|
639
|
-
return st(n,
|
|
638
|
+
function Vt(n, h, b) {
|
|
639
|
+
return st(n, h, b, !1);
|
|
640
640
|
}
|
|
641
641
|
var qt = Vt, Gt = Ht;
|
|
642
642
|
e.jsx = qt, e.jsxs = Gt;
|
|
@@ -765,7 +765,7 @@ const Ze = {
|
|
|
765
765
|
children: r
|
|
766
766
|
}) => {
|
|
767
767
|
const [a, s] = E(Ze);
|
|
768
|
-
return
|
|
768
|
+
return ce(() => {
|
|
769
769
|
const o = new lr(e.environment);
|
|
770
770
|
return s(o), () => {
|
|
771
771
|
o.destroy();
|
|
@@ -779,16 +779,16 @@ const Ze = {
|
|
|
779
779
|
);
|
|
780
780
|
return e;
|
|
781
781
|
}, ze = () => De(jt);
|
|
782
|
-
function
|
|
783
|
-
const a = ze(), s =
|
|
782
|
+
function St(e, r = {}) {
|
|
783
|
+
const a = ze(), s = U(a);
|
|
784
784
|
s.current = a;
|
|
785
|
-
const o =
|
|
786
|
-
return
|
|
785
|
+
const o = U(null), i = U(!1);
|
|
786
|
+
return ce(() => {
|
|
787
787
|
const m = o.current;
|
|
788
788
|
if (!m || !e || i.current) return;
|
|
789
789
|
const f = new IntersectionObserver(
|
|
790
|
-
([
|
|
791
|
-
if (
|
|
790
|
+
([u]) => {
|
|
791
|
+
if (u.isIntersecting && !i.current) {
|
|
792
792
|
if (s.current === Ze) return;
|
|
793
793
|
i.current = !0, s.current.trackPlatform({
|
|
794
794
|
inputViewEvent: { targetName: e }
|
|
@@ -940,7 +940,7 @@ function mr() {
|
|
|
940
940
|
/* @__PURE__ */ t.jsx(fr, {})
|
|
941
941
|
] });
|
|
942
942
|
}
|
|
943
|
-
const pr = "_container_tu90h_8", gr = "_inputSection_tu90h_16", _r = "_inputWrapper_tu90h_22", br = "_input_tu90h_16", yr = "_inputIcon_tu90h_63", vr = "_button_tu90h_80", xr = "_spinner_tu90h_121", Cr = "_suggestions_tu90h_136", wr = "_errorState_tu90h_150", kr = "_suggestion_tu90h_136", jr = "_error_tu90h_150", Nr = "_errorIcon_tu90h_199",
|
|
943
|
+
const pr = "_container_tu90h_8", gr = "_inputSection_tu90h_16", _r = "_inputWrapper_tu90h_22", br = "_input_tu90h_16", yr = "_inputIcon_tu90h_63", vr = "_button_tu90h_80", xr = "_spinner_tu90h_121", Cr = "_suggestions_tu90h_136", wr = "_errorState_tu90h_150", kr = "_suggestion_tu90h_136", jr = "_error_tu90h_150", Nr = "_errorIcon_tu90h_199", Sr = "_errorBorder_tu90h_213", Ir = "_manualLink_tu90h_223", Er = "_manualForm_tu90h_245", Pr = "_manualFormField_tu90h_260", Lr = "_manualFormLabel_tu90h_264", Tr = "_manualFormInput_tu90h_273", Ar = "_formRow_tu90h_294", Dr = "_submitButton_tu90h_302", R = {
|
|
944
944
|
container: pr,
|
|
945
945
|
inputSection: gr,
|
|
946
946
|
inputWrapper: _r,
|
|
@@ -953,8 +953,8 @@ const pr = "_container_tu90h_8", gr = "_inputSection_tu90h_16", _r = "_inputWrap
|
|
|
953
953
|
suggestion: kr,
|
|
954
954
|
error: jr,
|
|
955
955
|
errorIcon: Nr,
|
|
956
|
-
errorBorder:
|
|
957
|
-
manualLink:
|
|
956
|
+
errorBorder: Sr,
|
|
957
|
+
manualLink: Ir,
|
|
958
958
|
manualForm: Er,
|
|
959
959
|
manualFormField: Pr,
|
|
960
960
|
manualFormLabel: Lr,
|
|
@@ -1015,203 +1015,203 @@ function Oo({
|
|
|
1015
1015
|
placeholderText: i = "Enter your home address",
|
|
1016
1016
|
buttonText: m = "Get cash offer",
|
|
1017
1017
|
showButton: f = !0,
|
|
1018
|
-
buttonIcon:
|
|
1019
|
-
inputIcon:
|
|
1020
|
-
manualEntryText:
|
|
1018
|
+
buttonIcon: u,
|
|
1019
|
+
inputIcon: l,
|
|
1020
|
+
manualEntryText: c = "Enter address manually instead",
|
|
1021
1021
|
appearance: p,
|
|
1022
1022
|
onReady: _,
|
|
1023
|
-
onChange:
|
|
1024
|
-
onValidationError:
|
|
1025
|
-
onAddressSuggestionsStart:
|
|
1026
|
-
onAddressSuggestionsComplete:
|
|
1023
|
+
onChange: x,
|
|
1024
|
+
onValidationError: I,
|
|
1025
|
+
onAddressSuggestionsStart: D,
|
|
1026
|
+
onAddressSuggestionsComplete: B,
|
|
1027
1027
|
onError: P
|
|
1028
1028
|
}) {
|
|
1029
|
-
const
|
|
1029
|
+
const S = Nt(), j = ze(), ee = Pe(p), [V, ae] = E(""), [Z, L] = E([]), [se, K] = E(!1), [ie, Y] = E(!1), [z, q] = E(null), [J, ue] = E(!1), [y, k] = E(!1), [C, fe] = E({
|
|
1030
1030
|
street1: "",
|
|
1031
1031
|
street2: "",
|
|
1032
1032
|
city: "",
|
|
1033
1033
|
state: "",
|
|
1034
1034
|
postalCode: ""
|
|
1035
|
-
}),
|
|
1035
|
+
}), G = U(null), oe = St("partner-sdk-address-input", {
|
|
1036
1036
|
immediate: !0
|
|
1037
|
-
}),
|
|
1038
|
-
|
|
1039
|
-
const
|
|
1040
|
-
|
|
1041
|
-
const
|
|
1042
|
-
|
|
1043
|
-
const
|
|
1044
|
-
|
|
1037
|
+
}), M = U(P);
|
|
1038
|
+
M.current = P;
|
|
1039
|
+
const le = U(D);
|
|
1040
|
+
le.current = D;
|
|
1041
|
+
const ge = U(B);
|
|
1042
|
+
ge.current = B;
|
|
1043
|
+
const w = U(null), T = se && !ie && V.trim().length >= 3 && Z.length === 0 && !y;
|
|
1044
|
+
ce(() => {
|
|
1045
1045
|
_ == null || _();
|
|
1046
|
-
}, []),
|
|
1047
|
-
if (!r ||
|
|
1048
|
-
|
|
1046
|
+
}, []), ce(() => {
|
|
1047
|
+
if (!r || V.trim().length < 3 || J) {
|
|
1048
|
+
V.trim().length === 0 && (L([]), K(!1), q(null));
|
|
1049
1049
|
return;
|
|
1050
1050
|
}
|
|
1051
|
-
|
|
1052
|
-
const
|
|
1053
|
-
var X,
|
|
1054
|
-
(X =
|
|
1051
|
+
Y(!0), q(null);
|
|
1052
|
+
const v = setTimeout(async () => {
|
|
1053
|
+
var X, te, Ce;
|
|
1054
|
+
(X = le.current) == null || X.call(le, V);
|
|
1055
1055
|
try {
|
|
1056
|
-
const we = await
|
|
1057
|
-
|
|
1056
|
+
const we = await S.getAddressSuggestions(V);
|
|
1057
|
+
L(we.addresses), K(!0), (te = ge.current) == null || te.call(ge, we.addresses);
|
|
1058
1058
|
} catch (we) {
|
|
1059
|
-
const
|
|
1060
|
-
q(
|
|
1059
|
+
const Se = we instanceof Error ? we : new Error("Failed to fetch address suggestions");
|
|
1060
|
+
q(Se.message), L([]), K(!0), (Ce = M.current) == null || Ce.call(M, Se);
|
|
1061
1061
|
} finally {
|
|
1062
|
-
|
|
1062
|
+
Y(!1);
|
|
1063
1063
|
}
|
|
1064
1064
|
}, a);
|
|
1065
|
-
return () => clearTimeout(
|
|
1066
|
-
}, [
|
|
1067
|
-
const
|
|
1068
|
-
|
|
1065
|
+
return () => clearTimeout(v);
|
|
1066
|
+
}, [V, J, r, a, S]), ce(() => {
|
|
1067
|
+
const v = (X) => {
|
|
1068
|
+
w.current && !w.current.contains(X.target) && G.current && !G.current.contains(X.target) && K(!1);
|
|
1069
1069
|
};
|
|
1070
|
-
return document.addEventListener("mousedown",
|
|
1070
|
+
return document.addEventListener("mousedown", v), () => document.removeEventListener("mousedown", v);
|
|
1071
1071
|
}, []);
|
|
1072
|
-
const
|
|
1073
|
-
const X =
|
|
1074
|
-
|
|
1075
|
-
},
|
|
1076
|
-
ue(!0),
|
|
1072
|
+
const F = (v) => {
|
|
1073
|
+
const X = v.target.value;
|
|
1074
|
+
ae(X), ue(!1), x == null || x({ street1: X });
|
|
1075
|
+
}, $ = async (v) => {
|
|
1076
|
+
ue(!0), ae(mt(v)), L([]), K(!1), q(null), x == null || x(v), j.trackSell({
|
|
1077
1077
|
addressEntryV2: {
|
|
1078
|
-
street1:
|
|
1079
|
-
city:
|
|
1080
|
-
state:
|
|
1081
|
-
postalCode:
|
|
1082
|
-
unit:
|
|
1078
|
+
street1: v.street1,
|
|
1079
|
+
city: v.city,
|
|
1080
|
+
state: v.state,
|
|
1081
|
+
postalCode: v.postalCode,
|
|
1082
|
+
unit: v.street2,
|
|
1083
1083
|
sourcePage: "partner-sdk"
|
|
1084
1084
|
}
|
|
1085
1085
|
});
|
|
1086
1086
|
try {
|
|
1087
|
-
await e(
|
|
1087
|
+
await e(v);
|
|
1088
1088
|
} catch (X) {
|
|
1089
|
-
const
|
|
1090
|
-
q(
|
|
1089
|
+
const te = X instanceof Error ? X : new Error("Failed to process address");
|
|
1090
|
+
q(te.message), P == null || P(te), ae(""), ue(!1);
|
|
1091
1091
|
}
|
|
1092
|
-
},
|
|
1092
|
+
}, de = () => {
|
|
1093
1093
|
j.trackPlatform({
|
|
1094
1094
|
inputFocusEvent: { targetName: "partner-sdk-address-input" }
|
|
1095
|
-
}),
|
|
1095
|
+
}), Z.length > 0 && V.length > 0 && K(!0);
|
|
1096
1096
|
}, xe = () => {
|
|
1097
1097
|
j.trackPlatform({
|
|
1098
1098
|
linkClickEvent: { targetName: "partner-sdk-manual-entry" }
|
|
1099
|
-
}),
|
|
1100
|
-
},
|
|
1101
|
-
const
|
|
1102
|
-
|
|
1103
|
-
street1:
|
|
1104
|
-
...
|
|
1105
|
-
city:
|
|
1106
|
-
state:
|
|
1107
|
-
postalCode:
|
|
1099
|
+
}), k(!0), K(!1);
|
|
1100
|
+
}, _e = (v, X) => {
|
|
1101
|
+
const te = { ...C, [v]: X };
|
|
1102
|
+
fe(te), x == null || x({
|
|
1103
|
+
street1: te.street1,
|
|
1104
|
+
...te.street2 ? { street2: te.street2 } : {},
|
|
1105
|
+
city: te.city,
|
|
1106
|
+
state: te.state,
|
|
1107
|
+
postalCode: te.postalCode
|
|
1108
1108
|
});
|
|
1109
1109
|
}, Le = async () => {
|
|
1110
|
-
if (!
|
|
1111
|
-
const
|
|
1112
|
-
q(
|
|
1110
|
+
if (!C.street1 || !C.city || !C.state || !C.postalCode) {
|
|
1111
|
+
const v = "Please fill in all required fields";
|
|
1112
|
+
q(v), I == null || I(v);
|
|
1113
1113
|
return;
|
|
1114
1114
|
}
|
|
1115
|
-
|
|
1115
|
+
Y(!0), q(null);
|
|
1116
1116
|
try {
|
|
1117
|
-
const
|
|
1118
|
-
street1:
|
|
1119
|
-
...
|
|
1120
|
-
city:
|
|
1121
|
-
state:
|
|
1122
|
-
postalCode:
|
|
1117
|
+
const v = {
|
|
1118
|
+
street1: C.street1,
|
|
1119
|
+
...C.street2 ? { street2: C.street2 } : {},
|
|
1120
|
+
city: C.city,
|
|
1121
|
+
state: C.state,
|
|
1122
|
+
postalCode: C.postalCode
|
|
1123
1123
|
};
|
|
1124
1124
|
j.trackSell({
|
|
1125
1125
|
addressEntryV2: {
|
|
1126
|
-
street1:
|
|
1127
|
-
city:
|
|
1128
|
-
state:
|
|
1129
|
-
postalCode:
|
|
1130
|
-
unit:
|
|
1126
|
+
street1: v.street1,
|
|
1127
|
+
city: v.city,
|
|
1128
|
+
state: v.state,
|
|
1129
|
+
postalCode: v.postalCode,
|
|
1130
|
+
unit: v.street2,
|
|
1131
1131
|
sourcePage: "partner-sdk"
|
|
1132
1132
|
}
|
|
1133
|
-
}), await e(
|
|
1134
|
-
} catch (
|
|
1135
|
-
const X =
|
|
1133
|
+
}), await e(v);
|
|
1134
|
+
} catch (v) {
|
|
1135
|
+
const X = v instanceof Error ? v : new Error("Failed to submit address");
|
|
1136
1136
|
q(X.message), P == null || P(X);
|
|
1137
1137
|
} finally {
|
|
1138
|
-
|
|
1138
|
+
Y(!1);
|
|
1139
1139
|
}
|
|
1140
|
-
}, ve = !!
|
|
1141
|
-
return /* @__PURE__ */ t.jsxs("div", { ref:
|
|
1142
|
-
|
|
1143
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1144
|
-
/* @__PURE__ */ t.jsx("label", { className:
|
|
1140
|
+
}, ve = !!z;
|
|
1141
|
+
return /* @__PURE__ */ t.jsxs("div", { ref: oe, className: R.container, style: ee, children: [
|
|
1142
|
+
y ? /* @__PURE__ */ t.jsxs("div", { className: R.manualForm, children: [
|
|
1143
|
+
/* @__PURE__ */ t.jsxs("div", { className: R.manualFormField, children: [
|
|
1144
|
+
/* @__PURE__ */ t.jsx("label", { className: R.manualFormLabel, htmlFor: "ae-street1", children: "Street Address *" }),
|
|
1145
1145
|
/* @__PURE__ */ t.jsx(
|
|
1146
1146
|
"input",
|
|
1147
1147
|
{
|
|
1148
1148
|
id: "ae-street1",
|
|
1149
1149
|
type: "text",
|
|
1150
|
-
className:
|
|
1151
|
-
value:
|
|
1152
|
-
onChange: (
|
|
1150
|
+
className: R.manualFormInput,
|
|
1151
|
+
value: C.street1,
|
|
1152
|
+
onChange: (v) => _e("street1", v.target.value),
|
|
1153
1153
|
disabled: o,
|
|
1154
1154
|
placeholder: "123 Main St"
|
|
1155
1155
|
}
|
|
1156
1156
|
)
|
|
1157
1157
|
] }),
|
|
1158
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1159
|
-
/* @__PURE__ */ t.jsx("label", { className:
|
|
1158
|
+
/* @__PURE__ */ t.jsxs("div", { className: R.manualFormField, children: [
|
|
1159
|
+
/* @__PURE__ */ t.jsx("label", { className: R.manualFormLabel, htmlFor: "ae-street2", children: "Unit / Apt (optional)" }),
|
|
1160
1160
|
/* @__PURE__ */ t.jsx(
|
|
1161
1161
|
"input",
|
|
1162
1162
|
{
|
|
1163
1163
|
id: "ae-street2",
|
|
1164
1164
|
type: "text",
|
|
1165
|
-
className:
|
|
1166
|
-
value:
|
|
1167
|
-
onChange: (
|
|
1165
|
+
className: R.manualFormInput,
|
|
1166
|
+
value: C.street2,
|
|
1167
|
+
onChange: (v) => _e("street2", v.target.value),
|
|
1168
1168
|
disabled: o,
|
|
1169
1169
|
placeholder: "Apt 4B"
|
|
1170
1170
|
}
|
|
1171
1171
|
)
|
|
1172
1172
|
] }),
|
|
1173
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1174
|
-
/* @__PURE__ */ t.jsx("label", { className:
|
|
1173
|
+
/* @__PURE__ */ t.jsxs("div", { className: R.manualFormField, children: [
|
|
1174
|
+
/* @__PURE__ */ t.jsx("label", { className: R.manualFormLabel, htmlFor: "ae-city", children: "City *" }),
|
|
1175
1175
|
/* @__PURE__ */ t.jsx(
|
|
1176
1176
|
"input",
|
|
1177
1177
|
{
|
|
1178
1178
|
id: "ae-city",
|
|
1179
1179
|
type: "text",
|
|
1180
|
-
className:
|
|
1181
|
-
value:
|
|
1182
|
-
onChange: (
|
|
1180
|
+
className: R.manualFormInput,
|
|
1181
|
+
value: C.city,
|
|
1182
|
+
onChange: (v) => _e("city", v.target.value),
|
|
1183
1183
|
disabled: o,
|
|
1184
1184
|
placeholder: "Austin"
|
|
1185
1185
|
}
|
|
1186
1186
|
)
|
|
1187
1187
|
] }),
|
|
1188
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1189
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1190
|
-
/* @__PURE__ */ t.jsx("label", { className:
|
|
1188
|
+
/* @__PURE__ */ t.jsxs("div", { className: R.formRow, children: [
|
|
1189
|
+
/* @__PURE__ */ t.jsxs("div", { className: R.manualFormField, children: [
|
|
1190
|
+
/* @__PURE__ */ t.jsx("label", { className: R.manualFormLabel, htmlFor: "ae-state", children: "State *" }),
|
|
1191
1191
|
/* @__PURE__ */ t.jsx(
|
|
1192
1192
|
"input",
|
|
1193
1193
|
{
|
|
1194
1194
|
id: "ae-state",
|
|
1195
1195
|
type: "text",
|
|
1196
|
-
className:
|
|
1197
|
-
value:
|
|
1198
|
-
onChange: (
|
|
1196
|
+
className: R.manualFormInput,
|
|
1197
|
+
value: C.state,
|
|
1198
|
+
onChange: (v) => _e("state", v.target.value),
|
|
1199
1199
|
disabled: o,
|
|
1200
1200
|
placeholder: "TX",
|
|
1201
1201
|
maxLength: 2
|
|
1202
1202
|
}
|
|
1203
1203
|
)
|
|
1204
1204
|
] }),
|
|
1205
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1206
|
-
/* @__PURE__ */ t.jsx("label", { className:
|
|
1205
|
+
/* @__PURE__ */ t.jsxs("div", { className: R.manualFormField, children: [
|
|
1206
|
+
/* @__PURE__ */ t.jsx("label", { className: R.manualFormLabel, htmlFor: "ae-postalCode", children: "ZIP Code *" }),
|
|
1207
1207
|
/* @__PURE__ */ t.jsx(
|
|
1208
1208
|
"input",
|
|
1209
1209
|
{
|
|
1210
1210
|
id: "ae-postalCode",
|
|
1211
1211
|
type: "text",
|
|
1212
|
-
className:
|
|
1213
|
-
value:
|
|
1214
|
-
onChange: (
|
|
1212
|
+
className: R.manualFormInput,
|
|
1213
|
+
value: C.postalCode,
|
|
1214
|
+
onChange: (v) => _e("postalCode", v.target.value),
|
|
1215
1215
|
disabled: o,
|
|
1216
1216
|
placeholder: "78701",
|
|
1217
1217
|
maxLength: 5
|
|
@@ -1219,57 +1219,57 @@ function Oo({
|
|
|
1219
1219
|
)
|
|
1220
1220
|
] })
|
|
1221
1221
|
] }),
|
|
1222
|
-
|
|
1222
|
+
z && /* @__PURE__ */ t.jsx("div", { className: R.error, children: z }),
|
|
1223
1223
|
/* @__PURE__ */ t.jsxs(
|
|
1224
1224
|
"button",
|
|
1225
1225
|
{
|
|
1226
1226
|
type: "button",
|
|
1227
|
-
className:
|
|
1227
|
+
className: R.submitButton,
|
|
1228
1228
|
onClick: Le,
|
|
1229
1229
|
disabled: o,
|
|
1230
1230
|
children: [
|
|
1231
1231
|
/* @__PURE__ */ t.jsx("span", { children: m }),
|
|
1232
|
-
|
|
1232
|
+
u || /* @__PURE__ */ t.jsx(ft, {})
|
|
1233
1233
|
]
|
|
1234
1234
|
}
|
|
1235
1235
|
)
|
|
1236
|
-
] }) : /* @__PURE__ */ t.jsxs("div", { className:
|
|
1236
|
+
] }) : /* @__PURE__ */ t.jsxs("div", { className: R.inputSection, children: [
|
|
1237
1237
|
/* @__PURE__ */ t.jsxs(
|
|
1238
1238
|
"div",
|
|
1239
1239
|
{
|
|
1240
|
-
className: `${
|
|
1240
|
+
className: `${R.inputWrapper} ${ve ? R.errorBorder : ""}`,
|
|
1241
1241
|
children: [
|
|
1242
1242
|
/* @__PURE__ */ t.jsx(
|
|
1243
1243
|
"input",
|
|
1244
1244
|
{
|
|
1245
|
-
ref:
|
|
1245
|
+
ref: G,
|
|
1246
1246
|
type: "text",
|
|
1247
|
-
value:
|
|
1248
|
-
onChange:
|
|
1249
|
-
onFocus:
|
|
1247
|
+
value: V,
|
|
1248
|
+
onChange: F,
|
|
1249
|
+
onFocus: de,
|
|
1250
1250
|
placeholder: i,
|
|
1251
|
-
className:
|
|
1251
|
+
className: R.input,
|
|
1252
1252
|
disabled: o,
|
|
1253
1253
|
"aria-label": "Address input",
|
|
1254
1254
|
"aria-autocomplete": "list",
|
|
1255
1255
|
"aria-controls": "address-suggestions",
|
|
1256
|
-
"aria-expanded":
|
|
1256
|
+
"aria-expanded": se
|
|
1257
1257
|
}
|
|
1258
1258
|
),
|
|
1259
|
-
|
|
1259
|
+
l && /* @__PURE__ */ t.jsx("div", { className: R.inputIcon, children: l }),
|
|
1260
1260
|
f && /* @__PURE__ */ t.jsx(
|
|
1261
1261
|
"button",
|
|
1262
1262
|
{
|
|
1263
|
-
className:
|
|
1263
|
+
className: R.button,
|
|
1264
1264
|
type: "button",
|
|
1265
1265
|
disabled: o,
|
|
1266
1266
|
"aria-label": m,
|
|
1267
|
-
children:
|
|
1267
|
+
children: ie ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1268
1268
|
/* @__PURE__ */ t.jsx("span", { children: m }),
|
|
1269
1269
|
/* @__PURE__ */ t.jsxs(
|
|
1270
1270
|
"svg",
|
|
1271
1271
|
{
|
|
1272
|
-
className:
|
|
1272
|
+
className: R.spinner,
|
|
1273
1273
|
width: "20",
|
|
1274
1274
|
height: "20",
|
|
1275
1275
|
viewBox: "0 0 24 24",
|
|
@@ -1301,45 +1301,45 @@ function Oo({
|
|
|
1301
1301
|
)
|
|
1302
1302
|
] }) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1303
1303
|
/* @__PURE__ */ t.jsx("span", { children: m }),
|
|
1304
|
-
|
|
1304
|
+
u || /* @__PURE__ */ t.jsx(ft, {})
|
|
1305
1305
|
] })
|
|
1306
1306
|
}
|
|
1307
1307
|
)
|
|
1308
1308
|
]
|
|
1309
1309
|
}
|
|
1310
1310
|
),
|
|
1311
|
-
(
|
|
1311
|
+
(se || ve) && /* @__PURE__ */ t.jsx(
|
|
1312
1312
|
"div",
|
|
1313
1313
|
{
|
|
1314
|
-
ref:
|
|
1315
|
-
className: `${
|
|
1314
|
+
ref: w,
|
|
1315
|
+
className: `${R.suggestions} ${ve ? R.errorState : ""}`,
|
|
1316
1316
|
id: "address-suggestions",
|
|
1317
|
-
role: ve &&
|
|
1318
|
-
"aria-live": ve &&
|
|
1319
|
-
children: ve ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
1320
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1321
|
-
/* @__PURE__ */ t.jsx("div", { children:
|
|
1322
|
-
] }) :
|
|
1317
|
+
role: ve && !se ? "alert" : "listbox",
|
|
1318
|
+
"aria-live": ve && !se ? "polite" : void 0,
|
|
1319
|
+
children: ve ? /* @__PURE__ */ t.jsxs("div", { className: R.error, children: [
|
|
1320
|
+
/* @__PURE__ */ t.jsx("div", { className: R.errorIcon, children: /* @__PURE__ */ t.jsx(Or, {}) }),
|
|
1321
|
+
/* @__PURE__ */ t.jsx("div", { children: z })
|
|
1322
|
+
] }) : Z.length > 0 ? Z.map((v, X) => /* @__PURE__ */ t.jsx(
|
|
1323
1323
|
"div",
|
|
1324
1324
|
{
|
|
1325
|
-
className:
|
|
1326
|
-
onClick: () =>
|
|
1325
|
+
className: R.suggestion,
|
|
1326
|
+
onClick: () => $(v),
|
|
1327
1327
|
role: "option",
|
|
1328
1328
|
"aria-selected": !1,
|
|
1329
1329
|
tabIndex: 0,
|
|
1330
|
-
onKeyDown: (
|
|
1331
|
-
(
|
|
1330
|
+
onKeyDown: (te) => {
|
|
1331
|
+
(te.key === "Enter" || te.key === " ") && (te.preventDefault(), $(v));
|
|
1332
1332
|
},
|
|
1333
|
-
children: mt(
|
|
1333
|
+
children: mt(v)
|
|
1334
1334
|
},
|
|
1335
|
-
`${
|
|
1336
|
-
)) :
|
|
1335
|
+
`${v.street1}-${v.city}-${v.postalCode}-${X}`
|
|
1336
|
+
)) : T && /* @__PURE__ */ t.jsx(
|
|
1337
1337
|
"button",
|
|
1338
1338
|
{
|
|
1339
1339
|
type: "button",
|
|
1340
|
-
className:
|
|
1340
|
+
className: R.manualLink,
|
|
1341
1341
|
onClick: xe,
|
|
1342
|
-
children:
|
|
1342
|
+
children: c
|
|
1343
1343
|
}
|
|
1344
1344
|
)
|
|
1345
1345
|
}
|
|
@@ -1348,7 +1348,7 @@ function Oo({
|
|
|
1348
1348
|
s && /* @__PURE__ */ t.jsx(mr, {})
|
|
1349
1349
|
] });
|
|
1350
1350
|
}
|
|
1351
|
-
const Rr = "_container_rg8mk_3", Br = "_title_rg8mk_7", Mr = "_addressCard_rg8mk_16", Fr = "_addressText_rg8mk_26", $r = "_editLink_rg8mk_34", Wr = "_fieldGroup_rg8mk_47", Hr = "_fieldLabel_rg8mk_51", Vr = "_input_rg8mk_60", qr = "_checkboxRow_rg8mk_84", Gr = "_checkbox_rg8mk_84", Ur = "_checkboxLabel_rg8mk_101", Yr = "_error_rg8mk_108", Zr = "_actions_rg8mk_115", Kr = "_confirmButton_rg8mk_120",
|
|
1351
|
+
const Rr = "_container_rg8mk_3", Br = "_title_rg8mk_7", Mr = "_addressCard_rg8mk_16", Fr = "_addressText_rg8mk_26", $r = "_editLink_rg8mk_34", Wr = "_fieldGroup_rg8mk_47", Hr = "_fieldLabel_rg8mk_51", Vr = "_input_rg8mk_60", qr = "_checkboxRow_rg8mk_84", Gr = "_checkbox_rg8mk_84", Ur = "_checkboxLabel_rg8mk_101", Yr = "_error_rg8mk_108", Zr = "_actions_rg8mk_115", Kr = "_confirmButton_rg8mk_120", me = {
|
|
1352
1352
|
container: Rr,
|
|
1353
1353
|
title: Br,
|
|
1354
1354
|
addressCard: Mr,
|
|
@@ -1373,69 +1373,69 @@ function Ro({
|
|
|
1373
1373
|
onConfirm: a,
|
|
1374
1374
|
onEdit: s
|
|
1375
1375
|
}) {
|
|
1376
|
-
const o = ze(), m = Pe(r), f =
|
|
1377
|
-
if (!
|
|
1378
|
-
|
|
1376
|
+
const o = ze(), m = Pe(r), f = St("partner-sdk-unit-input"), [u, l] = E(""), [c, p] = E(!1), [_, x] = E(null), I = () => {
|
|
1377
|
+
if (!c && !u.trim()) {
|
|
1378
|
+
x("Please enter a unit number or select 'No unit number'");
|
|
1379
1379
|
return;
|
|
1380
1380
|
}
|
|
1381
|
-
|
|
1381
|
+
x(null), o.trackPlatform({
|
|
1382
1382
|
buttonClickEvent: { targetName: "partner-sdk-confirm-unit" }
|
|
1383
|
-
}), a(
|
|
1384
|
-
},
|
|
1383
|
+
}), a(c ? { ...e } : { ...e, street2: u.trim() });
|
|
1384
|
+
}, D = () => {
|
|
1385
1385
|
o.trackPlatform({
|
|
1386
1386
|
checkboxClickEvent: {
|
|
1387
1387
|
targetName: "partner-sdk-no-unit",
|
|
1388
|
-
optionName: String(!
|
|
1388
|
+
optionName: String(!c)
|
|
1389
1389
|
}
|
|
1390
|
-
}), p(!
|
|
1391
|
-
},
|
|
1392
|
-
|
|
1390
|
+
}), p(!c), c || (l(""), x(null));
|
|
1391
|
+
}, B = (S) => {
|
|
1392
|
+
l(S.target.value), _ && x(null);
|
|
1393
1393
|
}, P = () => {
|
|
1394
1394
|
o.trackPlatform({
|
|
1395
1395
|
inputFocusEvent: { targetName: "partner-sdk-unit-input" }
|
|
1396
1396
|
});
|
|
1397
1397
|
};
|
|
1398
|
-
return /* @__PURE__ */ t.jsxs("div", { ref: f, style: m, className:
|
|
1399
|
-
/* @__PURE__ */ t.jsx("h2", { className:
|
|
1400
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1401
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
1402
|
-
s && /* @__PURE__ */ t.jsx("button", { type: "button", className:
|
|
1398
|
+
return /* @__PURE__ */ t.jsxs("div", { ref: f, style: m, className: me.container, children: [
|
|
1399
|
+
/* @__PURE__ */ t.jsx("h2", { className: me.title, children: "Confirm your home address" }),
|
|
1400
|
+
/* @__PURE__ */ t.jsxs("div", { className: me.addressCard, children: [
|
|
1401
|
+
/* @__PURE__ */ t.jsx("span", { className: me.addressText, children: zr(e) }),
|
|
1402
|
+
s && /* @__PURE__ */ t.jsx("button", { type: "button", className: me.editLink, onClick: s, children: "Edit" })
|
|
1403
1403
|
] }),
|
|
1404
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1405
|
-
/* @__PURE__ */ t.jsx("label", { className:
|
|
1404
|
+
/* @__PURE__ */ t.jsxs("div", { className: me.fieldGroup, children: [
|
|
1405
|
+
/* @__PURE__ */ t.jsx("label", { className: me.fieldLabel, htmlFor: "od-unit-number", children: "Unit number, apt, or floor*" }),
|
|
1406
1406
|
/* @__PURE__ */ t.jsx(
|
|
1407
1407
|
"input",
|
|
1408
1408
|
{
|
|
1409
1409
|
id: "od-unit-number",
|
|
1410
1410
|
type: "text",
|
|
1411
|
-
className:
|
|
1411
|
+
className: me.input,
|
|
1412
1412
|
placeholder: "#1234",
|
|
1413
|
-
value:
|
|
1414
|
-
onChange:
|
|
1413
|
+
value: u,
|
|
1414
|
+
onChange: B,
|
|
1415
1415
|
onFocus: P,
|
|
1416
|
-
disabled:
|
|
1416
|
+
disabled: c
|
|
1417
1417
|
}
|
|
1418
1418
|
)
|
|
1419
1419
|
] }),
|
|
1420
|
-
/* @__PURE__ */ t.jsxs("label", { className:
|
|
1420
|
+
/* @__PURE__ */ t.jsxs("label", { className: me.checkboxRow, children: [
|
|
1421
1421
|
/* @__PURE__ */ t.jsx(
|
|
1422
1422
|
"input",
|
|
1423
1423
|
{
|
|
1424
1424
|
type: "checkbox",
|
|
1425
|
-
className:
|
|
1426
|
-
checked:
|
|
1427
|
-
onChange:
|
|
1425
|
+
className: me.checkbox,
|
|
1426
|
+
checked: c,
|
|
1427
|
+
onChange: D
|
|
1428
1428
|
}
|
|
1429
1429
|
),
|
|
1430
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
1430
|
+
/* @__PURE__ */ t.jsx("span", { className: me.checkboxLabel, children: "No unit number" })
|
|
1431
1431
|
] }),
|
|
1432
|
-
_ && /* @__PURE__ */ t.jsx("p", { className:
|
|
1433
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1432
|
+
_ && /* @__PURE__ */ t.jsx("p", { className: me.error, children: _ }),
|
|
1433
|
+
/* @__PURE__ */ t.jsx("div", { className: me.actions, children: /* @__PURE__ */ t.jsx(
|
|
1434
1434
|
"button",
|
|
1435
1435
|
{
|
|
1436
1436
|
type: "button",
|
|
1437
|
-
className:
|
|
1438
|
-
onClick:
|
|
1437
|
+
className: me.confirmButton,
|
|
1438
|
+
onClick: I,
|
|
1439
1439
|
children: "Confirm address"
|
|
1440
1440
|
}
|
|
1441
1441
|
) })
|
|
@@ -1446,9 +1446,9 @@ function an(e, r, a) {
|
|
|
1446
1446
|
return e.startsWith("http://") || e.startsWith("https://") ? `url-${encodeURIComponent(e)}(${r},${a})` : `${e}(${r},${a})`;
|
|
1447
1447
|
}
|
|
1448
1448
|
function sn(e, r) {
|
|
1449
|
-
const a = (r == null ? void 0 : r.mapboxAccessToken) ?? Qr, s = (r == null ? void 0 : r.mapPinMarker) ?? en, o = (r == null ? void 0 : r.width) ?? tn, i = (r == null ? void 0 : r.height) ?? rn, m = (r == null ? void 0 : r.zoom) ?? nn, [f,
|
|
1450
|
-
return
|
|
1451
|
-
|
|
1449
|
+
const a = (r == null ? void 0 : r.mapboxAccessToken) ?? Qr, s = (r == null ? void 0 : r.mapPinMarker) ?? en, o = (r == null ? void 0 : r.width) ?? tn, i = (r == null ? void 0 : r.height) ?? rn, m = (r == null ? void 0 : r.zoom) ?? nn, [f, u] = E(void 0), [l, c] = E("loading");
|
|
1450
|
+
return ce(() => {
|
|
1451
|
+
c("loading");
|
|
1452
1452
|
const p = [
|
|
1453
1453
|
e.street1,
|
|
1454
1454
|
e.city,
|
|
@@ -1456,26 +1456,26 @@ function sn(e, r) {
|
|
|
1456
1456
|
e.postalCode
|
|
1457
1457
|
].join(" ");
|
|
1458
1458
|
let _ = !1;
|
|
1459
|
-
async function
|
|
1460
|
-
var
|
|
1459
|
+
async function x() {
|
|
1460
|
+
var I, D;
|
|
1461
1461
|
try {
|
|
1462
|
-
const
|
|
1462
|
+
const B = `${Jr}/${encodeURIComponent(p)}.json?access_token=${a}&limit=1`, P = await fetch(B);
|
|
1463
1463
|
if (!P.ok || _) {
|
|
1464
|
-
_ ||
|
|
1464
|
+
_ || c("error");
|
|
1465
1465
|
return;
|
|
1466
1466
|
}
|
|
1467
|
-
const j = (
|
|
1467
|
+
const j = (D = (I = (await P.json()).features) == null ? void 0 : I[0]) == null ? void 0 : D.center;
|
|
1468
1468
|
if (!j || _) {
|
|
1469
|
-
_ ||
|
|
1469
|
+
_ || c("error");
|
|
1470
1470
|
return;
|
|
1471
1471
|
}
|
|
1472
|
-
const [
|
|
1473
|
-
_ ||
|
|
1472
|
+
const [ee, V] = j, ae = an(s, ee, V), Z = `${Xr}/${ae}/${ee},${V},${m}/${o}x${i}@2x?access_token=${a}&attribution=false&logo=false`;
|
|
1473
|
+
_ || u(Z);
|
|
1474
1474
|
} catch {
|
|
1475
|
-
_ ||
|
|
1475
|
+
_ || c("error");
|
|
1476
1476
|
}
|
|
1477
1477
|
}
|
|
1478
|
-
return
|
|
1478
|
+
return x(), () => {
|
|
1479
1479
|
_ = !0;
|
|
1480
1480
|
};
|
|
1481
1481
|
}, [
|
|
@@ -1488,7 +1488,7 @@ function sn(e, r) {
|
|
|
1488
1488
|
o,
|
|
1489
1489
|
i,
|
|
1490
1490
|
m
|
|
1491
|
-
]), { url: f, status:
|
|
1491
|
+
]), { url: f, status: l };
|
|
1492
1492
|
}
|
|
1493
1493
|
const on = "_container_1vap7_3", ln = "_mapImage_1vap7_13", cn = "_mapImageLoaded_1vap7_22", Ve = {
|
|
1494
1494
|
container: on,
|
|
@@ -1504,35 +1504,35 @@ function Bo({
|
|
|
1504
1504
|
height: i,
|
|
1505
1505
|
zoom: m,
|
|
1506
1506
|
borderRadius: f,
|
|
1507
|
-
onLoad:
|
|
1508
|
-
onError:
|
|
1507
|
+
onLoad: u,
|
|
1508
|
+
onError: l
|
|
1509
1509
|
}) {
|
|
1510
|
-
const
|
|
1510
|
+
const c = Pe(r), { url: p, status: _ } = sn(e, {
|
|
1511
1511
|
mapboxAccessToken: a,
|
|
1512
1512
|
mapPinMarker: s,
|
|
1513
1513
|
width: o,
|
|
1514
1514
|
height: i,
|
|
1515
1515
|
zoom: m
|
|
1516
|
-
}), [
|
|
1517
|
-
|
|
1518
|
-
const
|
|
1519
|
-
|
|
1516
|
+
}), [x, I] = E(!1), D = U(u);
|
|
1517
|
+
D.current = u;
|
|
1518
|
+
const B = U(l);
|
|
1519
|
+
B.current = l, ce(() => {
|
|
1520
1520
|
var j;
|
|
1521
|
-
_ === "error" && ((j =
|
|
1521
|
+
_ === "error" && ((j = B.current) == null || j.call(B, new Error("Failed to load map for address")));
|
|
1522
1522
|
}, [_]);
|
|
1523
1523
|
const P = () => {
|
|
1524
1524
|
var j;
|
|
1525
|
-
|
|
1526
|
-
},
|
|
1527
|
-
...
|
|
1525
|
+
I(!0), (j = D.current) == null || j.call(D);
|
|
1526
|
+
}, S = {
|
|
1527
|
+
...c,
|
|
1528
1528
|
...f ? { borderRadius: f } : {}
|
|
1529
1529
|
};
|
|
1530
|
-
return /* @__PURE__ */ t.jsx("div", { className: Ve.container, style:
|
|
1530
|
+
return /* @__PURE__ */ t.jsx("div", { className: Ve.container, style: S, children: p && /* @__PURE__ */ t.jsx(
|
|
1531
1531
|
"img",
|
|
1532
1532
|
{
|
|
1533
1533
|
src: p,
|
|
1534
1534
|
alt: "Map",
|
|
1535
|
-
className: `${Ve.mapImage} ${
|
|
1535
|
+
className: `${Ve.mapImage} ${x ? Ve.mapImageLoaded : ""}`.trim(),
|
|
1536
1536
|
onLoad: P
|
|
1537
1537
|
}
|
|
1538
1538
|
) });
|
|
@@ -1792,16 +1792,16 @@ class mn {
|
|
|
1792
1792
|
pruneAnswersForHiddenQuestions() {
|
|
1793
1793
|
const r = pt(this._allPages, this.getAnswer), a = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set();
|
|
1794
1794
|
for (const m of this._allPages) {
|
|
1795
|
-
for (const
|
|
1796
|
-
a.add(
|
|
1795
|
+
for (const l of m.questions)
|
|
1796
|
+
a.add(l.key);
|
|
1797
1797
|
if (this._skipPages.has(m.id)) {
|
|
1798
|
-
for (const
|
|
1799
|
-
s.add(
|
|
1798
|
+
for (const l of m.questions)
|
|
1799
|
+
s.add(l.key);
|
|
1800
1800
|
continue;
|
|
1801
1801
|
}
|
|
1802
|
-
if (r.some((
|
|
1803
|
-
for (const
|
|
1804
|
-
s.add(
|
|
1802
|
+
if (r.some((l) => l.id === m.id))
|
|
1803
|
+
for (const l of Ue(m, this.getAnswer))
|
|
1804
|
+
s.add(l.key);
|
|
1805
1805
|
}
|
|
1806
1806
|
let o = !1;
|
|
1807
1807
|
const i = {};
|
|
@@ -1829,7 +1829,7 @@ class mn {
|
|
|
1829
1829
|
}
|
|
1830
1830
|
}
|
|
1831
1831
|
const pn = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
1832
|
-
function
|
|
1832
|
+
function It(e) {
|
|
1833
1833
|
if (typeof e == "string" && !pn.test(e))
|
|
1834
1834
|
return "Please enter a valid email address";
|
|
1835
1835
|
}
|
|
@@ -2155,7 +2155,7 @@ function Oe(e, r, a) {
|
|
|
2155
2155
|
]
|
|
2156
2156
|
};
|
|
2157
2157
|
}
|
|
2158
|
-
const wn = Oe("kitchen", "home.kitchen_seller_score", "How would you describe your kitchen?"), kn = Oe("bathroom", "home.bathroom_seller_score", "How would you describe your main bathroom?"), jn = Oe("living-room", "home.living_room_seller_score", "How would you describe your living room?"), Nn = Oe("exterior", "home.exterior_seller_score", "How would you describe your home's exterior?"),
|
|
2158
|
+
const wn = Oe("kitchen", "home.kitchen_seller_score", "How would you describe your kitchen?"), kn = Oe("bathroom", "home.bathroom_seller_score", "How would you describe your main bathroom?"), jn = Oe("living-room", "home.living_room_seller_score", "How would you describe your living room?"), Nn = Oe("exterior", "home.exterior_seller_score", "How would you describe your home's exterior?"), Sn = {
|
|
2159
2159
|
id: "hoa",
|
|
2160
2160
|
title: "Is your home part of a homeowners association?",
|
|
2161
2161
|
subtitle: "This is often called an HOA. It's a group that helps maintain your community for a fee.",
|
|
@@ -2173,7 +2173,7 @@ const wn = Oe("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2173
2173
|
]
|
|
2174
2174
|
}
|
|
2175
2175
|
]
|
|
2176
|
-
},
|
|
2176
|
+
}, In = {
|
|
2177
2177
|
id: "hoa-type",
|
|
2178
2178
|
title: "Does your home belong to any of these types of communities?",
|
|
2179
2179
|
showWhen: { field: "home.hoa", op: "eq", value: "yes" },
|
|
@@ -2358,7 +2358,7 @@ const wn = Oe("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2358
2358
|
style: "email",
|
|
2359
2359
|
required: !1,
|
|
2360
2360
|
placeholder: "you@example.com",
|
|
2361
|
-
validate:
|
|
2361
|
+
validate: It
|
|
2362
2362
|
},
|
|
2363
2363
|
{
|
|
2364
2364
|
key: "seller.home_builder_community",
|
|
@@ -2390,7 +2390,7 @@ const wn = Oe("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2390
2390
|
style: "email",
|
|
2391
2391
|
required: !0,
|
|
2392
2392
|
placeholder: "you@example.com",
|
|
2393
|
-
validate:
|
|
2393
|
+
validate: It
|
|
2394
2394
|
},
|
|
2395
2395
|
{
|
|
2396
2396
|
key: "seller.phone_number",
|
|
@@ -2417,8 +2417,8 @@ const wn = Oe("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2417
2417
|
kn,
|
|
2418
2418
|
jn,
|
|
2419
2419
|
Nn,
|
|
2420
|
-
In,
|
|
2421
2420
|
Sn,
|
|
2421
|
+
In,
|
|
2422
2422
|
En,
|
|
2423
2423
|
Pn,
|
|
2424
2424
|
Ln,
|
|
@@ -2432,7 +2432,7 @@ function _t(e) {
|
|
|
2432
2432
|
return new mn(Bn, e);
|
|
2433
2433
|
}
|
|
2434
2434
|
const Et = Ye(null);
|
|
2435
|
-
function
|
|
2435
|
+
function pe() {
|
|
2436
2436
|
const e = De(Et);
|
|
2437
2437
|
if (!e)
|
|
2438
2438
|
throw new Error(
|
|
@@ -2445,117 +2445,126 @@ const Mn = ({
|
|
|
2445
2445
|
skipPages: r,
|
|
2446
2446
|
smsConsentText: a,
|
|
2447
2447
|
contactConsentText: s,
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2448
|
+
submitLabel: o,
|
|
2449
|
+
contactPageTitle: i,
|
|
2450
|
+
contactPageSubtitle: m,
|
|
2451
|
+
onSubmit: f,
|
|
2452
|
+
onPageChange: u,
|
|
2453
|
+
onAnswerChange: l,
|
|
2454
|
+
onReady: c,
|
|
2455
|
+
onError: p,
|
|
2456
|
+
children: _
|
|
2454
2457
|
}) => {
|
|
2455
|
-
var
|
|
2456
|
-
const
|
|
2457
|
-
|
|
2458
|
-
const
|
|
2459
|
-
|
|
2460
|
-
const
|
|
2461
|
-
|
|
2462
|
-
const
|
|
2463
|
-
|
|
2464
|
-
const
|
|
2465
|
-
|
|
2466
|
-
const [
|
|
2458
|
+
var fe;
|
|
2459
|
+
const x = U(f);
|
|
2460
|
+
x.current = f;
|
|
2461
|
+
const I = U(u);
|
|
2462
|
+
I.current = u;
|
|
2463
|
+
const D = U(l);
|
|
2464
|
+
D.current = l;
|
|
2465
|
+
const B = U(c);
|
|
2466
|
+
B.current = c;
|
|
2467
|
+
const P = U(p);
|
|
2468
|
+
P.current = p;
|
|
2469
|
+
const [S, j] = E(
|
|
2467
2470
|
() => _t({ initialAnswers: e, skipPages: r })
|
|
2468
|
-
),
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
}, [
|
|
2472
|
-
const [
|
|
2473
|
-
|
|
2474
|
-
), [
|
|
2475
|
-
((
|
|
2476
|
-
), [
|
|
2477
|
-
|
|
2471
|
+
), ee = (r ?? []).join("|"), V = U(ee);
|
|
2472
|
+
ce(() => {
|
|
2473
|
+
ee !== V.current && (V.current = ee, j(_t({ initialAnswers: e, skipPages: r })));
|
|
2474
|
+
}, [ee]);
|
|
2475
|
+
const [ae, Z] = E(
|
|
2476
|
+
S.answers
|
|
2477
|
+
), [L, se] = E(
|
|
2478
|
+
((fe = S.currentPage) == null ? void 0 : fe.id) ?? ""
|
|
2479
|
+
), [K, ie] = E({}), [Y, z] = E(
|
|
2480
|
+
S.visiblePages
|
|
2478
2481
|
);
|
|
2479
|
-
|
|
2480
|
-
var
|
|
2481
|
-
const
|
|
2482
|
-
|
|
2483
|
-
var
|
|
2484
|
-
|
|
2482
|
+
ce(() => {
|
|
2483
|
+
var oe;
|
|
2484
|
+
const G = [
|
|
2485
|
+
S.on("answerChange", (M) => {
|
|
2486
|
+
var le;
|
|
2487
|
+
Z(S.answers), z([...S.visiblePages]), M.type === "answerChange" && ((le = D.current) == null || le.call(D, M.key, M.value));
|
|
2485
2488
|
}),
|
|
2486
|
-
|
|
2487
|
-
var
|
|
2488
|
-
|
|
2489
|
+
S.on("pageChange", (M) => {
|
|
2490
|
+
var le;
|
|
2491
|
+
M.type === "pageChange" && (se(M.pageId), z([...S.visiblePages]), ie({}), (le = I.current) == null || le.call(I, M.pageIndex, M.pageId));
|
|
2489
2492
|
}),
|
|
2490
|
-
|
|
2491
|
-
|
|
2493
|
+
S.on("validationError", (M) => {
|
|
2494
|
+
M.type === "validationError" && ie(M.errors);
|
|
2492
2495
|
}),
|
|
2493
|
-
|
|
2494
|
-
|
|
2496
|
+
S.on("submit", (M) => {
|
|
2497
|
+
M.type === "submit" && x.current(M.answers);
|
|
2495
2498
|
})
|
|
2496
2499
|
];
|
|
2497
|
-
return (
|
|
2498
|
-
|
|
2500
|
+
return (oe = B.current) == null || oe.call(B), () => {
|
|
2501
|
+
G.forEach((M) => M()), S.destroy();
|
|
2499
2502
|
};
|
|
2500
|
-
}, [
|
|
2501
|
-
const
|
|
2502
|
-
|
|
2503
|
-
e && e !==
|
|
2504
|
-
}, [e,
|
|
2505
|
-
const
|
|
2506
|
-
const
|
|
2507
|
-
return
|
|
2508
|
-
}, [
|
|
2503
|
+
}, [S]);
|
|
2504
|
+
const q = U(e);
|
|
2505
|
+
ce(() => {
|
|
2506
|
+
e && e !== q.current && (q.current = e, S.setAnswers(e));
|
|
2507
|
+
}, [e, S]);
|
|
2508
|
+
const J = Ie(() => {
|
|
2509
|
+
const G = Y.findIndex((oe) => oe.id === L);
|
|
2510
|
+
return G >= 0 ? G : 0;
|
|
2511
|
+
}, [Y, L]), ue = Y[J], y = Ie(() => L ? S.getVisibleQuestionsForCurrentPage() : [], [S, L, ae]), k = Ie(() => Y.length <= 1 ? 0 : Math.min(
|
|
2509
2512
|
1,
|
|
2510
|
-
Math.max(0,
|
|
2511
|
-
), [
|
|
2513
|
+
Math.max(0, J / (Y.length - 1))
|
|
2514
|
+
), [J, Y.length]), C = Ie(
|
|
2512
2515
|
() => ({
|
|
2513
|
-
engine:
|
|
2514
|
-
currentPage:
|
|
2515
|
-
currentPageIndex:
|
|
2516
|
-
visiblePages:
|
|
2517
|
-
visibleQuestions:
|
|
2518
|
-
answers:
|
|
2519
|
-
validationErrors:
|
|
2520
|
-
progress:
|
|
2521
|
-
isFirstPage:
|
|
2516
|
+
engine: S,
|
|
2517
|
+
currentPage: ue,
|
|
2518
|
+
currentPageIndex: J,
|
|
2519
|
+
visiblePages: Y,
|
|
2520
|
+
visibleQuestions: y,
|
|
2521
|
+
answers: ae,
|
|
2522
|
+
validationErrors: K,
|
|
2523
|
+
progress: k,
|
|
2524
|
+
isFirstPage: J === 0,
|
|
2522
2525
|
contactConsentText: s,
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
+
submitLabel: o,
|
|
2527
|
+
contactPageTitle: i,
|
|
2528
|
+
contactPageSubtitle: m,
|
|
2529
|
+
isLastPage: Y.length > 0 && J === Y.length - 1,
|
|
2530
|
+
setAnswer: (G, oe) => S.setAnswer(G, oe),
|
|
2531
|
+
getAnswer: S.getAnswer,
|
|
2526
2532
|
goToNext: () => {
|
|
2527
|
-
var
|
|
2528
|
-
const
|
|
2529
|
-
if (!
|
|
2533
|
+
var oe;
|
|
2534
|
+
const G = S.goToNext();
|
|
2535
|
+
if (!G.valid)
|
|
2530
2536
|
try {
|
|
2531
|
-
(
|
|
2532
|
-
|
|
2537
|
+
(oe = P.current) == null || oe.call(
|
|
2538
|
+
P,
|
|
2533
2539
|
new Error(
|
|
2534
|
-
`Validation failed: ${Object.values(
|
|
2540
|
+
`Validation failed: ${Object.values(G.errors).join(", ")}`
|
|
2535
2541
|
)
|
|
2536
2542
|
);
|
|
2537
|
-
} catch (
|
|
2538
|
-
console.error("[DtcOnboardingFlow] onError callback threw:",
|
|
2543
|
+
} catch (M) {
|
|
2544
|
+
console.error("[DtcOnboardingFlow] onError callback threw:", M);
|
|
2539
2545
|
}
|
|
2540
2546
|
},
|
|
2541
|
-
goToPrev: () =>
|
|
2547
|
+
goToPrev: () => S.goToPrev(),
|
|
2542
2548
|
smsConsentText: a
|
|
2543
2549
|
}),
|
|
2544
2550
|
[
|
|
2545
|
-
|
|
2551
|
+
S,
|
|
2552
|
+
ue,
|
|
2553
|
+
J,
|
|
2554
|
+
Y,
|
|
2555
|
+
y,
|
|
2556
|
+
ae,
|
|
2546
2557
|
K,
|
|
2547
|
-
|
|
2548
|
-
$,
|
|
2549
|
-
q,
|
|
2550
|
-
j,
|
|
2551
|
-
U,
|
|
2552
|
-
ie,
|
|
2558
|
+
k,
|
|
2553
2559
|
a,
|
|
2554
|
-
s
|
|
2560
|
+
s,
|
|
2561
|
+
o,
|
|
2562
|
+
i,
|
|
2563
|
+
m
|
|
2555
2564
|
]
|
|
2556
2565
|
);
|
|
2557
|
-
return /* @__PURE__ */ t.jsx(Et.Provider, { value:
|
|
2558
|
-
}, Fn = "_container_uharh_7", $n = "_header_uharh_20", Wn = "_headerLogos_uharh_30", Hn = "_headerPartnerLogo_uharh_36", Vn = "_headerOpendoorLogo_uharh_42", qn = "_headerCloseButton_uharh_46", Gn = "_layout_uharh_71", Un = "_layoutScrollable_uharh_78", Yn = "_addressBar_uharh_94", Zn = "_addressIcon_uharh_102", Kn = "_addressText_uharh_106", zn = "_contentSplit_uharh_112", Jn = "_contentLeft_uharh_126", Xn = "_contentRight_uharh_132", Qn = "_pageTitle_uharh_148", ea = "_pageSubtitle_uharh_156", ta = "_pageContent_uharh_165", ra = "_navigation_uharh_173", na = "_navigationButtons_uharh_187", aa = "_backButton_uharh_193", sa = "_nextButton_uharh_216", oa = "_progressBar_uharh_242", ia = "_progressBarFill_uharh_249", la = "_radioCardGroup_uharh_257", ca = "_radioCard_uharh_257", ua = "_radioCardSelected_uharh_289", da = "_radioCardLabel_uharh_294", ha = "_radioCardDescription_uharh_300", fa = "_imageCardGroup_uharh_307", ma = "_imageCard_uharh_307", pa = "_imageCardSelected_uharh_339", ga = "_imageCardPhoto_uharh_344", _a = "_imageCardLabel_uharh_351", ba = "_imageCardDescription_uharh_358", ya = "_fieldGroup_uharh_367", va = "_fieldLabel_uharh_373", xa = "_fieldDescription_uharh_380", Ca = "_fieldSelect_uharh_387", wa = "_fieldSelectError_uharh_413", ka = "_fieldInputWrapper_uharh_417", ja = "_fieldInput_uharh_417", Na = "_fieldInputError_uharh_455",
|
|
2566
|
+
return /* @__PURE__ */ t.jsx(Et.Provider, { value: C, children: _ });
|
|
2567
|
+
}, Fn = "_container_uharh_7", $n = "_header_uharh_20", Wn = "_headerLogos_uharh_30", Hn = "_headerPartnerLogo_uharh_36", Vn = "_headerOpendoorLogo_uharh_42", qn = "_headerCloseButton_uharh_46", Gn = "_layout_uharh_71", Un = "_layoutScrollable_uharh_78", Yn = "_addressBar_uharh_94", Zn = "_addressIcon_uharh_102", Kn = "_addressText_uharh_106", zn = "_contentSplit_uharh_112", Jn = "_contentLeft_uharh_126", Xn = "_contentRight_uharh_132", Qn = "_pageTitle_uharh_148", ea = "_pageSubtitle_uharh_156", ta = "_pageContent_uharh_165", ra = "_navigation_uharh_173", na = "_navigationButtons_uharh_187", aa = "_backButton_uharh_193", sa = "_nextButton_uharh_216", oa = "_progressBar_uharh_242", ia = "_progressBarFill_uharh_249", la = "_radioCardGroup_uharh_257", ca = "_radioCard_uharh_257", ua = "_radioCardSelected_uharh_289", da = "_radioCardLabel_uharh_294", ha = "_radioCardDescription_uharh_300", fa = "_imageCardGroup_uharh_307", ma = "_imageCard_uharh_307", pa = "_imageCardSelected_uharh_339", ga = "_imageCardPhoto_uharh_344", _a = "_imageCardLabel_uharh_351", ba = "_imageCardDescription_uharh_358", ya = "_fieldGroup_uharh_367", va = "_fieldLabel_uharh_373", xa = "_fieldDescription_uharh_380", Ca = "_fieldSelect_uharh_387", wa = "_fieldSelectError_uharh_413", ka = "_fieldInputWrapper_uharh_417", ja = "_fieldInput_uharh_417", Na = "_fieldInputError_uharh_455", Sa = "_fieldSuffix_uharh_459", Ia = "_fieldError_uharh_470", Ea = "_checkboxCardGroup_uharh_479", Pa = "_checkboxCard_uharh_479", La = "_checkboxCardSelected_uharh_511", Ta = "_checkboxCardContent_uharh_516", Aa = "_checkboxCardLabel_uharh_523", Da = "_checkboxCardHelper_uharh_529", Oa = "_checkboxIndicator_uharh_534", Ra = "_checkboxIndicatorChecked_uharh_546", Ba = "_currencyWrapper_uharh_554", Ma = "_currencyPrefix_uharh_560", Fa = "_currencyInput_uharh_569", $a = "_consentText_uharh_589", Wa = "_consentLink_uharh_597", Ha = "_ctaButton_uharh_602", Va = "_toggleGroup_uharh_634", qa = "_toggleLabel_uharh_638", Ga = "_toggleCheckbox_uharh_646", Ua = "_toggleText_uharh_655", Ya = "_searchableDropdown_uharh_663", Za = "_searchableDropdownToggle_uharh_673", Ka = "_searchableDropdownList_uharh_686", za = "_searchableDropdownOption_uharh_695", Ja = "_searchableDropdownOptionSelected_uharh_713", Xa = "_searchableDropdownOptionHighlighted_uharh_718", Qa = "_searchableDropdownEmpty_uharh_722", d = {
|
|
2559
2568
|
container: Fn,
|
|
2560
2569
|
header: $n,
|
|
2561
2570
|
headerLogos: Wn,
|
|
@@ -2598,8 +2607,8 @@ const Mn = ({
|
|
|
2598
2607
|
fieldInputWrapper: ka,
|
|
2599
2608
|
fieldInput: ja,
|
|
2600
2609
|
fieldInputError: Na,
|
|
2601
|
-
fieldSuffix:
|
|
2602
|
-
fieldError:
|
|
2610
|
+
fieldSuffix: Sa,
|
|
2611
|
+
fieldError: Ia,
|
|
2603
2612
|
checkboxCardGroup: Ea,
|
|
2604
2613
|
checkboxCard: Pa,
|
|
2605
2614
|
checkboxCardSelected: La,
|
|
@@ -2635,7 +2644,7 @@ const Mn = ({
|
|
|
2635
2644
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2636
2645
|
"aria-label": "Opendoor",
|
|
2637
2646
|
role: "img",
|
|
2638
|
-
className:
|
|
2647
|
+
className: d.headerOpendoorLogo,
|
|
2639
2648
|
children: /* @__PURE__ */ t.jsx(
|
|
2640
2649
|
"path",
|
|
2641
2650
|
{
|
|
@@ -2647,14 +2656,14 @@ const Mn = ({
|
|
|
2647
2656
|
), ts = ({
|
|
2648
2657
|
partnerLogoUrl: e,
|
|
2649
2658
|
onClose: r
|
|
2650
|
-
}) => /* @__PURE__ */ t.jsxs("header", { className:
|
|
2651
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2659
|
+
}) => /* @__PURE__ */ t.jsxs("header", { className: d.header, children: [
|
|
2660
|
+
/* @__PURE__ */ t.jsxs("div", { className: d.headerLogos, children: [
|
|
2652
2661
|
e && /* @__PURE__ */ t.jsx(
|
|
2653
2662
|
"img",
|
|
2654
2663
|
{
|
|
2655
2664
|
src: e,
|
|
2656
2665
|
alt: "Partner",
|
|
2657
|
-
className:
|
|
2666
|
+
className: d.headerPartnerLogo
|
|
2658
2667
|
}
|
|
2659
2668
|
),
|
|
2660
2669
|
/* @__PURE__ */ t.jsx(es, {})
|
|
@@ -2663,7 +2672,7 @@ const Mn = ({
|
|
|
2663
2672
|
"button",
|
|
2664
2673
|
{
|
|
2665
2674
|
type: "button",
|
|
2666
|
-
className:
|
|
2675
|
+
className: d.headerCloseButton,
|
|
2667
2676
|
onClick: r,
|
|
2668
2677
|
"aria-label": "Close",
|
|
2669
2678
|
children: /* @__PURE__ */ t.jsxs(
|
|
@@ -2690,7 +2699,7 @@ const Mn = ({
|
|
|
2690
2699
|
return /* @__PURE__ */ t.jsx(
|
|
2691
2700
|
"div",
|
|
2692
2701
|
{
|
|
2693
|
-
className:
|
|
2702
|
+
className: d.progressBar,
|
|
2694
2703
|
role: "progressbar",
|
|
2695
2704
|
"aria-valuenow": r,
|
|
2696
2705
|
"aria-valuemin": 0,
|
|
@@ -2698,24 +2707,24 @@ const Mn = ({
|
|
|
2698
2707
|
children: /* @__PURE__ */ t.jsx(
|
|
2699
2708
|
"div",
|
|
2700
2709
|
{
|
|
2701
|
-
className:
|
|
2710
|
+
className: d.progressBarFill,
|
|
2702
2711
|
style: { width: `${r}%` }
|
|
2703
2712
|
}
|
|
2704
2713
|
)
|
|
2705
2714
|
}
|
|
2706
2715
|
);
|
|
2707
2716
|
}, ns = () => {
|
|
2708
|
-
const { isFirstPage: e, currentPage: r, progress: a, goToNext: s, goToPrev: o } =
|
|
2717
|
+
const { isFirstPage: e, currentPage: r, progress: a, goToNext: s, goToPrev: o } = pe();
|
|
2709
2718
|
if ((r == null ? void 0 : r.id) === "contact-info") return null;
|
|
2710
2719
|
const i = (r == null ? void 0 : r.submitLabel) ?? "Next";
|
|
2711
|
-
return /* @__PURE__ */ t.jsxs("nav", { className:
|
|
2720
|
+
return /* @__PURE__ */ t.jsxs("nav", { className: d.navigation, "aria-label": "Page navigation", children: [
|
|
2712
2721
|
/* @__PURE__ */ t.jsx(rs, { progress: a }),
|
|
2713
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2722
|
+
/* @__PURE__ */ t.jsxs("div", { className: d.navigationButtons, children: [
|
|
2714
2723
|
e ? /* @__PURE__ */ t.jsx("div", {}) : /* @__PURE__ */ t.jsx(
|
|
2715
2724
|
"button",
|
|
2716
2725
|
{
|
|
2717
2726
|
type: "button",
|
|
2718
|
-
className:
|
|
2727
|
+
className: d.backButton,
|
|
2719
2728
|
onClick: o,
|
|
2720
2729
|
"aria-label": "Go back",
|
|
2721
2730
|
children: /* @__PURE__ */ t.jsx(
|
|
@@ -2734,140 +2743,140 @@ const Mn = ({
|
|
|
2734
2743
|
)
|
|
2735
2744
|
}
|
|
2736
2745
|
),
|
|
2737
|
-
/* @__PURE__ */ t.jsx("button", { type: "button", className:
|
|
2746
|
+
/* @__PURE__ */ t.jsx("button", { type: "button", className: d.nextButton, onClick: s, children: i })
|
|
2738
2747
|
] })
|
|
2739
2748
|
] });
|
|
2740
2749
|
}, as = ({ question: e }) => {
|
|
2741
|
-
var
|
|
2742
|
-
const { getAnswer: r, setAnswer: a, goToNext: s, validationErrors: o } =
|
|
2743
|
-
|
|
2750
|
+
var c;
|
|
2751
|
+
const { getAnswer: r, setAnswer: a, goToNext: s, validationErrors: o } = pe(), i = r(e.key), m = o[e.key], f = U(null);
|
|
2752
|
+
ce(() => () => {
|
|
2744
2753
|
f.current && clearTimeout(f.current);
|
|
2745
2754
|
}, []);
|
|
2746
|
-
const
|
|
2755
|
+
const u = Ee(
|
|
2747
2756
|
(p) => {
|
|
2748
2757
|
a(e.key, p), e.autoAdvance && (f.current && clearTimeout(f.current), f.current = setTimeout(() => s(), 150));
|
|
2749
2758
|
},
|
|
2750
2759
|
[e.key, e.autoAdvance, a, s]
|
|
2751
|
-
),
|
|
2760
|
+
), l = Ee(
|
|
2752
2761
|
(p, _) => {
|
|
2753
|
-
var
|
|
2754
|
-
const
|
|
2755
|
-
if (!
|
|
2756
|
-
let
|
|
2757
|
-
if (p.key === "ArrowDown" || p.key === "ArrowRight" ? (p.preventDefault(),
|
|
2758
|
-
const P = (
|
|
2759
|
-
(
|
|
2762
|
+
var D, B;
|
|
2763
|
+
const x = e.options;
|
|
2764
|
+
if (!x) return;
|
|
2765
|
+
let I = null;
|
|
2766
|
+
if (p.key === "ArrowDown" || p.key === "ArrowRight" ? (p.preventDefault(), I = (_ + 1) % x.length) : (p.key === "ArrowUp" || p.key === "ArrowLeft") && (p.preventDefault(), I = (_ - 1 + x.length) % x.length), I !== null) {
|
|
2767
|
+
const P = (D = p.currentTarget.closest('[role="radiogroup"]')) == null ? void 0 : D.querySelectorAll('[role="radio"]');
|
|
2768
|
+
(B = P == null ? void 0 : P[I]) == null || B.focus(), u(x[I].value);
|
|
2760
2769
|
}
|
|
2761
2770
|
},
|
|
2762
|
-
[e.options,
|
|
2771
|
+
[e.options, u]
|
|
2763
2772
|
);
|
|
2764
2773
|
return /* @__PURE__ */ t.jsxs(
|
|
2765
2774
|
"div",
|
|
2766
2775
|
{
|
|
2767
|
-
className:
|
|
2776
|
+
className: d.radioCardGroup,
|
|
2768
2777
|
role: "radiogroup",
|
|
2769
2778
|
"aria-label": e.label,
|
|
2770
2779
|
children: [
|
|
2771
|
-
(
|
|
2772
|
-
const
|
|
2780
|
+
(c = e.options) == null ? void 0 : c.map((p, _) => {
|
|
2781
|
+
const x = i === p.value;
|
|
2773
2782
|
return /* @__PURE__ */ t.jsxs(
|
|
2774
2783
|
"button",
|
|
2775
2784
|
{
|
|
2776
2785
|
type: "button",
|
|
2777
2786
|
role: "radio",
|
|
2778
|
-
"aria-checked":
|
|
2779
|
-
tabIndex:
|
|
2780
|
-
className: `${
|
|
2781
|
-
onClick: () =>
|
|
2782
|
-
onKeyDown: (
|
|
2787
|
+
"aria-checked": x,
|
|
2788
|
+
tabIndex: x || _ === 0 && !i ? 0 : -1,
|
|
2789
|
+
className: `${d.radioCard} ${x ? d.radioCardSelected : ""}`,
|
|
2790
|
+
onClick: () => u(p.value),
|
|
2791
|
+
onKeyDown: (I) => l(I, _),
|
|
2783
2792
|
children: [
|
|
2784
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
2785
|
-
p.description && /* @__PURE__ */ t.jsx("span", { className:
|
|
2793
|
+
/* @__PURE__ */ t.jsx("span", { className: d.radioCardLabel, children: p.label }),
|
|
2794
|
+
p.description && /* @__PURE__ */ t.jsx("span", { className: d.radioCardDescription, children: p.description })
|
|
2786
2795
|
]
|
|
2787
2796
|
},
|
|
2788
2797
|
String(p.value)
|
|
2789
2798
|
);
|
|
2790
2799
|
}),
|
|
2791
|
-
m && /* @__PURE__ */ t.jsx("p", { className:
|
|
2800
|
+
m && /* @__PURE__ */ t.jsx("p", { className: d.fieldError, children: m })
|
|
2792
2801
|
]
|
|
2793
2802
|
}
|
|
2794
2803
|
);
|
|
2795
2804
|
}, ss = "https://images.opendoor.com/source/s3/imgdrop-production", os = "service=reception-fe&dpr=2&fit=scale-down";
|
|
2796
|
-
function
|
|
2805
|
+
function ne(e, r = "3:2-sm") {
|
|
2797
2806
|
return `${ss}/${e}?${os}&preset=${r}`;
|
|
2798
2807
|
}
|
|
2799
2808
|
const is = {
|
|
2800
2809
|
// Kitchen
|
|
2801
|
-
"kitchen-fixer_upper":
|
|
2802
|
-
"kitchen-dated":
|
|
2803
|
-
"kitchen-standard":
|
|
2804
|
-
"kitchen-high_end":
|
|
2805
|
-
"kitchen-luxury":
|
|
2810
|
+
"kitchen-fixer_upper": ne("2023-04-1681772974083-61414.png"),
|
|
2811
|
+
"kitchen-dated": ne("2023-04-1681772974089-39460.png"),
|
|
2812
|
+
"kitchen-standard": ne("2023-04-1681772974093-51260.png"),
|
|
2813
|
+
"kitchen-high_end": ne("2023-04-1682444345875-57331.jpeg", "3:2-xl"),
|
|
2814
|
+
"kitchen-luxury": ne("2023-04-1682444629335-69661.jpeg", "3:2-xl"),
|
|
2806
2815
|
// Bathroom
|
|
2807
|
-
"bathroom-fixer_upper":
|
|
2808
|
-
"bathroom-dated":
|
|
2809
|
-
"bathroom-standard":
|
|
2810
|
-
"bathroom-high_end":
|
|
2811
|
-
"bathroom-luxury":
|
|
2816
|
+
"bathroom-fixer_upper": ne("2023-04-1682103091299-33543.jpeg"),
|
|
2817
|
+
"bathroom-dated": ne("2023-04-1681773104207-98555.png"),
|
|
2818
|
+
"bathroom-standard": ne("2023-04-1682103088251-79730.jpeg", "3:2-xl"),
|
|
2819
|
+
"bathroom-high_end": ne("2023-04-1681773104214-77488.png"),
|
|
2820
|
+
"bathroom-luxury": ne("2023-04-1681773104217-27390.png"),
|
|
2812
2821
|
// Living Room
|
|
2813
|
-
"living-room-fixer_upper":
|
|
2814
|
-
"living-room-dated":
|
|
2815
|
-
"living-room-standard":
|
|
2816
|
-
"living-room-high_end":
|
|
2817
|
-
"living-room-luxury":
|
|
2822
|
+
"living-room-fixer_upper": ne("2023-04-1681773170815-60328.png"),
|
|
2823
|
+
"living-room-dated": ne("2023-04-1681773170823-03451.png"),
|
|
2824
|
+
"living-room-standard": ne("2023-04-1681773170826-47471.png"),
|
|
2825
|
+
"living-room-high_end": ne("2023-04-1681773170828-76415.png"),
|
|
2826
|
+
"living-room-luxury": ne("2023-04-1681773170832-20699.png"),
|
|
2818
2827
|
// Exterior
|
|
2819
|
-
"exterior-fixer_upper":
|
|
2820
|
-
"exterior-dated":
|
|
2821
|
-
"exterior-standard":
|
|
2822
|
-
"exterior-high_end":
|
|
2823
|
-
"exterior-luxury":
|
|
2828
|
+
"exterior-fixer_upper": ne("2023-04-1681773220493-46489.png"),
|
|
2829
|
+
"exterior-dated": ne("2023-04-1681773220495-22229.png"),
|
|
2830
|
+
"exterior-standard": ne("2023-04-1681773220498-64940.png"),
|
|
2831
|
+
"exterior-high_end": ne("2023-04-1682103085417-24272.jpeg", "3:2-md"),
|
|
2832
|
+
"exterior-luxury": ne("2023-04-1681773220487-59852.png")
|
|
2824
2833
|
}, ls = ({ question: e }) => {
|
|
2825
|
-
var
|
|
2826
|
-
const { getAnswer: r, setAnswer: a, goToNext: s, validationErrors: o } =
|
|
2827
|
-
|
|
2834
|
+
var l;
|
|
2835
|
+
const { getAnswer: r, setAnswer: a, goToNext: s, validationErrors: o } = pe(), i = r(e.key), m = o[e.key], f = U(null);
|
|
2836
|
+
ce(() => () => {
|
|
2828
2837
|
f.current && clearTimeout(f.current);
|
|
2829
2838
|
}, []);
|
|
2830
|
-
const
|
|
2831
|
-
(
|
|
2832
|
-
a(e.key,
|
|
2839
|
+
const u = Ee(
|
|
2840
|
+
(c) => {
|
|
2841
|
+
a(e.key, c), e.autoAdvance && (f.current && clearTimeout(f.current), f.current = setTimeout(() => s(), 300));
|
|
2833
2842
|
},
|
|
2834
2843
|
[e.key, e.autoAdvance, a, s]
|
|
2835
2844
|
);
|
|
2836
2845
|
return /* @__PURE__ */ t.jsxs(
|
|
2837
2846
|
"div",
|
|
2838
2847
|
{
|
|
2839
|
-
className:
|
|
2848
|
+
className: d.imageCardGroup,
|
|
2840
2849
|
role: "radiogroup",
|
|
2841
2850
|
"aria-label": e.label,
|
|
2842
2851
|
children: [
|
|
2843
|
-
(
|
|
2844
|
-
const p = i ===
|
|
2852
|
+
(l = e.options) == null ? void 0 : l.map((c) => {
|
|
2853
|
+
const p = i === c.value, _ = c.imageId ? is[c.imageId] : void 0;
|
|
2845
2854
|
return /* @__PURE__ */ t.jsxs(
|
|
2846
2855
|
"button",
|
|
2847
2856
|
{
|
|
2848
2857
|
type: "button",
|
|
2849
2858
|
role: "radio",
|
|
2850
2859
|
"aria-checked": p,
|
|
2851
|
-
className: `${
|
|
2852
|
-
onClick: () =>
|
|
2860
|
+
className: `${d.imageCard} ${p ? d.imageCardSelected : ""}`,
|
|
2861
|
+
onClick: () => u(c.value),
|
|
2853
2862
|
children: [
|
|
2854
2863
|
_ && /* @__PURE__ */ t.jsx(
|
|
2855
2864
|
"img",
|
|
2856
2865
|
{
|
|
2857
2866
|
src: _,
|
|
2858
|
-
alt:
|
|
2859
|
-
className:
|
|
2867
|
+
alt: c.label,
|
|
2868
|
+
className: d.imageCardPhoto,
|
|
2860
2869
|
loading: "lazy"
|
|
2861
2870
|
}
|
|
2862
2871
|
),
|
|
2863
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
2864
|
-
|
|
2872
|
+
/* @__PURE__ */ t.jsx("span", { className: d.imageCardLabel, children: c.label }),
|
|
2873
|
+
c.description && /* @__PURE__ */ t.jsx("span", { className: d.imageCardDescription, children: c.description })
|
|
2865
2874
|
]
|
|
2866
2875
|
},
|
|
2867
|
-
String(
|
|
2876
|
+
String(c.value)
|
|
2868
2877
|
);
|
|
2869
2878
|
}),
|
|
2870
|
-
m && /* @__PURE__ */ t.jsx("p", { className:
|
|
2879
|
+
m && /* @__PURE__ */ t.jsx("p", { className: d.fieldError, children: m })
|
|
2871
2880
|
]
|
|
2872
2881
|
}
|
|
2873
2882
|
);
|
|
@@ -2875,52 +2884,52 @@ const is = {
|
|
|
2875
2884
|
question: e
|
|
2876
2885
|
}) => {
|
|
2877
2886
|
var f;
|
|
2878
|
-
const { getAnswer: r, setAnswer: a, validationErrors: s } =
|
|
2887
|
+
const { getAnswer: r, setAnswer: a, validationErrors: s } = pe(), o = r(e.key) ?? [], i = s[e.key], m = (u) => {
|
|
2879
2888
|
var p;
|
|
2880
|
-
const
|
|
2881
|
-
if (
|
|
2882
|
-
a(e.key, [
|
|
2889
|
+
const l = (p = e.options) == null ? void 0 : p.find((_) => _.value === u);
|
|
2890
|
+
if (l != null && l.exclusive) {
|
|
2891
|
+
a(e.key, [u]);
|
|
2883
2892
|
return;
|
|
2884
2893
|
}
|
|
2885
|
-
const
|
|
2894
|
+
const c = o.filter(
|
|
2886
2895
|
(_) => {
|
|
2887
|
-
var
|
|
2888
|
-
return !((
|
|
2896
|
+
var x, I;
|
|
2897
|
+
return !((I = (x = e.options) == null ? void 0 : x.find((D) => D.value === _)) != null && I.exclusive);
|
|
2889
2898
|
}
|
|
2890
2899
|
);
|
|
2891
|
-
if (
|
|
2892
|
-
const _ =
|
|
2900
|
+
if (c.includes(u)) {
|
|
2901
|
+
const _ = c.filter((x) => x !== u);
|
|
2893
2902
|
a(e.key, _.length > 0 ? _ : void 0);
|
|
2894
2903
|
} else
|
|
2895
|
-
a(e.key, [...
|
|
2904
|
+
a(e.key, [...c, u]);
|
|
2896
2905
|
};
|
|
2897
2906
|
return /* @__PURE__ */ t.jsxs(
|
|
2898
2907
|
"div",
|
|
2899
2908
|
{
|
|
2900
|
-
className:
|
|
2909
|
+
className: d.checkboxCardGroup,
|
|
2901
2910
|
role: "group",
|
|
2902
2911
|
"aria-label": e.label,
|
|
2903
2912
|
children: [
|
|
2904
|
-
(f = e.options) == null ? void 0 : f.map((
|
|
2905
|
-
const
|
|
2913
|
+
(f = e.options) == null ? void 0 : f.map((u) => {
|
|
2914
|
+
const l = o.includes(String(u.value));
|
|
2906
2915
|
return /* @__PURE__ */ t.jsxs(
|
|
2907
2916
|
"button",
|
|
2908
2917
|
{
|
|
2909
2918
|
type: "button",
|
|
2910
2919
|
role: "checkbox",
|
|
2911
|
-
"aria-checked":
|
|
2912
|
-
className: `${
|
|
2913
|
-
onClick: () => m(String(
|
|
2920
|
+
"aria-checked": l,
|
|
2921
|
+
className: `${d.checkboxCard} ${l ? d.checkboxCardSelected : ""}`,
|
|
2922
|
+
onClick: () => m(String(u.value)),
|
|
2914
2923
|
children: [
|
|
2915
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2916
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
2917
|
-
|
|
2924
|
+
/* @__PURE__ */ t.jsxs("span", { className: d.checkboxCardContent, children: [
|
|
2925
|
+
/* @__PURE__ */ t.jsx("span", { className: d.checkboxCardLabel, children: u.label }),
|
|
2926
|
+
u.helperText && /* @__PURE__ */ t.jsx("span", { className: d.checkboxCardHelper, children: u.helperText })
|
|
2918
2927
|
] }),
|
|
2919
2928
|
/* @__PURE__ */ t.jsx(
|
|
2920
2929
|
"span",
|
|
2921
2930
|
{
|
|
2922
|
-
className: `${
|
|
2923
|
-
children:
|
|
2931
|
+
className: `${d.checkboxIndicator} ${l ? d.checkboxIndicatorChecked : ""}`,
|
|
2932
|
+
children: l && /* @__PURE__ */ t.jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ t.jsx(
|
|
2924
2933
|
"path",
|
|
2925
2934
|
{
|
|
2926
2935
|
d: "M2 6l3 3 5-5",
|
|
@@ -2934,89 +2943,89 @@ const is = {
|
|
|
2934
2943
|
)
|
|
2935
2944
|
]
|
|
2936
2945
|
},
|
|
2937
|
-
String(
|
|
2946
|
+
String(u.value)
|
|
2938
2947
|
);
|
|
2939
2948
|
}),
|
|
2940
|
-
i && /* @__PURE__ */ t.jsx("p", { className:
|
|
2949
|
+
i && /* @__PURE__ */ t.jsx("p", { className: d.fieldError, children: i })
|
|
2941
2950
|
]
|
|
2942
2951
|
}
|
|
2943
2952
|
);
|
|
2944
2953
|
}, us = ({ question: e }) => {
|
|
2945
2954
|
var f;
|
|
2946
|
-
const { getAnswer: r, setAnswer: a, validationErrors: s } =
|
|
2947
|
-
const
|
|
2948
|
-
e.type === "number" &&
|
|
2955
|
+
const { getAnswer: r, setAnswer: a, validationErrors: s } = pe(), o = r(e.key), i = s[e.key], m = (u) => {
|
|
2956
|
+
const l = u.target.value;
|
|
2957
|
+
e.type === "number" && l !== "" ? a(e.key, Number(l)) : a(e.key, l || void 0);
|
|
2949
2958
|
};
|
|
2950
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2951
|
-
/* @__PURE__ */ t.jsx("label", { className:
|
|
2952
|
-
e.description && /* @__PURE__ */ t.jsx("p", { className:
|
|
2959
|
+
return /* @__PURE__ */ t.jsxs("div", { className: d.fieldGroup, children: [
|
|
2960
|
+
/* @__PURE__ */ t.jsx("label", { className: d.fieldLabel, htmlFor: e.key, children: e.label }),
|
|
2961
|
+
e.description && /* @__PURE__ */ t.jsx("p", { className: d.fieldDescription, children: e.description }),
|
|
2953
2962
|
/* @__PURE__ */ t.jsxs(
|
|
2954
2963
|
"select",
|
|
2955
2964
|
{
|
|
2956
2965
|
id: e.key,
|
|
2957
|
-
className: `${
|
|
2966
|
+
className: `${d.fieldSelect} ${i ? d.fieldSelectError : ""}`,
|
|
2958
2967
|
value: o !== void 0 ? String(o) : "",
|
|
2959
2968
|
onChange: m,
|
|
2960
2969
|
children: [
|
|
2961
2970
|
/* @__PURE__ */ t.jsx("option", { value: "", children: e.placeholder || "Select..." }),
|
|
2962
|
-
(f = e.options) == null ? void 0 : f.map((
|
|
2971
|
+
(f = e.options) == null ? void 0 : f.map((u) => /* @__PURE__ */ t.jsx("option", { value: String(u.value), children: u.label }, String(u.value)))
|
|
2963
2972
|
]
|
|
2964
2973
|
}
|
|
2965
2974
|
),
|
|
2966
|
-
i && /* @__PURE__ */ t.jsx("p", { className:
|
|
2975
|
+
i && /* @__PURE__ */ t.jsx("p", { className: d.fieldError, children: i })
|
|
2967
2976
|
] });
|
|
2968
2977
|
}, ds = ({ question: e }) => {
|
|
2969
|
-
const { getAnswer: r, setAnswer: a, validationErrors: s } =
|
|
2970
|
-
const
|
|
2978
|
+
const { getAnswer: r, setAnswer: a, validationErrors: s } = pe(), o = r(e.key), i = s[e.key], m = (u) => {
|
|
2979
|
+
const l = u.target.value;
|
|
2971
2980
|
if (e.type === "number") {
|
|
2972
|
-
const
|
|
2981
|
+
const c = l.replace(/[^0-9.]/g, ""), p = c === "" ? void 0 : Number(c), _ = p !== void 0 && isNaN(p) ? void 0 : p;
|
|
2973
2982
|
a(e.key, _);
|
|
2974
2983
|
} else
|
|
2975
|
-
a(e.key,
|
|
2984
|
+
a(e.key, l || void 0);
|
|
2976
2985
|
}, f = o != null ? String(o) : "";
|
|
2977
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2978
|
-
/* @__PURE__ */ t.jsx("label", { className:
|
|
2979
|
-
e.description && /* @__PURE__ */ t.jsx("p", { className:
|
|
2980
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2986
|
+
return /* @__PURE__ */ t.jsxs("div", { className: d.fieldGroup, children: [
|
|
2987
|
+
/* @__PURE__ */ t.jsx("label", { className: d.fieldLabel, htmlFor: e.key, children: e.label }),
|
|
2988
|
+
e.description && /* @__PURE__ */ t.jsx("p", { className: d.fieldDescription, children: e.description }),
|
|
2989
|
+
/* @__PURE__ */ t.jsxs("div", { className: d.fieldInputWrapper, children: [
|
|
2981
2990
|
/* @__PURE__ */ t.jsx(
|
|
2982
2991
|
"input",
|
|
2983
2992
|
{
|
|
2984
2993
|
id: e.key,
|
|
2985
2994
|
type: e.type === "number" ? "text" : e.style === "email" ? "email" : "text",
|
|
2986
2995
|
inputMode: e.type === "number" ? "numeric" : void 0,
|
|
2987
|
-
className: `${
|
|
2996
|
+
className: `${d.fieldInput} ${i ? d.fieldInputError : ""}`,
|
|
2988
2997
|
value: f,
|
|
2989
2998
|
onChange: m,
|
|
2990
2999
|
placeholder: e.placeholder
|
|
2991
3000
|
}
|
|
2992
3001
|
),
|
|
2993
|
-
e.suffix && /* @__PURE__ */ t.jsx("span", { className:
|
|
3002
|
+
e.suffix && /* @__PURE__ */ t.jsx("span", { className: d.fieldSuffix, children: e.suffix })
|
|
2994
3003
|
] }),
|
|
2995
|
-
i && /* @__PURE__ */ t.jsx("p", { className:
|
|
3004
|
+
i && /* @__PURE__ */ t.jsx("p", { className: d.fieldError, children: i })
|
|
2996
3005
|
] });
|
|
2997
3006
|
}, hs = ({ question: e }) => {
|
|
2998
|
-
const { getAnswer: r, setAnswer: a, validationErrors: s } =
|
|
2999
|
-
const
|
|
3000
|
-
a(e.key,
|
|
3007
|
+
const { getAnswer: r, setAnswer: a, validationErrors: s } = pe(), o = r(e.key), i = s[e.key], m = (u) => {
|
|
3008
|
+
const l = u.target.value.replace(/[^0-9]/g, ""), c = l === "" ? void 0 : Number(l);
|
|
3009
|
+
a(e.key, c !== void 0 && isNaN(c) ? void 0 : c);
|
|
3001
3010
|
}, f = o != null ? String(o) : "";
|
|
3002
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
3003
|
-
/* @__PURE__ */ t.jsx("label", { className:
|
|
3004
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3005
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
3011
|
+
return /* @__PURE__ */ t.jsxs("div", { className: d.fieldGroup, children: [
|
|
3012
|
+
/* @__PURE__ */ t.jsx("label", { className: d.fieldLabel, htmlFor: e.key, children: e.label }),
|
|
3013
|
+
/* @__PURE__ */ t.jsxs("div", { className: d.currencyWrapper, children: [
|
|
3014
|
+
/* @__PURE__ */ t.jsx("span", { className: d.currencyPrefix, children: "$" }),
|
|
3006
3015
|
/* @__PURE__ */ t.jsx(
|
|
3007
3016
|
"input",
|
|
3008
3017
|
{
|
|
3009
3018
|
id: e.key,
|
|
3010
3019
|
type: "text",
|
|
3011
3020
|
inputMode: "numeric",
|
|
3012
|
-
className: `${
|
|
3021
|
+
className: `${d.currencyInput} ${i ? d.fieldInputError : ""}`,
|
|
3013
3022
|
value: f,
|
|
3014
3023
|
onChange: m,
|
|
3015
3024
|
placeholder: e.placeholder
|
|
3016
3025
|
}
|
|
3017
3026
|
)
|
|
3018
3027
|
] }),
|
|
3019
|
-
i && /* @__PURE__ */ t.jsx("p", { className:
|
|
3028
|
+
i && /* @__PURE__ */ t.jsx("p", { className: d.fieldError, children: i })
|
|
3020
3029
|
] });
|
|
3021
3030
|
};
|
|
3022
3031
|
function fs(e) {
|
|
@@ -3024,39 +3033,39 @@ function fs(e) {
|
|
|
3024
3033
|
return r.length <= 3 ? r : r.length <= 6 ? `(${r.slice(0, 3)}) ${r.slice(3)}` : `(${r.slice(0, 3)}) ${r.slice(3, 6)}-${r.slice(6)}`;
|
|
3025
3034
|
}
|
|
3026
3035
|
const ms = ({ question: e }) => {
|
|
3027
|
-
const { getAnswer: r, setAnswer: a, validationErrors: s } =
|
|
3028
|
-
const
|
|
3029
|
-
a(e.key,
|
|
3036
|
+
const { getAnswer: r, setAnswer: a, validationErrors: s } = pe(), o = r(e.key) ?? "", i = s[e.key], m = (f) => {
|
|
3037
|
+
const l = f.target.value.replace(/\D/g, "").slice(0, 10);
|
|
3038
|
+
a(e.key, l || void 0);
|
|
3030
3039
|
};
|
|
3031
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
3032
|
-
/* @__PURE__ */ t.jsx("label", { className:
|
|
3040
|
+
return /* @__PURE__ */ t.jsxs("div", { className: d.fieldGroup, children: [
|
|
3041
|
+
/* @__PURE__ */ t.jsx("label", { className: d.fieldLabel, htmlFor: e.key, children: e.label }),
|
|
3033
3042
|
/* @__PURE__ */ t.jsx(
|
|
3034
3043
|
"input",
|
|
3035
3044
|
{
|
|
3036
3045
|
id: e.key,
|
|
3037
3046
|
type: "tel",
|
|
3038
|
-
className: `${
|
|
3047
|
+
className: `${d.fieldInput} ${i ? d.fieldInputError : ""}`,
|
|
3039
3048
|
value: fs(o),
|
|
3040
3049
|
onChange: m,
|
|
3041
3050
|
placeholder: e.placeholder || "(555) 555-5555"
|
|
3042
3051
|
}
|
|
3043
3052
|
),
|
|
3044
|
-
i && /* @__PURE__ */ t.jsx("p", { className:
|
|
3053
|
+
i && /* @__PURE__ */ t.jsx("p", { className: d.fieldError, children: i })
|
|
3045
3054
|
] });
|
|
3046
3055
|
}, ps = ({ question: e }) => {
|
|
3047
|
-
const { getAnswer: r, setAnswer: a, smsConsentText: s } =
|
|
3056
|
+
const { getAnswer: r, setAnswer: a, smsConsentText: s } = pe(), o = r(e.key);
|
|
3048
3057
|
let i = e.label;
|
|
3049
|
-
return e.key === "seller.sms_opt_in" && s && (i = s), /* @__PURE__ */ t.jsx("div", { className:
|
|
3058
|
+
return e.key === "seller.sms_opt_in" && s && (i = s), /* @__PURE__ */ t.jsx("div", { className: d.toggleGroup, children: /* @__PURE__ */ t.jsxs("label", { className: d.toggleLabel, children: [
|
|
3050
3059
|
/* @__PURE__ */ t.jsx(
|
|
3051
3060
|
"input",
|
|
3052
3061
|
{
|
|
3053
3062
|
type: "checkbox",
|
|
3054
|
-
className:
|
|
3063
|
+
className: d.toggleCheckbox,
|
|
3055
3064
|
checked: o === !0,
|
|
3056
3065
|
onChange: (m) => a(e.key, m.target.checked)
|
|
3057
3066
|
}
|
|
3058
3067
|
),
|
|
3059
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
3068
|
+
/* @__PURE__ */ t.jsx("span", { className: d.toggleText, children: i })
|
|
3060
3069
|
] }) });
|
|
3061
3070
|
}, bt = 4, Te = 8, gs = 240, _s = 80;
|
|
3062
3071
|
function bs(e) {
|
|
@@ -3072,164 +3081,164 @@ function bs(e) {
|
|
|
3072
3081
|
}
|
|
3073
3082
|
const ys = ({ question: e }) => {
|
|
3074
3083
|
var ue;
|
|
3075
|
-
const { getAnswer: r, setAnswer: a, validationErrors: s } =
|
|
3076
|
-
|
|
3077
|
-
let
|
|
3078
|
-
return e.dataSource === "homebuilders" &&
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
label:
|
|
3082
|
-
value:
|
|
3084
|
+
const { getAnswer: r, setAnswer: a, validationErrors: s } = pe(), o = r(e.key), i = s[e.key], m = `${e.key}-combobox`, [f, u] = E(""), [l, c] = E(!1), [p, _] = E([]), [x, I] = E(!1), D = U(null), B = U(null), P = U(null), [S, j] = E(null), [ee, V] = E({}), ae = De(Ke);
|
|
3085
|
+
ce(() => {
|
|
3086
|
+
let y = !1;
|
|
3087
|
+
return e.dataSource === "homebuilders" && ae ? (I(!0), ae.getHomebuilders().then((k) => {
|
|
3088
|
+
y || _(
|
|
3089
|
+
k.homebuilders.map((C) => ({
|
|
3090
|
+
label: C.displayName,
|
|
3091
|
+
value: C.identifier
|
|
3083
3092
|
}))
|
|
3084
3093
|
);
|
|
3085
3094
|
}).catch(() => {
|
|
3086
|
-
|
|
3087
|
-
e.options.map((
|
|
3088
|
-
label:
|
|
3089
|
-
value: String(
|
|
3095
|
+
y || (e.options ? _(
|
|
3096
|
+
e.options.map((k) => ({
|
|
3097
|
+
label: k.label,
|
|
3098
|
+
value: String(k.value)
|
|
3090
3099
|
}))
|
|
3091
3100
|
) : _([]));
|
|
3092
3101
|
}).finally(() => {
|
|
3093
|
-
|
|
3102
|
+
y || I(!1);
|
|
3094
3103
|
})) : e.options ? _(
|
|
3095
|
-
e.options.map((
|
|
3096
|
-
label:
|
|
3097
|
-
value: String(
|
|
3104
|
+
e.options.map((k) => ({
|
|
3105
|
+
label: k.label,
|
|
3106
|
+
value: String(k.value)
|
|
3098
3107
|
}))
|
|
3099
3108
|
) : _([]), () => {
|
|
3100
|
-
|
|
3109
|
+
y = !0;
|
|
3101
3110
|
};
|
|
3102
|
-
}, [e.dataSource, e.options,
|
|
3103
|
-
const
|
|
3104
|
-
const
|
|
3105
|
-
if (!
|
|
3106
|
-
const
|
|
3111
|
+
}, [e.dataSource, e.options, ae]);
|
|
3112
|
+
const Z = Ee(() => {
|
|
3113
|
+
const y = B.current;
|
|
3114
|
+
if (!y) return;
|
|
3115
|
+
const k = y.getBoundingClientRect(), C = window.visualViewport, fe = (C == null ? void 0 : C.height) ?? window.innerHeight, G = (C == null ? void 0 : C.width) ?? window.innerWidth, oe = (C == null ? void 0 : C.offsetTop) ?? 0, M = (C == null ? void 0 : C.offsetLeft) ?? 0, ge = oe + fe - k.bottom - bt - Te, w = Math.max(
|
|
3107
3116
|
_s,
|
|
3108
|
-
Math.min(gs,
|
|
3109
|
-
),
|
|
3117
|
+
Math.min(gs, ge)
|
|
3118
|
+
), T = Math.min(k.width, G - Te * 2), F = M + Te, $ = M + G - T - Te, de = Math.max(F, Math.min(k.left, $));
|
|
3110
3119
|
j({
|
|
3111
|
-
top:
|
|
3112
|
-
left:
|
|
3113
|
-
width:
|
|
3114
|
-
maxHeight:
|
|
3120
|
+
top: k.bottom + window.scrollY + bt,
|
|
3121
|
+
left: de + window.scrollX,
|
|
3122
|
+
width: T,
|
|
3123
|
+
maxHeight: w
|
|
3115
3124
|
});
|
|
3116
3125
|
}, []);
|
|
3117
3126
|
Ut(() => {
|
|
3118
|
-
if (!
|
|
3127
|
+
if (!l) {
|
|
3119
3128
|
j(null);
|
|
3120
3129
|
return;
|
|
3121
3130
|
}
|
|
3122
|
-
|
|
3123
|
-
const
|
|
3124
|
-
window.addEventListener("scroll",
|
|
3125
|
-
const
|
|
3126
|
-
|
|
3127
|
-
const
|
|
3131
|
+
B.current && V(bs(B.current)), Z();
|
|
3132
|
+
const y = () => Z();
|
|
3133
|
+
window.addEventListener("scroll", y, !0), window.addEventListener("resize", y);
|
|
3134
|
+
const k = window.visualViewport;
|
|
3135
|
+
k == null || k.addEventListener("resize", y), k == null || k.addEventListener("scroll", y);
|
|
3136
|
+
const C = window.setTimeout(y, 300);
|
|
3128
3137
|
return () => {
|
|
3129
|
-
window.removeEventListener("scroll",
|
|
3138
|
+
window.removeEventListener("scroll", y, !0), window.removeEventListener("resize", y), k == null || k.removeEventListener("resize", y), k == null || k.removeEventListener("scroll", y), window.clearTimeout(C);
|
|
3130
3139
|
};
|
|
3131
|
-
}, [
|
|
3132
|
-
const
|
|
3133
|
-
var
|
|
3134
|
-
const
|
|
3135
|
-
(
|
|
3140
|
+
}, [l, Z]), ce(() => {
|
|
3141
|
+
const y = (k) => {
|
|
3142
|
+
var fe, G;
|
|
3143
|
+
const C = k.target;
|
|
3144
|
+
(fe = D.current) != null && fe.contains(C) || (G = P.current) != null && G.contains(C) || c(!1);
|
|
3136
3145
|
};
|
|
3137
|
-
return document.addEventListener("mousedown",
|
|
3146
|
+
return document.addEventListener("mousedown", y), () => document.removeEventListener("mousedown", y);
|
|
3138
3147
|
}, []);
|
|
3139
|
-
const
|
|
3140
|
-
(
|
|
3141
|
-
) : p,
|
|
3142
|
-
(
|
|
3143
|
-
a(e.key,
|
|
3148
|
+
const L = f ? p.filter(
|
|
3149
|
+
(y) => y.label.toLowerCase().includes(f.toLowerCase())
|
|
3150
|
+
) : p, se = (ue = p.find((y) => y.value === o)) == null ? void 0 : ue.label, [K, ie] = E(-1), Y = `${e.key}-listbox`, z = Ee(
|
|
3151
|
+
(y) => {
|
|
3152
|
+
a(e.key, y), c(!1), u(""), ie(-1);
|
|
3144
3153
|
},
|
|
3145
3154
|
[e.key, a]
|
|
3146
|
-
), q = (
|
|
3147
|
-
if (!
|
|
3148
|
-
(
|
|
3155
|
+
), q = (y) => {
|
|
3156
|
+
if (!l) {
|
|
3157
|
+
(y.key === "ArrowDown" || y.key === "Enter") && (y.preventDefault(), c(!0));
|
|
3149
3158
|
return;
|
|
3150
3159
|
}
|
|
3151
|
-
switch (
|
|
3160
|
+
switch (y.key) {
|
|
3152
3161
|
case "ArrowDown":
|
|
3153
|
-
|
|
3154
|
-
(
|
|
3162
|
+
y.preventDefault(), L.length > 0 && ie(
|
|
3163
|
+
(k) => k < L.length - 1 ? k + 1 : 0
|
|
3155
3164
|
);
|
|
3156
3165
|
break;
|
|
3157
3166
|
case "ArrowUp":
|
|
3158
|
-
|
|
3159
|
-
(
|
|
3167
|
+
y.preventDefault(), L.length > 0 && ie(
|
|
3168
|
+
(k) => k > 0 ? k - 1 : L.length - 1
|
|
3160
3169
|
);
|
|
3161
3170
|
break;
|
|
3162
3171
|
case "Enter":
|
|
3163
|
-
|
|
3172
|
+
y.preventDefault(), K >= 0 && K < L.length && z(L[K].value);
|
|
3164
3173
|
break;
|
|
3165
3174
|
case "Escape":
|
|
3166
|
-
|
|
3175
|
+
y.preventDefault(), c(!1), ie(-1);
|
|
3167
3176
|
break;
|
|
3168
3177
|
}
|
|
3169
|
-
},
|
|
3178
|
+
}, J = l && S && typeof document < "u" ? Yt(
|
|
3170
3179
|
/* @__PURE__ */ t.jsx(
|
|
3171
3180
|
"div",
|
|
3172
3181
|
{
|
|
3173
3182
|
ref: P,
|
|
3174
|
-
className:
|
|
3183
|
+
className: d.searchableDropdownList,
|
|
3175
3184
|
role: "listbox",
|
|
3176
|
-
id:
|
|
3185
|
+
id: Y,
|
|
3177
3186
|
style: {
|
|
3178
3187
|
position: "absolute",
|
|
3179
|
-
top:
|
|
3180
|
-
left:
|
|
3188
|
+
top: S.top,
|
|
3189
|
+
left: S.left,
|
|
3181
3190
|
right: "auto",
|
|
3182
|
-
width:
|
|
3183
|
-
maxHeight:
|
|
3184
|
-
...
|
|
3191
|
+
width: S.width,
|
|
3192
|
+
maxHeight: S.maxHeight,
|
|
3193
|
+
...ee
|
|
3185
3194
|
},
|
|
3186
|
-
children:
|
|
3195
|
+
children: x ? /* @__PURE__ */ t.jsx("div", { className: d.searchableDropdownEmpty, children: "Loading..." }) : L.length === 0 ? /* @__PURE__ */ t.jsx("div", { className: d.searchableDropdownEmpty, children: "No results found" }) : L.map((y, k) => /* @__PURE__ */ t.jsx(
|
|
3187
3196
|
"button",
|
|
3188
3197
|
{
|
|
3189
|
-
id: `${
|
|
3198
|
+
id: `${Y}-option-${k}`,
|
|
3190
3199
|
type: "button",
|
|
3191
3200
|
role: "option",
|
|
3192
|
-
"aria-selected":
|
|
3193
|
-
className: `${
|
|
3194
|
-
onMouseDown: (
|
|
3195
|
-
onClick: () =>
|
|
3196
|
-
children:
|
|
3201
|
+
"aria-selected": y.value === o,
|
|
3202
|
+
className: `${d.searchableDropdownOption} ${y.value === o ? d.searchableDropdownOptionSelected : ""} ${k === K ? d.searchableDropdownOptionHighlighted : ""}`,
|
|
3203
|
+
onMouseDown: (C) => C.preventDefault(),
|
|
3204
|
+
onClick: () => z(y.value),
|
|
3205
|
+
children: y.label
|
|
3197
3206
|
},
|
|
3198
|
-
|
|
3207
|
+
y.value
|
|
3199
3208
|
))
|
|
3200
3209
|
}
|
|
3201
3210
|
),
|
|
3202
3211
|
document.body
|
|
3203
3212
|
) : null;
|
|
3204
|
-
return /* @__PURE__ */ t.jsxs("div", { ref:
|
|
3205
|
-
/* @__PURE__ */ t.jsxs("div", { ref:
|
|
3213
|
+
return /* @__PURE__ */ t.jsxs("div", { ref: D, className: d.fieldGroup, children: [
|
|
3214
|
+
/* @__PURE__ */ t.jsxs("div", { ref: B, className: d.searchableDropdown, children: [
|
|
3206
3215
|
/* @__PURE__ */ t.jsx(
|
|
3207
3216
|
"input",
|
|
3208
3217
|
{
|
|
3209
3218
|
id: m,
|
|
3210
3219
|
type: "text",
|
|
3211
|
-
className:
|
|
3212
|
-
value:
|
|
3213
|
-
onChange: (
|
|
3214
|
-
|
|
3220
|
+
className: d.fieldInput,
|
|
3221
|
+
value: l ? f : se ?? "",
|
|
3222
|
+
onChange: (y) => {
|
|
3223
|
+
u(y.target.value), ie(-1), l || c(!0);
|
|
3215
3224
|
},
|
|
3216
|
-
onFocus: () =>
|
|
3225
|
+
onFocus: () => c(!0),
|
|
3217
3226
|
onKeyDown: q,
|
|
3218
3227
|
placeholder: e.placeholder || "Select or search...",
|
|
3219
3228
|
"aria-label": e.label,
|
|
3220
|
-
"aria-expanded":
|
|
3229
|
+
"aria-expanded": l,
|
|
3221
3230
|
role: "combobox",
|
|
3222
3231
|
"aria-haspopup": "listbox",
|
|
3223
|
-
"aria-controls":
|
|
3224
|
-
"aria-activedescendant":
|
|
3232
|
+
"aria-controls": l ? Y : void 0,
|
|
3233
|
+
"aria-activedescendant": l && K >= 0 ? `${Y}-option-${K}` : void 0
|
|
3225
3234
|
}
|
|
3226
3235
|
),
|
|
3227
3236
|
/* @__PURE__ */ t.jsx(
|
|
3228
3237
|
"button",
|
|
3229
3238
|
{
|
|
3230
3239
|
type: "button",
|
|
3231
|
-
className:
|
|
3232
|
-
onClick: () =>
|
|
3240
|
+
className: d.searchableDropdownToggle,
|
|
3241
|
+
onClick: () => c(!l),
|
|
3233
3242
|
"aria-label": "Toggle dropdown",
|
|
3234
3243
|
tabIndex: -1,
|
|
3235
3244
|
children: /* @__PURE__ */ t.jsx("svg", { width: "12", height: "8", viewBox: "0 0 12 8", fill: "none", children: /* @__PURE__ */ t.jsx(
|
|
@@ -3245,8 +3254,8 @@ const ys = ({ question: e }) => {
|
|
|
3245
3254
|
}
|
|
3246
3255
|
)
|
|
3247
3256
|
] }),
|
|
3248
|
-
i && /* @__PURE__ */ t.jsx("p", { className:
|
|
3249
|
-
|
|
3257
|
+
i && /* @__PURE__ */ t.jsx("p", { className: d.fieldError, children: i }),
|
|
3258
|
+
J
|
|
3250
3259
|
] });
|
|
3251
3260
|
};
|
|
3252
3261
|
function vs(e) {
|
|
@@ -3275,25 +3284,34 @@ function vs(e) {
|
|
|
3275
3284
|
}
|
|
3276
3285
|
}
|
|
3277
3286
|
const xs = () => {
|
|
3278
|
-
const {
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3287
|
+
const {
|
|
3288
|
+
currentPage: e,
|
|
3289
|
+
visibleQuestions: r,
|
|
3290
|
+
goToNext: a,
|
|
3291
|
+
contactConsentText: s,
|
|
3292
|
+
submitLabel: o,
|
|
3293
|
+
contactPageTitle: i
|
|
3294
|
+
} = pe(), m = U(null);
|
|
3295
|
+
if (ce(() => {
|
|
3296
|
+
var c, p, _;
|
|
3297
|
+
(p = (c = m.current) == null ? void 0 : c.scrollTo) == null || p.call(c, { top: 0, behavior: "smooth" }), (_ = m.current) == null || _.focus();
|
|
3298
|
+
}, [e == null ? void 0 : e.id]), !e) return null;
|
|
3299
|
+
const f = e.id === "contact-info", u = (f ? o : void 0) ?? e.submitLabel ?? "Next", l = f && i !== void 0 ? i : e.title;
|
|
3300
|
+
return /* @__PURE__ */ t.jsxs(
|
|
3283
3301
|
"div",
|
|
3284
3302
|
{
|
|
3285
|
-
ref:
|
|
3286
|
-
className:
|
|
3303
|
+
ref: m,
|
|
3304
|
+
className: d.pageContent,
|
|
3287
3305
|
tabIndex: -1,
|
|
3288
3306
|
role: "region",
|
|
3289
|
-
"aria-label":
|
|
3307
|
+
"aria-label": l,
|
|
3290
3308
|
children: [
|
|
3291
3309
|
r.map(vs),
|
|
3292
|
-
|
|
3293
|
-
/* @__PURE__ */ t.jsx("button", { type: "button", className:
|
|
3294
|
-
s ?? /* @__PURE__ */ t.jsxs("p", { className:
|
|
3310
|
+
f && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
3311
|
+
/* @__PURE__ */ t.jsx("button", { type: "button", className: d.ctaButton, onClick: a, children: u }),
|
|
3312
|
+
s ?? /* @__PURE__ */ t.jsxs("p", { className: d.consentText, children: [
|
|
3295
3313
|
"By pressing “",
|
|
3296
|
-
|
|
3314
|
+
u,
|
|
3297
3315
|
",” I agree to Opendoor’s",
|
|
3298
3316
|
" ",
|
|
3299
3317
|
/* @__PURE__ */ t.jsx(
|
|
@@ -3302,7 +3320,7 @@ const xs = () => {
|
|
|
3302
3320
|
href: "https://www.opendoor.com/terms",
|
|
3303
3321
|
target: "_blank",
|
|
3304
3322
|
rel: "noopener noreferrer",
|
|
3305
|
-
className:
|
|
3323
|
+
className: d.consentLink,
|
|
3306
3324
|
children: "Terms of Service"
|
|
3307
3325
|
}
|
|
3308
3326
|
),
|
|
@@ -3315,7 +3333,7 @@ const xs = () => {
|
|
|
3315
3333
|
href: "https://www.opendoor.com/privacy",
|
|
3316
3334
|
target: "_blank",
|
|
3317
3335
|
rel: "noopener noreferrer",
|
|
3318
|
-
className:
|
|
3336
|
+
className: d.consentLink,
|
|
3319
3337
|
children: "Privacy Policy"
|
|
3320
3338
|
}
|
|
3321
3339
|
),
|
|
@@ -3324,20 +3342,20 @@ const xs = () => {
|
|
|
3324
3342
|
] })
|
|
3325
3343
|
]
|
|
3326
3344
|
}
|
|
3327
|
-
)
|
|
3345
|
+
);
|
|
3328
3346
|
}, Cs = ({ address: e }) => {
|
|
3329
|
-
const { currentPage: r } =
|
|
3347
|
+
const { currentPage: r, contactPageTitle: a, contactPageSubtitle: s } = pe();
|
|
3330
3348
|
if (!r) return null;
|
|
3331
|
-
const a = [
|
|
3349
|
+
const o = r.id === "contact-info", i = o && a !== void 0 ? a : r.title, m = o && s !== void 0 ? s : r.subtitle, f = [
|
|
3332
3350
|
e.street1,
|
|
3333
3351
|
e.street2,
|
|
3334
3352
|
e.city,
|
|
3335
3353
|
e.state,
|
|
3336
3354
|
e.postalCode
|
|
3337
3355
|
].filter(Boolean).join(", ");
|
|
3338
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
3339
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3340
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3356
|
+
return /* @__PURE__ */ t.jsxs("div", { className: d.layout, children: [
|
|
3357
|
+
/* @__PURE__ */ t.jsxs("div", { className: d.layoutScrollable, children: [
|
|
3358
|
+
/* @__PURE__ */ t.jsxs("div", { className: d.addressBar, children: [
|
|
3341
3359
|
/* @__PURE__ */ t.jsxs(
|
|
3342
3360
|
"svg",
|
|
3343
3361
|
{
|
|
@@ -3347,21 +3365,21 @@ const xs = () => {
|
|
|
3347
3365
|
fill: "none",
|
|
3348
3366
|
stroke: "currentColor",
|
|
3349
3367
|
strokeWidth: "2",
|
|
3350
|
-
className:
|
|
3368
|
+
className: d.addressIcon,
|
|
3351
3369
|
children: [
|
|
3352
3370
|
/* @__PURE__ */ t.jsx("circle", { cx: "12", cy: "10", r: "3" }),
|
|
3353
3371
|
/* @__PURE__ */ t.jsx("path", { d: "M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7z" })
|
|
3354
3372
|
]
|
|
3355
3373
|
}
|
|
3356
3374
|
),
|
|
3357
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
3375
|
+
/* @__PURE__ */ t.jsx("span", { className: d.addressText, children: f })
|
|
3358
3376
|
] }),
|
|
3359
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3360
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3361
|
-
/* @__PURE__ */ t.jsx("h1", { className:
|
|
3362
|
-
|
|
3377
|
+
/* @__PURE__ */ t.jsxs("div", { className: d.contentSplit, children: [
|
|
3378
|
+
/* @__PURE__ */ t.jsxs("div", { className: d.contentLeft, children: [
|
|
3379
|
+
/* @__PURE__ */ t.jsx("h1", { className: d.pageTitle, children: i }),
|
|
3380
|
+
m && /* @__PURE__ */ t.jsx("p", { className: d.pageSubtitle, children: m })
|
|
3363
3381
|
] }),
|
|
3364
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3382
|
+
/* @__PURE__ */ t.jsx("div", { className: d.contentRight, children: /* @__PURE__ */ t.jsx(xs, {}) })
|
|
3365
3383
|
] })
|
|
3366
3384
|
] }),
|
|
3367
3385
|
/* @__PURE__ */ t.jsx(ns, {})
|
|
@@ -3374,39 +3392,45 @@ const xs = () => {
|
|
|
3374
3392
|
initialAnswers: o,
|
|
3375
3393
|
skipPages: i,
|
|
3376
3394
|
smsConsentText: m,
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3395
|
+
submitLabel: f,
|
|
3396
|
+
contactPageTitle: u,
|
|
3397
|
+
contactPageSubtitle: l,
|
|
3398
|
+
onPageChange: c,
|
|
3399
|
+
onAnswerChange: p,
|
|
3400
|
+
onClose: _,
|
|
3401
|
+
onReady: x,
|
|
3402
|
+
onError: I,
|
|
3403
|
+
contactConsentText: D
|
|
3383
3404
|
}) => {
|
|
3384
|
-
const
|
|
3385
|
-
return /* @__PURE__ */ t.jsx("div", { className:
|
|
3405
|
+
const B = Pe(s);
|
|
3406
|
+
return /* @__PURE__ */ t.jsx("div", { className: d.container, style: B, children: /* @__PURE__ */ t.jsxs(
|
|
3386
3407
|
Mn,
|
|
3387
3408
|
{
|
|
3388
3409
|
initialAnswers: o,
|
|
3389
3410
|
skipPages: i,
|
|
3390
3411
|
smsConsentText: m,
|
|
3391
|
-
contactConsentText:
|
|
3412
|
+
contactConsentText: D,
|
|
3413
|
+
submitLabel: f,
|
|
3414
|
+
contactPageTitle: u,
|
|
3415
|
+
contactPageSubtitle: l,
|
|
3392
3416
|
onSubmit: r,
|
|
3393
|
-
onPageChange:
|
|
3394
|
-
onAnswerChange:
|
|
3395
|
-
onReady:
|
|
3396
|
-
onError:
|
|
3417
|
+
onPageChange: c,
|
|
3418
|
+
onAnswerChange: p,
|
|
3419
|
+
onReady: x,
|
|
3420
|
+
onError: I,
|
|
3397
3421
|
children: [
|
|
3398
|
-
/* @__PURE__ */ t.jsx(ts, { partnerLogoUrl: a, onClose:
|
|
3422
|
+
/* @__PURE__ */ t.jsx(ts, { partnerLogoUrl: a, onClose: _ }),
|
|
3399
3423
|
/* @__PURE__ */ t.jsx(Cs, { address: e })
|
|
3400
3424
|
]
|
|
3401
3425
|
}
|
|
3402
3426
|
) });
|
|
3403
|
-
}, ws = "_root_1iq32_7", ks = "_card_1iq32_18", js = "_titleLarge_1iq32_36", Ns = "_featuresList_1iq32_40",
|
|
3427
|
+
}, ws = "_root_1iq32_7", ks = "_card_1iq32_18", js = "_titleLarge_1iq32_36", Ns = "_featuresList_1iq32_40", Ss = "_stepLayout_1iq32_55", Is = "_leftColumn_1iq32_47", Es = "_introHeader_1iq32_68", Ps = "_schedule_1iq32_74", Ls = "_subtitleLeft_1iq32_124", Ts = "_feature_1iq32_40", As = "_featureTitle_1iq32_143", Ds = "_featureDescription_1iq32_150", Os = "_title_1iq32_36", Rs = "_subtitle_1iq32_124", Bs = "_calendarHeader_1iq32_175", Ms = "_calendarMonthLabel_1iq32_182", Fs = "_calendarNavButton_1iq32_188", $s = "_calendarGrid_1iq32_208", Ws = "_calendarDayHeader_1iq32_214", Hs = "_calendarDayAvailable_1iq32_223", Vs = "_calendarDayDisabled_1iq32_224", qs = "_calendarDaySelected_1iq32_225", Gs = "_timesHeader_1iq32_256", Us = "_timeRow_1iq32_263", Ys = "_timeButton_1iq32_270", Zs = "_timeButtonSelected_1iq32_271", Ks = "_field_1iq32_294", zs = "_fieldLabel_1iq32_300", Js = "_input_1iq32_306", Xs = "_fieldset_1iq32_327", Qs = "_radioRow_1iq32_336", eo = "_radioOption_1iq32_341", to = "_faqBelowActions_1iq32_362", ro = "_faq_1iq32_362", no = "_faqHeader_1iq32_373", ao = "_faqItem_1iq32_381", so = "_faqQuestion_1iq32_390", oo = "_faqAnswer_1iq32_406", io = "_faqChevron_1iq32_413", lo = "_errorText_1iq32_423", co = "_actionsRow_1iq32_429", uo = "_linkButton_1iq32_437", ho = "_primaryButton_1iq32_454", fo = "_successCheckCircle_1iq32_488", mo = "_summaryCard_1iq32_500", po = "_summaryRow_1iq32_510", go = "_summaryIcon_1iq32_518", g = {
|
|
3404
3428
|
root: ws,
|
|
3405
3429
|
card: ks,
|
|
3406
3430
|
titleLarge: js,
|
|
3407
3431
|
featuresList: Ns,
|
|
3408
|
-
stepLayout:
|
|
3409
|
-
leftColumn:
|
|
3432
|
+
stepLayout: Ss,
|
|
3433
|
+
leftColumn: Is,
|
|
3410
3434
|
introHeader: Es,
|
|
3411
3435
|
schedule: Ps,
|
|
3412
3436
|
subtitleLeft: Ls,
|
|
@@ -3464,79 +3488,79 @@ function Fo({
|
|
|
3464
3488
|
onScheduled: i,
|
|
3465
3489
|
onDone: m,
|
|
3466
3490
|
onReady: f,
|
|
3467
|
-
onError:
|
|
3491
|
+
onError: u
|
|
3468
3492
|
}) {
|
|
3469
|
-
const
|
|
3470
|
-
|
|
3471
|
-
const
|
|
3472
|
-
|
|
3473
|
-
if (
|
|
3493
|
+
const l = Nt(), c = Pe(o), [p, _] = E(_o), [x, I] = E("select"), [D, B] = E(null), [P, S] = E(null), [j, ee] = E(null), [V, ae] = E(r ?? ""), [Z, L] = E(qe(a ?? "")), [se, K] = E(null), [ie, Y] = E(""), [z, q] = E(!1), [J, ue] = E(null), y = U(r);
|
|
3494
|
+
y.current = r;
|
|
3495
|
+
const k = U(a);
|
|
3496
|
+
k.current = a, ce(() => {
|
|
3497
|
+
if (y.current && k.current)
|
|
3474
3498
|
return;
|
|
3475
|
-
let
|
|
3499
|
+
let w = !1;
|
|
3476
3500
|
return (async () => {
|
|
3477
3501
|
try {
|
|
3478
|
-
const
|
|
3502
|
+
const T = await l.getCustomerContact({
|
|
3479
3503
|
opendoorOfferRequestId: e
|
|
3480
3504
|
});
|
|
3481
|
-
if (
|
|
3482
|
-
|
|
3483
|
-
(
|
|
3484
|
-
),
|
|
3485
|
-
(
|
|
3505
|
+
if (w) return;
|
|
3506
|
+
ae(
|
|
3507
|
+
(F) => !y.current && !F && T.fullName ? T.fullName : F
|
|
3508
|
+
), L(
|
|
3509
|
+
(F) => !k.current && !F && T.phoneNumber ? qe(T.phoneNumber) : F
|
|
3486
3510
|
);
|
|
3487
3511
|
} catch {
|
|
3488
3512
|
}
|
|
3489
3513
|
})(), () => {
|
|
3490
|
-
|
|
3514
|
+
w = !0;
|
|
3491
3515
|
};
|
|
3492
|
-
}, [
|
|
3493
|
-
let
|
|
3516
|
+
}, [l, e]), ce(() => {
|
|
3517
|
+
let w = !1;
|
|
3494
3518
|
return (async () => {
|
|
3495
3519
|
try {
|
|
3496
|
-
const
|
|
3497
|
-
if (
|
|
3520
|
+
const T = await l.getAssessmentSlots({ offerId: e });
|
|
3521
|
+
if (w) return;
|
|
3498
3522
|
if (_({
|
|
3499
3523
|
loading: !1,
|
|
3500
3524
|
error: null,
|
|
3501
|
-
availableSlots:
|
|
3502
|
-
isSlotBased:
|
|
3503
|
-
timezone:
|
|
3504
|
-
}),
|
|
3505
|
-
|
|
3525
|
+
availableSlots: T.availableSlots,
|
|
3526
|
+
isSlotBased: T.isSlotBased,
|
|
3527
|
+
timezone: T.timezone
|
|
3528
|
+
}), T.availableSlots.length > 0)
|
|
3529
|
+
ee(
|
|
3506
3530
|
yo(
|
|
3507
|
-
yt(
|
|
3531
|
+
yt(T.availableSlots[0], T.timezone)
|
|
3508
3532
|
)
|
|
3509
3533
|
);
|
|
3510
3534
|
else {
|
|
3511
|
-
const
|
|
3512
|
-
|
|
3535
|
+
const F = /* @__PURE__ */ new Date();
|
|
3536
|
+
ee({ year: F.getFullYear(), month: F.getMonth() });
|
|
3513
3537
|
}
|
|
3514
3538
|
f == null || f();
|
|
3515
|
-
} catch (
|
|
3516
|
-
const
|
|
3517
|
-
if (
|
|
3518
|
-
_((
|
|
3519
|
-
const
|
|
3520
|
-
|
|
3539
|
+
} catch (T) {
|
|
3540
|
+
const F = T instanceof Error ? T : new Error(String(T));
|
|
3541
|
+
if (w) return;
|
|
3542
|
+
_((de) => ({ ...de, loading: !1, error: F }));
|
|
3543
|
+
const $ = /* @__PURE__ */ new Date();
|
|
3544
|
+
ee({ year: $.getFullYear(), month: $.getMonth() }), u == null || u(F);
|
|
3521
3545
|
}
|
|
3522
3546
|
})(), () => {
|
|
3523
|
-
|
|
3547
|
+
w = !0;
|
|
3524
3548
|
};
|
|
3525
|
-
}, [
|
|
3526
|
-
const
|
|
3527
|
-
const
|
|
3528
|
-
for (const
|
|
3529
|
-
const
|
|
3530
|
-
|
|
3549
|
+
}, [l, e]);
|
|
3550
|
+
const C = Ie(() => {
|
|
3551
|
+
const w = /* @__PURE__ */ new Map();
|
|
3552
|
+
for (const T of p.availableSlots) {
|
|
3553
|
+
const F = yt(T, p.timezone), $ = w.get(F) ?? [];
|
|
3554
|
+
$.push(T), w.set(F, $);
|
|
3531
3555
|
}
|
|
3532
|
-
return
|
|
3556
|
+
return w;
|
|
3533
3557
|
}, [p.availableSlots, p.timezone]);
|
|
3534
3558
|
if (p.loading || !j)
|
|
3535
3559
|
return /* @__PURE__ */ t.jsx(
|
|
3536
3560
|
"div",
|
|
3537
3561
|
{
|
|
3538
3562
|
className: g.root,
|
|
3539
|
-
style:
|
|
3563
|
+
style: c,
|
|
3540
3564
|
"data-testid": "schedule-assessment-loading",
|
|
3541
3565
|
children: /* @__PURE__ */ t.jsx("div", { className: g.card, children: /* @__PURE__ */ t.jsx("p", { className: g.subtitle, children: "Loading available times…" }) })
|
|
3542
3566
|
}
|
|
@@ -3546,18 +3570,18 @@ function Fo({
|
|
|
3546
3570
|
"div",
|
|
3547
3571
|
{
|
|
3548
3572
|
className: g.root,
|
|
3549
|
-
style:
|
|
3573
|
+
style: c,
|
|
3550
3574
|
"data-testid": "schedule-assessment-error",
|
|
3551
3575
|
children: /* @__PURE__ */ t.jsx("div", { className: g.card, children: /* @__PURE__ */ t.jsx("p", { className: g.subtitle, children: "We couldn't load available times. Please try again in a few minutes." }) })
|
|
3552
3576
|
}
|
|
3553
3577
|
);
|
|
3554
|
-
if (
|
|
3555
|
-
const
|
|
3578
|
+
if (x === "success") {
|
|
3579
|
+
const w = P ? new Date(P) : null;
|
|
3556
3580
|
return /* @__PURE__ */ t.jsx(
|
|
3557
3581
|
"div",
|
|
3558
3582
|
{
|
|
3559
3583
|
className: g.root,
|
|
3560
|
-
style:
|
|
3584
|
+
style: c,
|
|
3561
3585
|
"data-testid": "schedule-assessment-success",
|
|
3562
3586
|
children: /* @__PURE__ */ t.jsxs("div", { className: g.card, children: [
|
|
3563
3587
|
/* @__PURE__ */ t.jsx("div", { className: g.successCheckCircle, "aria-hidden": "true", children: /* @__PURE__ */ t.jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ t.jsx(
|
|
@@ -3570,17 +3594,17 @@ function Fo({
|
|
|
3570
3594
|
strokeLinejoin: "round"
|
|
3571
3595
|
}
|
|
3572
3596
|
) }) }),
|
|
3573
|
-
/* @__PURE__ */ t.jsx("h2", { className: g.title, children:
|
|
3597
|
+
/* @__PURE__ */ t.jsx("h2", { className: g.title, children: V ? `${bo(V)}, your assessment is scheduled!` : "Your assessment is scheduled!" }),
|
|
3574
3598
|
/* @__PURE__ */ t.jsx("p", { className: g.subtitle, children: "A calendar invite has been sent to your email address." }),
|
|
3575
3599
|
/* @__PURE__ */ t.jsxs("div", { className: g.summaryCard, children: [
|
|
3576
|
-
|
|
3600
|
+
w && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
3577
3601
|
/* @__PURE__ */ t.jsxs("div", { className: g.summaryRow, children: [
|
|
3578
3602
|
/* @__PURE__ */ t.jsx(ko, {}),
|
|
3579
|
-
/* @__PURE__ */ t.jsx("span", { children: vt(
|
|
3603
|
+
/* @__PURE__ */ t.jsx("span", { children: vt(w, p.timezone) })
|
|
3580
3604
|
] }),
|
|
3581
3605
|
/* @__PURE__ */ t.jsxs("div", { className: g.summaryRow, children: [
|
|
3582
3606
|
/* @__PURE__ */ t.jsx(jo, {}),
|
|
3583
|
-
/* @__PURE__ */ t.jsx("span", { children: xt(
|
|
3607
|
+
/* @__PURE__ */ t.jsx("span", { children: xt(w, p.timezone) })
|
|
3584
3608
|
] })
|
|
3585
3609
|
] }),
|
|
3586
3610
|
s && /* @__PURE__ */ t.jsxs("div", { className: g.summaryRow, children: [
|
|
@@ -3601,27 +3625,27 @@ function Fo({
|
|
|
3601
3625
|
}
|
|
3602
3626
|
);
|
|
3603
3627
|
}
|
|
3604
|
-
if (
|
|
3605
|
-
const
|
|
3606
|
-
if (!(!
|
|
3628
|
+
if (x === "confirm") {
|
|
3629
|
+
const w = Z.replace(/\D/g, ""), T = !z && V.trim().length > 0 && w.length >= 10 && se !== null && (!se || ie.trim().length > 0), F = async () => {
|
|
3630
|
+
if (!(!T || !P)) {
|
|
3607
3631
|
q(!0), ue(null);
|
|
3608
3632
|
try {
|
|
3609
|
-
const
|
|
3633
|
+
const $ = se ? `Customer: ${V.trim()}. Access instructions: ${ie.trim()}` : `Customer: ${V.trim()}. No gate code or entry restrictions.`, de = await l.scheduleAssessment({
|
|
3610
3634
|
offerId: e,
|
|
3611
3635
|
selectedInspectionTime: P,
|
|
3612
|
-
reminderPhone:
|
|
3613
|
-
notes:
|
|
3636
|
+
reminderPhone: Z.replace(/\D/g, ""),
|
|
3637
|
+
notes: $
|
|
3614
3638
|
});
|
|
3615
|
-
|
|
3639
|
+
I("success");
|
|
3616
3640
|
try {
|
|
3617
|
-
await (i == null ? void 0 : i(
|
|
3641
|
+
await (i == null ? void 0 : i(de.visitId));
|
|
3618
3642
|
} catch (xe) {
|
|
3619
|
-
const
|
|
3620
|
-
|
|
3643
|
+
const _e = xe instanceof Error ? xe : new Error(String(xe));
|
|
3644
|
+
u == null || u(_e);
|
|
3621
3645
|
}
|
|
3622
|
-
} catch (
|
|
3623
|
-
const
|
|
3624
|
-
ue(
|
|
3646
|
+
} catch ($) {
|
|
3647
|
+
const de = $ instanceof Error ? $ : new Error(String($));
|
|
3648
|
+
ue(de.message), u == null || u(de);
|
|
3625
3649
|
} finally {
|
|
3626
3650
|
q(!1);
|
|
3627
3651
|
}
|
|
@@ -3631,7 +3655,7 @@ function Fo({
|
|
|
3631
3655
|
"div",
|
|
3632
3656
|
{
|
|
3633
3657
|
className: g.root,
|
|
3634
|
-
style:
|
|
3658
|
+
style: c,
|
|
3635
3659
|
"data-testid": "schedule-assessment-confirm",
|
|
3636
3660
|
children: /* @__PURE__ */ t.jsxs("div", { className: g.card, children: [
|
|
3637
3661
|
/* @__PURE__ */ t.jsx("h2", { className: g.title, children: "Confirm your details" }),
|
|
@@ -3642,9 +3666,9 @@ function Fo({
|
|
|
3642
3666
|
{
|
|
3643
3667
|
className: g.input,
|
|
3644
3668
|
type: "text",
|
|
3645
|
-
value:
|
|
3646
|
-
onChange: (
|
|
3647
|
-
disabled:
|
|
3669
|
+
value: V,
|
|
3670
|
+
onChange: ($) => ae($.target.value),
|
|
3671
|
+
disabled: z
|
|
3648
3672
|
}
|
|
3649
3673
|
)
|
|
3650
3674
|
] }),
|
|
@@ -3658,9 +3682,9 @@ function Fo({
|
|
|
3658
3682
|
inputMode: "tel",
|
|
3659
3683
|
autoComplete: "tel",
|
|
3660
3684
|
placeholder: "(555) 555-5555",
|
|
3661
|
-
value:
|
|
3662
|
-
onChange: (
|
|
3663
|
-
disabled:
|
|
3685
|
+
value: Z,
|
|
3686
|
+
onChange: ($) => L(qe($.target.value)),
|
|
3687
|
+
disabled: z
|
|
3664
3688
|
}
|
|
3665
3689
|
)
|
|
3666
3690
|
] }),
|
|
@@ -3673,9 +3697,9 @@ function Fo({
|
|
|
3673
3697
|
{
|
|
3674
3698
|
type: "radio",
|
|
3675
3699
|
name: "gate-code",
|
|
3676
|
-
checked:
|
|
3677
|
-
onChange: () =>
|
|
3678
|
-
disabled:
|
|
3700
|
+
checked: se === !0,
|
|
3701
|
+
onChange: () => K(!0),
|
|
3702
|
+
disabled: z
|
|
3679
3703
|
}
|
|
3680
3704
|
),
|
|
3681
3705
|
/* @__PURE__ */ t.jsx("span", { children: "Yes" })
|
|
@@ -3686,16 +3710,16 @@ function Fo({
|
|
|
3686
3710
|
{
|
|
3687
3711
|
type: "radio",
|
|
3688
3712
|
name: "gate-code",
|
|
3689
|
-
checked:
|
|
3690
|
-
onChange: () =>
|
|
3691
|
-
disabled:
|
|
3713
|
+
checked: se === !1,
|
|
3714
|
+
onChange: () => K(!1),
|
|
3715
|
+
disabled: z
|
|
3692
3716
|
}
|
|
3693
3717
|
),
|
|
3694
3718
|
/* @__PURE__ */ t.jsx("span", { children: "No" })
|
|
3695
3719
|
] })
|
|
3696
3720
|
] })
|
|
3697
3721
|
] }),
|
|
3698
|
-
|
|
3722
|
+
se && /* @__PURE__ */ t.jsxs("label", { className: g.field, children: [
|
|
3699
3723
|
/* @__PURE__ */ t.jsx("span", { className: g.fieldLabel, children: "Please provide access instructions for your home." }),
|
|
3700
3724
|
/* @__PURE__ */ t.jsx(
|
|
3701
3725
|
"input",
|
|
@@ -3703,21 +3727,21 @@ function Fo({
|
|
|
3703
3727
|
className: g.input,
|
|
3704
3728
|
type: "text",
|
|
3705
3729
|
placeholder: "Gate code, directions, etc.",
|
|
3706
|
-
value:
|
|
3707
|
-
onChange: (
|
|
3708
|
-
disabled:
|
|
3730
|
+
value: ie,
|
|
3731
|
+
onChange: ($) => Y($.target.value),
|
|
3732
|
+
disabled: z
|
|
3709
3733
|
}
|
|
3710
3734
|
)
|
|
3711
3735
|
] }),
|
|
3712
|
-
|
|
3736
|
+
J && /* @__PURE__ */ t.jsx("p", { className: g.errorText, children: J }),
|
|
3713
3737
|
/* @__PURE__ */ t.jsxs("div", { className: g.actionsRow, children: [
|
|
3714
3738
|
/* @__PURE__ */ t.jsx(
|
|
3715
3739
|
"button",
|
|
3716
3740
|
{
|
|
3717
3741
|
type: "button",
|
|
3718
3742
|
className: g.linkButton,
|
|
3719
|
-
onClick: () =>
|
|
3720
|
-
disabled:
|
|
3743
|
+
onClick: () => I("select"),
|
|
3744
|
+
disabled: z,
|
|
3721
3745
|
children: "← Back"
|
|
3722
3746
|
}
|
|
3723
3747
|
),
|
|
@@ -3726,23 +3750,23 @@ function Fo({
|
|
|
3726
3750
|
{
|
|
3727
3751
|
type: "button",
|
|
3728
3752
|
className: g.primaryButton,
|
|
3729
|
-
onClick: () => void
|
|
3730
|
-
disabled: !
|
|
3731
|
-
children:
|
|
3753
|
+
onClick: () => void F(),
|
|
3754
|
+
disabled: !T,
|
|
3755
|
+
children: z ? "Scheduling…" : "Schedule"
|
|
3732
3756
|
}
|
|
3733
3757
|
)
|
|
3734
3758
|
] }),
|
|
3735
|
-
/* @__PURE__ */ t.jsx("div", { className: g.faqBelowActions, children: /* @__PURE__ */ t.jsx(Po, { items:
|
|
3759
|
+
/* @__PURE__ */ t.jsx("div", { className: g.faqBelowActions, children: /* @__PURE__ */ t.jsx(Po, { items: Io }) })
|
|
3736
3760
|
] })
|
|
3737
3761
|
}
|
|
3738
3762
|
);
|
|
3739
3763
|
}
|
|
3740
|
-
const
|
|
3764
|
+
const fe = vo(j), G = xo(j), oe = Co(j, C), M = wo(j, C), le = D ? C.get(D) ?? [] : [], ge = le[0] ? vt(new Date(le[0]), p.timezone) : null;
|
|
3741
3765
|
return /* @__PURE__ */ t.jsx(
|
|
3742
3766
|
"div",
|
|
3743
3767
|
{
|
|
3744
3768
|
className: g.root,
|
|
3745
|
-
style:
|
|
3769
|
+
style: c,
|
|
3746
3770
|
"data-testid": "schedule-assessment-flow",
|
|
3747
3771
|
children: /* @__PURE__ */ t.jsx("div", { className: g.card, children: /* @__PURE__ */ t.jsxs("div", { className: g.stepLayout, children: [
|
|
3748
3772
|
/* @__PURE__ */ t.jsxs("div", { className: g.leftColumn, children: [
|
|
@@ -3750,10 +3774,10 @@ function Fo({
|
|
|
3750
3774
|
/* @__PURE__ */ t.jsx("h2", { className: g.titleLarge, children: "Schedule your assessment" }),
|
|
3751
3775
|
/* @__PURE__ */ t.jsx("p", { className: g.subtitleLeft, children: "Pick a time that works for you." })
|
|
3752
3776
|
] }),
|
|
3753
|
-
/* @__PURE__ */ t.jsx("div", { className: g.featuresList, children:
|
|
3754
|
-
/* @__PURE__ */ t.jsx("p", { className: g.featureTitle, children:
|
|
3755
|
-
/* @__PURE__ */ t.jsx("p", { className: g.featureDescription, children:
|
|
3756
|
-
] },
|
|
3777
|
+
/* @__PURE__ */ t.jsx("div", { className: g.featuresList, children: So.map((w) => /* @__PURE__ */ t.jsxs("div", { className: g.feature, children: [
|
|
3778
|
+
/* @__PURE__ */ t.jsx("p", { className: g.featureTitle, children: w.title }),
|
|
3779
|
+
/* @__PURE__ */ t.jsx("p", { className: g.featureDescription, children: w.description })
|
|
3780
|
+
] }, w.title)) })
|
|
3757
3781
|
] }),
|
|
3758
3782
|
/* @__PURE__ */ t.jsxs("div", { className: g.schedule, children: [
|
|
3759
3783
|
/* @__PURE__ */ t.jsxs("div", { className: g.calendarHeader, children: [
|
|
@@ -3762,61 +3786,61 @@ function Fo({
|
|
|
3762
3786
|
{
|
|
3763
3787
|
type: "button",
|
|
3764
3788
|
className: g.calendarNavButton,
|
|
3765
|
-
onClick: () =>
|
|
3766
|
-
disabled: !
|
|
3789
|
+
onClick: () => ee(Ct(j, -1)),
|
|
3790
|
+
disabled: !oe,
|
|
3767
3791
|
"aria-label": "Previous month",
|
|
3768
3792
|
children: "‹"
|
|
3769
3793
|
}
|
|
3770
3794
|
),
|
|
3771
|
-
/* @__PURE__ */ t.jsx("span", { className: g.calendarMonthLabel, children:
|
|
3795
|
+
/* @__PURE__ */ t.jsx("span", { className: g.calendarMonthLabel, children: G }),
|
|
3772
3796
|
/* @__PURE__ */ t.jsx(
|
|
3773
3797
|
"button",
|
|
3774
3798
|
{
|
|
3775
3799
|
type: "button",
|
|
3776
3800
|
className: g.calendarNavButton,
|
|
3777
|
-
onClick: () =>
|
|
3778
|
-
disabled: !
|
|
3801
|
+
onClick: () => ee(Ct(j, 1)),
|
|
3802
|
+
disabled: !M,
|
|
3779
3803
|
"aria-label": "Next month",
|
|
3780
3804
|
children: "›"
|
|
3781
3805
|
}
|
|
3782
3806
|
)
|
|
3783
3807
|
] }),
|
|
3784
3808
|
/* @__PURE__ */ t.jsxs("div", { className: g.calendarGrid, children: [
|
|
3785
|
-
["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"].map((
|
|
3786
|
-
|
|
3787
|
-
const
|
|
3809
|
+
["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"].map((w) => /* @__PURE__ */ t.jsx("div", { className: g.calendarDayHeader, children: w }, w)),
|
|
3810
|
+
fe.map((w, T) => {
|
|
3811
|
+
const F = w ? C.has(w.key) : !1, $ = !!w && w.key === D;
|
|
3788
3812
|
return /* @__PURE__ */ t.jsx(
|
|
3789
3813
|
"button",
|
|
3790
3814
|
{
|
|
3791
3815
|
type: "button",
|
|
3792
|
-
className:
|
|
3816
|
+
className: $ ? g.calendarDaySelected : F ? g.calendarDayAvailable : g.calendarDayDisabled,
|
|
3793
3817
|
onClick: () => {
|
|
3794
|
-
|
|
3818
|
+
w && F && (B(w.key), S(null));
|
|
3795
3819
|
},
|
|
3796
|
-
disabled: !
|
|
3797
|
-
"aria-pressed":
|
|
3798
|
-
children:
|
|
3820
|
+
disabled: !F,
|
|
3821
|
+
"aria-pressed": !!$,
|
|
3822
|
+
children: w ? w.day : ""
|
|
3799
3823
|
},
|
|
3800
|
-
|
|
3824
|
+
w ? w.key : `empty-${G}-${T}`
|
|
3801
3825
|
);
|
|
3802
3826
|
})
|
|
3803
3827
|
] }),
|
|
3804
|
-
|
|
3828
|
+
ge && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
3805
3829
|
/* @__PURE__ */ t.jsxs("p", { className: g.timesHeader, children: [
|
|
3806
3830
|
"Available times for ",
|
|
3807
|
-
|
|
3831
|
+
ge
|
|
3808
3832
|
] }),
|
|
3809
|
-
/* @__PURE__ */ t.jsx("div", { className: g.timeRow, children:
|
|
3810
|
-
const
|
|
3833
|
+
/* @__PURE__ */ t.jsx("div", { className: g.timeRow, children: le.map((w) => {
|
|
3834
|
+
const T = w === P;
|
|
3811
3835
|
return /* @__PURE__ */ t.jsx(
|
|
3812
3836
|
"button",
|
|
3813
3837
|
{
|
|
3814
3838
|
type: "button",
|
|
3815
|
-
className:
|
|
3816
|
-
onClick: () =>
|
|
3817
|
-
children: xt(new Date(
|
|
3839
|
+
className: T ? g.timeButtonSelected : g.timeButton,
|
|
3840
|
+
onClick: () => S(w),
|
|
3841
|
+
children: xt(new Date(w), p.timezone)
|
|
3818
3842
|
},
|
|
3819
|
-
|
|
3843
|
+
w
|
|
3820
3844
|
);
|
|
3821
3845
|
}) })
|
|
3822
3846
|
] }),
|
|
@@ -3825,7 +3849,7 @@ function Fo({
|
|
|
3825
3849
|
{
|
|
3826
3850
|
type: "button",
|
|
3827
3851
|
className: g.primaryButton,
|
|
3828
|
-
onClick: () =>
|
|
3852
|
+
onClick: () => I("confirm"),
|
|
3829
3853
|
disabled: !P,
|
|
3830
3854
|
children: "Continue"
|
|
3831
3855
|
}
|
|
@@ -3877,11 +3901,11 @@ function Ct(e, r) {
|
|
|
3877
3901
|
}
|
|
3878
3902
|
function vo({ year: e, month: r }) {
|
|
3879
3903
|
const a = new Date(Date.UTC(e, r, 1)).getUTCDay(), s = new Date(Date.UTC(e, r + 1, 0)).getUTCDate(), o = Math.ceil((a + s) / 7) * 7, i = [], m = String(e).padStart(4, "0"), f = String(r + 1).padStart(2, "0");
|
|
3880
|
-
for (let
|
|
3881
|
-
const
|
|
3882
|
-
|
|
3883
|
-
key: `${m}-${f}-${String(
|
|
3884
|
-
day:
|
|
3904
|
+
for (let u = 0; u < o; u++) {
|
|
3905
|
+
const l = u - a + 1;
|
|
3906
|
+
l < 1 || l > s ? i.push(null) : i.push({
|
|
3907
|
+
key: `${m}-${f}-${String(l).padStart(2, "0")}`,
|
|
3908
|
+
day: l
|
|
3885
3909
|
});
|
|
3886
3910
|
}
|
|
3887
3911
|
return i;
|
|
@@ -3941,7 +3965,7 @@ function No() {
|
|
|
3941
3965
|
/* @__PURE__ */ t.jsx("circle", { cx: "8", cy: "6.5", r: "1.5" })
|
|
3942
3966
|
] });
|
|
3943
3967
|
}
|
|
3944
|
-
const
|
|
3968
|
+
const So = [
|
|
3945
3969
|
{
|
|
3946
3970
|
title: "No extra preparation needed",
|
|
3947
3971
|
description: "No need to fix, clean, or stage your home."
|
|
@@ -3954,7 +3978,7 @@ const Io = [
|
|
|
3954
3978
|
title: "30 minutes or less",
|
|
3955
3979
|
description: "Examine the home's exterior and take a quick look inside."
|
|
3956
3980
|
}
|
|
3957
|
-
],
|
|
3981
|
+
], Io = [
|
|
3958
3982
|
{
|
|
3959
3983
|
title: "What are you looking for during the assessment?",
|
|
3960
3984
|
body: "We will verify the property's condition matches your contract. We'll check the home's exterior and interior, including major systems, structure, and overall condition. This helps us confirm all details are accurate before closing."
|