@apolitical/component-library 3.5.8 → 3.5.9
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/index.mjs
CHANGED
|
@@ -130,15 +130,15 @@ var ot = {};
|
|
|
130
130
|
var wr;
|
|
131
131
|
function Is() {
|
|
132
132
|
return wr || (wr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
133
|
-
var t = Y, e = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), c = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), g = Symbol.iterator,
|
|
134
|
-
function
|
|
133
|
+
var t = Y, e = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), c = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), g = Symbol.iterator, v = "@@iterator";
|
|
134
|
+
function b(h) {
|
|
135
135
|
if (h === null || typeof h != "object")
|
|
136
136
|
return null;
|
|
137
|
-
var M = g && h[g] || h[
|
|
137
|
+
var M = g && h[g] || h[v];
|
|
138
138
|
return typeof M == "function" ? M : null;
|
|
139
139
|
}
|
|
140
|
-
var
|
|
141
|
-
function
|
|
140
|
+
var _ = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
141
|
+
function x(h) {
|
|
142
142
|
{
|
|
143
143
|
for (var M = arguments.length, I = new Array(M > 1 ? M - 1 : 0), ne = 1; ne < M; ne++)
|
|
144
144
|
I[ne - 1] = arguments[ne];
|
|
@@ -147,7 +147,7 @@ function Is() {
|
|
|
147
147
|
}
|
|
148
148
|
function E(h, M, I) {
|
|
149
149
|
{
|
|
150
|
-
var ne =
|
|
150
|
+
var ne = _.ReactDebugCurrentFrame, le = ne.getStackAddendum();
|
|
151
151
|
le !== "" && (M += "%s", I = I.concat([le]));
|
|
152
152
|
var me = I.map(function(ce) {
|
|
153
153
|
return String(ce);
|
|
@@ -155,10 +155,10 @@ function Is() {
|
|
|
155
155
|
me.unshift("Warning: " + M), Function.prototype.apply.call(console[h], console, me);
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
-
var
|
|
158
|
+
var w = !1, y = !1, F = !1, R = !1, Q = !1, B;
|
|
159
159
|
B = Symbol.for("react.module.reference");
|
|
160
160
|
function $(h) {
|
|
161
|
-
return !!(typeof h == "string" || typeof h == "function" || h === r || h === i || Q || h === s || h === l || h === u || R || h === p ||
|
|
161
|
+
return !!(typeof h == "string" || typeof h == "function" || h === r || h === i || Q || h === s || h === l || h === u || R || h === p || w || y || F || typeof h == "object" && h !== null && (h.$$typeof === m || h.$$typeof === f || h.$$typeof === o || h.$$typeof === c || h.$$typeof === d || // This needs to include all possible module reference object
|
|
162
162
|
// types supported by any Flight configuration anywhere since
|
|
163
163
|
// we don't know which Flight build this will end up being used
|
|
164
164
|
// with.
|
|
@@ -171,13 +171,13 @@ function Is() {
|
|
|
171
171
|
var le = M.displayName || M.name || "";
|
|
172
172
|
return le !== "" ? I + "(" + le + ")" : I;
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function k(h) {
|
|
175
175
|
return h.displayName || "Context";
|
|
176
176
|
}
|
|
177
|
-
function
|
|
177
|
+
function j(h) {
|
|
178
178
|
if (h == null)
|
|
179
179
|
return null;
|
|
180
|
-
if (typeof h.tag == "number" &&
|
|
180
|
+
if (typeof h.tag == "number" && x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof h == "function")
|
|
181
181
|
return h.displayName || h.name || null;
|
|
182
182
|
if (typeof h == "string")
|
|
183
183
|
return h;
|
|
@@ -199,19 +199,19 @@ function Is() {
|
|
|
199
199
|
switch (h.$$typeof) {
|
|
200
200
|
case c:
|
|
201
201
|
var M = h;
|
|
202
|
-
return
|
|
202
|
+
return k(M) + ".Consumer";
|
|
203
203
|
case o:
|
|
204
204
|
var I = h;
|
|
205
|
-
return
|
|
205
|
+
return k(I._context) + ".Provider";
|
|
206
206
|
case d:
|
|
207
207
|
return C(h, h.render, "ForwardRef");
|
|
208
208
|
case f:
|
|
209
209
|
var ne = h.displayName || null;
|
|
210
|
-
return ne !== null ? ne :
|
|
210
|
+
return ne !== null ? ne : j(h.type) || "Memo";
|
|
211
211
|
case m: {
|
|
212
212
|
var le = h, me = le._payload, ce = le._init;
|
|
213
213
|
try {
|
|
214
|
-
return
|
|
214
|
+
return j(ce(me));
|
|
215
215
|
} catch {
|
|
216
216
|
return null;
|
|
217
217
|
}
|
|
@@ -219,13 +219,13 @@ function Is() {
|
|
|
219
219
|
}
|
|
220
220
|
return null;
|
|
221
221
|
}
|
|
222
|
-
var N = Object.assign,
|
|
222
|
+
var N = Object.assign, A = 0, W, Z, z, K, T, P, q;
|
|
223
223
|
function L() {
|
|
224
224
|
}
|
|
225
225
|
L.__reactDisabledLog = !0;
|
|
226
226
|
function U() {
|
|
227
227
|
{
|
|
228
|
-
if (
|
|
228
|
+
if (A === 0) {
|
|
229
229
|
W = console.log, Z = console.info, z = console.warn, K = console.error, T = console.group, P = console.groupCollapsed, q = console.groupEnd;
|
|
230
230
|
var h = {
|
|
231
231
|
configurable: !0,
|
|
@@ -243,12 +243,12 @@ function Is() {
|
|
|
243
243
|
groupEnd: h
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
|
-
|
|
246
|
+
A++;
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
function te() {
|
|
250
250
|
{
|
|
251
|
-
if (
|
|
251
|
+
if (A--, A === 0) {
|
|
252
252
|
var h = {
|
|
253
253
|
configurable: !0,
|
|
254
254
|
enumerable: !0,
|
|
@@ -278,10 +278,10 @@ function Is() {
|
|
|
278
278
|
})
|
|
279
279
|
});
|
|
280
280
|
}
|
|
281
|
-
|
|
281
|
+
A < 0 && x("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
|
-
var G =
|
|
284
|
+
var G = _.ReactCurrentDispatcher, V;
|
|
285
285
|
function ee(h, M, I) {
|
|
286
286
|
{
|
|
287
287
|
if (V === void 0)
|
|
@@ -295,16 +295,16 @@ function Is() {
|
|
|
295
295
|
` + V + h;
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
|
-
var re = !1,
|
|
298
|
+
var re = !1, O;
|
|
299
299
|
{
|
|
300
300
|
var oe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
301
|
-
|
|
301
|
+
O = new oe();
|
|
302
302
|
}
|
|
303
|
-
function
|
|
303
|
+
function D(h, M) {
|
|
304
304
|
if (!h || re)
|
|
305
305
|
return "";
|
|
306
306
|
{
|
|
307
|
-
var I =
|
|
307
|
+
var I = O.get(h);
|
|
308
308
|
if (I !== void 0)
|
|
309
309
|
return I;
|
|
310
310
|
}
|
|
@@ -359,7 +359,7 @@ function Is() {
|
|
|
359
359
|
if (he--, ge--, ge < 0 || ie[he] !== xe[ge]) {
|
|
360
360
|
var ke = `
|
|
361
361
|
` + ie[he].replace(" at new ", " at ");
|
|
362
|
-
return h.displayName && ke.includes("<anonymous>") && (ke = ke.replace("<anonymous>", h.displayName)), typeof h == "function" &&
|
|
362
|
+
return h.displayName && ke.includes("<anonymous>") && (ke = ke.replace("<anonymous>", h.displayName)), typeof h == "function" && O.set(h, ke), ke;
|
|
363
363
|
}
|
|
364
364
|
while (he >= 1 && ge >= 0);
|
|
365
365
|
break;
|
|
@@ -369,10 +369,10 @@ function Is() {
|
|
|
369
369
|
re = !1, G.current = me, te(), Error.prepareStackTrace = le;
|
|
370
370
|
}
|
|
371
371
|
var Ge = h ? h.displayName || h.name : "", _r = Ge ? ee(Ge) : "";
|
|
372
|
-
return typeof h == "function" &&
|
|
372
|
+
return typeof h == "function" && O.set(h, _r), _r;
|
|
373
373
|
}
|
|
374
374
|
function ve(h, M, I) {
|
|
375
|
-
return
|
|
375
|
+
return D(h, !1);
|
|
376
376
|
}
|
|
377
377
|
function Ne(h) {
|
|
378
378
|
var M = h.prototype;
|
|
@@ -382,7 +382,7 @@ function Is() {
|
|
|
382
382
|
if (h == null)
|
|
383
383
|
return "";
|
|
384
384
|
if (typeof h == "function")
|
|
385
|
-
return
|
|
385
|
+
return D(h, Ne(h));
|
|
386
386
|
if (typeof h == "string")
|
|
387
387
|
return ee(h);
|
|
388
388
|
switch (h) {
|
|
@@ -407,7 +407,7 @@ function Is() {
|
|
|
407
407
|
}
|
|
408
408
|
return "";
|
|
409
409
|
}
|
|
410
|
-
var Ue = Object.prototype.hasOwnProperty, cr = {}, lr =
|
|
410
|
+
var Ue = Object.prototype.hasOwnProperty, cr = {}, lr = _.ReactDebugCurrentFrame;
|
|
411
411
|
function Et(h) {
|
|
412
412
|
if (h) {
|
|
413
413
|
var M = h._owner, I = Ce(h.type, h._source, M ? M.type : null);
|
|
@@ -430,7 +430,7 @@ function Is() {
|
|
|
430
430
|
} catch (he) {
|
|
431
431
|
ie = he;
|
|
432
432
|
}
|
|
433
|
-
ie && !(ie instanceof Error) && (Et(le),
|
|
433
|
+
ie && !(ie instanceof Error) && (Et(le), x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", ne || "React class", I, ce, typeof ie), Et(null)), ie instanceof Error && !(ie.message in cr) && (cr[ie.message] = !0, Et(le), x("Failed %s type: %s", I, ie.message), Et(null));
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
436
|
}
|
|
@@ -456,9 +456,9 @@ function Is() {
|
|
|
456
456
|
}
|
|
457
457
|
function dr(h) {
|
|
458
458
|
if (as(h))
|
|
459
|
-
return
|
|
459
|
+
return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", rs(h)), ur(h);
|
|
460
460
|
}
|
|
461
|
-
var st =
|
|
461
|
+
var st = _.ReactCurrentOwner, ss = {
|
|
462
462
|
key: !0,
|
|
463
463
|
ref: !0,
|
|
464
464
|
__self: !0,
|
|
@@ -483,14 +483,14 @@ function Is() {
|
|
|
483
483
|
}
|
|
484
484
|
function cs(h, M) {
|
|
485
485
|
if (typeof h.ref == "string" && st.current && M && st.current.stateNode !== M) {
|
|
486
|
-
var I =
|
|
487
|
-
un[I] || (
|
|
486
|
+
var I = j(st.current.type);
|
|
487
|
+
un[I] || (x('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', j(st.current.type), h.ref), un[I] = !0);
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
490
|
function ls(h, M) {
|
|
491
491
|
{
|
|
492
492
|
var I = function() {
|
|
493
|
-
fr || (fr = !0,
|
|
493
|
+
fr || (fr = !0, x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", M));
|
|
494
494
|
};
|
|
495
495
|
I.isReactWarning = !0, Object.defineProperty(h, "key", {
|
|
496
496
|
get: I,
|
|
@@ -501,7 +501,7 @@ function Is() {
|
|
|
501
501
|
function us(h, M) {
|
|
502
502
|
{
|
|
503
503
|
var I = function() {
|
|
504
|
-
mr || (mr = !0,
|
|
504
|
+
mr || (mr = !0, x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", M));
|
|
505
505
|
};
|
|
506
506
|
I.isReactWarning = !0, Object.defineProperty(h, "ref", {
|
|
507
507
|
get: I,
|
|
@@ -556,7 +556,7 @@ function Is() {
|
|
|
556
556
|
return ds(h, ie, xe, le, ne, st.current, ce);
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
var dn =
|
|
559
|
+
var dn = _.ReactCurrentOwner, pr = _.ReactDebugCurrentFrame;
|
|
560
560
|
function Ke(h) {
|
|
561
561
|
if (h) {
|
|
562
562
|
var M = h._owner, I = Ce(h.type, h._source, M ? M.type : null);
|
|
@@ -572,7 +572,7 @@ function Is() {
|
|
|
572
572
|
function hr() {
|
|
573
573
|
{
|
|
574
574
|
if (dn.current) {
|
|
575
|
-
var h =
|
|
575
|
+
var h = j(dn.current.type);
|
|
576
576
|
if (h)
|
|
577
577
|
return `
|
|
578
578
|
|
|
@@ -615,7 +615,7 @@ Check the top-level render call using <` + I + ">.");
|
|
|
615
615
|
return;
|
|
616
616
|
gr[I] = !0;
|
|
617
617
|
var ne = "";
|
|
618
|
-
h && h._owner && h._owner !== dn.current && (ne = " It was passed a child from " +
|
|
618
|
+
h && h._owner && h._owner !== dn.current && (ne = " It was passed a child from " + j(h._owner.type) + "."), Ke(h), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', I, ne), Ke(null);
|
|
619
619
|
}
|
|
620
620
|
}
|
|
621
621
|
function br(h, M) {
|
|
@@ -630,7 +630,7 @@ Check the top-level render call using <` + I + ">.");
|
|
|
630
630
|
else if (mn(h))
|
|
631
631
|
h._store && (h._store.validated = !0);
|
|
632
632
|
else if (h) {
|
|
633
|
-
var le =
|
|
633
|
+
var le = b(h);
|
|
634
634
|
if (typeof le == "function" && le !== h.entries)
|
|
635
635
|
for (var me = le.call(h), ce; !(ce = me.next()).done; )
|
|
636
636
|
mn(ce.value) && vr(ce.value, M);
|
|
@@ -652,14 +652,14 @@ Check the top-level render call using <` + I + ">.");
|
|
|
652
652
|
else
|
|
653
653
|
return;
|
|
654
654
|
if (I) {
|
|
655
|
-
var ne =
|
|
655
|
+
var ne = j(M);
|
|
656
656
|
ts(I, h.props, "prop", ne, h);
|
|
657
657
|
} else if (M.PropTypes !== void 0 && !fn) {
|
|
658
658
|
fn = !0;
|
|
659
|
-
var le =
|
|
660
|
-
|
|
659
|
+
var le = j(M);
|
|
660
|
+
x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", le || "Unknown");
|
|
661
661
|
}
|
|
662
|
-
typeof M.getDefaultProps == "function" && !M.getDefaultProps.isReactClassApproved &&
|
|
662
|
+
typeof M.getDefaultProps == "function" && !M.getDefaultProps.isReactClassApproved && x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
665
|
function gs(h) {
|
|
@@ -667,11 +667,11 @@ Check the top-level render call using <` + I + ">.");
|
|
|
667
667
|
for (var M = Object.keys(h.props), I = 0; I < M.length; I++) {
|
|
668
668
|
var ne = M[I];
|
|
669
669
|
if (ne !== "children" && ne !== "key") {
|
|
670
|
-
Ke(h),
|
|
670
|
+
Ke(h), x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", ne), Ke(null);
|
|
671
671
|
break;
|
|
672
672
|
}
|
|
673
673
|
}
|
|
674
|
-
h.ref !== null && (Ke(h),
|
|
674
|
+
h.ref !== null && (Ke(h), x("Invalid attribute `ref` supplied to `React.Fragment`."), Ke(null));
|
|
675
675
|
}
|
|
676
676
|
}
|
|
677
677
|
function yr(h, M, I, ne, le, me) {
|
|
@@ -683,7 +683,7 @@ Check the top-level render call using <` + I + ">.");
|
|
|
683
683
|
var xe = ms(le);
|
|
684
684
|
xe ? ie += xe : ie += hr();
|
|
685
685
|
var he;
|
|
686
|
-
h === null ? he = "null" : ln(h) ? he = "array" : h !== void 0 && h.$$typeof === e ? (he = "<" + (
|
|
686
|
+
h === null ? he = "null" : ln(h) ? he = "array" : h !== void 0 && h.$$typeof === e ? (he = "<" + (j(h.type) || "Unknown") + " />", ie = " Did you accidentally export a JSX literal instead of a component?") : he = typeof h, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", he, ie);
|
|
687
687
|
}
|
|
688
688
|
var ge = fs(h, M, I, le, me);
|
|
689
689
|
if (ge == null)
|
|
@@ -697,7 +697,7 @@ Check the top-level render call using <` + I + ">.");
|
|
|
697
697
|
br(ke[Ge], h);
|
|
698
698
|
Object.freeze && Object.freeze(ke);
|
|
699
699
|
} else
|
|
700
|
-
|
|
700
|
+
x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
701
701
|
else
|
|
702
702
|
br(ke, h);
|
|
703
703
|
}
|
|
@@ -737,43 +737,43 @@ function Bs(t, e, n) {
|
|
|
737
737
|
if (typeof t != "function")
|
|
738
738
|
throw new TypeError("Expected a function");
|
|
739
739
|
e = +e || 0;
|
|
740
|
-
var g = !!(n = n || {}).leading,
|
|
740
|
+
var g = !!(n = n || {}).leading, v = !("trailing" in n) || !!n.trailing, b = "maxWait" in n, _ = "debounceOnServer" in n && !!n.debounceOnServer, x = b ? Math.max(+n.maxWait || 0, e) : null;
|
|
741
741
|
ae(function() {
|
|
742
742
|
return f.current = !0, function() {
|
|
743
743
|
f.current = !1;
|
|
744
744
|
};
|
|
745
745
|
}, []);
|
|
746
746
|
var E = wt(function() {
|
|
747
|
-
var
|
|
748
|
-
var C = c.current,
|
|
749
|
-
return c.current = d.current = null, i.current = $, l.current = u.current.apply(
|
|
750
|
-
},
|
|
747
|
+
var w = function($) {
|
|
748
|
+
var C = c.current, k = d.current;
|
|
749
|
+
return c.current = d.current = null, i.current = $, l.current = u.current.apply(k, C);
|
|
750
|
+
}, y = function($, C) {
|
|
751
751
|
p && cancelAnimationFrame(o.current), o.current = p ? requestAnimationFrame($) : setTimeout($, C);
|
|
752
|
-
},
|
|
752
|
+
}, F = function($) {
|
|
753
753
|
if (!f.current)
|
|
754
754
|
return !1;
|
|
755
755
|
var C = $ - s.current;
|
|
756
|
-
return !s.current || C >= e || C < 0 ||
|
|
756
|
+
return !s.current || C >= e || C < 0 || b && $ - i.current >= x;
|
|
757
757
|
}, R = function($) {
|
|
758
|
-
return o.current = null,
|
|
758
|
+
return o.current = null, v && c.current ? w($) : (c.current = d.current = null, l.current);
|
|
759
759
|
}, Q = function $() {
|
|
760
760
|
var C = Date.now();
|
|
761
|
-
if (
|
|
761
|
+
if (F(C))
|
|
762
762
|
return R(C);
|
|
763
763
|
if (f.current) {
|
|
764
|
-
var
|
|
765
|
-
|
|
764
|
+
var k = e - (C - s.current), j = b ? Math.min(k, x - (C - i.current)) : k;
|
|
765
|
+
y($, j);
|
|
766
766
|
}
|
|
767
767
|
}, B = function() {
|
|
768
|
-
if (m ||
|
|
769
|
-
var $ = Date.now(), C =
|
|
768
|
+
if (m || _) {
|
|
769
|
+
var $ = Date.now(), C = F($);
|
|
770
770
|
if (c.current = [].slice.call(arguments), d.current = r, s.current = $, C) {
|
|
771
771
|
if (!o.current && f.current)
|
|
772
|
-
return i.current = s.current,
|
|
773
|
-
if (
|
|
774
|
-
return
|
|
772
|
+
return i.current = s.current, y(Q, e), g ? w(s.current) : l.current;
|
|
773
|
+
if (b)
|
|
774
|
+
return y(Q, e), w(s.current);
|
|
775
775
|
}
|
|
776
|
-
return o.current ||
|
|
776
|
+
return o.current || y(Q, e), l.current;
|
|
777
777
|
}
|
|
778
778
|
};
|
|
779
779
|
return B.cancel = function() {
|
|
@@ -783,7 +783,7 @@ function Bs(t, e, n) {
|
|
|
783
783
|
}, B.flush = function() {
|
|
784
784
|
return o.current ? R(Date.now()) : l.current;
|
|
785
785
|
}, B;
|
|
786
|
-
}, [g,
|
|
786
|
+
}, [g, b, e, x, v, p, m, _]);
|
|
787
787
|
return E;
|
|
788
788
|
}
|
|
789
789
|
function fa(t, e, n) {
|
|
@@ -1451,26 +1451,26 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1451
1451
|
}) => {
|
|
1452
1452
|
const p = jt(typeof e == "object");
|
|
1453
1453
|
if (typeof e == "object" && typeof p == "number") {
|
|
1454
|
-
const
|
|
1455
|
-
e = ha(p,
|
|
1454
|
+
const b = Object.assign({}, e), _ = pa(Object.keys(b));
|
|
1455
|
+
e = ha(p, _, b);
|
|
1456
1456
|
}
|
|
1457
1457
|
const g = [];
|
|
1458
1458
|
typeof e == "string" && g.push(e), r && (g.push("icon"), typeof r == "object" ? (g.push(r.icon), r.position ? g.push(r.position) : g.push("left"), r.hover && g.push(`hover_${r.hover}`), r.animate && (g.push("animate"), typeof r.animate == "string" && g.push(r.animate))) : (g.push(r), !r.includes("right") && !r.includes("left") && g.push("left"))), n.muted && g.push("muted"), n.fullWidth && g.push("full-width");
|
|
1459
|
-
const
|
|
1459
|
+
const v = {
|
|
1460
1460
|
...f,
|
|
1461
1461
|
className: S(t, c, g, {
|
|
1462
1462
|
"no-text": !u,
|
|
1463
1463
|
disabled: d,
|
|
1464
1464
|
button: s
|
|
1465
1465
|
}),
|
|
1466
|
-
onClick: (
|
|
1467
|
-
(!s || s[0] === "#") && o && (
|
|
1466
|
+
onClick: (b) => {
|
|
1467
|
+
(!s || s[0] === "#") && o && (b.preventDefault(), b.stopPropagation()), o && o(b);
|
|
1468
1468
|
},
|
|
1469
1469
|
disabled: typeof d == "object" && "isClickable" in d ? !d.isClickable : d
|
|
1470
1470
|
};
|
|
1471
|
-
return s && (i = "a",
|
|
1471
|
+
return s && (i = "a", v.href = s), Y.createElement(
|
|
1472
1472
|
i,
|
|
1473
|
-
|
|
1473
|
+
v,
|
|
1474
1474
|
u || (l ? /* @__PURE__ */ a.jsx(be, { showOnFocus: !1, children: l }) : null)
|
|
1475
1475
|
);
|
|
1476
1476
|
}, kt = ({ buttons: t, className: e = "", ...n }) => {
|
|
@@ -1614,7 +1614,7 @@ const Tt = ({ image: t, className: e, testId: n }) => {
|
|
|
1614
1614
|
loading: l,
|
|
1615
1615
|
decoding: u,
|
|
1616
1616
|
fetchPriority: f
|
|
1617
|
-
} = t, { range: m, sizes: p } = ri(t), g = hn({ format: "avif", query: o, range: m, url: c }),
|
|
1617
|
+
} = t, { range: m, sizes: p } = ri(t), g = hn({ format: "avif", query: o, range: m, url: c }), v = hn({ format: "webp", query: o, range: m, url: c }), b = hn({ format: "", query: o, range: m, url: c });
|
|
1618
1618
|
return /* @__PURE__ */ a.jsxs("picture", { className: e, children: [
|
|
1619
1619
|
i !== "image/gif" && /* @__PURE__ */ a.jsx(
|
|
1620
1620
|
"source",
|
|
@@ -1625,11 +1625,11 @@ const Tt = ({ image: t, className: e, testId: n }) => {
|
|
|
1625
1625
|
"data-testid": "source"
|
|
1626
1626
|
}
|
|
1627
1627
|
),
|
|
1628
|
-
/* @__PURE__ */ a.jsx("source", { type: "image/webp", srcSet:
|
|
1628
|
+
/* @__PURE__ */ a.jsx("source", { type: "image/webp", srcSet: v, sizes: p, "data-testid": "source" }),
|
|
1629
1629
|
/* @__PURE__ */ a.jsx(
|
|
1630
1630
|
"img",
|
|
1631
1631
|
{
|
|
1632
|
-
srcSet:
|
|
1632
|
+
srcSet: b,
|
|
1633
1633
|
sizes: p,
|
|
1634
1634
|
src: c,
|
|
1635
1635
|
alt: r,
|
|
@@ -2251,7 +2251,7 @@ const Xn = ({
|
|
|
2251
2251
|
if (!t || typeof t != "number")
|
|
2252
2252
|
return null;
|
|
2253
2253
|
const c = (u) => {
|
|
2254
|
-
const f = u / 60, m = Math.floor(f), p = (f - m) * 60, g = Math.round(p),
|
|
2254
|
+
const f = u / 60, m = Math.floor(f), p = (f - m) * 60, g = Math.round(p), v = `${i.formatMessage(
|
|
2255
2255
|
{ id: `${o}hours` },
|
|
2256
2256
|
{ time: m }
|
|
2257
2257
|
)}${m > 0 && g > 0 ? ", " : ""}${i.formatMessage(
|
|
@@ -2261,7 +2261,7 @@ const Xn = ({
|
|
|
2261
2261
|
return { text: `${m > 0 ? `${i.formatMessage(
|
|
2262
2262
|
{ id: `${o}hours_short` },
|
|
2263
2263
|
{ time: m }
|
|
2264
|
-
)} ` : ""}${g > 0 ? i.formatMessage({ id: `${o}minutes_short` }, { time: g }) : ""}`, ariaText:
|
|
2264
|
+
)} ` : ""}${g > 0 ? i.formatMessage({ id: `${o}minutes_short` }, { time: g }) : ""}`, ariaText: v };
|
|
2265
2265
|
};
|
|
2266
2266
|
let { text: d, ariaText: l } = c(t);
|
|
2267
2267
|
if (e) {
|
|
@@ -2964,34 +2964,34 @@ const Pr = {
|
|
|
2964
2964
|
className: S("contributors", l, s, { "has-gap": i }),
|
|
2965
2965
|
children: /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
2966
2966
|
/* @__PURE__ */ a.jsx("ul", { children: n.map((m, p) => {
|
|
2967
|
-
let g,
|
|
2967
|
+
let g, v = "";
|
|
2968
2968
|
if (p < c) {
|
|
2969
|
-
const { name:
|
|
2969
|
+
const { name: b = "", image: _ = "" } = ka(m);
|
|
2970
2970
|
if (o)
|
|
2971
2971
|
return /* @__PURE__ */ a.jsx(Se, { element: "li", className: "contributor" }, p);
|
|
2972
2972
|
g = /* @__PURE__ */ a.jsx(
|
|
2973
2973
|
Ye,
|
|
2974
2974
|
{
|
|
2975
|
-
name:
|
|
2976
|
-
src:
|
|
2975
|
+
name: b,
|
|
2976
|
+
src: _,
|
|
2977
2977
|
width: Pr[s || "medium"],
|
|
2978
2978
|
height: Pr[s || "medium"]
|
|
2979
2979
|
}
|
|
2980
2980
|
);
|
|
2981
2981
|
} else if (p === c) {
|
|
2982
|
-
const
|
|
2982
|
+
const b = (e || n.length) - c;
|
|
2983
2983
|
g = /* @__PURE__ */ a.jsxs(
|
|
2984
2984
|
"small",
|
|
2985
2985
|
{
|
|
2986
|
-
className: S({ "large-number":
|
|
2986
|
+
className: S({ "large-number": b > 99 }),
|
|
2987
2987
|
children: [
|
|
2988
2988
|
"+",
|
|
2989
|
-
ei(
|
|
2989
|
+
ei(b, 0)
|
|
2990
2990
|
]
|
|
2991
2991
|
}
|
|
2992
|
-
),
|
|
2992
|
+
), v = "number-left";
|
|
2993
2993
|
}
|
|
2994
|
-
return g ? /* @__PURE__ */ a.jsx("li", { className: S("contributor",
|
|
2994
|
+
return g ? /* @__PURE__ */ a.jsx("li", { className: S("contributor", v), children: g }, p) : null;
|
|
2995
2995
|
}) }),
|
|
2996
2996
|
r && /* @__PURE__ */ a.jsx("span", { className: "label", children: typeof r == "string" ? r : n.length === 1 ? typeof n[0] == "string" ? f.formatMessage({ id: `member_${n[0]}` }) : et(n[0].name || "", 20) : d || null })
|
|
2997
2997
|
] })
|
|
@@ -3012,7 +3012,7 @@ const $t = "emailHelperTextBox_", Oi = ({
|
|
|
3012
3012
|
}), [c, d] = X(!1), l = sa(
|
|
3013
3013
|
(p) => {
|
|
3014
3014
|
p.preventDefault(), p.stopPropagation();
|
|
3015
|
-
const g = (
|
|
3015
|
+
const g = (v) => {
|
|
3016
3016
|
o({
|
|
3017
3017
|
path: `${$t}error_verificationFailedToSend`,
|
|
3018
3018
|
type: "error",
|
|
@@ -3020,7 +3020,7 @@ const $t = "emailHelperTextBox_", Oi = ({
|
|
|
3020
3020
|
"data-gtm-event-context": "VerifyEmailBox",
|
|
3021
3021
|
"data-gtm-event-type": "SendEmailClick",
|
|
3022
3022
|
className: "gtm-trackable",
|
|
3023
|
-
onClick: (
|
|
3023
|
+
onClick: (b) => l(b),
|
|
3024
3024
|
href: "#",
|
|
3025
3025
|
"data-testid": "send-verify-email-click"
|
|
3026
3026
|
},
|
|
@@ -3030,7 +3030,7 @@ const $t = "emailHelperTextBox_", Oi = ({
|
|
|
3030
3030
|
"data-gtm-event-context": "ErrorVerifyingBox",
|
|
3031
3031
|
"data-gtm-event-type": "email-concierge-click"
|
|
3032
3032
|
},
|
|
3033
|
-
error:
|
|
3033
|
+
error: v
|
|
3034
3034
|
});
|
|
3035
3035
|
};
|
|
3036
3036
|
if (typeof r != "function") {
|
|
@@ -3039,8 +3039,8 @@ const $t = "emailHelperTextBox_", Oi = ({
|
|
|
3039
3039
|
}
|
|
3040
3040
|
d(!0), r(e).then(() => {
|
|
3041
3041
|
localStorage.setItem("email", e), window.location.href = n || "/signup/verify-email";
|
|
3042
|
-
}).catch((
|
|
3043
|
-
g(
|
|
3042
|
+
}).catch((v) => {
|
|
3043
|
+
g(v.message);
|
|
3044
3044
|
}).finally(() => {
|
|
3045
3045
|
d(!1);
|
|
3046
3046
|
});
|
|
@@ -3050,20 +3050,20 @@ const $t = "emailHelperTextBox_", Oi = ({
|
|
|
3050
3050
|
);
|
|
3051
3051
|
ae(
|
|
3052
3052
|
() => {
|
|
3053
|
-
let p = $t, g = "default",
|
|
3053
|
+
let p = $t, g = "default", v = {}, b = {};
|
|
3054
3054
|
switch (t) {
|
|
3055
3055
|
case "gov":
|
|
3056
3056
|
p += "autoApproved", g = "success";
|
|
3057
3057
|
break;
|
|
3058
3058
|
case "nonGov":
|
|
3059
|
-
p += "unrecognisedEmail", g = "error",
|
|
3059
|
+
p += "unrecognisedEmail", g = "error", v = {
|
|
3060
3060
|
href: "https://about.apolitical.co/who-can-join-the-community",
|
|
3061
3061
|
"data-gtm-event-context": "NonGovEmailHelperTextBox",
|
|
3062
3062
|
"data-gtm-event-type": "LearnMoreClick"
|
|
3063
3063
|
};
|
|
3064
3064
|
break;
|
|
3065
3065
|
case "pending":
|
|
3066
|
-
p += "pendingApproval", g = "error",
|
|
3066
|
+
p += "pendingApproval", g = "error", b = {
|
|
3067
3067
|
href: "mailto:concierge@apolitical.co",
|
|
3068
3068
|
className: "gtm-trackable",
|
|
3069
3069
|
"data-gtm-event-context": "EmailExistsBox",
|
|
@@ -3071,21 +3071,21 @@ const $t = "emailHelperTextBox_", Oi = ({
|
|
|
3071
3071
|
};
|
|
3072
3072
|
break;
|
|
3073
3073
|
case "verify":
|
|
3074
|
-
p += "emailUnverified", g = "error",
|
|
3074
|
+
p += "emailUnverified", g = "error", v = {
|
|
3075
3075
|
href: "#",
|
|
3076
3076
|
"data-gtm-event-context": "VerifyEmailBox",
|
|
3077
3077
|
"data-gtm-event-type": "SendEmailClick",
|
|
3078
3078
|
className: "gtm-trackable",
|
|
3079
|
-
onClick: (
|
|
3079
|
+
onClick: (_) => l(_),
|
|
3080
3080
|
"data-testid": "send-verify-email-click"
|
|
3081
3081
|
};
|
|
3082
3082
|
break;
|
|
3083
3083
|
case "exists":
|
|
3084
|
-
p += "emailAlreadyExists", g = "error",
|
|
3084
|
+
p += "emailAlreadyExists", g = "error", v = {
|
|
3085
3085
|
href: "/user-onboarding/login",
|
|
3086
3086
|
"data-gtm-event-context": "EmailExistsBox",
|
|
3087
3087
|
"data-gtm-event-type": "login-click"
|
|
3088
|
-
},
|
|
3088
|
+
}, b = {
|
|
3089
3089
|
href: "mailto:concierge@apolitical.co",
|
|
3090
3090
|
className: "gtm-trackable",
|
|
3091
3091
|
"data-gtm-event-context": "EmailExistsBox",
|
|
@@ -3093,14 +3093,14 @@ const $t = "emailHelperTextBox_", Oi = ({
|
|
|
3093
3093
|
};
|
|
3094
3094
|
break;
|
|
3095
3095
|
default:
|
|
3096
|
-
p += "default",
|
|
3096
|
+
p += "default", v = {
|
|
3097
3097
|
href: "https://about.apolitical.co/who-can-join-the-community",
|
|
3098
3098
|
"data-gtm-event-context": "DefaultEmailHelperTextBox",
|
|
3099
3099
|
"data-gtm-event-type": "LearnMoreClick"
|
|
3100
3100
|
};
|
|
3101
3101
|
break;
|
|
3102
3102
|
}
|
|
3103
|
-
o({ ...i, path: p, type: g, link:
|
|
3103
|
+
o({ ...i, path: p, type: g, link: v, mail: b });
|
|
3104
3104
|
},
|
|
3105
3105
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
3106
3106
|
[t]
|
|
@@ -3173,72 +3173,121 @@ const Qe = {
|
|
|
3173
3173
|
DOWN: "ArrowDown",
|
|
3174
3174
|
ENTER: "Enter"
|
|
3175
3175
|
}, Ai = 500, Di = ({
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3176
|
+
id: t,
|
|
3177
|
+
name: e = t,
|
|
3178
|
+
value: n,
|
|
3179
|
+
placeholder: r,
|
|
3180
|
+
functions: s = {
|
|
3179
3181
|
onChange: () => {
|
|
3180
3182
|
},
|
|
3181
3183
|
onKeyInput: async () => new Promise(() => {
|
|
3182
3184
|
})
|
|
3183
|
-
}
|
|
3185
|
+
},
|
|
3186
|
+
...i
|
|
3184
3187
|
}) => {
|
|
3185
|
-
const { onChange:
|
|
3186
|
-
}, onKeyInput:
|
|
3187
|
-
} } =
|
|
3188
|
-
input:
|
|
3189
|
-
displayInput:
|
|
3190
|
-
debouncedInput:
|
|
3191
|
-
}), [
|
|
3188
|
+
const { onChange: o = () => {
|
|
3189
|
+
}, onKeyInput: c = async () => {
|
|
3190
|
+
} } = s, [{ input: d, displayInput: l, debouncedInput: u }, f] = X({
|
|
3191
|
+
input: n,
|
|
3192
|
+
displayInput: n,
|
|
3193
|
+
debouncedInput: n
|
|
3194
|
+
}), [
|
|
3195
|
+
{ predictions: m, activePredictionIndex: p, isPredictionSelected: g },
|
|
3196
|
+
v
|
|
3197
|
+
] = X({
|
|
3192
3198
|
predictions: [],
|
|
3193
3199
|
activePredictionIndex: -1,
|
|
3194
|
-
isPredictionSelected: !!
|
|
3195
|
-
}), { formatMessage:
|
|
3196
|
-
|
|
3197
|
-
const
|
|
3198
|
-
|
|
3200
|
+
isPredictionSelected: !!n
|
|
3201
|
+
}), { formatMessage: b } = H();
|
|
3202
|
+
r || (r = b({ id: "inputAutocomplete_placeholder" })), ae(() => {
|
|
3203
|
+
const w = setTimeout(() => {
|
|
3204
|
+
g || f((y) => ({ ...y, debouncedInput: d }));
|
|
3199
3205
|
}, Ai);
|
|
3200
3206
|
return () => {
|
|
3201
|
-
clearTimeout(
|
|
3207
|
+
clearTimeout(w);
|
|
3202
3208
|
};
|
|
3203
|
-
}, [
|
|
3204
|
-
|
|
3209
|
+
}, [d, g]), ae(() => {
|
|
3210
|
+
u && !g ? (async () => {
|
|
3205
3211
|
try {
|
|
3206
|
-
const
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3212
|
+
const y = await c(u) || [];
|
|
3213
|
+
v((F) => ({
|
|
3214
|
+
...F,
|
|
3215
|
+
predictions: y
|
|
3216
|
+
}));
|
|
3217
|
+
} catch (y) {
|
|
3218
|
+
console.error("Error fetching predictions:", y), v((F) => ({ ...F, predictions: [] }));
|
|
3219
|
+
}
|
|
3220
|
+
})() : v((w) => ({ ...w, predictions: [] }));
|
|
3221
|
+
}, [u, g]), ae(() => {
|
|
3222
|
+
p >= 0 && m[p] && f((w) => ({
|
|
3223
|
+
...w,
|
|
3224
|
+
displayInput: m[p].description
|
|
3225
|
+
}));
|
|
3226
|
+
}, [p, m]);
|
|
3227
|
+
const _ = (w) => {
|
|
3228
|
+
[Qe.DOWN, Qe.UP, Qe.ENTER].includes(w.key) && (w.preventDefault(), w.key === Qe.DOWN && p < m.length - 1 ? v((y) => ({
|
|
3229
|
+
...y,
|
|
3230
|
+
activePredictionIndex: p + 1
|
|
3231
|
+
})) : w.key === Qe.UP && p > 0 ? v((y) => ({
|
|
3232
|
+
...y,
|
|
3233
|
+
activePredictionIndex: p - 1
|
|
3234
|
+
})) : w.key === Qe.ENTER && p > -1 && (o(m[p].description), f((y) => ({
|
|
3235
|
+
...y,
|
|
3236
|
+
input: m[p].description
|
|
3237
|
+
})), v((y) => ({
|
|
3238
|
+
...y,
|
|
3239
|
+
predictions: [],
|
|
3240
|
+
isPredictionSelected: !0
|
|
3241
|
+
}))));
|
|
3242
|
+
}, x = (w) => {
|
|
3243
|
+
o(w.target.value), f((y) => ({
|
|
3244
|
+
...y,
|
|
3245
|
+
input: w.target.value,
|
|
3246
|
+
displayInput: w.target.value
|
|
3247
|
+
})), v((y) => ({
|
|
3248
|
+
...y,
|
|
3249
|
+
activePredictionIndex: -1,
|
|
3250
|
+
isPredictionSelected: !1
|
|
3251
|
+
}));
|
|
3252
|
+
}, E = (w) => {
|
|
3253
|
+
o(w.description), f((y) => ({
|
|
3254
|
+
...y,
|
|
3255
|
+
input: w.description,
|
|
3256
|
+
displayInput: w.description
|
|
3257
|
+
})), v((y) => ({
|
|
3258
|
+
...y,
|
|
3259
|
+
isPredictionSelected: !0,
|
|
3260
|
+
predictions: []
|
|
3261
|
+
}));
|
|
3221
3262
|
};
|
|
3222
3263
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3223
3264
|
/* @__PURE__ */ a.jsx(
|
|
3224
3265
|
"input",
|
|
3225
3266
|
{
|
|
3226
3267
|
type: "text",
|
|
3227
|
-
value:
|
|
3228
|
-
onChange:
|
|
3229
|
-
onKeyDown:
|
|
3230
|
-
placeholder:
|
|
3268
|
+
value: l,
|
|
3269
|
+
onChange: x,
|
|
3270
|
+
onKeyDown: _,
|
|
3271
|
+
placeholder: r,
|
|
3272
|
+
name: e,
|
|
3273
|
+
id: t,
|
|
3274
|
+
...i
|
|
3231
3275
|
}
|
|
3232
3276
|
),
|
|
3233
|
-
/* @__PURE__ */ a.jsx("ul", { className: "predictions-list", children:
|
|
3277
|
+
/* @__PURE__ */ a.jsx("ul", { className: "predictions-list", children: m.map((w, y) => /* @__PURE__ */ a.jsx(
|
|
3234
3278
|
"li",
|
|
3235
3279
|
{
|
|
3236
|
-
onClick: () =>
|
|
3237
|
-
onMouseEnter: () =>
|
|
3238
|
-
|
|
3239
|
-
|
|
3280
|
+
onClick: () => E(w),
|
|
3281
|
+
onMouseEnter: () => v((F) => ({
|
|
3282
|
+
...F,
|
|
3283
|
+
activePredictionIndex: y
|
|
3284
|
+
})),
|
|
3285
|
+
className: S("predictions-list-item", {
|
|
3286
|
+
active: y === p
|
|
3287
|
+
}),
|
|
3288
|
+
children: w.description
|
|
3240
3289
|
},
|
|
3241
|
-
|
|
3290
|
+
y
|
|
3242
3291
|
)) })
|
|
3243
3292
|
] });
|
|
3244
3293
|
};
|
|
@@ -3257,9 +3306,9 @@ const Ea = ({
|
|
|
3257
3306
|
value: u,
|
|
3258
3307
|
...f
|
|
3259
3308
|
}) => {
|
|
3260
|
-
const m = H(), { onChange: p, ...g } = r,
|
|
3309
|
+
const m = H(), { onChange: p, ...g } = r, v = () => {
|
|
3261
3310
|
e || p(u ? null : d);
|
|
3262
|
-
},
|
|
3311
|
+
}, b = /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3263
3312
|
/* @__PURE__ */ a.jsx(
|
|
3264
3313
|
"input",
|
|
3265
3314
|
{
|
|
@@ -3269,8 +3318,8 @@ const Ea = ({
|
|
|
3269
3318
|
type: l,
|
|
3270
3319
|
value: d,
|
|
3271
3320
|
checked: u,
|
|
3272
|
-
onKeyDown: (
|
|
3273
|
-
(
|
|
3321
|
+
onKeyDown: (_) => {
|
|
3322
|
+
(_.key === "Enter" || _.code === "Space") && (_.preventDefault(), _.stopPropagation(), v());
|
|
3274
3323
|
},
|
|
3275
3324
|
readOnly: !0,
|
|
3276
3325
|
disabled: e
|
|
@@ -3284,15 +3333,15 @@ const Ea = ({
|
|
|
3284
3333
|
return Y.createElement(
|
|
3285
3334
|
n,
|
|
3286
3335
|
{
|
|
3287
|
-
onClick: (
|
|
3288
|
-
const
|
|
3289
|
-
|
|
3336
|
+
onClick: (_) => {
|
|
3337
|
+
const x = _.target;
|
|
3338
|
+
x.nodeName.toLowerCase() === "a" || x.parentNode && x.parentNode.nodeName.toLowerCase() === "a" || (_.preventDefault(), _.stopPropagation(), v());
|
|
3290
3339
|
},
|
|
3291
3340
|
className: S("checkbox-wrapper", t),
|
|
3292
3341
|
...f,
|
|
3293
3342
|
...g
|
|
3294
3343
|
},
|
|
3295
|
-
|
|
3344
|
+
b
|
|
3296
3345
|
);
|
|
3297
3346
|
};
|
|
3298
3347
|
const Ii = Ae(function({
|
|
@@ -3319,23 +3368,23 @@ const Li = ({
|
|
|
3319
3368
|
multiSelectOptions: d,
|
|
3320
3369
|
id: l
|
|
3321
3370
|
}) => {
|
|
3322
|
-
const u = H(), [f, m] = X(!1), p = r || n, g = Array.isArray(p) ? [...p] : p ? [p] : [], [
|
|
3323
|
-
let
|
|
3324
|
-
Array.isArray(
|
|
3325
|
-
|
|
3371
|
+
const u = H(), [f, m] = X(!1), p = r || n, g = Array.isArray(p) ? [...p] : p ? [p] : [], [v, b] = X(g);
|
|
3372
|
+
let _;
|
|
3373
|
+
Array.isArray(v) && v.length === 1 && typeof v[0] == "string" ? _ = e && v ? e.find((R) => R.id === v[0]) : e ? e[0] : { id: "", label: "" } : Array.isArray(v) && v.length === 1 && typeof v[0] != "string" ? _ = v[0] : _ = { id: "", label: "" }, ae(() => {
|
|
3374
|
+
b(g);
|
|
3326
3375
|
}, [r, n]);
|
|
3327
|
-
const { onChange:
|
|
3376
|
+
const { onChange: x, onMultiSelectSubmit: E, ...w } = s, y = (R) => {
|
|
3328
3377
|
if (c) {
|
|
3329
3378
|
let Q = [];
|
|
3330
|
-
|
|
3379
|
+
v != null && v.includes(R.id) ? Q = v.filter((B) => B !== R.id) : Q = [...v, R.id], b([...Q]), x && x([...Q]);
|
|
3331
3380
|
} else
|
|
3332
|
-
|
|
3333
|
-
},
|
|
3381
|
+
b([R]), x && x(R.id), m(!1);
|
|
3382
|
+
}, F = (R) => {
|
|
3334
3383
|
if (R === "all") {
|
|
3335
3384
|
const Q = (e == null ? void 0 : e.map((B) => B.id)) || [];
|
|
3336
|
-
|
|
3385
|
+
b(Q), x && x(Q);
|
|
3337
3386
|
} else
|
|
3338
|
-
|
|
3387
|
+
b([]), x && x([]);
|
|
3339
3388
|
};
|
|
3340
3389
|
return /* @__PURE__ */ a.jsxs("div", { className: S("dropdown-wrapper", t), children: [
|
|
3341
3390
|
/* @__PURE__ */ a.jsxs(
|
|
@@ -3349,9 +3398,9 @@ const Li = ({
|
|
|
3349
3398
|
R.preventDefault(), R.stopPropagation(), m(!f);
|
|
3350
3399
|
},
|
|
3351
3400
|
"data-testid": "dropdown-selector",
|
|
3352
|
-
...
|
|
3401
|
+
...w,
|
|
3353
3402
|
children: [
|
|
3354
|
-
c ? `${o} · ${
|
|
3403
|
+
c ? `${o} · ${v.length}` : _.label,
|
|
3355
3404
|
/* @__PURE__ */ a.jsx(Ii, { direction: f ? "up" : "down" })
|
|
3356
3405
|
]
|
|
3357
3406
|
}
|
|
@@ -3359,14 +3408,14 @@ const Li = ({
|
|
|
3359
3408
|
/* @__PURE__ */ a.jsx(
|
|
3360
3409
|
"select",
|
|
3361
3410
|
{
|
|
3362
|
-
defaultValue:
|
|
3411
|
+
defaultValue: _.id,
|
|
3363
3412
|
onChange: (R) => {
|
|
3364
3413
|
R.preventDefault(), R.stopPropagation();
|
|
3365
3414
|
const Q = e && e.find((B) => B.id === R.target.value);
|
|
3366
|
-
|
|
3415
|
+
y(Q);
|
|
3367
3416
|
},
|
|
3368
3417
|
hidden: !f,
|
|
3369
|
-
...
|
|
3418
|
+
...w,
|
|
3370
3419
|
children: e == null ? void 0 : e.map((R) => /* @__PURE__ */ a.jsx("option", { value: R.id, children: R.label }, R.id))
|
|
3371
3420
|
}
|
|
3372
3421
|
),
|
|
@@ -3379,14 +3428,14 @@ const Li = ({
|
|
|
3379
3428
|
children: [
|
|
3380
3429
|
/* @__PURE__ */ a.jsxs("div", { className: "dropdown-menu-list", children: [
|
|
3381
3430
|
(d == null ? void 0 : d.topbar) && /* @__PURE__ */ a.jsxs("div", { className: "action-bar", children: [
|
|
3382
|
-
/* @__PURE__ */ a.jsx("p", { children: `${
|
|
3431
|
+
/* @__PURE__ */ a.jsx("p", { children: `${v == null ? void 0 : v.length} selected` }),
|
|
3383
3432
|
/* @__PURE__ */ a.jsxs("ul", { children: [
|
|
3384
3433
|
/* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
3385
3434
|
se,
|
|
3386
3435
|
{
|
|
3387
3436
|
variant: "tertiary",
|
|
3388
3437
|
size: "small",
|
|
3389
|
-
onClick: () =>
|
|
3438
|
+
onClick: () => F("all"),
|
|
3390
3439
|
className: "gtm-trackable",
|
|
3391
3440
|
children: u.formatMessage({ id: "dropdown_menu_multiselect_all" })
|
|
3392
3441
|
}
|
|
@@ -3396,7 +3445,7 @@ const Li = ({
|
|
|
3396
3445
|
{
|
|
3397
3446
|
variant: "tertiary",
|
|
3398
3447
|
size: "small",
|
|
3399
|
-
onClick: () =>
|
|
3448
|
+
onClick: () => F("none"),
|
|
3400
3449
|
className: "gtm-trackable",
|
|
3401
3450
|
children: u.formatMessage({ id: "dropdown_menu_multiselect_none" })
|
|
3402
3451
|
}
|
|
@@ -3404,7 +3453,7 @@ const Li = ({
|
|
|
3404
3453
|
] })
|
|
3405
3454
|
] }),
|
|
3406
3455
|
/* @__PURE__ */ a.jsx("ul", { children: e == null ? void 0 : e.map((R) => {
|
|
3407
|
-
const Q = R.id ===
|
|
3456
|
+
const Q = R.id === _.id || (v == null ? void 0 : v.includes(R)) || (v == null ? void 0 : v.includes(R.id));
|
|
3408
3457
|
return /* @__PURE__ */ a.jsx("li", { "data-testid": "dropdown-options", children: /* @__PURE__ */ a.jsxs(
|
|
3409
3458
|
"button",
|
|
3410
3459
|
{
|
|
@@ -3415,7 +3464,7 @@ const Li = ({
|
|
|
3415
3464
|
"data-gtm-event-type": `${R}-click`,
|
|
3416
3465
|
"data-gtm-event-context": i,
|
|
3417
3466
|
onClick: (B) => {
|
|
3418
|
-
B.preventDefault(), B.stopPropagation(),
|
|
3467
|
+
B.preventDefault(), B.stopPropagation(), y(R);
|
|
3419
3468
|
},
|
|
3420
3469
|
role: "menuitem",
|
|
3421
3470
|
"aria-current": Q,
|
|
@@ -3433,11 +3482,11 @@ const Li = ({
|
|
|
3433
3482
|
{
|
|
3434
3483
|
variant: "secondary",
|
|
3435
3484
|
onClick: () => {
|
|
3436
|
-
E && E(
|
|
3485
|
+
E && E(v), document.dispatchEvent(
|
|
3437
3486
|
new CustomEvent("dropdownMultiSelectSubmit", {
|
|
3438
3487
|
detail: {
|
|
3439
3488
|
id: l || "dropdown-multi-select",
|
|
3440
|
-
value:
|
|
3489
|
+
value: v
|
|
3441
3490
|
}
|
|
3442
3491
|
})
|
|
3443
3492
|
), m(!1);
|
|
@@ -3474,21 +3523,21 @@ const Bi = ({
|
|
|
3474
3523
|
"data-testid": `ul-${r}`,
|
|
3475
3524
|
children: c == null ? void 0 : c.map(
|
|
3476
3525
|
({
|
|
3477
|
-
id:
|
|
3478
|
-
label:
|
|
3479
|
-
value:
|
|
3480
|
-
disabled:
|
|
3526
|
+
id: v,
|
|
3527
|
+
label: b = !1,
|
|
3528
|
+
value: _ = v,
|
|
3529
|
+
disabled: x = !1
|
|
3481
3530
|
}) => {
|
|
3482
|
-
const E = `${r}_${
|
|
3483
|
-
if (
|
|
3531
|
+
const E = `${r}_${v}`, w = () => {
|
|
3532
|
+
if (x)
|
|
3484
3533
|
return;
|
|
3485
|
-
let
|
|
3534
|
+
let y;
|
|
3486
3535
|
if (i) {
|
|
3487
|
-
const
|
|
3488
|
-
Array.isArray(p) &&
|
|
3536
|
+
const F = p == null ? void 0 : p.indexOf(_);
|
|
3537
|
+
Array.isArray(p) && F >= 0 ? (y = p, y.splice(F, 1)) : (!p || p.length === 0 ? y = [] : y = p, y.push(_));
|
|
3489
3538
|
} else
|
|
3490
|
-
|
|
3491
|
-
e.onChange(
|
|
3539
|
+
y = g === _ ? void 0 : _;
|
|
3540
|
+
e.onChange(y);
|
|
3492
3541
|
};
|
|
3493
3542
|
return /* @__PURE__ */ a.jsx(
|
|
3494
3543
|
Ea,
|
|
@@ -3496,17 +3545,17 @@ const Bi = ({
|
|
|
3496
3545
|
element: "li",
|
|
3497
3546
|
id: E,
|
|
3498
3547
|
type: l === "checkboxes" ? "checkbox" : "radio",
|
|
3499
|
-
shownValue:
|
|
3500
|
-
value: i ? p == null ? void 0 : p.includes(
|
|
3548
|
+
shownValue: _,
|
|
3549
|
+
value: i ? p == null ? void 0 : p.includes(_) : g === _,
|
|
3501
3550
|
functions: {
|
|
3502
3551
|
...e,
|
|
3503
|
-
onChange:
|
|
3552
|
+
onChange: w
|
|
3504
3553
|
},
|
|
3505
3554
|
intlPath: n,
|
|
3506
|
-
label:
|
|
3507
|
-
id: n ? `${n}_${
|
|
3555
|
+
label: b || m.formatMessage({
|
|
3556
|
+
id: n ? `${n}_${v}` : v
|
|
3508
3557
|
}),
|
|
3509
|
-
disabled:
|
|
3558
|
+
disabled: x
|
|
3510
3559
|
},
|
|
3511
3560
|
E
|
|
3512
3561
|
);
|
|
@@ -3570,9 +3619,9 @@ const Je = {
|
|
|
3570
3619
|
value: l,
|
|
3571
3620
|
...u
|
|
3572
3621
|
}) => {
|
|
3573
|
-
const f = H(), m = d && d.some(({ condition:
|
|
3574
|
-
c && ["checkboxes"].includes(c) ?
|
|
3575
|
-
let
|
|
3622
|
+
const f = H(), m = d && d.some(({ condition: w }) => w === "required"), p = (l == null ? void 0 : l.toString().length) || 0, g = c && Je[c] && Je[c].component ? Je[c].component : gt, v = {};
|
|
3623
|
+
c && ["checkboxes"].includes(c) ? v.element = "span" : v.htmlFor = t;
|
|
3624
|
+
let b = {
|
|
3576
3625
|
...u,
|
|
3577
3626
|
id: t,
|
|
3578
3627
|
name: t,
|
|
@@ -3583,17 +3632,17 @@ const Je = {
|
|
|
3583
3632
|
functions: pt(s),
|
|
3584
3633
|
value: l
|
|
3585
3634
|
};
|
|
3586
|
-
i > 0 && (
|
|
3587
|
-
((
|
|
3588
|
-
})), c && Je[c] && Je[c].props && (
|
|
3589
|
-
const
|
|
3590
|
-
|
|
3635
|
+
i > 0 && (b["data-character-limit"] = i, b.functions && (b.functions.onChange = (w) => {
|
|
3636
|
+
((w == null ? void 0 : w.toString().length) || 0) > i && (w = w == null ? void 0 : w.toString().slice(0, i)), s.onChange(w);
|
|
3637
|
+
})), c && Je[c] && Je[c].props && (b = { ...b, ...Je[c].props }), c && ["checkboxes"].includes(c) && (b.intlPath = `${e}_${t}`), r && (b["aria-invalid"] = !0, b["aria-describedby"] = `error-${t}`);
|
|
3638
|
+
const _ = u.label || f.formatMessage({ id: e ? `${e}_${t}` : t }), x = ({ ...w }) => r ? Y.createElement(
|
|
3639
|
+
w.as || "dd",
|
|
3591
3640
|
{
|
|
3592
3641
|
id: `error-${t}`,
|
|
3593
3642
|
className: "error text-small",
|
|
3594
3643
|
role: "alert",
|
|
3595
3644
|
"aria-live": "assertive",
|
|
3596
|
-
...
|
|
3645
|
+
...w
|
|
3597
3646
|
},
|
|
3598
3647
|
r
|
|
3599
3648
|
) : null;
|
|
@@ -3602,21 +3651,21 @@ const Je = {
|
|
|
3602
3651
|
/* @__PURE__ */ a.jsx(
|
|
3603
3652
|
g,
|
|
3604
3653
|
{
|
|
3605
|
-
...
|
|
3606
|
-
label:
|
|
3654
|
+
...b,
|
|
3655
|
+
label: _,
|
|
3607
3656
|
className: S("field-wrapper", n)
|
|
3608
3657
|
}
|
|
3609
3658
|
),
|
|
3610
|
-
/* @__PURE__ */ a.jsx(
|
|
3659
|
+
/* @__PURE__ */ a.jsx(x, { as: "p" })
|
|
3611
3660
|
] });
|
|
3612
|
-
const E = (
|
|
3613
|
-
...
|
|
3661
|
+
const E = (w) => Y.createElement(w.element || "label", {
|
|
3662
|
+
...w,
|
|
3614
3663
|
className: "checkboxes-label text-small",
|
|
3615
3664
|
"data-testid": `label-${t}`
|
|
3616
3665
|
});
|
|
3617
3666
|
return /* @__PURE__ */ a.jsxs("dl", { className: S("field-wrapper text-medium", n), children: [
|
|
3618
|
-
/* @__PURE__ */ a.jsx("dt", { children: /* @__PURE__ */ a.jsxs(E, { ...
|
|
3619
|
-
|
|
3667
|
+
/* @__PURE__ */ a.jsx("dt", { children: /* @__PURE__ */ a.jsxs(E, { ...v, children: [
|
|
3668
|
+
_,
|
|
3620
3669
|
m && o && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3621
3670
|
" ",
|
|
3622
3671
|
/* @__PURE__ */ a.jsxs("small", { children: [
|
|
@@ -3627,7 +3676,7 @@ const Je = {
|
|
|
3627
3676
|
] })
|
|
3628
3677
|
] }) }),
|
|
3629
3678
|
/* @__PURE__ */ a.jsxs("dd", { children: [
|
|
3630
|
-
/* @__PURE__ */ a.jsx(g, { ...
|
|
3679
|
+
/* @__PURE__ */ a.jsx(g, { ...b }),
|
|
3631
3680
|
i > 0 ? /* @__PURE__ */ a.jsxs(
|
|
3632
3681
|
"small",
|
|
3633
3682
|
{
|
|
@@ -3644,7 +3693,7 @@ const Je = {
|
|
|
3644
3693
|
}
|
|
3645
3694
|
) : null
|
|
3646
3695
|
] }),
|
|
3647
|
-
/* @__PURE__ */ a.jsx(
|
|
3696
|
+
/* @__PURE__ */ a.jsx(x, {})
|
|
3648
3697
|
] });
|
|
3649
3698
|
}, Wi = (t, e) => {
|
|
3650
3699
|
const { type: n, payload: r } = e, s = t.errors ? pt(t.errors) : {}, i = t.values ? pt(t.values) : {};
|
|
@@ -3687,37 +3736,37 @@ const Je = {
|
|
|
3687
3736
|
for (const m of o)
|
|
3688
3737
|
if (m.validation)
|
|
3689
3738
|
for (let p = 0; p < m.validation.length; p++) {
|
|
3690
|
-
const { condition: g = "required", error:
|
|
3691
|
-
let
|
|
3739
|
+
const { condition: g = "required", error: v = !1 } = m.validation[p];
|
|
3740
|
+
let b = !1;
|
|
3692
3741
|
if (typeof g == "function") {
|
|
3693
|
-
const
|
|
3694
|
-
|
|
3742
|
+
const _ = g(i);
|
|
3743
|
+
_ && (b = v || _);
|
|
3695
3744
|
} else {
|
|
3696
|
-
const
|
|
3745
|
+
const _ = i[m.id];
|
|
3697
3746
|
switch (g) {
|
|
3698
3747
|
case "required":
|
|
3699
|
-
(!
|
|
3748
|
+
(!_ || typeof _ == "string" && _.trim().length === 0) && (b = v || (u == null ? void 0 : u.formatMessage({ id: "form_error_required" })));
|
|
3700
3749
|
break;
|
|
3701
3750
|
case "no-numbers": {
|
|
3702
|
-
|
|
3751
|
+
_ && !/^([^0-9]*)$/.test(_) && (b = v || (u == null ? void 0 : u.formatMessage({ id: "form_error_numbers" })));
|
|
3703
3752
|
break;
|
|
3704
3753
|
}
|
|
3705
3754
|
case "valid-email": {
|
|
3706
|
-
|
|
3755
|
+
_ && !/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(_) && (b = v || (u == null ? void 0 : u.formatMessage({ id: "form_error_email" })));
|
|
3707
3756
|
break;
|
|
3708
3757
|
}
|
|
3709
3758
|
case "valid-url": {
|
|
3710
|
-
|
|
3759
|
+
_ && !/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/.test(_) && (b = v || (u == null ? void 0 : u.formatMessage({ id: "form_error_url" })));
|
|
3711
3760
|
break;
|
|
3712
3761
|
}
|
|
3713
3762
|
default:
|
|
3714
3763
|
console.warn("WARNING! No field validation condition has been set");
|
|
3715
3764
|
}
|
|
3716
3765
|
}
|
|
3717
|
-
if (
|
|
3766
|
+
if (b) {
|
|
3718
3767
|
c({
|
|
3719
3768
|
type: "addError",
|
|
3720
|
-
payload: { key: m.id, value:
|
|
3769
|
+
payload: { key: m.id, value: b }
|
|
3721
3770
|
}), f.push(m.id);
|
|
3722
3771
|
break;
|
|
3723
3772
|
}
|
|
@@ -3783,12 +3832,12 @@ const rn = ({
|
|
|
3783
3832
|
},
|
|
3784
3833
|
...p
|
|
3785
3834
|
}) => {
|
|
3786
|
-
const { customOnSubmit: g, hideButton:
|
|
3787
|
-
shouldShowCancelButton:
|
|
3835
|
+
const { customOnSubmit: g, hideButton: v, ...b } = i, _ = 40, {
|
|
3836
|
+
shouldShowCancelButton: x = !1,
|
|
3788
3837
|
shouldReset: E = !0,
|
|
3789
|
-
showRequiredLabels:
|
|
3790
|
-
showSuccessMessage:
|
|
3791
|
-
} = c || {},
|
|
3838
|
+
showRequiredLabels: w = !0,
|
|
3839
|
+
showSuccessMessage: y = !1
|
|
3840
|
+
} = c || {}, F = H(), R = {};
|
|
3792
3841
|
t.length && t.forEach((z) => {
|
|
3793
3842
|
const K = z.id || z.name;
|
|
3794
3843
|
K && (R[K] = z.value || "");
|
|
@@ -3798,15 +3847,15 @@ const rn = ({
|
|
|
3798
3847
|
formSubmitted: !1,
|
|
3799
3848
|
errors: {},
|
|
3800
3849
|
values: R
|
|
3801
|
-
}), { errors: $, isSubmitting: C, formSubmitted:
|
|
3850
|
+
}), { errors: $, isSubmitting: C, formSubmitted: k, values: j } = Q;
|
|
3802
3851
|
ae(() => {
|
|
3803
|
-
E &&
|
|
3852
|
+
E && k && (bn = setTimeout(() => {
|
|
3804
3853
|
B({
|
|
3805
3854
|
type: "updateValue",
|
|
3806
3855
|
payload: { key: "formSubmitted", value: !1 }
|
|
3807
3856
|
});
|
|
3808
3857
|
}, 3e3));
|
|
3809
|
-
}, [
|
|
3858
|
+
}, [k]), ae(() => () => {
|
|
3810
3859
|
bn && clearTimeout(bn);
|
|
3811
3860
|
}, []), ae(() => {
|
|
3812
3861
|
const z = (K) => {
|
|
@@ -3825,32 +3874,32 @@ const rn = ({
|
|
|
3825
3874
|
);
|
|
3826
3875
|
};
|
|
3827
3876
|
}, []);
|
|
3828
|
-
const N = pe(null),
|
|
3877
|
+
const N = pe(null), A = r || N;
|
|
3829
3878
|
if (!t.length)
|
|
3830
3879
|
return null;
|
|
3831
|
-
i.text || (i.text =
|
|
3880
|
+
i.text || (i.text = F.formatMessage({ id: "form_submit" }));
|
|
3832
3881
|
const Z = [
|
|
3833
3882
|
{
|
|
3834
|
-
...
|
|
3835
|
-
icon:
|
|
3883
|
+
...b,
|
|
3884
|
+
icon: k ? { icon: "tick", position: "left" } : !1,
|
|
3836
3885
|
className: "gtm-trackable",
|
|
3837
3886
|
onClick: (z) => {
|
|
3838
3887
|
var P;
|
|
3839
3888
|
if (z.preventDefault(), z.stopPropagation(), C)
|
|
3840
3889
|
return;
|
|
3841
3890
|
let K = 0;
|
|
3842
|
-
if ((P =
|
|
3843
|
-
const q = document.getElementById(
|
|
3891
|
+
if ((P = A == null ? void 0 : A.current) != null && P.id) {
|
|
3892
|
+
const q = document.getElementById(A.current.id);
|
|
3844
3893
|
q && (K = q.getBoundingClientRect().top + window.scrollY);
|
|
3845
3894
|
}
|
|
3846
3895
|
const T = document.getElementById("header");
|
|
3847
|
-
if (T && (K = K - T.offsetHeight -
|
|
3896
|
+
if (T && (K = K - T.offsetHeight - _), K < 0 && (K = 0), window.scrollTo({ top: K, behavior: "smooth" }), B({ type: "toggleSubmitting" }), i.disabled) {
|
|
3848
3897
|
typeof i.disabled == "object" && i.disabled.isClickable && B({
|
|
3849
3898
|
type: "submitForm",
|
|
3850
3899
|
payload: {
|
|
3851
3900
|
fields: t,
|
|
3852
3901
|
dispatch: B,
|
|
3853
|
-
intl:
|
|
3902
|
+
intl: F
|
|
3854
3903
|
}
|
|
3855
3904
|
});
|
|
3856
3905
|
return;
|
|
@@ -3876,26 +3925,26 @@ const rn = ({
|
|
|
3876
3925
|
payload: { key: "isSubmitting", value: !1 }
|
|
3877
3926
|
});
|
|
3878
3927
|
},
|
|
3879
|
-
intl:
|
|
3928
|
+
intl: F
|
|
3880
3929
|
}
|
|
3881
3930
|
});
|
|
3882
3931
|
},
|
|
3883
|
-
disabled: C ||
|
|
3932
|
+
disabled: C || k || i.disabled,
|
|
3884
3933
|
"data-gtm-event-context": d.context,
|
|
3885
3934
|
"data-gtm-event-type": d.event,
|
|
3886
|
-
children: C ||
|
|
3935
|
+
children: C || k ? F.formatMessage({
|
|
3887
3936
|
id: `form_${C ? "submitting" : "submitted"}`
|
|
3888
3937
|
}) : i.text
|
|
3889
3938
|
}
|
|
3890
3939
|
];
|
|
3891
|
-
return
|
|
3940
|
+
return x && Z.unshift({
|
|
3892
3941
|
...o,
|
|
3893
3942
|
className: "gtm-trackable",
|
|
3894
3943
|
"data-gtm-event-context": d.context,
|
|
3895
3944
|
"data-gtm-event-type": d.event,
|
|
3896
|
-
disabled: C ||
|
|
3945
|
+
disabled: C || k,
|
|
3897
3946
|
onClick: u,
|
|
3898
|
-
children: o.text ||
|
|
3947
|
+
children: o.text || F.formatMessage({ id: "form_cancel" })
|
|
3899
3948
|
}), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3900
3949
|
/* @__PURE__ */ a.jsxs(
|
|
3901
3950
|
"form",
|
|
@@ -3903,16 +3952,16 @@ const rn = ({
|
|
|
3903
3952
|
...p,
|
|
3904
3953
|
id: n,
|
|
3905
3954
|
className: S("form", e),
|
|
3906
|
-
ref:
|
|
3955
|
+
ref: A,
|
|
3907
3956
|
children: [
|
|
3908
3957
|
$ != null && $.general ? /* @__PURE__ */ a.jsx(
|
|
3909
3958
|
He,
|
|
3910
3959
|
{
|
|
3911
3960
|
variant: "error",
|
|
3912
|
-
text:
|
|
3961
|
+
text: F.formatMessage({ id: "form_error_generalError" })
|
|
3913
3962
|
}
|
|
3914
3963
|
) : null,
|
|
3915
|
-
(!E || !C && !
|
|
3964
|
+
(!E || !C && !k || g) && t.map((z, K) => {
|
|
3916
3965
|
const {
|
|
3917
3966
|
id: T = z.name || K,
|
|
3918
3967
|
component: P,
|
|
@@ -3921,13 +3970,13 @@ const rn = ({
|
|
|
3921
3970
|
} = z;
|
|
3922
3971
|
if (P)
|
|
3923
3972
|
return /* @__PURE__ */ a.jsx(P, { ...z.props || {} }, `component-${T}-${K}`);
|
|
3924
|
-
const L =
|
|
3973
|
+
const L = j ? j[T] : "";
|
|
3925
3974
|
return /* @__PURE__ */ a.jsx(
|
|
3926
3975
|
Ui,
|
|
3927
3976
|
{
|
|
3928
3977
|
intlPath: s,
|
|
3929
3978
|
...z,
|
|
3930
|
-
showRequiredLabels:
|
|
3979
|
+
showRequiredLabels: w,
|
|
3931
3980
|
value: L,
|
|
3932
3981
|
error: $ == null ? void 0 : $[T],
|
|
3933
3982
|
functions: {
|
|
@@ -3940,12 +3989,12 @@ const rn = ({
|
|
|
3940
3989
|
T
|
|
3941
3990
|
);
|
|
3942
3991
|
}),
|
|
3943
|
-
|
|
3992
|
+
v ? null : (C || k) && g ? g : /* @__PURE__ */ a.jsx(
|
|
3944
3993
|
kt,
|
|
3945
3994
|
{
|
|
3946
3995
|
className: S("cta", {
|
|
3947
|
-
center: C ||
|
|
3948
|
-
submitted:
|
|
3996
|
+
center: C || k,
|
|
3997
|
+
submitted: k
|
|
3949
3998
|
}),
|
|
3950
3999
|
buttons: Z
|
|
3951
4000
|
}
|
|
@@ -3953,7 +4002,7 @@ const rn = ({
|
|
|
3953
4002
|
]
|
|
3954
4003
|
}
|
|
3955
4004
|
),
|
|
3956
|
-
|
|
4005
|
+
y && k && /* @__PURE__ */ a.jsx(Wt, { className: "success", children: typeof y == "string" ? y : F.formatMessage({ id: "form_success" }) })
|
|
3957
4006
|
] });
|
|
3958
4007
|
};
|
|
3959
4008
|
const Nt = "passwordRules_", Sa = "isMoreThanEightCharacters", Ca = "includesNumberAndSymbol", $a = "includesLowerAndUppercase", zi = {
|
|
@@ -4013,67 +4062,67 @@ const Vl = ({
|
|
|
4013
4062
|
disabled: !0
|
|
4014
4063
|
}), u = async () => {
|
|
4015
4064
|
try {
|
|
4016
|
-
const
|
|
4017
|
-
l((
|
|
4018
|
-
...
|
|
4065
|
+
const _ = await n();
|
|
4066
|
+
l((x) => ({
|
|
4067
|
+
...x,
|
|
4019
4068
|
setUp: !0,
|
|
4020
|
-
id:
|
|
4069
|
+
id: _ && _.id,
|
|
4021
4070
|
disabled: !1
|
|
4022
4071
|
}));
|
|
4023
|
-
} catch (
|
|
4024
|
-
l((
|
|
4072
|
+
} catch (_) {
|
|
4073
|
+
l((x) => ({ ...x, setUp: !0, disabled: !0 })), s(_);
|
|
4025
4074
|
}
|
|
4026
4075
|
};
|
|
4027
4076
|
if (ae(() => {
|
|
4028
4077
|
o && !d.setUp && u();
|
|
4029
4078
|
}, [o]), !o)
|
|
4030
4079
|
return /* @__PURE__ */ a.jsx(Se, { className: "rating-placeholder" });
|
|
4031
|
-
const { id: f, rating: m, disabled: p } = d, g = "ratings_",
|
|
4080
|
+
const { id: f, rating: m, disabled: p } = d, g = "ratings_", v = {
|
|
4032
4081
|
text: c.formatMessage({ id: `${g}text` }),
|
|
4033
4082
|
low: c.formatMessage({ id: `${g}low` }),
|
|
4034
4083
|
high: c.formatMessage({ id: `${g}high` }),
|
|
4035
4084
|
success: c.formatMessage({ id: `${g}success` }),
|
|
4036
4085
|
...t
|
|
4037
|
-
},
|
|
4086
|
+
}, b = async (_) => {
|
|
4038
4087
|
if (!(!f || p))
|
|
4039
4088
|
try {
|
|
4040
|
-
l((
|
|
4041
|
-
} catch (
|
|
4042
|
-
l((E) => ({ ...E, rating: null })), s(
|
|
4089
|
+
l((x) => ({ ...x, rating: _, disabled: !0 })), await r({ id: f, value: _ });
|
|
4090
|
+
} catch (x) {
|
|
4091
|
+
l((E) => ({ ...E, rating: null })), s(x);
|
|
4043
4092
|
} finally {
|
|
4044
|
-
l((
|
|
4093
|
+
l((x) => ({ ...x, disabled: !1 }));
|
|
4045
4094
|
}
|
|
4046
4095
|
};
|
|
4047
4096
|
return /* @__PURE__ */ a.jsxs("div", { className: S("rating", i), children: [
|
|
4048
|
-
/* @__PURE__ */ a.jsx("span", { className: "label", children:
|
|
4049
|
-
/* @__PURE__ */ a.jsx("ol", { children: Array.from(new Array(e).keys()).map((
|
|
4050
|
-
const
|
|
4097
|
+
/* @__PURE__ */ a.jsx("span", { className: "label", children: v[m ? "success" : "text"] }),
|
|
4098
|
+
/* @__PURE__ */ a.jsx("ol", { children: Array.from(new Array(e).keys()).map((_) => {
|
|
4099
|
+
const x = _ + 1;
|
|
4051
4100
|
return /* @__PURE__ */ a.jsx(
|
|
4052
4101
|
"li",
|
|
4053
4102
|
{
|
|
4054
|
-
className: S({ selected: m &&
|
|
4103
|
+
className: S({ selected: m && x <= m }),
|
|
4055
4104
|
children: /* @__PURE__ */ a.jsx(
|
|
4056
4105
|
se,
|
|
4057
4106
|
{
|
|
4058
4107
|
variant: "tertiary",
|
|
4059
4108
|
size: "small",
|
|
4060
4109
|
icon: {
|
|
4061
|
-
icon: `star${!m ||
|
|
4110
|
+
icon: `star${!m || x > m ? "_empty" : ""}`,
|
|
4062
4111
|
position: "left",
|
|
4063
4112
|
hover: "star"
|
|
4064
4113
|
},
|
|
4065
4114
|
screenreaderText: `${c.formatMessage(
|
|
4066
4115
|
{ id: `${g}stars` },
|
|
4067
|
-
{ number:
|
|
4068
|
-
)}${
|
|
4116
|
+
{ number: x, total: e }
|
|
4117
|
+
)}${x === 1 || x === e ? ` - ${v[x === 1 ? "low" : "high"]}` : ""}`,
|
|
4069
4118
|
onClick: (E) => {
|
|
4070
|
-
E.preventDefault(), E.stopPropagation(),
|
|
4119
|
+
E.preventDefault(), E.stopPropagation(), b(x);
|
|
4071
4120
|
},
|
|
4072
4121
|
disabled: p
|
|
4073
4122
|
}
|
|
4074
4123
|
)
|
|
4075
4124
|
},
|
|
4076
|
-
`rating-${
|
|
4125
|
+
`rating-${x}`
|
|
4077
4126
|
);
|
|
4078
4127
|
}) })
|
|
4079
4128
|
] });
|
|
@@ -4145,8 +4194,8 @@ function Kl({ className: t = "", userId: e, userName: n, src: r, setUserImage: s
|
|
|
4145
4194
|
if (!p || !e)
|
|
4146
4195
|
throw c(!1), new Error("Image file or userID is missing");
|
|
4147
4196
|
const g = await i({ fileObject: p, userId: e });
|
|
4148
|
-
s((
|
|
4149
|
-
...
|
|
4197
|
+
s((v) => ({
|
|
4198
|
+
...v,
|
|
4150
4199
|
image: {
|
|
4151
4200
|
thumbnail: g.thumbnailURL,
|
|
4152
4201
|
full: g.originalURL
|
|
@@ -4249,45 +4298,45 @@ const Yi = ({
|
|
|
4249
4298
|
initialFormStatus: l = "NOT_SUBMITTED"
|
|
4250
4299
|
/* NOT_SUBMITTED */
|
|
4251
4300
|
}) => {
|
|
4252
|
-
const [u, f] = X([]), [m, p] = X(!0), [g,
|
|
4253
|
-
|
|
4301
|
+
const [u, f] = X([]), [m, p] = X(!0), [g, v] = X(l), { formatMessage: b } = H(), _ = async (w) => {
|
|
4302
|
+
w.preventDefault();
|
|
4254
4303
|
try {
|
|
4255
|
-
await d(u), f([]),
|
|
4304
|
+
await d(u), f([]), v(
|
|
4256
4305
|
"SUCCESS"
|
|
4257
4306
|
/* SUCCESS */
|
|
4258
4307
|
);
|
|
4259
|
-
} catch (
|
|
4260
|
-
|
|
4308
|
+
} catch (y) {
|
|
4309
|
+
v(
|
|
4261
4310
|
"ERROR"
|
|
4262
4311
|
/* ERROR */
|
|
4263
|
-
), c(
|
|
4312
|
+
), c(y);
|
|
4264
4313
|
}
|
|
4265
|
-
},
|
|
4266
|
-
|
|
4314
|
+
}, x = (w) => {
|
|
4315
|
+
w.preventDefault(), v(
|
|
4267
4316
|
"NOT_SUBMITTED"
|
|
4268
4317
|
/* NOT_SUBMITTED */
|
|
4269
4318
|
), p(!0), f([]);
|
|
4270
|
-
}, E = (
|
|
4271
|
-
|
|
4319
|
+
}, E = (w) => {
|
|
4320
|
+
w.preventDefault(), o(), v(
|
|
4272
4321
|
"CLOSED"
|
|
4273
4322
|
/* CLOSED */
|
|
4274
4323
|
);
|
|
4275
4324
|
};
|
|
4276
4325
|
return g === "CLOSED" ? null : g === "ERROR" || g === "SUCCESS" ? /* @__PURE__ */ a.jsxs("div", { className: "invite-form-wrapper", children: [
|
|
4277
|
-
/* @__PURE__ */ a.jsx("div", { className: "content centred", children: g === "SUCCESS" ? /* @__PURE__ */ a.jsx("h2", { className: "success-title", children:
|
|
4326
|
+
/* @__PURE__ */ a.jsx("div", { className: "content centred", children: g === "SUCCESS" ? /* @__PURE__ */ a.jsx("h2", { className: "success-title", children: b({ id: "inviteForm_success" }) }) : /* @__PURE__ */ a.jsxs("h2", { className: "error-title", children: [
|
|
4278
4327
|
" ",
|
|
4279
|
-
|
|
4328
|
+
b({ id: "inviteForm_error" })
|
|
4280
4329
|
] }) }),
|
|
4281
4330
|
/* @__PURE__ */ a.jsx(Oe, {}),
|
|
4282
4331
|
/* @__PURE__ */ a.jsx("div", { className: "footer", children: g === "SUCCESS" ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
4283
|
-
/* @__PURE__ */ a.jsx(se, { variant: "secondary", onClick:
|
|
4284
|
-
/* @__PURE__ */ a.jsx(se, { onClick: E, children:
|
|
4285
|
-
] }) : /* @__PURE__ */ a.jsx(se, { onClick:
|
|
4332
|
+
/* @__PURE__ */ a.jsx(se, { variant: "secondary", onClick: x, children: b({ id: "inviteForm_ctaSendMoreInvites" }) }),
|
|
4333
|
+
/* @__PURE__ */ a.jsx(se, { onClick: E, children: b({ id: "inviteForm_ctaDone" }) })
|
|
4334
|
+
] }) : /* @__PURE__ */ a.jsx(se, { onClick: x, children: b({ id: "inviteForm_ctaTryAgain" }) }) })
|
|
4286
4335
|
] }) : /* @__PURE__ */ a.jsx("div", { className: "invite-form-wrapper", children: /* @__PURE__ */ a.jsxs(
|
|
4287
4336
|
"form",
|
|
4288
4337
|
{
|
|
4289
4338
|
style: { backgroundColor: i },
|
|
4290
|
-
onSubmit:
|
|
4339
|
+
onSubmit: _,
|
|
4291
4340
|
className: S("invite-form gtm-trackable"),
|
|
4292
4341
|
children: [
|
|
4293
4342
|
/* @__PURE__ */ a.jsxs("fieldset", { className: "content", children: [
|
|
@@ -4298,14 +4347,14 @@ const Yi = ({
|
|
|
4298
4347
|
{
|
|
4299
4348
|
id: "email-input",
|
|
4300
4349
|
inputClassName: "email-input input",
|
|
4301
|
-
placeholder:
|
|
4350
|
+
placeholder: b({ id: "inviteForm_email_placeholder" }),
|
|
4302
4351
|
emails: u,
|
|
4303
|
-
onChange: (
|
|
4304
|
-
f(
|
|
4352
|
+
onChange: (w) => {
|
|
4353
|
+
f(w), p(!w.length);
|
|
4305
4354
|
},
|
|
4306
4355
|
autoFocus: !1,
|
|
4307
|
-
getLabel: (
|
|
4308
|
-
/* @__PURE__ */ a.jsx("div", { "data-tag-item": !0, children:
|
|
4356
|
+
getLabel: (w, y, F) => /* @__PURE__ */ a.jsxs("div", { className: "email text-medium", children: [
|
|
4357
|
+
/* @__PURE__ */ a.jsx("div", { "data-tag-item": !0, children: w }),
|
|
4309
4358
|
/* @__PURE__ */ a.jsx(
|
|
4310
4359
|
se,
|
|
4311
4360
|
{
|
|
@@ -4313,13 +4362,13 @@ const Yi = ({
|
|
|
4313
4362
|
size: "small",
|
|
4314
4363
|
icon: { icon: "close" },
|
|
4315
4364
|
onClick: () => {
|
|
4316
|
-
|
|
4365
|
+
F(y), p(!u.length);
|
|
4317
4366
|
},
|
|
4318
4367
|
className: "remove-email-button",
|
|
4319
|
-
screenreaderText:
|
|
4368
|
+
screenreaderText: b({ id: "overlay_close" })
|
|
4320
4369
|
}
|
|
4321
4370
|
)
|
|
4322
|
-
] },
|
|
4371
|
+
] }, y)
|
|
4323
4372
|
}
|
|
4324
4373
|
)
|
|
4325
4374
|
] }),
|
|
@@ -4689,11 +4738,11 @@ const Ki = ({
|
|
|
4689
4738
|
if (!p)
|
|
4690
4739
|
return;
|
|
4691
4740
|
const g = [];
|
|
4692
|
-
["name", "email"].forEach((
|
|
4693
|
-
o.validFields[
|
|
4694
|
-
type: `validFields.${
|
|
4695
|
-
value: i[
|
|
4696
|
-
}),
|
|
4741
|
+
["name", "email"].forEach((v) => {
|
|
4742
|
+
o.validFields[v] !== i[v].current.validity.valid && (g.push({
|
|
4743
|
+
type: `validFields.${v}`,
|
|
4744
|
+
value: i[v].current.validity.valid
|
|
4745
|
+
}), v === "email" && Mr({ ref: i.email, validateEmail: r, dispatch: c }));
|
|
4697
4746
|
}), g.length && c(g);
|
|
4698
4747
|
}
|
|
4699
4748
|
},
|
|
@@ -4762,14 +4811,14 @@ const eo = {
|
|
|
4762
4811
|
url: f,
|
|
4763
4812
|
logInButton: m,
|
|
4764
4813
|
successMessage: p
|
|
4765
|
-
}, [
|
|
4766
|
-
validFields:
|
|
4767
|
-
emailDetails:
|
|
4814
|
+
}, [v, b] = Yn(ma, eo), {
|
|
4815
|
+
validFields: _,
|
|
4816
|
+
emailDetails: x,
|
|
4768
4817
|
shouldManuallyApprove: E,
|
|
4769
|
-
shouldDisableButton:
|
|
4770
|
-
showSuccessMessage:
|
|
4771
|
-
showError:
|
|
4772
|
-
} =
|
|
4818
|
+
shouldDisableButton: w,
|
|
4819
|
+
showSuccessMessage: y,
|
|
4820
|
+
showError: F
|
|
4821
|
+
} = v, [R, Q] = oa([
|
|
4773
4822
|
"signup-this-session",
|
|
4774
4823
|
"functional-cookie-consent"
|
|
4775
4824
|
]), B = {
|
|
@@ -4784,32 +4833,32 @@ const eo = {
|
|
|
4784
4833
|
ae(() => {
|
|
4785
4834
|
E === !0 && B.jobTitle.current && B.jobTitle.current.focus();
|
|
4786
4835
|
}, [E]), ae(() => {
|
|
4787
|
-
R["signup-this-session"] &&
|
|
4836
|
+
R["signup-this-session"] && b([{ type: "showSuccessMessage", value: !0 }]);
|
|
4788
4837
|
}, [R]), ae(() => {
|
|
4789
|
-
|
|
4838
|
+
y && R["functional-cookie-consent"] && Q("signup-this-session", "true", {
|
|
4790
4839
|
path: "/",
|
|
4791
4840
|
maxAge: 3600
|
|
4792
4841
|
});
|
|
4793
|
-
}, [
|
|
4842
|
+
}, [y]);
|
|
4794
4843
|
const $ = wt(() => Ji({
|
|
4795
4844
|
placeholders: n,
|
|
4796
4845
|
labels: e,
|
|
4797
4846
|
shouldShow: g,
|
|
4798
4847
|
functions: r,
|
|
4799
4848
|
refs: B,
|
|
4800
|
-
state:
|
|
4801
|
-
dispatch:
|
|
4849
|
+
state: v,
|
|
4850
|
+
dispatch: b,
|
|
4802
4851
|
dataToSubmit: o,
|
|
4803
4852
|
intl: d
|
|
4804
|
-
}), [o, r, d, B, g,
|
|
4805
|
-
return g.successMessage &&
|
|
4853
|
+
}), [o, r, d, B, g, v]), C = w ? !0 : E ? !Object.values(_).every((k) => k === !0) : !_.name || !_.email || ["exists", "pending", "verify"].includes(x.boxType);
|
|
4854
|
+
return g.successMessage && y ? /* @__PURE__ */ a.jsx(Xi, { className: t }) : /* @__PURE__ */ a.jsxs(
|
|
4806
4855
|
"fieldset",
|
|
4807
4856
|
{
|
|
4808
4857
|
className: S("signup-form-fieldset", t),
|
|
4809
4858
|
"data-testid": "signup-form",
|
|
4810
4859
|
children: [
|
|
4811
4860
|
g.title && /* @__PURE__ */ a.jsx("p", { className: "signup-title", children: /* @__PURE__ */ a.jsx(ye, { id: "signup_title" }) }),
|
|
4812
|
-
|
|
4861
|
+
F && /* @__PURE__ */ a.jsx(
|
|
4813
4862
|
He,
|
|
4814
4863
|
{
|
|
4815
4864
|
variant: "error",
|
|
@@ -4858,12 +4907,12 @@ const eo = {
|
|
|
4858
4907
|
dataToSubmit: o,
|
|
4859
4908
|
createAccount: r.createAccount,
|
|
4860
4909
|
onSuccess: r.onSuccess,
|
|
4861
|
-
dispatch:
|
|
4862
|
-
state:
|
|
4910
|
+
dispatch: b,
|
|
4911
|
+
state: v
|
|
4863
4912
|
});
|
|
4864
4913
|
},
|
|
4865
|
-
onCatch: (
|
|
4866
|
-
r.handleError(
|
|
4914
|
+
onCatch: (k) => {
|
|
4915
|
+
r.handleError(k), b([
|
|
4867
4916
|
{ type: "showSuccessMessage", value: !1 },
|
|
4868
4917
|
{ type: "showError", value: !0 }
|
|
4869
4918
|
]);
|
|
@@ -4890,66 +4939,66 @@ function to() {
|
|
|
4890
4939
|
if (Rr)
|
|
4891
4940
|
return ue;
|
|
4892
4941
|
Rr = 1;
|
|
4893
|
-
var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, n = t ? Symbol.for("react.portal") : 60106, r = t ? Symbol.for("react.fragment") : 60107, s = t ? Symbol.for("react.strict_mode") : 60108, i = t ? Symbol.for("react.profiler") : 60114, o = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, d = t ? Symbol.for("react.async_mode") : 60111, l = t ? Symbol.for("react.concurrent_mode") : 60111, u = t ? Symbol.for("react.forward_ref") : 60112, f = t ? Symbol.for("react.suspense") : 60113, m = t ? Symbol.for("react.suspense_list") : 60120, p = t ? Symbol.for("react.memo") : 60115, g = t ? Symbol.for("react.lazy") : 60116,
|
|
4894
|
-
function E(
|
|
4895
|
-
if (typeof
|
|
4896
|
-
var
|
|
4897
|
-
switch (
|
|
4942
|
+
var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, n = t ? Symbol.for("react.portal") : 60106, r = t ? Symbol.for("react.fragment") : 60107, s = t ? Symbol.for("react.strict_mode") : 60108, i = t ? Symbol.for("react.profiler") : 60114, o = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, d = t ? Symbol.for("react.async_mode") : 60111, l = t ? Symbol.for("react.concurrent_mode") : 60111, u = t ? Symbol.for("react.forward_ref") : 60112, f = t ? Symbol.for("react.suspense") : 60113, m = t ? Symbol.for("react.suspense_list") : 60120, p = t ? Symbol.for("react.memo") : 60115, g = t ? Symbol.for("react.lazy") : 60116, v = t ? Symbol.for("react.block") : 60121, b = t ? Symbol.for("react.fundamental") : 60117, _ = t ? Symbol.for("react.responder") : 60118, x = t ? Symbol.for("react.scope") : 60119;
|
|
4943
|
+
function E(y) {
|
|
4944
|
+
if (typeof y == "object" && y !== null) {
|
|
4945
|
+
var F = y.$$typeof;
|
|
4946
|
+
switch (F) {
|
|
4898
4947
|
case e:
|
|
4899
|
-
switch (
|
|
4948
|
+
switch (y = y.type, y) {
|
|
4900
4949
|
case d:
|
|
4901
4950
|
case l:
|
|
4902
4951
|
case r:
|
|
4903
4952
|
case i:
|
|
4904
4953
|
case s:
|
|
4905
4954
|
case f:
|
|
4906
|
-
return
|
|
4955
|
+
return y;
|
|
4907
4956
|
default:
|
|
4908
|
-
switch (
|
|
4957
|
+
switch (y = y && y.$$typeof, y) {
|
|
4909
4958
|
case c:
|
|
4910
4959
|
case u:
|
|
4911
4960
|
case g:
|
|
4912
4961
|
case p:
|
|
4913
4962
|
case o:
|
|
4914
|
-
return
|
|
4963
|
+
return y;
|
|
4915
4964
|
default:
|
|
4916
|
-
return
|
|
4965
|
+
return F;
|
|
4917
4966
|
}
|
|
4918
4967
|
}
|
|
4919
4968
|
case n:
|
|
4920
|
-
return
|
|
4969
|
+
return F;
|
|
4921
4970
|
}
|
|
4922
4971
|
}
|
|
4923
4972
|
}
|
|
4924
|
-
function
|
|
4925
|
-
return E(
|
|
4973
|
+
function w(y) {
|
|
4974
|
+
return E(y) === l;
|
|
4926
4975
|
}
|
|
4927
|
-
return ue.AsyncMode = d, ue.ConcurrentMode = l, ue.ContextConsumer = c, ue.ContextProvider = o, ue.Element = e, ue.ForwardRef = u, ue.Fragment = r, ue.Lazy = g, ue.Memo = p, ue.Portal = n, ue.Profiler = i, ue.StrictMode = s, ue.Suspense = f, ue.isAsyncMode = function(
|
|
4928
|
-
return
|
|
4929
|
-
}, ue.isConcurrentMode =
|
|
4930
|
-
return E(
|
|
4931
|
-
}, ue.isContextProvider = function(
|
|
4932
|
-
return E(
|
|
4933
|
-
}, ue.isElement = function(
|
|
4934
|
-
return typeof
|
|
4935
|
-
}, ue.isForwardRef = function(
|
|
4936
|
-
return E(
|
|
4937
|
-
}, ue.isFragment = function(
|
|
4938
|
-
return E(
|
|
4939
|
-
}, ue.isLazy = function(
|
|
4940
|
-
return E(
|
|
4941
|
-
}, ue.isMemo = function(
|
|
4942
|
-
return E(
|
|
4943
|
-
}, ue.isPortal = function(
|
|
4944
|
-
return E(
|
|
4945
|
-
}, ue.isProfiler = function(
|
|
4946
|
-
return E(
|
|
4947
|
-
}, ue.isStrictMode = function(
|
|
4948
|
-
return E(
|
|
4949
|
-
}, ue.isSuspense = function(
|
|
4950
|
-
return E(
|
|
4951
|
-
}, ue.isValidElementType = function(
|
|
4952
|
-
return typeof
|
|
4976
|
+
return ue.AsyncMode = d, ue.ConcurrentMode = l, ue.ContextConsumer = c, ue.ContextProvider = o, ue.Element = e, ue.ForwardRef = u, ue.Fragment = r, ue.Lazy = g, ue.Memo = p, ue.Portal = n, ue.Profiler = i, ue.StrictMode = s, ue.Suspense = f, ue.isAsyncMode = function(y) {
|
|
4977
|
+
return w(y) || E(y) === d;
|
|
4978
|
+
}, ue.isConcurrentMode = w, ue.isContextConsumer = function(y) {
|
|
4979
|
+
return E(y) === c;
|
|
4980
|
+
}, ue.isContextProvider = function(y) {
|
|
4981
|
+
return E(y) === o;
|
|
4982
|
+
}, ue.isElement = function(y) {
|
|
4983
|
+
return typeof y == "object" && y !== null && y.$$typeof === e;
|
|
4984
|
+
}, ue.isForwardRef = function(y) {
|
|
4985
|
+
return E(y) === u;
|
|
4986
|
+
}, ue.isFragment = function(y) {
|
|
4987
|
+
return E(y) === r;
|
|
4988
|
+
}, ue.isLazy = function(y) {
|
|
4989
|
+
return E(y) === g;
|
|
4990
|
+
}, ue.isMemo = function(y) {
|
|
4991
|
+
return E(y) === p;
|
|
4992
|
+
}, ue.isPortal = function(y) {
|
|
4993
|
+
return E(y) === n;
|
|
4994
|
+
}, ue.isProfiler = function(y) {
|
|
4995
|
+
return E(y) === i;
|
|
4996
|
+
}, ue.isStrictMode = function(y) {
|
|
4997
|
+
return E(y) === s;
|
|
4998
|
+
}, ue.isSuspense = function(y) {
|
|
4999
|
+
return E(y) === f;
|
|
5000
|
+
}, ue.isValidElementType = function(y) {
|
|
5001
|
+
return typeof y == "string" || typeof y == "function" || y === r || y === l || y === i || y === s || y === f || y === m || typeof y == "object" && y !== null && (y.$$typeof === g || y.$$typeof === p || y.$$typeof === o || y.$$typeof === c || y.$$typeof === u || y.$$typeof === b || y.$$typeof === _ || y.$$typeof === x || y.$$typeof === v);
|
|
4953
5002
|
}, ue.typeOf = E, ue;
|
|
4954
5003
|
}
|
|
4955
5004
|
var de = {};
|
|
@@ -4964,17 +5013,17 @@ var de = {};
|
|
|
4964
5013
|
var Fr;
|
|
4965
5014
|
function no() {
|
|
4966
5015
|
return Fr || (Fr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
4967
|
-
var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, n = t ? Symbol.for("react.portal") : 60106, r = t ? Symbol.for("react.fragment") : 60107, s = t ? Symbol.for("react.strict_mode") : 60108, i = t ? Symbol.for("react.profiler") : 60114, o = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, d = t ? Symbol.for("react.async_mode") : 60111, l = t ? Symbol.for("react.concurrent_mode") : 60111, u = t ? Symbol.for("react.forward_ref") : 60112, f = t ? Symbol.for("react.suspense") : 60113, m = t ? Symbol.for("react.suspense_list") : 60120, p = t ? Symbol.for("react.memo") : 60115, g = t ? Symbol.for("react.lazy") : 60116,
|
|
4968
|
-
function E(
|
|
4969
|
-
return typeof
|
|
4970
|
-
|
|
4971
|
-
}
|
|
4972
|
-
function
|
|
4973
|
-
if (typeof
|
|
4974
|
-
var ve =
|
|
5016
|
+
var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, n = t ? Symbol.for("react.portal") : 60106, r = t ? Symbol.for("react.fragment") : 60107, s = t ? Symbol.for("react.strict_mode") : 60108, i = t ? Symbol.for("react.profiler") : 60114, o = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, d = t ? Symbol.for("react.async_mode") : 60111, l = t ? Symbol.for("react.concurrent_mode") : 60111, u = t ? Symbol.for("react.forward_ref") : 60112, f = t ? Symbol.for("react.suspense") : 60113, m = t ? Symbol.for("react.suspense_list") : 60120, p = t ? Symbol.for("react.memo") : 60115, g = t ? Symbol.for("react.lazy") : 60116, v = t ? Symbol.for("react.block") : 60121, b = t ? Symbol.for("react.fundamental") : 60117, _ = t ? Symbol.for("react.responder") : 60118, x = t ? Symbol.for("react.scope") : 60119;
|
|
5017
|
+
function E(D) {
|
|
5018
|
+
return typeof D == "string" || typeof D == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
5019
|
+
D === r || D === l || D === i || D === s || D === f || D === m || typeof D == "object" && D !== null && (D.$$typeof === g || D.$$typeof === p || D.$$typeof === o || D.$$typeof === c || D.$$typeof === u || D.$$typeof === b || D.$$typeof === _ || D.$$typeof === x || D.$$typeof === v);
|
|
5020
|
+
}
|
|
5021
|
+
function w(D) {
|
|
5022
|
+
if (typeof D == "object" && D !== null) {
|
|
5023
|
+
var ve = D.$$typeof;
|
|
4975
5024
|
switch (ve) {
|
|
4976
5025
|
case e:
|
|
4977
|
-
var Ne =
|
|
5026
|
+
var Ne = D.type;
|
|
4978
5027
|
switch (Ne) {
|
|
4979
5028
|
case d:
|
|
4980
5029
|
case l:
|
|
@@ -5001,47 +5050,47 @@ function no() {
|
|
|
5001
5050
|
}
|
|
5002
5051
|
}
|
|
5003
5052
|
}
|
|
5004
|
-
var
|
|
5005
|
-
function K(
|
|
5006
|
-
return z || (z = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), T(
|
|
5053
|
+
var y = d, F = l, R = c, Q = o, B = e, $ = u, C = r, k = g, j = p, N = n, A = i, W = s, Z = f, z = !1;
|
|
5054
|
+
function K(D) {
|
|
5055
|
+
return z || (z = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), T(D) || w(D) === d;
|
|
5007
5056
|
}
|
|
5008
|
-
function T(
|
|
5009
|
-
return
|
|
5057
|
+
function T(D) {
|
|
5058
|
+
return w(D) === l;
|
|
5010
5059
|
}
|
|
5011
|
-
function P(
|
|
5012
|
-
return
|
|
5060
|
+
function P(D) {
|
|
5061
|
+
return w(D) === c;
|
|
5013
5062
|
}
|
|
5014
|
-
function q(
|
|
5015
|
-
return
|
|
5063
|
+
function q(D) {
|
|
5064
|
+
return w(D) === o;
|
|
5016
5065
|
}
|
|
5017
|
-
function L(
|
|
5018
|
-
return typeof
|
|
5066
|
+
function L(D) {
|
|
5067
|
+
return typeof D == "object" && D !== null && D.$$typeof === e;
|
|
5019
5068
|
}
|
|
5020
|
-
function U(
|
|
5021
|
-
return
|
|
5069
|
+
function U(D) {
|
|
5070
|
+
return w(D) === u;
|
|
5022
5071
|
}
|
|
5023
|
-
function te(
|
|
5024
|
-
return
|
|
5072
|
+
function te(D) {
|
|
5073
|
+
return w(D) === r;
|
|
5025
5074
|
}
|
|
5026
|
-
function G(
|
|
5027
|
-
return
|
|
5075
|
+
function G(D) {
|
|
5076
|
+
return w(D) === g;
|
|
5028
5077
|
}
|
|
5029
|
-
function V(
|
|
5030
|
-
return
|
|
5078
|
+
function V(D) {
|
|
5079
|
+
return w(D) === p;
|
|
5031
5080
|
}
|
|
5032
|
-
function ee(
|
|
5033
|
-
return
|
|
5081
|
+
function ee(D) {
|
|
5082
|
+
return w(D) === n;
|
|
5034
5083
|
}
|
|
5035
|
-
function re(
|
|
5036
|
-
return
|
|
5084
|
+
function re(D) {
|
|
5085
|
+
return w(D) === i;
|
|
5037
5086
|
}
|
|
5038
|
-
function
|
|
5039
|
-
return
|
|
5087
|
+
function O(D) {
|
|
5088
|
+
return w(D) === s;
|
|
5040
5089
|
}
|
|
5041
|
-
function oe(
|
|
5042
|
-
return
|
|
5090
|
+
function oe(D) {
|
|
5091
|
+
return w(D) === f;
|
|
5043
5092
|
}
|
|
5044
|
-
de.AsyncMode =
|
|
5093
|
+
de.AsyncMode = y, de.ConcurrentMode = F, de.ContextConsumer = R, de.ContextProvider = Q, de.Element = B, de.ForwardRef = $, de.Fragment = C, de.Lazy = k, de.Memo = j, de.Portal = N, de.Profiler = A, de.StrictMode = W, de.Suspense = Z, de.isAsyncMode = K, de.isConcurrentMode = T, de.isContextConsumer = P, de.isContextProvider = q, de.isElement = L, de.isForwardRef = U, de.isFragment = te, de.isLazy = G, de.isMemo = V, de.isPortal = ee, de.isProfiler = re, de.isStrictMode = O, de.isSuspense = oe, de.isValidElementType = E, de.typeOf = w;
|
|
5045
5094
|
}()), de;
|
|
5046
5095
|
}
|
|
5047
5096
|
var Or;
|
|
@@ -5188,122 +5237,122 @@ function so() {
|
|
|
5188
5237
|
return P;
|
|
5189
5238
|
}
|
|
5190
5239
|
var m = "<<anonymous>>", p = {
|
|
5191
|
-
array:
|
|
5192
|
-
bigint:
|
|
5193
|
-
bool:
|
|
5194
|
-
func:
|
|
5195
|
-
number:
|
|
5196
|
-
object:
|
|
5197
|
-
string:
|
|
5198
|
-
symbol:
|
|
5199
|
-
any:
|
|
5240
|
+
array: _("array"),
|
|
5241
|
+
bigint: _("bigint"),
|
|
5242
|
+
bool: _("boolean"),
|
|
5243
|
+
func: _("function"),
|
|
5244
|
+
number: _("number"),
|
|
5245
|
+
object: _("object"),
|
|
5246
|
+
string: _("string"),
|
|
5247
|
+
symbol: _("symbol"),
|
|
5248
|
+
any: x(),
|
|
5200
5249
|
arrayOf: E,
|
|
5201
|
-
element:
|
|
5202
|
-
elementType:
|
|
5203
|
-
instanceOf:
|
|
5250
|
+
element: w(),
|
|
5251
|
+
elementType: y(),
|
|
5252
|
+
instanceOf: F,
|
|
5204
5253
|
node: $(),
|
|
5205
5254
|
objectOf: Q,
|
|
5206
5255
|
oneOf: R,
|
|
5207
5256
|
oneOfType: B,
|
|
5208
|
-
shape:
|
|
5209
|
-
exact:
|
|
5257
|
+
shape: k,
|
|
5258
|
+
exact: j
|
|
5210
5259
|
};
|
|
5211
5260
|
function g(T, P) {
|
|
5212
5261
|
return T === P ? T !== 0 || 1 / T === 1 / P : T !== T && P !== P;
|
|
5213
5262
|
}
|
|
5214
|
-
function
|
|
5263
|
+
function v(T, P) {
|
|
5215
5264
|
this.message = T, this.data = P && typeof P == "object" ? P : {}, this.stack = "";
|
|
5216
5265
|
}
|
|
5217
|
-
|
|
5218
|
-
function
|
|
5266
|
+
v.prototype = Error.prototype;
|
|
5267
|
+
function b(T) {
|
|
5219
5268
|
if (process.env.NODE_ENV !== "production")
|
|
5220
5269
|
var P = {}, q = 0;
|
|
5221
|
-
function L(te, G, V, ee, re,
|
|
5222
|
-
if (ee = ee || m,
|
|
5270
|
+
function L(te, G, V, ee, re, O, oe) {
|
|
5271
|
+
if (ee = ee || m, O = O || V, oe !== n) {
|
|
5223
5272
|
if (d) {
|
|
5224
|
-
var
|
|
5273
|
+
var D = new Error(
|
|
5225
5274
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
5226
5275
|
);
|
|
5227
|
-
throw
|
|
5276
|
+
throw D.name = "Invariant Violation", D;
|
|
5228
5277
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
5229
5278
|
var ve = ee + ":" + V;
|
|
5230
5279
|
!P[ve] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
5231
5280
|
q < 3 && (i(
|
|
5232
|
-
"You are manually calling a React.PropTypes validation function for the `" +
|
|
5281
|
+
"You are manually calling a React.PropTypes validation function for the `" + O + "` prop on `" + ee + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
5233
5282
|
), P[ve] = !0, q++);
|
|
5234
5283
|
}
|
|
5235
5284
|
}
|
|
5236
|
-
return G[V] == null ? te ? G[V] === null ? new
|
|
5285
|
+
return G[V] == null ? te ? G[V] === null ? new v("The " + re + " `" + O + "` is marked as required " + ("in `" + ee + "`, but its value is `null`.")) : new v("The " + re + " `" + O + "` is marked as required in " + ("`" + ee + "`, but its value is `undefined`.")) : null : T(G, V, ee, re, O);
|
|
5237
5286
|
}
|
|
5238
5287
|
var U = L.bind(null, !1);
|
|
5239
5288
|
return U.isRequired = L.bind(null, !0), U;
|
|
5240
5289
|
}
|
|
5241
|
-
function
|
|
5290
|
+
function _(T) {
|
|
5242
5291
|
function P(q, L, U, te, G, V) {
|
|
5243
5292
|
var ee = q[L], re = W(ee);
|
|
5244
5293
|
if (re !== T) {
|
|
5245
|
-
var
|
|
5246
|
-
return new
|
|
5247
|
-
"Invalid " + te + " `" + G + "` of type " + ("`" +
|
|
5294
|
+
var O = Z(ee);
|
|
5295
|
+
return new v(
|
|
5296
|
+
"Invalid " + te + " `" + G + "` of type " + ("`" + O + "` supplied to `" + U + "`, expected ") + ("`" + T + "`."),
|
|
5248
5297
|
{ expectedType: T }
|
|
5249
5298
|
);
|
|
5250
5299
|
}
|
|
5251
5300
|
return null;
|
|
5252
5301
|
}
|
|
5253
|
-
return
|
|
5302
|
+
return b(P);
|
|
5254
5303
|
}
|
|
5255
|
-
function
|
|
5256
|
-
return
|
|
5304
|
+
function x() {
|
|
5305
|
+
return b(o);
|
|
5257
5306
|
}
|
|
5258
5307
|
function E(T) {
|
|
5259
5308
|
function P(q, L, U, te, G) {
|
|
5260
5309
|
if (typeof T != "function")
|
|
5261
|
-
return new
|
|
5310
|
+
return new v("Property `" + G + "` of component `" + U + "` has invalid PropType notation inside arrayOf.");
|
|
5262
5311
|
var V = q[L];
|
|
5263
5312
|
if (!Array.isArray(V)) {
|
|
5264
5313
|
var ee = W(V);
|
|
5265
|
-
return new
|
|
5314
|
+
return new v("Invalid " + te + " `" + G + "` of type " + ("`" + ee + "` supplied to `" + U + "`, expected an array."));
|
|
5266
5315
|
}
|
|
5267
5316
|
for (var re = 0; re < V.length; re++) {
|
|
5268
|
-
var
|
|
5269
|
-
if (
|
|
5270
|
-
return
|
|
5317
|
+
var O = T(V, re, U, te, G + "[" + re + "]", n);
|
|
5318
|
+
if (O instanceof Error)
|
|
5319
|
+
return O;
|
|
5271
5320
|
}
|
|
5272
5321
|
return null;
|
|
5273
5322
|
}
|
|
5274
|
-
return
|
|
5323
|
+
return b(P);
|
|
5275
5324
|
}
|
|
5276
|
-
function
|
|
5325
|
+
function w() {
|
|
5277
5326
|
function T(P, q, L, U, te) {
|
|
5278
5327
|
var G = P[q];
|
|
5279
5328
|
if (!c(G)) {
|
|
5280
5329
|
var V = W(G);
|
|
5281
|
-
return new
|
|
5330
|
+
return new v("Invalid " + U + " `" + te + "` of type " + ("`" + V + "` supplied to `" + L + "`, expected a single ReactElement."));
|
|
5282
5331
|
}
|
|
5283
5332
|
return null;
|
|
5284
5333
|
}
|
|
5285
|
-
return
|
|
5334
|
+
return b(T);
|
|
5286
5335
|
}
|
|
5287
|
-
function
|
|
5336
|
+
function y() {
|
|
5288
5337
|
function T(P, q, L, U, te) {
|
|
5289
5338
|
var G = P[q];
|
|
5290
5339
|
if (!t.isValidElementType(G)) {
|
|
5291
5340
|
var V = W(G);
|
|
5292
|
-
return new
|
|
5341
|
+
return new v("Invalid " + U + " `" + te + "` of type " + ("`" + V + "` supplied to `" + L + "`, expected a single ReactElement type."));
|
|
5293
5342
|
}
|
|
5294
5343
|
return null;
|
|
5295
5344
|
}
|
|
5296
|
-
return
|
|
5345
|
+
return b(T);
|
|
5297
5346
|
}
|
|
5298
|
-
function
|
|
5347
|
+
function F(T) {
|
|
5299
5348
|
function P(q, L, U, te, G) {
|
|
5300
5349
|
if (!(q[L] instanceof T)) {
|
|
5301
5350
|
var V = T.name || m, ee = K(q[L]);
|
|
5302
|
-
return new
|
|
5351
|
+
return new v("Invalid " + te + " `" + G + "` of type " + ("`" + ee + "` supplied to `" + U + "`, expected ") + ("instance of `" + V + "`."));
|
|
5303
5352
|
}
|
|
5304
5353
|
return null;
|
|
5305
5354
|
}
|
|
5306
|
-
return
|
|
5355
|
+
return b(P);
|
|
5307
5356
|
}
|
|
5308
5357
|
function R(T) {
|
|
5309
5358
|
if (!Array.isArray(T))
|
|
@@ -5314,30 +5363,30 @@ function so() {
|
|
|
5314
5363
|
for (var V = q[L], ee = 0; ee < T.length; ee++)
|
|
5315
5364
|
if (g(V, T[ee]))
|
|
5316
5365
|
return null;
|
|
5317
|
-
var re = JSON.stringify(T, function(oe,
|
|
5318
|
-
var ve = Z(
|
|
5319
|
-
return ve === "symbol" ? String(
|
|
5366
|
+
var re = JSON.stringify(T, function(oe, D) {
|
|
5367
|
+
var ve = Z(D);
|
|
5368
|
+
return ve === "symbol" ? String(D) : D;
|
|
5320
5369
|
});
|
|
5321
|
-
return new
|
|
5370
|
+
return new v("Invalid " + te + " `" + G + "` of value `" + String(V) + "` " + ("supplied to `" + U + "`, expected one of " + re + "."));
|
|
5322
5371
|
}
|
|
5323
|
-
return
|
|
5372
|
+
return b(P);
|
|
5324
5373
|
}
|
|
5325
5374
|
function Q(T) {
|
|
5326
5375
|
function P(q, L, U, te, G) {
|
|
5327
5376
|
if (typeof T != "function")
|
|
5328
|
-
return new
|
|
5377
|
+
return new v("Property `" + G + "` of component `" + U + "` has invalid PropType notation inside objectOf.");
|
|
5329
5378
|
var V = q[L], ee = W(V);
|
|
5330
5379
|
if (ee !== "object")
|
|
5331
|
-
return new
|
|
5380
|
+
return new v("Invalid " + te + " `" + G + "` of type " + ("`" + ee + "` supplied to `" + U + "`, expected an object."));
|
|
5332
5381
|
for (var re in V)
|
|
5333
5382
|
if (r(V, re)) {
|
|
5334
|
-
var
|
|
5335
|
-
if (
|
|
5336
|
-
return
|
|
5383
|
+
var O = T(V, re, U, te, G + "." + re, n);
|
|
5384
|
+
if (O instanceof Error)
|
|
5385
|
+
return O;
|
|
5337
5386
|
}
|
|
5338
5387
|
return null;
|
|
5339
5388
|
}
|
|
5340
|
-
return
|
|
5389
|
+
return b(P);
|
|
5341
5390
|
}
|
|
5342
5391
|
function B(T) {
|
|
5343
5392
|
if (!Array.isArray(T))
|
|
@@ -5350,67 +5399,67 @@ function so() {
|
|
|
5350
5399
|
), o;
|
|
5351
5400
|
}
|
|
5352
5401
|
function L(U, te, G, V, ee) {
|
|
5353
|
-
for (var re = [],
|
|
5354
|
-
var oe = T[
|
|
5355
|
-
if (
|
|
5402
|
+
for (var re = [], O = 0; O < T.length; O++) {
|
|
5403
|
+
var oe = T[O], D = oe(U, te, G, V, ee, n);
|
|
5404
|
+
if (D == null)
|
|
5356
5405
|
return null;
|
|
5357
|
-
|
|
5406
|
+
D.data && r(D.data, "expectedType") && re.push(D.data.expectedType);
|
|
5358
5407
|
}
|
|
5359
5408
|
var ve = re.length > 0 ? ", expected one of type [" + re.join(", ") + "]" : "";
|
|
5360
|
-
return new
|
|
5409
|
+
return new v("Invalid " + V + " `" + ee + "` supplied to " + ("`" + G + "`" + ve + "."));
|
|
5361
5410
|
}
|
|
5362
|
-
return
|
|
5411
|
+
return b(L);
|
|
5363
5412
|
}
|
|
5364
5413
|
function $() {
|
|
5365
5414
|
function T(P, q, L, U, te) {
|
|
5366
|
-
return N(P[q]) ? null : new
|
|
5415
|
+
return N(P[q]) ? null : new v("Invalid " + U + " `" + te + "` supplied to " + ("`" + L + "`, expected a ReactNode."));
|
|
5367
5416
|
}
|
|
5368
|
-
return
|
|
5417
|
+
return b(T);
|
|
5369
5418
|
}
|
|
5370
5419
|
function C(T, P, q, L, U) {
|
|
5371
|
-
return new
|
|
5420
|
+
return new v(
|
|
5372
5421
|
(T || "React class") + ": " + P + " type `" + q + "." + L + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + U + "`."
|
|
5373
5422
|
);
|
|
5374
5423
|
}
|
|
5375
|
-
function
|
|
5424
|
+
function k(T) {
|
|
5376
5425
|
function P(q, L, U, te, G) {
|
|
5377
5426
|
var V = q[L], ee = W(V);
|
|
5378
5427
|
if (ee !== "object")
|
|
5379
|
-
return new
|
|
5428
|
+
return new v("Invalid " + te + " `" + G + "` of type `" + ee + "` " + ("supplied to `" + U + "`, expected `object`."));
|
|
5380
5429
|
for (var re in T) {
|
|
5381
|
-
var
|
|
5382
|
-
if (typeof
|
|
5383
|
-
return C(U, te, G, re, Z(
|
|
5384
|
-
var oe =
|
|
5430
|
+
var O = T[re];
|
|
5431
|
+
if (typeof O != "function")
|
|
5432
|
+
return C(U, te, G, re, Z(O));
|
|
5433
|
+
var oe = O(V, re, U, te, G + "." + re, n);
|
|
5385
5434
|
if (oe)
|
|
5386
5435
|
return oe;
|
|
5387
5436
|
}
|
|
5388
5437
|
return null;
|
|
5389
5438
|
}
|
|
5390
|
-
return
|
|
5439
|
+
return b(P);
|
|
5391
5440
|
}
|
|
5392
|
-
function
|
|
5441
|
+
function j(T) {
|
|
5393
5442
|
function P(q, L, U, te, G) {
|
|
5394
5443
|
var V = q[L], ee = W(V);
|
|
5395
5444
|
if (ee !== "object")
|
|
5396
|
-
return new
|
|
5445
|
+
return new v("Invalid " + te + " `" + G + "` of type `" + ee + "` " + ("supplied to `" + U + "`, expected `object`."));
|
|
5397
5446
|
var re = e({}, q[L], T);
|
|
5398
|
-
for (var
|
|
5399
|
-
var oe = T[
|
|
5400
|
-
if (r(T,
|
|
5401
|
-
return C(U, te, G,
|
|
5447
|
+
for (var O in re) {
|
|
5448
|
+
var oe = T[O];
|
|
5449
|
+
if (r(T, O) && typeof oe != "function")
|
|
5450
|
+
return C(U, te, G, O, Z(oe));
|
|
5402
5451
|
if (!oe)
|
|
5403
|
-
return new
|
|
5404
|
-
"Invalid " + te + " `" + G + "` key `" +
|
|
5452
|
+
return new v(
|
|
5453
|
+
"Invalid " + te + " `" + G + "` key `" + O + "` supplied to `" + U + "`.\nBad object: " + JSON.stringify(q[L], null, " ") + `
|
|
5405
5454
|
Valid keys: ` + JSON.stringify(Object.keys(T), null, " ")
|
|
5406
5455
|
);
|
|
5407
|
-
var
|
|
5408
|
-
if (
|
|
5409
|
-
return
|
|
5456
|
+
var D = oe(V, O, U, te, G + "." + O, n);
|
|
5457
|
+
if (D)
|
|
5458
|
+
return D;
|
|
5410
5459
|
}
|
|
5411
5460
|
return null;
|
|
5412
5461
|
}
|
|
5413
|
-
return
|
|
5462
|
+
return b(P);
|
|
5414
5463
|
}
|
|
5415
5464
|
function N(T) {
|
|
5416
5465
|
switch (typeof T) {
|
|
@@ -5445,12 +5494,12 @@ Valid keys: ` + JSON.stringify(Object.keys(T), null, " ")
|
|
|
5445
5494
|
return !1;
|
|
5446
5495
|
}
|
|
5447
5496
|
}
|
|
5448
|
-
function
|
|
5497
|
+
function A(T, P) {
|
|
5449
5498
|
return T === "symbol" ? !0 : P ? P["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && P instanceof Symbol : !1;
|
|
5450
5499
|
}
|
|
5451
5500
|
function W(T) {
|
|
5452
5501
|
var P = typeof T;
|
|
5453
|
-
return Array.isArray(T) ? "array" : T instanceof RegExp ? "object" :
|
|
5502
|
+
return Array.isArray(T) ? "array" : T instanceof RegExp ? "object" : A(P, T) ? "symbol" : P;
|
|
5454
5503
|
}
|
|
5455
5504
|
function Z(T) {
|
|
5456
5505
|
if (typeof T > "u" || T === null)
|
|
@@ -5870,67 +5919,67 @@ var Zr = {
|
|
|
5870
5919
|
delayInitialFocusTimer: void 0,
|
|
5871
5920
|
// the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
|
|
5872
5921
|
recentNavEvent: void 0
|
|
5873
|
-
}, c, d = function(
|
|
5874
|
-
return
|
|
5875
|
-
}, l = function(
|
|
5876
|
-
var N = typeof (
|
|
5877
|
-
return o.containerGroups.findIndex(function(
|
|
5878
|
-
var W =
|
|
5879
|
-
return W.contains(
|
|
5922
|
+
}, c, d = function(k, j, N) {
|
|
5923
|
+
return k && k[j] !== void 0 ? k[j] : i[N || j];
|
|
5924
|
+
}, l = function(k, j) {
|
|
5925
|
+
var N = typeof (j == null ? void 0 : j.composedPath) == "function" ? j.composedPath() : void 0;
|
|
5926
|
+
return o.containerGroups.findIndex(function(A) {
|
|
5927
|
+
var W = A.container, Z = A.tabbableNodes;
|
|
5928
|
+
return W.contains(k) || // fall back to explicit tabbable search which will take into consideration any
|
|
5880
5929
|
// web components if the `tabbableOptions.getShadowRoot` option was used for
|
|
5881
5930
|
// the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
|
|
5882
5931
|
// look inside web components even if open)
|
|
5883
5932
|
(N == null ? void 0 : N.includes(W)) || Z.find(function(z) {
|
|
5884
|
-
return z ===
|
|
5933
|
+
return z === k;
|
|
5885
5934
|
});
|
|
5886
5935
|
});
|
|
5887
|
-
}, u = function(
|
|
5888
|
-
var
|
|
5889
|
-
if (typeof
|
|
5890
|
-
for (var N = arguments.length,
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
}
|
|
5894
|
-
if (
|
|
5895
|
-
if (
|
|
5896
|
-
return
|
|
5897
|
-
throw new Error("`".concat(
|
|
5898
|
-
}
|
|
5899
|
-
var Z =
|
|
5900
|
-
if (typeof
|
|
5901
|
-
throw new Error("`".concat(
|
|
5936
|
+
}, u = function(k) {
|
|
5937
|
+
var j = i[k];
|
|
5938
|
+
if (typeof j == "function") {
|
|
5939
|
+
for (var N = arguments.length, A = new Array(N > 1 ? N - 1 : 0), W = 1; W < N; W++)
|
|
5940
|
+
A[W - 1] = arguments[W];
|
|
5941
|
+
j = j.apply(void 0, A);
|
|
5942
|
+
}
|
|
5943
|
+
if (j === !0 && (j = void 0), !j) {
|
|
5944
|
+
if (j === void 0 || j === !1)
|
|
5945
|
+
return j;
|
|
5946
|
+
throw new Error("`".concat(k, "` was specified but was not a node, or did not return a node"));
|
|
5947
|
+
}
|
|
5948
|
+
var Z = j;
|
|
5949
|
+
if (typeof j == "string" && (Z = r.querySelector(j), !Z))
|
|
5950
|
+
throw new Error("`".concat(k, "` as selector refers to no known node"));
|
|
5902
5951
|
return Z;
|
|
5903
5952
|
}, f = function() {
|
|
5904
|
-
var
|
|
5905
|
-
if (
|
|
5953
|
+
var k = u("initialFocus");
|
|
5954
|
+
if (k === !1)
|
|
5906
5955
|
return !1;
|
|
5907
|
-
if (
|
|
5956
|
+
if (k === void 0 || !qt(k, i.tabbableOptions))
|
|
5908
5957
|
if (l(r.activeElement) >= 0)
|
|
5909
|
-
|
|
5958
|
+
k = r.activeElement;
|
|
5910
5959
|
else {
|
|
5911
|
-
var
|
|
5912
|
-
|
|
5960
|
+
var j = o.tabbableGroups[0], N = j && j.firstTabbableNode;
|
|
5961
|
+
k = N || u("fallbackFocus");
|
|
5913
5962
|
}
|
|
5914
|
-
if (!
|
|
5963
|
+
if (!k)
|
|
5915
5964
|
throw new Error("Your focus-trap needs to have at least one focusable element");
|
|
5916
|
-
return
|
|
5965
|
+
return k;
|
|
5917
5966
|
}, m = function() {
|
|
5918
|
-
if (o.containerGroups = o.containers.map(function(
|
|
5919
|
-
var
|
|
5967
|
+
if (o.containerGroups = o.containers.map(function(k) {
|
|
5968
|
+
var j = Ia(k, i.tabbableOptions), N = La(k, i.tabbableOptions), A = j.length > 0 ? j[0] : void 0, W = j.length > 0 ? j[j.length - 1] : void 0, Z = N.find(function(T) {
|
|
5920
5969
|
return We(T);
|
|
5921
5970
|
}), z = N.slice().reverse().find(function(T) {
|
|
5922
5971
|
return We(T);
|
|
5923
|
-
}), K = !!
|
|
5972
|
+
}), K = !!j.find(function(T) {
|
|
5924
5973
|
return Ie(T) > 0;
|
|
5925
5974
|
});
|
|
5926
5975
|
return {
|
|
5927
|
-
container:
|
|
5928
|
-
tabbableNodes:
|
|
5976
|
+
container: k,
|
|
5977
|
+
tabbableNodes: j,
|
|
5929
5978
|
focusableNodes: N,
|
|
5930
5979
|
/** True if at least one node with positive `tabindex` was found in this container. */
|
|
5931
5980
|
posTabIndexesFound: K,
|
|
5932
5981
|
/** First tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
5933
|
-
firstTabbableNode:
|
|
5982
|
+
firstTabbableNode: A,
|
|
5934
5983
|
/** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
5935
5984
|
lastTabbableNode: W,
|
|
5936
5985
|
// NOTE: DOM order is NOT NECESSARILY "document position" order, but figuring that out
|
|
@@ -5953,75 +6002,75 @@ var Zr = {
|
|
|
5953
6002
|
* @returns {HTMLElement|undefined} The next tabbable node, if any.
|
|
5954
6003
|
*/
|
|
5955
6004
|
nextTabbableNode: function(P) {
|
|
5956
|
-
var q = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, L =
|
|
6005
|
+
var q = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, L = j.indexOf(P);
|
|
5957
6006
|
return L < 0 ? q ? N.slice(N.indexOf(P) + 1).find(function(U) {
|
|
5958
6007
|
return We(U);
|
|
5959
6008
|
}) : N.slice(0, N.indexOf(P)).reverse().find(function(U) {
|
|
5960
6009
|
return We(U);
|
|
5961
|
-
}) :
|
|
6010
|
+
}) : j[L + (q ? 1 : -1)];
|
|
5962
6011
|
}
|
|
5963
6012
|
};
|
|
5964
|
-
}), o.tabbableGroups = o.containerGroups.filter(function(
|
|
5965
|
-
return
|
|
6013
|
+
}), o.tabbableGroups = o.containerGroups.filter(function(k) {
|
|
6014
|
+
return k.tabbableNodes.length > 0;
|
|
5966
6015
|
}), o.tabbableGroups.length <= 0 && !u("fallbackFocus"))
|
|
5967
6016
|
throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
|
|
5968
|
-
if (o.containerGroups.find(function(
|
|
5969
|
-
return
|
|
6017
|
+
if (o.containerGroups.find(function(k) {
|
|
6018
|
+
return k.posTabIndexesFound;
|
|
5970
6019
|
}) && o.containerGroups.length > 1)
|
|
5971
6020
|
throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
|
|
5972
|
-
}, p = function C(
|
|
5973
|
-
var
|
|
5974
|
-
if (
|
|
5975
|
-
return
|
|
5976
|
-
}, g = function C(
|
|
5977
|
-
if (
|
|
5978
|
-
if (!
|
|
6021
|
+
}, p = function C(k) {
|
|
6022
|
+
var j = k.activeElement;
|
|
6023
|
+
if (j)
|
|
6024
|
+
return j.shadowRoot && j.shadowRoot.activeElement !== null ? C(j.shadowRoot) : j;
|
|
6025
|
+
}, g = function C(k) {
|
|
6026
|
+
if (k !== !1 && k !== p(document)) {
|
|
6027
|
+
if (!k || !k.focus) {
|
|
5979
6028
|
C(f());
|
|
5980
6029
|
return;
|
|
5981
6030
|
}
|
|
5982
|
-
|
|
6031
|
+
k.focus({
|
|
5983
6032
|
preventScroll: !!i.preventScroll
|
|
5984
|
-
}), o.mostRecentlyFocusedNode =
|
|
5985
|
-
}
|
|
5986
|
-
},
|
|
5987
|
-
var
|
|
5988
|
-
return
|
|
5989
|
-
},
|
|
5990
|
-
var
|
|
5991
|
-
|
|
6033
|
+
}), o.mostRecentlyFocusedNode = k, No(k) && k.select();
|
|
6034
|
+
}
|
|
6035
|
+
}, v = function(k) {
|
|
6036
|
+
var j = u("setReturnFocus", k);
|
|
6037
|
+
return j || (j === !1 ? !1 : k);
|
|
6038
|
+
}, b = function(k) {
|
|
6039
|
+
var j = k.target, N = k.event, A = k.isBackward, W = A === void 0 ? !1 : A;
|
|
6040
|
+
j = j || Mt(N), m();
|
|
5992
6041
|
var Z = null;
|
|
5993
6042
|
if (o.tabbableGroups.length > 0) {
|
|
5994
|
-
var z = l(
|
|
6043
|
+
var z = l(j, N), K = z >= 0 ? o.containerGroups[z] : void 0;
|
|
5995
6044
|
if (z < 0)
|
|
5996
6045
|
W ? Z = o.tabbableGroups[o.tabbableGroups.length - 1].lastTabbableNode : Z = o.tabbableGroups[0].firstTabbableNode;
|
|
5997
6046
|
else if (W) {
|
|
5998
6047
|
var T = Vr(o.tabbableGroups, function(G) {
|
|
5999
6048
|
var V = G.firstTabbableNode;
|
|
6000
|
-
return
|
|
6049
|
+
return j === V;
|
|
6001
6050
|
});
|
|
6002
|
-
if (T < 0 && (K.container ===
|
|
6051
|
+
if (T < 0 && (K.container === j || qt(j, i.tabbableOptions) && !We(j, i.tabbableOptions) && !K.nextTabbableNode(j, !1)) && (T = z), T >= 0) {
|
|
6003
6052
|
var P = T === 0 ? o.tabbableGroups.length - 1 : T - 1, q = o.tabbableGroups[P];
|
|
6004
|
-
Z = Ie(
|
|
6053
|
+
Z = Ie(j) >= 0 ? q.lastTabbableNode : q.lastDomTabbableNode;
|
|
6005
6054
|
} else
|
|
6006
|
-
vt(N) || (Z = K.nextTabbableNode(
|
|
6055
|
+
vt(N) || (Z = K.nextTabbableNode(j, !1));
|
|
6007
6056
|
} else {
|
|
6008
6057
|
var L = Vr(o.tabbableGroups, function(G) {
|
|
6009
6058
|
var V = G.lastTabbableNode;
|
|
6010
|
-
return
|
|
6059
|
+
return j === V;
|
|
6011
6060
|
});
|
|
6012
|
-
if (L < 0 && (K.container ===
|
|
6061
|
+
if (L < 0 && (K.container === j || qt(j, i.tabbableOptions) && !We(j, i.tabbableOptions) && !K.nextTabbableNode(j)) && (L = z), L >= 0) {
|
|
6013
6062
|
var U = L === o.tabbableGroups.length - 1 ? 0 : L + 1, te = o.tabbableGroups[U];
|
|
6014
|
-
Z = Ie(
|
|
6063
|
+
Z = Ie(j) >= 0 ? te.firstTabbableNode : te.firstDomTabbableNode;
|
|
6015
6064
|
} else
|
|
6016
|
-
vt(N) || (Z = K.nextTabbableNode(
|
|
6065
|
+
vt(N) || (Z = K.nextTabbableNode(j));
|
|
6017
6066
|
}
|
|
6018
6067
|
} else
|
|
6019
6068
|
Z = u("fallbackFocus");
|
|
6020
6069
|
return Z;
|
|
6021
|
-
},
|
|
6022
|
-
var
|
|
6023
|
-
if (!(l(
|
|
6024
|
-
if (lt(i.clickOutsideDeactivates,
|
|
6070
|
+
}, _ = function(k) {
|
|
6071
|
+
var j = Mt(k);
|
|
6072
|
+
if (!(l(j, k) >= 0)) {
|
|
6073
|
+
if (lt(i.clickOutsideDeactivates, k)) {
|
|
6025
6074
|
c.deactivate({
|
|
6026
6075
|
// NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
|
|
6027
6076
|
// which will result in the outside click setting focus to the node
|
|
@@ -6033,15 +6082,15 @@ var Zr = {
|
|
|
6033
6082
|
});
|
|
6034
6083
|
return;
|
|
6035
6084
|
}
|
|
6036
|
-
lt(i.allowOutsideClick,
|
|
6085
|
+
lt(i.allowOutsideClick, k) || k.preventDefault();
|
|
6037
6086
|
}
|
|
6038
|
-
},
|
|
6039
|
-
var
|
|
6040
|
-
if (N ||
|
|
6041
|
-
N && (o.mostRecentlyFocusedNode =
|
|
6087
|
+
}, x = function(k) {
|
|
6088
|
+
var j = Mt(k), N = l(j, k) >= 0;
|
|
6089
|
+
if (N || j instanceof Document)
|
|
6090
|
+
N && (o.mostRecentlyFocusedNode = j);
|
|
6042
6091
|
else {
|
|
6043
|
-
|
|
6044
|
-
var
|
|
6092
|
+
k.stopImmediatePropagation();
|
|
6093
|
+
var A, W = !0;
|
|
6045
6094
|
if (o.mostRecentlyFocusedNode)
|
|
6046
6095
|
if (Ie(o.mostRecentlyFocusedNode) > 0) {
|
|
6047
6096
|
var Z = l(o.mostRecentlyFocusedNode), z = o.containerGroups[Z].tabbableNodes;
|
|
@@ -6049,7 +6098,7 @@ var Zr = {
|
|
|
6049
6098
|
var K = z.findIndex(function(T) {
|
|
6050
6099
|
return T === o.mostRecentlyFocusedNode;
|
|
6051
6100
|
});
|
|
6052
|
-
K >= 0 && (i.isKeyForward(o.recentNavEvent) ? K + 1 < z.length && (
|
|
6101
|
+
K >= 0 && (i.isKeyForward(o.recentNavEvent) ? K + 1 < z.length && (A = z[K + 1], W = !1) : K - 1 >= 0 && (A = z[K - 1], W = !1));
|
|
6053
6102
|
}
|
|
6054
6103
|
} else
|
|
6055
6104
|
o.containerGroups.some(function(T) {
|
|
@@ -6059,62 +6108,62 @@ var Zr = {
|
|
|
6059
6108
|
}) || (W = !1);
|
|
6060
6109
|
else
|
|
6061
6110
|
W = !1;
|
|
6062
|
-
W && (
|
|
6111
|
+
W && (A = b({
|
|
6063
6112
|
// move FROM the MRU node, not event-related node (which will be the node that is
|
|
6064
6113
|
// outside the trap causing the focus escape we're trying to fix)
|
|
6065
6114
|
target: o.mostRecentlyFocusedNode,
|
|
6066
6115
|
isBackward: i.isKeyBackward(o.recentNavEvent)
|
|
6067
|
-
})), g(
|
|
6116
|
+
})), g(A || o.mostRecentlyFocusedNode || f());
|
|
6068
6117
|
}
|
|
6069
6118
|
o.recentNavEvent = void 0;
|
|
6070
|
-
}, E = function(
|
|
6071
|
-
var
|
|
6072
|
-
o.recentNavEvent =
|
|
6073
|
-
var N =
|
|
6074
|
-
event:
|
|
6075
|
-
isBackward:
|
|
6119
|
+
}, E = function(k) {
|
|
6120
|
+
var j = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
6121
|
+
o.recentNavEvent = k;
|
|
6122
|
+
var N = b({
|
|
6123
|
+
event: k,
|
|
6124
|
+
isBackward: j
|
|
6076
6125
|
});
|
|
6077
|
-
N && (vt(
|
|
6078
|
-
},
|
|
6079
|
-
if (Po(
|
|
6080
|
-
|
|
6126
|
+
N && (vt(k) && k.preventDefault(), g(N));
|
|
6127
|
+
}, w = function(k) {
|
|
6128
|
+
if (Po(k) && lt(i.escapeDeactivates, k) !== !1) {
|
|
6129
|
+
k.preventDefault(), c.deactivate();
|
|
6081
6130
|
return;
|
|
6082
6131
|
}
|
|
6083
|
-
(i.isKeyForward(
|
|
6084
|
-
},
|
|
6085
|
-
var
|
|
6086
|
-
l(
|
|
6087
|
-
},
|
|
6132
|
+
(i.isKeyForward(k) || i.isKeyBackward(k)) && E(k, i.isKeyBackward(k));
|
|
6133
|
+
}, y = function(k) {
|
|
6134
|
+
var j = Mt(k);
|
|
6135
|
+
l(j, k) >= 0 || lt(i.clickOutsideDeactivates, k) || lt(i.allowOutsideClick, k) || (k.preventDefault(), k.stopImmediatePropagation());
|
|
6136
|
+
}, F = function() {
|
|
6088
6137
|
if (o.active)
|
|
6089
6138
|
return Zr.activateTrap(s, c), o.delayInitialFocusTimer = i.delayInitialFocus ? Hr(function() {
|
|
6090
6139
|
g(f());
|
|
6091
|
-
}) : g(f()), r.addEventListener("focusin",
|
|
6140
|
+
}) : g(f()), r.addEventListener("focusin", x, !0), r.addEventListener("mousedown", _, {
|
|
6092
6141
|
capture: !0,
|
|
6093
6142
|
passive: !1
|
|
6094
|
-
}), r.addEventListener("touchstart",
|
|
6143
|
+
}), r.addEventListener("touchstart", _, {
|
|
6095
6144
|
capture: !0,
|
|
6096
6145
|
passive: !1
|
|
6097
|
-
}), r.addEventListener("click",
|
|
6146
|
+
}), r.addEventListener("click", y, {
|
|
6098
6147
|
capture: !0,
|
|
6099
6148
|
passive: !1
|
|
6100
|
-
}), r.addEventListener("keydown",
|
|
6149
|
+
}), r.addEventListener("keydown", w, {
|
|
6101
6150
|
capture: !0,
|
|
6102
6151
|
passive: !1
|
|
6103
6152
|
}), c;
|
|
6104
6153
|
}, R = function() {
|
|
6105
6154
|
if (o.active)
|
|
6106
|
-
return r.removeEventListener("focusin",
|
|
6107
|
-
}, Q = function(
|
|
6108
|
-
var
|
|
6109
|
-
var
|
|
6110
|
-
return
|
|
6155
|
+
return r.removeEventListener("focusin", x, !0), r.removeEventListener("mousedown", _, !0), r.removeEventListener("touchstart", _, !0), r.removeEventListener("click", y, !0), r.removeEventListener("keydown", w, !0), c;
|
|
6156
|
+
}, Q = function(k) {
|
|
6157
|
+
var j = k.some(function(N) {
|
|
6158
|
+
var A = Array.from(N.removedNodes);
|
|
6159
|
+
return A.some(function(W) {
|
|
6111
6160
|
return W === o.mostRecentlyFocusedNode;
|
|
6112
6161
|
});
|
|
6113
6162
|
});
|
|
6114
|
-
|
|
6163
|
+
j && g(f());
|
|
6115
6164
|
}, B = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(Q) : void 0, $ = function() {
|
|
6116
|
-
B && (B.disconnect(), o.active && !o.paused && o.containers.map(function(
|
|
6117
|
-
B.observe(
|
|
6165
|
+
B && (B.disconnect(), o.active && !o.paused && o.containers.map(function(k) {
|
|
6166
|
+
B.observe(k, {
|
|
6118
6167
|
subtree: !0,
|
|
6119
6168
|
childList: !0
|
|
6120
6169
|
});
|
|
@@ -6127,49 +6176,49 @@ var Zr = {
|
|
|
6127
6176
|
get paused() {
|
|
6128
6177
|
return o.paused;
|
|
6129
6178
|
},
|
|
6130
|
-
activate: function(
|
|
6179
|
+
activate: function(k) {
|
|
6131
6180
|
if (o.active)
|
|
6132
6181
|
return this;
|
|
6133
|
-
var
|
|
6134
|
-
|
|
6182
|
+
var j = d(k, "onActivate"), N = d(k, "onPostActivate"), A = d(k, "checkCanFocusTrap");
|
|
6183
|
+
A || m(), o.active = !0, o.paused = !1, o.nodeFocusedBeforeActivation = r.activeElement, j == null || j();
|
|
6135
6184
|
var W = function() {
|
|
6136
|
-
|
|
6185
|
+
A && m(), F(), $(), N == null || N();
|
|
6137
6186
|
};
|
|
6138
|
-
return
|
|
6187
|
+
return A ? (A(o.containers.concat()).then(W, W), this) : (W(), this);
|
|
6139
6188
|
},
|
|
6140
|
-
deactivate: function(
|
|
6189
|
+
deactivate: function(k) {
|
|
6141
6190
|
if (!o.active)
|
|
6142
6191
|
return this;
|
|
6143
|
-
var
|
|
6192
|
+
var j = zr({
|
|
6144
6193
|
onDeactivate: i.onDeactivate,
|
|
6145
6194
|
onPostDeactivate: i.onPostDeactivate,
|
|
6146
6195
|
checkCanReturnFocus: i.checkCanReturnFocus
|
|
6147
|
-
},
|
|
6196
|
+
}, k);
|
|
6148
6197
|
clearTimeout(o.delayInitialFocusTimer), o.delayInitialFocusTimer = void 0, R(), o.active = !1, o.paused = !1, $(), Zr.deactivateTrap(s, c);
|
|
6149
|
-
var N = d(
|
|
6198
|
+
var N = d(j, "onDeactivate"), A = d(j, "onPostDeactivate"), W = d(j, "checkCanReturnFocus"), Z = d(j, "returnFocus", "returnFocusOnDeactivate");
|
|
6150
6199
|
N == null || N();
|
|
6151
6200
|
var z = function() {
|
|
6152
6201
|
Hr(function() {
|
|
6153
|
-
Z && g(
|
|
6202
|
+
Z && g(v(o.nodeFocusedBeforeActivation)), A == null || A();
|
|
6154
6203
|
});
|
|
6155
6204
|
};
|
|
6156
|
-
return Z && W ? (W(
|
|
6205
|
+
return Z && W ? (W(v(o.nodeFocusedBeforeActivation)).then(z, z), this) : (z(), this);
|
|
6157
6206
|
},
|
|
6158
|
-
pause: function(
|
|
6207
|
+
pause: function(k) {
|
|
6159
6208
|
if (o.paused || !o.active)
|
|
6160
6209
|
return this;
|
|
6161
|
-
var
|
|
6162
|
-
return o.paused = !0,
|
|
6210
|
+
var j = d(k, "onPause"), N = d(k, "onPostPause");
|
|
6211
|
+
return o.paused = !0, j == null || j(), R(), $(), N == null || N(), this;
|
|
6163
6212
|
},
|
|
6164
|
-
unpause: function(
|
|
6213
|
+
unpause: function(k) {
|
|
6165
6214
|
if (!o.paused || !o.active)
|
|
6166
6215
|
return this;
|
|
6167
|
-
var
|
|
6168
|
-
return o.paused = !1,
|
|
6216
|
+
var j = d(k, "onUnpause"), N = d(k, "onPostUnpause");
|
|
6217
|
+
return o.paused = !1, j == null || j(), m(), F(), $(), N == null || N(), this;
|
|
6169
6218
|
},
|
|
6170
|
-
updateContainerElements: function(
|
|
6171
|
-
var
|
|
6172
|
-
return o.containers =
|
|
6219
|
+
updateContainerElements: function(k) {
|
|
6220
|
+
var j = [].concat(k).filter(Boolean);
|
|
6221
|
+
return o.containers = j.map(function(N) {
|
|
6173
6222
|
return typeof N == "string" ? r.querySelector(N) : N;
|
|
6174
6223
|
}), o.active && m(), $(), this;
|
|
6175
6224
|
}
|
|
@@ -6534,19 +6583,19 @@ const an = ({
|
|
|
6534
6583
|
className: u = "",
|
|
6535
6584
|
gtmContext: f = "Modal"
|
|
6536
6585
|
}) => {
|
|
6537
|
-
const m = H(), [p, g] = X(e),
|
|
6538
|
-
|
|
6586
|
+
const m = H(), [p, g] = X(e), v = (x) => {
|
|
6587
|
+
x.key === "Escape" && b(!1);
|
|
6539
6588
|
};
|
|
6540
|
-
ae(() => (window.addEventListener("keyup",
|
|
6541
|
-
window.removeEventListener("keyup",
|
|
6589
|
+
ae(() => (window.addEventListener("keyup", v), () => {
|
|
6590
|
+
window.removeEventListener("keyup", v);
|
|
6542
6591
|
}));
|
|
6543
|
-
const
|
|
6544
|
-
g(
|
|
6592
|
+
const b = (x) => {
|
|
6593
|
+
g(x), x ? (s(), document.body.classList.add("has-overlay")) : (i(), document.body.classList.remove("has-overlay"));
|
|
6545
6594
|
};
|
|
6546
6595
|
ae(() => {
|
|
6547
|
-
|
|
6596
|
+
b(e);
|
|
6548
6597
|
}, [e]);
|
|
6549
|
-
const
|
|
6598
|
+
const _ = r ? { "--max-width": `${r / 16}rem` } : {};
|
|
6550
6599
|
return /* @__PURE__ */ a.jsx("div", { className: S("overlay", { open: p }), role: "dialog", children: /* @__PURE__ */ a.jsx(
|
|
6551
6600
|
qa,
|
|
6552
6601
|
{
|
|
@@ -6555,7 +6604,7 @@ const an = ({
|
|
|
6555
6604
|
"has-max-width": r
|
|
6556
6605
|
}),
|
|
6557
6606
|
hidden: !p,
|
|
6558
|
-
style:
|
|
6607
|
+
style: _,
|
|
6559
6608
|
children: e && /* @__PURE__ */ a.jsx(Jo, { children: /* @__PURE__ */ a.jsxs("div", { className: "overlay-content", children: [
|
|
6560
6609
|
/* @__PURE__ */ a.jsxs("div", { className: "top", children: [
|
|
6561
6610
|
c && /* @__PURE__ */ a.jsx("h2", { className: "modal-title", children: c }),
|
|
@@ -6565,7 +6614,7 @@ const an = ({
|
|
|
6565
6614
|
variant: "tertiary",
|
|
6566
6615
|
size: "medium",
|
|
6567
6616
|
icon: { icon: "close" },
|
|
6568
|
-
onClick: () =>
|
|
6617
|
+
onClick: () => b(!1),
|
|
6569
6618
|
className: "gtm-trackable",
|
|
6570
6619
|
"data-gtm-event-type": "close-modal-click",
|
|
6571
6620
|
"data-gtm-event-context": f,
|
|
@@ -6786,17 +6835,17 @@ const Xl = ({ members: t }) => {
|
|
|
6786
6835
|
gtmEvent: "learning-hub"
|
|
6787
6836
|
}
|
|
6788
6837
|
}, tc = ({ data: t, cta: e, link: n, gtmContext: r }) => {
|
|
6789
|
-
var
|
|
6838
|
+
var v;
|
|
6790
6839
|
const s = H(), [i, o] = X({
|
|
6791
6840
|
loading: !1,
|
|
6792
6841
|
registered: t.registered || !1
|
|
6793
6842
|
});
|
|
6794
6843
|
ae(() => {
|
|
6795
|
-
t.registered && o((
|
|
6844
|
+
t.registered && o((b) => ({ ...b, registered: !0 }));
|
|
6796
6845
|
}, [t.registered]);
|
|
6797
6846
|
const { customLinkText: c, startDate: d, dateHasPassed: l, pill: u, slug: f } = t, m = t.contentType;
|
|
6798
6847
|
let p = "";
|
|
6799
|
-
if ((
|
|
6848
|
+
if ((v = Kt[m]) != null && v.gtmEvent && (p = Kt[m].gtmEvent), d && l)
|
|
6800
6849
|
return n ? /* @__PURE__ */ a.jsx(
|
|
6801
6850
|
"a",
|
|
6802
6851
|
{
|
|
@@ -6822,30 +6871,30 @@ const Xl = ({ members: t }) => {
|
|
|
6822
6871
|
) : null;
|
|
6823
6872
|
const g = ["microcourse", "event"];
|
|
6824
6873
|
if (e && e.onClick && g.includes(m) && u !== "premium") {
|
|
6825
|
-
const
|
|
6826
|
-
if (
|
|
6874
|
+
const b = i.loading || i.registered, _ = async (x) => {
|
|
6875
|
+
if (x.preventDefault(), x.stopPropagation(), !(b || !e || !e.onClick)) {
|
|
6827
6876
|
o((E) => ({ ...E, loading: !0 }));
|
|
6828
6877
|
try {
|
|
6829
6878
|
const E = await e.onClick(t);
|
|
6830
|
-
o(E === "success" ? () => ({ registered: !0, loading: !1 }) : (
|
|
6879
|
+
o(E === "success" ? () => ({ registered: !0, loading: !1 }) : (w) => ({ ...w, loading: !1 }));
|
|
6831
6880
|
} catch {
|
|
6832
|
-
o((
|
|
6881
|
+
o((w) => ({ ...w, loading: !1 }));
|
|
6833
6882
|
}
|
|
6834
6883
|
}
|
|
6835
6884
|
};
|
|
6836
6885
|
return /* @__PURE__ */ a.jsx("p", { className: "cta-wrapper", children: /* @__PURE__ */ a.jsx(
|
|
6837
6886
|
se,
|
|
6838
6887
|
{
|
|
6839
|
-
onClick:
|
|
6888
|
+
onClick: _,
|
|
6840
6889
|
className: "gtm-trackable",
|
|
6841
6890
|
size: "small",
|
|
6842
6891
|
styling: { fullWidth: !0 },
|
|
6843
|
-
disabled:
|
|
6892
|
+
disabled: b,
|
|
6844
6893
|
"data-gtm-event-context": `${r}Page-${m}: ${f}`,
|
|
6845
6894
|
"data-gtm-event-type": `${r}-${m}-register-click`,
|
|
6846
6895
|
"data-testid": "in-card-button",
|
|
6847
6896
|
children: c || s.formatMessage({
|
|
6848
|
-
id: `card_cta_${m}${
|
|
6897
|
+
id: `card_cta_${m}${b ? `_${i.loading ? "loading" : "done"}` : ""}`
|
|
6849
6898
|
})
|
|
6850
6899
|
}
|
|
6851
6900
|
) });
|
|
@@ -6890,43 +6939,43 @@ const nc = {
|
|
|
6890
6939
|
text: c.formatMessage({ id: `card_cta_${e.contentType}` }),
|
|
6891
6940
|
onClick: o
|
|
6892
6941
|
});
|
|
6893
|
-
const { contentType:
|
|
6894
|
-
if (!
|
|
6942
|
+
const { contentType: v } = m;
|
|
6943
|
+
if (!v || !Kt[v])
|
|
6895
6944
|
return /* @__PURE__ */ a.jsx(Se, { element: "li", className: "card-wrapper" });
|
|
6896
6945
|
const {
|
|
6897
|
-
basePath:
|
|
6898
|
-
className:
|
|
6899
|
-
length:
|
|
6946
|
+
basePath: b = "",
|
|
6947
|
+
className: _,
|
|
6948
|
+
length: x,
|
|
6900
6949
|
gtmEvent: E
|
|
6901
|
-
} = Kt[
|
|
6902
|
-
let
|
|
6903
|
-
m.slug && (m.slug.slice(0, 4) === "http" || m.slug.slice(0, 2) === "//" || m.slug.slice(0, 6) === "mailto" || m.slug.slice(0, 3) === "tel") && (
|
|
6904
|
-
const
|
|
6905
|
-
let
|
|
6906
|
-
return
|
|
6907
|
-
href:
|
|
6950
|
+
} = Kt[v];
|
|
6951
|
+
let w = m.slug ? `${b}${m.slug}` : !1;
|
|
6952
|
+
m.slug && (m.slug.slice(0, 4) === "http" || m.slug.slice(0, 2) === "//" || m.slug.slice(0, 6) === "mailto" || m.slug.slice(0, 3) === "tel") && (w = m.slug);
|
|
6953
|
+
const y = { ...nc, ...x };
|
|
6954
|
+
let F = { className: "card" };
|
|
6955
|
+
return w && (F = {
|
|
6956
|
+
href: w,
|
|
6908
6957
|
className: "card gtm-trackable",
|
|
6909
6958
|
"data-gtm-event-context": `${s}-CarouselCard`,
|
|
6910
6959
|
"data-gtm-event-type": `${E}-click`,
|
|
6911
6960
|
"data-testid": "link"
|
|
6912
|
-
}, m.openInNewTab && (
|
|
6961
|
+
}, m.openInNewTab && (F.target = "_blank")), /* @__PURE__ */ a.jsx(
|
|
6913
6962
|
"li",
|
|
6914
6963
|
{
|
|
6915
|
-
className: S("card-wrapper text-medium",
|
|
6916
|
-
"has-link":
|
|
6917
|
-
"no-link": !
|
|
6964
|
+
className: S("card-wrapper text-medium", _, i, {
|
|
6965
|
+
"has-link": w,
|
|
6966
|
+
"no-link": !w,
|
|
6918
6967
|
"has-image": m.banner
|
|
6919
6968
|
}),
|
|
6920
|
-
"data-testid": `${
|
|
6969
|
+
"data-testid": `${v}-card`,
|
|
6921
6970
|
children: Y.createElement(
|
|
6922
|
-
|
|
6923
|
-
|
|
6971
|
+
w ? "a" : "div",
|
|
6972
|
+
F,
|
|
6924
6973
|
/* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
6925
6974
|
/* @__PURE__ */ a.jsx(
|
|
6926
6975
|
oi,
|
|
6927
6976
|
{
|
|
6928
6977
|
className: "card-label",
|
|
6929
|
-
contentType:
|
|
6978
|
+
contentType: v,
|
|
6930
6979
|
customIcon: m.customIcon,
|
|
6931
6980
|
customLabel: m.customLabel
|
|
6932
6981
|
}
|
|
@@ -6943,7 +6992,7 @@ const nc = {
|
|
|
6943
6992
|
m.banner ? /* @__PURE__ */ a.jsxs("p", { className: "img", children: [
|
|
6944
6993
|
m.registered && /* @__PURE__ */ a.jsx(ht, { size: "small", variant: "registered", children: c.formatMessage({ id: "card_registered" }) }),
|
|
6945
6994
|
/* @__PURE__ */ a.jsx(Tt, { image: m.banner })
|
|
6946
|
-
] }) :
|
|
6995
|
+
] }) : _ === "people" ? /* @__PURE__ */ a.jsx(
|
|
6947
6996
|
Ye,
|
|
6948
6997
|
{
|
|
6949
6998
|
name: m.title || "",
|
|
@@ -6957,24 +7006,24 @@ const nc = {
|
|
|
6957
7006
|
contributors: { data: m.contributors },
|
|
6958
7007
|
styling: {
|
|
6959
7008
|
size: "small",
|
|
6960
|
-
showGap:
|
|
7009
|
+
showGap: _ !== "question",
|
|
6961
7010
|
showText: !0
|
|
6962
7011
|
},
|
|
6963
|
-
multipleText: ["event", "solutionArticle"].includes(
|
|
7012
|
+
multipleText: ["event", "solutionArticle"].includes(v) ? c.formatMessage({ id: `card_contributors_${v}` }) : void 0,
|
|
6964
7013
|
"data-testid": "contributors"
|
|
6965
7014
|
}
|
|
6966
7015
|
),
|
|
6967
7016
|
m.partner && /* @__PURE__ */ a.jsx("p", { className: "partners", "data-testid": "partners", children: m.partner.length > 1 ? c.formatMessage(
|
|
6968
7017
|
{ id: "card_partner" },
|
|
6969
7018
|
{ partner: m.partner[0], number: m.partner.length - 1 }
|
|
6970
|
-
) : et(m.partner[0],
|
|
7019
|
+
) : et(m.partner[0], y.partner) }),
|
|
6971
7020
|
/* Text */
|
|
6972
7021
|
["title", "text", "secondaryText"].map(($) => {
|
|
6973
7022
|
const C = m[$];
|
|
6974
7023
|
if (!C)
|
|
6975
7024
|
return null;
|
|
6976
|
-
const
|
|
6977
|
-
return /* @__PURE__ */ a.jsx("p", { className:
|
|
7025
|
+
const k = Ws($);
|
|
7026
|
+
return /* @__PURE__ */ a.jsx("p", { className: k, "data-testid": k, children: et(C, y[$]) }, $);
|
|
6978
7027
|
}),
|
|
6979
7028
|
(m == null ? void 0 : m.members) && /* @__PURE__ */ a.jsxs("span", { className: "member-information", children: [
|
|
6980
7029
|
((R = m == null ? void 0 : m.members) == null ? void 0 : R.isMember) && /* @__PURE__ */ a.jsx(
|
|
@@ -6994,8 +7043,8 @@ const nc = {
|
|
|
6994
7043
|
{ count: m == null ? void 0 : m.members.count }
|
|
6995
7044
|
) })
|
|
6996
7045
|
] }),
|
|
6997
|
-
/* @__PURE__ */ a.jsx(ec, { type:
|
|
6998
|
-
/* @__PURE__ */ a.jsx(tc, { data: m, cta: r, link:
|
|
7046
|
+
/* @__PURE__ */ a.jsx(ec, { type: _ || "", data: m }),
|
|
7047
|
+
/* @__PURE__ */ a.jsx(tc, { data: m, cta: r, link: w || "", gtmContext: s })
|
|
6999
7048
|
] })
|
|
7000
7049
|
)
|
|
7001
7050
|
}
|
|
@@ -7061,53 +7110,53 @@ const ic = ({
|
|
|
7061
7110
|
}), { cardsPerPage: f, isLoading: m } = l, [p, g] = X({
|
|
7062
7111
|
currentPage: 0,
|
|
7063
7112
|
loadedPages: [0]
|
|
7064
|
-
}), { currentPage:
|
|
7113
|
+
}), { currentPage: v, loadedPages: b } = p, _ = e.length, x = Math.ceil(_ / f), E = pe(null), w = jt(!0, !0, E == null ? void 0 : E.current);
|
|
7065
7114
|
ae(() => {
|
|
7066
7115
|
let $ = 1;
|
|
7067
|
-
|
|
7116
|
+
w && (w >= En.fourCards ? $ = 4 : w >= En.threeCards ? $ = 3 : w >= En.twoCards && ($ = 2), $ > _ && ($ = _)), u((C) => ({
|
|
7068
7117
|
...C,
|
|
7069
7118
|
cardsPerPage: $,
|
|
7070
7119
|
isLoading: !1
|
|
7071
7120
|
}));
|
|
7072
|
-
}, [
|
|
7073
|
-
const
|
|
7074
|
-
let C =
|
|
7121
|
+
}, [w, _]);
|
|
7122
|
+
const y = ($ = "next") => {
|
|
7123
|
+
let C = v;
|
|
7075
7124
|
if (typeof $ == "string")
|
|
7076
7125
|
if ($ === "next")
|
|
7077
|
-
if (
|
|
7078
|
-
C =
|
|
7126
|
+
if (v < x - 1)
|
|
7127
|
+
C = v + 1;
|
|
7079
7128
|
else
|
|
7080
7129
|
return;
|
|
7081
|
-
else if (
|
|
7082
|
-
C =
|
|
7130
|
+
else if (v > 0)
|
|
7131
|
+
C = v - 1;
|
|
7083
7132
|
else
|
|
7084
7133
|
return;
|
|
7085
7134
|
else
|
|
7086
7135
|
C = $;
|
|
7087
|
-
g((
|
|
7088
|
-
...
|
|
7136
|
+
g((k) => ({
|
|
7137
|
+
...k,
|
|
7089
7138
|
currentPage: C,
|
|
7090
|
-
loadedPages: [.../* @__PURE__ */ new Set([...
|
|
7139
|
+
loadedPages: [.../* @__PURE__ */ new Set([...b, C])]
|
|
7091
7140
|
}));
|
|
7092
|
-
},
|
|
7141
|
+
}, F = ($) => {
|
|
7093
7142
|
Ft = $.touches[0].clientX;
|
|
7094
7143
|
}, R = ($) => {
|
|
7095
7144
|
if (Ft === null)
|
|
7096
7145
|
return;
|
|
7097
|
-
const C = $.touches[0].clientX,
|
|
7098
|
-
|
|
7146
|
+
const C = $.touches[0].clientX, k = Ft - C;
|
|
7147
|
+
k > 5 ? y("next") : k < -5 && y("previous"), Ft = null;
|
|
7099
7148
|
}, Q = {
|
|
7100
|
-
"--width": `${
|
|
7101
|
-
"--total-cards":
|
|
7149
|
+
"--width": `${w || 0}px`,
|
|
7150
|
+
"--total-cards": _,
|
|
7102
7151
|
"--cards-per-page": f,
|
|
7103
|
-
"--page":
|
|
7152
|
+
"--page": v
|
|
7104
7153
|
};
|
|
7105
7154
|
if (m)
|
|
7106
7155
|
return /* @__PURE__ */ a.jsx(wa, { layout: `carousel${s ? "-with-title" : ""}` });
|
|
7107
7156
|
const B = ($, C) => {
|
|
7108
|
-
var
|
|
7109
|
-
let
|
|
7110
|
-
return (
|
|
7157
|
+
var j;
|
|
7158
|
+
let k = null;
|
|
7159
|
+
return (j = $ == null ? void 0 : $.sys) != null && j.id ? k = `card-${$.sys.id}` : $ != null && $.slug ? k = `card-${$.slug}` : [n[C], $.contentType].includes("customCard") && (k = `card-${window.btoa(`${$.title} ${$.createdAt}`)}-${C}`), k;
|
|
7111
7160
|
};
|
|
7112
7161
|
return /* @__PURE__ */ a.jsxs(
|
|
7113
7162
|
"section",
|
|
@@ -7121,35 +7170,35 @@ const ic = ({
|
|
|
7121
7170
|
"ul",
|
|
7122
7171
|
{
|
|
7123
7172
|
className: "carousel",
|
|
7124
|
-
onTouchStart:
|
|
7173
|
+
onTouchStart: F,
|
|
7125
7174
|
onTouchMove: R,
|
|
7126
7175
|
style: Q,
|
|
7127
7176
|
"data-testid": "carousel-list",
|
|
7128
7177
|
children: e.map(($, C) => {
|
|
7129
|
-
let
|
|
7130
|
-
return
|
|
7178
|
+
let k = B($, C);
|
|
7179
|
+
return k && ac(C, f, v, b) ? /* @__PURE__ */ a.jsx(
|
|
7131
7180
|
Ua,
|
|
7132
7181
|
{
|
|
7133
|
-
id:
|
|
7182
|
+
id: k,
|
|
7134
7183
|
card: { ...$, contentType: n[C] },
|
|
7135
7184
|
buildCardData: r,
|
|
7136
7185
|
gtmContext: o,
|
|
7137
7186
|
...c
|
|
7138
7187
|
},
|
|
7139
|
-
|
|
7140
|
-
) : (
|
|
7188
|
+
k
|
|
7189
|
+
) : (k = k || `${t}-card-${C}`, /* @__PURE__ */ a.jsx(
|
|
7141
7190
|
Se,
|
|
7142
7191
|
{
|
|
7143
7192
|
element: "li",
|
|
7144
7193
|
className: "card-wrapper",
|
|
7145
7194
|
"data-testid": "card-placeholder"
|
|
7146
7195
|
},
|
|
7147
|
-
|
|
7196
|
+
k
|
|
7148
7197
|
));
|
|
7149
7198
|
})
|
|
7150
7199
|
}
|
|
7151
7200
|
),
|
|
7152
|
-
|
|
7201
|
+
x <= 1 ? null : /* @__PURE__ */ a.jsxs("ul", { className: "controls", "data-testid": "carousel-controls", children: [
|
|
7153
7202
|
/* @__PURE__ */ a.jsx("li", { className: "arrow previous", children: /* @__PURE__ */ a.jsx(
|
|
7154
7203
|
se,
|
|
7155
7204
|
{
|
|
@@ -7157,26 +7206,26 @@ const ic = ({
|
|
|
7157
7206
|
size: "large",
|
|
7158
7207
|
icon: { icon: "chevron_left" },
|
|
7159
7208
|
onClick: ($) => {
|
|
7160
|
-
$.preventDefault(), $.stopPropagation(),
|
|
7209
|
+
$.preventDefault(), $.stopPropagation(), y("previous");
|
|
7161
7210
|
},
|
|
7162
7211
|
screenreaderText: d.formatMessage({
|
|
7163
7212
|
id: "carousel_pagination_previous"
|
|
7164
7213
|
}),
|
|
7165
|
-
disabled:
|
|
7214
|
+
disabled: v <= 0
|
|
7166
7215
|
}
|
|
7167
7216
|
) }),
|
|
7168
|
-
[...Array(
|
|
7217
|
+
[...Array(x)].map(($, C) => /* @__PURE__ */ a.jsx("li", { "data-testid": "carousel-controls-button", children: /* @__PURE__ */ a.jsx(
|
|
7169
7218
|
"button",
|
|
7170
7219
|
{
|
|
7171
7220
|
className: S("page-indicator", {
|
|
7172
|
-
selected: C ===
|
|
7221
|
+
selected: C === v
|
|
7173
7222
|
}),
|
|
7174
|
-
onClick: (
|
|
7175
|
-
|
|
7223
|
+
onClick: (k) => {
|
|
7224
|
+
k.preventDefault(), k.stopPropagation(), y(C);
|
|
7176
7225
|
},
|
|
7177
7226
|
children: /* @__PURE__ */ a.jsx(be, { showOnFocus: !1, children: d.formatMessage(
|
|
7178
7227
|
{ id: "carousel_pagination_page" },
|
|
7179
|
-
{ number: C + 1, total:
|
|
7228
|
+
{ number: C + 1, total: x }
|
|
7180
7229
|
) })
|
|
7181
7230
|
}
|
|
7182
7231
|
) }, `page-indicator-${C}`)),
|
|
@@ -7187,10 +7236,10 @@ const ic = ({
|
|
|
7187
7236
|
size: "large",
|
|
7188
7237
|
icon: { icon: "chevron_right" },
|
|
7189
7238
|
onClick: ($) => {
|
|
7190
|
-
$.preventDefault(), $.stopPropagation(),
|
|
7239
|
+
$.preventDefault(), $.stopPropagation(), y("next");
|
|
7191
7240
|
},
|
|
7192
7241
|
screenreaderText: d.formatMessage({ id: "carousel_pagination_next" }),
|
|
7193
|
-
disabled:
|
|
7242
|
+
disabled: v >= x - 1
|
|
7194
7243
|
}
|
|
7195
7244
|
) })
|
|
7196
7245
|
] })
|
|
@@ -7361,8 +7410,8 @@ const ru = ({
|
|
|
7361
7410
|
"button",
|
|
7362
7411
|
{
|
|
7363
7412
|
className: S(u, { selected: c.includes(u) }),
|
|
7364
|
-
onClick: (
|
|
7365
|
-
|
|
7413
|
+
onClick: (v) => {
|
|
7414
|
+
v.preventDefault(), v.stopPropagation(), l(u, p);
|
|
7366
7415
|
},
|
|
7367
7416
|
...g,
|
|
7368
7417
|
children: f
|
|
@@ -7397,44 +7446,44 @@ const Ot = "languageSwitcher_", au = ({
|
|
|
7397
7446
|
if (ae(() => {
|
|
7398
7447
|
t !== f && m(t);
|
|
7399
7448
|
}, [t]), !r || !Object.values(r).some(
|
|
7400
|
-
(
|
|
7449
|
+
(b) => b && b.post_name
|
|
7401
7450
|
))
|
|
7402
7451
|
return null;
|
|
7403
|
-
const g = Object.keys(r),
|
|
7452
|
+
const g = Object.keys(r), v = f !== t;
|
|
7404
7453
|
return /* @__PURE__ */ a.jsxs("div", { className: S("language-switcher text-small", o, d), children: [
|
|
7405
7454
|
/* @__PURE__ */ a.jsxs("nav", { children: [
|
|
7406
7455
|
o !== "short" && /* @__PURE__ */ a.jsx("p", { children: c || l.formatMessage({ id: `${Ot}label` }) }),
|
|
7407
|
-
/* @__PURE__ */ a.jsx("ul", { children: g.map((
|
|
7456
|
+
/* @__PURE__ */ a.jsx("ul", { children: g.map((b) => {
|
|
7408
7457
|
var E;
|
|
7409
|
-
if (!gn[
|
|
7458
|
+
if (!gn[b])
|
|
7410
7459
|
return null;
|
|
7411
|
-
const
|
|
7412
|
-
let
|
|
7413
|
-
if (f ===
|
|
7414
|
-
|
|
7460
|
+
const _ = (E = r[b]) == null ? void 0 : E.post_name;
|
|
7461
|
+
let x = { className: b };
|
|
7462
|
+
if (f === b)
|
|
7463
|
+
x["aria-label"] = l.formatMessage(
|
|
7415
7464
|
{ id: `${Ot}selected` },
|
|
7416
|
-
{ language: gn[
|
|
7465
|
+
{ language: gn[b] }
|
|
7417
7466
|
);
|
|
7418
7467
|
else {
|
|
7419
|
-
const
|
|
7420
|
-
|
|
7421
|
-
...
|
|
7422
|
-
href: typeof
|
|
7423
|
-
onClick: (
|
|
7424
|
-
m(
|
|
7425
|
-
|
|
7426
|
-
typeof
|
|
7468
|
+
const w = oc(b, _, i);
|
|
7469
|
+
x = {
|
|
7470
|
+
...x,
|
|
7471
|
+
href: typeof w == "string" ? w : w.url,
|
|
7472
|
+
onClick: (y) => {
|
|
7473
|
+
m(b), u(b), typeof s < "u" && (y.preventDefault(), y.stopPropagation(), s(
|
|
7474
|
+
b,
|
|
7475
|
+
typeof w == "string" ? w : w.urlForRouter
|
|
7427
7476
|
));
|
|
7428
7477
|
}
|
|
7429
7478
|
};
|
|
7430
7479
|
}
|
|
7431
|
-
return /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(at, { ...
|
|
7480
|
+
return /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(at, { ...x, fallbackElement: "span", children: gn[b] }) }, b);
|
|
7432
7481
|
}) }),
|
|
7433
|
-
o !== "short" && !
|
|
7482
|
+
o !== "short" && !v && /* @__PURE__ */ a.jsx("p", { children: l.formatMessage({
|
|
7434
7483
|
id: `${Ot}translation_${e ? "original" : n ? "human" : "machine"}`
|
|
7435
7484
|
}) })
|
|
7436
7485
|
] }),
|
|
7437
|
-
o !== "short" && !
|
|
7486
|
+
o !== "short" && !v && !e && !n && /* @__PURE__ */ a.jsx("small", {
|
|
7438
7487
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
7439
7488
|
// @ts-ignore
|
|
7440
7489
|
// `values` are throwing a type error: https://github.com/formatjs/formatjs/issues/3633
|
|
@@ -7442,9 +7491,9 @@ const Ot = "languageSwitcher_", au = ({
|
|
|
7442
7491
|
{ id: `${Ot}disclaimer` },
|
|
7443
7492
|
{
|
|
7444
7493
|
email: ft.support,
|
|
7445
|
-
link: (
|
|
7446
|
-
const
|
|
7447
|
-
return /* @__PURE__ */ a.jsx("a", { href:
|
|
7494
|
+
link: (b) => {
|
|
7495
|
+
const _ = `mailto:${b}`;
|
|
7496
|
+
return /* @__PURE__ */ a.jsx("a", { href: _, children: b });
|
|
7448
7497
|
}
|
|
7449
7498
|
}
|
|
7450
7499
|
)
|
|
@@ -7539,10 +7588,10 @@ const cc = ({
|
|
|
7539
7588
|
}
|
|
7540
7589
|
),
|
|
7541
7590
|
/* @__PURE__ */ a.jsx("ul", { id: e, hidden: !o, children: n.map(({ href: l, onClick: u, text: f, icon: m, ...p }, g) => {
|
|
7542
|
-
const
|
|
7591
|
+
const v = {
|
|
7543
7592
|
...p,
|
|
7544
|
-
onClick: (
|
|
7545
|
-
c(!1), typeof u == "function" && u(
|
|
7593
|
+
onClick: (b) => {
|
|
7594
|
+
c(!1), typeof u == "function" && u(b);
|
|
7546
7595
|
},
|
|
7547
7596
|
onFocus: () => {
|
|
7548
7597
|
At && (clearTimeout(At), At = !1);
|
|
@@ -7553,13 +7602,13 @@ const cc = ({
|
|
|
7553
7602
|
}, 100);
|
|
7554
7603
|
}
|
|
7555
7604
|
};
|
|
7556
|
-
return l && (
|
|
7605
|
+
return l && (v.href = l), /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
7557
7606
|
se,
|
|
7558
7607
|
{
|
|
7559
7608
|
variant: "tertiary",
|
|
7560
7609
|
size: "medium",
|
|
7561
7610
|
icon: m ? { icon: m, position: "left" } : !1,
|
|
7562
|
-
...
|
|
7611
|
+
...v,
|
|
7563
7612
|
children: f
|
|
7564
7613
|
}
|
|
7565
7614
|
) }, `${window.btoa(f)}_${g}`);
|
|
@@ -7687,7 +7736,7 @@ const mc = "shareLinks_", su = ({
|
|
|
7687
7736
|
if (typeof m == "function" && !m())
|
|
7688
7737
|
return null;
|
|
7689
7738
|
const g = {};
|
|
7690
|
-
return p && (g.onClick = (
|
|
7739
|
+
return p && (g.onClick = (v) => p(v, f)), /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
7691
7740
|
se,
|
|
7692
7741
|
{
|
|
7693
7742
|
size: s,
|
|
@@ -7733,20 +7782,20 @@ const iu = ({ tabs: t, className: e = "", preventLocationChange: n }) => {
|
|
|
7733
7782
|
}
|
|
7734
7783
|
}, [i]);
|
|
7735
7784
|
const c = [], d = [];
|
|
7736
|
-
return t.forEach(({ id: u, text: f, content: m, href: p, hasCarousel: g },
|
|
7737
|
-
u = r(u, f,
|
|
7738
|
-
const
|
|
7739
|
-
p || (
|
|
7740
|
-
|
|
7785
|
+
return t.forEach(({ id: u, text: f, content: m, href: p, hasCarousel: g }, v) => {
|
|
7786
|
+
u = r(u, f, v);
|
|
7787
|
+
const b = i === u, _ = {};
|
|
7788
|
+
p || (_["aria-controls"] = u, _.onClick = (x) => {
|
|
7789
|
+
x.preventDefault(), x.stopPropagation(), o(u), !n && (window.location.hash = `#${u}`);
|
|
7741
7790
|
}, d.push(
|
|
7742
7791
|
/* @__PURE__ */ a.jsx(
|
|
7743
7792
|
"section",
|
|
7744
7793
|
{
|
|
7745
7794
|
id: u,
|
|
7746
|
-
hidden: !
|
|
7795
|
+
hidden: !b,
|
|
7747
7796
|
role: "tabpanel",
|
|
7748
7797
|
"aria-labelledby": `tab-${u}`,
|
|
7749
|
-
"aria-live":
|
|
7798
|
+
"aria-live": b ? "assertive" : "off",
|
|
7750
7799
|
children: typeof m == "string" ? /* @__PURE__ */ a.jsx("p", { children: m }) : m
|
|
7751
7800
|
},
|
|
7752
7801
|
`section-${u}`
|
|
@@ -7757,10 +7806,10 @@ const iu = ({ tabs: t, className: e = "", preventLocationChange: n }) => {
|
|
|
7757
7806
|
{
|
|
7758
7807
|
href: p || `#${u}`,
|
|
7759
7808
|
id: `tab-${u}`,
|
|
7760
|
-
className: S({ selected:
|
|
7809
|
+
className: S({ selected: b }),
|
|
7761
7810
|
role: "tab",
|
|
7762
|
-
"aria-selected":
|
|
7763
|
-
...
|
|
7811
|
+
"aria-selected": b,
|
|
7812
|
+
..._,
|
|
7764
7813
|
children: f
|
|
7765
7814
|
}
|
|
7766
7815
|
) }, `tab-${u}`)
|
|
@@ -8258,10 +8307,10 @@ const Xe = "footer_", Gt = "SiteFooter", Kr = ({ group: t }) => {
|
|
|
8258
8307
|
c.hasVariantText && (f += `_logged${e ? "In" : "Out"}`);
|
|
8259
8308
|
let m = !1;
|
|
8260
8309
|
if (c.href) {
|
|
8261
|
-
let
|
|
8262
|
-
if (
|
|
8263
|
-
const E =
|
|
8264
|
-
|
|
8310
|
+
let x = c.gtmType || `${t}-click`;
|
|
8311
|
+
if (x.includes(".")) {
|
|
8312
|
+
const E = x.split("."), w = E[E.length - 2];
|
|
8313
|
+
x = `${w === "topics" ? `${w}-` : ""}${E[E.length - 1]}`;
|
|
8265
8314
|
}
|
|
8266
8315
|
m = {
|
|
8267
8316
|
href: c.href,
|
|
@@ -8269,7 +8318,7 @@ const Xe = "footer_", Gt = "SiteFooter", Kr = ({ group: t }) => {
|
|
|
8269
8318
|
}, l && (m = {
|
|
8270
8319
|
...m,
|
|
8271
8320
|
className: "gtm-trackable",
|
|
8272
|
-
"data-gtm-event-type":
|
|
8321
|
+
"data-gtm-event-type": x,
|
|
8273
8322
|
"data-gtm-event-context": "HeaderButtons"
|
|
8274
8323
|
}), u && (m = {
|
|
8275
8324
|
...m,
|
|
@@ -8278,28 +8327,28 @@ const Xe = "footer_", Gt = "SiteFooter", Kr = ({ group: t }) => {
|
|
|
8278
8327
|
...c.props || {}
|
|
8279
8328
|
});
|
|
8280
8329
|
}
|
|
8281
|
-
const p = c.order && c.order[0] && c[c.order[0]], g = p && c[c.order[0]].order,
|
|
8282
|
-
let
|
|
8330
|
+
const p = c.order && c.order[0] && c[c.order[0]], g = p && c[c.order[0]].order, v = m && window.location.pathname === c.href;
|
|
8331
|
+
let b = {}, _ = {};
|
|
8283
8332
|
if (p) {
|
|
8284
|
-
const
|
|
8285
|
-
onClick: (
|
|
8286
|
-
onFocus: () => fe.events.onFocus({ id:
|
|
8287
|
-
onBlur: () => fe.events.onBlur({ id:
|
|
8288
|
-
onMouseLeave: () => fe.events.onBlur({ id:
|
|
8289
|
-
onMouseEnter: () => fe.events.onMouseEnter({ id:
|
|
8333
|
+
const x = c.menuId || t, E = {
|
|
8334
|
+
onClick: (w) => fe.events.onClick(w, { id: x, callback: s, isOpen: r[x] }),
|
|
8335
|
+
onFocus: () => fe.events.onFocus({ id: x }),
|
|
8336
|
+
onBlur: () => fe.events.onBlur({ id: x, callback: s }),
|
|
8337
|
+
onMouseLeave: () => fe.events.onBlur({ id: x, callback: s }),
|
|
8338
|
+
onMouseEnter: () => fe.events.onMouseEnter({ id: x, callback: s })
|
|
8290
8339
|
};
|
|
8291
|
-
n && (g && (
|
|
8340
|
+
n && (g && (b = {
|
|
8292
8341
|
...E,
|
|
8293
|
-
onKeyPress: (
|
|
8294
|
-
|
|
8342
|
+
onKeyPress: (w) => {
|
|
8343
|
+
w.key === "Enter" && fe.events.onClick(w, { id: x, callback: s, isOpen: r[x] });
|
|
8295
8344
|
},
|
|
8296
8345
|
tabIndex: "0",
|
|
8297
8346
|
// Add a `tabIndex` so keyboard users can focus on the `li`
|
|
8298
8347
|
"aria-haspopup": !0,
|
|
8299
|
-
"aria-expanded": r[
|
|
8300
|
-
"aria-controls":
|
|
8301
|
-
}),
|
|
8302
|
-
...
|
|
8348
|
+
"aria-expanded": r[x],
|
|
8349
|
+
"aria-controls": x
|
|
8350
|
+
}), _ = { hidden: x in r ? !r[x] : !0 }), g || (_ = {
|
|
8351
|
+
..._,
|
|
8303
8352
|
...E
|
|
8304
8353
|
});
|
|
8305
8354
|
}
|
|
@@ -8310,18 +8359,18 @@ const Xe = "footer_", Gt = "SiteFooter", Kr = ({ group: t }) => {
|
|
|
8310
8359
|
[c.className]: c.className,
|
|
8311
8360
|
"has-submenu": p,
|
|
8312
8361
|
parent: g,
|
|
8313
|
-
active:
|
|
8362
|
+
active: v
|
|
8314
8363
|
}),
|
|
8315
8364
|
role: "none",
|
|
8316
|
-
...
|
|
8365
|
+
...b,
|
|
8317
8366
|
children: [
|
|
8318
8367
|
m ? Y.createElement(
|
|
8319
8368
|
u ? se : "a",
|
|
8320
8369
|
m,
|
|
8321
8370
|
o.formatMessage({ id: f })
|
|
8322
8371
|
) : o.formatMessage({ id: f }),
|
|
8323
|
-
c.order && /* @__PURE__ */ a.jsx("ul", { ...
|
|
8324
|
-
if (!c[
|
|
8372
|
+
c.order && /* @__PURE__ */ a.jsx("ul", { ..._, children: c.order.map((x) => {
|
|
8373
|
+
if (!c[x])
|
|
8325
8374
|
return null;
|
|
8326
8375
|
const E = {
|
|
8327
8376
|
isLoggedIn: e,
|
|
@@ -8330,32 +8379,32 @@ const Xe = "footer_", Gt = "SiteFooter", Kr = ({ group: t }) => {
|
|
|
8330
8379
|
callback: s,
|
|
8331
8380
|
doTrack: d ? l : null
|
|
8332
8381
|
};
|
|
8333
|
-
return c[
|
|
8382
|
+
return c[x].order ? /* @__PURE__ */ a.jsxs(
|
|
8334
8383
|
"li",
|
|
8335
8384
|
{
|
|
8336
8385
|
className: S({
|
|
8337
|
-
[c[
|
|
8386
|
+
[c[x].className]: c[x].className
|
|
8338
8387
|
}),
|
|
8339
8388
|
children: [
|
|
8340
|
-
o.formatMessage({ id: `${f}_${
|
|
8341
|
-
/* @__PURE__ */ a.jsx("ul", { children: c[
|
|
8389
|
+
o.formatMessage({ id: `${f}_${x}` }),
|
|
8390
|
+
/* @__PURE__ */ a.jsx("ul", { children: c[x].order.map((w) => /* @__PURE__ */ a.jsx(
|
|
8342
8391
|
Jt,
|
|
8343
8392
|
{
|
|
8344
|
-
id: `${t}.${
|
|
8393
|
+
id: `${t}.${x}.${w}`,
|
|
8345
8394
|
...E
|
|
8346
8395
|
},
|
|
8347
|
-
|
|
8396
|
+
w
|
|
8348
8397
|
)) })
|
|
8349
8398
|
]
|
|
8350
8399
|
},
|
|
8351
|
-
|
|
8400
|
+
x
|
|
8352
8401
|
) : /* @__PURE__ */ a.jsx(
|
|
8353
8402
|
Jt,
|
|
8354
8403
|
{
|
|
8355
|
-
id: `${t}.${
|
|
8404
|
+
id: `${t}.${x}`,
|
|
8356
8405
|
...E
|
|
8357
8406
|
},
|
|
8358
|
-
|
|
8407
|
+
x
|
|
8359
8408
|
);
|
|
8360
8409
|
}) })
|
|
8361
8410
|
]
|
|
@@ -8570,35 +8619,35 @@ const bc = () => {
|
|
|
8570
8619
|
ae(() => {
|
|
8571
8620
|
window.scrollTo(0, 0);
|
|
8572
8621
|
}, [g]);
|
|
8573
|
-
const
|
|
8622
|
+
const v = Bt(t, { locale: c }), b = Bt(e, {
|
|
8574
8623
|
locale: c
|
|
8575
|
-
}),
|
|
8624
|
+
}), _ = Bt(n, {
|
|
8576
8625
|
locale: c
|
|
8577
|
-
}),
|
|
8578
|
-
return u !== "default" && (
|
|
8626
|
+
}), x = {};
|
|
8627
|
+
return u !== "default" && (x[u] = !0), f !== "default" && (x[f] = !0), m !== "default" && (x[m] = !0), /* @__PURE__ */ a.jsx(Ps, { onError: r, fallback: /* @__PURE__ */ a.jsx(bc, {}), children: /* @__PURE__ */ a.jsx(xs, { fallback: null, children: /* @__PURE__ */ a.jsxs(
|
|
8579
8628
|
"div",
|
|
8580
8629
|
{
|
|
8581
8630
|
id: "wrapper",
|
|
8582
|
-
className: S(o,
|
|
8631
|
+
className: S(o, x, { "has-footer": l }),
|
|
8583
8632
|
children: [
|
|
8584
8633
|
/* @__PURE__ */ a.jsx(Ha, { showNavigation: d }),
|
|
8585
8634
|
/* @__PURE__ */ a.jsxs("section", { id: "content-wrapper", children: [
|
|
8586
|
-
|
|
8635
|
+
b && /* @__PURE__ */ a.jsx(
|
|
8587
8636
|
"div",
|
|
8588
8637
|
{
|
|
8589
8638
|
className: S("additional-content prepended", {
|
|
8590
8639
|
"large-modal": p === "large"
|
|
8591
8640
|
}),
|
|
8592
|
-
children:
|
|
8641
|
+
children: b
|
|
8593
8642
|
}
|
|
8594
8643
|
),
|
|
8595
8644
|
Y.createElement(u === "bold" ? qa : "div", {
|
|
8596
8645
|
id: "content",
|
|
8597
|
-
children:
|
|
8646
|
+
children: v,
|
|
8598
8647
|
className: S({ "large-modal": p === "large" })
|
|
8599
8648
|
})
|
|
8600
8649
|
] }),
|
|
8601
|
-
|
|
8650
|
+
_ && /* @__PURE__ */ a.jsx("div", { className: "additional-content appended", children: _ }),
|
|
8602
8651
|
l && /* @__PURE__ */ a.jsx(Za, {}),
|
|
8603
8652
|
/* @__PURE__ */ a.jsx(gc, {})
|
|
8604
8653
|
]
|
|
@@ -8824,33 +8873,33 @@ const fu = ({
|
|
|
8824
8873
|
/* @__PURE__ */ a.jsx("ol", { children: t && t.length > 0 && t.map(
|
|
8825
8874
|
({
|
|
8826
8875
|
completed: g,
|
|
8827
|
-
completionTime:
|
|
8828
|
-
contentType:
|
|
8829
|
-
icon:
|
|
8830
|
-
image:
|
|
8876
|
+
completionTime: v,
|
|
8877
|
+
contentType: b,
|
|
8878
|
+
icon: _,
|
|
8879
|
+
image: x,
|
|
8831
8880
|
isIntroduction: E,
|
|
8832
|
-
optional:
|
|
8833
|
-
slug:
|
|
8834
|
-
subsectionId:
|
|
8881
|
+
optional: w,
|
|
8882
|
+
slug: y,
|
|
8883
|
+
subsectionId: F,
|
|
8835
8884
|
title: R,
|
|
8836
8885
|
type: Q
|
|
8837
8886
|
}) => {
|
|
8838
8887
|
const B = s && e || E, $ = {};
|
|
8839
|
-
return
|
|
8888
|
+
return x && ($.style = { "--image": `url(${x})` }), /* @__PURE__ */ a.jsx(
|
|
8840
8889
|
"li",
|
|
8841
8890
|
{
|
|
8842
8891
|
className: S({
|
|
8843
|
-
article:
|
|
8844
|
-
discussion:
|
|
8845
|
-
quiz:
|
|
8846
|
-
completed: g &&
|
|
8892
|
+
article: b === St.ARTICLE,
|
|
8893
|
+
discussion: b === St.DISCUSSION,
|
|
8894
|
+
quiz: b === St.QUIZ,
|
|
8895
|
+
completed: g && b === St.ARTICLE,
|
|
8847
8896
|
locked: !B
|
|
8848
8897
|
}),
|
|
8849
8898
|
...$,
|
|
8850
8899
|
children: /* @__PURE__ */ a.jsx(
|
|
8851
8900
|
at,
|
|
8852
8901
|
{
|
|
8853
|
-
href: B ? `/microcourses/en/${c}/${
|
|
8902
|
+
href: B ? `/microcourses/en/${c}/${y}` : void 0,
|
|
8854
8903
|
fallbackElement: "span",
|
|
8855
8904
|
className: "inner",
|
|
8856
8905
|
gtmContext: `MicrocourseOutline${zs(R)}`,
|
|
@@ -8860,7 +8909,7 @@ const fu = ({
|
|
|
8860
8909
|
xc,
|
|
8861
8910
|
{
|
|
8862
8911
|
sectionId: i,
|
|
8863
|
-
subsectionId:
|
|
8912
|
+
subsectionId: F,
|
|
8864
8913
|
title: R,
|
|
8865
8914
|
className: "course-title"
|
|
8866
8915
|
}
|
|
@@ -8869,18 +8918,18 @@ const fu = ({
|
|
|
8869
8918
|
/* @__PURE__ */ a.jsx(
|
|
8870
8919
|
wc,
|
|
8871
8920
|
{
|
|
8872
|
-
completionTime:
|
|
8873
|
-
icon:
|
|
8874
|
-
optional:
|
|
8921
|
+
completionTime: v,
|
|
8922
|
+
icon: _,
|
|
8923
|
+
optional: w,
|
|
8875
8924
|
type: Q,
|
|
8876
|
-
children: u && u[
|
|
8925
|
+
children: u && u[y] && /* @__PURE__ */ a.jsx("span", { className: "quiz-score", children: `${u[y]}%` })
|
|
8877
8926
|
}
|
|
8878
8927
|
)
|
|
8879
8928
|
] })
|
|
8880
8929
|
}
|
|
8881
8930
|
)
|
|
8882
8931
|
},
|
|
8883
|
-
|
|
8932
|
+
y
|
|
8884
8933
|
);
|
|
8885
8934
|
}
|
|
8886
8935
|
) })
|
|
@@ -8947,11 +8996,11 @@ const we = "discussion_form_", ar = ({
|
|
|
8947
8996
|
},
|
|
8948
8997
|
gtmContext: l = "DiscussionForm"
|
|
8949
8998
|
}) => {
|
|
8950
|
-
var $, C,
|
|
8999
|
+
var $, C, k;
|
|
8951
9000
|
const u = H(), f = Ee(De), [m, p] = X(
|
|
8952
9001
|
n.isEditing && n.isEditing.text || ""
|
|
8953
|
-
), [g,
|
|
8954
|
-
if (r || (r =
|
|
9002
|
+
), [g, v] = X(c.error || !1), [b, _] = X(!1), x = pe(null);
|
|
9003
|
+
if (r || (r = x), n.isLoading)
|
|
8955
9004
|
return /* @__PURE__ */ a.jsx(
|
|
8956
9005
|
Se,
|
|
8957
9006
|
{
|
|
@@ -8959,32 +9008,32 @@ const we = "discussion_form_", ar = ({
|
|
|
8959
9008
|
"data-testid": "loading-placeholder"
|
|
8960
9009
|
}
|
|
8961
9010
|
);
|
|
8962
|
-
const E = (
|
|
8963
|
-
const N =
|
|
9011
|
+
const E = (j) => {
|
|
9012
|
+
const N = j.target.value;
|
|
8964
9013
|
p(N);
|
|
8965
|
-
let
|
|
8966
|
-
!f || !f.id ?
|
|
9014
|
+
let A;
|
|
9015
|
+
!f || !f.id ? A = $e(
|
|
8967
9016
|
u.formatMessage,
|
|
8968
9017
|
`${we}error_loggedOut`,
|
|
8969
9018
|
t.type,
|
|
8970
9019
|
"action"
|
|
8971
|
-
) : e ? N.length >= i && (
|
|
9020
|
+
) : e ? N.length >= i && (A = `${we}error_tooLong`) : A = $e(
|
|
8972
9021
|
u.formatMessage,
|
|
8973
9022
|
`${we}error_noPermission`,
|
|
8974
9023
|
t.type,
|
|
8975
9024
|
"action"
|
|
8976
|
-
),
|
|
9025
|
+
), A ? v(A) : g && v(!1);
|
|
8977
9026
|
};
|
|
8978
|
-
let
|
|
9027
|
+
let w = `${t.type}-form`;
|
|
8979
9028
|
if (t.type === "response" || t.type === "reply") {
|
|
8980
|
-
const
|
|
8981
|
-
|
|
9029
|
+
const j = (($ = t.slugs) == null ? void 0 : $.reply) || ((C = t.slugs) == null ? void 0 : C.answer) || ((k = t.slugs) == null ? void 0 : k.question) || "";
|
|
9030
|
+
j && (w = `${w}-${j.slice(-15)}`);
|
|
8982
9031
|
}
|
|
8983
|
-
const
|
|
8984
|
-
var
|
|
8985
|
-
if (
|
|
9032
|
+
const y = async (j) => {
|
|
9033
|
+
var A;
|
|
9034
|
+
if (j.preventDefault(), j.stopPropagation(), !f || !f.id || !e || R)
|
|
8986
9035
|
return;
|
|
8987
|
-
Dt && clearTimeout(Dt),
|
|
9036
|
+
Dt && clearTimeout(Dt), _("submitting");
|
|
8988
9037
|
const N = window.location.pathname;
|
|
8989
9038
|
try {
|
|
8990
9039
|
let W;
|
|
@@ -8996,7 +9045,7 @@ const we = "discussion_form_", ar = ({
|
|
|
8996
9045
|
W = await d.create({
|
|
8997
9046
|
title: m,
|
|
8998
9047
|
authorId: f && f.id,
|
|
8999
|
-
...(
|
|
9048
|
+
...(A = d.props) == null ? void 0 : A.create
|
|
9000
9049
|
});
|
|
9001
9050
|
break;
|
|
9002
9051
|
case "response":
|
|
@@ -9015,9 +9064,9 @@ const we = "discussion_form_", ar = ({
|
|
|
9015
9064
|
break;
|
|
9016
9065
|
}
|
|
9017
9066
|
await Ks(1e3), d.callback && await d.callback(W), Dt = setTimeout(() => {
|
|
9018
|
-
p(""),
|
|
9067
|
+
p(""), _("submitted");
|
|
9019
9068
|
const Z = new Event("discussionFormSubmitted");
|
|
9020
|
-
document.dispatchEvent(Z),
|
|
9069
|
+
document.dispatchEvent(Z), F();
|
|
9021
9070
|
}, 500);
|
|
9022
9071
|
} catch (W) {
|
|
9023
9072
|
const Z = W;
|
|
@@ -9032,13 +9081,13 @@ const we = "discussion_form_", ar = ({
|
|
|
9032
9081
|
`${we}error_tooMany`,
|
|
9033
9082
|
t.type,
|
|
9034
9083
|
"action"
|
|
9035
|
-
) : Z != null && Z.message.includes("400") && (z = `${we}error`),
|
|
9084
|
+
) : Z != null && Z.message.includes("400") && (z = `${we}error`), v(z), F();
|
|
9036
9085
|
}
|
|
9037
|
-
},
|
|
9086
|
+
}, F = () => {
|
|
9038
9087
|
Dt = setTimeout(() => {
|
|
9039
|
-
|
|
9088
|
+
v(!1), _(!1);
|
|
9040
9089
|
}, 5e3);
|
|
9041
|
-
}, R = !m || !ni(m), Q =
|
|
9090
|
+
}, R = !m || !ni(m), Q = b === "submitting", B = [];
|
|
9042
9091
|
return (n.isEditing && !Q || c.cancel) && B.push({
|
|
9043
9092
|
variant: "secondary",
|
|
9044
9093
|
size: { mobile: "small", 600: "medium" },
|
|
@@ -9051,14 +9100,14 @@ const we = "discussion_form_", ar = ({
|
|
|
9051
9100
|
}), B.push({
|
|
9052
9101
|
variant: "primary",
|
|
9053
9102
|
size: { mobile: "small", 600: "medium" },
|
|
9054
|
-
onClick: (
|
|
9103
|
+
onClick: (j) => {
|
|
9055
9104
|
if (n.isEditing) {
|
|
9056
|
-
|
|
9057
|
-
|
|
9105
|
+
_("submitting"), d.handleSaveEdit && d.handleSaveEdit(
|
|
9106
|
+
x.current && "value" in x.current ? x.current.value : ""
|
|
9058
9107
|
);
|
|
9059
9108
|
return;
|
|
9060
9109
|
}
|
|
9061
|
-
|
|
9110
|
+
y(j);
|
|
9062
9111
|
},
|
|
9063
9112
|
className: "gtm-trackable",
|
|
9064
9113
|
"data-gtm-event-context": l,
|
|
@@ -9071,7 +9120,7 @@ const we = "discussion_form_", ar = ({
|
|
|
9071
9120
|
}), /* @__PURE__ */ a.jsxs(
|
|
9072
9121
|
"form",
|
|
9073
9122
|
{
|
|
9074
|
-
id:
|
|
9123
|
+
id: w,
|
|
9075
9124
|
className: S("discussion-card discussion-form", {
|
|
9076
9125
|
"no-styling": n.isInWrapper && n.isEditing
|
|
9077
9126
|
}),
|
|
@@ -9086,12 +9135,12 @@ const we = "discussion_form_", ar = ({
|
|
|
9086
9135
|
gtmType: "profile-click"
|
|
9087
9136
|
}
|
|
9088
9137
|
),
|
|
9089
|
-
/* @__PURE__ */ a.jsx(be, { element: "label", showOnFocus: !1, htmlFor: `${
|
|
9138
|
+
/* @__PURE__ */ a.jsx(be, { element: "label", showOnFocus: !1, htmlFor: `${w}-input`, children: $e(u.formatMessage, `${we}label`, t.type, "action") }),
|
|
9090
9139
|
/* @__PURE__ */ a.jsx(
|
|
9091
9140
|
Ms,
|
|
9092
9141
|
{
|
|
9093
9142
|
ref: r,
|
|
9094
|
-
id: `${
|
|
9143
|
+
id: `${w}-input`,
|
|
9095
9144
|
name: t.type,
|
|
9096
9145
|
placeholder: s || $e(
|
|
9097
9146
|
u.formatMessage,
|
|
@@ -9100,7 +9149,7 @@ const we = "discussion_form_", ar = ({
|
|
|
9100
9149
|
"action"
|
|
9101
9150
|
),
|
|
9102
9151
|
onChange: E,
|
|
9103
|
-
value:
|
|
9152
|
+
value: b === "submitting" && !g ? "" : m,
|
|
9104
9153
|
maxLength: i,
|
|
9105
9154
|
"aria-invalid": !!g,
|
|
9106
9155
|
"aria-errormessage": "error-message",
|
|
@@ -9109,7 +9158,7 @@ const we = "discussion_form_", ar = ({
|
|
|
9109
9158
|
}
|
|
9110
9159
|
),
|
|
9111
9160
|
/* @__PURE__ */ a.jsx("small", { children: $e(u.formatMessage, `${we}explainer`, t.type, "action", {
|
|
9112
|
-
a: (
|
|
9161
|
+
a: (j) => /* @__PURE__ */ a.jsx(
|
|
9113
9162
|
"a",
|
|
9114
9163
|
{
|
|
9115
9164
|
href: "https://about.apolitical.co/q-and-a-community-guidelines",
|
|
@@ -9118,12 +9167,12 @@ const we = "discussion_form_", ar = ({
|
|
|
9118
9167
|
"data-gtm-event-context": l,
|
|
9119
9168
|
"data-gtm-event-type": "community-guidelines-link",
|
|
9120
9169
|
rel: "noreferrer",
|
|
9121
|
-
children:
|
|
9170
|
+
children: j
|
|
9122
9171
|
}
|
|
9123
9172
|
)
|
|
9124
9173
|
}) }),
|
|
9125
9174
|
/* @__PURE__ */ a.jsx(kt, { buttons: B }),
|
|
9126
|
-
|
|
9175
|
+
b === "submitted" && n.showSuccessMessage && /* @__PURE__ */ a.jsx(Wt, { className: "success", "data-testid": "success", children: $e(u.formatMessage, `${we}success`, t.type, "action") }),
|
|
9127
9176
|
g && /* @__PURE__ */ a.jsx(Wt, { id: "error-message", className: "error", "data-testid": "error", children: c.error ? c.error : typeof g == "string" ? g.includes(" ") ? g : u.formatMessage(
|
|
9128
9177
|
{ id: g },
|
|
9129
9178
|
{
|
|
@@ -9197,32 +9246,32 @@ const An = () => {
|
|
|
9197
9246
|
ae(() => {
|
|
9198
9247
|
p(s);
|
|
9199
9248
|
}, [s]);
|
|
9200
|
-
const [u, f] = X(e), [m, p] = X(s), [g,
|
|
9249
|
+
const [u, f] = X(e), [m, p] = X(s), [g, v] = X(!1), [b, _] = X(!1), x = wt(
|
|
9201
9250
|
() => Ec(n, Dn),
|
|
9202
9251
|
[n]
|
|
9203
|
-
), E = (
|
|
9204
|
-
if (
|
|
9252
|
+
), E = (y) => {
|
|
9253
|
+
if (y.preventDefault(), y.stopPropagation(), _(!1), bt)
|
|
9205
9254
|
return An(), !1;
|
|
9206
9255
|
if (An(), g || !o)
|
|
9207
9256
|
return !1;
|
|
9208
|
-
bt = setTimeout(
|
|
9209
|
-
},
|
|
9257
|
+
bt = setTimeout(w, 350);
|
|
9258
|
+
}, w = async () => {
|
|
9210
9259
|
if (An(), g || !o)
|
|
9211
9260
|
return !1;
|
|
9212
|
-
let
|
|
9213
|
-
|
|
9261
|
+
let y = m ? u - 1 : u + 1;
|
|
9262
|
+
y < 0 && (y = 0), v(!0), f(y), p(!m);
|
|
9214
9263
|
try {
|
|
9215
9264
|
if (i && i.slugs) {
|
|
9216
|
-
const
|
|
9217
|
-
m ? await d(
|
|
9218
|
-
...
|
|
9265
|
+
const F = Tc(i.slugs);
|
|
9266
|
+
m ? await d(F) : await c({
|
|
9267
|
+
...F,
|
|
9219
9268
|
payload: { contentPath: window.location.pathname }
|
|
9220
9269
|
});
|
|
9221
9270
|
}
|
|
9222
9271
|
} catch {
|
|
9223
9272
|
f(e), p(s);
|
|
9224
9273
|
} finally {
|
|
9225
|
-
|
|
9274
|
+
v(!1);
|
|
9226
9275
|
}
|
|
9227
9276
|
};
|
|
9228
9277
|
return Y.createElement(t, {
|
|
@@ -9233,16 +9282,16 @@ const An = () => {
|
|
|
9233
9282
|
}),
|
|
9234
9283
|
onClick: E,
|
|
9235
9284
|
onMouseEnter: () => {
|
|
9236
|
-
|
|
9285
|
+
_(!0);
|
|
9237
9286
|
},
|
|
9238
9287
|
onMouseLeave: () => {
|
|
9239
|
-
|
|
9288
|
+
_(!1);
|
|
9240
9289
|
},
|
|
9241
9290
|
onFocus: () => {
|
|
9242
|
-
|
|
9291
|
+
_(!0);
|
|
9243
9292
|
},
|
|
9244
9293
|
onBlur: () => {
|
|
9245
|
-
|
|
9294
|
+
_(!1);
|
|
9246
9295
|
},
|
|
9247
9296
|
children: /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
9248
9297
|
/* @__PURE__ */ a.jsx(
|
|
@@ -9281,17 +9330,17 @@ const An = () => {
|
|
|
9281
9330
|
)
|
|
9282
9331
|
}
|
|
9283
9332
|
),
|
|
9284
|
-
n && /* @__PURE__ */ a.jsx(_i, { isOpen:
|
|
9285
|
-
|
|
9333
|
+
n && /* @__PURE__ */ a.jsx(_i, { isOpen: b, isLoading: n.length === 0, children: n.length && /* @__PURE__ */ a.jsxs("ul", { children: [
|
|
9334
|
+
x.map((y) => typeof y == "string" || !y.name ? null : /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
9286
9335
|
at,
|
|
9287
9336
|
{
|
|
9288
|
-
href:
|
|
9337
|
+
href: y.id ? `/profiles/${y.id}` : void 0,
|
|
9289
9338
|
gtmContext: "Likes",
|
|
9290
9339
|
gtmType: "liked-name-click",
|
|
9291
|
-
onClick: (
|
|
9292
|
-
children:
|
|
9340
|
+
onClick: (F) => F == null ? void 0 : F.stopPropagation(),
|
|
9341
|
+
children: y.name
|
|
9293
9342
|
}
|
|
9294
|
-
) },
|
|
9343
|
+
) }, y.id || window.btoa(y.name))),
|
|
9295
9344
|
e > Dn && /* @__PURE__ */ a.jsx("li", { children: l.formatMessage(
|
|
9296
9345
|
{ id: "discussion_likes_more" },
|
|
9297
9346
|
{ number: e - Dn }
|
|
@@ -9332,26 +9381,26 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9332
9381
|
links: m = {},
|
|
9333
9382
|
className: p,
|
|
9334
9383
|
gtmContext: g = "DiscussionAnswer",
|
|
9335
|
-
children:
|
|
9336
|
-
isTruncated:
|
|
9384
|
+
children: v,
|
|
9385
|
+
isTruncated: b = !1
|
|
9337
9386
|
}) => {
|
|
9338
|
-
const
|
|
9387
|
+
const _ = H(), x = Ee(De), E = Ee(sr), { author: w, canLike: y, createdAt: F, id: R, likes: Q = 0, userLiked: B, comments: $ = 0 } = e, C = x && x.id && typeof w != "string" && w.id && w.id === x.id || !1, k = typeof y == "boolean" ? y : n ? !C : !1, j = C && (!e.createdAt || Ys(e.createdAt, 10, "seconds")), N = pe(null), [A, W] = X({
|
|
9339
9388
|
body: e && e.body || "",
|
|
9340
9389
|
isEditing: !1,
|
|
9341
9390
|
didEdit: e && e.isEdited || !1
|
|
9342
9391
|
}), [Z, z] = X(!1), [K, T] = X(
|
|
9343
|
-
|
|
9392
|
+
j ? "highlighted" : "default"
|
|
9344
9393
|
/* Default */
|
|
9345
9394
|
), [P, q] = X("");
|
|
9346
9395
|
ae(() => {
|
|
9347
|
-
const
|
|
9348
|
-
if (!(!
|
|
9349
|
-
return document.addEventListener("discussionFormSubmitted", L),
|
|
9350
|
-
document.removeEventListener("discussionFormSubmitted", L),
|
|
9396
|
+
const O = N.current;
|
|
9397
|
+
if (!(!O || K === "default"))
|
|
9398
|
+
return document.addEventListener("discussionFormSubmitted", L), O.addEventListener("transitionend", U), () => {
|
|
9399
|
+
document.removeEventListener("discussionFormSubmitted", L), O.removeEventListener("transitionend", U);
|
|
9351
9400
|
};
|
|
9352
9401
|
}, []), ae(() => {
|
|
9353
9402
|
W({
|
|
9354
|
-
...
|
|
9403
|
+
...A,
|
|
9355
9404
|
body: e && e.body || "",
|
|
9356
9405
|
didEdit: e && e.isEdited || !1
|
|
9357
9406
|
});
|
|
@@ -9363,27 +9412,27 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9363
9412
|
/* Fading */
|
|
9364
9413
|
);
|
|
9365
9414
|
}, 1e3);
|
|
9366
|
-
}, U = ({ propertyName:
|
|
9367
|
-
|
|
9415
|
+
}, U = ({ propertyName: O }) => {
|
|
9416
|
+
O === "background-color" && T((oe) => (oe === "default" && (document.removeEventListener("discussionFormSubmitted", L), N.current && N.current.removeEventListener("transitionend", U)), oe === "fading" ? "default" : oe));
|
|
9368
9417
|
};
|
|
9369
9418
|
if (r || !e || e.type === "answer" && (!e.slugs || !e.slugs.question))
|
|
9370
9419
|
return /* @__PURE__ */ a.jsx(Se, { className: "discussion-card discussion-post" });
|
|
9371
|
-
const te =
|
|
9372
|
-
|
|
9420
|
+
const te = b ? et(A.body, Cc) : A.body, G = async (O) => {
|
|
9421
|
+
O || (O = ""), q("");
|
|
9373
9422
|
try {
|
|
9374
|
-
if (!Rs(
|
|
9375
|
-
const oe = e.type === "question" ? { title:
|
|
9423
|
+
if (!Rs(O, A.body)) {
|
|
9424
|
+
const oe = e.type === "question" ? { title: O } : { body: O };
|
|
9376
9425
|
await d(Qr(e.slugs), oe);
|
|
9377
9426
|
}
|
|
9378
|
-
W({ body:
|
|
9427
|
+
W({ body: O, isEditing: !1, didEdit: !0 });
|
|
9379
9428
|
} catch {
|
|
9380
9429
|
q(`${Me}form_error`);
|
|
9381
9430
|
}
|
|
9382
9431
|
}, V = () => {
|
|
9383
9432
|
E && E.updateConversation && E.updateConversation({ showForm: !0 }), setTimeout(() => {
|
|
9384
9433
|
var Ne, Ce, Ue;
|
|
9385
|
-
const oe = `reply-form-${(e.type === "answer" ? e.slug : ((Ne = e.slugs) == null ? void 0 : Ne.reply) || ((Ce = e.slugs) == null ? void 0 : Ce.answer) || ((Ue = e.slugs) == null ? void 0 : Ue.question) || "").toLowerCase().slice(-15)}`,
|
|
9386
|
-
ve && ve.focus(),
|
|
9434
|
+
const oe = `reply-form-${(e.type === "answer" ? e.slug : ((Ne = e.slugs) == null ? void 0 : Ne.reply) || ((Ce = e.slugs) == null ? void 0 : Ce.answer) || ((Ue = e.slugs) == null ? void 0 : Ue.question) || "").toLowerCase().slice(-15)}`, D = document.getElementById(oe), ve = document.getElementById(`${oe}-input`);
|
|
9435
|
+
ve && ve.focus(), D && D.scrollIntoView({ behavior: "smooth" });
|
|
9387
9436
|
}, 0);
|
|
9388
9437
|
}, ee = async () => {
|
|
9389
9438
|
z(!1);
|
|
@@ -9394,14 +9443,14 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9394
9443
|
}
|
|
9395
9444
|
}, re = [
|
|
9396
9445
|
{
|
|
9397
|
-
text:
|
|
9398
|
-
onClick: (
|
|
9399
|
-
|
|
9446
|
+
text: _.formatMessage({ id: `${Me}moreMenu_report` }),
|
|
9447
|
+
onClick: (O) => {
|
|
9448
|
+
O.stopPropagation();
|
|
9400
9449
|
},
|
|
9401
9450
|
href: `mailto:community@apolitical.co?subject=${encodeURI(
|
|
9402
|
-
|
|
9451
|
+
_.formatMessage({ id: `${Me}report_subject` })
|
|
9403
9452
|
)}&body=${encodeURI(
|
|
9404
|
-
|
|
9453
|
+
_.formatMessage(
|
|
9405
9454
|
{ id: `${Me}report_body` },
|
|
9406
9455
|
{
|
|
9407
9456
|
contentType: e.type || "",
|
|
@@ -9415,17 +9464,17 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9415
9464
|
];
|
|
9416
9465
|
return n && C && re.push(
|
|
9417
9466
|
{
|
|
9418
|
-
text:
|
|
9419
|
-
onClick: () => W({ ...
|
|
9467
|
+
text: _.formatMessage({ id: `${Me}moreMenu_edit` }),
|
|
9468
|
+
onClick: () => W({ ...A, isEditing: !0 }),
|
|
9420
9469
|
icon: "pencil-paper",
|
|
9421
9470
|
className: "gtm-trackable",
|
|
9422
9471
|
"data-gtm-event-context": g,
|
|
9423
9472
|
"data-gtm-event-type": `edit-${e.type}-click`
|
|
9424
9473
|
},
|
|
9425
9474
|
{
|
|
9426
|
-
text:
|
|
9427
|
-
onClick: (
|
|
9428
|
-
|
|
9475
|
+
text: _.formatMessage({ id: `${Me}moreMenu_delete` }),
|
|
9476
|
+
onClick: (O) => {
|
|
9477
|
+
O.preventDefault(), O.stopPropagation(), z(!0);
|
|
9429
9478
|
},
|
|
9430
9479
|
icon: "trash",
|
|
9431
9480
|
className: "gtm-trackable",
|
|
@@ -9445,24 +9494,24 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9445
9494
|
{
|
|
9446
9495
|
id: R || e.slug,
|
|
9447
9496
|
className: S("discussion-card", e.type, {
|
|
9448
|
-
editing:
|
|
9449
|
-
"has-link": m.post && !
|
|
9497
|
+
editing: A.isEditing,
|
|
9498
|
+
"has-link": m.post && !A.isEditing
|
|
9450
9499
|
}),
|
|
9451
|
-
onClick: (
|
|
9452
|
-
!m.post ||
|
|
9500
|
+
onClick: (O) => {
|
|
9501
|
+
!m.post || A.isEditing || (O.preventDefault(), O.stopPropagation(), window.location.href = m.post);
|
|
9453
9502
|
},
|
|
9454
9503
|
children: [
|
|
9455
|
-
!
|
|
9504
|
+
!A.isEditing && /* @__PURE__ */ a.jsx(
|
|
9456
9505
|
tr,
|
|
9457
9506
|
{
|
|
9458
|
-
member:
|
|
9459
|
-
additionalContent: { createdAt:
|
|
9460
|
-
className: typeof
|
|
9507
|
+
member: w,
|
|
9508
|
+
additionalContent: { createdAt: F, didEdit: A.didEdit },
|
|
9509
|
+
className: typeof w != "string" && w.id === s ? "highlighted" : "",
|
|
9461
9510
|
gtmContext: g,
|
|
9462
9511
|
gtmType: "profile-click"
|
|
9463
9512
|
}
|
|
9464
9513
|
),
|
|
9465
|
-
|
|
9514
|
+
A.isEditing ? /* @__PURE__ */ a.jsx(
|
|
9466
9515
|
ar,
|
|
9467
9516
|
{
|
|
9468
9517
|
content: { type: e.type, slugs: e.slugs },
|
|
@@ -9470,14 +9519,14 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9470
9519
|
meta: {
|
|
9471
9520
|
isLoading: r,
|
|
9472
9521
|
isInWrapper: !0,
|
|
9473
|
-
isEditing: { text:
|
|
9522
|
+
isEditing: { text: A.body }
|
|
9474
9523
|
},
|
|
9475
9524
|
maxLength: e.type === "question" ? 250 : 5e4,
|
|
9476
9525
|
forceShow: {
|
|
9477
|
-
error: P !== "" && P !== "delete-error" ?
|
|
9526
|
+
error: P !== "" && P !== "delete-error" ? _.formatMessage(
|
|
9478
9527
|
{ id: P },
|
|
9479
9528
|
{
|
|
9480
|
-
action:
|
|
9529
|
+
action: _.formatMessage({
|
|
9481
9530
|
id: `discussion_action_${e.type}`
|
|
9482
9531
|
})
|
|
9483
9532
|
}
|
|
@@ -9487,7 +9536,7 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9487
9536
|
create: o,
|
|
9488
9537
|
handleSaveEdit: G,
|
|
9489
9538
|
handleCancel: () => {
|
|
9490
|
-
q(""), W({ ...
|
|
9539
|
+
q(""), W({ ...A, isEditing: !1 });
|
|
9491
9540
|
}
|
|
9492
9541
|
},
|
|
9493
9542
|
gtmContext: `${g}Form`
|
|
@@ -9513,7 +9562,7 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9513
9562
|
children: te
|
|
9514
9563
|
}
|
|
9515
9564
|
),
|
|
9516
|
-
!
|
|
9565
|
+
!A.isEditing && !(i != null && i.actionBar) && /* @__PURE__ */ a.jsxs(
|
|
9517
9566
|
"ul",
|
|
9518
9567
|
{
|
|
9519
9568
|
className: S("actions text-medium", e.type),
|
|
@@ -9527,7 +9576,7 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9527
9576
|
isShort: !1,
|
|
9528
9577
|
userLiked: B,
|
|
9529
9578
|
content: { type: e.type, slugs: e.slugs },
|
|
9530
|
-
canLike:
|
|
9579
|
+
canLike: k,
|
|
9531
9580
|
peopleWhoLiked: e.peopleWhoLiked,
|
|
9532
9581
|
functions: {
|
|
9533
9582
|
createLike: l,
|
|
@@ -9539,8 +9588,8 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9539
9588
|
"li",
|
|
9540
9589
|
{
|
|
9541
9590
|
className: "action-button",
|
|
9542
|
-
onClick: (
|
|
9543
|
-
|
|
9591
|
+
onClick: (O) => {
|
|
9592
|
+
O.preventDefault(), O.stopPropagation(), m.comments && (window.location.href = m.comments), typeof f == "function" && f();
|
|
9544
9593
|
},
|
|
9545
9594
|
children: [
|
|
9546
9595
|
/* @__PURE__ */ a.jsx(
|
|
@@ -9555,13 +9604,13 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9555
9604
|
className: "gtm-trackable",
|
|
9556
9605
|
"data-gtm-event-context": g,
|
|
9557
9606
|
"data-gtm-event-type": `answer-${e.type}-click`,
|
|
9558
|
-
screenreaderText:
|
|
9607
|
+
screenreaderText: _.formatMessage(
|
|
9559
9608
|
{ id: `${Me}comments_screenReader` },
|
|
9560
9609
|
{ count: $ }
|
|
9561
9610
|
)
|
|
9562
9611
|
}
|
|
9563
9612
|
),
|
|
9564
|
-
/* @__PURE__ */ a.jsx("span", { children:
|
|
9613
|
+
/* @__PURE__ */ a.jsx("span", { children: _.formatMessage(
|
|
9565
9614
|
{ id: `${Me}comments` },
|
|
9566
9615
|
{ count: $ }
|
|
9567
9616
|
) })
|
|
@@ -9575,7 +9624,7 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9575
9624
|
size: "medium",
|
|
9576
9625
|
styling: { muted: !0 },
|
|
9577
9626
|
onClick: V,
|
|
9578
|
-
children:
|
|
9627
|
+
children: _.formatMessage({ id: `${Me}reply` })
|
|
9579
9628
|
}
|
|
9580
9629
|
) }),
|
|
9581
9630
|
/* @__PURE__ */ a.jsx(
|
|
@@ -9592,7 +9641,7 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9592
9641
|
]
|
|
9593
9642
|
}
|
|
9594
9643
|
),
|
|
9595
|
-
|
|
9644
|
+
v,
|
|
9596
9645
|
/* @__PURE__ */ a.jsx(
|
|
9597
9646
|
an,
|
|
9598
9647
|
{
|
|
@@ -9601,30 +9650,30 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9601
9650
|
functions: { onOpen: () => {
|
|
9602
9651
|
}, onClose: () => z(!1) },
|
|
9603
9652
|
forceShow: {
|
|
9604
|
-
error: P === "delete-error" ?
|
|
9653
|
+
error: P === "delete-error" ? _.formatMessage(
|
|
9605
9654
|
{ id: "discussion_delete_error" },
|
|
9606
9655
|
{
|
|
9607
|
-
action:
|
|
9656
|
+
action: _.formatMessage({
|
|
9608
9657
|
id: `discussion_action_${e.type}`
|
|
9609
9658
|
})
|
|
9610
9659
|
}
|
|
9611
9660
|
) : !1
|
|
9612
9661
|
},
|
|
9613
|
-
title:
|
|
9662
|
+
title: _.formatMessage(
|
|
9614
9663
|
{ id: "discussion_delete_title" },
|
|
9615
|
-
{ action:
|
|
9664
|
+
{ action: _.formatMessage({ id: `discussion_action_${e.type}` }) }
|
|
9616
9665
|
),
|
|
9617
9666
|
buttons: [
|
|
9618
9667
|
{
|
|
9619
9668
|
variant: "secondary",
|
|
9620
9669
|
onClick: () => z(!1),
|
|
9621
|
-
children:
|
|
9670
|
+
children: _.formatMessage({ id: "discussion_delete_cancel" })
|
|
9622
9671
|
},
|
|
9623
9672
|
{
|
|
9624
9673
|
variant: "primary",
|
|
9625
9674
|
className: "destructive",
|
|
9626
9675
|
onClick: ee,
|
|
9627
|
-
children:
|
|
9676
|
+
children: _.formatMessage({ id: "discussion_delete_delete" })
|
|
9628
9677
|
}
|
|
9629
9678
|
],
|
|
9630
9679
|
gtmContext: `${e.type.charAt(0).toUpperCase()}${e.type.slice(1)}:${e.slug}`,
|
|
@@ -9633,8 +9682,8 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9633
9682
|
{
|
|
9634
9683
|
id: "discussion_delete_text",
|
|
9635
9684
|
values: {
|
|
9636
|
-
p: (
|
|
9637
|
-
action:
|
|
9685
|
+
p: (O) => /* @__PURE__ */ a.jsx("p", { children: O }),
|
|
9686
|
+
action: _.formatMessage({
|
|
9638
9687
|
id: `discussion_action_${e.type}`
|
|
9639
9688
|
})
|
|
9640
9689
|
}
|
|
@@ -10077,18 +10126,18 @@ function Wc({
|
|
|
10077
10126
|
},
|
|
10078
10127
|
user: d,
|
|
10079
10128
|
...l
|
|
10080
|
-
}, f = qc({ ...u, mutationFn: t }), m = Uc({ ...u, mutationFn: e }), p = zc({ ...u, mutationFn: n }), g = Hc({ ...u, mutationFn: s }),
|
|
10129
|
+
}, f = qc({ ...u, mutationFn: t }), m = Uc({ ...u, mutationFn: e }), p = zc({ ...u, mutationFn: n }), g = Hc({ ...u, mutationFn: s }), v = Vc({ ...u, mutationFn: i }), { activities: b, ..._ } = Zc({ queryKey: o, queryFn: r });
|
|
10081
10130
|
return {
|
|
10082
|
-
activities:
|
|
10131
|
+
activities: b,
|
|
10083
10132
|
mutations: {
|
|
10084
10133
|
create: f,
|
|
10085
10134
|
edit: m,
|
|
10086
10135
|
remove: g,
|
|
10087
10136
|
like: p,
|
|
10088
|
-
unlike:
|
|
10137
|
+
unlike: v
|
|
10089
10138
|
},
|
|
10090
10139
|
user: d,
|
|
10091
|
-
...
|
|
10140
|
+
..._
|
|
10092
10141
|
};
|
|
10093
10142
|
}
|
|
10094
10143
|
function zc({
|
|
@@ -10210,15 +10259,15 @@ const pu = ({
|
|
|
10210
10259
|
fetchNextPage: l,
|
|
10211
10260
|
hasNextPage: u,
|
|
10212
10261
|
isLoading: f,
|
|
10213
|
-
mutations: { create: m, edit: p, remove: g, like:
|
|
10214
|
-
user:
|
|
10262
|
+
mutations: { create: m, edit: p, remove: g, like: v, unlike: b },
|
|
10263
|
+
user: _
|
|
10215
10264
|
} = Wc({
|
|
10216
10265
|
queryKey: [t, e, "activities"],
|
|
10217
10266
|
queryFns: r
|
|
10218
10267
|
});
|
|
10219
10268
|
if (Ja(), d)
|
|
10220
10269
|
return /* @__PURE__ */ a.jsx(He, { variant: "error", text: d.message });
|
|
10221
|
-
const
|
|
10270
|
+
const x = (c == null ? void 0 : c.length) || 0;
|
|
10222
10271
|
return /* @__PURE__ */ a.jsxs("section", { children: [
|
|
10223
10272
|
/* @__PURE__ */ a.jsx(
|
|
10224
10273
|
Va,
|
|
@@ -10237,20 +10286,20 @@ const pu = ({
|
|
|
10237
10286
|
}
|
|
10238
10287
|
}
|
|
10239
10288
|
),
|
|
10240
|
-
c == null ? void 0 : c.map((E,
|
|
10241
|
-
var
|
|
10289
|
+
c == null ? void 0 : c.map((E, w) => {
|
|
10290
|
+
var A, W, Z, z, K, T, P, q;
|
|
10242
10291
|
const {
|
|
10243
|
-
id:
|
|
10244
|
-
own_reactions:
|
|
10292
|
+
id: y,
|
|
10293
|
+
own_reactions: F,
|
|
10245
10294
|
latest_reactions: R,
|
|
10246
10295
|
reaction_counts: Q
|
|
10247
|
-
} = E, B = (((
|
|
10296
|
+
} = E, B = (((A = R == null ? void 0 : R.like) == null ? void 0 : A.length) || 0) > 0, $ = (((W = F == null ? void 0 : F.like) == null ? void 0 : W.length) || 0) > 0, C = $ ? F == null ? void 0 : F.like[0].id : "", k = B ? (Z = R == null ? void 0 : R.like) == null ? void 0 : Z.map((L) => {
|
|
10248
10297
|
var U, te, G;
|
|
10249
10298
|
return {
|
|
10250
10299
|
id: (U = L == null ? void 0 : L.user) == null ? void 0 : U.id,
|
|
10251
10300
|
name: (G = (te = L == null ? void 0 : L.user) == null ? void 0 : te.data) == null ? void 0 : G.name
|
|
10252
10301
|
};
|
|
10253
|
-
}) : !1,
|
|
10302
|
+
}) : !1, j = E == null ? void 0 : E.actor, N = (j == null ? void 0 : j.id) === (_ == null ? void 0 : _.id);
|
|
10254
10303
|
return /* @__PURE__ */ a.jsxs(yt, { children: [
|
|
10255
10304
|
/* @__PURE__ */ a.jsx(
|
|
10256
10305
|
cn,
|
|
@@ -10262,38 +10311,38 @@ const pu = ({
|
|
|
10262
10311
|
createdAt: (E == null ? void 0 : E.time) || "",
|
|
10263
10312
|
slugs: {
|
|
10264
10313
|
question: `${t}/${e}`,
|
|
10265
|
-
answer:
|
|
10314
|
+
answer: y
|
|
10266
10315
|
},
|
|
10267
|
-
slug:
|
|
10316
|
+
slug: y,
|
|
10268
10317
|
author: {
|
|
10269
|
-
id:
|
|
10270
|
-
name: (z =
|
|
10271
|
-
organization: (K =
|
|
10272
|
-
jobTitle: (T =
|
|
10273
|
-
location: (P =
|
|
10318
|
+
id: j == null ? void 0 : j.id,
|
|
10319
|
+
name: (z = j == null ? void 0 : j.data) == null ? void 0 : z.name,
|
|
10320
|
+
organization: (K = j == null ? void 0 : j.data) == null ? void 0 : K.organization,
|
|
10321
|
+
jobTitle: (T = j == null ? void 0 : j.data) == null ? void 0 : T.jobTitle,
|
|
10322
|
+
location: (P = j == null ? void 0 : j.data) == null ? void 0 : P.location,
|
|
10274
10323
|
image: {
|
|
10275
|
-
thumbnail: ((q =
|
|
10324
|
+
thumbnail: ((q = j == null ? void 0 : j.data) == null ? void 0 : q.thumbnail) || void 0
|
|
10276
10325
|
}
|
|
10277
10326
|
},
|
|
10278
10327
|
userLiked: $,
|
|
10279
10328
|
likes: (Q == null ? void 0 : Q.like) || 0,
|
|
10280
10329
|
comments: (Q == null ? void 0 : Q.reply) || 0,
|
|
10281
|
-
peopleWhoLiked:
|
|
10330
|
+
peopleWhoLiked: k
|
|
10282
10331
|
},
|
|
10283
10332
|
links: {
|
|
10284
|
-
post: `${t}/${e}/${
|
|
10285
|
-
comments: `${t}/${e}/${
|
|
10333
|
+
post: `${t}/${e}/${y}`,
|
|
10334
|
+
comments: `${t}/${e}/${y}`
|
|
10286
10335
|
},
|
|
10287
10336
|
functions: {
|
|
10288
10337
|
content: {
|
|
10289
10338
|
createContent: () => null,
|
|
10290
|
-
deleteContent: () => g({ activityId:
|
|
10339
|
+
deleteContent: () => g({ activityId: y }),
|
|
10291
10340
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10292
|
-
updateContent: (L, { body: U }) => p({ activityId:
|
|
10341
|
+
updateContent: (L, { body: U }) => p({ activityId: y, content: U })
|
|
10293
10342
|
},
|
|
10294
10343
|
likes: {
|
|
10295
|
-
createLike: () =>
|
|
10296
|
-
deleteLike: () =>
|
|
10344
|
+
createLike: () => v({ activityId: y }),
|
|
10345
|
+
deleteLike: () => b({ activityId: y, reactionId: C })
|
|
10297
10346
|
},
|
|
10298
10347
|
comments: {
|
|
10299
10348
|
openComments: () => null
|
|
@@ -10302,8 +10351,8 @@ const pu = ({
|
|
|
10302
10351
|
isTruncated: !0
|
|
10303
10352
|
}
|
|
10304
10353
|
),
|
|
10305
|
-
|
|
10306
|
-
] },
|
|
10354
|
+
x > w + 1 && /* @__PURE__ */ a.jsx(Oe, {})
|
|
10355
|
+
] }, y);
|
|
10307
10356
|
}),
|
|
10308
10357
|
!f && /* @__PURE__ */ a.jsx(
|
|
10309
10358
|
sn,
|
|
@@ -10934,18 +10983,18 @@ function es({
|
|
|
10934
10983
|
},
|
|
10935
10984
|
user: d,
|
|
10936
10985
|
...l
|
|
10937
|
-
}, f = Gc({ ...u, mutationFn: t }), m = Qc({ ...u, mutationFn: e }), p = Jc({ ...u, mutationFn: n }), g = el({ ...u, mutationFn: s }),
|
|
10986
|
+
}, f = Gc({ ...u, mutationFn: t }), m = Qc({ ...u, mutationFn: e }), p = Jc({ ...u, mutationFn: n }), g = el({ ...u, mutationFn: s }), v = tl({ ...u, mutationFn: i }), { replies: b, ..._ } = Xc({ queryKey: o, queryFn: r });
|
|
10938
10987
|
return {
|
|
10939
|
-
replies:
|
|
10988
|
+
replies: b,
|
|
10940
10989
|
mutations: {
|
|
10941
10990
|
create: f,
|
|
10942
10991
|
edit: m,
|
|
10943
10992
|
remove: g,
|
|
10944
10993
|
like: p,
|
|
10945
|
-
unlike:
|
|
10994
|
+
unlike: v
|
|
10946
10995
|
},
|
|
10947
10996
|
user: d,
|
|
10948
|
-
...
|
|
10997
|
+
..._
|
|
10949
10998
|
};
|
|
10950
10999
|
}
|
|
10951
11000
|
function Jc({
|
|
@@ -11080,13 +11129,13 @@ const ol = ({
|
|
|
11080
11129
|
hasNextPage: d,
|
|
11081
11130
|
isLoading: l,
|
|
11082
11131
|
mutations: { create: u, edit: f, like: m, remove: p, unlike: g },
|
|
11083
|
-
user:
|
|
11132
|
+
user: v
|
|
11084
11133
|
} = es({
|
|
11085
11134
|
queryKey: [t, e, n, r, "replies"],
|
|
11086
11135
|
queryFns: {
|
|
11087
11136
|
...i,
|
|
11088
11137
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11089
|
-
list: (
|
|
11138
|
+
list: (b) => i.list({ ...b, reactionId: r })
|
|
11090
11139
|
}
|
|
11091
11140
|
});
|
|
11092
11141
|
return /* @__PURE__ */ a.jsx(
|
|
@@ -11104,45 +11153,45 @@ const ol = ({
|
|
|
11104
11153
|
},
|
|
11105
11154
|
functions: {
|
|
11106
11155
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11107
|
-
create: (
|
|
11156
|
+
create: (b, { body: _ }) => u({ activityId: n, replyId: r, content: _ })
|
|
11108
11157
|
},
|
|
11109
11158
|
meta: { isEditing: !1, showSuccessMessage: !1 }
|
|
11110
11159
|
},
|
|
11111
|
-
children: o && o.length > 0 ? o == null ? void 0 : o.map((
|
|
11112
|
-
var
|
|
11160
|
+
children: o && o.length > 0 ? o == null ? void 0 : o.map((b) => {
|
|
11161
|
+
var A, W, Z, z, K, T, P, q, L, U, te, G;
|
|
11113
11162
|
const {
|
|
11114
|
-
id:
|
|
11115
|
-
own_children:
|
|
11163
|
+
id: _,
|
|
11164
|
+
own_children: x,
|
|
11116
11165
|
latest_children: E,
|
|
11117
|
-
children_counts:
|
|
11118
|
-
} =
|
|
11166
|
+
children_counts: w
|
|
11167
|
+
} = b, F = (((A = x == null ? void 0 : x.like) == null ? void 0 : A.length) || 0) > 0 ? (W = x == null ? void 0 : x.like) == null ? void 0 : W.find((V) => {
|
|
11119
11168
|
var ee;
|
|
11120
|
-
return ((ee = V == null ? void 0 : V.user) == null ? void 0 : ee.id) === (
|
|
11121
|
-
}) : !1, R =
|
|
11122
|
-
var ee, re,
|
|
11169
|
+
return ((ee = V == null ? void 0 : V.user) == null ? void 0 : ee.id) === (v == null ? void 0 : v.id);
|
|
11170
|
+
}) : !1, R = F ? F == null ? void 0 : F.id : "", Q = !!F, $ = (((Z = E == null ? void 0 : E.like) == null ? void 0 : Z.length) || 0) > 0 ? (z = E == null ? void 0 : E.like) == null ? void 0 : z.map((V) => {
|
|
11171
|
+
var ee, re, O;
|
|
11123
11172
|
return {
|
|
11124
11173
|
id: (ee = V == null ? void 0 : V.user) == null ? void 0 : ee.id,
|
|
11125
|
-
name: (
|
|
11174
|
+
name: (O = (re = V == null ? void 0 : V.user) == null ? void 0 : re.data) == null ? void 0 : O.name
|
|
11126
11175
|
};
|
|
11127
|
-
}) : !1, C =
|
|
11176
|
+
}) : !1, C = b == null ? void 0 : b.user, k = (C == null ? void 0 : C.id) === (v == null ? void 0 : v.id), j = on(s, k), N = typeof b.data.content == "string" ? (K = b == null ? void 0 : b.data) == null ? void 0 : K.content : (
|
|
11128
11177
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11129
|
-
((P = (T =
|
|
11178
|
+
((P = (T = b == null ? void 0 : b.data) == null ? void 0 : T.content) == null ? void 0 : P.text) || ""
|
|
11130
11179
|
);
|
|
11131
11180
|
return /* @__PURE__ */ a.jsx(
|
|
11132
11181
|
cn,
|
|
11133
11182
|
{
|
|
11134
11183
|
content: {
|
|
11135
|
-
id:
|
|
11184
|
+
id: _,
|
|
11136
11185
|
type: "reply",
|
|
11137
11186
|
body: N,
|
|
11138
|
-
canLike:
|
|
11139
|
-
createdAt:
|
|
11187
|
+
canLike: j,
|
|
11188
|
+
createdAt: b == null ? void 0 : b.created_at,
|
|
11140
11189
|
slugs: {
|
|
11141
11190
|
question: `${t}/${e}`,
|
|
11142
11191
|
answer: n,
|
|
11143
11192
|
// Stop-gap solution to avoid having to change the DiscussionPost component
|
|
11144
11193
|
// The `reply` is currently used to define the form ID which handles the focus
|
|
11145
|
-
reply:
|
|
11194
|
+
reply: b == null ? void 0 : b.parent
|
|
11146
11195
|
},
|
|
11147
11196
|
slug: "",
|
|
11148
11197
|
author: {
|
|
@@ -11156,24 +11205,24 @@ const ol = ({
|
|
|
11156
11205
|
}
|
|
11157
11206
|
},
|
|
11158
11207
|
userLiked: Q,
|
|
11159
|
-
likes: (
|
|
11208
|
+
likes: (w == null ? void 0 : w.like) || 0,
|
|
11160
11209
|
peopleWhoLiked: $
|
|
11161
11210
|
},
|
|
11162
11211
|
functions: {
|
|
11163
11212
|
content: {
|
|
11164
11213
|
createContent: () => null,
|
|
11165
|
-
deleteContent: () => p({ replyId:
|
|
11214
|
+
deleteContent: () => p({ replyId: _ }),
|
|
11166
11215
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11167
|
-
updateContent: (V, { body: ee }) => f({ replyId:
|
|
11216
|
+
updateContent: (V, { body: ee }) => f({ replyId: _, content: ee })
|
|
11168
11217
|
},
|
|
11169
11218
|
likes: {
|
|
11170
|
-
createLike: () => m({ replyId:
|
|
11171
|
-
deleteLike: () => g({ replyId:
|
|
11219
|
+
createLike: () => m({ replyId: _ }),
|
|
11220
|
+
deleteLike: () => g({ replyId: _, reactionId: R })
|
|
11172
11221
|
},
|
|
11173
11222
|
comments: {}
|
|
11174
11223
|
}
|
|
11175
11224
|
},
|
|
11176
|
-
|
|
11225
|
+
_
|
|
11177
11226
|
);
|
|
11178
11227
|
}) : null
|
|
11179
11228
|
}
|
|
@@ -11191,8 +11240,8 @@ const ol = ({
|
|
|
11191
11240
|
fetchNextPage: u,
|
|
11192
11241
|
hasNextPage: f,
|
|
11193
11242
|
isLoading: m,
|
|
11194
|
-
mutations: { create: p, edit: g, like:
|
|
11195
|
-
user:
|
|
11243
|
+
mutations: { create: p, edit: g, like: v, remove: b, unlike: _ },
|
|
11244
|
+
user: x
|
|
11196
11245
|
} = es({
|
|
11197
11246
|
queryKey: [t, e, n, "replies"],
|
|
11198
11247
|
queryFns: s
|
|
@@ -11206,7 +11255,7 @@ const ol = ({
|
|
|
11206
11255
|
content: { type: "reply", slugs: {} },
|
|
11207
11256
|
functions: {
|
|
11208
11257
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11209
|
-
create: (E, { body:
|
|
11258
|
+
create: (E, { body: w }) => p({ activityId: n, content: w })
|
|
11210
11259
|
},
|
|
11211
11260
|
meta: { isEditing: !1, showSuccessMessage: !1 },
|
|
11212
11261
|
placeholder: c.formatMessage({ id: "discussion_responses_placeholder" })
|
|
@@ -11222,16 +11271,16 @@ const ol = ({
|
|
|
11222
11271
|
),
|
|
11223
11272
|
d == null ? void 0 : d.map((E) => {
|
|
11224
11273
|
var z, K, T, P, q, L, U, te, G, V, ee, re;
|
|
11225
|
-
const { id:
|
|
11274
|
+
const { id: w, own_children: y, latest_children: F, children_counts: R } = E, B = (((z = y == null ? void 0 : y.like) == null ? void 0 : z.length) || 0) > 0 ? (K = y == null ? void 0 : y.like) == null ? void 0 : K.find((O) => {
|
|
11226
11275
|
var oe;
|
|
11227
|
-
return ((oe =
|
|
11228
|
-
}) : !1, $ = B ? B == null ? void 0 : B.id : "", C = !!B,
|
|
11229
|
-
var oe,
|
|
11276
|
+
return ((oe = O == null ? void 0 : O.user) == null ? void 0 : oe.id) === (x == null ? void 0 : x.id);
|
|
11277
|
+
}) : !1, $ = B ? B == null ? void 0 : B.id : "", C = !!B, j = (((T = F == null ? void 0 : F.like) == null ? void 0 : T.length) || 0) > 0 ? (P = F == null ? void 0 : F.like) == null ? void 0 : P.map((O) => {
|
|
11278
|
+
var oe, D, ve;
|
|
11230
11279
|
return {
|
|
11231
|
-
id: (oe =
|
|
11232
|
-
name: (ve = (
|
|
11280
|
+
id: (oe = O == null ? void 0 : O.user) == null ? void 0 : oe.id,
|
|
11281
|
+
name: (ve = (D = O == null ? void 0 : O.user) == null ? void 0 : D.data) == null ? void 0 : ve.name
|
|
11233
11282
|
};
|
|
11234
|
-
}) : !1, N = E == null ? void 0 : E.user,
|
|
11283
|
+
}) : !1, N = E == null ? void 0 : E.user, A = (N == null ? void 0 : N.id) === (x == null ? void 0 : x.id), W = on(r, A), Z = typeof E.data.content == "string" ? (q = E == null ? void 0 : E.data) == null ? void 0 : q.content : (
|
|
11235
11284
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11236
11285
|
((U = (L = E == null ? void 0 : E.data) == null ? void 0 : L.content) == null ? void 0 : U.text) || ""
|
|
11237
11286
|
);
|
|
@@ -11239,7 +11288,7 @@ const ol = ({
|
|
|
11239
11288
|
cn,
|
|
11240
11289
|
{
|
|
11241
11290
|
content: {
|
|
11242
|
-
id:
|
|
11291
|
+
id: w,
|
|
11243
11292
|
type: "reply",
|
|
11244
11293
|
body: Z,
|
|
11245
11294
|
canLike: W,
|
|
@@ -11247,9 +11296,9 @@ const ol = ({
|
|
|
11247
11296
|
slugs: {
|
|
11248
11297
|
question: `${t}/${e}`,
|
|
11249
11298
|
answer: n,
|
|
11250
|
-
reply:
|
|
11299
|
+
reply: w
|
|
11251
11300
|
},
|
|
11252
|
-
slug:
|
|
11301
|
+
slug: w,
|
|
11253
11302
|
author: {
|
|
11254
11303
|
id: N == null ? void 0 : N.id,
|
|
11255
11304
|
name: (te = N.data) == null ? void 0 : te.name,
|
|
@@ -11262,18 +11311,18 @@ const ol = ({
|
|
|
11262
11311
|
},
|
|
11263
11312
|
userLiked: C,
|
|
11264
11313
|
likes: (R == null ? void 0 : R.like) || 0,
|
|
11265
|
-
peopleWhoLiked:
|
|
11314
|
+
peopleWhoLiked: j
|
|
11266
11315
|
},
|
|
11267
11316
|
functions: {
|
|
11268
11317
|
content: {
|
|
11269
11318
|
createContent: () => null,
|
|
11270
|
-
deleteContent: () =>
|
|
11319
|
+
deleteContent: () => b({ replyId: w }),
|
|
11271
11320
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11272
|
-
updateContent: (
|
|
11321
|
+
updateContent: (O, { body: oe }) => g({ replyId: w, content: oe })
|
|
11273
11322
|
},
|
|
11274
11323
|
likes: {
|
|
11275
|
-
createLike: () =>
|
|
11276
|
-
deleteLike: () =>
|
|
11324
|
+
createLike: () => v({ replyId: w }),
|
|
11325
|
+
deleteLike: () => _({ replyId: w, reactionId: $ })
|
|
11277
11326
|
},
|
|
11278
11327
|
comments: {}
|
|
11279
11328
|
},
|
|
@@ -11283,7 +11332,7 @@ const ol = ({
|
|
|
11283
11332
|
basePath: t,
|
|
11284
11333
|
parentId: e,
|
|
11285
11334
|
activityId: n,
|
|
11286
|
-
replyId:
|
|
11335
|
+
replyId: w,
|
|
11287
11336
|
isMember: r,
|
|
11288
11337
|
functions: {
|
|
11289
11338
|
...s
|
|
@@ -11291,8 +11340,8 @@ const ol = ({
|
|
|
11291
11340
|
}
|
|
11292
11341
|
)
|
|
11293
11342
|
},
|
|
11294
|
-
|
|
11295
|
-
) },
|
|
11343
|
+
w
|
|
11344
|
+
) }, w);
|
|
11296
11345
|
}),
|
|
11297
11346
|
!m && /* @__PURE__ */ a.jsx(
|
|
11298
11347
|
sn,
|
|
@@ -11413,12 +11462,12 @@ const gu = ({
|
|
|
11413
11462
|
leave: d
|
|
11414
11463
|
}
|
|
11415
11464
|
}) => {
|
|
11416
|
-
var B, $, C,
|
|
11465
|
+
var B, $, C, k, j, N, A, W, Z, z;
|
|
11417
11466
|
const l = H(), u = Ee(De), {
|
|
11418
11467
|
activity: f,
|
|
11419
11468
|
error: m,
|
|
11420
11469
|
isLoading: p,
|
|
11421
|
-
mutations: { edit: g, like:
|
|
11470
|
+
mutations: { edit: g, like: v, unlike: b }
|
|
11422
11471
|
} = dl({
|
|
11423
11472
|
queryFns: i,
|
|
11424
11473
|
queryKey: [t, e, n]
|
|
@@ -11433,7 +11482,7 @@ const gu = ({
|
|
|
11433
11482
|
text: l.formatMessage({ id: "activitySection_notFoundError" })
|
|
11434
11483
|
}
|
|
11435
11484
|
);
|
|
11436
|
-
const { own_reactions:
|
|
11485
|
+
const { own_reactions: _, latest_reactions: x } = f, E = (((B = x == null ? void 0 : x.like) == null ? void 0 : B.length) || 0) > 0, w = ((($ = _ == null ? void 0 : _.like) == null ? void 0 : $.length) || 0) > 0, y = w ? _ == null ? void 0 : _.like[0].id : "", F = E ? (C = x == null ? void 0 : x.like) == null ? void 0 : C.map((K) => {
|
|
11437
11486
|
var T, P, q;
|
|
11438
11487
|
return {
|
|
11439
11488
|
id: (T = K == null ? void 0 : K.user) == null ? void 0 : T.id,
|
|
@@ -11458,18 +11507,18 @@ const gu = ({
|
|
|
11458
11507
|
slug: n,
|
|
11459
11508
|
author: {
|
|
11460
11509
|
id: R.id,
|
|
11461
|
-
name: (
|
|
11462
|
-
organization: (
|
|
11510
|
+
name: (k = R.data) == null ? void 0 : k.name,
|
|
11511
|
+
organization: (j = R.data) == null ? void 0 : j.organization,
|
|
11463
11512
|
jobTitle: (N = R.data) == null ? void 0 : N.jobTitle,
|
|
11464
|
-
location: (
|
|
11513
|
+
location: (A = R.data) == null ? void 0 : A.location,
|
|
11465
11514
|
image: {
|
|
11466
11515
|
thumbnail: ((W = R.data) == null ? void 0 : W.thumbnail) || void 0
|
|
11467
11516
|
}
|
|
11468
11517
|
},
|
|
11469
|
-
userLiked:
|
|
11518
|
+
userLiked: w,
|
|
11470
11519
|
likes: ((Z = f == null ? void 0 : f.reaction_counts) == null ? void 0 : Z.like) || 0,
|
|
11471
11520
|
comments: ((z = f == null ? void 0 : f.reaction_counts) == null ? void 0 : z.reply) || 0,
|
|
11472
|
-
peopleWhoLiked:
|
|
11521
|
+
peopleWhoLiked: F
|
|
11473
11522
|
},
|
|
11474
11523
|
originalAuthorId: R == null ? void 0 : R.id,
|
|
11475
11524
|
forceHide: { comments: !0 },
|
|
@@ -11481,8 +11530,8 @@ const gu = ({
|
|
|
11481
11530
|
updateContent: (K, { body: T }) => g({ content: T })
|
|
11482
11531
|
},
|
|
11483
11532
|
likes: {
|
|
11484
|
-
createLike: () =>
|
|
11485
|
-
deleteLike: () =>
|
|
11533
|
+
createLike: () => v({ activityId: n }),
|
|
11534
|
+
deleteLike: () => b({ activityId: n, reactionId: y })
|
|
11486
11535
|
},
|
|
11487
11536
|
comments: {
|
|
11488
11537
|
openComments: () => {
|