fansunited-frontend-components 0.0.93 → 0.0.94

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.
@@ -1,7 +1,7 @@
1
1
  import { jsx as t, jsxs as x, Fragment as v } from "react/jsx-runtime";
2
2
  import { getTranslatedPollIds as rt, useFontFamily as fe, isTablet as St, isMobile as Q, getBrandingClickUrl as It, CollectLeadForm as Pt, useInternalTheme as ve, useColors as D, useCornerRadius as re, useSpacingScale as Te, useBorderSize as $e, useEmbedCode as Ye, useConstantContext as Fe, ConstantsContext as Be, isLarge as Me, extractBrandingModelProperties as Qe, defaultBgVertical as Ve, defaultBg as ze, useImageVariant as Ue, WidgetTemplate as G, OverlaySkeleton as Tt, ConsentPanel as Ee, ConsentCta as _e, SignInCta as Ge, isExtraSmall as At, hexToRgb as De, StandardSkeleton as vt, useImageBackgroundGradient as gt, SplitSkeleton as Lt, stripHtmlTags as kt, useIntlLocale as mt, StandardScoreStateSkeleton as wt, AdditionalCTA as pe, isDesktop as Dt, SplitScoreStateSkeleton as Rt, sanitizeBackgroundUrl as Ft, OverlayScoreStateSkeleton as Bt, NotFoundSkeleton as Vt, OverlayApiErrorSkeleton as ut, SplitApiErrorSkeleton as ft, StandardApiErrorSkeleton as xt, StandardLeadAfterCollection as yt, SplitLeadAfterCollection as ht, OverlayLeadAfterCollection as bt, getRelatedInfoPageId as zt, useConsents as Ut, initializeI18n as Et, Spinner as Wt, ChanceGameEmbed as ct, extractSdkError as Ot, Portal as qt } from "fansunited-frontend-core";
3
3
  import { C as st } from "./ChanceGameEmbedVariant-C3NGwvTF.js";
4
- import Re, { useState as E, useEffect as ke, useCallback as jt, useRef as Mt, useMemo as Ke } from "react";
4
+ import Re, { useState as U, useEffect as ke, useCallback as jt, useRef as Mt, useMemo as Ke } from "react";
5
5
  import { PollFullModel as Ht, SinglePollVoteModel as Gt } from "fansunited-sdk-esm";
6
6
  import { Box as i, Typography as L, AspectRatio as Ne, Button as He, Alert as Nt, Stack as $t } from "@mui/joy";
7
7
  import { useTranslation as O } from "react-i18next";
@@ -11,7 +11,7 @@ import Qt from "@mui/icons-material/Info";
11
11
  import _t from "@mui/icons-material/Warning";
12
12
  import je from "@mui/icons-material/People";
