@opendoor/partner-sdk-client-react 1.2.1-beta.104.1 → 1.2.1-beta.105.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/DtcProvider.d.ts +1 -0
- package/dist/client-react/src/components/DtcOnboardingFlow/DtcProvider.d.ts.map +1 -1
- package/dist/client-react/src/components/DtcOnboardingFlow/index.d.ts +21 -0
- package/dist/client-react/src/components/DtcOnboardingFlow/index.d.ts.map +1 -1
- package/dist/index.js +895 -884
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { createPortal as
|
|
1
|
+
import xt, { createContext as Ue, useState as S, useEffect as oe, useContext as De, useRef as G, useMemo as Ie, useCallback as Ee, useLayoutEffect as Ut } from "react";
|
|
2
|
+
import { createPortal as Gt } from "react-dom";
|
|
3
3
|
var qe = { exports: {} }, je = {};
|
|
4
4
|
/*
|
|
5
5
|
object-assign
|
|
@@ -7,7 +7,7 @@ object-assign
|
|
|
7
7
|
@license MIT
|
|
8
8
|
*/
|
|
9
9
|
var Fe, st;
|
|
10
|
-
function
|
|
10
|
+
function Ct() {
|
|
11
11
|
if (st) return Fe;
|
|
12
12
|
st = 1;
|
|
13
13
|
var e = Object.getOwnPropertySymbols, r = Object.prototype.hasOwnProperty, a = Object.prototype.propertyIsEnumerable;
|
|
@@ -25,31 +25,31 @@ function xt() {
|
|
|
25
25
|
return !1;
|
|
26
26
|
for (var _ = {}, f = 0; f < 10; f++)
|
|
27
27
|
_["_" + String.fromCharCode(f)] = f;
|
|
28
|
-
var
|
|
29
|
-
return _[
|
|
28
|
+
var u = Object.getOwnPropertyNames(_).map(function(d) {
|
|
29
|
+
return _[d];
|
|
30
30
|
});
|
|
31
|
-
if (
|
|
31
|
+
if (u.join("") !== "0123456789")
|
|
32
32
|
return !1;
|
|
33
33
|
var h = {};
|
|
34
|
-
return "abcdefghijklmnopqrst".split("").forEach(function(
|
|
35
|
-
h[
|
|
34
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(d) {
|
|
35
|
+
h[d] = d;
|
|
36
36
|
}), Object.keys(Object.assign({}, h)).join("") === "abcdefghijklmnopqrst";
|
|
37
37
|
} catch {
|
|
38
38
|
return !1;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
return Fe = o() ? Object.assign : function(i, _) {
|
|
42
|
-
for (var f,
|
|
43
|
-
f = Object(arguments[
|
|
42
|
+
for (var f, u = s(i), h, d = 1; d < arguments.length; d++) {
|
|
43
|
+
f = Object(arguments[d]);
|
|
44
44
|
for (var m in f)
|
|
45
|
-
r.call(f, m) && (
|
|
45
|
+
r.call(f, m) && (u[m] = f[m]);
|
|
46
46
|
if (e) {
|
|
47
47
|
h = e(f);
|
|
48
48
|
for (var g = 0; g < h.length; g++)
|
|
49
|
-
a.call(f, h[g]) && (
|
|
49
|
+
a.call(f, h[g]) && (u[h[g]] = f[h[g]]);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
return
|
|
52
|
+
return u;
|
|
53
53
|
}, Fe;
|
|
54
54
|
}
|
|
55
55
|
/** @license React v17.0.2
|
|
@@ -61,21 +61,21 @@ function xt() {
|
|
|
61
61
|
* LICENSE file in the root directory of this source tree.
|
|
62
62
|
*/
|
|
63
63
|
var ot;
|
|
64
|
-
function
|
|
64
|
+
function Yt() {
|
|
65
65
|
if (ot) return je;
|
|
66
|
-
ot = 1,
|
|
67
|
-
var e =
|
|
66
|
+
ot = 1, Ct();
|
|
67
|
+
var e = xt, r = 60103;
|
|
68
68
|
if (je.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
|
|
69
69
|
var a = Symbol.for;
|
|
70
70
|
r = a("react.element"), je.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 _(f,
|
|
74
|
-
var
|
|
75
|
-
h !== void 0 && (g = "" + h),
|
|
76
|
-
for (
|
|
77
|
-
if (f && f.defaultProps) for (
|
|
78
|
-
return { $$typeof: r, type: f, key: g, ref:
|
|
73
|
+
function _(f, u, h) {
|
|
74
|
+
var d, m = {}, g = null, x = null;
|
|
75
|
+
h !== void 0 && (g = "" + h), u.key !== void 0 && (g = "" + u.key), u.ref !== void 0 && (x = u.ref);
|
|
76
|
+
for (d in u) o.call(u, d) && !i.hasOwnProperty(d) && (m[d] = u[d]);
|
|
77
|
+
if (f && f.defaultProps) for (d in u = f.defaultProps, u) m[d] === void 0 && (m[d] = u[d]);
|
|
78
|
+
return { $$typeof: r, type: f, key: g, ref: x, props: m, _owner: s.current };
|
|
79
79
|
}
|
|
80
80
|
return je.jsx = _, je.jsxs = _, je;
|
|
81
81
|
}
|
|
@@ -89,56 +89,56 @@ var We = {};
|
|
|
89
89
|
* LICENSE file in the root directory of this source tree.
|
|
90
90
|
*/
|
|
91
91
|
var it;
|
|
92
|
-
function
|
|
92
|
+
function Zt() {
|
|
93
93
|
return it || (it = 1, function(e) {
|
|
94
94
|
process.env.NODE_ENV !== "production" && function() {
|
|
95
|
-
var r =
|
|
95
|
+
var r = xt, a = Ct(), s = 60103, o = 60106;
|
|
96
96
|
e.Fragment = 60107;
|
|
97
|
-
var i = 60108, _ = 60114, f = 60109,
|
|
97
|
+
var i = 60108, _ = 60114, f = 60109, u = 60110, h = 60112, d = 60113, m = 60120, g = 60115, x = 60116, E = 60121, k = 60122, W = 60117, P = 60129, Y = 60131;
|
|
98
98
|
if (typeof Symbol == "function" && Symbol.for) {
|
|
99
|
-
var
|
|
100
|
-
s =
|
|
99
|
+
var j = Symbol.for;
|
|
100
|
+
s = j("react.element"), o = j("react.portal"), e.Fragment = j("react.fragment"), i = j("react.strict_mode"), _ = j("react.profiler"), f = j("react.provider"), u = j("react.context"), h = j("react.forward_ref"), d = j("react.suspense"), m = j("react.suspense_list"), g = j("react.memo"), x = j("react.lazy"), E = j("react.block"), k = j("react.server.block"), W = j("react.fundamental"), j("react.scope"), j("react.opaque.id"), P = j("react.debug_trace_mode"), j("react.offscreen"), Y = j("react.legacy_hidden");
|
|
101
101
|
}
|
|
102
|
-
var
|
|
103
|
-
function
|
|
102
|
+
var ne = typeof Symbol == "function" && Symbol.iterator, M = "@@iterator";
|
|
103
|
+
function ie(n) {
|
|
104
104
|
if (n === null || typeof n != "object")
|
|
105
105
|
return null;
|
|
106
|
-
var c =
|
|
106
|
+
var c = ne && n[ne] || n[M];
|
|
107
107
|
return typeof c == "function" ? c : null;
|
|
108
108
|
}
|
|
109
|
-
var
|
|
110
|
-
function
|
|
109
|
+
var q = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
110
|
+
function A(n) {
|
|
111
111
|
{
|
|
112
|
-
for (var c = arguments.length, b = new Array(c > 1 ? c - 1 : 0),
|
|
113
|
-
b[
|
|
114
|
-
|
|
112
|
+
for (var c = arguments.length, b = new Array(c > 1 ? c - 1 : 0), N = 1; N < c; N++)
|
|
113
|
+
b[N - 1] = arguments[N];
|
|
114
|
+
$("error", n, b);
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function $(n, c, b) {
|
|
118
118
|
{
|
|
119
|
-
var
|
|
119
|
+
var N = q.ReactDebugCurrentFrame, H = N.getStackAddendum();
|
|
120
120
|
H !== "" && (c += "%s", b = b.concat([H]));
|
|
121
|
-
var F = b.map(function(
|
|
122
|
-
return "" +
|
|
121
|
+
var F = b.map(function(T) {
|
|
122
|
+
return "" + T;
|
|
123
123
|
});
|
|
124
124
|
F.unshift("Warning: " + c), Function.prototype.apply.call(console[n], console, F);
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
var
|
|
128
|
-
function
|
|
129
|
-
return !!(typeof n == "string" || typeof n == "function" || n === e.Fragment || n === _ || n ===
|
|
127
|
+
var Z = !1;
|
|
128
|
+
function ae(n) {
|
|
129
|
+
return !!(typeof n == "string" || typeof n == "function" || n === e.Fragment || n === _ || n === P || n === i || n === d || n === m || n === Y || Z || typeof n == "object" && n !== null && (n.$$typeof === x || n.$$typeof === g || n.$$typeof === f || n.$$typeof === u || n.$$typeof === h || n.$$typeof === W || n.$$typeof === E || n[0] === k));
|
|
130
130
|
}
|
|
131
|
-
function
|
|
132
|
-
var
|
|
133
|
-
return n.displayName || (
|
|
131
|
+
function z(n, c, b) {
|
|
132
|
+
var N = c.displayName || c.name || "";
|
|
133
|
+
return n.displayName || (N !== "" ? b + "(" + N + ")" : b);
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function K(n) {
|
|
136
136
|
return n.displayName || "Context";
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function V(n) {
|
|
139
139
|
if (n == null)
|
|
140
140
|
return null;
|
|
141
|
-
if (typeof n.tag == "number" &&
|
|
141
|
+
if (typeof n.tag == "number" && A("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 Yt() {
|
|
|
151
151
|
return "Profiler";
|
|
152
152
|
case i:
|
|
153
153
|
return "StrictMode";
|
|
154
|
-
case
|
|
154
|
+
case d:
|
|
155
155
|
return "Suspense";
|
|
156
156
|
case m:
|
|
157
157
|
return "SuspenseList";
|
|
158
158
|
}
|
|
159
159
|
if (typeof n == "object")
|
|
160
160
|
switch (n.$$typeof) {
|
|
161
|
-
case
|
|
161
|
+
case u:
|
|
162
162
|
var c = n;
|
|
163
|
-
return
|
|
163
|
+
return K(c) + ".Consumer";
|
|
164
164
|
case f:
|
|
165
165
|
var b = n;
|
|
166
|
-
return
|
|
166
|
+
return K(b._context) + ".Provider";
|
|
167
167
|
case h:
|
|
168
|
-
return
|
|
168
|
+
return z(n, n.render, "ForwardRef");
|
|
169
169
|
case g:
|
|
170
|
-
return
|
|
171
|
-
case
|
|
172
|
-
return
|
|
173
|
-
case
|
|
174
|
-
var
|
|
170
|
+
return V(n.type);
|
|
171
|
+
case E:
|
|
172
|
+
return V(n._render);
|
|
173
|
+
case x: {
|
|
174
|
+
var N = n, H = N._payload, F = N._init;
|
|
175
175
|
try {
|
|
176
|
-
return
|
|
176
|
+
return V(F(H));
|
|
177
177
|
} catch {
|
|
178
178
|
return null;
|
|
179
179
|
}
|
|
@@ -181,18 +181,18 @@ function Yt() {
|
|
|
181
181
|
}
|
|
182
182
|
return null;
|
|
183
183
|
}
|
|
184
|
-
var
|
|
185
|
-
function
|
|
184
|
+
var se = 0, ue, y, C, v, O, Q, pe;
|
|
185
|
+
function he() {
|
|
186
186
|
}
|
|
187
|
-
|
|
188
|
-
function
|
|
187
|
+
he.__reactDisabledLog = !0;
|
|
188
|
+
function I() {
|
|
189
189
|
{
|
|
190
|
-
if (
|
|
191
|
-
|
|
190
|
+
if (se === 0) {
|
|
191
|
+
ue = console.log, y = console.info, C = console.warn, v = console.error, O = console.group, Q = console.groupCollapsed, pe = console.groupEnd;
|
|
192
192
|
var n = {
|
|
193
193
|
configurable: !0,
|
|
194
194
|
enumerable: !0,
|
|
195
|
-
value:
|
|
195
|
+
value: he,
|
|
196
196
|
writable: !0
|
|
197
197
|
};
|
|
198
198
|
Object.defineProperties(console, {
|
|
@@ -205,12 +205,12 @@ function Yt() {
|
|
|
205
205
|
groupEnd: n
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
|
-
|
|
208
|
+
se++;
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
|
-
function
|
|
211
|
+
function R() {
|
|
212
212
|
{
|
|
213
|
-
if (
|
|
213
|
+
if (se--, se === 0) {
|
|
214
214
|
var n = {
|
|
215
215
|
configurable: !0,
|
|
216
216
|
enumerable: !0,
|
|
@@ -218,119 +218,119 @@ function Yt() {
|
|
|
218
218
|
};
|
|
219
219
|
Object.defineProperties(console, {
|
|
220
220
|
log: a({}, n, {
|
|
221
|
-
value:
|
|
221
|
+
value: ue
|
|
222
222
|
}),
|
|
223
223
|
info: a({}, n, {
|
|
224
224
|
value: y
|
|
225
225
|
}),
|
|
226
226
|
warn: a({}, n, {
|
|
227
|
-
value:
|
|
227
|
+
value: C
|
|
228
228
|
}),
|
|
229
229
|
error: a({}, n, {
|
|
230
|
-
value:
|
|
230
|
+
value: v
|
|
231
231
|
}),
|
|
232
232
|
group: a({}, n, {
|
|
233
|
-
value:
|
|
233
|
+
value: O
|
|
234
234
|
}),
|
|
235
235
|
groupCollapsed: a({}, n, {
|
|
236
|
-
value:
|
|
236
|
+
value: Q
|
|
237
237
|
}),
|
|
238
238
|
groupEnd: a({}, n, {
|
|
239
239
|
value: pe
|
|
240
240
|
})
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
|
-
|
|
243
|
+
se < 0 && A("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
|
-
var
|
|
247
|
-
function
|
|
246
|
+
var U = q.ReactCurrentDispatcher, B;
|
|
247
|
+
function le(n, c, b) {
|
|
248
248
|
{
|
|
249
|
-
if (
|
|
249
|
+
if (B === void 0)
|
|
250
250
|
try {
|
|
251
251
|
throw Error();
|
|
252
252
|
} catch (H) {
|
|
253
|
-
var
|
|
254
|
-
|
|
253
|
+
var N = H.stack.trim().match(/\n( *(at )?)/);
|
|
254
|
+
B = N && N[1] || "";
|
|
255
255
|
}
|
|
256
256
|
return `
|
|
257
|
-
` +
|
|
257
|
+
` + B + n;
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
|
-
var
|
|
260
|
+
var fe = !1, ge;
|
|
261
261
|
{
|
|
262
262
|
var Oe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
263
263
|
ge = new Oe();
|
|
264
264
|
}
|
|
265
265
|
function ye(n, c) {
|
|
266
|
-
if (!n ||
|
|
266
|
+
if (!n || fe)
|
|
267
267
|
return "";
|
|
268
268
|
{
|
|
269
269
|
var b = ge.get(n);
|
|
270
270
|
if (b !== void 0)
|
|
271
271
|
return b;
|
|
272
272
|
}
|
|
273
|
-
var
|
|
274
|
-
|
|
273
|
+
var N;
|
|
274
|
+
fe = !0;
|
|
275
275
|
var H = Error.prepareStackTrace;
|
|
276
276
|
Error.prepareStackTrace = void 0;
|
|
277
277
|
var F;
|
|
278
|
-
F =
|
|
278
|
+
F = U.current, U.current = null, I();
|
|
279
279
|
try {
|
|
280
280
|
if (c) {
|
|
281
|
-
var
|
|
281
|
+
var T = function() {
|
|
282
282
|
throw Error();
|
|
283
283
|
};
|
|
284
|
-
if (Object.defineProperty(
|
|
284
|
+
if (Object.defineProperty(T.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(
|
|
290
|
+
Reflect.construct(T, []);
|
|
291
291
|
} catch (be) {
|
|
292
|
-
|
|
292
|
+
N = be;
|
|
293
293
|
}
|
|
294
|
-
Reflect.construct(n, [],
|
|
294
|
+
Reflect.construct(n, [], T);
|
|
295
295
|
} else {
|
|
296
296
|
try {
|
|
297
|
-
|
|
297
|
+
T.call();
|
|
298
298
|
} catch (be) {
|
|
299
|
-
|
|
299
|
+
N = be;
|
|
300
300
|
}
|
|
301
|
-
n.call(
|
|
301
|
+
n.call(T.prototype);
|
|
302
302
|
}
|
|
303
303
|
} else {
|
|
304
304
|
try {
|
|
305
305
|
throw Error();
|
|
306
306
|
} catch (be) {
|
|
307
|
-
|
|
307
|
+
N = be;
|
|
308
308
|
}
|
|
309
309
|
n();
|
|
310
310
|
}
|
|
311
311
|
} catch (be) {
|
|
312
|
-
if (be &&
|
|
312
|
+
if (be && N && typeof be.stack == "string") {
|
|
313
313
|
for (var L = be.stack.split(`
|
|
314
|
-
`),
|
|
315
|
-
`),
|
|
316
|
-
|
|
317
|
-
for (;
|
|
318
|
-
if (L[
|
|
319
|
-
if (
|
|
314
|
+
`), ce = N.stack.split(`
|
|
315
|
+
`), X = L.length - 1, te = ce.length - 1; X >= 1 && te >= 0 && L[X] !== ce[te]; )
|
|
316
|
+
te--;
|
|
317
|
+
for (; X >= 1 && te >= 0; X--, te--)
|
|
318
|
+
if (L[X] !== ce[te]) {
|
|
319
|
+
if (X !== 1 || te !== 1)
|
|
320
320
|
do
|
|
321
|
-
if (
|
|
321
|
+
if (X--, te--, te < 0 || L[X] !== ce[te]) {
|
|
322
322
|
var _e = `
|
|
323
|
-
` + L[
|
|
323
|
+
` + L[X].replace(" at new ", " at ");
|
|
324
324
|
return typeof n == "function" && ge.set(n, _e), _e;
|
|
325
325
|
}
|
|
326
|
-
while (
|
|
326
|
+
while (X >= 1 && te >= 0);
|
|
327
327
|
break;
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
330
|
} finally {
|
|
331
|
-
|
|
331
|
+
fe = !1, U.current = F, R(), Error.prepareStackTrace = H;
|
|
332
332
|
}
|
|
333
|
-
var ke = n ? n.displayName || n.name : "", at = ke ?
|
|
333
|
+
var ke = n ? n.displayName || n.name : "", at = ke ? le(ke) : "";
|
|
334
334
|
return typeof n == "function" && ge.set(n, at), at;
|
|
335
335
|
}
|
|
336
336
|
function Pe(n, c, b) {
|
|
@@ -340,71 +340,71 @@ function Yt() {
|
|
|
340
340
|
var c = n.prototype;
|
|
341
341
|
return !!(c && c.isReactComponent);
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function w(n, c, b) {
|
|
344
344
|
if (n == null)
|
|
345
345
|
return "";
|
|
346
346
|
if (typeof n == "function")
|
|
347
347
|
return ye(n, ve(n));
|
|
348
348
|
if (typeof n == "string")
|
|
349
|
-
return
|
|
349
|
+
return le(n);
|
|
350
350
|
switch (n) {
|
|
351
|
-
case
|
|
352
|
-
return
|
|
351
|
+
case d:
|
|
352
|
+
return le("Suspense");
|
|
353
353
|
case m:
|
|
354
|
-
return
|
|
354
|
+
return le("SuspenseList");
|
|
355
355
|
}
|
|
356
356
|
if (typeof n == "object")
|
|
357
357
|
switch (n.$$typeof) {
|
|
358
358
|
case h:
|
|
359
359
|
return Pe(n.render);
|
|
360
360
|
case g:
|
|
361
|
-
return
|
|
362
|
-
case
|
|
361
|
+
return w(n.type, c, b);
|
|
362
|
+
case E:
|
|
363
363
|
return Pe(n._render);
|
|
364
|
-
case
|
|
365
|
-
var
|
|
364
|
+
case x: {
|
|
365
|
+
var N = n, H = N._payload, F = N._init;
|
|
366
366
|
try {
|
|
367
|
-
return
|
|
367
|
+
return w(F(H), c, b);
|
|
368
368
|
} catch {
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
372
|
return "";
|
|
373
373
|
}
|
|
374
|
-
var
|
|
374
|
+
var J = {}, ee = q.ReactDebugCurrentFrame;
|
|
375
375
|
function xe(n) {
|
|
376
376
|
if (n) {
|
|
377
|
-
var c = n._owner, b =
|
|
378
|
-
|
|
377
|
+
var c = n._owner, b = w(n.type, n._source, c ? c.type : null);
|
|
378
|
+
ee.setExtraStackFrame(b);
|
|
379
379
|
} else
|
|
380
|
-
|
|
380
|
+
ee.setExtraStackFrame(null);
|
|
381
381
|
}
|
|
382
|
-
function Ce(n, c, b,
|
|
382
|
+
function Ce(n, c, b, N, H) {
|
|
383
383
|
{
|
|
384
384
|
var F = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
385
|
-
for (var
|
|
386
|
-
if (F(n,
|
|
385
|
+
for (var T in n)
|
|
386
|
+
if (F(n, T)) {
|
|
387
387
|
var L = void 0;
|
|
388
388
|
try {
|
|
389
|
-
if (typeof n[
|
|
390
|
-
var
|
|
391
|
-
throw
|
|
389
|
+
if (typeof n[T] != "function") {
|
|
390
|
+
var ce = Error((N || "React class") + ": " + b + " type `" + T + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof n[T] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
391
|
+
throw ce.name = "Invariant Violation", ce;
|
|
392
392
|
}
|
|
393
|
-
L = n[
|
|
394
|
-
} catch (
|
|
395
|
-
L =
|
|
393
|
+
L = n[T](c, T, N, b, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
394
|
+
} catch (X) {
|
|
395
|
+
L = X;
|
|
396
396
|
}
|
|
397
|
-
L && !(L instanceof Error) && (xe(H),
|
|
397
|
+
L && !(L instanceof Error) && (xe(H), A("%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, T, typeof L), xe(null)), L instanceof Error && !(L.message in J) && (J[L.message] = !0, xe(H), A("Failed %s type: %s", b, L.message), xe(null));
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
|
-
var Ne =
|
|
401
|
+
var Ne = q.ReactCurrentOwner, Re = Object.prototype.hasOwnProperty, St = {
|
|
402
402
|
key: !0,
|
|
403
403
|
ref: !0,
|
|
404
404
|
__self: !0,
|
|
405
405
|
__source: !0
|
|
406
406
|
}, ze, Je;
|
|
407
|
-
function
|
|
407
|
+
function Pt(n) {
|
|
408
408
|
if (Re.call(n, "ref")) {
|
|
409
409
|
var c = Object.getOwnPropertyDescriptor(n, "ref").get;
|
|
410
410
|
if (c && c.isReactWarning)
|
|
@@ -412,7 +412,7 @@ function Yt() {
|
|
|
412
412
|
}
|
|
413
413
|
return n.ref !== void 0;
|
|
414
414
|
}
|
|
415
|
-
function
|
|
415
|
+
function Lt(n) {
|
|
416
416
|
if (Re.call(n, "key")) {
|
|
417
417
|
var c = Object.getOwnPropertyDescriptor(n, "key").get;
|
|
418
418
|
if (c && c.isReactWarning)
|
|
@@ -420,13 +420,13 @@ function Yt() {
|
|
|
420
420
|
}
|
|
421
421
|
return n.key !== void 0;
|
|
422
422
|
}
|
|
423
|
-
function
|
|
423
|
+
function Tt(n, c) {
|
|
424
424
|
typeof n.ref == "string" && Ne.current;
|
|
425
425
|
}
|
|
426
|
-
function
|
|
426
|
+
function Dt(n, c) {
|
|
427
427
|
{
|
|
428
428
|
var b = function() {
|
|
429
|
-
ze || (ze = !0,
|
|
429
|
+
ze || (ze = !0, A("%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)", c));
|
|
430
430
|
};
|
|
431
431
|
b.isReactWarning = !0, Object.defineProperty(n, "key", {
|
|
432
432
|
get: b,
|
|
@@ -437,7 +437,7 @@ function Yt() {
|
|
|
437
437
|
function At(n, c) {
|
|
438
438
|
{
|
|
439
439
|
var b = function() {
|
|
440
|
-
Je || (Je = !0,
|
|
440
|
+
Je || (Je = !0, A("%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)", c));
|
|
441
441
|
};
|
|
442
442
|
b.isReactWarning = !0, Object.defineProperty(n, "ref", {
|
|
443
443
|
get: b,
|
|
@@ -445,7 +445,7 @@ function Yt() {
|
|
|
445
445
|
});
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
|
-
var
|
|
448
|
+
var Ot = function(n, c, b, N, H, F, T) {
|
|
449
449
|
var L = {
|
|
450
450
|
// This tag allows us to uniquely identify this as a React Element
|
|
451
451
|
$$typeof: s,
|
|
@@ -453,7 +453,7 @@ function Yt() {
|
|
|
453
453
|
type: n,
|
|
454
454
|
key: c,
|
|
455
455
|
ref: b,
|
|
456
|
-
props:
|
|
456
|
+
props: T,
|
|
457
457
|
// Record the component responsible for creating this element.
|
|
458
458
|
_owner: F
|
|
459
459
|
};
|
|
@@ -466,7 +466,7 @@ function Yt() {
|
|
|
466
466
|
configurable: !1,
|
|
467
467
|
enumerable: !1,
|
|
468
468
|
writable: !1,
|
|
469
|
-
value:
|
|
469
|
+
value: N
|
|
470
470
|
}), Object.defineProperty(L, "_source", {
|
|
471
471
|
configurable: !1,
|
|
472
472
|
enumerable: !1,
|
|
@@ -474,28 +474,28 @@ function Yt() {
|
|
|
474
474
|
value: H
|
|
475
475
|
}), Object.freeze && (Object.freeze(L.props), Object.freeze(L)), L;
|
|
476
476
|
};
|
|
477
|
-
function
|
|
477
|
+
function Rt(n, c, b, N, H) {
|
|
478
478
|
{
|
|
479
|
-
var F,
|
|
480
|
-
b !== void 0 && (L = "" + b),
|
|
479
|
+
var F, T = {}, L = null, ce = null;
|
|
480
|
+
b !== void 0 && (L = "" + b), Lt(c) && (L = "" + c.key), Pt(c) && (ce = c.ref, Tt(c, H));
|
|
481
481
|
for (F in c)
|
|
482
|
-
Re.call(c, F) && !
|
|
482
|
+
Re.call(c, F) && !St.hasOwnProperty(F) && (T[F] = c[F]);
|
|
483
483
|
if (n && n.defaultProps) {
|
|
484
|
-
var
|
|
485
|
-
for (F in
|
|
486
|
-
|
|
484
|
+
var X = n.defaultProps;
|
|
485
|
+
for (F in X)
|
|
486
|
+
T[F] === void 0 && (T[F] = X[F]);
|
|
487
487
|
}
|
|
488
|
-
if (L ||
|
|
489
|
-
var
|
|
490
|
-
L &&
|
|
488
|
+
if (L || ce) {
|
|
489
|
+
var te = typeof n == "function" ? n.displayName || n.name || "Unknown" : n;
|
|
490
|
+
L && Dt(T, te), ce && At(T, te);
|
|
491
491
|
}
|
|
492
|
-
return
|
|
492
|
+
return Ot(n, L, ce, H, N, Ne.current, T);
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
|
-
var Be =
|
|
495
|
+
var Be = q.ReactCurrentOwner, Xe = q.ReactDebugCurrentFrame;
|
|
496
496
|
function we(n) {
|
|
497
497
|
if (n) {
|
|
498
|
-
var c = n._owner, b =
|
|
498
|
+
var c = n._owner, b = w(n.type, n._source, c ? c.type : null);
|
|
499
499
|
Xe.setExtraStackFrame(b);
|
|
500
500
|
} else
|
|
501
501
|
Xe.setExtraStackFrame(null);
|
|
@@ -508,7 +508,7 @@ function Yt() {
|
|
|
508
508
|
function Qe() {
|
|
509
509
|
{
|
|
510
510
|
if (Be.current) {
|
|
511
|
-
var n =
|
|
511
|
+
var n = V(Be.current.type);
|
|
512
512
|
if (n)
|
|
513
513
|
return `
|
|
514
514
|
|
|
@@ -517,11 +517,11 @@ Check the render method of \`` + n + "`.";
|
|
|
517
517
|
return "";
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
|
-
function
|
|
520
|
+
function Bt(n) {
|
|
521
521
|
return "";
|
|
522
522
|
}
|
|
523
523
|
var et = {};
|
|
524
|
-
function
|
|
524
|
+
function Mt(n) {
|
|
525
525
|
{
|
|
526
526
|
var c = Qe();
|
|
527
527
|
if (!c) {
|
|
@@ -538,12 +538,12 @@ Check the top-level render call using <` + b + ">.");
|
|
|
538
538
|
if (!n._store || n._store.validated || n.key != null)
|
|
539
539
|
return;
|
|
540
540
|
n._store.validated = !0;
|
|
541
|
-
var b =
|
|
541
|
+
var b = Mt(c);
|
|
542
542
|
if (et[b])
|
|
543
543
|
return;
|
|
544
544
|
et[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 " + V(n._owner.type) + "."), we(n), A('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), we(null);
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
549
|
function rt(n, c) {
|
|
@@ -552,20 +552,20 @@ Check the top-level render call using <` + b + ">.");
|
|
|
552
552
|
return;
|
|
553
553
|
if (Array.isArray(n))
|
|
554
554
|
for (var b = 0; b < n.length; b++) {
|
|
555
|
-
var
|
|
556
|
-
$e(
|
|
555
|
+
var N = n[b];
|
|
556
|
+
$e(N) && tt(N, c);
|
|
557
557
|
}
|
|
558
558
|
else if ($e(n))
|
|
559
559
|
n._store && (n._store.validated = !0);
|
|
560
560
|
else if (n) {
|
|
561
|
-
var H =
|
|
561
|
+
var H = ie(n);
|
|
562
562
|
if (typeof H == "function" && H !== n.entries)
|
|
563
|
-
for (var F = H.call(n),
|
|
564
|
-
$e(
|
|
563
|
+
for (var F = H.call(n), T; !(T = F.next()).done; )
|
|
564
|
+
$e(T.value) && tt(T.value, c);
|
|
565
565
|
}
|
|
566
566
|
}
|
|
567
567
|
}
|
|
568
|
-
function
|
|
568
|
+
function $t(n) {
|
|
569
569
|
{
|
|
570
570
|
var c = n.type;
|
|
571
571
|
if (c == null || typeof c == "string")
|
|
@@ -580,76 +580,76 @@ Check the top-level render call using <` + b + ">.");
|
|
|
580
580
|
else
|
|
581
581
|
return;
|
|
582
582
|
if (b) {
|
|
583
|
-
var
|
|
584
|
-
Ce(b, n.props, "prop",
|
|
583
|
+
var N = V(c);
|
|
584
|
+
Ce(b, n.props, "prop", N, n);
|
|
585
585
|
} else if (c.PropTypes !== void 0 && !Me) {
|
|
586
586
|
Me = !0;
|
|
587
|
-
var H =
|
|
588
|
-
|
|
587
|
+
var H = V(c);
|
|
588
|
+
A("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", H || "Unknown");
|
|
589
589
|
}
|
|
590
|
-
typeof c.getDefaultProps == "function" && !c.getDefaultProps.isReactClassApproved &&
|
|
590
|
+
typeof c.getDefaultProps == "function" && !c.getDefaultProps.isReactClassApproved && A("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
591
591
|
}
|
|
592
592
|
}
|
|
593
|
-
function
|
|
593
|
+
function Ft(n) {
|
|
594
594
|
{
|
|
595
595
|
for (var c = Object.keys(n.props), b = 0; b < c.length; b++) {
|
|
596
|
-
var
|
|
597
|
-
if (
|
|
598
|
-
we(n),
|
|
596
|
+
var N = c[b];
|
|
597
|
+
if (N !== "children" && N !== "key") {
|
|
598
|
+
we(n), A("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", N), we(null);
|
|
599
599
|
break;
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
|
-
n.ref !== null && (we(n),
|
|
602
|
+
n.ref !== null && (we(n), A("Invalid attribute `ref` supplied to `React.Fragment`."), we(null));
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
|
-
function nt(n, c, b,
|
|
605
|
+
function nt(n, c, b, N, H, F) {
|
|
606
606
|
{
|
|
607
|
-
var
|
|
608
|
-
if (!
|
|
607
|
+
var T = ae(n);
|
|
608
|
+
if (!T) {
|
|
609
609
|
var L = "";
|
|
610
610
|
(n === void 0 || typeof n == "object" && n !== null && Object.keys(n).length === 0) && (L += " 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
|
|
612
|
-
|
|
613
|
-
var
|
|
614
|
-
n === null ?
|
|
611
|
+
var ce = Bt();
|
|
612
|
+
ce ? L += ce : L += Qe();
|
|
613
|
+
var X;
|
|
614
|
+
n === null ? X = "null" : Array.isArray(n) ? X = "array" : n !== void 0 && n.$$typeof === s ? (X = "<" + (V(n.type) || "Unknown") + " />", L = " Did you accidentally export a JSX literal instead of a component?") : X = typeof n, A("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", X, L);
|
|
615
615
|
}
|
|
616
|
-
var
|
|
617
|
-
if (
|
|
618
|
-
return
|
|
619
|
-
if (
|
|
616
|
+
var te = Rt(n, c, b, H, F);
|
|
617
|
+
if (te == null)
|
|
618
|
+
return te;
|
|
619
|
+
if (T) {
|
|
620
620
|
var _e = c.children;
|
|
621
621
|
if (_e !== void 0)
|
|
622
|
-
if (
|
|
622
|
+
if (N)
|
|
623
623
|
if (Array.isArray(_e)) {
|
|
624
624
|
for (var ke = 0; ke < _e.length; ke++)
|
|
625
625
|
rt(_e[ke], n);
|
|
626
626
|
Object.freeze && Object.freeze(_e);
|
|
627
627
|
} else
|
|
628
|
-
|
|
628
|
+
A("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
630
|
rt(_e, n);
|
|
631
631
|
}
|
|
632
|
-
return n === e.Fragment ?
|
|
632
|
+
return n === e.Fragment ? Ft(te) : $t(te), te;
|
|
633
633
|
}
|
|
634
634
|
}
|
|
635
|
-
function
|
|
635
|
+
function Wt(n, c, b) {
|
|
636
636
|
return nt(n, c, b, !0);
|
|
637
637
|
}
|
|
638
|
-
function
|
|
638
|
+
function Ht(n, c, b) {
|
|
639
639
|
return nt(n, c, b, !1);
|
|
640
640
|
}
|
|
641
|
-
var
|
|
642
|
-
e.jsx =
|
|
641
|
+
var Vt = Ht, qt = Wt;
|
|
642
|
+
e.jsx = Vt, e.jsxs = qt;
|
|
643
643
|
}();
|
|
644
644
|
}(We)), We;
|
|
645
645
|
}
|
|
646
|
-
process.env.NODE_ENV === "production" ? qe.exports =
|
|
646
|
+
process.env.NODE_ENV === "production" ? qe.exports = Yt() : qe.exports = Zt();
|
|
647
647
|
var t = qe.exports;
|
|
648
|
-
const
|
|
648
|
+
const Kt = {
|
|
649
649
|
production: "https://journey.apps.opendoor.com/_journey/api/v1/events",
|
|
650
650
|
staging: "https://journey.apps-staging.opendoor.com/_journey/api/v1/events"
|
|
651
|
-
},
|
|
652
|
-
function
|
|
651
|
+
}, zt = "partner-sdk", Jt = "1.0", Xt = 5e3, Qt = 20, er = 512, tr = 5, lt = 500, ct = "od_sdk_aid";
|
|
652
|
+
function rr() {
|
|
653
653
|
try {
|
|
654
654
|
const e = localStorage.getItem(ct);
|
|
655
655
|
if (e)
|
|
@@ -660,7 +660,7 @@ function tr() {
|
|
|
660
660
|
return;
|
|
661
661
|
}
|
|
662
662
|
}
|
|
663
|
-
function
|
|
663
|
+
function nr() {
|
|
664
664
|
return typeof window > "u" ? { url: "", eventOrigin: "CLIENT" } : {
|
|
665
665
|
url: window.location.href,
|
|
666
666
|
userAgent: navigator.userAgent,
|
|
@@ -676,17 +676,17 @@ function rr() {
|
|
|
676
676
|
language: Array.from(navigator.languages ?? [])
|
|
677
677
|
};
|
|
678
678
|
}
|
|
679
|
-
function
|
|
679
|
+
function ar(e) {
|
|
680
680
|
let r = 0;
|
|
681
681
|
for (const a of e)
|
|
682
682
|
r += a.length;
|
|
683
683
|
return r / 1024;
|
|
684
684
|
}
|
|
685
|
-
function
|
|
686
|
-
return
|
|
685
|
+
function sr(e) {
|
|
686
|
+
return ar(e) >= er - 50;
|
|
687
687
|
}
|
|
688
|
-
async function
|
|
689
|
-
let a =
|
|
688
|
+
async function or(e, r) {
|
|
689
|
+
let a = tr;
|
|
690
690
|
for (; a > 0; )
|
|
691
691
|
try {
|
|
692
692
|
const s = await fetch(e, r);
|
|
@@ -703,13 +703,13 @@ async function sr(e, r) {
|
|
|
703
703
|
break;
|
|
704
704
|
}
|
|
705
705
|
}
|
|
706
|
-
class
|
|
706
|
+
class ir {
|
|
707
707
|
constructor(r) {
|
|
708
708
|
this.buffer = [], this.destroyed = !1, this.onVisibilityChange = () => {
|
|
709
709
|
document.visibilityState === "hidden" && this.flush(!0);
|
|
710
710
|
}, this.onBeforeUnload = () => {
|
|
711
711
|
this.flush(!0);
|
|
712
|
-
}, this.endpoint =
|
|
712
|
+
}, this.endpoint = Kt[r], this.anonymousId = rr(), this.timer = setInterval(() => this.flush(), Xt), typeof document < "u" && document.addEventListener("visibilitychange", this.onVisibilityChange), typeof window < "u" && window.addEventListener("beforeunload", this.onBeforeUnload);
|
|
713
713
|
}
|
|
714
714
|
trackPlatform(r) {
|
|
715
715
|
this.enqueue({ platform: r });
|
|
@@ -724,14 +724,14 @@ class or {
|
|
|
724
724
|
if (this.buffer.length === 0)
|
|
725
725
|
return;
|
|
726
726
|
const a = `{"eventWrappers":[${this.buffer.join(",")}]}`;
|
|
727
|
-
this.buffer = [],
|
|
727
|
+
this.buffer = [], or(this.endpoint, {
|
|
728
728
|
method: "POST",
|
|
729
729
|
credentials: "omit",
|
|
730
730
|
keepalive: r,
|
|
731
731
|
headers: {
|
|
732
732
|
"Content-Type": "application/json",
|
|
733
|
-
"X-Journey-Client-Name":
|
|
734
|
-
"X-Journey-Client-Version":
|
|
733
|
+
"X-Journey-Client-Name": zt,
|
|
734
|
+
"X-Journey-Client-Version": Jt
|
|
735
735
|
},
|
|
736
736
|
body: a
|
|
737
737
|
});
|
|
@@ -744,11 +744,11 @@ class or {
|
|
|
744
744
|
return;
|
|
745
745
|
const a = {
|
|
746
746
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
747
|
-
websiteSource:
|
|
747
|
+
websiteSource: nr(),
|
|
748
748
|
anonymousId: this.anonymousId,
|
|
749
749
|
...r
|
|
750
750
|
};
|
|
751
|
-
this.buffer.push(JSON.stringify(a)), (this.buffer.length >=
|
|
751
|
+
this.buffer.push(JSON.stringify(a)), (this.buffer.length >= Qt || sr(this.buffer)) && this.flush();
|
|
752
752
|
}
|
|
753
753
|
}
|
|
754
754
|
const Ge = {
|
|
@@ -760,35 +760,35 @@ const Ge = {
|
|
|
760
760
|
},
|
|
761
761
|
destroy() {
|
|
762
762
|
}
|
|
763
|
-
}, Ye = Ue(null),
|
|
763
|
+
}, Ye = Ue(null), wt = Ue(Ge), Do = ({
|
|
764
764
|
client: e,
|
|
765
765
|
children: r
|
|
766
766
|
}) => {
|
|
767
|
-
const [a, s] =
|
|
768
|
-
return
|
|
769
|
-
const o = new
|
|
767
|
+
const [a, s] = S(Ge);
|
|
768
|
+
return oe(() => {
|
|
769
|
+
const o = new ir(e.environment);
|
|
770
770
|
return s(o), () => {
|
|
771
771
|
o.destroy();
|
|
772
772
|
};
|
|
773
|
-
}, [e]), /* @__PURE__ */ t.jsx(Ye.Provider, { value: e, children: /* @__PURE__ */ t.jsx(
|
|
774
|
-
},
|
|
775
|
-
const e =
|
|
773
|
+
}, [e]), /* @__PURE__ */ t.jsx(Ye.Provider, { value: e, children: /* @__PURE__ */ t.jsx(wt.Provider, { value: a, children: r }) });
|
|
774
|
+
}, kt = () => {
|
|
775
|
+
const e = De(Ye);
|
|
776
776
|
if (!e)
|
|
777
777
|
throw new Error(
|
|
778
778
|
"useOpendoorClient must be used within an <OpendoorProvider>. Wrap your component tree with <OpendoorProvider client={client}>."
|
|
779
779
|
);
|
|
780
780
|
return e;
|
|
781
|
-
}, Ze = () =>
|
|
782
|
-
function
|
|
783
|
-
const a = Ze(), s =
|
|
781
|
+
}, Ze = () => De(wt);
|
|
782
|
+
function jt(e, r = {}) {
|
|
783
|
+
const a = Ze(), s = G(a);
|
|
784
784
|
s.current = a;
|
|
785
|
-
const o =
|
|
786
|
-
return
|
|
785
|
+
const o = G(null), i = G(!1);
|
|
786
|
+
return oe(() => {
|
|
787
787
|
const _ = o.current;
|
|
788
788
|
if (!_ || !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 === Ge) return;
|
|
793
793
|
i.current = !0, s.current.trackPlatform({
|
|
794
794
|
inputViewEvent: { targetName: e }
|
|
@@ -845,7 +845,7 @@ const He = {
|
|
|
845
845
|
colorCardBorder: "#e5e7eb",
|
|
846
846
|
colorCardBorderSelected: "#235ca3",
|
|
847
847
|
colorCardBackgroundSelected: "#f0f5ff"
|
|
848
|
-
},
|
|
848
|
+
}, lr = {
|
|
849
849
|
/** Default theme — pill-shaped inputs, bold borders, Opendoor blue */
|
|
850
850
|
default: He,
|
|
851
851
|
/** Minimal theme — subtle borders, square corners, lighter shadows */
|
|
@@ -881,22 +881,22 @@ const He = {
|
|
|
881
881
|
buttonPaddingX: "32px"
|
|
882
882
|
}
|
|
883
883
|
};
|
|
884
|
-
function
|
|
885
|
-
const r =
|
|
884
|
+
function cr(e) {
|
|
885
|
+
const r = lr[(e == null ? void 0 : e.theme) ?? "default"];
|
|
886
886
|
return e != null && e.variables ? { ...r, ...e.variables } : r;
|
|
887
887
|
}
|
|
888
888
|
function Se(e) {
|
|
889
|
-
const r =
|
|
889
|
+
const r = cr(e), a = {};
|
|
890
890
|
for (const [s, o] of Object.entries(r)) {
|
|
891
891
|
const i = s.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
892
892
|
a[`--od-${i}`] = o;
|
|
893
893
|
}
|
|
894
894
|
return a;
|
|
895
895
|
}
|
|
896
|
-
const
|
|
897
|
-
attribution:
|
|
898
|
-
text:
|
|
899
|
-
},
|
|
896
|
+
const ur = "_attribution_11y4r_7", dr = "_text_11y4r_16", ut = {
|
|
897
|
+
attribution: ur,
|
|
898
|
+
text: dr
|
|
899
|
+
}, hr = () => /* @__PURE__ */ t.jsx(
|
|
900
900
|
"svg",
|
|
901
901
|
{
|
|
902
902
|
width: "75",
|
|
@@ -915,33 +915,33 @@ const cr = "_attribution_11y4r_7", ur = "_text_11y4r_16", ut = {
|
|
|
915
915
|
)
|
|
916
916
|
}
|
|
917
917
|
);
|
|
918
|
-
function
|
|
918
|
+
function fr() {
|
|
919
919
|
return /* @__PURE__ */ t.jsxs("div", { className: ut.attribution, "data-testid": "od-attribution", children: [
|
|
920
920
|
/* @__PURE__ */ t.jsx("span", { className: ut.text, children: "Powered by" }),
|
|
921
|
-
/* @__PURE__ */ t.jsx(
|
|
921
|
+
/* @__PURE__ */ t.jsx(hr, {})
|
|
922
922
|
] });
|
|
923
923
|
}
|
|
924
|
-
const
|
|
925
|
-
container:
|
|
926
|
-
inputSection:
|
|
927
|
-
inputWrapper:
|
|
928
|
-
input:
|
|
929
|
-
inputIcon:
|
|
930
|
-
button:
|
|
931
|
-
spinner:
|
|
932
|
-
suggestions:
|
|
933
|
-
errorState:
|
|
934
|
-
suggestion:
|
|
935
|
-
error:
|
|
936
|
-
errorIcon:
|
|
937
|
-
errorBorder:
|
|
938
|
-
manualLink:
|
|
939
|
-
manualForm:
|
|
940
|
-
manualFormField:
|
|
941
|
-
manualFormLabel:
|
|
942
|
-
manualFormInput:
|
|
943
|
-
formRow:
|
|
944
|
-
submitButton:
|
|
924
|
+
const mr = "_container_tu90h_8", pr = "_inputSection_tu90h_16", gr = "_inputWrapper_tu90h_22", _r = "_input_tu90h_16", br = "_inputIcon_tu90h_63", yr = "_button_tu90h_80", vr = "_spinner_tu90h_121", xr = "_suggestions_tu90h_136", Cr = "_errorState_tu90h_150", wr = "_suggestion_tu90h_136", kr = "_error_tu90h_150", jr = "_errorIcon_tu90h_199", Nr = "_errorBorder_tu90h_213", Ir = "_manualLink_tu90h_223", Er = "_manualForm_tu90h_245", Sr = "_manualFormField_tu90h_260", Pr = "_manualFormLabel_tu90h_264", Lr = "_manualFormInput_tu90h_273", Tr = "_formRow_tu90h_294", Dr = "_submitButton_tu90h_302", D = {
|
|
925
|
+
container: mr,
|
|
926
|
+
inputSection: pr,
|
|
927
|
+
inputWrapper: gr,
|
|
928
|
+
input: _r,
|
|
929
|
+
inputIcon: br,
|
|
930
|
+
button: yr,
|
|
931
|
+
spinner: vr,
|
|
932
|
+
suggestions: xr,
|
|
933
|
+
errorState: Cr,
|
|
934
|
+
suggestion: wr,
|
|
935
|
+
error: kr,
|
|
936
|
+
errorIcon: jr,
|
|
937
|
+
errorBorder: Nr,
|
|
938
|
+
manualLink: Ir,
|
|
939
|
+
manualForm: Er,
|
|
940
|
+
manualFormField: Sr,
|
|
941
|
+
manualFormLabel: Pr,
|
|
942
|
+
manualFormInput: Lr,
|
|
943
|
+
formRow: Tr,
|
|
944
|
+
submitButton: Dr
|
|
945
945
|
}, dt = () => /* @__PURE__ */ t.jsx(
|
|
946
946
|
"svg",
|
|
947
947
|
{
|
|
@@ -987,7 +987,7 @@ function ht(e) {
|
|
|
987
987
|
const r = [e.street1];
|
|
988
988
|
return e.street2 && (r[0] += ` ${e.street2}`), r.push(`${e.city}, ${e.state} ${e.postalCode}`), r.join(", ");
|
|
989
989
|
}
|
|
990
|
-
function
|
|
990
|
+
function Ao({
|
|
991
991
|
onAddressSelect: e,
|
|
992
992
|
enableAddressSuggestions: r = !0,
|
|
993
993
|
debounceMs: a = 300,
|
|
@@ -996,130 +996,130 @@ function Do({
|
|
|
996
996
|
placeholderText: i = "Enter your home address",
|
|
997
997
|
buttonText: _ = "Get cash offer",
|
|
998
998
|
showButton: f = !0,
|
|
999
|
-
buttonIcon:
|
|
999
|
+
buttonIcon: u,
|
|
1000
1000
|
inputIcon: h,
|
|
1001
|
-
manualEntryText:
|
|
1001
|
+
manualEntryText: d = "Enter address manually instead",
|
|
1002
1002
|
appearance: m,
|
|
1003
1003
|
onReady: g,
|
|
1004
|
-
onChange:
|
|
1005
|
-
onValidationError:
|
|
1006
|
-
onAddressSuggestionsStart:
|
|
1004
|
+
onChange: x,
|
|
1005
|
+
onValidationError: E,
|
|
1006
|
+
onAddressSuggestionsStart: k,
|
|
1007
1007
|
onAddressSuggestionsComplete: W,
|
|
1008
|
-
onError:
|
|
1008
|
+
onError: P
|
|
1009
1009
|
}) {
|
|
1010
|
-
const
|
|
1010
|
+
const Y = kt(), j = Ze(), ne = Se(m), [M, ie] = S(""), [q, A] = S([]), [$, Z] = S(!1), [ae, z] = S(!1), [K, V] = S(null), [se, ue] = S(!1), [y, C] = S(!1), [v, O] = S({
|
|
1011
1011
|
street1: "",
|
|
1012
1012
|
street2: "",
|
|
1013
1013
|
city: "",
|
|
1014
1014
|
state: "",
|
|
1015
1015
|
postalCode: ""
|
|
1016
|
-
}),
|
|
1016
|
+
}), Q = G(null), pe = jt("partner-sdk-address-input", {
|
|
1017
1017
|
immediate: !0
|
|
1018
|
-
}),
|
|
1019
|
-
|
|
1020
|
-
const
|
|
1021
|
-
|
|
1022
|
-
const
|
|
1023
|
-
|
|
1024
|
-
const
|
|
1025
|
-
|
|
1018
|
+
}), he = G(P);
|
|
1019
|
+
he.current = P;
|
|
1020
|
+
const I = G(k);
|
|
1021
|
+
I.current = k;
|
|
1022
|
+
const R = G(W);
|
|
1023
|
+
R.current = W;
|
|
1024
|
+
const U = G(null), B = $ && !ae && M.trim().length >= 3 && q.length === 0 && !y;
|
|
1025
|
+
oe(() => {
|
|
1026
1026
|
g == null || g();
|
|
1027
|
-
}, []),
|
|
1028
|
-
if (!r ||
|
|
1029
|
-
|
|
1027
|
+
}, []), oe(() => {
|
|
1028
|
+
if (!r || M.trim().length < 3 || se) {
|
|
1029
|
+
M.trim().length === 0 && (A([]), Z(!1), V(null));
|
|
1030
1030
|
return;
|
|
1031
1031
|
}
|
|
1032
|
-
|
|
1033
|
-
const
|
|
1034
|
-
var
|
|
1035
|
-
(
|
|
1032
|
+
z(!0), V(null);
|
|
1033
|
+
const w = setTimeout(async () => {
|
|
1034
|
+
var J, ee, xe;
|
|
1035
|
+
(J = I.current) == null || J.call(I, M);
|
|
1036
1036
|
try {
|
|
1037
|
-
const Ce = await
|
|
1038
|
-
|
|
1037
|
+
const Ce = await Y.getAddressSuggestions(M);
|
|
1038
|
+
A(Ce.addresses), Z(!0), (ee = R.current) == null || ee.call(R, Ce.addresses);
|
|
1039
1039
|
} catch (Ce) {
|
|
1040
1040
|
const Ne = Ce instanceof Error ? Ce : new Error("Failed to fetch address suggestions");
|
|
1041
|
-
|
|
1041
|
+
V(Ne.message), A([]), Z(!0), (xe = he.current) == null || xe.call(he, Ne);
|
|
1042
1042
|
} finally {
|
|
1043
|
-
|
|
1043
|
+
z(!1);
|
|
1044
1044
|
}
|
|
1045
1045
|
}, a);
|
|
1046
|
-
return () => clearTimeout(
|
|
1047
|
-
}, [
|
|
1048
|
-
const
|
|
1049
|
-
|
|
1046
|
+
return () => clearTimeout(w);
|
|
1047
|
+
}, [M, se, r, a, Y]), oe(() => {
|
|
1048
|
+
const w = (J) => {
|
|
1049
|
+
U.current && !U.current.contains(J.target) && Q.current && !Q.current.contains(J.target) && Z(!1);
|
|
1050
1050
|
};
|
|
1051
|
-
return document.addEventListener("mousedown",
|
|
1051
|
+
return document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w);
|
|
1052
1052
|
}, []);
|
|
1053
|
-
const
|
|
1054
|
-
const
|
|
1055
|
-
|
|
1056
|
-
},
|
|
1057
|
-
|
|
1053
|
+
const le = (w) => {
|
|
1054
|
+
const J = w.target.value;
|
|
1055
|
+
ie(J), ue(!1), x == null || x({ street1: J });
|
|
1056
|
+
}, fe = async (w) => {
|
|
1057
|
+
ue(!0), ie(ht(w)), A([]), Z(!1), V(null), x == null || x(w), j.trackSell({
|
|
1058
1058
|
addressEntryV2: {
|
|
1059
|
-
street1:
|
|
1060
|
-
city:
|
|
1061
|
-
state:
|
|
1062
|
-
postalCode:
|
|
1063
|
-
unit:
|
|
1059
|
+
street1: w.street1,
|
|
1060
|
+
city: w.city,
|
|
1061
|
+
state: w.state,
|
|
1062
|
+
postalCode: w.postalCode,
|
|
1063
|
+
unit: w.street2,
|
|
1064
1064
|
sourcePage: "partner-sdk"
|
|
1065
1065
|
}
|
|
1066
1066
|
});
|
|
1067
1067
|
try {
|
|
1068
|
-
await e(
|
|
1069
|
-
} catch (
|
|
1070
|
-
const
|
|
1071
|
-
|
|
1068
|
+
await e(w);
|
|
1069
|
+
} catch (J) {
|
|
1070
|
+
const ee = J instanceof Error ? J : new Error("Failed to process address");
|
|
1071
|
+
V(ee.message), P == null || P(ee), ie(""), ue(!1);
|
|
1072
1072
|
}
|
|
1073
1073
|
}, ge = () => {
|
|
1074
|
-
|
|
1074
|
+
j.trackPlatform({
|
|
1075
1075
|
inputFocusEvent: { targetName: "partner-sdk-address-input" }
|
|
1076
|
-
}),
|
|
1076
|
+
}), q.length > 0 && M.length > 0 && Z(!0);
|
|
1077
1077
|
}, Oe = () => {
|
|
1078
|
-
|
|
1078
|
+
j.trackPlatform({
|
|
1079
1079
|
linkClickEvent: { targetName: "partner-sdk-manual-entry" }
|
|
1080
|
-
}),
|
|
1081
|
-
}, ye = (
|
|
1082
|
-
const
|
|
1083
|
-
|
|
1084
|
-
street1:
|
|
1085
|
-
...
|
|
1086
|
-
city:
|
|
1087
|
-
state:
|
|
1088
|
-
postalCode:
|
|
1080
|
+
}), C(!0), Z(!1);
|
|
1081
|
+
}, ye = (w, J) => {
|
|
1082
|
+
const ee = { ...v, [w]: J };
|
|
1083
|
+
O(ee), x == null || x({
|
|
1084
|
+
street1: ee.street1,
|
|
1085
|
+
...ee.street2 ? { street2: ee.street2 } : {},
|
|
1086
|
+
city: ee.city,
|
|
1087
|
+
state: ee.state,
|
|
1088
|
+
postalCode: ee.postalCode
|
|
1089
1089
|
});
|
|
1090
1090
|
}, Pe = async () => {
|
|
1091
|
-
if (!
|
|
1092
|
-
const
|
|
1093
|
-
|
|
1091
|
+
if (!v.street1 || !v.city || !v.state || !v.postalCode) {
|
|
1092
|
+
const w = "Please fill in all required fields";
|
|
1093
|
+
V(w), E == null || E(w);
|
|
1094
1094
|
return;
|
|
1095
1095
|
}
|
|
1096
|
-
|
|
1096
|
+
z(!0), V(null);
|
|
1097
1097
|
try {
|
|
1098
|
-
const
|
|
1099
|
-
street1:
|
|
1100
|
-
...
|
|
1101
|
-
city:
|
|
1102
|
-
state:
|
|
1103
|
-
postalCode:
|
|
1098
|
+
const w = {
|
|
1099
|
+
street1: v.street1,
|
|
1100
|
+
...v.street2 ? { street2: v.street2 } : {},
|
|
1101
|
+
city: v.city,
|
|
1102
|
+
state: v.state,
|
|
1103
|
+
postalCode: v.postalCode
|
|
1104
1104
|
};
|
|
1105
|
-
|
|
1105
|
+
j.trackSell({
|
|
1106
1106
|
addressEntryV2: {
|
|
1107
|
-
street1:
|
|
1108
|
-
city:
|
|
1109
|
-
state:
|
|
1110
|
-
postalCode:
|
|
1111
|
-
unit:
|
|
1107
|
+
street1: w.street1,
|
|
1108
|
+
city: w.city,
|
|
1109
|
+
state: w.state,
|
|
1110
|
+
postalCode: w.postalCode,
|
|
1111
|
+
unit: w.street2,
|
|
1112
1112
|
sourcePage: "partner-sdk"
|
|
1113
1113
|
}
|
|
1114
|
-
}), await e(
|
|
1115
|
-
} catch (
|
|
1116
|
-
const
|
|
1117
|
-
|
|
1114
|
+
}), await e(w);
|
|
1115
|
+
} catch (w) {
|
|
1116
|
+
const J = w instanceof Error ? w : new Error("Failed to submit address");
|
|
1117
|
+
V(J.message), P == null || P(J);
|
|
1118
1118
|
} finally {
|
|
1119
|
-
|
|
1119
|
+
z(!1);
|
|
1120
1120
|
}
|
|
1121
|
-
}, ve = !!
|
|
1122
|
-
return /* @__PURE__ */ t.jsxs("div", { ref: pe, className: D.container, style:
|
|
1121
|
+
}, ve = !!K;
|
|
1122
|
+
return /* @__PURE__ */ t.jsxs("div", { ref: pe, className: D.container, style: ne, children: [
|
|
1123
1123
|
y ? /* @__PURE__ */ t.jsxs("div", { className: D.manualForm, children: [
|
|
1124
1124
|
/* @__PURE__ */ t.jsxs("div", { className: D.manualFormField, children: [
|
|
1125
1125
|
/* @__PURE__ */ t.jsx("label", { className: D.manualFormLabel, htmlFor: "ae-street1", children: "Street Address *" }),
|
|
@@ -1129,8 +1129,8 @@ function Do({
|
|
|
1129
1129
|
id: "ae-street1",
|
|
1130
1130
|
type: "text",
|
|
1131
1131
|
className: D.manualFormInput,
|
|
1132
|
-
value:
|
|
1133
|
-
onChange: (
|
|
1132
|
+
value: v.street1,
|
|
1133
|
+
onChange: (w) => ye("street1", w.target.value),
|
|
1134
1134
|
disabled: o,
|
|
1135
1135
|
placeholder: "123 Main St"
|
|
1136
1136
|
}
|
|
@@ -1144,8 +1144,8 @@ function Do({
|
|
|
1144
1144
|
id: "ae-street2",
|
|
1145
1145
|
type: "text",
|
|
1146
1146
|
className: D.manualFormInput,
|
|
1147
|
-
value:
|
|
1148
|
-
onChange: (
|
|
1147
|
+
value: v.street2,
|
|
1148
|
+
onChange: (w) => ye("street2", w.target.value),
|
|
1149
1149
|
disabled: o,
|
|
1150
1150
|
placeholder: "Apt 4B"
|
|
1151
1151
|
}
|
|
@@ -1159,8 +1159,8 @@ function Do({
|
|
|
1159
1159
|
id: "ae-city",
|
|
1160
1160
|
type: "text",
|
|
1161
1161
|
className: D.manualFormInput,
|
|
1162
|
-
value:
|
|
1163
|
-
onChange: (
|
|
1162
|
+
value: v.city,
|
|
1163
|
+
onChange: (w) => ye("city", w.target.value),
|
|
1164
1164
|
disabled: o,
|
|
1165
1165
|
placeholder: "Austin"
|
|
1166
1166
|
}
|
|
@@ -1175,8 +1175,8 @@ function Do({
|
|
|
1175
1175
|
id: "ae-state",
|
|
1176
1176
|
type: "text",
|
|
1177
1177
|
className: D.manualFormInput,
|
|
1178
|
-
value:
|
|
1179
|
-
onChange: (
|
|
1178
|
+
value: v.state,
|
|
1179
|
+
onChange: (w) => ye("state", w.target.value),
|
|
1180
1180
|
disabled: o,
|
|
1181
1181
|
placeholder: "TX",
|
|
1182
1182
|
maxLength: 2
|
|
@@ -1191,8 +1191,8 @@ function Do({
|
|
|
1191
1191
|
id: "ae-postalCode",
|
|
1192
1192
|
type: "text",
|
|
1193
1193
|
className: D.manualFormInput,
|
|
1194
|
-
value:
|
|
1195
|
-
onChange: (
|
|
1194
|
+
value: v.postalCode,
|
|
1195
|
+
onChange: (w) => ye("postalCode", w.target.value),
|
|
1196
1196
|
disabled: o,
|
|
1197
1197
|
placeholder: "78701",
|
|
1198
1198
|
maxLength: 5
|
|
@@ -1200,7 +1200,7 @@ function Do({
|
|
|
1200
1200
|
)
|
|
1201
1201
|
] })
|
|
1202
1202
|
] }),
|
|
1203
|
-
|
|
1203
|
+
K && /* @__PURE__ */ t.jsx("div", { className: D.error, children: K }),
|
|
1204
1204
|
/* @__PURE__ */ t.jsxs(
|
|
1205
1205
|
"button",
|
|
1206
1206
|
{
|
|
@@ -1210,7 +1210,7 @@ function Do({
|
|
|
1210
1210
|
disabled: o,
|
|
1211
1211
|
children: [
|
|
1212
1212
|
/* @__PURE__ */ t.jsx("span", { children: _ }),
|
|
1213
|
-
|
|
1213
|
+
u || /* @__PURE__ */ t.jsx(dt, {})
|
|
1214
1214
|
]
|
|
1215
1215
|
}
|
|
1216
1216
|
)
|
|
@@ -1223,10 +1223,10 @@ function Do({
|
|
|
1223
1223
|
/* @__PURE__ */ t.jsx(
|
|
1224
1224
|
"input",
|
|
1225
1225
|
{
|
|
1226
|
-
ref:
|
|
1226
|
+
ref: Q,
|
|
1227
1227
|
type: "text",
|
|
1228
|
-
value:
|
|
1229
|
-
onChange:
|
|
1228
|
+
value: M,
|
|
1229
|
+
onChange: le,
|
|
1230
1230
|
onFocus: ge,
|
|
1231
1231
|
placeholder: i,
|
|
1232
1232
|
className: D.input,
|
|
@@ -1234,7 +1234,7 @@ function Do({
|
|
|
1234
1234
|
"aria-label": "Address input",
|
|
1235
1235
|
"aria-autocomplete": "list",
|
|
1236
1236
|
"aria-controls": "address-suggestions",
|
|
1237
|
-
"aria-expanded":
|
|
1237
|
+
"aria-expanded": $
|
|
1238
1238
|
}
|
|
1239
1239
|
),
|
|
1240
1240
|
h && /* @__PURE__ */ t.jsx("div", { className: D.inputIcon, children: h }),
|
|
@@ -1245,7 +1245,7 @@ function Do({
|
|
|
1245
1245
|
type: "button",
|
|
1246
1246
|
disabled: o,
|
|
1247
1247
|
"aria-label": _,
|
|
1248
|
-
children:
|
|
1248
|
+
children: ae ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1249
1249
|
/* @__PURE__ */ t.jsx("span", { children: _ }),
|
|
1250
1250
|
/* @__PURE__ */ t.jsxs(
|
|
1251
1251
|
"svg",
|
|
@@ -1282,70 +1282,70 @@ function Do({
|
|
|
1282
1282
|
)
|
|
1283
1283
|
] }) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1284
1284
|
/* @__PURE__ */ t.jsx("span", { children: _ }),
|
|
1285
|
-
|
|
1285
|
+
u || /* @__PURE__ */ t.jsx(dt, {})
|
|
1286
1286
|
] })
|
|
1287
1287
|
}
|
|
1288
1288
|
)
|
|
1289
1289
|
]
|
|
1290
1290
|
}
|
|
1291
1291
|
),
|
|
1292
|
-
(
|
|
1292
|
+
($ || ve) && /* @__PURE__ */ t.jsx(
|
|
1293
1293
|
"div",
|
|
1294
1294
|
{
|
|
1295
|
-
ref:
|
|
1295
|
+
ref: U,
|
|
1296
1296
|
className: `${D.suggestions} ${ve ? D.errorState : ""}`,
|
|
1297
1297
|
id: "address-suggestions",
|
|
1298
|
-
role: ve &&
|
|
1299
|
-
"aria-live": ve &&
|
|
1298
|
+
role: ve && !$ ? "alert" : "listbox",
|
|
1299
|
+
"aria-live": ve && !$ ? "polite" : void 0,
|
|
1300
1300
|
children: ve ? /* @__PURE__ */ t.jsxs("div", { className: D.error, children: [
|
|
1301
1301
|
/* @__PURE__ */ t.jsx("div", { className: D.errorIcon, children: /* @__PURE__ */ t.jsx(Ar, {}) }),
|
|
1302
|
-
/* @__PURE__ */ t.jsx("div", { children:
|
|
1303
|
-
] }) :
|
|
1302
|
+
/* @__PURE__ */ t.jsx("div", { children: K })
|
|
1303
|
+
] }) : q.length > 0 ? q.map((w, J) => /* @__PURE__ */ t.jsx(
|
|
1304
1304
|
"div",
|
|
1305
1305
|
{
|
|
1306
1306
|
className: D.suggestion,
|
|
1307
|
-
onClick: () =>
|
|
1307
|
+
onClick: () => fe(w),
|
|
1308
1308
|
role: "option",
|
|
1309
1309
|
"aria-selected": !1,
|
|
1310
1310
|
tabIndex: 0,
|
|
1311
|
-
onKeyDown: (
|
|
1312
|
-
(
|
|
1311
|
+
onKeyDown: (ee) => {
|
|
1312
|
+
(ee.key === "Enter" || ee.key === " ") && (ee.preventDefault(), fe(w));
|
|
1313
1313
|
},
|
|
1314
|
-
children: ht(
|
|
1314
|
+
children: ht(w)
|
|
1315
1315
|
},
|
|
1316
|
-
`${
|
|
1317
|
-
)) :
|
|
1316
|
+
`${w.street1}-${w.city}-${w.postalCode}-${J}`
|
|
1317
|
+
)) : B && /* @__PURE__ */ t.jsx(
|
|
1318
1318
|
"button",
|
|
1319
1319
|
{
|
|
1320
1320
|
type: "button",
|
|
1321
1321
|
className: D.manualLink,
|
|
1322
1322
|
onClick: Oe,
|
|
1323
|
-
children:
|
|
1323
|
+
children: d
|
|
1324
1324
|
}
|
|
1325
1325
|
)
|
|
1326
1326
|
}
|
|
1327
1327
|
)
|
|
1328
1328
|
] }),
|
|
1329
|
-
s && /* @__PURE__ */ t.jsx(
|
|
1329
|
+
s && /* @__PURE__ */ t.jsx(fr, {})
|
|
1330
1330
|
] });
|
|
1331
1331
|
}
|
|
1332
|
-
const
|
|
1333
|
-
container:
|
|
1334
|
-
title:
|
|
1335
|
-
addressCard:
|
|
1336
|
-
addressText:
|
|
1337
|
-
editLink:
|
|
1338
|
-
fieldGroup:
|
|
1339
|
-
fieldLabel:
|
|
1340
|
-
input:
|
|
1341
|
-
checkboxRow:
|
|
1342
|
-
checkbox:
|
|
1343
|
-
checkboxLabel:
|
|
1344
|
-
error:
|
|
1345
|
-
actions:
|
|
1346
|
-
confirmButton:
|
|
1332
|
+
const Or = "_container_rg8mk_3", Rr = "_title_rg8mk_7", Br = "_addressCard_rg8mk_16", Mr = "_addressText_rg8mk_26", $r = "_editLink_rg8mk_34", Fr = "_fieldGroup_rg8mk_47", Wr = "_fieldLabel_rg8mk_51", Hr = "_input_rg8mk_60", Vr = "_checkboxRow_rg8mk_84", qr = "_checkbox_rg8mk_84", Ur = "_checkboxLabel_rg8mk_101", Gr = "_error_rg8mk_108", Yr = "_actions_rg8mk_115", Zr = "_confirmButton_rg8mk_120", de = {
|
|
1333
|
+
container: Or,
|
|
1334
|
+
title: Rr,
|
|
1335
|
+
addressCard: Br,
|
|
1336
|
+
addressText: Mr,
|
|
1337
|
+
editLink: $r,
|
|
1338
|
+
fieldGroup: Fr,
|
|
1339
|
+
fieldLabel: Wr,
|
|
1340
|
+
input: Hr,
|
|
1341
|
+
checkboxRow: Vr,
|
|
1342
|
+
checkbox: qr,
|
|
1343
|
+
checkboxLabel: Ur,
|
|
1344
|
+
error: Gr,
|
|
1345
|
+
actions: Yr,
|
|
1346
|
+
confirmButton: Zr
|
|
1347
1347
|
};
|
|
1348
|
-
function
|
|
1348
|
+
function Kr(e) {
|
|
1349
1349
|
return `${e.street1 + (e.street2 ? ` ${e.street2}` : "")}, ${e.city}, ${e.state} ${e.postalCode}`;
|
|
1350
1350
|
}
|
|
1351
1351
|
function Oo({
|
|
@@ -1354,82 +1354,82 @@ function Oo({
|
|
|
1354
1354
|
onConfirm: a,
|
|
1355
1355
|
onEdit: s
|
|
1356
1356
|
}) {
|
|
1357
|
-
const o = Ze(), _ = Se(r), f =
|
|
1358
|
-
if (!
|
|
1359
|
-
|
|
1357
|
+
const o = Ze(), _ = Se(r), f = jt("partner-sdk-unit-input"), [u, h] = S(""), [d, m] = S(!1), [g, x] = S(null), E = () => {
|
|
1358
|
+
if (!d && !u.trim()) {
|
|
1359
|
+
x("Please enter a unit number or select 'No unit number'");
|
|
1360
1360
|
return;
|
|
1361
1361
|
}
|
|
1362
|
-
|
|
1362
|
+
x(null), o.trackPlatform({
|
|
1363
1363
|
buttonClickEvent: { targetName: "partner-sdk-confirm-unit" }
|
|
1364
|
-
}), a(
|
|
1365
|
-
},
|
|
1364
|
+
}), a(d ? { ...e } : { ...e, street2: u.trim() });
|
|
1365
|
+
}, k = () => {
|
|
1366
1366
|
o.trackPlatform({
|
|
1367
1367
|
checkboxClickEvent: {
|
|
1368
1368
|
targetName: "partner-sdk-no-unit",
|
|
1369
|
-
optionName: String(!
|
|
1369
|
+
optionName: String(!d)
|
|
1370
1370
|
}
|
|
1371
|
-
}), m(!
|
|
1372
|
-
}, W = (
|
|
1373
|
-
h(
|
|
1374
|
-
},
|
|
1371
|
+
}), m(!d), d || (h(""), x(null));
|
|
1372
|
+
}, W = (Y) => {
|
|
1373
|
+
h(Y.target.value), g && x(null);
|
|
1374
|
+
}, P = () => {
|
|
1375
1375
|
o.trackPlatform({
|
|
1376
1376
|
inputFocusEvent: { targetName: "partner-sdk-unit-input" }
|
|
1377
1377
|
});
|
|
1378
1378
|
};
|
|
1379
|
-
return /* @__PURE__ */ t.jsxs("div", { ref: f, style: _, className:
|
|
1380
|
-
/* @__PURE__ */ t.jsx("h2", { className:
|
|
1381
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1382
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
1383
|
-
s && /* @__PURE__ */ t.jsx("button", { type: "button", className:
|
|
1379
|
+
return /* @__PURE__ */ t.jsxs("div", { ref: f, style: _, className: de.container, children: [
|
|
1380
|
+
/* @__PURE__ */ t.jsx("h2", { className: de.title, children: "Confirm your home address" }),
|
|
1381
|
+
/* @__PURE__ */ t.jsxs("div", { className: de.addressCard, children: [
|
|
1382
|
+
/* @__PURE__ */ t.jsx("span", { className: de.addressText, children: Kr(e) }),
|
|
1383
|
+
s && /* @__PURE__ */ t.jsx("button", { type: "button", className: de.editLink, onClick: s, children: "Edit" })
|
|
1384
1384
|
] }),
|
|
1385
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1386
|
-
/* @__PURE__ */ t.jsx("label", { className:
|
|
1385
|
+
/* @__PURE__ */ t.jsxs("div", { className: de.fieldGroup, children: [
|
|
1386
|
+
/* @__PURE__ */ t.jsx("label", { className: de.fieldLabel, htmlFor: "od-unit-number", children: "Unit number, apt, or floor*" }),
|
|
1387
1387
|
/* @__PURE__ */ t.jsx(
|
|
1388
1388
|
"input",
|
|
1389
1389
|
{
|
|
1390
1390
|
id: "od-unit-number",
|
|
1391
1391
|
type: "text",
|
|
1392
|
-
className:
|
|
1392
|
+
className: de.input,
|
|
1393
1393
|
placeholder: "#1234",
|
|
1394
|
-
value:
|
|
1394
|
+
value: u,
|
|
1395
1395
|
onChange: W,
|
|
1396
|
-
onFocus:
|
|
1397
|
-
disabled:
|
|
1396
|
+
onFocus: P,
|
|
1397
|
+
disabled: d
|
|
1398
1398
|
}
|
|
1399
1399
|
)
|
|
1400
1400
|
] }),
|
|
1401
|
-
/* @__PURE__ */ t.jsxs("label", { className:
|
|
1401
|
+
/* @__PURE__ */ t.jsxs("label", { className: de.checkboxRow, children: [
|
|
1402
1402
|
/* @__PURE__ */ t.jsx(
|
|
1403
1403
|
"input",
|
|
1404
1404
|
{
|
|
1405
1405
|
type: "checkbox",
|
|
1406
|
-
className:
|
|
1407
|
-
checked:
|
|
1408
|
-
onChange:
|
|
1406
|
+
className: de.checkbox,
|
|
1407
|
+
checked: d,
|
|
1408
|
+
onChange: k
|
|
1409
1409
|
}
|
|
1410
1410
|
),
|
|
1411
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
1411
|
+
/* @__PURE__ */ t.jsx("span", { className: de.checkboxLabel, children: "No unit number" })
|
|
1412
1412
|
] }),
|
|
1413
|
-
g && /* @__PURE__ */ t.jsx("p", { className:
|
|
1414
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1413
|
+
g && /* @__PURE__ */ t.jsx("p", { className: de.error, children: g }),
|
|
1414
|
+
/* @__PURE__ */ t.jsx("div", { className: de.actions, children: /* @__PURE__ */ t.jsx(
|
|
1415
1415
|
"button",
|
|
1416
1416
|
{
|
|
1417
1417
|
type: "button",
|
|
1418
|
-
className:
|
|
1419
|
-
onClick:
|
|
1418
|
+
className: de.confirmButton,
|
|
1419
|
+
onClick: E,
|
|
1420
1420
|
children: "Confirm address"
|
|
1421
1421
|
}
|
|
1422
1422
|
) })
|
|
1423
1423
|
] });
|
|
1424
1424
|
}
|
|
1425
|
-
const
|
|
1426
|
-
function
|
|
1425
|
+
const zr = "https://api.mapbox.com/geocoding/v5/mapbox.places", Jr = "https://api.mapbox.com/styles/v1/mapbox/light-v11/static", Xr = "pk.eyJ1Ijoib3BlbmRvb3IiLCJhIjoiWXJ2bTJiRSJ9.lsnjT9yTNyyVzKRIzqxnqg", Qr = "https://images.opendoor.com/source/s3/imgdrop-production/2026-02-1771546296495-06570.png?service=partner-sdk", en = 640, tn = 320, rn = 14;
|
|
1426
|
+
function nn(e, r, a) {
|
|
1427
1427
|
return e.startsWith("http://") || e.startsWith("https://") ? `url-${encodeURIComponent(e)}(${r},${a})` : `${e}(${r},${a})`;
|
|
1428
1428
|
}
|
|
1429
|
-
function
|
|
1430
|
-
const a = (r == null ? void 0 : r.mapboxAccessToken) ??
|
|
1431
|
-
return
|
|
1432
|
-
|
|
1429
|
+
function an(e, r) {
|
|
1430
|
+
const a = (r == null ? void 0 : r.mapboxAccessToken) ?? Xr, s = (r == null ? void 0 : r.mapPinMarker) ?? Qr, o = (r == null ? void 0 : r.width) ?? en, i = (r == null ? void 0 : r.height) ?? tn, _ = (r == null ? void 0 : r.zoom) ?? rn, [f, u] = S(void 0), [h, d] = S("loading");
|
|
1431
|
+
return oe(() => {
|
|
1432
|
+
d("loading");
|
|
1433
1433
|
const m = [
|
|
1434
1434
|
e.street1,
|
|
1435
1435
|
e.city,
|
|
@@ -1437,26 +1437,26 @@ function nn(e, r) {
|
|
|
1437
1437
|
e.postalCode
|
|
1438
1438
|
].join(" ");
|
|
1439
1439
|
let g = !1;
|
|
1440
|
-
async function
|
|
1441
|
-
var
|
|
1440
|
+
async function x() {
|
|
1441
|
+
var E, k;
|
|
1442
1442
|
try {
|
|
1443
|
-
const W = `${
|
|
1444
|
-
if (!
|
|
1445
|
-
g ||
|
|
1443
|
+
const W = `${zr}/${encodeURIComponent(m)}.json?access_token=${a}&limit=1`, P = await fetch(W);
|
|
1444
|
+
if (!P.ok || g) {
|
|
1445
|
+
g || d("error");
|
|
1446
1446
|
return;
|
|
1447
1447
|
}
|
|
1448
|
-
const
|
|
1449
|
-
if (!
|
|
1450
|
-
g ||
|
|
1448
|
+
const j = (k = (E = (await P.json()).features) == null ? void 0 : E[0]) == null ? void 0 : k.center;
|
|
1449
|
+
if (!j || g) {
|
|
1450
|
+
g || d("error");
|
|
1451
1451
|
return;
|
|
1452
1452
|
}
|
|
1453
|
-
const [
|
|
1454
|
-
g ||
|
|
1453
|
+
const [ne, M] = j, ie = nn(s, ne, M), q = `${Jr}/${ie}/${ne},${M},${_}/${o}x${i}@2x?access_token=${a}&attribution=false&logo=false`;
|
|
1454
|
+
g || u(q);
|
|
1455
1455
|
} catch {
|
|
1456
|
-
g ||
|
|
1456
|
+
g || d("error");
|
|
1457
1457
|
}
|
|
1458
1458
|
}
|
|
1459
|
-
return
|
|
1459
|
+
return x(), () => {
|
|
1460
1460
|
g = !0;
|
|
1461
1461
|
};
|
|
1462
1462
|
}, [
|
|
@@ -1471,10 +1471,10 @@ function nn(e, r) {
|
|
|
1471
1471
|
_
|
|
1472
1472
|
]), { url: f, status: h };
|
|
1473
1473
|
}
|
|
1474
|
-
const
|
|
1475
|
-
container:
|
|
1476
|
-
mapImage:
|
|
1477
|
-
mapImageLoaded:
|
|
1474
|
+
const sn = "_container_1vap7_3", on = "_mapImage_1vap7_13", ln = "_mapImageLoaded_1vap7_22", Ve = {
|
|
1475
|
+
container: sn,
|
|
1476
|
+
mapImage: on,
|
|
1477
|
+
mapImageLoaded: ln
|
|
1478
1478
|
};
|
|
1479
1479
|
function Ro({
|
|
1480
1480
|
address: e,
|
|
@@ -1485,54 +1485,54 @@ function Ro({
|
|
|
1485
1485
|
height: i,
|
|
1486
1486
|
zoom: _,
|
|
1487
1487
|
borderRadius: f,
|
|
1488
|
-
onLoad:
|
|
1488
|
+
onLoad: u,
|
|
1489
1489
|
onError: h
|
|
1490
1490
|
}) {
|
|
1491
|
-
const
|
|
1491
|
+
const d = Se(r), { url: m, status: g } = an(e, {
|
|
1492
1492
|
mapboxAccessToken: a,
|
|
1493
1493
|
mapPinMarker: s,
|
|
1494
1494
|
width: o,
|
|
1495
1495
|
height: i,
|
|
1496
1496
|
zoom: _
|
|
1497
|
-
}), [
|
|
1498
|
-
|
|
1499
|
-
const W =
|
|
1500
|
-
W.current = h,
|
|
1501
|
-
var
|
|
1502
|
-
g === "error" && ((
|
|
1497
|
+
}), [x, E] = S(!1), k = G(u);
|
|
1498
|
+
k.current = u;
|
|
1499
|
+
const W = G(h);
|
|
1500
|
+
W.current = h, oe(() => {
|
|
1501
|
+
var j;
|
|
1502
|
+
g === "error" && ((j = W.current) == null || j.call(W, new Error("Failed to load map for address")));
|
|
1503
1503
|
}, [g]);
|
|
1504
|
-
const
|
|
1505
|
-
var
|
|
1506
|
-
|
|
1507
|
-
},
|
|
1508
|
-
...
|
|
1504
|
+
const P = () => {
|
|
1505
|
+
var j;
|
|
1506
|
+
E(!0), (j = k.current) == null || j.call(k);
|
|
1507
|
+
}, Y = {
|
|
1508
|
+
...d,
|
|
1509
1509
|
...f ? { borderRadius: f } : {}
|
|
1510
1510
|
};
|
|
1511
|
-
return /* @__PURE__ */ t.jsx("div", { className: Ve.container, style:
|
|
1511
|
+
return /* @__PURE__ */ t.jsx("div", { className: Ve.container, style: Y, children: m && /* @__PURE__ */ t.jsx(
|
|
1512
1512
|
"img",
|
|
1513
1513
|
{
|
|
1514
1514
|
src: m,
|
|
1515
1515
|
alt: "Map",
|
|
1516
|
-
className: `${Ve.mapImage} ${
|
|
1517
|
-
onLoad:
|
|
1516
|
+
className: `${Ve.mapImage} ${x ? Ve.mapImageLoaded : ""}`.trim(),
|
|
1517
|
+
onLoad: P
|
|
1518
1518
|
}
|
|
1519
1519
|
) });
|
|
1520
1520
|
}
|
|
1521
|
-
function
|
|
1521
|
+
function cn(e) {
|
|
1522
1522
|
return "field" in e;
|
|
1523
1523
|
}
|
|
1524
|
-
function
|
|
1524
|
+
function un(e) {
|
|
1525
1525
|
return "and" in e;
|
|
1526
1526
|
}
|
|
1527
|
-
function
|
|
1527
|
+
function dn(e) {
|
|
1528
1528
|
return "or" in e;
|
|
1529
1529
|
}
|
|
1530
1530
|
function Te(e, r) {
|
|
1531
|
-
if (cn(e))
|
|
1532
|
-
return e.and.every((a) => Te(a, r));
|
|
1533
1531
|
if (un(e))
|
|
1532
|
+
return e.and.every((a) => Te(a, r));
|
|
1533
|
+
if (dn(e))
|
|
1534
1534
|
return e.or.some((a) => Te(a, r));
|
|
1535
|
-
if (
|
|
1535
|
+
if (cn(e)) {
|
|
1536
1536
|
const a = r(e.field);
|
|
1537
1537
|
switch (e.op) {
|
|
1538
1538
|
case "eq":
|
|
@@ -1555,13 +1555,13 @@ function Te(e, r) {
|
|
|
1555
1555
|
}
|
|
1556
1556
|
return !1;
|
|
1557
1557
|
}
|
|
1558
|
-
function
|
|
1558
|
+
function Nt(e, r) {
|
|
1559
1559
|
return e.questions.filter((a) => !a.showWhen || Te(a.showWhen, r));
|
|
1560
1560
|
}
|
|
1561
|
-
function
|
|
1561
|
+
function hn(e, r) {
|
|
1562
1562
|
return e.filter((a) => !a.showWhen || Te(a.showWhen, r));
|
|
1563
1563
|
}
|
|
1564
|
-
function
|
|
1564
|
+
function fn(e, r) {
|
|
1565
1565
|
const a = typeof r == "string" && r.trim() === "";
|
|
1566
1566
|
if (e.required) {
|
|
1567
1567
|
if (r == null || r === "" || a)
|
|
@@ -1581,9 +1581,9 @@ function hn(e, r) {
|
|
|
1581
1581
|
}
|
|
1582
1582
|
}
|
|
1583
1583
|
function ft(e, r) {
|
|
1584
|
-
const a = {}, s =
|
|
1584
|
+
const a = {}, s = Nt(e, r);
|
|
1585
1585
|
for (const o of s) {
|
|
1586
|
-
const i = r(o.key), _ =
|
|
1586
|
+
const i = r(o.key), _ = fn(o, i);
|
|
1587
1587
|
_ && (a[o.key] = _);
|
|
1588
1588
|
}
|
|
1589
1589
|
return {
|
|
@@ -1591,16 +1591,20 @@ function ft(e, r) {
|
|
|
1591
1591
|
errors: a
|
|
1592
1592
|
};
|
|
1593
1593
|
}
|
|
1594
|
-
class
|
|
1594
|
+
class mn {
|
|
1595
1595
|
constructor(r, a) {
|
|
1596
|
-
this._validationErrors = {}, this._submitted = !1, this._listeners = /* @__PURE__ */ new Map(), this.getAnswer = (o) => this._answers[o], this._allPages = r, this._answers = a != null && a.initialAnswers ? { ...a.initialAnswers } : {};
|
|
1596
|
+
this._validationErrors = {}, this._submitted = !1, this._listeners = /* @__PURE__ */ new Map(), this.getAnswer = (o) => this._answers[o], this._allPages = r, this._answers = a != null && a.initialAnswers ? { ...a.initialAnswers } : {}, this._skipPages = new Set((a == null ? void 0 : a.skipPages) ?? []);
|
|
1597
1597
|
const s = this.visiblePages;
|
|
1598
1598
|
this._currentPageId = s.length > 0 ? s[0].id : "";
|
|
1599
1599
|
}
|
|
1600
1600
|
// ── Derived state (recomputed on access) ──────────────────────────────────
|
|
1601
|
-
/**
|
|
1601
|
+
/**
|
|
1602
|
+
* Pages visible given current answers — filtered by both `showWhen`
|
|
1603
|
+
* conditions and the partner-supplied `skipPages` allowlist.
|
|
1604
|
+
*/
|
|
1602
1605
|
get visiblePages() {
|
|
1603
|
-
|
|
1606
|
+
const r = hn(this._allPages, this.getAnswer);
|
|
1607
|
+
return this._skipPages.size === 0 ? r : r.filter((a) => !this._skipPages.has(a.id));
|
|
1604
1608
|
}
|
|
1605
1609
|
/** The current page, or undefined if no pages are visible. */
|
|
1606
1610
|
get currentPage() {
|
|
@@ -1728,7 +1732,7 @@ class fn {
|
|
|
1728
1732
|
*/
|
|
1729
1733
|
getVisibleQuestionsForCurrentPage() {
|
|
1730
1734
|
const r = this.currentPage;
|
|
1731
|
-
return r ?
|
|
1735
|
+
return r ? Nt(r, this.getAnswer) : [];
|
|
1732
1736
|
}
|
|
1733
1737
|
// ── Events ────────────────────────────────────────────────────────────────
|
|
1734
1738
|
/**
|
|
@@ -1772,18 +1776,18 @@ class fn {
|
|
|
1772
1776
|
});
|
|
1773
1777
|
}
|
|
1774
1778
|
}
|
|
1775
|
-
const
|
|
1776
|
-
function
|
|
1777
|
-
if (typeof e == "string" && !
|
|
1779
|
+
const pn = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
1780
|
+
function It(e) {
|
|
1781
|
+
if (typeof e == "string" && !pn.test(e))
|
|
1778
1782
|
return "Please enter a valid email address";
|
|
1779
1783
|
}
|
|
1780
|
-
function
|
|
1784
|
+
function gn(e) {
|
|
1781
1785
|
if (typeof e != "string")
|
|
1782
1786
|
return;
|
|
1783
1787
|
if (e.replace(/\D/g, "").length < 10)
|
|
1784
1788
|
return "Please enter a valid 10-digit phone number";
|
|
1785
1789
|
}
|
|
1786
|
-
const
|
|
1790
|
+
const _n = {
|
|
1787
1791
|
id: "confirm-home-details",
|
|
1788
1792
|
title: "Confirm your home details",
|
|
1789
1793
|
subtitle: "This info is available to the public. You can edit these details if you've made any updates to your home.",
|
|
@@ -1975,7 +1979,7 @@ const gn = {
|
|
|
1975
1979
|
}
|
|
1976
1980
|
}
|
|
1977
1981
|
]
|
|
1978
|
-
},
|
|
1982
|
+
}, bn = {
|
|
1979
1983
|
id: "ownership",
|
|
1980
1984
|
title: "Are you the owner of this home?",
|
|
1981
1985
|
subtitle: "We have additional questions if you're an agent.",
|
|
@@ -1993,7 +1997,7 @@ const gn = {
|
|
|
1993
1997
|
]
|
|
1994
1998
|
}
|
|
1995
1999
|
]
|
|
1996
|
-
},
|
|
2000
|
+
}, yn = {
|
|
1997
2001
|
id: "sale-timeline",
|
|
1998
2002
|
title: "When do you need to sell your home?",
|
|
1999
2003
|
subtitle: "This won't affect your offer. We're here to help with any timeline.",
|
|
@@ -2014,13 +2018,13 @@ const gn = {
|
|
|
2014
2018
|
]
|
|
2015
2019
|
}
|
|
2016
2020
|
]
|
|
2017
|
-
},
|
|
2021
|
+
}, vn = [
|
|
2018
2022
|
"fixer_upper",
|
|
2019
2023
|
"dated",
|
|
2020
2024
|
"standard",
|
|
2021
2025
|
"high_end",
|
|
2022
2026
|
"luxury"
|
|
2023
|
-
],
|
|
2027
|
+
], xn = {
|
|
2024
2028
|
kitchen: {
|
|
2025
2029
|
fixer_upper: "Kitchen needs significant repairs",
|
|
2026
2030
|
dated: "Kitchen hasn't been updated recently",
|
|
@@ -2049,14 +2053,14 @@ const gn = {
|
|
|
2049
2053
|
high_end: "Exterior has high-quality upgrades",
|
|
2050
2054
|
luxury: "Exterior has elegant, top-tier finishes"
|
|
2051
2055
|
}
|
|
2052
|
-
},
|
|
2056
|
+
}, Cn = {
|
|
2053
2057
|
fixer_upper: "Fixer upper",
|
|
2054
2058
|
dated: "Dated",
|
|
2055
2059
|
standard: "Standard",
|
|
2056
2060
|
high_end: "High-end",
|
|
2057
2061
|
luxury: "Luxury"
|
|
2058
2062
|
};
|
|
2059
|
-
function
|
|
2063
|
+
function Ae(e, r, a) {
|
|
2060
2064
|
return {
|
|
2061
2065
|
id: `${e}-condition`,
|
|
2062
2066
|
title: a,
|
|
@@ -2069,17 +2073,17 @@ function De(e, r, a) {
|
|
|
2069
2073
|
style: "image-card",
|
|
2070
2074
|
required: !0,
|
|
2071
2075
|
autoAdvance: !0,
|
|
2072
|
-
options:
|
|
2073
|
-
label:
|
|
2076
|
+
options: vn.map((s) => ({
|
|
2077
|
+
label: Cn[s],
|
|
2074
2078
|
value: s,
|
|
2075
|
-
description:
|
|
2079
|
+
description: xn[e][s],
|
|
2076
2080
|
imageId: `${e}-${s}`
|
|
2077
2081
|
}))
|
|
2078
2082
|
}
|
|
2079
2083
|
]
|
|
2080
2084
|
};
|
|
2081
2085
|
}
|
|
2082
|
-
const
|
|
2086
|
+
const wn = Ae("kitchen", "home.kitchen_seller_score", "How would you describe your kitchen?"), kn = Ae("bathroom", "home.bathroom_seller_score", "How would you describe your main bathroom?"), jn = Ae("living-room", "home.living_room_seller_score", "How would you describe your living room?"), Nn = Ae("exterior", "home.exterior_seller_score", "How would you describe your home's exterior?"), In = {
|
|
2083
2087
|
id: "hoa",
|
|
2084
2088
|
title: "Is your home part of a homeowners association?",
|
|
2085
2089
|
subtitle: "This is often called an HOA. It's a group that helps maintain your community for a fee.",
|
|
@@ -2097,7 +2101,7 @@ const Cn = De("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2097
2101
|
]
|
|
2098
2102
|
}
|
|
2099
2103
|
]
|
|
2100
|
-
},
|
|
2104
|
+
}, En = {
|
|
2101
2105
|
id: "hoa-type",
|
|
2102
2106
|
title: "Does your home belong to any of these types of communities?",
|
|
2103
2107
|
showWhen: { field: "home.hoa", op: "eq", value: "yes" },
|
|
@@ -2118,7 +2122,7 @@ const Cn = De("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2118
2122
|
]
|
|
2119
2123
|
}
|
|
2120
2124
|
]
|
|
2121
|
-
},
|
|
2125
|
+
}, Sn = {
|
|
2122
2126
|
id: "hoa-guard",
|
|
2123
2127
|
title: "Is there a guard at the entrance?",
|
|
2124
2128
|
showWhen: {
|
|
@@ -2141,7 +2145,7 @@ const Cn = De("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2141
2145
|
]
|
|
2142
2146
|
}
|
|
2143
2147
|
]
|
|
2144
|
-
},
|
|
2148
|
+
}, Pn = {
|
|
2145
2149
|
id: "hoa-fees",
|
|
2146
2150
|
title: "What are your monthly HOA fees?",
|
|
2147
2151
|
subtitle: "(Optional) This helps us better understand your property's monthly expenses.",
|
|
@@ -2156,7 +2160,7 @@ const Cn = De("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2156
2160
|
min: 0
|
|
2157
2161
|
}
|
|
2158
2162
|
]
|
|
2159
|
-
},
|
|
2163
|
+
}, Ln = {
|
|
2160
2164
|
id: "eligibility-criteria",
|
|
2161
2165
|
title: "Do any of these apply to your home?",
|
|
2162
2166
|
subtitle: "Select all that apply. We keep an eye out for these things when making an offer.",
|
|
@@ -2211,7 +2215,7 @@ const Cn = De("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2211
2215
|
]
|
|
2212
2216
|
}
|
|
2213
2217
|
]
|
|
2214
|
-
},
|
|
2218
|
+
}, Tn = {
|
|
2215
2219
|
id: "upgrades",
|
|
2216
2220
|
title: "Has your home had any upgrades?",
|
|
2217
2221
|
subtitle: "This includes renovations, remodels, or major improvements.",
|
|
@@ -2229,7 +2233,7 @@ const Cn = De("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2229
2233
|
]
|
|
2230
2234
|
}
|
|
2231
2235
|
]
|
|
2232
|
-
},
|
|
2236
|
+
}, Dn = {
|
|
2233
2237
|
id: "homebuilder",
|
|
2234
2238
|
title: "Are you working with a homebuilder?",
|
|
2235
2239
|
subtitle: "We can work with them to line up your close dates.",
|
|
@@ -2266,7 +2270,7 @@ const Cn = De("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2266
2270
|
placeholder: "Select or search..."
|
|
2267
2271
|
}
|
|
2268
2272
|
]
|
|
2269
|
-
},
|
|
2273
|
+
}, On = {
|
|
2270
2274
|
id: "homebuilder-details",
|
|
2271
2275
|
title: "Please tell us more about your homebuilder",
|
|
2272
2276
|
showWhen: {
|
|
@@ -2282,7 +2286,7 @@ const Cn = De("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2282
2286
|
style: "email",
|
|
2283
2287
|
required: !1,
|
|
2284
2288
|
placeholder: "you@example.com",
|
|
2285
|
-
validate:
|
|
2289
|
+
validate: It
|
|
2286
2290
|
},
|
|
2287
2291
|
{
|
|
2288
2292
|
key: "seller.home_builder_community",
|
|
@@ -2293,7 +2297,7 @@ const Cn = De("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2293
2297
|
placeholder: "Community name"
|
|
2294
2298
|
}
|
|
2295
2299
|
]
|
|
2296
|
-
},
|
|
2300
|
+
}, Rn = {
|
|
2297
2301
|
id: "contact-info",
|
|
2298
2302
|
title: "You're one step from your offer.",
|
|
2299
2303
|
subtitle: "Create a free account to see your offer. No commitment to sell — just your number, email, and name.",
|
|
@@ -2314,7 +2318,7 @@ const Cn = De("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2314
2318
|
style: "email",
|
|
2315
2319
|
required: !0,
|
|
2316
2320
|
placeholder: "you@example.com",
|
|
2317
|
-
validate:
|
|
2321
|
+
validate: It
|
|
2318
2322
|
},
|
|
2319
2323
|
{
|
|
2320
2324
|
key: "seller.phone_number",
|
|
@@ -2323,7 +2327,7 @@ const Cn = De("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2323
2327
|
style: "phone",
|
|
2324
2328
|
required: !0,
|
|
2325
2329
|
placeholder: "(555) 555-5555",
|
|
2326
|
-
validate:
|
|
2330
|
+
validate: gn
|
|
2327
2331
|
},
|
|
2328
2332
|
{
|
|
2329
2333
|
key: "seller.sms_opt_in",
|
|
@@ -2333,11 +2337,10 @@ const Cn = De("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2333
2337
|
required: !1
|
|
2334
2338
|
}
|
|
2335
2339
|
]
|
|
2336
|
-
},
|
|
2337
|
-
gn,
|
|
2340
|
+
}, Bn = [
|
|
2338
2341
|
_n,
|
|
2339
2342
|
bn,
|
|
2340
|
-
|
|
2343
|
+
yn,
|
|
2341
2344
|
wn,
|
|
2342
2345
|
kn,
|
|
2343
2346
|
jn,
|
|
@@ -2348,16 +2351,17 @@ const Cn = De("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2348
2351
|
Pn,
|
|
2349
2352
|
Ln,
|
|
2350
2353
|
Tn,
|
|
2351
|
-
An,
|
|
2352
2354
|
Dn,
|
|
2353
|
-
|
|
2355
|
+
An,
|
|
2356
|
+
On,
|
|
2357
|
+
Rn
|
|
2354
2358
|
];
|
|
2355
|
-
function
|
|
2356
|
-
return new
|
|
2359
|
+
function mt(e) {
|
|
2360
|
+
return new mn(Bn, e);
|
|
2357
2361
|
}
|
|
2358
|
-
const
|
|
2359
|
-
function
|
|
2360
|
-
const e =
|
|
2362
|
+
const Et = Ue(null);
|
|
2363
|
+
function me() {
|
|
2364
|
+
const e = De(Et);
|
|
2361
2365
|
if (!e)
|
|
2362
2366
|
throw new Error(
|
|
2363
2367
|
"useDtc must be used within a <DtcOnboardingFlow> component"
|
|
@@ -2366,115 +2370,120 @@ function fe() {
|
|
|
2366
2370
|
}
|
|
2367
2371
|
const Mn = ({
|
|
2368
2372
|
initialAnswers: e,
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2373
|
+
skipPages: r,
|
|
2374
|
+
smsConsentText: a,
|
|
2375
|
+
contactConsentText: s,
|
|
2376
|
+
onSubmit: o,
|
|
2377
|
+
onPageChange: i,
|
|
2378
|
+
onAnswerChange: _,
|
|
2379
|
+
onReady: f,
|
|
2380
|
+
onError: u,
|
|
2381
|
+
children: h
|
|
2377
2382
|
}) => {
|
|
2378
|
-
var
|
|
2379
|
-
const
|
|
2380
|
-
|
|
2381
|
-
const
|
|
2382
|
-
u.current = o;
|
|
2383
|
-
const m = Z(i);
|
|
2383
|
+
var y;
|
|
2384
|
+
const d = G(o);
|
|
2385
|
+
d.current = o;
|
|
2386
|
+
const m = G(i);
|
|
2384
2387
|
m.current = i;
|
|
2385
|
-
const g =
|
|
2388
|
+
const g = G(_);
|
|
2386
2389
|
g.current = _;
|
|
2387
|
-
const
|
|
2388
|
-
|
|
2389
|
-
const
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
), [
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2390
|
+
const x = G(f);
|
|
2391
|
+
x.current = f;
|
|
2392
|
+
const E = G(u);
|
|
2393
|
+
E.current = u;
|
|
2394
|
+
const [k, W] = S(
|
|
2395
|
+
() => mt({ initialAnswers: e, skipPages: r })
|
|
2396
|
+
), P = (r ?? []).join("|"), Y = G(P);
|
|
2397
|
+
oe(() => {
|
|
2398
|
+
P !== Y.current && (Y.current = P, W(mt({ initialAnswers: e, skipPages: r })));
|
|
2399
|
+
}, [P]);
|
|
2400
|
+
const [j, ne] = S(
|
|
2401
|
+
k.answers
|
|
2402
|
+
), [M, ie] = S(
|
|
2403
|
+
((y = k.currentPage) == null ? void 0 : y.id) ?? ""
|
|
2404
|
+
), [q, A] = S({}), [$, Z] = S(
|
|
2405
|
+
k.visiblePages
|
|
2397
2406
|
);
|
|
2398
|
-
|
|
2399
|
-
var
|
|
2400
|
-
const
|
|
2401
|
-
|
|
2402
|
-
var
|
|
2403
|
-
|
|
2407
|
+
oe(() => {
|
|
2408
|
+
var v;
|
|
2409
|
+
const C = [
|
|
2410
|
+
k.on("answerChange", (O) => {
|
|
2411
|
+
var Q;
|
|
2412
|
+
ne(k.answers), Z([...k.visiblePages]), O.type === "answerChange" && ((Q = g.current) == null || Q.call(g, O.key, O.value));
|
|
2404
2413
|
}),
|
|
2405
|
-
|
|
2406
|
-
var
|
|
2407
|
-
|
|
2414
|
+
k.on("pageChange", (O) => {
|
|
2415
|
+
var Q;
|
|
2416
|
+
O.type === "pageChange" && (ie(O.pageId), Z([...k.visiblePages]), A({}), (Q = m.current) == null || Q.call(m, O.pageIndex, O.pageId));
|
|
2408
2417
|
}),
|
|
2409
|
-
|
|
2410
|
-
|
|
2418
|
+
k.on("validationError", (O) => {
|
|
2419
|
+
O.type === "validationError" && A(O.errors);
|
|
2411
2420
|
}),
|
|
2412
|
-
|
|
2413
|
-
|
|
2421
|
+
k.on("submit", (O) => {
|
|
2422
|
+
O.type === "submit" && d.current(O.answers);
|
|
2414
2423
|
})
|
|
2415
2424
|
];
|
|
2416
|
-
return (
|
|
2417
|
-
|
|
2425
|
+
return (v = x.current) == null || v.call(x), () => {
|
|
2426
|
+
C.forEach((O) => O()), k.destroy();
|
|
2418
2427
|
};
|
|
2419
|
-
}, [
|
|
2420
|
-
const
|
|
2421
|
-
|
|
2422
|
-
e && e !==
|
|
2423
|
-
}, [e,
|
|
2424
|
-
const
|
|
2425
|
-
const
|
|
2426
|
-
return
|
|
2427
|
-
}, [
|
|
2428
|
+
}, [k]);
|
|
2429
|
+
const ae = G(e);
|
|
2430
|
+
oe(() => {
|
|
2431
|
+
e && e !== ae.current && (ae.current = e, k.setAnswers(e));
|
|
2432
|
+
}, [e, k]);
|
|
2433
|
+
const z = Ie(() => {
|
|
2434
|
+
const C = $.findIndex((v) => v.id === M);
|
|
2435
|
+
return C >= 0 ? C : 0;
|
|
2436
|
+
}, [$, M]), K = $[z], V = Ie(() => M ? k.getVisibleQuestionsForCurrentPage() : [], [k, M, j]), se = Ie(() => $.length <= 1 ? 0 : Math.min(
|
|
2428
2437
|
1,
|
|
2429
|
-
Math.max(0,
|
|
2430
|
-
), [
|
|
2438
|
+
Math.max(0, z / ($.length - 1))
|
|
2439
|
+
), [z, $.length]), ue = Ie(
|
|
2431
2440
|
() => ({
|
|
2432
|
-
engine:
|
|
2433
|
-
currentPage:
|
|
2434
|
-
currentPageIndex:
|
|
2435
|
-
visiblePages:
|
|
2436
|
-
visibleQuestions:
|
|
2437
|
-
answers:
|
|
2438
|
-
validationErrors:
|
|
2439
|
-
progress:
|
|
2440
|
-
isFirstPage:
|
|
2441
|
-
contactConsentText:
|
|
2442
|
-
isLastPage:
|
|
2443
|
-
setAnswer: (
|
|
2444
|
-
getAnswer:
|
|
2441
|
+
engine: k,
|
|
2442
|
+
currentPage: K,
|
|
2443
|
+
currentPageIndex: z,
|
|
2444
|
+
visiblePages: $,
|
|
2445
|
+
visibleQuestions: V,
|
|
2446
|
+
answers: j,
|
|
2447
|
+
validationErrors: q,
|
|
2448
|
+
progress: se,
|
|
2449
|
+
isFirstPage: z === 0,
|
|
2450
|
+
contactConsentText: s,
|
|
2451
|
+
isLastPage: $.length > 0 && z === $.length - 1,
|
|
2452
|
+
setAnswer: (C, v) => k.setAnswer(C, v),
|
|
2453
|
+
getAnswer: k.getAnswer,
|
|
2445
2454
|
goToNext: () => {
|
|
2446
|
-
var
|
|
2447
|
-
const
|
|
2448
|
-
if (!
|
|
2455
|
+
var v;
|
|
2456
|
+
const C = k.goToNext();
|
|
2457
|
+
if (!C.valid)
|
|
2449
2458
|
try {
|
|
2450
|
-
(
|
|
2451
|
-
|
|
2459
|
+
(v = E.current) == null || v.call(
|
|
2460
|
+
E,
|
|
2452
2461
|
new Error(
|
|
2453
|
-
`Validation failed: ${Object.values(
|
|
2462
|
+
`Validation failed: ${Object.values(C.errors).join(", ")}`
|
|
2454
2463
|
)
|
|
2455
2464
|
);
|
|
2456
|
-
} catch (
|
|
2457
|
-
console.error("[DtcOnboardingFlow] onError callback threw:",
|
|
2465
|
+
} catch (O) {
|
|
2466
|
+
console.error("[DtcOnboardingFlow] onError callback threw:", O);
|
|
2458
2467
|
}
|
|
2459
2468
|
},
|
|
2460
|
-
goToPrev: () =>
|
|
2461
|
-
smsConsentText:
|
|
2469
|
+
goToPrev: () => k.goToPrev(),
|
|
2470
|
+
smsConsentText: a
|
|
2462
2471
|
}),
|
|
2463
2472
|
[
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2473
|
+
k,
|
|
2474
|
+
K,
|
|
2475
|
+
z,
|
|
2476
|
+
$,
|
|
2477
|
+
V,
|
|
2478
|
+
j,
|
|
2479
|
+
q,
|
|
2480
|
+
se,
|
|
2481
|
+
a,
|
|
2482
|
+
s
|
|
2474
2483
|
]
|
|
2475
2484
|
);
|
|
2476
|
-
return /* @__PURE__ */ t.jsx(
|
|
2477
|
-
}, $n = "_container_uharh_7", Fn = "_header_uharh_20", Wn = "_headerLogos_uharh_30", Hn = "_headerPartnerLogo_uharh_36", Vn = "_headerOpendoorLogo_uharh_42", qn = "_headerCloseButton_uharh_46", Un = "_layout_uharh_71", Gn = "_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", Ia = "_fieldSuffix_uharh_459", Ea = "_fieldError_uharh_470", Sa = "_checkboxCardGroup_uharh_479", Pa = "_checkboxCard_uharh_479", La = "_checkboxCardSelected_uharh_511", Ta = "_checkboxCardContent_uharh_516",
|
|
2485
|
+
return /* @__PURE__ */ t.jsx(Et.Provider, { value: ue, children: h });
|
|
2486
|
+
}, $n = "_container_uharh_7", Fn = "_header_uharh_20", Wn = "_headerLogos_uharh_30", Hn = "_headerPartnerLogo_uharh_36", Vn = "_headerOpendoorLogo_uharh_42", qn = "_headerCloseButton_uharh_46", Un = "_layout_uharh_71", Gn = "_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", Ia = "_fieldSuffix_uharh_459", Ea = "_fieldError_uharh_470", Sa = "_checkboxCardGroup_uharh_479", Pa = "_checkboxCard_uharh_479", La = "_checkboxCardSelected_uharh_511", Ta = "_checkboxCardContent_uharh_516", Da = "_checkboxCardLabel_uharh_523", Aa = "_checkboxCardHelper_uharh_529", Oa = "_checkboxIndicator_uharh_534", Ra = "_checkboxIndicatorChecked_uharh_546", Ba = "_currencyWrapper_uharh_554", Ma = "_currencyPrefix_uharh_560", $a = "_currencyInput_uharh_569", Fa = "_consentText_uharh_589", Wa = "_consentLink_uharh_597", Ha = "_ctaButton_uharh_602", Va = "_toggleGroup_uharh_634", qa = "_toggleLabel_uharh_638", Ua = "_toggleCheckbox_uharh_646", Ga = "_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", l = {
|
|
2478
2487
|
container: $n,
|
|
2479
2488
|
header: Fn,
|
|
2480
2489
|
headerLogos: Wn,
|
|
@@ -2523,8 +2532,8 @@ const Mn = ({
|
|
|
2523
2532
|
checkboxCard: Pa,
|
|
2524
2533
|
checkboxCardSelected: La,
|
|
2525
2534
|
checkboxCardContent: Ta,
|
|
2526
|
-
checkboxCardLabel:
|
|
2527
|
-
checkboxCardHelper:
|
|
2535
|
+
checkboxCardLabel: Da,
|
|
2536
|
+
checkboxCardHelper: Aa,
|
|
2528
2537
|
checkboxIndicator: Oa,
|
|
2529
2538
|
checkboxIndicatorChecked: Ra,
|
|
2530
2539
|
currencyWrapper: Ba,
|
|
@@ -2624,7 +2633,7 @@ const Mn = ({
|
|
|
2624
2633
|
}
|
|
2625
2634
|
);
|
|
2626
2635
|
}, ns = () => {
|
|
2627
|
-
const { isFirstPage: e, currentPage: r, progress: a, goToNext: s, goToPrev: o } =
|
|
2636
|
+
const { isFirstPage: e, currentPage: r, progress: a, goToNext: s, goToPrev: o } = me();
|
|
2628
2637
|
if ((r == null ? void 0 : r.id) === "contact-info") return null;
|
|
2629
2638
|
const i = (r == null ? void 0 : r.submitLabel) ?? "Next";
|
|
2630
2639
|
return /* @__PURE__ */ t.jsxs("nav", { className: l.navigation, "aria-label": "Page navigation", children: [
|
|
@@ -2657,28 +2666,28 @@ const Mn = ({
|
|
|
2657
2666
|
] })
|
|
2658
2667
|
] });
|
|
2659
2668
|
}, as = ({ question: e }) => {
|
|
2660
|
-
var
|
|
2661
|
-
const { getAnswer: r, setAnswer: a, goToNext: s, validationErrors: o } =
|
|
2662
|
-
|
|
2669
|
+
var d;
|
|
2670
|
+
const { getAnswer: r, setAnswer: a, goToNext: s, validationErrors: o } = me(), i = r(e.key), _ = o[e.key], f = G(null);
|
|
2671
|
+
oe(() => () => {
|
|
2663
2672
|
f.current && clearTimeout(f.current);
|
|
2664
2673
|
}, []);
|
|
2665
|
-
const
|
|
2674
|
+
const u = Ee(
|
|
2666
2675
|
(m) => {
|
|
2667
2676
|
a(e.key, m), e.autoAdvance && (f.current && clearTimeout(f.current), f.current = setTimeout(() => s(), 150));
|
|
2668
2677
|
},
|
|
2669
2678
|
[e.key, e.autoAdvance, a, s]
|
|
2670
2679
|
), h = Ee(
|
|
2671
2680
|
(m, g) => {
|
|
2672
|
-
var
|
|
2673
|
-
const
|
|
2674
|
-
if (!
|
|
2675
|
-
let
|
|
2676
|
-
if (m.key === "ArrowDown" || m.key === "ArrowRight" ? (m.preventDefault(),
|
|
2677
|
-
const
|
|
2678
|
-
(W =
|
|
2681
|
+
var k, W;
|
|
2682
|
+
const x = e.options;
|
|
2683
|
+
if (!x) return;
|
|
2684
|
+
let E = null;
|
|
2685
|
+
if (m.key === "ArrowDown" || m.key === "ArrowRight" ? (m.preventDefault(), E = (g + 1) % x.length) : (m.key === "ArrowUp" || m.key === "ArrowLeft") && (m.preventDefault(), E = (g - 1 + x.length) % x.length), E !== null) {
|
|
2686
|
+
const P = (k = m.currentTarget.closest('[role="radiogroup"]')) == null ? void 0 : k.querySelectorAll('[role="radio"]');
|
|
2687
|
+
(W = P == null ? void 0 : P[E]) == null || W.focus(), u(x[E].value);
|
|
2679
2688
|
}
|
|
2680
2689
|
},
|
|
2681
|
-
[e.options,
|
|
2690
|
+
[e.options, u]
|
|
2682
2691
|
);
|
|
2683
2692
|
return /* @__PURE__ */ t.jsxs(
|
|
2684
2693
|
"div",
|
|
@@ -2687,18 +2696,18 @@ const Mn = ({
|
|
|
2687
2696
|
role: "radiogroup",
|
|
2688
2697
|
"aria-label": e.label,
|
|
2689
2698
|
children: [
|
|
2690
|
-
(
|
|
2691
|
-
const
|
|
2699
|
+
(d = e.options) == null ? void 0 : d.map((m, g) => {
|
|
2700
|
+
const x = i === m.value;
|
|
2692
2701
|
return /* @__PURE__ */ t.jsxs(
|
|
2693
2702
|
"button",
|
|
2694
2703
|
{
|
|
2695
2704
|
type: "button",
|
|
2696
2705
|
role: "radio",
|
|
2697
|
-
"aria-checked":
|
|
2698
|
-
tabIndex:
|
|
2699
|
-
className: `${l.radioCard} ${
|
|
2700
|
-
onClick: () =>
|
|
2701
|
-
onKeyDown: (
|
|
2706
|
+
"aria-checked": x,
|
|
2707
|
+
tabIndex: x || g === 0 && !i ? 0 : -1,
|
|
2708
|
+
className: `${l.radioCard} ${x ? l.radioCardSelected : ""}`,
|
|
2709
|
+
onClick: () => u(m.value),
|
|
2710
|
+
onKeyDown: (E) => h(E, g),
|
|
2702
2711
|
children: [
|
|
2703
2712
|
/* @__PURE__ */ t.jsx("span", { className: l.radioCardLabel, children: m.label }),
|
|
2704
2713
|
m.description && /* @__PURE__ */ t.jsx("span", { className: l.radioCardDescription, children: m.description })
|
|
@@ -2712,43 +2721,43 @@ const Mn = ({
|
|
|
2712
2721
|
}
|
|
2713
2722
|
);
|
|
2714
2723
|
}, ss = "https://images.opendoor.com/source/s3/imgdrop-production", os = "service=reception-fe&dpr=2&fit=scale-down";
|
|
2715
|
-
function
|
|
2724
|
+
function re(e, r = "3:2-sm") {
|
|
2716
2725
|
return `${ss}/${e}?${os}&preset=${r}`;
|
|
2717
2726
|
}
|
|
2718
2727
|
const is = {
|
|
2719
2728
|
// Kitchen
|
|
2720
|
-
"kitchen-fixer_upper":
|
|
2721
|
-
"kitchen-dated":
|
|
2722
|
-
"kitchen-standard":
|
|
2723
|
-
"kitchen-high_end":
|
|
2724
|
-
"kitchen-luxury":
|
|
2729
|
+
"kitchen-fixer_upper": re("2023-04-1681772974083-61414.png"),
|
|
2730
|
+
"kitchen-dated": re("2023-04-1681772974089-39460.png"),
|
|
2731
|
+
"kitchen-standard": re("2023-04-1681772974093-51260.png"),
|
|
2732
|
+
"kitchen-high_end": re("2023-04-1682444345875-57331.jpeg", "3:2-xl"),
|
|
2733
|
+
"kitchen-luxury": re("2023-04-1682444629335-69661.jpeg", "3:2-xl"),
|
|
2725
2734
|
// Bathroom
|
|
2726
|
-
"bathroom-fixer_upper":
|
|
2727
|
-
"bathroom-dated":
|
|
2728
|
-
"bathroom-standard":
|
|
2729
|
-
"bathroom-high_end":
|
|
2730
|
-
"bathroom-luxury":
|
|
2735
|
+
"bathroom-fixer_upper": re("2023-04-1682103091299-33543.jpeg"),
|
|
2736
|
+
"bathroom-dated": re("2023-04-1681773104207-98555.png"),
|
|
2737
|
+
"bathroom-standard": re("2023-04-1682103088251-79730.jpeg", "3:2-xl"),
|
|
2738
|
+
"bathroom-high_end": re("2023-04-1681773104214-77488.png"),
|
|
2739
|
+
"bathroom-luxury": re("2023-04-1681773104217-27390.png"),
|
|
2731
2740
|
// Living Room
|
|
2732
|
-
"living-room-fixer_upper":
|
|
2733
|
-
"living-room-dated":
|
|
2734
|
-
"living-room-standard":
|
|
2735
|
-
"living-room-high_end":
|
|
2736
|
-
"living-room-luxury":
|
|
2741
|
+
"living-room-fixer_upper": re("2023-04-1681773170815-60328.png"),
|
|
2742
|
+
"living-room-dated": re("2023-04-1681773170823-03451.png"),
|
|
2743
|
+
"living-room-standard": re("2023-04-1681773170826-47471.png"),
|
|
2744
|
+
"living-room-high_end": re("2023-04-1681773170828-76415.png"),
|
|
2745
|
+
"living-room-luxury": re("2023-04-1681773170832-20699.png"),
|
|
2737
2746
|
// Exterior
|
|
2738
|
-
"exterior-fixer_upper":
|
|
2739
|
-
"exterior-dated":
|
|
2740
|
-
"exterior-standard":
|
|
2741
|
-
"exterior-high_end":
|
|
2742
|
-
"exterior-luxury":
|
|
2747
|
+
"exterior-fixer_upper": re("2023-04-1681773220493-46489.png"),
|
|
2748
|
+
"exterior-dated": re("2023-04-1681773220495-22229.png"),
|
|
2749
|
+
"exterior-standard": re("2023-04-1681773220498-64940.png"),
|
|
2750
|
+
"exterior-high_end": re("2023-04-1682103085417-24272.jpeg", "3:2-md"),
|
|
2751
|
+
"exterior-luxury": re("2023-04-1681773220487-59852.png")
|
|
2743
2752
|
}, ls = ({ question: e }) => {
|
|
2744
2753
|
var h;
|
|
2745
|
-
const { getAnswer: r, setAnswer: a, goToNext: s, validationErrors: o } =
|
|
2746
|
-
|
|
2754
|
+
const { getAnswer: r, setAnswer: a, goToNext: s, validationErrors: o } = me(), i = r(e.key), _ = o[e.key], f = G(null);
|
|
2755
|
+
oe(() => () => {
|
|
2747
2756
|
f.current && clearTimeout(f.current);
|
|
2748
2757
|
}, []);
|
|
2749
|
-
const
|
|
2750
|
-
(
|
|
2751
|
-
a(e.key,
|
|
2758
|
+
const u = Ee(
|
|
2759
|
+
(d) => {
|
|
2760
|
+
a(e.key, d), e.autoAdvance && (f.current && clearTimeout(f.current), f.current = setTimeout(() => s(), 300));
|
|
2752
2761
|
},
|
|
2753
2762
|
[e.key, e.autoAdvance, a, s]
|
|
2754
2763
|
);
|
|
@@ -2759,8 +2768,8 @@ const is = {
|
|
|
2759
2768
|
role: "radiogroup",
|
|
2760
2769
|
"aria-label": e.label,
|
|
2761
2770
|
children: [
|
|
2762
|
-
(h = e.options) == null ? void 0 : h.map((
|
|
2763
|
-
const m = i ===
|
|
2771
|
+
(h = e.options) == null ? void 0 : h.map((d) => {
|
|
2772
|
+
const m = i === d.value, g = d.imageId ? is[d.imageId] : void 0;
|
|
2764
2773
|
return /* @__PURE__ */ t.jsxs(
|
|
2765
2774
|
"button",
|
|
2766
2775
|
{
|
|
@@ -2768,22 +2777,22 @@ const is = {
|
|
|
2768
2777
|
role: "radio",
|
|
2769
2778
|
"aria-checked": m,
|
|
2770
2779
|
className: `${l.imageCard} ${m ? l.imageCardSelected : ""}`,
|
|
2771
|
-
onClick: () => d
|
|
2780
|
+
onClick: () => u(d.value),
|
|
2772
2781
|
children: [
|
|
2773
2782
|
g && /* @__PURE__ */ t.jsx(
|
|
2774
2783
|
"img",
|
|
2775
2784
|
{
|
|
2776
2785
|
src: g,
|
|
2777
|
-
alt:
|
|
2786
|
+
alt: d.label,
|
|
2778
2787
|
className: l.imageCardPhoto,
|
|
2779
2788
|
loading: "lazy"
|
|
2780
2789
|
}
|
|
2781
2790
|
),
|
|
2782
|
-
/* @__PURE__ */ t.jsx("span", { className: l.imageCardLabel, children:
|
|
2783
|
-
|
|
2791
|
+
/* @__PURE__ */ t.jsx("span", { className: l.imageCardLabel, children: d.label }),
|
|
2792
|
+
d.description && /* @__PURE__ */ t.jsx("span", { className: l.imageCardDescription, children: d.description })
|
|
2784
2793
|
]
|
|
2785
2794
|
},
|
|
2786
|
-
String(
|
|
2795
|
+
String(d.value)
|
|
2787
2796
|
);
|
|
2788
2797
|
}),
|
|
2789
2798
|
_ && /* @__PURE__ */ t.jsx("p", { className: l.fieldError, children: _ })
|
|
@@ -2794,24 +2803,24 @@ const is = {
|
|
|
2794
2803
|
question: e
|
|
2795
2804
|
}) => {
|
|
2796
2805
|
var f;
|
|
2797
|
-
const { getAnswer: r, setAnswer: a, validationErrors: s } =
|
|
2806
|
+
const { getAnswer: r, setAnswer: a, validationErrors: s } = me(), o = r(e.key) ?? [], i = s[e.key], _ = (u) => {
|
|
2798
2807
|
var m;
|
|
2799
|
-
const h = (m = e.options) == null ? void 0 : m.find((g) => g.value ===
|
|
2808
|
+
const h = (m = e.options) == null ? void 0 : m.find((g) => g.value === u);
|
|
2800
2809
|
if (h != null && h.exclusive) {
|
|
2801
|
-
a(e.key, [
|
|
2810
|
+
a(e.key, [u]);
|
|
2802
2811
|
return;
|
|
2803
2812
|
}
|
|
2804
|
-
const
|
|
2813
|
+
const d = o.filter(
|
|
2805
2814
|
(g) => {
|
|
2806
|
-
var
|
|
2807
|
-
return !((
|
|
2815
|
+
var x, E;
|
|
2816
|
+
return !((E = (x = e.options) == null ? void 0 : x.find((k) => k.value === g)) != null && E.exclusive);
|
|
2808
2817
|
}
|
|
2809
2818
|
);
|
|
2810
|
-
if (
|
|
2811
|
-
const g =
|
|
2819
|
+
if (d.includes(u)) {
|
|
2820
|
+
const g = d.filter((x) => x !== u);
|
|
2812
2821
|
a(e.key, g.length > 0 ? g : void 0);
|
|
2813
2822
|
} else
|
|
2814
|
-
a(e.key, [...
|
|
2823
|
+
a(e.key, [...d, u]);
|
|
2815
2824
|
};
|
|
2816
2825
|
return /* @__PURE__ */ t.jsxs(
|
|
2817
2826
|
"div",
|
|
@@ -2820,8 +2829,8 @@ const is = {
|
|
|
2820
2829
|
role: "group",
|
|
2821
2830
|
"aria-label": e.label,
|
|
2822
2831
|
children: [
|
|
2823
|
-
(f = e.options) == null ? void 0 : f.map((
|
|
2824
|
-
const h = o.includes(String(
|
|
2832
|
+
(f = e.options) == null ? void 0 : f.map((u) => {
|
|
2833
|
+
const h = o.includes(String(u.value));
|
|
2825
2834
|
return /* @__PURE__ */ t.jsxs(
|
|
2826
2835
|
"button",
|
|
2827
2836
|
{
|
|
@@ -2829,11 +2838,11 @@ const is = {
|
|
|
2829
2838
|
role: "checkbox",
|
|
2830
2839
|
"aria-checked": h,
|
|
2831
2840
|
className: `${l.checkboxCard} ${h ? l.checkboxCardSelected : ""}`,
|
|
2832
|
-
onClick: () => _(String(
|
|
2841
|
+
onClick: () => _(String(u.value)),
|
|
2833
2842
|
children: [
|
|
2834
2843
|
/* @__PURE__ */ t.jsxs("span", { className: l.checkboxCardContent, children: [
|
|
2835
|
-
/* @__PURE__ */ t.jsx("span", { className: l.checkboxCardLabel, children:
|
|
2836
|
-
|
|
2844
|
+
/* @__PURE__ */ t.jsx("span", { className: l.checkboxCardLabel, children: u.label }),
|
|
2845
|
+
u.helperText && /* @__PURE__ */ t.jsx("span", { className: l.checkboxCardHelper, children: u.helperText })
|
|
2837
2846
|
] }),
|
|
2838
2847
|
/* @__PURE__ */ t.jsx(
|
|
2839
2848
|
"span",
|
|
@@ -2853,7 +2862,7 @@ const is = {
|
|
|
2853
2862
|
)
|
|
2854
2863
|
]
|
|
2855
2864
|
},
|
|
2856
|
-
String(
|
|
2865
|
+
String(u.value)
|
|
2857
2866
|
);
|
|
2858
2867
|
}),
|
|
2859
2868
|
i && /* @__PURE__ */ t.jsx("p", { className: l.fieldError, children: i })
|
|
@@ -2862,8 +2871,8 @@ const is = {
|
|
|
2862
2871
|
);
|
|
2863
2872
|
}, us = ({ question: e }) => {
|
|
2864
2873
|
var f;
|
|
2865
|
-
const { getAnswer: r, setAnswer: a, validationErrors: s } =
|
|
2866
|
-
const h =
|
|
2874
|
+
const { getAnswer: r, setAnswer: a, validationErrors: s } = me(), o = r(e.key), i = s[e.key], _ = (u) => {
|
|
2875
|
+
const h = u.target.value;
|
|
2867
2876
|
e.type === "number" && h !== "" ? a(e.key, Number(h)) : a(e.key, h || void 0);
|
|
2868
2877
|
};
|
|
2869
2878
|
return /* @__PURE__ */ t.jsxs("div", { className: l.fieldGroup, children: [
|
|
@@ -2878,17 +2887,17 @@ const is = {
|
|
|
2878
2887
|
onChange: _,
|
|
2879
2888
|
children: [
|
|
2880
2889
|
/* @__PURE__ */ t.jsx("option", { value: "", children: e.placeholder || "Select..." }),
|
|
2881
|
-
(f = e.options) == null ? void 0 : f.map((
|
|
2890
|
+
(f = e.options) == null ? void 0 : f.map((u) => /* @__PURE__ */ t.jsx("option", { value: String(u.value), children: u.label }, String(u.value)))
|
|
2882
2891
|
]
|
|
2883
2892
|
}
|
|
2884
2893
|
),
|
|
2885
2894
|
i && /* @__PURE__ */ t.jsx("p", { className: l.fieldError, children: i })
|
|
2886
2895
|
] });
|
|
2887
2896
|
}, ds = ({ question: e }) => {
|
|
2888
|
-
const { getAnswer: r, setAnswer: a, validationErrors: s } =
|
|
2889
|
-
const h =
|
|
2897
|
+
const { getAnswer: r, setAnswer: a, validationErrors: s } = me(), o = r(e.key), i = s[e.key], _ = (u) => {
|
|
2898
|
+
const h = u.target.value;
|
|
2890
2899
|
if (e.type === "number") {
|
|
2891
|
-
const
|
|
2900
|
+
const d = h.replace(/[^0-9.]/g, ""), m = d === "" ? void 0 : Number(d), g = m !== void 0 && isNaN(m) ? void 0 : m;
|
|
2892
2901
|
a(e.key, g);
|
|
2893
2902
|
} else
|
|
2894
2903
|
a(e.key, h || void 0);
|
|
@@ -2914,9 +2923,9 @@ const is = {
|
|
|
2914
2923
|
i && /* @__PURE__ */ t.jsx("p", { className: l.fieldError, children: i })
|
|
2915
2924
|
] });
|
|
2916
2925
|
}, hs = ({ question: e }) => {
|
|
2917
|
-
const { getAnswer: r, setAnswer: a, validationErrors: s } =
|
|
2918
|
-
const h =
|
|
2919
|
-
a(e.key,
|
|
2926
|
+
const { getAnswer: r, setAnswer: a, validationErrors: s } = me(), o = r(e.key), i = s[e.key], _ = (u) => {
|
|
2927
|
+
const h = u.target.value.replace(/[^0-9]/g, ""), d = h === "" ? void 0 : Number(h);
|
|
2928
|
+
a(e.key, d !== void 0 && isNaN(d) ? void 0 : d);
|
|
2920
2929
|
}, f = o != null ? String(o) : "";
|
|
2921
2930
|
return /* @__PURE__ */ t.jsxs("div", { className: l.fieldGroup, children: [
|
|
2922
2931
|
/* @__PURE__ */ t.jsx("label", { className: l.fieldLabel, htmlFor: e.key, children: e.label }),
|
|
@@ -2943,7 +2952,7 @@ function fs(e) {
|
|
|
2943
2952
|
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)}`;
|
|
2944
2953
|
}
|
|
2945
2954
|
const ms = ({ question: e }) => {
|
|
2946
|
-
const { getAnswer: r, setAnswer: a, validationErrors: s } =
|
|
2955
|
+
const { getAnswer: r, setAnswer: a, validationErrors: s } = me(), o = r(e.key) ?? "", i = s[e.key], _ = (f) => {
|
|
2947
2956
|
const h = f.target.value.replace(/\D/g, "").slice(0, 10);
|
|
2948
2957
|
a(e.key, h || void 0);
|
|
2949
2958
|
};
|
|
@@ -2963,7 +2972,7 @@ const ms = ({ question: e }) => {
|
|
|
2963
2972
|
i && /* @__PURE__ */ t.jsx("p", { className: l.fieldError, children: i })
|
|
2964
2973
|
] });
|
|
2965
2974
|
}, ps = ({ question: e }) => {
|
|
2966
|
-
const { getAnswer: r, setAnswer: a, smsConsentText: s } =
|
|
2975
|
+
const { getAnswer: r, setAnswer: a, smsConsentText: s } = me(), o = r(e.key);
|
|
2967
2976
|
let i = e.label;
|
|
2968
2977
|
return e.key === "seller.sms_opt_in" && s && (i = s), /* @__PURE__ */ t.jsx("div", { className: l.toggleGroup, children: /* @__PURE__ */ t.jsxs("label", { className: l.toggleLabel, children: [
|
|
2969
2978
|
/* @__PURE__ */ t.jsx(
|
|
@@ -2977,7 +2986,7 @@ const ms = ({ question: e }) => {
|
|
|
2977
2986
|
),
|
|
2978
2987
|
/* @__PURE__ */ t.jsx("span", { className: l.toggleText, children: i })
|
|
2979
2988
|
] }) });
|
|
2980
|
-
},
|
|
2989
|
+
}, pt = 4, Le = 8, gs = 240, _s = 80;
|
|
2981
2990
|
function bs(e) {
|
|
2982
2991
|
const r = {};
|
|
2983
2992
|
for (let a = e; a; a = a.parentElement) {
|
|
@@ -2990,128 +2999,128 @@ function bs(e) {
|
|
|
2990
2999
|
return r;
|
|
2991
3000
|
}
|
|
2992
3001
|
const ys = ({ question: e }) => {
|
|
2993
|
-
var
|
|
2994
|
-
const { getAnswer: r, setAnswer: a, validationErrors: s } =
|
|
2995
|
-
|
|
3002
|
+
var ue;
|
|
3003
|
+
const { getAnswer: r, setAnswer: a, validationErrors: s } = me(), o = r(e.key), i = s[e.key], _ = `${e.key}-combobox`, [f, u] = S(""), [h, d] = S(!1), [m, g] = S([]), [x, E] = S(!1), k = G(null), W = G(null), P = G(null), [Y, j] = S(null), [ne, M] = S({}), ie = De(Ye);
|
|
3004
|
+
oe(() => {
|
|
2996
3005
|
let y = !1;
|
|
2997
|
-
return e.dataSource === "homebuilders" &&
|
|
3006
|
+
return e.dataSource === "homebuilders" && ie ? (E(!0), ie.getHomebuilders().then((C) => {
|
|
2998
3007
|
y || g(
|
|
2999
|
-
|
|
3000
|
-
label:
|
|
3001
|
-
value:
|
|
3008
|
+
C.homebuilders.map((v) => ({
|
|
3009
|
+
label: v.displayName,
|
|
3010
|
+
value: v.identifier
|
|
3002
3011
|
}))
|
|
3003
3012
|
);
|
|
3004
3013
|
}).catch(() => {
|
|
3005
3014
|
y || (e.options ? g(
|
|
3006
|
-
e.options.map((
|
|
3007
|
-
label:
|
|
3008
|
-
value: String(
|
|
3015
|
+
e.options.map((C) => ({
|
|
3016
|
+
label: C.label,
|
|
3017
|
+
value: String(C.value)
|
|
3009
3018
|
}))
|
|
3010
3019
|
) : g([]));
|
|
3011
3020
|
}).finally(() => {
|
|
3012
|
-
y ||
|
|
3021
|
+
y || E(!1);
|
|
3013
3022
|
})) : e.options ? g(
|
|
3014
|
-
e.options.map((
|
|
3015
|
-
label:
|
|
3016
|
-
value: String(
|
|
3023
|
+
e.options.map((C) => ({
|
|
3024
|
+
label: C.label,
|
|
3025
|
+
value: String(C.value)
|
|
3017
3026
|
}))
|
|
3018
3027
|
) : g([]), () => {
|
|
3019
3028
|
y = !0;
|
|
3020
3029
|
};
|
|
3021
|
-
}, [e.dataSource, e.options,
|
|
3022
|
-
const
|
|
3030
|
+
}, [e.dataSource, e.options, ie]);
|
|
3031
|
+
const q = Ee(() => {
|
|
3023
3032
|
const y = W.current;
|
|
3024
3033
|
if (!y) return;
|
|
3025
|
-
const
|
|
3034
|
+
const C = y.getBoundingClientRect(), v = window.visualViewport, O = (v == null ? void 0 : v.height) ?? window.innerHeight, Q = (v == null ? void 0 : v.width) ?? window.innerWidth, pe = (v == null ? void 0 : v.offsetTop) ?? 0, he = (v == null ? void 0 : v.offsetLeft) ?? 0, R = pe + O - C.bottom - pt - Le, U = Math.max(
|
|
3026
3035
|
_s,
|
|
3027
|
-
Math.min(gs,
|
|
3028
|
-
),
|
|
3029
|
-
|
|
3030
|
-
top:
|
|
3036
|
+
Math.min(gs, R)
|
|
3037
|
+
), B = Math.min(C.width, Q - Le * 2), le = he + Le, fe = he + Q - B - Le, ge = Math.max(le, Math.min(C.left, fe));
|
|
3038
|
+
j({
|
|
3039
|
+
top: C.bottom + window.scrollY + pt,
|
|
3031
3040
|
left: ge + window.scrollX,
|
|
3032
|
-
width:
|
|
3033
|
-
maxHeight:
|
|
3041
|
+
width: B,
|
|
3042
|
+
maxHeight: U
|
|
3034
3043
|
});
|
|
3035
3044
|
}, []);
|
|
3036
|
-
|
|
3045
|
+
Ut(() => {
|
|
3037
3046
|
if (!h) {
|
|
3038
|
-
|
|
3047
|
+
j(null);
|
|
3039
3048
|
return;
|
|
3040
3049
|
}
|
|
3041
|
-
W.current &&
|
|
3042
|
-
const y = () =>
|
|
3050
|
+
W.current && M(bs(W.current)), q();
|
|
3051
|
+
const y = () => q();
|
|
3043
3052
|
window.addEventListener("scroll", y, !0), window.addEventListener("resize", y);
|
|
3044
|
-
const
|
|
3045
|
-
|
|
3046
|
-
const
|
|
3053
|
+
const C = window.visualViewport;
|
|
3054
|
+
C == null || C.addEventListener("resize", y), C == null || C.addEventListener("scroll", y);
|
|
3055
|
+
const v = window.setTimeout(y, 300);
|
|
3047
3056
|
return () => {
|
|
3048
|
-
window.removeEventListener("scroll", y, !0), window.removeEventListener("resize", y),
|
|
3057
|
+
window.removeEventListener("scroll", y, !0), window.removeEventListener("resize", y), C == null || C.removeEventListener("resize", y), C == null || C.removeEventListener("scroll", y), window.clearTimeout(v);
|
|
3049
3058
|
};
|
|
3050
|
-
}, [h,
|
|
3051
|
-
const y = (
|
|
3052
|
-
var
|
|
3053
|
-
const
|
|
3054
|
-
(
|
|
3059
|
+
}, [h, q]), oe(() => {
|
|
3060
|
+
const y = (C) => {
|
|
3061
|
+
var O, Q;
|
|
3062
|
+
const v = C.target;
|
|
3063
|
+
(O = k.current) != null && O.contains(v) || (Q = P.current) != null && Q.contains(v) || d(!1);
|
|
3055
3064
|
};
|
|
3056
3065
|
return document.addEventListener("mousedown", y), () => document.removeEventListener("mousedown", y);
|
|
3057
3066
|
}, []);
|
|
3058
|
-
const
|
|
3067
|
+
const A = f ? m.filter(
|
|
3059
3068
|
(y) => y.label.toLowerCase().includes(f.toLowerCase())
|
|
3060
|
-
) : m,
|
|
3069
|
+
) : m, $ = (ue = m.find((y) => y.value === o)) == null ? void 0 : ue.label, [Z, ae] = S(-1), z = `${e.key}-listbox`, K = Ee(
|
|
3061
3070
|
(y) => {
|
|
3062
|
-
a(e.key, y),
|
|
3071
|
+
a(e.key, y), d(!1), u(""), ae(-1);
|
|
3063
3072
|
},
|
|
3064
3073
|
[e.key, a]
|
|
3065
|
-
),
|
|
3074
|
+
), V = (y) => {
|
|
3066
3075
|
if (!h) {
|
|
3067
|
-
(y.key === "ArrowDown" || y.key === "Enter") && (y.preventDefault(),
|
|
3076
|
+
(y.key === "ArrowDown" || y.key === "Enter") && (y.preventDefault(), d(!0));
|
|
3068
3077
|
return;
|
|
3069
3078
|
}
|
|
3070
3079
|
switch (y.key) {
|
|
3071
3080
|
case "ArrowDown":
|
|
3072
|
-
y.preventDefault(),
|
|
3073
|
-
(
|
|
3081
|
+
y.preventDefault(), A.length > 0 && ae(
|
|
3082
|
+
(C) => C < A.length - 1 ? C + 1 : 0
|
|
3074
3083
|
);
|
|
3075
3084
|
break;
|
|
3076
3085
|
case "ArrowUp":
|
|
3077
|
-
y.preventDefault(),
|
|
3078
|
-
(
|
|
3086
|
+
y.preventDefault(), A.length > 0 && ae(
|
|
3087
|
+
(C) => C > 0 ? C - 1 : A.length - 1
|
|
3079
3088
|
);
|
|
3080
3089
|
break;
|
|
3081
3090
|
case "Enter":
|
|
3082
|
-
y.preventDefault(),
|
|
3091
|
+
y.preventDefault(), Z >= 0 && Z < A.length && K(A[Z].value);
|
|
3083
3092
|
break;
|
|
3084
3093
|
case "Escape":
|
|
3085
|
-
y.preventDefault(),
|
|
3094
|
+
y.preventDefault(), d(!1), ae(-1);
|
|
3086
3095
|
break;
|
|
3087
3096
|
}
|
|
3088
|
-
},
|
|
3097
|
+
}, se = h && Y && typeof document < "u" ? Gt(
|
|
3089
3098
|
/* @__PURE__ */ t.jsx(
|
|
3090
3099
|
"div",
|
|
3091
3100
|
{
|
|
3092
|
-
ref:
|
|
3101
|
+
ref: P,
|
|
3093
3102
|
className: l.searchableDropdownList,
|
|
3094
3103
|
role: "listbox",
|
|
3095
|
-
id:
|
|
3104
|
+
id: z,
|
|
3096
3105
|
style: {
|
|
3097
3106
|
position: "absolute",
|
|
3098
|
-
top:
|
|
3099
|
-
left:
|
|
3107
|
+
top: Y.top,
|
|
3108
|
+
left: Y.left,
|
|
3100
3109
|
right: "auto",
|
|
3101
|
-
width:
|
|
3102
|
-
maxHeight:
|
|
3103
|
-
...
|
|
3110
|
+
width: Y.width,
|
|
3111
|
+
maxHeight: Y.maxHeight,
|
|
3112
|
+
...ne
|
|
3104
3113
|
},
|
|
3105
|
-
children:
|
|
3114
|
+
children: x ? /* @__PURE__ */ t.jsx("div", { className: l.searchableDropdownEmpty, children: "Loading..." }) : A.length === 0 ? /* @__PURE__ */ t.jsx("div", { className: l.searchableDropdownEmpty, children: "No results found" }) : A.map((y, C) => /* @__PURE__ */ t.jsx(
|
|
3106
3115
|
"button",
|
|
3107
3116
|
{
|
|
3108
|
-
id: `${
|
|
3117
|
+
id: `${z}-option-${C}`,
|
|
3109
3118
|
type: "button",
|
|
3110
3119
|
role: "option",
|
|
3111
3120
|
"aria-selected": y.value === o,
|
|
3112
|
-
className: `${l.searchableDropdownOption} ${y.value === o ? l.searchableDropdownOptionSelected : ""} ${
|
|
3113
|
-
onMouseDown: (
|
|
3114
|
-
onClick: () =>
|
|
3121
|
+
className: `${l.searchableDropdownOption} ${y.value === o ? l.searchableDropdownOptionSelected : ""} ${C === Z ? l.searchableDropdownOptionHighlighted : ""}`,
|
|
3122
|
+
onMouseDown: (v) => v.preventDefault(),
|
|
3123
|
+
onClick: () => K(y.value),
|
|
3115
3124
|
children: y.label
|
|
3116
3125
|
},
|
|
3117
3126
|
y.value
|
|
@@ -3120,7 +3129,7 @@ const ys = ({ question: e }) => {
|
|
|
3120
3129
|
),
|
|
3121
3130
|
document.body
|
|
3122
3131
|
) : null;
|
|
3123
|
-
return /* @__PURE__ */ t.jsxs("div", { ref:
|
|
3132
|
+
return /* @__PURE__ */ t.jsxs("div", { ref: k, className: l.fieldGroup, children: [
|
|
3124
3133
|
/* @__PURE__ */ t.jsxs("div", { ref: W, className: l.searchableDropdown, children: [
|
|
3125
3134
|
/* @__PURE__ */ t.jsx(
|
|
3126
3135
|
"input",
|
|
@@ -3128,19 +3137,19 @@ const ys = ({ question: e }) => {
|
|
|
3128
3137
|
id: _,
|
|
3129
3138
|
type: "text",
|
|
3130
3139
|
className: l.fieldInput,
|
|
3131
|
-
value: h ? f :
|
|
3140
|
+
value: h ? f : $ ?? "",
|
|
3132
3141
|
onChange: (y) => {
|
|
3133
|
-
|
|
3142
|
+
u(y.target.value), ae(-1), h || d(!0);
|
|
3134
3143
|
},
|
|
3135
|
-
onFocus: () =>
|
|
3136
|
-
onKeyDown:
|
|
3144
|
+
onFocus: () => d(!0),
|
|
3145
|
+
onKeyDown: V,
|
|
3137
3146
|
placeholder: e.placeholder || "Select or search...",
|
|
3138
3147
|
"aria-label": e.label,
|
|
3139
3148
|
"aria-expanded": h,
|
|
3140
3149
|
role: "combobox",
|
|
3141
3150
|
"aria-haspopup": "listbox",
|
|
3142
|
-
"aria-controls": h ?
|
|
3143
|
-
"aria-activedescendant": h &&
|
|
3151
|
+
"aria-controls": h ? z : void 0,
|
|
3152
|
+
"aria-activedescendant": h && Z >= 0 ? `${z}-option-${Z}` : void 0
|
|
3144
3153
|
}
|
|
3145
3154
|
),
|
|
3146
3155
|
/* @__PURE__ */ t.jsx(
|
|
@@ -3148,7 +3157,7 @@ const ys = ({ question: e }) => {
|
|
|
3148
3157
|
{
|
|
3149
3158
|
type: "button",
|
|
3150
3159
|
className: l.searchableDropdownToggle,
|
|
3151
|
-
onClick: () =>
|
|
3160
|
+
onClick: () => d(!h),
|
|
3152
3161
|
"aria-label": "Toggle dropdown",
|
|
3153
3162
|
tabIndex: -1,
|
|
3154
3163
|
children: /* @__PURE__ */ t.jsx("svg", { width: "12", height: "8", viewBox: "0 0 12 8", fill: "none", children: /* @__PURE__ */ t.jsx(
|
|
@@ -3165,7 +3174,7 @@ const ys = ({ question: e }) => {
|
|
|
3165
3174
|
)
|
|
3166
3175
|
] }),
|
|
3167
3176
|
i && /* @__PURE__ */ t.jsx("p", { className: l.fieldError, children: i }),
|
|
3168
|
-
|
|
3177
|
+
se
|
|
3169
3178
|
] });
|
|
3170
3179
|
};
|
|
3171
3180
|
function vs(e) {
|
|
@@ -3194,8 +3203,8 @@ function vs(e) {
|
|
|
3194
3203
|
}
|
|
3195
3204
|
}
|
|
3196
3205
|
const xs = () => {
|
|
3197
|
-
const { currentPage: e, visibleQuestions: r, goToNext: a, contactConsentText: s } =
|
|
3198
|
-
return
|
|
3206
|
+
const { currentPage: e, visibleQuestions: r, goToNext: a, contactConsentText: s } = me(), o = G(null);
|
|
3207
|
+
return oe(() => {
|
|
3199
3208
|
var i, _, f;
|
|
3200
3209
|
(_ = (i = o.current) == null ? void 0 : i.scrollTo) == null || _.call(i, { top: 0, behavior: "smooth" }), (f = o.current) == null || f.focus();
|
|
3201
3210
|
}, [e == null ? void 0 : e.id]), e ? /* @__PURE__ */ t.jsxs(
|
|
@@ -3245,7 +3254,7 @@ const xs = () => {
|
|
|
3245
3254
|
}
|
|
3246
3255
|
) : null;
|
|
3247
3256
|
}, Cs = ({ address: e }) => {
|
|
3248
|
-
const { currentPage: r } =
|
|
3257
|
+
const { currentPage: r } = me();
|
|
3249
3258
|
if (!r) return null;
|
|
3250
3259
|
const a = [
|
|
3251
3260
|
e.street1,
|
|
@@ -3291,33 +3300,35 @@ const xs = () => {
|
|
|
3291
3300
|
partnerLogoUrl: a,
|
|
3292
3301
|
appearance: s = { theme: "minimal" },
|
|
3293
3302
|
initialAnswers: o,
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3303
|
+
skipPages: i,
|
|
3304
|
+
smsConsentText: _,
|
|
3305
|
+
onPageChange: f,
|
|
3306
|
+
onAnswerChange: u,
|
|
3307
|
+
onClose: h,
|
|
3308
|
+
onReady: d,
|
|
3309
|
+
onError: m,
|
|
3310
|
+
contactConsentText: g
|
|
3301
3311
|
}) => {
|
|
3302
|
-
const
|
|
3303
|
-
return /* @__PURE__ */ t.jsx("div", { className: l.container, style:
|
|
3312
|
+
const x = Se(s);
|
|
3313
|
+
return /* @__PURE__ */ t.jsx("div", { className: l.container, style: x, children: /* @__PURE__ */ t.jsxs(
|
|
3304
3314
|
Mn,
|
|
3305
3315
|
{
|
|
3306
3316
|
initialAnswers: o,
|
|
3307
|
-
|
|
3308
|
-
|
|
3317
|
+
skipPages: i,
|
|
3318
|
+
smsConsentText: _,
|
|
3319
|
+
contactConsentText: g,
|
|
3309
3320
|
onSubmit: r,
|
|
3310
|
-
onPageChange:
|
|
3311
|
-
onAnswerChange:
|
|
3312
|
-
onReady:
|
|
3313
|
-
onError:
|
|
3321
|
+
onPageChange: f,
|
|
3322
|
+
onAnswerChange: u,
|
|
3323
|
+
onReady: d,
|
|
3324
|
+
onError: m,
|
|
3314
3325
|
children: [
|
|
3315
|
-
/* @__PURE__ */ t.jsx(ts, { partnerLogoUrl: a, onClose:
|
|
3326
|
+
/* @__PURE__ */ t.jsx(ts, { partnerLogoUrl: a, onClose: h }),
|
|
3316
3327
|
/* @__PURE__ */ t.jsx(Cs, { address: e })
|
|
3317
3328
|
]
|
|
3318
3329
|
}
|
|
3319
3330
|
) });
|
|
3320
|
-
}, ws = "_root_1iq32_7", ks = "_card_1iq32_18", js = "_titleLarge_1iq32_36", Ns = "_featuresList_1iq32_40", Is = "_stepLayout_1iq32_55", Es = "_leftColumn_1iq32_47", Ss = "_introHeader_1iq32_68", Ps = "_schedule_1iq32_74", Ls = "_subtitleLeft_1iq32_124", Ts = "_feature_1iq32_40",
|
|
3331
|
+
}, ws = "_root_1iq32_7", ks = "_card_1iq32_18", js = "_titleLarge_1iq32_36", Ns = "_featuresList_1iq32_40", Is = "_stepLayout_1iq32_55", Es = "_leftColumn_1iq32_47", Ss = "_introHeader_1iq32_68", Ps = "_schedule_1iq32_74", Ls = "_subtitleLeft_1iq32_124", Ts = "_feature_1iq32_40", Ds = "_featureTitle_1iq32_143", As = "_featureDescription_1iq32_150", Os = "_title_1iq32_36", Rs = "_subtitle_1iq32_124", Bs = "_calendarHeader_1iq32_175", Ms = "_calendarMonthLabel_1iq32_182", $s = "_calendarNavButton_1iq32_188", Fs = "_calendarGrid_1iq32_208", Ws = "_calendarDayHeader_1iq32_214", Hs = "_calendarDayAvailable_1iq32_223", Vs = "_calendarDayDisabled_1iq32_224", qs = "_calendarDaySelected_1iq32_225", Us = "_timesHeader_1iq32_256", Gs = "_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", p = {
|
|
3321
3332
|
root: ws,
|
|
3322
3333
|
card: ks,
|
|
3323
3334
|
titleLarge: js,
|
|
@@ -3328,8 +3339,8 @@ const xs = () => {
|
|
|
3328
3339
|
schedule: Ps,
|
|
3329
3340
|
subtitleLeft: Ls,
|
|
3330
3341
|
feature: Ts,
|
|
3331
|
-
featureTitle:
|
|
3332
|
-
featureDescription:
|
|
3342
|
+
featureTitle: Ds,
|
|
3343
|
+
featureDescription: As,
|
|
3333
3344
|
title: Os,
|
|
3334
3345
|
subtitle: Rs,
|
|
3335
3346
|
calendarHeader: Bs,
|
|
@@ -3381,57 +3392,57 @@ function Mo({
|
|
|
3381
3392
|
onScheduled: i,
|
|
3382
3393
|
onDone: _,
|
|
3383
3394
|
onReady: f,
|
|
3384
|
-
onError:
|
|
3395
|
+
onError: u
|
|
3385
3396
|
}) {
|
|
3386
|
-
const h =
|
|
3387
|
-
|
|
3388
|
-
let
|
|
3397
|
+
const h = kt(), d = Se(o), [m, g] = S(_o), [x, E] = S("select"), [k, W] = S(null), [P, Y] = S(null), [j, ne] = S(null), [M, ie] = S(r ?? ""), [q, A] = S(gt(a ?? "")), [$, Z] = S(null), [ae, z] = S(""), [K, V] = S(!1), [se, ue] = S(null);
|
|
3398
|
+
oe(() => {
|
|
3399
|
+
let I = !1;
|
|
3389
3400
|
return (async () => {
|
|
3390
3401
|
try {
|
|
3391
|
-
const
|
|
3392
|
-
if (
|
|
3402
|
+
const R = await h.getAssessmentSlots({ offerId: e });
|
|
3403
|
+
if (I) return;
|
|
3393
3404
|
if (g({
|
|
3394
3405
|
loading: !1,
|
|
3395
3406
|
error: null,
|
|
3396
|
-
availableSlots:
|
|
3397
|
-
isSlotBased:
|
|
3398
|
-
timezone:
|
|
3399
|
-
}),
|
|
3400
|
-
|
|
3407
|
+
availableSlots: R.availableSlots,
|
|
3408
|
+
isSlotBased: R.isSlotBased,
|
|
3409
|
+
timezone: R.timezone
|
|
3410
|
+
}), R.availableSlots.length > 0)
|
|
3411
|
+
ne(
|
|
3401
3412
|
yo(
|
|
3402
|
-
|
|
3413
|
+
_t(R.availableSlots[0], R.timezone)
|
|
3403
3414
|
)
|
|
3404
3415
|
);
|
|
3405
3416
|
else {
|
|
3406
|
-
const
|
|
3407
|
-
|
|
3417
|
+
const U = /* @__PURE__ */ new Date();
|
|
3418
|
+
ne({ year: U.getFullYear(), month: U.getMonth() });
|
|
3408
3419
|
}
|
|
3409
3420
|
f == null || f();
|
|
3410
|
-
} catch (
|
|
3411
|
-
const
|
|
3412
|
-
if (
|
|
3413
|
-
g((
|
|
3414
|
-
const
|
|
3415
|
-
|
|
3421
|
+
} catch (R) {
|
|
3422
|
+
const U = R instanceof Error ? R : new Error(String(R));
|
|
3423
|
+
if (I) return;
|
|
3424
|
+
g((le) => ({ ...le, loading: !1, error: U }));
|
|
3425
|
+
const B = /* @__PURE__ */ new Date();
|
|
3426
|
+
ne({ year: B.getFullYear(), month: B.getMonth() }), u == null || u(U);
|
|
3416
3427
|
}
|
|
3417
3428
|
})(), () => {
|
|
3418
|
-
|
|
3429
|
+
I = !0;
|
|
3419
3430
|
};
|
|
3420
3431
|
}, [h, e]);
|
|
3421
3432
|
const y = Ie(() => {
|
|
3422
|
-
const
|
|
3423
|
-
for (const
|
|
3424
|
-
const
|
|
3425
|
-
|
|
3433
|
+
const I = /* @__PURE__ */ new Map();
|
|
3434
|
+
for (const R of m.availableSlots) {
|
|
3435
|
+
const U = _t(R, m.timezone), B = I.get(U) ?? [];
|
|
3436
|
+
B.push(R), I.set(U, B);
|
|
3426
3437
|
}
|
|
3427
|
-
return
|
|
3438
|
+
return I;
|
|
3428
3439
|
}, [m.availableSlots, m.timezone]);
|
|
3429
|
-
if (m.loading || !
|
|
3440
|
+
if (m.loading || !j)
|
|
3430
3441
|
return /* @__PURE__ */ t.jsx(
|
|
3431
3442
|
"div",
|
|
3432
3443
|
{
|
|
3433
3444
|
className: p.root,
|
|
3434
|
-
style:
|
|
3445
|
+
style: d,
|
|
3435
3446
|
"data-testid": "schedule-assessment-loading",
|
|
3436
3447
|
children: /* @__PURE__ */ t.jsx("div", { className: p.card, children: /* @__PURE__ */ t.jsx("p", { className: p.subtitle, children: "Loading available times…" }) })
|
|
3437
3448
|
}
|
|
@@ -3441,18 +3452,18 @@ function Mo({
|
|
|
3441
3452
|
"div",
|
|
3442
3453
|
{
|
|
3443
3454
|
className: p.root,
|
|
3444
|
-
style:
|
|
3455
|
+
style: d,
|
|
3445
3456
|
"data-testid": "schedule-assessment-error",
|
|
3446
3457
|
children: /* @__PURE__ */ t.jsx("div", { className: p.card, children: /* @__PURE__ */ t.jsx("p", { className: p.subtitle, children: "We couldn't load available times. Please try again in a few minutes." }) })
|
|
3447
3458
|
}
|
|
3448
3459
|
);
|
|
3449
|
-
if (
|
|
3450
|
-
const
|
|
3460
|
+
if (x === "success") {
|
|
3461
|
+
const I = P ? new Date(P) : null;
|
|
3451
3462
|
return /* @__PURE__ */ t.jsx(
|
|
3452
3463
|
"div",
|
|
3453
3464
|
{
|
|
3454
3465
|
className: p.root,
|
|
3455
|
-
style:
|
|
3466
|
+
style: d,
|
|
3456
3467
|
"data-testid": "schedule-assessment-success",
|
|
3457
3468
|
children: /* @__PURE__ */ t.jsxs("div", { className: p.card, children: [
|
|
3458
3469
|
/* @__PURE__ */ t.jsx("div", { className: p.successCheckCircle, "aria-hidden": "true", children: /* @__PURE__ */ t.jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ t.jsx(
|
|
@@ -3465,17 +3476,17 @@ function Mo({
|
|
|
3465
3476
|
strokeLinejoin: "round"
|
|
3466
3477
|
}
|
|
3467
3478
|
) }) }),
|
|
3468
|
-
/* @__PURE__ */ t.jsx("h2", { className: p.title, children:
|
|
3479
|
+
/* @__PURE__ */ t.jsx("h2", { className: p.title, children: M ? `${bo(M)}, your assessment is scheduled!` : "Your assessment is scheduled!" }),
|
|
3469
3480
|
/* @__PURE__ */ t.jsx("p", { className: p.subtitle, children: "A calendar invite has been sent to your email address." }),
|
|
3470
3481
|
/* @__PURE__ */ t.jsxs("div", { className: p.summaryCard, children: [
|
|
3471
|
-
|
|
3482
|
+
I && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
3472
3483
|
/* @__PURE__ */ t.jsxs("div", { className: p.summaryRow, children: [
|
|
3473
3484
|
/* @__PURE__ */ t.jsx(ko, {}),
|
|
3474
|
-
/* @__PURE__ */ t.jsx("span", { children:
|
|
3485
|
+
/* @__PURE__ */ t.jsx("span", { children: bt(I, m.timezone) })
|
|
3475
3486
|
] }),
|
|
3476
3487
|
/* @__PURE__ */ t.jsxs("div", { className: p.summaryRow, children: [
|
|
3477
3488
|
/* @__PURE__ */ t.jsx(jo, {}),
|
|
3478
|
-
/* @__PURE__ */ t.jsx("span", { children:
|
|
3489
|
+
/* @__PURE__ */ t.jsx("span", { children: yt(I, m.timezone) })
|
|
3479
3490
|
] })
|
|
3480
3491
|
] }),
|
|
3481
3492
|
s && /* @__PURE__ */ t.jsxs("div", { className: p.summaryRow, children: [
|
|
@@ -3496,29 +3507,29 @@ function Mo({
|
|
|
3496
3507
|
}
|
|
3497
3508
|
);
|
|
3498
3509
|
}
|
|
3499
|
-
if (
|
|
3500
|
-
const
|
|
3501
|
-
if (!(!
|
|
3502
|
-
|
|
3510
|
+
if (x === "confirm") {
|
|
3511
|
+
const I = q.replace(/\D/g, ""), R = !K && M.trim().length > 0 && I.length >= 10 && $ !== null && (!$ || ae.trim().length > 0), U = async () => {
|
|
3512
|
+
if (!(!R || !P)) {
|
|
3513
|
+
V(!0), ue(null);
|
|
3503
3514
|
try {
|
|
3504
|
-
const
|
|
3515
|
+
const B = $ ? `Customer: ${M.trim()}. Access instructions: ${ae.trim()}` : `Customer: ${M.trim()}. No gate code or entry restrictions.`, le = await h.scheduleAssessment({
|
|
3505
3516
|
offerId: e,
|
|
3506
|
-
selectedInspectionTime:
|
|
3507
|
-
reminderPhone:
|
|
3508
|
-
notes:
|
|
3517
|
+
selectedInspectionTime: P,
|
|
3518
|
+
reminderPhone: q.replace(/\D/g, ""),
|
|
3519
|
+
notes: B
|
|
3509
3520
|
});
|
|
3510
|
-
|
|
3521
|
+
E("success");
|
|
3511
3522
|
try {
|
|
3512
|
-
await (i == null ? void 0 : i(
|
|
3513
|
-
} catch (
|
|
3514
|
-
const ge =
|
|
3515
|
-
|
|
3523
|
+
await (i == null ? void 0 : i(le.visitId));
|
|
3524
|
+
} catch (fe) {
|
|
3525
|
+
const ge = fe instanceof Error ? fe : new Error(String(fe));
|
|
3526
|
+
u == null || u(ge);
|
|
3516
3527
|
}
|
|
3517
|
-
} catch (
|
|
3518
|
-
const
|
|
3519
|
-
|
|
3528
|
+
} catch (B) {
|
|
3529
|
+
const le = B instanceof Error ? B : new Error(String(B));
|
|
3530
|
+
ue(le.message), u == null || u(le);
|
|
3520
3531
|
} finally {
|
|
3521
|
-
|
|
3532
|
+
V(!1);
|
|
3522
3533
|
}
|
|
3523
3534
|
}
|
|
3524
3535
|
};
|
|
@@ -3526,7 +3537,7 @@ function Mo({
|
|
|
3526
3537
|
"div",
|
|
3527
3538
|
{
|
|
3528
3539
|
className: p.root,
|
|
3529
|
-
style:
|
|
3540
|
+
style: d,
|
|
3530
3541
|
"data-testid": "schedule-assessment-confirm",
|
|
3531
3542
|
children: /* @__PURE__ */ t.jsxs("div", { className: p.card, children: [
|
|
3532
3543
|
/* @__PURE__ */ t.jsx("h2", { className: p.title, children: "Confirm your details" }),
|
|
@@ -3537,9 +3548,9 @@ function Mo({
|
|
|
3537
3548
|
{
|
|
3538
3549
|
className: p.input,
|
|
3539
3550
|
type: "text",
|
|
3540
|
-
value:
|
|
3541
|
-
onChange: (
|
|
3542
|
-
disabled:
|
|
3551
|
+
value: M,
|
|
3552
|
+
onChange: (B) => ie(B.target.value),
|
|
3553
|
+
disabled: K
|
|
3543
3554
|
}
|
|
3544
3555
|
)
|
|
3545
3556
|
] }),
|
|
@@ -3553,9 +3564,9 @@ function Mo({
|
|
|
3553
3564
|
inputMode: "tel",
|
|
3554
3565
|
autoComplete: "tel",
|
|
3555
3566
|
placeholder: "(555) 555-5555",
|
|
3556
|
-
value:
|
|
3557
|
-
onChange: (
|
|
3558
|
-
disabled:
|
|
3567
|
+
value: q,
|
|
3568
|
+
onChange: (B) => A(gt(B.target.value)),
|
|
3569
|
+
disabled: K
|
|
3559
3570
|
}
|
|
3560
3571
|
)
|
|
3561
3572
|
] }),
|
|
@@ -3568,9 +3579,9 @@ function Mo({
|
|
|
3568
3579
|
{
|
|
3569
3580
|
type: "radio",
|
|
3570
3581
|
name: "gate-code",
|
|
3571
|
-
checked:
|
|
3572
|
-
onChange: () =>
|
|
3573
|
-
disabled:
|
|
3582
|
+
checked: $ === !0,
|
|
3583
|
+
onChange: () => Z(!0),
|
|
3584
|
+
disabled: K
|
|
3574
3585
|
}
|
|
3575
3586
|
),
|
|
3576
3587
|
/* @__PURE__ */ t.jsx("span", { children: "Yes" })
|
|
@@ -3581,16 +3592,16 @@ function Mo({
|
|
|
3581
3592
|
{
|
|
3582
3593
|
type: "radio",
|
|
3583
3594
|
name: "gate-code",
|
|
3584
|
-
checked:
|
|
3585
|
-
onChange: () =>
|
|
3586
|
-
disabled:
|
|
3595
|
+
checked: $ === !1,
|
|
3596
|
+
onChange: () => Z(!1),
|
|
3597
|
+
disabled: K
|
|
3587
3598
|
}
|
|
3588
3599
|
),
|
|
3589
3600
|
/* @__PURE__ */ t.jsx("span", { children: "No" })
|
|
3590
3601
|
] })
|
|
3591
3602
|
] })
|
|
3592
3603
|
] }),
|
|
3593
|
-
|
|
3604
|
+
$ && /* @__PURE__ */ t.jsxs("label", { className: p.field, children: [
|
|
3594
3605
|
/* @__PURE__ */ t.jsx("span", { className: p.fieldLabel, children: "Please provide access instructions for your home." }),
|
|
3595
3606
|
/* @__PURE__ */ t.jsx(
|
|
3596
3607
|
"input",
|
|
@@ -3598,21 +3609,21 @@ function Mo({
|
|
|
3598
3609
|
className: p.input,
|
|
3599
3610
|
type: "text",
|
|
3600
3611
|
placeholder: "Gate code, directions, etc.",
|
|
3601
|
-
value:
|
|
3602
|
-
onChange: (
|
|
3603
|
-
disabled:
|
|
3612
|
+
value: ae,
|
|
3613
|
+
onChange: (B) => z(B.target.value),
|
|
3614
|
+
disabled: K
|
|
3604
3615
|
}
|
|
3605
3616
|
)
|
|
3606
3617
|
] }),
|
|
3607
|
-
|
|
3618
|
+
se && /* @__PURE__ */ t.jsx("p", { className: p.errorText, children: se }),
|
|
3608
3619
|
/* @__PURE__ */ t.jsxs("div", { className: p.actionsRow, children: [
|
|
3609
3620
|
/* @__PURE__ */ t.jsx(
|
|
3610
3621
|
"button",
|
|
3611
3622
|
{
|
|
3612
3623
|
type: "button",
|
|
3613
3624
|
className: p.linkButton,
|
|
3614
|
-
onClick: () =>
|
|
3615
|
-
disabled:
|
|
3625
|
+
onClick: () => E("select"),
|
|
3626
|
+
disabled: K,
|
|
3616
3627
|
children: "← Back"
|
|
3617
3628
|
}
|
|
3618
3629
|
),
|
|
@@ -3621,9 +3632,9 @@ function Mo({
|
|
|
3621
3632
|
{
|
|
3622
3633
|
type: "button",
|
|
3623
3634
|
className: p.primaryButton,
|
|
3624
|
-
onClick: () => void
|
|
3625
|
-
disabled: !
|
|
3626
|
-
children:
|
|
3635
|
+
onClick: () => void U(),
|
|
3636
|
+
disabled: !R,
|
|
3637
|
+
children: K ? "Scheduling…" : "Schedule"
|
|
3627
3638
|
}
|
|
3628
3639
|
)
|
|
3629
3640
|
] }),
|
|
@@ -3632,12 +3643,12 @@ function Mo({
|
|
|
3632
3643
|
}
|
|
3633
3644
|
);
|
|
3634
3645
|
}
|
|
3635
|
-
const
|
|
3646
|
+
const C = vo(j), v = xo(j), O = Co(j, y), Q = wo(j, y), pe = k ? y.get(k) ?? [] : [], he = pe[0] ? bt(new Date(pe[0]), m.timezone) : null;
|
|
3636
3647
|
return /* @__PURE__ */ t.jsx(
|
|
3637
3648
|
"div",
|
|
3638
3649
|
{
|
|
3639
3650
|
className: p.root,
|
|
3640
|
-
style:
|
|
3651
|
+
style: d,
|
|
3641
3652
|
"data-testid": "schedule-assessment-flow",
|
|
3642
3653
|
children: /* @__PURE__ */ t.jsx("div", { className: p.card, children: /* @__PURE__ */ t.jsxs("div", { className: p.stepLayout, children: [
|
|
3643
3654
|
/* @__PURE__ */ t.jsxs("div", { className: p.leftColumn, children: [
|
|
@@ -3645,10 +3656,10 @@ function Mo({
|
|
|
3645
3656
|
/* @__PURE__ */ t.jsx("h2", { className: p.titleLarge, children: "Schedule your assessment" }),
|
|
3646
3657
|
/* @__PURE__ */ t.jsx("p", { className: p.subtitleLeft, children: "Pick a time that works for you." })
|
|
3647
3658
|
] }),
|
|
3648
|
-
/* @__PURE__ */ t.jsx("div", { className: p.featuresList, children: Io.map((
|
|
3649
|
-
/* @__PURE__ */ t.jsx("p", { className: p.featureTitle, children:
|
|
3650
|
-
/* @__PURE__ */ t.jsx("p", { className: p.featureDescription, children:
|
|
3651
|
-
] },
|
|
3659
|
+
/* @__PURE__ */ t.jsx("div", { className: p.featuresList, children: Io.map((I) => /* @__PURE__ */ t.jsxs("div", { className: p.feature, children: [
|
|
3660
|
+
/* @__PURE__ */ t.jsx("p", { className: p.featureTitle, children: I.title }),
|
|
3661
|
+
/* @__PURE__ */ t.jsx("p", { className: p.featureDescription, children: I.description })
|
|
3662
|
+
] }, I.title)) })
|
|
3652
3663
|
] }),
|
|
3653
3664
|
/* @__PURE__ */ t.jsxs("div", { className: p.schedule, children: [
|
|
3654
3665
|
/* @__PURE__ */ t.jsxs("div", { className: p.calendarHeader, children: [
|
|
@@ -3657,61 +3668,61 @@ function Mo({
|
|
|
3657
3668
|
{
|
|
3658
3669
|
type: "button",
|
|
3659
3670
|
className: p.calendarNavButton,
|
|
3660
|
-
onClick: () =>
|
|
3661
|
-
disabled: !
|
|
3671
|
+
onClick: () => ne(vt(j, -1)),
|
|
3672
|
+
disabled: !O,
|
|
3662
3673
|
"aria-label": "Previous month",
|
|
3663
3674
|
children: "‹"
|
|
3664
3675
|
}
|
|
3665
3676
|
),
|
|
3666
|
-
/* @__PURE__ */ t.jsx("span", { className: p.calendarMonthLabel, children:
|
|
3677
|
+
/* @__PURE__ */ t.jsx("span", { className: p.calendarMonthLabel, children: v }),
|
|
3667
3678
|
/* @__PURE__ */ t.jsx(
|
|
3668
3679
|
"button",
|
|
3669
3680
|
{
|
|
3670
3681
|
type: "button",
|
|
3671
3682
|
className: p.calendarNavButton,
|
|
3672
|
-
onClick: () =>
|
|
3673
|
-
disabled: !
|
|
3683
|
+
onClick: () => ne(vt(j, 1)),
|
|
3684
|
+
disabled: !Q,
|
|
3674
3685
|
"aria-label": "Next month",
|
|
3675
3686
|
children: "›"
|
|
3676
3687
|
}
|
|
3677
3688
|
)
|
|
3678
3689
|
] }),
|
|
3679
3690
|
/* @__PURE__ */ t.jsxs("div", { className: p.calendarGrid, children: [
|
|
3680
|
-
["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"].map((
|
|
3681
|
-
|
|
3682
|
-
const
|
|
3691
|
+
["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"].map((I) => /* @__PURE__ */ t.jsx("div", { className: p.calendarDayHeader, children: I }, I)),
|
|
3692
|
+
C.map((I, R) => {
|
|
3693
|
+
const U = I ? y.has(I.key) : !1, B = !!I && I.key === k;
|
|
3683
3694
|
return /* @__PURE__ */ t.jsx(
|
|
3684
3695
|
"button",
|
|
3685
3696
|
{
|
|
3686
3697
|
type: "button",
|
|
3687
|
-
className:
|
|
3698
|
+
className: B ? p.calendarDaySelected : U ? p.calendarDayAvailable : p.calendarDayDisabled,
|
|
3688
3699
|
onClick: () => {
|
|
3689
|
-
|
|
3700
|
+
I && U && (W(I.key), Y(null));
|
|
3690
3701
|
},
|
|
3691
|
-
disabled: !
|
|
3692
|
-
"aria-pressed":
|
|
3693
|
-
children:
|
|
3702
|
+
disabled: !U,
|
|
3703
|
+
"aria-pressed": !!B,
|
|
3704
|
+
children: I ? I.day : ""
|
|
3694
3705
|
},
|
|
3695
|
-
|
|
3706
|
+
I ? I.key : `empty-${v}-${R}`
|
|
3696
3707
|
);
|
|
3697
3708
|
})
|
|
3698
3709
|
] }),
|
|
3699
|
-
|
|
3710
|
+
he && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
3700
3711
|
/* @__PURE__ */ t.jsxs("p", { className: p.timesHeader, children: [
|
|
3701
3712
|
"Available times for ",
|
|
3702
|
-
|
|
3713
|
+
he
|
|
3703
3714
|
] }),
|
|
3704
|
-
/* @__PURE__ */ t.jsx("div", { className: p.timeRow, children: pe.map((
|
|
3705
|
-
const
|
|
3715
|
+
/* @__PURE__ */ t.jsx("div", { className: p.timeRow, children: pe.map((I) => {
|
|
3716
|
+
const R = I === P;
|
|
3706
3717
|
return /* @__PURE__ */ t.jsx(
|
|
3707
3718
|
"button",
|
|
3708
3719
|
{
|
|
3709
3720
|
type: "button",
|
|
3710
|
-
className:
|
|
3711
|
-
onClick: () =>
|
|
3712
|
-
children:
|
|
3721
|
+
className: R ? p.timeButtonSelected : p.timeButton,
|
|
3722
|
+
onClick: () => Y(I),
|
|
3723
|
+
children: yt(new Date(I), m.timezone)
|
|
3713
3724
|
},
|
|
3714
|
-
|
|
3725
|
+
I
|
|
3715
3726
|
);
|
|
3716
3727
|
}) })
|
|
3717
3728
|
] }),
|
|
@@ -3720,8 +3731,8 @@ function Mo({
|
|
|
3720
3731
|
{
|
|
3721
3732
|
type: "button",
|
|
3722
3733
|
className: p.primaryButton,
|
|
3723
|
-
onClick: () =>
|
|
3724
|
-
disabled: !
|
|
3734
|
+
onClick: () => E("confirm"),
|
|
3735
|
+
disabled: !P,
|
|
3725
3736
|
children: "Continue"
|
|
3726
3737
|
}
|
|
3727
3738
|
)
|
|
@@ -3733,11 +3744,11 @@ function Mo({
|
|
|
3733
3744
|
function bo(e) {
|
|
3734
3745
|
return e.trim().split(/\s+/)[0] ?? "";
|
|
3735
3746
|
}
|
|
3736
|
-
function
|
|
3747
|
+
function gt(e) {
|
|
3737
3748
|
const r = e.replace(/\D/g, "").slice(0, 10);
|
|
3738
3749
|
return r.length === 0 ? "" : 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)}`;
|
|
3739
3750
|
}
|
|
3740
|
-
function
|
|
3751
|
+
function _t(e, r) {
|
|
3741
3752
|
const a = new Date(e);
|
|
3742
3753
|
return new Intl.DateTimeFormat("en-CA", {
|
|
3743
3754
|
timeZone: r,
|
|
@@ -3750,7 +3761,7 @@ function yo(e) {
|
|
|
3750
3761
|
const [r, a] = e.split("-").map((s) => parseInt(s, 10));
|
|
3751
3762
|
return { year: r, month: a - 1 };
|
|
3752
3763
|
}
|
|
3753
|
-
function
|
|
3764
|
+
function bt(e, r) {
|
|
3754
3765
|
return new Intl.DateTimeFormat(void 0, {
|
|
3755
3766
|
timeZone: r,
|
|
3756
3767
|
weekday: "long",
|
|
@@ -3758,7 +3769,7 @@ function _t(e, r) {
|
|
|
3758
3769
|
day: "numeric"
|
|
3759
3770
|
}).format(e);
|
|
3760
3771
|
}
|
|
3761
|
-
function
|
|
3772
|
+
function yt(e, r) {
|
|
3762
3773
|
return new Intl.DateTimeFormat(void 0, {
|
|
3763
3774
|
timeZone: r,
|
|
3764
3775
|
hour: "numeric",
|
|
@@ -3766,14 +3777,14 @@ function bt(e, r) {
|
|
|
3766
3777
|
hour12: !0
|
|
3767
3778
|
}).format(e);
|
|
3768
3779
|
}
|
|
3769
|
-
function
|
|
3780
|
+
function vt(e, r) {
|
|
3770
3781
|
const a = e.year * 12 + e.month + r, s = Math.floor(a / 12), o = a - s * 12;
|
|
3771
3782
|
return { year: s, month: o };
|
|
3772
3783
|
}
|
|
3773
3784
|
function vo({ year: e, month: r }) {
|
|
3774
3785
|
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 = [], _ = String(e).padStart(4, "0"), f = String(r + 1).padStart(2, "0");
|
|
3775
|
-
for (let
|
|
3776
|
-
const h =
|
|
3786
|
+
for (let u = 0; u < o; u++) {
|
|
3787
|
+
const h = u - a + 1;
|
|
3777
3788
|
h < 1 || h > s ? i.push(null) : i.push({
|
|
3778
3789
|
key: `${_}-${f}-${String(h).padStart(2, "0")}`,
|
|
3779
3790
|
day: h
|
|
@@ -3896,13 +3907,13 @@ function Po({
|
|
|
3896
3907
|
] });
|
|
3897
3908
|
}
|
|
3898
3909
|
export {
|
|
3899
|
-
|
|
3910
|
+
Ao as AddressEntry,
|
|
3900
3911
|
Ro as AddressMap,
|
|
3901
3912
|
Oo as AddressUnitConfirmation,
|
|
3902
3913
|
Bo as DtcOnboardingFlow,
|
|
3903
|
-
|
|
3914
|
+
Do as OpendoorProvider,
|
|
3904
3915
|
Mo as ScheduleAssessmentFlow,
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3916
|
+
lr as THEMES,
|
|
3917
|
+
cr as resolveAppearance,
|
|
3918
|
+
kt as useOpendoorClient
|
|
3908
3919
|
};
|