@sprig-technologies/sprig-browser 2.32.2 → 2.32.3
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/core-DsBuStDe.js +1000 -0
- package/dist/core-gTCnh_sk.cjs +12 -0
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +4 -0
- package/dist/core.js +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +2 -2
- package/dist/metricsReporter-D4pafvTR.cjs +1 -0
- package/dist/{metricsReporter-D0VZ2ZgI.js → metricsReporter-Gimz6xcf.js} +46 -29
- package/dist/replay.cjs +1 -1
- package/dist/replay.js +149 -144
- package/dist/view-BRI_mHiJ.cjs +669 -0
- package/dist/view-Csp070UH.js +2841 -0
- package/package.json +1 -1
- package/dist/core-D-LZZjJw.cjs +0 -12
- package/dist/core-DJ-C8ZCy.js +0 -983
- package/dist/metricsReporter-CiE5uf1B.cjs +0 -1
- package/dist/view-CDdG2lXT.js +0 -2830
- package/dist/view-CW-37QDp.cjs +0 -669
|
@@ -0,0 +1,2841 @@
|
|
|
1
|
+
import { C as Ht, A as Se, a as Gr, D as Kr, i as Yr, E as Qr, b as De, d as Ct, r as Jr, e as At } from "./core-DsBuStDe.js";
|
|
2
|
+
import { b as Xr, D as Bt, e as Be, h as We, S as ve, s as ht, v as mt } from "./metricsReporter-Gimz6xcf.js";
|
|
3
|
+
var Le, D, Rn, xe, qt, Nn, gt, Mn, Me = {}, Ln = [], eo = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, Ze = Array.isArray;
|
|
4
|
+
function ue(e, t) {
|
|
5
|
+
for (var n in t)
|
|
6
|
+
e[n] = t[n];
|
|
7
|
+
return e;
|
|
8
|
+
}
|
|
9
|
+
function On(e) {
|
|
10
|
+
var t = e.parentNode;
|
|
11
|
+
t && t.removeChild(e);
|
|
12
|
+
}
|
|
13
|
+
function z(e, t, n) {
|
|
14
|
+
var r, o, i, s = {};
|
|
15
|
+
for (i in t)
|
|
16
|
+
i == "key" ? r = t[i] : i == "ref" ? o = t[i] : s[i] = t[i];
|
|
17
|
+
if (arguments.length > 2 && (s.children = arguments.length > 3 ? Le.call(arguments, 2) : n), typeof e == "function" && e.defaultProps != null)
|
|
18
|
+
for (i in e.defaultProps)
|
|
19
|
+
s[i] === void 0 && (s[i] = e.defaultProps[i]);
|
|
20
|
+
return Re(e, s, r, o, null);
|
|
21
|
+
}
|
|
22
|
+
function Re(e, t, n, r, o) {
|
|
23
|
+
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 };
|
|
24
|
+
return o == null && D.vnode != null && D.vnode(i), i;
|
|
25
|
+
}
|
|
26
|
+
function Un() {
|
|
27
|
+
return { current: null };
|
|
28
|
+
}
|
|
29
|
+
function K(e) {
|
|
30
|
+
return e.children;
|
|
31
|
+
}
|
|
32
|
+
function oe(e, t) {
|
|
33
|
+
this.props = e, this.context = t;
|
|
34
|
+
}
|
|
35
|
+
function je(e, t) {
|
|
36
|
+
if (t == null)
|
|
37
|
+
return e.__ ? je(e.__, e.__i + 1) : null;
|
|
38
|
+
for (var n; t < e.__k.length; t++)
|
|
39
|
+
if ((n = e.__k[t]) != null && n.__e != null)
|
|
40
|
+
return n.__e;
|
|
41
|
+
return typeof e.type == "function" ? je(e) : null;
|
|
42
|
+
}
|
|
43
|
+
function Hn(e) {
|
|
44
|
+
var t, n;
|
|
45
|
+
if ((e = e.__) != null && e.__c != null) {
|
|
46
|
+
for (e.__e = e.__c.base = null, t = 0; t < e.__k.length; t++)
|
|
47
|
+
if ((n = e.__k[t]) != null && n.__e != null) {
|
|
48
|
+
e.__e = e.__c.base = n.__e;
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
return Hn(e);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
function ft(e) {
|
|
55
|
+
(!e.__d && (e.__d = !0) && xe.push(e) && !Ge.__r++ || qt !== D.debounceRendering) && ((qt = D.debounceRendering) || Nn)(Ge);
|
|
56
|
+
}
|
|
57
|
+
function Ge() {
|
|
58
|
+
var e, t, n, r, o, i, s, d, l;
|
|
59
|
+
for (xe.sort(gt); e = xe.shift(); )
|
|
60
|
+
e.__d && (t = xe.length, r = void 0, i = (o = (n = e).__v).__e, d = [], l = [], (s = n.__P) && ((r = ue({}, o)).__v = o.__v + 1, D.vnode && D.vnode(r), Et(s, r, o, n.__n, s.ownerSVGElement !== void 0, 32 & o.__u ? [i] : null, d, i ?? je(o), !!(32 & o.__u), l), r.__.__k[r.__i] = r, Bn(d, r, l), r.__e != i && Hn(r)), xe.length > t && xe.sort(gt));
|
|
61
|
+
Ge.__r = 0;
|
|
62
|
+
}
|
|
63
|
+
function Vt(e, t, n, r, o, i, s, d, l, p, h) {
|
|
64
|
+
var c, u, m, f, b, _ = r && r.__k || Ln, y = t.length;
|
|
65
|
+
for (n.__d = l, function(x, T, S) {
|
|
66
|
+
var w, k, j, P, g, v = T.length, E = S.length, I = E, O = 0;
|
|
67
|
+
for (x.__k = [], w = 0; w < v; w++)
|
|
68
|
+
(k = x.__k[w] = (k = T[w]) == null || typeof k == "boolean" || typeof k == "function" ? null : typeof k == "string" || typeof k == "number" || typeof k == "bigint" || k.constructor == String ? Re(null, k, null, null, k) : Ze(k) ? Re(K, { children: k }, null, null, null) : k.constructor === void 0 && k.__b > 0 ? Re(k.type, k.props, k.key, k.ref ? k.ref : null, k.__v) : k) != null ? (k.__ = x, k.__b = x.__b + 1, g = to(k, S, P = w + O, I), k.__i = g, j = null, g !== -1 && (I--, (j = S[g]) && (j.__u |= 131072)), j == null || j.__v === null ? (g == -1 && O--, typeof k.type != "function" && (k.__u |= 65536)) : g !== P && (g === P + 1 ? O++ : g > P ? I > v - P ? O += g - P : O-- : O = g < P && g == P - 1 ? g - P : 0, g !== w + O && (k.__u |= 65536))) : (j = S[w]) && j.key == null && j.__e && (j.__e == x.__d && (x.__d = je(j)), vt(j, j, !1), S[w] = null, I--);
|
|
69
|
+
if (I)
|
|
70
|
+
for (w = 0; w < E; w++)
|
|
71
|
+
(j = S[w]) != null && !(131072 & j.__u) && (j.__e == x.__d && (x.__d = je(j)), vt(j, j));
|
|
72
|
+
}(n, t, _), l = n.__d, c = 0; c < y; c++)
|
|
73
|
+
(m = n.__k[c]) != null && typeof m != "boolean" && typeof m != "function" && (u = m.__i === -1 ? Me : _[m.__i] || Me, m.__i = c, Et(e, m, u, o, i, s, d, l, p, h), f = m.__e, m.ref && u.ref != m.ref && (u.ref && St(u.ref, null, m), h.push(m.ref, m.__c || f, m)), b == null && f != null && (b = f), 65536 & m.__u || u.__k === m.__k ? l = An(m, l, e) : typeof m.type == "function" && m.__d !== void 0 ? l = m.__d : f && (l = f.nextSibling), m.__d = void 0, m.__u &= -196609);
|
|
74
|
+
n.__d = l, n.__e = b;
|
|
75
|
+
}
|
|
76
|
+
function An(e, t, n) {
|
|
77
|
+
var r, o;
|
|
78
|
+
if (typeof e.type == "function") {
|
|
79
|
+
for (r = e.__k, o = 0; r && o < r.length; o++)
|
|
80
|
+
r[o] && (r[o].__ = e, t = An(r[o], t, n));
|
|
81
|
+
return t;
|
|
82
|
+
}
|
|
83
|
+
return e.__e != t && (n.insertBefore(e.__e, t || null), t = e.__e), t && t.nextSibling;
|
|
84
|
+
}
|
|
85
|
+
function pe(e, t) {
|
|
86
|
+
return t = t || [], e == null || typeof e == "boolean" || (Ze(e) ? e.some(function(n) {
|
|
87
|
+
pe(n, t);
|
|
88
|
+
}) : t.push(e)), t;
|
|
89
|
+
}
|
|
90
|
+
function to(e, t, n, r) {
|
|
91
|
+
var o = e.key, i = e.type, s = n - 1, d = n + 1, l = t[n];
|
|
92
|
+
if (l === null || l && o == l.key && i === l.type)
|
|
93
|
+
return n;
|
|
94
|
+
if (r > (l == null || 131072 & l.__u ? 0 : 1))
|
|
95
|
+
for (; s >= 0 || d < t.length; ) {
|
|
96
|
+
if (s >= 0) {
|
|
97
|
+
if ((l = t[s]) && !(131072 & l.__u) && o == l.key && i === l.type)
|
|
98
|
+
return s;
|
|
99
|
+
s--;
|
|
100
|
+
}
|
|
101
|
+
if (d < t.length) {
|
|
102
|
+
if ((l = t[d]) && !(131072 & l.__u) && o == l.key && i === l.type)
|
|
103
|
+
return d;
|
|
104
|
+
d++;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return -1;
|
|
108
|
+
}
|
|
109
|
+
function zt(e, t, n) {
|
|
110
|
+
t[0] === "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || eo.test(t) ? n : n + "px";
|
|
111
|
+
}
|
|
112
|
+
function Ae(e, t, n, r, o) {
|
|
113
|
+
var i;
|
|
114
|
+
e:
|
|
115
|
+
if (t === "style")
|
|
116
|
+
if (typeof n == "string")
|
|
117
|
+
e.style.cssText = n;
|
|
118
|
+
else {
|
|
119
|
+
if (typeof r == "string" && (e.style.cssText = r = ""), r)
|
|
120
|
+
for (t in r)
|
|
121
|
+
n && t in n || zt(e.style, t, "");
|
|
122
|
+
if (n)
|
|
123
|
+
for (t in n)
|
|
124
|
+
r && n[t] === r[t] || zt(e.style, t, n[t]);
|
|
125
|
+
}
|
|
126
|
+
else if (t[0] === "o" && t[1] === "n")
|
|
127
|
+
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 ? Ft : $t, i)) : e.removeEventListener(t, i ? Ft : $t, i);
|
|
128
|
+
else {
|
|
129
|
+
if (o)
|
|
130
|
+
t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
|
|
131
|
+
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)
|
|
132
|
+
try {
|
|
133
|
+
e[t] = n ?? "";
|
|
134
|
+
break e;
|
|
135
|
+
} catch {
|
|
136
|
+
}
|
|
137
|
+
typeof n == "function" || (n == null || n === !1 && t[4] !== "-" ? e.removeAttribute(t) : e.setAttribute(t, n));
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
function $t(e) {
|
|
141
|
+
var t = this.l[e.type + !1];
|
|
142
|
+
if (e.t) {
|
|
143
|
+
if (e.t <= t.u)
|
|
144
|
+
return;
|
|
145
|
+
} else
|
|
146
|
+
e.t = Date.now();
|
|
147
|
+
return t(D.event ? D.event(e) : e);
|
|
148
|
+
}
|
|
149
|
+
function Ft(e) {
|
|
150
|
+
return this.l[e.type + !0](D.event ? D.event(e) : e);
|
|
151
|
+
}
|
|
152
|
+
function Et(e, t, n, r, o, i, s, d, l, p) {
|
|
153
|
+
var h, c, u, m, f, b, _, y, x, T, S, w, k, j, P, g = t.type;
|
|
154
|
+
if (t.constructor !== void 0)
|
|
155
|
+
return null;
|
|
156
|
+
128 & n.__u && (l = !!(32 & n.__u), i = [d = t.__e = n.__e]), (h = D.__b) && h(t);
|
|
157
|
+
e:
|
|
158
|
+
if (typeof g == "function")
|
|
159
|
+
try {
|
|
160
|
+
if (y = t.props, x = (h = g.contextType) && r[h.__c], T = h ? x ? x.props.value : h.__ : r, n.__c ? _ = (c = t.__c = n.__c).__ = c.__E : ("prototype" in g && g.prototype.render ? t.__c = c = new g(y, T) : (t.__c = c = new oe(y, T), c.constructor = g, c.render = no), x && x.sub(c), c.props = y, c.state || (c.state = {}), c.context = T, c.__n = r, u = c.__d = !0, c.__h = [], c._sb = []), c.__s == null && (c.__s = c.state), g.getDerivedStateFromProps != null && (c.__s == c.state && (c.__s = ue({}, c.__s)), ue(c.__s, g.getDerivedStateFromProps(y, c.__s))), m = c.props, f = c.state, c.__v = t, u)
|
|
161
|
+
g.getDerivedStateFromProps == null && c.componentWillMount != null && c.componentWillMount(), c.componentDidMount != null && c.__h.push(c.componentDidMount);
|
|
162
|
+
else {
|
|
163
|
+
if (g.getDerivedStateFromProps == null && y !== m && c.componentWillReceiveProps != null && c.componentWillReceiveProps(y, T), !c.__e && (c.shouldComponentUpdate != null && c.shouldComponentUpdate(y, c.__s, T) === !1 || t.__v === n.__v)) {
|
|
164
|
+
for (t.__v !== n.__v && (c.props = y, c.state = c.__s, c.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.forEach(function(v) {
|
|
165
|
+
v && (v.__ = t);
|
|
166
|
+
}), S = 0; S < c._sb.length; S++)
|
|
167
|
+
c.__h.push(c._sb[S]);
|
|
168
|
+
c._sb = [], c.__h.length && s.push(c);
|
|
169
|
+
break e;
|
|
170
|
+
}
|
|
171
|
+
c.componentWillUpdate != null && c.componentWillUpdate(y, c.__s, T), c.componentDidUpdate != null && c.__h.push(function() {
|
|
172
|
+
c.componentDidUpdate(m, f, b);
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
if (c.context = T, c.props = y, c.__P = e, c.__e = !1, w = D.__r, k = 0, "prototype" in g && g.prototype.render) {
|
|
176
|
+
for (c.state = c.__s, c.__d = !1, w && w(t), h = c.render(c.props, c.state, c.context), j = 0; j < c._sb.length; j++)
|
|
177
|
+
c.__h.push(c._sb[j]);
|
|
178
|
+
c._sb = [];
|
|
179
|
+
} else
|
|
180
|
+
do
|
|
181
|
+
c.__d = !1, w && w(t), h = c.render(c.props, c.state, c.context), c.state = c.__s;
|
|
182
|
+
while (c.__d && ++k < 25);
|
|
183
|
+
c.state = c.__s, c.getChildContext != null && (r = ue(ue({}, r), c.getChildContext())), u || c.getSnapshotBeforeUpdate == null || (b = c.getSnapshotBeforeUpdate(m, f)), Vt(e, Ze(P = h != null && h.type === K && h.key == null ? h.props.children : h) ? P : [P], t, n, r, o, i, s, d, l, p), c.base = t.__e, t.__u &= -161, c.__h.length && s.push(c), _ && (c.__E = c.__ = null);
|
|
184
|
+
} catch (v) {
|
|
185
|
+
t.__v = null, l || i != null ? (t.__e = d, t.__u |= l ? 160 : 32, i[i.indexOf(d)] = null) : (t.__e = n.__e, t.__k = n.__k), D.__e(v, t, n);
|
|
186
|
+
}
|
|
187
|
+
else
|
|
188
|
+
i == null && t.__v === n.__v ? (t.__k = n.__k, t.__e = n.__e) : t.__e = function(v, E, I, O, C, M, A, H, q) {
|
|
189
|
+
var R, W, Y, le, F, Q, be, te = I.props, de = E.props, ne = E.type;
|
|
190
|
+
if (ne === "svg" && (C = !0), M != null) {
|
|
191
|
+
for (R = 0; R < M.length; R++)
|
|
192
|
+
if ((F = M[R]) && "setAttribute" in F == !!ne && (ne ? F.localName === ne : F.nodeType === 3)) {
|
|
193
|
+
v = F, M[R] = null;
|
|
194
|
+
break;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
if (v == null) {
|
|
198
|
+
if (ne === null)
|
|
199
|
+
return document.createTextNode(de);
|
|
200
|
+
v = C ? document.createElementNS("http://www.w3.org/2000/svg", ne) : document.createElement(ne, de.is && de), M = null, H = !1;
|
|
201
|
+
}
|
|
202
|
+
if (ne === null)
|
|
203
|
+
te === de || H && v.data === de || (v.data = de);
|
|
204
|
+
else {
|
|
205
|
+
if (M = M && Le.call(v.childNodes), te = I.props || Me, !H && M != null)
|
|
206
|
+
for (te = {}, R = 0; R < v.attributes.length; R++)
|
|
207
|
+
te[(F = v.attributes[R]).name] = F.value;
|
|
208
|
+
for (R in te)
|
|
209
|
+
F = te[R], R == "children" || (R == "dangerouslySetInnerHTML" ? Y = F : R === "key" || R in de || Ae(v, R, null, F, C));
|
|
210
|
+
for (R in de)
|
|
211
|
+
F = de[R], R == "children" ? le = F : R == "dangerouslySetInnerHTML" ? W = F : R == "value" ? Q = F : R == "checked" ? be = F : R === "key" || H && typeof F != "function" || te[R] === F || Ae(v, R, F, te[R], C);
|
|
212
|
+
if (W)
|
|
213
|
+
H || Y && (W.__html === Y.__html || W.__html === v.innerHTML) || (v.innerHTML = W.__html), E.__k = [];
|
|
214
|
+
else if (Y && (v.innerHTML = ""), Vt(v, Ze(le) ? le : [le], E, I, O, C && ne !== "foreignObject", M, A, M ? M[0] : I.__k && je(I, 0), H, q), M != null)
|
|
215
|
+
for (R = M.length; R--; )
|
|
216
|
+
M[R] != null && On(M[R]);
|
|
217
|
+
H || (R = "value", Q !== void 0 && (Q !== v[R] || ne === "progress" && !Q || ne === "option" && Q !== te[R]) && Ae(v, R, Q, te[R], !1), R = "checked", be !== void 0 && be !== v[R] && Ae(v, R, be, te[R], !1));
|
|
218
|
+
}
|
|
219
|
+
return v;
|
|
220
|
+
}(n.__e, t, n, r, o, i, s, l, p);
|
|
221
|
+
(h = D.diffed) && h(t);
|
|
222
|
+
}
|
|
223
|
+
function Bn(e, t, n) {
|
|
224
|
+
t.__d = void 0;
|
|
225
|
+
for (var r = 0; r < n.length; r++)
|
|
226
|
+
St(n[r], n[++r], n[++r]);
|
|
227
|
+
D.__c && D.__c(t, e), e.some(function(o) {
|
|
228
|
+
try {
|
|
229
|
+
e = o.__h, o.__h = [], e.some(function(i) {
|
|
230
|
+
i.call(o);
|
|
231
|
+
});
|
|
232
|
+
} catch (i) {
|
|
233
|
+
D.__e(i, o.__v);
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
function St(e, t, n) {
|
|
238
|
+
try {
|
|
239
|
+
typeof e == "function" ? e(t) : e.current = t;
|
|
240
|
+
} catch (r) {
|
|
241
|
+
D.__e(r, n);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
function vt(e, t, n) {
|
|
245
|
+
var r, o;
|
|
246
|
+
if (D.unmount && D.unmount(e), (r = e.ref) && (r.current && r.current !== e.__e || St(r, null, t)), (r = e.__c) != null) {
|
|
247
|
+
if (r.componentWillUnmount)
|
|
248
|
+
try {
|
|
249
|
+
r.componentWillUnmount();
|
|
250
|
+
} catch (i) {
|
|
251
|
+
D.__e(i, t);
|
|
252
|
+
}
|
|
253
|
+
r.base = r.__P = null, e.__c = void 0;
|
|
254
|
+
}
|
|
255
|
+
if (r = e.__k)
|
|
256
|
+
for (o = 0; o < r.length; o++)
|
|
257
|
+
r[o] && vt(r[o], t, n || typeof e.type != "function");
|
|
258
|
+
n || e.__e == null || On(e.__e), e.__ = e.__e = e.__d = void 0;
|
|
259
|
+
}
|
|
260
|
+
function no(e, t, n) {
|
|
261
|
+
return this.constructor(e, n);
|
|
262
|
+
}
|
|
263
|
+
function Ie(e, t, n) {
|
|
264
|
+
var r, o, i, s;
|
|
265
|
+
D.__ && D.__(e, t), o = (r = typeof n == "function") ? null : n && n.__k || t.__k, i = [], s = [], Et(t, e = (!r && n || t).__k = z(K, null, [e]), o || Me, Me, t.ownerSVGElement !== void 0, !r && n ? [n] : o ? null : t.firstChild ? Le.call(t.childNodes) : null, i, !r && n ? n : o ? o.__e : t.firstChild, r, s), Bn(i, e, s);
|
|
266
|
+
}
|
|
267
|
+
function qn(e, t) {
|
|
268
|
+
Ie(e, t, qn);
|
|
269
|
+
}
|
|
270
|
+
function ro(e, t, n) {
|
|
271
|
+
var r, o, i, s, d = ue({}, e.props);
|
|
272
|
+
for (i in e.type && e.type.defaultProps && (s = e.type.defaultProps), t)
|
|
273
|
+
i == "key" ? r = t[i] : i == "ref" ? o = t[i] : d[i] = t[i] === void 0 && s !== void 0 ? s[i] : t[i];
|
|
274
|
+
return arguments.length > 2 && (d.children = arguments.length > 3 ? Le.call(arguments, 2) : n), Re(e.type, d, r || e.key, o || e.ref, null);
|
|
275
|
+
}
|
|
276
|
+
function Vn(e, t) {
|
|
277
|
+
var n = { __c: t = "__cC" + Mn++, __: e, Consumer: function(r, o) {
|
|
278
|
+
return r.children(o);
|
|
279
|
+
}, Provider: function(r) {
|
|
280
|
+
var o, i;
|
|
281
|
+
return this.getChildContext || (o = [], (i = {})[t] = this, this.getChildContext = function() {
|
|
282
|
+
return i;
|
|
283
|
+
}, this.shouldComponentUpdate = function(s) {
|
|
284
|
+
this.props.value !== s.value && o.some(function(d) {
|
|
285
|
+
d.__e = !0, ft(d);
|
|
286
|
+
});
|
|
287
|
+
}, this.sub = function(s) {
|
|
288
|
+
o.push(s);
|
|
289
|
+
var d = s.componentWillUnmount;
|
|
290
|
+
s.componentWillUnmount = function() {
|
|
291
|
+
o.splice(o.indexOf(s), 1), d && d.call(s);
|
|
292
|
+
};
|
|
293
|
+
}), r.children;
|
|
294
|
+
} };
|
|
295
|
+
return n.Provider.__ = n.Consumer.contextType = n;
|
|
296
|
+
}
|
|
297
|
+
Le = Ln.slice, D = { __e: function(e, t, n, r) {
|
|
298
|
+
for (var o, i, s; t = t.__; )
|
|
299
|
+
if ((o = t.__c) && !o.__)
|
|
300
|
+
try {
|
|
301
|
+
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)
|
|
302
|
+
return o.__E = o;
|
|
303
|
+
} catch (d) {
|
|
304
|
+
e = d;
|
|
305
|
+
}
|
|
306
|
+
throw e;
|
|
307
|
+
} }, Rn = 0, oe.prototype.setState = function(e, t) {
|
|
308
|
+
var n;
|
|
309
|
+
n = this.__s != null && this.__s !== this.state ? this.__s : this.__s = ue({}, this.state), typeof e == "function" && (e = e(ue({}, n), this.props)), e && ue(n, e), e != null && this.__v && (t && this._sb.push(t), ft(this));
|
|
310
|
+
}, oe.prototype.forceUpdate = function(e) {
|
|
311
|
+
this.__v && (this.__e = !0, e && this.__h.push(e), ft(this));
|
|
312
|
+
}, oe.prototype.render = K, xe = [], Nn = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, gt = function(e, t) {
|
|
313
|
+
return e.__v.__b - t.__v.__b;
|
|
314
|
+
}, Ge.__r = 0, Mn = 0;
|
|
315
|
+
var he, V, rt, Wt, Te = 0, zn = [], qe = [], Zt = D.__b, Gt = D.__r, Kt = D.diffed, Yt = D.__c, Qt = D.unmount;
|
|
316
|
+
function we(e, t) {
|
|
317
|
+
D.__h && D.__h(V, e, Te || t), Te = 0;
|
|
318
|
+
var n = V.__H || (V.__H = { __: [], __h: [] });
|
|
319
|
+
return e >= n.__.length && n.__.push({ __V: qe }), n.__[e];
|
|
320
|
+
}
|
|
321
|
+
function $(e) {
|
|
322
|
+
return Te = 1, jt(Zn, e);
|
|
323
|
+
}
|
|
324
|
+
function jt(e, t, n) {
|
|
325
|
+
var r = we(he++, 2);
|
|
326
|
+
if (r.t = e, !r.__c && (r.__ = [n ? n(t) : Zn(void 0, t), function(d) {
|
|
327
|
+
var l = r.__N ? r.__N[0] : r.__[0], p = r.t(l, d);
|
|
328
|
+
l !== p && (r.__N = [p, r.__[1]], r.__c.setState({}));
|
|
329
|
+
}], r.__c = V, !V.u)) {
|
|
330
|
+
var o = function(d, l, p) {
|
|
331
|
+
if (!r.__c.__H)
|
|
332
|
+
return !0;
|
|
333
|
+
var h = r.__c.__H.__.filter(function(u) {
|
|
334
|
+
return u.__c;
|
|
335
|
+
});
|
|
336
|
+
if (h.every(function(u) {
|
|
337
|
+
return !u.__N;
|
|
338
|
+
}))
|
|
339
|
+
return !i || i.call(this, d, l, p);
|
|
340
|
+
var c = !1;
|
|
341
|
+
return h.forEach(function(u) {
|
|
342
|
+
if (u.__N) {
|
|
343
|
+
var m = u.__[0];
|
|
344
|
+
u.__ = u.__N, u.__N = void 0, m !== u.__[0] && (c = !0);
|
|
345
|
+
}
|
|
346
|
+
}), !(!c && r.__c.props === d) && (!i || i.call(this, d, l, p));
|
|
347
|
+
};
|
|
348
|
+
V.u = !0;
|
|
349
|
+
var i = V.shouldComponentUpdate, s = V.componentWillUpdate;
|
|
350
|
+
V.componentWillUpdate = function(d, l, p) {
|
|
351
|
+
if (this.__e) {
|
|
352
|
+
var h = i;
|
|
353
|
+
i = void 0, o(d, l, p), i = h;
|
|
354
|
+
}
|
|
355
|
+
s && s.call(this, d, l, p);
|
|
356
|
+
}, V.shouldComponentUpdate = o;
|
|
357
|
+
}
|
|
358
|
+
return r.__N || r.__;
|
|
359
|
+
}
|
|
360
|
+
function G(e, t) {
|
|
361
|
+
var n = we(he++, 3);
|
|
362
|
+
!D.__s && Tt(n.__H, t) && (n.__ = e, n.i = t, V.__H.__h.push(n));
|
|
363
|
+
}
|
|
364
|
+
function Oe(e, t) {
|
|
365
|
+
var n = we(he++, 4);
|
|
366
|
+
!D.__s && Tt(n.__H, t) && (n.__ = e, n.i = t, V.__h.push(n));
|
|
367
|
+
}
|
|
368
|
+
function ee(e) {
|
|
369
|
+
return Te = 5, Ue(function() {
|
|
370
|
+
return { current: e };
|
|
371
|
+
}, []);
|
|
372
|
+
}
|
|
373
|
+
function $n(e, t, n) {
|
|
374
|
+
Te = 6, Oe(function() {
|
|
375
|
+
return typeof e == "function" ? (e(t()), function() {
|
|
376
|
+
return e(null);
|
|
377
|
+
}) : e ? (e.current = t(), function() {
|
|
378
|
+
return e.current = null;
|
|
379
|
+
}) : void 0;
|
|
380
|
+
}, n == null ? n : n.concat(e));
|
|
381
|
+
}
|
|
382
|
+
function Ue(e, t) {
|
|
383
|
+
var n = we(he++, 7);
|
|
384
|
+
return Tt(n.__H, t) ? (n.__V = e(), n.i = t, n.__h = e, n.__V) : n.__;
|
|
385
|
+
}
|
|
386
|
+
function Ke(e, t) {
|
|
387
|
+
return Te = 8, Ue(function() {
|
|
388
|
+
return e;
|
|
389
|
+
}, t);
|
|
390
|
+
}
|
|
391
|
+
function Fn(e) {
|
|
392
|
+
var t = V.context[e.__c], n = we(he++, 9);
|
|
393
|
+
return n.c = e, t ? (n.__ == null && (n.__ = !0, t.sub(V)), t.props.value) : e.__;
|
|
394
|
+
}
|
|
395
|
+
function It(e, t) {
|
|
396
|
+
D.useDebugValue && D.useDebugValue(t ? t(e) : e);
|
|
397
|
+
}
|
|
398
|
+
function Wn() {
|
|
399
|
+
var e = we(he++, 11);
|
|
400
|
+
if (!e.__) {
|
|
401
|
+
for (var t = V.__v; t !== null && !t.__m && t.__ !== null; )
|
|
402
|
+
t = t.__;
|
|
403
|
+
var n = t.__m || (t.__m = [0, 0]);
|
|
404
|
+
e.__ = "P" + n[0] + "-" + n[1]++;
|
|
405
|
+
}
|
|
406
|
+
return e.__;
|
|
407
|
+
}
|
|
408
|
+
function oo() {
|
|
409
|
+
for (var e; e = zn.shift(); )
|
|
410
|
+
if (e.__P && e.__H)
|
|
411
|
+
try {
|
|
412
|
+
e.__H.__h.forEach(Ve), e.__H.__h.forEach(_t), e.__H.__h = [];
|
|
413
|
+
} catch (t) {
|
|
414
|
+
e.__H.__h = [], D.__e(t, e.__v);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
D.__b = function(e) {
|
|
418
|
+
V = null, Zt && Zt(e);
|
|
419
|
+
}, D.__r = function(e) {
|
|
420
|
+
Gt && Gt(e), he = 0;
|
|
421
|
+
var t = (V = e.__c).__H;
|
|
422
|
+
t && (rt === V ? (t.__h = [], V.__h = [], t.__.forEach(function(n) {
|
|
423
|
+
n.__N && (n.__ = n.__N), n.__V = qe, n.__N = n.i = void 0;
|
|
424
|
+
})) : (t.__h.forEach(Ve), t.__h.forEach(_t), t.__h = [], he = 0)), rt = V;
|
|
425
|
+
}, D.diffed = function(e) {
|
|
426
|
+
Kt && Kt(e);
|
|
427
|
+
var t = e.__c;
|
|
428
|
+
t && t.__H && (t.__H.__h.length && (zn.push(t) !== 1 && Wt === D.requestAnimationFrame || ((Wt = D.requestAnimationFrame) || io)(oo)), t.__H.__.forEach(function(n) {
|
|
429
|
+
n.i && (n.__H = n.i), n.__V !== qe && (n.__ = n.__V), n.i = void 0, n.__V = qe;
|
|
430
|
+
})), rt = V = null;
|
|
431
|
+
}, D.__c = function(e, t) {
|
|
432
|
+
t.some(function(n) {
|
|
433
|
+
try {
|
|
434
|
+
n.__h.forEach(Ve), n.__h = n.__h.filter(function(r) {
|
|
435
|
+
return !r.__ || _t(r);
|
|
436
|
+
});
|
|
437
|
+
} catch (r) {
|
|
438
|
+
t.some(function(o) {
|
|
439
|
+
o.__h && (o.__h = []);
|
|
440
|
+
}), t = [], D.__e(r, n.__v);
|
|
441
|
+
}
|
|
442
|
+
}), Yt && Yt(e, t);
|
|
443
|
+
}, D.unmount = function(e) {
|
|
444
|
+
Qt && Qt(e);
|
|
445
|
+
var t, n = e.__c;
|
|
446
|
+
n && n.__H && (n.__H.__.forEach(function(r) {
|
|
447
|
+
try {
|
|
448
|
+
Ve(r);
|
|
449
|
+
} catch (o) {
|
|
450
|
+
t = o;
|
|
451
|
+
}
|
|
452
|
+
}), n.__H = void 0, t && D.__e(t, n.__v));
|
|
453
|
+
};
|
|
454
|
+
var Jt = typeof requestAnimationFrame == "function";
|
|
455
|
+
function io(e) {
|
|
456
|
+
var t, n = function() {
|
|
457
|
+
clearTimeout(r), Jt && cancelAnimationFrame(t), setTimeout(e);
|
|
458
|
+
}, r = setTimeout(n, 100);
|
|
459
|
+
Jt && (t = requestAnimationFrame(n));
|
|
460
|
+
}
|
|
461
|
+
function Ve(e) {
|
|
462
|
+
var t = V, n = e.__c;
|
|
463
|
+
typeof n == "function" && (e.__c = void 0, n()), V = t;
|
|
464
|
+
}
|
|
465
|
+
function _t(e) {
|
|
466
|
+
var t = V;
|
|
467
|
+
e.__c = e.__(), V = t;
|
|
468
|
+
}
|
|
469
|
+
function Tt(e, t) {
|
|
470
|
+
return !e || e.length !== t.length || t.some(function(n, r) {
|
|
471
|
+
return n !== e[r];
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
function Zn(e, t) {
|
|
475
|
+
return typeof t == "function" ? t(e) : t;
|
|
476
|
+
}
|
|
477
|
+
function Gn(e, t) {
|
|
478
|
+
for (var n in t)
|
|
479
|
+
e[n] = t[n];
|
|
480
|
+
return e;
|
|
481
|
+
}
|
|
482
|
+
function bt(e, t) {
|
|
483
|
+
for (var n in e)
|
|
484
|
+
if (n !== "__source" && !(n in t))
|
|
485
|
+
return !0;
|
|
486
|
+
for (var r in t)
|
|
487
|
+
if (r !== "__source" && e[r] !== t[r])
|
|
488
|
+
return !0;
|
|
489
|
+
return !1;
|
|
490
|
+
}
|
|
491
|
+
function Ye(e) {
|
|
492
|
+
this.props = e;
|
|
493
|
+
}
|
|
494
|
+
function Kn(e, t) {
|
|
495
|
+
function n(o) {
|
|
496
|
+
var i = this.props.ref, s = i == o.ref;
|
|
497
|
+
return !s && i && (i.call ? i(null) : i.current = null), t ? !t(this.props, o) || !s : bt(this.props, o);
|
|
498
|
+
}
|
|
499
|
+
function r(o) {
|
|
500
|
+
return this.shouldComponentUpdate = n, z(e, o);
|
|
501
|
+
}
|
|
502
|
+
return r.displayName = "Memo(" + (e.displayName || e.name) + ")", r.prototype.isReactComponent = !0, r.__f = !0, r;
|
|
503
|
+
}
|
|
504
|
+
(Ye.prototype = new oe()).isPureReactComponent = !0, Ye.prototype.shouldComponentUpdate = function(e, t) {
|
|
505
|
+
return bt(this.props, e) || bt(this.state, t);
|
|
506
|
+
};
|
|
507
|
+
var Xt = D.__b;
|
|
508
|
+
D.__b = function(e) {
|
|
509
|
+
e.type && e.type.__f && e.ref && (e.props.ref = e.ref, e.ref = null), Xt && Xt(e);
|
|
510
|
+
};
|
|
511
|
+
var so = typeof Symbol < "u" && Symbol.for && Symbol.for("react.forward_ref") || 3911;
|
|
512
|
+
function Pt(e) {
|
|
513
|
+
function t(n) {
|
|
514
|
+
var r = Gn({}, n);
|
|
515
|
+
return delete r.ref, e(r, n.ref || null);
|
|
516
|
+
}
|
|
517
|
+
return t.$$typeof = so, t.render = t, t.prototype.isReactComponent = t.__f = !0, t.displayName = "ForwardRef(" + (e.displayName || e.name) + ")", t;
|
|
518
|
+
}
|
|
519
|
+
var en = function(e, t) {
|
|
520
|
+
return e == null ? null : pe(pe(e).map(t));
|
|
521
|
+
}, Yn = { map: en, forEach: en, count: function(e) {
|
|
522
|
+
return e ? pe(e).length : 0;
|
|
523
|
+
}, only: function(e) {
|
|
524
|
+
var t = pe(e);
|
|
525
|
+
if (t.length !== 1)
|
|
526
|
+
throw "Children.only";
|
|
527
|
+
return t[0];
|
|
528
|
+
}, toArray: pe }, ao = D.__e;
|
|
529
|
+
D.__e = function(e, t, n, r) {
|
|
530
|
+
if (e.then) {
|
|
531
|
+
for (var o, i = t; i = i.__; )
|
|
532
|
+
if ((o = i.__c) && o.__c)
|
|
533
|
+
return t.__e == null && (t.__e = n.__e, t.__k = n.__k), o.__c(e, t);
|
|
534
|
+
}
|
|
535
|
+
ao(e, t, n, r);
|
|
536
|
+
};
|
|
537
|
+
var tn = D.unmount;
|
|
538
|
+
function Qn(e, t, n) {
|
|
539
|
+
return e && (e.__c && e.__c.__H && (e.__c.__H.__.forEach(function(r) {
|
|
540
|
+
typeof r.__c == "function" && r.__c();
|
|
541
|
+
}), e.__c.__H = null), (e = Gn({}, e)).__c != null && (e.__c.__P === n && (e.__c.__P = t), e.__c = null), e.__k = e.__k && e.__k.map(function(r) {
|
|
542
|
+
return Qn(r, t, n);
|
|
543
|
+
})), e;
|
|
544
|
+
}
|
|
545
|
+
function Jn(e, t, n) {
|
|
546
|
+
return e && n && (e.__v = null, e.__k = e.__k && e.__k.map(function(r) {
|
|
547
|
+
return Jn(r, t, n);
|
|
548
|
+
}), e.__c && e.__c.__P === t && (e.__e && n.appendChild(e.__e), e.__c.__e = !0, e.__c.__P = n)), e;
|
|
549
|
+
}
|
|
550
|
+
function Ne() {
|
|
551
|
+
this.__u = 0, this.t = null, this.__b = null;
|
|
552
|
+
}
|
|
553
|
+
function Xn(e) {
|
|
554
|
+
var t = e.__.__c;
|
|
555
|
+
return t && t.__a && t.__a(e);
|
|
556
|
+
}
|
|
557
|
+
function er(e) {
|
|
558
|
+
var t, n, r;
|
|
559
|
+
function o(i) {
|
|
560
|
+
if (t || (t = e()).then(function(s) {
|
|
561
|
+
n = s.default || s;
|
|
562
|
+
}, function(s) {
|
|
563
|
+
r = s;
|
|
564
|
+
}), r)
|
|
565
|
+
throw r;
|
|
566
|
+
if (!n)
|
|
567
|
+
throw t;
|
|
568
|
+
return z(n, i);
|
|
569
|
+
}
|
|
570
|
+
return o.displayName = "Lazy", o.__f = !0, o;
|
|
571
|
+
}
|
|
572
|
+
function Ee() {
|
|
573
|
+
this.u = null, this.o = null;
|
|
574
|
+
}
|
|
575
|
+
D.unmount = function(e) {
|
|
576
|
+
var t = e.__c;
|
|
577
|
+
t && t.__R && t.__R(), t && 32 & e.__u && (e.type = null), tn && tn(e);
|
|
578
|
+
}, (Ne.prototype = new oe()).__c = function(e, t) {
|
|
579
|
+
var n = t.__c, r = this;
|
|
580
|
+
r.t == null && (r.t = []), r.t.push(n);
|
|
581
|
+
var o = Xn(r.__v), i = !1, s = function() {
|
|
582
|
+
i || (i = !0, n.__R = null, o ? o(d) : d());
|
|
583
|
+
};
|
|
584
|
+
n.__R = s;
|
|
585
|
+
var d = function() {
|
|
586
|
+
if (!--r.__u) {
|
|
587
|
+
if (r.state.__a) {
|
|
588
|
+
var l = r.state.__a;
|
|
589
|
+
r.__v.__k[0] = Jn(l, l.__c.__P, l.__c.__O);
|
|
590
|
+
}
|
|
591
|
+
var p;
|
|
592
|
+
for (r.setState({ __a: r.__b = null }); p = r.t.pop(); )
|
|
593
|
+
p.forceUpdate();
|
|
594
|
+
}
|
|
595
|
+
};
|
|
596
|
+
r.__u++ || 32 & t.__u || r.setState({ __a: r.__b = r.__v.__k[0] }), e.then(s, s);
|
|
597
|
+
}, Ne.prototype.componentWillUnmount = function() {
|
|
598
|
+
this.t = [];
|
|
599
|
+
}, Ne.prototype.render = function(e, t) {
|
|
600
|
+
if (this.__b) {
|
|
601
|
+
if (this.__v.__k) {
|
|
602
|
+
var n = document.createElement("div"), r = this.__v.__k[0].__c;
|
|
603
|
+
this.__v.__k[0] = Qn(this.__b, n, r.__O = r.__P);
|
|
604
|
+
}
|
|
605
|
+
this.__b = null;
|
|
606
|
+
}
|
|
607
|
+
var o = t.__a && z(K, null, e.fallback);
|
|
608
|
+
return o && (o.__u &= -33), [z(K, null, t.__a ? null : e.children), o];
|
|
609
|
+
};
|
|
610
|
+
var nn = function(e, t, n) {
|
|
611
|
+
if (++n[1] === n[0] && e.o.delete(t), e.props.revealOrder && (e.props.revealOrder[0] !== "t" || !e.o.size))
|
|
612
|
+
for (n = e.u; n; ) {
|
|
613
|
+
for (; n.length > 3; )
|
|
614
|
+
n.pop()();
|
|
615
|
+
if (n[1] < n[0])
|
|
616
|
+
break;
|
|
617
|
+
e.u = n = n[2];
|
|
618
|
+
}
|
|
619
|
+
};
|
|
620
|
+
function lo(e) {
|
|
621
|
+
return this.getChildContext = function() {
|
|
622
|
+
return e.context;
|
|
623
|
+
}, e.children;
|
|
624
|
+
}
|
|
625
|
+
function co(e) {
|
|
626
|
+
var t = this, n = e.i;
|
|
627
|
+
t.componentWillUnmount = function() {
|
|
628
|
+
Ie(null, t.l), t.l = null, t.i = null;
|
|
629
|
+
}, t.i && t.i !== n && t.componentWillUnmount(), t.l || (t.i = n, t.l = { nodeType: 1, parentNode: n, childNodes: [], appendChild: function(r) {
|
|
630
|
+
this.childNodes.push(r), t.i.appendChild(r);
|
|
631
|
+
}, insertBefore: function(r, o) {
|
|
632
|
+
this.childNodes.push(r), t.i.appendChild(r);
|
|
633
|
+
}, removeChild: function(r) {
|
|
634
|
+
this.childNodes.splice(this.childNodes.indexOf(r) >>> 1, 1), t.i.removeChild(r);
|
|
635
|
+
} }), Ie(z(lo, { context: t.context }, e.__v), t.l);
|
|
636
|
+
}
|
|
637
|
+
function tr(e, t) {
|
|
638
|
+
var n = z(co, { __v: e, i: t });
|
|
639
|
+
return n.containerInfo = t, n;
|
|
640
|
+
}
|
|
641
|
+
(Ee.prototype = new oe()).__a = function(e) {
|
|
642
|
+
var t = this, n = Xn(t.__v), r = t.o.get(e);
|
|
643
|
+
return r[0]++, function(o) {
|
|
644
|
+
var i = function() {
|
|
645
|
+
t.props.revealOrder ? (r.push(o), nn(t, e, r)) : o();
|
|
646
|
+
};
|
|
647
|
+
n ? n(i) : i();
|
|
648
|
+
};
|
|
649
|
+
}, Ee.prototype.render = function(e) {
|
|
650
|
+
this.u = null, this.o = /* @__PURE__ */ new Map();
|
|
651
|
+
var t = pe(e.children);
|
|
652
|
+
e.revealOrder && e.revealOrder[0] === "b" && t.reverse();
|
|
653
|
+
for (var n = t.length; n--; )
|
|
654
|
+
this.o.set(t[n], this.u = [1, 0, this.u]);
|
|
655
|
+
return e.children;
|
|
656
|
+
}, Ee.prototype.componentDidUpdate = Ee.prototype.componentDidMount = function() {
|
|
657
|
+
var e = this;
|
|
658
|
+
this.o.forEach(function(t, n) {
|
|
659
|
+
nn(e, n, t);
|
|
660
|
+
});
|
|
661
|
+
};
|
|
662
|
+
var nr = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, uo = /^(?: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]/, po = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, ho = /[A-Z0-9]/g, mo = typeof document < "u", go = function(e) {
|
|
663
|
+
return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(e);
|
|
664
|
+
};
|
|
665
|
+
function rr(e, t, n) {
|
|
666
|
+
return t.__k == null && (t.textContent = ""), Ie(e, t), typeof n == "function" && n(), e ? e.__c : null;
|
|
667
|
+
}
|
|
668
|
+
function or(e, t, n) {
|
|
669
|
+
return qn(e, t), typeof n == "function" && n(), e ? e.__c : null;
|
|
670
|
+
}
|
|
671
|
+
oe.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(e) {
|
|
672
|
+
Object.defineProperty(oe.prototype, e, { configurable: !0, get: function() {
|
|
673
|
+
return this["UNSAFE_" + e];
|
|
674
|
+
}, set: function(t) {
|
|
675
|
+
Object.defineProperty(this, e, { configurable: !0, writable: !0, value: t });
|
|
676
|
+
} });
|
|
677
|
+
});
|
|
678
|
+
var rn = D.event;
|
|
679
|
+
function fo() {
|
|
680
|
+
}
|
|
681
|
+
function vo() {
|
|
682
|
+
return this.cancelBubble;
|
|
683
|
+
}
|
|
684
|
+
function _o() {
|
|
685
|
+
return this.defaultPrevented;
|
|
686
|
+
}
|
|
687
|
+
D.event = function(e) {
|
|
688
|
+
return rn && (e = rn(e)), e.persist = fo, e.isPropagationStopped = vo, e.isDefaultPrevented = _o, e.nativeEvent = e;
|
|
689
|
+
};
|
|
690
|
+
var Dt, bo = { enumerable: !1, configurable: !0, get: function() {
|
|
691
|
+
return this.class;
|
|
692
|
+
} }, on = D.vnode;
|
|
693
|
+
D.vnode = function(e) {
|
|
694
|
+
typeof e.type == "string" && function(t) {
|
|
695
|
+
var n = t.props, r = t.type, o = {};
|
|
696
|
+
for (var i in n) {
|
|
697
|
+
var s = n[i];
|
|
698
|
+
if (!(i === "value" && "defaultValue" in n && s == null || mo && i === "children" && r === "noscript" || i === "class" || i === "className")) {
|
|
699
|
+
var d = i.toLowerCase();
|
|
700
|
+
i === "defaultValue" && "value" in n && n.value == null ? i = "value" : i === "download" && s === !0 ? s = "" : d === "ondoubleclick" ? i = "ondblclick" : d !== "onchange" || r !== "input" && r !== "textarea" || go(n.type) ? d === "onfocus" ? i = "onfocusin" : d === "onblur" ? i = "onfocusout" : po.test(i) ? i = d : r.indexOf("-") === -1 && uo.test(i) ? i = i.replace(ho, "-$&").toLowerCase() : s === null && (s = void 0) : d = i = "oninput", d === "oninput" && o[i = d] && (i = "oninputCapture"), o[i] = s;
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
r == "select" && o.multiple && Array.isArray(o.value) && (o.value = pe(n.children).forEach(function(l) {
|
|
704
|
+
l.props.selected = o.value.indexOf(l.props.value) != -1;
|
|
705
|
+
})), r == "select" && o.defaultValue != null && (o.value = pe(n.children).forEach(function(l) {
|
|
706
|
+
l.props.selected = o.multiple ? o.defaultValue.indexOf(l.props.value) != -1 : o.defaultValue == l.props.value;
|
|
707
|
+
})), n.class && !n.className ? (o.class = n.class, Object.defineProperty(o, "className", bo)) : (n.className && !n.class || n.class && n.className) && (o.class = o.className = n.className), t.props = o;
|
|
708
|
+
}(e), e.$$typeof = nr, on && on(e);
|
|
709
|
+
};
|
|
710
|
+
var sn = D.__r;
|
|
711
|
+
D.__r = function(e) {
|
|
712
|
+
sn && sn(e), Dt = e.__c;
|
|
713
|
+
};
|
|
714
|
+
var an = D.diffed;
|
|
715
|
+
D.diffed = function(e) {
|
|
716
|
+
an && an(e);
|
|
717
|
+
var t = e.props, n = e.__e;
|
|
718
|
+
n != null && e.type === "textarea" && "value" in t && t.value !== n.value && (n.value = t.value == null ? "" : t.value), Dt = null;
|
|
719
|
+
};
|
|
720
|
+
var ir = { ReactCurrentDispatcher: { current: { readContext: function(e) {
|
|
721
|
+
return Dt.__n[e.__c].props.value;
|
|
722
|
+
} } } };
|
|
723
|
+
function sr(e) {
|
|
724
|
+
return z.bind(null, e);
|
|
725
|
+
}
|
|
726
|
+
function He(e) {
|
|
727
|
+
return !!e && e.$$typeof === nr;
|
|
728
|
+
}
|
|
729
|
+
function ar(e) {
|
|
730
|
+
return He(e) && e.type === K;
|
|
731
|
+
}
|
|
732
|
+
function lr(e) {
|
|
733
|
+
return He(e) ? ro.apply(null, arguments) : e;
|
|
734
|
+
}
|
|
735
|
+
function dr(e) {
|
|
736
|
+
return !!e.__k && (Ie(null, e), !0);
|
|
737
|
+
}
|
|
738
|
+
function cr(e) {
|
|
739
|
+
return e && (e.base || e.nodeType === 1 && e) || null;
|
|
740
|
+
}
|
|
741
|
+
var ur = function(e, t) {
|
|
742
|
+
return e(t);
|
|
743
|
+
}, pr = function(e, t) {
|
|
744
|
+
return e(t);
|
|
745
|
+
}, hr = K;
|
|
746
|
+
function Rt(e) {
|
|
747
|
+
e();
|
|
748
|
+
}
|
|
749
|
+
function mr(e) {
|
|
750
|
+
return e;
|
|
751
|
+
}
|
|
752
|
+
function gr() {
|
|
753
|
+
return [!1, Rt];
|
|
754
|
+
}
|
|
755
|
+
var fr = Oe, vr = He;
|
|
756
|
+
function _r(e, t) {
|
|
757
|
+
var n = t(), r = $({ h: { __: n, v: t } }), o = r[0].h, i = r[1];
|
|
758
|
+
return Oe(function() {
|
|
759
|
+
o.__ = n, o.v = t, ot(o) && i({ h: o });
|
|
760
|
+
}, [e, n, t]), G(function() {
|
|
761
|
+
return ot(o) && i({ h: o }), e(function() {
|
|
762
|
+
ot(o) && i({ h: o });
|
|
763
|
+
});
|
|
764
|
+
}, [e]), n;
|
|
765
|
+
}
|
|
766
|
+
function ot(e) {
|
|
767
|
+
var t, n, r = e.v, o = e.__;
|
|
768
|
+
try {
|
|
769
|
+
var i = r();
|
|
770
|
+
return !((t = o) === (n = i) && (t !== 0 || 1 / t == 1 / n) || t != t && n != n);
|
|
771
|
+
} catch {
|
|
772
|
+
return !0;
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
var yo = { useState: $, useId: Wn, useReducer: jt, useEffect: G, useLayoutEffect: Oe, useInsertionEffect: fr, useTransition: gr, useDeferredValue: mr, useSyncExternalStore: _r, startTransition: Rt, useRef: ee, useImperativeHandle: $n, useMemo: Ue, useCallback: Ke, useContext: Fn, useDebugValue: It, version: "17.0.2", Children: Yn, render: rr, hydrate: or, unmountComponentAtNode: dr, createPortal: tr, createElement: z, createContext: Vn, createFactory: sr, cloneElement: lr, createRef: Un, Fragment: K, isValidElement: He, isElement: vr, isFragment: ar, findDOMNode: cr, Component: oe, PureComponent: Ye, memo: Kn, forwardRef: Pt, flushSync: pr, unstable_batchedUpdates: ur, StrictMode: hr, Suspense: Ne, SuspenseList: Ee, lazy: er, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ir };
|
|
776
|
+
const xo = Object.freeze(Object.defineProperty({ __proto__: null, Children: Yn, Component: oe, Fragment: K, PureComponent: Ye, StrictMode: hr, Suspense: Ne, SuspenseList: Ee, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ir, cloneElement: lr, createContext: Vn, createElement: z, createFactory: sr, createPortal: tr, createRef: Un, default: yo, findDOMNode: cr, flushSync: pr, forwardRef: Pt, hydrate: or, isElement: vr, isFragment: ar, isValidElement: He, lazy: er, memo: Kn, render: rr, startTransition: Rt, unmountComponentAtNode: dr, unstable_batchedUpdates: ur, useCallback: Ke, useContext: Fn, useDebugValue: It, useDeferredValue: mr, useEffect: G, useErrorBoundary: function(e) {
|
|
777
|
+
var t = we(he++, 10), n = $();
|
|
778
|
+
return t.__ = e, V.componentDidCatch || (V.componentDidCatch = function(r, o) {
|
|
779
|
+
t.__ && t.__(r, o), n[1](r);
|
|
780
|
+
}), [n[0], function() {
|
|
781
|
+
n[1](void 0);
|
|
782
|
+
}];
|
|
783
|
+
}, useId: Wn, useImperativeHandle: $n, useInsertionEffect: fr, useLayoutEffect: Oe, useMemo: Ue, useReducer: jt, useRef: ee, useState: $, useSyncExternalStore: _r, useTransition: gr, version: "17.0.2" }, Symbol.toStringTag, { value: "Module" })), ln = (e) => {
|
|
784
|
+
let t;
|
|
785
|
+
const n = /* @__PURE__ */ new Set(), r = (s, d) => {
|
|
786
|
+
const l = typeof s == "function" ? s(t) : s;
|
|
787
|
+
if (!Object.is(l, t)) {
|
|
788
|
+
const p = t;
|
|
789
|
+
t = d ?? typeof l != "object" ? l : Object.assign({}, t, l), n.forEach((h) => h(t, p));
|
|
790
|
+
}
|
|
791
|
+
}, o = () => t, i = { setState: r, getState: o, subscribe: (s) => (n.add(s), () => n.delete(s)), destroy: () => n.clear() };
|
|
792
|
+
return t = e(r, o, i), i;
|
|
793
|
+
};
|
|
794
|
+
function ko(e) {
|
|
795
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
796
|
+
}
|
|
797
|
+
function wo(e) {
|
|
798
|
+
if (e.__esModule)
|
|
799
|
+
return e;
|
|
800
|
+
var t = e.default;
|
|
801
|
+
if (typeof t == "function") {
|
|
802
|
+
var n = function r() {
|
|
803
|
+
return this instanceof r ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments);
|
|
804
|
+
};
|
|
805
|
+
n.prototype = t.prototype;
|
|
806
|
+
} else
|
|
807
|
+
n = {};
|
|
808
|
+
return Object.defineProperty(n, "__esModule", { value: !0 }), Object.keys(e).forEach(function(r) {
|
|
809
|
+
var o = Object.getOwnPropertyDescriptor(e, r);
|
|
810
|
+
Object.defineProperty(n, r, o.get ? o : { enumerable: !0, get: function() {
|
|
811
|
+
return e[r];
|
|
812
|
+
} });
|
|
813
|
+
}), n;
|
|
814
|
+
}
|
|
815
|
+
var br = { exports: {} }, dn = {};
|
|
816
|
+
const yr = wo(xo);
|
|
817
|
+
var xr = { exports: {} }, cn = {}, Pe = yr, Co = typeof Object.is == "function" ? Object.is : function(e, t) {
|
|
818
|
+
return e === t && (e !== 0 || 1 / e == 1 / t) || e != e && t != t;
|
|
819
|
+
}, Eo = Pe.useState, So = Pe.useEffect, jo = Pe.useLayoutEffect, Io = Pe.useDebugValue;
|
|
820
|
+
function it(e) {
|
|
821
|
+
var t = e.getSnapshot;
|
|
822
|
+
e = e.value;
|
|
823
|
+
try {
|
|
824
|
+
var n = t();
|
|
825
|
+
return !Co(e, n);
|
|
826
|
+
} catch {
|
|
827
|
+
return !0;
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
var To = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? function(e, t) {
|
|
831
|
+
return t();
|
|
832
|
+
} : function(e, t) {
|
|
833
|
+
var n = t(), r = Eo({ inst: { value: n, getSnapshot: t } }), o = r[0].inst, i = r[1];
|
|
834
|
+
return jo(function() {
|
|
835
|
+
o.value = n, o.getSnapshot = t, it(o) && i({ inst: o });
|
|
836
|
+
}, [e, n, t]), So(function() {
|
|
837
|
+
return it(o) && i({ inst: o }), e(function() {
|
|
838
|
+
it(o) && i({ inst: o });
|
|
839
|
+
});
|
|
840
|
+
}, [e]), Io(n), n;
|
|
841
|
+
};
|
|
842
|
+
cn.useSyncExternalStore = Pe.useSyncExternalStore !== void 0 ? Pe.useSyncExternalStore : To, xr.exports = cn;
|
|
843
|
+
var Xe = yr, Po = xr.exports, Do = typeof Object.is == "function" ? Object.is : function(e, t) {
|
|
844
|
+
return e === t && (e !== 0 || 1 / e == 1 / t) || e != e && t != t;
|
|
845
|
+
}, Ro = Po.useSyncExternalStore, No = Xe.useRef, Mo = Xe.useEffect, Lo = Xe.useMemo, Oo = Xe.useDebugValue;
|
|
846
|
+
dn.useSyncExternalStoreWithSelector = function(e, t, n, r, o) {
|
|
847
|
+
var i = No(null);
|
|
848
|
+
if (i.current === null) {
|
|
849
|
+
var s = { hasValue: !1, value: null };
|
|
850
|
+
i.current = s;
|
|
851
|
+
} else
|
|
852
|
+
s = i.current;
|
|
853
|
+
i = Lo(function() {
|
|
854
|
+
function l(m) {
|
|
855
|
+
if (!c) {
|
|
856
|
+
if (c = !0, p = m, m = r(m), o !== void 0 && s.hasValue) {
|
|
857
|
+
var f = s.value;
|
|
858
|
+
if (o(f, m))
|
|
859
|
+
return h = f;
|
|
860
|
+
}
|
|
861
|
+
return h = m;
|
|
862
|
+
}
|
|
863
|
+
if (f = h, Do(p, m))
|
|
864
|
+
return f;
|
|
865
|
+
var b = r(m);
|
|
866
|
+
return o !== void 0 && o(f, b) ? f : (p = m, h = b);
|
|
867
|
+
}
|
|
868
|
+
var p, h, c = !1, u = n === void 0 ? null : n;
|
|
869
|
+
return [function() {
|
|
870
|
+
return l(t());
|
|
871
|
+
}, u === null ? void 0 : function() {
|
|
872
|
+
return l(u());
|
|
873
|
+
}];
|
|
874
|
+
}, [t, n, r, o]);
|
|
875
|
+
var d = Ro(e, i[0], i[1]);
|
|
876
|
+
return Mo(function() {
|
|
877
|
+
s.hasValue = !0, s.value = d;
|
|
878
|
+
}, [d]), Oo(d), d;
|
|
879
|
+
}, br.exports = dn;
|
|
880
|
+
const Uo = ko(br.exports), { useSyncExternalStoreWithSelector: Ho } = Uo, un = (e) => {
|
|
881
|
+
const t = typeof e == "function" ? ((r) => r ? ln(r) : ln)(e) : e, n = (r, o) => function(i, s = i.getState, d) {
|
|
882
|
+
const l = Ho(i.subscribe, i.getState, i.getServerState || i.getState, s, d);
|
|
883
|
+
return It(l), l;
|
|
884
|
+
}(t, r, o);
|
|
885
|
+
return Object.assign(n, t), n;
|
|
886
|
+
}, kr = (e) => e ? un(e) : un, Ao = 1, Bo = 2, Nt = { eq: (e, t) => e == t, neq(e, t) {
|
|
887
|
+
return !this.eq(e, t);
|
|
888
|
+
}, 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) {
|
|
889
|
+
if (!Array.isArray(t))
|
|
890
|
+
return !1;
|
|
891
|
+
const n = Array.isArray(e) ? e : [e], r = new Set(n);
|
|
892
|
+
return t.some((o) => r.has(o));
|
|
893
|
+
}, list_dni(e, t) {
|
|
894
|
+
if (!Array.isArray(t))
|
|
895
|
+
return !1;
|
|
896
|
+
const n = Array.isArray(e) ? e : [e], r = new Set(n);
|
|
897
|
+
return t.every((o) => !r.has(o));
|
|
898
|
+
}, contains(e, t) {
|
|
899
|
+
const n = e.toLowerCase(), r = t.toLowerCase();
|
|
900
|
+
return n.includes(r);
|
|
901
|
+
}, notcontains(e, t) {
|
|
902
|
+
return !this.contains(e, t);
|
|
903
|
+
} }, qo = (e, t, n) => {
|
|
904
|
+
switch (t) {
|
|
905
|
+
case "videovoice":
|
|
906
|
+
return !!(e && e.value);
|
|
907
|
+
case "open":
|
|
908
|
+
return !!n;
|
|
909
|
+
case "multipleselect":
|
|
910
|
+
return !!(n && Object.keys(n).length);
|
|
911
|
+
case "recordedtask":
|
|
912
|
+
return (n == null ? void 0 : n.taskStatus) === "completed";
|
|
913
|
+
case "texturlprompt":
|
|
914
|
+
return !e.value;
|
|
915
|
+
case "consentlegal":
|
|
916
|
+
case "nps":
|
|
917
|
+
case "likert":
|
|
918
|
+
return n !== null;
|
|
919
|
+
case "multiplechoice":
|
|
920
|
+
return n !== void 0;
|
|
921
|
+
case "matrix":
|
|
922
|
+
return !!(n && Object.values(n).every((r) => r !== null));
|
|
923
|
+
default:
|
|
924
|
+
return !0;
|
|
925
|
+
}
|
|
926
|
+
}, wr = (e, t) => {
|
|
927
|
+
if (t === "matrix") {
|
|
928
|
+
const n = Object.keys(e).length, r = Object.values(e).filter((o) => o !== null).length;
|
|
929
|
+
return r > 0 && r < n;
|
|
930
|
+
}
|
|
931
|
+
return !1;
|
|
932
|
+
}, Cr = ({ cards: e, index: t, hasEndCard: n, allResponses: r, uploadProgress: o = {} }) => {
|
|
933
|
+
if (t >= e.length || t < 0)
|
|
934
|
+
return null;
|
|
935
|
+
const i = e[t];
|
|
936
|
+
let s = t + 1;
|
|
937
|
+
const d = i.props.routingOptions || [];
|
|
938
|
+
for (let h = 0; h < d.length; h++) {
|
|
939
|
+
const { group: c, target: u } = d[h];
|
|
940
|
+
if (!(c != null && c.length))
|
|
941
|
+
continue;
|
|
942
|
+
const m = c[0];
|
|
943
|
+
if (m.questionIndex === void 0 || m.questionIndex > r.length)
|
|
944
|
+
continue;
|
|
945
|
+
let f = pn({ comparator: m.comparator, response: r[m.questionIndex], type: i.type, value: m.value });
|
|
946
|
+
for (let b = 1; b < c.length; b += 2) {
|
|
947
|
+
const _ = c[b], y = c[b + 1], x = pn({ comparator: y.comparator, response: r[y.questionIndex], type: e[y.questionIndex].type, value: y.value });
|
|
948
|
+
_ === Ao ? f && (f = x) : _ === Bo && (f || (f = x));
|
|
949
|
+
}
|
|
950
|
+
if (f) {
|
|
951
|
+
s = u === -1 && n ? e.length - 1 : u;
|
|
952
|
+
break;
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
const l = e.findIndex((h) => h.type === "uploading");
|
|
956
|
+
let p;
|
|
957
|
+
return p = l > 0 ? n ? e.length - 3 : e.length - 2 : e.length - 1, t >= p || s === -1 || s !== null && s > p ? l > 0 && Object.values(o).some((c) => c.isSubmitted && !c.isComplete) ? l : n ? e.length - 1 : null : s === -1 ? null : s;
|
|
958
|
+
}, pn = ({ comparator: e, response: t, type: n, value: r }) => {
|
|
959
|
+
if (e === "answered")
|
|
960
|
+
switch (n) {
|
|
961
|
+
case "texturlprompt":
|
|
962
|
+
return t === void 0;
|
|
963
|
+
case "consentlegal":
|
|
964
|
+
return t && t.submitted === !0;
|
|
965
|
+
case "recordedtask":
|
|
966
|
+
return "taskStatus" in t && t.taskStatus === "completed";
|
|
967
|
+
case "likert":
|
|
968
|
+
case "nps":
|
|
969
|
+
return Number.isInteger(t);
|
|
970
|
+
case "matrix":
|
|
971
|
+
return Object.values(t).every((o) => o !== null);
|
|
972
|
+
case "multiplechoice":
|
|
973
|
+
return t !== void 0;
|
|
974
|
+
case "multipleselect":
|
|
975
|
+
return (t == null ? void 0 : t.length) > 0;
|
|
976
|
+
case "open":
|
|
977
|
+
return t && t.length > 0;
|
|
978
|
+
case "videovoice":
|
|
979
|
+
return !!(t != null && t.mediaRecordingUid);
|
|
980
|
+
default:
|
|
981
|
+
return !1;
|
|
982
|
+
}
|
|
983
|
+
if (e === "given_up")
|
|
984
|
+
return n !== "recordedtask" || "taskStatus" in t && t.taskStatus === "given.up";
|
|
985
|
+
if (e === "partial")
|
|
986
|
+
return n === "matrix" && wr(t, n);
|
|
987
|
+
if (e === "skipped")
|
|
988
|
+
switch (n) {
|
|
989
|
+
case "texturlprompt":
|
|
990
|
+
return t == null ? void 0 : t.skipped;
|
|
991
|
+
case "consentlegal":
|
|
992
|
+
case "likert":
|
|
993
|
+
case "nps":
|
|
994
|
+
case "videovoice":
|
|
995
|
+
return t === null;
|
|
996
|
+
case "recordedtask":
|
|
997
|
+
return "taskStatus" in t && t.taskStatus === "abandoned";
|
|
998
|
+
case "open":
|
|
999
|
+
case "multipleselect":
|
|
1000
|
+
return (t == null ? void 0 : t.length) === 0;
|
|
1001
|
+
case "multiplechoice":
|
|
1002
|
+
return t === void 0;
|
|
1003
|
+
case "matrix":
|
|
1004
|
+
return Object.values(t).every((o) => o === null);
|
|
1005
|
+
default:
|
|
1006
|
+
return !1;
|
|
1007
|
+
}
|
|
1008
|
+
return Nt[e](t, r);
|
|
1009
|
+
}, Vo = (e) => {
|
|
1010
|
+
var r, o, i;
|
|
1011
|
+
switch (e.type) {
|
|
1012
|
+
case "multipleselect":
|
|
1013
|
+
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, d) => s.concat(s.map((l) => [...l, d])), [[]]).filter((s) => n || s.length > 0)) : null;
|
|
1014
|
+
case "multiplechoice": {
|
|
1015
|
+
if (!e || !e.props || !e.props.options)
|
|
1016
|
+
return null;
|
|
1017
|
+
const s = e.props.options.map((d) => d.value);
|
|
1018
|
+
return e.props.properties.required || s.push(void 0), s;
|
|
1019
|
+
}
|
|
1020
|
+
case "matrix": {
|
|
1021
|
+
if (!((r = e == null ? void 0 : e.props) != null && r.options))
|
|
1022
|
+
return null;
|
|
1023
|
+
const s = e.props.properties.matrixColumn, d = e.props.options, l = d.reduce((h, c) => (h[c.id] = null, h), {}), p = [{ ...l, [d[0].id]: s[0].value }, d.reduce((h, c) => (h[c.id] = s[0].value, h), {})];
|
|
1024
|
+
return e.props.properties.required || p.push(l), p;
|
|
1025
|
+
}
|
|
1026
|
+
case "likert": {
|
|
1027
|
+
const s = Number((i = (o = e.props) == null ? void 0 : o.properties) == null ? void 0 : i.range) || 5;
|
|
1028
|
+
return [...Array.from(Array(s).keys()).map((l) => l + 1), ...e.props.properties.required ? [] : [null]];
|
|
1029
|
+
}
|
|
1030
|
+
case "nps":
|
|
1031
|
+
return [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...e.props.properties.required ? [] : [null]];
|
|
1032
|
+
case "videovoice":
|
|
1033
|
+
case "open":
|
|
1034
|
+
return ["1", ...e.props.properties.required ? [] : [""]];
|
|
1035
|
+
case "recordedtask": {
|
|
1036
|
+
const s = [{ taskStatus: "completed" }, { taskStatus: "given.up" }];
|
|
1037
|
+
return e.props.properties.required || s.push({ taskStatus: "abandoned" }), s;
|
|
1038
|
+
}
|
|
1039
|
+
case "texturlprompt":
|
|
1040
|
+
return [void 0, ...e.props.properties.required ? [] : [{ skipped: !0 }]];
|
|
1041
|
+
case "consentlegal":
|
|
1042
|
+
return [1, ...e.props.properties.required ? [] : [null]];
|
|
1043
|
+
default:
|
|
1044
|
+
return [1];
|
|
1045
|
+
}
|
|
1046
|
+
var t, n;
|
|
1047
|
+
}, zo = (e) => e in Nt, $o = (e) => typeof e == "object" && e !== null && "taskStatus" in e, Fo = (e, t = []) => t.reduce((n, r) => {
|
|
1048
|
+
const { group: o, target: i } = r;
|
|
1049
|
+
if (!(o != null && o.length))
|
|
1050
|
+
return [...n];
|
|
1051
|
+
const s = o.filter((d) => !!Number(d) || typeof d == "object" && d.questionIndex === e).map((d) => {
|
|
1052
|
+
const { comparator: l, value: p } = d;
|
|
1053
|
+
return { comparator: l, target: i, value: p };
|
|
1054
|
+
});
|
|
1055
|
+
return [...n, ...s];
|
|
1056
|
+
}, []), st = /* @__PURE__ */ new Set(["thanks", "uploading"]), B = kr()((e, t) => ({ allResponses: [], answers: void 0, apiURL: "", border: "#000000", cards: [], close: async (n = Se) => {
|
|
1057
|
+
const r = t(), { fadeout: o, remove: i, trackHistory: s, studyType: d } = r;
|
|
1058
|
+
await o(n), at(r) || s({ event: "closed" }), Xr.info("SurveyClosing", { surveyId: r.surveyId }), Ht.enable(), i({ initiator: Bt.Closed, studyType: d });
|
|
1059
|
+
}, configureExitOnOverlayClick: () => {
|
|
1060
|
+
}, customMetadata: {}, destroy: async (n) => {
|
|
1061
|
+
const { eventEmitFn: r, fadeout: o, remove: i, studyType: s, surveyId: d } = t();
|
|
1062
|
+
r("survey.complete", d), await o(n), Ht.enable(), i({ initiator: Bt.Complete, studyType: s });
|
|
1063
|
+
}, endCard: { headline: "" }, envId: "", eventEmitFn: Be.emit.bind(Be), fadeout: async (n) => {
|
|
1064
|
+
const { eventEmitFn: r, headers: o, viewDocument: i } = t();
|
|
1065
|
+
return We(o) ? Promise.resolve() : (r(ve.SurveyFadingOut), new Promise((s) => {
|
|
1066
|
+
const d = i.getElementById(n);
|
|
1067
|
+
d ? (d.addEventListener("transitionend", () => {
|
|
1068
|
+
s();
|
|
1069
|
+
}), d.classList.remove("ul-app--visible")) : s();
|
|
1070
|
+
}));
|
|
1071
|
+
}, forceBrandedLogo: !1, frame: document.createElement("iframe"), handleClickEmbedButton: (n) => {
|
|
1072
|
+
const { cards: r, eventEmitFn: o, index: i } = t();
|
|
1073
|
+
o(n, { qid: r[i].name, props: r[i].props }), e(() => ({ hasViewedEmbed: !0 }));
|
|
1074
|
+
}, handleUploadUpdate: ({ mediaRecordingUid: n, isComplete: r, progressPct: o, isSubmitted: i }) => {
|
|
1075
|
+
var m, f, b;
|
|
1076
|
+
const { cards: s, destroy: d, index: l, uploadProgress: p } = t(), h = r || ((m = p[n]) == null ? void 0 : m.isComplete), c = { ...p, [n]: { progressPct: h ? 100 : o || ((f = p[n]) == null ? void 0 : f.progressPct), isComplete: h, isSubmitted: i || ((b = p[n]) == null ? void 0 : b.isSubmitted) } };
|
|
1077
|
+
if (e({ uploadProgress: c }), s[l].type !== "uploading")
|
|
1078
|
+
return;
|
|
1079
|
+
const u = Object.entries(p).every(([_, y]) => !y.isSubmitted || y.isComplete || n == _ && r);
|
|
1080
|
+
if (u && l >= s.length - 1)
|
|
1081
|
+
return d(Se);
|
|
1082
|
+
e({ index: u ? l + 1 : l, uploadingCardViewed: !0 });
|
|
1083
|
+
}, 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) => {
|
|
1084
|
+
const { allResponses: r, cards: o, eventEmitFn: i, index: s, responseGroupUid: d, submit: l, trackHistory: p, uploadProgress: h, viewedCardCount: c } = t();
|
|
1085
|
+
e({ minScrollableHeight: void 0 });
|
|
1086
|
+
const u = Date.now(), m = [...o], f = m[s], { type: b } = n.data, _ = { ...n.data }, y = _.value;
|
|
1087
|
+
((P) => !st.has(P.type))(f) && (f.value = y), _.answeredAt = u, delete _.type;
|
|
1088
|
+
const x = { response: _, responseGroupUid: d, questionIndex: s };
|
|
1089
|
+
let T = b === "multiplechoice" ? Object.values(y).find((P) => P !== !1) : y;
|
|
1090
|
+
b === "multipleselect" && (T = m[s].props.options.reduce((P, g) => (y[g.id] && P.push(g.value), P), []));
|
|
1091
|
+
const S = r.slice(0);
|
|
1092
|
+
S[s] = T, e({ allResponses: S });
|
|
1093
|
+
const w = Cr({ cards: m, index: s, hasEndCard: !!n.endCard, uploadProgress: h, allResponses: S });
|
|
1094
|
+
if (w === null)
|
|
1095
|
+
return x.completedAt = u, l(x), void n.completeSurvey();
|
|
1096
|
+
st.has(m[w].type) && (x.completedAt = u);
|
|
1097
|
+
const k = l(x);
|
|
1098
|
+
st.has(m[w].type) || k.finally(() => {
|
|
1099
|
+
p({ event: "seen", index: w });
|
|
1100
|
+
});
|
|
1101
|
+
const j = m[w];
|
|
1102
|
+
m[w] && i && i("survey.question", { qid: j.name, props: j.props }), e({ cards: m, hasViewedEmbed: !1, index: w, viewedCardCount: c + 1 });
|
|
1103
|
+
}, pendingRemoveIframeReason: null, previewKey: null, previewMode: void 0, recorder: () => {
|
|
1104
|
+
}, recorderEventEmitter: Be, resolveTrackedPromise: () => {
|
|
1105
|
+
const { removeIframeIfReady: n } = t();
|
|
1106
|
+
e((r) => ({ unresolvedRequestCount: r.unresolvedRequestCount - 1 })), n();
|
|
1107
|
+
}, responseGroupUid: "", remove: ({ initiator: n, studyType: r }) => {
|
|
1108
|
+
const { removeIframeIfReady: o } = t();
|
|
1109
|
+
e({ pendingRemoveIframeReason: n, studyType: r }), o();
|
|
1110
|
+
}, removeIframeIfReady: () => {
|
|
1111
|
+
const { eventEmitFn: n, pendingRemoveIframeReason: r, unresolvedRequestCount: o, studyType: i, surveyId: s } = t();
|
|
1112
|
+
r && o === 0 && (n(ve.SurveyWillClose, { name: ve.SurveyWillClose, initiator: r, studyType: i, "survey.id": s }), e({ pendingRemoveIframeReason: null, studyType: i }));
|
|
1113
|
+
}, seen: async () => {
|
|
1114
|
+
const { trackHistory: n } = t();
|
|
1115
|
+
return n({ event: "seen", isNew: !0 });
|
|
1116
|
+
}, slugName: null, showStripes: !1, showSurveyBrand: !1, styleNonce: "", submit: async ({ completedAt: n, questionIndex: r, response: o, responseGroupUid: i }) => {
|
|
1117
|
+
const s = t();
|
|
1118
|
+
if (!i || at(s))
|
|
1119
|
+
return;
|
|
1120
|
+
const d = { responseGroupUid: i, meta: s.meta, customMetadata: s.customMetadata, responses: [o], completedAt: n, previewKey: s.previewKey }, l = await s.trackPromise(ht(`${s.apiURL}/sdk/1/environments/${s.envId}/visitors/${s.userId}/responses/submit`, { body: JSON.stringify(d), headers: s.headers, method: "POST" }));
|
|
1121
|
+
l.ok ? s.eventEmitFn(ve.QuestionAnswered, { ...o, questionIndex: r }) : l.reportError && (console.warn("[Sprig] (ERR-427) Failed to submit response", l.error), await s.trackPromise(hn(s, "submitResponse", l.error)));
|
|
1122
|
+
}, surveyId: 0, tabTitle: "", trackHistory: async ({ event: n, index: r, isNew: o = !1 }) => {
|
|
1123
|
+
const i = t();
|
|
1124
|
+
if (at(i))
|
|
1125
|
+
return;
|
|
1126
|
+
const { cards: s, index: d } = i, l = r !== void 0 ? s[r] : s[d], p = { sid: i.surveyId, qid: l.name, action: n, vid: i.userId, eid: i.envId, isNew: o, responseGroupUid: i.responseGroupUid, previewKey: i.previewKey }, h = await i.trackPromise(ht(`${i.apiURL}/sdk/1/visitors/${i.userId}/surveys/${i.surveyId}/history`, { body: JSON.stringify(p), headers: i.headers, method: "POST" }));
|
|
1127
|
+
!h.ok && h.reportError && (console.warn("[Sprig] (ERR-428) Failed to track survey event", h.error), await i.trackPromise(hn(i, "trackHistory", h.error)));
|
|
1128
|
+
}, trackPromise: async (n) => {
|
|
1129
|
+
const { resolveTrackedPromise: r } = t();
|
|
1130
|
+
return e((o) => ({ unresolvedRequestCount: o.unresolvedRequestCount + 1 })), n.then((o) => (r(), o)).catch((o) => {
|
|
1131
|
+
throw r(), o;
|
|
1132
|
+
});
|
|
1133
|
+
}, unresolvedRequestCount: 0, update: () => {
|
|
1134
|
+
const { cards: n, index: r, headers: o, eventEmitFn: i, frame: s, useMobileStyling: d, surveyId: l, viewDocument: p } = t(), h = n[r], c = h.type === "matrix" && !(h.props.properties.displayMatrixAsAccordion || d);
|
|
1135
|
+
e({ minScrollableHeight: void 0 }), setTimeout(() => {
|
|
1136
|
+
var b, _;
|
|
1137
|
+
const [u, m, f] = Gr(p);
|
|
1138
|
+
We(o) ? i(ve.SurveyHeight, { name: ve.SurveyHeight, contentFrameHeight: u, "survey.id": l }) : ((b = s.setHeight) == null || b.call(s, u), e({ minScrollableHeight: f }), d || ((_ = s.setWidth) == null || _.call(s, c ? m : parseInt(Kr))));
|
|
1139
|
+
}, 100);
|
|
1140
|
+
}, uploadingCardViewed: !1, uploadProgress: {}, useDesktopPrototype: void 0, useMobileStyling: !1, userId: "", viewDocument: window.document, viewedCardCount: 0 })), at = (e) => !e.userId || e.meta && e.meta.mode === "test" || e.isPreview || e.previewMode, hn = async (e, t, n) => {
|
|
1141
|
+
const { mode: r, userId: o, envId: i, apiURL: s, headers: d, viewDocument: l } = e, p = l.documentElement, h = { mode: r, screenWidth: window.screen.width, screenHeight: window.screen.height, clientWidth: p.clientWidth, clientHeight: p.clientHeight, location: window.location.href, language: window.navigator.language }, c = { action: t, err: { message: `${n == null ? void 0 : n.name} - ${n == null ? void 0 : n.message}`, stack: n == null ? void 0 : n.stack }, meta: h, vid: o, envId: i };
|
|
1142
|
+
(await ht(`${s}/sdk/1/errors`, { method: "POST", headers: Object.assign({ "x-ul-error": window.btoa(`userleap-${Date.now()}-error`) }, d), body: JSON.stringify(c) })).ok || console.warn("[Sprig] (ERR-444) Failed to report error to API", n);
|
|
1143
|
+
}, Er = (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 })), Sr = (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 }));
|
|
1144
|
+
var Wo = 0;
|
|
1145
|
+
function a(e, t, n, r, o, i) {
|
|
1146
|
+
var s, d, l = {};
|
|
1147
|
+
for (d in t)
|
|
1148
|
+
d == "ref" ? s = t[d] : l[d] = t[d];
|
|
1149
|
+
var p = { type: e, props: l, key: n, ref: s, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: --Wo, __i: -1, __u: 0, __source: o, __self: i };
|
|
1150
|
+
if (typeof e == "function" && (s = e.defaultProps))
|
|
1151
|
+
for (d in s)
|
|
1152
|
+
l[d] === void 0 && (l[d] = s[d]);
|
|
1153
|
+
return D.vnode && D.vnode(p), p;
|
|
1154
|
+
}
|
|
1155
|
+
const Zo = ({ visible: e }) => a("div", { className: "sprig-check-background", style: { opacity: e ? 1 : 0 }, children: a(Sr, { className: "sprig-check" }) }), mn = "250ms", Go = Pt(({ animate: e, children: t, header: n, isOpen: r, onClick: o, showHeaderCheck: i }, s) => {
|
|
1156
|
+
const d = ee(null), [l, p] = $(0), [h, c] = $("none"), [u, m] = $(!0);
|
|
1157
|
+
return G(() => {
|
|
1158
|
+
var b;
|
|
1159
|
+
const f = (b = d.current) == null ? void 0 : b.getBoundingClientRect();
|
|
1160
|
+
p(r && f ? f.height : 0);
|
|
1161
|
+
}, [r]), G(() => {
|
|
1162
|
+
!l && r || !u || m(!1), c(e && !u ? `height ${mn} ease` : "none");
|
|
1163
|
+
}, [e, u, l, 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(Zo, { visible: i })] }), a(Er, { className: "sprig-caret", style: { transitionDuration: e ? mn : "0", transform: r ? "rotate(-180deg)" : "none" } })] }), a("div", { className: "sprig-accordion-body", style: { transition: h, height: l }, children: a("div", { ref: d, children: t }) })] });
|
|
1164
|
+
}), L = (...e) => e.filter(Boolean).join(" "), Z = (e, t, n) => {
|
|
1165
|
+
const r = t ? "--mobile" : "--desktop";
|
|
1166
|
+
return `${e + r} ${e + (n ? `${r}_${n}` : "")} ${e}`;
|
|
1167
|
+
}, Ko = (e, t) => `${e} ${e}__${t}`, X = (e) => a("button", { ...e, className: L("ul-card-text__button", e.className), id: "ul-card-text__button" }), jr = () => {
|
|
1168
|
+
const { viewDocument: e } = B((r) => ({ viewDocument: r.viewDocument })), [t, n] = $(!1);
|
|
1169
|
+
return G(() => {
|
|
1170
|
+
const r = e.querySelector(".sprig-question-body"), o = new ResizeObserver(() => {
|
|
1171
|
+
window.requestAnimationFrame(() => {
|
|
1172
|
+
n(!!(r && Yr(r) && r.scrollHeight > r.offsetHeight));
|
|
1173
|
+
});
|
|
1174
|
+
});
|
|
1175
|
+
return r && o.observe(r), () => {
|
|
1176
|
+
r && o.unobserve(r);
|
|
1177
|
+
};
|
|
1178
|
+
}, [e]), t;
|
|
1179
|
+
}, gn = ({ 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, Yo = () => {
|
|
1180
|
+
const { cards: e, close: t, endCard: n, headers: r, index: o } = B((d) => ({ cards: d.cards, close: d.close, endCard: d.endCard, headers: d.headers, index: d.index, useMobileStyling: d.useMobileStyling })), i = e.length, s = Ue(() => () => t(Se), [t]);
|
|
1181
|
+
return ["email", "link"].includes(r["userleap-platform"]) || n && o + 1 === i ? null : a("div", { "aria-label": "Close button", className: "close-btn", onClick: s, onKeyPress: (d) => {
|
|
1182
|
+
d.key === "Enter" && s();
|
|
1183
|
+
}, 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" }) }) });
|
|
1184
|
+
}, ie = ({ message: e, properties: t }) => {
|
|
1185
|
+
const n = ee(null), r = t == null ? void 0 : t.captionText, o = jr();
|
|
1186
|
+
return a("div", { className: L("question-header-container", "sprig-header-container", o ? "sprig-border-bottom" : null), ref: n, children: [a("div", { className: "question-header-button-container", children: [a(gn, { className: "ul-question", id: "ul-question", isHeader: !0, plainText: e, richText: t == null ? void 0 : t.questionHtml }), a(Yo, {})] }), a(gn, { className: "ul-caption", id: "ul-caption", plainText: r, richText: t == null ? void 0 : t.captionHtml })] });
|
|
1187
|
+
}, fn = ({ buttonText: e = "View Prototype", handleClick: t }) => a("button", { className: "prototype-button", onClick: t, children: e }, "prototype-btn"), me = ({ defaultBody: e, embeddedType: t = "prototype", properties: n }) => {
|
|
1188
|
+
var c;
|
|
1189
|
+
const { handleClickEmbedButton: r, hasViewedEmbed: o, headers: i, useDesktopPrototype: s } = B((u) => ({ handleClickEmbedButton: u.handleClickEmbedButton, hasViewedEmbed: u.hasViewedEmbed, headers: u.headers, useDesktopPrototype: u.useDesktopPrototype })), d = (n == null ? void 0 : n.conceptUrl) || ((c = n == null ? void 0 : n.consentDocument) == null ? void 0 : c.url), l = window.innerWidth < Qr, p = i["userleap-platform"], h = (u, m) => {
|
|
1190
|
+
u.preventDefault(), r(m);
|
|
1191
|
+
};
|
|
1192
|
+
if (!s && l && !o && d && ["email", "link"].includes(p)) {
|
|
1193
|
+
if (t === "prototype")
|
|
1194
|
+
return a(fn, { handleClick: (u) => {
|
|
1195
|
+
h(u, "question.prototype.click");
|
|
1196
|
+
} });
|
|
1197
|
+
if (t === "pdf")
|
|
1198
|
+
return a(fn, { buttonText: (n == null ? void 0 : n.viewDocumentText) || "View Document", handleClick: (u) => {
|
|
1199
|
+
h(u, "question.agreement.click");
|
|
1200
|
+
} });
|
|
1201
|
+
}
|
|
1202
|
+
return e();
|
|
1203
|
+
}, Ir = ({ 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(Sr, {}) }), Tr = (e, t) => {
|
|
1204
|
+
const n = ee(0), r = () => {
|
|
1205
|
+
if (e.current) {
|
|
1206
|
+
const o = e.current;
|
|
1207
|
+
o.style.height = "1px";
|
|
1208
|
+
const i = o.scrollHeight + (o.offsetHeight - o.clientHeight), s = parseInt(window.getComputedStyle(o).getPropertyValue("max-height")), d = i <= s ? i : s;
|
|
1209
|
+
n.current !== d && t(), n.current = d, o.style.height = `${d}px`;
|
|
1210
|
+
}
|
|
1211
|
+
};
|
|
1212
|
+
return G(r, []), r;
|
|
1213
|
+
}, et = ({ ariaLabel: e, border: t, choiceStyle: n = {}, label: r, isSelected: o, value: i, text: s, id: d, isRadio: l, useMobileStyling: p, error: h, allowTextEntry: c, noneOfTheAbove: u, promptText: m, onUserInputChanged: f }) => {
|
|
1214
|
+
const { styleNonce: b, viewDocument: _ } = B((I) => ({ styleNonce: I.styleNonce, viewDocument: I.viewDocument })), [y, x] = $(!1);
|
|
1215
|
+
Jo(_, t, b);
|
|
1216
|
+
const T = ({ isSelected: I, userText: O }) => {
|
|
1217
|
+
f && f({ id: d, selected: I, value: i, userText: O, noneOfTheAbove: u });
|
|
1218
|
+
}, S = (I) => {
|
|
1219
|
+
I.stopPropagation(), T({ isSelected: l || !o, userText: s }), x(!1);
|
|
1220
|
+
}, w = () => {
|
|
1221
|
+
y || x(!0);
|
|
1222
|
+
}, k = () => {
|
|
1223
|
+
y && x(!1);
|
|
1224
|
+
}, j = { onClick: (I) => S(I), onKeyPress: (I) => ((O) => {
|
|
1225
|
+
O.key !== "Enter" && O.key !== " " || S(O);
|
|
1226
|
+
})(I) };
|
|
1227
|
+
"ontouchstart" in _.documentElement ? (j.onTouchStart = k, j.onTouchCancel = k, j.onTouchEnd = k) : (j.onMouseDown = w, j.onMouseLeave = k);
|
|
1228
|
+
const P = l ? `radio-${d}` : `checkbox-${d}`, g = o || y ? [ze] : [], v = [...h ? [Pr] : [], ...g], E = r ? { "aria-labelledby": `label-${d}` } : { "aria-label": e };
|
|
1229
|
+
return a("div", { className: L(Z("choice", p), ...v), id: `choice-div-${d}`, style: { ...n, ...h ? { borderColor: De } : {} }, ...j, children: [a("div", { className: L("choice-label-container"), children: [l ? a("div", { ...E, className: L("select-radio", ...g), id: P, role: "radio", tabIndex: 0 }) : a(Ir, { divId: P, id: d, isSelected: o, themeColor: t }), r && a("label", { className: L(Z("select-label", p)), htmlFor: P, id: `label-${d}`, children: r })] }), c && o && a("div", { className: L("choice-text-entry-container", ...g), children: a(Qo, { onTextChange: (I) => T({ isSelected: o, userText: I }), promptText: m || "Please specify", textValue: s, useMobileStyling: p }) })] });
|
|
1230
|
+
}, Qo = ({ promptText: e, textValue: t, onTextChange: n, useMobileStyling: r }) => {
|
|
1231
|
+
const o = ee(null), { update: i } = B((d) => ({ update: d.update })), s = Tr(o, () => i());
|
|
1232
|
+
return G(() => {
|
|
1233
|
+
o.current && o.current.focus();
|
|
1234
|
+
}, []), a("textarea", { "aria-label": e, "aria-multiline": "true", "aria-placeholder": e, className: L(Z("choice-text-input", r)), "data-gramm": "false", maxLength: 5e3, name: "text", onChange: (d) => {
|
|
1235
|
+
s(), d.stopPropagation(), n(d.currentTarget.value);
|
|
1236
|
+
}, onClick: (d) => {
|
|
1237
|
+
d.stopPropagation();
|
|
1238
|
+
}, onKeyPress: (d) => {
|
|
1239
|
+
d.stopPropagation();
|
|
1240
|
+
}, placeholder: e, ref: o, role: "textbox", rows: 1, value: t });
|
|
1241
|
+
}, vn = "ul-select-style-element", ze = "ul-select-active-dynamic-style", Pr = "ul-select-error-dynamic-style", Jo = (e, t, n) => {
|
|
1242
|
+
let r = e.getElementById(vn), o = !1;
|
|
1243
|
+
r || (r = e.createElement("style"), o = !0), r.tagName.toLowerCase() === "style" && (r.id = vn, n && (r.nonce = n), r.textContent = Xo(t), o && e.head.appendChild(r));
|
|
1244
|
+
}, Xo = (e) => `
|
|
1245
|
+
.${ze} {
|
|
1246
|
+
border-color: ${e};
|
|
1247
|
+
}
|
|
1248
|
+
.${ze} .select-radio, .${ze}.select-radio {
|
|
1249
|
+
border: 6px solid ${e};
|
|
1250
|
+
box-shadow: none;
|
|
1251
|
+
}
|
|
1252
|
+
.${Pr} {
|
|
1253
|
+
border-color: ${De};
|
|
1254
|
+
}
|
|
1255
|
+
`, ge = ({ children: e }) => a("div", { className: "sprig-question-body", children: e }), _e = ({ children: e }) => {
|
|
1256
|
+
const t = jr();
|
|
1257
|
+
return a("div", { className: L("sprig-question-footer-container", t ? "sprig-border-top" : null), children: e });
|
|
1258
|
+
}, Ce = (e) => (e == null ? void 0 : e.buttonText) || "Next", Mt = (e) => (e == null ? void 0 : e.skipButtonText) || "Skip", ei = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i }) => {
|
|
1259
|
+
const { useMobileStyling: s, border: d } = B((g) => ({ useMobileStyling: g.useMobileStyling, border: g.border })), [l, p] = $(!1), [h, c] = $(""), [u, m] = $(!1), f = r == null ? void 0 : r.collectName, b = (r == null ? void 0 : r.nameLabelText) || "Full Name", _ = (r == null ? void 0 : r.consentText) || "I agree to the stated conditions", y = (r == null ? void 0 : r.submitButtonText) || "Submit", x = !!h.trim(), T = l && (!f || x), S = (g, v = !1) => {
|
|
1260
|
+
g.preventDefault(), g.stopPropagation();
|
|
1261
|
+
let E = null;
|
|
1262
|
+
if (!v) {
|
|
1263
|
+
if (!T)
|
|
1264
|
+
return void m(!0);
|
|
1265
|
+
E = { submitted: !0 }, f && (E.name = h);
|
|
1266
|
+
}
|
|
1267
|
+
n({ value: E, questionId: o, type: i });
|
|
1268
|
+
}, w = (g) => {
|
|
1269
|
+
g.preventDefault(), g.stopPropagation(), c(g.currentTarget.value);
|
|
1270
|
+
}, k = (g) => {
|
|
1271
|
+
g.currentTarget.style.borderColor = u && !x ? De : d;
|
|
1272
|
+
}, j = (g) => {
|
|
1273
|
+
g.currentTarget.style.borderColor = u && !x ? De : Ct;
|
|
1274
|
+
}, P = () => a(_e, { children: [a("div", { className: "sprig-stretch", children: [a(et, { allowTextEntry: !1, border: d, error: u && !l, id: "consent", isRadio: !1, isSelected: l, label: _, onUserInputChanged: ({ selected: g }) => {
|
|
1275
|
+
g !== l && p(!l);
|
|
1276
|
+
}, useMobileStyling: s }), f && a("input", { "aria-label": b, "aria-placeholder": b, className: L(Z("ul-consent-legal__name-input", s)), "data-gramm": "false", maxLength: 250, name: "name", onBlur: j, onFocus: k, onInput: w, placeholder: b, style: u && !x ? { borderColor: De } : {}, tabIndex: 0, value: h })] }), a("div", { className: "ul-card__button-wrapper ul-card-vertical__button-wrapper", children: [a(X, { className: T ? "" : "sprig-button-disabled", onClick: S, children: y }), r.required === !1 && a("button", { className: "ul-card-skip__button", onClick: (g) => S(g, !0), children: Mt(r) })] })] });
|
|
1277
|
+
return a("div", { className: L(e, "ul-card__consent-legal", "fade-in-transition"), children: [a(ie, { message: t, properties: { questionHtml: r.questionHtml } }), a(K, { children: [a(ge, { 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" }) }), a(me, { properties: r, defaultBody: P, embeddedType: "pdf" })] })] }, o);
|
|
1278
|
+
}, ti = ({ activeValue: e, border: t, icon: n, isPressed: r, onSubmit: o, range: i, scaleLabelType: s, setActiveValue: d, setIsPressed: l, useMobileStyling: p, value: h, viewDocument: c }) => {
|
|
1279
|
+
const u = `option-${h}`, m = s === "number", f = s === "star", b = m && h === e, [_, y] = h <= e && f || h === e ? r ? [t, 1] : [t, 0.3] : ["", 1];
|
|
1280
|
+
return a("button", { "aria-label": m ? void 0 : String(h), className: (() => {
|
|
1281
|
+
switch (s) {
|
|
1282
|
+
case "star":
|
|
1283
|
+
return L(Z("likert-star", p), Z(`likert-star-${h}`, p));
|
|
1284
|
+
case "smiley":
|
|
1285
|
+
return L(Z("likert-smiley", p), Z(`likert-smiley-${h}`, p));
|
|
1286
|
+
default:
|
|
1287
|
+
return h === i ? L(Z("likert-number", p), Z(`likert-number-${h}`, p), Z("likert-last-option", p)) : L(Z("likert-number", p), Z(`likert-number-${h}`, p));
|
|
1288
|
+
}
|
|
1289
|
+
})(), dangerouslySetInnerHTML: { __html: n }, id: u, onClick: () => o(), onKeyDown: (x) => {
|
|
1290
|
+
var w, k;
|
|
1291
|
+
const T = c.querySelectorAll(`.likert-${s ?? "number"}`), S = h - 1;
|
|
1292
|
+
x.key === "ArrowRight" ? (w = T[S + 1]) == null || w.focus() : x.key === "ArrowLeft" ? (k = T[S - 1]) == null || k.focus() : x.key !== "Enter" && x.key !== " " || o();
|
|
1293
|
+
}, onPointerDown: () => l(!0), onPointerEnter: () => d(h), onPointerLeave: () => {
|
|
1294
|
+
d(-1), l(!1);
|
|
1295
|
+
}, style: { color: m ? "" : _, borderColor: b ? _ : "", fillOpacity: b ? "" : y, zIndex: b ? 3 : "auto" }, tabIndex: 0 });
|
|
1296
|
+
}, ni = ({ className: e, labels: t, message: n, next: r, properties: o, questionId: i, type: s }) => {
|
|
1297
|
+
const { border: d, useMobileStyling: l, viewDocument: p } = B((P) => ({ border: P.border, useMobileStyling: P.useMobileStyling, viewDocument: P.viewDocument })), [h, c] = $(-1), [u, m] = $(!1), f = t && t.left, b = t && t.right;
|
|
1298
|
+
let _;
|
|
1299
|
+
const { range: y, scaleLabelType: x, ratingIcons: T } = o;
|
|
1300
|
+
y && (_ = Number(y));
|
|
1301
|
+
const S = _ || 5, w = (P) => {
|
|
1302
|
+
var g, v;
|
|
1303
|
+
switch (x) {
|
|
1304
|
+
case "star":
|
|
1305
|
+
return (g = T[0]) == null ? void 0 : g.svg;
|
|
1306
|
+
case "smiley":
|
|
1307
|
+
return (v = T[P]) == null ? void 0 : v.svg;
|
|
1308
|
+
default:
|
|
1309
|
+
return String(P + 1);
|
|
1310
|
+
}
|
|
1311
|
+
}, k = [...Array(S)].map((P, g) => {
|
|
1312
|
+
const v = g + 1;
|
|
1313
|
+
return a(ti, { activeValue: h, border: d, icon: w(g), isPressed: u, onSubmit: () => r({ value: v, questionId: i, type: s }), range: S, scaleLabelType: x, setActiveValue: c, setIsPressed: m, useMobileStyling: l, value: v, viewDocument: p }, g);
|
|
1314
|
+
}), j = (P) => {
|
|
1315
|
+
P.preventDefault(), P.stopPropagation(), r({ value: null, questionId: i, type: s });
|
|
1316
|
+
};
|
|
1317
|
+
return a("form", { className: L(e, "ul-card--likert", "fade-in-transition"), children: [a(ie, { message: n, properties: o }), a(me, { properties: o, defaultBody: () => a(K, { children: [a(ge, { children: [a("div", { "aria-label": `Rating (1 - ${S})`, className: "ul-card--likert__numbers", role: "radiogroup", children: k }), a("div", { className: "ul-card--likert__labels", children: [a("span", { children: f }), a("span", { children: b })] })] }), !o.required && a(_e, { children: a("div", { className: "ul-vertical-centered-container", children: a(X, { onClick: j, children: Ce(o) }) }) })] }) })] }, i);
|
|
1318
|
+
}, Dr = (e) => e && (e.scrollHeight > e.offsetHeight ? e : Dr(e.parentElement)), ri = (e) => {
|
|
1319
|
+
if (!e || !((n) => n instanceof HTMLElement)(e))
|
|
1320
|
+
return 0;
|
|
1321
|
+
const t = getComputedStyle(e);
|
|
1322
|
+
return parseFloat(t.marginTop) + parseFloat(t.marginBottom) + (parseFloat(t.borderTopWidth) + parseFloat(t.borderBottomWidth));
|
|
1323
|
+
}, oi = ({ columns: e, onSelect: t, options: n, selectedOptions: r }) => {
|
|
1324
|
+
const o = ee([]), { border: i, useMobileStyling: s } = B((u) => ({ border: u.border, useMobileStyling: u.useMobileStyling })), d = n.findIndex((u) => r[u.id] === null), [l, p] = $(d), h = Ke((u, m) => {
|
|
1325
|
+
t(u, m);
|
|
1326
|
+
const f = l + 1, b = n[f];
|
|
1327
|
+
if (b && r[b.id] === null) {
|
|
1328
|
+
p(f);
|
|
1329
|
+
const _ = o.current[l];
|
|
1330
|
+
if (_ != null && _.firstElementChild) {
|
|
1331
|
+
const y = Dr(_), x = _.firstElementChild, T = ri(_) + x.clientHeight;
|
|
1332
|
+
y == null || y.scrollTo(0, _.offsetTop + T);
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1335
|
+
}, [t, n, r, l]), c = Ke((u, m) => {
|
|
1336
|
+
const f = l === u;
|
|
1337
|
+
return a(Go, { animate: !0, header: m.label, isOpen: f, onClick: () => p(f && !window.UserLeap.isMobileSDK ? -1 : u), ref: (b) => {
|
|
1338
|
+
b && (o.current[u] = b);
|
|
1339
|
+
}, showHeaderCheck: r[m.id] !== null, children: a("div", { style: { paddingTop: "12px" }, children: e.map((b) => a(et, { allowTextEntry: !1, ariaLabel: `${m.label}-${b.label}`, border: i, error: !1, id: `${m.id}-${b.value}`, isRadio: !0, isSelected: r[m.id] === b.value, label: b.label, onUserInputChanged: () => h(m.id, b.value), useMobileStyling: s }, b.label)) }) }, m.id);
|
|
1340
|
+
}, [i, e, l, h, r, s]);
|
|
1341
|
+
return a("div", { children: n.map((u, m) => c(m, u)) });
|
|
1342
|
+
}, ii = ({ columns: e, onSelect: t, options: n, selectedOptions: r }) => {
|
|
1343
|
+
const { border: o, useMobileStyling: i } = B((c) => ({ border: c.border, useMobileStyling: c.useMobileStyling })), s = n.length, d = e.length, l = ee(null), [p, h] = $(!1);
|
|
1344
|
+
return G(() => {
|
|
1345
|
+
const c = l.current, u = new ResizeObserver((m) => {
|
|
1346
|
+
window.requestAnimationFrame(() => {
|
|
1347
|
+
c && h(Math.round(m[0].contentRect.width) < c.scrollWidth);
|
|
1348
|
+
});
|
|
1349
|
+
});
|
|
1350
|
+
return c && u.observe(c), () => {
|
|
1351
|
+
c && u.unobserve(c);
|
|
1352
|
+
};
|
|
1353
|
+
}, []), a("div", { className: "ul-card--matrix_question_container", children: [a("div", { className: L("ul-card--matrix_container", p && "ul-matrix-scroll-gradient"), onScroll: () => {
|
|
1354
|
+
(() => {
|
|
1355
|
+
const c = l.current;
|
|
1356
|
+
c && h(c.clientWidth + Math.abs(c.scrollLeft) < c.scrollWidth);
|
|
1357
|
+
})();
|
|
1358
|
+
}, ref: l, children: a("div", { className: "ul-card--matrix_grid", style: `--numColumns: ${d}; --numRows: ${s + 1}`, children: [a("div", {}), " ", e.map((c) => a("div", { className: "ul-matrix-column-label", children: c.label }, c.label)), n.map((c) => a(K, { children: [a("div", { "aria-label": c.label, className: "ul-matrix-row-label", children: c.label }, c.label), a("div", { className: "ul-matrix-row-options", role: "radiogroup", children: e.map((u, m) => a("div", { className: L("ul-matrix-option-wrapper", m === d - 1 && "ul-matrix-last-option"), children: a(et, { allowTextEntry: !1, ariaLabel: `${c.label}-${u.label}`, border: o, choiceStyle: { background: "transparent", border: "none", marginBottom: "0", padding: "0" }, error: !1, id: `${c.id}-${u.value}`, isRadio: !0, isSelected: r[c.id] === u.value, onUserInputChanged: () => t(c.id, u.value), useMobileStyling: i }) }, u.value)) })] }))] }) }), p && a("button", { className: "ul-matrix-scroll-arrow", onClick: (c) => {
|
|
1359
|
+
c.preventDefault();
|
|
1360
|
+
const u = l.current;
|
|
1361
|
+
if (u) {
|
|
1362
|
+
const m = getComputedStyle(u).direction === "rtl";
|
|
1363
|
+
u.scrollLeft = m ? u.clientWidth - u.scrollWidth : u.scrollWidth;
|
|
1364
|
+
}
|
|
1365
|
+
}, 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" }) }) })] });
|
|
1366
|
+
}, si = ({ className: e, message: t, next: n, options: r, properties: o, questionId: i, type: s }) => {
|
|
1367
|
+
const { useMobileStyling: d } = B((_) => ({ useMobileStyling: _.useMobileStyling })), l = o.matrixColumn, p = o.required, h = r.reduce((_, y) => (_[y.id] = null, _), {}), [c, u] = $(h), m = (_, y) => {
|
|
1368
|
+
u((x) => ({ ...x, [_]: y }));
|
|
1369
|
+
}, f = p && Object.values(c).every((_) => _ == null), b = o.displayMatrixAsAccordion || d;
|
|
1370
|
+
return a("form", { className: L(e, "fade-in-transition", "ul-card__matrix"), id: "text-form", onSubmit: (_) => {
|
|
1371
|
+
_.preventDefault(), _.stopPropagation(), n({ value: c, questionId: i, type: s });
|
|
1372
|
+
}, children: [a(ie, { message: t, properties: o }), a(me, { properties: o, defaultBody: () => a(K, { children: [a(ge, { children: a(b ? oi : ii, { columns: l, onSelect: m, options: r, selectedOptions: c }) }), a(_e, { children: a("div", { className: "ul-card__button-wrapper", children: a(X, { disabled: f, children: Ce(o) }) }) })] }) })] }, i);
|
|
1373
|
+
}, ai = ({ options: e, selectItem: t, selectedOptions: n, showCheckbox: r }) => {
|
|
1374
|
+
const { themeColor: o } = B((i) => ({ doc: i.viewDocument, themeColor: i.border }));
|
|
1375
|
+
return a("div", { className: "select-list", children: e.map((i) => {
|
|
1376
|
+
return a("div", { className: "select-option", onClick: (d) => {
|
|
1377
|
+
t(i), d.stopPropagation();
|
|
1378
|
+
}, role: "option", children: [r && a(Ir, { divId: (s = i.id, `checkbox-div-${s}`), id: i.id, isSelected: n.includes(i), themeColor: o }), i.label] }, i.id);
|
|
1379
|
+
var s;
|
|
1380
|
+
}) });
|
|
1381
|
+
}, li = ({ isMultiSelect: e = !1, multiselectText: t = "choices selected", onChange: n, options: r, placeholderText: o, value: i }) => {
|
|
1382
|
+
const [s, d] = $(!1), { viewDocument: l, update: p } = B((u) => ({ viewDocument: u.viewDocument, update: u.update })), h = () => {
|
|
1383
|
+
d(!s), p();
|
|
1384
|
+
};
|
|
1385
|
+
G(() => {
|
|
1386
|
+
var m;
|
|
1387
|
+
const u = () => {
|
|
1388
|
+
d(!1), p();
|
|
1389
|
+
};
|
|
1390
|
+
return l.addEventListener("click", u), (m = window.parent) == null || m.addEventListener("click", u), () => {
|
|
1391
|
+
var f;
|
|
1392
|
+
(f = window.parent) == null || f.removeEventListener("click", u), l.removeEventListener("click", u);
|
|
1393
|
+
};
|
|
1394
|
+
}, [l, p]);
|
|
1395
|
+
const c = i.length === 0 ? ["select-button-placeholder"] : [];
|
|
1396
|
+
return a(K, { children: [a("button", { "aria-label": "choice dropdown button", className: L("select-button", ...c), onClick: (u) => {
|
|
1397
|
+
u.stopPropagation(), h();
|
|
1398
|
+
}, type: "button", children: [a("span", { children: i.length === 0 ? o : i.length === 1 ? i[0].label : `${i.length} ${t}` }), a(Er, {})] }), s && a(ai, { options: r, selectedOptions: i, selectItem: (u) => {
|
|
1399
|
+
var b;
|
|
1400
|
+
const m = i.some((_) => _.id === u.id), f = i.some((_) => {
|
|
1401
|
+
var y;
|
|
1402
|
+
return (y = _.optionProperties) == null ? void 0 : y.noneOfTheAbove;
|
|
1403
|
+
});
|
|
1404
|
+
(b = u.optionProperties) != null && b.noneOfTheAbove && !m ? n([u]) : e ? n(m ? i.filter((_) => _.id !== u.id) : f ? [u] : [...i, u]) : m || n([u]), e || h();
|
|
1405
|
+
}, showCheckbox: e })] });
|
|
1406
|
+
}, Rr = ({ className: e, message: t, onSubmit: n, options: r = [], properties: o, questionId: i, type: s }) => {
|
|
1407
|
+
const { border: d, useMobileStyling: l } = B((w) => ({ border: w.border, useMobileStyling: w.useMobileStyling })), p = r.reduce((w, k) => (w[k.id] = { isSelected: !1 }, w), {}), [h, c] = $(p), u = s === "multiplechoice", m = o.required, f = r.find((w) => {
|
|
1408
|
+
var k;
|
|
1409
|
+
return (k = w.optionProperties) == null ? void 0 : k.noneOfTheAbove;
|
|
1410
|
+
}), b = Object.entries(h).some(([w, k]) => {
|
|
1411
|
+
var g;
|
|
1412
|
+
const j = r.find((v) => `${v.id}` === w), P = k.userText === void 0 || k.userText.trim() === "";
|
|
1413
|
+
return ((g = j == null ? void 0 : j.optionProperties) == null ? void 0 : g.allowsTextEntry) && P && k.isSelected;
|
|
1414
|
+
}), _ = Object.values(h).some((w) => w.isSelected), y = b || m && !_, x = r.map(({ id: w, label: k, value: j, optionProperties: P }) => {
|
|
1415
|
+
var I, O;
|
|
1416
|
+
const g = `${w}`, { allowsTextEntry: v, noneOfTheAbove: E } = { allowsTextEntry: !1, noneOfTheAbove: !1, ...P };
|
|
1417
|
+
return a(et, { allowTextEntry: v, border: d, error: !1, id: g, isRadio: u, isSelected: !!((I = h[g]) != null && I.isSelected), label: k, noneOfTheAbove: E, onUserInputChanged: (C) => S(C.id, C.selected, C.userText, C.noneOfTheAbove), promptText: "Please specify", text: (O = h[w]) == null ? void 0 : O.userText, useMobileStyling: l, value: j }, g);
|
|
1418
|
+
}), T = (w) => {
|
|
1419
|
+
w.preventDefault(), w.stopPropagation(), n(h);
|
|
1420
|
+
}, S = (w, k, j, P) => {
|
|
1421
|
+
const g = Object.assign({}, h);
|
|
1422
|
+
if ((u || P) && k)
|
|
1423
|
+
for (const v of Object.values(g))
|
|
1424
|
+
v.isSelected = !1, delete v.userText;
|
|
1425
|
+
else
|
|
1426
|
+
f && !P && h[f.id].isSelected && (g[f.id].isSelected = !1);
|
|
1427
|
+
g[w] = { isSelected: k, userText: j }, c(g);
|
|
1428
|
+
};
|
|
1429
|
+
return a("form", { className: L(e, "ul-card--multiple", "fade-in-transition"), id: "text-form", onSubmit: T, children: [a(ie, { message: t, properties: o }), a(me, { properties: o, defaultBody: () => a(K, { children: [a(ge, { children: o.isDropdown ? a(li, { isMultiSelect: !u, multiselectText: o.dropdownMultiselectedText ?? "choices selected", onChange: (w) => {
|
|
1430
|
+
const k = { ...h };
|
|
1431
|
+
for (const j of r)
|
|
1432
|
+
w.includes(j) ? k[j.id].isSelected = !0 : k[j.id].isSelected = !1;
|
|
1433
|
+
c(k);
|
|
1434
|
+
}, options: r, placeholderText: o.dropdownPlaceholderText ?? (u ? "Select choice" : "Select choice(s)"), value: r.filter((w) => h[w.id].isSelected) }) : a("div", { className: L(Z("ul-card__choices", l)), role: u ? "radiogroup" : "group", children: x }) }), a(_e, { children: a("div", { className: "ul-card__button-wrapper", children: a(X, { disabled: y, onClick: T, children: Ce(o) }) }) })] }) })] }, i);
|
|
1435
|
+
}, di = (e) => {
|
|
1436
|
+
const { questionId: t, type: n, next: r, options: o } = e;
|
|
1437
|
+
return a(Rr, { ...e, onSubmit: (i) => {
|
|
1438
|
+
const s = Object.entries(i).find(([, c]) => c.isSelected) || [void 0, void 0], [d, l] = s, p = o.find((c) => `${c.id}` === d), h = l != null && l.userText ? { [d]: { userText: l.userText } } : null;
|
|
1439
|
+
r({ value: p && d ? { [d]: p.value } : {}, secondaryValue: h, questionId: t, type: n });
|
|
1440
|
+
} });
|
|
1441
|
+
}, ci = (e) => {
|
|
1442
|
+
const { questionId: t, type: n, next: r } = e;
|
|
1443
|
+
return a(Rr, { ...e, onSubmit: (o) => {
|
|
1444
|
+
const i = Object.entries(o).reduce((d, [l, p]) => (d[l] = p.isSelected, d), {}), s = Object.entries(o).reduce((d, [l, p]) => {
|
|
1445
|
+
if (!p.userText)
|
|
1446
|
+
return d;
|
|
1447
|
+
const h = d || {};
|
|
1448
|
+
return h[l] = { userText: p.userText }, h;
|
|
1449
|
+
}, null);
|
|
1450
|
+
r({ value: i, secondaryValue: s, questionId: t, type: n });
|
|
1451
|
+
} });
|
|
1452
|
+
}, ui = ({ className: e, props: { labels: t, message: n, properties: r }, next: o, questionId: i, type: s }) => {
|
|
1453
|
+
const { border: d, useMobileStyling: l, viewDocument: p } = B((f) => ({ border: f.border, useMobileStyling: f.useMobileStyling, viewDocument: f.viewDocument })), h = t && t.left, c = t && t.right, u = [...Array(11)].map((f, b) => a("button", { className: L(Z("nps-number", l), Z(`nps-number-${b}`, l)), id: `option-${b}`, onClick: () => o({ value: b, questionId: i, type: s }), onKeyDown: (_) => {
|
|
1454
|
+
var x, T;
|
|
1455
|
+
const y = p.querySelectorAll("button.nps-number");
|
|
1456
|
+
_.key === "ArrowRight" ? (x = y[b + 1]) == null || x.focus() : _.key === "ArrowLeft" ? (T = y[b - 1]) == null || T.focus() : _.key !== "Enter" && _.key !== " " || o({ value: b, questionId: i, type: s });
|
|
1457
|
+
}, onPointerDown: (_) => {
|
|
1458
|
+
_.currentTarget.style.zIndex = "2", _.currentTarget.style.borderColor = d;
|
|
1459
|
+
}, onPointerLeave: (_) => {
|
|
1460
|
+
_.currentTarget.style.zIndex = "auto", _.currentTarget.style.borderColor = Ct;
|
|
1461
|
+
}, tabIndex: 0, children: b }, b)), m = (f) => {
|
|
1462
|
+
f.preventDefault(), f.stopPropagation(), o({ value: null, questionId: i, type: s });
|
|
1463
|
+
};
|
|
1464
|
+
return a("form", { className: L(e, "ul-card--nps", "fade-in-transition"), children: [a(ie, { message: n, properties: r }), a(me, { properties: r, defaultBody: () => a(K, { children: [a(ge, { children: [a("div", { className: "ul-card--nps__numbers", children: u }), a("div", { className: "ul-card--nps__labels", children: [a("span", { children: h }), a("span", { children: c })] })] }), !r.required && a(_e, { children: a("div", { className: "ul-vertical-centered-container", children: a(X, { onClick: m, children: Ce(r) }) }) })] }) })] }, i);
|
|
1465
|
+
}, pi = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i }) => {
|
|
1466
|
+
const { border: s, useMobileStyling: d, update: l } = B((S) => ({ border: S.border, useMobileStyling: S.useMobileStyling, update: S.update })), [p, h] = $(""), c = ee(null), u = p.trim(), m = r.required === !0 && !u, f = Tr(c, () => l()), b = (S) => {
|
|
1467
|
+
f(), S.preventDefault(), S.stopPropagation(), h(S.currentTarget.value);
|
|
1468
|
+
}, _ = (S) => {
|
|
1469
|
+
S.preventDefault(), S.stopPropagation(), n({ value: p, questionId: o, type: i });
|
|
1470
|
+
}, y = r && r.openTextPlaceholder ? r.openTextPlaceholder : "", x = (S) => {
|
|
1471
|
+
S.currentTarget.style.borderColor = s;
|
|
1472
|
+
}, T = (S) => {
|
|
1473
|
+
S.currentTarget.style.borderColor = Ct;
|
|
1474
|
+
};
|
|
1475
|
+
return a("form", { className: L(e, "ul-card--text", "fade-in-transition"), id: "text-form", children: [a(ie, { message: t, properties: r }), a(me, { defaultBody: () => a("div", { className: "ul-card-text", children: [a(ge, { children: a("div", { className: "ul-card-text__container", children: a("textarea", { "aria-labelledby": "ul-question", "aria-describedby": "ul-caption", "aria-multiline": "true", "aria-placeholder": y, className: L(Z("ul-card-text__input", d)), "data-gramm": "false", maxLength: 5e3, name: "text", onBlur: T, onChange: b, onFocus: x, placeholder: y, ref: c, role: "textbox", tabIndex: 0 }) }) }), a(_e, { children: [a(X, { disabled: m, onClick: _, children: Ce(r) }), r.footerHtml && a("div", { className: "footer", dangerouslySetInnerHTML: { __html: r.footerHtml } })] })] }), properties: r })] }, o);
|
|
1476
|
+
}, yt = 1, Nr = 2, Mr = 3, Qe = (e) => e.type === "av_permission", _n = (e) => e.type === "screen_permission", Lr = (e, t) => e === void 0 ? yt : e ? ((n, r) => !(Qe(r) ? r.permissionDescriptors : []).includes("camera") || n.getVideoTracks().length > 0)(e, t) ? Mr : yt : Nr, bn = { avStream: null, currentPage: null, mediaRecordingUids: null, nextQuestion: () => {
|
|
1477
|
+
}, passthroughData: void 0, recordingMediaTypes: void 0, screenPermissionRequested: !1, type: void 0 }, ae = kr((e) => ({ ...bn, reset: () => {
|
|
1478
|
+
e(bn);
|
|
1479
|
+
}, updatePage: (t) => {
|
|
1480
|
+
e(t);
|
|
1481
|
+
} }));
|
|
1482
|
+
function xt({ currentPage: e, pages: t }) {
|
|
1483
|
+
const { avStream: n, recordingMediaTypes: r, updatePage: o } = ae.getState(), { recorderEventEmitter: i } = B.getState();
|
|
1484
|
+
i.emit("av.permission", { "permission.descriptors": e.permissionDescriptors, "stream.ready": (s, d) => {
|
|
1485
|
+
if (n === s)
|
|
1486
|
+
return;
|
|
1487
|
+
let l = e;
|
|
1488
|
+
if (s && !e.permissionDescriptors.includes("camera")) {
|
|
1489
|
+
const p = t.indexOf(e), h = d != null && d.active ? p + 2 : p + 1;
|
|
1490
|
+
d != null && d.active && r && i.emit("begin.recording", { "recording.media.types": r, "start.recording.callback": (c) => o({ mediaRecordingUids: c }) }), l = t[h];
|
|
1491
|
+
}
|
|
1492
|
+
o({ currentPage: l, avStream: s });
|
|
1493
|
+
} });
|
|
1494
|
+
}
|
|
1495
|
+
function kt({ status: e }) {
|
|
1496
|
+
const { nextQuestion: t, passthroughData: n, mediaRecordingUids: r, reset: o } = ae.getState(), { recorderEventEmitter: i, handleUploadUpdate: s, index: d } = B.getState(), l = { value: { taskStatus: e }, type: "recordedtask", questionId: (n == null ? void 0 : n.questionId) || 1 };
|
|
1497
|
+
n && i.emit("finish.task", { "begin.callback": (p) => {
|
|
1498
|
+
s({ mediaRecordingUid: p, isSubmitted: !0, progressPct: 0, isComplete: !1 });
|
|
1499
|
+
}, "progress.callback": (p, h) => {
|
|
1500
|
+
s({ mediaRecordingUid: p, progressPct: h.detail, isSubmitted: !1, isComplete: !1 });
|
|
1501
|
+
}, "upload.callback": (p) => {
|
|
1502
|
+
p && s({ mediaRecordingUid: p, isComplete: !0, isSubmitted: !0, progressPct: 100 });
|
|
1503
|
+
}, "passthrough.data": n, "current.index": d, "task.response": l, "task.complete.callback": (p) => {
|
|
1504
|
+
l.value.taskDurationMillisecond = p, r && (l.value.mediaRecordingUids = r), o(), t(l);
|
|
1505
|
+
} });
|
|
1506
|
+
}
|
|
1507
|
+
function Lt({ pages: e, setIsRequestingPermission: t }) {
|
|
1508
|
+
const { recorderEventEmitter: n, eventEmitFn: r } = B.getState(), { updatePage: o, currentPage: i, recordingMediaTypes: s, screenPermissionRequested: d } = ae.getState();
|
|
1509
|
+
if (!i)
|
|
1510
|
+
return;
|
|
1511
|
+
const l = e.indexOf(i);
|
|
1512
|
+
switch (i.type) {
|
|
1513
|
+
case "av_permission": {
|
|
1514
|
+
const p = d ? l + 2 : l + 1;
|
|
1515
|
+
return d && s && n.emit("begin.recording", { "recording.media.types": s, "start.recording.callback": (h) => {
|
|
1516
|
+
o({ mediaRecordingUids: h });
|
|
1517
|
+
} }), void o({ currentPage: e[p] });
|
|
1518
|
+
}
|
|
1519
|
+
case "screen_permission":
|
|
1520
|
+
return void n.emit("screen.permission", { "screen.permission.requested": t, "stream.ready.callback": (p, h) => {
|
|
1521
|
+
const c = h ? e[l + 1] : i;
|
|
1522
|
+
h && s && n.emit("begin.recording", { "recording.media.types": s, "start.recording.callback": (u) => {
|
|
1523
|
+
o({ captureStream: h, mediaRecordingUids: u });
|
|
1524
|
+
} }), o({ currentPage: c, screenPermissionRequested: !0, captureStream: h });
|
|
1525
|
+
} });
|
|
1526
|
+
case "start_task":
|
|
1527
|
+
return r("recorded.task.start"), n.emit("recorded.task.start"), n.emit("start.task"), void o({ currentPage: e[l + 1], screenPermissionRequested: !0 });
|
|
1528
|
+
case "complete_task":
|
|
1529
|
+
return;
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
const Or = "ul-permission-graphics-container", Ur = "ul-permission-body", Hr = L(Or, "ul_recorded-task-inset-spacing"), tt = L("ul-horizontal-button-container", "ul-horizontal-button-container-left"), Ar = ({ richTextBody: e }) => a("div", { className: "ul-rich-text-body", dangerouslySetInnerHTML: { __html: e }, id: "ul-task-detail-container" }), nt = ({ required: e, skipButtonText: t, bottom: n = !1 }) => e ? null : a(X, { className: L(n && "ul-skip-button-below", "ul-button-inactive"), onClick: kt.bind(null, { status: "abandoned" }), children: t || "Skip" }), Ot = (e) => {
|
|
1533
|
+
const { avStream: t, captureStream: n, recordingMediaTypes: r, updatePage: o } = ae.getState(), i = (r == null ? void 0 : r.includes("audio")) || (r == null ? void 0 : r.includes("video"));
|
|
1534
|
+
G(() => {
|
|
1535
|
+
const s = setInterval(() => {
|
|
1536
|
+
i && t && !t.active ? o({ avStream: null, currentPage: e[0] }) : n && n.active || o({ captureStream: void 0, currentPage: e[i ? 1 : 0] });
|
|
1537
|
+
}, 1e3);
|
|
1538
|
+
return () => clearInterval(s);
|
|
1539
|
+
}, [t, n, i, e, r, o]);
|
|
1540
|
+
}, hi = ({ content: e, pages: t, required: n }) => {
|
|
1541
|
+
const { buttonText: r, skipButtonText: o, taskDetail: i } = e;
|
|
1542
|
+
return Ot(t), a("div", { className: "ul-task-page", children: [i && a(Ar, { richTextBody: i }), a("div", { className: tt, children: [a(X, { onClick: Lt.bind(null, { pages: t }), children: r }), a(nt, { required: n, skipButtonText: o })] })] }, "start-task");
|
|
1543
|
+
}, mi = ({ content: e, pages: t, properties: n }) => {
|
|
1544
|
+
const { buttonText: r, skipButtonText: o } = e;
|
|
1545
|
+
Ot(t);
|
|
1546
|
+
const i = a(me, { properties: n, defaultBody: () => a("div", { className: tt, children: [a(X, { className: "ul-complete-task-button", onClick: kt.bind(null, { status: "completed" }), children: r }), a(X, { className: L("ul-button-inactive"), onClick: kt.bind(null, { status: "given.up" }), children: o })] }) });
|
|
1547
|
+
return a("div", { className: "ul-task-page", children: [e.taskDetail && a(Ar, { richTextBody: e.taskDetail }), i] }, "complete-task");
|
|
1548
|
+
}, gi = ({ content: e, pages: t, required: n }) => {
|
|
1549
|
+
const { buttonText: r, skipButtonText: o } = e, [i] = B((l) => [l.tabTitle]), [s, d] = $(!1);
|
|
1550
|
+
return a("div", { children: [a("div", { className: Hr, children: [a("p", { style: { marginTop: "auto" }, children: e.selectTabText }), a("div", { className: "ul-select-tab-container", children: a("p", { className: Ur, children: i }) })] }), a("div", { className: n ? "" : tt, children: [a(X, { disabled: s, onClick: Lt.bind(null, { pages: t, setIsRequestingPermission: d }), children: r }), a(nt, { required: n, skipButtonText: o })] })] });
|
|
1551
|
+
}, fi = ({ content: e }) => a("div", { className: L(Or, "ul_permission_svg_container", "ul_recorded-task-inset-spacing", "ul-center-horizontally"), dangerouslySetInnerHTML: { __html: e.svg } }, "ul-permission-request-graphic"), vi = ({ content: e, pages: t, required: n }) => {
|
|
1552
|
+
const { permissionDeniedHeadline: r, permissionDeniedBody: o, skipButtonText: i, tryAgainButtonText: s } = e, d = Qe(t[0]) ? t[0] : null;
|
|
1553
|
+
return G(() => {
|
|
1554
|
+
const l = setInterval(() => {
|
|
1555
|
+
d !== null && xt({ currentPage: d, pages: t });
|
|
1556
|
+
}, 1e3);
|
|
1557
|
+
return () => clearInterval(l);
|
|
1558
|
+
}, [d, t]), d ? a("div", { children: [a("div", { className: Hr, children: a("p", { className: "ul-av-permission-denied-paragraph", children: [a("span", { className: "ul-av-permission-denied-headline", children: r }), a("span", { className: Ur, children: o })] }) }), a("div", { className: tt, children: [a(X, { onClick: xt.bind(null, { currentPage: d, pages: t }), children: s }), a(nt, { required: n, skipButtonText: i })] })] }) : null;
|
|
1559
|
+
}, _i = ({ stream: e }) => a("video", { autoPlay: !0, className: L("ul_recorded-task-inset-spacing"), id: "ul-record-task-video-preview", muted: !0, ref: (t) => {
|
|
1560
|
+
t && (t.srcObject = e || null);
|
|
1561
|
+
} }), bi = ({ content: e, pages: t, required: n }) => {
|
|
1562
|
+
const { skipButtonText: r } = e, { avStream: o } = ae.getState();
|
|
1563
|
+
return Ot(t), a("div", { children: [a(_i, { stream: o }), a("div", { className: "ul-vertical-button-container-center", children: [a(X, { onClick: Lt.bind(null, { pages: t }), children: e.buttonText }), a(nt, { bottom: !0, required: n, skipButtonText: r })] })] });
|
|
1564
|
+
}, yi = ({ properties: e }) => {
|
|
1565
|
+
const { pages: t, required: n } = e, { avStream: r, currentPage: o } = ae.getState();
|
|
1566
|
+
if (o === void 0)
|
|
1567
|
+
return null;
|
|
1568
|
+
switch (o == null ? void 0 : o.type) {
|
|
1569
|
+
case "av_permission": {
|
|
1570
|
+
const i = Lr(r, o);
|
|
1571
|
+
return i === yt ? a(fi, { content: o }) : a(i === Nr ? vi : bi, { content: o, pages: t, required: n });
|
|
1572
|
+
}
|
|
1573
|
+
case "screen_permission":
|
|
1574
|
+
return a(gi, { content: o, pages: t, required: n });
|
|
1575
|
+
case "start_task":
|
|
1576
|
+
return a(hi, { content: o, pages: t, required: n });
|
|
1577
|
+
case "complete_task":
|
|
1578
|
+
return a(mi, { content: o, pages: t, properties: e });
|
|
1579
|
+
default:
|
|
1580
|
+
return null;
|
|
1581
|
+
}
|
|
1582
|
+
}, xi = ({ className: e, properties: t, next: n, questionId: r }) => {
|
|
1583
|
+
const o = B(), { surveyId: i, responseGroupUid: s, userId: d } = o, l = ae(), { screenPermissionRequested: p } = l, h = ae((b) => b.avStream);
|
|
1584
|
+
let c = ae((b) => b.currentPage);
|
|
1585
|
+
c || (c = function({ pages: b, userId: _, responseGroupUid: y, surveyId: x, questionId: T, next: S }) {
|
|
1586
|
+
const { updatePage: w } = ae.getState(), { eventEmitFn: k, recorderEventEmitter: j } = B.getState(), P = { questionId: T, surveyId: x, visitorId: _, responseGroupUid: y };
|
|
1587
|
+
let g = 0;
|
|
1588
|
+
j.emit("recorded.task.permission.screen"), k("recorded.task.permission.screen"), j.emit("permission.status", { "permission.status.callback": (E, I, O, C) => {
|
|
1589
|
+
const M = b[g], { type: A } = M, H = ["screen"];
|
|
1590
|
+
if (Qe(M)) {
|
|
1591
|
+
const { permissionDescriptors: q } = M, R = q == null ? void 0 : q.includes("microphone"), W = q == null ? void 0 : q.includes("camera");
|
|
1592
|
+
R && H.push("audio"), W && H.push("video"), (E != null && E.active && !W || E != null && E.active && I) && g++;
|
|
1593
|
+
}
|
|
1594
|
+
_n(b[g]) && O && (g++, j.emit("begin.recording", { "recording.media.types": H, "start.recording.callback": (q) => w({ mediaRecordingUids: q }) })), w({ currentPage: b[g], avStream: E, screenPermissionRequested: O, nextQuestion: S, type: A, passthroughData: P, recordingMediaTypes: H, captureStream: C });
|
|
1595
|
+
} });
|
|
1596
|
+
const v = b[g];
|
|
1597
|
+
return v.type === "av_permission" && xt({ currentPage: v, pages: b }), v;
|
|
1598
|
+
}({ questionId: r, surveyId: i, next: (b) => {
|
|
1599
|
+
n(b);
|
|
1600
|
+
}, pages: t.pages, responseGroupUid: s, userId: d }));
|
|
1601
|
+
let u = c.headline, m = c.captionText;
|
|
1602
|
+
const f = Lr(h, c);
|
|
1603
|
+
return _n(c) && p && (u = c.permissionDeniedHeadline, m = c.permissionDeniedCaptionText), Qe(c) && f === Mr && (u = c.permissionGrantedHeadline, m = c.permissionGrantedCaptionText), a("div", { className: L(e, "ul-center-horizontally", "fade-in-transition"), children: [a(ie, { message: u, properties: { captionText: m } }), a(ge, { children: a(yi, { properties: t }) })] });
|
|
1604
|
+
}, ki = { "{{user_id}}": "externalUserId", "{{email}}": "email" }, wi = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i }) => {
|
|
1605
|
+
const { visitorAttributes: s } = B((u) => ({ visitorAttributes: u.visitorAttributes })), d = (u, m = !1) => {
|
|
1606
|
+
n({ value: m ? { skipped: !0 } : void 0, questionId: o, type: i });
|
|
1607
|
+
}, l = (u) => {
|
|
1608
|
+
u.key !== "Enter" && u.key !== " " || n({ value: void 0, questionId: o, type: i });
|
|
1609
|
+
}, p = ((u, m = {}) => {
|
|
1610
|
+
if (!u)
|
|
1611
|
+
return u;
|
|
1612
|
+
let f = u;
|
|
1613
|
+
const b = [];
|
|
1614
|
+
for (const [x, T] of Object.entries(ki))
|
|
1615
|
+
if (f.toLowerCase().includes(x))
|
|
1616
|
+
if (m[T]) {
|
|
1617
|
+
const S = new RegExp(x, "gi");
|
|
1618
|
+
f = f.replace(S, m[T]);
|
|
1619
|
+
} else
|
|
1620
|
+
b.push(x);
|
|
1621
|
+
if (b.length === 0 || !f.includes("?"))
|
|
1622
|
+
return f;
|
|
1623
|
+
const _ = f.slice(0, f.indexOf("?")), y = f.slice(f.indexOf("?") + 1).split("&").map((x) => x.split("=")).filter((x) => !b.includes(x[1]));
|
|
1624
|
+
return y.length === 0 ? _ : `${_}?${y.map((x) => x.join("=")).join("&")}`;
|
|
1625
|
+
})(r && r.buttonUrl, s);
|
|
1626
|
+
return a("div", { className: L(e, "ul-card__text-url-prompt", "fade-in-transition"), children: [a(ie, { message: t, properties: { questionHtml: r.questionHtml } }), a(ge, { children: (h = r == null ? void 0 : r.richTextBody, c = r == null ? void 0 : r.body, a("div", h ? { className: "ul-rich-text-body", dangerouslySetInnerHTML: { __html: h }, id: "ul-card__text-url-body-container" } : { className: "ul-rich-text-body", id: "ul-card__text-url-body-container", children: (c ? c.split(/\n\s*\n/g) : []).map((u, m) => a("p", { children: u }, m)) })) }), a(me, { defaultBody: () => a(_e, { 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: d, onKeyPress: l, rel: "noreferrer", role: p ? "link" : "button", tabIndex: 0, target: "_blank", children: Ce(r) }), r.required === !1 && a("button", { className: "ul-card-skip__button", onClick: (u) => d(0, !0), children: Mt(r) })] }) }), properties: r })] }, o);
|
|
1627
|
+
var h, c;
|
|
1628
|
+
}, Ci = ({ className: e, questionId: t }) => {
|
|
1629
|
+
const { border: n, destroy: r, endCard: o, forceBrandedLogo: i } = B((l) => ({ border: l.border, destroy: l.destroy, endCard: l.endCard, forceBrandedLogo: l.forceBrandedLogo }));
|
|
1630
|
+
G(() => {
|
|
1631
|
+
setTimeout(() => {
|
|
1632
|
+
r(Se);
|
|
1633
|
+
}, i ? 4e3 : 2e3);
|
|
1634
|
+
}, [r, i]);
|
|
1635
|
+
const s = o && o.subheader ? a("p", { className: "ul-caption", children: o.subheader }) : null, d = o && o.headline ? o.headline : "";
|
|
1636
|
+
return a("div", { className: L(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(ie, { message: d }), s] }) }) }, t);
|
|
1637
|
+
}, ke = "https://cdn.sprig.com", N = { document: void 0, videojs: void 0 }, Ut = (e) => e + "-loading-spiner", J = "hidden", yn = ".m3u8", lt = "questionId", dt = "ul-video-recorder-camera-off-button", ct = "ul-recording-in-session", Ei = [{ type: "link", content: `${ke}/dependencies/videojs-record-4.5.0.min.css` }, { type: "script", content: `${ke}/dependencies/RecordRTC-5.6.2.js` }, { type: "script", content: `${ke}/dependencies/adapter.8.0.0.min.js` }, { type: "script", content: `${ke}/dependencies/videojs-record-4.5.0.min.js` }, { type: "script", content: `${ke}/userleap-web-upchunk-v2.2.2.js` }], Br = [{ type: "link", content: `${ke}/dependencies/video-js-7.18.0.min.css` }, { type: "script", content: `${ke}/dependencies/video-js-7.18.0.min.js` }, { type: "style", content: `/* progress control styles */
|
|
1638
|
+
.video-js .vjs-control {
|
|
1639
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1642
|
+
.video-js .vjs-progress-control .vjs-progress-holder {
|
|
1643
|
+
margin: 0 0px;
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1646
|
+
.video-js .vjs-progress-control {
|
|
1647
|
+
position: absolute;
|
|
1648
|
+
height: 3px;
|
|
1649
|
+
width: 100%;
|
|
1650
|
+
}
|
|
1651
|
+
/* position and align the buttons and button texts */
|
|
1652
|
+
.ul-control-panel {
|
|
1653
|
+
bottom: 0;
|
|
1654
|
+
width: 100%;
|
|
1655
|
+
flex-direction: column;
|
|
1656
|
+
background-color: white;
|
|
1657
|
+
height: fit-content;
|
|
1658
|
+
z-index: 2;
|
|
1659
|
+
}
|
|
1660
|
+
|
|
1661
|
+
.ul-buttons-panel {
|
|
1662
|
+
color: black;
|
|
1663
|
+
display: flex;
|
|
1664
|
+
gap: 20px;
|
|
1665
|
+
height: 50px;
|
|
1666
|
+
justify-content: center;
|
|
1667
|
+
margin: 10px;
|
|
1668
|
+
padding: 2px 14px 0;
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1671
|
+
.video-js .vjs-volume-panel {
|
|
1672
|
+
height: 30px;
|
|
1673
|
+
width: 40px;
|
|
1674
|
+
}
|
|
1675
|
+
|
|
1676
|
+
.ul-inactive {
|
|
1677
|
+
opacity: 0.3;
|
|
1678
|
+
cursor: default;
|
|
1679
|
+
pointer-events: none;
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1682
|
+
/* buttons */
|
|
1683
|
+
.ul-buttons-panel > .vjs-button {
|
|
1684
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
1685
|
+
border-radius: 50%;
|
|
1686
|
+
display: flex;
|
|
1687
|
+
height: 3em;
|
|
1688
|
+
justify-content: center;
|
|
1689
|
+
width: 3em;
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
.vjs-button>.vjs-icon-placeholder:before {
|
|
1693
|
+
align-items: center;
|
|
1694
|
+
display: flex;
|
|
1695
|
+
font-size: unset;
|
|
1696
|
+
line-height: 0.5;
|
|
1697
|
+
justify-content: center;
|
|
1698
|
+
}
|
|
1699
|
+
|
|
1700
|
+
span.ul-button-text {
|
|
1701
|
+
align-self: flex-end;
|
|
1702
|
+
position: relative;
|
|
1703
|
+
top: 14px;
|
|
1704
|
+
}
|
|
1705
|
+
|
|
1706
|
+
#ul-camera-button {
|
|
1707
|
+
white-space: nowrap;
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1710
|
+
.video-js .vjs-volume-control.vjs-volume-horizontal {
|
|
1711
|
+
background-color: #fff;
|
|
1712
|
+
z-index: 1;
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1715
|
+
.vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level {
|
|
1716
|
+
background-color: black;
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-hover,
|
|
1720
|
+
.video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,
|
|
1721
|
+
.video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active {
|
|
1722
|
+
width: 40px;
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
.video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,
|
|
1726
|
+
.video-js .vjs-volume-panel .vjs-volume-control:active,
|
|
1727
|
+
.video-js .vjs-volume-panel.vjs-hover .vjs-mute-control ~ .vjs-volume-control,
|
|
1728
|
+
.video-js .vjs-volume-panel.vjs-hover .vjs-volume-control,
|
|
1729
|
+
.video-js .vjs-volume-panel:active .vjs-volume-control,
|
|
1730
|
+
.video-js .vjs-volume-panel:focus .vjs-volume-control {
|
|
1731
|
+
visibility: visible;
|
|
1732
|
+
left: 40px;
|
|
1733
|
+
position: absolute;
|
|
1734
|
+
transition: visibility 0.1s, opacity 0.1s, height 0.1s, width 0.1s, left 0s, top 0s;
|
|
1735
|
+
}
|
|
1736
|
+
|
|
1737
|
+
/* play button customization */
|
|
1738
|
+
.video-js .vjs-play-control {
|
|
1739
|
+
color: black;
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
.video-js .vjs-play-control .vjs-icon-placeholder:before {
|
|
1743
|
+
content: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.5363 6.40226L1.93958 10.7006C1.64037 10.8502 1.28833 10.6326 1.28833 10.2981V1.7014C1.28833 1.36688 1.64037 1.14931 1.93958 1.29891L10.5363 5.59727C10.868 5.76311 10.868 6.23642 10.5363 6.40226Z' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
|
|
1744
|
+
}
|
|
1745
|
+
|
|
1746
|
+
/* position and style the current timer */
|
|
1747
|
+
.ul-time-panel {
|
|
1748
|
+
position: absolute;
|
|
1749
|
+
bottom: 80px;
|
|
1750
|
+
left: 10px;
|
|
1751
|
+
height: 22px;
|
|
1752
|
+
color: black;
|
|
1753
|
+
border: 1px solid #e0e0eb;
|
|
1754
|
+
border-radius: 23px;
|
|
1755
|
+
background-color: white;
|
|
1756
|
+
width: fit-content;
|
|
1757
|
+
}
|
|
1758
|
+
|
|
1759
|
+
.video-js .vjs-current-time,
|
|
1760
|
+
.vjs-no-flex .vjs-current-time {
|
|
1761
|
+
display: flex;
|
|
1762
|
+
align-items: center;
|
|
1763
|
+
text-align: center;
|
|
1764
|
+
}
|
|
1765
|
+
|
|
1766
|
+
/* remove the dot progress indicator */
|
|
1767
|
+
.video-js .vjs-play-progress:before,
|
|
1768
|
+
.video-js .vjs-volume-level:before,
|
|
1769
|
+
.vjs-icon-circle:before,
|
|
1770
|
+
.vjs-seek-to-live-control .vjs-icon-placeholder:before {
|
|
1771
|
+
content: none;
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1774
|
+
.video-js .vjs-mute-control .vjs-icon-placeholder:before {
|
|
1775
|
+
content: url("data:image/svg+xml,%3Csvg width='19' height='14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.825.324A.75.75 0 019.25 1v11.667a.75.75 0 01-1.219.585l-3.96-3.169H1a.75.75 0 01-.75-.75v-5a.75.75 0 01.75-.75h3.07L8.031.414a.75.75 0 01.794-.09zM7.75 2.56L4.802 4.92a.75.75 0 01-.469.164H1.75v3.5h2.583a.75.75 0 01.469.165l2.948 2.358V2.56zM14.911.47a.75.75 0 011.061 0 9.084 9.084 0 010 12.844.75.75 0 01-1.06-1.06 7.584 7.584 0 000-10.724.75.75 0 010-1.06zM11.97 3.41a.75.75 0 011.06 0 4.917 4.917 0 010 6.953.75.75 0 11-1.06-1.06 3.417 3.417 0 000-4.832.75.75 0 010-1.06z' fill='%23262136'/%3E%3C/svg%3E");
|
|
1776
|
+
}
|
|
1777
|
+
|
|
1778
|
+
.video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before {
|
|
1779
|
+
content: url("data:image/svg+xml,%3Csvg width='19' height='14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.5 1.167L4.333 4.5H1v5h3.333L8.5 12.833V1.167zM17.17 4.5l-5 5M12.17 4.5l5 5' stroke='%23262136' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
|
|
1780
|
+
}
|
|
1781
|
+
|
|
1782
|
+
.video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before {
|
|
1783
|
+
content: url("data:image/svg+xml,%3Csvg width='19' height='14' viewBox='0 0 19 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.82489 0.32403C9.08474 0.44892 9.25 0.711703 9.25 1.00001V12.6667C9.25 12.955 9.08474 13.2178 8.82489 13.3427C8.56504 13.4675 8.25661 13.4324 8.03148 13.2523L4.07025 10.0833H1C0.585786 10.0833 0.25 9.74755 0.25 9.33334V4.33334C0.25 3.91913 0.585786 3.58334 1 3.58334H4.07025L8.03148 0.414355C8.25661 0.234253 8.56504 0.19914 8.82489 0.32403ZM7.75 2.56048L4.80185 4.91899C4.66887 5.02538 4.50364 5.08334 4.33333 5.08334H1.75V8.58334H4.33333C4.50364 8.58334 4.66887 8.6413 4.80185 8.74769L7.75 11.1062V2.56048Z' fill='%23262136'/%3E%3C/svg%3E%0A");
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1786
|
+
.video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before {
|
|
1787
|
+
content: url("data:image/svg+xml,%3Csvg width='19' height='14' viewBox='0 0 19 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8.82489 0.32403C9.08474 0.44892 9.25 0.711703 9.25 1.00001V12.6667C9.25 12.955 9.08474 13.2178 8.82489 13.3427C8.56504 13.4675 8.25661 13.4324 8.03148 13.2523L4.07025 10.0833H1C0.585786 10.0833 0.25 9.74755 0.25 9.33334V4.33334C0.25 3.91913 0.585786 3.58334 1 3.58334H4.07025L8.03148 0.414355C8.25661 0.234253 8.56504 0.19914 8.82489 0.32403ZM7.75 2.56048L4.80185 4.91899C4.66887 5.02538 4.50364 5.08334 4.33333 5.08334H1.75V8.58334H4.33333C4.50364 8.58334 4.66887 8.6413 4.80185 8.74769L7.75 11.1062V2.56048Z' fill='%23262136'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11.9698 3.41124C12.2627 3.11839 12.7376 3.11846 13.0304 3.4114C13.9521 4.33341 14.4699 5.58376 14.4699 6.88748C14.4699 8.19121 13.9521 9.44156 13.0304 10.3636C12.7376 10.6565 12.2627 10.6566 11.9698 10.3637C11.6768 10.0709 11.6767 9.596 11.9696 9.30307C12.6101 8.66235 12.9699 7.79346 12.9699 6.88748C12.9699 5.98151 12.6101 5.11262 11.9696 4.4719C11.6767 4.17896 11.6768 3.70409 11.9698 3.41124Z' fill='%23262136'/%3E%3C/svg%3E%0A");
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
.video-js .vjs-volume-control:hover .vjs-mouse-display {
|
|
1791
|
+
display: none !important;
|
|
1792
|
+
}
|
|
1793
|
+
|
|
1794
|
+
.video-js .vjs-play-progress {
|
|
1795
|
+
background-color: black;
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1798
|
+
/* position video player inside the container */
|
|
1799
|
+
.video-js .vjs-tech {
|
|
1800
|
+
position: static;
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1803
|
+
.video-js .vjs-time-tooltip {
|
|
1804
|
+
padding: 0.25em 0.75em;
|
|
1805
|
+
align-items: center;
|
|
1806
|
+
color: #333;
|
|
1807
|
+
background: #FCFCFD;
|
|
1808
|
+
border-radius: 99px;
|
|
1809
|
+
text-align: center;
|
|
1810
|
+
border: 1px solid #E0E0EB;
|
|
1811
|
+
display: flex;
|
|
1812
|
+
align-items: center;
|
|
1813
|
+
justify-content: center;
|
|
1814
|
+
top: -25px;
|
|
1815
|
+
font-size: 12px !important;
|
|
1816
|
+
width: 50px !important;
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1819
|
+
.video-js .vjs-play-progress.vjs-slider-bar .vjs-time-tooltip {
|
|
1820
|
+
visibility: hidden !important;
|
|
1821
|
+
}
|
|
1822
|
+
|
|
1823
|
+
.video-js .vjs-progress-control .vjs-mouse-display {
|
|
1824
|
+
z-index: 2;
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1827
|
+
.ul-video-player {
|
|
1828
|
+
width: 100%;
|
|
1829
|
+
display: flex;
|
|
1830
|
+
flex-direction: column;
|
|
1831
|
+
height: auto;
|
|
1832
|
+
border: 1px solid #E6E6E6;
|
|
1833
|
+
background-color: white;
|
|
1834
|
+
box-sizing: border-box;
|
|
1835
|
+
border-radius: 4px;
|
|
1836
|
+
background-clip: border-box;
|
|
1837
|
+
overflow: hidden;
|
|
1838
|
+
}
|
|
1839
|
+
|
|
1840
|
+
.video-js.vjs-fullscreen:not(.vjs-ios-native-fs) {
|
|
1841
|
+
border: none;
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1844
|
+
#video-response-player-secondary-video-player {
|
|
1845
|
+
max-width: 200px;
|
|
1846
|
+
margin-right: 20px;
|
|
1847
|
+
background-color: transparent;
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1850
|
+
#ul-card-video__player_recorder-video-recorder.vjs-fullscreen {
|
|
1851
|
+
display: table;
|
|
1852
|
+
}
|
|
1853
|
+
|
|
1854
|
+
.video-js div.vjs-progress-control {
|
|
1855
|
+
margin-top: -3px;
|
|
1856
|
+
}
|
|
1857
|
+
|
|
1858
|
+
.video-js .vjs-progress-control .vjs-slider {
|
|
1859
|
+
background-color: #B2BBBD;
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1862
|
+
.vjs-record.video-js .vjs-control.vjs-button.vjs-fullscreen-control {
|
|
1863
|
+
position:relative;
|
|
1864
|
+
}
|
|
1865
|
+
|
|
1866
|
+
.video-js .vjs-fullscreen-control .vjs-icon-placeholder:before {
|
|
1867
|
+
content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.82143 2.54004L12.2614 2.54004C12.9242 2.54004 13.4614 3.0773 13.4614 3.74004L13.4614 6.18004' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M6.17955 13.46L3.73955 13.46C3.07681 13.46 2.53955 12.9227 2.53955 12.26L2.53955 9.81996' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12.7772 3.22266L9.36475 6.63516' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M6.29434 9.70605L2.88184 13.1186' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
|
|
1868
|
+
}
|
|
1869
|
+
|
|
1870
|
+
.video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before {
|
|
1871
|
+
content: url("data:image/svg+xml,%3Csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.583 9.813H5.25a1 1 0 011 1v3.666M5.375 10.688L1 15.061M14.917 5.813H11.25a1 1 0 01-1-1V1.146M15.063 1l-4.376 4.375' stroke='%23262136' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
|
|
1872
|
+
}
|
|
1873
|
+
|
|
1874
|
+
.video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before, .video-js .vjs-icon-replay:before {
|
|
1875
|
+
content: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.5363 6.40226L1.93958 10.7006C1.64037 10.8502 1.28833 10.6326 1.28833 10.2981V1.7014C1.28833 1.36688 1.64037 1.14931 1.93958 1.29891L10.5363 5.59727C10.868 5.76311 10.868 6.23642 10.5363 6.40226Z' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
|
|
1876
|
+
}
|
|
1877
|
+
|
|
1878
|
+
.video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before, .vjs-icon-pause:before {
|
|
1879
|
+
content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='3.61885' y='2.06074' width='3.16185' height='11.88' rx='0.9' fill='black' stroke='%23EDEDED' stroke-width='0.6' stroke-linecap='round'/%3E%3Crect x='9.21797' y='2.06074' width='3.16185' height='11.88' rx='0.9' fill='black' stroke='%23EDEDED' stroke-width='0.6' stroke-linecap='round'/%3E%3C/svg%3E%0A");
|
|
1880
|
+
padding: 2px;
|
|
1881
|
+
}
|
|
1882
|
+
|
|
1883
|
+
.vjs-error-display {
|
|
1884
|
+
display: none;
|
|
1885
|
+
}
|
|
1886
|
+
|
|
1887
|
+
.ul-video-player-video {
|
|
1888
|
+
position: relative;
|
|
1889
|
+
top: 0;
|
|
1890
|
+
left: 0;
|
|
1891
|
+
width: 100%;
|
|
1892
|
+
}
|
|
1893
|
+
|
|
1894
|
+
.ul-video-container {
|
|
1895
|
+
width: 100%;
|
|
1896
|
+
height: auto;
|
|
1897
|
+
left: 0px;
|
|
1898
|
+
top: 0px;
|
|
1899
|
+
|
|
1900
|
+
background-color: transparent;
|
|
1901
|
+
border-radius: 4px;
|
|
1902
|
+
|
|
1903
|
+
align-items: start;
|
|
1904
|
+
display: flex;
|
|
1905
|
+
flex-direction: column;
|
|
1906
|
+
|
|
1907
|
+
/* Inside Auto Layout */
|
|
1908
|
+
|
|
1909
|
+
flex: none;
|
|
1910
|
+
order: 0;
|
|
1911
|
+
flex-grow: 0;
|
|
1912
|
+
margin: 10px 0px;
|
|
1913
|
+
position: relative;
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1916
|
+
.vjs-record button.vjs-device-button.vjs-control {
|
|
1917
|
+
background: rgba(255, 255, 255, 96);
|
|
1918
|
+
width: 100%;
|
|
1919
|
+
height: 100%;
|
|
1920
|
+
left: 0;
|
|
1921
|
+
top: 0;
|
|
1922
|
+
margin: 0;
|
|
1923
|
+
border-radius: 0;
|
|
1924
|
+
line-height: 0.6;
|
|
1925
|
+
padding: 10px;
|
|
1926
|
+
display: flex;
|
|
1927
|
+
align-items: center;
|
|
1928
|
+
flex-direction: column;
|
|
1929
|
+
justify-content: center;
|
|
1930
|
+
z-index: 3;
|
|
1931
|
+
}
|
|
1932
|
+
|
|
1933
|
+
.vjs-record .vjs-device-button.vjs-control:before {
|
|
1934
|
+
font-size: 14px !important;
|
|
1935
|
+
color: #333;
|
|
1936
|
+
content: "Your browser needs to access your camera and microphone for video recording";
|
|
1937
|
+
line-height: 135%;
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1940
|
+
.vjs-record .vjs-device-button.vjs-control.permission-denied:before {
|
|
1941
|
+
font-size: 16px !important;
|
|
1942
|
+
color: #262136;
|
|
1943
|
+
content: "Unable to access your camera and microphone";
|
|
1944
|
+
}
|
|
1945
|
+
|
|
1946
|
+
.vjs-record .vjs-device-button.vjs-control:after {
|
|
1947
|
+
display: inline-block;
|
|
1948
|
+
background: #F0F0F5;
|
|
1949
|
+
font-size: 13px;
|
|
1950
|
+
border-radius: 4px;
|
|
1951
|
+
content: "Request Permissions";
|
|
1952
|
+
padding: 1em 2em;
|
|
1953
|
+
color: #333;
|
|
1954
|
+
margin-top: 20px;
|
|
1955
|
+
}
|
|
1956
|
+
|
|
1957
|
+
.vjs-record .vjs-device-button.vjs-control.permission-denied:after {
|
|
1958
|
+
display: inline-block;
|
|
1959
|
+
background: white;
|
|
1960
|
+
font-size: 13px;
|
|
1961
|
+
content: "Please go to your browser settings and update permissions to enable recording";
|
|
1962
|
+
padding: 1em;
|
|
1963
|
+
color: #4B575D;
|
|
1964
|
+
margin: 5px;
|
|
1965
|
+
line-height: 135%;
|
|
1966
|
+
text-align: center;
|
|
1967
|
+
}
|
|
1968
|
+
|
|
1969
|
+
.vjs-control.vjs-button.ul-video-recorder-delete-button, .vjs-control.vjs-button.ul-video-recorder-toggle-button, .vjs-control.vjs-button.ul-video-recorder-camera-off-button-audio-only, .vjs-control.vjs-button.ul-video-recorder-camera-off-button {
|
|
1970
|
+
cursor: pointer;
|
|
1971
|
+
}
|
|
1972
|
+
|
|
1973
|
+
.ul-video-recorder-delete-button .vjs-icon-placeholder:before {
|
|
1974
|
+
content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.21234 7.37549V11.1193M2.53931 4.25595H13.4593H2.53931ZM5.57234 4.25595V3.00833C5.57222 2.84433 5.60354 2.68192 5.6645 2.53038C5.72546 2.37884 5.81488 2.24115 5.92762 2.12519C6.04037 2.00922 6.17424 1.91726 6.32158 1.85456C6.46892 1.79185 6.62683 1.75964 6.78628 1.75977H9.21234C9.37179 1.75964 9.5297 1.79185 9.67703 1.85456C9.82437 1.91726 9.95824 2.00922 10.071 2.12519C10.1837 2.24115 10.2732 2.37884 10.3341 2.53038C10.3951 2.68192 10.4264 2.84433 10.4263 3.00833V4.25595H5.57234ZM12.2463 4.25595V12.9912C12.2463 13.3223 12.1184 13.6399 11.8907 13.8741C11.6631 14.1082 11.3543 14.2398 11.0323 14.2398H4.96628C4.64432 14.2398 4.33555 14.1082 4.10789 13.8741C3.88023 13.6399 3.75234 13.3223 3.75234 12.9912V4.25595H12.2463ZM6.78628 7.37549V11.1193V7.37549Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A");
|
|
1975
|
+
}
|
|
1976
|
+
|
|
1977
|
+
.ul-video-recorder-toggle-button .vjs-icon-placeholder:before {
|
|
1978
|
+
content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 0C12.4183 0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0Z' fill='%23D15153'/%3E%3C/svg%3E");
|
|
1979
|
+
}
|
|
1980
|
+
|
|
1981
|
+
.ul-video-recorder-toggle-button.ul-recording-in-session .vjs-icon-placeholder:before {
|
|
1982
|
+
content: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 10L12 2C12 0.89543 11.1046 -4.85396e-07 10 -4.37114e-07L2 -8.74228e-08C0.89543 -3.91405e-08 -4.85396e-07 0.895431 -4.37114e-07 2L-8.74228e-08 10C-3.91405e-08 11.1046 0.895431 12 2 12L10 12C11.1046 12 12 11.1046 12 10Z' fill='%23D15153'/%3E%3C/svg%3E%0A");
|
|
1983
|
+
}
|
|
1984
|
+
|
|
1985
|
+
.ul-video-recorder-camera-off-button .vjs-icon-placeholder:before {
|
|
1986
|
+
content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_2645_4654)'%3E%3Cpath d='M15.1491 4.75L10.5991 8L15.1491 11.25V4.75Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M9.29912 3.4502H2.14912C1.43115 3.4502 0.849121 4.03223 0.849121 4.7502V11.2502C0.849121 11.9682 1.43115 12.5502 2.14912 12.5502H9.29912C10.0171 12.5502 10.5991 11.9682 10.5991 11.2502V4.7502C10.5991 4.03223 10.0171 3.4502 9.29912 3.4502Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_2645_4654'%3E%3Crect width='15.6' height='15.6' fill='white' transform='translate(0.199951 0.200195)'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E");
|
|
1987
|
+
}
|
|
1988
|
+
|
|
1989
|
+
.ul-video-recorder-camera-off-button-audio-only .vjs-icon-placeholder:before {
|
|
1990
|
+
content: url("data:image/svg+xml,%3Csvg width='22' height='15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M.75 3A2.75 2.75 0 013.5.25h9.081A2.75 2.75 0 0115.331 3v9a2.75 2.75 0 01-2.75 2.75H3.5A2.75 2.75 0 01.75 12V3zM3.5 1.75c-.69 0-1.25.56-1.25 1.25v9c0 .69.56 1.25 1.25 1.25h9.081c.69 0 1.25-.56 1.25-1.25V3c0-.69-.56-1.25-1.25-1.25H3.5z' fill='%23262136'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M14.53 2.03l-12 12-1.06-1.06 12-12 1.06 1.06zM20.87 1.525a.75.75 0 01.38.652v10.588a.75.75 0 01-1.134.644l-5.92-3.53a.75.75 0 01-.365-.643v-3.53a.75.75 0 01.366-.644l5.919-3.53a.75.75 0 01.754-.007zm-5.539 4.607V8.81l4.419 2.635V3.497l-4.419 2.635z' fill='%23262136'/%3E%3C/svg%3E");
|
|
1991
|
+
transform: scale(0.75);
|
|
1992
|
+
}
|
|
1993
|
+
|
|
1994
|
+
.ul-upload-progress-label {
|
|
1995
|
+
padding: 0.15em 0.75em;
|
|
1996
|
+
align-items: center;
|
|
1997
|
+
font-size: 12px;
|
|
1998
|
+
color: #333;
|
|
1999
|
+
background: #FCFCFD;
|
|
2000
|
+
border-radius: 99px;
|
|
2001
|
+
text-align: center;
|
|
2002
|
+
border: 1px solid #E0E0EB;
|
|
2003
|
+
display: flex;
|
|
2004
|
+
align-items: center;
|
|
2005
|
+
justify-content: center;
|
|
2006
|
+
position: absolute;
|
|
2007
|
+
bottom: 75px;
|
|
2008
|
+
left: calc(50% - 65px);
|
|
2009
|
+
width: 130px;
|
|
2010
|
+
z-index: 5;
|
|
2011
|
+
}
|
|
2012
|
+
|
|
2013
|
+
.ul-upload-progress-label__time {
|
|
2014
|
+
display: inline-flex;
|
|
2015
|
+
margin-left: 0.8em;
|
|
2016
|
+
align-items: center;
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
.ul-upload-progress-label__time:before {
|
|
2020
|
+
content: "";
|
|
2021
|
+
display: inline-flex;
|
|
2022
|
+
width: 1px;
|
|
2023
|
+
height: 12px;
|
|
2024
|
+
background-color: #E0E0EB;
|
|
2025
|
+
margin-right: 0.8em;
|
|
2026
|
+
}
|
|
2027
|
+
|
|
2028
|
+
@keyframes grow {
|
|
2029
|
+
0% {
|
|
2030
|
+
transform: scale(1);
|
|
2031
|
+
background-color: #EEECFC;
|
|
2032
|
+
}
|
|
2033
|
+
50% {
|
|
2034
|
+
transform: scale(1.2);
|
|
2035
|
+
background-color: #E1DFF4;
|
|
2036
|
+
}
|
|
2037
|
+
100% {
|
|
2038
|
+
transform: scale(1);
|
|
2039
|
+
background-color: #EEECFC;
|
|
2040
|
+
}
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2043
|
+
.ul-audio-recorder-placeholder:before {
|
|
2044
|
+
width: 80px;
|
|
2045
|
+
height: 80px;
|
|
2046
|
+
border-radius: 120px;
|
|
2047
|
+
background-color: #EEECFC;
|
|
2048
|
+
content: "";
|
|
2049
|
+
position: absolute;
|
|
2050
|
+
left: calc(50% - 40px);
|
|
2051
|
+
top: calc(50% - 40px);
|
|
2052
|
+
animation: 6s infinite grow;
|
|
2053
|
+
transform-origin: 50% 60%;
|
|
2054
|
+
}
|
|
2055
|
+
|
|
2056
|
+
.ul-audio-recorder-placeholder:after {
|
|
2057
|
+
content: url("data:image/svg+xml,%3Csvg width='98' height='98' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='a' maskUnits='userSpaceOnUse' x='0' y='0' width='98' height='98'%3E%3Ccircle cx='49' cy='49' r='49' fill='%23EDECF8'/%3E%3C/mask%3E%3Cg mask='url(%23a)'%3E%3Ccircle cx='49' cy='49' r='50' fill='%23645CC2'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11.422 81.812c5.405-15.547 20.187-26.706 37.576-26.706 17.39 0 32.172 11.159 37.577 26.707-9.164 10.43-22.601 17.013-37.576 17.013-14.976 0-28.414-6.583-37.577-17.014z' fill='%23fff' fill-opacity='.6'/%3E%3Ccircle cx='49' cy='29' r='17' fill='%23fff' fill-opacity='.7'/%3E%3C/g%3E%3C/svg%3E");
|
|
2058
|
+
position: absolute;
|
|
2059
|
+
left: 50%;
|
|
2060
|
+
top: 50%;
|
|
2061
|
+
transform: translate(-50%, -50%);
|
|
2062
|
+
transform: translate(-50%, -50%) scale(0.6);
|
|
2063
|
+
}
|
|
2064
|
+
|
|
2065
|
+
.ul-audio-recorder-placeholder {
|
|
2066
|
+
min-height: 150px;
|
|
2067
|
+
width: 100%;
|
|
2068
|
+
background-color: #fcfcfd;
|
|
2069
|
+
display: block;
|
|
2070
|
+
position: relative;
|
|
2071
|
+
}
|
|
2072
|
+
|
|
2073
|
+
.vjs-fullscreen .ul-audio-recorder-placeholder {
|
|
2074
|
+
vertical-align: middle;
|
|
2075
|
+
display: table-cell;
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
.vjs-fullscreen .ul-control-panel {
|
|
2079
|
+
height: 80px;
|
|
2080
|
+
position: absolute;
|
|
2081
|
+
bottom: 0;
|
|
2082
|
+
left: 0;
|
|
2083
|
+
width: 100%;
|
|
2084
|
+
max-width: 100%;
|
|
2085
|
+
background-color: #F8F8F8;
|
|
2086
|
+
}
|
|
2087
|
+
|
|
2088
|
+
.vjs-playback-rate .vjs-playback-rate-value {
|
|
2089
|
+
align-items: center;
|
|
2090
|
+
display: flex;
|
|
2091
|
+
font-size: 12px;
|
|
2092
|
+
justify-content: center;
|
|
2093
|
+
}
|
|
2094
|
+
|
|
2095
|
+
.vjs-playback-rate .vjs-menu {
|
|
2096
|
+
left: -5px;
|
|
2097
|
+
bottom: 3px;
|
|
2098
|
+
}
|
|
2099
|
+
|
|
2100
|
+
.vjs-menu-button-popup .vjs-menu .vjs-menu-content {
|
|
2101
|
+
background-color: white;
|
|
2102
|
+
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
2103
|
+
box-sizing: border-box;
|
|
2104
|
+
border-radius: 4px;
|
|
2105
|
+
}
|
|
2106
|
+
|
|
2107
|
+
.vjs-menu li {
|
|
2108
|
+
font-size: 12px;
|
|
2109
|
+
padding: 5px 0;
|
|
2110
|
+
}
|
|
2111
|
+
|
|
2112
|
+
.vjs-menu li.vjs-selected {
|
|
2113
|
+
color: lightgray;
|
|
2114
|
+
}
|
|
2115
|
+
|
|
2116
|
+
.vjs-menu li.vjs-menu-item:hover {
|
|
2117
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
2118
|
+
}
|
|
2119
|
+
|
|
2120
|
+
.vjs-fullscreen .ul-buttons-panel {
|
|
2121
|
+
top: calc(50% - 30px);
|
|
2122
|
+
position: relative;
|
|
2123
|
+
}
|
|
2124
|
+
|
|
2125
|
+
.vjs-fullscreen .vjs-record-indicator.vjs-control {
|
|
2126
|
+
bottom: 90px !important;
|
|
2127
|
+
}
|
|
2128
|
+
|
|
2129
|
+
.vjs-record.video-js div.vjs-control.vjs-record-indicator {
|
|
2130
|
+
padding: 0.3em 0.75em 0.15em 15px;
|
|
2131
|
+
align-items: center;
|
|
2132
|
+
font-size: 12px;
|
|
2133
|
+
color: #333;
|
|
2134
|
+
background: #FCFCFD;
|
|
2135
|
+
border-radius: 99px;
|
|
2136
|
+
text-align: center;
|
|
2137
|
+
border: 1px solid #E0E0EB;
|
|
2138
|
+
display: flex;
|
|
2139
|
+
justify-content: center;
|
|
2140
|
+
align-items: center;
|
|
2141
|
+
position: absolute;
|
|
2142
|
+
bottom: 75px;
|
|
2143
|
+
top: auto;
|
|
2144
|
+
left: calc(50% - 21px);
|
|
2145
|
+
width: 43px;
|
|
2146
|
+
height: 16px;
|
|
2147
|
+
z-index: 4;
|
|
2148
|
+
}
|
|
2149
|
+
|
|
2150
|
+
.vjs-record.video-js div.vjs-control.vjs-record-indicator:after {
|
|
2151
|
+
content: "";
|
|
2152
|
+
background-color: #EB5757;
|
|
2153
|
+
width: 6px;
|
|
2154
|
+
height: 6px;
|
|
2155
|
+
border-radius: 8px;
|
|
2156
|
+
animation: none;
|
|
2157
|
+
top: 4px;
|
|
2158
|
+
left: 5px;
|
|
2159
|
+
}
|
|
2160
|
+
|
|
2161
|
+
.vjs-record.video-js div.vjs-control.vjs-record-indicator:before {
|
|
2162
|
+
position: relative;
|
|
2163
|
+
font-size: 9px;
|
|
2164
|
+
animation: none;
|
|
2165
|
+
opacity: 1;
|
|
2166
|
+
color: #333;
|
|
2167
|
+
top: auto;
|
|
2168
|
+
left: auto;
|
|
2169
|
+
}
|
|
2170
|
+
|
|
2171
|
+
.ul-video-player-loading {
|
|
2172
|
+
display: inline-block;
|
|
2173
|
+
position: relative;
|
|
2174
|
+
width: 6rem;
|
|
2175
|
+
height: 6rem;
|
|
2176
|
+
|
|
2177
|
+
}
|
|
2178
|
+
.ul-video-player-loading div {
|
|
2179
|
+
box-sizing: border-box;
|
|
2180
|
+
position: absolute;
|
|
2181
|
+
display: block;
|
|
2182
|
+
width: 80%;
|
|
2183
|
+
height: 80%;
|
|
2184
|
+
margin: 5px;
|
|
2185
|
+
border: 5px solid #666;
|
|
2186
|
+
border-radius: 50%;
|
|
2187
|
+
animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
|
|
2188
|
+
border-color: #666 transparent transparent transparent;
|
|
2189
|
+
}
|
|
2190
|
+
|
|
2191
|
+
.first {
|
|
2192
|
+
animation-delay: -0.45s;
|
|
2193
|
+
}
|
|
2194
|
+
.second {
|
|
2195
|
+
animation-delay: -0.3s;
|
|
2196
|
+
}
|
|
2197
|
+
.third {
|
|
2198
|
+
animation-delay: -0.15s;
|
|
2199
|
+
}
|
|
2200
|
+
|
|
2201
|
+
@keyframes lds-ring {
|
|
2202
|
+
0% {
|
|
2203
|
+
transform: rotate(0deg);
|
|
2204
|
+
}
|
|
2205
|
+
100% {
|
|
2206
|
+
transform: rotate(360deg);
|
|
2207
|
+
}
|
|
2208
|
+
}
|
|
2209
|
+
|
|
2210
|
+
.ul-video-btn {
|
|
2211
|
+
width: 100%;
|
|
2212
|
+
border: 1px solid #E6E6E6;
|
|
2213
|
+
border-radius: 4px;
|
|
2214
|
+
background-color: rgba(0, 0, 0, 0.02);
|
|
2215
|
+
padding: 8px;
|
|
2216
|
+
font-weight: 500;
|
|
2217
|
+
font-size: 15px;
|
|
2218
|
+
}
|
|
2219
|
+
|
|
2220
|
+
.ul-record-response-btn:before, .ul-record-response-btn:after, .ul-back-question-btn:before, .ul-back-question-btn:after {
|
|
2221
|
+
margin: 0 5px;
|
|
2222
|
+
vertical-align: middle;
|
|
2223
|
+
}
|
|
2224
|
+
|
|
2225
|
+
.ul-record-response-btn:before {
|
|
2226
|
+
content: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_2645_4654)'%3E%3Cpath d='M15.1491 4.75L10.5991 8L15.1491 11.25V4.75Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M9.29912 3.4502H2.14912C1.43115 3.4502 0.849121 4.03223 0.849121 4.7502V11.2502C0.849121 11.9682 1.43115 12.5502 2.14912 12.5502H9.29912C10.0171 12.5502 10.5991 11.9682 10.5991 11.2502V4.7502C10.5991 4.03223 10.0171 3.4502 9.29912 3.4502Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_2645_4654'%3E%3Crect width='15.6' height='15.6' fill='white' transform='translate(0.199951 0.200195)'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E");
|
|
2227
|
+
display: inline-block;
|
|
2228
|
+
transform: translate(0px, 2px);
|
|
2229
|
+
}
|
|
2230
|
+
|
|
2231
|
+
.ul-record-response-btn:after {
|
|
2232
|
+
content: 'Record your Response';
|
|
2233
|
+
}
|
|
2234
|
+
|
|
2235
|
+
.ul-back-question-btn:before {
|
|
2236
|
+
content: url("data:image/svg+xml,%3Csvg width='15' height='16' viewBox='0 0 15 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.8757 8.22361L1.1118 14.6056C0.945578 14.6887 0.75 14.5678 0.75 14.382V1.61803C0.75 1.43219 0.945579 1.31131 1.1118 1.39443L13.8757 7.77639C14.06 7.86852 14.06 8.13148 13.8757 8.22361Z' stroke='black' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
|
|
2237
|
+
display: inline-block;
|
|
2238
|
+
transform: scale(0.85) translate(0, 1px);
|
|
2239
|
+
-moz-transform: scale(0.85) translate(0, 2px);
|
|
2240
|
+
}
|
|
2241
|
+
|
|
2242
|
+
.ul-back-question-btn:after {
|
|
2243
|
+
content: 'Back to Question';
|
|
2244
|
+
}
|
|
2245
|
+
|
|
2246
|
+
.hidden {
|
|
2247
|
+
display: none !important;
|
|
2248
|
+
opacity: 0;
|
|
2249
|
+
visibility: hidden;
|
|
2250
|
+
}
|
|
2251
|
+
|
|
2252
|
+
.visible {
|
|
2253
|
+
visibility: visible;
|
|
2254
|
+
opacity: 1;
|
|
2255
|
+
animation: fade 0.3s;
|
|
2256
|
+
}
|
|
2257
|
+
|
|
2258
|
+
@keyframes fade {
|
|
2259
|
+
0% {
|
|
2260
|
+
opacity: 0;
|
|
2261
|
+
}
|
|
2262
|
+
|
|
2263
|
+
100% {
|
|
2264
|
+
opacity: 1;
|
|
2265
|
+
}
|
|
2266
|
+
}
|
|
2267
|
+
|
|
2268
|
+
#ul-recording-countdown-screen {
|
|
2269
|
+
width: 100%;
|
|
2270
|
+
height: 100%;
|
|
2271
|
+
color: black;
|
|
2272
|
+
background-color: rgba(255, 255, 255, 0.8);
|
|
2273
|
+
position: absolute;
|
|
2274
|
+
text-align: center;
|
|
2275
|
+
font-size: 15px;
|
|
2276
|
+
z-index: 1;
|
|
2277
|
+
display: table;
|
|
2278
|
+
}
|
|
2279
|
+
|
|
2280
|
+
.ul-countdown-text {
|
|
2281
|
+
vertical-align: middle;
|
|
2282
|
+
display: table-cell;
|
|
2283
|
+
transform: translate(0, -25px);
|
|
2284
|
+
}
|
|
2285
|
+
|
|
2286
|
+
.vjs-fullscreen > #ul-recording-countdown-screen {
|
|
2287
|
+
font-size: 25px;
|
|
2288
|
+
transform: unset;
|
|
2289
|
+
}
|
|
2290
|
+
|
|
2291
|
+
.vjs-poster {
|
|
2292
|
+
background-size: cover;
|
|
2293
|
+
}
|
|
2294
|
+
` }], qr = "-video-player", xn = "-secondary-video-player", kn = "-video-recorder";
|
|
2295
|
+
let se, wn;
|
|
2296
|
+
const fe = async ({ event: e, apiBase: t, headers: n, visitorId: r, envId: o, metadata: i }) => {
|
|
2297
|
+
const s = N.document.documentElement;
|
|
2298
|
+
if (!r || !o)
|
|
2299
|
+
return;
|
|
2300
|
+
const d = { event: `SDK - ${e}`, visitorId: r, environmentId: o, metadata: { ...i || {}, screenWidth: window.screen.width, screenHeight: window.screen.height, clientWidth: s.clientWidth, clientHeight: s.clientHeight, location: window.location.href, language: navigator.language } };
|
|
2301
|
+
(await fetch(`${t}/sdk/1/visitors/${r}/analytics`, { method: "POST", cache: "no-cache", headers: n, body: JSON.stringify(d) })).ok || console.warn("[Sprig] (ERR-444) Failed to track analytics", e);
|
|
2302
|
+
}, ce = async (e, t, n, r, o, i) => {
|
|
2303
|
+
fe({ event: `Video Error ${t}`, apiBase: n, headers: r, visitorId: o, envId: i, metadata: { errorMessage: e.message } });
|
|
2304
|
+
const s = N.document.documentElement, d = { screenWidth: window.screen.width, screenHeight: window.screen.height, clientWidth: s.clientWidth, clientHeight: s.clientHeight, location: window.location.href, language: navigator.language }, l = { action: t, err: { message: e.message, stack: e.stack }, meta: d, vid: o, envId: i };
|
|
2305
|
+
(await fetch(`${n}/sdk/1/errors`, { method: "POST", cache: "no-cache", headers: { ...r, "userleap-platform": "video_recorder", "x-ul-error": window.btoa(`userleap-${Date.now()}-error`) }, body: JSON.stringify(l) })).ok || console.warn("[Sprig] (ERR-444) Failed to report error to API", e);
|
|
2306
|
+
}, Vr = (e, t) => {
|
|
2307
|
+
if (e.length === 0)
|
|
2308
|
+
return t && t();
|
|
2309
|
+
Promise.all(e.reduce((n, r) => (n.push(((o, { type: i, content: s }) => new Promise(function(d, l) {
|
|
2310
|
+
let p;
|
|
2311
|
+
i === "script" ? (p = N.document.createElement("script"), p.src = s) : i === "link" ? (p = N.document.createElement("link"), p.rel = "stylesheet", p.href = s, p.type = "text/css") : (p = N.document.createElement("style"), p.innerHTML = s), p.onload = function() {
|
|
2312
|
+
d(s);
|
|
2313
|
+
}, p.onerror = function() {
|
|
2314
|
+
l(s);
|
|
2315
|
+
}, p.async = !1, p.id = btoa(s), o.appendChild(p);
|
|
2316
|
+
}))(N.document.head, r)), n), [])).then(() => {
|
|
2317
|
+
N.videojs = N.document.defaultView.videojs, t && t();
|
|
2318
|
+
}).catch(function(n) {
|
|
2319
|
+
console.log(n + " failed to load");
|
|
2320
|
+
});
|
|
2321
|
+
}, Cn = (e, t, n) => {
|
|
2322
|
+
if (t === "start" && (e.style.visibility = "visible"), t === "none")
|
|
2323
|
+
e.style.visibility = J;
|
|
2324
|
+
else if (t === "success")
|
|
2325
|
+
e.style.visibility = J, e.innerHTML = "Upload succeeded!";
|
|
2326
|
+
else {
|
|
2327
|
+
const r = Math.round(parseFloat(n));
|
|
2328
|
+
e.innerHTML = `Uploading <span class="ul-upload-progress-label__time">${r}%</span>`, e.style.background = `linear-gradient(to right, #E0E0EB 0%, #E0E0EB ${r}%, #FCFCFD ${r}%, #FCFCFD 100%)`;
|
|
2329
|
+
}
|
|
2330
|
+
}, ut = (e, t) => {
|
|
2331
|
+
const n = N.videojs(e.id());
|
|
2332
|
+
return n == null ? void 0 : n.payload[t];
|
|
2333
|
+
}, zr = (e, t) => {
|
|
2334
|
+
const n = new (N.videojs.getComponent("Component"))(e);
|
|
2335
|
+
return n.addClass("ul-buttons-panel"), t.map((r) => {
|
|
2336
|
+
n.addChild(r);
|
|
2337
|
+
}), Si(n), n;
|
|
2338
|
+
}, Si = (e) => {
|
|
2339
|
+
e.children().forEach((t) => {
|
|
2340
|
+
if (re[t.name_]) {
|
|
2341
|
+
const n = $e(re[t.name_], `ul-${re[t.name_]}`);
|
|
2342
|
+
t.el_.appendChild(n);
|
|
2343
|
+
}
|
|
2344
|
+
});
|
|
2345
|
+
}, $e = (e, t = "") => {
|
|
2346
|
+
const n = N.document.createElement("span");
|
|
2347
|
+
return n.className = "ul-button-text", n.innerHTML = e, n.id = t, n;
|
|
2348
|
+
}, $r = (e, t, n, r, o = !1, i) => {
|
|
2349
|
+
e.addClass("ul-video-player");
|
|
2350
|
+
const s = new (N.videojs.getComponent("Component"))(e);
|
|
2351
|
+
s.addClass("ul-control-panel"), e.progressBar = s.addChild("ProgressControl"), n && e.src(n), e.audioPlayerPlaceholder = new (N.videojs.getComponent("Component"))(e), e.audioPlayerPlaceholder.addClass("ul-audio-recorder-placeholder");
|
|
2352
|
+
const d = n && n.src ? Pi(n.src) : null;
|
|
2353
|
+
!n || !o && d ? (e.audioPlayerPlaceholder.hide(), N.document.getElementById(`${e.id()}_html5_api`).style.height = "100%", d && e.poster(d)) : (e.children()[0].classList.add("vjs-hidden"), N.document.getElementById(`${e.id()}_html5_api`).style.height = "0px"), e.on("play", () => {
|
|
2354
|
+
o || !n || d || Ii(e), i == null || i.play();
|
|
2355
|
+
}), e.on("pause", () => {
|
|
2356
|
+
i == null || i.pause();
|
|
2357
|
+
}), e.on("seeked", () => {
|
|
2358
|
+
i == null || i.currentTime(e.currentTime());
|
|
2359
|
+
}), e.on("ratechange", () => {
|
|
2360
|
+
i == null || i.playbackRate(e.playbackRate());
|
|
2361
|
+
}), e.addChild(e.audioPlayerPlaceholder, {}, 1), s.addChild(t), e.addChild(s), r && r(e);
|
|
2362
|
+
}, ji = (e, t, n, r, o, i, s, d = !1) => {
|
|
2363
|
+
wn = Date.now();
|
|
2364
|
+
const l = Je(t, { controls: !1, bigPlayButton: !1, fluid: !1, width: 1280, height: 720, playsinline: !0, plugins: { record: { audio: !0, video: { mandatory: { minWidth: 1280, minHeight: 720 } }, frameWidth: 1280, frameHeight: 720, maxLength: 600, autoMuteDevice: !0 } } });
|
|
2365
|
+
if (!l)
|
|
2366
|
+
return;
|
|
2367
|
+
l.payload = n;
|
|
2368
|
+
const { surveyId: p, questionId: h, responseGroupUid: c, visitorId: u, envId: m } = n;
|
|
2369
|
+
let f;
|
|
2370
|
+
const b = (v) => {
|
|
2371
|
+
const E = dt, I = dt + "-audio-only";
|
|
2372
|
+
Cn(l.uploadProgressLabel, "none"), se && se.startTime >= wn && se.abort();
|
|
2373
|
+
const O = N.document.getElementById("ul-camera-button");
|
|
2374
|
+
v ? (l.children()[0].classList.add("vjs-hidden"), T.removeClass(E), T.addClass(I), O.innerHTML = re.TurnOnCamera, l.audioPlayerPlaceholder.removeClass("vjs-hidden"), f == null || f.getTracks().forEach((C) => {
|
|
2375
|
+
C.stop();
|
|
2376
|
+
}), window.navigator.mediaDevices.getUserMedia({ video: !0, audio: !0 }).then((C) => {
|
|
2377
|
+
f = C, C.getVideoTracks().forEach((M) => {
|
|
2378
|
+
M.enabled = !1;
|
|
2379
|
+
}), l.record().onDeviceReady(C);
|
|
2380
|
+
}).catch(l.record().onDeviceError.bind(l.record()))) : (f == null || f.getVideoTracks().forEach((C) => {
|
|
2381
|
+
C.enabled = !0;
|
|
2382
|
+
}), l.children()[0].classList.remove("vjs-hidden"), l.record().getDevice(), T.removeClass(I), T.addClass(E), O.innerHTML = re.TurnOffCamera, l.audioPlayerPlaceholder.addClass("vjs-hidden"));
|
|
2383
|
+
}, _ = new (N.videojs.getComponent("Button"))(l, { clickHandler: () => {
|
|
2384
|
+
_.hasClass(J) || (fe({ event: "Video Delete Button Clicked", apiBase: r, headers: s, visitorId: u, envId: m, metadata: { questionId: h, responseGroupUid: c, surveyId: p } }), b(l.cameraOff), o(U.DELETE, {}), T.removeClass(J), _.addClass(J));
|
|
2385
|
+
} });
|
|
2386
|
+
_.addClass("ul-video-recorder-delete-button"), _.el_.appendChild($e(re.DeleteButton, "ul-delete-button"));
|
|
2387
|
+
const y = N.document.getElementById(t), x = () => {
|
|
2388
|
+
y.classList.contains("vjs-fullscreen") && l.cameraOff ? y.style.display = "table" : y.style.display = "flex";
|
|
2389
|
+
};
|
|
2390
|
+
x();
|
|
2391
|
+
const T = new (N.videojs.getComponent("Button"))(l, { clickHandler: () => {
|
|
2392
|
+
l.record().isRecording() || (l.cameraOff = !l.cameraOff, fe({ event: "Video Camera Button Clicked", apiBase: r, headers: s, visitorId: n.visitorId, envId: n.envId, metadata: { questionId: h, responseGroupUid: c, surveyId: p, cameraOff: l.cameraOff } }), b(l.cameraOff), !_.hasClass(J) && _.addClass(J), o(U.DELETE, {}), x());
|
|
2393
|
+
} });
|
|
2394
|
+
T.addClass(dt), T.el_.appendChild($e(re.TurnOffCamera, "ul-camera-button"));
|
|
2395
|
+
const S = new (N.videojs.getComponent("Button"))(l, { clickHandler: () => {
|
|
2396
|
+
const v = N.document.getElementById("ul-recorder-toggle");
|
|
2397
|
+
if (l.record().isRecording())
|
|
2398
|
+
l.record().stop(), v && (v.innerHTML = re.RecordButton), S.removeClass(ct), _.removeClass(J);
|
|
2399
|
+
else {
|
|
2400
|
+
const E = N.document.getElementById("ul-recording-countdown-screen");
|
|
2401
|
+
if (E)
|
|
2402
|
+
E.remove(), v && (v.innerHTML = re.RecordButton), b(l.cameraOff), o(U.DELETE, {}), T.removeClass(J), _.addClass(J), S.removeClass(ct), j.show();
|
|
2403
|
+
else {
|
|
2404
|
+
S.addClass(ct), j.hide(), T.addClass(J), _.addClass(J), v && (v.innerHTML = re.StopButton);
|
|
2405
|
+
const I = N.document.createElement("div");
|
|
2406
|
+
I.id = "ul-recording-countdown-screen", y.insertBefore(I, y.children[1]), I.style.height = `${y.offsetHeight}px`, Fr(l, 3);
|
|
2407
|
+
}
|
|
2408
|
+
}
|
|
2409
|
+
} });
|
|
2410
|
+
S.addClass("ul-video-recorder-toggle-button"), S.el_.appendChild($e(re.RecordButton, "ul-recorder-toggle"));
|
|
2411
|
+
const w = N.document.createElement("p");
|
|
2412
|
+
w.style.visibility = "hidden", w.className = "ul-upload-progress-label", e.appendChild(w), l.uploadProgressLabel = w;
|
|
2413
|
+
const k = zr(l, [_, T, "PlayToggle", S, "FullscreenToggle"]), j = k.children().find((v) => v.name_ === "FullscreenToggle");
|
|
2414
|
+
j.hasClass("vjs-disabled") && j.hide();
|
|
2415
|
+
const P = k.children().find((v) => v.name_ === "PlayToggle");
|
|
2416
|
+
P.hide(), _.addClass(J), $r(l, k, i, !1, d), l.on("stopRecord", () => {
|
|
2417
|
+
S.hide(), P.show(), j.show(), _.removeClass(J);
|
|
2418
|
+
}), l.on("deviceReady", () => {
|
|
2419
|
+
S.show(), P.hide(), _.addClass(J);
|
|
2420
|
+
}), ((v, E, I, O, C) => {
|
|
2421
|
+
const { surveyId: M, responseGroupUid: A, visitorId: H, envId: q } = v.payload;
|
|
2422
|
+
v.on("deviceError", function() {
|
|
2423
|
+
console.warn("device error: ", v.deviceErrorCode), v.deviceErrorCode.message === "Permission denied" ? (v.deviceButton.addClass("permission-denied"), I && I(U.ERROR, { type: U.PERMISSION_DENIED }), fe({ event: "Video Permission Denied", apiBase: E, headers: C, visitorId: H, envId: q, metadata: { questionId: ut(v, lt), responseGroupUid: A, surveyId: M } })) : (I && I(U.ERROR, { type: U.OTHER }), ce(new Error(v.deviceErrorCode.message), "recorderDeviceError", E, C, H, q));
|
|
2424
|
+
}), v.on("error", function(R, W) {
|
|
2425
|
+
ce(W || v.error(), "recorderError", E, C, H, q);
|
|
2426
|
+
}), v.on("startRecord", function(R, W) {
|
|
2427
|
+
O(v.uploadProgressLabel, "none"), fe({ event: "Video Record Start", apiBase: E, headers: C, visitorId: H, envId: q, metadata: { questionId: ut(v, lt), responseGroupUid: A, surveyId: M } });
|
|
2428
|
+
}), v.on("finishRecord", async function() {
|
|
2429
|
+
O(v.uploadProgressLabel, "start", 0);
|
|
2430
|
+
const R = ut(v, lt);
|
|
2431
|
+
if (!M) {
|
|
2432
|
+
const Q = "internal error: missing fields in payload";
|
|
2433
|
+
return I && I(U.ERROR, { type: U.OTHER }), ce(new Error(Q), "finishRecord", E, C, H, q), null;
|
|
2434
|
+
}
|
|
2435
|
+
v.record().stopDevice();
|
|
2436
|
+
const W = v.cameraOff ? U.MEDIA_TYPE_AUDIO : U.MEDIA_TYPE_VIDEO, Y = mt();
|
|
2437
|
+
fe({ event: "Video Record Finish", apiBase: E, headers: C, visitorId: H, envId: q, metadata: { mediaRecordingUid: Y, questionId: R, responseGroupUid: A, surveyId: M, mediaType: W } });
|
|
2438
|
+
const le = { surveyId: M, updatedAt: (/* @__PURE__ */ new Date()).toISOString(), mediaType: W, mediaRecordingUid: Y };
|
|
2439
|
+
R && (le.questionId = R), A && (le.responseGroupUid = A), H && (le.visitorId = H);
|
|
2440
|
+
const F = await (async () => {
|
|
2441
|
+
const Q = await fetch(`${E}/2/environments/integrations/upload`, { method: "POST", cache: "no-cache", headers: { "Content-Type": "application/json" }, body: JSON.stringify(le) });
|
|
2442
|
+
if (Q.ok) {
|
|
2443
|
+
const be = await Q.json();
|
|
2444
|
+
return I && I(U.UPLOAD_STARTED, { [U.UPLOAD_ID]: be.upload.id, [U.MEDIA_TYPE]: W, [U.MEDIA_RECORDING_UID]: Y }), be.upload.url;
|
|
2445
|
+
}
|
|
2446
|
+
return I && I(U.ERROR, { type: U.OTHER, response: Q }), ce(new Error("failed to get upload response with url"), "finishRecord", E, C, H, q), null;
|
|
2447
|
+
})();
|
|
2448
|
+
F && (se = N.document.defaultView.UpChunk.createUpload({ endpoint: F, file: new N.document.defaultView.File([v.recordedData], `recording ${W} ${Date.now()}`), chunkSize: 5120 }), se.startTime = Date.now(), fe({ event: "Video Upload Start", apiBase: E, headers: C, visitorId: H, envId: q, metadata: { mediaRecordingUid: Y, questionId: R, responseGroupUid: A, surveyId: M, mediaType: W, url: F } }), se.on("error", (Q) => {
|
|
2449
|
+
O(v.uploadProgressLabel, "none"), I && I(U.UPLOAD_FINISHED, { [U.MEDIA_RECORDING_UID]: Y }), ce(Q, "finishRecord", E, C, H, q);
|
|
2450
|
+
}), se.on("progress", (Q) => {
|
|
2451
|
+
I && I(U.UPLOAD_PROGRESS, { [U.MEDIA_RECORDING_UID]: Y, [U.UPLOAD_PROGRESS_PCT]: Q.detail }), O(v.uploadProgressLabel, "progress", Q.detail);
|
|
2452
|
+
}), se.on("success", () => {
|
|
2453
|
+
O(v.uploadProgressLabel, "success"), I && I(U.UPLOAD_FINISHED, { [U.MEDIA_RECORDING_UID]: Y }), fe({ event: "Video Upload Success", apiBase: E, headers: C, visitorId: H, envId: q, metadata: { mediaRecordingUid: Y, questionId: R, responseGroupUid: A, surveyId: M, mediaType: W, url: F, elapsedMs: se.startTime && Date.now() - se.startTime } });
|
|
2454
|
+
}));
|
|
2455
|
+
});
|
|
2456
|
+
})(l, r, o, Cn, s);
|
|
2457
|
+
const g = [{ name: "microphone" }];
|
|
2458
|
+
!l.cameraOff && g.push({ name: "camera" }), Promise.all(g.map((v) => {
|
|
2459
|
+
var E;
|
|
2460
|
+
return (E = navigator == null ? void 0 : navigator.permissions) == null ? void 0 : E.query(v);
|
|
2461
|
+
})).then((v) => {
|
|
2462
|
+
v.reduce((E, I) => E & I.state === "granted", !0) && l && (l.deviceButton && l.deviceButton.hide(), l.record().getDevice());
|
|
2463
|
+
}).catch((v) => {
|
|
2464
|
+
});
|
|
2465
|
+
}, Fr = (e, t = 3) => {
|
|
2466
|
+
const n = N.document.getElementById("ul-recording-countdown-screen");
|
|
2467
|
+
n && t === 0 ? (n.remove(), e.record().start()) : n && (n.innerHTML = `<span class='ul-countdown-text'>Recording in... ${t}</span>`, setTimeout(() => {
|
|
2468
|
+
Fr(e, t - 1);
|
|
2469
|
+
}, 1e3));
|
|
2470
|
+
}, Wr = (e) => {
|
|
2471
|
+
const t = N.document.createElement("div");
|
|
2472
|
+
return t.className = "ul-video-container", t.appendChild(((n) => {
|
|
2473
|
+
const r = N.document.createElement("div");
|
|
2474
|
+
return r.className = "ul-video-player-loading", r.id = Ut(n), ["first", "second", "third", "fourth"].map((o) => {
|
|
2475
|
+
const i = N.document.createElement("div");
|
|
2476
|
+
i.className = o, r.appendChild(i);
|
|
2477
|
+
}), r;
|
|
2478
|
+
})(e)), t;
|
|
2479
|
+
}, wt = (e, t) => {
|
|
2480
|
+
const n = N.document.createElement("video");
|
|
2481
|
+
n.id = e, n.className = "video-js vjs-default-skin ul-video-player-video";
|
|
2482
|
+
const r = N.document.createElement("p");
|
|
2483
|
+
r.className = "vjs-no-js", r.innerHTML = "To view this video please enable JavaScript, and consider upgrading to a web browser that";
|
|
2484
|
+
const o = N.document.createElement("a");
|
|
2485
|
+
return o.href = "https://videojs.com/html5-video-support/", o.target = "_blank", o.innerHTML = "supports HTML5 video", r.appendChild(o), n.appendChild(r), t.appendChild(n), t;
|
|
2486
|
+
}, Ii = (e, t) => {
|
|
2487
|
+
e.children()[0].classList.remove("vjs-hidden"), e.audioPlayerPlaceholder.hide(), N.document.getElementById(`${e.id()}_html5_api`).style.height = "100%";
|
|
2488
|
+
}, Je = (e, t) => N.document.getElementById(e) ? t ? N.videojs(e, t) : N.videojs(e) : (console.error(`Error in finding player element with ID, ${e}`), null), Ti = (e, t, n, r = !1, o = "https://api.sprig.com", i = document, s = null, d = null) => {
|
|
2489
|
+
N.document = i;
|
|
2490
|
+
const l = e + qr, p = Wr(l);
|
|
2491
|
+
return N.document.addEventListener("securitypolicyviolation", (h) => {
|
|
2492
|
+
ce(new Error(`Voice & Video feature violates ${h.violatedDirective} web page CSP policies for the question player.`), "playerDeviceError", o, {});
|
|
2493
|
+
}), Vr(Br, () => {
|
|
2494
|
+
N.document.getElementById(Ut(l)).remove(), wt(l, p);
|
|
2495
|
+
const h = { playsinline: !0, playbackRates: [0.5, 1, 1.5, 2], fill: !0 };
|
|
2496
|
+
try {
|
|
2497
|
+
const c = e + xn;
|
|
2498
|
+
wt(c, p);
|
|
2499
|
+
const u = Je(l, h), m = Je(c, { muted: !0, ...h });
|
|
2500
|
+
if (!u || !m)
|
|
2501
|
+
return;
|
|
2502
|
+
((_, y, x) => {
|
|
2503
|
+
_.addClass(`ul${xn}`);
|
|
2504
|
+
const T = new (N.videojs.getComponent("Component"))(_);
|
|
2505
|
+
y && _.src(y), _.addChild(T), x && x(_);
|
|
2506
|
+
})(m, s, d), s || m.addClass(J);
|
|
2507
|
+
const f = zr(u, ["PlaybackRateMenuButton", "PlayToggle", "FullscreenToggle"]), b = f.children().find((_) => _.name_ === "FullscreenToggle");
|
|
2508
|
+
b.hasClass("vjs-disabled") && b.hide(), $r(u, f, t, n, r, m);
|
|
2509
|
+
} catch (c) {
|
|
2510
|
+
return void ce(new Error(`Error when creating video player object ${c}`), "playerDeviceError", o, {});
|
|
2511
|
+
}
|
|
2512
|
+
}), p;
|
|
2513
|
+
}, Pi = (e) => {
|
|
2514
|
+
if (!e)
|
|
2515
|
+
return null;
|
|
2516
|
+
const t = e.match(/https:\/\/stream.mux.com\/(.*)/);
|
|
2517
|
+
let n = t ? t[1] : null;
|
|
2518
|
+
return n.includes(yn) && (n = n.replace(yn, "")), n ? `https://image.mux.com/${n}/thumbnail.jpg?time=0` : null;
|
|
2519
|
+
}, U = { UPLOAD_STARTED: "upload.started", UPLOAD_PROGRESS: "upload.progress", UPLOAD_FINISHED: "upload.finished", DELETE: "delete", ERROR: "error", MEDIA_TYPE: "media.type", PERMISSION_DENIED: "permission_denied", OTHER: "other", UPLOAD_ID: "upload.id", UPLOAD_PROGRESS_PCT: "upload.progress.pct", MEDIA_RECORDING_UID: "media.recording.uid", MEDIA_TYPE_VIDEO: "video", MEDIA_TYPE_AUDIO: "audio" }, re = { PlaybackRateMenuButton: "Speed", PlayToggle: "Play", FullscreenToggle: "Expand", TurnOnCamera: "Turn on", TurnOffCamera: "Turn off", DeleteButton: "Delete", RecordButton: "Record", StopButton: "Stop", PauseButton: "Pause" }, ye = "ul-card-video__player_recorder", En = "ul-video-btn", pt = 0, Sn = 1, Di = ({ className: e, message: t, next: n, properties: r, questionId: o, type: i }) => {
|
|
2520
|
+
const { apiURL: s, envId: d, handleUploadUpdate: l, headers: p, responseGroupUid: h, surveyId: c, viewDocument: u, visitorId: m } = B((g) => ({ apiURL: g.apiURL, envId: g.envId, handleUploadUpdate: g.handleUploadUpdate, headers: g.headers, responseGroupUid: g.responseGroupUid, surveyId: g.surveyId, viewDocument: g.viewDocument, visitorId: g.userId })), [f, b] = $(!1), [_, y] = $(null), [x, T] = $(null), [S, w] = $(pt), k = r && r.videoUrl, j = (g, v) => {
|
|
2521
|
+
g === U.UPLOAD_STARTED ? (y(v[U.UPLOAD_ID]), T(v[U.MEDIA_RECORDING_UID]), b(!0)) : g === U.DELETE ? (y(null), T(null), b(!1)) : g === U.UPLOAD_PROGRESS ? isNaN(v[U.UPLOAD_PROGRESS_PCT]) ? l({ mediaRecordingUid: v[U.MEDIA_RECORDING_UID], isComplete: !0 }) : l({ mediaRecordingUid: v[U.MEDIA_RECORDING_UID], progressPct: v[U.UPLOAD_PROGRESS_PCT] }) : g === U.UPLOAD_FINISHED && l({ mediaRecordingUid: v[U.MEDIA_RECORDING_UID], isComplete: !0 });
|
|
2522
|
+
}, P = (g) => {
|
|
2523
|
+
g.preventDefault(), g.stopPropagation(), document.getElementById(ye) && ((v) => {
|
|
2524
|
+
const E = v + kn;
|
|
2525
|
+
if (N.document.getElementById(E) && N.videojs) {
|
|
2526
|
+
try {
|
|
2527
|
+
if (!N.videojs(E).record().stream)
|
|
2528
|
+
return;
|
|
2529
|
+
} catch {
|
|
2530
|
+
return;
|
|
2531
|
+
}
|
|
2532
|
+
N.videojs(E).record().stop(), N.videojs(E).record().stopDevice();
|
|
2533
|
+
}
|
|
2534
|
+
})(ye), _ && x ? (l({ mediaRecordingUid: x, isSubmitted: !0 }), n({ value: { mediaRecordingUid: x }, questionId: o, type: i })) : n({ value: null, questionId: o, type: i });
|
|
2535
|
+
};
|
|
2536
|
+
return a("form", { className: L(e, "ul-card--video", "fade-in-transition"), id: "ul-video-interview-form", children: [a(ie, { message: t, properties: r }), a(ge, { children: [a("div", { id: "ul-question-player-container", style: { display: S === pt ? "" : "none" }, children: [a("div", { id: ye, ref: (g) => {
|
|
2537
|
+
if (g && g.children.length === 0 && !r.hideRecordedPrompt) {
|
|
2538
|
+
const v = Ti(ye, { src: k, type: "application/x-mpegURL" }, void 0, r.mediaType === U.MEDIA_TYPE_AUDIO, s, u);
|
|
2539
|
+
g.appendChild(v);
|
|
2540
|
+
}
|
|
2541
|
+
} }), a(me, { defaultBody: () => a("button", { className: `${En} ul-record-response-btn`, onClick: (g) => {
|
|
2542
|
+
g.preventDefault(), g.stopPropagation(), document.getElementById(ye) && ((v) => {
|
|
2543
|
+
const E = Je(v + qr);
|
|
2544
|
+
E == null || E.pause();
|
|
2545
|
+
})(ye), w(Sn);
|
|
2546
|
+
} }), properties: r })] }), a("div", { style: { display: S === Sn ? "block" : "none" }, children: [a("button", { className: `${En} ul-back-question-btn`, onClick: (g) => {
|
|
2547
|
+
g.preventDefault(), g.stopPropagation(), w(pt);
|
|
2548
|
+
}, style: { display: r.hideRecordedPrompt ? "none" : "block" } }), a("div", { id: "ul-recorder-player-container", ref: (g) => {
|
|
2549
|
+
if (g && g.children.length === 0) {
|
|
2550
|
+
const v = ((E, I = {}, O = "https://api.userleap.com", C, M, A, H = !1, q = document) => {
|
|
2551
|
+
N.document = q;
|
|
2552
|
+
const R = E + kn, W = Wr(R);
|
|
2553
|
+
return N.document.addEventListener("securitypolicyviolation", (Y) => {
|
|
2554
|
+
ce(new Error(`Voice & Video feature violates ${Y.violatedDirective} web page CSP policies for the recorder player.`), "recorderDeviceError", O, A, I.visitorId, I.envId);
|
|
2555
|
+
}), Vr(Br.concat(Ei), () => {
|
|
2556
|
+
wt(R, W), N.document.getElementById(Ut(R)).remove();
|
|
2557
|
+
try {
|
|
2558
|
+
ji(W, R, I, O, C, M, A, H);
|
|
2559
|
+
} catch (Y) {
|
|
2560
|
+
return void ce(new Error(`Error when creating video recorder player object ${Y}`), "recorderDeviceError", O, A, I.visitorId, I.envId);
|
|
2561
|
+
}
|
|
2562
|
+
}), W;
|
|
2563
|
+
})(ye, { surveyId: c, responseGroupUid: h, questionId: o, visitorId: m, envId: d }, s, j, void 0, { ...p, "x-ul-video-recorder-origin": "sdk" }, r.mediaType === U.MEDIA_TYPE_AUDIO, u);
|
|
2564
|
+
g.appendChild(v);
|
|
2565
|
+
}
|
|
2566
|
+
} })] })] }), a(_e, { children: [a(X, { disabled: !f, onClick: P, children: Ce(r) }), a("button", { className: "ul-card-text__button ul-button-inactive ul-card-skip__button", id: "ul-card-video__skip_button", onClick: P, style: { display: r.required ? "none" : "block", ...f ? { display: "none" } : {} }, children: Mt(r) })] })] });
|
|
2567
|
+
}, Ri = ({ className: e }) => {
|
|
2568
|
+
const { uploadProgress: t } = B((i) => ({ uploadProgress: i.uploadProgress }));
|
|
2569
|
+
let n, r;
|
|
2570
|
+
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.");
|
|
2571
|
+
const o = Math.round(Math.min(99, ...Object.values(t).filter((i) => i.isSubmitted).map((i) => i.progressPct || 0)));
|
|
2572
|
+
return a("div", { className: L(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(ie, { message: `${n} (${o}% complete)` }), a("p", { className: "ul-caption", children: r })] });
|
|
2573
|
+
}, jn = ({ 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" })] }), Ni = () => {
|
|
2574
|
+
const { border: e, cards: t, forceBrandedLogo: n, headers: r, index: o, marketingUrl: i, showSurveyBrand: s, slugName: d, surveyId: l, viewedCardCount: p } = B((y) => ({ border: y.border, cards: y.cards, forceBrandedLogo: y.forceBrandedLogo, headers: y.headers, index: y.index, marketingUrl: y.marketingUrl, showSurveyBrand: y.showSurveyBrand, slugName: y.slugName, surveyId: y.surveyId, viewedCardCount: y.viewedCardCount })), h = ee(null), c = t.filter((y) => y.type !== "uploading" && y.type !== "thanks"), u = ((y, x) => {
|
|
2575
|
+
const T = /* @__PURE__ */ new Set(["thanks", "uploading"]);
|
|
2576
|
+
if (x >= y.length || x < 0 || T.has(y[x].type))
|
|
2577
|
+
return 0;
|
|
2578
|
+
const S = y.filter((k) => !T.has(k.type));
|
|
2579
|
+
if (x === S.length - 1)
|
|
2580
|
+
return 1;
|
|
2581
|
+
const w = { [S.length - 1]: 1, [-1]: 0 };
|
|
2582
|
+
for (let k = S.length - 2; k >= x; k--) {
|
|
2583
|
+
const j = S[k], P = Fo(k, j.props.routingOptions);
|
|
2584
|
+
if (P.length === 0) {
|
|
2585
|
+
w[k] = w[k + 1] + 1;
|
|
2586
|
+
continue;
|
|
2587
|
+
}
|
|
2588
|
+
let g = 0, v = Vo(j);
|
|
2589
|
+
if (v === null)
|
|
2590
|
+
return S.length - 1 - x;
|
|
2591
|
+
for (let E = 0; E < P.length && v.length !== 0; E++) {
|
|
2592
|
+
const { comparator: I, target: O, value: C } = P[E], M = v.filter((A) => {
|
|
2593
|
+
const H = qo({ value: A }, j.type, A), q = wr(A, j.type);
|
|
2594
|
+
return !(H && I === "answered" || q && I === "partial" || !H && !q && I === "skipped" || I === "given_up" && $o(A) && A.taskStatus === "given.up" || H && j.type === "open" && (I === "contains" || I === "notcontains") || H && zo(I) && Nt[I](A, C));
|
|
2595
|
+
});
|
|
2596
|
+
if (M.length < v.length) {
|
|
2597
|
+
const A = parseInt(String(O), 10);
|
|
2598
|
+
if (A !== -1 && A <= k || A >= S.length)
|
|
2599
|
+
return S.length - 1 - x;
|
|
2600
|
+
g = Math.max(w[A] + 1, g);
|
|
2601
|
+
}
|
|
2602
|
+
v = M;
|
|
2603
|
+
}
|
|
2604
|
+
v.length > 0 && (g = Math.max(w[k + 1] + 1, g)), w[k] = g;
|
|
2605
|
+
}
|
|
2606
|
+
return w[x];
|
|
2607
|
+
})(t, o), m = p + 1, f = m / (m + u), b = `${i}?utm_source=survey_branding&utm_medium=website&utm_campaign=${d}&utm_content=${l}${n && "&utm_term=poweredby_pill"}`;
|
|
2608
|
+
G(() => {
|
|
2609
|
+
h.current && (h.current.style.width = 100 * f + "%");
|
|
2610
|
+
}, [f]);
|
|
2611
|
+
const _ = t[o].type === "thanks";
|
|
2612
|
+
return a("footer", { className: "ul-footer " + (r["userleap-platform"] === "link" ? "ul-footer__link" : ""), children: _ && n ? a("a", { dir: "ltr", href: b, rel: "noreferrer", target: "_blank", children: a("div", { className: "thank-you-card-link", children: [a("div", { className: "sprig-box-logo", children: a(jn, { logoOnly: !0, style: { margin: "auto" } }) }), a("div", { children: a("p", { children: ["Capture insights about your own product", a(In, { style: { display: "inline-flex", marginInlineStart: "4px", verticalAlign: "middle" } })] }) })] }) }) : a(K, { children: [c.length > 1 && a("div", { id: "ul-progress-bar-container", children: a("div", { id: "ul-progress-bar-current", ref: h, style: { border: `1px solid ${e || "#000"}` } }) }), s ? a("div", { className: n ? "yellow-footer-logo" : "", style: { marginTop: "4px", marginBottom: "4px" }, children: a("a", { href: b, rel: "noreferrer", target: "_blank", children: a("div", { style: { display: "flex" }, children: [a(jn, { logoOnly: !1 }), n && a(In, { style: { display: "block", margin: "auto 0 auto 4px", transform: "rotateY(0deg) rotate(-45deg)" } })] }) }) }) : null] }) });
|
|
2613
|
+
}, In = ({ style: e }) => 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: "black", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.35" }), a("path", { d: "M7.0686 1.15845L10.9386 5.20845L7.0686 9.25845", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.35" })] }), Mi = () => {
|
|
2614
|
+
const { answers: e, border: t, cards: n, close: r, configureExitOnOverlayClick: o, destroy: i, endCard: s, eventEmitFn: d, fontFamily: l, headers: p, index: h, minScrollableHeight: c, next: u, previewMode: m, productConfig: f, seen: b, showStripes: _, studyType: y, surveyId: x, update: T, useMobileStyling: S, viewDocument: w } = B((C) => ({ answers: C.answers, border: C.border, cards: C.cards, close: C.close, configureExitOnOverlayClick: C.configureExitOnOverlayClick, destroy: C.destroy, endCard: C.endCard, eventEmitFn: C.eventEmitFn, fontFamily: C.fontFamily, headers: C.headers, index: C.index, previewMode: C.previewMode, productConfig: C.productConfig, minScrollableHeight: C.minScrollableHeight, next: C.next, seen: C.seen, showStripes: C.showStripes, studyType: C.studyType, surveyId: C.surveyId, update: C.update, useMobileStyling: C.useMobileStyling, viewDocument: C.viewDocument })), k = ee(null), j = ee(!1), P = p["userleap-platform"], { props: g, type: v, name: E } = n[h];
|
|
2615
|
+
G(() => {
|
|
2616
|
+
k.current && (k.current.classList.contains("ul-app--visible") || k.current.classList.add("ul-app--visible"), !j.current && d && (j.current = !0, d(ve.SurveyAppeared, { name: ve.SurveyAppeared, "survey.id": x })));
|
|
2617
|
+
}, [d, x]), G(() => {
|
|
2618
|
+
const C = () => {
|
|
2619
|
+
w.visibilityState === "visible" && (b(), w.removeEventListener("visibilitychange", C));
|
|
2620
|
+
};
|
|
2621
|
+
return w.addEventListener("visibilitychange", C), C(), () => {
|
|
2622
|
+
w.removeEventListener("visibilitychange", C);
|
|
2623
|
+
};
|
|
2624
|
+
}, [b, w]), G(() => {
|
|
2625
|
+
T();
|
|
2626
|
+
}, [h, T]), G(() => {
|
|
2627
|
+
o(() => r());
|
|
2628
|
+
}, [r, o]);
|
|
2629
|
+
const I = async function(C) {
|
|
2630
|
+
u({ data: C, completeSurvey: () => {
|
|
2631
|
+
i(Se);
|
|
2632
|
+
}, endCard: s }), Jr(w);
|
|
2633
|
+
};
|
|
2634
|
+
if (e) {
|
|
2635
|
+
for (const C of e)
|
|
2636
|
+
if (C.questionId === E) {
|
|
2637
|
+
let M;
|
|
2638
|
+
if (v === "multiplechoice") {
|
|
2639
|
+
const A = g.options.find(({ value: H }) => H === C.value);
|
|
2640
|
+
if (!A)
|
|
2641
|
+
break;
|
|
2642
|
+
M = { [A.id]: A.value };
|
|
2643
|
+
} else
|
|
2644
|
+
M = C.value;
|
|
2645
|
+
I({ value: M, type: v, questionId: C.questionId });
|
|
2646
|
+
break;
|
|
2647
|
+
}
|
|
2648
|
+
}
|
|
2649
|
+
const O = !S && ((f == null ? void 0 : f.framePosition) === "center" || (f == null ? void 0 : f.desktopDisplay) === "center-modal" || ((f == null ? void 0 : f.placement) || "").includes("center"));
|
|
2650
|
+
return a("div", { className: L("ul-app", We(p) ? "ul-app--visible" : "ul-app--overlay"), dir: "auto", id: Se, onClick: (C) => {
|
|
2651
|
+
var q;
|
|
2652
|
+
const M = window.sprigAPI, A = C.target;
|
|
2653
|
+
if (!M || !A)
|
|
2654
|
+
return;
|
|
2655
|
+
const H = [A, A.parentElement];
|
|
2656
|
+
for (const R of H)
|
|
2657
|
+
if (((q = R == null ? void 0 : R.tagName) == null ? void 0 : q.toLowerCase()) === "a")
|
|
2658
|
+
return C.preventDefault(), void (M == null ? void 0 : M.openUrl(R.href));
|
|
2659
|
+
}, ref: k, style: { "--theme": t, ...l ? { fontFamily: l.replace(";", "") } : {}, ...O ? { position: "relative" } : {} }, children: a("div", { className: "ul-app__container", children: a("div", { className: L(Z("ul-card__container", S, y)), style: { ...y !== "feedbackButton" || (f == null ? void 0 : f.desktopDisplay) === "center-modal" ? { borderColor: t } : {}, ...(f == null ? void 0 : f.desktopDisplay) === "slider" ? { margin: "0px" } : {} }, children: a("div", { className: "sprig-container", style: { minHeight: c }, children: [_ && a("div", { className: "ul-header__container", dir: "ltr", children: a("div", { className: "ul-header", children: "For development purposes only" }) }), m && a("div", { className: "ul-header__container", dir: "ltr", children: a("div", { className: "ul-header", children: "Preview Mode: Response will not be recorded." }) }), a("div", { className: L(Ko("ul-card-main-content", P)), children: (() => {
|
|
2660
|
+
const C = { className: "ul-card", next: I, questionId: E, type: v };
|
|
2661
|
+
switch (v) {
|
|
2662
|
+
case "consentlegal":
|
|
2663
|
+
return z(ei, { ...C, ...g, key: E });
|
|
2664
|
+
case "likert":
|
|
2665
|
+
return z(ni, { ...C, ...g, key: E });
|
|
2666
|
+
case "matrix":
|
|
2667
|
+
return z(si, { ...C, ...g, key: E });
|
|
2668
|
+
case "multiplechoice":
|
|
2669
|
+
return z(di, { ...C, ...g, key: E });
|
|
2670
|
+
case "multipleselect":
|
|
2671
|
+
return z(ci, { ...C, ...g, key: E });
|
|
2672
|
+
case "nps":
|
|
2673
|
+
return z(ui, { ...C, key: E, props: g });
|
|
2674
|
+
case "open":
|
|
2675
|
+
return z(pi, { ...C, ...g, key: E });
|
|
2676
|
+
case "recordedtask":
|
|
2677
|
+
return z(xi, { ...C, ...g, key: E });
|
|
2678
|
+
case "texturlprompt":
|
|
2679
|
+
return z(wi, { ...C, ...g, key: E });
|
|
2680
|
+
case "thanks":
|
|
2681
|
+
return z(Ci, { ...C, ...g, key: E });
|
|
2682
|
+
case "uploading":
|
|
2683
|
+
return z(Ri, { ...C, ...g, key: E });
|
|
2684
|
+
case "videovoice":
|
|
2685
|
+
return z(Di, { ...C, ...g, key: E });
|
|
2686
|
+
default:
|
|
2687
|
+
return null;
|
|
2688
|
+
}
|
|
2689
|
+
})() }), a(Ni, {})] }) }) }) });
|
|
2690
|
+
}, Zr = () => MediaRecorder.isTypeSupported("video/webm") ? "video/webm" : "video/mp4", Tn = (e) => {
|
|
2691
|
+
const t = { audioBitsPerSecond: 128e3, videoBitsPerSecond: 25e5, mimeType: Zr() };
|
|
2692
|
+
return new MediaRecorder(e, t);
|
|
2693
|
+
}, Pn = (e, t, n) => {
|
|
2694
|
+
n[t] = [], e.ondataavailable = function(r) {
|
|
2695
|
+
n[t].push(r.data);
|
|
2696
|
+
}, e.currentMediaRecordingUid = t, e.start();
|
|
2697
|
+
};
|
|
2698
|
+
function Dn(e, t, n, r, o, i) {
|
|
2699
|
+
if (e && e.state !== "inactive") {
|
|
2700
|
+
const { "begin.callback": s } = r, d = e.currentMediaRecordingUid;
|
|
2701
|
+
if (!d)
|
|
2702
|
+
return;
|
|
2703
|
+
s && s(d), e.onstop = () => async function(l, p, h, c, u, m, f) {
|
|
2704
|
+
const b = B.getState().viewDocument, { "upload.callback": _, "progress.callback": y } = c, x = { mediaType: h, updatedAt: (/* @__PURE__ */ new Date()).toISOString(), mediaRecordingUid: u, ...c["passthrough.data"] }, T = await (async (j, P) => {
|
|
2705
|
+
var v;
|
|
2706
|
+
const g = await fetch(P, { method: "POST", cache: "no-cache", headers: { "Content-Type": "application/json" }, body: JSON.stringify(j) });
|
|
2707
|
+
if (g.ok) {
|
|
2708
|
+
const E = await g.json();
|
|
2709
|
+
return (v = E == null ? void 0 : E.upload) == null ? void 0 : v.url;
|
|
2710
|
+
}
|
|
2711
|
+
return null;
|
|
2712
|
+
})(x, l);
|
|
2713
|
+
if (!T)
|
|
2714
|
+
return void (_ && _(null, { message: "failed to get upload url" }));
|
|
2715
|
+
const S = new Blob(f, { type: Zr() });
|
|
2716
|
+
if (!b.defaultView)
|
|
2717
|
+
return;
|
|
2718
|
+
const w = new b.defaultView.File([S], `recording video ${Date.now()}`), k = m.createUpload({ endpoint: T, file: w, chunkSize: 5120 });
|
|
2719
|
+
k.on("error", (j) => {
|
|
2720
|
+
_ && _(null, j);
|
|
2721
|
+
}), k.on("progress", (j) => {
|
|
2722
|
+
y && y(u, j);
|
|
2723
|
+
}), k.on("success", () => {
|
|
2724
|
+
_ && _(u, !0);
|
|
2725
|
+
});
|
|
2726
|
+
}(t, 0, n, r, d, o, i), e.stop();
|
|
2727
|
+
}
|
|
2728
|
+
}
|
|
2729
|
+
const Li = { state: { chunks: {} }, stopRecording(e) {
|
|
2730
|
+
const { uploadApiEndpoint: t, avRecorder: n, screenRecorder: r, UpChunk: o } = this.state, i = this.state.avStream && this.state.avStream.getVideoTracks().length > 0 ? "video" : "audio";
|
|
2731
|
+
this.state.chunks && t && o && (n != null && n.currentMediaRecordingUid && Dn(n, t, i, e, o, this.state.chunks[n == null ? void 0 : n.currentMediaRecordingUid]), r != null && r.currentMediaRecordingUid && Dn(r, t, "screen", e, o, this.state.chunks[r == null ? void 0 : r.currentMediaRecordingUid]));
|
|
2732
|
+
}, handleCancelledStream(e) {
|
|
2733
|
+
const t = e.getVideoTracks(), n = e.getAudioTracks();
|
|
2734
|
+
let r = t.length && t[0];
|
|
2735
|
+
r = r || n.length && n[0], r && r.addEventListener("ended", () => {
|
|
2736
|
+
[this.state.avRecorder, this.state.screenRecorder].map((o) => {
|
|
2737
|
+
o && (o.state === "recording" && o.stop(), o.stream.getTracks().map((i) => {
|
|
2738
|
+
i.readyState === "live" && i.stop();
|
|
2739
|
+
}));
|
|
2740
|
+
}), Object.assign(this.state, { avStream: null, captureStream: null, avRecorder: null, screenRecorder: null });
|
|
2741
|
+
});
|
|
2742
|
+
}, taskDurationMillisecond() {
|
|
2743
|
+
return this.state.startTime ? (/* @__PURE__ */ new Date()).getTime() - this.state.startTime.getTime() : 0;
|
|
2744
|
+
}, setUpChunk(e) {
|
|
2745
|
+
this.state.UpChunk = e;
|
|
2746
|
+
}, configure(e, t) {
|
|
2747
|
+
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) => {
|
|
2748
|
+
this.avPermissionCallback(n);
|
|
2749
|
+
}), e.on("begin.recording", this.beginRecordingCallback.bind(this)), e.on("start.task", this.startTaskCallback.bind(this)), e.on("screen.permission", async (n) => {
|
|
2750
|
+
this.screenPermissionCallback(n);
|
|
2751
|
+
}), e.on("finish.task", async (n) => {
|
|
2752
|
+
this.finishTaskCallback(n);
|
|
2753
|
+
});
|
|
2754
|
+
}, async avPermissionCallback(e) {
|
|
2755
|
+
var r, o, i;
|
|
2756
|
+
const { "stream.ready": t, "permission.descriptors": n } = e;
|
|
2757
|
+
try {
|
|
2758
|
+
(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);
|
|
2759
|
+
} catch (s) {
|
|
2760
|
+
return console.warn("Error: failed to get permissions: " + s), void (t && t(null, null));
|
|
2761
|
+
}
|
|
2762
|
+
t && t(this.state.avStream, this.state.captureStream);
|
|
2763
|
+
}, async screenPermissionCallback(e) {
|
|
2764
|
+
const { "screen.permission.requested": t, "stream.ready.callback": n } = e;
|
|
2765
|
+
t == null || t(!0);
|
|
2766
|
+
try {
|
|
2767
|
+
this.state.captureStream = await navigator.mediaDevices.getDisplayMedia({ video: !0, cursor: "always", displaySurface: "browser", preferCurrentTab: !0 });
|
|
2768
|
+
} catch (r) {
|
|
2769
|
+
return t == null || t(!1), console.warn("Error: failed to get permissions: " + r), void (n && n(null, null));
|
|
2770
|
+
}
|
|
2771
|
+
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);
|
|
2772
|
+
}, beginRecordingCallback(e) {
|
|
2773
|
+
const { "recording.media.types": t, "start.recording.callback": n = () => {
|
|
2774
|
+
} } = e;
|
|
2775
|
+
if (!t)
|
|
2776
|
+
return;
|
|
2777
|
+
const r = [];
|
|
2778
|
+
if (t.includes("video") && this.state.avStream) {
|
|
2779
|
+
this.state.avRecorder = Tn(this.state.avStream);
|
|
2780
|
+
const o = mt();
|
|
2781
|
+
Pn(this.state.avRecorder, o, this.state.chunks), r.push(o);
|
|
2782
|
+
}
|
|
2783
|
+
if (t.includes("screen") && this.state.captureStream) {
|
|
2784
|
+
this.state.screenRecorder = Tn(this.state.captureStream);
|
|
2785
|
+
const o = mt();
|
|
2786
|
+
Pn(this.state.screenRecorder, o, this.state.chunks), r.push(o);
|
|
2787
|
+
}
|
|
2788
|
+
r && n && n(r);
|
|
2789
|
+
}, async finishTaskCallback(e) {
|
|
2790
|
+
const { "current.index": t, "task.response": n, "task.complete.callback": r } = e;
|
|
2791
|
+
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);
|
|
2792
|
+
}, startTaskCallback() {
|
|
2793
|
+
this.state.startTime = /* @__PURE__ */ new Date();
|
|
2794
|
+
}, permissionStatusCallback(e) {
|
|
2795
|
+
var r;
|
|
2796
|
+
const { "permission.status.callback": t } = e, n = this.state.avStream;
|
|
2797
|
+
t && t(n, !!n && (n == null ? void 0 : n.getVideoTracks().length) > 0, !!((r = this.state.captureStream) != null && r.active), this.state.captureStream);
|
|
2798
|
+
}, lookAheadAndStopStream(e, t, n, r) {
|
|
2799
|
+
const { avRecorder: o, screenRecorder: i } = this.state, { allResponses: s } = B.getState(), d = Cr({ cards: n, index: e, hasEndCard: r, allResponses: s });
|
|
2800
|
+
d !== null && n[d].type === "recordedtask" || [o, i].map((l) => {
|
|
2801
|
+
l && (l.state === "recording" && l.stop(), l.stream.getTracks().map((p) => {
|
|
2802
|
+
p.readyState === "live" && p.stop();
|
|
2803
|
+
}));
|
|
2804
|
+
});
|
|
2805
|
+
} }, Fe = Object.create(Li);
|
|
2806
|
+
Object.freeze(Fe);
|
|
2807
|
+
const Oi = ({ mode: e = null, viewWindow: t, viewDocument: n, trackPageViewUrl: r }) => {
|
|
2808
|
+
const o = n.documentElement;
|
|
2809
|
+
let i;
|
|
2810
|
+
try {
|
|
2811
|
+
i = t.parent.location.href;
|
|
2812
|
+
} catch {
|
|
2813
|
+
i = t.location.href;
|
|
2814
|
+
}
|
|
2815
|
+
return { mode: e, sw: t.screen.width, sh: t.screen.height, cw: o.clientWidth, ch: o.clientHeight, p: r ?? i, l: t.navigator.language };
|
|
2816
|
+
}, Ai = { configure: function(e, t = !0) {
|
|
2817
|
+
var y;
|
|
2818
|
+
const { answers: n, apiURL: r, endCard: o, eventEmitFn: i, fontFamilyURL: s, frame: d, previewKey: l, viewDocument: p, viewWindow: h } = e, c = We(e.headers) ? e.frame : p.body, u = e.UpChunk || window.UpChunk, m = Be, f = ((x, T) => {
|
|
2819
|
+
const S = [...x], w = /* @__PURE__ */ new Set(["videovoice", "recordedtask"]);
|
|
2820
|
+
return x.some((k) => w.has(k.type)) && S.push({ name: -2, props: { routingOptions: [] }, type: "uploading" }), T && S.push({ name: -1, props: { routingOptions: [] }, type: "thanks" }), S;
|
|
2821
|
+
})(e.cards, !!o);
|
|
2822
|
+
Fe.configure(m, { cards: f, hasEndCard: !!o, apiURL: r, UpChunk: u }), B.setState({ apiURL: r, answers: n, border: e.border, index: e.startingQuestionIdx || 0, cards: f, configureExitOnOverlayClick: e.configureExitOnOverlayClick, customMetadata: e.customMetadata, endCard: e.endCard, envId: e.envId, eventEmitFn: i, fontFamily: e.fontFamily, forceBrandedLogo: e.forceBrandedLogo, frame: d, headers: e.headers, hasViewedEmbed: !1, isPreview: e.isPreview, marketingUrl: "https://sprig.com", meta: Oi({ mode: e.mode, viewWindow: h, viewDocument: p, trackPageViewUrl: e.trackPageViewUrl }), mode: e.mode, previewKey: l, previewMode: e.previewMode, productConfig: e.productConfig, recorder: Fe, recorderEventEmitter: m, 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 });
|
|
2823
|
+
const { head: b } = p;
|
|
2824
|
+
if (At({ 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;min-height:0;justify-content:center}.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}.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}.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:flex;flex-direction:row;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-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-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{flex:1 0 auto;margin-top:2px;margin-bottom:3px;align-items:center;display:flex;flex-wrap:wrap;justify-content:center;padding:0}.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.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}#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;left:0;position:absolute;top:0;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;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;max-width:250px;margin:16px 0}#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 && At({ document: p, elementId: "ul-custom-style", styleString: e.customStyles, nonce: e.styleNonce }), e.fontFamily && s && parent) {
|
|
2825
|
+
const x = p.createElement("link");
|
|
2826
|
+
x.rel = "stylesheet", x.href = s, b.appendChild(x);
|
|
2827
|
+
}
|
|
2828
|
+
if (!u && e.cards.some((x) => x.type === "recordedtask")) {
|
|
2829
|
+
const x = p.createElement("script");
|
|
2830
|
+
x.src = e.upchunkLibraryURL ?? "https://cdn.sprig.com/userleap-web-upchunk-v2.2.2.js", x.onload = () => {
|
|
2831
|
+
Fe.setUpChunk(h.UpChunk);
|
|
2832
|
+
}, x.onerror = () => {
|
|
2833
|
+
console.warn("[Sprig] - recording functionality not configured due to UpChunk library load failure");
|
|
2834
|
+
}, b.appendChild(x);
|
|
2835
|
+
}
|
|
2836
|
+
const _ = i || ((y = d.eventEmitter) == null ? void 0 : y.emit);
|
|
2837
|
+
_ == null || _("verify.view.version", { "view.version": "2.32.3" }), c && t && Ie(a(Mi, {}), c);
|
|
2838
|
+
} };
|
|
2839
|
+
export {
|
|
2840
|
+
Ai as default
|
|
2841
|
+
};
|