@apolitical/component-library 1.13.3-beta.1 → 1.13.3-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/communities/community-details/community-details.d.ts +2 -2
- package/discussion/components/post/post.d.ts +3 -1
- package/index.js +12 -12
- package/index.mjs +992 -907
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import N, { memo as Ne, useState as P, useEffect as z, useRef as ee, useMemo as qe, Children as jt, createContext as At, useContext as ye, Fragment as Et, useCallback as Ee, useReducer as rr, Suspense as sr } from "react";
|
|
2
2
|
import or from "lodash.clonedeep";
|
|
3
3
|
import ar from "lodash.set";
|
|
4
|
-
import { useIntl as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { QueryClient as cr, QueryClientProvider as ur, useQueryClient as
|
|
4
|
+
import { useIntl as F, IntlProvider as ir, createIntl as lr, FormattedMessage as we } from "react-intl";
|
|
5
|
+
import Ke from "truncate";
|
|
6
|
+
import et from "markdown-to-jsx";
|
|
7
|
+
import { QueryClient as cr, QueryClientProvider as ur, useQueryClient as Nt, useQuery as cn, useMutation as fe } from "@tanstack/react-query";
|
|
8
8
|
import { ReactQueryDevtools as dr } from "@tanstack/react-query-devtools";
|
|
9
9
|
import Ge from "posthog-js";
|
|
10
10
|
import { useCookies as mr, CookiesProvider as fr } from "react-cookie";
|
|
@@ -53,8 +53,8 @@ var dn = { exports: {} };
|
|
|
53
53
|
})();
|
|
54
54
|
})(dn);
|
|
55
55
|
var br = dn.exports;
|
|
56
|
-
const j = /* @__PURE__ */ xr(br), vr = ({ element: e = "span", showOnFocus: t = !0, children: n, ...s }) =>
|
|
57
|
-
var
|
|
56
|
+
const j = /* @__PURE__ */ xr(br), vr = ({ element: e = "span", showOnFocus: t = !0, children: n, ...s }) => N.createElement(e, { ...s, className: j("hidden", { "show-on-focus": t }), children: n }), re = Ne(vr), wr = ({ element: e = "span", children: t = null, ...n }) => N.createElement(e, { ...n, "aria-hidden": !0 }, t), mn = Ne(wr);
|
|
57
|
+
var St = { exports: {} }, Pe = {};
|
|
58
58
|
/**
|
|
59
59
|
* @license React
|
|
60
60
|
* react-jsx-runtime.production.min.js
|
|
@@ -67,9 +67,9 @@ var jt = { exports: {} }, De = {};
|
|
|
67
67
|
var qt;
|
|
68
68
|
function kr() {
|
|
69
69
|
if (qt)
|
|
70
|
-
return
|
|
70
|
+
return Pe;
|
|
71
71
|
qt = 1;
|
|
72
|
-
var e =
|
|
72
|
+
var e = N, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
73
73
|
function m(a, i, c) {
|
|
74
74
|
var u, f = {}, p = null, h = null;
|
|
75
75
|
c !== void 0 && (p = "" + c), i.key !== void 0 && (p = "" + i.key), i.ref !== void 0 && (h = i.ref);
|
|
@@ -80,9 +80,9 @@ function kr() {
|
|
|
80
80
|
f[u] === void 0 && (f[u] = i[u]);
|
|
81
81
|
return { $$typeof: t, type: a, key: p, ref: h, props: f, _owner: o.current };
|
|
82
82
|
}
|
|
83
|
-
return
|
|
83
|
+
return Pe.Fragment = n, Pe.jsx = m, Pe.jsxs = m, Pe;
|
|
84
84
|
}
|
|
85
|
-
var
|
|
85
|
+
var Fe = {};
|
|
86
86
|
/**
|
|
87
87
|
* @license React
|
|
88
88
|
* react-jsx-runtime.development.js
|
|
@@ -95,54 +95,54 @@ var Pe = {};
|
|
|
95
95
|
var Kt;
|
|
96
96
|
function yr() {
|
|
97
97
|
return Kt || (Kt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
98
|
-
var e =
|
|
98
|
+
var e = N, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), m = Symbol.for("react.provider"), a = Symbol.for("react.context"), i = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), h = Symbol.for("react.offscreen"), _ = Symbol.iterator, k = "@@iterator";
|
|
99
99
|
function g(d) {
|
|
100
100
|
if (d === null || typeof d != "object")
|
|
101
101
|
return null;
|
|
102
|
-
var
|
|
103
|
-
return typeof
|
|
102
|
+
var x = _ && d[_] || d[k];
|
|
103
|
+
return typeof x == "function" ? x : null;
|
|
104
104
|
}
|
|
105
105
|
var E = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
106
|
-
function
|
|
106
|
+
function v(d) {
|
|
107
107
|
{
|
|
108
|
-
for (var
|
|
109
|
-
y[
|
|
110
|
-
|
|
108
|
+
for (var x = arguments.length, y = new Array(x > 1 ? x - 1 : 0), $ = 1; $ < x; $++)
|
|
109
|
+
y[$ - 1] = arguments[$];
|
|
110
|
+
S("error", d, y);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function S(d, x, y) {
|
|
114
114
|
{
|
|
115
|
-
var
|
|
116
|
-
O !== "" && (
|
|
117
|
-
var H = y.map(function(
|
|
118
|
-
return String(
|
|
115
|
+
var $ = E.ReactDebugCurrentFrame, O = $.getStackAddendum();
|
|
116
|
+
O !== "" && (x += "%s", y = y.concat([O]));
|
|
117
|
+
var H = y.map(function(D) {
|
|
118
|
+
return String(D);
|
|
119
119
|
});
|
|
120
|
-
H.unshift("Warning: " +
|
|
120
|
+
H.unshift("Warning: " + x), Function.prototype.apply.call(console[d], console, H);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
var T = !1, M = !1, Q = !1, V = !1,
|
|
124
|
-
|
|
123
|
+
var T = !1, M = !1, Q = !1, V = !1, b = !1, A;
|
|
124
|
+
A = Symbol.for("react.module.reference");
|
|
125
125
|
function q(d) {
|
|
126
|
-
return !!(typeof d == "string" || typeof d == "function" || d === s || d === l ||
|
|
126
|
+
return !!(typeof d == "string" || typeof d == "function" || d === s || d === l || b || d === o || d === c || d === u || V || d === h || T || M || Q || typeof d == "object" && d !== null && (d.$$typeof === p || d.$$typeof === f || d.$$typeof === m || d.$$typeof === a || d.$$typeof === i || // 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
|
-
d.$$typeof ===
|
|
130
|
+
d.$$typeof === A || d.getModuleId !== void 0));
|
|
131
131
|
}
|
|
132
|
-
function
|
|
133
|
-
var
|
|
134
|
-
if (
|
|
135
|
-
return
|
|
136
|
-
var O =
|
|
132
|
+
function w(d, x, y) {
|
|
133
|
+
var $ = d.displayName;
|
|
134
|
+
if ($)
|
|
135
|
+
return $;
|
|
136
|
+
var O = x.displayName || x.name || "";
|
|
137
137
|
return O !== "" ? y + "(" + O + ")" : y;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function G(d) {
|
|
140
140
|
return d.displayName || "Context";
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function L(d) {
|
|
143
143
|
if (d == null)
|
|
144
144
|
return null;
|
|
145
|
-
if (typeof d.tag == "number" &&
|
|
145
|
+
if (typeof d.tag == "number" && v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof d == "function")
|
|
146
146
|
return d.displayName || d.name || null;
|
|
147
147
|
if (typeof d == "string")
|
|
148
148
|
return d;
|
|
@@ -163,20 +163,20 @@ function yr() {
|
|
|
163
163
|
if (typeof d == "object")
|
|
164
164
|
switch (d.$$typeof) {
|
|
165
165
|
case a:
|
|
166
|
-
var
|
|
167
|
-
return
|
|
166
|
+
var x = d;
|
|
167
|
+
return G(x) + ".Consumer";
|
|
168
168
|
case m:
|
|
169
169
|
var y = d;
|
|
170
|
-
return
|
|
170
|
+
return G(y._context) + ".Provider";
|
|
171
171
|
case i:
|
|
172
|
-
return
|
|
172
|
+
return w(d, d.render, "ForwardRef");
|
|
173
173
|
case f:
|
|
174
|
-
var
|
|
175
|
-
return
|
|
174
|
+
var $ = d.displayName || null;
|
|
175
|
+
return $ !== null ? $ : L(d.type) || "Memo";
|
|
176
176
|
case p: {
|
|
177
|
-
var O = d, H = O._payload,
|
|
177
|
+
var O = d, H = O._payload, D = O._init;
|
|
178
178
|
try {
|
|
179
|
-
return
|
|
179
|
+
return L(D(H));
|
|
180
180
|
} catch {
|
|
181
181
|
return null;
|
|
182
182
|
}
|
|
@@ -184,18 +184,18 @@ function yr() {
|
|
|
184
184
|
}
|
|
185
185
|
return null;
|
|
186
186
|
}
|
|
187
|
-
var
|
|
188
|
-
function
|
|
187
|
+
var B = Object.assign, U = 0, Y, K, ie, le, ce, ue, oe;
|
|
188
|
+
function R() {
|
|
189
189
|
}
|
|
190
|
-
|
|
191
|
-
function
|
|
190
|
+
R.__reactDisabledLog = !0;
|
|
191
|
+
function te() {
|
|
192
192
|
{
|
|
193
193
|
if (U === 0) {
|
|
194
|
-
|
|
194
|
+
Y = console.log, K = console.info, ie = console.warn, le = console.error, ce = console.group, ue = console.groupCollapsed, oe = console.groupEnd;
|
|
195
195
|
var d = {
|
|
196
196
|
configurable: !0,
|
|
197
197
|
enumerable: !0,
|
|
198
|
-
value:
|
|
198
|
+
value: R,
|
|
199
199
|
writable: !0
|
|
200
200
|
};
|
|
201
201
|
Object.defineProperties(console, {
|
|
@@ -211,7 +211,7 @@ function yr() {
|
|
|
211
211
|
U++;
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function X() {
|
|
215
215
|
{
|
|
216
216
|
if (U--, U === 0) {
|
|
217
217
|
var d = {
|
|
@@ -220,41 +220,41 @@ function yr() {
|
|
|
220
220
|
writable: !0
|
|
221
221
|
};
|
|
222
222
|
Object.defineProperties(console, {
|
|
223
|
-
log:
|
|
224
|
-
value:
|
|
223
|
+
log: B({}, d, {
|
|
224
|
+
value: Y
|
|
225
225
|
}),
|
|
226
|
-
info:
|
|
226
|
+
info: B({}, d, {
|
|
227
227
|
value: K
|
|
228
228
|
}),
|
|
229
|
-
warn:
|
|
229
|
+
warn: B({}, d, {
|
|
230
230
|
value: ie
|
|
231
231
|
}),
|
|
232
|
-
error:
|
|
232
|
+
error: B({}, d, {
|
|
233
233
|
value: le
|
|
234
234
|
}),
|
|
235
|
-
group:
|
|
236
|
-
value:
|
|
235
|
+
group: B({}, d, {
|
|
236
|
+
value: ce
|
|
237
237
|
}),
|
|
238
|
-
groupCollapsed:
|
|
239
|
-
value:
|
|
238
|
+
groupCollapsed: B({}, d, {
|
|
239
|
+
value: ue
|
|
240
240
|
}),
|
|
241
|
-
groupEnd:
|
|
242
|
-
value:
|
|
241
|
+
groupEnd: B({}, d, {
|
|
242
|
+
value: oe
|
|
243
243
|
})
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
|
-
U < 0 &&
|
|
246
|
+
U < 0 && v("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
|
-
var
|
|
250
|
-
function pe(d,
|
|
249
|
+
var ne = E.ReactCurrentDispatcher, me;
|
|
250
|
+
function pe(d, x, y) {
|
|
251
251
|
{
|
|
252
252
|
if (me === void 0)
|
|
253
253
|
try {
|
|
254
254
|
throw Error();
|
|
255
255
|
} catch (O) {
|
|
256
|
-
var
|
|
257
|
-
me =
|
|
256
|
+
var $ = O.stack.trim().match(/\n( *(at )?)/);
|
|
257
|
+
me = $ && $[1] || "";
|
|
258
258
|
}
|
|
259
259
|
return `
|
|
260
260
|
` + me + d;
|
|
@@ -265,7 +265,7 @@ function yr() {
|
|
|
265
265
|
var Pn = typeof WeakMap == "function" ? WeakMap : Map;
|
|
266
266
|
Se = new Pn();
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function Lt(d, x) {
|
|
269
269
|
if (!d || ge)
|
|
270
270
|
return "";
|
|
271
271
|
{
|
|
@@ -273,81 +273,81 @@ function yr() {
|
|
|
273
273
|
if (y !== void 0)
|
|
274
274
|
return y;
|
|
275
275
|
}
|
|
276
|
-
var
|
|
276
|
+
var $;
|
|
277
277
|
ge = !0;
|
|
278
278
|
var O = Error.prepareStackTrace;
|
|
279
279
|
Error.prepareStackTrace = void 0;
|
|
280
280
|
var H;
|
|
281
|
-
H =
|
|
281
|
+
H = ne.current, ne.current = null, te();
|
|
282
282
|
try {
|
|
283
|
-
if (
|
|
284
|
-
var
|
|
283
|
+
if (x) {
|
|
284
|
+
var D = function() {
|
|
285
285
|
throw Error();
|
|
286
286
|
};
|
|
287
|
-
if (Object.defineProperty(
|
|
287
|
+
if (Object.defineProperty(D.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(D, []);
|
|
294
294
|
} catch (_e) {
|
|
295
|
-
|
|
295
|
+
$ = _e;
|
|
296
296
|
}
|
|
297
|
-
Reflect.construct(d, [],
|
|
297
|
+
Reflect.construct(d, [], D);
|
|
298
298
|
} else {
|
|
299
299
|
try {
|
|
300
|
-
|
|
300
|
+
D.call();
|
|
301
301
|
} catch (_e) {
|
|
302
|
-
|
|
302
|
+
$ = _e;
|
|
303
303
|
}
|
|
304
|
-
d.call(
|
|
304
|
+
d.call(D.prototype);
|
|
305
305
|
}
|
|
306
306
|
} else {
|
|
307
307
|
try {
|
|
308
308
|
throw Error();
|
|
309
309
|
} catch (_e) {
|
|
310
|
-
|
|
310
|
+
$ = _e;
|
|
311
311
|
}
|
|
312
312
|
d();
|
|
313
313
|
}
|
|
314
314
|
} catch (_e) {
|
|
315
|
-
if (_e &&
|
|
315
|
+
if (_e && $ && typeof _e.stack == "string") {
|
|
316
316
|
for (var C = _e.stack.split(`
|
|
317
|
-
`),
|
|
318
|
-
`), J = C.length - 1,
|
|
319
|
-
|
|
320
|
-
for (; J >= 1 &&
|
|
321
|
-
if (C[J] !==
|
|
322
|
-
if (J !== 1 ||
|
|
317
|
+
`), se = $.stack.split(`
|
|
318
|
+
`), J = C.length - 1, Z = se.length - 1; J >= 1 && Z >= 0 && C[J] !== se[Z]; )
|
|
319
|
+
Z--;
|
|
320
|
+
for (; J >= 1 && Z >= 0; J--, Z--)
|
|
321
|
+
if (C[J] !== se[Z]) {
|
|
322
|
+
if (J !== 1 || Z !== 1)
|
|
323
323
|
do
|
|
324
|
-
if (J--,
|
|
324
|
+
if (J--, Z--, Z < 0 || C[J] !== se[Z]) {
|
|
325
325
|
var de = `
|
|
326
326
|
` + C[J].replace(" at new ", " at ");
|
|
327
327
|
return d.displayName && de.includes("<anonymous>") && (de = de.replace("<anonymous>", d.displayName)), typeof d == "function" && Se.set(d, de), de;
|
|
328
328
|
}
|
|
329
|
-
while (J >= 1 &&
|
|
329
|
+
while (J >= 1 && Z >= 0);
|
|
330
330
|
break;
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
} finally {
|
|
334
|
-
ge = !1,
|
|
334
|
+
ge = !1, ne.current = H, X(), Error.prepareStackTrace = O;
|
|
335
335
|
}
|
|
336
|
-
var Te = d ? d.displayName || d.name : "",
|
|
337
|
-
return typeof d == "function" && Se.set(d,
|
|
336
|
+
var Te = d ? d.displayName || d.name : "", Zt = Te ? pe(Te) : "";
|
|
337
|
+
return typeof d == "function" && Se.set(d, Zt), Zt;
|
|
338
338
|
}
|
|
339
|
-
function Fn(d,
|
|
340
|
-
return
|
|
339
|
+
function Fn(d, x, y) {
|
|
340
|
+
return Lt(d, !1);
|
|
341
341
|
}
|
|
342
342
|
function Rn(d) {
|
|
343
|
-
var
|
|
344
|
-
return !!(
|
|
343
|
+
var x = d.prototype;
|
|
344
|
+
return !!(x && x.isReactComponent);
|
|
345
345
|
}
|
|
346
|
-
function Be(d,
|
|
346
|
+
function Be(d, x, y) {
|
|
347
347
|
if (d == null)
|
|
348
348
|
return "";
|
|
349
349
|
if (typeof d == "function")
|
|
350
|
-
return
|
|
350
|
+
return Lt(d, Rn(d));
|
|
351
351
|
if (typeof d == "string")
|
|
352
352
|
return pe(d);
|
|
353
353
|
switch (d) {
|
|
@@ -361,101 +361,101 @@ function yr() {
|
|
|
361
361
|
case i:
|
|
362
362
|
return Fn(d.render);
|
|
363
363
|
case f:
|
|
364
|
-
return Be(d.type,
|
|
364
|
+
return Be(d.type, x, y);
|
|
365
365
|
case p: {
|
|
366
|
-
var
|
|
366
|
+
var $ = d, O = $._payload, H = $._init;
|
|
367
367
|
try {
|
|
368
|
-
return Be(H(O),
|
|
368
|
+
return Be(H(O), x, y);
|
|
369
369
|
} catch {
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
return "";
|
|
374
374
|
}
|
|
375
|
-
var Ie = Object.prototype.hasOwnProperty,
|
|
375
|
+
var Ie = Object.prototype.hasOwnProperty, Bt = {}, It = E.ReactDebugCurrentFrame;
|
|
376
376
|
function He(d) {
|
|
377
377
|
if (d) {
|
|
378
|
-
var
|
|
379
|
-
|
|
378
|
+
var x = d._owner, y = Be(d.type, d._source, x ? x.type : null);
|
|
379
|
+
It.setExtraStackFrame(y);
|
|
380
380
|
} else
|
|
381
|
-
|
|
381
|
+
It.setExtraStackFrame(null);
|
|
382
382
|
}
|
|
383
|
-
function On(d,
|
|
383
|
+
function On(d, x, y, $, O) {
|
|
384
384
|
{
|
|
385
385
|
var H = Function.call.bind(Ie);
|
|
386
|
-
for (var
|
|
387
|
-
if (H(d,
|
|
386
|
+
for (var D in d)
|
|
387
|
+
if (H(d, D)) {
|
|
388
388
|
var C = void 0;
|
|
389
389
|
try {
|
|
390
|
-
if (typeof d[
|
|
391
|
-
var
|
|
392
|
-
throw
|
|
390
|
+
if (typeof d[D] != "function") {
|
|
391
|
+
var se = Error(($ || "React class") + ": " + y + " type `" + D + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof d[D] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
392
|
+
throw se.name = "Invariant Violation", se;
|
|
393
393
|
}
|
|
394
|
-
C = d[
|
|
394
|
+
C = d[D](x, D, $, y, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
395
395
|
} catch (J) {
|
|
396
396
|
C = J;
|
|
397
397
|
}
|
|
398
|
-
C && !(C instanceof Error) && (He(O),
|
|
398
|
+
C && !(C instanceof Error) && (He(O), v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", $ || "React class", y, D, typeof C), He(null)), C instanceof Error && !(C.message in Bt) && (Bt[C.message] = !0, He(O), v("Failed %s type: %s", y, C.message), He(null));
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
402
|
var Ln = Array.isArray;
|
|
403
|
-
function
|
|
403
|
+
function ot(d) {
|
|
404
404
|
return Ln(d);
|
|
405
405
|
}
|
|
406
406
|
function Bn(d) {
|
|
407
407
|
{
|
|
408
|
-
var
|
|
408
|
+
var x = typeof Symbol == "function" && Symbol.toStringTag, y = x && d[Symbol.toStringTag] || d.constructor.name || "Object";
|
|
409
409
|
return y;
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
412
|
function In(d) {
|
|
413
413
|
try {
|
|
414
|
-
return
|
|
414
|
+
return Ht(d), !1;
|
|
415
415
|
} catch {
|
|
416
416
|
return !0;
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function Ht(d) {
|
|
420
420
|
return "" + d;
|
|
421
421
|
}
|
|
422
|
-
function
|
|
422
|
+
function Qt(d) {
|
|
423
423
|
if (In(d))
|
|
424
|
-
return
|
|
424
|
+
return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Bn(d)), Ht(d);
|
|
425
425
|
}
|
|
426
|
-
var
|
|
426
|
+
var De = E.ReactCurrentOwner, Hn = {
|
|
427
427
|
key: !0,
|
|
428
428
|
ref: !0,
|
|
429
429
|
__self: !0,
|
|
430
430
|
__source: !0
|
|
431
|
-
},
|
|
432
|
-
|
|
431
|
+
}, Ut, Wt, at;
|
|
432
|
+
at = {};
|
|
433
433
|
function Qn(d) {
|
|
434
434
|
if (Ie.call(d, "ref")) {
|
|
435
|
-
var
|
|
436
|
-
if (
|
|
435
|
+
var x = Object.getOwnPropertyDescriptor(d, "ref").get;
|
|
436
|
+
if (x && x.isReactWarning)
|
|
437
437
|
return !1;
|
|
438
438
|
}
|
|
439
439
|
return d.ref !== void 0;
|
|
440
440
|
}
|
|
441
441
|
function Un(d) {
|
|
442
442
|
if (Ie.call(d, "key")) {
|
|
443
|
-
var
|
|
444
|
-
if (
|
|
443
|
+
var x = Object.getOwnPropertyDescriptor(d, "key").get;
|
|
444
|
+
if (x && x.isReactWarning)
|
|
445
445
|
return !1;
|
|
446
446
|
}
|
|
447
447
|
return d.key !== void 0;
|
|
448
448
|
}
|
|
449
|
-
function Wn(d,
|
|
450
|
-
if (typeof d.ref == "string" &&
|
|
451
|
-
var y =
|
|
452
|
-
|
|
449
|
+
function Wn(d, x) {
|
|
450
|
+
if (typeof d.ref == "string" && De.current && x && De.current.stateNode !== x) {
|
|
451
|
+
var y = L(De.current.type);
|
|
452
|
+
at[y] || (v('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', L(De.current.type), d.ref), at[y] = !0);
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
|
-
function zn(d,
|
|
455
|
+
function zn(d, x) {
|
|
456
456
|
{
|
|
457
457
|
var y = function() {
|
|
458
|
-
|
|
458
|
+
Ut || (Ut = !0, v("%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)", x));
|
|
459
459
|
};
|
|
460
460
|
y.isReactWarning = !0, Object.defineProperty(d, "key", {
|
|
461
461
|
get: y,
|
|
@@ -463,10 +463,10 @@ function yr() {
|
|
|
463
463
|
});
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
function Vn(d,
|
|
466
|
+
function Vn(d, x) {
|
|
467
467
|
{
|
|
468
468
|
var y = function() {
|
|
469
|
-
|
|
469
|
+
Wt || (Wt = !0, v("%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)", x));
|
|
470
470
|
};
|
|
471
471
|
y.isReactWarning = !0, Object.defineProperty(d, "ref", {
|
|
472
472
|
get: y,
|
|
@@ -474,15 +474,15 @@ function yr() {
|
|
|
474
474
|
});
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
var Yn = function(d,
|
|
477
|
+
var Yn = function(d, x, y, $, O, H, D) {
|
|
478
478
|
var C = {
|
|
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: d,
|
|
483
|
-
key:
|
|
483
|
+
key: x,
|
|
484
484
|
ref: y,
|
|
485
|
-
props:
|
|
485
|
+
props: D,
|
|
486
486
|
// Record the component responsible for creating this element.
|
|
487
487
|
_owner: H
|
|
488
488
|
};
|
|
@@ -495,7 +495,7 @@ function yr() {
|
|
|
495
495
|
configurable: !1,
|
|
496
496
|
enumerable: !1,
|
|
497
497
|
writable: !1,
|
|
498
|
-
value:
|
|
498
|
+
value: $
|
|
499
499
|
}), Object.defineProperty(C, "_source", {
|
|
500
500
|
configurable: !1,
|
|
501
501
|
enumerable: !1,
|
|
@@ -503,41 +503,41 @@ function yr() {
|
|
|
503
503
|
value: O
|
|
504
504
|
}), Object.freeze && (Object.freeze(C.props), Object.freeze(C)), C;
|
|
505
505
|
};
|
|
506
|
-
function Gn(d,
|
|
506
|
+
function Gn(d, x, y, $, O) {
|
|
507
507
|
{
|
|
508
|
-
var H,
|
|
509
|
-
y !== void 0 && (
|
|
510
|
-
for (H in
|
|
511
|
-
Ie.call(
|
|
508
|
+
var H, D = {}, C = null, se = null;
|
|
509
|
+
y !== void 0 && (Qt(y), C = "" + y), Un(x) && (Qt(x.key), C = "" + x.key), Qn(x) && (se = x.ref, Wn(x, O));
|
|
510
|
+
for (H in x)
|
|
511
|
+
Ie.call(x, H) && !Hn.hasOwnProperty(H) && (D[H] = x[H]);
|
|
512
512
|
if (d && d.defaultProps) {
|
|
513
513
|
var J = d.defaultProps;
|
|
514
514
|
for (H in J)
|
|
515
|
-
|
|
515
|
+
D[H] === void 0 && (D[H] = J[H]);
|
|
516
516
|
}
|
|
517
|
-
if (C ||
|
|
518
|
-
var
|
|
519
|
-
C && zn(
|
|
517
|
+
if (C || se) {
|
|
518
|
+
var Z = typeof d == "function" ? d.displayName || d.name || "Unknown" : d;
|
|
519
|
+
C && zn(D, Z), se && Vn(D, Z);
|
|
520
520
|
}
|
|
521
|
-
return Yn(d, C,
|
|
521
|
+
return Yn(d, C, se, O, $, De.current, D);
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
|
-
var
|
|
524
|
+
var it = E.ReactCurrentOwner, zt = E.ReactDebugCurrentFrame;
|
|
525
525
|
function $e(d) {
|
|
526
526
|
if (d) {
|
|
527
|
-
var
|
|
528
|
-
|
|
527
|
+
var x = d._owner, y = Be(d.type, d._source, x ? x.type : null);
|
|
528
|
+
zt.setExtraStackFrame(y);
|
|
529
529
|
} else
|
|
530
|
-
|
|
530
|
+
zt.setExtraStackFrame(null);
|
|
531
531
|
}
|
|
532
|
-
var
|
|
533
|
-
|
|
534
|
-
function
|
|
532
|
+
var lt;
|
|
533
|
+
lt = !1;
|
|
534
|
+
function ct(d) {
|
|
535
535
|
return typeof d == "object" && d !== null && d.$$typeof === t;
|
|
536
536
|
}
|
|
537
|
-
function
|
|
537
|
+
function Vt() {
|
|
538
538
|
{
|
|
539
|
-
if (
|
|
540
|
-
var d =
|
|
539
|
+
if (it.current) {
|
|
540
|
+
var d = L(it.current.type);
|
|
541
541
|
if (d)
|
|
542
542
|
return `
|
|
543
543
|
|
|
@@ -549,140 +549,140 @@ Check the render method of \`` + d + "`.";
|
|
|
549
549
|
function Jn(d) {
|
|
550
550
|
{
|
|
551
551
|
if (d !== void 0) {
|
|
552
|
-
var
|
|
552
|
+
var x = d.fileName.replace(/^.*[\\\/]/, ""), y = d.lineNumber;
|
|
553
553
|
return `
|
|
554
554
|
|
|
555
|
-
Check your code at ` +
|
|
555
|
+
Check your code at ` + x + ":" + y + ".";
|
|
556
556
|
}
|
|
557
557
|
return "";
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
|
-
var
|
|
560
|
+
var Yt = {};
|
|
561
561
|
function Xn(d) {
|
|
562
562
|
{
|
|
563
|
-
var
|
|
564
|
-
if (!
|
|
563
|
+
var x = Vt();
|
|
564
|
+
if (!x) {
|
|
565
565
|
var y = typeof d == "string" ? d : d.displayName || d.name;
|
|
566
|
-
y && (
|
|
566
|
+
y && (x = `
|
|
567
567
|
|
|
568
568
|
Check the top-level render call using <` + y + ">.");
|
|
569
569
|
}
|
|
570
|
-
return
|
|
570
|
+
return x;
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function Gt(d, x) {
|
|
574
574
|
{
|
|
575
575
|
if (!d._store || d._store.validated || d.key != null)
|
|
576
576
|
return;
|
|
577
577
|
d._store.validated = !0;
|
|
578
|
-
var y = Xn(
|
|
579
|
-
if (
|
|
578
|
+
var y = Xn(x);
|
|
579
|
+
if (Yt[y])
|
|
580
580
|
return;
|
|
581
|
-
|
|
582
|
-
var
|
|
583
|
-
d && d._owner && d._owner !==
|
|
581
|
+
Yt[y] = !0;
|
|
582
|
+
var $ = "";
|
|
583
|
+
d && d._owner && d._owner !== it.current && ($ = " It was passed a child from " + L(d._owner.type) + "."), $e(d), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', y, $), $e(null);
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
|
-
function
|
|
586
|
+
function Jt(d, x) {
|
|
587
587
|
{
|
|
588
588
|
if (typeof d != "object")
|
|
589
589
|
return;
|
|
590
|
-
if (
|
|
590
|
+
if (ot(d))
|
|
591
591
|
for (var y = 0; y < d.length; y++) {
|
|
592
|
-
var
|
|
593
|
-
|
|
592
|
+
var $ = d[y];
|
|
593
|
+
ct($) && Gt($, x);
|
|
594
594
|
}
|
|
595
|
-
else if (
|
|
595
|
+
else if (ct(d))
|
|
596
596
|
d._store && (d._store.validated = !0);
|
|
597
597
|
else if (d) {
|
|
598
598
|
var O = g(d);
|
|
599
599
|
if (typeof O == "function" && O !== d.entries)
|
|
600
|
-
for (var H = O.call(d),
|
|
601
|
-
|
|
600
|
+
for (var H = O.call(d), D; !(D = H.next()).done; )
|
|
601
|
+
ct(D.value) && Gt(D.value, x);
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
605
|
function Zn(d) {
|
|
606
606
|
{
|
|
607
|
-
var
|
|
608
|
-
if (
|
|
607
|
+
var x = d.type;
|
|
608
|
+
if (x == null || typeof x == "string")
|
|
609
609
|
return;
|
|
610
610
|
var y;
|
|
611
|
-
if (typeof
|
|
612
|
-
y =
|
|
613
|
-
else if (typeof
|
|
611
|
+
if (typeof x == "function")
|
|
612
|
+
y = x.propTypes;
|
|
613
|
+
else if (typeof x == "object" && (x.$$typeof === i || // Note: Memo only checks outer props here.
|
|
614
614
|
// Inner props are checked in the reconciler.
|
|
615
|
-
|
|
616
|
-
y =
|
|
615
|
+
x.$$typeof === f))
|
|
616
|
+
y = x.propTypes;
|
|
617
617
|
else
|
|
618
618
|
return;
|
|
619
619
|
if (y) {
|
|
620
|
-
var
|
|
621
|
-
On(y, d.props, "prop",
|
|
622
|
-
} else if (
|
|
623
|
-
|
|
624
|
-
var O =
|
|
625
|
-
|
|
620
|
+
var $ = L(x);
|
|
621
|
+
On(y, d.props, "prop", $, d);
|
|
622
|
+
} else if (x.PropTypes !== void 0 && !lt) {
|
|
623
|
+
lt = !0;
|
|
624
|
+
var O = L(x);
|
|
625
|
+
v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", O || "Unknown");
|
|
626
626
|
}
|
|
627
|
-
typeof
|
|
627
|
+
typeof x.getDefaultProps == "function" && !x.getDefaultProps.isReactClassApproved && v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
630
|
function qn(d) {
|
|
631
631
|
{
|
|
632
|
-
for (var
|
|
633
|
-
var
|
|
634
|
-
if (
|
|
635
|
-
$e(d),
|
|
632
|
+
for (var x = Object.keys(d.props), y = 0; y < x.length; y++) {
|
|
633
|
+
var $ = x[y];
|
|
634
|
+
if ($ !== "children" && $ !== "key") {
|
|
635
|
+
$e(d), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", $), $e(null);
|
|
636
636
|
break;
|
|
637
637
|
}
|
|
638
638
|
}
|
|
639
|
-
d.ref !== null && ($e(d),
|
|
639
|
+
d.ref !== null && ($e(d), v("Invalid attribute `ref` supplied to `React.Fragment`."), $e(null));
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
|
-
function
|
|
642
|
+
function Xt(d, x, y, $, O, H) {
|
|
643
643
|
{
|
|
644
|
-
var
|
|
645
|
-
if (!
|
|
644
|
+
var D = q(d);
|
|
645
|
+
if (!D) {
|
|
646
646
|
var C = "";
|
|
647
647
|
(d === void 0 || typeof d == "object" && d !== null && Object.keys(d).length === 0) && (C += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
648
|
-
var
|
|
649
|
-
|
|
648
|
+
var se = Jn(O);
|
|
649
|
+
se ? C += se : C += Vt();
|
|
650
650
|
var J;
|
|
651
|
-
d === null ? J = "null" :
|
|
651
|
+
d === null ? J = "null" : ot(d) ? J = "array" : d !== void 0 && d.$$typeof === t ? (J = "<" + (L(d.type) || "Unknown") + " />", C = " Did you accidentally export a JSX literal instead of a component?") : J = typeof d, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", J, C);
|
|
652
652
|
}
|
|
653
|
-
var
|
|
654
|
-
if (
|
|
655
|
-
return
|
|
656
|
-
if (
|
|
657
|
-
var de =
|
|
653
|
+
var Z = Gn(d, x, y, O, H);
|
|
654
|
+
if (Z == null)
|
|
655
|
+
return Z;
|
|
656
|
+
if (D) {
|
|
657
|
+
var de = x.children;
|
|
658
658
|
if (de !== void 0)
|
|
659
|
-
if (
|
|
660
|
-
if (
|
|
659
|
+
if ($)
|
|
660
|
+
if (ot(de)) {
|
|
661
661
|
for (var Te = 0; Te < de.length; Te++)
|
|
662
|
-
|
|
662
|
+
Jt(de[Te], d);
|
|
663
663
|
Object.freeze && Object.freeze(de);
|
|
664
664
|
} else
|
|
665
|
-
|
|
665
|
+
v("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
|
+
Jt(de, d);
|
|
668
668
|
}
|
|
669
|
-
return d === s ? qn(
|
|
669
|
+
return d === s ? qn(Z) : Zn(Z), Z;
|
|
670
670
|
}
|
|
671
671
|
}
|
|
672
|
-
function Kn(d,
|
|
673
|
-
return
|
|
672
|
+
function Kn(d, x, y) {
|
|
673
|
+
return Xt(d, x, y, !0);
|
|
674
674
|
}
|
|
675
|
-
function er(d,
|
|
676
|
-
return
|
|
675
|
+
function er(d, x, y) {
|
|
676
|
+
return Xt(d, x, y, !1);
|
|
677
677
|
}
|
|
678
678
|
var tr = er, nr = Kn;
|
|
679
|
-
|
|
680
|
-
}()),
|
|
679
|
+
Fe.Fragment = s, Fe.jsx = tr, Fe.jsxs = nr;
|
|
680
|
+
}()), Fe;
|
|
681
681
|
}
|
|
682
|
-
process.env.NODE_ENV === "production" ?
|
|
683
|
-
var r =
|
|
682
|
+
process.env.NODE_ENV === "production" ? St.exports = kr() : St.exports = yr();
|
|
683
|
+
var r = St.exports;
|
|
684
684
|
const jr = () => {
|
|
685
|
-
const [e, t] =
|
|
685
|
+
const [e, t] = P(window.location.pathname), n = () => {
|
|
686
686
|
const s = window.location.pathname;
|
|
687
687
|
t(s);
|
|
688
688
|
};
|
|
@@ -690,13 +690,13 @@ const jr = () => {
|
|
|
690
690
|
window.removeEventListener("popstate", n);
|
|
691
691
|
}), []), e;
|
|
692
692
|
}, Ce = (e, t) => {
|
|
693
|
-
const n =
|
|
693
|
+
const n = ee(!1);
|
|
694
694
|
z(() => {
|
|
695
695
|
n.current ? e() : n.current = !0;
|
|
696
696
|
}, t);
|
|
697
697
|
};
|
|
698
698
|
function Er(e, t, n) {
|
|
699
|
-
var s = this, o =
|
|
699
|
+
var s = this, o = ee(null), l = ee(0), m = ee(null), a = ee([]), i = ee(), c = ee(), u = ee(e), f = ee(!0);
|
|
700
700
|
z(function() {
|
|
701
701
|
u.current = e;
|
|
702
702
|
}, [e]);
|
|
@@ -704,42 +704,42 @@ function Er(e, t, n) {
|
|
|
704
704
|
if (typeof e != "function")
|
|
705
705
|
throw new TypeError("Expected a function");
|
|
706
706
|
t = +t || 0;
|
|
707
|
-
var h = !!(n = n || {}).leading, _ = !("trailing" in n) || !!n.trailing,
|
|
707
|
+
var h = !!(n = n || {}).leading, _ = !("trailing" in n) || !!n.trailing, k = "maxWait" in n, g = k ? Math.max(+n.maxWait || 0, t) : null;
|
|
708
708
|
z(function() {
|
|
709
709
|
return f.current = !0, function() {
|
|
710
710
|
f.current = !1;
|
|
711
711
|
};
|
|
712
712
|
}, []);
|
|
713
713
|
var E = qe(function() {
|
|
714
|
-
var
|
|
715
|
-
var
|
|
716
|
-
return a.current = i.current = null, l.current =
|
|
717
|
-
},
|
|
718
|
-
p && cancelAnimationFrame(m.current), m.current = p ? requestAnimationFrame(
|
|
719
|
-
}, T = function(
|
|
714
|
+
var v = function(b) {
|
|
715
|
+
var A = a.current, q = i.current;
|
|
716
|
+
return a.current = i.current = null, l.current = b, c.current = u.current.apply(q, A);
|
|
717
|
+
}, S = function(b, A) {
|
|
718
|
+
p && cancelAnimationFrame(m.current), m.current = p ? requestAnimationFrame(b) : setTimeout(b, A);
|
|
719
|
+
}, T = function(b) {
|
|
720
720
|
if (!f.current)
|
|
721
721
|
return !1;
|
|
722
|
-
var
|
|
723
|
-
return !o.current ||
|
|
724
|
-
}, M = function(
|
|
725
|
-
return m.current = null, _ && a.current ?
|
|
726
|
-
}, Q = function
|
|
727
|
-
var
|
|
728
|
-
if (T(
|
|
729
|
-
return M(
|
|
722
|
+
var A = b - o.current;
|
|
723
|
+
return !o.current || A >= t || A < 0 || k && b - l.current >= g;
|
|
724
|
+
}, M = function(b) {
|
|
725
|
+
return m.current = null, _ && a.current ? v(b) : (a.current = i.current = null, c.current);
|
|
726
|
+
}, Q = function b() {
|
|
727
|
+
var A = Date.now();
|
|
728
|
+
if (T(A))
|
|
729
|
+
return M(A);
|
|
730
730
|
if (f.current) {
|
|
731
|
-
var q = t - (
|
|
732
|
-
|
|
731
|
+
var q = t - (A - o.current), w = k ? Math.min(q, g - (A - l.current)) : q;
|
|
732
|
+
S(b, w);
|
|
733
733
|
}
|
|
734
734
|
}, V = function() {
|
|
735
|
-
var
|
|
736
|
-
if (a.current = [].slice.call(arguments), i.current = s, o.current =
|
|
735
|
+
var b = Date.now(), A = T(b);
|
|
736
|
+
if (a.current = [].slice.call(arguments), i.current = s, o.current = b, A) {
|
|
737
737
|
if (!m.current && f.current)
|
|
738
|
-
return l.current = o.current,
|
|
739
|
-
if (
|
|
740
|
-
return
|
|
738
|
+
return l.current = o.current, S(Q, t), h ? v(o.current) : c.current;
|
|
739
|
+
if (k)
|
|
740
|
+
return S(Q, t), v(o.current);
|
|
741
741
|
}
|
|
742
|
-
return m.current ||
|
|
742
|
+
return m.current || S(Q, t), c.current;
|
|
743
743
|
};
|
|
744
744
|
return V.cancel = function() {
|
|
745
745
|
m.current && (p ? cancelAnimationFrame(m.current) : clearTimeout(m.current)), l.current = 0, a.current = o.current = i.current = m.current = null;
|
|
@@ -748,27 +748,27 @@ function Er(e, t, n) {
|
|
|
748
748
|
}, V.flush = function() {
|
|
749
749
|
return m.current ? M(Date.now()) : c.current;
|
|
750
750
|
}, V;
|
|
751
|
-
}, [h,
|
|
751
|
+
}, [h, k, t, g, _, p]);
|
|
752
752
|
return E;
|
|
753
753
|
}
|
|
754
754
|
function fn(e, t, n) {
|
|
755
755
|
var s = n === void 0 ? {} : n, o = s.leading, l = s.trailing;
|
|
756
756
|
return Er(e, t, { maxWait: t, leading: o === void 0 || o, trailing: l === void 0 || l });
|
|
757
757
|
}
|
|
758
|
-
let
|
|
759
|
-
const
|
|
758
|
+
let ut;
|
|
759
|
+
const tt = (e = !0, t = !1) => {
|
|
760
760
|
if (!e)
|
|
761
761
|
return;
|
|
762
|
-
const [n, s] =
|
|
762
|
+
const [n, s] = N.useState(0) || [!1, () => {
|
|
763
763
|
}];
|
|
764
764
|
z(() => (l(), window.addEventListener("resize", m), () => {
|
|
765
|
-
clearTimeout(
|
|
765
|
+
clearTimeout(ut), m.flush(), window.removeEventListener("resize", m);
|
|
766
766
|
}), []);
|
|
767
767
|
const o = () => window.innerWidth, l = () => {
|
|
768
768
|
s(o());
|
|
769
769
|
}, m = fn(
|
|
770
770
|
() => {
|
|
771
|
-
o() !== n && (t && (clearTimeout(
|
|
771
|
+
o() !== n && (t && (clearTimeout(ut), document.body.classList.add("is-resizing"), ut = setTimeout(() => {
|
|
772
772
|
document.body.classList.remove("is-resizing");
|
|
773
773
|
}, 550)), l());
|
|
774
774
|
},
|
|
@@ -787,8 +787,8 @@ const et = (e = !0, t = !1) => {
|
|
|
787
787
|
}) => {
|
|
788
788
|
if (!window)
|
|
789
789
|
return;
|
|
790
|
-
const [o, l] =
|
|
791
|
-
}], [m, a] =
|
|
790
|
+
const [o, l] = N.useState({ current: 0, past: 0 }) || [!1, () => {
|
|
791
|
+
}], [m, a] = N.useState({ scrollDown: !1, scrollUp: !1 }) || [!1, () => {
|
|
792
792
|
}];
|
|
793
793
|
z(() => (i(), window.addEventListener("scroll", c), () => {
|
|
794
794
|
c.flush(), window.removeEventListener("scroll", c);
|
|
@@ -804,9 +804,9 @@ const et = (e = !0, t = !1) => {
|
|
|
804
804
|
i();
|
|
805
805
|
}, 250);
|
|
806
806
|
return o;
|
|
807
|
-
},
|
|
807
|
+
}, oo = (e = [], t = !0) => {
|
|
808
808
|
e = Array.isArray(e) ? e : [e];
|
|
809
|
-
const n =
|
|
809
|
+
const n = ee(!1);
|
|
810
810
|
Ce(() => {
|
|
811
811
|
if (window && window.location && window.location.hash) {
|
|
812
812
|
if (n.current)
|
|
@@ -856,7 +856,7 @@ const et = (e = !0, t = !1) => {
|
|
|
856
856
|
return { path: "days", number: a };
|
|
857
857
|
const i = Math.floor(a / 7);
|
|
858
858
|
return i <= 52 ? { path: "weeks", number: i } : { path: "years", number: Math.floor(a / 365) };
|
|
859
|
-
}, Cr = (e) => new Promise((t) => setTimeout(t, e)),
|
|
859
|
+
}, Cr = (e) => new Promise((t) => setTimeout(t, e)), Dt = {
|
|
860
860
|
apolitical: "Apolitical",
|
|
861
861
|
breadcrumbs_label: "Go back to:",
|
|
862
862
|
breadcrumbs_currentPage: "Current page:",
|
|
@@ -1160,13 +1160,13 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1160
1160
|
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>"
|
|
1161
1161
|
}, Pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1162
1162
|
__proto__: null,
|
|
1163
|
-
en:
|
|
1163
|
+
en: Dt,
|
|
1164
1164
|
es: Ar,
|
|
1165
1165
|
fr: Nr,
|
|
1166
1166
|
pt: Dr
|
|
1167
1167
|
}, Symbol.toStringTag, { value: "Module" })), he = (e, t, n, s, o = {}) => {
|
|
1168
1168
|
let l = "";
|
|
1169
|
-
return `${t}_${n}` in
|
|
1169
|
+
return `${t}_${n}` in Dt ? l = e({ id: `${t}_${n}` }, o) : l = e({ id: t }, { [s]: n, ...o }), l;
|
|
1170
1170
|
}, Fr = (e, t, n) => {
|
|
1171
1171
|
if (!e || e === 0)
|
|
1172
1172
|
return "0";
|
|
@@ -1181,7 +1181,7 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1181
1181
|
}
|
|
1182
1182
|
}
|
|
1183
1183
|
return s;
|
|
1184
|
-
}, gn = (e, t) =>
|
|
1184
|
+
}, gn = (e, t) => N.Children.map(e, (n) => N.cloneElement(n, {
|
|
1185
1185
|
...t
|
|
1186
1186
|
})), Rr = (e) => e.replace(/\s+/g, "").length > 0, W = ({
|
|
1187
1187
|
variant: e = "primary",
|
|
@@ -1197,14 +1197,14 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1197
1197
|
children: u = !1,
|
|
1198
1198
|
...f
|
|
1199
1199
|
}) => {
|
|
1200
|
-
const h =
|
|
1200
|
+
const h = tt(typeof t == "object");
|
|
1201
1201
|
if (typeof t == "object" && typeof h == "number") {
|
|
1202
1202
|
const g = Object.assign({}, t), E = pn(Object.keys(g));
|
|
1203
1203
|
t = hn(h, E, g);
|
|
1204
1204
|
}
|
|
1205
1205
|
const _ = [];
|
|
1206
1206
|
typeof t == "string" && _.push(t), s && (_.push("icon"), typeof s == "object" ? (_.push(s.icon), s.position ? _.push(s.position) : _.push("left"), s.hover && _.push(`hover_${s.hover}`), s.animate && (_.push("animate"), typeof s.animate == "string" && _.push(s.animate))) : (_.push(s), !s.includes("right") && !s.includes("left") && _.push("left"))), n.muted && _.push("muted"), n.fullWidth && _.push("full-width");
|
|
1207
|
-
const
|
|
1207
|
+
const k = {
|
|
1208
1208
|
...f,
|
|
1209
1209
|
className: j(e, a, _, {
|
|
1210
1210
|
"no-text": !u,
|
|
@@ -1216,19 +1216,19 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1216
1216
|
},
|
|
1217
1217
|
disabled: typeof i == "object" && "isClickable" in i ? !i.isClickable : i
|
|
1218
1218
|
};
|
|
1219
|
-
return o && (l = "a",
|
|
1219
|
+
return o && (l = "a", k.href = o), N.createElement(
|
|
1220
1220
|
l,
|
|
1221
|
-
|
|
1222
|
-
u || (c ? /* @__PURE__ */ r.jsx(
|
|
1221
|
+
k,
|
|
1222
|
+
u || (c ? /* @__PURE__ */ r.jsx(re, { showOnFocus: !1, children: c }) : null)
|
|
1223
1223
|
);
|
|
1224
|
-
},
|
|
1224
|
+
}, nt = ({ buttons: e, className: t = "", ...n }) => {
|
|
1225
1225
|
const s = e.length > 1 ? "ul" : "p", o = e.map((l, m) => s === "p" ? /* @__PURE__ */ r.jsx(W, { ...l }, m) : /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(W, { ...l }) }, m));
|
|
1226
|
-
return
|
|
1226
|
+
return N.createElement(s, { className: j("button-wrapper", t), ...n, children: o });
|
|
1227
1227
|
};
|
|
1228
|
-
const
|
|
1228
|
+
const Ae = ({ maxWidth: e = !1 }) => {
|
|
1229
1229
|
const t = e ? { "--max-width": `${e / 16}rem` } : {};
|
|
1230
1230
|
return /* @__PURE__ */ r.jsx("hr", { className: j({ "has-max-width": e }), style: t });
|
|
1231
|
-
},
|
|
1231
|
+
}, rt = ({
|
|
1232
1232
|
href: e,
|
|
1233
1233
|
children: t,
|
|
1234
1234
|
fallbackElement: n,
|
|
@@ -1250,7 +1250,7 @@ const Le = ({ maxWidth: e = !1 }) => {
|
|
|
1250
1250
|
}
|
|
1251
1251
|
);
|
|
1252
1252
|
}
|
|
1253
|
-
return n ?
|
|
1253
|
+
return n ? N.createElement(n, { children: t, className: s, ...a }) : t;
|
|
1254
1254
|
}, en = {
|
|
1255
1255
|
card: {
|
|
1256
1256
|
range: [
|
|
@@ -1364,7 +1364,7 @@ const Le = ({ maxWidth: e = !1 }) => {
|
|
|
1364
1364
|
}, Lr = ({ format: e, height: t, query: n, width: s }) => {
|
|
1365
1365
|
let o = `w=${s}&h=${t}`;
|
|
1366
1366
|
return o = e ? `${o}&fm=${e}` : o, o = n ? `${o}&${n}` : o, o;
|
|
1367
|
-
},
|
|
1367
|
+
}, dt = ({ format: e, range: t, url: n, query: s }) => t.map(({ height: o, width: l }) => `${n}?${Lr({
|
|
1368
1368
|
format: e,
|
|
1369
1369
|
height: o,
|
|
1370
1370
|
query: s,
|
|
@@ -1381,7 +1381,7 @@ const Br = ({ image: e, className: t, testId: n }) => {
|
|
|
1381
1381
|
loading: c,
|
|
1382
1382
|
decoding: u,
|
|
1383
1383
|
fetchPriority: f
|
|
1384
|
-
} = e, { range: p, sizes: h } = Or(e), _ =
|
|
1384
|
+
} = e, { range: p, sizes: h } = Or(e), _ = dt({ format: "avif", query: m, range: p, url: a }), k = dt({ format: "webp", query: m, range: p, url: a }), g = dt({ format: "", query: m, range: p, url: a });
|
|
1385
1385
|
return /* @__PURE__ */ r.jsxs("picture", { className: t, children: [
|
|
1386
1386
|
l !== "image/gif" && /* @__PURE__ */ r.jsx(
|
|
1387
1387
|
"source",
|
|
@@ -1396,7 +1396,7 @@ const Br = ({ image: e, className: t, testId: n }) => {
|
|
|
1396
1396
|
"source",
|
|
1397
1397
|
{
|
|
1398
1398
|
type: "image/webp",
|
|
1399
|
-
srcSet:
|
|
1399
|
+
srcSet: k,
|
|
1400
1400
|
sizes: h,
|
|
1401
1401
|
"data-testid": "source"
|
|
1402
1402
|
}
|
|
@@ -1418,9 +1418,9 @@ const Br = ({ image: e, className: t, testId: n }) => {
|
|
|
1418
1418
|
)
|
|
1419
1419
|
] });
|
|
1420
1420
|
};
|
|
1421
|
-
let
|
|
1421
|
+
let Re = !1;
|
|
1422
1422
|
const Ir = ({ isOpen: e = !1, isLoading: t = !1, children: n }) => {
|
|
1423
|
-
const s =
|
|
1423
|
+
const s = F(), o = ee(null), [l, m] = P("hidden");
|
|
1424
1424
|
z(() => {
|
|
1425
1425
|
const i = o.current;
|
|
1426
1426
|
if (i)
|
|
@@ -1429,18 +1429,18 @@ const Ir = ({ isOpen: e = !1, isLoading: t = !1, children: n }) => {
|
|
|
1429
1429
|
};
|
|
1430
1430
|
}, []);
|
|
1431
1431
|
const a = ({ propertyName: i }) => {
|
|
1432
|
-
i === "opacity" && (
|
|
1432
|
+
i === "opacity" && (Re !== !1 && clearTimeout(Re), m((c) => c === "opening" ? "open" : c === "closing" ? "closed" : c === "closed" ? "hidden" : c));
|
|
1433
1433
|
};
|
|
1434
1434
|
return Ce(() => {
|
|
1435
|
-
|
|
1435
|
+
Re !== !1 && clearTimeout(Re);
|
|
1436
1436
|
let i = "open";
|
|
1437
|
-
e ? m("opening") : (m("closing"), i = "hidden"),
|
|
1437
|
+
e ? m("opening") : (m("closing"), i = "hidden"), Re = setTimeout(() => {
|
|
1438
1438
|
m(i);
|
|
1439
1439
|
}, 300);
|
|
1440
1440
|
}, [e]), /* @__PURE__ */ r.jsx("aside", { ref: o, className: j("tooltip text-medium", l, { loading: t }), hidden: l === "hidden", children: t ? /* @__PURE__ */ r.jsx("p", { children: s.formatMessage({ id: "tooltip_loading" }) }) : typeof n == "string" ? /* @__PURE__ */ r.jsx("p", { children: n }) : n });
|
|
1441
1441
|
};
|
|
1442
1442
|
const _n = ({ children: e, className: t = "", ...n }) => /* @__PURE__ */ r.jsx("section", { className: j("full-width-section", t), ...n, children: e });
|
|
1443
|
-
const
|
|
1443
|
+
const ao = ({ text: e, buttons: t, className: n = "" }) => {
|
|
1444
1444
|
const s = [];
|
|
1445
1445
|
return t.forEach((o) => {
|
|
1446
1446
|
s.push({
|
|
@@ -1454,11 +1454,11 @@ const oo = ({ text: e, buttons: t, className: n = "" }) => {
|
|
|
1454
1454
|
children: o.text
|
|
1455
1455
|
});
|
|
1456
1456
|
}), /* @__PURE__ */ r.jsx(_n, { className: j("download-section", n), children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1457
|
-
|
|
1458
|
-
/* @__PURE__ */ r.jsx(
|
|
1457
|
+
N.createElement(typeof e == "string" ? "h2" : e.element, { className: "text" }, typeof e == "string" ? e : e.text),
|
|
1458
|
+
/* @__PURE__ */ r.jsx(nt, { buttons: s })
|
|
1459
1459
|
] }) });
|
|
1460
1460
|
};
|
|
1461
|
-
const
|
|
1461
|
+
const io = ({ title: e = !1, logos: t = [], className: n = "" }) => {
|
|
1462
1462
|
const s = t.length;
|
|
1463
1463
|
if (s === 0)
|
|
1464
1464
|
return null;
|
|
@@ -1467,7 +1467,7 @@ const ao = ({ title: e = !1, logos: t = [], className: n = "" }) => {
|
|
|
1467
1467
|
text: typeof e == "string" ? e : typeof e == "object" ? e.text : ""
|
|
1468
1468
|
};
|
|
1469
1469
|
return /* @__PURE__ */ r.jsxs("div", { className: j("logos", n), children: [
|
|
1470
|
-
e &&
|
|
1470
|
+
e && N.createElement(o.element, { className: "title" }, o.text),
|
|
1471
1471
|
/* @__PURE__ */ r.jsx(
|
|
1472
1472
|
"ul",
|
|
1473
1473
|
{
|
|
@@ -1545,7 +1545,7 @@ const Hr = [
|
|
|
1545
1545
|
m.map((c) => {
|
|
1546
1546
|
if (i[c] && typeof i[c] == "object") {
|
|
1547
1547
|
const { text: u, element: f = "" } = i[c];
|
|
1548
|
-
return
|
|
1548
|
+
return N.createElement(
|
|
1549
1549
|
f.toLowerCase(),
|
|
1550
1550
|
{ key: c, className: c },
|
|
1551
1551
|
u
|
|
@@ -1567,8 +1567,8 @@ const Hr = [
|
|
|
1567
1567
|
] }),
|
|
1568
1568
|
t && /* @__PURE__ */ r.jsx(Br, { image: { ...t, aspect: "banner" } })
|
|
1569
1569
|
] }) });
|
|
1570
|
-
},
|
|
1571
|
-
const
|
|
1570
|
+
}, lo = Ne(Qr);
|
|
1571
|
+
const co = ({
|
|
1572
1572
|
variant: e = "primary",
|
|
1573
1573
|
button: t = null,
|
|
1574
1574
|
title: n,
|
|
@@ -1578,32 +1578,32 @@ const lo = ({
|
|
|
1578
1578
|
n && /* @__PURE__ */ r.jsx("p", { className: "title", children: n }),
|
|
1579
1579
|
s && /* @__PURE__ */ r.jsx("p", { children: s }),
|
|
1580
1580
|
t && /* @__PURE__ */ r.jsx(W, { 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 })
|
|
1581
|
-
] }),
|
|
1581
|
+
] }), $t = "https://storage.googleapis.com/apolitical-assets/", Oe = {
|
|
1582
1582
|
general: "hello@apolitical.co",
|
|
1583
1583
|
support: "concierge@apolitical.co",
|
|
1584
1584
|
"data-protection": {
|
|
1585
1585
|
default: "dpo@apolitical.co",
|
|
1586
1586
|
eu: "dpo.agl@apolitical.foundation"
|
|
1587
1587
|
}
|
|
1588
|
-
},
|
|
1588
|
+
}, uo = "200,000+";
|
|
1589
1589
|
const xn = ({ label: e = !1, className: t = "", children: n }) => {
|
|
1590
|
-
const s =
|
|
1590
|
+
const s = F();
|
|
1591
1591
|
return /* @__PURE__ */ r.jsxs("details", { className: j("collapsible-section", t), children: [
|
|
1592
1592
|
/* @__PURE__ */ r.jsx("summary", { children: e || s.formatMessage({ id: "collapsibleSection_summary" }) }),
|
|
1593
1593
|
/* @__PURE__ */ r.jsx("div", { className: "content", children: n })
|
|
1594
1594
|
] });
|
|
1595
1595
|
};
|
|
1596
1596
|
const ke = ({ variant: e = "primary", className: t = "", children: n, ...s }) => /* @__PURE__ */ r.jsx("div", { className: j("highlighted-text-box", e, t), ...s, children: n });
|
|
1597
|
-
const
|
|
1597
|
+
const st = ({ variant: e = "empty", text: t = !1, button: n = !1, className: s = "" }) => {
|
|
1598
1598
|
let o = n && !!Object.keys(n).length;
|
|
1599
|
-
const l = typeof n == "object" && "breakpoints" in n, m =
|
|
1599
|
+
const l = typeof n == "object" && "breakpoints" in n, m = tt(l);
|
|
1600
1600
|
if (l && typeof n == "object" && typeof m == "number") {
|
|
1601
1601
|
const f = Object.assign({}, n.breakpoints), p = pn(Object.keys(f));
|
|
1602
1602
|
o = hn(m, p, f);
|
|
1603
1603
|
}
|
|
1604
1604
|
const { breakpoints: a, text: i = "", component: c, ...u } = n;
|
|
1605
1605
|
return /* @__PURE__ */ r.jsx(ke, { variant: "subtle", className: j("empty-state-box", e, s), children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1606
|
-
t && /* @__PURE__ */ r.jsx(
|
|
1606
|
+
t && /* @__PURE__ */ r.jsx(et, { options: { forceBlock: !0 }, children: t }),
|
|
1607
1607
|
o && typeof n == "object" && (c || /* @__PURE__ */ r.jsx(
|
|
1608
1608
|
W,
|
|
1609
1609
|
{
|
|
@@ -1614,16 +1614,16 @@ const rt = ({ variant: e = "empty", text: t = !1, button: n = !1, className: s =
|
|
|
1614
1614
|
))
|
|
1615
1615
|
] }) });
|
|
1616
1616
|
};
|
|
1617
|
-
const
|
|
1617
|
+
const Tt = ({ children: e, ...t }) => /* @__PURE__ */ r.jsx("p", { ...t, children: e }), bn = { q: Tt, blockquote: Tt };
|
|
1618
1618
|
for (let e = 1; e <= 6; e++)
|
|
1619
|
-
bn[`h${e}`] = { component:
|
|
1619
|
+
bn[`h${e}`] = { component: Tt, props: { className: "title" } };
|
|
1620
1620
|
const Ur = ({ type: e = "default", className: t = "", heading: n = !1, children: s }) => /* @__PURE__ */ r.jsxs("div", { className: j("helper-text-box text-small", e, t), children: [
|
|
1621
1621
|
n && /* @__PURE__ */ r.jsx("p", { className: "title", children: n }),
|
|
1622
1622
|
typeof s == "string" ? /* @__PURE__ */ r.jsx(
|
|
1623
|
-
|
|
1623
|
+
et,
|
|
1624
1624
|
{
|
|
1625
1625
|
options: {
|
|
1626
|
-
wrapper:
|
|
1626
|
+
wrapper: N.Fragment,
|
|
1627
1627
|
forceBlock: !0,
|
|
1628
1628
|
overrides: bn
|
|
1629
1629
|
},
|
|
@@ -1631,8 +1631,8 @@ const Ur = ({ type: e = "default", className: t = "", heading: n = !1, children:
|
|
|
1631
1631
|
}
|
|
1632
1632
|
) : /* @__PURE__ */ r.jsx("p", { children: s })
|
|
1633
1633
|
] });
|
|
1634
|
-
const
|
|
1635
|
-
const l =
|
|
1634
|
+
const mo = ({ className: e = "", show: t = !1, hide: n = !1, text: s, children: o }) => {
|
|
1635
|
+
const l = F(), m = ee(null), [a, i] = P(""), [c, u] = P("closed");
|
|
1636
1636
|
z(() => {
|
|
1637
1637
|
const h = m.current;
|
|
1638
1638
|
if (h)
|
|
@@ -1657,7 +1657,7 @@ const uo = ({ className: e = "", show: t = !1, hide: n = !1, text: s, children:
|
|
|
1657
1657
|
const p = ["opening", "open"].includes(c);
|
|
1658
1658
|
return /* @__PURE__ */ r.jsxs(ke, { variant: "subtle", className: j("hide-show-text-box", e), children: [
|
|
1659
1659
|
/* @__PURE__ */ r.jsxs("div", { ref: m, className: j("content", c), children: [
|
|
1660
|
-
/* @__PURE__ */ r.jsx(
|
|
1660
|
+
/* @__PURE__ */ r.jsx(et, { options: { forceBlock: !0 }, children: c === "closed" ? a : s }),
|
|
1661
1661
|
c !== "closed" && o
|
|
1662
1662
|
] }),
|
|
1663
1663
|
/* @__PURE__ */ r.jsx("p", { className: "cta", children: /* @__PURE__ */ r.jsx(
|
|
@@ -1674,18 +1674,18 @@ const uo = ({ className: e = "", show: t = !1, hide: n = !1, text: s, children:
|
|
|
1674
1674
|
}
|
|
1675
1675
|
) })
|
|
1676
1676
|
] });
|
|
1677
|
-
}, Wr = () =>
|
|
1678
|
-
const t =
|
|
1677
|
+
}, Wr = () => N.Fragment, zr = ({ children: e }) => /* @__PURE__ */ r.jsx(ke, { variant: "secondary", children: e }), Vr = ["span", "strong", "h1", "h2", "h3", "h4", "h5", "h6", "p"], Yr = ({ children: e }) => {
|
|
1678
|
+
const t = F();
|
|
1679
1679
|
if (!e)
|
|
1680
1680
|
return null;
|
|
1681
1681
|
let n = t.formatMessage({ id: "markdown_collapsibleSection_summary" });
|
|
1682
1682
|
const s = [];
|
|
1683
|
-
for (const l of
|
|
1683
|
+
for (const l of jt.toArray(e))
|
|
1684
1684
|
if (!(!l || typeof l == "string" || typeof l == "number"))
|
|
1685
|
-
if (
|
|
1685
|
+
if (N.isValidElement(l) && l.type === "summary") {
|
|
1686
1686
|
if (l.props && l.props.children) {
|
|
1687
|
-
for (const m of
|
|
1688
|
-
if (!(!m || typeof m == "string" || typeof m == "number") &&
|
|
1687
|
+
for (const m of jt.toArray(l.props.children))
|
|
1688
|
+
if (!(!m || typeof m == "string" || typeof m == "number") && N.isValidElement(m)) {
|
|
1689
1689
|
const a = m.type;
|
|
1690
1690
|
if (Vr.includes(a)) {
|
|
1691
1691
|
for (n = m.props.children; typeof n != "string" && (Array.isArray(n) && n[0].props && n[0].props.children && n[0].props.children[0]); )
|
|
@@ -1720,11 +1720,11 @@ const uo = ({ className: e = "", show: t = !1, hide: n = !1, text: s, children:
|
|
|
1720
1720
|
}
|
|
1721
1721
|
return /* @__PURE__ */ r.jsx("div", { ...t, children: e });
|
|
1722
1722
|
}, Jr = (e) => {
|
|
1723
|
-
const t =
|
|
1723
|
+
const t = F(), n = Date.now().toString();
|
|
1724
1724
|
let s = "default";
|
|
1725
1725
|
const o = e.src;
|
|
1726
1726
|
return o.includes("youtube") || o.includes("vimeo") ? s = "video" : o.includes("riddle") || o.includes("sli.do") ? s = "poll" : o.includes("padlet") && (s = "padlet"), /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1727
|
-
/* @__PURE__ */ r.jsx(
|
|
1727
|
+
/* @__PURE__ */ r.jsx(re, { children: /* @__PURE__ */ r.jsx("a", { href: `#content-after-iframe-${n}`, children: t.formatMessage({ id: `markdown_skip${s === "default" ? "" : `_${s}`}` }) }) }),
|
|
1728
1728
|
/* @__PURE__ */ r.jsx("iframe", { ...e, title: t.formatMessage({ id: `markdown_iframe${s === "default" ? "" : `_${s}`}` }) }),
|
|
1729
1729
|
/* @__PURE__ */ r.jsx("span", { id: `content-after-iframe-${n}`, tabIndex: -1 })
|
|
1730
1730
|
] });
|
|
@@ -1735,11 +1735,11 @@ const uo = ({ className: e = "", show: t = !1, hide: n = !1, text: s, children:
|
|
|
1735
1735
|
let n = { ...t };
|
|
1736
1736
|
t.href && (t.href.includes("http:") || t.href.includes("https:")) && !t.target && (n.target = "_blank");
|
|
1737
1737
|
let s = e, o = !1;
|
|
1738
|
-
for (const l of
|
|
1739
|
-
if (!(!l || typeof l == "string" || typeof l == "number") &&
|
|
1738
|
+
for (const l of jt.toArray(e))
|
|
1739
|
+
if (!(!l || typeof l == "string" || typeof l == "number") && N.isValidElement(l)) {
|
|
1740
1740
|
const m = l.type;
|
|
1741
1741
|
if (["button", "center", "span", "strong"].includes(m) && l.props && l.props.children && l.props.children[0])
|
|
1742
|
-
for ((m === "button" || tn(l.props.children[0]) === "button") && (o = !0), s = l.props.children[0]; s && typeof s != "string" && !(typeof s == "boolean" || typeof s == "number" || !
|
|
1742
|
+
for ((m === "button" || tn(l.props.children[0]) === "button") && (o = !0), s = l.props.children[0]; s && typeof s != "string" && !(typeof s == "boolean" || typeof s == "number" || !N.isValidElement(s)); )
|
|
1743
1743
|
if (s.props && s.props.children && s.props.children[0])
|
|
1744
1744
|
s = s.props.children[0], s && tn(s) === "button" && (o = !0);
|
|
1745
1745
|
else
|
|
@@ -1750,7 +1750,7 @@ const uo = ({ className: e = "", show: t = !1, hide: n = !1, text: s, children:
|
|
|
1750
1750
|
const nn = ({ className: e = "", options: t = {}, children: n }) => {
|
|
1751
1751
|
n = n.replace(/^<br\/?>/, "");
|
|
1752
1752
|
const s = {
|
|
1753
|
-
wrapper:
|
|
1753
|
+
wrapper: N.Fragment,
|
|
1754
1754
|
forceBlock: !0,
|
|
1755
1755
|
overrides: {
|
|
1756
1756
|
a: Xr,
|
|
@@ -1767,26 +1767,26 @@ const nn = ({ className: e = "", options: t = {}, children: n }) => {
|
|
|
1767
1767
|
iframe: Jr
|
|
1768
1768
|
}
|
|
1769
1769
|
};
|
|
1770
|
-
return /* @__PURE__ */ r.jsx("div", { className: j("markdown-text", e), children: /* @__PURE__ */ r.jsx(
|
|
1770
|
+
return /* @__PURE__ */ r.jsx("div", { className: j("markdown-text", e), children: /* @__PURE__ */ r.jsx(et, { options: { ...s, ...t }, children: n }) });
|
|
1771
1771
|
};
|
|
1772
1772
|
const qr = ({ size: e = "medium", variant: t = "default", className: n = "", children: s }) => /* @__PURE__ */ r.jsx("span", { className: j("pill", e, t, n), children: s });
|
|
1773
|
-
const
|
|
1773
|
+
const Mt = ({ element: e = "p", children: t = null, className: n = "", ...s }) => N.createElement(e, { ...s, className: j("status-banner text-small", n), "aria-live": "assertive" }, t);
|
|
1774
1774
|
const Kr = ({ progress: e = 0, text: t = !1, className: n = "" }) => {
|
|
1775
|
-
const s =
|
|
1776
|
-
return /* @__PURE__ */ r.jsx("span", { className: j(`progress-bar section-${o}`, n), style: l, children: /* @__PURE__ */ r.jsx(
|
|
1777
|
-
}, es =
|
|
1778
|
-
const
|
|
1779
|
-
const s =
|
|
1775
|
+
const s = F(), o = e > 75 ? 100 : e > 50 ? 75 : e > 25 ? 50 : e > 5 ? 25 : 0, l = { "--progress": `${e}%` };
|
|
1776
|
+
return /* @__PURE__ */ r.jsx("span", { className: j(`progress-bar section-${o}`, n), style: l, children: /* @__PURE__ */ r.jsx(re, { children: t ? `${e} ${t}` : s.formatMessage({ id: "progressBar" }, { number: e }) }) });
|
|
1777
|
+
}, es = Ne(Kr);
|
|
1778
|
+
const mt = "loadingBlock_", ts = ({ progress: e = 0, steps: t = !1, className: n = "" }) => {
|
|
1779
|
+
const s = F();
|
|
1780
1780
|
t || (t = {
|
|
1781
|
-
0: { text: s.formatMessage({ id: `${
|
|
1782
|
-
75: { text: s.formatMessage({ id: `${
|
|
1783
|
-
100: { text: s.formatMessage({ id: `${
|
|
1781
|
+
0: { text: s.formatMessage({ id: `${mt}loading` }) },
|
|
1782
|
+
75: { text: s.formatMessage({ id: `${mt}almostDone` }) },
|
|
1783
|
+
100: { text: s.formatMessage({ id: `${mt}complete` }) }
|
|
1784
1784
|
});
|
|
1785
1785
|
let o = null;
|
|
1786
1786
|
const l = Object.keys(t);
|
|
1787
1787
|
for (let a = 0; a < l.length && !(e < parseInt(l[a])); a++)
|
|
1788
1788
|
o = l[a];
|
|
1789
|
-
const m = o && t[o].icon ? { "--icon": `url(${
|
|
1789
|
+
const m = o && t[o].icon ? { "--icon": `url(${$t}icons/${t[o].icon}.svg)` } : {};
|
|
1790
1790
|
return /* @__PURE__ */ r.jsxs(
|
|
1791
1791
|
ke,
|
|
1792
1792
|
{
|
|
@@ -1799,15 +1799,15 @@ const dt = "loadingBlock_", ts = ({ progress: e = 0, steps: t = !1, className: n
|
|
|
1799
1799
|
]
|
|
1800
1800
|
}
|
|
1801
1801
|
);
|
|
1802
|
-
},
|
|
1802
|
+
}, fo = Ne(ts);
|
|
1803
1803
|
const ve = ({ element: e = "div", className: t = "", ...n }) => /* @__PURE__ */ r.jsx(mn, { element: e, className: j("loading-placeholder", t), ...n });
|
|
1804
|
-
const
|
|
1804
|
+
const Ct = {
|
|
1805
1805
|
header: ["logo", "link", "link", "search"],
|
|
1806
1806
|
sidebar: ["text", "text", "text", "text", "text"],
|
|
1807
1807
|
"cards-section": ["subtitle", "cards"],
|
|
1808
1808
|
cards: ["card", "card", "card", "card"],
|
|
1809
1809
|
"overview-page": ["header", "sidebar", "title", "text", "cards-section", "cards-section", "footer"]
|
|
1810
|
-
}, vn = (e, t) => e in
|
|
1810
|
+
}, vn = (e, t) => e in Ct ? /* @__PURE__ */ r.jsx("div", { className: e, children: Ct[e].map((n, s) => vn(n, s)) }, t) : /* @__PURE__ */ r.jsx(ve, { className: e }, t), ns = ({ layout: e = "overview-page" }) => /* @__PURE__ */ r.jsx("div", { className: j("loading-state", e), children: Ct[e].map((t, n) => vn(t, n)) }), wn = (e) => {
|
|
1811
1811
|
const t = e && e.toUpperCase().split(" ");
|
|
1812
1812
|
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) : "";
|
|
1813
1813
|
}, Qe = ["#5AB6A3", "#A2D7AF", "#806056", "#3962B3"], rs = (e) => {
|
|
@@ -1819,8 +1819,8 @@ const Tt = {
|
|
|
1819
1819
|
if (s <= t * (o + 1))
|
|
1820
1820
|
return Qe[o];
|
|
1821
1821
|
};
|
|
1822
|
-
const rn = 256,
|
|
1823
|
-
const [a, i] =
|
|
1822
|
+
const rn = 256, Pt = ({ className: e = "", src: t = "", name: n, alt: s, width: o = rn, height: l = rn, ...m }) => {
|
|
1823
|
+
const [a, i] = P(!1), c = ee(null);
|
|
1824
1824
|
z(() => {
|
|
1825
1825
|
const f = c.current;
|
|
1826
1826
|
if (!f)
|
|
@@ -1845,9 +1845,9 @@ const rn = 256, Dt = ({ className: e = "", src: t = "", name: n, alt: s, width:
|
|
|
1845
1845
|
}
|
|
1846
1846
|
) : /* @__PURE__ */ r.jsx("canvas", { ref: c }) });
|
|
1847
1847
|
}, kn = (e) => e === "apolitical" ? {
|
|
1848
|
-
image: `${
|
|
1848
|
+
image: `${$t}logos/member_apolitical.svg`
|
|
1849
1849
|
} : e === "community" || typeof e == "object" && !e.name ? {
|
|
1850
|
-
image: `${
|
|
1850
|
+
image: `${$t}logos/member_community.svg`
|
|
1851
1851
|
} : {
|
|
1852
1852
|
name: e.name,
|
|
1853
1853
|
role: e.jobTitle || "",
|
|
@@ -1866,9 +1866,9 @@ const rn = 256, Dt = ({ className: e = "", src: t = "", name: n, alt: s, width:
|
|
|
1866
1866
|
return "";
|
|
1867
1867
|
const a = `${e}${o && l ? ` — ${t}` : t}`;
|
|
1868
1868
|
let i = `${a}${(o || l) && m ? `, ${n}` : n}`;
|
|
1869
|
-
return i.length > s && (i = a), i.length > s && (i =
|
|
1869
|
+
return i.length > s && (i = a), i.length > s && (i = Ke(i, s)), i;
|
|
1870
1870
|
};
|
|
1871
|
-
const
|
|
1871
|
+
const Ft = ({
|
|
1872
1872
|
element: e = "div",
|
|
1873
1873
|
member: t = "community",
|
|
1874
1874
|
additionalContent: n = !1,
|
|
@@ -1876,13 +1876,13 @@ const Pt = ({
|
|
|
1876
1876
|
gtmType: o = "member-click",
|
|
1877
1877
|
className: l = ""
|
|
1878
1878
|
}) => {
|
|
1879
|
-
const m =
|
|
1879
|
+
const m = F(), a = kn(t);
|
|
1880
1880
|
a.name || (a.name = m.formatMessage({ id: `member_${typeof t == "string" ? t : "community"}` }));
|
|
1881
1881
|
const { name: i, url: c, image: u } = a, f = ss(a), p = n && n.createdAt ? Mr(n.createdAt) : !1, h = n && n.createdAt ? Tr(n.createdAt) : "";
|
|
1882
|
-
return
|
|
1882
|
+
return N.createElement(e, {
|
|
1883
1883
|
className: j("member text-medium", l),
|
|
1884
1884
|
children: /* @__PURE__ */ r.jsxs(
|
|
1885
|
-
|
|
1885
|
+
rt,
|
|
1886
1886
|
{
|
|
1887
1887
|
href: c,
|
|
1888
1888
|
gtmType: o,
|
|
@@ -1891,7 +1891,7 @@ const Pt = ({
|
|
|
1891
1891
|
_ == null || _.stopPropagation();
|
|
1892
1892
|
},
|
|
1893
1893
|
children: [
|
|
1894
|
-
/* @__PURE__ */ r.jsx(
|
|
1894
|
+
/* @__PURE__ */ r.jsx(Pt, { name: i, src: u }),
|
|
1895
1895
|
/* @__PURE__ */ r.jsxs("p", { className: "details", children: [
|
|
1896
1896
|
/* @__PURE__ */ r.jsx("strong", { children: i }),
|
|
1897
1897
|
n && /* @__PURE__ */ r.jsxs("span", { className: "additional-content", children: [
|
|
@@ -1909,17 +1909,17 @@ const sn = {
|
|
|
1909
1909
|
small: 24,
|
|
1910
1910
|
medium: 48
|
|
1911
1911
|
}, os = ({ element: e = "div", contributors: { total: t, data: n } = { total: void 0, data: [] }, styling: { showText: s, size: o, showGap: l, showPlaceholders: m } = { showText: !0, size: "medium", showGap: !0, showPlaceholders: !1 }, cutoff: a = 2, className: i = "" }) => {
|
|
1912
|
-
const c =
|
|
1913
|
-
return !n || n.length === 0 ? null :
|
|
1912
|
+
const c = F();
|
|
1913
|
+
return !n || n.length === 0 ? null : N.createElement(
|
|
1914
1914
|
e,
|
|
1915
1915
|
{ className: j("contributors", i, o, { "has-gap": l }), children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1916
1916
|
/* @__PURE__ */ r.jsx("ul", { children: n.map((u, f) => {
|
|
1917
1917
|
let p, h = "";
|
|
1918
1918
|
if (f < a) {
|
|
1919
|
-
const { name: _ = "", image:
|
|
1919
|
+
const { name: _ = "", image: k = "" } = kn(u);
|
|
1920
1920
|
if (m)
|
|
1921
1921
|
return /* @__PURE__ */ r.jsx(ve, { element: "li", className: "contributor" }, f);
|
|
1922
|
-
p = /* @__PURE__ */ r.jsx(
|
|
1922
|
+
p = /* @__PURE__ */ r.jsx(Pt, { name: _, src: k, width: sn[o || "medium"], height: sn[o || "medium"] });
|
|
1923
1923
|
} else if (f === a) {
|
|
1924
1924
|
const _ = (t || n.length) - a;
|
|
1925
1925
|
p = /* @__PURE__ */ r.jsxs("small", { className: j({ "large-number": _ > 99 }), children: [
|
|
@@ -1929,7 +1929,7 @@ const sn = {
|
|
|
1929
1929
|
}
|
|
1930
1930
|
return p ? /* @__PURE__ */ r.jsx("li", { className: j("contributor", h), children: p }, f) : null;
|
|
1931
1931
|
}) }),
|
|
1932
|
-
s && /* @__PURE__ */ r.jsx("span", { className: "label", children: typeof s == "string" ? s : n.length === 1 ? typeof n[0] == "string" ? c.formatMessage({ id: `member_${n[0]}` }) :
|
|
1932
|
+
s && /* @__PURE__ */ r.jsx("span", { className: "label", children: typeof s == "string" ? s : n.length === 1 ? typeof n[0] == "string" ? c.formatMessage({ id: `member_${n[0]}` }) : Ke(n[0].name || "", 20) : null })
|
|
1933
1933
|
] }) }
|
|
1934
1934
|
);
|
|
1935
1935
|
}, as = ({ showDevTools: e = !0, children: t }) => {
|
|
@@ -1949,12 +1949,12 @@ const sn = {
|
|
|
1949
1949
|
e && /* @__PURE__ */ r.jsx(dr, { initialIsOpen: !1 })
|
|
1950
1950
|
] });
|
|
1951
1951
|
};
|
|
1952
|
-
var is =
|
|
1952
|
+
var is = At({ client: Ge });
|
|
1953
1953
|
function ls(e) {
|
|
1954
1954
|
var t = e.children, n = e.client, s = e.apiKey, o = e.options, l = qe(function() {
|
|
1955
1955
|
return n && s && 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 || (s && (Ge.__loaded && console.warn("[PostHog.js] was already loaded elsewhere. This may cause issues."), Ge.init(s, o)), Ge);
|
|
1956
1956
|
}, [n, s]);
|
|
1957
|
-
return
|
|
1957
|
+
return N.createElement(is.Provider, { value: { client: l } }, t);
|
|
1958
1958
|
}
|
|
1959
1959
|
const cs = ({ children: e, user: t }) => t.isLoading ? /* @__PURE__ */ r.jsx(r.Fragment, {}) : process.env.REACT_APP_PUBLIC_POSTHOG_KEY ? /* @__PURE__ */ r.jsx(
|
|
1960
1960
|
ls,
|
|
@@ -1978,21 +1978,21 @@ const cs = ({ children: e, user: t }) => t.isLoading ? /* @__PURE__ */ r.jsx(r.F
|
|
|
1978
1978
|
...n || {}
|
|
1979
1979
|
};
|
|
1980
1980
|
return /* @__PURE__ */ r.jsx(ir, { locale: s, messages: o, children: e });
|
|
1981
|
-
}, je =
|
|
1982
|
-
const [s, o] =
|
|
1981
|
+
}, je = At(null), ds = ({ children: e, user: t }) => /* @__PURE__ */ r.jsx(je.Provider, { value: t, children: e }), po = ({ bootstrap: e, children: t, intl: n }) => {
|
|
1982
|
+
const [s, o] = P({ isLoading: !0 });
|
|
1983
1983
|
return z(() => {
|
|
1984
1984
|
e().then((l) => o({ ...l, isLoading: !1 })).catch(() => o({ isLoading: !1 }));
|
|
1985
1985
|
}, []), /* @__PURE__ */ r.jsx(us, { locale: n == null ? void 0 : n.locale, messages: n == null ? void 0 : n.messages, children: /* @__PURE__ */ r.jsx(ds, { user: s, children: /* @__PURE__ */ r.jsx(as, { children: /* @__PURE__ */ r.jsx(cs, { user: s, children: t }) }) }) });
|
|
1986
1986
|
};
|
|
1987
|
-
const
|
|
1987
|
+
const ft = "joinCommunityButton", yn = ({ isMember: e = !1, isShort: t = !1, functions: { join: n, leave: s } = { join: () => {
|
|
1988
1988
|
}, leave: () => {
|
|
1989
1989
|
} } }) => {
|
|
1990
|
-
const o =
|
|
1990
|
+
const o = F(), l = ye(je), m = l && typeof l.id == "string", [a, i] = P(e), [c, u] = P(e ? "joined" : "notJoined");
|
|
1991
1991
|
z(() => {
|
|
1992
1992
|
c === "joining" ? u("joined") : c === "leaving" && u("notJoined");
|
|
1993
1993
|
}, [a]);
|
|
1994
1994
|
const f = {}, p = {};
|
|
1995
|
-
return a && c !== "leaving" && (f["data-hover-text"] = o.formatMessage({ id: `${
|
|
1995
|
+
return a && c !== "leaving" && (f["data-hover-text"] = o.formatMessage({ id: `${ft}_leave` }), f["aria-label"] = o.formatMessage({ id: `${ft}_member_aria` }), p["aria-hidden"] = "true"), /* @__PURE__ */ r.jsx(
|
|
1996
1996
|
W,
|
|
1997
1997
|
{
|
|
1998
1998
|
variant: a ? "secondary" : "primary",
|
|
@@ -2005,27 +2005,27 @@ const mt = "joinCommunityButton", yn = ({ isMember: e = !1, isShort: t = !1, fun
|
|
|
2005
2005
|
className: j("join-community-button", c, { active: c === "joining" }),
|
|
2006
2006
|
disabled: !m,
|
|
2007
2007
|
...f,
|
|
2008
|
-
children: /* @__PURE__ */ r.jsx("span", { className: "text", ...p, children: o.formatMessage({ id: `${
|
|
2008
|
+
children: /* @__PURE__ */ r.jsx("span", { className: "text", ...p, children: o.formatMessage({ id: `${ft}${["joining", "leaving"].includes(c) ? `_${c}` : a ? "_member" : t ? "_short" : ""}` }) })
|
|
2009
2009
|
}
|
|
2010
2010
|
);
|
|
2011
2011
|
};
|
|
2012
|
-
const
|
|
2012
|
+
const pt = "communityDetails_", ho = ({
|
|
2013
2013
|
className: e = "",
|
|
2014
2014
|
isMember: t = !1,
|
|
2015
2015
|
slug: n,
|
|
2016
2016
|
members: { number: s = 0, data: o = [] } = { number: 0, data: [] },
|
|
2017
|
-
functions: {
|
|
2017
|
+
functions: { invite: l, ...m }
|
|
2018
2018
|
}) => {
|
|
2019
|
-
const a =
|
|
2019
|
+
const a = F(), i = 5, c = s || o.length, u = o.length ? o : Array(i).fill({});
|
|
2020
2020
|
return /* @__PURE__ */ r.jsxs("div", { className: j("community-details", e), children: [
|
|
2021
|
-
/* @__PURE__ */ r.jsx(
|
|
2021
|
+
/* @__PURE__ */ r.jsx(Ae, {}),
|
|
2022
2022
|
/* @__PURE__ */ r.jsxs("div", { className: "member-details", children: [
|
|
2023
2023
|
/* @__PURE__ */ r.jsxs("div", { className: "top", children: [
|
|
2024
2024
|
/* @__PURE__ */ r.jsxs("h3", { children: [
|
|
2025
|
-
a.formatMessage({ id: `${
|
|
2025
|
+
a.formatMessage({ id: `${pt}members` }),
|
|
2026
2026
|
/* @__PURE__ */ r.jsx("span", { className: "count", children: c })
|
|
2027
2027
|
] }),
|
|
2028
|
-
/* @__PURE__ */ r.jsx("p", { className: "text-small", children: /* @__PURE__ */ r.jsx("a", { href: `/communities/${n}/members`, children: a.formatMessage({ id: `${
|
|
2028
|
+
/* @__PURE__ */ r.jsx("p", { className: "text-small", children: /* @__PURE__ */ r.jsx("a", { href: `/communities/${n}/members`, children: a.formatMessage({ id: `${pt}viewAll` }) }) })
|
|
2029
2029
|
] }),
|
|
2030
2030
|
/* @__PURE__ */ r.jsx(
|
|
2031
2031
|
os,
|
|
@@ -2043,7 +2043,7 @@ const ft = "communityDetails_", po = ({
|
|
|
2043
2043
|
}
|
|
2044
2044
|
)
|
|
2045
2045
|
] }),
|
|
2046
|
-
/* @__PURE__ */ r.jsx(yn, { isMember: t, ...m }),
|
|
2046
|
+
/* @__PURE__ */ r.jsx(yn, { isMember: t, functions: { ...m } }),
|
|
2047
2047
|
t && /* @__PURE__ */ r.jsx(
|
|
2048
2048
|
W,
|
|
2049
2049
|
{
|
|
@@ -2051,26 +2051,26 @@ const ft = "communityDetails_", po = ({
|
|
|
2051
2051
|
onClick: l,
|
|
2052
2052
|
icon: { icon: "plus" },
|
|
2053
2053
|
styling: { fullWidth: !0 },
|
|
2054
|
-
children: a.formatMessage({ id: `${
|
|
2054
|
+
children: a.formatMessage({ id: `${pt}invite` })
|
|
2055
2055
|
}
|
|
2056
2056
|
)
|
|
2057
2057
|
] });
|
|
2058
2058
|
};
|
|
2059
|
-
const
|
|
2059
|
+
const go = ({
|
|
2060
2060
|
breadcrumbs: e,
|
|
2061
2061
|
cutoff: t = 20,
|
|
2062
2062
|
className: n = ""
|
|
2063
2063
|
}) => {
|
|
2064
|
-
const s =
|
|
2064
|
+
const s = F();
|
|
2065
2065
|
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
2066
|
-
/* @__PURE__ */ r.jsx(
|
|
2066
|
+
/* @__PURE__ */ r.jsx(re, { element: "p", children: s.formatMessage({ id: "breadcrumbs_label" }) }),
|
|
2067
2067
|
/* @__PURE__ */ r.jsx("ul", { className: j("breadcrumbs text-small", n), children: e.map(({ text: o, href: l, current: m = !1 }, a) => /* @__PURE__ */ r.jsxs("li", { children: [
|
|
2068
|
-
m && /* @__PURE__ */ r.jsx(
|
|
2069
|
-
/* @__PURE__ */ r.jsx(
|
|
2068
|
+
m && /* @__PURE__ */ r.jsx(re, { element: "span", children: s.formatMessage({ id: "breadcrumbs_currentPage" }) }),
|
|
2069
|
+
/* @__PURE__ */ r.jsx(rt, { href: m ? void 0 : l, children: Ke(o, t) })
|
|
2070
2070
|
] }, `${window.btoa(o)}_${a}`)) })
|
|
2071
2071
|
] });
|
|
2072
2072
|
};
|
|
2073
|
-
const
|
|
2073
|
+
const _o = ({
|
|
2074
2074
|
options: e,
|
|
2075
2075
|
allOption: t = !1,
|
|
2076
2076
|
allowMultiple: n = !0,
|
|
@@ -2078,7 +2078,7 @@ const go = ({
|
|
|
2078
2078
|
},
|
|
2079
2079
|
className: o = ""
|
|
2080
2080
|
}) => {
|
|
2081
|
-
const l =
|
|
2081
|
+
const l = F(), m = t ? [{ id: "all", text: typeof t != "boolean" && t.text || l.formatMessage({ id: "filters_all" }) }, ...e] : e, [a, i] = P(t ? ["all"] : []), c = (u, f) => {
|
|
2082
2082
|
let p = [];
|
|
2083
2083
|
a.includes(u) ? p = a.filter((h) => h !== u) : u === "all" ? p = ["all"] : n ? p = [...a.filter((h) => h !== "all"), u] : p = [u], i((h) => (s && typeof s == "function" && s({ current: p, previous: h }), p)), f && typeof f == "function" && f();
|
|
2084
2084
|
};
|
|
@@ -2089,8 +2089,8 @@ const go = ({
|
|
|
2089
2089
|
"button",
|
|
2090
2090
|
{
|
|
2091
2091
|
className: j(u, { selected: a.includes(u) }),
|
|
2092
|
-
onClick: (
|
|
2093
|
-
|
|
2092
|
+
onClick: (k) => {
|
|
2093
|
+
k.preventDefault(), k.stopPropagation(), c(u, h);
|
|
2094
2094
|
},
|
|
2095
2095
|
..._,
|
|
2096
2096
|
children: f
|
|
@@ -2106,7 +2106,7 @@ const go = ({
|
|
|
2106
2106
|
l === "before-lang" ? s += `/${o}` : (s.includes(`/${n}/`) || (s += `/${n}`), s += `/${o}`);
|
|
2107
2107
|
}), s.includes(`/${n}/`) || (s += `/${n}`), s;
|
|
2108
2108
|
};
|
|
2109
|
-
const
|
|
2109
|
+
const ht = { en: "English", es: "Español", fr: "Français", pt: "Português" }, Ue = "languageSwitcher_", xo = ({
|
|
2110
2110
|
currentLanguage: e,
|
|
2111
2111
|
isOriginalLanguage: t = !1,
|
|
2112
2112
|
isHumanTranslation: n = !1,
|
|
@@ -2118,26 +2118,26 @@ const pt = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2118
2118
|
label: a,
|
|
2119
2119
|
className: i = ""
|
|
2120
2120
|
}) => {
|
|
2121
|
-
const c =
|
|
2121
|
+
const c = F(), [u, f] = P(e);
|
|
2122
2122
|
if (z(() => {
|
|
2123
2123
|
e !== u && f(e);
|
|
2124
|
-
}, [e]), !s || !Object.values(s).some((
|
|
2124
|
+
}, [e]), !s || !Object.values(s).some((k) => k && k.post_name))
|
|
2125
2125
|
return null;
|
|
2126
2126
|
const h = Object.keys(s), _ = u !== e;
|
|
2127
2127
|
return /* @__PURE__ */ r.jsxs("div", { className: j("language-switcher text-small", m, i), children: [
|
|
2128
2128
|
/* @__PURE__ */ r.jsxs("nav", { children: [
|
|
2129
2129
|
m !== "short" && /* @__PURE__ */ r.jsx("p", { children: a || c.formatMessage({ id: `${Ue}label` }) }),
|
|
2130
|
-
/* @__PURE__ */ r.jsx("ul", { children: h.map((
|
|
2131
|
-
if (!
|
|
2130
|
+
/* @__PURE__ */ r.jsx("ul", { children: h.map((k) => {
|
|
2131
|
+
if (!ht[k])
|
|
2132
2132
|
return null;
|
|
2133
|
-
let g = { className:
|
|
2134
|
-
return u ===
|
|
2133
|
+
let g = { className: k };
|
|
2134
|
+
return u === k ? g["aria-label"] = c.formatMessage({ id: `${Ue}selected` }, { language: ht[k] }) : g = {
|
|
2135
2135
|
...g,
|
|
2136
|
-
href: ms(
|
|
2136
|
+
href: ms(k, l),
|
|
2137
2137
|
onClick: (E) => {
|
|
2138
|
-
E.preventDefault(), E.stopPropagation(), f(
|
|
2138
|
+
E.preventDefault(), E.stopPropagation(), f(k), o(k);
|
|
2139
2139
|
}
|
|
2140
|
-
}, /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
|
|
2140
|
+
}, /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(rt, { ...g, fallbackElement: "span", children: ht[k] }) }, k);
|
|
2141
2141
|
}) }),
|
|
2142
2142
|
m !== "short" && !_ && /* @__PURE__ */ r.jsx("p", { children: c.formatMessage({ id: `${Ue}translation_${t ? "original" : n ? "human" : "machine"}` }) })
|
|
2143
2143
|
] }),
|
|
@@ -2146,16 +2146,16 @@ const pt = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2146
2146
|
// @ts-ignore
|
|
2147
2147
|
// `values` are throwing a type error: https://github.com/formatjs/formatjs/issues/3633
|
|
2148
2148
|
children: c.formatMessage({ id: `${Ue}disclaimer` }, {
|
|
2149
|
-
email:
|
|
2150
|
-
link: (
|
|
2151
|
-
const g = `mailto:${
|
|
2152
|
-
return /* @__PURE__ */ r.jsx("a", { href: g, children:
|
|
2149
|
+
email: Oe.support,
|
|
2150
|
+
link: (k) => {
|
|
2151
|
+
const g = `mailto:${k}`;
|
|
2152
|
+
return /* @__PURE__ */ r.jsx("a", { href: g, children: k });
|
|
2153
2153
|
}
|
|
2154
2154
|
})
|
|
2155
2155
|
})
|
|
2156
2156
|
] });
|
|
2157
2157
|
};
|
|
2158
|
-
const
|
|
2158
|
+
const gt = lr({ locale: "en", messages: Dt }), fs = ({
|
|
2159
2159
|
page: e = 1,
|
|
2160
2160
|
length: t = 0,
|
|
2161
2161
|
limit: n = 10,
|
|
@@ -2163,14 +2163,14 @@ const ht = lr({ locale: "en", messages: Nt }), fs = ({
|
|
|
2163
2163
|
},
|
|
2164
2164
|
icon: o = !1,
|
|
2165
2165
|
messages: l = {
|
|
2166
|
-
button:
|
|
2167
|
-
endOfFeed:
|
|
2168
|
-
error:
|
|
2166
|
+
button: gt.formatMessage({ id: "loadMore_button" }),
|
|
2167
|
+
endOfFeed: gt.formatMessage({ id: "loadMore_endOfFeed" }),
|
|
2168
|
+
error: gt.formatMessage({ id: "loadMore_error" })
|
|
2169
2169
|
},
|
|
2170
2170
|
className: m = "",
|
|
2171
2171
|
gtmContext: a = "LoadMore"
|
|
2172
2172
|
}) => {
|
|
2173
|
-
const [i, c] =
|
|
2173
|
+
const [i, c] = P(!1), [u, f] = P(!1);
|
|
2174
2174
|
if (t <= 0 || t < n * e)
|
|
2175
2175
|
return null;
|
|
2176
2176
|
const p = async (h) => {
|
|
@@ -2199,12 +2199,12 @@ const ht = lr({ locale: "en", messages: Nt }), fs = ({
|
|
|
2199
2199
|
};
|
|
2200
2200
|
let We = !1;
|
|
2201
2201
|
const ps = ({ element: e = "div", id: t = "more-menu", options: n, className: s = "" }) => {
|
|
2202
|
-
const o =
|
|
2202
|
+
const o = F(), l = ee(null), [m, a] = P(!1), i = (c) => {
|
|
2203
2203
|
l.current && c.target instanceof HTMLElement && !l.current.contains(c.target) && a(!1);
|
|
2204
2204
|
};
|
|
2205
2205
|
return z(() => (document.addEventListener("click", i, !0), () => {
|
|
2206
2206
|
document.removeEventListener("click", i, !0);
|
|
2207
|
-
})),
|
|
2207
|
+
})), N.createElement(e, {
|
|
2208
2208
|
ref: l,
|
|
2209
2209
|
className: j("more-menu text-medium", s),
|
|
2210
2210
|
children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
@@ -2222,7 +2222,7 @@ const ps = ({ element: e = "div", id: t = "more-menu", options: n, className: s
|
|
|
2222
2222
|
}
|
|
2223
2223
|
),
|
|
2224
2224
|
/* @__PURE__ */ r.jsx("ul", { id: t, hidden: !m, children: n.map(({ href: c, onClick: u, text: f, icon: p, ...h }, _) => {
|
|
2225
|
-
const
|
|
2225
|
+
const k = {
|
|
2226
2226
|
...h,
|
|
2227
2227
|
onClick: (g) => {
|
|
2228
2228
|
a(!1), typeof u == "function" && u(g);
|
|
@@ -2236,13 +2236,13 @@ const ps = ({ element: e = "div", id: t = "more-menu", options: n, className: s
|
|
|
2236
2236
|
}, 100);
|
|
2237
2237
|
}
|
|
2238
2238
|
};
|
|
2239
|
-
return c && (
|
|
2239
|
+
return c && (k.href = c), /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
|
|
2240
2240
|
W,
|
|
2241
2241
|
{
|
|
2242
2242
|
variant: "tertiary",
|
|
2243
2243
|
size: "medium",
|
|
2244
2244
|
icon: p ? { icon: p, position: "left" } : !1,
|
|
2245
|
-
...
|
|
2245
|
+
...k,
|
|
2246
2246
|
children: f
|
|
2247
2247
|
}
|
|
2248
2248
|
) }, `${window.btoa(f)}_${_}`);
|
|
@@ -2250,32 +2250,32 @@ const ps = ({ element: e = "div", id: t = "more-menu", options: n, className: s
|
|
|
2250
2250
|
] })
|
|
2251
2251
|
});
|
|
2252
2252
|
};
|
|
2253
|
-
const jn = ({ variant: e = "default", version: t = "default", className: n = "", ...s }) => /* @__PURE__ */ r.jsx("p", { className: "logo-wrapper", children: /* @__PURE__ */ r.jsx("a", { href: "/home/", className: j("logo", e, t, n), ...s, children: /* @__PURE__ */ r.jsx(
|
|
2253
|
+
const jn = ({ variant: e = "default", version: t = "default", className: n = "", ...s }) => /* @__PURE__ */ r.jsx("p", { className: "logo-wrapper", children: /* @__PURE__ */ r.jsx("a", { href: "/home/", className: j("logo", e, t, n), ...s, children: /* @__PURE__ */ r.jsx(re, { children: /* @__PURE__ */ r.jsx(we, { id: "apolitical" }) }) }) });
|
|
2254
2254
|
const hs = {
|
|
2255
2255
|
"2-1": 901
|
|
2256
|
-
},
|
|
2257
|
-
const o =
|
|
2256
|
+
}, bo = ({ layout: e = "2-1", hideOnMobile: t = !1, className: n = "", children: s }) => {
|
|
2257
|
+
const o = tt(!0);
|
|
2258
2258
|
let l = s;
|
|
2259
|
-
return
|
|
2259
|
+
return N.Children.count(s) === 1 && (l = N.Children.toArray(s)[0], l.props && (l = l.props.children)), /* @__PURE__ */ r.jsx("section", { className: j("columns", `layout-${e}`, n), children: N.Children.map(l, (m, a) => t !== !1 && a === t && o && o < hs[e] ? null : m) });
|
|
2260
2260
|
};
|
|
2261
|
-
const
|
|
2262
|
-
const e =
|
|
2263
|
-
|
|
2261
|
+
const _t = "cookieBanner_", xt = ["apol-cookie-banner", "apolitical-performance-cookie-consent", "functional-cookie-consent"], bt = new Date(Date.now() + 12 * 30 * 24 * 60 * 60 * 1e3), gs = () => {
|
|
2262
|
+
const e = F(), [t, n, s] = mr(xt), [o, l] = P(!t["apol-cookie-banner"]), m = () => {
|
|
2263
|
+
xt.forEach((u) => {
|
|
2264
2264
|
n(u, !0, {
|
|
2265
2265
|
path: "/",
|
|
2266
|
-
expires:
|
|
2266
|
+
expires: bt,
|
|
2267
2267
|
domain: u === "apolitical-performance-cookie-consent" ? ".apolitical.co" : void 0
|
|
2268
2268
|
});
|
|
2269
2269
|
}), l(!1), window.location.reload();
|
|
2270
2270
|
}, a = () => {
|
|
2271
2271
|
n("apol-cookie-banner", !0, {
|
|
2272
2272
|
path: "/",
|
|
2273
|
-
expires:
|
|
2274
|
-
}),
|
|
2273
|
+
expires: bt
|
|
2274
|
+
}), xt.forEach((u) => {
|
|
2275
2275
|
if (u === "apol-cookie-banner") {
|
|
2276
2276
|
n(u, !0, {
|
|
2277
2277
|
path: "/",
|
|
2278
|
-
expires:
|
|
2278
|
+
expires: bt
|
|
2279
2279
|
});
|
|
2280
2280
|
return;
|
|
2281
2281
|
}
|
|
@@ -2297,12 +2297,12 @@ const gt = "cookieBanner_", _t = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2297
2297
|
className: "gtm-trackable",
|
|
2298
2298
|
"data-gtm-event-context": "cookie-banner",
|
|
2299
2299
|
"data-gtm-event-type": `cookie-${u.gtmType}-click`,
|
|
2300
|
-
children: e.formatMessage({ id: `${
|
|
2300
|
+
children: e.formatMessage({ id: `${_t}buttons_${u.id}` })
|
|
2301
2301
|
});
|
|
2302
2302
|
}), /* @__PURE__ */ r.jsxs("aside", { id: "cookie-banner", className: "text-medium", children: [
|
|
2303
|
-
/* @__PURE__ */ r.jsx("h6", { children: e.formatMessage({ id: `${
|
|
2304
|
-
/* @__PURE__ */ r.jsx("p", { children: e.formatMessage({ id: `${
|
|
2305
|
-
/* @__PURE__ */ r.jsx(
|
|
2303
|
+
/* @__PURE__ */ r.jsx("h6", { children: e.formatMessage({ id: `${_t}title` }) }),
|
|
2304
|
+
/* @__PURE__ */ r.jsx("p", { children: e.formatMessage({ id: `${_t}text` }) }),
|
|
2305
|
+
/* @__PURE__ */ r.jsx(nt, { buttons: c })
|
|
2306
2306
|
] });
|
|
2307
2307
|
}, be = {
|
|
2308
2308
|
platform: {
|
|
@@ -2369,11 +2369,11 @@ const gt = "cookieBanner_", _t = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2369
2369
|
text: {
|
|
2370
2370
|
order: ["dataProtection", "euDataProtection"],
|
|
2371
2371
|
dataProtection: {
|
|
2372
|
-
email:
|
|
2372
|
+
email: Oe["data-protection"].default,
|
|
2373
2373
|
gtmType: "email-dpo-link"
|
|
2374
2374
|
},
|
|
2375
2375
|
euDataProtection: {
|
|
2376
|
-
email:
|
|
2376
|
+
email: Oe["data-protection"].eu,
|
|
2377
2377
|
gtmType: "email-eu-dpo-link"
|
|
2378
2378
|
}
|
|
2379
2379
|
}
|
|
@@ -2385,10 +2385,10 @@ const gt = "cookieBanner_", _t = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2385
2385
|
registered: { address: !0 },
|
|
2386
2386
|
berlin: { address: !0 },
|
|
2387
2387
|
support: {
|
|
2388
|
-
email:
|
|
2388
|
+
email: Oe.support,
|
|
2389
2389
|
gtmType: "concierge-email-click"
|
|
2390
2390
|
},
|
|
2391
|
-
business: { email:
|
|
2391
|
+
business: { email: Oe.general, gtmType: "hello-email-click" }
|
|
2392
2392
|
}
|
|
2393
2393
|
},
|
|
2394
2394
|
social: {
|
|
@@ -2401,7 +2401,7 @@ const gt = "cookieBanner_", _t = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2401
2401
|
const Me = "footer_", Je = "SiteFooter", on = ({ group: e }) => {
|
|
2402
2402
|
const t = be[e].order || [];
|
|
2403
2403
|
let n = !1;
|
|
2404
|
-
return "text" in be[e] && (n = be[e].text), /* @__PURE__ */ r.jsxs(
|
|
2404
|
+
return "text" in be[e] && (n = be[e].text), /* @__PURE__ */ r.jsxs(Et, { children: [
|
|
2405
2405
|
/* @__PURE__ */ r.jsx("p", { className: "pre-title", children: /* @__PURE__ */ r.jsx(we, { id: `${Me}${e}` }) }),
|
|
2406
2406
|
Array.isArray(t) && t.length > 0 && /* @__PURE__ */ r.jsx("ul", { className: "text-medium", children: t.map((s) => {
|
|
2407
2407
|
if (["order", "child", "text"].includes(s))
|
|
@@ -2419,7 +2419,7 @@ const Me = "footer_", Je = "SiteFooter", on = ({ group: e }) => {
|
|
|
2419
2419
|
}
|
|
2420
2420
|
) }, `${e}_${s}`);
|
|
2421
2421
|
}) }),
|
|
2422
|
-
typeof n != "boolean" && "order" in n && Array.isArray(n.order) && /* @__PURE__ */ r.jsx("dl", { className: "text-medium", children: n.order.map((s) => /* @__PURE__ */ r.jsxs(
|
|
2422
|
+
typeof n != "boolean" && "order" in n && Array.isArray(n.order) && /* @__PURE__ */ r.jsx("dl", { className: "text-medium", children: n.order.map((s) => /* @__PURE__ */ r.jsxs(Et, { children: [
|
|
2423
2423
|
/* @__PURE__ */ r.jsx("dt", { children: /* @__PURE__ */ r.jsx(we, { id: `${Me}${e}_${s}` }) }),
|
|
2424
2424
|
/* @__PURE__ */ r.jsxs("dd", { children: [
|
|
2425
2425
|
typeof n != "boolean" && n[s].address && /* @__PURE__ */ r.jsx("address", { children: /* @__PURE__ */ r.jsx(we, { id: `${Me}${e}_${s}_address`, values: { br: /* @__PURE__ */ r.jsx("br", {}) } }) }),
|
|
@@ -2472,11 +2472,11 @@ const Me = "footer_", Je = "SiteFooter", on = ({ group: e }) => {
|
|
|
2472
2472
|
/* @__PURE__ */ r.jsx("small", { children: /* @__PURE__ */ r.jsx(we, { id: `${Me}copyright`, values: { currentYear: (/* @__PURE__ */ new Date()).getFullYear() } }) })
|
|
2473
2473
|
] })
|
|
2474
2474
|
] }) });
|
|
2475
|
-
const ze = "emailHelperTextBox_",
|
|
2476
|
-
const o =
|
|
2475
|
+
const ze = "emailHelperTextBox_", vo = ({ type: e, email: t, redirectPath: n, resendVerificationCode: s }) => {
|
|
2476
|
+
const o = F(), [l, m] = P({ path: `${ze}default`, type: "default", link: {}, mail: {}, error: "" }), [a, i] = P(!1), c = Ee(
|
|
2477
2477
|
(h) => {
|
|
2478
2478
|
h.preventDefault(), h.stopPropagation();
|
|
2479
|
-
const _ = (
|
|
2479
|
+
const _ = (k) => {
|
|
2480
2480
|
m({
|
|
2481
2481
|
path: `${ze}error_verificationFailedToSend`,
|
|
2482
2482
|
type: "error",
|
|
@@ -2494,7 +2494,7 @@ const ze = "emailHelperTextBox_", bo = ({ type: e, email: t, redirectPath: n, re
|
|
|
2494
2494
|
"data-gtm-event-context": "ErrorVerifyingBox",
|
|
2495
2495
|
"data-gtm-event-type": "email-concierge-click"
|
|
2496
2496
|
},
|
|
2497
|
-
error:
|
|
2497
|
+
error: k
|
|
2498
2498
|
});
|
|
2499
2499
|
};
|
|
2500
2500
|
if (typeof s != "function") {
|
|
@@ -2503,8 +2503,8 @@ const ze = "emailHelperTextBox_", bo = ({ type: e, email: t, redirectPath: n, re
|
|
|
2503
2503
|
}
|
|
2504
2504
|
i(!0), s(t).then(() => {
|
|
2505
2505
|
localStorage.setItem("email", t), window.location.href = n || "/signup/verify-email";
|
|
2506
|
-
}).catch((
|
|
2507
|
-
_(
|
|
2506
|
+
}).catch((k) => {
|
|
2507
|
+
_(k.message);
|
|
2508
2508
|
}).finally(() => {
|
|
2509
2509
|
i(!1);
|
|
2510
2510
|
});
|
|
@@ -2514,13 +2514,13 @@ const ze = "emailHelperTextBox_", bo = ({ type: e, email: t, redirectPath: n, re
|
|
|
2514
2514
|
);
|
|
2515
2515
|
z(
|
|
2516
2516
|
() => {
|
|
2517
|
-
let h = ze, _ = "default",
|
|
2517
|
+
let h = ze, _ = "default", k = {}, g = {};
|
|
2518
2518
|
switch (e) {
|
|
2519
2519
|
case "gov":
|
|
2520
2520
|
h += "autoApproved", _ = "success";
|
|
2521
2521
|
break;
|
|
2522
2522
|
case "nonGov":
|
|
2523
|
-
h += "unrecognisedEmail", _ = "error",
|
|
2523
|
+
h += "unrecognisedEmail", _ = "error", k = {
|
|
2524
2524
|
href: "https://about.apolitical.co/who-can-join-the-community",
|
|
2525
2525
|
"data-gtm-event-context": "NonGovEmailHelperTextBox",
|
|
2526
2526
|
"data-gtm-event-type": "LearnMoreClick"
|
|
@@ -2535,7 +2535,7 @@ const ze = "emailHelperTextBox_", bo = ({ type: e, email: t, redirectPath: n, re
|
|
|
2535
2535
|
};
|
|
2536
2536
|
break;
|
|
2537
2537
|
case "verify":
|
|
2538
|
-
h += "emailUnverified", _ = "error",
|
|
2538
|
+
h += "emailUnverified", _ = "error", k = {
|
|
2539
2539
|
href: "#",
|
|
2540
2540
|
"data-gtm-event-context": "VerifyEmailBox",
|
|
2541
2541
|
"data-gtm-event-type": "SendEmailClick",
|
|
@@ -2545,7 +2545,7 @@ const ze = "emailHelperTextBox_", bo = ({ type: e, email: t, redirectPath: n, re
|
|
|
2545
2545
|
};
|
|
2546
2546
|
break;
|
|
2547
2547
|
case "exists":
|
|
2548
|
-
h += "emailAlreadyExists", _ = "error",
|
|
2548
|
+
h += "emailAlreadyExists", _ = "error", k = {
|
|
2549
2549
|
href: "/user-onboarding/login",
|
|
2550
2550
|
"data-gtm-event-context": "EmailExistsBox",
|
|
2551
2551
|
"data-gtm-event-type": "login-click"
|
|
@@ -2557,14 +2557,14 @@ const ze = "emailHelperTextBox_", bo = ({ type: e, email: t, redirectPath: n, re
|
|
|
2557
2557
|
};
|
|
2558
2558
|
break;
|
|
2559
2559
|
default:
|
|
2560
|
-
h += "default",
|
|
2560
|
+
h += "default", k = {
|
|
2561
2561
|
href: "https://about.apolitical.co/who-can-join-the-community",
|
|
2562
2562
|
"data-gtm-event-context": "DefaultEmailHelperTextBox",
|
|
2563
2563
|
"data-gtm-event-type": "LearnMoreClick"
|
|
2564
2564
|
};
|
|
2565
2565
|
break;
|
|
2566
2566
|
}
|
|
2567
|
-
m({ ...l, path: h, type: _, link:
|
|
2567
|
+
m({ ...l, path: h, type: _, link: k, mail: g });
|
|
2568
2568
|
},
|
|
2569
2569
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
2570
2570
|
[e]
|
|
@@ -2599,24 +2599,24 @@ const Ve = "passwordRules_", Sn = "isMoreThanEightCharacters", $n = "includesNum
|
|
|
2599
2599
|
[$n]: "numberSymbol",
|
|
2600
2600
|
[Tn]: "lowercaseUppercase"
|
|
2601
2601
|
}, xs = ({ matchingRules: e = { isMoreThanEightCharacters: !1, includesNumberAndSymbol: !1, includesLowerAndUppercase: !1 }, className: t = "" }) => {
|
|
2602
|
-
const n =
|
|
2602
|
+
const n = F();
|
|
2603
2603
|
return /* @__PURE__ */ r.jsxs("aside", { className: j("password-rules", t), children: [
|
|
2604
2604
|
/* @__PURE__ */ r.jsx("small", { children: n.formatMessage({ id: `${Ve}intro` }) }),
|
|
2605
2605
|
/* @__PURE__ */ r.jsx("ul", { children: [Sn, $n, Tn].map((s) => /* @__PURE__ */ r.jsxs("li", { className: j({ matches: e[s] }), children: [
|
|
2606
|
-
/* @__PURE__ */ r.jsxs(
|
|
2606
|
+
/* @__PURE__ */ r.jsxs(re, { children: [
|
|
2607
2607
|
n.formatMessage({ id: `${Ve}rule_label` }),
|
|
2608
2608
|
" "
|
|
2609
2609
|
] }),
|
|
2610
2610
|
/* @__PURE__ */ r.jsx("span", { children: n.formatMessage({ id: `${Ve}rule_${_s[s]}` }) }),
|
|
2611
|
-
!e[s] && /* @__PURE__ */ r.jsxs(
|
|
2611
|
+
!e[s] && /* @__PURE__ */ r.jsxs(re, { element: "strong", children: [
|
|
2612
2612
|
" ",
|
|
2613
2613
|
" ",
|
|
2614
2614
|
n.formatMessage({ id: `${Ve}notMet` })
|
|
2615
2615
|
] })
|
|
2616
2616
|
] }, `rule-${s}`)) })
|
|
2617
2617
|
] });
|
|
2618
|
-
},
|
|
2619
|
-
const
|
|
2618
|
+
}, wo = Ne(xs);
|
|
2619
|
+
const ko = ({
|
|
2620
2620
|
text: e = {},
|
|
2621
2621
|
topRating: t = 5,
|
|
2622
2622
|
functions: { createRating: n = () => null, updateRating: s = () => {
|
|
@@ -2625,19 +2625,19 @@ const wo = ({
|
|
|
2625
2625
|
className: l = "",
|
|
2626
2626
|
hasLoaded: m = !1
|
|
2627
2627
|
}) => {
|
|
2628
|
-
const a =
|
|
2628
|
+
const a = F(), [i, c] = P({ setUp: !1, id: null, rating: null, disabled: !0 }), u = async () => {
|
|
2629
2629
|
try {
|
|
2630
2630
|
const E = await n();
|
|
2631
|
-
c((
|
|
2631
|
+
c((v) => ({ ...v, setUp: !0, id: E && E.id, disabled: !1 }));
|
|
2632
2632
|
} catch (E) {
|
|
2633
|
-
c((
|
|
2633
|
+
c((v) => ({ ...v, setUp: !0, disabled: !0 })), o(E);
|
|
2634
2634
|
}
|
|
2635
2635
|
};
|
|
2636
2636
|
if (z(() => {
|
|
2637
2637
|
m && !i.setUp && u();
|
|
2638
2638
|
}, [m]), !m)
|
|
2639
2639
|
return /* @__PURE__ */ r.jsx(ve, { className: "rating-placeholder" });
|
|
2640
|
-
const { id: f, rating: p, disabled: h } = i, _ = "ratings_",
|
|
2640
|
+
const { id: f, rating: p, disabled: h } = i, _ = "ratings_", k = {
|
|
2641
2641
|
text: a.formatMessage({ id: `${_}text` }),
|
|
2642
2642
|
low: a.formatMessage({ id: `${_}low` }),
|
|
2643
2643
|
high: a.formatMessage({ id: `${_}high` }),
|
|
@@ -2646,33 +2646,33 @@ const wo = ({
|
|
|
2646
2646
|
}, g = async (E) => {
|
|
2647
2647
|
if (!(!f || h))
|
|
2648
2648
|
try {
|
|
2649
|
-
c((
|
|
2650
|
-
} catch (
|
|
2651
|
-
c((
|
|
2649
|
+
c((v) => ({ ...v, rating: E, disabled: !0 })), await s({ id: f, value: E });
|
|
2650
|
+
} catch (v) {
|
|
2651
|
+
c((S) => ({ ...S, rating: null })), o(v);
|
|
2652
2652
|
} finally {
|
|
2653
|
-
c((
|
|
2653
|
+
c((v) => ({ ...v, disabled: !1 }));
|
|
2654
2654
|
}
|
|
2655
2655
|
};
|
|
2656
2656
|
return /* @__PURE__ */ r.jsxs("div", { className: j("rating", l), children: [
|
|
2657
|
-
/* @__PURE__ */ r.jsx("span", { className: "label", children:
|
|
2657
|
+
/* @__PURE__ */ r.jsx("span", { className: "label", children: k[p ? "success" : "text"] }),
|
|
2658
2658
|
/* @__PURE__ */ r.jsx("ol", { children: Array.from(new Array(t).keys()).map((E) => {
|
|
2659
|
-
const
|
|
2660
|
-
return /* @__PURE__ */ r.jsx("li", { className: j({ selected: p &&
|
|
2659
|
+
const v = E + 1;
|
|
2660
|
+
return /* @__PURE__ */ r.jsx("li", { className: j({ selected: p && v <= p }), children: /* @__PURE__ */ r.jsx(
|
|
2661
2661
|
W,
|
|
2662
2662
|
{
|
|
2663
2663
|
variant: "tertiary",
|
|
2664
2664
|
size: "small",
|
|
2665
|
-
icon: { icon: `star${!p ||
|
|
2665
|
+
icon: { icon: `star${!p || v > p ? "_empty" : ""}`, position: "left", hover: "star" },
|
|
2666
2666
|
screenreaderText: `${a.formatMessage(
|
|
2667
2667
|
{ id: `${_}stars` },
|
|
2668
|
-
{ number:
|
|
2669
|
-
)}${
|
|
2670
|
-
onClick: (
|
|
2671
|
-
|
|
2668
|
+
{ number: v, total: t }
|
|
2669
|
+
)}${v === 1 || v === t ? ` - ${k[v === 1 ? "low" : "high"]}` : ""}`,
|
|
2670
|
+
onClick: (S) => {
|
|
2671
|
+
S.preventDefault(), S.stopPropagation(), g(v);
|
|
2672
2672
|
},
|
|
2673
2673
|
disabled: h
|
|
2674
2674
|
}
|
|
2675
|
-
) }, `rating-${
|
|
2675
|
+
) }, `rating-${v}`);
|
|
2676
2676
|
}) })
|
|
2677
2677
|
] });
|
|
2678
2678
|
};
|
|
@@ -2684,7 +2684,7 @@ const bs = ({
|
|
|
2684
2684
|
gtmContext: o = "search-bar",
|
|
2685
2685
|
gtmEvent: l = "form-submission"
|
|
2686
2686
|
}) => {
|
|
2687
|
-
const { searchIsOpen: m = !0, isDesktopVersion: a = !1 } = n || {}, i =
|
|
2687
|
+
const { searchIsOpen: m = !0, isDesktopVersion: a = !1 } = n || {}, i = F(), c = ee(null);
|
|
2688
2688
|
Ce(() => {
|
|
2689
2689
|
!n || a || !m || c.current && c.current.focus();
|
|
2690
2690
|
}, [m]);
|
|
@@ -2699,7 +2699,7 @@ const bs = ({
|
|
|
2699
2699
|
"data-gtm-event-context": o,
|
|
2700
2700
|
"data-gtm-event-type": l,
|
|
2701
2701
|
children: /* @__PURE__ */ r.jsx("fieldset", { id: `${e}-form`, hidden: n ? !m : !1, role: "search", children: /* @__PURE__ */ r.jsxs("p", { children: [
|
|
2702
|
-
/* @__PURE__ */ r.jsx(
|
|
2702
|
+
/* @__PURE__ */ r.jsx(re, { element: "label", htmlFor: e, children: i.formatMessage({ id: "search_label" }) }),
|
|
2703
2703
|
/* @__PURE__ */ r.jsx(
|
|
2704
2704
|
"input",
|
|
2705
2705
|
{
|
|
@@ -2721,10 +2721,10 @@ const bs = ({
|
|
|
2721
2721
|
onClick: (f) => {
|
|
2722
2722
|
f.preventDefault(), f.stopPropagation(), c.current && c.current.value && (c.current.value = "");
|
|
2723
2723
|
},
|
|
2724
|
-
children: /* @__PURE__ */ r.jsx(
|
|
2724
|
+
children: /* @__PURE__ */ r.jsx(re, { children: i.formatMessage({ id: "search_clear" }) })
|
|
2725
2725
|
}
|
|
2726
2726
|
),
|
|
2727
|
-
/* @__PURE__ */ r.jsx("button", { className: "search", onClick: u, children: /* @__PURE__ */ r.jsx(
|
|
2727
|
+
/* @__PURE__ */ r.jsx("button", { className: "search", onClick: u, children: /* @__PURE__ */ r.jsx(re, { children: i.formatMessage({ id: "search_cta" }) }) })
|
|
2728
2728
|
] }) })
|
|
2729
2729
|
}
|
|
2730
2730
|
);
|
|
@@ -2742,26 +2742,26 @@ const vs = ({
|
|
|
2742
2742
|
initialFormStatus: c = "NOT_SUBMITTED"
|
|
2743
2743
|
/* NOT_SUBMITTED */
|
|
2744
2744
|
}) => {
|
|
2745
|
-
const [u, f] =
|
|
2745
|
+
const [u, f] = P([]), [p, h] = P(!0), [_, k] = P(c), { formatMessage: g } = F(), E = async (T) => {
|
|
2746
2746
|
T.preventDefault();
|
|
2747
2747
|
try {
|
|
2748
|
-
await i(u), f([]),
|
|
2748
|
+
await i(u), f([]), k(
|
|
2749
2749
|
"SUCCESS"
|
|
2750
2750
|
/* SUCCESS */
|
|
2751
2751
|
);
|
|
2752
2752
|
} catch (M) {
|
|
2753
|
-
|
|
2753
|
+
k(
|
|
2754
2754
|
"ERROR"
|
|
2755
2755
|
/* ERROR */
|
|
2756
2756
|
), a(M);
|
|
2757
2757
|
}
|
|
2758
|
-
},
|
|
2759
|
-
T.preventDefault(),
|
|
2758
|
+
}, v = (T) => {
|
|
2759
|
+
T.preventDefault(), k(
|
|
2760
2760
|
"NOT_SUBMITTED"
|
|
2761
2761
|
/* NOT_SUBMITTED */
|
|
2762
2762
|
), h(!0), f([]);
|
|
2763
|
-
},
|
|
2764
|
-
T.preventDefault(), m(),
|
|
2763
|
+
}, S = (T) => {
|
|
2764
|
+
T.preventDefault(), m(), k(
|
|
2765
2765
|
"CLOSED"
|
|
2766
2766
|
/* CLOSED */
|
|
2767
2767
|
);
|
|
@@ -2771,11 +2771,11 @@ const vs = ({
|
|
|
2771
2771
|
" ",
|
|
2772
2772
|
g({ id: "inviteForm_error" })
|
|
2773
2773
|
] }) }),
|
|
2774
|
-
/* @__PURE__ */ r.jsx(
|
|
2774
|
+
/* @__PURE__ */ r.jsx(Ae, {}),
|
|
2775
2775
|
/* @__PURE__ */ r.jsx("div", { className: "footer", children: _ === "SUCCESS" ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
2776
|
-
/* @__PURE__ */ r.jsx(W, { variant: "secondary", onClick:
|
|
2777
|
-
/* @__PURE__ */ r.jsx(W, { onClick:
|
|
2778
|
-
] }) : /* @__PURE__ */ r.jsx(W, { onClick:
|
|
2776
|
+
/* @__PURE__ */ r.jsx(W, { variant: "secondary", onClick: v, children: g({ id: "inviteForm_ctaSendMoreInvites" }) }),
|
|
2777
|
+
/* @__PURE__ */ r.jsx(W, { onClick: S, children: g({ id: "inviteForm_ctaDone" }) })
|
|
2778
|
+
] }) : /* @__PURE__ */ r.jsx(W, { onClick: v, children: g({ id: "inviteForm_ctaTryAgain" }) }) })
|
|
2779
2779
|
] }) : /* @__PURE__ */ r.jsxs(
|
|
2780
2780
|
"form",
|
|
2781
2781
|
{
|
|
@@ -2816,7 +2816,7 @@ const vs = ({
|
|
|
2816
2816
|
}
|
|
2817
2817
|
)
|
|
2818
2818
|
] }),
|
|
2819
|
-
/* @__PURE__ */ r.jsx(
|
|
2819
|
+
/* @__PURE__ */ r.jsx(Ae, {}),
|
|
2820
2820
|
/* @__PURE__ */ r.jsx("fieldset", { className: "footer", children: /* @__PURE__ */ r.jsx(W, { className: "sendEmailsButton", disabled: p, children: n }) })
|
|
2821
2821
|
]
|
|
2822
2822
|
}
|
|
@@ -3006,7 +3006,7 @@ const vs = ({
|
|
|
3006
3006
|
},
|
|
3007
3007
|
doTrack: l = null
|
|
3008
3008
|
}) => {
|
|
3009
|
-
const m =
|
|
3009
|
+
const m = F(), a = un(Xe, e);
|
|
3010
3010
|
if (!a || a.onlyShow && (a.onlyShow === "logged-in" && !t || a.onlyShow === "logged-out" && t))
|
|
3011
3011
|
return null;
|
|
3012
3012
|
const i = "doTrack" in a, c = l === null ? i ? a.doTrack : !0 : l, u = e.includes("buttons.");
|
|
@@ -3014,10 +3014,10 @@ const vs = ({
|
|
|
3014
3014
|
a.hasVariantText && (f += `_logged${t ? "In" : "Out"}`);
|
|
3015
3015
|
let p = !1;
|
|
3016
3016
|
if (a.href) {
|
|
3017
|
-
let
|
|
3018
|
-
if (
|
|
3019
|
-
const
|
|
3020
|
-
|
|
3017
|
+
let v = a.gtmType || `${e}-click`;
|
|
3018
|
+
if (v.includes(".")) {
|
|
3019
|
+
const S = v.split("."), T = S[S.length - 2];
|
|
3020
|
+
v = `${T === "topics" ? `${T}-` : ""}${S[S.length - 1]}`;
|
|
3021
3021
|
}
|
|
3022
3022
|
p = {
|
|
3023
3023
|
href: a.href,
|
|
@@ -3025,7 +3025,7 @@ const vs = ({
|
|
|
3025
3025
|
}, c && (p = {
|
|
3026
3026
|
...p,
|
|
3027
3027
|
className: "gtm-trackable",
|
|
3028
|
-
"data-gtm-event-type":
|
|
3028
|
+
"data-gtm-event-type": v,
|
|
3029
3029
|
"data-gtm-event-context": "HeaderButtons"
|
|
3030
3030
|
}), u && (p = {
|
|
3031
3031
|
...p,
|
|
@@ -3034,52 +3034,52 @@ const vs = ({
|
|
|
3034
3034
|
...a.props || {}
|
|
3035
3035
|
});
|
|
3036
3036
|
}
|
|
3037
|
-
const h = a.order && a.order[0] && a[a.order[0]], _ = h && a[a.order[0]].order,
|
|
3037
|
+
const h = a.order && a.order[0] && a[a.order[0]], _ = h && a[a.order[0]].order, k = p && window.location.pathname === a.href;
|
|
3038
3038
|
let g = {}, E = {};
|
|
3039
3039
|
if (h) {
|
|
3040
|
-
const
|
|
3041
|
-
onClick: (T) => I.events.onClick(T, { id:
|
|
3042
|
-
onFocus: () => I.events.onFocus({ id:
|
|
3043
|
-
onBlur: () => I.events.onBlur({ id:
|
|
3044
|
-
onMouseLeave: () => I.events.onBlur({ id:
|
|
3045
|
-
onMouseEnter: () => I.events.onMouseEnter({ id:
|
|
3040
|
+
const v = a.menuId || e, S = {
|
|
3041
|
+
onClick: (T) => I.events.onClick(T, { id: v, callback: o, isOpen: s[v] }),
|
|
3042
|
+
onFocus: () => I.events.onFocus({ id: v }),
|
|
3043
|
+
onBlur: () => I.events.onBlur({ id: v, callback: o }),
|
|
3044
|
+
onMouseLeave: () => I.events.onBlur({ id: v, callback: o }),
|
|
3045
|
+
onMouseEnter: () => I.events.onMouseEnter({ id: v, callback: o })
|
|
3046
3046
|
};
|
|
3047
3047
|
n && (_ && (g = {
|
|
3048
|
-
|
|
3048
|
+
...S,
|
|
3049
3049
|
onKeyPress: (T) => {
|
|
3050
|
-
T.key === "Enter" && I.events.onClick(T, { id:
|
|
3050
|
+
T.key === "Enter" && I.events.onClick(T, { id: v, callback: o, isOpen: s[v] });
|
|
3051
3051
|
},
|
|
3052
3052
|
tabIndex: "0",
|
|
3053
3053
|
// Add a `tabIndex` so keyboard users can focus on the `li`
|
|
3054
3054
|
"aria-haspopup": !0,
|
|
3055
|
-
"aria-expanded": s[
|
|
3056
|
-
"aria-controls":
|
|
3057
|
-
}), E = { hidden:
|
|
3055
|
+
"aria-expanded": s[v],
|
|
3056
|
+
"aria-controls": v
|
|
3057
|
+
}), E = { hidden: v in s ? !s[v] : !0 }), _ || (E = {
|
|
3058
3058
|
...E,
|
|
3059
|
-
|
|
3059
|
+
...S
|
|
3060
3060
|
});
|
|
3061
3061
|
}
|
|
3062
|
-
return /* @__PURE__ */ r.jsxs("li", { className: j({ [a.className]: a.className, "has-submenu": h, parent: _, active:
|
|
3063
|
-
p ?
|
|
3064
|
-
a.order && /* @__PURE__ */ r.jsx("ul", { ...E, children: a.order.map((
|
|
3065
|
-
if (!a[
|
|
3062
|
+
return /* @__PURE__ */ r.jsxs("li", { className: j({ [a.className]: a.className, "has-submenu": h, parent: _, active: k }), role: "none", ...g, children: [
|
|
3063
|
+
p ? N.createElement(u ? W : "a", p, m.formatMessage({ id: f })) : m.formatMessage({ id: f }),
|
|
3064
|
+
a.order && /* @__PURE__ */ r.jsx("ul", { ...E, children: a.order.map((v) => {
|
|
3065
|
+
if (!a[v])
|
|
3066
3066
|
return null;
|
|
3067
|
-
const
|
|
3067
|
+
const S = {
|
|
3068
3068
|
isLoggedIn: t,
|
|
3069
3069
|
isDesktopVersion: n,
|
|
3070
3070
|
menus: s,
|
|
3071
3071
|
callback: o,
|
|
3072
3072
|
doTrack: i ? c : null
|
|
3073
3073
|
};
|
|
3074
|
-
return a[
|
|
3075
|
-
m.formatMessage({ id: `${f}_${
|
|
3076
|
-
/* @__PURE__ */ r.jsx("ul", { children: a[
|
|
3077
|
-
] },
|
|
3074
|
+
return a[v].order ? /* @__PURE__ */ r.jsxs("li", { className: j({ [a[v].className]: a[v].className }), children: [
|
|
3075
|
+
m.formatMessage({ id: `${f}_${v}` }),
|
|
3076
|
+
/* @__PURE__ */ r.jsx("ul", { children: a[v].order.map((T) => /* @__PURE__ */ r.jsx(Ze, { id: `${e}.${v}.${T}`, ...S }, T)) })
|
|
3077
|
+
] }, v) : /* @__PURE__ */ r.jsx(Ze, { id: `${e}.${v}`, ...S }, v);
|
|
3078
3078
|
}) })
|
|
3079
3079
|
] }, e);
|
|
3080
3080
|
};
|
|
3081
3081
|
const ws = { height: 67, height_desktop: 83 }, Mn = () => {
|
|
3082
|
-
const e =
|
|
3082
|
+
const e = F(), t = ye(je), n = tt(!0, !0), s = t && typeof t.id == "string", o = qe(
|
|
3083
3083
|
() => I.getIsDesktopVersion(s, n),
|
|
3084
3084
|
[s, n]
|
|
3085
3085
|
), [l, m] = rr($r, {
|
|
@@ -3103,7 +3103,7 @@ const ws = { height: 67, height_desktop: 83 }, Mn = () => {
|
|
|
3103
3103
|
});
|
|
3104
3104
|
const u = (p, h) => {
|
|
3105
3105
|
I.handleMenus({ id: p, value: h, menus: i, dispatch: m });
|
|
3106
|
-
}, f =
|
|
3106
|
+
}, f = ee(null);
|
|
3107
3107
|
return Ce(() => {
|
|
3108
3108
|
i.navigation && I.autoFocus({
|
|
3109
3109
|
menu: "navigation",
|
|
@@ -3122,7 +3122,7 @@ const ws = { height: 67, height_desktop: 83 }, Mn = () => {
|
|
|
3122
3122
|
});
|
|
3123
3123
|
}, [i.account]), t && t.isLoading ? null : /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
3124
3124
|
/* @__PURE__ */ r.jsxs("nav", { id: "header", className: j({ "logged-in": s, "logged-out": !s, visible: a }), children: [
|
|
3125
|
-
/* @__PURE__ */ r.jsx(
|
|
3125
|
+
/* @__PURE__ */ r.jsx(re, { element: "a", href: "#content-of-page", children: e.formatMessage({ id: "header_skip" }) }),
|
|
3126
3126
|
/* @__PURE__ */ r.jsx(jn, {}),
|
|
3127
3127
|
!o.navigation && /* @__PURE__ */ r.jsx(
|
|
3128
3128
|
"button",
|
|
@@ -3136,7 +3136,7 @@ const ws = { height: 67, height_desktop: 83 }, Mn = () => {
|
|
|
3136
3136
|
"aria-haspopup": "true",
|
|
3137
3137
|
"aria-expanded": i.navigation,
|
|
3138
3138
|
"aria-controls": "navigation",
|
|
3139
|
-
children: /* @__PURE__ */ r.jsx(
|
|
3139
|
+
children: /* @__PURE__ */ r.jsx(re, { children: e.formatMessage({ id: `header_menu_${i.navigation ? "hide" : "show"}` }) })
|
|
3140
3140
|
}
|
|
3141
3141
|
),
|
|
3142
3142
|
/* @__PURE__ */ r.jsx(
|
|
@@ -3170,7 +3170,7 @@ const ws = { height: 67, height_desktop: 83 }, Mn = () => {
|
|
|
3170
3170
|
"aria-haspopup": "true",
|
|
3171
3171
|
"aria-expanded": i.search,
|
|
3172
3172
|
"aria-controls": "search-form",
|
|
3173
|
-
children: /* @__PURE__ */ r.jsx(
|
|
3173
|
+
children: /* @__PURE__ */ r.jsx(re, { children: e.formatMessage({ id: `header_search_${i.search ? "hide" : "show"}` }) })
|
|
3174
3174
|
}
|
|
3175
3175
|
),
|
|
3176
3176
|
/* @__PURE__ */ r.jsx(
|
|
@@ -3193,8 +3193,8 @@ const ws = { height: 67, height_desktop: 83 }, Mn = () => {
|
|
|
3193
3193
|
"aria-expanded": i.account,
|
|
3194
3194
|
"aria-controls": "navigation",
|
|
3195
3195
|
children: [
|
|
3196
|
-
/* @__PURE__ */ r.jsx(
|
|
3197
|
-
/* @__PURE__ */ r.jsx(
|
|
3196
|
+
/* @__PURE__ */ r.jsx(re, { children: e.formatMessage({ id: `header_account_${i.account ? "hide" : "show"}` }) }),
|
|
3197
|
+
/* @__PURE__ */ r.jsx(Pt, { name: t && t.name || "", src: t && t.image && t.image.thumbnail || "" })
|
|
3198
3198
|
]
|
|
3199
3199
|
}
|
|
3200
3200
|
) : /* @__PURE__ */ r.jsx("ul", { className: "sign-in-buttons", children: Xe.buttons.order.map((p) => /* @__PURE__ */ r.jsx(Ze, { id: `buttons.${p}` }, p)) })
|
|
@@ -3209,13 +3209,13 @@ const ws = { height: 67, height_desktop: 83 }, Mn = () => {
|
|
|
3209
3209
|
] });
|
|
3210
3210
|
};
|
|
3211
3211
|
const ks = () => {
|
|
3212
|
-
const e =
|
|
3212
|
+
const e = F();
|
|
3213
3213
|
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
3214
3214
|
/* @__PURE__ */ r.jsx(Mn, {}),
|
|
3215
|
-
/* @__PURE__ */ r.jsx("div", { id: "content", children: /* @__PURE__ */ r.jsx(
|
|
3215
|
+
/* @__PURE__ */ r.jsx("div", { id: "content", children: /* @__PURE__ */ r.jsx(st, { variant: "error", text: e.formatMessage({ id: "pageLayout_error" }) }) }),
|
|
3216
3216
|
/* @__PURE__ */ r.jsx(En, {})
|
|
3217
3217
|
] });
|
|
3218
|
-
},
|
|
3218
|
+
}, yo = ({ children: e, reportError: t, showFooter: n = !0, background: s = "default", className: o = "", locale: l = "en" }) => {
|
|
3219
3219
|
const m = jr();
|
|
3220
3220
|
z(() => {
|
|
3221
3221
|
window.scrollTo(0, 0);
|
|
@@ -3230,7 +3230,7 @@ const ks = () => {
|
|
|
3230
3230
|
}, an = {
|
|
3231
3231
|
default: "tags_",
|
|
3232
3232
|
headerTopics: "header_topics_topics_"
|
|
3233
|
-
},
|
|
3233
|
+
}, vt = {
|
|
3234
3234
|
topic: {
|
|
3235
3235
|
Climate: "climate",
|
|
3236
3236
|
CitiesAndLocalGovernment: "cities-and-local-government",
|
|
@@ -3249,16 +3249,16 @@ const ks = () => {
|
|
|
3249
3249
|
}, ys = {
|
|
3250
3250
|
getTagDetails: (e) => {
|
|
3251
3251
|
if (e.includes("topic_")) {
|
|
3252
|
-
if (e =
|
|
3252
|
+
if (e = vt.topic[e.replace("topic_", "")], e) {
|
|
3253
3253
|
const t = Xe.topics.topics[e].href;
|
|
3254
3254
|
return t ? { id: e, href: t, text: `${an.headerTopics}${e}` } : null;
|
|
3255
3255
|
}
|
|
3256
3256
|
return null;
|
|
3257
3257
|
}
|
|
3258
|
-
return
|
|
3258
|
+
return vt[e] ? (e = vt[e], { id: e, text: `${an.default}${e}` }) : null;
|
|
3259
3259
|
}
|
|
3260
3260
|
};
|
|
3261
|
-
const
|
|
3261
|
+
const jo = ({
|
|
3262
3262
|
tags: e = [],
|
|
3263
3263
|
color: t = "default",
|
|
3264
3264
|
forceOneLine: n = !1,
|
|
@@ -3267,7 +3267,7 @@ const yo = ({
|
|
|
3267
3267
|
gtmType: l = "tag-click",
|
|
3268
3268
|
gtmContext: m = "tags"
|
|
3269
3269
|
}) => {
|
|
3270
|
-
const a =
|
|
3270
|
+
const a = F();
|
|
3271
3271
|
if (!e || e.length < 1)
|
|
3272
3272
|
return null;
|
|
3273
3273
|
const i = [];
|
|
@@ -3290,21 +3290,21 @@ const yo = ({
|
|
|
3290
3290
|
) : u }, c.id);
|
|
3291
3291
|
}) });
|
|
3292
3292
|
};
|
|
3293
|
-
const
|
|
3293
|
+
const Eo = ({
|
|
3294
3294
|
members: { total: e, data: t = [] },
|
|
3295
3295
|
pagination: n,
|
|
3296
3296
|
gtmContext: s = "member",
|
|
3297
3297
|
gtmType: o = "member-click",
|
|
3298
3298
|
className: l = ""
|
|
3299
3299
|
}) => {
|
|
3300
|
-
const m =
|
|
3300
|
+
const m = F();
|
|
3301
3301
|
return t.length === 0 ? null : (e || (e = t.length), /* @__PURE__ */ r.jsxs("div", { className: j("members-list", l), children: [
|
|
3302
3302
|
/* @__PURE__ */ r.jsxs("h1", { children: [
|
|
3303
3303
|
m.formatMessage({ id: "membersList" }),
|
|
3304
3304
|
/* @__PURE__ */ r.jsx("span", { className: "count", children: e })
|
|
3305
3305
|
] }),
|
|
3306
3306
|
/* @__PURE__ */ r.jsx("ul", { children: t.map((a, i) => /* @__PURE__ */ r.jsxs("li", { children: [
|
|
3307
|
-
/* @__PURE__ */ r.jsx(
|
|
3307
|
+
/* @__PURE__ */ r.jsx(Ft, { member: a, gtmContext: s, gtmType: o }),
|
|
3308
3308
|
a.isAdmin && /* @__PURE__ */ r.jsx(qr, { children: m.formatMessage({ id: "membersList_admin" }) })
|
|
3309
3309
|
] }, i)) }),
|
|
3310
3310
|
n && /* @__PURE__ */ r.jsx(
|
|
@@ -3349,10 +3349,10 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3349
3349
|
},
|
|
3350
3350
|
gtmContext: i = "DiscussionForm"
|
|
3351
3351
|
}) => {
|
|
3352
|
-
var
|
|
3353
|
-
const c =
|
|
3352
|
+
var A, q;
|
|
3353
|
+
const c = F(), u = ye(je), [f, p] = P(
|
|
3354
3354
|
n.isEditing && n.isEditing.text || ""
|
|
3355
|
-
), [h, _] =
|
|
3355
|
+
), [h, _] = P(m.error || !1), [k, g] = P(!1), E = ee(null);
|
|
3356
3356
|
if (s || (s = E), n.isLoading)
|
|
3357
3357
|
return /* @__PURE__ */ r.jsx(
|
|
3358
3358
|
ve,
|
|
@@ -3361,85 +3361,85 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3361
3361
|
"data-testid": "loading-placeholder"
|
|
3362
3362
|
}
|
|
3363
3363
|
);
|
|
3364
|
-
const
|
|
3365
|
-
const
|
|
3366
|
-
p(
|
|
3367
|
-
let
|
|
3368
|
-
!u || !u.id ?
|
|
3364
|
+
const v = (w) => {
|
|
3365
|
+
const G = w.target.value;
|
|
3366
|
+
p(G);
|
|
3367
|
+
let L;
|
|
3368
|
+
!u || !u.id ? L = he(
|
|
3369
3369
|
c.formatMessage,
|
|
3370
3370
|
`${ae}error_loggedOut`,
|
|
3371
3371
|
e.type,
|
|
3372
3372
|
"action"
|
|
3373
|
-
) : t ?
|
|
3373
|
+
) : t ? G.length >= o && (L = `${ae}error_tooLong`) : L = he(
|
|
3374
3374
|
c.formatMessage,
|
|
3375
3375
|
`${ae}error_noPermission`,
|
|
3376
3376
|
e.type,
|
|
3377
3377
|
"action"
|
|
3378
|
-
),
|
|
3378
|
+
), L ? _(L) : h && _(!1);
|
|
3379
3379
|
};
|
|
3380
|
-
let
|
|
3380
|
+
let S = `${e.type}-form`;
|
|
3381
3381
|
if (e.type === "response" || e.type === "reply") {
|
|
3382
|
-
const
|
|
3383
|
-
|
|
3382
|
+
const w = e.type === "response" ? ((A = e.slugs) == null ? void 0 : A.question) || "" : ((q = e.slugs) == null ? void 0 : q.answer) || "";
|
|
3383
|
+
w && (S = `${S}-${w.slice(-15)}`);
|
|
3384
3384
|
}
|
|
3385
|
-
const T = async (
|
|
3386
|
-
var
|
|
3387
|
-
if (
|
|
3385
|
+
const T = async (w) => {
|
|
3386
|
+
var L;
|
|
3387
|
+
if (w.preventDefault(), w.stopPropagation(), !u || !u.id || !t || Q)
|
|
3388
3388
|
return;
|
|
3389
3389
|
Ye && clearTimeout(Ye), g("submitting");
|
|
3390
|
-
const
|
|
3390
|
+
const G = window.location.pathname;
|
|
3391
3391
|
try {
|
|
3392
|
-
let
|
|
3392
|
+
let B;
|
|
3393
3393
|
switch (e.type) {
|
|
3394
3394
|
case "post":
|
|
3395
|
-
|
|
3395
|
+
B = await a.create({ content: f });
|
|
3396
3396
|
break;
|
|
3397
3397
|
case "question":
|
|
3398
|
-
|
|
3398
|
+
B = await a.create({
|
|
3399
3399
|
title: f,
|
|
3400
3400
|
authorId: u && u.id,
|
|
3401
|
-
...(
|
|
3401
|
+
...(L = a.props) == null ? void 0 : L.create
|
|
3402
3402
|
});
|
|
3403
3403
|
break;
|
|
3404
3404
|
case "response":
|
|
3405
|
-
|
|
3405
|
+
B = await a.create(
|
|
3406
3406
|
{ question: e.slugs.question },
|
|
3407
|
-
{ body: f, authorId: u && u.id, contentPath:
|
|
3407
|
+
{ body: f, authorId: u && u.id, contentPath: G }
|
|
3408
3408
|
);
|
|
3409
3409
|
break;
|
|
3410
3410
|
case "reply":
|
|
3411
|
-
|
|
3411
|
+
B = await a.create(
|
|
3412
3412
|
{ question: e.slugs.question, answer: e.slugs.answer },
|
|
3413
|
-
{ body: f, authorId: u && u.id, contentPath:
|
|
3413
|
+
{ body: f, authorId: u && u.id, contentPath: G }
|
|
3414
3414
|
);
|
|
3415
3415
|
break;
|
|
3416
3416
|
default:
|
|
3417
3417
|
break;
|
|
3418
3418
|
}
|
|
3419
|
-
await Cr(1e3), a.callback && await a.callback(
|
|
3419
|
+
await Cr(1e3), a.callback && await a.callback(B), Ye = setTimeout(() => {
|
|
3420
3420
|
p(""), g("submitted"), M();
|
|
3421
3421
|
}, 500);
|
|
3422
|
-
} catch (
|
|
3423
|
-
const U =
|
|
3424
|
-
let
|
|
3425
|
-
U.message.includes("entry already exists") && (
|
|
3422
|
+
} catch (B) {
|
|
3423
|
+
const U = B;
|
|
3424
|
+
let Y = `${ae}error`;
|
|
3425
|
+
U.message.includes("entry already exists") && (Y = he(
|
|
3426
3426
|
c.formatMessage,
|
|
3427
3427
|
`${ae}error_alreadyExists`,
|
|
3428
3428
|
e.type,
|
|
3429
3429
|
"action"
|
|
3430
|
-
)), U.message.includes("429") ?
|
|
3430
|
+
)), U.message.includes("429") ? Y = he(
|
|
3431
3431
|
c.formatMessage,
|
|
3432
3432
|
`${ae}error_tooMany`,
|
|
3433
3433
|
e.type,
|
|
3434
3434
|
"action"
|
|
3435
|
-
) : U.message.includes("400") && (
|
|
3435
|
+
) : U.message.includes("400") && (Y = `${ae}error`), _(Y), M();
|
|
3436
3436
|
}
|
|
3437
3437
|
}, M = () => {
|
|
3438
3438
|
Ye = setTimeout(() => {
|
|
3439
3439
|
_(!1), g(!1);
|
|
3440
3440
|
}, 5e3);
|
|
3441
|
-
}, Q = !f || !Rr(f), V =
|
|
3442
|
-
return (n.isEditing && !V || m.cancel) &&
|
|
3441
|
+
}, Q = !f || !Rr(f), V = k === "submitting", b = [];
|
|
3442
|
+
return (n.isEditing && !V || m.cancel) && b.push({
|
|
3443
3443
|
variant: "secondary",
|
|
3444
3444
|
size: { mobile: "small", 600: "medium" },
|
|
3445
3445
|
onClick: a.handleCancel,
|
|
@@ -3448,17 +3448,17 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3448
3448
|
"data-gtm-event-type": `cancel-${e.type}-click`,
|
|
3449
3449
|
disabled: !m.cancel && (!u || !u.id || !f),
|
|
3450
3450
|
children: c.formatMessage({ id: `${ae}cancel` })
|
|
3451
|
-
}),
|
|
3451
|
+
}), b.push({
|
|
3452
3452
|
variant: "primary",
|
|
3453
3453
|
size: { mobile: "small", 600: "medium" },
|
|
3454
|
-
onClick: (
|
|
3454
|
+
onClick: (w) => {
|
|
3455
3455
|
if (n.isEditing) {
|
|
3456
3456
|
g("submitting"), a.handleSaveEdit && a.handleSaveEdit(
|
|
3457
3457
|
E.current && "value" in E.current ? E.current.value : ""
|
|
3458
3458
|
);
|
|
3459
3459
|
return;
|
|
3460
3460
|
}
|
|
3461
|
-
T(
|
|
3461
|
+
T(w);
|
|
3462
3462
|
},
|
|
3463
3463
|
className: "gtm-trackable",
|
|
3464
3464
|
"data-gtm-event-context": i,
|
|
@@ -3471,7 +3471,7 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3471
3471
|
}), /* @__PURE__ */ r.jsxs(
|
|
3472
3472
|
"form",
|
|
3473
3473
|
{
|
|
3474
|
-
id:
|
|
3474
|
+
id: S,
|
|
3475
3475
|
className: j("discussion-card discussion-form", {
|
|
3476
3476
|
"no-styling": n.isInWrapper && n.isEditing
|
|
3477
3477
|
}),
|
|
@@ -3479,19 +3479,19 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3479
3479
|
children: [
|
|
3480
3480
|
(n == null ? void 0 : n.showTitle) && !n.isEditing && ["question"].includes(e.type) && /* @__PURE__ */ r.jsx("h2", { children: he(c.formatMessage, `${ae}title`, e.type, "action") }),
|
|
3481
3481
|
/* @__PURE__ */ r.jsx(
|
|
3482
|
-
|
|
3482
|
+
Ft,
|
|
3483
3483
|
{
|
|
3484
3484
|
member: u || "community",
|
|
3485
3485
|
gtmContext: i,
|
|
3486
3486
|
gtmType: "profile-click"
|
|
3487
3487
|
}
|
|
3488
3488
|
),
|
|
3489
|
-
/* @__PURE__ */ r.jsx(
|
|
3489
|
+
/* @__PURE__ */ r.jsx(re, { element: "label", showOnFocus: !1, htmlFor: `${S}-input`, children: he(c.formatMessage, `${ae}label`, e.type, "action") }),
|
|
3490
3490
|
/* @__PURE__ */ r.jsx(
|
|
3491
3491
|
gr,
|
|
3492
3492
|
{
|
|
3493
3493
|
ref: s,
|
|
3494
|
-
id: `${
|
|
3494
|
+
id: `${S}-input`,
|
|
3495
3495
|
name: e.type,
|
|
3496
3496
|
placeholder: he(
|
|
3497
3497
|
c.formatMessage,
|
|
@@ -3499,7 +3499,7 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3499
3499
|
e.type,
|
|
3500
3500
|
"action"
|
|
3501
3501
|
),
|
|
3502
|
-
onChange:
|
|
3502
|
+
onChange: v,
|
|
3503
3503
|
value: f,
|
|
3504
3504
|
maxLength: o,
|
|
3505
3505
|
"aria-invalid": !!h,
|
|
@@ -3509,7 +3509,7 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3509
3509
|
}
|
|
3510
3510
|
),
|
|
3511
3511
|
/* @__PURE__ */ r.jsx("small", { children: he(c.formatMessage, `${ae}explainer`, e.type, "action", {
|
|
3512
|
-
a: (
|
|
3512
|
+
a: (w) => /* @__PURE__ */ r.jsx(
|
|
3513
3513
|
"a",
|
|
3514
3514
|
{
|
|
3515
3515
|
href: "https://about.apolitical.co/q-and-a-community-guidelines",
|
|
@@ -3518,13 +3518,13 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3518
3518
|
"data-gtm-event-context": i,
|
|
3519
3519
|
"data-gtm-event-type": "community-guidelines-link",
|
|
3520
3520
|
rel: "noreferrer",
|
|
3521
|
-
children:
|
|
3521
|
+
children: w
|
|
3522
3522
|
}
|
|
3523
3523
|
)
|
|
3524
3524
|
}) }),
|
|
3525
|
-
/* @__PURE__ */ r.jsx(
|
|
3526
|
-
|
|
3527
|
-
h && /* @__PURE__ */ r.jsx(
|
|
3525
|
+
/* @__PURE__ */ r.jsx(nt, { buttons: b }),
|
|
3526
|
+
k === "submitted" && /* @__PURE__ */ r.jsx(Mt, { className: "success", "data-testid": "success", children: he(c.formatMessage, `${ae}success`, e.type, "action") }),
|
|
3527
|
+
h && /* @__PURE__ */ r.jsx(Mt, { id: "error-message", className: "error", "data-testid": "error", children: m.error ? m.error : typeof h == "string" ? h.includes(" ") ? h : c.formatMessage(
|
|
3528
3528
|
{ id: h },
|
|
3529
3529
|
{
|
|
3530
3530
|
action: c.formatMessage({
|
|
@@ -3541,7 +3541,7 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3541
3541
|
createPost: t,
|
|
3542
3542
|
membershipRequiredToPost: { isMember: n, required: s, join: o, leave: l, notMemberStateText: m }
|
|
3543
3543
|
}) => s && !n ? /* @__PURE__ */ r.jsx(
|
|
3544
|
-
|
|
3544
|
+
st,
|
|
3545
3545
|
{
|
|
3546
3546
|
text: m,
|
|
3547
3547
|
button: {
|
|
@@ -3559,8 +3559,8 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3559
3559
|
), js = {
|
|
3560
3560
|
showThread: !1,
|
|
3561
3561
|
showForm: !1
|
|
3562
|
-
}, Nn =
|
|
3563
|
-
const [t, n] =
|
|
3562
|
+
}, Nn = At(js), So = ({ children: e }) => {
|
|
3563
|
+
const [t, n] = P({
|
|
3564
3564
|
showThread: !1,
|
|
3565
3565
|
showForm: !1
|
|
3566
3566
|
});
|
|
@@ -3574,10 +3574,10 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3574
3574
|
...t && { answerSlug: t },
|
|
3575
3575
|
...n && { replySlug: n }
|
|
3576
3576
|
}), Ss = (e, t = 10) => !e || e.length === 0 ? [] : e.slice(0, t);
|
|
3577
|
-
let
|
|
3578
|
-
const
|
|
3579
|
-
|
|
3580
|
-
},
|
|
3577
|
+
let Le = !1;
|
|
3578
|
+
const wt = () => {
|
|
3579
|
+
Le !== !1 && (clearTimeout(Le), Le = !1);
|
|
3580
|
+
}, kt = 10, $s = ({
|
|
3581
3581
|
element: e = "div",
|
|
3582
3582
|
likes: t = 0,
|
|
3583
3583
|
peopleWhoLiked: n = !1,
|
|
@@ -3589,21 +3589,21 @@ const vt = () => {
|
|
|
3589
3589
|
}, deleteLike: i = () => {
|
|
3590
3590
|
} } = {}
|
|
3591
3591
|
}) => {
|
|
3592
|
-
const c =
|
|
3592
|
+
const c = F();
|
|
3593
3593
|
z(() => {
|
|
3594
3594
|
h(o);
|
|
3595
3595
|
}, [o]);
|
|
3596
|
-
const [u, f] =
|
|
3597
|
-
if (M.preventDefault(), M.stopPropagation(), E(!1),
|
|
3598
|
-
return
|
|
3599
|
-
if (
|
|
3596
|
+
const [u, f] = P(t), [p, h] = P(o), [_, k] = P(!1), [g, E] = P(!1), v = qe(() => Ss(n, kt), [n]), S = (M) => {
|
|
3597
|
+
if (M.preventDefault(), M.stopPropagation(), E(!1), Le)
|
|
3598
|
+
return wt(), !1;
|
|
3599
|
+
if (wt(), _ || !m)
|
|
3600
3600
|
return !1;
|
|
3601
|
-
|
|
3601
|
+
Le = setTimeout(T, 350);
|
|
3602
3602
|
}, T = async () => {
|
|
3603
|
-
if (
|
|
3603
|
+
if (wt(), _ || !m)
|
|
3604
3604
|
return !1;
|
|
3605
3605
|
let M = p ? u - 1 : u + 1;
|
|
3606
|
-
M < 0 && (M = 0),
|
|
3606
|
+
M < 0 && (M = 0), k(!0), f(M), h(!p);
|
|
3607
3607
|
try {
|
|
3608
3608
|
if (l && l.slugs) {
|
|
3609
3609
|
const Q = Es(l.slugs);
|
|
@@ -3612,14 +3612,14 @@ const vt = () => {
|
|
|
3612
3612
|
} catch {
|
|
3613
3613
|
f(t), h(o);
|
|
3614
3614
|
} finally {
|
|
3615
|
-
|
|
3615
|
+
k(!1);
|
|
3616
3616
|
}
|
|
3617
3617
|
};
|
|
3618
|
-
return
|
|
3618
|
+
return N.createElement(
|
|
3619
3619
|
e,
|
|
3620
3620
|
{
|
|
3621
3621
|
className: j("likes-wrapper text-medium action-button", { "show-spinner": _, "is-liked": p, disabled: !m }),
|
|
3622
|
-
onClick:
|
|
3622
|
+
onClick: S,
|
|
3623
3623
|
onMouseEnter: () => {
|
|
3624
3624
|
E(!0);
|
|
3625
3625
|
},
|
|
@@ -3643,7 +3643,7 @@ const vt = () => {
|
|
|
3643
3643
|
screenreaderText: m ? c.formatMessage({
|
|
3644
3644
|
id: `discussion_likes_${p ? "unlike" : "like"}`
|
|
3645
3645
|
}, { action: c.formatMessage({ id: `discussion_action_${l.type}` }) }) : !1,
|
|
3646
|
-
onClick:
|
|
3646
|
+
onClick: S,
|
|
3647
3647
|
disabled: !m,
|
|
3648
3648
|
"aria-hidden": !m,
|
|
3649
3649
|
"data-testid": "like-button",
|
|
@@ -3653,14 +3653,14 @@ const vt = () => {
|
|
|
3653
3653
|
),
|
|
3654
3654
|
/* @__PURE__ */ r.jsx("span", { className: j("number-of-likes", { "no-likes": u === 0 }), "data-testid": "number-of-likes", children: c.formatMessage({ id: `discussion_likes${s ? "_short" : ""}` }, { number: u }) }),
|
|
3655
3655
|
n && /* @__PURE__ */ r.jsx(Ir, { isOpen: g, isLoading: n.length === 0, children: n.length && /* @__PURE__ */ r.jsxs("ul", { children: [
|
|
3656
|
-
|
|
3657
|
-
n.length >
|
|
3656
|
+
v.map((M) => typeof M == "string" || !M.name ? null : /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(rt, { href: M.id ? `/profiles/${M.id}` : void 0, gtmContext: "Likes", gtmType: "liked-name-click", children: M.name }) }, M.id || window.btoa(M.name))),
|
|
3657
|
+
n.length > kt && /* @__PURE__ */ r.jsx("li", { children: c.formatMessage({ id: "discussion_likes_more" }, { number: n.length - kt }) })
|
|
3658
3658
|
] }) })
|
|
3659
3659
|
] })
|
|
3660
3660
|
}
|
|
3661
3661
|
);
|
|
3662
3662
|
};
|
|
3663
|
-
const Ts = ({ element: e = "section", children: t, className: n, ...s }) =>
|
|
3663
|
+
const Ts = ({ element: e = "section", children: t, className: n, ...s }) => N.createElement(
|
|
3664
3664
|
e,
|
|
3665
3665
|
{
|
|
3666
3666
|
className: j("modal", n),
|
|
@@ -3683,11 +3683,11 @@ const Dn = ({
|
|
|
3683
3683
|
className: u = "",
|
|
3684
3684
|
gtmContext: f = "Modal"
|
|
3685
3685
|
}) => {
|
|
3686
|
-
const p =
|
|
3686
|
+
const p = F(), [h, _] = P(t), k = (E) => {
|
|
3687
3687
|
_(E), E ? (o(), document.body.classList.add("has-overlay")) : (l(), document.body.classList.remove("has-overlay"));
|
|
3688
3688
|
};
|
|
3689
3689
|
z(() => {
|
|
3690
|
-
|
|
3690
|
+
k(t);
|
|
3691
3691
|
}, [t]);
|
|
3692
3692
|
const g = s ? { "--max-width": `${s / 16}rem` } : {};
|
|
3693
3693
|
return /* @__PURE__ */ r.jsx("div", { className: j("overlay", { open: h }), children: /* @__PURE__ */ r.jsx(
|
|
@@ -3706,7 +3706,7 @@ const Dn = ({
|
|
|
3706
3706
|
variant: "tertiary",
|
|
3707
3707
|
size: "medium",
|
|
3708
3708
|
icon: { icon: "close" },
|
|
3709
|
-
onClick: () =>
|
|
3709
|
+
onClick: () => k(!1),
|
|
3710
3710
|
className: "gtm-trackable",
|
|
3711
3711
|
"data-gtm-event-type": "close-modal-click",
|
|
3712
3712
|
"data-gtm-event-context": f,
|
|
@@ -3714,13 +3714,13 @@ const Dn = ({
|
|
|
3714
3714
|
}
|
|
3715
3715
|
)
|
|
3716
3716
|
] }),
|
|
3717
|
-
n && /* @__PURE__ */ r.jsx(
|
|
3717
|
+
n && /* @__PURE__ */ r.jsx(Ae, {}),
|
|
3718
3718
|
i,
|
|
3719
3719
|
c && /* @__PURE__ */ r.jsxs("div", { className: "bottom", children: [
|
|
3720
|
-
/* @__PURE__ */ r.jsx(
|
|
3721
|
-
/* @__PURE__ */ r.jsx(
|
|
3720
|
+
/* @__PURE__ */ r.jsx(Ae, {}),
|
|
3721
|
+
/* @__PURE__ */ r.jsx(nt, { buttons: c })
|
|
3722
3722
|
] }),
|
|
3723
|
-
m && /* @__PURE__ */ r.jsx(
|
|
3723
|
+
m && /* @__PURE__ */ r.jsx(Mt, { className: "error", children: m })
|
|
3724
3724
|
] })
|
|
3725
3725
|
}
|
|
3726
3726
|
) });
|
|
@@ -3729,7 +3729,7 @@ const Dn = ({
|
|
|
3729
3729
|
"aria-expanded": t,
|
|
3730
3730
|
"aria-controls": e
|
|
3731
3731
|
});
|
|
3732
|
-
const
|
|
3732
|
+
const $o = ({
|
|
3733
3733
|
className: e,
|
|
3734
3734
|
showModal: t = !0,
|
|
3735
3735
|
title: n,
|
|
@@ -3765,18 +3765,22 @@ const So = ({
|
|
|
3765
3765
|
), ln = (e) => {
|
|
3766
3766
|
const t = {};
|
|
3767
3767
|
return Object.keys(e).forEach((n) => n.includes("Id") ? t[n] = e[n] : t[`${n}Slug`] = e[n]), t;
|
|
3768
|
-
},
|
|
3769
|
-
const xe = "discussion_",
|
|
3768
|
+
}, Rt = (e, t) => e && !t;
|
|
3769
|
+
const xe = "discussion_", Cs = 280, Ot = ({
|
|
3770
3770
|
element: e = "div",
|
|
3771
3771
|
content: t,
|
|
3772
3772
|
userHasPermissions: n = !0,
|
|
3773
3773
|
isLoading: s = !1,
|
|
3774
3774
|
originalAuthorId: o,
|
|
3775
3775
|
functions: {
|
|
3776
|
-
content: { createContent: l, deleteContent: m, updateContent: a } = {
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3776
|
+
content: { createContent: l, deleteContent: m, updateContent: a } = {
|
|
3777
|
+
createContent: () => {
|
|
3778
|
+
},
|
|
3779
|
+
deleteContent: () => {
|
|
3780
|
+
},
|
|
3781
|
+
updateContent: () => {
|
|
3782
|
+
}
|
|
3783
|
+
},
|
|
3780
3784
|
likes: { createLike: i, deleteLike: c } = { createLike: () => {
|
|
3781
3785
|
}, deleteLike: () => {
|
|
3782
3786
|
} },
|
|
@@ -3786,170 +3790,234 @@ const xe = "discussion_", Rt = ({
|
|
|
3786
3790
|
links: f = {},
|
|
3787
3791
|
className: p,
|
|
3788
3792
|
gtmContext: h = "DiscussionAnswer",
|
|
3789
|
-
children: _
|
|
3793
|
+
children: _,
|
|
3794
|
+
isTruncated: k = !1
|
|
3790
3795
|
}) => {
|
|
3791
|
-
const
|
|
3796
|
+
const g = F(), E = ye(je), v = ye(Nn), [S, T] = P({
|
|
3792
3797
|
body: t && t.body || "",
|
|
3793
3798
|
isEditing: !1,
|
|
3794
3799
|
didEdit: t && t.isEdited || !1
|
|
3795
|
-
}), [
|
|
3800
|
+
}), [M, Q] = P(!1), [V, b] = P("");
|
|
3796
3801
|
if (z(() => {
|
|
3797
|
-
|
|
3798
|
-
...
|
|
3802
|
+
T({
|
|
3803
|
+
...S,
|
|
3799
3804
|
body: t && t.body || "",
|
|
3800
3805
|
didEdit: t && t.isEdited || !1
|
|
3801
3806
|
});
|
|
3802
3807
|
}, [t.isEdited]), s || !t || t.type === "answer" && (!t.slugs || !t.slugs.question))
|
|
3803
3808
|
return /* @__PURE__ */ r.jsx(ve, { className: "discussion-card discussion-post" });
|
|
3804
|
-
const { author:
|
|
3805
|
-
R || (R = ""),
|
|
3809
|
+
const { author: A, canLike: q, createdAt: w, id: G, likes: L = 0, userLiked: B, comments: U = 0 } = t, Y = k ? Ke(S.body, Cs) : S.body, K = E && E.id && typeof A != "string" && A.id && A.id === E.id || !1, ie = typeof q == "boolean" ? q : n ? !K : !1, le = async (R) => {
|
|
3810
|
+
R || (R = ""), b("");
|
|
3806
3811
|
try {
|
|
3807
|
-
if (!_r(R,
|
|
3808
|
-
const
|
|
3809
|
-
await a(ln(t.slugs),
|
|
3812
|
+
if (!_r(R, S.body)) {
|
|
3813
|
+
const te = t.type === "question" ? { title: R } : { body: R };
|
|
3814
|
+
await a(ln(t.slugs), te);
|
|
3810
3815
|
}
|
|
3811
|
-
|
|
3816
|
+
T({ body: R, isEditing: !1, didEdit: !0 });
|
|
3812
3817
|
} catch {
|
|
3813
|
-
|
|
3818
|
+
b(`${xe}form_error`);
|
|
3814
3819
|
}
|
|
3815
|
-
},
|
|
3816
|
-
|
|
3817
|
-
const
|
|
3818
|
-
|
|
3820
|
+
}, ce = () => {
|
|
3821
|
+
v && v.updateConversation && v.updateConversation({ showThread: !0, showForm: !0 }), setTimeout(() => {
|
|
3822
|
+
const te = `reply-form-${(t.type === "answer" ? t.slug : t.slugs.answer || "").toLowerCase().slice(-15)}`, X = document.getElementById(te), ne = document.getElementById(`${te}-input`);
|
|
3823
|
+
ne && ne.focus(), X && X.scrollIntoView({ behavior: "smooth" });
|
|
3819
3824
|
}, 0);
|
|
3820
|
-
},
|
|
3825
|
+
}, ue = () => {
|
|
3821
3826
|
try {
|
|
3822
3827
|
m(ln(t.slugs));
|
|
3823
3828
|
} catch {
|
|
3824
|
-
|
|
3829
|
+
b("delete-error");
|
|
3825
3830
|
}
|
|
3826
|
-
},
|
|
3827
|
-
text: b.formatMessage({ id: `${xe}moreMenu_report` }),
|
|
3828
|
-
href: `mailto:community@apolitical.co?subject=${encodeURI(b.formatMessage({ id: `${xe}report_subject` }))}&body=${encodeURI(
|
|
3829
|
-
b.formatMessage(
|
|
3830
|
-
{ id: `${xe}report_body` },
|
|
3831
|
-
{
|
|
3832
|
-
contentType: t.type || "",
|
|
3833
|
-
contentSlug: t.slug || "",
|
|
3834
|
-
contentUrl: `${window.origin}${typeof process < "u" && process.env.PUBLIC_URL || ""}/${t.slugs.question || ""}`
|
|
3835
|
-
}
|
|
3836
|
-
)
|
|
3837
|
-
)}`,
|
|
3838
|
-
icon: "flag"
|
|
3839
|
-
}];
|
|
3840
|
-
return n && U && se.push(
|
|
3831
|
+
}, oe = [
|
|
3841
3832
|
{
|
|
3842
|
-
text:
|
|
3843
|
-
|
|
3833
|
+
text: g.formatMessage({ id: `${xe}moreMenu_report` }),
|
|
3834
|
+
href: `mailto:community@apolitical.co?subject=${encodeURI(
|
|
3835
|
+
g.formatMessage({ id: `${xe}report_subject` })
|
|
3836
|
+
)}&body=${encodeURI(
|
|
3837
|
+
g.formatMessage(
|
|
3838
|
+
{ id: `${xe}report_body` },
|
|
3839
|
+
{
|
|
3840
|
+
contentType: t.type || "",
|
|
3841
|
+
contentSlug: t.slug || "",
|
|
3842
|
+
contentUrl: `${window.origin}${typeof process < "u" && process.env.PUBLIC_URL || ""}/${t.slugs.question || ""}`
|
|
3843
|
+
}
|
|
3844
|
+
)
|
|
3845
|
+
)}`,
|
|
3846
|
+
icon: "flag"
|
|
3847
|
+
}
|
|
3848
|
+
];
|
|
3849
|
+
return n && K && oe.push(
|
|
3850
|
+
{
|
|
3851
|
+
text: g.formatMessage({ id: `${xe}moreMenu_edit` }),
|
|
3852
|
+
onClick: () => T({ ...S, isEditing: !0 }),
|
|
3844
3853
|
icon: "pencil-paper",
|
|
3845
3854
|
className: "gtm-trackable",
|
|
3846
3855
|
"data-gtm-event-context": h,
|
|
3847
3856
|
"data-gtm-event-type": `edit-${t.type}-click`
|
|
3848
3857
|
},
|
|
3849
3858
|
{
|
|
3850
|
-
text:
|
|
3859
|
+
text: g.formatMessage({ id: `${xe}moreMenu_delete` }),
|
|
3851
3860
|
onClick: (R) => {
|
|
3852
|
-
R.preventDefault(), R.stopPropagation(),
|
|
3861
|
+
R.preventDefault(), R.stopPropagation(), Q(!0);
|
|
3853
3862
|
},
|
|
3854
3863
|
icon: "trash",
|
|
3855
3864
|
className: "gtm-trackable",
|
|
3856
3865
|
"data-gtm-event-context": h,
|
|
3857
3866
|
"data-gtm-event-type": `delete-${t.type}-click`,
|
|
3858
|
-
...Ms(`delete-${t.slug}-modal`,
|
|
3867
|
+
...Ms(`delete-${t.slug}-modal`, M)
|
|
3859
3868
|
}
|
|
3860
|
-
),
|
|
3869
|
+
), N.createElement(e, {
|
|
3861
3870
|
className: j("discussion-post", p),
|
|
3862
3871
|
"data-testid": `discussion-${t.type}-thread`,
|
|
3863
3872
|
children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
3864
3873
|
/* @__PURE__ */ r.jsxs(
|
|
3865
3874
|
"div",
|
|
3866
3875
|
{
|
|
3867
|
-
id:
|
|
3868
|
-
className: j("discussion-card", t.type, {
|
|
3876
|
+
id: G || t.slug,
|
|
3877
|
+
className: j("discussion-card", t.type, {
|
|
3878
|
+
editing: S.isEditing,
|
|
3879
|
+
"has-link": f.post && !S.isEditing
|
|
3880
|
+
}),
|
|
3869
3881
|
onClick: (R) => {
|
|
3870
|
-
!f.post ||
|
|
3882
|
+
!f.post || S.isEditing || (R.preventDefault(), R.stopPropagation(), window.location.href = f.post);
|
|
3871
3883
|
},
|
|
3872
3884
|
children: [
|
|
3873
|
-
!
|
|
3874
|
-
|
|
3885
|
+
!S.isEditing && /* @__PURE__ */ r.jsx(
|
|
3886
|
+
Ft,
|
|
3875
3887
|
{
|
|
3876
|
-
member:
|
|
3877
|
-
additionalContent: { createdAt:
|
|
3878
|
-
className: typeof
|
|
3888
|
+
member: A,
|
|
3889
|
+
additionalContent: { createdAt: w, didEdit: S.didEdit },
|
|
3890
|
+
className: typeof A != "string" && A.id === o ? "highlighted" : "",
|
|
3879
3891
|
gtmContext: h,
|
|
3880
3892
|
gtmType: "profile-click"
|
|
3881
3893
|
}
|
|
3882
3894
|
),
|
|
3883
|
-
|
|
3895
|
+
S.isEditing ? /* @__PURE__ */ r.jsx(
|
|
3884
3896
|
Cn,
|
|
3885
3897
|
{
|
|
3886
3898
|
content: { type: t.type, slugs: t.slugs },
|
|
3887
3899
|
userHasPermissions: n,
|
|
3888
|
-
meta: {
|
|
3900
|
+
meta: {
|
|
3901
|
+
isLoading: s,
|
|
3902
|
+
isInWrapper: !0,
|
|
3903
|
+
isEditing: { text: S.body }
|
|
3904
|
+
},
|
|
3889
3905
|
maxLength: t.type === "question" ? 250 : 5e4,
|
|
3890
|
-
forceShow: {
|
|
3891
|
-
|
|
3892
|
-
id:
|
|
3893
|
-
|
|
3894
|
-
|
|
3906
|
+
forceShow: {
|
|
3907
|
+
error: V !== "" && V !== "delete-error" ? g.formatMessage(
|
|
3908
|
+
{ id: V },
|
|
3909
|
+
{
|
|
3910
|
+
action: g.formatMessage({
|
|
3911
|
+
id: `discussion_action_${t.type}`
|
|
3912
|
+
})
|
|
3913
|
+
}
|
|
3914
|
+
) : !1
|
|
3915
|
+
},
|
|
3895
3916
|
functions: {
|
|
3896
3917
|
create: l,
|
|
3897
|
-
handleSaveEdit:
|
|
3918
|
+
handleSaveEdit: le,
|
|
3898
3919
|
handleCancel: () => {
|
|
3899
|
-
|
|
3920
|
+
b(""), T({ ...S, isEditing: !1 });
|
|
3900
3921
|
}
|
|
3901
3922
|
},
|
|
3902
3923
|
gtmContext: `${h}Form`
|
|
3903
3924
|
}
|
|
3904
|
-
) : f.post ? /* @__PURE__ */ r.jsx(
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
}
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3925
|
+
) : f.post ? /* @__PURE__ */ r.jsx(
|
|
3926
|
+
"a",
|
|
3927
|
+
{
|
|
3928
|
+
href: f.post,
|
|
3929
|
+
className: "gtm-trackable",
|
|
3930
|
+
"data-gtm-event-context": h,
|
|
3931
|
+
"data-gtm-event-type": "title-click",
|
|
3932
|
+
children: /* @__PURE__ */ r.jsx(nn, { options: { overrides: { a: Zr } }, children: Y })
|
|
3933
|
+
}
|
|
3934
|
+
) : /* @__PURE__ */ r.jsx(
|
|
3935
|
+
nn,
|
|
3936
|
+
{
|
|
3937
|
+
options: {
|
|
3938
|
+
wrapper: t.type === "question" ? "h1" : N.Fragment,
|
|
3939
|
+
forceWrapper: t.type === "question",
|
|
3940
|
+
forceInline: t.type === "question",
|
|
3941
|
+
forceBlock: t.type !== "question"
|
|
3942
|
+
},
|
|
3943
|
+
children: Y
|
|
3944
|
+
}
|
|
3945
|
+
),
|
|
3946
|
+
!S.isEditing && /* @__PURE__ */ r.jsxs(
|
|
3947
|
+
"ul",
|
|
3948
|
+
{
|
|
3949
|
+
className: j("actions text-medium", t.type),
|
|
3950
|
+
"data-testid": `${t.type}-actions`,
|
|
3951
|
+
children: [
|
|
3952
|
+
/* @__PURE__ */ r.jsx(
|
|
3953
|
+
$s,
|
|
3954
|
+
{
|
|
3955
|
+
element: "li",
|
|
3956
|
+
likes: L,
|
|
3957
|
+
isShort: !1,
|
|
3958
|
+
userLiked: B,
|
|
3959
|
+
content: { type: t.type, slugs: t.slugs },
|
|
3960
|
+
canLike: ie,
|
|
3961
|
+
functions: {
|
|
3962
|
+
createLike: i,
|
|
3963
|
+
deleteLike: c
|
|
3964
|
+
}
|
|
3965
|
+
}
|
|
3966
|
+
),
|
|
3967
|
+
(["question", "post"].includes(t.type) || f.comments || typeof u == "function") && /* @__PURE__ */ r.jsxs(
|
|
3968
|
+
"li",
|
|
3969
|
+
{
|
|
3970
|
+
className: "action-button",
|
|
3971
|
+
onClick: (R) => {
|
|
3972
|
+
R.preventDefault(), R.stopPropagation(), f.comments && (window.location.href = f.comments), typeof u == "function" && u();
|
|
3973
|
+
},
|
|
3974
|
+
children: [
|
|
3975
|
+
/* @__PURE__ */ r.jsx(
|
|
3976
|
+
W,
|
|
3977
|
+
{
|
|
3978
|
+
variant: "tertiary",
|
|
3979
|
+
size: "medium",
|
|
3980
|
+
styling: { muted: !0 },
|
|
3981
|
+
icon: { icon: "speech-bubble_square_thick" },
|
|
3982
|
+
href: f.comments ? f.comments : !1,
|
|
3983
|
+
onClick: f.comments || typeof u != "function" ? !1 : u,
|
|
3984
|
+
className: "gtm-trackable",
|
|
3985
|
+
"data-gtm-event-context": h,
|
|
3986
|
+
"data-gtm-event-type": `answer-${t.type}-click`,
|
|
3987
|
+
screenreaderText: g.formatMessage(
|
|
3988
|
+
{ id: `${xe}comments_screenReader` },
|
|
3989
|
+
{ count: U }
|
|
3990
|
+
)
|
|
3991
|
+
}
|
|
3992
|
+
),
|
|
3993
|
+
/* @__PURE__ */ r.jsx("span", { children: g.formatMessage(
|
|
3994
|
+
{ id: `${xe}comments` },
|
|
3995
|
+
{ count: U }
|
|
3996
|
+
) })
|
|
3997
|
+
]
|
|
3998
|
+
}
|
|
3999
|
+
),
|
|
4000
|
+
(t.type === "answer" || t.type === "reply") && /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
|
|
4001
|
+
W,
|
|
4002
|
+
{
|
|
4003
|
+
variant: "tertiary",
|
|
4004
|
+
size: "medium",
|
|
4005
|
+
styling: { muted: !0 },
|
|
4006
|
+
onClick: ce,
|
|
4007
|
+
children: g.formatMessage({ id: `${xe}reply` })
|
|
4008
|
+
}
|
|
4009
|
+
) }),
|
|
4010
|
+
/* @__PURE__ */ r.jsx(
|
|
4011
|
+
ps,
|
|
4012
|
+
{
|
|
4013
|
+
element: "li",
|
|
4014
|
+
id: `more-${t.slug}`,
|
|
4015
|
+
options: oe
|
|
4016
|
+
}
|
|
4017
|
+
)
|
|
4018
|
+
]
|
|
4019
|
+
}
|
|
4020
|
+
)
|
|
3953
4021
|
]
|
|
3954
4022
|
}
|
|
3955
4023
|
),
|
|
@@ -3958,21 +4026,35 @@ const xe = "discussion_", Rt = ({
|
|
|
3958
4026
|
Dn,
|
|
3959
4027
|
{
|
|
3960
4028
|
id: `delete-${t.slug}-modal`,
|
|
3961
|
-
isOpen:
|
|
4029
|
+
isOpen: M,
|
|
3962
4030
|
functions: { onOpen: () => {
|
|
3963
|
-
}, onClose: () =>
|
|
3964
|
-
forceShow: {
|
|
3965
|
-
|
|
3966
|
-
id:
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
4031
|
+
}, onClose: () => Q(!1) },
|
|
4032
|
+
forceShow: {
|
|
4033
|
+
error: V === "delete-error" ? g.formatMessage(
|
|
4034
|
+
{ id: "discussion_delete_error" },
|
|
4035
|
+
{
|
|
4036
|
+
action: g.formatMessage({
|
|
4037
|
+
id: `discussion_action_${t.type}`
|
|
4038
|
+
})
|
|
4039
|
+
}
|
|
4040
|
+
) : !1
|
|
4041
|
+
},
|
|
4042
|
+
title: g.formatMessage(
|
|
3970
4043
|
{ id: "discussion_delete_title" },
|
|
3971
|
-
{ action:
|
|
4044
|
+
{ action: g.formatMessage({ id: `discussion_action_${t.type}` }) }
|
|
3972
4045
|
),
|
|
3973
4046
|
buttons: [
|
|
3974
|
-
{
|
|
3975
|
-
|
|
4047
|
+
{
|
|
4048
|
+
variant: "secondary",
|
|
4049
|
+
onClick: () => Q(!1),
|
|
4050
|
+
children: g.formatMessage({ id: "discussion_delete_cancel" })
|
|
4051
|
+
},
|
|
4052
|
+
{
|
|
4053
|
+
variant: "primary",
|
|
4054
|
+
className: "destructive",
|
|
4055
|
+
onClick: ue,
|
|
4056
|
+
children: g.formatMessage({ id: "discussion_delete_delete" })
|
|
4057
|
+
}
|
|
3976
4058
|
],
|
|
3977
4059
|
gtmContext: `${t.type.charAt(0).toUpperCase()}${t.type.slice(1)}:${t.slug}`,
|
|
3978
4060
|
children: /* @__PURE__ */ r.jsx(
|
|
@@ -3981,7 +4063,7 @@ const xe = "discussion_", Rt = ({
|
|
|
3981
4063
|
id: "discussion_delete_text",
|
|
3982
4064
|
values: {
|
|
3983
4065
|
p: (R) => /* @__PURE__ */ r.jsx("p", { children: R }),
|
|
3984
|
-
action:
|
|
4066
|
+
action: g.formatMessage({
|
|
3985
4067
|
id: `discussion_action_${t.type}`
|
|
3986
4068
|
})
|
|
3987
4069
|
}
|
|
@@ -3992,15 +4074,15 @@ const xe = "discussion_", Rt = ({
|
|
|
3992
4074
|
] })
|
|
3993
4075
|
});
|
|
3994
4076
|
};
|
|
3995
|
-
const
|
|
3996
|
-
const n =
|
|
4077
|
+
const yt = "discussion_responses_", To = ({ type: e = "answer", responses: t = 0 }) => {
|
|
4078
|
+
const n = F();
|
|
3997
4079
|
return /* @__PURE__ */ r.jsxs("div", { className: "responses-heading", children: [
|
|
3998
|
-
/* @__PURE__ */ r.jsx("h3", { children: n.formatMessage({ id: `${
|
|
3999
|
-
t === 0 && /* @__PURE__ */ r.jsx("p", { children: he(n.formatMessage, `${
|
|
4080
|
+
/* @__PURE__ */ r.jsx("h3", { children: n.formatMessage({ id: `${yt}title` }, { action: n.formatMessage({ id: `${yt}${e}` }), count: t }) }),
|
|
4081
|
+
t === 0 && /* @__PURE__ */ r.jsx("p", { children: he(n.formatMessage, `${yt}empty`, e, e) })
|
|
4000
4082
|
] });
|
|
4001
4083
|
};
|
|
4002
|
-
const
|
|
4003
|
-
const s =
|
|
4084
|
+
const Mo = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
4085
|
+
const s = F(), o = ee(null), [l, m] = P(e), [a, i] = P("closed");
|
|
4004
4086
|
z(() => {
|
|
4005
4087
|
const p = o.current;
|
|
4006
4088
|
if (p)
|
|
@@ -4031,7 +4113,7 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4031
4113
|
),
|
|
4032
4114
|
/* @__PURE__ */ r.jsx("ul", { ref: o, className: j("thread", a), hidden: !l, children: f })
|
|
4033
4115
|
] });
|
|
4034
|
-
},
|
|
4116
|
+
}, As = ({
|
|
4035
4117
|
user: e,
|
|
4036
4118
|
content: t,
|
|
4037
4119
|
verb: n = "post"
|
|
@@ -4052,7 +4134,7 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4052
4134
|
like: 0
|
|
4053
4135
|
},
|
|
4054
4136
|
verb: n
|
|
4055
|
-
}),
|
|
4137
|
+
}), Ns = ({
|
|
4056
4138
|
queryClient: e,
|
|
4057
4139
|
queryKey: t,
|
|
4058
4140
|
user: n,
|
|
@@ -4060,7 +4142,7 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4060
4142
|
}) => ({ mutationFn: s, onMutate: async ({ content: a }) => {
|
|
4061
4143
|
if (!n)
|
|
4062
4144
|
return;
|
|
4063
|
-
const i =
|
|
4145
|
+
const i = As({ user: n, content: a, verb: "post" });
|
|
4064
4146
|
await e.cancelQueries({ queryKey: t });
|
|
4065
4147
|
const c = e.getQueryData(t);
|
|
4066
4148
|
return e.setQueryData(t, (u) => [...u, i]), { previousActivities: c };
|
|
@@ -4068,7 +4150,7 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4068
4150
|
e.setQueryData(t, c.previousActivities);
|
|
4069
4151
|
}, onSettled: () => {
|
|
4070
4152
|
e.invalidateQueries({ queryKey: t });
|
|
4071
|
-
} }),
|
|
4153
|
+
} }), Ds = ({
|
|
4072
4154
|
queryClient: e,
|
|
4073
4155
|
queryKey: t,
|
|
4074
4156
|
mutationFn: n
|
|
@@ -4090,7 +4172,7 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4090
4172
|
onSettled: () => {
|
|
4091
4173
|
e.invalidateQueries({ queryKey: t });
|
|
4092
4174
|
}
|
|
4093
|
-
}),
|
|
4175
|
+
}), Ps = ({
|
|
4094
4176
|
queryClient: e,
|
|
4095
4177
|
queryKey: t,
|
|
4096
4178
|
mutationFn: n
|
|
@@ -4110,7 +4192,7 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4110
4192
|
e.invalidateQueries({
|
|
4111
4193
|
queryKey: [...t, c.activityId]
|
|
4112
4194
|
});
|
|
4113
|
-
} }),
|
|
4195
|
+
} }), Fs = ({
|
|
4114
4196
|
queryClient: e,
|
|
4115
4197
|
queryKey: t,
|
|
4116
4198
|
user: n,
|
|
@@ -4126,13 +4208,13 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4126
4208
|
e.setQueryData(t, u.previousActivities);
|
|
4127
4209
|
}, onSuccess: (i, { activityId: c }) => {
|
|
4128
4210
|
const u = e.getQueryData(t), f = u == null ? void 0 : u.map((p) => {
|
|
4129
|
-
var h, _,
|
|
4211
|
+
var h, _, k, g;
|
|
4130
4212
|
if (p.id === c) {
|
|
4131
|
-
const E = (
|
|
4132
|
-
(
|
|
4133
|
-
)) == null ? void 0 :
|
|
4213
|
+
const E = (k = (_ = (h = p.latest_reactions) == null ? void 0 : h.like) == null ? void 0 : _.find(
|
|
4214
|
+
(v) => v.user_id === (n == null ? void 0 : n.id)
|
|
4215
|
+
)) == null ? void 0 : k.id;
|
|
4134
4216
|
return p.latest_reactions.like = (g = p.latest_reactions.like) == null ? void 0 : g.filter(
|
|
4135
|
-
(
|
|
4217
|
+
(v) => v.id !== E
|
|
4136
4218
|
), p;
|
|
4137
4219
|
} else
|
|
4138
4220
|
return p;
|
|
@@ -4142,65 +4224,65 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4142
4224
|
e.invalidateQueries({
|
|
4143
4225
|
queryKey: [...t, u.activityId]
|
|
4144
4226
|
});
|
|
4145
|
-
} }),
|
|
4227
|
+
} }), Co = ({
|
|
4146
4228
|
basePath: e,
|
|
4147
4229
|
parentId: t,
|
|
4148
4230
|
isMember: n,
|
|
4149
4231
|
functions: { list: s, create: o, edit: l, like: m, unlike: a, join: i, leave: c }
|
|
4150
4232
|
}) => {
|
|
4151
|
-
const u =
|
|
4233
|
+
const u = F(), f = Nt(), p = ye(je), {
|
|
4152
4234
|
data: h,
|
|
4153
4235
|
error: _,
|
|
4154
|
-
isLoading:
|
|
4236
|
+
isLoading: k,
|
|
4155
4237
|
isFetching: g
|
|
4156
4238
|
} = cn({
|
|
4157
4239
|
queryKey: [e, t],
|
|
4158
4240
|
queryFn: s
|
|
4159
|
-
}), E =
|
|
4241
|
+
}), E = Ns({
|
|
4160
4242
|
queryClient: f,
|
|
4161
4243
|
queryKey: [e, t],
|
|
4162
4244
|
user: p,
|
|
4163
4245
|
mutationFn: o
|
|
4164
|
-
}), { mutate:
|
|
4246
|
+
}), { mutate: v } = fe(E), S = Ds({
|
|
4165
4247
|
queryClient: f,
|
|
4166
4248
|
queryKey: [e, t],
|
|
4167
|
-
mutationFn: async (
|
|
4249
|
+
mutationFn: async (w) => await l(w)
|
|
4168
4250
|
}), {
|
|
4169
4251
|
mutate: T
|
|
4170
|
-
} = fe(
|
|
4252
|
+
} = fe(S), M = Ps({
|
|
4171
4253
|
queryClient: f,
|
|
4172
4254
|
queryKey: [e, t],
|
|
4173
4255
|
mutationFn: m
|
|
4174
4256
|
}), {
|
|
4175
4257
|
mutate: Q
|
|
4176
|
-
} = fe(M), V =
|
|
4258
|
+
} = fe(M), V = Fs({
|
|
4177
4259
|
queryClient: f,
|
|
4178
4260
|
queryKey: [e, t],
|
|
4179
4261
|
user: p,
|
|
4180
|
-
mutationFn: async ({ activityId:
|
|
4181
|
-
var
|
|
4182
|
-
const
|
|
4183
|
-
(K) => K.id ===
|
|
4184
|
-
)),
|
|
4262
|
+
mutationFn: async ({ activityId: w }) => {
|
|
4263
|
+
var B, U, Y;
|
|
4264
|
+
const G = h && (h == null ? void 0 : h.find(
|
|
4265
|
+
(K) => K.id === w
|
|
4266
|
+
)), L = (Y = (U = (B = G == null ? void 0 : G.latest_reactions) == null ? void 0 : B.like) == null ? void 0 : U.find(
|
|
4185
4267
|
(K) => K.user_id === (p == null ? void 0 : p.id)
|
|
4186
|
-
)) == null ? void 0 :
|
|
4187
|
-
await a({ reactionId:
|
|
4268
|
+
)) == null ? void 0 : Y.id;
|
|
4269
|
+
await a({ reactionId: L || "", activityId: w });
|
|
4188
4270
|
}
|
|
4189
4271
|
}), {
|
|
4190
|
-
mutate:
|
|
4191
|
-
} = fe(V),
|
|
4192
|
-
({ activityId:
|
|
4272
|
+
mutate: b
|
|
4273
|
+
} = fe(V), A = Ee(
|
|
4274
|
+
({ activityId: w }) => Q({ activityId: w }),
|
|
4193
4275
|
[Q]
|
|
4194
4276
|
), q = Ee(
|
|
4195
|
-
({ activityId:
|
|
4196
|
-
[
|
|
4277
|
+
({ activityId: w }) => b({ activityId: w }),
|
|
4278
|
+
[b]
|
|
4197
4279
|
);
|
|
4198
|
-
return _ ? /* @__PURE__ */ r.jsx(
|
|
4280
|
+
return _ ? /* @__PURE__ */ r.jsx(st, { variant: "error", text: _.message }) : k ? /* @__PURE__ */ r.jsx(ve, { style: { height: "400px" } }) : /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
4199
4281
|
/* @__PURE__ */ r.jsx(
|
|
4200
4282
|
An,
|
|
4201
4283
|
{
|
|
4202
4284
|
contentType: "post",
|
|
4203
|
-
createPost:
|
|
4285
|
+
createPost: v,
|
|
4204
4286
|
membershipRequiredToPost: {
|
|
4205
4287
|
isMember: n,
|
|
4206
4288
|
required: !0,
|
|
@@ -4210,60 +4292,63 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4210
4292
|
}
|
|
4211
4293
|
}
|
|
4212
4294
|
),
|
|
4213
|
-
!g && Array.isArray(h) && (h == null ? void 0 : h.map((
|
|
4214
|
-
var
|
|
4215
|
-
const
|
|
4216
|
-
return /* @__PURE__ */ r.
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
type: "post",
|
|
4221
|
-
body: k == null ? void 0 : k.content,
|
|
4222
|
-
canLike: B,
|
|
4223
|
-
createdAt: (k == null ? void 0 : k.time) || "",
|
|
4224
|
-
slugs: { parentId: t, activityId: k == null ? void 0 : k.id },
|
|
4225
|
-
slug: k == null ? void 0 : k.id,
|
|
4226
|
-
author: {
|
|
4227
|
-
id: (U = k == null ? void 0 : k.actor) == null ? void 0 : U.id,
|
|
4228
|
-
name: `${(K = (G = k == null ? void 0 : k.actor) == null ? void 0 : G.data) == null ? void 0 : K.name}`,
|
|
4229
|
-
organization: (le = (ie = k == null ? void 0 : k.actor) == null ? void 0 : ie.data) == null ? void 0 : le.organization,
|
|
4230
|
-
jobTitle: (R = (se = k == null ? void 0 : k.actor) == null ? void 0 : se.data) == null ? void 0 : R.jobTitle,
|
|
4231
|
-
image: {
|
|
4232
|
-
thumbnail: ((oe = (ee = k == null ? void 0 : k.actor) == null ? void 0 : ee.data) == null ? void 0 : oe.thumbnail) || void 0
|
|
4233
|
-
}
|
|
4234
|
-
},
|
|
4235
|
-
userLiked: ((ce = k == null ? void 0 : k.own_reactions) == null ? void 0 : ce.like) && ((te = k == null ? void 0 : k.own_reactions) == null ? void 0 : te.like.length) > 0,
|
|
4236
|
-
likes: (k == null ? void 0 : k.reaction_counts.like) || 0,
|
|
4237
|
-
comments: (k == null ? void 0 : k.reaction_counts.reply) || 0
|
|
4238
|
-
},
|
|
4239
|
-
links: {
|
|
4240
|
-
post: `${e}/${t}/${k == null ? void 0 : k.id}`,
|
|
4241
|
-
comments: `${e}/${t}/${k == null ? void 0 : k.id}`
|
|
4242
|
-
},
|
|
4243
|
-
functions: {
|
|
4295
|
+
!g && Array.isArray(h) && (h == null ? void 0 : h.map((w) => {
|
|
4296
|
+
var B, U, Y, K, ie, le, ce, ue, oe, R, te, X;
|
|
4297
|
+
const G = ((B = w == null ? void 0 : w.actor) == null ? void 0 : B.id) === (p == null ? void 0 : p.id), L = Rt(n, G);
|
|
4298
|
+
return /* @__PURE__ */ r.jsxs(Et, { children: [
|
|
4299
|
+
/* @__PURE__ */ r.jsx(
|
|
4300
|
+
Ot,
|
|
4301
|
+
{
|
|
4244
4302
|
content: {
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4303
|
+
type: "post",
|
|
4304
|
+
body: w == null ? void 0 : w.content,
|
|
4305
|
+
canLike: L,
|
|
4306
|
+
createdAt: (w == null ? void 0 : w.time) || "",
|
|
4307
|
+
slugs: { parentId: t, activityId: w == null ? void 0 : w.id },
|
|
4308
|
+
slug: w == null ? void 0 : w.id,
|
|
4309
|
+
author: {
|
|
4310
|
+
id: (U = w == null ? void 0 : w.actor) == null ? void 0 : U.id,
|
|
4311
|
+
name: `${(K = (Y = w == null ? void 0 : w.actor) == null ? void 0 : Y.data) == null ? void 0 : K.name}`,
|
|
4312
|
+
organization: (le = (ie = w == null ? void 0 : w.actor) == null ? void 0 : ie.data) == null ? void 0 : le.organization,
|
|
4313
|
+
jobTitle: (ue = (ce = w == null ? void 0 : w.actor) == null ? void 0 : ce.data) == null ? void 0 : ue.jobTitle,
|
|
4314
|
+
image: {
|
|
4315
|
+
thumbnail: ((R = (oe = w == null ? void 0 : w.actor) == null ? void 0 : oe.data) == null ? void 0 : R.thumbnail) || void 0
|
|
4316
|
+
}
|
|
4317
|
+
},
|
|
4318
|
+
userLiked: ((te = w == null ? void 0 : w.own_reactions) == null ? void 0 : te.like) && ((X = w == null ? void 0 : w.own_reactions) == null ? void 0 : X.like.length) > 0,
|
|
4319
|
+
likes: (w == null ? void 0 : w.reaction_counts.like) || 0,
|
|
4320
|
+
comments: (w == null ? void 0 : w.reaction_counts.reply) || 0
|
|
4248
4321
|
},
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4322
|
+
links: {
|
|
4323
|
+
post: `${e}/${t}/${w == null ? void 0 : w.id}`,
|
|
4324
|
+
comments: `${e}/${t}/${w == null ? void 0 : w.id}`
|
|
4325
|
+
},
|
|
4326
|
+
functions: {
|
|
4327
|
+
content: {
|
|
4328
|
+
createContent: () => null,
|
|
4329
|
+
deleteContent: () => null,
|
|
4330
|
+
updateContent: (ne, me) => T({ activityInfo: ne, content: me })
|
|
4331
|
+
},
|
|
4332
|
+
likes: {
|
|
4333
|
+
createLike: () => {
|
|
4334
|
+
A({ activityId: w == null ? void 0 : w.id });
|
|
4335
|
+
},
|
|
4336
|
+
deleteLike: () => {
|
|
4337
|
+
q({ activityId: w == null ? void 0 : w.id });
|
|
4338
|
+
}
|
|
4252
4339
|
},
|
|
4253
|
-
|
|
4254
|
-
|
|
4340
|
+
comments: {
|
|
4341
|
+
openComments: () => null
|
|
4255
4342
|
}
|
|
4256
4343
|
},
|
|
4257
|
-
|
|
4258
|
-
openComments: () => null
|
|
4259
|
-
}
|
|
4344
|
+
isTruncated: !0
|
|
4260
4345
|
}
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
);
|
|
4346
|
+
),
|
|
4347
|
+
/* @__PURE__ */ r.jsx(Ae, {})
|
|
4348
|
+
] }, w == null ? void 0 : w.id);
|
|
4264
4349
|
}))
|
|
4265
4350
|
] });
|
|
4266
|
-
},
|
|
4351
|
+
}, Rs = ({
|
|
4267
4352
|
queryClient: e,
|
|
4268
4353
|
queryKey: t,
|
|
4269
4354
|
mutationFn: n
|
|
@@ -4282,7 +4367,7 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4282
4367
|
})), { previousActivity: i };
|
|
4283
4368
|
}, onSettled: () => {
|
|
4284
4369
|
e.invalidateQueries({ queryKey: t });
|
|
4285
|
-
} }),
|
|
4370
|
+
} }), Os = ({
|
|
4286
4371
|
queryClient: e,
|
|
4287
4372
|
queryKey: t,
|
|
4288
4373
|
mutationFn: n
|
|
@@ -4308,7 +4393,7 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4308
4393
|
onError: (l, m, a) => {
|
|
4309
4394
|
e.setQueryData(t, a.previousActivity);
|
|
4310
4395
|
}
|
|
4311
|
-
}),
|
|
4396
|
+
}), Ls = ({
|
|
4312
4397
|
queryClient: e,
|
|
4313
4398
|
queryKey: t,
|
|
4314
4399
|
mutationFn: n
|
|
@@ -4332,7 +4417,7 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4332
4417
|
...a,
|
|
4333
4418
|
latest_reactions: { reply: i }
|
|
4334
4419
|
})), { previousActivity: a };
|
|
4335
|
-
} }),
|
|
4420
|
+
} }), Bs = ({
|
|
4336
4421
|
queryClient: e,
|
|
4337
4422
|
queryKey: t,
|
|
4338
4423
|
user: n,
|
|
@@ -4358,14 +4443,14 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4358
4443
|
const u = (f = c.latest_reactions.reply) == null ? void 0 : f.map((p) => {
|
|
4359
4444
|
var h;
|
|
4360
4445
|
return p.id === i ? (h = p.latest_children.reply) == null ? void 0 : h.filter(
|
|
4361
|
-
(
|
|
4446
|
+
(k) => k.user_id !== (n == null ? void 0 : n.id)
|
|
4362
4447
|
) : p;
|
|
4363
4448
|
});
|
|
4364
4449
|
return e.setQueryData(t, () => ({
|
|
4365
4450
|
...c,
|
|
4366
4451
|
latest_reactions: { reply: u }
|
|
4367
4452
|
})), { previousActivity: c };
|
|
4368
|
-
} }),
|
|
4453
|
+
} }), Is = ({
|
|
4369
4454
|
basePath: e,
|
|
4370
4455
|
parentId: t,
|
|
4371
4456
|
activityId: n,
|
|
@@ -4373,23 +4458,23 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4373
4458
|
isMember: o,
|
|
4374
4459
|
functions: { createReply: l, editReply: m, like: a, unlike: i, join: c, leave: u }
|
|
4375
4460
|
}) => {
|
|
4376
|
-
const f =
|
|
4461
|
+
const f = F(), p = Nt(), h = ye(je), _ = Rs({
|
|
4377
4462
|
queryClient: p,
|
|
4378
4463
|
queryKey: [e, t, n],
|
|
4379
4464
|
mutationFn: l
|
|
4380
|
-
}), { mutate:
|
|
4465
|
+
}), { mutate: k } = fe(_), g = Os({
|
|
4381
4466
|
queryClient: p,
|
|
4382
4467
|
queryKey: [e, t, n],
|
|
4383
|
-
mutationFn: async (
|
|
4468
|
+
mutationFn: async (b) => m(b)
|
|
4384
4469
|
}), {
|
|
4385
4470
|
mutate: E
|
|
4386
|
-
} = fe(g),
|
|
4471
|
+
} = fe(g), v = Ls({
|
|
4387
4472
|
queryClient: p,
|
|
4388
4473
|
queryKey: [e, t, n],
|
|
4389
4474
|
mutationFn: a
|
|
4390
4475
|
}), {
|
|
4391
|
-
mutate:
|
|
4392
|
-
} = fe(
|
|
4476
|
+
mutate: S
|
|
4477
|
+
} = fe(v), T = Bs({
|
|
4393
4478
|
queryClient: p,
|
|
4394
4479
|
queryKey: [e, t, n],
|
|
4395
4480
|
user: h,
|
|
@@ -4397,10 +4482,10 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4397
4482
|
}), {
|
|
4398
4483
|
mutate: M
|
|
4399
4484
|
} = fe(T), Q = Ee(
|
|
4400
|
-
({ replyId:
|
|
4401
|
-
[
|
|
4485
|
+
({ replyId: b }) => S({ replyId: b }),
|
|
4486
|
+
[S]
|
|
4402
4487
|
), V = Ee(
|
|
4403
|
-
({ replyId:
|
|
4488
|
+
({ replyId: b }) => M({ replyId: b }),
|
|
4404
4489
|
[M]
|
|
4405
4490
|
);
|
|
4406
4491
|
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
@@ -4408,7 +4493,7 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4408
4493
|
An,
|
|
4409
4494
|
{
|
|
4410
4495
|
contentType: "post",
|
|
4411
|
-
createPost:
|
|
4496
|
+
createPost: k,
|
|
4412
4497
|
membershipRequiredToPost: {
|
|
4413
4498
|
isMember: o,
|
|
4414
4499
|
required: !0,
|
|
@@ -4418,37 +4503,37 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4418
4503
|
}
|
|
4419
4504
|
}
|
|
4420
4505
|
),
|
|
4421
|
-
(s == null ? void 0 : s.length) === 0 || (s == null ? void 0 : s.map((
|
|
4422
|
-
var
|
|
4423
|
-
const
|
|
4506
|
+
(s == null ? void 0 : s.length) === 0 || (s == null ? void 0 : s.map((b) => {
|
|
4507
|
+
var G, L, B, U, Y, K, ie, le, ce, ue, oe, R, te, X, ne, me, pe;
|
|
4508
|
+
const A = ((G = b == null ? void 0 : b.latest_children) == null ? void 0 : G.like) && ((L = b == null ? void 0 : b.latest_children) == null ? void 0 : L.like.filter(
|
|
4424
4509
|
(ge) => ge.user_id === (h == null ? void 0 : h.id)
|
|
4425
|
-
)), q = ((
|
|
4510
|
+
)), q = ((B = b == null ? void 0 : b.user) == null ? void 0 : B.id) === (h == null ? void 0 : h.id), w = Rt(o, q);
|
|
4426
4511
|
return /* @__PURE__ */ r.jsx(
|
|
4427
|
-
|
|
4512
|
+
Ot,
|
|
4428
4513
|
{
|
|
4429
4514
|
content: {
|
|
4430
4515
|
type: "post",
|
|
4431
|
-
body: typeof
|
|
4432
|
-
canLike:
|
|
4433
|
-
createdAt:
|
|
4516
|
+
body: typeof b.data.content == "string" ? (U = b == null ? void 0 : b.data) == null ? void 0 : U.content : ((K = (Y = b == null ? void 0 : b.data) == null ? void 0 : Y.content) == null ? void 0 : K.text) || "",
|
|
4517
|
+
canLike: w,
|
|
4518
|
+
createdAt: b == null ? void 0 : b.created_at,
|
|
4434
4519
|
slugs: {
|
|
4435
4520
|
question: `${e}/${t}/${n}`,
|
|
4436
4521
|
parentId: t,
|
|
4437
|
-
reply:
|
|
4522
|
+
reply: b == null ? void 0 : b.id
|
|
4438
4523
|
},
|
|
4439
|
-
slug: `${e}/${t}/${n}#${
|
|
4524
|
+
slug: `${e}/${t}/${n}#${b == null ? void 0 : b.id}`,
|
|
4440
4525
|
author: {
|
|
4441
|
-
id: (ie =
|
|
4442
|
-
name: (
|
|
4443
|
-
organization: (
|
|
4444
|
-
jobTitle: (
|
|
4526
|
+
id: (ie = b == null ? void 0 : b.user) == null ? void 0 : ie.id,
|
|
4527
|
+
name: (ce = (le = b == null ? void 0 : b.user) == null ? void 0 : le.data) == null ? void 0 : ce.name,
|
|
4528
|
+
organization: (oe = (ue = b == null ? void 0 : b.user) == null ? void 0 : ue.data) == null ? void 0 : oe.organization,
|
|
4529
|
+
jobTitle: (te = (R = b == null ? void 0 : b.user) == null ? void 0 : R.data) == null ? void 0 : te.jobTitle,
|
|
4445
4530
|
image: {
|
|
4446
|
-
thumbnail: ((
|
|
4531
|
+
thumbnail: ((ne = (X = b == null ? void 0 : b.user) == null ? void 0 : X.data) == null ? void 0 : ne.thumbnail) || void 0
|
|
4447
4532
|
}
|
|
4448
4533
|
},
|
|
4449
|
-
userLiked: !!(
|
|
4450
|
-
likes: ((me =
|
|
4451
|
-
comments: ((pe =
|
|
4534
|
+
userLiked: !!(A != null && A.length),
|
|
4535
|
+
likes: ((me = b == null ? void 0 : b.children_counts) == null ? void 0 : me.like) || 0,
|
|
4536
|
+
comments: ((pe = b == null ? void 0 : b.children_counts) == null ? void 0 : pe.reply) || 0
|
|
4452
4537
|
},
|
|
4453
4538
|
functions: {
|
|
4454
4539
|
content: {
|
|
@@ -4457,8 +4542,8 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4457
4542
|
updateContent: (ge, Se) => E({ replyInfo: ge, content: Se })
|
|
4458
4543
|
},
|
|
4459
4544
|
likes: {
|
|
4460
|
-
createLike: () => Q({ replyId:
|
|
4461
|
-
deleteLike: () => V({ replyId:
|
|
4545
|
+
createLike: () => Q({ replyId: b == null ? void 0 : b.id }),
|
|
4546
|
+
deleteLike: () => V({ replyId: b == null ? void 0 : b.id })
|
|
4462
4547
|
},
|
|
4463
4548
|
comments: {
|
|
4464
4549
|
openComments: () => {
|
|
@@ -4466,11 +4551,11 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4466
4551
|
}
|
|
4467
4552
|
}
|
|
4468
4553
|
},
|
|
4469
|
-
|
|
4554
|
+
b == null ? void 0 : b.id
|
|
4470
4555
|
);
|
|
4471
4556
|
}))
|
|
4472
4557
|
] });
|
|
4473
|
-
},
|
|
4558
|
+
}, Hs = ({
|
|
4474
4559
|
queryClient: e,
|
|
4475
4560
|
queryKey: t,
|
|
4476
4561
|
mutationFn: n
|
|
@@ -4494,7 +4579,7 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4494
4579
|
onSettled: () => {
|
|
4495
4580
|
e.invalidateQueries({ queryKey: t });
|
|
4496
4581
|
}
|
|
4497
|
-
}),
|
|
4582
|
+
}), Qs = ({
|
|
4498
4583
|
queryClient: e,
|
|
4499
4584
|
queryKey: t,
|
|
4500
4585
|
mutationFn: n
|
|
@@ -4514,7 +4599,7 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4514
4599
|
})), { previousActivity: i };
|
|
4515
4600
|
}, onSettled: () => {
|
|
4516
4601
|
e.invalidateQueries({ queryKey: t });
|
|
4517
|
-
} }),
|
|
4602
|
+
} }), Us = ({
|
|
4518
4603
|
queryClient: e,
|
|
4519
4604
|
queryKey: t,
|
|
4520
4605
|
user: n,
|
|
@@ -4544,7 +4629,7 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4544
4629
|
})), { previousActivity: u };
|
|
4545
4630
|
}, onSettled: () => {
|
|
4546
4631
|
e.invalidateQueries({ queryKey: t });
|
|
4547
|
-
} }),
|
|
4632
|
+
} }), Ao = ({
|
|
4548
4633
|
basePath: e,
|
|
4549
4634
|
parentId: t,
|
|
4550
4635
|
activityId: n,
|
|
@@ -4562,60 +4647,60 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4562
4647
|
leave: h
|
|
4563
4648
|
}
|
|
4564
4649
|
}) => {
|
|
4565
|
-
var
|
|
4566
|
-
const _ = ye(je),
|
|
4650
|
+
var B, U, Y, K, ie, le, ce, ue, oe, R, te;
|
|
4651
|
+
const _ = ye(je), k = Nt(), {
|
|
4567
4652
|
data: g,
|
|
4568
4653
|
error: E,
|
|
4569
|
-
isLoading:
|
|
4570
|
-
isFetching:
|
|
4654
|
+
isLoading: v,
|
|
4655
|
+
isFetching: S
|
|
4571
4656
|
} = cn({
|
|
4572
4657
|
queryKey: [e, t, n],
|
|
4573
4658
|
queryFn: o
|
|
4574
|
-
}), T =
|
|
4575
|
-
queryClient:
|
|
4659
|
+
}), T = Hs({
|
|
4660
|
+
queryClient: k,
|
|
4576
4661
|
queryKey: [e, t, n],
|
|
4577
|
-
mutationFn: async (
|
|
4662
|
+
mutationFn: async (X) => await l(X)
|
|
4578
4663
|
}), {
|
|
4579
4664
|
mutate: M
|
|
4580
|
-
} = fe(T), Q =
|
|
4581
|
-
queryClient:
|
|
4665
|
+
} = fe(T), Q = Qs({
|
|
4666
|
+
queryClient: k,
|
|
4582
4667
|
queryKey: [e, t, n],
|
|
4583
4668
|
mutationFn: m
|
|
4584
4669
|
}), {
|
|
4585
4670
|
mutate: V
|
|
4586
|
-
} = fe(Q),
|
|
4587
|
-
queryClient:
|
|
4671
|
+
} = fe(Q), b = Us({
|
|
4672
|
+
queryClient: k,
|
|
4588
4673
|
queryKey: [e, t, n],
|
|
4589
4674
|
user: _,
|
|
4590
4675
|
mutationFn: async () => {
|
|
4591
|
-
var
|
|
4592
|
-
const
|
|
4676
|
+
var ne, me, pe;
|
|
4677
|
+
const X = (pe = (me = (ne = g == null ? void 0 : g.latest_reactions) == null ? void 0 : ne.like) == null ? void 0 : me.find(
|
|
4593
4678
|
(ge) => ge.user_id === (_ == null ? void 0 : _.id)
|
|
4594
4679
|
)) == null ? void 0 : pe.id;
|
|
4595
|
-
await a({ activityId: n, reactionId:
|
|
4680
|
+
await a({ activityId: n, reactionId: X });
|
|
4596
4681
|
},
|
|
4597
4682
|
activity: g
|
|
4598
4683
|
}), {
|
|
4599
|
-
mutate:
|
|
4600
|
-
} = fe(
|
|
4601
|
-
({ activityId:
|
|
4684
|
+
mutate: A
|
|
4685
|
+
} = fe(b), q = Ee(
|
|
4686
|
+
({ activityId: X }) => V({ activityId: X }),
|
|
4602
4687
|
[V]
|
|
4603
|
-
),
|
|
4604
|
-
async ({ activityId:
|
|
4605
|
-
[
|
|
4688
|
+
), w = Ee(
|
|
4689
|
+
async ({ activityId: X }) => A({ activityId: X }),
|
|
4690
|
+
[A]
|
|
4606
4691
|
);
|
|
4607
4692
|
if (E)
|
|
4608
|
-
return /* @__PURE__ */ r.jsx(
|
|
4609
|
-
if (
|
|
4693
|
+
return /* @__PURE__ */ r.jsx(st, { variant: "error", text: E.message });
|
|
4694
|
+
if (v || S)
|
|
4610
4695
|
return /* @__PURE__ */ r.jsx(ve, { style: { height: "400px" } });
|
|
4611
|
-
const
|
|
4696
|
+
const G = ((B = g == null ? void 0 : g.actor) == null ? void 0 : B.id) === (_ == null ? void 0 : _.id), L = Rt(s, G);
|
|
4612
4697
|
return /* @__PURE__ */ r.jsx(
|
|
4613
|
-
|
|
4698
|
+
Ot,
|
|
4614
4699
|
{
|
|
4615
4700
|
content: {
|
|
4616
4701
|
type: "post",
|
|
4617
4702
|
body: g == null ? void 0 : g.content,
|
|
4618
|
-
canLike:
|
|
4703
|
+
canLike: L,
|
|
4619
4704
|
createdAt: (g == null ? void 0 : g.time) || "",
|
|
4620
4705
|
slugs: {
|
|
4621
4706
|
question: `${t}/${n}`,
|
|
@@ -4625,27 +4710,27 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4625
4710
|
slug: n,
|
|
4626
4711
|
author: {
|
|
4627
4712
|
id: (U = g == null ? void 0 : g.actor) == null ? void 0 : U.id,
|
|
4628
|
-
name: (
|
|
4713
|
+
name: (Y = g == null ? void 0 : g.actor) == null ? void 0 : Y.data.name,
|
|
4629
4714
|
organization: (K = g == null ? void 0 : g.actor) == null ? void 0 : K.data.organization,
|
|
4630
4715
|
jobTitle: (ie = g == null ? void 0 : g.actor) == null ? void 0 : ie.data.jobTitle,
|
|
4631
4716
|
image: {
|
|
4632
4717
|
thumbnail: ((le = g == null ? void 0 : g.actor) == null ? void 0 : le.data.thumbnail) || void 0
|
|
4633
4718
|
}
|
|
4634
4719
|
},
|
|
4635
|
-
userLiked: ((
|
|
4720
|
+
userLiked: ((ce = g == null ? void 0 : g.own_reactions) == null ? void 0 : ce.like) && ((ue = g == null ? void 0 : g.own_reactions) == null ? void 0 : ue.like.length) > 0,
|
|
4636
4721
|
likes: g && (g == null ? void 0 : g.reaction_counts.like),
|
|
4637
4722
|
comments: g && (g == null ? void 0 : g.reaction_counts.reply)
|
|
4638
4723
|
},
|
|
4639
|
-
originalAuthorId: (
|
|
4724
|
+
originalAuthorId: (oe = g == null ? void 0 : g.actor) == null ? void 0 : oe.id,
|
|
4640
4725
|
functions: {
|
|
4641
4726
|
content: {
|
|
4642
4727
|
createContent: () => console.log("create"),
|
|
4643
4728
|
deleteContent: () => console.log("delete"),
|
|
4644
|
-
updateContent: (
|
|
4729
|
+
updateContent: (X, ne) => M({ activityInfo: X, content: ne })
|
|
4645
4730
|
},
|
|
4646
4731
|
likes: {
|
|
4647
4732
|
createLike: () => q({ activityId: n }),
|
|
4648
|
-
deleteLike: () =>
|
|
4733
|
+
deleteLike: () => w({ activityId: n })
|
|
4649
4734
|
},
|
|
4650
4735
|
comments: {
|
|
4651
4736
|
openComments: () => {
|
|
@@ -4655,16 +4740,16 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4655
4740
|
children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
4656
4741
|
/* @__PURE__ */ r.jsxs("h3", { children: [
|
|
4657
4742
|
"Comments (",
|
|
4658
|
-
((
|
|
4743
|
+
((R = g == null ? void 0 : g.reaction_counts) == null ? void 0 : R.reply) || 0,
|
|
4659
4744
|
")"
|
|
4660
4745
|
] }),
|
|
4661
4746
|
/* @__PURE__ */ r.jsx(
|
|
4662
|
-
|
|
4747
|
+
Is,
|
|
4663
4748
|
{
|
|
4664
4749
|
basePath: e,
|
|
4665
4750
|
parentId: t,
|
|
4666
4751
|
activityId: n,
|
|
4667
|
-
repliesList: (
|
|
4752
|
+
repliesList: (te = g == null ? void 0 : g.latest_reactions) == null ? void 0 : te.reply,
|
|
4668
4753
|
isMember: s,
|
|
4669
4754
|
functions: {
|
|
4670
4755
|
createReply: i,
|
|
@@ -4680,7 +4765,7 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4680
4765
|
},
|
|
4681
4766
|
n
|
|
4682
4767
|
);
|
|
4683
|
-
},
|
|
4768
|
+
}, No = ({ id: e, data: { jobTitle: t, name: n, organization: s, thumbnail: o } }) => ({
|
|
4684
4769
|
id: e,
|
|
4685
4770
|
name: n,
|
|
4686
4771
|
jobTitle: t,
|
|
@@ -4688,85 +4773,85 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4688
4773
|
image: { thumbnail: o }
|
|
4689
4774
|
});
|
|
4690
4775
|
export {
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4776
|
+
$t as ASSETS_BUCKET,
|
|
4777
|
+
Co as ActivitiesFeed,
|
|
4778
|
+
Ao as ActivitySection,
|
|
4694
4779
|
An as AddPost,
|
|
4695
|
-
|
|
4696
|
-
|
|
4780
|
+
lo as BannerSection,
|
|
4781
|
+
go as Breadcrumbs,
|
|
4697
4782
|
W as Button,
|
|
4698
|
-
|
|
4783
|
+
nt as ButtonWrapper,
|
|
4699
4784
|
as as CacheProvider,
|
|
4700
4785
|
xn as CollapsibleSection,
|
|
4701
|
-
|
|
4702
|
-
|
|
4786
|
+
bo as Columns,
|
|
4787
|
+
ho as CommunityDetails,
|
|
4703
4788
|
os as Contributors,
|
|
4704
4789
|
Nn as ConversationContext,
|
|
4705
4790
|
gs as CookieBanner,
|
|
4706
|
-
|
|
4791
|
+
So as DiscussionConversation,
|
|
4707
4792
|
Cn as DiscussionForm,
|
|
4708
4793
|
$s as DiscussionLikes,
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4794
|
+
Ot as DiscussionPost,
|
|
4795
|
+
Mo as DiscussionThread,
|
|
4796
|
+
Ae as Divider,
|
|
4797
|
+
ao as DownloadSection,
|
|
4798
|
+
Oe as EMAILS,
|
|
4799
|
+
vo as EmailHelperTextBox,
|
|
4800
|
+
st as EmptyStateBox,
|
|
4801
|
+
_o as Filters,
|
|
4717
4802
|
cs as FlagsProvider,
|
|
4718
4803
|
En as Footer,
|
|
4719
4804
|
_n as FullWidthSection,
|
|
4720
|
-
|
|
4805
|
+
po as GlobalProviders,
|
|
4721
4806
|
Mn as Header,
|
|
4722
4807
|
Ur as HelperTextBox,
|
|
4723
4808
|
mn as HiddenFromScreenReaders,
|
|
4724
|
-
|
|
4809
|
+
mo as HideShowTextBox,
|
|
4725
4810
|
ke as HighlightedTextBox,
|
|
4726
4811
|
us as IntlProvider,
|
|
4727
4812
|
vs as InviteForm,
|
|
4728
|
-
|
|
4813
|
+
$o as InviteModal,
|
|
4729
4814
|
yn as JoinButton,
|
|
4730
|
-
|
|
4731
|
-
|
|
4815
|
+
xo as LanguageSwitcher,
|
|
4816
|
+
rt as Link,
|
|
4732
4817
|
fs as LoadMore,
|
|
4733
|
-
|
|
4818
|
+
fo as LoadingBlock,
|
|
4734
4819
|
ve as LoadingPlaceholder,
|
|
4735
4820
|
ns as LoadingState,
|
|
4736
4821
|
jn as Logo,
|
|
4737
|
-
|
|
4822
|
+
io as LogoSection,
|
|
4738
4823
|
nn as MarkdownText,
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4824
|
+
co as MarketingBox,
|
|
4825
|
+
Ft as Member,
|
|
4826
|
+
Eo as MembersList,
|
|
4742
4827
|
Ts as Modal,
|
|
4743
4828
|
ps as MoreMenu,
|
|
4744
|
-
|
|
4829
|
+
uo as NUMBER_OF_USERS,
|
|
4745
4830
|
Dn as Overlay,
|
|
4746
|
-
|
|
4747
|
-
|
|
4831
|
+
yo as PageLayout,
|
|
4832
|
+
wo as PasswordRules,
|
|
4748
4833
|
qr as Pill,
|
|
4749
|
-
|
|
4834
|
+
Pt as ProfilePicture,
|
|
4750
4835
|
es as ProgressBar,
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4836
|
+
ko as Rating,
|
|
4837
|
+
Is as RepliesFeed,
|
|
4838
|
+
To as ResponsesHeading,
|
|
4754
4839
|
Br as ResponsiveImage,
|
|
4755
4840
|
bs as SearchForm,
|
|
4756
4841
|
Zr as Span,
|
|
4757
|
-
|
|
4758
|
-
|
|
4842
|
+
Mt as StatusBanner,
|
|
4843
|
+
jo as Tags,
|
|
4759
4844
|
Ir as Tooltip,
|
|
4760
4845
|
je as UserContext,
|
|
4761
4846
|
ds as UserProvider,
|
|
4762
|
-
|
|
4847
|
+
re as VisuallyHidden,
|
|
4763
4848
|
Ms as addAriaProps,
|
|
4764
4849
|
kn as getMember,
|
|
4765
4850
|
Xe as headerData,
|
|
4766
|
-
|
|
4851
|
+
No as mapGetStreamData,
|
|
4767
4852
|
jr as useCurrentPath,
|
|
4768
4853
|
Ce as useEffectAfterMount,
|
|
4769
|
-
|
|
4854
|
+
tt as useScreenWidth,
|
|
4770
4855
|
Sr as useScrollListener,
|
|
4771
|
-
|
|
4856
|
+
oo as useScrollToHash
|
|
4772
4857
|
};
|