@sprig-technologies/sprig-bundled 1.1.8 → 2.35.0
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-MkVSshrN.cjs → index-Clr9gLre.cjs} +2 -3
- package/dist/{index-BnOajwL7.js → index-D8ZoPLNT.js} +4 -5
- package/dist/index.cjs +1 -2
- package/dist/index.d.ts +42 -13
- package/dist/index.js +1 -2
- package/dist/view-DNRNShTq.js +2039 -0
- package/dist/view-DkgdLDj2.cjs +12 -0
- package/package.json +1 -1
- package/dist/index-BnOajwL7.js.map +0 -1
- package/dist/index-MkVSshrN.cjs.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/view-UeZsENA_.js +0 -1960
- package/dist/view-UeZsENA_.js.map +0 -1
- package/dist/view-VQ3LPBC1.cjs +0 -13
- package/dist/view-VQ3LPBC1.cjs.map +0 -1
package/dist/view-UeZsENA_.js
DELETED
|
@@ -1,1960 +0,0 @@
|
|
|
1
|
-
import { e as _e, A as pe, s as Ee, D as _r, c as br, S as G, a as Ve, C as ht, b as ft, d as vr, i as yr, E as xr, f as be, g as K, h as Xe, j as kr, r as wr, v as gt, k as _t } from "./index-BnOajwL7.js";
|
|
2
|
-
var ke, M, rn, ae, bt, on, $e, sn, xe = {}, an = [], Cr = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, qe = Array.isArray;
|
|
3
|
-
function ee(e, t) {
|
|
4
|
-
for (var n in t) e[n] = t[n];
|
|
5
|
-
return e;
|
|
6
|
-
}
|
|
7
|
-
function ln(e) {
|
|
8
|
-
var t = e.parentNode;
|
|
9
|
-
t && t.removeChild(e);
|
|
10
|
-
}
|
|
11
|
-
function Z(e, t, n) {
|
|
12
|
-
var r, o, i, s = {};
|
|
13
|
-
for (i in t) i == "key" ? r = t[i] : i == "ref" ? o = t[i] : s[i] = t[i];
|
|
14
|
-
if (arguments.length > 2 && (s.children = arguments.length > 3 ? ke.call(arguments, 2) : n), typeof e == "function" && e.defaultProps != null) for (i in e.defaultProps) s[i] === void 0 && (s[i] = e.defaultProps[i]);
|
|
15
|
-
return ve(e, s, r, o, null);
|
|
16
|
-
}
|
|
17
|
-
function ve(e, t, n, r, o) {
|
|
18
|
-
var i = { type: e, props: t, key: n, ref: r, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: o ?? ++rn, __i: -1, __u: 0 };
|
|
19
|
-
return o == null && M.vnode != null && M.vnode(i), i;
|
|
20
|
-
}
|
|
21
|
-
function cn() {
|
|
22
|
-
return { current: null };
|
|
23
|
-
}
|
|
24
|
-
function B(e) {
|
|
25
|
-
return e.children;
|
|
26
|
-
}
|
|
27
|
-
function Y(e, t) {
|
|
28
|
-
this.props = e, this.context = t;
|
|
29
|
-
}
|
|
30
|
-
function me(e, t) {
|
|
31
|
-
if (t == null) return e.__ ? me(e.__, e.__i + 1) : null;
|
|
32
|
-
for (var n; t < e.__k.length; t++) if ((n = e.__k[t]) != null && n.__e != null) return n.__e;
|
|
33
|
-
return typeof e.type == "function" ? me(e) : null;
|
|
34
|
-
}
|
|
35
|
-
function un(e) {
|
|
36
|
-
var t, n;
|
|
37
|
-
if ((e = e.__) != null && e.__c != null) {
|
|
38
|
-
for (e.__e = e.__c.base = null, t = 0; t < e.__k.length; t++) if ((n = e.__k[t]) != null && n.__e != null) {
|
|
39
|
-
e.__e = e.__c.base = n.__e;
|
|
40
|
-
break;
|
|
41
|
-
}
|
|
42
|
-
return un(e);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
function ze(e) {
|
|
46
|
-
(!e.__d && (e.__d = !0) && ae.push(e) && !Le.__r++ || bt !== M.debounceRendering) && ((bt = M.debounceRendering) || on)(Le);
|
|
47
|
-
}
|
|
48
|
-
function Le() {
|
|
49
|
-
var e, t, n, r, o, i, s, l, c;
|
|
50
|
-
for (ae.sort($e); e = ae.shift(); ) e.__d && (t = ae.length, r = void 0, i = (o = (n = e).__v).__e, l = [], c = [], (s = n.__P) && ((r = ee({}, o)).__v = o.__v + 1, M.vnode && M.vnode(r), et(s, r, o, n.__n, s.ownerSVGElement !== void 0, 32 & o.__u ? [i] : null, l, i ?? me(o), !!(32 & o.__u), c), r.__.__k[r.__i] = r, mn(l, r, c), r.__e != i && un(r)), ae.length > t && ae.sort($e));
|
|
51
|
-
Le.__r = 0;
|
|
52
|
-
}
|
|
53
|
-
function dn(e, t, n, r, o, i, s, l, c, p, m) {
|
|
54
|
-
var u, d, h, g, x, y = r && r.__k || an, k = t.length;
|
|
55
|
-
for (n.__d = c, function(b, S, E) {
|
|
56
|
-
var f, v, _, N, I, P = S.length, C = E.length, w = C, L = 0;
|
|
57
|
-
for (b.__k = [], f = 0; f < P; f++) (v = b.__k[f] = (v = S[f]) == null || typeof v == "boolean" || typeof v == "function" ? null : typeof v == "string" || typeof v == "number" || typeof v == "bigint" || v.constructor == String ? ve(null, v, null, null, v) : qe(v) ? ve(B, { children: v }, null, null, null) : v.constructor === void 0 && v.__b > 0 ? ve(v.type, v.props, v.key, v.ref ? v.ref : null, v.__v) : v) != null ? (v.__ = b, v.__b = b.__b + 1, I = Sr(v, E, N = f + L, w), v.__i = I, _ = null, I !== -1 && (w--, (_ = E[I]) && (_.__u |= 131072)), _ == null || _.__v === null ? (I == -1 && L--, typeof v.type != "function" && (v.__u |= 65536)) : I !== N && (I === N + 1 ? L++ : I > N ? w > P - N ? L += I - N : L-- : L = I < N && I == N - 1 ? I - N : 0, I !== f + L && (v.__u |= 65536))) : (_ = E[f]) && _.key == null && _.__e && (_.__e == b.__d && (b.__d = me(_)), Qe(_, _, !1), E[f] = null, w--);
|
|
58
|
-
if (w) for (f = 0; f < C; f++) (_ = E[f]) != null && !(131072 & _.__u) && (_.__e == b.__d && (b.__d = me(_)), Qe(_, _));
|
|
59
|
-
}(n, t, y), c = n.__d, u = 0; u < k; u++) (h = n.__k[u]) != null && typeof h != "boolean" && typeof h != "function" && (d = h.__i === -1 ? xe : y[h.__i] || xe, h.__i = u, et(e, h, d, o, i, s, l, c, p, m), g = h.__e, h.ref && d.ref != h.ref && (d.ref && tt(d.ref, null, h), m.push(h.ref, h.__c || g, h)), x == null && g != null && (x = g), 65536 & h.__u || d.__k === h.__k ? c = pn(h, c, e) : typeof h.type == "function" && h.__d !== void 0 ? c = h.__d : g && (c = g.nextSibling), h.__d = void 0, h.__u &= -196609);
|
|
60
|
-
n.__d = c, n.__e = x;
|
|
61
|
-
}
|
|
62
|
-
function pn(e, t, n) {
|
|
63
|
-
var r, o;
|
|
64
|
-
if (typeof e.type == "function") {
|
|
65
|
-
for (r = e.__k, o = 0; r && o < r.length; o++) r[o] && (r[o].__ = e, t = pn(r[o], t, n));
|
|
66
|
-
return t;
|
|
67
|
-
}
|
|
68
|
-
return e.__e != t && (n.insertBefore(e.__e, t || null), t = e.__e), t && t.nextSibling;
|
|
69
|
-
}
|
|
70
|
-
function te(e, t) {
|
|
71
|
-
return t = t || [], e == null || typeof e == "boolean" || (qe(e) ? e.some(function(n) {
|
|
72
|
-
te(n, t);
|
|
73
|
-
}) : t.push(e)), t;
|
|
74
|
-
}
|
|
75
|
-
function Sr(e, t, n, r) {
|
|
76
|
-
var o = e.key, i = e.type, s = n - 1, l = n + 1, c = t[n];
|
|
77
|
-
if (c === null || c && o == c.key && i === c.type) return n;
|
|
78
|
-
if (r > (c == null || 131072 & c.__u ? 0 : 1)) for (; s >= 0 || l < t.length; ) {
|
|
79
|
-
if (s >= 0) {
|
|
80
|
-
if ((c = t[s]) && !(131072 & c.__u) && o == c.key && i === c.type) return s;
|
|
81
|
-
s--;
|
|
82
|
-
}
|
|
83
|
-
if (l < t.length) {
|
|
84
|
-
if ((c = t[l]) && !(131072 & c.__u) && o == c.key && i === c.type) return l;
|
|
85
|
-
l++;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
return -1;
|
|
89
|
-
}
|
|
90
|
-
function vt(e, t, n) {
|
|
91
|
-
t[0] === "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || Cr.test(t) ? n : n + "px";
|
|
92
|
-
}
|
|
93
|
-
function Se(e, t, n, r, o) {
|
|
94
|
-
var i;
|
|
95
|
-
e: if (t === "style") if (typeof n == "string") e.style.cssText = n;
|
|
96
|
-
else {
|
|
97
|
-
if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || vt(e.style, t, "");
|
|
98
|
-
if (n) for (t in n) r && n[t] === r[t] || vt(e.style, t, n[t]);
|
|
99
|
-
}
|
|
100
|
-
else if (t[0] === "o" && t[1] === "n") i = 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 + i] = n, n ? r ? n.u = r.u : (n.u = Date.now(), e.addEventListener(t, i ? xt : yt, i)) : e.removeEventListener(t, i ? xt : yt, i);
|
|
101
|
-
else {
|
|
102
|
-
if (o) 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] = n ?? "";
|
|
105
|
-
break e;
|
|
106
|
-
} catch {
|
|
107
|
-
}
|
|
108
|
-
typeof n == "function" || (n == null || n === !1 && t[4] !== "-" ? e.removeAttribute(t) : e.setAttribute(t, n));
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
function yt(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 xt(e) {
|
|
119
|
-
return this.l[e.type + !0](M.event ? M.event(e) : e);
|
|
120
|
-
}
|
|
121
|
-
function et(e, t, n, r, o, i, s, l, c, p) {
|
|
122
|
-
var m, u, d, h, g, x, y, k, b, S, E, f, v, _, N, I = t.type;
|
|
123
|
-
if (t.constructor !== void 0) return null;
|
|
124
|
-
128 & n.__u && (c = !!(32 & n.__u), i = [l = t.__e = n.__e]), (m = M.__b) && m(t);
|
|
125
|
-
e: if (typeof I == "function") try {
|
|
126
|
-
if (k = t.props, b = (m = I.contextType) && r[m.__c], S = m ? b ? b.props.value : m.__ : r, n.__c ? y = (u = t.__c = n.__c).__ = u.__E : ("prototype" in I && I.prototype.render ? t.__c = u = new I(k, S) : (t.__c = u = new Y(k, S), u.constructor = I, u.render = Tr), b && b.sub(u), u.props = k, u.state || (u.state = {}), u.context = S, u.__n = r, d = u.__d = !0, u.__h = [], u._sb = []), u.__s == null && (u.__s = u.state), I.getDerivedStateFromProps != null && (u.__s == u.state && (u.__s = ee({}, u.__s)), ee(u.__s, I.getDerivedStateFromProps(k, u.__s))), h = u.props, g = u.state, u.__v = t, d) I.getDerivedStateFromProps == null && u.componentWillMount != null && u.componentWillMount(), u.componentDidMount != null && u.__h.push(u.componentDidMount);
|
|
127
|
-
else {
|
|
128
|
-
if (I.getDerivedStateFromProps == null && k !== h && u.componentWillReceiveProps != null && u.componentWillReceiveProps(k, S), !u.__e && (u.shouldComponentUpdate != null && u.shouldComponentUpdate(k, u.__s, S) === !1 || t.__v === n.__v)) {
|
|
129
|
-
for (t.__v !== n.__v && (u.props = k, u.state = u.__s, u.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.forEach(function(P) {
|
|
130
|
-
P && (P.__ = t);
|
|
131
|
-
}), E = 0; E < u._sb.length; E++) u.__h.push(u._sb[E]);
|
|
132
|
-
u._sb = [], u.__h.length && s.push(u);
|
|
133
|
-
break e;
|
|
134
|
-
}
|
|
135
|
-
u.componentWillUpdate != null && u.componentWillUpdate(k, u.__s, S), u.componentDidUpdate != null && u.__h.push(function() {
|
|
136
|
-
u.componentDidUpdate(h, g, x);
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
if (u.context = S, u.props = k, u.__P = e, u.__e = !1, f = M.__r, v = 0, "prototype" in I && I.prototype.render) {
|
|
140
|
-
for (u.state = u.__s, u.__d = !1, f && f(t), m = u.render(u.props, u.state, u.context), _ = 0; _ < u._sb.length; _++) u.__h.push(u._sb[_]);
|
|
141
|
-
u._sb = [];
|
|
142
|
-
} else do
|
|
143
|
-
u.__d = !1, f && f(t), m = u.render(u.props, u.state, u.context), u.state = u.__s;
|
|
144
|
-
while (u.__d && ++v < 25);
|
|
145
|
-
u.state = u.__s, u.getChildContext != null && (r = ee(ee({}, r), u.getChildContext())), d || u.getSnapshotBeforeUpdate == null || (x = u.getSnapshotBeforeUpdate(h, g)), dn(e, qe(N = m != null && m.type === B && m.key == null ? m.props.children : m) ? N : [N], t, n, r, o, i, s, l, c, p), u.base = t.__e, t.__u &= -161, u.__h.length && s.push(u), y && (u.__E = u.__ = null);
|
|
146
|
-
} catch (P) {
|
|
147
|
-
t.__v = null, c || i != null ? (t.__e = l, t.__u |= c ? 160 : 32, i[i.indexOf(l)] = null) : (t.__e = n.__e, t.__k = n.__k), M.__e(P, t, n);
|
|
148
|
-
}
|
|
149
|
-
else i == null && t.__v === n.__v ? (t.__k = n.__k, t.__e = n.__e) : t.__e = Ir(n.__e, t, n, r, o, i, s, c, p);
|
|
150
|
-
(m = M.diffed) && m(t);
|
|
151
|
-
}
|
|
152
|
-
function mn(e, t, n) {
|
|
153
|
-
t.__d = void 0;
|
|
154
|
-
for (var r = 0; r < n.length; r++) tt(n[r], n[++r], n[++r]);
|
|
155
|
-
M.__c && M.__c(t, e), e.some(function(o) {
|
|
156
|
-
try {
|
|
157
|
-
e = o.__h, o.__h = [], e.some(function(i) {
|
|
158
|
-
i.call(o);
|
|
159
|
-
});
|
|
160
|
-
} catch (i) {
|
|
161
|
-
M.__e(i, o.__v);
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
function Ir(e, t, n, r, o, i, s, l, c) {
|
|
166
|
-
var p, m, u, d, h, g, x, y = n.props, k = t.props, b = t.type;
|
|
167
|
-
if (b === "svg" && (o = !0), i != null) {
|
|
168
|
-
for (p = 0; p < i.length; p++) if ((h = i[p]) && "setAttribute" in h == !!b && (b ? h.localName === b : h.nodeType === 3)) {
|
|
169
|
-
e = h, i[p] = null;
|
|
170
|
-
break;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
if (e == null) {
|
|
174
|
-
if (b === null) return document.createTextNode(k);
|
|
175
|
-
e = o ? document.createElementNS("http://www.w3.org/2000/svg", b) : document.createElement(b, k.is && k), i = null, l = !1;
|
|
176
|
-
}
|
|
177
|
-
if (b === null) y === k || l && e.data === k || (e.data = k);
|
|
178
|
-
else {
|
|
179
|
-
if (i = i && ke.call(e.childNodes), y = n.props || xe, !l && i != null) for (y = {}, p = 0; p < e.attributes.length; p++) y[(h = e.attributes[p]).name] = h.value;
|
|
180
|
-
for (p in y) h = y[p], p == "children" || (p == "dangerouslySetInnerHTML" ? u = h : p === "key" || p in k || Se(e, p, null, h, o));
|
|
181
|
-
for (p in k) h = k[p], p == "children" ? d = h : p == "dangerouslySetInnerHTML" ? m = h : p == "value" ? g = h : p == "checked" ? x = h : p === "key" || l && typeof h != "function" || y[p] === h || Se(e, p, h, y[p], o);
|
|
182
|
-
if (m) l || u && (m.__html === u.__html || m.__html === e.innerHTML) || (e.innerHTML = m.__html), t.__k = [];
|
|
183
|
-
else if (u && (e.innerHTML = ""), dn(e, qe(d) ? d : [d], t, n, r, o && b !== "foreignObject", i, s, i ? i[0] : n.__k && me(n, 0), l, c), i != null) for (p = i.length; p--; ) i[p] != null && ln(i[p]);
|
|
184
|
-
l || (p = "value", g !== void 0 && (g !== e[p] || b === "progress" && !g || b === "option" && g !== y[p]) && Se(e, p, g, y[p], !1), p = "checked", x !== void 0 && x !== e[p] && Se(e, p, x, y[p], !1));
|
|
185
|
-
}
|
|
186
|
-
return e;
|
|
187
|
-
}
|
|
188
|
-
function tt(e, t, n) {
|
|
189
|
-
try {
|
|
190
|
-
typeof e == "function" ? e(t) : e.current = t;
|
|
191
|
-
} catch (r) {
|
|
192
|
-
M.__e(r, n);
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
function Qe(e, t, n) {
|
|
196
|
-
var r, o;
|
|
197
|
-
if (M.unmount && M.unmount(e), (r = e.ref) && (r.current && r.current !== e.__e || tt(r, null, t)), (r = e.__c) != null) {
|
|
198
|
-
if (r.componentWillUnmount) try {
|
|
199
|
-
r.componentWillUnmount();
|
|
200
|
-
} catch (i) {
|
|
201
|
-
M.__e(i, t);
|
|
202
|
-
}
|
|
203
|
-
r.base = r.__P = null, e.__c = void 0;
|
|
204
|
-
}
|
|
205
|
-
if (r = e.__k) for (o = 0; o < r.length; o++) r[o] && Qe(r[o], t, n || typeof e.type != "function");
|
|
206
|
-
n || e.__e == null || ln(e.__e), e.__ = e.__e = e.__d = void 0;
|
|
207
|
-
}
|
|
208
|
-
function Tr(e, t, n) {
|
|
209
|
-
return this.constructor(e, n);
|
|
210
|
-
}
|
|
211
|
-
function he(e, t, n) {
|
|
212
|
-
var r, o, i, s;
|
|
213
|
-
M.__ && M.__(e, t), o = (r = typeof n == "function") ? null : n && n.__k || t.__k, i = [], s = [], et(t, e = (!r && n || t).__k = Z(B, null, [e]), o || xe, xe, t.ownerSVGElement !== void 0, !r && n ? [n] : o ? null : t.firstChild ? ke.call(t.childNodes) : null, i, !r && n ? n : o ? o.__e : t.firstChild, r, s), mn(i, e, s);
|
|
214
|
-
}
|
|
215
|
-
function hn(e, t) {
|
|
216
|
-
he(e, t, hn);
|
|
217
|
-
}
|
|
218
|
-
function Nr(e, t, n) {
|
|
219
|
-
var r, o, i, s, l = ee({}, e.props);
|
|
220
|
-
for (i in e.type && e.type.defaultProps && (s = e.type.defaultProps), t) i == "key" ? r = t[i] : i == "ref" ? o = t[i] : l[i] = t[i] === void 0 && s !== void 0 ? s[i] : t[i];
|
|
221
|
-
return arguments.length > 2 && (l.children = arguments.length > 3 ? ke.call(arguments, 2) : n), ve(e.type, l, r || e.key, o || e.ref, null);
|
|
222
|
-
}
|
|
223
|
-
function fn(e, t) {
|
|
224
|
-
var n = { __c: t = "__cC" + sn++, __: e, Consumer: function(r, o) {
|
|
225
|
-
return r.children(o);
|
|
226
|
-
}, Provider: function(r) {
|
|
227
|
-
var o, i;
|
|
228
|
-
return this.getChildContext || (o = [], (i = {})[t] = this, this.getChildContext = function() {
|
|
229
|
-
return i;
|
|
230
|
-
}, this.shouldComponentUpdate = function(s) {
|
|
231
|
-
this.props.value !== s.value && o.some(function(l) {
|
|
232
|
-
l.__e = !0, ze(l);
|
|
233
|
-
});
|
|
234
|
-
}, this.sub = function(s) {
|
|
235
|
-
o.push(s);
|
|
236
|
-
var l = s.componentWillUnmount;
|
|
237
|
-
s.componentWillUnmount = function() {
|
|
238
|
-
o.splice(o.indexOf(s), 1), l && l.call(s);
|
|
239
|
-
};
|
|
240
|
-
}), r.children;
|
|
241
|
-
} };
|
|
242
|
-
return n.Provider.__ = n.Consumer.contextType = n;
|
|
243
|
-
}
|
|
244
|
-
ke = an.slice, M = { __e: function(e, t, n, r) {
|
|
245
|
-
for (var o, i, s; t = t.__; ) if ((o = t.__c) && !o.__) try {
|
|
246
|
-
if ((i = o.constructor) && i.getDerivedStateFromError != null && (o.setState(i.getDerivedStateFromError(e)), s = o.__d), o.componentDidCatch != null && (o.componentDidCatch(e, r || {}), s = o.__d), s) return o.__E = o;
|
|
247
|
-
} catch (l) {
|
|
248
|
-
e = l;
|
|
249
|
-
}
|
|
250
|
-
throw e;
|
|
251
|
-
} }, rn = 0, Y.prototype.setState = function(e, t) {
|
|
252
|
-
var n;
|
|
253
|
-
n = this.__s != null && this.__s !== this.state ? this.__s : this.__s = ee({}, this.state), typeof e == "function" && (e = e(ee({}, n), this.props)), e && ee(n, e), e != null && this.__v && (t && this._sb.push(t), ze(this));
|
|
254
|
-
}, Y.prototype.forceUpdate = function(e) {
|
|
255
|
-
this.__v && (this.__e = !0, e && this.__h.push(e), ze(this));
|
|
256
|
-
}, Y.prototype.render = B, ae = [], on = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, $e = function(e, t) {
|
|
257
|
-
return e.__v.__b - t.__v.__b;
|
|
258
|
-
}, Le.__r = 0, sn = 0;
|
|
259
|
-
var Er = 0;
|
|
260
|
-
function a(e, t, n, r, o, i) {
|
|
261
|
-
var s, l, c = {};
|
|
262
|
-
for (l in t) l == "ref" ? s = t[l] : c[l] = t[l];
|
|
263
|
-
var p = { type: e, props: c, key: n, ref: s, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: --Er, __i: -1, __u: 0, __source: o, __self: i };
|
|
264
|
-
if (typeof e == "function" && (s = e.defaultProps)) for (l in s) c[l] === void 0 && (c[l] = s[l]);
|
|
265
|
-
return M.vnode && M.vnode(p), p;
|
|
266
|
-
}
|
|
267
|
-
var ne, D, Ue, kt, fe = 0, gn = [], Ie = [], wt = M.__b, Ct = M.__r, St = M.diffed, It = M.__c, Tt = M.unmount;
|
|
268
|
-
function ce(e, t) {
|
|
269
|
-
M.__h && M.__h(D, e, fe || t), fe = 0;
|
|
270
|
-
var n = D.__H || (D.__H = { __: [], __h: [] });
|
|
271
|
-
return e >= n.__.length && n.__.push({ __V: Ie }), n.__[e];
|
|
272
|
-
}
|
|
273
|
-
function F(e) {
|
|
274
|
-
return fe = 1, nt(yn, e);
|
|
275
|
-
}
|
|
276
|
-
function nt(e, t, n) {
|
|
277
|
-
var r = ce(ne++, 2);
|
|
278
|
-
if (r.t = e, !r.__c && (r.__ = [n ? n(t) : yn(void 0, t), function(l) {
|
|
279
|
-
var c = r.__N ? r.__N[0] : r.__[0], p = r.t(c, l);
|
|
280
|
-
c !== p && (r.__N = [p, r.__[1]], r.__c.setState({}));
|
|
281
|
-
}], r.__c = D, !D.u)) {
|
|
282
|
-
var o = function(l, c, p) {
|
|
283
|
-
if (!r.__c.__H) return !0;
|
|
284
|
-
var m = r.__c.__H.__.filter(function(d) {
|
|
285
|
-
return d.__c;
|
|
286
|
-
});
|
|
287
|
-
if (m.every(function(d) {
|
|
288
|
-
return !d.__N;
|
|
289
|
-
})) return !i || i.call(this, l, c, p);
|
|
290
|
-
var u = !1;
|
|
291
|
-
return m.forEach(function(d) {
|
|
292
|
-
if (d.__N) {
|
|
293
|
-
var h = d.__[0];
|
|
294
|
-
d.__ = d.__N, d.__N = void 0, h !== d.__[0] && (u = !0);
|
|
295
|
-
}
|
|
296
|
-
}), !(!u && r.__c.props === l) && (!i || i.call(this, l, c, p));
|
|
297
|
-
};
|
|
298
|
-
D.u = !0;
|
|
299
|
-
var i = D.shouldComponentUpdate, s = D.componentWillUpdate;
|
|
300
|
-
D.componentWillUpdate = function(l, c, p) {
|
|
301
|
-
if (this.__e) {
|
|
302
|
-
var m = i;
|
|
303
|
-
i = void 0, o(l, c, p), i = m;
|
|
304
|
-
}
|
|
305
|
-
s && s.call(this, l, c, p);
|
|
306
|
-
}, D.shouldComponentUpdate = o;
|
|
307
|
-
}
|
|
308
|
-
return r.__N || r.__;
|
|
309
|
-
}
|
|
310
|
-
function A(e, t) {
|
|
311
|
-
var n = ce(ne++, 3);
|
|
312
|
-
!M.__s && ot(n.__H, t) && (n.__ = e, n.i = t, D.__H.__h.push(n));
|
|
313
|
-
}
|
|
314
|
-
function we(e, t) {
|
|
315
|
-
var n = ce(ne++, 4);
|
|
316
|
-
!M.__s && ot(n.__H, t) && (n.__ = e, n.i = t, D.__h.push(n));
|
|
317
|
-
}
|
|
318
|
-
function z(e) {
|
|
319
|
-
return fe = 5, re(function() {
|
|
320
|
-
return { current: e };
|
|
321
|
-
}, []);
|
|
322
|
-
}
|
|
323
|
-
function _n(e, t, n) {
|
|
324
|
-
fe = 6, we(function() {
|
|
325
|
-
return typeof e == "function" ? (e(t()), function() {
|
|
326
|
-
return e(null);
|
|
327
|
-
}) : e ? (e.current = t(), function() {
|
|
328
|
-
return e.current = null;
|
|
329
|
-
}) : void 0;
|
|
330
|
-
}, n == null ? n : n.concat(e));
|
|
331
|
-
}
|
|
332
|
-
function re(e, t) {
|
|
333
|
-
var n = ce(ne++, 7);
|
|
334
|
-
return ot(n.__H, t) ? (n.__V = e(), n.i = t, n.__h = e, n.__V) : n.__;
|
|
335
|
-
}
|
|
336
|
-
function le(e, t) {
|
|
337
|
-
return fe = 8, re(function() {
|
|
338
|
-
return e;
|
|
339
|
-
}, t);
|
|
340
|
-
}
|
|
341
|
-
function bn(e) {
|
|
342
|
-
var t = D.context[e.__c], n = ce(ne++, 9);
|
|
343
|
-
return n.c = e, t ? (n.__ == null && (n.__ = !0, t.sub(D)), t.props.value) : e.__;
|
|
344
|
-
}
|
|
345
|
-
function rt(e, t) {
|
|
346
|
-
M.useDebugValue && M.useDebugValue(t ? t(e) : e);
|
|
347
|
-
}
|
|
348
|
-
function vn() {
|
|
349
|
-
var e = ce(ne++, 11);
|
|
350
|
-
if (!e.__) {
|
|
351
|
-
for (var t = D.__v; t !== null && !t.__m && t.__ !== null; ) t = t.__;
|
|
352
|
-
var n = t.__m || (t.__m = [0, 0]);
|
|
353
|
-
e.__ = "P" + n[0] + "-" + n[1]++;
|
|
354
|
-
}
|
|
355
|
-
return e.__;
|
|
356
|
-
}
|
|
357
|
-
function Lr() {
|
|
358
|
-
for (var e; e = gn.shift(); ) if (e.__P && e.__H) try {
|
|
359
|
-
e.__H.__h.forEach(Te), e.__H.__h.forEach(We), e.__H.__h = [];
|
|
360
|
-
} catch (t) {
|
|
361
|
-
e.__H.__h = [], M.__e(t, e.__v);
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
M.__b = function(e) {
|
|
365
|
-
D = null, wt && wt(e);
|
|
366
|
-
}, M.__r = function(e) {
|
|
367
|
-
Ct && Ct(e), ne = 0;
|
|
368
|
-
var t = (D = e.__c).__H;
|
|
369
|
-
t && (Ue === D ? (t.__h = [], D.__h = [], t.__.forEach(function(n) {
|
|
370
|
-
n.__N && (n.__ = n.__N), n.__V = Ie, n.__N = n.i = void 0;
|
|
371
|
-
})) : (t.__h.forEach(Te), t.__h.forEach(We), t.__h = [], ne = 0)), Ue = D;
|
|
372
|
-
}, M.diffed = function(e) {
|
|
373
|
-
St && St(e);
|
|
374
|
-
var t = e.__c;
|
|
375
|
-
t && t.__H && (t.__H.__h.length && (gn.push(t) !== 1 && kt === M.requestAnimationFrame || ((kt = M.requestAnimationFrame) || Pr)(Lr)), t.__H.__.forEach(function(n) {
|
|
376
|
-
n.i && (n.__H = n.i), n.__V !== Ie && (n.__ = n.__V), n.i = void 0, n.__V = Ie;
|
|
377
|
-
})), Ue = D = null;
|
|
378
|
-
}, M.__c = function(e, t) {
|
|
379
|
-
t.some(function(n) {
|
|
380
|
-
try {
|
|
381
|
-
n.__h.forEach(Te), n.__h = n.__h.filter(function(r) {
|
|
382
|
-
return !r.__ || We(r);
|
|
383
|
-
});
|
|
384
|
-
} catch (r) {
|
|
385
|
-
t.some(function(o) {
|
|
386
|
-
o.__h && (o.__h = []);
|
|
387
|
-
}), t = [], M.__e(r, n.__v);
|
|
388
|
-
}
|
|
389
|
-
}), It && It(e, t);
|
|
390
|
-
}, M.unmount = function(e) {
|
|
391
|
-
Tt && Tt(e);
|
|
392
|
-
var t, n = e.__c;
|
|
393
|
-
n && n.__H && (n.__H.__.forEach(function(r) {
|
|
394
|
-
try {
|
|
395
|
-
Te(r);
|
|
396
|
-
} catch (o) {
|
|
397
|
-
t = o;
|
|
398
|
-
}
|
|
399
|
-
}), n.__H = void 0, t && M.__e(t, n.__v));
|
|
400
|
-
};
|
|
401
|
-
var Nt = typeof requestAnimationFrame == "function";
|
|
402
|
-
function Pr(e) {
|
|
403
|
-
var t, n = function() {
|
|
404
|
-
clearTimeout(r), Nt && cancelAnimationFrame(t), setTimeout(e);
|
|
405
|
-
}, r = setTimeout(n, 100);
|
|
406
|
-
Nt && (t = requestAnimationFrame(n));
|
|
407
|
-
}
|
|
408
|
-
function Te(e) {
|
|
409
|
-
var t = D, n = e.__c;
|
|
410
|
-
typeof n == "function" && (e.__c = void 0, n()), D = t;
|
|
411
|
-
}
|
|
412
|
-
function We(e) {
|
|
413
|
-
var t = D;
|
|
414
|
-
e.__c = e.__(), D = t;
|
|
415
|
-
}
|
|
416
|
-
function ot(e, t) {
|
|
417
|
-
return !e || e.length !== t.length || t.some(function(n, r) {
|
|
418
|
-
return n !== e[r];
|
|
419
|
-
});
|
|
420
|
-
}
|
|
421
|
-
function yn(e, t) {
|
|
422
|
-
return typeof t == "function" ? t(e) : t;
|
|
423
|
-
}
|
|
424
|
-
function xn(e, t) {
|
|
425
|
-
for (var n in t) e[n] = t[n];
|
|
426
|
-
return e;
|
|
427
|
-
}
|
|
428
|
-
function Ze(e, t) {
|
|
429
|
-
for (var n in e) if (n !== "__source" && !(n in t)) return !0;
|
|
430
|
-
for (var r in t) if (r !== "__source" && e[r] !== t[r]) return !0;
|
|
431
|
-
return !1;
|
|
432
|
-
}
|
|
433
|
-
function Pe(e) {
|
|
434
|
-
this.props = e;
|
|
435
|
-
}
|
|
436
|
-
function kn(e, t) {
|
|
437
|
-
function n(o) {
|
|
438
|
-
var i = this.props.ref, s = i == o.ref;
|
|
439
|
-
return !s && i && (i.call ? i(null) : i.current = null), t ? !t(this.props, o) || !s : Ze(this.props, o);
|
|
440
|
-
}
|
|
441
|
-
function r(o) {
|
|
442
|
-
return this.shouldComponentUpdate = n, Z(e, o);
|
|
443
|
-
}
|
|
444
|
-
return r.displayName = "Memo(" + (e.displayName || e.name) + ")", r.prototype.isReactComponent = !0, r.__f = !0, r;
|
|
445
|
-
}
|
|
446
|
-
(Pe.prototype = new Y()).isPureReactComponent = !0, Pe.prototype.shouldComponentUpdate = function(e, t) {
|
|
447
|
-
return Ze(this.props, e) || Ze(this.state, t);
|
|
448
|
-
};
|
|
449
|
-
var Et = M.__b;
|
|
450
|
-
M.__b = function(e) {
|
|
451
|
-
e.type && e.type.__f && e.ref && (e.props.ref = e.ref, e.ref = null), Et && Et(e);
|
|
452
|
-
};
|
|
453
|
-
var Mr = typeof Symbol < "u" && Symbol.for && Symbol.for("react.forward_ref") || 3911;
|
|
454
|
-
function it(e) {
|
|
455
|
-
function t(n) {
|
|
456
|
-
var r = xn({}, n);
|
|
457
|
-
return delete r.ref, e(r, n.ref || null);
|
|
458
|
-
}
|
|
459
|
-
return t.$$typeof = Mr, t.render = t, t.prototype.isReactComponent = t.__f = !0, t.displayName = "ForwardRef(" + (e.displayName || e.name) + ")", t;
|
|
460
|
-
}
|
|
461
|
-
var Lt = function(e, t) {
|
|
462
|
-
return e == null ? null : te(te(e).map(t));
|
|
463
|
-
}, wn = { map: Lt, forEach: Lt, count: function(e) {
|
|
464
|
-
return e ? te(e).length : 0;
|
|
465
|
-
}, only: function(e) {
|
|
466
|
-
var t = te(e);
|
|
467
|
-
if (t.length !== 1) throw "Children.only";
|
|
468
|
-
return t[0];
|
|
469
|
-
}, toArray: te }, qr = M.__e;
|
|
470
|
-
M.__e = function(e, t, n, r) {
|
|
471
|
-
if (e.then) {
|
|
472
|
-
for (var o, i = t; i = i.__; ) if ((o = i.__c) && o.__c) return t.__e == null && (t.__e = n.__e, t.__k = n.__k), o.__c(e, t);
|
|
473
|
-
}
|
|
474
|
-
qr(e, t, n, r);
|
|
475
|
-
};
|
|
476
|
-
var Pt = M.unmount;
|
|
477
|
-
function Cn(e, t, n) {
|
|
478
|
-
return e && (e.__c && e.__c.__H && (e.__c.__H.__.forEach(function(r) {
|
|
479
|
-
typeof r.__c == "function" && r.__c();
|
|
480
|
-
}), e.__c.__H = null), (e = xn({}, e)).__c != null && (e.__c.__P === n && (e.__c.__P = t), e.__c = null), e.__k = e.__k && e.__k.map(function(r) {
|
|
481
|
-
return Cn(r, t, n);
|
|
482
|
-
})), e;
|
|
483
|
-
}
|
|
484
|
-
function Sn(e, t, n) {
|
|
485
|
-
return e && n && (e.__v = null, e.__k = e.__k && e.__k.map(function(r) {
|
|
486
|
-
return Sn(r, t, n);
|
|
487
|
-
}), e.__c && e.__c.__P === t && (e.__e && n.appendChild(e.__e), e.__c.__e = !0, e.__c.__P = n)), e;
|
|
488
|
-
}
|
|
489
|
-
function ye() {
|
|
490
|
-
this.__u = 0, this.t = null, this.__b = null;
|
|
491
|
-
}
|
|
492
|
-
function In(e) {
|
|
493
|
-
var t = e.__.__c;
|
|
494
|
-
return t && t.__a && t.__a(e);
|
|
495
|
-
}
|
|
496
|
-
function Tn(e) {
|
|
497
|
-
var t, n, r;
|
|
498
|
-
function o(i) {
|
|
499
|
-
if (t || (t = e()).then(function(s) {
|
|
500
|
-
n = s.default || s;
|
|
501
|
-
}, function(s) {
|
|
502
|
-
r = s;
|
|
503
|
-
}), r) throw r;
|
|
504
|
-
if (!n) throw t;
|
|
505
|
-
return Z(n, i);
|
|
506
|
-
}
|
|
507
|
-
return o.displayName = "Lazy", o.__f = !0, o;
|
|
508
|
-
}
|
|
509
|
-
function de() {
|
|
510
|
-
this.u = null, this.o = null;
|
|
511
|
-
}
|
|
512
|
-
M.unmount = function(e) {
|
|
513
|
-
var t = e.__c;
|
|
514
|
-
t && t.__R && t.__R(), t && 32 & e.__u && (e.type = null), Pt && Pt(e);
|
|
515
|
-
}, (ye.prototype = new Y()).__c = function(e, t) {
|
|
516
|
-
var n = t.__c, r = this;
|
|
517
|
-
r.t == null && (r.t = []), r.t.push(n);
|
|
518
|
-
var o = In(r.__v), i = !1, s = function() {
|
|
519
|
-
i || (i = !0, n.__R = null, o ? o(l) : l());
|
|
520
|
-
};
|
|
521
|
-
n.__R = s;
|
|
522
|
-
var l = function() {
|
|
523
|
-
if (!--r.__u) {
|
|
524
|
-
if (r.state.__a) {
|
|
525
|
-
var c = r.state.__a;
|
|
526
|
-
r.__v.__k[0] = Sn(c, c.__c.__P, c.__c.__O);
|
|
527
|
-
}
|
|
528
|
-
var p;
|
|
529
|
-
for (r.setState({ __a: r.__b = null }); p = r.t.pop(); ) p.forceUpdate();
|
|
530
|
-
}
|
|
531
|
-
};
|
|
532
|
-
r.__u++ || 32 & t.__u || r.setState({ __a: r.__b = r.__v.__k[0] }), e.then(s, s);
|
|
533
|
-
}, ye.prototype.componentWillUnmount = function() {
|
|
534
|
-
this.t = [];
|
|
535
|
-
}, ye.prototype.render = function(e, t) {
|
|
536
|
-
if (this.__b) {
|
|
537
|
-
if (this.__v.__k) {
|
|
538
|
-
var n = document.createElement("div"), r = this.__v.__k[0].__c;
|
|
539
|
-
this.__v.__k[0] = Cn(this.__b, n, r.__O = r.__P);
|
|
540
|
-
}
|
|
541
|
-
this.__b = null;
|
|
542
|
-
}
|
|
543
|
-
var o = t.__a && Z(B, null, e.fallback);
|
|
544
|
-
return o && (o.__u &= -33), [Z(B, null, t.__a ? null : e.children), o];
|
|
545
|
-
};
|
|
546
|
-
var Mt = function(e, t, n) {
|
|
547
|
-
if (++n[1] === n[0] && e.o.delete(t), e.props.revealOrder && (e.props.revealOrder[0] !== "t" || !e.o.size)) for (n = e.u; n; ) {
|
|
548
|
-
for (; n.length > 3; ) n.pop()();
|
|
549
|
-
if (n[1] < n[0]) break;
|
|
550
|
-
e.u = n = n[2];
|
|
551
|
-
}
|
|
552
|
-
};
|
|
553
|
-
function Rr(e) {
|
|
554
|
-
return this.getChildContext = function() {
|
|
555
|
-
return e.context;
|
|
556
|
-
}, e.children;
|
|
557
|
-
}
|
|
558
|
-
function Hr(e) {
|
|
559
|
-
var t = this, n = e.i;
|
|
560
|
-
t.componentWillUnmount = function() {
|
|
561
|
-
he(null, t.l), t.l = null, t.i = null;
|
|
562
|
-
}, t.i && t.i !== n && t.componentWillUnmount(), t.l || (t.i = n, t.l = { nodeType: 1, parentNode: n, childNodes: [], appendChild: function(r) {
|
|
563
|
-
this.childNodes.push(r), t.i.appendChild(r);
|
|
564
|
-
}, insertBefore: function(r, o) {
|
|
565
|
-
this.childNodes.push(r), t.i.appendChild(r);
|
|
566
|
-
}, removeChild: function(r) {
|
|
567
|
-
this.childNodes.splice(this.childNodes.indexOf(r) >>> 1, 1), t.i.removeChild(r);
|
|
568
|
-
} }), he(Z(Rr, { context: t.context }, e.__v), t.l);
|
|
569
|
-
}
|
|
570
|
-
function Nn(e, t) {
|
|
571
|
-
var n = Z(Hr, { __v: e, i: t });
|
|
572
|
-
return n.containerInfo = t, n;
|
|
573
|
-
}
|
|
574
|
-
(de.prototype = new Y()).__a = function(e) {
|
|
575
|
-
var t = this, n = In(t.__v), r = t.o.get(e);
|
|
576
|
-
return r[0]++, function(o) {
|
|
577
|
-
var i = function() {
|
|
578
|
-
t.props.revealOrder ? (r.push(o), Mt(t, e, r)) : o();
|
|
579
|
-
};
|
|
580
|
-
n ? n(i) : i();
|
|
581
|
-
};
|
|
582
|
-
}, de.prototype.render = function(e) {
|
|
583
|
-
this.u = null, this.o = /* @__PURE__ */ new Map();
|
|
584
|
-
var t = te(e.children);
|
|
585
|
-
e.revealOrder && e.revealOrder[0] === "b" && t.reverse();
|
|
586
|
-
for (var n = t.length; n--; ) this.o.set(t[n], this.u = [1, 0, this.u]);
|
|
587
|
-
return e.children;
|
|
588
|
-
}, de.prototype.componentDidUpdate = de.prototype.componentDidMount = function() {
|
|
589
|
-
var e = this;
|
|
590
|
-
this.o.forEach(function(t, n) {
|
|
591
|
-
Mt(e, n, t);
|
|
592
|
-
});
|
|
593
|
-
};
|
|
594
|
-
var En = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, Or = /^(?: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]/, Ur = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, Dr = /[A-Z0-9]/g, jr = typeof document < "u", Fr = function(e) {
|
|
595
|
-
return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(e);
|
|
596
|
-
};
|
|
597
|
-
function Ln(e, t, n) {
|
|
598
|
-
return t.__k == null && (t.textContent = ""), he(e, t), typeof n == "function" && n(), e ? e.__c : null;
|
|
599
|
-
}
|
|
600
|
-
function Pn(e, t, n) {
|
|
601
|
-
return hn(e, t), typeof n == "function" && n(), e ? e.__c : null;
|
|
602
|
-
}
|
|
603
|
-
Y.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(e) {
|
|
604
|
-
Object.defineProperty(Y.prototype, e, { configurable: !0, get: function() {
|
|
605
|
-
return this["UNSAFE_" + e];
|
|
606
|
-
}, set: function(t) {
|
|
607
|
-
Object.defineProperty(this, e, { configurable: !0, writable: !0, value: t });
|
|
608
|
-
} });
|
|
609
|
-
});
|
|
610
|
-
var qt = M.event;
|
|
611
|
-
function Ar() {
|
|
612
|
-
}
|
|
613
|
-
function Br() {
|
|
614
|
-
return this.cancelBubble;
|
|
615
|
-
}
|
|
616
|
-
function Vr() {
|
|
617
|
-
return this.defaultPrevented;
|
|
618
|
-
}
|
|
619
|
-
M.event = function(e) {
|
|
620
|
-
return qt && (e = qt(e)), e.persist = Ar, e.isPropagationStopped = Br, e.isDefaultPrevented = Vr, e.nativeEvent = e;
|
|
621
|
-
};
|
|
622
|
-
var st, $r = { enumerable: !1, configurable: !0, get: function() {
|
|
623
|
-
return this.class;
|
|
624
|
-
} }, Rt = M.vnode;
|
|
625
|
-
M.vnode = function(e) {
|
|
626
|
-
typeof e.type == "string" && function(t) {
|
|
627
|
-
var n = t.props, r = t.type, o = {};
|
|
628
|
-
for (var i in n) {
|
|
629
|
-
var s = n[i];
|
|
630
|
-
if (!(i === "value" && "defaultValue" in n && s == null || jr && i === "children" && r === "noscript" || i === "class" || i === "className")) {
|
|
631
|
-
var l = i.toLowerCase();
|
|
632
|
-
i === "defaultValue" && "value" in n && n.value == null ? i = "value" : i === "download" && s === !0 ? s = "" : l === "ondoubleclick" ? i = "ondblclick" : l !== "onchange" || r !== "input" && r !== "textarea" || Fr(n.type) ? l === "onfocus" ? i = "onfocusin" : l === "onblur" ? i = "onfocusout" : Ur.test(i) ? i = l : r.indexOf("-") === -1 && Or.test(i) ? i = i.replace(Dr, "-$&").toLowerCase() : s === null && (s = void 0) : l = i = "oninput", l === "oninput" && o[i = l] && (i = "oninputCapture"), o[i] = s;
|
|
633
|
-
}
|
|
634
|
-
}
|
|
635
|
-
r == "select" && o.multiple && Array.isArray(o.value) && (o.value = te(n.children).forEach(function(c) {
|
|
636
|
-
c.props.selected = o.value.indexOf(c.props.value) != -1;
|
|
637
|
-
})), r == "select" && o.defaultValue != null && (o.value = te(n.children).forEach(function(c) {
|
|
638
|
-
c.props.selected = o.multiple ? o.defaultValue.indexOf(c.props.value) != -1 : o.defaultValue == c.props.value;
|
|
639
|
-
})), n.class && !n.className ? (o.class = n.class, Object.defineProperty(o, "className", $r)) : (n.className && !n.class || n.class && n.className) && (o.class = o.className = n.className), t.props = o;
|
|
640
|
-
}(e), e.$$typeof = En, Rt && Rt(e);
|
|
641
|
-
};
|
|
642
|
-
var Ht = M.__r;
|
|
643
|
-
M.__r = function(e) {
|
|
644
|
-
Ht && Ht(e), st = e.__c;
|
|
645
|
-
};
|
|
646
|
-
var Ot = M.diffed;
|
|
647
|
-
M.diffed = function(e) {
|
|
648
|
-
Ot && Ot(e);
|
|
649
|
-
var t = e.props, n = e.__e;
|
|
650
|
-
n != null && e.type === "textarea" && "value" in t && t.value !== n.value && (n.value = t.value == null ? "" : t.value), st = null;
|
|
651
|
-
};
|
|
652
|
-
var Mn = { ReactCurrentDispatcher: { current: { readContext: function(e) {
|
|
653
|
-
return st.__n[e.__c].props.value;
|
|
654
|
-
} } } };
|
|
655
|
-
function qn(e) {
|
|
656
|
-
return Z.bind(null, e);
|
|
657
|
-
}
|
|
658
|
-
function Ce(e) {
|
|
659
|
-
return !!e && e.$$typeof === En;
|
|
660
|
-
}
|
|
661
|
-
function Rn(e) {
|
|
662
|
-
return Ce(e) && e.type === B;
|
|
663
|
-
}
|
|
664
|
-
function Hn(e) {
|
|
665
|
-
return Ce(e) ? Nr.apply(null, arguments) : e;
|
|
666
|
-
}
|
|
667
|
-
function at(e) {
|
|
668
|
-
return !!e.__k && (he(null, e), !0);
|
|
669
|
-
}
|
|
670
|
-
function On(e) {
|
|
671
|
-
return e && (e.base || e.nodeType === 1 && e) || null;
|
|
672
|
-
}
|
|
673
|
-
var Un = function(e, t) {
|
|
674
|
-
return e(t);
|
|
675
|
-
}, Dn = function(e, t) {
|
|
676
|
-
return e(t);
|
|
677
|
-
}, jn = B;
|
|
678
|
-
function lt(e) {
|
|
679
|
-
e();
|
|
680
|
-
}
|
|
681
|
-
function Fn(e) {
|
|
682
|
-
return e;
|
|
683
|
-
}
|
|
684
|
-
function An() {
|
|
685
|
-
return [!1, lt];
|
|
686
|
-
}
|
|
687
|
-
var Bn = we, Vn = Ce;
|
|
688
|
-
function $n(e, t) {
|
|
689
|
-
var n = t(), r = F({ h: { __: n, v: t } }), o = r[0].h, i = r[1];
|
|
690
|
-
return we(function() {
|
|
691
|
-
o.__ = n, o.v = t, De(o) && i({ h: o });
|
|
692
|
-
}, [e, n, t]), A(function() {
|
|
693
|
-
return De(o) && i({ h: o }), e(function() {
|
|
694
|
-
De(o) && i({ h: o });
|
|
695
|
-
});
|
|
696
|
-
}, [e]), n;
|
|
697
|
-
}
|
|
698
|
-
function De(e) {
|
|
699
|
-
var t, n, r = e.v, o = e.__;
|
|
700
|
-
try {
|
|
701
|
-
var i = r();
|
|
702
|
-
return !((t = o) === (n = i) && (t !== 0 || 1 / t == 1 / n) || t != t && n != n);
|
|
703
|
-
} catch {
|
|
704
|
-
return !0;
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
var zr = { useState: F, useId: vn, useReducer: nt, useEffect: A, useLayoutEffect: we, useInsertionEffect: Bn, useTransition: An, useDeferredValue: Fn, useSyncExternalStore: $n, startTransition: lt, useRef: z, useImperativeHandle: _n, useMemo: re, useCallback: le, useContext: bn, useDebugValue: rt, version: "17.0.2", Children: wn, render: Ln, hydrate: Pn, unmountComponentAtNode: at, createPortal: Nn, createElement: Z, createContext: fn, createFactory: qn, cloneElement: Hn, createRef: cn, Fragment: B, isValidElement: Ce, isElement: Vn, isFragment: Rn, findDOMNode: On, Component: Y, PureComponent: Pe, memo: kn, forwardRef: it, flushSync: Dn, unstable_batchedUpdates: Un, StrictMode: jn, Suspense: ye, SuspenseList: de, lazy: Tn, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Mn };
|
|
708
|
-
const Qr = Object.freeze(Object.defineProperty({ __proto__: null, Children: wn, Component: Y, Fragment: B, PureComponent: Pe, StrictMode: jn, Suspense: ye, SuspenseList: de, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Mn, cloneElement: Hn, createContext: fn, createElement: Z, createFactory: qn, createPortal: Nn, createRef: cn, default: zr, findDOMNode: On, flushSync: Dn, forwardRef: it, hydrate: Pn, isElement: Vn, isFragment: Rn, isValidElement: Ce, lazy: Tn, memo: kn, render: Ln, startTransition: lt, unmountComponentAtNode: at, unstable_batchedUpdates: Un, useCallback: le, useContext: bn, useDebugValue: rt, useDeferredValue: Fn, useEffect: A, useErrorBoundary: function(e) {
|
|
709
|
-
var t = ce(ne++, 10), n = F();
|
|
710
|
-
return t.__ = e, D.componentDidCatch || (D.componentDidCatch = function(r, o) {
|
|
711
|
-
t.__ && t.__(r, o), n[1](r);
|
|
712
|
-
}), [n[0], function() {
|
|
713
|
-
n[1](void 0);
|
|
714
|
-
}];
|
|
715
|
-
}, useId: vn, useImperativeHandle: _n, useInsertionEffect: Bn, useLayoutEffect: we, useMemo: re, useReducer: nt, useRef: z, useState: F, useSyncExternalStore: $n, useTransition: An, version: "17.0.2" }, Symbol.toStringTag, { value: "Module" })), Ut = (e) => {
|
|
716
|
-
let t;
|
|
717
|
-
const n = /* @__PURE__ */ new Set(), r = (s, l) => {
|
|
718
|
-
const c = typeof s == "function" ? s(t) : s;
|
|
719
|
-
if (!Object.is(c, t)) {
|
|
720
|
-
const p = t;
|
|
721
|
-
t = l ?? typeof c != "object" ? c : Object.assign({}, t, c), n.forEach((m) => m(t, p));
|
|
722
|
-
}
|
|
723
|
-
}, o = () => t, i = { setState: r, getState: o, subscribe: (s) => (n.add(s), () => n.delete(s)), destroy: () => n.clear() };
|
|
724
|
-
return t = e(r, o, i), i;
|
|
725
|
-
};
|
|
726
|
-
function Wr(e) {
|
|
727
|
-
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
728
|
-
}
|
|
729
|
-
function Zr(e) {
|
|
730
|
-
if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e;
|
|
731
|
-
var t = e.default;
|
|
732
|
-
if (typeof t == "function") {
|
|
733
|
-
var n = function r() {
|
|
734
|
-
return this instanceof r ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments);
|
|
735
|
-
};
|
|
736
|
-
n.prototype = t.prototype;
|
|
737
|
-
} else n = {};
|
|
738
|
-
return Object.defineProperty(n, "__esModule", { value: !0 }), Object.keys(e).forEach(function(r) {
|
|
739
|
-
var o = Object.getOwnPropertyDescriptor(e, r);
|
|
740
|
-
Object.defineProperty(n, r, o.get ? o : { enumerable: !0, get: function() {
|
|
741
|
-
return e[r];
|
|
742
|
-
} });
|
|
743
|
-
}), n;
|
|
744
|
-
}
|
|
745
|
-
var Dt = { exports: {} }, je = {};
|
|
746
|
-
const zn = Zr(Qr);
|
|
747
|
-
var jt, Ft, At, Bt, Vt = { exports: {} }, Fe = {};
|
|
748
|
-
function Gr() {
|
|
749
|
-
return Ft || (Ft = 1, Vt.exports = function() {
|
|
750
|
-
if (jt) return Fe;
|
|
751
|
-
jt = 1;
|
|
752
|
-
var e = zn, t = typeof Object.is == "function" ? Object.is : function(c, p) {
|
|
753
|
-
return c === p && (c !== 0 || 1 / c == 1 / p) || c != c && p != p;
|
|
754
|
-
}, n = e.useState, r = e.useEffect, o = e.useLayoutEffect, i = e.useDebugValue;
|
|
755
|
-
function s(c) {
|
|
756
|
-
var p = c.getSnapshot;
|
|
757
|
-
c = c.value;
|
|
758
|
-
try {
|
|
759
|
-
var m = p();
|
|
760
|
-
return !t(c, m);
|
|
761
|
-
} catch {
|
|
762
|
-
return !0;
|
|
763
|
-
}
|
|
764
|
-
}
|
|
765
|
-
var l = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? function(c, p) {
|
|
766
|
-
return p();
|
|
767
|
-
} : function(c, p) {
|
|
768
|
-
var m = p(), u = n({ inst: { value: m, getSnapshot: p } }), d = u[0].inst, h = u[1];
|
|
769
|
-
return o(function() {
|
|
770
|
-
d.value = m, d.getSnapshot = p, s(d) && h({ inst: d });
|
|
771
|
-
}, [c, m, p]), r(function() {
|
|
772
|
-
return s(d) && h({ inst: d }), c(function() {
|
|
773
|
-
s(d) && h({ inst: d });
|
|
774
|
-
});
|
|
775
|
-
}, [c]), i(m), m;
|
|
776
|
-
};
|
|
777
|
-
return Fe.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : l, Fe;
|
|
778
|
-
}()), Vt.exports;
|
|
779
|
-
}
|
|
780
|
-
var Kr = (Bt || (Bt = 1, Dt.exports = function() {
|
|
781
|
-
if (At) return je;
|
|
782
|
-
At = 1;
|
|
783
|
-
var e = zn, t = Gr(), n = typeof Object.is == "function" ? Object.is : function(c, p) {
|
|
784
|
-
return c === p && (c !== 0 || 1 / c == 1 / p) || c != c && p != p;
|
|
785
|
-
}, r = t.useSyncExternalStore, o = e.useRef, i = e.useEffect, s = e.useMemo, l = e.useDebugValue;
|
|
786
|
-
return je.useSyncExternalStoreWithSelector = function(c, p, m, u, d) {
|
|
787
|
-
var h = o(null);
|
|
788
|
-
if (h.current === null) {
|
|
789
|
-
var g = { hasValue: !1, value: null };
|
|
790
|
-
h.current = g;
|
|
791
|
-
} else g = h.current;
|
|
792
|
-
h = s(function() {
|
|
793
|
-
function y(f) {
|
|
794
|
-
if (!S) {
|
|
795
|
-
if (S = !0, k = f, f = u(f), d !== void 0 && g.hasValue) {
|
|
796
|
-
var v = g.value;
|
|
797
|
-
if (d(v, f)) return b = v;
|
|
798
|
-
}
|
|
799
|
-
return b = f;
|
|
800
|
-
}
|
|
801
|
-
if (v = b, n(k, f)) return v;
|
|
802
|
-
var _ = u(f);
|
|
803
|
-
return d !== void 0 && d(v, _) ? v : (k = f, b = _);
|
|
804
|
-
}
|
|
805
|
-
var k, b, S = !1, E = m === void 0 ? null : m;
|
|
806
|
-
return [function() {
|
|
807
|
-
return y(p());
|
|
808
|
-
}, E === null ? void 0 : function() {
|
|
809
|
-
return y(E());
|
|
810
|
-
}];
|
|
811
|
-
}, [p, m, u, d]);
|
|
812
|
-
var x = r(c, h[0], h[1]);
|
|
813
|
-
return i(function() {
|
|
814
|
-
g.hasValue = !0, g.value = x;
|
|
815
|
-
}, [x]), l(x), x;
|
|
816
|
-
}, je;
|
|
817
|
-
}()), Dt.exports);
|
|
818
|
-
const Yr = Wr(Kr), { useSyncExternalStoreWithSelector: Jr } = Yr, $t = (e) => {
|
|
819
|
-
const t = typeof e == "function" ? ((r) => r ? Ut(r) : Ut)(e) : e, n = (r, o) => function(i, s = i.getState, l) {
|
|
820
|
-
const c = Jr(i.subscribe, i.getState, i.getServerState || i.getState, s, l);
|
|
821
|
-
return rt(c), c;
|
|
822
|
-
}(t, r, o);
|
|
823
|
-
return Object.assign(n, t), n;
|
|
824
|
-
}, Qn = (e) => e ? $t(e) : $t, Xr = 1, eo = 2, ct = { eq: (e, t) => e == t, neq(e, t) {
|
|
825
|
-
return !this.eq(e, t);
|
|
826
|
-
}, 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((n) => e.indexOf(n) === -1), list_alo(e, t) {
|
|
827
|
-
if (!Array.isArray(t)) return !1;
|
|
828
|
-
const n = Array.isArray(e) ? e : [e], r = new Set(n);
|
|
829
|
-
return t.some((o) => r.has(o));
|
|
830
|
-
}, list_dni(e, t) {
|
|
831
|
-
if (!Array.isArray(t)) return !1;
|
|
832
|
-
const n = Array.isArray(e) ? e : [e], r = new Set(n);
|
|
833
|
-
return t.every((o) => !r.has(o));
|
|
834
|
-
}, contains(e, t) {
|
|
835
|
-
const n = e.toLowerCase(), r = t.toLowerCase();
|
|
836
|
-
return n.includes(r);
|
|
837
|
-
}, notcontains(e, t) {
|
|
838
|
-
return !this.contains(e, t);
|
|
839
|
-
} }, to = (e, t, n) => {
|
|
840
|
-
switch (t) {
|
|
841
|
-
case "videovoice":
|
|
842
|
-
return !!(e && e.value);
|
|
843
|
-
case "open":
|
|
844
|
-
return !!n;
|
|
845
|
-
case "multipleselect":
|
|
846
|
-
return !!(n && Object.keys(n).length);
|
|
847
|
-
case "recordedtask":
|
|
848
|
-
return (n == null ? void 0 : n.taskStatus) === "completed";
|
|
849
|
-
case "texturlprompt":
|
|
850
|
-
return !e.value;
|
|
851
|
-
case "consentlegal":
|
|
852
|
-
case "nps":
|
|
853
|
-
case "likert":
|
|
854
|
-
return n !== null;
|
|
855
|
-
case "multiplechoice":
|
|
856
|
-
return n !== void 0;
|
|
857
|
-
case "matrix":
|
|
858
|
-
return !!(n && Object.values(n).every((r) => r !== null));
|
|
859
|
-
default:
|
|
860
|
-
return !0;
|
|
861
|
-
}
|
|
862
|
-
}, Wn = (e, t) => {
|
|
863
|
-
if (t === "matrix") {
|
|
864
|
-
const n = Object.keys(e).length, r = Object.values(e).filter((o) => o !== null).length;
|
|
865
|
-
return r > 0 && r < n;
|
|
866
|
-
}
|
|
867
|
-
return !1;
|
|
868
|
-
}, Zn = ({ cards: e, index: t, hasEndCard: n, allResponses: r, uploadProgress: o = {} }) => {
|
|
869
|
-
if (t >= e.length || t < 0) return null;
|
|
870
|
-
const i = e[t];
|
|
871
|
-
let s = t + 1;
|
|
872
|
-
const l = i.props.routingOptions || [];
|
|
873
|
-
for (let m = 0; m < l.length; m++) {
|
|
874
|
-
const { group: u, target: d } = l[m];
|
|
875
|
-
if (!(u != null && u.length)) continue;
|
|
876
|
-
const h = u[0];
|
|
877
|
-
if (h.questionIndex === void 0 || h.questionIndex > r.length) continue;
|
|
878
|
-
let g = zt({ comparator: h.comparator, response: r[h.questionIndex], type: i.type, value: h.value });
|
|
879
|
-
for (let x = 1; x < u.length; x += 2) {
|
|
880
|
-
const y = u[x], k = u[x + 1], b = zt({ comparator: k.comparator, response: r[k.questionIndex], type: e[k.questionIndex].type, value: k.value });
|
|
881
|
-
y === Xr ? g && (g = b) : y === eo && (g || (g = b));
|
|
882
|
-
}
|
|
883
|
-
if (g) {
|
|
884
|
-
s = d === -1 && n ? e.length - 1 : d;
|
|
885
|
-
break;
|
|
886
|
-
}
|
|
887
|
-
}
|
|
888
|
-
const c = e.findIndex((m) => m.type === "uploading");
|
|
889
|
-
let p;
|
|
890
|
-
return p = c > 0 ? n ? e.length - 3 : e.length - 2 : e.length - 1, t >= p || s === -1 || s !== null && s > p ? c > 0 && Object.values(o).some((u) => u.isSubmitted && !u.isComplete) ? c : n ? e.length - 1 : null : s === -1 ? null : s;
|
|
891
|
-
}, zt = ({ comparator: e, response: t, type: n, value: r }) => {
|
|
892
|
-
if (e === "answered") switch (n) {
|
|
893
|
-
case "texturlprompt":
|
|
894
|
-
return t === void 0;
|
|
895
|
-
case "consentlegal":
|
|
896
|
-
return t && t.submitted === !0;
|
|
897
|
-
case "recordedtask":
|
|
898
|
-
return "taskStatus" in t && t.taskStatus === "completed";
|
|
899
|
-
case "likert":
|
|
900
|
-
case "nps":
|
|
901
|
-
return Number.isInteger(t);
|
|
902
|
-
case "matrix":
|
|
903
|
-
return Object.values(t).every((o) => o !== null);
|
|
904
|
-
case "multiplechoice":
|
|
905
|
-
return t !== void 0;
|
|
906
|
-
case "multipleselect":
|
|
907
|
-
return (t == null ? void 0 : t.length) > 0;
|
|
908
|
-
case "open":
|
|
909
|
-
return t && t.length > 0;
|
|
910
|
-
case "videovoice":
|
|
911
|
-
return !!(t != null && t.mediaRecordingUid);
|
|
912
|
-
default:
|
|
913
|
-
return !1;
|
|
914
|
-
}
|
|
915
|
-
if (e === "given_up") return n !== "recordedtask" || "taskStatus" in t && t.taskStatus === "given.up";
|
|
916
|
-
if (e === "partial") return n === "matrix" && Wn(t, n);
|
|
917
|
-
if (e === "skipped") switch (n) {
|
|
918
|
-
case "texturlprompt":
|
|
919
|
-
return t == null ? void 0 : t.skipped;
|
|
920
|
-
case "consentlegal":
|
|
921
|
-
case "likert":
|
|
922
|
-
case "nps":
|
|
923
|
-
case "videovoice":
|
|
924
|
-
return t === null;
|
|
925
|
-
case "recordedtask":
|
|
926
|
-
return "taskStatus" in t && t.taskStatus === "abandoned";
|
|
927
|
-
case "open":
|
|
928
|
-
case "multipleselect":
|
|
929
|
-
return (t == null ? void 0 : t.length) === 0;
|
|
930
|
-
case "multiplechoice":
|
|
931
|
-
return t === void 0;
|
|
932
|
-
case "matrix":
|
|
933
|
-
return Object.values(t).every((o) => o === null);
|
|
934
|
-
default:
|
|
935
|
-
return !1;
|
|
936
|
-
}
|
|
937
|
-
return ct[e](t, r);
|
|
938
|
-
}, no = (e) => {
|
|
939
|
-
var r, o, i;
|
|
940
|
-
switch (e.type) {
|
|
941
|
-
case "multipleselect":
|
|
942
|
-
return e && e.props && e.props.options ? e.props.options.length > 13 ? e.props.options.map((s) => [s.value]) : (t = e.props.options.map((s) => s.value), n = !e.props.properties.required, t.reduce((s, l) => s.concat(s.map((c) => [...c, l])), [[]]).filter((s) => n || s.length > 0)) : null;
|
|
943
|
-
case "multiplechoice": {
|
|
944
|
-
if (!e || !e.props || !e.props.options) return null;
|
|
945
|
-
const s = e.props.options.map((l) => l.value);
|
|
946
|
-
return e.props.properties.required || s.push(void 0), s;
|
|
947
|
-
}
|
|
948
|
-
case "matrix": {
|
|
949
|
-
if (!((r = e == null ? void 0 : e.props) != null && r.options)) return null;
|
|
950
|
-
const s = e.props.properties.matrixColumn, l = e.props.options, c = l.reduce((m, u) => (m[u.id] = null, m), {}), p = [{ ...c, [l[0].id]: s[0].value }, l.reduce((m, u) => (m[u.id] = s[0].value, m), {})];
|
|
951
|
-
return e.props.properties.required || p.push(c), p;
|
|
952
|
-
}
|
|
953
|
-
case "likert": {
|
|
954
|
-
const s = Number((i = (o = e.props) == null ? void 0 : o.properties) == null ? void 0 : i.range) || 5;
|
|
955
|
-
return [...Array.from(Array(s).keys()).map((c) => c + 1), ...e.props.properties.required ? [] : [null]];
|
|
956
|
-
}
|
|
957
|
-
case "nps":
|
|
958
|
-
return [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...e.props.properties.required ? [] : [null]];
|
|
959
|
-
case "videovoice":
|
|
960
|
-
case "open":
|
|
961
|
-
return ["1", ...e.props.properties.required ? [] : [""]];
|
|
962
|
-
case "recordedtask": {
|
|
963
|
-
const s = [{ taskStatus: "completed" }, { taskStatus: "given.up" }];
|
|
964
|
-
return e.props.properties.required || s.push({ taskStatus: "abandoned" }), s;
|
|
965
|
-
}
|
|
966
|
-
case "texturlprompt":
|
|
967
|
-
return [void 0, ...e.props.properties.required ? [] : [{ skipped: !0 }]];
|
|
968
|
-
case "consentlegal":
|
|
969
|
-
return [1, ...e.props.properties.required ? [] : [null]];
|
|
970
|
-
default:
|
|
971
|
-
return [1];
|
|
972
|
-
}
|
|
973
|
-
var t, n;
|
|
974
|
-
}, ro = (e) => e in ct, oo = (e) => typeof e == "object" && e !== null && "taskStatus" in e, io = (e, t = []) => t.reduce((n, r) => {
|
|
975
|
-
const { group: o, target: i } = r;
|
|
976
|
-
if (!(o != null && o.length)) return [...n];
|
|
977
|
-
const s = o.filter((l) => !!Number(l) || typeof l == "object" && l.questionIndex === e).map((l) => {
|
|
978
|
-
const { comparator: c, value: p } = l;
|
|
979
|
-
return { comparator: c, target: i, value: p };
|
|
980
|
-
});
|
|
981
|
-
return [...n, ...s];
|
|
982
|
-
}, []), Ae = /* @__PURE__ */ new Set(["thanks", "uploading"]), R = Qn()((e, t) => ({ allResponses: [], answers: void 0, apiURL: "", border: "#000000", cards: [], close: async (n = pe) => {
|
|
983
|
-
const r = t(), { fadeout: o, remove: i, trackHistory: s, studyType: l } = r;
|
|
984
|
-
await o(n), Be(r) || s({ event: "closed" }), vr.info("SurveyClosing", { surveyId: r.surveyId }), ht.enable(), i({ initiator: ft.Closed, studyType: l });
|
|
985
|
-
}, configureExitOnOverlayClick: () => {
|
|
986
|
-
}, customMetadata: {}, destroy: async (n) => {
|
|
987
|
-
const { eventEmitFn: r, fadeout: o, remove: i, studyType: s, surveyId: l } = t();
|
|
988
|
-
r("survey.complete", l), await o(n), ht.enable(), i({ initiator: ft.Complete, studyType: s });
|
|
989
|
-
}, endCard: { headline: "" }, envId: "", eventEmitFn: _e.emit.bind(_e), fadeout: async (n) => {
|
|
990
|
-
const { eventEmitFn: r, headers: o, viewDocument: i } = t();
|
|
991
|
-
return Ee(o) ? Promise.resolve() : (r(G.SurveyFadingOut), new Promise((s) => {
|
|
992
|
-
const l = i.getElementById(n);
|
|
993
|
-
l ? (l.addEventListener("transitionend", () => {
|
|
994
|
-
s();
|
|
995
|
-
}), l.classList.remove("ul-app--visible")) : s();
|
|
996
|
-
}));
|
|
997
|
-
}, forceBrandedLogo: !1, frame: document.createElement("iframe"), handleClickEmbedButton: (n) => {
|
|
998
|
-
const { cards: r, eventEmitFn: o, index: i } = t();
|
|
999
|
-
o(n, { qid: r[i].name, props: r[i].props }), e(() => ({ hasViewedEmbed: !0 }));
|
|
1000
|
-
}, handleUploadUpdate: ({ mediaRecordingUid: n, isComplete: r, progressPct: o, isSubmitted: i }) => {
|
|
1001
|
-
var h, g, x;
|
|
1002
|
-
const { cards: s, destroy: l, index: c, uploadProgress: p } = t(), m = r || ((h = p[n]) == null ? void 0 : h.isComplete), u = { ...p, [n]: { progressPct: m ? 100 : o || ((g = p[n]) == null ? void 0 : g.progressPct), isComplete: m, isSubmitted: i || ((x = p[n]) == null ? void 0 : x.isSubmitted) } };
|
|
1003
|
-
if (e({ uploadProgress: u }), s[c].type !== "uploading") return;
|
|
1004
|
-
const d = Object.entries(p).every(([y, k]) => !k.isSubmitted || k.isComplete || n == y && r);
|
|
1005
|
-
if (d && c >= s.length - 1) return l(pe);
|
|
1006
|
-
e({ index: d ? c + 1 : c, uploadingCardViewed: !0 });
|
|
1007
|
-
}, 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: (n) => {
|
|
1008
|
-
const { allResponses: r, cards: o, eventEmitFn: i, index: s, responseGroupUid: l, submit: c, trackHistory: p, uploadProgress: m, viewedCardCount: u } = t();
|
|
1009
|
-
e({ minScrollableHeight: void 0 });
|
|
1010
|
-
const d = Array.isArray(n.data) ? n.data : [n.data], h = Date.now(), g = [...o], x = { response: [], responseGroupUid: l, questionIndex: s };
|
|
1011
|
-
let y = null;
|
|
1012
|
-
const k = r.slice(0);
|
|
1013
|
-
d.forEach((E, f) => {
|
|
1014
|
-
const v = g[s + f], { type: _, ...N } = E, I = { ...N, answeredAt: h }, P = I.value;
|
|
1015
|
-
((w) => w && !Ae.has(w.type))(v) && (v.value = P), x.response.push(I);
|
|
1016
|
-
let C = _ === "multiplechoice" ? Object.values(P).find((w) => w !== !1) : P;
|
|
1017
|
-
_ === "multipleselect" && (C = g[s + f].props.options.reduce((w, L) => (P[L.id] && w.push(L.value), w), [])), k[s + f] = C, y = Zn({ cards: g, index: s + f, hasEndCard: !!n.endCard, uploadProgress: m, allResponses: k });
|
|
1018
|
-
}), e({ allResponses: k }), (y === null || Ae.has(g[y].type)) && (x.completedAt = h);
|
|
1019
|
-
const b = c(x);
|
|
1020
|
-
if (y === null) return void n.completeSurvey();
|
|
1021
|
-
y && !Ae.has(g[y].type) && b.finally(() => {
|
|
1022
|
-
p({ event: "seen", index: y });
|
|
1023
|
-
});
|
|
1024
|
-
const S = g[y];
|
|
1025
|
-
g[y] && i && i("survey.question", { qid: S.name, props: S.props }), e({ cards: g, hasViewedEmbed: !1, index: y, viewedCardCount: u + 1 });
|
|
1026
|
-
}, pendingRemoveIframeReason: null, previewKey: null, previewMode: void 0, recorder: () => {
|
|
1027
|
-
}, recorderEventEmitter: _e, resolveTrackedPromise: () => {
|
|
1028
|
-
const { removeIframeIfReady: n } = t();
|
|
1029
|
-
e((r) => ({ unresolvedRequestCount: r.unresolvedRequestCount - 1 })), n();
|
|
1030
|
-
}, responseGroupUid: "", remove: ({ initiator: n, studyType: r }) => {
|
|
1031
|
-
const { eventEmitFn: o, removeIframeIfReady: i, surveyId: s } = t();
|
|
1032
|
-
e({ pendingRemoveIframeReason: n, studyType: r }), o(G.SurveyCloseRequested, { name: G.SurveyCloseRequested, initiator: n, studyType: r, "survey.id": s }), i();
|
|
1033
|
-
}, removeIframeIfReady: () => {
|
|
1034
|
-
const { eventEmitFn: n, pendingRemoveIframeReason: r, unresolvedRequestCount: o, studyType: i, surveyId: s } = t();
|
|
1035
|
-
r && o === 0 && (n(G.SurveyWillClose, { name: G.SurveyWillClose, initiator: r, studyType: i, "survey.id": s }), e({ pendingRemoveIframeReason: null, studyType: i }));
|
|
1036
|
-
}, seen: async () => {
|
|
1037
|
-
const { trackHistory: n } = t();
|
|
1038
|
-
return n({ event: "seen", isNew: !0 });
|
|
1039
|
-
}, slugName: null, showStripes: !1, showSurveyBrand: !1, styleNonce: "", submit: async ({ completedAt: n, questionIndex: r, response: o, responseGroupUid: i }) => {
|
|
1040
|
-
const s = t();
|
|
1041
|
-
if (!i || Be(s)) return;
|
|
1042
|
-
const l = { responseGroupUid: i, meta: s.meta, customMetadata: s.customMetadata, responses: o, completedAt: n, previewKey: s.previewKey }, c = await s.trackPromise(Ve(`${s.apiURL}/sdk/1/environments/${s.envId}/visitors/${s.userId}/responses/submit`, { body: JSON.stringify(l), headers: s.headers, method: "POST" }));
|
|
1043
|
-
c.ok ? o.forEach((p, m) => {
|
|
1044
|
-
s.eventEmitFn(G.QuestionAnswered, { ...p, questionIndex: r ? r + m : void 0, "survey.id": s.surveyId });
|
|
1045
|
-
}) : c.reportError && (console.warn("[Sprig] (ERR-427) Failed to submit response", c.error), await s.trackPromise(Qt(s, "submitResponse", c.error)));
|
|
1046
|
-
}, surveyId: 0, tabTitle: "", trackHistory: async ({ event: n, index: r, isNew: o = !1 }) => {
|
|
1047
|
-
const i = t();
|
|
1048
|
-
if (Be(i)) return;
|
|
1049
|
-
const { cards: s, index: l } = i;
|
|
1050
|
-
let c = r ?? l, p = s[c];
|
|
1051
|
-
for (; p; ) {
|
|
1052
|
-
const m = { sid: i.surveyId, qid: p.name, action: n, vid: i.userId, eid: i.envId, isNew: o, responseGroupUid: i.responseGroupUid, previewKey: i.previewKey }, u = await i.trackPromise(Ve(`${i.apiURL}/sdk/1/visitors/${i.userId}/surveys/${i.surveyId}/history`, { method: "POST", headers: i.headers, body: JSON.stringify(m) }));
|
|
1053
|
-
!u.ok && u.reportError && (console.warn("[Sprig] (ERR-428) Failed to track survey event", u.error), await i.trackPromise(Qt(i, "trackHistory", u.error)));
|
|
1054
|
-
const d = s[c + 1];
|
|
1055
|
-
if (!p.groupId || !(d != null && d.groupId) || d.groupId !== p.groupId) break;
|
|
1056
|
-
c++, p = d, o = !1;
|
|
1057
|
-
}
|
|
1058
|
-
}, trackPromise: async (n) => {
|
|
1059
|
-
const { resolveTrackedPromise: r } = t();
|
|
1060
|
-
return e((o) => ({ unresolvedRequestCount: o.unresolvedRequestCount + 1 })), n.then((o) => (r(), o)).catch((o) => {
|
|
1061
|
-
throw r(), o;
|
|
1062
|
-
});
|
|
1063
|
-
}, unresolvedRequestCount: 0, update: () => {
|
|
1064
|
-
const { cards: n, index: r, headers: o, eventEmitFn: i, frame: s, useMobileStyling: l, surveyId: c, viewDocument: p } = t(), m = o["userleap-platform"] === "web", u = Ee(o), d = n[r], h = d.type === "matrix" && !(d.props.properties.displayMatrixAsAccordion || l);
|
|
1065
|
-
e({ minScrollableHeight: void 0 }), setTimeout(() => {
|
|
1066
|
-
var k, b, S;
|
|
1067
|
-
!u && !l && ((k = s == null ? void 0 : s.setWidth) == null || k.call(s, _r));
|
|
1068
|
-
const [g, x, y] = br(p, m && !l, u);
|
|
1069
|
-
u ? (i(G.SurveyHeight, { name: G.SurveyHeight, contentFrameHeight: g, "survey.id": c }), i(G.SurveyWidth, { name: G.SurveyWidth, contentFrameWidth: x, "survey.id": c })) : ((b = s.setHeight) == null || b.call(s, g), e({ minScrollableHeight: y }), !l && h && ((S = s.setWidth) == null || S.call(s, x)));
|
|
1070
|
-
}, 100);
|
|
1071
|
-
}, uploadingCardViewed: !1, uploadProgress: {}, useDesktopPrototype: void 0, useMobileStyling: !1, userId: "", viewDocument: window.document, viewedCardCount: 0, focusedQuestionId: null, setFocusedQuestionId: (n) => e({ focusedQuestionId: n }) })), Be = (e) => !e.userId || e.meta && e.meta.mode === "test" || e.isPreview || e.previewMode, Qt = async (e, t, n) => {
|
|
1072
|
-
const { mode: r, userId: o, envId: i, apiURL: s, headers: l, viewDocument: c } = e, p = c.documentElement, m = { mode: r, 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: `${n == null ? void 0 : n.name} - ${n == null ? void 0 : n.message}`, stack: n == null ? void 0 : n.stack }, meta: m, vid: o, envId: i };
|
|
1073
|
-
(await Ve(`${s}/sdk/1/errors`, { method: "POST", headers: Object.assign({ "x-ul-error": window.btoa(`userleap-${Date.now()}-error`) }, l), body: JSON.stringify(u) })).ok || console.warn("[Sprig] (ERR-444) Failed to report error to API", n);
|
|
1074
|
-
}, Gn = (e) => Z("svg", { fill: "none", height: 24, viewBox: "0 0 24 24", width: 24, xmlns: "http://www.w3.org/2000/svg", ...e }, Z("path", { d: "M17 10L12 15L7 10", stroke: "#0B2330", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5 })), Kn = (e) => Z("svg", { fill: "none", height: 10, viewBox: "0 0 10 10", width: 10, xmlns: "http://www.w3.org/2000/svg", ...e }, Z("path", { d: "M9.15377 1.30774L4.07685 8.23082L1.30762 5.00005", stroke: "white", strokeLinecap: "round", strokeWidth: 2 })), so = ({ visible: e }) => a("div", { className: "sprig-check-background", style: { opacity: e ? 1 : 0 }, children: a(Kn, { className: "sprig-check" }) }), Wt = "250ms", ao = it(({ animate: e, children: t, header: n, isOpen: r, onClick: o, showHeaderCheck: i }, s) => {
|
|
1075
|
-
const l = z(null), [c, p] = F(0), [m, u] = F("none"), [d, h] = F(!0);
|
|
1076
|
-
return A(() => {
|
|
1077
|
-
var x;
|
|
1078
|
-
const g = (x = l.current) == null ? void 0 : x.getBoundingClientRect();
|
|
1079
|
-
p(r && g ? g.height : 0);
|
|
1080
|
-
}, [r]), A(() => {
|
|
1081
|
-
!c && r || !d || h(!1), u(e && !d ? `height ${Wt} ease` : "none");
|
|
1082
|
-
}, [e, d, c, r]), a("div", { className: "sprig-accordion", ref: s, children: [a("button", { className: "sprig-accordion-header-container", onClick: o, type: "button", children: [a("div", { className: "sprig-header-label-container", children: [a("span", { className: "sprig-header-label", children: n }), a(so, { visible: i })] }), a(Gn, { className: "sprig-caret", style: { transitionDuration: e ? Wt : "0", transform: r ? "rotate(-180deg)" : "none" } })] }), a("div", { className: "sprig-accordion-body", style: { transition: m, height: c }, children: a("div", { ref: l, children: t }) })] });
|
|
1083
|
-
}), ut = ({ style: e, stroke: t = "black" }) => a("svg", { fill: "none", height: "10", style: e, viewBox: "0 0 12 10", width: "12", xmlns: "http://www.w3.org/2000/svg", children: [a("path", { d: "M1.47839 5.2085L10.9384 5.2085", stroke: t, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.35" }), a("path", { d: "M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845", stroke: t, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.35" })] }), q = (...e) => e.filter(Boolean).join(" "), V = (e, t, n) => {
|
|
1084
|
-
const r = t ? "--mobile" : "--desktop";
|
|
1085
|
-
return `${e + r} ${e + (n ? `${r}_${n}` : "")} ${e}`;
|
|
1086
|
-
}, lo = (e, t) => `${e} ${e}__${t}`, Q = (e) => a("button", { ...e, className: q("ul-card-text__button", e.className), id: "ul-card-text__button" }), Yn = () => {
|
|
1087
|
-
const { viewDocument: e } = R((r) => ({ viewDocument: r.viewDocument })), [t, n] = F(!1);
|
|
1088
|
-
return A(() => {
|
|
1089
|
-
const r = e.querySelector(".sprig-question-body"), o = new ResizeObserver(() => {
|
|
1090
|
-
window.requestAnimationFrame(() => {
|
|
1091
|
-
n(!!(r && yr(r) && r.scrollHeight > r.offsetHeight));
|
|
1092
|
-
});
|
|
1093
|
-
});
|
|
1094
|
-
return r && o.observe(r), () => {
|
|
1095
|
-
r && o.disconnect();
|
|
1096
|
-
};
|
|
1097
|
-
}, [e]), t;
|
|
1098
|
-
}, Zt = ({ plainText: e, richText: t, id: n, className: r, isHeader: o }) => t ? a("div", { className: r, dangerouslySetInnerHTML: { __html: t }, id: n }) : e ? a(o ? "h1" : "p", { className: r, id: n, children: e }) : null, co = () => {
|
|
1099
|
-
const { cards: e, close: t, endCard: n, headers: r, index: o } = R((l) => ({ cards: l.cards, close: l.close, endCard: l.endCard, headers: l.headers, index: l.index, useMobileStyling: l.useMobileStyling })), i = e.length, s = re(() => () => t(pe), [t]);
|
|
1100
|
-
return ["email", "link"].includes(r["userleap-platform"]) || n && o + 1 === i ? null : a("div", { "aria-label": "Close button", className: "close-btn", onClick: s, onKeyPress: (l) => {
|
|
1101
|
-
l.key === "Enter" && s();
|
|
1102
|
-
}, role: "button", tabIndex: 0, children: a("svg", { fill: "none", height: "16px", viewBox: "0 0 13 13", width: "16px", xmlns: "http://www.w3.org/2000/svg", children: a("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" }) }) });
|
|
1103
|
-
}, X = ({ message: e, properties: t }) => {
|
|
1104
|
-
const n = z(null), r = t == null ? void 0 : t.captionText, o = Yn();
|
|
1105
|
-
return a("div", { className: q("question-header-container", "sprig-header-container", o ? "sprig-border-bottom" : null), ref: n, children: [a("div", { className: "question-header-button-container", children: [a(Zt, { className: "ul-question", id: "ul-question", isHeader: !0, plainText: e, richText: t == null ? void 0 : t.questionHtml }), a(co, {})] }), a(Zt, { className: "ul-caption", id: "ul-caption", plainText: r, richText: t == null ? void 0 : t.captionHtml })] });
|
|
1106
|
-
}, uo = () => a("svg", { fill: "none", height: "10", viewBox: "0 0 13 10", width: "13", xmlns: "http://www.w3.org/2000/svg", children: a("path", { d: "M11.5 1.5L4.5 8.5L1 5", stroke: "#FFFFFF", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }) }), dt = ({ isSubmitDisabled: e, handleSubmit: t }) => a("div", { className: "ul-card-longform__submit-button-container", children: a(Q, { className: "ul-card-longform__submit-button", disabled: e, onClick: t, children: ["OK ", a(uo, {})] }) }), Gt = ({ buttonText: e = "View Prototype", handleClick: t }) => a("button", { className: "prototype-button", onClick: t, children: e }, "prototype-btn"), ie = ({ defaultBody: e, embeddedType: t = "prototype", properties: n }) => {
|
|
1107
|
-
var u;
|
|
1108
|
-
const { handleClickEmbedButton: r, hasViewedEmbed: o, headers: i, useDesktopPrototype: s } = R((d) => ({ handleClickEmbedButton: d.handleClickEmbedButton, hasViewedEmbed: d.hasViewedEmbed, headers: d.headers, useDesktopPrototype: d.useDesktopPrototype })), l = (n == null ? void 0 : n.conceptUrl) || ((u = n == null ? void 0 : n.consentDocument) == null ? void 0 : u.url), c = window.innerWidth < xr, p = i["userleap-platform"], m = (d, h) => {
|
|
1109
|
-
d.preventDefault(), r(h);
|
|
1110
|
-
};
|
|
1111
|
-
if (!s && c && !o && l && ["email", "link"].includes(p)) {
|
|
1112
|
-
if (t === "prototype") return a(Gt, { handleClick: (d) => {
|
|
1113
|
-
m(d, "question.prototype.click");
|
|
1114
|
-
} });
|
|
1115
|
-
if (t === "pdf") return a(Gt, { buttonText: (n == null ? void 0 : n.viewDocumentText) || "View Document", handleClick: (d) => {
|
|
1116
|
-
m(d, "question.agreement.click");
|
|
1117
|
-
} });
|
|
1118
|
-
}
|
|
1119
|
-
return e();
|
|
1120
|
-
}, Jn = ({ isSelected: e, id: t, divId: n, themeColor: r }) => a("div", { "aria-checked": e, "aria-labelledby": `label-${t}`, className: "select-checkbox", id: n, role: "checkbox", style: e ? { backgroundColor: r, borderColor: r, boxShadow: "none" } : {}, tabIndex: 0, children: e && a(Kn, {}) }), Xn = (e, t) => {
|
|
1121
|
-
const n = z(0);
|
|
1122
|
-
return () => {
|
|
1123
|
-
if (e.current) {
|
|
1124
|
-
const r = e.current;
|
|
1125
|
-
r.style.height = "1px";
|
|
1126
|
-
const o = r.scrollHeight + (r.offsetHeight - r.clientHeight), i = parseInt(window.getComputedStyle(r).getPropertyValue("max-height")), s = o <= i ? o : i;
|
|
1127
|
-
n.current !== s && t(), n.current = s, r.style.height = `${s}px`;
|
|
1128
|
-
}
|
|
1129
|
-
};
|
|
1130
|
-
}, Re = ({ ariaLabel: e, border: t, choiceStyle: n = {}, label: r, isSelected: o, value: i, text: s, id: l, isRadio: c, useMobileStyling: p, error: m, allowTextEntry: u, noneOfTheAbove: d, promptText: h, onUserInputChanged: g }) => {
|
|
1131
|
-
const { styleNonce: x, viewDocument: y } = R((w) => ({ styleNonce: w.styleNonce, viewDocument: w.viewDocument })), [k, b] = F(!1);
|
|
1132
|
-
mo(y, t, x);
|
|
1133
|
-
const S = ({ isSelected: w, userText: L }) => {
|
|
1134
|
-
g && g({ id: l, selected: w, value: i, userText: L, noneOfTheAbove: d });
|
|
1135
|
-
}, E = (w) => {
|
|
1136
|
-
w.stopPropagation(), S({ isSelected: c || !o, userText: s }), b(!1);
|
|
1137
|
-
}, f = () => {
|
|
1138
|
-
k || b(!0);
|
|
1139
|
-
}, v = () => {
|
|
1140
|
-
k && b(!1);
|
|
1141
|
-
}, _ = { onClick: (w) => E(w), onKeyPress: (w) => ((L) => {
|
|
1142
|
-
L.key !== "Enter" && L.key !== " " || E(L);
|
|
1143
|
-
})(w) };
|
|
1144
|
-
"ontouchstart" in y.documentElement ? (_.onTouchStart = v, _.onTouchCancel = v, _.onTouchEnd = v) : (_.onMouseDown = f, _.onMouseLeave = v);
|
|
1145
|
-
const N = c ? `radio-${l}` : `checkbox-${l}`, I = o || k ? [Ne] : [], P = [...m ? [er] : [], ...I], C = r ? { "aria-labelledby": `label-${l}` } : { "aria-label": e };
|
|
1146
|
-
return a("div", { className: q(V("choice", p), ...P), id: `choice-div-${l}`, style: { ...n, ...m ? { borderColor: be } : {} }, ..._, children: [a("div", { className: q("choice-label-container"), children: [c ? a("div", { ...C, className: q("select-radio", ...I), id: N, role: "radio", tabIndex: 0 }) : a(Jn, { divId: N, id: l, isSelected: o, themeColor: t }), r && a("label", { className: q(V("select-label", p)), htmlFor: N, id: `label-${l}`, children: r })] }), u && o && a("div", { className: q("choice-text-entry-container", ...I), children: a(po, { onTextChange: (w) => S({ isSelected: o, userText: w }), promptText: h || "Please specify", textValue: s, useMobileStyling: p }) })] });
|
|
1147
|
-
}, po = ({ promptText: e, textValue: t, onTextChange: n, useMobileStyling: r }) => {
|
|
1148
|
-
const o = z(null), { update: i } = R((l) => ({ update: l.update })), s = Xn(o, () => i());
|
|
1149
|
-
return A(() => (s(), o.current && o.current.focus(), () => {
|
|
1150
|
-
i();
|
|
1151
|
-
}), []), a("textarea", { "aria-label": e, "aria-multiline": "true", "aria-placeholder": e, className: q(V("choice-text-input", r)), "data-gramm": "false", maxLength: 5e3, name: "text", onChange: (l) => {
|
|
1152
|
-
s(), l.stopPropagation(), n(l.currentTarget.value);
|
|
1153
|
-
}, onClick: (l) => {
|
|
1154
|
-
l.stopPropagation();
|
|
1155
|
-
}, onKeyPress: (l) => {
|
|
1156
|
-
l.stopPropagation();
|
|
1157
|
-
}, placeholder: e, ref: o, role: "textbox", rows: 1, value: t });
|
|
1158
|
-
}, Kt = "ul-select-style-element", Ne = "ul-select-active-dynamic-style", er = "ul-select-error-dynamic-style", mo = (e, t, n) => {
|
|
1159
|
-
let r = e.getElementById(Kt), o = !1;
|
|
1160
|
-
r || (r = e.createElement("style"), o = !0), r.tagName.toLowerCase() === "style" && (r.id = Kt, n && (r.nonce = n), r.textContent = ho(t), o && e.head.appendChild(r));
|
|
1161
|
-
}, ho = (e) => `
|
|
1162
|
-
.${Ne} {
|
|
1163
|
-
border-color: ${e};
|
|
1164
|
-
}
|
|
1165
|
-
.${Ne} .select-radio, .${Ne}.select-radio {
|
|
1166
|
-
border: 6px solid ${e};
|
|
1167
|
-
box-shadow: none;
|
|
1168
|
-
}
|
|
1169
|
-
.${er} {
|
|
1170
|
-
border-color: ${be};
|
|
1171
|
-
}
|
|
1172
|
-
`, se = ({ children: e }) => a("div", { className: "sprig-question-body", children: e }), ue = ({ children: e }) => {
|
|
1173
|
-
const t = Yn();
|
|
1174
|
-
return a("div", { className: q("sprig-question-footer-container", t ? "sprig-border-top" : null), children: e });
|
|
1175
|
-
}, tr = ({ logoOnly: e = !1, style: t = {} }) => a("svg", { alt: (e ? "Powered by " : "") + "Sprig", width: e ? "35" : "112", height: "15", viewBox: e ? "79 0 31 15" : "0 0 112 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { display: "block", ...t }, children: [!e && a("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" }), a("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" }), a("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" }), a("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" }), a("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" }), a("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" })] }), nr = ({ forceBrandedLogo: e, marketingUrlLink: t }) => a("div", { className: e ? "yellow-footer-logo" : "", style: { marginTop: "4px", marginBottom: "4px" }, children: a("a", { href: t, rel: "noreferrer", target: "_blank", children: a("div", { style: { display: "flex" }, children: [a(tr, { logoOnly: !1 }), e && a(ut, { style: { display: "block", margin: "auto 0 auto 4px", transform: "rotateY(0deg) rotate(-45deg)" } })] }) }) }), rr = ({ marketingUrlLink: e }) => a("a", { dir: "ltr", href: e, rel: "noreferrer", target: "_blank", children: a("div", { className: "thank-you-card-link", children: [a("div", { className: "sprig-box-logo", children: a(tr, { logoOnly: !0, style: { margin: "auto" } }) }), a("div", { children: a("p", { children: ["Capture insights about your own product", a(ut, { style: { display: "inline-flex", marginInlineStart: "4px", verticalAlign: "middle" } })] }) })] }) }), ge = (e) => (e == null ? void 0 : e.buttonText) || "Next", or = (e) => (e == null ? void 0 : e.skipButtonText) || "Skip", ir = ({ marketingUrl: e, slugName: t, surveyId: n, forceBrandedLogo: r }) => `${e}?utm_source=survey_branding&utm_medium=website&utm_campaign=${t}&utm_content=${n}${r ? "&utm_term=poweredby_pill" : ""}`, fo = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i }) => {
|
|
1176
|
-
const { useMobileStyling: s, border: l, isLongFormSurvey: c, focusedQuestionId: p } = R((w) => ({ useMobileStyling: w.useMobileStyling, border: w.border, isLongFormSurvey: K(w.studyType), focusedQuestionId: w.focusedQuestionId })), [m, u] = F(!1), [d, h] = F(""), [g, x] = F(!1), y = c && p === o, k = r == null ? void 0 : r.collectName, b = (r == null ? void 0 : r.nameLabelText) || "Full Name", S = (r == null ? void 0 : r.consentText) || "I agree to the stated conditions", E = (r == null ? void 0 : r.submitButtonText) || "Submit", f = !!d.trim(), v = m && (!k || f), _ = (w, L = !1) => {
|
|
1177
|
-
w.preventDefault(), w.stopPropagation();
|
|
1178
|
-
let O = null;
|
|
1179
|
-
if (!L) {
|
|
1180
|
-
if (!v) return void x(!0);
|
|
1181
|
-
O = { submitted: !0 }, k && (O.name = d);
|
|
1182
|
-
}
|
|
1183
|
-
n({ value: O, questionId: o, type: i }, v);
|
|
1184
|
-
}, N = (w) => {
|
|
1185
|
-
w.preventDefault(), w.stopPropagation(), h(w.currentTarget.value);
|
|
1186
|
-
}, I = (w) => {
|
|
1187
|
-
w.currentTarget.style.borderColor = g && !f ? be : l;
|
|
1188
|
-
}, P = (w) => {
|
|
1189
|
-
w.currentTarget.style.borderColor = g && !f ? be : Xe;
|
|
1190
|
-
}, C = () => a(ue, { children: [a("div", { className: "sprig-stretch", children: [a(Re, { allowTextEntry: !1, border: l, error: g && !m, id: "consent", isRadio: !1, isSelected: m, label: S, onUserInputChanged: ({ selected: w }) => {
|
|
1191
|
-
w !== m && u(!m);
|
|
1192
|
-
}, useMobileStyling: s }), k && a("input", { "aria-label": b, "aria-placeholder": b, className: q(V("ul-consent-legal__name-input", s)), "data-gramm": "false", maxLength: 250, name: "name", onBlur: P, onFocus: I, onInput: N, placeholder: b, style: g && !f ? { borderColor: be } : {}, tabIndex: 0, value: d })] }), a("div", { className: "ul-card__button-wrapper ul-card-vertical__button-wrapper", children: [a(Q, { className: v ? "" : "sprig-button-disabled", onClick: _, children: E }), r.required === !1 && !c && a("button", { className: "ul-card-skip__button", onClick: (w) => _(w, !0), children: or(r) })] })] });
|
|
1193
|
-
return a("div", { className: q(e, c && !y && "ul-card--unfocused", "ul-card__consent-legal", "fade-in-transition"), children: [a(X, { message: t, properties: { questionHtml: r.questionHtml } }), a(B, { children: [r != null && r.richTextBody ? a(se, { children: a("div", { className: "ul-rich-text-body", dangerouslySetInnerHTML: r != null && r.richTextBody ? { __html: r.richTextBody } : void 0, id: "ul-card__consent-legal-body-container" }) }) : null, a(ie, { properties: r, defaultBody: C, embeddedType: "pdf" })] })] }, o);
|
|
1194
|
-
}, go = ({ icon: e, scaleLabelType: t, value: n, selectedValue: r }) => {
|
|
1195
|
-
if (t === "smiley" && n === r) {
|
|
1196
|
-
let o = 0;
|
|
1197
|
-
return e.replace(/black/g, () => ++o == 1 ? "black" : "white");
|
|
1198
|
-
}
|
|
1199
|
-
return e;
|
|
1200
|
-
}, _o = ({ activeValue: e, border: t, icon: n, isPressed: r, onSubmit: o, range: i, scaleLabelType: s, selectedValue: l, setSelectedValue: c, setActiveValue: p, setIsPressed: m, useMobileStyling: u, value: d, viewDocument: h }) => {
|
|
1201
|
-
const { isLongFormSurvey: g } = R((_) => ({ isLongFormSurvey: K(_.studyType) })), x = `option-${d}`, y = s === "number", k = s === "star", b = s === "smiley", S = y && d === e || d === l, [E, f] = (() => {
|
|
1202
|
-
const _ = k && l !== null && d <= l;
|
|
1203
|
-
return k && d <= e || b && d === e || _ || d === e || d === l ? [t, r || _ || d === l ? 1 : 0.3] : ["", 1];
|
|
1204
|
-
})(), v = re(() => {
|
|
1205
|
-
const _ = { borderColor: S ? E : "", fillOpacity: S ? "" : f, zIndex: S ? 3 : "auto", color: l === d ? "#fff" : "" };
|
|
1206
|
-
return y ? { ..._, backgroundColor: l === d ? E : "" } : { ..._, color: k || b || l === d ? E : "" };
|
|
1207
|
-
}, [S, E, f, l, d, y, k, b]);
|
|
1208
|
-
return a("button", { "aria-label": y ? void 0 : String(d), className: (() => {
|
|
1209
|
-
switch (s) {
|
|
1210
|
-
case "star":
|
|
1211
|
-
return q(V("likert-star", u), V(`likert-star-${d}`, u));
|
|
1212
|
-
case "smiley":
|
|
1213
|
-
return q(V("likert-smiley", u), V(`likert-smiley-${d}`, u));
|
|
1214
|
-
default:
|
|
1215
|
-
return d === i ? q(V("likert-number", u), V(`likert-number-${d}`, u), V("likert-last-option", u)) : q(V("likert-number", u), V(`likert-number-${d}`, u));
|
|
1216
|
-
}
|
|
1217
|
-
})(), dangerouslySetInnerHTML: { __html: go({ icon: n, scaleLabelType: s, value: d, selectedValue: l }) }, id: x, onClick: (_) => {
|
|
1218
|
-
g && (_.preventDefault(), _.stopPropagation(), c(d)), o();
|
|
1219
|
-
}, onKeyDown: (_) => {
|
|
1220
|
-
var P, C;
|
|
1221
|
-
const N = h.querySelectorAll(`.likert-${s ?? "number"}`), I = d - 1;
|
|
1222
|
-
_.key === "ArrowRight" ? (P = N[I + 1]) == null || P.focus() : _.key === "ArrowLeft" ? (C = N[I - 1]) == null || C.focus() : _.key !== "Enter" && _.key !== " " || (g && (_.preventDefault(), _.stopPropagation(), c(d)), o());
|
|
1223
|
-
}, onPointerDown: () => m(!0), onPointerEnter: () => p(d), onPointerLeave: () => {
|
|
1224
|
-
p(-1), m(!1);
|
|
1225
|
-
}, style: v, tabIndex: 0 });
|
|
1226
|
-
}, bo = ({ className: e, labels: t, message: n, next: r, properties: o, questionId: i, type: s }) => {
|
|
1227
|
-
const { border: l, useMobileStyling: c, viewDocument: p, isLongFormSurvey: m, focusedQuestionId: u } = R((L) => ({ border: L.border, useMobileStyling: L.useMobileStyling, viewDocument: L.viewDocument, isLongFormSurvey: K(L.studyType), focusedQuestionId: L.focusedQuestionId })), [d, h] = F(-1), [g, x] = F(!1), [y, k] = F(null), b = m && u === i, S = t && t.left, E = t && t.right;
|
|
1228
|
-
let f;
|
|
1229
|
-
const { range: v, scaleLabelType: _, ratingIcons: N } = o;
|
|
1230
|
-
v && (f = Number(v));
|
|
1231
|
-
const I = f || 5, P = (L) => {
|
|
1232
|
-
var O, T;
|
|
1233
|
-
switch (_) {
|
|
1234
|
-
case "star":
|
|
1235
|
-
return (O = N[0]) == null ? void 0 : O.svg;
|
|
1236
|
-
case "smiley":
|
|
1237
|
-
return (T = N[L]) == null ? void 0 : T.svg;
|
|
1238
|
-
default:
|
|
1239
|
-
return String(L + 1);
|
|
1240
|
-
}
|
|
1241
|
-
}, C = [...Array(I)].map((L, O) => {
|
|
1242
|
-
const T = O + 1;
|
|
1243
|
-
return a(_o, { activeValue: d, border: l, icon: P(O), isPressed: g, onSubmit: () => r({ value: T, questionId: i, type: s }, !0), range: I, scaleLabelType: _, selectedValue: y, setActiveValue: h, setIsPressed: x, setSelectedValue: k, useMobileStyling: c, value: T, viewDocument: p }, O);
|
|
1244
|
-
}), w = (L) => {
|
|
1245
|
-
L.preventDefault(), L.stopPropagation(), r({ value: null, questionId: i, type: s }, !0);
|
|
1246
|
-
};
|
|
1247
|
-
return a("form", { className: q(e, "ul-card--likert", "fade-in-transition", m && !b && "ul-card--unfocused"), children: [a(X, { message: n, properties: o }), a(ie, { properties: o, defaultBody: () => a(B, { children: [a(se, { children: [a("div", { "aria-label": `Rating (1 - ${I})`, className: "ul-card--likert__numbers", role: "radiogroup", children: C }), a("div", { className: "ul-card--likert__labels", children: [a("span", { children: S }), a("span", { children: E })] })] }), !o.required && !m && a(ue, { children: a("div", { className: "ul-vertical-centered-container", children: a(Q, { onClick: w, children: ge(o) }) }) })] }) })] }, i);
|
|
1248
|
-
}, sr = (e) => e && (e.scrollHeight > e.offsetHeight ? e : sr(e.parentElement)), vo = (e) => {
|
|
1249
|
-
if (!e || !((n) => n instanceof HTMLElement)(e)) return 0;
|
|
1250
|
-
const t = getComputedStyle(e);
|
|
1251
|
-
return parseFloat(t.marginTop) + parseFloat(t.marginBottom) + (parseFloat(t.borderTopWidth) + parseFloat(t.borderBottomWidth));
|
|
1252
|
-
}, yo = ({ columns: e, onSelect: t, options: n, selectedOptions: r }) => {
|
|
1253
|
-
const o = z([]), { border: i, useMobileStyling: s } = R((d) => ({ border: d.border, useMobileStyling: d.useMobileStyling })), l = n.findIndex((d) => r[d.id] === null), [c, p] = F(l), m = le((d, h) => {
|
|
1254
|
-
t(d, h);
|
|
1255
|
-
const g = c + 1, x = n[g];
|
|
1256
|
-
if (x && r[x.id] === null) {
|
|
1257
|
-
p(g);
|
|
1258
|
-
const y = o.current[c];
|
|
1259
|
-
if (y != null && y.firstElementChild) {
|
|
1260
|
-
const k = sr(y), b = y.firstElementChild, S = vo(y) + b.clientHeight;
|
|
1261
|
-
k == null || k.scrollTo(0, y.offsetTop + S);
|
|
1262
|
-
}
|
|
1263
|
-
}
|
|
1264
|
-
}, [t, n, r, c]), u = le((d, h) => {
|
|
1265
|
-
const g = c === d;
|
|
1266
|
-
return a(ao, { animate: !0, header: h.label, isOpen: g, onClick: () => p(g && !window.UserLeap.isMobileSDK ? -1 : d), ref: (x) => {
|
|
1267
|
-
x && (o.current[d] = x);
|
|
1268
|
-
}, showHeaderCheck: r[h.id] !== null, children: a("div", { style: { paddingTop: "12px" }, children: e.map((x) => a(Re, { allowTextEntry: !1, ariaLabel: `${h.label}-${x.label}`, border: i, error: !1, id: `${h.id}-${x.value}`, isRadio: !0, isSelected: r[h.id] === x.value, label: x.label, onUserInputChanged: () => m(h.id, x.value), useMobileStyling: s }, x.label)) }) }, h.id);
|
|
1269
|
-
}, [i, e, c, m, r, s]);
|
|
1270
|
-
return a("div", { children: n.map((d, h) => u(h, d)) });
|
|
1271
|
-
}, xo = ({ columns: e, onSelect: t, options: n, selectedOptions: r }) => {
|
|
1272
|
-
const { border: o, useMobileStyling: i, isLongFormSurvey: s } = R((d) => ({ border: d.border, useMobileStyling: d.useMobileStyling, isLongFormSurvey: K(d.studyType) })), l = n.length, c = e.length, p = z(null), [m, u] = F(!1);
|
|
1273
|
-
return A(() => {
|
|
1274
|
-
const d = p.current, h = new ResizeObserver((g) => {
|
|
1275
|
-
window.requestAnimationFrame(() => {
|
|
1276
|
-
d && u(Math.round(g[0].contentRect.width) < d.scrollWidth);
|
|
1277
|
-
});
|
|
1278
|
-
});
|
|
1279
|
-
return d && h.observe(d), () => {
|
|
1280
|
-
d && h.unobserve(d);
|
|
1281
|
-
};
|
|
1282
|
-
}, []), a("div", { className: "ul-card--matrix_question_container", children: [a("div", { className: q("ul-card--matrix_container", m && "ul-matrix-scroll-gradient"), onScroll: () => {
|
|
1283
|
-
(() => {
|
|
1284
|
-
const d = p.current;
|
|
1285
|
-
d && u(d.clientWidth + Math.abs(d.scrollLeft) < d.scrollWidth);
|
|
1286
|
-
})();
|
|
1287
|
-
}, ref: p, children: a("div", { className: q(s && "ul-card--matrix_grid_longform", "ul-card--matrix_grid"), style: `--numColumns: ${c}; --numRows: ${l + 1};`, children: [a("div", {}), " ", e.map((d) => a("div", { className: "ul-matrix-column-label", children: d.label }, d.label)), n.map((d) => a(B, { children: [a("div", { "aria-label": d.label, className: "ul-matrix-row-label", children: d.label }, d.label), a("div", { className: "ul-matrix-row-options", role: "radiogroup", children: e.map((h, g) => a("div", { className: q("ul-matrix-option-wrapper", g === c - 1 && "ul-matrix-last-option"), children: a(Re, { allowTextEntry: !1, ariaLabel: `${d.label}-${h.label}`, border: o, choiceStyle: { background: "transparent", border: "none", marginBottom: "0", padding: "0" }, error: !1, id: `${d.id}-${h.value}`, isRadio: !0, isSelected: r[d.id] === h.value, onUserInputChanged: () => t(d.id, h.value), useMobileStyling: i }) }, h.value)) })] }))] }) }), m && a("button", { className: "ul-matrix-scroll-arrow", onClick: (d) => {
|
|
1288
|
-
d.preventDefault();
|
|
1289
|
-
const h = p.current;
|
|
1290
|
-
if (h) {
|
|
1291
|
-
const g = getComputedStyle(h).direction === "rtl";
|
|
1292
|
-
h.scrollLeft = g ? h.clientWidth - h.scrollWidth : h.scrollWidth;
|
|
1293
|
-
}
|
|
1294
|
-
}, children: a("svg", { fill: "currentColor", height: "32", viewBox: "0 0 256 256", width: "32", xmlns: "http://www.w3.org/2000/svg", children: a("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" }) }) })] });
|
|
1295
|
-
}, ko = ({ className: e, message: t, next: n, options: r, properties: o, questionId: i, type: s, showIndividualSubmit: l = !1, onSubmitButtonClick: c }) => {
|
|
1296
|
-
const { useMobileStyling: p, isLongFormSurvey: m, focusedQuestionId: u, setFocusedQuestionId: d } = R((_) => ({ useMobileStyling: _.useMobileStyling, isLongFormSurvey: K(_.studyType), focusedQuestionId: _.focusedQuestionId, setFocusedQuestionId: _.setFocusedQuestionId })), h = o.matrixColumn, g = o.required, x = m && u === i, y = (_) => {
|
|
1297
|
-
_.preventDefault(), _.stopPropagation(), n({ value: b, questionId: i, type: s }, !0), c && c();
|
|
1298
|
-
}, k = r.reduce((_, N) => (_[N.id] = null, _), {}), [b, S] = F(k), E = (_) => g && Object.values(_).every((N) => N == null), f = (_, N) => {
|
|
1299
|
-
m && n({ value: { ...b, [_]: N }, questionId: i, type: s }, !E({ ...b, [_]: N })), S((I) => ({ ...I, [_]: N }));
|
|
1300
|
-
}, v = o.displayMatrixAsAccordion || p;
|
|
1301
|
-
return a("form", { className: q(e, !m && "ul-card__matrix", "fade-in-transition", m && !x && "ul-card--unfocused"), id: "text-form", onClick: () => {
|
|
1302
|
-
x && d(i);
|
|
1303
|
-
}, onSubmit: y, children: [a(X, { message: t, properties: o }), a(ie, { properties: o, defaultBody: () => a(B, { children: [a(se, { children: [a(v ? yo : xo, { columns: h, onSelect: f, options: r, selectedOptions: b }), l && a(dt, { handleSubmit: y, isSubmitDisabled: E(b) })] }), !m && a(ue, { children: a("div", { className: "ul-card__button-wrapper", children: a(Q, { disabled: E(b), children: ge(o) }) }) })] }) })] }, i);
|
|
1304
|
-
}, wo = ({ options: e, selectItem: t, selectedOptions: n, showCheckbox: r }) => {
|
|
1305
|
-
const { themeColor: o } = R((i) => ({ doc: i.viewDocument, themeColor: i.border }));
|
|
1306
|
-
return a("div", { className: "select-list", children: e.map((i) => {
|
|
1307
|
-
return a("div", { className: "select-option", onClick: (l) => {
|
|
1308
|
-
t(i), l.stopPropagation();
|
|
1309
|
-
}, role: "option", children: [r && a(Jn, { divId: (s = i.id, `checkbox-div-${s}`), id: i.id, isSelected: n.includes(i), themeColor: o }), i.label] }, i.id);
|
|
1310
|
-
var s;
|
|
1311
|
-
}) });
|
|
1312
|
-
}, Co = ({ isMultiSelect: e = !1, multiselectText: t = "choices selected", onChange: n, options: r, placeholderText: o, value: i }) => {
|
|
1313
|
-
const [s, l] = F(!1), { viewDocument: c, update: p } = R((d) => ({ viewDocument: d.viewDocument, update: d.update })), m = () => {
|
|
1314
|
-
l(!s), p();
|
|
1315
|
-
};
|
|
1316
|
-
A(() => {
|
|
1317
|
-
var h;
|
|
1318
|
-
const d = () => {
|
|
1319
|
-
l(!1), p();
|
|
1320
|
-
};
|
|
1321
|
-
c.addEventListener("click", d);
|
|
1322
|
-
try {
|
|
1323
|
-
(h = window.parent) == null || h.addEventListener("click", d);
|
|
1324
|
-
} catch {
|
|
1325
|
-
window.addEventListener("click", d);
|
|
1326
|
-
}
|
|
1327
|
-
return () => {
|
|
1328
|
-
var g;
|
|
1329
|
-
c.removeEventListener("click", d);
|
|
1330
|
-
try {
|
|
1331
|
-
(g = window.parent) == null || g.removeEventListener("click", d);
|
|
1332
|
-
} catch {
|
|
1333
|
-
window.removeEventListener("click", d);
|
|
1334
|
-
}
|
|
1335
|
-
};
|
|
1336
|
-
}, [c, p]);
|
|
1337
|
-
const u = i.length === 0 ? ["select-button-placeholder"] : [];
|
|
1338
|
-
return a(B, { children: [a("button", { "aria-label": "choice dropdown button", className: q("select-button", ...u), onClick: (d) => {
|
|
1339
|
-
d.stopPropagation(), m();
|
|
1340
|
-
}, type: "button", children: [a("span", { children: i.length === 0 ? o : i.length === 1 ? i[0].label : `${i.length} ${t}` }), a(Gn, {})] }), s && a(wo, { options: r, selectedOptions: i, selectItem: (d) => {
|
|
1341
|
-
var x;
|
|
1342
|
-
const h = i.some((y) => y.id === d.id), g = i.some((y) => {
|
|
1343
|
-
var k;
|
|
1344
|
-
return (k = y.optionProperties) == null ? void 0 : k.noneOfTheAbove;
|
|
1345
|
-
});
|
|
1346
|
-
(x = d.optionProperties) != null && x.noneOfTheAbove && !h ? n([d]) : e ? n(h ? i.filter((y) => y.id !== d.id) : g ? [d] : [...i, d]) : h || n([d]), e || m();
|
|
1347
|
-
}, showCheckbox: e })] });
|
|
1348
|
-
}, ar = ({ className: e, message: t, onSubmit: n, options: r = [], properties: o, questionId: i, type: s, showIndividualSubmit: l = !1, onSubmitButtonClick: c }) => {
|
|
1349
|
-
const { border: p, useMobileStyling: m, isLongFormSurvey: u, focusedQuestionId: d, setFocusedQuestionId: h } = R((C) => ({ border: C.border, useMobileStyling: C.useMobileStyling, isLongFormSurvey: K(C.studyType), focusedQuestionId: C.focusedQuestionId, setFocusedQuestionId: C.setFocusedQuestionId })), g = u && d === i, x = r.reduce((C, w) => (C[w.id] = { isSelected: !1 }, C), {}), [y, k] = F(x), b = s === "multiplechoice", S = o.required, E = r.find((C) => {
|
|
1350
|
-
var w;
|
|
1351
|
-
return (w = C.optionProperties) == null ? void 0 : w.noneOfTheAbove;
|
|
1352
|
-
}), f = (C) => ((w) => Object.entries(w).some(([L, O]) => {
|
|
1353
|
-
var H;
|
|
1354
|
-
const T = r.find((U) => `${U.id}` === L), j = O.userText === void 0 || O.userText.trim() === "";
|
|
1355
|
-
return ((H = T == null ? void 0 : T.optionProperties) == null ? void 0 : H.allowsTextEntry) && j && O.isSelected;
|
|
1356
|
-
}))(C) || S && !((w) => Object.values(w).some((L) => L.isSelected))(C), v = Object.entries(y).some(([C, w]) => {
|
|
1357
|
-
var L, O;
|
|
1358
|
-
return w.isSelected && ((O = (L = r.find((T) => `${T.id}` === C)) == null ? void 0 : L.optionProperties) == null ? void 0 : O.allowsTextEntry);
|
|
1359
|
-
}), _ = l && (!b || v), N = r.map(({ id: C, label: w, value: L, optionProperties: O }) => {
|
|
1360
|
-
var U, W;
|
|
1361
|
-
const T = `${C}`, { allowsTextEntry: j, noneOfTheAbove: H } = { allowsTextEntry: !1, noneOfTheAbove: !1, ...O };
|
|
1362
|
-
return a(Re, { allowTextEntry: j, border: p, error: !1, id: T, isRadio: b, isSelected: !!((U = y[T]) != null && U.isSelected), label: w, noneOfTheAbove: H, onUserInputChanged: ($) => {
|
|
1363
|
-
P($.id, $.selected, $.userText, $.noneOfTheAbove), $.selected && u && !b && !g && h(i);
|
|
1364
|
-
}, promptText: "Please specify", text: (W = y[C]) == null ? void 0 : W.userText, useMobileStyling: m, value: L }, T);
|
|
1365
|
-
}), I = (C) => {
|
|
1366
|
-
C.preventDefault(), C.stopPropagation(), n(y, !0), c && c();
|
|
1367
|
-
}, P = (C, w, L, O) => {
|
|
1368
|
-
const T = Object.assign({}, y);
|
|
1369
|
-
if ((b || O) && w) for (const U of Object.values(T)) U.isSelected = !1, delete U.userText;
|
|
1370
|
-
else E && !O && y[E.id].isSelected && (T[E.id].isSelected = !1);
|
|
1371
|
-
T[C] = { isSelected: w, userText: L };
|
|
1372
|
-
const j = b && Object.entries(T).some(([U, W]) => {
|
|
1373
|
-
var $, oe;
|
|
1374
|
-
return W.isSelected && ((oe = ($ = r.find((gr) => `${gr.id}` === U)) == null ? void 0 : $.optionProperties) == null ? void 0 : oe.allowsTextEntry);
|
|
1375
|
-
}), H = !f(T);
|
|
1376
|
-
u && (n(T, H), b && !j && H && c && c()), k(T);
|
|
1377
|
-
};
|
|
1378
|
-
return a("form", { className: q(e, "ul-card--multiple", "fade-in-transition", u && !g && "ul-card--unfocused"), id: "text-form", onClick: s === "multipleselect" ? () => {
|
|
1379
|
-
u && d !== i && s === "multipleselect" && h(i);
|
|
1380
|
-
} : void 0, onSubmit: I, children: [a(X, { message: t, properties: o }), a(ie, { properties: o, defaultBody: () => a(B, { children: [a(se, { children: [o.isDropdown ? a(Co, { isMultiSelect: !b, multiselectText: o.dropdownMultiselectedText ?? "choices selected", onChange: (C) => {
|
|
1381
|
-
const w = { ...y };
|
|
1382
|
-
for (const L of r) C.includes(L) ? w[L.id].isSelected = !0 : w[L.id].isSelected = !1;
|
|
1383
|
-
u && n(w, !f(w)), k(w);
|
|
1384
|
-
}, options: r, placeholderText: o.dropdownPlaceholderText ?? (b ? "Select choice" : "Select choice(s)"), value: r.filter((C) => y[C.id].isSelected) }) : a("div", { className: q(V("ul-card__choices", m)), role: b ? "radiogroup" : "group", children: N }), _ && a(dt, { handleSubmit: I, isSubmitDisabled: f(y) })] }), !u && a(ue, { children: a("div", { className: "ul-card__button-wrapper", children: a(Q, { disabled: f(y), onClick: I, children: ge(o) }) }) })] }) })] }, i);
|
|
1385
|
-
}, So = (e) => {
|
|
1386
|
-
const { questionId: t, type: n, next: r, options: o } = e, { setFocusedQuestionId: i } = R((s) => ({ setFocusedQuestionId: s.setFocusedQuestionId }));
|
|
1387
|
-
return a(ar, { ...e, onSubmit: (s, l) => {
|
|
1388
|
-
var h;
|
|
1389
|
-
const c = Object.entries(s).find(([, g]) => g.isSelected) || [void 0, void 0], [p, m] = c, u = o.find((g) => `${g.id}` === p);
|
|
1390
|
-
!((h = u == null ? void 0 : u.optionProperties) != null && h.allowsTextEntry) || m != null && m.userText && m.userText.trim() !== "" || i(t);
|
|
1391
|
-
const d = m != null && m.userText ? { [p]: { userText: m.userText } } : null;
|
|
1392
|
-
r({ value: u && p ? { [p]: u.value } : {}, secondaryValue: d, questionId: t, type: n }, l);
|
|
1393
|
-
} });
|
|
1394
|
-
}, Io = (e) => {
|
|
1395
|
-
const { questionId: t, type: n, next: r } = e;
|
|
1396
|
-
return a(ar, { ...e, onSubmit: (o, i) => {
|
|
1397
|
-
const s = Object.entries(o).reduce((c, [p, m]) => (c[p] = m.isSelected, c), {}), l = Object.entries(o).reduce((c, [p, m]) => {
|
|
1398
|
-
if (!m.userText) return c;
|
|
1399
|
-
const u = c || {};
|
|
1400
|
-
return u[p] = { userText: m.userText }, u;
|
|
1401
|
-
}, null);
|
|
1402
|
-
r({ value: s, secondaryValue: l, questionId: t, type: n }, i);
|
|
1403
|
-
} });
|
|
1404
|
-
}, To = ({ className: e, labels: t, message: n, properties: r, next: o, questionId: i, type: s }) => {
|
|
1405
|
-
const [l, c] = F(null), { border: p, useMobileStyling: m, viewDocument: u, isLongFormSurvey: d, focusedQuestionId: h } = R((S) => ({ border: S.border, useMobileStyling: S.useMobileStyling, viewDocument: S.viewDocument, isLongFormSurvey: K(S.studyType), focusedQuestionId: S.focusedQuestionId })), g = d && h === i, x = t && t.left, y = t && t.right, k = [...Array(11)].map((S, E) => a("button", { className: q(V("nps-number", m), V(`nps-number-${E}`, m)), id: `option-${E}`, onClick: (f) => {
|
|
1406
|
-
d && (f.preventDefault(), f.stopPropagation(), c(E)), o({ value: E, questionId: i, type: s }, !0);
|
|
1407
|
-
}, onKeyDown: (f) => {
|
|
1408
|
-
var _, N;
|
|
1409
|
-
const v = u.querySelectorAll("button.nps-number");
|
|
1410
|
-
f.key === "ArrowRight" ? (_ = v[E + 1]) == null || _.focus() : f.key === "ArrowLeft" ? (N = v[E - 1]) == null || N.focus() : f.key !== "Enter" && f.key !== " " || (d && (f.preventDefault(), f.stopPropagation(), c(E)), o({ value: E, questionId: i, type: s }, !0));
|
|
1411
|
-
}, onPointerDown: (f) => {
|
|
1412
|
-
f.currentTarget.style.zIndex = "2", f.currentTarget.style.borderColor = p;
|
|
1413
|
-
}, onPointerLeave: (f) => {
|
|
1414
|
-
f.currentTarget.style.zIndex = "auto", f.currentTarget.style.borderColor = Xe;
|
|
1415
|
-
}, style: l === E ? { backgroundColor: p, color: "#fff" } : void 0, tabIndex: 0, children: E }, E)), b = (S) => {
|
|
1416
|
-
S.preventDefault(), S.stopPropagation(), o({ value: null, questionId: i, type: s }, !0);
|
|
1417
|
-
};
|
|
1418
|
-
return a("form", { className: q(e, "ul-card--nps", "fade-in-transition", d && !g && "ul-card--unfocused"), children: [a(X, { message: n, properties: r }), a(ie, { properties: r, defaultBody: () => a(B, { children: [a(se, { children: [a("div", { className: "ul-card--nps__numbers", children: k }), a("div", { className: "ul-card--nps__labels", children: [a("span", { children: x }), a("span", { children: y })] })] }), !r.required && !d && a(ue, { children: a("div", { className: "ul-vertical-centered-container", children: a(Q, { onClick: b, children: ge(r) }) }) })] }) })] }, i);
|
|
1419
|
-
}, No = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i, showIndividualSubmit: s = !1, onSubmitButtonClick: l }) => {
|
|
1420
|
-
const { border: c, useMobileStyling: p, update: m, isLongFormSurvey: u, focusedQuestionId: d, setFocusedQuestionId: h } = R((P) => ({ border: P.border, useMobileStyling: P.useMobileStyling, update: P.update, isLongFormSurvey: K(P.studyType), focusedQuestionId: P.focusedQuestionId, setFocusedQuestionId: P.setFocusedQuestionId })), [g, x] = F(""), y = z(null), k = u && d === o;
|
|
1421
|
-
A(() => {
|
|
1422
|
-
var P, C;
|
|
1423
|
-
u && (k ? (P = y.current) == null || P.focus() : (C = y.current) == null || C.blur());
|
|
1424
|
-
}, [u, k]);
|
|
1425
|
-
const b = g.trim(), S = r.required === !0 && !b, E = Xn(y, () => m()), f = (P) => {
|
|
1426
|
-
const { value: C } = P.currentTarget;
|
|
1427
|
-
if (E(), P.preventDefault(), P.stopPropagation(), x(C), u) {
|
|
1428
|
-
const w = C.trim().length > 0;
|
|
1429
|
-
n({ value: C, questionId: o, type: i }, w);
|
|
1430
|
-
}
|
|
1431
|
-
}, v = (P) => {
|
|
1432
|
-
P.preventDefault(), P.stopPropagation(), n({ value: g, questionId: o, type: i }, b.length > 0), l && l();
|
|
1433
|
-
}, _ = r && r.openTextPlaceholder ? r.openTextPlaceholder : "", N = (P) => {
|
|
1434
|
-
P.currentTarget.style.borderColor = c, h(o);
|
|
1435
|
-
}, I = (P) => {
|
|
1436
|
-
P.currentTarget.style.borderColor = Xe;
|
|
1437
|
-
};
|
|
1438
|
-
return a("form", { className: q(e, "ul-card-text", "fade-in-transition", u && !k && "ul-card--unfocused"), id: "text-form", onClick: () => {
|
|
1439
|
-
u && d !== o && h(o);
|
|
1440
|
-
}, children: [a(X, { message: t, properties: r }), a(ie, { defaultBody: () => a("div", { className: "ul-card-text", children: [a(se, { children: [a("div", { className: "ul-card-text__container", children: a("textarea", { "aria-describedby": "ul-caption", "aria-labelledby": "ul-question", "aria-multiline": "true", "aria-placeholder": _, className: q(V("ul-card-text__input", p)), "data-gramm": "false", maxLength: 5e3, name: "text", onBlur: I, onChange: f, onFocus: N, placeholder: _, ref: y, role: "textbox", tabIndex: 0 }) }), s && a(dt, { handleSubmit: v, isSubmitDisabled: S })] }), !u && a(ue, { children: [a(Q, { disabled: S, onClick: v, children: ge(r) }), r.footerHtml && a("div", { className: "footer", dangerouslySetInnerHTML: { __html: r.footerHtml } })] })] }), properties: r })] }, o);
|
|
1441
|
-
}, Eo = /* @__PURE__ */ new Set(["open", "matrix", "multipleselect", "multiplechoice"]), Yt = ({ cardInstance: e, moveToNextQuestion: t, showIndividualSubmit: n, submitQuestion: r, updateCardValues: o }) => {
|
|
1442
|
-
const { isLongFormSurvey: i } = R((d) => ({ isLongFormSurvey: K(d.studyType) }));
|
|
1443
|
-
if (!e) return null;
|
|
1444
|
-
const { name: s, type: l, props: c } = e, p = n && Eo.has(l), m = { className: "ul-card", next: (d, h) => r(d, h), questionId: s, type: l, showIndividualSubmit: n, ...p ? { next: (d, h) => {
|
|
1445
|
-
o(d.questionId, d, h ?? !0);
|
|
1446
|
-
}, onSubmitButtonClick: () => t(s) } : {} }, u = (() => {
|
|
1447
|
-
switch (l) {
|
|
1448
|
-
case "consentlegal":
|
|
1449
|
-
return a(fo, { ...m, ...c });
|
|
1450
|
-
case "likert":
|
|
1451
|
-
return a(bo, { ...m, ...c });
|
|
1452
|
-
case "matrix":
|
|
1453
|
-
return a(ko, { ...m, ...c });
|
|
1454
|
-
case "multiplechoice":
|
|
1455
|
-
return a(So, { ...m, ...c });
|
|
1456
|
-
case "multipleselect":
|
|
1457
|
-
return a(Io, { ...m, ...c });
|
|
1458
|
-
case "nps":
|
|
1459
|
-
return a(To, { ...m, ...c });
|
|
1460
|
-
case "open":
|
|
1461
|
-
return a(No, { ...m, ...c });
|
|
1462
|
-
case "recordedtask":
|
|
1463
|
-
return a(Fo, { ...m, ...c });
|
|
1464
|
-
case "texturlprompt":
|
|
1465
|
-
return a(Bo, { ...m, ...c });
|
|
1466
|
-
case "thanks":
|
|
1467
|
-
return a(Vo, { ...m, ...c });
|
|
1468
|
-
case "uploading":
|
|
1469
|
-
return a($o, { ...m, ...c });
|
|
1470
|
-
default:
|
|
1471
|
-
return null;
|
|
1472
|
-
}
|
|
1473
|
-
})();
|
|
1474
|
-
return u ? i ? a("div", { className: "ul-card-scroll-wrapper", children: u }, s) : u : null;
|
|
1475
|
-
}, Lo = ({ isSubmitDisabled: e = !1, onSubmit: t, buttonText: n }) => {
|
|
1476
|
-
var h;
|
|
1477
|
-
const { cards: r, forceBrandedLogo: o, index: i, marketingUrl: s, showSurveyBrand: l, slugName: c, surveyId: p, useMobileStyling: m } = R((g) => ({ cards: g.cards, forceBrandedLogo: g.forceBrandedLogo, index: g.index, marketingUrl: g.marketingUrl, showSurveyBrand: g.showSurveyBrand, slugName: g.slugName, surveyId: g.surveyId, useMobileStyling: g.useMobileStyling })), u = ((h = r[i]) == null ? void 0 : h.type) === "thanks", d = ir({ marketingUrl: s, slugName: c, surveyId: p, forceBrandedLogo: o });
|
|
1478
|
-
return a("footer", { className: q("long-form-question-footer-container", m && "long-form-question-footer-container--mobile", u && "long-form-question-footer-container-center"), children: [u && o ? a(rr, { marketingUrlLink: d }) : a("div", { className: "long-form-question-footer-container-logo", children: l ? a(nr, { forceBrandedLogo: o, marketingUrlLink: d }) : null }), !u && a("div", { className: q("ul-card__button-wrapper", "ul-card-vertical__button-wrapper", "long-form-question-footer-container-actions"), children: a(Q, { className: q("long-form-button", e && "sprig-button-disabled"), disabled: e, onClick: t, children: a("span", { className: "long-form-button-text-container", children: n ?? a(ut, { stroke: "white" }) }) }) })] });
|
|
1479
|
-
}, Po = ({ cards: e, next: t }) => {
|
|
1480
|
-
var E;
|
|
1481
|
-
const [n, r] = F({}), [o, i] = F({}), { isLongFormSurvey: s, focusedQuestionId: l, setFocusedQuestionId: c } = R((f) => ({ isLongFormSurvey: K(f.studyType), focusedQuestionId: f.focusedQuestionId, setFocusedQuestionId: f.setFocusedQuestionId })), p = z(null), m = z(!1), u = z(null), d = le((f) => {
|
|
1482
|
-
var I, P;
|
|
1483
|
-
m.current = !0;
|
|
1484
|
-
const v = e.findIndex((C) => C.name === f);
|
|
1485
|
-
if (!s || f === null || v === -1) return void (m.current = !1);
|
|
1486
|
-
const _ = (I = p.current) == null ? void 0 : I.querySelectorAll(".ul-card-scroll-wrapper")[v], N = (P = p.current) == null ? void 0 : P.closest(".ul-card__container");
|
|
1487
|
-
if (_ && N) {
|
|
1488
|
-
if (_ && N) {
|
|
1489
|
-
const C = _.getBoundingClientRect(), w = N.getBoundingClientRect(), L = C.top - w.top + N.scrollTop, O = L + C.height / 2, T = window.innerHeight - 157;
|
|
1490
|
-
let j;
|
|
1491
|
-
C.height >= T ? j = L : j = O - N.clientHeight / 2;
|
|
1492
|
-
const H = N.clientHeight, U = N.scrollHeight - H, W = Math.max(0, Math.min(j, U));
|
|
1493
|
-
N.scrollTo({ top: W, behavior: "smooth" }), setTimeout(() => {
|
|
1494
|
-
m.current = !1;
|
|
1495
|
-
}, 500);
|
|
1496
|
-
}
|
|
1497
|
-
} else m.current = !1;
|
|
1498
|
-
}, [s, e]);
|
|
1499
|
-
A(() => {
|
|
1500
|
-
l !== null && e.findIndex((f) => f.name === l) !== -1 || c(e[0].name);
|
|
1501
|
-
}, [e, l, c]), A(() => {
|
|
1502
|
-
s && l !== null && (u.current !== l ? d(l) : u.current = null);
|
|
1503
|
-
}, [l, s, d]);
|
|
1504
|
-
const h = le(() => {
|
|
1505
|
-
var w, L;
|
|
1506
|
-
if (m.current) return;
|
|
1507
|
-
const f = (w = p.current) == null ? void 0 : w.closest(".ul-card__container");
|
|
1508
|
-
if (!f) return;
|
|
1509
|
-
const v = (L = p.current) == null ? void 0 : L.querySelectorAll(".ul-card-scroll-wrapper");
|
|
1510
|
-
if (!v || v.length === 0) return;
|
|
1511
|
-
const _ = f.getBoundingClientRect(), N = _.top + _.height / 2;
|
|
1512
|
-
let I = 0, P = 1 / 0;
|
|
1513
|
-
v.forEach((O, T) => {
|
|
1514
|
-
const j = O.getBoundingClientRect(), H = j.top + j.height / 2, U = Math.abs(N - H);
|
|
1515
|
-
U < P && (P = U, I = T);
|
|
1516
|
-
});
|
|
1517
|
-
const C = e[I];
|
|
1518
|
-
u.current = C.name, c(C.name);
|
|
1519
|
-
}, [e, c]);
|
|
1520
|
-
A(() => {
|
|
1521
|
-
var v;
|
|
1522
|
-
if (!s) return;
|
|
1523
|
-
const f = ((v = p.current) == null ? void 0 : v.closest(".ul-card__container")) || null;
|
|
1524
|
-
return f && f.addEventListener("scroll", h, { passive: !0 }), () => {
|
|
1525
|
-
f && f.removeEventListener("scroll", h);
|
|
1526
|
-
};
|
|
1527
|
-
}, [h, s]);
|
|
1528
|
-
const g = re(() => Object.values(o).every((f) => f), [o]), x = (f, v, _) => {
|
|
1529
|
-
r((N) => ({ ...N, [f]: v })), i((N) => ({ ...N, [f]: _ }));
|
|
1530
|
-
};
|
|
1531
|
-
A(() => {
|
|
1532
|
-
if (!s) return;
|
|
1533
|
-
const f = {};
|
|
1534
|
-
e.forEach((v) => {
|
|
1535
|
-
var N, I;
|
|
1536
|
-
const _ = v;
|
|
1537
|
-
(I = (N = _.props) == null ? void 0 : N.properties) != null && I.required || (f[_.name] = { value: null, questionId: _.name, type: _.type });
|
|
1538
|
-
}), r(f), i({});
|
|
1539
|
-
}, [e, s]);
|
|
1540
|
-
const y = (f) => {
|
|
1541
|
-
if (!s) return;
|
|
1542
|
-
const v = e.findIndex((_) => _.name === f) + 1;
|
|
1543
|
-
if (v < e.length) {
|
|
1544
|
-
const _ = e[v].name;
|
|
1545
|
-
c(_);
|
|
1546
|
-
} else c(f);
|
|
1547
|
-
}, k = (f, v) => {
|
|
1548
|
-
s ? (x(f.questionId, f, v), b(f.type) && y(f.questionId)) : t([f]);
|
|
1549
|
-
}, b = (f) => (/* @__PURE__ */ new Set(["nps", "likert", "multiplechoice"])).has(f), S = ((E = e[0]) == null ? void 0 : E.type) === "thanks";
|
|
1550
|
-
return s ? a("div", { className: "ul-card-list-container--longform", ref: p, children: [e.map((f, v) => a(Yt, { cardInstance: f, moveToNextQuestion: y, showIndividualSubmit: s && e.length > 1 && v < e.length - 1, submitQuestion: k, updateCardValues: x }, (f == null ? void 0 : f.name) || v)), !S && a(Lo, { isSubmitDisabled: Object.keys(n).length < e.length || !g, onSubmit: () => {
|
|
1551
|
-
const f = e.map((v) => n[v.name]);
|
|
1552
|
-
t(f);
|
|
1553
|
-
} })] }) : a(B, { children: e.map((f, v) => a(Yt, { cardInstance: f, moveToNextQuestion: y, showIndividualSubmit: s && e.length > 1 && v < e.length - 1, submitQuestion: k, updateCardValues: x }, (f == null ? void 0 : f.name) || v)) });
|
|
1554
|
-
}, Ge = 1, lr = 2, cr = 3, Me = (e) => e.type === "av_permission", Jt = (e) => e.type === "screen_permission", ur = (e, t) => e === void 0 ? Ge : e ? ((n, r) => !(Me(r) ? r.permissionDescriptors : []).includes("camera") || n.getVideoTracks().length > 0)(e, t) ? cr : Ge : lr, Xt = { avStream: null, currentPage: null, mediaRecordingUids: null, nextQuestion: () => {
|
|
1555
|
-
}, passthroughData: void 0, recordingMediaTypes: void 0, screenPermissionRequested: !1, type: void 0 }, J = Qn((e) => ({ ...Xt, reset: () => {
|
|
1556
|
-
e(Xt);
|
|
1557
|
-
}, updatePage: (t) => {
|
|
1558
|
-
e(t);
|
|
1559
|
-
} }));
|
|
1560
|
-
function Ke({ currentPage: e, pages: t }) {
|
|
1561
|
-
const { avStream: n, recordingMediaTypes: r, updatePage: o } = J.getState(), { recorderEventEmitter: i } = R.getState();
|
|
1562
|
-
i.emit("av.permission", { "permission.descriptors": e.permissionDescriptors, "stream.ready": (s, l) => {
|
|
1563
|
-
if (n === s) return;
|
|
1564
|
-
let c = e;
|
|
1565
|
-
if (s && !e.permissionDescriptors.includes("camera")) {
|
|
1566
|
-
const p = t.indexOf(e), m = l != null && l.active ? p + 2 : p + 1;
|
|
1567
|
-
l != null && l.active && r && i.emit("begin.recording", { "recording.media.types": r, "start.recording.callback": (u) => o({ mediaRecordingUids: u }) }), c = t[m];
|
|
1568
|
-
}
|
|
1569
|
-
o({ currentPage: c, avStream: s });
|
|
1570
|
-
} });
|
|
1571
|
-
}
|
|
1572
|
-
function Ye({ status: e }) {
|
|
1573
|
-
const { nextQuestion: t, passthroughData: n, mediaRecordingUids: r, reset: o } = J.getState(), { recorderEventEmitter: i, handleUploadUpdate: s, index: l } = R.getState(), c = { value: { taskStatus: e }, type: "recordedtask", questionId: (n == null ? void 0 : n.questionId) || 1 };
|
|
1574
|
-
n && i.emit("finish.task", { "begin.callback": (p) => {
|
|
1575
|
-
s({ mediaRecordingUid: p, isSubmitted: !0, progressPct: 0, isComplete: !1 });
|
|
1576
|
-
}, "progress.callback": (p, m) => {
|
|
1577
|
-
s({ mediaRecordingUid: p, progressPct: m.detail, isSubmitted: !1, isComplete: !1 });
|
|
1578
|
-
}, "upload.callback": (p) => {
|
|
1579
|
-
p && s({ mediaRecordingUid: p, isComplete: !0, isSubmitted: !0, progressPct: 100 });
|
|
1580
|
-
}, "passthrough.data": n, "current.index": l, "task.response": c, "task.complete.callback": (p) => {
|
|
1581
|
-
c.value.taskDurationMillisecond = p, r && (c.value.mediaRecordingUids = r), o(), t(c);
|
|
1582
|
-
} });
|
|
1583
|
-
}
|
|
1584
|
-
function pt({ pages: e, setIsRequestingPermission: t }) {
|
|
1585
|
-
const { recorderEventEmitter: n, eventEmitFn: r } = R.getState(), { updatePage: o, currentPage: i, recordingMediaTypes: s, screenPermissionRequested: l } = J.getState();
|
|
1586
|
-
if (!i) return;
|
|
1587
|
-
const c = e.indexOf(i);
|
|
1588
|
-
switch (i.type) {
|
|
1589
|
-
case "av_permission": {
|
|
1590
|
-
const p = l ? c + 2 : c + 1;
|
|
1591
|
-
return l && s && n.emit("begin.recording", { "recording.media.types": s, "start.recording.callback": (m) => {
|
|
1592
|
-
o({ mediaRecordingUids: m });
|
|
1593
|
-
} }), void o({ currentPage: e[p] });
|
|
1594
|
-
}
|
|
1595
|
-
case "screen_permission":
|
|
1596
|
-
return void n.emit("screen.permission", { "screen.permission.requested": t, "stream.ready.callback": (p, m) => {
|
|
1597
|
-
const u = m ? e[c + 1] : i;
|
|
1598
|
-
m && s && n.emit("begin.recording", { "recording.media.types": s, "start.recording.callback": (d) => {
|
|
1599
|
-
o({ captureStream: m, mediaRecordingUids: d });
|
|
1600
|
-
} }), o({ currentPage: u, screenPermissionRequested: !0, captureStream: m });
|
|
1601
|
-
} });
|
|
1602
|
-
case "start_task":
|
|
1603
|
-
return r("recorded.task.start"), n.emit("recorded.task.start"), n.emit("start.task"), void o({ currentPage: e[c + 1], screenPermissionRequested: !0 });
|
|
1604
|
-
case "complete_task":
|
|
1605
|
-
return;
|
|
1606
|
-
}
|
|
1607
|
-
}
|
|
1608
|
-
const dr = "ul-permission-graphics-container", pr = "ul-permission-body", mr = q(dr, "ul_recorded-task-inset-spacing"), He = q("ul-horizontal-button-container", "ul-horizontal-button-container-left"), hr = ({ richTextBody: e }) => a("div", { className: "ul-rich-text-body", dangerouslySetInnerHTML: { __html: e }, id: "ul-task-detail-container" }), Oe = ({ required: e, skipButtonText: t, bottom: n = !1 }) => e ? null : a(Q, { className: q(n && "ul-skip-button-below", "ul-button-inactive"), onClick: Ye.bind(null, { status: "abandoned" }), children: t || "Skip" }), mt = (e) => {
|
|
1609
|
-
const { avStream: t, captureStream: n, recordingMediaTypes: r, updatePage: o } = J.getState(), i = (r == null ? void 0 : r.includes("audio")) || (r == null ? void 0 : r.includes("video"));
|
|
1610
|
-
A(() => {
|
|
1611
|
-
const s = setInterval(() => {
|
|
1612
|
-
i && t && !t.active ? o({ avStream: null, currentPage: e[0] }) : n && n.active || o({ captureStream: void 0, currentPage: e[i ? 1 : 0] });
|
|
1613
|
-
}, 1e3);
|
|
1614
|
-
return () => clearInterval(s);
|
|
1615
|
-
}, [t, n, i, e, r, o]);
|
|
1616
|
-
}, Mo = ({ content: e, pages: t, required: n }) => {
|
|
1617
|
-
const { buttonText: r, skipButtonText: o, taskDetail: i } = e;
|
|
1618
|
-
return mt(t), a("div", { className: "ul-task-page", children: [i && a(hr, { richTextBody: i }), a("div", { className: He, children: [a(Q, { onClick: pt.bind(null, { pages: t }), children: r }), a(Oe, { required: n, skipButtonText: o })] })] }, "start-task");
|
|
1619
|
-
}, qo = ({ content: e, pages: t, properties: n }) => {
|
|
1620
|
-
const { buttonText: r, skipButtonText: o } = e;
|
|
1621
|
-
mt(t);
|
|
1622
|
-
const i = a(ie, { properties: n, defaultBody: () => a("div", { className: He, children: [a(Q, { className: "ul-complete-task-button", onClick: Ye.bind(null, { status: "completed" }), children: r }), a(Q, { className: q("ul-button-inactive"), onClick: Ye.bind(null, { status: "given.up" }), children: o })] }) });
|
|
1623
|
-
return a("div", { className: "ul-task-page", children: [e.taskDetail && a(hr, { richTextBody: e.taskDetail }), i] }, "complete-task");
|
|
1624
|
-
}, Ro = ({ content: e, pages: t, required: n }) => {
|
|
1625
|
-
const { buttonText: r, skipButtonText: o } = e, [i] = R((c) => [c.tabTitle]), [s, l] = F(!1);
|
|
1626
|
-
return a("div", { children: [a("div", { className: mr, children: [a("p", { style: { marginTop: "auto" }, children: e.selectTabText }), a("div", { className: "ul-select-tab-container", children: a("p", { className: pr, children: i }) })] }), a("div", { className: n ? "" : He, children: [a(Q, { disabled: s, onClick: pt.bind(null, { pages: t, setIsRequestingPermission: l }), children: r }), a(Oe, { required: n, skipButtonText: o })] })] });
|
|
1627
|
-
}, Ho = ({ content: e }) => a("div", { className: q(dr, "ul_permission_svg_container", "ul_recorded-task-inset-spacing", "ul-center-horizontally"), dangerouslySetInnerHTML: { __html: e.svg } }, "ul-permission-request-graphic"), Oo = ({ content: e, pages: t, required: n }) => {
|
|
1628
|
-
const { permissionDeniedHeadline: r, permissionDeniedBody: o, skipButtonText: i, tryAgainButtonText: s } = e, l = Me(t[0]) ? t[0] : null;
|
|
1629
|
-
return A(() => {
|
|
1630
|
-
const c = setInterval(() => {
|
|
1631
|
-
l !== null && Ke({ currentPage: l, pages: t });
|
|
1632
|
-
}, 1e3);
|
|
1633
|
-
return () => clearInterval(c);
|
|
1634
|
-
}, [l, t]), l ? a("div", { children: [a("div", { className: mr, children: a("p", { className: "ul-av-permission-denied-paragraph", children: [a("span", { className: "ul-av-permission-denied-headline", children: r }), a("span", { className: pr, children: o })] }) }), a("div", { className: He, children: [a(Q, { onClick: Ke.bind(null, { currentPage: l, pages: t }), children: s }), a(Oe, { required: n, skipButtonText: i })] })] }) : null;
|
|
1635
|
-
}, Uo = ({ stream: e }) => a("video", { autoPlay: !0, className: q("ul_recorded-task-inset-spacing"), id: "ul-record-task-video-preview", muted: !0, ref: (t) => {
|
|
1636
|
-
t && (t.srcObject = e || null);
|
|
1637
|
-
} }), Do = ({ content: e, pages: t, required: n }) => {
|
|
1638
|
-
const { skipButtonText: r } = e, { avStream: o } = J.getState();
|
|
1639
|
-
return mt(t), a("div", { children: [a(Uo, { stream: o }), a("div", { className: "ul-vertical-button-container-center", children: [a(Q, { onClick: pt.bind(null, { pages: t }), children: e.buttonText }), a(Oe, { bottom: !0, required: n, skipButtonText: r })] })] });
|
|
1640
|
-
}, jo = ({ properties: e }) => {
|
|
1641
|
-
const { pages: t, required: n } = e, { avStream: r, currentPage: o } = J.getState();
|
|
1642
|
-
if (o === void 0) return null;
|
|
1643
|
-
switch (o == null ? void 0 : o.type) {
|
|
1644
|
-
case "av_permission": {
|
|
1645
|
-
const i = ur(r, o);
|
|
1646
|
-
return i === Ge ? a(Ho, { content: o }) : a(i === lr ? Oo : Do, { content: o, pages: t, required: n });
|
|
1647
|
-
}
|
|
1648
|
-
case "screen_permission":
|
|
1649
|
-
return a(Ro, { content: o, pages: t, required: n });
|
|
1650
|
-
case "start_task":
|
|
1651
|
-
return a(Mo, { content: o, pages: t, required: n });
|
|
1652
|
-
case "complete_task":
|
|
1653
|
-
return a(qo, { content: o, pages: t, properties: e });
|
|
1654
|
-
default:
|
|
1655
|
-
return null;
|
|
1656
|
-
}
|
|
1657
|
-
}, Fo = ({ className: e, properties: t, next: n, questionId: r }) => {
|
|
1658
|
-
const o = R(), { surveyId: i, responseGroupUid: s, userId: l } = o, c = J(), { screenPermissionRequested: p } = c, m = J((x) => x.avStream);
|
|
1659
|
-
let u = J((x) => x.currentPage);
|
|
1660
|
-
u || (u = function({ pages: x, userId: y, responseGroupUid: k, surveyId: b, questionId: S, next: E }) {
|
|
1661
|
-
const { updatePage: f } = J.getState(), { eventEmitFn: v, recorderEventEmitter: _ } = R.getState(), N = { questionId: S, surveyId: b, visitorId: y, responseGroupUid: k };
|
|
1662
|
-
let I = 0;
|
|
1663
|
-
_.emit("recorded.task.permission.screen"), v("recorded.task.permission.screen"), _.emit("permission.status", { "permission.status.callback": (C, w, L, O) => {
|
|
1664
|
-
const T = x[I], { type: j } = T, H = ["screen"];
|
|
1665
|
-
if (Me(T)) {
|
|
1666
|
-
const { permissionDescriptors: U } = T, W = U == null ? void 0 : U.includes("microphone"), $ = U == null ? void 0 : U.includes("camera");
|
|
1667
|
-
W && H.push("audio"), $ && H.push("video"), (C != null && C.active && !$ || C != null && C.active && w) && I++;
|
|
1668
|
-
}
|
|
1669
|
-
Jt(x[I]) && L && (I++, _.emit("begin.recording", { "recording.media.types": H, "start.recording.callback": (U) => f({ mediaRecordingUids: U }) })), f({ currentPage: x[I], avStream: C, screenPermissionRequested: L, nextQuestion: E, type: j, passthroughData: N, recordingMediaTypes: H, captureStream: O });
|
|
1670
|
-
} });
|
|
1671
|
-
const P = x[I];
|
|
1672
|
-
return P.type === "av_permission" && Ke({ currentPage: P, pages: x }), P;
|
|
1673
|
-
}({ questionId: r, surveyId: i, next: (x) => {
|
|
1674
|
-
n(x, !0);
|
|
1675
|
-
}, pages: t.pages, responseGroupUid: s, userId: l }));
|
|
1676
|
-
let d = u.headline, h = u.captionText;
|
|
1677
|
-
const g = ur(m, u);
|
|
1678
|
-
return Jt(u) && p && (d = u.permissionDeniedHeadline, h = u.permissionDeniedCaptionText), Me(u) && g === cr && (d = u.permissionGrantedHeadline, h = u.permissionGrantedCaptionText), a("div", { className: q(e, "ul-center-horizontally", "fade-in-transition"), children: [a(X, { message: d, properties: { captionText: h } }), a(se, { children: a(jo, { properties: t }) })] });
|
|
1679
|
-
}, Ao = { "{{user_id}}": "externalUserId", "{{email}}": "email" }, Bo = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i }) => {
|
|
1680
|
-
const { visitorAttributes: s } = R((d) => ({ visitorAttributes: d.visitorAttributes })), l = (d, h = !1) => {
|
|
1681
|
-
n({ value: h ? { skipped: !0 } : void 0, questionId: o, type: i }, !0);
|
|
1682
|
-
}, c = (d) => {
|
|
1683
|
-
d.key !== "Enter" && d.key !== " " || n({ value: void 0, questionId: o, type: i }, !0);
|
|
1684
|
-
}, p = ((d, h = {}) => {
|
|
1685
|
-
if (!d) return d;
|
|
1686
|
-
try {
|
|
1687
|
-
const b = new URL(d);
|
|
1688
|
-
if (b.protocol !== "http:" && b.protocol !== "https:") return;
|
|
1689
|
-
} catch {
|
|
1690
|
-
return;
|
|
1691
|
-
}
|
|
1692
|
-
let g = d;
|
|
1693
|
-
const x = [];
|
|
1694
|
-
for (const [b, S] of Object.entries(Ao)) if (g.toLowerCase().includes(b)) if (h[S]) {
|
|
1695
|
-
const E = new RegExp(b, "gi");
|
|
1696
|
-
g = g.replace(E, h[S]);
|
|
1697
|
-
} else x.push(b);
|
|
1698
|
-
if (x.length === 0 || !g.includes("?")) return g;
|
|
1699
|
-
const y = g.slice(0, g.indexOf("?")), k = g.slice(g.indexOf("?") + 1).split("&").map((b) => b.split("=")).filter((b) => !x.includes(b[1]));
|
|
1700
|
-
return k.length === 0 ? y : `${y}?${k.map((b) => b.join("=")).join("&")}`;
|
|
1701
|
-
})(r && r.buttonUrl, s);
|
|
1702
|
-
return a("div", { className: q(e, "ul-card__text-url-prompt", "fade-in-transition"), children: [a(X, { message: t, properties: { questionHtml: r.questionHtml } }), a(se, { children: (m = r == null ? void 0 : r.richTextBody, u = r == null ? void 0 : r.body, m ? a("div", { className: "ul-rich-text-body", dangerouslySetInnerHTML: { __html: m }, id: "ul-card__text-url-body-container" }) : u ? a("div", { className: "ul-rich-text-body", id: "ul-card__text-url-body-container", children: (u ? u.split(/\n\s*\n/g) : []).map((d, h) => a("p", { children: d }, h)) }) : null) }), a(ie, { defaultBody: () => a(ue, { children: a("div", { className: "ul-card-button-group", children: [a("a", { className: "ul-card-text__button ul-card__text-url-prompt-button", href: p, id: "ul-card-text__button", onClick: l, onKeyPress: c, rel: "noreferrer", role: p ? "link" : "button", tabIndex: 0, target: "_blank", children: ge(r) }), r.required === !1 && a("button", { className: "ul-card-skip__button", onClick: (d) => l(0, !0), children: or(r) })] }) }), properties: r })] }, o);
|
|
1703
|
-
var m, u;
|
|
1704
|
-
}, Vo = ({ className: e, questionId: t }) => {
|
|
1705
|
-
const { border: n, destroy: r, endCard: o, forceBrandedLogo: i } = R((c) => ({ border: c.border, destroy: c.destroy, endCard: c.endCard, forceBrandedLogo: c.forceBrandedLogo }));
|
|
1706
|
-
A(() => {
|
|
1707
|
-
setTimeout(() => {
|
|
1708
|
-
r(pe);
|
|
1709
|
-
}, i ? 4e3 : 2e3);
|
|
1710
|
-
}, [r, i]);
|
|
1711
|
-
const s = o && o.subheader ? a("p", { className: "ul-caption", children: o.subheader }) : null, l = o && o.headline ? o.headline : "";
|
|
1712
|
-
return a("div", { className: q(e, "ul-card--thanks", "fade-in-transition"), children: a("div", { children: a("div", { className: "ul-card--thanks-content", children: [a("div", { className: "ul-thanks-check", children: a("svg", { "aria-labelledby": "title", fill: "none", height: "99", viewBox: "0 0 81 99", width: "81", xmlns: "http://www.w3.org/2000/svg", children: [a("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: n, fillRule: "evenodd" }), a("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: n, fillRule: "evenodd" }), a("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" })] }) }), a(X, { message: l }), s] }) }) }, t);
|
|
1713
|
-
}, $o = ({ className: e }) => {
|
|
1714
|
-
const { uploadProgress: t } = R((i) => ({ uploadProgress: i.uploadProgress }));
|
|
1715
|
-
let n, r;
|
|
1716
|
-
Object.values(t).filter((i) => i.isSubmitted).length > 1 ? (n = "Your responses are processing", r = "Please keep this tab open until your responses are fully processed.") : (n = "Your response is processing", r = "Please keep this tab open until your response is fully processed.");
|
|
1717
|
-
const o = Math.round(Math.min(99, ...Object.values(t).filter((i) => i.isSubmitted).map((i) => i.progressPct || 0)));
|
|
1718
|
-
return a("div", { className: q(e, "ul-card--uploading", "fade-in-transition"), children: [a("div", { "aria-busy": "true", "aria-label": "Processing...", "aria-live": "polite", className: "ul-loading-spinner-container", role: "progressbar", children: a("div", { className: "ul-loading-spinner", children: [a("div", { className: "first" }), a("div", { className: "second" }), a("div", { className: "third" }), a("div", { className: "fourth" })] }) }), a(X, { message: `${n} (${o}% complete)` }), a("p", { className: "ul-caption", children: r })] });
|
|
1719
|
-
}, zo = () => {
|
|
1720
|
-
var k;
|
|
1721
|
-
const { border: e, cards: t, forceBrandedLogo: n, headers: r, index: o, marketingUrl: i, showSurveyBrand: s, slugName: l, surveyId: c, viewedCardCount: p } = R((b) => ({ border: b.border, cards: b.cards, forceBrandedLogo: b.forceBrandedLogo, headers: b.headers, index: b.index, marketingUrl: b.marketingUrl, showSurveyBrand: b.showSurveyBrand, slugName: b.slugName, surveyId: b.surveyId, viewedCardCount: b.viewedCardCount })), m = z(null), u = t.filter((b) => b.type !== "uploading" && b.type !== "thanks"), d = ((b, S) => {
|
|
1722
|
-
const E = /* @__PURE__ */ new Set(["thanks", "uploading"]);
|
|
1723
|
-
if (S >= b.length || S < 0 || E.has(b[S].type)) return 0;
|
|
1724
|
-
const f = b.filter((_) => !E.has(_.type));
|
|
1725
|
-
if (S === f.length - 1) return 1;
|
|
1726
|
-
const v = { [f.length - 1]: 1, [-1]: 0 };
|
|
1727
|
-
for (let _ = f.length - 2; _ >= S; _--) {
|
|
1728
|
-
const N = f[_], I = io(_, N.props.routingOptions);
|
|
1729
|
-
if (I.length === 0) {
|
|
1730
|
-
v[_] = v[_ + 1] + 1;
|
|
1731
|
-
continue;
|
|
1732
|
-
}
|
|
1733
|
-
let P = 0, C = no(N);
|
|
1734
|
-
if (C === null) return f.length - 1 - S;
|
|
1735
|
-
for (let w = 0; w < I.length && C.length !== 0; w++) {
|
|
1736
|
-
const { comparator: L, target: O, value: T } = I[w], j = C.filter((H) => {
|
|
1737
|
-
const U = to({ value: H }, N.type, H), W = Wn(H, N.type);
|
|
1738
|
-
return !(U && L === "answered" || W && L === "partial" || !U && !W && L === "skipped" || L === "given_up" && oo(H) && H.taskStatus === "given.up" || U && N.type === "open" && (L === "contains" || L === "notcontains") || U && ro(L) && ct[L](H, T));
|
|
1739
|
-
});
|
|
1740
|
-
if (j.length < C.length) {
|
|
1741
|
-
const H = parseInt(String(O), 10);
|
|
1742
|
-
if (H !== -1 && H <= _ || H >= f.length) return f.length - 1 - S;
|
|
1743
|
-
P = Math.max(v[H] + 1, P);
|
|
1744
|
-
}
|
|
1745
|
-
C = j;
|
|
1746
|
-
}
|
|
1747
|
-
C.length > 0 && (P = Math.max(v[_ + 1] + 1, P)), v[_] = P;
|
|
1748
|
-
}
|
|
1749
|
-
return v[S];
|
|
1750
|
-
})(t, o), h = p + 1, g = h / (h + d), x = ir({ marketingUrl: i, slugName: l, surveyId: c, forceBrandedLogo: n });
|
|
1751
|
-
A(() => {
|
|
1752
|
-
m.current && (m.current.style.width = 100 * g + "%");
|
|
1753
|
-
}, [g]);
|
|
1754
|
-
const y = ((k = t[o]) == null ? void 0 : k.type) === "thanks";
|
|
1755
|
-
return a("footer", { className: "ul-footer " + (r["userleap-platform"] === "link" ? "ul-footer__link" : ""), children: y && n ? a(rr, { marketingUrlLink: x }) : a(B, { children: [u.length > 1 && a("div", { className: "ul-progress-bar-container ul-progress-bar-container__footer", children: a("div", { className: "ul-progress-bar-current", ref: m, style: { border: `1px solid ${e || "#000"}` } }) }), s ? a(nr, { forceBrandedLogo: n, marketingUrlLink: x }) : null] }) });
|
|
1756
|
-
}, Qo = () => {
|
|
1757
|
-
const e = R((s) => s.border), t = R((s) => s.cards), n = R((s) => s.index), r = R((s) => s.focusedQuestionId), { totalQuestions: o, fraction: i } = re(() => {
|
|
1758
|
-
var p;
|
|
1759
|
-
const s = t.filter((m) => m.type !== "uploading" && m.type !== "thanks"), l = s.length;
|
|
1760
|
-
if (l <= 1) return { totalQuestions: l, fraction: 0 };
|
|
1761
|
-
if (((p = t[n]) == null ? void 0 : p.type) === "thanks") return { totalQuestions: l, fraction: 1 };
|
|
1762
|
-
const c = s.findIndex((m) => m.name === r);
|
|
1763
|
-
return { totalQuestions: l, fraction: (c >= 0 ? c : 0) / l };
|
|
1764
|
-
}, [t, n, r]);
|
|
1765
|
-
return o <= 1 ? null : a("div", { className: "ul-progress-bar-container ul-progress-bar-container__header", children: a("div", { className: "ul-progress-bar-current", style: { width: 100 * i + "%", border: `1px solid ${e ?? "#000"}` } }) });
|
|
1766
|
-
}, Wo = () => {
|
|
1767
|
-
const { answers: e, border: t, cards: n, close: r, configureExitOnOverlayClick: o, destroy: i, endCard: s, eventEmitFn: l, fontFamily: c, headers: p, index: m, minScrollableHeight: u, next: d, previewMode: h, productConfig: g, seen: x, showStripes: y, studyType: k, surveyId: b, update: S, useMobileStyling: E, viewDocument: f } = R((T) => ({ answers: T.answers, border: T.border, cards: T.cards, close: T.close, configureExitOnOverlayClick: T.configureExitOnOverlayClick, destroy: T.destroy, endCard: T.endCard, eventEmitFn: T.eventEmitFn, fontFamily: T.fontFamily, headers: T.headers, index: T.index, previewMode: T.previewMode, productConfig: T.productConfig, minScrollableHeight: T.minScrollableHeight, next: T.next, seen: T.seen, showStripes: T.showStripes, studyType: T.studyType, surveyId: T.surveyId, update: T.update, useMobileStyling: T.useMobileStyling, viewDocument: T.viewDocument })), v = z(null), _ = z(!1), N = p["userleap-platform"], { props: I, type: P, name: C } = n[m];
|
|
1768
|
-
A(() => {
|
|
1769
|
-
if (window.Sprig) return window.Sprig.trackHistory = (T) => R.getState().trackHistory(T), () => {
|
|
1770
|
-
window.Sprig.trackHistory = void 0;
|
|
1771
|
-
};
|
|
1772
|
-
}, []), A(() => {
|
|
1773
|
-
v.current && (v.current.classList.contains("ul-app--visible") || v.current.classList.add("ul-app--visible"), !_.current && l && (_.current = !0, l(G.SurveyAppeared, { name: G.SurveyAppeared, "survey.id": b })));
|
|
1774
|
-
}, [l, b]), A(() => {
|
|
1775
|
-
const T = () => {
|
|
1776
|
-
f.visibilityState === "visible" && (x(), f.removeEventListener("visibilitychange", T));
|
|
1777
|
-
};
|
|
1778
|
-
return f.addEventListener("visibilitychange", T), T(), () => {
|
|
1779
|
-
f.removeEventListener("visibilitychange", T);
|
|
1780
|
-
};
|
|
1781
|
-
}, [x, f]), A(() => {
|
|
1782
|
-
S();
|
|
1783
|
-
}, [m, S]), A(() => {
|
|
1784
|
-
o(() => r());
|
|
1785
|
-
}, [r, o]);
|
|
1786
|
-
const w = re(() => kr(n, m), [n, m]), L = le((T) => {
|
|
1787
|
-
d({ data: T, completeSurvey: () => i(pe), endCard: s }), wr(f);
|
|
1788
|
-
}, [d, i, s, f]);
|
|
1789
|
-
if (e) {
|
|
1790
|
-
for (const T of e) if (T.questionId === C) {
|
|
1791
|
-
let j;
|
|
1792
|
-
if (P === "multiplechoice") {
|
|
1793
|
-
const H = I.options.find(({ value: U }) => U === T.value);
|
|
1794
|
-
if (!H) break;
|
|
1795
|
-
j = { [H.id]: H.value };
|
|
1796
|
-
} else j = T.value;
|
|
1797
|
-
L({ value: j, type: P, questionId: T.questionId });
|
|
1798
|
-
break;
|
|
1799
|
-
}
|
|
1800
|
-
}
|
|
1801
|
-
const O = !E && ((g == null ? void 0 : g.framePosition) === "center" || (g == null ? void 0 : g.desktopDisplay) === "center-modal" || ((g == null ? void 0 : g.placement) || "").includes("center"));
|
|
1802
|
-
return a("div", { className: q("ul-app", Ee(p) ? "ul-app--visible" : "ul-app--overlay"), dir: "auto", id: pe, onClick: (T) => {
|
|
1803
|
-
var W;
|
|
1804
|
-
const j = window.sprigAPI, H = T.target;
|
|
1805
|
-
if (!j || !H) return;
|
|
1806
|
-
const U = [H, H.parentElement];
|
|
1807
|
-
for (const $ of U) if (((W = $ == null ? void 0 : $.tagName) == null ? void 0 : W.toLowerCase()) === "a") {
|
|
1808
|
-
T.preventDefault();
|
|
1809
|
-
try {
|
|
1810
|
-
const oe = new URL($.href);
|
|
1811
|
-
oe.protocol !== "http:" && oe.protocol !== "https:" || (j == null || j.openUrl(oe.toString()));
|
|
1812
|
-
} catch (oe) {
|
|
1813
|
-
console.error(oe);
|
|
1814
|
-
}
|
|
1815
|
-
return;
|
|
1816
|
-
}
|
|
1817
|
-
}, ref: v, style: { "--theme": t, ...c ? { fontFamily: c.replace(";", "") } : {}, ...O ? { position: "relative" } : {} }, children: a("div", { className: "ul-app__container", children: a("div", { className: q(V("ul-card__container", E, k)), style: { ...k !== "feedbackButton" || (g == null ? void 0 : g.desktopDisplay) === "center-modal" ? { borderColor: t } : {}, ...(g == null ? void 0 : g.desktopDisplay) === "slider" ? { margin: "0px" } : {} }, children: a("div", { className: "sprig-container", style: { minHeight: u }, children: [y && a("div", { className: "ul-header__container", dir: "ltr", children: a("div", { className: "ul-header", children: "For development purposes only" }) }), h && a("div", { className: "ul-header__container", dir: "ltr", children: a("div", { className: "ul-header", children: "Preview Mode: Response will not be recorded." }) }), K(k) && a(Qo, {}), a("div", { className: q(lo("ul-card-main-content", N)), children: a(Po, { cards: w, next: L }) }), !K(k) && a(zo, {})] }) }) }) });
|
|
1818
|
-
}, fr = () => MediaRecorder.isTypeSupported("video/webm") ? "video/webm" : "video/mp4", en = (e) => {
|
|
1819
|
-
const t = { audioBitsPerSecond: 128e3, videoBitsPerSecond: 25e5, mimeType: fr() };
|
|
1820
|
-
return new MediaRecorder(e, t);
|
|
1821
|
-
}, tn = (e, t, n) => {
|
|
1822
|
-
n[t] = [], e.ondataavailable = function(r) {
|
|
1823
|
-
n[t].push(r.data);
|
|
1824
|
-
}, e.currentMediaRecordingUid = t, e.start();
|
|
1825
|
-
};
|
|
1826
|
-
function nn(e, t, n, r, o, i) {
|
|
1827
|
-
if (e && e.state !== "inactive") {
|
|
1828
|
-
const { "begin.callback": s } = r, l = e.currentMediaRecordingUid;
|
|
1829
|
-
if (!l) return;
|
|
1830
|
-
s && s(l), e.onstop = () => async function(c, p, m, u, d, h, g) {
|
|
1831
|
-
const x = R.getState().viewDocument, { "upload.callback": y, "progress.callback": k } = u, b = { mediaType: m, updatedAt: (/* @__PURE__ */ new Date()).toISOString(), mediaRecordingUid: d, ...u["passthrough.data"] }, S = await (async (_, N) => {
|
|
1832
|
-
var P;
|
|
1833
|
-
const I = await fetch(N, { method: "POST", cache: "no-cache", headers: { "Content-Type": "application/json" }, body: JSON.stringify(_) });
|
|
1834
|
-
if (I.ok) {
|
|
1835
|
-
const C = await I.json();
|
|
1836
|
-
return (P = C == null ? void 0 : C.upload) == null ? void 0 : P.url;
|
|
1837
|
-
}
|
|
1838
|
-
return null;
|
|
1839
|
-
})(b, c);
|
|
1840
|
-
if (!S) return void (y && y(null, { message: "failed to get upload url" }));
|
|
1841
|
-
const E = new Blob(g, { type: fr() });
|
|
1842
|
-
if (!x.defaultView) return;
|
|
1843
|
-
const f = new x.defaultView.File([E], `recording video ${Date.now()}`), v = h.createUpload({ endpoint: S, file: f, chunkSize: 5120 });
|
|
1844
|
-
v.on("error", (_) => {
|
|
1845
|
-
y && y(null, _);
|
|
1846
|
-
}), v.on("progress", (_) => {
|
|
1847
|
-
k && k(d, _);
|
|
1848
|
-
}), v.on("success", () => {
|
|
1849
|
-
y && y(d, !0);
|
|
1850
|
-
});
|
|
1851
|
-
}(t, 0, n, r, l, o, i), e.stop();
|
|
1852
|
-
}
|
|
1853
|
-
}
|
|
1854
|
-
const Zo = { state: { chunks: {} }, stopRecording(e) {
|
|
1855
|
-
const { uploadApiEndpoint: t, avRecorder: n, screenRecorder: r, UpChunk: o } = this.state, i = this.state.avStream && this.state.avStream.getVideoTracks().length > 0 ? "video" : "audio";
|
|
1856
|
-
this.state.chunks && t && o && (n != null && n.currentMediaRecordingUid && nn(n, t, i, e, o, this.state.chunks[n == null ? void 0 : n.currentMediaRecordingUid]), r != null && r.currentMediaRecordingUid && nn(r, t, "screen", e, o, this.state.chunks[r == null ? void 0 : r.currentMediaRecordingUid]));
|
|
1857
|
-
}, handleCancelledStream(e) {
|
|
1858
|
-
const t = e.getVideoTracks(), n = e.getAudioTracks();
|
|
1859
|
-
let r = t.length && t[0];
|
|
1860
|
-
r = r || n.length && n[0], r && r.addEventListener("ended", () => {
|
|
1861
|
-
[this.state.avRecorder, this.state.screenRecorder].map((o) => {
|
|
1862
|
-
o && (o.state === "recording" && o.stop(), o.stream.getTracks().map((i) => {
|
|
1863
|
-
i.readyState === "live" && i.stop();
|
|
1864
|
-
}));
|
|
1865
|
-
}), Object.assign(this.state, { avStream: null, captureStream: null, avRecorder: null, screenRecorder: null });
|
|
1866
|
-
});
|
|
1867
|
-
}, taskDurationMillisecond() {
|
|
1868
|
-
return this.state.startTime ? (/* @__PURE__ */ new Date()).getTime() - this.state.startTime.getTime() : 0;
|
|
1869
|
-
}, setUpChunk(e) {
|
|
1870
|
-
this.state.UpChunk = e;
|
|
1871
|
-
}, configure(e, t) {
|
|
1872
|
-
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 (n) => {
|
|
1873
|
-
this.avPermissionCallback(n);
|
|
1874
|
-
}), e.on("begin.recording", this.beginRecordingCallback.bind(this)), e.on("start.task", this.startTaskCallback.bind(this)), e.on("screen.permission", async (n) => {
|
|
1875
|
-
this.screenPermissionCallback(n);
|
|
1876
|
-
}), e.on("finish.task", async (n) => {
|
|
1877
|
-
this.finishTaskCallback(n);
|
|
1878
|
-
});
|
|
1879
|
-
}, async avPermissionCallback(e) {
|
|
1880
|
-
var r, o, i;
|
|
1881
|
-
const { "stream.ready": t, "permission.descriptors": n } = e;
|
|
1882
|
-
try {
|
|
1883
|
-
(r = this.state.avStream) != null && r.active && (this.state.avStream.getTracks().map((s) => s.readyState === "live" && s.stop()), ((o = this.state.captureStream) == null ? void 0 : o.getAudioTracks().length) === 1 && this.state.captureStream.removeTrack(this.state.captureStream.getAudioTracks()[0])), this.state.avStream = await navigator.mediaDevices.getUserMedia({ video: n.includes("camera"), audio: !0 }), ((i = this.state.captureStream) == null ? void 0 : i.getAudioTracks().length) === 0 && this.state.captureStream.addTrack(this.state.avStream.getAudioTracks()[0]), this.handleCancelledStream(this.state.avStream);
|
|
1884
|
-
} catch (s) {
|
|
1885
|
-
return console.warn("Error: failed to get permissions: " + s), void (t && t(null, null));
|
|
1886
|
-
}
|
|
1887
|
-
t && t(this.state.avStream, this.state.captureStream);
|
|
1888
|
-
}, async screenPermissionCallback(e) {
|
|
1889
|
-
const { "screen.permission.requested": t, "stream.ready.callback": n } = e;
|
|
1890
|
-
t == null || t(!0);
|
|
1891
|
-
try {
|
|
1892
|
-
this.state.captureStream = await navigator.mediaDevices.getDisplayMedia({ video: !0, cursor: "always", displaySurface: "browser", preferCurrentTab: !0 });
|
|
1893
|
-
} catch (r) {
|
|
1894
|
-
return t == null || t(!1), console.warn("Error: failed to get permissions: " + r), void (n && n(null, null));
|
|
1895
|
-
}
|
|
1896
|
-
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), n && n(this.state.avStream || null, this.state.captureStream);
|
|
1897
|
-
}, beginRecordingCallback(e) {
|
|
1898
|
-
const { "recording.media.types": t, "start.recording.callback": n = () => {
|
|
1899
|
-
} } = e;
|
|
1900
|
-
if (!t) return;
|
|
1901
|
-
const r = [];
|
|
1902
|
-
if (t.includes("video") && this.state.avStream) {
|
|
1903
|
-
this.state.avRecorder = en(this.state.avStream);
|
|
1904
|
-
const o = gt();
|
|
1905
|
-
tn(this.state.avRecorder, o, this.state.chunks), r.push(o);
|
|
1906
|
-
}
|
|
1907
|
-
if (t.includes("screen") && this.state.captureStream) {
|
|
1908
|
-
this.state.screenRecorder = en(this.state.captureStream);
|
|
1909
|
-
const o = gt();
|
|
1910
|
-
tn(this.state.screenRecorder, o, this.state.chunks), r.push(o);
|
|
1911
|
-
}
|
|
1912
|
-
r && n && n(r);
|
|
1913
|
-
}, async finishTaskCallback(e) {
|
|
1914
|
-
const { "current.index": t, "task.response": n, "task.complete.callback": r } = e;
|
|
1915
|
-
await this.stopRecording(e), r && r(this.taskDurationMillisecond()), this.state.cards && this.state.hasEndCard !== void 0 && this.lookAheadAndStopStream(t, n, this.state.cards, this.state.hasEndCard);
|
|
1916
|
-
}, startTaskCallback() {
|
|
1917
|
-
this.state.startTime = /* @__PURE__ */ new Date();
|
|
1918
|
-
}, permissionStatusCallback(e) {
|
|
1919
|
-
var r;
|
|
1920
|
-
const { "permission.status.callback": t } = e, n = this.state.avStream;
|
|
1921
|
-
t && t(n, !!n && (n == null ? void 0 : n.getVideoTracks().length) > 0, !!((r = this.state.captureStream) != null && r.active), this.state.captureStream);
|
|
1922
|
-
}, lookAheadAndStopStream(e, t, n, r) {
|
|
1923
|
-
const { avRecorder: o, screenRecorder: i } = this.state, { allResponses: s } = R.getState(), l = Zn({ cards: n, index: e, hasEndCard: r, allResponses: s });
|
|
1924
|
-
l !== null && n[l].type === "recordedtask" || [o, i].map((c) => {
|
|
1925
|
-
c && (c.state === "recording" && c.stop(), c.stream.getTracks().map((p) => {
|
|
1926
|
-
p.readyState === "live" && p.stop();
|
|
1927
|
-
}));
|
|
1928
|
-
});
|
|
1929
|
-
} }, Je = Object.create(Zo);
|
|
1930
|
-
Object.freeze(Je);
|
|
1931
|
-
const Go = ({ mode: e = null, viewWindow: t, viewDocument: n, trackPageViewUrl: r }) => {
|
|
1932
|
-
const o = n.documentElement;
|
|
1933
|
-
let i;
|
|
1934
|
-
try {
|
|
1935
|
-
i = t.parent.location.href;
|
|
1936
|
-
} catch {
|
|
1937
|
-
i = t.location.href;
|
|
1938
|
-
}
|
|
1939
|
-
return { mode: e, sw: t.screen.width, sh: t.screen.height, cw: o.clientWidth, ch: o.clientHeight, p: r ?? i, l: t.navigator.language };
|
|
1940
|
-
}, Yo = { configure: function(e, t = !0) {
|
|
1941
|
-
var k;
|
|
1942
|
-
const { answers: n, apiURL: r, endCard: o, eventEmitFn: i, fontFamilyURL: s, frame: l, previewKey: c, viewDocument: p, viewWindow: m } = e, u = Ee(e.headers) ? e.frame : p.body, d = e.UpChunk || window.UpChunk, h = _e, g = ((b, S) => {
|
|
1943
|
-
const E = [...b], f = /* @__PURE__ */ new Set(["videovoice", "recordedtask"]);
|
|
1944
|
-
return b.some((v) => f.has(v.type)) && E.push({ name: -2, props: { routingOptions: [] }, type: "uploading" }), S && E.push({ name: -1, props: { routingOptions: [] }, type: "thanks" }), E;
|
|
1945
|
-
})(e.cards, !!o);
|
|
1946
|
-
Je.configure(h, { cards: g, hasEndCard: !!o, apiURL: r, UpChunk: d }), R.setState({ apiURL: r, answers: n, border: e.border, index: e.startingQuestionIdx || 0, cards: g, configureExitOnOverlayClick: e.configureExitOnOverlayClick, customMetadata: e.customMetadata, endCard: e.endCard, envId: e.envId, eventEmitFn: i, fontFamily: e.fontFamily, forceBrandedLogo: e.forceBrandedLogo, frame: l, headers: e.headers, hasViewedEmbed: !1, isPreview: e.isPreview, marketingUrl: "https://sprig.com", meta: Go({ mode: e.mode, viewWindow: m, viewDocument: p, trackPageViewUrl: e.trackPageViewUrl }), mode: e.mode, previewKey: c, previewMode: e.previewMode, productConfig: e.productConfig, recorder: Je, recorderEventEmitter: h, 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 });
|
|
1947
|
-
const { head: x } = p;
|
|
1948
|
-
if (_t({ 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:break-word;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%;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--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-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 && _t({ document: p, elementId: "ul-custom-style", styleString: e.customStyles, nonce: e.styleNonce }), e.fontFamily && s && parent) {
|
|
1949
|
-
const b = p.createElement("link");
|
|
1950
|
-
b.rel = "stylesheet", b.href = s, x.appendChild(b);
|
|
1951
|
-
}
|
|
1952
|
-
const y = i || ((k = l.eventEmitter) == null ? void 0 : k.emit);
|
|
1953
|
-
y == null || y("verify.view.version", { "view.version": "2.33.2" }), u && t && (he(a(Wo, {}), u), _e.once(G.SurveyClosed, () => {
|
|
1954
|
-
at(u);
|
|
1955
|
-
}));
|
|
1956
|
-
} };
|
|
1957
|
-
export {
|
|
1958
|
-
Yo as default
|
|
1959
|
-
};
|
|
1960
|
-
//# sourceMappingURL=view-UeZsENA_.js.map
|