@apolitical/component-library 3.4.0 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/form/components/form/form.d.ts +1 -1
- package/form/types/signup-form/signup-form.d.ts +9 -9
- package/form/types/signup-form/signup-form.helpers.d.ts +1 -1
- package/form/types/signup-form/signup-form.helpers.get-fields.d.ts +2 -7
- package/index.js +13 -13
- package/index.mjs +1166 -1167
- package/package.json +1 -1
- package/style.css +1 -1
- package/styles/base/_layout.scss +5 -0
- package/styles/base/form/_form.scss +4 -0
- package/styles/variables/sizes/_common.scss +2 -3
package/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Y, { memo as De, useState as X, useEffect as ae, useRef as pe, useMemo as xt, Children as Bn, createContext as nn, useContext as Ee, useCallback as sa, useReducer as Yn, Fragment as yt, Suspense as xs } from "react";
|
|
2
2
|
import pt from "lodash.clonedeep";
|
|
3
3
|
import ws from "lodash.set";
|
|
4
|
-
import { FormattedMessage as ye, useIntl as
|
|
4
|
+
import { FormattedMessage as ye, useIntl as H, IntlProvider as js, createIntl as ks } from "react-intl";
|
|
5
5
|
import Fe from "markdown-to-jsx";
|
|
6
6
|
import et from "truncate";
|
|
7
7
|
import { QueryClient as Ts, QueryClientProvider as Es, useMutation as je, useQueryClient as Kn, useInfiniteQuery as ia, useQuery as Ss } from "@tanstack/react-query";
|
|
@@ -80,7 +80,7 @@ const S = /* @__PURE__ */ la(Fs), Os = ({
|
|
|
80
80
|
children: n,
|
|
81
81
|
className: r = "",
|
|
82
82
|
...s
|
|
83
|
-
}) =>
|
|
83
|
+
}) => Y.createElement(t, {
|
|
84
84
|
...s,
|
|
85
85
|
className: S("hidden", r, { "show-on-focus": e }),
|
|
86
86
|
children: n
|
|
@@ -88,7 +88,7 @@ const S = /* @__PURE__ */ la(Fs), Os = ({
|
|
|
88
88
|
element: t = "span",
|
|
89
89
|
children: e = null,
|
|
90
90
|
...n
|
|
91
|
-
}) =>
|
|
91
|
+
}) => Y.createElement(t, { ...n, "aria-hidden": !0 }, e), Gn = De(As);
|
|
92
92
|
var qn = { exports: {} }, it = {};
|
|
93
93
|
/**
|
|
94
94
|
* @license React
|
|
@@ -104,7 +104,7 @@ function Ds() {
|
|
|
104
104
|
if (xr)
|
|
105
105
|
return it;
|
|
106
106
|
xr = 1;
|
|
107
|
-
var t =
|
|
107
|
+
var t = Y, e = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, s = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
108
108
|
function o(c, f, l) {
|
|
109
109
|
var u, d = {}, m = null, p = null;
|
|
110
110
|
l !== void 0 && (m = "" + l), f.key !== void 0 && (m = "" + f.key), f.ref !== void 0 && (p = f.ref);
|
|
@@ -130,7 +130,7 @@ var ot = {};
|
|
|
130
130
|
var wr;
|
|
131
131
|
function Is() {
|
|
132
132
|
return wr || (wr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
133
|
-
var t =
|
|
133
|
+
var t = Y, e = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), c = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), d = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), g = Symbol.iterator, _ = "@@iterator";
|
|
134
134
|
function y(h) {
|
|
135
135
|
if (h === null || typeof h != "object")
|
|
136
136
|
return null;
|
|
@@ -142,10 +142,10 @@ function Is() {
|
|
|
142
142
|
{
|
|
143
143
|
for (var M = arguments.length, L = new Array(M > 1 ? M - 1 : 0), ne = 1; ne < M; ne++)
|
|
144
144
|
L[ne - 1] = arguments[ne];
|
|
145
|
-
|
|
145
|
+
k("error", h, L);
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function k(h, M, L) {
|
|
149
149
|
{
|
|
150
150
|
var ne = v.ReactDebugCurrentFrame, le = ne.getStackAddendum();
|
|
151
151
|
le !== "" && (M += "%s", L = L.concat([le]));
|
|
@@ -155,26 +155,26 @@ function Is() {
|
|
|
155
155
|
me.unshift("Warning: " + M), Function.prototype.apply.call(console[h], console, me);
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
-
var
|
|
159
|
-
|
|
158
|
+
var j = !1, w = !1, I = !1, R = !1, Q = !1, C;
|
|
159
|
+
C = Symbol.for("react.module.reference");
|
|
160
160
|
function F(h) {
|
|
161
|
-
return !!(typeof h == "string" || typeof h == "function" || h === r || h === i ||
|
|
161
|
+
return !!(typeof h == "string" || typeof h == "function" || h === r || h === i || Q || h === s || h === l || h === u || R || h === p || j || w || I || typeof h == "object" && h !== null && (h.$$typeof === m || h.$$typeof === d || h.$$typeof === o || h.$$typeof === c || h.$$typeof === f || // This needs to include all possible module reference object
|
|
162
162
|
// types supported by any Flight configuration anywhere since
|
|
163
163
|
// we don't know which Flight build this will end up being used
|
|
164
164
|
// with.
|
|
165
|
-
h.$$typeof ===
|
|
165
|
+
h.$$typeof === C || h.getModuleId !== void 0));
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function $(h, M, L) {
|
|
168
168
|
var ne = h.displayName;
|
|
169
169
|
if (ne)
|
|
170
170
|
return ne;
|
|
171
171
|
var le = M.displayName || M.name || "";
|
|
172
172
|
return le !== "" ? L + "(" + le + ")" : L;
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function T(h) {
|
|
175
175
|
return h.displayName || "Context";
|
|
176
176
|
}
|
|
177
|
-
function
|
|
177
|
+
function x(h) {
|
|
178
178
|
if (h == null)
|
|
179
179
|
return null;
|
|
180
180
|
if (typeof h.tag == "number" && b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof h == "function")
|
|
@@ -199,19 +199,19 @@ function Is() {
|
|
|
199
199
|
switch (h.$$typeof) {
|
|
200
200
|
case c:
|
|
201
201
|
var M = h;
|
|
202
|
-
return
|
|
202
|
+
return T(M) + ".Consumer";
|
|
203
203
|
case o:
|
|
204
204
|
var L = h;
|
|
205
|
-
return
|
|
205
|
+
return T(L._context) + ".Provider";
|
|
206
206
|
case f:
|
|
207
|
-
return
|
|
207
|
+
return $(h, h.render, "ForwardRef");
|
|
208
208
|
case d:
|
|
209
209
|
var ne = h.displayName || null;
|
|
210
|
-
return ne !== null ? ne :
|
|
210
|
+
return ne !== null ? ne : x(h.type) || "Memo";
|
|
211
211
|
case m: {
|
|
212
212
|
var le = h, me = le._payload, ce = le._init;
|
|
213
213
|
try {
|
|
214
|
-
return
|
|
214
|
+
return x(ce(me));
|
|
215
215
|
} catch {
|
|
216
216
|
return null;
|
|
217
217
|
}
|
|
@@ -219,14 +219,14 @@ function Is() {
|
|
|
219
219
|
}
|
|
220
220
|
return null;
|
|
221
221
|
}
|
|
222
|
-
var
|
|
222
|
+
var N = Object.assign, A = 0, W, Z, z, K, E, P, q;
|
|
223
223
|
function B() {
|
|
224
224
|
}
|
|
225
225
|
B.__reactDisabledLog = !0;
|
|
226
|
-
function
|
|
226
|
+
function U() {
|
|
227
227
|
{
|
|
228
|
-
if (
|
|
229
|
-
|
|
228
|
+
if (A === 0) {
|
|
229
|
+
W = console.log, Z = console.info, z = console.warn, K = console.error, E = console.group, P = console.groupCollapsed, q = console.groupEnd;
|
|
230
230
|
var h = {
|
|
231
231
|
configurable: !0,
|
|
232
232
|
enumerable: !0,
|
|
@@ -243,56 +243,56 @@ function Is() {
|
|
|
243
243
|
groupEnd: h
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
|
-
|
|
246
|
+
A++;
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
function te() {
|
|
250
250
|
{
|
|
251
|
-
if (
|
|
251
|
+
if (A--, A === 0) {
|
|
252
252
|
var h = {
|
|
253
253
|
configurable: !0,
|
|
254
254
|
enumerable: !0,
|
|
255
255
|
writable: !0
|
|
256
256
|
};
|
|
257
257
|
Object.defineProperties(console, {
|
|
258
|
-
log:
|
|
259
|
-
value:
|
|
258
|
+
log: N({}, h, {
|
|
259
|
+
value: W
|
|
260
260
|
}),
|
|
261
|
-
info:
|
|
262
|
-
value:
|
|
261
|
+
info: N({}, h, {
|
|
262
|
+
value: Z
|
|
263
263
|
}),
|
|
264
|
-
warn:
|
|
264
|
+
warn: N({}, h, {
|
|
265
265
|
value: z
|
|
266
266
|
}),
|
|
267
|
-
error:
|
|
268
|
-
value:
|
|
267
|
+
error: N({}, h, {
|
|
268
|
+
value: K
|
|
269
269
|
}),
|
|
270
|
-
group:
|
|
271
|
-
value:
|
|
270
|
+
group: N({}, h, {
|
|
271
|
+
value: E
|
|
272
272
|
}),
|
|
273
|
-
groupCollapsed:
|
|
274
|
-
value:
|
|
273
|
+
groupCollapsed: N({}, h, {
|
|
274
|
+
value: P
|
|
275
275
|
}),
|
|
276
|
-
groupEnd:
|
|
277
|
-
value:
|
|
276
|
+
groupEnd: N({}, h, {
|
|
277
|
+
value: q
|
|
278
278
|
})
|
|
279
279
|
});
|
|
280
280
|
}
|
|
281
|
-
|
|
281
|
+
A < 0 && b("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
|
-
var G = v.ReactCurrentDispatcher,
|
|
284
|
+
var G = v.ReactCurrentDispatcher, V;
|
|
285
285
|
function ee(h, M, L) {
|
|
286
286
|
{
|
|
287
|
-
if (
|
|
287
|
+
if (V === void 0)
|
|
288
288
|
try {
|
|
289
289
|
throw Error();
|
|
290
290
|
} catch (le) {
|
|
291
291
|
var ne = le.stack.trim().match(/\n( *(at )?)/);
|
|
292
|
-
|
|
292
|
+
V = ne && ne[1] || "";
|
|
293
293
|
}
|
|
294
294
|
return `
|
|
295
|
-
` +
|
|
295
|
+
` + V + h;
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
298
|
var re = !1, O;
|
|
@@ -300,7 +300,7 @@ function Is() {
|
|
|
300
300
|
var oe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
301
301
|
O = new oe();
|
|
302
302
|
}
|
|
303
|
-
function
|
|
303
|
+
function D(h, M) {
|
|
304
304
|
if (!h || re)
|
|
305
305
|
return "";
|
|
306
306
|
{
|
|
@@ -313,7 +313,7 @@ function Is() {
|
|
|
313
313
|
var le = Error.prepareStackTrace;
|
|
314
314
|
Error.prepareStackTrace = void 0;
|
|
315
315
|
var me;
|
|
316
|
-
me = G.current, G.current = null,
|
|
316
|
+
me = G.current, G.current = null, U();
|
|
317
317
|
try {
|
|
318
318
|
if (M) {
|
|
319
319
|
var ce = function() {
|
|
@@ -372,7 +372,7 @@ function Is() {
|
|
|
372
372
|
return typeof h == "function" && O.set(h, _r), _r;
|
|
373
373
|
}
|
|
374
374
|
function ve(h, M, L) {
|
|
375
|
-
return
|
|
375
|
+
return D(h, !1);
|
|
376
376
|
}
|
|
377
377
|
function Ne(h) {
|
|
378
378
|
var M = h.prototype;
|
|
@@ -382,7 +382,7 @@ function Is() {
|
|
|
382
382
|
if (h == null)
|
|
383
383
|
return "";
|
|
384
384
|
if (typeof h == "function")
|
|
385
|
-
return
|
|
385
|
+
return D(h, Ne(h));
|
|
386
386
|
if (typeof h == "string")
|
|
387
387
|
return ee(h);
|
|
388
388
|
switch (h) {
|
|
@@ -483,8 +483,8 @@ function Is() {
|
|
|
483
483
|
}
|
|
484
484
|
function cs(h, M) {
|
|
485
485
|
if (typeof h.ref == "string" && st.current && M && st.current.stateNode !== M) {
|
|
486
|
-
var L =
|
|
487
|
-
un[L] || (b('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',
|
|
486
|
+
var L = x(st.current.type);
|
|
487
|
+
un[L] || (b('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', x(st.current.type), h.ref), un[L] = !0);
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
490
|
function ls(h, M) {
|
|
@@ -572,7 +572,7 @@ function Is() {
|
|
|
572
572
|
function hr() {
|
|
573
573
|
{
|
|
574
574
|
if (dn.current) {
|
|
575
|
-
var h =
|
|
575
|
+
var h = x(dn.current.type);
|
|
576
576
|
if (h)
|
|
577
577
|
return `
|
|
578
578
|
|
|
@@ -615,7 +615,7 @@ Check the top-level render call using <` + L + ">.");
|
|
|
615
615
|
return;
|
|
616
616
|
gr[L] = !0;
|
|
617
617
|
var ne = "";
|
|
618
|
-
h && h._owner && h._owner !== dn.current && (ne = " It was passed a child from " +
|
|
618
|
+
h && h._owner && h._owner !== dn.current && (ne = " It was passed a child from " + x(h._owner.type) + "."), Ke(h), b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', L, ne), Ke(null);
|
|
619
619
|
}
|
|
620
620
|
}
|
|
621
621
|
function br(h, M) {
|
|
@@ -652,11 +652,11 @@ Check the top-level render call using <` + L + ">.");
|
|
|
652
652
|
else
|
|
653
653
|
return;
|
|
654
654
|
if (L) {
|
|
655
|
-
var ne =
|
|
655
|
+
var ne = x(M);
|
|
656
656
|
ts(L, h.props, "prop", ne, h);
|
|
657
657
|
} else if (M.PropTypes !== void 0 && !fn) {
|
|
658
658
|
fn = !0;
|
|
659
|
-
var le =
|
|
659
|
+
var le = x(M);
|
|
660
660
|
b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", le || "Unknown");
|
|
661
661
|
}
|
|
662
662
|
typeof M.getDefaultProps == "function" && !M.getDefaultProps.isReactClassApproved && b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
@@ -683,7 +683,7 @@ Check the top-level render call using <` + L + ">.");
|
|
|
683
683
|
var xe = ms(le);
|
|
684
684
|
xe ? ie += xe : ie += hr();
|
|
685
685
|
var he;
|
|
686
|
-
h === null ? he = "null" : ln(h) ? he = "array" : h !== void 0 && h.$$typeof === e ? (he = "<" + (
|
|
686
|
+
h === null ? he = "null" : ln(h) ? he = "array" : h !== void 0 && h.$$typeof === e ? (he = "<" + (x(h.type) || "Unknown") + " />", ie = " Did you accidentally export a JSX literal instead of a component?") : he = typeof h, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", he, ie);
|
|
687
687
|
}
|
|
688
688
|
var ge = fs(h, M, L, le, me);
|
|
689
689
|
if (ge == null)
|
|
@@ -717,7 +717,7 @@ Check the top-level render call using <` + L + ">.");
|
|
|
717
717
|
process.env.NODE_ENV === "production" ? qn.exports = Ds() : qn.exports = Is();
|
|
718
718
|
var a = qn.exports;
|
|
719
719
|
const Ls = () => {
|
|
720
|
-
const [t, e] =
|
|
720
|
+
const [t, e] = X(window.location.pathname), n = () => {
|
|
721
721
|
const r = window.location.pathname;
|
|
722
722
|
e(r);
|
|
723
723
|
};
|
|
@@ -743,48 +743,48 @@ function Bs(t, e, n) {
|
|
|
743
743
|
d.current = !1;
|
|
744
744
|
};
|
|
745
745
|
}, []);
|
|
746
|
-
var
|
|
747
|
-
var
|
|
748
|
-
var
|
|
749
|
-
return c.current = f.current = null, i.current = F, l.current = u.current.apply(
|
|
750
|
-
},
|
|
751
|
-
p && cancelAnimationFrame(o.current), o.current = p ? requestAnimationFrame(F) : setTimeout(F,
|
|
752
|
-
},
|
|
746
|
+
var k = xt(function() {
|
|
747
|
+
var j = function(F) {
|
|
748
|
+
var $ = c.current, T = f.current;
|
|
749
|
+
return c.current = f.current = null, i.current = F, l.current = u.current.apply(T, $);
|
|
750
|
+
}, w = function(F, $) {
|
|
751
|
+
p && cancelAnimationFrame(o.current), o.current = p ? requestAnimationFrame(F) : setTimeout(F, $);
|
|
752
|
+
}, I = function(F) {
|
|
753
753
|
if (!d.current)
|
|
754
754
|
return !1;
|
|
755
|
-
var
|
|
756
|
-
return !s.current ||
|
|
755
|
+
var $ = F - s.current;
|
|
756
|
+
return !s.current || $ >= e || $ < 0 || y && F - i.current >= b;
|
|
757
757
|
}, R = function(F) {
|
|
758
|
-
return o.current = null, _ && c.current ?
|
|
759
|
-
},
|
|
760
|
-
var
|
|
761
|
-
if (
|
|
762
|
-
return R(
|
|
758
|
+
return o.current = null, _ && c.current ? j(F) : (c.current = f.current = null, l.current);
|
|
759
|
+
}, Q = function F() {
|
|
760
|
+
var $ = Date.now();
|
|
761
|
+
if (I($))
|
|
762
|
+
return R($);
|
|
763
763
|
if (d.current) {
|
|
764
|
-
var
|
|
765
|
-
|
|
764
|
+
var T = e - ($ - s.current), x = y ? Math.min(T, b - ($ - i.current)) : T;
|
|
765
|
+
w(F, x);
|
|
766
766
|
}
|
|
767
|
-
},
|
|
767
|
+
}, C = function() {
|
|
768
768
|
if (m || v) {
|
|
769
|
-
var F = Date.now(),
|
|
770
|
-
if (c.current = [].slice.call(arguments), f.current = r, s.current = F,
|
|
769
|
+
var F = Date.now(), $ = I(F);
|
|
770
|
+
if (c.current = [].slice.call(arguments), f.current = r, s.current = F, $) {
|
|
771
771
|
if (!o.current && d.current)
|
|
772
|
-
return i.current = s.current,
|
|
772
|
+
return i.current = s.current, w(Q, e), g ? j(s.current) : l.current;
|
|
773
773
|
if (y)
|
|
774
|
-
return
|
|
774
|
+
return w(Q, e), j(s.current);
|
|
775
775
|
}
|
|
776
|
-
return o.current ||
|
|
776
|
+
return o.current || w(Q, e), l.current;
|
|
777
777
|
}
|
|
778
778
|
};
|
|
779
|
-
return
|
|
779
|
+
return C.cancel = function() {
|
|
780
780
|
o.current && (p ? cancelAnimationFrame(o.current) : clearTimeout(o.current)), i.current = 0, c.current = s.current = f.current = o.current = null;
|
|
781
|
-
},
|
|
781
|
+
}, C.isPending = function() {
|
|
782
782
|
return !!o.current;
|
|
783
|
-
},
|
|
783
|
+
}, C.flush = function() {
|
|
784
784
|
return o.current ? R(Date.now()) : l.current;
|
|
785
|
-
},
|
|
785
|
+
}, C;
|
|
786
786
|
}, [g, y, e, b, _, p, m, v]);
|
|
787
|
-
return
|
|
787
|
+
return k;
|
|
788
788
|
}
|
|
789
789
|
function fa(t, e, n) {
|
|
790
790
|
var r = n === void 0 ? {} : n, s = r.leading, i = r.trailing;
|
|
@@ -794,7 +794,7 @@ let pn;
|
|
|
794
794
|
const wt = (t = !0, e = !1, n = "window") => {
|
|
795
795
|
if (!t)
|
|
796
796
|
return;
|
|
797
|
-
const [r, s] =
|
|
797
|
+
const [r, s] = Y.useState(0) || [!1, () => {
|
|
798
798
|
}];
|
|
799
799
|
ae(() => (c(), window.addEventListener("resize", l), window.addEventListener("hashchange", l), window.addEventListener("hiddenSectionVisible", f), () => {
|
|
800
800
|
clearTimeout(pn), l.flush(), window.removeEventListener("resize", l), window.removeEventListener("hashchange", l), window.removeEventListener("hiddenSectionVisible", f);
|
|
@@ -828,11 +828,11 @@ const wt = (t = !0, e = !1, n = "window") => {
|
|
|
828
828
|
}) => {
|
|
829
829
|
if (!window)
|
|
830
830
|
return;
|
|
831
|
-
const [s, i] =
|
|
831
|
+
const [s, i] = Y.useState({
|
|
832
832
|
current: 0,
|
|
833
833
|
past: 0
|
|
834
834
|
}) || [!1, () => {
|
|
835
|
-
}], [o, c] =
|
|
835
|
+
}], [o, c] = Y.useState({
|
|
836
836
|
scrollDown: !1,
|
|
837
837
|
scrollUp: !1
|
|
838
838
|
}) || [!1, () => {
|
|
@@ -1417,7 +1417,7 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1417
1417
|
}
|
|
1418
1418
|
}
|
|
1419
1419
|
return r;
|
|
1420
|
-
}, Lt = (t, e) =>
|
|
1420
|
+
}, Lt = (t, e) => Y.Children.map(t, (n) => Object.is(n, null) ? n : Y.cloneElement(n, {
|
|
1421
1421
|
...e
|
|
1422
1422
|
})), ti = (t = 0) => {
|
|
1423
1423
|
setTimeout(() => {
|
|
@@ -1467,14 +1467,14 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1467
1467
|
},
|
|
1468
1468
|
disabled: typeof f == "object" && "isClickable" in f ? !f.isClickable : f
|
|
1469
1469
|
};
|
|
1470
|
-
return s && (i = "a", _.href = s),
|
|
1470
|
+
return s && (i = "a", _.href = s), Y.createElement(
|
|
1471
1471
|
i,
|
|
1472
1472
|
_,
|
|
1473
1473
|
u || (l ? /* @__PURE__ */ a.jsx(be, { showOnFocus: !1, children: l }) : null)
|
|
1474
1474
|
);
|
|
1475
1475
|
}, jt = ({ buttons: t, className: e = "", ...n }) => {
|
|
1476
1476
|
const r = t.length > 1 ? "ul" : "p", s = t.map((i, o) => r === "p" ? /* @__PURE__ */ a.jsx(se, { ...i }, o) : /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(se, { ...i }) }, o));
|
|
1477
|
-
return
|
|
1477
|
+
return Y.createElement(r, {
|
|
1478
1478
|
className: S("button-wrapper", e),
|
|
1479
1479
|
...n,
|
|
1480
1480
|
children: s
|
|
@@ -1663,7 +1663,7 @@ const Nl = ({ image: t, className: e, testId: n }) => /* @__PURE__ */ a.jsx(
|
|
|
1663
1663
|
const f = { ...c };
|
|
1664
1664
|
return s && (f.onClick = s), i && (f["data-gtm-event-context"] = i), o && (f["data-gtm-event-type"] = o), /* @__PURE__ */ a.jsx("a", { href: t, className: S("gtm-trackable", r), ...f, children: e });
|
|
1665
1665
|
}
|
|
1666
|
-
return n ?
|
|
1666
|
+
return n ? Y.createElement(n, { children: e, className: r, ...c }) : /* @__PURE__ */ a.jsx(a.Fragment, { children: e });
|
|
1667
1667
|
};
|
|
1668
1668
|
const Pl = ({ currentStep: t = 1, steps: e = 1 }) => /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1669
1669
|
/* @__PURE__ */ a.jsx(be, { children: /* @__PURE__ */ a.jsx(
|
|
@@ -1698,7 +1698,7 @@ const Pl = ({ currentStep: t = 1, steps: e = 1 }) => /* @__PURE__ */ a.jsxs(a.Fr
|
|
|
1698
1698
|
}) }) })
|
|
1699
1699
|
] });
|
|
1700
1700
|
const Ml = ({ elementId: t, offset: e = 20 }) => {
|
|
1701
|
-
const n =
|
|
1701
|
+
const n = H(), r = () => {
|
|
1702
1702
|
const s = document.getElementById(t);
|
|
1703
1703
|
if (!s)
|
|
1704
1704
|
return;
|
|
@@ -1768,7 +1768,7 @@ const Jn = ({
|
|
|
1768
1768
|
children: n,
|
|
1769
1769
|
shouldAnimate: r = !1
|
|
1770
1770
|
}) => {
|
|
1771
|
-
const s =
|
|
1771
|
+
const s = H(), i = pe(null);
|
|
1772
1772
|
return ae(() => {
|
|
1773
1773
|
let o;
|
|
1774
1774
|
return r && (o = new si(i.current)), () => {
|
|
@@ -1810,7 +1810,7 @@ const Cr = {
|
|
|
1810
1810
|
customLabel: n,
|
|
1811
1811
|
className: r = ""
|
|
1812
1812
|
}) => {
|
|
1813
|
-
const s =
|
|
1813
|
+
const s = H(), i = e ? { "--custom-icon": ii(e) } : {}, o = Qn(`contentTypeLabel_${t}`) ? s.formatMessage({ id: `contentTypeLabel_${t}` }) : !1;
|
|
1814
1814
|
return !n && !o ? null : /* @__PURE__ */ a.jsx(
|
|
1815
1815
|
"small",
|
|
1816
1816
|
{
|
|
@@ -1902,7 +1902,7 @@ const ci = ({
|
|
|
1902
1902
|
Fe,
|
|
1903
1903
|
{
|
|
1904
1904
|
options: {
|
|
1905
|
-
wrapper:
|
|
1905
|
+
wrapper: Y.Fragment,
|
|
1906
1906
|
forceBlock: !0,
|
|
1907
1907
|
overrides: va
|
|
1908
1908
|
},
|
|
@@ -1917,7 +1917,7 @@ const Rl = ({
|
|
|
1917
1917
|
text: r,
|
|
1918
1918
|
children: s
|
|
1919
1919
|
}) => {
|
|
1920
|
-
const i =
|
|
1920
|
+
const i = H(), o = pe(null), [c, f] = X(""), [l, u] = X("closed");
|
|
1921
1921
|
ae(() => {
|
|
1922
1922
|
const p = o.current;
|
|
1923
1923
|
if (p)
|
|
@@ -1978,24 +1978,24 @@ const Fl = ({
|
|
|
1978
1978
|
className: i = ""
|
|
1979
1979
|
}) => {
|
|
1980
1980
|
const { hasBorder: o = !1, zebraStriping: c = !1 } = s;
|
|
1981
|
-
return
|
|
1981
|
+
return Y.createElement(t, {
|
|
1982
1982
|
className: S("icon-bulleted-list text-medium", n, i, {
|
|
1983
1983
|
"has-border": o,
|
|
1984
1984
|
"has-zebra-stripes": c,
|
|
1985
1985
|
[e]: t !== "dl"
|
|
1986
1986
|
}),
|
|
1987
1987
|
children: r.map((f, l) => {
|
|
1988
|
-
const u = { wrapper:
|
|
1988
|
+
const u = { wrapper: Y.Fragment, forceInline: !0 }, d = {
|
|
1989
1989
|
"--icon": `url(${Be}icons/${f.icon}.svg)`
|
|
1990
1990
|
};
|
|
1991
|
-
return t === "dl" ? /* @__PURE__ */ a.jsxs(
|
|
1991
|
+
return t === "dl" ? /* @__PURE__ */ a.jsxs(Y.Fragment, { children: [
|
|
1992
1992
|
/* @__PURE__ */ a.jsx("dt", { style: d, children: /* @__PURE__ */ a.jsx(Fe, { options: u, children: f.dt || "" }) }, `dt-${l}`),
|
|
1993
1993
|
/* @__PURE__ */ a.jsx("dd", { children: typeof f.text == "string" ? /* @__PURE__ */ a.jsx(Fe, { options: u, children: f.text }) : f.text }, `dd-${l}`)
|
|
1994
1994
|
] }, `dl-${l}`) : /* @__PURE__ */ a.jsx("li", { style: d, children: typeof f.text == "string" ? /* @__PURE__ */ a.jsx(Fe, { options: u, children: f.text }) : f.text }, l);
|
|
1995
1995
|
})
|
|
1996
1996
|
});
|
|
1997
|
-
}, _e = () =>
|
|
1998
|
-
const e =
|
|
1997
|
+
}, _e = () => Y.Fragment, li = ({ children: t }) => /* @__PURE__ */ a.jsx(Oe, { variant: "secondary", children: t }), ui = ({ children: t }) => typeof t == "object" && Object.keys(t || {}).length === 1 ? /* @__PURE__ */ a.jsx("p", { className: "center", children: t }) : /* @__PURE__ */ a.jsx("div", { className: "center", children: t }), di = ["span", "strong", "h1", "h2", "h3", "h4", "h5", "h6", "p"], fi = ({ children: t }) => {
|
|
1998
|
+
const e = H();
|
|
1999
1999
|
if (!t)
|
|
2000
2000
|
return null;
|
|
2001
2001
|
let n = e.formatMessage({
|
|
@@ -2004,10 +2004,10 @@ const Fl = ({
|
|
|
2004
2004
|
const r = [];
|
|
2005
2005
|
for (const i of Bn.toArray(t))
|
|
2006
2006
|
if (!(!i || typeof i == "string" || typeof i == "number"))
|
|
2007
|
-
if (
|
|
2007
|
+
if (Y.isValidElement(i) && i.type === "summary") {
|
|
2008
2008
|
if (i.props && i.props.children) {
|
|
2009
2009
|
for (const o of Bn.toArray(i.props.children))
|
|
2010
|
-
if (!(!o || typeof o == "string" || typeof o == "number") &&
|
|
2010
|
+
if (!(!o || typeof o == "string" || typeof o == "number") && Y.isValidElement(o)) {
|
|
2011
2011
|
const c = o.type;
|
|
2012
2012
|
if (di.includes(c)) {
|
|
2013
2013
|
for (n = o.props.children; typeof n != "string" && (Array.isArray(n) && n[0].props && n[0].props.children && n[0].props.children[0]); )
|
|
@@ -2047,7 +2047,7 @@ const Fl = ({
|
|
|
2047
2047
|
}
|
|
2048
2048
|
return /* @__PURE__ */ a.jsx("div", { ...e, children: t });
|
|
2049
2049
|
}, pi = (t) => {
|
|
2050
|
-
const e =
|
|
2050
|
+
const e = H(), n = Date.now().toString();
|
|
2051
2051
|
let r = "default";
|
|
2052
2052
|
const s = t.src;
|
|
2053
2053
|
return s.includes("youtube") || s.includes("vimeo") ? r = "video" : s.includes("riddle") || s.includes("sli.do") ? r = "poll" : s.includes("padlet") && (r = "padlet"), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
@@ -2076,10 +2076,10 @@ const Fl = ({
|
|
|
2076
2076
|
e.href && (e.href.includes("http:") || e.href.includes("https:")) && !e.target && (n.target = "_blank");
|
|
2077
2077
|
let r = t, s = !1;
|
|
2078
2078
|
for (const i of Bn.toArray(t))
|
|
2079
|
-
if (!(!i || typeof i == "string" || typeof i == "number") &&
|
|
2079
|
+
if (!(!i || typeof i == "string" || typeof i == "number") && Y.isValidElement(i)) {
|
|
2080
2080
|
const o = i.type;
|
|
2081
2081
|
if (["button", "center", "span", "strong"].includes(o) && i.props && i.props.children && i.props.children[0])
|
|
2082
|
-
for ((o === "button" || $r(i.props.children[0]) === "button") && (s = !0), r = i.props.children[0]; r && typeof r != "string" && !(typeof r == "boolean" || typeof r == "number" || !
|
|
2082
|
+
for ((o === "button" || $r(i.props.children[0]) === "button") && (s = !0), r = i.props.children[0]; r && typeof r != "string" && !(typeof r == "boolean" || typeof r == "number" || !Y.isValidElement(r)); )
|
|
2083
2083
|
if (r.props && r.props.children && r.props.children[0])
|
|
2084
2084
|
r = r.props.children[0], r && $r(r) === "button" && (s = !0);
|
|
2085
2085
|
else
|
|
@@ -2130,7 +2130,7 @@ const vi = {
|
|
|
2130
2130
|
const { highlightTitles: i = !1 } = s;
|
|
2131
2131
|
n = n.replace(/^<br\/?>/, "");
|
|
2132
2132
|
const o = {
|
|
2133
|
-
wrapper:
|
|
2133
|
+
wrapper: Y.Fragment,
|
|
2134
2134
|
forceBlock: !0,
|
|
2135
2135
|
overrides: vi[r]
|
|
2136
2136
|
};
|
|
@@ -2154,8 +2154,8 @@ const bi = ({
|
|
|
2154
2154
|
const i = t ? { "--max-width": `${t / 16}rem` } : {};
|
|
2155
2155
|
return /* @__PURE__ */ a.jsxs("section", { className: S("page-heading", s), children: [
|
|
2156
2156
|
/* @__PURE__ */ a.jsxs("div", { className: S("content", { "has-max-width": t }), style: i, children: [
|
|
2157
|
-
e && e.text &&
|
|
2158
|
-
n && n.text &&
|
|
2157
|
+
e && e.text && Y.createElement(e.element || "h1", { className: "title" }, e.text),
|
|
2158
|
+
n && n.text && Y.createElement(
|
|
2159
2159
|
n.element || "h2",
|
|
2160
2160
|
{ className: "text-medium" },
|
|
2161
2161
|
n.text
|
|
@@ -2192,7 +2192,7 @@ const Wt = ({
|
|
|
2192
2192
|
children: e = null,
|
|
2193
2193
|
className: n = "",
|
|
2194
2194
|
...r
|
|
2195
|
-
}) =>
|
|
2195
|
+
}) => Y.createElement(
|
|
2196
2196
|
t,
|
|
2197
2197
|
{
|
|
2198
2198
|
...r,
|
|
@@ -2211,7 +2211,7 @@ const Al = ({
|
|
|
2211
2211
|
selector: e = "",
|
|
2212
2212
|
className: n = ""
|
|
2213
2213
|
}) => {
|
|
2214
|
-
const r =
|
|
2214
|
+
const r = H(), [s, i] = X(t);
|
|
2215
2215
|
return ae(() => {
|
|
2216
2216
|
if (t.length)
|
|
2217
2217
|
return;
|
|
@@ -2245,7 +2245,7 @@ const Xn = ({
|
|
|
2245
2245
|
appendedText: r,
|
|
2246
2246
|
className: s = ""
|
|
2247
2247
|
}) => {
|
|
2248
|
-
const i =
|
|
2248
|
+
const i = H(), o = "timeToComplete_";
|
|
2249
2249
|
if (!t || typeof t != "number")
|
|
2250
2250
|
return null;
|
|
2251
2251
|
const c = (u) => {
|
|
@@ -2276,7 +2276,7 @@ const Xn = ({
|
|
|
2276
2276
|
};
|
|
2277
2277
|
let ct = !1;
|
|
2278
2278
|
const _i = ({ isOpen: t = !1, isLoading: e = !1, children: n }) => {
|
|
2279
|
-
const r =
|
|
2279
|
+
const r = H(), s = pe(null), [i, o] = X("hidden");
|
|
2280
2280
|
ae(() => {
|
|
2281
2281
|
const f = s.current;
|
|
2282
2282
|
if (f)
|
|
@@ -2351,8 +2351,8 @@ const Il = ({ text: t, buttons: e, className: n = "" }) => {
|
|
|
2351
2351
|
target: "_blank",
|
|
2352
2352
|
children: s.text
|
|
2353
2353
|
});
|
|
2354
|
-
}), /* @__PURE__ */ a.jsx(Ve, { className: S("download-section", n), children: /* @__PURE__ */ a.jsxs(
|
|
2355
|
-
|
|
2354
|
+
}), /* @__PURE__ */ a.jsx(Ve, { className: S("download-section", n), children: /* @__PURE__ */ a.jsxs("div", { className: "content-default", children: [
|
|
2355
|
+
Y.createElement(
|
|
2356
2356
|
typeof t == "string" ? "h2" : t.element,
|
|
2357
2357
|
{ className: "text" },
|
|
2358
2358
|
typeof t == "string" ? t : t.text
|
|
@@ -2364,7 +2364,7 @@ function ba({ href: t, setShowModal: e }) {
|
|
|
2364
2364
|
typeof t != "string" && e(!0);
|
|
2365
2365
|
}
|
|
2366
2366
|
const xi = ({ icon: t, description: e, ctaMessage: n, href: r, showEditButton: s, setShowModal: i }) => {
|
|
2367
|
-
const { formatMessage: o } =
|
|
2367
|
+
const { formatMessage: o } = H();
|
|
2368
2368
|
return /* @__PURE__ */ a.jsxs("div", { className: S("edit-section-placeholder", { "has-icon": !!t }), style: Hs(t), children: [
|
|
2369
2369
|
/* @__PURE__ */ a.jsx("p", { children: e || o({ id: "edit_section_placeholder_description" }) }),
|
|
2370
2370
|
s && /* @__PURE__ */ a.jsx(se, { href: r, variant: "secondary", size: "small", onClick: () => ba({ href: r, setShowModal: i }), children: n || o({ id: "edit_section_placeholder_cta" }) })
|
|
@@ -2379,7 +2379,7 @@ const xi = ({ icon: t, description: e, ctaMessage: n, href: r, showEditButton: s
|
|
|
2379
2379
|
placeholder: o,
|
|
2380
2380
|
showDivider: c = !0
|
|
2381
2381
|
}) => {
|
|
2382
|
-
const [f, l] =
|
|
2382
|
+
const [f, l] = Y.useState(!1), u = typeof r == "string" || !!n, d = () => l(!1);
|
|
2383
2383
|
return /* @__PURE__ */ a.jsxs("section", { className: S("edit-section", e), children: [
|
|
2384
2384
|
n && /* @__PURE__ */ a.jsx(
|
|
2385
2385
|
an,
|
|
@@ -2435,7 +2435,7 @@ const Bl = ({
|
|
|
2435
2435
|
"wrap-logos": o
|
|
2436
2436
|
}),
|
|
2437
2437
|
children: [
|
|
2438
|
-
t &&
|
|
2438
|
+
t && Y.createElement(
|
|
2439
2439
|
i.element,
|
|
2440
2440
|
{ className: S("title", i.className) },
|
|
2441
2441
|
i.text
|
|
@@ -2537,7 +2537,7 @@ const wi = [
|
|
|
2537
2537
|
f.map((d) => {
|
|
2538
2538
|
if (u[d] && typeof u[d] == "object") {
|
|
2539
2539
|
const { text: m, element: p = "" } = u[d];
|
|
2540
|
-
return d === "text" ? /* @__PURE__ */ a.jsx(Ut, { overrideType: "text-only", className: "text", children: m }, d) :
|
|
2540
|
+
return d === "text" ? /* @__PURE__ */ a.jsx(Ut, { overrideType: "text-only", className: "text", children: m }, d) : Y.createElement(p, { key: d, className: d }, m);
|
|
2541
2541
|
}
|
|
2542
2542
|
return null;
|
|
2543
2543
|
}),
|
|
@@ -2655,7 +2655,7 @@ function Si(t) {
|
|
|
2655
2655
|
var e = t.children, n = t.client, r = t.apiKey, s = t.options, i = xt(function() {
|
|
2656
2656
|
return n && r && console.warn("[PostHog.js] You have provided both a client and an apiKey to PostHogProvider. The apiKey will be ignored in favour of the client."), n && s && console.warn("[PostHog.js] You have provided both a client and options to PostHogProvider. The options will be ignored in favour of the client."), n || (r && (It.__loaded && console.warn("[PostHog.js] was already loaded elsewhere. This may cause issues."), It.init(r, s)), It);
|
|
2657
2657
|
}, [n, r]);
|
|
2658
|
-
return
|
|
2658
|
+
return Y.createElement(Ei.Provider, { value: { client: i } }, e);
|
|
2659
2659
|
}
|
|
2660
2660
|
const Ci = ({ children: t, user: e }) => e.isLoading ? null : process.env.REACT_APP_PUBLIC_POSTHOG_KEY ? /* @__PURE__ */ a.jsx(
|
|
2661
2661
|
Si,
|
|
@@ -2692,7 +2692,7 @@ function er() {
|
|
|
2692
2692
|
return Ee(Ie);
|
|
2693
2693
|
}
|
|
2694
2694
|
const Ni = ({ children: t, user: e }) => /* @__PURE__ */ a.jsx(Ie.Provider, { value: e, children: t }), Zl = ({ bootstrap: t, children: e, intl: n, showDevTools: r }) => {
|
|
2695
|
-
const [s, i] =
|
|
2695
|
+
const [s, i] = X({ isLoading: !0 }), o = (n == null ? void 0 : n.locale) || localStorage.getItem("language") || "en", [c, f] = X(o), l = (u) => {
|
|
2696
2696
|
localStorage.setItem("language", u), f(u);
|
|
2697
2697
|
};
|
|
2698
2698
|
return ae(() => {
|
|
@@ -2714,7 +2714,7 @@ const Pi = ({
|
|
|
2714
2714
|
text: n = !1,
|
|
2715
2715
|
className: r = ""
|
|
2716
2716
|
}) => {
|
|
2717
|
-
const s =
|
|
2717
|
+
const s = H(), {
|
|
2718
2718
|
showText: i = !1,
|
|
2719
2719
|
layout: o = "bar",
|
|
2720
2720
|
size: c = "default",
|
|
@@ -2728,7 +2728,7 @@ const Pi = ({
|
|
|
2728
2728
|
[f !== "default" ? f : ""]: f !== "default"
|
|
2729
2729
|
}),
|
|
2730
2730
|
style: u,
|
|
2731
|
-
children:
|
|
2731
|
+
children: Y.createElement(i ? "span" : be, {
|
|
2732
2732
|
className: i ? "text" : "",
|
|
2733
2733
|
children: n || s.formatMessage({ id: "progressBar" }, { number: e })
|
|
2734
2734
|
})
|
|
@@ -2736,7 +2736,7 @@ const Pi = ({
|
|
|
2736
2736
|
);
|
|
2737
2737
|
}, _a = De(Pi);
|
|
2738
2738
|
const vn = "loadingBlock_", Mi = ({ progress: t = 0, steps: e = !1, className: n = "" }) => {
|
|
2739
|
-
const r =
|
|
2739
|
+
const r = H();
|
|
2740
2740
|
e || (e = {
|
|
2741
2741
|
0: { text: r.formatMessage({ id: `${vn}loading` }) },
|
|
2742
2742
|
75: { text: r.formatMessage({ id: `${vn}almostDone` }) },
|
|
@@ -2842,7 +2842,7 @@ const Nr = 256, Ye = ({
|
|
|
2842
2842
|
height: i = Nr,
|
|
2843
2843
|
...o
|
|
2844
2844
|
}) => {
|
|
2845
|
-
const [c, f] =
|
|
2845
|
+
const [c, f] = X(!1), l = pe(null);
|
|
2846
2846
|
ae(() => {
|
|
2847
2847
|
const d = l.current;
|
|
2848
2848
|
if (!d)
|
|
@@ -2905,12 +2905,12 @@ const tr = ({
|
|
|
2905
2905
|
gtmType: s = "member-click",
|
|
2906
2906
|
className: i = ""
|
|
2907
2907
|
}) => {
|
|
2908
|
-
const o =
|
|
2908
|
+
const o = H(), c = ka(e);
|
|
2909
2909
|
c.name || (c.name = o.formatMessage({
|
|
2910
2910
|
id: `member_${typeof e == "string" ? e : "community"}`
|
|
2911
2911
|
}));
|
|
2912
2912
|
const { name: f, url: l, image: u } = c, d = Fi(c), m = n && n.createdAt ? Un(n.createdAt) : !1, p = n && n.createdAt ? ga(n.createdAt) : "";
|
|
2913
|
-
return
|
|
2913
|
+
return Y.createElement(t, {
|
|
2914
2914
|
className: S("member text-medium", i),
|
|
2915
2915
|
children: /* @__PURE__ */ a.jsxs(
|
|
2916
2916
|
at,
|
|
@@ -2956,8 +2956,8 @@ const Pr = {
|
|
|
2956
2956
|
className: l = "",
|
|
2957
2957
|
...u
|
|
2958
2958
|
}) => {
|
|
2959
|
-
const d =
|
|
2960
|
-
return !n || n.length === 0 ? null :
|
|
2959
|
+
const d = H();
|
|
2960
|
+
return !n || n.length === 0 ? null : Y.createElement(t, {
|
|
2961
2961
|
...u,
|
|
2962
2962
|
className: S("contributors", l, s, { "has-gap": i }),
|
|
2963
2963
|
children: /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
@@ -3001,13 +3001,13 @@ const Ct = "emailHelperTextBox_", Oi = ({
|
|
|
3001
3001
|
redirectPath: n,
|
|
3002
3002
|
resendVerificationCode: r
|
|
3003
3003
|
}) => {
|
|
3004
|
-
const s =
|
|
3004
|
+
const s = H(), [i, o] = X({
|
|
3005
3005
|
path: `${Ct}default`,
|
|
3006
3006
|
type: "default",
|
|
3007
3007
|
link: {},
|
|
3008
3008
|
mail: {},
|
|
3009
3009
|
error: ""
|
|
3010
|
-
}), [c, f] =
|
|
3010
|
+
}), [c, f] = X(!1), l = sa(
|
|
3011
3011
|
(p) => {
|
|
3012
3012
|
p.preventDefault(), p.stopPropagation();
|
|
3013
3013
|
const g = (_) => {
|
|
@@ -3148,7 +3148,7 @@ const Ct = "emailHelperTextBox_", Oi = ({
|
|
|
3148
3148
|
...l
|
|
3149
3149
|
}) => {
|
|
3150
3150
|
const u = pe(), d = r || u;
|
|
3151
|
-
return
|
|
3151
|
+
return Y.createElement(e, {
|
|
3152
3152
|
ref: d,
|
|
3153
3153
|
...l,
|
|
3154
3154
|
type: c,
|
|
@@ -3182,15 +3182,15 @@ const Qe = {
|
|
|
3182
3182
|
}) => {
|
|
3183
3183
|
const { onChange: r = () => {
|
|
3184
3184
|
}, onKeyInput: s = async () => {
|
|
3185
|
-
} } = n, [{ input: i, displayInput: o, debouncedInput: c }, f] =
|
|
3185
|
+
} } = n, [{ input: i, displayInput: o, debouncedInput: c }, f] = X({
|
|
3186
3186
|
input: t,
|
|
3187
3187
|
displayInput: t,
|
|
3188
3188
|
debouncedInput: t
|
|
3189
|
-
}), [{ predictions: l, activePredictionIndex: u, isPredictionSelected: d }, m] =
|
|
3189
|
+
}), [{ predictions: l, activePredictionIndex: u, isPredictionSelected: d }, m] = X({
|
|
3190
3190
|
predictions: [],
|
|
3191
3191
|
activePredictionIndex: -1,
|
|
3192
3192
|
isPredictionSelected: !!t
|
|
3193
|
-
}), { formatMessage: p } =
|
|
3193
|
+
}), { formatMessage: p } = H();
|
|
3194
3194
|
e || (e = p({ id: "inputAutocomplete_placeholder" })), ae(() => {
|
|
3195
3195
|
const v = setTimeout(() => {
|
|
3196
3196
|
d || f((b) => ({ ...b, debouncedInput: i }));
|
|
@@ -3202,9 +3202,9 @@ const Qe = {
|
|
|
3202
3202
|
c && !d ? (async () => {
|
|
3203
3203
|
try {
|
|
3204
3204
|
const b = await s(c) || [];
|
|
3205
|
-
m((
|
|
3205
|
+
m((k) => ({ ...k, predictions: b }));
|
|
3206
3206
|
} catch (b) {
|
|
3207
|
-
console.error("Error fetching predictions:", b), m((
|
|
3207
|
+
console.error("Error fetching predictions:", b), m((k) => ({ ...k, predictions: [] }));
|
|
3208
3208
|
}
|
|
3209
3209
|
})() : m((v) => ({ ...v, predictions: [] }));
|
|
3210
3210
|
}, [c, d]), ae(() => {
|
|
@@ -3232,7 +3232,7 @@ const Qe = {
|
|
|
3232
3232
|
"li",
|
|
3233
3233
|
{
|
|
3234
3234
|
onClick: () => y(v),
|
|
3235
|
-
onMouseEnter: () => m((
|
|
3235
|
+
onMouseEnter: () => m((k) => ({ ...k, activePredictionIndex: b })),
|
|
3236
3236
|
className: S("predictions-list-item", { active: b === u }),
|
|
3237
3237
|
children: v.description
|
|
3238
3238
|
},
|
|
@@ -3255,7 +3255,7 @@ const Ea = ({
|
|
|
3255
3255
|
value: u,
|
|
3256
3256
|
...d
|
|
3257
3257
|
}) => {
|
|
3258
|
-
const m =
|
|
3258
|
+
const m = H(), { onChange: p, ...g } = r, _ = () => {
|
|
3259
3259
|
e || p(u ? null : f);
|
|
3260
3260
|
}, y = /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3261
3261
|
/* @__PURE__ */ a.jsx(
|
|
@@ -3279,7 +3279,7 @@ const Ea = ({
|
|
|
3279
3279
|
id: o ? `${o}_${s}` : s
|
|
3280
3280
|
}) })
|
|
3281
3281
|
] });
|
|
3282
|
-
return
|
|
3282
|
+
return Y.createElement(
|
|
3283
3283
|
n,
|
|
3284
3284
|
{
|
|
3285
3285
|
onClick: (v) => {
|
|
@@ -3317,21 +3317,21 @@ const Li = ({
|
|
|
3317
3317
|
multiSelectOptions: f,
|
|
3318
3318
|
id: l
|
|
3319
3319
|
}) => {
|
|
3320
|
-
const u =
|
|
3320
|
+
const u = H(), [d, m] = X(!1), p = r || n, g = Array.isArray(p) ? [...p] : p ? [p] : [], [_, y] = X(g);
|
|
3321
3321
|
let v;
|
|
3322
3322
|
Array.isArray(_) && _.length === 1 && typeof _[0] == "string" ? v = e && _ ? e.find((R) => R.id === _[0]) : e ? e[0] : { id: "", label: "" } : Array.isArray(_) && _.length === 1 && typeof _[0] != "string" ? v = _[0] : v = { id: "", label: "" }, ae(() => {
|
|
3323
3323
|
y(g);
|
|
3324
3324
|
}, [r, n]);
|
|
3325
|
-
const { onChange: b, onMultiSelectSubmit:
|
|
3325
|
+
const { onChange: b, onMultiSelectSubmit: k, ...j } = s, w = (R) => {
|
|
3326
3326
|
if (c) {
|
|
3327
|
-
let
|
|
3328
|
-
_ != null && _.includes(R.id) ?
|
|
3327
|
+
let Q = [];
|
|
3328
|
+
_ != null && _.includes(R.id) ? Q = _.filter((C) => C !== R.id) : Q = [..._, R.id], y([...Q]), b && b([...Q]);
|
|
3329
3329
|
} else
|
|
3330
3330
|
y([R]), b && b(R.id), m(!1);
|
|
3331
|
-
},
|
|
3331
|
+
}, I = (R) => {
|
|
3332
3332
|
if (R === "all") {
|
|
3333
|
-
const
|
|
3334
|
-
y(
|
|
3333
|
+
const Q = (e == null ? void 0 : e.map((C) => C.id)) || [];
|
|
3334
|
+
y(Q), b && b(Q);
|
|
3335
3335
|
} else
|
|
3336
3336
|
y([]), b && b([]);
|
|
3337
3337
|
};
|
|
@@ -3347,7 +3347,7 @@ const Li = ({
|
|
|
3347
3347
|
R.preventDefault(), R.stopPropagation(), m(!d);
|
|
3348
3348
|
},
|
|
3349
3349
|
"data-testid": "dropdown-selector",
|
|
3350
|
-
...
|
|
3350
|
+
...j,
|
|
3351
3351
|
children: [
|
|
3352
3352
|
c ? `${o} · ${_.length}` : v.label,
|
|
3353
3353
|
/* @__PURE__ */ a.jsx(Ii, { direction: d ? "up" : "down" })
|
|
@@ -3360,11 +3360,11 @@ const Li = ({
|
|
|
3360
3360
|
defaultValue: v.id,
|
|
3361
3361
|
onChange: (R) => {
|
|
3362
3362
|
R.preventDefault(), R.stopPropagation();
|
|
3363
|
-
const
|
|
3364
|
-
|
|
3363
|
+
const Q = e && e.find((C) => C.id === R.target.value);
|
|
3364
|
+
w(Q);
|
|
3365
3365
|
},
|
|
3366
3366
|
hidden: !d,
|
|
3367
|
-
...
|
|
3367
|
+
...j,
|
|
3368
3368
|
children: e == null ? void 0 : e.map((R) => /* @__PURE__ */ a.jsx("option", { value: R.id, children: R.label }, R.id))
|
|
3369
3369
|
}
|
|
3370
3370
|
),
|
|
@@ -3384,7 +3384,7 @@ const Li = ({
|
|
|
3384
3384
|
{
|
|
3385
3385
|
variant: "tertiary",
|
|
3386
3386
|
size: "small",
|
|
3387
|
-
onClick: () =>
|
|
3387
|
+
onClick: () => I("all"),
|
|
3388
3388
|
className: "gtm-trackable",
|
|
3389
3389
|
children: u.formatMessage({ id: "dropdown_menu_multiselect_all" })
|
|
3390
3390
|
}
|
|
@@ -3394,7 +3394,7 @@ const Li = ({
|
|
|
3394
3394
|
{
|
|
3395
3395
|
variant: "tertiary",
|
|
3396
3396
|
size: "small",
|
|
3397
|
-
onClick: () =>
|
|
3397
|
+
onClick: () => I("none"),
|
|
3398
3398
|
className: "gtm-trackable",
|
|
3399
3399
|
children: u.formatMessage({ id: "dropdown_menu_multiselect_none" })
|
|
3400
3400
|
}
|
|
@@ -3402,22 +3402,22 @@ const Li = ({
|
|
|
3402
3402
|
] })
|
|
3403
3403
|
] }),
|
|
3404
3404
|
/* @__PURE__ */ a.jsx("ul", { children: e == null ? void 0 : e.map((R) => {
|
|
3405
|
-
const
|
|
3405
|
+
const Q = R.id === v.id || (_ == null ? void 0 : _.includes(R)) || (_ == null ? void 0 : _.includes(R.id));
|
|
3406
3406
|
return /* @__PURE__ */ a.jsx("li", { "data-testid": "dropdown-options", children: /* @__PURE__ */ a.jsxs(
|
|
3407
3407
|
"button",
|
|
3408
3408
|
{
|
|
3409
3409
|
className: S("gtm-trackable", {
|
|
3410
|
-
selected:
|
|
3411
|
-
"selected-single":
|
|
3410
|
+
selected: Q,
|
|
3411
|
+
"selected-single": Q && !c
|
|
3412
3412
|
}),
|
|
3413
3413
|
"data-gtm-event-type": `${R}-click`,
|
|
3414
3414
|
"data-gtm-event-context": i,
|
|
3415
|
-
onClick: (
|
|
3416
|
-
|
|
3415
|
+
onClick: (C) => {
|
|
3416
|
+
C.preventDefault(), C.stopPropagation(), w(R);
|
|
3417
3417
|
},
|
|
3418
3418
|
role: "menuitem",
|
|
3419
|
-
"aria-current":
|
|
3420
|
-
"data-testid":
|
|
3419
|
+
"aria-current": Q,
|
|
3420
|
+
"data-testid": Q ? "current-selection" : "",
|
|
3421
3421
|
children: [
|
|
3422
3422
|
c && /* @__PURE__ */ a.jsx("span", { className: "pretty-checkbox", "data-testid": "pretty-checkbox" }),
|
|
3423
3423
|
/* @__PURE__ */ a.jsx("span", { className: S({ "menu-option-label": c }), children: R.label })
|
|
@@ -3431,7 +3431,7 @@ const Li = ({
|
|
|
3431
3431
|
{
|
|
3432
3432
|
variant: "secondary",
|
|
3433
3433
|
onClick: () => {
|
|
3434
|
-
|
|
3434
|
+
k && k(_), document.dispatchEvent(
|
|
3435
3435
|
new CustomEvent("dropdownMultiSelectSubmit", {
|
|
3436
3436
|
detail: {
|
|
3437
3437
|
id: l || "dropdown-multi-select",
|
|
@@ -3463,7 +3463,7 @@ const Bi = ({
|
|
|
3463
3463
|
value: u,
|
|
3464
3464
|
...d
|
|
3465
3465
|
}) => {
|
|
3466
|
-
const m =
|
|
3466
|
+
const m = H(), p = i ? u : [], g = u;
|
|
3467
3467
|
return /* @__PURE__ */ a.jsx(
|
|
3468
3468
|
"ul",
|
|
3469
3469
|
{
|
|
@@ -3477,28 +3477,28 @@ const Bi = ({
|
|
|
3477
3477
|
value: v = _,
|
|
3478
3478
|
disabled: b = !1
|
|
3479
3479
|
}) => {
|
|
3480
|
-
const
|
|
3480
|
+
const k = `${r}_${_}`, j = () => {
|
|
3481
3481
|
if (b)
|
|
3482
3482
|
return;
|
|
3483
|
-
let
|
|
3483
|
+
let w;
|
|
3484
3484
|
if (i) {
|
|
3485
|
-
const
|
|
3486
|
-
Array.isArray(p) &&
|
|
3485
|
+
const I = p == null ? void 0 : p.indexOf(v);
|
|
3486
|
+
Array.isArray(p) && I >= 0 ? (w = p, w.splice(I, 1)) : (!p || p.length === 0 ? w = [] : w = p, w.push(v));
|
|
3487
3487
|
} else
|
|
3488
|
-
|
|
3489
|
-
e.onChange(
|
|
3488
|
+
w = g === v ? void 0 : v;
|
|
3489
|
+
e.onChange(w);
|
|
3490
3490
|
};
|
|
3491
3491
|
return /* @__PURE__ */ a.jsx(
|
|
3492
3492
|
Ea,
|
|
3493
3493
|
{
|
|
3494
3494
|
element: "li",
|
|
3495
|
-
id:
|
|
3495
|
+
id: k,
|
|
3496
3496
|
type: l === "checkboxes" ? "checkbox" : "radio",
|
|
3497
3497
|
shownValue: v,
|
|
3498
3498
|
value: i ? p == null ? void 0 : p.includes(v) : g === v,
|
|
3499
3499
|
functions: {
|
|
3500
3500
|
...e,
|
|
3501
|
-
onChange:
|
|
3501
|
+
onChange: j
|
|
3502
3502
|
},
|
|
3503
3503
|
intlPath: n,
|
|
3504
3504
|
label: y || m.formatMessage({
|
|
@@ -3506,7 +3506,7 @@ const Bi = ({
|
|
|
3506
3506
|
}),
|
|
3507
3507
|
disabled: b
|
|
3508
3508
|
},
|
|
3509
|
-
|
|
3509
|
+
k
|
|
3510
3510
|
);
|
|
3511
3511
|
}
|
|
3512
3512
|
)
|
|
@@ -3519,7 +3519,7 @@ const qi = ({
|
|
|
3519
3519
|
gtm: { context: n } = { context: void 0 },
|
|
3520
3520
|
...r
|
|
3521
3521
|
}) => {
|
|
3522
|
-
const s =
|
|
3522
|
+
const s = H(), i = pe(), o = t || i, [c, f] = X(!1), [l, u] = X(e), d = () => {
|
|
3523
3523
|
var m;
|
|
3524
3524
|
f(!c), u(c ? "password" : "text"), (m = o.current) == null || m.focus();
|
|
3525
3525
|
};
|
|
@@ -3568,7 +3568,7 @@ const Je = {
|
|
|
3568
3568
|
value: l,
|
|
3569
3569
|
...u
|
|
3570
3570
|
}) => {
|
|
3571
|
-
const d =
|
|
3571
|
+
const d = H(), m = f && f.some(({ condition: j }) => j === "required"), p = (l == null ? void 0 : l.toString().length) || 0, g = c && Je[c] && Je[c].component ? Je[c].component : gt, _ = {};
|
|
3572
3572
|
c && ["checkboxes"].includes(c) ? _.element = "span" : _.htmlFor = t;
|
|
3573
3573
|
let y = {
|
|
3574
3574
|
...u,
|
|
@@ -3581,17 +3581,17 @@ const Je = {
|
|
|
3581
3581
|
functions: pt(s),
|
|
3582
3582
|
value: l
|
|
3583
3583
|
};
|
|
3584
|
-
i > 0 && (y["data-character-limit"] = i, y.functions && (y.functions.onChange = (
|
|
3585
|
-
((
|
|
3584
|
+
i > 0 && (y["data-character-limit"] = i, y.functions && (y.functions.onChange = (j) => {
|
|
3585
|
+
((j == null ? void 0 : j.toString().length) || 0) > i && (j = j == null ? void 0 : j.toString().slice(0, i)), s.onChange(j);
|
|
3586
3586
|
})), c && Je[c] && Je[c].props && (y = { ...y, ...Je[c].props }), c && ["checkboxes"].includes(c) && (y.intlPath = `${e}_${t}`), r && (y["aria-invalid"] = !0, y["aria-describedby"] = `error-${t}`);
|
|
3587
|
-
const v = u.label || d.formatMessage({ id: e ? `${e}_${t}` : t }), b = ({ ...
|
|
3588
|
-
|
|
3587
|
+
const v = u.label || d.formatMessage({ id: e ? `${e}_${t}` : t }), b = ({ ...j }) => r ? Y.createElement(
|
|
3588
|
+
j.as || "dd",
|
|
3589
3589
|
{
|
|
3590
3590
|
id: `error-${t}`,
|
|
3591
3591
|
className: "error text-small",
|
|
3592
3592
|
role: "alert",
|
|
3593
3593
|
"aria-live": "assertive",
|
|
3594
|
-
...
|
|
3594
|
+
...j
|
|
3595
3595
|
},
|
|
3596
3596
|
r
|
|
3597
3597
|
) : null;
|
|
@@ -3607,13 +3607,13 @@ const Je = {
|
|
|
3607
3607
|
),
|
|
3608
3608
|
/* @__PURE__ */ a.jsx(b, { as: "p" })
|
|
3609
3609
|
] });
|
|
3610
|
-
const
|
|
3611
|
-
...
|
|
3610
|
+
const k = (j) => Y.createElement(j.element || "label", {
|
|
3611
|
+
...j,
|
|
3612
3612
|
className: "checkboxes-label text-small",
|
|
3613
3613
|
"data-testid": `label-${t}`
|
|
3614
3614
|
});
|
|
3615
3615
|
return /* @__PURE__ */ a.jsxs("dl", { className: S("field-wrapper text-medium", n), children: [
|
|
3616
|
-
/* @__PURE__ */ a.jsx("dt", { children: /* @__PURE__ */ a.jsxs(
|
|
3616
|
+
/* @__PURE__ */ a.jsx("dt", { children: /* @__PURE__ */ a.jsxs(k, { ..._, children: [
|
|
3617
3617
|
v,
|
|
3618
3618
|
m && o && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3619
3619
|
" ",
|
|
@@ -3758,26 +3758,16 @@ const rn = ({
|
|
|
3758
3758
|
variant: "secondary",
|
|
3759
3759
|
size: "large"
|
|
3760
3760
|
},
|
|
3761
|
-
meta:
|
|
3762
|
-
|
|
3763
|
-
shouldReset: f = !0,
|
|
3764
|
-
showRequiredLabels: l = !0,
|
|
3765
|
-
showSuccessMessage: u = !1
|
|
3766
|
-
} = {
|
|
3767
|
-
shouldShowCancelButton: !1,
|
|
3768
|
-
shouldReset: !0,
|
|
3769
|
-
showRequiredLabels: !0,
|
|
3770
|
-
showSuccessMessage: !1
|
|
3771
|
-
},
|
|
3772
|
-
gtm: d = { context: "Form", event: "form-submit-click" },
|
|
3761
|
+
meta: c,
|
|
3762
|
+
gtm: f = { context: "Form", event: "form-submit-click" },
|
|
3773
3763
|
functions: {
|
|
3774
|
-
onSuccess:
|
|
3764
|
+
onSuccess: l = async () => {
|
|
3775
3765
|
},
|
|
3776
|
-
onCancel:
|
|
3766
|
+
onCancel: u = () => {
|
|
3777
3767
|
},
|
|
3778
|
-
onCatch:
|
|
3768
|
+
onCatch: d = () => {
|
|
3779
3769
|
},
|
|
3780
|
-
onFailure:
|
|
3770
|
+
onFailure: m = () => {
|
|
3781
3771
|
}
|
|
3782
3772
|
} = {
|
|
3783
3773
|
onSuccess: async () => {
|
|
@@ -3789,174 +3779,179 @@ const rn = ({
|
|
|
3789
3779
|
onFailure: () => {
|
|
3790
3780
|
}
|
|
3791
3781
|
},
|
|
3792
|
-
...
|
|
3782
|
+
...p
|
|
3793
3783
|
}) => {
|
|
3794
|
-
const { customOnSubmit:
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3784
|
+
const { customOnSubmit: g, hideButton: _, ...y } = i, v = 40, {
|
|
3785
|
+
shouldShowCancelButton: b = !1,
|
|
3786
|
+
shouldReset: k = !0,
|
|
3787
|
+
showRequiredLabels: j = !0,
|
|
3788
|
+
showSuccessMessage: w = !1
|
|
3789
|
+
} = c || {}, I = H(), R = {};
|
|
3790
|
+
t.length && t.forEach((z) => {
|
|
3791
|
+
const K = z.id || z.name;
|
|
3792
|
+
K && (R[K] = z.value || "");
|
|
3798
3793
|
});
|
|
3799
|
-
const [
|
|
3794
|
+
const [Q, C] = Yn(Wi, {
|
|
3800
3795
|
isSubmitting: !1,
|
|
3801
3796
|
formSubmitted: !1,
|
|
3802
3797
|
errors: {},
|
|
3803
|
-
values:
|
|
3804
|
-
}), { errors:
|
|
3798
|
+
values: R
|
|
3799
|
+
}), { errors: F, isSubmitting: $, formSubmitted: T, values: x } = Q;
|
|
3805
3800
|
ae(() => {
|
|
3806
|
-
|
|
3807
|
-
|
|
3801
|
+
k && T && (bn = setTimeout(() => {
|
|
3802
|
+
C({
|
|
3808
3803
|
type: "updateValue",
|
|
3809
3804
|
payload: { key: "formSubmitted", value: !1 }
|
|
3810
3805
|
});
|
|
3811
3806
|
}, 3e3));
|
|
3812
|
-
}, [
|
|
3807
|
+
}, [T]), ae(() => () => {
|
|
3813
3808
|
bn && clearTimeout(bn);
|
|
3814
3809
|
}, []), ae(() => {
|
|
3815
|
-
const
|
|
3816
|
-
|
|
3810
|
+
const z = (K) => {
|
|
3811
|
+
C({
|
|
3817
3812
|
type: "updateValue",
|
|
3818
|
-
payload: { key:
|
|
3813
|
+
payload: { key: K.detail.id, value: K.detail.value }
|
|
3819
3814
|
});
|
|
3820
3815
|
};
|
|
3821
3816
|
return document.addEventListener(
|
|
3822
3817
|
"dropdownMultiSelectSubmit",
|
|
3823
|
-
|
|
3818
|
+
z
|
|
3824
3819
|
), () => {
|
|
3825
3820
|
document.removeEventListener(
|
|
3826
3821
|
"dropdownMultiSelectSubmit",
|
|
3827
|
-
|
|
3822
|
+
z
|
|
3828
3823
|
);
|
|
3829
3824
|
};
|
|
3830
3825
|
}, []);
|
|
3831
|
-
const
|
|
3826
|
+
const N = pe(null), A = r || N;
|
|
3832
3827
|
if (!t.length)
|
|
3833
3828
|
return null;
|
|
3834
|
-
i.text || (i.text =
|
|
3835
|
-
const
|
|
3829
|
+
i.text || (i.text = I.formatMessage({ id: "form_submit" }));
|
|
3830
|
+
const Z = [
|
|
3836
3831
|
{
|
|
3837
|
-
...
|
|
3838
|
-
icon:
|
|
3832
|
+
...y,
|
|
3833
|
+
icon: T ? { icon: "tick", position: "left" } : !1,
|
|
3839
3834
|
className: "gtm-trackable",
|
|
3840
|
-
onClick: (
|
|
3841
|
-
var
|
|
3842
|
-
if (
|
|
3835
|
+
onClick: (z) => {
|
|
3836
|
+
var P;
|
|
3837
|
+
if (z.preventDefault(), z.stopPropagation(), $)
|
|
3843
3838
|
return;
|
|
3844
|
-
let
|
|
3845
|
-
if ((
|
|
3846
|
-
const
|
|
3847
|
-
|
|
3839
|
+
let K = 0;
|
|
3840
|
+
if ((P = A == null ? void 0 : A.current) != null && P.id) {
|
|
3841
|
+
const q = document.getElementById(A.current.id);
|
|
3842
|
+
q && (K = q.getBoundingClientRect().top + window.scrollY);
|
|
3848
3843
|
}
|
|
3849
|
-
const
|
|
3850
|
-
if (
|
|
3851
|
-
typeof i.disabled == "object" && i.disabled.isClickable &&
|
|
3844
|
+
const E = document.getElementById("header");
|
|
3845
|
+
if (E && (K = K - E.offsetHeight - v), K < 0 && (K = 0), window.scrollTo({ top: K, behavior: "smooth" }), C({ type: "toggleSubmitting" }), i.disabled) {
|
|
3846
|
+
typeof i.disabled == "object" && i.disabled.isClickable && C({
|
|
3852
3847
|
type: "submitForm",
|
|
3853
3848
|
payload: {
|
|
3854
3849
|
fields: t,
|
|
3855
|
-
dispatch:
|
|
3856
|
-
intl:
|
|
3850
|
+
dispatch: C,
|
|
3851
|
+
intl: I
|
|
3857
3852
|
}
|
|
3858
3853
|
});
|
|
3859
3854
|
return;
|
|
3860
3855
|
}
|
|
3861
|
-
|
|
3856
|
+
C({
|
|
3862
3857
|
type: "submitForm",
|
|
3863
3858
|
payload: {
|
|
3864
3859
|
fields: t,
|
|
3865
|
-
dispatch:
|
|
3866
|
-
onSuccess: async (
|
|
3860
|
+
dispatch: C,
|
|
3861
|
+
onSuccess: async (q) => {
|
|
3867
3862
|
try {
|
|
3868
|
-
await
|
|
3869
|
-
} catch (
|
|
3870
|
-
|
|
3863
|
+
await l(q), C({ type: k ? "formSubmittedAndReset" : "formSubmitted" });
|
|
3864
|
+
} catch (B) {
|
|
3865
|
+
d(B), C({
|
|
3871
3866
|
type: "updateValue",
|
|
3872
3867
|
payload: { key: "isSubmitting", value: !1 }
|
|
3873
3868
|
});
|
|
3874
3869
|
}
|
|
3875
3870
|
},
|
|
3876
|
-
onFailure: (
|
|
3877
|
-
|
|
3871
|
+
onFailure: (q, B) => {
|
|
3872
|
+
m(q, B), C({
|
|
3878
3873
|
type: "updateValue",
|
|
3879
3874
|
payload: { key: "isSubmitting", value: !1 }
|
|
3880
3875
|
});
|
|
3881
3876
|
},
|
|
3882
|
-
intl:
|
|
3877
|
+
intl: I
|
|
3883
3878
|
}
|
|
3884
3879
|
});
|
|
3885
3880
|
},
|
|
3886
|
-
disabled:
|
|
3887
|
-
"data-gtm-event-context":
|
|
3888
|
-
"data-gtm-event-type":
|
|
3889
|
-
children:
|
|
3890
|
-
id: `form_${
|
|
3881
|
+
disabled: $ || T || i.disabled,
|
|
3882
|
+
"data-gtm-event-context": f.context,
|
|
3883
|
+
"data-gtm-event-type": f.event,
|
|
3884
|
+
children: $ || T ? I.formatMessage({
|
|
3885
|
+
id: `form_${$ ? "submitting" : "submitted"}`
|
|
3891
3886
|
}) : i.text
|
|
3892
3887
|
}
|
|
3893
3888
|
];
|
|
3894
|
-
return
|
|
3889
|
+
return b && Z.unshift({
|
|
3895
3890
|
...o,
|
|
3896
3891
|
className: "gtm-trackable",
|
|
3897
|
-
"data-gtm-event-context":
|
|
3898
|
-
"data-gtm-event-type":
|
|
3899
|
-
disabled:
|
|
3900
|
-
onClick:
|
|
3901
|
-
children: o.text ||
|
|
3892
|
+
"data-gtm-event-context": f.context,
|
|
3893
|
+
"data-gtm-event-type": f.event,
|
|
3894
|
+
disabled: $ || T,
|
|
3895
|
+
onClick: u,
|
|
3896
|
+
children: o.text || I.formatMessage({ id: "form_cancel" })
|
|
3902
3897
|
}), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3903
3898
|
/* @__PURE__ */ a.jsxs(
|
|
3904
3899
|
"form",
|
|
3905
3900
|
{
|
|
3906
|
-
...
|
|
3901
|
+
...p,
|
|
3907
3902
|
id: n,
|
|
3908
3903
|
className: S("form", e),
|
|
3909
|
-
ref:
|
|
3904
|
+
ref: A,
|
|
3910
3905
|
children: [
|
|
3911
|
-
|
|
3906
|
+
F != null && F.general ? /* @__PURE__ */ a.jsx(
|
|
3912
3907
|
He,
|
|
3913
3908
|
{
|
|
3914
3909
|
variant: "error",
|
|
3915
|
-
text:
|
|
3910
|
+
text: I.formatMessage({ id: "form_error_generalError" })
|
|
3916
3911
|
}
|
|
3917
3912
|
) : null,
|
|
3918
|
-
(!
|
|
3913
|
+
(!k || !$ && !T || g) && t.map((z, K) => {
|
|
3919
3914
|
const {
|
|
3920
|
-
id:
|
|
3921
|
-
component:
|
|
3922
|
-
functions:
|
|
3915
|
+
id: E = z.name || K,
|
|
3916
|
+
component: P,
|
|
3917
|
+
functions: q = { onChange: () => {
|
|
3923
3918
|
} }
|
|
3924
|
-
} =
|
|
3925
|
-
if (
|
|
3926
|
-
return /* @__PURE__ */ a.jsx(
|
|
3927
|
-
const
|
|
3919
|
+
} = z;
|
|
3920
|
+
if (P)
|
|
3921
|
+
return /* @__PURE__ */ a.jsx(P, { ...z.props || {} }, `component-${E}-${K}`);
|
|
3922
|
+
const B = x ? x[E] : "";
|
|
3928
3923
|
return /* @__PURE__ */ a.jsx(
|
|
3929
3924
|
Ui,
|
|
3930
3925
|
{
|
|
3931
3926
|
intlPath: s,
|
|
3932
|
-
...
|
|
3933
|
-
showRequiredLabels:
|
|
3934
|
-
value:
|
|
3935
|
-
error:
|
|
3927
|
+
...z,
|
|
3928
|
+
showRequiredLabels: j,
|
|
3929
|
+
value: B,
|
|
3930
|
+
error: F == null ? void 0 : F[E],
|
|
3936
3931
|
functions: {
|
|
3937
|
-
...
|
|
3938
|
-
onChange: (
|
|
3939
|
-
|
|
3932
|
+
...q,
|
|
3933
|
+
onChange: (U) => {
|
|
3934
|
+
C({ type: "updateValue", payload: { key: E, value: U } }), q.onChange(U && U.toString(), C);
|
|
3940
3935
|
}
|
|
3941
3936
|
}
|
|
3942
3937
|
},
|
|
3943
|
-
|
|
3938
|
+
E
|
|
3944
3939
|
);
|
|
3945
3940
|
}),
|
|
3946
|
-
|
|
3941
|
+
_ ? null : ($ || T) && g ? g : /* @__PURE__ */ a.jsx(
|
|
3947
3942
|
jt,
|
|
3948
3943
|
{
|
|
3949
3944
|
className: S("cta", {
|
|
3950
|
-
center:
|
|
3951
|
-
submitted:
|
|
3945
|
+
center: $ || T,
|
|
3946
|
+
submitted: T
|
|
3952
3947
|
}),
|
|
3953
|
-
buttons:
|
|
3948
|
+
buttons: Z
|
|
3954
3949
|
}
|
|
3955
3950
|
)
|
|
3956
3951
|
]
|
|
3957
3952
|
}
|
|
3958
3953
|
),
|
|
3959
|
-
|
|
3954
|
+
w && T && /* @__PURE__ */ a.jsx(Wt, { className: "success", children: typeof w == "string" ? w : I.formatMessage({ id: "form_success" }) })
|
|
3960
3955
|
] });
|
|
3961
3956
|
};
|
|
3962
3957
|
const $t = "passwordRules_", Sa = "isMoreThanEightCharacters", Ca = "includesNumberAndSymbol", $a = "includesLowerAndUppercase", zi = {
|
|
@@ -3971,7 +3966,7 @@ const $t = "passwordRules_", Sa = "isMoreThanEightCharacters", Ca = "includesNum
|
|
|
3971
3966
|
},
|
|
3972
3967
|
className: e = ""
|
|
3973
3968
|
}) => {
|
|
3974
|
-
const n =
|
|
3969
|
+
const n = H();
|
|
3975
3970
|
return /* @__PURE__ */ a.jsxs("aside", { className: S("password-rules", e), children: [
|
|
3976
3971
|
/* @__PURE__ */ a.jsx("small", { children: n.formatMessage({ id: `${$t}intro` }) }),
|
|
3977
3972
|
/* @__PURE__ */ a.jsx("ul", { children: [Sa, Ca, $a].map(
|
|
@@ -4009,7 +4004,7 @@ const Vl = ({
|
|
|
4009
4004
|
className: i = "",
|
|
4010
4005
|
hasLoaded: o = !1
|
|
4011
4006
|
}) => {
|
|
4012
|
-
const c =
|
|
4007
|
+
const c = H(), [f, l] = X({
|
|
4013
4008
|
setUp: !1,
|
|
4014
4009
|
id: null,
|
|
4015
4010
|
rating: null,
|
|
@@ -4042,7 +4037,7 @@ const Vl = ({
|
|
|
4042
4037
|
try {
|
|
4043
4038
|
l((b) => ({ ...b, rating: v, disabled: !0 })), await r({ id: d, value: v });
|
|
4044
4039
|
} catch (b) {
|
|
4045
|
-
l((
|
|
4040
|
+
l((k) => ({ ...k, rating: null })), s(b);
|
|
4046
4041
|
} finally {
|
|
4047
4042
|
l((b) => ({ ...b, disabled: !1 }));
|
|
4048
4043
|
}
|
|
@@ -4069,8 +4064,8 @@ const Vl = ({
|
|
|
4069
4064
|
{ id: `${g}stars` },
|
|
4070
4065
|
{ number: b, total: e }
|
|
4071
4066
|
)}${b === 1 || b === e ? ` - ${_[b === 1 ? "low" : "high"]}` : ""}`,
|
|
4072
|
-
onClick: (
|
|
4073
|
-
|
|
4067
|
+
onClick: (k) => {
|
|
4068
|
+
k.preventDefault(), k.stopPropagation(), y(b);
|
|
4074
4069
|
},
|
|
4075
4070
|
disabled: p
|
|
4076
4071
|
}
|
|
@@ -4091,7 +4086,7 @@ const Yl = ({
|
|
|
4091
4086
|
isDisabled: i = !1,
|
|
4092
4087
|
className: o = ""
|
|
4093
4088
|
}) => {
|
|
4094
|
-
const [c, f] =
|
|
4089
|
+
const [c, f] = X(
|
|
4095
4090
|
typeof r == "boolean" || typeof r == "string" ? r : n[0].value
|
|
4096
4091
|
);
|
|
4097
4092
|
ae(() => {
|
|
@@ -4141,7 +4136,7 @@ const Yl = ({
|
|
|
4141
4136
|
);
|
|
4142
4137
|
};
|
|
4143
4138
|
function Kl({ className: t = "", userId: e, userName: n, src: r, setUserImage: s, uploadImage: i }) {
|
|
4144
|
-
const [o, c] =
|
|
4139
|
+
const [o, c] = X(!1), [f, l] = X(!1), u = pe(null), d = async (m) => {
|
|
4145
4140
|
c(!0), l(!1);
|
|
4146
4141
|
try {
|
|
4147
4142
|
const p = m.target.files && m.target.files[0];
|
|
@@ -4252,26 +4247,26 @@ const Yi = ({
|
|
|
4252
4247
|
initialFormStatus: l = "NOT_SUBMITTED"
|
|
4253
4248
|
/* NOT_SUBMITTED */
|
|
4254
4249
|
}) => {
|
|
4255
|
-
const [u, d] =
|
|
4256
|
-
|
|
4250
|
+
const [u, d] = X([]), [m, p] = X(!0), [g, _] = X(l), { formatMessage: y } = H(), v = async (j) => {
|
|
4251
|
+
j.preventDefault();
|
|
4257
4252
|
try {
|
|
4258
4253
|
await f(u), d([]), _(
|
|
4259
4254
|
"SUCCESS"
|
|
4260
4255
|
/* SUCCESS */
|
|
4261
4256
|
);
|
|
4262
|
-
} catch (
|
|
4257
|
+
} catch (w) {
|
|
4263
4258
|
_(
|
|
4264
4259
|
"ERROR"
|
|
4265
4260
|
/* ERROR */
|
|
4266
|
-
), c(
|
|
4261
|
+
), c(w);
|
|
4267
4262
|
}
|
|
4268
|
-
}, b = (
|
|
4269
|
-
|
|
4263
|
+
}, b = (j) => {
|
|
4264
|
+
j.preventDefault(), _(
|
|
4270
4265
|
"NOT_SUBMITTED"
|
|
4271
4266
|
/* NOT_SUBMITTED */
|
|
4272
4267
|
), p(!0), d([]);
|
|
4273
|
-
},
|
|
4274
|
-
|
|
4268
|
+
}, k = (j) => {
|
|
4269
|
+
j.preventDefault(), o(), _(
|
|
4275
4270
|
"CLOSED"
|
|
4276
4271
|
/* CLOSED */
|
|
4277
4272
|
);
|
|
@@ -4284,7 +4279,7 @@ const Yi = ({
|
|
|
4284
4279
|
/* @__PURE__ */ a.jsx(Ae, {}),
|
|
4285
4280
|
/* @__PURE__ */ a.jsx("div", { className: "footer", children: g === "SUCCESS" ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
4286
4281
|
/* @__PURE__ */ a.jsx(se, { variant: "secondary", onClick: b, children: y({ id: "inviteForm_ctaSendMoreInvites" }) }),
|
|
4287
|
-
/* @__PURE__ */ a.jsx(se, { onClick:
|
|
4282
|
+
/* @__PURE__ */ a.jsx(se, { onClick: k, children: y({ id: "inviteForm_ctaDone" }) })
|
|
4288
4283
|
] }) : /* @__PURE__ */ a.jsx(se, { onClick: b, children: y({ id: "inviteForm_ctaTryAgain" }) }) })
|
|
4289
4284
|
] }) : /* @__PURE__ */ a.jsx("div", { className: "invite-form-wrapper", children: /* @__PURE__ */ a.jsxs(
|
|
4290
4285
|
"form",
|
|
@@ -4303,12 +4298,12 @@ const Yi = ({
|
|
|
4303
4298
|
inputClassName: "email-input input",
|
|
4304
4299
|
placeholder: y({ id: "inviteForm_email_placeholder" }),
|
|
4305
4300
|
emails: u,
|
|
4306
|
-
onChange: (
|
|
4307
|
-
d(
|
|
4301
|
+
onChange: (j) => {
|
|
4302
|
+
d(j), p(!j.length);
|
|
4308
4303
|
},
|
|
4309
4304
|
autoFocus: !1,
|
|
4310
|
-
getLabel: (
|
|
4311
|
-
/* @__PURE__ */ a.jsx("div", { "data-tag-item": !0, children:
|
|
4305
|
+
getLabel: (j, w, I) => /* @__PURE__ */ a.jsxs("div", { className: "email text-medium", children: [
|
|
4306
|
+
/* @__PURE__ */ a.jsx("div", { "data-tag-item": !0, children: j }),
|
|
4312
4307
|
/* @__PURE__ */ a.jsx(
|
|
4313
4308
|
se,
|
|
4314
4309
|
{
|
|
@@ -4316,13 +4311,13 @@ const Yi = ({
|
|
|
4316
4311
|
size: "small",
|
|
4317
4312
|
icon: { icon: "close" },
|
|
4318
4313
|
onClick: () => {
|
|
4319
|
-
|
|
4314
|
+
I(w), p(!u.length);
|
|
4320
4315
|
},
|
|
4321
4316
|
className: "remove-email-button",
|
|
4322
4317
|
screenreaderText: y({ id: "overlay_close" })
|
|
4323
4318
|
}
|
|
4324
4319
|
)
|
|
4325
|
-
] },
|
|
4320
|
+
] }, w)
|
|
4326
4321
|
}
|
|
4327
4322
|
)
|
|
4328
4323
|
] }),
|
|
@@ -4337,7 +4332,7 @@ const Yi = ({
|
|
|
4337
4332
|
CONFIRMED_PASSWORD: "confirmedPassword",
|
|
4338
4333
|
CURRENT_PASSWORD: "oldPassword"
|
|
4339
4334
|
}, Gl = ({ functions: t, ...e }) => {
|
|
4340
|
-
const { formatMessage: n } =
|
|
4335
|
+
const { formatMessage: n } = H(), [r, s] = X(null), [i, o] = X(!1), [c, f] = X({
|
|
4341
4336
|
isMoreThanEightCharacters: !1,
|
|
4342
4337
|
includesNumberAndSymbol: !1,
|
|
4343
4338
|
includesLowerAndUppercase: !1
|
|
@@ -4408,7 +4403,7 @@ const Ki = ({
|
|
|
4408
4403
|
gtmContext: s = "search-bar",
|
|
4409
4404
|
gtmEvent: i = "form-submission"
|
|
4410
4405
|
}) => {
|
|
4411
|
-
const { searchIsOpen: o = !0, isDesktopVersion: c = !1 } = n || {}, f =
|
|
4406
|
+
const { searchIsOpen: o = !0, isDesktopVersion: c = !1 } = n || {}, f = H(), l = pe(null);
|
|
4412
4407
|
_t(() => {
|
|
4413
4408
|
!n || c || !o || l.current && l.current.focus();
|
|
4414
4409
|
}, [o]);
|
|
@@ -4501,6 +4496,7 @@ const Ki = ({
|
|
|
4501
4496
|
const { valid: c = !1, autoApproved: f = !1, exists: l } = o;
|
|
4502
4497
|
let u = "";
|
|
4503
4498
|
return c ? u = f ? "gov" : "nonGov" : l.registration ? l.engagement && !l.user ? u = l.auth ? "verify" : "pending" : u = "exists" : l.auth && (u = "exists"), n([
|
|
4499
|
+
{ type: "shouldDisableButton", value: !1 },
|
|
4504
4500
|
{ type: "shouldManuallyApprove", value: !f },
|
|
4505
4501
|
{
|
|
4506
4502
|
type: "emailDetails",
|
|
@@ -4517,7 +4513,7 @@ const Ki = ({
|
|
|
4517
4513
|
for (const n of t.entries())
|
|
4518
4514
|
e[n[0]] = n[1];
|
|
4519
4515
|
return {
|
|
4520
|
-
name: e.full_name,
|
|
4516
|
+
name: e.full_name.toString().trim(),
|
|
4521
4517
|
email: e.email_address.toString().toLowerCase().trim(),
|
|
4522
4518
|
jobTitle: e.job_title,
|
|
4523
4519
|
organization: e.organization,
|
|
@@ -4582,7 +4578,7 @@ const Ki = ({
|
|
|
4582
4578
|
Mr({ ref: r.email, validateEmail: e, dispatch: i });
|
|
4583
4579
|
},
|
|
4584
4580
|
onChange: (d, m) => {
|
|
4585
|
-
m && m({
|
|
4581
|
+
i([{ type: "shouldDisableButton", value: !0 }]), m && m({
|
|
4586
4582
|
type: "updateValue",
|
|
4587
4583
|
payload: { key: "terms", value: !1 }
|
|
4588
4584
|
});
|
|
@@ -4729,6 +4725,7 @@ const eo = {
|
|
|
4729
4725
|
},
|
|
4730
4726
|
emailDetails: { email: "", boxType: "", isEnd2End: !1 },
|
|
4731
4727
|
shouldManuallyApprove: !1,
|
|
4728
|
+
shouldDisableButton: !0,
|
|
4732
4729
|
loadRecaptcha: !1,
|
|
4733
4730
|
showSuccessMessage: !1,
|
|
4734
4731
|
showError: !1
|
|
@@ -4742,65 +4739,69 @@ const eo = {
|
|
|
4742
4739
|
resendVerificationCode: () => {
|
|
4743
4740
|
}
|
|
4744
4741
|
},
|
|
4745
|
-
shouldShow: n = {
|
|
4746
|
-
title: !0,
|
|
4747
|
-
expectation: !1,
|
|
4748
|
-
url: !0,
|
|
4749
|
-
logInButton: !0,
|
|
4750
|
-
successMessage: !0
|
|
4751
|
-
},
|
|
4742
|
+
shouldShow: n = {},
|
|
4752
4743
|
submitButton: r,
|
|
4753
4744
|
dataToSubmit: s = { ref: "sign-up-form" },
|
|
4754
4745
|
...i
|
|
4755
4746
|
}) => {
|
|
4756
|
-
const o =
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
} =
|
|
4747
|
+
const o = H(), {
|
|
4748
|
+
title: c = !0,
|
|
4749
|
+
expectation: f = !1,
|
|
4750
|
+
url: l = !0,
|
|
4751
|
+
logInButton: u = !0,
|
|
4752
|
+
successMessage: d = !0
|
|
4753
|
+
} = n, m = {
|
|
4754
|
+
title: c,
|
|
4755
|
+
expectation: f,
|
|
4756
|
+
url: l,
|
|
4757
|
+
logInButton: u,
|
|
4758
|
+
successMessage: d
|
|
4759
|
+
}, [p, g] = Yn(ma, eo), {
|
|
4760
|
+
validFields: _,
|
|
4761
|
+
emailDetails: y,
|
|
4762
|
+
shouldManuallyApprove: v,
|
|
4763
|
+
shouldDisableButton: b,
|
|
4764
|
+
showSuccessMessage: k,
|
|
4765
|
+
showError: j
|
|
4766
|
+
} = p, [w, I] = oa([
|
|
4763
4767
|
"signup-this-session",
|
|
4764
4768
|
"functional-cookie-consent"
|
|
4765
|
-
]),
|
|
4766
|
-
form:
|
|
4767
|
-
name:
|
|
4768
|
-
email:
|
|
4769
|
-
jobTitle:
|
|
4770
|
-
organisation:
|
|
4771
|
-
tc:
|
|
4772
|
-
hiddenValidation:
|
|
4769
|
+
]), R = {
|
|
4770
|
+
form: Y.createRef(),
|
|
4771
|
+
name: Y.createRef(),
|
|
4772
|
+
email: Y.createRef(),
|
|
4773
|
+
jobTitle: Y.createRef(),
|
|
4774
|
+
organisation: Y.createRef(),
|
|
4775
|
+
tc: Y.createRef(),
|
|
4776
|
+
hiddenValidation: Y.createRef()
|
|
4773
4777
|
};
|
|
4774
4778
|
ae(() => {
|
|
4775
|
-
|
|
4776
|
-
}, [
|
|
4777
|
-
|
|
4778
|
-
}, [
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
}, [m]);
|
|
4787
|
-
const v = xt(() => Ji({
|
|
4788
|
-
shouldShow: n,
|
|
4779
|
+
v === !0 && R.jobTitle.current && R.jobTitle.current.focus();
|
|
4780
|
+
}, [v]), ae(() => {
|
|
4781
|
+
w["signup-this-session"] && g([{ type: "showSuccessMessage", value: !0 }]);
|
|
4782
|
+
}, [w]), ae(() => {
|
|
4783
|
+
k && w["functional-cookie-consent"] && I("signup-this-session", "true", {
|
|
4784
|
+
path: "/",
|
|
4785
|
+
maxAge: 3600
|
|
4786
|
+
});
|
|
4787
|
+
}, [k]);
|
|
4788
|
+
const Q = xt(() => Ji({
|
|
4789
|
+
shouldShow: m,
|
|
4789
4790
|
functions: e,
|
|
4790
|
-
refs:
|
|
4791
|
-
state:
|
|
4792
|
-
dispatch:
|
|
4791
|
+
refs: R,
|
|
4792
|
+
state: p,
|
|
4793
|
+
dispatch: g,
|
|
4793
4794
|
dataToSubmit: s,
|
|
4794
4795
|
intl: o
|
|
4795
|
-
}), [s, e, o,
|
|
4796
|
-
return
|
|
4796
|
+
}), [s, e, o, R, m, p]), C = b ? !0 : v ? !Object.values(_).every((F) => F === !0) : !_.name || !_.email || ["exists", "pending", "verify"].includes(y.boxType);
|
|
4797
|
+
return m.successMessage && k ? /* @__PURE__ */ a.jsx(Xi, { className: t }) : /* @__PURE__ */ a.jsxs(
|
|
4797
4798
|
"fieldset",
|
|
4798
4799
|
{
|
|
4799
4800
|
className: S("signup-form-fieldset", t),
|
|
4800
4801
|
"data-testid": "signup-form",
|
|
4801
4802
|
children: [
|
|
4802
|
-
|
|
4803
|
-
|
|
4803
|
+
m.title && /* @__PURE__ */ a.jsx("p", { className: "signup-title", children: /* @__PURE__ */ a.jsx(ye, { id: "signup_title" }) }),
|
|
4804
|
+
j && /* @__PURE__ */ a.jsx(
|
|
4804
4805
|
He,
|
|
4805
4806
|
{
|
|
4806
4807
|
variant: "error",
|
|
@@ -4811,21 +4812,32 @@ const eo = {
|
|
|
4811
4812
|
rn,
|
|
4812
4813
|
{
|
|
4813
4814
|
className: "signup-form",
|
|
4814
|
-
formRef:
|
|
4815
|
+
formRef: R.form,
|
|
4815
4816
|
id: "sign-up-form",
|
|
4816
|
-
fields:
|
|
4817
|
+
fields: Q,
|
|
4817
4818
|
intlPath: "signup",
|
|
4818
4819
|
button: {
|
|
4819
4820
|
variant: "primary",
|
|
4820
4821
|
size: "medium",
|
|
4821
4822
|
text: r || o.formatMessage({ id: "signup_button_join" }),
|
|
4822
|
-
disabled:
|
|
4823
|
+
disabled: C ? { isClickable: !0 } : !1,
|
|
4823
4824
|
styling: { fullWidth: !0 },
|
|
4824
4825
|
"data-testid": "signup-button"
|
|
4825
4826
|
},
|
|
4827
|
+
secondaryActionButton: {
|
|
4828
|
+
className: "login-button",
|
|
4829
|
+
styling: { fullWidth: !0 },
|
|
4830
|
+
variant: "tertiary",
|
|
4831
|
+
size: "medium",
|
|
4832
|
+
href: "/user-onboarding/login",
|
|
4833
|
+
"data-gtm-event-context": "SignupForm",
|
|
4834
|
+
"data-gtm-event-type": "login-click",
|
|
4835
|
+
text: o.formatMessage({ id: "signup_button_login" })
|
|
4836
|
+
},
|
|
4826
4837
|
meta: {
|
|
4827
4838
|
shouldReset: !1,
|
|
4828
|
-
showRequiredLabels: !1
|
|
4839
|
+
showRequiredLabels: !1,
|
|
4840
|
+
shouldShowCancelButton: m.logInButton
|
|
4829
4841
|
},
|
|
4830
4842
|
gtm: {
|
|
4831
4843
|
context: "SignupForm",
|
|
@@ -4834,16 +4846,16 @@ const eo = {
|
|
|
4834
4846
|
functions: {
|
|
4835
4847
|
onSuccess: async () => {
|
|
4836
4848
|
Qi({
|
|
4837
|
-
refs:
|
|
4849
|
+
refs: R,
|
|
4838
4850
|
dataToSubmit: s,
|
|
4839
4851
|
createAccount: e.createAccount,
|
|
4840
4852
|
onSuccess: e.onSuccess,
|
|
4841
|
-
dispatch:
|
|
4842
|
-
state:
|
|
4853
|
+
dispatch: g,
|
|
4854
|
+
state: p
|
|
4843
4855
|
});
|
|
4844
4856
|
},
|
|
4845
|
-
onCatch: (
|
|
4846
|
-
e.handleError(
|
|
4857
|
+
onCatch: (F) => {
|
|
4858
|
+
e.handleError(F), g([
|
|
4847
4859
|
{ type: "showSuccessMessage", value: !1 },
|
|
4848
4860
|
{ type: "showError", value: !0 }
|
|
4849
4861
|
]);
|
|
@@ -4851,20 +4863,7 @@ const eo = {
|
|
|
4851
4863
|
}
|
|
4852
4864
|
}
|
|
4853
4865
|
),
|
|
4854
|
-
/* @__PURE__ */ a.jsx("button", { className: "validation-button", ref:
|
|
4855
|
-
n.logInButton && /* @__PURE__ */ a.jsx(
|
|
4856
|
-
se,
|
|
4857
|
-
{
|
|
4858
|
-
className: "login-button",
|
|
4859
|
-
styling: { fullWidth: !0 },
|
|
4860
|
-
variant: "tertiary",
|
|
4861
|
-
size: "medium",
|
|
4862
|
-
href: "/user-onboarding/login",
|
|
4863
|
-
"data-gtm-event-context": "SignupForm",
|
|
4864
|
-
"data-gtm-event-type": "login-click",
|
|
4865
|
-
children: o.formatMessage({ id: "signup_button_login" })
|
|
4866
|
-
}
|
|
4867
|
-
)
|
|
4866
|
+
/* @__PURE__ */ a.jsx("button", { className: "validation-button", ref: R.hiddenValidation })
|
|
4868
4867
|
]
|
|
4869
4868
|
}
|
|
4870
4869
|
);
|
|
@@ -4884,66 +4883,66 @@ function to() {
|
|
|
4884
4883
|
return ue;
|
|
4885
4884
|
Rr = 1;
|
|
4886
4885
|
var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, n = t ? Symbol.for("react.portal") : 60106, r = t ? Symbol.for("react.fragment") : 60107, s = t ? Symbol.for("react.strict_mode") : 60108, i = t ? Symbol.for("react.profiler") : 60114, o = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, f = t ? Symbol.for("react.async_mode") : 60111, l = t ? Symbol.for("react.concurrent_mode") : 60111, u = t ? Symbol.for("react.forward_ref") : 60112, d = t ? Symbol.for("react.suspense") : 60113, m = t ? Symbol.for("react.suspense_list") : 60120, p = t ? Symbol.for("react.memo") : 60115, g = t ? Symbol.for("react.lazy") : 60116, _ = t ? Symbol.for("react.block") : 60121, y = t ? Symbol.for("react.fundamental") : 60117, v = t ? Symbol.for("react.responder") : 60118, b = t ? Symbol.for("react.scope") : 60119;
|
|
4887
|
-
function
|
|
4888
|
-
if (typeof
|
|
4889
|
-
var
|
|
4890
|
-
switch (
|
|
4886
|
+
function k(w) {
|
|
4887
|
+
if (typeof w == "object" && w !== null) {
|
|
4888
|
+
var I = w.$$typeof;
|
|
4889
|
+
switch (I) {
|
|
4891
4890
|
case e:
|
|
4892
|
-
switch (
|
|
4891
|
+
switch (w = w.type, w) {
|
|
4893
4892
|
case f:
|
|
4894
4893
|
case l:
|
|
4895
4894
|
case r:
|
|
4896
4895
|
case i:
|
|
4897
4896
|
case s:
|
|
4898
4897
|
case d:
|
|
4899
|
-
return
|
|
4898
|
+
return w;
|
|
4900
4899
|
default:
|
|
4901
|
-
switch (
|
|
4900
|
+
switch (w = w && w.$$typeof, w) {
|
|
4902
4901
|
case c:
|
|
4903
4902
|
case u:
|
|
4904
4903
|
case g:
|
|
4905
4904
|
case p:
|
|
4906
4905
|
case o:
|
|
4907
|
-
return
|
|
4906
|
+
return w;
|
|
4908
4907
|
default:
|
|
4909
|
-
return
|
|
4908
|
+
return I;
|
|
4910
4909
|
}
|
|
4911
4910
|
}
|
|
4912
4911
|
case n:
|
|
4913
|
-
return
|
|
4912
|
+
return I;
|
|
4914
4913
|
}
|
|
4915
4914
|
}
|
|
4916
4915
|
}
|
|
4917
|
-
function
|
|
4918
|
-
return
|
|
4916
|
+
function j(w) {
|
|
4917
|
+
return k(w) === l;
|
|
4919
4918
|
}
|
|
4920
|
-
return ue.AsyncMode = f, ue.ConcurrentMode = l, ue.ContextConsumer = c, ue.ContextProvider = o, ue.Element = e, ue.ForwardRef = u, ue.Fragment = r, ue.Lazy = g, ue.Memo = p, ue.Portal = n, ue.Profiler = i, ue.StrictMode = s, ue.Suspense = d, ue.isAsyncMode = function(
|
|
4921
|
-
return
|
|
4922
|
-
}, ue.isConcurrentMode =
|
|
4923
|
-
return
|
|
4924
|
-
}, ue.isContextProvider = function(
|
|
4925
|
-
return
|
|
4926
|
-
}, ue.isElement = function(
|
|
4927
|
-
return typeof
|
|
4928
|
-
}, ue.isForwardRef = function(
|
|
4929
|
-
return
|
|
4930
|
-
}, ue.isFragment = function(
|
|
4931
|
-
return
|
|
4932
|
-
}, ue.isLazy = function(
|
|
4933
|
-
return
|
|
4934
|
-
}, ue.isMemo = function(
|
|
4935
|
-
return
|
|
4936
|
-
}, ue.isPortal = function(
|
|
4937
|
-
return
|
|
4938
|
-
}, ue.isProfiler = function(
|
|
4939
|
-
return
|
|
4940
|
-
}, ue.isStrictMode = function(
|
|
4941
|
-
return
|
|
4942
|
-
}, ue.isSuspense = function(
|
|
4943
|
-
return
|
|
4944
|
-
}, ue.isValidElementType = function(
|
|
4945
|
-
return typeof
|
|
4946
|
-
}, ue.typeOf =
|
|
4919
|
+
return ue.AsyncMode = f, ue.ConcurrentMode = l, ue.ContextConsumer = c, ue.ContextProvider = o, ue.Element = e, ue.ForwardRef = u, ue.Fragment = r, ue.Lazy = g, ue.Memo = p, ue.Portal = n, ue.Profiler = i, ue.StrictMode = s, ue.Suspense = d, ue.isAsyncMode = function(w) {
|
|
4920
|
+
return j(w) || k(w) === f;
|
|
4921
|
+
}, ue.isConcurrentMode = j, ue.isContextConsumer = function(w) {
|
|
4922
|
+
return k(w) === c;
|
|
4923
|
+
}, ue.isContextProvider = function(w) {
|
|
4924
|
+
return k(w) === o;
|
|
4925
|
+
}, ue.isElement = function(w) {
|
|
4926
|
+
return typeof w == "object" && w !== null && w.$$typeof === e;
|
|
4927
|
+
}, ue.isForwardRef = function(w) {
|
|
4928
|
+
return k(w) === u;
|
|
4929
|
+
}, ue.isFragment = function(w) {
|
|
4930
|
+
return k(w) === r;
|
|
4931
|
+
}, ue.isLazy = function(w) {
|
|
4932
|
+
return k(w) === g;
|
|
4933
|
+
}, ue.isMemo = function(w) {
|
|
4934
|
+
return k(w) === p;
|
|
4935
|
+
}, ue.isPortal = function(w) {
|
|
4936
|
+
return k(w) === n;
|
|
4937
|
+
}, ue.isProfiler = function(w) {
|
|
4938
|
+
return k(w) === i;
|
|
4939
|
+
}, ue.isStrictMode = function(w) {
|
|
4940
|
+
return k(w) === s;
|
|
4941
|
+
}, ue.isSuspense = function(w) {
|
|
4942
|
+
return k(w) === d;
|
|
4943
|
+
}, ue.isValidElementType = function(w) {
|
|
4944
|
+
return typeof w == "string" || typeof w == "function" || w === r || w === l || w === i || w === s || w === d || w === m || typeof w == "object" && w !== null && (w.$$typeof === g || w.$$typeof === p || w.$$typeof === o || w.$$typeof === c || w.$$typeof === u || w.$$typeof === y || w.$$typeof === v || w.$$typeof === b || w.$$typeof === _);
|
|
4945
|
+
}, ue.typeOf = k, ue;
|
|
4947
4946
|
}
|
|
4948
4947
|
var de = {};
|
|
4949
4948
|
/** @license React v16.13.1
|
|
@@ -4958,16 +4957,16 @@ var Fr;
|
|
|
4958
4957
|
function no() {
|
|
4959
4958
|
return Fr || (Fr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
4960
4959
|
var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, n = t ? Symbol.for("react.portal") : 60106, r = t ? Symbol.for("react.fragment") : 60107, s = t ? Symbol.for("react.strict_mode") : 60108, i = t ? Symbol.for("react.profiler") : 60114, o = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, f = t ? Symbol.for("react.async_mode") : 60111, l = t ? Symbol.for("react.concurrent_mode") : 60111, u = t ? Symbol.for("react.forward_ref") : 60112, d = t ? Symbol.for("react.suspense") : 60113, m = t ? Symbol.for("react.suspense_list") : 60120, p = t ? Symbol.for("react.memo") : 60115, g = t ? Symbol.for("react.lazy") : 60116, _ = t ? Symbol.for("react.block") : 60121, y = t ? Symbol.for("react.fundamental") : 60117, v = t ? Symbol.for("react.responder") : 60118, b = t ? Symbol.for("react.scope") : 60119;
|
|
4961
|
-
function
|
|
4962
|
-
return typeof
|
|
4963
|
-
|
|
4960
|
+
function k(D) {
|
|
4961
|
+
return typeof D == "string" || typeof D == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
4962
|
+
D === r || D === l || D === i || D === s || D === d || D === m || typeof D == "object" && D !== null && (D.$$typeof === g || D.$$typeof === p || D.$$typeof === o || D.$$typeof === c || D.$$typeof === u || D.$$typeof === y || D.$$typeof === v || D.$$typeof === b || D.$$typeof === _);
|
|
4964
4963
|
}
|
|
4965
|
-
function
|
|
4966
|
-
if (typeof
|
|
4967
|
-
var ve =
|
|
4964
|
+
function j(D) {
|
|
4965
|
+
if (typeof D == "object" && D !== null) {
|
|
4966
|
+
var ve = D.$$typeof;
|
|
4968
4967
|
switch (ve) {
|
|
4969
4968
|
case e:
|
|
4970
|
-
var Ne =
|
|
4969
|
+
var Ne = D.type;
|
|
4971
4970
|
switch (Ne) {
|
|
4972
4971
|
case f:
|
|
4973
4972
|
case l:
|
|
@@ -4994,47 +4993,47 @@ function no() {
|
|
|
4994
4993
|
}
|
|
4995
4994
|
}
|
|
4996
4995
|
}
|
|
4997
|
-
var
|
|
4998
|
-
function
|
|
4999
|
-
return z || (z = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),
|
|
4996
|
+
var w = f, I = l, R = c, Q = o, C = e, F = u, $ = r, T = g, x = p, N = n, A = i, W = s, Z = d, z = !1;
|
|
4997
|
+
function K(D) {
|
|
4998
|
+
return z || (z = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), E(D) || j(D) === f;
|
|
5000
4999
|
}
|
|
5001
|
-
function
|
|
5002
|
-
return
|
|
5000
|
+
function E(D) {
|
|
5001
|
+
return j(D) === l;
|
|
5003
5002
|
}
|
|
5004
|
-
function
|
|
5005
|
-
return
|
|
5003
|
+
function P(D) {
|
|
5004
|
+
return j(D) === c;
|
|
5006
5005
|
}
|
|
5007
|
-
function
|
|
5008
|
-
return
|
|
5006
|
+
function q(D) {
|
|
5007
|
+
return j(D) === o;
|
|
5009
5008
|
}
|
|
5010
|
-
function B(
|
|
5011
|
-
return typeof
|
|
5009
|
+
function B(D) {
|
|
5010
|
+
return typeof D == "object" && D !== null && D.$$typeof === e;
|
|
5012
5011
|
}
|
|
5013
|
-
function
|
|
5014
|
-
return
|
|
5012
|
+
function U(D) {
|
|
5013
|
+
return j(D) === u;
|
|
5015
5014
|
}
|
|
5016
|
-
function te(
|
|
5017
|
-
return
|
|
5015
|
+
function te(D) {
|
|
5016
|
+
return j(D) === r;
|
|
5018
5017
|
}
|
|
5019
|
-
function G(
|
|
5020
|
-
return
|
|
5018
|
+
function G(D) {
|
|
5019
|
+
return j(D) === g;
|
|
5021
5020
|
}
|
|
5022
|
-
function
|
|
5023
|
-
return
|
|
5021
|
+
function V(D) {
|
|
5022
|
+
return j(D) === p;
|
|
5024
5023
|
}
|
|
5025
|
-
function ee(
|
|
5026
|
-
return
|
|
5024
|
+
function ee(D) {
|
|
5025
|
+
return j(D) === n;
|
|
5027
5026
|
}
|
|
5028
|
-
function re(
|
|
5029
|
-
return
|
|
5027
|
+
function re(D) {
|
|
5028
|
+
return j(D) === i;
|
|
5030
5029
|
}
|
|
5031
|
-
function O(
|
|
5032
|
-
return
|
|
5030
|
+
function O(D) {
|
|
5031
|
+
return j(D) === s;
|
|
5033
5032
|
}
|
|
5034
|
-
function oe(
|
|
5035
|
-
return
|
|
5033
|
+
function oe(D) {
|
|
5034
|
+
return j(D) === d;
|
|
5036
5035
|
}
|
|
5037
|
-
de.AsyncMode =
|
|
5036
|
+
de.AsyncMode = w, de.ConcurrentMode = I, de.ContextConsumer = R, de.ContextProvider = Q, de.Element = C, de.ForwardRef = F, de.Fragment = $, de.Lazy = T, de.Memo = x, de.Portal = N, de.Profiler = A, de.StrictMode = W, de.Suspense = Z, de.isAsyncMode = K, de.isConcurrentMode = E, de.isContextConsumer = P, de.isContextProvider = q, de.isElement = B, de.isForwardRef = U, de.isFragment = te, de.isLazy = G, de.isMemo = V, de.isPortal = ee, de.isProfiler = re, de.isStrictMode = O, de.isSuspense = oe, de.isValidElementType = k, de.typeOf = j;
|
|
5038
5037
|
}()), de;
|
|
5039
5038
|
}
|
|
5040
5039
|
var Or;
|
|
@@ -5175,10 +5174,10 @@ function so() {
|
|
|
5175
5174
|
}
|
|
5176
5175
|
return kn = function(c, f) {
|
|
5177
5176
|
var l = typeof Symbol == "function" && Symbol.iterator, u = "@@iterator";
|
|
5178
|
-
function d(
|
|
5179
|
-
var
|
|
5180
|
-
if (typeof
|
|
5181
|
-
return
|
|
5177
|
+
function d(E) {
|
|
5178
|
+
var P = E && (l && E[l] || E[u]);
|
|
5179
|
+
if (typeof P == "function")
|
|
5180
|
+
return P;
|
|
5182
5181
|
}
|
|
5183
5182
|
var m = "<<anonymous>>", p = {
|
|
5184
5183
|
array: v("array"),
|
|
@@ -5190,245 +5189,245 @@ function so() {
|
|
|
5190
5189
|
string: v("string"),
|
|
5191
5190
|
symbol: v("symbol"),
|
|
5192
5191
|
any: b(),
|
|
5193
|
-
arrayOf:
|
|
5194
|
-
element:
|
|
5195
|
-
elementType:
|
|
5196
|
-
instanceOf:
|
|
5192
|
+
arrayOf: k,
|
|
5193
|
+
element: j(),
|
|
5194
|
+
elementType: w(),
|
|
5195
|
+
instanceOf: I,
|
|
5197
5196
|
node: F(),
|
|
5198
|
-
objectOf:
|
|
5197
|
+
objectOf: Q,
|
|
5199
5198
|
oneOf: R,
|
|
5200
|
-
oneOfType:
|
|
5201
|
-
shape:
|
|
5202
|
-
exact:
|
|
5199
|
+
oneOfType: C,
|
|
5200
|
+
shape: T,
|
|
5201
|
+
exact: x
|
|
5203
5202
|
};
|
|
5204
|
-
function g(
|
|
5205
|
-
return
|
|
5203
|
+
function g(E, P) {
|
|
5204
|
+
return E === P ? E !== 0 || 1 / E === 1 / P : E !== E && P !== P;
|
|
5206
5205
|
}
|
|
5207
|
-
function _(
|
|
5208
|
-
this.message =
|
|
5206
|
+
function _(E, P) {
|
|
5207
|
+
this.message = E, this.data = P && typeof P == "object" ? P : {}, this.stack = "";
|
|
5209
5208
|
}
|
|
5210
5209
|
_.prototype = Error.prototype;
|
|
5211
|
-
function y(
|
|
5210
|
+
function y(E) {
|
|
5212
5211
|
if (process.env.NODE_ENV !== "production")
|
|
5213
|
-
var
|
|
5214
|
-
function B(te, G,
|
|
5215
|
-
if (ee = ee || m, O = O ||
|
|
5212
|
+
var P = {}, q = 0;
|
|
5213
|
+
function B(te, G, V, ee, re, O, oe) {
|
|
5214
|
+
if (ee = ee || m, O = O || V, oe !== n) {
|
|
5216
5215
|
if (f) {
|
|
5217
|
-
var
|
|
5216
|
+
var D = new Error(
|
|
5218
5217
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
5219
5218
|
);
|
|
5220
|
-
throw
|
|
5219
|
+
throw D.name = "Invariant Violation", D;
|
|
5221
5220
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
5222
|
-
var ve = ee + ":" +
|
|
5223
|
-
!
|
|
5224
|
-
|
|
5221
|
+
var ve = ee + ":" + V;
|
|
5222
|
+
!P[ve] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
5223
|
+
q < 3 && (i(
|
|
5225
5224
|
"You are manually calling a React.PropTypes validation function for the `" + O + "` prop on `" + ee + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
5226
|
-
),
|
|
5225
|
+
), P[ve] = !0, q++);
|
|
5227
5226
|
}
|
|
5228
5227
|
}
|
|
5229
|
-
return G[
|
|
5228
|
+
return G[V] == null ? te ? G[V] === null ? new _("The " + re + " `" + O + "` is marked as required " + ("in `" + ee + "`, but its value is `null`.")) : new _("The " + re + " `" + O + "` is marked as required in " + ("`" + ee + "`, but its value is `undefined`.")) : null : E(G, V, ee, re, O);
|
|
5230
5229
|
}
|
|
5231
|
-
var
|
|
5232
|
-
return
|
|
5230
|
+
var U = B.bind(null, !1);
|
|
5231
|
+
return U.isRequired = B.bind(null, !0), U;
|
|
5233
5232
|
}
|
|
5234
|
-
function v(
|
|
5235
|
-
function
|
|
5236
|
-
var ee =
|
|
5237
|
-
if (re !==
|
|
5238
|
-
var O =
|
|
5233
|
+
function v(E) {
|
|
5234
|
+
function P(q, B, U, te, G, V) {
|
|
5235
|
+
var ee = q[B], re = W(ee);
|
|
5236
|
+
if (re !== E) {
|
|
5237
|
+
var O = Z(ee);
|
|
5239
5238
|
return new _(
|
|
5240
|
-
"Invalid " + te + " `" + G + "` of type " + ("`" + O + "` supplied to `" +
|
|
5241
|
-
{ expectedType:
|
|
5239
|
+
"Invalid " + te + " `" + G + "` of type " + ("`" + O + "` supplied to `" + U + "`, expected ") + ("`" + E + "`."),
|
|
5240
|
+
{ expectedType: E }
|
|
5242
5241
|
);
|
|
5243
5242
|
}
|
|
5244
5243
|
return null;
|
|
5245
5244
|
}
|
|
5246
|
-
return y(
|
|
5245
|
+
return y(P);
|
|
5247
5246
|
}
|
|
5248
5247
|
function b() {
|
|
5249
5248
|
return y(o);
|
|
5250
5249
|
}
|
|
5251
|
-
function
|
|
5252
|
-
function
|
|
5253
|
-
if (typeof
|
|
5254
|
-
return new _("Property `" + G + "` of component `" +
|
|
5255
|
-
var
|
|
5256
|
-
if (!Array.isArray(
|
|
5257
|
-
var ee =
|
|
5258
|
-
return new _("Invalid " + te + " `" + G + "` of type " + ("`" + ee + "` supplied to `" +
|
|
5250
|
+
function k(E) {
|
|
5251
|
+
function P(q, B, U, te, G) {
|
|
5252
|
+
if (typeof E != "function")
|
|
5253
|
+
return new _("Property `" + G + "` of component `" + U + "` has invalid PropType notation inside arrayOf.");
|
|
5254
|
+
var V = q[B];
|
|
5255
|
+
if (!Array.isArray(V)) {
|
|
5256
|
+
var ee = W(V);
|
|
5257
|
+
return new _("Invalid " + te + " `" + G + "` of type " + ("`" + ee + "` supplied to `" + U + "`, expected an array."));
|
|
5259
5258
|
}
|
|
5260
|
-
for (var re = 0; re <
|
|
5261
|
-
var O =
|
|
5259
|
+
for (var re = 0; re < V.length; re++) {
|
|
5260
|
+
var O = E(V, re, U, te, G + "[" + re + "]", n);
|
|
5262
5261
|
if (O instanceof Error)
|
|
5263
5262
|
return O;
|
|
5264
5263
|
}
|
|
5265
5264
|
return null;
|
|
5266
5265
|
}
|
|
5267
|
-
return y(
|
|
5266
|
+
return y(P);
|
|
5268
5267
|
}
|
|
5269
|
-
function
|
|
5270
|
-
function
|
|
5271
|
-
var G =
|
|
5268
|
+
function j() {
|
|
5269
|
+
function E(P, q, B, U, te) {
|
|
5270
|
+
var G = P[q];
|
|
5272
5271
|
if (!c(G)) {
|
|
5273
|
-
var
|
|
5274
|
-
return new _("Invalid " +
|
|
5272
|
+
var V = W(G);
|
|
5273
|
+
return new _("Invalid " + U + " `" + te + "` of type " + ("`" + V + "` supplied to `" + B + "`, expected a single ReactElement."));
|
|
5275
5274
|
}
|
|
5276
5275
|
return null;
|
|
5277
5276
|
}
|
|
5278
|
-
return y(
|
|
5277
|
+
return y(E);
|
|
5279
5278
|
}
|
|
5280
|
-
function
|
|
5281
|
-
function
|
|
5282
|
-
var G =
|
|
5279
|
+
function w() {
|
|
5280
|
+
function E(P, q, B, U, te) {
|
|
5281
|
+
var G = P[q];
|
|
5283
5282
|
if (!t.isValidElementType(G)) {
|
|
5284
|
-
var
|
|
5285
|
-
return new _("Invalid " +
|
|
5283
|
+
var V = W(G);
|
|
5284
|
+
return new _("Invalid " + U + " `" + te + "` of type " + ("`" + V + "` supplied to `" + B + "`, expected a single ReactElement type."));
|
|
5286
5285
|
}
|
|
5287
5286
|
return null;
|
|
5288
5287
|
}
|
|
5289
|
-
return y(
|
|
5288
|
+
return y(E);
|
|
5290
5289
|
}
|
|
5291
|
-
function
|
|
5292
|
-
function
|
|
5293
|
-
if (!(
|
|
5294
|
-
var
|
|
5295
|
-
return new _("Invalid " + te + " `" + G + "` of type " + ("`" + ee + "` supplied to `" +
|
|
5290
|
+
function I(E) {
|
|
5291
|
+
function P(q, B, U, te, G) {
|
|
5292
|
+
if (!(q[B] instanceof E)) {
|
|
5293
|
+
var V = E.name || m, ee = K(q[B]);
|
|
5294
|
+
return new _("Invalid " + te + " `" + G + "` of type " + ("`" + ee + "` supplied to `" + U + "`, expected ") + ("instance of `" + V + "`."));
|
|
5296
5295
|
}
|
|
5297
5296
|
return null;
|
|
5298
5297
|
}
|
|
5299
|
-
return y(
|
|
5298
|
+
return y(P);
|
|
5300
5299
|
}
|
|
5301
|
-
function R(
|
|
5302
|
-
if (!Array.isArray(
|
|
5300
|
+
function R(E) {
|
|
5301
|
+
if (!Array.isArray(E))
|
|
5303
5302
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? i(
|
|
5304
5303
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
5305
5304
|
) : i("Invalid argument supplied to oneOf, expected an array.")), o;
|
|
5306
|
-
function
|
|
5307
|
-
for (var
|
|
5308
|
-
if (g(
|
|
5305
|
+
function P(q, B, U, te, G) {
|
|
5306
|
+
for (var V = q[B], ee = 0; ee < E.length; ee++)
|
|
5307
|
+
if (g(V, E[ee]))
|
|
5309
5308
|
return null;
|
|
5310
|
-
var re = JSON.stringify(
|
|
5311
|
-
var ve = D
|
|
5312
|
-
return ve === "symbol" ? String(
|
|
5309
|
+
var re = JSON.stringify(E, function(oe, D) {
|
|
5310
|
+
var ve = Z(D);
|
|
5311
|
+
return ve === "symbol" ? String(D) : D;
|
|
5313
5312
|
});
|
|
5314
|
-
return new _("Invalid " + te + " `" + G + "` of value `" + String(
|
|
5313
|
+
return new _("Invalid " + te + " `" + G + "` of value `" + String(V) + "` " + ("supplied to `" + U + "`, expected one of " + re + "."));
|
|
5315
5314
|
}
|
|
5316
|
-
return y(
|
|
5315
|
+
return y(P);
|
|
5317
5316
|
}
|
|
5318
|
-
function
|
|
5319
|
-
function
|
|
5320
|
-
if (typeof
|
|
5321
|
-
return new _("Property `" + G + "` of component `" +
|
|
5322
|
-
var
|
|
5317
|
+
function Q(E) {
|
|
5318
|
+
function P(q, B, U, te, G) {
|
|
5319
|
+
if (typeof E != "function")
|
|
5320
|
+
return new _("Property `" + G + "` of component `" + U + "` has invalid PropType notation inside objectOf.");
|
|
5321
|
+
var V = q[B], ee = W(V);
|
|
5323
5322
|
if (ee !== "object")
|
|
5324
|
-
return new _("Invalid " + te + " `" + G + "` of type " + ("`" + ee + "` supplied to `" +
|
|
5325
|
-
for (var re in
|
|
5326
|
-
if (r(
|
|
5327
|
-
var O =
|
|
5323
|
+
return new _("Invalid " + te + " `" + G + "` of type " + ("`" + ee + "` supplied to `" + U + "`, expected an object."));
|
|
5324
|
+
for (var re in V)
|
|
5325
|
+
if (r(V, re)) {
|
|
5326
|
+
var O = E(V, re, U, te, G + "." + re, n);
|
|
5328
5327
|
if (O instanceof Error)
|
|
5329
5328
|
return O;
|
|
5330
5329
|
}
|
|
5331
5330
|
return null;
|
|
5332
5331
|
}
|
|
5333
|
-
return y(
|
|
5332
|
+
return y(P);
|
|
5334
5333
|
}
|
|
5335
|
-
function
|
|
5336
|
-
if (!Array.isArray(
|
|
5334
|
+
function C(E) {
|
|
5335
|
+
if (!Array.isArray(E))
|
|
5337
5336
|
return process.env.NODE_ENV !== "production" && i("Invalid argument supplied to oneOfType, expected an instance of array."), o;
|
|
5338
|
-
for (var
|
|
5339
|
-
var
|
|
5340
|
-
if (typeof
|
|
5337
|
+
for (var P = 0; P < E.length; P++) {
|
|
5338
|
+
var q = E[P];
|
|
5339
|
+
if (typeof q != "function")
|
|
5341
5340
|
return i(
|
|
5342
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + z(
|
|
5341
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + z(q) + " at index " + P + "."
|
|
5343
5342
|
), o;
|
|
5344
5343
|
}
|
|
5345
|
-
function B(
|
|
5346
|
-
for (var re = [], O = 0; O <
|
|
5347
|
-
var oe =
|
|
5348
|
-
if (
|
|
5344
|
+
function B(U, te, G, V, ee) {
|
|
5345
|
+
for (var re = [], O = 0; O < E.length; O++) {
|
|
5346
|
+
var oe = E[O], D = oe(U, te, G, V, ee, n);
|
|
5347
|
+
if (D == null)
|
|
5349
5348
|
return null;
|
|
5350
|
-
|
|
5349
|
+
D.data && r(D.data, "expectedType") && re.push(D.data.expectedType);
|
|
5351
5350
|
}
|
|
5352
5351
|
var ve = re.length > 0 ? ", expected one of type [" + re.join(", ") + "]" : "";
|
|
5353
|
-
return new _("Invalid " +
|
|
5352
|
+
return new _("Invalid " + V + " `" + ee + "` supplied to " + ("`" + G + "`" + ve + "."));
|
|
5354
5353
|
}
|
|
5355
5354
|
return y(B);
|
|
5356
5355
|
}
|
|
5357
5356
|
function F() {
|
|
5358
|
-
function
|
|
5359
|
-
return
|
|
5357
|
+
function E(P, q, B, U, te) {
|
|
5358
|
+
return N(P[q]) ? null : new _("Invalid " + U + " `" + te + "` supplied to " + ("`" + B + "`, expected a ReactNode."));
|
|
5360
5359
|
}
|
|
5361
|
-
return y(
|
|
5360
|
+
return y(E);
|
|
5362
5361
|
}
|
|
5363
|
-
function
|
|
5362
|
+
function $(E, P, q, B, U) {
|
|
5364
5363
|
return new _(
|
|
5365
|
-
(
|
|
5364
|
+
(E || "React class") + ": " + P + " type `" + q + "." + B + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + U + "`."
|
|
5366
5365
|
);
|
|
5367
5366
|
}
|
|
5368
|
-
function E
|
|
5369
|
-
function
|
|
5370
|
-
var
|
|
5367
|
+
function T(E) {
|
|
5368
|
+
function P(q, B, U, te, G) {
|
|
5369
|
+
var V = q[B], ee = W(V);
|
|
5371
5370
|
if (ee !== "object")
|
|
5372
|
-
return new _("Invalid " + te + " `" + G + "` of type `" + ee + "` " + ("supplied to `" +
|
|
5373
|
-
for (var re in
|
|
5374
|
-
var O =
|
|
5371
|
+
return new _("Invalid " + te + " `" + G + "` of type `" + ee + "` " + ("supplied to `" + U + "`, expected `object`."));
|
|
5372
|
+
for (var re in E) {
|
|
5373
|
+
var O = E[re];
|
|
5375
5374
|
if (typeof O != "function")
|
|
5376
|
-
return
|
|
5377
|
-
var oe = O(
|
|
5375
|
+
return $(U, te, G, re, Z(O));
|
|
5376
|
+
var oe = O(V, re, U, te, G + "." + re, n);
|
|
5378
5377
|
if (oe)
|
|
5379
5378
|
return oe;
|
|
5380
5379
|
}
|
|
5381
5380
|
return null;
|
|
5382
5381
|
}
|
|
5383
|
-
return y(
|
|
5382
|
+
return y(P);
|
|
5384
5383
|
}
|
|
5385
|
-
function
|
|
5386
|
-
function
|
|
5387
|
-
var
|
|
5384
|
+
function x(E) {
|
|
5385
|
+
function P(q, B, U, te, G) {
|
|
5386
|
+
var V = q[B], ee = W(V);
|
|
5388
5387
|
if (ee !== "object")
|
|
5389
|
-
return new _("Invalid " + te + " `" + G + "` of type `" + ee + "` " + ("supplied to `" +
|
|
5390
|
-
var re = e({},
|
|
5388
|
+
return new _("Invalid " + te + " `" + G + "` of type `" + ee + "` " + ("supplied to `" + U + "`, expected `object`."));
|
|
5389
|
+
var re = e({}, q[B], E);
|
|
5391
5390
|
for (var O in re) {
|
|
5392
|
-
var oe =
|
|
5393
|
-
if (r(
|
|
5394
|
-
return
|
|
5391
|
+
var oe = E[O];
|
|
5392
|
+
if (r(E, O) && typeof oe != "function")
|
|
5393
|
+
return $(U, te, G, O, Z(oe));
|
|
5395
5394
|
if (!oe)
|
|
5396
5395
|
return new _(
|
|
5397
|
-
"Invalid " + te + " `" + G + "` key `" + O + "` supplied to `" +
|
|
5398
|
-
Valid keys: ` + JSON.stringify(Object.keys(
|
|
5396
|
+
"Invalid " + te + " `" + G + "` key `" + O + "` supplied to `" + U + "`.\nBad object: " + JSON.stringify(q[B], null, " ") + `
|
|
5397
|
+
Valid keys: ` + JSON.stringify(Object.keys(E), null, " ")
|
|
5399
5398
|
);
|
|
5400
|
-
var
|
|
5401
|
-
if (
|
|
5402
|
-
return
|
|
5399
|
+
var D = oe(V, O, U, te, G + "." + O, n);
|
|
5400
|
+
if (D)
|
|
5401
|
+
return D;
|
|
5403
5402
|
}
|
|
5404
5403
|
return null;
|
|
5405
5404
|
}
|
|
5406
|
-
return y(
|
|
5405
|
+
return y(P);
|
|
5407
5406
|
}
|
|
5408
|
-
function
|
|
5409
|
-
switch (typeof
|
|
5407
|
+
function N(E) {
|
|
5408
|
+
switch (typeof E) {
|
|
5410
5409
|
case "number":
|
|
5411
5410
|
case "string":
|
|
5412
5411
|
case "undefined":
|
|
5413
5412
|
return !0;
|
|
5414
5413
|
case "boolean":
|
|
5415
|
-
return !
|
|
5414
|
+
return !E;
|
|
5416
5415
|
case "object":
|
|
5417
|
-
if (Array.isArray(
|
|
5418
|
-
return
|
|
5419
|
-
if (
|
|
5416
|
+
if (Array.isArray(E))
|
|
5417
|
+
return E.every(N);
|
|
5418
|
+
if (E === null || c(E))
|
|
5420
5419
|
return !0;
|
|
5421
|
-
var
|
|
5422
|
-
if (
|
|
5423
|
-
var
|
|
5424
|
-
if (
|
|
5425
|
-
for (; !(B =
|
|
5426
|
-
if (
|
|
5420
|
+
var P = d(E);
|
|
5421
|
+
if (P) {
|
|
5422
|
+
var q = P.call(E), B;
|
|
5423
|
+
if (P !== E.entries) {
|
|
5424
|
+
for (; !(B = q.next()).done; )
|
|
5425
|
+
if (!N(B.value))
|
|
5427
5426
|
return !1;
|
|
5428
5427
|
} else
|
|
5429
|
-
for (; !(B =
|
|
5430
|
-
var
|
|
5431
|
-
if (
|
|
5428
|
+
for (; !(B = q.next()).done; ) {
|
|
5429
|
+
var U = B.value;
|
|
5430
|
+
if (U && !N(U[1]))
|
|
5432
5431
|
return !1;
|
|
5433
5432
|
}
|
|
5434
5433
|
} else
|
|
@@ -5438,41 +5437,41 @@ Valid keys: ` + JSON.stringify(Object.keys(T), null, " ")
|
|
|
5438
5437
|
return !1;
|
|
5439
5438
|
}
|
|
5440
5439
|
}
|
|
5441
|
-
function
|
|
5442
|
-
return
|
|
5440
|
+
function A(E, P) {
|
|
5441
|
+
return E === "symbol" ? !0 : P ? P["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && P instanceof Symbol : !1;
|
|
5443
5442
|
}
|
|
5444
|
-
function
|
|
5445
|
-
var
|
|
5446
|
-
return Array.isArray(
|
|
5443
|
+
function W(E) {
|
|
5444
|
+
var P = typeof E;
|
|
5445
|
+
return Array.isArray(E) ? "array" : E instanceof RegExp ? "object" : A(P, E) ? "symbol" : P;
|
|
5447
5446
|
}
|
|
5448
|
-
function
|
|
5449
|
-
if (typeof
|
|
5450
|
-
return "" +
|
|
5451
|
-
var
|
|
5452
|
-
if (
|
|
5453
|
-
if (
|
|
5447
|
+
function Z(E) {
|
|
5448
|
+
if (typeof E > "u" || E === null)
|
|
5449
|
+
return "" + E;
|
|
5450
|
+
var P = W(E);
|
|
5451
|
+
if (P === "object") {
|
|
5452
|
+
if (E instanceof Date)
|
|
5454
5453
|
return "date";
|
|
5455
|
-
if (
|
|
5454
|
+
if (E instanceof RegExp)
|
|
5456
5455
|
return "regexp";
|
|
5457
5456
|
}
|
|
5458
|
-
return
|
|
5457
|
+
return P;
|
|
5459
5458
|
}
|
|
5460
|
-
function z(
|
|
5461
|
-
var
|
|
5462
|
-
switch (
|
|
5459
|
+
function z(E) {
|
|
5460
|
+
var P = Z(E);
|
|
5461
|
+
switch (P) {
|
|
5463
5462
|
case "array":
|
|
5464
5463
|
case "object":
|
|
5465
|
-
return "an " +
|
|
5464
|
+
return "an " + P;
|
|
5466
5465
|
case "boolean":
|
|
5467
5466
|
case "date":
|
|
5468
5467
|
case "regexp":
|
|
5469
|
-
return "a " +
|
|
5468
|
+
return "a " + P;
|
|
5470
5469
|
default:
|
|
5471
|
-
return
|
|
5470
|
+
return P;
|
|
5472
5471
|
}
|
|
5473
5472
|
}
|
|
5474
|
-
function
|
|
5475
|
-
return !
|
|
5473
|
+
function K(E) {
|
|
5474
|
+
return !E.constructor || !E.constructor.name ? m : E.constructor.name;
|
|
5476
5475
|
}
|
|
5477
5476
|
return p.checkPropTypes = s, p.resetWarningCache = s.resetWarningCache, p.PropTypes = p, p;
|
|
5478
5477
|
}, kn;
|
|
@@ -5863,69 +5862,69 @@ var Zr = {
|
|
|
5863
5862
|
delayInitialFocusTimer: void 0,
|
|
5864
5863
|
// the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
|
|
5865
5864
|
recentNavEvent: void 0
|
|
5866
|
-
}, c, f = function(
|
|
5867
|
-
return
|
|
5868
|
-
}, l = function(
|
|
5869
|
-
var
|
|
5870
|
-
return o.containerGroups.findIndex(function(
|
|
5871
|
-
var
|
|
5872
|
-
return
|
|
5865
|
+
}, c, f = function(T, x, N) {
|
|
5866
|
+
return T && T[x] !== void 0 ? T[x] : i[N || x];
|
|
5867
|
+
}, l = function(T, x) {
|
|
5868
|
+
var N = typeof (x == null ? void 0 : x.composedPath) == "function" ? x.composedPath() : void 0;
|
|
5869
|
+
return o.containerGroups.findIndex(function(A) {
|
|
5870
|
+
var W = A.container, Z = A.tabbableNodes;
|
|
5871
|
+
return W.contains(T) || // fall back to explicit tabbable search which will take into consideration any
|
|
5873
5872
|
// web components if the `tabbableOptions.getShadowRoot` option was used for
|
|
5874
5873
|
// the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
|
|
5875
5874
|
// look inside web components even if open)
|
|
5876
|
-
(
|
|
5877
|
-
return z ===
|
|
5875
|
+
(N == null ? void 0 : N.includes(W)) || Z.find(function(z) {
|
|
5876
|
+
return z === T;
|
|
5878
5877
|
});
|
|
5879
5878
|
});
|
|
5880
|
-
}, u = function(
|
|
5881
|
-
var
|
|
5882
|
-
if (typeof
|
|
5883
|
-
for (var
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
}
|
|
5887
|
-
if (
|
|
5888
|
-
if (
|
|
5889
|
-
return
|
|
5890
|
-
throw new Error("`".concat(
|
|
5891
|
-
}
|
|
5892
|
-
var
|
|
5893
|
-
if (typeof
|
|
5894
|
-
throw new Error("`".concat(
|
|
5895
|
-
return
|
|
5879
|
+
}, u = function(T) {
|
|
5880
|
+
var x = i[T];
|
|
5881
|
+
if (typeof x == "function") {
|
|
5882
|
+
for (var N = arguments.length, A = new Array(N > 1 ? N - 1 : 0), W = 1; W < N; W++)
|
|
5883
|
+
A[W - 1] = arguments[W];
|
|
5884
|
+
x = x.apply(void 0, A);
|
|
5885
|
+
}
|
|
5886
|
+
if (x === !0 && (x = void 0), !x) {
|
|
5887
|
+
if (x === void 0 || x === !1)
|
|
5888
|
+
return x;
|
|
5889
|
+
throw new Error("`".concat(T, "` was specified but was not a node, or did not return a node"));
|
|
5890
|
+
}
|
|
5891
|
+
var Z = x;
|
|
5892
|
+
if (typeof x == "string" && (Z = r.querySelector(x), !Z))
|
|
5893
|
+
throw new Error("`".concat(T, "` as selector refers to no known node"));
|
|
5894
|
+
return Z;
|
|
5896
5895
|
}, d = function() {
|
|
5897
|
-
var
|
|
5898
|
-
if (
|
|
5896
|
+
var T = u("initialFocus");
|
|
5897
|
+
if (T === !1)
|
|
5899
5898
|
return !1;
|
|
5900
|
-
if (
|
|
5899
|
+
if (T === void 0 || !Bt(T, i.tabbableOptions))
|
|
5901
5900
|
if (l(r.activeElement) >= 0)
|
|
5902
|
-
|
|
5901
|
+
T = r.activeElement;
|
|
5903
5902
|
else {
|
|
5904
|
-
var
|
|
5905
|
-
|
|
5903
|
+
var x = o.tabbableGroups[0], N = x && x.firstTabbableNode;
|
|
5904
|
+
T = N || u("fallbackFocus");
|
|
5906
5905
|
}
|
|
5907
|
-
if (!
|
|
5906
|
+
if (!T)
|
|
5908
5907
|
throw new Error("Your focus-trap needs to have at least one focusable element");
|
|
5909
|
-
return
|
|
5908
|
+
return T;
|
|
5910
5909
|
}, m = function() {
|
|
5911
|
-
if (o.containerGroups = o.containers.map(function(
|
|
5912
|
-
var
|
|
5913
|
-
return We(
|
|
5914
|
-
}), z =
|
|
5915
|
-
return We(
|
|
5916
|
-
}),
|
|
5917
|
-
return Le(
|
|
5910
|
+
if (o.containerGroups = o.containers.map(function(T) {
|
|
5911
|
+
var x = Ia(T, i.tabbableOptions), N = La(T, i.tabbableOptions), A = x.length > 0 ? x[0] : void 0, W = x.length > 0 ? x[x.length - 1] : void 0, Z = N.find(function(E) {
|
|
5912
|
+
return We(E);
|
|
5913
|
+
}), z = N.slice().reverse().find(function(E) {
|
|
5914
|
+
return We(E);
|
|
5915
|
+
}), K = !!x.find(function(E) {
|
|
5916
|
+
return Le(E) > 0;
|
|
5918
5917
|
});
|
|
5919
5918
|
return {
|
|
5920
|
-
container:
|
|
5921
|
-
tabbableNodes:
|
|
5922
|
-
focusableNodes:
|
|
5919
|
+
container: T,
|
|
5920
|
+
tabbableNodes: x,
|
|
5921
|
+
focusableNodes: N,
|
|
5923
5922
|
/** True if at least one node with positive `tabindex` was found in this container. */
|
|
5924
|
-
posTabIndexesFound:
|
|
5923
|
+
posTabIndexesFound: K,
|
|
5925
5924
|
/** First tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
5926
|
-
firstTabbableNode:
|
|
5925
|
+
firstTabbableNode: A,
|
|
5927
5926
|
/** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
5928
|
-
lastTabbableNode:
|
|
5927
|
+
lastTabbableNode: W,
|
|
5929
5928
|
// NOTE: DOM order is NOT NECESSARILY "document position" order, but figuring that out
|
|
5930
5929
|
// would require more than just https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition
|
|
5931
5930
|
// because that API doesn't work with Shadow DOM as well as it should (@see
|
|
@@ -5934,7 +5933,7 @@ var Zr = {
|
|
|
5934
5933
|
// "close enough most of the time" alternative for positive tabindexes which should generally
|
|
5935
5934
|
// be avoided anyway...
|
|
5936
5935
|
/** First tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
5937
|
-
firstDomTabbableNode:
|
|
5936
|
+
firstDomTabbableNode: Z,
|
|
5938
5937
|
/** Last tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
5939
5938
|
lastDomTabbableNode: z,
|
|
5940
5939
|
/**
|
|
@@ -5945,76 +5944,76 @@ var Zr = {
|
|
|
5945
5944
|
* in reverse.
|
|
5946
5945
|
* @returns {HTMLElement|undefined} The next tabbable node, if any.
|
|
5947
5946
|
*/
|
|
5948
|
-
nextTabbableNode: function(
|
|
5949
|
-
var
|
|
5950
|
-
return B < 0 ?
|
|
5951
|
-
return We(
|
|
5952
|
-
}) :
|
|
5953
|
-
return We(
|
|
5954
|
-
}) :
|
|
5947
|
+
nextTabbableNode: function(P) {
|
|
5948
|
+
var q = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, B = x.indexOf(P);
|
|
5949
|
+
return B < 0 ? q ? N.slice(N.indexOf(P) + 1).find(function(U) {
|
|
5950
|
+
return We(U);
|
|
5951
|
+
}) : N.slice(0, N.indexOf(P)).reverse().find(function(U) {
|
|
5952
|
+
return We(U);
|
|
5953
|
+
}) : x[B + (q ? 1 : -1)];
|
|
5955
5954
|
}
|
|
5956
5955
|
};
|
|
5957
|
-
}), o.tabbableGroups = o.containerGroups.filter(function(
|
|
5958
|
-
return
|
|
5956
|
+
}), o.tabbableGroups = o.containerGroups.filter(function(T) {
|
|
5957
|
+
return T.tabbableNodes.length > 0;
|
|
5959
5958
|
}), o.tabbableGroups.length <= 0 && !u("fallbackFocus"))
|
|
5960
5959
|
throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
|
|
5961
|
-
if (o.containerGroups.find(function(
|
|
5962
|
-
return
|
|
5960
|
+
if (o.containerGroups.find(function(T) {
|
|
5961
|
+
return T.posTabIndexesFound;
|
|
5963
5962
|
}) && o.containerGroups.length > 1)
|
|
5964
5963
|
throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
|
|
5965
|
-
}, p = function
|
|
5966
|
-
var
|
|
5967
|
-
if (
|
|
5968
|
-
return
|
|
5969
|
-
}, g = function
|
|
5970
|
-
if (
|
|
5971
|
-
if (!
|
|
5972
|
-
|
|
5964
|
+
}, p = function $(T) {
|
|
5965
|
+
var x = T.activeElement;
|
|
5966
|
+
if (x)
|
|
5967
|
+
return x.shadowRoot && x.shadowRoot.activeElement !== null ? $(x.shadowRoot) : x;
|
|
5968
|
+
}, g = function $(T) {
|
|
5969
|
+
if (T !== !1 && T !== p(document)) {
|
|
5970
|
+
if (!T || !T.focus) {
|
|
5971
|
+
$(d());
|
|
5973
5972
|
return;
|
|
5974
5973
|
}
|
|
5975
|
-
|
|
5974
|
+
T.focus({
|
|
5976
5975
|
preventScroll: !!i.preventScroll
|
|
5977
|
-
}), o.mostRecentlyFocusedNode =
|
|
5978
|
-
}
|
|
5979
|
-
}, _ = function(
|
|
5980
|
-
var
|
|
5981
|
-
return
|
|
5982
|
-
}, y = function(
|
|
5983
|
-
var
|
|
5984
|
-
|
|
5985
|
-
var
|
|
5976
|
+
}), o.mostRecentlyFocusedNode = T, No(T) && T.select();
|
|
5977
|
+
}
|
|
5978
|
+
}, _ = function(T) {
|
|
5979
|
+
var x = u("setReturnFocus", T);
|
|
5980
|
+
return x || (x === !1 ? !1 : T);
|
|
5981
|
+
}, y = function(T) {
|
|
5982
|
+
var x = T.target, N = T.event, A = T.isBackward, W = A === void 0 ? !1 : A;
|
|
5983
|
+
x = x || Pt(N), m();
|
|
5984
|
+
var Z = null;
|
|
5986
5985
|
if (o.tabbableGroups.length > 0) {
|
|
5987
|
-
var z = l(
|
|
5986
|
+
var z = l(x, N), K = z >= 0 ? o.containerGroups[z] : void 0;
|
|
5988
5987
|
if (z < 0)
|
|
5989
|
-
|
|
5990
|
-
else if (
|
|
5991
|
-
var
|
|
5992
|
-
var
|
|
5993
|
-
return
|
|
5988
|
+
W ? Z = o.tabbableGroups[o.tabbableGroups.length - 1].lastTabbableNode : Z = o.tabbableGroups[0].firstTabbableNode;
|
|
5989
|
+
else if (W) {
|
|
5990
|
+
var E = Vr(o.tabbableGroups, function(G) {
|
|
5991
|
+
var V = G.firstTabbableNode;
|
|
5992
|
+
return x === V;
|
|
5994
5993
|
});
|
|
5995
|
-
if (
|
|
5996
|
-
var
|
|
5997
|
-
|
|
5994
|
+
if (E < 0 && (K.container === x || Bt(x, i.tabbableOptions) && !We(x, i.tabbableOptions) && !K.nextTabbableNode(x, !1)) && (E = z), E >= 0) {
|
|
5995
|
+
var P = E === 0 ? o.tabbableGroups.length - 1 : E - 1, q = o.tabbableGroups[P];
|
|
5996
|
+
Z = Le(x) >= 0 ? q.lastTabbableNode : q.lastDomTabbableNode;
|
|
5998
5997
|
} else
|
|
5999
|
-
vt(
|
|
5998
|
+
vt(N) || (Z = K.nextTabbableNode(x, !1));
|
|
6000
5999
|
} else {
|
|
6001
6000
|
var B = Vr(o.tabbableGroups, function(G) {
|
|
6002
|
-
var
|
|
6003
|
-
return
|
|
6001
|
+
var V = G.lastTabbableNode;
|
|
6002
|
+
return x === V;
|
|
6004
6003
|
});
|
|
6005
|
-
if (B < 0 && (
|
|
6006
|
-
var
|
|
6007
|
-
|
|
6004
|
+
if (B < 0 && (K.container === x || Bt(x, i.tabbableOptions) && !We(x, i.tabbableOptions) && !K.nextTabbableNode(x)) && (B = z), B >= 0) {
|
|
6005
|
+
var U = B === o.tabbableGroups.length - 1 ? 0 : B + 1, te = o.tabbableGroups[U];
|
|
6006
|
+
Z = Le(x) >= 0 ? te.firstTabbableNode : te.firstDomTabbableNode;
|
|
6008
6007
|
} else
|
|
6009
|
-
vt(
|
|
6008
|
+
vt(N) || (Z = K.nextTabbableNode(x));
|
|
6010
6009
|
}
|
|
6011
6010
|
} else
|
|
6012
|
-
|
|
6013
|
-
return
|
|
6014
|
-
}, v = function(
|
|
6015
|
-
var
|
|
6016
|
-
if (!(l(
|
|
6017
|
-
if (lt(i.clickOutsideDeactivates,
|
|
6011
|
+
Z = u("fallbackFocus");
|
|
6012
|
+
return Z;
|
|
6013
|
+
}, v = function(T) {
|
|
6014
|
+
var x = Pt(T);
|
|
6015
|
+
if (!(l(x, T) >= 0)) {
|
|
6016
|
+
if (lt(i.clickOutsideDeactivates, T)) {
|
|
6018
6017
|
c.deactivate({
|
|
6019
6018
|
// NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
|
|
6020
6019
|
// which will result in the outside click setting focus to the node
|
|
@@ -6026,58 +6025,58 @@ var Zr = {
|
|
|
6026
6025
|
});
|
|
6027
6026
|
return;
|
|
6028
6027
|
}
|
|
6029
|
-
lt(i.allowOutsideClick,
|
|
6028
|
+
lt(i.allowOutsideClick, T) || T.preventDefault();
|
|
6030
6029
|
}
|
|
6031
|
-
}, b = function(
|
|
6032
|
-
var
|
|
6033
|
-
if (
|
|
6034
|
-
|
|
6030
|
+
}, b = function(T) {
|
|
6031
|
+
var x = Pt(T), N = l(x, T) >= 0;
|
|
6032
|
+
if (N || x instanceof Document)
|
|
6033
|
+
N && (o.mostRecentlyFocusedNode = x);
|
|
6035
6034
|
else {
|
|
6036
|
-
|
|
6037
|
-
var
|
|
6035
|
+
T.stopImmediatePropagation();
|
|
6036
|
+
var A, W = !0;
|
|
6038
6037
|
if (o.mostRecentlyFocusedNode)
|
|
6039
6038
|
if (Le(o.mostRecentlyFocusedNode) > 0) {
|
|
6040
|
-
var
|
|
6039
|
+
var Z = l(o.mostRecentlyFocusedNode), z = o.containerGroups[Z].tabbableNodes;
|
|
6041
6040
|
if (z.length > 0) {
|
|
6042
|
-
var
|
|
6043
|
-
return
|
|
6041
|
+
var K = z.findIndex(function(E) {
|
|
6042
|
+
return E === o.mostRecentlyFocusedNode;
|
|
6044
6043
|
});
|
|
6045
|
-
|
|
6044
|
+
K >= 0 && (i.isKeyForward(o.recentNavEvent) ? K + 1 < z.length && (A = z[K + 1], W = !1) : K - 1 >= 0 && (A = z[K - 1], W = !1));
|
|
6046
6045
|
}
|
|
6047
6046
|
} else
|
|
6048
|
-
o.containerGroups.some(function(
|
|
6049
|
-
return
|
|
6050
|
-
return Le(
|
|
6047
|
+
o.containerGroups.some(function(E) {
|
|
6048
|
+
return E.tabbableNodes.some(function(P) {
|
|
6049
|
+
return Le(P) > 0;
|
|
6051
6050
|
});
|
|
6052
|
-
}) || (
|
|
6051
|
+
}) || (W = !1);
|
|
6053
6052
|
else
|
|
6054
|
-
|
|
6055
|
-
|
|
6053
|
+
W = !1;
|
|
6054
|
+
W && (A = y({
|
|
6056
6055
|
// move FROM the MRU node, not event-related node (which will be the node that is
|
|
6057
6056
|
// outside the trap causing the focus escape we're trying to fix)
|
|
6058
6057
|
target: o.mostRecentlyFocusedNode,
|
|
6059
6058
|
isBackward: i.isKeyBackward(o.recentNavEvent)
|
|
6060
|
-
})), g(
|
|
6059
|
+
})), g(A || o.mostRecentlyFocusedNode || d());
|
|
6061
6060
|
}
|
|
6062
6061
|
o.recentNavEvent = void 0;
|
|
6063
|
-
},
|
|
6064
|
-
var
|
|
6065
|
-
o.recentNavEvent =
|
|
6066
|
-
var
|
|
6067
|
-
event:
|
|
6068
|
-
isBackward:
|
|
6062
|
+
}, k = function(T) {
|
|
6063
|
+
var x = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
6064
|
+
o.recentNavEvent = T;
|
|
6065
|
+
var N = y({
|
|
6066
|
+
event: T,
|
|
6067
|
+
isBackward: x
|
|
6069
6068
|
});
|
|
6070
|
-
|
|
6071
|
-
},
|
|
6072
|
-
if (Po(
|
|
6073
|
-
|
|
6069
|
+
N && (vt(T) && T.preventDefault(), g(N));
|
|
6070
|
+
}, j = function(T) {
|
|
6071
|
+
if (Po(T) && lt(i.escapeDeactivates, T) !== !1) {
|
|
6072
|
+
T.preventDefault(), c.deactivate();
|
|
6074
6073
|
return;
|
|
6075
6074
|
}
|
|
6076
|
-
(i.isKeyForward(
|
|
6077
|
-
},
|
|
6078
|
-
var
|
|
6079
|
-
l(
|
|
6080
|
-
},
|
|
6075
|
+
(i.isKeyForward(T) || i.isKeyBackward(T)) && k(T, i.isKeyBackward(T));
|
|
6076
|
+
}, w = function(T) {
|
|
6077
|
+
var x = Pt(T);
|
|
6078
|
+
l(x, T) >= 0 || lt(i.clickOutsideDeactivates, T) || lt(i.allowOutsideClick, T) || (T.preventDefault(), T.stopImmediatePropagation());
|
|
6079
|
+
}, I = function() {
|
|
6081
6080
|
if (o.active)
|
|
6082
6081
|
return Zr.activateTrap(s, c), o.delayInitialFocusTimer = i.delayInitialFocus ? Hr(function() {
|
|
6083
6082
|
g(d());
|
|
@@ -6087,27 +6086,27 @@ var Zr = {
|
|
|
6087
6086
|
}), r.addEventListener("touchstart", v, {
|
|
6088
6087
|
capture: !0,
|
|
6089
6088
|
passive: !1
|
|
6090
|
-
}), r.addEventListener("click",
|
|
6089
|
+
}), r.addEventListener("click", w, {
|
|
6091
6090
|
capture: !0,
|
|
6092
6091
|
passive: !1
|
|
6093
|
-
}), r.addEventListener("keydown",
|
|
6092
|
+
}), r.addEventListener("keydown", j, {
|
|
6094
6093
|
capture: !0,
|
|
6095
6094
|
passive: !1
|
|
6096
6095
|
}), c;
|
|
6097
6096
|
}, R = function() {
|
|
6098
6097
|
if (o.active)
|
|
6099
|
-
return r.removeEventListener("focusin", b, !0), r.removeEventListener("mousedown", v, !0), r.removeEventListener("touchstart", v, !0), r.removeEventListener("click",
|
|
6100
|
-
},
|
|
6101
|
-
var
|
|
6102
|
-
var
|
|
6103
|
-
return
|
|
6104
|
-
return
|
|
6098
|
+
return r.removeEventListener("focusin", b, !0), r.removeEventListener("mousedown", v, !0), r.removeEventListener("touchstart", v, !0), r.removeEventListener("click", w, !0), r.removeEventListener("keydown", j, !0), c;
|
|
6099
|
+
}, Q = function(T) {
|
|
6100
|
+
var x = T.some(function(N) {
|
|
6101
|
+
var A = Array.from(N.removedNodes);
|
|
6102
|
+
return A.some(function(W) {
|
|
6103
|
+
return W === o.mostRecentlyFocusedNode;
|
|
6105
6104
|
});
|
|
6106
6105
|
});
|
|
6107
|
-
|
|
6108
|
-
},
|
|
6109
|
-
|
|
6110
|
-
|
|
6106
|
+
x && g(d());
|
|
6107
|
+
}, C = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(Q) : void 0, F = function() {
|
|
6108
|
+
C && (C.disconnect(), o.active && !o.paused && o.containers.map(function(T) {
|
|
6109
|
+
C.observe(T, {
|
|
6111
6110
|
subtree: !0,
|
|
6112
6111
|
childList: !0
|
|
6113
6112
|
});
|
|
@@ -6120,50 +6119,50 @@ var Zr = {
|
|
|
6120
6119
|
get paused() {
|
|
6121
6120
|
return o.paused;
|
|
6122
6121
|
},
|
|
6123
|
-
activate: function(
|
|
6122
|
+
activate: function(T) {
|
|
6124
6123
|
if (o.active)
|
|
6125
6124
|
return this;
|
|
6126
|
-
var
|
|
6127
|
-
|
|
6128
|
-
var
|
|
6129
|
-
|
|
6125
|
+
var x = f(T, "onActivate"), N = f(T, "onPostActivate"), A = f(T, "checkCanFocusTrap");
|
|
6126
|
+
A || m(), o.active = !0, o.paused = !1, o.nodeFocusedBeforeActivation = r.activeElement, x == null || x();
|
|
6127
|
+
var W = function() {
|
|
6128
|
+
A && m(), I(), F(), N == null || N();
|
|
6130
6129
|
};
|
|
6131
|
-
return
|
|
6130
|
+
return A ? (A(o.containers.concat()).then(W, W), this) : (W(), this);
|
|
6132
6131
|
},
|
|
6133
|
-
deactivate: function(
|
|
6132
|
+
deactivate: function(T) {
|
|
6134
6133
|
if (!o.active)
|
|
6135
6134
|
return this;
|
|
6136
|
-
var
|
|
6135
|
+
var x = zr({
|
|
6137
6136
|
onDeactivate: i.onDeactivate,
|
|
6138
6137
|
onPostDeactivate: i.onPostDeactivate,
|
|
6139
6138
|
checkCanReturnFocus: i.checkCanReturnFocus
|
|
6140
|
-
},
|
|
6139
|
+
}, T);
|
|
6141
6140
|
clearTimeout(o.delayInitialFocusTimer), o.delayInitialFocusTimer = void 0, R(), o.active = !1, o.paused = !1, F(), Zr.deactivateTrap(s, c);
|
|
6142
|
-
var
|
|
6143
|
-
|
|
6141
|
+
var N = f(x, "onDeactivate"), A = f(x, "onPostDeactivate"), W = f(x, "checkCanReturnFocus"), Z = f(x, "returnFocus", "returnFocusOnDeactivate");
|
|
6142
|
+
N == null || N();
|
|
6144
6143
|
var z = function() {
|
|
6145
6144
|
Hr(function() {
|
|
6146
|
-
|
|
6145
|
+
Z && g(_(o.nodeFocusedBeforeActivation)), A == null || A();
|
|
6147
6146
|
});
|
|
6148
6147
|
};
|
|
6149
|
-
return
|
|
6148
|
+
return Z && W ? (W(_(o.nodeFocusedBeforeActivation)).then(z, z), this) : (z(), this);
|
|
6150
6149
|
},
|
|
6151
|
-
pause: function(
|
|
6150
|
+
pause: function(T) {
|
|
6152
6151
|
if (o.paused || !o.active)
|
|
6153
6152
|
return this;
|
|
6154
|
-
var
|
|
6155
|
-
return o.paused = !0,
|
|
6153
|
+
var x = f(T, "onPause"), N = f(T, "onPostPause");
|
|
6154
|
+
return o.paused = !0, x == null || x(), R(), F(), N == null || N(), this;
|
|
6156
6155
|
},
|
|
6157
|
-
unpause: function(
|
|
6156
|
+
unpause: function(T) {
|
|
6158
6157
|
if (!o.paused || !o.active)
|
|
6159
6158
|
return this;
|
|
6160
|
-
var
|
|
6161
|
-
return o.paused = !1,
|
|
6159
|
+
var x = f(T, "onUnpause"), N = f(T, "onPostUnpause");
|
|
6160
|
+
return o.paused = !1, x == null || x(), m(), I(), F(), N == null || N(), this;
|
|
6162
6161
|
},
|
|
6163
|
-
updateContainerElements: function(
|
|
6164
|
-
var
|
|
6165
|
-
return o.containers =
|
|
6166
|
-
return typeof
|
|
6162
|
+
updateContainerElements: function(T) {
|
|
6163
|
+
var x = [].concat(T).filter(Boolean);
|
|
6164
|
+
return o.containers = x.map(function(N) {
|
|
6165
|
+
return typeof N == "string" ? r.querySelector(N) : N;
|
|
6167
6166
|
}), o.active && m(), F(), this;
|
|
6168
6167
|
}
|
|
6169
6168
|
}, c.updateContainerElements(e), c;
|
|
@@ -6263,7 +6262,7 @@ function Ho(t, e) {
|
|
|
6263
6262
|
}
|
|
6264
6263
|
return (e === "string" ? String : Number)(t);
|
|
6265
6264
|
}
|
|
6266
|
-
var Mt =
|
|
6265
|
+
var Mt = Y, J = lo, Vo = Do, Yo = Vo.createFocusTrap, Ko = Io, Go = Ko.isFocusable, rr = /* @__PURE__ */ function(t) {
|
|
6267
6266
|
qo(n, t);
|
|
6268
6267
|
var e = Uo(n);
|
|
6269
6268
|
function n(r) {
|
|
@@ -6452,47 +6451,47 @@ var Mt = K, Q = lo, Vo = Do, Yo = Vo.createFocusTrap, Ko = Io, Go = Ko.isFocusab
|
|
|
6452
6451
|
}]), n;
|
|
6453
6452
|
}(Mt.Component), ut = typeof Element > "u" ? Function : Element;
|
|
6454
6453
|
rr.propTypes = {
|
|
6455
|
-
active:
|
|
6456
|
-
paused:
|
|
6457
|
-
focusTrapOptions:
|
|
6458
|
-
document:
|
|
6459
|
-
onActivate:
|
|
6460
|
-
onPostActivate:
|
|
6461
|
-
checkCanFocusTrap:
|
|
6462
|
-
onPause:
|
|
6463
|
-
onPostPause:
|
|
6464
|
-
onUnpause:
|
|
6465
|
-
onPostUnpause:
|
|
6466
|
-
onDeactivate:
|
|
6467
|
-
onPostDeactivate:
|
|
6468
|
-
checkCanReturnFocus:
|
|
6469
|
-
initialFocus:
|
|
6470
|
-
fallbackFocus:
|
|
6471
|
-
|
|
6472
|
-
|
|
6454
|
+
active: J.bool,
|
|
6455
|
+
paused: J.bool,
|
|
6456
|
+
focusTrapOptions: J.shape({
|
|
6457
|
+
document: J.object,
|
|
6458
|
+
onActivate: J.func,
|
|
6459
|
+
onPostActivate: J.func,
|
|
6460
|
+
checkCanFocusTrap: J.func,
|
|
6461
|
+
onPause: J.func,
|
|
6462
|
+
onPostPause: J.func,
|
|
6463
|
+
onUnpause: J.func,
|
|
6464
|
+
onPostUnpause: J.func,
|
|
6465
|
+
onDeactivate: J.func,
|
|
6466
|
+
onPostDeactivate: J.func,
|
|
6467
|
+
checkCanReturnFocus: J.func,
|
|
6468
|
+
initialFocus: J.oneOfType([J.instanceOf(ut), J.string, J.bool, J.func]),
|
|
6469
|
+
fallbackFocus: J.oneOfType([
|
|
6470
|
+
J.instanceOf(ut),
|
|
6471
|
+
J.string,
|
|
6473
6472
|
// NOTE: does not support `false` as value (or return value from function)
|
|
6474
|
-
|
|
6473
|
+
J.func
|
|
6475
6474
|
]),
|
|
6476
|
-
escapeDeactivates:
|
|
6477
|
-
clickOutsideDeactivates:
|
|
6478
|
-
returnFocusOnDeactivate:
|
|
6479
|
-
setReturnFocus:
|
|
6480
|
-
allowOutsideClick:
|
|
6481
|
-
preventScroll:
|
|
6482
|
-
tabbableOptions:
|
|
6483
|
-
displayCheck:
|
|
6484
|
-
getShadowRoot:
|
|
6475
|
+
escapeDeactivates: J.oneOfType([J.bool, J.func]),
|
|
6476
|
+
clickOutsideDeactivates: J.oneOfType([J.bool, J.func]),
|
|
6477
|
+
returnFocusOnDeactivate: J.bool,
|
|
6478
|
+
setReturnFocus: J.oneOfType([J.instanceOf(ut), J.string, J.bool, J.func]),
|
|
6479
|
+
allowOutsideClick: J.oneOfType([J.bool, J.func]),
|
|
6480
|
+
preventScroll: J.bool,
|
|
6481
|
+
tabbableOptions: J.shape({
|
|
6482
|
+
displayCheck: J.oneOf(["full", "legacy-full", "non-zero-area", "none"]),
|
|
6483
|
+
getShadowRoot: J.oneOfType([J.bool, J.func])
|
|
6485
6484
|
}),
|
|
6486
|
-
trapStack:
|
|
6487
|
-
isKeyForward:
|
|
6488
|
-
isKeyBackward:
|
|
6485
|
+
trapStack: J.array,
|
|
6486
|
+
isKeyForward: J.func,
|
|
6487
|
+
isKeyBackward: J.func
|
|
6489
6488
|
}),
|
|
6490
|
-
containerElements:
|
|
6489
|
+
containerElements: J.arrayOf(J.instanceOf(ut)),
|
|
6491
6490
|
// DOM element ONLY
|
|
6492
|
-
children:
|
|
6493
|
-
|
|
6491
|
+
children: J.oneOfType([
|
|
6492
|
+
J.element,
|
|
6494
6493
|
// React element
|
|
6495
|
-
|
|
6494
|
+
J.instanceOf(ut)
|
|
6496
6495
|
// DOM element
|
|
6497
6496
|
])
|
|
6498
6497
|
// NOTE: _createFocusTrap is internal, for testing purposes only, so we don't
|
|
@@ -6507,7 +6506,7 @@ rr.defaultProps = {
|
|
|
6507
6506
|
};
|
|
6508
6507
|
var Qo = rr;
|
|
6509
6508
|
const Jo = /* @__PURE__ */ la(Qo);
|
|
6510
|
-
const qa = ({ element: t = "section", children: e, className: n, ...r }) =>
|
|
6509
|
+
const qa = ({ element: t = "section", children: e, className: n, ...r }) => Y.createElement(t, {
|
|
6511
6510
|
className: S("modal", n),
|
|
6512
6511
|
children: typeof e == "string" ? /* @__PURE__ */ a.jsx("p", { children: e }) : e,
|
|
6513
6512
|
...r
|
|
@@ -6527,7 +6526,7 @@ const an = ({
|
|
|
6527
6526
|
className: u = "",
|
|
6528
6527
|
gtmContext: d = "Modal"
|
|
6529
6528
|
}) => {
|
|
6530
|
-
const m =
|
|
6529
|
+
const m = H(), [p, g] = X(e), _ = (b) => {
|
|
6531
6530
|
b.key === "Escape" && y(!1);
|
|
6532
6531
|
};
|
|
6533
6532
|
ae(() => (window.addEventListener("keyup", _), () => {
|
|
@@ -6594,7 +6593,7 @@ const Jl = ({
|
|
|
6594
6593
|
},
|
|
6595
6594
|
sendInvites: l
|
|
6596
6595
|
}) => {
|
|
6597
|
-
const u =
|
|
6596
|
+
const u = H();
|
|
6598
6597
|
return r || (r = u.formatMessage({ id: "inviteModal_formTitle" })), s || (s = u.formatMessage({ id: "inviteModal_formLabel" })), i || (i = u.formatMessage({ id: "inviteModal_cta" })), /* @__PURE__ */ a.jsx(
|
|
6599
6598
|
an,
|
|
6600
6599
|
{
|
|
@@ -6619,7 +6618,7 @@ const Jl = ({
|
|
|
6619
6618
|
);
|
|
6620
6619
|
};
|
|
6621
6620
|
const Xl = ({ members: t }) => {
|
|
6622
|
-
const [e, n] =
|
|
6621
|
+
const [e, n] = X(!1), r = (s) => {
|
|
6623
6622
|
const { fullName: i, jobTitle: o, organisation: c, photo: f } = s || {};
|
|
6624
6623
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
6625
6624
|
/* @__PURE__ */ a.jsx(Ye, { name: i, src: f }),
|
|
@@ -6658,7 +6657,7 @@ const Xl = ({ members: t }) => {
|
|
|
6658
6657
|
)
|
|
6659
6658
|
] });
|
|
6660
6659
|
}, ec = ({ type: t, data: e }) => {
|
|
6661
|
-
const n =
|
|
6660
|
+
const n = H(), {
|
|
6662
6661
|
answers: r,
|
|
6663
6662
|
createdAt: s,
|
|
6664
6663
|
dateHasPassed: i,
|
|
@@ -6780,7 +6779,7 @@ const Xl = ({ members: t }) => {
|
|
|
6780
6779
|
}
|
|
6781
6780
|
}, tc = ({ data: t, cta: e, link: n, gtmContext: r }) => {
|
|
6782
6781
|
var _;
|
|
6783
|
-
const s =
|
|
6782
|
+
const s = H(), [i, o] = X({
|
|
6784
6783
|
loading: !1,
|
|
6785
6784
|
registered: t.registered || !1
|
|
6786
6785
|
});
|
|
@@ -6817,12 +6816,12 @@ const Xl = ({ members: t }) => {
|
|
|
6817
6816
|
if (e && e.onClick && g.includes(m) && u !== "premium") {
|
|
6818
6817
|
const y = i.loading || i.registered, v = async (b) => {
|
|
6819
6818
|
if (b.preventDefault(), b.stopPropagation(), !(y || !e || !e.onClick)) {
|
|
6820
|
-
o((
|
|
6819
|
+
o((k) => ({ ...k, loading: !0 }));
|
|
6821
6820
|
try {
|
|
6822
|
-
const
|
|
6823
|
-
o(
|
|
6821
|
+
const k = await e.onClick(t);
|
|
6822
|
+
o(k === "success" ? () => ({ registered: !0, loading: !1 }) : (j) => ({ ...j, loading: !1 }));
|
|
6824
6823
|
} catch {
|
|
6825
|
-
o((
|
|
6824
|
+
o((j) => ({ ...j, loading: !1 }));
|
|
6826
6825
|
}
|
|
6827
6826
|
}
|
|
6828
6827
|
};
|
|
@@ -6858,14 +6857,14 @@ const nc = {
|
|
|
6858
6857
|
gtmContext: s = "Carousel",
|
|
6859
6858
|
className: i = ""
|
|
6860
6859
|
}) => {
|
|
6861
|
-
var
|
|
6862
|
-
const o =
|
|
6860
|
+
var I, R, Q;
|
|
6861
|
+
const o = H(), c = Ee(Ie), f = c && typeof c.id == "string", [l, u] = X({
|
|
6863
6862
|
data: null,
|
|
6864
6863
|
isLoading: !0
|
|
6865
6864
|
}), { data: d, isLoading: m } = l, p = sa(() => {
|
|
6866
|
-
n(e, f).then((
|
|
6867
|
-
u(() => ({ data:
|
|
6868
|
-
}).catch(() => u((
|
|
6865
|
+
n(e, f).then((C) => {
|
|
6866
|
+
u(() => ({ data: C, isLoading: !1 }));
|
|
6867
|
+
}).catch(() => u((C) => ({ ...C, isLoading: !1 })));
|
|
6869
6868
|
}, [t]);
|
|
6870
6869
|
if (ae(() => {
|
|
6871
6870
|
p();
|
|
@@ -6887,28 +6886,28 @@ const nc = {
|
|
|
6887
6886
|
length: v,
|
|
6888
6887
|
gtmEvent: b
|
|
6889
6888
|
} = Kt[g];
|
|
6890
|
-
let
|
|
6891
|
-
d.slug && (d.slug.slice(0, 4) === "http" || d.slug.slice(0, 2) === "//" || d.slug.slice(0, 6) === "mailto" || d.slug.slice(0, 3) === "tel") && (
|
|
6892
|
-
const
|
|
6893
|
-
let
|
|
6894
|
-
return
|
|
6895
|
-
href:
|
|
6889
|
+
let k = d.slug ? `${_}${d.slug}` : !1;
|
|
6890
|
+
d.slug && (d.slug.slice(0, 4) === "http" || d.slug.slice(0, 2) === "//" || d.slug.slice(0, 6) === "mailto" || d.slug.slice(0, 3) === "tel") && (k = d.slug);
|
|
6891
|
+
const j = { ...nc, ...v };
|
|
6892
|
+
let w = { className: "card" };
|
|
6893
|
+
return k && (w = {
|
|
6894
|
+
href: k,
|
|
6896
6895
|
className: "card gtm-trackable",
|
|
6897
6896
|
"data-gtm-event-context": `${s}-CarouselCard`,
|
|
6898
6897
|
"data-gtm-event-type": `${b}-click`,
|
|
6899
6898
|
"data-testid": "link"
|
|
6900
|
-
}, d.openInNewTab && (
|
|
6899
|
+
}, d.openInNewTab && (w.target = "_blank")), /* @__PURE__ */ a.jsx(
|
|
6901
6900
|
"li",
|
|
6902
6901
|
{
|
|
6903
6902
|
className: S("card-wrapper text-medium", y, i, {
|
|
6904
|
-
"has-link":
|
|
6905
|
-
"no-link": !
|
|
6903
|
+
"has-link": k,
|
|
6904
|
+
"no-link": !k,
|
|
6906
6905
|
"has-image": d.banner
|
|
6907
6906
|
}),
|
|
6908
6907
|
"data-testid": `${g}-card`,
|
|
6909
|
-
children:
|
|
6910
|
-
|
|
6911
|
-
|
|
6908
|
+
children: Y.createElement(
|
|
6909
|
+
k ? "a" : "div",
|
|
6910
|
+
w,
|
|
6912
6911
|
/* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
6913
6912
|
/* @__PURE__ */ a.jsx(
|
|
6914
6913
|
oi,
|
|
@@ -6955,24 +6954,24 @@ const nc = {
|
|
|
6955
6954
|
d.partner && /* @__PURE__ */ a.jsx("p", { className: "partners", "data-testid": "partners", children: d.partner.length > 1 ? o.formatMessage(
|
|
6956
6955
|
{ id: "card_partner" },
|
|
6957
6956
|
{ partner: d.partner[0], number: d.partner.length - 1 }
|
|
6958
|
-
) : et(d.partner[0],
|
|
6957
|
+
) : et(d.partner[0], j.partner) }),
|
|
6959
6958
|
/* Text */
|
|
6960
|
-
["title", "text", "secondaryText"].map((
|
|
6961
|
-
const F = d[
|
|
6959
|
+
["title", "text", "secondaryText"].map((C) => {
|
|
6960
|
+
const F = d[C];
|
|
6962
6961
|
if (!F)
|
|
6963
6962
|
return null;
|
|
6964
|
-
const
|
|
6965
|
-
return /* @__PURE__ */ a.jsx("p", { className:
|
|
6963
|
+
const $ = Ws(C);
|
|
6964
|
+
return /* @__PURE__ */ a.jsx("p", { className: $, "data-testid": $, children: et(F, j[C]) }, C);
|
|
6966
6965
|
}),
|
|
6967
6966
|
(d == null ? void 0 : d.members) && /* @__PURE__ */ a.jsxs("span", { className: "member-information", children: [
|
|
6968
|
-
((
|
|
6967
|
+
((I = d == null ? void 0 : d.members) == null ? void 0 : I.isMember) && /* @__PURE__ */ a.jsx(
|
|
6969
6968
|
ht,
|
|
6970
6969
|
{
|
|
6971
6970
|
size: "small",
|
|
6972
6971
|
variant: "registered",
|
|
6973
6972
|
icon: ((R = d == null ? void 0 : d.members) == null ? void 0 : R.memberType) === "owner" ? "user" : "tick",
|
|
6974
6973
|
children: o.formatMessage({
|
|
6975
|
-
id: `card_member_type_${(
|
|
6974
|
+
id: `card_member_type_${(Q = d == null ? void 0 : d.members) == null ? void 0 : Q.memberType}`
|
|
6976
6975
|
})
|
|
6977
6976
|
}
|
|
6978
6977
|
),
|
|
@@ -6983,7 +6982,7 @@ const nc = {
|
|
|
6983
6982
|
) })
|
|
6984
6983
|
] }),
|
|
6985
6984
|
/* @__PURE__ */ a.jsx(ec, { type: y || "", data: d }),
|
|
6986
|
-
/* @__PURE__ */ a.jsx(tc, { data: d, cta: r, link:
|
|
6985
|
+
/* @__PURE__ */ a.jsx(tc, { data: d, cta: r, link: k || "", gtmContext: s })
|
|
6987
6986
|
] })
|
|
6988
6987
|
)
|
|
6989
6988
|
}
|
|
@@ -7004,11 +7003,11 @@ const rc = ({ cards: t, cardTypes: e, className: n = "", ...r }) => /* @__PURE__
|
|
|
7004
7003
|
const s = e * n <= t, i = t < e * (n + 1), o = r.includes(Math.floor(t / e));
|
|
7005
7004
|
return s && i || o;
|
|
7006
7005
|
}, sc = ({ id: t, title: e }) => {
|
|
7007
|
-
const n =
|
|
7006
|
+
const n = H();
|
|
7008
7007
|
if (!e || !e.text)
|
|
7009
7008
|
return null;
|
|
7010
7009
|
const { text: r, element: s = "h2", variant: i = "default", size: o = "medium", link: c } = e;
|
|
7011
|
-
return
|
|
7010
|
+
return Y.createElement(s, {
|
|
7012
7011
|
className: S("title", i, o, {
|
|
7013
7012
|
"highlighted-title": i === "highlighted"
|
|
7014
7013
|
}),
|
|
@@ -7042,25 +7041,25 @@ const ic = ({
|
|
|
7042
7041
|
className: i,
|
|
7043
7042
|
gtmContext: o
|
|
7044
7043
|
}) => {
|
|
7045
|
-
const c =
|
|
7044
|
+
const c = H(), [f, l] = X({
|
|
7046
7045
|
cardsPerPage: 4,
|
|
7047
7046
|
isLoading: !0
|
|
7048
|
-
}), { cardsPerPage: u, isLoading: d } = f, [m, p] =
|
|
7047
|
+
}), { cardsPerPage: u, isLoading: d } = f, [m, p] = X({
|
|
7049
7048
|
currentPage: 0,
|
|
7050
7049
|
loadedPages: [0]
|
|
7051
|
-
}), { currentPage: g, loadedPages: _ } = m, y = e.length, v = Math.ceil(y / u), b = pe(null),
|
|
7050
|
+
}), { currentPage: g, loadedPages: _ } = m, y = e.length, v = Math.ceil(y / u), b = pe(null), k = wt(!0, !0, b == null ? void 0 : b.current);
|
|
7052
7051
|
ae(() => {
|
|
7053
|
-
let
|
|
7054
|
-
|
|
7052
|
+
let C = 1;
|
|
7053
|
+
k && (k >= En.fourCards ? C = 4 : k >= En.threeCards ? C = 3 : k >= En.twoCards && (C = 2), C > y && (C = y)), l((F) => ({
|
|
7055
7054
|
...F,
|
|
7056
|
-
cardsPerPage:
|
|
7055
|
+
cardsPerPage: C,
|
|
7057
7056
|
isLoading: !1
|
|
7058
7057
|
}));
|
|
7059
|
-
}, [
|
|
7060
|
-
const
|
|
7058
|
+
}, [k, y]);
|
|
7059
|
+
const j = (C = "next") => {
|
|
7061
7060
|
let F = g;
|
|
7062
|
-
if (typeof
|
|
7063
|
-
if (
|
|
7061
|
+
if (typeof C == "string")
|
|
7062
|
+
if (C === "next")
|
|
7064
7063
|
if (g < v - 1)
|
|
7065
7064
|
F = g + 1;
|
|
7066
7065
|
else
|
|
@@ -7070,31 +7069,31 @@ const ic = ({
|
|
|
7070
7069
|
else
|
|
7071
7070
|
return;
|
|
7072
7071
|
else
|
|
7073
|
-
F =
|
|
7074
|
-
p((
|
|
7075
|
-
|
|
7072
|
+
F = C;
|
|
7073
|
+
p(($) => ({
|
|
7074
|
+
...$,
|
|
7076
7075
|
currentPage: F,
|
|
7077
7076
|
loadedPages: [.../* @__PURE__ */ new Set([..._, F])]
|
|
7078
7077
|
}));
|
|
7079
|
-
},
|
|
7080
|
-
Rt =
|
|
7081
|
-
},
|
|
7078
|
+
}, w = (C) => {
|
|
7079
|
+
Rt = C.touches[0].clientX;
|
|
7080
|
+
}, I = (C) => {
|
|
7082
7081
|
if (Rt === null)
|
|
7083
7082
|
return;
|
|
7084
|
-
const F =
|
|
7085
|
-
|
|
7083
|
+
const F = C.touches[0].clientX, $ = Rt - F;
|
|
7084
|
+
$ > 5 ? j("next") : $ < -5 && j("previous"), Rt = null;
|
|
7086
7085
|
}, R = {
|
|
7087
|
-
"--width": `${
|
|
7086
|
+
"--width": `${k || 0}px`,
|
|
7088
7087
|
"--total-cards": y,
|
|
7089
7088
|
"--cards-per-page": u,
|
|
7090
7089
|
"--page": g
|
|
7091
7090
|
};
|
|
7092
7091
|
if (d)
|
|
7093
7092
|
return /* @__PURE__ */ a.jsx(wa, { layout: `carousel${s ? "-with-title" : ""}` });
|
|
7094
|
-
const
|
|
7095
|
-
var
|
|
7096
|
-
let
|
|
7097
|
-
return (
|
|
7093
|
+
const Q = (C, F) => {
|
|
7094
|
+
var T;
|
|
7095
|
+
let $ = null;
|
|
7096
|
+
return (T = C == null ? void 0 : C.sys) != null && T.id ? $ = `card-${C.sys.id}` : C != null && C.slug ? $ = `card-${C.slug}` : [n[F], C.contentType].includes("customCard") && ($ = `card-${window.btoa(`${C.title} ${C.createdAt}`)}-${F}`), $;
|
|
7098
7097
|
};
|
|
7099
7098
|
return /* @__PURE__ */ a.jsxs(
|
|
7100
7099
|
"section",
|
|
@@ -7108,29 +7107,29 @@ const ic = ({
|
|
|
7108
7107
|
"ul",
|
|
7109
7108
|
{
|
|
7110
7109
|
className: "carousel",
|
|
7111
|
-
onTouchStart:
|
|
7112
|
-
onTouchMove:
|
|
7110
|
+
onTouchStart: w,
|
|
7111
|
+
onTouchMove: I,
|
|
7113
7112
|
style: R,
|
|
7114
7113
|
"data-testid": "carousel-list",
|
|
7115
|
-
children: e.map((
|
|
7116
|
-
let
|
|
7117
|
-
return
|
|
7114
|
+
children: e.map((C, F) => {
|
|
7115
|
+
let $ = Q(C, F);
|
|
7116
|
+
return $ && ac(F, u, g, _) ? /* @__PURE__ */ a.jsx(
|
|
7118
7117
|
Ua,
|
|
7119
7118
|
{
|
|
7120
|
-
id:
|
|
7121
|
-
card: { ...
|
|
7119
|
+
id: $,
|
|
7120
|
+
card: { ...C, contentType: n[F] },
|
|
7122
7121
|
buildCardData: r,
|
|
7123
7122
|
gtmContext: o
|
|
7124
7123
|
},
|
|
7125
|
-
|
|
7126
|
-
) : (
|
|
7124
|
+
$
|
|
7125
|
+
) : ($ = $ || `${t}-card-${F}`, /* @__PURE__ */ a.jsx(
|
|
7127
7126
|
Se,
|
|
7128
7127
|
{
|
|
7129
7128
|
element: "li",
|
|
7130
7129
|
className: "card-wrapper",
|
|
7131
7130
|
"data-testid": "card-placeholder"
|
|
7132
7131
|
},
|
|
7133
|
-
|
|
7132
|
+
$
|
|
7134
7133
|
));
|
|
7135
7134
|
})
|
|
7136
7135
|
}
|
|
@@ -7142,8 +7141,8 @@ const ic = ({
|
|
|
7142
7141
|
variant: "secondary",
|
|
7143
7142
|
size: "large",
|
|
7144
7143
|
icon: { icon: "chevron_left" },
|
|
7145
|
-
onClick: (
|
|
7146
|
-
|
|
7144
|
+
onClick: (C) => {
|
|
7145
|
+
C.preventDefault(), C.stopPropagation(), j("previous");
|
|
7147
7146
|
},
|
|
7148
7147
|
screenreaderText: c.formatMessage({
|
|
7149
7148
|
id: "carousel_pagination_previous"
|
|
@@ -7151,14 +7150,14 @@ const ic = ({
|
|
|
7151
7150
|
disabled: g <= 0
|
|
7152
7151
|
}
|
|
7153
7152
|
) }),
|
|
7154
|
-
[...Array(v)].map((
|
|
7153
|
+
[...Array(v)].map((C, F) => /* @__PURE__ */ a.jsx("li", { "data-testid": "carousel-controls-button", children: /* @__PURE__ */ a.jsx(
|
|
7155
7154
|
"button",
|
|
7156
7155
|
{
|
|
7157
7156
|
className: S("page-indicator", {
|
|
7158
7157
|
selected: F === g
|
|
7159
7158
|
}),
|
|
7160
|
-
onClick: (
|
|
7161
|
-
|
|
7159
|
+
onClick: ($) => {
|
|
7160
|
+
$.preventDefault(), $.stopPropagation(), j(F);
|
|
7162
7161
|
},
|
|
7163
7162
|
children: /* @__PURE__ */ a.jsx(be, { showOnFocus: !1, children: c.formatMessage(
|
|
7164
7163
|
{ id: "carousel_pagination_page" },
|
|
@@ -7172,8 +7171,8 @@ const ic = ({
|
|
|
7172
7171
|
variant: "secondary",
|
|
7173
7172
|
size: "large",
|
|
7174
7173
|
icon: { icon: "chevron_right" },
|
|
7175
|
-
onClick: (
|
|
7176
|
-
|
|
7174
|
+
onClick: (C) => {
|
|
7175
|
+
C.preventDefault(), C.stopPropagation(), j("next");
|
|
7177
7176
|
},
|
|
7178
7177
|
screenreaderText: c.formatMessage({ id: "carousel_pagination_next" }),
|
|
7179
7178
|
disabled: g >= v - 1
|
|
@@ -7222,7 +7221,7 @@ const Sn = "joinCommunityButton", Wa = ({
|
|
|
7222
7221
|
}, leave: () => {
|
|
7223
7222
|
} }
|
|
7224
7223
|
}) => {
|
|
7225
|
-
const s =
|
|
7224
|
+
const s = H(), i = Ee(Ie), o = i && typeof i.id == "string", [c, f] = X(t), [l, u] = X(t ? "joined" : "notJoined");
|
|
7226
7225
|
ae(() => {
|
|
7227
7226
|
l === "joining" ? u("joined") : l === "leaving" && u("notJoined");
|
|
7228
7227
|
}, [c]);
|
|
@@ -7255,7 +7254,7 @@ const Cn = "communityDetails_", tu = ({
|
|
|
7255
7254
|
members: { number: r = 0, data: s = [] } = { number: 0, data: [] },
|
|
7256
7255
|
functions: { invite: i, ...o }
|
|
7257
7256
|
}) => {
|
|
7258
|
-
const c =
|
|
7257
|
+
const c = H(), f = 5, l = r || s.length, u = s.length ? s : Array(f).fill({}), d = `/communities/${n}/members` === window.location.pathname;
|
|
7259
7258
|
return /* @__PURE__ */ a.jsxs("div", { className: S("community-details", t), children: [
|
|
7260
7259
|
/* @__PURE__ */ a.jsx(Ae, {}),
|
|
7261
7260
|
/* @__PURE__ */ a.jsxs("div", { className: "member-details", children: [
|
|
@@ -7296,7 +7295,7 @@ const Cn = "communityDetails_", tu = ({
|
|
|
7296
7295
|
] });
|
|
7297
7296
|
};
|
|
7298
7297
|
const nu = ({ breadcrumbs: t, cutoff: e = 20, className: n = "" }) => {
|
|
7299
|
-
const r =
|
|
7298
|
+
const r = H();
|
|
7300
7299
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
7301
7300
|
/* @__PURE__ */ a.jsx(
|
|
7302
7301
|
be,
|
|
@@ -7327,13 +7326,13 @@ const ru = ({
|
|
|
7327
7326
|
},
|
|
7328
7327
|
className: s = ""
|
|
7329
7328
|
}) => {
|
|
7330
|
-
const i =
|
|
7329
|
+
const i = H(), o = e ? [
|
|
7331
7330
|
{
|
|
7332
7331
|
id: "all",
|
|
7333
7332
|
text: typeof e != "boolean" && e.text || i.formatMessage({ id: "filters_all" })
|
|
7334
7333
|
},
|
|
7335
7334
|
...t
|
|
7336
|
-
] : t, [c, f] =
|
|
7335
|
+
] : t, [c, f] = X(e ? ["all"] : []), l = (u, d) => {
|
|
7337
7336
|
let m = [];
|
|
7338
7337
|
c.includes(u) ? m = c.filter((p) => p !== u) : u === "all" ? m = ["all"] : n ? m = [...c.filter((p) => p !== "all"), u] : m = [u], f((p) => (r && typeof r == "function" && r({ current: m, previous: p }), m)), d && typeof d == "function" && d();
|
|
7339
7338
|
};
|
|
@@ -7378,8 +7377,8 @@ const Ft = "languageSwitcher_", au = ({
|
|
|
7378
7377
|
label: c,
|
|
7379
7378
|
className: f = ""
|
|
7380
7379
|
}) => {
|
|
7381
|
-
const l =
|
|
7382
|
-
} } = Ee(ya), [d, m] =
|
|
7380
|
+
const l = H(), { updateLanguage: u = () => {
|
|
7381
|
+
} } = Ee(ya), [d, m] = X(t);
|
|
7383
7382
|
if (ae(() => {
|
|
7384
7383
|
t !== d && m(t);
|
|
7385
7384
|
}, [t]), !r || !Object.values(r).some(
|
|
@@ -7391,10 +7390,10 @@ const Ft = "languageSwitcher_", au = ({
|
|
|
7391
7390
|
/* @__PURE__ */ a.jsxs("nav", { children: [
|
|
7392
7391
|
o !== "short" && /* @__PURE__ */ a.jsx("p", { children: c || l.formatMessage({ id: `${Ft}label` }) }),
|
|
7393
7392
|
/* @__PURE__ */ a.jsx("ul", { children: g.map((y) => {
|
|
7394
|
-
var
|
|
7393
|
+
var k;
|
|
7395
7394
|
if (!gn[y])
|
|
7396
7395
|
return null;
|
|
7397
|
-
const v = (
|
|
7396
|
+
const v = (k = r[y]) == null ? void 0 : k.post_name;
|
|
7398
7397
|
let b = { className: y };
|
|
7399
7398
|
if (d === y)
|
|
7400
7399
|
b["aria-label"] = l.formatMessage(
|
|
@@ -7402,14 +7401,14 @@ const Ft = "languageSwitcher_", au = ({
|
|
|
7402
7401
|
{ language: gn[y] }
|
|
7403
7402
|
);
|
|
7404
7403
|
else {
|
|
7405
|
-
const
|
|
7404
|
+
const j = oc(y, v, i);
|
|
7406
7405
|
b = {
|
|
7407
7406
|
...b,
|
|
7408
|
-
href: typeof
|
|
7409
|
-
onClick: (
|
|
7410
|
-
m(y), u(y), typeof s < "u" && (
|
|
7407
|
+
href: typeof j == "string" ? j : j.url,
|
|
7408
|
+
onClick: (w) => {
|
|
7409
|
+
m(y), u(y), typeof s < "u" && (w.preventDefault(), w.stopPropagation(), s(
|
|
7411
7410
|
y,
|
|
7412
|
-
typeof
|
|
7411
|
+
typeof j == "string" ? j : j.urlForRouter
|
|
7413
7412
|
));
|
|
7414
7413
|
}
|
|
7415
7414
|
};
|
|
@@ -7454,7 +7453,7 @@ const $n = ks({ locale: "en", messages: rt }), sn = ({
|
|
|
7454
7453
|
className: f = "",
|
|
7455
7454
|
gtmContext: l = "LoadMore"
|
|
7456
7455
|
}) => {
|
|
7457
|
-
const [u, d] =
|
|
7456
|
+
const [u, d] = X(""), m = async (p) => {
|
|
7458
7457
|
if (!n)
|
|
7459
7458
|
try {
|
|
7460
7459
|
await e(p);
|
|
@@ -7500,14 +7499,14 @@ const cc = ({
|
|
|
7500
7499
|
options: n,
|
|
7501
7500
|
className: r = ""
|
|
7502
7501
|
}) => {
|
|
7503
|
-
const s =
|
|
7502
|
+
const s = H(), i = pe(
|
|
7504
7503
|
null
|
|
7505
|
-
), [o, c] =
|
|
7504
|
+
), [o, c] = X(!1), f = (l) => {
|
|
7506
7505
|
i.current && l.target instanceof HTMLElement && !i.current.contains(l.target) && c(!1);
|
|
7507
7506
|
};
|
|
7508
7507
|
return ae(() => (document.addEventListener("click", f, !0), () => {
|
|
7509
7508
|
document.removeEventListener("click", f, !0);
|
|
7510
|
-
})),
|
|
7509
|
+
})), Y.createElement(t, {
|
|
7511
7510
|
ref: i,
|
|
7512
7511
|
className: S("more-menu text-medium", r),
|
|
7513
7512
|
children: /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
@@ -7575,7 +7574,7 @@ const uc = [
|
|
|
7575
7574
|
href: "/communities/"
|
|
7576
7575
|
}
|
|
7577
7576
|
], dc = ({ activeLink: t }) => {
|
|
7578
|
-
const e =
|
|
7577
|
+
const e = H(), n = Ee(Ie), r = n && typeof n.id == "string";
|
|
7579
7578
|
return /* @__PURE__ */ a.jsxs("ul", { id: "navigation-menu", className: "text-medium", children: [
|
|
7580
7579
|
uc.map(({ key: s, href: i }) => /* @__PURE__ */ a.jsx(
|
|
7581
7580
|
"li",
|
|
@@ -7666,7 +7665,7 @@ const mc = "shareLinks_", su = ({
|
|
|
7666
7665
|
variant: i = "default",
|
|
7667
7666
|
className: o = ""
|
|
7668
7667
|
}) => {
|
|
7669
|
-
const c =
|
|
7668
|
+
const c = H(), f = fc({ title: t, link: e, referrer: n });
|
|
7670
7669
|
return /* @__PURE__ */ a.jsxs("aside", { className: S("share-links", s, i, o), children: [
|
|
7671
7670
|
/* @__PURE__ */ a.jsx("p", { className: "text-small", children: c.formatMessage({ id: "shareLinks_label" }) }),
|
|
7672
7671
|
/* @__PURE__ */ a.jsx("ul", { children: f.map(({ key: l, icon: u, url: d, shouldRender: m = !0, onClick: p }) => {
|
|
@@ -7707,7 +7706,7 @@ const iu = ({ tabs: t, className: e = "", preventLocationChange: n }) => {
|
|
|
7707
7706
|
}
|
|
7708
7707
|
}
|
|
7709
7708
|
}
|
|
7710
|
-
const [i, o] =
|
|
7709
|
+
const [i, o] = X(
|
|
7711
7710
|
(l = t[s]) != null && l.id ? t[s].id : r(t[s].id, t[s].text, s)
|
|
7712
7711
|
);
|
|
7713
7712
|
ae(() => {
|
|
@@ -7768,13 +7767,13 @@ const pc = {
|
|
|
7768
7767
|
}) => {
|
|
7769
7768
|
const s = wt(!0);
|
|
7770
7769
|
let i = r;
|
|
7771
|
-
return
|
|
7770
|
+
return Y.Children.count(r) === 1 && (i = Y.Children.toArray(r)[0], i.props && (i = i.props.children)), /* @__PURE__ */ a.jsx("section", { className: S("columns", `layout-${t}`, n), children: Y.Children.map(i, (o, c) => e !== !1 && c === e && s && s < pc[t] ? null : o) });
|
|
7772
7771
|
};
|
|
7773
7772
|
let Nn;
|
|
7774
7773
|
const Pn = "contactFooter_", ou = ({ onSuccess: t = async () => {
|
|
7775
7774
|
}, onFailure: e = () => {
|
|
7776
7775
|
} }) => {
|
|
7777
|
-
const n = pe(null), [r, s] =
|
|
7776
|
+
const n = pe(null), [r, s] = Y.useState(0), [i, o] = Y.useState(!1), c = () => {
|
|
7778
7777
|
n.current && s(n.current.clientHeight);
|
|
7779
7778
|
}, f = () => {
|
|
7780
7779
|
i || (o(!0), clearTimeout(Nn), Nn = setTimeout(() => {
|
|
@@ -7817,7 +7816,7 @@ const Mn = "cookieBanner_", Rn = [
|
|
|
7817
7816
|
"apolitical-performance-cookie-consent",
|
|
7818
7817
|
"functional-cookie-consent"
|
|
7819
7818
|
], Fn = new Date(Date.now() + 12 * 30 * 24 * 60 * 60 * 1e3), gc = () => {
|
|
7820
|
-
const t =
|
|
7819
|
+
const t = H(), [e, n, r] = oa(Rn), [s, i] = X(
|
|
7821
7820
|
!e["apol-cookie-banner"]
|
|
7822
7821
|
), o = () => {
|
|
7823
7822
|
Rn.forEach((u) => {
|
|
@@ -8236,7 +8235,7 @@ const Xe = "footer_", Gt = "SiteFooter", Kr = ({ group: t }) => {
|
|
|
8236
8235
|
},
|
|
8237
8236
|
doTrack: i = null
|
|
8238
8237
|
}) => {
|
|
8239
|
-
const o =
|
|
8238
|
+
const o = H(), c = ca(Qt, t);
|
|
8240
8239
|
if (!c || c.onlyShow && (c.onlyShow === "logged-in" && !e || c.onlyShow === "logged-out" && e))
|
|
8241
8240
|
return null;
|
|
8242
8241
|
const f = "doTrack" in c, l = i === null ? f ? c.doTrack : !0 : i, u = t.includes("buttons.");
|
|
@@ -8246,8 +8245,8 @@ const Xe = "footer_", Gt = "SiteFooter", Kr = ({ group: t }) => {
|
|
|
8246
8245
|
if (c.href) {
|
|
8247
8246
|
let b = c.gtmType || `${t}-click`;
|
|
8248
8247
|
if (b.includes(".")) {
|
|
8249
|
-
const
|
|
8250
|
-
b = `${
|
|
8248
|
+
const k = b.split("."), j = k[k.length - 2];
|
|
8249
|
+
b = `${j === "topics" ? `${j}-` : ""}${k[k.length - 1]}`;
|
|
8251
8250
|
}
|
|
8252
8251
|
m = {
|
|
8253
8252
|
href: c.href,
|
|
@@ -8267,17 +8266,17 @@ const Xe = "footer_", Gt = "SiteFooter", Kr = ({ group: t }) => {
|
|
|
8267
8266
|
const p = c.order && c.order[0] && c[c.order[0]], g = p && c[c.order[0]].order, _ = m && window.location.pathname === c.href;
|
|
8268
8267
|
let y = {}, v = {};
|
|
8269
8268
|
if (p) {
|
|
8270
|
-
const b = c.menuId || t,
|
|
8271
|
-
onClick: (
|
|
8269
|
+
const b = c.menuId || t, k = {
|
|
8270
|
+
onClick: (j) => fe.events.onClick(j, { id: b, callback: s, isOpen: r[b] }),
|
|
8272
8271
|
onFocus: () => fe.events.onFocus({ id: b }),
|
|
8273
8272
|
onBlur: () => fe.events.onBlur({ id: b, callback: s }),
|
|
8274
8273
|
onMouseLeave: () => fe.events.onBlur({ id: b, callback: s }),
|
|
8275
8274
|
onMouseEnter: () => fe.events.onMouseEnter({ id: b, callback: s })
|
|
8276
8275
|
};
|
|
8277
8276
|
n && (g && (y = {
|
|
8278
|
-
...
|
|
8279
|
-
onKeyPress: (
|
|
8280
|
-
|
|
8277
|
+
...k,
|
|
8278
|
+
onKeyPress: (j) => {
|
|
8279
|
+
j.key === "Enter" && fe.events.onClick(j, { id: b, callback: s, isOpen: r[b] });
|
|
8281
8280
|
},
|
|
8282
8281
|
tabIndex: "0",
|
|
8283
8282
|
// Add a `tabIndex` so keyboard users can focus on the `li`
|
|
@@ -8286,7 +8285,7 @@ const Xe = "footer_", Gt = "SiteFooter", Kr = ({ group: t }) => {
|
|
|
8286
8285
|
"aria-controls": b
|
|
8287
8286
|
}), v = { hidden: b in r ? !r[b] : !0 }), g || (v = {
|
|
8288
8287
|
...v,
|
|
8289
|
-
...
|
|
8288
|
+
...k
|
|
8290
8289
|
});
|
|
8291
8290
|
}
|
|
8292
8291
|
return /* @__PURE__ */ a.jsxs(
|
|
@@ -8301,7 +8300,7 @@ const Xe = "footer_", Gt = "SiteFooter", Kr = ({ group: t }) => {
|
|
|
8301
8300
|
role: "none",
|
|
8302
8301
|
...y,
|
|
8303
8302
|
children: [
|
|
8304
|
-
m ?
|
|
8303
|
+
m ? Y.createElement(
|
|
8305
8304
|
u ? se : "a",
|
|
8306
8305
|
m,
|
|
8307
8306
|
o.formatMessage({ id: d })
|
|
@@ -8309,7 +8308,7 @@ const Xe = "footer_", Gt = "SiteFooter", Kr = ({ group: t }) => {
|
|
|
8309
8308
|
c.order && /* @__PURE__ */ a.jsx("ul", { ...v, children: c.order.map((b) => {
|
|
8310
8309
|
if (!c[b])
|
|
8311
8310
|
return null;
|
|
8312
|
-
const
|
|
8311
|
+
const k = {
|
|
8313
8312
|
isLoggedIn: e,
|
|
8314
8313
|
isDesktopVersion: n,
|
|
8315
8314
|
menus: r,
|
|
@@ -8324,13 +8323,13 @@ const Xe = "footer_", Gt = "SiteFooter", Kr = ({ group: t }) => {
|
|
|
8324
8323
|
}),
|
|
8325
8324
|
children: [
|
|
8326
8325
|
o.formatMessage({ id: `${d}_${b}` }),
|
|
8327
|
-
/* @__PURE__ */ a.jsx("ul", { children: c[b].order.map((
|
|
8326
|
+
/* @__PURE__ */ a.jsx("ul", { children: c[b].order.map((j) => /* @__PURE__ */ a.jsx(
|
|
8328
8327
|
Jt,
|
|
8329
8328
|
{
|
|
8330
|
-
id: `${t}.${b}.${
|
|
8331
|
-
...
|
|
8329
|
+
id: `${t}.${b}.${j}`,
|
|
8330
|
+
...k
|
|
8332
8331
|
},
|
|
8333
|
-
|
|
8332
|
+
j
|
|
8334
8333
|
)) })
|
|
8335
8334
|
]
|
|
8336
8335
|
},
|
|
@@ -8339,7 +8338,7 @@ const Xe = "footer_", Gt = "SiteFooter", Kr = ({ group: t }) => {
|
|
|
8339
8338
|
Jt,
|
|
8340
8339
|
{
|
|
8341
8340
|
id: `${t}.${b}`,
|
|
8342
|
-
...
|
|
8341
|
+
...k
|
|
8343
8342
|
},
|
|
8344
8343
|
b
|
|
8345
8344
|
);
|
|
@@ -8350,7 +8349,7 @@ const Xe = "footer_", Gt = "SiteFooter", Kr = ({ group: t }) => {
|
|
|
8350
8349
|
);
|
|
8351
8350
|
};
|
|
8352
8351
|
const vc = { height: 67, height_desktop: 83 }, Ha = ({ showNavigation: t = !0 }) => {
|
|
8353
|
-
const e =
|
|
8352
|
+
const e = H(), n = Ee(Ie), r = wt(!0, !0), s = n && typeof n.id == "string", i = xt(
|
|
8354
8353
|
() => fe.getIsDesktopVersion(s, r),
|
|
8355
8354
|
[s, r]
|
|
8356
8355
|
), [o, c] = Yn(ma, {
|
|
@@ -8526,7 +8525,7 @@ const vc = { height: 67, height_desktop: 83 }, Ha = ({ showNavigation: t = !0 })
|
|
|
8526
8525
|
] });
|
|
8527
8526
|
};
|
|
8528
8527
|
const bc = () => {
|
|
8529
|
-
const t =
|
|
8528
|
+
const t = H();
|
|
8530
8529
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
8531
8530
|
/* @__PURE__ */ a.jsx(Ha, {}),
|
|
8532
8531
|
/* @__PURE__ */ a.jsx("div", { id: "content", children: /* @__PURE__ */ a.jsx(
|
|
@@ -8578,7 +8577,7 @@ const bc = () => {
|
|
|
8578
8577
|
children: y
|
|
8579
8578
|
}
|
|
8580
8579
|
),
|
|
8581
|
-
|
|
8580
|
+
Y.createElement(u === "bold" ? qa : "div", {
|
|
8582
8581
|
id: "content",
|
|
8583
8582
|
children: _,
|
|
8584
8583
|
className: S({ "large-modal": p === "large" })
|
|
@@ -8630,7 +8629,7 @@ const lu = ({
|
|
|
8630
8629
|
gtmType: i = "tag-click",
|
|
8631
8630
|
gtmContext: o = "tags"
|
|
8632
8631
|
}) => {
|
|
8633
|
-
const c =
|
|
8632
|
+
const c = H();
|
|
8634
8633
|
if (!t || t.length < 1)
|
|
8635
8634
|
return null;
|
|
8636
8635
|
const f = [];
|
|
@@ -8670,7 +8669,7 @@ const uu = ({
|
|
|
8670
8669
|
gtmType: i = "member-click",
|
|
8671
8670
|
className: o = ""
|
|
8672
8671
|
}) => {
|
|
8673
|
-
const c =
|
|
8672
|
+
const c = H();
|
|
8674
8673
|
return t.length === 0 ? null : /* @__PURE__ */ a.jsxs("div", { className: S("members-list", o), children: [
|
|
8675
8674
|
/* @__PURE__ */ a.jsxs("h1", { children: [
|
|
8676
8675
|
c.formatMessage({ id: "membersList" }),
|
|
@@ -8702,11 +8701,11 @@ const du = ({
|
|
|
8702
8701
|
styling: o = {},
|
|
8703
8702
|
className: c = ""
|
|
8704
8703
|
}) => {
|
|
8705
|
-
const f =
|
|
8704
|
+
const f = H();
|
|
8706
8705
|
let l = s ? n : r;
|
|
8707
8706
|
l > 99 ? l = 100 : l < 1 && (l = 0);
|
|
8708
8707
|
const { highlightPercentage: u = !1 } = o;
|
|
8709
|
-
return
|
|
8708
|
+
return Y.createElement(t, {
|
|
8710
8709
|
className: S("course-progression", c, {
|
|
8711
8710
|
"highlight-percentage": u,
|
|
8712
8711
|
"has-circle-graph": i === "circle"
|
|
@@ -8745,7 +8744,7 @@ const xc = ({
|
|
|
8745
8744
|
subsectionId: n,
|
|
8746
8745
|
title: r,
|
|
8747
8746
|
className: s = ""
|
|
8748
|
-
}) =>
|
|
8747
|
+
}) => Y.createElement(t, {
|
|
8749
8748
|
className: S("lesson-name", s),
|
|
8750
8749
|
"data-number": `${e}.${n}`,
|
|
8751
8750
|
children: r
|
|
@@ -8758,7 +8757,7 @@ const wc = ({
|
|
|
8758
8757
|
type: s,
|
|
8759
8758
|
children: i
|
|
8760
8759
|
}) => {
|
|
8761
|
-
const o =
|
|
8760
|
+
const o = H(), c = Qn(`lessonType_${s}`) ? o.formatMessage({ id: `lessonType_${s}` }) : Zs(s || "");
|
|
8762
8761
|
return /* @__PURE__ */ a.jsxs("small", { className: S("content-type", { [t]: t !== "default" }), children: [
|
|
8763
8762
|
/* @__PURE__ */ a.jsx("span", { className: S("type", n), children: c }),
|
|
8764
8763
|
" ",
|
|
@@ -8782,7 +8781,7 @@ const fu = ({
|
|
|
8782
8781
|
},
|
|
8783
8782
|
quizScores: u
|
|
8784
8783
|
}) => {
|
|
8785
|
-
const d =
|
|
8784
|
+
const d = H(), m = "courseStructure_", p = l.toLowerCase().includes("course conclusion");
|
|
8786
8785
|
return /* @__PURE__ */ a.jsxs(
|
|
8787
8786
|
Jn,
|
|
8788
8787
|
{
|
|
@@ -8814,14 +8813,14 @@ const fu = ({
|
|
|
8814
8813
|
contentType: y,
|
|
8815
8814
|
icon: v,
|
|
8816
8815
|
image: b,
|
|
8817
|
-
isIntroduction:
|
|
8818
|
-
optional:
|
|
8819
|
-
slug:
|
|
8820
|
-
subsectionId:
|
|
8816
|
+
isIntroduction: k,
|
|
8817
|
+
optional: j,
|
|
8818
|
+
slug: w,
|
|
8819
|
+
subsectionId: I,
|
|
8821
8820
|
title: R,
|
|
8822
|
-
type:
|
|
8821
|
+
type: Q
|
|
8823
8822
|
}) => {
|
|
8824
|
-
const
|
|
8823
|
+
const C = s && e || k, F = {};
|
|
8825
8824
|
return b && (F.style = { "--image": `url(${b})` }), /* @__PURE__ */ a.jsx(
|
|
8826
8825
|
"li",
|
|
8827
8826
|
{
|
|
@@ -8830,13 +8829,13 @@ const fu = ({
|
|
|
8830
8829
|
discussion: y === Et.DISCUSSION,
|
|
8831
8830
|
quiz: y === Et.QUIZ,
|
|
8832
8831
|
completed: g && y === Et.ARTICLE,
|
|
8833
|
-
locked: !
|
|
8832
|
+
locked: !C
|
|
8834
8833
|
}),
|
|
8835
8834
|
...F,
|
|
8836
8835
|
children: /* @__PURE__ */ a.jsx(
|
|
8837
8836
|
at,
|
|
8838
8837
|
{
|
|
8839
|
-
href:
|
|
8838
|
+
href: C ? `/microcourses/en/${c}/${w}` : void 0,
|
|
8840
8839
|
fallbackElement: "span",
|
|
8841
8840
|
className: "inner",
|
|
8842
8841
|
gtmContext: `MicrocourseOutline${zs(R)}`,
|
|
@@ -8846,7 +8845,7 @@ const fu = ({
|
|
|
8846
8845
|
xc,
|
|
8847
8846
|
{
|
|
8848
8847
|
sectionId: i,
|
|
8849
|
-
subsectionId:
|
|
8848
|
+
subsectionId: I,
|
|
8850
8849
|
title: R,
|
|
8851
8850
|
className: "course-title"
|
|
8852
8851
|
}
|
|
@@ -8857,16 +8856,16 @@ const fu = ({
|
|
|
8857
8856
|
{
|
|
8858
8857
|
completionTime: _,
|
|
8859
8858
|
icon: v,
|
|
8860
|
-
optional:
|
|
8861
|
-
type:
|
|
8862
|
-
children: u && u[
|
|
8859
|
+
optional: j,
|
|
8860
|
+
type: Q,
|
|
8861
|
+
children: u && u[w] && /* @__PURE__ */ a.jsx("span", { className: "quiz-score", children: `${u[w]}%` })
|
|
8863
8862
|
}
|
|
8864
8863
|
)
|
|
8865
8864
|
] })
|
|
8866
8865
|
}
|
|
8867
8866
|
)
|
|
8868
8867
|
},
|
|
8869
|
-
|
|
8868
|
+
w
|
|
8870
8869
|
);
|
|
8871
8870
|
}
|
|
8872
8871
|
) })
|
|
@@ -8879,7 +8878,7 @@ const mu = ({
|
|
|
8879
8878
|
onClick: e,
|
|
8880
8879
|
...n
|
|
8881
8880
|
}) => {
|
|
8882
|
-
const r =
|
|
8881
|
+
const r = H();
|
|
8883
8882
|
return n["data-gtm-event-context"] || (n["data-gtm-event-context"] = "LessonIntroduction"), /* @__PURE__ */ a.jsx(
|
|
8884
8883
|
se,
|
|
8885
8884
|
{
|
|
@@ -8933,10 +8932,10 @@ const we = "discussion_form_", ar = ({
|
|
|
8933
8932
|
},
|
|
8934
8933
|
gtmContext: l = "DiscussionForm"
|
|
8935
8934
|
}) => {
|
|
8936
|
-
var F,
|
|
8937
|
-
const u =
|
|
8935
|
+
var F, $, T;
|
|
8936
|
+
const u = H(), d = Ee(Ie), [m, p] = X(
|
|
8938
8937
|
n.isEditing && n.isEditing.text || ""
|
|
8939
|
-
), [g, _] =
|
|
8938
|
+
), [g, _] = X(c.error || !1), [y, v] = X(!1), b = pe(null);
|
|
8940
8939
|
if (r || (r = b), n.isLoading)
|
|
8941
8940
|
return /* @__PURE__ */ a.jsx(
|
|
8942
8941
|
Se,
|
|
@@ -8945,87 +8944,87 @@ const we = "discussion_form_", ar = ({
|
|
|
8945
8944
|
"data-testid": "loading-placeholder"
|
|
8946
8945
|
}
|
|
8947
8946
|
);
|
|
8948
|
-
const
|
|
8949
|
-
const
|
|
8950
|
-
p(
|
|
8951
|
-
let
|
|
8952
|
-
!d || !d.id ?
|
|
8947
|
+
const k = (x) => {
|
|
8948
|
+
const N = x.target.value;
|
|
8949
|
+
p(N);
|
|
8950
|
+
let A;
|
|
8951
|
+
!d || !d.id ? A = $e(
|
|
8953
8952
|
u.formatMessage,
|
|
8954
8953
|
`${we}error_loggedOut`,
|
|
8955
8954
|
t.type,
|
|
8956
8955
|
"action"
|
|
8957
|
-
) : e ?
|
|
8956
|
+
) : e ? N.length >= i && (A = `${we}error_tooLong`) : A = $e(
|
|
8958
8957
|
u.formatMessage,
|
|
8959
8958
|
`${we}error_noPermission`,
|
|
8960
8959
|
t.type,
|
|
8961
8960
|
"action"
|
|
8962
|
-
),
|
|
8961
|
+
), A ? _(A) : g && _(!1);
|
|
8963
8962
|
};
|
|
8964
|
-
let
|
|
8963
|
+
let j = `${t.type}-form`;
|
|
8965
8964
|
if (t.type === "response" || t.type === "reply") {
|
|
8966
|
-
const
|
|
8967
|
-
|
|
8965
|
+
const x = ((F = t.slugs) == null ? void 0 : F.reply) || (($ = t.slugs) == null ? void 0 : $.answer) || ((T = t.slugs) == null ? void 0 : T.question) || "";
|
|
8966
|
+
x && (j = `${j}-${x.slice(-15)}`);
|
|
8968
8967
|
}
|
|
8969
|
-
const
|
|
8970
|
-
var
|
|
8971
|
-
if (
|
|
8968
|
+
const w = async (x) => {
|
|
8969
|
+
var A;
|
|
8970
|
+
if (x.preventDefault(), x.stopPropagation(), !d || !d.id || !e || R)
|
|
8972
8971
|
return;
|
|
8973
8972
|
At && clearTimeout(At), v("submitting");
|
|
8974
|
-
const
|
|
8973
|
+
const N = window.location.pathname;
|
|
8975
8974
|
try {
|
|
8976
|
-
let
|
|
8975
|
+
let W;
|
|
8977
8976
|
switch (t.type) {
|
|
8978
8977
|
case "post":
|
|
8979
|
-
|
|
8978
|
+
W = await f.create({ content: m });
|
|
8980
8979
|
break;
|
|
8981
8980
|
case "question":
|
|
8982
|
-
|
|
8981
|
+
W = await f.create({
|
|
8983
8982
|
title: m,
|
|
8984
8983
|
authorId: d && d.id,
|
|
8985
|
-
...(
|
|
8984
|
+
...(A = f.props) == null ? void 0 : A.create
|
|
8986
8985
|
});
|
|
8987
8986
|
break;
|
|
8988
8987
|
case "response":
|
|
8989
|
-
|
|
8988
|
+
W = await f.create(
|
|
8990
8989
|
{ questionSlug: t.slugs.question },
|
|
8991
|
-
{ body: m, authorId: d && d.id, contentPath:
|
|
8990
|
+
{ body: m, authorId: d && d.id, contentPath: N }
|
|
8992
8991
|
);
|
|
8993
8992
|
break;
|
|
8994
8993
|
case "reply":
|
|
8995
|
-
|
|
8994
|
+
W = await f.create(
|
|
8996
8995
|
{ questionSlug: t.slugs.question, answerSlug: t.slugs.answer },
|
|
8997
|
-
{ body: m, authorId: d && d.id, contentPath:
|
|
8996
|
+
{ body: m, authorId: d && d.id, contentPath: N }
|
|
8998
8997
|
);
|
|
8999
8998
|
break;
|
|
9000
8999
|
default:
|
|
9001
9000
|
break;
|
|
9002
9001
|
}
|
|
9003
|
-
await Ks(1e3), f.callback && await f.callback(
|
|
9002
|
+
await Ks(1e3), f.callback && await f.callback(W), At = setTimeout(() => {
|
|
9004
9003
|
p(""), v("submitted");
|
|
9005
|
-
const
|
|
9006
|
-
document.dispatchEvent(
|
|
9004
|
+
const Z = new Event("discussionFormSubmitted");
|
|
9005
|
+
document.dispatchEvent(Z), I();
|
|
9007
9006
|
}, 500);
|
|
9008
|
-
} catch (
|
|
9009
|
-
const
|
|
9007
|
+
} catch (W) {
|
|
9008
|
+
const Z = W;
|
|
9010
9009
|
let z = `${we}error`;
|
|
9011
|
-
|
|
9010
|
+
Z != null && Z.message.includes("entry already exists") && (z = $e(
|
|
9012
9011
|
u.formatMessage,
|
|
9013
9012
|
`${we}error_alreadyExists`,
|
|
9014
9013
|
t.type,
|
|
9015
9014
|
"action"
|
|
9016
|
-
)),
|
|
9015
|
+
)), Z != null && Z.message.includes("429") ? z = $e(
|
|
9017
9016
|
u.formatMessage,
|
|
9018
9017
|
`${we}error_tooMany`,
|
|
9019
9018
|
t.type,
|
|
9020
9019
|
"action"
|
|
9021
|
-
) :
|
|
9020
|
+
) : Z != null && Z.message.includes("400") && (z = `${we}error`), _(z), I();
|
|
9022
9021
|
}
|
|
9023
|
-
},
|
|
9022
|
+
}, I = () => {
|
|
9024
9023
|
At = setTimeout(() => {
|
|
9025
9024
|
_(!1), v(!1);
|
|
9026
9025
|
}, 5e3);
|
|
9027
|
-
}, R = !m || !ni(m),
|
|
9028
|
-
return (n.isEditing && !
|
|
9026
|
+
}, R = !m || !ni(m), Q = y === "submitting", C = [];
|
|
9027
|
+
return (n.isEditing && !Q || c.cancel) && C.push({
|
|
9029
9028
|
variant: "secondary",
|
|
9030
9029
|
size: { mobile: "small", 600: "medium" },
|
|
9031
9030
|
onClick: f.handleCancel,
|
|
@@ -9034,30 +9033,30 @@ const we = "discussion_form_", ar = ({
|
|
|
9034
9033
|
"data-gtm-event-type": `cancel-${t.type}-click`,
|
|
9035
9034
|
disabled: !c.cancel && (!d || !d.id || !m),
|
|
9036
9035
|
children: u.formatMessage({ id: `${we}cancel` })
|
|
9037
|
-
}),
|
|
9036
|
+
}), C.push({
|
|
9038
9037
|
variant: "primary",
|
|
9039
9038
|
size: { mobile: "small", 600: "medium" },
|
|
9040
|
-
onClick: (
|
|
9039
|
+
onClick: (x) => {
|
|
9041
9040
|
if (n.isEditing) {
|
|
9042
9041
|
v("submitting"), f.handleSaveEdit && f.handleSaveEdit(
|
|
9043
9042
|
b.current && "value" in b.current ? b.current.value : ""
|
|
9044
9043
|
);
|
|
9045
9044
|
return;
|
|
9046
9045
|
}
|
|
9047
|
-
x
|
|
9046
|
+
w(x);
|
|
9048
9047
|
},
|
|
9049
9048
|
className: "gtm-trackable",
|
|
9050
9049
|
"data-gtm-event-context": l,
|
|
9051
9050
|
"data-gtm-event-type": `${n.isEditing ? "save" : "submit"}-${t.type}-click`,
|
|
9052
9051
|
"data-testid": "save-button",
|
|
9053
|
-
disabled: !d || !d.id || !e || R ||
|
|
9052
|
+
disabled: !d || !d.id || !e || R || Q || n.isEditing && m === n.isEditing.text,
|
|
9054
9053
|
children: u.formatMessage({
|
|
9055
|
-
id: `${we}${
|
|
9054
|
+
id: `${we}${Q ? n.isEditing ? "saving" : "posting" : n.isEditing ? "save" : "post"}`
|
|
9056
9055
|
})
|
|
9057
9056
|
}), /* @__PURE__ */ a.jsxs(
|
|
9058
9057
|
"form",
|
|
9059
9058
|
{
|
|
9060
|
-
id:
|
|
9059
|
+
id: j,
|
|
9061
9060
|
className: S("discussion-card discussion-form", {
|
|
9062
9061
|
"no-styling": n.isInWrapper && n.isEditing
|
|
9063
9062
|
}),
|
|
@@ -9072,12 +9071,12 @@ const we = "discussion_form_", ar = ({
|
|
|
9072
9071
|
gtmType: "profile-click"
|
|
9073
9072
|
}
|
|
9074
9073
|
),
|
|
9075
|
-
/* @__PURE__ */ a.jsx(be, { element: "label", showOnFocus: !1, htmlFor: `${
|
|
9074
|
+
/* @__PURE__ */ a.jsx(be, { element: "label", showOnFocus: !1, htmlFor: `${j}-input`, children: $e(u.formatMessage, `${we}label`, t.type, "action") }),
|
|
9076
9075
|
/* @__PURE__ */ a.jsx(
|
|
9077
9076
|
Ms,
|
|
9078
9077
|
{
|
|
9079
9078
|
ref: r,
|
|
9080
|
-
id: `${
|
|
9079
|
+
id: `${j}-input`,
|
|
9081
9080
|
name: t.type,
|
|
9082
9081
|
placeholder: s || $e(
|
|
9083
9082
|
u.formatMessage,
|
|
@@ -9085,7 +9084,7 @@ const we = "discussion_form_", ar = ({
|
|
|
9085
9084
|
t.type,
|
|
9086
9085
|
"action"
|
|
9087
9086
|
),
|
|
9088
|
-
onChange:
|
|
9087
|
+
onChange: k,
|
|
9089
9088
|
value: y === "submitting" && !g ? "" : m,
|
|
9090
9089
|
maxLength: i,
|
|
9091
9090
|
"aria-invalid": !!g,
|
|
@@ -9095,7 +9094,7 @@ const we = "discussion_form_", ar = ({
|
|
|
9095
9094
|
}
|
|
9096
9095
|
),
|
|
9097
9096
|
/* @__PURE__ */ a.jsx("small", { children: $e(u.formatMessage, `${we}explainer`, t.type, "action", {
|
|
9098
|
-
a: (
|
|
9097
|
+
a: (x) => /* @__PURE__ */ a.jsx(
|
|
9099
9098
|
"a",
|
|
9100
9099
|
{
|
|
9101
9100
|
href: "https://about.apolitical.co/q-and-a-community-guidelines",
|
|
@@ -9104,11 +9103,11 @@ const we = "discussion_form_", ar = ({
|
|
|
9104
9103
|
"data-gtm-event-context": l,
|
|
9105
9104
|
"data-gtm-event-type": "community-guidelines-link",
|
|
9106
9105
|
rel: "noreferrer",
|
|
9107
|
-
children:
|
|
9106
|
+
children: x
|
|
9108
9107
|
}
|
|
9109
9108
|
)
|
|
9110
9109
|
}) }),
|
|
9111
|
-
/* @__PURE__ */ a.jsx(jt, { buttons:
|
|
9110
|
+
/* @__PURE__ */ a.jsx(jt, { buttons: C }),
|
|
9112
9111
|
y === "submitted" && n.showSuccessMessage && /* @__PURE__ */ a.jsx(Wt, { className: "success", "data-testid": "success", children: $e(u.formatMessage, `${we}success`, t.type, "action") }),
|
|
9113
9112
|
g && /* @__PURE__ */ a.jsx(Wt, { id: "error-message", className: "error", "data-testid": "error", children: c.error ? c.error : typeof g == "string" ? g.includes(" ") ? g : u.formatMessage(
|
|
9114
9113
|
{ id: g },
|
|
@@ -9151,7 +9150,7 @@ const we = "discussion_form_", ar = ({
|
|
|
9151
9150
|
}, jc = {
|
|
9152
9151
|
showForm: !1
|
|
9153
9152
|
}, sr = nn(jc), kc = ({ children: t }) => {
|
|
9154
|
-
const [e, n] =
|
|
9153
|
+
const [e, n] = X({
|
|
9155
9154
|
showForm: !1
|
|
9156
9155
|
});
|
|
9157
9156
|
return /* @__PURE__ */ a.jsx(sr.Provider, { value: { ...e, updateConversation: n }, children: t });
|
|
@@ -9179,29 +9178,29 @@ const An = () => {
|
|
|
9179
9178
|
}, deleteLike: f = () => {
|
|
9180
9179
|
} } = {}
|
|
9181
9180
|
}) => {
|
|
9182
|
-
const l =
|
|
9181
|
+
const l = H();
|
|
9183
9182
|
ae(() => {
|
|
9184
9183
|
p(s);
|
|
9185
9184
|
}, [s]);
|
|
9186
|
-
const [u, d] =
|
|
9185
|
+
const [u, d] = X(e), [m, p] = X(s), [g, _] = X(!1), [y, v] = X(!1), b = xt(
|
|
9187
9186
|
() => Ec(n, Dn),
|
|
9188
9187
|
[n]
|
|
9189
|
-
),
|
|
9190
|
-
if (
|
|
9188
|
+
), k = (w) => {
|
|
9189
|
+
if (w.preventDefault(), w.stopPropagation(), v(!1), bt)
|
|
9191
9190
|
return An(), !1;
|
|
9192
9191
|
if (An(), g || !o)
|
|
9193
9192
|
return !1;
|
|
9194
|
-
bt = setTimeout(
|
|
9195
|
-
},
|
|
9193
|
+
bt = setTimeout(j, 350);
|
|
9194
|
+
}, j = async () => {
|
|
9196
9195
|
if (An(), g || !o)
|
|
9197
9196
|
return !1;
|
|
9198
|
-
let
|
|
9199
|
-
|
|
9197
|
+
let w = m ? u - 1 : u + 1;
|
|
9198
|
+
w < 0 && (w = 0), _(!0), d(w), p(!m);
|
|
9200
9199
|
try {
|
|
9201
9200
|
if (i && i.slugs) {
|
|
9202
|
-
const
|
|
9203
|
-
m ? await f(
|
|
9204
|
-
...
|
|
9201
|
+
const I = Tc(i.slugs);
|
|
9202
|
+
m ? await f(I) : await c({
|
|
9203
|
+
...I,
|
|
9205
9204
|
payload: { contentPath: window.location.pathname }
|
|
9206
9205
|
});
|
|
9207
9206
|
}
|
|
@@ -9211,13 +9210,13 @@ const An = () => {
|
|
|
9211
9210
|
_(!1);
|
|
9212
9211
|
}
|
|
9213
9212
|
};
|
|
9214
|
-
return
|
|
9213
|
+
return Y.createElement(t, {
|
|
9215
9214
|
className: S("likes-wrapper text-medium action-button", {
|
|
9216
9215
|
"show-spinner": g,
|
|
9217
9216
|
"is-liked": m,
|
|
9218
9217
|
disabled: !o
|
|
9219
9218
|
}),
|
|
9220
|
-
onClick:
|
|
9219
|
+
onClick: k,
|
|
9221
9220
|
onMouseEnter: () => {
|
|
9222
9221
|
v(!0);
|
|
9223
9222
|
},
|
|
@@ -9248,7 +9247,7 @@ const An = () => {
|
|
|
9248
9247
|
})
|
|
9249
9248
|
}
|
|
9250
9249
|
) : !1,
|
|
9251
|
-
onClick:
|
|
9250
|
+
onClick: k,
|
|
9252
9251
|
disabled: !o,
|
|
9253
9252
|
"aria-hidden": !o,
|
|
9254
9253
|
"data-testid": "like-button",
|
|
@@ -9268,16 +9267,16 @@ const An = () => {
|
|
|
9268
9267
|
}
|
|
9269
9268
|
),
|
|
9270
9269
|
n && /* @__PURE__ */ a.jsx(_i, { isOpen: y, isLoading: n.length === 0, children: n.length && /* @__PURE__ */ a.jsxs("ul", { children: [
|
|
9271
|
-
b.map((
|
|
9270
|
+
b.map((w) => typeof w == "string" || !w.name ? null : /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
9272
9271
|
at,
|
|
9273
9272
|
{
|
|
9274
|
-
href:
|
|
9273
|
+
href: w.id ? `/profiles/${w.id}` : void 0,
|
|
9275
9274
|
gtmContext: "Likes",
|
|
9276
9275
|
gtmType: "liked-name-click",
|
|
9277
|
-
onClick: (
|
|
9278
|
-
children:
|
|
9276
|
+
onClick: (I) => I == null ? void 0 : I.stopPropagation(),
|
|
9277
|
+
children: w.name
|
|
9279
9278
|
}
|
|
9280
|
-
) },
|
|
9279
|
+
) }, w.id || window.btoa(w.name))),
|
|
9281
9280
|
e > Dn && /* @__PURE__ */ a.jsx("li", { children: l.formatMessage(
|
|
9282
9281
|
{ id: "discussion_likes_more" },
|
|
9283
9282
|
{ number: e - Dn }
|
|
@@ -9321,62 +9320,62 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9321
9320
|
children: _,
|
|
9322
9321
|
isTruncated: y = !1
|
|
9323
9322
|
}) => {
|
|
9324
|
-
const v =
|
|
9323
|
+
const v = H(), b = Ee(Ie), k = Ee(sr), { author: j, canLike: w, createdAt: I, id: R, likes: Q = 0, userLiked: C, comments: F = 0 } = e, $ = b && b.id && typeof j != "string" && j.id && j.id === b.id || !1, T = typeof w == "boolean" ? w : n ? !$ : !1, x = $ && (!e.createdAt || Ys(e.createdAt, 10, "seconds")), N = pe(null), [A, W] = X({
|
|
9325
9324
|
body: e && e.body || "",
|
|
9326
9325
|
isEditing: !1,
|
|
9327
9326
|
didEdit: e && e.isEdited || !1
|
|
9328
|
-
}), [
|
|
9329
|
-
|
|
9327
|
+
}), [Z, z] = X(!1), [K, E] = X(
|
|
9328
|
+
x ? "highlighted" : "default"
|
|
9330
9329
|
/* Default */
|
|
9331
|
-
), [
|
|
9330
|
+
), [P, q] = X("");
|
|
9332
9331
|
ae(() => {
|
|
9333
|
-
const O =
|
|
9334
|
-
if (!(!O ||
|
|
9335
|
-
return document.addEventListener("discussionFormSubmitted", B), O.addEventListener("transitionend",
|
|
9336
|
-
document.removeEventListener("discussionFormSubmitted", B), O.removeEventListener("transitionend",
|
|
9332
|
+
const O = N.current;
|
|
9333
|
+
if (!(!O || K === "default"))
|
|
9334
|
+
return document.addEventListener("discussionFormSubmitted", B), O.addEventListener("transitionend", U), () => {
|
|
9335
|
+
document.removeEventListener("discussionFormSubmitted", B), O.removeEventListener("transitionend", U);
|
|
9337
9336
|
};
|
|
9338
9337
|
}, []), ae(() => {
|
|
9339
|
-
|
|
9340
|
-
...
|
|
9338
|
+
W({
|
|
9339
|
+
...A,
|
|
9341
9340
|
body: e && e.body || "",
|
|
9342
9341
|
didEdit: e && e.isEdited || !1
|
|
9343
9342
|
});
|
|
9344
9343
|
}, [e.isEdited]);
|
|
9345
9344
|
const B = () => {
|
|
9346
9345
|
setTimeout(() => {
|
|
9347
|
-
|
|
9346
|
+
E(
|
|
9348
9347
|
"fading"
|
|
9349
9348
|
/* Fading */
|
|
9350
9349
|
);
|
|
9351
9350
|
}, 1e3);
|
|
9352
|
-
},
|
|
9353
|
-
O === "background-color" &&
|
|
9351
|
+
}, U = ({ propertyName: O }) => {
|
|
9352
|
+
O === "background-color" && E((oe) => (oe === "default" && (document.removeEventListener("discussionFormSubmitted", B), N.current && N.current.removeEventListener("transitionend", U)), oe === "fading" ? "default" : oe));
|
|
9354
9353
|
};
|
|
9355
9354
|
if (r || !e || e.type === "answer" && (!e.slugs || !e.slugs.question))
|
|
9356
9355
|
return /* @__PURE__ */ a.jsx(Se, { className: "discussion-card discussion-post" });
|
|
9357
|
-
const te = y ? et(
|
|
9358
|
-
O || (O = ""),
|
|
9356
|
+
const te = y ? et(A.body, Cc) : A.body, G = async (O) => {
|
|
9357
|
+
O || (O = ""), q("");
|
|
9359
9358
|
try {
|
|
9360
|
-
if (!Rs(O,
|
|
9359
|
+
if (!Rs(O, A.body)) {
|
|
9361
9360
|
const oe = e.type === "question" ? { title: O } : { body: O };
|
|
9362
9361
|
await f(Qr(e.slugs), oe);
|
|
9363
9362
|
}
|
|
9364
|
-
|
|
9363
|
+
W({ body: O, isEditing: !1, didEdit: !0 });
|
|
9365
9364
|
} catch {
|
|
9366
|
-
|
|
9365
|
+
q(`${Me}form_error`);
|
|
9367
9366
|
}
|
|
9368
|
-
},
|
|
9369
|
-
|
|
9367
|
+
}, V = () => {
|
|
9368
|
+
k && k.updateConversation && k.updateConversation({ showForm: !0 }), setTimeout(() => {
|
|
9370
9369
|
var Ne, Ce, Ue;
|
|
9371
|
-
const oe = `reply-form-${(e.type === "answer" ? e.slug : ((Ne = e.slugs) == null ? void 0 : Ne.reply) || ((Ce = e.slugs) == null ? void 0 : Ce.answer) || ((Ue = e.slugs) == null ? void 0 : Ue.question) || "").toLowerCase().slice(-15)}`,
|
|
9372
|
-
ve && ve.focus(),
|
|
9370
|
+
const oe = `reply-form-${(e.type === "answer" ? e.slug : ((Ne = e.slugs) == null ? void 0 : Ne.reply) || ((Ce = e.slugs) == null ? void 0 : Ce.answer) || ((Ue = e.slugs) == null ? void 0 : Ue.question) || "").toLowerCase().slice(-15)}`, D = document.getElementById(oe), ve = document.getElementById(`${oe}-input`);
|
|
9371
|
+
ve && ve.focus(), D && D.scrollIntoView({ behavior: "smooth" });
|
|
9373
9372
|
}, 0);
|
|
9374
9373
|
}, ee = async () => {
|
|
9375
9374
|
z(!1);
|
|
9376
9375
|
try {
|
|
9377
9376
|
await c(Qr(e.slugs));
|
|
9378
9377
|
} catch {
|
|
9379
|
-
|
|
9378
|
+
q("delete-error");
|
|
9380
9379
|
}
|
|
9381
9380
|
}, re = [
|
|
9382
9381
|
{
|
|
@@ -9399,10 +9398,10 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9399
9398
|
icon: "flag"
|
|
9400
9399
|
}
|
|
9401
9400
|
];
|
|
9402
|
-
return n &&
|
|
9401
|
+
return n && $ && re.push(
|
|
9403
9402
|
{
|
|
9404
9403
|
text: v.formatMessage({ id: `${Me}moreMenu_edit` }),
|
|
9405
|
-
onClick: () =>
|
|
9404
|
+
onClick: () => W({ ...A, isEditing: !0 }),
|
|
9406
9405
|
icon: "pencil-paper",
|
|
9407
9406
|
className: "gtm-trackable",
|
|
9408
9407
|
"data-gtm-event-context": g,
|
|
@@ -9417,13 +9416,13 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9417
9416
|
className: "gtm-trackable",
|
|
9418
9417
|
"data-gtm-event-context": g,
|
|
9419
9418
|
"data-gtm-event-type": `delete-${e.type}-click`,
|
|
9420
|
-
...Xo(`delete-${e.slug}-modal`,
|
|
9419
|
+
...Xo(`delete-${e.slug}-modal`, Z)
|
|
9421
9420
|
}
|
|
9422
|
-
),
|
|
9421
|
+
), Y.createElement(t, {
|
|
9423
9422
|
className: S("discussion-post", p, {
|
|
9424
|
-
[
|
|
9423
|
+
[K]: !p || !p.includes("highlighted-text-box")
|
|
9425
9424
|
}),
|
|
9426
|
-
ref:
|
|
9425
|
+
ref: N,
|
|
9427
9426
|
"data-testid": `discussion-${e.type}-thread`,
|
|
9428
9427
|
children: /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
9429
9428
|
/* @__PURE__ */ a.jsxs(
|
|
@@ -9431,24 +9430,24 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9431
9430
|
{
|
|
9432
9431
|
id: R || e.slug,
|
|
9433
9432
|
className: S("discussion-card", e.type, {
|
|
9434
|
-
editing:
|
|
9435
|
-
"has-link": m.post && !
|
|
9433
|
+
editing: A.isEditing,
|
|
9434
|
+
"has-link": m.post && !A.isEditing
|
|
9436
9435
|
}),
|
|
9437
9436
|
onClick: (O) => {
|
|
9438
|
-
!m.post ||
|
|
9437
|
+
!m.post || A.isEditing || (O.preventDefault(), O.stopPropagation(), window.location.href = m.post);
|
|
9439
9438
|
},
|
|
9440
9439
|
children: [
|
|
9441
|
-
!
|
|
9440
|
+
!A.isEditing && /* @__PURE__ */ a.jsx(
|
|
9442
9441
|
tr,
|
|
9443
9442
|
{
|
|
9444
|
-
member:
|
|
9445
|
-
additionalContent: { createdAt:
|
|
9446
|
-
className: typeof
|
|
9443
|
+
member: j,
|
|
9444
|
+
additionalContent: { createdAt: I, didEdit: A.didEdit },
|
|
9445
|
+
className: typeof j != "string" && j.id === s ? "highlighted" : "",
|
|
9447
9446
|
gtmContext: g,
|
|
9448
9447
|
gtmType: "profile-click"
|
|
9449
9448
|
}
|
|
9450
9449
|
),
|
|
9451
|
-
|
|
9450
|
+
A.isEditing ? /* @__PURE__ */ a.jsx(
|
|
9452
9451
|
ar,
|
|
9453
9452
|
{
|
|
9454
9453
|
content: { type: e.type, slugs: e.slugs },
|
|
@@ -9456,12 +9455,12 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9456
9455
|
meta: {
|
|
9457
9456
|
isLoading: r,
|
|
9458
9457
|
isInWrapper: !0,
|
|
9459
|
-
isEditing: { text:
|
|
9458
|
+
isEditing: { text: A.body }
|
|
9460
9459
|
},
|
|
9461
9460
|
maxLength: e.type === "question" ? 250 : 5e4,
|
|
9462
9461
|
forceShow: {
|
|
9463
|
-
error:
|
|
9464
|
-
{ id:
|
|
9462
|
+
error: P !== "" && P !== "delete-error" ? v.formatMessage(
|
|
9463
|
+
{ id: P },
|
|
9465
9464
|
{
|
|
9466
9465
|
action: v.formatMessage({
|
|
9467
9466
|
id: `discussion_action_${e.type}`
|
|
@@ -9473,7 +9472,7 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9473
9472
|
create: o,
|
|
9474
9473
|
handleSaveEdit: G,
|
|
9475
9474
|
handleCancel: () => {
|
|
9476
|
-
|
|
9475
|
+
q(""), W({ ...A, isEditing: !1 });
|
|
9477
9476
|
}
|
|
9478
9477
|
},
|
|
9479
9478
|
gtmContext: `${g}Form`
|
|
@@ -9491,7 +9490,7 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9491
9490
|
Ut,
|
|
9492
9491
|
{
|
|
9493
9492
|
options: {
|
|
9494
|
-
wrapper: e.type === "question" ? "h1" :
|
|
9493
|
+
wrapper: e.type === "question" ? "h1" : Y.Fragment,
|
|
9495
9494
|
forceWrapper: e.type === "question",
|
|
9496
9495
|
forceInline: e.type === "question",
|
|
9497
9496
|
forceBlock: e.type !== "question"
|
|
@@ -9499,7 +9498,7 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9499
9498
|
children: te
|
|
9500
9499
|
}
|
|
9501
9500
|
),
|
|
9502
|
-
!
|
|
9501
|
+
!A.isEditing && !(i != null && i.actionBar) && /* @__PURE__ */ a.jsxs(
|
|
9503
9502
|
"ul",
|
|
9504
9503
|
{
|
|
9505
9504
|
className: S("actions text-medium", e.type),
|
|
@@ -9509,11 +9508,11 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9509
9508
|
Sc,
|
|
9510
9509
|
{
|
|
9511
9510
|
element: "li",
|
|
9512
|
-
likes:
|
|
9511
|
+
likes: Q,
|
|
9513
9512
|
isShort: !1,
|
|
9514
|
-
userLiked:
|
|
9513
|
+
userLiked: C,
|
|
9515
9514
|
content: { type: e.type, slugs: e.slugs },
|
|
9516
|
-
canLike:
|
|
9515
|
+
canLike: T,
|
|
9517
9516
|
peopleWhoLiked: e.peopleWhoLiked,
|
|
9518
9517
|
functions: {
|
|
9519
9518
|
createLike: l,
|
|
@@ -9560,7 +9559,7 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9560
9559
|
variant: "tertiary",
|
|
9561
9560
|
size: "medium",
|
|
9562
9561
|
styling: { muted: !0 },
|
|
9563
|
-
onClick:
|
|
9562
|
+
onClick: V,
|
|
9564
9563
|
children: v.formatMessage({ id: `${Me}reply` })
|
|
9565
9564
|
}
|
|
9566
9565
|
) }),
|
|
@@ -9583,11 +9582,11 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9583
9582
|
an,
|
|
9584
9583
|
{
|
|
9585
9584
|
id: `delete-${e.slug}-modal`,
|
|
9586
|
-
isOpen:
|
|
9585
|
+
isOpen: Z,
|
|
9587
9586
|
functions: { onOpen: () => {
|
|
9588
9587
|
}, onClose: () => z(!1) },
|
|
9589
9588
|
forceShow: {
|
|
9590
|
-
error:
|
|
9589
|
+
error: P === "delete-error" ? v.formatMessage(
|
|
9591
9590
|
{ id: "discussion_delete_error" },
|
|
9592
9591
|
{
|
|
9593
9592
|
action: v.formatMessage({
|
|
@@ -9632,7 +9631,7 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9632
9631
|
});
|
|
9633
9632
|
};
|
|
9634
9633
|
const In = "discussion_responses_", $c = ({ type: t = "answer", responses: e = 0 }) => {
|
|
9635
|
-
const n =
|
|
9634
|
+
const n = H();
|
|
9636
9635
|
return e = parseInt(e), /* @__PURE__ */ a.jsxs("div", { className: "responses-heading", children: [
|
|
9637
9636
|
/* @__PURE__ */ a.jsx("h4", { children: n.formatMessage(
|
|
9638
9637
|
{ id: `${In}title` },
|
|
@@ -9651,7 +9650,7 @@ const Nc = ({
|
|
|
9651
9650
|
form: r,
|
|
9652
9651
|
children: s
|
|
9653
9652
|
}) => {
|
|
9654
|
-
const i =
|
|
9653
|
+
const i = H(), o = Ee(sr), c = Lt(s, {
|
|
9655
9654
|
element: "li"
|
|
9656
9655
|
});
|
|
9657
9656
|
return /* @__PURE__ */ a.jsxs("div", { className: "thread-wrapper", children: [
|
|
@@ -10190,7 +10189,7 @@ const pu = ({
|
|
|
10190
10189
|
isMember: n,
|
|
10191
10190
|
functions: { activities: r, join: s, leave: i }
|
|
10192
10191
|
}) => {
|
|
10193
|
-
const o =
|
|
10192
|
+
const o = H(), {
|
|
10194
10193
|
activities: c,
|
|
10195
10194
|
error: f,
|
|
10196
10195
|
fetchNextPage: l,
|
|
@@ -10223,63 +10222,63 @@ const pu = ({
|
|
|
10223
10222
|
}
|
|
10224
10223
|
}
|
|
10225
10224
|
),
|
|
10226
|
-
c == null ? void 0 : c.map((
|
|
10227
|
-
var
|
|
10225
|
+
c == null ? void 0 : c.map((k, j) => {
|
|
10226
|
+
var A, W, Z, z, K, E, P, q;
|
|
10228
10227
|
const {
|
|
10229
|
-
id:
|
|
10230
|
-
own_reactions:
|
|
10228
|
+
id: w,
|
|
10229
|
+
own_reactions: I,
|
|
10231
10230
|
latest_reactions: R,
|
|
10232
|
-
reaction_counts:
|
|
10233
|
-
} =
|
|
10234
|
-
var
|
|
10231
|
+
reaction_counts: Q
|
|
10232
|
+
} = k, C = (((A = R == null ? void 0 : R.like) == null ? void 0 : A.length) || 0) > 0, F = (((W = I == null ? void 0 : I.like) == null ? void 0 : W.length) || 0) > 0, $ = F ? I == null ? void 0 : I.like[0].id : "", T = C ? (Z = R == null ? void 0 : R.like) == null ? void 0 : Z.map((B) => {
|
|
10233
|
+
var U, te, G;
|
|
10235
10234
|
return {
|
|
10236
|
-
id: (
|
|
10235
|
+
id: (U = B == null ? void 0 : B.user) == null ? void 0 : U.id,
|
|
10237
10236
|
name: (G = (te = B == null ? void 0 : B.user) == null ? void 0 : te.data) == null ? void 0 : G.name
|
|
10238
10237
|
};
|
|
10239
|
-
}) : !1,
|
|
10238
|
+
}) : !1, x = k == null ? void 0 : k.actor, N = (x == null ? void 0 : x.id) === (v == null ? void 0 : v.id);
|
|
10240
10239
|
return /* @__PURE__ */ a.jsxs(yt, { children: [
|
|
10241
10240
|
/* @__PURE__ */ a.jsx(
|
|
10242
10241
|
cn,
|
|
10243
10242
|
{
|
|
10244
10243
|
content: {
|
|
10245
10244
|
type: "post",
|
|
10246
|
-
body:
|
|
10247
|
-
canLike: on(n,
|
|
10248
|
-
createdAt: (
|
|
10245
|
+
body: k == null ? void 0 : k.content,
|
|
10246
|
+
canLike: on(n, N),
|
|
10247
|
+
createdAt: (k == null ? void 0 : k.time) || "",
|
|
10249
10248
|
slugs: {
|
|
10250
10249
|
question: `${t}/${e}`,
|
|
10251
|
-
answer:
|
|
10250
|
+
answer: w
|
|
10252
10251
|
},
|
|
10253
|
-
slug:
|
|
10252
|
+
slug: w,
|
|
10254
10253
|
author: {
|
|
10255
|
-
id:
|
|
10256
|
-
name: (z =
|
|
10257
|
-
organization: (
|
|
10258
|
-
jobTitle: (
|
|
10259
|
-
location: (
|
|
10254
|
+
id: x == null ? void 0 : x.id,
|
|
10255
|
+
name: (z = x == null ? void 0 : x.data) == null ? void 0 : z.name,
|
|
10256
|
+
organization: (K = x == null ? void 0 : x.data) == null ? void 0 : K.organization,
|
|
10257
|
+
jobTitle: (E = x == null ? void 0 : x.data) == null ? void 0 : E.jobTitle,
|
|
10258
|
+
location: (P = x == null ? void 0 : x.data) == null ? void 0 : P.location,
|
|
10260
10259
|
image: {
|
|
10261
|
-
thumbnail: ((
|
|
10260
|
+
thumbnail: ((q = x == null ? void 0 : x.data) == null ? void 0 : q.thumbnail) || void 0
|
|
10262
10261
|
}
|
|
10263
10262
|
},
|
|
10264
10263
|
userLiked: F,
|
|
10265
|
-
likes: (
|
|
10266
|
-
comments: (
|
|
10267
|
-
peopleWhoLiked:
|
|
10264
|
+
likes: (Q == null ? void 0 : Q.like) || 0,
|
|
10265
|
+
comments: (Q == null ? void 0 : Q.reply) || 0,
|
|
10266
|
+
peopleWhoLiked: T
|
|
10268
10267
|
},
|
|
10269
10268
|
links: {
|
|
10270
|
-
post: `${t}/${e}/${
|
|
10271
|
-
comments: `${t}/${e}/${
|
|
10269
|
+
post: `${t}/${e}/${w}`,
|
|
10270
|
+
comments: `${t}/${e}/${w}`
|
|
10272
10271
|
},
|
|
10273
10272
|
functions: {
|
|
10274
10273
|
content: {
|
|
10275
10274
|
createContent: () => null,
|
|
10276
|
-
deleteContent: () => g({ activityId:
|
|
10275
|
+
deleteContent: () => g({ activityId: w }),
|
|
10277
10276
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10278
|
-
updateContent: (B, { body:
|
|
10277
|
+
updateContent: (B, { body: U }) => p({ activityId: w, content: U })
|
|
10279
10278
|
},
|
|
10280
10279
|
likes: {
|
|
10281
|
-
createLike: () => _({ activityId:
|
|
10282
|
-
deleteLike: () => y({ activityId:
|
|
10280
|
+
createLike: () => _({ activityId: w }),
|
|
10281
|
+
deleteLike: () => y({ activityId: w, reactionId: $ })
|
|
10283
10282
|
},
|
|
10284
10283
|
comments: {
|
|
10285
10284
|
openComments: () => null
|
|
@@ -10288,8 +10287,8 @@ const pu = ({
|
|
|
10288
10287
|
isTruncated: !0
|
|
10289
10288
|
}
|
|
10290
10289
|
),
|
|
10291
|
-
b >
|
|
10292
|
-
] },
|
|
10290
|
+
b > j + 1 && /* @__PURE__ */ a.jsx(Ae, {})
|
|
10291
|
+
] }, w);
|
|
10293
10292
|
}),
|
|
10294
10293
|
!d && /* @__PURE__ */ a.jsx(
|
|
10295
10294
|
sn,
|
|
@@ -11095,24 +11094,24 @@ const ol = ({
|
|
|
11095
11094
|
meta: { isEditing: !1, showSuccessMessage: !1 }
|
|
11096
11095
|
},
|
|
11097
11096
|
children: o && o.length > 0 ? o == null ? void 0 : o.map((y) => {
|
|
11098
|
-
var
|
|
11097
|
+
var A, W, Z, z, K, E, P, q, B, U, te, G;
|
|
11099
11098
|
const {
|
|
11100
11099
|
id: v,
|
|
11101
11100
|
own_children: b,
|
|
11102
|
-
latest_children:
|
|
11103
|
-
children_counts:
|
|
11104
|
-
} = y,
|
|
11101
|
+
latest_children: k,
|
|
11102
|
+
children_counts: j
|
|
11103
|
+
} = y, I = (((A = b == null ? void 0 : b.like) == null ? void 0 : A.length) || 0) > 0 ? (W = b == null ? void 0 : b.like) == null ? void 0 : W.find((V) => {
|
|
11105
11104
|
var ee;
|
|
11106
|
-
return ((ee =
|
|
11107
|
-
}) : !1, R =
|
|
11105
|
+
return ((ee = V == null ? void 0 : V.user) == null ? void 0 : ee.id) === (_ == null ? void 0 : _.id);
|
|
11106
|
+
}) : !1, R = I ? I == null ? void 0 : I.id : "", Q = !!I, F = (((Z = k == null ? void 0 : k.like) == null ? void 0 : Z.length) || 0) > 0 ? (z = k == null ? void 0 : k.like) == null ? void 0 : z.map((V) => {
|
|
11108
11107
|
var ee, re, O;
|
|
11109
11108
|
return {
|
|
11110
|
-
id: (ee =
|
|
11111
|
-
name: (O = (re =
|
|
11109
|
+
id: (ee = V == null ? void 0 : V.user) == null ? void 0 : ee.id,
|
|
11110
|
+
name: (O = (re = V == null ? void 0 : V.user) == null ? void 0 : re.data) == null ? void 0 : O.name
|
|
11112
11111
|
};
|
|
11113
|
-
}) : !1,
|
|
11112
|
+
}) : !1, $ = y == null ? void 0 : y.user, T = ($ == null ? void 0 : $.id) === (_ == null ? void 0 : _.id), x = on(s, T), N = typeof y.data.content == "string" ? (K = y == null ? void 0 : y.data) == null ? void 0 : K.content : (
|
|
11114
11113
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11115
|
-
((
|
|
11114
|
+
((P = (E = y == null ? void 0 : y.data) == null ? void 0 : E.content) == null ? void 0 : P.text) || ""
|
|
11116
11115
|
);
|
|
11117
11116
|
return /* @__PURE__ */ a.jsx(
|
|
11118
11117
|
cn,
|
|
@@ -11120,8 +11119,8 @@ const ol = ({
|
|
|
11120
11119
|
content: {
|
|
11121
11120
|
id: v,
|
|
11122
11121
|
type: "reply",
|
|
11123
|
-
body:
|
|
11124
|
-
canLike:
|
|
11122
|
+
body: N,
|
|
11123
|
+
canLike: x,
|
|
11125
11124
|
createdAt: y == null ? void 0 : y.created_at,
|
|
11126
11125
|
slugs: {
|
|
11127
11126
|
question: `${t}/${e}`,
|
|
@@ -11132,17 +11131,17 @@ const ol = ({
|
|
|
11132
11131
|
},
|
|
11133
11132
|
slug: "",
|
|
11134
11133
|
author: {
|
|
11135
|
-
id:
|
|
11136
|
-
name: (
|
|
11137
|
-
organization: (B =
|
|
11138
|
-
jobTitle: (
|
|
11139
|
-
location: (te =
|
|
11134
|
+
id: $ == null ? void 0 : $.id,
|
|
11135
|
+
name: (q = $.data) == null ? void 0 : q.name,
|
|
11136
|
+
organization: (B = $.data) == null ? void 0 : B.organization,
|
|
11137
|
+
jobTitle: (U = $.data) == null ? void 0 : U.jobTitle,
|
|
11138
|
+
location: (te = $.data) == null ? void 0 : te.location,
|
|
11140
11139
|
image: {
|
|
11141
|
-
thumbnail: ((G =
|
|
11140
|
+
thumbnail: ((G = $.data) == null ? void 0 : G.thumbnail) || void 0
|
|
11142
11141
|
}
|
|
11143
11142
|
},
|
|
11144
|
-
userLiked:
|
|
11145
|
-
likes: (
|
|
11143
|
+
userLiked: Q,
|
|
11144
|
+
likes: (j == null ? void 0 : j.like) || 0,
|
|
11146
11145
|
peopleWhoLiked: F
|
|
11147
11146
|
},
|
|
11148
11147
|
functions: {
|
|
@@ -11150,7 +11149,7 @@ const ol = ({
|
|
|
11150
11149
|
createContent: () => null,
|
|
11151
11150
|
deleteContent: () => p({ replyId: v }),
|
|
11152
11151
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11153
|
-
updateContent: (
|
|
11152
|
+
updateContent: (V, { body: ee }) => d({ replyId: v, content: ee })
|
|
11154
11153
|
},
|
|
11155
11154
|
likes: {
|
|
11156
11155
|
createLike: () => m({ replyId: v }),
|
|
@@ -11171,7 +11170,7 @@ const ol = ({
|
|
|
11171
11170
|
isMember: r,
|
|
11172
11171
|
functions: { reactions: s, join: i, leave: o }
|
|
11173
11172
|
}) => {
|
|
11174
|
-
const c =
|
|
11173
|
+
const c = H(), {
|
|
11175
11174
|
replies: f,
|
|
11176
11175
|
repliesCount: l,
|
|
11177
11176
|
fetchNextPage: u,
|
|
@@ -11192,7 +11191,7 @@ const ol = ({
|
|
|
11192
11191
|
content: { type: "reply", slugs: {} },
|
|
11193
11192
|
functions: {
|
|
11194
11193
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11195
|
-
create: (
|
|
11194
|
+
create: (k, { body: j }) => p({ activityId: n, content: j })
|
|
11196
11195
|
},
|
|
11197
11196
|
meta: { isEditing: !1, showSuccessMessage: !1 },
|
|
11198
11197
|
placeholder: c.formatMessage({ id: "discussion_responses_placeholder" })
|
|
@@ -11206,60 +11205,60 @@ const ol = ({
|
|
|
11206
11205
|
}
|
|
11207
11206
|
}
|
|
11208
11207
|
),
|
|
11209
|
-
f == null ? void 0 : f.map((
|
|
11210
|
-
var z,
|
|
11211
|
-
const { id:
|
|
11208
|
+
f == null ? void 0 : f.map((k) => {
|
|
11209
|
+
var z, K, E, P, q, B, U, te, G, V, ee, re;
|
|
11210
|
+
const { id: j, own_children: w, latest_children: I, children_counts: R } = k, C = (((z = w == null ? void 0 : w.like) == null ? void 0 : z.length) || 0) > 0 ? (K = w == null ? void 0 : w.like) == null ? void 0 : K.find((O) => {
|
|
11212
11211
|
var oe;
|
|
11213
11212
|
return ((oe = O == null ? void 0 : O.user) == null ? void 0 : oe.id) === (b == null ? void 0 : b.id);
|
|
11214
|
-
}) : !1, F =
|
|
11215
|
-
var oe,
|
|
11213
|
+
}) : !1, F = C ? C == null ? void 0 : C.id : "", $ = !!C, x = (((E = I == null ? void 0 : I.like) == null ? void 0 : E.length) || 0) > 0 ? (P = I == null ? void 0 : I.like) == null ? void 0 : P.map((O) => {
|
|
11214
|
+
var oe, D, ve;
|
|
11216
11215
|
return {
|
|
11217
11216
|
id: (oe = O == null ? void 0 : O.user) == null ? void 0 : oe.id,
|
|
11218
|
-
name: (ve = (
|
|
11217
|
+
name: (ve = (D = O == null ? void 0 : O.user) == null ? void 0 : D.data) == null ? void 0 : ve.name
|
|
11219
11218
|
};
|
|
11220
|
-
}) : !1,
|
|
11219
|
+
}) : !1, N = k == null ? void 0 : k.user, A = (N == null ? void 0 : N.id) === (b == null ? void 0 : b.id), W = on(r, A), Z = typeof k.data.content == "string" ? (q = k == null ? void 0 : k.data) == null ? void 0 : q.content : (
|
|
11221
11220
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11222
|
-
((
|
|
11221
|
+
((U = (B = k == null ? void 0 : k.data) == null ? void 0 : B.content) == null ? void 0 : U.text) || ""
|
|
11223
11222
|
);
|
|
11224
11223
|
return /* @__PURE__ */ a.jsx(kc, { children: /* @__PURE__ */ a.jsx(
|
|
11225
11224
|
cn,
|
|
11226
11225
|
{
|
|
11227
11226
|
content: {
|
|
11228
|
-
id:
|
|
11227
|
+
id: j,
|
|
11229
11228
|
type: "reply",
|
|
11230
|
-
body:
|
|
11231
|
-
canLike:
|
|
11232
|
-
createdAt:
|
|
11229
|
+
body: Z,
|
|
11230
|
+
canLike: W,
|
|
11231
|
+
createdAt: k == null ? void 0 : k.created_at,
|
|
11233
11232
|
slugs: {
|
|
11234
11233
|
question: `${t}/${e}`,
|
|
11235
11234
|
answer: n,
|
|
11236
|
-
reply:
|
|
11235
|
+
reply: j
|
|
11237
11236
|
},
|
|
11238
|
-
slug:
|
|
11237
|
+
slug: j,
|
|
11239
11238
|
author: {
|
|
11240
|
-
id:
|
|
11241
|
-
name: (te =
|
|
11242
|
-
organization: (G =
|
|
11243
|
-
jobTitle: (
|
|
11244
|
-
location: (ee =
|
|
11239
|
+
id: N == null ? void 0 : N.id,
|
|
11240
|
+
name: (te = N.data) == null ? void 0 : te.name,
|
|
11241
|
+
organization: (G = N.data) == null ? void 0 : G.organization,
|
|
11242
|
+
jobTitle: (V = N.data) == null ? void 0 : V.jobTitle,
|
|
11243
|
+
location: (ee = N.data) == null ? void 0 : ee.location,
|
|
11245
11244
|
image: {
|
|
11246
|
-
thumbnail: ((re =
|
|
11245
|
+
thumbnail: ((re = N.data) == null ? void 0 : re.thumbnail) || void 0
|
|
11247
11246
|
}
|
|
11248
11247
|
},
|
|
11249
|
-
userLiked:
|
|
11248
|
+
userLiked: $,
|
|
11250
11249
|
likes: (R == null ? void 0 : R.like) || 0,
|
|
11251
|
-
peopleWhoLiked:
|
|
11250
|
+
peopleWhoLiked: x
|
|
11252
11251
|
},
|
|
11253
11252
|
functions: {
|
|
11254
11253
|
content: {
|
|
11255
11254
|
createContent: () => null,
|
|
11256
|
-
deleteContent: () => y({ replyId:
|
|
11255
|
+
deleteContent: () => y({ replyId: j }),
|
|
11257
11256
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11258
|
-
updateContent: (O, { body: oe }) => g({ replyId:
|
|
11257
|
+
updateContent: (O, { body: oe }) => g({ replyId: j, content: oe })
|
|
11259
11258
|
},
|
|
11260
11259
|
likes: {
|
|
11261
|
-
createLike: () => _({ replyId:
|
|
11262
|
-
deleteLike: () => v({ replyId:
|
|
11260
|
+
createLike: () => _({ replyId: j }),
|
|
11261
|
+
deleteLike: () => v({ replyId: j, reactionId: F })
|
|
11263
11262
|
},
|
|
11264
11263
|
comments: {}
|
|
11265
11264
|
},
|
|
@@ -11269,7 +11268,7 @@ const ol = ({
|
|
|
11269
11268
|
basePath: t,
|
|
11270
11269
|
parentId: e,
|
|
11271
11270
|
activityId: n,
|
|
11272
|
-
replyId:
|
|
11271
|
+
replyId: j,
|
|
11273
11272
|
isMember: r,
|
|
11274
11273
|
functions: {
|
|
11275
11274
|
...s
|
|
@@ -11277,8 +11276,8 @@ const ol = ({
|
|
|
11277
11276
|
}
|
|
11278
11277
|
)
|
|
11279
11278
|
},
|
|
11280
|
-
|
|
11281
|
-
) },
|
|
11279
|
+
j
|
|
11280
|
+
) }, j);
|
|
11282
11281
|
}),
|
|
11283
11282
|
!m && /* @__PURE__ */ a.jsx(
|
|
11284
11283
|
sn,
|
|
@@ -11399,8 +11398,8 @@ const gu = ({
|
|
|
11399
11398
|
leave: f
|
|
11400
11399
|
}
|
|
11401
11400
|
}) => {
|
|
11402
|
-
var
|
|
11403
|
-
const l =
|
|
11401
|
+
var C, F, $, T, x, N, A, W, Z, z;
|
|
11402
|
+
const l = H(), u = Ee(Ie), {
|
|
11404
11403
|
activity: d,
|
|
11405
11404
|
error: m,
|
|
11406
11405
|
isLoading: p,
|
|
@@ -11419,13 +11418,13 @@ const gu = ({
|
|
|
11419
11418
|
text: l.formatMessage({ id: "activitySection_notFoundError" })
|
|
11420
11419
|
}
|
|
11421
11420
|
);
|
|
11422
|
-
const { own_reactions: v, latest_reactions: b } = d,
|
|
11423
|
-
var
|
|
11421
|
+
const { own_reactions: v, latest_reactions: b } = d, k = (((C = b == null ? void 0 : b.like) == null ? void 0 : C.length) || 0) > 0, j = (((F = v == null ? void 0 : v.like) == null ? void 0 : F.length) || 0) > 0, w = j ? v == null ? void 0 : v.like[0].id : "", I = k ? ($ = b == null ? void 0 : b.like) == null ? void 0 : $.map((K) => {
|
|
11422
|
+
var E, P, q;
|
|
11424
11423
|
return {
|
|
11425
|
-
id: (
|
|
11426
|
-
name: (
|
|
11424
|
+
id: (E = K == null ? void 0 : K.user) == null ? void 0 : E.id,
|
|
11425
|
+
name: (q = (P = K == null ? void 0 : K.user) == null ? void 0 : P.data) == null ? void 0 : q.name
|
|
11427
11426
|
};
|
|
11428
|
-
}) : !1, R = d == null ? void 0 : d.actor,
|
|
11427
|
+
}) : !1, R = d == null ? void 0 : d.actor, Q = (R == null ? void 0 : R.id) === (u == null ? void 0 : u.id);
|
|
11429
11428
|
return /* @__PURE__ */ a.jsxs("section", { className: "activity-section", children: [
|
|
11430
11429
|
/* @__PURE__ */ a.jsx(
|
|
11431
11430
|
cn,
|
|
@@ -11435,7 +11434,7 @@ const gu = ({
|
|
|
11435
11434
|
id: n,
|
|
11436
11435
|
type: "post",
|
|
11437
11436
|
body: d == null ? void 0 : d.content,
|
|
11438
|
-
canLike: on(r,
|
|
11437
|
+
canLike: on(r, Q),
|
|
11439
11438
|
createdAt: (d == null ? void 0 : d.time) || "",
|
|
11440
11439
|
slugs: {
|
|
11441
11440
|
question: `${t}/${e}`,
|
|
@@ -11444,18 +11443,18 @@ const gu = ({
|
|
|
11444
11443
|
slug: n,
|
|
11445
11444
|
author: {
|
|
11446
11445
|
id: R.id,
|
|
11447
|
-
name: (
|
|
11448
|
-
organization: (
|
|
11449
|
-
jobTitle: (
|
|
11450
|
-
location: (
|
|
11446
|
+
name: (T = R.data) == null ? void 0 : T.name,
|
|
11447
|
+
organization: (x = R.data) == null ? void 0 : x.organization,
|
|
11448
|
+
jobTitle: (N = R.data) == null ? void 0 : N.jobTitle,
|
|
11449
|
+
location: (A = R.data) == null ? void 0 : A.location,
|
|
11451
11450
|
image: {
|
|
11452
|
-
thumbnail: ((
|
|
11451
|
+
thumbnail: ((W = R.data) == null ? void 0 : W.thumbnail) || void 0
|
|
11453
11452
|
}
|
|
11454
11453
|
},
|
|
11455
|
-
userLiked:
|
|
11456
|
-
likes: ((
|
|
11454
|
+
userLiked: j,
|
|
11455
|
+
likes: ((Z = d == null ? void 0 : d.reaction_counts) == null ? void 0 : Z.like) || 0,
|
|
11457
11456
|
comments: ((z = d == null ? void 0 : d.reaction_counts) == null ? void 0 : z.reply) || 0,
|
|
11458
|
-
peopleWhoLiked:
|
|
11457
|
+
peopleWhoLiked: I
|
|
11459
11458
|
},
|
|
11460
11459
|
originalAuthorId: R == null ? void 0 : R.id,
|
|
11461
11460
|
forceHide: { comments: !0 },
|
|
@@ -11464,11 +11463,11 @@ const gu = ({
|
|
|
11464
11463
|
createContent: () => null,
|
|
11465
11464
|
deleteContent: s,
|
|
11466
11465
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11467
|
-
updateContent: (
|
|
11466
|
+
updateContent: (K, { body: E }) => g({ content: E })
|
|
11468
11467
|
},
|
|
11469
11468
|
likes: {
|
|
11470
11469
|
createLike: () => _({ activityId: n }),
|
|
11471
|
-
deleteLike: () => y({ activityId: n, reactionId:
|
|
11470
|
+
deleteLike: () => y({ activityId: n, reactionId: w })
|
|
11472
11471
|
},
|
|
11473
11472
|
comments: {
|
|
11474
11473
|
openComments: () => {
|
|
@@ -11547,7 +11546,7 @@ const gu = ({
|
|
|
11547
11546
|
}
|
|
11548
11547
|
];
|
|
11549
11548
|
const Dt = "notFoundError_", bu = () => {
|
|
11550
|
-
const t =
|
|
11549
|
+
const t = H(), e = [];
|
|
11551
11550
|
return aa.forEach((n, r) => {
|
|
11552
11551
|
n.title = t.formatMessage({ id: `${Dt}post_${r + 1}` }), e.push("solutionArticle");
|
|
11553
11552
|
}), /* @__PURE__ */ a.jsxs(
|