@logora/debate 0.4.99 → 0.4.100

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.
@@ -0,0 +1 @@
1
+ ._voteBox_18yph_3{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;width:100%}._voteResultsBox_18yph_11{display:flex!important;flex-direction:column!important;padding:0!important;width:100%}._voteResults_18yph_11{padding:0!important}._voteProgressHeader_18yph_22{margin-bottom:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important;display:flex!important;align-items:center!important;font-size:var(--font-size-normal, 16px);display:-webkit-box;word-wrap:break-word;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}._voteProgressHeaderAgainst_18yph_35{margin-top:var(--spacer-md, calc(var(--space-unit, 1em) * .75))!important}._voteResultsNumberVoters_18yph_39{display:flex!important;align-items:center!important;padding:0!important;font-size:var(--font-size-normal, 16px);color:var(--text-secondary, #5F5F5F)}._voteBoxFooter_18yph_47{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;margin-top:var(--space-unit, 1em)!important;padding:0!important}._voteFooterActions_18yph_56{display:flex!important;align-items:center!important;gap:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))}._voteBoxActions_18yph_62{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center;gap:var(--space-unit, 1em);color:var(--text-secondary, #5F5F5F);width:100%}._voteBoxActionsBody_18yph_72{display:grid!important;grid-template-columns:repeat(2,1fr);gap:var(--spacer-md, calc(var(--space-unit, 1em) * .75));padding:0!important;width:100%}._voteBoxActionsBodyColumn_18yph_80{grid-template-columns:1fr}._voteAction_18yph_84{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;padding:0!important;max-width:100%!important;width:100%!important;text-align:center}._voteAction_18yph_84._buttonAlignLeft_18yph_94{justify-content:flex-start!important}button._voteButton_18yph_98,a._voteButton_18yph_98{-webkit-appearance:initial!important;width:100%;-webkit-hyphens:auto;-ms-hyphens:auto;-moz-hyphens:auto;hyphens:auto;padding:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important}._textAlignLeft_18yph_109{justify-content:flex-start!important}._voteBoxShowResultContainer_18yph_113{display:flex!important;flex-direction:row!important;justify-content:center;flex-wrap:wrap!important;margin-top:.3em}._voteBoxShowResult_18yph_113{cursor:pointer}._voteBoxShowResult_18yph_113 a{color:inherit;text-decoration:none;background:none!important}._voteBoxShowResult_18yph_113 a:hover{text-decoration:none;background:none!important}._voteBoxShowResult_18yph_113 a:focus:not(:focus-visible){outline:none;box-shadow:none}._voteBoxShowResult_18yph_113 ._boldShowResult_18yph_137{font-weight:var(--font-weight-bold, 700);font-variation-settings:var(--font-variation-bold, normal);color:var(--text-primary, #222222)}._outlined_18yph_143{padding:7px 15px;border-radius:var(--box-border-radius, 6px);border:1px solid var(--text-primary, #222222)!important;white-space:nowrap}._voteButtonThesis_18yph_150{display:block;text-align:left;display:-webkit-box;word-wrap:break-word;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}@container (max-width: 767.98px){._voteButtonThesisSynthesisMobile_18yph_162{text-align:center!important}}._voteBoxActionsBody_18yph_72 ._voteAction_18yph_84:first-child ._voteButton_18yph_98,._voteBoxActionsBody_18yph_72 ._voteAction_18yph_84:first-child ._voteButton_18yph_98:hover{background-color:var(--for-primary-color, #cc6a6d)!important;border-color:var(--for-primary-color, #cc6a6d)!important;border:1px solid var(--for-primary-color, #cc6a6d)!important}._voteBoxActionsBody_18yph_72 ._voteAction_18yph_84:nth-child(2) ._voteButton_18yph_98{background-color:var(--against-primary-color, #7980bb)!important;border-color:var(--against-primary-color, #7980bb)!important;border:1px solid var(--against-primary-color, #7980bb)!important}._voteBoxActionsBody_18yph_72 ._voteAction_18yph_84:nth-child(2) ._voteButton_18yph_98:hover{background-color:var(--against-primary-color, #7980bb)!important;border-color:var(--against-primary-color, #7980bb)!important;border:1px solid var(--against-primary-color, #7980bb)!important}._voteBoxActionsBody_18yph_72 ._voteAction_18yph_84:nth-child(3) ._voteButton_18yph_98{background-color:var(--text-light, white)!important;color:var(--third-position-color-primary, #9b9b9b)!important;border-color:var(--third-position-color-primary, #9b9b9b)!important;border:1px solid var(--third-position-color-primary, #9b9b9b)!important}._voteBoxActionsBody_18yph_72 ._voteAction_18yph_84:nth-child(3) ._voteButton_18yph_98:hover{background-color:var(--text-light, white)!important;color:var(--third-position-color-primary, #9b9b9b)!important;border-color:var(--third-position-color-primary, #9b9b9b)!important;border:1px solid var(--third-position-color-primary, #9b9b9b)!important}._voteBoxActionsBodyOutlined_18yph_201 ._voteAction_18yph_84:first-child ._voteButton_18yph_98,._voteBoxActionsBodyOutlined_18yph_201 ._voteAction_18yph_84:first-child ._voteButton_18yph_98:hover{background-color:var(--text-light, white)!important;color:var(--for-primary-color, #cc6a6d)!important;border-color:var(--for-primary-color, #cc6a6d)!important;border:1px solid var(--for-primary-color, #cc6a6d)!important}._voteBoxActionsBodyOutlined_18yph_201 ._voteAction_18yph_84:nth-child(2) ._voteButton_18yph_98{background-color:var(--text-light, white)!important;color:var(--against-primary-color, #7980bb)!important;border-color:var(--against-primary-color, #7980bb)!important;border:1px solid var(--against-primary-color, #7980bb)!important}._voteBoxActionsBodyOutlined_18yph_201 ._voteAction_18yph_84:nth-child(2) ._voteButton_18yph_98:hover{background-color:var(--text-light, white)!important;color:var(--against-primary-color, #7980bb)!important;border-color:var(--against-primary-color, #7980bb)!important;border:1px solid var(--against-primary-color, #7980bb)!important}._voteBoxActionsBodyOutlined_18yph_201 ._voteAction_18yph_84:nth-child(3) ._voteButton_18yph_98{background-color:var(--text-light, white)!important;color:var(--third-position-color-primary, #9b9b9b)!important;border-color:var(--third-position-color-primary, #9b9b9b)!important;border:1px solid var(--third-position-color-primary, #9b9b9b)!important}._voteBoxActionsBodyOutlined_18yph_201 ._voteAction_18yph_84:nth-child(3) ._voteButton_18yph_98:hover{background-color:var(--text-light, white)!important;color:var(--third-position-color-primary, #9b9b9b)!important;border-color:var(--third-position-color-primary, #9b9b9b)!important;border:1px solid var(--third-position-color-primary, #9b9b9b)!important}._voteBoxActionsBodyFilledNeutral_18yph_240 ._voteAction_18yph_84:nth-child(3) ._voteButton_18yph_98{background-color:var(--third-position-color-primary, #9b9b9b)!important;color:var(--text-light, white)!important;border-color:var(--third-position-color-primary, #9b9b9b)!important;border:1px solid var(--third-position-color-primary, #9b9b9b)!important}._voteBoxActionsBodyFilledNeutral_18yph_240 ._voteAction_18yph_84:nth-child(3) ._voteButton_18yph_98:hover{background-color:var(--third-position-color-primary, #9b9b9b)!important;color:var(--text-light, white)!important;border-color:var(--third-position-color-primary, #9b9b9b)!important;border:1px solid var(--third-position-color-primary, #9b9b9b)!important}._voteActionButton_18yph_253{cursor:pointer;-webkit-appearance:initial!important;background:none;border:none;color:var(--text-secondary, #5F5F5F)!important;font-size:inherit;padding:0;font-weight:var(--font-weight-bold, 700);font-variation-settings:var(--font-variation-bold, normal)}._voteActionButton_18yph_253:focus:not(:focus-visible){outline:none;box-shadow:none}._voteActionButton_18yph_253:disabled{cursor:default;opacity:.5}._sideIcon_18yph_273 svg{margin-left:5px;fill:var(--text-primary, #222222)}._progress_18yph_278{border-radius:var(--button-border-radius, var(--box-border-radius, 6px));color:var(--text-secondary, #5F5F5F);height:2.2em}._progressBar_18yph_284{border-radius:var(--button-border-radius, var(--box-border-radius, 6px));height:100%}._voteResults_18yph_11>div:first-child ._progress_18yph_278 ._progressBar_18yph_284{background-color:var(--for-primary-color, #cc6a6d)!important}._voteResults_18yph_11>div:nth-child(2) ._progress_18yph_278 ._progressBar_18yph_284{background-color:var(--against-primary-color, #7980bb)!important}._voteResults_18yph_11 div:nth-child(3) ._progress_18yph_278 ._progressBar_18yph_284{background-color:var(--third-position-color-primary, #9b9b9b)!important}._voteCommentCounts_18yph_301{display:flex;align-items:center;gap:var(--space-unit, 1em);width:100%;margin-top:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important}._debateNumberItem_18yph_309{display:flex;align-items:center;gap:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25));font-size:var(--font-size-normal, 16px);color:var(--text-primary, #222222);white-space:nowrap}._debateNumberLabel_18yph_318{white-space:nowrap}._showResultButton_18yph_322{background:none;border:0;padding:0;font:inherit;color:inherit;cursor:pointer}._showResultButton_18yph_322:focus:not(:focus-visible){outline:none;box-shadow:none}._voteResultInfoText_18yph_335{font-size:var(--font-size-small, 16px);color:var(--text-secondary, #5F5F5F);text-align:left;width:100%;align-self:flex-start}
@@ -1,210 +1,241 @@
1
- import { jsx as s, Fragment as be, jsxs as d } from "react/jsx-runtime";
2
- import u from "classnames";
3
- import { useState as S, useEffect as y } from "react";
4
- import { useIntl as Se, FormattedMessage as m } from "react-intl";
5
- import { useLocation as we } from "react-router";
1
+ import { jsx as s, Fragment as ne, jsxs as u } from "react/jsx-runtime";
2
+ import f from "classnames";
3
+ import { useState as g, useEffect as k } from "react";
4
+ import { useIntl as Be, FormattedMessage as m } from "react-intl";
5
+ import { useLocation as xe } from "react-router";
6
6
  import o from "./VoteBox.module.scss.js";
7
- import { useTranslatedContent as O } from "../../translation/translated_content/useTranslatedContent.js";
8
- import { useSessionStorageState as te } from "../../hooks/use_session_storage_state/useSessionStorageState.js";
9
- import { useToast as Be } from "../../dialog/toast_provider/useToast.js";
10
- import { useAuthRequired as Ve } from "../../hooks/use_auth_required/useAuthRequired.js";
11
- import { useDataProvider as Ce } from "../../data/data_provider/useDataProvider.js";
12
- import { useConfig as xe } from "../../data/config_provider/useConfig.js";
13
- import { useAuth as Ae } from "../../auth/use_auth/useAuth.js";
14
- import { Icon as E } from "../../icons/icon/Icon.js";
15
- import { ProgressBar as ye } from "../../progress/progress_bar/ProgressBar.js";
16
- import { Link as Me } from "../../action/link/Link.js";
17
- import { Button as Re } from "../../action/button/Button.js";
18
- const Ke = ({
19
- numberVotes: w,
7
+ import { useTranslatedContent as $ } from "../../translation/translated_content/useTranslatedContent.js";
8
+ import { useSessionStorageState as re } from "../../hooks/use_session_storage_state/useSessionStorageState.js";
9
+ import { useToast as Me } from "../../dialog/toast_provider/useToast.js";
10
+ import { useAuthRequired as Ae } from "../../hooks/use_auth_required/useAuthRequired.js";
11
+ import { useDataProvider as ye } from "../../data/data_provider/useDataProvider.js";
12
+ import { useConfig as Re } from "../../data/config_provider/useConfig.js";
13
+ import { useAuth as Le } from "../../auth/use_auth/useAuth.js";
14
+ import { Icon as q } from "../../icons/icon/Icon.js";
15
+ import { ProgressBar as ke } from "../../progress/progress_bar/ProgressBar.js";
16
+ import { Link as Te } from "../../action/link/Link.js";
17
+ import { Button as je } from "../../action/button/Button.js";
18
+ const Pe = ({
19
+ numberVotes: S,
20
20
  votePositions: i,
21
- voteableType: h,
22
- voteableId: g,
23
- redirectUrl: B,
24
- displayColumn: I,
25
- textAlignLeft: oe,
26
- showTotal: se = !0,
27
- voteBoxClassName: U,
28
- buttonContainerClassName: H,
29
- buttonClassName: $,
30
- showResultClassName: q,
31
- onVote: V,
32
- onVoteCountsChange: ae,
33
- disabled: M = !1,
34
- showVotesCommentsNumber: ne = !1,
35
- commentsCount: re,
36
- hideShowResultButton: D = !1
21
+ voteableType: p,
22
+ voteableId: b,
23
+ redirectUrl: V,
24
+ displayColumn: Y,
25
+ textAlignLeft: ce,
26
+ showTotal: ie = !0,
27
+ voteBoxClassName: D,
28
+ buttonContainerClassName: G,
29
+ buttonClassName: W,
30
+ showResultClassName: z,
31
+ onVote: B,
32
+ onVoteCountsChange: le,
33
+ disabled: T = !1,
34
+ showVotesCommentsNumber: de = !1,
35
+ commentsCount: ue,
36
+ hideShowResultButton: J = !1
37
37
  }) => {
38
- const [C, p] = S(!0), [l, R] = S(void 0), [N, v] = S(!1), [c, G] = S(
39
- Number.parseFloat(w.total) || Object.values(w).reduce(
40
- (e, t) => e + Number.parseFloat(t),
38
+ const [x, _] = g(!0), [c, M] = g(void 0), [N, h] = g(!1), [j, F] = g(!1), [l, O] = g(
39
+ Number.parseFloat(S.total) || Object.values(S).reduce(
40
+ (t, e) => t + Number.parseFloat(e),
41
41
  0
42
42
  ) || 0
43
- ), W = O(
43
+ ), K = $(
44
44
  i[0]?.name,
45
45
  i[0]?.language,
46
46
  "name",
47
47
  i[0]?.translation_entries
48
- ), Y = O(
48
+ ), Q = $(
49
49
  i[1]?.name,
50
50
  i[1]?.language,
51
51
  "name",
52
52
  i[1]?.translation_entries
53
- ), z = O(
53
+ ), X = $(
54
54
  i[2]?.name,
55
55
  i[2]?.language,
56
56
  "name",
57
57
  i[2]?.translation_entries
58
- ), [_, ie, J] = te(
58
+ ), [w, fe, E] = re(
59
59
  "storedUserVote",
60
60
  {}
61
- ), [Le, le, ce] = te("userSide", {}), { toast: de } = Be() || {}, ue = () => {
62
- const e = {};
61
+ ), [Fe, ve, Z] = re("userSide", {}), { toast: P } = Me() || {}, me = () => {
62
+ const t = {};
63
63
  return i?.forEach(
64
- (t) => e[t.id] = {
65
- count: Number.parseFloat(w[t.id]) || 0,
66
- percentage: c === 0 ? 0 : Math.round(
67
- 100 * ((w[t.id] || 0) / c)
64
+ (e) => t[e.id] = {
65
+ count: Number.parseFloat(S[e.id]) || 0,
66
+ percentage: l === 0 ? 0 : Math.round(
67
+ 100 * ((S[e.id] || 0) / l)
68
68
  )
69
69
  }
70
- ), e;
71
- }, [n, L] = S(ue()), K = Ve(), fe = we(), k = Ce(), T = xe(), j = Se(), { isLoggedIn: x, isLoggingIn: Q } = Ae();
72
- y(() => {
73
- Q === !1 && (x ? ve(g) : p(!1));
74
- }, [Q, x]), y(() => {
75
- if (C === !1 && !B) {
76
- const [e, t] = me();
77
- e && (t ? P(t) : v(!0));
70
+ ), t;
71
+ }, [r, A] = g(me()), ee = Ae(), he = xe(), y = ye(), I = Re(), R = Be(), { isLoggedIn: L, isLoggingIn: te } = Le();
72
+ k(() => {
73
+ te === !1 && (L ? pe(b) : _(!1));
74
+ }, [te, L]), k(() => {
75
+ if (x === !1 && !V) {
76
+ const [t, e] = ge();
77
+ t && (e ? se(e) : h(!0));
78
78
  }
79
- }, [C]), y(() => {
80
- V && V(l);
81
- }, [l]), y(() => {
82
- ae?.({ total: c, counts: n });
83
- }, [c, n]);
84
- const me = () => {
85
- if (_ && Object.keys(_).length !== 0)
86
- return _.groupId === g && _.voteableType === h ? [!0, _.positionId] : (J(), [!1, !1]);
87
- const e = new URLSearchParams(
88
- typeof window < "u" ? window.location.search : fe.search
89
- ), t = !!e.get("initVote"), a = Number.parseInt(e.get("positionId")) || !1;
90
- return [t, a];
91
- }, ve = (e) => {
92
- p(!0), V && V(l), k.getOneWithToken("votes", `${h.toLowerCase()}/${e}`, {}).then((t) => {
93
- t.data.data.resource ? (R(t.data.data.resource), v(!0), p(!1)) : (p(!1), v(!1));
94
- }).catch((t) => {
95
- p(!1);
79
+ }, [x]), k(() => {
80
+ B && B(c);
81
+ }, [c]), k(() => {
82
+ le?.({ total: l, counts: r });
83
+ }, [l, r]);
84
+ const ge = () => {
85
+ if (w && Object.keys(w).length !== 0)
86
+ return w.groupId === b && w.voteableType === p ? [!0, w.positionId] : (E(), [!1, !1]);
87
+ const t = new URLSearchParams(
88
+ typeof window < "u" ? window.location.search : he.search
89
+ ), e = !!t.get("initVote"), a = Number.parseInt(t.get("positionId")) || !1;
90
+ return [e, a];
91
+ }, pe = (t) => {
92
+ _(!0), B && B(c), y.getOneWithToken("votes", `${p.toLowerCase()}/${t}`, {}).then((e) => {
93
+ e.data.data.resource ? (M(e.data.data.resource), h(!0), _(!1)) : (_(!1), h(!1));
94
+ }).catch((e) => {
95
+ _(!1);
96
96
  });
97
- }, A = (e, t) => t === 0 ? 0 : Math.round(100 * (e / t)), X = ({ counts: e, total: t, vote: a }) => {
98
- L(e), G(t), R(a);
99
- }, he = (e) => {
100
- const t = {
101
- voteable_id: g,
102
- voteable_type: h || "Group",
103
- position_id: e
97
+ }, C = (t, e) => e === 0 ? 0 : Math.round(100 * (t / e)), U = ({ counts: t, total: e, vote: a }) => {
98
+ A(t), O(e), M(a);
99
+ }, be = (t) => {
100
+ const e = {
101
+ voteable_id: b,
102
+ voteable_type: p || "Group",
103
+ position_id: t
104
104
  };
105
- le({
106
- groupId: g,
107
- voteableType: h,
108
- positionId: e
105
+ ve({
106
+ groupId: b,
107
+ voteableType: p,
108
+ positionId: t
109
109
  });
110
- const r = {
111
- counts: n,
112
- total: c,
113
- vote: l
114
- }, f = (ee) => {
115
- ee.data.success ? (R(ee.data.data.resource), de(
116
- j.formatMessage({
110
+ const n = {
111
+ counts: r,
112
+ total: l,
113
+ vote: c
114
+ }, d = (ae) => {
115
+ ae.data.success ? (M(ae.data.data.resource), P(
116
+ R.formatMessage({
117
117
  id: "header.vote_confirm_modal",
118
118
  defaultMessage: "Your vote has been saved !"
119
119
  }),
120
120
  { type: "success" }
121
- )) : X(r);
122
- }, b = () => X(r);
123
- l ? (pe(e, l.position_id), N === !1 && F(), e !== l.position_id && k.update("votes", l.id, t).then(f, b)) : (ge(e), F(), k.create("votes", t).then(f, b));
124
- }, ge = (e) => {
125
- const t = n[e].count + 1, a = c + 1, r = {};
126
- i.forEach((f) => {
127
- if (e === f.id)
128
- r[f.id] = {
129
- count: t,
130
- percentage: A(t, a)
121
+ )) : U(n);
122
+ }, v = () => U(n);
123
+ c ? (Ne(t, c.position_id), N === !1 && H(), t !== c.position_id && y.update("votes", c.id, e).then(d, v)) : (_e(t), H(), y.create("votes", e).then(d, v));
124
+ }, _e = (t) => {
125
+ const e = r[t].count + 1, a = l + 1, n = {};
126
+ i.forEach((d) => {
127
+ if (t === d.id)
128
+ n[d.id] = {
129
+ count: e,
130
+ percentage: C(e, a)
131
131
  };
132
132
  else {
133
- const b = n[f.id].count;
134
- r[f.id] = {
135
- count: b,
136
- percentage: A(b, a)
133
+ const v = r[d.id].count;
134
+ n[d.id] = {
135
+ count: v,
136
+ percentage: C(v, a)
137
137
  };
138
138
  }
139
- }), L(r), G(a);
140
- }, pe = (e, t) => {
141
- if (t !== e) {
142
- const a = {
143
- ...n,
144
- [t]: {
145
- count: n[t].count - 1,
146
- percentage: A(
147
- n[t].count - 1,
148
- c
149
- )
150
- },
151
- [e]: {
152
- count: n[e].count + 1,
153
- percentage: A(
154
- n[e].count + 1,
155
- c
156
- )
157
- }
139
+ }), A(n), O(a);
140
+ }, Ne = (t, e) => {
141
+ if (e === t)
142
+ return;
143
+ const a = { ...r };
144
+ if (r[e]) {
145
+ const n = Math.max(r[e].count - 1, 0);
146
+ a[e] = {
147
+ count: n,
148
+ percentage: C(n, l)
149
+ };
150
+ }
151
+ if (r[t]) {
152
+ const n = r[t].count + 1;
153
+ a[t] = {
154
+ count: n,
155
+ percentage: C(n, l)
158
156
  };
159
- L(a);
160
157
  }
161
- }, Z = (e) => {
162
- const t = new URLSearchParams({
158
+ A(a);
159
+ }, we = (t) => {
160
+ const e = Math.max(l - 1, 0), a = {};
161
+ i.forEach((n) => {
162
+ const d = r[n.id]?.count ?? 0, v = n.id === t ? Math.max(d - 1, 0) : d;
163
+ a[n.id] = {
164
+ count: v,
165
+ percentage: C(v, e)
166
+ };
167
+ }), A(a), O(e);
168
+ }, Ce = () => {
169
+ if (!c || j)
170
+ return;
171
+ const t = {
172
+ counts: r,
173
+ total: l,
174
+ vote: c
175
+ }, e = () => {
176
+ U(t), P?.(
177
+ R.formatMessage({
178
+ id: "vote.vote_box.cancel_failed",
179
+ defaultMessage: "Your vote could not be cancelled."
180
+ }),
181
+ { type: "error" }
182
+ );
183
+ };
184
+ we(c.position_id), F(!0), y.delete("votes", c.id).then(
185
+ (a) => {
186
+ F(!1), a.data?.success ? (M(void 0), h(!1), Z(), E()) : e();
187
+ },
188
+ () => {
189
+ F(!1), e();
190
+ }
191
+ );
192
+ }, oe = (t) => {
193
+ const e = new URLSearchParams({
163
194
  initVote: "true",
164
- ...e && { positionId: e }
195
+ ...t && { positionId: t }
165
196
  });
166
- return B + `?${t.toString()}`;
167
- }, P = (e) => {
168
- C || (x ? Object.keys(n).includes(e.toString()) && (he(e), J()) : (Object.keys(n).includes(e.toString()) && ie({
169
- groupId: g,
170
- voteableType: h,
171
- positionId: e
172
- }), K({ loginAction: "vote" })));
173
- }, F = () => {
174
- N && ce(), v(!N);
175
- }, Ne = (e, t) => {
197
+ return V + `?${e.toString()}`;
198
+ }, se = (t) => {
199
+ x || (L ? Object.keys(r).includes(t.toString()) && (be(t), E()) : (Object.keys(r).includes(t.toString()) && fe({
200
+ groupId: b,
201
+ voteableType: p,
202
+ positionId: t
203
+ }), ee({ loginAction: "vote" })));
204
+ }, H = () => {
205
+ N && Z(), h(!N);
206
+ }, Se = (t, e) => {
176
207
  let a;
177
- t === 0 ? a = W.translatedContent : t === 1 ? a = Y.translatedContent : t === 2 && (a = z.translatedContent);
178
- const r = typeof window < "u" && !B;
208
+ e === 0 ? a = K.translatedContent : e === 1 ? a = Q.translatedContent : e === 2 && (a = X.translatedContent);
209
+ const n = typeof window < "u" && !V;
179
210
  return /* @__PURE__ */ s(
180
211
  "div",
181
212
  {
182
- className: u(o.voteAction, {
213
+ className: f(o.voteAction, {
183
214
  [o.buttonAlignLeft]: o.buttonAlignLeft
184
215
  }),
185
216
  children: /* @__PURE__ */ s(
186
- Re,
217
+ je,
187
218
  {
188
219
  "data-tid": "action_vote",
189
220
  type: "button",
190
221
  title: a,
191
- className: u(o.voteButton, {
192
- [o.textAlignLeft]: oe,
193
- [$]: $
222
+ className: f(o.voteButton, {
223
+ [o.textAlignLeft]: ce,
224
+ [W]: W
194
225
  }),
195
- onClick: r ? () => P(e.id) : null,
196
- disabled: M || r && C,
226
+ onClick: n ? () => se(t.id) : null,
227
+ disabled: T || n && x,
197
228
  "data-testid": "voteButton",
198
- to: r ? null : Z(e.id),
199
- target: r ? null : "_top",
200
- rel: r ? null : "nofollow",
201
- external: r ? null : !0,
229
+ to: n ? null : oe(t.id),
230
+ target: n ? null : "_top",
231
+ rel: n ? null : "nofollow",
232
+ external: n ? null : !0,
202
233
  children: /* @__PURE__ */ s(
203
234
  "div",
204
235
  {
205
236
  "data-tid": "action_vote",
206
- className: u(o.voteButtonThesis, {
207
- [o.voteButtonThesisSynthesisMobile]: !I
237
+ className: f(o.voteButtonThesis, {
238
+ [o.voteButtonThesisSynthesisMobile]: !Y
208
239
  }),
209
240
  children: a
210
241
  }
@@ -212,88 +243,108 @@ const Ke = ({
212
243
  }
213
244
  )
214
245
  },
215
- t
246
+ e
216
247
  );
217
- }, _e = () => {
218
- x || T.actions?.unloggedVoteResults === !0 ? v(!0) : K({ loginAction: "vote" });
248
+ }, Ve = () => {
249
+ L || I.actions?.unloggedVoteResults === !0 ? h(!0) : ee({ loginAction: "vote" });
219
250
  };
220
251
  return /* @__PURE__ */ s(
221
252
  "div",
222
253
  {
223
- className: u(o.voteBox, { [U]: U }),
224
- children: /* @__PURE__ */ s(be, { children: N || M ? /* @__PURE__ */ d("div", { className: o.voteResultsBox, "data-testid": "voteResultsBox", children: [
225
- /* @__PURE__ */ s("div", { className: o.voteResults, children: i.map((e, t) => {
254
+ className: f(o.voteBox, { [D]: D }),
255
+ children: /* @__PURE__ */ s(ne, { children: N || T ? /* @__PURE__ */ u("div", { className: o.voteResultsBox, "data-testid": "voteResultsBox", children: [
256
+ /* @__PURE__ */ s("div", { className: o.voteResults, children: i.map((t, e) => {
226
257
  let a;
227
- return t === 0 ? a = W.translatedContent : t === 1 ? a = Y.translatedContent : t === 2 && (a = z.translatedContent), /* @__PURE__ */ d("div", { children: [
228
- /* @__PURE__ */ d(
258
+ return e === 0 ? a = K.translatedContent : e === 1 ? a = Q.translatedContent : e === 2 && (a = X.translatedContent), /* @__PURE__ */ u("div", { children: [
259
+ /* @__PURE__ */ u(
229
260
  "div",
230
261
  {
231
- className: t > 0 ? u(
262
+ className: e > 0 ? f(
232
263
  o.voteProgressHeader,
233
264
  o.voteProgressHeaderAgainst
234
265
  ) : o.voteProgressHeader,
235
266
  children: [
236
267
  a,
237
268
  " ",
238
- l && l.position_id === e.id ? /* @__PURE__ */ s(
269
+ c && c.position_id === t.id ? /* @__PURE__ */ s(
239
270
  "span",
240
271
  {
241
- title: j.formatMessage({
272
+ title: R.formatMessage({
242
273
  id: "vote.vote_box.vote_side"
243
274
  }) + a,
244
275
  className: o.sideIcon,
245
276
  "aria-hidden": "true",
246
- children: /* @__PURE__ */ s(E, { name: "checkbox", width: 16, height: 16 })
277
+ children: /* @__PURE__ */ s(q, { name: "checkbox", width: 16, height: 16 })
247
278
  }
248
279
  ) : null
249
280
  ]
250
281
  }
251
282
  ),
252
- /* @__PURE__ */ d(
253
- ye,
283
+ /* @__PURE__ */ u(
284
+ ke,
254
285
  {
255
- progress: n[e.id].percentage / 100,
286
+ progress: r[t.id].percentage / 100,
256
287
  goal: 1,
257
288
  className: o.progress,
258
289
  innerClassName: o.progressBar,
259
290
  children: [
260
- n[e.id].percentage,
291
+ r[t.id].percentage,
261
292
  "%"
262
293
  ]
263
294
  }
264
295
  )
265
- ] }, t);
296
+ ] }, e);
266
297
  }) }),
267
- /* @__PURE__ */ d("div", { className: o.voteBoxFooter, children: [
268
- se && /* @__PURE__ */ s("div", { className: o.voteResultsNumberVoters, children: /* @__PURE__ */ s(
298
+ /* @__PURE__ */ u("div", { className: o.voteBoxFooter, children: [
299
+ ie && /* @__PURE__ */ s("div", { className: o.voteResultsNumberVoters, children: /* @__PURE__ */ s(
269
300
  m,
270
301
  {
271
302
  id: "vote.vote_box.votes",
272
- values: { votesCount: c },
303
+ values: { votesCount: l },
273
304
  defaultMessage: "{votesCount} votes"
274
305
  }
275
306
  ) }),
276
- !M && /* @__PURE__ */ s("div", { children: l ? /* @__PURE__ */ s(
277
- "button",
278
- {
279
- "data-tid": "action_edit_vote",
280
- className: o.voteActionButton,
281
- type: "button",
282
- onClick: F,
283
- children: /* @__PURE__ */ s(
284
- m,
285
- {
286
- id: "vote.vote_box.update",
287
- defaultMessage: "Modify"
288
- }
289
- )
290
- }
291
- ) : !D && /* @__PURE__ */ s(
307
+ !T && /* @__PURE__ */ s("div", { className: o.voteFooterActions, children: c ? /* @__PURE__ */ u(ne, { children: [
308
+ /* @__PURE__ */ s(
309
+ "button",
310
+ {
311
+ "data-tid": "action_edit_vote",
312
+ className: o.voteActionButton,
313
+ type: "button",
314
+ onClick: H,
315
+ disabled: j,
316
+ children: /* @__PURE__ */ s(
317
+ m,
318
+ {
319
+ id: "vote.vote_box.update",
320
+ defaultMessage: "Modify"
321
+ }
322
+ )
323
+ }
324
+ ),
325
+ /* @__PURE__ */ s(
326
+ "button",
327
+ {
328
+ "data-tid": "action_cancel_vote",
329
+ className: o.voteActionButton,
330
+ type: "button",
331
+ onClick: Ce,
332
+ disabled: j,
333
+ children: /* @__PURE__ */ s(
334
+ m,
335
+ {
336
+ id: "vote.vote_box.cancel",
337
+ defaultMessage: "Cancel"
338
+ }
339
+ )
340
+ }
341
+ )
342
+ ] }) : !J && /* @__PURE__ */ s(
292
343
  "button",
293
344
  {
294
345
  type: "button",
295
346
  className: o.voteActionButton,
296
- onClick: () => v(!1),
347
+ onClick: () => h(!1),
297
348
  children: /* @__PURE__ */ s(
298
349
  m,
299
350
  {
@@ -304,40 +355,40 @@ const Ke = ({
304
355
  }
305
356
  ) })
306
357
  ] })
307
- ] }) : /* @__PURE__ */ d("div", { className: o.voteBoxActions, children: [
358
+ ] }) : /* @__PURE__ */ u("div", { className: o.voteBoxActions, children: [
308
359
  /* @__PURE__ */ s(
309
360
  "div",
310
361
  {
311
- className: u(o.voteBoxActionsBody, {
312
- [o.voteBoxActionsBodyColumn]: I,
313
- [o.voteBoxActionsBodyOutlined]: T.layout?.outlinedVoteButtons,
314
- [o.voteBoxActionsBodyFilledNeutral]: T.layout?.filledNeutralVoteButton,
315
- [H]: H
362
+ className: f(o.voteBoxActionsBody, {
363
+ [o.voteBoxActionsBodyColumn]: Y,
364
+ [o.voteBoxActionsBodyOutlined]: I.layout?.outlinedVoteButtons,
365
+ [o.voteBoxActionsBodyFilledNeutral]: I.layout?.filledNeutralVoteButton,
366
+ [G]: G
316
367
  }),
317
368
  children: i.map(
318
- (e, t) => Ne(e, t)
369
+ (t, e) => Se(t, e)
319
370
  )
320
371
  }
321
372
  ),
322
- ne && /* @__PURE__ */ d("div", { className: o.voteCommentCounts, children: [
323
- /* @__PURE__ */ d("div", { className: o.debateNumberItem, children: [
324
- /* @__PURE__ */ s(E, { name: "votebox", width: 20, height: 20 }),
373
+ de && /* @__PURE__ */ u("div", { className: o.voteCommentCounts, children: [
374
+ /* @__PURE__ */ u("div", { className: o.debateNumberItem, children: [
375
+ /* @__PURE__ */ s(q, { name: "votebox", width: 20, height: 20 }),
325
376
  /* @__PURE__ */ s("div", { className: o.debateNumberLabel, children: /* @__PURE__ */ s(
326
377
  m,
327
378
  {
328
379
  id: "vote.vote_box.votes",
329
- values: { votesCount: c },
380
+ values: { votesCount: l },
330
381
  defaultMessage: "{votesCount} votes"
331
382
  }
332
383
  ) })
333
384
  ] }),
334
- /* @__PURE__ */ d("div", { className: o.debateNumberItem, children: [
335
- /* @__PURE__ */ s(E, { name: "chat", width: 20, height: 20 }),
385
+ /* @__PURE__ */ u("div", { className: o.debateNumberItem, children: [
386
+ /* @__PURE__ */ s(q, { name: "chat", width: 20, height: 20 }),
336
387
  /* @__PURE__ */ s("div", { className: o.debateNumberLabel, children: /* @__PURE__ */ s(
337
388
  m,
338
389
  {
339
390
  id: "vote.vote_box.comments",
340
- values: { count: re ?? 0 },
391
+ values: { count: ue ?? 0 },
341
392
  defaultMessage: "{count} comments"
342
393
  }
343
394
  ) })
@@ -346,23 +397,23 @@ const Ke = ({
346
397
  /* @__PURE__ */ s(
347
398
  "div",
348
399
  {
349
- className: u(
400
+ className: f(
350
401
  o.voteBoxActions,
351
402
  o.voteBoxShowResultContainer,
352
- { [q]: q }
403
+ { [z]: z }
353
404
  ),
354
- children: /* @__PURE__ */ s("div", { className: o.voteBoxShowResult, children: D ? !N && /* @__PURE__ */ s("div", { className: o.voteResultInfoText, children: j.formatMessage({
405
+ children: /* @__PURE__ */ s("div", { className: o.voteBoxShowResult, children: J ? !N && /* @__PURE__ */ s("div", { className: o.voteResultInfoText, children: R.formatMessage({
355
406
  id: "vote.vote_box.result_after_vote",
356
407
  defaultMessage: "Le résultat s'affichera après le vote."
357
- }) }) : typeof window < "u" && !B ? /* @__PURE__ */ s(
408
+ }) }) : typeof window < "u" && !V ? /* @__PURE__ */ s(
358
409
  "button",
359
410
  {
360
411
  type: "button",
361
- onClick: _e,
412
+ onClick: Ve,
362
413
  "data-tid": "show_vote_result",
363
414
  "data-testid": "show-result",
364
415
  className: o.showResultButton,
365
- children: /* @__PURE__ */ s("span", { className: u(o.boldShowResult, o.outlined), children: /* @__PURE__ */ s(
416
+ children: /* @__PURE__ */ s("span", { className: f(o.boldShowResult, o.outlined), children: /* @__PURE__ */ s(
366
417
  m,
367
418
  {
368
419
  id: "vote.vote_box.show_result",
@@ -371,15 +422,15 @@ const Ke = ({
371
422
  ) })
372
423
  }
373
424
  ) : /* @__PURE__ */ s(
374
- Me,
425
+ Te,
375
426
  {
376
- to: Z(null),
427
+ to: oe(null),
377
428
  rel: "nofollow",
378
429
  "data-tid": "show_vote_result",
379
430
  target: "_top",
380
431
  external: !0,
381
432
  "data-testid": "show-result",
382
- children: /* @__PURE__ */ s("span", { className: u(o.boldShowResult, o.outlined), children: /* @__PURE__ */ s(
433
+ children: /* @__PURE__ */ s("span", { className: f(o.boldShowResult, o.outlined), children: /* @__PURE__ */ s(
383
434
  m,
384
435
  {
385
436
  id: "vote.vote_box.show_result",
@@ -395,5 +446,5 @@ const Ke = ({
395
446
  );
396
447
  };
397
448
  export {
398
- Ke as VoteBox
449
+ Pe as VoteBox
399
450
  };
@@ -1,20 +1,21 @@
1
- import '../../../assets/components/vote/vote_box/VoteBox.module-BM2Iqu7I.css';const o = "_voteBox_1y5hn_3", t = "_voteResultsBox_1y5hn_11", e = "_voteResults_1y5hn_11", n = "_voteProgressHeader_1y5hn_22", s = "_voteProgressHeaderAgainst_1y5hn_35", _ = "_voteResultsNumberVoters_1y5hn_39", u = "_voteBoxFooter_1y5hn_47", v = "_voteBoxActions_1y5hn_56", B = "_voteBoxActionsBody_1y5hn_66", l = "_voteBoxActionsBodyColumn_1y5hn_74", i = "_voteAction_1y5hn_78", c = "_buttonAlignLeft_1y5hn_88", r = "_voteButton_1y5hn_92", h = "_textAlignLeft_1y5hn_103", y = "_voteBoxShowResultContainer_1y5hn_107", d = "_voteBoxShowResult_1y5hn_107", x = "_boldShowResult_1y5hn_131", A = "_outlined_1y5hn_137", a = "_voteButtonThesis_1y5hn_144", b = "_voteButtonThesisSynthesisMobile_1y5hn_156", R = "_voteBoxActionsBodyOutlined_1y5hn_195", g = "_voteBoxActionsBodyFilledNeutral_1y5hn_234", m = "_voteActionButton_1y5hn_247", w = "_sideIcon_1y5hn_263", C = "_progress_1y5hn_268", N = "_progressBar_1y5hn_274", S = "_voteCommentCounts_1y5hn_291", f = "_debateNumberItem_1y5hn_299", I = "_debateNumberLabel_1y5hn_308", L = "_showResultButton_1y5hn_312", T = "_voteResultInfoText_1y5hn_325", p = {
1
+ import '../../../assets/components/vote/vote_box/VoteBox.module-GeWFaMvd.css';const o = "_voteBox_18yph_3", t = "_voteResultsBox_18yph_11", e = "_voteResults_18yph_11", s = "_voteProgressHeader_18yph_22", n = "_voteProgressHeaderAgainst_18yph_35", _ = "_voteResultsNumberVoters_18yph_39", u = "_voteBoxFooter_18yph_47", v = "_voteFooterActions_18yph_56", c = "_voteBoxActions_18yph_62", i = "_voteBoxActionsBody_18yph_72", B = "_voteBoxActionsBodyColumn_18yph_80", l = "_voteAction_18yph_84", r = "_buttonAlignLeft_18yph_94", h = "_voteButton_18yph_98", y = "_textAlignLeft_18yph_109", d = "_voteBoxShowResultContainer_18yph_113", p = "_voteBoxShowResult_18yph_113", x = "_boldShowResult_18yph_137", A = "_outlined_18yph_143", a = "_voteButtonThesis_18yph_150", b = "_voteButtonThesisSynthesisMobile_18yph_162", R = "_voteBoxActionsBodyOutlined_18yph_201", g = "_voteBoxActionsBodyFilledNeutral_18yph_240", m = "_voteActionButton_18yph_253", w = "_sideIcon_18yph_273", C = "_progress_18yph_278", N = "_progressBar_18yph_284", S = "_voteCommentCounts_18yph_301", f = "_debateNumberItem_18yph_309", F = "_debateNumberLabel_18yph_318", I = "_showResultButton_18yph_322", L = "_voteResultInfoText_18yph_335", T = {
2
2
  voteBox: o,
3
3
  voteResultsBox: t,
4
4
  voteResults: e,
5
- voteProgressHeader: n,
6
- voteProgressHeaderAgainst: s,
5
+ voteProgressHeader: s,
6
+ voteProgressHeaderAgainst: n,
7
7
  voteResultsNumberVoters: _,
8
8
  voteBoxFooter: u,
9
- voteBoxActions: v,
10
- voteBoxActionsBody: B,
11
- voteBoxActionsBodyColumn: l,
12
- voteAction: i,
13
- buttonAlignLeft: c,
14
- voteButton: r,
15
- textAlignLeft: h,
16
- voteBoxShowResultContainer: y,
17
- voteBoxShowResult: d,
9
+ voteFooterActions: v,
10
+ voteBoxActions: c,
11
+ voteBoxActionsBody: i,
12
+ voteBoxActionsBodyColumn: B,
13
+ voteAction: l,
14
+ buttonAlignLeft: r,
15
+ voteButton: h,
16
+ textAlignLeft: y,
17
+ voteBoxShowResultContainer: d,
18
+ voteBoxShowResult: p,
18
19
  boldShowResult: x,
19
20
  outlined: A,
20
21
  voteButtonThesis: a,
@@ -27,40 +28,41 @@ import '../../../assets/components/vote/vote_box/VoteBox.module-BM2Iqu7I.css';co
27
28
  progressBar: N,
28
29
  voteCommentCounts: S,
29
30
  debateNumberItem: f,
30
- debateNumberLabel: I,
31
- showResultButton: L,
32
- voteResultInfoText: T
31
+ debateNumberLabel: F,
32
+ showResultButton: I,
33
+ voteResultInfoText: L
33
34
  };
34
35
  export {
35
36
  x as boldShowResult,
36
- c as buttonAlignLeft,
37
+ r as buttonAlignLeft,
37
38
  f as debateNumberItem,
38
- I as debateNumberLabel,
39
- p as default,
39
+ F as debateNumberLabel,
40
+ T as default,
40
41
  A as outlined,
41
42
  C as progress,
42
43
  N as progressBar,
43
- L as showResultButton,
44
+ I as showResultButton,
44
45
  w as sideIcon,
45
- h as textAlignLeft,
46
- i as voteAction,
46
+ y as textAlignLeft,
47
+ l as voteAction,
47
48
  m as voteActionButton,
48
49
  o as voteBox,
49
- v as voteBoxActions,
50
- B as voteBoxActionsBody,
51
- l as voteBoxActionsBodyColumn,
50
+ c as voteBoxActions,
51
+ i as voteBoxActionsBody,
52
+ B as voteBoxActionsBodyColumn,
52
53
  g as voteBoxActionsBodyFilledNeutral,
53
54
  R as voteBoxActionsBodyOutlined,
54
55
  u as voteBoxFooter,
55
- d as voteBoxShowResult,
56
- y as voteBoxShowResultContainer,
57
- r as voteButton,
56
+ p as voteBoxShowResult,
57
+ d as voteBoxShowResultContainer,
58
+ h as voteButton,
58
59
  a as voteButtonThesis,
59
60
  b as voteButtonThesisSynthesisMobile,
60
61
  S as voteCommentCounts,
61
- n as voteProgressHeader,
62
- s as voteProgressHeaderAgainst,
63
- T as voteResultInfoText,
62
+ v as voteFooterActions,
63
+ s as voteProgressHeader,
64
+ n as voteProgressHeaderAgainst,
65
+ L as voteResultInfoText,
64
66
  e as voteResults,
65
67
  t as voteResultsBox,
66
68
  _ as voteResultsNumberVoters
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logora/debate",
3
- "version": "0.4.99",
3
+ "version": "0.4.100",
4
4
  "type": "module",
5
5
  "license": "AGPL-3.0",
6
6
  "description": "Design system of @Logora made with React",
@@ -1 +0,0 @@
1
- ._voteBox_1y5hn_3{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;width:100%}._voteResultsBox_1y5hn_11{display:flex!important;flex-direction:column!important;padding:0!important;width:100%}._voteResults_1y5hn_11{padding:0!important}._voteProgressHeader_1y5hn_22{margin-bottom:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important;display:flex!important;align-items:center!important;font-size:var(--font-size-normal, 16px);display:-webkit-box;word-wrap:break-word;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}._voteProgressHeaderAgainst_1y5hn_35{margin-top:var(--spacer-md, calc(var(--space-unit, 1em) * .75))!important}._voteResultsNumberVoters_1y5hn_39{display:flex!important;align-items:center!important;padding:0!important;font-size:var(--font-size-normal, 16px);color:var(--text-secondary, #5F5F5F)}._voteBoxFooter_1y5hn_47{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;margin-top:var(--space-unit, 1em)!important;padding:0!important}._voteBoxActions_1y5hn_56{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center;gap:var(--space-unit, 1em);color:var(--text-secondary, #5F5F5F);width:100%}._voteBoxActionsBody_1y5hn_66{display:grid!important;grid-template-columns:repeat(2,1fr);gap:var(--spacer-md, calc(var(--space-unit, 1em) * .75));padding:0!important;width:100%}._voteBoxActionsBodyColumn_1y5hn_74{grid-template-columns:1fr}._voteAction_1y5hn_78{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;padding:0!important;max-width:100%!important;width:100%!important;text-align:center}._voteAction_1y5hn_78._buttonAlignLeft_1y5hn_88{justify-content:flex-start!important}button._voteButton_1y5hn_92,a._voteButton_1y5hn_92{-webkit-appearance:initial!important;width:100%;-webkit-hyphens:auto;-ms-hyphens:auto;-moz-hyphens:auto;hyphens:auto;padding:var(--spacer-sm, calc(var(--space-unit, 1em) * .5))!important}._textAlignLeft_1y5hn_103{justify-content:flex-start!important}._voteBoxShowResultContainer_1y5hn_107{display:flex!important;flex-direction:row!important;justify-content:center;flex-wrap:wrap!important;margin-top:.3em}._voteBoxShowResult_1y5hn_107{cursor:pointer}._voteBoxShowResult_1y5hn_107 a{color:inherit;text-decoration:none;background:none!important}._voteBoxShowResult_1y5hn_107 a:hover{text-decoration:none;background:none!important}._voteBoxShowResult_1y5hn_107 a:focus:not(:focus-visible){outline:none;box-shadow:none}._voteBoxShowResult_1y5hn_107 ._boldShowResult_1y5hn_131{font-weight:var(--font-weight-bold, 700);font-variation-settings:var(--font-variation-bold, normal);color:var(--text-primary, #222222)}._outlined_1y5hn_137{padding:7px 15px;border-radius:var(--box-border-radius, 6px);border:1px solid var(--text-primary, #222222)!important;white-space:nowrap}._voteButtonThesis_1y5hn_144{display:block;text-align:left;display:-webkit-box;word-wrap:break-word;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}@container (max-width: 767.98px){._voteButtonThesisSynthesisMobile_1y5hn_156{text-align:center!important}}._voteBoxActionsBody_1y5hn_66 ._voteAction_1y5hn_78:first-child ._voteButton_1y5hn_92,._voteBoxActionsBody_1y5hn_66 ._voteAction_1y5hn_78:first-child ._voteButton_1y5hn_92:hover{background-color:var(--for-primary-color, #cc6a6d)!important;border-color:var(--for-primary-color, #cc6a6d)!important;border:1px solid var(--for-primary-color, #cc6a6d)!important}._voteBoxActionsBody_1y5hn_66 ._voteAction_1y5hn_78:nth-child(2) ._voteButton_1y5hn_92{background-color:var(--against-primary-color, #7980bb)!important;border-color:var(--against-primary-color, #7980bb)!important;border:1px solid var(--against-primary-color, #7980bb)!important}._voteBoxActionsBody_1y5hn_66 ._voteAction_1y5hn_78:nth-child(2) ._voteButton_1y5hn_92:hover{background-color:var(--against-primary-color, #7980bb)!important;border-color:var(--against-primary-color, #7980bb)!important;border:1px solid var(--against-primary-color, #7980bb)!important}._voteBoxActionsBody_1y5hn_66 ._voteAction_1y5hn_78:nth-child(3) ._voteButton_1y5hn_92{background-color:var(--text-light, white)!important;color:var(--third-position-color-primary, #9b9b9b)!important;border-color:var(--third-position-color-primary, #9b9b9b)!important;border:1px solid var(--third-position-color-primary, #9b9b9b)!important}._voteBoxActionsBody_1y5hn_66 ._voteAction_1y5hn_78:nth-child(3) ._voteButton_1y5hn_92:hover{background-color:var(--text-light, white)!important;color:var(--third-position-color-primary, #9b9b9b)!important;border-color:var(--third-position-color-primary, #9b9b9b)!important;border:1px solid var(--third-position-color-primary, #9b9b9b)!important}._voteBoxActionsBodyOutlined_1y5hn_195 ._voteAction_1y5hn_78:first-child ._voteButton_1y5hn_92,._voteBoxActionsBodyOutlined_1y5hn_195 ._voteAction_1y5hn_78:first-child ._voteButton_1y5hn_92:hover{background-color:var(--text-light, white)!important;color:var(--for-primary-color, #cc6a6d)!important;border-color:var(--for-primary-color, #cc6a6d)!important;border:1px solid var(--for-primary-color, #cc6a6d)!important}._voteBoxActionsBodyOutlined_1y5hn_195 ._voteAction_1y5hn_78:nth-child(2) ._voteButton_1y5hn_92{background-color:var(--text-light, white)!important;color:var(--against-primary-color, #7980bb)!important;border-color:var(--against-primary-color, #7980bb)!important;border:1px solid var(--against-primary-color, #7980bb)!important}._voteBoxActionsBodyOutlined_1y5hn_195 ._voteAction_1y5hn_78:nth-child(2) ._voteButton_1y5hn_92:hover{background-color:var(--text-light, white)!important;color:var(--against-primary-color, #7980bb)!important;border-color:var(--against-primary-color, #7980bb)!important;border:1px solid var(--against-primary-color, #7980bb)!important}._voteBoxActionsBodyOutlined_1y5hn_195 ._voteAction_1y5hn_78:nth-child(3) ._voteButton_1y5hn_92{background-color:var(--text-light, white)!important;color:var(--third-position-color-primary, #9b9b9b)!important;border-color:var(--third-position-color-primary, #9b9b9b)!important;border:1px solid var(--third-position-color-primary, #9b9b9b)!important}._voteBoxActionsBodyOutlined_1y5hn_195 ._voteAction_1y5hn_78:nth-child(3) ._voteButton_1y5hn_92:hover{background-color:var(--text-light, white)!important;color:var(--third-position-color-primary, #9b9b9b)!important;border-color:var(--third-position-color-primary, #9b9b9b)!important;border:1px solid var(--third-position-color-primary, #9b9b9b)!important}._voteBoxActionsBodyFilledNeutral_1y5hn_234 ._voteAction_1y5hn_78:nth-child(3) ._voteButton_1y5hn_92{background-color:var(--third-position-color-primary, #9b9b9b)!important;color:var(--text-light, white)!important;border-color:var(--third-position-color-primary, #9b9b9b)!important;border:1px solid var(--third-position-color-primary, #9b9b9b)!important}._voteBoxActionsBodyFilledNeutral_1y5hn_234 ._voteAction_1y5hn_78:nth-child(3) ._voteButton_1y5hn_92:hover{background-color:var(--third-position-color-primary, #9b9b9b)!important;color:var(--text-light, white)!important;border-color:var(--third-position-color-primary, #9b9b9b)!important;border:1px solid var(--third-position-color-primary, #9b9b9b)!important}._voteActionButton_1y5hn_247{cursor:pointer;-webkit-appearance:initial!important;background:none;border:none;color:var(--text-secondary, #5F5F5F)!important;font-size:inherit;padding:0;font-weight:var(--font-weight-bold, 700);font-variation-settings:var(--font-variation-bold, normal)}._voteActionButton_1y5hn_247:focus:not(:focus-visible){outline:none;box-shadow:none}._sideIcon_1y5hn_263 svg{margin-left:5px;fill:var(--text-primary, #222222)}._progress_1y5hn_268{border-radius:var(--button-border-radius, var(--box-border-radius, 6px));color:var(--text-secondary, #5F5F5F);height:2.2em}._progressBar_1y5hn_274{border-radius:var(--button-border-radius, var(--box-border-radius, 6px));height:100%}._voteResults_1y5hn_11>div:first-child ._progress_1y5hn_268 ._progressBar_1y5hn_274{background-color:var(--for-primary-color, #cc6a6d)!important}._voteResults_1y5hn_11>div:nth-child(2) ._progress_1y5hn_268 ._progressBar_1y5hn_274{background-color:var(--against-primary-color, #7980bb)!important}._voteResults_1y5hn_11 div:nth-child(3) ._progress_1y5hn_268 ._progressBar_1y5hn_274{background-color:var(--third-position-color-primary, #9b9b9b)!important}._voteCommentCounts_1y5hn_291{display:flex;align-items:center;gap:var(--space-unit, 1em);width:100%;margin-top:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25))!important}._debateNumberItem_1y5hn_299{display:flex;align-items:center;gap:var(--spacer-xxs, calc(var(--space-unit, 1em) * .25));font-size:var(--font-size-normal, 16px);color:var(--text-primary, #222222);white-space:nowrap}._debateNumberLabel_1y5hn_308{white-space:nowrap}._showResultButton_1y5hn_312{background:none;border:0;padding:0;font:inherit;color:inherit;cursor:pointer}._showResultButton_1y5hn_312:focus:not(:focus-visible){outline:none;box-shadow:none}._voteResultInfoText_1y5hn_325{font-size:var(--font-size-small, 16px);color:var(--text-secondary, #5F5F5F);text-align:left;width:100%;align-self:flex-start}