@cuemath/leap 2.8.36-beta-0.1 → 2.8.36-hg1

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.
Files changed (115) hide show
  1. package/dist/assets/lottie/lottie.js +6 -0
  2. package/dist/assets/lottie/lottie.js.map +1 -1
  3. package/dist/features/analytics-events/whitelist-events.js +13 -15
  4. package/dist/features/analytics-events/whitelist-events.js.map +1 -1
  5. package/dist/features/circle-games/game-launcher/comps/card-container/card-container-styled.js +53 -0
  6. package/dist/features/circle-games/game-launcher/comps/card-container/card-container-styled.js.map +1 -0
  7. package/dist/features/circle-games/game-launcher/comps/card-container/card-container.js +24 -0
  8. package/dist/features/circle-games/game-launcher/comps/card-container/card-container.js.map +1 -0
  9. package/dist/features/circle-games/game-launcher/comps/card-container/constants.js +7 -0
  10. package/dist/features/circle-games/game-launcher/comps/card-container/constants.js.map +1 -0
  11. package/dist/features/circle-games/game-launcher/comps/segmented-game-card/constants.js +6 -6
  12. package/dist/features/circle-games/game-launcher/comps/segmented-game-card/constants.js.map +1 -1
  13. package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card-styled.js +29 -73
  14. package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card-styled.js.map +1 -1
  15. package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.js +87 -85
  16. package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.js.map +1 -1
  17. package/dist/features/circle-games/game-launcher/comps/tables-card/constants.js +20 -0
  18. package/dist/features/circle-games/game-launcher/comps/tables-card/constants.js.map +1 -0
  19. package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode-styled.js +24 -0
  20. package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode-styled.js.map +1 -0
  21. package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode.js +54 -0
  22. package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode.js.map +1 -0
  23. package/dist/features/circle-games/game-launcher/comps/tables-card/table-star/table-star-styled.js +11 -0
  24. package/dist/features/circle-games/game-launcher/comps/tables-card/table-star/table-star-styled.js.map +1 -0
  25. package/dist/features/circle-games/game-launcher/comps/tables-card/table-star/table-star.js +16 -0
  26. package/dist/features/circle-games/game-launcher/comps/tables-card/table-star/table-star.js.map +1 -0
  27. package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card-styled.js +161 -0
  28. package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card-styled.js.map +1 -0
  29. package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js +209 -0
  30. package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js.map +1 -0
  31. package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js +25 -15
  32. package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js.map +1 -1
  33. package/dist/features/circle-games/game-launcher/game-launcher.js +103 -61
  34. package/dist/features/circle-games/game-launcher/game-launcher.js.map +1 -1
  35. package/dist/features/circle-games/games/web-view/enums/project-type-enum.js +1 -1
  36. package/dist/features/circle-games/games/web-view/enums/project-type-enum.js.map +1 -1
  37. package/dist/features/circle-games/games/web-view/web-view-types.js.map +1 -1
  38. package/dist/features/circle-games/games/web-view/web-view.js +69 -82
  39. package/dist/features/circle-games/games/web-view/web-view.js.map +1 -1
  40. package/dist/features/communication/pub-sub/constants.js +1 -2
  41. package/dist/features/communication/pub-sub/constants.js.map +1 -1
  42. package/dist/features/milestone/milestone-list-container/milestone-list-container.js +117 -130
  43. package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
  44. package/dist/features/post-game-stats/accuracy/accuracy-styled.js +17 -16
  45. package/dist/features/post-game-stats/accuracy/accuracy-styled.js.map +1 -1
  46. package/dist/features/post-game-stats/clock/clock-styled.js +11 -10
  47. package/dist/features/post-game-stats/clock/clock-styled.js.map +1 -1
  48. package/dist/features/post-game-stats/points/points.js +25 -24
  49. package/dist/features/post-game-stats/points/points.js.map +1 -1
  50. package/dist/features/post-game-stats/post-game-stats-styled.js +1 -1
  51. package/dist/features/post-game-stats/post-game-stats-styled.js.map +1 -1
  52. package/dist/features/post-game-stats/streak/streak-styled.js +18 -17
  53. package/dist/features/post-game-stats/streak/streak-styled.js.map +1 -1
  54. package/dist/features/trial-session/comps/trial-circle-game/constants.js.map +1 -1
  55. package/dist/features/trial-session/comps/trial-circle-game/trial-circle-game.js.map +1 -1
  56. package/dist/features/ui/grade-selector/grade-tab.js +15 -15
  57. package/dist/features/ui/grade-selector/grade-tab.js.map +1 -1
  58. package/dist/features/ui/tab/tab-styled.js +8 -7
  59. package/dist/features/ui/tab/tab-styled.js.map +1 -1
  60. package/dist/features/ui/tab/tab.js +31 -36
  61. package/dist/features/ui/tab/tab.js.map +1 -1
  62. package/dist/features/ui/theme/tab.js +3 -3
  63. package/dist/features/ui/theme/tab.js.map +1 -1
  64. package/dist/index.d.ts +79 -151
  65. package/dist/index.js +343 -352
  66. package/dist/index.js.map +1 -1
  67. package/dist/static/advance-mode-segment-lottie.51ff6707.json +1 -0
  68. package/dist/static/infinite-button-bg.5909225e.json +1 -0
  69. package/dist/static/infinite-button-symbol.aa31350c.json +1 -0
  70. package/dist/static/random-mode-segment-lottie.79cf1c07.json +1 -0
  71. package/dist/static/sequence-mode-segment-lottie.11ac49e9.json +1 -0
  72. package/dist/static/table-mode-reveal.b44a82c3.json +1 -0
  73. package/package.json +1 -1
  74. package/dist/assets/line-icons/icons/sheet.js +0 -54
  75. package/dist/assets/line-icons/icons/sheet.js.map +0 -1
  76. package/dist/features/circle-games/games/web-view/enums/project-ids-enum.js +0 -14
  77. package/dist/features/circle-games/games/web-view/enums/project-ids-enum.js.map +0 -1
  78. package/dist/features/milestone/milestone-resources/resources-assign/added-resource-and-filters.js +0 -188
  79. package/dist/features/milestone/milestone-resources/resources-assign/added-resource-and-filters.js.map +0 -1
  80. package/dist/features/milestone/milestone-resources/resources-assign/api/get-resource.js +0 -11
  81. package/dist/features/milestone/milestone-resources/resources-assign/api/get-resource.js.map +0 -1
  82. package/dist/features/milestone/milestone-resources/resources-assign/api/goal-resource-assign.js +0 -9
  83. package/dist/features/milestone/milestone-resources/resources-assign/api/goal-resource-assign.js.map +0 -1
  84. package/dist/features/milestone/milestone-resources/resources-assign/api/lpar-resource-assign.js +0 -9
  85. package/dist/features/milestone/milestone-resources/resources-assign/api/lpar-resource-assign.js.map +0 -1
  86. package/dist/features/milestone/milestone-resources/resources-assign/comps/filter-item/filter-item-styled.js +0 -19
  87. package/dist/features/milestone/milestone-resources/resources-assign/comps/filter-item/filter-item-styled.js.map +0 -1
  88. package/dist/features/milestone/milestone-resources/resources-assign/comps/filter-item/filter-item.js +0 -47
  89. package/dist/features/milestone/milestone-resources/resources-assign/comps/filter-item/filter-item.js.map +0 -1
  90. package/dist/features/milestone/milestone-resources/resources-assign/comps/resource-item/resource-item-styled.js +0 -22
  91. package/dist/features/milestone/milestone-resources/resources-assign/comps/resource-item/resource-item-styled.js.map +0 -1
  92. package/dist/features/milestone/milestone-resources/resources-assign/comps/resource-item/resource-item.js +0 -60
  93. package/dist/features/milestone/milestone-resources/resources-assign/comps/resource-item/resource-item.js.map +0 -1
  94. package/dist/features/milestone/milestone-resources/resources-assign/comps/resource-item/utils.js +0 -6
  95. package/dist/features/milestone/milestone-resources/resources-assign/comps/resource-item/utils.js.map +0 -1
  96. package/dist/features/milestone/milestone-resources/resources-assign/constant.js +0 -6
  97. package/dist/features/milestone/milestone-resources/resources-assign/constant.js.map +0 -1
  98. package/dist/features/milestone/milestone-resources/resources-assign/resource-assign-analytics-events.js +0 -19
  99. package/dist/features/milestone/milestone-resources/resources-assign/resource-assign-analytics-events.js.map +0 -1
  100. package/dist/features/milestone/milestone-resources/resources-assign/resource-items/no-resource-screen.js +0 -32
  101. package/dist/features/milestone/milestone-resources/resources-assign/resource-items/no-resource-screen.js.map +0 -1
  102. package/dist/features/milestone/milestone-resources/resources-assign/resource-items/resource-items-styled.js +0 -19
  103. package/dist/features/milestone/milestone-resources/resources-assign/resource-items/resource-items-styled.js.map +0 -1
  104. package/dist/features/milestone/milestone-resources/resources-assign/resource-items/resource-items.js +0 -85
  105. package/dist/features/milestone/milestone-resources/resources-assign/resource-items/resource-items.js.map +0 -1
  106. package/dist/features/milestone/milestone-resources/resources-assign/resources-assign-styled.js +0 -63
  107. package/dist/features/milestone/milestone-resources/resources-assign/resources-assign-styled.js.map +0 -1
  108. package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js +0 -232
  109. package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js.map +0 -1
  110. package/dist/features/milestone/milestone-resources/resources-assign/utils.js +0 -12
  111. package/dist/features/milestone/milestone-resources/resources-assign/utils.js.map +0 -1
  112. package/dist/features/ui/inputs/searchable-input/searchable-input-styled.js +0 -28
  113. package/dist/features/ui/inputs/searchable-input/searchable-input-styled.js.map +0 -1
  114. package/dist/features/ui/inputs/searchable-input/searchable-input.js +0 -101
  115. package/dist/features/ui/inputs/searchable-input/searchable-input.js.map +0 -1
