@cuemath/leap 2.8.35 → 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 (60) 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/circle-games/game-launcher/comps/card-container/card-container-styled.js +53 -0
  4. package/dist/features/circle-games/game-launcher/comps/card-container/card-container-styled.js.map +1 -0
  5. package/dist/features/circle-games/game-launcher/comps/card-container/card-container.js +24 -0
  6. package/dist/features/circle-games/game-launcher/comps/card-container/card-container.js.map +1 -0
  7. package/dist/features/circle-games/game-launcher/comps/card-container/constants.js +7 -0
  8. package/dist/features/circle-games/game-launcher/comps/card-container/constants.js.map +1 -0
  9. package/dist/features/circle-games/game-launcher/comps/segmented-game-card/constants.js +6 -6
  10. package/dist/features/circle-games/game-launcher/comps/segmented-game-card/constants.js.map +1 -1
  11. package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card-styled.js +29 -73
  12. package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card-styled.js.map +1 -1
  13. package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.js +87 -85
  14. package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.js.map +1 -1
  15. package/dist/features/circle-games/game-launcher/comps/tables-card/constants.js +20 -0
  16. package/dist/features/circle-games/game-launcher/comps/tables-card/constants.js.map +1 -0
  17. package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode-styled.js +24 -0
  18. package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode-styled.js.map +1 -0
  19. package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode.js +54 -0
  20. package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode.js.map +1 -0
  21. package/dist/features/circle-games/game-launcher/comps/tables-card/table-star/table-star-styled.js +11 -0
  22. package/dist/features/circle-games/game-launcher/comps/tables-card/table-star/table-star-styled.js.map +1 -0
  23. package/dist/features/circle-games/game-launcher/comps/tables-card/table-star/table-star.js +16 -0
  24. package/dist/features/circle-games/game-launcher/comps/tables-card/table-star/table-star.js.map +1 -0
  25. package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card-styled.js +161 -0
  26. package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card-styled.js.map +1 -0
  27. package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js +209 -0
  28. package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js.map +1 -0
  29. package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js +25 -15
  30. package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js.map +1 -1
  31. package/dist/features/circle-games/game-launcher/game-launcher.js +103 -61
  32. package/dist/features/circle-games/game-launcher/game-launcher.js.map +1 -1
  33. package/dist/features/circle-games/games/web-view/enums/project-type-enum.js +1 -1
  34. package/dist/features/circle-games/games/web-view/enums/project-type-enum.js.map +1 -1
  35. package/dist/features/circle-games/games/web-view/web-view-types.js.map +1 -1
  36. package/dist/features/circle-games/games/web-view/web-view.js +69 -82
  37. package/dist/features/circle-games/games/web-view/web-view.js.map +1 -1
  38. package/dist/features/post-game-stats/accuracy/accuracy-styled.js +17 -16
  39. package/dist/features/post-game-stats/accuracy/accuracy-styled.js.map +1 -1
  40. package/dist/features/post-game-stats/clock/clock-styled.js +11 -10
  41. package/dist/features/post-game-stats/clock/clock-styled.js.map +1 -1
  42. package/dist/features/post-game-stats/points/points.js +25 -24
  43. package/dist/features/post-game-stats/points/points.js.map +1 -1
  44. package/dist/features/post-game-stats/post-game-stats-styled.js +1 -1
  45. package/dist/features/post-game-stats/post-game-stats-styled.js.map +1 -1
  46. package/dist/features/post-game-stats/streak/streak-styled.js +18 -17
  47. package/dist/features/post-game-stats/streak/streak-styled.js.map +1 -1
  48. package/dist/features/trial-session/comps/trial-circle-game/constants.js.map +1 -1
  49. package/dist/features/trial-session/comps/trial-circle-game/trial-circle-game.js.map +1 -1
  50. package/dist/index.d.ts +78 -109
  51. package/dist/index.js +194 -199
  52. package/dist/static/advance-mode-segment-lottie.51ff6707.json +1 -0
  53. package/dist/static/infinite-button-bg.5909225e.json +1 -0
  54. package/dist/static/infinite-button-symbol.aa31350c.json +1 -0
  55. package/dist/static/random-mode-segment-lottie.79cf1c07.json +1 -0
  56. package/dist/static/sequence-mode-segment-lottie.11ac49e9.json +1 -0
  57. package/dist/static/table-mode-reveal.b44a82c3.json +1 -0
  58. package/package.json +1 -1
  59. package/dist/features/circle-games/games/web-view/enums/project-ids-enum.js +0 -14
  60. package/dist/features/circle-games/games/web-view/enums/project-ids-enum.js.map +0 -1
