@apolitical/component-library 1.13.4-beta.1 → 1.13.4-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/banners/banner-section/banner-section.d.ts +5 -3
- package/general/divider/divider.d.ts +3 -1
- package/index.js +9 -9
- package/index.mjs +927 -904
- package/package.json +1 -1
- package/style.css +1 -1
- package/styles/base/_index.scss +1 -1
- package/styles/base/_layout.scss +10 -0
- package/styles/variables/sizes/_common.scss +3 -0
package/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import N, { memo as Ne, useState as F, useEffect as X, useRef as ne, useMemo as et, Children as Mt, createContext as Ft, useContext as ge, Fragment as Ct, useCallback as ke, useReducer as rs, Suspense as os } from "react";
|
|
2
2
|
import as from "lodash.clonedeep";
|
|
3
3
|
import is from "lodash.set";
|
|
4
|
-
import { useIntl as
|
|
4
|
+
import { useIntl as A, IntlProvider as cs, createIntl as ls, FormattedMessage as ye } from "react-intl";
|
|
5
5
|
import tt from "truncate";
|
|
6
6
|
import nt from "markdown-to-jsx";
|
|
7
7
|
import { QueryClient as ds, QueryClientProvider as us, useQueryClient as st, useQuery as fn, useMutation as de } from "@tanstack/react-query";
|
|
@@ -26,24 +26,24 @@ var pn = { exports: {} };
|
|
|
26
26
|
(function() {
|
|
27
27
|
var t = {}.hasOwnProperty;
|
|
28
28
|
function n() {
|
|
29
|
-
for (var r = [],
|
|
30
|
-
var
|
|
31
|
-
if (
|
|
32
|
-
var d = typeof
|
|
29
|
+
for (var r = [], i = 0; i < arguments.length; i++) {
|
|
30
|
+
var c = arguments[i];
|
|
31
|
+
if (c) {
|
|
32
|
+
var d = typeof c;
|
|
33
33
|
if (d === "string" || d === "number")
|
|
34
|
-
r.push(
|
|
35
|
-
else if (Array.isArray(
|
|
36
|
-
if (
|
|
37
|
-
var o = n.apply(null,
|
|
34
|
+
r.push(c);
|
|
35
|
+
else if (Array.isArray(c)) {
|
|
36
|
+
if (c.length) {
|
|
37
|
+
var o = n.apply(null, c);
|
|
38
38
|
o && r.push(o);
|
|
39
39
|
}
|
|
40
40
|
} else if (d === "object") {
|
|
41
|
-
if (
|
|
42
|
-
r.push(
|
|
41
|
+
if (c.toString !== Object.prototype.toString && !c.toString.toString().includes("[native code]")) {
|
|
42
|
+
r.push(c.toString());
|
|
43
43
|
continue;
|
|
44
44
|
}
|
|
45
|
-
for (var
|
|
46
|
-
t.call(
|
|
45
|
+
for (var a in c)
|
|
46
|
+
t.call(c, a) && c[a] && r.push(a);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -53,7 +53,7 @@ var pn = { exports: {} };
|
|
|
53
53
|
})();
|
|
54
54
|
})(pn);
|
|
55
55
|
var vs = pn.exports;
|
|
56
|
-
const E = /* @__PURE__ */ bs(vs), ws = ({ element: e = "span", showOnFocus: t = !0, children: n, ...r }) =>
|
|
56
|
+
const E = /* @__PURE__ */ bs(vs), ws = ({ element: e = "span", showOnFocus: t = !0, children: n, ...r }) => N.createElement(e, { ...r, className: E("hidden", { "show-on-focus": t }), children: n }), ce = Ne(ws), ks = ({ element: e = "span", children: t = null, ...n }) => N.createElement(e, { ...n, "aria-hidden": !0 }, t), gn = Ne(ks);
|
|
57
57
|
var Dt = { exports: {} }, Re = {};
|
|
58
58
|
/**
|
|
59
59
|
* @license React
|
|
@@ -69,16 +69,16 @@ function js() {
|
|
|
69
69
|
if (tn)
|
|
70
70
|
return Re;
|
|
71
71
|
tn = 1;
|
|
72
|
-
var e =
|
|
73
|
-
function d(o,
|
|
74
|
-
var
|
|
75
|
-
|
|
76
|
-
for (
|
|
77
|
-
r.call(
|
|
72
|
+
var e = N, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, c = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
73
|
+
function d(o, a, u) {
|
|
74
|
+
var l, f = {}, h = null, p = null;
|
|
75
|
+
u !== void 0 && (h = "" + u), a.key !== void 0 && (h = "" + a.key), a.ref !== void 0 && (p = a.ref);
|
|
76
|
+
for (l in a)
|
|
77
|
+
r.call(a, l) && !c.hasOwnProperty(l) && (f[l] = a[l]);
|
|
78
78
|
if (o && o.defaultProps)
|
|
79
|
-
for (
|
|
80
|
-
f[
|
|
81
|
-
return { $$typeof: t, type: o, key: h, ref: p, props: f, _owner:
|
|
79
|
+
for (l in a = o.defaultProps, a)
|
|
80
|
+
f[l] === void 0 && (f[l] = a[l]);
|
|
81
|
+
return { $$typeof: t, type: o, key: h, ref: p, props: f, _owner: i.current };
|
|
82
82
|
}
|
|
83
83
|
return Re.Fragment = n, Re.jsx = d, Re.jsxs = d, Re;
|
|
84
84
|
}
|
|
@@ -95,7 +95,7 @@ var Fe = {};
|
|
|
95
95
|
var nn;
|
|
96
96
|
function ys() {
|
|
97
97
|
return nn || (nn = 1, process.env.NODE_ENV !== "production" && function() {
|
|
98
|
-
var e =
|
|
98
|
+
var e = N, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), c = Symbol.for("react.profiler"), d = Symbol.for("react.provider"), o = Symbol.for("react.context"), a = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), l = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), _ = Symbol.iterator, j = "@@iterator";
|
|
99
99
|
function g(m) {
|
|
100
100
|
if (m === null || typeof m != "object")
|
|
101
101
|
return null;
|
|
@@ -123,7 +123,7 @@ function ys() {
|
|
|
123
123
|
var M = !1, C = !1, I = !1, V = !1, x = !1, b;
|
|
124
124
|
b = Symbol.for("react.module.reference");
|
|
125
125
|
function Q(m) {
|
|
126
|
-
return !!(typeof m == "string" || typeof m == "function" || m === r || m ===
|
|
126
|
+
return !!(typeof m == "string" || typeof m == "function" || m === r || m === c || x || m === i || m === u || m === l || V || m === p || M || C || I || typeof m == "object" && m !== null && (m.$$typeof === h || m.$$typeof === f || m.$$typeof === d || m.$$typeof === o || m.$$typeof === a || // This needs to include all possible module reference object
|
|
127
127
|
// types supported by any Flight configuration anywhere since
|
|
128
128
|
// we don't know which Flight build this will end up being used
|
|
129
129
|
// with.
|
|
@@ -151,13 +151,13 @@ function ys() {
|
|
|
151
151
|
return "Fragment";
|
|
152
152
|
case n:
|
|
153
153
|
return "Portal";
|
|
154
|
-
case
|
|
154
|
+
case c:
|
|
155
155
|
return "Profiler";
|
|
156
|
-
case
|
|
156
|
+
case i:
|
|
157
157
|
return "StrictMode";
|
|
158
|
-
case c:
|
|
159
|
-
return "Suspense";
|
|
160
158
|
case u:
|
|
159
|
+
return "Suspense";
|
|
160
|
+
case l:
|
|
161
161
|
return "SuspenseList";
|
|
162
162
|
}
|
|
163
163
|
if (typeof m == "object")
|
|
@@ -168,7 +168,7 @@ function ys() {
|
|
|
168
168
|
case d:
|
|
169
169
|
var y = m;
|
|
170
170
|
return Y(y._context) + ".Provider";
|
|
171
|
-
case
|
|
171
|
+
case a:
|
|
172
172
|
return w(m, m.render, "ForwardRef");
|
|
173
173
|
case f:
|
|
174
174
|
var $ = m.displayName || null;
|
|
@@ -265,7 +265,7 @@ function ys() {
|
|
|
265
265
|
var Ie = typeof WeakMap == "function" ? WeakMap : Map;
|
|
266
266
|
xe = new Ie();
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function Ae(m, v) {
|
|
269
269
|
if (!m || _e)
|
|
270
270
|
return "";
|
|
271
271
|
{
|
|
@@ -314,14 +314,14 @@ function ys() {
|
|
|
314
314
|
} catch (be) {
|
|
315
315
|
if (be && $ && typeof be.stack == "string") {
|
|
316
316
|
for (var D = be.stack.split(`
|
|
317
|
-
`),
|
|
318
|
-
`), q = D.length - 1, ee =
|
|
317
|
+
`), le = $.stack.split(`
|
|
318
|
+
`), q = D.length - 1, ee = le.length - 1; q >= 1 && ee >= 0 && D[q] !== le[ee]; )
|
|
319
319
|
ee--;
|
|
320
320
|
for (; q >= 1 && ee >= 0; q--, ee--)
|
|
321
|
-
if (D[q] !==
|
|
321
|
+
if (D[q] !== le[ee]) {
|
|
322
322
|
if (q !== 1 || ee !== 1)
|
|
323
323
|
do
|
|
324
|
-
if (q--, ee--, ee < 0 || D[q] !==
|
|
324
|
+
if (q--, ee--, ee < 0 || D[q] !== le[ee]) {
|
|
325
325
|
var he = `
|
|
326
326
|
` + D[q].replace(" at new ", " at ");
|
|
327
327
|
return m.displayName && he.includes("<anonymous>") && (he = he.replace("<anonymous>", m.displayName)), typeof m == "function" && xe.set(m, he), he;
|
|
@@ -337,7 +337,7 @@ function ys() {
|
|
|
337
337
|
return typeof m == "function" && xe.set(m, en), en;
|
|
338
338
|
}
|
|
339
339
|
function Fn(m, v, y) {
|
|
340
|
-
return
|
|
340
|
+
return Ae(m, !1);
|
|
341
341
|
}
|
|
342
342
|
function Ln(m) {
|
|
343
343
|
var v = m.prototype;
|
|
@@ -347,18 +347,18 @@ function ys() {
|
|
|
347
347
|
if (m == null)
|
|
348
348
|
return "";
|
|
349
349
|
if (typeof m == "function")
|
|
350
|
-
return
|
|
350
|
+
return Ae(m, Ln(m));
|
|
351
351
|
if (typeof m == "string")
|
|
352
352
|
return fe(m);
|
|
353
353
|
switch (m) {
|
|
354
|
-
case c:
|
|
355
|
-
return fe("Suspense");
|
|
356
354
|
case u:
|
|
355
|
+
return fe("Suspense");
|
|
356
|
+
case l:
|
|
357
357
|
return fe("SuspenseList");
|
|
358
358
|
}
|
|
359
359
|
if (typeof m == "object")
|
|
360
360
|
switch (m.$$typeof) {
|
|
361
|
-
case
|
|
361
|
+
case a:
|
|
362
362
|
return Fn(m.render);
|
|
363
363
|
case f:
|
|
364
364
|
return He(m.type, v, y);
|
|
@@ -388,8 +388,8 @@ function ys() {
|
|
|
388
388
|
var D = void 0;
|
|
389
389
|
try {
|
|
390
390
|
if (typeof m[R] != "function") {
|
|
391
|
-
var
|
|
392
|
-
throw
|
|
391
|
+
var le = Error(($ || "React class") + ": " + y + " type `" + R + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof m[R] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
392
|
+
throw le.name = "Invariant Violation", le;
|
|
393
393
|
}
|
|
394
394
|
D = m[R](v, R, $, y, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
395
395
|
} catch (q) {
|
|
@@ -505,8 +505,8 @@ function ys() {
|
|
|
505
505
|
};
|
|
506
506
|
function Jn(m, v, y, $, B) {
|
|
507
507
|
{
|
|
508
|
-
var z, R = {}, D = null,
|
|
509
|
-
y !== void 0 && (Wt(y), D = "" + y), zn(v) && (Wt(v.key), D = "" + v.key), Un(v) && (
|
|
508
|
+
var z, R = {}, D = null, le = null;
|
|
509
|
+
y !== void 0 && (Wt(y), D = "" + y), zn(v) && (Wt(v.key), D = "" + v.key), Un(v) && (le = v.ref, Wn(v, B));
|
|
510
510
|
for (z in v)
|
|
511
511
|
Qe.call(v, z) && !Qn.hasOwnProperty(z) && (R[z] = v[z]);
|
|
512
512
|
if (m && m.defaultProps) {
|
|
@@ -514,11 +514,11 @@ function ys() {
|
|
|
514
514
|
for (z in q)
|
|
515
515
|
R[z] === void 0 && (R[z] = q[z]);
|
|
516
516
|
}
|
|
517
|
-
if (D ||
|
|
517
|
+
if (D || le) {
|
|
518
518
|
var ee = typeof m == "function" ? m.displayName || m.name || "Unknown" : m;
|
|
519
|
-
D && Vn(R, ee),
|
|
519
|
+
D && Vn(R, ee), le && Yn(R, ee);
|
|
520
520
|
}
|
|
521
|
-
return Gn(m, D,
|
|
521
|
+
return Gn(m, D, le, B, $, Pe.current, R);
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
524
|
var mt = S.ReactCurrentOwner, Gt = S.ReactDebugCurrentFrame;
|
|
@@ -610,7 +610,7 @@ Check the top-level render call using <` + y + ">.");
|
|
|
610
610
|
var y;
|
|
611
611
|
if (typeof v == "function")
|
|
612
612
|
y = v.propTypes;
|
|
613
|
-
else if (typeof v == "object" && (v.$$typeof ===
|
|
613
|
+
else if (typeof v == "object" && (v.$$typeof === a || // Note: Memo only checks outer props here.
|
|
614
614
|
// Inner props are checked in the reconciler.
|
|
615
615
|
v.$$typeof === f))
|
|
616
616
|
y = v.propTypes;
|
|
@@ -645,8 +645,8 @@ Check the top-level render call using <` + y + ">.");
|
|
|
645
645
|
if (!R) {
|
|
646
646
|
var D = "";
|
|
647
647
|
(m === void 0 || typeof m == "object" && m !== null && Object.keys(m).length === 0) && (D += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
648
|
-
var
|
|
649
|
-
|
|
648
|
+
var le = Xn(B);
|
|
649
|
+
le ? D += le : D += Jt();
|
|
650
650
|
var q;
|
|
651
651
|
m === null ? q = "null" : dt(m) ? q = "array" : m !== void 0 && m.$$typeof === t ? (q = "<" + (L(m.type) || "Unknown") + " />", D = " Did you accidentally export a JSX literal instead of a component?") : q = typeof m, k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", q, D);
|
|
652
652
|
}
|
|
@@ -696,9 +696,9 @@ const Es = () => {
|
|
|
696
696
|
}, t);
|
|
697
697
|
};
|
|
698
698
|
function Ss(e, t, n) {
|
|
699
|
-
var r = this,
|
|
699
|
+
var r = this, i = ne(null), c = ne(0), d = ne(null), o = ne([]), a = ne(), u = ne(), l = ne(e), f = ne(!0);
|
|
700
700
|
X(function() {
|
|
701
|
-
|
|
701
|
+
l.current = e;
|
|
702
702
|
}, [e]);
|
|
703
703
|
var h = !t && t !== 0 && typeof window < "u";
|
|
704
704
|
if (typeof e != "function")
|
|
@@ -712,65 +712,65 @@ function Ss(e, t, n) {
|
|
|
712
712
|
}, []);
|
|
713
713
|
var S = et(function() {
|
|
714
714
|
var k = function(x) {
|
|
715
|
-
var b = o.current, Q =
|
|
716
|
-
return o.current =
|
|
715
|
+
var b = o.current, Q = a.current;
|
|
716
|
+
return o.current = a.current = null, c.current = x, u.current = l.current.apply(Q, b);
|
|
717
717
|
}, T = function(x, b) {
|
|
718
718
|
h && cancelAnimationFrame(d.current), d.current = h ? requestAnimationFrame(x) : setTimeout(x, b);
|
|
719
719
|
}, M = function(x) {
|
|
720
720
|
if (!f.current)
|
|
721
721
|
return !1;
|
|
722
|
-
var b = x -
|
|
723
|
-
return !
|
|
722
|
+
var b = x - i.current;
|
|
723
|
+
return !i.current || b >= t || b < 0 || j && x - c.current >= g;
|
|
724
724
|
}, C = function(x) {
|
|
725
|
-
return d.current = null, _ && o.current ? k(x) : (o.current =
|
|
725
|
+
return d.current = null, _ && o.current ? k(x) : (o.current = a.current = null, u.current);
|
|
726
726
|
}, I = function x() {
|
|
727
727
|
var b = Date.now();
|
|
728
728
|
if (M(b))
|
|
729
729
|
return C(b);
|
|
730
730
|
if (f.current) {
|
|
731
|
-
var Q = t - (b -
|
|
731
|
+
var Q = t - (b - i.current), w = j ? Math.min(Q, g - (b - c.current)) : Q;
|
|
732
732
|
T(x, w);
|
|
733
733
|
}
|
|
734
734
|
}, V = function() {
|
|
735
735
|
var x = Date.now(), b = M(x);
|
|
736
|
-
if (o.current = [].slice.call(arguments),
|
|
736
|
+
if (o.current = [].slice.call(arguments), a.current = r, i.current = x, b) {
|
|
737
737
|
if (!d.current && f.current)
|
|
738
|
-
return
|
|
738
|
+
return c.current = i.current, T(I, t), p ? k(i.current) : u.current;
|
|
739
739
|
if (j)
|
|
740
|
-
return T(I, t), k(
|
|
740
|
+
return T(I, t), k(i.current);
|
|
741
741
|
}
|
|
742
|
-
return d.current || T(I, t),
|
|
742
|
+
return d.current || T(I, t), u.current;
|
|
743
743
|
};
|
|
744
744
|
return V.cancel = function() {
|
|
745
|
-
d.current && (h ? cancelAnimationFrame(d.current) : clearTimeout(d.current)),
|
|
745
|
+
d.current && (h ? cancelAnimationFrame(d.current) : clearTimeout(d.current)), c.current = 0, o.current = i.current = a.current = d.current = null;
|
|
746
746
|
}, V.isPending = function() {
|
|
747
747
|
return !!d.current;
|
|
748
748
|
}, V.flush = function() {
|
|
749
|
-
return d.current ? C(Date.now()) :
|
|
749
|
+
return d.current ? C(Date.now()) : u.current;
|
|
750
750
|
}, V;
|
|
751
751
|
}, [p, j, t, g, _, h]);
|
|
752
752
|
return S;
|
|
753
753
|
}
|
|
754
754
|
function _n(e, t, n) {
|
|
755
|
-
var r = n === void 0 ? {} : n,
|
|
756
|
-
return Ss(e, t, { maxWait: t, leading:
|
|
755
|
+
var r = n === void 0 ? {} : n, i = r.leading, c = r.trailing;
|
|
756
|
+
return Ss(e, t, { maxWait: t, leading: i === void 0 || i, trailing: c === void 0 || c });
|
|
757
757
|
}
|
|
758
758
|
let pt;
|
|
759
759
|
const rt = (e = !0, t = !1) => {
|
|
760
760
|
if (!e)
|
|
761
761
|
return;
|
|
762
|
-
const [n, r] =
|
|
762
|
+
const [n, r] = N.useState(0) || [!1, () => {
|
|
763
763
|
}];
|
|
764
|
-
X(() => (
|
|
764
|
+
X(() => (c(), window.addEventListener("resize", d), () => {
|
|
765
765
|
clearTimeout(pt), d.flush(), window.removeEventListener("resize", d);
|
|
766
766
|
}), []);
|
|
767
|
-
const
|
|
768
|
-
r(
|
|
767
|
+
const i = () => window.innerWidth, c = () => {
|
|
768
|
+
r(i());
|
|
769
769
|
}, d = _n(
|
|
770
770
|
() => {
|
|
771
|
-
|
|
771
|
+
i() !== n && (t && (clearTimeout(pt), document.body.classList.add("is-resizing"), pt = setTimeout(() => {
|
|
772
772
|
document.body.classList.remove("is-resizing");
|
|
773
|
-
}, 550)),
|
|
773
|
+
}, 550)), c());
|
|
774
774
|
},
|
|
775
775
|
500,
|
|
776
776
|
{ leading: !0 }
|
|
@@ -787,23 +787,23 @@ const rt = (e = !0, t = !1) => {
|
|
|
787
787
|
}) => {
|
|
788
788
|
if (!window)
|
|
789
789
|
return;
|
|
790
|
-
const [
|
|
791
|
-
}], [d, o] =
|
|
790
|
+
const [i, c] = N.useState({ current: 0, past: 0 }) || [!1, () => {
|
|
791
|
+
}], [d, o] = N.useState({ scrollDown: !1, scrollUp: !1 }) || [!1, () => {
|
|
792
792
|
}];
|
|
793
|
-
X(() => (
|
|
794
|
-
|
|
793
|
+
X(() => (a(), window.addEventListener("scroll", u), () => {
|
|
794
|
+
u.flush(), window.removeEventListener("scroll", u);
|
|
795
795
|
}), []);
|
|
796
|
-
const
|
|
797
|
-
const
|
|
798
|
-
if (
|
|
799
|
-
|
|
796
|
+
const a = () => {
|
|
797
|
+
const l = window.scrollY, f = i.current, h = l - f, p = h > 0 ? "down" : "up";
|
|
798
|
+
if (c({ current: l, past: f }), p === "down") {
|
|
799
|
+
l >= e + t.down && !d.scrollDown && (!d.scrollUp || h > t.up) && (n(), o({ scrollUp: !1, scrollDown: !0 }));
|
|
800
800
|
return;
|
|
801
801
|
}
|
|
802
802
|
Math.abs(h) >= t.up && !d.scrollUp && (r(), o({ scrollUp: !0, scrollDown: !1 }));
|
|
803
|
-
},
|
|
804
|
-
|
|
803
|
+
}, u = _n(() => {
|
|
804
|
+
a();
|
|
805
805
|
}, 250);
|
|
806
|
-
return
|
|
806
|
+
return i;
|
|
807
807
|
}, mo = (e = [], t = !0) => {
|
|
808
808
|
e = Array.isArray(e) ? e : [e];
|
|
809
809
|
const n = ne(!1);
|
|
@@ -818,8 +818,8 @@ const rt = (e = !0, t = !1) => {
|
|
|
818
818
|
}, $s = (e, t) => {
|
|
819
819
|
Array.isArray(t) || (t = [t]);
|
|
820
820
|
const n = as(e);
|
|
821
|
-
return t.forEach(({ type: r, value:
|
|
822
|
-
is(n, r,
|
|
821
|
+
return t.forEach(({ type: r, value: i }) => {
|
|
822
|
+
is(n, r, i);
|
|
823
823
|
}), n;
|
|
824
824
|
}, xn = (e) => {
|
|
825
825
|
const t = [];
|
|
@@ -829,11 +829,11 @@ const rt = (e = !0, t = !1) => {
|
|
|
829
829
|
}), t.sort((n, r) => n - r);
|
|
830
830
|
}, bn = (e, t, n) => {
|
|
831
831
|
let r = n.mobile;
|
|
832
|
-
for (const
|
|
833
|
-
const
|
|
834
|
-
if (e >=
|
|
835
|
-
r = n[
|
|
836
|
-
else if (e <
|
|
832
|
+
for (const i in t) {
|
|
833
|
+
const c = parseInt(String(t[i]));
|
|
834
|
+
if (e >= c)
|
|
835
|
+
r = n[c];
|
|
836
|
+
else if (e < c)
|
|
837
837
|
break;
|
|
838
838
|
}
|
|
839
839
|
return r;
|
|
@@ -843,19 +843,19 @@ const rt = (e = !0, t = !1) => {
|
|
|
843
843
|
month: "short",
|
|
844
844
|
year: "numeric"
|
|
845
845
|
}), Cs = (e) => {
|
|
846
|
-
let
|
|
846
|
+
let c;
|
|
847
847
|
try {
|
|
848
|
-
|
|
848
|
+
c = (/* @__PURE__ */ new Date()).getTime() - new Date(e).getTime();
|
|
849
849
|
} catch {
|
|
850
850
|
return "";
|
|
851
851
|
}
|
|
852
|
-
const d =
|
|
852
|
+
const d = c / 36e5, o = Math.floor(c / 864e5);
|
|
853
853
|
if (o < 1)
|
|
854
854
|
return d < 1 ? { path: "now" } : { path: "hours", number: Math.floor(d) };
|
|
855
855
|
if (o < 7)
|
|
856
856
|
return { path: "days", number: o };
|
|
857
|
-
const
|
|
858
|
-
return
|
|
857
|
+
const a = Math.floor(o / 7);
|
|
858
|
+
return a <= 52 ? { path: "weeks", number: a } : { path: "years", number: Math.floor(o / 365) };
|
|
859
859
|
}, Ds = (e) => new Promise((t) => setTimeout(t, e)), Lt = {
|
|
860
860
|
apolitical: "Apolitical",
|
|
861
861
|
breadcrumbs_label: "Go back to:",
|
|
@@ -1139,13 +1139,13 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1139
1139
|
sharedLinks_copy_text: "Copy link",
|
|
1140
1140
|
tags_community: "From the community",
|
|
1141
1141
|
tooltip_loading: "Loading..."
|
|
1142
|
-
},
|
|
1142
|
+
}, Ns = {
|
|
1143
1143
|
languageSwitcher_label: "Me gustaría leer este artículo en...",
|
|
1144
1144
|
languageSwitcher_translation_original: "idioma original",
|
|
1145
1145
|
languageSwitcher_translation_human: "traducido por un humano",
|
|
1146
1146
|
languageSwitcher_translation_machine: "traducido por máquina",
|
|
1147
1147
|
languageSwitcher_disclaimer: "Este contenido fue traducido automáticamente y ocasionalmente tendrá errores de género u otras traducciones directas. Estamos intentando resolver este problema, pero mientras tanto, si notas algún error grave, escríbenos a <link>{email}</link>"
|
|
1148
|
-
},
|
|
1148
|
+
}, As = {
|
|
1149
1149
|
collapsibleSection_summary: "En savoir plus",
|
|
1150
1150
|
languageSwitcher_label: "Je voudrais lire cet article dans...",
|
|
1151
1151
|
languageSwitcher_translation_original: "langue originale",
|
|
@@ -1161,40 +1161,40 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1161
1161
|
}, Rs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1162
1162
|
__proto__: null,
|
|
1163
1163
|
en: Lt,
|
|
1164
|
-
es:
|
|
1165
|
-
fr:
|
|
1164
|
+
es: Ns,
|
|
1165
|
+
fr: As,
|
|
1166
1166
|
pt: Ps
|
|
1167
|
-
}, Symbol.toStringTag, { value: "Module" })), pe = (e, t, n, r,
|
|
1168
|
-
let
|
|
1169
|
-
return `${t}_${n}` in Lt ?
|
|
1167
|
+
}, Symbol.toStringTag, { value: "Module" })), pe = (e, t, n, r, i = {}) => {
|
|
1168
|
+
let c = "";
|
|
1169
|
+
return `${t}_${n}` in Lt ? c = e({ id: `${t}_${n}` }, i) : c = e({ id: t }, { [r]: n, ...i }), c;
|
|
1170
1170
|
}, Fs = (e, t, n) => {
|
|
1171
1171
|
if (!e || e === 0)
|
|
1172
1172
|
return "0";
|
|
1173
1173
|
t || (t = 0), n || (n = ["k", "m", "b", "t"]);
|
|
1174
1174
|
let r = e.toString();
|
|
1175
1175
|
t = Math.pow(10, t);
|
|
1176
|
-
for (let
|
|
1177
|
-
const
|
|
1178
|
-
if (
|
|
1179
|
-
e = Math.round(e * t /
|
|
1176
|
+
for (let i = n.length - 1; i >= 0; i--) {
|
|
1177
|
+
const c = Math.pow(10, (i + 1) * 3);
|
|
1178
|
+
if (c <= e) {
|
|
1179
|
+
e = Math.round(e * t / c) / t, e === 1e3 && i < n.length - 1 && (e = 1, i++), r = `${e}${n[i]}`;
|
|
1180
1180
|
break;
|
|
1181
1181
|
}
|
|
1182
1182
|
}
|
|
1183
1183
|
return r;
|
|
1184
|
-
}, vn = (e, t) =>
|
|
1184
|
+
}, vn = (e, t) => N.Children.map(e, (n) => N.cloneElement(n, {
|
|
1185
1185
|
...t
|
|
1186
1186
|
})), Ls = (e) => e.replace(/\s+/g, "").length > 0, J = ({
|
|
1187
1187
|
variant: e = "primary",
|
|
1188
1188
|
size: t = "medium",
|
|
1189
1189
|
styling: n = { muted: !1, fullWidth: !1 },
|
|
1190
1190
|
icon: r = !1,
|
|
1191
|
-
href:
|
|
1192
|
-
element:
|
|
1191
|
+
href: i = !1,
|
|
1192
|
+
element: c = "button",
|
|
1193
1193
|
onClick: d = !1,
|
|
1194
1194
|
className: o = "",
|
|
1195
|
-
disabled:
|
|
1196
|
-
screenreaderText:
|
|
1197
|
-
children:
|
|
1195
|
+
disabled: a = !1,
|
|
1196
|
+
screenreaderText: u = !1,
|
|
1197
|
+
children: l = !1,
|
|
1198
1198
|
...f
|
|
1199
1199
|
}) => {
|
|
1200
1200
|
const p = rt(typeof t == "object");
|
|
@@ -1207,50 +1207,50 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1207
1207
|
const j = {
|
|
1208
1208
|
...f,
|
|
1209
1209
|
className: E(e, o, _, {
|
|
1210
|
-
"no-text": !
|
|
1211
|
-
disabled:
|
|
1212
|
-
button:
|
|
1210
|
+
"no-text": !l,
|
|
1211
|
+
disabled: a,
|
|
1212
|
+
button: i
|
|
1213
1213
|
}),
|
|
1214
1214
|
onClick: (g) => {
|
|
1215
|
-
(!
|
|
1215
|
+
(!i || i[0] === "#") && d && (g.preventDefault(), g.stopPropagation()), d && d(g);
|
|
1216
1216
|
},
|
|
1217
|
-
disabled: typeof
|
|
1217
|
+
disabled: typeof a == "object" && "isClickable" in a ? !a.isClickable : a
|
|
1218
1218
|
};
|
|
1219
|
-
return
|
|
1220
|
-
|
|
1219
|
+
return i && (c = "a", j.href = i), N.createElement(
|
|
1220
|
+
c,
|
|
1221
1221
|
j,
|
|
1222
|
-
|
|
1222
|
+
l || (u ? /* @__PURE__ */ s.jsx(ce, { showOnFocus: !1, children: u }) : null)
|
|
1223
1223
|
);
|
|
1224
1224
|
}, ot = ({ buttons: e, className: t = "", ...n }) => {
|
|
1225
|
-
const r = e.length > 1 ? "ul" : "p",
|
|
1226
|
-
return
|
|
1225
|
+
const r = e.length > 1 ? "ul" : "p", i = e.map((c, d) => r === "p" ? /* @__PURE__ */ s.jsx(J, { ...c }, d) : /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(J, { ...c }) }, d));
|
|
1226
|
+
return N.createElement(r, { className: E("button-wrapper", t), ...n, children: i });
|
|
1227
1227
|
};
|
|
1228
|
-
const De = ({
|
|
1229
|
-
const
|
|
1230
|
-
return /* @__PURE__ */ s.jsx("hr", { className: E({ "has-max-width":
|
|
1228
|
+
const De = ({ className: e = "", maxWidth: t = !1 }) => {
|
|
1229
|
+
const n = t ? { "--max-width": `${t / 16}rem` } : {};
|
|
1230
|
+
return /* @__PURE__ */ s.jsx("hr", { className: E(e, { "has-max-width": t }), style: n });
|
|
1231
1231
|
}, at = ({
|
|
1232
1232
|
href: e,
|
|
1233
1233
|
children: t,
|
|
1234
1234
|
fallbackElement: n,
|
|
1235
1235
|
className: r = "",
|
|
1236
|
-
onClick:
|
|
1237
|
-
gtmContext:
|
|
1236
|
+
onClick: i,
|
|
1237
|
+
gtmContext: c,
|
|
1238
1238
|
gtmType: d,
|
|
1239
1239
|
...o
|
|
1240
1240
|
}) => {
|
|
1241
1241
|
if (e) {
|
|
1242
|
-
const
|
|
1243
|
-
return
|
|
1242
|
+
const a = { ...o };
|
|
1243
|
+
return i && (a.onClick = i), c && (a["data-gtm-event-context"] = c), d && (a["data-gtm-event-type"] = d), /* @__PURE__ */ s.jsx(
|
|
1244
1244
|
"a",
|
|
1245
1245
|
{
|
|
1246
1246
|
href: e,
|
|
1247
1247
|
className: E("gtm-trackable", r),
|
|
1248
|
-
...
|
|
1248
|
+
...a,
|
|
1249
1249
|
children: t
|
|
1250
1250
|
}
|
|
1251
1251
|
);
|
|
1252
1252
|
}
|
|
1253
|
-
return n ?
|
|
1253
|
+
return n ? N.createElement(n, { children: t, className: r, ...o }) : t;
|
|
1254
1254
|
}, sn = {
|
|
1255
1255
|
card: {
|
|
1256
1256
|
range: [
|
|
@@ -1359,31 +1359,31 @@ const De = ({ maxWidth: e = !1 }) => {
|
|
|
1359
1359
|
range: t,
|
|
1360
1360
|
sizes: n
|
|
1361
1361
|
}) => {
|
|
1362
|
-
const { range: r, sizes:
|
|
1363
|
-
return { range: t && t.length > 0 ? t : r, sizes: n ||
|
|
1362
|
+
const { range: r, sizes: i } = e ? sn[e] : sn.fallback;
|
|
1363
|
+
return { range: t && t.length > 0 ? t : r, sizes: n || i };
|
|
1364
1364
|
}, Bs = ({ format: e, height: t, query: n, width: r }) => {
|
|
1365
|
-
let
|
|
1366
|
-
return
|
|
1367
|
-
}, gt = ({ format: e, range: t, url: n, query: r }) => t.map(({ height:
|
|
1365
|
+
let i = `w=${r}&h=${t}`;
|
|
1366
|
+
return i = e ? `${i}&fm=${e}` : i, i = n ? `${i}&${n}` : i, i;
|
|
1367
|
+
}, gt = ({ format: e, range: t, url: n, query: r }) => t.map(({ height: i, width: c }) => `${n}?${Bs({
|
|
1368
1368
|
format: e,
|
|
1369
|
-
height:
|
|
1369
|
+
height: i,
|
|
1370
1370
|
query: r,
|
|
1371
|
-
width:
|
|
1372
|
-
})} ${
|
|
1371
|
+
width: c
|
|
1372
|
+
})} ${c}w`).join(", ");
|
|
1373
1373
|
const Is = ({ image: e, className: t, testId: n }) => {
|
|
1374
1374
|
const {
|
|
1375
1375
|
description: r,
|
|
1376
|
-
height:
|
|
1377
|
-
type:
|
|
1376
|
+
height: i,
|
|
1377
|
+
type: c,
|
|
1378
1378
|
query: d,
|
|
1379
1379
|
url: o,
|
|
1380
|
-
width:
|
|
1381
|
-
loading:
|
|
1382
|
-
decoding:
|
|
1380
|
+
width: a,
|
|
1381
|
+
loading: u,
|
|
1382
|
+
decoding: l,
|
|
1383
1383
|
fetchPriority: f
|
|
1384
1384
|
} = e, { range: h, sizes: p } = Os(e), _ = gt({ format: "avif", query: d, range: h, url: o }), j = gt({ format: "webp", query: d, range: h, url: o }), g = gt({ format: "", query: d, range: h, url: o });
|
|
1385
1385
|
return /* @__PURE__ */ s.jsxs("picture", { className: t, children: [
|
|
1386
|
-
|
|
1386
|
+
c !== "image/gif" && /* @__PURE__ */ s.jsx(
|
|
1387
1387
|
"source",
|
|
1388
1388
|
{
|
|
1389
1389
|
type: "image/avif",
|
|
@@ -1408,11 +1408,11 @@ const Is = ({ image: e, className: t, testId: n }) => {
|
|
|
1408
1408
|
sizes: p,
|
|
1409
1409
|
src: o,
|
|
1410
1410
|
alt: r,
|
|
1411
|
-
loading:
|
|
1412
|
-
decoding:
|
|
1411
|
+
loading: u || "lazy",
|
|
1412
|
+
decoding: l || "async",
|
|
1413
1413
|
fetchpriority: f || "auto",
|
|
1414
|
-
width:
|
|
1415
|
-
height:
|
|
1414
|
+
width: a,
|
|
1415
|
+
height: i,
|
|
1416
1416
|
"data-testid": n || "image"
|
|
1417
1417
|
}
|
|
1418
1418
|
)
|
|
@@ -1420,41 +1420,41 @@ const Is = ({ image: e, className: t, testId: n }) => {
|
|
|
1420
1420
|
};
|
|
1421
1421
|
let Le = !1;
|
|
1422
1422
|
const Hs = ({ isOpen: e = !1, isLoading: t = !1, children: n }) => {
|
|
1423
|
-
const r =
|
|
1423
|
+
const r = A(), i = ne(null), [c, d] = F("hidden");
|
|
1424
1424
|
X(() => {
|
|
1425
|
-
const
|
|
1426
|
-
if (
|
|
1427
|
-
return
|
|
1428
|
-
|
|
1425
|
+
const a = i.current;
|
|
1426
|
+
if (a)
|
|
1427
|
+
return a.addEventListener("transitionend", o), () => {
|
|
1428
|
+
a.removeEventListener("transitionend", o);
|
|
1429
1429
|
};
|
|
1430
1430
|
}, []);
|
|
1431
|
-
const o = ({ propertyName:
|
|
1432
|
-
|
|
1431
|
+
const o = ({ propertyName: a }) => {
|
|
1432
|
+
a === "opacity" && (Le !== !1 && clearTimeout(Le), d((u) => u === "opening" ? "open" : u === "closing" ? "closed" : u === "closed" ? "hidden" : u));
|
|
1433
1433
|
};
|
|
1434
1434
|
return Ce(() => {
|
|
1435
1435
|
Le !== !1 && clearTimeout(Le);
|
|
1436
|
-
let
|
|
1437
|
-
e ? d("opening") : (d("closing"),
|
|
1438
|
-
d(
|
|
1436
|
+
let a = "open";
|
|
1437
|
+
e ? d("opening") : (d("closing"), a = "hidden"), Le = setTimeout(() => {
|
|
1438
|
+
d(a);
|
|
1439
1439
|
}, 300);
|
|
1440
|
-
}, [e]), /* @__PURE__ */ s.jsx("aside", { ref:
|
|
1440
|
+
}, [e]), /* @__PURE__ */ s.jsx("aside", { ref: i, className: E("tooltip text-medium", c, { loading: t }), hidden: c === "hidden", children: t ? /* @__PURE__ */ s.jsx("p", { children: r.formatMessage({ id: "tooltip_loading" }) }) : typeof n == "string" ? /* @__PURE__ */ s.jsx("p", { children: n }) : n });
|
|
1441
1441
|
};
|
|
1442
1442
|
const wn = ({ children: e, className: t = "", ...n }) => /* @__PURE__ */ s.jsx("section", { className: E("full-width-section", t), ...n, children: e });
|
|
1443
1443
|
const fo = ({ text: e, buttons: t, className: n = "" }) => {
|
|
1444
1444
|
const r = [];
|
|
1445
|
-
return t.forEach((
|
|
1445
|
+
return t.forEach((i) => {
|
|
1446
1446
|
r.push({
|
|
1447
|
-
href:
|
|
1447
|
+
href: i.link,
|
|
1448
1448
|
variant: "secondary",
|
|
1449
1449
|
size: { mobile: "medium", 1024: "large" },
|
|
1450
1450
|
className: "gtm-trackable",
|
|
1451
1451
|
"data-gtm-event-type": "download-click",
|
|
1452
|
-
"data-gtm-event-context":
|
|
1452
|
+
"data-gtm-event-context": i.eventContext || "Download",
|
|
1453
1453
|
target: "_blank",
|
|
1454
|
-
children:
|
|
1454
|
+
children: i.text
|
|
1455
1455
|
});
|
|
1456
1456
|
}), /* @__PURE__ */ s.jsx(wn, { className: E("download-section", n), children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1457
|
-
|
|
1457
|
+
N.createElement(typeof e == "string" ? "h2" : e.element, { className: "text" }, typeof e == "string" ? e : e.text),
|
|
1458
1458
|
/* @__PURE__ */ s.jsx(ot, { buttons: r })
|
|
1459
1459
|
] }) });
|
|
1460
1460
|
};
|
|
@@ -1462,26 +1462,26 @@ const ho = ({ title: e = !1, logos: t = [], className: n = "" }) => {
|
|
|
1462
1462
|
const r = t.length;
|
|
1463
1463
|
if (r === 0)
|
|
1464
1464
|
return null;
|
|
1465
|
-
const
|
|
1465
|
+
const i = {
|
|
1466
1466
|
element: typeof e == "object" ? e.element : "h2",
|
|
1467
1467
|
text: typeof e == "string" ? e : typeof e == "object" ? e.text : ""
|
|
1468
1468
|
};
|
|
1469
1469
|
return /* @__PURE__ */ s.jsxs("div", { className: E("logos", n), children: [
|
|
1470
|
-
e &&
|
|
1470
|
+
e && N.createElement(i.element, { className: "title" }, i.text),
|
|
1471
1471
|
/* @__PURE__ */ s.jsx(
|
|
1472
1472
|
"ul",
|
|
1473
1473
|
{
|
|
1474
1474
|
className: E({ "two-col": r === 2 || r === 4, "three-col": r === 5 || r <= 10 && r % 3 === 0 }),
|
|
1475
1475
|
children: t.map(
|
|
1476
|
-
({ logo:
|
|
1477
|
-
if (!
|
|
1476
|
+
({ logo: c, nameOfBusiness: d, link: o = !1, description: a = !1 }, u) => {
|
|
1477
|
+
if (!c || !c.url)
|
|
1478
1478
|
return null;
|
|
1479
|
-
const
|
|
1479
|
+
const l = /* @__PURE__ */ s.jsx(
|
|
1480
1480
|
"img",
|
|
1481
1481
|
{
|
|
1482
|
-
src:
|
|
1483
|
-
width:
|
|
1484
|
-
height:
|
|
1482
|
+
src: c.url,
|
|
1483
|
+
width: c.width || "auto",
|
|
1484
|
+
height: c.height || "auto",
|
|
1485
1485
|
alt: d
|
|
1486
1486
|
}
|
|
1487
1487
|
);
|
|
@@ -1492,11 +1492,11 @@ const ho = ({ title: e = !1, logos: t = [], className: n = "" }) => {
|
|
|
1492
1492
|
href: o,
|
|
1493
1493
|
target: "_blank",
|
|
1494
1494
|
rel: "nofollow noreferrer noopener",
|
|
1495
|
-
children:
|
|
1495
|
+
children: l
|
|
1496
1496
|
}
|
|
1497
|
-
) :
|
|
1498
|
-
|
|
1499
|
-
] }, window.btoa(`${
|
|
1497
|
+
) : l }),
|
|
1498
|
+
a && /* @__PURE__ */ s.jsx("small", { children: a })
|
|
1499
|
+
] }, window.btoa(`${c.url}_${u}`));
|
|
1500
1500
|
}
|
|
1501
1501
|
)
|
|
1502
1502
|
}
|
|
@@ -1517,68 +1517,88 @@ const Qs = [
|
|
|
1517
1517
|
"h6",
|
|
1518
1518
|
"blockquote",
|
|
1519
1519
|
"q"
|
|
1520
|
-
], Us = ({
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1520
|
+
], Us = ({
|
|
1521
|
+
className: e = "",
|
|
1522
|
+
content: t,
|
|
1523
|
+
image: n,
|
|
1524
|
+
variant: r = "default",
|
|
1525
|
+
spacing: i = "normal",
|
|
1526
|
+
cta: c,
|
|
1527
|
+
children: d
|
|
1528
|
+
}) => {
|
|
1529
|
+
const o = ["eyebrow", "title", "text"], a = { eyebrow: "small", title: "h1", text: "p" }, u = {};
|
|
1530
|
+
return o.forEach((l) => {
|
|
1531
|
+
if (!t[l]) {
|
|
1532
|
+
u[l] = !1;
|
|
1525
1533
|
return;
|
|
1526
1534
|
}
|
|
1527
|
-
if (typeof
|
|
1528
|
-
|
|
1529
|
-
const { text:
|
|
1530
|
-
if (
|
|
1535
|
+
if (typeof t[l] == "object") {
|
|
1536
|
+
u[l] = t[l];
|
|
1537
|
+
const { text: f, element: h } = t[l];
|
|
1538
|
+
if (h && Qs.includes(h.toLowerCase()))
|
|
1531
1539
|
return;
|
|
1532
|
-
|
|
1533
|
-
text:
|
|
1534
|
-
element:
|
|
1540
|
+
u[l] = {
|
|
1541
|
+
text: f,
|
|
1542
|
+
element: a[l]
|
|
1535
1543
|
};
|
|
1536
1544
|
return;
|
|
1537
1545
|
}
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
);
|
|
1553
|
-
}
|
|
1554
|
-
return null;
|
|
1546
|
+
u[l] = {
|
|
1547
|
+
text: t[l],
|
|
1548
|
+
element: a[l]
|
|
1549
|
+
};
|
|
1550
|
+
}), c && c.link && c.link[0] === "#" && (c.props || (c.props = {}), c.props.onClick = (l) => {
|
|
1551
|
+
l.preventDefault(), l.stopPropagation();
|
|
1552
|
+
const f = document.getElementById(c.link.substring(1));
|
|
1553
|
+
f && f.scrollIntoView({ behavior: "smooth" });
|
|
1554
|
+
}), /* @__PURE__ */ s.jsx(
|
|
1555
|
+
wn,
|
|
1556
|
+
{
|
|
1557
|
+
className: E("banner-section", r, i, e, {
|
|
1558
|
+
"has-image": n,
|
|
1559
|
+
"has-extra-spacing": i === "normal" && u.eyebrow && u.title
|
|
1555
1560
|
}),
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1561
|
+
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1562
|
+
/* @__PURE__ */ s.jsxs("div", { className: "content-wrapper", children: [
|
|
1563
|
+
o.map((l) => {
|
|
1564
|
+
if (u[l] && typeof u[l] == "object") {
|
|
1565
|
+
const { text: f, element: h = "" } = u[l];
|
|
1566
|
+
return N.createElement(
|
|
1567
|
+
h.toLowerCase(),
|
|
1568
|
+
{ key: l, className: l },
|
|
1569
|
+
f
|
|
1570
|
+
);
|
|
1571
|
+
}
|
|
1572
|
+
return null;
|
|
1573
|
+
}),
|
|
1574
|
+
d,
|
|
1575
|
+
c && c.text && c.link && /* @__PURE__ */ s.jsx(
|
|
1576
|
+
J,
|
|
1577
|
+
{
|
|
1578
|
+
variant: n || r === "light" ? "primary" : "secondary",
|
|
1579
|
+
size: { mobile: "medium", 768: "large" },
|
|
1580
|
+
href: c.link,
|
|
1581
|
+
...c.props,
|
|
1582
|
+
children: c.text
|
|
1583
|
+
}
|
|
1584
|
+
)
|
|
1585
|
+
] }),
|
|
1586
|
+
n && /* @__PURE__ */ s.jsx(Is, { image: { ...n, aspect: "banner" } })
|
|
1587
|
+
] })
|
|
1588
|
+
}
|
|
1589
|
+
);
|
|
1590
|
+
}, po = Ne(Us);
|
|
1571
1591
|
const go = ({
|
|
1572
1592
|
variant: e = "primary",
|
|
1573
1593
|
button: t = null,
|
|
1574
1594
|
title: n,
|
|
1575
1595
|
text: r,
|
|
1576
|
-
gtmContext:
|
|
1596
|
+
gtmContext: i
|
|
1577
1597
|
}) => !n && !r ? null : /* @__PURE__ */ s.jsxs("aside", { className: E("marketing-block", e), children: [
|
|
1578
1598
|
n && /* @__PURE__ */ s.jsx("p", { className: "title", children: n }),
|
|
1579
1599
|
r && /* @__PURE__ */ s.jsx("p", { children: r }),
|
|
1580
|
-
t && /* @__PURE__ */ s.jsx(J, { variant: "secondary", size: "medium", href: t.link, className: "gtm-trackable", "data-gtm-event-context":
|
|
1581
|
-
] }),
|
|
1600
|
+
t && /* @__PURE__ */ s.jsx(J, { variant: "secondary", size: "medium", href: t.link, className: "gtm-trackable", "data-gtm-event-context": i, "data-gtm-event-type": "learn-more-click", children: t.text })
|
|
1601
|
+
] }), Nt = "https://storage.googleapis.com/apolitical-assets/", Oe = {
|
|
1582
1602
|
general: "hello@apolitical.co",
|
|
1583
1603
|
support: "concierge@apolitical.co",
|
|
1584
1604
|
"data-protection": {
|
|
@@ -1587,7 +1607,7 @@ const go = ({
|
|
|
1587
1607
|
}
|
|
1588
1608
|
}, _o = "200,000+";
|
|
1589
1609
|
const kn = ({ label: e = !1, className: t = "", children: n }) => {
|
|
1590
|
-
const r =
|
|
1610
|
+
const r = A();
|
|
1591
1611
|
return /* @__PURE__ */ s.jsxs("details", { className: E("collapsible-section", t), children: [
|
|
1592
1612
|
/* @__PURE__ */ s.jsx("summary", { children: e || r.formatMessage({ id: "collapsibleSection_summary" }) }),
|
|
1593
1613
|
/* @__PURE__ */ s.jsx("div", { className: "content", children: n })
|
|
@@ -1595,35 +1615,35 @@ const kn = ({ label: e = !1, className: t = "", children: n }) => {
|
|
|
1595
1615
|
};
|
|
1596
1616
|
const Ee = ({ variant: e = "primary", className: t = "", children: n, ...r }) => /* @__PURE__ */ s.jsx("div", { className: E("highlighted-text-box", e, t), ...r, children: n });
|
|
1597
1617
|
const it = ({ variant: e = "empty", text: t = !1, button: n = !1, className: r = "" }) => {
|
|
1598
|
-
let
|
|
1599
|
-
const
|
|
1600
|
-
if (
|
|
1618
|
+
let i = n && !!Object.keys(n).length;
|
|
1619
|
+
const c = typeof n == "object" && "breakpoints" in n, d = rt(c);
|
|
1620
|
+
if (c && typeof n == "object" && typeof d == "number") {
|
|
1601
1621
|
const f = Object.assign({}, n.breakpoints), h = xn(Object.keys(f));
|
|
1602
|
-
|
|
1622
|
+
i = bn(d, h, f);
|
|
1603
1623
|
}
|
|
1604
|
-
const { breakpoints: o, text:
|
|
1624
|
+
const { breakpoints: o, text: a = "", component: u, ...l } = n;
|
|
1605
1625
|
return /* @__PURE__ */ s.jsx(Ee, { variant: "subtle", className: E("empty-state-box", e, r), children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1606
1626
|
t && /* @__PURE__ */ s.jsx(nt, { options: { forceBlock: !0 }, children: t }),
|
|
1607
|
-
|
|
1627
|
+
i && typeof n == "object" && (u || /* @__PURE__ */ s.jsx(
|
|
1608
1628
|
J,
|
|
1609
1629
|
{
|
|
1610
|
-
...
|
|
1630
|
+
...l,
|
|
1611
1631
|
variant: n.variant ? n.variant : "secondary",
|
|
1612
|
-
children:
|
|
1632
|
+
children: a
|
|
1613
1633
|
}
|
|
1614
1634
|
))
|
|
1615
1635
|
] }) });
|
|
1616
1636
|
};
|
|
1617
|
-
const
|
|
1637
|
+
const At = ({ children: e, ...t }) => /* @__PURE__ */ s.jsx("p", { ...t, children: e }), jn = { q: At, blockquote: At };
|
|
1618
1638
|
for (let e = 1; e <= 6; e++)
|
|
1619
|
-
jn[`h${e}`] = { component:
|
|
1639
|
+
jn[`h${e}`] = { component: At, props: { className: "title" } };
|
|
1620
1640
|
const zs = ({ type: e = "default", className: t = "", heading: n = !1, children: r }) => /* @__PURE__ */ s.jsxs("div", { className: E("helper-text-box text-small", e, t), children: [
|
|
1621
1641
|
n && /* @__PURE__ */ s.jsx("p", { className: "title", children: n }),
|
|
1622
1642
|
typeof r == "string" ? /* @__PURE__ */ s.jsx(
|
|
1623
1643
|
nt,
|
|
1624
1644
|
{
|
|
1625
1645
|
options: {
|
|
1626
|
-
wrapper:
|
|
1646
|
+
wrapper: N.Fragment,
|
|
1627
1647
|
forceBlock: !0,
|
|
1628
1648
|
overrides: jn
|
|
1629
1649
|
},
|
|
@@ -1631,8 +1651,8 @@ const zs = ({ type: e = "default", className: t = "", heading: n = !1, children:
|
|
|
1631
1651
|
}
|
|
1632
1652
|
) : /* @__PURE__ */ s.jsx("p", { children: r })
|
|
1633
1653
|
] });
|
|
1634
|
-
const xo = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
1635
|
-
const
|
|
1654
|
+
const xo = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children: i }) => {
|
|
1655
|
+
const c = A(), d = ne(null), [o, a] = F(""), [u, l] = F("closed");
|
|
1636
1656
|
X(() => {
|
|
1637
1657
|
const p = d.current;
|
|
1638
1658
|
if (p)
|
|
@@ -1644,21 +1664,21 @@ const xo = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1644
1664
|
return;
|
|
1645
1665
|
const p = r.split(`
|
|
1646
1666
|
`);
|
|
1647
|
-
|
|
1667
|
+
a(p.length < 3 ? `${r.substring(0, 400)}...` : p.slice(0, 3).join(`
|
|
1648
1668
|
`));
|
|
1649
1669
|
}, [r]), X(() => {
|
|
1650
|
-
|
|
1651
|
-
}, [
|
|
1670
|
+
u === "ready-to-close" && l("closing");
|
|
1671
|
+
}, [u]);
|
|
1652
1672
|
const f = ({ propertyName: p }) => {
|
|
1653
|
-
p === "max-height" &&
|
|
1673
|
+
p === "max-height" && l((_) => _ === "opening" ? "open" : _ === "closing" ? "closed" : _);
|
|
1654
1674
|
};
|
|
1655
1675
|
if (!r)
|
|
1656
1676
|
return null;
|
|
1657
|
-
const h = ["opening", "open"].includes(
|
|
1677
|
+
const h = ["opening", "open"].includes(u);
|
|
1658
1678
|
return /* @__PURE__ */ s.jsxs(Ee, { variant: "subtle", className: E("hide-show-text-box", e), children: [
|
|
1659
|
-
/* @__PURE__ */ s.jsxs("div", { ref: d, className: E("content",
|
|
1660
|
-
/* @__PURE__ */ s.jsx(nt, { options: { forceBlock: !0 }, children:
|
|
1661
|
-
|
|
1679
|
+
/* @__PURE__ */ s.jsxs("div", { ref: d, className: E("content", u), children: [
|
|
1680
|
+
/* @__PURE__ */ s.jsx(nt, { options: { forceBlock: !0 }, children: u === "closed" ? o : r }),
|
|
1681
|
+
u !== "closed" && i
|
|
1662
1682
|
] }),
|
|
1663
1683
|
/* @__PURE__ */ s.jsx("p", { className: "cta", children: /* @__PURE__ */ s.jsx(
|
|
1664
1684
|
J,
|
|
@@ -1668,24 +1688,24 @@ const xo = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1668
1688
|
styling: { muted: !0 },
|
|
1669
1689
|
className: E({ "rotate-180": h }),
|
|
1670
1690
|
onClick: () => {
|
|
1671
|
-
|
|
1691
|
+
l(h ? "ready-to-close" : "opening");
|
|
1672
1692
|
},
|
|
1673
|
-
children: h ? n ||
|
|
1693
|
+
children: h ? n || c.formatMessage({ id: "hideShowTextBox_hide" }) : t || c.formatMessage({ id: "hideShowTextBox_show" })
|
|
1674
1694
|
}
|
|
1675
1695
|
) })
|
|
1676
1696
|
] });
|
|
1677
|
-
}, Ws = () =>
|
|
1678
|
-
const t =
|
|
1697
|
+
}, Ws = () => N.Fragment, Vs = ({ children: e }) => /* @__PURE__ */ s.jsx(Ee, { variant: "secondary", children: e }), Ys = ["span", "strong", "h1", "h2", "h3", "h4", "h5", "h6", "p"], Gs = ({ children: e }) => {
|
|
1698
|
+
const t = A();
|
|
1679
1699
|
if (!e)
|
|
1680
1700
|
return null;
|
|
1681
1701
|
let n = t.formatMessage({ id: "markdown_collapsibleSection_summary" });
|
|
1682
1702
|
const r = [];
|
|
1683
|
-
for (const
|
|
1684
|
-
if (!(!
|
|
1685
|
-
if (
|
|
1686
|
-
if (
|
|
1687
|
-
for (const d of Mt.toArray(
|
|
1688
|
-
if (!(!d || typeof d == "string" || typeof d == "number") &&
|
|
1703
|
+
for (const c of Mt.toArray(e))
|
|
1704
|
+
if (!(!c || typeof c == "string" || typeof c == "number"))
|
|
1705
|
+
if (N.isValidElement(c) && c.type === "summary") {
|
|
1706
|
+
if (c.props && c.props.children) {
|
|
1707
|
+
for (const d of Mt.toArray(c.props.children))
|
|
1708
|
+
if (!(!d || typeof d == "string" || typeof d == "number") && N.isValidElement(d)) {
|
|
1689
1709
|
const o = d.type;
|
|
1690
1710
|
if (Ys.includes(o)) {
|
|
1691
1711
|
for (n = d.props.children; typeof n != "string" && (Array.isArray(n) && n[0].props && n[0].props.children && n[0].props.children[0]); )
|
|
@@ -1695,14 +1715,14 @@ const xo = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1695
1715
|
}
|
|
1696
1716
|
}
|
|
1697
1717
|
} else
|
|
1698
|
-
r.push(
|
|
1699
|
-
const
|
|
1718
|
+
r.push(c);
|
|
1719
|
+
const i = n ? n.toString() : "";
|
|
1700
1720
|
return /* @__PURE__ */ s.jsx(
|
|
1701
1721
|
kn,
|
|
1702
1722
|
{
|
|
1703
|
-
label:
|
|
1704
|
-
className: ["Sources", "Resources"].includes(
|
|
1705
|
-
children: r.map((
|
|
1723
|
+
label: i,
|
|
1724
|
+
className: ["Sources", "Resources"].includes(i) ? "discrete-links" : "",
|
|
1725
|
+
children: r.map((c) => c)
|
|
1706
1726
|
}
|
|
1707
1727
|
);
|
|
1708
1728
|
}, Js = ({ children: e, ...t }) => {
|
|
@@ -1720,11 +1740,11 @@ const xo = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1720
1740
|
}
|
|
1721
1741
|
return /* @__PURE__ */ s.jsx("div", { ...t, children: e });
|
|
1722
1742
|
}, Xs = (e) => {
|
|
1723
|
-
const t =
|
|
1743
|
+
const t = A(), n = Date.now().toString();
|
|
1724
1744
|
let r = "default";
|
|
1725
|
-
const
|
|
1726
|
-
return
|
|
1727
|
-
/* @__PURE__ */ s.jsx(
|
|
1745
|
+
const i = e.src;
|
|
1746
|
+
return i.includes("youtube") || i.includes("vimeo") ? r = "video" : i.includes("riddle") || i.includes("sli.do") ? r = "poll" : i.includes("padlet") && (r = "padlet"), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1747
|
+
/* @__PURE__ */ s.jsx(ce, { children: /* @__PURE__ */ s.jsx("a", { href: `#content-after-iframe-${n}`, children: t.formatMessage({ id: `markdown_skip${r === "default" ? "" : `_${r}`}` }) }) }),
|
|
1728
1748
|
/* @__PURE__ */ s.jsx("iframe", { ...e, title: t.formatMessage({ id: `markdown_iframe${r === "default" ? "" : `_${r}`}` }) }),
|
|
1729
1749
|
/* @__PURE__ */ s.jsx("span", { id: `content-after-iframe-${n}`, tabIndex: -1 })
|
|
1730
1750
|
] });
|
|
@@ -1734,23 +1754,23 @@ const xo = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1734
1754
|
}, Zs = ({ children: e, ...t }) => {
|
|
1735
1755
|
let n = { ...t };
|
|
1736
1756
|
t.href && (t.href.includes("http:") || t.href.includes("https:")) && !t.target && (n.target = "_blank");
|
|
1737
|
-
let r = e,
|
|
1738
|
-
for (const
|
|
1739
|
-
if (!(!
|
|
1740
|
-
const d =
|
|
1741
|
-
if (["button", "center", "span", "strong"].includes(d) &&
|
|
1742
|
-
for ((d === "button" || rn(
|
|
1757
|
+
let r = e, i = !1;
|
|
1758
|
+
for (const c of Mt.toArray(e))
|
|
1759
|
+
if (!(!c || typeof c == "string" || typeof c == "number") && N.isValidElement(c)) {
|
|
1760
|
+
const d = c.type;
|
|
1761
|
+
if (["button", "center", "span", "strong"].includes(d) && c.props && c.props.children && c.props.children[0])
|
|
1762
|
+
for ((d === "button" || rn(c.props.children[0]) === "button") && (i = !0), r = c.props.children[0]; r && typeof r != "string" && !(typeof r == "boolean" || typeof r == "number" || !N.isValidElement(r)); )
|
|
1743
1763
|
if (r.props && r.props.children && r.props.children[0])
|
|
1744
|
-
r = r.props.children[0], r && rn(r) === "button" && (
|
|
1764
|
+
r = r.props.children[0], r && rn(r) === "button" && (i = !0);
|
|
1745
1765
|
else
|
|
1746
1766
|
break;
|
|
1747
1767
|
}
|
|
1748
|
-
return
|
|
1768
|
+
return i ? (n = { ...n, className: "button primary medium" }, /* @__PURE__ */ s.jsx("p", { className: "center", children: /* @__PURE__ */ s.jsx(J, { variant: "primary", size: "medium", ...n, children: r }) })) : /* @__PURE__ */ s.jsx("a", { ...n, children: r });
|
|
1749
1769
|
}, Ks = ({ children: e }) => /* @__PURE__ */ s.jsx("span", { children: e });
|
|
1750
1770
|
const on = ({ className: e = "", options: t = {}, children: n }) => {
|
|
1751
1771
|
n = n.replace(/^<br\/?>/, "");
|
|
1752
1772
|
const r = {
|
|
1753
|
-
wrapper:
|
|
1773
|
+
wrapper: N.Fragment,
|
|
1754
1774
|
forceBlock: !0,
|
|
1755
1775
|
overrides: {
|
|
1756
1776
|
a: Zs,
|
|
@@ -1770,36 +1790,36 @@ const on = ({ className: e = "", options: t = {}, children: n }) => {
|
|
|
1770
1790
|
return /* @__PURE__ */ s.jsx("div", { className: E("markdown-text", e), children: /* @__PURE__ */ s.jsx(nt, { options: { ...r, ...t }, children: n }) });
|
|
1771
1791
|
};
|
|
1772
1792
|
const qs = ({ size: e = "medium", variant: t = "default", className: n = "", children: r }) => /* @__PURE__ */ s.jsx("span", { className: E("pill", e, t, n), children: r });
|
|
1773
|
-
const Pt = ({ element: e = "p", children: t = null, className: n = "", ...r }) =>
|
|
1793
|
+
const Pt = ({ element: e = "p", children: t = null, className: n = "", ...r }) => N.createElement(e, { ...r, className: E("status-banner text-small", n), "aria-live": "assertive" }, t);
|
|
1774
1794
|
const er = ({ progress: e = 0, text: t = !1, className: n = "" }) => {
|
|
1775
|
-
const r =
|
|
1776
|
-
return /* @__PURE__ */ s.jsx("span", { className: E(`progress-bar section-${
|
|
1777
|
-
}, tr =
|
|
1795
|
+
const r = A(), i = e > 75 ? 100 : e > 50 ? 75 : e > 25 ? 50 : e > 5 ? 25 : 0, c = { "--progress": `${e}%` };
|
|
1796
|
+
return /* @__PURE__ */ s.jsx("span", { className: E(`progress-bar section-${i}`, n), style: c, children: /* @__PURE__ */ s.jsx(ce, { children: t ? `${e} ${t}` : r.formatMessage({ id: "progressBar" }, { number: e }) }) });
|
|
1797
|
+
}, tr = Ne(er);
|
|
1778
1798
|
const _t = "loadingBlock_", nr = ({ progress: e = 0, steps: t = !1, className: n = "" }) => {
|
|
1779
|
-
const r =
|
|
1799
|
+
const r = A();
|
|
1780
1800
|
t || (t = {
|
|
1781
1801
|
0: { text: r.formatMessage({ id: `${_t}loading` }) },
|
|
1782
1802
|
75: { text: r.formatMessage({ id: `${_t}almostDone` }) },
|
|
1783
1803
|
100: { text: r.formatMessage({ id: `${_t}complete` }) }
|
|
1784
1804
|
});
|
|
1785
|
-
let
|
|
1786
|
-
const
|
|
1787
|
-
for (let o = 0; o <
|
|
1788
|
-
|
|
1789
|
-
const d =
|
|
1805
|
+
let i = null;
|
|
1806
|
+
const c = Object.keys(t);
|
|
1807
|
+
for (let o = 0; o < c.length && !(e < parseInt(c[o])); o++)
|
|
1808
|
+
i = c[o];
|
|
1809
|
+
const d = i && t[i].icon ? { "--icon": `url(${Nt}icons/${t[i].icon}.svg)` } : {};
|
|
1790
1810
|
return /* @__PURE__ */ s.jsxs(
|
|
1791
1811
|
Ee,
|
|
1792
1812
|
{
|
|
1793
|
-
className: E("loading-block", n, { "has-icon":
|
|
1813
|
+
className: E("loading-block", n, { "has-icon": i && t[i].icon }),
|
|
1794
1814
|
variant: "subtle",
|
|
1795
1815
|
style: d,
|
|
1796
1816
|
children: [
|
|
1797
|
-
|
|
1817
|
+
i && /* @__PURE__ */ s.jsx("span", { className: "step", children: t[i].text }),
|
|
1798
1818
|
/* @__PURE__ */ s.jsx(tr, { progress: e })
|
|
1799
1819
|
]
|
|
1800
1820
|
}
|
|
1801
1821
|
);
|
|
1802
|
-
}, bo =
|
|
1822
|
+
}, bo = Ne(nr);
|
|
1803
1823
|
const je = ({ element: e = "div", className: t = "", ...n }) => /* @__PURE__ */ s.jsx(gn, { element: e, className: E("loading-placeholder", t), ...n });
|
|
1804
1824
|
const Rt = {
|
|
1805
1825
|
header: ["logo", "link", "link", "search"],
|
|
@@ -1815,39 +1835,39 @@ const Rt = {
|
|
|
1815
1835
|
if (n === "")
|
|
1816
1836
|
return ze[0];
|
|
1817
1837
|
const r = n.charCodeAt(0) - 96;
|
|
1818
|
-
for (let
|
|
1819
|
-
if (r <= t * (
|
|
1820
|
-
return ze[
|
|
1838
|
+
for (let i = 0; i < ze.length; i++)
|
|
1839
|
+
if (r <= t * (i + 1))
|
|
1840
|
+
return ze[i];
|
|
1821
1841
|
};
|
|
1822
|
-
const an = 256, Ot = ({ className: e = "", src: t = "", name: n, alt: r, width:
|
|
1823
|
-
const [o,
|
|
1842
|
+
const an = 256, Ot = ({ className: e = "", src: t = "", name: n, alt: r, width: i = an, height: c = an, ...d }) => {
|
|
1843
|
+
const [o, a] = F(!1), u = ne(null);
|
|
1824
1844
|
X(() => {
|
|
1825
|
-
const f =
|
|
1845
|
+
const f = u.current;
|
|
1826
1846
|
if (!f)
|
|
1827
1847
|
return;
|
|
1828
1848
|
const h = f.getContext("2d");
|
|
1829
1849
|
if (!h)
|
|
1830
1850
|
return;
|
|
1831
|
-
const p =
|
|
1851
|
+
const p = i, _ = c;
|
|
1832
1852
|
typeof window < "u" && window.devicePixelRatio && (f.width = p * window.devicePixelRatio, f.height = _ * window.devicePixelRatio, h.scale(window.devicePixelRatio, window.devicePixelRatio)), h.fillStyle = rr(n), h.fillRect(0, 0, p, _), h.font = `${p / 3}px Arial`, h.textAlign = "center", h.fillStyle = "white", h.fillText(En(n), p / 2, _ / 1.6);
|
|
1833
1853
|
}, [n]);
|
|
1834
|
-
let
|
|
1835
|
-
return t && t !== "" && !o && (t.includes("http") || t.includes("//")) && (
|
|
1854
|
+
let l = !1;
|
|
1855
|
+
return t && t !== "" && !o && (t.includes("http") || t.includes("//")) && (l = !0), /* @__PURE__ */ s.jsx("figure", { className: E("profile-picture", e, { error: o }), ...d, children: l ? /* @__PURE__ */ s.jsx(
|
|
1836
1856
|
"img",
|
|
1837
1857
|
{
|
|
1838
1858
|
src: t,
|
|
1839
1859
|
alt: r || n,
|
|
1840
1860
|
onError: () => {
|
|
1841
|
-
|
|
1861
|
+
a(!0);
|
|
1842
1862
|
},
|
|
1843
|
-
width:
|
|
1844
|
-
height:
|
|
1863
|
+
width: i,
|
|
1864
|
+
height: c
|
|
1845
1865
|
}
|
|
1846
|
-
) : /* @__PURE__ */ s.jsx("canvas", { ref:
|
|
1866
|
+
) : /* @__PURE__ */ s.jsx("canvas", { ref: u }) });
|
|
1847
1867
|
}, Sn = (e) => e === "apolitical" ? {
|
|
1848
|
-
image: `${
|
|
1868
|
+
image: `${Nt}logos/member_apolitical.svg`
|
|
1849
1869
|
} : e === "community" || typeof e == "object" && !e.name ? {
|
|
1850
|
-
image: `${
|
|
1870
|
+
image: `${Nt}logos/member_community.svg`
|
|
1851
1871
|
} : {
|
|
1852
1872
|
name: e.name,
|
|
1853
1873
|
role: e.jobTitle || "",
|
|
@@ -1861,39 +1881,39 @@ const an = 256, Ot = ({ className: e = "", src: t = "", name: n, alt: r, width:
|
|
|
1861
1881
|
country: n = "",
|
|
1862
1882
|
maximumCharacters: r = 80
|
|
1863
1883
|
}) => {
|
|
1864
|
-
const
|
|
1865
|
-
if (!
|
|
1884
|
+
const i = e !== "", c = t !== "", d = n !== "";
|
|
1885
|
+
if (!i && !c && !d)
|
|
1866
1886
|
return "";
|
|
1867
|
-
const o = `${e}${
|
|
1868
|
-
let
|
|
1869
|
-
return
|
|
1887
|
+
const o = `${e}${i && c ? ` — ${t}` : t}`;
|
|
1888
|
+
let a = `${o}${(i || c) && d ? `, ${n}` : n}`;
|
|
1889
|
+
return a.length > r && (a = o), a.length > r && (a = tt(a, r)), a;
|
|
1870
1890
|
};
|
|
1871
1891
|
const Bt = ({
|
|
1872
1892
|
element: e = "div",
|
|
1873
1893
|
member: t = "community",
|
|
1874
1894
|
additionalContent: n = !1,
|
|
1875
1895
|
gtmContext: r = "member",
|
|
1876
|
-
gtmType:
|
|
1877
|
-
className:
|
|
1896
|
+
gtmType: i = "member-click",
|
|
1897
|
+
className: c = ""
|
|
1878
1898
|
}) => {
|
|
1879
|
-
const d =
|
|
1899
|
+
const d = A(), o = Sn(t);
|
|
1880
1900
|
o.name || (o.name = d.formatMessage({ id: `member_${typeof t == "string" ? t : "community"}` }));
|
|
1881
|
-
const { name:
|
|
1882
|
-
return
|
|
1883
|
-
className: E("member text-medium",
|
|
1901
|
+
const { name: a, url: u, image: l } = o, f = or(o), h = n && n.createdAt ? Cs(n.createdAt) : !1, p = n && n.createdAt ? Ms(n.createdAt) : "";
|
|
1902
|
+
return N.createElement(e, {
|
|
1903
|
+
className: E("member text-medium", c),
|
|
1884
1904
|
children: /* @__PURE__ */ s.jsxs(
|
|
1885
1905
|
at,
|
|
1886
1906
|
{
|
|
1887
|
-
href:
|
|
1888
|
-
gtmType:
|
|
1907
|
+
href: u,
|
|
1908
|
+
gtmType: i,
|
|
1889
1909
|
gtmContext: r,
|
|
1890
1910
|
onClick: (_) => {
|
|
1891
1911
|
_ == null || _.stopPropagation();
|
|
1892
1912
|
},
|
|
1893
1913
|
children: [
|
|
1894
|
-
/* @__PURE__ */ s.jsx(Ot, { name:
|
|
1914
|
+
/* @__PURE__ */ s.jsx(Ot, { name: a, src: l }),
|
|
1895
1915
|
/* @__PURE__ */ s.jsxs("p", { className: "details", children: [
|
|
1896
|
-
/* @__PURE__ */ s.jsx("strong", { children:
|
|
1916
|
+
/* @__PURE__ */ s.jsx("strong", { children: a }),
|
|
1897
1917
|
n && /* @__PURE__ */ s.jsxs("span", { className: "additional-content", children: [
|
|
1898
1918
|
n.createdAt && h && /* @__PURE__ */ s.jsx("span", { className: "date", title: p, "aria-label": p, children: d.formatMessage({ id: `dates_${h.path}` }, { number: h.number }) }),
|
|
1899
1919
|
n.didEdit && /* @__PURE__ */ s.jsx("em", { children: d.formatMessage({ id: "discussion_edited" }) })
|
|
@@ -1905,21 +1925,21 @@ const Bt = ({
|
|
|
1905
1925
|
)
|
|
1906
1926
|
});
|
|
1907
1927
|
};
|
|
1908
|
-
const
|
|
1928
|
+
const cn = {
|
|
1909
1929
|
small: 24,
|
|
1910
1930
|
medium: 48
|
|
1911
|
-
}, ar = ({ element: e = "div", contributors: { total: t, data: n } = { total: void 0, data: [] }, styling: { showText: r, size:
|
|
1912
|
-
const
|
|
1913
|
-
return !n || n.length === 0 ? null :
|
|
1931
|
+
}, ar = ({ element: e = "div", contributors: { total: t, data: n } = { total: void 0, data: [] }, styling: { showText: r, size: i, showGap: c, showPlaceholders: d } = { showText: !0, size: "medium", showGap: !0, showPlaceholders: !1 }, cutoff: o = 2, className: a = "" }) => {
|
|
1932
|
+
const u = A();
|
|
1933
|
+
return !n || n.length === 0 ? null : N.createElement(
|
|
1914
1934
|
e,
|
|
1915
|
-
{ className: E("contributors",
|
|
1916
|
-
/* @__PURE__ */ s.jsx("ul", { children: n.map((
|
|
1935
|
+
{ className: E("contributors", a, i, { "has-gap": c }), children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1936
|
+
/* @__PURE__ */ s.jsx("ul", { children: n.map((l, f) => {
|
|
1917
1937
|
let h, p = "";
|
|
1918
1938
|
if (f < o) {
|
|
1919
|
-
const { name: _ = "", image: j = "" } = Sn(
|
|
1939
|
+
const { name: _ = "", image: j = "" } = Sn(l);
|
|
1920
1940
|
if (d)
|
|
1921
1941
|
return /* @__PURE__ */ s.jsx(je, { element: "li", className: "contributor" }, f);
|
|
1922
|
-
h = /* @__PURE__ */ s.jsx(Ot, { name: _, src: j, width:
|
|
1942
|
+
h = /* @__PURE__ */ s.jsx(Ot, { name: _, src: j, width: cn[i || "medium"], height: cn[i || "medium"] });
|
|
1923
1943
|
} else if (f === o) {
|
|
1924
1944
|
const _ = (t || n.length) - o;
|
|
1925
1945
|
h = /* @__PURE__ */ s.jsxs("small", { className: E({ "large-number": _ > 99 }), children: [
|
|
@@ -1929,7 +1949,7 @@ const ln = {
|
|
|
1929
1949
|
}
|
|
1930
1950
|
return h ? /* @__PURE__ */ s.jsx("li", { className: E("contributor", p), children: h }, f) : null;
|
|
1931
1951
|
}) }),
|
|
1932
|
-
r && /* @__PURE__ */ s.jsx("span", { className: "label", children: typeof r == "string" ? r : n.length === 1 ? typeof n[0] == "string" ?
|
|
1952
|
+
r && /* @__PURE__ */ s.jsx("span", { className: "label", children: typeof r == "string" ? r : n.length === 1 ? typeof n[0] == "string" ? u.formatMessage({ id: `member_${n[0]}` }) : tt(n[0].name || "", 20) : null })
|
|
1933
1953
|
] }) }
|
|
1934
1954
|
);
|
|
1935
1955
|
}, ir = ({ showDevTools: e = !0, children: t }) => {
|
|
@@ -1949,15 +1969,15 @@ const ln = {
|
|
|
1949
1969
|
e && /* @__PURE__ */ s.jsx(ms, { initialIsOpen: !1 })
|
|
1950
1970
|
] });
|
|
1951
1971
|
};
|
|
1952
|
-
var
|
|
1953
|
-
function
|
|
1954
|
-
var t = e.children, n = e.client, r = e.apiKey,
|
|
1955
|
-
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 &&
|
|
1972
|
+
var cr = Ft({ client: Xe });
|
|
1973
|
+
function lr(e) {
|
|
1974
|
+
var t = e.children, n = e.client, r = e.apiKey, i = e.options, c = et(function() {
|
|
1975
|
+
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 && i && 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 && (Xe.__loaded && console.warn("[PostHog.js] was already loaded elsewhere. This may cause issues."), Xe.init(r, i)), Xe);
|
|
1956
1976
|
}, [n, r]);
|
|
1957
|
-
return
|
|
1977
|
+
return N.createElement(cr.Provider, { value: { client: c } }, t);
|
|
1958
1978
|
}
|
|
1959
1979
|
const dr = ({ children: e, user: t }) => t.isLoading ? /* @__PURE__ */ s.jsx(s.Fragment, {}) : process.env.REACT_APP_PUBLIC_POSTHOG_KEY ? /* @__PURE__ */ s.jsx(
|
|
1960
|
-
|
|
1980
|
+
lr,
|
|
1961
1981
|
{
|
|
1962
1982
|
apiKey: atob(process.env.REACT_APP_PUBLIC_POSTHOG_KEY),
|
|
1963
1983
|
options: {
|
|
@@ -1973,45 +1993,45 @@ const dr = ({ children: e, user: t }) => t.isLoading ? /* @__PURE__ */ s.jsx(s.F
|
|
|
1973
1993
|
children: e
|
|
1974
1994
|
}
|
|
1975
1995
|
) : e, ur = ({ children: e, locale: t, messages: n }) => {
|
|
1976
|
-
const r = t || "en",
|
|
1996
|
+
const r = t || "en", i = {
|
|
1977
1997
|
...Rs[r],
|
|
1978
1998
|
...n || {}
|
|
1979
1999
|
};
|
|
1980
|
-
return /* @__PURE__ */ s.jsx(
|
|
2000
|
+
return /* @__PURE__ */ s.jsx(cs, { locale: r, messages: i, children: e });
|
|
1981
2001
|
}, Se = Ft(null), mr = ({ children: e, user: t }) => /* @__PURE__ */ s.jsx(Se.Provider, { value: t, children: e }), vo = ({ bootstrap: e, children: t, intl: n }) => {
|
|
1982
|
-
const [r,
|
|
2002
|
+
const [r, i] = F({ isLoading: !0 });
|
|
1983
2003
|
return X(() => {
|
|
1984
|
-
e().then((
|
|
2004
|
+
e().then((c) => i({ ...c, isLoading: !1 })).catch(() => i({ isLoading: !1 }));
|
|
1985
2005
|
}, []), /* @__PURE__ */ s.jsx(ur, { locale: n == null ? void 0 : n.locale, messages: n == null ? void 0 : n.messages, children: /* @__PURE__ */ s.jsx(mr, { user: r, children: /* @__PURE__ */ s.jsx(ir, { children: /* @__PURE__ */ s.jsx(dr, { user: r, children: t }) }) }) });
|
|
1986
2006
|
};
|
|
1987
2007
|
const xt = "joinCommunityButton", Tn = ({ isMember: e = !1, isShort: t = !1, functions: { join: n, leave: r } = { join: () => {
|
|
1988
2008
|
}, leave: () => {
|
|
1989
2009
|
} } }) => {
|
|
1990
|
-
const
|
|
2010
|
+
const i = A(), c = ge(Se), d = c && typeof c.id == "string", [o, a] = F(e), [u, l] = F(e ? "joined" : "notJoined");
|
|
1991
2011
|
X(() => {
|
|
1992
|
-
|
|
2012
|
+
u === "joining" ? l("joined") : u === "leaving" && l("notJoined");
|
|
1993
2013
|
}, [o]);
|
|
1994
2014
|
const f = {}, h = {};
|
|
1995
|
-
return o &&
|
|
2015
|
+
return o && u !== "leaving" && (f["data-hover-text"] = i.formatMessage({ id: `${xt}_leave` }), f["aria-label"] = i.formatMessage({ id: `${xt}_member_aria` }), h["aria-hidden"] = "true"), /* @__PURE__ */ s.jsx(
|
|
1996
2016
|
J,
|
|
1997
2017
|
{
|
|
1998
2018
|
variant: o ? "secondary" : "primary",
|
|
1999
2019
|
size: "medium",
|
|
2000
2020
|
styling: { fullWidth: !0 },
|
|
2001
|
-
icon: o &&
|
|
2021
|
+
icon: o && u !== "leaving" ? { icon: "tick", position: "left" } : !1,
|
|
2002
2022
|
onClick: async (p) => {
|
|
2003
|
-
d && (p.currentTarget.blur(), o ? (
|
|
2023
|
+
d && (p.currentTarget.blur(), o ? (l("leaving"), typeof r == "function" && await r()) : (l("joining"), typeof n == "function" && await n()), a(!o));
|
|
2004
2024
|
},
|
|
2005
|
-
className: E("join-community-button",
|
|
2025
|
+
className: E("join-community-button", u, { active: u === "joining" }),
|
|
2006
2026
|
disabled: !d,
|
|
2007
2027
|
...f,
|
|
2008
|
-
children: /* @__PURE__ */ s.jsx("span", { className: "text", ...h, children:
|
|
2028
|
+
children: /* @__PURE__ */ s.jsx("span", { className: "text", ...h, children: i.formatMessage({ id: `${xt}${["joining", "leaving"].includes(u) ? `_${u}` : o ? "_member" : t ? "_short" : ""}` }) })
|
|
2009
2029
|
}
|
|
2010
2030
|
);
|
|
2011
2031
|
};
|
|
2012
|
-
const bt = "communityDetails_", wo = ({ isMember: e = !1, slug: t, members: { number: n, data: r } = { number: void 0, data: [] }, className:
|
|
2013
|
-
const d =
|
|
2014
|
-
return /* @__PURE__ */ s.jsxs("div", { className: E("community-details",
|
|
2032
|
+
const bt = "communityDetails_", wo = ({ isMember: e = !1, slug: t, members: { number: n, data: r } = { number: void 0, data: [] }, className: i = "", ...c }) => {
|
|
2033
|
+
const d = A(), o = n || (r == null ? void 0 : r.length) || 0;
|
|
2034
|
+
return /* @__PURE__ */ s.jsxs("div", { className: E("community-details", i), children: [
|
|
2015
2035
|
/* @__PURE__ */ s.jsx(De, {}),
|
|
2016
2036
|
/* @__PURE__ */ s.jsxs("div", { className: "member-details", children: [
|
|
2017
2037
|
/* @__PURE__ */ s.jsxs("div", { className: "top", children: [
|
|
@@ -2023,7 +2043,7 @@ const bt = "communityDetails_", wo = ({ isMember: e = !1, slug: t, members: { nu
|
|
|
2023
2043
|
] }),
|
|
2024
2044
|
/* @__PURE__ */ s.jsx(ar, { contributors: { total: n, data: r != null && r.length ? r : [{}, {}, {}, {}, {}] }, styling: { size: "medium", showGap: !0, showPlaceholders: o === 0 }, cutoff: 5 })
|
|
2025
2045
|
] }),
|
|
2026
|
-
/* @__PURE__ */ s.jsx(Tn, { isMember: e, ...
|
|
2046
|
+
/* @__PURE__ */ s.jsx(Tn, { isMember: e, ...c }),
|
|
2027
2047
|
e && /* @__PURE__ */ s.jsx(J, { variant: "primary", icon: { icon: "plus" }, styling: { fullWidth: !0 }, children: d.formatMessage({ id: `${bt}invite` }) })
|
|
2028
2048
|
] });
|
|
2029
2049
|
};
|
|
@@ -2032,13 +2052,13 @@ const ko = ({
|
|
|
2032
2052
|
cutoff: t = 20,
|
|
2033
2053
|
className: n = ""
|
|
2034
2054
|
}) => {
|
|
2035
|
-
const r =
|
|
2055
|
+
const r = A();
|
|
2036
2056
|
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2037
|
-
/* @__PURE__ */ s.jsx(
|
|
2038
|
-
/* @__PURE__ */ s.jsx("ul", { className: E("breadcrumbs text-small", n), children: e.map(({ text:
|
|
2039
|
-
d && /* @__PURE__ */ s.jsx(
|
|
2040
|
-
/* @__PURE__ */ s.jsx(at, { href: d ? void 0 :
|
|
2041
|
-
] }, `${window.btoa(
|
|
2057
|
+
/* @__PURE__ */ s.jsx(ce, { element: "p", children: r.formatMessage({ id: "breadcrumbs_label" }) }),
|
|
2058
|
+
/* @__PURE__ */ s.jsx("ul", { className: E("breadcrumbs text-small", n), children: e.map(({ text: i, href: c, current: d = !1 }, o) => /* @__PURE__ */ s.jsxs("li", { children: [
|
|
2059
|
+
d && /* @__PURE__ */ s.jsx(ce, { element: "span", children: r.formatMessage({ id: "breadcrumbs_currentPage" }) }),
|
|
2060
|
+
/* @__PURE__ */ s.jsx(at, { href: d ? void 0 : c, children: tt(i, t) })
|
|
2061
|
+
] }, `${window.btoa(i)}_${o}`)) })
|
|
2042
2062
|
] });
|
|
2043
2063
|
};
|
|
2044
2064
|
const jo = ({
|
|
@@ -2047,34 +2067,34 @@ const jo = ({
|
|
|
2047
2067
|
allowMultiple: n = !0,
|
|
2048
2068
|
onChange: r = () => {
|
|
2049
2069
|
},
|
|
2050
|
-
className:
|
|
2070
|
+
className: i = ""
|
|
2051
2071
|
}) => {
|
|
2052
|
-
const
|
|
2072
|
+
const c = A(), d = t ? [{ id: "all", text: typeof t != "boolean" && t.text || c.formatMessage({ id: "filters_all" }) }, ...e] : e, [o, a] = F(t ? ["all"] : []), u = (l, f) => {
|
|
2053
2073
|
let h = [];
|
|
2054
|
-
o.includes(
|
|
2074
|
+
o.includes(l) ? h = o.filter((p) => p !== l) : l === "all" ? h = ["all"] : n ? h = [...o.filter((p) => p !== "all"), l] : h = [l], a((p) => (r && typeof r == "function" && r({ current: h, previous: p }), h)), f && typeof f == "function" && f();
|
|
2055
2075
|
};
|
|
2056
|
-
return /* @__PURE__ */ s.jsx("ul", { className: E("filters",
|
|
2076
|
+
return /* @__PURE__ */ s.jsx("ul", { className: E("filters", i), children: d.map(({ id: l, text: f, disabled: h = !1, callback: p = () => {
|
|
2057
2077
|
} }) => {
|
|
2058
2078
|
let _ = {};
|
|
2059
|
-
return h && (_ = { disabled: !0, "aria-label":
|
|
2079
|
+
return h && (_ = { disabled: !0, "aria-label": c.formatMessage({ id: "filters_disabled" }, { name: f }) }), /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
|
|
2060
2080
|
"button",
|
|
2061
2081
|
{
|
|
2062
|
-
className: E(
|
|
2082
|
+
className: E(l, { selected: o.includes(l) }),
|
|
2063
2083
|
onClick: (j) => {
|
|
2064
|
-
j.preventDefault(), j.stopPropagation(),
|
|
2084
|
+
j.preventDefault(), j.stopPropagation(), u(l, p);
|
|
2065
2085
|
},
|
|
2066
2086
|
..._,
|
|
2067
2087
|
children: f
|
|
2068
2088
|
}
|
|
2069
|
-
) },
|
|
2089
|
+
) }, l);
|
|
2070
2090
|
}) });
|
|
2071
2091
|
}, fr = (e, t) => {
|
|
2072
2092
|
const n = String(e);
|
|
2073
2093
|
if (!t || !t.length)
|
|
2074
2094
|
return `/${n}`;
|
|
2075
2095
|
let r = "";
|
|
2076
|
-
return t.forEach(({ url:
|
|
2077
|
-
|
|
2096
|
+
return t.forEach(({ url: i, position: c }) => {
|
|
2097
|
+
c === "before-lang" ? r += `/${i}` : (r.includes(`/${n}/`) || (r += `/${n}`), r += `/${i}`);
|
|
2078
2098
|
}), r.includes(`/${n}/`) || (r += `/${n}`), r;
|
|
2079
2099
|
};
|
|
2080
2100
|
const vt = { en: "English", es: "Español", fr: "Français", pt: "Português" }, We = "languageSwitcher_", yo = ({
|
|
@@ -2082,41 +2102,41 @@ const vt = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2082
2102
|
isOriginalLanguage: t = !1,
|
|
2083
2103
|
isHumanTranslation: n = !1,
|
|
2084
2104
|
translations: r,
|
|
2085
|
-
onChange:
|
|
2105
|
+
onChange: i = () => {
|
|
2086
2106
|
},
|
|
2087
|
-
urlParts:
|
|
2107
|
+
urlParts: c,
|
|
2088
2108
|
variant: d = "default",
|
|
2089
2109
|
label: o,
|
|
2090
|
-
className:
|
|
2110
|
+
className: a = ""
|
|
2091
2111
|
}) => {
|
|
2092
|
-
const
|
|
2112
|
+
const u = A(), [l, f] = F(e);
|
|
2093
2113
|
if (X(() => {
|
|
2094
|
-
e !==
|
|
2114
|
+
e !== l && f(e);
|
|
2095
2115
|
}, [e]), !r || !Object.values(r).some((j) => j && j.post_name))
|
|
2096
2116
|
return null;
|
|
2097
|
-
const p = Object.keys(r), _ =
|
|
2098
|
-
return /* @__PURE__ */ s.jsxs("div", { className: E("language-switcher text-small", d,
|
|
2117
|
+
const p = Object.keys(r), _ = l !== e;
|
|
2118
|
+
return /* @__PURE__ */ s.jsxs("div", { className: E("language-switcher text-small", d, a), children: [
|
|
2099
2119
|
/* @__PURE__ */ s.jsxs("nav", { children: [
|
|
2100
|
-
d !== "short" && /* @__PURE__ */ s.jsx("p", { children: o ||
|
|
2120
|
+
d !== "short" && /* @__PURE__ */ s.jsx("p", { children: o || u.formatMessage({ id: `${We}label` }) }),
|
|
2101
2121
|
/* @__PURE__ */ s.jsx("ul", { children: p.map((j) => {
|
|
2102
2122
|
if (!vt[j])
|
|
2103
2123
|
return null;
|
|
2104
2124
|
let g = { className: j };
|
|
2105
|
-
return
|
|
2125
|
+
return l === j ? g["aria-label"] = u.formatMessage({ id: `${We}selected` }, { language: vt[j] }) : g = {
|
|
2106
2126
|
...g,
|
|
2107
|
-
href: fr(j,
|
|
2127
|
+
href: fr(j, c),
|
|
2108
2128
|
onClick: (S) => {
|
|
2109
|
-
S.preventDefault(), S.stopPropagation(), f(j),
|
|
2129
|
+
S.preventDefault(), S.stopPropagation(), f(j), i(j);
|
|
2110
2130
|
}
|
|
2111
2131
|
}, /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(at, { ...g, fallbackElement: "span", children: vt[j] }) }, j);
|
|
2112
2132
|
}) }),
|
|
2113
|
-
d !== "short" && !_ && /* @__PURE__ */ s.jsx("p", { children:
|
|
2133
|
+
d !== "short" && !_ && /* @__PURE__ */ s.jsx("p", { children: u.formatMessage({ id: `${We}translation_${t ? "original" : n ? "human" : "machine"}` }) })
|
|
2114
2134
|
] }),
|
|
2115
2135
|
d !== "short" && !_ && !t && !n && /* @__PURE__ */ s.jsx("small", {
|
|
2116
2136
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2117
2137
|
// @ts-ignore
|
|
2118
2138
|
// `values` are throwing a type error: https://github.com/formatjs/formatjs/issues/3633
|
|
2119
|
-
children:
|
|
2139
|
+
children: u.formatMessage({ id: `${We}disclaimer` }, {
|
|
2120
2140
|
email: Oe.support,
|
|
2121
2141
|
link: (j) => {
|
|
2122
2142
|
const g = `mailto:${j}`;
|
|
@@ -2126,14 +2146,14 @@ const vt = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2126
2146
|
})
|
|
2127
2147
|
] });
|
|
2128
2148
|
};
|
|
2129
|
-
const wt =
|
|
2149
|
+
const wt = ls({ locale: "en", messages: Lt }), hr = ({
|
|
2130
2150
|
page: e = 1,
|
|
2131
2151
|
length: t = 0,
|
|
2132
2152
|
limit: n = 10,
|
|
2133
2153
|
loadNextPage: r = () => {
|
|
2134
2154
|
},
|
|
2135
|
-
icon:
|
|
2136
|
-
messages:
|
|
2155
|
+
icon: i = !1,
|
|
2156
|
+
messages: c = {
|
|
2137
2157
|
button: wt.formatMessage({ id: "loadMore_button" }),
|
|
2138
2158
|
endOfFeed: wt.formatMessage({ id: "loadMore_endOfFeed" }),
|
|
2139
2159
|
error: wt.formatMessage({ id: "loadMore_error" })
|
|
@@ -2141,42 +2161,42 @@ const wt = cs({ locale: "en", messages: Lt }), hr = ({
|
|
|
2141
2161
|
className: d = "",
|
|
2142
2162
|
gtmContext: o = "LoadMore"
|
|
2143
2163
|
}) => {
|
|
2144
|
-
const [
|
|
2164
|
+
const [a, u] = F(!1), [l, f] = F(!1);
|
|
2145
2165
|
if (t <= 0 || t < n * e)
|
|
2146
2166
|
return null;
|
|
2147
2167
|
const h = async (p) => {
|
|
2148
2168
|
try {
|
|
2149
2169
|
await r(p);
|
|
2150
2170
|
} catch (_) {
|
|
2151
|
-
_ instanceof Error && _.message && _.message.includes("Cannot read items") ? f(!0) :
|
|
2171
|
+
_ instanceof Error && _.message && _.message.includes("Cannot read items") ? f(!0) : u(!0);
|
|
2152
2172
|
}
|
|
2153
2173
|
};
|
|
2154
2174
|
return /* @__PURE__ */ s.jsxs("footer", { className: E("load-more", d), children: [
|
|
2155
|
-
|
|
2156
|
-
|
|
2175
|
+
a && /* @__PURE__ */ s.jsx("p", { className: "error", children: c.error }),
|
|
2176
|
+
l ? /* @__PURE__ */ s.jsx("p", { children: c.endOfFeed }) : /* @__PURE__ */ s.jsx(
|
|
2157
2177
|
J,
|
|
2158
2178
|
{
|
|
2159
2179
|
variant: "secondary",
|
|
2160
|
-
icon:
|
|
2180
|
+
icon: i,
|
|
2161
2181
|
onClick: h,
|
|
2162
2182
|
"data-gtm-event-context": o,
|
|
2163
2183
|
"data-gtm-event-type": "load-more-click",
|
|
2164
2184
|
className: "gtm-trackable",
|
|
2165
2185
|
"data-testid": "load-more-button",
|
|
2166
|
-
children:
|
|
2186
|
+
children: c.button
|
|
2167
2187
|
}
|
|
2168
2188
|
)
|
|
2169
2189
|
] });
|
|
2170
2190
|
};
|
|
2171
2191
|
let Ve = !1;
|
|
2172
2192
|
const pr = ({ element: e = "div", id: t = "more-menu", options: n, className: r = "" }) => {
|
|
2173
|
-
const
|
|
2174
|
-
|
|
2193
|
+
const i = A(), c = ne(null), [d, o] = F(!1), a = (u) => {
|
|
2194
|
+
c.current && u.target instanceof HTMLElement && !c.current.contains(u.target) && o(!1);
|
|
2175
2195
|
};
|
|
2176
|
-
return X(() => (document.addEventListener("click",
|
|
2177
|
-
document.removeEventListener("click",
|
|
2178
|
-
})),
|
|
2179
|
-
ref:
|
|
2196
|
+
return X(() => (document.addEventListener("click", a, !0), () => {
|
|
2197
|
+
document.removeEventListener("click", a, !0);
|
|
2198
|
+
})), N.createElement(e, {
|
|
2199
|
+
ref: c,
|
|
2180
2200
|
className: E("more-menu text-medium", r),
|
|
2181
2201
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2182
2202
|
/* @__PURE__ */ s.jsx(
|
|
@@ -2189,14 +2209,14 @@ const pr = ({ element: e = "div", id: t = "more-menu", options: n, className: r
|
|
|
2189
2209
|
"aria-haspopup": "true",
|
|
2190
2210
|
"aria-expanded": d,
|
|
2191
2211
|
"aria-controls": t,
|
|
2192
|
-
screenreaderText:
|
|
2212
|
+
screenreaderText: i.formatMessage({ id: "moreMenu" })
|
|
2193
2213
|
}
|
|
2194
2214
|
),
|
|
2195
|
-
/* @__PURE__ */ s.jsx("ul", { id: t, hidden: !d, children: n.map(({ href:
|
|
2215
|
+
/* @__PURE__ */ s.jsx("ul", { id: t, hidden: !d, children: n.map(({ href: u, onClick: l, text: f, icon: h, ...p }, _) => {
|
|
2196
2216
|
const j = {
|
|
2197
2217
|
...p,
|
|
2198
2218
|
onClick: (g) => {
|
|
2199
|
-
o(!1), typeof
|
|
2219
|
+
o(!1), typeof l == "function" && l(g);
|
|
2200
2220
|
},
|
|
2201
2221
|
onFocus: () => {
|
|
2202
2222
|
Ve && (clearTimeout(Ve), Ve = !1);
|
|
@@ -2207,7 +2227,7 @@ const pr = ({ element: e = "div", id: t = "more-menu", options: n, className: r
|
|
|
2207
2227
|
}, 100);
|
|
2208
2228
|
}
|
|
2209
2229
|
};
|
|
2210
|
-
return
|
|
2230
|
+
return u && (j.href = u), /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
|
|
2211
2231
|
J,
|
|
2212
2232
|
{
|
|
2213
2233
|
variant: "tertiary",
|
|
@@ -2221,59 +2241,59 @@ const pr = ({ element: e = "div", id: t = "more-menu", options: n, className: r
|
|
|
2221
2241
|
] })
|
|
2222
2242
|
});
|
|
2223
2243
|
};
|
|
2224
|
-
const $n = ({ variant: e = "default", version: t = "default", className: n = "", ...r }) => /* @__PURE__ */ s.jsx("p", { className: "logo-wrapper", children: /* @__PURE__ */ s.jsx("a", { href: "/home/", className: E("logo", e, t, n), ...r, children: /* @__PURE__ */ s.jsx(
|
|
2244
|
+
const $n = ({ variant: e = "default", version: t = "default", className: n = "", ...r }) => /* @__PURE__ */ s.jsx("p", { className: "logo-wrapper", children: /* @__PURE__ */ s.jsx("a", { href: "/home/", className: E("logo", e, t, n), ...r, children: /* @__PURE__ */ s.jsx(ce, { children: /* @__PURE__ */ s.jsx(ye, { id: "apolitical" }) }) }) });
|
|
2225
2245
|
const gr = {
|
|
2226
2246
|
"2-1": 901
|
|
2227
2247
|
}, Eo = ({ layout: e = "2-1", hideOnMobile: t = !1, className: n = "", children: r }) => {
|
|
2228
|
-
const
|
|
2229
|
-
let
|
|
2230
|
-
return
|
|
2248
|
+
const i = rt(!0);
|
|
2249
|
+
let c = r;
|
|
2250
|
+
return N.Children.count(r) === 1 && (c = N.Children.toArray(r)[0], c.props && (c = c.props.children)), /* @__PURE__ */ s.jsx("section", { className: E("columns", `layout-${e}`, n), children: N.Children.map(c, (d, o) => t !== !1 && o === t && i && i < gr[e] ? null : d) });
|
|
2231
2251
|
};
|
|
2232
2252
|
const kt = "cookieBanner_", jt = ["apol-cookie-banner", "apolitical-performance-cookie-consent", "functional-cookie-consent"], yt = new Date(Date.now() + 12 * 30 * 24 * 60 * 60 * 1e3), _r = () => {
|
|
2233
|
-
const e =
|
|
2234
|
-
jt.forEach((
|
|
2235
|
-
n(
|
|
2253
|
+
const e = A(), [t, n, r] = fs(jt), [i, c] = F(!t["apol-cookie-banner"]), d = () => {
|
|
2254
|
+
jt.forEach((l) => {
|
|
2255
|
+
n(l, !0, {
|
|
2236
2256
|
path: "/",
|
|
2237
2257
|
expires: yt,
|
|
2238
|
-
domain:
|
|
2258
|
+
domain: l === "apolitical-performance-cookie-consent" ? ".apolitical.co" : void 0
|
|
2239
2259
|
});
|
|
2240
|
-
}),
|
|
2260
|
+
}), c(!1), window.location.reload();
|
|
2241
2261
|
}, o = () => {
|
|
2242
2262
|
n("apol-cookie-banner", !0, {
|
|
2243
2263
|
path: "/",
|
|
2244
2264
|
expires: yt
|
|
2245
|
-
}), jt.forEach((
|
|
2246
|
-
if (
|
|
2247
|
-
n(
|
|
2265
|
+
}), jt.forEach((l) => {
|
|
2266
|
+
if (l === "apol-cookie-banner") {
|
|
2267
|
+
n(l, !0, {
|
|
2248
2268
|
path: "/",
|
|
2249
2269
|
expires: yt
|
|
2250
2270
|
});
|
|
2251
2271
|
return;
|
|
2252
2272
|
}
|
|
2253
|
-
r(
|
|
2254
|
-
}),
|
|
2273
|
+
r(l);
|
|
2274
|
+
}), c(!1);
|
|
2255
2275
|
};
|
|
2256
|
-
if (!
|
|
2276
|
+
if (!i)
|
|
2257
2277
|
return null;
|
|
2258
|
-
const
|
|
2278
|
+
const a = [
|
|
2259
2279
|
{ id: "settings", href: "/pages/cookie-policy", gtmType: "policy-page" },
|
|
2260
2280
|
{ id: "reject", onClick: o, gtmType: "reject-all" },
|
|
2261
2281
|
{ id: "accept", onClick: d, gtmType: "accepted-all" }
|
|
2262
|
-
],
|
|
2263
|
-
return
|
|
2264
|
-
|
|
2265
|
-
variant:
|
|
2266
|
-
href:
|
|
2267
|
-
onClick:
|
|
2282
|
+
], u = [];
|
|
2283
|
+
return a.forEach((l) => {
|
|
2284
|
+
u.push({
|
|
2285
|
+
variant: l.href ? "tertiary" : "primary",
|
|
2286
|
+
href: l.href,
|
|
2287
|
+
onClick: l.onClick,
|
|
2268
2288
|
className: "gtm-trackable",
|
|
2269
2289
|
"data-gtm-event-context": "cookie-banner",
|
|
2270
|
-
"data-gtm-event-type": `cookie-${
|
|
2271
|
-
children: e.formatMessage({ id: `${kt}buttons_${
|
|
2290
|
+
"data-gtm-event-type": `cookie-${l.gtmType}-click`,
|
|
2291
|
+
children: e.formatMessage({ id: `${kt}buttons_${l.id}` })
|
|
2272
2292
|
});
|
|
2273
2293
|
}), /* @__PURE__ */ s.jsxs("aside", { id: "cookie-banner", className: "text-medium", children: [
|
|
2274
2294
|
/* @__PURE__ */ s.jsx("h6", { children: e.formatMessage({ id: `${kt}title` }) }),
|
|
2275
2295
|
/* @__PURE__ */ s.jsx("p", { children: e.formatMessage({ id: `${kt}text` }) }),
|
|
2276
|
-
/* @__PURE__ */ s.jsx(ot, { buttons:
|
|
2296
|
+
/* @__PURE__ */ s.jsx(ot, { buttons: u })
|
|
2277
2297
|
] });
|
|
2278
2298
|
}, we = {
|
|
2279
2299
|
platform: {
|
|
@@ -2369,7 +2389,7 @@ const kt = "cookieBanner_", jt = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2369
2389
|
facebook: { href: "https://www.facebook.com/apoliticalco" }
|
|
2370
2390
|
}
|
|
2371
2391
|
};
|
|
2372
|
-
const Me = "footer_", Ze = "SiteFooter",
|
|
2392
|
+
const Me = "footer_", Ze = "SiteFooter", ln = ({ group: e }) => {
|
|
2373
2393
|
const t = we[e].order || [];
|
|
2374
2394
|
let n = !1;
|
|
2375
2395
|
return "text" in we[e] && (n = we[e].text), /* @__PURE__ */ s.jsxs(Ct, { children: [
|
|
@@ -2377,14 +2397,14 @@ const Me = "footer_", Ze = "SiteFooter", cn = ({ group: e }) => {
|
|
|
2377
2397
|
Array.isArray(t) && t.length > 0 && /* @__PURE__ */ s.jsx("ul", { className: "text-medium", children: t.map((r) => {
|
|
2378
2398
|
if (["order", "child", "text"].includes(r))
|
|
2379
2399
|
return null;
|
|
2380
|
-
const { href:
|
|
2400
|
+
const { href: i, gtmType: c } = we[e][r], d = {};
|
|
2381
2401
|
return ["legal"].includes(e) && (d.target = "_blank", d.rel = "noopener"), /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
|
|
2382
2402
|
"a",
|
|
2383
2403
|
{
|
|
2384
|
-
href:
|
|
2404
|
+
href: i,
|
|
2385
2405
|
className: "gtm-trackable",
|
|
2386
2406
|
"data-gtm-event-context": Ze,
|
|
2387
|
-
"data-gtm-event-type":
|
|
2407
|
+
"data-gtm-event-type": c,
|
|
2388
2408
|
...d,
|
|
2389
2409
|
children: /* @__PURE__ */ s.jsx(ye, { id: `${Me}${e}_${r}` })
|
|
2390
2410
|
}
|
|
@@ -2420,8 +2440,8 @@ const Me = "footer_", Ze = "SiteFooter", cn = ({ group: e }) => {
|
|
|
2420
2440
|
}
|
|
2421
2441
|
),
|
|
2422
2442
|
/* @__PURE__ */ s.jsx("footer", { children: ["platform", "community", "company", "contact"].map((e) => /* @__PURE__ */ s.jsxs("div", { className: "group", children: [
|
|
2423
|
-
/* @__PURE__ */ s.jsx(
|
|
2424
|
-
Object.keys(we[e]).includes("child") && /* @__PURE__ */ s.jsx(
|
|
2443
|
+
/* @__PURE__ */ s.jsx(ln, { group: e }),
|
|
2444
|
+
Object.keys(we[e]).includes("child") && /* @__PURE__ */ s.jsx(ln, { group: we[e].child })
|
|
2425
2445
|
] }, e)) }),
|
|
2426
2446
|
/* @__PURE__ */ s.jsx("hr", {}),
|
|
2427
2447
|
/* @__PURE__ */ s.jsxs("div", { className: "sub-footer", children: [
|
|
@@ -2444,7 +2464,7 @@ const Me = "footer_", Ze = "SiteFooter", cn = ({ group: e }) => {
|
|
|
2444
2464
|
] })
|
|
2445
2465
|
] }) });
|
|
2446
2466
|
const Ye = "emailHelperTextBox_", So = ({ type: e, email: t, redirectPath: n, resendVerificationCode: r }) => {
|
|
2447
|
-
const
|
|
2467
|
+
const i = A(), [c, d] = F({ path: `${Ye}default`, type: "default", link: {}, mail: {}, error: "" }), [o, a] = F(!1), u = ke(
|
|
2448
2468
|
(p) => {
|
|
2449
2469
|
p.preventDefault(), p.stopPropagation();
|
|
2450
2470
|
const _ = (j) => {
|
|
@@ -2455,7 +2475,7 @@ const Ye = "emailHelperTextBox_", So = ({ type: e, email: t, redirectPath: n, re
|
|
|
2455
2475
|
"data-gtm-event-context": "VerifyEmailBox",
|
|
2456
2476
|
"data-gtm-event-type": "SendEmailClick",
|
|
2457
2477
|
className: "gtm-trackable",
|
|
2458
|
-
onClick: (g) =>
|
|
2478
|
+
onClick: (g) => u(g),
|
|
2459
2479
|
href: "#",
|
|
2460
2480
|
"data-testid": "send-verify-email-click"
|
|
2461
2481
|
},
|
|
@@ -2469,15 +2489,15 @@ const Ye = "emailHelperTextBox_", So = ({ type: e, email: t, redirectPath: n, re
|
|
|
2469
2489
|
});
|
|
2470
2490
|
};
|
|
2471
2491
|
if (typeof r != "function") {
|
|
2472
|
-
_(
|
|
2492
|
+
_(i.formatMessage({ id: `${Ye}error_noFunction` }));
|
|
2473
2493
|
return;
|
|
2474
2494
|
}
|
|
2475
|
-
|
|
2495
|
+
a(!0), r(t).then(() => {
|
|
2476
2496
|
localStorage.setItem("email", t), window.location.href = n || "/signup/verify-email";
|
|
2477
2497
|
}).catch((j) => {
|
|
2478
2498
|
_(j.message);
|
|
2479
2499
|
}).finally(() => {
|
|
2480
|
-
|
|
2500
|
+
a(!1);
|
|
2481
2501
|
});
|
|
2482
2502
|
},
|
|
2483
2503
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
@@ -2511,7 +2531,7 @@ const Ye = "emailHelperTextBox_", So = ({ type: e, email: t, redirectPath: n, re
|
|
|
2511
2531
|
"data-gtm-event-context": "VerifyEmailBox",
|
|
2512
2532
|
"data-gtm-event-type": "SendEmailClick",
|
|
2513
2533
|
className: "gtm-trackable",
|
|
2514
|
-
onClick: (S) =>
|
|
2534
|
+
onClick: (S) => u(S),
|
|
2515
2535
|
"data-testid": "send-verify-email-click"
|
|
2516
2536
|
};
|
|
2517
2537
|
break;
|
|
@@ -2535,80 +2555,80 @@ const Ye = "emailHelperTextBox_", So = ({ type: e, email: t, redirectPath: n, re
|
|
|
2535
2555
|
};
|
|
2536
2556
|
break;
|
|
2537
2557
|
}
|
|
2538
|
-
d({ ...
|
|
2558
|
+
d({ ...c, path: p, type: _, link: j, mail: g });
|
|
2539
2559
|
},
|
|
2540
2560
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
2541
2561
|
[e]
|
|
2542
2562
|
);
|
|
2543
|
-
const
|
|
2563
|
+
const l = {};
|
|
2544
2564
|
return ["link", "mail"].forEach((p) => {
|
|
2545
|
-
|
|
2546
|
-
}), /* @__PURE__ */ s.jsx(zs, { type:
|
|
2565
|
+
l[p] = Object.keys(c[p]).length ? (_) => /* @__PURE__ */ s.jsx("a", { ...c[p], children: _ }) : (_) => _;
|
|
2566
|
+
}), /* @__PURE__ */ s.jsx(zs, { type: c.type, heading: o ? !1 : i.formatMessage({ id: `${c.path}_title` }), children: o ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2547
2567
|
/* @__PURE__ */ s.jsx(je, { element: "span" }),
|
|
2548
2568
|
/* @__PURE__ */ s.jsx(je, { element: "span" })
|
|
2549
2569
|
] }) : (
|
|
2550
2570
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2551
2571
|
// @ts-ignore
|
|
2552
2572
|
// `values` are throwing a type error: https://github.com/formatjs/formatjs/issues/3633
|
|
2553
|
-
|
|
2554
|
-
{ id: `${
|
|
2573
|
+
i.formatMessage(
|
|
2574
|
+
{ id: `${c.path}_text` },
|
|
2555
2575
|
{
|
|
2556
|
-
...
|
|
2576
|
+
...l,
|
|
2557
2577
|
strong: (p) => /* @__PURE__ */ s.jsx("strong", { children: p }),
|
|
2558
2578
|
em: (p) => /* @__PURE__ */ s.jsx("em", { children: p }),
|
|
2559
2579
|
br: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2560
2580
|
/* @__PURE__ */ s.jsx("br", {}),
|
|
2561
2581
|
/* @__PURE__ */ s.jsx("br", {})
|
|
2562
2582
|
] }),
|
|
2563
|
-
error:
|
|
2583
|
+
error: c.error
|
|
2564
2584
|
}
|
|
2565
2585
|
)
|
|
2566
2586
|
) });
|
|
2567
2587
|
};
|
|
2568
|
-
const Ge = "passwordRules_", Cn = "isMoreThanEightCharacters", Dn = "includesNumberAndSymbol",
|
|
2588
|
+
const Ge = "passwordRules_", Cn = "isMoreThanEightCharacters", Dn = "includesNumberAndSymbol", Nn = "includesLowerAndUppercase", xr = {
|
|
2569
2589
|
[Cn]: "8Characters",
|
|
2570
2590
|
[Dn]: "numberSymbol",
|
|
2571
|
-
[
|
|
2591
|
+
[Nn]: "lowercaseUppercase"
|
|
2572
2592
|
}, br = ({ matchingRules: e = { isMoreThanEightCharacters: !1, includesNumberAndSymbol: !1, includesLowerAndUppercase: !1 }, className: t = "" }) => {
|
|
2573
|
-
const n =
|
|
2593
|
+
const n = A();
|
|
2574
2594
|
return /* @__PURE__ */ s.jsxs("aside", { className: E("password-rules", t), children: [
|
|
2575
2595
|
/* @__PURE__ */ s.jsx("small", { children: n.formatMessage({ id: `${Ge}intro` }) }),
|
|
2576
|
-
/* @__PURE__ */ s.jsx("ul", { children: [Cn, Dn,
|
|
2577
|
-
/* @__PURE__ */ s.jsxs(
|
|
2596
|
+
/* @__PURE__ */ s.jsx("ul", { children: [Cn, Dn, Nn].map((r) => /* @__PURE__ */ s.jsxs("li", { className: E({ matches: e[r] }), children: [
|
|
2597
|
+
/* @__PURE__ */ s.jsxs(ce, { children: [
|
|
2578
2598
|
n.formatMessage({ id: `${Ge}rule_label` }),
|
|
2579
2599
|
" "
|
|
2580
2600
|
] }),
|
|
2581
2601
|
/* @__PURE__ */ s.jsx("span", { children: n.formatMessage({ id: `${Ge}rule_${xr[r]}` }) }),
|
|
2582
|
-
!e[r] && /* @__PURE__ */ s.jsxs(
|
|
2602
|
+
!e[r] && /* @__PURE__ */ s.jsxs(ce, { element: "strong", children: [
|
|
2583
2603
|
" ",
|
|
2584
2604
|
" ",
|
|
2585
2605
|
n.formatMessage({ id: `${Ge}notMet` })
|
|
2586
2606
|
] })
|
|
2587
2607
|
] }, `rule-${r}`)) })
|
|
2588
2608
|
] });
|
|
2589
|
-
}, To =
|
|
2609
|
+
}, To = Ne(br);
|
|
2590
2610
|
const $o = ({
|
|
2591
2611
|
text: e = {},
|
|
2592
2612
|
topRating: t = 5,
|
|
2593
2613
|
functions: { createRating: n = () => null, updateRating: r = () => {
|
|
2594
|
-
}, reportError:
|
|
2614
|
+
}, reportError: i = () => {
|
|
2595
2615
|
} },
|
|
2596
|
-
className:
|
|
2616
|
+
className: c = "",
|
|
2597
2617
|
hasLoaded: d = !1
|
|
2598
2618
|
}) => {
|
|
2599
|
-
const o =
|
|
2619
|
+
const o = A(), [a, u] = F({ setUp: !1, id: null, rating: null, disabled: !0 }), l = async () => {
|
|
2600
2620
|
try {
|
|
2601
2621
|
const S = await n();
|
|
2602
|
-
|
|
2622
|
+
u((k) => ({ ...k, setUp: !0, id: S && S.id, disabled: !1 }));
|
|
2603
2623
|
} catch (S) {
|
|
2604
|
-
|
|
2624
|
+
u((k) => ({ ...k, setUp: !0, disabled: !0 })), i(S);
|
|
2605
2625
|
}
|
|
2606
2626
|
};
|
|
2607
2627
|
if (X(() => {
|
|
2608
|
-
d && !
|
|
2628
|
+
d && !a.setUp && l();
|
|
2609
2629
|
}, [d]), !d)
|
|
2610
2630
|
return /* @__PURE__ */ s.jsx(je, { className: "rating-placeholder" });
|
|
2611
|
-
const { id: f, rating: h, disabled: p } =
|
|
2631
|
+
const { id: f, rating: h, disabled: p } = a, _ = "ratings_", j = {
|
|
2612
2632
|
text: o.formatMessage({ id: `${_}text` }),
|
|
2613
2633
|
low: o.formatMessage({ id: `${_}low` }),
|
|
2614
2634
|
high: o.formatMessage({ id: `${_}high` }),
|
|
@@ -2617,14 +2637,14 @@ const $o = ({
|
|
|
2617
2637
|
}, g = async (S) => {
|
|
2618
2638
|
if (!(!f || p))
|
|
2619
2639
|
try {
|
|
2620
|
-
|
|
2640
|
+
u((k) => ({ ...k, rating: S, disabled: !0 })), await r({ id: f, value: S });
|
|
2621
2641
|
} catch (k) {
|
|
2622
|
-
|
|
2642
|
+
u((T) => ({ ...T, rating: null })), i(k);
|
|
2623
2643
|
} finally {
|
|
2624
|
-
|
|
2644
|
+
u((k) => ({ ...k, disabled: !1 }));
|
|
2625
2645
|
}
|
|
2626
2646
|
};
|
|
2627
|
-
return /* @__PURE__ */ s.jsxs("div", { className: E("rating",
|
|
2647
|
+
return /* @__PURE__ */ s.jsxs("div", { className: E("rating", c), children: [
|
|
2628
2648
|
/* @__PURE__ */ s.jsx("span", { className: "label", children: j[h ? "success" : "text"] }),
|
|
2629
2649
|
/* @__PURE__ */ s.jsx("ol", { children: Array.from(new Array(t).keys()).map((S) => {
|
|
2630
2650
|
const k = S + 1;
|
|
@@ -2652,36 +2672,36 @@ const vr = ({
|
|
|
2652
2672
|
className: t = "",
|
|
2653
2673
|
handleToggle: n = !1,
|
|
2654
2674
|
defaultValue: r = "",
|
|
2655
|
-
gtmContext:
|
|
2656
|
-
gtmEvent:
|
|
2675
|
+
gtmContext: i = "search-bar",
|
|
2676
|
+
gtmEvent: c = "form-submission"
|
|
2657
2677
|
}) => {
|
|
2658
|
-
const { searchIsOpen: d = !0, isDesktopVersion: o = !1 } = n || {},
|
|
2678
|
+
const { searchIsOpen: d = !0, isDesktopVersion: o = !1 } = n || {}, a = A(), u = ne(null);
|
|
2659
2679
|
Ce(() => {
|
|
2660
|
-
!n || o || !d ||
|
|
2680
|
+
!n || o || !d || u.current && u.current.focus();
|
|
2661
2681
|
}, [d]);
|
|
2662
|
-
const
|
|
2663
|
-
f.preventDefault(), f.stopPropagation(), !(!
|
|
2682
|
+
const l = (f) => {
|
|
2683
|
+
f.preventDefault(), f.stopPropagation(), !(!u.current || !u.current.value || u.current.value.length < 1) && (window.location.href = `/search?search=${encodeURIComponent(u.current.value)}`);
|
|
2664
2684
|
};
|
|
2665
2685
|
return /* @__PURE__ */ s.jsx(
|
|
2666
2686
|
"form",
|
|
2667
2687
|
{
|
|
2668
|
-
onSubmit:
|
|
2688
|
+
onSubmit: l,
|
|
2669
2689
|
className: E("search-form gtm-trackable", t),
|
|
2670
|
-
"data-gtm-event-context":
|
|
2671
|
-
"data-gtm-event-type":
|
|
2690
|
+
"data-gtm-event-context": i,
|
|
2691
|
+
"data-gtm-event-type": c,
|
|
2672
2692
|
children: /* @__PURE__ */ s.jsx("fieldset", { id: `${e}-form`, hidden: n ? !d : !1, role: "search", children: /* @__PURE__ */ s.jsxs("p", { children: [
|
|
2673
|
-
/* @__PURE__ */ s.jsx(
|
|
2693
|
+
/* @__PURE__ */ s.jsx(ce, { element: "label", htmlFor: e, children: a.formatMessage({ id: "search_label" }) }),
|
|
2674
2694
|
/* @__PURE__ */ s.jsx(
|
|
2675
2695
|
"input",
|
|
2676
2696
|
{
|
|
2677
|
-
ref:
|
|
2697
|
+
ref: u,
|
|
2678
2698
|
type: "search",
|
|
2679
2699
|
id: e,
|
|
2680
2700
|
name: e,
|
|
2681
2701
|
defaultValue: r,
|
|
2682
|
-
placeholder:
|
|
2702
|
+
placeholder: a.formatMessage({ id: "search_placeholder" }),
|
|
2683
2703
|
onKeyDown: (f) => {
|
|
2684
|
-
f.key === "Enter" &&
|
|
2704
|
+
f.key === "Enter" && l(f);
|
|
2685
2705
|
}
|
|
2686
2706
|
}
|
|
2687
2707
|
),
|
|
@@ -2690,12 +2710,12 @@ const vr = ({
|
|
|
2690
2710
|
{
|
|
2691
2711
|
className: "clear",
|
|
2692
2712
|
onClick: (f) => {
|
|
2693
|
-
f.preventDefault(), f.stopPropagation(),
|
|
2713
|
+
f.preventDefault(), f.stopPropagation(), u.current && u.current.value && (u.current.value = "");
|
|
2694
2714
|
},
|
|
2695
|
-
children: /* @__PURE__ */ s.jsx(
|
|
2715
|
+
children: /* @__PURE__ */ s.jsx(ce, { children: a.formatMessage({ id: "search_clear" }) })
|
|
2696
2716
|
}
|
|
2697
2717
|
),
|
|
2698
|
-
/* @__PURE__ */ s.jsx("button", { className: "search", onClick:
|
|
2718
|
+
/* @__PURE__ */ s.jsx("button", { className: "search", onClick: l, children: /* @__PURE__ */ s.jsx(ce, { children: a.formatMessage({ id: "search_cta" }) }) })
|
|
2699
2719
|
] }) })
|
|
2700
2720
|
}
|
|
2701
2721
|
);
|
|
@@ -2705,18 +2725,18 @@ const wr = ({
|
|
|
2705
2725
|
label: t,
|
|
2706
2726
|
ctaMessage: n,
|
|
2707
2727
|
titleColor: r,
|
|
2708
|
-
labelColor:
|
|
2709
|
-
backgroundColor:
|
|
2728
|
+
labelColor: i,
|
|
2729
|
+
backgroundColor: c,
|
|
2710
2730
|
onClose: d,
|
|
2711
2731
|
reportError: o,
|
|
2712
|
-
sendInvites:
|
|
2713
|
-
initialFormStatus:
|
|
2732
|
+
sendInvites: a,
|
|
2733
|
+
initialFormStatus: u = "NOT_SUBMITTED"
|
|
2714
2734
|
/* NOT_SUBMITTED */
|
|
2715
2735
|
}) => {
|
|
2716
|
-
const [
|
|
2736
|
+
const [l, f] = F([]), [h, p] = F(!0), [_, j] = F(u), { formatMessage: g } = A(), S = async (M) => {
|
|
2717
2737
|
M.preventDefault();
|
|
2718
2738
|
try {
|
|
2719
|
-
await
|
|
2739
|
+
await a(l), f([]), j(
|
|
2720
2740
|
"SUCCESS"
|
|
2721
2741
|
/* SUCCESS */
|
|
2722
2742
|
);
|
|
@@ -2737,7 +2757,7 @@ const wr = ({
|
|
|
2737
2757
|
/* CLOSED */
|
|
2738
2758
|
);
|
|
2739
2759
|
};
|
|
2740
|
-
return _ === "CLOSED" ? null : _ === "ERROR" || _ === "SUCCESS" ? /* @__PURE__ */ s.jsxs(
|
|
2760
|
+
return _ === "CLOSED" ? null : _ === "ERROR" || _ === "SUCCESS" ? /* @__PURE__ */ s.jsxs("div", { className: "invite-form-wrapper", children: [
|
|
2741
2761
|
/* @__PURE__ */ s.jsx("div", { className: "content centred", children: _ === "SUCCESS" ? /* @__PURE__ */ s.jsx("h2", { className: "success-title", children: g({ id: "inviteForm_success" }) }) : /* @__PURE__ */ s.jsxs("h2", { className: "error-title", children: [
|
|
2742
2762
|
" ",
|
|
2743
2763
|
g({ id: "inviteForm_error" })
|
|
@@ -2747,23 +2767,23 @@ const wr = ({
|
|
|
2747
2767
|
/* @__PURE__ */ s.jsx(J, { variant: "secondary", onClick: k, children: g({ id: "inviteForm_ctaSendMoreInvites" }) }),
|
|
2748
2768
|
/* @__PURE__ */ s.jsx(J, { onClick: T, children: g({ id: "inviteForm_ctaDone" }) })
|
|
2749
2769
|
] }) : /* @__PURE__ */ s.jsx(J, { onClick: k, children: g({ id: "inviteForm_ctaTryAgain" }) }) })
|
|
2750
|
-
] }) : /* @__PURE__ */ s.jsxs(
|
|
2770
|
+
] }) : /* @__PURE__ */ s.jsx("div", { className: "invite-form-wrapper", children: /* @__PURE__ */ s.jsxs(
|
|
2751
2771
|
"form",
|
|
2752
2772
|
{
|
|
2753
|
-
style: { backgroundColor:
|
|
2773
|
+
style: { backgroundColor: c },
|
|
2754
2774
|
onSubmit: S,
|
|
2755
2775
|
className: E("invite-form gtm-trackable"),
|
|
2756
2776
|
children: [
|
|
2757
2777
|
/* @__PURE__ */ s.jsxs("fieldset", { className: "content", children: [
|
|
2758
2778
|
/* @__PURE__ */ s.jsx("h2", { className: "title", style: { color: r }, children: e }),
|
|
2759
|
-
/* @__PURE__ */ s.jsx("label", { htmlFor: "email-input", className: "label", style: { color:
|
|
2779
|
+
/* @__PURE__ */ s.jsx("label", { htmlFor: "email-input", className: "label", style: { color: i }, children: t }),
|
|
2760
2780
|
/* @__PURE__ */ s.jsx(
|
|
2761
2781
|
ps,
|
|
2762
2782
|
{
|
|
2763
2783
|
id: "email-input",
|
|
2764
2784
|
inputClassName: "email-input input",
|
|
2765
2785
|
placeholder: g({ id: "inviteForm_email_placeholder" }),
|
|
2766
|
-
emails:
|
|
2786
|
+
emails: l,
|
|
2767
2787
|
onChange: (M) => {
|
|
2768
2788
|
f(M), p(!M.length);
|
|
2769
2789
|
},
|
|
@@ -2777,7 +2797,7 @@ const wr = ({
|
|
|
2777
2797
|
size: "small",
|
|
2778
2798
|
icon: { icon: "close" },
|
|
2779
2799
|
onClick: () => {
|
|
2780
|
-
I(C), p(!
|
|
2800
|
+
I(C), p(!l.length);
|
|
2781
2801
|
},
|
|
2782
2802
|
className: "remove-email-button",
|
|
2783
2803
|
screenreaderText: g({ id: "overlay_close" })
|
|
@@ -2791,7 +2811,7 @@ const wr = ({
|
|
|
2791
2811
|
/* @__PURE__ */ s.jsx("fieldset", { className: "footer", children: /* @__PURE__ */ s.jsx(J, { className: "sendEmailsButton", disabled: h, children: n }) })
|
|
2792
2812
|
]
|
|
2793
2813
|
}
|
|
2794
|
-
);
|
|
2814
|
+
) });
|
|
2795
2815
|
}, H = {
|
|
2796
2816
|
timeouts: {},
|
|
2797
2817
|
handlerCalled: {},
|
|
@@ -2799,29 +2819,29 @@ const wr = ({
|
|
|
2799
2819
|
const n = {
|
|
2800
2820
|
navigation: { loggedIn: 769, loggedOut: 881 },
|
|
2801
2821
|
search: { loggedIn: 961, loggedOut: 1121 }
|
|
2802
|
-
}, r = (
|
|
2822
|
+
}, r = (c) => {
|
|
2803
2823
|
const d = `logged${e ? "In" : "Out"}`;
|
|
2804
|
-
return t >= n[
|
|
2824
|
+
return t >= n[c][d];
|
|
2805
2825
|
};
|
|
2806
|
-
let
|
|
2807
|
-
return ["navigation", "search"].forEach((
|
|
2808
|
-
|
|
2809
|
-
}),
|
|
2826
|
+
let i = {};
|
|
2827
|
+
return ["navigation", "search"].forEach((c) => {
|
|
2828
|
+
i[c] = r(c);
|
|
2829
|
+
}), i;
|
|
2810
2830
|
},
|
|
2811
2831
|
shouldChangeHeaderIsVisible: (e, t, n) => {
|
|
2812
|
-
Object.values(t).filter((
|
|
2832
|
+
Object.values(t).filter((i) => i === !0).length || n([{ type: "headerIsVisible", value: e }]);
|
|
2813
2833
|
},
|
|
2814
2834
|
handleMenus: ({ id: e, value: t, menus: n, dispatch: r }) => {
|
|
2815
2835
|
if (n[e] === t || e === "account" && t === !1 && n.navigation === !0)
|
|
2816
2836
|
return;
|
|
2817
|
-
const
|
|
2818
|
-
if (!t && H.handlerCalled[e] &&
|
|
2837
|
+
const i = Date.now();
|
|
2838
|
+
if (!t && H.handlerCalled[e] && i - H.handlerCalled[e] < 500)
|
|
2819
2839
|
return;
|
|
2820
|
-
H.handlerCalled[e] =
|
|
2821
|
-
let
|
|
2840
|
+
H.handlerCalled[e] = i;
|
|
2841
|
+
let c = [{ type: `menus.${e}`, value: t }];
|
|
2822
2842
|
t === !0 && Object.keys(n).forEach((d) => {
|
|
2823
|
-
d === e || n[d] === !1 ||
|
|
2824
|
-
}), r(
|
|
2843
|
+
d === e || n[d] === !1 || c.push({ type: `menus.${d}`, value: !1 });
|
|
2844
|
+
}), r(c);
|
|
2825
2845
|
},
|
|
2826
2846
|
// Find the first child inside a ref that matches the `key` (and optional `value`) we're looking for,
|
|
2827
2847
|
// so we can automatically focus on the first link inside a menu for accessibility.
|
|
@@ -2838,30 +2858,30 @@ const wr = ({
|
|
|
2838
2858
|
return e[r];
|
|
2839
2859
|
if (!t.includes("."))
|
|
2840
2860
|
continue;
|
|
2841
|
-
const
|
|
2842
|
-
if (!(typeof
|
|
2861
|
+
const i = hn(e[r], t);
|
|
2862
|
+
if (!(typeof i > "u") && (!n || i[t] && i[t].includes(n) || i.value && i.value.includes(n) || i.toString().includes(n)))
|
|
2843
2863
|
return e[r];
|
|
2844
2864
|
}
|
|
2845
2865
|
return e[0].children ? H.findFirstChild(e[0].children, t, n) : !1;
|
|
2846
2866
|
},
|
|
2847
|
-
autoFocus: ({ menu: e, navigationRef: t, isDesktopVersion: n, focusElements: r, dispatch:
|
|
2867
|
+
autoFocus: ({ menu: e, navigationRef: t, isDesktopVersion: n, focusElements: r, dispatch: i }) => {
|
|
2848
2868
|
if (!t.current || !t.current.children)
|
|
2849
2869
|
return;
|
|
2850
|
-
const
|
|
2851
|
-
if (r[e][
|
|
2852
|
-
r[e][
|
|
2870
|
+
const c = n ? "desktop" : "default";
|
|
2871
|
+
if (r[e][c]) {
|
|
2872
|
+
r[e][c].focus();
|
|
2853
2873
|
return;
|
|
2854
2874
|
}
|
|
2855
2875
|
let d, o;
|
|
2856
2876
|
switch (e) {
|
|
2857
2877
|
case "navigation":
|
|
2858
2878
|
if (n) {
|
|
2859
|
-
const
|
|
2879
|
+
const a = H.findFirstChild(
|
|
2860
2880
|
t.current.children,
|
|
2861
2881
|
"attributes.aria-controls",
|
|
2862
2882
|
"navigation"
|
|
2863
2883
|
);
|
|
2864
|
-
d = H.findFirstChild(
|
|
2884
|
+
d = H.findFirstChild(a.children, "href");
|
|
2865
2885
|
} else
|
|
2866
2886
|
d = H.findFirstChild(t.current.children, "href");
|
|
2867
2887
|
d || (d = t.current);
|
|
@@ -2874,7 +2894,7 @@ const wr = ({
|
|
|
2874
2894
|
default:
|
|
2875
2895
|
return;
|
|
2876
2896
|
}
|
|
2877
|
-
d && (
|
|
2897
|
+
d && (i([{ type: `focusElements.${e}.${c}`, value: d }]), d.focus());
|
|
2878
2898
|
},
|
|
2879
2899
|
events: {
|
|
2880
2900
|
onClick: (e, { id: t, callback: n, isOpen: r }) => {
|
|
@@ -2973,14 +2993,14 @@ const wr = ({
|
|
|
2973
2993
|
isLoggedIn: t = !1,
|
|
2974
2994
|
isDesktopVersion: n = !1,
|
|
2975
2995
|
menus: r = {},
|
|
2976
|
-
callback:
|
|
2996
|
+
callback: i = () => {
|
|
2977
2997
|
},
|
|
2978
|
-
doTrack:
|
|
2998
|
+
doTrack: c = null
|
|
2979
2999
|
}) => {
|
|
2980
|
-
const d =
|
|
3000
|
+
const d = A(), o = hn(Ke, e);
|
|
2981
3001
|
if (!o || o.onlyShow && (o.onlyShow === "logged-in" && !t || o.onlyShow === "logged-out" && t))
|
|
2982
3002
|
return null;
|
|
2983
|
-
const
|
|
3003
|
+
const a = "doTrack" in o, u = c === null ? a ? o.doTrack : !0 : c, l = e.includes("buttons.");
|
|
2984
3004
|
let f = `header_${e.replaceAll(".", "_")}`;
|
|
2985
3005
|
o.hasVariantText && (f += `_logged${t ? "In" : "Out"}`);
|
|
2986
3006
|
let h = !1;
|
|
@@ -2993,12 +3013,12 @@ const wr = ({
|
|
|
2993
3013
|
h = {
|
|
2994
3014
|
href: o.href,
|
|
2995
3015
|
role: "menuitem"
|
|
2996
|
-
},
|
|
3016
|
+
}, u && (h = {
|
|
2997
3017
|
...h,
|
|
2998
3018
|
className: "gtm-trackable",
|
|
2999
3019
|
"data-gtm-event-type": k,
|
|
3000
3020
|
"data-gtm-event-context": "HeaderButtons"
|
|
3001
|
-
}),
|
|
3021
|
+
}), l && (h = {
|
|
3002
3022
|
...h,
|
|
3003
3023
|
variant: "secondary",
|
|
3004
3024
|
size: { mobile: "small", 881: "large" },
|
|
@@ -3009,16 +3029,16 @@ const wr = ({
|
|
|
3009
3029
|
let g = {}, S = {};
|
|
3010
3030
|
if (p) {
|
|
3011
3031
|
const k = o.menuId || e, T = {
|
|
3012
|
-
onClick: (M) => H.events.onClick(M, { id: k, callback:
|
|
3032
|
+
onClick: (M) => H.events.onClick(M, { id: k, callback: i, isOpen: r[k] }),
|
|
3013
3033
|
onFocus: () => H.events.onFocus({ id: k }),
|
|
3014
|
-
onBlur: () => H.events.onBlur({ id: k, callback:
|
|
3015
|
-
onMouseLeave: () => H.events.onBlur({ id: k, callback:
|
|
3016
|
-
onMouseEnter: () => H.events.onMouseEnter({ id: k, callback:
|
|
3034
|
+
onBlur: () => H.events.onBlur({ id: k, callback: i }),
|
|
3035
|
+
onMouseLeave: () => H.events.onBlur({ id: k, callback: i }),
|
|
3036
|
+
onMouseEnter: () => H.events.onMouseEnter({ id: k, callback: i })
|
|
3017
3037
|
};
|
|
3018
3038
|
n && (_ && (g = {
|
|
3019
3039
|
...T,
|
|
3020
3040
|
onKeyPress: (M) => {
|
|
3021
|
-
M.key === "Enter" && H.events.onClick(M, { id: k, callback:
|
|
3041
|
+
M.key === "Enter" && H.events.onClick(M, { id: k, callback: i, isOpen: r[k] });
|
|
3022
3042
|
},
|
|
3023
3043
|
tabIndex: "0",
|
|
3024
3044
|
// Add a `tabIndex` so keyboard users can focus on the `li`
|
|
@@ -3031,7 +3051,7 @@ const wr = ({
|
|
|
3031
3051
|
});
|
|
3032
3052
|
}
|
|
3033
3053
|
return /* @__PURE__ */ s.jsxs("li", { className: E({ [o.className]: o.className, "has-submenu": p, parent: _, active: j }), role: "none", ...g, children: [
|
|
3034
|
-
h ?
|
|
3054
|
+
h ? N.createElement(l ? J : "a", h, d.formatMessage({ id: f })) : d.formatMessage({ id: f }),
|
|
3035
3055
|
o.order && /* @__PURE__ */ s.jsx("ul", { ...S, children: o.order.map((k) => {
|
|
3036
3056
|
if (!o[k])
|
|
3037
3057
|
return null;
|
|
@@ -3039,8 +3059,8 @@ const wr = ({
|
|
|
3039
3059
|
isLoggedIn: t,
|
|
3040
3060
|
isDesktopVersion: n,
|
|
3041
3061
|
menus: r,
|
|
3042
|
-
callback:
|
|
3043
|
-
doTrack:
|
|
3062
|
+
callback: i,
|
|
3063
|
+
doTrack: a ? u : null
|
|
3044
3064
|
};
|
|
3045
3065
|
return o[k].order ? /* @__PURE__ */ s.jsxs("li", { className: E({ [o[k].className]: o[k].className }), children: [
|
|
3046
3066
|
d.formatMessage({ id: `${f}_${k}` }),
|
|
@@ -3049,65 +3069,65 @@ const wr = ({
|
|
|
3049
3069
|
}) })
|
|
3050
3070
|
] }, e);
|
|
3051
3071
|
};
|
|
3052
|
-
const kr = { height: 67, height_desktop: 83 },
|
|
3053
|
-
const e =
|
|
3072
|
+
const kr = { height: 67, height_desktop: 83 }, An = () => {
|
|
3073
|
+
const e = A(), t = ge(Se), n = rt(!0, !0), r = t && typeof t.id == "string", i = et(
|
|
3054
3074
|
() => H.getIsDesktopVersion(r, n),
|
|
3055
3075
|
[r, n]
|
|
3056
|
-
), [
|
|
3076
|
+
), [c, d] = rs($s, {
|
|
3057
3077
|
headerIsVisible: !0,
|
|
3058
3078
|
menus: { navigation: !1, search: !1, account: !1 },
|
|
3059
3079
|
focusElements: {
|
|
3060
3080
|
navigation: { desktop: !1, default: !1 },
|
|
3061
3081
|
account: { desktop: !1, default: !1 }
|
|
3062
3082
|
}
|
|
3063
|
-
}), { headerIsVisible: o, menus:
|
|
3083
|
+
}), { headerIsVisible: o, menus: a, focusElements: u } = c;
|
|
3064
3084
|
Ts({
|
|
3065
|
-
scrollPosition: kr[`height${
|
|
3085
|
+
scrollPosition: kr[`height${i.navigation ? "_desktop" : ""}`],
|
|
3066
3086
|
callbacks: {
|
|
3067
3087
|
scrollUp: () => {
|
|
3068
|
-
!
|
|
3088
|
+
!i && a.navigation || H.shouldChangeHeaderIsVisible(!0, a, d);
|
|
3069
3089
|
},
|
|
3070
3090
|
scrollDown: () => {
|
|
3071
|
-
!
|
|
3091
|
+
!i && a.navigation || H.shouldChangeHeaderIsVisible(!1, a, d);
|
|
3072
3092
|
}
|
|
3073
3093
|
}
|
|
3074
3094
|
});
|
|
3075
|
-
const
|
|
3076
|
-
H.handleMenus({ id: h, value: p, menus:
|
|
3095
|
+
const l = (h, p) => {
|
|
3096
|
+
H.handleMenus({ id: h, value: p, menus: a, dispatch: d });
|
|
3077
3097
|
}, f = ne(null);
|
|
3078
3098
|
return Ce(() => {
|
|
3079
|
-
|
|
3099
|
+
a.navigation && H.autoFocus({
|
|
3080
3100
|
menu: "navigation",
|
|
3081
3101
|
navigationRef: f,
|
|
3082
|
-
isDesktopVersion:
|
|
3083
|
-
focusElements:
|
|
3102
|
+
isDesktopVersion: i.navigation,
|
|
3103
|
+
focusElements: u,
|
|
3084
3104
|
dispatch: d
|
|
3085
3105
|
});
|
|
3086
|
-
}, [
|
|
3087
|
-
|
|
3106
|
+
}, [a.navigation]), Ce(() => {
|
|
3107
|
+
a.account && H.autoFocus({
|
|
3088
3108
|
menu: "account",
|
|
3089
3109
|
navigationRef: f,
|
|
3090
|
-
isDesktopVersion:
|
|
3091
|
-
focusElements:
|
|
3110
|
+
isDesktopVersion: i.navigation,
|
|
3111
|
+
focusElements: u,
|
|
3092
3112
|
dispatch: d
|
|
3093
3113
|
});
|
|
3094
|
-
}, [
|
|
3114
|
+
}, [a.account]), t && t.isLoading ? null : /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3095
3115
|
/* @__PURE__ */ s.jsxs("nav", { id: "header", className: E({ "logged-in": r, "logged-out": !r, visible: o }), children: [
|
|
3096
|
-
/* @__PURE__ */ s.jsx(
|
|
3116
|
+
/* @__PURE__ */ s.jsx(ce, { element: "a", href: "#content-of-page", children: e.formatMessage({ id: "header_skip" }) }),
|
|
3097
3117
|
/* @__PURE__ */ s.jsx($n, {}),
|
|
3098
|
-
!
|
|
3118
|
+
!i.navigation && /* @__PURE__ */ s.jsx(
|
|
3099
3119
|
"button",
|
|
3100
3120
|
{
|
|
3101
3121
|
className: "menu-button gtm-trackable",
|
|
3102
3122
|
onClick: (h) => {
|
|
3103
|
-
h.preventDefault(), h.stopPropagation(),
|
|
3123
|
+
h.preventDefault(), h.stopPropagation(), l("navigation", !a.navigation);
|
|
3104
3124
|
},
|
|
3105
3125
|
"data-gtm-event-type": "open-tab-menu-click",
|
|
3106
3126
|
"data-gtm-event-context": "HeaderLeft-Chevron",
|
|
3107
3127
|
"aria-haspopup": "true",
|
|
3108
|
-
"aria-expanded":
|
|
3128
|
+
"aria-expanded": a.navigation,
|
|
3109
3129
|
"aria-controls": "navigation",
|
|
3110
|
-
children: /* @__PURE__ */ s.jsx(
|
|
3130
|
+
children: /* @__PURE__ */ s.jsx(ce, { children: e.formatMessage({ id: `header_menu_${a.navigation ? "hide" : "show"}` }) })
|
|
3111
3131
|
}
|
|
3112
3132
|
),
|
|
3113
3133
|
/* @__PURE__ */ s.jsx(
|
|
@@ -3115,40 +3135,40 @@ const kr = { height: 67, height_desktop: 83 }, Nn = () => {
|
|
|
3115
3135
|
{
|
|
3116
3136
|
ref: f,
|
|
3117
3137
|
id: "navigation",
|
|
3118
|
-
hidden:
|
|
3138
|
+
hidden: i.navigation || a.account ? !1 : !a.navigation,
|
|
3119
3139
|
role: "menu",
|
|
3120
|
-
"data-showing": !
|
|
3140
|
+
"data-showing": !i.navigation && a.account ? "account" : "default",
|
|
3121
3141
|
children: Ke.order.map((h) => /* @__PURE__ */ s.jsx(
|
|
3122
3142
|
qe,
|
|
3123
3143
|
{
|
|
3124
3144
|
id: h,
|
|
3125
3145
|
isLoggedIn: r,
|
|
3126
|
-
isDesktopVersion:
|
|
3127
|
-
menus: { navigation:
|
|
3128
|
-
callback:
|
|
3146
|
+
isDesktopVersion: i.navigation,
|
|
3147
|
+
menus: { navigation: a.navigation, account: a.account },
|
|
3148
|
+
callback: l
|
|
3129
3149
|
},
|
|
3130
3150
|
h
|
|
3131
3151
|
))
|
|
3132
3152
|
}
|
|
3133
3153
|
),
|
|
3134
|
-
!
|
|
3154
|
+
!i.search && /* @__PURE__ */ s.jsx(
|
|
3135
3155
|
"button",
|
|
3136
3156
|
{
|
|
3137
3157
|
className: "search toggle-search-button",
|
|
3138
3158
|
onClick: (h) => {
|
|
3139
|
-
h.preventDefault(), h.stopPropagation(),
|
|
3159
|
+
h.preventDefault(), h.stopPropagation(), l("search", !a.search);
|
|
3140
3160
|
},
|
|
3141
3161
|
"aria-haspopup": "true",
|
|
3142
|
-
"aria-expanded":
|
|
3162
|
+
"aria-expanded": a.search,
|
|
3143
3163
|
"aria-controls": "search-form",
|
|
3144
|
-
children: /* @__PURE__ */ s.jsx(
|
|
3164
|
+
children: /* @__PURE__ */ s.jsx(ce, { children: e.formatMessage({ id: `header_search_${a.search ? "hide" : "show"}` }) })
|
|
3145
3165
|
}
|
|
3146
3166
|
),
|
|
3147
3167
|
/* @__PURE__ */ s.jsx(
|
|
3148
3168
|
vr,
|
|
3149
3169
|
{
|
|
3150
3170
|
id: "global-search",
|
|
3151
|
-
handleToggle: { searchIsOpen:
|
|
3171
|
+
handleToggle: { searchIsOpen: a.search, isDesktopVersion: i.search },
|
|
3152
3172
|
gtmContext: "search-bar-header",
|
|
3153
3173
|
gtmEvent: "form-submission"
|
|
3154
3174
|
}
|
|
@@ -3157,14 +3177,14 @@ const kr = { height: 67, height_desktop: 83 }, Nn = () => {
|
|
|
3157
3177
|
"button",
|
|
3158
3178
|
{
|
|
3159
3179
|
className: "account-button",
|
|
3160
|
-
onClick: (h) => H.events.onClick(h, { id: "account", callback:
|
|
3161
|
-
onMouseEnter: () => H.events.onMouseEnter({ id: "account", callback:
|
|
3162
|
-
onMouseLeave: () => H.events.onBlur({ id: "account", callback:
|
|
3180
|
+
onClick: (h) => H.events.onClick(h, { id: "account", callback: l, isOpen: a.account }),
|
|
3181
|
+
onMouseEnter: () => H.events.onMouseEnter({ id: "account", callback: l }),
|
|
3182
|
+
onMouseLeave: () => H.events.onBlur({ id: "account", callback: l }),
|
|
3163
3183
|
"aria-haspopup": "true",
|
|
3164
|
-
"aria-expanded":
|
|
3184
|
+
"aria-expanded": a.account,
|
|
3165
3185
|
"aria-controls": "navigation",
|
|
3166
3186
|
children: [
|
|
3167
|
-
/* @__PURE__ */ s.jsx(
|
|
3187
|
+
/* @__PURE__ */ s.jsx(ce, { children: e.formatMessage({ id: `header_account_${a.account ? "hide" : "show"}` }) }),
|
|
3168
3188
|
/* @__PURE__ */ s.jsx(Ot, { name: t && t.name || "", src: t && t.image && t.image.thumbnail || "" })
|
|
3169
3189
|
]
|
|
3170
3190
|
}
|
|
@@ -3174,26 +3194,26 @@ const kr = { height: 67, height_desktop: 83 }, Nn = () => {
|
|
|
3174
3194
|
/* @__PURE__ */ s.jsx(
|
|
3175
3195
|
"div",
|
|
3176
3196
|
{
|
|
3177
|
-
className: E("overlay", { open:
|
|
3197
|
+
className: E("overlay", { open: a.navigation || a.account || !i.search && a.search })
|
|
3178
3198
|
}
|
|
3179
3199
|
)
|
|
3180
3200
|
] });
|
|
3181
3201
|
};
|
|
3182
3202
|
const jr = () => {
|
|
3183
|
-
const e =
|
|
3203
|
+
const e = A();
|
|
3184
3204
|
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3185
|
-
/* @__PURE__ */ s.jsx(
|
|
3205
|
+
/* @__PURE__ */ s.jsx(An, {}),
|
|
3186
3206
|
/* @__PURE__ */ s.jsx("div", { className: "content", children: /* @__PURE__ */ s.jsx(it, { variant: "error", text: e.formatMessage({ id: "pageLayout_error" }) }) }),
|
|
3187
3207
|
/* @__PURE__ */ s.jsx(Mn, {})
|
|
3188
3208
|
] });
|
|
3189
|
-
}, Mo = ({ children: e, reportError: t, showFooter: n = !0, background: r = "default", className:
|
|
3209
|
+
}, Mo = ({ children: e, reportError: t, showFooter: n = !0, background: r = "default", className: i = "", locale: c = "en" }) => {
|
|
3190
3210
|
const d = Es();
|
|
3191
3211
|
X(() => {
|
|
3192
3212
|
window.scrollTo(0, 0);
|
|
3193
3213
|
}, [d]);
|
|
3194
|
-
const o = vn(e, { locale:
|
|
3195
|
-
return /* @__PURE__ */ s.jsx(gs, { onError: t, fallback: /* @__PURE__ */ s.jsx(jr, {}), children: /* @__PURE__ */ s.jsx(os, { fallback: /* @__PURE__ */ s.jsx(sr, { layout: "overview-page" }), children: /* @__PURE__ */ s.jsx("div", { id: "wrapper", className: E(
|
|
3196
|
-
/* @__PURE__ */ s.jsx(
|
|
3214
|
+
const o = vn(e, { locale: c });
|
|
3215
|
+
return /* @__PURE__ */ s.jsx(gs, { onError: t, fallback: /* @__PURE__ */ s.jsx(jr, {}), children: /* @__PURE__ */ s.jsx(os, { fallback: /* @__PURE__ */ s.jsx(sr, { layout: "overview-page" }), children: /* @__PURE__ */ s.jsx("div", { id: "wrapper", className: E(i, { [r]: r !== "default" }), children: /* @__PURE__ */ s.jsxs(hs, { children: [
|
|
3216
|
+
/* @__PURE__ */ s.jsx(An, {}),
|
|
3197
3217
|
/* @__PURE__ */ s.jsx("div", { className: "content", children: o }),
|
|
3198
3218
|
n && /* @__PURE__ */ s.jsx(Mn, {}),
|
|
3199
3219
|
/* @__PURE__ */ s.jsx(_r, {})
|
|
@@ -3234,50 +3254,50 @@ const Co = ({
|
|
|
3234
3254
|
color: t = "default",
|
|
3235
3255
|
forceOneLine: n = !1,
|
|
3236
3256
|
canHaveLinks: r = !0,
|
|
3237
|
-
className:
|
|
3238
|
-
gtmType:
|
|
3257
|
+
className: i = "",
|
|
3258
|
+
gtmType: c = "tag-click",
|
|
3239
3259
|
gtmContext: d = "tags"
|
|
3240
3260
|
}) => {
|
|
3241
|
-
const o =
|
|
3261
|
+
const o = A();
|
|
3242
3262
|
if (!e || e.length < 1)
|
|
3243
3263
|
return null;
|
|
3244
|
-
const
|
|
3245
|
-
return e.forEach((
|
|
3246
|
-
if (!
|
|
3264
|
+
const a = [];
|
|
3265
|
+
return e.forEach((u) => {
|
|
3266
|
+
if (!u)
|
|
3247
3267
|
return;
|
|
3248
|
-
const
|
|
3249
|
-
|
|
3250
|
-
}),
|
|
3251
|
-
const
|
|
3252
|
-
return /* @__PURE__ */ s.jsx("li", { children:
|
|
3268
|
+
const l = yr.getTagDetails(u);
|
|
3269
|
+
l && a.push(l);
|
|
3270
|
+
}), a.length < 1 ? null : /* @__PURE__ */ s.jsx("ul", { className: E("tags text-small", t, i, { "one-line": n }), children: a.map((u) => {
|
|
3271
|
+
const l = o.formatMessage({ id: u.text });
|
|
3272
|
+
return /* @__PURE__ */ s.jsx("li", { children: u.href && r ? /* @__PURE__ */ s.jsx(
|
|
3253
3273
|
"a",
|
|
3254
3274
|
{
|
|
3255
|
-
href:
|
|
3275
|
+
href: u.href,
|
|
3256
3276
|
className: "gtm-trackable",
|
|
3257
|
-
"data-gtm-event-type":
|
|
3277
|
+
"data-gtm-event-type": c,
|
|
3258
3278
|
"data-gtm-event-context": d,
|
|
3259
|
-
children:
|
|
3279
|
+
children: l
|
|
3260
3280
|
}
|
|
3261
|
-
) :
|
|
3281
|
+
) : l }, u.id);
|
|
3262
3282
|
}) });
|
|
3263
3283
|
};
|
|
3264
3284
|
const Do = ({
|
|
3265
3285
|
members: { total: e, data: t = [] },
|
|
3266
3286
|
pagination: n,
|
|
3267
3287
|
gtmContext: r = "member",
|
|
3268
|
-
gtmType:
|
|
3269
|
-
className:
|
|
3288
|
+
gtmType: i = "member-click",
|
|
3289
|
+
className: c = ""
|
|
3270
3290
|
}) => {
|
|
3271
|
-
const d =
|
|
3272
|
-
return t.length === 0 ? null : (e || (e = t.length), /* @__PURE__ */ s.jsxs("div", { className: E("members-list",
|
|
3291
|
+
const d = A();
|
|
3292
|
+
return t.length === 0 ? null : (e || (e = t.length), /* @__PURE__ */ s.jsxs("div", { className: E("members-list", c), children: [
|
|
3273
3293
|
/* @__PURE__ */ s.jsxs("h1", { children: [
|
|
3274
3294
|
d.formatMessage({ id: "membersList" }),
|
|
3275
3295
|
/* @__PURE__ */ s.jsx("span", { className: "count", children: e })
|
|
3276
3296
|
] }),
|
|
3277
|
-
/* @__PURE__ */ s.jsx("ul", { children: t.map((o,
|
|
3278
|
-
/* @__PURE__ */ s.jsx(Bt, { member: o, gtmContext: r, gtmType:
|
|
3297
|
+
/* @__PURE__ */ s.jsx("ul", { children: t.map((o, a) => /* @__PURE__ */ s.jsxs("li", { children: [
|
|
3298
|
+
/* @__PURE__ */ s.jsx(Bt, { member: o, gtmContext: r, gtmType: i }),
|
|
3279
3299
|
o.isAdmin && /* @__PURE__ */ s.jsx(qs, { children: d.formatMessage({ id: "membersList_admin" }) })
|
|
3280
|
-
] },
|
|
3300
|
+
] }, a)) }),
|
|
3281
3301
|
n && /* @__PURE__ */ s.jsx(
|
|
3282
3302
|
hr,
|
|
3283
3303
|
{
|
|
@@ -3299,8 +3319,8 @@ const me = "discussion_form_", Pn = ({
|
|
|
3299
3319
|
showTitle: !1
|
|
3300
3320
|
},
|
|
3301
3321
|
inputRef: r,
|
|
3302
|
-
maxLength:
|
|
3303
|
-
minRows:
|
|
3322
|
+
maxLength: i = 5e4,
|
|
3323
|
+
minRows: c = 4,
|
|
3304
3324
|
forceShow: d = {
|
|
3305
3325
|
cancel: !1,
|
|
3306
3326
|
error: !1
|
|
@@ -3318,10 +3338,10 @@ const me = "discussion_form_", Pn = ({
|
|
|
3318
3338
|
create: { projectNames: ["questions-answers"] }
|
|
3319
3339
|
}
|
|
3320
3340
|
},
|
|
3321
|
-
gtmContext:
|
|
3341
|
+
gtmContext: a = "DiscussionForm"
|
|
3322
3342
|
}) => {
|
|
3323
3343
|
var b, Q;
|
|
3324
|
-
const
|
|
3344
|
+
const u = A(), l = ge(Se), [f, h] = F(
|
|
3325
3345
|
n.isEditing && n.isEditing.text || ""
|
|
3326
3346
|
), [p, _] = F(d.error || !1), [j, g] = F(!1), S = ne(null);
|
|
3327
3347
|
if (r || (r = S), n.isLoading)
|
|
@@ -3336,13 +3356,13 @@ const me = "discussion_form_", Pn = ({
|
|
|
3336
3356
|
const Y = w.target.value;
|
|
3337
3357
|
h(Y);
|
|
3338
3358
|
let L;
|
|
3339
|
-
!
|
|
3340
|
-
|
|
3359
|
+
!l || !l.id ? L = pe(
|
|
3360
|
+
u.formatMessage,
|
|
3341
3361
|
`${me}error_loggedOut`,
|
|
3342
3362
|
e.type,
|
|
3343
3363
|
"action"
|
|
3344
|
-
) : t ? Y.length >=
|
|
3345
|
-
|
|
3364
|
+
) : t ? Y.length >= i && (L = `${me}error_tooLong`) : L = pe(
|
|
3365
|
+
u.formatMessage,
|
|
3346
3366
|
`${me}error_noPermission`,
|
|
3347
3367
|
e.type,
|
|
3348
3368
|
"action"
|
|
@@ -3355,7 +3375,7 @@ const me = "discussion_form_", Pn = ({
|
|
|
3355
3375
|
}
|
|
3356
3376
|
const M = async (w) => {
|
|
3357
3377
|
var L;
|
|
3358
|
-
if (w.preventDefault(), w.stopPropagation(), !
|
|
3378
|
+
if (w.preventDefault(), w.stopPropagation(), !l || !l.id || !t || I)
|
|
3359
3379
|
return;
|
|
3360
3380
|
Je && clearTimeout(Je), g("submitting");
|
|
3361
3381
|
const Y = window.location.pathname;
|
|
@@ -3368,20 +3388,20 @@ const me = "discussion_form_", Pn = ({
|
|
|
3368
3388
|
case "question":
|
|
3369
3389
|
O = await o.create({
|
|
3370
3390
|
title: f,
|
|
3371
|
-
authorId:
|
|
3391
|
+
authorId: l && l.id,
|
|
3372
3392
|
...(L = o.props) == null ? void 0 : L.create
|
|
3373
3393
|
});
|
|
3374
3394
|
break;
|
|
3375
3395
|
case "response":
|
|
3376
3396
|
O = await o.create(
|
|
3377
3397
|
{ question: e.slugs.question },
|
|
3378
|
-
{ body: f, authorId:
|
|
3398
|
+
{ body: f, authorId: l && l.id, contentPath: Y }
|
|
3379
3399
|
);
|
|
3380
3400
|
break;
|
|
3381
3401
|
case "reply":
|
|
3382
3402
|
O = await o.create(
|
|
3383
3403
|
{ question: e.slugs.question, answer: e.slugs.answer },
|
|
3384
|
-
{ body: f, authorId:
|
|
3404
|
+
{ body: f, authorId: l && l.id, contentPath: Y }
|
|
3385
3405
|
);
|
|
3386
3406
|
break;
|
|
3387
3407
|
default:
|
|
@@ -3394,12 +3414,12 @@ const me = "discussion_form_", Pn = ({
|
|
|
3394
3414
|
const U = O;
|
|
3395
3415
|
let W = `${me}error`;
|
|
3396
3416
|
U.message.includes("entry already exists") && (W = pe(
|
|
3397
|
-
|
|
3417
|
+
u.formatMessage,
|
|
3398
3418
|
`${me}error_alreadyExists`,
|
|
3399
3419
|
e.type,
|
|
3400
3420
|
"action"
|
|
3401
3421
|
)), U.message.includes("429") ? W = pe(
|
|
3402
|
-
|
|
3422
|
+
u.formatMessage,
|
|
3403
3423
|
`${me}error_tooMany`,
|
|
3404
3424
|
e.type,
|
|
3405
3425
|
"action"
|
|
@@ -3415,10 +3435,10 @@ const me = "discussion_form_", Pn = ({
|
|
|
3415
3435
|
size: { mobile: "small", 600: "medium" },
|
|
3416
3436
|
onClick: o.handleCancel,
|
|
3417
3437
|
className: "gtm-trackable",
|
|
3418
|
-
"data-gtm-event-context":
|
|
3438
|
+
"data-gtm-event-context": a,
|
|
3419
3439
|
"data-gtm-event-type": `cancel-${e.type}-click`,
|
|
3420
|
-
disabled: !d.cancel && (!
|
|
3421
|
-
children:
|
|
3440
|
+
disabled: !d.cancel && (!l || !l.id || !f),
|
|
3441
|
+
children: u.formatMessage({ id: `${me}cancel` })
|
|
3422
3442
|
}), x.push({
|
|
3423
3443
|
variant: "primary",
|
|
3424
3444
|
size: { mobile: "small", 600: "medium" },
|
|
@@ -3432,11 +3452,11 @@ const me = "discussion_form_", Pn = ({
|
|
|
3432
3452
|
M(w);
|
|
3433
3453
|
},
|
|
3434
3454
|
className: "gtm-trackable",
|
|
3435
|
-
"data-gtm-event-context":
|
|
3455
|
+
"data-gtm-event-context": a,
|
|
3436
3456
|
"data-gtm-event-type": `${n.isEditing ? "save" : "submit"}-${e.type}-click`,
|
|
3437
3457
|
"data-testid": "save-button",
|
|
3438
|
-
disabled: !
|
|
3439
|
-
children:
|
|
3458
|
+
disabled: !l || !l.id || !t || I || V || n.isEditing && f === n.isEditing.text,
|
|
3459
|
+
children: u.formatMessage({
|
|
3440
3460
|
id: `${me}${V ? n.isEditing ? "saving" : "posting" : n.isEditing ? "save" : "post"}`
|
|
3441
3461
|
})
|
|
3442
3462
|
}), /* @__PURE__ */ s.jsxs(
|
|
@@ -3448,16 +3468,16 @@ const me = "discussion_form_", Pn = ({
|
|
|
3448
3468
|
}),
|
|
3449
3469
|
"data-testid": `discussion-${e.type}-form`,
|
|
3450
3470
|
children: [
|
|
3451
|
-
(n == null ? void 0 : n.showTitle) && !n.isEditing && ["question"].includes(e.type) && /* @__PURE__ */ s.jsx("h2", { children: pe(
|
|
3471
|
+
(n == null ? void 0 : n.showTitle) && !n.isEditing && ["question"].includes(e.type) && /* @__PURE__ */ s.jsx("h2", { children: pe(u.formatMessage, `${me}title`, e.type, "action") }),
|
|
3452
3472
|
/* @__PURE__ */ s.jsx(
|
|
3453
3473
|
Bt,
|
|
3454
3474
|
{
|
|
3455
|
-
member:
|
|
3456
|
-
gtmContext:
|
|
3475
|
+
member: l || "community",
|
|
3476
|
+
gtmContext: a,
|
|
3457
3477
|
gtmType: "profile-click"
|
|
3458
3478
|
}
|
|
3459
3479
|
),
|
|
3460
|
-
/* @__PURE__ */ s.jsx(
|
|
3480
|
+
/* @__PURE__ */ s.jsx(ce, { element: "label", showOnFocus: !1, htmlFor: `${T}-input`, children: pe(u.formatMessage, `${me}label`, e.type, "action") }),
|
|
3461
3481
|
/* @__PURE__ */ s.jsx(
|
|
3462
3482
|
_s,
|
|
3463
3483
|
{
|
|
@@ -3465,28 +3485,28 @@ const me = "discussion_form_", Pn = ({
|
|
|
3465
3485
|
id: `${T}-input`,
|
|
3466
3486
|
name: e.type,
|
|
3467
3487
|
placeholder: pe(
|
|
3468
|
-
|
|
3488
|
+
u.formatMessage,
|
|
3469
3489
|
`${me}placeholder`,
|
|
3470
3490
|
e.type,
|
|
3471
3491
|
"action"
|
|
3472
3492
|
),
|
|
3473
3493
|
onChange: k,
|
|
3474
3494
|
value: f,
|
|
3475
|
-
maxLength:
|
|
3495
|
+
maxLength: i,
|
|
3476
3496
|
"aria-invalid": !!p,
|
|
3477
3497
|
"aria-errormessage": "error-message",
|
|
3478
|
-
minRows:
|
|
3498
|
+
minRows: c,
|
|
3479
3499
|
autoFocus: !!n.isEditing
|
|
3480
3500
|
}
|
|
3481
3501
|
),
|
|
3482
|
-
/* @__PURE__ */ s.jsx("small", { children: pe(
|
|
3502
|
+
/* @__PURE__ */ s.jsx("small", { children: pe(u.formatMessage, `${me}explainer`, e.type, "action", {
|
|
3483
3503
|
a: (w) => /* @__PURE__ */ s.jsx(
|
|
3484
3504
|
"a",
|
|
3485
3505
|
{
|
|
3486
3506
|
href: "https://about.apolitical.co/q-and-a-community-guidelines",
|
|
3487
3507
|
target: "_blank",
|
|
3488
3508
|
className: "gtm-trackable",
|
|
3489
|
-
"data-gtm-event-context":
|
|
3509
|
+
"data-gtm-event-context": a,
|
|
3490
3510
|
"data-gtm-event-type": "community-guidelines-link",
|
|
3491
3511
|
rel: "noreferrer",
|
|
3492
3512
|
children: w
|
|
@@ -3494,14 +3514,14 @@ const me = "discussion_form_", Pn = ({
|
|
|
3494
3514
|
)
|
|
3495
3515
|
}) }),
|
|
3496
3516
|
/* @__PURE__ */ s.jsx(ot, { buttons: x }),
|
|
3497
|
-
j === "submitted" && /* @__PURE__ */ s.jsx(Pt, { className: "success", "data-testid": "success", children: pe(
|
|
3498
|
-
p && /* @__PURE__ */ s.jsx(Pt, { id: "error-message", className: "error", "data-testid": "error", children: d.error ? d.error : typeof p == "string" ? p.includes(" ") ? p :
|
|
3517
|
+
j === "submitted" && /* @__PURE__ */ s.jsx(Pt, { className: "success", "data-testid": "success", children: pe(u.formatMessage, `${me}success`, e.type, "action") }),
|
|
3518
|
+
p && /* @__PURE__ */ s.jsx(Pt, { id: "error-message", className: "error", "data-testid": "error", children: d.error ? d.error : typeof p == "string" ? p.includes(" ") ? p : u.formatMessage(
|
|
3499
3519
|
{ id: p },
|
|
3500
3520
|
{
|
|
3501
|
-
action:
|
|
3521
|
+
action: u.formatMessage({
|
|
3502
3522
|
id: `discussion_action_${e.type}`
|
|
3503
3523
|
}),
|
|
3504
|
-
maxLength:
|
|
3524
|
+
maxLength: i
|
|
3505
3525
|
}
|
|
3506
3526
|
) : p })
|
|
3507
3527
|
]
|
|
@@ -3510,13 +3530,13 @@ const me = "discussion_form_", Pn = ({
|
|
|
3510
3530
|
}, It = ({
|
|
3511
3531
|
contentType: e,
|
|
3512
3532
|
createPost: t,
|
|
3513
|
-
membershipRequiredToPost: { isMember: n, required: r, join:
|
|
3533
|
+
membershipRequiredToPost: { isMember: n, required: r, join: i, leave: c, notMemberStateText: d }
|
|
3514
3534
|
}) => r && !n ? /* @__PURE__ */ s.jsx(
|
|
3515
3535
|
it,
|
|
3516
3536
|
{
|
|
3517
3537
|
text: d,
|
|
3518
3538
|
button: {
|
|
3519
|
-
component: /* @__PURE__ */ s.jsx(Tn, { functions: { join:
|
|
3539
|
+
component: /* @__PURE__ */ s.jsx(Tn, { functions: { join: i, leave: c } })
|
|
3520
3540
|
}
|
|
3521
3541
|
}
|
|
3522
3542
|
) : /* @__PURE__ */ s.jsx(
|
|
@@ -3530,12 +3550,12 @@ const me = "discussion_form_", Pn = ({
|
|
|
3530
3550
|
), Er = {
|
|
3531
3551
|
showThread: !1,
|
|
3532
3552
|
showForm: !1
|
|
3533
|
-
},
|
|
3553
|
+
}, ct = Ft(Er), Sr = ({ children: e }) => {
|
|
3534
3554
|
const [t, n] = F({
|
|
3535
3555
|
showThread: !1,
|
|
3536
3556
|
showForm: !1
|
|
3537
3557
|
});
|
|
3538
|
-
return /* @__PURE__ */ s.jsx(
|
|
3558
|
+
return /* @__PURE__ */ s.jsx(ct.Provider, { value: { ...t, updateConversation: n }, children: e });
|
|
3539
3559
|
}, Tr = ({
|
|
3540
3560
|
question: e,
|
|
3541
3561
|
answer: t,
|
|
@@ -3553,18 +3573,18 @@ const St = () => {
|
|
|
3553
3573
|
likes: t = 0,
|
|
3554
3574
|
peopleWhoLiked: n = !1,
|
|
3555
3575
|
isShort: r = !0,
|
|
3556
|
-
userLiked:
|
|
3557
|
-
content:
|
|
3576
|
+
userLiked: i = !1,
|
|
3577
|
+
content: c = { type: "reply", slugs: {} },
|
|
3558
3578
|
canLike: d = !0,
|
|
3559
3579
|
functions: { createLike: o = () => {
|
|
3560
|
-
}, deleteLike:
|
|
3580
|
+
}, deleteLike: a = () => {
|
|
3561
3581
|
} } = {}
|
|
3562
3582
|
}) => {
|
|
3563
|
-
const
|
|
3583
|
+
const u = A();
|
|
3564
3584
|
X(() => {
|
|
3565
|
-
p(
|
|
3566
|
-
}, [
|
|
3567
|
-
const [
|
|
3585
|
+
p(i);
|
|
3586
|
+
}, [i]);
|
|
3587
|
+
const [l, f] = F(t), [h, p] = F(i), [_, j] = F(!1), [g, S] = F(!1), k = et(() => $r(n, Tt), [n]), T = (C) => {
|
|
3568
3588
|
if (C.preventDefault(), C.stopPropagation(), S(!1), Be)
|
|
3569
3589
|
return St(), !1;
|
|
3570
3590
|
if (St(), _ || !d)
|
|
@@ -3573,20 +3593,20 @@ const St = () => {
|
|
|
3573
3593
|
}, M = async () => {
|
|
3574
3594
|
if (St(), _ || !d)
|
|
3575
3595
|
return !1;
|
|
3576
|
-
let C = h ?
|
|
3596
|
+
let C = h ? l - 1 : l + 1;
|
|
3577
3597
|
C < 0 && (C = 0), j(!0), f(C), p(!h);
|
|
3578
3598
|
try {
|
|
3579
|
-
if (
|
|
3580
|
-
const I = Tr(
|
|
3581
|
-
h ? await
|
|
3599
|
+
if (c && c.slugs) {
|
|
3600
|
+
const I = Tr(c.slugs);
|
|
3601
|
+
h ? await a(I) : await o(I, { contentPath: window.location.pathname });
|
|
3582
3602
|
}
|
|
3583
3603
|
} catch {
|
|
3584
|
-
f(t), p(
|
|
3604
|
+
f(t), p(i);
|
|
3585
3605
|
} finally {
|
|
3586
3606
|
j(!1);
|
|
3587
3607
|
}
|
|
3588
3608
|
};
|
|
3589
|
-
return
|
|
3609
|
+
return N.createElement(
|
|
3590
3610
|
e,
|
|
3591
3611
|
{
|
|
3592
3612
|
className: E("likes-wrapper text-medium action-button", { "show-spinner": _, "is-liked": h, disabled: !d }),
|
|
@@ -3610,28 +3630,28 @@ const St = () => {
|
|
|
3610
3630
|
variant: "tertiary",
|
|
3611
3631
|
size: "medium",
|
|
3612
3632
|
icon: { icon: h ? "heart" : "heart_empty", animate: "bounce" },
|
|
3613
|
-
className: E({ "do-animation": h && !
|
|
3614
|
-
screenreaderText: d ?
|
|
3633
|
+
className: E({ "do-animation": h && !i }),
|
|
3634
|
+
screenreaderText: d ? u.formatMessage({
|
|
3615
3635
|
id: `discussion_likes_${h ? "unlike" : "like"}`
|
|
3616
|
-
}, { action:
|
|
3636
|
+
}, { action: u.formatMessage({ id: `discussion_action_${c.type}` }) }) : !1,
|
|
3617
3637
|
onClick: T,
|
|
3618
3638
|
disabled: !d,
|
|
3619
3639
|
"aria-hidden": !d,
|
|
3620
3640
|
"data-testid": "like-button",
|
|
3621
3641
|
"data-gtm-event-context": "Likes",
|
|
3622
|
-
"data-gtm-event-type": `like-${
|
|
3642
|
+
"data-gtm-event-type": `like-${c.type}-click`
|
|
3623
3643
|
}
|
|
3624
3644
|
),
|
|
3625
|
-
/* @__PURE__ */ s.jsx("span", { className: E("number-of-likes", { "no-likes":
|
|
3645
|
+
/* @__PURE__ */ s.jsx("span", { className: E("number-of-likes", { "no-likes": l === 0 }), "data-testid": "number-of-likes", children: u.formatMessage({ id: `discussion_likes${r ? "_short" : ""}` }, { number: l }) }),
|
|
3626
3646
|
n && /* @__PURE__ */ s.jsx(Hs, { isOpen: g, isLoading: n.length === 0, children: n.length && /* @__PURE__ */ s.jsxs("ul", { children: [
|
|
3627
3647
|
k.map((C) => typeof C == "string" || !C.name ? null : /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(at, { href: C.id ? `/profiles/${C.id}` : void 0, gtmContext: "Likes", gtmType: "liked-name-click", children: C.name }) }, C.id || window.btoa(C.name))),
|
|
3628
|
-
n.length > Tt && /* @__PURE__ */ s.jsx("li", { children:
|
|
3648
|
+
n.length > Tt && /* @__PURE__ */ s.jsx("li", { children: u.formatMessage({ id: "discussion_likes_more" }, { number: n.length - Tt }) })
|
|
3629
3649
|
] }) })
|
|
3630
3650
|
] })
|
|
3631
3651
|
}
|
|
3632
3652
|
);
|
|
3633
3653
|
};
|
|
3634
|
-
const Cr = ({ element: e = "section", children: t, className: n, ...r }) =>
|
|
3654
|
+
const Cr = ({ element: e = "section", children: t, className: n, ...r }) => N.createElement(
|
|
3635
3655
|
e,
|
|
3636
3656
|
{
|
|
3637
3657
|
className: E("modal", n),
|
|
@@ -3644,18 +3664,18 @@ const Rn = ({
|
|
|
3644
3664
|
isOpen: t = !1,
|
|
3645
3665
|
showDivider: n = !0,
|
|
3646
3666
|
maxWidth: r,
|
|
3647
|
-
functions: { onOpen:
|
|
3648
|
-
}, onClose:
|
|
3667
|
+
functions: { onOpen: i = () => {
|
|
3668
|
+
}, onClose: c = () => {
|
|
3649
3669
|
} } = {},
|
|
3650
3670
|
forceShow: { error: d = !1 } = {},
|
|
3651
3671
|
title: o,
|
|
3652
|
-
children:
|
|
3653
|
-
buttons:
|
|
3654
|
-
className:
|
|
3672
|
+
children: a,
|
|
3673
|
+
buttons: u,
|
|
3674
|
+
className: l = "",
|
|
3655
3675
|
gtmContext: f = "Modal"
|
|
3656
3676
|
}) => {
|
|
3657
|
-
const h =
|
|
3658
|
-
_(S), S ? (
|
|
3677
|
+
const h = A(), [p, _] = F(t), j = (S) => {
|
|
3678
|
+
_(S), S ? (i(), document.body.classList.add("has-overlay")) : (c(), document.body.classList.remove("has-overlay"));
|
|
3659
3679
|
};
|
|
3660
3680
|
X(() => {
|
|
3661
3681
|
j(t);
|
|
@@ -3665,7 +3685,7 @@ const Rn = ({
|
|
|
3665
3685
|
Cr,
|
|
3666
3686
|
{
|
|
3667
3687
|
id: e,
|
|
3668
|
-
className: E("overlay-modal",
|
|
3688
|
+
className: E("overlay-modal", l, { "has-max-width": r }),
|
|
3669
3689
|
hidden: !p,
|
|
3670
3690
|
style: g,
|
|
3671
3691
|
children: t && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
@@ -3686,10 +3706,10 @@ const Rn = ({
|
|
|
3686
3706
|
)
|
|
3687
3707
|
] }),
|
|
3688
3708
|
n && /* @__PURE__ */ s.jsx(De, {}),
|
|
3689
|
-
|
|
3690
|
-
|
|
3709
|
+
a,
|
|
3710
|
+
u && /* @__PURE__ */ s.jsxs("div", { className: "bottom", children: [
|
|
3691
3711
|
/* @__PURE__ */ s.jsx(De, {}),
|
|
3692
|
-
/* @__PURE__ */ s.jsx(ot, { buttons:
|
|
3712
|
+
/* @__PURE__ */ s.jsx(ot, { buttons: u })
|
|
3693
3713
|
] }),
|
|
3694
3714
|
d && /* @__PURE__ */ s.jsx(Pt, { className: "error", children: d })
|
|
3695
3715
|
] })
|
|
@@ -3700,18 +3720,18 @@ const Rn = ({
|
|
|
3700
3720
|
"aria-expanded": t,
|
|
3701
3721
|
"aria-controls": e
|
|
3702
3722
|
});
|
|
3703
|
-
const
|
|
3723
|
+
const No = ({
|
|
3704
3724
|
className: e,
|
|
3705
3725
|
showModal: t = !0,
|
|
3706
3726
|
title: n,
|
|
3707
3727
|
formTitle: r = "Know someone who might like to join this workshop?",
|
|
3708
|
-
formLabel:
|
|
3709
|
-
ctaMessage:
|
|
3728
|
+
formLabel: i = "Send an invitation to your colleagues below",
|
|
3729
|
+
ctaMessage: c = "Send invites",
|
|
3710
3730
|
showIcon: d,
|
|
3711
3731
|
onClose: o,
|
|
3712
|
-
reportError:
|
|
3732
|
+
reportError: a = () => {
|
|
3713
3733
|
},
|
|
3714
|
-
sendInvites:
|
|
3734
|
+
sendInvites: u
|
|
3715
3735
|
}) => /* @__PURE__ */ s.jsx(
|
|
3716
3736
|
Rn,
|
|
3717
3737
|
{
|
|
@@ -3724,11 +3744,11 @@ const Ao = ({
|
|
|
3724
3744
|
wr,
|
|
3725
3745
|
{
|
|
3726
3746
|
title: r,
|
|
3727
|
-
label:
|
|
3728
|
-
ctaMessage:
|
|
3747
|
+
label: i,
|
|
3748
|
+
ctaMessage: c,
|
|
3729
3749
|
onClose: o,
|
|
3730
|
-
sendInvites:
|
|
3731
|
-
reportError:
|
|
3750
|
+
sendInvites: u,
|
|
3751
|
+
reportError: a
|
|
3732
3752
|
}
|
|
3733
3753
|
)
|
|
3734
3754
|
}
|
|
@@ -3736,14 +3756,14 @@ const Ao = ({
|
|
|
3736
3756
|
const t = {};
|
|
3737
3757
|
return Object.keys(e).forEach((n) => n.includes("Id") ? t[n] = e[n] : t[`${n}Slug`] = e[n]), t;
|
|
3738
3758
|
}, Ht = (e, t) => e && !t;
|
|
3739
|
-
const ve = "discussion_",
|
|
3759
|
+
const ve = "discussion_", Nr = 280, lt = ({
|
|
3740
3760
|
element: e = "div",
|
|
3741
3761
|
content: t,
|
|
3742
3762
|
userHasPermissions: n = !0,
|
|
3743
3763
|
isLoading: r = !1,
|
|
3744
|
-
originalAuthorId:
|
|
3764
|
+
originalAuthorId: i,
|
|
3745
3765
|
functions: {
|
|
3746
|
-
content: { createContent:
|
|
3766
|
+
content: { createContent: c, deleteContent: d, updateContent: o } = {
|
|
3747
3767
|
createContent: () => {
|
|
3748
3768
|
},
|
|
3749
3769
|
deleteContent: () => {
|
|
@@ -3751,10 +3771,10 @@ const ve = "discussion_", Ar = 280, ct = ({
|
|
|
3751
3771
|
updateContent: () => {
|
|
3752
3772
|
}
|
|
3753
3773
|
},
|
|
3754
|
-
likes: { createLike:
|
|
3774
|
+
likes: { createLike: a, deleteLike: u } = { createLike: () => {
|
|
3755
3775
|
}, deleteLike: () => {
|
|
3756
3776
|
} },
|
|
3757
|
-
comments: { openComments:
|
|
3777
|
+
comments: { openComments: l } = { openComments: () => {
|
|
3758
3778
|
} }
|
|
3759
3779
|
},
|
|
3760
3780
|
links: f = {},
|
|
@@ -3763,7 +3783,7 @@ const ve = "discussion_", Ar = 280, ct = ({
|
|
|
3763
3783
|
children: _,
|
|
3764
3784
|
isTruncated: j = !1
|
|
3765
3785
|
}) => {
|
|
3766
|
-
const g =
|
|
3786
|
+
const g = A(), S = ge(Se), k = ge(ct), [T, M] = F({
|
|
3767
3787
|
body: t && t.body || "",
|
|
3768
3788
|
isEditing: !1,
|
|
3769
3789
|
didEdit: t && t.isEdited || !1
|
|
@@ -3776,7 +3796,7 @@ const ve = "discussion_", Ar = 280, ct = ({
|
|
|
3776
3796
|
});
|
|
3777
3797
|
}, [t.isEdited]), r || !t || t.type === "answer" && (!t.slugs || !t.slugs.question))
|
|
3778
3798
|
return /* @__PURE__ */ s.jsx(je, { className: "discussion-card discussion-post" });
|
|
3779
|
-
const { author: b, canLike: Q, createdAt: w, id: Y, likes: L = 0, userLiked: O, comments: U = 0 } = t, W = j ? tt(T.body,
|
|
3799
|
+
const { author: b, canLike: Q, createdAt: w, id: Y, likes: L = 0, userLiked: O, comments: U = 0 } = t, W = j ? tt(T.body, Nr) : T.body, Z = S && S.id && typeof b != "string" && b.id && b.id === S.id || !1, re = typeof Q == "boolean" ? Q : n ? !Z : !1, oe = async (P) => {
|
|
3780
3800
|
P || (P = ""), x("");
|
|
3781
3801
|
try {
|
|
3782
3802
|
if (!xs(P, T.body)) {
|
|
@@ -3836,7 +3856,7 @@ const ve = "discussion_", Ar = 280, ct = ({
|
|
|
3836
3856
|
"data-gtm-event-type": `delete-${t.type}-click`,
|
|
3837
3857
|
...Dr(`delete-${t.slug}-modal`, C)
|
|
3838
3858
|
}
|
|
3839
|
-
),
|
|
3859
|
+
), N.createElement(e, {
|
|
3840
3860
|
className: E("discussion-post", h),
|
|
3841
3861
|
"data-testid": `discussion-${t.type}-thread`,
|
|
3842
3862
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
@@ -3857,7 +3877,7 @@ const ve = "discussion_", Ar = 280, ct = ({
|
|
|
3857
3877
|
{
|
|
3858
3878
|
member: b,
|
|
3859
3879
|
additionalContent: { createdAt: w, didEdit: T.didEdit },
|
|
3860
|
-
className: typeof b != "string" && b.id ===
|
|
3880
|
+
className: typeof b != "string" && b.id === i ? "highlighted" : "",
|
|
3861
3881
|
gtmContext: p,
|
|
3862
3882
|
gtmType: "profile-click"
|
|
3863
3883
|
}
|
|
@@ -3884,7 +3904,7 @@ const ve = "discussion_", Ar = 280, ct = ({
|
|
|
3884
3904
|
) : !1
|
|
3885
3905
|
},
|
|
3886
3906
|
functions: {
|
|
3887
|
-
create:
|
|
3907
|
+
create: c,
|
|
3888
3908
|
handleSaveEdit: oe,
|
|
3889
3909
|
handleCancel: () => {
|
|
3890
3910
|
x(""), M({ ...T, isEditing: !1 });
|
|
@@ -3905,7 +3925,7 @@ const ve = "discussion_", Ar = 280, ct = ({
|
|
|
3905
3925
|
on,
|
|
3906
3926
|
{
|
|
3907
3927
|
options: {
|
|
3908
|
-
wrapper: t.type === "question" ? "h1" :
|
|
3928
|
+
wrapper: t.type === "question" ? "h1" : N.Fragment,
|
|
3909
3929
|
forceWrapper: t.type === "question",
|
|
3910
3930
|
forceInline: t.type === "question",
|
|
3911
3931
|
forceBlock: t.type !== "question"
|
|
@@ -3929,17 +3949,17 @@ const ve = "discussion_", Ar = 280, ct = ({
|
|
|
3929
3949
|
content: { type: t.type, slugs: t.slugs },
|
|
3930
3950
|
canLike: re,
|
|
3931
3951
|
functions: {
|
|
3932
|
-
createLike:
|
|
3933
|
-
deleteLike:
|
|
3952
|
+
createLike: a,
|
|
3953
|
+
deleteLike: u
|
|
3934
3954
|
}
|
|
3935
3955
|
}
|
|
3936
3956
|
),
|
|
3937
|
-
(["question", "post"].includes(t.type) || f.comments || typeof
|
|
3957
|
+
(["question", "post"].includes(t.type) || f.comments || typeof l == "function") && /* @__PURE__ */ s.jsxs(
|
|
3938
3958
|
"li",
|
|
3939
3959
|
{
|
|
3940
3960
|
className: "action-button",
|
|
3941
3961
|
onClick: (P) => {
|
|
3942
|
-
P.preventDefault(), P.stopPropagation(), f.comments && (window.location.href = f.comments), typeof
|
|
3962
|
+
P.preventDefault(), P.stopPropagation(), f.comments && (window.location.href = f.comments), typeof l == "function" && l();
|
|
3943
3963
|
},
|
|
3944
3964
|
children: [
|
|
3945
3965
|
/* @__PURE__ */ s.jsx(
|
|
@@ -3950,7 +3970,7 @@ const ve = "discussion_", Ar = 280, ct = ({
|
|
|
3950
3970
|
styling: { muted: !0 },
|
|
3951
3971
|
icon: { icon: "speech-bubble_square_thick" },
|
|
3952
3972
|
href: f.comments ? f.comments : !1,
|
|
3953
|
-
onClick: f.comments || typeof
|
|
3973
|
+
onClick: f.comments || typeof l != "function" ? !1 : l,
|
|
3954
3974
|
className: "gtm-trackable",
|
|
3955
3975
|
"data-gtm-event-context": p,
|
|
3956
3976
|
"data-gtm-event-type": `answer-${t.type}-click`,
|
|
@@ -4044,29 +4064,29 @@ const ve = "discussion_", Ar = 280, ct = ({
|
|
|
4044
4064
|
] })
|
|
4045
4065
|
});
|
|
4046
4066
|
};
|
|
4047
|
-
const $t = "discussion_responses_",
|
|
4048
|
-
const n =
|
|
4067
|
+
const $t = "discussion_responses_", Ao = ({ type: e = "answer", responses: t = 0 }) => {
|
|
4068
|
+
const n = A();
|
|
4049
4069
|
return /* @__PURE__ */ s.jsxs("div", { className: "responses-heading", children: [
|
|
4050
4070
|
/* @__PURE__ */ s.jsx("h3", { children: n.formatMessage({ id: `${$t}title` }, { action: n.formatMessage({ id: `${$t}${e}` }), count: t }) }),
|
|
4051
4071
|
t === 0 && /* @__PURE__ */ s.jsx("p", { children: pe(n.formatMessage, `${$t}empty`, e, e) })
|
|
4052
4072
|
] });
|
|
4053
4073
|
};
|
|
4054
|
-
const
|
|
4055
|
-
const r =
|
|
4074
|
+
const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
4075
|
+
const r = A(), i = ne(null), c = ge(ct), [d, o] = F("closed");
|
|
4056
4076
|
X(() => {
|
|
4057
|
-
const f =
|
|
4077
|
+
const f = i.current;
|
|
4058
4078
|
if (f)
|
|
4059
|
-
return f.addEventListener("transitionend",
|
|
4060
|
-
f.removeEventListener("transitionend",
|
|
4079
|
+
return f.addEventListener("transitionend", a), () => {
|
|
4080
|
+
f.removeEventListener("transitionend", a);
|
|
4061
4081
|
};
|
|
4062
4082
|
}, []), Ce(() => {
|
|
4063
|
-
d === "closed" && !
|
|
4064
|
-
}, [
|
|
4083
|
+
d === "closed" && !c.showThread || o(["opening", "open"].includes(d) ? "ready-to-close" : "opening");
|
|
4084
|
+
}, [c.showThread]), X(() => {
|
|
4065
4085
|
d === "ready-to-close" && o("closing");
|
|
4066
4086
|
}, [d]);
|
|
4067
|
-
const
|
|
4087
|
+
const a = ({ propertyName: f }) => {
|
|
4068
4088
|
f === "max-height" && o((h) => h === "opening" ? "open" : h === "closing" ? "closed" : h);
|
|
4069
|
-
},
|
|
4089
|
+
}, u = ["opening", "open"].includes(d), l = vn(n, {
|
|
4070
4090
|
element: "li"
|
|
4071
4091
|
});
|
|
4072
4092
|
return /* @__PURE__ */ s.jsxs("div", { className: "thread-wrapper", children: [
|
|
@@ -4076,16 +4096,16 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4076
4096
|
variant: "secondary",
|
|
4077
4097
|
size: "small",
|
|
4078
4098
|
styling: { muted: !0 },
|
|
4079
|
-
icon: { icon: `arrow_corner-down_${
|
|
4099
|
+
icon: { icon: `arrow_corner-down_${u ? "left" : "right"}` },
|
|
4080
4100
|
onClick: () => {
|
|
4081
4101
|
var f;
|
|
4082
|
-
(f =
|
|
4102
|
+
(f = c.updateConversation) == null || f.call(c, (h) => ({
|
|
4083
4103
|
showThread: !h.showThread,
|
|
4084
4104
|
showForm: !1
|
|
4085
4105
|
}));
|
|
4086
4106
|
},
|
|
4087
4107
|
children: r.formatMessage(
|
|
4088
|
-
{ id: `discussion_thread_${
|
|
4108
|
+
{ id: `discussion_thread_${u ? "hide" : "show"}` },
|
|
4089
4109
|
{ count: e }
|
|
4090
4110
|
)
|
|
4091
4111
|
}
|
|
@@ -4093,10 +4113,10 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4093
4113
|
/* @__PURE__ */ s.jsx(
|
|
4094
4114
|
"ul",
|
|
4095
4115
|
{
|
|
4096
|
-
ref:
|
|
4116
|
+
ref: i,
|
|
4097
4117
|
className: E("thread", d),
|
|
4098
|
-
hidden: !
|
|
4099
|
-
children:
|
|
4118
|
+
hidden: !c.showThread,
|
|
4119
|
+
children: l
|
|
4100
4120
|
}
|
|
4101
4121
|
)
|
|
4102
4122
|
] });
|
|
@@ -4129,12 +4149,12 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4129
4149
|
}) => ({ mutationFn: r, onMutate: async ({ content: o }) => {
|
|
4130
4150
|
if (!n)
|
|
4131
4151
|
return;
|
|
4132
|
-
const
|
|
4152
|
+
const a = Pr({ user: n, content: o, verb: "post" });
|
|
4133
4153
|
await e.cancelQueries({ queryKey: t });
|
|
4134
|
-
const
|
|
4135
|
-
return e.setQueryData(t, (
|
|
4136
|
-
}, onError: (o,
|
|
4137
|
-
e.setQueryData(t,
|
|
4154
|
+
const u = e.getQueryData(t);
|
|
4155
|
+
return e.setQueryData(t, (l) => [...l, a]), { previousActivities: u };
|
|
4156
|
+
}, onError: (o, a, u) => {
|
|
4157
|
+
e.setQueryData(t, u.previousActivities);
|
|
4138
4158
|
}, onSettled: () => {
|
|
4139
4159
|
e.invalidateQueries({ queryKey: t });
|
|
4140
4160
|
} }), Fr = ({
|
|
@@ -4150,11 +4170,11 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4150
4170
|
if (o.length === 0)
|
|
4151
4171
|
return;
|
|
4152
4172
|
await e.cancelQueries({ queryKey: t });
|
|
4153
|
-
const
|
|
4154
|
-
return e.setQueryData(t, () =>
|
|
4173
|
+
const a = e.getQueryData(t), u = a == null ? void 0 : a.map((l) => ((l == null ? void 0 : l.id) === (d == null ? void 0 : d.activityId) && (l.content = o), l));
|
|
4174
|
+
return e.setQueryData(t, () => u && [...u]), { previousActivities: u };
|
|
4155
4175
|
},
|
|
4156
|
-
onError: (d, o,
|
|
4157
|
-
e.setQueryData(t,
|
|
4176
|
+
onError: (d, o, a) => {
|
|
4177
|
+
e.setQueryData(t, a.previousActivities);
|
|
4158
4178
|
},
|
|
4159
4179
|
onSettled: () => {
|
|
4160
4180
|
e.invalidateQueries({ queryKey: t });
|
|
@@ -4165,59 +4185,59 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4165
4185
|
mutationFn: n
|
|
4166
4186
|
}) => ({ mutationFn: n, onMutate: async ({ activityId: o }) => {
|
|
4167
4187
|
await e.cancelQueries({ queryKey: t });
|
|
4168
|
-
const
|
|
4188
|
+
const a = e.getQueryData(t), u = a == null ? void 0 : a.map((l) => {
|
|
4169
4189
|
var f;
|
|
4170
|
-
return (
|
|
4190
|
+
return (l == null ? void 0 : l.id) === o && ((f = l.reaction_counts) != null && f.like ? l.reaction_counts.like += 1 : l.reaction_counts.like = 1), l;
|
|
4171
4191
|
});
|
|
4172
|
-
return e.setQueryData(t, () =>
|
|
4173
|
-
}, onError: (o,
|
|
4174
|
-
e.setQueryData(t,
|
|
4192
|
+
return e.setQueryData(t, () => u && [...u]), { previousActivities: u };
|
|
4193
|
+
}, onError: (o, a, u) => {
|
|
4194
|
+
e.setQueryData(t, u.previousActivities);
|
|
4175
4195
|
}, onSuccess: (o) => {
|
|
4176
|
-
const
|
|
4177
|
-
return e.setQueryData(t, () =>
|
|
4178
|
-
}, onSettled: (o,
|
|
4196
|
+
const a = e.getQueryData(t), u = a == null ? void 0 : a.map((l) => ((l == null ? void 0 : l.id) === (o == null ? void 0 : o.activity_id) && (l.own_reactions.like ? l.own_reactions.like.push(o) : l.own_reactions.like = [o]), l));
|
|
4197
|
+
return e.setQueryData(t, () => u && [...u]), { previousActivities: a };
|
|
4198
|
+
}, onSettled: (o, a, u) => {
|
|
4179
4199
|
e.invalidateQueries({
|
|
4180
|
-
queryKey: [...t,
|
|
4200
|
+
queryKey: [...t, u.activityId]
|
|
4181
4201
|
});
|
|
4182
4202
|
} }), Or = ({
|
|
4183
4203
|
queryClient: e,
|
|
4184
4204
|
queryKey: t,
|
|
4185
4205
|
user: n,
|
|
4186
4206
|
mutationFn: r
|
|
4187
|
-
}) => ({ mutationFn: r, onMutate: async ({ activityId:
|
|
4207
|
+
}) => ({ mutationFn: r, onMutate: async ({ activityId: a }) => {
|
|
4188
4208
|
await e.cancelQueries({ queryKey: t });
|
|
4189
|
-
const
|
|
4209
|
+
const u = e.getQueryData(t), l = u == null ? void 0 : u.map((f) => {
|
|
4190
4210
|
var h;
|
|
4191
|
-
return (f == null ? void 0 : f.id) ===
|
|
4211
|
+
return (f == null ? void 0 : f.id) === a && (h = f.reaction_counts) != null && h.like && (f.reaction_counts.like -= 1), f;
|
|
4192
4212
|
});
|
|
4193
|
-
return e.setQueryData(t, () =>
|
|
4194
|
-
}, onError: (
|
|
4195
|
-
e.setQueryData(t,
|
|
4196
|
-
}, onSuccess: (
|
|
4197
|
-
const
|
|
4213
|
+
return e.setQueryData(t, () => l && [...l]), { previousActivities: l };
|
|
4214
|
+
}, onError: (a, u, l) => {
|
|
4215
|
+
e.setQueryData(t, l.previousActivities);
|
|
4216
|
+
}, onSuccess: (a, { activityId: u }) => {
|
|
4217
|
+
const l = e.getQueryData(t), f = l == null ? void 0 : l.map((h) => {
|
|
4198
4218
|
var p, _, j, g;
|
|
4199
|
-
if (h.id ===
|
|
4200
|
-
const S = (j = (_ = (p = h.
|
|
4219
|
+
if (h.id === u) {
|
|
4220
|
+
const S = (j = (_ = (p = h.own_reactions) == null ? void 0 : p.like) == null ? void 0 : _.find(
|
|
4201
4221
|
(k) => k.user_id === (n == null ? void 0 : n.id)
|
|
4202
4222
|
)) == null ? void 0 : j.id;
|
|
4203
|
-
return h.
|
|
4223
|
+
return h.own_reactions.like = (g = h.own_reactions.like) == null ? void 0 : g.filter(
|
|
4204
4224
|
(k) => k.id !== S
|
|
4205
4225
|
), h;
|
|
4206
4226
|
} else
|
|
4207
4227
|
return h;
|
|
4208
4228
|
});
|
|
4209
|
-
return e.setQueryData(t, () => f && [...f]), { previousActivities:
|
|
4210
|
-
}, onSettled: (
|
|
4229
|
+
return e.setQueryData(t, () => f && [...f]), { previousActivities: l };
|
|
4230
|
+
}, onSettled: (a, u, l) => {
|
|
4211
4231
|
e.invalidateQueries({
|
|
4212
|
-
queryKey: [...t,
|
|
4232
|
+
queryKey: [...t, l.activityId]
|
|
4213
4233
|
});
|
|
4214
4234
|
} }), Po = ({
|
|
4215
4235
|
basePath: e,
|
|
4216
4236
|
parentId: t,
|
|
4217
4237
|
isMember: n,
|
|
4218
|
-
functions: { list: r, create:
|
|
4238
|
+
functions: { list: r, create: i, edit: c, like: d, unlike: o, join: a, leave: u }
|
|
4219
4239
|
}) => {
|
|
4220
|
-
const
|
|
4240
|
+
const l = A(), f = st(), h = ge(Se), {
|
|
4221
4241
|
data: p,
|
|
4222
4242
|
error: _,
|
|
4223
4243
|
isLoading: j,
|
|
@@ -4229,11 +4249,11 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4229
4249
|
queryClient: f,
|
|
4230
4250
|
queryKey: [e, t],
|
|
4231
4251
|
user: h,
|
|
4232
|
-
mutationFn:
|
|
4252
|
+
mutationFn: i
|
|
4233
4253
|
}), { mutate: k } = de(S), T = Fr({
|
|
4234
4254
|
queryClient: f,
|
|
4235
4255
|
queryKey: [e, t],
|
|
4236
|
-
mutationFn: async (w) => await
|
|
4256
|
+
mutationFn: async (w) => await c(w)
|
|
4237
4257
|
}), {
|
|
4238
4258
|
mutate: M
|
|
4239
4259
|
} = de(T), C = Lr({
|
|
@@ -4273,9 +4293,9 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4273
4293
|
membershipRequiredToPost: {
|
|
4274
4294
|
isMember: n,
|
|
4275
4295
|
required: !0,
|
|
4276
|
-
join:
|
|
4277
|
-
leave:
|
|
4278
|
-
notMemberStateText:
|
|
4296
|
+
join: a,
|
|
4297
|
+
leave: u,
|
|
4298
|
+
notMemberStateText: l.formatMessage({ id: "community_joinToPost" })
|
|
4279
4299
|
}
|
|
4280
4300
|
}
|
|
4281
4301
|
),
|
|
@@ -4284,7 +4304,7 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4284
4304
|
const Y = ((O = w == null ? void 0 : w.actor) == null ? void 0 : O.id) === (h == null ? void 0 : h.id), L = Ht(n, Y);
|
|
4285
4305
|
return /* @__PURE__ */ s.jsxs(Ct, { children: [
|
|
4286
4306
|
/* @__PURE__ */ s.jsx(
|
|
4287
|
-
|
|
4307
|
+
lt,
|
|
4288
4308
|
{
|
|
4289
4309
|
content: {
|
|
4290
4310
|
type: "post",
|
|
@@ -4341,17 +4361,17 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4341
4361
|
mutationFn: n
|
|
4342
4362
|
}) => ({ mutationFn: n, onMutate: async () => {
|
|
4343
4363
|
await e.cancelQueries({ queryKey: t });
|
|
4344
|
-
}, onError: (o,
|
|
4345
|
-
e.setQueryData(t,
|
|
4364
|
+
}, onError: (o, a, u) => {
|
|
4365
|
+
e.setQueryData(t, u.previousActivity);
|
|
4346
4366
|
}, onSuccess: (o) => {
|
|
4347
|
-
var
|
|
4348
|
-
const
|
|
4349
|
-
if (
|
|
4350
|
-
return (
|
|
4351
|
-
reply:
|
|
4352
|
-
})) : (
|
|
4353
|
-
...
|
|
4354
|
-
})), { previousActivity:
|
|
4367
|
+
var u;
|
|
4368
|
+
const a = e.getQueryData(t);
|
|
4369
|
+
if (a)
|
|
4370
|
+
return (u = a == null ? void 0 : a.latest_reactions) != null && u.reply ? (a.latest_reactions.reply.unshift(o), a && (a.reaction_counts = {
|
|
4371
|
+
reply: a.latest_reactions.reply.length
|
|
4372
|
+
})) : (a.latest_reactions = { reply: [o] }, a.reaction_counts = { reply: 1 }), e.setQueryData(t, () => ({
|
|
4373
|
+
...a
|
|
4374
|
+
})), { previousActivity: a };
|
|
4355
4375
|
}, onSettled: () => {
|
|
4356
4376
|
e.invalidateQueries({ queryKey: t });
|
|
4357
4377
|
} }), Ir = ({
|
|
@@ -4361,23 +4381,23 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4361
4381
|
}) => ({
|
|
4362
4382
|
mutationFn: n,
|
|
4363
4383
|
onMutate: async ({
|
|
4364
|
-
replyInfo:
|
|
4384
|
+
replyInfo: c,
|
|
4365
4385
|
content: { body: d }
|
|
4366
4386
|
}) => {
|
|
4367
|
-
var
|
|
4387
|
+
var u, l, f;
|
|
4368
4388
|
if (d.length === 0)
|
|
4369
4389
|
return;
|
|
4370
4390
|
await e.cancelQueries({ queryKey: t });
|
|
4371
4391
|
const o = e.getQueryData(t);
|
|
4372
|
-
if (!o || !((
|
|
4392
|
+
if (!o || !((u = o == null ? void 0 : o.latest_reactions) != null && u.reply))
|
|
4373
4393
|
return;
|
|
4374
|
-
const
|
|
4394
|
+
const a = (f = (l = o == null ? void 0 : o.latest_reactions) == null ? void 0 : l.reply) == null ? void 0 : f.map((h) => (h.id === c.replySlug && (h.data.content = d), h));
|
|
4375
4395
|
return e.setQueryData(t, () => ({
|
|
4376
4396
|
...o,
|
|
4377
|
-
latest_reactions: { reply:
|
|
4397
|
+
latest_reactions: { reply: a }
|
|
4378
4398
|
})), { previousActivity: o };
|
|
4379
4399
|
},
|
|
4380
|
-
onError: (
|
|
4400
|
+
onError: (c, d, o) => {
|
|
4381
4401
|
e.setQueryData(t, o.previousActivity);
|
|
4382
4402
|
}
|
|
4383
4403
|
}), Hr = ({
|
|
@@ -4385,24 +4405,27 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4385
4405
|
queryKey: t,
|
|
4386
4406
|
mutationFn: n
|
|
4387
4407
|
}) => ({ mutationFn: n, onMutate: async ({ replyId: d }) => {
|
|
4388
|
-
var
|
|
4408
|
+
var u, l;
|
|
4389
4409
|
await e.cancelQueries({ queryKey: t });
|
|
4390
|
-
const o = e.getQueryData(t),
|
|
4410
|
+
const o = e.getQueryData(t), a = (l = (u = o == null ? void 0 : o.latest_reactions) == null ? void 0 : u.reply) == null ? void 0 : l.map((f) => {
|
|
4391
4411
|
var h;
|
|
4392
4412
|
return f.id === d && ((h = f.children_counts) != null && h.like ? f.children_counts.like += 1 : f.children_counts = { like: 1 }), f;
|
|
4393
4413
|
});
|
|
4394
4414
|
return e.setQueryData(t, () => ({
|
|
4395
4415
|
...o,
|
|
4396
|
-
latest_reactions: { reply:
|
|
4416
|
+
latest_reactions: { reply: a }
|
|
4397
4417
|
})), { previousActivity: o };
|
|
4398
|
-
}, onError: (d, o,
|
|
4399
|
-
e.setQueryData(t,
|
|
4418
|
+
}, onError: (d, o, a) => {
|
|
4419
|
+
e.setQueryData(t, a.previousActivity);
|
|
4400
4420
|
}, onSuccess: (d) => {
|
|
4401
|
-
var
|
|
4402
|
-
const o = e.getQueryData(t),
|
|
4421
|
+
var u;
|
|
4422
|
+
const o = e.getQueryData(t), a = (u = o == null ? void 0 : o.latest_reactions.reply) == null ? void 0 : u.map((l) => {
|
|
4423
|
+
var f;
|
|
4424
|
+
return l.id === d.id && ((f = l.own_children) != null && f.like ? l.own_children.like.push(d) : l.own_children = { like: [d] }), l;
|
|
4425
|
+
});
|
|
4403
4426
|
return e.setQueryData(t, () => ({
|
|
4404
4427
|
...o,
|
|
4405
|
-
latest_reactions: { reply:
|
|
4428
|
+
latest_reactions: { reply: a }
|
|
4406
4429
|
})), { previousActivity: o };
|
|
4407
4430
|
} }), Qr = ({
|
|
4408
4431
|
queryClient: e,
|
|
@@ -4410,33 +4433,33 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4410
4433
|
user: n,
|
|
4411
4434
|
mutationFn: r
|
|
4412
4435
|
}) => ({ mutationFn: r, onMutate: async ({ replyId: o }) => {
|
|
4413
|
-
var
|
|
4436
|
+
var l;
|
|
4414
4437
|
await e.cancelQueries({ queryKey: t });
|
|
4415
|
-
const
|
|
4416
|
-
if (!
|
|
4438
|
+
const a = e.getQueryData(t);
|
|
4439
|
+
if (!a)
|
|
4417
4440
|
return;
|
|
4418
|
-
const
|
|
4441
|
+
const u = (l = a.latest_reactions.reply) == null ? void 0 : l.map((f) => (f.id === o && f.children_counts.like && (f.children_counts.like -= 1), f));
|
|
4419
4442
|
return e.setQueryData(t, () => ({
|
|
4420
|
-
...
|
|
4421
|
-
latest_reactions: { reply:
|
|
4422
|
-
})), { previousActivity:
|
|
4423
|
-
}, onError: (o,
|
|
4424
|
-
e.setQueryData(t,
|
|
4425
|
-
}, onSuccess: (o, { replyId:
|
|
4443
|
+
...a,
|
|
4444
|
+
latest_reactions: { reply: u }
|
|
4445
|
+
})), { previousActivity: a };
|
|
4446
|
+
}, onError: (o, a, u) => {
|
|
4447
|
+
e.setQueryData(t, u.previousActivity);
|
|
4448
|
+
}, onSuccess: (o, { replyId: a }) => {
|
|
4426
4449
|
var f;
|
|
4427
|
-
const
|
|
4428
|
-
if (!
|
|
4450
|
+
const u = e.getQueryData(t);
|
|
4451
|
+
if (!u)
|
|
4429
4452
|
return;
|
|
4430
|
-
const
|
|
4453
|
+
const l = (f = u.latest_reactions.reply) == null ? void 0 : f.map((h) => {
|
|
4431
4454
|
var p;
|
|
4432
|
-
return h.id ===
|
|
4455
|
+
return h.id === a ? (p = h.latest_children.reply) == null ? void 0 : p.filter(
|
|
4433
4456
|
(j) => j.user_id !== (n == null ? void 0 : n.id)
|
|
4434
4457
|
) : h;
|
|
4435
4458
|
});
|
|
4436
4459
|
return e.setQueryData(t, () => ({
|
|
4437
|
-
...
|
|
4438
|
-
latest_reactions: { reply:
|
|
4439
|
-
})), { previousActivity:
|
|
4460
|
+
...u,
|
|
4461
|
+
latest_reactions: { reply: l }
|
|
4462
|
+
})), { previousActivity: u };
|
|
4440
4463
|
} }), Ur = ({
|
|
4441
4464
|
queryClient: e,
|
|
4442
4465
|
queryKey: t,
|
|
@@ -4447,15 +4470,15 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4447
4470
|
await e.cancelQueries({ queryKey: t });
|
|
4448
4471
|
},
|
|
4449
4472
|
onSuccess: (o) => {
|
|
4450
|
-
var
|
|
4451
|
-
const
|
|
4473
|
+
var l;
|
|
4474
|
+
const a = e.getQueryData(t), u = (l = a == null ? void 0 : a.latest_reactions.reply) == null ? void 0 : l.map((f) => (f.id === o.parent && (f.latest_children.reply && f.children_counts.reply ? (f.latest_children.reply.push(o), f.children_counts.reply += 1) : (f.latest_children.reply = [o], f.children_counts.reply = 1)), f));
|
|
4452
4475
|
return e.setQueryData(t, () => ({
|
|
4453
|
-
...
|
|
4454
|
-
latest_reactions: { reply:
|
|
4455
|
-
})), { previousActivity:
|
|
4476
|
+
...a,
|
|
4477
|
+
latest_reactions: { reply: u }
|
|
4478
|
+
})), { previousActivity: a };
|
|
4456
4479
|
},
|
|
4457
|
-
onError: (o,
|
|
4458
|
-
e.setQueryData(t,
|
|
4480
|
+
onError: (o, a, u) => {
|
|
4481
|
+
e.setQueryData(t, u.previousActivity);
|
|
4459
4482
|
},
|
|
4460
4483
|
onSettled: () => {
|
|
4461
4484
|
e.invalidateQueries({ queryKey: t });
|
|
@@ -4464,26 +4487,26 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4464
4487
|
queryClient: e,
|
|
4465
4488
|
queryKey: t,
|
|
4466
4489
|
mutationFn: n
|
|
4467
|
-
}) => ({ mutationFn: n, onError: (
|
|
4490
|
+
}) => ({ mutationFn: n, onError: (c, d, o) => {
|
|
4468
4491
|
e.setQueryData(t, o.previousActivity);
|
|
4469
4492
|
}, onMutate: async ({
|
|
4470
|
-
replyInfo:
|
|
4493
|
+
replyInfo: c,
|
|
4471
4494
|
content: { body: d }
|
|
4472
4495
|
}) => {
|
|
4473
|
-
var
|
|
4496
|
+
var u, l, f;
|
|
4474
4497
|
if (d.length === 0)
|
|
4475
4498
|
return;
|
|
4476
4499
|
await e.cancelQueries({ queryKey: t });
|
|
4477
4500
|
const o = e.getQueryData(t);
|
|
4478
|
-
if (!o || !((
|
|
4501
|
+
if (!o || !((u = o == null ? void 0 : o.latest_reactions) != null && u.reply))
|
|
4479
4502
|
return;
|
|
4480
|
-
const
|
|
4503
|
+
const a = (f = (l = o == null ? void 0 : o.latest_reactions) == null ? void 0 : l.reply) == null ? void 0 : f.map((h) => {
|
|
4481
4504
|
var p;
|
|
4482
|
-
return h.id ===
|
|
4505
|
+
return h.id === c.replyParentId && ((p = h.latest_children.reply) == null || p.map((_) => (_.id === c.replySlug && (_.data.content = d), _))), h;
|
|
4483
4506
|
});
|
|
4484
4507
|
return e.setQueryData(t, () => ({
|
|
4485
4508
|
...o,
|
|
4486
|
-
latest_reactions: { reply:
|
|
4509
|
+
latest_reactions: { reply: a }
|
|
4487
4510
|
})), { previousActivity: o };
|
|
4488
4511
|
} }), mn = ({
|
|
4489
4512
|
queryClient: e,
|
|
@@ -4493,9 +4516,9 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4493
4516
|
replyId: d,
|
|
4494
4517
|
replyParentId: o
|
|
4495
4518
|
}) => {
|
|
4496
|
-
var
|
|
4519
|
+
var l;
|
|
4497
4520
|
await e.cancelQueries({ queryKey: t });
|
|
4498
|
-
const
|
|
4521
|
+
const a = e.getQueryData(t), u = (l = a == null ? void 0 : a.latest_reactions.reply) == null ? void 0 : l.map((f) => {
|
|
4499
4522
|
var h;
|
|
4500
4523
|
return f.id === o && ((h = f.latest_children.reply) == null || h.map((p) => {
|
|
4501
4524
|
var _;
|
|
@@ -4503,31 +4526,31 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4503
4526
|
})), f;
|
|
4504
4527
|
});
|
|
4505
4528
|
return e.setQueryData(t, () => ({
|
|
4506
|
-
...
|
|
4507
|
-
latest_reactions: { reply:
|
|
4508
|
-
})), { previousActivity:
|
|
4509
|
-
}, onError: (d, o,
|
|
4510
|
-
e.setQueryData(t,
|
|
4529
|
+
...a,
|
|
4530
|
+
latest_reactions: { reply: u }
|
|
4531
|
+
})), { previousActivity: a };
|
|
4532
|
+
}, onError: (d, o, a) => {
|
|
4533
|
+
e.setQueryData(t, a.previousActivity);
|
|
4511
4534
|
}, onSuccess: (d, o) => {
|
|
4512
|
-
var
|
|
4513
|
-
const
|
|
4535
|
+
var l;
|
|
4536
|
+
const a = e.getQueryData(t), u = (l = a == null ? void 0 : a.latest_reactions.reply) == null ? void 0 : l.map((f) => {
|
|
4514
4537
|
var h;
|
|
4515
|
-
return f.id === o.replyParentId && ((h = f.latest_children.reply) == null || h.map((p) => (p.id === o.replyId && (p.
|
|
4538
|
+
return f.id === o.replyParentId && ((h = f.latest_children.reply) == null || h.map((p) => (p.id === o.replyId && (p.own_children = p.own_children || {}, p.own_children.like = p.own_children.like || [], p.own_children.like.push(d)), p))), f;
|
|
4516
4539
|
});
|
|
4517
4540
|
return e.setQueryData(t, () => ({
|
|
4518
|
-
...
|
|
4519
|
-
latest_reactions: { reply:
|
|
4520
|
-
})), { previousActivity:
|
|
4541
|
+
...a,
|
|
4542
|
+
latest_reactions: { reply: u }
|
|
4543
|
+
})), { previousActivity: a };
|
|
4521
4544
|
} }), Wr = ({
|
|
4522
4545
|
basePath: e,
|
|
4523
4546
|
parentId: t,
|
|
4524
4547
|
replyParentId: n,
|
|
4525
4548
|
activityId: r,
|
|
4526
|
-
replyCount:
|
|
4527
|
-
replies:
|
|
4528
|
-
functions: { create: d, edit: o, join:
|
|
4549
|
+
replyCount: i,
|
|
4550
|
+
replies: c,
|
|
4551
|
+
functions: { create: d, edit: o, join: a, leave: u, like: l, unlike: f }
|
|
4529
4552
|
}) => {
|
|
4530
|
-
const h =
|
|
4553
|
+
const h = A(), p = st(), _ = ge(ct), j = Ur({
|
|
4531
4554
|
queryClient: p,
|
|
4532
4555
|
queryKey: [e, t, r],
|
|
4533
4556
|
mutationFn: async (b) => d({ replyId: n, content: b.body })
|
|
@@ -4540,7 +4563,7 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4540
4563
|
} = de(S), T = mn({
|
|
4541
4564
|
queryClient: p,
|
|
4542
4565
|
queryKey: [e, t, r],
|
|
4543
|
-
mutationFn:
|
|
4566
|
+
mutationFn: l
|
|
4544
4567
|
}), {
|
|
4545
4568
|
mutate: M
|
|
4546
4569
|
} = de(T), C = mn({
|
|
@@ -4557,15 +4580,29 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4557
4580
|
[I]
|
|
4558
4581
|
);
|
|
4559
4582
|
return /* @__PURE__ */ s.jsx(
|
|
4560
|
-
|
|
4583
|
+
Ar,
|
|
4561
4584
|
{
|
|
4562
|
-
count:
|
|
4563
|
-
showRepliesButton:
|
|
4585
|
+
count: i,
|
|
4586
|
+
showRepliesButton: i > 0 || _.showForm,
|
|
4564
4587
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
4565
|
-
|
|
4588
|
+
_.showForm && /* @__PURE__ */ s.jsx(
|
|
4589
|
+
It,
|
|
4590
|
+
{
|
|
4591
|
+
contentType: "reply",
|
|
4592
|
+
createPost: (b, Q) => g(Q),
|
|
4593
|
+
membershipRequiredToPost: {
|
|
4594
|
+
isMember: !0,
|
|
4595
|
+
required: !0,
|
|
4596
|
+
join: a,
|
|
4597
|
+
leave: u,
|
|
4598
|
+
notMemberStateText: h.formatMessage({ id: "community_joinToPost" })
|
|
4599
|
+
}
|
|
4600
|
+
}
|
|
4601
|
+
),
|
|
4602
|
+
(c == null ? void 0 : c.length) === 0 || (c == null ? void 0 : c.map((b) => {
|
|
4566
4603
|
var Q, w, Y, L, O, U, W, Z, re, oe, ae, ie, se, P, te;
|
|
4567
4604
|
return /* @__PURE__ */ s.jsx(
|
|
4568
|
-
|
|
4605
|
+
lt,
|
|
4569
4606
|
{
|
|
4570
4607
|
content: {
|
|
4571
4608
|
type: "reply",
|
|
@@ -4614,21 +4651,7 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4614
4651
|
},
|
|
4615
4652
|
b == null ? void 0 : b.id
|
|
4616
4653
|
);
|
|
4617
|
-
}))
|
|
4618
|
-
_.showForm && /* @__PURE__ */ s.jsx(
|
|
4619
|
-
It,
|
|
4620
|
-
{
|
|
4621
|
-
contentType: "reply",
|
|
4622
|
-
createPost: (b, Q) => g(Q),
|
|
4623
|
-
membershipRequiredToPost: {
|
|
4624
|
-
isMember: !0,
|
|
4625
|
-
required: !0,
|
|
4626
|
-
join: i,
|
|
4627
|
-
leave: c,
|
|
4628
|
-
notMemberStateText: h.formatMessage({ id: "community_joinToPost" })
|
|
4629
|
-
}
|
|
4630
|
-
}
|
|
4631
|
-
)
|
|
4654
|
+
}))
|
|
4632
4655
|
] })
|
|
4633
4656
|
}
|
|
4634
4657
|
);
|
|
@@ -4637,13 +4660,13 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4637
4660
|
parentId: t,
|
|
4638
4661
|
activityId: n,
|
|
4639
4662
|
repliesList: r,
|
|
4640
|
-
isMember:
|
|
4641
|
-
functions: { createReply:
|
|
4663
|
+
isMember: i,
|
|
4664
|
+
functions: { createReply: c, editReply: d, like: o, unlike: a, join: u, leave: l }
|
|
4642
4665
|
}) => {
|
|
4643
|
-
const f =
|
|
4666
|
+
const f = A(), h = st(), p = ge(Se), _ = Br({
|
|
4644
4667
|
queryClient: h,
|
|
4645
4668
|
queryKey: [e, t, n],
|
|
4646
|
-
mutationFn: async (x) =>
|
|
4669
|
+
mutationFn: async (x) => c({ activityId: n, content: x.body })
|
|
4647
4670
|
}), { mutate: j } = de(_), g = Ir({
|
|
4648
4671
|
queryClient: h,
|
|
4649
4672
|
queryKey: [e, t, n],
|
|
@@ -4660,7 +4683,7 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4660
4683
|
queryClient: h,
|
|
4661
4684
|
queryKey: [e, t, n],
|
|
4662
4685
|
user: p,
|
|
4663
|
-
mutationFn:
|
|
4686
|
+
mutationFn: a
|
|
4664
4687
|
}), {
|
|
4665
4688
|
mutate: C
|
|
4666
4689
|
} = de(M), I = ke(
|
|
@@ -4675,23 +4698,21 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4675
4698
|
It,
|
|
4676
4699
|
{
|
|
4677
4700
|
contentType: "reply",
|
|
4678
|
-
createPost: (x, b) =>
|
|
4679
|
-
j(b);
|
|
4680
|
-
},
|
|
4701
|
+
createPost: (x, b) => j(b),
|
|
4681
4702
|
membershipRequiredToPost: {
|
|
4682
|
-
isMember:
|
|
4703
|
+
isMember: i,
|
|
4683
4704
|
required: !0,
|
|
4684
|
-
join:
|
|
4685
|
-
leave:
|
|
4705
|
+
join: u,
|
|
4706
|
+
leave: l,
|
|
4686
4707
|
notMemberStateText: f.formatMessage({ id: "community_joinToPost" })
|
|
4687
4708
|
}
|
|
4688
4709
|
}
|
|
4689
4710
|
),
|
|
4690
4711
|
(r == null ? void 0 : r.length) === 0 || (r == null ? void 0 : r.map((x) => {
|
|
4691
4712
|
var w, Y, L, O, U, W, Z, re, oe, ae, ie, se, P, te, G, K, ue, fe;
|
|
4692
|
-
const b = ((w = x == null ? void 0 : x.user) == null ? void 0 : w.id) === (p == null ? void 0 : p.id), Q = Ht(
|
|
4713
|
+
const b = ((w = x == null ? void 0 : x.user) == null ? void 0 : w.id) === (p == null ? void 0 : p.id), Q = Ht(i, b);
|
|
4693
4714
|
return /* @__PURE__ */ s.jsx(Sr, { children: /* @__PURE__ */ s.jsx(
|
|
4694
|
-
|
|
4715
|
+
lt,
|
|
4695
4716
|
{
|
|
4696
4717
|
content: {
|
|
4697
4718
|
type: "reply",
|
|
@@ -4725,8 +4746,8 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4725
4746
|
likes: {
|
|
4726
4747
|
createLike: () => I({ replyId: x == null ? void 0 : x.id }),
|
|
4727
4748
|
deleteLike: () => {
|
|
4728
|
-
var xe, Ie,
|
|
4729
|
-
const _e = ((xe = x == null ? void 0 : x.own_children) == null ? void 0 : xe.like) && ((
|
|
4749
|
+
var xe, Ie, Ae;
|
|
4750
|
+
const _e = ((xe = x == null ? void 0 : x.own_children) == null ? void 0 : xe.like) && ((Ae = (Ie = x == null ? void 0 : x.own_children) == null ? void 0 : Ie.like[0]) == null ? void 0 : Ae.id);
|
|
4730
4751
|
return V({ replyId: _e || "" });
|
|
4731
4752
|
}
|
|
4732
4753
|
},
|
|
@@ -4741,14 +4762,14 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4741
4762
|
activityId: n,
|
|
4742
4763
|
replyCount: ((ue = x == null ? void 0 : x.children_counts) == null ? void 0 : ue.reply) || 0,
|
|
4743
4764
|
replies: (fe = x == null ? void 0 : x.latest_children) == null ? void 0 : fe.reply,
|
|
4744
|
-
isMember:
|
|
4765
|
+
isMember: i,
|
|
4745
4766
|
functions: {
|
|
4746
|
-
create:
|
|
4767
|
+
create: c,
|
|
4747
4768
|
edit: d,
|
|
4748
4769
|
like: o,
|
|
4749
|
-
unlike:
|
|
4750
|
-
join:
|
|
4751
|
-
leave:
|
|
4770
|
+
unlike: a,
|
|
4771
|
+
join: u,
|
|
4772
|
+
leave: l
|
|
4752
4773
|
}
|
|
4753
4774
|
}
|
|
4754
4775
|
)
|
|
@@ -4770,13 +4791,13 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4770
4791
|
if (o.length === 0)
|
|
4771
4792
|
return;
|
|
4772
4793
|
await e.cancelQueries({ queryKey: t });
|
|
4773
|
-
const
|
|
4774
|
-
return
|
|
4775
|
-
...
|
|
4776
|
-
})), { previousActivity:
|
|
4794
|
+
const a = e.getQueryData(t);
|
|
4795
|
+
return a && a.id === (d == null ? void 0 : d.activityId) && (a.content = o), e.setQueryData(t, () => ({
|
|
4796
|
+
...a
|
|
4797
|
+
})), { previousActivity: a };
|
|
4777
4798
|
},
|
|
4778
|
-
onError: (d, o,
|
|
4779
|
-
e.setQueryData(t,
|
|
4799
|
+
onError: (d, o, a) => {
|
|
4800
|
+
e.setQueryData(t, a.previousActivity);
|
|
4780
4801
|
},
|
|
4781
4802
|
onSettled: () => {
|
|
4782
4803
|
e.invalidateQueries({ queryKey: t });
|
|
@@ -4786,19 +4807,19 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4786
4807
|
queryKey: t,
|
|
4787
4808
|
mutationFn: n
|
|
4788
4809
|
}) => ({ mutationFn: n, onMutate: async () => {
|
|
4789
|
-
var
|
|
4810
|
+
var a;
|
|
4790
4811
|
await e.cancelQueries({ queryKey: t });
|
|
4791
4812
|
const o = e.getQueryData(t);
|
|
4792
|
-
return (
|
|
4813
|
+
return (a = o == null ? void 0 : o.reaction_counts) != null && a.like ? o.reaction_counts.like += 1 : o && (o.reaction_counts = { like: 1 }), e.setQueryData(t, () => ({
|
|
4793
4814
|
...o
|
|
4794
4815
|
})), { previousActivity: o };
|
|
4795
|
-
}, onError: (o,
|
|
4796
|
-
e.setQueryData(t,
|
|
4816
|
+
}, onError: (o, a, u) => {
|
|
4817
|
+
e.setQueryData(t, u.previousActivity);
|
|
4797
4818
|
}, onSuccess: (o) => {
|
|
4798
|
-
const
|
|
4799
|
-
return
|
|
4800
|
-
...
|
|
4801
|
-
})), { previousActivity:
|
|
4819
|
+
const a = e.getQueryData(t);
|
|
4820
|
+
return a != null && a.own_reactions.like ? a.own_reactions.like.push(o) : a && (a.own_reactions = { like: [o] }), e.setQueryData(t, () => ({
|
|
4821
|
+
...a
|
|
4822
|
+
})), { previousActivity: a };
|
|
4802
4823
|
}, onSettled: () => {
|
|
4803
4824
|
e.invalidateQueries({ queryKey: t });
|
|
4804
4825
|
} }), Jr = ({
|
|
@@ -4806,44 +4827,45 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4806
4827
|
queryKey: t,
|
|
4807
4828
|
user: n,
|
|
4808
4829
|
activity: r,
|
|
4809
|
-
mutationFn:
|
|
4810
|
-
}) => ({ mutationFn:
|
|
4811
|
-
var
|
|
4830
|
+
mutationFn: i
|
|
4831
|
+
}) => ({ mutationFn: i, onMutate: async () => {
|
|
4832
|
+
var l;
|
|
4812
4833
|
await e.cancelQueries({ queryKey: t });
|
|
4813
|
-
const
|
|
4814
|
-
return (
|
|
4815
|
-
...
|
|
4816
|
-
})), { previousActivity:
|
|
4817
|
-
}, onError: (
|
|
4834
|
+
const u = e.getQueryData(t);
|
|
4835
|
+
return (l = u == null ? void 0 : u.reaction_counts) != null && l.like && u.reaction_counts.like > 0 && (u.reaction_counts.like -= 1), e.setQueryData(t, () => ({
|
|
4836
|
+
...u
|
|
4837
|
+
})), { previousActivity: u };
|
|
4838
|
+
}, onError: (u, l, f) => {
|
|
4818
4839
|
e.setQueryData(t, f.previousActivity);
|
|
4819
4840
|
}, onSuccess: () => {
|
|
4820
4841
|
var f, h, p;
|
|
4821
4842
|
if (!r)
|
|
4822
4843
|
return;
|
|
4823
|
-
const
|
|
4844
|
+
const u = (p = (h = (f = r.own_reactions) == null ? void 0 : f.like) == null ? void 0 : h.find(
|
|
4824
4845
|
(_) => _.user_id === (n == null ? void 0 : n.id)
|
|
4825
|
-
)) == null ? void 0 : p.id,
|
|
4826
|
-
if (
|
|
4827
|
-
return
|
|
4828
|
-
(_) => _.id !==
|
|
4846
|
+
)) == null ? void 0 : p.id, l = e.getQueryData(t);
|
|
4847
|
+
if (l != null && l.own_reactions.like)
|
|
4848
|
+
return l.own_reactions.like = l.own_reactions.like.filter(
|
|
4849
|
+
(_) => _.id !== u
|
|
4829
4850
|
), e.setQueryData(t, () => ({
|
|
4830
|
-
...
|
|
4831
|
-
})), { previousActivity:
|
|
4851
|
+
...l
|
|
4852
|
+
})), { previousActivity: l };
|
|
4832
4853
|
}, onSettled: () => {
|
|
4833
4854
|
e.invalidateQueries({ queryKey: t });
|
|
4834
|
-
} })
|
|
4855
|
+
} });
|
|
4856
|
+
const Ro = ({
|
|
4835
4857
|
basePath: e,
|
|
4836
4858
|
parentId: t,
|
|
4837
4859
|
activityId: n,
|
|
4838
4860
|
isMember: r,
|
|
4839
4861
|
functions: {
|
|
4840
|
-
get:
|
|
4841
|
-
editActivity:
|
|
4862
|
+
get: i,
|
|
4863
|
+
editActivity: c,
|
|
4842
4864
|
likeActivity: d,
|
|
4843
4865
|
unlikeActivity: o,
|
|
4844
|
-
createReply:
|
|
4845
|
-
editReply:
|
|
4846
|
-
likeReply:
|
|
4866
|
+
createReply: a,
|
|
4867
|
+
editReply: u,
|
|
4868
|
+
likeReply: l,
|
|
4847
4869
|
unlikeReply: f,
|
|
4848
4870
|
join: h,
|
|
4849
4871
|
leave: p
|
|
@@ -4857,11 +4879,11 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4857
4879
|
isFetching: T
|
|
4858
4880
|
} = fn({
|
|
4859
4881
|
queryKey: [e, t, n],
|
|
4860
|
-
queryFn:
|
|
4882
|
+
queryFn: i
|
|
4861
4883
|
}), M = Yr({
|
|
4862
4884
|
queryClient: j,
|
|
4863
4885
|
queryKey: [e, t, n],
|
|
4864
|
-
mutationFn: async (G) => await
|
|
4886
|
+
mutationFn: async (G) => await c(G)
|
|
4865
4887
|
}), {
|
|
4866
4888
|
mutate: C
|
|
4867
4889
|
} = de(M), I = Gr({
|
|
@@ -4897,8 +4919,9 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4897
4919
|
return /* @__PURE__ */ s.jsx(je, { style: { height: "400px" } });
|
|
4898
4920
|
const Y = ((O = g == null ? void 0 : g.actor) == null ? void 0 : O.id) === (_ == null ? void 0 : _.id), L = Ht(r, Y);
|
|
4899
4921
|
return /* @__PURE__ */ s.jsx(
|
|
4900
|
-
|
|
4922
|
+
lt,
|
|
4901
4923
|
{
|
|
4924
|
+
className: "activity-section",
|
|
4902
4925
|
content: {
|
|
4903
4926
|
type: "post",
|
|
4904
4927
|
body: g == null ? void 0 : g.content,
|
|
@@ -4954,10 +4977,10 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4954
4977
|
repliesList: (te = g == null ? void 0 : g.latest_reactions) == null ? void 0 : te.reply,
|
|
4955
4978
|
isMember: r,
|
|
4956
4979
|
functions: {
|
|
4957
|
-
createReply:
|
|
4958
|
-
like:
|
|
4980
|
+
createReply: a,
|
|
4981
|
+
like: l,
|
|
4959
4982
|
unlike: f,
|
|
4960
|
-
editReply:
|
|
4983
|
+
editReply: u,
|
|
4961
4984
|
join: h,
|
|
4962
4985
|
leave: p
|
|
4963
4986
|
}
|
|
@@ -4967,15 +4990,15 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4967
4990
|
},
|
|
4968
4991
|
n
|
|
4969
4992
|
);
|
|
4970
|
-
}, Fo = ({ id: e, data: { jobTitle: t, name: n, organization: r, thumbnail:
|
|
4993
|
+
}, Fo = ({ id: e, data: { jobTitle: t, name: n, organization: r, thumbnail: i } }) => ({
|
|
4971
4994
|
id: e,
|
|
4972
4995
|
name: n,
|
|
4973
4996
|
jobTitle: t,
|
|
4974
4997
|
organization: r,
|
|
4975
|
-
image: { thumbnail:
|
|
4998
|
+
image: { thumbnail: i }
|
|
4976
4999
|
});
|
|
4977
5000
|
export {
|
|
4978
|
-
|
|
5001
|
+
Nt as ASSETS_BUCKET,
|
|
4979
5002
|
Po as ActivitiesFeed,
|
|
4980
5003
|
Ro as ActivitySection,
|
|
4981
5004
|
It as AddPost,
|
|
@@ -4988,13 +5011,13 @@ export {
|
|
|
4988
5011
|
Eo as Columns,
|
|
4989
5012
|
wo as CommunityDetails,
|
|
4990
5013
|
ar as Contributors,
|
|
4991
|
-
|
|
5014
|
+
ct as ConversationContext,
|
|
4992
5015
|
_r as CookieBanner,
|
|
4993
5016
|
Sr as DiscussionConversation,
|
|
4994
5017
|
Pn as DiscussionForm,
|
|
4995
5018
|
Mr as DiscussionLikes,
|
|
4996
|
-
|
|
4997
|
-
|
|
5019
|
+
lt as DiscussionPost,
|
|
5020
|
+
Ar as DiscussionThread,
|
|
4998
5021
|
De as Divider,
|
|
4999
5022
|
fo as DownloadSection,
|
|
5000
5023
|
Oe as EMAILS,
|
|
@@ -5005,14 +5028,14 @@ export {
|
|
|
5005
5028
|
Mn as Footer,
|
|
5006
5029
|
wn as FullWidthSection,
|
|
5007
5030
|
vo as GlobalProviders,
|
|
5008
|
-
|
|
5031
|
+
An as Header,
|
|
5009
5032
|
zs as HelperTextBox,
|
|
5010
5033
|
gn as HiddenFromScreenReaders,
|
|
5011
5034
|
xo as HideShowTextBox,
|
|
5012
5035
|
Ee as HighlightedTextBox,
|
|
5013
5036
|
ur as IntlProvider,
|
|
5014
5037
|
wr as InviteForm,
|
|
5015
|
-
|
|
5038
|
+
No as InviteModal,
|
|
5016
5039
|
Tn as JoinButton,
|
|
5017
5040
|
yo as LanguageSwitcher,
|
|
5018
5041
|
at as Link,
|
|
@@ -5037,7 +5060,7 @@ export {
|
|
|
5037
5060
|
tr as ProgressBar,
|
|
5038
5061
|
$o as Rating,
|
|
5039
5062
|
Vr as RepliesFeed,
|
|
5040
|
-
|
|
5063
|
+
Ao as ResponsesHeading,
|
|
5041
5064
|
Is as ResponsiveImage,
|
|
5042
5065
|
vr as SearchForm,
|
|
5043
5066
|
Ks as Span,
|
|
@@ -5046,7 +5069,7 @@ export {
|
|
|
5046
5069
|
Hs as Tooltip,
|
|
5047
5070
|
Se as UserContext,
|
|
5048
5071
|
mr as UserProvider,
|
|
5049
|
-
|
|
5072
|
+
ce as VisuallyHidden,
|
|
5050
5073
|
Dr as addAriaProps,
|
|
5051
5074
|
Sn as getMember,
|
|
5052
5075
|
Ke as headerData,
|