@@ -1,116 +1,118 @@
1
- import { jsxs as T, jsx as e } from "react/jsx-runtime";
2
- import k from "lottie-web";
3
- import { memo as v, forwardRef as H, useRef as L, useState as C, useCallback as f, useImperativeHandle as w, useMemo as I, useEffect as F } from "react";
4
- import x from "../../../../../assets/line-icons/icons/check.js";
5
- import { LOTTIE as G } from "../../../../../assets/lottie/lottie.js";
6
- import { fetchLottie as j } from "../../../../ui/lottie-animation/helper.js";
7
- import O from "../../../../ui/lottie-animation/lottie-animation.js";
8
- import { SegmentedCard as U, ExtendedFlexView as B, AnimatedLabel as D, SegmentedCardWrapper as N, CircularProgressLottieContainer as q, SegmentLeft as z, SegmentRight as J, SegmentBottom as K, SegmentContainer as Q, SegmentContentContainer as V, SegmentAssetContainer as X, SegmentOverlay as Y, IconWrapper as Z } from "./segmented-game-card-styled.js";
1
+ import { jsxs as I, jsx as t } from "react/jsx-runtime";
2
+ import v from "lottie-web";
3
+ import { memo as H, forwardRef as w, useRef as T, useState as h, useCallback as c, useImperativeHandle as F, useMemo as E, useEffect as G } from "react";
4
+ import $ from "../../../../../assets/line-icons/icons/check.js";
5
+ import { LOTTIE as j } from "../../../../../assets/lottie/lottie.js";
6
+ import { fetchLottie as O } from "../../../../ui/lottie-animation/helper.js";
7
+ import U from "../../../../ui/lottie-animation/lottie-animation.js";
8
+ import { CardContainer as x } from "../card-container/card-container.js";
9
+ import { CircularProgressLottieContainer as B, SegmentLeft as D, SegmentRight as N, SegmentBottom as q, SegmentContainer as z, SegmentContentContainer as J, SegmentAssetContainer as K, SegmentOverlay as Q, IconWrapper as X } from "./segmented-game-card-styled.js";
9
10
  const S = ({
10
- segmentType: t,
11
+ segmentType: e,
11
12
  isCompleted: i,
12
13
  card: m,
13
14
  name: l,
14
15
  onMouseEnter: s
15
16
  }) => {
16
- const c = L(null);
17
- F(() => {
17
+ const a = T(null);
18
+ G(() => {
18
19
  let o = null;
19
20
  return (async () => {
20
- const d = await j(m);
21
- o = k.loadAnimation({
22
- container: c.current,
21
+ const p = await O(m);
22
+ o = v.loadAnimation({
23
+ container: a.current,
23
24
  renderer: "canvas",
24
25
  loop: !0,
25
26
  autoplay: !0,
26
- animationData: d
27
+ animationData: p
27
28
  });
28
29
  })(), () => o == null ? void 0 : o.destroy();
29
30
  }, [m]);
30
- const a = f(() => s(l), [s, l]);
31
- return /* @__PURE__ */ e(Q, { children: /* @__PURE__ */ T(V, { $segmentType: t, onMouseEnter: a, children: [
32
- /* @__PURE__ */ e(X, { ref: c, $segmentType: t }),
33
- i && /* @__PURE__ */ e(Y, { $segmentType: t, children: /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(x, { color: "#fff", height: 40, width: 40 }) }) })
31
+ const d = c(() => s(l), [s, l]);
32
+ return /* @__PURE__ */ t(z, { children: /* @__PURE__ */ I(J, { $segmentType: e, onMouseEnter: d, children: [
33
+ /* @__PURE__ */ t(K, { ref: a, $segmentType: e }),
34
+ i && /* @__PURE__ */ t(Q, { $segmentType: e, children: /* @__PURE__ */ t(X, { children: /* @__PURE__ */ t($, { color: "#fff", height: 40, width: 40 }) }) })
34
35
  ] }) });
35
- }, ee = ({ data: t, label: i, initialValue: m = 0, value: l, maxValue: s = 1 }, c) => {
36
- const a = L(null), o = L(null), [u, d] = C(i), [A, y] = C(!1), [b, P] = C("WHITE_T_87"), R = u !== i, g = f((n) => {
37
- d(n);
38
- }, []), _ = f(() => {
39
- d(i);
40
- }, [i]), h = (n) => {
41
- var r, p;
42
- (p = (r = t[n]) == null ? void 0 : r.onPress) == null || p.call(r);
43
- }, $ = f((n) => {
36
+ }, Y = ({ data: e, label: i, initialValue: m = 0, value: l, maxValue: s = 1 }, a) => {
37
+ const d = T(null), o = T(null), [u, p] = h(i), [L, y] = h(!1), [R, P] = h("WHITE_T_87"), _ = u !== i, C = c((n) => {
38
+ p(n);
39
+ }, []), b = c(() => {
40
+ p(i);
41
+ }, [i]), g = c(
42
+ (n) => {
43
+ var r, f;
44
+ (f = (r = e[n]) == null ? void 0 : r.onPress) == null || f.call(r);
45
+ },
46
+ [e]
47
+ ), M = c((n) => {
44
48
  y(!0), P(n);
45
49
  }, []);
46
- w(c, () => ({
47
- labelRef: a,
50
+ F(a, () => ({
51
+ labelRef: d,
48
52
  segmentedCardWrapperRef: o,
49
- startLabelAnimation: $
53
+ startLabelAnimation: M
50
54
  }));
51
- const E = I(() => {
55
+ const A = E(() => {
52
56
  if (s <= 0)
53
57
  return;
54
- const n = 92, r = n / s, p = Math.min(r * m, n), W = Math.min(r * l + 1, n);
55
- return [p, W];
56
- }, [m, s, l]), M = I(
58
+ const n = 92, r = n / s, f = Math.min(r * m, n), k = Math.min(r * l + 1, n);
59
+ return [f, k];
60
+ }, [m, s, l]), W = E(
57
61
  () => ({
58
62
  renderer: "canvas",
59
63
  autoplay: !0,
60
64
  loop: !1,
61
- initialSegment: E
65
+ initialSegment: A
62
66
  }),
63
- [E]
67
+ [A]
64
68
  );
65
- return /* @__PURE__ */ T(U, { children: [
66
- /* @__PURE__ */ e(B, { $position: "absolute", children: /* @__PURE__ */ e(
67
- D,
68
- {
69
- ref: a,
70
- $renderAs: "ac3",
71
- $align: "center",
72
- $color: A ? b : R ? "WHITE_T_87" : "WHITE_T_60",
73
- isAnimated: A,
74
- children: u
75
- }
76
- ) }),
77
- /* @__PURE__ */ T(N, { ref: o, onMouseLeave: _, children: [
78
- /* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(O, { src: G.LEVELUP_RINGS, settings: M }) }),
79
- /* @__PURE__ */ e(z, { onClick: () => h(0), children: /* @__PURE__ */ e(
80
- S,
81
- {
82
- segmentType: "left",
83
- card: t[0].card,
84
- name: t[0].name,
85
- isCompleted: t[0].isCompleted,
86
- onMouseEnter: g
87
- }
88
- ) }),
89
- /* @__PURE__ */ e(J, { onClick: () => h(1), children: /* @__PURE__ */ e(
90
- S,
91
- {
92
- segmentType: "right",
93
- card: t[1].card,
94
- name: t[1].name,
95
- isCompleted: t[1].isCompleted,
96
- onMouseEnter: g
97
- }
98
- ) }),
99
- /* @__PURE__ */ e(K, { onClick: () => h(2), children: /* @__PURE__ */ e(
100
- S,
101
- {
102
- segmentType: "bottom",
103
- card: t[2].card,
104
- name: t[2].name,
105
- isCompleted: t[2].isCompleted,
106
- onMouseEnter: g
107
- }
108
- ) })
109
- ] })
110
- ] });
111
- }, ce = v(H(ee));
69
+ return /* @__PURE__ */ I(
70
+ x,
71
+ {
72
+ ref: o,
73
+ labelRef: d,
74
+ label: u,
75
+ isAnimated: L,
76
+ onMouseLeave: b,
77
+ labelColor: L ? R : _ ? "WHITE_T_87" : "WHITE_T_60",
78
+ children: [
79
+ /* @__PURE__ */ t(B, { children: /* @__PURE__ */ t(U, { src: j.LEVELUP_RINGS, settings: W }) }),
80
+ /* @__PURE__ */ t(D, { onClick: () => g(0), children: /* @__PURE__ */ t(
81
+ S,
82
+ {
83
+ segmentType: "left",
84
+ card: e[0].card,
85
+ name: e[0].name,
86
+ isCompleted: e[0].isCompleted,
87
+ onMouseEnter: C
88
+ }
89
+ ) }),
90
+ /* @__PURE__ */ t(N, { onClick: () => g(1), children: /* @__PURE__ */ t(
91
+ S,
92
+ {
93
+ segmentType: "right",
94
+ card: e[1].card,
95
+ name: e[1].name,
96
+ isCompleted: e[1].isCompleted,
97
+ onMouseEnter: C
98
+ }
99
+ ) }),
100
+ /* @__PURE__ */ t(q, { onClick: () => g(2), children: /* @__PURE__ */ t(
101
+ S,
102
+ {
103
+ segmentType: "bottom",
104
+ card: e[2].card,
105
+ name: e[2].name,
106
+ isCompleted: e[2].isCompleted,
107
+ onMouseEnter: C
108
+ }
109
+ ) })
110
+ ]
111
+ }
112
+ );
113
+ }, me = H(w(Y));
112
114
  export {
113
115
  S as SegmentContent,
114
- ce as SegmentedGameCard
116
+ me as SegmentedGameCard
115
117
  };
116
118
  //# sourceMappingURL=segmented-game-card.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"segmented-game-card.js","sources":["../../../../../../src/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.tsx"],"sourcesContent":["import type { TColorNames } from '../../../../ui/types';\nimport type {\n IGameCardSegmentContentProps,\n ISegmentedGameCardProps,\n ISegmentedGameCardRefs,\n} from './segmented-game-card-types';\nimport type { AnimationItem } from 'lottie-web';\nimport type { FC, ForwardRefRenderFunction } from 'react';\n\nimport Lottie from 'lottie-web';\nimport {\n forwardRef,\n memo,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport CheckIcon from '../../../../../assets/line-icons/icons/check';\nimport { LOTTIE } from '../../../../../assets/lottie/lottie';\nimport { fetchLottie } from '../../../../ui/lottie-animation/helper';\nimport LottieAnimation from '../../../../ui/lottie-animation/lottie-animation';\nimport * as Styled from './segmented-game-card-styled';\n\nexport const SegmentContent: FC<IGameCardSegmentContentProps> = ({\n segmentType,\n isCompleted,\n card,\n name,\n onMouseEnter,\n}) => {\n const lottieAnimationRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n let animation: AnimationItem | null = null;\n\n const loadLottie = async () => {\n const lottie = await fetchLottie(card);\n\n animation = Lottie.loadAnimation({\n container: lottieAnimationRef.current as Element,\n renderer: 'canvas',\n loop: true,\n autoplay: true,\n animationData: lottie,\n });\n };\n\n loadLottie();\n\n return () => {\n return animation?.destroy();\n };\n }, [card]);\n\n const handleMouseEnter = useCallback(() => onMouseEnter(name), [onMouseEnter, name]);\n\n return (\n <Styled.SegmentContainer>\n <Styled.SegmentContentContainer $segmentType={segmentType} onMouseEnter={handleMouseEnter}>\n <Styled.SegmentAssetContainer ref={lottieAnimationRef} $segmentType={segmentType} />\n {isCompleted && (\n <Styled.SegmentOverlay $segmentType={segmentType}>\n <Styled.IconWrapper>\n <CheckIcon color=\"#fff\" height={40} width={40} />\n </Styled.IconWrapper>\n </Styled.SegmentOverlay>\n )}\n </Styled.SegmentContentContainer>\n </Styled.SegmentContainer>\n );\n};\n\nconst SegmentedGameCardComponent: ForwardRefRenderFunction<\n ISegmentedGameCardRefs,\n ISegmentedGameCardProps\n> = ({ data, label: gameCategoryLabel, initialValue = 0, value, maxValue = 1 }, ref) => {\n const labelRef = useRef<HTMLDivElement>(null);\n const segmentedCardWrapperRef = useRef<HTMLDivElement>(null);\n\n const [label, setLabel] = useState<string>(gameCategoryLabel);\n const [isAnimated, setIsAnimated] = useState(false);\n const [animatedColor, setAnimatedColor] = useState<TColorNames>('WHITE_T_87');\n\n const isLabelHighlighted = label !== gameCategoryLabel;\n\n const onMouseEnter = useCallback((gameName: string) => {\n setLabel(gameName);\n }, []);\n\n const onMouseLeave = useCallback(() => {\n setLabel(gameCategoryLabel);\n }, [gameCategoryLabel]);\n\n const onSegmentPress = (index: number) => {\n data[index]?.onPress?.();\n };\n\n const startLabelAnimation = useCallback((color: TColorNames) => {\n setIsAnimated(true);\n setAnimatedColor(color);\n }, []);\n\n useImperativeHandle(ref, () => ({\n labelRef,\n segmentedCardWrapperRef,\n startLabelAnimation,\n }));\n\n const animationSegments: [number, number] | undefined = useMemo(() => {\n if (maxValue <= 0) {\n return;\n }\n\n const totalFrames = 92;\n const framesPerValue = totalFrames / maxValue;\n\n const initialFrameToPlay = Math.min(framesPerValue * initialValue, totalFrames);\n const finalFrameToPlay = Math.min(framesPerValue * value + 1, totalFrames);\n\n return [initialFrameToPlay, finalFrameToPlay];\n }, [initialValue, maxValue, value]);\n\n const levelUpAnimationSettings = useMemo(\n () => ({\n renderer: 'canvas',\n autoplay: true,\n loop: false,\n initialSegment: animationSegments,\n }),\n [animationSegments],\n );\n\n return (\n <Styled.SegmentedCard>\n <Styled.ExtendedFlexView $position=\"absolute\">\n <Styled.AnimatedLabel\n ref={labelRef}\n $renderAs=\"ac3\"\n $align=\"center\"\n $color={isAnimated ? animatedColor : isLabelHighlighted ? 'WHITE_T_87' : 'WHITE_T_60'}\n isAnimated={isAnimated}\n >\n {label}\n </Styled.AnimatedLabel>\n </Styled.ExtendedFlexView>\n <Styled.SegmentedCardWrapper ref={segmentedCardWrapperRef} onMouseLeave={onMouseLeave}>\n <Styled.CircularProgressLottieContainer>\n <LottieAnimation src={LOTTIE.LEVELUP_RINGS} settings={levelUpAnimationSettings} />\n </Styled.CircularProgressLottieContainer>\n {/* left segment */}\n <Styled.SegmentLeft onClick={() => onSegmentPress(0)}>\n <SegmentContent\n segmentType={'left'}\n card={data[0]!.card}\n name={data[0]!.name}\n isCompleted={data[0]!.isCompleted}\n onMouseEnter={onMouseEnter}\n />\n </Styled.SegmentLeft>\n\n {/* right segment */}\n <Styled.SegmentRight onClick={() => onSegmentPress(1)}>\n <SegmentContent\n segmentType={'right'}\n card={data[1]!.card}\n name={data[1]!.name}\n isCompleted={data[1]!.isCompleted}\n onMouseEnter={onMouseEnter}\n />\n </Styled.SegmentRight>\n\n {/* bottom segment */}\n <Styled.SegmentBottom onClick={() => onSegmentPress(2)}>\n <SegmentContent\n segmentType={'bottom'}\n card={data[2]!.card}\n name={data[2]!.name}\n isCompleted={data[2]!.isCompleted}\n onMouseEnter={onMouseEnter}\n />\n </Styled.SegmentBottom>\n </Styled.SegmentedCardWrapper>\n </Styled.SegmentedCard>\n );\n};\n\nexport const SegmentedGameCard = memo(forwardRef(SegmentedGameCardComponent));\n"],"names":["SegmentContent","segmentType","isCompleted","card","name","onMouseEnter","lottieAnimationRef","useRef","useEffect","animation","lottie","fetchLottie","Lottie","handleMouseEnter","useCallback","jsx","Styled.SegmentContainer","jsxs","Styled.SegmentContentContainer","Styled.SegmentAssetContainer","Styled.SegmentOverlay","Styled.IconWrapper","CheckIcon","SegmentedGameCardComponent","data","gameCategoryLabel","initialValue","value","maxValue","ref","labelRef","segmentedCardWrapperRef","label","setLabel","useState","isAnimated","setIsAnimated","animatedColor","setAnimatedColor","isLabelHighlighted","gameName","onMouseLeave","onSegmentPress","index","_b","_a","startLabelAnimation","color","useImperativeHandle","animationSegments","useMemo","totalFrames","framesPerValue","initialFrameToPlay","finalFrameToPlay","levelUpAnimationSettings","Styled.SegmentedCard","Styled.ExtendedFlexView","Styled.AnimatedLabel","Styled.SegmentedCardWrapper","Styled.CircularProgressLottieContainer","LottieAnimation","LOTTIE","Styled.SegmentLeft","Styled.SegmentRight","Styled.SegmentBottom","SegmentedGameCard","memo","forwardRef"],"mappings":";;;;;;;;AA2BO,MAAMA,IAAmD,CAAC;AAAA,EAC/D,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,MAAAC;AAAA,EACA,MAAAC;AAAA,EACA,cAAAC;AACF,MAAM;AACE,QAAAC,IAAqBC,EAAuB,IAAI;AAEtD,EAAAC,EAAU,MAAM;AACd,QAAIC,IAAkC;AAc3B,YAZQ,YAAY;AACvB,YAAAC,IAAS,MAAMC,EAAYR,CAAI;AAErC,MAAAM,IAAYG,EAAO,cAAc;AAAA,QAC/B,WAAWN,EAAmB;AAAA,QAC9B,UAAU;AAAA,QACV,MAAM;AAAA,QACN,UAAU;AAAA,QACV,eAA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AAmB,SAAS,MAAMrB,EAAe,CAAC,GACjD,UAAA,gBAAA3B;AAAA,QAACf;AAAA,QAAA;AAAA,UACC,aAAa;AAAA,UACb,MAAMwB,EAAK,CAAC,EAAG;AAAA,UACf,MAAMA,EAAK,CAAC,EAAG;AAAA,UACf,aAAaA,EAAK,CAAC,EAAG;AAAA,UACtB,cAAAnB;AAAA,QAAA;AAAA,MAAA,GAEJ;AAAA,MAGA,gBAAAU,EAACiD,GAAA,EAAoB,SAAS,MAAMtB,EAAe,CAAC,GAClD,UAAA,gBAAA3B;AAAA,QAACf;AAAA,QAAA;AAAA,UACC,aAAa;AAAA,UACb,MAAMwB,EAAK,CAAC,EAAG;AAAA,UACf,MAAMA,EAAK,CAAC,EAAG;AAAA,UACf,aAAaA,EAAK,CAAC,EAAG;AAAA,UACtB,cAAAnB;AAAA,QAAA;AAAA,MAAA,GAEJ;AAAA,MAGA,gBAAAU,EAACkD,GAAA,EAAqB,SAAS,MAAMvB,EAAe,CAAC,GACnD,UAAA,gBAAA3B;AAAA,QAACf;AAAA,QAAA;AAAA,UACC,aAAa;AAAA,UACb,MAAMwB,EAAK,CAAC,EAAG;AAAA,UACf,MAAMA,EAAK,CAAC,EAAG;AAAA,UACf,aAAaA,EAAK,CAAC,EAAG;AAAA,UACtB,cAAAnB;AAAA,QAAA;AAAA,MAAA,GAEJ;AAAA,IAAA,GACF;AAAA,EACF,EAAA,CAAA;AAEJ,GAEa6D,KAAoBC,EAAKC,EAAW7C,EAA0B,CAAC;"}
1
+ {"version":3,"file":"segmented-game-card.js","sources":["../../../../../../src/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.tsx"],"sourcesContent":["import type { TColorNames } from '../../../../ui/types';\nimport type {\n IGameCardSegmentContentProps,\n ISegmentedGameCardProps,\n ISegmentedGameCardRefs,\n} from './segmented-game-card-types';\nimport type { AnimationItem } from 'lottie-web';\nimport type { FC, ForwardRefRenderFunction } from 'react';\n\nimport Lottie from 'lottie-web';\nimport {\n forwardRef,\n memo,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport CheckIcon from '../../../../../assets/line-icons/icons/check';\nimport { LOTTIE } from '../../../../../assets/lottie/lottie';\nimport { fetchLottie } from '../../../../ui/lottie-animation/helper';\nimport LottieAnimation from '../../../../ui/lottie-animation/lottie-animation';\nimport { CardContainer } from '../card-container/card-container';\nimport * as Styled from './segmented-game-card-styled';\n\nexport const SegmentContent: FC<IGameCardSegmentContentProps> = ({\n segmentType,\n isCompleted,\n card,\n name,\n onMouseEnter,\n}) => {\n const lottieAnimationRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n let animation: AnimationItem | null = null;\n\n const loadLottie = async () => {\n const lottie = await fetchLottie(card);\n\n animation = Lottie.loadAnimation({\n container: lottieAnimationRef.current as Element,\n renderer: 'canvas',\n loop: true,\n autoplay: true,\n animationData: lottie,\n });\n };\n\n loadLottie();\n\n return () => {\n return animation?.destroy();\n };\n }, [card]);\n\n const handleMouseEnter = useCallback(() => onMouseEnter(name), [onMouseEnter, name]);\n\n return (\n <Styled.SegmentContainer>\n <Styled.SegmentContentContainer $segmentType={segmentType} onMouseEnter={handleMouseEnter}>\n <Styled.SegmentAssetContainer ref={lottieAnimationRef} $segmentType={segmentType} />\n {isCompleted && (\n <Styled.SegmentOverlay $segmentType={segmentType}>\n <Styled.IconWrapper>\n <CheckIcon color=\"#fff\" height={40} width={40} />\n </Styled.IconWrapper>\n </Styled.SegmentOverlay>\n )}\n </Styled.SegmentContentContainer>\n </Styled.SegmentContainer>\n );\n};\n\nconst SegmentedGameCardComponent: ForwardRefRenderFunction<\n ISegmentedGameCardRefs,\n ISegmentedGameCardProps\n> = ({ data, label: gameCategoryLabel, initialValue = 0, value, maxValue = 1 }, ref) => {\n const labelRef = useRef<HTMLDivElement>(null);\n const cardWrapperRef = useRef<HTMLDivElement>(null);\n\n const [label, setLabel] = useState<string>(gameCategoryLabel);\n const [isAnimated, setIsAnimated] = useState(false);\n const [animatedColor, setAnimatedColor] = useState<TColorNames>('WHITE_T_87');\n\n const isLabelHighlighted = label !== gameCategoryLabel;\n\n const onMouseEnter = useCallback((gameName: string) => {\n setLabel(gameName);\n }, []);\n\n const onMouseLeave = useCallback(() => {\n setLabel(gameCategoryLabel);\n }, [gameCategoryLabel]);\n\n const onSegmentPress = useCallback(\n (index: number) => {\n data[index]?.onPress?.();\n },\n [data],\n );\n\n const startLabelAnimation = useCallback((color: TColorNames) => {\n setIsAnimated(true);\n setAnimatedColor(color);\n }, []);\n\n useImperativeHandle(ref, () => ({\n labelRef,\n segmentedCardWrapperRef: cardWrapperRef,\n startLabelAnimation,\n }));\n\n const animationSegments: [number, number] | undefined = useMemo(() => {\n if (maxValue <= 0) {\n return;\n }\n\n const totalFrames = 92;\n const framesPerValue = totalFrames / maxValue;\n\n const initialFrameToPlay = Math.min(framesPerValue * initialValue, totalFrames);\n const finalFrameToPlay = Math.min(framesPerValue * value + 1, totalFrames);\n\n return [initialFrameToPlay, finalFrameToPlay];\n }, [initialValue, maxValue, value]);\n\n const levelUpAnimationSettings = useMemo(\n () => ({\n renderer: 'canvas',\n autoplay: true,\n loop: false,\n initialSegment: animationSegments,\n }),\n [animationSegments],\n );\n\n return (\n <CardContainer\n ref={cardWrapperRef}\n labelRef={labelRef}\n label={label}\n isAnimated={isAnimated}\n onMouseLeave={onMouseLeave}\n labelColor={isAnimated ? animatedColor : isLabelHighlighted ? 'WHITE_T_87' : 'WHITE_T_60'}\n >\n <Styled.CircularProgressLottieContainer>\n <LottieAnimation src={LOTTIE.LEVELUP_RINGS} settings={levelUpAnimationSettings} />\n </Styled.CircularProgressLottieContainer>\n {/* left segment */}\n <Styled.SegmentLeft onClick={() => onSegmentPress(0)}>\n <SegmentContent\n segmentType={'left'}\n card={data[0]!.card}\n name={data[0]!.name}\n isCompleted={data[0]!.isCompleted}\n onMouseEnter={onMouseEnter}\n />\n </Styled.SegmentLeft>\n\n {/* right segment */}\n <Styled.SegmentRight onClick={() => onSegmentPress(1)}>\n <SegmentContent\n segmentType={'right'}\n card={data[1]!.card}\n name={data[1]!.name}\n isCompleted={data[1]!.isCompleted}\n onMouseEnter={onMouseEnter}\n />\n </Styled.SegmentRight>\n\n {/* bottom segment */}\n <Styled.SegmentBottom onClick={() => onSegmentPress(2)}>\n <SegmentContent\n segmentType={'bottom'}\n card={data[2]!.card}\n name={data[2]!.name}\n isCompleted={data[2]!.isCompleted}\n onMouseEnter={onMouseEnter}\n />\n </Styled.SegmentBottom>\n </CardContainer>\n );\n};\n\nexport const SegmentedGameCard = memo(forwardRef(SegmentedGameCardComponent));\n"],"names":["SegmentContent","segmentType","isCompleted","card","name","onMouseEnter","lottieAnimationRef","useRef","useEffect","animation","lottie","fetchLottie","Lottie","handleMouseEnter","useCallback","jsx","Styled.SegmentContainer","jsxs","Styled.SegmentContentContainer","Styled.SegmentAssetContainer","Styled.SegmentOverlay","Styled.IconWrapper","CheckIcon","SegmentedGameCardComponent","data","gameCategoryLabel","initialValue","value","maxValue","ref","labelRef","cardWrapperRef","label","setLabel","useState","isAnimated","setIsAnimated","animatedColor","setAnimatedColor","isLabelHighlighted","gameName","onMouseLeave","onSegmentPress","index","_b","_a","startLabelAnimation","color","useImperativeHandle","animationSegments","useMemo","totalFrames","framesPerValue","initialFrameToPlay","finalFrameToPlay","levelUpAnimationSettings","CardContainer","Styled.CircularProgressLottieContainer","LottieAnimation","LOTTIE","Styled.SegmentLeft","Styled.SegmentRight","Styled.SegmentBottom","SegmentedGameCard","memo","forwardRef"],"mappings":";;;;;;;;;AA4BO,MAAMA,IAAmD,CAAC;AAAA,EAC/D,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,MAAAC;AAAA,EACA,MAAAC;AAAA,EACA,cAAAC;AACF,MAAM;AACE,QAAAC,IAAqBC,EAAuB,IAAI;AAEtD,EAAAC,EAAU,MAAM;AACd,QAAIC,IAAkC;AAc3B,YAZQ,YAAY;AACvB,YAAAC,IAAS,MAAMC,EA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EW_Z_INDEX,
13
+ L as INFINITE_MODE_Z_INDEX,
14
+ E as TABLE_CARD_SHADOW_Z_INDEX,
15
+ N as TABLE_MODE_CONTAINER_Z_INDEX,
16
+ A as TABLE_MODE_LABEL_COLOR,
17
+ I as TABLE_MODE_OVERLAY_Z_INDEX,
18
+ _ as TABLE_REVEAL_ANIMATION
19
+ };
20
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sources":["../../../../../../src/features/circle-games/game-launcher/comps/tables-card/constants.ts"],"sourcesContent":["import type { TColorNames } from '../../../../ui/types';\nimport type { TTableMode } from '../../dal/use-get-circle-home-details-dal/use-get-circle-home-dal-types';\nimport type { AnimationSegment } from 'lottie-web';\n\nexport const TABLE_REVEAL_ANIMATION = {\n REVEAL: [0, 15] as AnimationSegment,\n REVEAL_CONTENT: [8, 15] as AnimationSegment,\n DISAPPEAR_CONTENT: [21, 29] as AnimationSegment,\n DISAPPEAR: [21, 38] as AnimationSegment,\n};\n\nexport const TABLE_MODE_LABEL_COLOR: Partial<Record<TTableMode, TColorNames>> = {\n random: 'BLUE_4',\n sequence: 'YELLOW_4',\n advance: 'PURPLE_4',\n};\n\n// z-index 1 to 20 are for table number arc segments\nexport const TABLE_CARD_SHADOW_Z_INDEX = 50;\nexport const INFINITE_MODE_Z_INDEX = TABLE_CARD_SHADOW_Z_INDEX + 1;\nexport const TABLE_MODE_CONTAINER_Z_INDEX = 100;\n\n// table modes\nexport const TABLE_MODE_OVERLAY_Z_INDEX = 1;\nexport const ABSOLUTE_VIEW_Z_INDEX = 2;\n"],"names":["TABLE_REVEAL_ANIMATION","TABLE_MODE_LABEL_COLOR","TABLE_CARD_SHADOW_Z_INDEX","INFINITE_MODE_Z_INDEX","TABLE_MODE_CONTAINER_Z_INDEX","TABLE_MODE_OVERLAY_Z_INDEX","ABSOLUTE_VIEW_Z_INDEX"],"mappings":"AAIO,MAAMA,IAAyB;AAAA,EACpC,QAAQ,CAAC,GAAG,EAAE;AAAA,EACd,gBAAgB,CAAC,GAAG,EAAE;AAAA,EACtB,mBAAmB,CAAC,IAAI,EAAE;AAAA,EAC1B,WAAW,CAAC,IAAI,EAAE;AACpB,GAEaC,IAAmE;AAAA,EAC9E,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,SAAS;AACX,GAGaC,IAA4B,IAC5BC,IAAwBD,IAA4B,GACpDE,IAA+B,KAG/BC,IAA6B,GAC7BC,IAAwB;"}
@@ -0,0 +1,24 @@
1
+ import e from "styled-components";
2
+ import { GAME_LAUNCHER_SIZE as t } from "../../card-container/constants.js";
3
+ const n = e.div`
4
+ border: 1px solid ${({ theme: o }) => o.colors.WHITE};
5
+ border-right-width: ${({ $isBorderRightRequired: o }) => o ? "1px" : "0px"};
6
+ height: ${t * 8.1 / 100}px;
7
+ width: ${t * 8.1 / 100}px;
8
+ display: flex;
9
+ align-items: center;
10
+ justify-content: center;
11
+ background-color: ${({ theme: o }) => o.colors.BLACK_1};
12
+ position: relative;
13
+ `, d = e.div`
14
+ position: absolute;
15
+ height: auto;
16
+ width: ${t * 8.1 / 100}px;
17
+ right: ${({ $right: o = "0px" }) => o};
18
+ bottom: ${({ $bottom: o = "unset" }) => o};
19
+ `;
20
+ export {
21
+ n as ModeContentSquareBlock,
22
+ d as TableModeLottieContainer
23
+ };
24
+ //# sourceMappingURL=table-mode-styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-mode-styled.js","sources":["../../../../../../../src/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { GAME_LAUNCHER_SIZE } from '../../card-container/constants';\n\nexport const ModeContentSquareBlock = styled.div<{ $isBorderRightRequired?: boolean }>`\n border: 1px solid ${({ theme }) => theme.colors.WHITE};\n border-right-width: ${({ $isBorderRightRequired }) => ($isBorderRightRequired ? '1px' : '0px')};\n height: ${(GAME_LAUNCHER_SIZE * 8.1) / 100}px;\n width: ${(GAME_LAUNCHER_SIZE * 8.1) / 100}px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ${({ theme }) => theme.colors.BLACK_1};\n position: relative;\n`;\n\nexport const TableModeLottieContainer = styled.div<{ $bottom?: string; $right?: string }>`\n position: absolute;\n height: auto;\n width: ${(GAME_LAUNCHER_SIZE * 8.1) / 100}px;\n right: ${({ $right = '0px' }) => $right};\n bottom: ${({ $bottom = 'unset' }) => $bottom};\n`;\n"],"names":["ModeContentSquareBlock","styled","theme","$isBorderRightRequired","GAME_LAUNCHER_SIZE","TableModeLottieContainer","$right","$bottom"],"mappings":";;AAIO,MAAMA,IAAyBC,EAAO;AAAA,sBACvB,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,KAAK;AAAA,wBAC/B,CAAC,EAAE,wBAAAC,EAAA,MAA8BA,IAAyB,QAAQ,KAAM;AAAA,YACnFC,IAAqB,MAAO,GAAG;AAAA,WAChCA,IAAqB,MAAO,GAAG;AAAA;AAAA;AAAA;AAAA,sBAIrB,CAAC,EAAE,OAAAF,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA,GAI5CG,IAA2BJ,EAAO;AAAA;AAAA;AAAA,WAGnCG,IAAqB,MAAO,GAAG;AAAA,WAChC,CAAC,EAAE,QAAAE,IAAS,MAAA,MAAYA,CAAM;AAAA,YAC7B,CAAC,EAAE,SAAAC,IAAU,QAAA,MAAcA,CAAO;AAAA;"}
@@ -0,0 +1,54 @@
1
+ import { jsxs as a, jsx as r } from "react/jsx-runtime";
2
+ import { memo as T } from "react";
3
+ import { LOTTIE as e } from "../../../../../../assets/lottie/lottie.js";
4
+ import l from "../../../../../ui/layout/flex-view.js";
5
+ import d from "../../../../../ui/lottie-animation/lottie-animation.js";
6
+ import _ from "../../../../../ui/separator/separator.js";
7
+ import m from "../../../../../ui/text/text.js";
8
+ import { GAME_LAUNCHER_SIZE as E, GAME_LAUNCHER_SIZE_LARGE as i } from "../../card-container/constants.js";
9
+ import f from "../table-star/table-star.js";
10
+ import { ModeContentSquareBlock as t, TableModeLottieContainer as s } from "./table-mode-styled.js";
11
+ const I = {
12
+ sequence: e.SEQUENCE_MODE_SEGMENT_LOTTIE,
13
+ random: e.RANDOM_MODE_SEGMENT_LOTTIE,
14
+ advance: e.ADVANCE_MODE_SEGMENT_LOTTIE
15
+ }, G = T(({ tableNumber: c, isStarAchieved: n, type: o }) => /* @__PURE__ */ a(l, { $alignItems: "center", children: [
16
+ /* @__PURE__ */ r(
17
+ f,
18
+ {
19
+ fill: n ? "GREEN_4" : "WHITE_T_15",
20
+ bgFill: n ? "GREEN_6" : "WHITE_T_15"
21
+ }
22
+ ),
23
+ /* @__PURE__ */ r(_, { height: E === i ? 22 : 16 }),
24
+ /* @__PURE__ */ a(l, { $flexDirection: "row", children: [
25
+ /* @__PURE__ */ r(t, { children: /* @__PURE__ */ r(
26
+ m,
27
+ {
28
+ $renderAs: E === i ? "ac3-black" : "ab2-bold",
29
+ $color: "WHITE",
30
+ children: c
31
+ }
32
+ ) }),
33
+ /* @__PURE__ */ r(t, { children: /* @__PURE__ */ r(
34
+ m,
35
+ {
36
+ $renderAs: E === i ? "ac3-black" : "ab2-bold",
37
+ $color: "WHITE",
38
+ children: "×"
39
+ }
40
+ ) }),
41
+ /* @__PURE__ */ r(t, { $isBorderRightRequired: o === "advance", children: /* @__PURE__ */ r(
42
+ s,
43
+ {
44
+ $bottom: o === "advance" ? "-1px" : "unset",
45
+ $right: o === "advance" ? "-1px" : "unset",
46
+ children: /* @__PURE__ */ r(d, { src: I[o] ?? "" })
47
+ }
48
+ ) })
49
+ ] })
50
+ ] }));
51
+ export {
52
+ G as default
53
+ };
54
+ //# sourceMappingURL=table-mode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-mode.js","sources":["../../../../../../../src/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode.tsx"],"sourcesContent":["import type { TTableMode } from '../../../dal/use-get-circle-home-details-dal/use-get-circle-home-dal-types';\nimport type { ITableModeProps } from './table-mode-types';\nimport type { FC } from 'react';\n\nimport { memo } from 'react';\n\nimport { LOTTIE } from '../../../../../../assets/lottie/lottie';\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../../../ui/lottie-animation/lottie-animation';\nimport Separator from '../../../../../ui/separator/separator';\nimport Text from '../../../../../ui/text/text';\nimport { GAME_LAUNCHER_SIZE, GAME_LAUNCHER_SIZE_LARGE } from '../../card-container/constants';\nimport TableStar from '../table-star/table-star';\nimport * as Styled from './table-mode-styled';\n\nconst LOAD_LOTTIE: Partial<Record<TTableMode, string>> = {\n sequence: LOTTIE.SEQUENCE_MODE_SEGMENT_LOTTIE,\n random: LOTTIE.RANDOM_MODE_SEGMENT_LOTTIE,\n advance: LOTTIE.ADVANCE_MODE_SEGMENT_LOTTIE,\n};\n\nconst TableMode: FC<ITableModeProps> = memo(({ tableNumber, isStarAchieved, type }) => {\n return (\n <FlexView $alignItems=\"center\">\n <TableStar\n fill={isStarAchieved ? 'GREEN_4' : 'WHITE_T_15'}\n bgFill={isStarAchieved ? 'GREEN_6' : 'WHITE_T_15'}\n />\n <Separator height={GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 22 : 16} />\n <FlexView $flexDirection=\"row\">\n <Styled.ModeContentSquareBlock>\n <Text\n $renderAs={GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ac3-black' : 'ab2-bold'}\n $color=\"WHITE\"\n >\n {tableNumber}\n </Text>\n </Styled.ModeContentSquareBlock>\n <Styled.ModeContentSquareBlock>\n <Text\n $renderAs={GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ac3-black' : 'ab2-bold'}\n $color=\"WHITE\"\n >\n ×\n </Text>\n </Styled.ModeContentSquareBlock>\n <Styled.ModeContentSquareBlock $isBorderRightRequired={type === 'advance'}>\n <Styled.TableModeLottieContainer\n $bottom={type === 'advance' ? '-1px' : 'unset'}\n $right={type === 'advance' ? '-1px' : 'unset'}\n >\n <LottieAnimation src={LOAD_LOTTIE[type] ?? ''} />\n </Styled.TableModeLottieContainer>\n </Styled.ModeContentSquareBlock>\n </FlexView>\n </FlexView>\n );\n});\n\nexport default TableMode;\n"],"names":["LOAD_LOTTIE","LOTTIE","TableMode","memo","tableNumber","isStarAchieved","type","jsxs","FlexView","jsx","TableStar","Separator","GAME_LAUNCHER_SIZE","GAME_LAUNCHER_SIZE_LARGE","Styled.ModeContentSquareBlock","Text","Styled.TableModeLottieContainer","LottieAnimation"],"mappings":";;;;;;;;;;AAeA,MAAMA,IAAmD;AAAA,EACvD,UAAUC,EAAO;AAAA,EACjB,QAAQA,EAAO;AAAA,EACf,SAASA,EAAO;AAClB,GAEMC,IAAiCC,EAAK,CAAC,EAAE,aAAAC,GAAa,gBAAAC,GAAgB,MAAAC,QAExE,gBAAAC,EAACC,GAAS,EAAA,aAAY,UACpB,UAAA;AAAA,EAAA,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAML,IAAiB,YAAY;AAAA,MACnC,QAAQA,IAAiB,YAAY;AAAA,IAAA;AAAA,EACvC;AAAA,oBACCM,GAAU,EAAA,QAAQC,MAAuBC,IAA2B,KAAK,IAAI;AAAA,EAC9E,gBAAAN,EAACC,GAAS,EAAA,gBAAe,OACvB,UAAA;AAAA,IAAC,gBAAAC,EAAAK,GAAA,EACC,UAAA,gBAAAL;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,WAAWH,MAAuBC,IAA2B,cAAc;AAAA,QAC3E,QAAO;AAAA,QAEN,UAAAT;AAAA,MAAA;AAAA,IAAA,GAEL;AAAA,IACA,gBAAAK,EAACK,GAAA,EACC,UAAA,gBAAAL;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,WAAWH,MAAuBC,IAA2B,cAAc;AAAA,QAC3E,QAAO;AAAA,QACR,UAAA;AAAA,MAAA;AAAA,IAAA,GAGH;AAAA,sBACCC,GAAA,EAA8B,wBAAwBR,MAAS,WAC9D,UAAA,gBAAAG;AAAA,MAACO;AAAAA,MAAA;AAAA,QACC,SAASV,MAAS,YAAY,SAAS;AAAA,QACvC,QAAQA,MAAS,YAAY,SAAS;AAAA,QAEtC,4BAACW,GAAgB,EAAA,KAAKjB,EAAYM,CAAI,KAAK,IAAI;AAAA,MAAA;AAAA,IAAA,GAEnD;AAAA,EAAA,GACF;AACF,EAAA,CAAA,CAEH;"}
@@ -0,0 +1,11 @@
1
+ import c from "styled-components";
2
+ const t = c.circle`
3
+ fill: ${({ $fill: l, theme: o }) => o.colors[l]};
4
+ `, i = c.path`
5
+ fill: ${({ $fill: l, theme: o }) => o.colors[l]};
6
+ `;
7
+ export {
8
+ t as Circle,
9
+ i as Path
10
+ };
11
+ //# sourceMappingURL=table-star-styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-star-styled.js","sources":["../../../../../../../src/features/circle-games/game-launcher/comps/tables-card/table-star/table-star-styled.tsx"],"sourcesContent":["import type { TColorNames } from '../../../../../ui/types';\n\nimport styled from 'styled-components';\n\nexport const Circle = styled.circle<{ $fill: TColorNames }>`\n fill: ${({ $fill, theme }) => theme.colors[$fill]};\n`;\n\nexport const Path = styled.path<{ $fill: TColorNames }>`\n fill: ${({ $fill, theme }) => theme.colors[$fill]};\n`;\n"],"names":["Circle","styled","$fill","theme","Path"],"mappings":";AAIO,MAAMA,IAASC,EAAO;AAAA,UACnB,CAAC,EAAE,OAAAC,GAAO,OAAAC,EAAA,MAAYA,EAAM,OAAOD,CAAK,CAAC;AAAA,GAGtCE,IAAOH,EAAO;AAAA,UACjB,CAAC,EAAE,OAAAC,GAAO,OAAAC,EAAA,MAAYA,EAAM,OAAOD,CAAK,CAAC;AAAA;"}
@@ -0,0 +1,16 @@
1
+ import { jsxs as i, jsx as r } from "react/jsx-runtime";
2
+ import { Circle as L, Path as e } from "./table-star-styled.js";
3
+ const f = ({ fill: t, bgFill: l }) => /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
4
+ /* @__PURE__ */ r(L, { cx: "8", cy: "8", r: "8", $fill: l }),
5
+ /* @__PURE__ */ r(
6
+ e,
7
+ {
8
+ d: "M8 2L6.23664 5.57295L2.29366 6.1459L5.14683 8.92705L4.47329 12.8541L8 11L11.5267 12.8541L10.8532 8.92705L13.7063 6.1459L9.76336 5.57295L8 2Z",
9
+ $fill: t
10
+ }
11
+ )
12
+ ] });
13
+ export {
14
+ f as default
15
+ };
16
+ //# sourceMappingURL=table-star.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-star.js","sources":["../../../../../../../src/features/circle-games/game-launcher/comps/tables-card/table-star/table-star.tsx"],"sourcesContent":["import type { ITableStarProps } from './table-star-types';\n\nimport React from 'react';\n\nimport * as Styled from './table-star-styled';\n\nconst TableStar: React.FC<ITableStarProps> = ({ fill, bgFill }) => {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <Styled.Circle cx=\"8\" cy=\"8\" r=\"8\" $fill={bgFill} />\n <Styled.Path\n d=\"M8 2L6.23664 5.57295L2.29366 6.1459L5.14683 8.92705L4.47329 12.8541L8 11L11.5267 12.8541L10.8532 8.92705L13.7063 6.1459L9.76336 5.57295L8 2Z\"\n $fill={fill}\n />\n </svg>\n );\n};\n\nexport default TableStar;\n"],"names":["TableStar","fill","bgFill","jsxs","jsx","Styled.Circle","Styled.Path"],"mappings":";;AAMA,MAAMA,IAAuC,CAAC,EAAE,MAAAC,GAAM,QAAAC,QAElD,gBAAAC,EAAC,OAAI,EAAA,OAAM,8BAA6B,OAAM,MAAK,QAAO,MAAK,SAAQ,aAAY,MAAK,QACtF,UAAA;AAAA,EAAC,gBAAAC,EAAAC,GAAA,EAAc,IAAG,KAAI,IAAG,KAAI,GAAE,KAAI,OAAOH,EAAQ,CAAA;AAAA,EAClD,gBAAAE;AAAA,IAACE;AAAAA,IAAA;AAAA,MACC,GAAE;AAAA,MACF,OAAOL;AAAA,IAAA;AAAA,EACT;AACF,EAAA,CAAA;"}
@@ -0,0 +1,161 @@
1
+ import o, { keyframes as c } from "styled-components";
2
+ import l from "../../../../ui/layout/flex-view.js";
3
+ import { GAME_LAUNCHER_SIZE as e, GAME_LAUNCHER_SIZE_LARGE as r } from "../card-container/constants.js";
4
+ import { TABLE_CARD_SHADOW_Z_INDEX as p, TABLE_MODE_CONTAINER_Z_INDEX as h, TABLE_MODE_OVERLAY_Z_INDEX as E, ABSOLUTE_VIEW_Z_INDEX as f, INFINITE_MODE_Z_INDEX as g, TABLE_REVEAL_ANIMATION as n } from "./constants.js";
5
+ const s = 2 * Math.PI * (e / 2), a = 30, _ = n.REVEAL_CONTENT[0] / a, $ = (n.REVEAL_CONTENT[1] - n.REVEAL_CONTENT[0]) / a, m = (n.DISAPPEAR_CONTENT[1] - n.DISAPPEAR_CONTENT[0]) / a, d = o.div`
6
+ position: relative;
7
+ height: inherit;
8
+ width: inherit;
9
+ `, I = o(d)`
10
+ display: flex;
11
+ align-items: center;
12
+ justify-content: center;
13
+ `, y = o.div`
14
+ position: absolute;
15
+ height: inherit;
16
+ width: inherit;
17
+ top: 0;
18
+ left: 0;
19
+ background: radial-gradient(
20
+ 50% 50% at 50% 50%,
21
+ rgba(13, 13, 13, 0.5) 0%,
22
+ rgba(13, 13, 13, 0) 100%
23
+ );
24
+ z-index: ${p};
25
+ pointer-events: none;
26
+ `, v = o.div`
27
+ display: flex;
28
+ flex-direction: column;
29
+ justify-content: center;
30
+ align-items: flex-end;
31
+ flex: 1;
32
+ transform: rotate(${({ $angle: t }) => t}deg);
33
+ transform-origin: 0 50%;
34
+ width: 50%;
35
+ height: ${({ $totalSegments: t }) => s / t}px;
36
+ position: absolute;
37
+ left: ${e / 2}px;
38
+ top: ${({ $totalSegments: t }) => (e - s / t) / 2}px;
39
+ padding-right: ${e === r ? 19 : 13}px;
40
+ z-index: ${({ $zIndex: t }) => t || 1};
41
+ background-color: ${({ theme: t }) => t.colors.BLACK_1};
42
+ clip-path: polygon(0% 50%, 100% 0%, 100% 100%);
43
+ &:nth-child(2n) {
44
+ background-color: ${({ theme: t }) => t.colors.BLACK_3};
45
+ }
46
+ &::after {
47
+ content: '';
48
+ width: 100%;
49
+ height: 2px;
50
+ position: absolute;
51
+ background: ${({ theme: t }) => t.colors.BLACK_5};
52
+ transform-style: preserve-3d;
53
+ backface-visibility: hidden;
54
+ transform-origin: left;
55
+ transform: rotate(${({ $totalSegments: t }) => 360 / (2 * t)}deg);
56
+ left: 0;
57
+ z-index: 1;
58
+ }
59
+ &:hover {
60
+ background-color: ${({ theme: t }) => t.colors.WHITE_T_60};
61
+ color: ${({ theme: t }) => t.colors.BLACK_1};
62
+ cursor: pointer;
63
+ &::after {
64
+ background: ${({ theme: t }) => t.colors.WHITE_5};
65
+ }
66
+ }
67
+ `, C = o.div`
68
+ width: ${e === r ? 10 : 8}px;
69
+ height: ${e === r ? 10 : 8}px;
70
+ margin-left: ${e === r ? 12 : 8}px;
71
+ border-radius: 100%;
72
+ background-color: ${({ theme: t, $isStarAchieved: i }) => i ? t.colors.GREEN_6 : t.colors.BLACK_5};
73
+ `, L = o(l)`
74
+ transform: rotate(${({ $angle: t }) => t}deg);
75
+ width: 16px;
76
+ height: 16px;
77
+ align-items: center;
78
+ `, w = o.div`
79
+ position: absolute;
80
+ z-index: ${h};
81
+ height: inherit;
82
+ width: inherit;
83
+ top: 0;
84
+ left: 0;
85
+ `, O = o(d)``, D = o.div`
86
+ cursor: pointer;
87
+ & svg {
88
+ color: ${({ theme: t }) => t.colors.WHITE};
89
+ }
90
+ `, R = o.div`
91
+ position: absolute;
92
+ height: inherit;
93
+ width: inherit;
94
+ height: ${81.08 * e / 100}px;
95
+ width: ${81.08 * e / 100}px;
96
+ border-radius: 100%;
97
+ transform: ${({ $top: t = "50%", $left: i = "50%" }) => `translate(${i}, ${t})`};
98
+ z-index: ${E};
99
+ cursor: pointer;
100
+ &:hover {
101
+ background-color: ${({ $hoverColor: t }) => t};
102
+ }
103
+ `, S = o.div`
104
+ position: absolute;
105
+ pointer-events: ${({ $isPointerEventsNone: t = !1 }) => t ? "none" : "auto"};
106
+ top: ${({ $top: t = 0, $valueInPx: i }) => i ? `${t}px` : `${t}%`};
107
+ left: ${({ $left: t = 0, $valueInPx: i }) => i ? `${t}px` : `${t}%`};
108
+ z-index: ${f};
109
+ transform: ${({ $alignCenter: t }) => t ? "translate(-50%, -50%)" : "none"};
110
+ display: flex;
111
+ align-items: center;
112
+ justify-content: center;
113
+ `, A = () => c`
114
+ from {
115
+ opacity: 0;
116
+ }
117
+ to {
118
+ opacity: 1;
119
+ }
120
+ `, u = () => c`
121
+ from {
122
+ opacity: 1;
123
+ }
124
+ to {
125
+ opacity: 0;
126
+ }
127
+ `, B = o.div`
128
+ position: absolute;
129
+ height: inherit;
130
+ width: inherit;
131
+ top: 0;
132
+ left: 0;
133
+ opacity: 0;
134
+ z-index: 1;
135
+ animation: ${({ animation: t }) => t === "fade-in" ? A : u}
136
+ ${({ animation: t }) => t === "fade-in" ? $ : m}s
137
+ ${({ animation: t }) => t === "fade-in" ? _ : 0}s ease-in-out
138
+ forwards;
139
+ `, k = o.div`
140
+ position: absolute;
141
+ height: 24.5%;
142
+ width: 24.5%;
143
+ z-index: ${g};
144
+ cursor: pointer;
145
+ `;
146
+ export {
147
+ S as AbsoluteView,
148
+ B as AnimatedView,
149
+ d as CardWrapper,
150
+ D as IconWrapper,
151
+ k as InfiniteButtonWrapper,
152
+ R as ModeOverlay,
153
+ w as TableModeContainer,
154
+ O as TableModeWrapper,
155
+ L as TableNumber,
156
+ v as TableSegment,
157
+ y as TableSegmentCardShadowContainer,
158
+ I as TableSegmentsWrapper,
159
+ C as TableStar
160
+ };
161
+ //# sourceMappingURL=tables-card-styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tables-card-styled.js","sources":["../../../../../../src/features/circle-games/game-launcher/comps/tables-card/tables-card-styled.tsx"],"sourcesContent":["import styled, { keyframes } from 'styled-components';\n\nimport FlexView from '../../../../ui/layout/flex-view';\nimport { GAME_LAUNCHER_SIZE, GAME_LAUNCHER_SIZE_LARGE } from '../card-container/constants';\nimport {\n ABSOLUTE_VIEW_Z_INDEX,\n INFINITE_MODE_Z_INDEX,\n TABLE_CARD_SHADOW_Z_INDEX,\n TABLE_MODE_CONTAINER_Z_INDEX,\n TABLE_MODE_OVERLAY_Z_INDEX,\n TABLE_REVEAL_ANIMATION,\n} from './constants';\n\nconst circumference = 2 * Math.PI * (GAME_LAUNCHER_SIZE / 2);\nconst FPS = 30;\n\nconst entryAnimationDelayTime = TABLE_REVEAL_ANIMATION.REVEAL_CONTENT[0] / FPS;\n\nconst entryAnimationTime =\n (TABLE_REVEAL_ANIMATION.REVEAL_CONTENT[1] - TABLE_REVEAL_ANIMATION.REVEAL_CONTENT[0]) / FPS;\nconst exitAnimationTime =\n (TABLE_REVEAL_ANIMATION.DISAPPEAR_CONTENT[1] - TABLE_REVEAL_ANIMATION.DISAPPEAR_CONTENT[0]) / FPS;\n\nexport const CardWrapper = styled.div`\n position: relative;\n height: inherit;\n width: inherit;\n`;\n\nexport const TableSegmentsWrapper = styled(CardWrapper)`\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nexport const TableSegmentCardShadowContainer = styled.div`\n position: absolute;\n height: inherit;\n width: inherit;\n top: 0;\n left: 0;\n background: radial-gradient(\n 50% 50% at 50% 50%,\n rgba(13, 13, 13, 0.5) 0%,\n rgba(13, 13, 13, 0) 100%\n );\n z-index: ${TABLE_CARD_SHADOW_Z_INDEX};\n pointer-events: none;\n`;\n\nexport const TableSegment = styled.div<{ $angle: number; $totalSegments: number; $zIndex: number }>`\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: flex-end;\n flex: 1;\n transform: rotate(${({ $angle }) => $angle}deg);\n transform-origin: 0 50%;\n width: 50%;\n height: ${({ $totalSegments }) => circumference / $totalSegments}px;\n position: absolute;\n left: ${GAME_LAUNCHER_SIZE / 2}px;\n top: ${({ $totalSegments }) => (GAME_LAUNCHER_SIZE - circumference / $totalSegments) / 2}px;\n padding-right: ${GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 19 : 13}px;\n z-index: ${({ $zIndex }) => $zIndex || 1};\n background-color: ${({ theme }) => theme.colors.BLACK_1};\n clip-path: polygon(0% 50%, 100% 0%, 100% 100%);\n &:nth-child(2n) {\n background-color: ${({ theme }) => theme.colors.BLACK_3};\n }\n &::after {\n content: '';\n width: 100%;\n height: 2px;\n position: absolute;\n background: ${({ theme }) => theme.colors.BLACK_5};\n transform-style: preserve-3d;\n backface-visibility: hidden;\n transform-origin: left;\n transform: rotate(${({ $totalSegments }) => 360 / (2 * $totalSegments)}deg);\n left: 0;\n z-index: 1;\n }\n &:hover {\n background-color: ${({ theme }) => theme.colors.WHITE_T_60};\n color: ${({ theme }) => theme.colors.BLACK_1};\n cursor: pointer;\n &::after {\n background: ${({ theme }) => theme.colors.WHITE_5};\n }\n }\n`;\n\nexport const TableStar = styled.div<{ $isStarAchieved: boolean }>`\n width: ${GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 10 : 8}px;\n height: ${GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 10 : 8}px;\n margin-left: ${GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 12 : 8}px;\n border-radius: 100%;\n background-color: ${({ theme, $isStarAchieved }) =>\n $isStarAchieved ? theme.colors.GREEN_6 : theme.colors.BLACK_5};\n`;\n\nexport const TableNumber = styled(FlexView)<{ $angle: number }>`\n transform: rotate(${({ $angle }) => $angle}deg);\n width: 16px;\n height: 16px;\n align-items: center;\n`;\n\nexport const TableModeContainer = styled.div`\n position: absolute;\n z-index: ${TABLE_MODE_CONTAINER_Z_INDEX};\n height: inherit;\n width: inherit;\n top: 0;\n left: 0;\n`;\n\nexport const TableModeWrapper = styled(CardWrapper)``;\n\nexport const IconWrapper = styled.div`\n cursor: pointer;\n & svg {\n color: ${({ theme }) => theme.colors.WHITE};\n }\n`;\n\nexport const ModeOverlay = styled.div<{ $top?: string; $left?: string; $hoverColor: string }>`\n position: absolute;\n height: inherit;\n width: inherit;\n height: ${(81.08 * GAME_LAUNCHER_SIZE) / 100}px;\n width: ${(81.08 * GAME_LAUNCHER_SIZE) / 100}px;\n border-radius: 100%;\n transform: ${({ $top = '50%', $left = '50%' }) => `translate(${$left}, ${$top})`};\n z-index: ${TABLE_MODE_OVERLAY_Z_INDEX};\n cursor: pointer;\n &:hover {\n background-color: ${({ $hoverColor }) => $hoverColor};\n }\n`;\n\nexport const AbsoluteView = styled.div<{\n $top?: number;\n $left?: number;\n $alignCenter?: boolean;\n $valueInPx?: boolean;\n $isPointerEventsNone?: boolean;\n}>`\n position: absolute;\n pointer-events: ${({ $isPointerEventsNone = false }) => ($isPointerEventsNone ? 'none' : 'auto')};\n top: ${({ $top = 0, $valueInPx }) => ($valueInPx ? `${$top}px` : `${$top}%`)};\n left: ${({ $left = 0, $valueInPx }) => ($valueInPx ? `${$left}px` : `${$left}%`)};\n z-index: ${ABSOLUTE_VIEW_Z_INDEX};\n transform: ${({ $alignCenter }) => ($alignCenter ? 'translate(-50%, -50%)' : 'none')};\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nconst fadeIn = () => keyframes`\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n `;\n\nconst fadeOut = () => keyframes`\nfrom {\n opacity: 1;\n}\nto {\n opacity: 0;\n}\n`;\n\nexport const AnimatedView = styled.div<{ animation: 'fade-in' | 'fade-out' }>`\n position: absolute;\n height: inherit;\n width: inherit;\n top: 0;\n left: 0;\n opacity: 0;\n z-index: 1;\n animation: ${({ animation }) => (animation === 'fade-in' ? fadeIn : fadeOut)}\n ${({ animation }) => (animation === 'fade-in' ? entryAnimationTime : exitAnimationTime)}s\n ${({ animation }) => (animation === 'fade-in' ? entryAnimationDelayTime : 0)}s ease-in-out\n forwards;\n`;\n\nexport const InfiniteButtonWrapper = styled.div`\n position: absolute;\n height: 24.5%;\n width: 24.5%;\n z-index: ${INFINITE_MODE_Z_INDEX};\n cursor: pointer;\n`;\n"],"names":["circumference","GAME_LAUNCHER_SIZE","FPS","entryAnimationDelayTime","TABLE_REVEAL_ANIMATION","entryAnimationTime","exitAnimationTime","CardWrapper","styled","TableSegmentsWrapper","TableSegmentCardShadowContainer","TABLE_CARD_SHADOW_Z_INDEX","TableSegment","$angle","$totalSegments","GAME_LAUNCHER_SIZE_LARGE","$zIndex","theme","TableStar","$isStarAchieved","TableNumber","FlexView","TableModeContainer","TABLE_MODE_CONTAINER_Z_INDEX","TableModeWrapper","IconWrapper","ModeOverlay","$top","$left","TABLE_MODE_OVERLAY_Z_INDEX","$hoverColor","AbsoluteView","$isPointerEventsNone","$valueInPx","ABSOLUTE_VIEW_Z_INDEX","$alignCenter","fadeIn","keyframes","fadeOut","AnimatedView","animation","InfiniteButtonWrapper","INFINITE_MODE_Z_INDEX"],"mappings":";;;;AAaA,MAAMA,IAAgB,IAAI,KAAK,MAAMC,IAAqB,IACpDC,IAAM,IAENC,IAA0BC,EAAuB,eAAe,CAAC,IAAIF,GAErEG,KACHD,EAAuB,eAAe,CAAC,IAAIA,EAAuB,eAAe,CAAC,KAAKF,GACpFI,KACHF,EAAuB,kBAAkB,CAAC,IAAIA,EAAuB,kBAAkB,CAAC,KAAKF,GAEnFK,IAAcC,EAAO;AAAA;AAAA;AAAA;AAAA,GAMrBC,IAAuBD,EAAOD,CAAW;AAAA;AAAA;AAAA;AAAA,GAMzCG,IAAkCF,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAWzCG,CAAyB;AAAA;AAAA,GAIzBC,IAAeJ,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAMb,CAAC,EAAE,QAAAK,EAAO,MAAMA,CAAM;AAAA;AAAA;AAAA,YAGhC,C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