@@ -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,eAAeI;AAAA,MAAA,CAChB;AAAA,IAAA,MAKI,MACED,KAAA,gBAAAA,EAAW;AAAA,EACpB,GACC,CAACN,CAAI,CAAC;AAEH,QAAA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wB,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,EAAYR,CAAI;AAErC,MAAAM,IAAYG,EAAO,cAAc;AAAA,QAC/B,WAAWN,EAAmB;AAAA,QAC9B,UAAU;AAAA,QACV,MAAM;AAA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,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,QAGA,gBAAAU,EAAC8C,GAAA,EAAoB,SAAS,MAAMnB,EAAe,CAAC,GAClD,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,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;"}
@@ -0,0 +1,20 @@
1
+ const _ = {
2
+ REVEAL: [0, 15],
3
+ REVEAL_CONTENT: [8, 15],
4
+ DISAPPEAR_CONTENT: [21, 29],
5
+ DISAPPEAR: [21, 38]
6
+ }, A = {
7
+ random: "BLUE_4",
8
+ sequence: "YELLOW_4",
9
+ advance: "PURPLE_4"
10
+ }, E = 50, L = E + 1, N = 100, I = 1, O = 2;
11
+ export {
12
+ O as ABSOLUTE_VIEW_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,CAAC,EAAE,gBAAAC,QAAqBd,IAAgBc,CAAc;AAAA;AAAA,UAExDb,IAAqB,CAAC;AAAA,SACvB,CAAC,EAAE,gBAAAa,SAA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BjC,EAAO;AAAA;AAAA;AAAA;AAAA,aAI/BkC,CAAqB;AAAA;AAAA;"}
@@ -0,0 +1,209 @@
1
+ import { jsx as t, jsxs as a, Fragment as U } from "react/jsx-runtime";
2
+ import { memo as j, useState as u, useRef as H, useCallback as i, useMemo as k, useEffect as Z } from "react";
3
+ import z from "../../../../../assets/line-icons/icons/back2.js";
4
+ import { LOTTIE as C } from "../../../../../assets/lottie/lottie.js";
5
+ import K from "../../../../ui/layout/flex-view.js";
6
+ import E from "../../../../ui/lottie-animation/lottie-animation.js";
7
+ import Y from "../../../../ui/separator/separator.js";
8
+ import J from "../../../../ui/text/text.js";
9
+ import { useCircleSounds as Q } from "../../../hooks/use-circle-sounds/use-circle-sounds.js";
10
+ import { CardContainer as X } from "../card-container/card-container.js";
11
+ import { GAME_LAUNCHER_SIZE as p, GAME_LAUNCHER_SIZE_LARGE as T } from "../card-container/constants.js";
12
+ import { TABLE_REVEAL_ANIMATION as f, TABLE_MODE_LABEL_COLOR as ee } from "./constants.js";
13
+ import te from "./table-mode/table-mode.js";
14
+ import { CardWrapper as re, TableSegmentsWrapper as oe, InfiniteButtonWrapper as ie, AbsoluteView as g, TableSegmentCardShadowContainer as ne, TableSegment as le, TableStar as ae, TableNumber as ce, TableModeContainer as se, TableModeWrapper as me, AnimatedView as ue, ModeOverlay as de, IconWrapper as be } from "./tables-card-styled.js";
15
+ const he = {
16
+ loop: !1,
17
+ autoplay: !1,
18
+ render: "svg"
19
+ }, He = j(({ data: c, label: L, onPress: n }) => {
20
+ const { playButtonSound: d } = Q(), [s, S] = u(!0), [m, b] = u(null), [N, I] = u(null), [B, h] = u("WHITE_T_60"), [l, _] = u({
21
+ stars: [],
22
+ tableNumber: 0
23
+ }), v = H(null), A = H(), O = i(
24
+ (e) => {
25
+ d(), S(!0), b(e.tableNumber), _({ ...e });
26
+ },
27
+ [d]
28
+ ), R = i((e) => {
29
+ h("WHITE_T_87"), b(e.tableNumber);
30
+ }, []), y = i(() => {
31
+ h("WHITE_T_60"), !l.tableNumber && b(null);
32
+ }, [l.tableNumber]), W = i(() => {
33
+ var o;
34
+ d(), S(!1), b(null);
35
+ const e = (f.DISAPPEAR[1] - f.DISAPPEAR[0]) / 30;
36
+ (o = v.current) == null || o.playSegments(f.DISAPPEAR, !0), A.current = setTimeout(() => {
37
+ _({ stars: [], tableNumber: 0 });
38
+ }, e * 1e3);
39
+ }, [d]), D = i(() => {
40
+ var e;
41
+ (e = v.current) == null || e.playSegments(f.REVEAL, !0);
42
+ }, []), w = i((e) => {
43
+ const o = {
44
+ sequence: 1,
45
+ random: 2,
46
+ advance: 3
47
+ };
48
+ h(ee[e] ?? "WHITE_T_60"), I(o[e] ?? 0);
49
+ }, []), P = i(() => {
50
+ I(null), h("WHITE_T_60");
51
+ }, []), r = k(() => l, [l]), V = k(() => [
52
+ {
53
+ top: 20,
54
+ left: 10.5,
55
+ type: "sequence",
56
+ tableNumber: r.tableNumber,
57
+ isStarAchieved: r.stars.includes("sequence"),
58
+ onClick: () => n({ mode: "sequence", tableNumber: r.tableNumber }),
59
+ semicirclePosiiionTop: "-19%",
60
+ semicirclePosiiionLeft: "-43%",
61
+ semicircleHoverColor: "#B259004D"
62
+ },
63
+ {
64
+ top: 20,
65
+ left: 65.5,
66
+ type: "random",
67
+ tableNumber: r.tableNumber,
68
+ isStarAchieved: r.stars.includes("random"),
69
+ onClick: () => n({ mode: "random", tableNumber: r.tableNumber }),
70
+ semicirclePosiiionTop: "-19%",
71
+ semicirclePosiiionLeft: "65%",
72
+ semicircleHoverColor: "#0055CC4D"
73
+ },
74
+ {
75
+ top: 66,
76
+ left: 38,
77
+ type: "advance",
78
+ tableNumber: r.tableNumber,
79
+ isStarAchieved: r.stars.includes("advance"),
80
+ onClick: () => n({ mode: "advance", tableNumber: r.tableNumber }),
81
+ semicirclePosiiionTop: "74%",
82
+ semicirclePosiiionLeft: "11%",
83
+ semicircleHoverColor: "#A9099C4D"
84
+ }
85
+ ], [r.tableNumber, r.stars, n]), q = i(() => {
86
+ n({
87
+ mode: "infinite",
88
+ infiniteModeHighScore: c.infiniteModeHighScore
89
+ });
90
+ }, [n, c.infiniteModeHighScore]), x = i(
91
+ (e) => {
92
+ n({
93
+ mode: e,
94
+ tableNumber: l.tableNumber
95
+ });
96
+ },
97
+ [n, l.tableNumber]
98
+ ), F = i(() => N ? `${m}× LEVEL${N}` : m ? `${m}× Table` : L, [N, m, L]);
99
+ return Z(() => () => {
100
+ A.current && clearTimeout(A.current);
101
+ }, []), /* @__PURE__ */ t(
102
+ X,
103
+ {
104
+ strokeColor: "WHITE",
105
+ label: F(),
106
+ isAnimated: !1,
107
+ labelColor: B,
108
+ children: /* @__PURE__ */ a(re, { children: [
109
+ /* @__PURE__ */ a(oe, { children: [
110
+ /* @__PURE__ */ a(ie, { onClick: q, children: [
111
+ /* @__PURE__ */ t(g, { children: /* @__PURE__ */ t(E, { src: C.INFINITE_BUTTON_BG }) }),
112
+ /* @__PURE__ */ t(g, { children: /* @__PURE__ */ t(E, { src: C.INFINITE_BUTTON_SYMBOL }) })
113
+ ] }),
114
+ /* @__PURE__ */ t(ne, {}),
115
+ c.tableList.map((e, o) => {
116
+ const G = 360 / c.tableList.length, M = -(90 + 360 / (2 * c.tableList.length)) + G * (o + 1);
117
+ return /* @__PURE__ */ t(
118
+ le,
119
+ {
120
+ $angle: M,
121
+ $totalSegments: c.tableList.length,
122
+ $zIndex: o + 1,
123
+ onClick: () => O(e),
124
+ onMouseOver: () => R(e),
125
+ onMouseLeave: y,
126
+ children: /* @__PURE__ */ a(K, { $flexDirection: "row", $justifyContent: "center", $alignItems: "center", children: [
127
+ ["sequence", "random", "advance"].map(($) => /* @__PURE__ */ t(
128
+ ae,
129
+ {
130
+ $isStarAchieved: e.stars.includes($)
131
+ },
132
+ $
133
+ )),
134
+ /* @__PURE__ */ t(Y, { width: p === T ? 22 : 14 }),
135
+ /* @__PURE__ */ t(ce, { $angle: -M, children: /* @__PURE__ */ t(
136
+ J,
137
+ {
138
+ $renderAs: p === T ? "ac3-black" : "ac4-black",
139
+ $color: m === e.tableNumber ? "BLACK_1" : "WHITE",
140
+ children: e.tableNumber
141
+ }
142
+ ) })
143
+ ] })
144
+ },
145
+ o
146
+ );
147
+ })
148
+ ] }),
149
+ l.tableNumber > 0 && /* @__PURE__ */ t(se, { children: /* @__PURE__ */ a(me, { children: [
150
+ /* @__PURE__ */ a(ue, { animation: s ? "fade-in" : "fade-out", children: [
151
+ V.map((e, o) => /* @__PURE__ */ a(U, { children: [
152
+ /* @__PURE__ */ t(
153
+ de,
154
+ {
155
+ $top: e.semicirclePosiiionTop,
156
+ $left: e.semicirclePosiiionLeft,
157
+ $hoverColor: e.semicircleHoverColor,
158
+ onClick: () => s ? x(e.type) : void 0,
159
+ onMouseOver: () => s ? w(e.type) : void 0,
160
+ onMouseLeave: s ? P : void 0
161
+ },
162
+ o + "modeoverlay"
163
+ ),
164
+ /* @__PURE__ */ t(
165
+ g,
166
+ {
167
+ $top: e.top,
168
+ $left: e.left,
169
+ onClick: s ? e.onClick : void 0,
170
+ $isPointerEventsNone: !0,
171
+ children: /* @__PURE__ */ t(
172
+ te,
173
+ {
174
+ tableNumber: e.tableNumber,
175
+ isStarAchieved: e.isStarAchieved,
176
+ type: e.type
177
+ }
178
+ )
179
+ },
180
+ o + "modes"
181
+ )
182
+ ] })),
183
+ /* @__PURE__ */ t(g, { $top: 50, $left: 50, $alignCenter: !0, children: /* @__PURE__ */ t(be, { children: /* @__PURE__ */ t(
184
+ z,
185
+ {
186
+ onClick: W,
187
+ height: p === T ? 40 : 32,
188
+ width: p === T ? 40 : 32
189
+ }
190
+ ) }) })
191
+ ] }),
192
+ /* @__PURE__ */ t(
193
+ E,
194
+ {
195
+ src: C.TABLE_MODE_REVEAL,
196
+ ref: v,
197
+ settings: he,
198
+ onRender: D
199
+ }
200
+ )
201
+ ] }) })
202
+ ] })
203
+ }
204
+ );
205
+ });
206
+ export {
207
+ He as TablesCard
208
+ };
209
+ //# sourceMappingURL=tables-card.js.map