@apolitical/component-library 1.13.7-beta.0 → 1.14.1-beta.0
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/cards/card/card.d.ts +3 -0
- package/cards/card/card.data.d.ts +11 -0
- package/cards/card/card.helpers.d.ts +5 -0
- package/cards/card/components/details/details.d.ts +9 -0
- package/cards/card/components/details/index.d.ts +1 -0
- package/cards/card/components/index.d.ts +2 -0
- package/cards/card/components/links/index.d.ts +1 -0
- package/cards/card/components/links/links.d.ts +13 -0
- package/cards/card/index.d.ts +1 -0
- package/cards/card-block/card-block.d.ts +15 -0
- package/cards/card-block/index.d.ts +1 -0
- package/cards/cards.types.d.ts +133 -0
- package/cards/carousel/carousel.d.ts +3 -0
- package/cards/carousel/components/carousel/carousel.d.ts +8 -0
- package/cards/carousel/components/carousel/carousel.helpers.d.ts +1 -0
- package/cards/carousel/components/carousel/index.d.ts +1 -0
- package/cards/carousel/components/index.d.ts +2 -0
- package/cards/carousel/components/title/index.d.ts +1 -0
- package/cards/carousel/components/title/title.d.ts +13 -0
- package/cards/carousel/index.d.ts +1 -0
- package/cards/index.d.ts +3 -0
- package/cards/mocks/card.d.ts +235 -0
- package/cards/mocks/carousel.d.ts +58 -0
- package/cards/mocks/index.d.ts +3 -0
- package/cards/mocks/mocks.helpers.d.ts +500 -0
- package/helpers/cases.d.ts +1 -0
- package/helpers/dates.d.ts +1 -2
- package/helpers/index.d.ts +1 -0
- package/helpers/intl.d.ts +1 -0
- package/hooks/index.d.ts +1 -1
- package/hooks/{use-screen-width.d.ts → use-element-width.d.ts} +1 -1
- package/index.js +11 -11
- package/index.mjs +737 -593
- package/layout/content-layout/columns/columns.d.ts +1 -1
- package/loaders/loading-state/loading-state.d.ts +8 -2
- package/package.json +1 -1
- package/style.css +1 -1
- package/styles/base/_text.scss +41 -15
- package/styles/base/_titles.scss +22 -0
- package/styles/mixins/_containers.scss +18 -0
- package/styles/mixins/_index.scss +1 -0
- package/styles/variables/colors/_theme.scss +33 -1
- package/text/empty-state-box/empty-state-box.d.ts +1 -1
- package/text/pill/pill.d.ts +6 -4
- package/user/contributors/contributors.d.ts +7 -1
- package/user/profile-picture/profile-picture.d.ts +2 -0
package/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import D, { memo as Pe, useState as L, useEffect as Z, useRef as se, useMemo as nt, Children as At, createContext as Ot, useContext as be, Fragment as Dt, useCallback as je, 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 N, IntlProvider as ls, createIntl as cs, FormattedMessage as Ee } from "react-intl";
|
|
5
5
|
import st from "truncate";
|
|
6
6
|
import rt from "markdown-to-jsx";
|
|
7
7
|
import { QueryClient as ds, QueryClientProvider as us, useQueryClient as ot, useQuery as pn, useMutation as me } from "@tanstack/react-query";
|
|
@@ -52,9 +52,9 @@ var _n = { exports: {} };
|
|
|
52
52
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
53
53
|
})();
|
|
54
54
|
})(_n);
|
|
55
|
-
var
|
|
56
|
-
const S = /* @__PURE__ */ bs(
|
|
57
|
-
var
|
|
55
|
+
var ws = _n.exports;
|
|
56
|
+
const S = /* @__PURE__ */ bs(ws), vs = ({ element: e = "span", showOnFocus: t = !0, children: n, ...r }) => D.createElement(e, { ...r, className: S("hidden", { "show-on-focus": t }), children: n }), de = Pe(vs), ks = ({ element: e = "span", children: t = null, ...n }) => D.createElement(e, { ...n, "aria-hidden": !0 }, t), xn = Pe(ks);
|
|
57
|
+
var Nt = { exports: {} }, Fe = {};
|
|
58
58
|
/**
|
|
59
59
|
* @license React
|
|
60
60
|
* react-jsx-runtime.production.min.js
|
|
@@ -69,7 +69,7 @@ function js() {
|
|
|
69
69
|
if (sn)
|
|
70
70
|
return Fe;
|
|
71
71
|
sn = 1;
|
|
72
|
-
var e =
|
|
72
|
+
var e = D, 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
73
|
function d(o, a, u) {
|
|
74
74
|
var l, f = {}, h = null, p = null;
|
|
75
75
|
u !== void 0 && (h = "" + u), a.key !== void 0 && (h = "" + a.key), a.ref !== void 0 && (p = a.ref);
|
|
@@ -95,29 +95,29 @@ var Le = {};
|
|
|
95
95
|
var rn;
|
|
96
96
|
function ys() {
|
|
97
97
|
return rn || (rn = 1, process.env.NODE_ENV !== "production" && function() {
|
|
98
|
-
var e =
|
|
98
|
+
var e = D, 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;
|
|
102
|
-
var
|
|
103
|
-
return typeof
|
|
102
|
+
var v = _ && m[_] || m[j];
|
|
103
|
+
return typeof v == "function" ? v : null;
|
|
104
104
|
}
|
|
105
105
|
var E = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
106
106
|
function k(m) {
|
|
107
107
|
{
|
|
108
|
-
for (var
|
|
108
|
+
for (var v = arguments.length, y = new Array(v > 1 ? v - 1 : 0), $ = 1; $ < v; $++)
|
|
109
109
|
y[$ - 1] = arguments[$];
|
|
110
110
|
T("error", m, y);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
function T(m,
|
|
113
|
+
function T(m, v, y) {
|
|
114
114
|
{
|
|
115
115
|
var $ = E.ReactDebugCurrentFrame, I = $.getStackAddendum();
|
|
116
|
-
I !== "" && (
|
|
116
|
+
I !== "" && (v += "%s", y = y.concat([I]));
|
|
117
117
|
var z = y.map(function(R) {
|
|
118
118
|
return String(R);
|
|
119
119
|
});
|
|
120
|
-
z.unshift("Warning: " +
|
|
120
|
+
z.unshift("Warning: " + v), Function.prototype.apply.call(console[m], console, z);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
var M = !1, C = !1, H = !1, Y = !1, x = !1, b;
|
|
@@ -129,11 +129,11 @@ function ys() {
|
|
|
129
129
|
// with.
|
|
130
130
|
m.$$typeof === b || m.getModuleId !== void 0));
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function w(m, v, y) {
|
|
133
133
|
var $ = m.displayName;
|
|
134
134
|
if ($)
|
|
135
135
|
return $;
|
|
136
|
-
var I =
|
|
136
|
+
var I = v.displayName || v.name || "";
|
|
137
137
|
return I !== "" ? y + "(" + I + ")" : y;
|
|
138
138
|
}
|
|
139
139
|
function G(m) {
|
|
@@ -163,13 +163,13 @@ function ys() {
|
|
|
163
163
|
if (typeof m == "object")
|
|
164
164
|
switch (m.$$typeof) {
|
|
165
165
|
case o:
|
|
166
|
-
var
|
|
167
|
-
return G(
|
|
166
|
+
var v = m;
|
|
167
|
+
return G(v) + ".Consumer";
|
|
168
168
|
case d:
|
|
169
169
|
var y = m;
|
|
170
170
|
return G(y._context) + ".Provider";
|
|
171
171
|
case a:
|
|
172
|
-
return
|
|
172
|
+
return w(m, m.render, "ForwardRef");
|
|
173
173
|
case f:
|
|
174
174
|
var $ = m.displayName || null;
|
|
175
175
|
return $ !== null ? $ : O(m.type) || "Memo";
|
|
@@ -247,7 +247,7 @@ function ys() {
|
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
var ne = E.ReactCurrentDispatcher, F;
|
|
250
|
-
function J(m,
|
|
250
|
+
function J(m, v, y) {
|
|
251
251
|
{
|
|
252
252
|
if (F === void 0)
|
|
253
253
|
try {
|
|
@@ -265,7 +265,7 @@ function ys() {
|
|
|
265
265
|
var ge = typeof WeakMap == "function" ? WeakMap : Map;
|
|
266
266
|
pe = new ge();
|
|
267
267
|
}
|
|
268
|
-
function $e(m,
|
|
268
|
+
function $e(m, v) {
|
|
269
269
|
if (!m || fe)
|
|
270
270
|
return "";
|
|
271
271
|
{
|
|
@@ -280,7 +280,7 @@ function ys() {
|
|
|
280
280
|
var z;
|
|
281
281
|
z = ne.current, ne.current = null, te();
|
|
282
282
|
try {
|
|
283
|
-
if (
|
|
283
|
+
if (v) {
|
|
284
284
|
var R = function() {
|
|
285
285
|
throw Error();
|
|
286
286
|
};
|
|
@@ -291,39 +291,39 @@ function ys() {
|
|
|
291
291
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
292
292
|
try {
|
|
293
293
|
Reflect.construct(R, []);
|
|
294
|
-
} catch (
|
|
295
|
-
$ =
|
|
294
|
+
} catch (we) {
|
|
295
|
+
$ = we;
|
|
296
296
|
}
|
|
297
297
|
Reflect.construct(m, [], R);
|
|
298
298
|
} else {
|
|
299
299
|
try {
|
|
300
300
|
R.call();
|
|
301
|
-
} catch (
|
|
302
|
-
$ =
|
|
301
|
+
} catch (we) {
|
|
302
|
+
$ = we;
|
|
303
303
|
}
|
|
304
304
|
m.call(R.prototype);
|
|
305
305
|
}
|
|
306
306
|
} else {
|
|
307
307
|
try {
|
|
308
308
|
throw Error();
|
|
309
|
-
} catch (
|
|
310
|
-
$ =
|
|
309
|
+
} catch (we) {
|
|
310
|
+
$ = we;
|
|
311
311
|
}
|
|
312
312
|
m();
|
|
313
313
|
}
|
|
314
|
-
} catch (
|
|
315
|
-
if (
|
|
316
|
-
for (var
|
|
314
|
+
} catch (we) {
|
|
315
|
+
if (we && $ && typeof we.stack == "string") {
|
|
316
|
+
for (var A = we.stack.split(`
|
|
317
317
|
`), ue = $.stack.split(`
|
|
318
|
-
`), q =
|
|
318
|
+
`), q = A.length - 1, ee = ue.length - 1; q >= 1 && ee >= 0 && A[q] !== ue[ee]; )
|
|
319
319
|
ee--;
|
|
320
320
|
for (; q >= 1 && ee >= 0; q--, ee--)
|
|
321
|
-
if (
|
|
321
|
+
if (A[q] !== ue[ee]) {
|
|
322
322
|
if (q !== 1 || ee !== 1)
|
|
323
323
|
do
|
|
324
|
-
if (q--, ee--, ee < 0 ||
|
|
324
|
+
if (q--, ee--, ee < 0 || A[q] !== ue[ee]) {
|
|
325
325
|
var _e = `
|
|
326
|
-
` +
|
|
326
|
+
` + A[q].replace(" at new ", " at ");
|
|
327
327
|
return m.displayName && _e.includes("<anonymous>") && (_e = _e.replace("<anonymous>", m.displayName)), typeof m == "function" && pe.set(m, _e), _e;
|
|
328
328
|
}
|
|
329
329
|
while (q >= 1 && ee >= 0);
|
|
@@ -336,14 +336,14 @@ function ys() {
|
|
|
336
336
|
var Ce = m ? m.displayName || m.name : "", nn = Ce ? J(Ce) : "";
|
|
337
337
|
return typeof m == "function" && pe.set(m, nn), nn;
|
|
338
338
|
}
|
|
339
|
-
function He(m,
|
|
339
|
+
function He(m, v, y) {
|
|
340
340
|
return $e(m, !1);
|
|
341
341
|
}
|
|
342
342
|
function Qe(m) {
|
|
343
|
-
var
|
|
344
|
-
return !!(
|
|
343
|
+
var v = m.prototype;
|
|
344
|
+
return !!(v && v.isReactComponent);
|
|
345
345
|
}
|
|
346
|
-
function Ue(m,
|
|
346
|
+
function Ue(m, v, y) {
|
|
347
347
|
if (m == null)
|
|
348
348
|
return "";
|
|
349
349
|
if (typeof m == "function")
|
|
@@ -361,11 +361,11 @@ function ys() {
|
|
|
361
361
|
case a:
|
|
362
362
|
return He(m.render);
|
|
363
363
|
case f:
|
|
364
|
-
return Ue(m.type,
|
|
364
|
+
return Ue(m.type, v, y);
|
|
365
365
|
case h: {
|
|
366
366
|
var $ = m, I = $._payload, z = $._init;
|
|
367
367
|
try {
|
|
368
|
-
return Ue(z(I),
|
|
368
|
+
return Ue(z(I), v, y);
|
|
369
369
|
} catch {
|
|
370
370
|
}
|
|
371
371
|
}
|
|
@@ -375,27 +375,27 @@ function ys() {
|
|
|
375
375
|
var We = Object.prototype.hasOwnProperty, Wt = {}, zt = E.ReactDebugCurrentFrame;
|
|
376
376
|
function ze(m) {
|
|
377
377
|
if (m) {
|
|
378
|
-
var
|
|
378
|
+
var v = m._owner, y = Ue(m.type, m._source, v ? v.type : null);
|
|
379
379
|
zt.setExtraStackFrame(y);
|
|
380
380
|
} else
|
|
381
381
|
zt.setExtraStackFrame(null);
|
|
382
382
|
}
|
|
383
|
-
function On(m,
|
|
383
|
+
function On(m, v, y, $, I) {
|
|
384
384
|
{
|
|
385
385
|
var z = Function.call.bind(We);
|
|
386
386
|
for (var R in m)
|
|
387
387
|
if (z(m, R)) {
|
|
388
|
-
var
|
|
388
|
+
var A = void 0;
|
|
389
389
|
try {
|
|
390
390
|
if (typeof m[R] != "function") {
|
|
391
391
|
var ue = 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
392
|
throw ue.name = "Invariant Violation", ue;
|
|
393
393
|
}
|
|
394
|
-
|
|
394
|
+
A = m[R](v, R, $, y, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
395
395
|
} catch (q) {
|
|
396
|
-
|
|
396
|
+
A = q;
|
|
397
397
|
}
|
|
398
|
-
|
|
398
|
+
A && !(A instanceof Error) && (ze(I), k("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", $ || "React class", y, R, typeof A), ze(null)), A instanceof Error && !(A.message in Wt) && (Wt[A.message] = !0, ze(I), k("Failed %s type: %s", y, A.message), ze(null));
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
}
|
|
@@ -405,7 +405,7 @@ function ys() {
|
|
|
405
405
|
}
|
|
406
406
|
function In(m) {
|
|
407
407
|
{
|
|
408
|
-
var
|
|
408
|
+
var v = typeof Symbol == "function" && Symbol.toStringTag, y = v && m[Symbol.toStringTag] || m.constructor.name || "Object";
|
|
409
409
|
return y;
|
|
410
410
|
}
|
|
411
411
|
}
|
|
@@ -432,30 +432,30 @@ function ys() {
|
|
|
432
432
|
ft = {};
|
|
433
433
|
function Un(m) {
|
|
434
434
|
if (We.call(m, "ref")) {
|
|
435
|
-
var
|
|
436
|
-
if (
|
|
435
|
+
var v = Object.getOwnPropertyDescriptor(m, "ref").get;
|
|
436
|
+
if (v && v.isReactWarning)
|
|
437
437
|
return !1;
|
|
438
438
|
}
|
|
439
439
|
return m.ref !== void 0;
|
|
440
440
|
}
|
|
441
441
|
function Wn(m) {
|
|
442
442
|
if (We.call(m, "key")) {
|
|
443
|
-
var
|
|
444
|
-
if (
|
|
443
|
+
var v = Object.getOwnPropertyDescriptor(m, "key").get;
|
|
444
|
+
if (v && v.isReactWarning)
|
|
445
445
|
return !1;
|
|
446
446
|
}
|
|
447
447
|
return m.key !== void 0;
|
|
448
448
|
}
|
|
449
|
-
function zn(m,
|
|
450
|
-
if (typeof m.ref == "string" && Re.current &&
|
|
449
|
+
function zn(m, v) {
|
|
450
|
+
if (typeof m.ref == "string" && Re.current && v && Re.current.stateNode !== v) {
|
|
451
451
|
var y = O(Re.current.type);
|
|
452
452
|
ft[y] || (k('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', O(Re.current.type), m.ref), ft[y] = !0);
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
|
-
function Vn(m,
|
|
455
|
+
function Vn(m, v) {
|
|
456
456
|
{
|
|
457
457
|
var y = function() {
|
|
458
|
-
Gt || (Gt = !0, k("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",
|
|
458
|
+
Gt || (Gt = !0, k("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", v));
|
|
459
459
|
};
|
|
460
460
|
y.isReactWarning = !0, Object.defineProperty(m, "key", {
|
|
461
461
|
get: y,
|
|
@@ -463,10 +463,10 @@ function ys() {
|
|
|
463
463
|
});
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
function Yn(m,
|
|
466
|
+
function Yn(m, v) {
|
|
467
467
|
{
|
|
468
468
|
var y = function() {
|
|
469
|
-
Jt || (Jt = !0, k("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",
|
|
469
|
+
Jt || (Jt = !0, k("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", v));
|
|
470
470
|
};
|
|
471
471
|
y.isReactWarning = !0, Object.defineProperty(m, "ref", {
|
|
472
472
|
get: y,
|
|
@@ -474,57 +474,57 @@ function ys() {
|
|
|
474
474
|
});
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
var Gn = function(m,
|
|
478
|
-
var
|
|
477
|
+
var Gn = function(m, v, y, $, I, z, R) {
|
|
478
|
+
var A = {
|
|
479
479
|
// This tag allows us to uniquely identify this as a React Element
|
|
480
480
|
$$typeof: t,
|
|
481
481
|
// Built-in properties that belong on the element
|
|
482
482
|
type: m,
|
|
483
|
-
key:
|
|
483
|
+
key: v,
|
|
484
484
|
ref: y,
|
|
485
485
|
props: R,
|
|
486
486
|
// Record the component responsible for creating this element.
|
|
487
487
|
_owner: z
|
|
488
488
|
};
|
|
489
|
-
return
|
|
489
|
+
return A._store = {}, Object.defineProperty(A._store, "validated", {
|
|
490
490
|
configurable: !1,
|
|
491
491
|
enumerable: !1,
|
|
492
492
|
writable: !0,
|
|
493
493
|
value: !1
|
|
494
|
-
}), Object.defineProperty(
|
|
494
|
+
}), Object.defineProperty(A, "_self", {
|
|
495
495
|
configurable: !1,
|
|
496
496
|
enumerable: !1,
|
|
497
497
|
writable: !1,
|
|
498
498
|
value: $
|
|
499
|
-
}), Object.defineProperty(
|
|
499
|
+
}), Object.defineProperty(A, "_source", {
|
|
500
500
|
configurable: !1,
|
|
501
501
|
enumerable: !1,
|
|
502
502
|
writable: !1,
|
|
503
503
|
value: I
|
|
504
|
-
}), Object.freeze && (Object.freeze(
|
|
504
|
+
}), Object.freeze && (Object.freeze(A.props), Object.freeze(A)), A;
|
|
505
505
|
};
|
|
506
|
-
function Jn(m,
|
|
506
|
+
function Jn(m, v, y, $, I) {
|
|
507
507
|
{
|
|
508
|
-
var z, R = {},
|
|
509
|
-
y !== void 0 && (Yt(y),
|
|
510
|
-
for (z in
|
|
511
|
-
We.call(
|
|
508
|
+
var z, R = {}, A = null, ue = null;
|
|
509
|
+
y !== void 0 && (Yt(y), A = "" + y), Wn(v) && (Yt(v.key), A = "" + v.key), Un(v) && (ue = v.ref, zn(v, I));
|
|
510
|
+
for (z in v)
|
|
511
|
+
We.call(v, z) && !Qn.hasOwnProperty(z) && (R[z] = v[z]);
|
|
512
512
|
if (m && m.defaultProps) {
|
|
513
513
|
var q = m.defaultProps;
|
|
514
514
|
for (z in q)
|
|
515
515
|
R[z] === void 0 && (R[z] = q[z]);
|
|
516
516
|
}
|
|
517
|
-
if (
|
|
517
|
+
if (A || ue) {
|
|
518
518
|
var ee = typeof m == "function" ? m.displayName || m.name || "Unknown" : m;
|
|
519
|
-
|
|
519
|
+
A && Vn(R, ee), ue && Yn(R, ee);
|
|
520
520
|
}
|
|
521
|
-
return Gn(m,
|
|
521
|
+
return Gn(m, A, ue, I, $, Re.current, R);
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
524
|
var ht = E.ReactCurrentOwner, Xt = E.ReactDebugCurrentFrame;
|
|
525
525
|
function Me(m) {
|
|
526
526
|
if (m) {
|
|
527
|
-
var
|
|
527
|
+
var v = m._owner, y = Ue(m.type, m._source, v ? v.type : null);
|
|
528
528
|
Xt.setExtraStackFrame(y);
|
|
529
529
|
} else
|
|
530
530
|
Xt.setExtraStackFrame(null);
|
|
@@ -549,10 +549,10 @@ Check the render method of \`` + m + "`.";
|
|
|
549
549
|
function Xn(m) {
|
|
550
550
|
{
|
|
551
551
|
if (m !== void 0) {
|
|
552
|
-
var
|
|
552
|
+
var v = m.fileName.replace(/^.*[\\\/]/, ""), y = m.lineNumber;
|
|
553
553
|
return `
|
|
554
554
|
|
|
555
|
-
Check your code at ` +
|
|
555
|
+
Check your code at ` + v + ":" + y + ".";
|
|
556
556
|
}
|
|
557
557
|
return "";
|
|
558
558
|
}
|
|
@@ -560,22 +560,22 @@ Check your code at ` + w + ":" + y + ".";
|
|
|
560
560
|
var Kt = {};
|
|
561
561
|
function Zn(m) {
|
|
562
562
|
{
|
|
563
|
-
var
|
|
564
|
-
if (!
|
|
563
|
+
var v = Zt();
|
|
564
|
+
if (!v) {
|
|
565
565
|
var y = typeof m == "string" ? m : m.displayName || m.name;
|
|
566
|
-
y && (
|
|
566
|
+
y && (v = `
|
|
567
567
|
|
|
568
568
|
Check the top-level render call using <` + y + ">.");
|
|
569
569
|
}
|
|
570
|
-
return
|
|
570
|
+
return v;
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
|
-
function qt(m,
|
|
573
|
+
function qt(m, v) {
|
|
574
574
|
{
|
|
575
575
|
if (!m._store || m._store.validated || m.key != null)
|
|
576
576
|
return;
|
|
577
577
|
m._store.validated = !0;
|
|
578
|
-
var y = Zn(
|
|
578
|
+
var y = Zn(v);
|
|
579
579
|
if (Kt[y])
|
|
580
580
|
return;
|
|
581
581
|
Kt[y] = !0;
|
|
@@ -583,14 +583,14 @@ Check the top-level render call using <` + y + ">.");
|
|
|
583
583
|
m && m._owner && m._owner !== ht.current && ($ = " It was passed a child from " + O(m._owner.type) + "."), Me(m), k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', y, $), Me(null);
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
|
-
function en(m,
|
|
586
|
+
function en(m, v) {
|
|
587
587
|
{
|
|
588
588
|
if (typeof m != "object")
|
|
589
589
|
return;
|
|
590
590
|
if (mt(m))
|
|
591
591
|
for (var y = 0; y < m.length; y++) {
|
|
592
592
|
var $ = m[y];
|
|
593
|
-
gt($) && qt($,
|
|
593
|
+
gt($) && qt($, v);
|
|
594
594
|
}
|
|
595
595
|
else if (gt(m))
|
|
596
596
|
m._store && (m._store.validated = !0);
|
|
@@ -598,39 +598,39 @@ Check the top-level render call using <` + y + ">.");
|
|
|
598
598
|
var I = g(m);
|
|
599
599
|
if (typeof I == "function" && I !== m.entries)
|
|
600
600
|
for (var z = I.call(m), R; !(R = z.next()).done; )
|
|
601
|
-
gt(R.value) && qt(R.value,
|
|
601
|
+
gt(R.value) && qt(R.value, v);
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
605
|
function Kn(m) {
|
|
606
606
|
{
|
|
607
|
-
var
|
|
608
|
-
if (
|
|
607
|
+
var v = m.type;
|
|
608
|
+
if (v == null || typeof v == "string")
|
|
609
609
|
return;
|
|
610
610
|
var y;
|
|
611
|
-
if (typeof
|
|
612
|
-
y =
|
|
613
|
-
else if (typeof
|
|
611
|
+
if (typeof v == "function")
|
|
612
|
+
y = v.propTypes;
|
|
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
|
-
|
|
616
|
-
y =
|
|
615
|
+
v.$$typeof === f))
|
|
616
|
+
y = v.propTypes;
|
|
617
617
|
else
|
|
618
618
|
return;
|
|
619
619
|
if (y) {
|
|
620
|
-
var $ = O(
|
|
620
|
+
var $ = O(v);
|
|
621
621
|
On(y, m.props, "prop", $, m);
|
|
622
|
-
} else if (
|
|
622
|
+
} else if (v.PropTypes !== void 0 && !pt) {
|
|
623
623
|
pt = !0;
|
|
624
|
-
var I = O(
|
|
624
|
+
var I = O(v);
|
|
625
625
|
k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", I || "Unknown");
|
|
626
626
|
}
|
|
627
|
-
typeof
|
|
627
|
+
typeof v.getDefaultProps == "function" && !v.getDefaultProps.isReactClassApproved && k("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
630
|
function qn(m) {
|
|
631
631
|
{
|
|
632
|
-
for (var
|
|
633
|
-
var $ =
|
|
632
|
+
for (var v = Object.keys(m.props), y = 0; y < v.length; y++) {
|
|
633
|
+
var $ = v[y];
|
|
634
634
|
if ($ !== "children" && $ !== "key") {
|
|
635
635
|
Me(m), k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", $), Me(null);
|
|
636
636
|
break;
|
|
@@ -639,22 +639,22 @@ Check the top-level render call using <` + y + ">.");
|
|
|
639
639
|
m.ref !== null && (Me(m), k("Invalid attribute `ref` supplied to `React.Fragment`."), Me(null));
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
|
-
function tn(m,
|
|
642
|
+
function tn(m, v, y, $, I, z) {
|
|
643
643
|
{
|
|
644
644
|
var R = U(m);
|
|
645
645
|
if (!R) {
|
|
646
|
-
var
|
|
647
|
-
(m === void 0 || typeof m == "object" && m !== null && Object.keys(m).length === 0) && (
|
|
646
|
+
var A = "";
|
|
647
|
+
(m === void 0 || typeof m == "object" && m !== null && Object.keys(m).length === 0) && (A += " 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
648
|
var ue = Xn(I);
|
|
649
|
-
ue ?
|
|
649
|
+
ue ? A += ue : A += Zt();
|
|
650
650
|
var q;
|
|
651
|
-
m === null ? q = "null" : mt(m) ? q = "array" : m !== void 0 && m.$$typeof === t ? (q = "<" + (O(m.type) || "Unknown") + " />",
|
|
651
|
+
m === null ? q = "null" : mt(m) ? q = "array" : m !== void 0 && m.$$typeof === t ? (q = "<" + (O(m.type) || "Unknown") + " />", A = " 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, A);
|
|
652
652
|
}
|
|
653
|
-
var ee = Jn(m,
|
|
653
|
+
var ee = Jn(m, v, y, I, z);
|
|
654
654
|
if (ee == null)
|
|
655
655
|
return ee;
|
|
656
656
|
if (R) {
|
|
657
|
-
var _e =
|
|
657
|
+
var _e = v.children;
|
|
658
658
|
if (_e !== void 0)
|
|
659
659
|
if ($)
|
|
660
660
|
if (mt(_e)) {
|
|
@@ -669,18 +669,18 @@ Check the top-level render call using <` + y + ">.");
|
|
|
669
669
|
return m === r ? qn(ee) : Kn(ee), ee;
|
|
670
670
|
}
|
|
671
671
|
}
|
|
672
|
-
function es(m,
|
|
673
|
-
return tn(m,
|
|
672
|
+
function es(m, v, y) {
|
|
673
|
+
return tn(m, v, y, !0);
|
|
674
674
|
}
|
|
675
|
-
function ts(m,
|
|
676
|
-
return tn(m,
|
|
675
|
+
function ts(m, v, y) {
|
|
676
|
+
return tn(m, v, y, !1);
|
|
677
677
|
}
|
|
678
678
|
var ns = ts, ss = es;
|
|
679
679
|
Le.Fragment = r, Le.jsx = ns, Le.jsxs = ss;
|
|
680
680
|
}()), Le;
|
|
681
681
|
}
|
|
682
|
-
process.env.NODE_ENV === "production" ?
|
|
683
|
-
var s =
|
|
682
|
+
process.env.NODE_ENV === "production" ? Nt.exports = js() : Nt.exports = ys();
|
|
683
|
+
var s = Nt.exports;
|
|
684
684
|
const Es = () => {
|
|
685
685
|
const [e, t] = L(window.location.pathname), n = () => {
|
|
686
686
|
const r = window.location.pathname;
|
|
@@ -689,7 +689,7 @@ const Es = () => {
|
|
|
689
689
|
return Z(() => (window.addEventListener("popstate", n), () => {
|
|
690
690
|
window.removeEventListener("popstate", n);
|
|
691
691
|
}), []), e;
|
|
692
|
-
},
|
|
692
|
+
}, De = (e, t) => {
|
|
693
693
|
const n = se(!1);
|
|
694
694
|
Z(() => {
|
|
695
695
|
n.current ? e() : n.current = !0;
|
|
@@ -728,8 +728,8 @@ function Ss(e, t, n) {
|
|
|
728
728
|
if (M(b))
|
|
729
729
|
return C(b);
|
|
730
730
|
if (f.current) {
|
|
731
|
-
var U = t - (b - i.current),
|
|
732
|
-
T(x,
|
|
731
|
+
var U = t - (b - i.current), w = j ? Math.min(U, g - (b - c.current)) : U;
|
|
732
|
+
T(x, w);
|
|
733
733
|
}
|
|
734
734
|
}, Y = function() {
|
|
735
735
|
var x = Date.now(), b = M(x);
|
|
@@ -756,26 +756,29 @@ function bn(e, t, n) {
|
|
|
756
756
|
return Ss(e, t, { maxWait: t, leading: i === void 0 || i, trailing: c === void 0 || c });
|
|
757
757
|
}
|
|
758
758
|
let _t;
|
|
759
|
-
const at = (e = !0, t = !1) => {
|
|
759
|
+
const at = (e = !0, t = !1, n = "window") => {
|
|
760
760
|
if (!e)
|
|
761
761
|
return;
|
|
762
|
-
const [
|
|
762
|
+
const [r, i] = D.useState(0) || [!1, () => {
|
|
763
763
|
}];
|
|
764
|
-
Z(() => (
|
|
765
|
-
clearTimeout(_t),
|
|
766
|
-
}), []);
|
|
767
|
-
const
|
|
768
|
-
|
|
769
|
-
|
|
764
|
+
Z(() => (o(), window.addEventListener("resize", a), () => {
|
|
765
|
+
clearTimeout(_t), a.flush(), window.removeEventListener("resize", a);
|
|
766
|
+
}), n === "window" ? [] : [n]);
|
|
767
|
+
const d = () => {
|
|
768
|
+
if (n)
|
|
769
|
+
return n === "window" ? window.innerWidth : n.offsetWidth;
|
|
770
|
+
}, o = () => {
|
|
771
|
+
i(d());
|
|
772
|
+
}, a = bn(
|
|
770
773
|
() => {
|
|
771
|
-
|
|
774
|
+
d() !== r && (t && (clearTimeout(_t), document.body.classList.add("is-resizing"), _t = setTimeout(() => {
|
|
772
775
|
document.body.classList.remove("is-resizing");
|
|
773
|
-
}, 550)),
|
|
776
|
+
}, 550)), o());
|
|
774
777
|
},
|
|
775
778
|
500,
|
|
776
779
|
{ leading: !0 }
|
|
777
780
|
);
|
|
778
|
-
return
|
|
781
|
+
return r;
|
|
779
782
|
}, Ts = ({
|
|
780
783
|
scrollPosition: e = 0,
|
|
781
784
|
// The position on the page to scroll past
|
|
@@ -787,8 +790,8 @@ const at = (e = !0, t = !1) => {
|
|
|
787
790
|
}) => {
|
|
788
791
|
if (!window)
|
|
789
792
|
return;
|
|
790
|
-
const [i, c] =
|
|
791
|
-
}], [d, o] =
|
|
793
|
+
const [i, c] = D.useState({ current: 0, past: 0 }) || [!1, () => {
|
|
794
|
+
}], [d, o] = D.useState({ scrollDown: !1, scrollUp: !1 }) || [!1, () => {
|
|
792
795
|
}];
|
|
793
796
|
Z(() => (a(), window.addEventListener("scroll", u), () => {
|
|
794
797
|
u.flush(), window.removeEventListener("scroll", u);
|
|
@@ -804,10 +807,10 @@ const at = (e = !0, t = !1) => {
|
|
|
804
807
|
a();
|
|
805
808
|
}, 250);
|
|
806
809
|
return i;
|
|
807
|
-
},
|
|
810
|
+
}, fo = (e = [], t = !0) => {
|
|
808
811
|
e = Array.isArray(e) ? e : [e];
|
|
809
812
|
const n = se(!1);
|
|
810
|
-
|
|
813
|
+
De(() => {
|
|
811
814
|
if (window && window.location && window.location.hash) {
|
|
812
815
|
if (n.current)
|
|
813
816
|
return;
|
|
@@ -821,13 +824,13 @@ const at = (e = !0, t = !1) => {
|
|
|
821
824
|
return t.forEach(({ type: r, value: i }) => {
|
|
822
825
|
is(n, r, i);
|
|
823
826
|
}), n;
|
|
824
|
-
},
|
|
827
|
+
}, wn = (e) => {
|
|
825
828
|
const t = [];
|
|
826
829
|
return e.forEach((n) => {
|
|
827
830
|
const r = parseInt(n);
|
|
828
831
|
isNaN(r) || t.push(r);
|
|
829
832
|
}), t.sort((n, r) => n - r);
|
|
830
|
-
},
|
|
833
|
+
}, vn = (e, t, n) => {
|
|
831
834
|
let r = n.mobile;
|
|
832
835
|
for (const i in t) {
|
|
833
836
|
const c = parseInt(String(t[i]));
|
|
@@ -856,10 +859,17 @@ const at = (e = !0, t = !1) => {
|
|
|
856
859
|
return { path: "days", number: o };
|
|
857
860
|
const a = Math.floor(o / 7);
|
|
858
861
|
return a <= 52 ? { path: "weeks", number: a } : { path: "years", number: Math.floor(o / 365) };
|
|
859
|
-
},
|
|
862
|
+
}, As = (e) => new Promise((t) => setTimeout(t, e)), Bt = {
|
|
860
863
|
apolitical: "Apolitical",
|
|
861
864
|
breadcrumbs_label: "Go back to:",
|
|
862
865
|
breadcrumbs_currentPage: "Current page:",
|
|
866
|
+
card_carousel_viewAll: "View all",
|
|
867
|
+
card_label_event: "Event",
|
|
868
|
+
card_label_learningHub: "Programme",
|
|
869
|
+
card_label_listPage: "List",
|
|
870
|
+
card_label_microcourse: "Course",
|
|
871
|
+
card_label_qaQuestion: "Q&A",
|
|
872
|
+
card_label_solutionArticle: "Article",
|
|
863
873
|
card_bootcamp: "Email boot camp",
|
|
864
874
|
card_ended: "Ended",
|
|
865
875
|
card_registered: "Registered",
|
|
@@ -868,6 +878,15 @@ const at = (e = !0, t = !1) => {
|
|
|
868
878
|
card_time_read: "{time} min read",
|
|
869
879
|
card_watch: "Watch recording",
|
|
870
880
|
card_cta_people: "View profile",
|
|
881
|
+
card_cta_event: "Register now",
|
|
882
|
+
card_cta_microcourse: "Enrol now",
|
|
883
|
+
card_cta_event_loading: "Registering...",
|
|
884
|
+
card_cta_microcourse_loading: "Enrolling...",
|
|
885
|
+
card_cta_event_done: "Registered",
|
|
886
|
+
card_cta_microcourse_done: "Enrolled",
|
|
887
|
+
carousel_pagination_previous: "Previous",
|
|
888
|
+
carousel_pagination_next: "Next",
|
|
889
|
+
carousel_pagination_page: "Page {number} of {total}",
|
|
871
890
|
collapsibleSection_summary: "Find out more",
|
|
872
891
|
communityDetails_members: "Members",
|
|
873
892
|
communityDetails_viewAll: "View all",
|
|
@@ -1139,13 +1158,13 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1139
1158
|
sharedLinks_copy_text: "Copy link",
|
|
1140
1159
|
tags_community: "From the community",
|
|
1141
1160
|
tooltip_loading: "Loading..."
|
|
1142
|
-
},
|
|
1161
|
+
}, Ds = {
|
|
1143
1162
|
languageSwitcher_label: "Me gustaría leer este artículo en...",
|
|
1144
1163
|
languageSwitcher_translation_original: "idioma original",
|
|
1145
1164
|
languageSwitcher_translation_human: "traducido por un humano",
|
|
1146
1165
|
languageSwitcher_translation_machine: "traducido por máquina",
|
|
1147
1166
|
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
|
-
},
|
|
1167
|
+
}, Ns = {
|
|
1149
1168
|
collapsibleSection_summary: "En savoir plus",
|
|
1150
1169
|
languageSwitcher_label: "Je voudrais lire cet article dans...",
|
|
1151
1170
|
languageSwitcher_translation_original: "langue originale",
|
|
@@ -1161,13 +1180,13 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1161
1180
|
}, Rs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1162
1181
|
__proto__: null,
|
|
1163
1182
|
en: Bt,
|
|
1164
|
-
es:
|
|
1165
|
-
fr:
|
|
1183
|
+
es: Ds,
|
|
1184
|
+
fr: Ns,
|
|
1166
1185
|
pt: Ps
|
|
1167
|
-
}, Symbol.toStringTag, { value: "Module" })), xe = (e, t, n, r, i = {}) => {
|
|
1186
|
+
}, Symbol.toStringTag, { value: "Module" })), Fs = (e) => e in Bt, xe = (e, t, n, r, i = {}) => {
|
|
1168
1187
|
let c = "";
|
|
1169
|
-
return `${t}_${n}`
|
|
1170
|
-
},
|
|
1188
|
+
return Fs(`${t}_${n}`) ? c = e({ id: `${t}_${n}` }, i) : c = e({ id: t }, { [r]: n, ...i }), c;
|
|
1189
|
+
}, Ls = (e, t, n) => {
|
|
1171
1190
|
if (!e || e === 0)
|
|
1172
1191
|
return "0";
|
|
1173
1192
|
t || (t = 0), n || (n = ["k", "m", "b", "t"]);
|
|
@@ -1181,9 +1200,9 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1181
1200
|
}
|
|
1182
1201
|
}
|
|
1183
1202
|
return r;
|
|
1184
|
-
}, kn = (e, t) =>
|
|
1203
|
+
}, kn = (e, t) => D.Children.map(e, (n) => D.cloneElement(n, {
|
|
1185
1204
|
...t
|
|
1186
|
-
})),
|
|
1205
|
+
})), Os = (e) => e.replace(/\s+/g, "").length > 0, X = ({
|
|
1187
1206
|
variant: e = "primary",
|
|
1188
1207
|
size: t = "medium",
|
|
1189
1208
|
styling: n = { muted: !1, fullWidth: !1 },
|
|
@@ -1199,8 +1218,8 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1199
1218
|
}) => {
|
|
1200
1219
|
const p = at(typeof t == "object");
|
|
1201
1220
|
if (typeof t == "object" && typeof p == "number") {
|
|
1202
|
-
const g = Object.assign({}, t), E =
|
|
1203
|
-
t =
|
|
1221
|
+
const g = Object.assign({}, t), E = wn(Object.keys(g));
|
|
1222
|
+
t = vn(p, E, g);
|
|
1204
1223
|
}
|
|
1205
1224
|
const _ = [];
|
|
1206
1225
|
typeof t == "string" && _.push(t), r && (_.push("icon"), typeof r == "object" ? (_.push(r.icon), r.position ? _.push(r.position) : _.push("left"), r.hover && _.push(`hover_${r.hover}`), r.animate && (_.push("animate"), typeof r.animate == "string" && _.push(r.animate))) : (_.push(r), !r.includes("right") && !r.includes("left") && _.push("left"))), n.muted && _.push("muted"), n.fullWidth && _.push("full-width");
|
|
@@ -1216,16 +1235,16 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1216
1235
|
},
|
|
1217
1236
|
disabled: typeof a == "object" && "isClickable" in a ? !a.isClickable : a
|
|
1218
1237
|
};
|
|
1219
|
-
return i && (c = "a", j.href = i),
|
|
1238
|
+
return i && (c = "a", j.href = i), D.createElement(
|
|
1220
1239
|
c,
|
|
1221
1240
|
j,
|
|
1222
1241
|
l || (u ? /* @__PURE__ */ s.jsx(de, { showOnFocus: !1, children: u }) : null)
|
|
1223
1242
|
);
|
|
1224
1243
|
}, it = ({ buttons: e, className: t = "", ...n }) => {
|
|
1225
1244
|
const r = e.length > 1 ? "ul" : "p", i = e.map((c, d) => r === "p" ? /* @__PURE__ */ s.jsx(X, { ...c }, d) : /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(X, { ...c }) }, d));
|
|
1226
|
-
return
|
|
1245
|
+
return D.createElement(r, { className: S("button-wrapper", t), ...n, children: i });
|
|
1227
1246
|
};
|
|
1228
|
-
const
|
|
1247
|
+
const Ne = ({ className: e = "", maxWidth: t = !1 }) => {
|
|
1229
1248
|
const n = t ? { "--max-width": `${t / 16}rem` } : {};
|
|
1230
1249
|
return /* @__PURE__ */ s.jsx("hr", { className: S(e, { "has-max-width": t }), style: n });
|
|
1231
1250
|
}, lt = ({
|
|
@@ -1250,7 +1269,7 @@ const Ae = ({ className: e = "", maxWidth: t = !1 }) => {
|
|
|
1250
1269
|
}
|
|
1251
1270
|
);
|
|
1252
1271
|
}
|
|
1253
|
-
return n ?
|
|
1272
|
+
return n ? D.createElement(n, { children: t, className: r, ...o }) : t;
|
|
1254
1273
|
}, on = {
|
|
1255
1274
|
card: {
|
|
1256
1275
|
range: [
|
|
@@ -1354,23 +1373,23 @@ const Ae = ({ className: e = "", maxWidth: t = !1 }) => {
|
|
|
1354
1373
|
],
|
|
1355
1374
|
sizes: "(min-width: 1024px) 453px, 20vw"
|
|
1356
1375
|
}
|
|
1357
|
-
},
|
|
1376
|
+
}, Bs = ({
|
|
1358
1377
|
aspect: e,
|
|
1359
1378
|
range: t,
|
|
1360
1379
|
sizes: n
|
|
1361
1380
|
}) => {
|
|
1362
1381
|
const { range: r, sizes: i } = e ? on[e] : on.fallback;
|
|
1363
1382
|
return { range: t && t.length > 0 ? t : r, sizes: n || i };
|
|
1364
|
-
},
|
|
1383
|
+
}, Is = ({ format: e, height: t, query: n, width: r }) => {
|
|
1365
1384
|
let i = `w=${r}&h=${t}`;
|
|
1366
1385
|
return i = e ? `${i}&fm=${e}` : i, i = n ? `${i}&${n}` : i, i;
|
|
1367
|
-
}, xt = ({ format: e, range: t, url: n, query: r }) => t.map(({ height: i, width: c }) => `${n}?${
|
|
1386
|
+
}, xt = ({ format: e, range: t, url: n, query: r }) => t.map(({ height: i, width: c }) => `${n}?${Is({
|
|
1368
1387
|
format: e,
|
|
1369
1388
|
height: i,
|
|
1370
1389
|
query: r,
|
|
1371
1390
|
width: c
|
|
1372
1391
|
})} ${c}w`).join(", ");
|
|
1373
|
-
const
|
|
1392
|
+
const Hs = ({ image: e, className: t, testId: n }) => {
|
|
1374
1393
|
const {
|
|
1375
1394
|
description: r,
|
|
1376
1395
|
height: i,
|
|
@@ -1381,7 +1400,7 @@ const Is = ({ image: e, className: t, testId: n }) => {
|
|
|
1381
1400
|
loading: u,
|
|
1382
1401
|
decoding: l,
|
|
1383
1402
|
fetchPriority: f
|
|
1384
|
-
} = e, { range: h, sizes: p } =
|
|
1403
|
+
} = e, { range: h, sizes: p } = Bs(e), _ = xt({ format: "avif", query: d, range: h, url: o }), j = xt({ format: "webp", query: d, range: h, url: o }), g = xt({ format: "", query: d, range: h, url: o });
|
|
1385
1404
|
return /* @__PURE__ */ s.jsxs("picture", { className: t, children: [
|
|
1386
1405
|
c !== "image/gif" && /* @__PURE__ */ s.jsx(
|
|
1387
1406
|
"source",
|
|
@@ -1419,8 +1438,8 @@ const Is = ({ image: e, className: t, testId: n }) => {
|
|
|
1419
1438
|
] });
|
|
1420
1439
|
};
|
|
1421
1440
|
let Oe = !1;
|
|
1422
|
-
const
|
|
1423
|
-
const r =
|
|
1441
|
+
const Qs = ({ isOpen: e = !1, isLoading: t = !1, children: n }) => {
|
|
1442
|
+
const r = N(), i = se(null), [c, d] = L("hidden");
|
|
1424
1443
|
Z(() => {
|
|
1425
1444
|
const a = i.current;
|
|
1426
1445
|
if (a)
|
|
@@ -1431,7 +1450,7 @@ const Hs = ({ isOpen: e = !1, isLoading: t = !1, children: n }) => {
|
|
|
1431
1450
|
const o = ({ propertyName: a }) => {
|
|
1432
1451
|
a === "opacity" && (Oe !== !1 && clearTimeout(Oe), d((u) => u === "opening" ? "open" : u === "closing" ? "closed" : u === "closed" ? "hidden" : u));
|
|
1433
1452
|
};
|
|
1434
|
-
return
|
|
1453
|
+
return De(() => {
|
|
1435
1454
|
Oe !== !1 && clearTimeout(Oe);
|
|
1436
1455
|
let a = "open";
|
|
1437
1456
|
e ? d("opening") : (d("closing"), a = "hidden"), Oe = setTimeout(() => {
|
|
@@ -1440,7 +1459,7 @@ const Hs = ({ isOpen: e = !1, isLoading: t = !1, children: n }) => {
|
|
|
1440
1459
|
}, [e]), /* @__PURE__ */ s.jsx("aside", { ref: i, className: S("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
1460
|
};
|
|
1442
1461
|
const jn = ({ children: e, className: t = "", ...n }) => /* @__PURE__ */ s.jsx("section", { className: S("full-width-section", t), ...n, children: e });
|
|
1443
|
-
const
|
|
1462
|
+
const ho = ({ text: e, buttons: t, className: n = "" }) => {
|
|
1444
1463
|
const r = [];
|
|
1445
1464
|
return t.forEach((i) => {
|
|
1446
1465
|
r.push({
|
|
@@ -1454,11 +1473,11 @@ const fo = ({ text: e, buttons: t, className: n = "" }) => {
|
|
|
1454
1473
|
children: i.text
|
|
1455
1474
|
});
|
|
1456
1475
|
}), /* @__PURE__ */ s.jsx(jn, { className: S("download-section", n), children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1457
|
-
|
|
1476
|
+
D.createElement(typeof e == "string" ? "h2" : e.element, { className: "text" }, typeof e == "string" ? e : e.text),
|
|
1458
1477
|
/* @__PURE__ */ s.jsx(it, { buttons: r })
|
|
1459
1478
|
] }) });
|
|
1460
1479
|
};
|
|
1461
|
-
const
|
|
1480
|
+
const po = ({ title: e = !1, logos: t = [], className: n = "" }) => {
|
|
1462
1481
|
const r = t.length;
|
|
1463
1482
|
if (r === 0)
|
|
1464
1483
|
return null;
|
|
@@ -1467,7 +1486,7 @@ const ho = ({ title: e = !1, logos: t = [], className: n = "" }) => {
|
|
|
1467
1486
|
text: typeof e == "string" ? e : typeof e == "object" ? e.text : ""
|
|
1468
1487
|
};
|
|
1469
1488
|
return /* @__PURE__ */ s.jsxs("div", { className: S("logos", n), children: [
|
|
1470
|
-
e &&
|
|
1489
|
+
e && D.createElement(i.element, { className: "title" }, i.text),
|
|
1471
1490
|
/* @__PURE__ */ s.jsx(
|
|
1472
1491
|
"ul",
|
|
1473
1492
|
{
|
|
@@ -1503,7 +1522,7 @@ const ho = ({ title: e = !1, logos: t = [], className: n = "" }) => {
|
|
|
1503
1522
|
)
|
|
1504
1523
|
] });
|
|
1505
1524
|
};
|
|
1506
|
-
const
|
|
1525
|
+
const Us = [
|
|
1507
1526
|
"small",
|
|
1508
1527
|
"span",
|
|
1509
1528
|
"strong",
|
|
@@ -1517,7 +1536,7 @@ const Qs = [
|
|
|
1517
1536
|
"h6",
|
|
1518
1537
|
"blockquote",
|
|
1519
1538
|
"q"
|
|
1520
|
-
],
|
|
1539
|
+
], Ws = ({
|
|
1521
1540
|
className: e = "",
|
|
1522
1541
|
content: t,
|
|
1523
1542
|
image: n,
|
|
@@ -1535,7 +1554,7 @@ const Qs = [
|
|
|
1535
1554
|
if (typeof t[l] == "object") {
|
|
1536
1555
|
u[l] = t[l];
|
|
1537
1556
|
const { text: f, element: h } = t[l];
|
|
1538
|
-
if (h &&
|
|
1557
|
+
if (h && Us.includes(h.toLowerCase()))
|
|
1539
1558
|
return;
|
|
1540
1559
|
u[l] = {
|
|
1541
1560
|
text: f,
|
|
@@ -1563,7 +1582,7 @@ const Qs = [
|
|
|
1563
1582
|
o.map((l) => {
|
|
1564
1583
|
if (u[l] && typeof u[l] == "object") {
|
|
1565
1584
|
const { text: f, element: h = "" } = u[l];
|
|
1566
|
-
return
|
|
1585
|
+
return D.createElement(
|
|
1567
1586
|
h.toLowerCase(),
|
|
1568
1587
|
{ key: l, className: l },
|
|
1569
1588
|
f
|
|
@@ -1583,12 +1602,12 @@ const Qs = [
|
|
|
1583
1602
|
}
|
|
1584
1603
|
)
|
|
1585
1604
|
] }),
|
|
1586
|
-
n && /* @__PURE__ */ s.jsx(
|
|
1605
|
+
n && /* @__PURE__ */ s.jsx(Hs, { image: { ...n, aspect: "banner" } })
|
|
1587
1606
|
] })
|
|
1588
1607
|
}
|
|
1589
1608
|
);
|
|
1590
|
-
},
|
|
1591
|
-
const
|
|
1609
|
+
}, go = Pe(Ws);
|
|
1610
|
+
const _o = ({
|
|
1592
1611
|
variant: e = "primary",
|
|
1593
1612
|
button: t = null,
|
|
1594
1613
|
title: n,
|
|
@@ -1605,45 +1624,62 @@ const go = ({
|
|
|
1605
1624
|
default: "dpo@apolitical.co",
|
|
1606
1625
|
eu: "dpo.agl@apolitical.foundation"
|
|
1607
1626
|
}
|
|
1608
|
-
},
|
|
1627
|
+
}, xo = "200,000+";
|
|
1609
1628
|
const yn = ({ label: e = !1, className: t = "", children: n }) => {
|
|
1610
|
-
const r =
|
|
1629
|
+
const r = N();
|
|
1611
1630
|
return /* @__PURE__ */ s.jsxs("details", { className: S("collapsible-section", t), children: [
|
|
1612
1631
|
/* @__PURE__ */ s.jsx("summary", { children: e || r.formatMessage({ id: "collapsibleSection_summary" }) }),
|
|
1613
1632
|
/* @__PURE__ */ s.jsx("div", { className: "content", children: n })
|
|
1614
1633
|
] });
|
|
1615
1634
|
};
|
|
1616
1635
|
const Se = ({ variant: e = "primary", className: t = "", children: n, ...r }) => /* @__PURE__ */ s.jsx("div", { className: S("highlighted-text-box", e, t), ...r, children: n });
|
|
1617
|
-
const ct = ({
|
|
1636
|
+
const ct = ({
|
|
1637
|
+
variant: e = "empty",
|
|
1638
|
+
text: t = !1,
|
|
1639
|
+
button: n = !1,
|
|
1640
|
+
className: r = ""
|
|
1641
|
+
}) => {
|
|
1618
1642
|
let i = n && !!Object.keys(n).length;
|
|
1619
1643
|
const c = typeof n == "object" && "breakpoints" in n, d = at(c);
|
|
1620
1644
|
if (c && typeof n == "object" && typeof d == "number") {
|
|
1621
|
-
const f = Object.assign({}, n.breakpoints), h =
|
|
1622
|
-
i =
|
|
1645
|
+
const f = Object.assign({}, n.breakpoints), h = wn(Object.keys(f));
|
|
1646
|
+
i = vn(d, h, f);
|
|
1623
1647
|
}
|
|
1624
|
-
const {
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1648
|
+
const {
|
|
1649
|
+
breakpoints: o,
|
|
1650
|
+
text: a = "",
|
|
1651
|
+
component: u,
|
|
1652
|
+
...l
|
|
1653
|
+
} = n;
|
|
1654
|
+
return /* @__PURE__ */ s.jsx(
|
|
1655
|
+
Se,
|
|
1656
|
+
{
|
|
1657
|
+
variant: "subtle",
|
|
1658
|
+
className: S("empty-state-box", e, r),
|
|
1659
|
+
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1660
|
+
t && /* @__PURE__ */ s.jsx(rt, { options: { forceBlock: !0 }, children: t }),
|
|
1661
|
+
i && typeof n == "object" && (u || /* @__PURE__ */ s.jsx(
|
|
1662
|
+
X,
|
|
1663
|
+
{
|
|
1664
|
+
...l,
|
|
1665
|
+
variant: n.variant ? n.variant : "secondary",
|
|
1666
|
+
children: a
|
|
1667
|
+
}
|
|
1668
|
+
))
|
|
1669
|
+
] })
|
|
1670
|
+
}
|
|
1671
|
+
);
|
|
1636
1672
|
};
|
|
1637
1673
|
const Rt = ({ children: e, ...t }) => /* @__PURE__ */ s.jsx("p", { ...t, children: e }), En = { q: Rt, blockquote: Rt };
|
|
1638
1674
|
for (let e = 1; e <= 6; e++)
|
|
1639
1675
|
En[`h${e}`] = { component: Rt, props: { className: "title" } };
|
|
1640
|
-
const
|
|
1676
|
+
const zs = ({ type: e = "default", className: t = "", heading: n = !1, children: r }) => /* @__PURE__ */ s.jsxs("div", { className: S("helper-text-box text-small", e, t), children: [
|
|
1641
1677
|
n && /* @__PURE__ */ s.jsx("p", { className: "title", children: n }),
|
|
1642
1678
|
typeof r == "string" ? /* @__PURE__ */ s.jsx(
|
|
1643
1679
|
rt,
|
|
1644
1680
|
{
|
|
1645
1681
|
options: {
|
|
1646
|
-
wrapper:
|
|
1682
|
+
wrapper: D.Fragment,
|
|
1647
1683
|
forceBlock: !0,
|
|
1648
1684
|
overrides: En
|
|
1649
1685
|
},
|
|
@@ -1651,8 +1687,8 @@ const Ws = ({ type: e = "default", className: t = "", heading: n = !1, children:
|
|
|
1651
1687
|
}
|
|
1652
1688
|
) : /* @__PURE__ */ s.jsx("p", { children: r })
|
|
1653
1689
|
] });
|
|
1654
|
-
const
|
|
1655
|
-
const c =
|
|
1690
|
+
const bo = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children: i }) => {
|
|
1691
|
+
const c = N(), d = se(null), [o, a] = L(""), [u, l] = L("closed");
|
|
1656
1692
|
Z(() => {
|
|
1657
1693
|
const p = d.current;
|
|
1658
1694
|
if (p)
|
|
@@ -1694,20 +1730,20 @@ const xo = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1694
1730
|
}
|
|
1695
1731
|
) })
|
|
1696
1732
|
] });
|
|
1697
|
-
},
|
|
1698
|
-
const t =
|
|
1733
|
+
}, Vs = () => D.Fragment, Ys = ({ children: e }) => /* @__PURE__ */ s.jsx(Se, { variant: "secondary", children: e }), Gs = ["span", "strong", "h1", "h2", "h3", "h4", "h5", "h6", "p"], Js = ({ children: e }) => {
|
|
1734
|
+
const t = N();
|
|
1699
1735
|
if (!e)
|
|
1700
1736
|
return null;
|
|
1701
1737
|
let n = t.formatMessage({ id: "markdown_collapsibleSection_summary" });
|
|
1702
1738
|
const r = [];
|
|
1703
|
-
for (const c of
|
|
1739
|
+
for (const c of At.toArray(e))
|
|
1704
1740
|
if (!(!c || typeof c == "string" || typeof c == "number"))
|
|
1705
|
-
if (
|
|
1741
|
+
if (D.isValidElement(c) && c.type === "summary") {
|
|
1706
1742
|
if (c.props && c.props.children) {
|
|
1707
|
-
for (const d of
|
|
1708
|
-
if (!(!d || typeof d == "string" || typeof d == "number") &&
|
|
1743
|
+
for (const d of At.toArray(c.props.children))
|
|
1744
|
+
if (!(!d || typeof d == "string" || typeof d == "number") && D.isValidElement(d)) {
|
|
1709
1745
|
const o = d.type;
|
|
1710
|
-
if (
|
|
1746
|
+
if (Gs.includes(o)) {
|
|
1711
1747
|
for (n = d.props.children; typeof n != "string" && (Array.isArray(n) && n[0].props && n[0].props.children && n[0].props.children[0]); )
|
|
1712
1748
|
n = n[0].props.children[0];
|
|
1713
1749
|
break;
|
|
@@ -1725,7 +1761,7 @@ const xo = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1725
1761
|
children: r.map((c) => c)
|
|
1726
1762
|
}
|
|
1727
1763
|
);
|
|
1728
|
-
},
|
|
1764
|
+
}, Xs = ({ children: e, ...t }) => {
|
|
1729
1765
|
if (t.class)
|
|
1730
1766
|
switch (t.class) {
|
|
1731
1767
|
case "casestudy":
|
|
@@ -1739,8 +1775,8 @@ const xo = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1739
1775
|
return /* @__PURE__ */ s.jsx("div", { ...t, children: e });
|
|
1740
1776
|
}
|
|
1741
1777
|
return /* @__PURE__ */ s.jsx("div", { ...t, children: e });
|
|
1742
|
-
},
|
|
1743
|
-
const t =
|
|
1778
|
+
}, Zs = (e) => {
|
|
1779
|
+
const t = N(), n = Date.now().toString();
|
|
1744
1780
|
let r = "default";
|
|
1745
1781
|
const i = e.src;
|
|
1746
1782
|
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: [
|
|
@@ -1751,52 +1787,58 @@ const xo = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1751
1787
|
}, an = (e) => {
|
|
1752
1788
|
let t = "";
|
|
1753
1789
|
return e && typeof e != "string" && typeof e != "number" && typeof e != "boolean" && "type" in e && (t = e.type), t;
|
|
1754
|
-
},
|
|
1790
|
+
}, Ks = ({ children: e, ...t }) => {
|
|
1755
1791
|
let n = { ...t };
|
|
1756
1792
|
t.href && (t.href.includes("http:") || t.href.includes("https:")) && !t.target && (n.target = "_blank");
|
|
1757
1793
|
let r = e, i = !1;
|
|
1758
|
-
for (const c of
|
|
1759
|
-
if (!(!c || typeof c == "string" || typeof c == "number") &&
|
|
1794
|
+
for (const c of At.toArray(e))
|
|
1795
|
+
if (!(!c || typeof c == "string" || typeof c == "number") && D.isValidElement(c)) {
|
|
1760
1796
|
const d = c.type;
|
|
1761
1797
|
if (["button", "center", "span", "strong"].includes(d) && c.props && c.props.children && c.props.children[0])
|
|
1762
|
-
for ((d === "button" || an(c.props.children[0]) === "button") && (i = !0), r = c.props.children[0]; r && typeof r != "string" && !(typeof r == "boolean" || typeof r == "number" || !
|
|
1798
|
+
for ((d === "button" || an(c.props.children[0]) === "button") && (i = !0), r = c.props.children[0]; r && typeof r != "string" && !(typeof r == "boolean" || typeof r == "number" || !D.isValidElement(r)); )
|
|
1763
1799
|
if (r.props && r.props.children && r.props.children[0])
|
|
1764
1800
|
r = r.props.children[0], r && an(r) === "button" && (i = !0);
|
|
1765
1801
|
else
|
|
1766
1802
|
break;
|
|
1767
1803
|
}
|
|
1768
1804
|
return i ? (n = { ...n, className: "button primary medium" }, /* @__PURE__ */ s.jsx("p", { className: "center", children: /* @__PURE__ */ s.jsx(X, { variant: "primary", size: "medium", ...n, children: r }) })) : /* @__PURE__ */ s.jsx("a", { ...n, children: r });
|
|
1769
|
-
},
|
|
1805
|
+
}, qs = ({ children: e }) => /* @__PURE__ */ s.jsx("span", { children: e });
|
|
1770
1806
|
const ln = ({ className: e = "", options: t = {}, children: n }) => {
|
|
1771
1807
|
n = n.replace(/^<br\/?>/, "");
|
|
1772
1808
|
const r = {
|
|
1773
|
-
wrapper:
|
|
1809
|
+
wrapper: D.Fragment,
|
|
1774
1810
|
forceBlock: !0,
|
|
1775
1811
|
overrides: {
|
|
1776
|
-
a:
|
|
1812
|
+
a: Ks,
|
|
1777
1813
|
// Override psuedo-code
|
|
1778
1814
|
// We give the content team psuedo-code short cuts to use in Contentful
|
|
1779
1815
|
CollapsibleSection: yn,
|
|
1780
1816
|
TextBox: Se,
|
|
1781
|
-
CaseStudy:
|
|
1817
|
+
CaseStudy: Ys,
|
|
1782
1818
|
// Override embedded HTML
|
|
1783
1819
|
// Our content team previously used real HTML, which we need to tear out and replace with React components
|
|
1784
|
-
style:
|
|
1785
|
-
details:
|
|
1786
|
-
div:
|
|
1787
|
-
iframe:
|
|
1820
|
+
style: Vs,
|
|
1821
|
+
details: Js,
|
|
1822
|
+
div: Xs,
|
|
1823
|
+
iframe: Zs
|
|
1788
1824
|
}
|
|
1789
1825
|
};
|
|
1790
1826
|
return /* @__PURE__ */ s.jsx("div", { className: S("markdown-text", e), children: /* @__PURE__ */ s.jsx(rt, { options: { ...r, ...t }, children: n }) });
|
|
1791
1827
|
};
|
|
1792
|
-
const
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1828
|
+
const er = ({
|
|
1829
|
+
size: e = "medium",
|
|
1830
|
+
variant: t = "default",
|
|
1831
|
+
className: n = "",
|
|
1832
|
+
children: r,
|
|
1833
|
+
...i
|
|
1834
|
+
}) => /* @__PURE__ */ s.jsx("span", { className: S("pill", e, t, n), ...i, children: r });
|
|
1835
|
+
const Ft = ({ element: e = "p", children: t = null, className: n = "", ...r }) => D.createElement(e, { ...r, className: S("status-banner text-small", n), "aria-live": "assertive" }, t);
|
|
1836
|
+
const tr = ({ progress: e = 0, text: t = !1, className: n = "" }) => {
|
|
1837
|
+
const r = N(), i = e > 75 ? 100 : e > 50 ? 75 : e > 25 ? 50 : e > 5 ? 25 : 0, c = { "--progress": `${e}%` };
|
|
1796
1838
|
return /* @__PURE__ */ s.jsx("span", { className: S(`progress-bar section-${i}`, n), style: c, children: /* @__PURE__ */ s.jsx(de, { children: t ? `${e} ${t}` : r.formatMessage({ id: "progressBar" }, { number: e }) }) });
|
|
1797
|
-
},
|
|
1798
|
-
const bt = "loadingBlock_",
|
|
1799
|
-
const r =
|
|
1839
|
+
}, nr = Pe(tr);
|
|
1840
|
+
const bt = "loadingBlock_", sr = ({ progress: e = 0, steps: t = !1, className: n = "" }) => {
|
|
1841
|
+
const r = N();
|
|
1800
1842
|
t || (t = {
|
|
1801
1843
|
0: { text: r.formatMessage({ id: `${bt}loading` }) },
|
|
1802
1844
|
75: { text: r.formatMessage({ id: `${bt}almostDone` }) },
|
|
@@ -1815,22 +1857,33 @@ const bt = "loadingBlock_", nr = ({ progress: e = 0, steps: t = !1, className: n
|
|
|
1815
1857
|
style: d,
|
|
1816
1858
|
children: [
|
|
1817
1859
|
i && /* @__PURE__ */ s.jsx("span", { className: "step", children: t[i].text }),
|
|
1818
|
-
/* @__PURE__ */ s.jsx(
|
|
1860
|
+
/* @__PURE__ */ s.jsx(nr, { progress: e })
|
|
1819
1861
|
]
|
|
1820
1862
|
}
|
|
1821
1863
|
);
|
|
1822
|
-
},
|
|
1864
|
+
}, wo = Pe(sr);
|
|
1823
1865
|
const ye = ({ element: e = "div", className: t = "", ...n }) => /* @__PURE__ */ s.jsx(xn, { element: e, className: S("loading-placeholder", t), ...n });
|
|
1824
1866
|
const Lt = {
|
|
1825
1867
|
header: ["logo", "link", "link", "search"],
|
|
1826
1868
|
sidebar: ["text", "text", "text", "text", "text"],
|
|
1827
1869
|
"cards-section": ["subtitle", "cards"],
|
|
1870
|
+
heading: ["title"],
|
|
1828
1871
|
cards: ["card", "card", "card", "card"],
|
|
1829
|
-
|
|
1830
|
-
|
|
1872
|
+
carousel: ["cards", "controls"],
|
|
1873
|
+
"carousel-with-title": ["title", "cards", "controls"],
|
|
1874
|
+
"overview-page": [
|
|
1875
|
+
"header",
|
|
1876
|
+
"sidebar",
|
|
1877
|
+
"title",
|
|
1878
|
+
"text",
|
|
1879
|
+
"cards-section",
|
|
1880
|
+
"cards-section",
|
|
1881
|
+
"footer"
|
|
1882
|
+
]
|
|
1883
|
+
}, Sn = (e, t) => e in Lt ? /* @__PURE__ */ s.jsx("div", { className: e, children: Lt[e].map((n, r) => Sn(n, r)) }, t) : /* @__PURE__ */ s.jsx(ye, { className: e }, t), rr = ({ layout: e = "overview-page", ...t }) => /* @__PURE__ */ s.jsx("div", { className: S("loading-state", e), ...t, children: Lt[e].map((n, r) => Sn(n, r)) }), Tn = (e) => {
|
|
1831
1884
|
const t = e && e.toUpperCase().split(" ");
|
|
1832
1885
|
return Array.isArray(t) && t.length > 1 && t[0] !== "" ? t[1] === "" ? t[0][0] : t[0][0] + t[t.length - 1][0] : e ? e.substr(0, 1) : "";
|
|
1833
|
-
}, Ve = ["#5AB6A3", "#A2D7AF", "#806056", "#3962B3"],
|
|
1886
|
+
}, Ve = ["#5AB6A3", "#A2D7AF", "#806056", "#3962B3"], or = (e) => {
|
|
1834
1887
|
const t = Math.ceil(26 / Ve.length), n = Tn(e).toLowerCase();
|
|
1835
1888
|
if (n === "")
|
|
1836
1889
|
return Ve[0];
|
|
@@ -1839,7 +1892,15 @@ const Lt = {
|
|
|
1839
1892
|
if (r <= t * (i + 1))
|
|
1840
1893
|
return Ve[i];
|
|
1841
1894
|
};
|
|
1842
|
-
const cn = 256, It = ({
|
|
1895
|
+
const cn = 256, It = ({
|
|
1896
|
+
className: e = "",
|
|
1897
|
+
src: t = "",
|
|
1898
|
+
name: n,
|
|
1899
|
+
alt: r,
|
|
1900
|
+
width: i = cn,
|
|
1901
|
+
height: c = cn,
|
|
1902
|
+
...d
|
|
1903
|
+
}) => {
|
|
1843
1904
|
const [o, a] = L(!1), u = se(null);
|
|
1844
1905
|
Z(() => {
|
|
1845
1906
|
const f = u.current;
|
|
@@ -1849,21 +1910,28 @@ const cn = 256, It = ({ className: e = "", src: t = "", name: n, alt: r, width:
|
|
|
1849
1910
|
if (!h)
|
|
1850
1911
|
return;
|
|
1851
1912
|
const p = i, _ = c;
|
|
1852
|
-
typeof window < "u" && window.devicePixelRatio && (f.width = p * window.devicePixelRatio, f.height = _ * window.devicePixelRatio, h.scale(window.devicePixelRatio, window.devicePixelRatio)), h.fillStyle =
|
|
1913
|
+
typeof window < "u" && window.devicePixelRatio && (f.width = p * window.devicePixelRatio, f.height = _ * window.devicePixelRatio, h.scale(window.devicePixelRatio, window.devicePixelRatio)), h.fillStyle = or(n), h.fillRect(0, 0, p, _), h.font = `${p / 3}px Arial`, h.textAlign = "center", h.fillStyle = "white", h.fillText(Tn(n), p / 2, _ / 1.6);
|
|
1853
1914
|
}, [n]);
|
|
1854
1915
|
let l = !1;
|
|
1855
|
-
return t && t !== "" && !o && (t.includes("http") || t.includes("//")) && (l = !0), /* @__PURE__ */ s.jsx(
|
|
1856
|
-
"
|
|
1916
|
+
return t && t !== "" && !o && (t.includes("http") || t.includes("//")) && (l = !0), /* @__PURE__ */ s.jsx(
|
|
1917
|
+
"figure",
|
|
1857
1918
|
{
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1919
|
+
className: S("profile-picture", e, { error: o }),
|
|
1920
|
+
...d,
|
|
1921
|
+
children: l ? /* @__PURE__ */ s.jsx(
|
|
1922
|
+
"img",
|
|
1923
|
+
{
|
|
1924
|
+
src: t,
|
|
1925
|
+
alt: r || n,
|
|
1926
|
+
onError: () => {
|
|
1927
|
+
a(!0);
|
|
1928
|
+
},
|
|
1929
|
+
width: i,
|
|
1930
|
+
height: c
|
|
1931
|
+
}
|
|
1932
|
+
) : /* @__PURE__ */ s.jsx("canvas", { ref: u })
|
|
1865
1933
|
}
|
|
1866
|
-
)
|
|
1934
|
+
);
|
|
1867
1935
|
}, $n = (e) => e === "apolitical" ? {
|
|
1868
1936
|
image: `${Pt}logos/member_apolitical.svg`
|
|
1869
1937
|
} : e === "community" || typeof e == "object" && !e.name ? {
|
|
@@ -1875,7 +1943,7 @@ const cn = 256, It = ({ className: e = "", src: t = "", name: n, alt: r, width:
|
|
|
1875
1943
|
country: e.location && e.location.country || "",
|
|
1876
1944
|
url: `/profiles/${e.id}`,
|
|
1877
1945
|
image: e.image && e.image.thumbnail
|
|
1878
|
-
},
|
|
1946
|
+
}, ar = ({
|
|
1879
1947
|
role: e = "",
|
|
1880
1948
|
organisation: t = "",
|
|
1881
1949
|
country: n = "",
|
|
@@ -1896,10 +1964,10 @@ const Ht = ({
|
|
|
1896
1964
|
gtmType: i = "member-click",
|
|
1897
1965
|
className: c = ""
|
|
1898
1966
|
}) => {
|
|
1899
|
-
const d =
|
|
1967
|
+
const d = N(), o = $n(t);
|
|
1900
1968
|
o.name || (o.name = d.formatMessage({ id: `member_${typeof t == "string" ? t : "community"}` }));
|
|
1901
|
-
const { name: a, url: u, image: l } = o, f =
|
|
1902
|
-
return
|
|
1969
|
+
const { name: a, url: u, image: l } = o, f = ar(o), h = n && n.createdAt ? Cs(n.createdAt) : !1, p = n && n.createdAt ? Ms(n.createdAt) : "";
|
|
1970
|
+
return D.createElement(e, {
|
|
1903
1971
|
className: S("member text-medium", c),
|
|
1904
1972
|
children: /* @__PURE__ */ s.jsxs(
|
|
1905
1973
|
lt,
|
|
@@ -1928,31 +1996,58 @@ const Ht = ({
|
|
|
1928
1996
|
const dn = {
|
|
1929
1997
|
small: 24,
|
|
1930
1998
|
medium: 48
|
|
1931
|
-
},
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1999
|
+
}, ir = ({
|
|
2000
|
+
element: e = "div",
|
|
2001
|
+
contributors: { total: t, data: n } = { total: void 0, data: [] },
|
|
2002
|
+
styling: { showText: r, size: i, showGap: c, showPlaceholders: d } = {
|
|
2003
|
+
showText: !0,
|
|
2004
|
+
size: "medium",
|
|
2005
|
+
showGap: !0,
|
|
2006
|
+
showPlaceholders: !1
|
|
2007
|
+
},
|
|
2008
|
+
cutoff: o = 2,
|
|
2009
|
+
className: a = "",
|
|
2010
|
+
...u
|
|
2011
|
+
}) => {
|
|
2012
|
+
const l = N();
|
|
2013
|
+
return !n || n.length === 0 ? null : D.createElement(e, {
|
|
2014
|
+
...u,
|
|
2015
|
+
className: S("contributors", a, i, { "has-gap": c }),
|
|
2016
|
+
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2017
|
+
/* @__PURE__ */ s.jsx("ul", { children: n.map((f, h) => {
|
|
2018
|
+
let p, _ = "";
|
|
2019
|
+
if (h < o) {
|
|
2020
|
+
const { name: j = "", image: g = "" } = $n(f);
|
|
1940
2021
|
if (d)
|
|
1941
|
-
return /* @__PURE__ */ s.jsx(ye, { element: "li", className: "contributor" },
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
2022
|
+
return /* @__PURE__ */ s.jsx(ye, { element: "li", className: "contributor" }, h);
|
|
2023
|
+
p = /* @__PURE__ */ s.jsx(
|
|
2024
|
+
It,
|
|
2025
|
+
{
|
|
2026
|
+
name: j,
|
|
2027
|
+
src: g,
|
|
2028
|
+
width: dn[i || "medium"],
|
|
2029
|
+
height: dn[i || "medium"]
|
|
2030
|
+
}
|
|
2031
|
+
);
|
|
2032
|
+
} else if (h === o) {
|
|
2033
|
+
const j = (t || n.length) - o;
|
|
2034
|
+
p = /* @__PURE__ */ s.jsxs(
|
|
2035
|
+
"small",
|
|
2036
|
+
{
|
|
2037
|
+
className: S({ "large-number": j > 99 }),
|
|
2038
|
+
children: [
|
|
2039
|
+
"+",
|
|
2040
|
+
Ls(j, 0)
|
|
2041
|
+
]
|
|
2042
|
+
}
|
|
2043
|
+
), _ = "number-left";
|
|
1949
2044
|
}
|
|
1950
|
-
return
|
|
2045
|
+
return p ? /* @__PURE__ */ s.jsx("li", { className: S("contributor", _), children: p }, h) : null;
|
|
1951
2046
|
}) }),
|
|
1952
|
-
r && /* @__PURE__ */ s.jsx("span", { className: "label", children: typeof r == "string" ? r : n.length === 1 ? typeof n[0] == "string" ?
|
|
1953
|
-
] })
|
|
1954
|
-
);
|
|
1955
|
-
},
|
|
2047
|
+
r && /* @__PURE__ */ s.jsx("span", { className: "label", children: typeof r == "string" ? r : n.length === 1 ? typeof n[0] == "string" ? l.formatMessage({ id: `member_${n[0]}` }) : st(n[0].name || "", 20) : null })
|
|
2048
|
+
] })
|
|
2049
|
+
});
|
|
2050
|
+
}, lr = ({ showDevTools: e = !0, children: t }) => {
|
|
1956
2051
|
const n = new ds({
|
|
1957
2052
|
// default options we would like on all queries can be overridden individually
|
|
1958
2053
|
defaultOptions: {
|
|
@@ -1969,15 +2064,15 @@ const dn = {
|
|
|
1969
2064
|
e && /* @__PURE__ */ s.jsx(ms, { initialIsOpen: !1 })
|
|
1970
2065
|
] });
|
|
1971
2066
|
};
|
|
1972
|
-
var
|
|
1973
|
-
function
|
|
2067
|
+
var cr = Ot({ client: Ke });
|
|
2068
|
+
function dr(e) {
|
|
1974
2069
|
var t = e.children, n = e.client, r = e.apiKey, i = e.options, c = nt(function() {
|
|
1975
2070
|
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 && (Ke.__loaded && console.warn("[PostHog.js] was already loaded elsewhere. This may cause issues."), Ke.init(r, i)), Ke);
|
|
1976
2071
|
}, [n, r]);
|
|
1977
|
-
return
|
|
2072
|
+
return D.createElement(cr.Provider, { value: { client: c } }, t);
|
|
1978
2073
|
}
|
|
1979
|
-
const
|
|
1980
|
-
|
|
2074
|
+
const ur = ({ children: e, user: t }) => t.isLoading ? /* @__PURE__ */ s.jsx(s.Fragment, {}) : process.env.REACT_APP_PUBLIC_POSTHOG_KEY ? /* @__PURE__ */ s.jsx(
|
|
2075
|
+
dr,
|
|
1981
2076
|
{
|
|
1982
2077
|
apiKey: atob(process.env.REACT_APP_PUBLIC_POSTHOG_KEY),
|
|
1983
2078
|
options: {
|
|
@@ -1992,27 +2087,27 @@ const dr = ({ children: e, user: t }) => t.isLoading ? /* @__PURE__ */ s.jsx(s.F
|
|
|
1992
2087
|
},
|
|
1993
2088
|
children: e
|
|
1994
2089
|
}
|
|
1995
|
-
) : e,
|
|
2090
|
+
) : e, mr = ({ children: e, locale: t, messages: n }) => {
|
|
1996
2091
|
const r = t || "en", i = {
|
|
1997
2092
|
...Rs[r],
|
|
1998
2093
|
...n || {}
|
|
1999
2094
|
};
|
|
2000
2095
|
return /* @__PURE__ */ s.jsx(ls, { locale: r, messages: i, children: e });
|
|
2001
|
-
}, Te = Ot(null),
|
|
2096
|
+
}, Te = Ot(null), fr = ({ children: e, user: t }) => /* @__PURE__ */ s.jsx(Te.Provider, { value: t, children: e }), vo = ({ bootstrap: e, children: t, intl: n }) => {
|
|
2002
2097
|
const [r, i] = L({ isLoading: !0 });
|
|
2003
2098
|
return Z(() => {
|
|
2004
2099
|
e().then((c) => i({ ...c, isLoading: !1 })).catch(() => i({ isLoading: !1 }));
|
|
2005
|
-
}, []), /* @__PURE__ */ s.jsx(
|
|
2100
|
+
}, []), /* @__PURE__ */ s.jsx(mr, { locale: n == null ? void 0 : n.locale, messages: n == null ? void 0 : n.messages, children: /* @__PURE__ */ s.jsx(fr, { user: r, children: /* @__PURE__ */ s.jsx(lr, { children: /* @__PURE__ */ s.jsx(ur, { user: r, children: t }) }) }) });
|
|
2006
2101
|
};
|
|
2007
|
-
const
|
|
2102
|
+
const wt = "joinCommunityButton", Mn = ({ isMember: e = !1, isShort: t = !1, functions: { join: n, leave: r } = { join: () => {
|
|
2008
2103
|
}, leave: () => {
|
|
2009
2104
|
} } }) => {
|
|
2010
|
-
const i =
|
|
2105
|
+
const i = N(), c = be(Te), d = c && typeof c.id == "string", [o, a] = L(e), [u, l] = L(e ? "joined" : "notJoined");
|
|
2011
2106
|
Z(() => {
|
|
2012
2107
|
u === "joining" ? l("joined") : u === "leaving" && l("notJoined");
|
|
2013
2108
|
}, [o]);
|
|
2014
2109
|
const f = {}, h = {};
|
|
2015
|
-
return o && u !== "leaving" && (f["data-hover-text"] = i.formatMessage({ id: `${
|
|
2110
|
+
return o && u !== "leaving" && (f["data-hover-text"] = i.formatMessage({ id: `${wt}_leave` }), f["aria-label"] = i.formatMessage({ id: `${wt}_member_aria` }), h["aria-hidden"] = "true"), /* @__PURE__ */ s.jsx(
|
|
2016
2111
|
X,
|
|
2017
2112
|
{
|
|
2018
2113
|
variant: o ? "secondary" : "primary",
|
|
@@ -2025,30 +2120,30 @@ const vt = "joinCommunityButton", Mn = ({ isMember: e = !1, isShort: t = !1, fun
|
|
|
2025
2120
|
className: S("join-community-button", u, { active: u === "joining" }),
|
|
2026
2121
|
disabled: !d,
|
|
2027
2122
|
...f,
|
|
2028
|
-
children: /* @__PURE__ */ s.jsx("span", { className: "text", ...h, children: i.formatMessage({ id: `${
|
|
2123
|
+
children: /* @__PURE__ */ s.jsx("span", { className: "text", ...h, children: i.formatMessage({ id: `${wt}${["joining", "leaving"].includes(u) ? `_${u}` : o ? "_member" : t ? "_short" : ""}` }) })
|
|
2029
2124
|
}
|
|
2030
2125
|
);
|
|
2031
2126
|
};
|
|
2032
|
-
const
|
|
2127
|
+
const vt = "communityDetails_", ko = ({
|
|
2033
2128
|
className: e = "",
|
|
2034
2129
|
isMember: t = !1,
|
|
2035
2130
|
slug: n,
|
|
2036
2131
|
members: { number: r = 0, data: i = [] } = { number: 0, data: [] },
|
|
2037
2132
|
functions: { invite: c, ...d }
|
|
2038
2133
|
}) => {
|
|
2039
|
-
const o =
|
|
2134
|
+
const o = N(), a = 5, u = r || i.length, l = i.length ? i : Array(a).fill({});
|
|
2040
2135
|
return /* @__PURE__ */ s.jsxs("div", { className: S("community-details", e), children: [
|
|
2041
|
-
/* @__PURE__ */ s.jsx(
|
|
2136
|
+
/* @__PURE__ */ s.jsx(Ne, {}),
|
|
2042
2137
|
/* @__PURE__ */ s.jsxs("div", { className: "member-details", children: [
|
|
2043
2138
|
/* @__PURE__ */ s.jsxs("div", { className: "top", children: [
|
|
2044
2139
|
/* @__PURE__ */ s.jsxs("h3", { children: [
|
|
2045
|
-
o.formatMessage({ id: `${
|
|
2140
|
+
o.formatMessage({ id: `${vt}members` }),
|
|
2046
2141
|
/* @__PURE__ */ s.jsx("span", { className: "count", children: u })
|
|
2047
2142
|
] }),
|
|
2048
|
-
/* @__PURE__ */ s.jsx("p", { className: "text-small", children: /* @__PURE__ */ s.jsx("a", { href: `/communities/${n}/members`, children: o.formatMessage({ id: `${
|
|
2143
|
+
/* @__PURE__ */ s.jsx("p", { className: "text-small", children: /* @__PURE__ */ s.jsx("a", { href: `/communities/${n}/members`, children: o.formatMessage({ id: `${vt}viewAll` }) }) })
|
|
2049
2144
|
] }),
|
|
2050
2145
|
/* @__PURE__ */ s.jsx(
|
|
2051
|
-
|
|
2146
|
+
ir,
|
|
2052
2147
|
{
|
|
2053
2148
|
contributors: {
|
|
2054
2149
|
total: r,
|
|
@@ -2071,17 +2166,17 @@ const wt = "communityDetails_", wo = ({
|
|
|
2071
2166
|
onClick: c,
|
|
2072
2167
|
icon: { icon: "plus" },
|
|
2073
2168
|
styling: { fullWidth: !0 },
|
|
2074
|
-
children: o.formatMessage({ id: `${
|
|
2169
|
+
children: o.formatMessage({ id: `${vt}invite` })
|
|
2075
2170
|
}
|
|
2076
2171
|
)
|
|
2077
2172
|
] });
|
|
2078
2173
|
};
|
|
2079
|
-
const
|
|
2174
|
+
const jo = ({
|
|
2080
2175
|
breadcrumbs: e,
|
|
2081
2176
|
cutoff: t = 20,
|
|
2082
2177
|
className: n = ""
|
|
2083
2178
|
}) => {
|
|
2084
|
-
const r =
|
|
2179
|
+
const r = N();
|
|
2085
2180
|
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2086
2181
|
/* @__PURE__ */ s.jsx(de, { element: "p", children: r.formatMessage({ id: "breadcrumbs_label" }) }),
|
|
2087
2182
|
/* @__PURE__ */ s.jsx("ul", { className: S("breadcrumbs text-small", n), children: e.map(({ text: i, href: c, current: d = !1 }, o) => /* @__PURE__ */ s.jsxs("li", { children: [
|
|
@@ -2090,7 +2185,7 @@ const ko = ({
|
|
|
2090
2185
|
] }, `${window.btoa(i)}_${o}`)) })
|
|
2091
2186
|
] });
|
|
2092
2187
|
};
|
|
2093
|
-
const
|
|
2188
|
+
const yo = ({
|
|
2094
2189
|
options: e,
|
|
2095
2190
|
allOption: t = !1,
|
|
2096
2191
|
allowMultiple: n = !0,
|
|
@@ -2098,7 +2193,7 @@ const jo = ({
|
|
|
2098
2193
|
},
|
|
2099
2194
|
className: i = ""
|
|
2100
2195
|
}) => {
|
|
2101
|
-
const c =
|
|
2196
|
+
const c = N(), d = t ? [{ id: "all", text: typeof t != "boolean" && t.text || c.formatMessage({ id: "filters_all" }) }, ...e] : e, [o, a] = L(t ? ["all"] : []), u = (l, f) => {
|
|
2102
2197
|
let h = [];
|
|
2103
2198
|
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();
|
|
2104
2199
|
};
|
|
@@ -2117,7 +2212,7 @@ const jo = ({
|
|
|
2117
2212
|
}
|
|
2118
2213
|
) }, l);
|
|
2119
2214
|
}) });
|
|
2120
|
-
},
|
|
2215
|
+
}, hr = (e, t) => {
|
|
2121
2216
|
const n = String(e);
|
|
2122
2217
|
if (!t || !t.length)
|
|
2123
2218
|
return `/${n}`;
|
|
@@ -2126,7 +2221,7 @@ const jo = ({
|
|
|
2126
2221
|
c === "before-lang" ? r += `/${i}` : (r.includes(`/${n}/`) || (r += `/${n}`), r += `/${i}`);
|
|
2127
2222
|
}), r.includes(`/${n}/`) || (r += `/${n}`), r;
|
|
2128
2223
|
};
|
|
2129
|
-
const kt = { en: "English", es: "Español", fr: "Français", pt: "Português" }, Ye = "languageSwitcher_",
|
|
2224
|
+
const kt = { en: "English", es: "Español", fr: "Français", pt: "Português" }, Ye = "languageSwitcher_", Eo = ({
|
|
2130
2225
|
currentLanguage: e,
|
|
2131
2226
|
isOriginalLanguage: t = !1,
|
|
2132
2227
|
isHumanTranslation: n = !1,
|
|
@@ -2138,7 +2233,7 @@ const kt = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2138
2233
|
label: o,
|
|
2139
2234
|
className: a = ""
|
|
2140
2235
|
}) => {
|
|
2141
|
-
const u =
|
|
2236
|
+
const u = N(), [l, f] = L(e);
|
|
2142
2237
|
if (Z(() => {
|
|
2143
2238
|
e !== l && f(e);
|
|
2144
2239
|
}, [e]), !r || !Object.values(r).some((j) => j && j.post_name))
|
|
@@ -2153,7 +2248,7 @@ const kt = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2153
2248
|
let g = { className: j };
|
|
2154
2249
|
return l === j ? g["aria-label"] = u.formatMessage({ id: `${Ye}selected` }, { language: kt[j] }) : g = {
|
|
2155
2250
|
...g,
|
|
2156
|
-
href:
|
|
2251
|
+
href: hr(j, c),
|
|
2157
2252
|
onClick: (E) => {
|
|
2158
2253
|
E.preventDefault(), E.stopPropagation(), f(j), i(j);
|
|
2159
2254
|
}
|
|
@@ -2175,7 +2270,7 @@ const kt = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2175
2270
|
})
|
|
2176
2271
|
] });
|
|
2177
2272
|
};
|
|
2178
|
-
const jt = cs({ locale: "en", messages: Bt }),
|
|
2273
|
+
const jt = cs({ locale: "en", messages: Bt }), pr = ({
|
|
2179
2274
|
page: e = 1,
|
|
2180
2275
|
length: t = 0,
|
|
2181
2276
|
limit: n = 10,
|
|
@@ -2218,13 +2313,13 @@ const jt = cs({ locale: "en", messages: Bt }), hr = ({
|
|
|
2218
2313
|
] });
|
|
2219
2314
|
};
|
|
2220
2315
|
let Ge = !1;
|
|
2221
|
-
const
|
|
2222
|
-
const i =
|
|
2316
|
+
const gr = ({ element: e = "div", id: t = "more-menu", options: n, className: r = "" }) => {
|
|
2317
|
+
const i = N(), c = se(null), [d, o] = L(!1), a = (u) => {
|
|
2223
2318
|
c.current && u.target instanceof HTMLElement && !c.current.contains(u.target) && o(!1);
|
|
2224
2319
|
};
|
|
2225
2320
|
return Z(() => (document.addEventListener("click", a, !0), () => {
|
|
2226
2321
|
document.removeEventListener("click", a, !0);
|
|
2227
|
-
})),
|
|
2322
|
+
})), D.createElement(e, {
|
|
2228
2323
|
ref: c,
|
|
2229
2324
|
className: S("more-menu text-medium", r),
|
|
2230
2325
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
@@ -2271,15 +2366,20 @@ const pr = ({ element: e = "div", id: t = "more-menu", options: n, className: r
|
|
|
2271
2366
|
});
|
|
2272
2367
|
};
|
|
2273
2368
|
const Cn = ({ variant: e = "default", version: t = "default", className: n = "", ...r }) => /* @__PURE__ */ s.jsx("p", { className: "logo-wrapper", children: /* @__PURE__ */ s.jsx("a", { href: "/home/", className: S("logo", e, t, n), ...r, children: /* @__PURE__ */ s.jsx(de, { children: /* @__PURE__ */ s.jsx(Ee, { id: "apolitical" }) }) }) });
|
|
2274
|
-
const
|
|
2369
|
+
const _r = {
|
|
2275
2370
|
"2-1": 901
|
|
2276
|
-
},
|
|
2371
|
+
}, So = ({
|
|
2372
|
+
layout: e = "2-1",
|
|
2373
|
+
hideOnMobile: t = !1,
|
|
2374
|
+
className: n = "",
|
|
2375
|
+
children: r
|
|
2376
|
+
}) => {
|
|
2277
2377
|
const i = at(!0);
|
|
2278
2378
|
let c = r;
|
|
2279
|
-
return
|
|
2379
|
+
return D.Children.count(r) === 1 && (c = D.Children.toArray(r)[0], c.props && (c = c.props.children)), /* @__PURE__ */ s.jsx("section", { className: S("columns", `layout-${e}`, n), children: D.Children.map(c, (d, o) => t !== !1 && o === t && i && i < _r[e] ? null : d) });
|
|
2280
2380
|
};
|
|
2281
|
-
const yt = "cookieBanner_", Et = ["apol-cookie-banner", "apolitical-performance-cookie-consent", "functional-cookie-consent"], St = new Date(Date.now() + 12 * 30 * 24 * 60 * 60 * 1e3),
|
|
2282
|
-
const e =
|
|
2381
|
+
const yt = "cookieBanner_", Et = ["apol-cookie-banner", "apolitical-performance-cookie-consent", "functional-cookie-consent"], St = new Date(Date.now() + 12 * 30 * 24 * 60 * 60 * 1e3), xr = () => {
|
|
2382
|
+
const e = N(), [t, n, r] = fs(Et), [i, c] = L(!t["apol-cookie-banner"]), d = () => {
|
|
2283
2383
|
Et.forEach((l) => {
|
|
2284
2384
|
n(l, !0, {
|
|
2285
2385
|
path: "/",
|
|
@@ -2418,11 +2518,11 @@ const yt = "cookieBanner_", Et = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2418
2518
|
facebook: { href: "https://www.facebook.com/apoliticalco" }
|
|
2419
2519
|
}
|
|
2420
2520
|
};
|
|
2421
|
-
const
|
|
2521
|
+
const Ae = "footer_", qe = "SiteFooter", un = ({ group: e }) => {
|
|
2422
2522
|
const t = ke[e].order || [];
|
|
2423
2523
|
let n = !1;
|
|
2424
|
-
return "text" in ke[e] && (n = ke[e].text), /* @__PURE__ */ s.jsxs(
|
|
2425
|
-
/* @__PURE__ */ s.jsx("p", { className: "pre-title", children: /* @__PURE__ */ s.jsx(Ee, { id: `${
|
|
2524
|
+
return "text" in ke[e] && (n = ke[e].text), /* @__PURE__ */ s.jsxs(Dt, { children: [
|
|
2525
|
+
/* @__PURE__ */ s.jsx("p", { className: "pre-title", children: /* @__PURE__ */ s.jsx(Ee, { id: `${Ae}${e}` }) }),
|
|
2426
2526
|
Array.isArray(t) && t.length > 0 && /* @__PURE__ */ s.jsx("ul", { className: "text-medium", children: t.map((r) => {
|
|
2427
2527
|
if (["order", "child", "text"].includes(r))
|
|
2428
2528
|
return null;
|
|
@@ -2435,14 +2535,14 @@ const De = "footer_", qe = "SiteFooter", un = ({ group: e }) => {
|
|
|
2435
2535
|
"data-gtm-event-context": qe,
|
|
2436
2536
|
"data-gtm-event-type": c,
|
|
2437
2537
|
...d,
|
|
2438
|
-
children: /* @__PURE__ */ s.jsx(Ee, { id: `${
|
|
2538
|
+
children: /* @__PURE__ */ s.jsx(Ee, { id: `${Ae}${e}_${r}` })
|
|
2439
2539
|
}
|
|
2440
2540
|
) }, `${e}_${r}`);
|
|
2441
2541
|
}) }),
|
|
2442
|
-
typeof n != "boolean" && "order" in n && Array.isArray(n.order) && /* @__PURE__ */ s.jsx("dl", { className: "text-medium", children: n.order.map((r) => /* @__PURE__ */ s.jsxs(
|
|
2443
|
-
/* @__PURE__ */ s.jsx("dt", { children: /* @__PURE__ */ s.jsx(Ee, { id: `${
|
|
2542
|
+
typeof n != "boolean" && "order" in n && Array.isArray(n.order) && /* @__PURE__ */ s.jsx("dl", { className: "text-medium", children: n.order.map((r) => /* @__PURE__ */ s.jsxs(Dt, { children: [
|
|
2543
|
+
/* @__PURE__ */ s.jsx("dt", { children: /* @__PURE__ */ s.jsx(Ee, { id: `${Ae}${e}_${r}` }) }),
|
|
2444
2544
|
/* @__PURE__ */ s.jsxs("dd", { children: [
|
|
2445
|
-
typeof n != "boolean" && n[r].address && /* @__PURE__ */ s.jsx("address", { children: /* @__PURE__ */ s.jsx(Ee, { id: `${
|
|
2545
|
+
typeof n != "boolean" && n[r].address && /* @__PURE__ */ s.jsx("address", { children: /* @__PURE__ */ s.jsx(Ee, { id: `${Ae}${e}_${r}_address`, values: { br: /* @__PURE__ */ s.jsx("br", {}) } }) }),
|
|
2446
2546
|
typeof n != "boolean" && n[r].email && /* @__PURE__ */ s.jsx(
|
|
2447
2547
|
"a",
|
|
2448
2548
|
{
|
|
@@ -2456,7 +2556,7 @@ const De = "footer_", qe = "SiteFooter", un = ({ group: e }) => {
|
|
|
2456
2556
|
] })
|
|
2457
2557
|
] }, `dl-${e}-${r}`)) })
|
|
2458
2558
|
] }, e);
|
|
2459
|
-
},
|
|
2559
|
+
}, An = () => /* @__PURE__ */ s.jsx("div", { id: "footer", children: /* @__PURE__ */ s.jsxs("div", { className: "wrapper", children: [
|
|
2460
2560
|
/* @__PURE__ */ s.jsx(xn, { element: "hr" }),
|
|
2461
2561
|
/* @__PURE__ */ s.jsx(
|
|
2462
2562
|
Cn,
|
|
@@ -2485,15 +2585,15 @@ const De = "footer_", qe = "SiteFooter", un = ({ group: e }) => {
|
|
|
2485
2585
|
className: "gtm-trackable",
|
|
2486
2586
|
"data-gtm-event-context": qe,
|
|
2487
2587
|
"data-gtm-event-type": "social-click",
|
|
2488
|
-
children: /* @__PURE__ */ s.jsx("span", { className: "hidden", children: /* @__PURE__ */ s.jsx(Ee, { id: `${
|
|
2588
|
+
children: /* @__PURE__ */ s.jsx("span", { className: "hidden", children: /* @__PURE__ */ s.jsx(Ee, { id: `${Ae}social_${e}` }) })
|
|
2489
2589
|
}
|
|
2490
2590
|
) }, e);
|
|
2491
2591
|
}) }),
|
|
2492
|
-
/* @__PURE__ */ s.jsx("small", { children: /* @__PURE__ */ s.jsx(Ee, { id: `${
|
|
2592
|
+
/* @__PURE__ */ s.jsx("small", { children: /* @__PURE__ */ s.jsx(Ee, { id: `${Ae}copyright`, values: { currentYear: (/* @__PURE__ */ new Date()).getFullYear() } }) })
|
|
2493
2593
|
] })
|
|
2494
2594
|
] }) });
|
|
2495
|
-
const Je = "emailHelperTextBox_",
|
|
2496
|
-
const i =
|
|
2595
|
+
const Je = "emailHelperTextBox_", To = ({ type: e, email: t, redirectPath: n, resendVerificationCode: r }) => {
|
|
2596
|
+
const i = N(), [c, d] = L({ path: `${Je}default`, type: "default", link: {}, mail: {}, error: "" }), [o, a] = L(!1), u = je(
|
|
2497
2597
|
(p) => {
|
|
2498
2598
|
p.preventDefault(), p.stopPropagation();
|
|
2499
2599
|
const _ = (j) => {
|
|
@@ -2592,7 +2692,7 @@ const Je = "emailHelperTextBox_", So = ({ type: e, email: t, redirectPath: n, re
|
|
|
2592
2692
|
const l = {};
|
|
2593
2693
|
return ["link", "mail"].forEach((p) => {
|
|
2594
2694
|
l[p] = Object.keys(c[p]).length ? (_) => /* @__PURE__ */ s.jsx("a", { ...c[p], children: _ }) : (_) => _;
|
|
2595
|
-
}), /* @__PURE__ */ s.jsx(
|
|
2695
|
+
}), /* @__PURE__ */ s.jsx(zs, { type: c.type, heading: o ? !1 : i.formatMessage({ id: `${c.path}_title` }), children: o ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2596
2696
|
/* @__PURE__ */ s.jsx(ye, { element: "span" }),
|
|
2597
2697
|
/* @__PURE__ */ s.jsx(ye, { element: "span" })
|
|
2598
2698
|
] }) : (
|
|
@@ -2614,20 +2714,20 @@ const Je = "emailHelperTextBox_", So = ({ type: e, email: t, redirectPath: n, re
|
|
|
2614
2714
|
)
|
|
2615
2715
|
) });
|
|
2616
2716
|
};
|
|
2617
|
-
const Xe = "passwordRules_",
|
|
2618
|
-
[
|
|
2619
|
-
[
|
|
2717
|
+
const Xe = "passwordRules_", Dn = "isMoreThanEightCharacters", Nn = "includesNumberAndSymbol", Pn = "includesLowerAndUppercase", br = {
|
|
2718
|
+
[Dn]: "8Characters",
|
|
2719
|
+
[Nn]: "numberSymbol",
|
|
2620
2720
|
[Pn]: "lowercaseUppercase"
|
|
2621
|
-
},
|
|
2622
|
-
const n =
|
|
2721
|
+
}, wr = ({ matchingRules: e = { isMoreThanEightCharacters: !1, includesNumberAndSymbol: !1, includesLowerAndUppercase: !1 }, className: t = "" }) => {
|
|
2722
|
+
const n = N();
|
|
2623
2723
|
return /* @__PURE__ */ s.jsxs("aside", { className: S("password-rules", t), children: [
|
|
2624
2724
|
/* @__PURE__ */ s.jsx("small", { children: n.formatMessage({ id: `${Xe}intro` }) }),
|
|
2625
|
-
/* @__PURE__ */ s.jsx("ul", { children: [
|
|
2725
|
+
/* @__PURE__ */ s.jsx("ul", { children: [Dn, Nn, Pn].map((r) => /* @__PURE__ */ s.jsxs("li", { className: S({ matches: e[r] }), children: [
|
|
2626
2726
|
/* @__PURE__ */ s.jsxs(de, { children: [
|
|
2627
2727
|
n.formatMessage({ id: `${Xe}rule_label` }),
|
|
2628
2728
|
" "
|
|
2629
2729
|
] }),
|
|
2630
|
-
/* @__PURE__ */ s.jsx("span", { children: n.formatMessage({ id: `${Xe}rule_${
|
|
2730
|
+
/* @__PURE__ */ s.jsx("span", { children: n.formatMessage({ id: `${Xe}rule_${br[r]}` }) }),
|
|
2631
2731
|
!e[r] && /* @__PURE__ */ s.jsxs(de, { element: "strong", children: [
|
|
2632
2732
|
" ",
|
|
2633
2733
|
" ",
|
|
@@ -2635,8 +2735,8 @@ const Xe = "passwordRules_", Nn = "isMoreThanEightCharacters", An = "includesNum
|
|
|
2635
2735
|
] })
|
|
2636
2736
|
] }, `rule-${r}`)) })
|
|
2637
2737
|
] });
|
|
2638
|
-
},
|
|
2639
|
-
const
|
|
2738
|
+
}, $o = Pe(wr);
|
|
2739
|
+
const Mo = ({
|
|
2640
2740
|
text: e = {},
|
|
2641
2741
|
topRating: t = 5,
|
|
2642
2742
|
functions: { createRating: n = () => null, updateRating: r = () => {
|
|
@@ -2645,7 +2745,7 @@ const $o = ({
|
|
|
2645
2745
|
className: c = "",
|
|
2646
2746
|
hasLoaded: d = !1
|
|
2647
2747
|
}) => {
|
|
2648
|
-
const o =
|
|
2748
|
+
const o = N(), [a, u] = L({ setUp: !1, id: null, rating: null, disabled: !0 }), l = async () => {
|
|
2649
2749
|
try {
|
|
2650
2750
|
const E = await n();
|
|
2651
2751
|
u((k) => ({ ...k, setUp: !0, id: E && E.id, disabled: !1 }));
|
|
@@ -2704,8 +2804,8 @@ const vr = ({
|
|
|
2704
2804
|
gtmContext: i = "search-bar",
|
|
2705
2805
|
gtmEvent: c = "form-submission"
|
|
2706
2806
|
}) => {
|
|
2707
|
-
const { searchIsOpen: d = !0, isDesktopVersion: o = !1 } = n || {}, a =
|
|
2708
|
-
|
|
2807
|
+
const { searchIsOpen: d = !0, isDesktopVersion: o = !1 } = n || {}, a = N(), u = se(null);
|
|
2808
|
+
De(() => {
|
|
2709
2809
|
!n || o || !d || u.current && u.current.focus();
|
|
2710
2810
|
}, [d]);
|
|
2711
2811
|
const l = (f) => {
|
|
@@ -2749,7 +2849,7 @@ const vr = ({
|
|
|
2749
2849
|
}
|
|
2750
2850
|
);
|
|
2751
2851
|
};
|
|
2752
|
-
const
|
|
2852
|
+
const kr = ({
|
|
2753
2853
|
title: e,
|
|
2754
2854
|
label: t,
|
|
2755
2855
|
ctaMessage: n,
|
|
@@ -2762,7 +2862,7 @@ const wr = ({
|
|
|
2762
2862
|
initialFormStatus: u = "NOT_SUBMITTED"
|
|
2763
2863
|
/* NOT_SUBMITTED */
|
|
2764
2864
|
}) => {
|
|
2765
|
-
const [l, f] = L([]), [h, p] = L(!0), [_, j] = L(u), { formatMessage: g } =
|
|
2865
|
+
const [l, f] = L([]), [h, p] = L(!0), [_, j] = L(u), { formatMessage: g } = N(), E = async (M) => {
|
|
2766
2866
|
M.preventDefault();
|
|
2767
2867
|
try {
|
|
2768
2868
|
await a(l), f([]), j(
|
|
@@ -2791,7 +2891,7 @@ const wr = ({
|
|
|
2791
2891
|
" ",
|
|
2792
2892
|
g({ id: "inviteForm_error" })
|
|
2793
2893
|
] }) }),
|
|
2794
|
-
/* @__PURE__ */ s.jsx(
|
|
2894
|
+
/* @__PURE__ */ s.jsx(Ne, {}),
|
|
2795
2895
|
/* @__PURE__ */ s.jsx("div", { className: "footer", children: _ === "SUCCESS" ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2796
2896
|
/* @__PURE__ */ s.jsx(X, { variant: "secondary", onClick: k, children: g({ id: "inviteForm_ctaSendMoreInvites" }) }),
|
|
2797
2897
|
/* @__PURE__ */ s.jsx(X, { onClick: T, children: g({ id: "inviteForm_ctaDone" }) })
|
|
@@ -2836,7 +2936,7 @@ const wr = ({
|
|
|
2836
2936
|
}
|
|
2837
2937
|
)
|
|
2838
2938
|
] }),
|
|
2839
|
-
/* @__PURE__ */ s.jsx(
|
|
2939
|
+
/* @__PURE__ */ s.jsx(Ne, {}),
|
|
2840
2940
|
/* @__PURE__ */ s.jsx("fieldset", { className: "footer", children: /* @__PURE__ */ s.jsx(X, { className: "sendEmailsButton", disabled: h, children: n }) })
|
|
2841
2941
|
]
|
|
2842
2942
|
}
|
|
@@ -3026,7 +3126,7 @@ const wr = ({
|
|
|
3026
3126
|
},
|
|
3027
3127
|
doTrack: c = null
|
|
3028
3128
|
}) => {
|
|
3029
|
-
const d =
|
|
3129
|
+
const d = N(), o = gn(et, e);
|
|
3030
3130
|
if (!o || o.onlyShow && (o.onlyShow === "logged-in" && !t || o.onlyShow === "logged-out" && t))
|
|
3031
3131
|
return null;
|
|
3032
3132
|
const a = "doTrack" in o, u = c === null ? a ? o.doTrack : !0 : c, l = e.includes("buttons.");
|
|
@@ -3080,7 +3180,7 @@ const wr = ({
|
|
|
3080
3180
|
});
|
|
3081
3181
|
}
|
|
3082
3182
|
return /* @__PURE__ */ s.jsxs("li", { className: S({ [o.className]: o.className, "has-submenu": p, parent: _, active: j }), role: "none", ...g, children: [
|
|
3083
|
-
h ?
|
|
3183
|
+
h ? D.createElement(l ? X : "a", h, d.formatMessage({ id: f })) : d.formatMessage({ id: f }),
|
|
3084
3184
|
o.order && /* @__PURE__ */ s.jsx("ul", { ...E, children: o.order.map((k) => {
|
|
3085
3185
|
if (!o[k])
|
|
3086
3186
|
return null;
|
|
@@ -3098,8 +3198,8 @@ const wr = ({
|
|
|
3098
3198
|
}) })
|
|
3099
3199
|
] }, e);
|
|
3100
3200
|
};
|
|
3101
|
-
const
|
|
3102
|
-
const e =
|
|
3201
|
+
const jr = { height: 67, height_desktop: 83 }, Rn = () => {
|
|
3202
|
+
const e = N(), t = be(Te), n = at(!0, !0), r = t && typeof t.id == "string", i = nt(
|
|
3103
3203
|
() => Q.getIsDesktopVersion(r, n),
|
|
3104
3204
|
[r, n]
|
|
3105
3205
|
), [c, d] = rs($s, {
|
|
@@ -3111,7 +3211,7 @@ const kr = { height: 67, height_desktop: 83 }, Rn = () => {
|
|
|
3111
3211
|
}
|
|
3112
3212
|
}), { headerIsVisible: o, menus: a, focusElements: u } = c;
|
|
3113
3213
|
Ts({
|
|
3114
|
-
scrollPosition:
|
|
3214
|
+
scrollPosition: jr[`height${i.navigation ? "_desktop" : ""}`],
|
|
3115
3215
|
callbacks: {
|
|
3116
3216
|
scrollUp: () => {
|
|
3117
3217
|
!i && a.navigation || Q.shouldChangeHeaderIsVisible(!0, a, d);
|
|
@@ -3124,7 +3224,7 @@ const kr = { height: 67, height_desktop: 83 }, Rn = () => {
|
|
|
3124
3224
|
const l = (h, p) => {
|
|
3125
3225
|
Q.handleMenus({ id: h, value: p, menus: a, dispatch: d });
|
|
3126
3226
|
}, f = se(null);
|
|
3127
|
-
return
|
|
3227
|
+
return De(() => {
|
|
3128
3228
|
a.navigation && Q.autoFocus({
|
|
3129
3229
|
menu: "navigation",
|
|
3130
3230
|
navigationRef: f,
|
|
@@ -3132,7 +3232,7 @@ const kr = { height: 67, height_desktop: 83 }, Rn = () => {
|
|
|
3132
3232
|
focusElements: u,
|
|
3133
3233
|
dispatch: d
|
|
3134
3234
|
});
|
|
3135
|
-
}, [a.navigation]),
|
|
3235
|
+
}, [a.navigation]), De(() => {
|
|
3136
3236
|
a.account && Q.autoFocus({
|
|
3137
3237
|
menu: "account",
|
|
3138
3238
|
navigationRef: f,
|
|
@@ -3141,111 +3241,155 @@ const kr = { height: 67, height_desktop: 83 }, Rn = () => {
|
|
|
3141
3241
|
dispatch: d
|
|
3142
3242
|
});
|
|
3143
3243
|
}, [a.account]), t && t.isLoading ? null : /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3144
|
-
/* @__PURE__ */ s.jsxs(
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
"aria-haspopup": "true",
|
|
3157
|
-
"aria-expanded": a.navigation,
|
|
3158
|
-
"aria-controls": "navigation",
|
|
3159
|
-
children: /* @__PURE__ */ s.jsx(de, { children: e.formatMessage({ id: `header_menu_${a.navigation ? "hide" : "show"}` }) })
|
|
3160
|
-
}
|
|
3161
|
-
),
|
|
3162
|
-
/* @__PURE__ */ s.jsx(
|
|
3163
|
-
"ul",
|
|
3164
|
-
{
|
|
3165
|
-
ref: f,
|
|
3166
|
-
id: "navigation",
|
|
3167
|
-
hidden: i.navigation || a.account ? !1 : !a.navigation,
|
|
3168
|
-
role: "menu",
|
|
3169
|
-
"data-showing": !i.navigation && a.account ? "account" : "default",
|
|
3170
|
-
children: et.order.map((h) => /* @__PURE__ */ s.jsx(
|
|
3171
|
-
tt,
|
|
3244
|
+
/* @__PURE__ */ s.jsxs(
|
|
3245
|
+
"nav",
|
|
3246
|
+
{
|
|
3247
|
+
id: "header",
|
|
3248
|
+
className: S({
|
|
3249
|
+
"logged-in": r,
|
|
3250
|
+
"logged-out": !r,
|
|
3251
|
+
visible: o
|
|
3252
|
+
}),
|
|
3253
|
+
children: [
|
|
3254
|
+
/* @__PURE__ */ s.jsx(
|
|
3255
|
+
de,
|
|
3172
3256
|
{
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3257
|
+
element: "a",
|
|
3258
|
+
href: "#content-of-page",
|
|
3259
|
+
children: e.formatMessage({ id: "header_skip" })
|
|
3260
|
+
}
|
|
3261
|
+
),
|
|
3262
|
+
/* @__PURE__ */ s.jsx(Cn, {}),
|
|
3263
|
+
!i.navigation && /* @__PURE__ */ s.jsx(
|
|
3264
|
+
"button",
|
|
3265
|
+
{
|
|
3266
|
+
className: "menu-button gtm-trackable",
|
|
3267
|
+
onClick: (h) => {
|
|
3268
|
+
h.preventDefault(), h.stopPropagation(), l("navigation", !a.navigation);
|
|
3269
|
+
},
|
|
3270
|
+
"data-gtm-event-type": "open-tab-menu-click",
|
|
3271
|
+
"data-gtm-event-context": "HeaderLeft-Chevron",
|
|
3272
|
+
"aria-haspopup": "true",
|
|
3273
|
+
"aria-expanded": a.navigation,
|
|
3274
|
+
"aria-controls": "navigation",
|
|
3275
|
+
children: /* @__PURE__ */ s.jsx(de, { children: e.formatMessage({
|
|
3276
|
+
id: `header_menu_${a.navigation ? "hide" : "show"}`
|
|
3277
|
+
}) })
|
|
3278
|
+
}
|
|
3279
|
+
),
|
|
3280
|
+
/* @__PURE__ */ s.jsx(
|
|
3281
|
+
"ul",
|
|
3282
|
+
{
|
|
3283
|
+
ref: f,
|
|
3284
|
+
id: "navigation",
|
|
3285
|
+
hidden: i.navigation || a.account ? !1 : !a.navigation,
|
|
3286
|
+
role: "menu",
|
|
3287
|
+
"data-showing": !i.navigation && a.account ? "account" : "default",
|
|
3288
|
+
children: et.order.map((h) => /* @__PURE__ */ s.jsx(
|
|
3289
|
+
tt,
|
|
3290
|
+
{
|
|
3291
|
+
id: h,
|
|
3292
|
+
isLoggedIn: r,
|
|
3293
|
+
isDesktopVersion: i.navigation,
|
|
3294
|
+
menus: { navigation: a.navigation, account: a.account },
|
|
3295
|
+
callback: l
|
|
3296
|
+
},
|
|
3297
|
+
h
|
|
3298
|
+
))
|
|
3299
|
+
}
|
|
3300
|
+
),
|
|
3301
|
+
!i.search && /* @__PURE__ */ s.jsx(
|
|
3302
|
+
"button",
|
|
3303
|
+
{
|
|
3304
|
+
className: "search toggle-search-button",
|
|
3305
|
+
onClick: (h) => {
|
|
3306
|
+
h.preventDefault(), h.stopPropagation(), l("search", !a.search);
|
|
3307
|
+
},
|
|
3308
|
+
"aria-haspopup": "true",
|
|
3309
|
+
"aria-expanded": a.search,
|
|
3310
|
+
"aria-controls": "search-form",
|
|
3311
|
+
children: /* @__PURE__ */ s.jsx(
|
|
3312
|
+
de,
|
|
3313
|
+
{
|
|
3314
|
+
children: e.formatMessage({
|
|
3315
|
+
id: `header_search_${a.search ? "hide" : "show"}`
|
|
3316
|
+
})
|
|
3317
|
+
}
|
|
3318
|
+
)
|
|
3319
|
+
}
|
|
3320
|
+
),
|
|
3321
|
+
/* @__PURE__ */ s.jsx(
|
|
3322
|
+
vr,
|
|
3323
|
+
{
|
|
3324
|
+
id: "global-search",
|
|
3325
|
+
handleToggle: {
|
|
3326
|
+
searchIsOpen: a.search,
|
|
3327
|
+
isDesktopVersion: i.search
|
|
3328
|
+
},
|
|
3329
|
+
gtmContext: "search-bar-header",
|
|
3330
|
+
gtmEvent: "form-submission"
|
|
3331
|
+
}
|
|
3332
|
+
),
|
|
3333
|
+
r ? /* @__PURE__ */ s.jsxs(
|
|
3334
|
+
"button",
|
|
3335
|
+
{
|
|
3336
|
+
className: "account-button",
|
|
3337
|
+
onClick: (h) => Q.events.onClick(h, {
|
|
3338
|
+
id: "account",
|
|
3339
|
+
callback: l,
|
|
3340
|
+
isOpen: a.account
|
|
3341
|
+
}),
|
|
3342
|
+
onMouseEnter: () => Q.events.onMouseEnter({ id: "account", callback: l }),
|
|
3343
|
+
onMouseLeave: () => Q.events.onBlur({ id: "account", callback: l }),
|
|
3344
|
+
"aria-haspopup": "true",
|
|
3345
|
+
"aria-expanded": a.account,
|
|
3346
|
+
"aria-controls": "navigation",
|
|
3347
|
+
children: [
|
|
3348
|
+
/* @__PURE__ */ s.jsx(de, { children: e.formatMessage({
|
|
3349
|
+
id: `header_account_${a.account ? "hide" : "show"}`
|
|
3350
|
+
}) }),
|
|
3351
|
+
/* @__PURE__ */ s.jsx(
|
|
3352
|
+
It,
|
|
3353
|
+
{
|
|
3354
|
+
name: t && t.name || "",
|
|
3355
|
+
src: t && t.image && t.image.thumbnail || ""
|
|
3356
|
+
}
|
|
3357
|
+
)
|
|
3358
|
+
]
|
|
3359
|
+
}
|
|
3360
|
+
) : /* @__PURE__ */ s.jsx("ul", { className: "sign-in-buttons", children: et.buttons.order.map((h) => /* @__PURE__ */ s.jsx(tt, { id: `buttons.${h}` }, h)) })
|
|
3361
|
+
]
|
|
3362
|
+
}
|
|
3363
|
+
),
|
|
3222
3364
|
/* @__PURE__ */ s.jsx("hr", { id: "content-of-page" }),
|
|
3223
3365
|
/* @__PURE__ */ s.jsx(
|
|
3224
3366
|
"div",
|
|
3225
3367
|
{
|
|
3226
|
-
className: S("overlay", {
|
|
3368
|
+
className: S("overlay", {
|
|
3369
|
+
open: a.navigation || a.account || !i.search && a.search
|
|
3370
|
+
})
|
|
3227
3371
|
}
|
|
3228
3372
|
)
|
|
3229
3373
|
] });
|
|
3230
3374
|
};
|
|
3231
|
-
const
|
|
3232
|
-
const e =
|
|
3375
|
+
const yr = () => {
|
|
3376
|
+
const e = N();
|
|
3233
3377
|
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3234
3378
|
/* @__PURE__ */ s.jsx(Rn, {}),
|
|
3235
3379
|
/* @__PURE__ */ s.jsx("div", { id: "content", children: /* @__PURE__ */ s.jsx(ct, { variant: "error", text: e.formatMessage({ id: "pageLayout_error" }) }) }),
|
|
3236
|
-
/* @__PURE__ */ s.jsx(
|
|
3380
|
+
/* @__PURE__ */ s.jsx(An, {})
|
|
3237
3381
|
] });
|
|
3238
|
-
},
|
|
3382
|
+
}, Co = ({ children: e, reportError: t, showFooter: n = !0, background: r = "default", className: i = "", locale: c = "en" }) => {
|
|
3239
3383
|
const d = Es();
|
|
3240
3384
|
Z(() => {
|
|
3241
3385
|
window.scrollTo(0, 0);
|
|
3242
3386
|
}, [d]);
|
|
3243
3387
|
const o = kn(e, { locale: c });
|
|
3244
|
-
return /* @__PURE__ */ s.jsx(gs, { onError: t, fallback: /* @__PURE__ */ s.jsx(
|
|
3388
|
+
return /* @__PURE__ */ s.jsx(gs, { onError: t, fallback: /* @__PURE__ */ s.jsx(yr, {}), children: /* @__PURE__ */ s.jsx(os, { fallback: /* @__PURE__ */ s.jsx(rr, { layout: "overview-page" }), children: /* @__PURE__ */ s.jsx("div", { id: "wrapper", className: S(i, { [r]: r !== "default" }), children: /* @__PURE__ */ s.jsxs(hs, { children: [
|
|
3245
3389
|
/* @__PURE__ */ s.jsx(Rn, {}),
|
|
3246
3390
|
/* @__PURE__ */ s.jsx("div", { id: "content", children: o }),
|
|
3247
|
-
n && /* @__PURE__ */ s.jsx(
|
|
3248
|
-
/* @__PURE__ */ s.jsx(
|
|
3391
|
+
n && /* @__PURE__ */ s.jsx(An, {}),
|
|
3392
|
+
/* @__PURE__ */ s.jsx(xr, {})
|
|
3249
3393
|
] }) }) }) });
|
|
3250
3394
|
}, mn = {
|
|
3251
3395
|
default: "tags_",
|
|
@@ -3266,7 +3410,7 @@ const jr = () => {
|
|
|
3266
3410
|
WorkAndTheEconomy: "work-and-the-economy"
|
|
3267
3411
|
},
|
|
3268
3412
|
"from the community": "community"
|
|
3269
|
-
},
|
|
3413
|
+
}, Er = {
|
|
3270
3414
|
getTagDetails: (e) => {
|
|
3271
3415
|
if (e.includes("topic_")) {
|
|
3272
3416
|
if (e = Tt.topic[e.replace("topic_", "")], e) {
|
|
@@ -3278,7 +3422,7 @@ const jr = () => {
|
|
|
3278
3422
|
return Tt[e] ? (e = Tt[e], { id: e, text: `${mn.default}${e}` }) : null;
|
|
3279
3423
|
}
|
|
3280
3424
|
};
|
|
3281
|
-
const
|
|
3425
|
+
const Ao = ({
|
|
3282
3426
|
tags: e = [],
|
|
3283
3427
|
color: t = "default",
|
|
3284
3428
|
forceOneLine: n = !1,
|
|
@@ -3287,14 +3431,14 @@ const Co = ({
|
|
|
3287
3431
|
gtmType: c = "tag-click",
|
|
3288
3432
|
gtmContext: d = "tags"
|
|
3289
3433
|
}) => {
|
|
3290
|
-
const o =
|
|
3434
|
+
const o = N();
|
|
3291
3435
|
if (!e || e.length < 1)
|
|
3292
3436
|
return null;
|
|
3293
3437
|
const a = [];
|
|
3294
3438
|
return e.forEach((u) => {
|
|
3295
3439
|
if (!u)
|
|
3296
3440
|
return;
|
|
3297
|
-
const l =
|
|
3441
|
+
const l = Er.getTagDetails(u);
|
|
3298
3442
|
l && a.push(l);
|
|
3299
3443
|
}), a.length < 1 ? null : /* @__PURE__ */ s.jsx("ul", { className: S("tags text-small", t, i, { "one-line": n }), children: a.map((u) => {
|
|
3300
3444
|
const l = o.formatMessage({ id: u.text });
|
|
@@ -3317,7 +3461,7 @@ const Do = ({
|
|
|
3317
3461
|
gtmType: i = "member-click",
|
|
3318
3462
|
className: c = ""
|
|
3319
3463
|
}) => {
|
|
3320
|
-
const d =
|
|
3464
|
+
const d = N();
|
|
3321
3465
|
return t.length === 0 ? null : (e || (e = t.length), /* @__PURE__ */ s.jsxs("div", { className: S("members-list", c), children: [
|
|
3322
3466
|
/* @__PURE__ */ s.jsxs("h1", { children: [
|
|
3323
3467
|
d.formatMessage({ id: "membersList" }),
|
|
@@ -3325,10 +3469,10 @@ const Do = ({
|
|
|
3325
3469
|
] }),
|
|
3326
3470
|
/* @__PURE__ */ s.jsx("ul", { children: t.map((o, a) => /* @__PURE__ */ s.jsxs("li", { children: [
|
|
3327
3471
|
/* @__PURE__ */ s.jsx(Ht, { member: o, gtmContext: r, gtmType: i }),
|
|
3328
|
-
o.isAdmin && /* @__PURE__ */ s.jsx(
|
|
3472
|
+
o.isAdmin && /* @__PURE__ */ s.jsx(er, { children: d.formatMessage({ id: "membersList_admin" }) })
|
|
3329
3473
|
] }, a)) }),
|
|
3330
3474
|
n && /* @__PURE__ */ s.jsx(
|
|
3331
|
-
|
|
3475
|
+
pr,
|
|
3332
3476
|
{
|
|
3333
3477
|
...n,
|
|
3334
3478
|
icon: { icon: "arrow-down", position: "right" },
|
|
@@ -3370,7 +3514,7 @@ const he = "discussion_form_", Fn = ({
|
|
|
3370
3514
|
gtmContext: a = "DiscussionForm"
|
|
3371
3515
|
}) => {
|
|
3372
3516
|
var b, U;
|
|
3373
|
-
const u =
|
|
3517
|
+
const u = N(), l = be(Te), [f, h] = L(
|
|
3374
3518
|
n.isEditing && n.isEditing.text || ""
|
|
3375
3519
|
), [p, _] = L(d.error || !1), [j, g] = L(!1), E = se(null);
|
|
3376
3520
|
if (r || (r = E), n.isLoading)
|
|
@@ -3381,8 +3525,8 @@ const he = "discussion_form_", Fn = ({
|
|
|
3381
3525
|
"data-testid": "loading-placeholder"
|
|
3382
3526
|
}
|
|
3383
3527
|
);
|
|
3384
|
-
const k = (
|
|
3385
|
-
const G =
|
|
3528
|
+
const k = (w) => {
|
|
3529
|
+
const G = w.target.value;
|
|
3386
3530
|
h(G);
|
|
3387
3531
|
let O;
|
|
3388
3532
|
!l || !l.id ? O = xe(
|
|
@@ -3399,12 +3543,12 @@ const he = "discussion_form_", Fn = ({
|
|
|
3399
3543
|
};
|
|
3400
3544
|
let T = `${e.type}-form`;
|
|
3401
3545
|
if (e.type === "response" || e.type === "reply") {
|
|
3402
|
-
const
|
|
3403
|
-
|
|
3546
|
+
const w = e.type === "response" ? ((b = e.slugs) == null ? void 0 : b.question) || "" : ((U = e.slugs) == null ? void 0 : U.answer) || "";
|
|
3547
|
+
w && (T = `${T}-${w.slice(-15)}`);
|
|
3404
3548
|
}
|
|
3405
|
-
const M = async (
|
|
3549
|
+
const M = async (w) => {
|
|
3406
3550
|
var O;
|
|
3407
|
-
if (
|
|
3551
|
+
if (w.preventDefault(), w.stopPropagation(), !l || !l.id || !t || H)
|
|
3408
3552
|
return;
|
|
3409
3553
|
Ze && clearTimeout(Ze), g("submitting");
|
|
3410
3554
|
const G = window.location.pathname;
|
|
@@ -3436,7 +3580,7 @@ const he = "discussion_form_", Fn = ({
|
|
|
3436
3580
|
default:
|
|
3437
3581
|
break;
|
|
3438
3582
|
}
|
|
3439
|
-
await
|
|
3583
|
+
await As(1e3), o.callback && await o.callback(B), Ze = setTimeout(() => {
|
|
3440
3584
|
h(""), g("submitted"), C();
|
|
3441
3585
|
}, 500);
|
|
3442
3586
|
} catch (B) {
|
|
@@ -3458,7 +3602,7 @@ const he = "discussion_form_", Fn = ({
|
|
|
3458
3602
|
Ze = setTimeout(() => {
|
|
3459
3603
|
_(!1), g(!1);
|
|
3460
3604
|
}, 5e3);
|
|
3461
|
-
}, H = !f || !
|
|
3605
|
+
}, H = !f || !Os(f), Y = j === "submitting", x = [];
|
|
3462
3606
|
return (n.isEditing && !Y || d.cancel) && x.push({
|
|
3463
3607
|
variant: "secondary",
|
|
3464
3608
|
size: { mobile: "small", 600: "medium" },
|
|
@@ -3471,14 +3615,14 @@ const he = "discussion_form_", Fn = ({
|
|
|
3471
3615
|
}), x.push({
|
|
3472
3616
|
variant: "primary",
|
|
3473
3617
|
size: { mobile: "small", 600: "medium" },
|
|
3474
|
-
onClick: (
|
|
3618
|
+
onClick: (w) => {
|
|
3475
3619
|
if (n.isEditing) {
|
|
3476
3620
|
g("submitting"), o.handleSaveEdit && o.handleSaveEdit(
|
|
3477
3621
|
E.current && "value" in E.current ? E.current.value : ""
|
|
3478
3622
|
);
|
|
3479
3623
|
return;
|
|
3480
3624
|
}
|
|
3481
|
-
M(
|
|
3625
|
+
M(w);
|
|
3482
3626
|
},
|
|
3483
3627
|
className: "gtm-trackable",
|
|
3484
3628
|
"data-gtm-event-context": a,
|
|
@@ -3529,7 +3673,7 @@ const he = "discussion_form_", Fn = ({
|
|
|
3529
3673
|
}
|
|
3530
3674
|
),
|
|
3531
3675
|
/* @__PURE__ */ s.jsx("small", { children: xe(u.formatMessage, `${he}explainer`, e.type, "action", {
|
|
3532
|
-
a: (
|
|
3676
|
+
a: (w) => /* @__PURE__ */ s.jsx(
|
|
3533
3677
|
"a",
|
|
3534
3678
|
{
|
|
3535
3679
|
href: "https://about.apolitical.co/q-and-a-community-guidelines",
|
|
@@ -3538,7 +3682,7 @@ const he = "discussion_form_", Fn = ({
|
|
|
3538
3682
|
"data-gtm-event-context": a,
|
|
3539
3683
|
"data-gtm-event-type": "community-guidelines-link",
|
|
3540
3684
|
rel: "noreferrer",
|
|
3541
|
-
children:
|
|
3685
|
+
children: w
|
|
3542
3686
|
}
|
|
3543
3687
|
)
|
|
3544
3688
|
}) }),
|
|
@@ -3576,16 +3720,16 @@ const he = "discussion_form_", Fn = ({
|
|
|
3576
3720
|
create: t
|
|
3577
3721
|
}
|
|
3578
3722
|
}
|
|
3579
|
-
),
|
|
3723
|
+
), Sr = {
|
|
3580
3724
|
showThread: !1,
|
|
3581
3725
|
showForm: !1
|
|
3582
|
-
}, dt = Ot(
|
|
3726
|
+
}, dt = Ot(Sr), Tr = ({ children: e }) => {
|
|
3583
3727
|
const [t, n] = L({
|
|
3584
3728
|
showThread: !1,
|
|
3585
3729
|
showForm: !1
|
|
3586
3730
|
});
|
|
3587
3731
|
return /* @__PURE__ */ s.jsx(dt.Provider, { value: { ...t, updateConversation: n }, children: e });
|
|
3588
|
-
},
|
|
3732
|
+
}, $r = ({
|
|
3589
3733
|
question: e,
|
|
3590
3734
|
answer: t,
|
|
3591
3735
|
reply: n
|
|
@@ -3593,11 +3737,11 @@ const he = "discussion_form_", Fn = ({
|
|
|
3593
3737
|
...e && { questionSlug: e },
|
|
3594
3738
|
...t && { answerSlug: t },
|
|
3595
3739
|
...n && { replySlug: n }
|
|
3596
|
-
}),
|
|
3740
|
+
}), Mr = (e, t = 10) => !e || e.length === 0 ? [] : e.slice(0, t);
|
|
3597
3741
|
let Ie = !1;
|
|
3598
3742
|
const $t = () => {
|
|
3599
3743
|
Ie !== !1 && (clearTimeout(Ie), Ie = !1);
|
|
3600
|
-
}, Mt = 10,
|
|
3744
|
+
}, Mt = 10, Cr = ({
|
|
3601
3745
|
element: e = "div",
|
|
3602
3746
|
likes: t = 0,
|
|
3603
3747
|
peopleWhoLiked: n = !1,
|
|
@@ -3609,11 +3753,11 @@ const $t = () => {
|
|
|
3609
3753
|
}, deleteLike: a = () => {
|
|
3610
3754
|
} } = {}
|
|
3611
3755
|
}) => {
|
|
3612
|
-
const u =
|
|
3756
|
+
const u = N();
|
|
3613
3757
|
Z(() => {
|
|
3614
3758
|
p(i);
|
|
3615
3759
|
}, [i]);
|
|
3616
|
-
const [l, f] = L(t), [h, p] = L(i), [_, j] = L(!1), [g, E] = L(!1), k = nt(() =>
|
|
3760
|
+
const [l, f] = L(t), [h, p] = L(i), [_, j] = L(!1), [g, E] = L(!1), k = nt(() => Mr(n, Mt), [n]), T = (C) => {
|
|
3617
3761
|
if (C.preventDefault(), C.stopPropagation(), E(!1), Ie)
|
|
3618
3762
|
return $t(), !1;
|
|
3619
3763
|
if ($t(), _ || !d)
|
|
@@ -3626,7 +3770,7 @@ const $t = () => {
|
|
|
3626
3770
|
C < 0 && (C = 0), j(!0), f(C), p(!h);
|
|
3627
3771
|
try {
|
|
3628
3772
|
if (c && c.slugs) {
|
|
3629
|
-
const H =
|
|
3773
|
+
const H = $r(c.slugs);
|
|
3630
3774
|
h ? await a(H) : await o(H, { contentPath: window.location.pathname });
|
|
3631
3775
|
}
|
|
3632
3776
|
} catch {
|
|
@@ -3635,7 +3779,7 @@ const $t = () => {
|
|
|
3635
3779
|
j(!1);
|
|
3636
3780
|
}
|
|
3637
3781
|
};
|
|
3638
|
-
return
|
|
3782
|
+
return D.createElement(
|
|
3639
3783
|
e,
|
|
3640
3784
|
{
|
|
3641
3785
|
className: S("likes-wrapper text-medium action-button", { "show-spinner": _, "is-liked": h, disabled: !d }),
|
|
@@ -3672,7 +3816,7 @@ const $t = () => {
|
|
|
3672
3816
|
}
|
|
3673
3817
|
),
|
|
3674
3818
|
/* @__PURE__ */ s.jsx("span", { className: S("number-of-likes", { "no-likes": l === 0 }), "data-testid": "number-of-likes", children: u.formatMessage({ id: `discussion_likes${r ? "_short" : ""}` }, { number: l }) }),
|
|
3675
|
-
n && /* @__PURE__ */ s.jsx(
|
|
3819
|
+
n && /* @__PURE__ */ s.jsx(Qs, { isOpen: g, isLoading: n.length === 0, children: n.length && /* @__PURE__ */ s.jsxs("ul", { children: [
|
|
3676
3820
|
k.map((C) => typeof C == "string" || !C.name ? null : /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(lt, { href: C.id ? `/profiles/${C.id}` : void 0, gtmContext: "Likes", gtmType: "liked-name-click", children: C.name }) }, C.id || window.btoa(C.name))),
|
|
3677
3821
|
n.length > Mt && /* @__PURE__ */ s.jsx("li", { children: u.formatMessage({ id: "discussion_likes_more" }, { number: n.length - Mt }) })
|
|
3678
3822
|
] }) })
|
|
@@ -3680,7 +3824,7 @@ const $t = () => {
|
|
|
3680
3824
|
}
|
|
3681
3825
|
);
|
|
3682
3826
|
};
|
|
3683
|
-
const
|
|
3827
|
+
const Ar = ({ element: e = "section", children: t, className: n, ...r }) => D.createElement(
|
|
3684
3828
|
e,
|
|
3685
3829
|
{
|
|
3686
3830
|
className: S("modal", n),
|
|
@@ -3703,7 +3847,7 @@ const Ln = ({
|
|
|
3703
3847
|
className: l = "",
|
|
3704
3848
|
gtmContext: f = "Modal"
|
|
3705
3849
|
}) => {
|
|
3706
|
-
const h =
|
|
3850
|
+
const h = N(), [p, _] = L(t), j = (E) => {
|
|
3707
3851
|
_(E), E ? (i(), document.body.classList.add("has-overlay")) : (c(), document.body.classList.remove("has-overlay"));
|
|
3708
3852
|
};
|
|
3709
3853
|
Z(() => {
|
|
@@ -3711,7 +3855,7 @@ const Ln = ({
|
|
|
3711
3855
|
}, [t]);
|
|
3712
3856
|
const g = r ? { "--max-width": `${r / 16}rem` } : {};
|
|
3713
3857
|
return /* @__PURE__ */ s.jsx("div", { className: S("overlay", { open: p }), children: /* @__PURE__ */ s.jsx(
|
|
3714
|
-
|
|
3858
|
+
Ar,
|
|
3715
3859
|
{
|
|
3716
3860
|
id: e,
|
|
3717
3861
|
className: S("overlay-modal", l, { "has-max-width": r }),
|
|
@@ -3734,10 +3878,10 @@ const Ln = ({
|
|
|
3734
3878
|
}
|
|
3735
3879
|
)
|
|
3736
3880
|
] }),
|
|
3737
|
-
n && /* @__PURE__ */ s.jsx(
|
|
3881
|
+
n && /* @__PURE__ */ s.jsx(Ne, {}),
|
|
3738
3882
|
a,
|
|
3739
3883
|
u && /* @__PURE__ */ s.jsxs("div", { className: "bottom", children: [
|
|
3740
|
-
/* @__PURE__ */ s.jsx(
|
|
3884
|
+
/* @__PURE__ */ s.jsx(Ne, {}),
|
|
3741
3885
|
/* @__PURE__ */ s.jsx(it, { buttons: u })
|
|
3742
3886
|
] }),
|
|
3743
3887
|
d && /* @__PURE__ */ s.jsx(Ft, { className: "error", children: d })
|
|
@@ -3771,7 +3915,7 @@ const No = ({
|
|
|
3771
3915
|
functions: { onClose: o },
|
|
3772
3916
|
className: S("invite-modal", e, { success: !!n }),
|
|
3773
3917
|
children: /* @__PURE__ */ s.jsx(
|
|
3774
|
-
|
|
3918
|
+
kr,
|
|
3775
3919
|
{
|
|
3776
3920
|
title: r,
|
|
3777
3921
|
label: i,
|
|
@@ -3786,7 +3930,7 @@ const No = ({
|
|
|
3786
3930
|
const t = {};
|
|
3787
3931
|
return Object.keys(e).forEach((n) => n.includes("Id") ? t[n] = e[n] : t[`${n}Slug`] = e[n]), t;
|
|
3788
3932
|
}, Ut = (e, t) => e && !t;
|
|
3789
|
-
const
|
|
3933
|
+
const ve = "discussion_", Nr = 280, ut = ({
|
|
3790
3934
|
element: e = "div",
|
|
3791
3935
|
content: t,
|
|
3792
3936
|
userHasPermissions: n = !0,
|
|
@@ -3813,7 +3957,7 @@ const we = "discussion_", Nr = 280, ut = ({
|
|
|
3813
3957
|
children: _,
|
|
3814
3958
|
isTruncated: j = !1
|
|
3815
3959
|
}) => {
|
|
3816
|
-
const g =
|
|
3960
|
+
const g = N(), E = be(Te), k = be(dt), [T, M] = L({
|
|
3817
3961
|
body: t && t.body || "",
|
|
3818
3962
|
isEditing: !1,
|
|
3819
3963
|
didEdit: t && t.isEdited || !1
|
|
@@ -3826,7 +3970,7 @@ const we = "discussion_", Nr = 280, ut = ({
|
|
|
3826
3970
|
});
|
|
3827
3971
|
}, [t.isEdited]), r || !t || t.type === "answer" && (!t.slugs || !t.slugs.question))
|
|
3828
3972
|
return /* @__PURE__ */ s.jsx(ye, { className: "discussion-card discussion-post" });
|
|
3829
|
-
const { author: b, canLike: U, createdAt:
|
|
3973
|
+
const { author: b, canLike: U, createdAt: w, id: G, likes: O = 0, userLiked: B, comments: W = 0 } = t, V = j ? st(T.body, Nr) : T.body, K = E && E.id && typeof b != "string" && b.id && b.id === E.id || !1, oe = typeof U == "boolean" ? U : n ? !K : !1, ae = async (P) => {
|
|
3830
3974
|
P || (P = ""), x("");
|
|
3831
3975
|
try {
|
|
3832
3976
|
if (!xs(P, T.body)) {
|
|
@@ -3835,7 +3979,7 @@ const we = "discussion_", Nr = 280, ut = ({
|
|
|
3835
3979
|
}
|
|
3836
3980
|
M({ body: P, isEditing: !1, didEdit: !0 });
|
|
3837
3981
|
} catch {
|
|
3838
|
-
x(`${
|
|
3982
|
+
x(`${ve}form_error`);
|
|
3839
3983
|
}
|
|
3840
3984
|
}, ie = () => {
|
|
3841
3985
|
k && k.updateConversation && k.updateConversation({ showThread: !0, showForm: !0 }), setTimeout(() => {
|
|
@@ -3850,12 +3994,12 @@ const we = "discussion_", Nr = 280, ut = ({
|
|
|
3850
3994
|
}
|
|
3851
3995
|
}, re = [
|
|
3852
3996
|
{
|
|
3853
|
-
text: g.formatMessage({ id: `${
|
|
3997
|
+
text: g.formatMessage({ id: `${ve}moreMenu_report` }),
|
|
3854
3998
|
href: `mailto:community@apolitical.co?subject=${encodeURI(
|
|
3855
|
-
g.formatMessage({ id: `${
|
|
3999
|
+
g.formatMessage({ id: `${ve}report_subject` })
|
|
3856
4000
|
)}&body=${encodeURI(
|
|
3857
4001
|
g.formatMessage(
|
|
3858
|
-
{ id: `${
|
|
4002
|
+
{ id: `${ve}report_body` },
|
|
3859
4003
|
{
|
|
3860
4004
|
contentType: t.type || "",
|
|
3861
4005
|
contentSlug: t.slug || "",
|
|
@@ -3868,7 +4012,7 @@ const we = "discussion_", Nr = 280, ut = ({
|
|
|
3868
4012
|
];
|
|
3869
4013
|
return n && K && re.push(
|
|
3870
4014
|
{
|
|
3871
|
-
text: g.formatMessage({ id: `${
|
|
4015
|
+
text: g.formatMessage({ id: `${ve}moreMenu_edit` }),
|
|
3872
4016
|
onClick: () => M({ ...T, isEditing: !0 }),
|
|
3873
4017
|
icon: "pencil-paper",
|
|
3874
4018
|
className: "gtm-trackable",
|
|
@@ -3876,7 +4020,7 @@ const we = "discussion_", Nr = 280, ut = ({
|
|
|
3876
4020
|
"data-gtm-event-type": `edit-${t.type}-click`
|
|
3877
4021
|
},
|
|
3878
4022
|
{
|
|
3879
|
-
text: g.formatMessage({ id: `${
|
|
4023
|
+
text: g.formatMessage({ id: `${ve}moreMenu_delete` }),
|
|
3880
4024
|
onClick: (P) => {
|
|
3881
4025
|
P.preventDefault(), P.stopPropagation(), H(!0);
|
|
3882
4026
|
},
|
|
@@ -3886,7 +4030,7 @@ const we = "discussion_", Nr = 280, ut = ({
|
|
|
3886
4030
|
"data-gtm-event-type": `delete-${t.type}-click`,
|
|
3887
4031
|
...Dr(`delete-${t.slug}-modal`, C)
|
|
3888
4032
|
}
|
|
3889
|
-
),
|
|
4033
|
+
), D.createElement(e, {
|
|
3890
4034
|
className: S("discussion-post", h),
|
|
3891
4035
|
"data-testid": `discussion-${t.type}-thread`,
|
|
3892
4036
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
@@ -3906,7 +4050,7 @@ const we = "discussion_", Nr = 280, ut = ({
|
|
|
3906
4050
|
Ht,
|
|
3907
4051
|
{
|
|
3908
4052
|
member: b,
|
|
3909
|
-
additionalContent: { createdAt:
|
|
4053
|
+
additionalContent: { createdAt: w, didEdit: T.didEdit },
|
|
3910
4054
|
className: typeof b != "string" && b.id === i ? "highlighted" : "",
|
|
3911
4055
|
gtmContext: p,
|
|
3912
4056
|
gtmType: "profile-click"
|
|
@@ -3949,13 +4093,13 @@ const we = "discussion_", Nr = 280, ut = ({
|
|
|
3949
4093
|
className: "gtm-trackable",
|
|
3950
4094
|
"data-gtm-event-context": p,
|
|
3951
4095
|
"data-gtm-event-type": "title-click",
|
|
3952
|
-
children: /* @__PURE__ */ s.jsx(ln, { options: { overrides: { a:
|
|
4096
|
+
children: /* @__PURE__ */ s.jsx(ln, { options: { overrides: { a: qs } }, children: V })
|
|
3953
4097
|
}
|
|
3954
4098
|
) : /* @__PURE__ */ s.jsx(
|
|
3955
4099
|
ln,
|
|
3956
4100
|
{
|
|
3957
4101
|
options: {
|
|
3958
|
-
wrapper: t.type === "question" ? "h1" :
|
|
4102
|
+
wrapper: t.type === "question" ? "h1" : D.Fragment,
|
|
3959
4103
|
forceWrapper: t.type === "question",
|
|
3960
4104
|
forceInline: t.type === "question",
|
|
3961
4105
|
forceBlock: t.type !== "question"
|
|
@@ -3970,7 +4114,7 @@ const we = "discussion_", Nr = 280, ut = ({
|
|
|
3970
4114
|
"data-testid": `${t.type}-actions`,
|
|
3971
4115
|
children: [
|
|
3972
4116
|
/* @__PURE__ */ s.jsx(
|
|
3973
|
-
|
|
4117
|
+
Cr,
|
|
3974
4118
|
{
|
|
3975
4119
|
element: "li",
|
|
3976
4120
|
likes: O,
|
|
@@ -4006,13 +4150,13 @@ const we = "discussion_", Nr = 280, ut = ({
|
|
|
4006
4150
|
"data-gtm-event-context": p,
|
|
4007
4151
|
"data-gtm-event-type": `answer-${t.type}-click`,
|
|
4008
4152
|
screenreaderText: g.formatMessage(
|
|
4009
|
-
{ id: `${
|
|
4153
|
+
{ id: `${ve}comments_screenReader` },
|
|
4010
4154
|
{ count: W }
|
|
4011
4155
|
)
|
|
4012
4156
|
}
|
|
4013
4157
|
),
|
|
4014
4158
|
/* @__PURE__ */ s.jsx("span", { children: g.formatMessage(
|
|
4015
|
-
{ id: `${
|
|
4159
|
+
{ id: `${ve}comments` },
|
|
4016
4160
|
{ count: W }
|
|
4017
4161
|
) })
|
|
4018
4162
|
]
|
|
@@ -4025,11 +4169,11 @@ const we = "discussion_", Nr = 280, ut = ({
|
|
|
4025
4169
|
size: "medium",
|
|
4026
4170
|
styling: { muted: !0 },
|
|
4027
4171
|
onClick: ie,
|
|
4028
|
-
children: g.formatMessage({ id: `${
|
|
4172
|
+
children: g.formatMessage({ id: `${ve}reply` })
|
|
4029
4173
|
}
|
|
4030
4174
|
) }),
|
|
4031
4175
|
/* @__PURE__ */ s.jsx(
|
|
4032
|
-
|
|
4176
|
+
gr,
|
|
4033
4177
|
{
|
|
4034
4178
|
element: "li",
|
|
4035
4179
|
id: `more-${t.slug}`,
|
|
@@ -4095,15 +4239,15 @@ const we = "discussion_", Nr = 280, ut = ({
|
|
|
4095
4239
|
] })
|
|
4096
4240
|
});
|
|
4097
4241
|
};
|
|
4098
|
-
const Ct = "discussion_responses_",
|
|
4099
|
-
const n =
|
|
4242
|
+
const Ct = "discussion_responses_", Po = ({ type: e = "answer", responses: t = 0 }) => {
|
|
4243
|
+
const n = N();
|
|
4100
4244
|
return /* @__PURE__ */ s.jsxs("div", { className: "responses-heading", children: [
|
|
4101
4245
|
/* @__PURE__ */ s.jsx("h3", { children: n.formatMessage({ id: `${Ct}title` }, { action: n.formatMessage({ id: `${Ct}${e}` }), count: t }) }),
|
|
4102
4246
|
t === 0 && /* @__PURE__ */ s.jsx("p", { children: xe(n.formatMessage, `${Ct}empty`, e, e) })
|
|
4103
4247
|
] });
|
|
4104
4248
|
};
|
|
4105
|
-
const
|
|
4106
|
-
const r =
|
|
4249
|
+
const Pr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
4250
|
+
const r = N(), i = se(null), c = be(dt), [d, o] = L(
|
|
4107
4251
|
"closed"
|
|
4108
4252
|
/* Closed */
|
|
4109
4253
|
);
|
|
@@ -4113,7 +4257,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4113
4257
|
return f.addEventListener("transitionend", a), () => {
|
|
4114
4258
|
f.removeEventListener("transitionend", a);
|
|
4115
4259
|
};
|
|
4116
|
-
}, []),
|
|
4260
|
+
}, []), De(() => {
|
|
4117
4261
|
d === "closed" && !c.showThread || o(
|
|
4118
4262
|
[
|
|
4119
4263
|
"opening",
|
|
@@ -4168,7 +4312,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4168
4312
|
}
|
|
4169
4313
|
)
|
|
4170
4314
|
] });
|
|
4171
|
-
},
|
|
4315
|
+
}, Rr = ({
|
|
4172
4316
|
user: e,
|
|
4173
4317
|
content: t,
|
|
4174
4318
|
verb: n = "post"
|
|
@@ -4189,7 +4333,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4189
4333
|
like: 0
|
|
4190
4334
|
},
|
|
4191
4335
|
verb: n
|
|
4192
|
-
}),
|
|
4336
|
+
}), Fr = ({
|
|
4193
4337
|
queryClient: e,
|
|
4194
4338
|
queryKey: t,
|
|
4195
4339
|
user: n,
|
|
@@ -4197,7 +4341,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4197
4341
|
}) => ({ mutationFn: r, onMutate: async ({ content: o }) => {
|
|
4198
4342
|
if (!n)
|
|
4199
4343
|
return;
|
|
4200
|
-
const a =
|
|
4344
|
+
const a = Rr({ user: n, content: o, verb: "post" });
|
|
4201
4345
|
await e.cancelQueries({ queryKey: t });
|
|
4202
4346
|
const u = e.getQueryData(t);
|
|
4203
4347
|
return e.setQueryData(t, (l) => [...l, a]), { previousActivities: u };
|
|
@@ -4205,7 +4349,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4205
4349
|
e.setQueryData(t, u.previousActivities);
|
|
4206
4350
|
}, onSettled: () => {
|
|
4207
4351
|
e.invalidateQueries({ queryKey: t });
|
|
4208
|
-
} }),
|
|
4352
|
+
} }), Lr = ({
|
|
4209
4353
|
queryClient: e,
|
|
4210
4354
|
queryKey: t,
|
|
4211
4355
|
mutationFn: n
|
|
@@ -4227,7 +4371,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4227
4371
|
onSettled: () => {
|
|
4228
4372
|
e.invalidateQueries({ queryKey: t });
|
|
4229
4373
|
}
|
|
4230
|
-
}),
|
|
4374
|
+
}), Or = ({
|
|
4231
4375
|
queryClient: e,
|
|
4232
4376
|
queryKey: t,
|
|
4233
4377
|
mutationFn: n
|
|
@@ -4250,7 +4394,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4250
4394
|
e.invalidateQueries({
|
|
4251
4395
|
queryKey: [...t, u.activityId]
|
|
4252
4396
|
});
|
|
4253
|
-
} }),
|
|
4397
|
+
} }), Br = ({
|
|
4254
4398
|
queryClient: e,
|
|
4255
4399
|
queryKey: t,
|
|
4256
4400
|
user: n,
|
|
@@ -4284,13 +4428,13 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4284
4428
|
e.invalidateQueries({
|
|
4285
4429
|
queryKey: [...t, l.activityId]
|
|
4286
4430
|
});
|
|
4287
|
-
} }),
|
|
4431
|
+
} }), Ro = ({
|
|
4288
4432
|
basePath: e,
|
|
4289
4433
|
parentId: t,
|
|
4290
4434
|
isMember: n,
|
|
4291
4435
|
functions: { list: r, create: i, edit: c, like: d, unlike: o, join: a, leave: u }
|
|
4292
4436
|
}) => {
|
|
4293
|
-
const l =
|
|
4437
|
+
const l = N(), f = ot(), h = be(Te), {
|
|
4294
4438
|
data: p,
|
|
4295
4439
|
error: _,
|
|
4296
4440
|
isLoading: j,
|
|
@@ -4298,43 +4442,43 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4298
4442
|
} = pn({
|
|
4299
4443
|
queryKey: [e, t],
|
|
4300
4444
|
queryFn: r
|
|
4301
|
-
}), E =
|
|
4445
|
+
}), E = Fr({
|
|
4302
4446
|
queryClient: f,
|
|
4303
4447
|
queryKey: [e, t],
|
|
4304
4448
|
user: h,
|
|
4305
4449
|
mutationFn: i
|
|
4306
|
-
}), { mutate: k } = me(E), T =
|
|
4450
|
+
}), { mutate: k } = me(E), T = Lr({
|
|
4307
4451
|
queryClient: f,
|
|
4308
4452
|
queryKey: [e, t],
|
|
4309
|
-
mutationFn: async (
|
|
4453
|
+
mutationFn: async (w) => await c(w)
|
|
4310
4454
|
}), {
|
|
4311
4455
|
mutate: M
|
|
4312
|
-
} = me(T), C =
|
|
4456
|
+
} = me(T), C = Or({
|
|
4313
4457
|
queryClient: f,
|
|
4314
4458
|
queryKey: [e, t],
|
|
4315
4459
|
mutationFn: d
|
|
4316
4460
|
}), {
|
|
4317
4461
|
mutate: H
|
|
4318
|
-
} = me(C), Y =
|
|
4462
|
+
} = me(C), Y = Br({
|
|
4319
4463
|
queryClient: f,
|
|
4320
4464
|
queryKey: [e, t],
|
|
4321
4465
|
user: h,
|
|
4322
|
-
mutationFn: async ({ activityId:
|
|
4466
|
+
mutationFn: async ({ activityId: w }) => {
|
|
4323
4467
|
var B, W, V;
|
|
4324
4468
|
const G = p && (p == null ? void 0 : p.find(
|
|
4325
|
-
(K) => K.id ===
|
|
4469
|
+
(K) => K.id === w
|
|
4326
4470
|
)), O = (V = (W = (B = G == null ? void 0 : G.own_reactions) == null ? void 0 : B.like) == null ? void 0 : W.find(
|
|
4327
4471
|
(K) => K.user_id === (h == null ? void 0 : h.id)
|
|
4328
4472
|
)) == null ? void 0 : V.id;
|
|
4329
|
-
await o({ reactionId: O || "", activityId:
|
|
4473
|
+
await o({ reactionId: O || "", activityId: w });
|
|
4330
4474
|
}
|
|
4331
4475
|
}), {
|
|
4332
4476
|
mutate: x
|
|
4333
4477
|
} = me(Y), b = je(
|
|
4334
|
-
({ activityId:
|
|
4478
|
+
({ activityId: w }) => H({ activityId: w }),
|
|
4335
4479
|
[H]
|
|
4336
4480
|
), U = je(
|
|
4337
|
-
({ activityId:
|
|
4481
|
+
({ activityId: w }) => x({ activityId: w }),
|
|
4338
4482
|
[x]
|
|
4339
4483
|
);
|
|
4340
4484
|
return _ ? /* @__PURE__ */ s.jsx(ct, { variant: "error", text: _.message }) : j ? /* @__PURE__ */ s.jsx(ye, { style: { height: "400px" } }) : /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
@@ -4352,40 +4496,40 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4352
4496
|
}
|
|
4353
4497
|
}
|
|
4354
4498
|
),
|
|
4355
|
-
!g && Array.isArray(p) && (p == null ? void 0 : p.map((
|
|
4499
|
+
!g && Array.isArray(p) && (p == null ? void 0 : p.map((w) => {
|
|
4356
4500
|
var B, W, V, K, oe, ae, ie, le, re, P, te, ce, ne, F;
|
|
4357
|
-
const G = ((B =
|
|
4358
|
-
return /* @__PURE__ */ s.jsxs(
|
|
4501
|
+
const G = ((B = w == null ? void 0 : w.actor) == null ? void 0 : B.id) === (h == null ? void 0 : h.id), O = Ut(n, G);
|
|
4502
|
+
return /* @__PURE__ */ s.jsxs(Dt, { children: [
|
|
4359
4503
|
/* @__PURE__ */ s.jsx(
|
|
4360
4504
|
ut,
|
|
4361
4505
|
{
|
|
4362
4506
|
content: {
|
|
4363
4507
|
type: "post",
|
|
4364
|
-
body:
|
|
4508
|
+
body: w == null ? void 0 : w.content,
|
|
4365
4509
|
canLike: O,
|
|
4366
|
-
createdAt: (
|
|
4367
|
-
slugs: { parentId: t, activityId:
|
|
4368
|
-
slug:
|
|
4510
|
+
createdAt: (w == null ? void 0 : w.time) || "",
|
|
4511
|
+
slugs: { parentId: t, activityId: w == null ? void 0 : w.id },
|
|
4512
|
+
slug: w == null ? void 0 : w.id,
|
|
4369
4513
|
author: {
|
|
4370
|
-
id: (W =
|
|
4371
|
-
name: `${(K = (V =
|
|
4372
|
-
organization: (ae = (oe =
|
|
4373
|
-
jobTitle: (le = (ie =
|
|
4514
|
+
id: (W = w == null ? void 0 : w.actor) == null ? void 0 : W.id,
|
|
4515
|
+
name: `${(K = (V = w == null ? void 0 : w.actor) == null ? void 0 : V.data) == null ? void 0 : K.name}`,
|
|
4516
|
+
organization: (ae = (oe = w == null ? void 0 : w.actor) == null ? void 0 : oe.data) == null ? void 0 : ae.organization,
|
|
4517
|
+
jobTitle: (le = (ie = w == null ? void 0 : w.actor) == null ? void 0 : ie.data) == null ? void 0 : le.jobTitle,
|
|
4374
4518
|
image: {
|
|
4375
|
-
thumbnail: ((P = (re =
|
|
4519
|
+
thumbnail: ((P = (re = w == null ? void 0 : w.actor) == null ? void 0 : re.data) == null ? void 0 : P.thumbnail) || void 0
|
|
4376
4520
|
}
|
|
4377
4521
|
},
|
|
4378
|
-
userLiked: ((te =
|
|
4379
|
-
likes: (
|
|
4380
|
-
comments: (
|
|
4381
|
-
peopleWhoLiked: ((ne =
|
|
4522
|
+
userLiked: ((te = w == null ? void 0 : w.own_reactions) == null ? void 0 : te.like) && ((ce = w == null ? void 0 : w.own_reactions) == null ? void 0 : ce.like.length) > 0,
|
|
4523
|
+
likes: (w == null ? void 0 : w.reaction_counts.like) || 0,
|
|
4524
|
+
comments: (w == null ? void 0 : w.reaction_counts.reply) || 0,
|
|
4525
|
+
peopleWhoLiked: ((ne = w == null ? void 0 : w.latest_reactions) == null ? void 0 : ne.like) && ((F = w == null ? void 0 : w.latest_reactions) == null ? void 0 : F.like.map((J) => ({
|
|
4382
4526
|
id: J == null ? void 0 : J.user_id,
|
|
4383
4527
|
name: J.user.data.name
|
|
4384
4528
|
})))
|
|
4385
4529
|
},
|
|
4386
4530
|
links: {
|
|
4387
|
-
post: `${e}/${t}/${
|
|
4388
|
-
comments: `${e}/${t}/${
|
|
4531
|
+
post: `${e}/${t}/${w == null ? void 0 : w.id}`,
|
|
4532
|
+
comments: `${e}/${t}/${w == null ? void 0 : w.id}`
|
|
4389
4533
|
},
|
|
4390
4534
|
functions: {
|
|
4391
4535
|
content: {
|
|
@@ -4395,10 +4539,10 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4395
4539
|
},
|
|
4396
4540
|
likes: {
|
|
4397
4541
|
createLike: () => {
|
|
4398
|
-
b({ activityId:
|
|
4542
|
+
b({ activityId: w == null ? void 0 : w.id });
|
|
4399
4543
|
},
|
|
4400
4544
|
deleteLike: () => {
|
|
4401
|
-
U({ activityId:
|
|
4545
|
+
U({ activityId: w == null ? void 0 : w.id });
|
|
4402
4546
|
}
|
|
4403
4547
|
},
|
|
4404
4548
|
comments: {
|
|
@@ -4408,11 +4552,11 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4408
4552
|
isTruncated: !0
|
|
4409
4553
|
}
|
|
4410
4554
|
),
|
|
4411
|
-
/* @__PURE__ */ s.jsx(
|
|
4412
|
-
] },
|
|
4555
|
+
/* @__PURE__ */ s.jsx(Ne, {})
|
|
4556
|
+
] }, w == null ? void 0 : w.id);
|
|
4413
4557
|
}))
|
|
4414
4558
|
] });
|
|
4415
|
-
},
|
|
4559
|
+
}, Ir = ({
|
|
4416
4560
|
queryClient: e,
|
|
4417
4561
|
queryKey: t,
|
|
4418
4562
|
mutationFn: n
|
|
@@ -4431,7 +4575,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4431
4575
|
})), { previousActivity: a };
|
|
4432
4576
|
}, onSettled: () => {
|
|
4433
4577
|
e.invalidateQueries({ queryKey: t });
|
|
4434
|
-
} }),
|
|
4578
|
+
} }), Hr = ({
|
|
4435
4579
|
queryClient: e,
|
|
4436
4580
|
queryKey: t,
|
|
4437
4581
|
mutationFn: n
|
|
@@ -4457,7 +4601,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4457
4601
|
onError: (c, d, o) => {
|
|
4458
4602
|
e.setQueryData(t, o.previousActivity);
|
|
4459
4603
|
}
|
|
4460
|
-
}),
|
|
4604
|
+
}), Qr = ({
|
|
4461
4605
|
queryClient: e,
|
|
4462
4606
|
queryKey: t,
|
|
4463
4607
|
mutationFn: n
|
|
@@ -4484,7 +4628,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4484
4628
|
...o,
|
|
4485
4629
|
latest_reactions: { reply: a }
|
|
4486
4630
|
})), { previousActivity: o };
|
|
4487
|
-
} }),
|
|
4631
|
+
} }), Ur = ({
|
|
4488
4632
|
queryClient: e,
|
|
4489
4633
|
queryKey: t,
|
|
4490
4634
|
user: n,
|
|
@@ -4523,7 +4667,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4523
4667
|
...u,
|
|
4524
4668
|
latest_reactions: { reply: l }
|
|
4525
4669
|
})), { previousActivity: u };
|
|
4526
|
-
} }),
|
|
4670
|
+
} }), Wr = ({
|
|
4527
4671
|
queryClient: e,
|
|
4528
4672
|
queryKey: t,
|
|
4529
4673
|
mutationFn: n
|
|
@@ -4546,7 +4690,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4546
4690
|
onSettled: () => {
|
|
4547
4691
|
e.invalidateQueries({ queryKey: t });
|
|
4548
4692
|
}
|
|
4549
|
-
}),
|
|
4693
|
+
}), zr = ({
|
|
4550
4694
|
queryClient: e,
|
|
4551
4695
|
queryKey: t,
|
|
4552
4696
|
mutationFn: n
|
|
@@ -4604,7 +4748,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4604
4748
|
...a,
|
|
4605
4749
|
latest_reactions: { reply: u }
|
|
4606
4750
|
})), { previousActivity: a };
|
|
4607
|
-
} }),
|
|
4751
|
+
} }), Vr = ({
|
|
4608
4752
|
basePath: e,
|
|
4609
4753
|
parentId: t,
|
|
4610
4754
|
replyParentId: n,
|
|
@@ -4613,11 +4757,11 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4613
4757
|
replies: c,
|
|
4614
4758
|
functions: { create: d, edit: o, join: a, leave: u, like: l, unlike: f }
|
|
4615
4759
|
}) => {
|
|
4616
|
-
const h =
|
|
4760
|
+
const h = N(), p = ot(), _ = be(dt), j = Wr({
|
|
4617
4761
|
queryClient: p,
|
|
4618
4762
|
queryKey: [e, t, r],
|
|
4619
4763
|
mutationFn: async (b) => d({ replyId: n, content: b.body })
|
|
4620
|
-
}), { mutate: g } = me(j), E =
|
|
4764
|
+
}), { mutate: g } = me(j), E = zr({
|
|
4621
4765
|
queryClient: p,
|
|
4622
4766
|
queryKey: [e, t, r],
|
|
4623
4767
|
mutationFn: o
|
|
@@ -4643,7 +4787,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4643
4787
|
[H]
|
|
4644
4788
|
);
|
|
4645
4789
|
return /* @__PURE__ */ s.jsx(
|
|
4646
|
-
|
|
4790
|
+
Pr,
|
|
4647
4791
|
{
|
|
4648
4792
|
count: i,
|
|
4649
4793
|
showRepliesButton: i > 0 || _.showForm,
|
|
@@ -4663,13 +4807,13 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4663
4807
|
}
|
|
4664
4808
|
),
|
|
4665
4809
|
(c == null ? void 0 : c.length) === 0 || (c == null ? void 0 : c.map((b) => {
|
|
4666
|
-
var U,
|
|
4810
|
+
var U, w, G, O, B, W, V, K, oe, ae, ie, le, re, P, te, ce, ne;
|
|
4667
4811
|
return /* @__PURE__ */ s.jsx(
|
|
4668
4812
|
ut,
|
|
4669
4813
|
{
|
|
4670
4814
|
content: {
|
|
4671
4815
|
type: "reply",
|
|
4672
|
-
body: typeof b.data.content == "string" ? (U = b == null ? void 0 : b.data) == null ? void 0 : U.content : ((G = (
|
|
4816
|
+
body: typeof b.data.content == "string" ? (U = b == null ? void 0 : b.data) == null ? void 0 : U.content : ((G = (w = b == null ? void 0 : b.data) == null ? void 0 : w.content) == null ? void 0 : G.text) || "",
|
|
4673
4817
|
createdAt: b == null ? void 0 : b.created_at,
|
|
4674
4818
|
slugs: {
|
|
4675
4819
|
parentId: t,
|
|
@@ -4722,7 +4866,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4722
4866
|
] })
|
|
4723
4867
|
}
|
|
4724
4868
|
);
|
|
4725
|
-
},
|
|
4869
|
+
}, Yr = ({
|
|
4726
4870
|
basePath: e,
|
|
4727
4871
|
parentId: t,
|
|
4728
4872
|
activityId: n,
|
|
@@ -4730,23 +4874,23 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4730
4874
|
isMember: i,
|
|
4731
4875
|
functions: { createReply: c, editReply: d, like: o, unlike: a, join: u, leave: l }
|
|
4732
4876
|
}) => {
|
|
4733
|
-
const f =
|
|
4877
|
+
const f = N(), h = ot(), p = be(Te), _ = Ir({
|
|
4734
4878
|
queryClient: h,
|
|
4735
4879
|
queryKey: [e, t, n],
|
|
4736
4880
|
mutationFn: async (x) => c({ activityId: n, content: x.body })
|
|
4737
|
-
}), { mutate: j } = me(_), g =
|
|
4881
|
+
}), { mutate: j } = me(_), g = Hr({
|
|
4738
4882
|
queryClient: h,
|
|
4739
4883
|
queryKey: [e, t, n],
|
|
4740
4884
|
mutationFn: async (x) => d(x)
|
|
4741
4885
|
}), {
|
|
4742
4886
|
mutate: E
|
|
4743
|
-
} = me(g), k =
|
|
4887
|
+
} = me(g), k = Qr({
|
|
4744
4888
|
queryClient: h,
|
|
4745
4889
|
queryKey: [e, t, n],
|
|
4746
4890
|
mutationFn: o
|
|
4747
4891
|
}), {
|
|
4748
4892
|
mutate: T
|
|
4749
|
-
} = me(k), M =
|
|
4893
|
+
} = me(k), M = Ur({
|
|
4750
4894
|
queryClient: h,
|
|
4751
4895
|
queryKey: [e, t, n],
|
|
4752
4896
|
user: p,
|
|
@@ -4776,9 +4920,9 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4776
4920
|
}
|
|
4777
4921
|
),
|
|
4778
4922
|
(r == null ? void 0 : r.length) === 0 || (r == null ? void 0 : r.map((x) => {
|
|
4779
|
-
var
|
|
4780
|
-
const b = ((
|
|
4781
|
-
return /* @__PURE__ */ s.jsx(
|
|
4923
|
+
var w, G, O, B, W, V, K, oe, ae, ie, le, re, P, te, ce, ne, F, J, fe, pe;
|
|
4924
|
+
const b = ((w = x == null ? void 0 : x.user) == null ? void 0 : w.id) === (p == null ? void 0 : p.id), U = Ut(i, b);
|
|
4925
|
+
return /* @__PURE__ */ s.jsx(Tr, { children: /* @__PURE__ */ s.jsx(
|
|
4782
4926
|
ut,
|
|
4783
4927
|
{
|
|
4784
4928
|
content: {
|
|
@@ -4825,7 +4969,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4825
4969
|
comments: {}
|
|
4826
4970
|
},
|
|
4827
4971
|
children: /* @__PURE__ */ s.jsx(
|
|
4828
|
-
|
|
4972
|
+
Vr,
|
|
4829
4973
|
{
|
|
4830
4974
|
basePath: e,
|
|
4831
4975
|
parentId: t,
|
|
@@ -4849,7 +4993,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4849
4993
|
) }, x == null ? void 0 : x.id);
|
|
4850
4994
|
}))
|
|
4851
4995
|
] });
|
|
4852
|
-
},
|
|
4996
|
+
}, Gr = ({
|
|
4853
4997
|
queryClient: e,
|
|
4854
4998
|
queryKey: t,
|
|
4855
4999
|
mutationFn: n
|
|
@@ -4873,7 +5017,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4873
5017
|
onSettled: () => {
|
|
4874
5018
|
e.invalidateQueries({ queryKey: t });
|
|
4875
5019
|
}
|
|
4876
|
-
}),
|
|
5020
|
+
}), Jr = ({
|
|
4877
5021
|
queryClient: e,
|
|
4878
5022
|
queryKey: t,
|
|
4879
5023
|
mutationFn: n
|
|
@@ -4893,7 +5037,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4893
5037
|
})), { previousActivity: a };
|
|
4894
5038
|
}, onSettled: () => {
|
|
4895
5039
|
e.invalidateQueries({ queryKey: t });
|
|
4896
|
-
} }),
|
|
5040
|
+
} }), Xr = ({
|
|
4897
5041
|
queryClient: e,
|
|
4898
5042
|
queryKey: t,
|
|
4899
5043
|
user: n,
|
|
@@ -4926,7 +5070,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4926
5070
|
}, onSettled: () => {
|
|
4927
5071
|
e.invalidateQueries({ queryKey: t });
|
|
4928
5072
|
} });
|
|
4929
|
-
const
|
|
5073
|
+
const Fo = ({
|
|
4930
5074
|
basePath: e,
|
|
4931
5075
|
parentId: t,
|
|
4932
5076
|
activityId: n,
|
|
@@ -4953,19 +5097,19 @@ const Ro = ({
|
|
|
4953
5097
|
} = pn({
|
|
4954
5098
|
queryKey: [e, t, n],
|
|
4955
5099
|
queryFn: i
|
|
4956
|
-
}), M =
|
|
5100
|
+
}), M = Gr({
|
|
4957
5101
|
queryClient: j,
|
|
4958
5102
|
queryKey: [e, t, n],
|
|
4959
5103
|
mutationFn: async (F) => await c(F)
|
|
4960
5104
|
}), {
|
|
4961
5105
|
mutate: C
|
|
4962
|
-
} = me(M), H =
|
|
5106
|
+
} = me(M), H = Jr({
|
|
4963
5107
|
queryClient: j,
|
|
4964
5108
|
queryKey: [e, t, n],
|
|
4965
5109
|
mutationFn: d
|
|
4966
5110
|
}), {
|
|
4967
5111
|
mutate: Y
|
|
4968
|
-
} = me(H), x =
|
|
5112
|
+
} = me(H), x = Xr({
|
|
4969
5113
|
queryClient: j,
|
|
4970
5114
|
queryKey: [e, t, n],
|
|
4971
5115
|
user: _,
|
|
@@ -4982,7 +5126,7 @@ const Ro = ({
|
|
|
4982
5126
|
} = me(x), U = je(
|
|
4983
5127
|
({ activityId: F }) => Y({ activityId: F }),
|
|
4984
5128
|
[Y]
|
|
4985
|
-
),
|
|
5129
|
+
), w = je(
|
|
4986
5130
|
async ({ activityId: F }) => b({ activityId: F }),
|
|
4987
5131
|
[b]
|
|
4988
5132
|
);
|
|
@@ -5032,7 +5176,7 @@ const Ro = ({
|
|
|
5032
5176
|
},
|
|
5033
5177
|
likes: {
|
|
5034
5178
|
createLike: () => U({ activityId: n }),
|
|
5035
|
-
deleteLike: () =>
|
|
5179
|
+
deleteLike: () => w({ activityId: n })
|
|
5036
5180
|
},
|
|
5037
5181
|
comments: {
|
|
5038
5182
|
openComments: () => {
|
|
@@ -5046,7 +5190,7 @@ const Ro = ({
|
|
|
5046
5190
|
")"
|
|
5047
5191
|
] }),
|
|
5048
5192
|
/* @__PURE__ */ s.jsx(
|
|
5049
|
-
|
|
5193
|
+
Yr,
|
|
5050
5194
|
{
|
|
5051
5195
|
basePath: e,
|
|
5052
5196
|
parentId: t,
|
|
@@ -5067,7 +5211,7 @@ const Ro = ({
|
|
|
5067
5211
|
},
|
|
5068
5212
|
n
|
|
5069
5213
|
);
|
|
5070
|
-
},
|
|
5214
|
+
}, Lo = ({ id: e, data: { jobTitle: t, name: n, organization: r, thumbnail: i } }) => ({
|
|
5071
5215
|
id: e,
|
|
5072
5216
|
name: n,
|
|
5073
5217
|
jobTitle: t,
|
|
@@ -5076,84 +5220,84 @@ const Ro = ({
|
|
|
5076
5220
|
});
|
|
5077
5221
|
export {
|
|
5078
5222
|
Pt as ASSETS_BUCKET,
|
|
5079
|
-
|
|
5080
|
-
|
|
5223
|
+
Ro as ActivitiesFeed,
|
|
5224
|
+
Fo as ActivitySection,
|
|
5081
5225
|
Qt as AddPost,
|
|
5082
|
-
|
|
5083
|
-
|
|
5226
|
+
go as BannerSection,
|
|
5227
|
+
jo as Breadcrumbs,
|
|
5084
5228
|
X as Button,
|
|
5085
5229
|
it as ButtonWrapper,
|
|
5086
|
-
|
|
5230
|
+
lr as CacheProvider,
|
|
5087
5231
|
yn as CollapsibleSection,
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5232
|
+
So as Columns,
|
|
5233
|
+
ko as CommunityDetails,
|
|
5234
|
+
ir as Contributors,
|
|
5091
5235
|
dt as ConversationContext,
|
|
5092
|
-
|
|
5093
|
-
|
|
5236
|
+
xr as CookieBanner,
|
|
5237
|
+
Tr as DiscussionConversation,
|
|
5094
5238
|
Fn as DiscussionForm,
|
|
5095
|
-
|
|
5239
|
+
Cr as DiscussionLikes,
|
|
5096
5240
|
ut as DiscussionPost,
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5241
|
+
Pr as DiscussionThread,
|
|
5242
|
+
Ne as Divider,
|
|
5243
|
+
ho as DownloadSection,
|
|
5100
5244
|
Be as EMAILS,
|
|
5101
|
-
|
|
5245
|
+
To as EmailHelperTextBox,
|
|
5102
5246
|
ct as EmptyStateBox,
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5247
|
+
yo as Filters,
|
|
5248
|
+
ur as FlagsProvider,
|
|
5249
|
+
An as Footer,
|
|
5106
5250
|
jn as FullWidthSection,
|
|
5107
5251
|
vo as GlobalProviders,
|
|
5108
5252
|
Rn as Header,
|
|
5109
|
-
|
|
5253
|
+
zs as HelperTextBox,
|
|
5110
5254
|
xn as HiddenFromScreenReaders,
|
|
5111
|
-
|
|
5255
|
+
bo as HideShowTextBox,
|
|
5112
5256
|
Se as HighlightedTextBox,
|
|
5113
|
-
|
|
5114
|
-
|
|
5257
|
+
mr as IntlProvider,
|
|
5258
|
+
kr as InviteForm,
|
|
5115
5259
|
No as InviteModal,
|
|
5116
5260
|
Mn as JoinButton,
|
|
5117
|
-
|
|
5261
|
+
Eo as LanguageSwitcher,
|
|
5118
5262
|
lt as Link,
|
|
5119
|
-
|
|
5120
|
-
|
|
5263
|
+
pr as LoadMore,
|
|
5264
|
+
wo as LoadingBlock,
|
|
5121
5265
|
ye as LoadingPlaceholder,
|
|
5122
|
-
|
|
5266
|
+
rr as LoadingState,
|
|
5123
5267
|
Cn as Logo,
|
|
5124
|
-
|
|
5268
|
+
po as LogoSection,
|
|
5125
5269
|
ln as MarkdownText,
|
|
5126
|
-
|
|
5270
|
+
_o as MarketingBox,
|
|
5127
5271
|
Ht as Member,
|
|
5128
5272
|
Do as MembersList,
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5273
|
+
Ar as Modal,
|
|
5274
|
+
gr as MoreMenu,
|
|
5275
|
+
xo as NUMBER_OF_USERS,
|
|
5132
5276
|
Ln as Overlay,
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5277
|
+
Co as PageLayout,
|
|
5278
|
+
$o as PasswordRules,
|
|
5279
|
+
er as Pill,
|
|
5136
5280
|
It as ProfilePicture,
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5281
|
+
nr as ProgressBar,
|
|
5282
|
+
Mo as Rating,
|
|
5283
|
+
Yr as RepliesFeed,
|
|
5284
|
+
Po as ResponsesHeading,
|
|
5285
|
+
Hs as ResponsiveImage,
|
|
5142
5286
|
vr as SearchForm,
|
|
5143
|
-
|
|
5287
|
+
qs as Span,
|
|
5144
5288
|
Ft as StatusBanner,
|
|
5145
|
-
|
|
5146
|
-
|
|
5289
|
+
Ao as Tags,
|
|
5290
|
+
Qs as Tooltip,
|
|
5147
5291
|
Te as UserContext,
|
|
5148
|
-
|
|
5292
|
+
fr as UserProvider,
|
|
5149
5293
|
de as VisuallyHidden,
|
|
5150
5294
|
Dr as addAriaProps,
|
|
5151
5295
|
$n as getMember,
|
|
5152
5296
|
et as headerData,
|
|
5153
|
-
|
|
5297
|
+
Lo as mapGetStreamData,
|
|
5154
5298
|
Es as useCurrentPath,
|
|
5155
|
-
|
|
5156
|
-
at as
|
|
5299
|
+
De as useEffectAfterMount,
|
|
5300
|
+
at as useElementWidth,
|
|
5157
5301
|
Ts as useScrollListener,
|
|
5158
|
-
|
|
5302
|
+
fo as useScrollToHash
|
|
5159
5303
|
};
|