@sprig-technologies/sprig-bundled 2.37.0 → 2.38.1

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