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