@apolitical/component-library 1.16.0 → 1.17.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/discussion/feeds/activities-feed/activities-feed.d.ts +6 -5
- package/discussion/feeds/activities-feed/cache/handlers/error.handler.d.ts +2 -2
- package/discussion/feeds/activities-feed/cache/handlers/mutate.handler.d.ts +2 -2
- package/discussion/feeds/activities-feed/cache/helpers/index.d.ts +0 -1
- package/discussion/feeds/activities-feed/cache/hooks/like/like.hook.d.ts +2 -2
- package/discussion/feeds/activities-feed/cache/hooks/list/list.hook.d.ts +10 -4
- package/discussion/feeds/activities-feed/cache/hooks/unlike/unlike.hook.d.ts +2 -2
- package/discussion/feeds/activities-feed/cache/interfaces/cache.interface.d.ts +12 -2
- package/discussion/feeds/activities-feed/cache/interfaces/index.d.ts +0 -1
- package/discussion/feeds/activities-feed/cache/interfaces/mutation.interface.d.ts +3 -3
- package/discussion/feeds/activities-feed/cache/interfaces/query.interface.d.ts +0 -4
- package/index.js +14 -14
- package/index.mjs +1094 -1060
- package/navigation/load-more/load-more.d.ts +1 -1
- package/package.json +1 -1
- package/discussion/feeds/activities-feed/cache/helpers/activity.helper.d.ts +0 -21
- package/discussion/feeds/activities-feed/cache/helpers/cache.helper.d.ts +0 -4
- package/discussion/feeds/activities-feed/cache/helpers/context.helper.d.ts +0 -2
- package/discussion/feeds/activities-feed/cache/hooks/create/create.hook.d.ts +0 -6
- package/discussion/feeds/activities-feed/cache/hooks/edit/edit.hook.d.ts +0 -7
- package/discussion/feeds/activities-feed/cache/hooks/remove/remove.hook.d.ts +0 -6
- package/discussion/feeds/activities-feed/cache/interfaces/handler.interface.d.ts +0 -4
- package/discussion/feeds/activities-feed/cache/mocks/cache.mock.d.ts +0 -4
- package/discussion/feeds/activities-feed/cache/mocks/context.mock.d.ts +0 -9
package/index.mjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { useIntl as C, IntlProvider as
|
|
1
|
+
import P, { memo as We, useState as A, useEffect as Y, useRef as ae, useMemo as bt, Children as Vt, createContext as Kt, useContext as we, Fragment as Yt, useCallback as Ae, useReducer as vs, Suspense as ws } from "react";
|
|
2
|
+
import ks from "lodash.clonedeep";
|
|
3
|
+
import js from "lodash.set";
|
|
4
|
+
import { useIntl as C, IntlProvider as ys, createIntl as Es, FormattedMessage as De } from "react-intl";
|
|
5
5
|
import He from "truncate";
|
|
6
6
|
import vt from "markdown-to-jsx";
|
|
7
|
-
import { QueryClient as
|
|
8
|
-
import { ReactQueryDevtools as
|
|
7
|
+
import { QueryClient as Ss, QueryClientProvider as $s, useMutation as ne, useQueryClient as wt, useInfiniteQuery as Ts, useQuery as Ms } from "@tanstack/react-query";
|
|
8
|
+
import { ReactQueryDevtools as Ns } from "@tanstack/react-query-devtools";
|
|
9
9
|
import dt from "posthog-js";
|
|
10
|
-
import { CookiesProvider as Cs, useCookies as
|
|
10
|
+
import { CookiesProvider as Cs, useCookies as Ps } from "react-cookie";
|
|
11
11
|
import { ReactMultiEmail as Ds } from "react-multi-email";
|
|
12
|
-
import
|
|
13
|
-
import { ErrorBoundary as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
function
|
|
12
|
+
import Pn from "lodash.get";
|
|
13
|
+
import { ErrorBoundary as Rs } from "react-error-boundary";
|
|
14
|
+
import As from "react-textarea-autosize";
|
|
15
|
+
import Fs from "lodash.isequal";
|
|
16
|
+
function Ls(e) {
|
|
17
17
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
18
18
|
}
|
|
19
|
-
var
|
|
19
|
+
var Dn = { exports: {} };
|
|
20
20
|
/*!
|
|
21
21
|
Copyright (c) 2018 Jed Watson.
|
|
22
22
|
Licensed under the MIT License (MIT), see
|
|
@@ -51,9 +51,9 @@ var An = { exports: {} };
|
|
|
51
51
|
}
|
|
52
52
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
53
53
|
})();
|
|
54
|
-
})(
|
|
55
|
-
var
|
|
56
|
-
const E = /* @__PURE__ */
|
|
54
|
+
})(Dn);
|
|
55
|
+
var Is = Dn.exports;
|
|
56
|
+
const E = /* @__PURE__ */ Ls(Is), Os = ({ element: e = "span", showOnFocus: t = !0, children: n, ...r }) => P.createElement(e, { ...r, className: E("hidden", { "show-on-focus": t }), children: n }), me = We(Os), Bs = ({ element: e = "span", children: t = null, ...n }) => P.createElement(e, { ...n, "aria-hidden": !0 }, t), Rn = We(Bs);
|
|
57
57
|
var Gt = { exports: {} }, Ye = {};
|
|
58
58
|
/**
|
|
59
59
|
* @license React
|
|
@@ -64,12 +64,12 @@ var Gt = { exports: {} }, Ye = {};
|
|
|
64
64
|
* This source code is licensed under the MIT license found in the
|
|
65
65
|
* LICENSE file in the root directory of this source tree.
|
|
66
66
|
*/
|
|
67
|
-
var
|
|
68
|
-
function
|
|
69
|
-
if (
|
|
67
|
+
var gn;
|
|
68
|
+
function Hs() {
|
|
69
|
+
if (gn)
|
|
70
70
|
return Ye;
|
|
71
|
-
|
|
72
|
-
var e =
|
|
71
|
+
gn = 1;
|
|
72
|
+
var e = P, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
73
73
|
function l(a, u, c) {
|
|
74
74
|
var m, d = {}, p = null, h = null;
|
|
75
75
|
c !== void 0 && (p = "" + c), u.key !== void 0 && (p = "" + u.key), u.ref !== void 0 && (h = u.ref);
|
|
@@ -92,42 +92,42 @@ var Ge = {};
|
|
|
92
92
|
* This source code is licensed under the MIT license found in the
|
|
93
93
|
* LICENSE file in the root directory of this source tree.
|
|
94
94
|
*/
|
|
95
|
-
var
|
|
96
|
-
function
|
|
97
|
-
return
|
|
98
|
-
var e =
|
|
99
|
-
function
|
|
95
|
+
var _n;
|
|
96
|
+
function Qs() {
|
|
97
|
+
return _n || (_n = 1, process.env.NODE_ENV !== "production" && function() {
|
|
98
|
+
var e = P, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), a = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), d = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), h = Symbol.for("react.offscreen"), g = Symbol.iterator, v = "@@iterator";
|
|
99
|
+
function w(f) {
|
|
100
100
|
if (f === null || typeof f != "object")
|
|
101
101
|
return null;
|
|
102
102
|
var j = g && f[g] || f[v];
|
|
103
103
|
return typeof j == "function" ? j : null;
|
|
104
104
|
}
|
|
105
105
|
var y = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
106
|
-
function
|
|
106
|
+
function x(f) {
|
|
107
107
|
{
|
|
108
108
|
for (var j = arguments.length, S = new Array(j > 1 ? j - 1 : 0), T = 1; T < j; T++)
|
|
109
109
|
S[T - 1] = arguments[T];
|
|
110
|
-
|
|
110
|
+
_("error", f, S);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function _(f, j, S) {
|
|
114
114
|
{
|
|
115
115
|
var T = y.ReactDebugCurrentFrame, H = T.getStackAddendum();
|
|
116
116
|
H !== "" && (j += "%s", S = S.concat([H]));
|
|
117
|
-
var
|
|
118
|
-
return String(
|
|
117
|
+
var W = S.map(function(O) {
|
|
118
|
+
return String(O);
|
|
119
119
|
});
|
|
120
|
-
|
|
120
|
+
W.unshift("Warning: " + j), Function.prototype.apply.call(console[f], console, W);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
var $ = !1,
|
|
124
|
-
|
|
123
|
+
var $ = !1, N = !1, D = !1, G = !1, B = !1, M;
|
|
124
|
+
M = Symbol.for("react.module.reference");
|
|
125
125
|
function F(f) {
|
|
126
|
-
return !!(typeof f == "string" || typeof f == "function" || f === r || f === i ||
|
|
126
|
+
return !!(typeof f == "string" || typeof f == "function" || f === r || f === i || B || f === o || f === c || f === m || G || f === h || $ || N || D || typeof f == "object" && f !== null && (f.$$typeof === p || f.$$typeof === d || f.$$typeof === l || f.$$typeof === a || f.$$typeof === u || // This needs to include all possible module reference object
|
|
127
127
|
// types supported by any Flight configuration anywhere since
|
|
128
128
|
// we don't know which Flight build this will end up being used
|
|
129
129
|
// with.
|
|
130
|
-
f.$$typeof ===
|
|
130
|
+
f.$$typeof === M || f.getModuleId !== void 0));
|
|
131
131
|
}
|
|
132
132
|
function b(f, j, S) {
|
|
133
133
|
var T = f.displayName;
|
|
@@ -136,13 +136,13 @@ function Hs() {
|
|
|
136
136
|
var H = j.displayName || j.name || "";
|
|
137
137
|
return H !== "" ? S + "(" + H + ")" : S;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function z(f) {
|
|
140
140
|
return f.displayName || "Context";
|
|
141
141
|
}
|
|
142
142
|
function k(f) {
|
|
143
143
|
if (f == null)
|
|
144
144
|
return null;
|
|
145
|
-
if (typeof f.tag == "number" &&
|
|
145
|
+
if (typeof f.tag == "number" && x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof f == "function")
|
|
146
146
|
return f.displayName || f.name || null;
|
|
147
147
|
if (typeof f == "string")
|
|
148
148
|
return f;
|
|
@@ -164,19 +164,19 @@ function Hs() {
|
|
|
164
164
|
switch (f.$$typeof) {
|
|
165
165
|
case a:
|
|
166
166
|
var j = f;
|
|
167
|
-
return
|
|
167
|
+
return z(j) + ".Consumer";
|
|
168
168
|
case l:
|
|
169
169
|
var S = f;
|
|
170
|
-
return
|
|
170
|
+
return z(S._context) + ".Provider";
|
|
171
171
|
case u:
|
|
172
172
|
return b(f, f.render, "ForwardRef");
|
|
173
173
|
case d:
|
|
174
174
|
var T = f.displayName || null;
|
|
175
175
|
return T !== null ? T : k(f.type) || "Memo";
|
|
176
176
|
case p: {
|
|
177
|
-
var H = f,
|
|
177
|
+
var H = f, W = H._payload, O = H._init;
|
|
178
178
|
try {
|
|
179
|
-
return k(
|
|
179
|
+
return k(O(W));
|
|
180
180
|
} catch {
|
|
181
181
|
return null;
|
|
182
182
|
}
|
|
@@ -184,18 +184,18 @@ function Hs() {
|
|
|
184
184
|
}
|
|
185
185
|
return null;
|
|
186
186
|
}
|
|
187
|
-
var L = Object.assign, J = 0, q,
|
|
188
|
-
function
|
|
187
|
+
var L = Object.assign, J = 0, q, ce, le, de, V, se, oe;
|
|
188
|
+
function I() {
|
|
189
189
|
}
|
|
190
|
-
|
|
191
|
-
function
|
|
190
|
+
I.__reactDisabledLog = !0;
|
|
191
|
+
function ue() {
|
|
192
192
|
{
|
|
193
193
|
if (J === 0) {
|
|
194
|
-
q = console.log,
|
|
194
|
+
q = console.log, ce = console.info, le = console.warn, de = console.error, V = console.group, se = console.groupCollapsed, oe = console.groupEnd;
|
|
195
195
|
var f = {
|
|
196
196
|
configurable: !0,
|
|
197
197
|
enumerable: !0,
|
|
198
|
-
value:
|
|
198
|
+
value: I,
|
|
199
199
|
writable: !0
|
|
200
200
|
};
|
|
201
201
|
Object.defineProperties(console, {
|
|
@@ -224,29 +224,29 @@ function Hs() {
|
|
|
224
224
|
value: q
|
|
225
225
|
}),
|
|
226
226
|
info: L({}, f, {
|
|
227
|
-
value:
|
|
227
|
+
value: ce
|
|
228
228
|
}),
|
|
229
229
|
warn: L({}, f, {
|
|
230
|
-
value:
|
|
230
|
+
value: le
|
|
231
231
|
}),
|
|
232
232
|
error: L({}, f, {
|
|
233
|
-
value:
|
|
233
|
+
value: de
|
|
234
234
|
}),
|
|
235
235
|
group: L({}, f, {
|
|
236
|
-
value:
|
|
236
|
+
value: V
|
|
237
237
|
}),
|
|
238
238
|
groupCollapsed: L({}, f, {
|
|
239
|
-
value:
|
|
239
|
+
value: se
|
|
240
240
|
}),
|
|
241
241
|
groupEnd: L({}, f, {
|
|
242
|
-
value:
|
|
242
|
+
value: oe
|
|
243
243
|
})
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
|
-
J < 0 &&
|
|
246
|
+
J < 0 && x("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
|
-
var
|
|
249
|
+
var fe = y.ReactCurrentDispatcher, ke;
|
|
250
250
|
function xe(f, j, S) {
|
|
251
251
|
{
|
|
252
252
|
if (ke === void 0)
|
|
@@ -277,31 +277,31 @@ function Hs() {
|
|
|
277
277
|
je = !0;
|
|
278
278
|
var H = Error.prepareStackTrace;
|
|
279
279
|
Error.prepareStackTrace = void 0;
|
|
280
|
-
var
|
|
281
|
-
|
|
280
|
+
var W;
|
|
281
|
+
W = fe.current, fe.current = null, ue();
|
|
282
282
|
try {
|
|
283
283
|
if (j) {
|
|
284
|
-
var
|
|
284
|
+
var O = function() {
|
|
285
285
|
throw Error();
|
|
286
286
|
};
|
|
287
|
-
if (Object.defineProperty(
|
|
287
|
+
if (Object.defineProperty(O.prototype, "props", {
|
|
288
288
|
set: function() {
|
|
289
289
|
throw Error();
|
|
290
290
|
}
|
|
291
291
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
292
292
|
try {
|
|
293
|
-
Reflect.construct(
|
|
293
|
+
Reflect.construct(O, []);
|
|
294
294
|
} catch (Me) {
|
|
295
295
|
T = Me;
|
|
296
296
|
}
|
|
297
|
-
Reflect.construct(f, [],
|
|
297
|
+
Reflect.construct(f, [], O);
|
|
298
298
|
} else {
|
|
299
299
|
try {
|
|
300
|
-
|
|
300
|
+
O.call();
|
|
301
301
|
} catch (Me) {
|
|
302
302
|
T = Me;
|
|
303
303
|
}
|
|
304
|
-
f.call(
|
|
304
|
+
f.call(O.prototype);
|
|
305
305
|
}
|
|
306
306
|
} else {
|
|
307
307
|
try {
|
|
@@ -313,17 +313,17 @@ function Hs() {
|
|
|
313
313
|
}
|
|
314
314
|
} catch (Me) {
|
|
315
315
|
if (Me && T && typeof Me.stack == "string") {
|
|
316
|
-
for (var
|
|
317
|
-
`),
|
|
318
|
-
`), X =
|
|
316
|
+
for (var R = Me.stack.split(`
|
|
317
|
+
`), pe = T.stack.split(`
|
|
318
|
+
`), X = R.length - 1, te = pe.length - 1; X >= 1 && te >= 0 && R[X] !== pe[te]; )
|
|
319
319
|
te--;
|
|
320
320
|
for (; X >= 1 && te >= 0; X--, te--)
|
|
321
|
-
if (
|
|
321
|
+
if (R[X] !== pe[te]) {
|
|
322
322
|
if (X !== 1 || te !== 1)
|
|
323
323
|
do
|
|
324
|
-
if (X--, te--, te < 0 ||
|
|
324
|
+
if (X--, te--, te < 0 || R[X] !== pe[te]) {
|
|
325
325
|
var ye = `
|
|
326
|
-
` +
|
|
326
|
+
` + R[X].replace(" at new ", " at ");
|
|
327
327
|
return f.displayName && ye.includes("<anonymous>") && (ye = ye.replace("<anonymous>", f.displayName)), typeof f == "function" && be.set(f, ye), ye;
|
|
328
328
|
}
|
|
329
329
|
while (X >= 1 && te >= 0);
|
|
@@ -331,19 +331,19 @@ function Hs() {
|
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
} finally {
|
|
334
|
-
je = !1,
|
|
334
|
+
je = !1, fe.current = W, _e(), Error.prepareStackTrace = H;
|
|
335
335
|
}
|
|
336
|
-
var Oe = f ? f.displayName || f.name : "",
|
|
337
|
-
return typeof f == "function" && be.set(f,
|
|
336
|
+
var Oe = f ? f.displayName || f.name : "", pn = Oe ? xe(Oe) : "";
|
|
337
|
+
return typeof f == "function" && be.set(f, pn), pn;
|
|
338
338
|
}
|
|
339
|
-
function
|
|
339
|
+
function he(f, j, S) {
|
|
340
340
|
return re(f, !1);
|
|
341
341
|
}
|
|
342
342
|
function K(f) {
|
|
343
343
|
var j = f.prototype;
|
|
344
344
|
return !!(j && j.isReactComponent);
|
|
345
345
|
}
|
|
346
|
-
function
|
|
346
|
+
function ie(f, j, S) {
|
|
347
347
|
if (f == null)
|
|
348
348
|
return "";
|
|
349
349
|
if (typeof f == "function")
|
|
@@ -359,43 +359,43 @@ function Hs() {
|
|
|
359
359
|
if (typeof f == "object")
|
|
360
360
|
switch (f.$$typeof) {
|
|
361
361
|
case u:
|
|
362
|
-
return
|
|
362
|
+
return he(f.render);
|
|
363
363
|
case d:
|
|
364
|
-
return
|
|
364
|
+
return ie(f.type, j, S);
|
|
365
365
|
case p: {
|
|
366
|
-
var T = f, H = T._payload,
|
|
366
|
+
var T = f, H = T._payload, W = T._init;
|
|
367
367
|
try {
|
|
368
|
-
return
|
|
368
|
+
return ie(W(H), j, S);
|
|
369
369
|
} catch {
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
return "";
|
|
374
374
|
}
|
|
375
|
-
var ve = Object.prototype.hasOwnProperty,
|
|
375
|
+
var ve = Object.prototype.hasOwnProperty, Pe = {}, ze = y.ReactDebugCurrentFrame;
|
|
376
376
|
function Fe(f) {
|
|
377
377
|
if (f) {
|
|
378
|
-
var j = f._owner, S =
|
|
378
|
+
var j = f._owner, S = ie(f.type, f._source, j ? j.type : null);
|
|
379
379
|
ze.setExtraStackFrame(S);
|
|
380
380
|
} else
|
|
381
381
|
ze.setExtraStackFrame(null);
|
|
382
382
|
}
|
|
383
383
|
function et(f, j, S, T, H) {
|
|
384
384
|
{
|
|
385
|
-
var
|
|
386
|
-
for (var
|
|
387
|
-
if (
|
|
388
|
-
var
|
|
385
|
+
var W = Function.call.bind(ve);
|
|
386
|
+
for (var O in f)
|
|
387
|
+
if (W(f, O)) {
|
|
388
|
+
var R = void 0;
|
|
389
389
|
try {
|
|
390
|
-
if (typeof f[
|
|
391
|
-
var
|
|
392
|
-
throw
|
|
390
|
+
if (typeof f[O] != "function") {
|
|
391
|
+
var pe = Error((T || "React class") + ": " + S + " type `" + O + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof f[O] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
392
|
+
throw pe.name = "Invariant Violation", pe;
|
|
393
393
|
}
|
|
394
|
-
|
|
394
|
+
R = f[O](j, O, T, S, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
395
395
|
} catch (X) {
|
|
396
|
-
|
|
396
|
+
R = X;
|
|
397
397
|
}
|
|
398
|
-
|
|
398
|
+
R && !(R instanceof Error) && (Fe(H), x("%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).", T || "React class", S, O, typeof R), Fe(null)), R instanceof Error && !(R.message in Pe) && (Pe[R.message] = !0, Fe(H), x("Failed %s type: %s", S, R.message), Fe(null));
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
}
|
|
@@ -419,18 +419,18 @@ function Hs() {
|
|
|
419
419
|
function nt(f) {
|
|
420
420
|
return "" + f;
|
|
421
421
|
}
|
|
422
|
-
function
|
|
422
|
+
function an(f) {
|
|
423
423
|
if (tt(f))
|
|
424
|
-
return
|
|
424
|
+
return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Le(f)), nt(f);
|
|
425
425
|
}
|
|
426
|
-
var Ve = y.ReactCurrentOwner,
|
|
426
|
+
var Ve = y.ReactCurrentOwner, rs = {
|
|
427
427
|
key: !0,
|
|
428
428
|
ref: !0,
|
|
429
429
|
__self: !0,
|
|
430
430
|
__source: !0
|
|
431
|
-
},
|
|
431
|
+
}, on, cn, Tt;
|
|
432
432
|
Tt = {};
|
|
433
|
-
function
|
|
433
|
+
function as(f) {
|
|
434
434
|
if (ve.call(f, "ref")) {
|
|
435
435
|
var j = Object.getOwnPropertyDescriptor(f, "ref").get;
|
|
436
436
|
if (j && j.isReactWarning)
|
|
@@ -438,7 +438,7 @@ function Hs() {
|
|
|
438
438
|
}
|
|
439
439
|
return f.ref !== void 0;
|
|
440
440
|
}
|
|
441
|
-
function
|
|
441
|
+
function os(f) {
|
|
442
442
|
if (ve.call(f, "key")) {
|
|
443
443
|
var j = Object.getOwnPropertyDescriptor(f, "key").get;
|
|
444
444
|
if (j && j.isReactWarning)
|
|
@@ -446,16 +446,16 @@ function Hs() {
|
|
|
446
446
|
}
|
|
447
447
|
return f.key !== void 0;
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function is(f, j) {
|
|
450
450
|
if (typeof f.ref == "string" && Ve.current && j && Ve.current.stateNode !== j) {
|
|
451
451
|
var S = k(Ve.current.type);
|
|
452
|
-
Tt[S] || (
|
|
452
|
+
Tt[S] || (x('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', k(Ve.current.type), f.ref), Tt[S] = !0);
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function cs(f, j) {
|
|
456
456
|
{
|
|
457
457
|
var S = function() {
|
|
458
|
-
|
|
458
|
+
on || (on = !0, x("%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)", j));
|
|
459
459
|
};
|
|
460
460
|
S.isReactWarning = !0, Object.defineProperty(f, "key", {
|
|
461
461
|
get: S,
|
|
@@ -463,10 +463,10 @@ function Hs() {
|
|
|
463
463
|
});
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
function
|
|
466
|
+
function ls(f, j) {
|
|
467
467
|
{
|
|
468
468
|
var S = function() {
|
|
469
|
-
|
|
469
|
+
cn || (cn = !0, x("%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)", j));
|
|
470
470
|
};
|
|
471
471
|
S.isReactWarning = !0, Object.defineProperty(f, "ref", {
|
|
472
472
|
get: S,
|
|
@@ -474,67 +474,67 @@ function Hs() {
|
|
|
474
474
|
});
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
var
|
|
478
|
-
var
|
|
477
|
+
var ds = function(f, j, S, T, H, W, O) {
|
|
478
|
+
var R = {
|
|
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: f,
|
|
483
483
|
key: j,
|
|
484
484
|
ref: S,
|
|
485
|
-
props:
|
|
485
|
+
props: O,
|
|
486
486
|
// Record the component responsible for creating this element.
|
|
487
|
-
_owner:
|
|
487
|
+
_owner: W
|
|
488
488
|
};
|
|
489
|
-
return
|
|
489
|
+
return R._store = {}, Object.defineProperty(R._store, "validated", {
|
|
490
490
|
configurable: !1,
|
|
491
491
|
enumerable: !1,
|
|
492
492
|
writable: !0,
|
|
493
493
|
value: !1
|
|
494
|
-
}), Object.defineProperty(
|
|
494
|
+
}), Object.defineProperty(R, "_self", {
|
|
495
495
|
configurable: !1,
|
|
496
496
|
enumerable: !1,
|
|
497
497
|
writable: !1,
|
|
498
498
|
value: T
|
|
499
|
-
}), Object.defineProperty(
|
|
499
|
+
}), Object.defineProperty(R, "_source", {
|
|
500
500
|
configurable: !1,
|
|
501
501
|
enumerable: !1,
|
|
502
502
|
writable: !1,
|
|
503
503
|
value: H
|
|
504
|
-
}), Object.freeze && (Object.freeze(
|
|
504
|
+
}), Object.freeze && (Object.freeze(R.props), Object.freeze(R)), R;
|
|
505
505
|
};
|
|
506
|
-
function
|
|
506
|
+
function us(f, j, S, T, H) {
|
|
507
507
|
{
|
|
508
|
-
var
|
|
509
|
-
S !== void 0 && (
|
|
510
|
-
for (
|
|
511
|
-
ve.call(j,
|
|
508
|
+
var W, O = {}, R = null, pe = null;
|
|
509
|
+
S !== void 0 && (an(S), R = "" + S), os(j) && (an(j.key), R = "" + j.key), as(j) && (pe = j.ref, is(j, H));
|
|
510
|
+
for (W in j)
|
|
511
|
+
ve.call(j, W) && !rs.hasOwnProperty(W) && (O[W] = j[W]);
|
|
512
512
|
if (f && f.defaultProps) {
|
|
513
513
|
var X = f.defaultProps;
|
|
514
|
-
for (
|
|
515
|
-
|
|
514
|
+
for (W in X)
|
|
515
|
+
O[W] === void 0 && (O[W] = X[W]);
|
|
516
516
|
}
|
|
517
|
-
if (
|
|
517
|
+
if (R || pe) {
|
|
518
518
|
var te = typeof f == "function" ? f.displayName || f.name || "Unknown" : f;
|
|
519
|
-
|
|
519
|
+
R && cs(O, te), pe && ls(O, te);
|
|
520
520
|
}
|
|
521
|
-
return
|
|
521
|
+
return ds(f, R, pe, H, T, Ve.current, O);
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
|
-
var Mt = y.ReactCurrentOwner,
|
|
524
|
+
var Mt = y.ReactCurrentOwner, ln = y.ReactDebugCurrentFrame;
|
|
525
525
|
function Ie(f) {
|
|
526
526
|
if (f) {
|
|
527
|
-
var j = f._owner, S =
|
|
528
|
-
|
|
527
|
+
var j = f._owner, S = ie(f.type, f._source, j ? j.type : null);
|
|
528
|
+
ln.setExtraStackFrame(S);
|
|
529
529
|
} else
|
|
530
|
-
|
|
530
|
+
ln.setExtraStackFrame(null);
|
|
531
531
|
}
|
|
532
|
-
var
|
|
533
|
-
|
|
534
|
-
function
|
|
532
|
+
var Nt;
|
|
533
|
+
Nt = !1;
|
|
534
|
+
function Ct(f) {
|
|
535
535
|
return typeof f == "object" && f !== null && f.$$typeof === t;
|
|
536
536
|
}
|
|
537
|
-
function
|
|
537
|
+
function dn() {
|
|
538
538
|
{
|
|
539
539
|
if (Mt.current) {
|
|
540
540
|
var f = k(Mt.current.type);
|
|
@@ -546,7 +546,7 @@ Check the render method of \`` + f + "`.";
|
|
|
546
546
|
return "";
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
|
-
function
|
|
549
|
+
function ms(f) {
|
|
550
550
|
{
|
|
551
551
|
if (f !== void 0) {
|
|
552
552
|
var j = f.fileName.replace(/^.*[\\\/]/, ""), S = f.lineNumber;
|
|
@@ -557,10 +557,10 @@ Check your code at ` + j + ":" + S + ".";
|
|
|
557
557
|
return "";
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
|
-
var
|
|
561
|
-
function
|
|
560
|
+
var un = {};
|
|
561
|
+
function fs(f) {
|
|
562
562
|
{
|
|
563
|
-
var j =
|
|
563
|
+
var j = dn();
|
|
564
564
|
if (!j) {
|
|
565
565
|
var S = typeof f == "string" ? f : f.displayName || f.name;
|
|
566
566
|
S && (j = `
|
|
@@ -570,39 +570,39 @@ Check the top-level render call using <` + S + ">.");
|
|
|
570
570
|
return j;
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function mn(f, j) {
|
|
574
574
|
{
|
|
575
575
|
if (!f._store || f._store.validated || f.key != null)
|
|
576
576
|
return;
|
|
577
577
|
f._store.validated = !0;
|
|
578
|
-
var S =
|
|
579
|
-
if (
|
|
578
|
+
var S = fs(j);
|
|
579
|
+
if (un[S])
|
|
580
580
|
return;
|
|
581
|
-
|
|
581
|
+
un[S] = !0;
|
|
582
582
|
var T = "";
|
|
583
|
-
f && f._owner && f._owner !== Mt.current && (T = " It was passed a child from " + k(f._owner.type) + "."), Ie(f),
|
|
583
|
+
f && f._owner && f._owner !== Mt.current && (T = " It was passed a child from " + k(f._owner.type) + "."), Ie(f), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', S, T), Ie(null);
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
|
-
function
|
|
586
|
+
function fn(f, j) {
|
|
587
587
|
{
|
|
588
588
|
if (typeof f != "object")
|
|
589
589
|
return;
|
|
590
590
|
if (Ee(f))
|
|
591
591
|
for (var S = 0; S < f.length; S++) {
|
|
592
592
|
var T = f[S];
|
|
593
|
-
|
|
593
|
+
Ct(T) && mn(T, j);
|
|
594
594
|
}
|
|
595
|
-
else if (
|
|
595
|
+
else if (Ct(f))
|
|
596
596
|
f._store && (f._store.validated = !0);
|
|
597
597
|
else if (f) {
|
|
598
|
-
var H =
|
|
598
|
+
var H = w(f);
|
|
599
599
|
if (typeof H == "function" && H !== f.entries)
|
|
600
|
-
for (var
|
|
601
|
-
|
|
600
|
+
for (var W = H.call(f), O; !(O = W.next()).done; )
|
|
601
|
+
Ct(O.value) && mn(O.value, j);
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
|
-
function
|
|
605
|
+
function hs(f) {
|
|
606
606
|
{
|
|
607
607
|
var j = f.type;
|
|
608
608
|
if (j == null || typeof j == "string")
|
|
@@ -619,159 +619,159 @@ Check the top-level render call using <` + S + ">.");
|
|
|
619
619
|
if (S) {
|
|
620
620
|
var T = k(j);
|
|
621
621
|
et(S, f.props, "prop", T, f);
|
|
622
|
-
} else if (j.PropTypes !== void 0 && !
|
|
623
|
-
|
|
622
|
+
} else if (j.PropTypes !== void 0 && !Nt) {
|
|
623
|
+
Nt = !0;
|
|
624
624
|
var H = k(j);
|
|
625
|
-
|
|
625
|
+
x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", H || "Unknown");
|
|
626
626
|
}
|
|
627
|
-
typeof j.getDefaultProps == "function" && !j.getDefaultProps.isReactClassApproved &&
|
|
627
|
+
typeof j.getDefaultProps == "function" && !j.getDefaultProps.isReactClassApproved && x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
|
-
function
|
|
630
|
+
function ps(f) {
|
|
631
631
|
{
|
|
632
632
|
for (var j = Object.keys(f.props), S = 0; S < j.length; S++) {
|
|
633
633
|
var T = j[S];
|
|
634
634
|
if (T !== "children" && T !== "key") {
|
|
635
|
-
Ie(f),
|
|
635
|
+
Ie(f), x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", T), Ie(null);
|
|
636
636
|
break;
|
|
637
637
|
}
|
|
638
638
|
}
|
|
639
|
-
f.ref !== null && (Ie(f),
|
|
639
|
+
f.ref !== null && (Ie(f), x("Invalid attribute `ref` supplied to `React.Fragment`."), Ie(null));
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
|
-
function
|
|
642
|
+
function hn(f, j, S, T, H, W) {
|
|
643
643
|
{
|
|
644
|
-
var
|
|
645
|
-
if (!
|
|
646
|
-
var
|
|
647
|
-
(f === void 0 || typeof f == "object" && f !== null && Object.keys(f).length === 0) && (
|
|
648
|
-
var
|
|
649
|
-
|
|
644
|
+
var O = F(f);
|
|
645
|
+
if (!O) {
|
|
646
|
+
var R = "";
|
|
647
|
+
(f === void 0 || typeof f == "object" && f !== null && Object.keys(f).length === 0) && (R += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
648
|
+
var pe = ms(H);
|
|
649
|
+
pe ? R += pe : R += dn();
|
|
650
650
|
var X;
|
|
651
|
-
f === null ? X = "null" : Ee(f) ? X = "array" : f !== void 0 && f.$$typeof === t ? (X = "<" + (k(f.type) || "Unknown") + " />",
|
|
651
|
+
f === null ? X = "null" : Ee(f) ? X = "array" : f !== void 0 && f.$$typeof === t ? (X = "<" + (k(f.type) || "Unknown") + " />", R = " Did you accidentally export a JSX literal instead of a component?") : X = typeof f, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", X, R);
|
|
652
652
|
}
|
|
653
|
-
var te =
|
|
653
|
+
var te = us(f, j, S, H, W);
|
|
654
654
|
if (te == null)
|
|
655
655
|
return te;
|
|
656
|
-
if (
|
|
656
|
+
if (O) {
|
|
657
657
|
var ye = j.children;
|
|
658
658
|
if (ye !== void 0)
|
|
659
659
|
if (T)
|
|
660
660
|
if (Ee(ye)) {
|
|
661
661
|
for (var Oe = 0; Oe < ye.length; Oe++)
|
|
662
|
-
|
|
662
|
+
fn(ye[Oe], f);
|
|
663
663
|
Object.freeze && Object.freeze(ye);
|
|
664
664
|
} else
|
|
665
|
-
|
|
665
|
+
x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
666
666
|
else
|
|
667
|
-
|
|
667
|
+
fn(ye, f);
|
|
668
668
|
}
|
|
669
|
-
return f === r ?
|
|
669
|
+
return f === r ? ps(te) : hs(te), te;
|
|
670
670
|
}
|
|
671
671
|
}
|
|
672
|
-
function
|
|
673
|
-
return
|
|
672
|
+
function gs(f, j, S) {
|
|
673
|
+
return hn(f, j, S, !0);
|
|
674
674
|
}
|
|
675
|
-
function
|
|
676
|
-
return
|
|
675
|
+
function _s(f, j, S) {
|
|
676
|
+
return hn(f, j, S, !1);
|
|
677
677
|
}
|
|
678
|
-
var
|
|
679
|
-
Ge.Fragment = r, Ge.jsx =
|
|
678
|
+
var xs = _s, bs = gs;
|
|
679
|
+
Ge.Fragment = r, Ge.jsx = xs, Ge.jsxs = bs;
|
|
680
680
|
}()), Ge;
|
|
681
681
|
}
|
|
682
|
-
process.env.NODE_ENV === "production" ? Gt.exports =
|
|
682
|
+
process.env.NODE_ENV === "production" ? Gt.exports = Hs() : Gt.exports = Qs();
|
|
683
683
|
var s = Gt.exports;
|
|
684
|
-
const
|
|
685
|
-
const [e, t] =
|
|
684
|
+
const Us = () => {
|
|
685
|
+
const [e, t] = A(window.location.pathname), n = () => {
|
|
686
686
|
const r = window.location.pathname;
|
|
687
687
|
t(r);
|
|
688
688
|
};
|
|
689
|
-
return
|
|
689
|
+
return Y(() => (window.addEventListener("popstate", n), () => {
|
|
690
690
|
window.removeEventListener("popstate", n);
|
|
691
691
|
}), []), e;
|
|
692
692
|
}, Qe = (e, t) => {
|
|
693
693
|
const n = ae(!1);
|
|
694
|
-
|
|
694
|
+
Y(() => {
|
|
695
695
|
n.current ? e() : n.current = !0;
|
|
696
696
|
}, t);
|
|
697
697
|
};
|
|
698
|
-
function
|
|
698
|
+
function Ws(e, t, n) {
|
|
699
699
|
var r = this, o = ae(null), i = ae(0), l = ae(null), a = ae([]), u = ae(), c = ae(), m = ae(e), d = ae(!0);
|
|
700
700
|
m.current = e;
|
|
701
701
|
var p = typeof window < "u", h = !t && t !== 0 && p;
|
|
702
702
|
if (typeof e != "function")
|
|
703
703
|
throw new TypeError("Expected a function");
|
|
704
704
|
t = +t || 0;
|
|
705
|
-
var g = !!(n = n || {}).leading, v = !("trailing" in n) || !!n.trailing,
|
|
706
|
-
|
|
705
|
+
var g = !!(n = n || {}).leading, v = !("trailing" in n) || !!n.trailing, w = "maxWait" in n, y = "debounceOnServer" in n && !!n.debounceOnServer, x = w ? Math.max(+n.maxWait || 0, t) : null;
|
|
706
|
+
Y(function() {
|
|
707
707
|
return d.current = !0, function() {
|
|
708
708
|
d.current = !1;
|
|
709
709
|
};
|
|
710
710
|
}, []);
|
|
711
|
-
var
|
|
711
|
+
var _ = bt(function() {
|
|
712
712
|
var $ = function(F) {
|
|
713
|
-
var b = a.current,
|
|
714
|
-
return a.current = u.current = null, i.current = F, c.current = m.current.apply(
|
|
715
|
-
},
|
|
713
|
+
var b = a.current, z = u.current;
|
|
714
|
+
return a.current = u.current = null, i.current = F, c.current = m.current.apply(z, b);
|
|
715
|
+
}, N = function(F, b) {
|
|
716
716
|
h && cancelAnimationFrame(l.current), l.current = h ? requestAnimationFrame(F) : setTimeout(F, b);
|
|
717
|
-
},
|
|
717
|
+
}, D = function(F) {
|
|
718
718
|
if (!d.current)
|
|
719
719
|
return !1;
|
|
720
720
|
var b = F - o.current;
|
|
721
|
-
return !o.current || b >= t || b < 0 ||
|
|
722
|
-
},
|
|
721
|
+
return !o.current || b >= t || b < 0 || w && F - i.current >= x;
|
|
722
|
+
}, G = function(F) {
|
|
723
723
|
return l.current = null, v && a.current ? $(F) : (a.current = u.current = null, c.current);
|
|
724
|
-
},
|
|
724
|
+
}, B = function F() {
|
|
725
725
|
var b = Date.now();
|
|
726
|
-
if (
|
|
727
|
-
return
|
|
726
|
+
if (D(b))
|
|
727
|
+
return G(b);
|
|
728
728
|
if (d.current) {
|
|
729
|
-
var
|
|
730
|
-
|
|
729
|
+
var z = t - (b - o.current), k = w ? Math.min(z, x - (b - i.current)) : z;
|
|
730
|
+
N(F, k);
|
|
731
731
|
}
|
|
732
|
-
},
|
|
732
|
+
}, M = function() {
|
|
733
733
|
if (p || y) {
|
|
734
|
-
var F = Date.now(), b =
|
|
734
|
+
var F = Date.now(), b = D(F);
|
|
735
735
|
if (a.current = [].slice.call(arguments), u.current = r, o.current = F, b) {
|
|
736
736
|
if (!l.current && d.current)
|
|
737
|
-
return i.current = o.current,
|
|
738
|
-
if (
|
|
739
|
-
return
|
|
737
|
+
return i.current = o.current, N(B, t), g ? $(o.current) : c.current;
|
|
738
|
+
if (w)
|
|
739
|
+
return N(B, t), $(o.current);
|
|
740
740
|
}
|
|
741
|
-
return l.current ||
|
|
741
|
+
return l.current || N(B, t), c.current;
|
|
742
742
|
}
|
|
743
743
|
};
|
|
744
|
-
return
|
|
744
|
+
return M.cancel = function() {
|
|
745
745
|
l.current && (h ? cancelAnimationFrame(l.current) : clearTimeout(l.current)), i.current = 0, a.current = o.current = u.current = l.current = null;
|
|
746
|
-
},
|
|
746
|
+
}, M.isPending = function() {
|
|
747
747
|
return !!l.current;
|
|
748
|
-
},
|
|
749
|
-
return l.current ?
|
|
750
|
-
},
|
|
751
|
-
}, [g,
|
|
752
|
-
return
|
|
748
|
+
}, M.flush = function() {
|
|
749
|
+
return l.current ? G(Date.now()) : c.current;
|
|
750
|
+
}, M;
|
|
751
|
+
}, [g, w, t, x, v, h, p, y]);
|
|
752
|
+
return _;
|
|
753
753
|
}
|
|
754
|
-
function
|
|
754
|
+
function An(e, t, n) {
|
|
755
755
|
var r = n === void 0 ? {} : n, o = r.leading, i = r.trailing;
|
|
756
|
-
return
|
|
756
|
+
return Ws(e, t, { maxWait: t, leading: o === void 0 || o, trailing: i === void 0 || i });
|
|
757
757
|
}
|
|
758
|
-
let
|
|
758
|
+
let Pt;
|
|
759
759
|
const kt = (e = !0, t = !1, n = "window") => {
|
|
760
760
|
if (!e)
|
|
761
761
|
return;
|
|
762
|
-
const [r, o] =
|
|
762
|
+
const [r, o] = P.useState(0) || [!1, () => {
|
|
763
763
|
}];
|
|
764
|
-
|
|
765
|
-
clearTimeout(
|
|
764
|
+
Y(() => (a(), window.addEventListener("resize", u), () => {
|
|
765
|
+
clearTimeout(Pt), u.flush(), window.removeEventListener("resize", u);
|
|
766
766
|
}), n === "window" ? [] : [n]);
|
|
767
767
|
const l = () => {
|
|
768
768
|
if (n)
|
|
769
769
|
return n === "window" ? window.innerWidth : n.offsetWidth;
|
|
770
770
|
}, a = () => {
|
|
771
771
|
o(l());
|
|
772
|
-
}, u =
|
|
772
|
+
}, u = An(
|
|
773
773
|
() => {
|
|
774
|
-
l() !== r && (t && (clearTimeout(
|
|
774
|
+
l() !== r && (t && (clearTimeout(Pt), document.body.classList.add("is-resizing"), Pt = setTimeout(() => {
|
|
775
775
|
document.body.classList.remove("is-resizing");
|
|
776
776
|
}, 550)), a());
|
|
777
777
|
},
|
|
@@ -779,7 +779,7 @@ const kt = (e = !0, t = !1, n = "window") => {
|
|
|
779
779
|
{ leading: !0 }
|
|
780
780
|
);
|
|
781
781
|
return r;
|
|
782
|
-
},
|
|
782
|
+
}, zs = ({
|
|
783
783
|
scrollPosition: e = 0,
|
|
784
784
|
// The position on the page to scroll past
|
|
785
785
|
offset: t = { down: 0, up: 10 },
|
|
@@ -790,10 +790,10 @@ const kt = (e = !0, t = !1, n = "window") => {
|
|
|
790
790
|
}) => {
|
|
791
791
|
if (!window)
|
|
792
792
|
return;
|
|
793
|
-
const [o, i] =
|
|
794
|
-
}], [l, a] =
|
|
793
|
+
const [o, i] = P.useState({ current: 0, past: 0 }) || [!1, () => {
|
|
794
|
+
}], [l, a] = P.useState({ scrollDown: !1, scrollUp: !1 }) || [!1, () => {
|
|
795
795
|
}];
|
|
796
|
-
|
|
796
|
+
Y(() => (u(), window.addEventListener("scroll", c), () => {
|
|
797
797
|
c.flush(), window.removeEventListener("scroll", c);
|
|
798
798
|
}), []);
|
|
799
799
|
const u = () => {
|
|
@@ -803,11 +803,11 @@ const kt = (e = !0, t = !1, n = "window") => {
|
|
|
803
803
|
return;
|
|
804
804
|
}
|
|
805
805
|
Math.abs(p) >= t.up && !l.scrollUp && (r(), a({ scrollUp: !0, scrollDown: !1 }));
|
|
806
|
-
}, c =
|
|
806
|
+
}, c = An(() => {
|
|
807
807
|
u();
|
|
808
808
|
}, 250);
|
|
809
809
|
return o;
|
|
810
|
-
},
|
|
810
|
+
}, Vs = (e = [], t = !0) => {
|
|
811
811
|
e = Array.isArray(e) ? e : [e];
|
|
812
812
|
const n = ae(!1);
|
|
813
813
|
Qe(() => {
|
|
@@ -818,13 +818,13 @@ const kt = (e = !0, t = !1, n = "window") => {
|
|
|
818
818
|
r && (r.scrollIntoView(t ? { behavior: "smooth" } : null), n.current = !0);
|
|
819
819
|
}
|
|
820
820
|
}, e);
|
|
821
|
-
},
|
|
821
|
+
}, Fn = (e) => {
|
|
822
822
|
const t = [];
|
|
823
823
|
return e.forEach((n) => {
|
|
824
824
|
const r = parseInt(n);
|
|
825
825
|
isNaN(r) || t.push(r);
|
|
826
826
|
}), t.sort((n, r) => n - r);
|
|
827
|
-
},
|
|
827
|
+
}, Ln = (e, t, n) => {
|
|
828
828
|
let r = n.mobile;
|
|
829
829
|
for (const o in t) {
|
|
830
830
|
const i = parseInt(String(t[o]));
|
|
@@ -834,14 +834,14 @@ const kt = (e = !0, t = !1, n = "window") => {
|
|
|
834
834
|
break;
|
|
835
835
|
}
|
|
836
836
|
return r;
|
|
837
|
-
},
|
|
837
|
+
}, Ys = (e) => e.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`), Gs = (e, t = "en") => new Date(e).toLocaleString(t, { day: "numeric", month: "short" }), In = (e, t = "en") => new Date(e).toLocaleString(t, {
|
|
838
838
|
weekday: "long",
|
|
839
839
|
day: "numeric",
|
|
840
840
|
month: "short",
|
|
841
841
|
year: "numeric"
|
|
842
842
|
}), Jt = (e) => {
|
|
843
843
|
let i;
|
|
844
|
-
const l =
|
|
844
|
+
const l = xn(), a = xn(new Date(e));
|
|
845
845
|
try {
|
|
846
846
|
i = l.getTime() - a.getTime();
|
|
847
847
|
} catch {
|
|
@@ -854,7 +854,7 @@ const kt = (e = !0, t = !1, n = "window") => {
|
|
|
854
854
|
return { path: "days", number: c };
|
|
855
855
|
const m = Math.floor(c / 7);
|
|
856
856
|
return m <= 52 ? { path: "weeks", number: m } : { path: "years", number: Math.floor(c / 365) };
|
|
857
|
-
},
|
|
857
|
+
}, xn = (e) => {
|
|
858
858
|
const n = (e || /* @__PURE__ */ new Date()).toUTCString();
|
|
859
859
|
return new Date(n);
|
|
860
860
|
}, en = {
|
|
@@ -1174,35 +1174,35 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1174
1174
|
signup_success_text: "<p>Once we've vetted your application, you'll get a secure login link to help you get started.</p><p>Please note that trust is everything to our community, so you can't login until your identity has been verified.</p>",
|
|
1175
1175
|
tags_community: "From the community",
|
|
1176
1176
|
tooltip_loading: "Loading..."
|
|
1177
|
-
},
|
|
1177
|
+
}, Js = {
|
|
1178
1178
|
languageSwitcher_label: "Me gustaría leer este artículo en...",
|
|
1179
1179
|
languageSwitcher_translation_original: "idioma original",
|
|
1180
1180
|
languageSwitcher_translation_human: "traducido por un humano",
|
|
1181
1181
|
languageSwitcher_translation_machine: "traducido por máquina",
|
|
1182
1182
|
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>"
|
|
1183
|
-
},
|
|
1183
|
+
}, qs = {
|
|
1184
1184
|
collapsibleSection_summary: "En savoir plus",
|
|
1185
1185
|
languageSwitcher_label: "Je voudrais lire cet article dans...",
|
|
1186
1186
|
languageSwitcher_translation_original: "langue originale",
|
|
1187
1187
|
languageSwitcher_translation_human: "traduit par un humain",
|
|
1188
1188
|
languageSwitcher_translation_machine: "traduit par machine",
|
|
1189
1189
|
languageSwitcher_disclaimer: "Ce contenu est traduit automatiquement et contiendra d’évantuelles erreurs de genre ou d’autres traductions directes. Nous essayons de résoudre ce problème, mais en attendant, si vous remarquez une erreur importante, faites-le nous savoir à <link>{email}</link>"
|
|
1190
|
-
},
|
|
1190
|
+
}, Xs = {
|
|
1191
1191
|
languageSwitcher_label: "Eu gostaria de ler este artigo em...",
|
|
1192
1192
|
languageSwitcher_translation_original: "linguagem original",
|
|
1193
1193
|
languageSwitcher_translation_human: "traduzido por um humano",
|
|
1194
1194
|
languageSwitcher_translation_machine: "traduzido por máquina",
|
|
1195
1195
|
languageSwitcher_disclaimer: "Este conteúdo foi traduzido automaticamente e, ocasionalmente, poderão ocorrer erros de linguagem de gênero ou outras traduções diretas. Estamos tentando resolver isso, porém se perceber algo errado por favor nos avise em <link>{email}</link>"
|
|
1196
|
-
},
|
|
1196
|
+
}, Zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1197
1197
|
__proto__: null,
|
|
1198
1198
|
en,
|
|
1199
|
-
es:
|
|
1200
|
-
fr:
|
|
1201
|
-
pt:
|
|
1202
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1199
|
+
es: Js,
|
|
1200
|
+
fr: qs,
|
|
1201
|
+
pt: Xs
|
|
1202
|
+
}, Symbol.toStringTag, { value: "Module" })), On = (e) => e in en, $e = (e, t, n, r, o = {}) => {
|
|
1203
1203
|
let i = "";
|
|
1204
|
-
return
|
|
1205
|
-
},
|
|
1204
|
+
return On(`${t}_${n}`) ? i = e({ id: `${t}_${n}` }, o) : i = e({ id: t }, { [r]: n, ...o }), i;
|
|
1205
|
+
}, Ks = (e, t, n) => {
|
|
1206
1206
|
if (!e || e === 0)
|
|
1207
1207
|
return "0";
|
|
1208
1208
|
t || (t = 0), n || (n = ["k", "m", "b", "t"]);
|
|
@@ -1216,20 +1216,20 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1216
1216
|
}
|
|
1217
1217
|
}
|
|
1218
1218
|
return r;
|
|
1219
|
-
},
|
|
1219
|
+
}, er = (e = 0) => {
|
|
1220
1220
|
setTimeout(() => {
|
|
1221
1221
|
const t = document.querySelector(".splash-screen");
|
|
1222
1222
|
t && t.remove(), window.prerenderReady = !0;
|
|
1223
1223
|
}, e);
|
|
1224
|
-
},
|
|
1224
|
+
}, tr = (e) => e.replace(/\s+/g, "").length > 0, nr = (e, t) => {
|
|
1225
1225
|
Array.isArray(t) || (t = [t]);
|
|
1226
|
-
const n =
|
|
1226
|
+
const n = ks(e);
|
|
1227
1227
|
return t.forEach(({ type: r, value: o }) => {
|
|
1228
|
-
|
|
1228
|
+
js(n, r, o);
|
|
1229
1229
|
}), n;
|
|
1230
|
-
},
|
|
1230
|
+
}, sr = (e) => new Promise((t) => setTimeout(t, e)), ut = (e, t) => P.Children.map(e, (n) => P.cloneElement(n, {
|
|
1231
1231
|
...t
|
|
1232
|
-
})),
|
|
1232
|
+
})), U = ({
|
|
1233
1233
|
variant: e = "primary",
|
|
1234
1234
|
size: t = "medium",
|
|
1235
1235
|
styling: n = { muted: !1, fullWidth: !1 },
|
|
@@ -1245,8 +1245,8 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1245
1245
|
}) => {
|
|
1246
1246
|
const h = kt(typeof t == "object");
|
|
1247
1247
|
if (typeof t == "object" && typeof h == "number") {
|
|
1248
|
-
const
|
|
1249
|
-
t =
|
|
1248
|
+
const w = Object.assign({}, t), y = Fn(Object.keys(w));
|
|
1249
|
+
t = Ln(h, y, w);
|
|
1250
1250
|
}
|
|
1251
1251
|
const g = [];
|
|
1252
1252
|
typeof t == "string" && g.push(t), r && (g.push("icon"), typeof r == "object" ? (g.push(r.icon), r.position ? g.push(r.position) : g.push("left"), r.hover && g.push(`hover_${r.hover}`), r.animate && (g.push("animate"), typeof r.animate == "string" && g.push(r.animate))) : (g.push(r), !r.includes("right") && !r.includes("left") && g.push("left"))), n.muted && g.push("muted"), n.fullWidth && g.push("full-width");
|
|
@@ -1257,19 +1257,19 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1257
1257
|
disabled: u,
|
|
1258
1258
|
button: o
|
|
1259
1259
|
}),
|
|
1260
|
-
onClick: (
|
|
1261
|
-
(!o || o[0] === "#") && l && (
|
|
1260
|
+
onClick: (w) => {
|
|
1261
|
+
(!o || o[0] === "#") && l && (w.preventDefault(), w.stopPropagation()), l && l(w);
|
|
1262
1262
|
},
|
|
1263
1263
|
disabled: typeof u == "object" && "isClickable" in u ? !u.isClickable : u
|
|
1264
1264
|
};
|
|
1265
|
-
return o && (i = "a", v.href = o),
|
|
1265
|
+
return o && (i = "a", v.href = o), P.createElement(
|
|
1266
1266
|
i,
|
|
1267
1267
|
v,
|
|
1268
|
-
m || (c ? /* @__PURE__ */ s.jsx(
|
|
1268
|
+
m || (c ? /* @__PURE__ */ s.jsx(me, { showOnFocus: !1, children: c }) : null)
|
|
1269
1269
|
);
|
|
1270
1270
|
}, jt = ({ buttons: e, className: t = "", ...n }) => {
|
|
1271
|
-
const r = e.length > 1 ? "ul" : "p", o = e.map((i, l) => r === "p" ? /* @__PURE__ */ s.jsx(
|
|
1272
|
-
return
|
|
1271
|
+
const r = e.length > 1 ? "ul" : "p", o = e.map((i, l) => r === "p" ? /* @__PURE__ */ s.jsx(U, { ...i }, l) : /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(U, { ...i }) }, l));
|
|
1272
|
+
return P.createElement(r, { className: E("button-wrapper", t), ...n, children: o });
|
|
1273
1273
|
};
|
|
1274
1274
|
const Ue = ({ className: e = "", maxWidth: t = !1 }) => {
|
|
1275
1275
|
const n = t ? { "--max-width": `${t / 16}rem` } : {};
|
|
@@ -1296,8 +1296,8 @@ const Ue = ({ className: e = "", maxWidth: t = !1 }) => {
|
|
|
1296
1296
|
}
|
|
1297
1297
|
);
|
|
1298
1298
|
}
|
|
1299
|
-
return n ?
|
|
1300
|
-
},
|
|
1299
|
+
return n ? P.createElement(n, { children: t, className: r, ...a }) : t;
|
|
1300
|
+
}, bn = {
|
|
1301
1301
|
card: {
|
|
1302
1302
|
range: [
|
|
1303
1303
|
{
|
|
@@ -1400,23 +1400,23 @@ const Ue = ({ className: e = "", maxWidth: t = !1 }) => {
|
|
|
1400
1400
|
],
|
|
1401
1401
|
sizes: "(min-width: 1024px) 453px, 20vw"
|
|
1402
1402
|
}
|
|
1403
|
-
},
|
|
1403
|
+
}, rr = ({
|
|
1404
1404
|
aspect: e,
|
|
1405
1405
|
range: t,
|
|
1406
1406
|
sizes: n
|
|
1407
1407
|
}) => {
|
|
1408
|
-
const { range: r, sizes: o } = e ?
|
|
1408
|
+
const { range: r, sizes: o } = e ? bn[e] : bn.fallback;
|
|
1409
1409
|
return { range: t && t.length > 0 ? t : r, sizes: n || o };
|
|
1410
|
-
},
|
|
1410
|
+
}, ar = ({ format: e, height: t, query: n, width: r }) => {
|
|
1411
1411
|
let o = `w=${r}&h=${t}`;
|
|
1412
1412
|
return o = e ? `${o}&fm=${e}` : o, o = n ? `${o}&${n}` : o, o;
|
|
1413
|
-
},
|
|
1413
|
+
}, Dt = ({ format: e, range: t, url: n, query: r }) => t.map(({ height: o, width: i }) => `${n}?${ar({
|
|
1414
1414
|
format: e,
|
|
1415
1415
|
height: o,
|
|
1416
1416
|
query: r,
|
|
1417
1417
|
width: i
|
|
1418
1418
|
})} ${i}w`).join(", ");
|
|
1419
|
-
const
|
|
1419
|
+
const Bn = ({ image: e, className: t, testId: n }) => {
|
|
1420
1420
|
const {
|
|
1421
1421
|
description: r,
|
|
1422
1422
|
height: o,
|
|
@@ -1427,7 +1427,7 @@ const Qn = ({ image: e, className: t, testId: n }) => {
|
|
|
1427
1427
|
loading: c,
|
|
1428
1428
|
decoding: m,
|
|
1429
1429
|
fetchPriority: d
|
|
1430
|
-
} = e, { range: p, sizes: h } =
|
|
1430
|
+
} = e, { range: p, sizes: h } = rr(e), g = Dt({ format: "avif", query: l, range: p, url: a }), v = Dt({ format: "webp", query: l, range: p, url: a }), w = Dt({ format: "", query: l, range: p, url: a });
|
|
1431
1431
|
return /* @__PURE__ */ s.jsxs("picture", { className: t, children: [
|
|
1432
1432
|
i !== "image/gif" && /* @__PURE__ */ s.jsx(
|
|
1433
1433
|
"source",
|
|
@@ -1450,7 +1450,7 @@ const Qn = ({ image: e, className: t, testId: n }) => {
|
|
|
1450
1450
|
/* @__PURE__ */ s.jsx(
|
|
1451
1451
|
"img",
|
|
1452
1452
|
{
|
|
1453
|
-
srcSet:
|
|
1453
|
+
srcSet: w,
|
|
1454
1454
|
sizes: h,
|
|
1455
1455
|
src: a,
|
|
1456
1456
|
alt: r,
|
|
@@ -1465,9 +1465,9 @@ const Qn = ({ image: e, className: t, testId: n }) => {
|
|
|
1465
1465
|
] });
|
|
1466
1466
|
};
|
|
1467
1467
|
let Je = !1;
|
|
1468
|
-
const
|
|
1469
|
-
const r = C(), o = ae(null), [i, l] =
|
|
1470
|
-
|
|
1468
|
+
const or = ({ isOpen: e = !1, isLoading: t = !1, children: n }) => {
|
|
1469
|
+
const r = C(), o = ae(null), [i, l] = A("hidden");
|
|
1470
|
+
Y(() => {
|
|
1471
1471
|
const u = o.current;
|
|
1472
1472
|
if (u)
|
|
1473
1473
|
return u.addEventListener("transitionend", a), () => {
|
|
@@ -1486,7 +1486,7 @@ const ar = ({ isOpen: e = !1, isLoading: t = !1, children: n }) => {
|
|
|
1486
1486
|
}, [e]), /* @__PURE__ */ s.jsx("aside", { ref: o, className: E("tooltip text-medium", i, { loading: t }), hidden: i === "hidden", children: t ? /* @__PURE__ */ s.jsx("p", { children: r.formatMessage({ id: "tooltip_loading" }) }) : typeof n == "string" ? /* @__PURE__ */ s.jsx("p", { children: n }) : n });
|
|
1487
1487
|
};
|
|
1488
1488
|
const tn = ({ children: e, className: t = "", ...n }) => /* @__PURE__ */ s.jsx("section", { className: E("full-width-section", t), ...n, children: e });
|
|
1489
|
-
const
|
|
1489
|
+
const eo = ({ text: e, buttons: t, className: n = "" }) => {
|
|
1490
1490
|
const r = [];
|
|
1491
1491
|
return t.forEach((o) => {
|
|
1492
1492
|
r.push({
|
|
@@ -1500,11 +1500,11 @@ const Ka = ({ text: e, buttons: t, className: n = "" }) => {
|
|
|
1500
1500
|
children: o.text
|
|
1501
1501
|
});
|
|
1502
1502
|
}), /* @__PURE__ */ s.jsx(tn, { className: E("download-section", n), children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1503
|
-
|
|
1503
|
+
P.createElement(typeof e == "string" ? "h2" : e.element, { className: "text" }, typeof e == "string" ? e : e.text),
|
|
1504
1504
|
/* @__PURE__ */ s.jsx(jt, { buttons: r })
|
|
1505
1505
|
] }) });
|
|
1506
1506
|
};
|
|
1507
|
-
const
|
|
1507
|
+
const to = ({ title: e = !1, logos: t = [], className: n = "" }) => {
|
|
1508
1508
|
const r = t.length;
|
|
1509
1509
|
if (r === 0)
|
|
1510
1510
|
return null;
|
|
@@ -1513,7 +1513,7 @@ const eo = ({ title: e = !1, logos: t = [], className: n = "" }) => {
|
|
|
1513
1513
|
text: typeof e == "string" ? e : typeof e == "object" ? e.text : ""
|
|
1514
1514
|
};
|
|
1515
1515
|
return /* @__PURE__ */ s.jsxs("div", { className: E("logos", n), children: [
|
|
1516
|
-
e &&
|
|
1516
|
+
e && P.createElement(o.element, { className: "title" }, o.text),
|
|
1517
1517
|
/* @__PURE__ */ s.jsx(
|
|
1518
1518
|
"ul",
|
|
1519
1519
|
{
|
|
@@ -1549,7 +1549,7 @@ const eo = ({ title: e = !1, logos: t = [], className: n = "" }) => {
|
|
|
1549
1549
|
)
|
|
1550
1550
|
] });
|
|
1551
1551
|
};
|
|
1552
|
-
const
|
|
1552
|
+
const ir = [
|
|
1553
1553
|
"small",
|
|
1554
1554
|
"span",
|
|
1555
1555
|
"strong",
|
|
@@ -1563,7 +1563,7 @@ const or = [
|
|
|
1563
1563
|
"h6",
|
|
1564
1564
|
"blockquote",
|
|
1565
1565
|
"q"
|
|
1566
|
-
],
|
|
1566
|
+
], cr = ({
|
|
1567
1567
|
className: e = "",
|
|
1568
1568
|
content: t,
|
|
1569
1569
|
image: n,
|
|
@@ -1587,7 +1587,7 @@ const or = [
|
|
|
1587
1587
|
if (typeof t[d] == "object") {
|
|
1588
1588
|
m[d] = t[d];
|
|
1589
1589
|
const { text: p, element: h } = t[d];
|
|
1590
|
-
if (h &&
|
|
1590
|
+
if (h && ir.includes(h.toLowerCase()))
|
|
1591
1591
|
return;
|
|
1592
1592
|
m[d] = {
|
|
1593
1593
|
text: p,
|
|
@@ -1616,7 +1616,7 @@ const or = [
|
|
|
1616
1616
|
u.map((d) => {
|
|
1617
1617
|
if (m[d] && typeof m[d] == "object") {
|
|
1618
1618
|
const { text: p, element: h = "" } = m[d];
|
|
1619
|
-
return
|
|
1619
|
+
return P.createElement(
|
|
1620
1620
|
h.toLowerCase(),
|
|
1621
1621
|
{ key: d, className: d },
|
|
1622
1622
|
p
|
|
@@ -1626,7 +1626,7 @@ const or = [
|
|
|
1626
1626
|
}),
|
|
1627
1627
|
a,
|
|
1628
1628
|
l && l.text && l.link && /* @__PURE__ */ s.jsx(
|
|
1629
|
-
|
|
1629
|
+
U,
|
|
1630
1630
|
{
|
|
1631
1631
|
variant: n || r === "light" ? "primary" : "secondary",
|
|
1632
1632
|
size: { mobile: "medium", 768: "large" },
|
|
@@ -1636,12 +1636,12 @@ const or = [
|
|
|
1636
1636
|
}
|
|
1637
1637
|
)
|
|
1638
1638
|
] }),
|
|
1639
|
-
n && /* @__PURE__ */ s.jsx(
|
|
1639
|
+
n && /* @__PURE__ */ s.jsx(Bn, { image: { ...n, aspect: "banner" } })
|
|
1640
1640
|
] })
|
|
1641
1641
|
}
|
|
1642
1642
|
);
|
|
1643
|
-
},
|
|
1644
|
-
const
|
|
1643
|
+
}, no = We(cr);
|
|
1644
|
+
const so = ({
|
|
1645
1645
|
variant: e = "primary",
|
|
1646
1646
|
button: t = null,
|
|
1647
1647
|
title: n,
|
|
@@ -1650,7 +1650,7 @@ const no = ({
|
|
|
1650
1650
|
}) => !n && !r ? null : /* @__PURE__ */ s.jsxs("aside", { className: E("marketing-block", e), children: [
|
|
1651
1651
|
n && /* @__PURE__ */ s.jsx("p", { className: "title", children: n }),
|
|
1652
1652
|
r && /* @__PURE__ */ s.jsx("p", { children: r }),
|
|
1653
|
-
t && /* @__PURE__ */ s.jsx(
|
|
1653
|
+
t && /* @__PURE__ */ s.jsx(U, { variant: "secondary", size: "medium", href: t.link, className: "gtm-trackable", "data-gtm-event-context": o, "data-gtm-event-type": "learn-more-click", children: t.text })
|
|
1654
1654
|
] }), mt = "https://storage.googleapis.com/apolitical-assets/", Xe = {
|
|
1655
1655
|
general: "hello@apolitical.co",
|
|
1656
1656
|
support: "concierge@apolitical.co",
|
|
@@ -1658,8 +1658,8 @@ const no = ({
|
|
|
1658
1658
|
default: "dpo@apolitical.co",
|
|
1659
1659
|
eu: "dpo.agl@apolitical.foundation"
|
|
1660
1660
|
}
|
|
1661
|
-
},
|
|
1662
|
-
const
|
|
1661
|
+
}, ro = "200,000+";
|
|
1662
|
+
const Hn = ({ label: e = !1, className: t = "", children: n }) => {
|
|
1663
1663
|
const r = C();
|
|
1664
1664
|
return /* @__PURE__ */ s.jsxs("details", { className: E("collapsible-section", t), children: [
|
|
1665
1665
|
/* @__PURE__ */ s.jsx("summary", { children: e || r.formatMessage({ id: "collapsibleSection_summary" }) }),
|
|
@@ -1676,8 +1676,8 @@ const Et = ({
|
|
|
1676
1676
|
let o = n && !!Object.keys(n).length;
|
|
1677
1677
|
const i = typeof n == "object" && "breakpoints" in n, l = kt(i);
|
|
1678
1678
|
if (i && typeof n == "object" && typeof l == "number") {
|
|
1679
|
-
const d = Object.assign({}, n.breakpoints), p =
|
|
1680
|
-
o =
|
|
1679
|
+
const d = Object.assign({}, n.breakpoints), p = Fn(Object.keys(d));
|
|
1680
|
+
o = Ln(l, p, d);
|
|
1681
1681
|
}
|
|
1682
1682
|
const {
|
|
1683
1683
|
breakpoints: a,
|
|
@@ -1693,7 +1693,7 @@ const Et = ({
|
|
|
1693
1693
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1694
1694
|
t && /* @__PURE__ */ s.jsx(vt, { options: { forceBlock: !0 }, children: t }),
|
|
1695
1695
|
o && typeof n == "object" && (c || /* @__PURE__ */ s.jsx(
|
|
1696
|
-
|
|
1696
|
+
U,
|
|
1697
1697
|
{
|
|
1698
1698
|
...m,
|
|
1699
1699
|
variant: n.variant ? n.variant : "secondary",
|
|
@@ -1704,39 +1704,39 @@ const Et = ({
|
|
|
1704
1704
|
}
|
|
1705
1705
|
);
|
|
1706
1706
|
};
|
|
1707
|
-
const qt = ({ children: e, ...t }) => /* @__PURE__ */ s.jsx("p", { ...t, children: e }),
|
|
1707
|
+
const qt = ({ children: e, ...t }) => /* @__PURE__ */ s.jsx("p", { ...t, children: e }), Qn = { q: qt, blockquote: qt };
|
|
1708
1708
|
for (let e = 1; e <= 6; e++)
|
|
1709
|
-
|
|
1710
|
-
const
|
|
1709
|
+
Qn[`h${e}`] = { component: qt, props: { className: "title" } };
|
|
1710
|
+
const lr = ({ type: e = "default", className: t = "", heading: n = !1, children: r }) => /* @__PURE__ */ s.jsxs("div", { className: E("helper-text-box text-small", e, t), children: [
|
|
1711
1711
|
n && /* @__PURE__ */ s.jsx("p", { className: "title", children: n }),
|
|
1712
1712
|
typeof r == "string" ? /* @__PURE__ */ s.jsx(
|
|
1713
1713
|
vt,
|
|
1714
1714
|
{
|
|
1715
1715
|
options: {
|
|
1716
|
-
wrapper:
|
|
1716
|
+
wrapper: P.Fragment,
|
|
1717
1717
|
forceBlock: !0,
|
|
1718
|
-
overrides:
|
|
1718
|
+
overrides: Qn
|
|
1719
1719
|
},
|
|
1720
1720
|
children: r
|
|
1721
1721
|
}
|
|
1722
1722
|
) : /* @__PURE__ */ s.jsx("p", { children: r })
|
|
1723
1723
|
] });
|
|
1724
|
-
const
|
|
1725
|
-
const i = C(), l = ae(null), [a, u] =
|
|
1726
|
-
|
|
1724
|
+
const ao = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children: o }) => {
|
|
1725
|
+
const i = C(), l = ae(null), [a, u] = A(""), [c, m] = A("closed");
|
|
1726
|
+
Y(() => {
|
|
1727
1727
|
const h = l.current;
|
|
1728
1728
|
if (h)
|
|
1729
1729
|
return h.addEventListener("transitionend", d), () => {
|
|
1730
1730
|
h.removeEventListener("transitionend", d);
|
|
1731
1731
|
};
|
|
1732
|
-
}, []),
|
|
1732
|
+
}, []), Y(() => {
|
|
1733
1733
|
if (!r || typeof r != "string")
|
|
1734
1734
|
return;
|
|
1735
1735
|
const h = r.split(`
|
|
1736
1736
|
`);
|
|
1737
1737
|
u(h.length < 3 ? `${r.substring(0, 400)}...` : h.slice(0, 3).join(`
|
|
1738
1738
|
`));
|
|
1739
|
-
}, [r]),
|
|
1739
|
+
}, [r]), Y(() => {
|
|
1740
1740
|
c === "ready-to-close" && m("closing");
|
|
1741
1741
|
}, [c]);
|
|
1742
1742
|
const d = ({ propertyName: h }) => {
|
|
@@ -1751,7 +1751,7 @@ const ro = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1751
1751
|
c !== "closed" && o
|
|
1752
1752
|
] }),
|
|
1753
1753
|
/* @__PURE__ */ s.jsx("p", { className: "cta", children: /* @__PURE__ */ s.jsx(
|
|
1754
|
-
|
|
1754
|
+
U,
|
|
1755
1755
|
{
|
|
1756
1756
|
variant: "tertiary",
|
|
1757
1757
|
icon: { icon: "navigation_arrow", position: "left", animate: !0 },
|
|
@@ -1764,7 +1764,7 @@ const ro = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1764
1764
|
}
|
|
1765
1765
|
) })
|
|
1766
1766
|
] });
|
|
1767
|
-
},
|
|
1767
|
+
}, dr = () => P.Fragment, ur = ({ children: e }) => /* @__PURE__ */ s.jsx(Re, { variant: "secondary", children: e }), mr = ["span", "strong", "h1", "h2", "h3", "h4", "h5", "h6", "p"], fr = ({ children: e }) => {
|
|
1768
1768
|
const t = C();
|
|
1769
1769
|
if (!e)
|
|
1770
1770
|
return null;
|
|
@@ -1772,12 +1772,12 @@ const ro = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1772
1772
|
const r = [];
|
|
1773
1773
|
for (const i of Vt.toArray(e))
|
|
1774
1774
|
if (!(!i || typeof i == "string" || typeof i == "number"))
|
|
1775
|
-
if (
|
|
1775
|
+
if (P.isValidElement(i) && i.type === "summary") {
|
|
1776
1776
|
if (i.props && i.props.children) {
|
|
1777
1777
|
for (const l of Vt.toArray(i.props.children))
|
|
1778
|
-
if (!(!l || typeof l == "string" || typeof l == "number") &&
|
|
1778
|
+
if (!(!l || typeof l == "string" || typeof l == "number") && P.isValidElement(l)) {
|
|
1779
1779
|
const a = l.type;
|
|
1780
|
-
if (
|
|
1780
|
+
if (mr.includes(a)) {
|
|
1781
1781
|
for (n = l.props.children; typeof n != "string" && (Array.isArray(n) && n[0].props && n[0].props.children && n[0].props.children[0]); )
|
|
1782
1782
|
n = n[0].props.children[0];
|
|
1783
1783
|
break;
|
|
@@ -1788,14 +1788,14 @@ const ro = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1788
1788
|
r.push(i);
|
|
1789
1789
|
const o = n ? n.toString() : "";
|
|
1790
1790
|
return /* @__PURE__ */ s.jsx(
|
|
1791
|
-
|
|
1791
|
+
Hn,
|
|
1792
1792
|
{
|
|
1793
1793
|
label: o,
|
|
1794
1794
|
className: ["Sources", "Resources"].includes(o) ? "discrete-links" : "",
|
|
1795
1795
|
children: r.map((i) => i)
|
|
1796
1796
|
}
|
|
1797
1797
|
);
|
|
1798
|
-
},
|
|
1798
|
+
}, hr = ({ children: e, ...t }) => {
|
|
1799
1799
|
if (t.class)
|
|
1800
1800
|
switch (t.class) {
|
|
1801
1801
|
case "casestudy":
|
|
@@ -1809,57 +1809,57 @@ const ro = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1809
1809
|
return /* @__PURE__ */ s.jsx("div", { ...t, children: e });
|
|
1810
1810
|
}
|
|
1811
1811
|
return /* @__PURE__ */ s.jsx("div", { ...t, children: e });
|
|
1812
|
-
},
|
|
1812
|
+
}, pr = (e) => {
|
|
1813
1813
|
const t = C(), n = Date.now().toString();
|
|
1814
1814
|
let r = "default";
|
|
1815
1815
|
const o = e.src;
|
|
1816
1816
|
return o.includes("youtube") || o.includes("vimeo") ? r = "video" : o.includes("riddle") || o.includes("sli.do") ? r = "poll" : o.includes("padlet") && (r = "padlet"), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1817
|
-
/* @__PURE__ */ s.jsx(
|
|
1817
|
+
/* @__PURE__ */ s.jsx(me, { children: /* @__PURE__ */ s.jsx("a", { href: `#content-after-iframe-${n}`, children: t.formatMessage({ id: `markdown_skip${r === "default" ? "" : `_${r}`}` }) }) }),
|
|
1818
1818
|
/* @__PURE__ */ s.jsx("iframe", { ...e, title: t.formatMessage({ id: `markdown_iframe${r === "default" ? "" : `_${r}`}` }) }),
|
|
1819
1819
|
/* @__PURE__ */ s.jsx("span", { id: `content-after-iframe-${n}`, tabIndex: -1 })
|
|
1820
1820
|
] });
|
|
1821
|
-
},
|
|
1821
|
+
}, vn = (e) => {
|
|
1822
1822
|
let t = "";
|
|
1823
1823
|
return e && typeof e != "string" && typeof e != "number" && typeof e != "boolean" && "type" in e && (t = e.type), t;
|
|
1824
|
-
},
|
|
1824
|
+
}, gr = ({ children: e, ...t }) => {
|
|
1825
1825
|
let n = { ...t };
|
|
1826
1826
|
t.href && (t.href.includes("http:") || t.href.includes("https:")) && !t.target && (n.target = "_blank");
|
|
1827
1827
|
let r = e, o = !1;
|
|
1828
1828
|
for (const i of Vt.toArray(e))
|
|
1829
|
-
if (!(!i || typeof i == "string" || typeof i == "number") &&
|
|
1829
|
+
if (!(!i || typeof i == "string" || typeof i == "number") && P.isValidElement(i)) {
|
|
1830
1830
|
const l = i.type;
|
|
1831
1831
|
if (["button", "center", "span", "strong"].includes(l) && i.props && i.props.children && i.props.children[0])
|
|
1832
|
-
for ((l === "button" ||
|
|
1832
|
+
for ((l === "button" || vn(i.props.children[0]) === "button") && (o = !0), r = i.props.children[0]; r && typeof r != "string" && !(typeof r == "boolean" || typeof r == "number" || !P.isValidElement(r)); )
|
|
1833
1833
|
if (r.props && r.props.children && r.props.children[0])
|
|
1834
|
-
r = r.props.children[0], r &&
|
|
1834
|
+
r = r.props.children[0], r && vn(r) === "button" && (o = !0);
|
|
1835
1835
|
else
|
|
1836
1836
|
break;
|
|
1837
1837
|
}
|
|
1838
|
-
return o ? (n = { ...n, className: "button primary medium" }, /* @__PURE__ */ s.jsx("p", { className: "center", children: /* @__PURE__ */ s.jsx(
|
|
1839
|
-
},
|
|
1840
|
-
const
|
|
1838
|
+
return o ? (n = { ...n, className: "button primary medium" }, /* @__PURE__ */ s.jsx("p", { className: "center", children: /* @__PURE__ */ s.jsx(U, { variant: "primary", size: "medium", ...n, children: r }) })) : /* @__PURE__ */ s.jsx("a", { ...n, children: r });
|
|
1839
|
+
}, _r = ({ children: e }) => /* @__PURE__ */ s.jsx("span", { children: e });
|
|
1840
|
+
const wn = ({ className: e = "", options: t = {}, children: n }) => {
|
|
1841
1841
|
n = n.replace(/^<br\/?>/, "");
|
|
1842
1842
|
const r = {
|
|
1843
|
-
wrapper:
|
|
1843
|
+
wrapper: P.Fragment,
|
|
1844
1844
|
forceBlock: !0,
|
|
1845
1845
|
overrides: {
|
|
1846
|
-
a:
|
|
1846
|
+
a: gr,
|
|
1847
1847
|
// Override psuedo-code
|
|
1848
1848
|
// We give the content team psuedo-code short cuts to use in Contentful
|
|
1849
|
-
CollapsibleSection:
|
|
1849
|
+
CollapsibleSection: Hn,
|
|
1850
1850
|
TextBox: Re,
|
|
1851
|
-
CaseStudy:
|
|
1851
|
+
CaseStudy: ur,
|
|
1852
1852
|
// Override embedded HTML
|
|
1853
1853
|
// Our content team previously used real HTML, which we need to tear out and replace with React components
|
|
1854
|
-
style:
|
|
1855
|
-
details:
|
|
1856
|
-
div:
|
|
1857
|
-
iframe:
|
|
1854
|
+
style: dr,
|
|
1855
|
+
details: fr,
|
|
1856
|
+
div: hr,
|
|
1857
|
+
iframe: pr
|
|
1858
1858
|
}
|
|
1859
1859
|
};
|
|
1860
1860
|
return /* @__PURE__ */ s.jsx("div", { className: E("markdown-text", e), children: /* @__PURE__ */ s.jsx(vt, { options: { ...r, ...t }, children: n }) });
|
|
1861
1861
|
};
|
|
1862
|
-
const
|
|
1862
|
+
const xr = ({
|
|
1863
1863
|
maxWidth: e = !1,
|
|
1864
1864
|
title: t,
|
|
1865
1865
|
subtitle: n,
|
|
@@ -1869,8 +1869,8 @@ const _r = ({
|
|
|
1869
1869
|
const i = e ? { "--max-width": `${e / 16}rem` } : {};
|
|
1870
1870
|
return /* @__PURE__ */ s.jsxs("section", { className: E("page-heading", o), children: [
|
|
1871
1871
|
/* @__PURE__ */ s.jsxs("div", { className: E("content", { "has-max-width": e }), style: i, children: [
|
|
1872
|
-
t && t.text &&
|
|
1873
|
-
n && n.text &&
|
|
1872
|
+
t && t.text && P.createElement(t.element || "h1", { className: "title" }, t.text),
|
|
1873
|
+
n && n.text && P.createElement(
|
|
1874
1874
|
n.element || "h2",
|
|
1875
1875
|
{ className: "text-medium" },
|
|
1876
1876
|
n.text
|
|
@@ -1886,12 +1886,12 @@ const ft = ({
|
|
|
1886
1886
|
children: r,
|
|
1887
1887
|
...o
|
|
1888
1888
|
}) => /* @__PURE__ */ s.jsx("span", { className: E("pill", e, t, n), ...o, children: r });
|
|
1889
|
-
const Xt = ({ element: e = "p", children: t = null, className: n = "", ...r }) =>
|
|
1890
|
-
const
|
|
1889
|
+
const Xt = ({ element: e = "p", children: t = null, className: n = "", ...r }) => P.createElement(e, { ...r, className: E("status-banner text-small", n), "aria-live": "assertive" }, t);
|
|
1890
|
+
const br = ({ progress: e = 0, text: t = !1, className: n = "" }) => {
|
|
1891
1891
|
const r = C(), o = e > 75 ? 100 : e > 50 ? 75 : e > 25 ? 50 : e > 5 ? 25 : 0, i = { "--progress": `${e}%` };
|
|
1892
|
-
return /* @__PURE__ */ s.jsx("span", { className: E(`progress-bar section-${o}`, n), style: i, children: /* @__PURE__ */ s.jsx(
|
|
1893
|
-
},
|
|
1894
|
-
const Rt = "loadingBlock_",
|
|
1892
|
+
return /* @__PURE__ */ s.jsx("span", { className: E(`progress-bar section-${o}`, n), style: i, children: /* @__PURE__ */ s.jsx(me, { children: t ? `${e} ${t}` : r.formatMessage({ id: "progressBar" }, { number: e }) }) });
|
|
1893
|
+
}, vr = We(br);
|
|
1894
|
+
const Rt = "loadingBlock_", wr = ({ progress: e = 0, steps: t = !1, className: n = "" }) => {
|
|
1895
1895
|
const r = C();
|
|
1896
1896
|
t || (t = {
|
|
1897
1897
|
0: { text: r.formatMessage({ id: `${Rt}loading` }) },
|
|
@@ -1911,12 +1911,12 @@ const Rt = "loadingBlock_", vr = ({ progress: e = 0, steps: t = !1, className: n
|
|
|
1911
1911
|
style: l,
|
|
1912
1912
|
children: [
|
|
1913
1913
|
o && /* @__PURE__ */ s.jsx("span", { className: "step", children: t[o].text }),
|
|
1914
|
-
/* @__PURE__ */ s.jsx(
|
|
1914
|
+
/* @__PURE__ */ s.jsx(vr, { progress: e })
|
|
1915
1915
|
]
|
|
1916
1916
|
}
|
|
1917
1917
|
);
|
|
1918
|
-
},
|
|
1919
|
-
const Te = ({ element: e = "div", className: t = "", ...n }) => /* @__PURE__ */ s.jsx(
|
|
1918
|
+
}, oo = We(wr);
|
|
1919
|
+
const Te = ({ element: e = "div", className: t = "", ...n }) => /* @__PURE__ */ s.jsx(Rn, { element: e, className: E("loading-placeholder", t), ...n });
|
|
1920
1920
|
const Zt = {
|
|
1921
1921
|
header: ["logo", "link", "link", "search"],
|
|
1922
1922
|
sidebar: ["text", "text", "text", "text", "text"],
|
|
@@ -1934,11 +1934,11 @@ const Zt = {
|
|
|
1934
1934
|
"cards-section",
|
|
1935
1935
|
"footer"
|
|
1936
1936
|
]
|
|
1937
|
-
},
|
|
1937
|
+
}, Un = (e, t) => e in Zt ? /* @__PURE__ */ s.jsx("div", { className: e, children: Zt[e].map((n, r) => Un(n, r)) }, t) : /* @__PURE__ */ s.jsx(Te, { className: e }, t), io = ({ layout: e = "overview-page", ...t }) => /* @__PURE__ */ s.jsx("div", { className: E("loading-state", e), ...t, children: Zt[e].map((n, r) => Un(n, r)) }), Wn = (e) => {
|
|
1938
1938
|
const t = e && e.toUpperCase().split(" ");
|
|
1939
1939
|
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) : "";
|
|
1940
|
-
}, st = ["#5AB6A3", "#A2D7AF", "#806056", "#3962B3"],
|
|
1941
|
-
const t = Math.ceil(26 / st.length), n =
|
|
1940
|
+
}, st = ["#5AB6A3", "#A2D7AF", "#806056", "#3962B3"], kr = (e) => {
|
|
1941
|
+
const t = Math.ceil(26 / st.length), n = Wn(e).toLowerCase();
|
|
1942
1942
|
if (n === "")
|
|
1943
1943
|
return st[0];
|
|
1944
1944
|
const r = n.charCodeAt(0) - 96;
|
|
@@ -1946,17 +1946,17 @@ const Zt = {
|
|
|
1946
1946
|
if (r <= t * (o + 1))
|
|
1947
1947
|
return st[o];
|
|
1948
1948
|
};
|
|
1949
|
-
const
|
|
1949
|
+
const kn = 256, Ke = ({
|
|
1950
1950
|
className: e = "",
|
|
1951
1951
|
src: t = "",
|
|
1952
1952
|
name: n,
|
|
1953
1953
|
alt: r,
|
|
1954
|
-
width: o =
|
|
1955
|
-
height: i =
|
|
1954
|
+
width: o = kn,
|
|
1955
|
+
height: i = kn,
|
|
1956
1956
|
...l
|
|
1957
1957
|
}) => {
|
|
1958
|
-
const [a, u] =
|
|
1959
|
-
|
|
1958
|
+
const [a, u] = A(!1), c = ae(null);
|
|
1959
|
+
Y(() => {
|
|
1960
1960
|
const d = c.current;
|
|
1961
1961
|
if (!d)
|
|
1962
1962
|
return;
|
|
@@ -1964,7 +1964,7 @@ const jn = 256, Ke = ({
|
|
|
1964
1964
|
if (!p)
|
|
1965
1965
|
return;
|
|
1966
1966
|
const h = o, g = i;
|
|
1967
|
-
typeof window < "u" && window.devicePixelRatio && (d.width = h * window.devicePixelRatio, d.height = g * window.devicePixelRatio, p.scale(window.devicePixelRatio, window.devicePixelRatio)), p.fillStyle =
|
|
1967
|
+
typeof window < "u" && window.devicePixelRatio && (d.width = h * window.devicePixelRatio, d.height = g * window.devicePixelRatio, p.scale(window.devicePixelRatio, window.devicePixelRatio)), p.fillStyle = kr(n), p.fillRect(0, 0, h, g), p.font = `${h / 3}px Arial`, p.textAlign = "center", p.fillStyle = "white", p.fillText(Wn(n), h / 2, g / 1.6);
|
|
1968
1968
|
}, [n]);
|
|
1969
1969
|
let m = !1;
|
|
1970
1970
|
return t && t !== "" && !a && (t.includes("http") || t.includes("//")) && (m = !0), /* @__PURE__ */ s.jsx(
|
|
@@ -1986,7 +1986,7 @@ const jn = 256, Ke = ({
|
|
|
1986
1986
|
) : /* @__PURE__ */ s.jsx("canvas", { ref: c })
|
|
1987
1987
|
}
|
|
1988
1988
|
);
|
|
1989
|
-
},
|
|
1989
|
+
}, zn = (e) => e === "apolitical" ? {
|
|
1990
1990
|
image: `${mt}logos/member_apolitical.svg`
|
|
1991
1991
|
} : e === "community" || typeof e == "object" && !e.name ? {
|
|
1992
1992
|
image: `${mt}logos/member_community.svg`
|
|
@@ -1997,7 +1997,7 @@ const jn = 256, Ke = ({
|
|
|
1997
1997
|
country: e.location && e.location.country || "",
|
|
1998
1998
|
url: `/profiles/${e.id}`,
|
|
1999
1999
|
image: e.image && e.image.thumbnail
|
|
2000
|
-
},
|
|
2000
|
+
}, jr = ({
|
|
2001
2001
|
role: e = "",
|
|
2002
2002
|
organisation: t = "",
|
|
2003
2003
|
country: n = "",
|
|
@@ -2018,10 +2018,10 @@ const nn = ({
|
|
|
2018
2018
|
gtmType: o = "member-click",
|
|
2019
2019
|
className: i = ""
|
|
2020
2020
|
}) => {
|
|
2021
|
-
const l = C(), a =
|
|
2021
|
+
const l = C(), a = zn(t);
|
|
2022
2022
|
a.name || (a.name = l.formatMessage({ id: `member_${typeof t == "string" ? t : "community"}` }));
|
|
2023
|
-
const { name: u, url: c, image: m } = a, d =
|
|
2024
|
-
return
|
|
2023
|
+
const { name: u, url: c, image: m } = a, d = jr(a), p = n && n.createdAt ? Jt(n.createdAt) : !1, h = n && n.createdAt ? In(n.createdAt) : "";
|
|
2024
|
+
return P.createElement(e, {
|
|
2025
2025
|
className: E("member text-medium", i),
|
|
2026
2026
|
children: /* @__PURE__ */ s.jsxs(
|
|
2027
2027
|
yt,
|
|
@@ -2047,10 +2047,10 @@ const nn = ({
|
|
|
2047
2047
|
)
|
|
2048
2048
|
});
|
|
2049
2049
|
};
|
|
2050
|
-
const
|
|
2050
|
+
const jn = {
|
|
2051
2051
|
small: 24,
|
|
2052
2052
|
medium: 48
|
|
2053
|
-
},
|
|
2053
|
+
}, Vn = ({
|
|
2054
2054
|
element: e = "div",
|
|
2055
2055
|
contributors: { total: t, data: n } = { total: void 0, data: [] },
|
|
2056
2056
|
styling: { showText: r, size: o, showGap: i, showPlaceholders: l } = {
|
|
@@ -2064,23 +2064,23 @@ const yn = {
|
|
|
2064
2064
|
...c
|
|
2065
2065
|
}) => {
|
|
2066
2066
|
const m = C();
|
|
2067
|
-
return !n || n.length === 0 ? null :
|
|
2067
|
+
return !n || n.length === 0 ? null : P.createElement(e, {
|
|
2068
2068
|
...c,
|
|
2069
2069
|
className: E("contributors", u, o, { "has-gap": i }),
|
|
2070
2070
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2071
2071
|
/* @__PURE__ */ s.jsx("ul", { children: n.map((d, p) => {
|
|
2072
2072
|
let h, g = "";
|
|
2073
2073
|
if (p < a) {
|
|
2074
|
-
const { name: v = "", image:
|
|
2074
|
+
const { name: v = "", image: w = "" } = zn(d);
|
|
2075
2075
|
if (l)
|
|
2076
2076
|
return /* @__PURE__ */ s.jsx(Te, { element: "li", className: "contributor" }, p);
|
|
2077
2077
|
h = /* @__PURE__ */ s.jsx(
|
|
2078
2078
|
Ke,
|
|
2079
2079
|
{
|
|
2080
2080
|
name: v,
|
|
2081
|
-
src:
|
|
2082
|
-
width:
|
|
2083
|
-
height:
|
|
2081
|
+
src: w,
|
|
2082
|
+
width: jn[o || "medium"],
|
|
2083
|
+
height: jn[o || "medium"]
|
|
2084
2084
|
}
|
|
2085
2085
|
);
|
|
2086
2086
|
} else if (p === a) {
|
|
@@ -2091,7 +2091,7 @@ const yn = {
|
|
|
2091
2091
|
className: E({ "large-number": v > 99 }),
|
|
2092
2092
|
children: [
|
|
2093
2093
|
"+",
|
|
2094
|
-
|
|
2094
|
+
Ks(v, 0)
|
|
2095
2095
|
]
|
|
2096
2096
|
}
|
|
2097
2097
|
), g = "number-left";
|
|
@@ -2101,8 +2101,8 @@ const yn = {
|
|
|
2101
2101
|
r && /* @__PURE__ */ s.jsx("span", { className: "label", children: typeof r == "string" ? r : n.length === 1 ? typeof n[0] == "string" ? m.formatMessage({ id: `member_${n[0]}` }) : He(n[0].name || "", 20) : null })
|
|
2102
2102
|
] })
|
|
2103
2103
|
});
|
|
2104
|
-
},
|
|
2105
|
-
const n = new
|
|
2104
|
+
}, yr = ({ showDevTools: e = !0, children: t }) => {
|
|
2105
|
+
const n = new Ss({
|
|
2106
2106
|
// default options we would like on all queries can be overridden individually
|
|
2107
2107
|
defaultOptions: {
|
|
2108
2108
|
queries: {
|
|
@@ -2113,20 +2113,20 @@ const yn = {
|
|
|
2113
2113
|
}
|
|
2114
2114
|
}
|
|
2115
2115
|
});
|
|
2116
|
-
return /* @__PURE__ */ s.jsxs(
|
|
2116
|
+
return /* @__PURE__ */ s.jsxs($s, { client: n, children: [
|
|
2117
2117
|
t,
|
|
2118
|
-
e && /* @__PURE__ */ s.jsx(
|
|
2118
|
+
e && /* @__PURE__ */ s.jsx(Ns, { initialIsOpen: !1 })
|
|
2119
2119
|
] });
|
|
2120
2120
|
};
|
|
2121
|
-
var
|
|
2122
|
-
function
|
|
2121
|
+
var Er = Kt({ client: dt });
|
|
2122
|
+
function Sr(e) {
|
|
2123
2123
|
var t = e.children, n = e.client, r = e.apiKey, o = e.options, i = bt(function() {
|
|
2124
2124
|
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 && o && 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 && (dt.__loaded && console.warn("[PostHog.js] was already loaded elsewhere. This may cause issues."), dt.init(r, o)), dt);
|
|
2125
2125
|
}, [n, r]);
|
|
2126
|
-
return
|
|
2126
|
+
return P.createElement(Er.Provider, { value: { client: i } }, t);
|
|
2127
2127
|
}
|
|
2128
|
-
const
|
|
2129
|
-
|
|
2128
|
+
const $r = ({ children: e, user: t }) => t.isLoading ? null : process.env.REACT_APP_PUBLIC_POSTHOG_KEY ? /* @__PURE__ */ s.jsx(
|
|
2129
|
+
Sr,
|
|
2130
2130
|
{
|
|
2131
2131
|
apiKey: atob(process.env.REACT_APP_PUBLIC_POSTHOG_KEY),
|
|
2132
2132
|
options: {
|
|
@@ -2142,34 +2142,34 @@ const Sr = ({ children: e, user: t }) => t.isLoading ? null : process.env.REACT_
|
|
|
2142
2142
|
},
|
|
2143
2143
|
children: e
|
|
2144
2144
|
}
|
|
2145
|
-
) : e,
|
|
2145
|
+
) : e, Tr = ({ children: e, locale: t, messages: n }) => {
|
|
2146
2146
|
const r = t || "en", o = {
|
|
2147
|
-
...
|
|
2147
|
+
...Zs[r],
|
|
2148
2148
|
...n || {}
|
|
2149
2149
|
};
|
|
2150
|
-
return /* @__PURE__ */ s.jsx(
|
|
2150
|
+
return /* @__PURE__ */ s.jsx(ys, { locale: r, messages: o, children: e });
|
|
2151
2151
|
}, Se = Kt({ isLoading: !0 });
|
|
2152
|
-
function
|
|
2152
|
+
function Mr() {
|
|
2153
2153
|
return we(Se);
|
|
2154
2154
|
}
|
|
2155
|
-
const
|
|
2156
|
-
const [r, o] =
|
|
2157
|
-
return
|
|
2155
|
+
const Nr = ({ children: e, user: t }) => /* @__PURE__ */ s.jsx(Se.Provider, { value: t, children: e }), co = ({ bootstrap: e, children: t, intl: n }) => {
|
|
2156
|
+
const [r, o] = A({ isLoading: !0 });
|
|
2157
|
+
return Y(() => {
|
|
2158
2158
|
e().then((i) => {
|
|
2159
|
-
o({ ...i, isLoading: !1 }),
|
|
2159
|
+
o({ ...i, isLoading: !1 }), er(5e3);
|
|
2160
2160
|
}).catch(() => o({ isLoading: !1 }));
|
|
2161
|
-
}, []), /* @__PURE__ */ s.jsx(
|
|
2161
|
+
}, []), /* @__PURE__ */ s.jsx(Tr, { locale: n == null ? void 0 : n.locale, messages: n == null ? void 0 : n.messages, children: /* @__PURE__ */ s.jsx(Cs, { children: /* @__PURE__ */ s.jsx(Nr, { user: r, children: /* @__PURE__ */ s.jsx(yr, { children: /* @__PURE__ */ s.jsx($r, { user: r, children: t }) }) }) }) });
|
|
2162
2162
|
};
|
|
2163
|
-
const At = "joinCommunityButton",
|
|
2163
|
+
const At = "joinCommunityButton", Yn = ({ isMember: e = !1, isShort: t = !1, functions: { join: n, leave: r } = { join: () => {
|
|
2164
2164
|
}, leave: () => {
|
|
2165
2165
|
} } }) => {
|
|
2166
|
-
const o = C(), i = we(Se), l = i && typeof i.id == "string", [a, u] =
|
|
2167
|
-
|
|
2166
|
+
const o = C(), i = we(Se), l = i && typeof i.id == "string", [a, u] = A(e), [c, m] = A(e ? "joined" : "notJoined");
|
|
2167
|
+
Y(() => {
|
|
2168
2168
|
c === "joining" ? m("joined") : c === "leaving" && m("notJoined");
|
|
2169
2169
|
}, [a]);
|
|
2170
2170
|
const d = {}, p = {};
|
|
2171
2171
|
return a && c !== "leaving" && (d["data-hover-text"] = o.formatMessage({ id: `${At}_leave` }), d["aria-label"] = o.formatMessage({ id: `${At}_member_aria` }), p["aria-hidden"] = "true"), /* @__PURE__ */ s.jsx(
|
|
2172
|
-
|
|
2172
|
+
U,
|
|
2173
2173
|
{
|
|
2174
2174
|
variant: a ? "secondary" : "primary",
|
|
2175
2175
|
size: "medium",
|
|
@@ -2185,7 +2185,7 @@ const At = "joinCommunityButton", Jn = ({ isMember: e = !1, isShort: t = !1, fun
|
|
|
2185
2185
|
}
|
|
2186
2186
|
);
|
|
2187
2187
|
};
|
|
2188
|
-
const Ft = "communityDetails_",
|
|
2188
|
+
const Ft = "communityDetails_", lo = ({
|
|
2189
2189
|
className: e = "",
|
|
2190
2190
|
isMember: t = !1,
|
|
2191
2191
|
slug: n,
|
|
@@ -2204,7 +2204,7 @@ const Ft = "communityDetails_", co = ({
|
|
|
2204
2204
|
!d && /* @__PURE__ */ s.jsx("p", { className: "text-small", children: /* @__PURE__ */ s.jsx("a", { href: `/communities/${n}/members`, children: a.formatMessage({ id: `${Ft}viewAll` }) }) })
|
|
2205
2205
|
] }),
|
|
2206
2206
|
/* @__PURE__ */ s.jsx(
|
|
2207
|
-
|
|
2207
|
+
Vn,
|
|
2208
2208
|
{
|
|
2209
2209
|
contributors: {
|
|
2210
2210
|
total: r,
|
|
@@ -2219,9 +2219,9 @@ const Ft = "communityDetails_", co = ({
|
|
|
2219
2219
|
}
|
|
2220
2220
|
)
|
|
2221
2221
|
] }),
|
|
2222
|
-
/* @__PURE__ */ s.jsx(
|
|
2222
|
+
/* @__PURE__ */ s.jsx(Yn, { isMember: t, functions: { ...l } }),
|
|
2223
2223
|
t && /* @__PURE__ */ s.jsx(
|
|
2224
|
-
|
|
2224
|
+
U,
|
|
2225
2225
|
{
|
|
2226
2226
|
variant: "primary",
|
|
2227
2227
|
onClick: i,
|
|
@@ -2232,21 +2232,21 @@ const Ft = "communityDetails_", co = ({
|
|
|
2232
2232
|
)
|
|
2233
2233
|
] });
|
|
2234
2234
|
};
|
|
2235
|
-
const
|
|
2235
|
+
const uo = ({
|
|
2236
2236
|
breadcrumbs: e,
|
|
2237
2237
|
cutoff: t = 20,
|
|
2238
2238
|
className: n = ""
|
|
2239
2239
|
}) => {
|
|
2240
2240
|
const r = C();
|
|
2241
2241
|
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2242
|
-
/* @__PURE__ */ s.jsx(
|
|
2242
|
+
/* @__PURE__ */ s.jsx(me, { element: "p", children: r.formatMessage({ id: "breadcrumbs_label" }) }),
|
|
2243
2243
|
/* @__PURE__ */ s.jsx("ul", { className: E("breadcrumbs text-small", n), children: e.map(({ text: o, href: i, current: l = !1 }, a) => /* @__PURE__ */ s.jsxs("li", { children: [
|
|
2244
|
-
l && /* @__PURE__ */ s.jsx(
|
|
2244
|
+
l && /* @__PURE__ */ s.jsx(me, { element: "span", children: r.formatMessage({ id: "breadcrumbs_currentPage" }) }),
|
|
2245
2245
|
/* @__PURE__ */ s.jsx(yt, { href: l ? void 0 : i, children: He(o, t) })
|
|
2246
2246
|
] }, `${window.btoa(o)}_${a}`)) })
|
|
2247
2247
|
] });
|
|
2248
2248
|
};
|
|
2249
|
-
const
|
|
2249
|
+
const mo = ({
|
|
2250
2250
|
options: e,
|
|
2251
2251
|
allOption: t = !1,
|
|
2252
2252
|
allowMultiple: n = !0,
|
|
@@ -2254,7 +2254,7 @@ const uo = ({
|
|
|
2254
2254
|
},
|
|
2255
2255
|
className: o = ""
|
|
2256
2256
|
}) => {
|
|
2257
|
-
const i = C(), l = t ? [{ id: "all", text: typeof t != "boolean" && t.text || i.formatMessage({ id: "filters_all" }) }, ...e] : e, [a, u] =
|
|
2257
|
+
const i = C(), l = t ? [{ id: "all", text: typeof t != "boolean" && t.text || i.formatMessage({ id: "filters_all" }) }, ...e] : e, [a, u] = A(t ? ["all"] : []), c = (m, d) => {
|
|
2258
2258
|
let p = [];
|
|
2259
2259
|
a.includes(m) ? p = a.filter((h) => h !== m) : m === "all" ? p = ["all"] : n ? p = [...a.filter((h) => h !== "all"), m] : p = [m], u((h) => (r && typeof r == "function" && r({ current: p, previous: h }), p)), d && typeof d == "function" && d();
|
|
2260
2260
|
};
|
|
@@ -2282,7 +2282,7 @@ const uo = ({
|
|
|
2282
2282
|
i === "before-lang" ? r += `/${o}` : (r.includes(`/${n}/`) || (r += `/${n}`), r += `/${o}`);
|
|
2283
2283
|
}), r.includes(`/${n}/`) || (r += `/${n}`), r;
|
|
2284
2284
|
};
|
|
2285
|
-
const Lt = { en: "English", es: "Español", fr: "Français", pt: "Português" }, rt = "languageSwitcher_",
|
|
2285
|
+
const Lt = { en: "English", es: "Español", fr: "Français", pt: "Português" }, rt = "languageSwitcher_", fo = ({
|
|
2286
2286
|
currentLanguage: e,
|
|
2287
2287
|
isOriginalLanguage: t = !1,
|
|
2288
2288
|
isHumanTranslation: n = !1,
|
|
@@ -2294,8 +2294,8 @@ const Lt = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2294
2294
|
label: a,
|
|
2295
2295
|
className: u = ""
|
|
2296
2296
|
}) => {
|
|
2297
|
-
const c = C(), [m, d] =
|
|
2298
|
-
if (
|
|
2297
|
+
const c = C(), [m, d] = A(e);
|
|
2298
|
+
if (Y(() => {
|
|
2299
2299
|
e !== m && d(e);
|
|
2300
2300
|
}, [e]), !r || !Object.values(r).some((v) => v && v.post_name))
|
|
2301
2301
|
return null;
|
|
@@ -2306,14 +2306,14 @@ const Lt = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2306
2306
|
/* @__PURE__ */ s.jsx("ul", { children: h.map((v) => {
|
|
2307
2307
|
if (!Lt[v])
|
|
2308
2308
|
return null;
|
|
2309
|
-
let
|
|
2310
|
-
return m === v ?
|
|
2311
|
-
...
|
|
2309
|
+
let w = { className: v };
|
|
2310
|
+
return m === v ? w["aria-label"] = c.formatMessage({ id: `${rt}selected` }, { language: Lt[v] }) : w = {
|
|
2311
|
+
...w,
|
|
2312
2312
|
href: Cr(v, i),
|
|
2313
2313
|
onClick: (y) => {
|
|
2314
2314
|
y.preventDefault(), y.stopPropagation(), d(v), o(v);
|
|
2315
2315
|
}
|
|
2316
|
-
}, /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(yt, { ...
|
|
2316
|
+
}, /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(yt, { ...w, fallbackElement: "span", children: Lt[v] }) }, v);
|
|
2317
2317
|
}) }),
|
|
2318
2318
|
l !== "short" && !g && /* @__PURE__ */ s.jsx("p", { children: c.formatMessage({ id: `${rt}translation_${t ? "original" : n ? "human" : "machine"}` }) })
|
|
2319
2319
|
] }),
|
|
@@ -2324,16 +2324,17 @@ const Lt = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2324
2324
|
children: c.formatMessage({ id: `${rt}disclaimer` }, {
|
|
2325
2325
|
email: Xe.support,
|
|
2326
2326
|
link: (v) => {
|
|
2327
|
-
const
|
|
2328
|
-
return /* @__PURE__ */ s.jsx("a", { href:
|
|
2327
|
+
const w = `mailto:${v}`;
|
|
2328
|
+
return /* @__PURE__ */ s.jsx("a", { href: w, children: v });
|
|
2329
2329
|
}
|
|
2330
2330
|
})
|
|
2331
2331
|
})
|
|
2332
2332
|
] });
|
|
2333
2333
|
};
|
|
2334
|
-
const It =
|
|
2335
|
-
hasNextPage: e,
|
|
2336
|
-
loadNextPage: t
|
|
2334
|
+
const It = Es({ locale: "en", messages: en }), Gn = ({
|
|
2335
|
+
hasNextPage: e = !0,
|
|
2336
|
+
loadNextPage: t = () => {
|
|
2337
|
+
},
|
|
2337
2338
|
icon: n = !1,
|
|
2338
2339
|
messages: r = {
|
|
2339
2340
|
button: It.formatMessage({ id: "loadMore_button" }),
|
|
@@ -2343,44 +2344,41 @@ const It = Ss({ locale: "en", messages: en }), Nr = ({
|
|
|
2343
2344
|
className: o = "",
|
|
2344
2345
|
gtmContext: i = "LoadMore"
|
|
2345
2346
|
}) => {
|
|
2346
|
-
const [l, a] =
|
|
2347
|
+
const [l, a] = A(""), u = async (c) => {
|
|
2347
2348
|
try {
|
|
2348
|
-
await t(
|
|
2349
|
-
} catch (
|
|
2350
|
-
|
|
2349
|
+
await t(c);
|
|
2350
|
+
} catch (m) {
|
|
2351
|
+
m instanceof Error ? a(m.message) : a("Unknown error");
|
|
2351
2352
|
}
|
|
2352
2353
|
};
|
|
2353
|
-
return /* @__PURE__ */ s.
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
}
|
|
2367
|
-
) : /* @__PURE__ */ s.jsx("p", { children: r.endOfFeed })
|
|
2368
|
-
] });
|
|
2354
|
+
return /* @__PURE__ */ s.jsx("footer", { className: E("load-more", o), children: !l && e ? /* @__PURE__ */ s.jsx(
|
|
2355
|
+
U,
|
|
2356
|
+
{
|
|
2357
|
+
variant: "secondary",
|
|
2358
|
+
icon: n,
|
|
2359
|
+
onClick: u,
|
|
2360
|
+
"data-gtm-event-context": i,
|
|
2361
|
+
"data-gtm-event-type": "load-more-click",
|
|
2362
|
+
className: "gtm-trackable",
|
|
2363
|
+
"data-testid": "load-more-button",
|
|
2364
|
+
children: r.button
|
|
2365
|
+
}
|
|
2366
|
+
) : !l || l != null && l.includes("Cannot read items") ? /* @__PURE__ */ s.jsx("p", { children: r.endOfFeed }) : /* @__PURE__ */ s.jsx("p", { className: "error", children: r.error }) });
|
|
2369
2367
|
};
|
|
2370
|
-
const
|
|
2368
|
+
const Jn = ({ variant: e = "default", version: t = "default", className: n = "", ...r }) => /* @__PURE__ */ s.jsx("p", { className: "logo-wrapper", children: /* @__PURE__ */ s.jsx("a", { href: "/home/", className: E("logo", e, t, n), ...r, children: /* @__PURE__ */ s.jsx(me, { children: /* @__PURE__ */ s.jsx(De, { id: "apolitical" }) }) }) });
|
|
2371
2369
|
let at = !1;
|
|
2372
|
-
const
|
|
2373
|
-
const o = C(), i = ae(null), [l, a] =
|
|
2370
|
+
const Pr = ({ element: e = "div", id: t = "more-menu", options: n, className: r = "" }) => {
|
|
2371
|
+
const o = C(), i = ae(null), [l, a] = A(!1), u = (c) => {
|
|
2374
2372
|
i.current && c.target instanceof HTMLElement && !i.current.contains(c.target) && a(!1);
|
|
2375
2373
|
};
|
|
2376
|
-
return
|
|
2374
|
+
return Y(() => (document.addEventListener("click", u, !0), () => {
|
|
2377
2375
|
document.removeEventListener("click", u, !0);
|
|
2378
|
-
})),
|
|
2376
|
+
})), P.createElement(e, {
|
|
2379
2377
|
ref: i,
|
|
2380
2378
|
className: E("more-menu text-medium", r),
|
|
2381
2379
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2382
2380
|
/* @__PURE__ */ s.jsx(
|
|
2383
|
-
|
|
2381
|
+
U,
|
|
2384
2382
|
{
|
|
2385
2383
|
variant: "tertiary",
|
|
2386
2384
|
size: "medium",
|
|
@@ -2395,8 +2393,8 @@ const Dr = ({ element: e = "div", id: t = "more-menu", options: n, className: r
|
|
|
2395
2393
|
/* @__PURE__ */ s.jsx("ul", { id: t, hidden: !l, children: n.map(({ href: c, onClick: m, text: d, icon: p, ...h }, g) => {
|
|
2396
2394
|
const v = {
|
|
2397
2395
|
...h,
|
|
2398
|
-
onClick: (
|
|
2399
|
-
a(!1), typeof m == "function" && m(
|
|
2396
|
+
onClick: (w) => {
|
|
2397
|
+
a(!1), typeof m == "function" && m(w);
|
|
2400
2398
|
},
|
|
2401
2399
|
onFocus: () => {
|
|
2402
2400
|
at && (clearTimeout(at), at = !1);
|
|
@@ -2408,7 +2406,7 @@ const Dr = ({ element: e = "div", id: t = "more-menu", options: n, className: r
|
|
|
2408
2406
|
}
|
|
2409
2407
|
};
|
|
2410
2408
|
return c && (v.href = c), /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
|
|
2411
|
-
|
|
2409
|
+
U,
|
|
2412
2410
|
{
|
|
2413
2411
|
variant: "tertiary",
|
|
2414
2412
|
size: "medium",
|
|
@@ -2420,7 +2418,7 @@ const Dr = ({ element: e = "div", id: t = "more-menu", options: n, className: r
|
|
|
2420
2418
|
}) })
|
|
2421
2419
|
] })
|
|
2422
2420
|
});
|
|
2423
|
-
},
|
|
2421
|
+
}, Dr = (e, t = !1) => t ? e.replaceAll("/", "") === t : typeof window < "u" && window.location && window.location.pathname === e;
|
|
2424
2422
|
const Rr = [
|
|
2425
2423
|
{
|
|
2426
2424
|
key: "homepage",
|
|
@@ -2448,7 +2446,7 @@ const Rr = [
|
|
|
2448
2446
|
Rr.map(({ key: o, href: i }) => /* @__PURE__ */ s.jsx(
|
|
2449
2447
|
"li",
|
|
2450
2448
|
{
|
|
2451
|
-
className: E(o, { active:
|
|
2449
|
+
className: E(o, { active: Dr(i, e) }),
|
|
2452
2450
|
children: /* @__PURE__ */ s.jsx(
|
|
2453
2451
|
"a",
|
|
2454
2452
|
{
|
|
@@ -2525,7 +2523,7 @@ ${qe(t, "mailto", n)}&src=email`
|
|
|
2525
2523
|
onClick: (r, o) => (r.preventDefault(), r.stopPropagation(), navigator.clipboard.writeText(o))
|
|
2526
2524
|
}
|
|
2527
2525
|
];
|
|
2528
|
-
const Lr = "shareLinks_",
|
|
2526
|
+
const Lr = "shareLinks_", ho = ({
|
|
2529
2527
|
title: e,
|
|
2530
2528
|
link: t,
|
|
2531
2529
|
referrer: n,
|
|
@@ -2542,7 +2540,7 @@ const Lr = "shareLinks_", fo = ({
|
|
|
2542
2540
|
return null;
|
|
2543
2541
|
const g = {};
|
|
2544
2542
|
return h && (g.onClick = (v) => h(v, d)), /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
|
|
2545
|
-
|
|
2543
|
+
U,
|
|
2546
2544
|
{
|
|
2547
2545
|
size: o,
|
|
2548
2546
|
variant: "tertiary",
|
|
@@ -2561,7 +2559,7 @@ const Lr = "shareLinks_", fo = ({
|
|
|
2561
2559
|
}) })
|
|
2562
2560
|
] });
|
|
2563
2561
|
};
|
|
2564
|
-
const
|
|
2562
|
+
const po = ({ tabs: e, className: t = "" }) => {
|
|
2565
2563
|
var u;
|
|
2566
2564
|
const n = (c, m, d) => (c || (c = `panel-${window.btoa(m)}-${d}`), c);
|
|
2567
2565
|
let r = e.findIndex((c) => c.current === !0);
|
|
@@ -2575,14 +2573,14 @@ const ho = ({ tabs: e, className: t = "" }) => {
|
|
|
2575
2573
|
}
|
|
2576
2574
|
}
|
|
2577
2575
|
}
|
|
2578
|
-
const [o, i] =
|
|
2576
|
+
const [o, i] = A(
|
|
2579
2577
|
(u = e[r]) != null && u.id ? e[r].id : n(e[r].id, e[r].text, r)
|
|
2580
2578
|
), l = [], a = [];
|
|
2581
2579
|
return e.forEach(({ id: c, text: m, content: d, href: p }, h) => {
|
|
2582
2580
|
c = n(c, m, h);
|
|
2583
2581
|
const g = o === c, v = {};
|
|
2584
|
-
p || (v["aria-controls"] = c, v.onClick = (
|
|
2585
|
-
|
|
2582
|
+
p || (v["aria-controls"] = c, v.onClick = (w) => {
|
|
2583
|
+
w.preventDefault(), w.stopPropagation(), i(c), window.location.hash = `#${c}`;
|
|
2586
2584
|
}, a.push(
|
|
2587
2585
|
/* @__PURE__ */ s.jsx(
|
|
2588
2586
|
"section",
|
|
@@ -2626,13 +2624,13 @@ const Ir = {
|
|
|
2626
2624
|
}) => {
|
|
2627
2625
|
const o = kt(!0);
|
|
2628
2626
|
let i = r;
|
|
2629
|
-
return
|
|
2630
|
-
},
|
|
2627
|
+
return P.Children.count(r) === 1 && (i = P.Children.toArray(r)[0], i.props && (i = i.props.children)), /* @__PURE__ */ s.jsx("section", { className: E("columns", `layout-${e}`, n), children: P.Children.map(i, (l, a) => t !== !1 && a === t && o && o < Ir[e] ? null : l) });
|
|
2628
|
+
}, go = ({ activeLink: e, ...t }) => /* @__PURE__ */ s.jsx(Or, { layout: "1-3", children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2631
2629
|
/* @__PURE__ */ s.jsx(Ar, { activeLink: e }),
|
|
2632
|
-
/* @__PURE__ */ s.jsx(
|
|
2630
|
+
/* @__PURE__ */ s.jsx(xr, { ...t })
|
|
2633
2631
|
] }) });
|
|
2634
2632
|
const Ot = "cookieBanner_", Bt = ["apol-cookie-banner", "apolitical-performance-cookie-consent", "functional-cookie-consent"], Ht = new Date(Date.now() + 12 * 30 * 24 * 60 * 60 * 1e3), Br = () => {
|
|
2635
|
-
const e = C(), [t, n, r] =
|
|
2633
|
+
const e = C(), [t, n, r] = Ps(Bt), [o, i] = A(!t["apol-cookie-banner"]), l = () => {
|
|
2636
2634
|
Bt.forEach((m) => {
|
|
2637
2635
|
n(m, !0, {
|
|
2638
2636
|
path: "/",
|
|
@@ -2677,7 +2675,7 @@ const Ot = "cookieBanner_", Bt = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2677
2675
|
/* @__PURE__ */ s.jsx("p", { children: e.formatMessage({ id: `${Ot}text` }) }),
|
|
2678
2676
|
/* @__PURE__ */ s.jsx(jt, { buttons: c })
|
|
2679
2677
|
] });
|
|
2680
|
-
},
|
|
2678
|
+
}, Ce = {
|
|
2681
2679
|
platform: {
|
|
2682
2680
|
order: ["events", "courses", "qanda", "articles"],
|
|
2683
2681
|
// An array guarantees the right order
|
|
@@ -2771,15 +2769,15 @@ const Ot = "cookieBanner_", Bt = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2771
2769
|
facebook: { href: "https://www.facebook.com/apoliticalco" }
|
|
2772
2770
|
}
|
|
2773
2771
|
};
|
|
2774
|
-
const Be = "footer_", ht = "SiteFooter",
|
|
2775
|
-
const t =
|
|
2772
|
+
const Be = "footer_", ht = "SiteFooter", yn = ({ group: e }) => {
|
|
2773
|
+
const t = Ce[e].order || [];
|
|
2776
2774
|
let n = !1;
|
|
2777
|
-
return "text" in
|
|
2778
|
-
/* @__PURE__ */ s.jsx("p", { className: "pre-title", children: /* @__PURE__ */ s.jsx(
|
|
2775
|
+
return "text" in Ce[e] && (n = Ce[e].text), /* @__PURE__ */ s.jsxs(Yt, { children: [
|
|
2776
|
+
/* @__PURE__ */ s.jsx("p", { className: "pre-title", children: /* @__PURE__ */ s.jsx(De, { id: `${Be}${e}` }) }),
|
|
2779
2777
|
Array.isArray(t) && t.length > 0 && /* @__PURE__ */ s.jsx("ul", { className: "text-medium", children: t.map((r) => {
|
|
2780
2778
|
if (["order", "child", "text"].includes(r))
|
|
2781
2779
|
return null;
|
|
2782
|
-
const { href: o, gtmType: i } =
|
|
2780
|
+
const { href: o, gtmType: i } = Ce[e][r], l = {};
|
|
2783
2781
|
return ["legal"].includes(e) && (l.target = "_blank", l.rel = "noopener"), /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
|
|
2784
2782
|
"a",
|
|
2785
2783
|
{
|
|
@@ -2788,14 +2786,14 @@ const Be = "footer_", ht = "SiteFooter", En = ({ group: e }) => {
|
|
|
2788
2786
|
"data-gtm-event-context": ht,
|
|
2789
2787
|
"data-gtm-event-type": i,
|
|
2790
2788
|
...l,
|
|
2791
|
-
children: /* @__PURE__ */ s.jsx(
|
|
2789
|
+
children: /* @__PURE__ */ s.jsx(De, { id: `${Be}${e}_${r}` })
|
|
2792
2790
|
}
|
|
2793
2791
|
) }, `${e}_${r}`);
|
|
2794
2792
|
}) }),
|
|
2795
2793
|
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(Yt, { children: [
|
|
2796
|
-
/* @__PURE__ */ s.jsx("dt", { children: /* @__PURE__ */ s.jsx(
|
|
2794
|
+
/* @__PURE__ */ s.jsx("dt", { children: /* @__PURE__ */ s.jsx(De, { id: `${Be}${e}_${r}` }) }),
|
|
2797
2795
|
/* @__PURE__ */ s.jsxs("dd", { children: [
|
|
2798
|
-
typeof n != "boolean" && n[r].address && /* @__PURE__ */ s.jsx("address", { children: /* @__PURE__ */ s.jsx(
|
|
2796
|
+
typeof n != "boolean" && n[r].address && /* @__PURE__ */ s.jsx("address", { children: /* @__PURE__ */ s.jsx(De, { id: `${Be}${e}_${r}_address`, values: { br: /* @__PURE__ */ s.jsx("br", {}) } }) }),
|
|
2799
2797
|
typeof n != "boolean" && n[r].email && /* @__PURE__ */ s.jsx(
|
|
2800
2798
|
"a",
|
|
2801
2799
|
{
|
|
@@ -2809,10 +2807,10 @@ const Be = "footer_", ht = "SiteFooter", En = ({ group: e }) => {
|
|
|
2809
2807
|
] })
|
|
2810
2808
|
] }, `dl-${e}-${r}`)) })
|
|
2811
2809
|
] }, e);
|
|
2812
|
-
},
|
|
2813
|
-
/* @__PURE__ */ s.jsx(
|
|
2810
|
+
}, qn = () => /* @__PURE__ */ s.jsx("div", { id: "footer", children: /* @__PURE__ */ s.jsxs("div", { className: "wrapper", children: [
|
|
2811
|
+
/* @__PURE__ */ s.jsx(Rn, { element: "hr" }),
|
|
2814
2812
|
/* @__PURE__ */ s.jsx(
|
|
2815
|
-
|
|
2813
|
+
Jn,
|
|
2816
2814
|
{
|
|
2817
2815
|
variant: "inverted",
|
|
2818
2816
|
version: "full",
|
|
@@ -2822,13 +2820,13 @@ const Be = "footer_", ht = "SiteFooter", En = ({ group: e }) => {
|
|
|
2822
2820
|
}
|
|
2823
2821
|
),
|
|
2824
2822
|
/* @__PURE__ */ s.jsx("footer", { children: ["platform", "community", "company", "contact"].map((e) => /* @__PURE__ */ s.jsxs("div", { className: "group", children: [
|
|
2825
|
-
/* @__PURE__ */ s.jsx(
|
|
2826
|
-
Object.keys(
|
|
2823
|
+
/* @__PURE__ */ s.jsx(yn, { group: e }),
|
|
2824
|
+
Object.keys(Ce[e]).includes("child") && /* @__PURE__ */ s.jsx(yn, { group: Ce[e].child })
|
|
2827
2825
|
] }, e)) }),
|
|
2828
2826
|
/* @__PURE__ */ s.jsx("hr", {}),
|
|
2829
2827
|
/* @__PURE__ */ s.jsxs("div", { className: "sub-footer", children: [
|
|
2830
|
-
/* @__PURE__ */ s.jsx("ul", { children: Array.isArray(
|
|
2831
|
-
const t =
|
|
2828
|
+
/* @__PURE__ */ s.jsx("ul", { children: Array.isArray(Ce.social.order) && Ce.social.order.map((e) => {
|
|
2829
|
+
const t = Ce.social[e];
|
|
2832
2830
|
return /* @__PURE__ */ s.jsx("li", { className: e, children: /* @__PURE__ */ s.jsx(
|
|
2833
2831
|
"a",
|
|
2834
2832
|
{
|
|
@@ -2838,15 +2836,15 @@ const Be = "footer_", ht = "SiteFooter", En = ({ group: e }) => {
|
|
|
2838
2836
|
className: "gtm-trackable",
|
|
2839
2837
|
"data-gtm-event-context": ht,
|
|
2840
2838
|
"data-gtm-event-type": "social-click",
|
|
2841
|
-
children: /* @__PURE__ */ s.jsx("span", { className: "hidden", children: /* @__PURE__ */ s.jsx(
|
|
2839
|
+
children: /* @__PURE__ */ s.jsx("span", { className: "hidden", children: /* @__PURE__ */ s.jsx(De, { id: `${Be}social_${e}` }) })
|
|
2842
2840
|
}
|
|
2843
2841
|
) }, e);
|
|
2844
2842
|
}) }),
|
|
2845
|
-
/* @__PURE__ */ s.jsx("small", { children: /* @__PURE__ */ s.jsx(
|
|
2843
|
+
/* @__PURE__ */ s.jsx("small", { children: /* @__PURE__ */ s.jsx(De, { id: `${Be}copyright`, values: { currentYear: (/* @__PURE__ */ new Date()).getFullYear() } }) })
|
|
2846
2844
|
] })
|
|
2847
2845
|
] }) });
|
|
2848
|
-
const ot = "emailHelperTextBox_",
|
|
2849
|
-
const o = C(), [i, l] =
|
|
2846
|
+
const ot = "emailHelperTextBox_", _o = ({ type: e, email: t, redirectPath: n, resendVerificationCode: r }) => {
|
|
2847
|
+
const o = C(), [i, l] = A({ path: `${ot}default`, type: "default", link: {}, mail: {}, error: "" }), [a, u] = A(!1), c = Ae(
|
|
2850
2848
|
(h) => {
|
|
2851
2849
|
h.preventDefault(), h.stopPropagation();
|
|
2852
2850
|
const g = (v) => {
|
|
@@ -2857,7 +2855,7 @@ const ot = "emailHelperTextBox_", go = ({ type: e, email: t, redirectPath: n, re
|
|
|
2857
2855
|
"data-gtm-event-context": "VerifyEmailBox",
|
|
2858
2856
|
"data-gtm-event-type": "SendEmailClick",
|
|
2859
2857
|
className: "gtm-trackable",
|
|
2860
|
-
onClick: (
|
|
2858
|
+
onClick: (w) => c(w),
|
|
2861
2859
|
href: "#",
|
|
2862
2860
|
"data-testid": "send-verify-email-click"
|
|
2863
2861
|
},
|
|
@@ -2885,9 +2883,9 @@ const ot = "emailHelperTextBox_", go = ({ type: e, email: t, redirectPath: n, re
|
|
|
2885
2883
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
2886
2884
|
[t, n, r]
|
|
2887
2885
|
);
|
|
2888
|
-
|
|
2886
|
+
Y(
|
|
2889
2887
|
() => {
|
|
2890
|
-
let h = ot, g = "default", v = {},
|
|
2888
|
+
let h = ot, g = "default", v = {}, w = {};
|
|
2891
2889
|
switch (e) {
|
|
2892
2890
|
case "gov":
|
|
2893
2891
|
h += "autoApproved", g = "success";
|
|
@@ -2900,7 +2898,7 @@ const ot = "emailHelperTextBox_", go = ({ type: e, email: t, redirectPath: n, re
|
|
|
2900
2898
|
};
|
|
2901
2899
|
break;
|
|
2902
2900
|
case "pending":
|
|
2903
|
-
h += "pendingApproval", g = "error",
|
|
2901
|
+
h += "pendingApproval", g = "error", w = {
|
|
2904
2902
|
href: "mailto:concierge@apolitical.co",
|
|
2905
2903
|
className: "gtm-trackable",
|
|
2906
2904
|
"data-gtm-event-context": "EmailExistsBox",
|
|
@@ -2922,7 +2920,7 @@ const ot = "emailHelperTextBox_", go = ({ type: e, email: t, redirectPath: n, re
|
|
|
2922
2920
|
href: "/user-onboarding/login",
|
|
2923
2921
|
"data-gtm-event-context": "EmailExistsBox",
|
|
2924
2922
|
"data-gtm-event-type": "login-click"
|
|
2925
|
-
},
|
|
2923
|
+
}, w = {
|
|
2926
2924
|
href: "mailto:concierge@apolitical.co",
|
|
2927
2925
|
className: "gtm-trackable",
|
|
2928
2926
|
"data-gtm-event-context": "EmailExistsBox",
|
|
@@ -2937,7 +2935,7 @@ const ot = "emailHelperTextBox_", go = ({ type: e, email: t, redirectPath: n, re
|
|
|
2937
2935
|
};
|
|
2938
2936
|
break;
|
|
2939
2937
|
}
|
|
2940
|
-
l({ ...i, path: h, type: g, link: v, mail:
|
|
2938
|
+
l({ ...i, path: h, type: g, link: v, mail: w });
|
|
2941
2939
|
},
|
|
2942
2940
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
2943
2941
|
[e]
|
|
@@ -2945,7 +2943,7 @@ const ot = "emailHelperTextBox_", go = ({ type: e, email: t, redirectPath: n, re
|
|
|
2945
2943
|
const m = {};
|
|
2946
2944
|
return ["link", "mail"].forEach((h) => {
|
|
2947
2945
|
m[h] = Object.keys(i[h]).length ? (g) => /* @__PURE__ */ s.jsx("a", { ...i[h], children: g }) : (g) => g;
|
|
2948
|
-
}), /* @__PURE__ */ s.jsx(
|
|
2946
|
+
}), /* @__PURE__ */ s.jsx(lr, { type: i.type, heading: a ? !1 : o.formatMessage({ id: `${i.path}_title` }), children: a ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2949
2947
|
/* @__PURE__ */ s.jsx(Te, { element: "span" }),
|
|
2950
2948
|
/* @__PURE__ */ s.jsx(Te, { element: "span" })
|
|
2951
2949
|
] }) : (
|
|
@@ -2967,29 +2965,29 @@ const ot = "emailHelperTextBox_", go = ({ type: e, email: t, redirectPath: n, re
|
|
|
2967
2965
|
)
|
|
2968
2966
|
) });
|
|
2969
2967
|
};
|
|
2970
|
-
const it = "passwordRules_",
|
|
2971
|
-
[
|
|
2972
|
-
[
|
|
2973
|
-
[
|
|
2968
|
+
const it = "passwordRules_", Xn = "isMoreThanEightCharacters", Zn = "includesNumberAndSymbol", Kn = "includesLowerAndUppercase", Hr = {
|
|
2969
|
+
[Xn]: "8Characters",
|
|
2970
|
+
[Zn]: "numberSymbol",
|
|
2971
|
+
[Kn]: "lowercaseUppercase"
|
|
2974
2972
|
}, Qr = ({ matchingRules: e = { isMoreThanEightCharacters: !1, includesNumberAndSymbol: !1, includesLowerAndUppercase: !1 }, className: t = "" }) => {
|
|
2975
2973
|
const n = C();
|
|
2976
2974
|
return /* @__PURE__ */ s.jsxs("aside", { className: E("password-rules", t), children: [
|
|
2977
2975
|
/* @__PURE__ */ s.jsx("small", { children: n.formatMessage({ id: `${it}intro` }) }),
|
|
2978
|
-
/* @__PURE__ */ s.jsx("ul", { children: [Zn, Kn
|
|
2979
|
-
/* @__PURE__ */ s.jsxs(
|
|
2976
|
+
/* @__PURE__ */ s.jsx("ul", { children: [Xn, Zn, Kn].map((r) => /* @__PURE__ */ s.jsxs("li", { className: E({ matches: e[r] }), children: [
|
|
2977
|
+
/* @__PURE__ */ s.jsxs(me, { children: [
|
|
2980
2978
|
n.formatMessage({ id: `${it}rule_label` }),
|
|
2981
2979
|
" "
|
|
2982
2980
|
] }),
|
|
2983
2981
|
/* @__PURE__ */ s.jsx("span", { children: n.formatMessage({ id: `${it}rule_${Hr[r]}` }) }),
|
|
2984
|
-
!e[r] && /* @__PURE__ */ s.jsxs(
|
|
2982
|
+
!e[r] && /* @__PURE__ */ s.jsxs(me, { element: "strong", children: [
|
|
2985
2983
|
" ",
|
|
2986
2984
|
" ",
|
|
2987
2985
|
n.formatMessage({ id: `${it}notMet` })
|
|
2988
2986
|
] })
|
|
2989
2987
|
] }, `rule-${r}`)) })
|
|
2990
2988
|
] });
|
|
2991
|
-
},
|
|
2992
|
-
const
|
|
2989
|
+
}, xo = We(Qr);
|
|
2990
|
+
const bo = ({
|
|
2993
2991
|
text: e = {},
|
|
2994
2992
|
topRating: t = 5,
|
|
2995
2993
|
functions: { createRating: n = () => null, updateRating: r = () => {
|
|
@@ -2998,15 +2996,15 @@ const xo = ({
|
|
|
2998
2996
|
className: i = "",
|
|
2999
2997
|
hasLoaded: l = !1
|
|
3000
2998
|
}) => {
|
|
3001
|
-
const a = C(), [u, c] =
|
|
2999
|
+
const a = C(), [u, c] = A({ setUp: !1, id: null, rating: null, disabled: !0 }), m = async () => {
|
|
3002
3000
|
try {
|
|
3003
3001
|
const y = await n();
|
|
3004
|
-
c((
|
|
3002
|
+
c((x) => ({ ...x, setUp: !0, id: y && y.id, disabled: !1 }));
|
|
3005
3003
|
} catch (y) {
|
|
3006
|
-
c((
|
|
3004
|
+
c((x) => ({ ...x, setUp: !0, disabled: !0 })), o(y);
|
|
3007
3005
|
}
|
|
3008
3006
|
};
|
|
3009
|
-
if (
|
|
3007
|
+
if (Y(() => {
|
|
3010
3008
|
l && !u.setUp && m();
|
|
3011
3009
|
}, [l]), !l)
|
|
3012
3010
|
return /* @__PURE__ */ s.jsx(Te, { className: "rating-placeholder" });
|
|
@@ -3016,36 +3014,36 @@ const xo = ({
|
|
|
3016
3014
|
high: a.formatMessage({ id: `${g}high` }),
|
|
3017
3015
|
success: a.formatMessage({ id: `${g}success` }),
|
|
3018
3016
|
...e
|
|
3019
|
-
},
|
|
3017
|
+
}, w = async (y) => {
|
|
3020
3018
|
if (!(!d || h))
|
|
3021
3019
|
try {
|
|
3022
|
-
c((
|
|
3023
|
-
} catch (
|
|
3024
|
-
c((
|
|
3020
|
+
c((x) => ({ ...x, rating: y, disabled: !0 })), await r({ id: d, value: y });
|
|
3021
|
+
} catch (x) {
|
|
3022
|
+
c((_) => ({ ..._, rating: null })), o(x);
|
|
3025
3023
|
} finally {
|
|
3026
|
-
c((
|
|
3024
|
+
c((x) => ({ ...x, disabled: !1 }));
|
|
3027
3025
|
}
|
|
3028
3026
|
};
|
|
3029
3027
|
return /* @__PURE__ */ s.jsxs("div", { className: E("rating", i), children: [
|
|
3030
3028
|
/* @__PURE__ */ s.jsx("span", { className: "label", children: v[p ? "success" : "text"] }),
|
|
3031
3029
|
/* @__PURE__ */ s.jsx("ol", { children: Array.from(new Array(t).keys()).map((y) => {
|
|
3032
|
-
const
|
|
3033
|
-
return /* @__PURE__ */ s.jsx("li", { className: E({ selected: p &&
|
|
3034
|
-
|
|
3030
|
+
const x = y + 1;
|
|
3031
|
+
return /* @__PURE__ */ s.jsx("li", { className: E({ selected: p && x <= p }), children: /* @__PURE__ */ s.jsx(
|
|
3032
|
+
U,
|
|
3035
3033
|
{
|
|
3036
3034
|
variant: "tertiary",
|
|
3037
3035
|
size: "small",
|
|
3038
|
-
icon: { icon: `star${!p ||
|
|
3036
|
+
icon: { icon: `star${!p || x > p ? "_empty" : ""}`, position: "left", hover: "star" },
|
|
3039
3037
|
screenreaderText: `${a.formatMessage(
|
|
3040
3038
|
{ id: `${g}stars` },
|
|
3041
|
-
{ number:
|
|
3042
|
-
)}${
|
|
3043
|
-
onClick: (
|
|
3044
|
-
|
|
3039
|
+
{ number: x, total: t }
|
|
3040
|
+
)}${x === 1 || x === t ? ` - ${v[x === 1 ? "low" : "high"]}` : ""}`,
|
|
3041
|
+
onClick: (_) => {
|
|
3042
|
+
_.preventDefault(), _.stopPropagation(), w(x);
|
|
3045
3043
|
},
|
|
3046
3044
|
disabled: h
|
|
3047
3045
|
}
|
|
3048
|
-
) }, `rating-${
|
|
3046
|
+
) }, `rating-${x}`);
|
|
3049
3047
|
}) })
|
|
3050
3048
|
] });
|
|
3051
3049
|
};
|
|
@@ -3072,7 +3070,7 @@ const Ur = ({
|
|
|
3072
3070
|
"data-gtm-event-context": o,
|
|
3073
3071
|
"data-gtm-event-type": i,
|
|
3074
3072
|
children: /* @__PURE__ */ s.jsx("fieldset", { id: `${e}-form`, hidden: n ? !l : !1, role: "search", children: /* @__PURE__ */ s.jsxs("p", { children: [
|
|
3075
|
-
/* @__PURE__ */ s.jsx(
|
|
3073
|
+
/* @__PURE__ */ s.jsx(me, { element: "label", htmlFor: e, children: u.formatMessage({ id: "search_label" }) }),
|
|
3076
3074
|
/* @__PURE__ */ s.jsx(
|
|
3077
3075
|
"input",
|
|
3078
3076
|
{
|
|
@@ -3094,10 +3092,10 @@ const Ur = ({
|
|
|
3094
3092
|
onClick: (d) => {
|
|
3095
3093
|
d.preventDefault(), d.stopPropagation(), c.current && c.current.value && (c.current.value = "");
|
|
3096
3094
|
},
|
|
3097
|
-
children: /* @__PURE__ */ s.jsx(
|
|
3095
|
+
children: /* @__PURE__ */ s.jsx(me, { children: u.formatMessage({ id: "search_clear" }) })
|
|
3098
3096
|
}
|
|
3099
3097
|
),
|
|
3100
|
-
/* @__PURE__ */ s.jsx("button", { className: "search", onClick: m, children: /* @__PURE__ */ s.jsx(
|
|
3098
|
+
/* @__PURE__ */ s.jsx("button", { className: "search", onClick: m, children: /* @__PURE__ */ s.jsx(me, { children: u.formatMessage({ id: "search_cta" }) }) })
|
|
3101
3099
|
] }) })
|
|
3102
3100
|
}
|
|
3103
3101
|
);
|
|
@@ -3115,40 +3113,40 @@ const Wr = ({
|
|
|
3115
3113
|
initialFormStatus: c = "NOT_SUBMITTED"
|
|
3116
3114
|
/* NOT_SUBMITTED */
|
|
3117
3115
|
}) => {
|
|
3118
|
-
const [m, d] =
|
|
3116
|
+
const [m, d] = A([]), [p, h] = A(!0), [g, v] = A(c), { formatMessage: w } = C(), y = async ($) => {
|
|
3119
3117
|
$.preventDefault();
|
|
3120
3118
|
try {
|
|
3121
3119
|
await u(m), d([]), v(
|
|
3122
3120
|
"SUCCESS"
|
|
3123
3121
|
/* SUCCESS */
|
|
3124
3122
|
);
|
|
3125
|
-
} catch (
|
|
3123
|
+
} catch (N) {
|
|
3126
3124
|
v(
|
|
3127
3125
|
"ERROR"
|
|
3128
3126
|
/* ERROR */
|
|
3129
|
-
), a(
|
|
3127
|
+
), a(N);
|
|
3130
3128
|
}
|
|
3131
|
-
},
|
|
3129
|
+
}, x = ($) => {
|
|
3132
3130
|
$.preventDefault(), v(
|
|
3133
3131
|
"NOT_SUBMITTED"
|
|
3134
3132
|
/* NOT_SUBMITTED */
|
|
3135
3133
|
), h(!0), d([]);
|
|
3136
|
-
},
|
|
3134
|
+
}, _ = ($) => {
|
|
3137
3135
|
$.preventDefault(), l(), v(
|
|
3138
3136
|
"CLOSED"
|
|
3139
3137
|
/* CLOSED */
|
|
3140
3138
|
);
|
|
3141
3139
|
};
|
|
3142
3140
|
return g === "CLOSED" ? null : g === "ERROR" || g === "SUCCESS" ? /* @__PURE__ */ s.jsxs("div", { className: "invite-form-wrapper", children: [
|
|
3143
|
-
/* @__PURE__ */ s.jsx("div", { className: "content centred", children: g === "SUCCESS" ? /* @__PURE__ */ s.jsx("h2", { className: "success-title", children:
|
|
3141
|
+
/* @__PURE__ */ s.jsx("div", { className: "content centred", children: g === "SUCCESS" ? /* @__PURE__ */ s.jsx("h2", { className: "success-title", children: w({ id: "inviteForm_success" }) }) : /* @__PURE__ */ s.jsxs("h2", { className: "error-title", children: [
|
|
3144
3142
|
" ",
|
|
3145
|
-
|
|
3143
|
+
w({ id: "inviteForm_error" })
|
|
3146
3144
|
] }) }),
|
|
3147
3145
|
/* @__PURE__ */ s.jsx(Ue, {}),
|
|
3148
3146
|
/* @__PURE__ */ s.jsx("div", { className: "footer", children: g === "SUCCESS" ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3149
|
-
/* @__PURE__ */ s.jsx(
|
|
3150
|
-
/* @__PURE__ */ s.jsx(
|
|
3151
|
-
] }) : /* @__PURE__ */ s.jsx(
|
|
3147
|
+
/* @__PURE__ */ s.jsx(U, { variant: "secondary", onClick: x, children: w({ id: "inviteForm_ctaSendMoreInvites" }) }),
|
|
3148
|
+
/* @__PURE__ */ s.jsx(U, { onClick: _, children: w({ id: "inviteForm_ctaDone" }) })
|
|
3149
|
+
] }) : /* @__PURE__ */ s.jsx(U, { onClick: x, children: w({ id: "inviteForm_ctaTryAgain" }) }) })
|
|
3152
3150
|
] }) : /* @__PURE__ */ s.jsx("div", { className: "invite-form-wrapper", children: /* @__PURE__ */ s.jsxs(
|
|
3153
3151
|
"form",
|
|
3154
3152
|
{
|
|
@@ -3164,37 +3162,37 @@ const Wr = ({
|
|
|
3164
3162
|
{
|
|
3165
3163
|
id: "email-input",
|
|
3166
3164
|
inputClassName: "email-input input",
|
|
3167
|
-
placeholder:
|
|
3165
|
+
placeholder: w({ id: "inviteForm_email_placeholder" }),
|
|
3168
3166
|
emails: m,
|
|
3169
3167
|
onChange: ($) => {
|
|
3170
3168
|
d($), h(!$.length);
|
|
3171
3169
|
},
|
|
3172
3170
|
autoFocus: !1,
|
|
3173
|
-
getLabel: ($,
|
|
3171
|
+
getLabel: ($, N, D) => /* @__PURE__ */ s.jsxs("div", { className: "email text-medium", children: [
|
|
3174
3172
|
/* @__PURE__ */ s.jsx("div", { "data-tag-item": !0, children: $ }),
|
|
3175
3173
|
/* @__PURE__ */ s.jsx(
|
|
3176
|
-
|
|
3174
|
+
U,
|
|
3177
3175
|
{
|
|
3178
3176
|
variant: "tertiary",
|
|
3179
3177
|
size: "small",
|
|
3180
3178
|
icon: { icon: "close" },
|
|
3181
3179
|
onClick: () => {
|
|
3182
|
-
|
|
3180
|
+
D(N), h(!m.length);
|
|
3183
3181
|
},
|
|
3184
3182
|
className: "remove-email-button",
|
|
3185
|
-
screenreaderText:
|
|
3183
|
+
screenreaderText: w({ id: "overlay_close" })
|
|
3186
3184
|
}
|
|
3187
3185
|
)
|
|
3188
|
-
] },
|
|
3186
|
+
] }, N)
|
|
3189
3187
|
}
|
|
3190
3188
|
)
|
|
3191
3189
|
] }),
|
|
3192
3190
|
/* @__PURE__ */ s.jsx(Ue, {}),
|
|
3193
|
-
/* @__PURE__ */ s.jsx("fieldset", { className: "footer", children: /* @__PURE__ */ s.jsx(
|
|
3191
|
+
/* @__PURE__ */ s.jsx("fieldset", { className: "footer", children: /* @__PURE__ */ s.jsx(U, { className: "sendEmailsButton", disabled: p, children: n }) })
|
|
3194
3192
|
]
|
|
3195
3193
|
}
|
|
3196
3194
|
) });
|
|
3197
|
-
},
|
|
3195
|
+
}, Q = {
|
|
3198
3196
|
timeouts: {},
|
|
3199
3197
|
handlerCalled: {},
|
|
3200
3198
|
getIsDesktopVersion: (e, t) => {
|
|
@@ -3217,9 +3215,9 @@ const Wr = ({
|
|
|
3217
3215
|
if (n[e] === t || e === "account" && t === !1 && n.navigation === !0)
|
|
3218
3216
|
return;
|
|
3219
3217
|
const o = Date.now();
|
|
3220
|
-
if (!t &&
|
|
3218
|
+
if (!t && Q.handlerCalled[e] && o - Q.handlerCalled[e] < 500)
|
|
3221
3219
|
return;
|
|
3222
|
-
|
|
3220
|
+
Q.handlerCalled[e] = o;
|
|
3223
3221
|
let i = [{ type: `menus.${e}`, value: t }];
|
|
3224
3222
|
t === !0 && Object.keys(n).forEach((l) => {
|
|
3225
3223
|
l === e || n[l] === !1 || i.push({ type: `menus.${l}`, value: !1 });
|
|
@@ -3240,11 +3238,11 @@ const Wr = ({
|
|
|
3240
3238
|
return e[r];
|
|
3241
3239
|
if (!t.includes("."))
|
|
3242
3240
|
continue;
|
|
3243
|
-
const o =
|
|
3241
|
+
const o = Pn(e[r], t);
|
|
3244
3242
|
if (!(typeof o > "u") && (!n || o[t] && o[t].includes(n) || o.value && o.value.includes(n) || o.toString().includes(n)))
|
|
3245
3243
|
return e[r];
|
|
3246
3244
|
}
|
|
3247
|
-
return e[0].children ?
|
|
3245
|
+
return e[0].children ? Q.findFirstChild(e[0].children, t, n) : !1;
|
|
3248
3246
|
},
|
|
3249
3247
|
autoFocus: ({ menu: e, navigationRef: t, isDesktopVersion: n, focusElements: r, dispatch: o }) => {
|
|
3250
3248
|
if (!t.current || !t.current.children)
|
|
@@ -3258,20 +3256,20 @@ const Wr = ({
|
|
|
3258
3256
|
switch (e) {
|
|
3259
3257
|
case "navigation":
|
|
3260
3258
|
if (n) {
|
|
3261
|
-
const u =
|
|
3259
|
+
const u = Q.findFirstChild(
|
|
3262
3260
|
t.current.children,
|
|
3263
3261
|
"attributes.aria-controls",
|
|
3264
3262
|
"navigation"
|
|
3265
3263
|
);
|
|
3266
|
-
l =
|
|
3264
|
+
l = Q.findFirstChild(u.children, "href");
|
|
3267
3265
|
} else
|
|
3268
|
-
l =
|
|
3266
|
+
l = Q.findFirstChild(t.current.children, "href");
|
|
3269
3267
|
l || (l = t.current);
|
|
3270
3268
|
break;
|
|
3271
3269
|
case "account":
|
|
3272
|
-
if (a =
|
|
3270
|
+
if (a = Q.findFirstChild(t.current.children, "className", "account"), !a || !a.children)
|
|
3273
3271
|
return;
|
|
3274
|
-
l =
|
|
3272
|
+
l = Q.findFirstChild(a.children, "href");
|
|
3275
3273
|
break;
|
|
3276
3274
|
default:
|
|
3277
3275
|
return;
|
|
@@ -3280,16 +3278,16 @@ const Wr = ({
|
|
|
3280
3278
|
},
|
|
3281
3279
|
events: {
|
|
3282
3280
|
onClick: (e, { id: t, callback: n, isOpen: r }) => {
|
|
3283
|
-
e.target && e.target.attributes && e.target.attributes.href || (e.preventDefault(), e.stopPropagation(), clearTimeout(
|
|
3281
|
+
e.target && e.target.attributes && e.target.attributes.href || (e.preventDefault(), e.stopPropagation(), clearTimeout(Q.timeouts[t]), n(t, !r));
|
|
3284
3282
|
},
|
|
3285
3283
|
onFocus: ({ id: e }) => {
|
|
3286
|
-
clearTimeout(
|
|
3284
|
+
clearTimeout(Q.timeouts[e]);
|
|
3287
3285
|
},
|
|
3288
3286
|
onMouseEnter: ({ id: e, callback: t }) => {
|
|
3289
|
-
clearTimeout(
|
|
3287
|
+
clearTimeout(Q.timeouts[e]), t(e, !0);
|
|
3290
3288
|
},
|
|
3291
3289
|
onBlur: ({ id: e, callback: t }) => {
|
|
3292
|
-
|
|
3290
|
+
Q.timeouts[e] = setTimeout(() => {
|
|
3293
3291
|
t(e, !1);
|
|
3294
3292
|
}, 250);
|
|
3295
3293
|
}
|
|
@@ -3379,7 +3377,7 @@ const Wr = ({
|
|
|
3379
3377
|
},
|
|
3380
3378
|
doTrack: i = null
|
|
3381
3379
|
}) => {
|
|
3382
|
-
const l = C(), a =
|
|
3380
|
+
const l = C(), a = Pn(pt, e);
|
|
3383
3381
|
if (!a || a.onlyShow && (a.onlyShow === "logged-in" && !t || a.onlyShow === "logged-out" && t))
|
|
3384
3382
|
return null;
|
|
3385
3383
|
const u = "doTrack" in a, c = i === null ? u ? a.doTrack : !0 : i, m = e.includes("buttons.");
|
|
@@ -3387,10 +3385,10 @@ const Wr = ({
|
|
|
3387
3385
|
a.hasVariantText && (d += `_logged${t ? "In" : "Out"}`);
|
|
3388
3386
|
let p = !1;
|
|
3389
3387
|
if (a.href) {
|
|
3390
|
-
let
|
|
3391
|
-
if (
|
|
3392
|
-
const
|
|
3393
|
-
|
|
3388
|
+
let x = a.gtmType || `${e}-click`;
|
|
3389
|
+
if (x.includes(".")) {
|
|
3390
|
+
const _ = x.split("."), $ = _[_.length - 2];
|
|
3391
|
+
x = `${$ === "topics" ? `${$}-` : ""}${_[_.length - 1]}`;
|
|
3394
3392
|
}
|
|
3395
3393
|
p = {
|
|
3396
3394
|
href: a.href,
|
|
@@ -3398,7 +3396,7 @@ const Wr = ({
|
|
|
3398
3396
|
}, c && (p = {
|
|
3399
3397
|
...p,
|
|
3400
3398
|
className: "gtm-trackable",
|
|
3401
|
-
"data-gtm-event-type":
|
|
3399
|
+
"data-gtm-event-type": x,
|
|
3402
3400
|
"data-gtm-event-context": "HeaderButtons"
|
|
3403
3401
|
}), m && (p = {
|
|
3404
3402
|
...p,
|
|
@@ -3408,54 +3406,54 @@ const Wr = ({
|
|
|
3408
3406
|
});
|
|
3409
3407
|
}
|
|
3410
3408
|
const h = a.order && a.order[0] && a[a.order[0]], g = h && a[a.order[0]].order, v = p && window.location.pathname === a.href;
|
|
3411
|
-
let
|
|
3409
|
+
let w = {}, y = {};
|
|
3412
3410
|
if (h) {
|
|
3413
|
-
const
|
|
3414
|
-
onClick: ($) =>
|
|
3415
|
-
onFocus: () =>
|
|
3416
|
-
onBlur: () =>
|
|
3417
|
-
onMouseLeave: () =>
|
|
3418
|
-
onMouseEnter: () =>
|
|
3411
|
+
const x = a.menuId || e, _ = {
|
|
3412
|
+
onClick: ($) => Q.events.onClick($, { id: x, callback: o, isOpen: r[x] }),
|
|
3413
|
+
onFocus: () => Q.events.onFocus({ id: x }),
|
|
3414
|
+
onBlur: () => Q.events.onBlur({ id: x, callback: o }),
|
|
3415
|
+
onMouseLeave: () => Q.events.onBlur({ id: x, callback: o }),
|
|
3416
|
+
onMouseEnter: () => Q.events.onMouseEnter({ id: x, callback: o })
|
|
3419
3417
|
};
|
|
3420
|
-
n && (g && (
|
|
3421
|
-
...
|
|
3418
|
+
n && (g && (w = {
|
|
3419
|
+
..._,
|
|
3422
3420
|
onKeyPress: ($) => {
|
|
3423
|
-
$.key === "Enter" &&
|
|
3421
|
+
$.key === "Enter" && Q.events.onClick($, { id: x, callback: o, isOpen: r[x] });
|
|
3424
3422
|
},
|
|
3425
3423
|
tabIndex: "0",
|
|
3426
3424
|
// Add a `tabIndex` so keyboard users can focus on the `li`
|
|
3427
3425
|
"aria-haspopup": !0,
|
|
3428
|
-
"aria-expanded": r[
|
|
3429
|
-
"aria-controls":
|
|
3430
|
-
}), y = { hidden:
|
|
3426
|
+
"aria-expanded": r[x],
|
|
3427
|
+
"aria-controls": x
|
|
3428
|
+
}), y = { hidden: x in r ? !r[x] : !0 }), g || (y = {
|
|
3431
3429
|
...y,
|
|
3432
|
-
...
|
|
3430
|
+
..._
|
|
3433
3431
|
});
|
|
3434
3432
|
}
|
|
3435
|
-
return /* @__PURE__ */ s.jsxs("li", { className: E({ [a.className]: a.className, "has-submenu": h, parent: g, active: v }), role: "none", ...
|
|
3436
|
-
p ?
|
|
3437
|
-
a.order && /* @__PURE__ */ s.jsx("ul", { ...y, children: a.order.map((
|
|
3438
|
-
if (!a[
|
|
3433
|
+
return /* @__PURE__ */ s.jsxs("li", { className: E({ [a.className]: a.className, "has-submenu": h, parent: g, active: v }), role: "none", ...w, children: [
|
|
3434
|
+
p ? P.createElement(m ? U : "a", p, l.formatMessage({ id: d })) : l.formatMessage({ id: d }),
|
|
3435
|
+
a.order && /* @__PURE__ */ s.jsx("ul", { ...y, children: a.order.map((x) => {
|
|
3436
|
+
if (!a[x])
|
|
3439
3437
|
return null;
|
|
3440
|
-
const
|
|
3438
|
+
const _ = {
|
|
3441
3439
|
isLoggedIn: t,
|
|
3442
3440
|
isDesktopVersion: n,
|
|
3443
3441
|
menus: r,
|
|
3444
3442
|
callback: o,
|
|
3445
3443
|
doTrack: u ? c : null
|
|
3446
3444
|
};
|
|
3447
|
-
return a[
|
|
3448
|
-
l.formatMessage({ id: `${d}_${
|
|
3449
|
-
/* @__PURE__ */ s.jsx("ul", { children: a[
|
|
3450
|
-
] },
|
|
3445
|
+
return a[x].order ? /* @__PURE__ */ s.jsxs("li", { className: E({ [a[x].className]: a[x].className }), children: [
|
|
3446
|
+
l.formatMessage({ id: `${d}_${x}` }),
|
|
3447
|
+
/* @__PURE__ */ s.jsx("ul", { children: a[x].order.map(($) => /* @__PURE__ */ s.jsx(gt, { id: `${e}.${x}.${$}`, ..._ }, $)) })
|
|
3448
|
+
] }, x) : /* @__PURE__ */ s.jsx(gt, { id: `${e}.${x}`, ..._ }, x);
|
|
3451
3449
|
}) })
|
|
3452
3450
|
] }, e);
|
|
3453
3451
|
};
|
|
3454
|
-
const zr = { height: 67, height_desktop: 83 },
|
|
3452
|
+
const zr = { height: 67, height_desktop: 83 }, es = ({ showNavigation: e = !0 }) => {
|
|
3455
3453
|
const t = C(), n = we(Se), r = kt(!0, !0), o = n && typeof n.id == "string", i = bt(
|
|
3456
|
-
() =>
|
|
3454
|
+
() => Q.getIsDesktopVersion(o, r),
|
|
3457
3455
|
[o, r]
|
|
3458
|
-
), [l, a] =
|
|
3456
|
+
), [l, a] = vs(nr, {
|
|
3459
3457
|
headerIsVisible: !0,
|
|
3460
3458
|
menus: { navigation: !1, search: !1, account: !1 },
|
|
3461
3459
|
focusElements: {
|
|
@@ -3463,22 +3461,22 @@ const zr = { height: 67, height_desktop: 83 }, ts = ({ showNavigation: e = !0 })
|
|
|
3463
3461
|
account: { desktop: !1, default: !1 }
|
|
3464
3462
|
}
|
|
3465
3463
|
}), { headerIsVisible: u, menus: c, focusElements: m } = l;
|
|
3466
|
-
|
|
3464
|
+
zs({
|
|
3467
3465
|
scrollPosition: zr[`height${i.navigation ? "_desktop" : ""}`],
|
|
3468
3466
|
callbacks: {
|
|
3469
3467
|
scrollUp: () => {
|
|
3470
|
-
!i && c.navigation ||
|
|
3468
|
+
!i && c.navigation || Q.shouldChangeHeaderIsVisible(!0, c, a);
|
|
3471
3469
|
},
|
|
3472
3470
|
scrollDown: () => {
|
|
3473
|
-
!i && c.navigation ||
|
|
3471
|
+
!i && c.navigation || Q.shouldChangeHeaderIsVisible(!1, c, a);
|
|
3474
3472
|
}
|
|
3475
3473
|
}
|
|
3476
3474
|
});
|
|
3477
3475
|
const d = (h, g) => {
|
|
3478
|
-
|
|
3476
|
+
Q.handleMenus({ id: h, value: g, menus: c, dispatch: a });
|
|
3479
3477
|
}, p = ae(null);
|
|
3480
3478
|
return Qe(() => {
|
|
3481
|
-
c.navigation &&
|
|
3479
|
+
c.navigation && Q.autoFocus({
|
|
3482
3480
|
menu: "navigation",
|
|
3483
3481
|
navigationRef: p,
|
|
3484
3482
|
isDesktopVersion: i.navigation,
|
|
@@ -3486,7 +3484,7 @@ const zr = { height: 67, height_desktop: 83 }, ts = ({ showNavigation: e = !0 })
|
|
|
3486
3484
|
dispatch: a
|
|
3487
3485
|
});
|
|
3488
3486
|
}, [c.navigation]), Qe(() => {
|
|
3489
|
-
c.account &&
|
|
3487
|
+
c.account && Q.autoFocus({
|
|
3490
3488
|
menu: "account",
|
|
3491
3489
|
navigationRef: p,
|
|
3492
3490
|
isDesktopVersion: i.navigation,
|
|
@@ -3505,14 +3503,14 @@ const zr = { height: 67, height_desktop: 83 }, ts = ({ showNavigation: e = !0 })
|
|
|
3505
3503
|
}),
|
|
3506
3504
|
children: [
|
|
3507
3505
|
/* @__PURE__ */ s.jsx(
|
|
3508
|
-
|
|
3506
|
+
me,
|
|
3509
3507
|
{
|
|
3510
3508
|
element: "a",
|
|
3511
3509
|
href: "#content-of-page",
|
|
3512
3510
|
children: t.formatMessage({ id: "header_skip" })
|
|
3513
3511
|
}
|
|
3514
3512
|
),
|
|
3515
|
-
/* @__PURE__ */ s.jsx(
|
|
3513
|
+
/* @__PURE__ */ s.jsx(Jn, {}),
|
|
3516
3514
|
e && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3517
3515
|
!i.navigation && /* @__PURE__ */ s.jsx(
|
|
3518
3516
|
"button",
|
|
@@ -3526,7 +3524,7 @@ const zr = { height: 67, height_desktop: 83 }, ts = ({ showNavigation: e = !0 })
|
|
|
3526
3524
|
"aria-haspopup": "true",
|
|
3527
3525
|
"aria-expanded": c.navigation,
|
|
3528
3526
|
"aria-controls": "navigation",
|
|
3529
|
-
children: /* @__PURE__ */ s.jsx(
|
|
3527
|
+
children: /* @__PURE__ */ s.jsx(me, { children: t.formatMessage({
|
|
3530
3528
|
id: `header_menu_${c.navigation ? "hide" : "show"}`
|
|
3531
3529
|
}) })
|
|
3532
3530
|
}
|
|
@@ -3563,7 +3561,7 @@ const zr = { height: 67, height_desktop: 83 }, ts = ({ showNavigation: e = !0 })
|
|
|
3563
3561
|
"aria-expanded": c.search,
|
|
3564
3562
|
"aria-controls": "search-form",
|
|
3565
3563
|
children: /* @__PURE__ */ s.jsx(
|
|
3566
|
-
|
|
3564
|
+
me,
|
|
3567
3565
|
{
|
|
3568
3566
|
children: t.formatMessage({
|
|
3569
3567
|
id: `header_search_${c.search ? "hide" : "show"}`
|
|
@@ -3588,18 +3586,18 @@ const zr = { height: 67, height_desktop: 83 }, ts = ({ showNavigation: e = !0 })
|
|
|
3588
3586
|
"button",
|
|
3589
3587
|
{
|
|
3590
3588
|
className: "account-button",
|
|
3591
|
-
onClick: (h) =>
|
|
3589
|
+
onClick: (h) => Q.events.onClick(h, {
|
|
3592
3590
|
id: "account",
|
|
3593
3591
|
callback: d,
|
|
3594
3592
|
isOpen: c.account
|
|
3595
3593
|
}),
|
|
3596
|
-
onMouseEnter: () =>
|
|
3597
|
-
onMouseLeave: () =>
|
|
3594
|
+
onMouseEnter: () => Q.events.onMouseEnter({ id: "account", callback: d }),
|
|
3595
|
+
onMouseLeave: () => Q.events.onBlur({ id: "account", callback: d }),
|
|
3598
3596
|
"aria-haspopup": "true",
|
|
3599
3597
|
"aria-expanded": c.account,
|
|
3600
3598
|
"aria-controls": "navigation",
|
|
3601
3599
|
children: [
|
|
3602
|
-
/* @__PURE__ */ s.jsx(
|
|
3600
|
+
/* @__PURE__ */ s.jsx(me, { children: t.formatMessage({
|
|
3603
3601
|
id: `header_account_${c.account ? "hide" : "show"}`
|
|
3604
3602
|
}) }),
|
|
3605
3603
|
/* @__PURE__ */ s.jsx(
|
|
@@ -3627,7 +3625,7 @@ const zr = { height: 67, height_desktop: 83 }, ts = ({ showNavigation: e = !0 })
|
|
|
3627
3625
|
)
|
|
3628
3626
|
] });
|
|
3629
3627
|
};
|
|
3630
|
-
const
|
|
3628
|
+
const ts = ({ element: e = "section", children: t, className: n, ...r }) => P.createElement(
|
|
3631
3629
|
e,
|
|
3632
3630
|
{
|
|
3633
3631
|
className: E("modal", n),
|
|
@@ -3635,7 +3633,7 @@ const ns = ({ element: e = "section", children: t, className: n, ...r }) => D.cr
|
|
|
3635
3633
|
...r
|
|
3636
3634
|
}
|
|
3637
3635
|
);
|
|
3638
|
-
const
|
|
3636
|
+
const ns = ({
|
|
3639
3637
|
id: e = "content-overlay",
|
|
3640
3638
|
isOpen: t = !1,
|
|
3641
3639
|
showDivider: n = !0,
|
|
@@ -3650,25 +3648,25 @@ const ss = ({
|
|
|
3650
3648
|
className: m = "",
|
|
3651
3649
|
gtmContext: d = "Modal"
|
|
3652
3650
|
}) => {
|
|
3653
|
-
const p = C(), [h, g] =
|
|
3651
|
+
const p = C(), [h, g] = A(t), v = (y) => {
|
|
3654
3652
|
g(y), y ? (o(), document.body.classList.add("has-overlay")) : (i(), document.body.classList.remove("has-overlay"));
|
|
3655
3653
|
};
|
|
3656
|
-
|
|
3654
|
+
Y(() => {
|
|
3657
3655
|
v(t);
|
|
3658
3656
|
}, [t]);
|
|
3659
|
-
const
|
|
3657
|
+
const w = r ? { "--max-width": `${r / 16}rem` } : {};
|
|
3660
3658
|
return /* @__PURE__ */ s.jsx("div", { className: E("overlay", { open: h }), children: /* @__PURE__ */ s.jsx(
|
|
3661
|
-
|
|
3659
|
+
ts,
|
|
3662
3660
|
{
|
|
3663
3661
|
id: e,
|
|
3664
3662
|
className: E("overlay-modal", m, { "has-max-width": r }),
|
|
3665
3663
|
hidden: !h,
|
|
3666
|
-
style:
|
|
3664
|
+
style: w,
|
|
3667
3665
|
children: t && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3668
3666
|
/* @__PURE__ */ s.jsxs("div", { className: "top", children: [
|
|
3669
3667
|
a && /* @__PURE__ */ s.jsx("h2", { className: "modal-title", children: a }),
|
|
3670
3668
|
/* @__PURE__ */ s.jsx(
|
|
3671
|
-
|
|
3669
|
+
U,
|
|
3672
3670
|
{
|
|
3673
3671
|
variant: "tertiary",
|
|
3674
3672
|
size: "medium",
|
|
@@ -3696,7 +3694,7 @@ const ss = ({
|
|
|
3696
3694
|
"aria-expanded": t,
|
|
3697
3695
|
"aria-controls": e
|
|
3698
3696
|
});
|
|
3699
|
-
const
|
|
3697
|
+
const vo = ({
|
|
3700
3698
|
className: e,
|
|
3701
3699
|
showModal: t = !0,
|
|
3702
3700
|
title: n,
|
|
@@ -3709,7 +3707,7 @@ const bo = ({
|
|
|
3709
3707
|
},
|
|
3710
3708
|
sendInvites: c
|
|
3711
3709
|
}) => /* @__PURE__ */ s.jsx(
|
|
3712
|
-
|
|
3710
|
+
ns,
|
|
3713
3711
|
{
|
|
3714
3712
|
title: n,
|
|
3715
3713
|
isOpen: t,
|
|
@@ -3733,7 +3731,7 @@ const bo = ({
|
|
|
3733
3731
|
const Yr = () => {
|
|
3734
3732
|
const e = C();
|
|
3735
3733
|
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3736
|
-
/* @__PURE__ */ s.jsx(
|
|
3734
|
+
/* @__PURE__ */ s.jsx(es, {}),
|
|
3737
3735
|
/* @__PURE__ */ s.jsx("div", { id: "content", children: /* @__PURE__ */ s.jsx(
|
|
3738
3736
|
Et,
|
|
3739
3737
|
{
|
|
@@ -3741,7 +3739,7 @@ const Yr = () => {
|
|
|
3741
3739
|
text: e.formatMessage({ id: "pageLayout_error" })
|
|
3742
3740
|
}
|
|
3743
3741
|
) }),
|
|
3744
|
-
/* @__PURE__ */ s.jsx(
|
|
3742
|
+
/* @__PURE__ */ s.jsx(qn, {})
|
|
3745
3743
|
] });
|
|
3746
3744
|
}, Gr = ({
|
|
3747
3745
|
children: e,
|
|
@@ -3752,36 +3750,36 @@ const Yr = () => {
|
|
|
3752
3750
|
className: l = "",
|
|
3753
3751
|
locale: a = "en"
|
|
3754
3752
|
}) => {
|
|
3755
|
-
const { navigation: u = !0, footer: c = !0 } = o, { background: m = "default", variant: d = "default", circle: p = "default" } = i, h =
|
|
3756
|
-
|
|
3753
|
+
const { navigation: u = !0, footer: c = !0 } = o, { background: m = "default", variant: d = "default", circle: p = "default" } = i, h = Us();
|
|
3754
|
+
Y(() => {
|
|
3757
3755
|
window.scrollTo(0, 0);
|
|
3758
3756
|
}, [h]);
|
|
3759
3757
|
const g = ut(e, { locale: a }), v = ut(t, {
|
|
3760
3758
|
locale: a
|
|
3761
|
-
}),
|
|
3759
|
+
}), w = ut(n, {
|
|
3762
3760
|
locale: a
|
|
3763
3761
|
}), y = {};
|
|
3764
|
-
return m !== "default" && (y[m] = !0), d !== "default" && (y[d] = !0), p !== "default" && (y[p] = !0), /* @__PURE__ */ s.jsx(
|
|
3762
|
+
return m !== "default" && (y[m] = !0), d !== "default" && (y[d] = !0), p !== "default" && (y[p] = !0), /* @__PURE__ */ s.jsx(Rs, { onError: r, fallback: /* @__PURE__ */ s.jsx(Yr, {}), children: /* @__PURE__ */ s.jsx(ws, { fallback: null, children: /* @__PURE__ */ s.jsxs(
|
|
3765
3763
|
"div",
|
|
3766
3764
|
{
|
|
3767
3765
|
id: "wrapper",
|
|
3768
3766
|
className: E(l, y, { "has-footer": c }),
|
|
3769
3767
|
children: [
|
|
3770
|
-
/* @__PURE__ */ s.jsx(
|
|
3768
|
+
/* @__PURE__ */ s.jsx(es, { showNavigation: u }),
|
|
3771
3769
|
/* @__PURE__ */ s.jsxs("section", { id: "content-wrapper", children: [
|
|
3772
3770
|
v && /* @__PURE__ */ s.jsx("div", { className: "additional-content prepended", children: v }),
|
|
3773
|
-
|
|
3771
|
+
P.createElement(m === "bold" ? ts : "div", {
|
|
3774
3772
|
id: "content",
|
|
3775
3773
|
children: g
|
|
3776
3774
|
})
|
|
3777
3775
|
] }),
|
|
3778
|
-
|
|
3779
|
-
c && /* @__PURE__ */ s.jsx(
|
|
3776
|
+
w && /* @__PURE__ */ s.jsx("div", { className: "additional-content appended", children: w }),
|
|
3777
|
+
c && /* @__PURE__ */ s.jsx(qn, {}),
|
|
3780
3778
|
/* @__PURE__ */ s.jsx(Br, {})
|
|
3781
3779
|
]
|
|
3782
3780
|
}
|
|
3783
3781
|
) }) });
|
|
3784
|
-
},
|
|
3782
|
+
}, En = {
|
|
3785
3783
|
default: "tags_",
|
|
3786
3784
|
headerTopics: "header_topics_topics_"
|
|
3787
3785
|
}, Qt = {
|
|
@@ -3805,14 +3803,14 @@ const Yr = () => {
|
|
|
3805
3803
|
if (e.includes("topic_")) {
|
|
3806
3804
|
if (e = Qt.topic[e.replace("topic_", "")], e) {
|
|
3807
3805
|
const t = pt.topics.topics[e].href;
|
|
3808
|
-
return t ? { id: e, href: t, text: `${
|
|
3806
|
+
return t ? { id: e, href: t, text: `${En.headerTopics}${e}` } : null;
|
|
3809
3807
|
}
|
|
3810
3808
|
return null;
|
|
3811
3809
|
}
|
|
3812
|
-
return Qt[e] ? (e = Qt[e], { id: e, text: `${
|
|
3810
|
+
return Qt[e] ? (e = Qt[e], { id: e, text: `${En.default}${e}` }) : null;
|
|
3813
3811
|
}
|
|
3814
3812
|
};
|
|
3815
|
-
const
|
|
3813
|
+
const wo = ({
|
|
3816
3814
|
tags: e = [],
|
|
3817
3815
|
color: t = "default",
|
|
3818
3816
|
forceOneLine: n = !1,
|
|
@@ -3844,7 +3842,7 @@ const vo = ({
|
|
|
3844
3842
|
) : m }, c.id);
|
|
3845
3843
|
}) });
|
|
3846
3844
|
};
|
|
3847
|
-
const
|
|
3845
|
+
const ko = ({
|
|
3848
3846
|
members: { data: e = [], total: t = e.length },
|
|
3849
3847
|
hasNextPage: n = !1,
|
|
3850
3848
|
loadNextPage: r = () => {
|
|
@@ -3864,7 +3862,7 @@ const wo = ({
|
|
|
3864
3862
|
u.isAdmin && /* @__PURE__ */ s.jsx(ft, { children: a.formatMessage({ id: "membersList_admin" }) })
|
|
3865
3863
|
] }, c)) }),
|
|
3866
3864
|
n && /* @__PURE__ */ s.jsx(
|
|
3867
|
-
|
|
3865
|
+
Gn,
|
|
3868
3866
|
{
|
|
3869
3867
|
hasNextPage: n,
|
|
3870
3868
|
loadNextPage: r,
|
|
@@ -3875,7 +3873,7 @@ const wo = ({
|
|
|
3875
3873
|
] });
|
|
3876
3874
|
};
|
|
3877
3875
|
let ct = null;
|
|
3878
|
-
const ge = "discussion_form_",
|
|
3876
|
+
const ge = "discussion_form_", ss = ({
|
|
3879
3877
|
content: e = { type: "response", slugs: {} },
|
|
3880
3878
|
userHasPermissions: t = !0,
|
|
3881
3879
|
meta: n = {
|
|
@@ -3906,10 +3904,10 @@ const ge = "discussion_form_", rs = ({
|
|
|
3906
3904
|
},
|
|
3907
3905
|
gtmContext: u = "DiscussionForm"
|
|
3908
3906
|
}) => {
|
|
3909
|
-
var
|
|
3910
|
-
const c = C(), m = we(Se), [d, p] =
|
|
3907
|
+
var M, F;
|
|
3908
|
+
const c = C(), m = we(Se), [d, p] = A(
|
|
3911
3909
|
n.isEditing && n.isEditing.text || ""
|
|
3912
|
-
), [h, g] =
|
|
3910
|
+
), [h, g] = A(l.error || !1), [v, w] = A(!1), y = ae(null);
|
|
3913
3911
|
if (r || (r = y), n.isLoading)
|
|
3914
3912
|
return /* @__PURE__ */ s.jsx(
|
|
3915
3913
|
Te,
|
|
@@ -3918,33 +3916,33 @@ const ge = "discussion_form_", rs = ({
|
|
|
3918
3916
|
"data-testid": "loading-placeholder"
|
|
3919
3917
|
}
|
|
3920
3918
|
);
|
|
3921
|
-
const
|
|
3922
|
-
const
|
|
3923
|
-
p(
|
|
3919
|
+
const x = (b) => {
|
|
3920
|
+
const z = b.target.value;
|
|
3921
|
+
p(z);
|
|
3924
3922
|
let k;
|
|
3925
3923
|
!m || !m.id ? k = $e(
|
|
3926
3924
|
c.formatMessage,
|
|
3927
3925
|
`${ge}error_loggedOut`,
|
|
3928
3926
|
e.type,
|
|
3929
3927
|
"action"
|
|
3930
|
-
) : t ?
|
|
3928
|
+
) : t ? z.length >= o && (k = `${ge}error_tooLong`) : k = $e(
|
|
3931
3929
|
c.formatMessage,
|
|
3932
3930
|
`${ge}error_noPermission`,
|
|
3933
3931
|
e.type,
|
|
3934
3932
|
"action"
|
|
3935
3933
|
), k ? g(k) : h && g(!1);
|
|
3936
3934
|
};
|
|
3937
|
-
let
|
|
3935
|
+
let _ = `${e.type}-form`;
|
|
3938
3936
|
if (e.type === "response" || e.type === "reply") {
|
|
3939
|
-
const b = e.type === "response" ? ((
|
|
3940
|
-
b && (
|
|
3937
|
+
const b = e.type === "response" ? ((M = e.slugs) == null ? void 0 : M.question) || "" : ((F = e.slugs) == null ? void 0 : F.answer) || "";
|
|
3938
|
+
b && (_ = `${_}-${b.slice(-15)}`);
|
|
3941
3939
|
}
|
|
3942
3940
|
const $ = async (b) => {
|
|
3943
3941
|
var k;
|
|
3944
|
-
if (b.preventDefault(), b.stopPropagation(), !m || !m.id || !t ||
|
|
3942
|
+
if (b.preventDefault(), b.stopPropagation(), !m || !m.id || !t || D)
|
|
3945
3943
|
return;
|
|
3946
|
-
ct && clearTimeout(ct),
|
|
3947
|
-
const
|
|
3944
|
+
ct && clearTimeout(ct), w("submitting");
|
|
3945
|
+
const z = window.location.pathname;
|
|
3948
3946
|
try {
|
|
3949
3947
|
let L;
|
|
3950
3948
|
switch (e.type) {
|
|
@@ -3961,20 +3959,20 @@ const ge = "discussion_form_", rs = ({
|
|
|
3961
3959
|
case "response":
|
|
3962
3960
|
L = await a.create(
|
|
3963
3961
|
{ question: e.slugs.question },
|
|
3964
|
-
{ body: d, authorId: m && m.id, contentPath:
|
|
3962
|
+
{ body: d, authorId: m && m.id, contentPath: z }
|
|
3965
3963
|
);
|
|
3966
3964
|
break;
|
|
3967
3965
|
case "reply":
|
|
3968
3966
|
L = await a.create(
|
|
3969
3967
|
{ question: e.slugs.question, answer: e.slugs.answer },
|
|
3970
|
-
{ body: d, authorId: m && m.id, contentPath:
|
|
3968
|
+
{ body: d, authorId: m && m.id, contentPath: z }
|
|
3971
3969
|
);
|
|
3972
3970
|
break;
|
|
3973
3971
|
default:
|
|
3974
3972
|
break;
|
|
3975
3973
|
}
|
|
3976
|
-
await
|
|
3977
|
-
p(""),
|
|
3974
|
+
await sr(1e3), a.callback && await a.callback(L), ct = setTimeout(() => {
|
|
3975
|
+
p(""), w("submitted"), N();
|
|
3978
3976
|
}, 500);
|
|
3979
3977
|
} catch (L) {
|
|
3980
3978
|
const J = L;
|
|
@@ -3989,14 +3987,14 @@ const ge = "discussion_form_", rs = ({
|
|
|
3989
3987
|
`${ge}error_tooMany`,
|
|
3990
3988
|
e.type,
|
|
3991
3989
|
"action"
|
|
3992
|
-
) : J.message.includes("400") && (q = `${ge}error`), g(q),
|
|
3990
|
+
) : J.message.includes("400") && (q = `${ge}error`), g(q), N();
|
|
3993
3991
|
}
|
|
3994
|
-
},
|
|
3992
|
+
}, N = () => {
|
|
3995
3993
|
ct = setTimeout(() => {
|
|
3996
|
-
g(!1),
|
|
3994
|
+
g(!1), w(!1);
|
|
3997
3995
|
}, 5e3);
|
|
3998
|
-
},
|
|
3999
|
-
return (n.isEditing && !
|
|
3996
|
+
}, D = !d || !tr(d), G = v === "submitting", B = [];
|
|
3997
|
+
return (n.isEditing && !G || l.cancel) && B.push({
|
|
4000
3998
|
variant: "secondary",
|
|
4001
3999
|
size: { mobile: "small", 600: "medium" },
|
|
4002
4000
|
onClick: a.handleCancel,
|
|
@@ -4005,12 +4003,12 @@ const ge = "discussion_form_", rs = ({
|
|
|
4005
4003
|
"data-gtm-event-type": `cancel-${e.type}-click`,
|
|
4006
4004
|
disabled: !l.cancel && (!m || !m.id || !d),
|
|
4007
4005
|
children: c.formatMessage({ id: `${ge}cancel` })
|
|
4008
|
-
}),
|
|
4006
|
+
}), B.push({
|
|
4009
4007
|
variant: "primary",
|
|
4010
4008
|
size: { mobile: "small", 600: "medium" },
|
|
4011
4009
|
onClick: (b) => {
|
|
4012
4010
|
if (n.isEditing) {
|
|
4013
|
-
|
|
4011
|
+
w("submitting"), a.handleSaveEdit && a.handleSaveEdit(
|
|
4014
4012
|
y.current && "value" in y.current ? y.current.value : ""
|
|
4015
4013
|
);
|
|
4016
4014
|
return;
|
|
@@ -4021,14 +4019,14 @@ const ge = "discussion_form_", rs = ({
|
|
|
4021
4019
|
"data-gtm-event-context": u,
|
|
4022
4020
|
"data-gtm-event-type": `${n.isEditing ? "save" : "submit"}-${e.type}-click`,
|
|
4023
4021
|
"data-testid": "save-button",
|
|
4024
|
-
disabled: !m || !m.id || !t ||
|
|
4022
|
+
disabled: !m || !m.id || !t || D || G || n.isEditing && d === n.isEditing.text,
|
|
4025
4023
|
children: c.formatMessage({
|
|
4026
|
-
id: `${ge}${
|
|
4024
|
+
id: `${ge}${G ? n.isEditing ? "saving" : "posting" : n.isEditing ? "save" : "post"}`
|
|
4027
4025
|
})
|
|
4028
4026
|
}), /* @__PURE__ */ s.jsxs(
|
|
4029
4027
|
"form",
|
|
4030
4028
|
{
|
|
4031
|
-
id:
|
|
4029
|
+
id: _,
|
|
4032
4030
|
className: E("discussion-card discussion-form", {
|
|
4033
4031
|
"no-styling": n.isInWrapper && n.isEditing
|
|
4034
4032
|
}),
|
|
@@ -4043,12 +4041,12 @@ const ge = "discussion_form_", rs = ({
|
|
|
4043
4041
|
gtmType: "profile-click"
|
|
4044
4042
|
}
|
|
4045
4043
|
),
|
|
4046
|
-
/* @__PURE__ */ s.jsx(
|
|
4044
|
+
/* @__PURE__ */ s.jsx(me, { element: "label", showOnFocus: !1, htmlFor: `${_}-input`, children: $e(c.formatMessage, `${ge}label`, e.type, "action") }),
|
|
4047
4045
|
/* @__PURE__ */ s.jsx(
|
|
4048
|
-
|
|
4046
|
+
As,
|
|
4049
4047
|
{
|
|
4050
4048
|
ref: r,
|
|
4051
|
-
id: `${
|
|
4049
|
+
id: `${_}-input`,
|
|
4052
4050
|
name: e.type,
|
|
4053
4051
|
placeholder: $e(
|
|
4054
4052
|
c.formatMessage,
|
|
@@ -4056,7 +4054,7 @@ const ge = "discussion_form_", rs = ({
|
|
|
4056
4054
|
e.type,
|
|
4057
4055
|
"action"
|
|
4058
4056
|
),
|
|
4059
|
-
onChange:
|
|
4057
|
+
onChange: x,
|
|
4060
4058
|
value: d,
|
|
4061
4059
|
maxLength: o,
|
|
4062
4060
|
"aria-invalid": !!h,
|
|
@@ -4079,7 +4077,7 @@ const ge = "discussion_form_", rs = ({
|
|
|
4079
4077
|
}
|
|
4080
4078
|
)
|
|
4081
4079
|
}) }),
|
|
4082
|
-
/* @__PURE__ */ s.jsx(jt, { buttons:
|
|
4080
|
+
/* @__PURE__ */ s.jsx(jt, { buttons: B }),
|
|
4083
4081
|
v === "submitted" && /* @__PURE__ */ s.jsx(Xt, { className: "success", "data-testid": "success", children: $e(c.formatMessage, `${ge}success`, e.type, "action") }),
|
|
4084
4082
|
h && /* @__PURE__ */ s.jsx(Xt, { id: "error-message", className: "error", "data-testid": "error", children: l.error ? l.error : typeof h == "string" ? h.includes(" ") ? h : c.formatMessage(
|
|
4085
4083
|
{ id: h },
|
|
@@ -4103,11 +4101,11 @@ const ge = "discussion_form_", rs = ({
|
|
|
4103
4101
|
text: l,
|
|
4104
4102
|
button: {
|
|
4105
4103
|
breakpoints: { mobile: !0, 901: !1 },
|
|
4106
|
-
component: /* @__PURE__ */ s.jsx(
|
|
4104
|
+
component: /* @__PURE__ */ s.jsx(Yn, { isShort: !0, functions: { join: o, leave: i } })
|
|
4107
4105
|
}
|
|
4108
4106
|
}
|
|
4109
4107
|
) : /* @__PURE__ */ s.jsx(
|
|
4110
|
-
|
|
4108
|
+
ss,
|
|
4111
4109
|
{
|
|
4112
4110
|
content: { type: e, slugs: {} },
|
|
4113
4111
|
functions: {
|
|
@@ -4118,7 +4116,7 @@ const ge = "discussion_form_", rs = ({
|
|
|
4118
4116
|
showThread: !1,
|
|
4119
4117
|
showForm: !1
|
|
4120
4118
|
}, St = Kt(qr), Xr = ({ children: e }) => {
|
|
4121
|
-
const [t, n] =
|
|
4119
|
+
const [t, n] = A({
|
|
4122
4120
|
showThread: !1,
|
|
4123
4121
|
showForm: !1
|
|
4124
4122
|
});
|
|
@@ -4148,11 +4146,11 @@ const Ut = () => {
|
|
|
4148
4146
|
} } = {}
|
|
4149
4147
|
}) => {
|
|
4150
4148
|
const c = C();
|
|
4151
|
-
|
|
4149
|
+
Y(() => {
|
|
4152
4150
|
h(o);
|
|
4153
4151
|
}, [o]);
|
|
4154
|
-
const [m, d] =
|
|
4155
|
-
if (
|
|
4152
|
+
const [m, d] = A(t), [p, h] = A(o), [g, v] = A(!1), [w, y] = A(!1), x = bt(() => Kr(n, Wt), [n]), _ = (N) => {
|
|
4153
|
+
if (N.preventDefault(), N.stopPropagation(), y(!1), Ze)
|
|
4156
4154
|
return Ut(), !1;
|
|
4157
4155
|
if (Ut(), g || !l)
|
|
4158
4156
|
return !1;
|
|
@@ -4160,12 +4158,12 @@ const Ut = () => {
|
|
|
4160
4158
|
}, $ = async () => {
|
|
4161
4159
|
if (Ut(), g || !l)
|
|
4162
4160
|
return !1;
|
|
4163
|
-
let
|
|
4164
|
-
|
|
4161
|
+
let N = p ? m - 1 : m + 1;
|
|
4162
|
+
N < 0 && (N = 0), v(!0), d(N), h(!p);
|
|
4165
4163
|
try {
|
|
4166
4164
|
if (i && i.slugs) {
|
|
4167
|
-
const
|
|
4168
|
-
p ? await u(
|
|
4165
|
+
const D = Zr(i.slugs);
|
|
4166
|
+
p ? await u(D) : await a(D, { contentPath: window.location.pathname });
|
|
4169
4167
|
}
|
|
4170
4168
|
} catch {
|
|
4171
4169
|
d(t), h(o);
|
|
@@ -4173,11 +4171,11 @@ const Ut = () => {
|
|
|
4173
4171
|
v(!1);
|
|
4174
4172
|
}
|
|
4175
4173
|
};
|
|
4176
|
-
return
|
|
4174
|
+
return P.createElement(
|
|
4177
4175
|
e,
|
|
4178
4176
|
{
|
|
4179
4177
|
className: E("likes-wrapper text-medium action-button", { "show-spinner": g, "is-liked": p, disabled: !l }),
|
|
4180
|
-
onClick:
|
|
4178
|
+
onClick: _,
|
|
4181
4179
|
onMouseEnter: () => {
|
|
4182
4180
|
y(!0);
|
|
4183
4181
|
},
|
|
@@ -4192,7 +4190,7 @@ const Ut = () => {
|
|
|
4192
4190
|
},
|
|
4193
4191
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
4194
4192
|
/* @__PURE__ */ s.jsx(
|
|
4195
|
-
|
|
4193
|
+
U,
|
|
4196
4194
|
{
|
|
4197
4195
|
variant: "tertiary",
|
|
4198
4196
|
size: "medium",
|
|
@@ -4201,7 +4199,7 @@ const Ut = () => {
|
|
|
4201
4199
|
screenreaderText: l ? c.formatMessage({
|
|
4202
4200
|
id: `discussion_likes_${p ? "unlike" : "like"}`
|
|
4203
4201
|
}, { action: c.formatMessage({ id: `discussion_action_${i.type}` }) }) : !1,
|
|
4204
|
-
onClick:
|
|
4202
|
+
onClick: _,
|
|
4205
4203
|
disabled: !l,
|
|
4206
4204
|
"aria-hidden": !l,
|
|
4207
4205
|
"data-testid": "like-button",
|
|
@@ -4210,27 +4208,27 @@ const Ut = () => {
|
|
|
4210
4208
|
}
|
|
4211
4209
|
),
|
|
4212
4210
|
/* @__PURE__ */ s.jsx("span", { className: E("number-of-likes", { "no-likes": m === 0 }), "data-testid": "number-of-likes", children: c.formatMessage({ id: `discussion_likes${r ? "_short" : ""}` }, { number: m }) }),
|
|
4213
|
-
n && /* @__PURE__ */ s.jsx(
|
|
4214
|
-
|
|
4211
|
+
n && /* @__PURE__ */ s.jsx(or, { isOpen: w, isLoading: n.length === 0, children: n.length && /* @__PURE__ */ s.jsxs("ul", { children: [
|
|
4212
|
+
x.map((N) => typeof N == "string" || !N.name ? null : /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
|
|
4215
4213
|
yt,
|
|
4216
4214
|
{
|
|
4217
|
-
href:
|
|
4215
|
+
href: N.id ? `/profiles/${N.id}` : void 0,
|
|
4218
4216
|
gtmContext: "Likes",
|
|
4219
4217
|
gtmType: "liked-name-click",
|
|
4220
|
-
onClick: (
|
|
4221
|
-
children:
|
|
4218
|
+
onClick: (D) => D == null ? void 0 : D.stopPropagation(),
|
|
4219
|
+
children: N.name
|
|
4222
4220
|
}
|
|
4223
|
-
) },
|
|
4221
|
+
) }, N.id || window.btoa(N.name))),
|
|
4224
4222
|
n.length > Wt && /* @__PURE__ */ s.jsx("li", { children: c.formatMessage({ id: "discussion_likes_more" }, { number: n.length - Wt }) })
|
|
4225
4223
|
] }) })
|
|
4226
4224
|
] })
|
|
4227
4225
|
}
|
|
4228
4226
|
);
|
|
4229
|
-
},
|
|
4227
|
+
}, Sn = (e) => {
|
|
4230
4228
|
const t = {};
|
|
4231
4229
|
return Object.keys(e).forEach((n) => n.includes("Id") ? t[n] = e[n] : t[`${n}Slug`] = e[n]), t;
|
|
4232
4230
|
}, rn = (e, t) => e && !t;
|
|
4233
|
-
const
|
|
4231
|
+
const Ne = "discussion_", ta = 280, $t = ({
|
|
4234
4232
|
element: e = "div",
|
|
4235
4233
|
content: t,
|
|
4236
4234
|
userHasPermissions: n = !0,
|
|
@@ -4257,50 +4255,50 @@ const Ce = "discussion_", ta = 280, $t = ({
|
|
|
4257
4255
|
children: g,
|
|
4258
4256
|
isTruncated: v = !1
|
|
4259
4257
|
}) => {
|
|
4260
|
-
const
|
|
4258
|
+
const w = C(), y = we(Se), x = we(St), [_, $] = A({
|
|
4261
4259
|
body: t && t.body || "",
|
|
4262
4260
|
isEditing: !1,
|
|
4263
4261
|
didEdit: t && t.isEdited || !1
|
|
4264
|
-
}), [
|
|
4265
|
-
if (
|
|
4262
|
+
}), [N, D] = A(!1), [G, B] = A("");
|
|
4263
|
+
if (Y(() => {
|
|
4266
4264
|
$({
|
|
4267
|
-
...
|
|
4265
|
+
..._,
|
|
4268
4266
|
body: t && t.body || "",
|
|
4269
4267
|
didEdit: t && t.isEdited || !1
|
|
4270
4268
|
});
|
|
4271
4269
|
}, [t.isEdited]), r || !t || t.type === "answer" && (!t.slugs || !t.slugs.question))
|
|
4272
4270
|
return /* @__PURE__ */ s.jsx(Te, { className: "discussion-card discussion-post" });
|
|
4273
|
-
const { author:
|
|
4274
|
-
|
|
4271
|
+
const { author: M, canLike: F, createdAt: b, id: z, likes: k = 0, userLiked: L, comments: J = 0 } = t, q = v ? He(_.body, ta) : _.body, ce = y && y.id && typeof M != "string" && M.id && M.id === y.id || !1, le = typeof F == "boolean" ? F : n ? !ce : !1, de = async (I) => {
|
|
4272
|
+
I || (I = ""), B("");
|
|
4275
4273
|
try {
|
|
4276
|
-
if (!
|
|
4277
|
-
const
|
|
4278
|
-
await a(
|
|
4274
|
+
if (!Fs(I, _.body)) {
|
|
4275
|
+
const ue = t.type === "question" ? { title: I } : { body: I };
|
|
4276
|
+
await a(Sn(t.slugs), ue);
|
|
4279
4277
|
}
|
|
4280
|
-
$({ body:
|
|
4278
|
+
$({ body: I, isEditing: !1, didEdit: !0 });
|
|
4281
4279
|
} catch {
|
|
4282
|
-
|
|
4280
|
+
B(`${Ne}form_error`);
|
|
4283
4281
|
}
|
|
4284
|
-
},
|
|
4285
|
-
|
|
4286
|
-
const
|
|
4287
|
-
|
|
4282
|
+
}, V = () => {
|
|
4283
|
+
x && x.updateConversation && x.updateConversation({ showThread: !0, showForm: !0 }), setTimeout(() => {
|
|
4284
|
+
const ue = `reply-form-${(t.type === "answer" ? t.slug : t.slugs.answer || "").toLowerCase().slice(-15)}`, _e = document.getElementById(ue), fe = document.getElementById(`${ue}-input`);
|
|
4285
|
+
fe && fe.focus(), _e && _e.scrollIntoView({ behavior: "smooth" });
|
|
4288
4286
|
}, 0);
|
|
4289
|
-
},
|
|
4290
|
-
|
|
4287
|
+
}, se = () => {
|
|
4288
|
+
D(!1);
|
|
4291
4289
|
try {
|
|
4292
|
-
l(
|
|
4290
|
+
l(Sn(t.slugs));
|
|
4293
4291
|
} catch {
|
|
4294
|
-
|
|
4292
|
+
B("delete-error");
|
|
4295
4293
|
}
|
|
4296
|
-
},
|
|
4294
|
+
}, oe = [
|
|
4297
4295
|
{
|
|
4298
|
-
text:
|
|
4296
|
+
text: w.formatMessage({ id: `${Ne}moreMenu_report` }),
|
|
4299
4297
|
href: `mailto:community@apolitical.co?subject=${encodeURI(
|
|
4300
|
-
|
|
4298
|
+
w.formatMessage({ id: `${Ne}report_subject` })
|
|
4301
4299
|
)}&body=${encodeURI(
|
|
4302
|
-
|
|
4303
|
-
{ id: `${
|
|
4300
|
+
w.formatMessage(
|
|
4301
|
+
{ id: `${Ne}report_body` },
|
|
4304
4302
|
{
|
|
4305
4303
|
contentType: t.type || "",
|
|
4306
4304
|
contentSlug: t.slug || "",
|
|
@@ -4311,68 +4309,68 @@ const Ce = "discussion_", ta = 280, $t = ({
|
|
|
4311
4309
|
icon: "flag"
|
|
4312
4310
|
}
|
|
4313
4311
|
];
|
|
4314
|
-
return n &&
|
|
4312
|
+
return n && ce && oe.push(
|
|
4315
4313
|
{
|
|
4316
|
-
text:
|
|
4317
|
-
onClick: () => $({ ...
|
|
4314
|
+
text: w.formatMessage({ id: `${Ne}moreMenu_edit` }),
|
|
4315
|
+
onClick: () => $({ ..._, isEditing: !0 }),
|
|
4318
4316
|
icon: "pencil-paper",
|
|
4319
4317
|
className: "gtm-trackable",
|
|
4320
4318
|
"data-gtm-event-context": h,
|
|
4321
4319
|
"data-gtm-event-type": `edit-${t.type}-click`
|
|
4322
4320
|
},
|
|
4323
4321
|
{
|
|
4324
|
-
text:
|
|
4325
|
-
onClick: (
|
|
4326
|
-
|
|
4322
|
+
text: w.formatMessage({ id: `${Ne}moreMenu_delete` }),
|
|
4323
|
+
onClick: (I) => {
|
|
4324
|
+
I.preventDefault(), I.stopPropagation(), D(!0);
|
|
4327
4325
|
},
|
|
4328
4326
|
icon: "trash",
|
|
4329
4327
|
className: "gtm-trackable",
|
|
4330
4328
|
"data-gtm-event-context": h,
|
|
4331
4329
|
"data-gtm-event-type": `delete-${t.type}-click`,
|
|
4332
|
-
...Vr(`delete-${t.slug}-modal`,
|
|
4330
|
+
...Vr(`delete-${t.slug}-modal`, N)
|
|
4333
4331
|
}
|
|
4334
|
-
),
|
|
4332
|
+
), P.createElement(e, {
|
|
4335
4333
|
className: E("discussion-post", p),
|
|
4336
4334
|
"data-testid": `discussion-${t.type}-thread`,
|
|
4337
4335
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
4338
4336
|
/* @__PURE__ */ s.jsxs(
|
|
4339
4337
|
"div",
|
|
4340
4338
|
{
|
|
4341
|
-
id:
|
|
4339
|
+
id: z || t.slug,
|
|
4342
4340
|
className: E("discussion-card", t.type, {
|
|
4343
|
-
editing:
|
|
4344
|
-
"has-link": d.post && !
|
|
4341
|
+
editing: _.isEditing,
|
|
4342
|
+
"has-link": d.post && !_.isEditing
|
|
4345
4343
|
}),
|
|
4346
|
-
onClick: (
|
|
4347
|
-
!d.post ||
|
|
4344
|
+
onClick: (I) => {
|
|
4345
|
+
!d.post || _.isEditing || (I.preventDefault(), I.stopPropagation(), window.location.href = d.post);
|
|
4348
4346
|
},
|
|
4349
4347
|
children: [
|
|
4350
|
-
!
|
|
4348
|
+
!_.isEditing && /* @__PURE__ */ s.jsx(
|
|
4351
4349
|
nn,
|
|
4352
4350
|
{
|
|
4353
|
-
member:
|
|
4354
|
-
additionalContent: { createdAt: b, didEdit:
|
|
4355
|
-
className: typeof
|
|
4351
|
+
member: M,
|
|
4352
|
+
additionalContent: { createdAt: b, didEdit: _.didEdit },
|
|
4353
|
+
className: typeof M != "string" && M.id === o ? "highlighted" : "",
|
|
4356
4354
|
gtmContext: h,
|
|
4357
4355
|
gtmType: "profile-click"
|
|
4358
4356
|
}
|
|
4359
4357
|
),
|
|
4360
|
-
|
|
4361
|
-
|
|
4358
|
+
_.isEditing ? /* @__PURE__ */ s.jsx(
|
|
4359
|
+
ss,
|
|
4362
4360
|
{
|
|
4363
4361
|
content: { type: t.type, slugs: t.slugs },
|
|
4364
4362
|
userHasPermissions: n,
|
|
4365
4363
|
meta: {
|
|
4366
4364
|
isLoading: r,
|
|
4367
4365
|
isInWrapper: !0,
|
|
4368
|
-
isEditing: { text:
|
|
4366
|
+
isEditing: { text: _.body }
|
|
4369
4367
|
},
|
|
4370
4368
|
maxLength: t.type === "question" ? 250 : 5e4,
|
|
4371
4369
|
forceShow: {
|
|
4372
|
-
error:
|
|
4373
|
-
{ id:
|
|
4370
|
+
error: G !== "" && G !== "delete-error" ? w.formatMessage(
|
|
4371
|
+
{ id: G },
|
|
4374
4372
|
{
|
|
4375
|
-
action:
|
|
4373
|
+
action: w.formatMessage({
|
|
4376
4374
|
id: `discussion_action_${t.type}`
|
|
4377
4375
|
})
|
|
4378
4376
|
}
|
|
@@ -4380,9 +4378,9 @@ const Ce = "discussion_", ta = 280, $t = ({
|
|
|
4380
4378
|
},
|
|
4381
4379
|
functions: {
|
|
4382
4380
|
create: i,
|
|
4383
|
-
handleSaveEdit:
|
|
4381
|
+
handleSaveEdit: de,
|
|
4384
4382
|
handleCancel: () => {
|
|
4385
|
-
|
|
4383
|
+
B(""), $({ ..._, isEditing: !1 });
|
|
4386
4384
|
}
|
|
4387
4385
|
},
|
|
4388
4386
|
gtmContext: `${h}Form`
|
|
@@ -4394,13 +4392,13 @@ const Ce = "discussion_", ta = 280, $t = ({
|
|
|
4394
4392
|
className: "gtm-trackable",
|
|
4395
4393
|
"data-gtm-event-context": h,
|
|
4396
4394
|
"data-gtm-event-type": "title-click",
|
|
4397
|
-
children: /* @__PURE__ */ s.jsx(
|
|
4395
|
+
children: /* @__PURE__ */ s.jsx(wn, { options: { overrides: { a: _r } }, children: q })
|
|
4398
4396
|
}
|
|
4399
4397
|
) : /* @__PURE__ */ s.jsx(
|
|
4400
|
-
|
|
4398
|
+
wn,
|
|
4401
4399
|
{
|
|
4402
4400
|
options: {
|
|
4403
|
-
wrapper: t.type === "question" ? "h1" :
|
|
4401
|
+
wrapper: t.type === "question" ? "h1" : P.Fragment,
|
|
4404
4402
|
forceWrapper: t.type === "question",
|
|
4405
4403
|
forceInline: t.type === "question",
|
|
4406
4404
|
forceBlock: t.type !== "question"
|
|
@@ -4408,7 +4406,7 @@ const Ce = "discussion_", ta = 280, $t = ({
|
|
|
4408
4406
|
children: q
|
|
4409
4407
|
}
|
|
4410
4408
|
),
|
|
4411
|
-
!
|
|
4409
|
+
!_.isEditing && /* @__PURE__ */ s.jsxs(
|
|
4412
4410
|
"ul",
|
|
4413
4411
|
{
|
|
4414
4412
|
className: E("actions text-medium", t.type),
|
|
@@ -4422,7 +4420,7 @@ const Ce = "discussion_", ta = 280, $t = ({
|
|
|
4422
4420
|
isShort: !1,
|
|
4423
4421
|
userLiked: L,
|
|
4424
4422
|
content: { type: t.type, slugs: t.slugs },
|
|
4425
|
-
canLike:
|
|
4423
|
+
canLike: le,
|
|
4426
4424
|
peopleWhoLiked: t.peopleWhoLiked,
|
|
4427
4425
|
functions: {
|
|
4428
4426
|
createLike: u,
|
|
@@ -4434,12 +4432,12 @@ const Ce = "discussion_", ta = 280, $t = ({
|
|
|
4434
4432
|
"li",
|
|
4435
4433
|
{
|
|
4436
4434
|
className: "action-button",
|
|
4437
|
-
onClick: (
|
|
4438
|
-
|
|
4435
|
+
onClick: (I) => {
|
|
4436
|
+
I.preventDefault(), I.stopPropagation(), d.comments && (window.location.href = d.comments), typeof m == "function" && m();
|
|
4439
4437
|
},
|
|
4440
4438
|
children: [
|
|
4441
4439
|
/* @__PURE__ */ s.jsx(
|
|
4442
|
-
|
|
4440
|
+
U,
|
|
4443
4441
|
{
|
|
4444
4442
|
variant: "tertiary",
|
|
4445
4443
|
size: "medium",
|
|
@@ -4450,35 +4448,35 @@ const Ce = "discussion_", ta = 280, $t = ({
|
|
|
4450
4448
|
className: "gtm-trackable",
|
|
4451
4449
|
"data-gtm-event-context": h,
|
|
4452
4450
|
"data-gtm-event-type": `answer-${t.type}-click`,
|
|
4453
|
-
screenreaderText:
|
|
4454
|
-
{ id: `${
|
|
4451
|
+
screenreaderText: w.formatMessage(
|
|
4452
|
+
{ id: `${Ne}comments_screenReader` },
|
|
4455
4453
|
{ count: J }
|
|
4456
4454
|
)
|
|
4457
4455
|
}
|
|
4458
4456
|
),
|
|
4459
|
-
/* @__PURE__ */ s.jsx("span", { children:
|
|
4460
|
-
{ id: `${
|
|
4457
|
+
/* @__PURE__ */ s.jsx("span", { children: w.formatMessage(
|
|
4458
|
+
{ id: `${Ne}comments` },
|
|
4461
4459
|
{ count: J }
|
|
4462
4460
|
) })
|
|
4463
4461
|
]
|
|
4464
4462
|
}
|
|
4465
4463
|
),
|
|
4466
4464
|
(t.type === "answer" || t.type === "reply") && /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
|
|
4467
|
-
|
|
4465
|
+
U,
|
|
4468
4466
|
{
|
|
4469
4467
|
variant: "tertiary",
|
|
4470
4468
|
size: "medium",
|
|
4471
4469
|
styling: { muted: !0 },
|
|
4472
|
-
onClick:
|
|
4473
|
-
children:
|
|
4470
|
+
onClick: V,
|
|
4471
|
+
children: w.formatMessage({ id: `${Ne}reply` })
|
|
4474
4472
|
}
|
|
4475
4473
|
) }),
|
|
4476
4474
|
/* @__PURE__ */ s.jsx(
|
|
4477
|
-
|
|
4475
|
+
Pr,
|
|
4478
4476
|
{
|
|
4479
4477
|
element: "li",
|
|
4480
4478
|
id: `more-${t.slug}`,
|
|
4481
|
-
options:
|
|
4479
|
+
options: oe
|
|
4482
4480
|
}
|
|
4483
4481
|
)
|
|
4484
4482
|
]
|
|
@@ -4489,47 +4487,47 @@ const Ce = "discussion_", ta = 280, $t = ({
|
|
|
4489
4487
|
),
|
|
4490
4488
|
g,
|
|
4491
4489
|
/* @__PURE__ */ s.jsx(
|
|
4492
|
-
|
|
4490
|
+
ns,
|
|
4493
4491
|
{
|
|
4494
4492
|
id: `delete-${t.slug}-modal`,
|
|
4495
|
-
isOpen:
|
|
4493
|
+
isOpen: N,
|
|
4496
4494
|
functions: { onOpen: () => {
|
|
4497
|
-
}, onClose: () =>
|
|
4495
|
+
}, onClose: () => D(!1) },
|
|
4498
4496
|
forceShow: {
|
|
4499
|
-
error:
|
|
4497
|
+
error: G === "delete-error" ? w.formatMessage(
|
|
4500
4498
|
{ id: "discussion_delete_error" },
|
|
4501
4499
|
{
|
|
4502
|
-
action:
|
|
4500
|
+
action: w.formatMessage({
|
|
4503
4501
|
id: `discussion_action_${t.type}`
|
|
4504
4502
|
})
|
|
4505
4503
|
}
|
|
4506
4504
|
) : !1
|
|
4507
4505
|
},
|
|
4508
|
-
title:
|
|
4506
|
+
title: w.formatMessage(
|
|
4509
4507
|
{ id: "discussion_delete_title" },
|
|
4510
|
-
{ action:
|
|
4508
|
+
{ action: w.formatMessage({ id: `discussion_action_${t.type}` }) }
|
|
4511
4509
|
),
|
|
4512
4510
|
buttons: [
|
|
4513
4511
|
{
|
|
4514
4512
|
variant: "secondary",
|
|
4515
|
-
onClick: () =>
|
|
4516
|
-
children:
|
|
4513
|
+
onClick: () => D(!1),
|
|
4514
|
+
children: w.formatMessage({ id: "discussion_delete_cancel" })
|
|
4517
4515
|
},
|
|
4518
4516
|
{
|
|
4519
4517
|
variant: "primary",
|
|
4520
4518
|
className: "destructive",
|
|
4521
|
-
onClick:
|
|
4522
|
-
children:
|
|
4519
|
+
onClick: se,
|
|
4520
|
+
children: w.formatMessage({ id: "discussion_delete_delete" })
|
|
4523
4521
|
}
|
|
4524
4522
|
],
|
|
4525
4523
|
gtmContext: `${t.type.charAt(0).toUpperCase()}${t.type.slice(1)}:${t.slug}`,
|
|
4526
4524
|
children: /* @__PURE__ */ s.jsx(
|
|
4527
|
-
|
|
4525
|
+
De,
|
|
4528
4526
|
{
|
|
4529
4527
|
id: "discussion_delete_text",
|
|
4530
4528
|
values: {
|
|
4531
|
-
p: (
|
|
4532
|
-
action:
|
|
4529
|
+
p: (I) => /* @__PURE__ */ s.jsx("p", { children: I }),
|
|
4530
|
+
action: w.formatMessage({
|
|
4533
4531
|
id: `discussion_action_${t.type}`
|
|
4534
4532
|
})
|
|
4535
4533
|
}
|
|
@@ -4540,7 +4538,7 @@ const Ce = "discussion_", ta = 280, $t = ({
|
|
|
4540
4538
|
] })
|
|
4541
4539
|
});
|
|
4542
4540
|
};
|
|
4543
|
-
const zt = "discussion_responses_",
|
|
4541
|
+
const zt = "discussion_responses_", jo = ({ type: e = "answer", responses: t = 0 }) => {
|
|
4544
4542
|
const n = C();
|
|
4545
4543
|
return /* @__PURE__ */ s.jsxs("div", { className: "responses-heading", children: [
|
|
4546
4544
|
/* @__PURE__ */ s.jsx("h3", { children: n.formatMessage({ id: `${zt}title` }, { action: n.formatMessage({ id: `${zt}${e}` }), count: t }) }),
|
|
@@ -4548,11 +4546,11 @@ const zt = "discussion_responses_", ko = ({ type: e = "answer", responses: t = 0
|
|
|
4548
4546
|
] });
|
|
4549
4547
|
};
|
|
4550
4548
|
const na = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
4551
|
-
const r = C(), o = ae(null), i = we(St), [l, a] =
|
|
4549
|
+
const r = C(), o = ae(null), i = we(St), [l, a] = A(
|
|
4552
4550
|
"closed"
|
|
4553
4551
|
/* Closed */
|
|
4554
4552
|
);
|
|
4555
|
-
|
|
4553
|
+
Y(() => {
|
|
4556
4554
|
const d = o.current;
|
|
4557
4555
|
if (d)
|
|
4558
4556
|
return d.addEventListener("transitionend", u), () => {
|
|
@@ -4567,7 +4565,7 @@ const na = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4567
4565
|
].includes(l) ? "ready-to-close" : "opening"
|
|
4568
4566
|
/* Opening */
|
|
4569
4567
|
);
|
|
4570
|
-
}, [i.showThread]),
|
|
4568
|
+
}, [i.showThread]), Y(() => {
|
|
4571
4569
|
l === "ready-to-close" && a(
|
|
4572
4570
|
"closing"
|
|
4573
4571
|
/* Closing */
|
|
@@ -4584,7 +4582,7 @@ const na = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4584
4582
|
});
|
|
4585
4583
|
return /* @__PURE__ */ s.jsxs("div", { className: "thread-wrapper", children: [
|
|
4586
4584
|
t && /* @__PURE__ */ s.jsx(
|
|
4587
|
-
|
|
4585
|
+
U,
|
|
4588
4586
|
{
|
|
4589
4587
|
variant: "secondary",
|
|
4590
4588
|
size: "small",
|
|
@@ -4614,7 +4612,21 @@ const na = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4614
4612
|
)
|
|
4615
4613
|
] });
|
|
4616
4614
|
};
|
|
4617
|
-
function sa(e) {
|
|
4615
|
+
function sa({ queryClient: e, queryKey: t }) {
|
|
4616
|
+
function n(r, o, i) {
|
|
4617
|
+
e.setQueryData(t, i);
|
|
4618
|
+
}
|
|
4619
|
+
return n;
|
|
4620
|
+
}
|
|
4621
|
+
function ra({ queryClient: e, queryKey: t }) {
|
|
4622
|
+
async function n(r) {
|
|
4623
|
+
await e.cancelQueries({ queryKey: t });
|
|
4624
|
+
const o = e.getQueryData(t);
|
|
4625
|
+
return e.setQueryData(t, r), o;
|
|
4626
|
+
}
|
|
4627
|
+
return n;
|
|
4628
|
+
}
|
|
4629
|
+
function aa(e) {
|
|
4618
4630
|
const { id: t = "", name: n = "", organization: r = "", jobTitle: o = "", image: i = {} } = e, { thumbnail: l = "" } = i;
|
|
4619
4631
|
return {
|
|
4620
4632
|
actor: {
|
|
@@ -4628,7 +4640,7 @@ function sa(e) {
|
|
|
4628
4640
|
}
|
|
4629
4641
|
};
|
|
4630
4642
|
}
|
|
4631
|
-
function
|
|
4643
|
+
function oa() {
|
|
4632
4644
|
return {
|
|
4633
4645
|
latest_reactions: {
|
|
4634
4646
|
like: [],
|
|
@@ -4644,11 +4656,11 @@ function ra() {
|
|
|
4644
4656
|
}
|
|
4645
4657
|
};
|
|
4646
4658
|
}
|
|
4647
|
-
function
|
|
4659
|
+
function $n({ activity: e, user: t }) {
|
|
4648
4660
|
const n = {
|
|
4649
4661
|
...e,
|
|
4650
|
-
...
|
|
4651
|
-
...
|
|
4662
|
+
...aa(t),
|
|
4663
|
+
...oa()
|
|
4652
4664
|
};
|
|
4653
4665
|
return n.id ? n : {
|
|
4654
4666
|
...n,
|
|
@@ -4657,42 +4669,46 @@ function Tn({ activity: e, user: t }) {
|
|
|
4657
4669
|
verb: "post"
|
|
4658
4670
|
};
|
|
4659
4671
|
}
|
|
4660
|
-
function
|
|
4672
|
+
function Tn({ activity: e, reaction: t }) {
|
|
4661
4673
|
const { latest_reactions: n, own_reactions: r, reaction_counts: o } = e;
|
|
4662
4674
|
n && t && (n.like = [...n.like || [], t]), r && t && (r.like = [...r.like || [], t]), o && (o.like = o.like + 1 || 1);
|
|
4663
4675
|
}
|
|
4664
|
-
function
|
|
4676
|
+
function ia({ activity: e, user: t }) {
|
|
4665
4677
|
const { latest_reactions: n, own_reactions: r, reaction_counts: o } = e;
|
|
4666
4678
|
o && (o.like = o.like - 1 || 0), n && (t != null && t.id) && (n.like = n.like.filter(({ user_id: i }) => i !== t.id)), r && (t != null && t.id) && (r.like = r.like.filter(({ user_id: i }) => i !== t.id));
|
|
4667
4679
|
}
|
|
4668
|
-
function
|
|
4669
|
-
return [e, ...t]
|
|
4680
|
+
function Mn(e, t, n = !1) {
|
|
4681
|
+
return t ? (n ? t.pages[0].results[0] = e : t.pages[0].results = [e, ...t.pages[0].results], t) : {
|
|
4682
|
+
pages: [{
|
|
4683
|
+
next: "",
|
|
4684
|
+
results: [e]
|
|
4685
|
+
}],
|
|
4686
|
+
pageParams: [""]
|
|
4687
|
+
};
|
|
4670
4688
|
}
|
|
4671
4689
|
function _t(e, t) {
|
|
4672
|
-
|
|
4673
|
-
}
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
return (e == null ? void 0 : e.data) || [];
|
|
4690
|
+
if (t)
|
|
4691
|
+
for (const { results: n } of t.pages) {
|
|
4692
|
+
const r = n.find(({ id: o }) => o === e);
|
|
4693
|
+
if (r)
|
|
4694
|
+
return r;
|
|
4695
|
+
}
|
|
4679
4696
|
}
|
|
4680
|
-
function
|
|
4681
|
-
|
|
4682
|
-
const
|
|
4683
|
-
|
|
4697
|
+
function ca(e, t) {
|
|
4698
|
+
for (const { results: n } of t.pages) {
|
|
4699
|
+
const r = n.findIndex(({ id: o }) => o === e);
|
|
4700
|
+
if (r !== -1) {
|
|
4701
|
+
n.splice(r, 1);
|
|
4702
|
+
break;
|
|
4703
|
+
}
|
|
4684
4704
|
}
|
|
4685
|
-
return
|
|
4705
|
+
return t;
|
|
4686
4706
|
}
|
|
4687
|
-
function
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
const o = e.getQueryData(t);
|
|
4691
|
-
return e.setQueryData(t, r), { data: o };
|
|
4692
|
-
}
|
|
4693
|
-
return n;
|
|
4707
|
+
function la(e) {
|
|
4708
|
+
var t;
|
|
4709
|
+
return ((t = e == null ? void 0 : e.pages) == null ? void 0 : t.reduce((n, { results: r }) => [...n, ...r], [])) || [];
|
|
4694
4710
|
}
|
|
4695
|
-
function
|
|
4711
|
+
function da({
|
|
4696
4712
|
mutationFn: e,
|
|
4697
4713
|
mutationHandlers: {
|
|
4698
4714
|
mutate: t,
|
|
@@ -4705,18 +4721,18 @@ function la({
|
|
|
4705
4721
|
const { mutate: l } = ne({
|
|
4706
4722
|
mutationFn: e,
|
|
4707
4723
|
onMutate: (a) => t((u) => {
|
|
4708
|
-
const c =
|
|
4709
|
-
return
|
|
4724
|
+
const c = $n({ activity: a, user: i });
|
|
4725
|
+
return Mn(c, u);
|
|
4710
4726
|
}),
|
|
4711
4727
|
onError: n,
|
|
4712
4728
|
onSuccess: (a, u, c) => {
|
|
4713
|
-
const m =
|
|
4714
|
-
r.setQueryData(o,
|
|
4729
|
+
const m = $n({ activity: a, user: i });
|
|
4730
|
+
r.setQueryData(o, Mn(m, c, !0));
|
|
4715
4731
|
}
|
|
4716
4732
|
});
|
|
4717
4733
|
return l;
|
|
4718
4734
|
}
|
|
4719
|
-
function
|
|
4735
|
+
function ua({
|
|
4720
4736
|
mutationFn: e,
|
|
4721
4737
|
mutationHandlers: {
|
|
4722
4738
|
mutate: t,
|
|
@@ -4733,7 +4749,7 @@ function da({
|
|
|
4733
4749
|
});
|
|
4734
4750
|
return r;
|
|
4735
4751
|
}
|
|
4736
|
-
function
|
|
4752
|
+
function ma({
|
|
4737
4753
|
queryFns: {
|
|
4738
4754
|
create: e,
|
|
4739
4755
|
edit: t,
|
|
@@ -4744,16 +4760,16 @@ function ua({
|
|
|
4744
4760
|
},
|
|
4745
4761
|
queryKey: l
|
|
4746
4762
|
}) {
|
|
4747
|
-
const a = wt(), u =
|
|
4763
|
+
const a = wt(), u = Mr(), c = { queryClient: a, queryKey: l }, m = {
|
|
4748
4764
|
mutationHandlers: {
|
|
4749
|
-
error:
|
|
4750
|
-
mutate:
|
|
4765
|
+
error: sa(c),
|
|
4766
|
+
mutate: ra(c)
|
|
4751
4767
|
},
|
|
4752
4768
|
user: u,
|
|
4753
4769
|
...c
|
|
4754
|
-
}, d =
|
|
4770
|
+
}, d = da({ ...m, mutationFn: e }), p = ua({ ...m, mutationFn: t }), h = fa({ ...m, mutationFn: n }), g = pa({ ...m, mutationFn: o }), v = ga({ ...m, mutationFn: i }), { activities: w, ...y } = ha({ queryKey: l, queryFn: r });
|
|
4755
4771
|
return {
|
|
4756
|
-
activities:
|
|
4772
|
+
activities: w,
|
|
4757
4773
|
mutations: {
|
|
4758
4774
|
create: d,
|
|
4759
4775
|
edit: p,
|
|
@@ -4765,7 +4781,7 @@ function ua({
|
|
|
4765
4781
|
...y
|
|
4766
4782
|
};
|
|
4767
4783
|
}
|
|
4768
|
-
function
|
|
4784
|
+
function fa({
|
|
4769
4785
|
mutationFn: e,
|
|
4770
4786
|
mutationHandlers: {
|
|
4771
4787
|
mutate: t,
|
|
@@ -4778,31 +4794,38 @@ function ma({
|
|
|
4778
4794
|
mutationFn: e,
|
|
4779
4795
|
onMutate: ({ activityId: l }) => t((a) => {
|
|
4780
4796
|
const u = _t(l, a);
|
|
4781
|
-
return u &&
|
|
4797
|
+
return u && Tn({ activity: u }), a;
|
|
4782
4798
|
}),
|
|
4783
4799
|
onError: n,
|
|
4784
4800
|
onSuccess: (l, { activityId: a }, u) => {
|
|
4785
|
-
const c =
|
|
4786
|
-
|
|
4801
|
+
const c = _t(a, u);
|
|
4802
|
+
c && Tn({ activity: c, reaction: l }), r.setQueryData(o, u);
|
|
4787
4803
|
}
|
|
4788
4804
|
});
|
|
4789
4805
|
return i;
|
|
4790
4806
|
}
|
|
4791
|
-
function
|
|
4807
|
+
function ha({ queryFn: e, queryKey: t }) {
|
|
4792
4808
|
const {
|
|
4793
4809
|
data: n,
|
|
4794
4810
|
error: r,
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4811
|
+
isLoading: o,
|
|
4812
|
+
hasNextPage: i,
|
|
4813
|
+
fetchNextPage: l
|
|
4814
|
+
} = Ts({
|
|
4815
|
+
queryKey: t,
|
|
4816
|
+
queryFn: e,
|
|
4817
|
+
initialPageParam: { next: null },
|
|
4818
|
+
getNextPageParam: (a) => a == null ? void 0 : a.next
|
|
4819
|
+
});
|
|
4798
4820
|
return {
|
|
4799
|
-
activities: n,
|
|
4821
|
+
activities: la(n),
|
|
4800
4822
|
error: r,
|
|
4801
|
-
|
|
4802
|
-
|
|
4823
|
+
isLoading: o,
|
|
4824
|
+
hasNextPage: i,
|
|
4825
|
+
fetchNextPage: l
|
|
4803
4826
|
};
|
|
4804
4827
|
}
|
|
4805
|
-
function
|
|
4828
|
+
function pa({
|
|
4806
4829
|
mutationFn: e,
|
|
4807
4830
|
mutationHandlers: {
|
|
4808
4831
|
mutate: t,
|
|
@@ -4811,12 +4834,12 @@ function ha({
|
|
|
4811
4834
|
}) {
|
|
4812
4835
|
const { mutate: r } = ne({
|
|
4813
4836
|
mutationFn: e,
|
|
4814
|
-
onMutate: ({ activityId: o }) => t((i) =>
|
|
4837
|
+
onMutate: ({ activityId: o }) => t((i) => ca(o, i)),
|
|
4815
4838
|
onError: n
|
|
4816
4839
|
});
|
|
4817
4840
|
return r;
|
|
4818
4841
|
}
|
|
4819
|
-
function
|
|
4842
|
+
function ga({
|
|
4820
4843
|
mutationFn: e,
|
|
4821
4844
|
mutationHandlers: {
|
|
4822
4845
|
mutate: t,
|
|
@@ -4828,13 +4851,13 @@ function pa({
|
|
|
4828
4851
|
mutationFn: e,
|
|
4829
4852
|
onMutate: ({ activityId: i }) => t((l) => {
|
|
4830
4853
|
const a = _t(i, l);
|
|
4831
|
-
return a &&
|
|
4854
|
+
return a && ia({ activity: a, user: r }), l;
|
|
4832
4855
|
}),
|
|
4833
4856
|
onError: n
|
|
4834
4857
|
});
|
|
4835
4858
|
return o;
|
|
4836
4859
|
}
|
|
4837
|
-
const
|
|
4860
|
+
const yo = ({
|
|
4838
4861
|
basePath: e,
|
|
4839
4862
|
parentId: t,
|
|
4840
4863
|
isMember: n,
|
|
@@ -4843,22 +4866,24 @@ const jo = ({
|
|
|
4843
4866
|
const l = C(), {
|
|
4844
4867
|
activities: a,
|
|
4845
4868
|
error: u,
|
|
4846
|
-
|
|
4869
|
+
fetchNextPage: c,
|
|
4870
|
+
hasNextPage: m,
|
|
4871
|
+
isLoading: d,
|
|
4847
4872
|
mutations: {
|
|
4848
|
-
create:
|
|
4849
|
-
edit:
|
|
4850
|
-
remove:
|
|
4851
|
-
like:
|
|
4852
|
-
unlike:
|
|
4873
|
+
create: p,
|
|
4874
|
+
edit: h,
|
|
4875
|
+
remove: g,
|
|
4876
|
+
like: v,
|
|
4877
|
+
unlike: w
|
|
4853
4878
|
},
|
|
4854
|
-
user:
|
|
4855
|
-
} =
|
|
4879
|
+
user: y
|
|
4880
|
+
} = ma({ queryKey: [e, t], queryFns: i });
|
|
4856
4881
|
return u ? /* @__PURE__ */ s.jsx(Et, { variant: "error", text: u.message }) : /* @__PURE__ */ s.jsxs("section", { children: [
|
|
4857
4882
|
/* @__PURE__ */ s.jsx(
|
|
4858
4883
|
sn,
|
|
4859
4884
|
{
|
|
4860
4885
|
contentType: "post",
|
|
4861
|
-
createPost:
|
|
4886
|
+
createPost: p,
|
|
4862
4887
|
membershipRequiredToPost: {
|
|
4863
4888
|
isMember: n,
|
|
4864
4889
|
required: !0,
|
|
@@ -4868,55 +4893,55 @@ const jo = ({
|
|
|
4868
4893
|
}
|
|
4869
4894
|
}
|
|
4870
4895
|
),
|
|
4871
|
-
|
|
4872
|
-
var
|
|
4873
|
-
const { own_reactions:
|
|
4874
|
-
var se,
|
|
4896
|
+
a == null ? void 0 : a.map((x) => {
|
|
4897
|
+
var b, z, k, L, J, q, ce, le, de;
|
|
4898
|
+
const { own_reactions: _, latest_reactions: $ } = x, N = (((b = $ == null ? void 0 : $.like) == null ? void 0 : b.length) || 0) > 0, D = (((z = _ == null ? void 0 : _.like) == null ? void 0 : z.length) || 0) > 0, G = D ? _ == null ? void 0 : _.like[0].id : null, B = N ? (k = $ == null ? void 0 : $.like) == null ? void 0 : k.map((V) => {
|
|
4899
|
+
var se, oe, I;
|
|
4875
4900
|
return {
|
|
4876
|
-
id: (se =
|
|
4877
|
-
name: (
|
|
4901
|
+
id: (se = V == null ? void 0 : V.user) == null ? void 0 : se.id,
|
|
4902
|
+
name: (I = (oe = V == null ? void 0 : V.user) == null ? void 0 : oe.data) == null ? void 0 : I.name
|
|
4878
4903
|
};
|
|
4879
|
-
}) : !1,
|
|
4904
|
+
}) : !1, M = x == null ? void 0 : x.actor, F = (M == null ? void 0 : M.id) === (y == null ? void 0 : y.id);
|
|
4880
4905
|
return /* @__PURE__ */ s.jsxs(Yt, { children: [
|
|
4881
4906
|
/* @__PURE__ */ s.jsx(
|
|
4882
4907
|
$t,
|
|
4883
4908
|
{
|
|
4884
4909
|
content: {
|
|
4885
4910
|
type: "post",
|
|
4886
|
-
body:
|
|
4887
|
-
canLike: rn(n,
|
|
4888
|
-
createdAt: (
|
|
4889
|
-
slugs: { parentId: t, activityId:
|
|
4890
|
-
slug:
|
|
4911
|
+
body: x == null ? void 0 : x.content,
|
|
4912
|
+
canLike: rn(n, F),
|
|
4913
|
+
createdAt: (x == null ? void 0 : x.time) || "",
|
|
4914
|
+
slugs: { parentId: t, activityId: x == null ? void 0 : x.id },
|
|
4915
|
+
slug: x == null ? void 0 : x.id,
|
|
4891
4916
|
author: {
|
|
4892
|
-
id:
|
|
4893
|
-
name: (
|
|
4894
|
-
organization: (
|
|
4895
|
-
jobTitle: (
|
|
4917
|
+
id: M == null ? void 0 : M.id,
|
|
4918
|
+
name: (L = M == null ? void 0 : M.data) == null ? void 0 : L.name,
|
|
4919
|
+
organization: (J = M == null ? void 0 : M.data) == null ? void 0 : J.organization,
|
|
4920
|
+
jobTitle: (q = M == null ? void 0 : M.data) == null ? void 0 : q.jobTitle,
|
|
4896
4921
|
image: {
|
|
4897
|
-
thumbnail: ((
|
|
4922
|
+
thumbnail: ((ce = M == null ? void 0 : M.data) == null ? void 0 : ce.thumbnail) || void 0
|
|
4898
4923
|
}
|
|
4899
4924
|
},
|
|
4900
|
-
userLiked:
|
|
4901
|
-
likes: ((
|
|
4902
|
-
comments: ((
|
|
4903
|
-
peopleWhoLiked:
|
|
4925
|
+
userLiked: D,
|
|
4926
|
+
likes: ((le = x == null ? void 0 : x.reaction_counts) == null ? void 0 : le.like) || 0,
|
|
4927
|
+
comments: ((de = x == null ? void 0 : x.reaction_counts) == null ? void 0 : de.reply) || 0,
|
|
4928
|
+
peopleWhoLiked: B
|
|
4904
4929
|
},
|
|
4905
4930
|
links: {
|
|
4906
|
-
post: `${e}/${t}/${
|
|
4907
|
-
comments: `${e}/${t}/${
|
|
4931
|
+
post: `${e}/${t}/${x == null ? void 0 : x.id}`,
|
|
4932
|
+
comments: `${e}/${t}/${x == null ? void 0 : x.id}`
|
|
4908
4933
|
},
|
|
4909
4934
|
functions: {
|
|
4910
4935
|
content: {
|
|
4911
4936
|
createContent: () => null,
|
|
4912
4937
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4913
|
-
deleteContent: (
|
|
4938
|
+
deleteContent: (V) => g(V),
|
|
4914
4939
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4915
|
-
updateContent: (
|
|
4940
|
+
updateContent: (V, se) => h({ ...V, ...se })
|
|
4916
4941
|
},
|
|
4917
4942
|
likes: {
|
|
4918
|
-
createLike: () =>
|
|
4919
|
-
deleteLike: () =>
|
|
4943
|
+
createLike: () => v({ activityId: x == null ? void 0 : x.id }),
|
|
4944
|
+
deleteLike: () => w({ activityId: x == null ? void 0 : x.id, reactionId: G })
|
|
4920
4945
|
},
|
|
4921
4946
|
comments: {
|
|
4922
4947
|
openComments: () => null
|
|
@@ -4926,10 +4951,19 @@ const jo = ({
|
|
|
4926
4951
|
}
|
|
4927
4952
|
),
|
|
4928
4953
|
/* @__PURE__ */ s.jsx(Ue, {})
|
|
4929
|
-
] },
|
|
4930
|
-
})
|
|
4954
|
+
] }, x == null ? void 0 : x.id);
|
|
4955
|
+
}),
|
|
4956
|
+
!d && /* @__PURE__ */ s.jsx(
|
|
4957
|
+
Gn,
|
|
4958
|
+
{
|
|
4959
|
+
hasNextPage: m,
|
|
4960
|
+
loadNextPage: () => c(),
|
|
4961
|
+
gtmContext: "LoadMore",
|
|
4962
|
+
icon: { icon: "arrow-down", position: "right" }
|
|
4963
|
+
}
|
|
4964
|
+
)
|
|
4931
4965
|
] });
|
|
4932
|
-
},
|
|
4966
|
+
}, _a = ({
|
|
4933
4967
|
queryClient: e,
|
|
4934
4968
|
queryKey: t,
|
|
4935
4969
|
mutationFn: n
|
|
@@ -4948,7 +4982,7 @@ const jo = ({
|
|
|
4948
4982
|
})), { previousActivity: u };
|
|
4949
4983
|
}, onSettled: () => {
|
|
4950
4984
|
e.invalidateQueries({ queryKey: t });
|
|
4951
|
-
} }),
|
|
4985
|
+
} }), xa = ({
|
|
4952
4986
|
queryClient: e,
|
|
4953
4987
|
queryKey: t,
|
|
4954
4988
|
mutationFn: n
|
|
@@ -4974,7 +5008,7 @@ const jo = ({
|
|
|
4974
5008
|
onError: (i, l, a) => {
|
|
4975
5009
|
e.setQueryData(t, a.previousActivity);
|
|
4976
5010
|
}
|
|
4977
|
-
}),
|
|
5011
|
+
}), ba = ({
|
|
4978
5012
|
queryClient: e,
|
|
4979
5013
|
queryKey: t,
|
|
4980
5014
|
mutationFn: n
|
|
@@ -4993,7 +5027,7 @@ const jo = ({
|
|
|
4993
5027
|
})), { previousActivity: l };
|
|
4994
5028
|
}, onError: (i, l, a) => {
|
|
4995
5029
|
e.setQueryData(t, a.previousActivity);
|
|
4996
|
-
} }),
|
|
5030
|
+
} }), va = ({
|
|
4997
5031
|
queryClient: e,
|
|
4998
5032
|
queryKey: t,
|
|
4999
5033
|
mutationFn: n
|
|
@@ -5020,7 +5054,7 @@ const jo = ({
|
|
|
5020
5054
|
...a,
|
|
5021
5055
|
latest_reactions: { reply: u }
|
|
5022
5056
|
})), { previousActivity: a };
|
|
5023
|
-
} }),
|
|
5057
|
+
} }), wa = ({
|
|
5024
5058
|
queryClient: e,
|
|
5025
5059
|
queryKey: t,
|
|
5026
5060
|
user: n,
|
|
@@ -5046,12 +5080,12 @@ const jo = ({
|
|
|
5046
5080
|
const m = (d = c.latest_reactions.reply) == null ? void 0 : d.map((p) => {
|
|
5047
5081
|
var h, g, v;
|
|
5048
5082
|
if (p.id === u) {
|
|
5049
|
-
let
|
|
5083
|
+
let w = (h = p.latest_children.reply) == null ? void 0 : h.filter(
|
|
5050
5084
|
(y) => y.user_id !== (n == null ? void 0 : n.id)
|
|
5051
5085
|
);
|
|
5052
|
-
return
|
|
5086
|
+
return w = (v = (g = p == null ? void 0 : p.own_children) == null ? void 0 : g.reply) == null ? void 0 : v.filter(
|
|
5053
5087
|
(y) => y.user_id !== (n == null ? void 0 : n.id)
|
|
5054
|
-
),
|
|
5088
|
+
), w;
|
|
5055
5089
|
}
|
|
5056
5090
|
return p;
|
|
5057
5091
|
});
|
|
@@ -5059,7 +5093,7 @@ const jo = ({
|
|
|
5059
5093
|
...c,
|
|
5060
5094
|
latest_reactions: { reply: m }
|
|
5061
5095
|
})), { previousActivity: c };
|
|
5062
|
-
} }),
|
|
5096
|
+
} }), ka = ({
|
|
5063
5097
|
queryClient: e,
|
|
5064
5098
|
queryKey: t,
|
|
5065
5099
|
mutationFn: n
|
|
@@ -5082,7 +5116,7 @@ const jo = ({
|
|
|
5082
5116
|
onSettled: () => {
|
|
5083
5117
|
e.invalidateQueries({ queryKey: t });
|
|
5084
5118
|
}
|
|
5085
|
-
}),
|
|
5119
|
+
}), ja = ({
|
|
5086
5120
|
queryClient: e,
|
|
5087
5121
|
queryKey: t,
|
|
5088
5122
|
mutationFn: n
|
|
@@ -5107,7 +5141,7 @@ const jo = ({
|
|
|
5107
5141
|
...a,
|
|
5108
5142
|
latest_reactions: { reply: u }
|
|
5109
5143
|
})), { previousActivity: a };
|
|
5110
|
-
} }),
|
|
5144
|
+
} }), ya = ({
|
|
5111
5145
|
queryClient: e,
|
|
5112
5146
|
queryKey: t,
|
|
5113
5147
|
mutationFn: n
|
|
@@ -5132,7 +5166,7 @@ const jo = ({
|
|
|
5132
5166
|
...a,
|
|
5133
5167
|
latest_reactions: { reply: u }
|
|
5134
5168
|
})), { previousActivity: a };
|
|
5135
|
-
} }),
|
|
5169
|
+
} }), Ea = ({
|
|
5136
5170
|
queryClient: e,
|
|
5137
5171
|
queryKey: t,
|
|
5138
5172
|
mutationFn: n
|
|
@@ -5165,7 +5199,7 @@ const jo = ({
|
|
|
5165
5199
|
...u,
|
|
5166
5200
|
latest_reactions: { reply: c }
|
|
5167
5201
|
})), { previousActivity: u };
|
|
5168
|
-
} }),
|
|
5202
|
+
} }), Sa = ({
|
|
5169
5203
|
queryClient: e,
|
|
5170
5204
|
queryKey: t,
|
|
5171
5205
|
mutationFn: n,
|
|
@@ -5194,10 +5228,10 @@ const jo = ({
|
|
|
5194
5228
|
const c = e.getQueryData(t), m = (d = c == null ? void 0 : c.latest_reactions.reply) == null ? void 0 : d.map((p) => {
|
|
5195
5229
|
var h;
|
|
5196
5230
|
return p.id === u.replyParentId && ((h = p.latest_children.reply) == null || h.map((g) => {
|
|
5197
|
-
var v,
|
|
5231
|
+
var v, w;
|
|
5198
5232
|
return g.id === u.replyId && ((v = g.own_children) != null && v.like && (g.own_children.like = g.own_children.like.filter(
|
|
5199
5233
|
(y) => y.user_id !== (r == null ? void 0 : r.id)
|
|
5200
|
-
)), (
|
|
5234
|
+
)), (w = g.latest_children) != null && w.like && (g.latest_children.like = g.latest_children.like.filter(
|
|
5201
5235
|
(y) => y.user_id !== (r == null ? void 0 : r.id)
|
|
5202
5236
|
))), g;
|
|
5203
5237
|
})), p;
|
|
@@ -5206,7 +5240,7 @@ const jo = ({
|
|
|
5206
5240
|
...c,
|
|
5207
5241
|
latest_reactions: { reply: m }
|
|
5208
5242
|
})), { previousActivity: c };
|
|
5209
|
-
} }),
|
|
5243
|
+
} }), $a = ({
|
|
5210
5244
|
basePath: e,
|
|
5211
5245
|
parentId: t,
|
|
5212
5246
|
replyParentId: n,
|
|
@@ -5215,39 +5249,39 @@ const jo = ({
|
|
|
5215
5249
|
replies: i,
|
|
5216
5250
|
functions: { create: l, edit: a, remove: u, join: c, leave: m, like: d, unlike: p }
|
|
5217
5251
|
}) => {
|
|
5218
|
-
const h = C(), g = wt(), v = we(Se),
|
|
5252
|
+
const h = C(), g = wt(), v = we(Se), w = we(St), y = ka({
|
|
5219
5253
|
queryClient: g,
|
|
5220
5254
|
queryKey: [e, t, r],
|
|
5221
5255
|
mutationFn: async (k) => l({ replyId: n, content: k.body })
|
|
5222
|
-
}), { mutate:
|
|
5256
|
+
}), { mutate: x } = ne(y), _ = ja({
|
|
5223
5257
|
queryClient: g,
|
|
5224
5258
|
queryKey: [e, t, r],
|
|
5225
5259
|
mutationFn: a
|
|
5226
5260
|
}), {
|
|
5227
5261
|
mutate: $
|
|
5228
|
-
} = ne(
|
|
5262
|
+
} = ne(_), N = ya({
|
|
5229
5263
|
queryClient: g,
|
|
5230
5264
|
queryKey: [e, t, r],
|
|
5231
5265
|
mutationFn: async ({ replyId: k }) => u({ replyId: k })
|
|
5232
5266
|
}), {
|
|
5233
|
-
mutate:
|
|
5234
|
-
} = ne(
|
|
5267
|
+
mutate: D
|
|
5268
|
+
} = ne(N), G = Ea({
|
|
5235
5269
|
queryClient: g,
|
|
5236
5270
|
queryKey: [e, t, r],
|
|
5237
5271
|
mutationFn: d
|
|
5238
5272
|
}), {
|
|
5239
|
-
mutate:
|
|
5240
|
-
} = ne(
|
|
5273
|
+
mutate: B
|
|
5274
|
+
} = ne(G), M = Sa({
|
|
5241
5275
|
queryClient: g,
|
|
5242
5276
|
queryKey: [e, t, r],
|
|
5243
5277
|
user: v,
|
|
5244
5278
|
mutationFn: p
|
|
5245
5279
|
}), {
|
|
5246
5280
|
mutate: F
|
|
5247
|
-
} = ne(
|
|
5248
|
-
({ replyId: k, replyParentId: L }) =>
|
|
5249
|
-
[
|
|
5250
|
-
),
|
|
5281
|
+
} = ne(M), b = Ae(
|
|
5282
|
+
({ replyId: k, replyParentId: L }) => B({ replyId: k, replyParentId: L }),
|
|
5283
|
+
[B]
|
|
5284
|
+
), z = Ae(
|
|
5251
5285
|
({ replyId: k, replyParentId: L }) => F({ replyId: k, replyParentId: L }),
|
|
5252
5286
|
[F]
|
|
5253
5287
|
);
|
|
@@ -5255,13 +5289,13 @@ const jo = ({
|
|
|
5255
5289
|
na,
|
|
5256
5290
|
{
|
|
5257
5291
|
count: o,
|
|
5258
|
-
showRepliesButton: o > 0 ||
|
|
5292
|
+
showRepliesButton: o > 0 || w.showForm,
|
|
5259
5293
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
5260
|
-
|
|
5294
|
+
w.showForm && /* @__PURE__ */ s.jsx(
|
|
5261
5295
|
sn,
|
|
5262
5296
|
{
|
|
5263
5297
|
contentType: "reply",
|
|
5264
|
-
createPost: (k, L) =>
|
|
5298
|
+
createPost: (k, L) => x(L),
|
|
5265
5299
|
membershipRequiredToPost: {
|
|
5266
5300
|
isMember: !0,
|
|
5267
5301
|
required: !0,
|
|
@@ -5272,7 +5306,7 @@ const jo = ({
|
|
|
5272
5306
|
}
|
|
5273
5307
|
),
|
|
5274
5308
|
(i == null ? void 0 : i.length) === 0 || (i == null ? void 0 : i.map((k) => {
|
|
5275
|
-
var L, J, q,
|
|
5309
|
+
var L, J, q, ce, le, de, V, se, oe, I, ue, _e, fe, ke, xe, je, be;
|
|
5276
5310
|
return /* @__PURE__ */ s.jsx(
|
|
5277
5311
|
$t,
|
|
5278
5312
|
{
|
|
@@ -5288,21 +5322,21 @@ const jo = ({
|
|
|
5288
5322
|
},
|
|
5289
5323
|
slug: "",
|
|
5290
5324
|
author: {
|
|
5291
|
-
id: (
|
|
5292
|
-
name: (
|
|
5293
|
-
organization: (
|
|
5294
|
-
jobTitle: (
|
|
5325
|
+
id: (ce = k == null ? void 0 : k.user) == null ? void 0 : ce.id,
|
|
5326
|
+
name: (de = (le = k == null ? void 0 : k.user) == null ? void 0 : le.data) == null ? void 0 : de.name,
|
|
5327
|
+
organization: (se = (V = k == null ? void 0 : k.user) == null ? void 0 : V.data) == null ? void 0 : se.organization,
|
|
5328
|
+
jobTitle: (I = (oe = k == null ? void 0 : k.user) == null ? void 0 : oe.data) == null ? void 0 : I.jobTitle,
|
|
5295
5329
|
image: {
|
|
5296
|
-
thumbnail: ((_e = (
|
|
5330
|
+
thumbnail: ((_e = (ue = k == null ? void 0 : k.user) == null ? void 0 : ue.data) == null ? void 0 : _e.thumbnail) || void 0
|
|
5297
5331
|
}
|
|
5298
5332
|
},
|
|
5299
|
-
userLiked: ((
|
|
5333
|
+
userLiked: ((fe = k == null ? void 0 : k.own_children) == null ? void 0 : fe.like) && ((ke = k == null ? void 0 : k.own_children) == null ? void 0 : ke.like.length) > 0,
|
|
5300
5334
|
likes: ((xe = k == null ? void 0 : k.children_counts) == null ? void 0 : xe.like) || 0,
|
|
5301
5335
|
peopleWhoLiked: ((je = k == null ? void 0 : k.latest_children) == null ? void 0 : je.like) && ((be = k == null ? void 0 : k.latest_children) == null ? void 0 : be.like.map((Z) => {
|
|
5302
|
-
var re,
|
|
5336
|
+
var re, he;
|
|
5303
5337
|
return {
|
|
5304
5338
|
id: Z == null ? void 0 : Z.user_id,
|
|
5305
|
-
name: (
|
|
5339
|
+
name: (he = (re = Z == null ? void 0 : Z.user) == null ? void 0 : re.data) == null ? void 0 : he.name
|
|
5306
5340
|
};
|
|
5307
5341
|
}))
|
|
5308
5342
|
},
|
|
@@ -5310,8 +5344,8 @@ const jo = ({
|
|
|
5310
5344
|
content: {
|
|
5311
5345
|
createContent: () => console.log("create"),
|
|
5312
5346
|
deleteContent: (Z) => {
|
|
5313
|
-
const { replySlug: re, replyParentId:
|
|
5314
|
-
return
|
|
5347
|
+
const { replySlug: re, replyParentId: he } = Z;
|
|
5348
|
+
return D({ replyId: re, replyParentId: he });
|
|
5315
5349
|
},
|
|
5316
5350
|
updateContent: (Z, re) => $({ replyInfo: Z, content: re })
|
|
5317
5351
|
},
|
|
@@ -5321,9 +5355,9 @@ const jo = ({
|
|
|
5321
5355
|
replyParentId: k == null ? void 0 : k.parent
|
|
5322
5356
|
}),
|
|
5323
5357
|
deleteLike: () => {
|
|
5324
|
-
var re,
|
|
5325
|
-
const Z = ((re = k == null ? void 0 : k.own_children) == null ? void 0 : re.like) && ((K = (
|
|
5326
|
-
return
|
|
5358
|
+
var re, he, K;
|
|
5359
|
+
const Z = ((re = k == null ? void 0 : k.own_children) == null ? void 0 : re.like) && ((K = (he = k == null ? void 0 : k.own_children) == null ? void 0 : he.like[0]) == null ? void 0 : K.id);
|
|
5360
|
+
return z({
|
|
5327
5361
|
replyId: Z || ""
|
|
5328
5362
|
});
|
|
5329
5363
|
}
|
|
@@ -5337,7 +5371,7 @@ const jo = ({
|
|
|
5337
5371
|
] })
|
|
5338
5372
|
}
|
|
5339
5373
|
);
|
|
5340
|
-
},
|
|
5374
|
+
}, Ta = ({
|
|
5341
5375
|
basePath: e,
|
|
5342
5376
|
parentId: t,
|
|
5343
5377
|
activityId: n,
|
|
@@ -5345,48 +5379,48 @@ const jo = ({
|
|
|
5345
5379
|
isMember: o,
|
|
5346
5380
|
functions: { create: i, edit: l, remove: a, like: u, unlike: c, join: m, leave: d }
|
|
5347
5381
|
}) => {
|
|
5348
|
-
const p = C(), h = wt(), g = we(Se), v =
|
|
5382
|
+
const p = C(), h = wt(), g = we(Se), v = _a({
|
|
5349
5383
|
queryClient: h,
|
|
5350
5384
|
queryKey: [e, t, n],
|
|
5351
5385
|
mutationFn: async (b) => i({ activityId: n, content: b.body })
|
|
5352
|
-
}), { mutate:
|
|
5386
|
+
}), { mutate: w } = ne(v), y = xa({
|
|
5353
5387
|
queryClient: h,
|
|
5354
5388
|
queryKey: [e, t, n],
|
|
5355
5389
|
mutationFn: async (b) => l(b)
|
|
5356
5390
|
}), {
|
|
5357
|
-
mutate:
|
|
5358
|
-
} = ne(y),
|
|
5391
|
+
mutate: x
|
|
5392
|
+
} = ne(y), _ = ba({
|
|
5359
5393
|
queryClient: h,
|
|
5360
5394
|
queryKey: [e, t, n],
|
|
5361
5395
|
mutationFn: async ({ replyId: b }) => a({ replyId: b })
|
|
5362
5396
|
}), {
|
|
5363
5397
|
mutate: $
|
|
5364
|
-
} = ne(
|
|
5398
|
+
} = ne(_), N = va({
|
|
5365
5399
|
queryClient: h,
|
|
5366
5400
|
queryKey: [e, t, n],
|
|
5367
5401
|
mutationFn: u
|
|
5368
5402
|
}), {
|
|
5369
|
-
mutate:
|
|
5370
|
-
} = ne(
|
|
5403
|
+
mutate: D
|
|
5404
|
+
} = ne(N), G = wa({
|
|
5371
5405
|
queryClient: h,
|
|
5372
5406
|
queryKey: [e, t, n],
|
|
5373
5407
|
user: g,
|
|
5374
5408
|
mutationFn: c
|
|
5375
5409
|
}), {
|
|
5376
|
-
mutate:
|
|
5377
|
-
} = ne(
|
|
5378
|
-
({ replyId: b }) =>
|
|
5379
|
-
[
|
|
5410
|
+
mutate: B
|
|
5411
|
+
} = ne(G), M = Ae(
|
|
5412
|
+
({ replyId: b }) => D({ replyId: b }),
|
|
5413
|
+
[D]
|
|
5380
5414
|
), F = Ae(
|
|
5381
|
-
({ replyId: b }) =>
|
|
5382
|
-
[
|
|
5415
|
+
({ replyId: b }) => B({ replyId: b }),
|
|
5416
|
+
[B]
|
|
5383
5417
|
);
|
|
5384
|
-
return
|
|
5418
|
+
return Vs(), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
5385
5419
|
/* @__PURE__ */ s.jsx(
|
|
5386
5420
|
sn,
|
|
5387
5421
|
{
|
|
5388
5422
|
contentType: "reply",
|
|
5389
|
-
createPost: (b,
|
|
5423
|
+
createPost: (b, z) => w(z),
|
|
5390
5424
|
membershipRequiredToPost: {
|
|
5391
5425
|
isMember: o,
|
|
5392
5426
|
required: !0,
|
|
@@ -5397,14 +5431,14 @@ const jo = ({
|
|
|
5397
5431
|
}
|
|
5398
5432
|
),
|
|
5399
5433
|
(r == null ? void 0 : r.length) === 0 || (r == null ? void 0 : r.map((b) => {
|
|
5400
|
-
var L, J, q,
|
|
5401
|
-
const
|
|
5434
|
+
var L, J, q, ce, le, de, V, se, oe, I, ue, _e, fe, ke, xe, je, be, Z, re, he;
|
|
5435
|
+
const z = ((L = b == null ? void 0 : b.user) == null ? void 0 : L.id) === (g == null ? void 0 : g.id), k = rn(o, z);
|
|
5402
5436
|
return /* @__PURE__ */ s.jsx(Xr, { children: /* @__PURE__ */ s.jsx(
|
|
5403
5437
|
$t,
|
|
5404
5438
|
{
|
|
5405
5439
|
content: {
|
|
5406
5440
|
type: "reply",
|
|
5407
|
-
body: typeof b.data.content == "string" ? (J = b == null ? void 0 : b.data) == null ? void 0 : J.content : ((
|
|
5441
|
+
body: typeof b.data.content == "string" ? (J = b == null ? void 0 : b.data) == null ? void 0 : J.content : ((ce = (q = b == null ? void 0 : b.data) == null ? void 0 : q.content) == null ? void 0 : ce.text) || "",
|
|
5408
5442
|
canLike: k,
|
|
5409
5443
|
createdAt: b == null ? void 0 : b.created_at,
|
|
5410
5444
|
slugs: {
|
|
@@ -5414,21 +5448,21 @@ const jo = ({
|
|
|
5414
5448
|
},
|
|
5415
5449
|
slug: b == null ? void 0 : b.id,
|
|
5416
5450
|
author: {
|
|
5417
|
-
id: (
|
|
5418
|
-
name: (
|
|
5419
|
-
organization: (
|
|
5420
|
-
jobTitle: (
|
|
5451
|
+
id: (le = b == null ? void 0 : b.user) == null ? void 0 : le.id,
|
|
5452
|
+
name: (V = (de = b == null ? void 0 : b.user) == null ? void 0 : de.data) == null ? void 0 : V.name,
|
|
5453
|
+
organization: (oe = (se = b == null ? void 0 : b.user) == null ? void 0 : se.data) == null ? void 0 : oe.organization,
|
|
5454
|
+
jobTitle: (ue = (I = b == null ? void 0 : b.user) == null ? void 0 : I.data) == null ? void 0 : ue.jobTitle,
|
|
5421
5455
|
image: {
|
|
5422
|
-
thumbnail: ((
|
|
5456
|
+
thumbnail: ((fe = (_e = b == null ? void 0 : b.user) == null ? void 0 : _e.data) == null ? void 0 : fe.thumbnail) || void 0
|
|
5423
5457
|
}
|
|
5424
5458
|
},
|
|
5425
5459
|
userLiked: ((ke = b == null ? void 0 : b.own_children) == null ? void 0 : ke.like) && ((xe = b == null ? void 0 : b.own_children) == null ? void 0 : xe.like.length) > 0,
|
|
5426
5460
|
likes: ((je = b == null ? void 0 : b.children_counts) == null ? void 0 : je.like) || 0,
|
|
5427
5461
|
peopleWhoLiked: ((be = b == null ? void 0 : b.latest_children) == null ? void 0 : be.like) && ((Z = b == null ? void 0 : b.latest_children) == null ? void 0 : Z.like.map((K) => {
|
|
5428
|
-
var
|
|
5462
|
+
var ie, ve;
|
|
5429
5463
|
return {
|
|
5430
5464
|
id: K == null ? void 0 : K.user_id,
|
|
5431
|
-
name: (ve = (
|
|
5465
|
+
name: (ve = (ie = K == null ? void 0 : K.user) == null ? void 0 : ie.data) == null ? void 0 : ve.name
|
|
5432
5466
|
};
|
|
5433
5467
|
}))
|
|
5434
5468
|
},
|
|
@@ -5436,30 +5470,30 @@ const jo = ({
|
|
|
5436
5470
|
content: {
|
|
5437
5471
|
createContent: () => null,
|
|
5438
5472
|
deleteContent: (K) => {
|
|
5439
|
-
const { replySlug:
|
|
5440
|
-
return $({ replyId:
|
|
5473
|
+
const { replySlug: ie } = K;
|
|
5474
|
+
return $({ replyId: ie });
|
|
5441
5475
|
},
|
|
5442
|
-
updateContent: (K,
|
|
5476
|
+
updateContent: (K, ie) => x({ replyInfo: K, content: ie })
|
|
5443
5477
|
},
|
|
5444
5478
|
likes: {
|
|
5445
|
-
createLike: () =>
|
|
5479
|
+
createLike: () => M({ replyId: b == null ? void 0 : b.id }),
|
|
5446
5480
|
deleteLike: () => {
|
|
5447
|
-
var
|
|
5448
|
-
const K = ((
|
|
5481
|
+
var ie, ve, Pe;
|
|
5482
|
+
const K = ((ie = b == null ? void 0 : b.own_children) == null ? void 0 : ie.like) && ((Pe = (ve = b == null ? void 0 : b.own_children) == null ? void 0 : ve.like[0]) == null ? void 0 : Pe.id);
|
|
5449
5483
|
return F({ replyId: K || "" });
|
|
5450
5484
|
}
|
|
5451
5485
|
},
|
|
5452
5486
|
comments: {}
|
|
5453
5487
|
},
|
|
5454
5488
|
children: /* @__PURE__ */ s.jsx(
|
|
5455
|
-
|
|
5489
|
+
$a,
|
|
5456
5490
|
{
|
|
5457
5491
|
basePath: e,
|
|
5458
5492
|
parentId: t,
|
|
5459
5493
|
replyParentId: b == null ? void 0 : b.id,
|
|
5460
5494
|
activityId: n,
|
|
5461
5495
|
replyCount: ((re = b == null ? void 0 : b.children_counts) == null ? void 0 : re.reply) || 0,
|
|
5462
|
-
replies: (
|
|
5496
|
+
replies: (he = b == null ? void 0 : b.latest_children) == null ? void 0 : he.reply,
|
|
5463
5497
|
isMember: o,
|
|
5464
5498
|
functions: {
|
|
5465
5499
|
create: i,
|
|
@@ -5477,7 +5511,7 @@ const jo = ({
|
|
|
5477
5511
|
) }, b == null ? void 0 : b.id);
|
|
5478
5512
|
}))
|
|
5479
5513
|
] });
|
|
5480
|
-
},
|
|
5514
|
+
}, Ma = ({
|
|
5481
5515
|
queryClient: e,
|
|
5482
5516
|
queryKey: t,
|
|
5483
5517
|
mutationFn: n
|
|
@@ -5501,7 +5535,7 @@ const jo = ({
|
|
|
5501
5535
|
onSettled: () => {
|
|
5502
5536
|
e.invalidateQueries({ queryKey: t });
|
|
5503
5537
|
}
|
|
5504
|
-
}),
|
|
5538
|
+
}), Na = ({
|
|
5505
5539
|
queryClient: e,
|
|
5506
5540
|
queryKey: t,
|
|
5507
5541
|
redirectUrl: n,
|
|
@@ -5528,7 +5562,7 @@ const jo = ({
|
|
|
5528
5562
|
})), { previousActivity: u };
|
|
5529
5563
|
}, onSettled: () => {
|
|
5530
5564
|
e.invalidateQueries({ queryKey: t });
|
|
5531
|
-
} }),
|
|
5565
|
+
} }), Pa = ({
|
|
5532
5566
|
queryClient: e,
|
|
5533
5567
|
queryKey: t,
|
|
5534
5568
|
user: n,
|
|
@@ -5561,7 +5595,7 @@ const jo = ({
|
|
|
5561
5595
|
}, onSettled: () => {
|
|
5562
5596
|
e.invalidateQueries({ queryKey: t });
|
|
5563
5597
|
} });
|
|
5564
|
-
const
|
|
5598
|
+
const Eo = ({
|
|
5565
5599
|
basePath: e,
|
|
5566
5600
|
parentId: t,
|
|
5567
5601
|
activityId: n,
|
|
@@ -5581,91 +5615,91 @@ const yo = ({
|
|
|
5581
5615
|
leave: v
|
|
5582
5616
|
}
|
|
5583
5617
|
}) => {
|
|
5584
|
-
var
|
|
5585
|
-
const
|
|
5586
|
-
data:
|
|
5618
|
+
var le, de, V, se, oe, I, ue, _e, fe, ke, xe, je, be, Z, re, he, K, ie, ve, Pe, ze, Fe, et;
|
|
5619
|
+
const w = C(), y = we(Se), x = wt(), {
|
|
5620
|
+
data: _,
|
|
5587
5621
|
isLoading: $,
|
|
5588
|
-
isFetching:
|
|
5589
|
-
} =
|
|
5622
|
+
isFetching: N
|
|
5623
|
+
} = Ms({
|
|
5590
5624
|
queryKey: [e, t, n],
|
|
5591
5625
|
queryFn: o
|
|
5592
|
-
}),
|
|
5593
|
-
queryClient:
|
|
5626
|
+
}), D = Ma({
|
|
5627
|
+
queryClient: x,
|
|
5594
5628
|
queryKey: [e, t, n],
|
|
5595
5629
|
mutationFn: async (ee) => await i(ee)
|
|
5596
5630
|
}), {
|
|
5597
|
-
mutate:
|
|
5598
|
-
} = ne(
|
|
5599
|
-
queryClient:
|
|
5631
|
+
mutate: G
|
|
5632
|
+
} = ne(D), B = Na({
|
|
5633
|
+
queryClient: x,
|
|
5600
5634
|
queryKey: [e, t, n],
|
|
5601
5635
|
mutationFn: async ({ activityId: ee }) => l({ activityId: ee }),
|
|
5602
5636
|
redirectUrl: `${e}/${t}`
|
|
5603
|
-
}), { mutate:
|
|
5604
|
-
queryClient:
|
|
5637
|
+
}), { mutate: M } = ne(B), F = Ca({
|
|
5638
|
+
queryClient: x,
|
|
5605
5639
|
queryKey: [e, t, n],
|
|
5606
5640
|
mutationFn: a
|
|
5607
5641
|
}), {
|
|
5608
5642
|
mutate: b
|
|
5609
|
-
} = ne(F),
|
|
5610
|
-
queryClient:
|
|
5643
|
+
} = ne(F), z = Pa({
|
|
5644
|
+
queryClient: x,
|
|
5611
5645
|
queryKey: [e, t, n],
|
|
5612
5646
|
user: y,
|
|
5613
5647
|
mutationFn: async () => {
|
|
5614
5648
|
var Ee, Le, tt;
|
|
5615
|
-
const ee = (tt = (Le = (Ee =
|
|
5649
|
+
const ee = (tt = (Le = (Ee = _ == null ? void 0 : _.own_reactions) == null ? void 0 : Ee.like) == null ? void 0 : Le.find(
|
|
5616
5650
|
(nt) => nt.user_id === (y == null ? void 0 : y.id)
|
|
5617
5651
|
)) == null ? void 0 : tt.id;
|
|
5618
5652
|
await u({ activityId: n, reactionId: ee });
|
|
5619
5653
|
},
|
|
5620
|
-
activity:
|
|
5654
|
+
activity: _
|
|
5621
5655
|
}), {
|
|
5622
5656
|
mutate: k
|
|
5623
|
-
} = ne(
|
|
5657
|
+
} = ne(z), L = Ae(
|
|
5624
5658
|
({ activityId: ee }) => b({ activityId: ee }),
|
|
5625
5659
|
[b]
|
|
5626
5660
|
), J = Ae(
|
|
5627
5661
|
async ({ activityId: ee }) => k({ activityId: ee }),
|
|
5628
5662
|
[k]
|
|
5629
5663
|
);
|
|
5630
|
-
if ($ ||
|
|
5664
|
+
if ($ || N)
|
|
5631
5665
|
return /* @__PURE__ */ s.jsx(Te, { style: { height: "400px" } });
|
|
5632
|
-
if (!
|
|
5666
|
+
if (!_)
|
|
5633
5667
|
return /* @__PURE__ */ s.jsx(
|
|
5634
5668
|
Et,
|
|
5635
5669
|
{
|
|
5636
5670
|
variant: "error",
|
|
5637
|
-
text:
|
|
5671
|
+
text: w.formatMessage({ id: "activitySection_notFoundError" })
|
|
5638
5672
|
}
|
|
5639
5673
|
);
|
|
5640
|
-
const q = ((
|
|
5674
|
+
const q = ((le = _ == null ? void 0 : _.actor) == null ? void 0 : le.id) === (y == null ? void 0 : y.id), ce = rn(r, q);
|
|
5641
5675
|
return /* @__PURE__ */ s.jsx(
|
|
5642
5676
|
$t,
|
|
5643
5677
|
{
|
|
5644
5678
|
className: "activity-section",
|
|
5645
5679
|
content: {
|
|
5646
5680
|
type: "post",
|
|
5647
|
-
body:
|
|
5648
|
-
canLike:
|
|
5649
|
-
createdAt: (
|
|
5681
|
+
body: _ == null ? void 0 : _.content,
|
|
5682
|
+
canLike: ce,
|
|
5683
|
+
createdAt: (_ == null ? void 0 : _.time) || "",
|
|
5650
5684
|
slugs: {
|
|
5651
5685
|
question: `${t}/${n}`,
|
|
5652
5686
|
parentId: t,
|
|
5653
|
-
activityId:
|
|
5687
|
+
activityId: _ == null ? void 0 : _.id
|
|
5654
5688
|
},
|
|
5655
5689
|
slug: n,
|
|
5656
5690
|
author: {
|
|
5657
|
-
id: (
|
|
5658
|
-
name: ((
|
|
5659
|
-
organization: ((
|
|
5660
|
-
jobTitle: ((
|
|
5691
|
+
id: (de = _ == null ? void 0 : _.actor) == null ? void 0 : de.id,
|
|
5692
|
+
name: ((V = _ == null ? void 0 : _.actor) == null ? void 0 : V.data) && ((oe = (se = _ == null ? void 0 : _.actor) == null ? void 0 : se.data) == null ? void 0 : oe.name),
|
|
5693
|
+
organization: ((I = _ == null ? void 0 : _.actor) == null ? void 0 : I.data) && ((_e = (ue = _ == null ? void 0 : _.actor) == null ? void 0 : ue.data) == null ? void 0 : _e.organization),
|
|
5694
|
+
jobTitle: ((fe = _ == null ? void 0 : _.actor) == null ? void 0 : fe.data) && ((xe = (ke = _ == null ? void 0 : _.actor) == null ? void 0 : ke.data) == null ? void 0 : xe.jobTitle),
|
|
5661
5695
|
image: {
|
|
5662
|
-
thumbnail: ((je =
|
|
5696
|
+
thumbnail: ((je = _ == null ? void 0 : _.actor) == null ? void 0 : je.data) && ((Z = (be = _ == null ? void 0 : _.actor) == null ? void 0 : be.data) == null ? void 0 : Z.thumbnail) || void 0
|
|
5663
5697
|
}
|
|
5664
5698
|
},
|
|
5665
|
-
userLiked: ((re =
|
|
5666
|
-
likes:
|
|
5667
|
-
comments:
|
|
5668
|
-
peopleWhoLiked: ((ve =
|
|
5699
|
+
userLiked: ((re = _ == null ? void 0 : _.own_reactions) == null ? void 0 : re.like) && ((he = _ == null ? void 0 : _.own_reactions) == null ? void 0 : he.like.length) > 0,
|
|
5700
|
+
likes: _ && ((K = _ == null ? void 0 : _.reaction_counts) == null ? void 0 : K.like),
|
|
5701
|
+
comments: _ && ((ie = _ == null ? void 0 : _.reaction_counts) == null ? void 0 : ie.reply),
|
|
5702
|
+
peopleWhoLiked: ((ve = _ == null ? void 0 : _.latest_reactions) == null ? void 0 : ve.like) && ((Pe = _ == null ? void 0 : _.latest_reactions) == null ? void 0 : Pe.like.map((ee) => {
|
|
5669
5703
|
var Ee, Le;
|
|
5670
5704
|
return {
|
|
5671
5705
|
id: ee == null ? void 0 : ee.user_id,
|
|
@@ -5673,12 +5707,12 @@ const yo = ({
|
|
|
5673
5707
|
};
|
|
5674
5708
|
}))
|
|
5675
5709
|
},
|
|
5676
|
-
originalAuthorId: (ze =
|
|
5710
|
+
originalAuthorId: (ze = _ == null ? void 0 : _.actor) == null ? void 0 : ze.id,
|
|
5677
5711
|
functions: {
|
|
5678
5712
|
content: {
|
|
5679
5713
|
createContent: () => console.log("create"),
|
|
5680
|
-
deleteContent: () =>
|
|
5681
|
-
updateContent: (ee, Ee) =>
|
|
5714
|
+
deleteContent: () => M({ activityId: n }),
|
|
5715
|
+
updateContent: (ee, Ee) => G({ activityInfo: ee, content: Ee })
|
|
5682
5716
|
},
|
|
5683
5717
|
likes: {
|
|
5684
5718
|
createLike: () => L({ activityId: n }),
|
|
@@ -5692,16 +5726,16 @@ const yo = ({
|
|
|
5692
5726
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
5693
5727
|
/* @__PURE__ */ s.jsxs("h3", { children: [
|
|
5694
5728
|
"Comments (",
|
|
5695
|
-
((Fe =
|
|
5729
|
+
((Fe = _ == null ? void 0 : _.reaction_counts) == null ? void 0 : Fe.reply) || 0,
|
|
5696
5730
|
")"
|
|
5697
5731
|
] }),
|
|
5698
5732
|
/* @__PURE__ */ s.jsx(
|
|
5699
|
-
|
|
5733
|
+
Ta,
|
|
5700
5734
|
{
|
|
5701
5735
|
basePath: e,
|
|
5702
5736
|
parentId: t,
|
|
5703
5737
|
activityId: n,
|
|
5704
|
-
repliesList: (et =
|
|
5738
|
+
repliesList: (et = _ == null ? void 0 : _.latest_reactions) == null ? void 0 : et.reply,
|
|
5705
5739
|
isMember: r,
|
|
5706
5740
|
functions: {
|
|
5707
5741
|
create: c,
|
|
@@ -5718,7 +5752,7 @@ const yo = ({
|
|
|
5718
5752
|
},
|
|
5719
5753
|
n
|
|
5720
5754
|
);
|
|
5721
|
-
},
|
|
5755
|
+
}, So = ({ id: e, data: { jobTitle: t, name: n, organization: r, thumbnail: o } }) => ({
|
|
5722
5756
|
id: e,
|
|
5723
5757
|
name: n,
|
|
5724
5758
|
jobTitle: t,
|
|
@@ -5756,7 +5790,7 @@ const yo = ({
|
|
|
5756
5790
|
] });
|
|
5757
5791
|
}
|
|
5758
5792
|
if (m && !i || l)
|
|
5759
|
-
return /* @__PURE__ */ s.jsx("p", { className: "details", children: l ? n.formatMessage({ id: "card_bootcamp" }) :
|
|
5793
|
+
return /* @__PURE__ */ s.jsx("p", { className: "details", children: l ? n.formatMessage({ id: "card_bootcamp" }) : In(m) });
|
|
5760
5794
|
if (a)
|
|
5761
5795
|
return /* @__PURE__ */ s.jsx(
|
|
5762
5796
|
ft,
|
|
@@ -5840,13 +5874,13 @@ const yo = ({
|
|
|
5840
5874
|
},
|
|
5841
5875
|
gtmEvent: "learning-hub"
|
|
5842
5876
|
}
|
|
5843
|
-
},
|
|
5877
|
+
}, Ra = ({ data: e, cta: t, link: n, gtmContext: r }) => {
|
|
5844
5878
|
var g;
|
|
5845
|
-
const o = C(), [i, l] =
|
|
5879
|
+
const o = C(), [i, l] = A({
|
|
5846
5880
|
loading: !1,
|
|
5847
5881
|
registered: e.registered || !1
|
|
5848
5882
|
});
|
|
5849
|
-
|
|
5883
|
+
Y(() => {
|
|
5850
5884
|
e.registered && l((v) => ({ ...v, registered: !0 }));
|
|
5851
5885
|
}, [e.registered]);
|
|
5852
5886
|
const { startDate: a, dateHasPassed: u, pill: c, slug: m } = e, d = e.contentType;
|
|
@@ -5864,7 +5898,7 @@ const yo = ({
|
|
|
5864
5898
|
);
|
|
5865
5899
|
if (d === "people")
|
|
5866
5900
|
return /* @__PURE__ */ s.jsx(
|
|
5867
|
-
|
|
5901
|
+
U,
|
|
5868
5902
|
{
|
|
5869
5903
|
variant: "tertiary",
|
|
5870
5904
|
size: "small",
|
|
@@ -5877,21 +5911,21 @@ const yo = ({
|
|
|
5877
5911
|
);
|
|
5878
5912
|
const h = ["microcourse", "event"];
|
|
5879
5913
|
if (t && t.onClick && h.includes(d) && c !== "premium") {
|
|
5880
|
-
const v = i.loading || i.registered,
|
|
5914
|
+
const v = i.loading || i.registered, w = async (y) => {
|
|
5881
5915
|
if (y.preventDefault(), y.stopPropagation(), !(v || !t || !t.onClick)) {
|
|
5882
|
-
l((
|
|
5916
|
+
l((x) => ({ ...x, loading: !0 }));
|
|
5883
5917
|
try {
|
|
5884
|
-
const
|
|
5885
|
-
l(
|
|
5918
|
+
const x = await t.onClick(e);
|
|
5919
|
+
l(x === "success" ? () => ({ registered: !0, loading: !1 }) : (_) => ({ ..._, loading: !1 }));
|
|
5886
5920
|
} catch {
|
|
5887
|
-
l((
|
|
5921
|
+
l((_) => ({ ..._, loading: !1 }));
|
|
5888
5922
|
}
|
|
5889
5923
|
}
|
|
5890
5924
|
};
|
|
5891
5925
|
return /* @__PURE__ */ s.jsx(
|
|
5892
|
-
|
|
5926
|
+
U,
|
|
5893
5927
|
{
|
|
5894
|
-
onClick:
|
|
5928
|
+
onClick: w,
|
|
5895
5929
|
className: "gtm-trackable",
|
|
5896
5930
|
size: "small",
|
|
5897
5931
|
styling: { fullWidth: !0 },
|
|
@@ -5912,16 +5946,16 @@ const yo = ({
|
|
|
5912
5946
|
person: "user",
|
|
5913
5947
|
speech: "speech-bubble_round",
|
|
5914
5948
|
star: "star_empty_thin"
|
|
5915
|
-
},
|
|
5949
|
+
}, Aa = (e) => {
|
|
5916
5950
|
let t = e;
|
|
5917
5951
|
return Object.keys(Nn).includes(e) && (t = Nn[e]), `url(${mt}icons/${t}.svg)`;
|
|
5918
5952
|
};
|
|
5919
|
-
const
|
|
5953
|
+
const Fa = {
|
|
5920
5954
|
title: 66,
|
|
5921
5955
|
text: 3e3,
|
|
5922
5956
|
secondaryText: 1e3,
|
|
5923
5957
|
partner: 25
|
|
5924
|
-
},
|
|
5958
|
+
}, La = ({
|
|
5925
5959
|
id: e = "",
|
|
5926
5960
|
card: t,
|
|
5927
5961
|
buildCardData: n,
|
|
@@ -5929,15 +5963,15 @@ const Aa = {
|
|
|
5929
5963
|
gtmContext: o = "Carousel",
|
|
5930
5964
|
className: i = ""
|
|
5931
5965
|
}) => {
|
|
5932
|
-
const l = C(), a = we(Se), u = a && typeof a.id == "string", [c, m] =
|
|
5966
|
+
const l = C(), a = we(Se), u = a && typeof a.id == "string", [c, m] = A({
|
|
5933
5967
|
data: null,
|
|
5934
5968
|
isLoading: !0
|
|
5935
5969
|
}), { data: d, isLoading: p } = c, h = Ae(() => {
|
|
5936
|
-
n(t, u).then((
|
|
5937
|
-
m(() => ({ data:
|
|
5938
|
-
}).catch(() => m((
|
|
5970
|
+
n(t, u).then((B) => {
|
|
5971
|
+
m(() => ({ data: B, isLoading: !1 }));
|
|
5972
|
+
}).catch(() => m((B) => ({ ...B, isLoading: !1 })));
|
|
5939
5973
|
}, [e]);
|
|
5940
|
-
if (
|
|
5974
|
+
if (Y(() => {
|
|
5941
5975
|
h();
|
|
5942
5976
|
}, []), p || !d)
|
|
5943
5977
|
return /* @__PURE__ */ s.jsx(
|
|
@@ -5953,48 +5987,48 @@ const Aa = {
|
|
|
5953
5987
|
return /* @__PURE__ */ s.jsx(Te, { element: "li", className: "card-wrapper" });
|
|
5954
5988
|
const {
|
|
5955
5989
|
basePath: v = "",
|
|
5956
|
-
className:
|
|
5990
|
+
className: w,
|
|
5957
5991
|
length: y,
|
|
5958
|
-
gtmEvent:
|
|
5959
|
-
} = xt[g],
|
|
5960
|
-
let
|
|
5961
|
-
$ && (
|
|
5992
|
+
gtmEvent: x
|
|
5993
|
+
} = xt[g], _ = On(`card_label_${g}`) ? l.formatMessage({ id: `card_label_${g}` }) : !1, $ = d.slug ? `${v}${d.slug}` : !1, N = { ...Fa, ...y };
|
|
5994
|
+
let D = { className: "card" };
|
|
5995
|
+
$ && (D = {
|
|
5962
5996
|
href: $,
|
|
5963
5997
|
className: "card gtm-trackable",
|
|
5964
5998
|
"data-gtm-event-context": `${o}-CarouselCard`,
|
|
5965
|
-
"data-gtm-event-type": `${
|
|
5999
|
+
"data-gtm-event-type": `${x}-click`,
|
|
5966
6000
|
"data-testid": "link"
|
|
5967
|
-
}, d.openInNewTab && (
|
|
5968
|
-
const
|
|
6001
|
+
}, d.openInNewTab && (D.target = "_blank"));
|
|
6002
|
+
const G = d.customIcon ? { "--custom-icon": Aa(d.customIcon) } : {};
|
|
5969
6003
|
return /* @__PURE__ */ s.jsx(
|
|
5970
6004
|
"li",
|
|
5971
6005
|
{
|
|
5972
|
-
className: E("card-wrapper text-medium",
|
|
6006
|
+
className: E("card-wrapper text-medium", w, i, {
|
|
5973
6007
|
"has-link": $,
|
|
5974
6008
|
"no-link": !$,
|
|
5975
6009
|
"has-custom-icon": d.customIcon,
|
|
5976
6010
|
"has-image": d.banner
|
|
5977
6011
|
}),
|
|
5978
|
-
style:
|
|
6012
|
+
style: G,
|
|
5979
6013
|
"data-testid": `${g}-card`,
|
|
5980
|
-
children:
|
|
6014
|
+
children: P.createElement(
|
|
5981
6015
|
$ ? "a" : "div",
|
|
5982
|
-
|
|
6016
|
+
D,
|
|
5983
6017
|
/* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
5984
|
-
(d.customLabel ||
|
|
6018
|
+
(d.customLabel || _) && /* @__PURE__ */ s.jsx("small", { className: E("card-label text-small", w), children: d.customLabel || _ }),
|
|
5985
6019
|
d.startDate && !d.isOngoingEvent && /* @__PURE__ */ s.jsx(
|
|
5986
6020
|
ft,
|
|
5987
6021
|
{
|
|
5988
6022
|
size: "small",
|
|
5989
6023
|
variant: d.dateHasPassed ? "default" : "information",
|
|
5990
6024
|
"data-testid": "date",
|
|
5991
|
-
children: d.dateHasPassed ? l.formatMessage({ id: "card_ended" }) :
|
|
6025
|
+
children: d.dateHasPassed ? l.formatMessage({ id: "card_ended" }) : Gs(d.startDate)
|
|
5992
6026
|
}
|
|
5993
6027
|
),
|
|
5994
6028
|
d.banner ? /* @__PURE__ */ s.jsxs("p", { className: "img", children: [
|
|
5995
6029
|
d.registered && /* @__PURE__ */ s.jsx(ft, { size: "small", variant: "registered", children: l.formatMessage({ id: "card_registered" }) }),
|
|
5996
|
-
/* @__PURE__ */ s.jsx(
|
|
5997
|
-
] }) :
|
|
6030
|
+
/* @__PURE__ */ s.jsx(Bn, { image: d.banner })
|
|
6031
|
+
] }) : w === "people" ? /* @__PURE__ */ s.jsx(
|
|
5998
6032
|
Ke,
|
|
5999
6033
|
{
|
|
6000
6034
|
name: d.title || "",
|
|
@@ -6003,37 +6037,37 @@ const Aa = {
|
|
|
6003
6037
|
}
|
|
6004
6038
|
) : null,
|
|
6005
6039
|
d.contributors && /* @__PURE__ */ s.jsx(
|
|
6006
|
-
|
|
6040
|
+
Vn,
|
|
6007
6041
|
{
|
|
6008
6042
|
contributors: { data: d.contributors },
|
|
6009
6043
|
styling: {
|
|
6010
6044
|
size: "small",
|
|
6011
|
-
showGap:
|
|
6045
|
+
showGap: w !== "question",
|
|
6012
6046
|
showText: !0
|
|
6013
6047
|
},
|
|
6014
6048
|
"data-testid": "contributors"
|
|
6015
6049
|
}
|
|
6016
6050
|
),
|
|
6017
|
-
d.partner && /* @__PURE__ */ s.jsx("p", { className: "partners", "data-testid": "partners", children: He(d.partner.title,
|
|
6051
|
+
d.partner && /* @__PURE__ */ s.jsx("p", { className: "partners", "data-testid": "partners", children: He(d.partner.title, N.partner) }),
|
|
6018
6052
|
/* Text */
|
|
6019
|
-
["title", "text", "secondaryText"].map((
|
|
6020
|
-
const
|
|
6021
|
-
if (!
|
|
6053
|
+
["title", "text", "secondaryText"].map((B) => {
|
|
6054
|
+
const M = d[B];
|
|
6055
|
+
if (!M)
|
|
6022
6056
|
return null;
|
|
6023
|
-
const F =
|
|
6024
|
-
return /* @__PURE__ */ s.jsx("p", { className: F, "data-testid": F, children: He(
|
|
6057
|
+
const F = Ys(B);
|
|
6058
|
+
return /* @__PURE__ */ s.jsx("p", { className: F, "data-testid": F, children: He(M, N[B]) }, B);
|
|
6025
6059
|
}),
|
|
6026
|
-
/* @__PURE__ */ s.jsx(Da, { type:
|
|
6027
|
-
/* @__PURE__ */ s.jsx(
|
|
6060
|
+
/* @__PURE__ */ s.jsx(Da, { type: w || "", data: d }),
|
|
6061
|
+
/* @__PURE__ */ s.jsx(Ra, { data: d, cta: r, link: $ || "", gtmContext: o })
|
|
6028
6062
|
] })
|
|
6029
6063
|
)
|
|
6030
6064
|
}
|
|
6031
6065
|
);
|
|
6032
6066
|
};
|
|
6033
|
-
const
|
|
6067
|
+
const Ia = ({ cards: e, cardTypes: t, className: n = "", ...r }) => /* @__PURE__ */ s.jsx("ul", { className: E("card-block", n), children: e.map((o, i) => {
|
|
6034
6068
|
const l = o.slug ? `${o.slug}-${t[i]}` : `${t[i]}-${i}`;
|
|
6035
6069
|
return /* @__PURE__ */ s.jsx(
|
|
6036
|
-
|
|
6070
|
+
La,
|
|
6037
6071
|
{
|
|
6038
6072
|
id: l,
|
|
6039
6073
|
card: { ...o, contentType: t[i] },
|
|
@@ -6042,7 +6076,7 @@ const La = ({ cards: e, cardTypes: t, className: n = "", ...r }) => /* @__PURE__
|
|
|
6042
6076
|
l
|
|
6043
6077
|
);
|
|
6044
6078
|
}) });
|
|
6045
|
-
const
|
|
6079
|
+
const Cn = [
|
|
6046
6080
|
{
|
|
6047
6081
|
contentType: "solutionArticle",
|
|
6048
6082
|
banner: {
|
|
@@ -6086,9 +6120,9 @@ const Dn = [
|
|
|
6086
6120
|
contributors: ["community"]
|
|
6087
6121
|
}
|
|
6088
6122
|
];
|
|
6089
|
-
const lt = "notFoundError_",
|
|
6123
|
+
const lt = "notFoundError_", $o = () => {
|
|
6090
6124
|
const e = C(), t = [];
|
|
6091
|
-
return
|
|
6125
|
+
return Cn.forEach((n, r) => {
|
|
6092
6126
|
n.title = e.formatMessage({ id: `${lt}post_${r + 1}` }), t.push("solutionArticle");
|
|
6093
6127
|
}), /* @__PURE__ */ s.jsxs(
|
|
6094
6128
|
Gr,
|
|
@@ -6097,16 +6131,16 @@ const lt = "notFoundError_", So = () => {
|
|
|
6097
6131
|
additionalContent: {
|
|
6098
6132
|
appended: /* @__PURE__ */ s.jsxs(tn, { children: [
|
|
6099
6133
|
/* @__PURE__ */ s.jsx(
|
|
6100
|
-
|
|
6134
|
+
Ia,
|
|
6101
6135
|
{
|
|
6102
|
-
cards:
|
|
6136
|
+
cards: Cn,
|
|
6103
6137
|
cardTypes: t,
|
|
6104
6138
|
buildCardData: (n) => new Promise((r, o) => {
|
|
6105
6139
|
r(n);
|
|
6106
6140
|
})
|
|
6107
6141
|
}
|
|
6108
6142
|
),
|
|
6109
|
-
/* @__PURE__ */ s.jsx(
|
|
6143
|
+
/* @__PURE__ */ s.jsx(U, { href: "/solution-articles/", children: e.formatMessage({ id: `${lt}cta` }) })
|
|
6110
6144
|
] })
|
|
6111
6145
|
},
|
|
6112
6146
|
reportError: () => {
|
|
@@ -6121,92 +6155,92 @@ const lt = "notFoundError_", So = () => {
|
|
|
6121
6155
|
};
|
|
6122
6156
|
export {
|
|
6123
6157
|
mt as ASSETS_BUCKET,
|
|
6124
|
-
|
|
6125
|
-
|
|
6158
|
+
yo as ActivitiesFeed,
|
|
6159
|
+
Eo as ActivitySection,
|
|
6126
6160
|
sn as AddPost,
|
|
6127
|
-
|
|
6128
|
-
|
|
6129
|
-
|
|
6161
|
+
no as BannerSection,
|
|
6162
|
+
uo as Breadcrumbs,
|
|
6163
|
+
U as Button,
|
|
6130
6164
|
jt as ButtonWrapper,
|
|
6131
|
-
|
|
6132
|
-
|
|
6165
|
+
yr as CacheProvider,
|
|
6166
|
+
Hn as CollapsibleSection,
|
|
6133
6167
|
Or as Columns,
|
|
6134
|
-
|
|
6135
|
-
|
|
6168
|
+
lo as CommunityDetails,
|
|
6169
|
+
Vn as Contributors,
|
|
6136
6170
|
St as ConversationContext,
|
|
6137
6171
|
Br as CookieBanner,
|
|
6138
6172
|
Xr as DiscussionConversation,
|
|
6139
|
-
|
|
6173
|
+
ss as DiscussionForm,
|
|
6140
6174
|
ea as DiscussionLikes,
|
|
6141
6175
|
$t as DiscussionPost,
|
|
6142
6176
|
na as DiscussionThread,
|
|
6143
6177
|
Ue as Divider,
|
|
6144
|
-
|
|
6178
|
+
eo as DownloadSection,
|
|
6145
6179
|
Xe as EMAILS,
|
|
6146
|
-
|
|
6180
|
+
_o as EmailHelperTextBox,
|
|
6147
6181
|
Et as EmptyStateBox,
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6182
|
+
mo as Filters,
|
|
6183
|
+
$r as FlagsProvider,
|
|
6184
|
+
qn as Footer,
|
|
6151
6185
|
tn as FullWidthSection,
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6186
|
+
co as GlobalProviders,
|
|
6187
|
+
es as Header,
|
|
6188
|
+
lr as HelperTextBox,
|
|
6189
|
+
Rn as HiddenFromScreenReaders,
|
|
6190
|
+
ao as HideShowTextBox,
|
|
6157
6191
|
Re as HighlightedTextBox,
|
|
6158
|
-
|
|
6192
|
+
Tr as IntlProvider,
|
|
6159
6193
|
Wr as InviteForm,
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6194
|
+
vo as InviteModal,
|
|
6195
|
+
Yn as JoinButton,
|
|
6196
|
+
fo as LanguageSwitcher,
|
|
6163
6197
|
yt as Link,
|
|
6164
|
-
|
|
6165
|
-
|
|
6198
|
+
Gn as LoadMore,
|
|
6199
|
+
oo as LoadingBlock,
|
|
6166
6200
|
Te as LoadingPlaceholder,
|
|
6167
|
-
|
|
6168
|
-
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
6201
|
+
io as LoadingState,
|
|
6202
|
+
Jn as Logo,
|
|
6203
|
+
to as LogoSection,
|
|
6204
|
+
wn as MarkdownText,
|
|
6205
|
+
so as MarketingBox,
|
|
6172
6206
|
nn as Member,
|
|
6173
|
-
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6207
|
+
ko as MembersList,
|
|
6208
|
+
ts as Modal,
|
|
6209
|
+
Pr as MoreMenu,
|
|
6210
|
+
ro as NUMBER_OF_USERS,
|
|
6177
6211
|
Ar as NavigationMenu,
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6212
|
+
$o as NotFoundError,
|
|
6213
|
+
ns as Overlay,
|
|
6214
|
+
xr as PageHeading,
|
|
6181
6215
|
Gr as PageLayout,
|
|
6182
|
-
|
|
6216
|
+
xo as PasswordRules,
|
|
6183
6217
|
ft as Pill,
|
|
6184
6218
|
Ke as ProfilePicture,
|
|
6185
|
-
|
|
6186
|
-
|
|
6187
|
-
|
|
6188
|
-
|
|
6189
|
-
|
|
6219
|
+
vr as ProgressBar,
|
|
6220
|
+
bo as Rating,
|
|
6221
|
+
Ta as RepliesFeed,
|
|
6222
|
+
jo as ResponsesHeading,
|
|
6223
|
+
Bn as ResponsiveImage,
|
|
6190
6224
|
Ur as SearchForm,
|
|
6191
|
-
|
|
6192
|
-
|
|
6225
|
+
ho as ShareLinks,
|
|
6226
|
+
_r as Span,
|
|
6193
6227
|
Xt as StatusBanner,
|
|
6194
|
-
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
|
|
6228
|
+
po as Tabs,
|
|
6229
|
+
wo as Tags,
|
|
6230
|
+
or as Tooltip,
|
|
6231
|
+
go as TopLevelPage,
|
|
6198
6232
|
Se as UserContext,
|
|
6199
|
-
|
|
6200
|
-
|
|
6233
|
+
Nr as UserProvider,
|
|
6234
|
+
me as VisuallyHidden,
|
|
6201
6235
|
Vr as addAriaProps,
|
|
6202
|
-
|
|
6236
|
+
zn as getMember,
|
|
6203
6237
|
pt as headerData,
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
|
|
6238
|
+
So as mapGetStreamData,
|
|
6239
|
+
er as pageReady,
|
|
6240
|
+
Us as useCurrentPath,
|
|
6207
6241
|
Qe as useEffectAfterMount,
|
|
6208
6242
|
kt as useElementWidth,
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6243
|
+
zs as useScrollListener,
|
|
6244
|
+
Vs as useScrollToHash,
|
|
6245
|
+
Mr as useUser
|
|
6212
6246
|
};
|