13
13
  const Kt = (e, n) => {
14
- const [a, l] = E(null), o = async () => {
14
+ const [a, l] = U(null), o = async () => {
15
15
  try {
16
16
  const r = await n.voting.getPollById(e, !0);
17
17
  l(r);
@@ -21,13 +21,15 @@ const Kt = (e, n) => {
21
21
  };
22
22
  return ke(() => (o(), () => l(null)), [e, n]), { poll: a, setPoll: l };
23
23
  }, Jt = (e, n, a, l = !1, o = !1) => {
24
- const [r, c] = E(null), [m, f] = E(!1), [u, d] = E(!1), [s, h] = E(""), A = async () => {
24
+ const [r, c] = U(null), [m, f] = U(!1), [u, d] = U(!1), [s, h] = U(""), [A, P] = U(a);
25
+ a !== A && (P(a), c(null));
26
+ const S = async () => {
25
27
  try {
26
- const S = await n.voting.getMyPollVote(e);
27
- c(S);
28
- } catch (C) {
28
+ const B = await n.voting.getMyPollVote(e);
29
+ c(B);
30
+ } catch (b) {
29
31
  if (c(new Gt()), n.helpers.getSDKConfiguration().errorHandlingMode === "standard") {
30
- const R = C;
32
+ const R = b;
31
33
  if (R.error.code === 404)
32
34
  return;
33
35
  if (R.error.code === 401 || R.error.code === 403) {
@@ -37,17 +39,17 @@ const Kt = (e, n) => {
37
39
  d(!0), h(R.error.message);
38
40
  return;
39
41
  }
40
- const b = C;
41
- if (b.data.error.code === 404)
42
+ const C = b;
43
+ if (C.data.error.code === 404)
42
44
  return;
43
- if (b.data.error.code === 401 || b.data.error.code === 403) {
45
+ if (C.data.error.code === 401 || C.data.error.code === 403) {
44
46
  l || f(!0);
45
47
  return;
46
48
  }
47
- d(!0), h(b.data.error.message);
49
+ d(!0), h(C.data.error.message);
48
50
  }
49
51
  };
50
- return ke(() => (A(), () => {
52
+ return ke(() => (S(), () => {
51
53
  c(null), f(!1), d(!1);
52
54
  }), [e, n, a, l, o]), {
53
55
  myVote: r,
@@ -88,7 +90,7 @@ const Kt = (e, n) => {
88
90
  )
89
91
  }));
90
92
  }, pt = (e, n) => {
91
- const [a, l] = E([]), [o, r] = E(!1), c = jt(async () => {
93
+ const [a, l] = U([]), [o, r] = U(!1), c = jt(async () => {
92
94
  if (e != null && e.id)
93
95
  try {
94
96
  l(await Xt(e, n));
@@ -219,13 +221,13 @@ const Kt = (e, n) => {
219
221
  leadCta: s,
220
222
  leadSuccessTitle: h,
221
223
  leadSuccessDescription: A,
222
- syncWithProfile: C = !1,
224
+ syncWithProfile: P = !1,
223
225
  consents: S,
224
226
  isAfterPosition: b = !1,
225
- isSubmittingParticipation: R = !1
227
+ isSubmittingParticipation: B = !1
226
228
  }) => {
227
- const { t: T } = O(), z = u ?? T("leads.header.title"), B = d ?? T("leads.header.description"), P = s ?? T("leads.buttons.submit"), y = h ?? T("leads.success.title"), N = A ?? T("leads.success.description"), g = {
228
- defaultLabel: T(b ? "poll.buttons.vote" : "poll.buttons.start"),
229
+ const { t: C } = O(), R = u ?? C("leads.header.title"), V = d ?? C("leads.header.description"), T = s ?? C("leads.buttons.submit"), y = h ?? C("leads.success.title"), N = A ?? C("leads.success.description"), g = {
230
+ defaultLabel: C(b ? "poll.buttons.vote" : "poll.buttons.start"),
229
231
  onClick: m
230
232
  };
231
233
  return /* @__PURE__ */ t(
@@ -248,15 +250,15 @@ const Kt = (e, n) => {
248
250
  },
249
251
  fields: f,
250
252
  labels: {
251
- title: z,
252
- description: B,
253
- submitButtonLabel: P,
253
+ title: R,
254
+ description: V,
255
+ submitButtonLabel: T,
254
256
  successTitle: y,
255
257
  successDescription: N
256
258
  },
257
- syncWithProfile: C,
259
+ syncWithProfile: P,
258
260
  consents: S,
259
- isSubmittingParticipation: R
261
+ isSubmittingParticipation: B
260
262
  }
261
263
  );
262
264
  }, en = (e) => ({
@@ -361,10 +363,10 @@ const Kt = (e, n) => {
361
363
  alignItems: "center"
362
364
  }
363
365
  }), Je = (e) => {
364
- var T;
365
- const n = ve(), a = D(), l = re().sm, o = fe().primary, r = re().xs, c = Te(), m = $e().size, f = Ye(e.option.embedCode || ""), u = !!e.option.embedCode, d = ((T = e.brandingColors) == null ? void 0 : T.primaryColor) || a.palette.primary.plainColor, s = a.palette.primary.onPrimary, h = e.selectedOptions.includes(e.option.id) ? s : n.colorSchemes.light.textColor, A = e.optionsImages.get(e.option.id), C = () => {
366
+ var C;
367
+ const n = ve(), a = D(), l = re().sm, o = fe().primary, r = re().xs, c = Te(), m = $e().size, f = Ye(e.option.embedCode || ""), u = !!e.option.embedCode, d = ((C = e.brandingColors) == null ? void 0 : C.primaryColor) || a.palette.primary.plainColor, s = a.palette.primary.onPrimary, h = e.selectedOptions.includes(e.option.id) ? s : n.colorSchemes.light.textColor, A = e.optionsImages.get(e.option.id), P = () => {
366
368
  e.multipleChoice ? e.answerPoll([e.option.id]) : e.answerPoll([e.option.id]);
367
- }, S = e.selectedOptions.includes(e.option.id), b = e.isVoting || e.disabled || e.multipleChoice && !S && e.selectedOptions.length >= (e.maxChoices || 1), R = () => u ? /* @__PURE__ */ x(v, { children: [
369
+ }, S = e.selectedOptions.includes(e.option.id), b = e.isVoting || e.disabled || e.multipleChoice && !S && e.selectedOptions.length >= (e.maxChoices || 1), B = () => u ? /* @__PURE__ */ x(v, { children: [
368
370
  /* @__PURE__ */ t(
369
371
  i,
370
372
  {
@@ -474,8 +476,8 @@ const Kt = (e, n) => {
474
476
  display: "flex",
475
477
  flexDirection: "column"
476
478
  },
477
- onClick: b ? void 0 : C,
478
- children: R()
479
+ onClick: b ? void 0 : P,
480
+ children: B()
479
481
  },
480
482
  e.option.id
481
483
  );
@@ -575,18 +577,18 @@ const Kt = (e, n) => {
575
577
  ((ae = e.leads) == null ? void 0 : ae.position) === "before" && e.poll.authRequirement === "LEAD" || !1
576
578
  );
577
579
  }, [(w = e.leads) == null ? void 0 : w.position, e.poll.authRequirement]);
578
- const { optionsLayout: l } = Fe(Be), o = Te(), r = ve(), c = Oe(e.options), { t: m } = O(), f = Q(), u = Me(), d = Ye(e.poll.embedCode), s = !n && !!e.poll.embedCode, h = ((_ = e.leads) == null ? void 0 : _.position) === "after" ? m("poll.buttons.continue") : m("poll.buttons.vote"), { brandingImage: A, brandingColors: C, brandingLogo: S } = Qe(e.poll.branding || null), b = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : Q() ? Ve : ze, R = A || Ue(
580
+ const { optionsLayout: l } = Fe(Be), o = Te(), r = ve(), c = Oe(e.options), { t: m } = O(), f = Q(), u = Me(), d = Ye(e.poll.embedCode), s = !n && !!e.poll.embedCode, h = ((_ = e.leads) == null ? void 0 : _.position) === "after" ? m("poll.buttons.continue") : m("poll.buttons.vote"), { brandingImage: A, brandingColors: P, brandingLogo: S } = Qe(e.poll.branding || null), b = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : Q() ? Ve : ze, B = A || Ue(
579
581
  {
580
582
  images: e.poll.images,
581
583
  imagePlaceholder: b
582
584
  },
583
585
  G.OVERLAY
584
- ), T = r.customRadius.dark.sm, z = (C == null ? void 0 : C.backgroundColor) || ((Z = (M = r.colorSchemes) == null ? void 0 : M.dark) == null ? void 0 : Z.surfaceVariant), B = (K = (ce = r.customRadius) == null ? void 0 : ce.light) == null ? void 0 : K.xl, P = (C == null ? void 0 : C.primaryColor) || ((le = (se = (xe = (ne = r.colorSchemes) == null ? void 0 : ne.light) == null ? void 0 : xe.palette) == null ? void 0 : se.primary) == null ? void 0 : le.plainColor), y = (H = (oe = (p = (de = r.colorSchemes) == null ? void 0 : de.light) == null ? void 0 : p.palette) == null ? void 0 : oe.primary) == null ? void 0 : H.onPrimary, N = r.customFontFamily.dark.primary, g = r.colorSchemes.dark.textColor, V = en({
586
+ ), C = r.customRadius.dark.sm, R = (P == null ? void 0 : P.backgroundColor) || ((Z = (M = r.colorSchemes) == null ? void 0 : M.dark) == null ? void 0 : Z.surfaceVariant), V = (K = (ce = r.customRadius) == null ? void 0 : ce.light) == null ? void 0 : K.xl, T = (P == null ? void 0 : P.primaryColor) || ((le = (se = (xe = (ne = r.colorSchemes) == null ? void 0 : ne.light) == null ? void 0 : xe.palette) == null ? void 0 : se.primary) == null ? void 0 : le.plainColor), y = (H = (oe = (p = (de = r.colorSchemes) == null ? void 0 : de.light) == null ? void 0 : p.palette) == null ? void 0 : oe.primary) == null ? void 0 : H.onPrimary, N = r.customFontFamily.dark.primary, g = r.colorSchemes.dark.textColor, z = en({
585
587
  spacingScale: o,
586
- smBorderRadius: T,
587
- contentBgColor: z,
588
- buttonRadius: B,
589
- primaryColor: P,
588
+ smBorderRadius: C,
589
+ contentBgColor: R,
590
+ buttonRadius: V,
591
+ primaryColor: T,
590
592
  onPrimaryColor: y,
591
593
  fontFamilyPrimary: N,
592
594
  darkTextColor: g,
@@ -611,15 +613,15 @@ const Kt = (e, n) => {
611
613
  {
612
614
  entity: e.poll,
613
615
  headline: m("poll.headline"),
614
- finalImage: R,
616
+ finalImage: B,
615
617
  rulesDisplay: e.rulesDisplay,
616
- children: /* @__PURE__ */ x(i, { sx: V.mainContentSection, children: [
617
- /* @__PURE__ */ t(i, { sx: V.contentContainerWithBackdrop, children: e.applyConsentGate ? /* @__PURE__ */ t(
618
+ children: /* @__PURE__ */ x(i, { sx: z.mainContentSection, children: [
619
+ /* @__PURE__ */ t(i, { sx: z.contentContainerWithBackdrop, children: e.applyConsentGate ? /* @__PURE__ */ t(
618
620
  Ee,
619
621
  {
620
622
  consents: e.consents,
621
- primaryColor: P,
622
- textColor: (C == null ? void 0 : C.contentColor) || g,
623
+ primaryColor: T,
624
+ textColor: (P == null ? void 0 : P.contentColor) || g,
623
625
  brandingUrls: (ye = e.poll.branding) == null ? void 0 : ye.urls
624
626
  }
625
627
  ) : n ? /* @__PURE__ */ t(
@@ -643,7 +645,7 @@ const Kt = (e, n) => {
643
645
  consents: e.leadConsents
644
646
  }
645
647
  ) : /* @__PURE__ */ x(v, { children: [
646
- s && /* @__PURE__ */ t(i, { sx: { overflow: "hidden", borderRadius: T }, children: /* @__PURE__ */ t(
648
+ s && /* @__PURE__ */ t(i, { sx: { overflow: "hidden", borderRadius: C }, children: /* @__PURE__ */ t(
647
649
  Ne,
648
650
  {
649
651
  ratio: "16/9",
@@ -651,7 +653,7 @@ const Kt = (e, n) => {
651
653
  children: /* @__PURE__ */ t(i, { ref: d })
652
654
  }
653
655
  ) }),
654
- e.poll.alternativeTitle ? /* @__PURE__ */ t(i, { sx: V.alternativeTitleSection, children: /* @__PURE__ */ t(L, { level: "body-lg", sx: V.alternativeTitleText, children: e.poll.alternativeTitle }) }) : /* @__PURE__ */ t(v, {}),
656
+ e.poll.alternativeTitle ? /* @__PURE__ */ t(i, { sx: z.alternativeTitleSection, children: /* @__PURE__ */ t(L, { level: "body-lg", sx: z.alternativeTitleText, children: e.poll.alternativeTitle }) }) : /* @__PURE__ */ t(v, {}),
655
657
  /* @__PURE__ */ t(
656
658
  tt,
657
659
  {
@@ -659,7 +661,7 @@ const Kt = (e, n) => {
659
661
  answerPoll: e.answerPoll,
660
662
  selectedOptions: e.selectedOptions,
661
663
  optionsLayout: u ? "column" : l ?? "row",
662
- brandingColors: C,
664
+ brandingColors: P,
663
665
  optionsImages: c,
664
666
  multipleChoice: e.poll.multipleChoice,
665
667
  maxChoices: e.optionChoices,
@@ -668,7 +670,7 @@ const Kt = (e, n) => {
668
670
  }
669
671
  )
670
672
  ] }) }),
671
- /* @__PURE__ */ x(i, { sx: V.bottomFooterContainer, children: [
673
+ /* @__PURE__ */ x(i, { sx: z.bottomFooterContainer, children: [
672
674
  te(),
673
675
  e.applyConsentGate ? /* @__PURE__ */ t(
674
676
  _e,
@@ -676,24 +678,24 @@ const Kt = (e, n) => {
676
678
  onClick: e.startVoting,
677
679
  label: ((Ae = (X = e.consents) == null ? void 0 : X.labels) == null ? void 0 : Ae.ctaLabel) || m("poll.buttons.start"),
678
680
  isSubmitting: e.isSubmitting,
679
- primaryColor: P,
681
+ primaryColor: T,
680
682
  showArrow: !1
681
683
  }
682
684
  ) : !n && (e.signInRequired ? /* @__PURE__ */ t(
683
685
  Ge,
684
686
  {
685
687
  signInCTA: e.signInCTA,
686
- primaryColor: P
688
+ primaryColor: T
687
689
  }
688
690
  ) : /* @__PURE__ */ t(
689
691
  He,
690
692
  {
691
693
  variant: "soft",
692
- sx: V.nextButton,
694
+ sx: z.nextButton,
693
695
  onClick: e.voteForPoll,
694
696
  loading: e.isVoting,
695
697
  disabled: e.selectedOptions.length === 0 || e.isVoting,
696
- children: /* @__PURE__ */ t(L, { sx: V.nextButtonText, children: h })
698
+ children: /* @__PURE__ */ t(L, { sx: z.nextButtonText, children: h })
697
699
  }
698
700
  ))
699
701
  ] })
@@ -893,12 +895,12 @@ const Kt = (e, n) => {
893
895
  imagePlaceholder: e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : ""
894
896
  },
895
897
  G.STANDARD
896
- ), C = ((ne = e.leads) == null ? void 0 : ne.position) === "after" ? m("poll.buttons.continue") : m("poll.buttons.vote"), S = u || f && !!A, b = (d == null ? void 0 : d.contentColor) || D().textColor, R = fe().primary, T = (d == null ? void 0 : d.backgroundColor) || D().surfaceVariant, z = re().md, B = (d == null ? void 0 : d.primaryColor) || D().palette.primary.plainColor, P = Te(), y = nn({
897
- spacingScale: P,
898
- fontFamilyPrimary: R,
898
+ ), P = ((ne = e.leads) == null ? void 0 : ne.position) === "after" ? m("poll.buttons.continue") : m("poll.buttons.vote"), S = u || f && !!A, b = (d == null ? void 0 : d.contentColor) || D().textColor, B = fe().primary, C = (d == null ? void 0 : d.backgroundColor) || D().surfaceVariant, R = re().md, V = (d == null ? void 0 : d.primaryColor) || D().palette.primary.plainColor, T = Te(), y = nn({
899
+ spacingScale: T,
900
+ fontFamilyPrimary: B,
899
901
  textColor: b,
900
- bgcolor: De(T || ""),
901
- mdBorderRadius: z,
902
+ bgcolor: De(C || ""),
903
+ mdBorderRadius: R,
902
904
  isExtraSmall: S
903
905
  }), N = () => {
904
906
  a(!1);
@@ -914,14 +916,14 @@ const Kt = (e, n) => {
914
916
  secondaryUrl: (ie = (be = e.poll.branding) == null ? void 0 : be.urls) == null ? void 0 : ie.secondaryUrl
915
917
  }
916
918
  );
917
- }, V = () => {
919
+ }, z = () => {
918
920
  var J, q, j;
919
921
  return /* @__PURE__ */ t(i, { sx: y.questionArea, children: /* @__PURE__ */ x(i, { sx: y.questionContainer, children: [
920
922
  /* @__PURE__ */ t(i, { sx: y.questionContentContainer, children: /* @__PURE__ */ t(
921
923
  Ee,
922
924
  {
923
925
  consents: e.consents,
924
- primaryColor: B,
926
+ primaryColor: V,
925
927
  textColor: b,
926
928
  brandingUrls: (J = e.poll.branding) == null ? void 0 : J.urls,
927
929
  align: "center"
@@ -939,7 +941,7 @@ const Kt = (e, n) => {
939
941
  onClick: e.startVoting,
940
942
  label: ((j = (q = e.consents) == null ? void 0 : q.labels) == null ? void 0 : j.ctaLabel) || m("poll.buttons.start"),
941
943
  isSubmitting: e.isSubmitting,
942
- primaryColor: B,
944
+ primaryColor: V,
943
945
  showArrow: !1
944
946
  }
945
947
  ) })
@@ -959,7 +961,7 @@ const Kt = (e, n) => {
959
961
  rulesDisplay: e.rulesDisplay,
960
962
  embedCodeContainerRef: o,
961
963
  hasEmbedCode: r,
962
- children: /* @__PURE__ */ t(v, { children: e.applyConsentGate ? V() : n ? /* @__PURE__ */ t(i, { sx: y.leadCollectionContainer, children: /* @__PURE__ */ x(i, { sx: y.leadQuestionContainer, children: [
964
+ children: /* @__PURE__ */ t(v, { children: e.applyConsentGate ? z() : n ? /* @__PURE__ */ t(i, { sx: y.leadCollectionContainer, children: /* @__PURE__ */ x(i, { sx: y.leadQuestionContainer, children: [
963
965
  /* @__PURE__ */ t(i, { sx: y.leadContentContainer, children: /* @__PURE__ */ t(
964
966
  We,
965
967
  {
@@ -1011,14 +1013,14 @@ const Kt = (e, n) => {
1011
1013
  Ge,
1012
1014
  {
1013
1015
  signInCTA: e.signInCTA,
1014
- primaryColor: B
1016
+ primaryColor: V
1015
1017
  }
1016
1018
  ) : /* @__PURE__ */ t(
1017
1019
  Ze,
1018
1020
  {
1019
1021
  selectedOptions: e.selectedOptions,
1020
- label: C,
1021
- buttonColor: B,
1022
+ label: P,
1023
+ buttonColor: V,
1022
1024
  onClick: e.voteForPoll,
1023
1025
  isVoting: e.isVoting
1024
1026
  }
@@ -1375,17 +1377,17 @@ const Kt = (e, n) => {
1375
1377
  imagePlaceholder: m
1376
1378
  },
1377
1379
  G.SPLIT
1378
- ), u = Oe(e.options), { t: d } = O(), s = ((ne = e.poll.branding) == null ? void 0 : ne.colors) || null, h = r ? ((xe = e.poll.branding) == null ? void 0 : xe.images.mobileLogo) || ((se = e.poll.branding) == null ? void 0 : se.images.mainLogo) || "" : ((le = e.poll.branding) == null ? void 0 : le.images.mainLogo) || "", A = Ye(e.poll.embedCode), C = !n && !!e.poll.embedCode, S = ((de = e.leads) == null ? void 0 : de.position) === "after" ? d("poll.buttons.continue") : d("poll.buttons.vote"), b = (s == null ? void 0 : s.contentColor) || D().textColor, R = fe().secondary, T = "60%", z = fe().primary, B = re().xl, P = (s == null ? void 0 : s.backgroundColor) || D().surfaceVariant, y = (s == null ? void 0 : s.primaryColor) || ((oe = (p = D().palette) == null ? void 0 : p.primary) == null ? void 0 : oe.plainColor), N = (ye = (H = D().palette) == null ? void 0 : H.primary) == null ? void 0 : ye.onPrimary, g = D().textColor, V = Te(), k = re(), te = gt(
1380
+ ), u = Oe(e.options), { t: d } = O(), s = ((ne = e.poll.branding) == null ? void 0 : ne.colors) || null, h = r ? ((xe = e.poll.branding) == null ? void 0 : xe.images.mobileLogo) || ((se = e.poll.branding) == null ? void 0 : se.images.mainLogo) || "" : ((le = e.poll.branding) == null ? void 0 : le.images.mainLogo) || "", A = Ye(e.poll.embedCode), P = !n && !!e.poll.embedCode, S = ((de = e.leads) == null ? void 0 : de.position) === "after" ? d("poll.buttons.continue") : d("poll.buttons.vote"), b = (s == null ? void 0 : s.contentColor) || D().textColor, B = fe().secondary, C = "60%", R = fe().primary, V = re().xl, T = (s == null ? void 0 : s.backgroundColor) || D().surfaceVariant, y = (s == null ? void 0 : s.primaryColor) || ((oe = (p = D().palette) == null ? void 0 : p.primary) == null ? void 0 : oe.plainColor), N = (ye = (H = D().palette) == null ? void 0 : H.primary) == null ? void 0 : ye.onPrimary, g = D().textColor, z = Te(), k = re(), te = gt(
1379
1381
  G.SPLIT
1380
- ), $ = De(P || ""), w = on({
1382
+ ), $ = De(T || ""), w = on({
1381
1383
  finalImage: f,
1382
- spacingScale: V,
1384
+ spacingScale: z,
1383
1385
  borderRadius: k,
1384
- fontFamilyPrimary: z,
1385
- fontFamilySecondary: R,
1386
+ fontFamilyPrimary: R,
1387
+ fontFamilySecondary: B,
1386
1388
  secondaryColor: b,
1387
- opacity: T,
1388
- buttonRadius: B,
1389
+ opacity: C,
1390
+ buttonRadius: V,
1389
1391
  bgcolor: $,
1390
1392
  primaryColor: y,
1391
1393
  onPrimaryColor: N,
@@ -1440,11 +1442,11 @@ const Kt = (e, n) => {
1440
1442
  finalImage: f,
1441
1443
  rulesDisplay: e.rulesDisplay,
1442
1444
  embedCodeContainerRef: A,
1443
- hasEmbedCode: C,
1445
+ hasEmbedCode: P,
1444
1446
  brandingLogo: h,
1445
1447
  renderPresentedBy: M,
1446
1448
  children: /* @__PURE__ */ t(i, { sx: w.questionArea, children: /* @__PURE__ */ x(i, { sx: w.questionAreaContent, children: [
1447
- C && /* @__PURE__ */ t(i, { sx: w.embedCodeHeadlineContent, children: /* @__PURE__ */ x(i, { children: [
1449
+ P && /* @__PURE__ */ t(i, { sx: w.embedCodeHeadlineContent, children: /* @__PURE__ */ x(i, { children: [
1448
1450
  /* @__PURE__ */ t(
1449
1451
  L,
1450
1452
  {
@@ -1528,13 +1530,13 @@ const Kt = (e, n) => {
1528
1530
  disabled: e.signInRequired
1529
1531
  }
1530
1532
  ),
1531
- C ? /* @__PURE__ */ x(
1533
+ P ? /* @__PURE__ */ x(
1532
1534
  i,
1533
1535
  {
1534
1536
  sx: {
1535
1537
  display: "flex",
1536
1538
  flexDirection: c ? "column-reverse" : "row",
1537
- gap: V.lg,
1539
+ gap: z.lg,
1538
1540
  justifyContent: h ? "space-between" : "center"
1539
1541
  },
1540
1542
  children: [
@@ -1584,7 +1586,7 @@ const Kt = (e, n) => {
1584
1586
  ] }) })
1585
1587
  }
1586
1588
  ),
1587
- h && c && /* @__PURE__ */ t(i, { sx: { mb: V.lg, px: V.lg }, children: M(
1589
+ h && c && /* @__PURE__ */ t(i, { sx: { mb: z.lg, px: z.lg }, children: M(
1588
1590
  (s == null ? void 0 : s.contentColor) || o.colorSchemes.dark.textColor,
1589
1591
  !0
1590
1592
  ) })
@@ -1821,15 +1823,15 @@ const Kt = (e, n) => {
1821
1823
  }
1822
1824
  );
1823
1825
  }, Xe = (e) => {
1824
- var T;
1825
- const n = mt(), [a, l] = E(0), o = ve(), r = D(), c = re().sm, m = fe(), f = re().xs, u = Te(), d = e.optionsImages.get(e.option.id), s = e.selectedOptions.includes(e.option.id), h = ((T = e.brandingColors) == null ? void 0 : T.primaryColor) || r.palette.primary.plainColor, A = r.palette.primary.onPrimary, C = s ? A : o.colorSchemes.light.textColor, S = e.option.votes, b = e.totalVotes > 0 ? S / e.totalVotes * 100 : 0;
1826
+ var C;
1827
+ const n = mt(), [a, l] = U(0), o = ve(), r = D(), c = re().sm, m = fe(), f = re().xs, u = Te(), d = e.optionsImages.get(e.option.id), s = e.selectedOptions.includes(e.option.id), h = ((C = e.brandingColors) == null ? void 0 : C.primaryColor) || r.palette.primary.plainColor, A = r.palette.primary.onPrimary, P = s ? A : o.colorSchemes.light.textColor, S = e.option.votes, b = e.totalVotes > 0 ? S / e.totalVotes * 100 : 0;
1826
1828
  ke(() => {
1827
- const z = setTimeout(() => {
1829
+ const R = setTimeout(() => {
1828
1830
  l(b);
1829
1831
  }, 100);
1830
- return () => clearTimeout(z);
1832
+ return () => clearTimeout(R);
1831
1833
  }, [b]);
1832
- const R = () => d ? /* @__PURE__ */ x(v, { children: [
1834
+ const B = () => d ? /* @__PURE__ */ x(v, { children: [
1833
1835
  /* @__PURE__ */ t(
1834
1836
  i,
1835
1837
  {
@@ -1907,7 +1909,7 @@ const Kt = (e, n) => {
1907
1909
  lineHeight: "24px",
1908
1910
  letterSpacing: "0.46px",
1909
1911
  textAlign: "center",
1910
- color: C,
1912
+ color: P,
1911
1913
  px: u["2xs"]
1912
1914
  },
1913
1915
  children: e.option.title
@@ -2014,7 +2016,7 @@ const Kt = (e, n) => {
2014
2016
  fontSize: "0.935em",
2015
2017
  lineHeight: "16px",
2016
2018
  letterSpacing: "0.46px",
2017
- color: C,
2019
+ color: P,
2018
2020
  flex: 1,
2019
2021
  minWidth: 0,
2020
2022
  wordBreak: "break-word",
@@ -2059,7 +2061,7 @@ const Kt = (e, n) => {
2059
2061
  }
2060
2062
  }
2061
2063
  ),
2062
- R()
2064
+ B()
2063
2065
  ]
2064
2066
  },
2065
2067
  e.option.id
@@ -2282,18 +2284,18 @@ const Kt = (e, n) => {
2282
2284
  }
2283
2285
  );
2284
2286
  }, dn = (e) => {
2285
- var A, C, S, b;
2287
+ var A, P, S, b;
2286
2288
  const n = Ue(
2287
2289
  {
2288
2290
  images: e.poll.images,
2289
2291
  imagePlaceholder: e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : ""
2290
2292
  },
2291
2293
  G.STANDARD
2292
- ), { optionsLayout: a } = Fe(Be), { t: l } = O(), o = ((A = e.poll.branding) == null ? void 0 : A.colors) || null, c = Q() ? ((C = e.poll.branding) == null ? void 0 : C.images.mobileLogo) || ((S = e.poll.branding) == null ? void 0 : S.images.mainLogo) || "" : ((b = e.poll.branding) == null ? void 0 : b.images.mainLogo) || "", m = e.imagePosition || "left", f = Oe(e.poll.options), u = (o == null ? void 0 : o.contentColor) || D().textColor, d = Te(), s = rn({
2294
+ ), { optionsLayout: a } = Fe(Be), { t: l } = O(), o = ((A = e.poll.branding) == null ? void 0 : A.colors) || null, c = Q() ? ((P = e.poll.branding) == null ? void 0 : P.images.mobileLogo) || ((S = e.poll.branding) == null ? void 0 : S.images.mainLogo) || "" : ((b = e.poll.branding) == null ? void 0 : b.images.mainLogo) || "", m = e.imagePosition || "left", f = Oe(e.poll.options), u = (o == null ? void 0 : o.contentColor) || D().textColor, d = Te(), s = rn({
2293
2295
  spacingScale: d,
2294
2296
  textColor: u
2295
2297
  }), h = () => {
2296
- var R, T, z, B, P;
2298
+ var B, C, R, V, T;
2297
2299
  return /* @__PURE__ */ t(v, { children: e.isUnauthorized ? /* @__PURE__ */ x(v, { children: [
2298
2300
  /* @__PURE__ */ t(
2299
2301
  nt,
@@ -2308,7 +2310,7 @@ const Kt = (e, n) => {
2308
2310
  {
2309
2311
  brandingLogo: c,
2310
2312
  textColor: u,
2311
- label: ((P = e.poll.labels) == null ? void 0 : P.sponsor) || null
2313
+ label: ((T = e.poll.labels) == null ? void 0 : T.sponsor) || null
2312
2314
  }
2313
2315
  ) : /* @__PURE__ */ t(v, {})
2314
2316
  ] }) : /* @__PURE__ */ x(v, { children: [
@@ -2325,10 +2327,10 @@ const Kt = (e, n) => {
2325
2327
  lt,
2326
2328
  {
2327
2329
  options: e.poll.options,
2328
- selectedOptions: ((R = e.userVote) == null ? void 0 : R.optionIds) || [],
2330
+ selectedOptions: ((B = e.userVote) == null ? void 0 : B.optionIds) || [],
2329
2331
  optionsLayout: a ?? "twoByTwo",
2330
2332
  optionsImages: f,
2331
- brandingColors: ((T = e.poll.branding) == null ? void 0 : T.colors) || null
2333
+ brandingColors: ((C = e.poll.branding) == null ? void 0 : C.colors) || null
2332
2334
  }
2333
2335
  )
2334
2336
  ] }) }) }),
@@ -2344,7 +2346,7 @@ const Kt = (e, n) => {
2344
2346
  {
2345
2347
  brandingLogo: c,
2346
2348
  textColor: u,
2347
- label: ((z = e.poll.labels) == null ? void 0 : z.sponsor) || null
2349
+ label: ((R = e.poll.labels) == null ? void 0 : R.sponsor) || null
2348
2350
  }
2349
2351
  ) }) : /* @__PURE__ */ t(v, {}),
2350
2352
  /* @__PURE__ */ x(
@@ -2386,7 +2388,7 @@ const Kt = (e, n) => {
2386
2388
  {
2387
2389
  brandingLogo: c,
2388
2390
  textColor: u,
2389
- label: ((B = e.poll.labels) == null ? void 0 : B.sponsor) || null
2391
+ label: ((V = e.poll.labels) == null ? void 0 : V.sponsor) || null
2390
2392
  }
2391
2393
  ) }) : /* @__PURE__ */ t(v, {})
2392
2394
  ] }) })
@@ -2556,24 +2558,24 @@ const Kt = (e, n) => {
2556
2558
  p: e.spacingScale.lg
2557
2559
  }
2558
2560
  }), mn = (e) => {
2559
- var g, V, k, te;
2561
+ var g, z, k, te;
2560
2562
  const n = ve(), a = Q(), l = Dt(), o = Me(), r = e.defaultImagePlaceholderUrl ? e.defaultImagePlaceholderUrl : a ? Ve : ze, c = Ue(
2561
2563
  {
2562
2564
  images: e.poll.images,
2563
2565
  imagePlaceholder: r
2564
2566
  },
2565
2567
  G.SPLIT
2566
- ), m = Oe(e.poll.options), { t: f } = O(), { optionsLayout: u } = Fe(Be), d = ((g = e.poll.branding) == null ? void 0 : g.colors) || null, s = D().textPrimary, h = (d == null ? void 0 : d.secondaryColor) || D().textSecondary, A = D().secondaryContainer, C = fe().primary, S = (d == null ? void 0 : d.backgroundColor) || D().surfaceVariant, b = D().surface, R = D().onSurface, T = re(), z = D().textColor, B = Te(), P = a ? ((V = e.poll.branding) == null ? void 0 : V.images.mobileLogo) || ((k = e.poll.branding) == null ? void 0 : k.images.mainLogo) || "" : ((te = e.poll.branding) == null ? void 0 : te.images.mainLogo) || "", y = gn({
2567
- spacingScale: B,
2568
- borderRadius: T,
2569
- fontFamilyPrimary: C,
2568
+ ), m = Oe(e.poll.options), { t: f } = O(), { optionsLayout: u } = Fe(Be), d = ((g = e.poll.branding) == null ? void 0 : g.colors) || null, s = D().textPrimary, h = (d == null ? void 0 : d.secondaryColor) || D().textSecondary, A = D().secondaryContainer, P = fe().primary, S = (d == null ? void 0 : d.backgroundColor) || D().surfaceVariant, b = D().surface, B = D().onSurface, C = re(), R = D().textColor, V = Te(), T = a ? ((z = e.poll.branding) == null ? void 0 : z.images.mobileLogo) || ((k = e.poll.branding) == null ? void 0 : k.images.mainLogo) || "" : ((te = e.poll.branding) == null ? void 0 : te.images.mainLogo) || "", y = gn({
2569
+ spacingScale: V,
2570
+ borderRadius: C,
2571
+ fontFamilyPrimary: P,
2570
2572
  textPrimary: s,
2571
2573
  secondaryColor: h,
2572
2574
  secondaryContainer: A,
2573
2575
  bgcolor: De(S || ""),
2574
2576
  surfaceColor: b,
2575
- onSurfaceColor: R,
2576
- textColor: z,
2577
+ onSurfaceColor: B,
2578
+ textColor: R,
2577
2579
  darkTextColor: n.colorSchemes.dark.textColor,
2578
2580
  isLarge: o
2579
2581
  }), N = () => {
@@ -2581,7 +2583,7 @@ const Kt = (e, n) => {
2581
2583
  const $ = l ? /* @__PURE__ */ t(
2582
2584
  W,
2583
2585
  {
2584
- brandingLogo: P,
2586
+ brandingLogo: T,
2585
2587
  textColor: (d == null ? void 0 : d.contentColor) || n.colorSchemes.dark.textColor,
2586
2588
  label: ((w = e.poll.labels) == null ? void 0 : w.sponsor) || null
2587
2589
  }
@@ -2608,13 +2610,13 @@ const Kt = (e, n) => {
2608
2610
  i,
2609
2611
  {
2610
2612
  sx: {
2611
- p: B.lg,
2612
- gap: B.lg,
2613
+ p: V.lg,
2614
+ gap: V.lg,
2613
2615
  display: "flex",
2614
2616
  flexDirection: "column",
2615
2617
  backdropFilter: "blur(4px)",
2616
2618
  bgcolor: `rgba(${S ? De(S || "").replace(/[^\d,]/g, "") : ""}, 0.5)`,
2617
- borderRadius: T.sm
2619
+ borderRadius: C.sm
2618
2620
  },
2619
2621
  children: [
2620
2622
  e.poll.alternativeTitle ? /* @__PURE__ */ t(i, { sx: y.alternativeTitleSection, children: /* @__PURE__ */ t(L, { level: "body-lg", sx: y.alternativeTitleText, children: e.poll.alternativeTitle }) }) : /* @__PURE__ */ t(v, {}),
@@ -2636,13 +2638,13 @@ const Kt = (e, n) => {
2636
2638
  {
2637
2639
  id: "poll-desktop-thanks",
2638
2640
  sx: {
2639
- p: B.lg,
2640
- gap: B.lg,
2641
+ p: V.lg,
2642
+ gap: V.lg,
2641
2643
  display: "flex",
2642
2644
  flexDirection: "column",
2643
2645
  backdropFilter: "blur(4px)",
2644
2646
  bgcolor: `rgba(${S ? De(S || "").replace(/[^\d,]/g, "") : ""}, 0.5)`,
2645
- borderRadius: T.sm
2647
+ borderRadius: C.sm
2646
2648
  },
2647
2649
  children: /* @__PURE__ */ t(i, { sx: y.ctaContainer, children: /* @__PURE__ */ t(i, { sx: y.ctaContentWrapper, children: /* @__PURE__ */ x(i, { sx: y.buttonsContainer, children: [
2648
2650
  !e.maxAttemptsReached && /* @__PURE__ */ t(
@@ -2669,11 +2671,11 @@ const Kt = (e, n) => {
2669
2671
  }
2670
2672
  ) : null,
2671
2673
  e.chanceGameContent,
2672
- o && P && /* @__PURE__ */ t(
2674
+ o && T && /* @__PURE__ */ t(
2673
2675
  W,
2674
2676
  {
2675
- brandingLogo: P,
2676
- textColor: (d == null ? void 0 : d.contentColor) || z,
2677
+ brandingLogo: T,
2678
+ textColor: (d == null ? void 0 : d.contentColor) || R,
2677
2679
  label: ((Z = e.poll.labels) == null ? void 0 : Z.sponsor) || null,
2678
2680
  isCentered: !0
2679
2681
  }
@@ -2866,21 +2868,21 @@ const Kt = (e, n) => {
2866
2868
  imagePlaceholder: d
2867
2869
  },
2868
2870
  G.OVERLAY
2869
- ), h = Ft(s), A = Oe(e.poll.options), C = (f == null ? void 0 : f.secondaryColor) || n.colorSchemes.dark.textSecondary, S = n.colorSchemes.dark.secondaryContainer, b = n.colorSchemes.dark.textPrimary, R = n.customFontFamily.light.primary, T = n.customRadius.light.md, z = n.customRadius.light.xl, B = (f == null ? void 0 : f.backgroundColor) || n.colorSchemes.dark.surfaceVariant, P = un({
2871
+ ), h = Ft(s), A = Oe(e.poll.options), P = (f == null ? void 0 : f.secondaryColor) || n.colorSchemes.dark.textSecondary, S = n.colorSchemes.dark.secondaryContainer, b = n.colorSchemes.dark.textPrimary, B = n.customFontFamily.light.primary, C = n.customRadius.light.md, R = n.customRadius.light.xl, V = (f == null ? void 0 : f.backgroundColor) || n.colorSchemes.dark.surfaceVariant, T = un({
2870
2872
  spacingScale: a,
2871
- secondaryColor: C,
2873
+ secondaryColor: P,
2872
2874
  secondaryContainer: S,
2873
2875
  textPrimary: b,
2874
- fontFamilyPrimary: R,
2875
- mdBorderRadius: T,
2876
- xlBorderRadius: z,
2877
- contentBgColor: B,
2876
+ fontFamilyPrimary: B,
2877
+ mdBorderRadius: C,
2878
+ xlBorderRadius: R,
2879
+ contentBgColor: V,
2878
2880
  onSurfaceColor: n.colorSchemes.dark.onSurface,
2879
2881
  surfaceVariantColor: n.colorSchemes.dark.surfaceVariant,
2880
2882
  darkTextColor: n.colorSchemes.dark.textColor
2881
2883
  }), y = () => {
2882
- var N, g, V;
2883
- return /* @__PURE__ */ x(i, { sx: P.mainContentWrapper, children: [
2884
+ var N, g, z;
2885
+ return /* @__PURE__ */ x(i, { sx: T.mainContentWrapper, children: [
2884
2886
  e.isUnauthorized ? /* @__PURE__ */ t(v, { children: /* @__PURE__ */ t(
2885
2887
  nt,
2886
2888
  {
@@ -2888,8 +2890,8 @@ const Kt = (e, n) => {
2888
2890
  title: l("common.authentication.accessRequired"),
2889
2891
  message: l("common.authentication.invalidOrMissingAuth")
2890
2892
  }
2891
- ) }) : /* @__PURE__ */ t(i, { sx: P.resultsContainer, children: /* @__PURE__ */ x(i, { sx: P.resultsWrapper, children: [
2892
- e.poll.alternativeTitle ? /* @__PURE__ */ t(i, { sx: P.alternativeTitleSection, children: /* @__PURE__ */ t(L, { level: "body-lg", sx: P.alternativeTitleText, children: e.poll.alternativeTitle }) }) : /* @__PURE__ */ t(v, {}),
2893
+ ) }) : /* @__PURE__ */ t(i, { sx: T.resultsContainer, children: /* @__PURE__ */ x(i, { sx: T.resultsWrapper, children: [
2894
+ e.poll.alternativeTitle ? /* @__PURE__ */ t(i, { sx: T.alternativeTitleSection, children: /* @__PURE__ */ t(L, { level: "body-lg", sx: T.alternativeTitleText, children: e.poll.alternativeTitle }) }) : /* @__PURE__ */ t(v, {}),
2893
2895
  /* @__PURE__ */ t(i, { sx: { width: "100%" }, children: /* @__PURE__ */ t(
2894
2896
  lt,
2895
2897
  {
@@ -2901,18 +2903,18 @@ const Kt = (e, n) => {
2901
2903
  }
2902
2904
  ) })
2903
2905
  ] }) }),
2904
- (!e.maxAttemptsReached || e.additionalCTA !== void 0) && /* @__PURE__ */ t(i, { sx: P.ctaSection, children: /* @__PURE__ */ x(i, { sx: P.buttonsContainer, children: [
2905
- !e.maxAttemptsReached && /* @__PURE__ */ t(He, { sx: P.playAgainButton, onClick: e.voteAgain, children: /* @__PURE__ */ x(i, { sx: P.playAgainButtonContent, children: [
2906
- /* @__PURE__ */ t(et, { sx: P.playAgainIcon }),
2907
- /* @__PURE__ */ t(L, { sx: P.playAgainText, children: l("poll.buttons.voteAgain") })
2906
+ (!e.maxAttemptsReached || e.additionalCTA !== void 0) && /* @__PURE__ */ t(i, { sx: T.ctaSection, children: /* @__PURE__ */ x(i, { sx: T.buttonsContainer, children: [
2907
+ !e.maxAttemptsReached && /* @__PURE__ */ t(He, { sx: T.playAgainButton, onClick: e.voteAgain, children: /* @__PURE__ */ x(i, { sx: T.playAgainButtonContent, children: [
2908
+ /* @__PURE__ */ t(et, { sx: T.playAgainIcon }),
2909
+ /* @__PURE__ */ t(L, { sx: T.playAgainText, children: l("poll.buttons.voteAgain") })
2908
2910
  ] }) }),
2909
2911
  /* @__PURE__ */ t(
2910
2912
  pe,
2911
2913
  {
2912
2914
  additionalCTA: e.additionalCTA,
2913
- buttonStyle: P.additionalCTAButton,
2914
- buttonContentStyle: P.additionalCTAButtonContent,
2915
- textStyle: P.additionalCTAText
2915
+ buttonStyle: T.additionalCTAButton,
2916
+ buttonContentStyle: T.additionalCTAButtonContent,
2917
+ textStyle: T.additionalCTAText
2916
2918
  }
2917
2919
  )
2918
2920
  ] }) }),
@@ -2922,7 +2924,7 @@ const Kt = (e, n) => {
2922
2924
  {
2923
2925
  brandingLogo: u,
2924
2926
  textColor: n.colorSchemes.dark.textColor,
2925
- label: ((V = e.poll.labels) == null ? void 0 : V.sponsor) || null
2927
+ label: ((z = e.poll.labels) == null ? void 0 : z.sponsor) || null
2926
2928
  }
2927
2929
  )
2928
2930
  ] });
@@ -3243,7 +3245,7 @@ function we(e) {
3243
3245
  }
3244
3246
  const Ln = (e) => {
3245
3247
  var it, at;
3246
- const [n, a] = E([]), [l, o] = E(!1), [r, c] = E(!1), [m, f] = E(!1), [u, d] = E(!1), [s, h] = E(!1), [A, C] = E(!1), [S, b] = E(!1), [R, T] = E(!1), [z, B] = E(!1), [P, y] = E(!1), N = Mt(!1), { poll: g, setPoll: V } = Kt(e.entityId, e.sdk), {
3248
+ const [n, a] = U([]), [l, o] = U(!1), [r, c] = U(!1), [m, f] = U(!1), [u, d] = U(!1), [s, h] = U(!1), [A, P] = U(!1), [S, b] = U(!1), [B, C] = U(!1), [R, V] = U(!1), [T, y] = U(!1), N = Mt(!1), { poll: g, setPoll: z } = Kt(e.entityId, e.sdk), {
3247
3249
  myVote: k,
3248
3250
  setMyVote: te,
3249
3251
  isUnauthorized: $,
@@ -3348,16 +3350,16 @@ const Ln = (e) => {
3348
3350
  a(I);
3349
3351
  else {
3350
3352
  const F = I[0];
3351
- a((U) => U.includes(F) ? U.filter((qe) => qe !== F) : U.length < ue ? [...U, F] : U);
3353
+ a((E) => E.includes(F) ? E.filter((qe) => qe !== F) : E.length < ue ? [...E, F] : E);
3352
3354
  }
3353
3355
  }, Ae = async () => {
3354
3356
  var I;
3355
- if (Y.length > 0 && !z) {
3356
- T(!0);
3357
+ if (Y.length > 0 && !R) {
3358
+ C(!0);
3357
3359
  return;
3358
3360
  }
3359
3361
  if (((I = e.leads) == null ? void 0 : I.position) === "after" && g.authRequirement === "LEAD" && !s) {
3360
- C(!0);
3362
+ P(!0);
3361
3363
  return;
3362
3364
  }
3363
3365
  await Se();
@@ -3376,7 +3378,7 @@ const Ln = (e) => {
3376
3378
  y(!0);
3377
3379
  return;
3378
3380
  }
3379
- d(!0), await me(Y), B(!0), await Se(), d(!1), T(!1);
3381
+ d(!0), await me(Y), V(!0), await Se(), d(!1), C(!1);
3380
3382
  }, Se = async () => {
3381
3383
  c(!0);
3382
3384
  try {
@@ -3384,21 +3386,21 @@ const Ln = (e) => {
3384
3386
  e.entityId,
3385
3387
  n
3386
3388
  ), F = { ...g };
3387
- F.options = g.options.map((U) => n.includes(U.id) ? {
3388
- ...U,
3389
- votes: U.votes + 1
3390
- } : U), F.totalVotes = (g.totalVotes || 0) + n.length, e.aggregateTranslatedVotes && await se(), V(F), te(I), o(!0);
3389
+ F.options = g.options.map((E) => n.includes(E.id) ? {
3390
+ ...E,
3391
+ votes: E.votes + 1
3392
+ } : E), F.totalVotes = (g.totalVotes || 0) + n.length, e.aggregateTranslatedVotes && await se(), z(F), te(I), o(!0);
3391
3393
  } catch (I) {
3392
3394
  console.error("[poll-vote] vote failed", I);
3393
- const { code: F, message: U } = Ot(I, e.sdk);
3394
- F === 401 || F === 403 ? ce(!0) : (M(!0), Z(U));
3395
+ const { code: F, message: E } = Ot(I, e.sdk);
3396
+ F === 401 || F === 403 ? ce(!0) : (M(!0), Z(E));
3395
3397
  } finally {
3396
3398
  c(!1);
3397
3399
  }
3398
3400
  }, Ie = async () => {
3399
- h(!0), d(!0), await Se(), d(!1), C(!1);
3401
+ h(!0), d(!0), await Se(), d(!1), P(!1);
3400
3402
  }, Pe = () => {
3401
- o(!1), a([]), d(!1), h(!1), C(!1), T(!1), y(!1);
3403
+ o(!1), a([]), d(!1), h(!1), P(!1), C(!1), y(!1);
3402
3404
  }, ot = (I) => {
3403
3405
  var F;
3404
3406
  return {
@@ -3406,10 +3408,10 @@ const Ln = (e) => {
3406
3408
  checked: ye,
3407
3409
  onChange: be,
3408
3410
  labels: (F = e.consents) == null ? void 0 : F.labels,
3409
- showError: P
3411
+ showError: T
3410
3412
  };
3411
3413
  }, Ct = () => {
3412
- const I = ot(j), F = q ? H : void 0, U = Y.length > 0 && !z;
3414
+ const I = ot(j), F = q ? H : void 0, E = Y.length > 0 && !R;
3413
3415
  return e.template === G.OVERLAY ? /* @__PURE__ */ t(
3414
3416
  tn,
3415
3417
  {
@@ -3428,7 +3430,7 @@ const Ln = (e) => {
3428
3430
  leadConsents: F,
3429
3431
  applyConsentGate: S,
3430
3432
  isSubmitting: u,
3431
- hasAfterConsents: U,
3433
+ hasAfterConsents: E,
3432
3434
  startVoting: ae,
3433
3435
  signInRequired: ie,
3434
3436
  signInCTA: e.signInCTA
@@ -3452,7 +3454,7 @@ const Ln = (e) => {
3452
3454
  leadConsents: F,
3453
3455
  applyConsentGate: S,
3454
3456
  isSubmitting: u,
3455
- hasAfterConsents: U,
3457
+ hasAfterConsents: E,
3456
3458
  startVoting: ae,
3457
3459
  signInRequired: ie,
3458
3460
  signInCTA: e.signInCTA
@@ -3475,14 +3477,14 @@ const Ln = (e) => {
3475
3477
  leadConsents: F,
3476
3478
  applyConsentGate: S,
3477
3479
  isSubmitting: u,
3478
- hasAfterConsents: U,
3480
+ hasAfterConsents: E,
3479
3481
  startVoting: ae,
3480
3482
  signInRequired: ie,
3481
3483
  signInCTA: e.signInCTA
3482
3484
  }
3483
3485
  );
3484
3486
  };
3485
- if (R && Y.length > 0) {
3487
+ if (B && Y.length > 0) {
3486
3488
  const I = {
3487
3489
  poll: g,
3488
3490
  sdk: e.sdk,
@@ -3543,7 +3545,7 @@ const Ln = (e) => {
3543
3545
  infoPage: qe,
3544
3546
  variant: e.chanceGameVariant
3545
3547
  }
3546
- ) }) : void 0, U = p ? /* @__PURE__ */ t(ct, { entityId: p, sdk: e.sdk, children: (qe) => /* @__PURE__ */ t(
3548
+ ) }) : void 0, E = p ? /* @__PURE__ */ t(ct, { entityId: p, sdk: e.sdk, children: (qe) => /* @__PURE__ */ t(
3547
3549
  st,
3548
3550
  {
3549
3551
  infoPage: qe,
@@ -3580,7 +3582,7 @@ const Ln = (e) => {
3580
3582
  isUnauthorized: $,
3581
3583
  additionalCTA: e.additionalCTA,
3582
3584
  rulesDisplay: e.rulesDisplay,
3583
- chanceGameContent: U
3585
+ chanceGameContent: E
3584
3586
  }
3585
3587
  ) : /* @__PURE__ */ t(
3586
3588
  mn,
@@ -3595,7 +3597,7 @@ const Ln = (e) => {
3595
3597
  isUnauthorized: $,
3596
3598
  additionalCTA: e.additionalCTA,
3597
3599
  rulesDisplay: e.rulesDisplay,
3598
- chanceGameContent: U
3600
+ chanceGameContent: E
3599
3601
  }
3600
3602
  );
3601
3603
  }