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AyBY,EAM9EC,EAAsBZ,MAAMa,QAAQL,GAAkBA,EAAiB,CAACA,GACxEM,EA3DR,SAAyBX,GACvB,IAAIW,EAAed,MAAMa,QAAQV,EAAM,IAAMA,EAAM,GAAKA,EAExD,IAAKW,EAAanV,OAAM,SAAUoV,GAChC,MAAsB,oBAARA,CAChB,IAAI,CACF,IAAIC,EAAkBF,EAAa30C,KAAI,SAAU40C,GAC/C,MAAsB,oBAARA,EAAqB,aAAeA,EAAI/yC,MAAQ,WAAa,YAAc+yC,CAC3F,IAAGE,KAAK,MACR,MAAM,IAAIP,MAAM,kGAAoGM,EAAkB,IACxI,CAEA,OAAOF,CACT,CA8CuBI,CAAgBf,GAC/BgB,EAAqBtB,EAAQthC,WAAM,EAAQ,CAAC,WAG9C,OAFA+hC,IAEOG,EAAWliC,MAAM,KAAMxB,UAChC,GAAGjO,OAAO8xC,IAENQ,EAAWvB,GAAQ,WAIrB,IAHA,IAAI/rC,EAAS,GACTnI,EAASm1C,EAAan1C,OAEjBkzC,EAAI,EAAGA,EAAIlzC,EAAQkzC,IAG1B/qC,EAAOxB,KAAKwuC,EAAajC,GAAGtgC,MAAM,KAAMxB,YAK1C,OADAsjC,EAAcc,EAAmB5iC,MAAM,KAAMzK,EAE/C,IAeA,OAdAsK,OAAOijC,OAAOD,EAAU,CACtBX,WAAYA,EACZU,mBAAoBA,EACpBL,aAAcA,EACdQ,WAAY,WACV,OAAOjB,CACT,EACAkB,eAAgB,WACd,OAAOjB,CACT,EACAkB,oBAAqB,WACnB,OAAOlB,EAAkB,CAC3B,IAEKc,CACT,CAIF,CACO,IAAIzkC,EAAgCijC,EAAsBzB,E","sources":["client/hooks/useUserGamePhaseRedirectOnInit.js","client/components/Background.js","client/components/PowerBy.js","client/components/TaskRecordHeader.js","client/components/ClientWrapper.js","client/components/Result/CustomResult/CustomResult.js","client/components/Result/CustomResult/GameCustomResult.js","client/components/Prize/PopupWinnerGet.js","client/components/Result/PopupParticipantJoinAndGetPrize.js","client/components/Result/ResultLotteryTask.js","client/components/Result/ResultPage.js","client/hooks/useLotteryPrizeList.js","hooks/useGetLotteryAndPrizeAndPromoData.js","client/components/JoinGame/PurePrizeGameContainer.js","client/components/JoinGame/GameClient.js","client/game_signForm/Game.js","client/components/JoinGame/Notification.js","client/components/infoDialog/MaskFlowInfoAndAction.js","client/components/infoDialog/ContainerMaskFlowInfoAndAction.js","client/components/JoinGame/JoinWrapper.js","client/components/JoinGame/CoverPage.js","client/components/JoinGame/ResultSubmitingMask.js","client/components/JoinGame/JoinGame.js","client/components/form/Form.js","client/components/Lottery/AnimationContainer.js","client/components/Lottery/Lottery.js","client/AppPromoClient.js","client/RoutePromoClient.js","client/components/Logout.js","components/DialogReferralNotifyCard.js","client/components/Result/ReferralNotify.js","client/components/Result/ResultFooter.js","client/components/Result/Actions/PlayNewEntryButton.js","client/components/Result/Actions/PlayAgainWithoutNewEntryButton.js","editor/game_checkIn/components/ViewRecordsBtn.js","client/components/Result/ResultHeader.js","client/game_checkIn/hooks/useSortedLotteriesTask.js","client/game_checkIn/hooks/useLotteriesTaskPrizeRemainder.js","client/game_checkIn/hooks/useLotteryPrizeDataManage.js","client/game_checkIn/prizePopup/EmptyTaskPrizePopup.js","client/game_checkIn/LotteryTaskCarouselContainer.js","client/game_checkIn/hooks/useHasUserStateReady.js","client/game_checkIn/getLotteryCardRemainderInfo.js","client/game_checkIn/LotteryTaskProcessHint.js","client/game_checkIn/hooks/useLotteriesTaskUtilsState.js","client/hooks/login/usePushLoginEvent.js","client/hooks/useGenerateState.js","api/mgm/client.js","client/hooks/useGetParticipantWinner.js","client/hooks/useGetReferralData.js","client/hooks/useSubmitPasscode.js","client/hooks/useSubmitTrackingApi.js","client/utils/passcode/checkPasscodeVerify.js","client/utils/passcode/usePasscodeManager.js","components/WrapperZoomInWithBlurBg.js","hooks/useGetContentBgColorRgba.js","hooks/usePromoSettingComponentStyle.js","../node_modules/@material-ui/core/esm/Zoom/Zoom.js","../node_modules/@material-ui/icons/ArrowLeft.js","../node_modules/@material-ui/icons/ArrowUpward.js","../node_modules/@material-ui/icons/History.js","../node_modules/@material-ui/icons/PlayCircleFilledWhite.js","../node_modules/@material-ui/icons/Redeem.js","../node_modules/reselect/es/defaultMemoize.js","../node_modules/reselect/es/index.js"],"sourcesContent":["import { useEffect } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport useClientHistory, { JOIN, RESULT } from 'client/hooks/useClientHistory';\nimport useGameActionEnableInfo from 'client/hooks/useGameActionEnableInfo';\nimport useIsInitSuccessInfo from 'client/hooks/useIsInitSuccessInfo';\nimport { isAutoTriggerAnimationGames } from 'config/promoGameTypes';\nimport { updateWinnerAnimationFlag } from 'api/client';\nimport useClientErrorHandler from './useClientErrorHandler';\nimport { setShouldUpdateUserWinnerList } from 'client/redux/modules/flags';\n\nfunction useUserGamePhaseRedirectOnInit() {\n const history = useClientHistory();\n const successInited = useIsInitSuccessInfo();\n const dispatch = useDispatch();\n const { shouldAutoRedirectGameStage } = useGameActionEnableInfo();\n const { isPurePrizeGame } = useSelector(s => s.promoState);\n const { type: gameType, uuid: promoUuid } = useSelector(s => s.promo);\n const { isLogin } = useSelector(s => s.userLoginState);\n const {\n hasGameResult,\n hasFilledSignupForm,\n hasParticipantPrize,\n hasInstantPrize\n } = useSelector(s => s.userEntryState);\n const { unOpenWinnerPrize = [] } = useSelector(s => s.userWinnerPrize);\n const hasUnOpenWinnerPrize = unOpenWinnerPrize.length > 0;\n const errHandler = useClientErrorHandler();\n\n useEffect(() => {\n const init = async () => {\n if (successInited) {\n if (isLogin && shouldAutoRedirectGameStage) {\n if (isAutoTriggerAnimationGames(gameType) && hasUnOpenWinnerPrize) {\n try {\n await Promise.all(\n unOpenWinnerPrize.map(({ entryUuid, prize: { uuid: prizeUuid } }) =>\n updateWinnerAnimationFlag(promoUuid, entryUuid, prizeUuid)\n )\n );\n dispatch(setShouldUpdateUserWinnerList());\n } catch (error) {\n errHandler({ err: error });\n }\n }\n\n if (isPurePrizeGame) {\n // 只要其中一個條件不滿足都會去 join 頁\n // true: 目前沒有任何一個尚未完成的得獎紀錄,但有沒有看過動畫並不一定要在 result 頁來看\n // false: 目前有尚未跑完流程的紀錄\n if (\n hasGameResult &&\n hasFilledSignupForm &&\n hasParticipantPrize &&\n hasInstantPrize\n ) {\n history.replace(RESULT);\n } else {\n history.replace(JOIN);\n }\n } else {\n if (!hasGameResult) {\n history.replace(JOIN);\n } else {\n history.replace(RESULT);\n }\n }\n } else {\n history.replace(JOIN);\n }\n }\n };\n\n init();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [successInited]);\n}\n\nexport default useUserGamePhaseRedirectOnInit;\n","import React, { memo } from 'react';\nimport { useSelector } from 'react-redux';\nimport { css } from '@emotion/core';\n\nimport generateBgStyleByType from 'styles/generateBgStyleByType';\n\nconst Background = () => {\n const { bgType, bgColor, bgImgUrl, bgMobileImgUrl } = useSelector(s => s.settingStyle);\n return (\n \n );\n};\n\nexport default memo(Background);\n\nconst bgStyle = css`\n position: fixed;\n height: 100%;\n width: 100%;\n z-index: -999999;\n`;\n","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { css } from '@emotion/core';\n\nimport { IS_IFRAME_MODE } from 'config/envVariable';\n\nconst PowerBy = () => {\n const {\n promo: { id: promoId },\n sponsor: { name: sponsorName },\n settingPlan: { enablePoweredBy },\n promoState: { scenes },\n appState: { isZinesEmbedded }\n } = useSelector(s => s);\n\n return (!IS_IFRAME_MODE || (scenes === 'plugin' && !isZinesEmbedded)) && enablePoweredBy ? (\n
\n \n {sponsorName} powered by feversocial\n \n
\n ) : null;\n};\n\nexport default PowerBy;\n\nconst powerByStyle = css`\n text-decoration: none;\n background: rgba(255, 255, 255, 0.4);\n color: #333333;\n font-size: 0.875rem;\n width: 100%;\n display: block;\n text-align: center;\n line-height: 32px;\n`;\n","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport i18n from 'i18next';\nimport { css } from '@emotion/core';\nimport querystring from 'query-string';\nimport Button from '@material-ui/core/Button';\nimport ArrowLeftIcon from '@material-ui/icons/ArrowLeft';\nimport FeverIconButton from 'components/common/Button/FeverIconButton';\nimport useClientHistory, { RESULT } from 'client/hooks/useClientHistory';\nimport usePromoSettingThemeStyle from 'client/hooks/usePromoSettingThemeStyle';\nimport { joinRegex } from 'client/hooks/useInitPromo/useInitPromo';\nimport { IS_IFRAME_MODE } from 'config/envVariable';\nimport { isDoNotShowCheckRecordsBtnGames } from 'config/promoGameTypesClientConfig';\nimport { setTextVariantStyle } from 'utils/variantStyle';\n\nconst TaskRecordHeader = ({ promoUuid, taskUuid }) => {\n const gameType = useSelector(s => s.promo.type);\n const userGameResultRecords = useSelector(s => s.userGameResultRecords);\n const history = useClientHistory();\n const themeStyle = usePromoSettingThemeStyle();\n const handleRedirectToParentUrl = () => {\n const queryParams = querystring.parse(window.location.search);\n const qs = createQueryString(queryParams);\n const taskReferrerUrl = createTaskReferrerUrl(promoUuid, qs);\n redirectToUrl(taskReferrerUrl);\n };\n // [#86erauggn] 只要流程帶著指定參數,左上角都顯示返回按鈕\n const shouldBackToMultiChallengeTaskPromoBtn = promoUuid && taskUuid;\n\n const createQueryString = ({ test_code, test_expired }) => {\n return test_code && test_expired\n ? `?${querystring.stringify({ test_code, test_expired })}`\n : '';\n };\n\n const createTaskReferrerUrl = (promoUuid, queryString) => {\n return `https://${window.location.host}/r/promotions/p/${promoUuid}${queryString}`;\n };\n\n const redirectToUrl = url => {\n if (IS_IFRAME_MODE) {\n window.top.location.href = url;\n } else {\n window.location.href = url;\n }\n };\n\n const shouldShowRecordBtn =\n Boolean(window.location?.pathname?.match(joinRegex)) &&\n !isDoNotShowCheckRecordsBtnGames(gameType) &&\n userGameResultRecords.length > 0;\n\n function handleCheckRecord() {\n history.push(RESULT);\n }\n\n return (\n
\n {shouldBackToMultiChallengeTaskPromoBtn && (\n \n )}\n {shouldShowRecordBtn && (\n \n {i18n.t('label.check_record')}\n \n )}\n
\n );\n};\n\nexport default TaskRecordHeader;\n\nconst customButtonStyle = color => css`\n background-color: transparent;\n padding: 8px;\n\n & .MuiBox-root {\n margin-right: 4px;\n\n & .MuiIconButton-root {\n padding: 0;\n }\n\n & .MuiSvgIcon-root {\n color: ${color};\n }\n }\n\n &:hover {\n background-color: transparent;\n }\n\n &:active {\n box-shadow: none;\n }\n`;\n\nconst buttonStyle = color => css`\n color: ${color};\n ${setTextVariantStyle('subtitle2')}\n cursor: pointer;\n padding: 8px;\n margin-left: auto;\n line-height: 24px;\n\n &:hover {\n background-color: transparent;\n }\n\n &:active {\n box-shadow: none;\n }\n`;\n\nconst taskRecordHeaderContainerStyle = css`\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n`;\n","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport { css } from '@emotion/core';\nimport { useLocation } from 'react-router-dom';\n\nimport {\n clientBodyStyle,\n appContainerStyle,\n clientSmallWrapperStyle,\n clientBigWrapperStyle\n} from 'client/styles/common';\nimport { isSmallPromoWidth } from 'config/promoGameTypes';\nimport { useHeightResizePostMessage } from 'client/hooks/useHeightResizePostMessage';\nimport { usePushLoginEvent } from 'client/hooks/login/usePushLoginEvent';\nimport Loading from 'client/components/Loading';\nimport LoadingPromoInit from 'client/components/LoadingPromoInit';\nimport Background from 'client/components/Background';\nimport Logout from 'client/components/Logout';\nimport PowerBy from 'client/components/PowerBy';\nimport TaskRecordHeader from 'client/components/TaskRecordHeader';\nimport { fromEntries } from 'utils/core';\n\nconst ClientWrapper = ({ children }) => {\n usePushLoginEvent();\n const clientBodyRef = useHeightResizePostMessage();\n const { hasInited, hasUserStateInited, hasErrorOnInit } = useSelector(s => s.flags);\n const { shouldGetNextEntry, shouldHideUserStateLoading } = useSelector(s => s.userEntryState);\n const { isWidgetEmbedded, isZinesEmbedded } = useSelector(s => s.appState);\n const { type } = useSelector(s => s.promo);\n const location = useLocation();\n const isBigWidthPage = checkPage(getFinalPath(location));\n const isIniting = !hasInited && !hasErrorOnInit;\n const isInitingUserState = hasInited && !hasUserStateInited && !hasErrorOnInit;\n const canRenderContent = hasInited || hasErrorOnInit;\n const params = new URLSearchParams(location.search);\n const shouldDisplayBackToMultiChallengeTaskPromo =\n params.has('taskUuid') && params.has('promoUuid');\n const isPromoEmbeddedWidgetWithoutZines = isWidgetEmbedded && !isZinesEmbedded;\n\n return (\n <>\n \n {isIniting && }\n {isInitingUserState && !shouldGetNextEntry && !shouldHideUserStateLoading && (\n \n )}\n {shouldGetNextEntry && (\n \n )}\n \n \n \n {canRenderContent && children}\n \n \n \n \n \n );\n};\n\nexport default ClientWrapper;\n\nClientWrapper.propTypes = {\n children: PropTypes.node\n};\n\nfunction getFinalPath(location) {\n const pathName = location.pathname;\n const splitPath = pathName.split('/');\n return splitPath[3];\n}\nfunction checkPage(page) {\n if (page === 'join' || page === 'result' || page === 'prize') {\n return true;\n } else {\n return false;\n }\n}\n\nconst centralPromoStyle = css`\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nconst fullScreenPromoStyle = css`\n width: 100%;\n height: 100vh;\n`;\n\nconst clientWrapperIncludeAdditionalHeaderStyle = css`\n padding-top: 0px;\n\n @media only screen and (max-width: 720px) {\n padding-top: 0px;\n }\n\n @media only screen and (max-width: 767px) {\n padding-top: 0px;\n }\n`;\n","import React, { lazy } from 'react';\nimport PropTypes from 'prop-types';\nimport { useSelector, useDispatch } from 'react-redux';\n\nimport { gameTypes } from 'config/promoGameTypes';\nimport { scrollPromoBodyIntoView } from 'client/utils/scroll';\nimport useClientHistory, { JOIN } from 'client/hooks/useClientHistory';\nimport { replayGame } from 'client/redux/modules/userEntryState';\n\nconst Survey = lazy(() =>\n import(/* webpackChunkName: \"result_survey\" */ 'client/game_survey/CustomResultSection')\n);\nconst Quiz = lazy(() =>\n import(/* webpackChunkName: \"result_quiz\" */ 'client/game_quiz/CustomResultSection')\n);\nconst PsychoQuiz = lazy(() =>\n import(/* webpackChunkName: \"result_psychoquiz\" */ 'client/game_psychoQuiz/CustomResultSection')\n);\nconst Vote = lazy(() =>\n import(/* webpackChunkName: \"result_vote\" */ 'client/game_vote/CustomResultSection')\n);\nconst MemoryMatch = lazy(() =>\n import(\n /* webpackChunkName: \"result_memory_match\" */ 'client/game_memoryMatch/CustomResultSection'\n )\n);\nconst SignUp = lazy(() =>\n import(/* webpackChunkName: \"result_sign_up\" */ 'client/game_signUp/CustomResultSection')\n);\n\nconst Results = {\n [gameTypes.PSYCHO_QUIZ]: PsychoQuiz,\n [gameTypes.QUIZ]: Quiz,\n [gameTypes.SURVEY]: Survey,\n [gameTypes.VOTE]: Vote,\n [gameTypes.MEMORY_MATCH]: MemoryMatch,\n [gameTypes.SIGN_UP]: SignUp\n};\n\nexport default function CustomResult({ page, result, gameResult, latestRecord }) {\n const dispatch = useDispatch();\n const history = useClientHistory();\n const { type } = useSelector(s => s.promo);\n const { loginMethod } = useSelector(s => s.settingPromo);\n const Result = Results[type];\n\n function handleReplay() {\n dispatch(replayGame());\n scrollPromoBodyIntoView();\n history.push(JOIN);\n }\n\n return (\n Boolean(Result) && (\n \n )\n );\n}\n\nCustomResult.propTypes = {\n page: PropTypes.object,\n result: PropTypes.object\n};\n","import React from 'react';\n\nimport CustomResult from 'client/components/Result/CustomResult/CustomResult';\nimport { isObject } from 'utils/objectManipulate';\n\nexport default function GameCustomResult({ gameResultPayload, latestRecord }) {\n const parseData = data => (isObject(data) ? data : JSON.parse(data));\n const { pageInfo, gameResult } = gameResultPayload ? parseData(gameResultPayload) : {};\n return (\n \n );\n}\n","import React from 'react';\nimport { css } from '@emotion/core';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\n\nimport { getForegroundColor, addHoverStyle } from 'styles/common';\nimport { convertRGBtoRGBA } from 'utils/colorConvert';\nimport Popup from 'client/components/Popup';\nimport usePromoSettingThemeStyle from 'client/hooks/usePromoSettingThemeStyle';\n\nconst useStyle = makeStyles({\n endButton: props =>\n addHoverStyle({\n backgroundColor: props.btnColor,\n color: getForegroundColor(props.btnColor),\n '& *': {\n color: getForegroundColor(props.btnColor)\n }\n }),\n popup: props => ({\n backgroundColor: props.contentBgColor,\n '& .MuiDialogTitle-root .MuiTypography-root': {\n color: props.textColor\n },\n margin: '16px'\n })\n});\n\nexport default function PopupWinnerGet({ isOpen, title, onConfirm, btnText, imgSrc, label }) {\n const themeStyle = usePromoSettingThemeStyle();\n const style = useStyle(themeStyle);\n\n return (\n \n
\n {Boolean(imgSrc) && {label}}\n \n {label}\n \n
\n \n );\n}\n\nconst modalContentStyle = css`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n`;\n\nconst prizeImageStyle = css`\n width: auto;\n max-width: 160px;\n max-height: 400px;\n`;\n\nconst prizeTextStyle = css`\n padding: 8px 16px;\n text-align: center;\n`;\n","import React, { memo, useEffect, useState } from 'react';\nimport { useSelector, useDispatch } from 'react-redux';\nimport i18n from 'i18next';\n\nimport { getPrizeInfoAPI } from 'api/client';\nimport { prizeTypes } from 'config/promoPrizeTypes';\nimport { clearParticipantWinnerPopup } from 'client/redux/modules/flags';\nimport useClientHistory, { PRIZE } from 'client/hooks/useClientHistory';\nimport PopupWinnerGet from 'client/components/Prize/PopupWinnerGet';\n\nfunction PopupParticipantJoinAndGetPrize() {\n const dispatch = useDispatch();\n const history = useClientHistory();\n const promoUUID = useSelector(s => s.promo.uuid);\n const {\n participantPrizePopup: { prizeUUID, entryUUID }\n } = useSelector(s => s.flags);\n const [prizeInfo, setPrizeInfo] = useState({});\n const [hasWinner, setHasWinner] = useState(false);\n\n const isThanksPrize = prizeInfo.type === prizeTypes.THANKYOU;\n\n useEffect(() => {\n (async () => {\n if (prizeUUID) {\n try {\n const { payload: prizeData } = await getPrizeInfoAPI(promoUUID, prizeUUID);\n const {\n prize: { name, type, uuid } = {},\n prizeSetting: { imageUrl } = {}\n } = prizeData;\n\n setPrizeInfo({\n name,\n type,\n imageUrl,\n uuid\n });\n setHasWinner(true);\n } catch (error) {\n console.log(error);\n }\n }\n })();\n }, [promoUUID, prizeUUID]);\n\n return (\n {\n dispatch(clearParticipantWinnerPopup());\n if (isThanksPrize) {\n setHasWinner(false);\n } else {\n history.replace(PRIZE, {\n prizeUUID: prizeInfo.uuid,\n entriesUUID: entryUUID\n });\n }\n }}\n btnText={isThanksPrize ? i18n.t('btn.close') : i18n.t('button.receive_prize')}\n />\n );\n}\n\nexport default memo(PopupParticipantJoinAndGetPrize);\n","import React, { useRef } from 'react';\nimport { css } from '@emotion/core';\nimport LotteryTaskCarouselContainer from 'client/game_checkIn/LotteryTaskCarouselContainer';\nimport usePromoSettingComponentStyle from 'hooks/usePromoSettingComponentStyle';\n\nfunction ResultLotteryTask({ referralCount }) {\n const taskCarouselRef = useRef(null);\n const componentStyle = usePromoSettingComponentStyle();\n return (\n
\n \n
\n );\n}\n\nexport default ResultLotteryTask;\n\nconst containerStyle = css`\n width: 100%;\n`;\n","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { css } from '@emotion/core';\n\nimport {\n isMultiResultEntriesGames,\n isShowEntryResultEntryLists\n} from 'config/promoGameTypesClientConfig';\nimport { containerShadow } from 'styles/common';\nimport { routeContainerStyle } from 'client/styles/common';\nimport { isContestGamesWithSecondaryUgc, isSmallPromoWidth } from 'config/promoGameTypes';\n\nimport usePromoSettingThemeStyle from 'client/hooks/usePromoSettingThemeStyle';\nimport usePromoSettingComponentStyle from 'hooks/usePromoSettingComponentStyle';\n\nimport ResultHeader from 'client/components/Result/ResultHeader';\nimport ResultFooter from 'client/components/Result/ResultFooter';\nimport EntriesListContainer from 'client/components/Result/EntriesInfo/EntriesListContainer';\nimport GameCustomResult from 'client/components/Result/CustomResult/GameCustomResult';\nimport PopupParticipantJoinAndGetPrize from 'client/components/Result/PopupParticipantJoinAndGetPrize';\nimport ResultLotteryTask from 'client/components/Result/ResultLotteryTask';\n\nfunction ResultPage() {\n const themeStyle = usePromoSettingThemeStyle();\n const componentStyle = usePromoSettingComponentStyle();\n const { name, type: gameType } = useSelector(s => s.promo);\n const { metaTitle } = useSelector(s => s.settingPromo);\n const { isMgmSelf } = useSelector(s => s.flags);\n const userGameResultRecords = useSelector(s => s.userGameResultRecords);\n const { userGameResultRecords: mgmUserGameResultRecords = [] } = useSelector(\n s => s.mgmReferral\n );\n const { promo: { type: primaryType } = {} } = useSelector(s => s.relatedTwinsPromo) || {};\n const latestRecord = userGameResultRecords[userGameResultRecords.length - 1];\n const customResult = (\n \n );\n return (\n <>\n \n \n \n {/* 活動結果頁:暫時隱藏總共獲得點數顯示 - https://app.clickup.com/t/866ahh78g \n */}\n {isShowEntryResultEntryLists(gameType) && (\n \n )}\n {customResult}\n {isMgmSelf && }\n {/* \n 要有 game result 才能顯示分享按鈕,同時打API取得邀請碼需要在點擊 share button 才打 [#860rzzcjx],\n 但另一個情境是你已經邀請過人,那此時邀請人數是來自 referral api,點擊按鈕再打API就太晚了,沒點擊按鈕就需要顯示已經邀請人數,\n 所以會用 mgmUserGameResultRecords 當作已經邀請人數\n */}\n {/*https://app.clickup.com/t/86enpzxj2\n 只隱藏比賽雙模組的分享按鈕及設定值,純投稿模組須留著\n */}\n {!isContestGamesWithSecondaryUgc(Boolean(primaryType) ? primaryType : gameType) && (\n \n )}\n \n \n );\n}\n\nexport default ResultPage;\n\nconst wrapperStyle = css`\n background: #fff;\n position: relative;\n`;\n","import { useState, useEffect, useMemo } from 'react';\nimport { createSelector } from 'reselect';\nimport { useSelector, useDispatch } from 'react-redux';\nimport _orderBy from 'lodash/orderBy';\n\nimport { lazyGetLotteryPrizeList } from 'client/redux/modules/lotteryPrizes';\nimport { lazyGetMGMtLotteryPrizeList } from 'client/redux/modules/mgmReferral';\n\nconst animatingLotteryAndPrizeSelector = createSelector(\n [s => s.flags, s => s.lotteryPrizes, s => s?.mgmReferral?.lotteryPrizes ?? {}],\n (flags, lotteryPrizes = {}, mgmLotteryPrizes = {}) => {\n const { animatingLotteries } = flags;\n const prizes = { ...mgmLotteryPrizes, ...lotteryPrizes };\n return {\n lotteryUUID: animatingLotteries.uuid,\n lotteryPrizes: prizes\n };\n }\n);\n\nexport function usePurePrizeGamePrizeList() {\n const { lotteryUUID, lotteryPrizes } = useSelector(animatingLotteryAndPrizeSelector);\n const { hasInited } = useSelector(s => s.flags);\n const prizeList = lotteryPrizes[lotteryUUID];\n return useMemo(() => (hasInited ? _orderBy(prizeList ?? [], ['displaySeq']) : null), [\n hasInited,\n prizeList\n ]);\n}\n\nexport function useAnimationPathPrizeList(lotteryUUID, isMgmShare, isMgmSelf) {\n const dispatch = useDispatch();\n const [prizeList, setPrizeList] = useState(null);\n\n useEffect(() => {\n (async () => {\n try {\n let prizes = [];\n if (isMgmShare || isMgmSelf) {\n prizes = await dispatch(lazyGetMGMtLotteryPrizeList({ lotteryUUID }));\n } else {\n prizes = await dispatch(lazyGetLotteryPrizeList({ lotteryUUID }));\n }\n const sortPrizes = _orderBy(prizes, ['displaySeq']);\n setPrizeList(sortPrizes);\n } catch (error) {\n console.log(error);\n }\n })();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [lotteryUUID]);\n\n return prizeList;\n}\n","import { useSelector } from 'react-redux';\n\nexport default function useGetLotteryAndPrizeAndPromoData() {\n const { isMgmSelf, isMgmShare } = useSelector(s => s.flags);\n const isHasReferral = Boolean(isMgmSelf) || Boolean(isMgmShare);\n // ----- 原模組 -----\n const { uuid: promoUuid, id: promoId } = useSelector(s => s.promo);\n const userGameResultRecords = useSelector(s => s.userGameResultRecords);\n const lotteryParticipant = useSelector(s => s.lotteryParticipant);\n const { uuid: lotteryParticipantUuid } = lotteryParticipant;\n const lotteryPrizes = useSelector(s => s.lotteryPrizes || {});\n const lotteryParticipantPrize = lotteryPrizes[lotteryParticipantUuid] || [];\n\n // ----- Referral -----\n const { mgmReferral: { uuid: mgmPromoUuid, id: mgmPromoId } = {} } = useSelector(\n s => s.mgmRelation\n );\n const {\n lotteryParticipant: mgmLotteryParticipant = {},\n lotteryTasks: mgmLotteryTasks = {},\n lotteryPrizes: mgmLotteryPrizes = {}\n } = useSelector(s => s.mgmReferral);\n const { uuid: mgmLotteryParticipantUuid } = mgmLotteryParticipant;\n const mgmLotteryParticipantPrize = mgmLotteryPrizes[mgmLotteryParticipantUuid] || [];\n const mgmLotteryTaskUuids = Object.keys(mgmLotteryTasks);\n const mgmLotteryTaskPrizes = (() => {\n return [].concat.apply(\n [],\n mgmLotteryTaskUuids.map(uuid => mgmLotteryPrizes[uuid])\n );\n })();\n\n // 啟用共用獎\n const isEnableSharePrize = lotteryParticipantPrize.some(({ uuid }) =>\n mgmLotteryParticipantPrize.some(({ uuid: mgmUuid }) => uuid === mgmUuid)\n );\n\n const checkIsNormalPromoEntryByGameResult = (entryUuid = '') => {\n // 透過 GameResult 來判斷該 Entry 是來自一般模組還是 Referral\n return Boolean(userGameResultRecords.find(({ uuid } = {}) => uuid === entryUuid));\n };\n\n const checkIsReferralPrize = (prizeUuid, entryUuid) => {\n return isEnableSharePrize\n ? checkIsNormalPromoEntryByGameResult(entryUuid)\n ? false\n : true\n : mgmLotteryParticipantPrize.some((item = {}) => item.uuid === prizeUuid) ||\n mgmLotteryTaskPrizes.some(({ uuid } = {}) => uuid === prizeUuid);\n };\n\n const getPromoByPrizeAndEntry = (prizeUuid, entryUuid) => {\n return isHasReferral && checkIsReferralPrize(prizeUuid, entryUuid)\n ? { uuid: mgmPromoUuid, id: mgmPromoId }\n : { uuid: promoUuid, id: promoId };\n };\n\n return {\n isEnableSharePrize,\n getPromoByPrizeAndEntry\n };\n}\n","import React, { useState, useEffect, useMemo, useCallback } from 'react';\nimport { useSelector, useDispatch } from 'react-redux';\nimport { css } from '@emotion/core';\nimport i18n from 'i18next';\n\nimport { prizeTypes, getPrizeTypeLabel } from 'config/promoPrizeTypes';\nimport { updateWinnerAnimationFlag } from 'api/client';\nimport { setShouldUpdateUserWinnerList, setAnimatingLotteries } from 'client/redux/modules/flags';\nimport {\n clearCurrentPrizeUUID,\n clearCurrentUnanimationEntriesUUID,\n setGameNotReadyToPlay\n} from 'client/redux/modules/purePrizeState';\nimport { gtmPushPrize } from 'client/utils/tracking';\nimport parseAnimationSettings from 'utils/parseAnimationSettings';\n\nimport { usePurePrizeGamePrizeList } from 'client/hooks/useLotteryPrizeList';\nimport useClientHistory, { RESULT, PRIZE } from 'client/hooks/useClientHistory';\n\nimport PopupWinnerGet from 'client/components/Prize/PopupWinnerGet';\nimport useGetLotteryAndPrizeAndPromoData from 'hooks/useGetLotteryAndPrizeAndPromoData';\n\nexport default function PurePrizeGameContainer({ onPurePrizeGameFinish, children }) {\n const dispatch = useDispatch();\n const history = useClientHistory();\n\n const [isWinnerModalOpen, setIsWinnerModalOpen] = useState(false);\n const { loginId } = useSelector(s => s.userLoginState);\n const {\n currentEntryUUID,\n hasGameResult,\n hasFilledSignupForm,\n hasParticipantPrize\n } = useSelector(s => s.userEntryState);\n const { currentPrizeUUID, isGameReadyToPlay, currentUnanimationEntriesUUID } = useSelector(\n s => s.purePrizeState\n );\n const { AnimationSettings, type: lotteryParticipantType, uuid: lotteryParticipantUUID } =\n useSelector(s => s.lotteryParticipant) || {};\n const parsedAnimationSettings = useMemo(() => parseAnimationSettings(AnimationSettings ?? {}), [\n AnimationSettings\n ]);\n const entriesUUID = currentUnanimationEntriesUUID || currentEntryUUID;\n const lotteryParticipantPrizeList = usePurePrizeGamePrizeList();\n\n const { getPromoByPrizeAndEntry } = useGetLotteryAndPrizeAndPromoData();\n const { uuid: promoUUID, id: promoId } = getPromoByPrizeAndEntry(currentPrizeUUID, entriesUUID);\n\n const onWinnerModalOpenHandler = () => setIsWinnerModalOpen(true);\n const onWinnerModalCloseHandler = () => setIsWinnerModalOpen(false);\n\n const callbackAfterAnimationPlayed = useCallback(() => {\n dispatch(setGameNotReadyToPlay());\n onWinnerModalOpenHandler();\n }, [dispatch]);\n\n // 執行純獎流程的 callback\n const executePurePrizeFlowHandler = useCallback(async () => {\n // Ex: 點擊戳戳樂外框,已經開始執行純獎流程,但戳戳樂沒有戳破獎項,所以沒有拿到 prizeUUID,所以提早 return,不執行 store game result\n if (currentPrizeUUID) {\n return;\n }\n // 選定要配的獎項,但還沒 store game result,執行 onPurePrizeGameFinish\n if (!hasGameResult || !hasFilledSignupForm || !hasParticipantPrize) {\n await onPurePrizeGameFinish();\n }\n }, [\n currentPrizeUUID,\n hasFilledSignupForm,\n hasGameResult,\n hasParticipantPrize,\n onPurePrizeGameFinish\n ]);\n\n // 遊戲設定及是否可遊玩 flag\n const gameProps = useMemo(() => {\n return {\n // 已經 parse 過的動畫設定值,若拿到空物件則代表沒有任何動畫設定值,這時候需要給遊戲本身的預設值\n animationSettings: parsedAnimationSettings,\n\n // isGameReadyToPlay 代表純獎流程的前置作業都跑好且條件也都滿足了\n // 遊戲隨時可以開始的意思,可以把它作為遊戲動畫的依賴觸發\n isGameReadyToPlay\n };\n }, [parsedAnimationSettings, isGameReadyToPlay]);\n\n // 獎品相關資訊\n const prizeProps = useMemo(() => {\n const winnerInfo =\n // 當抓到參加獎的獎品資訊以及得獎獎品 UUID 時才搜尋,否則給空物件,避免回傳 undefined\n lotteryParticipantPrizeList && currentPrizeUUID\n ? lotteryParticipantPrizeList.find(\n lotteryParticipantPrize => lotteryParticipantPrize.uuid === currentPrizeUUID\n ) || {}\n : {};\n // 取得得獎獎品相關資訊,獎品圖網址、獎品名稱、獎品類型\n const { settings: { imageUrl } = {}, name: prizeText, type: prizeType } = winnerInfo;\n return {\n // 參加獎的獎品列表\n lotteryParticipantPrizeList,\n // 獲獎的獎品相關資訊\n winnerInfo: {\n prizeUUID: currentPrizeUUID,\n prizeImageUrl: imageUrl,\n prizeText,\n prizeType\n }\n };\n }, [currentPrizeUUID, lotteryParticipantPrizeList]);\n\n // 開獎與發送 prize gtm event\n const updateWinnerFlag = useCallback(async () => {\n try {\n if (currentPrizeUUID) {\n await updateWinnerAnimationFlag(promoUUID, entriesUUID, currentPrizeUUID);\n gtmPushPrize({\n prizeName: prizeProps.winnerInfo.prizeText,\n prizeType: getPrizeTypeLabel(prizeProps.winnerInfo.prizeType),\n loginId,\n promoId\n });\n dispatch(setShouldUpdateUserWinnerList());\n }\n } catch (error) {\n console.log('Failed to update winner animation flag:', error);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [currentPrizeUUID, entriesUUID, promoUUID]);\n\n // 各種更新狀態的 callback\n const callbackProps = useMemo(\n () => ({\n // 更新看過獎品動畫的 flag\n updateWinnerFlag,\n // 在動畫結束後要呼叫的 callback,它會去 update 純獎的動畫狀態,並且開啟得獎 pop-up\n callbackAfterAnimationPlayed,\n executePurePrizeFlowHandler\n }),\n [callbackAfterAnimationPlayed, executePurePrizeFlowHandler, updateWinnerFlag]\n );\n\n const isThanksPrize = prizeProps.winnerInfo.prizeType === prizeTypes.THANKYOU;\n\n useEffect(() => {\n if (lotteryParticipantUUID) {\n dispatch(\n setAnimatingLotteries({\n type: lotteryParticipantType,\n uuid: lotteryParticipantUUID,\n animationSettings: AnimationSettings\n })\n );\n }\n }, [AnimationSettings, dispatch, lotteryParticipantType, lotteryParticipantUUID]);\n\n return (\n
\n {lotteryParticipantPrizeList && (\n <>\n {children({\n ...gameProps,\n ...prizeProps,\n ...callbackProps,\n onPurePrizeGameFinish\n })}\n {\n onWinnerModalCloseHandler();\n dispatch(clearCurrentPrizeUUID());\n dispatch(clearCurrentUnanimationEntriesUUID());\n\n if (isThanksPrize) {\n history.replace(RESULT);\n } else {\n history.replace(PRIZE, {\n prizeUUID: currentPrizeUUID,\n entriesUUID: entriesUUID\n });\n }\n }}\n btnText={\n isThanksPrize ? i18n.t('btn.close') : i18n.t('button.receive_prize')\n }\n />\n \n )}\n
\n );\n}\n\nconst rootContainerStyle = css`\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n","import React, { lazy } from 'react';\nimport PropTypes from 'prop-types';\nimport { useSelector } from 'react-redux';\n\nimport { gameTypes } from 'config/promoGameTypes';\nimport SignForm from 'client/game_signForm/Game';\nimport PurePrizeGameContainer from 'client/components/JoinGame/PurePrizeGameContainer';\n\nconst PsychoQuiz = lazy(() =>\n import(/* webpackChunkName: \"client_psycho_quiz\" */ 'client/game_psychoQuiz/Game')\n);\nconst Quiz = lazy(() => import(/* webpackChunkName: \"client_quiz\" */ 'client/game_quiz/Game'));\nconst Survey = lazy(() =>\n import(/* webpackChunkName: \"client_survey\" */ 'client/game_survey/Game')\n);\nconst Vote = lazy(() => import(/* webpackChunkName: \"client_vote\" */ 'client/game_vote/Game'));\nconst Invoice = lazy(() =>\n import(/* webpackChunkName: \"client_invoice\" */ 'client/game_invoice/Game')\n);\nconst Winwheel = lazy(() =>\n import(/* webpackChunkName: \"client_winwheel\" */ 'client/game_winwheel/Game')\n);\nconst PokeGame = lazy(() => import(/* webpackChunkName: \"client_poke\" */ 'client/game_poke/Game'));\nconst ScratchCard = lazy(() =>\n import(/* webpackChunkName: \"client_scratch_card\" */ 'client/game_scratchCard/Game')\n);\nconst RedEnvelopeRain = lazy(() =>\n import(/* webpackChunkName: \"client_red_envelop_rain\" */ 'client/game_redEnvelopeRain/Game')\n);\nconst PhotoUpload = lazy(() =>\n import(/* webpackChunkName: \"client_photo_upload\" */ 'client/game_photoUpload/Game')\n);\nconst CheckIn = lazy(() =>\n import(/* webpackChunkName: \"client_check_in\" */ 'client/game_checkIn/Game')\n);\nconst PhotoFrameComposite = lazy(() =>\n import(\n /* webpackChunkName: \"client_photo_frame_composite\" */ 'client/game_photoFrameComposite/Game'\n )\n);\nconst Slots = lazy(() => import(/* webpackChunkName: \"client_slots\" */ 'client/game_slots/Game'));\nconst PickThePrize = lazy(() =>\n import(/* webpackChunkName: \"client_pick_the_prize\" */ 'client/game_pickThePrize/Game')\n);\nconst Comment = lazy(() =>\n import(/* webpackChunkName: \"client_comment\" */ 'client/game_comment/Game')\n);\nconst MemoryMatch = lazy(() =>\n import(/* webpackChunkName: \"client_memory_match\" */ 'client/game_memoryMatch/Game')\n);\nconst PhotoFrameCompositeChallenge = lazy(() =>\n import(\n /* webpackChunkName: \"client_photo_frame_composite_challenge\" */ 'client/game_photoFrameCompositeChallenge/Game'\n )\n);\nconst VotingContest = lazy(() =>\n import(/* webpackChunkName: \"client_voting_contest\" */ 'client/game_votingContest/Game')\n);\nconst VideoUpload = lazy(() =>\n import(/* webpackChunkName: \"client_video_upload\" */ 'client/game_videoUpload/Game')\n);\nconst InstagramModule = lazy(() =>\n import(/* webpackChunkName: \"client_game_instagram\" */ 'client/game_instagram/Game')\n);\nconst PurchaseReward = lazy(() =>\n import(/* webpackChunkName: \"client_purchase_reward\" */ 'client/game_purchaseReward/Game')\n);\nconst PointsRedeem = lazy(() =>\n import(/* webpackChunkName: \"client_points_redeem\" */ 'client/game_pointsRedeem/Game')\n);\nconst SignUp = lazy(() =>\n import(/* webpackChunkName: \"client_sign_up\" */ 'client/game_signUp/Game')\n);\nconst MgmShare = lazy(() =>\n import(/* webpackChunkName: \"client_check_in\" */ 'client/game_mgmShare/Game')\n);\nconst MultiChallenge = lazy(() =>\n import(/* webpackChunkName: \"client_check_in\" */ 'client/game_multiChallenge/Game')\n);\nconst OrderReward = lazy(() =>\n import(/* webpackChunkName: \"client_order_reward\" */ 'client/game_orderReward/Game')\n);\nconst CartReward = lazy(() =>\n import(/* webpackChunkName: \"client_cart_reward\" */ 'client/game_cartReward/Game')\n);\n\n// 分三種 Client: 一般模組、純獎模組、好禮自由選\nconst Games = {\n [gameTypes.PSYCHO_QUIZ]: PsychoQuiz,\n [gameTypes.SIGN_FORM]: SignForm,\n [gameTypes.QUIZ]: Quiz,\n [gameTypes.SURVEY]: Survey,\n [gameTypes.VOTE]: Vote,\n [gameTypes.INVOICE]: Invoice,\n [gameTypes.PHOTO_UPLOAD]: PhotoUpload,\n [gameTypes.CHECK_IN]: CheckIn,\n [gameTypes.PHOTO_FRAME_COMPOSITE]: PhotoFrameComposite,\n [gameTypes.MEMORY_MATCH]: MemoryMatch,\n [gameTypes.COMMENT]: Comment,\n [gameTypes.CHALLENGE_PHOTO_FRAME_COMPOSITE]: PhotoFrameCompositeChallenge,\n [gameTypes.CONTEST_ADMIN_UPLOAD]: VotingContest,\n [gameTypes.VIDEO_UPLOAD]: VideoUpload,\n [gameTypes.INSTAGRAM]: InstagramModule,\n [gameTypes.PURCHASE_REWARD]: PurchaseReward,\n [gameTypes.SIGN_UP]: SignUp,\n [gameTypes.MGM_SHARE]: MgmShare,\n [gameTypes.MULTI_CHALLENGE]: MultiChallenge,\n [gameTypes.ORDER_REWARD]: OrderReward,\n [gameTypes.CART_REWARD]: CartReward\n};\n\nconst PurePrizeGames = {\n [gameTypes.WIN_WHEEL]: Winwheel,\n [gameTypes.POKE_GAME]: PokeGame,\n [gameTypes.SCRATCH_CARD]: ScratchCard,\n [gameTypes.RED_ENVELOPE_RAIN]: RedEnvelopeRain,\n [gameTypes.SLOTS]: Slots,\n [gameTypes.POINTS_REDEEM]: PointsRedeem\n};\n\nexport default function GameClient({ onGameFinish, onPurePrizeGameFinish }) {\n const { type } = useSelector(s => s.promo);\n const { isPurePrizeGame } = useSelector(s => s.promoState);\n const Game = Games[type] || 'div';\n const PurePrizeGame = PurePrizeGames[type] || 'div';\n const isPickThePrize = type === gameTypes.PICK_THE_PRIZE;\n\n return isPickThePrize ? (\n \n ) : isPurePrizeGame ? (\n \n {props => }\n \n ) : (\n \n );\n}\n\nGameClient.propTypes = {\n onGameFinish: PropTypes.func,\n onPurePrizeGameFinish: PropTypes.func\n};\n","import React, { useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { useSelector } from 'react-redux';\nimport TextBoxClient from 'client/components/TextBoxClient';\nimport usePromoSettingComponentStyle from 'hooks/usePromoSettingComponentStyle';\nimport { useDispatch } from 'react-redux';\nimport { updateFirstPassLoginSeverStatus } from 'client/redux/modules/promoState';\nimport useGenerateState from 'client/hooks/useGenerateState';\nexport default function Game({ onGameFinish }) {\n const dispatch = useDispatch();\n const { isAfterReduceFeverPoint, isFirstPassLogin, isAfterVerifyPasscode } = useGenerateState();\n const coverPageContent = useSelector(s => s.settingGame.coverPageContent);\n const componentStyle = usePromoSettingComponentStyle();\n\n useEffect(() => {\n if (isFirstPassLogin) {\n dispatch(updateFirstPassLoginSeverStatus());\n onGameFinish();\n } else if (isAfterReduceFeverPoint) {\n onGameFinish();\n } else if (isAfterVerifyPasscode) {\n onGameFinish();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isFirstPassLogin, isAfterReduceFeverPoint, isAfterVerifyPasscode]);\n\n return (\n \n );\n}\n\nGame.propTypes = {\n onGameFinish: PropTypes.func\n};\n","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { css } from '@emotion/core';\nimport { Trans } from 'react-i18next';\nimport usePromoSettingThemeStyle from 'client/hooks/usePromoSettingThemeStyle';\nimport Emphasize from 'components/Emphasize';\n\nfunction Notification() {\n const themeStyle = usePromoSettingThemeStyle();\n const lotteryParticipant = useSelector(s => s.lotteryParticipant);\n const { isMgmShare } = useSelector(s => s.flags);\n const { lotteryParticipant: mgmLotteryParticipant = {} } = useSelector(s => s.mgmReferral);\n\n const currentLotteryParticipant = (function (isMgmShare) {\n if (isMgmShare) {\n return mgmLotteryParticipant;\n }\n return lotteryParticipant;\n })(isMgmShare);\n\n const { hasAnnounced: prizeAnnounce } = currentLotteryParticipant;\n\n const annouce = Boolean(prizeAnnounce) && (\n \n }\n />\n \n );\n\n return (\n Boolean(annouce) && (\n
\n {annouce}\n
\n )\n );\n}\n\nexport default Notification;\n\nconst wrapperStyle = css`\n background-color: #ffffff;\n border-top-right-radius: 8px;\n border-top-left-radius: 8px;\n overflow: hidden;\n`;\n\nconst Message = ({ children, color }) => {\n return
{children}
;\n};\n\nconst messageStyle = css`\n height: 40px;\n text-align: center;\n line-height: 40px;\n font-size: 0.875rem;\n font-weight: 500;\n`;\n","import React, { useEffect, useState } from 'react';\nimport { useSelector } from 'react-redux';\nimport { css } from '@emotion/core';\n\nimport {\n useCheckerContext,\n checkTypes\n} from 'client/components/infoDialog/ProviderFlowInfoAndActionChecker';\n\nfunction MaskFlowInfoAndAction() {\n // as force update trigger\n const newReduxState = useSelector(s => s);\n const checkerApi = useCheckerContext();\n const [coverMask, setCoverMask] = useState(false);\n\n useEffect(() => {\n if (\n checkerApi.check(\n [checkTypes.LOGIN_STATUS, checkTypes.PROMO_STATUS, checkTypes.QUALIFY_STATUS],\n false\n )\n ) {\n setCoverMask(false);\n } else {\n setCoverMask(true);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [newReduxState]);\n\n return (\n \n checkerApi.check([\n checkTypes.LOGIN_STATUS,\n checkTypes.PROMO_STATUS,\n checkTypes.QUALIFY_STATUS\n ])\n }\n />\n );\n}\n\nexport default MaskFlowInfoAndAction;\n\nconst maskStyle = css`\n position: absolute;\n right: 0;\n left: 0;\n top: 0;\n bottom: 0;\n z-index: 5;\n cursor: pointer;\n pointer-events: none;\n`;\n\nconst coverMaskStyle = css`\n pointer-events: auto;\n`;\n","import React from 'react';\nimport { useSelector } from 'react-redux';\n\nimport { isNoResultPageGames, isPassMaskFlowGames } from 'config/promoGameTypesClientConfig';\n\nimport MaskFlowInfoAndAction from 'client/components/infoDialog/MaskFlowInfoAndAction';\n\nfunction ContainerMaskFlowInfoAndAction() {\n const { type: gameType } = useSelector(s => s.promo);\n const { currentPrizeUUID, currentUnanimationEntriesUUID } = useSelector(s => s.purePrizeState);\n const isPurePrizeGamePlayingUnOpenWinner =\n Boolean(currentPrizeUUID) && Boolean(currentUnanimationEntriesUUID);\n\n if (\n [\n isPurePrizeGamePlayingUnOpenWinner,\n isNoResultPageGames(gameType),\n isPassMaskFlowGames(gameType)\n ].some(e => e)\n ) {\n return null;\n }\n return ;\n}\n\nexport default React.memo(ContainerMaskFlowInfoAndAction);\n","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { css } from '@emotion/core';\n\nimport { preventMarginCollapse, containerShadow } from 'styles/common';\n\nimport useGetContentBgColorRgba from 'hooks/useGetContentBgColorRgba';\n\nimport Notification from 'client/components/JoinGame/Notification';\nimport ContainerMaskFlowInfoAndAction from 'client/components/infoDialog/ContainerMaskFlowInfoAndAction';\n\nexport default function JoinWrapper({ children }) {\n const { isPurePrizeGame } = useSelector(s => s.promoState);\n const { alpha } = useGetContentBgColorRgba();\n const isContentBgColorTransparent = alpha === 0;\n const showBgShadow = !isPurePrizeGame && !isContentBgColorTransparent;\n\n return (\n
\n \n \n {children}\n
\n );\n}\n\nconst getContentWrapperStyle = showShadow => css`\n position: relative;\n ${showShadow ? containerShadow : ''}\n`;\n\nconst borderStyle = css`\n border-top-right-radius: 8px;\n border-top-left-radius: 8px;\n`;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport TextBoxClient from 'client/components/TextBoxClient';\nimport usePromoSettingComponentStyle from 'hooks/usePromoSettingComponentStyle';\n\nexport default function CoverPage({ onClick = () => {}, content }) {\n const componentStyle = usePromoSettingComponentStyle();\n\n return (\n \n );\n}\n\nCoverPage.propTypes = {\n onClick: PropTypes.func,\n content: PropTypes.string\n};\n","import React from 'react';\n\nimport Loading from 'client/components/Loading';\n\nexport default function ResultSubmitingMask({ show }) {\n return show && ;\n}\n","import React, { useState, useRef } from 'react';\nimport { useSelector, useDispatch, useStore } from 'react-redux';\nimport i18n from 'i18next';\n\nimport * as clientErrTypes from 'config/clientErrorTypes';\nimport { gameTypes, isPurePrizeGames } from 'config/promoGameTypes';\nimport { isNoResultPageGames } from 'config/promoGameTypesClientConfig';\nimport { checkTrackingStatus, submitForm, submitPromo } from 'api/client';\nimport { gtmPushUserPromoEnter } from 'client/utils/tracking';\nimport { scrollPromoBodyIntoView } from 'client/utils/scroll';\nimport { successPlayGame, setNeedEnterPasscode } from 'client/redux/modules/userEntryState';\nimport { updateGameResultRecords } from 'client/redux/modules/userGameResultRecords';\nimport { showCustomErrDialog, handlers } from 'client/redux/modules/systemErrorDialog';\n\nimport useGameActionEnableInfo from 'client/hooks/useGameActionEnableInfo';\nimport useClientHistory, { RESULT, SIGNUP_FORM, JOIN } from 'client/hooks/useClientHistory';\nimport useClientErrorHandler, { generateApiErrObj } from 'client/hooks/useClientErrorHandler';\nimport useSubmitTrackingApi from 'client/hooks/useSubmitTrackingApi';\nimport useGetParticipantWinner from 'client/hooks/useGetParticipantWinner';\nimport useSubmitPasscode from 'client/hooks/useSubmitPasscode';\n\nimport GameClient from 'client/components/JoinGame/GameClient';\nimport JoinWrapper from 'client/components/JoinGame/JoinWrapper';\nimport CoverPage from 'client/components/JoinGame/CoverPage';\nimport ResultSubmitingMask from 'client/components/JoinGame/ResultSubmitingMask';\nimport usePasscodeManager from 'client/utils/passcode/usePasscodeManager';\nimport { getErrorTypeDialogDesc, getPasscodeErrorType, errorTypes } from 'config/passcode';\nimport DialogReCaptcha from 'components/Dialog/DialogReCaptcha';\nimport { setReJoin } from 'client/redux/modules/flags';\n\nexport default function JoinGame() {\n const dispatch = useDispatch();\n const store = useStore();\n\n const history = useClientHistory();\n const errHandler = useClientErrorHandler();\n const submitTrackingData = useSubmitTrackingApi();\n const actionEnableState = useGameActionEnableInfo();\n const getParticipantWinner = useGetParticipantWinner();\n const handleSubmitPasscode = useSubmitPasscode();\n const userGameResultRecords = useSelector(s => s.userGameResultRecords);\n const { id: promoId, uuid: promoUUID, type: gameType } = useSelector(s => s.promo);\n const { enableCoverPage = false } = useSelector(s => s.settingPromo);\n const { formId: gameFormId, coverPageContent } = useSelector(s => s.settingGame);\n const { showAfterGame: toSignUpFormAfterGame } = useSelector(s => s.signUpForm);\n const { currentEntryId, currentEntryUUID, hasGameResult, hasFilledSignupForm } = useSelector(\n s => s.userEntryState\n );\n const { enablePasscodeVerify } = useSelector(s => s.promoState);\n const { id: sponsorId } = useSelector(s => s.sponsor);\n const { loginId } = useSelector(s => s.userLoginState);\n\n const {\n updatePasscodeList,\n removePasscode,\n continueVerifyPasscode,\n isShowReCaptcha,\n setShowReCaptcha\n } = usePasscodeManager({\n hasVerifiedPasscodeFirstTime: Boolean(\n userGameResultRecords.find(({ id }) => id === currentEntryId)?.flow?.gameResult\n )\n });\n const [isCoverPagePhase, setIsCoverPagePhase] = useState(enableCoverPage);\n const [isSubmitting, setIsSubmitting] = useState(false);\n const isLoading = useRef();\n const showCoverPage = gameType !== gameTypes.SIGN_FORM && isCoverPagePhase;\n\n async function handleGeneralGameFinish(\n { gameValues, headers, additionalErrLog = {} } = {},\n gameErrHandlingCallback = () => {},\n gameActionAfterSubmit = () => Promise.resolve()\n ) {\n // 直接從 Redux store 獲取最新的 currentEntryUUID,避免閉包問題\n const latestState = store.getState();\n const entryUUID = latestState?.userEntryState?.currentEntryUUID || currentEntryUUID;\n const shouldNotCallSubmit =\n !entryUUID ||\n isLoading.current ||\n !actionEnableState.isQualifiedToPlayGame ||\n !actionEnableState.isUserInputReady;\n\n if (shouldNotCallSubmit) return;\n try {\n setIsSubmitting(true);\n isLoading.current = true;\n let gameResultRecords = userGameResultRecords;\n if (!hasGameResult) {\n const { hasUsablePasscode, passcode, error } = await handleSubmitPasscode();\n if (error) {\n return;\n }\n await submitTracking();\n const body = { entryUuid: entryUUID, data: gameValues };\n const resp = await (Boolean(gameFormId)\n ? submitForm(gameFormId, body, headers)\n : submitPromo({\n promoUUID,\n entryUUID: body.entryUuid,\n body: body.data\n }));\n if (resp.httpStatus !== 200) {\n const errorMsgs = gameErrHandlingCallback(resp);\n if (errorMsgs) {\n await gameActionAfterSubmit({ success: false, errorMsgs });\n return {\n error: true,\n errorMsgs\n };\n } else {\n if ([errorTypes.ENTRY_NEED_PASSCODE].includes(getPasscodeErrorType(resp))) {\n dispatch(\n showCustomErrDialog({\n title: i18n.t('label.no_qualify_join'),\n desc: getErrorTypeDialogDesc(getPasscodeErrorType(resp)),\n handler: handlers.PASSCODE_DENIED\n })\n );\n return;\n }\n\n resp.additionalInfo = JSON.stringify({\n additionalErrLog\n });\n resp.errSerialNo = currentEntryId;\n throw generateApiErrObj(resp, `${clientErrTypes.JOIN_GAME}-${gameType}`);\n }\n } else {\n dispatch(setReJoin(false));\n // Cookie 只存取還可以使用多次的 passcode,所以當 passcode 只可以使用一次時,需要從 cookie 中移除\n if (hasUsablePasscode) {\n updatePasscodeList(passcode);\n } else {\n removePasscode(passcode);\n }\n await gameActionAfterSubmit({ success: true });\n\n gameResultRecords = await handleAfterSubmit();\n }\n }\n await handleSetGameResultDone(gameResultRecords);\n return true;\n } catch (err) {\n errHandler({ err });\n return false;\n } finally {\n setIsSubmitting(false);\n isLoading.current = false;\n }\n }\n async function handlePurePrizeGameFinish() {\n const latestState = store.getState();\n const entryUUID = latestState?.userEntryState?.currentEntryUUID || currentEntryUUID;\n const shouldNotCallSubmit =\n !entryUUID ||\n isLoading.current ||\n !actionEnableState.isQualifiedToPlayGame ||\n !actionEnableState.isUserInputReady;\n\n if (shouldNotCallSubmit) return;\n try {\n setIsSubmitting(true);\n isLoading.current = true;\n let gameResultRecords = userGameResultRecords;\n if (!hasGameResult) {\n const { hasUsablePasscode, passcode, error } = await handleSubmitPasscode();\n if (error) {\n return;\n }\n await submitTracking();\n const body = { entryUuid: entryUUID };\n // 因為兑點模組是純獎模租,所以完成遊戲時會 call handlePurePrizeGameFinish,但他是唯一的非 form based 純獎模租\n // 所以建立模組時不會有 formId (沒開填表情況下),Set game result 是 call submitPromo 而非 submitForm\n const resp = await (Boolean(gameFormId)\n ? submitForm(gameFormId, body)\n : submitPromo({\n promoUUID,\n entryUUID: body.entryUuid,\n body: body.data\n }));\n if (resp.httpStatus !== 200) {\n if ([errorTypes.ENTRY_NEED_PASSCODE].includes(getPasscodeErrorType(resp))) {\n dispatch(\n showCustomErrDialog({\n title: i18n.t('label.no_qualify_join'),\n desc: getErrorTypeDialogDesc(getPasscodeErrorType(resp)),\n handler: handlers.PASSCODE_DENIED\n })\n );\n return;\n }\n resp.errType = `${clientErrTypes.JOIN_PURE_PRIZE_GAME}-${gameType}`;\n resp.errSerialNo = currentEntryId;\n throw generateApiErrObj(\n resp,\n `${clientErrTypes.JOIN_PURE_PRIZE_GAME}-${gameType}`\n );\n }\n dispatch(setReJoin(false));\n // Cookie 只存取還可以使用多次的 passcode,所以當 passcode 只可以使用一次時,需要從 cookie 中移除\n if (hasUsablePasscode) {\n updatePasscodeList(passcode);\n } else {\n removePasscode(passcode);\n }\n\n gameResultRecords = await handleAfterSubmit();\n }\n await handleSetGameResultDone(gameResultRecords);\n return true;\n } catch (err) {\n errHandler({\n err\n });\n return false;\n } finally {\n setIsSubmitting(false);\n isLoading.current = false;\n }\n }\n async function handleAfterSubmit() {\n const latestState = store.getState();\n const entryUUID = latestState?.userEntryState?.currentEntryUUID || currentEntryUUID;\n const gameResultRecords = await dispatch(updateGameResultRecords());\n dispatch(successPlayGame());\n gtmPushUserPromoEnter({\n loginId,\n entryUuid: entryUUID,\n promoId,\n sponsorId,\n gameType\n });\n return gameResultRecords;\n }\n async function handleSetGameResultDone(gameResultRecords = []) {\n if (\n enablePasscodeVerify &&\n Boolean(gameResultRecords.find(({ id }) => id === currentEntryId)?.flow?.gameResult)\n ) {\n dispatch(setNeedEnterPasscode(false));\n }\n if (hasFilledSignupForm) {\n await getParticipantWinner(gameResultRecords);\n if (!isNoResultPageGames(gameType) && !isPurePrizeGames(gameType)) {\n scrollPromoBodyIntoView();\n }\n } else {\n scrollPromoBodyIntoView();\n if (gameType === gameTypes.PICK_THE_PRIZE || gameType === gameTypes.POINTS_REDEEM) {\n history.push(JOIN);\n } else {\n history.push(Boolean(toSignUpFormAfterGame) ? SIGNUP_FORM : RESULT);\n }\n }\n }\n\n async function submitTracking() {\n let retry = 0;\n let status = 0;\n const latestState = store.getState();\n const entryUUID = latestState?.userEntryState?.currentEntryUUID || currentEntryUUID;\n do {\n const resp = await checkTrackingStatus({ promoUUID, entriesUUID: entryUUID });\n if (resp.payload.data) {\n status = 1;\n } else {\n const res = await submitTrackingData({ promoUUID, entriesUUID: entryUUID });\n const isSuccess = Boolean(res?.payload?.data?.[0]);\n if (isSuccess) status = 1;\n }\n\n retry++;\n } while (status === 0 && retry < 3);\n }\n\n return (\n <>\n {isShowReCaptcha && (\n \n )}\n \n \n {showCoverPage ? (\n setIsCoverPagePhase(false)}\n />\n ) : (\n \n )}\n \n \n );\n}\n","import React, { lazy } from 'react';\nimport { Route, Switch } from 'react-router-dom';\n\nconst SignupForm = lazy(() =>\n import(/* webpackChunkName: \"client_form_signup\" */ 'client/components/form/SignupForm')\n);\nconst RedeemForm = lazy(() =>\n import(/* webpackChunkName: \"client_form_redeem\" */ 'client/components/form/RedeemForm')\n);\n\nexport default function Form({ match }) {\n return (\n \n \n \n \n );\n}\n","import React, { useState, useMemo, useCallback } from 'react';\nimport { useSelector } from 'react-redux';\nimport i18n from 'i18next';\n\nimport { updateWinnerAnimationFlag } from 'api/client';\nimport { prizeTypes, getPrizeTypeLabel } from 'config/promoPrizeTypes';\nimport parseAnimationSettings from 'utils/parseAnimationSettings';\nimport useClientHistory, { RESULT, PRIZE } from 'client/hooks/useClientHistory';\nimport { useAnimationPathPrizeList } from 'client/hooks/useLotteryPrizeList';\nimport { gtmPushPrize } from 'client/utils/tracking';\nimport PopupWinnerGet from 'client/components/Prize/PopupWinnerGet';\nimport useGetLotteryAndPrizeAndPromoData from 'hooks/useGetLotteryAndPrizeAndPromoData';\n\nexport default function AnimationContainer({\n match: {\n params: { entriesUUID, prizeUUID }\n },\n children\n}) {\n const history = useClientHistory();\n const { id: promoId } = useSelector(s => s.promo);\n const { loginId } = useSelector(s => s.userLoginState);\n const { isMgmShare, isMgmSelf } = useSelector(s => s.flags);\n const [isModalOpen, setIsModalOpen] = useState(false);\n const { uuid: lotteryUUID, AnimationSettings } = useSelector(s => s.flags.animatingLotteries);\n const openWinnerPopupHandler = useCallback(() => setIsModalOpen(true), []);\n const closeWinnerPopupHandler = useCallback(() => setIsModalOpen(false), []);\n\n const parsedAnimationSettings = useMemo(() => parseAnimationSettings(AnimationSettings || {}), [\n AnimationSettings\n ]);\n const lotteryParticipantPrizeList = useAnimationPathPrizeList(\n lotteryUUID,\n isMgmShare,\n isMgmSelf\n );\n const winnerInfo = lotteryParticipantPrizeList\n ? lotteryParticipantPrizeList.find(\n lotteryParticipantPrize => lotteryParticipantPrize.uuid === prizeUUID\n )\n : {};\n const { settings: { imageUrl } = {}, name: prizeText, type: prizeType } = winnerInfo;\n const { getPromoByPrizeAndEntry } = useGetLotteryAndPrizeAndPromoData();\n const { uuid: currentPromoUUID } = getPromoByPrizeAndEntry(prizeUUID, entriesUUID);\n\n // TODO: change new animation API\n const updateAnimationFlag = useCallback(() => {\n const update = async () => {\n try {\n if (prizeUUID) {\n await updateWinnerAnimationFlag(currentPromoUUID, entriesUUID, prizeUUID);\n gtmPushPrize({\n prizeName: prizeText,\n prizeType: getPrizeTypeLabel(prizeType),\n loginId,\n promoId\n });\n }\n } catch (error) {\n console.log('Failed to update winner animation flag:', error);\n }\n };\n\n update();\n }, [entriesUUID, loginId, prizeText, prizeType, prizeUUID, promoId, currentPromoUUID]);\n\n const props = useMemo(() => {\n return {\n lotteryParticipantPrizeList,\n animationSettings: parsedAnimationSettings,\n updateAnimationFlag,\n openWinnerPopupHandler,\n winnerInfo: {\n prizeUUID,\n prizeImageUrl: imageUrl,\n prizeText,\n prizeType\n }\n };\n }, [\n lotteryParticipantPrizeList,\n parsedAnimationSettings,\n updateAnimationFlag,\n openWinnerPopupHandler,\n prizeUUID,\n imageUrl,\n prizeText,\n prizeType\n ]);\n\n const isThanksPrize = props.winnerInfo.prizeType === prizeTypes.THANKYOU;\n\n return (\n lotteryParticipantPrizeList && (\n <>\n {children({ ...props })}\n {\n closeWinnerPopupHandler();\n if (isThanksPrize) {\n history.replace(RESULT);\n } else {\n history.replace(PRIZE, {\n prizeUUID: prizeUUID,\n entriesUUID: entriesUUID\n });\n }\n }}\n btnText={isThanksPrize ? i18n.t('btn.close') : i18n.t('button.receive_prize')}\n />\n \n )\n );\n}\n","import React, { lazy, useEffect } from 'react';\nimport { Route, Switch } from 'react-router-dom';\nimport { useDispatch } from 'react-redux';\n\nimport { setShouldUpdateUserWinnerList } from 'client/redux/modules/flags';\nimport { lotteryOpenPathParams } from 'config/promoLotteryTypes';\n\nimport AnimationContainer from 'client/components/Lottery/AnimationContainer';\n\nconst General = lazy(() =>\n import(/* webpackChunkName: \"client_lottery_general\" */ 'client/components/Lottery/General')\n);\nconst ScratchCard = lazy(() =>\n import(/* webpackChunkName: \"Scratch_Card\" */ 'client/components/Lottery/ScratchCard')\n);\nconst Winwheel = lazy(() =>\n import(/* webpackChunkName: \"client_lottery_winwheel\" */ 'client/components/Lottery/Winwheel')\n);\nconst PokeGame = lazy(() =>\n import(/* webpackChunkName: \"PokeGame\" */ 'client/components/Lottery/PokeGame')\n);\nconst RedEnvelopeRain = lazy(() =>\n import(\n /* webpackChunkName: \"client_red_envelope_rain\" */ 'client/components/Lottery/RedEnvelopeRain'\n )\n);\nconst Slots = lazy(() => import(/* webpackChunkName: \"\" */ 'client/components/Lottery/Slots'));\nconst PickThePrize = lazy(() =>\n import(/* webpackChunkName: \"\" */ 'client/components/Lottery/PickThePrize')\n);\n\nexport default function Lottery({ match }) {\n const dispatch = useDispatch();\n\n useEffect(() => {\n return () => dispatch(setShouldUpdateUserWinnerList());\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n \n \n \n \n \n \n \n \n \n );\n}\n\nconst withAnimationProps = Comp => {\n return routeProps => (\n {props => }\n );\n};\n","import React, { lazy, Suspense, useEffect } from 'react';\nimport { CSSTransition, TransitionGroup } from 'react-transition-group';\nimport { Route, Switch } from 'react-router-dom';\nimport queryString from 'query-string';\nimport { useHistory } from 'react-router-dom';\n\nimport useInitPromo from 'client/hooks/useInitPromo/useInitPromo';\nimport useUserGamePhaseRedirectOnInit from 'client/hooks/useUserGamePhaseRedirectOnInit';\n\nimport ClientWrapper from 'client/components/ClientWrapper';\nimport ResultPage from 'client/components/Result/ResultPage';\nimport JoinGame from 'client/components/JoinGame/JoinGame';\nimport Form from 'client/components/form/Form';\nimport Lottery from 'client/components/Lottery/Lottery';\nimport Loading from 'client/components/Loading';\nimport DialogReCaptcha from 'components/Dialog/DialogReCaptcha';\nimport { useReCaptcha } from './hooks/useReCaptcha';\nimport useLogout from 'client/hooks/logout/useLogout';\n\nconst Prize = lazy(() =>\n import(/* webpackChunkName: \"client_prize\" */ 'client/components/Prize/PrizeContainer')\n);\n\nexport default function AppPromoClient({\n match: {\n params: { promoUUID, promoId },\n path: matchedPath\n },\n location\n}) {\n // 初始化後剛進入頁面時根據不同現狀條件,導向不同頁面(join / result)\n useUserGamePhaseRedirectOnInit();\n\n const { isShowReCaptcha, setShowReCaptcha } = useReCaptcha();\n const initPromo = useInitPromo(promoUUID, promoId);\n const history = useHistory();\n const logout = useLogout();\n\n useEffect(() => {\n const parsed = queryString.parse(location.search);\n if (parsed.needLogout === 'true') {\n logout();\n const { needLogout, ...rest } = parsed;\n const newSearch = queryString.stringify(rest);\n history.replace({ search: newSearch });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [location.search, history]);\n\n return (\n \n }>\n \n React.cloneElement(child, {\n classNames: location.state?.transition ?? 'fever-fade-next'\n })\n }\n >\n \n <>\n {isShowReCaptcha && (\n \n )}\n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n","import React from 'react';\n\nimport GeneralClientFlowWrapper from 'client/components/GeneralClientFlowWrapper';\nimport AppPromoClient from 'client/AppPromoClient';\n\nexport default function RoutePromoClient({ match, location }) {\n return (\n \n \n \n );\n}\n","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport { css } from '@emotion/core';\nimport i18n from 'i18next';\n\nimport { below } from 'utils/breakpoint';\nimport { loginTypes } from 'config/loginTypes';\nimport useLogout from 'client/hooks/logout/useLogout';\nimport useLogoutRedirect from 'client/hooks/logout/useLogoutRedirect';\nimport usePromoSettingThemeStyle from 'client/hooks/usePromoSettingThemeStyle';\nimport { gameTypes } from 'config/promoGameTypes';\nimport { themedButtonStyle, btnVariants } from 'styles/common';\n\nconst { RED_ENVELOPE_RAIN } = gameTypes;\n\nconst Logout = () => {\n const logout = useLogout();\n const redirectEnterpriseLogout = useLogoutRedirect();\n const themeStyle = usePromoSettingThemeStyle();\n const {\n settingPromo: { loginMethod, enableHideLogoutButton },\n promo: { type: promoType },\n userLoginState: { isLogin },\n userGameResultRecords = [],\n purePrizeState: { isGameReadyToPlay }\n } = useSelector(s => s);\n const hasGameResultRecords = userGameResultRecords.length > 0;\n const shouldHideLogoutButton = (() => {\n if (\n loginMethod !== loginTypes.ANONYMOUSLOGIN &&\n window.location.hostname === 'event.91app.com'\n ) {\n // 登入狀態控制在 91app 上,因此不可以出現登出按鈕 [FV-2574]\n // 91 開放不登入活動,不登入活動顯示登出按鈕 [FV-2830]\n return true;\n } else if (loginMethod === loginTypes.ANONYMOUSLOGIN && !hasGameResultRecords) {\n // 如果不登入,在有參加紀錄(Cookie 記錄)下,才給予登出按鈕\n return true;\n } else if (promoType === RED_ENVELOPE_RAIN && isGameReadyToPlay) {\n // 紅包雨開始遊戲時隱藏登出 [SUPPORT-3582]\n return true;\n } else if (loginMethod === loginTypes.INSTAGRAM) {\n // IG Hashtag 模組不需要登入 / 登出\n return true;\n } else if (loginMethod === loginTypes.ANONYMOUSLOGIN) return true;\n else return Boolean(enableHideLogoutButton);\n })();\n\n return (\n isLogin &&\n !shouldHideLogoutButton && (\n \n \n )\n );\n};\n\nexport default Logout;\n\nconst logoutWrapperStyle = css`\n margin-top: 18px;\n margin-bottom: 40px;\n padding-right: 10px;\n ${below('sm')} {\n margin-bottom: 20px;\n }\n`;\n\nconst logoutStyle = css`\n float: right;\n font-size: 0.875rem;\n cursor: pointer;\n font-weight: 500;\n color: #000;\n position: relative;\n z-index: 0;\n ${below('sm')} {\n float: none;\n text-align: center;\n }\n`;\n","import React from 'react';\nimport { css } from '@emotion/core';\nimport { Dialog } from '@material-ui/core';\nimport ReferralNotifyCard from './ReferralNotifyCard';\n\n/**\n * @method DialogReferralNotifyCard - 邀請碼頁面\n * @param {Object} props\n * @param {Boolean} props.open - 顯示 Dialog\n * @param {String} props.isShowImage - 是否顯示圖片\n * @param {String} props.imageUrl - 圖片網址\n * @param {String} props.title - 標題\n * @param {String} props.description - 文案\n * @param {String} props.buttonText - 按鈕文字\n * @param {String} props.buttonTextColor - 按鈕文字顏色\n * @param {String} props.buttonBgColor - 按鈕背景\n * @param {String} props.themeTextColor - 主題文字顏色\n * @param {String} props.themeBgColor - 主題背景\n * @param {Function} props.onConfirm - 確認事件\n * @param {Function} props.onClose - 關閉事件\n * @param {Boolean} props.disableConfirm - 禁用確認按鈕\n * @returns {JSX.Element}\n */\n\nexport default function DialogReferralNotifyCard({\n open,\n isShowImage,\n imageUrl,\n title,\n description,\n buttonText,\n buttonTextColor,\n buttonBgColor,\n themeBgColor,\n themeTextColor,\n onConfirm = () => {},\n onClose = () => {},\n disableConfirm\n}) {\n return (\n \n \n \n );\n}\n\nconst dialogStyle = css`\n border-radius: 12px;\n box-shadow: 0px 1px 8px 0px #00000033;\n\n .MuiDialog-paperWidthSm {\n max-width: 320px;\n width: 100%;\n border-radius: 12px;\n }\n`;\n","import React, { useEffect, useMemo, useState } from 'react';\nimport { useSelector } from 'react-redux';\nimport DialogReferralNotifyCard from 'components/DialogReferralNotifyCard';\nimport Cookies from 'js-cookie';\nimport DialogReferralShareCard from 'components/common/Dialog/DialogReferralShareCard';\nimport { isLotteryHasAnimation } from 'config/promoLotteryTypes';\nimport { isCanSetVerifyMechanismGames, isForceVerifyMechanismGames } from 'config/promoGameTypes';\n\n// 參加流程中自動跳出邀請好友參加活動的 Dialog\n/**\n * @method ReferralNotify - 邀請提示 Dialog + 邀請資訊 Dialog\n * @param {Object} props\n * @param {Object} props.config - 卡片類型 outlined | contained\n * @param {Boolean} props.showReferralNotify - 邀請提示 Dialog 開關\n * @param {Function} props.setEnableFetchReferralInfo - 可以 fetch referral 資料 (邀請碼, 邀請人數, 短網址)\n * @returns {JSX.Element}\n */\nconst ReferralNotify = ({\n config = {},\n showReferralNotify,\n setEnableFetchReferralInfo,\n isFetchingData,\n getShareInfoData\n}) => {\n const {\n variant = 'outlined',\n isFixedWindow = true,\n dialogTextColor,\n dialogBgColor,\n enableLineLiff = true,\n enableDisplayShareCardButton = true,\n enableDisplayShareCardImage = true,\n enableDisplayShareCardReferralCode,\n shareCardTitle,\n shareCardDesc,\n shareCardImageUrl,\n shareCardButtonText,\n shareCardButtonTextColor,\n shareCardButtonBgColor,\n isLoadingReferral = false,\n referralCode,\n shareLinkUrl\n } = config;\n const [isOpenReferralNotifyCard, setOpenReferralNotifyCard] = useState(false);\n const [isOpenReferralShareCard, setOpenReferralShareCard] = useState(false);\n const { id: promoId, type: gameType } = useSelector(s => s.promo);\n const { enableVerifyMechanism } = useSelector(s => s.settingPromo);\n const { isMgmSelf = false } = useSelector(s => s.flags);\n const userGameResultRecords = useSelector(s => s.userGameResultRecords);\n const { unOpenWinnerPrize = [] } = useSelector(s => s.userWinnerPrize);\n const { currentEntryId = '' } = useSelector(s => s.userEntryState);\n const { referralNotify = {} } = useSelector(s => s.settingMGMReferral);\n const isDisableAutoShow = useMemo(() => {\n return unOpenWinnerPrize.some(({ lotteryType }) => isLotteryHasAnimation(lotteryType));\n }, [unOpenWinnerPrize]);\n\n useEffect(() => {\n let timeoutId = null;\n const referralNotify = async () => {\n const hasReferralNotifyEntry = JSON.parse(\n Cookies.get('hasReferralNotifyEntry') || '[]'\n );\n\n const existEntryUuid = hasReferralNotifyEntry.find(\n entryId =>\n Boolean(userGameResultRecords.find(({ id }) => id === entryId)) ||\n currentEntryId === entryId\n );\n\n if (!existEntryUuid && !isDisableAutoShow) {\n timeoutId = setTimeout(() => {\n Cookies.set(\n 'hasReferralNotifyEntry',\n JSON.stringify([...hasReferralNotifyEntry, currentEntryId])\n );\n\n setOpenReferralNotifyCard(true);\n }, 3000);\n }\n };\n\n const checkReferralNotify = async () => {\n const isCanVerifyGame = isCanSetVerifyMechanismGames(gameType);\n const isForceVerifyGame = isForceVerifyMechanismGames(gameType);\n if (isForceVerifyGame || (isCanVerifyGame && Boolean(enableVerifyMechanism))) {\n // 若模組開啟審核,需有任一筆 Entry 為通過,才會跳出 Dialog;若所有 Entry 皆為不通過或待檢查,就不跳邀請提示 Dialog\n const hasQualifiedResult = Boolean(\n userGameResultRecords.find(\n ({ flow: { qualified } = {}, deletedAt }) =>\n Boolean(qualified) && !deletedAt\n )\n );\n\n if (hasQualifiedResult) await referralNotify();\n } else await referralNotify();\n };\n\n if (\n Boolean(gameType) &&\n Boolean(promoId) &&\n Boolean(userGameResultRecords) &&\n Boolean(currentEntryId) &&\n isMgmSelf &&\n showReferralNotify\n ) {\n checkReferralNotify();\n }\n\n return () => {\n clearTimeout(timeoutId);\n setOpenReferralNotifyCard(false);\n };\n }, [\n currentEntryId,\n gameType,\n isMgmSelf,\n promoId,\n userGameResultRecords,\n showReferralNotify,\n isLoadingReferral,\n isDisableAutoShow,\n enableVerifyMechanism\n ]);\n\n return (\n <>\n {\n await setEnableFetchReferralInfo(true);\n await getShareInfoData();\n await setOpenReferralShareCard(true);\n await setOpenReferralNotifyCard(false);\n }}\n onClose={() => {\n setOpenReferralNotifyCard(false);\n }}\n />\n {\n setOpenReferralShareCard(false);\n }}\n dialogTextColor={dialogTextColor}\n dialogBgColor={dialogBgColor}\n enableLineLiff={enableLineLiff}\n referralShareCardConfig={{\n title: shareCardTitle,\n description: shareCardDesc,\n imageUrl: shareCardImageUrl,\n button: {\n enableDisplay: enableDisplayShareCardButton,\n label: shareCardButtonText,\n uri: shareLinkUrl,\n textColor: shareCardButtonTextColor,\n bgColor: shareCardButtonBgColor\n }\n }}\n isShowImage={enableDisplayShareCardImage}\n isShowReferralCode={enableDisplayShareCardReferralCode}\n referralCode={referralCode}\n referralLink={shareLinkUrl}\n isFetchingData={isFetchingData}\n />\n \n );\n};\n\nexport default ReferralNotify;\n","import React, { useState, useEffect, useMemo, useCallback } from 'react';\nimport { useSelector, useDispatch } from 'react-redux';\nimport i18next from 'i18next';\nimport Cookies from 'js-cookie';\nimport { css } from '@emotion/core';\nimport { Box, Typography } from '@material-ui/core';\nimport ShareButton from 'components/common/Button/ShareButton';\nimport { system900, promo500 } from 'Mui/styles/color';\nimport { updateSettingStyle } from 'client/redux/modules/settingStyle';\nimport ReferralNotify from 'client/components/Result/ReferralNotify';\nimport usePromoSettingThemeStyle from 'client/hooks/usePromoSettingThemeStyle';\nimport useGetReferralData from 'client/hooks/useGetReferralData';\nimport { resultFooterContainerStyle } from 'client/styles/common';\nimport { getShareInfoApi } from 'api/client';\nimport { defaultReferralShareCard, defaultReferralButton } from 'config/promoDefaultSettingValue';\nimport { replaceUsername } from 'utils/filter';\n\nfunction ResultFooter({ propsReferralCount = 0 }) {\n const dispatch = useDispatch();\n\n const { uuid: promoUUID, id: promoId } = useSelector(s => s.promo);\n const { isMgmSelf = false, isMgmShare = false } = useSelector(s => s.flags);\n const { referralShareCard: styleReferralShareCard = {}, referralButton = {} } = useSelector(\n s => s.settingStyle\n );\n const { referralShareCard: mgmReferralShareCard = {} } = useSelector(s => s.settingMGMReferral);\n const entriesList = useSelector(s => s.userGameResultRecords);\n const { isLogin } = useSelector(s => s.userLoginState);\n\n const userGameResultRecords = useSelector(s => s.userGameResultRecords);\n const { currentEntryId = '' } = useSelector(s => s.userEntryState);\n const [showReferralNotify, setShowReferralNotify] = useState(true);\n const [enableFetchReferralInfo, setEnableFetchReferralInfo] = useState(false);\n const [isFetchingData, setIsFetchingData] = useState(false);\n const themeStyle = usePromoSettingThemeStyle();\n const latestEntry = entriesList[entriesList.length - 1];\n const { referralCode, referralUrl, referralCount, isLoading } = useGetReferralData({\n promoUUID,\n promoId,\n latestEntryId: latestEntry?.id,\n latestEntryUuid: latestEntry?.uuid,\n // dependency 都要是 true hook 才會在一載入時跑 useEffect 去打 referral api 拿 referralCode, referralUrl, referralCount\n dependency: [enableFetchReferralInfo]\n });\n const showReferralCount = referralCount > 0 || propsReferralCount > 0;\n\n const referralShareCard = useMemo(\n () =>\n Object.keys(mgmReferralShareCard).length > 0\n ? mgmReferralShareCard\n : styleReferralShareCard,\n [styleReferralShareCard, mgmReferralShareCard]\n );\n\n const config = {\n variant: 'contained',\n isFixedWindow: true,\n dialogTextColor: referralShareCard?.themeTextColor,\n dialogBgColor: referralShareCard?.themeBgColor,\n enableLineLiff: referralShareCard?.enableLineLiff,\n enableDisplayShareCardButton: isMgmShare,\n enableDisplayShareCardImage: referralShareCard?.isShowImage,\n enableDisplayShareCardReferralCode: false,\n shareCardTitle: referralShareCard?.invitationTitle,\n shareCardDesc: referralShareCard?.invitationDesc,\n shareCardImageUrl: referralShareCard?.imageUrl,\n shareCardButtonText: referralShareCard?.buttonText,\n shareCardButtonTextColor: referralShareCard?.buttonTextColor,\n shareCardButtonBgColor: referralShareCard?.buttonBgColor,\n isLoadingReferral: isLoading,\n referralCode,\n shareLinkUrl: referralUrl\n };\n\n const getShareInfoData = useCallback(async () => {\n try {\n setIsFetchingData(true);\n const { payload } = await getShareInfoApi({\n promoUUID,\n entryUUID: latestEntry?.uuid\n });\n const { shareMemberFullname } = payload;\n dispatch(\n updateSettingStyle({\n referralShareCard: {\n ...referralShareCard,\n invitationTitle: replaceUsername({\n text: referralShareCard?.invitationTitle,\n variable: 'username',\n data: shareMemberFullname\n }),\n invitationDesc: replaceUsername({\n text: referralShareCard?.invitationDesc,\n variable: 'username',\n data: shareMemberFullname\n }),\n buttonText: replaceUsername({\n text: referralShareCard?.buttonText,\n variable: 'username',\n data: shareMemberFullname\n }),\n fullname: shareMemberFullname || ''\n }\n })\n );\n } catch (err) {\n console.error(err);\n } finally {\n setIsFetchingData(false);\n }\n }, [dispatch, latestEntry?.uuid, promoUUID, referralShareCard]);\n\n const handleShareButtonClick = () => {\n setEnableFetchReferralInfo(true);\n // 已經優先點擊分享邀請資訊dialog 就不再跳邀請提示\n const hasReferralNotifyEntry = JSON.parse(Cookies.get('hasReferralNotifyEntry') || '[]');\n const existEntryUuid = hasReferralNotifyEntry.find(\n entryId =>\n Boolean(userGameResultRecords.find(({ id }) => id === entryId)) ||\n currentEntryId === entryId\n );\n\n if (!existEntryUuid) {\n Cookies.set(\n 'hasReferralNotifyEntry',\n JSON.stringify([...hasReferralNotifyEntry, currentEntryId])\n );\n }\n\n setShowReferralNotify(false);\n // 若活動登入設定匿名登入, 後端會回傳 fullname 等於 null,但打 API 前 fullname 是 undefined\n if (referralShareCard?.fullname === undefined && isLogin) {\n getShareInfoData();\n }\n };\n\n useEffect(() => {\n // [860t0duz4] 若 MGM phrase 2 前的建立的活動沒有邀請按鈕與邀請資訊的預設值,系統要幫他自動補上\n if (Object.keys(referralShareCard).length === 0) {\n dispatch(\n updateSettingStyle({\n referralShareCard: {\n ...referralShareCard,\n ...defaultReferralShareCard(true).referralShareCard\n }\n })\n );\n }\n }, [dispatch, referralShareCard]);\n\n useEffect(() => {\n // [860t0duz4] 若 MGM phrase 2 前的建立的活動沒有邀請按鈕與邀請資訊的預設值,系統要幫他自動補上\n if (Object.keys(referralButton).length === 0) {\n dispatch(\n updateSettingStyle({\n referralButton: {\n ...defaultReferralButton(true).referralButton\n }\n })\n );\n }\n }, [dispatch, referralButton]);\n\n return (\n
\n {referralButton?.isShowButton && (\n \n {isMgmSelf && (\n \n )}\n \n {i18next.t('btn.referral_friend_join')}\n \n \n {showReferralCount && (\n \n {i18next.t('label.mgm_share.hint.success_join_count', {\n count: propsReferralCount ?? referralCount\n })}\n \n )}\n \n )}\n
\n );\n}\n\nexport default React.memo(ResultFooter);\n\nconst shareButtonLabelTextStyle = color => css`\n padding: 8px 16px 16px 16px;\n color: ${color || system900.color};\n`;\n\nconst successReferralCountStyle = css`\n font-size: 12px;\n line-height: 17px;\n color: ${promo500.color};\n text-align: center;\n padding-top: 4px;\n`;\n\nconst buttonsWrapperStyle = css`\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n`;\n","import React, { useState } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport i18n from 'i18next';\nimport { scrollPromoBodyIntoView } from 'client/utils/scroll';\nimport { setUserNewEntry } from 'client/redux/modules/userEntryState';\nimport useClientErrorHandler from 'client/hooks/useClientErrorHandler';\nimport SecondaryButton from 'client/components/Result/Actions/SecondaryButton';\nimport DialogReCaptcha from 'components/Dialog/DialogReCaptcha';\nimport AddIcon from '@material-ui/icons/Add';\nimport usePasscodeManager from 'client/utils/passcode/usePasscodeManager';\nimport useSearchParams from 'hooks/useSearchParams';\n\nfunction PlayNewEntryButton({ btnStyle, onClick = () => {} }) {\n const dispatch = useDispatch();\n const errHandler = useClientErrorHandler();\n const [isCreatingNewEntry, setCreatingNewEntry] = useState(false);\n const { enableReCaptcha, enableQualificationPasscode } = useSelector(s => s.settingPromo);\n const { passcodeRemainingCount } = useSelector(s => s.promoState);\n const [isShowReCaptcha, setShowReCaptcha] = useState(false);\n const { passcode } = usePasscodeManager({\n hasVerifiedPasscodeFirstTime: true\n });\n const searchParams = useSearchParams();\n const isPasscodeExistInUrl = searchParams.has('pcode');\n\n async function handleClick(recaptchaToken) {\n if (enableReCaptcha && !enableQualificationPasscode && !recaptchaToken) {\n setShowReCaptcha(true);\n return;\n }\n\n setCreatingNewEntry(true);\n try {\n const isSuccessGetNewEntry = await dispatch(setUserNewEntry(recaptchaToken));\n if (isSuccessGetNewEntry) {\n scrollPromoBodyIntoView();\n onClick();\n }\n } catch (err) {\n errHandler({ err });\n } finally {\n setCreatingNewEntry(false);\n }\n }\n\n const joinAgainBtnText = (() => {\n // Ref: https://app.clickup.com/36226806/v/dc/12hhqp-9560/12hhqp-78398\n // 如果 pcode 從 URL 傳進來,通常指的是本次的參加資格\n // 在 URL 有pcode 的情境下,不需要設計輸入框的情境,因為用戶通常也不知道 pcode是什麼。\n // pcode只是給客戶\"隱形\"去卡控資格的方式,並沒有要揭露通關序號\n // 所以結果頁也不需要顯示 \"再次參加\"\n if (passcode) {\n if (passcodeRemainingCount > 0) {\n return i18n.t('btn.join_counts', {\n count: passcodeRemainingCount\n });\n } else {\n if (isPasscodeExistInUrl) {\n //且已使用過,在結果頁不要出現 【再次參加】的按鈕\n return null;\n }\n return i18n.t('btn.join_again');\n }\n }\n return i18n.t('btn.join_again');\n })();\n\n if (joinAgainBtnText === null) {\n return null;\n }\n\n return (\n <>\n 0 ? AddIcon : null}\n text={joinAgainBtnText}\n onClick={handleClick}\n btnStyle={btnStyle}\n isLoading={isCreatingNewEntry}\n disabled={isCreatingNewEntry}\n />\n {isShowReCaptcha && (\n \n )}\n \n );\n}\n\nexport default PlayNewEntryButton;\n","import React from 'react';\nimport { useSelector } from 'react-redux';\nimport i18n from 'i18next';\nimport SecondaryButton from 'client/components/Result/Actions/SecondaryButton';\nimport AddIcon from '@material-ui/icons/Add';\nimport usePasscodeManager from 'client/utils/passcode/usePasscodeManager';\nimport useSearchParams from 'hooks/useSearchParams';\n\nfunction PlayAgainWithoutNewEntryButton({ btnStyle, onClick = () => {} }) {\n const { passcodeRemainingCount } = useSelector(s => s.promoState);\n const { passcode } = usePasscodeManager({\n hasVerifiedPasscodeFirstTime: true\n });\n const searchParams = useSearchParams();\n const isPasscodeExistInUrl = searchParams.has('pcode');\n\n const joinAgainBtnText = (() => {\n // Ref: https://app.clickup.com/36226806/v/dc/12hhqp-9560/12hhqp-78398\n // 如果 pcode 從 URL 傳進來,通常指的是本次的參加資格\n // 在 URL 有pcode 的情境下,不需要設計輸入框的情境,因為用戶通常也不知道 pcode是什麼。\n // pcode只是給客戶\"隱形\"去卡控資格的方式,並沒有要揭露通關序號\n // 所以結果頁也不需要顯示 \"再次參加\"\n if (passcode) {\n if (passcodeRemainingCount > 0) {\n return i18n.t('btn.join_counts', {\n count: passcodeRemainingCount\n });\n } else if (isPasscodeExistInUrl) {\n //且已使用過,在結果頁不要出現 【再次參加】的按鈕\n return null;\n }\n return i18n.t('btn.join_again');\n }\n return i18n.t('btn.join_again');\n })();\n\n if (joinAgainBtnText === null) {\n return null;\n }\n\n return (\n 0 ? AddIcon : null}\n text={joinAgainBtnText}\n btnStyle={btnStyle}\n onClick={onClick}\n />\n );\n}\n\nexport default PlayAgainWithoutNewEntryButton;\n","import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { css } from '@emotion/core';\nimport i18n from 'i18next';\nimport { isMobile } from 'react-device-detect';\nimport Typography from '@material-ui/core/Typography';\nimport HistoryIcon from '@material-ui/icons/History';\nimport Button from 'Mui/Button';\nimport { addOutlineBtnHoverStyle } from 'styles/common';\nimport PopupWithFixHeader, { modes } from 'client/components/PopupWithFixHeader';\nimport {\n stylePropType,\n btnPropType,\n childrenPropType,\n componentStylePropTypes\n} from 'utils/propTypes';\n\nfunction ViewRecordsBtn({\n componentStyle = {},\n style,\n btnStyle,\n variant = 'medium',\n children,\n onClick = () => {}\n}) {\n const [isPopupOpen, setIsPopupOpen] = useState(false);\n const disabledPopup = !children;\n\n function showPrizeList() {\n if (!disabledPopup) {\n setIsPopupOpen(true);\n }\n onClick();\n }\n function closePrizeList() {\n setIsPopupOpen(false);\n }\n\n const smallerHistoryButton = (\n \n );\n\n const mediumHistoryButton = (\n \n \n {i18n.t('btn.join_record')}\n \n \n );\n\n return (\n
\n {variant === 'small' && smallerHistoryButton}\n {variant === 'medium' && mediumHistoryButton}\n {!disabledPopup && (\n \n {children}\n \n )}\n
\n );\n}\n\nexport default ViewRecordsBtn;\n\nViewRecordsBtn.propTypes = {\n componentStyle: componentStylePropTypes,\n style: stylePropType,\n btnStyle: btnPropType,\n variant: PropTypes.oneOf(['small', 'medium', 'large']),\n children: childrenPropType,\n onClick: PropTypes.func\n};\n\nconst btnContainerStyle = css`\n text-align: center;\n`;\n\nconst buttonStyle = css`\n padding: 10px 16px;\n width: 100%;\n height: 48px;\n border-radius: 28px;\n`;\n\nconst circleButtonStyle = css`\n padding: 0;\n min-width: 48px;\n width: 48px;\n height: 48px;\n border-radius: 50%;\n`;\n\nconst textStyle = css`\n display: flex;\n align-items: center;\n color: inherit;\n`;\n","import React, { useEffect, useRef, useState } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\nimport i18n from 'i18next';\nimport { css } from '@emotion/core';\n\nimport useClientHistory, { PRIZE, JOIN, SIGNUP_FORM, LOTTERY } from 'client/hooks/useClientHistory';\nimport useGameActionEnableInfo from 'client/hooks/useGameActionEnableInfo';\nimport useUpdateWinnerData from 'client/hooks/useUpdateWinnerData';\nimport useSystemBtnStyleByTheme from 'client/hooks/useSystemBtnStyleByTheme';\nimport usePromoSettingComponentStyle from 'hooks/usePromoSettingComponentStyle';\n\nimport EntriesList from 'client/components/Result/EntriesInfo/EntriesList';\nimport ViewPrizeListButton from 'client/components/Result/ViewPrizeListButton';\nimport PlayNewEntryButton from 'client/components/Result/Actions/PlayNewEntryButton';\nimport PlayAgainWithoutNewEntryButton from 'client/components/Result/Actions/PlayAgainWithoutNewEntryButton';\nimport SignUpFormButton from 'client/components/Result/Actions/SignUpFormButton';\nimport OpenWinnerButton from 'client/components/Result/Actions/OpenWinnerButton';\nimport ActionHeader from 'client/components/Result/Actions/ActionHeader';\nimport ViewRecordsBtn from 'editor/game_checkIn/components/ViewRecordsBtn';\nimport { scrollPromoBodyIntoView } from 'client/utils/scroll';\nimport { removeKeysFromQueryString } from 'client/utils/queryString';\nimport { below } from 'utils/breakpoint';\nimport getWinnerLabelAndBtnTextGenerator from 'client/components/Result/utils/getWinnerLabelAndBtnTextGenerator';\nimport { resultHeaderContainerStyle } from 'client/styles/common';\n// import { loginTypeMappingPointRoutesParam } from 'config/loginTypes';\nimport {\n isDoNotShowBackToJoinPageBtnGames,\n isDoNotShowPlayNewEntryBtnGames,\n isCanShowOpenWinnerBtnGame,\n isCanShowSignUpFormBtnGame,\n isNoResultPageGames,\n isNoNeedJoinGameRecord\n} from 'config/promoGameTypesClientConfig';\nimport { gameTypes } from 'config/promoGameTypes';\nimport { setReJoin } from 'client/redux/modules/flags';\n// import useGetNotifyData from 'client/hooks/useGetNotifyData';\n// import {\n// NOTIFY_STATUS_TYPE_MAP,\n// NOTIFY_DELIVER_TYPE_MAP,\n// NOTIFY_SOURCE_TYPE_MAP\n// } from 'config/notifyTypes';\n\nfunction ResultHeader({ themeStyle }) {\n const dispatch = useDispatch();\n const history = useClientHistory();\n const componentStyle = usePromoSettingComponentStyle();\n const { isFetching: isFetchingWinner } = useUpdateWinnerData();\n\n const userGameResultRecords = useSelector(s => s.userGameResultRecords);\n const {\n primaryBtnStyle,\n secondaryBtnStyle,\n secondaryOutlinedBtnStyle,\n viewPrizeListBtnStyle\n } = useSystemBtnStyleByTheme(themeStyle);\n\n const actionEnableState = useGameActionEnableInfo();\n const winnerRef = useRef();\n const openWinnerButtonRef = useRef();\n const { type: gameType, id: promoId } = useSelector(s => s.promo);\n // const { type: gameType, id: promoId, uuid: promoUUID } = useSelector(s => s.promo);\n // const { loginMethod } = useSelector(s => s.settingPromo);\n // const { isMgmShare, isMgmSelf } = useSelector(s => s.flags);\n // const { verifyMechanism } = useSelector(s => s.settingPromo);\n\n // TODO : ▽ 待後端更新新版審核機制設定後移除區塊內程式碼 ---------\n // const { enableMediaValidation, verifyMechanism: oldVerifyMechanism } = useSelector(\n // s => s.settingGame\n // );\n // const isVerifyGame = enableMediaValidation === 0 || verifyMechanism === 0 || oldVerifyMechanism?.type === 0;\n // TODO : △ 待後端更新新版審核機制設定後移除區塊內程式碼 ----------\n\n // TODO : ▽ 待後端更新新版審核機制設定後解除註解 ---------\n\n // [860rze7wg] 把顯示剩餘抽獎/領獎次數文字的顯示從 OpenWinnerButton 抽到外層\n const [actionHeader, setActionHeader] = useState(null);\n // [860rzpygd] [#860ru1tem] 當有獎項未開獎時,優先開獎後再顯示再次參加按鈕\n const [unOpenPrizeQuantity, setUnOpenPrizeQuantity] = useState(0);\n // [#860rzwuv7] openWinnerButtonRef 在 open winner button 雖然有更新 winner 與 un open winner list 讓領獎按鈕做顯示或是隱藏\n // 但父層元件只會取得 openWinnerButtonRef 第一次 render 的值,後續操作造成的 re-render 都不會更新 ref value,所以需要透過 state + callback 去 trigger useEffect update\n const [openWinnerChangedFlag, setOpenWinnerChangedFlag] = useState(false);\n\n const hasGameResultRecords = userGameResultRecords.some(record =>\n Boolean(record.flow?.gameResult)\n );\n\n // 可以開啟通知的條件:\n // 條件1. 要有開登入\n // 條件2. 活動是邀請模組 or 活動開啟分享獎 or 活動開啟審核功能(且沒開預設通過)\n // const isLoginPromo = Object.keys(loginTypeMappingPointRoutesParam)\n // .map(Number)\n // .includes(loginMethod);\n // const isMGMPromo = isMgmShare || isMgmSelf;\n // const enableNotifyPromo = isMGMPromo || isVerifyGame;\n\n // const {\n // data,\n // isLoading: isLoadingNotify,\n // postNotification,\n // getNotification\n // } = useGetNotifyData({ promoUUID, dependency: [isLoginPromo] });\n\n function handleToPrize({ prizeUUID, entriesUUID }) {\n history.push(PRIZE, { prizeUUID, entriesUUID });\n }\n\n function handleToJoin() {\n dispatch(setReJoin(true));\n const shouldRemoveQsKey = ['pcode'];\n const qs = removeKeysFromQueryString(shouldRemoveQsKey);\n const location = {\n ...window.location,\n search: `?${qs}`\n };\n history.replace(JOIN, '', location);\n }\n\n function handleToSignupForm() {\n history.push(SIGNUP_FORM);\n }\n function handleOpenWinner({ entriesUUID, prizeUUID, animatingLottery }) {\n scrollPromoBodyIntoView();\n history.push(LOTTERY, {\n animatingLottery,\n entriesUUID,\n prizeUUID\n });\n }\n // 可以顯示 再次參加 (會 create entry) 按鈕\n const canCreateNewEntryAndJoinAgain = Boolean(\n !isDoNotShowPlayNewEntryBtnGames(gameType) &&\n actionEnableState.canGetNewEntry &&\n !isFetchingWinner &&\n unOpenPrizeQuantity === 0\n );\n // 可以顯示 再次參加(不會 create entry) 按鈕\n const canJoinAgainWithoutCreateNewEntry = Boolean(\n !isDoNotShowBackToJoinPageBtnGames(gameType) &&\n actionEnableState.canBackToJoinGamePage &&\n !isFetchingWinner &&\n unOpenPrizeQuantity === 0\n );\n // 可以顯示 參加紀錄 按鈕\n const canShowJoinGameRecord = Boolean(\n (isNoResultPageGames(gameType) || gameType === gameTypes.MEMORY_MATCH) &&\n !isNoNeedJoinGameRecord(gameType) &&\n hasGameResultRecords &&\n !isFetchingWinner\n );\n\n // 可以顯示 領取獎品 按鈕 (抽獎 => 試手氣 / 參加獎 => 領取獎品 / 好禮自由選 => 選擇獎品)\n const canShowOpenWinnerBtnGame = Boolean(\n isCanShowOpenWinnerBtnGame(gameType) && !isFetchingWinner\n );\n\n useEffect(() => {\n if (openWinnerButtonRef?.current) {\n let title = '';\n const { getOpenWinnerButtonData } = openWinnerButtonRef.current;\n const {\n shouldShowButton,\n hasEnableLotteryParticipant,\n hasPendingVerifyEntry,\n openWinnerList,\n pickWinnerList\n } = getOpenWinnerButtonData();\n const quantity = openWinnerList.length || pickWinnerList.length;\n const { header } = getWinnerLabelAndBtnTextGenerator({\n lotteryType: openWinnerList[0]?.lotteryType || pickWinnerList[0]?.lotteryType\n });\n if (!shouldShowButton && hasEnableLotteryParticipant && hasPendingVerifyEntry) {\n title = i18n.t('label.prize_after_verify_can_has_prize');\n } else {\n title = quantity > 0 ? header(quantity) : '';\n }\n const comp = (\n \n );\n setUnOpenPrizeQuantity(quantity);\n setActionHeader(comp);\n }\n }, [themeStyle.textColor, openWinnerChangedFlag]);\n\n // useEffect(() => {\n // // 可以執行通知的條件\n // if (\n // enableNotifyPromo &&\n // Boolean(isLoginPromo) &&\n // hasGameResultRecords &&\n // !isLoadingNotify &&\n // data.length > 0\n // ) {\n // // 第 0 筆是 Email,第一筆是 Line Notify,不過 line Notify 已經棄用,所以可以不顯示 UI 給 User 選擇,直接開啟 Email 通知即可\n // const notifySettings = data[0];\n // const { id, list, description } = notifySettings;\n // const targetNotifyItem = list.find(({ disabled }) => !disabled);\n // // 正在訂閱中的通知\n // const activeOption = data.find(o => o.list.every(l => l.label === o.id));\n\n // if (\n // targetNotifyItem.value &&\n // targetNotifyItem.source &&\n // targetNotifyItem.type &&\n // targetNotifyItem.status === NOTIFY_STATUS_TYPE_MAP.INACTIVE\n // ) {\n // alert('postNotification');\n // try {\n // postNotification({\n // type: targetNotifyItem.type,\n // value:\n // targetNotifyItem.type === NOTIFY_DELIVER_TYPE_MAP.EMAIL\n // ? description\n // : undefined,\n // source: NOTIFY_SOURCE_TYPE_MAP.MANUAL_INPUT\n // })\n // .then(res => {\n // if (res.httpStatus < 400) {\n // getNotification();\n // }\n // })\n // .catch(err => {\n // console.error(err);\n // return {\n // message: `Success to change notification service (${targetNotifyItem.type})`,\n // payload: {\n // nextId: id,\n // previousId: activeOption?.id\n // }\n // };\n // });\n // } catch (err) {\n // throw new Error(\n // `Fail to change notification service (${targetNotifyItem.type}). ${err}`\n // );\n // }\n // } else {\n // return {\n // message: `Fail to change notification service (${targetNotifyItem.type})`,\n // payload: null\n // };\n // }\n // }\n // }, [\n // data,\n // enableNotifyPromo,\n // hasGameResultRecords,\n // isLoginPromo,\n // isLoadingNotify,\n // getNotification,\n // postNotification\n // ]);\n\n return (\n
\n {!isFetchingWinner &&\n isCanShowSignUpFormBtnGame(gameType) &&\n actionEnableState.canFillSignupform && (\n \n )}\n {actionHeader}\n
\n {/* TODO: 領取獎品按鈕的顯示有別於其他按鈕,不在這隻檔案做控制,此按鈕元件內會自己控制顯示邏輯 */}\n {canShowOpenWinnerBtnGame && (\n \n setOpenWinnerChangedFlag(isChanged)\n }\n enableGetWinnerByApi={actionEnableState.isQualifiedToGetWinner}\n btnStyle={primaryBtnStyle}\n ref={openWinnerButtonRef}\n />\n )}\n {canCreateNewEntryAndJoinAgain && (\n
\n \n
\n )}\n {canJoinAgainWithoutCreateNewEntry && (\n
\n \n
\n )}\n {canShowJoinGameRecord && (\n \n \n \n \n
\n )}\n\n \n
\n \n );\n}\n\nexport default React.memo(ResultHeader);\n\nconst btnContainerStyle = css`\n width: 100%;\n margin: 16px 0;\n padding: 0 4px;\n ${below('sm')} {\n margin: 8px 0;\n }\n`;\n\nconst flexCenterStyle = css`\n display: flex;\n align-items: center;\n justify-content: flex-end;\n`;\n","import { useMemo } from 'react';\n\nexport default function useSortedLotteriesTask(lotteryTasks) {\n const sortedLotteriesTask = useMemo(() => {\n let sorted = Object.entries(lotteryTasks).map(([uuid, data]) => ({\n uuid,\n ...data\n }));\n sorted.sort((a, b) => a.taskCondition - b.taskCondition);\n\n return sorted;\n }, [lotteryTasks]);\n\n return sortedLotteriesTask;\n}\n","import { useEffect, useState } from 'react';\n\nimport { getPromoLotteries } from 'api/client';\n\nexport default function useLotteriesTaskPrizeRemainder({\n promoUUID,\n mgmPromoUUID,\n lotteriesTask = [],\n mgmLotteriesTask = [],\n onError = () => {}\n}) {\n const [lotteriesRemainder, setLotteriesRemainder] = useState({});\n\n useEffect(() => {\n if (lotteriesTask.length > 0) {\n getLotteriesRemainder(promoUUID, lotteriesTask)\n .then(r => setLotteriesRemainder(prevState => ({ ...prevState, ...r })))\n .catch(err =>\n onError({\n err\n })\n );\n }\n if (mgmLotteriesTask.length > 0) {\n getLotteriesRemainder(mgmPromoUUID, mgmLotteriesTask)\n .then(r => setLotteriesRemainder(prevState => ({ ...prevState, ...r })))\n .catch(err =>\n onError({\n err\n })\n );\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return {\n lotteriesRemainder,\n setLotteryRemainder: ({ uuid, remainder = 0 }) =>\n setLotteriesRemainder(c => ({\n ...c,\n [uuid]: {\n ...c[uuid],\n remainder\n }\n })),\n hasInited: Object.keys(lotteriesRemainder).length > 0\n };\n}\n\nasync function getLotteriesRemainder(promoUUID, lotteryTasks = []) {\n const { payload: lotteries = [] } = await getPromoLotteries(promoUUID);\n return lotteryTasks.reduce((obj, { uuid }) => {\n const data = lotteries.find(l => l.lottery.uuid === uuid);\n if (data) {\n const { prizeRemainder } = data;\n obj[uuid] = {\n remainder: prizeRemainder\n };\n }\n return obj;\n }, {});\n}\n","import { useRef, useState } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport { lazyGetLotteryPrizeList } from 'client/redux/modules/lotteryPrizes';\nimport { lazyGetMGMtLotteryPrizeList } from 'client/redux/modules/mgmReferral';\n\nexport default function useLotteryPrizeDataManage({ onError = () => {} } = {}) {\n const dispatch = useDispatch();\n const lotteryPrizes = useSelector(s => s.lotteryPrizes);\n const { lotteryPrizes: mgmLotteryPrizes = {} } = useSelector(s => s.mgmReferral);\n const currentLotteryPrizes = { ...lotteryPrizes, ...mgmLotteryPrizes };\n const [inited, setInited] = useState({});\n const fetchedRef = useRef({});\n\n function handleLoad(lotteryUUID, isMgm = false) {\n if (lotteryUUID && !fetchedRef.current[lotteryUUID]) {\n if (currentLotteryPrizes[lotteryUUID] !== undefined) {\n fetchedRef.current[lotteryUUID] = true;\n setInited(c => ({ ...c, [lotteryUUID]: true }));\n } else if (!fetchedRef.current[lotteryUUID]) {\n fetchedRef.current[lotteryUUID] = true;\n getLotteryPrizesData(lotteryUUID, isMgm);\n }\n }\n }\n async function getLotteryPrizesData(lotteryUUID, isMgm) {\n try {\n if (isMgm) {\n await dispatch(lazyGetMGMtLotteryPrizeList({ lotteryUUID }));\n } else {\n await dispatch(lazyGetLotteryPrizeList({ lotteryUUID }));\n }\n setInited(c => ({ ...c, [lotteryUUID]: true }));\n } catch (err) {\n onError({\n err\n });\n }\n }\n\n return {\n load: handleLoad,\n isLotteryHasLoadPrizeData: lotteryUUID => Boolean(inited[lotteryUUID])\n };\n}\n","import React from 'react';\nimport { css } from '@emotion/core';\nimport i18n from 'i18next';\n\nimport useScrollElementOnMount from 'client/hooks/useScrollElementOnMount';\n\nimport WrapperZoomInWithBlurBg from 'components/WrapperZoomInWithBlurBg';\n\nexport default function EmptyTaskPrizePopup({ open, onClose = () => {} }) {\n const bindRef = useScrollElementOnMount({ trigger: open });\n\n return (\n \n {() => (\n
\n
\n

\n {i18n.t('label.game_checkIn.signInPopup.prizeIsNoStock')}\n

\n

\n {i18n.t('label.game_checkIn.signInPopup.prizeIsNoStock.desc')}\n

\n \n
\n
\n )}\n
\n );\n}\n\nconst prizeCommonStyle = css`\n text-align: center;\n width: 100%;\n max-width: 350px;\n background: #ffffff;\n box-shadow: 0px 8px 10px 1px rgb(0 0 0 / 14%), 0px 3px 14px 2px rgb(0 0 0 / 12%),\n 0px 5px 5px -3px rgb(0 0 0 / 20%);\n border-radius: 16px;\n`;\n\nconst buttonCommomStyle = css`\n width: 100%;\n background: #02a0fc;\n border-radius: 50px;\n border: none;\n color: #ffffff;\n font-weight: 500;\n cursor: pointer;\n`;\n\nconst prizeFinishedStyle = css`\n padding: 16px 0;\n .prizeFinishedTitle {\n font-size: 24px;\n line-height: 24px;\n margin: 16px;\n }\n .prizeFinishedCotainer {\n font-size: 16px;\n line-height: 20px;\n margin: 48px 16px;\n }\n .button {\n max-width: 144px;\n max-height: 48px;\n font-size: 16px;\n line-height: 48px;\n margin: 0 0 8px 0;\n }\n`;\n\nconst wrap = css`\n max-width: 720px;\n right: 0;\n width: 100%;\n height: 100%;\n position: fixed;\n left: 0;\n top: 0;\n margin: auto;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 5;\n`;\n","import React, { useRef, useState, useEffect, forwardRef, useImperativeHandle } from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport * as clientErrTypes from 'config/clientErrorTypes';\nimport { getWinner, checkIsQualifyToGetWinner } from 'api/client';\nimport {\n lotteryInstantTypes,\n lotteryParticipantTypes,\n lotteryAdminTypes\n} from 'config/promoLotteryTypes';\nimport { isGetWinnerEmptyContinueError } from 'client/utils/errorObjectChecker';\nimport {\n setHasNewUnlockTaskPrize,\n setLotteryTaskMappingEntryInited,\n setLotteryTaskMappingEntry\n} from 'client/game_checkIn/redux/modules/gameState';\nimport { statuses } from 'editor/game_checkIn/components/lotteryTaskCarousel/LotteryTaskCard';\nimport getLotteryCardRemainderInfo from 'client/game_checkIn/getLotteryCardRemainderInfo';\nimport { scrollElementIntoView } from 'client/utils/scroll';\nimport { gameTypes } from 'config/promoGameTypes';\nimport { scrollPromoBodyIntoView } from 'client/utils/scroll';\n\nimport useClientErrorHandler, { generateApiErrObj } from 'client/hooks/useClientErrorHandler';\nimport useClientHistory, { LOTTERY } from 'client/hooks/useClientHistory';\nimport useSortedLotteriesTask from 'client/game_checkIn/hooks/useSortedLotteriesTask';\nimport useLotteriesTaskPrizeRemainder from 'client/game_checkIn/hooks/useLotteriesTaskPrizeRemainder';\nimport useLotteriesTaskUtilsState from 'client/game_checkIn/hooks/useLotteriesTaskUtilsState';\nimport useHasUserStateReady from 'client/game_checkIn/hooks/useHasUserStateReady';\nimport useLotteryPrizeDataManage from 'client/game_checkIn/hooks/useLotteryPrizeDataManage';\nimport {\n useCheckerContext,\n checkTypes\n} from 'client/components/infoDialog/ProviderFlowInfoAndActionChecker';\n\nimport LotteryTaskProcessHint from 'client/game_checkIn/LotteryTaskProcessHint';\nimport LotteryTaskCarousel from 'editor/game_checkIn/components/lotteryTaskCarousel/LotteryTaskCarousel';\nimport EmptyTaskPrizePopup from 'client/game_checkIn/prizePopup/EmptyTaskPrizePopup';\nimport useLocalStorage from 'hooks/useLocalStorage';\n\nconst LotteryTaskCarouselContainer = forwardRef(\n (\n {\n deskTopSlidesToShow = 3,\n componentStyle,\n isNeedLotteryTaskProcessHint = true,\n inviteCount = 0\n },\n ref\n ) => {\n const [value, setLocalStorage] = useLocalStorage('handledAdminPrizeCards', []);\n // To persist this state across navigation\n const handleAdminPrizeRef = useRef(new Set(value));\n const dispatch = useDispatch();\n const history = useClientHistory();\n const errHandler = useClientErrorHandler();\n const checkerApi = useCheckerContext();\n const utilsState = useLotteriesTaskUtilsState();\n const hasUserStateReady = useHasUserStateReady();\n const lotteryPrizeDataManage = useLotteryPrizeDataManage({ onError: errHandler });\n\n const lotteryTasks = useSelector(s => s.lotteryTasks);\n const lotteryPrizes = useSelector(s => s.lotteryPrizes);\n const { isMgmShare, isMgmSelf } = useSelector(s => s.flags);\n const { lotteriesTaskCardInfo = {} } = useSelector(s => s.settingGame);\n const { uuid: promoUUID, type: gameType } = useSelector(s => s.promo);\n const { mgmReferral: { uuid: mgmPromoUUID } = {} } = useSelector(s => s.mgmRelation);\n const {\n settingGame: { lotteriesTaskCardInfo: mgmLotteriesTaskCardInfo = {} } = {},\n lotteryTasks: mgmLotteryTasks = {},\n lotteryPrizes: mgmLotteryPrizes = {}\n } = useSelector(s => s.mgmReferral);\n const { hasLotteryTaskMappingEntryInited, lotteryTaskMappingEntry } = useSelector(\n s => s.gameState\n );\n const hasEnableSignupForm = useSelector(s => Boolean(s.signUpForm.id));\n\n const carouselRef = useRef(null);\n const stateRef = useRef({\n hasCarouselInitSlide: false\n });\n\n const [canStartLazyLoadCard, setCanStartLazyLoadCard] = useState(false);\n const [taskPrizeEmptyUUID, setTaskPrizeEmptyUUID] = useState('');\n\n const sortedLotteriesTask = useSortedLotteriesTask(lotteryTasks);\n const sortedLotteriesTaskForMgm = useSortedLotteriesTask(mgmLotteryTasks);\n const {\n lotteriesRemainder,\n setLotteryRemainder,\n hasInited: hasLotteriesRemainderInited\n } = useLotteriesTaskPrizeRemainder({\n promoUUID,\n mgmPromoUUID,\n lotteriesTask: sortedLotteriesTask,\n mgmLotteriesTask: sortedLotteriesTaskForMgm,\n onError: errHandler\n });\n\n const currentLotteryPrizes = { ...lotteryPrizes, ...mgmLotteryPrizes };\n const currentLotteriesTaskCardInfo = {\n ...lotteriesTaskCardInfo,\n ...mgmLotteriesTaskCardInfo\n };\n const currentSortedLotteriesTask = [...sortedLotteriesTask, ...sortedLotteriesTaskForMgm];\n const currentLotteryTasks = { ...lotteryTasks, ...mgmLotteryTasks };\n\n const canInitLotteryCardSlide = hasUserStateReady && hasLotteriesRemainderInited;\n const cards = currentSortedLotteriesTask.map(lotteryInfo => {\n const { uuid, taskCondition } = lotteryInfo;\n const isMgmLotteriesTask = sortedLotteriesTaskForMgm.find(item => item.uuid === uuid);\n const lotteryRemainder = lotteriesRemainder[uuid] ?? {};\n const lottery = { ...lotteryInfo, ...lotteryRemainder };\n const prizes = currentLotteryPrizes[uuid] ?? [];\n const { prizeLeftQuantity, prizeTotalQuantity } = getLotteryCardRemainderInfo(\n lottery,\n prizes\n );\n const { type, prizeLimited, remainder } = lottery;\n const [title, imgSrc] = (() => {\n let { title: t, mainViewImg } = currentLotteriesTaskCardInfo[uuid] ?? {};\n if (type === lotteryInstantTypes.JOIN_AND_GET && prizes.length === 1) {\n t = t ?? prizes[0].name;\n mainViewImg = mainViewImg ?? prizes[0].settings?.imageUrl;\n }\n return [t, mainViewImg];\n })();\n const status = (() => {\n if (isMgmLotteriesTask) {\n if (utilsState.isAllGameResultRecordsBeDeleted) {\n return statuses.LOCKED;\n }\n }\n const lotteryTaskWinnerInfo = utilsState.lotteriesTaskWinnerInfo[uuid];\n if (lotteryTaskWinnerInfo.hasGetWinner) {\n if (lotteryTaskWinnerInfo?.entryFlow?.deletedAt) {\n return statuses.IS_UN_QUALIFY;\n } else {\n return statuses.IS_FULFILL;\n }\n } else {\n if (prizeLimited && remainder === 0 && type !== lotteryAdminTypes.ADMIN) {\n return statuses.PRIZE_EMPTY;\n } else {\n const mappingEntry =\n utilsState.entriesRecords.byUUIDs[lotteryTaskMappingEntry[uuid]];\n if (mappingEntry) {\n const { deletedAt } = mappingEntry;\n if (Boolean(deletedAt)) {\n return statuses.IS_UN_QUALIFY;\n } else {\n return type === lotteryAdminTypes.ADMIN\n ? statuses.UNLOCKED_ADMIN_PRIZE\n : statuses.UNLOCKED;\n }\n }\n return statuses.LOCKED;\n }\n }\n })();\n return {\n uuid,\n type,\n title,\n imgSrc,\n taskCondition,\n prizeLeftQuantity,\n prizeTotalQuantity,\n status,\n isIniting: !canStartLazyLoadCard,\n isLazyLoading:\n canStartLazyLoadCard && !lotteryPrizeDataManage.isLotteryHasLoadPrizeData(uuid),\n isMgmSelf: isMgmLotteriesTask ? isMgmSelf : false,\n isMgmShare: isMgmLotteriesTask ? isMgmShare : false\n };\n });\n\n useEffect(() => {\n if (canInitLotteryCardSlide) {\n if (!hasLotteryTaskMappingEntryInited) {\n dispatch(\n setLotteryTaskMappingEntry(\n getLotteryTaskMappingEntry(utilsState, inviteCount)\n )\n );\n dispatch(setLotteryTaskMappingEntryInited());\n } else {\n setCanStartLazyLoadCard(true);\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [canInitLotteryCardSlide, hasLotteryTaskMappingEntryInited]);\n\n //要去更新假設inviteCount改變\n useEffect(() => {\n if (canInitLotteryCardSlide) {\n if (hasLotteryTaskMappingEntryInited) {\n dispatch(\n setLotteryTaskMappingEntry(\n getLotteryTaskMappingEntry(utilsState, inviteCount)\n )\n );\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [canInitLotteryCardSlide, inviteCount]);\n\n useImperativeHandle(ref, () => ({\n updateTaskStatus: handleRenewRecords,\n getNextCheckPointLotteryTaskInfo,\n scrollCardsIntoView\n }));\n\n function checkCanGetTaskWinner() {\n return checkerApi.check([checkTypes.PROMO_STATUS]);\n }\n async function handleGetTaskWinner({ uuid, status, type, isMgmSelf, isMgmShare }) {\n try {\n if (checkCanGetTaskWinner() && status === statuses.UNLOCKED) {\n const currentPromoUUID = Boolean(isMgmSelf || isMgmShare)\n ? mgmPromoUUID\n : promoUUID;\n const entryUUID = lotteryTaskMappingEntry[uuid];\n\n if (type === lotteryParticipantTypes.PICK_THE_PRIZE) {\n scrollPromoBodyIntoView();\n const { AnimationSettings = {} } = currentLotteryTasks[uuid] ?? {};\n history.push(LOTTERY, {\n animatingLottery: { uuid, type, AnimationSettings },\n entriesUUID: entryUUID\n });\n } else {\n await checkIsQualifyToGetWinner({\n promoUUID: currentPromoUUID,\n entriesUUID: entryUUID,\n lotteryUUID: uuid\n });\n const winnerResp = await getWinner(currentPromoUUID, entryUUID, uuid);\n const { httpStatus, payload } = winnerResp;\n if (httpStatus === 200) {\n scrollPromoBodyIntoView();\n const prizeUUID = payload[0];\n const { type, AnimationSettings } = currentLotteryTasks[uuid] ?? {};\n history.push(LOTTERY, {\n animatingLottery: { type, uuid, AnimationSettings },\n entriesUUID: entryUUID,\n prizeUUID\n });\n } else if (isGetWinnerEmptyContinueError(winnerResp)) {\n setTaskPrizeEmptyUUID(uuid);\n } else if (httpStatus === 400) {\n if (\n payload.message === clientErrTypes.POINTS_IS_NOT_ENOUGH_BY_PRE_CHECK\n ) {\n throw generateApiErrObj(\n winnerResp,\n clientErrTypes.POINTS_IS_NOT_ENOUGH_BY_PRE_CHECK\n );\n } else if (payload.message === clientErrTypes.POINTS_IS_NOT_ENOUGH) {\n throw generateApiErrObj(\n winnerResp,\n clientErrTypes.POINTS_IS_NOT_ENOUGH\n );\n } else {\n throw generateApiErrObj(winnerResp, clientErrTypes.GET_WINNER_TASK);\n }\n } else {\n throw generateApiErrObj(winnerResp, clientErrTypes.GET_WINNER_TASK);\n }\n }\n }\n } catch (err) {\n errHandler({\n err\n });\n } finally {\n dispatch(setHasNewUnlockTaskPrize(false));\n }\n }\n\n function getLotteryTaskMappingEntry(utilsState, inviteCount) {\n const { entriesRecords } = utilsState;\n const entriesRecordsByUUIDsForMgm = Object.keys(entriesRecords.byUUIDs).reduce(\n (acc, key) => {\n if (entriesRecords.byUUIDs[key].isMgm === true) {\n acc[key] = entriesRecords.byUUIDs[key];\n }\n return acc;\n },\n {}\n );\n const entriesRecordsByUUIDs = Object.keys(entriesRecords.byUUIDs).reduce((acc, key) => {\n if (entriesRecords.byUUIDs[key].isMgm !== true) {\n acc[key] = entriesRecords.byUUIDs[key];\n }\n return acc;\n }, {});\n\n switch (gameType) {\n case gameTypes.CHECK_IN: {\n return cards.reduce((obj, c) => {\n if (Boolean(c.isMgmSelf || c.isMgmShare)) {\n if (\n c.status === statuses.LOCKED ||\n c.status === statuses.UNLOCKED ||\n c.status === statuses.UNLOCKED_ADMIN_PRIZE\n ) {\n if (inviteCount >= c.taskCondition) {\n const entryRecord =\n entriesRecordsByUUIDsForMgm[\n entriesRecords.allUUIDsForMgm[c.taskCondition - 1]\n ];\n if (entryRecord) {\n obj[c.uuid] = entryRecord.uuid;\n }\n }\n }\n return obj;\n }\n const entryRecord =\n entriesRecordsByUUIDs[entriesRecords.allUUIDs[c.taskCondition - 1]];\n if (entryRecord) {\n if (!hasEnableSignupForm || Boolean(entryRecord?.flow?.formSignUp)) {\n obj[c.uuid] = entryRecord.uuid;\n }\n }\n return obj;\n }, {});\n }\n case gameTypes.CHALLENGE_PHOTO_FRAME_COMPOSITE:\n let mapped = 0;\n return cards.reduce((obj, c) => {\n if (Boolean(c.isMgmSelf || c.isMgmShare)) {\n if (\n c.status === statuses.LOCKED ||\n c.status === statuses.UNLOCKED ||\n c.status === statuses.UNLOCKED_ADMIN_PRIZE\n ) {\n if (inviteCount >= c.taskCondition) {\n const entryRecord =\n entriesRecordsByUUIDsForMgm[\n entriesRecords.allUUIDsForMgm[c.taskCondition - 1]\n ];\n if (entryRecord) {\n obj[c.uuid] = entryRecord.uuid;\n }\n }\n }\n return obj;\n }\n if (\n c.status === statuses.LOCKED ||\n c.status === statuses.UNLOCKED ||\n c.status === statuses.UNLOCKED_ADMIN_PRIZE\n ) {\n if (entriesRecords.validEntryTotal >= c.taskCondition) {\n const entryRecord =\n entriesRecords.byUUIDs[\n entriesRecords.allUUIDsValidToGetTaskWinner[mapped++]\n ];\n if (entryRecord) {\n obj[c.uuid] = entryRecord.uuid;\n }\n }\n }\n return obj;\n }, {});\n case gameTypes.MULTI_CHALLENGE:\n let count = 0;\n return cards.reduce((obj, c) => {\n if (\n c.status === statuses.LOCKED ||\n c.status === statuses.UNLOCKED ||\n c.status === statuses.UNLOCKED_ADMIN_PRIZE\n ) {\n if (entriesRecords.validEntryTotal >= c.taskCondition) {\n const entryRecord =\n entriesRecords.byUUIDs[\n entriesRecords.allUUIDsValidToGetTaskWinner[count++]\n ];\n if (entryRecord) {\n obj[c.uuid] = entryRecord.uuid;\n }\n }\n }\n return obj;\n }, {});\n case gameTypes.MGM_SHARE:\n default: {\n return cards.reduce((obj, c) => {\n if (\n c.status === statuses.LOCKED ||\n c.status === statuses.UNLOCKED ||\n c.status === statuses.UNLOCKED_ADMIN_PRIZE\n ) {\n if (inviteCount >= c.taskCondition) {\n const entryRecord =\n entriesRecords.byUUIDs[\n entriesRecords.allUUIDsForMgm[c.taskCondition - 1]\n ];\n if (entryRecord) {\n obj[c.uuid] = entryRecord.uuid;\n }\n }\n }\n return obj;\n }, {});\n }\n }\n }\n\n function getNextCheckPointLotteryTaskInfo() {\n const newLotteryTaskMappingEntry = getLotteryTaskMappingEntry(utilsState, inviteCount);\n const newCheckPointTaskUUID = Object.keys(newLotteryTaskMappingEntry).find(\n taskUUID => lotteryTaskMappingEntry[taskUUID] === undefined\n );\n return {\n hasCheckPointTask: Boolean(newCheckPointTaskUUID),\n checkPointTaskUUID: newCheckPointTaskUUID,\n newLotteryTaskMappingEntry\n };\n }\n function handleRenewRecords() {\n const checkPointInfo = getNextCheckPointLotteryTaskInfo();\n\n if (checkPointInfo.hasCheckPointTask) {\n dispatch(setLotteryTaskMappingEntry(checkPointInfo.newLotteryTaskMappingEntry));\n const checkPointCardIndex = cards.findIndex(\n c => c.uuid === checkPointInfo.checkPointTaskUUID\n );\n if (checkPointCardIndex !== -1) {\n carouselGoTo(checkPointCardIndex);\n if (cards[checkPointCardIndex].type !== lotteryAdminTypes.ADMIN) {\n dispatch(setHasNewUnlockTaskPrize(true));\n }\n }\n return checkPointCardIndex;\n }\n return -1;\n }\n function handleCardLazyLoaded(lotteryUUID, isMgm) {\n lotteryPrizeDataManage.load(lotteryUUID, isMgm);\n initSlideCarousel();\n }\n function initSlideCarousel() {\n if (!stateRef.current.hasCarouselInitSlide) {\n stateRef.current.hasCarouselInitSlide = true;\n if (cards.length > 1) {\n let targetIndex = cards.findIndex(c =>\n [statuses.LOCKED, statuses.UNLOCKED].includes(c.status)\n );\n targetIndex = targetIndex === -1 ? cards.length - 1 : targetIndex;\n setTimeout(() => carouselGoTo(targetIndex), 500);\n }\n }\n }\n function carouselGoTo(index) {\n if (carouselRef.current) {\n carouselRef.current.slickGoTo(index);\n }\n }\n function scrollCardsIntoView() {\n const element = document.querySelector('.fever-lottery-task-cards');\n if (element) {\n scrollElementIntoView(element, 'end');\n }\n }\n\n useEffect(() => {\n const unlockedCards = cards.filter(card =>\n [statuses.UNLOCKED, statuses.UNLOCKED_ADMIN_PRIZE].includes(card.status)\n );\n if (unlockedCards.length > 0) {\n // Check if we have any new UNLOCKED_ADMIN_PRIZE cards that we haven't handled\n const newAdminPrizeCards = unlockedCards.filter(\n card =>\n card.status === statuses.UNLOCKED_ADMIN_PRIZE &&\n !handleAdminPrizeRef.current.has(card.uuid)\n );\n\n // If we have new admin prize cards, mark them as handled\n newAdminPrizeCards.forEach(card => {\n handleAdminPrizeRef?.current.add(card.uuid);\n setLocalStorage([...handleAdminPrizeRef.current]);\n });\n\n // Only scroll if we have regular UNLOCKED cards or new UNLOCKED_ADMIN_PRIZE cards\n if (\n unlockedCards.some(card => card.status === statuses.UNLOCKED) ||\n newAdminPrizeCards.length > 0\n ) {\n scrollCardsIntoView();\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [lotteryTaskMappingEntry]);\n\n return (\n <>\n {\n setTaskPrizeEmptyUUID('');\n setLotteryRemainder({ uuid: taskPrizeEmptyUUID, remainder: 0 });\n }}\n />\n {isNeedLotteryTaskProcessHint && (\n \n )}\n \n \n );\n }\n);\n\nLotteryTaskCarouselContainer.displayName = 'LotteryTaskCarouselContainer';\n\nexport default React.memo(LotteryTaskCarouselContainer);\n","import { useSelector } from 'react-redux';\n\nexport default function useHasUserStateReady() {\n const { hasUserStateInited, hasUserWinnerPrizeListReady } = useSelector(s => s.flags);\n const { isLogin } = useSelector(s => s.userLoginState);\n\n return hasUserStateInited && (!isLogin || hasUserWinnerPrizeListReady);\n}\n","import { lotteryAdminTypes, lotteryRestShowTypes } from 'config/promoLotteryTypes';\n\nexport default function getLotteryCardRemainderInfo(lotteryData = {}, lotteryPrizes = []) {\n const { showRest, remainder, prizeLimited, type } = lotteryData;\n let quantityInfo = {};\n\n if (type !== lotteryAdminTypes.ADMIN && prizeLimited) {\n if (showRest === lotteryRestShowTypes.SHOW_REMAIN_AMOUNT) {\n quantityInfo.prizeLeftQuantity = remainder;\n } else if (showRest === lotteryRestShowTypes.SHOW_TOTAL_AMOUNT) {\n const total = lotteryPrizes.reduce((t, p) => {\n const {\n isLimited,\n settings: { quantity = 0 }\n } = p;\n const count = Boolean(isLimited) ? quantity : 0;\n return t + count;\n }, 0);\n quantityInfo.prizeTotalQuantity = total;\n }\n }\n\n return quantityInfo;\n}\n","import React from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { css } from '@emotion/core';\nimport Typography from '@material-ui/core/Typography';\n\nimport { gameTypes } from 'config/promoGameTypes';\nimport { below } from 'utils/breakpoint';\nimport { statuses } from 'editor/game_checkIn/components/lotteryTaskCarousel/LotteryTaskCard';\n\nexport default function LotteryTaskProcessHint({\n gameType,\n recordsLength,\n cards = [],\n componentStyle = {},\n style = false\n}) {\n const { t } = useTranslation();\n\n if (cards.length === 0) {\n return null;\n }\n\n const firstCheckPoint = cards[0].taskCondition ?? 0;\n const lastCheckPoint = cards[cards.length - 1].taskCondition ?? 0;\n const text = (() => {\n const texts = getTextsByGameType(gameType);\n if (recordsLength === 0) {\n return t(texts.START, { count: firstCheckPoint });\n }\n if (recordsLength >= lastCheckPoint) {\n return t(texts.ALL);\n }\n if (recordsLength < lastCheckPoint) {\n const next = cards.find(\n c => c.status !== statuses.PRIZE_EMPTY && c.taskCondition > recordsLength\n );\n return Boolean(next)\n ? t(texts.MORE, {\n count: next.taskCondition - recordsLength\n })\n : t(texts.DONE);\n }\n return '';\n })();\n\n return (\n Boolean(text) && (\n \n {text}\n \n )\n );\n}\n\nfunction getTextsByGameType(gameType) {\n switch (gameType) {\n case gameTypes.MULTI_CHALLENGE:\n case gameTypes.CHALLENGE_PHOTO_FRAME_COMPOSITE:\n return {\n START: 'label.challenge.progress.start',\n ALL: 'label.check_in.progress.all',\n MORE: 'label.challenge.progress.more',\n DONE: 'label.check_in.progress.done'\n };\n case gameTypes.CHECK_IN:\n default:\n return {\n START: 'label.check_in.progress.start',\n ALL: 'label.check_in.progress.all',\n MORE: 'label.check_in.progress.more',\n DONE: 'label.check_in.progress.done'\n };\n }\n}\n\nconst textStyle = ({ descColor }) => css`\n padding-top: 2px;\n text-align: center;\n color: ${descColor};\n ${below('sm')} {\n padding-top: 24px;\n font-size: 0.875rem;\n }\n`;\n","import { isCanSetVerifyMechanismGames, isForceVerifyMechanismGames } from 'config/promoGameTypes';\nimport { useSelector } from 'react-redux';\nimport { createSelector } from 'reselect';\n\nconst selectState = createSelector(\n [\n s => s.promo.type,\n s => s.settingPromo?.enableVerifyMechanism,\n s => s.signUpForm.id,\n s => s.lotteryTasks,\n s => s.userWinnerPrize,\n s => s.userGameResultRecords,\n s => s.flags,\n s => s.mgmReferral\n ],\n (\n gameType,\n enableVerifyMechanism,\n signUpFormId,\n lotteryTasks,\n userWinnerPrize,\n userGameResultRecords = [],\n flags,\n mgmReferral\n ) => {\n const { isMgmShare, isMgmSelf } = flags;\n const {\n lotteryTasks: mgmLotteryTasks,\n userGameResultRecords: mgmUserGameResultRecords,\n userWinnerPrize: mgmUserWinnerPrize\n } = mgmReferral;\n const currentLotteryTasks = { ...lotteryTasks, ...mgmLotteryTasks };\n const mgmUserGameResultRecordsAddTag = mgmUserGameResultRecords.map(obj => {\n return { ...obj, isMgm: true };\n });\n const isAllGameResultRecordsBeDeleted = userGameResultRecords.every(\n obj => obj.deletedAt !== null\n );\n\n const currentGameResultRecords = [\n ...userGameResultRecords,\n ...mgmUserGameResultRecordsAddTag\n ];\n const currentWinnerPrize = {\n winnerPrizes: [...userWinnerPrize.winnerPrizes, ...mgmUserWinnerPrize.winnerPrizes],\n thankPrizes: [...userWinnerPrize.thankPrizes, ...mgmUserWinnerPrize.thankPrizes],\n unOpenWinnerPrize: [\n ...userWinnerPrize.unOpenWinnerPrize,\n ...mgmUserWinnerPrize.unOpenWinnerPrize\n ]\n };\n const { winnerPrizes, thankPrizes, unOpenWinnerPrize } = currentWinnerPrize;\n const allWinners = [...winnerPrizes, ...thankPrizes, ...unOpenWinnerPrize];\n const hasEnableSignUpForm = Boolean(signUpFormId);\n const normalizedUserGameResultRecords = currentGameResultRecords.reduce(\n (obj, record) => {\n if (Boolean(record.isMgm)) {\n obj.allUUIDsForMgm.push(record.uuid);\n } else {\n obj.allUUIDs.push(record.uuid);\n }\n const hasGotLotteryTaskWinner =\n allWinners.find(\n w =>\n w.entryUuid === record.uuid &&\n currentLotteryTasks[w.prize.lotteryUuid] !== undefined\n ) !== undefined;\n obj.byUUIDs[record.uuid] = record;\n if (\n isEntryValidToGetTaskWinner(record, {\n enableVerifyMechanism,\n gameType,\n hasEnableSignUpForm,\n isMgm: Boolean(isMgmSelf) || Boolean(isMgmShare),\n userGameResultRecords\n })\n ) {\n obj.validEntryTotal += 1;\n if (!hasGotLotteryTaskWinner) {\n obj.allUUIDsValidToGetTaskWinner.push(record.uuid);\n }\n }\n return obj;\n },\n {\n allUUIDs: [],\n allUUIDsForMgm: [],\n allUUIDsValidToGetTaskWinner: [],\n validEntryTotal: 0,\n byUUIDs: {}\n }\n );\n\n return {\n entriesRecords: normalizedUserGameResultRecords,\n lotteriesTaskWinnerInfo: Object.keys(currentLotteryTasks).reduce((obj, uuid) => {\n const anyWinnerOfLottery = allWinners.find(w => w.prize.lotteryUuid === uuid);\n const entryData = (() => {\n if (Boolean(anyWinnerOfLottery)) {\n const { uuid, flow = {}, deletedAt = '' } =\n normalizedUserGameResultRecords.byUUIDs[anyWinnerOfLottery.entryUuid] ??\n {};\n return { entryUUID: uuid, entryFlow: { ...flow, deletedAt } };\n } else {\n return { entryUUID: '', entryFlow: {} };\n }\n })();\n obj[uuid] = {\n hasGetWinner: Boolean(anyWinnerOfLottery),\n ...entryData\n };\n return obj;\n }, {}),\n isAllGameResultRecordsBeDeleted: isAllGameResultRecordsBeDeleted\n };\n }\n);\n\nexport default function useLotteriesTaskUtilsState() {\n return useSelector(selectState);\n}\n\n// 根據 user 參加紀錄檢查每一張關卡獎卡片是否能領獎()\nfunction isEntryValidToGetTaskWinner(\n entry,\n { enableVerifyMechanism, gameType, hasEnableSignUpForm, isMgm = false, userGameResultRecords }\n) {\n const {\n deletedAt,\n flow: { qualified, formSignUp },\n hasGotLotteryTaskWinner\n } = entry;\n //For mgm_share 要拿原模組的 userGameResultRecords,但這樣寫就沒辦法參加很多次,如以後有需求,需要再進行變更\n const { flow: { formSignUp: primaryFormSignUp } = {} } = userGameResultRecords[0];\n /* 此 entry:\n 1. 沒有已經領過獎\n 2. 沒有被刪除\n 3. 沒有需要填表 or 有填過表\n 4. 沒有需要審核 or 有資格\n */\n if (\n [\n !hasGotLotteryTaskWinner,\n !deletedAt,\n !hasEnableSignUpForm || Boolean(formSignUp) || (isMgm && Boolean(primaryFormSignUp)),\n !(\n isForceVerifyMechanismGames(gameType) ||\n (isCanSetVerifyMechanismGames(gameType) && Boolean(enableVerifyMechanism))\n ) || Boolean(qualified)\n ].every(e => e)\n ) {\n return true;\n } else {\n return false;\n }\n}\n","import { useEffect } from 'react';\nimport { useSelector, useDispatch } from 'react-redux';\nimport Cookie from 'js-cookie';\n\nimport { gtmPushUserLogin } from 'client/utils/tracking';\nimport { getLoginUserInfo } from 'client/utils/login';\nimport { setCurrentLoginID } from 'client/redux/modules/userLoginState';\nimport useClientErrorHandler from 'client/hooks/useClientErrorHandler';\nimport { loginTypeMappingPointRoutesParam } from 'config/loginTypes';\n\nexport function usePushLoginEvent() {\n const dispatch = useDispatch();\n const errHandler = useClientErrorHandler();\n const {\n settingPromo: { loginMethod }\n } = useSelector(s => s);\n const { isLogin } = useSelector(s => s.userLoginState);\n const [loginType] = loginTypeMappingPointRoutesParam[loginMethod] || [null];\n\n const { currentEntryUUID } = useSelector(s => s.userEntryState);\n const { id: promoId } = useSelector(s => s.promo);\n\n useEffect(() => {\n if (isLogin && currentEntryUUID && Boolean(loginMethod) && Cookie.get('gtm_login_event')) {\n try {\n async function getLoginInfo() {\n const loginUserInfo = await getLoginUserInfo(loginMethod);\n const loginId = loginUserInfo?.id;\n const loginType = loginUserInfo?.loginType;\n\n dispatch(setCurrentLoginID(loginId));\n gtmPushUserLogin({ uid: loginId, loginType, promoId });\n Cookie.remove('gtm_login_event');\n }\n getLoginInfo();\n } catch (err) {\n errHandler({ err });\n }\n }\n }, [currentEntryUUID, dispatch, errHandler, isLogin, loginMethod, loginType, promoId]);\n}\n","import { useSelector } from 'react-redux';\nimport useIsInitSuccessInfo from './useIsInitSuccessInfo';\n\nexport default function useGenerateState() {\n const {\n isfirstPassLoginSever,\n hasUsablePasscode,\n passcode,\n passcodeRemainingCount\n } = useSelector(s => s.promoState);\n const { currentLoginID, isLogin } = useSelector(s => s.userLoginState);\n const { qualifyWithdrawUuid } = useSelector(s => s.settingPointSystems);\n const { isNeedReducePoint, isNeedEnterPasscode } = useSelector(s => s.userEntryState);\n const isInitialized = useIsInitSuccessInfo();\n // 是否已登入\n const isLoginStatus = isInitialized && Boolean(isLogin);\n // 是否剛走過登入流程\n const isFirstPassLogin = isInitialized && isfirstPassLoginSever && Boolean(currentLoginID);\n // 啟用扣點且已扣點\n const isAfterReduceFeverPoint =\n isInitialized &&\n Boolean(qualifyWithdrawUuid) &&\n !isNeedReducePoint &&\n Boolean(currentLoginID);\n //啟用passcode passcode 可用且還有剩餘次數\n const isAfterVerifyPasscode =\n isInitialized &&\n Boolean(hasUsablePasscode) &&\n isNeedEnterPasscode &&\n Boolean(passcode) &&\n Number(passcodeRemainingCount) >= 1;\n\n return {\n isAfterReduceFeverPoint,\n isLoginStatus,\n isFirstPassLogin,\n isInitialized,\n isNeedReducePoint,\n isAfterVerifyPasscode\n };\n}\n","import { fetches, generateFetchOpts, generateFetchOptsGetter } from 'api/client';\nimport { POST } from 'api/common';\nimport * as clientErrTypes from 'config/clientErrorTypes';\n\n/**\n * 取得 MGM 關聯的模組編號資料 api https://app.clickup.com/t/866aq72wp\n * @param {string} promoUUID promoUUID\n * @return {promise}\n */\nexport const getMgmRelationByClientApi = promoUUID => {\n return fetches(`/promotions/${promoUUID}/mgm/relation`, generateFetchOpts(), {\n dataKeys: 'data'\n });\n};\n\n/**\n * @method createMgmEntryApi 建立 mgm 功能模組 entry\n * @description https://app.clickup.com/t/860rky8av\n * @param {string} promoUuid 活動 Uuid\n * @param {string} entryUuid Entry Uuid\n * @return {promise}\n */\nexport function createMgmEntryApi({ promoUuid, entryUuid }) {\n return fetches(\n `/promotions/${promoUuid}/entries/${entryUuid}/mgm/referral/entry`,\n generateFetchOptsGetter({ method: POST }),\n {\n throwErrConfigs: {\n [clientErrTypes.MGM_CREATE_ENTRY_FAILED]: r => r.httpStatus !== 200\n }\n }\n );\n}\n\n/**\n * @method mgmLotteryValidationApi 檢查並觸發 mgm 功能模組配獎資格\n * @description https://app.clickup.com/t/866aqeruz\n * @param {string} promoUuid 活動 Uuid\n * @param {string} entryUuid Entry Uuid\n * @return {promise}\n */\nexport function mgmLotteryValidationApi({ promoUuid, entryUuid }) {\n return fetches(\n `/promotions/${promoUuid}/entries/${entryUuid}/mgm/lottery/validation`,\n generateFetchOptsGetter({ method: POST }),\n {\n throwErrConfigs: {\n [clientErrTypes.MGM_LOTTERY_VALIDATION_FAILED.REFERRAL_ENTRY_NOT_FOUND]: r =>\n r.httpStatus === 400 && r.payload.message === 'Mgm referral entry Not Found',\n [clientErrTypes.MGM_LOTTERY_VALIDATION_FAILED.EXCEPTION]: r => r.httpStatus !== 200\n }\n }\n );\n}\n","import { useEffect, useState } from 'react';\nimport { useSelector, useDispatch } from 'react-redux';\nimport { useLocation } from 'react-router-dom';\nimport * as clientErrTypes from 'config/clientErrorTypes';\nimport { lotteryInstantTypes, lotteryParticipantTypes } from 'config/promoLotteryTypes';\nimport { gameTypes } from 'config/promoGameTypes';\nimport {\n isGameShouldOpenWinnerAfterGet,\n isLotteryShouldOpenWinnerAfterGet,\n isNoResultPageGames\n} from 'config/promoGameTypesClientConfig';\nimport { getPrizeTypeLabel } from 'config/promoPrizeTypes';\nimport {\n getWinner,\n checkIsQualifyToGetWinner,\n updateWinnerAnimationFlag,\n getPromoLotteries,\n getPrizeInfoAPI\n} from 'api/client';\nimport { mgmLotteryValidationApi, createMgmEntryApi } from 'api/mgm/client';\nimport {\n setParticipantWinnerPopup,\n setShouldUpdateUserWinnerList,\n PICK_PRIZE_CUSTOM_PRIZE_UUID\n} from 'client/redux/modules/flags';\nimport { successGetWinner } from 'client/redux/modules/userEntryState';\nimport {\n updateParticipantRemainderFromApi,\n updateParticipantRemainder\n} from 'client/redux/modules/lotteryParticipant';\nimport { setCurrentPrizeUUID, setGameAlreadyToPlay } from 'client/redux/modules/purePrizeState';\nimport { updateFlowOfEntryRecord, entryFlowKeys } from 'client/redux/modules/userGameResultRecords';\nimport { updateGameResultRecordsCount } from 'client/game_checkIn/redux/modules/gameState';\nimport { scrollPromoBodyIntoView } from 'client/utils/scroll';\nimport { gtmPushPrize } from 'client/utils/tracking';\nimport useClientErrorHandler, { generateApiErrObj } from 'client/hooks/useClientErrorHandler';\nimport useClientHistory, { JOIN, RESULT, LOTTERY, PRIZE } from 'client/hooks/useClientHistory';\nimport { useIsVerifyModuleCanGetParticipantWinner } from 'client/hooks/moduleVerifyUtilHooks';\nimport usePrizeRuleChecker from 'client/hooks/usePrizeRuleChecker';\nimport {\n getLotteryConfig,\n lotteryCategories\n} from 'editor/components/SideBar/Prize/configs/prizeTypeConfig';\nimport { delay } from 'utils/delay';\n\nexport default function useGetParticipantWinner() {\n const dispatch = useDispatch();\n const history = useClientHistory();\n const location = useLocation();\n const errHandler = useClientErrorHandler();\n const getVerifyModuleStatus = useIsVerifyModuleCanGetParticipantWinner();\n const { uuid: promoUUID, type: gameType, id: promoId } = useSelector(s => s.promo);\n const { isPurePrizeGame } = useSelector(s => s.promoState);\n const { isMgmShare, isMgmMission, isMgmSelf } = useSelector(s => s.flags);\n const lotteryParticipant = useSelector(s => s.lotteryParticipant);\n const lotteryInstant = useSelector(s => s.lotteryInstant);\n const currentEntryUUID = useSelector(s => s.userEntryState.currentEntryUUID);\n const {\n isLotteryInstantRequiredAllCorrect,\n isLotteryParticipantRequiredAllCorrect,\n checkIsGameChallengeAllCorrect,\n checkIsUserHaveClaimedParticipantPrize,\n checkIsUserHaveClaimedInstantPrize\n } = usePrizeRuleChecker({ entryUuid: currentEntryUUID });\n\n const {\n lotteryParticipant: mgmLotteryParticipant = {},\n lotteryInstant: mgmLotteryInstant = {}\n } = useSelector(s => s.mgmReferral);\n\n const { loginId } = useSelector(s => s.userLoginState);\n\n const currentLotteryParticipant = isMgmShare ? mgmLotteryParticipant : lotteryParticipant;\n const currentLotteryInstant = isMgmShare ? mgmLotteryInstant : lotteryInstant;\n //動畫獎\n const animatingLottery = {\n uuid: currentLotteryParticipant.uuid,\n type: currentLotteryParticipant.type,\n AnimationSettings: currentLotteryParticipant.AnimationSettings\n };\n //即時獎\n const instantLottery = {\n uuid: currentLotteryInstant.uuid,\n type: currentLotteryInstant.type,\n AnimationSettings: {}\n };\n\n const {\n currentEntryId,\n currentEntryUUID: entriesUUID,\n hasInstantPrize: hasFulfillLotteryInstant,\n hasParticipantPrize: hasFulfillLotteryParticipant,\n hasReferralCodeInput\n } = useSelector(s => s.userEntryState);\n\n const { mgmReferral: { uuid: mgmPromoUUID } = {} } = useSelector(s => s.mgmRelation);\n const currentPromoUUID = Boolean(isMgmShare) ? mgmPromoUUID : promoUUID;\n const [retryMgmLotteryValidationApi, setRetryMgmLotteryValidationApi] = useState(0);\n\n // 根據給獎條件設定以及 user 答題結果,給出可以配獎的獎項,去執行配獎開獎流程\n function getEligibleLotteriesByCondition(gameResultRecords = []) {\n // 找到目前 entry 的遊戲結果\n const currentEntryRecord = gameResultRecords.find(r => r.uuid === currentEntryUUID) ?? {};\n // 確認是否有多選類型的獎\n const isPromoHavePickLottery = Boolean(\n currentLotteryParticipant?.type === lotteryParticipantTypes.PICK_THE_PRIZE ||\n currentLotteryParticipant?.type === lotteryParticipantTypes.POINTS_REDEEM\n );\n // 受否有即時獎\n const isPromoHaveInstantLottery = Boolean(instantLottery?.uuid);\n const isGameChallengeAllCorrect = checkIsGameChallengeAllCorrect({\n type: gameType,\n gameResult: currentEntryRecord?.gameResult\n });\n // 有多選類型的獎 (好禮自由選或兌點自由選)\n if (isPromoHavePickLottery) {\n // 活動同時除了有好禮自由選還有「參加就送」以及 「參加就送」還沒背配獎給此 entry\n if (\n isPromoHaveInstantLottery &&\n !checkIsUserHaveClaimedInstantPrize(currentEntryRecord)\n ) {\n // 且同時開啟「即時獎」需要全對或挑戰成功的狀況\n if (isLotteryInstantRequiredAllCorrect) {\n // 全對或挑戰成功\n if (isGameChallengeAllCorrect) {\n return [instantLottery];\n }\n // 沒全對或挑戰失敗\n return [];\n }\n return [instantLottery];\n }\n return [];\n }\n const eligibleLotteries = [];\n // 若有答題全對(即給獎條件成立),返回全部 lottery 資料,不管 user 有無開全對設定\n if (isGameChallengeAllCorrect) {\n if (!checkIsUserHaveClaimedParticipantPrize(currentEntryRecord)) {\n eligibleLotteries.push(animatingLottery);\n }\n if (!checkIsUserHaveClaimedInstantPrize(currentEntryRecord)) {\n eligibleLotteries.push(instantLottery);\n }\n return eligibleLotteries;\n }\n\n // 若有答題沒全對\n // 且同時開啟「動畫獎」與「即時獎」需要全對或挑戰成功的狀況\n if (isLotteryParticipantRequiredAllCorrect && isLotteryInstantRequiredAllCorrect) {\n return [];\n }\n\n // 且只開啟「動畫獎」需要全對或挑戰成功的狀況\n if (isLotteryParticipantRequiredAllCorrect) {\n if (!checkIsUserHaveClaimedParticipantPrize(currentEntryRecord)) {\n return [instantLottery];\n }\n return [];\n }\n\n // 且只開啟「即時獎」需要全對或挑戰成功的狀況\n if (isLotteryInstantRequiredAllCorrect) {\n if (!checkIsUserHaveClaimedInstantPrize(currentEntryRecord)) {\n return [animatingLottery];\n }\n return [];\n }\n\n // 若都沒有啟用全答正確的限制,則回傳兩個獎項\n return [instantLottery, animatingLottery];\n }\n\n async function processLotteries(lotteries = []) {\n // result 是動畫獎與即時獎配獎後的結果\n const result = [];\n if (lotteries.length === 0) return result;\n const validLottery = lotteries.filter(lottery => Boolean(lottery.uuid));\n for (const [index, lottery] of validLottery.entries()) {\n try {\n const currentLotteryUUID = lottery.uuid;\n // step 1. 拿 entryLottery + 檢查配獎資格\n await checkIsQualifyToGetWinner({\n promoUUID: currentPromoUUID,\n entriesUUID,\n lotteryUUID: currentLotteryUUID\n });\n // step 2. 配獎\n const winnerResp = await getWinner(\n currentPromoUUID,\n entriesUUID,\n currentLotteryUUID\n );\n result.push({\n lottery,\n winnerResp\n });\n // 若要連續執行多個配獎,最後一個獎配完後不需要做 delay,預防 API 429 Too may request error\n if (lotteries.length !== index && validLottery.length > 1) {\n await delay({ timer: 1500 });\n }\n } catch (error) {\n console.error(\n `Error processing lottery: type=${lottery.type}, uuid=${lottery.uuid}, message=${error}`\n );\n }\n }\n return result;\n }\n // 拿配獎完的 response 資料與 current lottery 做後續開獎、導轉換頁與 error handling\n async function continueFlowAfterGetWinner(result = []) {\n if (result.length === 0) return history.push(RESULT);\n for (const [index, { lottery, winnerResp }] of result.entries()) {\n if (winnerResp.httpStatus === 200) {\n const prizeUUID = winnerResp.payload[0];\n await continueFlowSuccessGetWinner(lottery, prizeUUID, result.length === index + 1);\n } else if (winnerResp.httpStatus === 226) {\n await continueFlowIfNoRemainPrizeAndNoSuspend(lottery);\n } else if (winnerResp.httpStatus === 400) {\n if (\n winnerResp.payload.message === clientErrTypes.POINTS_IS_NOT_ENOUGH_BY_PRE_CHECK\n ) {\n winnerResp.errSerialNo = currentEntryId;\n throw generateApiErrObj(\n winnerResp,\n clientErrTypes.POINTS_IS_NOT_ENOUGH_BY_PRE_CHECK\n );\n } else if (winnerResp.payload.message === clientErrTypes.POINTS_IS_NOT_ENOUGH) {\n winnerResp.errSerialNo = currentEntryId;\n throw generateApiErrObj(winnerResp, clientErrTypes.POINTS_IS_NOT_ENOUGH);\n } else {\n winnerResp.errSerialNo = currentEntryId;\n throw generateApiErrObj(winnerResp, clientErrTypes.GET_WINNER);\n }\n } else {\n winnerResp.errSerialNo = currentEntryId;\n throw generateApiErrObj(winnerResp, clientErrTypes.GET_WINNER);\n }\n }\n }\n async function checkIsNeedToGetWinner(gameResultRecords) {\n const verifyModuleStatus = getVerifyModuleStatus(gameResultRecords);\n if (\n (isMgmMission || isMgmSelf) &&\n (!verifyModuleStatus.isNeedVerifyModule ||\n (verifyModuleStatus.isNeedVerifyModule && verifyModuleStatus.canGetWinner)) &&\n hasReferralCodeInput\n ) {\n // 進到此流程代表已經填表且有 GameResult,如果是任務模組,要通知 mgm referral 模組\n try {\n await createMgmEntryApi({\n promoUuid: promoUUID,\n entryUuid: entriesUUID\n });\n\n await mgmLotteryValidationApi({\n promoUuid: promoUUID,\n entryUuid: entriesUUID\n });\n } catch (err) {\n if (\n err.message ===\n clientErrTypes.MGM_LOTTERY_VALIDATION_FAILED.REFERRAL_ENTRY_NOT_FOUND\n ) {\n setRetryMgmLotteryValidationApi(1);\n } else errHandler({ err });\n }\n }\n\n // 純獎模組 好禮自由選 與 兑點自由選 的 檢查配獎資格 (checkIsQualifyToGetWinner) 與 配獎 (Get Winner) 寫在各自模組內,而非寫在共用的 useGetParticipantWinner 內\n if (gameType === gameTypes.PICK_THE_PRIZE || gameType === gameTypes.POINTS_REDEEM) {\n // 如果模組是純獎模組且是自由選,且有設定即時獎,在進入動畫頁前,先把即時獎做配獎與開獎,成功後再經由各自模組執行自己動畫獎的配獎與開獎(此配開會寫在各自模組動畫元件內)\n if (instantLottery.uuid) {\n const result = await processLotteries([instantLottery]);\n await delay({ timer: 1500 });\n await continueFlowAfterGetWinner(result);\n }\n return false;\n }\n if (hasFulfillLotteryParticipant && hasFulfillLotteryInstant) {\n if (isNoResultPageGames(gameType)) {\n dispatch(setParticipantWinnerPopup({ isNoGetPrize: true }));\n history.push(JOIN);\n } else {\n history.push(RESULT);\n }\n return false;\n }\n if (verifyModuleStatus.isNeedVerifyModule && !verifyModuleStatus.canGetWinner) {\n if (isNoResultPageGames(gameType)) {\n dispatch(updateGameResultRecordsCount());\n history.push(JOIN);\n } else {\n history.push(RESULT);\n }\n return false;\n }\n if (!verifyModuleStatus.canGetWinner) {\n history.push(RESULT);\n return false;\n }\n return true;\n }\n // 若獎品已經發完的後續流程: 更新 user entry state + 更新剩餘獎品數量 + 跳頁\n async function continueFlowIfNoRemainPrizeAndNoSuspend(lottery) {\n dispatch(successGetWinner(lottery.type, currentLotteryParticipant.type));\n await dispatch(updateParticipantRemainder(0));\n if (isNoResultPageGames(gameType)) {\n dispatch(setParticipantWinnerPopup({ isNoGetPrize: true }));\n history.push(JOIN);\n } else {\n history.push(RESULT);\n }\n }\n function continueFlowSuccessPickWinner() {\n if (isNoResultPageGames(gameType)) {\n dispatch(\n setParticipantWinnerPopup({\n prizeUUID: PICK_PRIZE_CUSTOM_PRIZE_UUID,\n entryUUID: entriesUUID\n })\n );\n history.push(JOIN);\n } else {\n if (isGameShouldOpenWinnerAfterGet(gameType)) {\n scrollPromoBodyIntoView();\n history.push(LOTTERY, { animatingLottery, entriesUUID });\n } else {\n // 好禮自由選是在動畫頁,每選一個獎品,就配+開一個獎,所以不會在 store game result 後馬上打配獎API,而是直接前往結果頁\n history.push(RESULT);\n }\n }\n }\n async function continueFlowSuccessGetWinner(\n currentLottery,\n prizeUUID,\n isGetLastWinnerInMultipleWinners\n ) {\n const { payload: prizeData } = await getPrizeInfoAPI(currentPromoUUID, prizeUUID);\n const { prize: { name: prizeName, type: prizeType } = {} } = prizeData;\n const lotteryCategory = getLotteryConfig(currentLottery.type).category;\n // Support 已上線舊活動是 參加就送 放在 lottery participant\n if (\n lotteryCategory === lotteryCategories.IS_PARTICIPANT_LOTTERY ||\n (currentLottery.type === currentLotteryParticipant.type &&\n currentLottery.type === lotteryInstantTypes.JOIN_AND_GET)\n ) {\n dispatch(successGetWinner(currentLottery.type, currentLotteryParticipant.type));\n dispatch(\n updateFlowOfEntryRecord({\n entryUUID: entriesUUID,\n key: entryFlowKeys.LOTTERY_PARTICIPANT\n })\n );\n } else if (lotteryCategory === lotteryCategories.IS_INSTANT_LOTTERY) {\n dispatch(successGetWinner(currentLottery.type));\n dispatch(\n updateFlowOfEntryRecord({\n entryUUID: entriesUUID,\n key: entryFlowKeys.LOTTERY_INSTANT\n })\n );\n }\n await dispatch(updateParticipantRemainderFromApi());\n // 參加就送不是純獎模組,也不是有動畫的獎,所以若在純獎模組內被使用的是動畫,才會有點擊畫面後馬上通知現在動畫頁要執行那種 lottery 動畫,跟執行些獎項\n if (isPurePrizeGame && currentLottery.type !== lotteryInstantTypes.JOIN_AND_GET) {\n dispatch(setShouldUpdateUserWinnerList());\n dispatch(setCurrentPrizeUUID(prizeUUID));\n dispatch(setGameAlreadyToPlay());\n const fromRegex = /\\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\/[0-9]+\\/form/gm;\n const isInFormPage = Boolean(location?.pathname?.match(fromRegex));\n // [#86epp4yhj] 若純獎模組不管是有開即時獎 + 動畫獎 or 只開動畫獎,在配獎過程中,若這是最後一次配獎,填完表單,要返回參加頁跑動畫做開獎\n if (isInFormPage && isGetLastWinnerInMultipleWinners) {\n history.push(JOIN);\n }\n } else if (isNoResultPageGames(gameType)) {\n // 參加就送是唯一自動配加開的 lottery\n if (currentLottery.type === lotteryInstantTypes.JOIN_AND_GET) {\n await updateWinnerAnimationFlag(currentPromoUUID, entriesUUID, prizeUUID);\n gtmPushPrize({\n prizeName,\n prizeType: getPrizeTypeLabel(prizeType),\n loginId,\n promoId\n });\n dispatch(setShouldUpdateUserWinnerList());\n }\n if (lotteryCategory === lotteryCategories.IS_PARTICIPANT_LOTTERY) {\n dispatch(setParticipantWinnerPopup({ prizeUUID, entryUUID: entriesUUID }));\n }\n history.replace(JOIN);\n } else if (isGameShouldOpenWinnerAfterGet(gameType)) {\n // 參加獎不需前往動畫頁,可以直接在配獎過後做開獎且更新 winner 名單\n if (currentLottery.type === lotteryInstantTypes.JOIN_AND_GET) {\n await updateWinnerAnimationFlag(currentPromoUUID, entriesUUID, prizeUUID);\n gtmPushPrize({\n prizeName,\n prizeType: getPrizeTypeLabel(prizeType),\n loginId,\n promoId\n });\n dispatch(setShouldUpdateUserWinnerList());\n // 登錄給獎+參加獎 & 新客加入獎勵+參加獎 => 參加完成遊戲後,不會導頁去結果頁,也不屬於參加及結果頁的模組,他會直接去獎品頁面,補充: 登錄給獎也不是純獎模組,所以領獎時沒動畫\n if (gameType === gameTypes.SIGN_FORM || gameType === gameTypes.SIGN_UP) {\n history.replace(PRIZE, {\n prizeUUID,\n entriesUUID: entriesUUID\n });\n return;\n } else history.push(RESULT);\n } else {\n scrollPromoBodyIntoView();\n history.push(LOTTERY, { animatingLottery: currentLottery, entriesUUID, prizeUUID });\n }\n } else {\n // 參加就送要馬上在配獎後要馬上自動開獎\n if (isLotteryShouldOpenWinnerAfterGet(currentLottery.type)) {\n await updateWinnerAnimationFlag(currentPromoUUID, entriesUUID, prizeUUID);\n gtmPushPrize({\n prizeName,\n prizeType: getPrizeTypeLabel(prizeType),\n loginId,\n promoId\n });\n dispatch(setShouldUpdateUserWinnerList());\n }\n // 若又同時開即時獎+動畫獎,配獎執行順序是:\n // 拿 entryLottery -> 即時獎配獎 -> 即時獎開獎 -> 拿 entryLottery -> 動畫獎配獎 -> 動畫獎開獎\n // 要確保最後一個獎已經配開獎完才能去結果頁,只有純獎的好禮自由選不需要走這個邏輯,因為當參加就送若執行完後,接著要幫好禮自由選不做配獎、開獎時,不能馬上倒轉去結果頁\n const isPurePickThePrizeGame = isPurePrizeGame && gameType === gameTypes.PICK_THE_PRIZE;\n if (isGetLastWinnerInMultipleWinners && !isPurePickThePrizeGame) {\n dispatch(setShouldUpdateUserWinnerList());\n history.push(RESULT);\n }\n }\n }\n async function createParticipantWinner(gameResultRecords) {\n try {\n if (await checkIsNeedToGetWinner(gameResultRecords)) {\n // 如果此模組 (非純獎模組) 有設定動畫獎,且是自由選系列的獎項 (algorithm = 2)\n if (\n currentLotteryParticipant.type === lotteryParticipantTypes.PICK_THE_PRIZE ||\n currentLotteryParticipant.type === lotteryParticipantTypes.POINTS_REDEEM\n ) {\n // 如果此模組除了有開動畫獎(自由選)還有開即時獎(參加就送),在進入好禮自由選選獎品前,要先提前配獎開獎即時獎(lotteries)\n const lotteries = getEligibleLotteriesByCondition(gameResultRecords);\n // 若好禮自由選有即時獎,要先配獎即時獎,成功後再進入好禮自由選選獎品\n if (lotteries.length > 0) {\n const result = await processLotteries(lotteries);\n await continueFlowAfterGetWinner(result);\n }\n const { payload } = await getPromoLotteries(currentPromoUUID);\n const { prizeRemainder: remainder } = payload.filter(\n ({ lottery: { uuid } }) => uuid === currentLotteryParticipant.uuid\n )[0];\n const hasNoRemainder =\n currentLotteryParticipant.prizeLimited && remainder === 0;\n\n if (hasNoRemainder) {\n if (currentLotteryParticipant.suspendWhenNoPrize) {\n const err = generateApiErrObj(\n {},\n clientErrTypes.PICK_PRIZE_LOTTERY_NO_REMAINDER\n );\n errHandler({ err });\n } else {\n await continueFlowIfNoRemainPrizeAndNoSuspend(\n currentLotteryParticipant\n );\n }\n } else {\n // 好禮自由選與兌點自由選在 entry 被 store game result 後,會馬上進行檢查配獎資格 + 配獎,成功後才會去動畫頁做開獎\n continueFlowSuccessPickWinner();\n }\n } else {\n const lotteries = getEligibleLotteriesByCondition(gameResultRecords);\n const result = await processLotteries(lotteries);\n await continueFlowAfterGetWinner(result);\n }\n }\n } catch (err) {\n errHandler({ err });\n }\n }\n\n useEffect(() => {\n const retry = async () => {\n try {\n await mgmLotteryValidationApi({\n promoUuid: promoUUID,\n entryUuid: entriesUUID\n });\n\n setRetryMgmLotteryValidationApi(0);\n } catch (err) {\n if (\n err.message ===\n clientErrTypes.MGM_LOTTERY_VALIDATION_FAILED.REFERRAL_ENTRY_NOT_FOUND\n ) {\n setRetryMgmLotteryValidationApi(c => (c > 3 ? 0 : c + 1));\n } else errHandler({ err });\n }\n };\n\n if (retryMgmLotteryValidationApi > 0 && Boolean(entriesUUID) && Boolean(promoUUID)) {\n retry();\n }\n }, [entriesUUID, promoUUID, retryMgmLotteryValidationApi, errHandler]);\n\n return gameResultRecords => createParticipantWinner(gameResultRecords);\n}\n","import queryString from 'query-string';\nimport { useEffect, useState, useCallback } from 'react';\nimport { useSelector } from 'react-redux';\nimport { getPromoReferralInfoApi, getShortLinkApi } from 'api/client';\nimport useClientErrorHandler from 'client/hooks/useClientErrorHandler';\nimport useShareLink from 'hooks/useShareLink';\n\nconst useGetReferralData = ({\n promoUUID,\n promoId,\n missionPromoUUID,\n latestEntryId,\n latestEntryUuid,\n dependency = []\n}) => {\n const { test_code, test_expired } = queryString.parse(window.location.search);\n const { isMgmSelf, isMgmShare } = useSelector(s => s.flags);\n const { isLogin } = useSelector(s => s.userLoginState);\n const { currentEntryUUID, currentEntryId } = useSelector(s => s.userEntryState);\n const [isLoading, setIsisLoading] = useState(false);\n const [referralCode, setReferralCode] = useState('');\n const [referralUrl, setReferralUrl] = useState('');\n const [referralCount, setReferralCount] = useState(0);\n const dependencyGuard = [isLogin, currentEntryUUID, ...dependency].every(Boolean);\n const isMgmPromo = isMgmSelf || isMgmShare;\n const errHandler = useClientErrorHandler();\n const getShareUrl = useShareLink({ domain: window.location.host });\n\n const getReferralData = useCallback(\n async isMgmPromo => {\n try {\n setIsisLoading(true);\n const [shortLinkResp, referralInfoResp] = await Promise.all([\n // 邀請模組會透過 short link api 取得短網址 (任務模組)\n // 一般分享會透過 short link api 取得短網址 (當下的模組)\n getShortLinkApi(isMgmShare ? missionPromoUUID : promoUUID),\n isMgmPromo ? getPromoReferralInfoApi(promoUUID) : Promise.resolve(true)\n ]);\n if (shortLinkResp.httpStatus === 200) {\n const {\n payload: { shortLink }\n } = shortLinkResp;\n setReferralUrl(shortLink);\n }\n\n if (referralInfoResp.httpStatus === 200) {\n const {\n payload: { referralCode, counts }\n } = referralInfoResp;\n setReferralCode(referralCode);\n setReferralCount(counts);\n }\n } catch (err) {\n errHandler({ err });\n } finally {\n setIsisLoading(false);\n }\n },\n [errHandler, isMgmShare, missionPromoUUID, promoUUID]\n );\n\n useEffect(() => {\n if (Boolean(promoUUID) && dependencyGuard) {\n getReferralData(isMgmPromo);\n }\n }, [getReferralData, promoUUID, dependencyGuard, isMgmPromo]);\n const referralLink =\n Boolean(referralUrl) && Boolean(referralCode) && `${referralUrl}/r/${referralCode}`;\n const shareLink =\n Boolean(referralUrl) && Boolean(currentEntryId) && `${referralUrl}/r/${currentEntryId}`;\n\n return {\n getReferralData,\n referralCode,\n // [860t0x3m9] 若段網址沒有產生,則用現有資料組成分享長網址\n referralUrl:\n referralLink ||\n shareLink ||\n getShareUrl({\n testCode: { test_code, test_expired },\n promoId,\n promoUUID,\n entryId: latestEntryId,\n entryUUID: latestEntryUuid,\n referralCode\n }),\n referralCount,\n isLoading\n };\n};\n\nexport default useGetReferralData;\n","import { useCallback } from 'react';\nimport { useSelector, useDispatch } from 'react-redux';\nimport i18n from 'i18next';\nimport { submitPasscode } from 'api/client';\nimport { updateShowPasswordQualifyStatus } from 'client/redux/modules/promoState';\nimport { setNeedEnterPasscode } from 'client/redux/modules/userEntryState';\nimport { showCustomErrDialog, handlers } from 'client/redux/modules/systemErrorDialog';\nimport useClientErrorHandler from 'client/hooks/useClientErrorHandler';\nimport { generateApiErrObj } from 'client/hooks/useClientErrorHandler';\nimport { hasShouldNotEnterPasscodeEachTimeGames } from 'config/promoGameTypesClientConfig';\nimport * as clientErrTypes from 'config/clientErrorTypes';\nimport { getErrorTypeDialogDesc, getPasscodeErrorType, errorTypes } from 'config/passcode';\n\nexport default function useSubmitPasscode() {\n const dispatch = useDispatch();\n const errHandler = useClientErrorHandler();\n const { uuid: promoUUID, type: gameType } = useSelector(s => s.promo);\n const { currentEntryUUID, isNeedEnterPasscode } = useSelector(s => s.userEntryState);\n const { passcode } = useSelector(s => s.promoState);\n\n const func = useCallback(async () => {\n if (Boolean(isNeedEnterPasscode)) {\n try {\n const resp = await submitPasscode({\n promoUUID,\n entryUUID: currentEntryUUID,\n passcode\n });\n const { payload, httpStatus } = resp;\n const remainingCounts = payload?.remainingCounts;\n if (httpStatus === 200) {\n dispatch(\n updateShowPasswordQualifyStatus({\n hasUsablePasscode: Boolean(remainingCounts),\n passcode: remainingCounts >= 1 ? passcode : '',\n passcodeRemainingCount: remainingCounts\n })\n );\n if (hasShouldNotEnterPasscodeEachTimeGames(gameType)) {\n dispatch(setNeedEnterPasscode(false));\n }\n return { hasUsablePasscode: Boolean(remainingCounts), passcode };\n } else if (\n [\n errorTypes.DUPLICATE,\n errorTypes.USAGE_LIMIT_EXCEEDED,\n errorTypes.ERROR\n ].includes(getPasscodeErrorType(resp))\n ) {\n // [#86ervq65t] passcode flow UX 改動\n // 如果無法辨識登入者(user 沒登入或沒有cookie)使用過這個 pcode,才顯示說明訊息。\n // User B 嘗試使用 User A 的 pcode 參加活動,會顯示說明訊息。\n dispatch(\n showCustomErrDialog({\n title: i18n.t('label.system.unavailable'),\n desc: getErrorTypeDialogDesc(getPasscodeErrorType(resp)),\n handler: handlers.PASSCODE_DENIED\n })\n );\n return {\n hasUsablePasscode: false,\n passcode: '',\n error: getPasscodeErrorType(resp)\n };\n } else {\n throw generateApiErrObj(resp, clientErrTypes.SUBMIT_PASSCODE);\n }\n } catch (error) {\n errHandler({ err: error });\n }\n }\n return { hasUsablePasscode: false, passcode: '' };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [promoUUID, currentEntryUUID, isNeedEnterPasscode, passcode]);\n\n return func;\n}\n","import { useEffect, useState, useCallback } from 'react';\nimport { useSelector } from 'react-redux';\nimport _merge from 'lodash/merge';\nimport Cookies from 'js-cookie';\nimport querystring from 'query-string';\n\nimport { submitTrackingData } from 'api/client';\nimport { qsParseJoinArray } from 'client/utils/queryString';\nimport { generateFbcByFbclid } from 'client/utils/tracking';\nimport { filterUndefinedOrNull } from 'utils/filter';\nimport useClientErrorHandler, { generateApiErrObj } from 'client/hooks/useClientErrorHandler.js';\nimport * as clientErrTypes from 'config/clientErrorTypes';\n\nexport default function useSubmitTrackingApi() {\n const trackingData = useTrackingData();\n const errHandler = useClientErrorHandler();\n return useCallback(\n async ({ promoUUID, entriesUUID, body = {} }) => {\n try {\n return await submitTrackingData({\n promoUUID,\n entriesUUID,\n body: _merge({}, trackingData, body)\n });\n } catch (error) {\n console.log('Failed to submit tracking data.', error);\n errHandler({\n err: generateApiErrObj(error, clientErrTypes.SUBMIT_TRACKING_FAILED)\n });\n }\n },\n [trackingData, errHandler]\n );\n}\n\nfunction useTrackingData() {\n const { businessTrackingId } = useSelector(s => s.sponsor);\n const { utmFromParent } = useSelector(s => s.promoState);\n const [trackingData, setTrackingData] = useState(() => ({\n system: getTrackDataSystem(utmFromParent),\n biz_tracking: getTrackDataBusiness(businessTrackingId)\n }));\n\n useEffect(() => {\n function setGaClientId() {\n try {\n // remove ga prefix to get client id\n // GA1.1.1626056991.1692173999 -> 1626056991.1692173999\n // Ref: https://app.clickup.com/36226806/docs/12hhqp-8660/12hhqp-20080\n const gaClientId = Cookies.get('_ga').substring(6);\n if (gaClientId) setTrackingData(c => _merge({}, c, { system: { gaClientId } }));\n } catch (error) {\n console.log('Failed to get GA4 client id (_ga) from cookie:', error);\n }\n }\n function initFbCAPITracking() {\n const fbp = Cookies.get('_fbp');\n const fbc = Cookies.get('_fbc');\n const { fbclid } = querystring.parse(window.location.search);\n let trackingData = {\n clientUserAgent: navigator.userAgent\n };\n if (fbp) {\n trackingData = {\n ...trackingData,\n fbp\n };\n }\n if (fbclid || fbc) {\n const value = fbclid ? generateFbcByFbclid(fbclid) ?? fbc : fbc;\n if (fbclid) {\n Cookies.set('_fbc', value);\n }\n trackingData = {\n ...trackingData,\n fbc: value\n };\n }\n setTrackingData(prev => {\n return {\n ...prev,\n biz_tracking: filterUndefinedOrNull({\n ...prev.biz_tracking,\n ...trackingData\n })\n };\n });\n }\n if (isGAExist()) {\n setGaClientId();\n } else {\n setTimeout(() => setGaClientId(), 1000);\n }\n initFbCAPITracking();\n }, [utmFromParent]);\n\n return trackingData;\n}\n\nfunction isGAExist() {\n // GA 追蹤 user 的 cookie 儲存在 _ga, 一般稱為 client_id\n const gaCookie = Cookies.get('_ga');\n return gaCookie !== undefined;\n}\nfunction getTrackDataBusiness(businessTrackingId) {\n const qsObj = qsParseJoinArray(window.location.search);\n const businessTrackingIds = String(businessTrackingId)\n .split(',')\n .reduce((obj, key) => {\n key = key.trim();\n const val = qsObj[key];\n if (val) {\n obj[key] = val;\n }\n return obj;\n }, {});\n return businessTrackingIds;\n}\nfunction getTrackDataSystem(utmMergeIn = {}) {\n const qsObj = qsParseJoinArray(window.location.search);\n const {\n utm_source = '',\n utm_medium = '',\n utm_campaign = '',\n utm_term = '',\n utm_content = ''\n } = _merge({}, utmMergeIn, qsObj);\n return {\n gaClientId: '',\n utmSource: utm_source,\n utmCampaign: utm_campaign,\n utmMedium: utm_medium,\n utmTerm: utm_term,\n utmContent: utm_content,\n referralUrl: window.document.referrer\n };\n}\n","import { getPasscodeErrorType, errorTypes } from 'config/passcode';\nimport * as clientErrTypes from 'config/clientErrorTypes';\nimport { generateApiErrObj } from 'client/hooks/useClientErrorHandler';\nimport { getPasscodeVerify } from 'api/client';\nimport Cookies from 'js-cookie';\n\n/**\n * 驗證通行碼的功能\n * @param {Object} state - Redux store 狀態\n * @param {Object} state.promo - 活動相關資訊\n * @param {string} state.promo.uuid - 活動 UUID\n * @param {Object} state.promoState - 活動狀態\n * @param {boolean} state.promoState.enablePasscodeVerify - 是否啟用通行碼驗證\n * @param {string} state.promoState.passcode - 通行碼\n * @param {Function} mergeAndDispatchState - 更新 Redux store 狀態的函數\n * @param {string} recaptchaToken - reCAPTCHA token\n * @returns {Promise}\n * - 如果未啟用通行碼驗證,返回 false\n * - 如果驗證成功,返回 false\n * - 如果驗證失敗,返回錯誤類型\n * - 如果發生其他錯誤,拋出 API 錯誤物件\n */\nasync function checkPasscodeVerify(state, mergeAndDispatchState, recaptchaToken) {\n const {\n promo: { uuid: promoUUID },\n promoState: { enablePasscodeVerify, passcode }\n } = state;\n if (!enablePasscodeVerify) {\n return false;\n }\n\n if (passcode) {\n const recaptchaTokenByCookie = Cookies.get('reTkn');\n const resp = await getPasscodeVerify({\n promoUUID,\n passcode,\n recaptchaToken: recaptchaToken || recaptchaTokenByCookie\n });\n const {\n httpStatus,\n payload: { data }\n } = resp;\n if (httpStatus === 200) {\n mergeAndDispatchState({\n hasUsablePasscode: Boolean(data?.remainingCounts),\n passcode: data?.remainingCounts ? passcode : '',\n passcodeRemainingCount: data?.remainingCounts\n });\n return false;\n } else if (\n [\n errorTypes.DUPLICATE,\n errorTypes.USAGE_LIMIT_EXCEEDED,\n errorTypes.RECAPTCHA_TOK_AUTH_FAILED,\n errorTypes.ERROR\n ].includes(getPasscodeErrorType(resp))\n ) {\n return getPasscodeErrorType(resp);\n } else {\n throw generateApiErrObj(resp, clientErrTypes.VERIFY_PASSCODE);\n }\n } else {\n return false;\n }\n}\n\nexport default checkPasscodeVerify;\n","import { useState, useEffect, useCallback } from 'react';\nimport { useSelector, useDispatch } from 'react-redux';\nimport i18n from 'i18next';\nimport Cookies from 'js-cookie';\nimport useSearchParams from 'hooks/useSearchParams';\nimport { updateShowPasswordQualifyStatus } from 'client/redux/modules/promoState';\nimport { showCustomErrDialog, handlers } from 'client/redux/modules/systemErrorDialog';\nimport { getLogInInfoAPI } from 'client/utils/tokenManager';\nimport checkPasscodeVerify from 'client/utils/passcode/checkPasscodeVerify';\nimport { loginTypesForApi, loginMethodMappingLoginTypeForApi } from 'config/loginTypes';\nimport { errorTypes, getErrorTypeDialogDesc } from 'config/passcode';\n\n// hasVerifiedPasscodeFirstTime 用來控制此 hook 的 useEffect 會不會每次都自動打 verify passcode api\n// 因為很多地方都會用到此,但 useEffect 只會在頁面剛載入呼叫,所以其他時間呼叫此 hook 不需要執行 useEffect 的 verify passcode api\nconst usePasscodeManager = ({ hasVerifiedPasscodeFirstTime = false } = {}) => {\n const {\n settingPromo: { loginMethod: loginType },\n promoState: { enablePasscodeVerify, passcode: passcodeFromRedux, hasUsablePasscode },\n promo: { uuid: promoUUID },\n userLoginState: { isLogin }\n } = useSelector(s => s);\n const dispatch = useDispatch();\n const [cookieKey, setCookieKey] = useState('{}');\n const [isShowReCaptcha, setShowReCaptcha] = useState(false);\n const [memberLoaded, setMemberLoaded] = useState(false);\n const searchParams = useSearchParams();\n const passcodeFromUrl = searchParams.get('pcode') || '';\n const hasPcodeInUrl = searchParams.has('pcode');\n\n const getPasscode = useCallback(() => {\n return Cookies.get(cookieKey);\n }, [cookieKey]);\n\n const setPasscode = useCallback(\n passcode => {\n Cookies.set(cookieKey, passcode);\n },\n [cookieKey]\n );\n\n const clearPasscode = useCallback(() => {\n Cookies.remove(cookieKey);\n }, [cookieKey]);\n\n const getPasscodeList = useCallback(() => {\n try {\n const cookieValue = Cookies.get(cookieKey);\n return cookieValue ? JSON.parse(cookieValue) : [];\n } catch (error) {\n console.error('Error parsing passcodeList cookie:', error);\n return [];\n }\n }, [cookieKey]);\n\n const updatePasscodeList = useCallback(\n passcode => {\n if (!passcode) return;\n\n try {\n const originalPasscodeList = getPasscodeList();\n if (!originalPasscodeList.includes(passcode)) {\n Cookies.set(cookieKey, JSON.stringify([...originalPasscodeList, passcode]));\n }\n } catch (error) {\n console.error('Error updating passcodeList cookie:', error);\n }\n },\n [cookieKey, getPasscodeList]\n );\n\n const removePasscode = useCallback(\n passcode => {\n if (!passcode) return;\n\n try {\n const originalPasscodeList = getPasscodeList();\n if (originalPasscodeList.length === 0) {\n clearPasscode();\n } else {\n Cookies.set(\n cookieKey,\n JSON.stringify(originalPasscodeList.filter(p => p !== passcode))\n );\n }\n } catch (error) {\n console.error('Error removing passcode from cookie:', error);\n }\n },\n [clearPasscode, cookieKey, getPasscodeList]\n );\n\n const verifyPasscode = useCallback(\n async (passcode, recaptchaToken) => {\n if (!passcode) return false;\n\n // 確保 member 數據已載入\n if (!memberLoaded) {\n console.log('Member data not loaded yet, cannot verify passcode');\n return false;\n }\n\n const passcodeUnverifiedCode = await checkPasscodeVerify(\n {\n promo: { uuid: promoUUID },\n promoState: { enablePasscodeVerify, passcode }\n },\n promoState => dispatch(updateShowPasswordQualifyStatus(promoState)),\n recaptchaToken\n );\n if (passcodeUnverifiedCode) {\n if (passcodeUnverifiedCode === errorTypes.RECAPTCHA_TOK_AUTH_FAILED)\n setShowReCaptcha(true);\n else {\n removePasscode(passcode);\n\n if (hasPcodeInUrl) {\n dispatch(\n showCustomErrDialog({\n title: i18n.t('label.passcode.inuse'),\n desc: getErrorTypeDialogDesc(passcodeUnverifiedCode),\n handler: handlers.PASSCODE_UNVERIFIED\n })\n );\n }\n return false;\n }\n return false;\n }\n return true;\n },\n\n [dispatch, enablePasscodeVerify, memberLoaded, promoUUID, removePasscode, hasPcodeInUrl]\n );\n\n const latestPasscodeFromCookie = getPasscodeList().pop();\n const passcode = passcodeFromUrl || passcodeFromRedux || latestPasscodeFromCookie;\n\n useEffect(() => {\n async function getMemberInfo() {\n try {\n const resp = await getLogInInfoAPI({ loginType });\n const getMember = loginType => {\n if (loginType === loginTypesForApi.ANONYMOUS) {\n return resp[loginType];\n }\n const loginTypeData = resp[loginType];\n if (!loginTypeData) {\n console.error('Login type data not found:', loginType);\n return null;\n }\n const firstProvider = Object.values(loginTypeData)[0];\n if (!firstProvider?.user) {\n console.error('User data not found in provider:', firstProvider);\n return null;\n }\n return firstProvider.user;\n };\n\n const member = getMember(loginMethodMappingLoginTypeForApi[loginType]);\n\n if (!member) {\n console.error('Failed to get member info');\n return;\n }\n\n setCookieKey(`pcode-${member.member_uuid}-${promoUUID}`);\n setMemberLoaded(true);\n } catch (error) {\n console.error('Error getting member info:', error);\n }\n }\n if (enablePasscodeVerify && isLogin) {\n getMemberInfo();\n }\n }, [enablePasscodeVerify, isLogin, loginType, promoUUID]);\n\n // 每次玩遊戲前,都需要 verify 這次要用到的 passcode 加上取得 passcode 可用的剩餘次數\n // passcode 優先權: qs > redux > cookie\n useEffect(() => {\n if (\n enablePasscodeVerify &&\n passcode &&\n !hasVerifiedPasscodeFirstTime &&\n !hasUsablePasscode &&\n memberLoaded\n ) {\n verifyPasscode(passcode);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [enablePasscodeVerify, passcode, hasVerifiedPasscodeFirstTime, memberLoaded]);\n\n return {\n isShowReCaptcha,\n setShowReCaptcha,\n enablePasscodeVerify,\n currentInUsePasscode: passcode,\n cookieKey,\n memberLoaded,\n passcode,\n getPasscode,\n setPasscode,\n clearPasscode,\n getPasscodeList,\n updatePasscodeList,\n removePasscode,\n verifyPasscode,\n continueVerifyPasscode: token => {\n verifyPasscode(passcode, token);\n }\n };\n};\n\nexport default usePasscodeManager;\n","import React, { useState } from 'react';\nimport { css } from '@emotion/core';\nimport Zoom from '@material-ui/core/Zoom';\n\nexport default function WrapperZoomInWithBlurBg({\n open,\n children = () => {},\n onZoomedIn = () => {},\n onZoomedOut = () => {}\n}) {\n const [zoomed, setZoomed] = useState(false);\n\n function handleZoomEntered() {\n setZoomed(true);\n onZoomedIn();\n }\n\n return (\n <>\n
\n \n {children({ zoomed })}\n \n \n );\n}\n\nconst timeConfig = {\n appear: 500,\n enter: 1000,\n exit: 500\n};\nconst backgroundWrap = css`\n right: 0;\n width: 100%;\n height: 100%;\n position: fixed;\n left: 0;\n top: 0;\n margin: auto;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(255, 255, 255, 0.56);\n backdrop-filter: blur(10.8731px);\n z-index: 3;\n`;\n","import { getColorRGBA } from 'utils/colorConvert';\nimport { useSelector } from 'react-redux';\nimport { gameTypes } from 'config/promoGameTypes';\n\nimport useGameFormReduxData from 'client/hooks/useGameFormReduxData';\n\nexport default function useGetContentBgColorRgba() {\n const { type: gameType } = useSelector(s => s.promo);\n const promoContentBgColor = useSelector(s => s.settingStyle.contentBgColor);\n const { settings: formSettings } = useGameFormReduxData();\n return getColorRGBA(\n gameType === gameTypes.SURVEY ? formSettings?.form?.formContentBg?.color : promoContentBgColor\n );\n}\n","import { useMemo } from 'react';\nimport { useSelector } from 'react-redux';\n\nimport { convertSettingStyle2ComponentStyle } from 'client/styles/common';\n\nexport default function usePromoSettingComponentStyle() {\n const settingStyle = useSelector(s => s.settingStyle);\n return useMemo(() => convertSettingStyle2ComponentStyle(settingStyle), [settingStyle]);\n}\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { Transition } from 'react-transition-group';\nimport { duration } from '../styles/transitions';\nimport useTheme from '../styles/useTheme';\nimport { reflow, getTransitionProps } from '../transitions/utils';\nimport useForkRef from '../utils/useForkRef';\nvar styles = {\n entering: {\n transform: 'none'\n },\n entered: {\n transform: 'none'\n }\n};\nvar defaultTimeout = {\n enter: duration.enteringScreen,\n exit: duration.leavingScreen\n};\n/**\r\n * The Zoom transition can be used for the floating variant of the\r\n * [Button](/components/buttons/#floating-action-buttons) component.\r\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\r\n */\n\nvar Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {\n var children = props.children,\n _props$disableStrictM = props.disableStrictModeCompat,\n disableStrictModeCompat = _props$disableStrictM === void 0 ? false : _props$disableStrictM,\n inProp = props.in,\n onEnter = props.onEnter,\n onEntered = props.onEntered,\n onEntering = props.onEntering,\n onExit = props.onExit,\n onExited = props.onExited,\n onExiting = props.onExiting,\n style = props.style,\n _props$timeout = props.timeout,\n timeout = _props$timeout === void 0 ? defaultTimeout : _props$timeout,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Transition : _props$TransitionComp,\n other = _objectWithoutProperties(props, [\"children\", \"disableStrictModeCompat\", \"in\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"style\", \"timeout\", \"TransitionComponent\"]);\n\n var theme = useTheme();\n var enableStrictModeCompat = theme.unstable_strictMode && !disableStrictModeCompat;\n var nodeRef = React.useRef(null);\n var foreignRef = useForkRef(children.ref, ref);\n var handleRef = useForkRef(enableStrictModeCompat ? nodeRef : undefined, foreignRef);\n\n var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {\n return function (nodeOrAppearing, maybeAppearing) {\n if (callback) {\n var _ref = enableStrictModeCompat ? [nodeRef.current, nodeOrAppearing] : [nodeOrAppearing, maybeAppearing],\n _ref2 = _slicedToArray(_ref, 2),\n node = _ref2[0],\n isAppearing = _ref2[1]; // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n\n\n if (isAppearing === undefined) {\n callback(node);\n } else {\n callback(node, isAppearing);\n }\n }\n };\n };\n\n var handleEntering = normalizedTransitionCallback(onEntering);\n var handleEnter = normalizedTransitionCallback(function (node, isAppearing) {\n reflow(node); // So the animation always start from the start.\n\n var transitionProps = getTransitionProps({\n style: style,\n timeout: timeout\n }, {\n mode: 'enter'\n });\n node.style.webkitTransition = theme.transitions.create('transform', transitionProps);\n node.style.transition = theme.transitions.create('transform', transitionProps);\n\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n var handleEntered = normalizedTransitionCallback(onEntered);\n var handleExiting = normalizedTransitionCallback(onExiting);\n var handleExit = normalizedTransitionCallback(function (node) {\n var transitionProps = getTransitionProps({\n style: style,\n timeout: timeout\n }, {\n mode: 'exit'\n });\n node.style.webkitTransition = theme.transitions.create('transform', transitionProps);\n node.style.transition = theme.transitions.create('transform', transitionProps);\n\n if (onExit) {\n onExit(node);\n }\n });\n var handleExited = normalizedTransitionCallback(onExited);\n return /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n appear: true,\n in: inProp,\n nodeRef: enableStrictModeCompat ? nodeRef : undefined,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n timeout: timeout\n }, other), function (state, childProps) {\n return /*#__PURE__*/React.cloneElement(children, _extends({\n style: _extends({\n transform: 'scale(0)',\n visibility: state === 'exited' && !inProp ? 'hidden' : undefined\n }, styles[state], style, children.props.style),\n ref: handleRef\n }, childProps));\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Zoom.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\r\n * A single child content element.\r\n */\n children: PropTypes.element,\n\n /**\r\n * Enable this prop if you encounter 'Function components cannot be given refs',\r\n * use `unstable_createStrictModeTheme`,\r\n * and can't forward the ref in the child component.\r\n */\n disableStrictModeCompat: PropTypes.bool,\n\n /**\r\n * If `true`, the component will transition in.\r\n */\n in: PropTypes.bool,\n\n /**\r\n * @ignore\r\n */\n onEnter: PropTypes.func,\n\n /**\r\n * @ignore\r\n */\n onEntered: PropTypes.func,\n\n /**\r\n * @ignore\r\n */\n onEntering: PropTypes.func,\n\n /**\r\n * @ignore\r\n */\n onExit: PropTypes.func,\n\n /**\r\n * @ignore\r\n */\n onExited: PropTypes.func,\n\n /**\r\n * @ignore\r\n */\n onExiting: PropTypes.func,\n\n /**\r\n * @ignore\r\n */\n style: PropTypes.object,\n\n /**\r\n * The duration for the transition, in milliseconds.\r\n * You may specify a single timeout for all transitions, or individually with an object.\r\n */\n timeout: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nexport default Zoom;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M14 7l-5 5 5 5V7z\"\n}), 'ArrowLeft');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z\"\n}), 'ArrowUpward');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z\"\n}), 'History');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/_react.default.createElement(\"path\", {\n transform: \"scale(0.5, 0.5)\",\n d: \"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm-4 29V15l12 9-12 9z\"\n}), 'PlayCircleFilledWhite');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M20 6h-2.18c.11-.31.18-.65.18-1 0-1.66-1.34-3-3-3-1.05 0-1.96.54-2.5 1.35l-.5.67-.5-.68C10.96 2.54 10.05 2 9 2 7.34 2 6 3.34 6 5c0 .35.07.69.18 1H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-5-2c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM9 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm11 15H4v-2h16v2zm0-5H4V8h5.08L7 10.83 8.62 12 11 8.76l1-1.36 1 1.36L15.38 12 17 10.83 14.92 8H20v6z\"\n}), 'Redeem');\n\nexports.default = _default;","// Cache implementation based on Erik Rasmussen's `lru-memoize`:\n// https://github.com/erikras/lru-memoize\nvar NOT_FOUND = 'NOT_FOUND';\n\nfunction createSingletonCache(equals) {\n var entry;\n return {\n get: function get(key) {\n if (entry && equals(entry.key, key)) {\n return entry.value;\n }\n\n return NOT_FOUND;\n },\n put: function put(key, value) {\n entry = {\n key: key,\n value: value\n };\n },\n getEntries: function getEntries() {\n return entry ? [entry] : [];\n },\n clear: function clear() {\n entry = undefined;\n }\n };\n}\n\nfunction createLruCache(maxSize, equals) {\n var entries = [];\n\n function get(key) {\n var cacheIndex = entries.findIndex(function (entry) {\n return equals(key, entry.key);\n }); // We found a cached entry\n\n if (cacheIndex > -1) {\n var entry = entries[cacheIndex]; // Cached entry not at top of cache, move it to the top\n\n if (cacheIndex > 0) {\n entries.splice(cacheIndex, 1);\n entries.unshift(entry);\n }\n\n return entry.value;\n } // No entry found in cache, return sentinel\n\n\n return NOT_FOUND;\n }\n\n function put(key, value) {\n if (get(key) === NOT_FOUND) {\n // TODO Is unshift slow?\n entries.unshift({\n key: key,\n value: value\n });\n\n if (entries.length > maxSize) {\n entries.pop();\n }\n }\n }\n\n function getEntries() {\n return entries;\n }\n\n function clear() {\n entries = [];\n }\n\n return {\n get: get,\n put: put,\n getEntries: getEntries,\n clear: clear\n };\n}\n\nexport var defaultEqualityCheck = function defaultEqualityCheck(a, b) {\n return a === b;\n};\nexport function createCacheKeyComparator(equalityCheck) {\n return function areArgumentsShallowlyEqual(prev, next) {\n if (prev === null || next === null || prev.length !== next.length) {\n return false;\n } // Do this in a for loop (and not a `forEach` or an `every`) so we can determine equality as fast as possible.\n\n\n var length = prev.length;\n\n for (var i = 0; i < length; i++) {\n if (!equalityCheck(prev[i], next[i])) {\n return false;\n }\n }\n\n return true;\n };\n}\n// defaultMemoize now supports a configurable cache size with LRU behavior,\n// and optional comparison of the result value with existing values\nexport function defaultMemoize(func, equalityCheckOrOptions) {\n var providedOptions = typeof equalityCheckOrOptions === 'object' ? equalityCheckOrOptions : {\n equalityCheck: equalityCheckOrOptions\n };\n var _providedOptions$equa = providedOptions.equalityCheck,\n equalityCheck = _providedOptions$equa === void 0 ? defaultEqualityCheck : _providedOptions$equa,\n _providedOptions$maxS = providedOptions.maxSize,\n maxSize = _providedOptions$maxS === void 0 ? 1 : _providedOptions$maxS,\n resultEqualityCheck = providedOptions.resultEqualityCheck;\n var comparator = createCacheKeyComparator(equalityCheck);\n var cache = maxSize === 1 ? createSingletonCache(comparator) : createLruCache(maxSize, comparator); // we reference arguments instead of spreading them for performance reasons\n\n function memoized() {\n var value = cache.get(arguments);\n\n if (value === NOT_FOUND) {\n // @ts-ignore\n value = func.apply(null, arguments);\n\n if (resultEqualityCheck) {\n var entries = cache.getEntries();\n var matchingEntry = entries.find(function (entry) {\n return resultEqualityCheck(entry.value, value);\n });\n\n if (matchingEntry) {\n value = matchingEntry.value;\n }\n }\n\n cache.put(arguments, value);\n }\n\n return value;\n }\n\n memoized.clearCache = function () {\n return cache.clear();\n };\n\n return memoized;\n}","import { defaultMemoize, defaultEqualityCheck } from './defaultMemoize';\nexport { defaultMemoize, defaultEqualityCheck };\n\nfunction getDependencies(funcs) {\n var dependencies = Array.isArray(funcs[0]) ? funcs[0] : funcs;\n\n if (!dependencies.every(function (dep) {\n return typeof dep === 'function';\n })) {\n var dependencyTypes = dependencies.map(function (dep) {\n return typeof dep === 'function' ? \"function \" + (dep.name || 'unnamed') + \"()\" : typeof dep;\n }).join(', ');\n throw new Error(\"createSelector expects all input-selectors to be functions, but received the following types: [\" + dependencyTypes + \"]\");\n }\n\n return dependencies;\n}\n\nexport function createSelectorCreator(memoize) {\n for (var _len = arguments.length, memoizeOptionsFromArgs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n memoizeOptionsFromArgs[_key - 1] = arguments[_key];\n }\n\n var createSelector = function createSelector() {\n for (var _len2 = arguments.length, funcs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n funcs[_key2] = arguments[_key2];\n }\n\n var _recomputations = 0;\n\n var _lastResult; // Due to the intricacies of rest params, we can't do an optional arg after `...funcs`.\n // So, start by declaring the default value here.\n // (And yes, the words 'memoize' and 'options' appear too many times in this next sequence.)\n\n\n var directlyPassedOptions = {\n memoizeOptions: undefined\n }; // Normally, the result func or \"output selector\" is the last arg\n\n var resultFunc = funcs.pop(); // If the result func is actually an _object_, assume it's our options object\n\n if (typeof resultFunc === 'object') {\n directlyPassedOptions = resultFunc; // and pop the real result func off\n\n resultFunc = funcs.pop();\n }\n\n if (typeof resultFunc !== 'function') {\n throw new Error(\"createSelector expects an output function after the inputs, but received: [\" + typeof resultFunc + \"]\");\n } // Determine which set of options we're using. Prefer options passed directly,\n // but fall back to options given to createSelectorCreator.\n\n\n var _directlyPassedOption = directlyPassedOptions,\n _directlyPassedOption2 = _directlyPassedOption.memoizeOptions,\n memoizeOptions = _directlyPassedOption2 === void 0 ? memoizeOptionsFromArgs : _directlyPassedOption2; // Simplifying assumption: it's unlikely that the first options arg of the provided memoizer\n // is an array. In most libs I've looked at, it's an equality function or options object.\n // Based on that, if `memoizeOptions` _is_ an array, we assume it's a full\n // user-provided array of options. Otherwise, it must be just the _first_ arg, and so\n // we wrap it in an array so we can apply it.\n\n var finalMemoizeOptions = Array.isArray(memoizeOptions) ? memoizeOptions : [memoizeOptions];\n var dependencies = getDependencies(funcs);\n var memoizedResultFunc = memoize.apply(void 0, [function recomputationWrapper() {\n _recomputations++; // apply arguments instead of spreading for performance.\n\n return resultFunc.apply(null, arguments);\n }].concat(finalMemoizeOptions)); // If a selector is called with the exact same arguments we don't need to traverse our dependencies again.\n\n var selector = memoize(function dependenciesChecker() {\n var params = [];\n var length = dependencies.length;\n\n for (var i = 0; i < length; i++) {\n // apply arguments instead of spreading and mutate a local list of params for performance.\n // @ts-ignore\n params.push(dependencies[i].apply(null, arguments));\n } // apply arguments instead of spreading for performance.\n\n\n _lastResult = memoizedResultFunc.apply(null, params);\n return _lastResult;\n });\n Object.assign(selector, {\n resultFunc: resultFunc,\n memoizedResultFunc: memoizedResultFunc,\n dependencies: dependencies,\n lastResult: function lastResult() {\n return _lastResult;\n },\n recomputations: function recomputations() {\n return _recomputations;\n },\n resetRecomputations: function resetRecomputations() {\n return _recomputations = 0;\n }\n });\n return selector;\n }; // @ts-ignore\n\n\n return createSelector;\n}\nexport var createSelector = /* #__PURE__ */createSelectorCreator(defaultMemoize);\n// Manual definition of state and output arguments\nexport var createStructuredSelector = function createStructuredSelector(selectors, selectorCreator) {\n if (selectorCreator === void 0) {\n selectorCreator = createSelector;\n }\n\n if (typeof selectors !== 'object') {\n throw new Error('createStructuredSelector expects first argument to be an object ' + (\"where each property is a selector, instead received a \" + typeof selectors));\n }\n\n var objectKeys = Object.keys(selectors);\n var resultSelector = selectorCreator( // @ts-ignore\n objectKeys.map(function (key) {\n return selectors[key];\n }), function () {\n for (var _len3 = arguments.length, values = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n values[_key3] = arguments[_key3];\n }\n\n return values.reduce(function (composition, value, index) {\n composition[objectKeys[index]] = value;\n return composition;\n }, {});\n });\n return resultSelector;\n};"],"names":["history","useClientHistory","successInited","useIsInitSuccessInfo","dispatch","useDispatch","shouldAutoRedirectGameStage","useGameActionEnableInfo","isPurePrizeGame","useSelector","s","promoState","type","gameType","uuid","promoUuid","promo","isLogin","userLoginState","hasGameResult","hasFilledSignupForm","hasParticipantPrize","hasInstantPrize","userEntryState","unOpenWinnerPrize","userWinnerPrize","hasUnOpenWinnerPrize","length","errHandler","useClientErrorHandler","useEffect","async","isAutoTriggerAnimationGames","Promise","all","map","_ref","entryUuid","prize","prizeUuid","updateWinnerAnimationFlag","setShouldUpdateUserWinnerList","error","err","replace","RESULT","JOIN","init","Background","bgType","bgColor","bgImgUrl","bgMobileImgUrl","settingStyle","___EmotionJSX","css","_css","bgStyle","generateBgStyleByType","isFixedMode","imageUrl","mobileImgUrl","color","memo","name","styles","PowerBy","id","promoId","sponsor","sponsorName","settingPlan","enablePoweredBy","scenes","appState","isZinesEmbedded","IS_IFRAME_MODE","href","concat","window","location","hostname","target","rel","powerByStyle","_window$location","taskUuid","userGameResultRecords","themeStyle","usePromoSettingThemeStyle","shouldBackToMultiChallengeTaskPromoBtn","createQueryString","_ref2","test_code","test_expired","querystring","stringify","createTaskReferrerUrl","queryString","host","redirectToUrl","url","top","shouldShowRecordBtn","Boolean","pathname","match","joinRegex","isDoNotShowCheckRecordsBtnGames","taskRecordHeaderContainerStyle","FeverIconButton","variant","text","i18n","t","textColor","btnColor","icon","ArrowLeftIcon","iconVariant","iconPosition","iconSize","buttonStyle","customButtonStyle","onClick","handleRedirectToParentUrl","queryParams","parse","search","qs","taskReferrerUrl","disableTouchRipple","Button","size","push","disableRipple","disableFocusRipple","setTextVariantStyle","children","usePushLoginEvent","clientBodyRef","useHeightResizePostMessage","hasInited","hasUserStateInited","hasErrorOnInit","flags","shouldGetNextEntry","shouldHideUserStateLoading","isWidgetEmbedded","useLocation","isBigWidthPage","page","pathName","split","getFinalPath","isIniting","isInitingUserState","canRenderContent","params","URLSearchParams","shouldDisplayBackToMultiChallengeTaskPromo","has","isPromoEmbeddedWidgetWithoutZines","React","LoadingPromoInit","Loading","style","width","height","position","zIndex","backgroundImage","backgroundRepeat","backgroundPosition","clientBodyStyle","centralPromoStyle","ref","appContainerStyle","isSmallPromoWidth","clientBigWrapperStyle","clientSmallWrapperStyle","fullScreenPromoStyle","clientWrapperIncludeAdditionalHeaderStyle","TaskRecordHeader","fromEntries","Logout","Survey","lazy","Quiz","PsychoQuiz","Vote","MemoryMatch","SignUp","Results","gameTypes","PSYCHO_QUIZ","QUIZ","SURVEY","VOTE","MEMORY_MATCH","SIGN_UP","CustomResult","result","gameResult","latestRecord","loginMethod","settingPromo","Result","onReplay","replayGame","scrollPromoBodyIntoView","GameCustomResult","gameResultPayload","pageInfo","data","isObject","JSON","useStyle","makeStyles","endButton","props","addHoverStyle","backgroundColor","getForegroundColor","popup","contentBgColor","margin","PopupWinnerGet","isOpen","title","onConfirm","btnText","imgSrc","label","Popup","className","endButtonStyle","backdropStyle","convertRGBtoRGBA","modalContentStyle","prizeImageStyle","src","alt","Typography","prizeTextStyle","PopupParticipantJoinAndGetPrize","promoUUID","participantPrizePopup","prizeUUID","entryUUID","prizeInfo","setPrizeInfo","useState","hasWinner","setHasWinner","isThanksPrize","prizeTypes","THANKYOU","payload","prizeData","getPrizeInfoAPI","prizeSetting","console","log","clearParticipantWinnerPopup","PRIZE","entriesUUID","referralCount","taskCarouselRef","useRef","componentStyle","usePromoSettingComponentStyle","containerStyle","LotteryTaskCarouselContainer","inviteCount","isNeedLotteryTaskProcessHint","metaTitle","isMgmSelf","mgmUserGameResultRecords","mgmReferral","primaryType","relatedTwinsPromo","customResult","routeContainerStyle","wrapperStyle","containerShadow","maxWidth","ResultHeader","isShowEntryResultEntryLists","EntriesListContainer","entriesList","hasCustomResult","showFullList","isMultiResultEntriesGames","ResultLotteryTask","isContestGamesWithSecondaryUgc","ResultFooter","propsReferralCount","animatingLotteryAndPrizeSelector","createSelector","lotteryPrizes","_s$mgmReferral$lotter","_s$mgmReferral","arguments","undefined","mgmLotteryPrizes","animatingLotteries","prizes","lotteryUUID","useGetLotteryAndPrizeAndPromoData","isMgmShare","isHasReferral","lotteryParticipant","lotteryParticipantUuid","lotteryParticipantPrize","mgmPromoUuid","mgmPromoId","mgmRelation","mgmLotteryParticipant","lotteryTasks","mgmLotteryTasks","mgmLotteryParticipantUuid","mgmLotteryParticipantPrize","mgmLotteryTaskUuids","Object","keys","mgmLotteryTaskPrizes","apply","isEnableSharePrize","some","mgmUuid","checkIsReferralPrize","find","checkIsNormalPromoEntryByGameResult","getPromoByPrizeAndEntry","PurePrizeGameContainer","onPurePrizeGameFinish","isWinnerModalOpen","setIsWinnerModalOpen","loginId","currentEntryUUID","currentPrizeUUID","isGameReadyToPlay","currentUnanimationEntriesUUID","purePrizeState","AnimationSettings","lotteryParticipantType","lotteryParticipantUUID","parsedAnimationSettings","useMemo","parseAnimationSettings","lotteryParticipantPrizeList","prizeList","_orderBy","usePurePrizeGamePrizeList","callbackAfterAnimationPlayed","useCallback","setGameNotReadyToPlay","executePurePrizeFlowHandler","gameProps","animationSettings","prizeProps","winnerInfo","settings","prizeText","prizeType","prizeImageUrl","updateWinnerFlag","gtmPushPrize","prizeName","getPrizeTypeLabel","callbackProps","setAnimatingLotteries","rootContainerStyle","clearCurrentPrizeUUID","clearCurrentUnanimationEntriesUUID","Invoice","Winwheel","PokeGame","ScratchCard","RedEnvelopeRain","PhotoUpload","CheckIn","PhotoFrameComposite","Slots","PickThePrize","Comment","PhotoFrameCompositeChallenge","VotingContest","VideoUpload","InstagramModule","PurchaseReward","PointsRedeem","MgmShare","MultiChallenge","OrderReward","CartReward","Games","SIGN_FORM","onGameFinish","isAfterReduceFeverPoint","isFirstPassLogin","isAfterVerifyPasscode","useGenerateState","coverPageContent","settingGame","updateFirstPassLoginSeverStatus","TextBoxClient","content","ignoreContentPadding","shouldUseCompressedImg","INVOICE","PHOTO_UPLOAD","CHECK_IN","PHOTO_FRAME_COMPOSITE","COMMENT","CHALLENGE_PHOTO_FRAME_COMPOSITE","CONTEST_ADMIN_UPLOAD","VIDEO_UPLOAD","INSTAGRAM","PURCHASE_REWARD","MGM_SHARE","MULTI_CHALLENGE","ORDER_REWARD","CART_REWARD","PurePrizeGames","WIN_WHEEL","POKE_GAME","SCRATCH_CARD","RED_ENVELOPE_RAIN","SLOTS","POINTS_REDEEM","GameClient","Game","PurePrizeGame","PICK_THE_PRIZE","currentLotteryParticipant","hasAnnounced","prizeAnnounce","annouce","Message","Trans","i18nKey","components","Emphasize","messageStyle","newReduxState","checkerApi","useCheckerContext","coverMask","setCoverMask","check","checkTypes","LOGIN_STATUS","PROMO_STATUS","QUALIFY_STATUS","maskStyle","coverMaskStyle","ContainerMaskFlowInfoAndAction","isNoResultPageGames","isPassMaskFlowGames","e","MaskFlowInfoAndAction","JoinWrapper","alpha","useGetContentBgColorRgba","showBgShadow","getContentWrapperStyle","preventMarginCollapse","borderStyle","Notification","showShadow","CoverPage","cursor","ResultSubmitingMask","show","JoinGame","_userGameResultRecord","store","useStore","submitTrackingData","useSubmitTrackingApi","actionEnableState","getParticipantWinner","useGetParticipantWinner","handleSubmitPasscode","useSubmitPasscode","enableCoverPage","formId","gameFormId","showAfterGame","toSignUpFormAfterGame","signUpForm","currentEntryId","enablePasscodeVerify","sponsorId","updatePasscodeList","removePasscode","continueVerifyPasscode","isShowReCaptcha","setShowReCaptcha","usePasscodeManager","hasVerifiedPasscodeFirstTime","flow","isCoverPagePhase","setIsCoverPagePhase","isSubmitting","setIsSubmitting","isLoading","showCoverPage","handleAfterSubmit","_latestState$userEntr3","latestState","getState","gameResultRecords","updateGameResultRecords","successPlayGame","gtmPushUserPromoEnter","handleSetGameResultDone","_gameResultRecords$fi","setNeedEnterPasscode","isPurePrizeGames","SIGNUP_FORM","submitTracking","_latestState$userEntr4","retry","status","checkTrackingStatus","_res$payload","res","DialogReCaptcha","onComplete","onOpen","_latestState$userEntr","gameValues","headers","additionalErrLog","gameErrHandlingCallback","gameActionAfterSubmit","resolve","current","isQualifiedToPlayGame","isUserInputReady","hasUsablePasscode","passcode","body","resp","submitForm","submitPromo","httpStatus","errorMsgs","success","errorTypes","ENTRY_NEED_PASSCODE","includes","getPasscodeErrorType","showCustomErrDialog","desc","getErrorTypeDialogDesc","handler","handlers","PASSCODE_DENIED","additionalInfo","errSerialNo","generateApiErrObj","clientErrTypes","setReJoin","_latestState$userEntr2","errType","SignupForm","RedeemForm","Form","Switch","Route","path","component","AnimationContainer","isModalOpen","setIsModalOpen","openWinnerPopupHandler","closeWinnerPopupHandler","setPrizeList","lazyGetMGMtLotteryPrizeList","lazyGetLotteryPrizeList","sortPrizes","useAnimationPathPrizeList","currentPromoUUID","updateAnimationFlag","update","General","Lottery","lotteryOpenPathParams","GENERAL","render","withAnimationProps","Comp","routeProps","Prize","AppPromoClient","matchedPath","useUserGamePhaseRedirectOnInit","useReCaptcha","initPromo","useInitPromo","useHistory","logout","useLogout","parsed","needLogout","rest","newSearch","ClientWrapper","Suspense","fallback","TransitionGroup","childFactory","child","_location$state$trans","_location$state","classNames","state","transition","CSSTransition","timeout","key","ResultPage","RoutePromoClient","GeneralClientFlowWrapper","redirectEnterpriseLogout","useLogoutRedirect","enableHideLogoutButton","promoType","hasGameResultRecords","shouldHideLogoutButton","loginTypes","ANONYMOUSLOGIN","logoutWrapperStyle","logoutStyle","themedButtonStyle","btnVariants","TEXT","below","DialogReferralNotifyCard","open","isShowImage","description","buttonText","buttonTextColor","buttonBgColor","themeBgColor","themeTextColor","onClose","disableConfirm","Dialog","dialogStyle","ReferralNotifyCard","config","showReferralNotify","setEnableFetchReferralInfo","isFetchingData","getShareInfoData","isFixedWindow","dialogTextColor","dialogBgColor","enableLineLiff","enableDisplayShareCardButton","enableDisplayShareCardImage","enableDisplayShareCardReferralCode","shareCardTitle","shareCardDesc","shareCardImageUrl","shareCardButtonText","shareCardButtonTextColor","shareCardButtonBgColor","isLoadingReferral","referralCode","shareLinkUrl","isOpenReferralNotifyCard","setOpenReferralNotifyCard","isOpenReferralShareCard","setOpenReferralShareCard","enableVerifyMechanism","referralNotify","settingMGMReferral","isDisableAutoShow","lotteryType","isLotteryHasAnimation","timeoutId","hasReferralNotifyEntry","Cookies","entryId","_ref3","setTimeout","isCanVerifyGame","isCanSetVerifyMechanismGames","isForceVerifyMechanismGames","_ref4","qualified","deletedAt","checkReferralNotify","clearTimeout","referralTitle","referralDescription","DialogReferralShareCard","referralShareCardConfig","button","enableDisplay","uri","isShowReferralCode","referralLink","referralShareCard","styleReferralShareCard","referralButton","mgmReferralShareCard","setShowReferralNotify","enableFetchReferralInfo","setIsFetchingData","latestEntry","referralUrl","useGetReferralData","latestEntryId","latestEntryUuid","dependency","showReferralCount","invitationTitle","invitationDesc","getShareInfoApi","shareMemberFullname","updateSettingStyle","replaceUsername","variable","fullname","defaultReferralShareCard","defaultReferralButton","resultFooterContainerStyle","isShowButton","Box","buttonsWrapperStyle","py","px","ReferralNotify","shareButtonLabelTextStyle","i18next","ShareButton","handleShareButtonClick","successReferralCountStyle","count","system900","promo500","btnStyle","isCreatingNewEntry","setCreatingNewEntry","enableReCaptcha","enableQualificationPasscode","passcodeRemainingCount","isPasscodeExistInUrl","useSearchParams","handleClick","recaptchaToken","setUserNewEntry","joinAgainBtnText","SecondaryButton","IconComponent","AddIcon","disabled","isPopupOpen","setIsPopupOpen","disabledPopup","showPrizeList","smallerHistoryButton","circleButtonStyle","HistoryIcon","fontSize","mediumHistoryButton","contentBorderRadius","addOutlineBtnHoverStyle","descColor","textStyle","btnContainerStyle","PopupWithFixHeader","mode","isMobile","modes","COMP","GLOBAL","isFetching","isFetchingWinner","useUpdateWinnerData","primaryBtnStyle","secondaryBtnStyle","secondaryOutlinedBtnStyle","viewPrizeListBtnStyle","useSystemBtnStyleByTheme","winnerRef","openWinnerButtonRef","actionHeader","setActionHeader","unOpenPrizeQuantity","setUnOpenPrizeQuantity","openWinnerChangedFlag","setOpenWinnerChangedFlag","record","_record$flow","handleToJoin","removeKeysFromQueryString","canCreateNewEntryAndJoinAgain","isDoNotShowPlayNewEntryBtnGames","canGetNewEntry","canJoinAgainWithoutCreateNewEntry","isDoNotShowBackToJoinPageBtnGames","canBackToJoinGamePage","canShowJoinGameRecord","isNoNeedJoinGameRecord","canShowOpenWinnerBtnGame","isCanShowOpenWinnerBtnGame","_openWinnerList$","_pickWinnerList$","getOpenWinnerButtonData","shouldShowButton","hasEnableLotteryParticipant","hasPendingVerifyEntry","openWinnerList","pickWinnerList","quantity","header","getWinnerLabelAndBtnTextGenerator","comp","ActionHeader","titleStyle","resultHeaderContainerStyle","isCanShowSignUpFormBtnGame","canFillSignupform","SignUpFormButton","flexCenterStyle","OpenWinnerButton","onOpenWinner","animatingLottery","LOTTERY","openWinnerListChangeCallback","isChanged","enableGetWinnerByApi","isQualifiedToGetWinner","PlayNewEntryButton","PlayAgainWithoutNewEntryButton","ViewRecordsBtn","EntriesList","items","ViewPrizeListButton","onToPrize","useSortedLotteriesTask","sorted","entries","sort","a","b","taskCondition","getLotteriesRemainder","lotteries","getPromoLotteries","reduce","obj","l","lottery","prizeRemainder","remainder","useLotteryPrizeDataManage","onError","currentLotteryPrizes","inited","setInited","fetchedRef","load","isMgm","c","getLotteryPrizesData","isLotteryHasLoadPrizeData","EmptyTaskPrizePopup","bindRef","useScrollElementOnMount","trigger","WrapperZoomInWithBlurBg","wrap","prizeCommonStyle","prizeFinishedStyle","buttonCommomStyle","forwardRef","deskTopSlidesToShow","value","setLocalStorage","useLocalStorage","handleAdminPrizeRef","Set","utilsState","useLotteriesTaskUtilsState","hasUserStateReady","hasUserWinnerPrizeListReady","useHasUserStateReady","lotteryPrizeDataManage","lotteriesTaskCardInfo","mgmPromoUUID","mgmLotteriesTaskCardInfo","hasLotteryTaskMappingEntryInited","lotteryTaskMappingEntry","gameState","hasEnableSignupForm","carouselRef","stateRef","hasCarouselInitSlide","canStartLazyLoadCard","setCanStartLazyLoadCard","taskPrizeEmptyUUID","setTaskPrizeEmptyUUID","sortedLotteriesTask","sortedLotteriesTaskForMgm","lotteriesRemainder","setLotteryRemainder","hasLotteriesRemainderInited","lotteriesTask","mgmLotteriesTask","setLotteriesRemainder","then","r","prevState","catch","useLotteriesTaskPrizeRemainder","currentLotteriesTaskCardInfo","currentSortedLotteriesTask","currentLotteryTasks","canInitLotteryCardSlide","cards","lotteryInfo","_lotteriesRemainder$u","_currentLotteryPrizes","isMgmLotteriesTask","item","lotteryRemainder","prizeLeftQuantity","prizeTotalQuantity","lotteryData","showRest","prizeLimited","quantityInfo","lotteryAdminTypes","ADMIN","lotteryRestShowTypes","SHOW_REMAIN_AMOUNT","SHOW_TOTAL_AMOUNT","total","p","isLimited","getLotteryCardRemainderInfo","_currentLotteriesTask","mainViewImg","_t","_mainViewImg","_prizes$0$settings","lotteryInstantTypes","JOIN_AND_GET","isAllGameResultRecordsBeDeleted","statuses","LOCKED","lotteryTaskWinnerInfo","lotteriesTaskWinnerInfo","_lotteryTaskWinnerInf","hasGetWinner","entryFlow","IS_UN_QUALIFY","IS_FULFILL","PRIZE_EMPTY","mappingEntry","entriesRecords","byUUIDs","UNLOCKED_ADMIN_PRIZE","UNLOCKED","isLazyLoading","getLotteryTaskMappingEntry","entriesRecordsByUUIDsForMgm","acc","entriesRecordsByUUIDs","entryRecord","allUUIDsForMgm","allUUIDs","_entryRecord$flow","formSignUp","mapped","validEntryTotal","allUUIDsValidToGetTaskWinner","getNextCheckPointLotteryTaskInfo","newLotteryTaskMappingEntry","newCheckPointTaskUUID","taskUUID","hasCheckPointTask","checkPointTaskUUID","handleRenewRecords","checkPointInfo","setLotteryTaskMappingEntry","checkPointCardIndex","findIndex","carouselGoTo","setHasNewUnlockTaskPrize","index","slickGoTo","scrollCardsIntoView","element","document","querySelector","scrollElementIntoView","setLotteryTaskMappingEntryInited","useImperativeHandle","updateTaskStatus","unlockedCards","filter","card","newAdminPrizeCards","forEach","add","LotteryTaskProcessHint","recordsLength","LotteryTaskCarousel","forwardCarouselRef","disabledEdit","onLazyLoaded","targetIndex","initSlideCarousel","onGetWinner","lotteryParticipantTypes","_currentLotteryTasks$","checkIsQualifyToGetWinner","winnerResp","getWinner","_currentLotteryTasks$2","isGetWinnerEmptyContinueError","message","displayName","_cards$0$taskConditio","_cards$taskCondition","useTranslation","firstCheckPoint","lastCheckPoint","texts","START","ALL","MORE","DONE","getTextsByGameType","next","selectState","_s$settingPromo","signUpFormId","mgmUserWinnerPrize","mgmUserGameResultRecordsAddTag","every","currentGameResultRecords","currentWinnerPrize","winnerPrizes","thankPrizes","allWinners","hasEnableSignUpForm","normalizedUserGameResultRecords","hasGotLotteryTaskWinner","w","lotteryUuid","entry","primaryFormSignUp","isEntryValidToGetTaskWinner","anyWinnerOfLottery","entryData","_normalizedUserGameRe","loginType","loginTypeMappingPointRoutesParam","Cookie","getLoginInfo","loginUserInfo","getLoginUserInfo","setCurrentLoginID","gtmPushUserLogin","uid","isfirstPassLoginSever","currentLoginID","qualifyWithdrawUuid","settingPointSystems","isNeedReducePoint","isNeedEnterPasscode","isInitialized","isLoginStatus","Number","mgmLotteryValidationApi","fetches","generateFetchOptsGetter","method","POST","throwErrConfigs","REFERRAL_ENTRY_NOT_FOUND","EXCEPTION","getVerifyModuleStatus","useIsVerifyModuleCanGetParticipantWinner","isMgmMission","lotteryInstant","isLotteryInstantRequiredAllCorrect","isLotteryParticipantRequiredAllCorrect","checkIsGameChallengeAllCorrect","checkIsUserHaveClaimedParticipantPrize","checkIsUserHaveClaimedInstantPrize","usePrizeRuleChecker","mgmLotteryInstant","currentLotteryInstant","instantLottery","hasFulfillLotteryInstant","hasFulfillLotteryParticipant","hasReferralCodeInput","retryMgmLotteryValidationApi","setRetryMgmLotteryValidationApi","getEligibleLotteriesByCondition","currentEntryRecord","isPromoHavePickLottery","isPromoHaveInstantLottery","isGameChallengeAllCorrect","eligibleLotteries","processLotteries","validLottery","currentLotteryUUID","delay","timer","continueFlowAfterGetWinner","continueFlowSuccessGetWinner","continueFlowIfNoRemainPrizeAndNoSuspend","checkIsNeedToGetWinner","verifyModuleStatus","isNeedVerifyModule","canGetWinner","createMgmEntryApi","setParticipantWinnerPopup","isNoGetPrize","updateGameResultRecordsCount","successGetWinner","updateParticipantRemainder","currentLottery","isGetLastWinnerInMultipleWinners","lotteryCategory","getLotteryConfig","category","lotteryCategories","IS_PARTICIPANT_LOTTERY","updateFlowOfEntryRecord","entryFlowKeys","LOTTERY_PARTICIPANT","IS_INSTANT_LOTTERY","LOTTERY_INSTANT","updateParticipantRemainderFromApi","_location$pathname","setCurrentPrizeUUID","setGameAlreadyToPlay","fromRegex","isGameShouldOpenWinnerAfterGet","isLotteryShouldOpenWinnerAfterGet","isPurePickThePrizeGame","createParticipantWinner","suspendWhenNoPrize","PICK_PRIZE_CUSTOM_PRIZE_UUID","missionPromoUUID","setIsisLoading","setReferralCode","setReferralUrl","setReferralCount","dependencyGuard","isMgmPromo","getShareUrl","useShareLink","domain","getReferralData","shortLinkResp","referralInfoResp","getShortLinkApi","getPromoReferralInfoApi","shortLink","counts","shareLink","testCode","submitPasscode","remainingCounts","updateShowPasswordQualifyStatus","hasShouldNotEnterPasscodeEachTimeGames","DUPLICATE","USAGE_LIMIT_EXCEEDED","ERROR","trackingData","businessTrackingId","utmFromParent","setTrackingData","system","getTrackDataSystem","biz_tracking","getTrackDataBusiness","setGaClientId","gaClientId","substring","_merge","initFbCAPITracking","fbp","fbc","fbclid","clientUserAgent","navigator","userAgent","_generateFbcByFbclid","generateFbcByFbclid","prev","filterUndefinedOrNull","useTrackingData","qsObj","qsParseJoinArray","String","trim","val","utmMergeIn","utm_source","utm_medium","utm_campaign","utm_term","utm_content","utmSource","utmCampaign","utmMedium","utmTerm","utmContent","referrer","mergeAndDispatchState","recaptchaTokenByCookie","getPasscodeVerify","RECAPTCHA_TOK_AUTH_FAILED","passcodeFromRedux","cookieKey","setCookieKey","memberLoaded","setMemberLoaded","searchParams","passcodeFromUrl","get","hasPcodeInUrl","getPasscode","setPasscode","clearPasscode","getPasscodeList","cookieValue","originalPasscodeList","verifyPasscode","passcodeUnverifiedCode","checkPasscodeVerify","PASSCODE_UNVERIFIED","latestPasscodeFromCookie","pop","getLogInInfoAPI","getMember","loginTypesForApi","ANONYMOUS","loginTypeData","firstProvider","values","user","member","loginMethodMappingLoginTypeForApi","member_uuid","getMemberInfo","currentInUsePasscode","token","onZoomedIn","onZoomedOut","zoomed","setZoomed","backgroundWrap","Zoom","in","timeConfig","onEntered","onExited","appear","enter","exit","_formSettings$form","promoContentBgColor","formSettings","useGameFormReduxData","getColorRGBA","form","formContentBg","convertSettingStyle2ComponentStyle","entering","transform","entered","defaultTimeout","duration","enteringScreen","leavingScreen","_props$disableStrictM","disableStrictModeCompat","inProp","onEnter","onEntering","onExit","onExiting","_props$timeout","_props$TransitionComp","TransitionComponent","Transition","other","_objectWithoutProperties","theme","useTheme","enableStrictModeCompat","unstable_strictMode","nodeRef","foreignRef","useForkRef","handleRef","normalizedTransitionCallback","callback","nodeOrAppearing","maybeAppearing","_slicedToArray","node","isAppearing","handleEntering","handleEnter","reflow","transitionProps","getTransitionProps","webkitTransition","transitions","create","handleEntered","handleExiting","handleExit","handleExited","_extends","childProps","visibility","_interopRequireDefault","require","_interopRequireWildcard","exports","_default","default","createElement","d","_react","NOT_FOUND","defaultEqualityCheck","defaultMemoize","func","equalityCheckOrOptions","providedOptions","equalityCheck","_providedOptions$equa","_providedOptions$maxS","maxSize","resultEqualityCheck","comparator","i","createCacheKeyComparator","cache","equals","put","getEntries","clear","createSingletonCache","cacheIndex","splice","unshift","createLruCache","memoized","matchingEntry","clearCache","createSelectorCreator","memoize","_len","memoizeOptionsFromArgs","Array","_key","_len2","funcs","_key2","_lastResult","_recomputations","directlyPassedOptions","memoizeOptions","resultFunc","Error","_directlyPassedOption2","finalMemoizeOptions","isArray","dependencies","dep","dependencyTypes","join","getDependencies","memoizedResultFunc","selector","assign","lastResult","recomputations","resetRecomputations"],"sourceRoot":""}