@cuemath/leap 2.8.60-beta-0.1 → 2.8.60-gs1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/line-icons/icons/bin2.js +7 -8
- package/dist/assets/line-icons/icons/bin2.js.map +1 -1
- package/dist/assets/line-icons/icons/skip-colored.js +43 -0
- package/dist/assets/line-icons/icons/skip-colored.js.map +1 -0
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js +1 -1
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js.map +1 -1
- package/dist/features/chapters-v2/chapter-details/chapter-details.js +24 -24
- package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +1 -1
- package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js +76 -72
- package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.js +62 -75
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js +127 -110
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js.map +1 -1
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.js +12 -4
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.js.map +1 -1
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js +128 -105
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js.map +1 -1
- package/dist/features/milestone/create/milestone-create.js +49 -43
- package/dist/features/milestone/create/milestone-create.js.map +1 -1
- package/dist/features/milestone/edit/comps/edit-milestone-modal/api/get-milestone.js +1 -1
- package/dist/features/milestone/edit/comps/edit-milestone-modal/api/get-milestone.js.map +1 -1
- package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js +42 -40
- package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js.map +1 -1
- package/dist/features/milestone/edit/goal-edit-container.js +64 -62
- package/dist/features/milestone/edit/goal-edit-container.js.map +1 -1
- package/dist/features/milestone/edit/milestone-edit-container.js +54 -52
- package/dist/features/milestone/edit/milestone-edit-container.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +61 -52
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js +28 -28
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js +120 -111
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js.map +1 -1
- package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js +16 -18
- package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js.map +1 -1
- package/dist/features/ui/lottie-animation/lottie-animation.js +39 -24
- package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
- package/dist/features/ui/theme/button.js +5 -5
- package/dist/features/ui/theme/button.js.map +1 -1
- package/dist/index.d.ts +6 -2
- package/dist/index.js +369 -367
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.js
CHANGED
@@ -1,118 +1,105 @@
|
|
1
|
-
import {
|
2
|
-
import
|
3
|
-
import
|
4
|
-
import $ from "../../../../../assets/
|
5
|
-
import
|
6
|
-
import {
|
7
|
-
import U from "
|
8
|
-
|
9
|
-
|
10
|
-
const
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
}) => {
|
17
|
-
const
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
loop: !0,
|
26
|
-
autoplay: !0,
|
27
|
-
animationData: p
|
28
|
-
});
|
29
|
-
})(), () => o == null ? void 0 : o.destroy();
|
30
|
-
}, [m]);
|
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 }) }) })
|
35
|
-
] }) });
|
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);
|
1
|
+
import { jsx as n, jsxs as L } from "react/jsx-runtime";
|
2
|
+
import { memo as P, useCallback as m, forwardRef as O, useRef as E, useState as f, useImperativeHandle as F, useMemo as A } from "react";
|
3
|
+
import G from "../../../../../assets/line-icons/icons/check.js";
|
4
|
+
import { LOTTIE as $ } from "../../../../../assets/lottie/lottie.js";
|
5
|
+
import R from "../../../../ui/lottie-animation/lottie-animation.js";
|
6
|
+
import { CardContainer as j } from "../card-container/card-container.js";
|
7
|
+
import { SegmentContainer as w, SegmentContentContainer as U, SegmentAssetContainer as x, SegmentOverlay as B, IconWrapper as N, CircularProgressLottieContainer as q, SegmentLeft as z, SegmentRight as D, SegmentBottom as J } from "./segmented-game-card-styled.js";
|
8
|
+
const K = { renderer: "canvas", loop: !0 }, C = P(
|
9
|
+
({ segmentType: e, isCompleted: o, card: c, name: i, onMouseEnter: s }) => {
|
10
|
+
const a = m(() => s(i), [s, i]);
|
11
|
+
return /* @__PURE__ */ n(w, { children: /* @__PURE__ */ L(U, { $segmentType: e, onMouseEnter: a, children: [
|
12
|
+
/* @__PURE__ */ n(x, { $segmentType: e, children: /* @__PURE__ */ n(R, { src: c, settings: K, animateOnIntersect: !0 }) }),
|
13
|
+
o && /* @__PURE__ */ n(B, { $segmentType: e, children: /* @__PURE__ */ n(N, { children: /* @__PURE__ */ n(G, { color: "#fff", height: 40, width: 40 }) }) })
|
14
|
+
] }) });
|
15
|
+
}
|
16
|
+
), Q = ({ data: e, label: o, initialValue: c = 0, value: i, maxValue: s = 1 }, a) => {
|
17
|
+
const g = E(null), h = E(null), [u, S] = f(o), [T, _] = f(!1), [b, M] = f("WHITE_T_87"), W = u !== o, d = m((t) => {
|
18
|
+
S(t);
|
19
|
+
}, []), k = m(() => {
|
20
|
+
S(o);
|
21
|
+
}, [o]), p = m(
|
22
|
+
(t) => {
|
23
|
+
var r, l;
|
24
|
+
(l = (r = e[t]) == null ? void 0 : r.onPress) == null || l.call(r);
|
45
25
|
},
|
46
26
|
[e]
|
47
|
-
),
|
48
|
-
|
27
|
+
), v = m((t) => {
|
28
|
+
_(!0), M(t);
|
49
29
|
}, []);
|
50
30
|
F(a, () => ({
|
51
|
-
labelRef:
|
52
|
-
segmentedCardWrapperRef:
|
53
|
-
startLabelAnimation:
|
31
|
+
labelRef: g,
|
32
|
+
segmentedCardWrapperRef: h,
|
33
|
+
startLabelAnimation: v
|
54
34
|
}));
|
55
|
-
const
|
35
|
+
const I = A(() => {
|
56
36
|
if (s <= 0)
|
57
37
|
return;
|
58
|
-
const
|
59
|
-
return [
|
60
|
-
}, [
|
38
|
+
const t = 92, r = t / s, l = Math.min(r * c, t), H = Math.min(r * i + 1, t);
|
39
|
+
return [l, H];
|
40
|
+
}, [c, s, i]), y = A(
|
61
41
|
() => ({
|
62
42
|
renderer: "canvas",
|
63
43
|
autoplay: !0,
|
64
44
|
loop: !1,
|
65
|
-
initialSegment:
|
45
|
+
initialSegment: I
|
66
46
|
}),
|
67
|
-
[
|
47
|
+
[I]
|
68
48
|
);
|
69
|
-
return /* @__PURE__ */
|
70
|
-
|
49
|
+
return /* @__PURE__ */ L(
|
50
|
+
j,
|
71
51
|
{
|
72
|
-
ref:
|
73
|
-
labelRef:
|
52
|
+
ref: h,
|
53
|
+
labelRef: g,
|
74
54
|
label: u,
|
75
|
-
isAnimated:
|
76
|
-
onMouseLeave:
|
77
|
-
labelColor:
|
55
|
+
isAnimated: T,
|
56
|
+
onMouseLeave: k,
|
57
|
+
labelColor: T ? b : W ? "WHITE_T_87" : "WHITE_T_60",
|
78
58
|
children: [
|
79
|
-
/* @__PURE__ */
|
80
|
-
|
81
|
-
|
59
|
+
/* @__PURE__ */ n(q, { children: /* @__PURE__ */ n(
|
60
|
+
R,
|
61
|
+
{
|
62
|
+
src: $.LEVELUP_RINGS,
|
63
|
+
settings: y,
|
64
|
+
animateOnIntersect: !0
|
65
|
+
}
|
66
|
+
) }),
|
67
|
+
/* @__PURE__ */ n(z, { onClick: () => p(0), children: /* @__PURE__ */ n(
|
68
|
+
C,
|
82
69
|
{
|
83
70
|
segmentType: "left",
|
84
71
|
card: e[0].card,
|
85
72
|
name: e[0].name,
|
86
73
|
isCompleted: e[0].isCompleted,
|
87
|
-
onMouseEnter:
|
74
|
+
onMouseEnter: d
|
88
75
|
}
|
89
76
|
) }),
|
90
|
-
/* @__PURE__ */
|
91
|
-
|
77
|
+
/* @__PURE__ */ n(D, { onClick: () => p(1), children: /* @__PURE__ */ n(
|
78
|
+
C,
|
92
79
|
{
|
93
80
|
segmentType: "right",
|
94
81
|
card: e[1].card,
|
95
82
|
name: e[1].name,
|
96
83
|
isCompleted: e[1].isCompleted,
|
97
|
-
onMouseEnter:
|
84
|
+
onMouseEnter: d
|
98
85
|
}
|
99
86
|
) }),
|
100
|
-
/* @__PURE__ */
|
101
|
-
|
87
|
+
/* @__PURE__ */ n(J, { onClick: () => p(2), children: /* @__PURE__ */ n(
|
88
|
+
C,
|
102
89
|
{
|
103
90
|
segmentType: "bottom",
|
104
91
|
card: e[2].card,
|
105
92
|
name: e[2].name,
|
106
93
|
isCompleted: e[2].isCompleted,
|
107
|
-
onMouseEnter:
|
94
|
+
onMouseEnter: d
|
108
95
|
}
|
109
96
|
) })
|
110
97
|
]
|
111
98
|
}
|
112
99
|
);
|
113
|
-
},
|
100
|
+
}, re = P(O(Q));
|
114
101
|
export {
|
115
|
-
|
116
|
-
|
102
|
+
C as SegmentContent,
|
103
|
+
re as SegmentedGameCard
|
117
104
|
};
|
118
105
|
//# 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 { 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,EAAYR,CAAI;AAErC,MAAAM,IAAYG,EAAO,cAAc;AAAA,QAC/B,WAAWN,EAAmB;AAAA,QAC9B,UAAU;AAAA,QACV,MAAM;AAAA,QACN,UAAU;AAAA,QACV,eAAeI;AAAA,MAAA,CAChB;AAAA,IAAA,MAKI,MACED,KAAA,gBAAAA,EAAW;AAAA,EACpB,GACC,CAACN,CAAI,CAAC;AAEH,QAAAU,IAAmBC,EAAY,MAAMT,EAAaD,CAAI,GAAG,CAACC,GAAcD,CAAI,CAAC;AAGjF,SAAA,gBAAAW,EAACC,GAAA,EACC,UAAA,gBAAAC,EAACC,GAAA,EAA+B,cAAcjB,GAAa,cAAcY,GACvE,UAAA;AAAA,IAAA,gBAAAE,EAACI,GAAA,EAA6B,KAAKb,GAAoB,cAAcL,GAAa;AAAA,IACjFC,uBACEkB,GAAA,EAAsB,cAAcnB,GACnC,4BAACoB,GAAA,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AA,QAAA,GAEJ;AAAA,QAGA,gBAAAU,EAAC+C,GAAA,EAAqB,SAAS,MAAMpB,EAAe,CAAC,GACnD,UAAA,gBAAA3B;AAAA,UAACf;AAAA,UAAA;AAAA,YACC,aAAa;AAAA,YACb,MAAMwB,EAAK,CAAC,EAAG;AAAA,YACf,MAAMA,EAAK,CAAC,EAAG;AAAA,YACf,aAAaA,EAAK,CAAC,EAAG;AAAA,YACtB,cAAAnB;AAAA,UAAA;AAAA,QAAA,GAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,GAEa0D,KAAoBC,EAAKC,EAAW1C,CAA0B,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 { ForwardRefRenderFunction } from 'react';\n\nimport {\n forwardRef,\n memo,\n useCallback,\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 LottieAnimation from '../../../../ui/lottie-animation/lottie-animation';\nimport { CardContainer } from '../card-container/card-container';\nimport * as Styled from './segmented-game-card-styled';\n\nconst renderSettings = { renderer: 'canvas', loop: true };\n\nexport const SegmentContent = memo(\n ({ segmentType, isCompleted, card, name, onMouseEnter }: IGameCardSegmentContentProps) => {\n const handleMouseEnter = useCallback(() => onMouseEnter(name), [onMouseEnter, name]);\n\n return (\n <Styled.SegmentContainer>\n <Styled.SegmentContentContainer $segmentType={segmentType} onMouseEnter={handleMouseEnter}>\n <Styled.SegmentAssetContainer $segmentType={segmentType}>\n <LottieAnimation src={card} settings={renderSettings} animateOnIntersect />\n </Styled.SegmentAssetContainer>\n\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);\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\n src={LOTTIE.LEVELUP_RINGS}\n settings={levelUpAnimationSettings}\n animateOnIntersect\n />\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":["renderSettings","SegmentContent","memo","segmentType","isCompleted","card","name","onMouseEnter","handleMouseEnter","useCallback","jsx","Styled.SegmentContainer","jsxs","Styled.SegmentContentContainer","Styled.SegmentAssetContainer","LottieAnimation","Styled.SegmentOverlay","Styled.IconWrapper","CheckIcon","SegmentedGameCardComponent","data","gameCategoryLabel","initialValue","value","maxValue","ref","labelRef","useRef","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","LOTTIE","Styled.SegmentLeft","Styled.SegmentRight","Styled.SegmentBottom","SegmentedGameCard","forwardRef"],"mappings":";;;;;;;AAwBA,MAAMA,IAAiB,EAAE,UAAU,UAAU,MAAM,GAAK,GAE3CC,IAAiBC;AAAA,EAC5B,CAAC,EAAE,aAAAC,GAAa,aAAAC,GAAa,MAAAC,GAAM,MAAAC,GAAM,cAAAC,QAAiD;AAClF,UAAAC,IAAmBC,EAAY,MAAMF,EAAaD,CAAI,GAAG,CAACC,GAAcD,CAAI,CAAC;AAGjF,WAAA,gBAAAI,EAACC,GAAA,EACC,UAAA,gBAAAC,EAACC,GAAA,EAA+B,cAAcV,GAAa,cAAcK,GACvE,UAAA;AAAA,MAAA,gBAAAE,EAACI,GAAA,EAA6B,cAAcX,GAC1C,UAAA,gBAAAO,EAACK,GAAgB,EAAA,KAAKV,GAAM,UAAUL,GAAgB,oBAAkB,GAAC,CAAA,GAC3E;AAAA,MAECI,uBACEY,GAAA,EAAsB,cAAcb,GACnC,4BAACc,GAAA,EACC,UAAC,gBAAAP,EAAAQ,GAAA,EAAU,OAAM,QAAO,QAAQ,IAAI,OAAO,GAAA,CAAI,EACjD,CAAA,GACF;AAAA,IAAA,EAEJ,CAAA,EACF,CAAA;AAAA,EAEJ;AACF,GAEMC,IAGF,CAAC,EAAE,MAAAC,GAAM,OAAOC,GAAmB,cAAAC,IAAe,GAAG,OAAAC,GAAO,UAAAC,IAAW,EAAE,GAAGC,MAAQ;AAChF,QAAAC,IAAWC,EAAuB,IAAI,GACtCC,IAAiBD,EAAuB,IAAI,GAE5C,CAACE,GAAOC,CAAQ,IAAIC,EAAiBV,CAAiB,GACtD,CAACW,GAAYC,CAAa,IAAIF,EAAS,EAAK,GAC5C,CAACG,GAAeC,CAAgB,IAAIJ,EAAsB,YAAY,GAEtEK,IAAqBP,MAAUR,GAE/Bd,IAAeE,EAAY,CAAC4B,MAAqB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import Ae, { forwardRef as be, useState as o, useRef as N, useCallback as i, useMemo as z, useImperativeHandle as Ee, useEffect as K, memo as ge } from "react";
|
3
3
|
import Ne from "../../../../../assets/line-icons/icons/back2.js";
|
4
4
|
import { LOTTIE as R } from "../../../../../assets/lottie/lottie.js";
|
5
5
|
import pe from "../../../../ui/arrow-tooltip/arrow-tooltip.js";
|
6
6
|
import { useUIContext as Ce } from "../../../../ui/context/context.js";
|
7
|
-
import
|
7
|
+
import Se from "../../../../ui/layout/flex-view.js";
|
8
8
|
import w from "../../../../ui/lottie-animation/lottie-animation.js";
|
9
|
-
import
|
10
|
-
import
|
9
|
+
import Ie from "../../../../ui/separator/separator.js";
|
10
|
+
import F from "../../../../ui/text/text.js";
|
11
11
|
import { useCircleSounds as Le } from "../../../hooks/use-circle-sounds/use-circle-sounds.js";
|
12
12
|
import { GAME_LAUNCHER_ANALYTICS_EVENTS as fe } from "../../game-launcher-analytics-events.js";
|
13
13
|
import { CardContainer as ve } from "../card-container/card-container.js";
|
14
|
-
import { GAME_LAUNCHER_SIZE as
|
15
|
-
import { TABLE_REVEAL_ANIMATION as
|
16
|
-
import
|
17
|
-
import
|
18
|
-
import { CardWrapper as
|
19
|
-
const
|
14
|
+
import { GAME_LAUNCHER_SIZE as p, GAME_LAUNCHER_SIZE_LARGE as _e } from "../card-container/constants.js";
|
15
|
+
import { TABLE_REVEAL_ANIMATION as C, TABLE_MODE_LABEL_COLOR as Te } from "./constants.js";
|
16
|
+
import He from "./table-mode/table-mode.js";
|
17
|
+
import $e from "./table-segment-star/table-segment-star.js";
|
18
|
+
import { CardWrapper as Re, TableSegmentsWrapper as we, InfiniteButtonWrapper as ye, AbsoluteView as S, TableSegmentCardShadowContainer as We, TableSegment as Be, TableNumber as De, TableModeContainer as Pe, TableModeWrapper as ke, AnimatedView as Ve, ModeOverlay as xe, IconWrapper as Ue } from "./tables-card-styled.js";
|
19
|
+
const y = {
|
20
|
+
renderer: "svg"
|
21
|
+
}, qe = {
|
20
22
|
loop: !1,
|
21
23
|
autoplay: !1,
|
22
|
-
|
23
|
-
},
|
24
|
+
...y
|
25
|
+
}, je = be(
|
24
26
|
({
|
25
|
-
data:
|
26
|
-
label:
|
27
|
+
data: l,
|
28
|
+
label: W,
|
27
29
|
onPress: b,
|
28
30
|
openModesOfTable: r,
|
29
31
|
defaultTable: E,
|
30
|
-
onGoBackFromTableLevel:
|
31
|
-
onPressTableSegment:
|
32
|
-
},
|
33
|
-
var
|
34
|
-
const { onEvent:
|
32
|
+
onGoBackFromTableLevel: g,
|
33
|
+
onPressTableSegment: I
|
34
|
+
}, G) => {
|
35
|
+
var Y;
|
36
|
+
const { onEvent: B } = Ce(), { playButtonSound: m } = Le(), [u, L] = o(!0), [d, h] = o(
|
35
37
|
(r == null ? void 0 : r.tableNumber) ?? null
|
36
|
-
), [
|
37
|
-
stars: ((
|
38
|
+
), [f, D] = o(null), [J, A] = o("WHITE_T_60"), [c, v] = o({
|
39
|
+
stars: ((Y = l.tableList.find((e) => e.tableNumber === (r == null ? void 0 : r.tableNumber))) == null ? void 0 : Y.stars) ?? [],
|
38
40
|
tableNumber: (r == null ? void 0 : r.tableNumber) ?? 0
|
39
|
-
}), [
|
41
|
+
}), [Q, X] = o(!0), [_, P] = o(!1), [k, M] = o("WHITE_T_60"), V = N(null), x = N(null), [U, O] = o((r == null ? void 0 : r.rewardStar) ?? []), [q] = o(!1), T = N(null), H = N(), j = i(
|
40
42
|
(e) => {
|
41
|
-
if (
|
42
|
-
|
43
|
+
if (I) {
|
44
|
+
I(e);
|
43
45
|
return;
|
44
46
|
}
|
45
|
-
m(),
|
47
|
+
m(), L(!0), h(e.tableNumber), v({ ...e }), O([]), B(fe.TABLE_SELECTED, {
|
46
48
|
meta: {
|
47
49
|
table_of: e.tableNumber
|
48
50
|
}
|
49
51
|
});
|
50
52
|
},
|
51
|
-
[
|
52
|
-
),
|
53
|
+
[I, m, B]
|
54
|
+
), ee = i(
|
53
55
|
(e) => {
|
54
|
-
A(_ ?
|
56
|
+
A(_ ? k : "WHITE_T_60"), h(e.tableNumber);
|
55
57
|
},
|
56
|
-
[
|
57
|
-
),
|
58
|
+
[k, _]
|
59
|
+
), te = i(() => {
|
58
60
|
A("WHITE_T_60"), !c.tableNumber && h(null);
|
59
|
-
}, [c.tableNumber]),
|
61
|
+
}, [c.tableNumber]), re = i(() => {
|
60
62
|
var n;
|
61
|
-
|
62
|
-
const e = (
|
63
|
-
(n = T.current) == null || n.playSegments(
|
64
|
-
|
63
|
+
g == null || g(), m(), L(!1), h(null);
|
64
|
+
const e = (C.DISAPPEAR[1] - C.DISAPPEAR[0]) / 30;
|
65
|
+
(n = T.current) == null || n.playSegments(C.DISAPPEAR, !0), H.current = setTimeout(() => {
|
66
|
+
v({ stars: [], tableNumber: 0 });
|
65
67
|
}, e * 1e3);
|
66
|
-
}, [
|
68
|
+
}, [g, m]), ie = i(() => {
|
67
69
|
var e;
|
68
|
-
(e = T.current) == null || e.playSegments(
|
69
|
-
}, []),
|
70
|
+
(e = T.current) == null || e.playSegments(C.REVEAL, !0);
|
71
|
+
}, []), ne = i((e) => {
|
70
72
|
const n = {
|
71
73
|
sequence: 1,
|
72
74
|
random: 2,
|
73
75
|
advance: 3
|
74
76
|
};
|
75
|
-
A(
|
76
|
-
}, []),
|
77
|
-
|
78
|
-
}, []),
|
77
|
+
A(Te[e] ?? "WHITE_T_60"), D(n[e] ?? 0);
|
78
|
+
}, []), oe = i(() => {
|
79
|
+
D(null), A("WHITE_T_60");
|
80
|
+
}, []), s = z(() => c, [c]), se = z(() => [
|
79
81
|
{
|
80
82
|
top: 20,
|
81
83
|
left: 10.5,
|
82
84
|
type: "sequence",
|
83
|
-
tableNumber:
|
84
|
-
isStarAchieved:
|
85
|
+
tableNumber: s.tableNumber,
|
86
|
+
isStarAchieved: s.stars.includes("sequence"),
|
85
87
|
semicirclePosiiionTop: "-19%",
|
86
88
|
semicirclePosiiionLeft: "-43%",
|
87
89
|
semicircleHoverColor: "#B259004D"
|
@@ -90,8 +92,8 @@ const Ue = {
|
|
90
92
|
top: 20,
|
91
93
|
left: 65.5,
|
92
94
|
type: "random",
|
93
|
-
tableNumber:
|
94
|
-
isStarAchieved:
|
95
|
+
tableNumber: s.tableNumber,
|
96
|
+
isStarAchieved: s.stars.includes("random"),
|
95
97
|
semicirclePosiiionTop: "-19%",
|
96
98
|
semicirclePosiiionLeft: "65%",
|
97
99
|
semicircleHoverColor: "#0055CC4D"
|
@@ -100,18 +102,18 @@ const Ue = {
|
|
100
102
|
top: 66,
|
101
103
|
left: 38,
|
102
104
|
type: "advance",
|
103
|
-
tableNumber:
|
104
|
-
isStarAchieved:
|
105
|
+
tableNumber: s.tableNumber,
|
106
|
+
isStarAchieved: s.stars.includes("advance"),
|
105
107
|
semicirclePosiiionTop: "74%",
|
106
108
|
semicirclePosiiionLeft: "11%",
|
107
109
|
semicircleHoverColor: "#A9099C4D"
|
108
110
|
}
|
109
|
-
], [
|
111
|
+
], [s.tableNumber, s.stars]), le = i(() => {
|
110
112
|
b({
|
111
113
|
mode: "infinite",
|
112
|
-
infiniteModeHighScore:
|
114
|
+
infiniteModeHighScore: l.infiniteModeHighScore
|
113
115
|
});
|
114
|
-
}, [b,
|
116
|
+
}, [b, l.infiniteModeHighScore]), ce = i(
|
115
117
|
(e, n) => {
|
116
118
|
b({
|
117
119
|
mode: e,
|
@@ -120,77 +122,91 @@ const Ue = {
|
|
120
122
|
});
|
121
123
|
},
|
122
124
|
[b, c.tableNumber]
|
123
|
-
),
|
124
|
-
A(e),
|
125
|
-
}, []),
|
126
|
-
return
|
127
|
-
labelRef:
|
128
|
-
segmentedCardWrapperRef:
|
129
|
-
startLabelAnimation:
|
130
|
-
stopLabelAnimation:
|
131
|
-
setLabelVisiblity:
|
132
|
-
handleTableSegmentClick:
|
133
|
-
})),
|
125
|
+
), ae = i(() => f ? `${d}× LEVEL${f}` : d ? `${d}× Table` : W, [f, d, W]), me = i((e) => {
|
126
|
+
A(e), M(e), P(!0);
|
127
|
+
}, []), ue = i(() => P(!1), []), de = i((e) => X(e), []);
|
128
|
+
return Ee(G, () => ({
|
129
|
+
labelRef: V,
|
130
|
+
segmentedCardWrapperRef: x,
|
131
|
+
startLabelAnimation: me,
|
132
|
+
stopLabelAnimation: ue,
|
133
|
+
setLabelVisiblity: de,
|
134
|
+
handleTableSegmentClick: j
|
135
|
+
})), K(() => () => {
|
134
136
|
H.current && clearTimeout(H.current);
|
135
|
-
}, []),
|
136
|
-
E && (m(),
|
137
|
+
}, []), K(() => {
|
138
|
+
E && (m(), L(!0), h(E.tableNumber), v({ ...E }));
|
137
139
|
}, [E, m]), /* @__PURE__ */ t(
|
138
140
|
ve,
|
139
141
|
{
|
140
|
-
labelRef:
|
141
|
-
ref:
|
142
|
+
labelRef: V,
|
143
|
+
ref: x,
|
142
144
|
strokeColor: "WHITE",
|
143
|
-
label:
|
144
|
-
labelColor:
|
145
|
+
label: ae(),
|
146
|
+
labelColor: J,
|
145
147
|
isAnimated: _,
|
146
|
-
showLabel:
|
147
|
-
children: /* @__PURE__ */ a(
|
148
|
-
/* @__PURE__ */ a(
|
148
|
+
showLabel: Q,
|
149
|
+
children: /* @__PURE__ */ a(Re, { children: [
|
150
|
+
/* @__PURE__ */ a(we, { children: [
|
149
151
|
/* @__PURE__ */ t(
|
150
152
|
pe,
|
151
153
|
{
|
152
154
|
renderAs: "primary",
|
153
155
|
position: "top",
|
154
|
-
hidden:
|
155
|
-
tooltipItem: /* @__PURE__ */ t(
|
156
|
+
hidden: q,
|
157
|
+
tooltipItem: /* @__PURE__ */ t(F, { $renderAs: "ab3", $color: "WHITE", children: "Coming Soon" }),
|
156
158
|
children: /* @__PURE__ */ a(
|
157
|
-
|
159
|
+
ye,
|
158
160
|
{
|
159
|
-
onClick:
|
161
|
+
onClick: q ? le : void 0,
|
160
162
|
children: [
|
161
|
-
/* @__PURE__ */ t(S, { children: /* @__PURE__ */ t(
|
162
|
-
|
163
|
+
/* @__PURE__ */ t(S, { children: /* @__PURE__ */ t(
|
164
|
+
w,
|
165
|
+
{
|
166
|
+
src: R.INFINITE_BUTTON_BG,
|
167
|
+
settings: y,
|
168
|
+
animateOnIntersect: !0
|
169
|
+
}
|
170
|
+
) }),
|
171
|
+
/* @__PURE__ */ t(S, { children: /* @__PURE__ */ t(
|
172
|
+
w,
|
173
|
+
{
|
174
|
+
src: R.INFINITE_BUTTON_SYMBOL,
|
175
|
+
settings: y,
|
176
|
+
animateOnIntersect: !0
|
177
|
+
}
|
178
|
+
) })
|
163
179
|
]
|
164
180
|
}
|
165
181
|
)
|
166
182
|
}
|
167
183
|
),
|
168
|
-
/* @__PURE__ */ t(
|
169
|
-
|
170
|
-
const
|
184
|
+
/* @__PURE__ */ t(We, {}),
|
185
|
+
l.tableList.map((e, n) => {
|
186
|
+
const he = 360 / l.tableList.length, Z = -(90 + 360 / (2 * l.tableList.length)) + he * (n + 1);
|
171
187
|
return /* @__PURE__ */ t(
|
172
|
-
|
188
|
+
Be,
|
173
189
|
{
|
174
|
-
$angle:
|
175
|
-
$totalSegments:
|
190
|
+
$angle: Z,
|
191
|
+
$totalSegments: l.tableList.length,
|
176
192
|
$zIndex: n + 1,
|
177
|
-
onClick: () =>
|
178
|
-
onMouseOver: () =>
|
179
|
-
onMouseLeave:
|
180
|
-
children: /* @__PURE__ */ a(
|
193
|
+
onClick: () => j(e),
|
194
|
+
onMouseOver: () => ee(e),
|
195
|
+
onMouseLeave: te,
|
196
|
+
children: /* @__PURE__ */ a(Se, { $flexDirection: "row", $justifyContent: "center", $alignItems: "center", children: [
|
181
197
|
["sequence", "random", "advance"].map(($) => /* @__PURE__ */ t(
|
182
|
-
|
198
|
+
$e,
|
183
199
|
{
|
184
200
|
isStarAchieved: e.stars.includes($),
|
185
|
-
rewardStar: !u && (r == null ? void 0 : r.tableNumber) === e.tableNumber ?
|
201
|
+
rewardStar: !u && (r == null ? void 0 : r.tableNumber) === e.tableNumber ? U.includes($) : void 0
|
186
202
|
},
|
187
203
|
$
|
188
204
|
)),
|
189
|
-
/* @__PURE__ */ t(
|
190
|
-
/* @__PURE__ */ t(
|
191
|
-
|
205
|
+
/* @__PURE__ */ t(Ie, { width: p * 0.055 }),
|
206
|
+
/* @__PURE__ */ t(De, { $angle: -Z, children: /* @__PURE__ */ t(
|
207
|
+
F,
|
192
208
|
{
|
193
|
-
$renderAs:
|
209
|
+
$renderAs: p === _e ? "ac3-black" : "ac4-black",
|
194
210
|
$color: d === e.tableNumber ? "BLACK_1" : "WHITE",
|
195
211
|
children: e.tableNumber
|
196
212
|
}
|
@@ -201,18 +217,18 @@ const Ue = {
|
|
201
217
|
);
|
202
218
|
})
|
203
219
|
] }),
|
204
|
-
c.tableNumber > 0 && /* @__PURE__ */ t(
|
205
|
-
/* @__PURE__ */ a(
|
206
|
-
|
220
|
+
c.tableNumber > 0 && /* @__PURE__ */ t(Pe, { children: /* @__PURE__ */ a(ke, { children: [
|
221
|
+
/* @__PURE__ */ a(Ve, { animation: u ? "fade-in" : "fade-out", children: [
|
222
|
+
se.map((e, n) => /* @__PURE__ */ a(Ae.Fragment, { children: [
|
207
223
|
/* @__PURE__ */ t(
|
208
|
-
|
224
|
+
xe,
|
209
225
|
{
|
210
226
|
$top: e.semicirclePosiiionTop,
|
211
227
|
$left: e.semicirclePosiiionLeft,
|
212
228
|
$hoverColor: e.semicircleHoverColor,
|
213
|
-
onClick: () => u ?
|
214
|
-
onMouseOver: () => u ?
|
215
|
-
onMouseLeave: u ?
|
229
|
+
onClick: () => u ? ce(e.type, e.isStarAchieved) : void 0,
|
230
|
+
onMouseOver: () => u ? ne(e.type) : void 0,
|
231
|
+
onMouseLeave: u ? oe : void 0
|
216
232
|
}
|
217
233
|
),
|
218
234
|
/* @__PURE__ */ t(
|
@@ -222,23 +238,23 @@ const Ue = {
|
|
222
238
|
$left: e.left,
|
223
239
|
$isPointerEventsNone: !0,
|
224
240
|
children: /* @__PURE__ */ t(
|
225
|
-
|
241
|
+
He,
|
226
242
|
{
|
227
243
|
tableNumber: e.tableNumber,
|
228
244
|
isStarAchieved: e.isStarAchieved,
|
229
245
|
type: e.type,
|
230
|
-
rewardStar:
|
246
|
+
rewardStar: U.includes(e.type)
|
231
247
|
}
|
232
248
|
)
|
233
249
|
}
|
234
250
|
)
|
235
251
|
] }, n)),
|
236
|
-
/* @__PURE__ */ t(S, { $top: 50, $left: 50, $alignCenter: !0, children: /* @__PURE__ */ t(
|
252
|
+
/* @__PURE__ */ t(S, { $top: 50, $left: 50, $alignCenter: !0, children: /* @__PURE__ */ t(Ue, { children: /* @__PURE__ */ t(
|
237
253
|
Ne,
|
238
254
|
{
|
239
|
-
onClick:
|
240
|
-
height:
|
241
|
-
width:
|
255
|
+
onClick: re,
|
256
|
+
height: p * 0.1,
|
257
|
+
width: p * 0.1
|
242
258
|
}
|
243
259
|
) }) })
|
244
260
|
] }),
|
@@ -247,8 +263,9 @@ const Ue = {
|
|
247
263
|
{
|
248
264
|
src: R.TABLE_MODE_REVEAL,
|
249
265
|
ref: T,
|
250
|
-
settings:
|
251
|
-
onRender:
|
266
|
+
settings: qe,
|
267
|
+
onRender: ie,
|
268
|
+
animateOnIntersect: !0
|
252
269
|
}
|
253
270
|
)
|
254
271
|
] }) })
|
@@ -256,8 +273,8 @@ const Ue = {
|
|
256
273
|
}
|
257
274
|
);
|
258
275
|
}
|
259
|
-
),
|
276
|
+
), ct = ge(je);
|
260
277
|
export {
|
261
|
-
|
278
|
+
ct as TablesCard
|
262
279
|
};
|
263
280
|
//# sourceMappingURL=tables-card.js.map
|