@sprig-technologies/sprig-bundled 2.37.0 → 2.38.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/{index-M_lw8BlN.cjs → index-BvoTbkev.cjs} +23 -29
- package/dist/{index-BO6_4fuH.js → index-CPT0Y_x9.js} +1494 -1520
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +41 -3
- package/dist/index.js +1 -1
- package/dist/view-CX9hYdLA.js +2224 -0
- package/dist/view-qbFF2KYJ.cjs +12 -0
- package/package.json +1 -1
- package/dist/view-BLTLs8qM.js +0 -2260
- package/dist/view-CiIcnVI2.cjs +0 -12
package/dist/view-BLTLs8qM.js
DELETED
|
@@ -1,2260 +0,0 @@
|
|
|
1
|
-
import { e as it, A as Ge, s as kt, D as wi, c as Ci, S as me, a as Vt, C as dr, b as mr, d as Si, i as Ti, E as Ii, f as ot, g as ae, h as Yt, r as Ei, j as Li, v as pr, k as fr } from "./index-BO6_4fuH.js";
|
|
2
|
-
var ct, M, un, je, vr, cn, Bt, dn, ut = {}, mn = [], Oi = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, Tt = Array.isArray;
|
|
3
|
-
function Oe(e, t) {
|
|
4
|
-
for (var r in t) e[r] = t[r];
|
|
5
|
-
return e;
|
|
6
|
-
}
|
|
7
|
-
function pn(e) {
|
|
8
|
-
var t = e.parentNode;
|
|
9
|
-
t && t.removeChild(e);
|
|
10
|
-
}
|
|
11
|
-
function se(e, t, r) {
|
|
12
|
-
var n, i, o, a = {};
|
|
13
|
-
for (o in t) o == "key" ? n = t[o] : o == "ref" ? i = t[o] : a[o] = t[o];
|
|
14
|
-
if (arguments.length > 2 && (a.children = arguments.length > 3 ? ct.call(arguments, 2) : r), typeof e == "function" && e.defaultProps != null) for (o in e.defaultProps) a[o] === void 0 && (a[o] = e.defaultProps[o]);
|
|
15
|
-
return lt(e, a, n, i, null);
|
|
16
|
-
}
|
|
17
|
-
function lt(e, t, r, n, i) {
|
|
18
|
-
var o = { type: e, props: t, key: r, ref: n, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: i ?? ++un, __i: -1, __u: 0 };
|
|
19
|
-
return i == null && M.vnode != null && M.vnode(o), o;
|
|
20
|
-
}
|
|
21
|
-
function fn() {
|
|
22
|
-
return { current: null };
|
|
23
|
-
}
|
|
24
|
-
function Y(e) {
|
|
25
|
-
return e.children;
|
|
26
|
-
}
|
|
27
|
-
function he(e, t) {
|
|
28
|
-
this.props = e, this.context = t;
|
|
29
|
-
}
|
|
30
|
-
function Ke(e, t) {
|
|
31
|
-
if (t == null) return e.__ ? Ke(e.__, e.__i + 1) : null;
|
|
32
|
-
for (var r; t < e.__k.length; t++) if ((r = e.__k[t]) != null && r.__e != null) return r.__e;
|
|
33
|
-
return typeof e.type == "function" ? Ke(e) : null;
|
|
34
|
-
}
|
|
35
|
-
function vn(e) {
|
|
36
|
-
var t, r;
|
|
37
|
-
if ((e = e.__) != null && e.__c != null) {
|
|
38
|
-
for (e.__e = e.__c.base = null, t = 0; t < e.__k.length; t++) if ((r = e.__k[t]) != null && r.__e != null) {
|
|
39
|
-
e.__e = e.__c.base = r.__e;
|
|
40
|
-
break;
|
|
41
|
-
}
|
|
42
|
-
return vn(e);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
function Ft(e) {
|
|
46
|
-
(!e.__d && (e.__d = !0) && je.push(e) && !wt.__r++ || vr !== M.debounceRendering) && ((vr = M.debounceRendering) || cn)(wt);
|
|
47
|
-
}
|
|
48
|
-
function wt() {
|
|
49
|
-
var e, t, r, n, i, o, a, s, c;
|
|
50
|
-
for (je.sort(Bt); e = je.shift(); ) e.__d && (t = je.length, n = void 0, o = (i = (r = e).__v).__e, s = [], c = [], (a = r.__P) && ((n = Oe({}, i)).__v = i.__v + 1, M.vnode && M.vnode(n), Jt(a, n, i, r.__n, a.ownerSVGElement !== void 0, 32 & i.__u ? [o] : null, s, o ?? Ke(i), !!(32 & i.__u), c), n.__.__k[n.__i] = n, gn(s, n, c), n.__e != o && vn(n)), je.length > t && je.sort(Bt));
|
|
51
|
-
wt.__r = 0;
|
|
52
|
-
}
|
|
53
|
-
function bn(e, t, r, n, i, o, a, s, c, p, m) {
|
|
54
|
-
var u, f, v, d, h, b = n && n.__k || mn, y = t.length;
|
|
55
|
-
for (r.__d = c, function(g, w, T) {
|
|
56
|
-
var x, S, N, L, E, P = w.length, _ = T.length, C = _, I = 0;
|
|
57
|
-
for (g.__k = [], x = 0; x < P; x++) (S = g.__k[x] = (S = w[x]) == null || typeof S == "boolean" || typeof S == "function" ? null : typeof S == "string" || typeof S == "number" || typeof S == "bigint" || S.constructor == String ? lt(null, S, null, null, S) : Tt(S) ? lt(Y, { children: S }, null, null, null) : S.constructor === void 0 && S.__b > 0 ? lt(S.type, S.props, S.key, S.ref ? S.ref : null, S.__v) : S) != null ? (S.__ = g, S.__b = g.__b + 1, E = Pi(S, T, L = x + I, C), S.__i = E, N = null, E !== -1 && (C--, (N = T[E]) && (N.__u |= 131072)), N == null || N.__v === null ? (E == -1 && I--, typeof S.type != "function" && (S.__u |= 65536)) : E !== L && (E === L + 1 ? I++ : E > L ? C > P - L ? I += E - L : I-- : I = E < L && E == L - 1 ? E - L : 0, E !== x + I && (S.__u |= 65536))) : (N = T[x]) && N.key == null && N.__e && (N.__e == g.__d && (g.__d = Ke(N)), jt(N, N, !1), T[x] = null, C--);
|
|
58
|
-
if (C) for (x = 0; x < _; x++) (N = T[x]) != null && !(131072 & N.__u) && (N.__e == g.__d && (g.__d = Ke(N)), jt(N, N));
|
|
59
|
-
}(r, t, b), c = r.__d, u = 0; u < y; u++) (v = r.__k[u]) != null && typeof v != "boolean" && typeof v != "function" && (f = v.__i === -1 ? ut : b[v.__i] || ut, v.__i = u, Jt(e, v, f, i, o, a, s, c, p, m), d = v.__e, v.ref && f.ref != v.ref && (f.ref && Xt(f.ref, null, v), m.push(v.ref, v.__c || d, v)), h == null && d != null && (h = d), 65536 & v.__u || f.__k === v.__k ? c = hn(v, c, e) : typeof v.type == "function" && v.__d !== void 0 ? c = v.__d : d && (c = d.nextSibling), v.__d = void 0, v.__u &= -196609);
|
|
60
|
-
r.__d = c, r.__e = h;
|
|
61
|
-
}
|
|
62
|
-
function hn(e, t, r) {
|
|
63
|
-
var n, i;
|
|
64
|
-
if (typeof e.type == "function") {
|
|
65
|
-
for (n = e.__k, i = 0; n && i < n.length; i++) n[i] && (n[i].__ = e, t = hn(n[i], t, r));
|
|
66
|
-
return t;
|
|
67
|
-
}
|
|
68
|
-
return e.__e != t && (r.insertBefore(e.__e, t || null), t = e.__e), t && t.nextSibling;
|
|
69
|
-
}
|
|
70
|
-
function Pe(e, t) {
|
|
71
|
-
return t = t || [], e == null || typeof e == "boolean" || (Tt(e) ? e.some(function(r) {
|
|
72
|
-
Pe(r, t);
|
|
73
|
-
}) : t.push(e)), t;
|
|
74
|
-
}
|
|
75
|
-
function Pi(e, t, r, n) {
|
|
76
|
-
var i = e.key, o = e.type, a = r - 1, s = r + 1, c = t[r];
|
|
77
|
-
if (c === null || c && i == c.key && o === c.type) return r;
|
|
78
|
-
if (n > (c == null || 131072 & c.__u ? 0 : 1)) for (; a >= 0 || s < t.length; ) {
|
|
79
|
-
if (a >= 0) {
|
|
80
|
-
if ((c = t[a]) && !(131072 & c.__u) && i == c.key && o === c.type) return a;
|
|
81
|
-
a--;
|
|
82
|
-
}
|
|
83
|
-
if (s < t.length) {
|
|
84
|
-
if ((c = t[s]) && !(131072 & c.__u) && i == c.key && o === c.type) return s;
|
|
85
|
-
s++;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
return -1;
|
|
89
|
-
}
|
|
90
|
-
function br(e, t, r) {
|
|
91
|
-
t[0] === "-" ? e.setProperty(t, r ?? "") : e[t] = r == null ? "" : typeof r != "number" || Oi.test(t) ? r : r + "px";
|
|
92
|
-
}
|
|
93
|
-
function bt(e, t, r, n, i) {
|
|
94
|
-
var o;
|
|
95
|
-
e: if (t === "style") if (typeof r == "string") e.style.cssText = r;
|
|
96
|
-
else {
|
|
97
|
-
if (typeof n == "string" && (e.style.cssText = n = ""), n) for (t in n) r && t in r || br(e.style, t, "");
|
|
98
|
-
if (r) for (t in r) n && r[t] === n[t] || br(e.style, t, r[t]);
|
|
99
|
-
}
|
|
100
|
-
else if (t[0] === "o" && t[1] === "n") o = t !== (t = t.replace(/(PointerCapture)$|Capture$/, "$1")), t = t.toLowerCase() in e ? t.toLowerCase().slice(2) : t.slice(2), e.l || (e.l = {}), e.l[t + o] = r, r ? n ? r.u = n.u : (r.u = Date.now(), e.addEventListener(t, o ? gr : hr, o)) : e.removeEventListener(t, o ? gr : hr, o);
|
|
101
|
-
else {
|
|
102
|
-
if (i) t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
|
|
103
|
-
else if (t !== "width" && t !== "height" && t !== "href" && t !== "list" && t !== "form" && t !== "tabIndex" && t !== "download" && t !== "rowSpan" && t !== "colSpan" && t !== "role" && t in e) try {
|
|
104
|
-
e[t] = r ?? "";
|
|
105
|
-
break e;
|
|
106
|
-
} catch {
|
|
107
|
-
}
|
|
108
|
-
typeof r == "function" || (r == null || r === !1 && t[4] !== "-" ? e.removeAttribute(t) : e.setAttribute(t, r));
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
function hr(e) {
|
|
112
|
-
var t = this.l[e.type + !1];
|
|
113
|
-
if (e.t) {
|
|
114
|
-
if (e.t <= t.u) return;
|
|
115
|
-
} else e.t = Date.now();
|
|
116
|
-
return t(M.event ? M.event(e) : e);
|
|
117
|
-
}
|
|
118
|
-
function gr(e) {
|
|
119
|
-
return this.l[e.type + !0](M.event ? M.event(e) : e);
|
|
120
|
-
}
|
|
121
|
-
function Jt(e, t, r, n, i, o, a, s, c, p) {
|
|
122
|
-
var m, u, f, v, d, h, b, y, g, w, T, x, S, N, L, E = t.type;
|
|
123
|
-
if (t.constructor !== void 0) return null;
|
|
124
|
-
128 & r.__u && (c = !!(32 & r.__u), o = [s = t.__e = r.__e]), (m = M.__b) && m(t);
|
|
125
|
-
e: if (typeof E == "function") try {
|
|
126
|
-
if (y = t.props, g = (m = E.contextType) && n[m.__c], w = m ? g ? g.props.value : m.__ : n, r.__c ? b = (u = t.__c = r.__c).__ = u.__E : ("prototype" in E && E.prototype.render ? t.__c = u = new E(y, w) : (t.__c = u = new he(y, w), u.constructor = E, u.render = Ri), g && g.sub(u), u.props = y, u.state || (u.state = {}), u.context = w, u.__n = n, f = u.__d = !0, u.__h = [], u._sb = []), u.__s == null && (u.__s = u.state), E.getDerivedStateFromProps != null && (u.__s == u.state && (u.__s = Oe({}, u.__s)), Oe(u.__s, E.getDerivedStateFromProps(y, u.__s))), v = u.props, d = u.state, u.__v = t, f) E.getDerivedStateFromProps == null && u.componentWillMount != null && u.componentWillMount(), u.componentDidMount != null && u.__h.push(u.componentDidMount);
|
|
127
|
-
else {
|
|
128
|
-
if (E.getDerivedStateFromProps == null && y !== v && u.componentWillReceiveProps != null && u.componentWillReceiveProps(y, w), !u.__e && (u.shouldComponentUpdate != null && u.shouldComponentUpdate(y, u.__s, w) === !1 || t.__v === r.__v)) {
|
|
129
|
-
for (t.__v !== r.__v && (u.props = y, u.state = u.__s, u.__d = !1), t.__e = r.__e, t.__k = r.__k, t.__k.forEach(function(P) {
|
|
130
|
-
P && (P.__ = t);
|
|
131
|
-
}), T = 0; T < u._sb.length; T++) u.__h.push(u._sb[T]);
|
|
132
|
-
u._sb = [], u.__h.length && a.push(u);
|
|
133
|
-
break e;
|
|
134
|
-
}
|
|
135
|
-
u.componentWillUpdate != null && u.componentWillUpdate(y, u.__s, w), u.componentDidUpdate != null && u.__h.push(function() {
|
|
136
|
-
u.componentDidUpdate(v, d, h);
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
if (u.context = w, u.props = y, u.__P = e, u.__e = !1, x = M.__r, S = 0, "prototype" in E && E.prototype.render) {
|
|
140
|
-
for (u.state = u.__s, u.__d = !1, x && x(t), m = u.render(u.props, u.state, u.context), N = 0; N < u._sb.length; N++) u.__h.push(u._sb[N]);
|
|
141
|
-
u._sb = [];
|
|
142
|
-
} else do
|
|
143
|
-
u.__d = !1, x && x(t), m = u.render(u.props, u.state, u.context), u.state = u.__s;
|
|
144
|
-
while (u.__d && ++S < 25);
|
|
145
|
-
u.state = u.__s, u.getChildContext != null && (n = Oe(Oe({}, n), u.getChildContext())), f || u.getSnapshotBeforeUpdate == null || (h = u.getSnapshotBeforeUpdate(v, d)), bn(e, Tt(L = m != null && m.type === Y && m.key == null ? m.props.children : m) ? L : [L], t, r, n, i, o, a, s, c, p), u.base = t.__e, t.__u &= -161, u.__h.length && a.push(u), b && (u.__E = u.__ = null);
|
|
146
|
-
} catch (P) {
|
|
147
|
-
t.__v = null, c || o != null ? (t.__e = s, t.__u |= c ? 160 : 32, o[o.indexOf(s)] = null) : (t.__e = r.__e, t.__k = r.__k), M.__e(P, t, r);
|
|
148
|
-
}
|
|
149
|
-
else o == null && t.__v === r.__v ? (t.__k = r.__k, t.__e = r.__e) : t.__e = Mi(r.__e, t, r, n, i, o, a, c, p);
|
|
150
|
-
(m = M.diffed) && m(t);
|
|
151
|
-
}
|
|
152
|
-
function gn(e, t, r) {
|
|
153
|
-
t.__d = void 0;
|
|
154
|
-
for (var n = 0; n < r.length; n++) Xt(r[n], r[++n], r[++n]);
|
|
155
|
-
M.__c && M.__c(t, e), e.some(function(i) {
|
|
156
|
-
try {
|
|
157
|
-
e = i.__h, i.__h = [], e.some(function(o) {
|
|
158
|
-
o.call(i);
|
|
159
|
-
});
|
|
160
|
-
} catch (o) {
|
|
161
|
-
M.__e(o, i.__v);
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
function Mi(e, t, r, n, i, o, a, s, c) {
|
|
166
|
-
var p, m, u, f, v, d, h, b = r.props, y = t.props, g = t.type;
|
|
167
|
-
if (g === "svg" && (i = !0), o != null) {
|
|
168
|
-
for (p = 0; p < o.length; p++) if ((v = o[p]) && "setAttribute" in v == !!g && (g ? v.localName === g : v.nodeType === 3)) {
|
|
169
|
-
e = v, o[p] = null;
|
|
170
|
-
break;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
if (e == null) {
|
|
174
|
-
if (g === null) return document.createTextNode(y);
|
|
175
|
-
e = i ? document.createElementNS("http://www.w3.org/2000/svg", g) : document.createElement(g, y.is && y), o = null, s = !1;
|
|
176
|
-
}
|
|
177
|
-
if (g === null) b === y || s && e.data === y || (e.data = y);
|
|
178
|
-
else {
|
|
179
|
-
if (o = o && ct.call(e.childNodes), b = r.props || ut, !s && o != null) for (b = {}, p = 0; p < e.attributes.length; p++) b[(v = e.attributes[p]).name] = v.value;
|
|
180
|
-
for (p in b) v = b[p], p == "children" || (p == "dangerouslySetInnerHTML" ? u = v : p === "key" || p in y || bt(e, p, null, v, i));
|
|
181
|
-
for (p in y) v = y[p], p == "children" ? f = v : p == "dangerouslySetInnerHTML" ? m = v : p == "value" ? d = v : p == "checked" ? h = v : p === "key" || s && typeof v != "function" || b[p] === v || bt(e, p, v, b[p], i);
|
|
182
|
-
if (m) s || u && (m.__html === u.__html || m.__html === e.innerHTML) || (e.innerHTML = m.__html), t.__k = [];
|
|
183
|
-
else if (u && (e.innerHTML = ""), bn(e, Tt(f) ? f : [f], t, r, n, i && g !== "foreignObject", o, a, o ? o[0] : r.__k && Ke(r, 0), s, c), o != null) for (p = o.length; p--; ) o[p] != null && pn(o[p]);
|
|
184
|
-
s || (p = "value", d !== void 0 && (d !== e[p] || g === "progress" && !d || g === "option" && d !== b[p]) && bt(e, p, d, b[p], !1), p = "checked", h !== void 0 && h !== e[p] && bt(e, p, h, b[p], !1));
|
|
185
|
-
}
|
|
186
|
-
return e;
|
|
187
|
-
}
|
|
188
|
-
function Xt(e, t, r) {
|
|
189
|
-
try {
|
|
190
|
-
typeof e == "function" ? e(t) : e.current = t;
|
|
191
|
-
} catch (n) {
|
|
192
|
-
M.__e(n, r);
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
function jt(e, t, r) {
|
|
196
|
-
var n, i;
|
|
197
|
-
if (M.unmount && M.unmount(e), (n = e.ref) && (n.current && n.current !== e.__e || Xt(n, null, t)), (n = e.__c) != null) {
|
|
198
|
-
if (n.componentWillUnmount) try {
|
|
199
|
-
n.componentWillUnmount();
|
|
200
|
-
} catch (o) {
|
|
201
|
-
M.__e(o, t);
|
|
202
|
-
}
|
|
203
|
-
n.base = n.__P = null, e.__c = void 0;
|
|
204
|
-
}
|
|
205
|
-
if (n = e.__k) for (i = 0; i < n.length; i++) n[i] && jt(n[i], t, r || typeof e.type != "function");
|
|
206
|
-
r || e.__e == null || pn(e.__e), e.__ = e.__e = e.__d = void 0;
|
|
207
|
-
}
|
|
208
|
-
function Ri(e, t, r) {
|
|
209
|
-
return this.constructor(e, r);
|
|
210
|
-
}
|
|
211
|
-
function Ye(e, t, r) {
|
|
212
|
-
var n, i, o, a;
|
|
213
|
-
M.__ && M.__(e, t), i = (n = typeof r == "function") ? null : r && r.__k || t.__k, o = [], a = [], Jt(t, e = (!n && r || t).__k = se(Y, null, [e]), i || ut, ut, t.ownerSVGElement !== void 0, !n && r ? [r] : i ? null : t.firstChild ? ct.call(t.childNodes) : null, o, !n && r ? r : i ? i.__e : t.firstChild, n, a), gn(o, e, a);
|
|
214
|
-
}
|
|
215
|
-
function _n(e, t) {
|
|
216
|
-
Ye(e, t, _n);
|
|
217
|
-
}
|
|
218
|
-
function Ui(e, t, r) {
|
|
219
|
-
var n, i, o, a, s = Oe({}, e.props);
|
|
220
|
-
for (o in e.type && e.type.defaultProps && (a = e.type.defaultProps), t) o == "key" ? n = t[o] : o == "ref" ? i = t[o] : s[o] = t[o] === void 0 && a !== void 0 ? a[o] : t[o];
|
|
221
|
-
return arguments.length > 2 && (s.children = arguments.length > 3 ? ct.call(arguments, 2) : r), lt(e.type, s, n || e.key, i || e.ref, null);
|
|
222
|
-
}
|
|
223
|
-
function Nn(e, t) {
|
|
224
|
-
var r = { __c: t = "__cC" + dn++, __: e, Consumer: function(n, i) {
|
|
225
|
-
return n.children(i);
|
|
226
|
-
}, Provider: function(n) {
|
|
227
|
-
var i, o;
|
|
228
|
-
return this.getChildContext || (i = [], (o = {})[t] = this, this.getChildContext = function() {
|
|
229
|
-
return o;
|
|
230
|
-
}, this.shouldComponentUpdate = function(a) {
|
|
231
|
-
this.props.value !== a.value && i.some(function(s) {
|
|
232
|
-
s.__e = !0, Ft(s);
|
|
233
|
-
});
|
|
234
|
-
}, this.sub = function(a) {
|
|
235
|
-
i.push(a);
|
|
236
|
-
var s = a.componentWillUnmount;
|
|
237
|
-
a.componentWillUnmount = function() {
|
|
238
|
-
i.splice(i.indexOf(a), 1), s && s.call(a);
|
|
239
|
-
};
|
|
240
|
-
}), n.children;
|
|
241
|
-
} };
|
|
242
|
-
return r.Provider.__ = r.Consumer.contextType = r;
|
|
243
|
-
}
|
|
244
|
-
ct = mn.slice, M = { __e: function(e, t, r, n) {
|
|
245
|
-
for (var i, o, a; t = t.__; ) if ((i = t.__c) && !i.__) try {
|
|
246
|
-
if ((o = i.constructor) && o.getDerivedStateFromError != null && (i.setState(o.getDerivedStateFromError(e)), a = i.__d), i.componentDidCatch != null && (i.componentDidCatch(e, n || {}), a = i.__d), a) return i.__E = i;
|
|
247
|
-
} catch (s) {
|
|
248
|
-
e = s;
|
|
249
|
-
}
|
|
250
|
-
throw e;
|
|
251
|
-
} }, un = 0, he.prototype.setState = function(e, t) {
|
|
252
|
-
var r;
|
|
253
|
-
r = this.__s != null && this.__s !== this.state ? this.__s : this.__s = Oe({}, this.state), typeof e == "function" && (e = e(Oe({}, r), this.props)), e && Oe(r, e), e != null && this.__v && (t && this._sb.push(t), Ft(this));
|
|
254
|
-
}, he.prototype.forceUpdate = function(e) {
|
|
255
|
-
this.__v && (this.__e = !0, e && this.__h.push(e), Ft(this));
|
|
256
|
-
}, he.prototype.render = Y, je = [], cn = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Bt = function(e, t) {
|
|
257
|
-
return e.__v.__b - t.__v.__b;
|
|
258
|
-
}, wt.__r = 0, dn = 0;
|
|
259
|
-
var Me, Q, Rt, _r, Je = 0, yn = [], Nt = [], Nr = M.__b, yr = M.__r, xr = M.diffed, kr = M.__c, wr = M.unmount;
|
|
260
|
-
function Qe(e, t) {
|
|
261
|
-
M.__h && M.__h(Q, e, Je || t), Je = 0;
|
|
262
|
-
var r = Q.__H || (Q.__H = { __: [], __h: [] });
|
|
263
|
-
return e >= r.__.length && r.__.push({ __V: Nt }), r.__[e];
|
|
264
|
-
}
|
|
265
|
-
function z(e) {
|
|
266
|
-
return Je = 1, er(Cn, e);
|
|
267
|
-
}
|
|
268
|
-
function er(e, t, r) {
|
|
269
|
-
var n = Qe(Me++, 2);
|
|
270
|
-
if (n.t = e, !n.__c && (n.__ = [r ? r(t) : Cn(void 0, t), function(s) {
|
|
271
|
-
var c = n.__N ? n.__N[0] : n.__[0], p = n.t(c, s);
|
|
272
|
-
c !== p && (n.__N = [p, n.__[1]], n.__c.setState({}));
|
|
273
|
-
}], n.__c = Q, !Q.u)) {
|
|
274
|
-
var i = function(s, c, p) {
|
|
275
|
-
if (!n.__c.__H) return !0;
|
|
276
|
-
var m = n.__c.__H.__.filter(function(f) {
|
|
277
|
-
return f.__c;
|
|
278
|
-
});
|
|
279
|
-
if (m.every(function(f) {
|
|
280
|
-
return !f.__N;
|
|
281
|
-
})) return !o || o.call(this, s, c, p);
|
|
282
|
-
var u = !1;
|
|
283
|
-
return m.forEach(function(f) {
|
|
284
|
-
if (f.__N) {
|
|
285
|
-
var v = f.__[0];
|
|
286
|
-
f.__ = f.__N, f.__N = void 0, v !== f.__[0] && (u = !0);
|
|
287
|
-
}
|
|
288
|
-
}), !(!u && n.__c.props === s) && (!o || o.call(this, s, c, p));
|
|
289
|
-
};
|
|
290
|
-
Q.u = !0;
|
|
291
|
-
var o = Q.shouldComponentUpdate, a = Q.componentWillUpdate;
|
|
292
|
-
Q.componentWillUpdate = function(s, c, p) {
|
|
293
|
-
if (this.__e) {
|
|
294
|
-
var m = o;
|
|
295
|
-
o = void 0, i(s, c, p), o = m;
|
|
296
|
-
}
|
|
297
|
-
a && a.call(this, s, c, p);
|
|
298
|
-
}, Q.shouldComponentUpdate = i;
|
|
299
|
-
}
|
|
300
|
-
return n.__N || n.__;
|
|
301
|
-
}
|
|
302
|
-
function Z(e, t) {
|
|
303
|
-
var r = Qe(Me++, 3);
|
|
304
|
-
!M.__s && rr(r.__H, t) && (r.__ = e, r.i = t, Q.__H.__h.push(r));
|
|
305
|
-
}
|
|
306
|
-
function dt(e, t) {
|
|
307
|
-
var r = Qe(Me++, 4);
|
|
308
|
-
!M.__s && rr(r.__H, t) && (r.__ = e, r.i = t, Q.__h.push(r));
|
|
309
|
-
}
|
|
310
|
-
function te(e) {
|
|
311
|
-
return Je = 5, xe(function() {
|
|
312
|
-
return { current: e };
|
|
313
|
-
}, []);
|
|
314
|
-
}
|
|
315
|
-
function xn(e, t, r) {
|
|
316
|
-
Je = 6, dt(function() {
|
|
317
|
-
return typeof e == "function" ? (e(t()), function() {
|
|
318
|
-
return e(null);
|
|
319
|
-
}) : e ? (e.current = t(), function() {
|
|
320
|
-
return e.current = null;
|
|
321
|
-
}) : void 0;
|
|
322
|
-
}, r == null ? r : r.concat(e));
|
|
323
|
-
}
|
|
324
|
-
function xe(e, t) {
|
|
325
|
-
var r = Qe(Me++, 7);
|
|
326
|
-
return rr(r.__H, t) ? (r.__V = e(), r.i = t, r.__h = e, r.__V) : r.__;
|
|
327
|
-
}
|
|
328
|
-
function ze(e, t) {
|
|
329
|
-
return Je = 8, xe(function() {
|
|
330
|
-
return e;
|
|
331
|
-
}, t);
|
|
332
|
-
}
|
|
333
|
-
function kn(e) {
|
|
334
|
-
var t = Q.context[e.__c], r = Qe(Me++, 9);
|
|
335
|
-
return r.c = e, t ? (r.__ == null && (r.__ = !0, t.sub(Q)), t.props.value) : e.__;
|
|
336
|
-
}
|
|
337
|
-
function tr(e, t) {
|
|
338
|
-
M.useDebugValue && M.useDebugValue(t ? t(e) : e);
|
|
339
|
-
}
|
|
340
|
-
function wn() {
|
|
341
|
-
var e = Qe(Me++, 11);
|
|
342
|
-
if (!e.__) {
|
|
343
|
-
for (var t = Q.__v; t !== null && !t.__m && t.__ !== null; ) t = t.__;
|
|
344
|
-
var r = t.__m || (t.__m = [0, 0]);
|
|
345
|
-
e.__ = "P" + r[0] + "-" + r[1]++;
|
|
346
|
-
}
|
|
347
|
-
return e.__;
|
|
348
|
-
}
|
|
349
|
-
function qi() {
|
|
350
|
-
for (var e; e = yn.shift(); ) if (e.__P && e.__H) try {
|
|
351
|
-
e.__H.__h.forEach(yt), e.__H.__h.forEach($t), e.__H.__h = [];
|
|
352
|
-
} catch (t) {
|
|
353
|
-
e.__H.__h = [], M.__e(t, e.__v);
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
M.__b = function(e) {
|
|
357
|
-
Q = null, Nr && Nr(e);
|
|
358
|
-
}, M.__r = function(e) {
|
|
359
|
-
yr && yr(e), Me = 0;
|
|
360
|
-
var t = (Q = e.__c).__H;
|
|
361
|
-
t && (Rt === Q ? (t.__h = [], Q.__h = [], t.__.forEach(function(r) {
|
|
362
|
-
r.__N && (r.__ = r.__N), r.__V = Nt, r.__N = r.i = void 0;
|
|
363
|
-
})) : (t.__h.forEach(yt), t.__h.forEach($t), t.__h = [], Me = 0)), Rt = Q;
|
|
364
|
-
}, M.diffed = function(e) {
|
|
365
|
-
xr && xr(e);
|
|
366
|
-
var t = e.__c;
|
|
367
|
-
t && t.__H && (t.__H.__h.length && (yn.push(t) !== 1 && _r === M.requestAnimationFrame || ((_r = M.requestAnimationFrame) || Di)(qi)), t.__H.__.forEach(function(r) {
|
|
368
|
-
r.i && (r.__H = r.i), r.__V !== Nt && (r.__ = r.__V), r.i = void 0, r.__V = Nt;
|
|
369
|
-
})), Rt = Q = null;
|
|
370
|
-
}, M.__c = function(e, t) {
|
|
371
|
-
t.some(function(r) {
|
|
372
|
-
try {
|
|
373
|
-
r.__h.forEach(yt), r.__h = r.__h.filter(function(n) {
|
|
374
|
-
return !n.__ || $t(n);
|
|
375
|
-
});
|
|
376
|
-
} catch (n) {
|
|
377
|
-
t.some(function(i) {
|
|
378
|
-
i.__h && (i.__h = []);
|
|
379
|
-
}), t = [], M.__e(n, r.__v);
|
|
380
|
-
}
|
|
381
|
-
}), kr && kr(e, t);
|
|
382
|
-
}, M.unmount = function(e) {
|
|
383
|
-
wr && wr(e);
|
|
384
|
-
var t, r = e.__c;
|
|
385
|
-
r && r.__H && (r.__H.__.forEach(function(n) {
|
|
386
|
-
try {
|
|
387
|
-
yt(n);
|
|
388
|
-
} catch (i) {
|
|
389
|
-
t = i;
|
|
390
|
-
}
|
|
391
|
-
}), r.__H = void 0, t && M.__e(t, r.__v));
|
|
392
|
-
};
|
|
393
|
-
var Cr = typeof requestAnimationFrame == "function";
|
|
394
|
-
function Di(e) {
|
|
395
|
-
var t, r = function() {
|
|
396
|
-
clearTimeout(n), Cr && cancelAnimationFrame(t), setTimeout(e);
|
|
397
|
-
}, n = setTimeout(r, 100);
|
|
398
|
-
Cr && (t = requestAnimationFrame(r));
|
|
399
|
-
}
|
|
400
|
-
function yt(e) {
|
|
401
|
-
var t = Q, r = e.__c;
|
|
402
|
-
typeof r == "function" && (e.__c = void 0, r()), Q = t;
|
|
403
|
-
}
|
|
404
|
-
function $t(e) {
|
|
405
|
-
var t = Q;
|
|
406
|
-
e.__c = e.__(), Q = t;
|
|
407
|
-
}
|
|
408
|
-
function rr(e, t) {
|
|
409
|
-
return !e || e.length !== t.length || t.some(function(r, n) {
|
|
410
|
-
return r !== e[n];
|
|
411
|
-
});
|
|
412
|
-
}
|
|
413
|
-
function Cn(e, t) {
|
|
414
|
-
return typeof t == "function" ? t(e) : t;
|
|
415
|
-
}
|
|
416
|
-
function Sn(e, t) {
|
|
417
|
-
for (var r in t) e[r] = t[r];
|
|
418
|
-
return e;
|
|
419
|
-
}
|
|
420
|
-
function zt(e, t) {
|
|
421
|
-
for (var r in e) if (r !== "__source" && !(r in t)) return !0;
|
|
422
|
-
for (var n in t) if (n !== "__source" && e[n] !== t[n]) return !0;
|
|
423
|
-
return !1;
|
|
424
|
-
}
|
|
425
|
-
function Ct(e) {
|
|
426
|
-
this.props = e;
|
|
427
|
-
}
|
|
428
|
-
function Tn(e, t) {
|
|
429
|
-
function r(i) {
|
|
430
|
-
var o = this.props.ref, a = o == i.ref;
|
|
431
|
-
return !a && o && (o.call ? o(null) : o.current = null), t ? !t(this.props, i) || !a : zt(this.props, i);
|
|
432
|
-
}
|
|
433
|
-
function n(i) {
|
|
434
|
-
return this.shouldComponentUpdate = r, se(e, i);
|
|
435
|
-
}
|
|
436
|
-
return n.displayName = "Memo(" + (e.displayName || e.name) + ")", n.prototype.isReactComponent = !0, n.__f = !0, n;
|
|
437
|
-
}
|
|
438
|
-
(Ct.prototype = new he()).isPureReactComponent = !0, Ct.prototype.shouldComponentUpdate = function(e, t) {
|
|
439
|
-
return zt(this.props, e) || zt(this.state, t);
|
|
440
|
-
};
|
|
441
|
-
var Sr = M.__b;
|
|
442
|
-
M.__b = function(e) {
|
|
443
|
-
e.type && e.type.__f && e.ref && (e.props.ref = e.ref, e.ref = null), Sr && Sr(e);
|
|
444
|
-
};
|
|
445
|
-
var Hi = typeof Symbol < "u" && Symbol.for && Symbol.for("react.forward_ref") || 3911;
|
|
446
|
-
function nr(e) {
|
|
447
|
-
function t(r) {
|
|
448
|
-
var n = Sn({}, r);
|
|
449
|
-
return delete n.ref, e(n, r.ref || null);
|
|
450
|
-
}
|
|
451
|
-
return t.$$typeof = Hi, t.render = t, t.prototype.isReactComponent = t.__f = !0, t.displayName = "ForwardRef(" + (e.displayName || e.name) + ")", t;
|
|
452
|
-
}
|
|
453
|
-
var Tr = function(e, t) {
|
|
454
|
-
return e == null ? null : Pe(Pe(e).map(t));
|
|
455
|
-
}, In = { map: Tr, forEach: Tr, count: function(e) {
|
|
456
|
-
return e ? Pe(e).length : 0;
|
|
457
|
-
}, only: function(e) {
|
|
458
|
-
var t = Pe(e);
|
|
459
|
-
if (t.length !== 1) throw "Children.only";
|
|
460
|
-
return t[0];
|
|
461
|
-
}, toArray: Pe }, Ai = M.__e;
|
|
462
|
-
M.__e = function(e, t, r, n) {
|
|
463
|
-
if (e.then) {
|
|
464
|
-
for (var i, o = t; o = o.__; ) if ((i = o.__c) && i.__c) return t.__e == null && (t.__e = r.__e, t.__k = r.__k), i.__c(e, t);
|
|
465
|
-
}
|
|
466
|
-
Ai(e, t, r, n);
|
|
467
|
-
};
|
|
468
|
-
var Ir = M.unmount;
|
|
469
|
-
function En(e, t, r) {
|
|
470
|
-
return e && (e.__c && e.__c.__H && (e.__c.__H.__.forEach(function(n) {
|
|
471
|
-
typeof n.__c == "function" && n.__c();
|
|
472
|
-
}), e.__c.__H = null), (e = Sn({}, e)).__c != null && (e.__c.__P === r && (e.__c.__P = t), e.__c = null), e.__k = e.__k && e.__k.map(function(n) {
|
|
473
|
-
return En(n, t, r);
|
|
474
|
-
})), e;
|
|
475
|
-
}
|
|
476
|
-
function Ln(e, t, r) {
|
|
477
|
-
return e && r && (e.__v = null, e.__k = e.__k && e.__k.map(function(n) {
|
|
478
|
-
return Ln(n, t, r);
|
|
479
|
-
}), e.__c && e.__c.__P === t && (e.__e && r.appendChild(e.__e), e.__c.__e = !0, e.__c.__P = r)), e;
|
|
480
|
-
}
|
|
481
|
-
function at() {
|
|
482
|
-
this.__u = 0, this.t = null, this.__b = null;
|
|
483
|
-
}
|
|
484
|
-
function On(e) {
|
|
485
|
-
var t = e.__.__c;
|
|
486
|
-
return t && t.__a && t.__a(e);
|
|
487
|
-
}
|
|
488
|
-
function Pn(e) {
|
|
489
|
-
var t, r, n;
|
|
490
|
-
function i(o) {
|
|
491
|
-
if (t || (t = e()).then(function(a) {
|
|
492
|
-
r = a.default || a;
|
|
493
|
-
}, function(a) {
|
|
494
|
-
n = a;
|
|
495
|
-
}), n) throw n;
|
|
496
|
-
if (!r) throw t;
|
|
497
|
-
return se(r, o);
|
|
498
|
-
}
|
|
499
|
-
return i.displayName = "Lazy", i.__f = !0, i;
|
|
500
|
-
}
|
|
501
|
-
function Ze() {
|
|
502
|
-
this.u = null, this.o = null;
|
|
503
|
-
}
|
|
504
|
-
M.unmount = function(e) {
|
|
505
|
-
var t = e.__c;
|
|
506
|
-
t && t.__R && t.__R(), t && 32 & e.__u && (e.type = null), Ir && Ir(e);
|
|
507
|
-
}, (at.prototype = new he()).__c = function(e, t) {
|
|
508
|
-
var r = t.__c, n = this;
|
|
509
|
-
n.t == null && (n.t = []), n.t.push(r);
|
|
510
|
-
var i = On(n.__v), o = !1, a = function() {
|
|
511
|
-
o || (o = !0, r.__R = null, i ? i(s) : s());
|
|
512
|
-
};
|
|
513
|
-
r.__R = a;
|
|
514
|
-
var s = function() {
|
|
515
|
-
if (!--n.__u) {
|
|
516
|
-
if (n.state.__a) {
|
|
517
|
-
var c = n.state.__a;
|
|
518
|
-
n.__v.__k[0] = Ln(c, c.__c.__P, c.__c.__O);
|
|
519
|
-
}
|
|
520
|
-
var p;
|
|
521
|
-
for (n.setState({ __a: n.__b = null }); p = n.t.pop(); ) p.forceUpdate();
|
|
522
|
-
}
|
|
523
|
-
};
|
|
524
|
-
n.__u++ || 32 & t.__u || n.setState({ __a: n.__b = n.__v.__k[0] }), e.then(a, a);
|
|
525
|
-
}, at.prototype.componentWillUnmount = function() {
|
|
526
|
-
this.t = [];
|
|
527
|
-
}, at.prototype.render = function(e, t) {
|
|
528
|
-
if (this.__b) {
|
|
529
|
-
if (this.__v.__k) {
|
|
530
|
-
var r = document.createElement("div"), n = this.__v.__k[0].__c;
|
|
531
|
-
this.__v.__k[0] = En(this.__b, r, n.__O = n.__P);
|
|
532
|
-
}
|
|
533
|
-
this.__b = null;
|
|
534
|
-
}
|
|
535
|
-
var i = t.__a && se(Y, null, e.fallback);
|
|
536
|
-
return i && (i.__u &= -33), [se(Y, null, t.__a ? null : e.children), i];
|
|
537
|
-
};
|
|
538
|
-
var Er = function(e, t, r) {
|
|
539
|
-
if (++r[1] === r[0] && e.o.delete(t), e.props.revealOrder && (e.props.revealOrder[0] !== "t" || !e.o.size)) for (r = e.u; r; ) {
|
|
540
|
-
for (; r.length > 3; ) r.pop()();
|
|
541
|
-
if (r[1] < r[0]) break;
|
|
542
|
-
e.u = r = r[2];
|
|
543
|
-
}
|
|
544
|
-
};
|
|
545
|
-
function Vi(e) {
|
|
546
|
-
return this.getChildContext = function() {
|
|
547
|
-
return e.context;
|
|
548
|
-
}, e.children;
|
|
549
|
-
}
|
|
550
|
-
function Bi(e) {
|
|
551
|
-
var t = this, r = e.i;
|
|
552
|
-
t.componentWillUnmount = function() {
|
|
553
|
-
Ye(null, t.l), t.l = null, t.i = null;
|
|
554
|
-
}, t.i && t.i !== r && t.componentWillUnmount(), t.l || (t.i = r, t.l = { nodeType: 1, parentNode: r, childNodes: [], appendChild: function(n) {
|
|
555
|
-
this.childNodes.push(n), t.i.appendChild(n);
|
|
556
|
-
}, insertBefore: function(n, i) {
|
|
557
|
-
this.childNodes.push(n), t.i.appendChild(n);
|
|
558
|
-
}, removeChild: function(n) {
|
|
559
|
-
this.childNodes.splice(this.childNodes.indexOf(n) >>> 1, 1), t.i.removeChild(n);
|
|
560
|
-
} }), Ye(se(Vi, { context: t.context }, e.__v), t.l);
|
|
561
|
-
}
|
|
562
|
-
function Mn(e, t) {
|
|
563
|
-
var r = se(Bi, { __v: e, i: t });
|
|
564
|
-
return r.containerInfo = t, r;
|
|
565
|
-
}
|
|
566
|
-
(Ze.prototype = new he()).__a = function(e) {
|
|
567
|
-
var t = this, r = On(t.__v), n = t.o.get(e);
|
|
568
|
-
return n[0]++, function(i) {
|
|
569
|
-
var o = function() {
|
|
570
|
-
t.props.revealOrder ? (n.push(i), Er(t, e, n)) : i();
|
|
571
|
-
};
|
|
572
|
-
r ? r(o) : o();
|
|
573
|
-
};
|
|
574
|
-
}, Ze.prototype.render = function(e) {
|
|
575
|
-
this.u = null, this.o = /* @__PURE__ */ new Map();
|
|
576
|
-
var t = Pe(e.children);
|
|
577
|
-
e.revealOrder && e.revealOrder[0] === "b" && t.reverse();
|
|
578
|
-
for (var r = t.length; r--; ) this.o.set(t[r], this.u = [1, 0, this.u]);
|
|
579
|
-
return e.children;
|
|
580
|
-
}, Ze.prototype.componentDidUpdate = Ze.prototype.componentDidMount = function() {
|
|
581
|
-
var e = this;
|
|
582
|
-
this.o.forEach(function(t, r) {
|
|
583
|
-
Er(e, r, t);
|
|
584
|
-
});
|
|
585
|
-
};
|
|
586
|
-
var Rn = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, Fi = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, ji = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, $i = /[A-Z0-9]/g, zi = typeof document < "u", Qi = function(e) {
|
|
587
|
-
return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(e);
|
|
588
|
-
};
|
|
589
|
-
function Un(e, t, r) {
|
|
590
|
-
return t.__k == null && (t.textContent = ""), Ye(e, t), typeof r == "function" && r(), e ? e.__c : null;
|
|
591
|
-
}
|
|
592
|
-
function qn(e, t, r) {
|
|
593
|
-
return _n(e, t), typeof r == "function" && r(), e ? e.__c : null;
|
|
594
|
-
}
|
|
595
|
-
he.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(e) {
|
|
596
|
-
Object.defineProperty(he.prototype, e, { configurable: !0, get: function() {
|
|
597
|
-
return this["UNSAFE_" + e];
|
|
598
|
-
}, set: function(t) {
|
|
599
|
-
Object.defineProperty(this, e, { configurable: !0, writable: !0, value: t });
|
|
600
|
-
} });
|
|
601
|
-
});
|
|
602
|
-
var Lr = M.event;
|
|
603
|
-
function Wi() {
|
|
604
|
-
}
|
|
605
|
-
function Zi() {
|
|
606
|
-
return this.cancelBubble;
|
|
607
|
-
}
|
|
608
|
-
function Gi() {
|
|
609
|
-
return this.defaultPrevented;
|
|
610
|
-
}
|
|
611
|
-
M.event = function(e) {
|
|
612
|
-
return Lr && (e = Lr(e)), e.persist = Wi, e.isPropagationStopped = Zi, e.isDefaultPrevented = Gi, e.nativeEvent = e;
|
|
613
|
-
};
|
|
614
|
-
var ir, Ki = { enumerable: !1, configurable: !0, get: function() {
|
|
615
|
-
return this.class;
|
|
616
|
-
} }, Or = M.vnode;
|
|
617
|
-
M.vnode = function(e) {
|
|
618
|
-
typeof e.type == "string" && function(t) {
|
|
619
|
-
var r = t.props, n = t.type, i = {};
|
|
620
|
-
for (var o in r) {
|
|
621
|
-
var a = r[o];
|
|
622
|
-
if (!(o === "value" && "defaultValue" in r && a == null || zi && o === "children" && n === "noscript" || o === "class" || o === "className")) {
|
|
623
|
-
var s = o.toLowerCase();
|
|
624
|
-
o === "defaultValue" && "value" in r && r.value == null ? o = "value" : o === "download" && a === !0 ? a = "" : s === "ondoubleclick" ? o = "ondblclick" : s !== "onchange" || n !== "input" && n !== "textarea" || Qi(r.type) ? s === "onfocus" ? o = "onfocusin" : s === "onblur" ? o = "onfocusout" : ji.test(o) ? o = s : n.indexOf("-") === -1 && Fi.test(o) ? o = o.replace($i, "-$&").toLowerCase() : a === null && (a = void 0) : s = o = "oninput", s === "oninput" && i[o = s] && (o = "oninputCapture"), i[o] = a;
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
n == "select" && i.multiple && Array.isArray(i.value) && (i.value = Pe(r.children).forEach(function(c) {
|
|
628
|
-
c.props.selected = i.value.indexOf(c.props.value) != -1;
|
|
629
|
-
})), n == "select" && i.defaultValue != null && (i.value = Pe(r.children).forEach(function(c) {
|
|
630
|
-
c.props.selected = i.multiple ? i.defaultValue.indexOf(c.props.value) != -1 : i.defaultValue == c.props.value;
|
|
631
|
-
})), r.class && !r.className ? (i.class = r.class, Object.defineProperty(i, "className", Ki)) : (r.className && !r.class || r.class && r.className) && (i.class = i.className = r.className), t.props = i;
|
|
632
|
-
}(e), e.$$typeof = Rn, Or && Or(e);
|
|
633
|
-
};
|
|
634
|
-
var Pr = M.__r;
|
|
635
|
-
M.__r = function(e) {
|
|
636
|
-
Pr && Pr(e), ir = e.__c;
|
|
637
|
-
};
|
|
638
|
-
var Mr = M.diffed;
|
|
639
|
-
M.diffed = function(e) {
|
|
640
|
-
Mr && Mr(e);
|
|
641
|
-
var t = e.props, r = e.__e;
|
|
642
|
-
r != null && e.type === "textarea" && "value" in t && t.value !== r.value && (r.value = t.value == null ? "" : t.value), ir = null;
|
|
643
|
-
};
|
|
644
|
-
var Dn = { ReactCurrentDispatcher: { current: { readContext: function(e) {
|
|
645
|
-
return ir.__n[e.__c].props.value;
|
|
646
|
-
} } } };
|
|
647
|
-
function Hn(e) {
|
|
648
|
-
return se.bind(null, e);
|
|
649
|
-
}
|
|
650
|
-
function mt(e) {
|
|
651
|
-
return !!e && e.$$typeof === Rn;
|
|
652
|
-
}
|
|
653
|
-
function An(e) {
|
|
654
|
-
return mt(e) && e.type === Y;
|
|
655
|
-
}
|
|
656
|
-
function Vn(e) {
|
|
657
|
-
return mt(e) ? Ui.apply(null, arguments) : e;
|
|
658
|
-
}
|
|
659
|
-
function or(e) {
|
|
660
|
-
return !!e.__k && (Ye(null, e), !0);
|
|
661
|
-
}
|
|
662
|
-
function Bn(e) {
|
|
663
|
-
return e && (e.base || e.nodeType === 1 && e) || null;
|
|
664
|
-
}
|
|
665
|
-
var Fn = function(e, t) {
|
|
666
|
-
return e(t);
|
|
667
|
-
}, jn = function(e, t) {
|
|
668
|
-
return e(t);
|
|
669
|
-
}, $n = Y;
|
|
670
|
-
function lr(e) {
|
|
671
|
-
e();
|
|
672
|
-
}
|
|
673
|
-
function zn(e) {
|
|
674
|
-
return e;
|
|
675
|
-
}
|
|
676
|
-
function Qn() {
|
|
677
|
-
return [!1, lr];
|
|
678
|
-
}
|
|
679
|
-
var Wn = dt, Zn = mt;
|
|
680
|
-
function Gn(e, t) {
|
|
681
|
-
var r = t(), n = z({ h: { __: r, v: t } }), i = n[0].h, o = n[1];
|
|
682
|
-
return dt(function() {
|
|
683
|
-
i.__ = r, i.v = t, Ut(i) && o({ h: i });
|
|
684
|
-
}, [e, r, t]), Z(function() {
|
|
685
|
-
return Ut(i) && o({ h: i }), e(function() {
|
|
686
|
-
Ut(i) && o({ h: i });
|
|
687
|
-
});
|
|
688
|
-
}, [e]), r;
|
|
689
|
-
}
|
|
690
|
-
function Ut(e) {
|
|
691
|
-
var t, r, n = e.v, i = e.__;
|
|
692
|
-
try {
|
|
693
|
-
var o = n();
|
|
694
|
-
return !((t = i) === (r = o) && (t !== 0 || 1 / t == 1 / r) || t != t && r != r);
|
|
695
|
-
} catch {
|
|
696
|
-
return !0;
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
var Yi = { useState: z, useId: wn, useReducer: er, useEffect: Z, useLayoutEffect: dt, useInsertionEffect: Wn, useTransition: Qn, useDeferredValue: zn, useSyncExternalStore: Gn, startTransition: lr, useRef: te, useImperativeHandle: xn, useMemo: xe, useCallback: ze, useContext: kn, useDebugValue: tr, version: "17.0.2", Children: In, render: Un, hydrate: qn, unmountComponentAtNode: or, createPortal: Mn, createElement: se, createContext: Nn, createFactory: Hn, cloneElement: Vn, createRef: fn, Fragment: Y, isValidElement: mt, isElement: Zn, isFragment: An, findDOMNode: Bn, Component: he, PureComponent: Ct, memo: Tn, forwardRef: nr, flushSync: jn, unstable_batchedUpdates: Fn, StrictMode: $n, Suspense: at, SuspenseList: Ze, lazy: Pn, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Dn };
|
|
700
|
-
const Ji = Object.freeze(Object.defineProperty({ __proto__: null, Children: In, Component: he, Fragment: Y, PureComponent: Ct, StrictMode: $n, Suspense: at, SuspenseList: Ze, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Dn, cloneElement: Vn, createContext: Nn, createElement: se, createFactory: Hn, createPortal: Mn, createRef: fn, default: Yi, findDOMNode: Bn, flushSync: jn, forwardRef: nr, hydrate: qn, isElement: Zn, isFragment: An, isValidElement: mt, lazy: Pn, memo: Tn, render: Un, startTransition: lr, unmountComponentAtNode: or, unstable_batchedUpdates: Fn, useCallback: ze, useContext: kn, useDebugValue: tr, useDeferredValue: zn, useEffect: Z, useErrorBoundary: function(e) {
|
|
701
|
-
var t = Qe(Me++, 10), r = z();
|
|
702
|
-
return t.__ = e, Q.componentDidCatch || (Q.componentDidCatch = function(n, i) {
|
|
703
|
-
t.__ && t.__(n, i), r[1](n);
|
|
704
|
-
}), [r[0], function() {
|
|
705
|
-
r[1](void 0);
|
|
706
|
-
}];
|
|
707
|
-
}, useId: wn, useImperativeHandle: xn, useInsertionEffect: Wn, useLayoutEffect: dt, useMemo: xe, useReducer: er, useRef: te, useState: z, useSyncExternalStore: Gn, useTransition: Qn, version: "17.0.2" }, Symbol.toStringTag, { value: "Module" }));
|
|
708
|
-
function U(e, t) {
|
|
709
|
-
return M.__a && M.__a(t), e;
|
|
710
|
-
}
|
|
711
|
-
typeof window < "u" && window.__PREACT_DEVTOOLS__ && window.__PREACT_DEVTOOLS__.attachPreact("10.19.3", M, { Fragment: Y, Component: he });
|
|
712
|
-
const Rr = (e) => {
|
|
713
|
-
let t;
|
|
714
|
-
const r = /* @__PURE__ */ new Set(), n = (a, s) => {
|
|
715
|
-
const c = typeof a == "function" ? a(t) : a;
|
|
716
|
-
if (!Object.is(c, t)) {
|
|
717
|
-
const p = t;
|
|
718
|
-
t = s ?? typeof c != "object" ? c : Object.assign({}, t, c), r.forEach((m) => m(t, p));
|
|
719
|
-
}
|
|
720
|
-
}, i = () => t, o = { setState: n, getState: i, subscribe: (a) => (r.add(a), () => r.delete(a)), destroy: () => r.clear() };
|
|
721
|
-
return t = e(n, i, o), o;
|
|
722
|
-
};
|
|
723
|
-
function Xi(e) {
|
|
724
|
-
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
725
|
-
}
|
|
726
|
-
function eo(e) {
|
|
727
|
-
if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e;
|
|
728
|
-
var t = e.default;
|
|
729
|
-
if (typeof t == "function") {
|
|
730
|
-
var r = function n() {
|
|
731
|
-
return this instanceof n ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments);
|
|
732
|
-
};
|
|
733
|
-
r.prototype = t.prototype;
|
|
734
|
-
} else r = {};
|
|
735
|
-
return Object.defineProperty(r, "__esModule", { value: !0 }), Object.keys(e).forEach(function(n) {
|
|
736
|
-
var i = Object.getOwnPropertyDescriptor(e, n);
|
|
737
|
-
Object.defineProperty(r, n, i.get ? i : { enumerable: !0, get: function() {
|
|
738
|
-
return e[n];
|
|
739
|
-
} });
|
|
740
|
-
}), r;
|
|
741
|
-
}
|
|
742
|
-
var Ur = { exports: {} }, qr = {};
|
|
743
|
-
const Kn = eo(Ji);
|
|
744
|
-
var Dr, Hr, Ar, Vr, Br = { exports: {} }, Fr = {};
|
|
745
|
-
function to() {
|
|
746
|
-
return Dr || (Dr = 1, function() {
|
|
747
|
-
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
748
|
-
var e = Kn, t = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
749
|
-
function r(v) {
|
|
750
|
-
for (var d = arguments.length, h = new Array(d > 1 ? d - 1 : 0), b = 1; b < d; b++) h[b - 1] = arguments[b];
|
|
751
|
-
(function(y, g, w) {
|
|
752
|
-
var T = t.ReactDebugCurrentFrame.getStackAddendum();
|
|
753
|
-
T !== "" && (g += "%s", w = w.concat([T]));
|
|
754
|
-
var x = w.map(function(S) {
|
|
755
|
-
return String(S);
|
|
756
|
-
});
|
|
757
|
-
x.unshift("Warning: " + g), Function.prototype.apply.call(console[y], console, x);
|
|
758
|
-
})("error", v, h);
|
|
759
|
-
}
|
|
760
|
-
var n = typeof Object.is == "function" ? Object.is : function(v, d) {
|
|
761
|
-
return v === d && (v !== 0 || 1 / v == 1 / d) || v != v && d != d;
|
|
762
|
-
}, i = e.useState, o = e.useEffect, a = e.useLayoutEffect, s = e.useDebugValue, c = !1, p = !1;
|
|
763
|
-
function m(v) {
|
|
764
|
-
var d = v.getSnapshot, h = v.value;
|
|
765
|
-
try {
|
|
766
|
-
var b = d();
|
|
767
|
-
return !n(h, b);
|
|
768
|
-
} catch {
|
|
769
|
-
return !0;
|
|
770
|
-
}
|
|
771
|
-
}
|
|
772
|
-
var u = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? function(v, d, h) {
|
|
773
|
-
return d();
|
|
774
|
-
} : function(v, d, h) {
|
|
775
|
-
c || e.startTransition !== void 0 && (c = !0, r("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
|
|
776
|
-
var b = d();
|
|
777
|
-
if (!p) {
|
|
778
|
-
var y = d();
|
|
779
|
-
n(b, y) || (r("The result of getSnapshot should be cached to avoid an infinite loop"), p = !0);
|
|
780
|
-
}
|
|
781
|
-
var g = i({ inst: { value: b, getSnapshot: d } }), w = g[0].inst, T = g[1];
|
|
782
|
-
return a(function() {
|
|
783
|
-
w.value = b, w.getSnapshot = d, m(w) && T({ inst: w });
|
|
784
|
-
}, [v, b, d]), o(function() {
|
|
785
|
-
return m(w) && T({ inst: w }), v(function() {
|
|
786
|
-
m(w) && T({ inst: w });
|
|
787
|
-
});
|
|
788
|
-
}, [v]), s(b), b;
|
|
789
|
-
}, f = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : u;
|
|
790
|
-
Fr.useSyncExternalStore = f, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
791
|
-
}()), Fr;
|
|
792
|
-
}
|
|
793
|
-
function ro() {
|
|
794
|
-
return Hr || (Hr = 1, Br.exports = to()), Br.exports;
|
|
795
|
-
}
|
|
796
|
-
var no = (Vr || (Vr = 1, Ur.exports = (Ar || (Ar = 1, function() {
|
|
797
|
-
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
798
|
-
var e = Kn, t = ro(), r = typeof Object.is == "function" ? Object.is : function(c, p) {
|
|
799
|
-
return c === p && (c !== 0 || 1 / c == 1 / p) || c != c && p != p;
|
|
800
|
-
}, n = t.useSyncExternalStore, i = e.useRef, o = e.useEffect, a = e.useMemo, s = e.useDebugValue;
|
|
801
|
-
qr.useSyncExternalStoreWithSelector = function(c, p, m, u, f) {
|
|
802
|
-
var v, d = i(null);
|
|
803
|
-
d.current === null ? (v = { hasValue: !1, value: null }, d.current = v) : v = d.current;
|
|
804
|
-
var h = a(function() {
|
|
805
|
-
var w, T, x = !1, S = function(L) {
|
|
806
|
-
if (!x) {
|
|
807
|
-
x = !0, w = L;
|
|
808
|
-
var E = u(L);
|
|
809
|
-
if (f !== void 0 && v.hasValue) {
|
|
810
|
-
var P = v.value;
|
|
811
|
-
if (f(P, E)) return T = P, P;
|
|
812
|
-
}
|
|
813
|
-
return T = E, E;
|
|
814
|
-
}
|
|
815
|
-
var _ = T;
|
|
816
|
-
if (r(w, L)) return _;
|
|
817
|
-
var C = u(L);
|
|
818
|
-
return f !== void 0 && f(_, C) ? _ : (w = L, T = C, C);
|
|
819
|
-
}, N = m === void 0 ? null : m;
|
|
820
|
-
return [function() {
|
|
821
|
-
return S(p());
|
|
822
|
-
}, N === null ? void 0 : function() {
|
|
823
|
-
return S(N());
|
|
824
|
-
}];
|
|
825
|
-
}, [p, m, u, f]), b = h[0], y = h[1], g = n(c, b, y);
|
|
826
|
-
return o(function() {
|
|
827
|
-
v.hasValue = !0, v.value = g;
|
|
828
|
-
}, [g]), s(g), g;
|
|
829
|
-
}, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
830
|
-
}()), qr)), Ur.exports);
|
|
831
|
-
const io = Xi(no), { useSyncExternalStoreWithSelector: oo } = io, jr = (e) => {
|
|
832
|
-
const t = typeof e == "function" ? ((n) => n ? Rr(n) : Rr)(e) : e, r = (n, i) => function(o, a = o.getState, s) {
|
|
833
|
-
const c = oo(o.subscribe, o.getState, o.getServerState || o.getState, a, s);
|
|
834
|
-
return tr(c), c;
|
|
835
|
-
}(t, n, i);
|
|
836
|
-
return Object.assign(r, t), r;
|
|
837
|
-
}, Yn = (e) => e ? jr(e) : jr, lo = 1, ao = 2, ar = { eq: (e, t) => e == t, neq(e, t) {
|
|
838
|
-
return !this.eq(e, t);
|
|
839
|
-
}, gt: (e, t) => e > t, gte: (e, t) => e >= t, lt: (e, t) => e < t, lte: (e, t) => e <= t, list_exact: (e, t) => !(!Array.isArray(e) || !Array.isArray(t)) && e.slice().sort().join(",") === t.slice().sort().join(","), list_all: (e, t) => !(!Array.isArray(e) || !Array.isArray(t)) && !t.some((r) => e.indexOf(r) === -1), list_alo(e, t) {
|
|
840
|
-
if (!Array.isArray(t)) return !1;
|
|
841
|
-
const r = Array.isArray(e) ? e : [e], n = new Set(r);
|
|
842
|
-
return t.some((i) => n.has(i));
|
|
843
|
-
}, list_dni(e, t) {
|
|
844
|
-
if (!Array.isArray(t)) return !1;
|
|
845
|
-
const r = Array.isArray(e) ? e : [e], n = new Set(r);
|
|
846
|
-
return t.every((i) => !n.has(i));
|
|
847
|
-
}, contains(e, t) {
|
|
848
|
-
const r = e.toLowerCase(), n = t.toLowerCase();
|
|
849
|
-
return r.includes(n);
|
|
850
|
-
}, notcontains(e, t) {
|
|
851
|
-
return !this.contains(e, t);
|
|
852
|
-
} }, so = (e, t, r) => {
|
|
853
|
-
switch (t) {
|
|
854
|
-
case "videovoice":
|
|
855
|
-
return !!(e && e.value);
|
|
856
|
-
case "open":
|
|
857
|
-
return !!r;
|
|
858
|
-
case "multipleselect":
|
|
859
|
-
return !!(r && Object.keys(r).length);
|
|
860
|
-
case "recordedtask":
|
|
861
|
-
return (r == null ? void 0 : r.taskStatus) === "completed";
|
|
862
|
-
case "texturlprompt":
|
|
863
|
-
return !e.value;
|
|
864
|
-
case "consentlegal":
|
|
865
|
-
case "nps":
|
|
866
|
-
case "likert":
|
|
867
|
-
return r !== null;
|
|
868
|
-
case "multiplechoice":
|
|
869
|
-
return r !== void 0;
|
|
870
|
-
case "matrix":
|
|
871
|
-
return !!(r && Object.values(r).every((n) => n !== null));
|
|
872
|
-
default:
|
|
873
|
-
return !0;
|
|
874
|
-
}
|
|
875
|
-
}, Jn = (e, t) => {
|
|
876
|
-
if (t === "matrix") {
|
|
877
|
-
const r = Object.keys(e).length, n = Object.values(e).filter((i) => i !== null).length;
|
|
878
|
-
return n > 0 && n < r;
|
|
879
|
-
}
|
|
880
|
-
return !1;
|
|
881
|
-
}, Xn = ({ cards: e, index: t, hasEndCard: r, allResponses: n, uploadProgress: i = {} }) => {
|
|
882
|
-
if (t >= e.length || t < 0) return null;
|
|
883
|
-
const o = e[t];
|
|
884
|
-
let a = t + 1;
|
|
885
|
-
const s = o.props.routingOptions || [];
|
|
886
|
-
for (let m = 0; m < s.length; m++) {
|
|
887
|
-
const { group: u, target: f } = s[m];
|
|
888
|
-
if (!(u != null && u.length)) continue;
|
|
889
|
-
const v = u[0];
|
|
890
|
-
if (v.questionIndex === void 0 || v.questionIndex > n.length) continue;
|
|
891
|
-
let d = $r({ comparator: v.comparator, response: n[v.questionIndex], type: o.type, value: v.value });
|
|
892
|
-
for (let h = 1; h < u.length; h += 2) {
|
|
893
|
-
const b = u[h], y = u[h + 1], g = $r({ comparator: y.comparator, response: n[y.questionIndex], type: e[y.questionIndex].type, value: y.value });
|
|
894
|
-
b === lo ? d && (d = g) : b === ao && (d || (d = g));
|
|
895
|
-
}
|
|
896
|
-
if (d) {
|
|
897
|
-
a = f === -1 && r ? e.length - 1 : f;
|
|
898
|
-
break;
|
|
899
|
-
}
|
|
900
|
-
}
|
|
901
|
-
const c = e.findIndex((m) => m.type === "uploading");
|
|
902
|
-
let p;
|
|
903
|
-
return p = c > 0 ? r ? e.length - 3 : e.length - 2 : e.length - 1, t >= p || a === -1 || a !== null && a > p ? c > 0 && Object.values(i).some((u) => u.isSubmitted && !u.isComplete) ? c : r ? e.length - 1 : null : a === -1 ? null : a;
|
|
904
|
-
}, $r = ({ comparator: e, response: t, type: r, value: n }) => {
|
|
905
|
-
if (e === "answered") switch (r) {
|
|
906
|
-
case "texturlprompt":
|
|
907
|
-
return t === void 0;
|
|
908
|
-
case "consentlegal":
|
|
909
|
-
return t && t.submitted === !0;
|
|
910
|
-
case "recordedtask":
|
|
911
|
-
return "taskStatus" in t && t.taskStatus === "completed";
|
|
912
|
-
case "likert":
|
|
913
|
-
case "nps":
|
|
914
|
-
return Number.isInteger(t);
|
|
915
|
-
case "rankorder":
|
|
916
|
-
case "matrix":
|
|
917
|
-
return Object.values(t).every((i) => i !== null);
|
|
918
|
-
case "multiplechoice":
|
|
919
|
-
return t !== void 0;
|
|
920
|
-
case "multipleselect":
|
|
921
|
-
return (t == null ? void 0 : t.length) > 0;
|
|
922
|
-
case "open":
|
|
923
|
-
return t && t.length > 0;
|
|
924
|
-
case "videovoice":
|
|
925
|
-
return !!(t != null && t.mediaRecordingUid);
|
|
926
|
-
default:
|
|
927
|
-
return !1;
|
|
928
|
-
}
|
|
929
|
-
if (e === "given_up") return r !== "recordedtask" || "taskStatus" in t && t.taskStatus === "given.up";
|
|
930
|
-
if (e === "partial") return r === "matrix" && Jn(t, r);
|
|
931
|
-
if (e === "skipped") switch (r) {
|
|
932
|
-
case "texturlprompt":
|
|
933
|
-
return t == null ? void 0 : t.skipped;
|
|
934
|
-
case "consentlegal":
|
|
935
|
-
case "likert":
|
|
936
|
-
case "nps":
|
|
937
|
-
case "videovoice":
|
|
938
|
-
return t === null;
|
|
939
|
-
case "recordedtask":
|
|
940
|
-
return "taskStatus" in t && t.taskStatus === "abandoned";
|
|
941
|
-
case "open":
|
|
942
|
-
return t === null || (t == null ? void 0 : t.length) === 0;
|
|
943
|
-
case "multiplechoice":
|
|
944
|
-
return t === void 0;
|
|
945
|
-
case "multipleselect":
|
|
946
|
-
return (t == null ? void 0 : t.length) === 0;
|
|
947
|
-
case "matrix":
|
|
948
|
-
return Object.values(t).every((i) => i === null);
|
|
949
|
-
case "rankorder":
|
|
950
|
-
return t === null || Object.values(t).some((i) => i === null);
|
|
951
|
-
default:
|
|
952
|
-
return !1;
|
|
953
|
-
}
|
|
954
|
-
return ar[e](t, n);
|
|
955
|
-
}, uo = (e) => {
|
|
956
|
-
var n, i, o;
|
|
957
|
-
switch (e.type) {
|
|
958
|
-
case "multipleselect":
|
|
959
|
-
return e && e.props && e.props.options ? e.props.options.length > 13 ? e.props.options.map((a) => [a.value]) : (t = e.props.options.map((a) => a.value), r = !e.props.properties.required, t.reduce((a, s) => a.concat(a.map((c) => [...c, s])), [[]]).filter((a) => r || a.length > 0)) : null;
|
|
960
|
-
case "multiplechoice": {
|
|
961
|
-
if (!e || !e.props || !e.props.options) return null;
|
|
962
|
-
const a = e.props.options.map((s) => s.value);
|
|
963
|
-
return e.props.properties.required || a.push(void 0), a;
|
|
964
|
-
}
|
|
965
|
-
case "matrix": {
|
|
966
|
-
if (!((n = e == null ? void 0 : e.props) != null && n.options)) return null;
|
|
967
|
-
const a = e.props.properties.matrixColumn, s = e.props.options, c = s.reduce((m, u) => (m[u.id] = null, m), {}), p = [{ ...c, [s[0].id]: a[0].value }, s.reduce((m, u) => (m[u.id] = a[0].value, m), {})];
|
|
968
|
-
return e.props.properties.required || p.push(c), p;
|
|
969
|
-
}
|
|
970
|
-
case "likert": {
|
|
971
|
-
const a = Number((o = (i = e.props) == null ? void 0 : i.properties) == null ? void 0 : o.range) || 5;
|
|
972
|
-
return [...Array.from(Array(a).keys()).map((c) => c + 1), ...e.props.properties.required ? [] : [null]];
|
|
973
|
-
}
|
|
974
|
-
case "nps":
|
|
975
|
-
return [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...e.props.properties.required ? [] : [null]];
|
|
976
|
-
case "videovoice":
|
|
977
|
-
case "open":
|
|
978
|
-
return ["1", ...e.props.properties.required ? [] : [""]];
|
|
979
|
-
case "recordedtask": {
|
|
980
|
-
const a = [{ taskStatus: "completed" }, { taskStatus: "given.up" }];
|
|
981
|
-
return e.props.properties.required || a.push({ taskStatus: "abandoned" }), a;
|
|
982
|
-
}
|
|
983
|
-
case "texturlprompt":
|
|
984
|
-
return [void 0, ...e.props.properties.required ? [] : [{ skipped: !0 }]];
|
|
985
|
-
case "consentlegal":
|
|
986
|
-
return [1, ...e.props.properties.required ? [] : [null]];
|
|
987
|
-
default:
|
|
988
|
-
return [1];
|
|
989
|
-
}
|
|
990
|
-
var t, r;
|
|
991
|
-
}, co = (e) => e in ar, mo = (e) => typeof e == "object" && e !== null && "taskStatus" in e, po = (e, t = []) => t.reduce((r, n) => {
|
|
992
|
-
const { group: i, target: o } = n;
|
|
993
|
-
if (!(i != null && i.length)) return [...r];
|
|
994
|
-
const a = i.filter((s) => !!Number(s) || typeof s == "object" && s.questionIndex === e).map((s) => {
|
|
995
|
-
const { comparator: c, value: p } = s;
|
|
996
|
-
return { comparator: c, target: o, value: p };
|
|
997
|
-
});
|
|
998
|
-
return [...r, ...a];
|
|
999
|
-
}, []), qt = /* @__PURE__ */ new Set(["thanks", "uploading"]), V = Yn()((e, t) => ({ allResponses: [], answers: void 0, apiURL: "", border: "#000000", cards: [], close: async (r = Ge) => {
|
|
1000
|
-
const n = t(), { fadeout: i, remove: o, trackHistory: a, studyType: s } = n;
|
|
1001
|
-
await i(r), Dt(n) || a({ event: "closed" }), Si.info("SurveyClosing", { surveyId: n.surveyId }), dr.enable(), o({ initiator: mr.Closed, studyType: s });
|
|
1002
|
-
}, configureExitOnOverlayClick: () => {
|
|
1003
|
-
}, customMetadata: {}, destroy: async (r) => {
|
|
1004
|
-
const { eventEmitFn: n, fadeout: i, remove: o, studyType: a, surveyId: s } = t();
|
|
1005
|
-
n("survey.complete", s), await i(r), dr.enable(), o({ initiator: mr.Complete, studyType: a });
|
|
1006
|
-
}, endCard: { headline: "" }, envId: "", eventEmitFn: it.emit.bind(it), fadeout: async (r) => {
|
|
1007
|
-
const { eventEmitFn: n, headers: i, viewDocument: o } = t();
|
|
1008
|
-
return kt(i) ? Promise.resolve() : (n(me.SurveyFadingOut), new Promise((a) => {
|
|
1009
|
-
const s = o.getElementById(r);
|
|
1010
|
-
s ? (s.addEventListener("transitionend", () => {
|
|
1011
|
-
a();
|
|
1012
|
-
}), s.classList.remove("ul-app--visible")) : a();
|
|
1013
|
-
}));
|
|
1014
|
-
}, forceBrandedLogo: !1, frame: document.createElement("iframe"), handleClickEmbedButton: (r) => {
|
|
1015
|
-
const { cards: n, eventEmitFn: i, index: o } = t();
|
|
1016
|
-
i(r, { qid: n[o].name, props: n[o].props }), e(() => ({ hasViewedEmbed: !0 }));
|
|
1017
|
-
}, handleUploadUpdate: ({ mediaRecordingUid: r, isComplete: n, progressPct: i, isSubmitted: o }) => {
|
|
1018
|
-
var v, d, h;
|
|
1019
|
-
const { cards: a, destroy: s, index: c, uploadProgress: p } = t(), m = n || ((v = p[r]) == null ? void 0 : v.isComplete), u = { ...p, [r]: { progressPct: m ? 100 : i || ((d = p[r]) == null ? void 0 : d.progressPct), isComplete: m, isSubmitted: o || ((h = p[r]) == null ? void 0 : h.isSubmitted) } };
|
|
1020
|
-
if (e({ uploadProgress: u }), a[c].type !== "uploading") return;
|
|
1021
|
-
const f = Object.entries(p).every(([b, y]) => !y.isSubmitted || y.isComplete || r == b && n);
|
|
1022
|
-
if (f && c >= a.length - 1) return s(Ge);
|
|
1023
|
-
e({ index: f ? c + 1 : c, uploadingCardViewed: !0 });
|
|
1024
|
-
}, hasViewedEmbed: !1, headers: { Authorization: "", "Content-Type": "", "userleap-platform": "web", "x-ul-environment-id": "", "x-ul-installation-method": "web-snippet", "x-ul-sdk-version": "", "x-ul-visitor-id": "" }, index: 0, isPreview: !1, marketingUrl: "https://sprig.com", meta: { ch: 0, cw: 0, l: "", mode: null, p: "", sh: 0, sw: 0 }, mode: void 0, next: (r) => {
|
|
1025
|
-
const { allResponses: n, cards: i, eventEmitFn: o, index: a, responseGroupUid: s, submit: c, trackHistory: p, uploadProgress: m, viewedCardCount: u } = t();
|
|
1026
|
-
e({ minScrollableHeight: void 0 });
|
|
1027
|
-
const f = Array.isArray(r.data) ? r.data : [r.data], v = Date.now(), d = [...i], h = { response: [], responseGroupUid: s, questionIndex: a };
|
|
1028
|
-
let b = null;
|
|
1029
|
-
const y = n.slice(0);
|
|
1030
|
-
f.forEach((T, x) => {
|
|
1031
|
-
const S = d[a + x], { type: N, ...L } = T, E = { ...L, answeredAt: v }, P = E.value;
|
|
1032
|
-
((C) => C && !qt.has(C.type))(S) && (S.value = P, S.secondaryValue = E.secondaryValue || null), h.response.push(E);
|
|
1033
|
-
let _ = P;
|
|
1034
|
-
N !== "multipleselect" && N !== "multiplechoice" || P === null || (_ = N === "multiplechoice" ? Object.values(P).find((C) => C !== !1) : P, N === "multipleselect" && (_ = d[a + x].props.options.reduce((C, I) => (P[I.id] && C.push(I.value), C), []))), y[a + x] = _, b = Xn({ cards: d, index: a + x, hasEndCard: !!r.endCard, uploadProgress: m, allResponses: y });
|
|
1035
|
-
}), e({ allResponses: y }), (b === null || qt.has(d[b].type)) && (h.completedAt = v);
|
|
1036
|
-
const g = c(h);
|
|
1037
|
-
if (b === null) return void r.completeSurvey();
|
|
1038
|
-
b && !qt.has(d[b].type) && g.finally(() => {
|
|
1039
|
-
p({ event: "seen", index: b });
|
|
1040
|
-
});
|
|
1041
|
-
const w = d[b];
|
|
1042
|
-
d[b] && o && o("survey.question", { qid: w.name, props: w.props }), e({ cards: d, hasViewedEmbed: !1, index: b, viewedCardCount: u + 1 });
|
|
1043
|
-
}, pendingRemoveIframeReason: null, previewKey: null, previewMode: void 0, recorder: () => {
|
|
1044
|
-
}, recorderEventEmitter: it, resolveTrackedPromise: () => {
|
|
1045
|
-
const { removeIframeIfReady: r } = t();
|
|
1046
|
-
e((n) => ({ unresolvedRequestCount: n.unresolvedRequestCount - 1 })), r();
|
|
1047
|
-
}, responseGroupUid: "", remove: ({ initiator: r, studyType: n }) => {
|
|
1048
|
-
const { eventEmitFn: i, removeIframeIfReady: o, surveyId: a } = t();
|
|
1049
|
-
e({ pendingRemoveIframeReason: r, studyType: n }), i(me.SurveyCloseRequested, { name: me.SurveyCloseRequested, initiator: r, studyType: n, "survey.id": a }), o();
|
|
1050
|
-
}, removeIframeIfReady: () => {
|
|
1051
|
-
const { eventEmitFn: r, pendingRemoveIframeReason: n, unresolvedRequestCount: i, studyType: o, surveyId: a } = t();
|
|
1052
|
-
n && i === 0 && (r(me.SurveyWillClose, { name: me.SurveyWillClose, initiator: n, studyType: o, "survey.id": a }), e({ pendingRemoveIframeReason: null, studyType: o }));
|
|
1053
|
-
}, seen: async () => {
|
|
1054
|
-
const { trackHistory: r } = t();
|
|
1055
|
-
return r({ event: "seen", isNew: !0 });
|
|
1056
|
-
}, slugName: null, showStripes: !1, showSurveyBrand: !1, styleNonce: "", submit: async ({ completedAt: r, questionIndex: n, response: i, responseGroupUid: o }) => {
|
|
1057
|
-
const a = t();
|
|
1058
|
-
if (!o || Dt(a)) return;
|
|
1059
|
-
const s = { responseGroupUid: o, meta: a.meta, customMetadata: a.customMetadata, responses: i, completedAt: r, previewKey: a.previewKey }, c = await a.trackPromise(Vt(`${a.apiURL}/sdk/1/environments/${a.envId}/visitors/${a.userId}/responses/submit`, { body: JSON.stringify(s), headers: a.headers, method: "POST" }));
|
|
1060
|
-
c.ok ? i.forEach((p, m) => {
|
|
1061
|
-
a.eventEmitFn(me.QuestionAnswered, { ...p, questionIndex: n ? n + m : void 0, "survey.id": a.surveyId });
|
|
1062
|
-
}) : c.reportError && (console.warn("[Sprig] (ERR-427) Failed to submit response", c.error), await a.trackPromise(zr(a, "submitResponse", c.error)));
|
|
1063
|
-
}, surveyId: 0, tabTitle: "", trackHistory: async ({ event: r, index: n, isNew: i = !1 }) => {
|
|
1064
|
-
const o = t();
|
|
1065
|
-
if (Dt(o)) return;
|
|
1066
|
-
const { cards: a, index: s } = o;
|
|
1067
|
-
let c = n ?? s, p = a[c];
|
|
1068
|
-
for (; p; ) {
|
|
1069
|
-
const m = { sid: o.surveyId, qid: p.name, action: r, vid: o.userId, eid: o.envId, isNew: i, responseGroupUid: o.responseGroupUid, previewKey: o.previewKey }, u = await o.trackPromise(Vt(`${o.apiURL}/sdk/1/visitors/${o.userId}/surveys/${o.surveyId}/history`, { method: "POST", headers: o.headers, body: JSON.stringify(m) }));
|
|
1070
|
-
!u.ok && u.reportError && (console.warn("[Sprig] (ERR-428) Failed to track survey event", u.error), await o.trackPromise(zr(o, "trackHistory", u.error)));
|
|
1071
|
-
const f = a[c + 1];
|
|
1072
|
-
if (!p.groupId || !(f != null && f.groupId) || f.groupId !== p.groupId) break;
|
|
1073
|
-
c++, p = f, i = !1;
|
|
1074
|
-
}
|
|
1075
|
-
}, trackPromise: async (r) => {
|
|
1076
|
-
const { resolveTrackedPromise: n } = t();
|
|
1077
|
-
return e((i) => ({ unresolvedRequestCount: i.unresolvedRequestCount + 1 })), r.then((i) => (n(), i)).catch((i) => {
|
|
1078
|
-
throw n(), i;
|
|
1079
|
-
});
|
|
1080
|
-
}, unresolvedRequestCount: 0, update: () => {
|
|
1081
|
-
const { cards: r, index: n, headers: i, eventEmitFn: o, frame: a, useMobileStyling: s, surveyId: c, viewDocument: p } = t(), m = i["userleap-platform"] === "web", u = kt(i), f = r[n], v = f.type === "matrix" && !(f.props.properties.displayMatrixAsAccordion || s);
|
|
1082
|
-
e({ minScrollableHeight: void 0 }), setTimeout(() => {
|
|
1083
|
-
var y, g, w;
|
|
1084
|
-
!u && !s && ((y = a == null ? void 0 : a.setWidth) == null || y.call(a, wi));
|
|
1085
|
-
const [d, h, b] = Ci(p, m && !s, u);
|
|
1086
|
-
u ? (o(me.SurveyHeight, { name: me.SurveyHeight, contentFrameHeight: d, "survey.id": c }), o(me.SurveyWidth, { name: me.SurveyWidth, contentFrameWidth: h, "survey.id": c })) : ((g = a.setHeight) == null || g.call(a, d), e({ minScrollableHeight: b }), !s && v && ((w = a.setWidth) == null || w.call(a, h)));
|
|
1087
|
-
}, 100);
|
|
1088
|
-
}, uploadingCardViewed: !1, uploadProgress: {}, useDesktopPrototype: void 0, useMobileStyling: !1, userId: "", viewDocument: window.document, viewedCardCount: 0, focusedQuestionId: null, setFocusedQuestionId: (r) => e({ focusedQuestionId: r }) })), Dt = (e) => !e.userId || e.meta && e.meta.mode === "test" || e.isPreview || e.previewMode, zr = async (e, t, r) => {
|
|
1089
|
-
const { mode: n, userId: i, envId: o, apiURL: a, headers: s, viewDocument: c } = e, p = c.documentElement, m = { mode: n, screenWidth: window.screen.width, screenHeight: window.screen.height, clientWidth: p.clientWidth, clientHeight: p.clientHeight, location: window.location.href, language: window.navigator.language }, u = { action: t, err: { message: `${r == null ? void 0 : r.name} - ${r == null ? void 0 : r.message}`, stack: r == null ? void 0 : r.stack }, meta: m, vid: i, envId: o };
|
|
1090
|
-
(await Vt(`${a}/sdk/1/errors`, { method: "POST", headers: Object.assign({ "x-ul-error": window.btoa(`userleap-${Date.now()}-error`) }, s), body: JSON.stringify(u) })).ok || console.warn("[Sprig] (ERR-444) Failed to report error to API", r);
|
|
1091
|
-
}, ei = (e) => se("svg", { fill: "none", height: 24, viewBox: "0 0 24 24", width: 24, xmlns: "http://www.w3.org/2000/svg", ...e }, se("path", { d: "M17 10L12 15L7 10", stroke: "#0B2330", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5 })), ti = (e) => se("svg", { fill: "none", height: 10, viewBox: "0 0 10 10", width: 10, xmlns: "http://www.w3.org/2000/svg", ...e }, se("path", { d: "M9.15377 1.30774L4.07685 8.23082L1.30762 5.00005", stroke: "white", strokeLinecap: "round", strokeWidth: 2 }));
|
|
1092
|
-
var fo = 0;
|
|
1093
|
-
function l(e, t, r, n, i, o) {
|
|
1094
|
-
var a, s, c = {};
|
|
1095
|
-
for (s in t) s == "ref" ? a = t[s] : c[s] = t[s];
|
|
1096
|
-
var p = { type: e, props: c, key: r, ref: a, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: --fo, __i: -1, __u: 0, __source: i, __self: o };
|
|
1097
|
-
if (typeof e == "function" && (a = e.defaultProps)) for (s in a) c[s] === void 0 && (c[s] = a[s]);
|
|
1098
|
-
return M.vnode && M.vnode(p), p;
|
|
1099
|
-
}
|
|
1100
|
-
var Te = "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/components/accordion.tsx";
|
|
1101
|
-
const vo = ({ visible: e }) => l("div", { className: "sprig-check-background", style: { opacity: e ? 1 : 0 }, children: l(ti, { className: "sprig-check" }, void 0, 0, { fileName: Te, lineNumber: 21, columnNumber: 7 }, void 0) }, void 0, 0, { fileName: Te, lineNumber: 17, columnNumber: 5 }, void 0), Qr = "250ms", bo = nr(({ animate: e, children: t, header: r, isOpen: n, onClick: i, showHeaderCheck: o }, a) => {
|
|
1102
|
-
const s = U(te(null), "wrapperRef"), [c, p] = U(z(0), "height"), [m, u] = U(z("none"), "transition"), [f, v] = U(z(!0), "isInitialRender");
|
|
1103
|
-
return Z(() => {
|
|
1104
|
-
var h;
|
|
1105
|
-
const d = (h = s.current) == null ? void 0 : h.getBoundingClientRect();
|
|
1106
|
-
p(n && d ? d.height : 0);
|
|
1107
|
-
}, [n]), Z(() => {
|
|
1108
|
-
!c && n || !f || v(!1), u(e && !f ? `height ${Qr} ease` : "none");
|
|
1109
|
-
}, [e, f, c, n]), l("div", { className: "sprig-accordion", ref: a, children: [l("button", { className: "sprig-accordion-header-container", onClick: i, type: "button", children: [l("div", { className: "sprig-header-label-container", children: [l("span", { className: "sprig-header-label", children: r }, void 0, 0, { fileName: Te, lineNumber: 60, columnNumber: 13 }, void 0), l(vo, { visible: o }, void 0, 0, { fileName: Te, lineNumber: 61, columnNumber: 13 }, void 0)] }, void 0, 0, { fileName: Te, lineNumber: 59, columnNumber: 11 }, void 0), l(ei, { className: "sprig-caret", style: { transitionDuration: e ? Qr : "0", transform: n ? "rotate(-180deg)" : "none" } }, void 0, 0, { fileName: Te, lineNumber: 63, columnNumber: 11 }, void 0)] }, void 0, 0, { fileName: Te, lineNumber: 54, columnNumber: 9 }, void 0), l("div", { className: "sprig-accordion-body", style: { transition: m, height: c }, children: l("div", { ref: s, children: t }, void 0, 0, { fileName: Te, lineNumber: 72, columnNumber: 11 }, void 0) }, void 0, 0, { fileName: Te, lineNumber: 71, columnNumber: 9 }, void 0)] }, void 0, 0, { fileName: Te, lineNumber: 53, columnNumber: 7 }, void 0);
|
|
1110
|
-
});
|
|
1111
|
-
var Ht = "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/components/arrow.tsx";
|
|
1112
|
-
const sr = ({ style: e, stroke: t = "black" }) => l("svg", { fill: "none", height: "10", style: e, viewBox: "0 0 12 10", width: "12", xmlns: "http://www.w3.org/2000/svg", children: [l("path", { d: "M1.47839 5.2085L10.9384 5.2085", stroke: t, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.35" }, void 0, 0, { fileName: Ht, lineNumber: 17, columnNumber: 7 }, void 0), l("path", { d: "M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845", stroke: t, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.35" }, void 0, 0, { fileName: Ht, lineNumber: 24, columnNumber: 7 }, void 0)] }, void 0, 0, { fileName: Ht, lineNumber: 9, columnNumber: 5 }, void 0), D = (...e) => e.filter(Boolean).join(" "), ne = (e, t, r) => {
|
|
1113
|
-
const n = t ? "--mobile" : "--desktop";
|
|
1114
|
-
return `${e + n} ${e + (r ? `${n}_${r}` : "")} ${e}`;
|
|
1115
|
-
}, ho = (e, t) => `${e} ${e}__${t}`, oe = (e) => l("button", { ...e, className: D("ul-card-text__button", e.className), id: "ul-card-text__button" }, void 0, 0, { fileName: "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/components/button.tsx", lineNumber: 7, columnNumber: 5 }, void 0), ri = () => {
|
|
1116
|
-
const { viewDocument: e } = V((n) => ({ viewDocument: n.viewDocument })), [t, r] = U(z(!1), "isScrollable");
|
|
1117
|
-
return Z(() => {
|
|
1118
|
-
const n = e.querySelector(".sprig-question-body"), i = new ResizeObserver(() => {
|
|
1119
|
-
window.requestAnimationFrame(() => {
|
|
1120
|
-
r(!!(n && Ti(n) && n.scrollHeight > n.offsetHeight));
|
|
1121
|
-
});
|
|
1122
|
-
});
|
|
1123
|
-
return n && i.observe(n), () => {
|
|
1124
|
-
n && i.disconnect();
|
|
1125
|
-
};
|
|
1126
|
-
}, [e]), t;
|
|
1127
|
-
};
|
|
1128
|
-
var ye = "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/components/header.tsx";
|
|
1129
|
-
const Wr = ({ plainText: e, richText: t, id: r, className: n, isHeader: i }) => t ? l("div", { className: n, dangerouslySetInnerHTML: { __html: t }, id: r }, void 0, 0, { fileName: ye, lineNumber: 32, columnNumber: 7 }, void 0) : e ? i ? l("h1", { className: n, id: r, children: e }, void 0, 0, { fileName: ye, lineNumber: 41, columnNumber: 7 }, void 0) : l("p", { className: n, id: r, children: e }, void 0, 0, { fileName: ye, lineNumber: 46, columnNumber: 5 }, void 0) : null, go = () => {
|
|
1130
|
-
const { cards: e, close: t, endCard: r, headers: n, index: i } = V((s) => ({ cards: s.cards, close: s.close, endCard: s.endCard, headers: s.headers, index: s.index, useMobileStyling: s.useMobileStyling })), o = e.length, a = U(xe(() => () => t(Ge), [t]), "closeApp");
|
|
1131
|
-
return ["email", "link"].includes(n["userleap-platform"]) || r && i + 1 === o ? null : l("div", { "aria-label": "Close button", className: "close-btn", onClick: a, onKeyPress: (s) => {
|
|
1132
|
-
s.key === "Enter" && a();
|
|
1133
|
-
}, role: "button", tabIndex: 0, children: l("svg", { fill: "none", height: "16px", viewBox: "0 0 13 13", width: "16px", xmlns: "http://www.w3.org/2000/svg", children: l("path", { d: "M2.54964 1.78369L1.78369 2.54964L5.73405 6.5L1.78369 10.4504L2.54964 11.2163L6.5 7.26595L10.4504 11.2163L11.2163 10.4504L7.26595 6.5L11.2163 2.54964L10.4504 1.78369L6.5 5.73405L2.54964 1.78369Z", fill: "#262136" }, void 0, 0, { fileName: ye, lineNumber: 98, columnNumber: 9 }, void 0) }, void 0, 0, { fileName: ye, lineNumber: 91, columnNumber: 7 }, void 0) }, void 0, 0, { fileName: ye, lineNumber: 83, columnNumber: 5 }, void 0);
|
|
1134
|
-
}, ke = ({ message: e, properties: t }) => {
|
|
1135
|
-
const r = U(te(null), "ref"), n = t == null ? void 0 : t.captionText, i = ri();
|
|
1136
|
-
return l("div", { className: D("question-header-container", "sprig-header-container", i ? "sprig-border-bottom" : null), ref: r, children: [l("div", { className: "question-header-button-container", children: [l(Wr, { className: "ul-question", id: "ul-question", isHeader: !0, plainText: e, richText: t == null ? void 0 : t.questionHtml }, void 0, 0, { fileName: ye, lineNumber: 121, columnNumber: 9 }, void 0), l(go, {}, void 0, 0, { fileName: ye, lineNumber: 128, columnNumber: 9 }, void 0)] }, void 0, 0, { fileName: ye, lineNumber: 120, columnNumber: 7 }, void 0), l(Wr, { className: "ul-caption", id: "ul-caption", plainText: n, richText: t == null ? void 0 : t.captionHtml }, void 0, 0, { fileName: ye, lineNumber: 130, columnNumber: 7 }, void 0)] }, void 0, 0, { fileName: ye, lineNumber: 112, columnNumber: 5 }, void 0);
|
|
1137
|
-
};
|
|
1138
|
-
var st = "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/components/longformSubmitButton.tsx";
|
|
1139
|
-
const _o = () => l("svg", { fill: "none", height: "10", viewBox: "0 0 13 10", width: "13", xmlns: "http://www.w3.org/2000/svg", children: l("path", { d: "M11.5 1.5L4.5 8.5L1 5", stroke: "#FFFFFF", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }, void 0, 0, { fileName: st, lineNumber: 10, columnNumber: 5 }, void 0) }, void 0, 0, { fileName: st, lineNumber: 3, columnNumber: 3 }, void 0), It = ({ isSubmitDisabled: e, handleSubmit: t }) => l("div", { className: "ul-card-longform__submit-button-container", children: l(oe, { className: "ul-card-longform__submit-button", disabled: e, onClick: t, children: ["OK ", l(_o, {}, void 0, 0, { fileName: st, lineNumber: 36, columnNumber: 10 }, void 0)] }, void 0, 0, { fileName: st, lineNumber: 31, columnNumber: 5 }, void 0) }, void 0, 0, { fileName: st, lineNumber: 30, columnNumber: 3 }, void 0);
|
|
1140
|
-
var Qt = "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/components/mobileEmbedView.tsx";
|
|
1141
|
-
const Zr = ({ buttonText: e = "View Prototype", handleClick: t }) => l("button", { className: "prototype-button", onClick: t, children: e }, "prototype-btn", 0, { fileName: Qt, lineNumber: 14, columnNumber: 3 }, void 0), Re = ({ defaultBody: e, embeddedType: t = "prototype", properties: r }) => {
|
|
1142
|
-
var u;
|
|
1143
|
-
const { handleClickEmbedButton: n, hasViewedEmbed: i, headers: o, useDesktopPrototype: a } = V((f) => ({ handleClickEmbedButton: f.handleClickEmbedButton, hasViewedEmbed: f.hasViewedEmbed, headers: f.headers, useDesktopPrototype: f.useDesktopPrototype })), s = (r == null ? void 0 : r.conceptUrl) || ((u = r == null ? void 0 : r.consentDocument) == null ? void 0 : u.url), c = window.innerWidth < Ii, p = o["userleap-platform"], m = (f, v) => {
|
|
1144
|
-
f.preventDefault(), n(v);
|
|
1145
|
-
};
|
|
1146
|
-
if (!a && c && !i && s && ["email", "link"].includes(p)) {
|
|
1147
|
-
if (t === "prototype") return l(Zr, { handleClick: (f) => {
|
|
1148
|
-
m(f, "question.prototype.click");
|
|
1149
|
-
} }, void 0, 0, { fileName: Qt, lineNumber: 77, columnNumber: 9 }, void 0);
|
|
1150
|
-
if (t === "pdf") return l(Zr, { buttonText: (r == null ? void 0 : r.viewDocumentText) || "View Document", handleClick: (f) => {
|
|
1151
|
-
m(f, "question.agreement.click");
|
|
1152
|
-
} }, void 0, 0, { fileName: Qt, lineNumber: 85, columnNumber: 9 }, void 0);
|
|
1153
|
-
}
|
|
1154
|
-
return e();
|
|
1155
|
-
};
|
|
1156
|
-
var Gr = "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/components/checkbox.tsx";
|
|
1157
|
-
const ni = ({ isSelected: e, id: t, divId: r, themeColor: n, disabled: i = !1 }) => l("div", { "aria-checked": e, "aria-disabled": i, "aria-labelledby": `label-${t}`, className: "select-checkbox", id: r, role: "checkbox", style: { ...e ? { backgroundColor: n, borderColor: n, boxShadow: "none" } : {}, ...i ? { opacity: 0.5 } : {} }, tabIndex: i ? -1 : 0, children: e && l(ti, {}, void 0, 0, { fileName: Gr, lineNumber: 36, columnNumber: 22 }, void 0) }, void 0, 0, { fileName: Gr, lineNumber: 17, columnNumber: 5 }, void 0), ii = (e, t) => {
|
|
1158
|
-
const r = U(te(0), "heightRef");
|
|
1159
|
-
return () => {
|
|
1160
|
-
if (e.current) {
|
|
1161
|
-
const n = e.current;
|
|
1162
|
-
n.style.height = "1px";
|
|
1163
|
-
const i = n.scrollHeight + (n.offsetHeight - n.clientHeight), o = parseInt(window.getComputedStyle(n).getPropertyValue("max-height")), a = i <= o ? i : o;
|
|
1164
|
-
r.current !== a && t(), r.current = a, n.style.height = `${a}px`;
|
|
1165
|
-
}
|
|
1166
|
-
};
|
|
1167
|
-
};
|
|
1168
|
-
var De = "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/components/option.tsx";
|
|
1169
|
-
const Et = ({ ariaLabel: e, border: t, choiceStyle: r = {}, label: n, isSelected: i, value: o, text: a, id: s, isRadio: c, useMobileStyling: p, error: m, allowTextEntry: u, noneOfTheAbove: f, promptText: v, disabled: d = !1, onUserInputChanged: h }) => {
|
|
1170
|
-
const { styleNonce: b, viewDocument: y } = V((I) => ({ styleNonce: I.styleNonce, viewDocument: I.viewDocument })), [g, w] = U(z(!1), "isActive");
|
|
1171
|
-
yo(y, t, b);
|
|
1172
|
-
const T = ({ isSelected: I, userText: R }) => {
|
|
1173
|
-
h && h({ id: s, selected: I, value: o, userText: R, noneOfTheAbove: f });
|
|
1174
|
-
}, x = (I) => {
|
|
1175
|
-
d || (I.stopPropagation(), T({ isSelected: c || !i, userText: a }), w(!1));
|
|
1176
|
-
}, S = () => {
|
|
1177
|
-
g || w(!0);
|
|
1178
|
-
}, N = () => {
|
|
1179
|
-
g && w(!1);
|
|
1180
|
-
}, L = { onClick: (I) => x(I), onKeyPress: (I) => ((R) => {
|
|
1181
|
-
d || R.key !== "Enter" && R.key !== " " || x(R);
|
|
1182
|
-
})(I) };
|
|
1183
|
-
"ontouchstart" in y.documentElement ? (L.onTouchStart = N, L.onTouchCancel = N, L.onTouchEnd = N) : (L.onMouseDown = S, L.onMouseLeave = N);
|
|
1184
|
-
const E = c ? `radio-${s}` : `checkbox-${s}`, P = i || g ? [xt] : [], _ = [...m ? [oi] : [], ...P, ...d ? ["ul-choice-disabled"] : []], C = n ? { "aria-labelledby": `label-${s}` } : { "aria-label": e };
|
|
1185
|
-
return l("div", { className: D(ne("choice", p), ..._), id: `choice-div-${s}`, style: { ...r, ...m ? { borderColor: ot } : {}, ...d ? { opacity: 0.5, cursor: "not-allowed" } : {} }, ...d ? {} : L, "aria-disabled": d, children: [l("div", { className: D("choice-label-container"), children: [c ? l("div", { ...C, className: D("select-radio", ...P), id: E, role: "radio", tabIndex: 0 }, void 0, 0, { fileName: De, lineNumber: 150, columnNumber: 11 }, void 0) : l(ni, { disabled: d, divId: E, id: s, isSelected: i, themeColor: t }, void 0, 0, { fileName: De, lineNumber: 142, columnNumber: 11 }, void 0), n && l("label", { className: D(ne("select-label", p)), htmlFor: E, id: `label-${s}`, children: n }, void 0, 0, { fileName: De, lineNumber: 159, columnNumber: 11 }, void 0)] }, void 0, 0, { fileName: De, lineNumber: 140, columnNumber: 7 }, void 0), u && i && l("div", { className: D("choice-text-entry-container", ...P), children: l(No, { onTextChange: (I) => T({ isSelected: i, userText: I }), promptText: v || "Please specify", textValue: a, useMobileStyling: p }, void 0, 0, { fileName: De, lineNumber: 175, columnNumber: 11 }, void 0) }, void 0, 0, { fileName: De, lineNumber: 169, columnNumber: 9 }, void 0)] }, void 0, 0, { fileName: De, lineNumber: 126, columnNumber: 5 }, void 0);
|
|
1186
|
-
}, No = ({ promptText: e, textValue: t, onTextChange: r, useMobileStyling: n }) => {
|
|
1187
|
-
const i = U(te(null), "inputRef"), { update: o } = V((s) => ({ update: s.update })), a = ii(i, () => o());
|
|
1188
|
-
return Z(() => (a(), i.current && i.current.focus(), () => {
|
|
1189
|
-
o();
|
|
1190
|
-
}), []), l("textarea", { "aria-label": e, "aria-multiline": "true", "aria-placeholder": e, className: D(ne("choice-text-input", n)), "data-gramm": "false", maxLength: 5e3, name: "text", onChange: (s) => {
|
|
1191
|
-
a(), s.stopPropagation(), r(s.currentTarget.value);
|
|
1192
|
-
}, onClick: (s) => {
|
|
1193
|
-
s.stopPropagation();
|
|
1194
|
-
}, onKeyPress: (s) => {
|
|
1195
|
-
s.stopPropagation();
|
|
1196
|
-
}, placeholder: e, ref: i, role: "textbox", rows: 1, value: t }, void 0, 0, { fileName: De, lineNumber: 217, columnNumber: 5 }, void 0);
|
|
1197
|
-
}, Kr = "ul-select-style-element", xt = "ul-select-active-dynamic-style", oi = "ul-select-error-dynamic-style", yo = (e, t, r) => {
|
|
1198
|
-
let n = e.getElementById(Kr), i = !1;
|
|
1199
|
-
n || (n = e.createElement("style"), i = !0), n.tagName.toLowerCase() === "style" && (n.id = Kr, r && (n.nonce = r), n.textContent = xo(t), i && e.head.appendChild(n));
|
|
1200
|
-
}, xo = (e) => `
|
|
1201
|
-
.${xt} {
|
|
1202
|
-
border-color: ${e};
|
|
1203
|
-
}
|
|
1204
|
-
.${xt} .select-radio, .${xt}.select-radio {
|
|
1205
|
-
border: 6px solid ${e};
|
|
1206
|
-
box-shadow: none;
|
|
1207
|
-
}
|
|
1208
|
-
.${oi} {
|
|
1209
|
-
border-color: ${ot};
|
|
1210
|
-
}
|
|
1211
|
-
`, Ue = ({ children: e }) => l("div", { className: "sprig-question-body", children: e }, void 0, 0, { fileName: "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/components/questionBody.tsx", lineNumber: 7, columnNumber: 5 }, void 0), He = ({ children: e }) => {
|
|
1212
|
-
const t = ri();
|
|
1213
|
-
return l("div", { className: D("sprig-question-footer-container", t ? "sprig-border-top" : null), children: e }, void 0, 0, { fileName: "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/components/questionBodyFooterContainer.tsx", lineNumber: 14, columnNumber: 5 }, void 0);
|
|
1214
|
-
};
|
|
1215
|
-
var Be = "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/logo.tsx";
|
|
1216
|
-
const li = ({ logoOnly: e = !1, style: t = {} }) => l("svg", { alt: (e ? "Powered by " : "") + "Sprig", fill: "none", height: "15", style: { display: "block", ...t }, viewBox: e ? "79 0 31 15" : "0 0 112 15", width: e ? "35" : "112", xmlns: "http://www.w3.org/2000/svg", children: [!e && l("path", { d: "M0.648926 12.0181V2.8584H4.21631C6.0127 2.8584 7.25684 4.06445 7.25684 5.86084V5.87354C7.25684 7.66357 6.0127 8.88867 4.21631 8.88867H2.0708V12.0181H0.648926ZM3.86084 4.05811H2.0708V7.69531H3.86084C5.09229 7.69531 5.80957 7.02881 5.80957 5.87988V5.86719C5.80957 4.72461 5.09229 4.05811 3.86084 4.05811ZM11.6621 12.1514C9.63721 12.1514 8.39941 10.7993 8.39941 8.57764V8.56494C8.39941 6.34961 9.64355 4.99121 11.6621 4.99121C13.6743 4.99121 14.9185 6.34326 14.9185 8.56494V8.57764C14.9185 10.7993 13.6807 12.1514 11.6621 12.1514ZM11.6621 11.0024C12.8428 11.0024 13.5156 10.1011 13.5156 8.57764V8.56494C13.5156 7.03516 12.8428 6.14014 11.6621 6.14014C10.4751 6.14014 9.80859 7.03516 9.80859 8.56494V8.57764C9.80859 10.1074 10.4751 11.0024 11.6621 11.0024ZM17.6226 12.0181L15.7183 5.12451H17.1021L18.3398 10.4438H18.4414L19.8633 5.12451H21.1709L22.5928 10.4438H22.7007L23.9321 5.12451H25.2969L23.3989 12.0181H21.9834L20.5552 6.87646H20.4473L19.0254 12.0181H17.6226ZM29.334 12.1514C27.3154 12.1514 26.0967 10.7739 26.0967 8.59033V8.58398C26.0967 6.43213 27.3408 4.99121 29.2642 4.99121C31.1875 4.99121 32.3682 6.38135 32.3682 8.45068V8.93311H27.4805C27.5059 10.2534 28.2295 11.0215 29.3657 11.0215C30.248 11.0215 30.7749 10.5835 30.9399 10.228L30.9653 10.1772L32.292 10.1709L32.2793 10.228C32.0508 11.1357 31.0986 12.1514 29.334 12.1514ZM29.2705 6.12109C28.3311 6.12109 27.6201 6.76221 27.4995 7.94922H31.0034C30.8955 6.71777 30.2036 6.12109 29.2705 6.12109ZM34.0059 12.0181V5.12451H35.3833V6.16553H35.4849C35.7324 5.43555 36.3735 5.00391 37.2939 5.00391C37.5161 5.00391 37.7573 5.03564 37.897 5.06738V6.33691C37.6494 6.28613 37.4146 6.25439 37.1543 6.25439C36.1006 6.25439 35.3833 6.90186 35.3833 7.89844V12.0181H34.0059ZM41.9277 12.1514C39.9092 12.1514 38.6904 10.7739 38.6904 8.59033V8.58398C38.6904 6.43213 39.9346 4.99121 41.8579 4.99121C43.7812 4.99121 44.9619 6.38135 44.9619 8.45068V8.93311H40.0742C40.0996 10.2534 40.8232 11.0215 41.9595 11.0215C42.8418 11.0215 43.3687 10.5835 43.5337 10.228L43.5591 10.1772L44.8857 10.1709L44.873 10.228C44.6445 11.1357 43.6924 12.1514 41.9277 12.1514ZM41.8643 6.12109C40.9248 6.12109 40.2139 6.76221 40.0933 7.94922H43.5972C43.4893 6.71777 42.7974 6.12109 41.8643 6.12109ZM49.1133 12.1323C47.3804 12.1323 46.2568 10.7422 46.2568 8.57764V8.56494C46.2568 6.38135 47.3613 5.00391 49.1133 5.00391C50.0591 5.00391 50.8652 5.47363 51.2334 6.21631H51.3413V2.42041H52.7124V12.0181H51.3413V10.9326H51.2334C50.8335 11.688 50.0781 12.1323 49.1133 12.1323ZM49.5068 10.958C50.6558 10.958 51.3604 10.0503 51.3604 8.57764V8.56494C51.3604 7.09229 50.6494 6.18457 49.5068 6.18457C48.3516 6.18457 47.6597 7.08594 47.6597 8.56494V8.57764C47.6597 10.0566 48.3516 10.958 49.5068 10.958ZM61.98 12.1323C61.0151 12.1323 60.2598 11.688 59.8599 10.9326H59.7583V12.0181H58.3809V2.42041H59.7583V6.21631H59.8599C60.228 5.47363 61.0342 5.00391 61.98 5.00391C63.7319 5.00391 64.8364 6.38135 64.8364 8.56494V8.57764C64.8364 10.7422 63.7192 12.1323 61.98 12.1323ZM61.5928 10.958C62.7417 10.958 63.4336 10.0566 63.4336 8.57764V8.56494C63.4336 7.08594 62.7417 6.18457 61.5928 6.18457C60.4438 6.18457 59.7329 7.09229 59.7329 8.56494V8.57764C59.7329 10.0503 60.4438 10.958 61.5928 10.958ZM66.8867 14.4429C66.7153 14.4429 66.5122 14.4302 66.3345 14.4111V13.3257C66.4678 13.3447 66.6392 13.3511 66.7979 13.3511C67.439 13.3511 67.8262 13.0781 68.0293 12.3799L68.1309 12.0244L65.6299 5.12451H67.1152L68.8418 10.6343H68.9624L70.6826 5.12451H72.1299L69.5654 12.2847C68.9814 13.9287 68.2832 14.4429 66.8867 14.4429Z", fill: "black", fillOpacity: "0.7" }, void 0, 0, { fileName: Be, lineNumber: 19, columnNumber: 9 }, void 0), l("path", { d: "M81.1088 6.63629C79.6878 6.32154 78.9672 5.76865 78.9672 4.99369C78.9672 4.19299 79.736 3.5886 80.7556 3.5886C81.8066 3.5886 82.5995 4.25285 82.5995 5.13336V5.20352H84.0518V5.13336C84.0518 3.52424 82.6405 2.30774 80.7693 2.30774C79.8676 2.30774 79.0414 2.58451 78.4433 3.08655C78.1463 3.33144 77.9077 3.63818 77.7448 3.98479C77.5818 4.33141 77.4984 4.70934 77.5005 5.09153C77.4946 5.44197 77.5675 5.78934 77.714 6.10857C77.8605 6.42779 78.0769 6.71092 78.3475 6.93752C78.8512 7.37584 79.5659 7.70024 80.4709 7.90299C81.9949 8.23898 82.7676 8.81054 82.7676 9.60094C82.7676 10.4576 81.9258 11.1032 80.813 11.1032C79.6571 11.1032 78.7854 10.3856 78.7854 9.43424V9.36408H77.3318V9.43424C77.3318 11.1167 78.8219 12.3847 80.7973 12.3847C81.7421 12.3847 82.6093 12.0983 83.2393 11.5769C83.5519 11.3237 83.8034 11.0048 83.9753 10.6433C84.1472 10.2818 84.2352 9.88702 84.2329 9.48766C84.2329 8.05875 83.1833 7.09907 81.1088 6.63629Z", fill: "black", fillOpacity: "0.7" }, void 0, 0, { fileName: Be, lineNumber: 25, columnNumber: 7 }, void 0), l("path", { d: "M89.2394 4.68276C88.6963 4.67605 88.1596 4.79915 87.6751 5.04156C87.1905 5.28397 86.7725 5.63851 86.4566 6.07497V4.85204H85.0747V14.8479H86.4566V11.0356C86.7725 11.472 87.1906 11.8265 87.6751 12.0688C88.1596 12.3111 88.6963 12.434 89.2394 12.4272C91.3836 12.4272 93 10.7627 93 8.55495C93 6.34723 91.3836 4.68276 89.2394 4.68276ZM91.5608 8.84202C91.5057 9.41605 91.2512 9.95356 90.8406 10.3633C90.4299 10.773 89.8883 11.0296 89.3078 11.0896C88.5363 11.1669 87.8177 10.9461 87.2841 10.4692C86.7505 9.99222 86.4566 9.3106 86.4566 8.55495C86.4566 7.10159 87.5538 6.00546 89.0087 6.00546C89.7619 6.00546 90.4421 6.29124 90.9171 6.81002C91.407 7.34232 91.6357 8.06385 91.5608 8.84202Z", fill: "black", fillOpacity: "0.7" }, void 0, 0, { fileName: Be, lineNumber: 30, columnNumber: 7 }, void 0), l("path", { d: "M109.95 4.85407V6.06349C109.298 5.18298 108.292 4.68286 107.153 4.68286C105.017 4.68286 103.406 6.31709 103.406 8.48426C103.406 10.6514 105.017 12.285 107.153 12.285C108.296 12.285 109.303 11.79 109.95 10.9185V11.1046C109.95 12.6101 108.993 13.5826 107.513 13.5826C106.513 13.5826 105.68 13.1494 105.284 12.424L105.264 12.3867H103.838L103.871 12.48C104.112 13.1892 104.583 13.8001 105.211 14.2179C105.841 14.6324 106.637 14.8512 107.513 14.8512C108.637 14.8512 109.594 14.4972 110.28 13.8285C110.967 13.1597 111.332 12.2194 111.332 11.1213V4.85407H109.95ZM109.175 10.3502C108.588 10.905 107.752 11.138 106.879 10.9887C106.361 10.8984 105.886 10.6475 105.523 10.2725C105.16 9.89751 104.927 9.41787 104.859 8.90328C104.736 8.03757 104.999 7.21756 105.581 6.655C106.069 6.19093 106.723 5.93643 107.401 5.94699C107.565 5.94713 107.729 5.96026 107.891 5.98625C108.946 6.15489 109.781 7.01609 109.921 8.0852C110.039 8.96507 109.766 9.78958 109.175 10.3502Z", fill: "black", fillOpacity: "0.7" }, void 0, 0, { fileName: Be, lineNumber: 35, columnNumber: 7 }, void 0), l("path", { d: "M101.89 2.12378C101.63 2.06766 101.358 2.11486 101.133 2.25518C100.908 2.39551 100.747 2.61769 100.687 2.87371C100.626 3.12973 100.67 3.39902 100.809 3.62339C100.947 3.84775 101.17 4.00917 101.428 4.07275C101.503 4.08936 101.58 4.09778 101.657 4.09786C101.906 4.09824 102.146 4.0083 102.331 3.84518C102.517 3.68206 102.636 3.45714 102.664 3.21327C102.693 2.9694 102.63 2.72361 102.487 2.5227C102.344 2.32179 102.132 2.17981 101.89 2.12378Z", fill: "black", fillOpacity: "0.7" }, void 0, 0, { fileName: Be, lineNumber: 40, columnNumber: 7 }, void 0), l("path", { d: "M100.967 10.934H99.7755C98.9285 10.934 98.4196 10.3644 98.4196 9.40982C98.4196 8.4791 98.8757 7.36945 99.8054 6.01778L99.8178 5.99976V5.61807L95.8571 5.06453C95.8585 4.90331 95.8162 4.74466 95.7346 4.60501C95.653 4.46536 95.5352 4.34979 95.3932 4.27027C95.0381 4.07718 94.6498 4.07717 94.3279 4.26383C94.1667 4.35799 94.035 4.4945 93.9476 4.65816C93.8602 4.82182 93.8205 5.00623 93.8328 5.19087C93.8452 5.37552 93.9092 5.55315 94.0176 5.70402C94.1261 5.85489 94.2748 5.97309 94.4472 6.04546L93.2151 12.258H94.5833L95.7196 6.35891L97.8593 6.7155C97.284 7.73439 96.9921 8.68442 96.9921 9.53919C96.9921 11.1168 97.9577 12.1498 99.5187 12.2496V12.258H102.346V4.87723H100.967V10.934Z", fill: "black", fillOpacity: "0.7" }, void 0, 0, { fileName: Be, lineNumber: 45, columnNumber: 7 }, void 0)] }, void 0, 0, { fileName: Be, lineNumber: 9, columnNumber: 5 }, void 0);
|
|
1217
|
-
var tt = "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/components/sprigBrandLogo.tsx";
|
|
1218
|
-
const ai = ({ forceBrandedLogo: e, marketingUrlLink: t }) => l("div", { className: e ? "yellow-footer-logo" : "", style: { marginTop: "4px", marginBottom: "4px" }, children: l("a", { href: t, rel: "noreferrer", target: "_blank", children: l("div", { style: { display: "flex" }, children: [l(li, { logoOnly: !1 }, void 0, 0, { fileName: tt, lineNumber: 17, columnNumber: 9 }, void 0), e && l(sr, { style: { display: "block", margin: "auto 0 auto 4px", transform: "rotateY(0deg) rotate(-45deg)" } }, void 0, 0, { fileName: tt, lineNumber: 19, columnNumber: 11 }, void 0)] }, void 0, 0, { fileName: tt, lineNumber: 16, columnNumber: 7 }, void 0) }, void 0, 0, { fileName: tt, lineNumber: 15, columnNumber: 5 }, void 0) }, void 0, 0, { fileName: tt, lineNumber: 11, columnNumber: 3 }, void 0);
|
|
1219
|
-
var Fe = "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/components/thankYouLink.tsx";
|
|
1220
|
-
const si = ({ marketingUrlLink: e }) => l("a", { dir: "ltr", href: e, rel: "noreferrer", target: "_blank", children: l("div", { className: "thank-you-card-link", children: [l("div", { className: "sprig-box-logo", children: l(li, { logoOnly: !0, style: { margin: "auto" } }, void 0, 0, { fileName: Fe, lineNumber: 10, columnNumber: 11 }, void 0) }, void 0, 0, { fileName: Fe, lineNumber: 9, columnNumber: 9 }, void 0), l("div", { children: l("p", { children: ["Capture insights about your own product", l(sr, { style: { display: "inline-flex", marginInlineStart: "4px", verticalAlign: "middle" } }, void 0, 0, { fileName: Fe, lineNumber: 15, columnNumber: 13 }, void 0)] }, void 0, 0, { fileName: Fe, lineNumber: 13, columnNumber: 11 }, void 0) }, void 0, 0, { fileName: Fe, lineNumber: 12, columnNumber: 9 }, void 0)] }, void 0, 0, { fileName: Fe, lineNumber: 8, columnNumber: 7 }, void 0) }, void 0, 0, { fileName: Fe, lineNumber: 7, columnNumber: 5 }, void 0), We = (e) => (e == null ? void 0 : e.buttonText) || "Next", ui = (e) => (e == null ? void 0 : e.skipButtonText) || "Skip", ci = ({ marketingUrl: e, slugName: t, surveyId: r, forceBrandedLogo: n }) => `${e}?utm_source=survey_branding&utm_medium=website&utm_campaign=${t}&utm_content=${r}${n ? "&utm_term=poweredby_pill" : ""}`;
|
|
1221
|
-
var pe = "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/cards/consentLegalCard.tsx";
|
|
1222
|
-
const ko = ({ className: e, message: t, next: r, properties: n, questionId: i, type: o }) => {
|
|
1223
|
-
const { useMobileStyling: a, border: s, isLongFormSurvey: c, focusedQuestionId: p } = V((C) => ({ useMobileStyling: C.useMobileStyling, border: C.border, isLongFormSurvey: ae(C.studyType), focusedQuestionId: C.focusedQuestionId })), [m, u] = U(z(!1), "isConsentSelected"), [f, v] = U(z(""), "name"), [d, h] = U(z(!1), "hasValidationError"), b = c && p === i, y = n == null ? void 0 : n.collectName, g = (n == null ? void 0 : n.nameLabelText) || "Full Name", w = (n == null ? void 0 : n.consentText) || "I agree to the stated conditions", T = (n == null ? void 0 : n.submitButtonText) || "Submit", x = !!f.trim(), S = m && (!y || x), N = (C, I = !1) => {
|
|
1224
|
-
C.preventDefault(), C.stopPropagation();
|
|
1225
|
-
let R = null;
|
|
1226
|
-
if (!I) {
|
|
1227
|
-
if (!S) return void h(!0);
|
|
1228
|
-
R = { submitted: !0 }, y && (R.name = f);
|
|
1229
|
-
}
|
|
1230
|
-
r({ value: R, questionId: i, type: o }, S);
|
|
1231
|
-
}, L = (C) => {
|
|
1232
|
-
C.preventDefault(), C.stopPropagation(), v(C.currentTarget.value);
|
|
1233
|
-
}, E = (C) => {
|
|
1234
|
-
C.currentTarget.style.borderColor = d && !x ? ot : s;
|
|
1235
|
-
}, P = (C) => {
|
|
1236
|
-
C.currentTarget.style.borderColor = d && !x ? ot : Yt;
|
|
1237
|
-
}, _ = () => l(He, { children: [l("div", { className: "sprig-stretch", children: [l(Et, { allowTextEntry: !1, border: s, error: d && !m, id: "consent", isRadio: !1, isSelected: m, label: w, onUserInputChanged: ({ selected: C }) => {
|
|
1238
|
-
C !== m && u(!m);
|
|
1239
|
-
}, useMobileStyling: a }, void 0, 0, { fileName: pe, lineNumber: 93, columnNumber: 9 }, void 0), y && l("input", { "aria-label": g, "aria-placeholder": g, className: D(ne("ul-consent-legal__name-input", a)), "data-gramm": "false", maxLength: 250, name: "name", onBlur: P, onFocus: E, onInput: L, placeholder: g, style: d && !x ? { borderColor: ot } : {}, tabIndex: 0, value: f }, void 0, 0, { fileName: pe, lineNumber: 109, columnNumber: 11 }, void 0)] }, void 0, 0, { fileName: pe, lineNumber: 92, columnNumber: 7 }, void 0), l("div", { className: "ul-card__button-wrapper ul-card-vertical__button-wrapper", children: [l(oe, { className: S ? "" : "sprig-button-disabled", onClick: N, children: T }, void 0, 0, { fileName: pe, lineNumber: 133, columnNumber: 9 }, void 0), n.required === !1 && !c && l("button", { className: "ul-card-skip__button", onClick: (C) => N(C, !0), children: ui(n) }, void 0, 0, { fileName: pe, lineNumber: 144, columnNumber: 11 }, void 0)] }, void 0, 0, { fileName: pe, lineNumber: 132, columnNumber: 7 }, void 0)] }, void 0, 0, { fileName: pe, lineNumber: 91, columnNumber: 5 }, void 0);
|
|
1240
|
-
return l("div", { className: D(e, c && !b && "ul-card--unfocused", "ul-card__consent-legal", "fade-in-transition"), children: [l(ke, { message: t, properties: { questionHtml: n.questionHtml } }, void 0, 0, { fileName: pe, lineNumber: 192, columnNumber: 7 }, void 0), l(Y, { children: [n != null && n.richTextBody ? l(Ue, { children: l("div", { className: "ul-rich-text-body", dangerouslySetInnerHTML: n != null && n.richTextBody ? { __html: n.richTextBody } : void 0, id: "ul-card__consent-legal-body-container" }, void 0, 0, { fileName: pe, lineNumber: 160, columnNumber: 13 }, void 0) }, void 0, 0, { fileName: pe, lineNumber: 159, columnNumber: 11 }, void 0) : null, l(Re, { properties: n, defaultBody: _, embeddedType: "pdf" }, void 0, 0, { fileName: pe, lineNumber: 171, columnNumber: 9 }, void 0)] }, void 0)] }, i, 0, { fileName: pe, lineNumber: 183, columnNumber: 5 }, void 0);
|
|
1241
|
-
}, wo = ({ icon: e, scaleLabelType: t, value: r, selectedValue: n }) => {
|
|
1242
|
-
if (t === "smiley" && r === n) {
|
|
1243
|
-
let i = 0;
|
|
1244
|
-
return e.replace(/black/g, () => ++i == 1 ? "black" : "white");
|
|
1245
|
-
}
|
|
1246
|
-
return e;
|
|
1247
|
-
}, Co = ({ activeValue: e, border: t, icon: r, isPressed: n, onSubmit: i, range: o, scaleLabelType: a, selectedValue: s, setSelectedValue: c, setActiveValue: p, setIsPressed: m, useMobileStyling: u, value: f, viewDocument: v }) => {
|
|
1248
|
-
const { isLongFormSurvey: d } = V((N) => ({ isLongFormSurvey: ae(N.studyType) })), h = `option-${f}`, b = a === "number", y = a === "star", g = a === "smiley", w = b && f === e || f === s, [T, x] = (() => {
|
|
1249
|
-
const N = y && s !== null && f <= s;
|
|
1250
|
-
return y && f <= e || g && f === e || N || f === e || f === s ? [t, n || N || f === s ? 1 : 0.3] : ["", 1];
|
|
1251
|
-
})(), S = U(xe(() => {
|
|
1252
|
-
const N = { borderColor: w ? T : "", fillOpacity: w ? "" : x, zIndex: w ? 3 : "auto", color: s === f ? "#fff" : "" };
|
|
1253
|
-
return b ? { ...N, backgroundColor: s === f ? T : "" } : { ...N, color: y || g || s === f ? T : "" };
|
|
1254
|
-
}, [w, T, x, s, f, b, y, g]), "buttonStyles");
|
|
1255
|
-
return l("button", { "aria-label": b ? void 0 : String(f), className: (() => {
|
|
1256
|
-
switch (a) {
|
|
1257
|
-
case "star":
|
|
1258
|
-
return D(ne("likert-star", u), ne(`likert-star-${f}`, u));
|
|
1259
|
-
case "smiley":
|
|
1260
|
-
return D(ne("likert-smiley", u), ne(`likert-smiley-${f}`, u));
|
|
1261
|
-
default:
|
|
1262
|
-
return f === o ? D(ne("likert-number", u), ne(`likert-number-${f}`, u), ne("likert-last-option", u)) : D(ne("likert-number", u), ne(`likert-number-${f}`, u));
|
|
1263
|
-
}
|
|
1264
|
-
})(), dangerouslySetInnerHTML: { __html: wo({ icon: r, scaleLabelType: a, value: f, selectedValue: s }) }, id: h, onClick: (N) => {
|
|
1265
|
-
d && (N.preventDefault(), N.stopPropagation(), c(f)), i();
|
|
1266
|
-
}, onKeyDown: (N) => {
|
|
1267
|
-
var P, _;
|
|
1268
|
-
const L = v.querySelectorAll(`.likert-${a ?? "number"}`), E = f - 1;
|
|
1269
|
-
N.key === "ArrowRight" ? (P = L[E + 1]) == null || P.focus() : N.key === "ArrowLeft" ? (_ = L[E - 1]) == null || _.focus() : N.key !== "Enter" && N.key !== " " || (d && (N.preventDefault(), N.stopPropagation(), c(f)), i());
|
|
1270
|
-
}, onPointerDown: () => m(!0), onPointerEnter: () => p(f), onPointerLeave: () => {
|
|
1271
|
-
p(-1), m(!1);
|
|
1272
|
-
}, style: S, tabIndex: 0 }, void 0, 0, { fileName: "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/cards/likertCard/likertOption.tsx", lineNumber: 148, columnNumber: 5 }, void 0);
|
|
1273
|
-
};
|
|
1274
|
-
var fe = "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/cards/likertCard/likertCard.tsx";
|
|
1275
|
-
const So = ({ className: e, labels: t, message: r, next: n, properties: i, questionId: o, type: a }) => {
|
|
1276
|
-
const { border: s, useMobileStyling: c, viewDocument: p, isLongFormSurvey: m, focusedQuestionId: u } = V((I) => ({ border: I.border, useMobileStyling: I.useMobileStyling, viewDocument: I.viewDocument, isLongFormSurvey: ae(I.studyType), focusedQuestionId: I.focusedQuestionId })), [f, v] = U(z(-1), "activeValue"), [d, h] = U(z(!1), "isPressed"), [b, y] = U(z(null), "selectedValue"), g = m && u === o, w = t && t.left, T = t && t.right;
|
|
1277
|
-
let x;
|
|
1278
|
-
const { range: S, scaleLabelType: N, ratingIcons: L } = i;
|
|
1279
|
-
S && (x = Number(S));
|
|
1280
|
-
const E = x || 5, P = (I) => {
|
|
1281
|
-
var R, B;
|
|
1282
|
-
switch (N) {
|
|
1283
|
-
case "star":
|
|
1284
|
-
return (R = L[0]) == null ? void 0 : R.svg;
|
|
1285
|
-
case "smiley":
|
|
1286
|
-
return (B = L[I]) == null ? void 0 : B.svg;
|
|
1287
|
-
default:
|
|
1288
|
-
return String(I + 1);
|
|
1289
|
-
}
|
|
1290
|
-
}, _ = [...Array(E)].map((I, R) => {
|
|
1291
|
-
const B = R + 1;
|
|
1292
|
-
return l(Co, { activeValue: f, border: s, icon: P(R), isPressed: d, onSubmit: () => n({ value: B, questionId: o, type: a }, !0), range: E, scaleLabelType: N, selectedValue: b, setActiveValue: v, setIsPressed: h, setSelectedValue: y, useMobileStyling: c, value: B, viewDocument: p }, R, 0, { fileName: fe, lineNumber: 73, columnNumber: 7 }, void 0);
|
|
1293
|
-
}), C = (I) => {
|
|
1294
|
-
I.preventDefault(), I.stopPropagation(), n({ value: null, questionId: o, type: a }, !0);
|
|
1295
|
-
};
|
|
1296
|
-
return l("form", { className: D(e, "ul-card--likert", "fade-in-transition", m && !g && "ul-card--unfocused"), children: [l(ke, { message: r, properties: i }, void 0, 0, { fileName: fe, lineNumber: 138, columnNumber: 7 }, void 0), l(Re, { properties: i, defaultBody: () => l(Y, { children: [l(Ue, { children: [l("div", { "aria-label": `Rating (1 - ${E})`, className: "ul-card--likert__numbers", role: "radiogroup", children: _ }, void 0, 0, { fileName: fe, lineNumber: 103, columnNumber: 11 }, void 0), l("div", { className: "ul-card--likert__labels", children: [l("span", { children: w }, void 0, 0, { fileName: fe, lineNumber: 111, columnNumber: 13 }, void 0), l("span", { children: T }, void 0, 0, { fileName: fe, lineNumber: 112, columnNumber: 13 }, void 0)] }, void 0, 0, { fileName: fe, lineNumber: 110, columnNumber: 11 }, void 0)] }, void 0, 0, { fileName: fe, lineNumber: 102, columnNumber: 9 }, void 0), !i.required && !m && l(He, { children: l("div", { className: "ul-vertical-centered-container", children: l(oe, { onClick: C, children: We(i) }, void 0, 0, { fileName: fe, lineNumber: 118, columnNumber: 15 }, void 0) }, void 0, 0, { fileName: fe, lineNumber: 117, columnNumber: 13 }, void 0) }, void 0, 0, { fileName: fe, lineNumber: 116, columnNumber: 11 }, void 0)] }, void 0) }, void 0, 0, { fileName: fe, lineNumber: 139, columnNumber: 7 }, void 0)] }, o, 0, { fileName: fe, lineNumber: 129, columnNumber: 5 }, void 0);
|
|
1297
|
-
};
|
|
1298
|
-
var ht = "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/cards/matrixViews/matrixAccordionView.tsx";
|
|
1299
|
-
const di = (e) => e && (e.scrollHeight > e.offsetHeight ? e : di(e.parentElement)), To = (e) => {
|
|
1300
|
-
if (!e || !((r) => r instanceof HTMLElement)(e)) return 0;
|
|
1301
|
-
const t = getComputedStyle(e);
|
|
1302
|
-
return parseFloat(t.marginTop) + parseFloat(t.marginBottom) + (parseFloat(t.borderTopWidth) + parseFloat(t.borderBottomWidth));
|
|
1303
|
-
}, Io = ({ columns: e, onSelect: t, options: r, selectedOptions: n }) => {
|
|
1304
|
-
const i = U(te([]), "refs"), { border: o, useMobileStyling: a } = V((f) => ({ border: f.border, useMobileStyling: f.useMobileStyling })), s = r.findIndex((f) => n[f.id] === null), [c, p] = U(z(s), "focusedIndex"), m = ze((f, v) => {
|
|
1305
|
-
t(f, v);
|
|
1306
|
-
const d = c + 1, h = r[d];
|
|
1307
|
-
if (h && n[h.id] === null) {
|
|
1308
|
-
p(d);
|
|
1309
|
-
const b = i.current[c];
|
|
1310
|
-
if (b != null && b.firstElementChild) {
|
|
1311
|
-
const y = di(b), g = b.firstElementChild, w = To(b) + g.clientHeight;
|
|
1312
|
-
y == null || y.scrollTo(0, b.offsetTop + w);
|
|
1313
|
-
}
|
|
1314
|
-
}
|
|
1315
|
-
}, [t, r, n, c]), u = ze((f, v) => {
|
|
1316
|
-
const d = c === f;
|
|
1317
|
-
return l(bo, { animate: !0, header: v.label, isOpen: d, onClick: () => p(d && !window.UserLeap.isMobileSDK ? -1 : f), ref: (h) => {
|
|
1318
|
-
h && (i.current[f] = h);
|
|
1319
|
-
}, showHeaderCheck: n[v.id] !== null, children: l("div", { style: { paddingTop: "12px" }, children: e.map((h) => l(Et, { allowTextEntry: !1, ariaLabel: `${v.label}-${h.label}`, border: o, error: !1, id: `${v.id}-${h.value}`, isRadio: !0, isSelected: n[v.id] === h.value, label: h.label, onUserInputChanged: () => m(v.id, h.value), useMobileStyling: a }, h.label, 0, { fileName: ht, lineNumber: 93, columnNumber: 17 }, void 0)) }, void 0, 0, { fileName: ht, lineNumber: 90, columnNumber: 11 }, void 0) }, v.id, 0, { fileName: ht, lineNumber: 71, columnNumber: 9 }, void 0);
|
|
1320
|
-
}, [o, e, c, m, n, a]);
|
|
1321
|
-
return l("div", { children: r.map((f, v) => u(v, f)) }, void 0, 0, { fileName: ht, lineNumber: 114, columnNumber: 10 }, void 0);
|
|
1322
|
-
};
|
|
1323
|
-
var ie = "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/cards/matrixViews/matrixTableView.tsx";
|
|
1324
|
-
const Eo = ({ columns: e, onSelect: t, options: r, selectedOptions: n }) => {
|
|
1325
|
-
const { border: i, useMobileStyling: o, isLongFormSurvey: a } = V((d) => ({ border: d.border, useMobileStyling: d.useMobileStyling, isLongFormSurvey: ae(d.studyType) })), s = r.length, c = e.length, p = U(te(null), "matrixContainerRef"), [m, u] = U(z(!1), "showGradient"), [f, v] = U(z(!1), "hasScrollableWidth");
|
|
1326
|
-
return Z(() => {
|
|
1327
|
-
const d = p.current, h = new ResizeObserver((b) => {
|
|
1328
|
-
window.requestAnimationFrame(() => {
|
|
1329
|
-
d && (u(Math.round(b[0].contentRect.width) < d.scrollWidth), v(Math.round(b[0].contentRect.width) < d.scrollWidth));
|
|
1330
|
-
});
|
|
1331
|
-
});
|
|
1332
|
-
return d && h.observe(d), () => {
|
|
1333
|
-
d && h.unobserve(d);
|
|
1334
|
-
};
|
|
1335
|
-
}, []), l("div", { className: "ul-card--matrix_question_container", children: [l("div", { className: D("ul-card--matrix_container", m && "ul-matrix-scroll-gradient"), onScroll: () => {
|
|
1336
|
-
(() => {
|
|
1337
|
-
const d = p.current;
|
|
1338
|
-
d && u(d.clientWidth + Math.abs(d.scrollLeft) < d.scrollWidth);
|
|
1339
|
-
})();
|
|
1340
|
-
}, ref: p, children: l("div", { className: D(a && "ul-card--matrix_grid_longform", "ul-card--matrix_grid"), style: `--numColumns: ${c}; --numRows: ${s + 1};`, children: [l("div", {}, void 0, 0, { fileName: ie, lineNumber: 108, columnNumber: 11 }, void 0), " ", e.map((d) => l("div", { className: "ul-matrix-column-label", children: d.label }, d.label, 0, { fileName: ie, lineNumber: 110, columnNumber: 13 }, void 0)), r.map((d) => l(Y, { children: [l("div", { "aria-label": d.label, className: "ul-matrix-row-label", children: d.label }, d.label, 0, { fileName: ie, lineNumber: 117, columnNumber: 17 }, void 0), l("div", { className: "ul-matrix-row-options", role: "radiogroup", children: e.map((h, b) => l("div", { className: D("ul-matrix-option-wrapper", b === c - 1 && "ul-matrix-last-option"), children: l(Et, { allowTextEntry: !1, ariaLabel: `${d.label}-${h.label}`, border: i, choiceStyle: { background: "transparent", border: "none", marginBottom: "0", padding: "0" }, error: !1, id: `${d.id}-${h.value}`, isRadio: !0, isSelected: n[d.id] === h.value, onUserInputChanged: () => t(d.id, h.value), useMobileStyling: o }, void 0, 0, { fileName: ie, lineNumber: 135, columnNumber: 25 }, void 0) }, h.value, 0, { fileName: ie, lineNumber: 128, columnNumber: 23 }, void 0)) }, void 0, 0, { fileName: ie, lineNumber: 124, columnNumber: 17 }, void 0)] }, void 0))] }, void 0, 0, { fileName: ie, lineNumber: 100, columnNumber: 9 }, void 0) }, void 0, 0, { fileName: ie, lineNumber: 90, columnNumber: 7 }, void 0), (m || f) && l("button", { className: f && !m ? "ul-matrix-scroll-arrow left" : "ul-matrix-scroll-arrow", onClick: f && !m ? (d) => {
|
|
1341
|
-
d.preventDefault();
|
|
1342
|
-
const h = p.current;
|
|
1343
|
-
if (h) {
|
|
1344
|
-
const b = getComputedStyle(h).direction === "rtl";
|
|
1345
|
-
h.scrollTo({ left: b ? h.scrollWidth - h.clientWidth : 0, behavior: "smooth" });
|
|
1346
|
-
}
|
|
1347
|
-
} : (d) => {
|
|
1348
|
-
d.preventDefault();
|
|
1349
|
-
const h = p.current;
|
|
1350
|
-
if (h) {
|
|
1351
|
-
const b = getComputedStyle(h).direction === "rtl";
|
|
1352
|
-
h.scrollTo({ left: b ? h.clientWidth - h.scrollWidth : h.scrollWidth, behavior: "smooth" });
|
|
1353
|
-
}
|
|
1354
|
-
}, children: f && !m ? l(Lo, {}, void 0, 0, { fileName: ie, lineNumber: 175, columnNumber: 13 }, void 0) : l(Oo, {}, void 0, 0, { fileName: ie, lineNumber: 177, columnNumber: 13 }, void 0) }, void 0, 0, { fileName: ie, lineNumber: 164, columnNumber: 9 }, void 0)] }, void 0, 0, { fileName: ie, lineNumber: 89, columnNumber: 5 }, void 0);
|
|
1355
|
-
}, Lo = () => l("svg", { fill: "currentColor", height: "32", transform: "matrix(-1,0,0,1,0,0)", version: "1.1", viewBox: "0 0 256 256", width: "32", xmlns: "http://www.w3.org/2000/svg", children: l("path", { d: "M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z" }, void 0, 0, { fileName: ie, lineNumber: 195, columnNumber: 5 }, void 0) }, void 0, 0, { fileName: ie, lineNumber: 186, columnNumber: 3 }, void 0), Oo = () => l("svg", { fill: "currentColor", height: "32", viewBox: "0 0 256 256", width: "32", xmlns: "http://www.w3.org/2000/svg", children: l("path", { d: "M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z" }, void 0, 0, { fileName: ie, lineNumber: 207, columnNumber: 5 }, void 0) }, void 0, 0, { fileName: ie, lineNumber: 200, columnNumber: 3 }, void 0);
|
|
1356
|
-
var Ce = "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/cards/matrixCard.tsx";
|
|
1357
|
-
const Po = ({ className: e, message: t, next: r, options: n, properties: i, questionId: o, type: a, showIndividualSubmit: s = !1, onSubmitButtonClick: c }) => {
|
|
1358
|
-
const { useMobileStyling: p, isLongFormSurvey: m, focusedQuestionId: u, setFocusedQuestionId: f } = V((N) => ({ useMobileStyling: N.useMobileStyling, isLongFormSurvey: ae(N.studyType), focusedQuestionId: N.focusedQuestionId, setFocusedQuestionId: N.setFocusedQuestionId })), v = i.matrixColumn, d = i.required, h = m && u === o, b = (N) => {
|
|
1359
|
-
N.preventDefault(), N.stopPropagation(), r({ value: g, questionId: o, type: a }, !0), c && c();
|
|
1360
|
-
}, y = n.reduce((N, L) => (N[L.id] = null, N), {}), [g, w] = U(z(y), "optionSelectedMap"), T = (N) => d && Object.values(N).every((L) => L == null), x = (N, L) => {
|
|
1361
|
-
m && r({ value: { ...g, [N]: L }, questionId: o, type: a }, !T({ ...g, [N]: L })), w((E) => ({ ...E, [N]: L }));
|
|
1362
|
-
}, S = i.displayMatrixAsAccordion || p;
|
|
1363
|
-
return l("form", { className: D(e, !m && "ul-card__matrix", "fade-in-transition", m && !h && "ul-card--unfocused"), id: "text-form", onClick: () => {
|
|
1364
|
-
h && f(o);
|
|
1365
|
-
}, onSubmit: b, children: [l(ke, { message: t, properties: i }, void 0, 0, { fileName: Ce, lineNumber: 156, columnNumber: 7 }, void 0), l(Re, { properties: i, defaultBody: () => l(Y, { children: [l(Ue, { children: [S ? l(Io, { columns: v, onSelect: x, options: n, selectedOptions: g }, void 0, 0, { fileName: Ce, lineNumber: 110, columnNumber: 13 }, void 0) : l(Eo, { columns: v, onSelect: x, options: n, selectedOptions: g }, void 0, 0, { fileName: Ce, lineNumber: 117, columnNumber: 13 }, void 0), s && l(It, { handleSubmit: b, isSubmitDisabled: T(g) }, void 0, 0, { fileName: Ce, lineNumber: 125, columnNumber: 13 }, void 0)] }, void 0, 0, { fileName: Ce, lineNumber: 108, columnNumber: 9 }, void 0), !m && l(He, { children: l("div", { className: "ul-card__button-wrapper", children: l(oe, { disabled: T(g), children: We(i) }, void 0, 0, { fileName: Ce, lineNumber: 134, columnNumber: 15 }, void 0) }, void 0, 0, { fileName: Ce, lineNumber: 133, columnNumber: 13 }, void 0) }, void 0, 0, { fileName: Ce, lineNumber: 132, columnNumber: 11 }, void 0)] }, void 0) }, void 0, 0, { fileName: Ce, lineNumber: 157, columnNumber: 7 }, void 0)] }, o, 0, { fileName: Ce, lineNumber: 144, columnNumber: 5 }, void 0);
|
|
1366
|
-
};
|
|
1367
|
-
var mi = ((e) => (e.CONTINUE = "CONTINUE", e.EXTERNAL = "EXTERNAL", e.NO_BUTTON = "NO_BUTTON", e))(mi || {}), nt = ((e) => (e.Unlimited = "Unlimited", e.Maximum = "Maximum", e.Range = "Range", e))(nt || {}), $e = "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/components/select/select.tsx";
|
|
1368
|
-
const Mo = ({ options: e, selectItem: t, selectedOptions: r, showCheckbox: n, disabledOptions: i, dropdownFooter: o }) => {
|
|
1369
|
-
const { themeColor: a } = V((s) => ({ doc: s.viewDocument, themeColor: s.border }));
|
|
1370
|
-
return l("div", { className: "select-list", children: [e.map((s) => {
|
|
1371
|
-
return l("div", { "aria-disabled": i == null ? void 0 : i.includes(s), className: D("select-option", i != null && i.includes(s) ? "ul-choice-disabled" : ""), onClick: (p) => {
|
|
1372
|
-
i != null && i.includes(s) || (t(s), p.stopPropagation());
|
|
1373
|
-
}, role: "option", style: { ...i != null && i.includes(s) ? { opacity: 0.5, cursor: "not-allowed" } : {} }, children: [n && l(ni, { divId: (c = s.id, `checkbox-div-${c}`), id: s.id, isSelected: r.includes(s), themeColor: a }, void 0, 0, { fileName: $e, lineNumber: 63, columnNumber: 13 }, void 0), s.label] }, s.id, 0, { fileName: $e, lineNumber: 43, columnNumber: 9 }, void 0);
|
|
1374
|
-
var c;
|
|
1375
|
-
}), o] }, void 0, 0, { fileName: $e, lineNumber: 41, columnNumber: 5 }, void 0);
|
|
1376
|
-
}, Ro = ({ isMultiSelect: e = !1, multiselectText: t = "choices selected", onChange: r, options: n, placeholderText: i, value: o, disabledOptions: a = [], dropdownFooter: s }) => {
|
|
1377
|
-
const [c, p] = U(z(!1), "isOpen"), { viewDocument: m, update: u } = V((d) => ({ viewDocument: d.viewDocument, update: d.update })), f = () => {
|
|
1378
|
-
p(!c), u();
|
|
1379
|
-
};
|
|
1380
|
-
Z(() => {
|
|
1381
|
-
var h;
|
|
1382
|
-
const d = (b) => {
|
|
1383
|
-
const y = b.target;
|
|
1384
|
-
(y == null ? void 0 : y.closest(".select-option.ul-choice-disabled")) || (p(!1), u());
|
|
1385
|
-
};
|
|
1386
|
-
m.addEventListener("click", d);
|
|
1387
|
-
try {
|
|
1388
|
-
(h = window.parent) == null || h.addEventListener("click", d);
|
|
1389
|
-
} catch {
|
|
1390
|
-
window.addEventListener("click", d);
|
|
1391
|
-
}
|
|
1392
|
-
return () => {
|
|
1393
|
-
var b;
|
|
1394
|
-
m.removeEventListener("click", d);
|
|
1395
|
-
try {
|
|
1396
|
-
(b = window.parent) == null || b.removeEventListener("click", d);
|
|
1397
|
-
} catch {
|
|
1398
|
-
window.removeEventListener("click", d);
|
|
1399
|
-
}
|
|
1400
|
-
};
|
|
1401
|
-
}, [m, u]);
|
|
1402
|
-
const v = o.length === 0 ? ["select-button-placeholder"] : [];
|
|
1403
|
-
return l(Y, { children: [l("button", { "aria-label": "choice dropdown button", className: D("select-button", ...v), onClick: (d) => {
|
|
1404
|
-
d.stopPropagation(), f();
|
|
1405
|
-
}, type: "button", children: [l("span", { children: o.length === 0 ? i : o.length === 1 ? o[0].label : `${o.length} ${t}` }, void 0, 0, { fileName: $e, lineNumber: 183, columnNumber: 9 }, void 0), l(ei, {}, void 0, 0, { fileName: $e, lineNumber: 184, columnNumber: 9 }, void 0)] }, void 0, 0, { fileName: $e, lineNumber: 174, columnNumber: 7 }, void 0), c && l(Mo, { disabledOptions: a, dropdownFooter: s, options: n, selectedOptions: o, selectItem: (d) => {
|
|
1406
|
-
var y;
|
|
1407
|
-
const h = o.some((g) => g.id === d.id), b = o.some((g) => {
|
|
1408
|
-
var w;
|
|
1409
|
-
return (w = g.optionProperties) == null ? void 0 : w.noneOfTheAbove;
|
|
1410
|
-
});
|
|
1411
|
-
(y = d.optionProperties) != null && y.noneOfTheAbove && !h ? r([d]) : e ? r(h ? o.filter((g) => g.id !== d.id) : b ? [d] : [...o, d]) : h || r([d]), e || f();
|
|
1412
|
-
}, showCheckbox: e }, void 0, 0, { fileName: $e, lineNumber: 187, columnNumber: 9 }, void 0)] }, void 0);
|
|
1413
|
-
};
|
|
1414
|
-
var ce = "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/cards/multipleChoice/baseMultiChoiceCard.tsx";
|
|
1415
|
-
const pi = ({ className: e, message: t, onSubmit: r, options: n = [], properties: i, questionId: o, type: a, showIndividualSubmit: s = !1, onSubmitButtonClick: c }) => {
|
|
1416
|
-
const { border: p, useMobileStyling: m, isLongFormSurvey: u, focusedQuestionId: f, setFocusedQuestionId: v } = V((k) => ({ border: k.border, useMobileStyling: k.useMobileStyling, isLongFormSurvey: ae(k.studyType), focusedQuestionId: k.focusedQuestionId, setFocusedQuestionId: k.setFocusedQuestionId })), d = u && f === o, h = n.reduce((k, O) => (k[O.id] = { isSelected: !1 }, k), {}), [b, y] = U(z(h), "optionSelectedMap"), g = a === "multiplechoice", w = i.required, T = n.find((k) => {
|
|
1417
|
-
var O;
|
|
1418
|
-
return (O = k.optionProperties) == null ? void 0 : O.noneOfTheAbove;
|
|
1419
|
-
}), x = (k) => Object.entries(k).some(([O, H]) => {
|
|
1420
|
-
var J;
|
|
1421
|
-
const F = n.find((X) => `${X.id}` === O), j = H.userText === void 0 || H.userText.trim() === "";
|
|
1422
|
-
return ((J = F == null ? void 0 : F.optionProperties) == null ? void 0 : J.allowsTextEntry) && j && H.isSelected;
|
|
1423
|
-
}), S = (k) => Object.values(k).filter((O) => O.isSelected).length, N = i.minSelect && i.minSelect > 0 && i.maxSelectMode === nt.Range && S(b) < i.minSelect && (w || S(b) > 0), L = (k) => x(k) || w && !S(k) || !((O) => {
|
|
1424
|
-
const { minSelect: H = 0, maxSelect: F = 1 / 0, maxSelectMode: j } = i, J = S(O);
|
|
1425
|
-
switch (j) {
|
|
1426
|
-
case nt.Maximum:
|
|
1427
|
-
return J <= F;
|
|
1428
|
-
case nt.Range:
|
|
1429
|
-
return J === 0 || J >= H;
|
|
1430
|
-
default:
|
|
1431
|
-
return !0;
|
|
1432
|
-
}
|
|
1433
|
-
})(k), E = Object.entries(b).some(([k, O]) => {
|
|
1434
|
-
var H, F;
|
|
1435
|
-
return O.isSelected && ((F = (H = n.find((j) => `${j.id}` === k)) == null ? void 0 : H.optionProperties) == null ? void 0 : F.allowsTextEntry);
|
|
1436
|
-
}), P = s && (!g || E), _ = (k) => {
|
|
1437
|
-
B(k.id, k.selected, k.userText, k.noneOfTheAbove), k.selected && u && !g && !d && v(o);
|
|
1438
|
-
}, C = (k) => {
|
|
1439
|
-
var O;
|
|
1440
|
-
return (i == null ? void 0 : i.maxSelectMode) !== nt.Unlimited && S(b) === (i == null ? void 0 : i.maxSelect) && !((O = b[k]) != null && O.isSelected);
|
|
1441
|
-
}, I = n.map(({ id: k, label: O, value: H, optionProperties: F }) => {
|
|
1442
|
-
var ge, Ee;
|
|
1443
|
-
const j = `${k}`, { allowsTextEntry: J, noneOfTheAbove: X } = { allowsTextEntry: !1, noneOfTheAbove: !1, ...F };
|
|
1444
|
-
return l(Et, { allowTextEntry: J, border: p, disabled: C(j), error: (ue = b, x(ue)), id: j, isRadio: g, isSelected: !!((ge = b[j]) != null && ge.isSelected), label: O, noneOfTheAbove: X, onUserInputChanged: _, promptText: "Please specify", text: (Ee = b[k]) == null ? void 0 : Ee.userText, useMobileStyling: m, value: H }, j, 0, { fileName: ce, lineNumber: 189, columnNumber: 7 }, void 0);
|
|
1445
|
-
var ue;
|
|
1446
|
-
}), R = (k) => {
|
|
1447
|
-
k.preventDefault(), k.stopPropagation(), r(b, !0), c && c();
|
|
1448
|
-
}, B = (k, O, H, F) => {
|
|
1449
|
-
const j = Object.assign({}, b);
|
|
1450
|
-
if ((g || F) && O) for (const ue of Object.values(j)) ue.isSelected = !1, delete ue.userText;
|
|
1451
|
-
else T && !F && b[T.id].isSelected && (j[T.id].isSelected = !1);
|
|
1452
|
-
j[k] = { isSelected: O, userText: H };
|
|
1453
|
-
const J = g && Object.entries(j).some(([ue, ge]) => {
|
|
1454
|
-
var Ee, pt;
|
|
1455
|
-
return ge.isSelected && ((pt = (Ee = n.find((q) => `${q.id}` === ue)) == null ? void 0 : Ee.optionProperties) == null ? void 0 : pt.allowsTextEntry);
|
|
1456
|
-
}), X = !L(j);
|
|
1457
|
-
u && (r(j, X), g && !J && X && c && c()), y(j);
|
|
1458
|
-
};
|
|
1459
|
-
return l("form", { className: D(e, "ul-card--multiple", "fade-in-transition", u && !d && "ul-card--unfocused"), id: "text-form", onClick: a === "multipleselect" ? () => {
|
|
1460
|
-
u && f !== o && a === "multipleselect" && v(o);
|
|
1461
|
-
} : void 0, onSubmit: R, children: [l(ke, { message: t, properties: i }, void 0, 0, { fileName: ce, lineNumber: 365, columnNumber: 7 }, void 0), l(Re, { properties: i, defaultBody: () => l(Y, { children: [l(Ue, { children: [i.isDropdown ? l(Ro, { disabledOptions: n.filter((k) => C(k.id)), dropdownFooter: N ? l("div", { className: "ul-card__min-select-counter", style: { marginLeft: "16px" }, children: [S(b), "/", i.minSelect] }, void 0, 0, { fileName: ce, lineNumber: 281, columnNumber: 19 }, void 0) : void 0, isMultiSelect: !g, multiselectText: i.dropdownMultiselectedText ?? "choices selected", onChange: (k) => {
|
|
1462
|
-
const O = { ...b };
|
|
1463
|
-
for (const H of n) k.includes(H) ? O[H.id].isSelected = !0 : O[H.id].isSelected = !1;
|
|
1464
|
-
u && r(O, !L(O)), y(O);
|
|
1465
|
-
}, options: n, placeholderText: i.dropdownPlaceholderText ?? (g ? "Select choice" : "Select choice(s)"), value: n.filter((k) => b[k.id].isSelected) }, void 0, 0, { fileName: ce, lineNumber: 277, columnNumber: 13 }, void 0) : l("div", { className: D(ne("ul-card__choices", m)), role: g ? "radiogroup" : "group", children: [I, !!N && l("div", { className: "ul-card__min-select-counter", children: [S(b), "/", i.minSelect] }, void 0, 0, { fileName: ce, lineNumber: 322, columnNumber: 17 }, void 0)] }, void 0, 0, { fileName: ce, lineNumber: 316, columnNumber: 13 }, void 0), P && l(It, { handleSubmit: R, isSubmitDisabled: L(b) }, void 0, 0, { fileName: ce, lineNumber: 331, columnNumber: 13 }, void 0)] }, void 0, 0, { fileName: ce, lineNumber: 275, columnNumber: 9 }, void 0), !u && l(He, { children: l("div", { className: "ul-card__button-wrapper", children: l(oe, { disabled: L(b), onClick: R, children: We(i) }, void 0, 0, { fileName: ce, lineNumber: 340, columnNumber: 15 }, void 0) }, void 0, 0, { fileName: ce, lineNumber: 339, columnNumber: 13 }, void 0) }, void 0, 0, { fileName: ce, lineNumber: 338, columnNumber: 11 }, void 0)] }, void 0) }, void 0, 0, { fileName: ce, lineNumber: 366, columnNumber: 7 }, void 0)] }, o, 0, { fileName: ce, lineNumber: 353, columnNumber: 5 }, void 0);
|
|
1466
|
-
}, Uo = (e) => {
|
|
1467
|
-
const { questionId: t, type: r, next: n, options: i } = e, { setFocusedQuestionId: o } = V((a) => ({ setFocusedQuestionId: a.setFocusedQuestionId }));
|
|
1468
|
-
return l(pi, { ...e, onSubmit: (a, s) => {
|
|
1469
|
-
var v;
|
|
1470
|
-
const c = Object.entries(a).find(([, d]) => d.isSelected) || [void 0, void 0], [p, m] = c, u = i.find((d) => `${d.id}` === p);
|
|
1471
|
-
!((v = u == null ? void 0 : u.optionProperties) != null && v.allowsTextEntry) || m != null && m.userText && m.userText.trim() !== "" || o(t);
|
|
1472
|
-
const f = m != null && m.userText ? { [p]: { userText: m.userText } } : null;
|
|
1473
|
-
n({ value: u && p ? { [p]: u.value } : {}, secondaryValue: f, questionId: t, type: r }, s);
|
|
1474
|
-
} }, void 0, 0, { fileName: "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/cards/multipleChoice/singleSelectCard.tsx", lineNumber: 51, columnNumber: 10 }, void 0);
|
|
1475
|
-
}, qo = (e) => {
|
|
1476
|
-
const { questionId: t, type: r, next: n } = e;
|
|
1477
|
-
return l(pi, { ...e, onSubmit: (i, o) => {
|
|
1478
|
-
const a = Object.entries(i).reduce((c, [p, m]) => (c[p] = m.isSelected, c), {}), s = Object.entries(i).reduce((c, [p, m]) => {
|
|
1479
|
-
if (!m.userText) return c;
|
|
1480
|
-
const u = c || {};
|
|
1481
|
-
return u[p] = { userText: m.userText }, u;
|
|
1482
|
-
}, null);
|
|
1483
|
-
n({ value: a, secondaryValue: s, questionId: t, type: r }, o);
|
|
1484
|
-
} }, void 0, 0, { fileName: "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/cards/multipleChoice/multiSelectCard.tsx", lineNumber: 41, columnNumber: 10 }, void 0);
|
|
1485
|
-
};
|
|
1486
|
-
var ve = "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/cards/npsCard.tsx";
|
|
1487
|
-
const Do = ({ className: e, labels: t, message: r, properties: n, next: i, questionId: o, type: a }) => {
|
|
1488
|
-
const [s, c] = U(z(null), "selectedValue"), { border: p, useMobileStyling: m, viewDocument: u, isLongFormSurvey: f, focusedQuestionId: v } = V((w) => ({ border: w.border, useMobileStyling: w.useMobileStyling, viewDocument: w.viewDocument, isLongFormSurvey: ae(w.studyType), focusedQuestionId: w.focusedQuestionId })), d = f && v === o, h = t && t.left, b = t && t.right, y = [...Array(11)].map((w, T) => l("button", { className: D(ne("nps-number", m), ne(`nps-number-${T}`, m)), id: `option-${T}`, onClick: (x) => {
|
|
1489
|
-
f && (x.preventDefault(), x.stopPropagation(), c(T)), i({ value: T, questionId: o, type: a }, !0);
|
|
1490
|
-
}, onKeyDown: (x) => {
|
|
1491
|
-
var N, L;
|
|
1492
|
-
const S = u.querySelectorAll("button.nps-number");
|
|
1493
|
-
x.key === "ArrowRight" ? (N = S[T + 1]) == null || N.focus() : x.key === "ArrowLeft" ? (L = S[T - 1]) == null || L.focus() : x.key !== "Enter" && x.key !== " " || (f && (x.preventDefault(), x.stopPropagation(), c(T)), i({ value: T, questionId: o, type: a }, !0));
|
|
1494
|
-
}, onPointerDown: (x) => {
|
|
1495
|
-
x.currentTarget.style.zIndex = "2", x.currentTarget.style.borderColor = p;
|
|
1496
|
-
}, onPointerLeave: (x) => {
|
|
1497
|
-
x.currentTarget.style.zIndex = "auto", x.currentTarget.style.borderColor = Yt;
|
|
1498
|
-
}, style: s === T ? { backgroundColor: p, color: "#fff" } : void 0, tabIndex: 0, children: T }, T, 0, { fileName: ve, lineNumber: 51, columnNumber: 5 }, void 0)), g = (w) => {
|
|
1499
|
-
w.preventDefault(), w.stopPropagation(), i({ value: null, questionId: o, type: a }, !0);
|
|
1500
|
-
};
|
|
1501
|
-
return l("form", { className: D(e, "ul-card--nps", "fade-in-transition", f && !d && "ul-card--unfocused"), children: [l(ke, { message: r, properties: n }, void 0, 0, { fileName: ve, lineNumber: 140, columnNumber: 7 }, void 0), l(Re, { properties: n, defaultBody: () => l(Y, { children: [l(Ue, { children: [l("div", { className: "ul-card--nps__numbers", children: y }, void 0, 0, { fileName: ve, lineNumber: 111, columnNumber: 11 }, void 0), l("div", { className: "ul-card--nps__labels", children: [l("span", { children: h }, void 0, 0, { fileName: ve, lineNumber: 113, columnNumber: 13 }, void 0), l("span", { children: b }, void 0, 0, { fileName: ve, lineNumber: 114, columnNumber: 13 }, void 0)] }, void 0, 0, { fileName: ve, lineNumber: 112, columnNumber: 11 }, void 0)] }, void 0, 0, { fileName: ve, lineNumber: 110, columnNumber: 9 }, void 0), !n.required && !f && l(He, { children: l("div", { className: "ul-vertical-centered-container", children: l(oe, { onClick: g, children: We(n) }, void 0, 0, { fileName: ve, lineNumber: 120, columnNumber: 15 }, void 0) }, void 0, 0, { fileName: ve, lineNumber: 119, columnNumber: 13 }, void 0) }, void 0, 0, { fileName: ve, lineNumber: 118, columnNumber: 11 }, void 0)] }, void 0) }, void 0, 0, { fileName: ve, lineNumber: 141, columnNumber: 7 }, void 0)] }, o, 0, { fileName: ve, lineNumber: 131, columnNumber: 5 }, void 0);
|
|
1502
|
-
};
|
|
1503
|
-
var _e = "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/cards/openTextCard.tsx";
|
|
1504
|
-
const Ho = ({ className: e, message: t, next: r, properties: n, questionId: i, type: o, showIndividualSubmit: a = !1, onSubmitButtonClick: s }) => {
|
|
1505
|
-
const { border: c, useMobileStyling: p, update: m, isLongFormSurvey: u, focusedQuestionId: f, setFocusedQuestionId: v, isPreview: d } = V((_) => ({ border: _.border, useMobileStyling: _.useMobileStyling, update: _.update, isLongFormSurvey: ae(_.studyType), focusedQuestionId: _.focusedQuestionId, setFocusedQuestionId: _.setFocusedQuestionId, isPreview: _.isPreview })), [h, b] = U(z(""), "value"), y = U(te(null), "textRef"), g = u && f === i;
|
|
1506
|
-
Z(() => {
|
|
1507
|
-
var _, C;
|
|
1508
|
-
u && !d && (g ? (_ = y.current) == null || _.focus() : (C = y.current) == null || C.blur());
|
|
1509
|
-
}, [u, g, d]);
|
|
1510
|
-
const w = h.trim(), T = n.required === !0 && !w, x = ii(y, () => m()), S = (_) => {
|
|
1511
|
-
const { value: C } = _.currentTarget;
|
|
1512
|
-
if (x(), _.preventDefault(), _.stopPropagation(), b(C), u) {
|
|
1513
|
-
const I = C.trim().length > 0;
|
|
1514
|
-
r({ value: C, questionId: i, type: o }, I);
|
|
1515
|
-
}
|
|
1516
|
-
}, N = (_) => {
|
|
1517
|
-
_.preventDefault(), _.stopPropagation(), r({ value: h, questionId: i, type: o }, w.length > 0), s && s();
|
|
1518
|
-
}, L = n && n.openTextPlaceholder ? n.openTextPlaceholder : "", E = (_) => {
|
|
1519
|
-
_.currentTarget.style.borderColor = c, v(i);
|
|
1520
|
-
}, P = (_) => {
|
|
1521
|
-
_.currentTarget.style.borderColor = Yt;
|
|
1522
|
-
};
|
|
1523
|
-
return l("form", { className: D(e, "ul-card-text", "fade-in-transition", u && !g && "ul-card--unfocused"), id: "text-form", onClick: () => {
|
|
1524
|
-
u && f !== i && v(i);
|
|
1525
|
-
}, children: [l(ke, { message: t, properties: n }, void 0, 0, { fileName: _e, lineNumber: 175, columnNumber: 7 }, void 0), l(Re, { defaultBody: () => l("div", { className: "ul-card-text", children: l(Ue, { children: [l("div", { className: "ul-card-text__container", children: l("textarea", { "aria-describedby": "ul-caption", "aria-labelledby": "ul-question", "aria-multiline": "true", "aria-placeholder": L, className: D(ne("ul-card-text__input", p)), "data-gramm": "false", maxLength: 5e3, name: "text", onBlur: P, onChange: S, onFocus: E, placeholder: L, ref: y, role: "textbox", tabIndex: 0 }, void 0, 0, { fileName: _e, lineNumber: 119, columnNumber: 13 }, void 0) }, void 0, 0, { fileName: _e, lineNumber: 118, columnNumber: 11 }, void 0), n.footerHtml && l("div", { className: "footer", dangerouslySetInnerHTML: { __html: n.footerHtml } }, void 0, 0, { fileName: _e, lineNumber: 140, columnNumber: 13 }, void 0), a && l(It, { handleSubmit: N, isSubmitDisabled: T }, void 0, 0, { fileName: _e, lineNumber: 146, columnNumber: 13 }, void 0), l(He, { children: !u && l(oe, { disabled: T, onClick: N, children: We(n) }, void 0, 0, { fileName: _e, lineNumber: 153, columnNumber: 15 }, void 0) }, void 0, 0, { fileName: _e, lineNumber: 151, columnNumber: 11 }, void 0)] }, void 0, 0, { fileName: _e, lineNumber: 117, columnNumber: 9 }, void 0) }, void 0, 0, { fileName: _e, lineNumber: 116, columnNumber: 7 }, void 0), properties: n }, void 0, 0, { fileName: _e, lineNumber: 176, columnNumber: 7 }, void 0)] }, i, 0, { fileName: _e, lineNumber: 164, columnNumber: 5 }, void 0);
|
|
1526
|
-
};
|
|
1527
|
-
var K = "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/cards/rankOrder/rankOrderQuestionCard.tsx";
|
|
1528
|
-
const Ao = ({ className: e, labels: t, message: r, next: n, properties: i, questionId: o, type: a, onSubmitButtonClick: s, options: c, showIndividualSubmit: p = !1 }) => {
|
|
1529
|
-
const m = U(te(null), "dragIndex"), u = U(te(0), "touchStartY"), f = U(te(0), "touchCurrentY"), v = U(te(null), "draggedElement"), d = U(te(!1), "isDragging"), h = U(te([]), "listItemRefs"), [b, y] = U(z(() => (i == null ? void 0 : i.required) === !0), "isDisabled"), [g, w] = U(z(() => c.map((q) => ({ ...q, rank: null }))), "rankOptions"), T = U(xe(() => Array.from({ length: c.length }, (q, W) => W + 1), [c.length]), "ranks"), { isLongFormSurvey: x, focusedQuestionId: S, setFocusedQuestionId: N, useMobileStyling: L, isPreview: E } = V((q) => ({ useMobileStyling: q.useMobileStyling, isLongFormSurvey: ae(q.studyType), focusedQuestionId: q.focusedQuestionId, setFocusedQuestionId: q.setFocusedQuestionId, isPreview: q.isPreview })), P = L && !E, _ = x && S === o, C = (q) => {
|
|
1530
|
-
q.preventDefault(), F(g), s && s();
|
|
1531
|
-
}, I = (q, W) => {
|
|
1532
|
-
for (let G = 0; G < h.current.length; G++) {
|
|
1533
|
-
const $ = h.current[G];
|
|
1534
|
-
if (!$ || $ === v.current) continue;
|
|
1535
|
-
const le = $.getBoundingClientRect();
|
|
1536
|
-
if (q >= le.left && q <= le.right && W >= le.top && W <= le.bottom) return { element: $, index: G };
|
|
1537
|
-
}
|
|
1538
|
-
return null;
|
|
1539
|
-
}, R = (q) => (W) => {
|
|
1540
|
-
if (!P) return;
|
|
1541
|
-
W.preventDefault(), W.stopPropagation(), d.current = !0, m.current = q;
|
|
1542
|
-
const G = W.touches[0];
|
|
1543
|
-
u.current = G.clientY, f.current = G.clientY;
|
|
1544
|
-
const $ = W.currentTarget.closest(".ul-card-rank__option");
|
|
1545
|
-
$ && (v.current = $, $.classList.add("is-dragging"));
|
|
1546
|
-
}, B = (q) => {
|
|
1547
|
-
if (!P || !d.current || m.current === null) return;
|
|
1548
|
-
q.preventDefault(), q.stopPropagation();
|
|
1549
|
-
const W = q.touches[0];
|
|
1550
|
-
f.current = W.clientY;
|
|
1551
|
-
const G = f.current - u.current;
|
|
1552
|
-
v.current && (v.current.style.transform = `translateY(${G}px)`, v.current.style.zIndex = "1000"), h.current.forEach((le) => {
|
|
1553
|
-
le && le !== v.current && le.classList.remove("is-drop-target");
|
|
1554
|
-
});
|
|
1555
|
-
const $ = I(W.clientX, W.clientY);
|
|
1556
|
-
$ && $.element.classList.add("is-drop-target");
|
|
1557
|
-
}, k = (q) => {
|
|
1558
|
-
if (!P || !d.current || m.current === null) return;
|
|
1559
|
-
q.preventDefault(), q.stopPropagation();
|
|
1560
|
-
const W = q.changedTouches[0], G = I(W.clientX, W.clientY);
|
|
1561
|
-
v.current && (v.current.style.transform = "", v.current.style.zIndex = "", v.current.classList.remove("is-dragging")), h.current.forEach(($) => {
|
|
1562
|
-
$ && $.classList.remove("is-drop-target");
|
|
1563
|
-
}), G && G.index !== m.current && O(m.current, G.index), m.current = null, v.current = null, d.current = !1;
|
|
1564
|
-
}, O = (q, W) => {
|
|
1565
|
-
w((G) => {
|
|
1566
|
-
const $ = G.map((Ae) => ({ ...Ae })), [le] = $.splice(q, 1);
|
|
1567
|
-
return $.splice(W, 0, le), $.forEach((Ae, re) => {
|
|
1568
|
-
Ae.rank = re + 1;
|
|
1569
|
-
}), j($), $;
|
|
1570
|
-
});
|
|
1571
|
-
}, H = (q) => {
|
|
1572
|
-
q.preventDefault(), q.dataTransfer && (q.dataTransfer.dropEffect = "move");
|
|
1573
|
-
}, F = (q) => {
|
|
1574
|
-
const W = {};
|
|
1575
|
-
q.reduce((G, $) => (G[$.id] = $.rank, G), W), n({ value: W, questionId: o, type: a }, !0);
|
|
1576
|
-
}, j = (q) => {
|
|
1577
|
-
y(!1), x && F(q);
|
|
1578
|
-
}, { left: J, right: X } = t, ue = c.length, ge = (q) => {
|
|
1579
|
-
q.preventDefault(), q.currentTarget.classList.add("is-drop-target");
|
|
1580
|
-
}, Ee = (q) => {
|
|
1581
|
-
q.currentTarget.classList.remove("is-drop-target");
|
|
1582
|
-
}, pt = (q) => {
|
|
1583
|
-
m.current = null, q.currentTarget.classList.remove("is-dragging");
|
|
1584
|
-
};
|
|
1585
|
-
return l("form", { className: D(e, "ul-card-rank", "fade-in-transition", x && !_ && "ul-card--unfocused"), onClick: () => {
|
|
1586
|
-
x && S !== o && N(o);
|
|
1587
|
-
}, onSubmit: C, children: [l(ke, { message: r, properties: i }, void 0, 0, { fileName: K, lineNumber: 470, columnNumber: 7 }, void 0), l(Re, { properties: i, defaultBody: () => l(Y, { children: [l(Ue, { children: [l("div", { className: "ul-card--rank__question-inner-container", children: [l("div", { className: "ul-card-rank__labels", children: l("span", { children: ["1 - ", J] }, void 0, 0, { fileName: K, lineNumber: 337, columnNumber: 13 }, void 0) }, void 0, 0, { fileName: K, lineNumber: 336, columnNumber: 11 }, void 0), l("ol", { className: "ul-card-rank__list", onDragOver: H, children: g.map(({ id: q, label: W, rank: G }, $) => {
|
|
1588
|
-
return l("li", { className: "ul-card-rank__option", draggable: !P, onDragEnd: P ? void 0 : pt, onDragEnter: P ? void 0 : ge, onDragLeave: P ? void 0 : Ee, onDragStart: P ? void 0 : (Ae = $, (re) => {
|
|
1589
|
-
m.current = Ae, re.dataTransfer && (re.dataTransfer.effectAllowed = "move", re.dataTransfer.setData("text/plain", String(Ae)), re.currentTarget.classList.add("is-dragging"));
|
|
1590
|
-
}), onDrop: P ? void 0 : (le = $, (re) => {
|
|
1591
|
-
var ft, Xe;
|
|
1592
|
-
re.preventDefault(), re.currentTarget.classList.remove("is-drop-target");
|
|
1593
|
-
const Ve = m.current;
|
|
1594
|
-
m.current = null, (Xe = (ft = re.currentTarget.closest(".ul-card-rank__list")) == null ? void 0 : ft.querySelector(".is-dragging")) == null || Xe.classList.remove("is-dragging"), Ve != null && Ve !== le && O(Ve, le);
|
|
1595
|
-
}), ref: (re) => h.current[$] = re, children: [l("select", { "aria-label": `Rank for ${W}`, className: D("ul-card-rank__select", G == null && "ul-card-rank__select--placeholder"), name: `rank[${q}]`, onChange: (re) => ((Ve, ft) => {
|
|
1596
|
-
w((Xe) => {
|
|
1597
|
-
const et = parseInt(ft), we = Xe.map((ee) => ({ ...ee }));
|
|
1598
|
-
we.some((ee) => ee.rank == null) && we.forEach((ee, Mt) => ee.rank = Mt + 1);
|
|
1599
|
-
const Pt = we.findIndex((ee) => ee.id === Ve);
|
|
1600
|
-
if (Pt === -1) return Xe;
|
|
1601
|
-
const vt = we[Pt].rank;
|
|
1602
|
-
return et < vt ? we.forEach((ee) => {
|
|
1603
|
-
ee.id !== Ve && ee.rank >= et && ee.rank < vt && (ee.rank = ee.rank + 1);
|
|
1604
|
-
}) : et > vt && we.forEach((ee) => {
|
|
1605
|
-
ee.id !== Ve && ee.rank > vt && ee.rank <= et && (ee.rank = ee.rank - 1);
|
|
1606
|
-
}), we[Pt].rank = et, we.sort((ee, Mt) => ee.rank - Mt.rank), j(we), we;
|
|
1607
|
-
});
|
|
1608
|
-
})(q, re.currentTarget.value), value: G ?? "", children: [G == null && l("option", { className: "ul-card-rank__select-option", disabled: !0, value: "", children: "-" }, void 0, 0, { fileName: K, lineNumber: 371, columnNumber: 21 }, void 0), T.map((re) => l("option", { className: "ul-card-rank__select-option", value: re, children: re }, re, 0, { fileName: K, lineNumber: 381, columnNumber: 23 }, void 0))] }, void 0, 0, { fileName: K, lineNumber: 360, columnNumber: 17 }, void 0), l("span", { children: W }, void 0, 0, { fileName: K, lineNumber: 391, columnNumber: 17 }, void 0), l("button", { "aria-label": `Drag ${W} to reorder`, className: "ul-card-rank__drag-btn", onTouchEnd: P ? k : void 0, onTouchMove: P ? B : void 0, onTouchStart: P ? R($) : void 0, title: "Drag to reorder", type: "button", children: l("svg", { fill: "none", height: "17", viewBox: "0 0 16 17", width: "16", xmlns: "http://www.w3.org/2000/svg", children: l("path", { d: "M5.75 11.625C6.37132 11.625 6.875 12.1287 6.875 12.75C6.875 13.3713 6.37132 13.875 5.75 13.875C5.12868 13.875 4.625 13.3713 4.625 12.75C4.625 12.1287 5.12868 11.625 5.75 11.625ZM10.25 11.625C10.8713 11.625 11.375 12.1287 11.375 12.75C11.375 13.3713 10.8713 13.875 10.25 13.875C9.62868 13.875 9.125 13.3713 9.125 12.75C9.125 12.1287 9.62868 11.625 10.25 11.625ZM5.75 7.375C6.37132 7.375 6.875 7.87868 6.875 8.5C6.875 9.12132 6.37132 9.625 5.75 9.625C5.12868 9.625 4.625 9.12132 4.625 8.5C4.625 7.87868 5.12868 7.375 5.75 7.375ZM10.25 7.375C10.8713 7.375 11.375 7.87868 11.375 8.5C11.375 9.12132 10.8713 9.625 10.25 9.625C9.62868 9.625 9.125 9.12132 9.125 8.5C9.125 7.87868 9.62868 7.375 10.25 7.375ZM5.75 3.125C6.37132 3.125 6.875 3.62868 6.875 4.25C6.875 4.87132 6.37132 5.375 5.75 5.375C5.12868 5.375 4.625 4.87132 4.625 4.25C4.625 3.62868 5.12868 3.125 5.75 3.125ZM10.25 3.125C10.8713 3.125 11.375 3.62868 11.375 4.25C11.375 4.87132 10.8713 5.375 10.25 5.375C9.62868 5.375 9.125 4.87132 9.125 4.25C9.125 3.62868 9.62868 3.125 10.25 3.125Z", fill: "currentColor" }, void 0, 0, { fileName: K, lineNumber: 420, columnNumber: 21 }, void 0) }, void 0, 0, { fileName: K, lineNumber: 413, columnNumber: 19 }, void 0) }, void 0, 0, { fileName: K, lineNumber: 392, columnNumber: 17 }, void 0)] }, q, 0, { fileName: K, lineNumber: 341, columnNumber: 15 }, void 0);
|
|
1609
|
-
var le, Ae;
|
|
1610
|
-
}) }, void 0, 0, { fileName: K, lineNumber: 339, columnNumber: 11 }, void 0), l("div", { className: "ul-card-rank__labels", children: l("span", { children: [ue, " - ", X] }, void 0, 0, { fileName: K, lineNumber: 430, columnNumber: 13 }, void 0) }, void 0, 0, { fileName: K, lineNumber: 429, columnNumber: 11 }, void 0)] }, void 0, 0, { fileName: K, lineNumber: 335, columnNumber: 9 }, void 0), p && l(It, { handleSubmit: C, isSubmitDisabled: b }, void 0, 0, { fileName: K, lineNumber: 436, columnNumber: 11 }, void 0)] }, void 0, 0, { fileName: K, lineNumber: 334, columnNumber: 7 }, void 0), !x && l(He, { children: l("div", { className: "ul-card__button-wrapper", children: l(oe, { disabled: b, children: We(i) }, void 0, 0, { fileName: K, lineNumber: 445, columnNumber: 13 }, void 0) }, void 0, 0, { fileName: K, lineNumber: 444, columnNumber: 11 }, void 0) }, void 0, 0, { fileName: K, lineNumber: 443, columnNumber: 9 }, void 0)] }, void 0) }, void 0, 0, { fileName: K, lineNumber: 471, columnNumber: 7 }, void 0)] }, o, 0, { fileName: K, lineNumber: 459, columnNumber: 5 }, void 0);
|
|
1611
|
-
};
|
|
1612
|
-
var de = "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/cards/pageCard/DisplayQuestion.tsx";
|
|
1613
|
-
const Vo = /* @__PURE__ */ new Set(["open", "matrix", "multipleselect", "multiplechoice", "rankorder"]), Yr = ({ cardInstance: e, moveToNextQuestion: t, showIndividualSubmit: r, submitQuestion: n, updateCardValues: i }) => {
|
|
1614
|
-
const { isLongFormSurvey: o } = V((f) => ({ isLongFormSurvey: ae(f.studyType) }));
|
|
1615
|
-
if (!e) return null;
|
|
1616
|
-
const { name: a, type: s, props: c } = e, p = r && Vo.has(s), m = { className: "ul-card", next: (f, v) => n(f, v), questionId: a, type: s, showIndividualSubmit: r, ...p ? { next: (f, v) => {
|
|
1617
|
-
i(f.questionId, f, v ?? !0);
|
|
1618
|
-
}, onSubmitButtonClick: () => t(a) } : {} }, u = (() => {
|
|
1619
|
-
switch (s) {
|
|
1620
|
-
case "consentlegal":
|
|
1621
|
-
return l(ko, { ...m, ...c }, void 0, 0, { fileName: de, lineNumber: 84, columnNumber: 16 }, void 0);
|
|
1622
|
-
case "likert":
|
|
1623
|
-
return l(So, { ...m, ...c }, void 0, 0, { fileName: de, lineNumber: 87, columnNumber: 16 }, void 0);
|
|
1624
|
-
case "matrix":
|
|
1625
|
-
return l(Po, { ...m, ...c }, void 0, 0, { fileName: de, lineNumber: 90, columnNumber: 16 }, void 0);
|
|
1626
|
-
case "multiplechoice":
|
|
1627
|
-
return l(Uo, { ...m, ...c }, void 0, 0, { fileName: de, lineNumber: 93, columnNumber: 16 }, void 0);
|
|
1628
|
-
case "multipleselect":
|
|
1629
|
-
return l(qo, { ...m, ...c }, void 0, 0, { fileName: de, lineNumber: 96, columnNumber: 16 }, void 0);
|
|
1630
|
-
case "nps":
|
|
1631
|
-
return l(Do, { ...m, ...c }, void 0, 0, { fileName: de, lineNumber: 99, columnNumber: 16 }, void 0);
|
|
1632
|
-
case "open":
|
|
1633
|
-
return l(Ho, { ...m, ...c }, void 0, 0, { fileName: de, lineNumber: 102, columnNumber: 16 }, void 0);
|
|
1634
|
-
case "rankorder":
|
|
1635
|
-
return l(Ao, { ...m, ...c }, void 0, 0, { fileName: de, lineNumber: 105, columnNumber: 16 }, void 0);
|
|
1636
|
-
case "recordedtask":
|
|
1637
|
-
return l(el, { ...m, ...c }, void 0, 0, { fileName: de, lineNumber: 108, columnNumber: 16 }, void 0);
|
|
1638
|
-
case "texturlprompt":
|
|
1639
|
-
return l(rl, { ...m, ...c }, void 0, 0, { fileName: de, lineNumber: 111, columnNumber: 16 }, void 0);
|
|
1640
|
-
case "thanks":
|
|
1641
|
-
return l(nl, { ...m, ...c }, void 0, 0, { fileName: de, lineNumber: 114, columnNumber: 16 }, void 0);
|
|
1642
|
-
case "uploading":
|
|
1643
|
-
return l(il, { ...m, ...c }, void 0, 0, { fileName: de, lineNumber: 117, columnNumber: 16 }, void 0);
|
|
1644
|
-
default:
|
|
1645
|
-
return null;
|
|
1646
|
-
}
|
|
1647
|
-
})();
|
|
1648
|
-
return u ? o ? l("div", { className: "ul-card-scroll-wrapper", children: u }, a, 0, { fileName: de, lineNumber: 134, columnNumber: 5 }, void 0) : u : null;
|
|
1649
|
-
};
|
|
1650
|
-
var qe = "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/cards/pageCard/longFormQuestionsFooter.tsx";
|
|
1651
|
-
const Bo = ({ isSubmitDisabled: e = !1, onSubmit: t, buttonText: r }) => {
|
|
1652
|
-
var v;
|
|
1653
|
-
const { cards: n, forceBrandedLogo: i, index: o, marketingUrl: a, showSurveyBrand: s, slugName: c, surveyId: p, useMobileStyling: m } = V((d) => ({ cards: d.cards, forceBrandedLogo: d.forceBrandedLogo, index: d.index, marketingUrl: d.marketingUrl, showSurveyBrand: d.showSurveyBrand, slugName: d.slugName, surveyId: d.surveyId, useMobileStyling: d.useMobileStyling })), u = ((v = n[o]) == null ? void 0 : v.type) === "thanks", f = ci({ marketingUrl: a, slugName: c, surveyId: p, forceBrandedLogo: i });
|
|
1654
|
-
return l("footer", { className: D("long-form-question-footer-container", m && "long-form-question-footer-container--mobile", u && "long-form-question-footer-container-center"), children: [u && i ? l(si, { marketingUrlLink: f }, void 0, 0, { fileName: qe, lineNumber: 59, columnNumber: 9 }, void 0) : l("div", { className: "long-form-question-footer-container-logo", children: s ? l(ai, { forceBrandedLogo: i, marketingUrlLink: f }, void 0, 0, { fileName: qe, lineNumber: 67, columnNumber: 13 }, void 0) : null }, void 0, 0, { fileName: qe, lineNumber: 61, columnNumber: 9 }, void 0), !u && l("div", { className: D("ul-card__button-wrapper", "ul-card-vertical__button-wrapper", "long-form-question-footer-container-actions"), children: l(oe, { className: D("long-form-button", e && "sprig-button-disabled"), disabled: e, onClick: t, children: l("span", { className: "long-form-button-text-container", children: r ?? l(sr, { stroke: "white" }, void 0, 0, { fileName: qe, lineNumber: 96, columnNumber: 30 }, void 0) }, void 0, 0, { fileName: qe, lineNumber: 91, columnNumber: 13 }, void 0) }, void 0, 0, { fileName: qe, lineNumber: 82, columnNumber: 11 }, void 0) }, void 0, 0, { fileName: qe, lineNumber: 75, columnNumber: 9 }, void 0)] }, void 0, 0, { fileName: qe, lineNumber: 50, columnNumber: 5 }, void 0);
|
|
1655
|
-
}, Fo = /<piped-value\b([^>]*)>.*?<\/piped-value>/gis, Jr = ["questionHtml", "captionHtml", "footerHtml", "richTextBody"], fi = (e) => !!e.props && typeof e.props == "object" && "properties" in e.props, At = (e) => !!e.props && typeof e.props == "object" && "options" in e.props && Array.isArray(e.props.options), Xr = (e) => ["string", "number"].includes(typeof e), en = (e) => e.length === 0 ? "" : e.length === 1 ? e[0] : e.join(", "), jo = (e) => {
|
|
1656
|
-
var r, n;
|
|
1657
|
-
const t = ((i) => i != null && typeof i == "object" && "value" in i)(e) ? e.value : void 0;
|
|
1658
|
-
if (t != null) {
|
|
1659
|
-
if (e.type === "multipleselect" && At(e) && ((i) => !!i && typeof i == "object" && !Array.isArray(i))(t)) {
|
|
1660
|
-
const i = e.secondaryValue ?? null, o = e.props.options.filter((a) => t[String(a.id)] === !0).map((a) => {
|
|
1661
|
-
var s;
|
|
1662
|
-
return a.label + ((s = i == null ? void 0 : i[String(a.id)]) != null && s.userText ? `: ${i[String(a.id)].userText}` : "");
|
|
1663
|
-
});
|
|
1664
|
-
return o.length ? en(o) : "No options selected";
|
|
1665
|
-
}
|
|
1666
|
-
if (e.type === "multiplechoice" && typeof t == "object" && t !== null) {
|
|
1667
|
-
const i = e.secondaryValue ?? null, o = Object.keys(t)[0];
|
|
1668
|
-
if (o) {
|
|
1669
|
-
const a = e.props.options.find((s) => String(s.id) === o);
|
|
1670
|
-
return (a == null ? void 0 : a.label) + ((r = i == null ? void 0 : i[o]) != null && r.userText ? `: ${(n = i == null ? void 0 : i[o]) == null ? void 0 : n.userText}` : "");
|
|
1671
|
-
}
|
|
1672
|
-
}
|
|
1673
|
-
if (e.type === "matrix" && At(e) && ((i) => {
|
|
1674
|
-
if (!fi(i)) return !1;
|
|
1675
|
-
const o = i.props.properties;
|
|
1676
|
-
return !!o && typeof o == "object" && "matrixColumn" in o;
|
|
1677
|
-
})(e)) {
|
|
1678
|
-
const i = e.props.options, o = e.props.properties.matrixColumn, a = [];
|
|
1679
|
-
for (const [s, c] of Object.entries(t)) {
|
|
1680
|
-
const p = i.find((d) => String(d.id) === s), m = (p == null ? void 0 : p.label) ?? s, u = Xr(c) ? String(c) : JSON.stringify(c), f = o.find((d) => d.value === u), v = (f == null ? void 0 : f.label) ?? u;
|
|
1681
|
-
a.push(`${m}: ${v}`);
|
|
1682
|
-
}
|
|
1683
|
-
return a.join("; ");
|
|
1684
|
-
}
|
|
1685
|
-
if (e.type === "rankorder" && At(e)) {
|
|
1686
|
-
const i = e.props.options.reduce((a, s) => (a[String(s.id)] = s.label, a), {}), o = [];
|
|
1687
|
-
for (const [a, s] of Object.entries(t)) {
|
|
1688
|
-
const c = i[a];
|
|
1689
|
-
c && (o[s - 1] = c);
|
|
1690
|
-
}
|
|
1691
|
-
return en(o);
|
|
1692
|
-
}
|
|
1693
|
-
if (Xr(t)) {
|
|
1694
|
-
const i = String(t).replaceAll(/[\u200B-\u200D\uFEFF]/g, "").trim();
|
|
1695
|
-
return i === "" ? void 0 : i;
|
|
1696
|
-
}
|
|
1697
|
-
try {
|
|
1698
|
-
return JSON.stringify(t);
|
|
1699
|
-
} catch {
|
|
1700
|
-
return String(t);
|
|
1701
|
-
}
|
|
1702
|
-
}
|
|
1703
|
-
}, tn = (e, t) => {
|
|
1704
|
-
const r = new RegExp(`${t}="([^"]*)"`, "i").exec(e);
|
|
1705
|
-
return (r == null ? void 0 : r[1]) ?? null;
|
|
1706
|
-
}, $o = (e, t) => {
|
|
1707
|
-
if (e == null) return e;
|
|
1708
|
-
let r = !1;
|
|
1709
|
-
const n = e.replace(Fo, (i, o) => {
|
|
1710
|
-
r = !0;
|
|
1711
|
-
const a = tn(o, "answer-id"), s = tn(o, "fallback-text") ?? "", c = a ? Number(a) : Number.NaN;
|
|
1712
|
-
if (Number.isFinite(c) && Object.hasOwn(t, c)) {
|
|
1713
|
-
const p = t[c];
|
|
1714
|
-
return String(p);
|
|
1715
|
-
}
|
|
1716
|
-
return s;
|
|
1717
|
-
});
|
|
1718
|
-
return r ? n : e;
|
|
1719
|
-
}, vi = (e) => {
|
|
1720
|
-
const t = {};
|
|
1721
|
-
for (const r of e) {
|
|
1722
|
-
const n = jo(r);
|
|
1723
|
-
n !== void 0 && (t[r.name] = n);
|
|
1724
|
-
}
|
|
1725
|
-
return t;
|
|
1726
|
-
};
|
|
1727
|
-
var gt = "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/cards/pageCard/pageCard.tsx";
|
|
1728
|
-
const zo = ({ cards: e, next: t, previousResponses: r }) => {
|
|
1729
|
-
var P;
|
|
1730
|
-
const [n, i] = U(z({}), "cardValues"), [o, a] = U(z({}), "questionHasValidState"), s = U(xe(() => ({ ...r, ...vi(e.map((_) => {
|
|
1731
|
-
var C, I;
|
|
1732
|
-
return { ..._, value: ((C = n[_.name]) == null ? void 0 : C.value) ?? null, secondaryValue: ((I = n[_.name]) == null ? void 0 : I.secondaryValue) ?? null };
|
|
1733
|
-
})) }), [r, n, e]), "allResponses"), c = (p = s, e.map((_) => {
|
|
1734
|
-
if (!fi(_) || _.props.properties === void 0 || _.props.properties === null) return _;
|
|
1735
|
-
const C = _.props.properties;
|
|
1736
|
-
if (C === null || typeof C != "object" || !Jr.some((B) => B in C)) return _;
|
|
1737
|
-
let I = !1;
|
|
1738
|
-
const R = {};
|
|
1739
|
-
for (const B of Jr) {
|
|
1740
|
-
const k = C[B];
|
|
1741
|
-
if (k !== void 0) {
|
|
1742
|
-
const O = $o(k, p);
|
|
1743
|
-
R[B] = O, O !== k && (I = !0);
|
|
1744
|
-
}
|
|
1745
|
-
}
|
|
1746
|
-
return I ? { ..._, props: { ..._.props, properties: { ...C, ...R } } } : _;
|
|
1747
|
-
}));
|
|
1748
|
-
var p;
|
|
1749
|
-
const { isLongFormSurvey: m, focusedQuestionId: u, setFocusedQuestionId: f } = V((_) => ({ isLongFormSurvey: ae(_.studyType), focusedQuestionId: _.focusedQuestionId, setFocusedQuestionId: _.setFocusedQuestionId })), v = U(te(null), "listRef"), d = U(te(!1), "isScrollingProgrammatically"), h = U(te(null), "expectedFocusFromManualScroll"), b = ze((_) => {
|
|
1750
|
-
var B, k;
|
|
1751
|
-
d.current = !0;
|
|
1752
|
-
const C = e.findIndex((O) => O.name === _);
|
|
1753
|
-
if (!m || _ === null || C === -1) return void (d.current = !1);
|
|
1754
|
-
const I = (B = v.current) == null ? void 0 : B.querySelectorAll(".ul-card-scroll-wrapper")[C], R = (k = v.current) == null ? void 0 : k.closest(".ul-card__container");
|
|
1755
|
-
if (I && R) {
|
|
1756
|
-
if (I && R) {
|
|
1757
|
-
const O = I.getBoundingClientRect(), H = R.getBoundingClientRect(), F = O.top - H.top + R.scrollTop, j = F + O.height / 2, J = window.innerHeight - 157;
|
|
1758
|
-
let X;
|
|
1759
|
-
O.height >= J ? X = F : X = j - R.clientHeight / 2;
|
|
1760
|
-
const ue = R.clientHeight, ge = R.scrollHeight - ue, Ee = Math.max(0, Math.min(X, ge));
|
|
1761
|
-
R.scrollTo({ top: Ee, behavior: "smooth" }), setTimeout(() => {
|
|
1762
|
-
d.current = !1;
|
|
1763
|
-
}, 500);
|
|
1764
|
-
}
|
|
1765
|
-
} else d.current = !1;
|
|
1766
|
-
}, [m, e]);
|
|
1767
|
-
function y(_, C) {
|
|
1768
|
-
return _.map((I) => C[I.name]);
|
|
1769
|
-
}
|
|
1770
|
-
Z(() => {
|
|
1771
|
-
u !== null && e.findIndex((_) => _.name === u) !== -1 || f(e[0].name);
|
|
1772
|
-
}, [e, u, f]);
|
|
1773
|
-
const g = (_) => {
|
|
1774
|
-
if (!m) return;
|
|
1775
|
-
const C = e.findIndex((I) => I.name === _) + 1;
|
|
1776
|
-
if (C < e.length) {
|
|
1777
|
-
const I = e[C].name;
|
|
1778
|
-
f(I);
|
|
1779
|
-
} else f(_);
|
|
1780
|
-
};
|
|
1781
|
-
Z(() => {
|
|
1782
|
-
m && u !== null && (h.current !== u ? b(u) : h.current = null);
|
|
1783
|
-
}, [u, m, b]);
|
|
1784
|
-
const w = ze(() => {
|
|
1785
|
-
var H, F;
|
|
1786
|
-
if (d.current) return;
|
|
1787
|
-
const _ = (H = v.current) == null ? void 0 : H.closest(".ul-card__container");
|
|
1788
|
-
if (!_) return;
|
|
1789
|
-
const C = (F = v.current) == null ? void 0 : F.querySelectorAll(".ul-card-scroll-wrapper");
|
|
1790
|
-
if (!C || C.length === 0) return;
|
|
1791
|
-
const I = _.getBoundingClientRect(), R = I.top + I.height / 2;
|
|
1792
|
-
let B = 0, k = 1 / 0;
|
|
1793
|
-
C.forEach((j, J) => {
|
|
1794
|
-
const X = j.getBoundingClientRect(), ue = X.top + X.height / 2, ge = Math.abs(R - ue);
|
|
1795
|
-
ge < k && (k = ge, B = J);
|
|
1796
|
-
});
|
|
1797
|
-
const O = e[B];
|
|
1798
|
-
h.current = O.name, f(O.name);
|
|
1799
|
-
}, [e, f]);
|
|
1800
|
-
Z(() => {
|
|
1801
|
-
var C;
|
|
1802
|
-
if (!m) return;
|
|
1803
|
-
const _ = ((C = v.current) == null ? void 0 : C.closest(".ul-card__container")) || null;
|
|
1804
|
-
return _ && _.addEventListener("scroll", w, { passive: !0 }), () => {
|
|
1805
|
-
_ && _.removeEventListener("scroll", w);
|
|
1806
|
-
};
|
|
1807
|
-
}, [w, m]);
|
|
1808
|
-
const T = U(xe(() => Object.values(o).every((_) => _), [o]), "canSubmit"), x = async (_, C, I) => {
|
|
1809
|
-
return a((B) => ({ ...B, [_]: I })), await (R = (B) => ({ ...B, [_]: C }), new Promise((B) => {
|
|
1810
|
-
i((k) => {
|
|
1811
|
-
const O = R(k);
|
|
1812
|
-
return B(O), O;
|
|
1813
|
-
});
|
|
1814
|
-
}));
|
|
1815
|
-
var R;
|
|
1816
|
-
};
|
|
1817
|
-
Z(() => {
|
|
1818
|
-
if (!m) return;
|
|
1819
|
-
const _ = {};
|
|
1820
|
-
e.forEach((C) => {
|
|
1821
|
-
var R, B;
|
|
1822
|
-
const I = C;
|
|
1823
|
-
(B = (R = I.props) == null ? void 0 : R.properties) != null && B.required || (_[I.name] = { value: null, questionId: I.name, type: I.type });
|
|
1824
|
-
}), i(_), a({});
|
|
1825
|
-
}, [e, m]);
|
|
1826
|
-
const S = async (_, C) => {
|
|
1827
|
-
if (m) {
|
|
1828
|
-
const I = await x(_.questionId, _, C), R = N(_.type), B = L(_.type);
|
|
1829
|
-
if (R && g(_.questionId), B && C) {
|
|
1830
|
-
const k = y(e, I);
|
|
1831
|
-
t(k);
|
|
1832
|
-
}
|
|
1833
|
-
} else t([_]);
|
|
1834
|
-
}, N = (_) => (/* @__PURE__ */ new Set(["nps", "likert", "multiplechoice"])).has(_), L = (_) => (/* @__PURE__ */ new Set(["videovoice", "consentlegal", "texturlprompt"])).has(_), E = ((P = e[0]) == null ? void 0 : P.type) === "thanks";
|
|
1835
|
-
return m ? l("div", { className: "ul-card-list-container--longform", ref: v, children: [c.map((_, C) => l(Yr, { cardInstance: _, moveToNextQuestion: g, showIndividualSubmit: m && e.length > 1 && C < e.length - 1, submitQuestion: S, updateCardValues: x }, (_ == null ? void 0 : _.name) || C, 0, { fileName: gt, lineNumber: 345, columnNumber: 9 }, void 0)), !E && l(Bo, { isSubmitDisabled: Object.keys(n).length < e.length || !T, onSubmit: function() {
|
|
1836
|
-
const _ = y(e, n);
|
|
1837
|
-
t(_);
|
|
1838
|
-
} }, void 0, 0, { fileName: gt, lineNumber: 358, columnNumber: 9 }, void 0)] }, void 0, 0, { fileName: gt, lineNumber: 343, columnNumber: 5 }, void 0) : l(Y, { children: c.map((_, C) => l(Yr, { cardInstance: _, moveToNextQuestion: g, showIndividualSubmit: m && e.length > 1 && C < e.length - 1, submitQuestion: S, updateCardValues: x }, (_ == null ? void 0 : _.name) || C, 0, { fileName: gt, lineNumber: 367, columnNumber: 9 }, void 0)) }, void 0);
|
|
1839
|
-
}, Wt = 1, bi = 2, hi = 3, St = (e) => e.type === "av_permission", rn = (e) => e.type === "screen_permission", gi = (e, t) => e === void 0 ? Wt : e ? ((r, n) => !(St(n) ? n.permissionDescriptors : []).includes("camera") || r.getVideoTracks().length > 0)(e, t) ? hi : Wt : bi, nn = { avStream: null, currentPage: null, mediaRecordingUids: null, nextQuestion: () => {
|
|
1840
|
-
}, passthroughData: void 0, recordingMediaTypes: void 0, screenPermissionRequested: !1, type: void 0 }, Ie = Yn((e) => ({ ...nn, reset: () => {
|
|
1841
|
-
e(nn);
|
|
1842
|
-
}, updatePage: (t) => {
|
|
1843
|
-
e(t);
|
|
1844
|
-
} }));
|
|
1845
|
-
function Zt({ currentPage: e, pages: t }) {
|
|
1846
|
-
const { avStream: r, recordingMediaTypes: n, updatePage: i } = Ie.getState(), { recorderEventEmitter: o } = V.getState();
|
|
1847
|
-
o.emit("av.permission", { "permission.descriptors": e.permissionDescriptors, "stream.ready": (a, s) => {
|
|
1848
|
-
if (r === a) return;
|
|
1849
|
-
let c = e;
|
|
1850
|
-
if (a && !e.permissionDescriptors.includes("camera")) {
|
|
1851
|
-
const p = t.indexOf(e), m = s != null && s.active ? p + 2 : p + 1;
|
|
1852
|
-
s != null && s.active && n && o.emit("begin.recording", { "recording.media.types": n, "start.recording.callback": (u) => i({ mediaRecordingUids: u }) }), c = t[m];
|
|
1853
|
-
}
|
|
1854
|
-
i({ currentPage: c, avStream: a });
|
|
1855
|
-
} });
|
|
1856
|
-
}
|
|
1857
|
-
function Gt({ status: e }) {
|
|
1858
|
-
const { nextQuestion: t, passthroughData: r, mediaRecordingUids: n, reset: i } = Ie.getState(), { recorderEventEmitter: o, handleUploadUpdate: a, index: s } = V.getState(), c = { value: { taskStatus: e }, type: "recordedtask", questionId: (r == null ? void 0 : r.questionId) || 1 };
|
|
1859
|
-
r && o.emit("finish.task", { "begin.callback": (p) => {
|
|
1860
|
-
a({ mediaRecordingUid: p, isSubmitted: !0, progressPct: 0, isComplete: !1 });
|
|
1861
|
-
}, "progress.callback": (p, m) => {
|
|
1862
|
-
a({ mediaRecordingUid: p, progressPct: m.detail, isSubmitted: !1, isComplete: !1 });
|
|
1863
|
-
}, "upload.callback": (p) => {
|
|
1864
|
-
p && a({ mediaRecordingUid: p, isComplete: !0, isSubmitted: !0, progressPct: 100 });
|
|
1865
|
-
}, "passthrough.data": r, "current.index": s, "task.response": c, "task.complete.callback": (p) => {
|
|
1866
|
-
c.value.taskDurationMillisecond = p, n && (c.value.mediaRecordingUids = n), i(), t(c);
|
|
1867
|
-
} });
|
|
1868
|
-
}
|
|
1869
|
-
function ur({ pages: e, setIsRequestingPermission: t }) {
|
|
1870
|
-
const { recorderEventEmitter: r, eventEmitFn: n } = V.getState(), { updatePage: i, currentPage: o, recordingMediaTypes: a, screenPermissionRequested: s } = Ie.getState();
|
|
1871
|
-
if (!o) return;
|
|
1872
|
-
const c = e.indexOf(o);
|
|
1873
|
-
switch (o.type) {
|
|
1874
|
-
case "av_permission": {
|
|
1875
|
-
const p = s ? c + 2 : c + 1;
|
|
1876
|
-
return s && a && r.emit("begin.recording", { "recording.media.types": a, "start.recording.callback": (m) => {
|
|
1877
|
-
i({ mediaRecordingUids: m });
|
|
1878
|
-
} }), void i({ currentPage: e[p] });
|
|
1879
|
-
}
|
|
1880
|
-
case "screen_permission":
|
|
1881
|
-
return void r.emit("screen.permission", { "screen.permission.requested": t, "stream.ready.callback": (p, m) => {
|
|
1882
|
-
const u = m ? e[c + 1] : o;
|
|
1883
|
-
m && a && r.emit("begin.recording", { "recording.media.types": a, "start.recording.callback": (f) => {
|
|
1884
|
-
i({ captureStream: m, mediaRecordingUids: f });
|
|
1885
|
-
} }), i({ currentPage: u, screenPermissionRequested: !0, captureStream: m });
|
|
1886
|
-
} });
|
|
1887
|
-
case "start_task":
|
|
1888
|
-
return n("recorded.task.start"), r.emit("recorded.task.start"), r.emit("start.task"), void i({ currentPage: e[c + 1], screenPermissionRequested: !0 });
|
|
1889
|
-
case "complete_task":
|
|
1890
|
-
return;
|
|
1891
|
-
}
|
|
1892
|
-
}
|
|
1893
|
-
var A = "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/cards/recordedTask/components.tsx";
|
|
1894
|
-
const _i = "ul-permission-graphics-container", Ni = "ul-permission-body", yi = D(_i, "ul_recorded-task-inset-spacing"), Lt = D("ul-horizontal-button-container", "ul-horizontal-button-container-left"), xi = ({ richTextBody: e }) => l("div", { className: "ul-rich-text-body", dangerouslySetInnerHTML: { __html: e }, id: "ul-task-detail-container" }, void 0, 0, { fileName: A, lineNumber: 33, columnNumber: 5 }, void 0), Ot = ({ required: e, skipButtonText: t, bottom: r = !1 }) => e ? null : l(oe, { className: D(r && "ul-skip-button-below", "ul-button-inactive"), onClick: Gt.bind(null, { status: "abandoned" }), children: t || "Skip" }, void 0, 0, { fileName: A, lineNumber: 52, columnNumber: 5 }, void 0), cr = (e) => {
|
|
1895
|
-
const { avStream: t, captureStream: r, recordingMediaTypes: n, updatePage: i } = Ie.getState(), o = (n == null ? void 0 : n.includes("audio")) || (n == null ? void 0 : n.includes("video"));
|
|
1896
|
-
Z(() => {
|
|
1897
|
-
const a = setInterval(() => {
|
|
1898
|
-
o && t && !t.active ? i({ avStream: null, currentPage: e[0] }) : r && r.active || i({ captureStream: void 0, currentPage: e[o ? 1 : 0] });
|
|
1899
|
-
}, 1e3);
|
|
1900
|
-
return () => clearInterval(a);
|
|
1901
|
-
}, [t, r, o, e, n, i]);
|
|
1902
|
-
}, Qo = ({ content: e, pages: t, required: r }) => {
|
|
1903
|
-
const { buttonText: n, skipButtonText: i, taskDetail: o } = e;
|
|
1904
|
-
return cr(t), l("div", { className: "ul-task-page", children: [o && l(xi, { richTextBody: o }, void 0, 0, { fileName: A, lineNumber: 106, columnNumber: 22 }, void 0), l("div", { className: Lt, children: [l(oe, { onClick: ur.bind(null, { pages: t }), children: n }, void 0, 0, { fileName: A, lineNumber: 108, columnNumber: 9 }, void 0), l(Ot, { required: r, skipButtonText: i }, void 0, 0, { fileName: A, lineNumber: 109, columnNumber: 9 }, void 0)] }, void 0, 0, { fileName: A, lineNumber: 107, columnNumber: 7 }, void 0)] }, "start-task", 0, { fileName: A, lineNumber: 105, columnNumber: 5 }, void 0);
|
|
1905
|
-
}, Wo = ({ content: e, pages: t, properties: r }) => {
|
|
1906
|
-
const { buttonText: n, skipButtonText: i } = e;
|
|
1907
|
-
cr(t);
|
|
1908
|
-
const o = l(Re, { properties: r, defaultBody: () => l("div", { className: Lt, children: [l(oe, { className: "ul-complete-task-button", onClick: Gt.bind(null, { status: "completed" }), children: n }, void 0, 0, { fileName: A, lineNumber: 129, columnNumber: 7 }, void 0), l(oe, { className: D("ul-button-inactive"), onClick: Gt.bind(null, { status: "given.up" }), children: i }, void 0, 0, { fileName: A, lineNumber: 135, columnNumber: 7 }, void 0)] }, void 0, 0, { fileName: A, lineNumber: 128, columnNumber: 5 }, void 0) }, void 0, 0, { fileName: A, lineNumber: 145, columnNumber: 5 }, void 0);
|
|
1909
|
-
return l("div", { className: "ul-task-page", children: [e.taskDetail && l(xi, { richTextBody: e.taskDetail }, void 0, 0, { fileName: A, lineNumber: 155, columnNumber: 9 }, void 0), o] }, "complete-task", 0, { fileName: A, lineNumber: 153, columnNumber: 5 }, void 0);
|
|
1910
|
-
}, Zo = ({ content: e, pages: t, required: r }) => {
|
|
1911
|
-
const { buttonText: n, skipButtonText: i } = e, [o] = V((c) => [c.tabTitle]), [a, s] = U(z(!1), "isRequestingPermission");
|
|
1912
|
-
return l("div", { children: [l("div", { className: yi, children: [l("p", { style: { marginTop: "auto" }, children: e.selectTabText }, void 0, 0, { fileName: A, lineNumber: 177, columnNumber: 9 }, void 0), l("div", { className: "ul-select-tab-container", children: l("p", { className: Ni, children: o }, void 0, 0, { fileName: A, lineNumber: 179, columnNumber: 11 }, void 0) }, void 0, 0, { fileName: A, lineNumber: 178, columnNumber: 9 }, void 0)] }, void 0, 0, { fileName: A, lineNumber: 176, columnNumber: 7 }, void 0), l("div", { className: r ? "" : Lt, children: [l(oe, { disabled: a, onClick: ur.bind(null, { pages: t, setIsRequestingPermission: s }), children: n }, void 0, 0, { fileName: A, lineNumber: 183, columnNumber: 9 }, void 0), l(Ot, { required: r, skipButtonText: i }, void 0, 0, { fileName: A, lineNumber: 189, columnNumber: 9 }, void 0)] }, void 0, 0, { fileName: A, lineNumber: 182, columnNumber: 7 }, void 0)] }, void 0, 0, { fileName: A, lineNumber: 175, columnNumber: 5 }, void 0);
|
|
1913
|
-
}, Go = ({ content: e }) => l("div", { className: D(_i, "ul_permission_svg_container", "ul_recorded-task-inset-spacing", "ul-center-horizontally"), dangerouslySetInnerHTML: { __html: e.svg } }, "ul-permission-request-graphic", 0, { fileName: A, lineNumber: 201, columnNumber: 5 }, void 0), Ko = ({ content: e, pages: t, required: r }) => {
|
|
1914
|
-
const { permissionDeniedHeadline: n, permissionDeniedBody: i, skipButtonText: o, tryAgainButtonText: a } = e, s = St(t[0]) ? t[0] : null;
|
|
1915
|
-
return Z(() => {
|
|
1916
|
-
const c = setInterval(() => {
|
|
1917
|
-
s !== null && Zt({ currentPage: s, pages: t });
|
|
1918
|
-
}, 1e3);
|
|
1919
|
-
return () => clearInterval(c);
|
|
1920
|
-
}, [s, t]), s ? l("div", { children: [l("div", { className: yi, children: l("p", { className: "ul-av-permission-denied-paragraph", children: [l("span", { className: "ul-av-permission-denied-headline", children: n }, void 0, 0, { fileName: A, lineNumber: 249, columnNumber: 11 }, void 0), l("span", { className: Ni, children: i }, void 0, 0, { fileName: A, lineNumber: 252, columnNumber: 11 }, void 0)] }, void 0, 0, { fileName: A, lineNumber: 248, columnNumber: 9 }, void 0) }, void 0, 0, { fileName: A, lineNumber: 247, columnNumber: 7 }, void 0), l("div", { className: Lt, children: [l(oe, { onClick: Zt.bind(null, { currentPage: s, pages: t }), children: a }, void 0, 0, { fileName: A, lineNumber: 256, columnNumber: 9 }, void 0), l(Ot, { required: r, skipButtonText: o }, void 0, 0, { fileName: A, lineNumber: 264, columnNumber: 9 }, void 0)] }, void 0, 0, { fileName: A, lineNumber: 255, columnNumber: 7 }, void 0)] }, void 0, 0, { fileName: A, lineNumber: 246, columnNumber: 5 }, void 0) : null;
|
|
1921
|
-
}, Yo = ({ stream: e }) => l("video", { autoPlay: !0, className: D("ul_recorded-task-inset-spacing"), id: "ul-record-task-video-preview", muted: !0, ref: (t) => {
|
|
1922
|
-
t && (t.srcObject = e || null);
|
|
1923
|
-
} }, void 0, 0, { fileName: A, lineNumber: 276, columnNumber: 5 }, void 0), Jo = ({ content: e, pages: t, required: r }) => {
|
|
1924
|
-
const { skipButtonText: n } = e, { avStream: i } = Ie.getState();
|
|
1925
|
-
return cr(t), l("div", { children: [l(Yo, { stream: i }, void 0, 0, { fileName: A, lineNumber: 305, columnNumber: 7 }, void 0), l("div", { className: "ul-vertical-button-container-center", children: [l(oe, { onClick: ur.bind(null, { pages: t }), children: e.buttonText }, void 0, 0, { fileName: A, lineNumber: 307, columnNumber: 9 }, void 0), l(Ot, { bottom: !0, required: r, skipButtonText: n }, void 0, 0, { fileName: A, lineNumber: 310, columnNumber: 9 }, void 0)] }, void 0, 0, { fileName: A, lineNumber: 306, columnNumber: 7 }, void 0)] }, void 0, 0, { fileName: A, lineNumber: 304, columnNumber: 5 }, void 0);
|
|
1926
|
-
}, Xo = ({ properties: e }) => {
|
|
1927
|
-
const { pages: t, required: r } = e, { avStream: n, currentPage: i } = Ie.getState();
|
|
1928
|
-
if (i === void 0) return null;
|
|
1929
|
-
switch (i == null ? void 0 : i.type) {
|
|
1930
|
-
case "av_permission": {
|
|
1931
|
-
const o = gi(n, i);
|
|
1932
|
-
return o === Wt ? l(Go, { content: i }, void 0, 0, { fileName: A, lineNumber: 335, columnNumber: 16 }, void 0) : o === bi ? l(Ko, { content: i, pages: t, required: r }, void 0, 0, { fileName: A, lineNumber: 338, columnNumber: 11 }, void 0) : l(Jo, { content: i, pages: t, required: r }, void 0, 0, { fileName: A, lineNumber: 346, columnNumber: 11 }, void 0);
|
|
1933
|
-
}
|
|
1934
|
-
case "screen_permission":
|
|
1935
|
-
return l(Zo, { content: i, pages: t, required: r }, void 0, 0, { fileName: A, lineNumber: 356, columnNumber: 9 }, void 0);
|
|
1936
|
-
case "start_task":
|
|
1937
|
-
return l(Qo, { content: i, pages: t, required: r }, void 0, 0, { fileName: A, lineNumber: 364, columnNumber: 9 }, void 0);
|
|
1938
|
-
case "complete_task":
|
|
1939
|
-
return l(Wo, { content: i, pages: t, properties: e }, void 0, 0, { fileName: A, lineNumber: 372, columnNumber: 9 }, void 0);
|
|
1940
|
-
default:
|
|
1941
|
-
return null;
|
|
1942
|
-
}
|
|
1943
|
-
};
|
|
1944
|
-
var _t = "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/cards/recordedTask/card.tsx";
|
|
1945
|
-
const el = ({ className: e, properties: t, next: r, questionId: n }) => {
|
|
1946
|
-
const i = V(), { surveyId: o, responseGroupUid: a, userId: s } = i, c = Ie(), { screenPermissionRequested: p } = c, m = Ie((h) => h.avStream);
|
|
1947
|
-
let u = Ie((h) => h.currentPage);
|
|
1948
|
-
u || (u = function({ pages: h, userId: b, responseGroupUid: y, surveyId: g, questionId: w, next: T }) {
|
|
1949
|
-
const { updatePage: x } = Ie.getState(), { eventEmitFn: S, recorderEventEmitter: N } = V.getState(), L = { questionId: w, surveyId: g, visitorId: b, responseGroupUid: y };
|
|
1950
|
-
let E = 0;
|
|
1951
|
-
N.emit("recorded.task.permission.screen"), S("recorded.task.permission.screen"), N.emit("permission.status", { "permission.status.callback": (_, C, I, R) => {
|
|
1952
|
-
const B = h[E], { type: k } = B, O = ["screen"];
|
|
1953
|
-
if (St(B)) {
|
|
1954
|
-
const { permissionDescriptors: H } = B, F = H == null ? void 0 : H.includes("microphone"), j = H == null ? void 0 : H.includes("camera");
|
|
1955
|
-
F && O.push("audio"), j && O.push("video"), (_ != null && _.active && !j || _ != null && _.active && C) && E++;
|
|
1956
|
-
}
|
|
1957
|
-
rn(h[E]) && I && (E++, N.emit("begin.recording", { "recording.media.types": O, "start.recording.callback": (H) => x({ mediaRecordingUids: H }) })), x({ currentPage: h[E], avStream: _, screenPermissionRequested: I, nextQuestion: T, type: k, passthroughData: L, recordingMediaTypes: O, captureStream: R });
|
|
1958
|
-
} });
|
|
1959
|
-
const P = h[E];
|
|
1960
|
-
return P.type === "av_permission" && Zt({ currentPage: P, pages: h }), P;
|
|
1961
|
-
}({ questionId: n, surveyId: o, next: (h) => {
|
|
1962
|
-
r(h, !0);
|
|
1963
|
-
}, pages: t.pages, responseGroupUid: a, userId: s }));
|
|
1964
|
-
let f = u.headline, v = u.captionText;
|
|
1965
|
-
const d = gi(m, u);
|
|
1966
|
-
return rn(u) && p && (f = u.permissionDeniedHeadline, v = u.permissionDeniedCaptionText), St(u) && d === hi && (f = u.permissionGrantedHeadline, v = u.permissionGrantedCaptionText), l("div", { className: D(e, "ul-center-horizontally", "fade-in-transition"), children: [l(ke, { message: f, properties: { captionText: v } }, void 0, 0, { fileName: _t, lineNumber: 73, columnNumber: 7 }, void 0), l(Ue, { children: l(Xo, { properties: t }, void 0, 0, { fileName: _t, lineNumber: 75, columnNumber: 9 }, void 0) }, void 0, 0, { fileName: _t, lineNumber: 74, columnNumber: 7 }, void 0)] }, void 0, 0, { fileName: _t, lineNumber: 66, columnNumber: 5 }, void 0);
|
|
1967
|
-
}, tl = { "{{user_id}}": "externalUserId", "{{email}}": "email" };
|
|
1968
|
-
var Ne = "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/cards/textUrlPromptCard.tsx";
|
|
1969
|
-
const rl = ({ className: e, message: t, next: r, properties: n, questionId: i, type: o }) => {
|
|
1970
|
-
const { visitorAttributes: a, isLongFormSurvey: s } = V((d) => ({ visitorAttributes: d.visitorAttributes, isLongFormSurvey: ae(d.studyType) })), c = (d, h = !1) => {
|
|
1971
|
-
r({ value: h ? { skipped: !0 } : void 0, questionId: i, type: o }, !0);
|
|
1972
|
-
}, p = (d) => {
|
|
1973
|
-
d.key !== "Enter" && d.key !== " " || r({ value: void 0, questionId: i, type: o }, !0);
|
|
1974
|
-
}, m = ((d, h = {}) => {
|
|
1975
|
-
if (!d) return d;
|
|
1976
|
-
try {
|
|
1977
|
-
/^https?:\/\//i.test(d) || (d = `http://${d}`);
|
|
1978
|
-
const T = new URL(d);
|
|
1979
|
-
if (!T.protocol || T.protocol !== "http:" && T.protocol !== "https:") return;
|
|
1980
|
-
} catch {
|
|
1981
|
-
return;
|
|
1982
|
-
}
|
|
1983
|
-
let b = d;
|
|
1984
|
-
const y = [];
|
|
1985
|
-
for (const [T, x] of Object.entries(tl)) if (b.toLowerCase().includes(T)) if (h[x]) {
|
|
1986
|
-
const S = new RegExp(T, "gi");
|
|
1987
|
-
b = b.replace(S, h[x]);
|
|
1988
|
-
} else y.push(T);
|
|
1989
|
-
if (y.length === 0 || !b.includes("?")) return b;
|
|
1990
|
-
const g = b.slice(0, b.indexOf("?")), w = b.slice(b.indexOf("?") + 1).split("&").map((T) => T.split("=")).filter((T) => !y.includes(T[1]));
|
|
1991
|
-
return w.length === 0 ? g : `${g}?${w.map((T) => T.join("=")).join("&")}`;
|
|
1992
|
-
})(n && n.buttonUrl, a), u = s && n.promptActionType === mi.NO_BUTTON ? () => l(Y, {}, void 0) : () => l(He, { children: l("div", { className: "ul-card-button-group", children: [l("a", { className: "ul-card-text__button ul-card__text-url-prompt-button", href: m, id: "ul-card-text__button", onClick: c, onKeyPress: p, rel: "noreferrer", role: m ? "link" : "button", tabIndex: 0, target: "_blank", children: We(n) }, void 0, 0, { fileName: Ne, lineNumber: 81, columnNumber: 13 }, void 0), n.required === !1 && l("button", { className: "ul-card-skip__button", onClick: (d) => c(0, !0), children: ui(n) }, void 0, 0, { fileName: Ne, lineNumber: 95, columnNumber: 15 }, void 0)] }, void 0, 0, { fileName: Ne, lineNumber: 80, columnNumber: 11 }, void 0) }, void 0, 0, { fileName: Ne, lineNumber: 79, columnNumber: 9 }, void 0);
|
|
1993
|
-
return l("div", { className: D(e, "ul-card__text-url-prompt", "fade-in-transition"), children: [l(ke, { message: t, properties: { questionHtml: n.questionHtml } }, void 0, 0, { fileName: Ne, lineNumber: 116, columnNumber: 7 }, void 0), l(Ue, { children: (f = n == null ? void 0 : n.richTextBody, v = n == null ? void 0 : n.body, f ? l("div", { className: "ul-rich-text-body", dangerouslySetInnerHTML: { __html: f }, id: "ul-card__text-url-body-container" }, void 0, 0, { fileName: Ne, lineNumber: 48, columnNumber: 9 }, void 0) : v ? l("div", { className: "ul-rich-text-body", id: "ul-card__text-url-body-container", children: (v ? v.split(/\n\s*\n/g) : []).map((d, h) => l("p", { children: d }, h, 0, { fileName: Ne, lineNumber: 61, columnNumber: 20 }, void 0)) }, void 0, 0, { fileName: Ne, lineNumber: 58, columnNumber: 7 }, void 0) : null) }, void 0, 0, { fileName: Ne, lineNumber: 120, columnNumber: 7 }, void 0), l(Re, { defaultBody: u, properties: n }, void 0, 0, { fileName: Ne, lineNumber: 123, columnNumber: 7 }, void 0)] }, i, 0, { fileName: Ne, lineNumber: 108, columnNumber: 5 }, void 0);
|
|
1994
|
-
var f, v;
|
|
1995
|
-
};
|
|
1996
|
-
var Se = "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/cards/thanksCard.tsx";
|
|
1997
|
-
const nl = ({ className: e, questionId: t }) => {
|
|
1998
|
-
const { border: r, destroy: n, endCard: i, forceBrandedLogo: o } = V((c) => ({ border: c.border, destroy: c.destroy, endCard: c.endCard, forceBrandedLogo: c.forceBrandedLogo }));
|
|
1999
|
-
Z(() => {
|
|
2000
|
-
setTimeout(() => {
|
|
2001
|
-
n(Ge);
|
|
2002
|
-
}, o ? 4e3 : 2e3);
|
|
2003
|
-
}, [n, o]);
|
|
2004
|
-
const a = i && i.subheader ? l("p", { className: "ul-caption", children: i.subheader }, void 0, 0, { fileName: Se, lineNumber: 30, columnNumber: 7 }, void 0) : null, s = i && i.headline ? i.headline : "";
|
|
2005
|
-
return l("div", { className: D(e, "ul-card--thanks", "fade-in-transition"), children: l("div", { children: l("div", { className: "ul-card--thanks-content", children: [l("div", { className: "ul-thanks-check", children: l("svg", { "aria-labelledby": "title", fill: "none", height: "99", viewBox: "0 0 81 99", width: "81", xmlns: "http://www.w3.org/2000/svg", children: [l("path", { clipRule: "evenodd", d: "M40.5 77C60.9345 77 77.5 60.4345 77.5 40C77.5 19.5655 60.9345 3 40.5 3C20.0655 3 3.5 19.5655 3.5 40C3.5 60.4345 20.0655 77 40.5 77ZM80.5 40C80.5 62.0914 62.5914 80 40.5 80C18.4086 80 0.5 62.0914 0.5 40C0.5 17.9086 18.4086 0 40.5 0C62.5914 0 80.5 17.9086 80.5 40Z", fill: r, fillRule: "evenodd" }, void 0, 0, { fileName: Se, lineNumber: 54, columnNumber: 15 }, void 0), l("path", { clipRule: "evenodd", d: "M55.025 22.9046C55.6299 23.4705 55.6616 24.4198 55.0956 25.0247C54.8724 25.2634 54.6109 25.5285 54.3157 25.8277C52.2547 27.9168 48.5549 31.667 44.8135 39.6658C43.2818 42.9406 42.0864 45.8386 41.0823 48.2729C40.6539 49.3116 40.2603 50.2659 39.8902 51.129C39.287 52.5359 38.7248 53.7508 38.1744 54.625C37.8997 55.0613 37.5806 55.4905 37.2017 55.8245C36.8201 56.1607 36.2613 56.5 35.5457 56.5C34.6742 56.5 34.0892 55.9692 33.7774 55.6083C33.4502 55.2296 33.1752 54.7511 32.9396 54.301C32.7305 53.9013 32.5088 53.4367 32.2797 52.9565C32.2429 52.8794 32.2059 52.8019 32.1688 52.7243C31.8942 52.1499 31.5959 51.534 31.2537 50.8868C29.8886 48.305 27.8539 45.2878 24.2343 43.1382C23.522 42.7152 23.2875 41.7949 23.7105 41.0826C24.1335 40.3703 25.0539 40.1358 25.7662 40.5588C30.0556 43.1062 32.4149 46.6647 33.9058 49.4845C34.2776 50.1876 34.5973 50.8487 34.8753 51.4302C34.9147 51.5124 34.9529 51.5926 34.9902 51.6707C35.2222 52.1567 35.4164 52.5637 35.5978 52.9102C35.6151 52.9434 35.6321 52.9754 35.6485 53.0061C36.0565 52.3531 36.5341 51.3434 37.133 49.9468C37.4781 49.1418 37.8572 48.2229 38.2761 47.2074C39.2886 44.7532 40.5339 41.7347 42.0961 38.3948C46.0591 29.9221 50.0641 25.8648 52.1535 23.7482C52.4423 23.4556 52.6944 23.2002 52.9048 22.9753C53.4708 22.3703 54.42 22.3387 55.025 22.9046ZM35.1994 53.5892C35.1994 53.5892 35.2 53.5888 35.2012 53.5879C35.2 53.5889 35.1994 53.5893 35.1994 53.5892ZM36.0666 53.6682C36.0732 53.674 36.0765 53.6775 36.0765 53.6777C36.0765 53.678 36.0732 53.6751 36.0666 53.6682Z", fill: r, fillRule: "evenodd" }, void 0, 0, { fileName: Se, lineNumber: 60, columnNumber: 15 }, void 0), l("path", { d: "M69.5 97C69.5 98.1046 56.2924 99 40 99C23.7076 99 10.5 98.1046 10.5 97C10.5 95.8954 23.7076 95 40 95C56.2924 95 69.5 95.8954 69.5 97Z", fill: "black", fillOpacity: "0.2" }, void 0, 0, { fileName: Se, lineNumber: 66, columnNumber: 15 }, void 0)] }, void 0, 0, { fileName: Se, lineNumber: 46, columnNumber: 13 }, void 0) }, void 0, 0, { fileName: Se, lineNumber: 45, columnNumber: 11 }, void 0), l(ke, { message: s }, void 0, 0, { fileName: Se, lineNumber: 73, columnNumber: 11 }, void 0), a] }, void 0, 0, { fileName: Se, lineNumber: 44, columnNumber: 9 }, void 0) }, void 0, 0, { fileName: Se, lineNumber: 43, columnNumber: 7 }, void 0) }, t, 0, { fileName: Se, lineNumber: 35, columnNumber: 5 }, void 0);
|
|
2006
|
-
};
|
|
2007
|
-
var Le = "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/cards/uploadingCard.tsx";
|
|
2008
|
-
const il = ({ className: e }) => {
|
|
2009
|
-
const { uploadProgress: t } = V((o) => ({ uploadProgress: o.uploadProgress }));
|
|
2010
|
-
let r, n;
|
|
2011
|
-
Object.values(t).filter((o) => o.isSubmitted).length > 1 ? (r = "Your responses are processing", n = "Please keep this tab open until your responses are fully processed.") : (r = "Your response is processing", n = "Please keep this tab open until your response is fully processed.");
|
|
2012
|
-
const i = Math.round(Math.min(99, ...Object.values(t).filter((o) => o.isSubmitted).map((o) => o.progressPct || 0)));
|
|
2013
|
-
return l("div", { className: D(e, "ul-card--uploading", "fade-in-transition"), children: [l("div", { "aria-busy": "true", "aria-label": "Processing...", "aria-live": "polite", className: "ul-loading-spinner-container", role: "progressbar", children: l("div", { className: "ul-loading-spinner", children: [l("div", { className: "first" }, void 0, 0, { fileName: Le, lineNumber: 55, columnNumber: 11 }, void 0), l("div", { className: "second" }, void 0, 0, { fileName: Le, lineNumber: 56, columnNumber: 11 }, void 0), l("div", { className: "third" }, void 0, 0, { fileName: Le, lineNumber: 57, columnNumber: 11 }, void 0), l("div", { className: "fourth" }, void 0, 0, { fileName: Le, lineNumber: 58, columnNumber: 11 }, void 0)] }, void 0, 0, { fileName: Le, lineNumber: 54, columnNumber: 9 }, void 0) }, void 0, 0, { fileName: Le, lineNumber: 47, columnNumber: 7 }, void 0), l(ke, { message: `${r} (${i}% complete)` }, void 0, 0, { fileName: Le, lineNumber: 61, columnNumber: 7 }, void 0), l("p", { className: "ul-caption", children: n }, void 0, 0, { fileName: Le, lineNumber: 62, columnNumber: 7 }, void 0)] }, void 0, 0, { fileName: Le, lineNumber: 40, columnNumber: 5 }, void 0);
|
|
2014
|
-
};
|
|
2015
|
-
var rt = "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/footer.tsx";
|
|
2016
|
-
const ol = () => {
|
|
2017
|
-
var y;
|
|
2018
|
-
const { border: e, cards: t, forceBrandedLogo: r, headers: n, index: i, marketingUrl: o, showSurveyBrand: a, slugName: s, surveyId: c, viewedCardCount: p } = V((g) => ({ border: g.border, cards: g.cards, forceBrandedLogo: g.forceBrandedLogo, headers: g.headers, index: g.index, marketingUrl: g.marketingUrl, showSurveyBrand: g.showSurveyBrand, slugName: g.slugName, surveyId: g.surveyId, viewedCardCount: g.viewedCardCount })), m = U(te(null), "progressRef"), u = t.filter((g) => g.type !== "uploading" && g.type !== "thanks"), f = ((g, w) => {
|
|
2019
|
-
const T = /* @__PURE__ */ new Set(["thanks", "uploading"]);
|
|
2020
|
-
if (w >= g.length || w < 0 || T.has(g[w].type)) return 0;
|
|
2021
|
-
const x = g.filter((N) => !T.has(N.type));
|
|
2022
|
-
if (w === x.length - 1) return 1;
|
|
2023
|
-
const S = { [x.length - 1]: 1, [-1]: 0 };
|
|
2024
|
-
for (let N = x.length - 2; N >= w; N--) {
|
|
2025
|
-
const L = x[N], E = po(N, L.props.routingOptions);
|
|
2026
|
-
if (E.length === 0) {
|
|
2027
|
-
S[N] = S[N + 1] + 1;
|
|
2028
|
-
continue;
|
|
2029
|
-
}
|
|
2030
|
-
let P = 0, _ = uo(L);
|
|
2031
|
-
if (_ === null) return x.length - 1 - w;
|
|
2032
|
-
for (let C = 0; C < E.length && _.length !== 0; C++) {
|
|
2033
|
-
const { comparator: I, target: R, value: B } = E[C], k = _.filter((O) => {
|
|
2034
|
-
const H = so({ value: O }, L.type, O), F = Jn(O, L.type);
|
|
2035
|
-
return !(H && I === "answered" || F && I === "partial" || !H && !F && I === "skipped" || I === "given_up" && mo(O) && O.taskStatus === "given.up" || H && L.type === "open" && (I === "contains" || I === "notcontains") || H && co(I) && ar[I](O, B));
|
|
2036
|
-
});
|
|
2037
|
-
if (k.length < _.length) {
|
|
2038
|
-
const O = parseInt(String(R), 10);
|
|
2039
|
-
if (O !== -1 && O <= N || O >= x.length) return x.length - 1 - w;
|
|
2040
|
-
P = Math.max(S[O] + 1, P);
|
|
2041
|
-
}
|
|
2042
|
-
_ = k;
|
|
2043
|
-
}
|
|
2044
|
-
_.length > 0 && (P = Math.max(S[N + 1] + 1, P)), S[N] = P;
|
|
2045
|
-
}
|
|
2046
|
-
return S[w];
|
|
2047
|
-
})(t, i), v = p + 1, d = v / (v + f), h = ci({ marketingUrl: o, slugName: s, surveyId: c, forceBrandedLogo: r });
|
|
2048
|
-
Z(() => {
|
|
2049
|
-
m.current && (m.current.style.width = 100 * d + "%");
|
|
2050
|
-
}, [d]);
|
|
2051
|
-
const b = ((y = t[i]) == null ? void 0 : y.type) === "thanks";
|
|
2052
|
-
return l("footer", { className: "ul-footer " + (n["userleap-platform"] === "link" ? "ul-footer__link" : ""), children: b && r ? l(si, { marketingUrlLink: h }, void 0, 0, { fileName: rt, lineNumber: 95, columnNumber: 9 }, void 0) : l(Y, { children: [u.length > 1 && l("div", { className: "ul-progress-bar-container ul-progress-bar-container__footer", children: l("div", { className: "ul-progress-bar-current", ref: m, style: { border: `1px solid ${e || "#000"}` } }, void 0, 0, { fileName: rt, lineNumber: 67, columnNumber: 13 }, void 0) }, void 0, 0, { fileName: rt, lineNumber: 66, columnNumber: 11 }, void 0), a ? l(ai, { forceBrandedLogo: r, marketingUrlLink: h }, void 0, 0, { fileName: rt, lineNumber: 78, columnNumber: 11 }, void 0) : null] }, void 0) }, void 0, 0, { fileName: rt, lineNumber: 89, columnNumber: 5 }, void 0);
|
|
2053
|
-
};
|
|
2054
|
-
var on = "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/progressBar.tsx";
|
|
2055
|
-
const ll = () => {
|
|
2056
|
-
const e = V((a) => a.border), t = V((a) => a.cards), r = V((a) => a.index), n = V((a) => a.focusedQuestionId), { totalQuestions: i, fraction: o } = U(xe(() => {
|
|
2057
|
-
var p;
|
|
2058
|
-
const a = t.filter((m) => m.type !== "uploading" && m.type !== "thanks"), s = a.length;
|
|
2059
|
-
if (s <= 1) return { totalQuestions: s, fraction: 0 };
|
|
2060
|
-
if (((p = t[r]) == null ? void 0 : p.type) === "thanks") return { totalQuestions: s, fraction: 1 };
|
|
2061
|
-
const c = a.findIndex((m) => m.name === n);
|
|
2062
|
-
return { totalQuestions: s, fraction: (c >= 0 ? c : 0) / s };
|
|
2063
|
-
}, [t, r, n]), "totalQuestions");
|
|
2064
|
-
return i <= 1 ? null : l("div", { className: "ul-progress-bar-container ul-progress-bar-container__header", children: l("div", { className: "ul-progress-bar-current", style: { width: 100 * o + "%", border: `1px solid ${e ?? "#000"}` } }, void 0, 0, { fileName: on, lineNumber: 36, columnNumber: 7 }, void 0) }, void 0, 0, { fileName: on, lineNumber: 35, columnNumber: 5 }, void 0);
|
|
2065
|
-
};
|
|
2066
|
-
var be = "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/app.tsx";
|
|
2067
|
-
const al = () => {
|
|
2068
|
-
const { answers: e, border: t, cards: r, close: n, configureExitOnOverlayClick: i, destroy: o, endCard: a, eventEmitFn: s, fontFamily: c, headers: p, index: m, minScrollableHeight: u, next: f, previewMode: v, productConfig: d, seen: h, showStripes: b, studyType: y, surveyId: g, update: w, useMobileStyling: T, viewDocument: x } = V((k) => ({ answers: k.answers, border: k.border, cards: k.cards, close: k.close, configureExitOnOverlayClick: k.configureExitOnOverlayClick, destroy: k.destroy, endCard: k.endCard, eventEmitFn: k.eventEmitFn, fontFamily: k.fontFamily, headers: k.headers, index: k.index, previewMode: k.previewMode, productConfig: k.productConfig, minScrollableHeight: k.minScrollableHeight, next: k.next, seen: k.seen, showStripes: k.showStripes, studyType: k.studyType, surveyId: k.surveyId, update: k.update, useMobileStyling: k.useMobileStyling, viewDocument: k.viewDocument })), S = U(te(null), "appRef"), N = U(te(!1), "firedAppeared"), L = p["userleap-platform"], { props: E, type: P, name: _ } = r[m];
|
|
2069
|
-
Z(() => {
|
|
2070
|
-
if (window.Sprig) return window.Sprig.trackHistory = (k) => V.getState().trackHistory(k), () => {
|
|
2071
|
-
window.Sprig.trackHistory = void 0;
|
|
2072
|
-
};
|
|
2073
|
-
}, []), Z(() => {
|
|
2074
|
-
S.current && (S.current.classList.contains("ul-app--visible") || S.current.classList.add("ul-app--visible"), !N.current && s && (N.current = !0, s(me.SurveyAppeared, { name: me.SurveyAppeared, "survey.id": g })));
|
|
2075
|
-
}, [s, g]), Z(() => {
|
|
2076
|
-
const k = () => {
|
|
2077
|
-
x.visibilityState === "visible" && (h(), x.removeEventListener("visibilitychange", k));
|
|
2078
|
-
};
|
|
2079
|
-
return x.addEventListener("visibilitychange", k), k(), () => {
|
|
2080
|
-
x.removeEventListener("visibilitychange", k);
|
|
2081
|
-
};
|
|
2082
|
-
}, [h, x]), Z(() => {
|
|
2083
|
-
w();
|
|
2084
|
-
}, [m, w]), Z(() => {
|
|
2085
|
-
i(() => n());
|
|
2086
|
-
}, [n, i]);
|
|
2087
|
-
const C = U(xe(() => Li(r, m), [r, m]), "groupedCards"), I = vi(r), R = ze((k) => {
|
|
2088
|
-
f({ data: k, completeSurvey: () => o(Ge), endCard: a }), Ei(x);
|
|
2089
|
-
}, [f, o, a, x]);
|
|
2090
|
-
if (e) {
|
|
2091
|
-
for (const k of e) if (k.questionId === _) {
|
|
2092
|
-
let O;
|
|
2093
|
-
if (P === "multiplechoice") {
|
|
2094
|
-
const H = E.options.find(({ value: F }) => F === k.value);
|
|
2095
|
-
if (!H) break;
|
|
2096
|
-
O = { [H.id]: H.value };
|
|
2097
|
-
} else O = k.value;
|
|
2098
|
-
R({ value: O, type: P, questionId: k.questionId });
|
|
2099
|
-
break;
|
|
2100
|
-
}
|
|
2101
|
-
}
|
|
2102
|
-
const B = !T && ((d == null ? void 0 : d.framePosition) === "center" || (d == null ? void 0 : d.desktopDisplay) === "center-modal" || ((d == null ? void 0 : d.placement) || "").includes("center"));
|
|
2103
|
-
return l("div", { className: D("ul-app", kt(p) ? "ul-app--visible" : "ul-app--overlay"), dir: "auto", id: Ge, onClick: (k) => {
|
|
2104
|
-
var j;
|
|
2105
|
-
const O = window.sprigAPI, H = k.target;
|
|
2106
|
-
if (!O || !H) return;
|
|
2107
|
-
const F = [H, H.parentElement];
|
|
2108
|
-
for (const J of F) if (((j = J == null ? void 0 : J.tagName) == null ? void 0 : j.toLowerCase()) === "a") {
|
|
2109
|
-
k.preventDefault();
|
|
2110
|
-
try {
|
|
2111
|
-
const X = new URL(J.href);
|
|
2112
|
-
X.protocol !== "http:" && X.protocol !== "https:" || (O == null || O.openUrl(X.toString()));
|
|
2113
|
-
} catch (X) {
|
|
2114
|
-
console.error(X);
|
|
2115
|
-
}
|
|
2116
|
-
return;
|
|
2117
|
-
}
|
|
2118
|
-
}, ref: S, style: { "--theme": t, ...c ? { fontFamily: c.replace(";", "") } : {}, ...B ? { position: "relative" } : {} }, children: l("div", { className: "ul-app__container", children: l("div", { className: D(ne("ul-card__container", T, y)), style: { ...y !== "feedbackButton" || (d == null ? void 0 : d.desktopDisplay) === "center-modal" ? { borderColor: t } : {}, ...(d == null ? void 0 : d.desktopDisplay) === "slider" ? { margin: "0px" } : {} }, children: l("div", { className: "sprig-container", style: { minHeight: u }, children: [b && l("div", { className: "ul-header__container", dir: "ltr", children: l("div", { className: "ul-header", children: "For development purposes only" }, void 0, 0, { fileName: be, lineNumber: 238, columnNumber: 17 }, void 0) }, void 0, 0, { fileName: be, lineNumber: 237, columnNumber: 15 }, void 0), v && l("div", { className: "ul-header__container", dir: "ltr", children: l("div", { className: "ul-header", children: "Preview Mode: Response will not be recorded." }, void 0, 0, { fileName: be, lineNumber: 243, columnNumber: 17 }, void 0) }, void 0, 0, { fileName: be, lineNumber: 242, columnNumber: 15 }, void 0), ae(y) && l(ll, {}, void 0, 0, { fileName: be, lineNumber: 248, columnNumber: 45 }, void 0), l("div", { className: D(ho("ul-card-main-content", L)), children: l(zo, { cards: C, next: R, previousResponses: I }, void 0, 0, { fileName: be, lineNumber: 252, columnNumber: 15 }, void 0) }, void 0, 0, { fileName: be, lineNumber: 249, columnNumber: 13 }, void 0), !ae(y) && l(ol, {}, void 0, 0, { fileName: be, lineNumber: 258, columnNumber: 46 }, void 0)] }, void 0, 0, { fileName: be, lineNumber: 230, columnNumber: 11 }, void 0) }, void 0, 0, { fileName: be, lineNumber: 212, columnNumber: 9 }, void 0) }, void 0, 0, { fileName: be, lineNumber: 211, columnNumber: 7 }, void 0) }, void 0, 0, { fileName: be, lineNumber: 196, columnNumber: 5 }, void 0);
|
|
2119
|
-
}, ki = () => MediaRecorder.isTypeSupported("video/webm") ? "video/webm" : "video/mp4", ln = (e) => {
|
|
2120
|
-
const t = { audioBitsPerSecond: 128e3, videoBitsPerSecond: 25e5, mimeType: ki() };
|
|
2121
|
-
return new MediaRecorder(e, t);
|
|
2122
|
-
}, an = (e, t, r) => {
|
|
2123
|
-
r[t] = [], e.ondataavailable = function(n) {
|
|
2124
|
-
r[t].push(n.data);
|
|
2125
|
-
}, e.currentMediaRecordingUid = t, e.start();
|
|
2126
|
-
};
|
|
2127
|
-
function sn(e, t, r, n, i, o) {
|
|
2128
|
-
if (e && e.state !== "inactive") {
|
|
2129
|
-
const { "begin.callback": a } = n, s = e.currentMediaRecordingUid;
|
|
2130
|
-
if (!s) return;
|
|
2131
|
-
a && a(s), e.onstop = () => async function(c, p, m, u, f, v, d) {
|
|
2132
|
-
const h = V.getState().viewDocument, { "upload.callback": b, "progress.callback": y } = u, g = { mediaType: m, updatedAt: (/* @__PURE__ */ new Date()).toISOString(), mediaRecordingUid: f, ...u["passthrough.data"] }, w = await (async (N, L) => {
|
|
2133
|
-
var P;
|
|
2134
|
-
const E = await fetch(L, { method: "POST", cache: "no-cache", headers: { "Content-Type": "application/json" }, body: JSON.stringify(N) });
|
|
2135
|
-
if (E.ok) {
|
|
2136
|
-
const _ = await E.json();
|
|
2137
|
-
return (P = _ == null ? void 0 : _.upload) == null ? void 0 : P.url;
|
|
2138
|
-
}
|
|
2139
|
-
return null;
|
|
2140
|
-
})(g, c);
|
|
2141
|
-
if (!w) return void (b && b(null, { message: "failed to get upload url" }));
|
|
2142
|
-
const T = new Blob(d, { type: ki() });
|
|
2143
|
-
if (!h.defaultView) return;
|
|
2144
|
-
const x = new h.defaultView.File([T], `recording video ${Date.now()}`), S = v.createUpload({ endpoint: w, file: x, chunkSize: 5120 });
|
|
2145
|
-
S.on("error", (N) => {
|
|
2146
|
-
b && b(null, N);
|
|
2147
|
-
}), S.on("progress", (N) => {
|
|
2148
|
-
y && y(f, N);
|
|
2149
|
-
}), S.on("success", () => {
|
|
2150
|
-
b && b(f, !0);
|
|
2151
|
-
});
|
|
2152
|
-
}(t, 0, r, n, s, i, o), e.stop();
|
|
2153
|
-
}
|
|
2154
|
-
}
|
|
2155
|
-
const sl = { state: { chunks: {} }, stopRecording(e) {
|
|
2156
|
-
const { uploadApiEndpoint: t, avRecorder: r, screenRecorder: n, UpChunk: i } = this.state, o = this.state.avStream && this.state.avStream.getVideoTracks().length > 0 ? "video" : "audio";
|
|
2157
|
-
this.state.chunks && t && i && (r != null && r.currentMediaRecordingUid && sn(r, t, o, e, i, this.state.chunks[r == null ? void 0 : r.currentMediaRecordingUid]), n != null && n.currentMediaRecordingUid && sn(n, t, "screen", e, i, this.state.chunks[n == null ? void 0 : n.currentMediaRecordingUid]));
|
|
2158
|
-
}, handleCancelledStream(e) {
|
|
2159
|
-
const t = e.getVideoTracks(), r = e.getAudioTracks();
|
|
2160
|
-
let n = t.length && t[0];
|
|
2161
|
-
n = n || r.length && r[0], n && n.addEventListener("ended", () => {
|
|
2162
|
-
[this.state.avRecorder, this.state.screenRecorder].map((i) => {
|
|
2163
|
-
i && (i.state === "recording" && i.stop(), i.stream.getTracks().map((o) => {
|
|
2164
|
-
o.readyState === "live" && o.stop();
|
|
2165
|
-
}));
|
|
2166
|
-
}), Object.assign(this.state, { avStream: null, captureStream: null, avRecorder: null, screenRecorder: null });
|
|
2167
|
-
});
|
|
2168
|
-
}, taskDurationMillisecond() {
|
|
2169
|
-
return this.state.startTime ? (/* @__PURE__ */ new Date()).getTime() - this.state.startTime.getTime() : 0;
|
|
2170
|
-
}, setUpChunk(e) {
|
|
2171
|
-
this.state.UpChunk = e;
|
|
2172
|
-
}, configure(e, t) {
|
|
2173
|
-
Object.assign(this.state, t), this.state.uploadApiEndpoint = `${t.apiURL}/2/environments/integrations/upload`, this.state.chunks = {}, e.on("permission.status", this.permissionStatusCallback.bind(this)), e.on("av.permission", async (r) => {
|
|
2174
|
-
this.avPermissionCallback(r);
|
|
2175
|
-
}), e.on("begin.recording", this.beginRecordingCallback.bind(this)), e.on("start.task", this.startTaskCallback.bind(this)), e.on("screen.permission", async (r) => {
|
|
2176
|
-
this.screenPermissionCallback(r);
|
|
2177
|
-
}), e.on("finish.task", async (r) => {
|
|
2178
|
-
this.finishTaskCallback(r);
|
|
2179
|
-
});
|
|
2180
|
-
}, async avPermissionCallback(e) {
|
|
2181
|
-
var n, i, o;
|
|
2182
|
-
const { "stream.ready": t, "permission.descriptors": r } = e;
|
|
2183
|
-
try {
|
|
2184
|
-
(n = this.state.avStream) != null && n.active && (this.state.avStream.getTracks().map((a) => a.readyState === "live" && a.stop()), ((i = this.state.captureStream) == null ? void 0 : i.getAudioTracks().length) === 1 && this.state.captureStream.removeTrack(this.state.captureStream.getAudioTracks()[0])), this.state.avStream = await navigator.mediaDevices.getUserMedia({ video: r.includes("camera"), audio: !0 }), ((o = this.state.captureStream) == null ? void 0 : o.getAudioTracks().length) === 0 && this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]), this.handleCancelledStream(this.state.avStream);
|
|
2185
|
-
} catch (a) {
|
|
2186
|
-
return console.warn("Error: failed to get permissions: " + a), void (t && t(null, null));
|
|
2187
|
-
}
|
|
2188
|
-
t && t(this.state.avStream, this.state.captureStream);
|
|
2189
|
-
}, async screenPermissionCallback(e) {
|
|
2190
|
-
const { "screen.permission.requested": t, "stream.ready.callback": r } = e;
|
|
2191
|
-
t == null || t(!0);
|
|
2192
|
-
try {
|
|
2193
|
-
this.state.captureStream = await navigator.mediaDevices.getDisplayMedia({ video: !0, cursor: "always", displaySurface: "browser", preferCurrentTab: !0 });
|
|
2194
|
-
} catch (n) {
|
|
2195
|
-
return t == null || t(!1), console.warn("Error: failed to get permissions: " + n), void (r && r(null, null));
|
|
2196
|
-
}
|
|
2197
|
-
t == null || t(!1), this.state.avStream && this.state.avStream.getAudioTracks().length > 0 && this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]), this.handleCancelledStream(this.state.captureStream), r && r(this.state.avStream || null, this.state.captureStream);
|
|
2198
|
-
}, beginRecordingCallback(e) {
|
|
2199
|
-
const { "recording.media.types": t, "start.recording.callback": r = () => {
|
|
2200
|
-
} } = e;
|
|
2201
|
-
if (!t) return;
|
|
2202
|
-
const n = [];
|
|
2203
|
-
if (t.includes("video") && this.state.avStream) {
|
|
2204
|
-
this.state.avRecorder = ln(this.state.avStream);
|
|
2205
|
-
const i = pr();
|
|
2206
|
-
an(this.state.avRecorder, i, this.state.chunks), n.push(i);
|
|
2207
|
-
}
|
|
2208
|
-
if (t.includes("screen") && this.state.captureStream) {
|
|
2209
|
-
this.state.screenRecorder = ln(this.state.captureStream);
|
|
2210
|
-
const i = pr();
|
|
2211
|
-
an(this.state.screenRecorder, i, this.state.chunks), n.push(i);
|
|
2212
|
-
}
|
|
2213
|
-
n && r && r(n);
|
|
2214
|
-
}, async finishTaskCallback(e) {
|
|
2215
|
-
const { "current.index": t, "task.response": r, "task.complete.callback": n } = e;
|
|
2216
|
-
await this.stopRecording(e), n && n(this.taskDurationMillisecond()), this.state.cards && this.state.hasEndCard !== void 0 && this.lookAheadAndStopStream(t, r, this.state.cards, this.state.hasEndCard);
|
|
2217
|
-
}, startTaskCallback() {
|
|
2218
|
-
this.state.startTime = /* @__PURE__ */ new Date();
|
|
2219
|
-
}, permissionStatusCallback(e) {
|
|
2220
|
-
var n;
|
|
2221
|
-
const { "permission.status.callback": t } = e, r = this.state.avStream;
|
|
2222
|
-
t && t(r, !!r && (r == null ? void 0 : r.getVideoTracks().length) > 0, !!((n = this.state.captureStream) != null && n.active), this.state.captureStream);
|
|
2223
|
-
}, lookAheadAndStopStream(e, t, r, n) {
|
|
2224
|
-
const { avRecorder: i, screenRecorder: o } = this.state, { allResponses: a } = V.getState(), s = Xn({ cards: r, index: e, hasEndCard: n, allResponses: a });
|
|
2225
|
-
s !== null && r[s].type === "recordedtask" || [i, o].map((c) => {
|
|
2226
|
-
c && (c.state === "recording" && c.stop(), c.stream.getTracks().map((p) => {
|
|
2227
|
-
p.readyState === "live" && p.stop();
|
|
2228
|
-
}));
|
|
2229
|
-
});
|
|
2230
|
-
} }, Kt = Object.create(sl);
|
|
2231
|
-
Object.freeze(Kt);
|
|
2232
|
-
const ul = ({ mode: e = null, viewWindow: t, viewDocument: r, trackPageViewUrl: n }) => {
|
|
2233
|
-
const i = r.documentElement;
|
|
2234
|
-
let o;
|
|
2235
|
-
try {
|
|
2236
|
-
o = t.parent.location.href;
|
|
2237
|
-
} catch {
|
|
2238
|
-
o = t.location.href;
|
|
2239
|
-
}
|
|
2240
|
-
return { mode: e, sw: t.screen.width, sh: t.screen.height, cw: i.clientWidth, ch: i.clientHeight, p: n ?? o, l: t.navigator.language };
|
|
2241
|
-
}, dl = { configure: function(e, t = !0) {
|
|
2242
|
-
var y;
|
|
2243
|
-
const { answers: r, apiURL: n, endCard: i, eventEmitFn: o, fontFamilyURL: a, frame: s, previewKey: c, viewDocument: p, viewWindow: m } = e, u = kt(e.headers) ? e.frame : p.body, f = e.UpChunk || window.UpChunk, v = it, d = ((g, w) => {
|
|
2244
|
-
const T = [...g], x = /* @__PURE__ */ new Set(["videovoice", "recordedtask"]);
|
|
2245
|
-
return g.some((S) => x.has(S.type)) && T.push({ name: -2, props: { routingOptions: [] }, type: "uploading" }), w && T.push({ name: -1, props: { routingOptions: [] }, type: "thanks" }), T;
|
|
2246
|
-
})(e.cards, !!i);
|
|
2247
|
-
Kt.configure(v, { cards: d, hasEndCard: !!i, apiURL: n, UpChunk: f }), V.setState({ apiURL: n, answers: r, border: e.border, index: e.startingQuestionIdx || 0, cards: d, configureExitOnOverlayClick: e.configureExitOnOverlayClick, customMetadata: e.customMetadata, endCard: e.endCard, envId: e.envId, eventEmitFn: o, fontFamily: e.fontFamily, forceBrandedLogo: e.forceBrandedLogo, frame: s, headers: e.headers, hasViewedEmbed: !1, isPreview: e.isPreview, marketingUrl: "https://sprig.com", meta: ul({ mode: e.mode, viewWindow: m, viewDocument: p, trackPageViewUrl: e.trackPageViewUrl }), mode: e.mode, previewKey: c, previewMode: e.previewMode, productConfig: e.productConfig, recorder: Kt, recorderEventEmitter: v, responseGroupUid: e.responseGroupUid, showStripes: e.showStripes, showSurveyBrand: e.showSurveyBrand, slugName: e.slugName, styleNonce: e.styleNonce, studyType: e.studyType, surveyId: e.surveyId, tabTitle: e.tabTitle, uploadingCardViewed: !1, uploadProgress: {}, useMobileStyling: e.useMobileStyling, useDesktopPrototype: e.useDesktopPrototype, userId: e.userId, viewDocument: e.viewDocument, visitorAttributes: e.visitorAttributes, viewedCardCount: e.startingQuestionIdx || 0 });
|
|
2248
|
-
const { head: h } = p;
|
|
2249
|
-
if (fr({ document: p, elementId: "sprig-style", styleString: `html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}button,input,select,textarea{margin:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}ol,ul{padding-inline-start:1em}.ul-loading-spinner-container{font-size:1.8rem;flex-grow:1;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.ul-loading-spinner{display:inline-block;position:relative;width:6rem;height:6rem}.ul-loading-spinner div{box-sizing:border-box;display:block;position:absolute;width:80%;height:80%;margin:5px;border:5px solid #152e3e;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#152e3e transparent transparent transparent}.ul-loading-spinner .first{animation-delay:-.45s}.ul-loading-spinner .second{animation-delay:-.3s}.ul-loading-spinner .third{animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fade-in-transition{animation:fadeIn .4s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.ul-card{flex:1 1 auto;border-radius:2px;display:flex;flex-direction:column;font-size:17px;line-height:19px;text-align:start;min-width:200px;justify-content:center;animation:enable-transitions 0s .3s forwards;min-height:0}@keyframes enable-transitions{to{transition:opacity .2s ease-in-out}}.ul-focus-transitions-active .ul-card,.ul-card--with-transitions{transition:opacity .2s ease-in-out}.ul-card__container--desktop{border:2px solid #fff;box-shadow:0 0 15px #00000026;margin:15px}.ul-card__container--mobile{border-width:0;box-shadow:0 0 5px #00000040;margin-top:5px}.ul-card__container--desktop_longFormSurvey,.ul-card__container--mobile_longFormSurvey{margin:0}.sprig-container{display:flex;flex-direction:column;width:100%;height:fit-content;flex:1 1 auto;min-height:0;justify-content:center}.ul-card__container{background:#fff;border-radius:6px;display:flex;flex-direction:column;flex-grow:1;flex:1 1 auto;font-size:17px;line-height:23px;padding:0;min-height:0;position:relative;text-align:center;word-break:normal;overflow:auto}.ul-card__container--desktop_feedbackButton{box-shadow:unset}.ul-card-vertical__button-wrapper{flex-direction:column;align-items:center}.ul-card__button-wrapper{margin-top:4px;display:flex;gap:16px;justify-content:center;align-self:stretch}.sprig-question-footer-container{align-items:center;width:100%;height:fit-content;display:flex;flex-direction:column;padding:12px 20px 0}.long-form-question-footer-container{position:fixed;bottom:0;left:0;width:100%;display:flex;justify-content:space-between;align-items:center;overflow:visible;z-index:1000;pointer-events:none;padding:32px}.long-form-question-footer-container--mobile{background-color:#fff;border-top:1px solid #e6e6e6;padding:16px 24px}.long-form-question-footer-container-center{justify-content:center}.long-form-question-footer-container .long-form-question-footer-container-logo{width:auto;pointer-events:auto}.long-form-question-footer-container-center .long-form-question-footer-container-logo{margin-left:0}.long-form-question-footer-container .long-form-question-footer-container-actions{display:flex;gap:8px;pointer-events:auto}.long-form-question-footer-container .long-form-question-footer-container-actions .long-form-button{display:flex;justify-content:center;align-items:center;gap:8px;padding:12px;border-radius:8px;height:40px;width:40px}.long-form-question-footer-container .long-form-question-footer-container-actions .long-form-button .long-form-button-text-container{display:flex;align-items:center}.ul-rich-text-body{min-height:2em}.ul-rich-text-body,.ul-rich-text-body p{margin-top:10px;margin-bottom:10px}.ul-rich-text-body li{margin:5px 0}.ul-rich-text-body p,.ul-rich-text-body li{font-size:15px;line-height:130.35%;letter-spacing:.02em;color:#343442;text-align:start;white-space:pre-line}.ul-rich-text-body:last-child,.ul-rich-text-body li:last-child{margin-bottom:15px}.ul-card-main-content__link,.ul-card-main-content__email,.ul-card-main-content__web,.ul-card-main-content__android,.ul-card-main-content__ios{display:flex;flex:1 1 auto;min-height:0;flex-direction:column;z-index:2;height:fit-content}.sprig-border-bottom{border-bottom:1px solid rgba(0,0,0,.1)}.sprig-border-top{border-top:1px solid rgba(0,0,0,.1)}.question-header-container{z-index:1}.sprig-header-container{padding:16px}.question-header-button-container{display:grid;grid-template-columns:97fr 3fr;align-items:center;justify-content:space-between;width:100%;height:fit-content}.ul-card--thanks-content .question-header-button-container{justify-content:center}.sprig-question-body{padding:0 20px;min-height:0;flex-shrink:1;overflow:auto;position:relative;align-self:stretch;width:100%}.sprig-stretch{align-self:stretch}.ul-question{color:#343442;display:block;font-size:17px;line-height:125%;font-weight:500;cursor:default;text-align:start}.ul-question ol,.ul-question ul,.ul-caption ol,.ul-caption ul{margin-left:1em}.ul-caption{flex:1 0 auto;font-size:14px;line-height:130.35%;letter-spacing:.02em;color:#6c6c6e;text-align:start;margin-top:4px}.ul-card__choices{margin:5px 0 0;flex:1 0}.choice--mobile{border:2px solid #e6e6e6}.choice--desktop{border:1px solid #e6e6e6}.choice{align-items:flex-start;color:#262136;cursor:pointer;display:flex;justify-content:flex-start;flex-direction:column;box-sizing:border-box;border-radius:3px;margin-bottom:7px;font-size:15px;line-height:20px;padding:10px 20px 10px 15px;background-color:#00000003}.choice--desktop:hover,.choice--desktop:active,.choice--mobile:active{background-color:#0000000d}.choice-label-container{align-items:center;display:flex;flex-direction:row;flex:0 0 fit-content;gap:15px;height:fit-content;justify-content:flex-start;width:100%}.choice-text-entry-container{width:100%;height:fit-content;flex:0 1 fit-content;overflow:hidden}.choice .choice-text-input--mobile{max-height:63px}.choice .choice-text-input--desktop{max-height:150px}.choice .choice-text-input{box-sizing:border-box;background-color:transparent;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:20px;max-height:60px;padding:0;margin-top:8px;resize:none;width:100%;font-size:14px;line-height:20px;outline:none;border:none;overflow-wrap:break-word}.choice .choice-text-input::placeholder{color:#6c6c6e80}.ul-thanks-check{text-align:center;margin-bottom:20px}.ul-card--thanks-content{padding:20px 0 10px}.ul-card--thanks .ul-question{padding-top:0;text-align:center}.ul-card--thanks .ul-caption{padding-top:0;text-align:center;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;hyphenate-limit-lines:no-limit}.ul-card--uploading .ul-question{padding-top:15px;text-align:center}.ul-card--uploading .ul-caption{padding-top:5px;text-align:center;overflow-wrap:break-word}.select-checkbox{height:16px;width:16px;display:flex;box-sizing:border-box;background-color:"transparent";align-items:center;justify-content:center;border-radius:4px;border:1px solid #b0b5b7;flex-shrink:0}.select-radio{height:16px;width:16px;border-radius:16px;border:1px solid #323232;display:flex;box-sizing:border-box;box-shadow:inset 2px 2px #0000001a;background-color:"transparent";align-items:center;justify-content:center}.footer{width:100%;margin-top:12px;font-size:12px;line-height:12px;color:#000000b3}[class^=CenteredSurveyLayout] .ul-header__container,[class^=QuestionConceptTestLayout] .ul-header__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{margin-bottom:unset}[class^=CenteredSurveyLayout] .ul-card__container,[class^=QuestionConceptTestLayout] .ul-card__container,.ul-websurvey-frame .ul-card__container,.ul-websurvey-frame-mobile .ul-card__container{align-self:center;box-shadow:unset;border-radius:unset;border:none!important;position:unset;width:100%}@media only screen and (min-height: 600px) and (width: 600px){.ul-card{position:relative;top:-20px}}.ul-vertical-centered-container{display:flex;flex-direction:column;align-items:center;align-self:stretch}.sprig-accordion{width:100%;margin-bottom:8px}.sprig-accordion-body{width:100%;overflow:hidden}.sprig-accordion-header-container{background:transparent;border:none;display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;cursor:pointer;margin:8px 0 0;padding:0;font-family:inherit}.sprig-header-label-container{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:8px;flex:1 1 0}.sprig-header-label{color:#343442;font-size:15px;font-weight:590;line-height:21px;text-align:start;overflow:hidden}.sprig-check-background{flex:0 0 16px;height:16px;width:16px;border-radius:8px;margin-right:8px;background-color:#efefee;display:flex;align-items:center;justify-content:center}.sprig-check{height:9px;width:9px;margin-left:-1px}.sprig-check path{stroke:#506067;stroke-width:1.5}.sprig-caret{height:20px;width:20px;transition-property:transform}.sprig-caret path{stroke:#000}.ul-card-longform__submit-button-container{display:flex;justify-content:flex-end}.ul-card-longform__submit-button-container .ul-card-longform__submit-button{display:flex;flex-direction:row;align-items:center;white-space:nowrap;gap:4px;border-radius:8px;color:#fff;cursor:pointer}.ul-card-longform__submit-button-container .ul-card-longform__submit-button:disabled{opacity:.5;cursor:not-allowed}.ul-card-list-container--longform{display:flex;flex-direction:column;gap:2rem;width:100%;align-items:center;padding-block-start:calc(40vh - 100px);padding-block-end:calc(50vh - 100px);height:auto}@media (min-height: 1200px){.ul-card-list-container--longform{padding-block-start:calc(50vh - 100px)}}.ul-card-scroll-wrapper{width:100%;max-width:100vw;position:relative;display:flex;justify-content:center}.ul-card--unfocused{opacity:.3;transition:opacity .3s ease-in-out}.ul-consent-legal__name-input--mobile{border:2px solid #e6e6e6}.ul-consent-legal__name-input--desktop{border:1px solid #e6e6e6}.ul-consent-legal__name-input{background:#00000003;box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;padding:10px 20px 10px 15px;border-radius:3px;font-size:15px;line-height:20px;margin-bottom:7px;width:100%}.ul-consent-legal__name-input::placeholder{color:#6c6c6e80}.ul-consent-legal__name-input:focus{outline:none;background:#fff}.ul-consent-legal__name-input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__consent-legal .choice{font-size:15px;padding:10px 15px;background-color:#00000003}.ul-card__consent-legal .choice--desktop:hover,.ul-card__consent-legal .choice--desktop:active,.ul-card__consent-legal .choice--mobile:active{background-color:#0000000d}.ul-card--likert__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.ul-card--likert__numbers>button{padding:unset}.likert-number--mobile{border:2px solid #e6e6e6}.likert-number--mobile:not(:first-child){margin-inline-start:-2px}.likert-number--desktop{border:1px solid #e6e6e6}.likert-number--desktop:not(:first-child){margin-inline-start:-1px}.likert-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px}.likert-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.likert-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.likert-number:active,.likert-number--desktop:hover{background-color:#0000000d;font-weight:500}.likert-star--mobile:not(:first-child){margin-inline-start:-2px}.likert-star--desktop:not(:first-child){margin-inline-start:-1px}.likert-star{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;font-size:18px;line-height:24px;height:67px;background:unset;border:unset}.likert-smiley--mobile:not(:first-child){margin-inline-start:-2px}.likert-smiley--desktop:not(:first-child){margin-inline-start:-1px}.likert-smiley{align-items:center;cursor:pointer;display:flex;justify-content:space-between;flex:1 0;color:transparent;line-height:24px;height:67px;background:unset;border:unset}.likert-smiley>svg{margin:0 auto}.likert-smiley circle:not(:first-child){fill-opacity:1}.ul-card--likert__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card--likert__labels>span:last-child{margin-left:auto;flex:1 1 auto;min-width:0;text-align:right}.ul-card--matrix_grid{display:grid;grid-template-columns:max-content repeat(var(--numColumns),minmax(107px,1fr));grid-template-rows:repeat(var(--numRows),min-content);margin:0 auto;row-gap:4px;width:max-content}.ul-card--matrix_grid_longform{width:100%}.ul-matrix-row-options{display:grid;grid-column:2/-1;grid-template-columns:subgrid}.ul-matrix-column-label{font-size:15px;max-width:150px;padding:10px 12px;text-align:center}.ul-card--matrix_container{margin-bottom:16px;overflow:auto}.ul-card--matrix_question_container{display:flex;flex-direction:column}.ul-matrix-scroll-gradient{-webkit-mask-image:linear-gradient(90deg,#000 90%,transparent);mask-image:linear-gradient(90deg,#000 90%,transparent)}.ul-matrix-scroll-gradient:dir(rtl){-webkit-mask-image:linear-gradient(270deg,#000,90%,transparent);mask-image:linear-gradient(270deg,#000,90%,transparent)}.ul-matrix-scroll-gradient:dir(rtl)+.ul-matrix-scroll-arrow{rotate:180deg}.ul-matrix-scroll-arrow{align-self:flex-end;background:none;border:none;color:#000;padding:0;position:absolute;top:45%}.ul-matrix-scroll-arrow:hover{cursor:pointer}.ul-matrix-option-wrapper{align-items:center;background:#f9f9f8;display:flex;justify-content:center;padding:10px 12px}.ul-matrix-last-option{border-start-end-radius:4px;border-end-end-radius:4px}.ul-matrix-row-label{align-items:center;background:#f9f9f8;border-end-start-radius:4px;border-start-start-radius:4px;display:flex;font-size:15px;left:0;right:0;max-width:200px;min-width:100px;padding:10px 12px;position:sticky}.ul-matrix-option-selected{border:6px solid var(--border);box-shadow:none}.ul-card__matrix{max-width:100%}.select-label{cursor:pointer;flex:1;overflow-wrap:anywhere;text-align:start}.ul-card--nps__numbers{align-items:center;border-radius:5px;display:flex;flex-direction:row;flex:1 0;justify-content:center;margin:5px 0 0}.nps-number--mobile{border:2px solid #e6e6e6}.nps-number--mobile:not(:first-child){margin-inline-start:-2px}.nps-number--desktop{border:1px solid #e6e6e6}.nps-number--desktop:not(:first-child){margin-inline-start:-1px}.nps-number{align-items:center;cursor:pointer;display:flex;justify-content:center;flex:1 0;background-color:#00000003;font-size:18px;line-height:24px;height:67px;padding:unset}.nps-number:first-child{border-start-start-radius:5px;border-end-start-radius:5px}.nps-number:last-child{border-start-end-radius:5px;border-end-end-radius:5px}.nps-number:active,.nps-number--desktop:hover{background-color:#0000000d;font-weight:500}.ul-card--nps__labels{align-items:center;color:#262136;display:flex;flex-direction:row;flex:1 0;font-weight:500;font-size:13px;line-height:15px;justify-content:space-between;margin:7px 0 10px}.ul-card-rank__labels{font-size:14px;font-style:normal;font-weight:600;line-height:150%}.ul-card--rank__question-inner-container{padding:0 16px}.ul-card-rank__list{list-style-type:none;padding-inline-start:0;margin:4px 0}.ul-card-rank__option{display:flex;align-items:center;padding:8px;gap:8px;align-self:stretch;border:1px solid #e2e3e1;border-radius:8px;margin-bottom:4px}.ul-card-rank__option:last-child{margin-bottom:0}.ul-card-rank__drag-btn{display:inline-flex;align-items:center;justify-content:center;line-height:0;padding:0;width:25px;height:25px;margin-left:auto;color:#0b2330;cursor:grab;background:transparent;border:0}.ul-card-rank__drag-btn:active,.ul-card-rank__option:active{cursor:grabbing}.ul-card-rank__option svg{display:block}.ul-card-rank__option.is-dragging{opacity:1;box-shadow:0 8px 25px #00000026,0 3px 10px #0000001a;z-index:1000;background:#fff;border-color:#0b2330;transition:none}.ul-card-rank__option.is-drop-target{background:#0b23301a;border-radius:8px;border-color:#0b23301a}.ul-card-rank__option.is-drop-target select,.ul-card-rank__option.is-drop-target span,.ul-card-rank__option.is-drop-target button{visibility:hidden}.ul-card-rank__option span{font-size:14px;font-weight:400;pointer-events:none}.ul-card-rank__select{appearance:none;-webkit-appearance:none;-moz-appearance:none;box-sizing:border-box;height:25px;min-height:25px;border:1px solid #E2E3E1;border-radius:4px;font-size:14px;line-height:1.4;padding:2px 28px 2px 8px;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='13' viewBox='0 0 12 13' fill='none'><path d='M9.75 5L6 8.75L2.25 5' stroke='%230B2330' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");background-repeat:no-repeat;background-position:right 8px center;background-size:12px 12px;background-color:#fff;cursor:pointer;pointer-events:auto}.ul-card-rank__select.ul-card-rank__select--placeholder{color:#b0b5b7}.ul-card-text{margin-top:2px;margin-bottom:3px;display:flex;flex-direction:column;justify-content:center;padding:0;width:100%}.ul-card-text__container{align-items:center;box-sizing:border-box;border-radius:3px;display:flex;justify-content:center;margin-bottom:12px;flex:1 0 100%}.ul-card-text__input--mobile{border:2px solid #e6e6e6;max-height:63px}.ul-card-text__input--desktop{border:1px solid #e6e6e6;max-height:150px}.ul-card-text__input{background:#00000003;box-sizing:border-box;color:#343442;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;min-height:63px;overflow:auto;padding:12px;resize:none;width:100%;border-radius:3px;font-size:15px;line-height:20px;overflow-wrap:break-word}.ul-card-text__input::placeholder{color:#6c6c6e80}.ul-card-text__input:focus{outline:none;background:#fff}.ul-card-text__input--desktop:hover:not(:focus){background-color:#0000000d}.ul-card__text-url-prompt-button{text-decoration:none;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:-webkit-fill-available}#ul-card-video__player_recorder{width:100%;width:-moz-available;width:-webkit-fill-available;width:fill-available}.ul-card-record__task{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}#ul-record-task-upload-progress,#ul-record-task-video-preview{width:100%;height:150px}.ul-permission-graphics-container{width:100%;height:150px;background-color:#0000000d;text-align:center;flex-direction:column;margin-left:auto;margin-right:auto;border-radius:5px;display:flex;align-items:center;font-size:15px;color:#000000b3}.ul-av-permission-denied-paragraph{margin:auto 15px;font-size:12px}.ul-av-permission-denied-headline{font-size:14px;color:#262136;text-decoration:underline;font-size:12px}.ul-permission-body{color:#000;margin:5px auto 5px 5px;line-height:135%;text-align:center}.ul-select-tab-container{width:240px;height:46px;background:#fff;border-radius:5px;text-align:start;align-items:center;display:flex;padding:0 5px;margin-top:20px;margin-bottom:auto}.ul-select-tab-text{color:#4b575d;margin:5px;line-height:135%;text-align:center}button.ul-task-skip-button{color:#000;background-color:#fff}#ul-task-detail-container{margin-top:0;margin-bottom:0;overflow:auto}#ul-task-detail-container.ul-rich-text-body p,#ul-task-detail-container.ul-rich-text-body li,#ul-task-detail-container.ul-rich-text-body{color:#4c4c4c}#ul-task-detail-container :first-child{margin-top:0}#ul-task-detail-container :last-child{margin-bottom:20px}.ul-horizontal-button-container{width:100%;display:flex;flex-direction:row}.ul-skip-button-below{margin-top:5px}.ul-horizontal-button-container-center{justify-content:center}.ul-vertical-button-container-center{display:flex;flex-direction:column;align-items:center}.ul-horizontal-button-container-left{justify-content:flex-start}.ul_recorded-task-inset-spacing{margin-top:5px;margin-bottom:24px}.ul_permission_svg_container{justify-content:center}.ul-card-text__button{background-color:var(--theme);border-radius:3px;border:none;color:#fff;cursor:pointer;font-size:15px;font-weight:500;line-height:18px;padding:10.5px 21px}.ul-card-text__button:disabled,.ul-card-text__button.sprig-button-disabled{background-color:#0000001a;color:#0003}.ul-card-text__button:disabled>svg path,.ul-card-text__button.sprig-button-disabled>svg path{stroke:#0003}.ul-card-text__button.ul-button-inactive{background-color:#fff!important;color:#5d696f!important}.ul-card-skip__button{color:#00000080;background:none;border:none;font-size:15px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;cursor:pointer}.ul-card-button-group{align-items:center;display:flex;gap:15px;justify-content:center;flex-direction:column}.select-button{align-items:center;background-color:transparent;border-radius:8px;border:1px solid #0b2330;box-shadow:0 0 0 2px #c8cccc;cursor:pointer;display:flex;font-size:15px;justify-content:space-between;margin-bottom:8px;padding:4px 8px 4px 16px;width:100%}.select-button:hover{background-color:#f3f3f3}.select-button:active{background-color:#eee}.select-button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select-button.select-button-placeholder{color:#b0b5b7}.select-button svg{flex-shrink:0}.select-list{position:relative;height:fit-content;padding:4px 0;z-index:100;background-color:#fff;border:1px solid #E2E3E1;box-shadow:0 16px 24px #0b23300d,0 4px 12px #0b233008;border-radius:8px;overflow-y:scroll;width:100%}.select-option{align-items:center;cursor:pointer;display:flex;font-size:15px;gap:16px;line-height:20px;padding:8px 16px}.select-option:hover{background-color:#f3f3f3}html,body{cursor:default;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;height:100%;overflow:hidden;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-webkit-touch-callout:none}b{font-weight:500}form{margin-block-end:0;margin-block-start:0}#ul-app{opacity:0;width:100%;flex-grow:2;display:flex}#ul-app.ul-app--overlay{position:absolute;bottom:0;transition:opacity .1s ease-out;transition-delay:.1s}#ul-app.ul-app--visible{opacity:1;bottom:0}.ul-app__container{width:100%;display:flex;flex-direction:column;max-height:100vh}.ul-header__container{margin-bottom:15px}.ul-header{align-items:center;background:repeating-linear-gradient(120deg,#ebebeb,#ebebeb 24px,#fff 24px,#fff 48px);border-bottom:2px solid #ebebeb;display:flex;font-size:14px;font-weight:500;height:40px;justify-content:center;width:100%}.ul-footer{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;margin-top:auto;flex-grow:0;width:100%;min-height:10px;height:fit-content;flex-shrink:0}.ul-footer>.yellow-footer-logo{background:#fad133;border:1px solid #f9c600;border-radius:14px;padding:6px 12px}.ul-footer>.yellow-footer-logo:hover{background:#f9c600}.ul-footer .thank-you-card-link{background:#00000003;border:1px solid #e6e6e6;border-radius:8px;cursor:pointer;display:inline-flex;font-size:14px;gap:12px;margin-bottom:15px;padding:12px;text-align:initial;width:280px}.ul-footer .thank-you-card-link:hover{background:#00000008}.ul-footer>a{color:inherit}.ul-footer-bubble{display:inline-block;margin:0 3px;width:7px;height:7px;border-radius:3px;border:1px solid transparent}.sprig-box-logo{background:#f9c600;border-radius:5px;display:flex;padding:4px}.close-container{display:flex;justify-content:flex-end;width:100%;height:0}.close-btn{cursor:pointer;height:16px;margin-inline-end:-10px;position:relative;top:-10px;width:16px;z-index:1;align-self:flex-start;justify-self:end;flex-shrink:0}.ul-app__container{transition:opacity .3s ease-out}.ul-center-horizontally{text-align:center}.ul-progress-bar-container{width:100%;height:2px;background-color:#0000001a;border-radius:2px}.ul-progress-bar-container__footer{max-width:250px;margin:16px 0}.ul-progress-bar-container__header{position:fixed;top:80px;max-width:unset;margin:0;z-index:3}.ul-progress-bar-current{transition:width 1s ease;width:0%;height:0;border-radius:2px}.prototype-button{align-self:stretch;background:#00000003;border:1.5px solid #e6e6e6;border-radius:4px 0 0 4px;flex:none;flex-grow:0;height:fit-content;line-height:16.5px;margin:0 20px;padding:20px 0;font-size:14px;font-family:inherit;text-decoration:underline}.prototype-button:hover{cursor:pointer}` }), e.customStyles && fr({ document: p, elementId: "ul-custom-style", styleString: e.customStyles, nonce: e.styleNonce }), e.fontFamily && a && parent) {
|
|
2250
|
-
const g = p.createElement("link");
|
|
2251
|
-
g.rel = "stylesheet", g.href = a, h.appendChild(g);
|
|
2252
|
-
}
|
|
2253
|
-
const b = o || ((y = s.eventEmitter) == null ? void 0 : y.emit);
|
|
2254
|
-
b == null || b("verify.view.version", { "view.version": "2.36.1" }), u && t && (Ye(l(al, {}, void 0, 0, { fileName: "/Users/michael.rogachevsky/Code/sdk/platform/web/src/view/view.tsx", lineNumber: 203, columnNumber: 12 }, this), u), it.once(me.SurveyClosed, () => {
|
|
2255
|
-
or(u);
|
|
2256
|
-
}));
|
|
2257
|
-
} };
|
|
2258
|
-
export {
|
|
2259
|
-
dl as default
|
|
2260
|
-
};
|