tf-checkout-react 1.4.2 → 1.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"tf-checkout-react.cjs.production.min.js","sources":["../src/utils/setConfigs.ts","../src/utils/getQueryVariable.ts","../src/utils/formikErrorFocus.ts","../src/utils/getDomain.ts","../src/utils/cookies.ts","../src/utils/downloadPDF.tsx","../src/utils/createCheckoutDataBodyWithDefaultHolder.ts","../src/utils/createMarkup.ts","../src/utils/isBrowser.ts","../src/utils/jsonUtils.ts","../src/api/index.ts","../src/hooks/usePixel.ts","../src/validators/index.ts","../src/components/common/SnackbarAlert.tsx","../src/components/common/CustomField.tsx","../src/components/common/PoweredBy.tsx","../src/components/forgotPasswordModal/index.tsx","../src/components/common/ModalComponent/index.tsx","../src/components/idVerificationContainer/VerificationPendingModal.tsx","../src/components/loginModal/index.tsx","../src/components/signupModal/index.tsx","../src/utils/showZero.tsx","../src/components/timerWidget/index.tsx","../src/components/common/CheckboxField.tsx","../src/components/common/PhoneNumberField.tsx","../src/components/common/Loader.tsx","../src/components/common/NativeSelectFeild/index.tsx","../src/components/common/RadioGroupField/index.tsx","../src/components/common/SelectField/index.tsx","../src/components/common/DatePickerField.tsx","../src/components/billing-info-container/utils.ts","../src/components/billing-info-container/index.tsx","../src/normalizers/index.ts","../src/components/stripePayment/index.tsx","../src/components/paymentContainer/index.tsx","../src/components/confirmationContainer/config.ts","../src/components/confirmationContainer/social-buttons.tsx","../src/components/confirmModal/index.tsx","../src/components/countdown/index.tsx","../src/components/waitingList/index.tsx","../src/components/ticketsContainer/AccessCodeSection.tsx","../src/components/ticketsContainer/PromoCodeSection.tsx","../src/components/ticketsContainer/ReferralLogic.tsx","../src/components/ticketsContainer/TicketRow.tsx","../src/components/ticketsContainer/utils.ts","../src/components/ticketsContainer/TicketsSection.tsx","../src/components/myTicketsContainer/tableConfig.tsx","../src/components/myTicketsContainer/row.tsx","../src/components/common/RadioField.tsx","../src/components/ticketResaleModal/index.tsx","../src/components/orderDetailsContainer/ticketsTable.tsx","../src/components/resetPasswordContainer/index.tsx","../src/components/addonsContainer/adapters/index.tsx","../src/components/addonsContainer/AddonComponent.tsx","../src/components/addonsContainer/utils/index.tsx","../src/components/seatMapContainer/addToCart.ts","../src/components/seatMapContainer/utils.ts","../src/components/seatMapContainer/SeatMapComponent.tsx","../src/components/seatMapContainer/TicketsSection.tsx","../src/components/idVerificationContainer/constants.ts","../src/components/common/RedirectModal.tsx","../src/components/rsvpContainer/index.tsx","../src/components/addonsContainer/index.tsx","../src/components/addonsContainer/normalizers/index.ts","../src/components/confirmationContainer/index.tsx","../src/components/idVerificationContainer/index.tsx","../src/components/myTicketsContainer/index.tsx","../src/components/orderDetailsContainer/index.tsx","../src/components/seatMapContainer/index.tsx","../src/components/ticketResale/index.tsx","../src/components/ticketsContainer/index.tsx","../src/constants/index.ts","../src/hooks/useCookieListener.ts","../src/utils/auth.ts"],"sourcesContent":["import axios, { AxiosInstance } from 'axios';\nimport _forEach from 'lodash/forEach'\n\nexport const ttfHeaders: { [key: string]: any } = {\n Accept: 'application/vnd.api+json',\n 'Content-Type': 'application/vnd.api+json',\n}\n\ninterface IPublicRequest extends AxiosInstance {\n setGuestToken: (token: string) => void;\n setAccessToken: (token: string) => void;\n setBaseUrl: (baseUrl: string) => void;\n}\n\nexport interface IConfigs {\n BASE_URL: string;\n CLIENT_ID: string;\n CLIENT_SECRET: string;\n STRIPE_PUBLISHABLE_KEY: string;\n X_SOURCE_ORIGIN: string;\n [key: string]: string | number;\n}\n\nexport const CONFIGS: IConfigs = {} as IConfigs\n\nexport const publicRequest: IPublicRequest = axios.create({\n baseURL: CONFIGS.BASE_URL || `https://www.ticketfairy.com/api`,\n headers: ttfHeaders,\n}) as IPublicRequest\n\nexport const setXSourceOrigin = (sourceOrigin: string) => {\n ttfHeaders['X-Source-Origin'] = sourceOrigin\n}\n\nexport const setConfigs = (configs: IConfigs) => {\n _forEach(configs, (value, key) => {\n CONFIGS[key] = value\n })\n\n publicRequest.setBaseUrl(CONFIGS.BASE_URL)\n\n if (CONFIGS.X_SOURCE_ORIGIN) {\n setXSourceOrigin(CONFIGS.X_SOURCE_ORIGIN)\n }\n}","export const getQueryVariable = (variable: string) => {\n if (typeof window !== 'undefined') {\n const query = window.location.search.substring(1)\n const vars = query.split('&')\n for (let i = 0; i < vars.length; i++) {\n const pair = vars[i].split('=')\n if (pair[0] === variable) {\n return decodeURIComponent(pair[1])\n }\n }\n }\n return false\n}\n","import { connect, FormikContextType } from 'formik'\nimport { Component } from 'react'\n\ninterface IProps {\n formik: FormikContextType<any>;\n}\n\nclass ErrorFocusInternal extends Component<IProps> {\n public componentDidUpdate(prevProps: IProps) {\n const { isSubmitting, isValidating, errors } = prevProps.formik\n const keys = Object.keys(errors)\n if (keys.length > 0 && isSubmitting && !isValidating) {\n const selector = `[name=\"${keys[0]}\"]`\n const errorElement = document.querySelector(selector) as HTMLElement\n if (errorElement) {\n errorElement.focus()\n }\n }\n }\n\n public render = () => null;\n}\n\nexport const ErrorFocus = connect<{}>(ErrorFocusInternal)\n","export function getDomain(url: string, subdomain?: string): string {\n let updatedUrl: any = url.replace(/(https?:\\/\\/)?(www.)?/i, '')\n\n if (!subdomain) {\n updatedUrl = updatedUrl.split('.')\n\n updatedUrl = updatedUrl.slice(updatedUrl.length - 2).join('.')\n }\n\n if (updatedUrl.indexOf('/') !== -1) {\n return updatedUrl.split('/')[0]\n }\n\n return updatedUrl\n}\n","import { getDomain } from './getDomain'\n\nexport function setCustomCookie(name: string, value: string, days: number = 5) {\n let expires = ''\n if (days) {\n let date = new Date()\n date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000)\n expires = '; expires=' + date.toUTCString()\n }\n if (typeof window !== 'undefined') {\n const domain = getDomain(window.location.hostname)\n document.cookie =\n name + '=' + (value || '') + expires + '; path=/' + `; domain=${domain}`\n }\n}\n\nexport function getCookieByName(cname: string) {\n if (typeof window === 'undefined') return ''\n let name = cname + '='\n let ca = document.cookie.split(';')\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i]\n while (c.charAt(0) == ' ') {\n c = c.substring(1)\n }\n if (c.indexOf(name) == 0) {\n return c.substring(name.length, c.length)\n }\n }\n return ''\n}\n\nexport function deleteCookieByName(name: string) {\n if (typeof window !== 'undefined') {\n const domain = getDomain(window.location.hostname)\n document.cookie =\n name +\n '=; Path=/' +\n `; domain=${domain}` +\n '; Expires=Thu, 01 Jan 1970 00:00:01 GMT;'\n }\n}\n","import { getCookieByName } from './cookies'\n\nexport const downloadPDF = (pdfUrl: string) => {\n if (typeof window === 'undefined') return\n\n const xtfCookie = getCookieByName('X-TF-ECOMMERCE')\n const accessToken: string | null = localStorage.getItem('access_token')\n\n if (!accessToken && !xtfCookie) return\n\n let headers = {}\n\n if (accessToken) {\n headers = {\n Authorization: `Bearer ${accessToken}`,\n }\n }\n\n if (xtfCookie) {\n headers = {\n 'X-TF-ECOMMERCE': xtfCookie,\n }\n }\n\n return fetch(pdfUrl, {\n headers,\n credentials: 'include',\n })\n .then(async response => {\n const blobValue = await response.blob()\n const fileNameHeader = response.headers.get('content-disposition') || ''\n const fileName = fileNameHeader.split('\"')[1]\n return { blobValue, fileName }\n })\n .then(({ blobValue, fileName }) => {\n if (!fileName) {\n throw Error('Something went wrong.')\n return\n }\n const file = new Blob([blobValue], { type: 'application/pdf' })\n const fileURL = URL.createObjectURL(file)\n const link = document.createElement('a')\n link.href = fileURL\n link.setAttribute('download', fileName)\n document.body.appendChild(link)\n link.click()\n document.body.removeChild(link)\n })\n .catch(error => {\n return error\n })\n}\n","import _get from 'lodash/get'\n\ntype Type1 = string | number | null | undefined\ninterface ICheckoutBody {\n attributes: {\n [key: string]:\n | Type1\n | Record<string | number, Type1>\n | Array<Type1 | IticketHolder>;\n };\n}\n\ninterface IticketHolder {\n first_name?: string;\n last_name?: string;\n phone?: string;\n email?: string;\n}\n\ninterface IUserCredentialsValues {\n emailLogged?: string;\n firstNameLogged?: string;\n lastNameLogged?: string;\n}\n\nexport const createCheckoutDataBodyWithDefaultHolder = (\n ticketsQuantity: number,\n logedInValues: Record<string, string | undefined>,\n includeDob = false,\n userCredentials: IUserCredentialsValues = {}\n): ICheckoutBody => {\n const ticket_holders: IticketHolder[] = []\n\n const first_name =\n _get(logedInValues, 'firstName') ||\n _get(logedInValues, 'first_name') ||\n _get(userCredentials, 'firstNameLogged') ||\n ''\n\n const last_name =\n _get(logedInValues, 'lastName') ||\n _get(logedInValues, 'last_name') ||\n _get(userCredentials, 'lastNameLogged') ||\n ''\n const phone = _get(logedInValues, 'phone', '')\n const email =\n _get(logedInValues, 'email') || _get(userCredentials, 'emailLogged') || ''\n\n for (let i = 0; i <= ticketsQuantity - 1; i++) {\n const individualHolder = i\n ? { first_name: '', last_name: '', phone: '', email: '' }\n : { first_name, last_name, phone, email }\n\n ticket_holders.push(individualHolder)\n }\n\n const body: ICheckoutBody = {\n attributes: {\n ...logedInValues,\n email,\n confirm_email: email,\n first_name,\n last_name,\n ticket_holders,\n },\n }\n\n if (includeDob) {\n const holderAgeDate = new Date(_get(logedInValues, 'holderAge', ''))\n body.attributes.dob_day = holderAgeDate.getDate()\n body.attributes.dob_month = holderAgeDate.getMonth() + 1\n body.attributes.dob_year = holderAgeDate.getFullYear()\n }\n\n return body\n}\n","export const createMarkup = (data: string) => ({ __html: data })","export const isBrowser =\n typeof window !== 'undefined' && typeof window.document !== 'undefined'\n","export const isJson = (value: any): boolean => {\n try {\n JSON.parse(value)\n } catch (e) {\n return false\n }\n return true\n}\n","import { AxiosRequestConfig, AxiosResponse } from 'axios'\nimport _get from 'lodash/get'\n\nimport { pageOptions } from '../hooks/usePixel'\nimport {\n GetNetverifyUrlResponseData,\n UpdateVerificationStatusResponseData,\n VerificationStatusResponseData,\n} from '../types/verification'\nimport { CONFIGS, getCookieByName, setCustomCookie } from '../utils'\nimport { getQueryVariable } from '../utils/getQueryVariable'\nimport { publicRequest, ttfHeaders } from '../utils/setConfigs'\n\nconst isWindowDefined = typeof window !== 'undefined'\nconst isDocumentDefined = typeof document !== 'undefined'\n\nif (isWindowDefined && localStorage.getItem('auth_guest_token')) {\n ttfHeaders['Authorization-Guest'] = localStorage.getItem('auth_guest_token')\n}\n\npublicRequest.interceptors.response.use(\n response => {\n const authGuestToken = _get(response, 'headers.authorization-guest')\n\n if (isWindowDefined && authGuestToken) {\n window.localStorage.setItem('auth_guest_token', authGuestToken)\n publicRequest.setGuestToken(authGuestToken)\n }\n\n return response\n },\n error => {\n if (error?.response?.status === 401) {\n if (isWindowDefined) {\n window.localStorage.removeItem('user_data')\n window.localStorage.removeItem('access_token')\n const errorType = error?.response?.data?.error\n if (errorType === 'invalid_token') {\n window.location.href = '/'\n }\n }\n }\n\n const authGuestToken = _get(error, 'response.headers.authorization-guest')\n if (isWindowDefined && authGuestToken) {\n window.localStorage.setItem('auth_guest_token', authGuestToken)\n publicRequest.setGuestToken(authGuestToken)\n }\n\n return Promise.reject(error)\n }\n)\n\npublicRequest.interceptors.request.use((config: AxiosRequestConfig) => {\n const guestToken = isWindowDefined\n ? window.localStorage.getItem('auth_guest_token')\n : null\n const userData = isWindowDefined ? window.localStorage.getItem('user_data') : null\n const accessToken = isWindowDefined ? window.localStorage.getItem('access_token') : null\n\n if (userData && accessToken) {\n const updatedHeaders = {\n ...config.headers,\n Authorization: `Bearer ${accessToken}`,\n }\n config.headers = updatedHeaders\n }\n\n if (guestToken) {\n publicRequest.setGuestToken(guestToken)\n const updatedHeaders = {\n ...config.headers,\n 'Authorization-Guest': guestToken,\n }\n config.headers = updatedHeaders\n }\n\n if (getCookieByName('X-TF-ECOMMERCE')) {\n const updatedHeaders = {\n ...config.headers,\n 'X-TF-ECOMMERCE': getCookieByName('X-TF-ECOMMERCE'),\n }\n config.headers = updatedHeaders\n }\n\n const additionalCookiesHeaderValue = document.cookie ?? ''\n if (additionalCookiesHeaderValue !== '') {\n const updatedHeaders = {\n ...config.headers,\n 'Additional-Cookies': additionalCookiesHeaderValue,\n }\n config.headers = updatedHeaders\n }\n\n if (CONFIGS.X_SOURCE_ORIGIN) {\n const updatedHeaders = {\n ...config.headers,\n 'X-Source-Origin': CONFIGS.X_SOURCE_ORIGIN,\n }\n config.headers = updatedHeaders\n }\n\n if (CONFIGS.BASE_URL) {\n config.baseURL = CONFIGS.BASE_URL + '/api'\n }\n\n return config\n})\n\npublicRequest.interceptors.response.use((response: AxiosResponse) => {\n const xtfCookie = _get(response, 'headers.x-tf-ecommerce')\n const url = _get(response, 'config.url')\n const method = _get(response, 'config.method')\n\n if (xtfCookie && !(url === '/auth' && method === 'delete')) {\n setCustomCookie('X-TF-ECOMMERCE', xtfCookie)\n }\n\n return response\n})\n\npublicRequest.setGuestToken = token =>\n (publicRequest.defaults.headers.common['Authorization-Guest'] = token)\n\npublicRequest.setBaseUrl = (baseUrl: string) =>\n (publicRequest.defaults.baseURL = baseUrl + '/api')\n\npublicRequest.setAccessToken = token =>\n (publicRequest.defaults.headers.common.Authorization = token)\n\nexport const setCustomHeader = (response: any) => {\n const guestHeaderResponseValue = _get(response, 'headers.authorization-guest')\n const guestHeaderExistingValue = _get(response, 'config.headers[Authorization-Guest]')\n const guestHeader = guestHeaderResponseValue || guestHeaderExistingValue\n\n if (guestHeader) {\n if (isWindowDefined) {\n window.localStorage.setItem('auth_guest_token', guestHeader)\n publicRequest.setGuestToken(guestHeader)\n }\n }\n}\n\nexport const handleSetAccessToken = (token: string) => {\n if (token) {\n if (isWindowDefined) {\n window.localStorage.setItem('access_token', token)\n publicRequest.setAccessToken(token)\n }\n }\n}\n\nexport function getEvent(id: string | number, pk?: string) {\n let referralValue = ''\n if (isWindowDefined) {\n const params = new URL(`${window.location}`)\n const referralId = params.searchParams.get('ttf_r') || ''\n const referral_key = window.localStorage.getItem('referral_key')\n let referralIdlocal = ''\n if (referral_key) {\n referralIdlocal = referral_key.split('.')[1]\n }\n referralValue = referralId || referralIdlocal\n }\n\n const response = publicRequest\n .get(`v1/event/${id}`, {\n params: {\n pk,\n },\n headers: {\n ...ttfHeaders,\n 'Referer-Url': isDocumentDefined ? document.referrer : '',\n 'Referrer-Id': isWindowDefined ? referralValue : '',\n },\n })\n .catch(error => {\n throw error\n })\n return response\n}\n\nexport function getTickets(\n id: string | number,\n promoCode?: string,\n pk?: string\n) {\n const invitationHash = getQueryVariable('invitation-hash')\n const params = { pk } as any\n\n if (invitationHash) {\n params['invitation-hash'] = invitationHash\n }\n\n const response = publicRequest\n .get(`v1/event/${id}/tickets`, {\n params,\n headers: promoCode\n ? {\n ...ttfHeaders,\n 'Promotion-Event': String(id),\n 'Promotion-Code': promoCode,\n }\n : { ...ttfHeaders },\n })\n .catch(error => {\n throw error\n })\n return response\n}\n\nexport const addToCart = (id: string | number, data: any) => {\n const res = publicRequest.post(\n `v1/event/${id}/add-to-cart/`,\n { data },\n {\n headers: {\n 'Referer-Url': isDocumentDefined ? document.referrer : '',\n },\n }\n )\n return res\n}\n\nexport const getCart = () => {\n const res = publicRequest.get(`v1/cart/`)\n return res\n}\n\nexport const postOnCheckout = (data: any, accessToken?: string, freeTicket = false) => {\n if (freeTicket) {\n delete data.attributes.city\n delete data.attributes.country\n delete data.attributes.state\n delete data.attributes.zip\n delete data.attributes.street_address\n }\n const res = publicRequest.post(\n `v1/on-checkout/`,\n { data },\n {\n headers: {\n ...ttfHeaders,\n Authorization: `Bearer ${accessToken}`,\n },\n }\n )\n return res\n}\n\nexport const authorize = (data: { email: string, password: string }) =>\n publicRequest.post(\n `/auth?clientId=${CONFIGS.CLIENT_ID || 'e9d8f8922797b4621e562255afe90dbf'}`,\n data\n )\n\nexport const register = (data: FormData) =>\n publicRequest.post('v1/oauth/register-rn', data)\n\nexport const getAccessToken = (data: FormData) =>\n publicRequest.post('v1/oauth/access_token', data)\n\nexport const getPaymentData = (hash: string) => {\n const response = publicRequest\n .get(`v1/order/${hash}/review/`, {\n headers: {\n 'Referer-Url': isDocumentDefined ? document.referrer : '',\n },\n })\n .catch(error => {\n throw error\n })\n return response\n}\n\nexport const handlePaymentData = (orderHash: string, data: any) => {\n const res = publicRequest\n .post(`v1/order/${orderHash}/pay`, {\n data: { attributes: { 'stripe-source': data } },\n })\n .catch(error => {\n throw error\n })\n return res\n}\n\nexport const handlePaymentSuccess = (orderHash: string) => {\n const res = publicRequest\n .post(`v1/order/${orderHash}/success`, undefined, {\n headers: {\n 'Referer-Url': isDocumentDefined ? document.referrer : '',\n },\n })\n .catch(error => {\n throw error\n })\n return res\n}\n\nexport const handleFreeSuccess = (orderHash: string) => {\n const res = publicRequest\n .post(`v1/order/${orderHash}/complete_free_registration`, undefined, {\n headers: {\n 'Referer-Url': isDocumentDefined ? document.referrer : '',\n },\n })\n .catch(error => {\n throw error\n })\n return res\n}\n\nexport const getProfileData = (accessToken?: string) =>\n publicRequest\n .get('/customer/profile/', {\n headers: {\n ...ttfHeaders,\n Authorization: `Bearer ${accessToken}`,\n },\n })\n .catch((e: any) => e)\n\nexport const getCountries = () => publicRequest.get('/countries/list')\n\nexport const getConfirmationData = (orderHash: string) =>\n publicRequest.get(`v1/order/${orderHash}/payment/complete`)\n\nexport const getStates = (countryId: string) =>\n publicRequest.get(`/countries/${countryId}/states/`)\n\nexport const getOrders = (page: number, limit: number, eventSlug: string) =>\n publicRequest.get(\n `v1/account/orders/?page=${page}&limit=${limit}&filter[event]=${eventSlug}&${\n CONFIGS.BRAND_SLUG\n ? `filter[brand]=${CONFIGS.BRAND_SLUG}&filter[subbrands]=true`\n : ''\n }`\n )\n\nexport const getOrderDetails = (orderId: string) =>\n publicRequest.get(`v1/account/order/${orderId}`)\n\nexport const addToWaitingList = (id: number, data: any) =>\n publicRequest.post(`v1/event/${id}/add_to_waiting_list`, data)\n\nexport const getConditions = (eventId: string) =>\n publicRequest.get(`v1/event/${eventId}/conditions`)\n\n// resale\nexport const resaleTicket = (data: any, hash: string) =>\n publicRequest.post(`v1/ticket/${hash}/sell`, data)\n\nexport const removeFromResale = (hash: string) =>\n publicRequest.delete(`v1/ticket/${hash}/sell`)\n\nexport const postReferralVisits = (eventId: string, referralId: string) =>\n publicRequest.post(`v1/event/${eventId}/referrer/`, {\n referrer: `${referralId}`,\n })\n\nexport const logout = () => publicRequest.delete('/auth')\n\n// forgot password\nexport const forgotPassword = (email: string) =>\n publicRequest.post(`/auth/restore-password`, { email })\n\n// reset password\ninterface IResetPasswordData {\n token: string;\n password: string;\n confirmPassword: string;\n}\nexport const resetPassword = (data: IResetPasswordData) =>\n publicRequest.post(`/auth/reset-password`, data)\n\nexport const processTicket = (hash: string) =>\n publicRequest.post(`v1/ticket/${hash}/process/`)\n\nexport const declineInvitation = (hash: string) =>\n publicRequest.post(`v1/ticket/${hash}/decline`)\n\nexport const sendRSVPInfo = (eventId: number, data: any) =>\n publicRequest.post(`v1/event/${eventId}/send-rsvp-info`, data)\n\nexport const validatePhoneNumber = async (phone: string): Promise<any> => {\n const response: AxiosResponse<any, AxiosRequestConfig> = await publicRequest.get(\n `/v1/account/validate_phone?phone=${phone}`\n )\n\n return response.data\n}\n\nexport const getAddons = async (eventId: string) => {\n const result = await publicRequest.get(`/v1/event/${eventId}/add-ons`)\n const addons = _get(result, 'data.data.attributes', [])\n return addons\n}\n\nexport const selectAddons = (data: any) => {\n publicRequest.post(`v1/on-checkout`, data)\n}\n\nexport const getCheckoutPageConfigs = async () => {\n const response = await publicRequest.get(`v1/checkout-configs`)\n return response.data\n}\n\n// seat map <--start-->\n\n// const makeId = (length = 20) => {\n// let result = ''\n// const characters =\n// 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'\n// const charactersLength = characters.length\n// for (let i = 0; i < length; i++) {\n// result += characters.charAt(Math.floor(Math.random() * charactersLength))\n// }\n// return result\n// }\n\nexport const getSeatMapData = async (\n eventId: string | number\n): Promise<SeatMapDataResponse> => {\n localStorage.setItem('tierId', '')\n const reservedSeatsHash = getQueryVariable('reserved_seats_hash')\n const params = {} as any\n if (reservedSeatsHash) {\n params.reserved_seats_hash = reservedSeatsHash\n }\n\n const response: AxiosResponse<\n SeatMapDataResponse,\n AxiosRequestConfig\n > = await publicRequest.get(`v1/event/${eventId}/seat-map-data`, { params })\n return response.data\n}\n\nexport const getSeatMapStatuses = async (\n eventId: string | number\n): Promise<SeatMapStatusesResponse> => {\n const response = await publicRequest.get(`v1/event/${eventId}/seats/status`)\n return response.data\n}\n\nexport const reserveSeat = async (\n eventId: string | number,\n tierId: string,\n seatId: string\n) => {\n const response = await publicRequest.post(\n `v1/event/${eventId}/seats/reserve`,\n {\n data: {\n tierId,\n seatId,\n ttl: 10,\n },\n }\n )\n return response.data\n}\n\nexport const removeSeatReserve = async (\n eventId: string | number,\n tierId: string,\n seatIds: string[]\n) => {\n const response = await publicRequest.delete(\n `v1/event/${eventId}/seats/delete-reserved`,\n {\n data: {\n tierId,\n seatIds,\n },\n }\n )\n\n return response.data\n}\n\n// seat map <--end-->\nexport function getPixelScript(id: string | number, pageOptions: pageOptions) {\n const response = publicRequest.get(`v1/event/${id}/track`, {\n params: {\n page_url: pageOptions.pageUrl,\n page: pageOptions.page,\n order_hash: pageOptions.orderHash,\n },\n })\n return response\n}\n\n// ID Verification\nexport const getNetverifyUrl = async (): Promise<GetNetverifyUrlResponseData> => {\n const response: AxiosResponse<\n GetNetverifyUrlResponseData,\n AxiosRequestConfig\n > = await publicRequest.get('v1/authenticate/verify')\n return response.data\n}\n\nexport const checkVerificationStatus = async (): Promise<{\n data: VerificationStatusResponseData;\n}> => {\n const response: AxiosResponse<\n { data: VerificationStatusResponseData },\n AxiosRequestConfig\n > = await publicRequest.get('v1/authenticate/get-verification-info')\n return response.data\n}\n\nexport const updateVerificationStatus = async (): Promise<{\n data: UpdateVerificationStatusResponseData;\n}> => {\n const response: AxiosResponse<\n { data: UpdateVerificationStatusResponseData },\n AxiosRequestConfig\n > = await publicRequest.patch('v1/authenticate/verify', {\n data: {\n verification: {\n verificationStatus: 'PENDING',\n },\n },\n })\n return response.data\n}\n\nexport const checkCustomerOrder = async (orderHash: string): Promise<any> => {\n const response: AxiosResponse<\n any,\n AxiosRequestConfig\n > = await publicRequest.get(`v1/order/${orderHash}/verify-customer-order`)\n\n return response.data\n}\n","/* eslint-disable react-hooks/exhaustive-deps */\nimport _get from 'lodash/get'\nimport { useEffect } from 'react'\n\nimport { getPixelScript } from '../api'\nimport { isBrowser } from '../utils'\n\nexport interface pageOptions {\n pageUrl: string;\n page?: string;\n orderHash?: string;\n}\n\nfunction appendScriptsToHeader(code: string) {\n if (isBrowser && code) {\n const tempEl = document.createElement('div')\n tempEl.innerHTML = code\n const scripts = tempEl.getElementsByTagName('script')\n\n for (let index = 0; index < scripts.length; ++index) {\n const script = document.createElement('script')\n script.type = 'text/javascript'\n\n if (scripts[index].src) {\n script.src = scripts[index].src\n } else {\n script.innerHTML = scripts[index].innerHTML\n }\n\n document.head.appendChild(script)\n }\n }\n}\n\nconst addGTagToHeader = (tagId?: string, links?: string[]) => {\n if (document?.head && document?.body && tagId) {\n const script = document.createElement('script')\n script.innerHTML = `(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':\n new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],\n j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=\n 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);\n })(window,document,'script','dataLayer','${tagId}');`.trim()\n document.head.append(script)\n\n const scriptBody = document.createElement('noscript')\n scriptBody.innerHTML = `<iframe src=\"https://www.googletagmanager.com/ns.html?id=${tagId}\"\n height=\"0\" width=\"0\" style=\"display:none;visibility:hidden\"></iframe>`\n document.body.append(scriptBody);\n\n (window as any).dataLayer = (window as any).dataLayer || [];\n (window as any).gtag = function gtag(...args: any){(window as any).dataLayer.push(args)}\n if (links) {\n (window as any)?.gtag('set', 'linker', {\n 'domains': links\n })\n }\n (window as any).gtag('js', new Date());\n (window as any).gtag('config', tagId)\n }\n}\n\nexport const usePixel = async (\n eventId: string | number,\n options: pageOptions\n) => {\n const getScript = async () => {\n if (!eventId) return\n\n try {\n const response = await getPixelScript(eventId, options)\n const pixels = _get(response, 'data.data.attributes.pixels', '')\n appendScriptsToHeader(pixels)\n const brandGoogleTagKey = _get(response, 'data.data.attributes.brandGoogleTagKey', '')\n const eventGoogleTagKey = _get(response, 'data.data.attributes.eventGoogleTagKey', '')\n const eventGoogleTagManagerLinkerDomains = _get(response, 'data.data.attributes.eventGoogleTagManagerLinkerDomains', '')\n addGTagToHeader(brandGoogleTagKey, eventGoogleTagManagerLinkerDomains)\n if (eventGoogleTagKey) {\n addGTagToHeader(eventGoogleTagKey, eventGoogleTagManagerLinkerDomains)\n }\n } catch (e) {\n console.error(e)\n }\n }\n\n useEffect(() => {\n getScript()\n }, [eventId])\n}","const emailRegex = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/\n\nexport const combineValidators = (...validators: any) => (...value: any) => {\n for (let i = 0; i < validators.length; ++i) {\n const error_message = validators[i](...value)\n if (error_message) return error_message\n }\n}\n\nexport function isFalsy(item: any) {\n try {\n if (\n !item || // handles most, like false, 0, null, etc\n (typeof item == 'object' &&\n Object.keys(item).length === 0 && // for empty objects, like {}, []\n !(typeof item.addEventListener == 'function')) // omit webpage elements\n ) {\n return true\n }\n } catch (err) {\n return true\n }\n\n return false\n}\n\nexport const requiredValidator = (\n value?: string | number | Array<string> | boolean,\n message?: string\n): string => {\n let errorMessage = ''\n\n if (isFalsy(value)) {\n errorMessage = message || 'Required'\n }\n return errorMessage\n}\n\nexport const emailValidator = (email: string) =>\n !emailRegex.test(email) ? 'Please enter a valid email address' : ''\n","import React from 'react'\nimport { Alert, AlertColor, Snackbar, SnackbarOrigin } from '@mui/material'\n\ninterface ISnackbarAlertProps {\n isOpen: boolean\n message: string\n type: AlertColor\n position?: SnackbarOrigin\n autoHideDuration?: number\n variant?: 'filled' | 'standard' | 'outlined'\n\n onClose: () => void\n}\n\nconst SnackbarAlert = ({\n isOpen,\n message,\n type,\n position,\n autoHideDuration = 3000,\n variant,\n onClose,\n}: ISnackbarAlertProps) => {\n return (\n <div className=\"snackbar-alert-container\">\n <Snackbar\n autoHideDuration={autoHideDuration}\n open={isOpen}\n anchorOrigin={position || { vertical: 'top', horizontal: 'center' }}\n onClose={onClose}\n classes={{\n root: 'snackbar-alert-snackbar-root',\n }}\n >\n <Alert\n severity={type}\n onClose={onClose}\n variant={variant || 'filled'}\n classes={{\n icon: 'snackbar-alert-icon',\n root: 'snackbar-alert-alert-root',\n action: 'snackbar-alert-action',\n message: 'snackbar-alert-message',\n filled: 'snackbar-alert-filled',\n }}\n >\n {message}\n </Alert>\n </Snackbar>\n </div>\n )\n}\n\nexport default SnackbarAlert\n","/* eslint-disable no-underscore-dangle */\nimport TextField from '@mui/material/TextField'\nimport { useTheme } from '@mui/styles'\nimport { FieldInputProps, FormikProps } from 'formik'\nimport _get from 'lodash/get'\nimport _includes from 'lodash/includes'\nimport _isFunction from 'lodash/isFunction'\nimport _isObject from 'lodash/isObject'\nimport _map from 'lodash/map'\nimport React, { useEffect, useRef, useState } from 'react'\n\nexport interface ISelectOption {\n label: string | number;\n value?: string | number;\n [key: string]: any;\n}\n\nexport interface ICustomField {\n label: string;\n field: FieldInputProps<any>;\n form: FormikProps<any>;\n theme: 'dark' | 'light';\n // optional\n type?: string;\n selectOptions?: ISelectOption[];\n inputRef?:\n | { current: HTMLInputElement | null }\n | ((node: HTMLInputElement | null) => void);\n multiline?: boolean;\n minRows?: string | number;\n maxRows?: string | number;\n}\nexport interface IOtherProps {\n [key: string]: any;\n}\n\nexport const CustomField = ({\n label,\n type = 'text',\n field,\n selectOptions = [] as ISelectOption[],\n form: { touched, errors, submitCount },\n theme,\n inputProps: pInputProps = {},\n InputProps = {},\n inputRef,\n multiline = false,\n minRows,\n maxRows,\n}: ICustomField & IOtherProps) => {\n const [isShrinked, setIsShrinked] = useState(Boolean(field.value))\n const _ref = useRef<HTMLInputElement>(null)\n const isAutoFilled = _ref.current?.matches(':-webkit-autofill')\n const isSelectField = type === 'select'\n const error = _get(errors, field.name)\n const isTouched =\n Boolean(_get(touched, field.name)) ||\n (_includes(field.name, 'holder') && !!error && !!submitCount)\n\n const customTheme: any = useTheme()\n const inputProps: any = { sx: customTheme?.input }\n\n useEffect(() => {\n if (_isFunction(inputRef)) {\n inputRef(_ref.current)\n } else if (_isObject(inputRef)) {\n inputRef.current = _ref.current\n }\n })\n\n return (\n <TextField\n placeholder=\"\"\n id={field.name}\n label={label}\n type={type}\n select={isSelectField}\n fullWidth={true}\n error={!!error && isTouched}\n helperText={isTouched && error}\n onFocus={() => {\n setIsShrinked(true)\n }}\n SelectProps={{\n native: true,\n className: theme,\n MenuProps: { className: theme },\n }}\n InputLabelProps={{\n sx: customTheme?.input,\n shrink: isShrinked || Boolean(field.value) || isAutoFilled,\n }}\n InputProps={InputProps}\n inputProps={{ ...inputProps, ...pInputProps }}\n inputRef={_ref}\n multiline={multiline}\n minRows={minRows}\n maxRows={maxRows}\n {...field}\n onBlur={(e: React.FocusEvent<any, Element>) => {\n setIsShrinked(Boolean(field.value))\n if (field.onBlur) {\n field.onBlur(e)\n }\n }}\n >\n {isSelectField\n ? _map(selectOptions, option => (\n <option\n key={option.value}\n value={option.value}\n disabled={option.disabled}\n >\n {option.label}\n </option>\n ))\n : null}\n </TextField>\n )\n}\n","import React from 'react'\n\nexport const PoweredBy = () => (\n <div className=\"powered-container\">\n <div className='powered-text'>Powered By</div>\n <img\n className='powered-img'\n alt=\"The Ticket Fairy\"\n src={\"https://cdn-checkout.s3.us-east-2.amazonaws.com/IconTicketFairy.svg\"}\n />\n <div className='powered-ttf'>\n The<strong>Ticket</strong>Fairy\n </div>\n </div>\n)\n","import './style.css'\n\nimport { Box, CircularProgress,Modal } from '@mui/material'\nimport axios, { AxiosError } from 'axios'\nimport { Field, Form, Formik } from 'formik'\nimport React, { FC, useState } from 'react'\nimport * as Yup from 'yup'\n\nimport { forgotPassword } from '../../api'\nimport { CustomField } from '../common/CustomField'\nimport { PoweredBy } from '../common/PoweredBy'\n\ninterface IForgotPasswordProps {\n onClose: () => void;\n onLogin: () => void;\n onForgotPasswordSuccess: (res: any) => void;\n onForgotPasswordError: (e: AxiosError) => void;\n showPoweredByImage?: boolean;\n}\n\ninterface ValuesTypes {\n email: string;\n}\n\nconst style: React.CSSProperties = {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n minWidth: 480,\n backgroundColor: '#fff',\n border: '1px solid white',\n outline: 'none',\n padding: '14px',\n}\n\nconst Schema = Yup.object().shape({\n email: Yup.string()\n .email('Invalid email')\n .required('Required'),\n})\n\nexport const ForgotPasswordModal: FC<IForgotPasswordProps> = ({\n onClose = () => {},\n onLogin = () => {},\n onForgotPasswordSuccess = () => {},\n onForgotPasswordError = () => {},\n showPoweredByImage = false,\n}) => {\n const [loading, setLoading] = useState(false)\n\n const onForgotPassword = async ({ email }: ValuesTypes) => {\n try {\n setLoading(true)\n const { data } = await forgotPassword(email)\n\n onForgotPasswordSuccess(data)\n onClose()\n } catch (e) {\n if (axios.isAxiosError(e)) {\n onForgotPasswordError(e)\n }\n } finally {\n setLoading(false)\n }\n }\n\n const _onClose = loading ? () => {} : onClose\n\n return (\n <Modal\n open={true}\n onClose={_onClose}\n aria-labelledby=\"modal-modal-title\"\n aria-describedby=\"modal-modal-description\"\n className=\"forgot-password-modal\"\n >\n <Box style={style}>\n <div>\n <Formik\n initialValues={{ email: '' }}\n validationSchema={Schema}\n onSubmit={onForgotPassword}\n >\n {({ isValid, dirty, handleSubmit }) => (\n <Form onSubmit={handleSubmit}>\n <div className=\"forgot-password-container\">\n <div className=\"title\">Password Reset</div>\n <div className=\"forgot-password-container__singleField\">\n <Field\n name=\"email\"\n label=\"Email\"\n component={CustomField}\n />\n </div>\n </div>\n <div className=\"forgot-password-action-button\">\n <button type=\"submit\" disabled={!(isValid && dirty)}>\n {loading ? <CircularProgress size=\"22px\" /> : 'Submit'}\n </button>\n </div>\n <div className=\"login\">\n <span onClick={onLogin}>Back to Log In</span>\n </div>\n {showPoweredByImage ? <PoweredBy /> : null}\n </Form>\n )}\n </Formik>\n </div>\n </Box>\n </Modal>\n )\n}\n","import { Modal as MuiModal } from '@mui/material'\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport CircularProgress from '@mui/material/CircularProgress'\nimport _map from 'lodash/map'\nimport React, { FC } from 'react'\n\nexport interface Action {\n id: string;\n label: string;\n onClick: () => void;\n disabled?: boolean;\n loading?: boolean;\n variant?: \"text\" | \"contained\" | \"outlined\";\n}\n\ninterface Props {\n onClose?: () => void;\n actions: Action[];\n modalClassName?: string;\n}\n\nconst style: React.CSSProperties = {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n minWidth: 480,\n backgroundColor: '#e3e3e3',\n border: '1px solid white',\n outline: 'none',\n padding: '14px',\n maxHeight: '85vh',\n overflow: 'auto',\n}\n\nconst Modal: FC<Props> = ({\n onClose,\n actions = [],\n children,\n modalClassName = '',\n}) => (\n <MuiModal\n open={true}\n onClose={onClose}\n aria-labelledby=\"modal-modal-title\"\n aria-describedby=\"modal-modal-description\"\n className={`confirm-modal ${modalClassName}`}\n >\n <Box style={style}>\n <div className=\"modal-body\">{children}</div>\n <div className=\"footer\">\n {_map(actions, (action: Action) => (\n <Button\n key={action.id}\n onClick={action.onClick}\n disabled={action.disabled || action.loading}\n variant={action.variant || \"text\"}\n >\n {action.loading ? <CircularProgress size=\"22px\" /> : action.label}\n </Button>\n ))}\n </div>\n </Box>\n </MuiModal>\n)\n\nexport default Modal\n","import React, { useEffect, useState } from 'react'\n\nimport Modal, { Action } from '../common/ModalComponent'\n\ninterface IDVerificationProps {\n message?: string | null;\n displayModal?: boolean;\n actions?: Action[];\n onClose?: () => void;\n}\n\nexport const VerificationPendingModal = (props: IDVerificationProps) => {\n const { message, displayModal, actions, onClose } = props\n const [showModal, setShowModal] = useState(false)\n\n useEffect(() => {\n if (displayModal === undefined) {\n setShowModal(Boolean(message))\n }\n }, [message, displayModal])\n\n return showModal || displayModal ? (\n <div>\n <Modal\n modalClassName=\"id-verification-modal\"\n actions={\n actions || [\n {\n id: 'okay',\n label: 'OK',\n variant: 'contained',\n onClick: () => {\n setShowModal(false)\n\n if (onClose) {\n onClose()\n }\n },\n },\n ]\n }\n >\n <div>{message}</div>\n </Modal>\n </div>\n ) : null\n}\n","import './style.css'\n\nimport { TextField } from '@mui/material'\nimport Box from '@mui/material/Box'\nimport Modal from '@mui/material/Modal'\nimport axios, { AxiosError } from 'axios'\nimport { Field, Form, Formik } from 'formik'\nimport _get from 'lodash/get'\nimport _identity from 'lodash/identity'\nimport React, { FC, useState } from 'react'\n\nimport {\n authorize,\n getProfileData,\n} from '../../api'\nimport { requiredValidator } from '../../validators'\nimport { PoweredBy } from '../common/PoweredBy'\n\ninterface Props {\n onClose: () => void;\n onLogin: () => void;\n alreadyHasUser?: boolean;\n userExpired?: boolean;\n onAuthorizeSuccess?: (res: any) => void;\n onAuthorizeError?: (e: AxiosError) => void;\n onGetProfileDataSuccess?: (res: any) => void;\n onGetProfileDataError?: (e: AxiosError) => void;\n onForgotPassword?: () => void;\n onSignup?: () => void;\n modalClassname?: string;\n logo?: string;\n showForgotPasswordButton?: boolean;\n showSignUpButton?: boolean;\n showPoweredByImage?: boolean;\n}\n\nconst style: React.CSSProperties = {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n minWidth: 480,\n backgroundColor: '#e3e3e3',\n border: '1px solid white',\n outline: 'none',\n}\ninterface IUserData {\n id: string;\n firstName: string;\n lastName: string;\n email: string;\n city?: string;\n country?: string;\n countryId?: string;\n phone?: string;\n streetAddress?: string;\n state?: string;\n zip?: string;\n zipCode?: string;\n stateId?: string;\n}\n\nexport const setLoggedUserData = (data: IUserData) => ({\n id: data.id,\n first_name: data.firstName,\n last_name: data.lastName,\n email: data.email,\n confirmEmail: data.email,\n city: data?.city || '',\n country: data?.countryId || data?.country || '',\n phone: data?.phone || '',\n street_address: data?.streetAddress || '',\n state: data?.stateId || '',\n zip: data?.zip || data?.zipCode || '',\n})\n\nexport const LoginModal: FC<Props> = ({\n onClose,\n onLogin,\n alreadyHasUser = false,\n userExpired = false,\n onGetProfileDataSuccess = _identity,\n onGetProfileDataError = _identity,\n onForgotPassword = _identity,\n onSignup = _identity,\n modalClassname = '',\n logo,\n showForgotPasswordButton = false,\n showSignUpButton = false,\n showPoweredByImage = false,\n}) => {\n const [error, setError] = useState('')\n return (\n <Modal\n open={true}\n onClose={onClose}\n aria-labelledby=\"modal-modal-title\"\n aria-describedby=\"modal-modal-description\"\n className={`login-modal ${modalClassname}`}\n >\n <Box style={style}>\n <div>\n <Formik\n initialValues={{ email: '', password: '' }}\n onSubmit={async ({ email, password }) => {\n try {\n const body = { email, password }\n await authorize(body)\n let profileResponse = null\n try {\n profileResponse = await getProfileData()\n onGetProfileDataSuccess(profileResponse.data)\n } catch (e) {\n if (axios.isAxiosError(e)) {\n onGetProfileDataError(e)\n }\n return\n }\n\n const profileSpecifiedData = _get(profileResponse, 'data.data')\n const profileDataObj = setLoggedUserData(profileSpecifiedData)\n if (typeof window !== 'undefined') {\n window.localStorage.setItem(\n 'user_data',\n JSON.stringify(profileDataObj)\n )\n const event = new window.CustomEvent('tf-login')\n window.document.dispatchEvent(event)\n }\n onLogin()\n } catch (e) {\n if (axios.isAxiosError(e)) {\n const error = e?.response?.data?.message || 'Error'\n setError(error)\n } else if (e instanceof Error) {\n setError(e?.message || 'Error')\n }\n }\n }}\n >\n {props => (\n <Form onSubmit={props.handleSubmit}>\n <div className=\"modal-title\">Login</div>\n <div className='login-logo-container'>\n <img\n className=\"login-logo-tff\"\n src={logo || \"https://www.ticketfairy.com/resources/images/logo-ttf-black.svg\"}\n alt=\"logo\"\n />\n </div>\n <div className=\"server_auth__error\">{error}</div>\n {alreadyHasUser && (\n <p className=\"info-text-for-login\">\n It appears this email is already attached to an account.\n Please log in here to complete your registration.\n </p>\n )}\n {userExpired && (\n <p className=\"info-text-for-login\">\n Your session has expired, please log in again.\n </p>\n )}\n <div className=\"login-modal-body\">\n <div className=\"login-modal-body__email\">\n <Field name={'email'} validate={requiredValidator}>\n {({ field, meta }: { [key: string]: any }) => (\n <TextField\n label={'Email'}\n type={'email'}\n fullWidth\n error={!!meta.error && meta.touched}\n helperText={meta.touched && meta.error}\n {...field}\n />\n )}\n </Field>\n </div>\n <div className=\"login-modal-body__password\">\n <Field name={'password'} validate={requiredValidator}>\n {({ field, meta }: { [key: string]: any }) => (\n <TextField\n label=\"Password\"\n type=\"password\"\n fullWidth\n error={!!meta.error && meta.touched}\n helperText={meta.touched && meta.error}\n {...field}\n />\n )}\n </Field>\n </div>\n <div className=\"login-action-button\">\n <button type=\"submit\">Login</button>\n </div>\n {showForgotPasswordButton && (\n <div className=\"forgot-password\">\n <span aria-hidden=\"true\" onClick={onForgotPassword}>Forgot password?</span>\n </div>\n )}\n {showSignUpButton && (\n <div className=\"forgot-password\">\n <span aria-hidden=\"true\" onClick={onSignup}>Sign up</span>\n </div>\n )}\n {showPoweredByImage ? <PoweredBy /> : null}\n </div>\n </Form>\n )}\n </Formik>\n </div>\n </Box>\n </Modal>\n )\n}\n","import './style.css'\n\nimport { Box, CircularProgress,Modal } from '@mui/material'\nimport axios, { AxiosError } from 'axios'\nimport { Field, Form, Formik } from 'formik'\nimport _get from 'lodash/get'\nimport React, { FC, useState } from 'react'\nimport * as Yup from 'yup'\n\nimport { handleSetAccessToken,register } from '../../api'\nimport { CONFIGS } from '../../utils'\nimport { CustomField } from '../common/CustomField'\nimport { PoweredBy } from '../common/PoweredBy'\n\ninterface ISignupProps {\n onClose: () => void;\n onLogin: () => void;\n onRegisterSuccess: (value: {\n accessToken: string;\n refreshToken: string;\n }) => void;\n onRegisterError: (e: AxiosError, email: string) => void;\n showPoweredByImage?: boolean;\n}\n\ninterface ValuesTypes {\n firstName: string;\n lastName: string;\n email: string;\n password: string;\n confirmPassword: string;\n}\n\nconst style: React.CSSProperties = {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n minWidth: 480,\n backgroundColor: '#fff',\n border: '1px solid white',\n outline: 'none',\n padding: '14px',\n}\n\nconst SignupSchema = Yup.object().shape({\n firstName: Yup.string().required('Required'),\n lastName: Yup.string().required('Required'),\n email: Yup.string()\n .email('Invalid email')\n .required('Required'),\n password: Yup.string()\n .min(6, 'Password must have 5+ characters')\n .required('Required'),\n confirmPassword: Yup.string()\n .required('Required')\n .oneOf([Yup.ref('password'), null], 'Passwords must match'),\n})\n\nexport const SignupModal: FC<ISignupProps> = ({\n onClose = () => {},\n onLogin = () => {},\n onRegisterSuccess = () => {},\n onRegisterError = () => {},\n showPoweredByImage = false,\n}) => {\n const [loading, setLoading] = useState(false)\n\n const onSignup = async (values: ValuesTypes) => {\n try {\n setLoading(true)\n const formData = new FormData()\n formData.set('first_name', values.firstName)\n formData.set('last_name', values.lastName)\n formData.set('email', values.email)\n formData.set('password', values.password)\n formData.set('password_confirmation', values.confirmPassword)\n formData.append(\n 'client_id',\n CONFIGS.CLIENT_ID || 'e9d8f8922797b4621e562255afe90dbf'\n )\n formData.append(\n 'client_secret',\n CONFIGS.CLIENT_SECRET || 'b89c191eff22fdcf84ac9bfd88d005355a151ec2c83b26b9'\n )\n\n const res = await register(formData)\n\n const access_token_register = _get(\n res,\n 'data.data.attributes.access_token'\n )\n const refreshToken = _get(\n res,\n 'data.data.attributes.refresh_token'\n )\n handleSetAccessToken(access_token_register)\n\n const tokens = {\n accessToken: access_token_register,\n refreshToken,\n }\n onRegisterSuccess(tokens)\n onClose()\n } catch (e) {\n if (axios.isAxiosError(e)) {\n onRegisterError(e, values.email)\n }\n } finally {\n setLoading(false)\n }\n }\n\n const _onClose = loading ? () => {} : onClose\n\n return (\n <Modal\n open={true}\n onClose={_onClose}\n aria-labelledby=\"modal-modal-title\"\n aria-describedby=\"modal-modal-description\"\n className=\"signup-modal\"\n >\n <Box style={style}>\n <div>\n <Formik\n initialValues={{\n firstName: '',\n lastName: '',\n email: '',\n password: '',\n confirmPassword: '',\n }}\n validationSchema={SignupSchema}\n onSubmit={onSignup}\n >\n {({ isValid, dirty, handleSubmit }) => (\n <Form onSubmit={handleSubmit}>\n <div className=\"signup-container\">\n <div className=\"title\">Create an Account</div>\n <div className=\"signup-container__twoFields\">\n <div className=\"is-half\">\n <Field\n name=\"firstName\"\n label=\"First Name\"\n component={CustomField}\n />\n </div>\n <div className=\"is-half\">\n <Field\n name=\"lastName\"\n label=\"Last Name\"\n component={CustomField}\n />\n </div>\n </div>\n <div className=\"signup-container__singleField\">\n <div className=\"\">\n <Field\n name=\"email\"\n label=\"Email\"\n component={CustomField}\n />\n </div>\n </div>\n <div className=\"signup-container__twoFields\">\n <div className=\"is-half\">\n <Field\n name=\"password\"\n label=\"Password\"\n type=\"password\"\n component={CustomField}\n />\n </div>\n <div className=\"is-half\">\n <Field\n name=\"confirmPassword\"\n label=\"Confirm Password\"\n type=\"password\"\n component={CustomField}\n />\n </div>\n </div>\n </div>\n <div className=\"signup-action-button\">\n <button type=\"submit\" disabled={!(isValid && dirty)}>\n {loading ? <CircularProgress size=\"22px\" /> : 'Submit'}\n </button>\n </div>\n <div className=\"login\">\n <span onClick={onLogin}>Login</span>\n </div>\n {showPoweredByImage ? <PoweredBy /> : null}\n </Form>\n )}\n </Formik>\n </div>\n </Box>\n </Modal>\n )\n}\n","import _isNumber from 'lodash/isNumber'\n\nexport const showZero = (value = 0) => {\n const intNumber = Number(value)\n return _isNumber(intNumber)\n ? intNumber >= 0 && intNumber < 10\n ? '0' + intNumber\n : intNumber\n : null\n}\n","import './style.css'\n\nimport React, { memo,useState } from 'react'\nimport Countdown from 'react-countdown'\nimport SVG from 'react-inlinesvg'\n\nimport Cross from '../../assets/images/cross.svg'\nimport { showZero } from '../../utils/showZero'\n\nexport interface ITimerWidgetPage {\n expires_at: number;\n buyLoading?: boolean;\n onCountdownFinish?: () => void;\n}\n\nexport interface IRenderer {\n minutes: number;\n seconds: number;\n completed: number;\n handleCountdownFinish: () => void;\n}\n\nconst TimerWidget = ({\n expires_at,\n buyLoading,\n onCountdownFinish = () => {},\n}: ITimerWidgetPage) => {\n const [showTimer, setShowTimer] = useState(true)\n\n const handleCountdownFinish = () => {\n setShowTimer(false)\n if (!buyLoading) {\n onCountdownFinish()\n }\n }\n\n const renderer = ({\n minutes,\n seconds,\n completed,\n handleCountdownFinish,\n }: IRenderer) => {\n if (completed) {\n handleCountdownFinish()\n return null\n }\n return (\n <span>\n {showZero(minutes)}:{showZero(seconds)}\n </span>\n )\n }\n\n const hideTimer = () => {\n const timerRl: HTMLElement | null = document.querySelector('.timer')\n if(timerRl) {\n timerRl.style.visibility = \"hidden\"\n }\n }\n\n return showTimer && !!expires_at ? (\n <div className=\"timer\">\n <div className='close-icon' onClick={hideTimer}>\n <SVG\n src={Cross}\n width='10'\n height='10'\n fill='#fff'\n />\n </div>\n <div className=\"toast-message\">\n <p>Please complete your purchase before the timer reaches zero.</p>\n <p className=\"countdown\">\n <Countdown\n date={Date.now() + expires_at * 1000}\n renderer={(props: any) =>\n renderer({\n ...props,\n handleCountdownFinish,\n })\n }\n />\n </p>\n </div>\n </div>\n ) : null\n}\n\nexport default memo(TimerWidget)\n","import { FormControl, FormHelperText } from '@mui/material'\nimport Checkbox from '@mui/material/Checkbox'\nimport FormControlLabel from '@mui/material/FormControlLabel'\nimport FormGroup from '@mui/material/FormGroup'\nimport { useTheme } from '@mui/styles'\nimport { FieldInputProps } from 'formik'\nimport React from 'react'\n\nexport interface ICheckboxField {\n label: string | number | JSX.Element;\n field?: FieldInputProps<any>;\n}\n\ninterface IOtherProps {\n [key: string]: any;\n}\n\nexport const CheckboxField = ({\n label,\n field,\n selectOptions,\n theme,\n setFieldValue,\n disableDropdown,\n setPhoneValidationIsLoading,\n defaultCountry,\n required,\n uniqueId,\n dateFormat,\n datePlaceholder,\n ...rest\n}: ICheckboxField & IOtherProps) => {\n const customTheme: any = useTheme()\n return (\n <FormControl\n error={!!(rest?.form?.errors && rest.form.errors[field?.name ?? ''])}\n >\n <FormGroup>\n <FormControlLabel\n control={<Checkbox {...field} {...rest} />}\n label={label}\n componentsProps={{\n typography: customTheme?.checkbox,\n }}\n />\n </FormGroup>\n {!!(rest?.form?.errors && rest.form.errors[field?.name ?? '']) ? (\n <FormHelperText>Required</FormHelperText>\n ) : null}\n </FormControl>\n )\n}\n","import { FieldInputProps, FormikProps } from 'formik'\nimport _debounce from 'lodash/debounce'\nimport _get from 'lodash/get'\nimport MuiPhoneNumber from 'material-ui-phone-number'\nimport React, { useCallback, useEffect } from 'react'\n\nimport { validatePhoneNumber } from '../../api'\n\nexport interface IPhoneNumberField {\n label: string;\n field: FieldInputProps<any>;\n form: FormikProps<any>;\n type: string;\n disableDropdown: boolean;\n fill: boolean;\n setPhoneValidationIsLoading: (isLoading: boolean) => void;\n\n // optional\n defaultCountry?: string;\n isCountryCodeEditable?: boolean;\n}\n\nexport const PhoneNumberField = ({\n label,\n field,\n form: {\n errors,\n touched,\n setFieldError,\n values,\n initialValues,\n setFieldValue,\n setFieldTouched,\n setErrors,\n },\n disableDropdown = true,\n defaultCountry = 'us',\n fill = false,\n setPhoneValidationIsLoading,\n isCountryCodeEditable,\n}: IPhoneNumberField) => {\n const error = _get(errors, field.name)\n const isTouched = Boolean(_get(touched, field.name))\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debounceCb = useCallback(\n _debounce((cb: () => void) => void cb(), 1000),\n []\n )\n\n useEffect(() => {\n if (field.value) {\n setPhoneValidationIsLoading(true)\n }\n\n debounceCb(async () => {\n try {\n if (!values[field.name]) {\n const newErrors = { ...errors }\n delete newErrors[field.name]\n setErrors(newErrors)\n return\n }\n if (values[field.name]) {\n await validatePhoneNumber(values[field.name])\n }\n if (errors[field.name]) {\n const newErrors = { ...errors }\n delete newErrors[field.name]\n setErrors(newErrors)\n }\n } catch (error) {\n const message = _get(\n error,\n 'response.data.message',\n 'Invalid phone number'\n )\n if (values[field.name] && errors[field.name] !== message) {\n setFieldError(field.name, message)\n }\n } finally {\n setPhoneValidationIsLoading(false)\n }\n })\n // eslint-disable-next-line\n }, [field.value])\n\n return (\n <>\n <MuiPhoneNumber\n name={field.name}\n value={fill ? values[field.name] : initialValues[field.name]}\n onChange={(value: any, country?: any) => {\n if (`+${country?.dialCode}` === value || value === '+') {\n setFieldValue(field.name, '')\n setFieldError(field.name, '')\n } else {\n setFieldTouched(field.name, true)\n setFieldValue(field.name, value)\n }\n }}\n variant=\"outlined\"\n defaultCountry={defaultCountry}\n disableDropdown={disableDropdown}\n label={label}\n error={!!error && (isTouched || fill)}\n helperText={(isTouched || fill) && error}\n fullWidth\n autoFormat={false}\n disableAreaCodes={true}\n countryCodeEditable={isCountryCodeEditable}\n />\n </>\n )\n}\n","import CircularProgress from '@mui/material/CircularProgress'\nimport React from 'react'\n\nexport const Loader = () => (\n <div className=\"loader-container\">\n <CircularProgress />\n </div>\n)\n","import { FormControl, FormHelperText, InputLabel } from '@mui/material'\nimport Select from '@mui/material/Select'\nimport { useTheme } from '@mui/styles'\nimport { FieldInputProps, FormikProps } from 'formik'\nimport _get from 'lodash/get'\nimport _map from 'lodash/map'\nimport React from 'react'\n\nexport interface ISelectOption {\n label: string | number;\n value?: string | number;\n [key: string]: any;\n}\n\nexport interface ISelectField {\n label: string;\n\n field: FieldInputProps<any>;\n form: FormikProps<any>;\n theme: 'dark' | 'light';\n\n // optional\n type?: string;\n selectOptions?: ISelectOption[];\n onChange?: (e: any) => void;\n}\n\ninterface IOtherProps {\n [key: string]: any;\n}\n\nexport const NativeSelectField = ({\n label,\n type = 'text',\n field,\n selectOptions = [] as ISelectOption[],\n form: { touched, errors, setFieldValue },\n theme,\n onChange = () => {},\n}: ISelectField & IOtherProps) => {\n const isTouched = Boolean(_get(touched, field.name))\n const error = _get(errors, field.name)\n\n const customTheme: any = useTheme()\n\n return (\n <FormControl fullWidth={true}>\n <InputLabel\n style={customTheme?.input}\n htmlFor={field.name}\n error={!!error && isTouched}\n shrink={true}\n >\n {label}\n </InputLabel>\n <Select\n id={field.name}\n label={label}\n type={type}\n fullWidth={true}\n error={!!error && isTouched}\n inputProps={{\n id: field.name,\n }}\n native={true}\n className={theme}\n MenuProps={{ className: theme }}\n {...field}\n style={customTheme?.input}\n onChange={e => {\n onChange(e)\n setFieldValue(field.name, e.target.value)\n }}\n >\n {_map(selectOptions, option => (\n <option\n key={option.value}\n value={option.value}\n disabled={option.disabled}\n >\n {option.label}\n </option>\n ))}\n </Select>\n {isTouched && error ? (\n <FormHelperText error={!!error && isTouched}>{error}</FormHelperText>\n ) : null}\n </FormControl>\n )\n}\n","import FormControl from '@mui/material/FormControl'\nimport FormControlLabel from '@mui/material/FormControlLabel'\nimport FormHelperText from '@mui/material/FormHelperText'\nimport FormLabel from '@mui/material/FormLabel'\nimport Radio from '@mui/material/Radio'\nimport RadioGroup from '@mui/material/RadioGroup'\nimport { FieldInputProps, FormikProps } from 'formik'\nimport _get from 'lodash/get'\nimport _identity from 'lodash/identity'\nimport React from 'react'\n\nexport interface IRadio {\n id: string | number;\n label: string | number;\n value: string | number;\n [key: string]: any;\n}\n\nexport interface IRadioGroupField {\n label?: string;\n field: FieldInputProps<any>;\n form: FormikProps<any>;\n radios: IRadio[];\n disabled?: boolean;\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n}\n\nexport const RadioGroupField = ({\n label,\n field,\n radios,\n disabled,\n form: { touched, errors, setFieldValue },\n onChange = _identity,\n}: IRadioGroupField) => {\n const radioId = `radio-${field.name}`\n const error = _get(errors, field.name)\n const isTouched = Boolean(_get(touched, field.name))\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const { value } = e.target as HTMLInputElement\n setFieldValue(field.name, value)\n onChange(e)\n }\n\n if (!radios) return null\n\n return (\n <FormControl disabled={disabled} error={isTouched && Boolean(error)}>\n {isTouched && Boolean(error) ? (\n <FormHelperText className=\"radio-error\" error>\n {error}\n </FormHelperText>\n ) : null}\n {label && <FormLabel id={radioId}>{label}</FormLabel>}\n <RadioGroup\n aria-labelledby={radioId}\n name={field.name}\n value={field.value}\n onChange={handleChange}\n >\n {radios.map(radio => {\n const { id, label, value } = radio\n return (\n <FormControlLabel\n key={id}\n label={label}\n value={value}\n control={<Radio />}\n />\n )\n })}\n </RadioGroup>\n </FormControl>\n )\n}\n","import { FormControl, InputLabel } from '@mui/material'\nimport Checkbox from '@mui/material/Checkbox'\nimport FormHelperText from '@mui/material/FormHelperText'\nimport ListItemText from '@mui/material/ListItemText'\nimport MenuItem from '@mui/material/MenuItem'\nimport OutlinedInput from '@mui/material/OutlinedInput'\nimport Select, { SelectChangeEvent } from '@mui/material/Select'\nimport { FieldInputProps, FormikProps } from 'formik'\nimport _get from 'lodash/get'\nimport _identity from 'lodash/identity'\nimport _map from 'lodash/map'\nimport React from 'react'\n\ninterface ISelectOption {\n id: string | number;\n label: string | number;\n value: string | number;\n}\n\ninterface ISelectField {\n field: FieldInputProps<any>;\n form: FormikProps<any>;\n options: ISelectOption[];\n\n // optional\n label?: string;\n isMultiple?: boolean;\n disabled?: boolean;\n onChange?: (e: SelectChangeEvent<string[]>) => void;\n}\n\nfunction SelectField({\n label,\n isMultiple,\n field,\n form: { touched, errors, setFieldValue },\n options = [],\n disabled,\n onChange = _identity,\n}: ISelectField) {\n const { name, value } = field\n const selectId = `select-field-${name}`\n const error = _get(errors, name)\n const isTouched = Boolean(_get(touched, field.name))\n\n const handleChange = (event: SelectChangeEvent<string[]>) => {\n const {\n target: { value },\n } = event\n\n setFieldValue(name, value)\n onChange(event)\n }\n\n const getSelectedItemLabel = (selectedValue: any) => {\n const selectedItem = options.find(option => option.value === selectedValue)\n const label = _get(selectedItem, 'label', '')\n return label\n }\n\n return (\n <>\n <FormControl\n fullWidth={true}\n disabled={disabled}\n error={isTouched && Boolean(error)}\n >\n {label && <InputLabel id={selectId}>{label}</InputLabel>}\n <Select\n id={name}\n labelId={selectId}\n multiple={isMultiple}\n value={value || []}\n onChange={handleChange}\n input={<OutlinedInput label={label} />}\n renderValue={selected => {\n if (isMultiple) {\n const selectedLabels = _map(selected, (selectedValue: string) =>\n getSelectedItemLabel(selectedValue)\n )\n return selectedLabels.join(', ')\n }\n\n const selectedLabel = getSelectedItemLabel(selected)\n return selectedLabel\n }}\n sx={{ textAlign: 'start' }}\n >\n {options.map((option: ISelectOption) => (\n <MenuItem key={option.label} value={option.value}>\n {isMultiple && (\n <Checkbox checked={value.indexOf(option.value) > -1} />\n )}\n <ListItemText primary={option.label} />\n </MenuItem>\n ))}\n </Select>\n {isTouched && Boolean(error) ? (\n <FormHelperText error>{error}</FormHelperText>\n ) : null}\n </FormControl>\n </>\n )\n}\n\nexport { SelectField }\n","import { createTheme, ThemeProvider } from '@mui/material/styles'\nimport { DatePicker } from '@mui/x-date-pickers'\nimport { AdapterMoment } from '@mui/x-date-pickers/AdapterMoment'\nimport { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'\nimport { FieldInputProps, FormikProps } from 'formik'\nimport React from 'react'\n\nimport { CustomField } from './CustomField'\n\nconst DATE_SIZE = 32\nconst compactStyles = {\n '& > div': {\n minWidth: 256,\n },\n '& > div > div, & > div > div > div, & .MuiCalendarPicker-root': {\n width: 256,\n },\n '& .MuiTypography-caption': {\n width: DATE_SIZE,\n margin: 0,\n },\n '& .PrivatePickersSlideTransition-root': {\n minHeight: DATE_SIZE * 6,\n },\n '& .PrivatePickersSlideTransition-root [role=\"row\"]': {\n margin: 0,\n },\n '& .MuiPickersDay-dayWithMargin': {\n margin: 0,\n },\n '& .MuiPickersDay-root': {\n width: DATE_SIZE,\n height: DATE_SIZE,\n },\n '& .MuiPickersArrowSwitcher-spacer': {\n width: 0,\n },\n '& [role=\"presentation\"] .PrivatePickersFadeTransitionGroup-root': {\n marginRight: -1,\n },\n}\n\nconst compactStyleTheme = createTheme({\n components: {\n MuiPaper: {\n defaultProps: {\n sx: compactStyles,\n },\n },\n },\n})\n\nexport interface IDatePickerFieldProps {\n label: string;\n\n field: FieldInputProps<any>;\n form: FormikProps<any>;\n theme: 'dark' | 'light';\n\n useCompact?: boolean;\n}\n\ninterface IOtherProps {\n [key: string]: any;\n}\n\nexport const DatePickerField = ({\n label,\n field,\n form,\n theme,\n useCompact = true,\n dateFormat = 'DD/MM/YYYY',\n placeholder = 'dd/mm/yyyy',\n}: IDatePickerFieldProps & IOtherProps) => (\n <ThemeProvider theme={useCompact ? compactStyleTheme : {}}>\n <LocalizationProvider dateAdapter={AdapterMoment}>\n <DatePicker\n value={field.value || ''}\n onChange={value => form.setFieldValue(field.name, value)}\n PopperProps={{\n placement: 'bottom-start',\n }}\n showDaysOutsideCurrentMonth={true}\n disableFuture={true}\n inputFormat={dateFormat}\n mask=\"__/__/____\"\n renderInput={(params: any) => (\n <CustomField\n {...params}\n inputProps={{ ...params.inputProps, placeholder }}\n theme={theme}\n field={{\n ...field,\n onChange: (\n evt: React.FormEvent<HTMLInputElement | HTMLTextAreaElement>\n ) => {\n if (params.inputProps && params.inputProps.onChange) {\n params.inputProps.onChange(evt)\n }\n },\n }}\n form={form}\n label={label}\n type=\"tel\"\n />\n )}\n />\n </LocalizationProvider>\n </ThemeProvider>\n)\n","import { FormikErrors, FormikValues } from 'formik'\nimport _flatMapDeep from 'lodash/flatMapDeep'\nimport _forEach from 'lodash/forEach'\nimport _get from 'lodash/get'\nimport _isArray from 'lodash/isArray'\nimport _map from 'lodash/map'\nimport { nanoid } from 'nanoid'\nimport React from 'react'\n\nimport { IGroupItem } from '../../types'\nimport { CONFIGS } from '../../utils'\nimport { getQueryVariable } from '../../utils/getQueryVariable'\nimport { combineValidators, requiredValidator } from '../../validators'\nimport {\n CheckboxField,\n CustomField,\n DatePickerField,\n PhoneNumberField,\n RadioGroupField,\n SelectField,\n} from '../common/index'\n\nexport interface ILoggedInValues {\n emailLogged?: string;\n firstNameLogged?: string;\n lastNameLogged?: string;\n}\n\nexport interface IValues {\n [key: string]: any;\n}\n\nexport const getInitialValues = (\n data: any = [],\n propsInitialValues: IValues = {},\n userValues: any = {}\n): IValues => {\n const results = _flatMapDeep(data, ({ fields }) =>\n _map(fields, ({ groupItems }) =>\n _map(groupItems, ({ name, value }) => ({ name, value }))\n )\n )\n\n const initialValues: IValues = {}\n _forEach(results, groupItem => {\n const { name, value } = groupItem\n initialValues[name] =\n value || propsInitialValues[name] || userValues[name] || ''\n })\n\n // set logged in user as first ticket holder\n initialValues['holderFirstName-0'] =\n propsInitialValues.firstName || userValues.firstName || ''\n initialValues['holderLastName-0'] =\n propsInitialValues.lastName || userValues.lastName || ''\n initialValues['holderEmail-0'] =\n propsInitialValues.email || userValues.email || ''\n\n return initialValues\n}\n\nexport const createRegisterFormData = (\n values: IValues = {},\n checkoutBody: { attributes: { [key: string]: any } },\n flagFreeTicket = false\n): FormData => {\n const bodyFormData = new FormData()\n bodyFormData.append('first_name', values.firstName)\n bodyFormData.append('last_name', values.lastName)\n bodyFormData.append('email', values.email)\n bodyFormData.append('password', values.password)\n bodyFormData.append('password_confirmation', values.confirmPassword)\n bodyFormData.append(\n 'client_id',\n CONFIGS.CLIENT_ID || 'e9d8f8922797b4621e562255afe90dbf'\n )\n bodyFormData.append(\n 'client_secret',\n CONFIGS.CLIENT_SECRET || 'b89c191eff22fdcf84ac9bfd88d005355a151ec2c83b26b9'\n )\n bodyFormData.append('check_cart_expiration', 'true')\n\n _forEach(checkoutBody.attributes, (item: any, key: string) => {\n if (\n !(\n flagFreeTicket &&\n ['country', 'state', 'city', 'street_address', 'zip'].includes(key)\n )\n ) {\n bodyFormData.append(key, item)\n }\n })\n\n return bodyFormData\n}\n\ninterface ICheckoutBody {\n attributes: {\n [key: string]: any;\n };\n}\n\ninterface IUserData {\n id: string;\n firstName: string;\n lastName: string;\n email: string;\n city?: string;\n country?: string;\n countryId?: string;\n phone?: string;\n streetAddress?: string;\n state?: string;\n zip?: string;\n zipCode?: string;\n stateId?: string;\n}\n\ninterface IticketHolder {\n first_name?: string;\n last_name?: string;\n phone?: string;\n email?: string;\n}\n\nexport const setLoggedUserData = (data: IUserData) => ({\n id: data.id,\n first_name: data.firstName,\n last_name: data.lastName,\n email: data.email,\n confirmEmail: data.email,\n city: data?.city || '',\n country: data?.countryId || data?.country || '',\n phone: data?.phone || '',\n street_address: data?.streetAddress || '',\n state: data?.stateId || '',\n zip: data?.zip || data?.zipCode || '',\n})\n\nexport const createCheckoutDataBody = (\n ticketsQuantity: number,\n values: IValues = {},\n logedInValues: ILoggedInValues = {},\n includeDob = false\n): ICheckoutBody => {\n const {\n firstName,\n lastName,\n holderAge,\n confirmEmail,\n confirmPassword,\n ...restValues\n } = values\n\n const holders = []\n let ticket_holders: IticketHolder[] = []\n\n for (let i = 0; i <= ticketsQuantity; i++) {\n const individualHolder = Object.fromEntries(\n Object.entries(values).filter(([key, _val]) => key.includes(String(i)))\n )\n holders.push(individualHolder)\n }\n\n const filteredHolders = holders.filter(\n holder => Object.entries(holder).length > 0\n )\n ticket_holders = filteredHolders.map((item, index) => ({\n first_name: !index\n ? item[`holderFirstName-${index}`] || logedInValues.firstNameLogged || ''\n : item[`holderFirstName-${index}`] || '',\n last_name: !index\n ? item[`holderLastName-${index}`] || logedInValues.lastNameLogged || ''\n : item[`holderLastName-${index}`] || '',\n phone: item[`holderPhone-${index}`] || '',\n email: !index\n ? item[`holderEmail-${index}`] || logedInValues.emailLogged || ''\n : item[`holderEmail-${index}`] || '',\n }))\n\n const filteredRestValue: { [key: string]: any } = {}\n _forEach(restValues, (value, key) => {\n if (!key.includes('holder')) {\n filteredRestValue[key] = value\n }\n })\n\n const body: ICheckoutBody = {\n attributes: {\n ...filteredRestValue,\n email: restValues.email || logedInValues.emailLogged,\n confirm_email: restValues.email || logedInValues.emailLogged,\n first_name: firstName || logedInValues.firstNameLogged,\n last_name: lastName || logedInValues.lastNameLogged,\n ticket_holders,\n },\n }\n\n if (includeDob) {\n const holderAgeDate = new Date(holderAge)\n body.attributes.dob_day = holderAgeDate.getDate()\n body.attributes.dob_month = holderAgeDate.getMonth() + 1\n body.attributes.dob_year = holderAgeDate.getFullYear()\n }\n return body\n}\n\nexport const getValidateFunctions = (\n element: IGroupItem,\n states: Array<{ [key: string]: any }>,\n values: FormikValues,\n errors: FormikErrors<any>\n) => {\n const validationFunctions: any[] = []\n\n if (element.required) {\n if (\n element.name !== 'state' ||\n (element.name === 'state' && states.length)\n ) {\n validationFunctions.push(requiredValidator)\n }\n }\n\n if (element.onValidate) {\n validationFunctions.push(element.onValidate)\n }\n\n if (element.name === 'phone') {\n const invalidPhone = () =>\n errors.phone === 'Invalid phone number' ? 'Invalid phone number' : null\n validationFunctions.push(invalidPhone)\n }\n\n if (element.name === 'confirmEmail') {\n const isSameEmail = (confirmEmail?: string) =>\n values.email !== confirmEmail\n ? 'Please confirm your email address correctly'\n : null\n validationFunctions.push(isSameEmail)\n }\n\n if (element.name === 'confirmPassword') {\n const isSame = (confirmPassword?: string) =>\n values.password !== confirmPassword\n ? 'Password confirmation does not match'\n : null\n validationFunctions.push(isSame)\n }\n\n return combineValidators(...validationFunctions)\n}\n\nexport const assingUniqueIds = (data: any): any => {\n if (_get(data[0], 'uniqueId')) {\n return data\n }\n\n return _map(data, (item: any) => {\n _forEach(item, (itemValue: string, key) => {\n if (\n _isArray(itemValue) &&\n !itemValue.some(item => typeof item === 'string')\n ) {\n item[key] = assingUniqueIds(itemValue)\n }\n })\n\n return { ...item, uniqueId: nanoid() }\n })\n}\n\nexport const isRequiredField = (element: IGroupItem) => {\n const flagRequirePhone = getQueryVariable('phone_required') === 'true'\n const collectMandatoryWalletAddress =\n getQueryVariable('collect_mandatory_wallet_address') === 'true'\n const { name, required } = element\n\n if (\n required ||\n (name === 'phone' && flagRequirePhone) ||\n (name === 'data_capture[wallet_address]' && !collectMandatoryWalletAddress)\n ) {\n return true\n }\n\n return false\n}\n\nexport const getFieldLabel = (element: IGroupItem) => {\n if (isRequiredField(element) || React.isValidElement(element.label)) {\n return element.label\n }\n\n return `${element.label} (optional)`\n}\n\nexport const getFieldComponent = (element: IGroupItem) => {\n const type = _get(element, 'type', 'text')\n\n const fieldComponentConfigs = {\n checkbox: CheckboxField,\n select: CustomField, // Temp change untill refactoring\n select_multi: SelectField,\n phone: PhoneNumberField,\n date: DatePickerField,\n radio: RadioGroupField,\n text: CustomField,\n }\n\n const fieldComponent = _get(fieldComponentConfigs, type, CustomField)\n return fieldComponent\n}\n","import './style.css'\n\nimport { CircularProgress, ThemeOptions } from '@mui/material'\nimport Backdrop from '@mui/material/Backdrop'\nimport Button from '@mui/material/Button'\nimport { createTheme, ThemeProvider } from '@mui/material/styles'\nimport { CSSProperties } from '@mui/styles'\nimport axios, { AxiosError } from 'axios'\nimport {\n Field,\n Form,\n Formik,\n FormikHelpers,\n FormikProps,\n FormikValues,\n} from 'formik'\nimport _find from 'lodash/find'\nimport _get from 'lodash/get'\nimport _identity from 'lodash/identity'\nimport _includes from 'lodash/includes'\nimport _isEmpty from 'lodash/isEmpty'\nimport _isEqual from 'lodash/isEqual'\nimport _map from 'lodash/map'\nimport { nanoid } from 'nanoid'\nimport React, { FC, useEffect, useRef, useState } from 'react'\n\nimport {\n getCart,\n getCountries,\n getProfileData,\n getStates,\n postOnCheckout,\n register,\n setCustomHeader,\n} from '../../api'\nimport { usePixel } from '../../hooks/usePixel'\nimport { IBillingInfoData } from '../../types'\nimport {\n createCheckoutDataBodyWithDefaultHolder,\n deleteCookieByName,\n getCookieByName,\n isBrowser,\n} from '../../utils'\nimport { ErrorFocus } from '../../utils/formikErrorFocus'\nimport { getQueryVariable } from '../../utils/getQueryVariable'\nimport { combineValidators, requiredValidator } from '../../validators'\nimport SnackbarAlert from '../common/SnackbarAlert'\nimport { ForgotPasswordModal } from '../forgotPasswordModal'\nimport { VerificationPendingModal } from '../idVerificationContainer/VerificationPendingModal'\nimport { LoginModal } from '../loginModal'\nimport { SignupModal } from '../signupModal'\nimport TimerWidget from '../timerWidget'\nimport {\n assingUniqueIds,\n createCheckoutDataBody,\n createRegisterFormData,\n getFieldComponent,\n getFieldLabel,\n getInitialValues,\n getValidateFunctions,\n setLoggedUserData,\n} from './utils'\n\nexport interface IBillingInfoPage {\n data?: IBillingInfoData[];\n ticketHoldersFields?: IBillingInfoData;\n handleSubmit?: (\n values: FormikValues,\n formikHelpers: FormikHelpers<FormikValues>,\n eventId: any,\n res: any\n ) => void;\n onRegisterSuccess?: (value: any) => void;\n onRegisterError?: (e: AxiosError, email: string) => void;\n onSubmitError?: (e: AxiosError) => void;\n onGetCartSuccess?: (res: any) => void;\n onGetCartError?: (e: AxiosError) => void;\n onGetCountriesSuccess?: (res: any) => void;\n onGetCountriesError?: (e: AxiosError) => void;\n onGetStatesSuccess?: (res: any) => void;\n onGetStatesError?: (e: AxiosError) => void;\n onGetProfileDataSuccess?: (res: any) => void;\n onGetProfileDataError?: (e: AxiosError) => void;\n onAuthorizeSuccess?: () => void;\n onAuthorizeError?: (e: AxiosError) => void;\n onLogin?: () => void;\n onLoginSuccess?: () => void;\n onErrorClose?: () => void;\n initialValues?: FormikValues;\n buttonName?: string;\n theme?: 'light' | 'dark';\n isLoggedIn?: boolean;\n accountInfoTitle?: string | JSX.Element;\n hideLogo?: boolean;\n themeOptions?: ThemeOptions & {\n input?: CSSProperties;\n checkbox?: CSSProperties;\n };\n hideErrorsAlertSection?: boolean;\n onSkipBillingPage: (data: any) => void;\n skipPage?: boolean;\n canSkipHolderNames?: boolean;\n shouldFetchCountries?: boolean;\n onForgotPasswordSuccess?: (res: any) => void;\n onForgotPasswordError?: (e: AxiosError) => void;\n onCountdownFinish?: () => void;\n enableTimer?: boolean;\n logo?: string;\n showForgotPasswordButton?: boolean;\n showSignUpButton?: boolean;\n brandOptIn?: boolean;\n showPoweredByImage?: boolean;\n isCountryCodeEditable?: boolean;\n\n onPendingVerification?: () => void;\n}\n\nconst LogicRunner: FC<{\n brandOptIn?: boolean;\n values: any;\n setStates: React.Dispatch<any>;\n setFieldValue: any;\n setValues: any;\n setUserValues: any;\n onGetStatesSuccess: any;\n onGetStatesError: any;\n shouldFetchCountries: boolean;\n}> = ({\n values,\n setStates,\n setFieldValue,\n setValues,\n setUserValues,\n onGetStatesSuccess,\n onGetStatesError,\n shouldFetchCountries,\n brandOptIn,\n}) => {\n const prevCountry = useRef(values.country)\n useEffect(() => {\n const fetchStates = async () => {\n try {\n const res = await getStates(values.country)\n const mappedStates = _map(_get(res, 'data.data'), (item, key) => ({\n label: item,\n value: key,\n }))\n setStates(mappedStates)\n if (prevCountry.current !== values.country) {\n const stateExists = mappedStates.find(\n state => state.value === values.state\n )?.value\n setFieldValue('state', stateExists ?? mappedStates[0]?.value ?? '')\n prevCountry.current = values.country\n }\n onGetStatesSuccess(res.data)\n } catch (e) {\n if (axios.isAxiosError(e)) {\n onGetStatesError(e)\n }\n }\n }\n shouldFetchCountries && fetchStates()\n }, [values.country, setStates, setFieldValue])\n const userDataEncoded =\n typeof window !== 'undefined'\n ? window.localStorage.getItem('user_data')\n : ''\n useEffect(() => {\n // set user data from local storage\n const getStoredUserData = () => {\n if (typeof window !== 'undefined') {\n if (userDataEncoded) {\n try {\n const parsedData = JSON.parse(userDataEncoded)\n const mappedValues = {\n firstName: parsedData?.first_name || parsedData?.firstName || '',\n lastName: parsedData?.last_name || parsedData?.lastName || '',\n email: parsedData?.email || '',\n phone: parsedData?.phone || '',\n confirmEmail: parsedData?.email || '',\n state: parsedData?.state || '',\n street_address: parsedData?.street_address || '',\n country: parsedData?.country || '1',\n zip: parsedData?.zip || '',\n brand_opt_in: brandOptIn\n ? brandOptIn\n : parsedData?.brand_opt_in || false,\n city: parsedData?.city || '',\n confirmPassword: '',\n password: '',\n 'holderFirstName-0':\n parsedData?.first_name || parsedData?.firstName || '',\n 'holderLastName-0':\n parsedData?.last_name || parsedData?.lastName || '',\n 'holderEmail-0': parsedData?.email || '',\n }\n setValues({ ...values, ...mappedValues })\n setUserValues(mappedValues)\n } catch (e) {}\n }\n }\n }\n getStoredUserData()\n }, [userDataEncoded, setValues, setUserValues])\n return null\n}\n\nexport const BillingInfoContainer = React.memo(\n ({\n data = [],\n ticketHoldersFields = {\n id: 1,\n fields: [],\n },\n initialValues = {},\n buttonName = 'Submit',\n handleSubmit = _identity,\n theme = 'light',\n onRegisterSuccess = _identity,\n onRegisterError = _identity,\n onSubmitError = _identity,\n onGetCartSuccess = _identity,\n onGetCartError = _identity,\n onGetCountriesSuccess = _identity,\n onGetCountriesError = _identity,\n onGetStatesSuccess = _identity,\n onGetStatesError = _identity,\n onGetProfileDataSuccess = _identity,\n onGetProfileDataError = _identity,\n onAuthorizeSuccess = _identity,\n onAuthorizeError = _identity,\n onLogin,\n onLoginSuccess = _identity,\n isLoggedIn: pIsLoggedIn = false,\n accountInfoTitle = '',\n hideLogo,\n themeOptions,\n onErrorClose = _identity,\n hideErrorsAlertSection = false,\n onSkipBillingPage = _identity,\n skipPage = false,\n canSkipHolderNames = false,\n onForgotPasswordSuccess = _identity,\n onForgotPasswordError = _identity,\n shouldFetchCountries = true,\n onCountdownFinish = _identity,\n enableTimer = false,\n logo,\n showForgotPasswordButton = false,\n showSignUpButton = false,\n brandOptIn = false,\n showPoweredByImage = false,\n isCountryCodeEditable = true,\n onPendingVerification = _identity,\n }: IBillingInfoPage) => {\n const [isNewUser, setIsNewUser] = useState(false)\n const themeMui = createTheme(themeOptions)\n const isWindowDefined = typeof window !== 'undefined'\n const defaultCountry = isWindowDefined\n ? window.localStorage.getItem('eventCountry')\n : ''\n const userData =\n isWindowDefined && window.localStorage.getItem('user_data')\n ? JSON.parse(window.localStorage.getItem('user_data') || '')\n : {}\n const access_token =\n isWindowDefined && window.localStorage.getItem('access_token')\n ? window.localStorage.getItem('access_token') || ''\n : ''\n const [dataWithUniqueIds, setDataWithUniqueIds] = useState<\n IBillingInfoData[]\n >(assingUniqueIds(data))\n const xtfCookie = getCookieByName('X-TF-ECOMMERCE')\n const [isLoggedIn, setIsLoggedIn] = useState(!!(pIsLoggedIn || xtfCookie))\n const [cartInfoData, setCartInfo] = useState<any>({})\n const [countries, setCountries] = useState<any>([])\n const [states, setStates] = useState<any>([])\n const [showModalLogin, setShowModalLogin] = useState(false)\n const [alreadyHasUser, setAlreadyHasUser] = useState(false)\n const [userExpired, setUserExpired] = useState(false)\n const [showModalSignup, setShowModalSignup] = useState(false)\n const [showModalForgotPassword, setShowModalForgotPassword] = useState(\n false\n )\n const [ticketsQuantity, setTicketsQuantity] = useState<string[]>([])\n const [userValues, setUserValues] = useState<any>({\n firstName: '',\n lastName: '',\n email: '',\n phone: '',\n confirmEmail: '',\n holderFirstName: '',\n holderLastName: '',\n holderAge: '',\n city: '',\n country: '',\n street_address: '',\n state: '',\n zip: '',\n })\n const [loading, setLoading] = useState(true)\n const [cardLoading, setCardLoading] = useState(false)\n const [isCountriesLoading, setIsCountriesLoading] = useState(true)\n const [error, setError] = useState(null)\n const [phoneValidationIsLoading, setPhoneValidationIsLoading] = useState(\n false\n )\n const emailLogged =\n _get(userData, 'email', '') || _get(userValues, 'email', '')\n const firstNameLogged =\n _get(userData, 'first_name', '') || _get(userValues, 'first_name', '')\n const lastNameLogged =\n _get(userData, 'last_name', '') || _get(userValues, 'last_name', '')\n const showDOB = getQueryVariable('age_required') === 'true'\n const showTicketHolders = getQueryVariable('names_required') === 'true'\n const eventId = getQueryVariable('event_id') || ''\n const optedInFieldValue: boolean = brandOptIn\n ? brandOptIn\n : _get(cartInfoData, 'optedIn', false)\n const ttfOptIn = Boolean(_get(cartInfoData, 'ttfOptIn', false))\n const isTable = Boolean(_get(cartInfoData, 'is_table', false))\n const hideTtfOptIn: boolean = _get(cartInfoData, 'hide_ttf_opt_in', true)\n const expirationTime = _get(cartInfoData, 'expiresAt')\n const flagRequirePhone = getQueryVariable('phone_required') === 'true'\n const collectMandatoryWalletAddress =\n getQueryVariable('collect_mandatory_wallet_address') === 'true'\n const collectOptionalWalletAddress =\n getQueryVariable('collect_optional_wallet_address') === 'true'\n const flagFreeTicket = getQueryVariable('free_ticket') === 'true'\n const hidePhoneField = getQueryVariable('hide_phone_field') === 'true'\n const hideWalletAddressField =\n !collectOptionalWalletAddress && !collectMandatoryWalletAddress\n\n const [\n pendingVerificationMessage,\n setPendingVerificationMessage,\n ] = useState()\n\n // Get prevProps\n const prevData = useRef(data)\n\n const addAddOnsInAttributes = (checkoutBody: any) => {\n const selectedAddOns = window.localStorage.getItem('add_ons') || '{}'\n checkoutBody.attributes.add_ons = JSON.parse(selectedAddOns)\n }\n\n useEffect(() => {\n const hasUniqueId = _get(dataWithUniqueIds, '[0].uniqueId')\n const isEqualData = _isEqual(prevData.current, data)\n if (!hasUniqueId || !isEqualData) {\n setDataWithUniqueIds(assingUniqueIds(data))\n if (!isEqualData) {\n prevData.current = data\n }\n }\n }, [dataWithUniqueIds, data])\n\n const getQuantity = (cart: any = []) => {\n let qty = 0\n cart.forEach((item: any) => {\n qty += +item.quantity\n })\n return qty\n }\n\n useEffect(() => {\n if (pIsLoggedIn !== isLoggedIn || xtfCookie) {\n setIsLoggedIn(!!(pIsLoggedIn || xtfCookie))\n }\n }, [pIsLoggedIn, isLoggedIn, xtfCookie])\n //just once\n useEffect(() => {\n // fetch countries data\n const fetchCountries = async () => {\n try {\n const res = await getCountries()\n setCustomHeader(res)\n setCountries(_get(res, 'data.data'))\n setIsCountriesLoading(false)\n onGetCountriesSuccess(res.data)\n } catch (e) {\n if (axios.isAxiosError(e)) {\n onGetCountriesError(e)\n }\n setIsCountriesLoading(false)\n }\n }\n shouldFetchCountries && fetchCountries()\n fetchCart()\n }, [])\n // fetch cart data\n const fetchCart = async () => {\n try {\n setCardLoading(true)\n const res = await getCart()\n setCustomHeader(res)\n const cartInfo = _get(res, 'data.data.attributes')\n setCartInfo(cartInfo)\n const { cart = [] } = cartInfo\n setTicketsQuantity(\n new Array(getQuantity(cart)).fill(null).map(() => nanoid())\n )\n onGetCartSuccess(res.data)\n } catch (e) {\n if (axios.isAxiosError(e)) {\n onGetCartError(e)\n }\n } finally {\n setCardLoading(false)\n }\n }\n // fetch user data\n const fetchUserData = async (token: string) => {\n try {\n if ((isWindowDefined && token) || isLoggedIn) {\n const userDataResponse = await getProfileData(token)\n const profileSpecifiedData = _get(userDataResponse, 'data.data')\n const profileDataObj = setLoggedUserData(profileSpecifiedData)\n setUserValues({\n ...profileDataObj,\n firstName: profileDataObj.first_name,\n lastName: profileDataObj.last_name,\n })\n window.localStorage.setItem(\n 'user_data',\n JSON.stringify(profileDataObj)\n )\n onGetProfileDataSuccess(userDataResponse.data)\n }\n } catch (e) {\n if (axios.isAxiosError(e)) {\n onGetProfileDataError(e)\n }\n }\n }\n useEffect(() => {\n fetchUserData(access_token)\n fetchCart()\n }, [access_token, isLoggedIn])\n\n useEffect(() => {\n const collectPaymentData = async () => {\n if (\n skipPage &&\n !_isEmpty(ticketsQuantity) &&\n !showDOB &&\n !loading &&\n !isNewUser\n ) {\n setLoading(true)\n const checkoutBody = createCheckoutDataBodyWithDefaultHolder(\n ticketsQuantity.length,\n userData\n )\n\n try {\n if (isWindowDefined) {\n addAddOnsInAttributes(checkoutBody)\n }\n\n const res = await postOnCheckout(\n checkoutBody,\n access_token,\n flagFreeTicket\n )\n removeReferralKey()\n onSkipBillingPage(_get(res, 'data.data.attributes'))\n setLoading(false)\n } catch (e) {\n onSubmitError(e)\n if (e.response?.data?.data?.hasUnverifiedOrder) {\n setPendingVerificationMessage(e.response?.data?.message)\n }\n }\n } else {\n setLoading(false)\n }\n }\n collectPaymentData()\n }, [skipPage, ticketsQuantity])\n\n const collectCheckoutBody = (\n values: Record<string, any>,\n profileData?: any\n ): Record<string, any> => {\n let checkoutBody = {}\n\n // Auto collect ticket holders name when it was skipped optionally\n if (showDOB && !showTicketHolders && canSkipHolderNames) {\n checkoutBody = createCheckoutDataBodyWithDefaultHolder(\n ticketsQuantity.length,\n values,\n true,\n { emailLogged, firstNameLogged, lastNameLogged }\n )\n } else {\n checkoutBody = createCheckoutDataBody(\n ticketsQuantity.length,\n values,\n {\n emailLogged: emailLogged || profileData.email,\n firstNameLogged:\n firstNameLogged ||\n profileData.first_name ||\n profileData.firstName,\n lastNameLogged:\n lastNameLogged || profileData.last_name || profileData.lastName,\n },\n showDOB\n )\n }\n\n return checkoutBody\n }\n\n const removeReferralKey = () => {\n localStorage.removeItem('referral_key')\n }\n\n if (\n loading ||\n (enableTimer && !expirationTime && typeof window !== 'undefined')\n ) {\n if (expirationTime === 0) {\n // Redirect to homepage (countdown finished and browser reloaded case)\n window.location.href = '/'\n }\n }\n\n const selectedCountry =\n _find(countries, item => item.code.toLowerCase() === defaultCountry) || {}\n const initialCountry =\n selectedCountry.id || _get(userData, 'country', '') || '1'\n\n const pageUrl = isBrowser ? window.location.href.split('?')[0] : ''\n usePixel(eventId, { page: 'billing', pageUrl })\n if (isTable) {\n dataWithUniqueIds[0].label = 'Get Your Tables'\n }\n return (\n <ThemeProvider theme={themeMui}>\n {(loading || cardLoading || isCountriesLoading) && (\n <Backdrop\n sx={{ color: '#fff', backgroundColor: '#000000bd', zIndex: 1205 }}\n open={true}\n >\n <CircularProgress color=\"inherit\" />\n </Backdrop>\n )}\n {!!expirationTime && enableTimer && (\n <TimerWidget\n expires_at={expirationTime}\n onCountdownFinish={onCountdownFinish}\n />\n )}\n {!isCountriesLoading && (\n <Formik\n initialValues={getInitialValues(\n dataWithUniqueIds,\n {\n country: initialCountry,\n state: _get(userData, 'state', '') || '1',\n brand_opt_in: optedInFieldValue,\n ttf_opt_in: ttfOptIn,\n ...initialValues,\n },\n userValues\n )}\n enableReinitialize={false}\n onSubmit={async (values, formikHelpers) => {\n try {\n if (isLoggedIn) {\n const checkoutBody = collectCheckoutBody(values, userData)\n\n if (isWindowDefined) {\n addAddOnsInAttributes(checkoutBody)\n }\n\n const res = await postOnCheckout(\n checkoutBody,\n access_token,\n flagFreeTicket\n )\n removeReferralKey()\n // After checkout is successful recover updated profile and store it on local storage if needed\n if (isWindowDefined) {\n const updatedUserData = await getProfileData(access_token)\n const profileSpecifiedData = _get(\n updatedUserData,\n 'data.data'\n )\n const profileDataObj = setLoggedUserData(\n profileSpecifiedData\n )\n window.localStorage.setItem(\n 'user_data',\n JSON.stringify(profileDataObj)\n )\n }\n\n handleSubmit(\n values,\n formikHelpers as FormikHelpers<any>,\n eventId,\n res\n )\n return\n }\n const checkoutBodyForRegistration = createCheckoutDataBody(\n ticketsQuantity.length,\n values,\n { emailLogged, firstNameLogged, lastNameLogged },\n showDOB\n )\n const bodyFormData = createRegisterFormData(\n values,\n checkoutBodyForRegistration,\n flagFreeTicket\n )\n try {\n setLoading(true)\n const resRegister = await register(bodyFormData)\n const xtfCookie = _get(resRegister, 'headers.x-tf-ecommerce')\n const accessToken = _get(\n resRegister,\n 'data.data.attributes.access_token'\n )\n const refreshToken = _get(\n resRegister,\n 'data.data.attributes.refresh_token'\n )\n const userProfile = _get(\n resRegister,\n 'data.data.attributes.user_profile'\n )\n\n setIsNewUser(true)\n onRegisterSuccess({\n xtfCookie,\n accessToken,\n refreshToken,\n userProfile,\n })\n } catch (e) {\n setLoading(false)\n\n if (e.response?.data?.data?.hasUnverifiedOrder) {\n setPendingVerificationMessage(e.response?.data?.message)\n } else if (axios.isAxiosError(e)) {\n const error = e?.response?.data?.message\n if (_includes(error, 'You must be aged')) {\n formikHelpers.setFieldError('holderAge', error)\n }\n if (error?.password) {\n formikHelpers.setFieldError('password', error.password)\n formikHelpers.setFieldError(\n 'confirmPassword',\n error.password\n )\n }\n if (error?.email && !onLogin) {\n // False will stand for outside controll\n setAlreadyHasUser(true)\n setShowModalLogin(true)\n }\n\n if (\n _includes(error, 'The cart is expired') &&\n !hideErrorsAlertSection\n ) {\n setError(error)\n }\n\n onRegisterError(e, values.email)\n }\n return\n }\n const profileData = await getProfileData()\n const profileSpecifiedData = _get(profileData, 'data.data')\n const profileDataObj = setLoggedUserData(profileSpecifiedData)\n if (isWindowDefined) {\n window.localStorage.setItem(\n 'user_data',\n JSON.stringify(profileDataObj)\n )\n }\n\n const checkoutBody = collectCheckoutBody(values, profileDataObj)\n\n if (isWindowDefined) {\n addAddOnsInAttributes(checkoutBody)\n }\n\n const res = await postOnCheckout(\n checkoutBody,\n undefined,\n flagFreeTicket\n )\n removeReferralKey()\n handleSubmit(\n values,\n formikHelpers as FormikHelpers<any>,\n eventId,\n res\n )\n } catch (e) {\n setLoading(false)\n if (e.response?.data?.data?.hasUnverifiedOrder) {\n setPendingVerificationMessage(e.response?.data?.message)\n } else if (axios.isAxiosError(e)) {\n if (\n e.response?.status === 401 ||\n e.response?.data?.error === 'invalid_token'\n ) {\n if (isWindowDefined) {\n window.localStorage.removeItem('user_data')\n window.localStorage.removeItem('access_token')\n setUserExpired(true)\n setShowModalLogin(true)\n setIsLoggedIn(false)\n setShowModalSignup(false)\n setShowModalForgotPassword(false)\n const event = new window.CustomEvent('tf-logout')\n deleteCookieByName('X-TF-ECOMMERCE')\n window.document.dispatchEvent(event)\n }\n }\n if (e.response?.data.message && !hideErrorsAlertSection) {\n setError(_get(e, 'response.data.message'))\n }\n onSubmitError(e)\n }\n } finally {\n setLoading(false)\n }\n }}\n >\n {(props: FormikProps<any>) => (\n <Form onSubmit={props.handleSubmit}>\n <ErrorFocus />\n <LogicRunner\n brandOptIn={brandOptIn}\n values={props.values}\n setStates={setStates}\n setFieldValue={props.setFieldValue}\n setValues={props.setValues}\n setUserValues={setUserValues}\n onGetStatesSuccess={onGetStatesSuccess}\n onGetStatesError={onGetStatesError}\n shouldFetchCountries={shouldFetchCountries}\n />\n <div className={`billing-info-container ${theme}`}>\n <SnackbarAlert\n type=\"error\"\n isOpen={!!error}\n message={error || ''}\n onClose={() => {\n setError(null)\n onErrorClose()\n }}\n />\n {!isLoggedIn && (\n <div className=\"account-actions-block\">\n <div className=\"action-item\">\n <div>{accountInfoTitle}</div>\n <div>Login & skip ahead:</div>\n </div>\n <div className=\"action-item login-block\">\n <button\n className=\"login-register-button\"\n type=\"button\"\n onClick={() => {\n // If outside login needed to skip package login functionallity\n if (onLogin) {\n onLogin()\n } else {\n setShowModalLogin(true)\n }\n }}\n >\n Login\n </button>\n {!hideLogo && (\n <div className=\"logo-image-container\">\n <img\n src={\n theme === 'dark'\n ? 'https://www.ticketfairy.com/resources/images/logo-ttf.svg'\n : 'https://www.ticketfairy.com/resources/images/logo-ttf-black.svg'\n }\n alt=\"nodata\"\n />\n </div>\n )}\n </div>\n </div>\n )}\n {!cardLoading &&\n _map(dataWithUniqueIds, item => {\n const { label, labelClassName, fields } = item\n return (\n <React.Fragment key={item.uniqueId}>\n <p className={labelClassName}>{label}</p>\n {_map(fields, group => {\n const { groupClassname, groupItems } = group\n return (\n <React.Fragment key={group.uniqueId}>\n <div className={groupClassname}>\n {_map(\n groupItems.filter(el => {\n if (el.name === 'holderAge' && !showDOB) {\n return false\n }\n if (\n el.name === 'ttf_opt_in' &&\n hideTtfOptIn\n ) {\n return false\n }\n if (el.name === 'phone') {\n if (!hidePhoneField) {\n el.required = flagRequirePhone\n } else {\n return false\n }\n }\n if (\n el.name ===\n 'data_capture[wallet_address]'\n ) {\n if (collectMandatoryWalletAddress) {\n el.required = true\n }\n }\n if (\n [\n 'street_address',\n 'country',\n 'state',\n 'city',\n 'zip',\n ].includes(el.name)\n ) {\n if (flagFreeTicket) {\n el.required = false\n return false\n }\n }\n if (\n hideWalletAddressField &&\n el.name === 'wallet-address-info'\n ) {\n return false\n }\n return true\n }),\n element =>\n [\n 'password',\n 'confirmPassword',\n 'password-info',\n ].includes(element.name) &&\n isLoggedIn ? null : [\n 'data_capture[wallet_address]',\n ].includes(element.name) &&\n hideWalletAddressField ? null : (\n <React.Fragment key={element.uniqueId}>\n <div\n className={`${\n element.className\n } ${props?.errors[element.name] ||\n ''}`}\n >\n {element.component ? (\n element.component\n ) : (\n <Field\n {...element}\n type={\n element.type === 'radio'\n ? undefined\n : element.type\n }\n setPhoneValidationIsLoading={\n element.type === 'phone'\n ? setPhoneValidationIsLoading\n : undefined\n }\n label={getFieldLabel(element)}\n validate={getValidateFunctions(\n element,\n states,\n props.values,\n props.errors\n )}\n setFieldValue={\n props.setFieldValue\n }\n onBlur={props.handleBlur}\n component={getFieldComponent(\n element\n )}\n selectOptions={\n element.name === 'country'\n ? _map(countries, item => ({\n value: item.id,\n label: item.name,\n }))\n : element.name === 'state'\n ? [\n { label: element.label, value: '', disabled: true },\n ...states,\n ]\n : element.selectOptions || []\n }\n theme={theme}\n defaultCountry={\n defaultCountry ||\n element.defaultCountry\n }\n dateFormat={element.format}\n isCountryCodeEditable={\n isCountryCodeEditable\n }\n />\n )}\n </div>\n </React.Fragment>\n )\n )}\n </div>\n </React.Fragment>\n )\n })}\n </React.Fragment>\n )\n })}\n {!_isEmpty(ticketHoldersFields.fields) && (\n <div className=\"ticket-holders-fields\">\n <h2>{ticketHoldersFields.label}</h2>\n {_map(ticketsQuantity, (_item, index) => (\n <div key={_item}>\n <h5>Ticket {index + 1}</h5>\n {_map(ticketHoldersFields.fields, group => {\n const { groupClassname, groupItems } = group\n return (\n <div key={group.id}>\n <div className={groupClassname}>\n {_map(groupItems, element => {\n if (\n _includes(\n ['holderFirstName', 'holderLastName'],\n element.name\n )\n ) {\n element.required = showTicketHolders\n }\n return (\n <div\n className={element.className}\n key={element.name}\n >\n <Field\n {...element}\n type={\n element.type === 'radio'\n ? undefined\n : element.type\n }\n name={`${element.name}-${index}`}\n label={getFieldLabel(element)}\n component={getFieldComponent(element)}\n validate={combineValidators(\n element.required\n ? requiredValidator\n : () =>\n props.errors[\n `${element.name}-${index}`\n ],\n element.onValidate\n ? element.onValidate\n : () =>\n props.errors[\n `${element.name}-${index}`\n ]\n )}\n setPhoneValidationIsLoading={\n setPhoneValidationIsLoading\n }\n defaultCountry={\n defaultCountry ||\n element.defaultCountry\n }\n isCountryCodeEditable={\n isCountryCodeEditable\n }\n />\n </div>\n )\n })}\n </div>\n </div>\n )\n })}\n </div>\n ))}\n </div>\n )}\n <div className=\"button-container\">\n <Button\n type=\"submit\"\n variant=\"contained\"\n className=\"login-register-button\"\n disabled={props.isSubmitting || phoneValidationIsLoading}\n >\n {props.isSubmitting ? (\n <CircularProgress size={26} />\n ) : (\n buttonName\n )}\n </Button>\n </div>\n </div>\n </Form>\n )}\n </Formik>\n )}\n {showModalLogin && (\n <LoginModal\n logo={logo}\n onClose={() => {\n setShowModalLogin(false)\n }}\n onLogin={() => {\n setShowModalLogin(false)\n setUserExpired(false)\n onLoginSuccess()\n }}\n alreadyHasUser={alreadyHasUser}\n userExpired={userExpired}\n onAuthorizeSuccess={onAuthorizeSuccess}\n onAuthorizeError={onAuthorizeError}\n onGetProfileDataSuccess={(data: any) => {\n fetchCart()\n onGetProfileDataSuccess(data)\n }}\n onGetProfileDataError={onGetProfileDataError}\n showSignUpButton={showSignUpButton}\n showForgotPasswordButton={showForgotPasswordButton}\n onForgotPassword={() => {\n setShowModalLogin(false)\n setShowModalForgotPassword(true)\n }}\n onSignup={() => {\n setShowModalLogin(false)\n setShowModalSignup(true)\n }}\n showPoweredByImage={showPoweredByImage}\n />\n )}\n {showModalSignup && (\n <SignupModal\n onClose={() => {\n setShowModalSignup(false)\n }}\n onLogin={() => {\n setShowModalSignup(false)\n setShowModalLogin(true)\n }}\n onRegisterSuccess={onRegisterSuccess}\n onRegisterError={onRegisterError}\n showPoweredByImage={showPoweredByImage}\n />\n )}\n {showModalForgotPassword && (\n <ForgotPasswordModal\n onClose={() => {\n setShowModalForgotPassword(false)\n }}\n onLogin={() => {\n setShowModalForgotPassword(false)\n setShowModalLogin(true)\n }}\n onForgotPasswordSuccess={onForgotPasswordSuccess}\n onForgotPasswordError={onForgotPasswordError}\n showPoweredByImage={showPoweredByImage}\n />\n )}\n <VerificationPendingModal\n message={pendingVerificationMessage}\n onClose={() => {\n onPendingVerification()\n }}\n />\n </ThemeProvider>\n )\n }\n)\n","export const currencyNormalizerCreator = (\n value: string | number,\n currency: string\n) => (!value ? '' : `${getCurrencySymbolByCurrency(currency)} ${value}`)\n\nexport const createFixedFloatNormalizer = (fixedValue: number) => (\n value: string | number\n) => (value || `${value}` === '0' ? (+value).toFixed(fixedValue) : '')\n\nexport const getCurrencySymbolByCurrency = (currency = '') => {\n switch (currency) {\n case 'GBP':\n return '£'\n case 'EUR':\n return '€'\n case 'INR':\n return '₹'\n case 'JMD':\n return 'J$'\n case 'NZD':\n return 'NZ$'\n case 'MYR':\n return 'RM'\n case 'MXN':\n return 'Mex$'\n case 'SGD':\n return 'S$'\n case 'AUD':\n return 'A$'\n case 'ZAR':\n return 'R'\n case 'ke':\n return 'Ksh'\n case 'TRY':\n return '₺'\n case 'CAD':\n return 'CA$'\n case 'THB':\n return '฿'\n case 'ISK':\n return 'Kr'\n case 'SEK':\n return 'kr'\n default:\n return 'US$'\n }\n}\n\nexport const removePlusSign = (string = '') => string.replace('+', '')\n","import './style.css'\n\nimport CircularProgress from '@mui/material/CircularProgress'\nimport {\n CardCvcElement,\n CardExpiryElement,\n CardNumberElement,\n useElements,\n useStripe,\n} from '@stripe/react-stripe-js'\nimport { StripeCardNumberElementOptions } from '@stripe/stripe-js'\nimport _get from 'lodash/get'\nimport _identity from 'lodash/identity'\nimport React, { useEffect, useState } from 'react'\n\nimport { getCurrencySymbolByCurrency } from '../../normalizers'\nimport { CheckboxField } from '../common/index'\n\nconst options: StripeCardNumberElementOptions = {\n style: {\n base: {\n backgroundColor: '#000',\n fontSize: '18px',\n color: '#ffffff',\n letterSpacing: '1px',\n ':-webkit-autofill': {\n color: '#ffffff',\n },\n '::placeholder': {\n color: 'rgba(201, 201, 201, 0.5)',\n },\n },\n invalid: {\n color: '#E53935',\n },\n },\n}\n\nexport interface ICheckoutForm {\n total: string;\n currency: string;\n onSubmit: (error: any) => Promise<any>;\n error?: string | null;\n stripeCardOptions?: StripeCardNumberElementOptions;\n stripe_client_secret: string;\n billing_info: { [key: string]: any };\n isLoading: any;\n handleSetLoading: (loading: any) => void;\n conditions: any;\n disableZipSection: boolean;\n paymentButtonText?: string;\n}\n\ninterface AddressTypes {\n city: string;\n line1: string;\n state: string;\n postal_code?: string;\n}\n\nconst CheckoutForm = ({\n total,\n onSubmit = _identity,\n stripeCardOptions = {},\n error = null,\n stripe_client_secret,\n currency,\n billing_info,\n isLoading = false,\n handleSetLoading = () => {},\n conditions = [],\n disableZipSection,\n paymentButtonText,\n}: ICheckoutForm) => {\n const stripe = useStripe()\n const elements = useElements()\n const [postalCode, setPostalCode] = useState<any>('')\n const [stripeError, setStripeError] = useState<any>(null)\n const [checkboxes, setCheckboxes] = useState<any>([])\n const [allowSubmit, setAllowSubmit] = useState(false)\n\n const handleSubmit = async (event: React.SyntheticEvent) => {\n setStripeError(null)\n try {\n event.preventDefault()\n\n if (!postalCode && !disableZipSection) {\n setStripeError('Please enter your zip code.')\n handleSetLoading(false)\n return\n }\n\n if (!stripe || !elements) {\n // Stripe.js has not loaded yet. Make sure to disable\n // form submission until Stripe.js has loaded.\n handleSetLoading(false)\n return\n }\n\n const card = elements.getElement(CardNumberElement)\n\n const address: AddressTypes = {\n city: billing_info.city,\n line1: billing_info.street_address,\n state: billing_info.state,\n }\n\n if (!disableZipSection) {\n address.postal_code = postalCode\n }\n\n const paymentMethodReq = await stripe.createPaymentMethod({\n type: 'card',\n card: card || { token: '' },\n billing_details: {\n address,\n },\n })\n\n if (paymentMethodReq.error) {\n setStripeError(paymentMethodReq.error.message || null)\n handleSetLoading(false)\n return\n }\n\n handleSetLoading(true)\n const { error } = await stripe.confirmCardPayment(stripe_client_secret, {\n payment_method: paymentMethodReq.paymentMethod.id,\n })\n\n if (error) {\n setStripeError(error.message)\n handleSetLoading(false)\n return\n }\n\n onSubmit(null)\n } catch (e) {\n onSubmit(e)\n }\n }\n\n const handleCheckboxes = (e: any) => {\n const checkbox = e.target\n const updatedCheckedState = checkboxes.map((item: any) => {\n const value = item.id === checkbox.name ? !item.checked : item.checked\n return {\n ...item,\n checked: value,\n }\n })\n setCheckboxes(updatedCheckedState)\n }\n\n const onChangePostalCode = (e: any) => {\n setPostalCode(e.target.value)\n }\n\n useEffect(() => {\n if (typeof window !== 'undefined') {\n const userData = JSON.parse(\n window.localStorage.getItem('user_data') || ''\n )\n const zipCode = _get(userData, 'zip', '')\n zipCode && setPostalCode(zipCode)\n }\n }, [])\n\n useEffect(() => {\n if (conditions.length) {\n setCheckboxes(conditions)\n }\n }, [conditions])\n\n useEffect(() => {\n if (checkboxes.length) {\n const allChecked = checkboxes.every((item: any) => item?.checked === true)\n setAllowSubmit(allChecked)\n } else {\n setAllowSubmit(true)\n }\n }, [checkboxes])\n\n const buttonIsDiabled = !stripe || !!error || isLoading || !allowSubmit\n\n return (\n <div className=\"stripe_payment_container\">\n {!!stripeError && (\n <div className=\"checkout_error_block\">{stripeError}</div>\n )}\n <form onSubmit={handleSubmit}>\n <div className=\"card_form_inner\">\n <div className=\"card_number_element\">\n <span className=\"card_label_text\">Card number</span>\n <CardNumberElement\n options={{ ...options, ...stripeCardOptions }}\n onReady={_identity}\n onChange={_identity}\n onBlur={_identity}\n onFocus={_identity}\n />\n </div>\n <div className=\"elements\">\n <div className=\"expiration_element\">\n <span className=\"card_label_text\">Expiration date</span>\n <CardExpiryElement\n options={{ ...options, ...stripeCardOptions }}\n />\n </div>\n <div className=\"cvc_element\">\n <span className=\"card_label_text\">CVC</span>\n <CardCvcElement options={{ ...options, ...stripeCardOptions }} />\n </div>\n </div>\n {!disableZipSection && (\n <div className=\"zip_element\">\n <p className=\"card_label_text\">ZIP</p>\n <input\n type=\"text\"\n value={postalCode}\n onChange={onChangePostalCode}\n placeholder=\"ZIP\"\n />\n </div>\n )}\n </div>\n {checkboxes?.map((checkbox: any) => (\n <div\n className={'billing-info-container__singleField'}\n key={checkbox.id}\n >\n <div className=\"conditions-block\">\n <CheckboxField\n name={checkbox.id}\n label={checkbox.text}\n required={true}\n onChange={handleCheckboxes}\n checked={checkbox.checked}\n />\n </div>\n </div>\n ))}\n <div\n className={`payment_button ${\n buttonIsDiabled ? 'disabled-payment-button' : ''\n }`}\n >\n <button disabled={buttonIsDiabled} type=\"submit\">\n {isLoading ? (\n <CircularProgress size={26} />\n ) : (\n `${\n paymentButtonText ? paymentButtonText : 'Pay'\n } ${getCurrencySymbolByCurrency(currency)}${total}`\n )}\n </button>\n </div>\n </form>\n </div>\n )\n}\n\nexport default CheckoutForm\n","import './style.css'\n\nimport { ThemeOptions } from '@mui/material'\nimport Alert from '@mui/material/Alert'\nimport CircularProgress from '@mui/material/CircularProgress'\nimport Container from '@mui/material/Container'\nimport { createTheme, ThemeProvider } from '@mui/material/styles'\nimport { CSSProperties } from '@mui/styles'\nimport { Elements } from '@stripe/react-stripe-js'\nimport {\n loadStripe,\n StripeCardNumberElementOptions,\n StripeConstructorOptions,\n StripeElementsOptions,\n} from '@stripe/stripe-js'\nimport { AxiosError } from 'axios'\nimport _get from 'lodash/get'\nimport _identity from 'lodash/identity'\nimport _isEmpty from 'lodash/isEmpty'\nimport _map from 'lodash/map'\nimport { nanoid } from 'nanoid'\nimport React, { useEffect, useState } from 'react'\n\nimport {\n getConditions,\n getPaymentData,\n handleFreeSuccess,\n handlePaymentSuccess,\n} from '../../api'\nimport { usePixel } from '../../hooks/usePixel'\nimport {\n createFixedFloatNormalizer,\n currencyNormalizerCreator,\n} from '../../normalizers'\nimport { IAddOn, IOrderData, IPaymentField } from '../../types'\nimport { CONFIGS, isBrowser } from '../../utils'\nimport { getQueryVariable } from '../../utils/getQueryVariable'\nimport { Loader } from '../common/index'\nimport StripePayment from '../stripePayment'\nimport TimerWidget from '../timerWidget'\n\nconst publishableKey = CONFIGS.STRIPE_PUBLISHABLE_KEY || ''\n\nconst getStripePromise = (reviewData: any) => {\n const stripePublishableKey =\n _get(reviewData, 'payment_method.stripe_publishable_key') || publishableKey\n const stripeAccount = _get(\n reviewData,\n 'payment_method.stripe_connected_account'\n )\n\n const options: StripeConstructorOptions = {}\n if (stripeAccount) {\n options.stripeAccount = stripeAccount\n }\n\n return loadStripe(stripePublishableKey, options)\n}\nexport interface IPaymentPage {\n paymentFields: IPaymentField[];\n handlePayment: any;\n checkoutData: any;\n formTitle?: string;\n errorText?: string;\n onErrorClose?: () => void;\n onGetPaymentDataSuccess: (value: any) => void;\n onGetPaymentDataError: (value: AxiosError) => void;\n onPaymentError: (value: AxiosError) => void;\n stripeCardOptions?: StripeCardNumberElementOptions;\n disableZipSection: boolean;\n themeOptions?: ThemeOptions & {\n input?: CSSProperties;\n checkbox?: CSSProperties;\n };\n elementsOptions?: StripeElementsOptions;\n onCountdownFinish?: () => void;\n enableTimer?: boolean;\n enablePaymentPlan?: boolean;\n paymentButtonText?: string;\n paymentInfoLabel?: string;\n orderInfoLabel?: string;\n}\n\nconst initialOrderValues: IOrderData = {\n id: '',\n product_name: '',\n ticketType: '',\n quantity: '',\n price: '',\n total: '',\n currency: '',\n guest_count: '',\n pay_now: '',\n add_ons: [] as IAddOn[],\n}\n\nconst initialReviewValues = {\n order_details: {\n order_hash: '',\n },\n payment_method: {\n stripe_client_secret: '',\n },\n billing_info: {},\n}\n\nexport const PaymentContainer = ({\n paymentFields = [],\n handlePayment,\n formTitle = 'Get Your Tickets',\n errorText,\n checkoutData,\n onErrorClose = _identity,\n onGetPaymentDataSuccess = _identity,\n onGetPaymentDataError = _identity,\n onPaymentError = _identity,\n stripeCardOptions = {},\n disableZipSection = false,\n themeOptions,\n elementsOptions,\n onCountdownFinish = _identity,\n enableTimer = false,\n enablePaymentPlan = false,\n paymentButtonText,\n orderInfoLabel = 'Order Review',\n paymentInfoLabel = 'Order Confirmation',\n}: IPaymentPage) => {\n const [reviewData, setReviewData] = useState(initialReviewValues)\n const [orderData, setOrderData] = useState(initialOrderValues)\n const [error, setError] = useState(null)\n const [showPaymentPlanSection, setShowPaymentPlanSection] = useState(false)\n const [paymentIsLoading, setPaymentIsLoading] = useState(false)\n const [paymentDataIsLoading, setPaymentDataIsLoading] = useState(true)\n const [conditions, setConditions] = useState<{ id: string, text: string }[]>(\n []\n )\n\n const showFormTitle = Boolean(formTitle)\n const showErrorText = Boolean(errorText)\n\n const eventId =\n getQueryVariable('event_id') || _get(reviewData, 'cart[0].product_id') || ''\n const { hash, total } = checkoutData\n const isFreeTickets =\n (!Number(total) && !Number(orderData.total)) || !Number(orderData.pay_now)\n\n const pageUrl = isBrowser ? window.location.href.split('?')[0] : ''\n usePixel(eventId, { page: 'review', pageUrl })\n\n useEffect(() => {\n (async () => {\n try {\n const response = await getPaymentData(hash)\n if (response.data.success) {\n const attributes = _get(response, 'data.data.attributes')\n setReviewData(attributes)\n const { cart, order_details } = attributes\n const {\n tickets: [ticket],\n } = order_details\n\n const orderDataArray = _map(order_details.tickets, item => ({\n product_name: cart[0]?.product_name,\n ticketType: item?.name,\n quantity: item?.guest_count,\n price: item?.price,\n id: item.id,\n count: item?.quantity,\n }))\n\n const orderData = {\n id: order_details?.id,\n product_name: cart[0]?.product_name,\n ticketType: ticket?.name,\n quantity: ticket?.quantity,\n price: ticket?.price,\n total: order_details?.total,\n currency: order_details?.currency,\n add_ons: order_details?.add_ons || [],\n pay_now: order_details?.pay_now || '',\n guest_count: order_details?.guest_count || null,\n debt: order_details?.debt || null,\n tableTypes: orderDataArray,\n }\n setOrderData(orderData)\n onGetPaymentDataSuccess(response.data)\n }\n } catch (e) {\n setError(_get(e, 'response.data.message'))\n onGetPaymentDataError(e.response)\n } finally {\n setPaymentDataIsLoading(false)\n }\n })()\n }, [checkoutData])\n\n //just once\n useEffect(() => {\n // fetch conditions data\n const fetchConditions = async () => {\n if (eventId) {\n const res = await getConditions(eventId)\n const conditionsInfo = _get(res, 'data.data.attributes')\n setConditions(\n conditionsInfo\n ? conditionsInfo.map((item: string) => ({\n id: nanoid(),\n text: item,\n checked: false,\n }))\n : []\n )\n }\n }\n fetchConditions()\n }, [])\n\n // 1. get payment data ---> v1/order/${hash}/review/ done\n // 2. handle payment ---> v1/order/${orderHash}/pay/\n // 3. redirect to confirmation page\n const handlePaymentMiddleWare = async (error: any) => {\n try {\n if (error) {\n throw error\n }\n const {\n order_details: { order_hash },\n } = reviewData\n const paymentSuccessResponse = isFreeTickets\n ? await handleFreeSuccess(order_hash)\n : await handlePaymentSuccess(order_hash)\n if (paymentSuccessResponse.status === 200) {\n handlePayment(paymentSuccessResponse)\n setPaymentIsLoading(false)\n\n // clear seat-map related data from localStorage\n localStorage.removeItem('reservationData')\n localStorage.removeItem(`reservationStart-${eventId}`)\n localStorage.removeItem('ownReservations')\n localStorage.removeItem('tierId')\n\n const isWindowDefined = typeof window !== \"undefined\"\n if (isWindowDefined) {\n (window as any)?.dataLayer.push({\n 'event': 'Purchase',\n 'orderValue': orderData.total,\n 'orderCurrency': orderData.currency,\n 'orderId': orderData.id\n })\n }\n }\n } catch (e) {\n setError(_get(e, 'response.data.message'))\n setPaymentIsLoading(false)\n onPaymentError(e.response)\n }\n }\n\n const themeMui = createTheme(themeOptions)\n const hasTableTypes = Boolean(Number(orderData.guest_count))\n const paymentFieldsData = hasTableTypes\n ? [\n {\n label: 'Event',\n id: 'product_name',\n },\n {\n label: '',\n id: 'tableTypes',\n },\n {\n label: 'Total (incl. fees, card processing and taxes)',\n id: 'total',\n normalizer: (value: string, currency: any) =>\n currencyNormalizerCreator(\n createFixedFloatNormalizer(2)(parseFloat(value)),\n currency\n ),\n },\n {\n label: 'Pay Now',\n id: 'pay_now',\n normalizer: (value: string, currency: any) =>\n currencyNormalizerCreator(\n createFixedFloatNormalizer(2)(parseFloat(value)),\n currency\n ),\n },\n {\n label: 'Pay On Check-in',\n id: 'debt',\n normalizer: (value: string, currency: any) =>\n currencyNormalizerCreator(\n createFixedFloatNormalizer(2)(parseFloat(value)),\n currency\n ),\n },\n ]\n : paymentFields\n const isTable = orderData?.guest_count\n return (\n <ThemeProvider theme={themeMui}>\n <div className=\"payment_page\">\n {enableTimer && (\n <TimerWidget\n expires_at={_get(reviewData, 'expires_at', 0)}\n buyLoading={paymentIsLoading}\n onCountdownFinish={onCountdownFinish}\n />\n )}\n {error && (\n <Alert severity=\"error\" onClose={onErrorClose} variant=\"filled\">\n {error}\n </Alert>\n )}\n {paymentDataIsLoading && <Loader />}\n {!paymentDataIsLoading && (\n <Container maxWidth=\"md\">\n {showFormTitle && (\n <h1>{isTable ? 'Get Your Tables' : formTitle}</h1>\n )}\n <div className=\"order_info_text\">{orderInfoLabel}</div>\n <div\n className=\"order_info_section\"\n style={{ display: hasTableTypes ? 'block' : 'grid' }}\n >\n {_map(paymentFieldsData, field => {\n const {\n id,\n label,\n className = '',\n normalizer = _identity,\n } = field\n const { currency } = orderData\n const value = orderData[id as keyof IOrderData]\n let component = null\n\n if (field.id === 'add_ons' && _isEmpty(value)) {\n return false\n }\n\n if (field.id === 'tableTypes') {\n const valueArray = value as Array<any>\n\n component = (\n <div\n key={id}\n className=\"order_info_block\"\n style={{\n display: 'flex',\n flexDirection: 'column',\n }}\n >\n {_map(valueArray, tableTypeItem => (\n <div\n key={tableTypeItem.id}\n style={{\n display: 'grid',\n gridTemplateColumns: '33% 33% 33%',\n gridColumnGap: '10%',\n }}\n >\n <div className=\"order_info_block\">\n <div className=\"order_info_title\">Table Type</div>\n <div className={`${className} order_info_text`}>\n {tableTypeItem.ticketType}\n </div>\n </div>\n <div className=\"order_info_block\">\n <div className=\"order_info_title\">\n Number of Tables\n </div>\n <div className={`${className} order_info_text`}>\n {tableTypeItem.count}\n </div>\n </div>\n <div className=\"order_info_block\">\n <div className=\"order_info_title\">Guest Count</div>\n <div className={`${className} order_info_text`}>\n {tableTypeItem.quantity}\n </div>\n </div>\n </div>\n ))}\n </div>\n )\n }\n\n return (\n component || (\n <div key={id} className=\"order_info_block\">\n <div className=\"order_info_title\">{label}</div>\n <div className={`${className} order_info_text`}>\n {typeof value === 'string'\n ? normalizer(value, currency)\n : _map(value, item => (\n <div key={item.id} className=\"add-on-container\">\n <span>{item.quantity}</span>\n <span className=\"add-on-x\">{' x '}</span>\n <span>\n {item.groupName ? item.groupName + ' - ' : ''}\n </span>\n <span>{item.name}</span>\n <span>{' - '}</span>\n <span>\n {currencyNormalizerCreator(\n createFixedFloatNormalizer(2)(\n parseFloat(item.price)\n ),\n currency\n )}\n </span>\n <span className=\"add-on-each\">{' each'}</span>\n </div>\n ))}\n </div>\n </div>\n )\n )\n })}\n </div>\n {enablePaymentPlan && (\n <div className=\"payment_toggle\">\n <label htmlFor=\"togBtn\" className=\"switch\">\n <input\n type=\"checkbox\"\n id=\"togBtn\"\n disabled={true}\n onChange={() =>\n setShowPaymentPlanSection(!showPaymentPlanSection)\n }\n />\n <div className=\"slider round\" />\n <span className=\"tog_text\">\n Click to checkout using Payment Plan\n </span>\n </label>\n </div>\n )}\n {showPaymentPlanSection && (\n <div className=\"payment_plan\">\n <h2>PAYMENT PLAN</h2>\n <div className=\"plan_block\">\n <h3>Mbrand Payment Plan Terms</h3>\n <p>\n By clicking on the “Confirm Payment Plan” button, you are\n starting your payment plan of 2 payments of $115.00, which\n will be drawn from your account every 2 weeks, with the\n first payment taken later today.\n </p>\n <p>\n This includes a non-refundable admin fee of $3.00 per\n payment.\n </p>\n <p className=\"payment_note\">\n NOTE: If today’s payment fails, your payment plan will not\n activate, and your tickets will not be issued until you\n complete your final payment.\n </p>\n <p>\n If you do not complete your payements, your order will be\n canceled. Your first payment of $115.00, plus the\n non-refundable admin fee of $3.00 will not be refunded.\n </p>\n <p>\n Your payment will proceed with the card ending in **** 4242.\n </p>\n </div>\n </div>\n )}\n {!isFreeTickets ? (\n <div className=\"payment_info\">\n <div className=\"payment_info_label\">{paymentInfoLabel}</div>\n {showErrorText && (\n <p className=\"payment_info__error\">{errorText}</p>\n )}\n <div>\n <Elements\n stripe={getStripePromise(reviewData)}\n options={elementsOptions}\n >\n <StripePayment\n stripe_client_secret={_get(\n reviewData,\n 'payment_method.stripe_client_secret'\n )}\n total={\n orderData.guest_count\n ? orderData.pay_now\n : orderData.total\n }\n onSubmit={handlePaymentMiddleWare}\n error={error}\n currency={orderData.currency}\n billing_info={reviewData.billing_info}\n isLoading={paymentIsLoading}\n handleSetLoading={value => setPaymentIsLoading(value)}\n conditions={conditions}\n stripeCardOptions={stripeCardOptions}\n disableZipSection={disableZipSection}\n paymentButtonText={paymentButtonText}\n />\n </Elements>\n </div>\n </div>\n ) : (\n <div\n className={`payment_button ${\n paymentIsLoading ? 'disabled-payment-button' : ''\n }`}\n >\n <button\n disabled={paymentIsLoading}\n type=\"button\"\n onClick={() => {\n setPaymentIsLoading(true)\n handlePaymentMiddleWare(null)\n }}\n >\n {paymentIsLoading ? (\n <CircularProgress size={26} />\n ) : (\n 'Complete Registration'\n )}\n </button>\n </div>\n )}\n </Container>\n )}\n </div>\n </ThemeProvider>\n )\n}\n","import {\n FacebookShareButton,\n FacebookMessengerShareButton,\n TwitterShareButton,\n LinkedinShareButton,\n PinterestShareButton,\n VKShareButton,\n OKShareButton,\n TelegramShareButton,\n WhatsappShareButton,\n RedditShareButton,\n TumblrShareButton,\n MailruShareButton,\n EmailShareButton,\n LivejournalShareButton,\n ViberShareButton,\n WorkplaceShareButton,\n LineShareButton,\n PocketShareButton,\n InstapaperShareButton,\n WeiboShareButton,\n HatenaShareButton,\n FacebookIcon,\n FacebookMessengerIcon,\n TwitterIcon,\n LinkedinIcon,\n PinterestIcon,\n VKIcon,\n OKIcon,\n TelegramIcon,\n WhatsappIcon,\n RedditIcon,\n TumblrIcon,\n MailruIcon,\n EmailIcon,\n LivejournalIcon,\n ViberIcon,\n WorkplaceIcon,\n LineIcon,\n PocketIcon,\n InstapaperIcon,\n WeiboIcon,\n HatenaIcon,\n} from 'react-share'\n\nconst config: any = {\n facebook: { component: FacebookShareButton, icon: FacebookIcon },\n messenger: { component: FacebookMessengerShareButton, icon: FacebookMessengerIcon },\n twitter: { component: TwitterShareButton, icon: TwitterIcon },\n linkedin: { component: LinkedinShareButton, icon: LinkedinIcon },\n pinterest: { component: PinterestShareButton, icon: PinterestIcon },\n vk: { component: VKShareButton, icon: VKIcon },\n ok: { component: OKShareButton, icon: OKIcon },\n telegram: { component: TelegramShareButton, icon: TelegramIcon },\n whatsapp: { component: WhatsappShareButton, icon: WhatsappIcon },\n reddit: { component: RedditShareButton, icon: RedditIcon },\n tumblr: { component: TumblrShareButton, icon: TumblrIcon },\n mailru: { component: MailruShareButton, icon: MailruIcon },\n email: { component: EmailShareButton, icon: EmailIcon },\n livejournal: { component: LivejournalShareButton, icon: LivejournalIcon },\n viber: { component: ViberShareButton, icon: ViberIcon },\n workplace: { component: WorkplaceShareButton, icon: WorkplaceIcon },\n line: { component: LineShareButton, icon: LineIcon },\n pocket: { component: PocketShareButton, icon: PocketIcon },\n instapaper: { component: InstapaperShareButton, icon: InstapaperIcon },\n weibo: { component: WeiboShareButton, icon: WeiboIcon },\n hatena: { component: HatenaShareButton, icon: HatenaIcon },\n}\n\nexport default function (key: string) {\n return config[key]\n}\n","import React from 'react'\n\nimport config from './config'\nimport { IShareButton } from './index'\n\nconst SocialComponent = ({\n mainLabel,\n subLabel,\n platform,\n shareData,\n}: IShareButton) => {\n const Component = config(platform)?.component\n const Icon = config(platform)?.icon\n\n return (\n <>\n {Component && (\n <Component {...shareData}>\n <div className=\"social-media-sharing\">\n <div className=\"share-icon\">\n <Icon size={32} round />\n </div>\n <span className=\"share-text\">\n {mainLabel}\n <br /> {subLabel}\n </span>\n </div>\n </Component>\n )}\n </>\n )\n}\n\ninterface SocialButtonsTypes {\n shareLink: string;\n name: string;\n appId: string;\n showDefaultShareButtons: boolean;\n shareButtons: IShareButton[];\n clientLabel?: string;\n showReferralsInfoText?: boolean;\n}\n\nconst SocialButtons = ({\n showDefaultShareButtons,\n shareLink,\n name,\n appId,\n shareButtons,\n clientLabel,\n showReferralsInfoText,\n}: SocialButtonsTypes) => (\n <>\n <div className=\"convenient_buttons\">\n or use one of these convenient buttons:\n </div>\n <div className=\"social-media-btns\">\n {showDefaultShareButtons && (\n <>\n <SocialComponent\n mainLabel=\"Share on\"\n subLabel=\"Facebook\"\n platform=\"facebook\"\n shareData={{\n quote: name,\n url: shareLink,\n }}\n />\n <SocialComponent\n mainLabel=\"Tweet to your\"\n subLabel=\"Followers\"\n platform=\"twitter\"\n shareData={{\n title: name,\n url: shareLink,\n }}\n />\n <SocialComponent\n mainLabel=\"Message friends on\"\n subLabel=\"Facebook\"\n platform=\"messenger\"\n shareData={{\n appId,\n url: shareLink,\n }}\n />\n <SocialComponent\n mainLabel=\"Message friends on\"\n subLabel=\"Whatsapp\"\n platform=\"whatsapp\"\n shareData={{\n title: name,\n url: shareLink,\n }}\n />\n </>\n )}\n {shareButtons.map((shareButton: IShareButton, index: number) => (\n <SocialComponent key={index} {...shareButton} />\n ))}\n </div>\n {(showDefaultShareButtons || shareButtons.length) && (\n <p>\n We <strong>never</strong> post on Facebook without your permission!\n </p>\n )}\n {(showReferralsInfoText || Boolean(clientLabel)) && (\n <p className=\"note-message\">\n <span>\n *Please note, only purchases made from a different{' '}\n {clientLabel || 'Ticket Fairy'} account can count towards your\n referrals\n </span>\n <span>\n {' '}\n so please make sure you ask your friends to buy their own tickets\n using their own {clientLabel || 'Ticket Fairy'} account!\n </span>\n </p>\n )}\n </>\n)\n\nexport default SocialButtons\n","import Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport CircularProgress from '@mui/material/CircularProgress'\nimport Modal from '@mui/material/Modal'\nimport _identity from 'lodash/identity'\nimport React, { FC } from 'react'\n\ninterface Props {\n message: string;\n loading?: boolean;\n hideCancelBtn?: boolean;\n onClose: () => void;\n onConfirm: () => void;\n}\n\nconst style: React.CSSProperties = {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n minWidth: 480,\n backgroundColor: '#e3e3e3',\n border: '1px solid white',\n outline: 'none',\n padding: '14px',\n maxHeight: '85vh',\n overflow: 'auto',\n}\n\nconst ConfirmModal: FC<Props> = ({\n message = '',\n loading = false,\n hideCancelBtn = false,\n onClose = _identity,\n onConfirm = _identity,\n}) => (\n <Modal\n open={true}\n onClose={onClose}\n aria-labelledby=\"modal-modal-title\"\n aria-describedby=\"modal-modal-description\"\n className=\"confirm-modal\"\n >\n <Box style={style}>\n <p>{message}</p>\n <div className=\"footer\">\n {!hideCancelBtn && (\n <Button onClick={onClose} disabled={loading}>\n Cancel\n </Button>\n )}\n <Button onClick={onConfirm}>\n {loading ? <CircularProgress size=\"22px\" /> : 'OK'}\n </Button>\n </div>\n </Box>\n </Modal>\n)\n\nexport default ConfirmModal\n","import React, { useEffect, useState } from 'react'\nimport moment from 'moment-timezone'\nimport './style.css'\n\ninterface CountdownTypes {\n startDate: string;\n timezone?: string;\n title?: string;\n message?: string;\n showMessage?: boolean;\n disableLeadingZero?: boolean;\n callback?: () => void;\n isLoggedIn?: boolean;\n}\n\nconst isTimeExpired = (startDate: string, timezone: string) => {\n return !moment(startDate).isAfter(moment.tz(moment(), timezone).format('YYYY-MM-DD HH:mm:ss'))\n}\n\nfunction Countdown({\n startDate,\n timezone = moment.tz.guess(),\n title = '',\n message = '',\n showMessage = false,\n disableLeadingZero = false,\n callback = () => {},\n isLoggedIn\n}: CountdownTypes) {\n const [duration, setDuration] = useState('')\n const [timeExpired, setTimeExpired] = useState(false)\n\n useEffect(() => {\n setTimeExpired(isTimeExpired(startDate, timezone))\n }, [])\n\n useEffect(() => {\n let timer: any;\n\n if(!timeExpired) {\n timer = setInterval(() => {\n if(isTimeExpired(startDate, timezone)) {\n clearInterval(timer)\n setTimeExpired(true)\n callback()\n return\n }\n\n const currentDate = moment.tz(moment(), timezone).format('YYYY-MM-DD HH:mm:ss')\n const diffTime = moment(startDate).diff(currentDate)\n const duration = moment.duration(diffTime)\n const dateArr: any = {\n year: duration.years(),\n month: duration.months(),\n day: duration.days(),\n hour: duration.hours(),\n minute: duration.minutes(),\n second: duration.seconds(),\n }\n let timeLeft = ''\n \n for(let date in dateArr) {\n const unit = dateArr[date] === 1 ? date : date + 's'\n let val = dateArr[date]\n\n if (!disableLeadingZero && String(dateArr[date]).length === 1) {\n val = '0' + dateArr[date]\n }\n\n if(timeLeft) {\n timeLeft += `, ${val} ${unit}`\n } else if(dateArr[date]) {\n timeLeft += `${val} ${unit}`\n }\n }\n \n setDuration(timeLeft)\n }, 1000)\n }\n return () => {\n clearInterval(timer)\n }\n }, [timeExpired])\n\n return (\n <>\n {!timeExpired && duration && (\n <div className={`countdown ${!isLoggedIn ? 'countdown-on-bottom' : ''}`}>\n <div>\n <p className='title'>{title}</p>\n <p>{duration}</p>\n </div>\n {showMessage && <p className='message'>{message}</p>}\n </div>\n )}\n </>\n )\n}\n\nexport default Countdown\n","import React, { useState } from 'react'\nimport Button from '@mui/material/Button'\nimport CircularProgress from '@mui/material/CircularProgress'\nimport { Field, Form, Formik } from 'formik'\nimport { CustomField } from '../common/index'\nimport { addToWaitingList } from '../../api'\nimport {\n combineValidators,\n requiredValidator,\n emailValidator,\n} from '../../validators'\nimport { ErrorFocus } from '../../utils/formikErrorFocus'\n\nimport './style.css'\n\ninterface WaitingListProps {\n tickets: any;\n eventId: number;\n defaultMaxQuantity: number;\n}\n\ninterface WaitingListFields {\n ticketTypeId: string;\n quantity: string;\n firstName: string;\n lastName: string;\n email: string;\n}\n\nconst generateQuantity = (n: number) => {\n const quantityList = []\n for (let i = 1; i <= n; i++) {\n quantityList.push({ label: i, value: i })\n }\n return quantityList\n}\n \nconst WaitingList = ({ tickets = {}, eventId, defaultMaxQuantity = 10 }: WaitingListProps) => {\n const isWindowDefined = typeof window !== 'undefined'\n const userData =\n isWindowDefined && window.localStorage.getItem('user_data')\n ? JSON.parse(window.localStorage.getItem('user_data') || '')\n : {}\n\n const [showSuccessMessage, setShowSuccessMessage] = useState(false)\n const [loading, setLoading] = useState(false)\n const ticketTypesList = Object.values(tickets).map((d: any) => ({\n label: d.displayName,\n value: d.id,\n }))\n\n const showTicketsField = Boolean(ticketTypesList.length)\n\n const handleSubmit = async (values: WaitingListFields) => {\n try {\n setLoading(true)\n const requestData = {\n data: {\n attributes: values,\n },\n }\n const { data } = await addToWaitingList(eventId, requestData)\n\n if (data.success) {\n setShowSuccessMessage(true)\n }\n } catch (error) {\n } finally {\n setLoading(false)\n }\n }\n\n return (\n <div className=\"waiting-list\">\n {showSuccessMessage ? (\n <div className=\"success-message\">\n <p className=\"added-success-message\">You've been added to the waiting list!</p>\n <p>You'll be notified if tickets become available.</p>\n </div>\n ) : (\n <>\n <h2>WAITING LIST</h2>\n <Formik\n initialValues={{\n ticketTypeId: '',\n quantity: '',\n firstName: userData.first_name || '',\n lastName: userData.last_name || '',\n email: userData.email || '',\n }}\n onSubmit={handleSubmit}\n >\n <Form>\n <ErrorFocus />\n {showTicketsField && (\n <>\n <div className=\"field-item\">\n <Field\n name=\"ticketTypeId\"\n label=\"Type of Ticket\"\n type=\"select\"\n component={CustomField}\n selectOptions={[\n { label: 'Type of Ticket', value: '', disabled: true },\n ...ticketTypesList,\n ]}\n />\n </div>\n <div className=\"field-item\">\n <Field\n name=\"quantity\"\n label=\"Quantity Requested\"\n type=\"select\"\n component={CustomField}\n selectOptions={[\n {\n label: 'Quantity Requested',\n value: '',\n disabled: true,\n },\n ...generateQuantity(defaultMaxQuantity ?? 10),\n ]}\n />\n </div>\n </>\n )}\n <div className=\"field-item\">\n <Field\n name=\"firstName\"\n label=\"First name\"\n validate={(value: string) =>\n requiredValidator(value, 'Please enter your First name')\n }\n component={CustomField}\n />\n </div>\n <div className=\"field-item\">\n <Field\n name=\"lastName\"\n label=\"Last name\"\n validate={(value: string) =>\n requiredValidator(value, 'Please enter your Last name')\n }\n component={CustomField}\n />\n </div>\n <div className=\"field-item\">\n <Field\n name=\"email\"\n label=\"Email\"\n validate={combineValidators(\n (value: string) =>\n requiredValidator(value, 'Please enter your Email'),\n (value: string) => emailValidator(value)\n )}\n component={CustomField}\n />\n </div>\n\n <Button\n type=\"submit\"\n variant=\"contained\"\n className=\"waiting-list-button\"\n >\n {loading ? (\n <CircularProgress size=\"22px\" />\n ) : (\n 'ADD TO WAITING LIST'\n )}\n </Button>\n </Form>\n </Formik>\n </>\n )}\n </div>\n )\n}\n\nexport default WaitingList\n","import React from 'react'\nimport Button from 'react-bootstrap/Button'\n\nexport interface IAccessCodeSectionProps {\n code: string;\n setCode: (value: string) => void;\n updateTickets: (value: boolean) => void;\n}\n\n// This section is seperate because additional changes layter may be applied to Access Code\n\nexport const AccessCodeSection = ({\n code,\n setCode,\n updateTickets\n}: IAccessCodeSectionProps) => {\n const isAccessCodeHasValue = !!code.trim()\n\n return (\n <div className=\"access-code-block\">\n <div className=\"access-code-block\">\n <p className=\"access-code-text\">\n Access code required\n </p>\n </div>\n <input\n className=\"access-code-input\"\n placeholder=\"\"\n onChange={e => {\n setCode(e.target.value)\n }}\n onKeyPress={event => {\n if (event.key === 'Enter' && isAccessCodeHasValue) {\n updateTickets(true)\n }\n }}\n />\n <Button\n className=\"access-submit-button\"\n onClick={() => {\n if (isAccessCodeHasValue) {\n updateTickets(true)\n }\n }}\n >\n ENTER\n </Button>\n </div>\n )\n}\n","import React from 'react'\nimport Button from 'react-bootstrap/Button'\nimport SVG from 'react-inlinesvg'\n\nimport DoneSvg from '../../assets/images/done.svg'\nimport XmarkSvg from '../../assets/images/xmark.svg'\n\nexport interface IPromoCodeSectionProps {\n code: string;\n codeIsApplied: boolean;\n showPromoInput: boolean;\n setCode: (value: string) => void;\n setShowPromoInput: (value: boolean) => void;\n updateTickets: (value: boolean, type: string) => void;\n setCodeIsApplied: (value: boolean) => void;\n codeIsInvalid: boolean;\n setCodeIsInvalid: (value: boolean) => void;\n promoText?: string;\n}\n\nexport const PromoCodeSection = ({\n code,\n codeIsApplied,\n showPromoInput,\n setCode,\n setShowPromoInput,\n updateTickets,\n setCodeIsApplied,\n codeIsInvalid,\n setCodeIsInvalid,\n promoText,\n}: IPromoCodeSectionProps) => {\n const isPromoCodeHasValue = !!code.trim()\n\n const renderInputField = () => (\n <div className=\"promo-code-block\">\n <div className=\"promo-code-block\">\n <p className=\"promo-code-text\">Promo code</p>\n </div>\n <input\n className=\"promo-code-input\"\n placeholder=\"\"\n onChange={e => {\n setCode(e.target.value)\n }}\n onKeyPress={event => {\n if (event.key === 'Enter' && isPromoCodeHasValue) {\n setShowPromoInput(false)\n updateTickets(true, 'promo')\n }\n }}\n />\n <Button\n className=\"promo-submit-button\"\n onClick={() => {\n if (isPromoCodeHasValue) {\n setShowPromoInput(false)\n updateTickets(true, 'promo')\n }\n }}\n >\n APPLY\n </Button>\n </div>\n )\n\n return (\n <div>\n {codeIsApplied ? (\n <div className=\"alert-info\">\n <SVG\n src={DoneSvg}\n preProcessor={code =>\n code.replace(/fill=\".*?\"/g, 'fill=\"currentColor\"')\n }\n />\n <p className=\"promo-code-success\">PROMO CODE APPLIED SUCCESSFULLY</p>\n </div>\n ) : null}\n {codeIsInvalid ? (\n <div className=\"alert-info fail\">\n <SVG\n src={XmarkSvg}\n />\n <p className=\"promo-code-fail\">Invalid Promo Code</p>\n </div>\n ) : null}\n {!showPromoInput && (\n <Button\n className=\"promo-code-button\"\n placeholder=\"Promo Codes\"\n onClick={() => {\n setCodeIsApplied(false)\n setShowPromoInput(true)\n setCodeIsInvalid(false)\n }}\n >\n {promoText ?? 'Got a promo code? Click here'}\n </Button>\n )}\n {showPromoInput && renderInputField()}\n </div>\n )\n}","import { useEffect } from 'react'\n\nimport { postReferralVisits } from '../../api'\n\ninterface IReferralLogicProps {\n eventId: string | number;\n}\n\nexport const ReferralLogic = (props: IReferralLogicProps) => {\n const { eventId } = props\n\n useEffect(() => {\n const isWindowDefined = typeof window !== 'undefined'\n\n if (isWindowDefined) {\n const params: URLSearchParams = new URL(`${window.location}`).searchParams\n const referralId = params.get('ttf_r') || ''\n const referralValue = [eventId, '.', referralId].join('')\n const isAlreadyCounted = localStorage.getItem('referral_key') === referralValue\n\n if (referralId && eventId && !isAlreadyCounted) {\n (async () => {\n try {\n await postReferralVisits(`${eventId}`, referralId)\n localStorage.setItem('referral_key', referralValue)\n } catch (error) {}\n })()\n }\n }\n }, [eventId])\n\n return null\n}\n","import './style.css'\n\nimport Box from '@mui/material/Box'\nimport FormControl from '@mui/material/FormControl'\nimport MenuItem from '@mui/material/MenuItem'\nimport Select from '@mui/material/Select'\nimport _get from 'lodash/get'\nimport React from 'react'\n\nimport { getTicketSelectOptions } from './utils'\n\ninterface ITicketRowProps {\n ticketTier: any;\n prevTicketTier: any;\n selectedTickets: any;\n handleTicketSelect: any;\n isSeatMapAllowed?: any;\n tableType?: boolean;\n}\n\nexport const TicketRow = ({\n ticketTier,\n prevTicketTier,\n selectedTickets,\n handleTicketSelect,\n isSeatMapAllowed,\n tableType,\n}: ITicketRowProps) => {\n const soldOutMessage = ticketTier.soldOutMessage\n ? `${ticketTier.soldOutMessage}`.toUpperCase()\n : 'SOLD OUT'\n const isSalesClosed = !ticketTier.salesStarted || ticketTier.salesEnded\n const maxCount = tableType ? ticketTier.maxGuests : ticketTier.maxQuantity\n const minCount = tableType ? ticketTier.minGuests : ticketTier.minQuantity\n const { multiplier } = ticketTier\n const options = getTicketSelectOptions(maxCount, minCount, multiplier)\n\n const ticketsClosedMessage = !ticketTier.salesStarted\n ? 'Sales not started'\n : 'Sales Ended'\n const canPurchaseTicket = ticketTier.displayTicket && ticketTier.maxQuantity\n const isDirectPurchaseAllowed = _get(ticketTier, 'allowDirectPurchase', false)\n\n const onSaleContent = (\n <div className=\"get-tickets\">\n {ticketTier.isTable && <span>GUESTS</span>}\n <Box className=\"get-tickets__selectbox\">\n <FormControl fullWidth>\n <Select\n sx={{ borderRadius: 0 }}\n value={\n selectedTickets[ticketTier.id]\n ? selectedTickets[ticketTier.id]\n : 0\n }\n onChange={handleTicketSelect}\n displayEmpty\n inputProps={{ 'aria-label': 'Without label' }}\n MenuProps={{\n PaperProps: {\n sx: { maxHeight: 150 },\n className: 'get-tickets-paper',\n },\n }}\n >\n {options.map((option, index) => (\n <MenuItem key={index} value={option.value}>\n {option.value}\n </MenuItem>\n ))}\n </Select>\n </FormControl>\n </Box>\n </div>\n )\n\n let returnValue: any = ''\n\n // ticketTier.soldOut === false --> means that ticket is in the stock\n const isSoldOut =\n ticketTier.sold_out ||\n !ticketTier.displayTicket ||\n ticketTier.soldOut ||\n ticketTier.soldOut === false\n\n if (isSoldOut) {\n returnValue = soldOutMessage\n } else if (isSalesClosed) {\n returnValue = ticketsClosedMessage\n } else if (\n canPurchaseTicket &&\n isSeatMapAllowed &&\n !isDirectPurchaseAllowed\n ) {\n // Seat Map Tickets renderer logic\n returnValue = null\n } else if (canPurchaseTicket) {\n returnValue = onSaleContent\n } else if (_get(prevTicketTier, 'in_stock')) {\n returnValue = 'SOON'\n }\n\n return <>{returnValue} </>\n}\n","export const getTicketSelectOptions = (\n maxCount = 10,\n minCount = 1,\n multiplier = 1\n) => {\n const options = [{ label: 0, value: 0 }]\n for (let i = minCount; i <= Math.min(50, maxCount); i += multiplier) {\n options.push({ label: i, value: i })\n }\n return options\n}\n","import './style.css'\n\nimport _sortBy from 'lodash/sortBy'\nimport React, { ReactNode } from 'react'\n\nimport { TicketRow } from './TicketRow'\n\ninterface ITicketsSectionProps {\n event: any;\n ticketsList: any;\n selectedTickets: any;\n handleTicketSelect: any;\n sortBySoldOut: boolean;\n hideTicketsHeader: boolean;\n hideTableTicketsHeader: boolean;\n tableTickets: any;\n ticketsHeaderComponent?: ReactNode;\n tableTicketsHeaderComponent?: ReactNode;\n showGroupNameBlock?: boolean;\n currencySybmol?: string;\n isSeatMapAllowed?: boolean;\n}\n\nexport const TicketsSection = ({\n event = { currency: {} },\n ticketsList,\n selectedTickets,\n handleTicketSelect,\n sortBySoldOut,\n ticketsHeaderComponent,\n tableTicketsHeaderComponent,\n hideTicketsHeader,\n hideTableTicketsHeader,\n showGroupNameBlock,\n currencySybmol,\n isSeatMapAllowed,\n tableTickets,\n}: ITicketsSectionProps) => {\n const {\n currency: { symbol },\n } = event\n const sortedTicketsList = sortBySoldOut\n ? _sortBy(_sortBy(ticketsList, 'sortOrder'), 'soldOut')\n : _sortBy(ticketsList, 'sortOrder')\n const showGroup = !!sortedTicketsList.find(ticket => ticket.groupName)\n const priceSymbol = currencySybmol ? currencySybmol : symbol\n return (\n <>\n {!hideTicketsHeader && ticketsHeaderComponent}\n {sortedTicketsList.map((ticket, i, arr) => {\n const ticketPrice = `${priceSymbol} ${(+ticket.price).toFixed(2)}`\n const ticketOldPrice = `${priceSymbol} ${(+ticket.oldPrice).toFixed(2)}`\n\n const isSoldOut =\n ticket.sold_out || !ticket.displayTicket || ticket.soldOut\n const ticketSelect = (event: any) => {\n const { value } = event.target\n handleTicketSelect(ticket.id, value)\n }\n\n let ticketIsDiscounted = false\n if (ticket.oldPrice && !isSoldOut && ticket.oldPrice !== ticket.price) {\n ticketIsDiscounted = true\n }\n\n const ticketIsFree = +ticket.price === 0\n const ticketPriceElem = isSoldOut\n ? 'SOLD OUT'\n : ticketIsFree\n ? 'FREE'\n : ticketPrice\n const isNewGroupTicket = ticket?.groupName !== arr[i - 1]?.groupName\n\n return (\n <React.Fragment key={ticket.id || ticket.name}>\n {showGroupNameBlock && showGroup && isNewGroupTicket ? (\n <div className=\"event-detail__tier group-title\">\n {ticket.groupName || ''}\n </div>\n ) : null}\n <div\n className={`event-detail__tier ${isSoldOut ? 'disabled' : ''}`}\n >\n <div className=\"event-detail__tier-name\">\n {ticket.displayName || ticket.name}\n </div>\n <div className=\"event-tickets-container\">\n <div className=\"event-detail__tier-price\">\n {ticketIsDiscounted && (\n <p className=\"old-price\">{ticketOldPrice}</p>\n )}\n <p className={isSoldOut ? 'sold-out' : ''}>\n {ticketPriceElem}\n </p>\n {!isSoldOut && !ticketIsFree && (\n <p className=\"fees\">\n {ticket.feeIncluded ? '(incl. Fees)' : '(excl. Fees)'}\n </p>\n )}\n </div>\n <div\n className=\"event-detail__tier-state\"\n style={{ minWidth: 55 }}\n >\n <TicketRow\n ticketTier={ticket}\n prevTicketTier={arr[i - 1]}\n selectedTickets={selectedTickets}\n handleTicketSelect={ticketSelect}\n />\n </div>\n </div>\n </div>\n </React.Fragment>\n )\n })}\n {!hideTableTicketsHeader && tableTicketsHeaderComponent}\n {tableTickets.map((ticket: any, i: any, arr: any) => {\n const ticketPrice = `${priceSymbol} ${(+ticket.price).toFixed(2)}`\n const ticketOldPrice = `${priceSymbol} ${(+ticket.oldPrice).toFixed(2)}`\n\n const isSoldOut =\n ticket.sold_out || !ticket.displayTicket || ticket.soldOut\n const ticketSelect = (event: any) => {\n const { value } = event.target\n handleTicketSelect(ticket.id, value, true)\n }\n\n let ticketIsDiscounted = false\n if (ticket.oldPrice && !isSoldOut && ticket.oldPrice !== ticket.price) {\n ticketIsDiscounted = true\n }\n\n const ticketIsFree = +ticket.price === 0\n const ticketPriceElem = isSoldOut\n ? 'SOLD OUT'\n : ticketIsFree\n ? 'FREE'\n : ticketPrice\n const isNewGroupTicket = ticket?.groupName !== arr[i - 1]?.groupName\n\n return (\n <>\n <React.Fragment key={ticket.id || ticket.name}>\n {showGroupNameBlock && showGroup && isNewGroupTicket ? (\n <div className=\"event-detail__tier group-title\">\n {ticket.groupName || ''}\n </div>\n ) : null}\n <div\n className={`event-detail__tier ${isSoldOut ? 'disabled' : ''}`}\n >\n <div className=\"event-detail__tier-name\">\n {ticket.displayName || ticket.name}\n </div>\n <div className=\"event-tickets-container\">\n <div className=\"event-detail__tier-price\">\n {ticketIsDiscounted && (\n <p className=\"old-price\">{ticketOldPrice}</p>\n )}\n <p className={isSoldOut ? 'sold-out' : ''}>\n {ticketPriceElem}\n </p>\n {!isSoldOut && !ticketIsFree && (\n <p className=\"fees\">\n {ticket.feeIncluded ? '(incl. Fees)' : '(excl. Fees)'}\n </p>\n )}\n {ticket.depositPercent && (\n <p className=\"deposits\">\n {ticket.depositPercent + '% DEPOSIT'}\n </p>\n )}\n </div>\n <div\n className=\"event-detail__tier-state\"\n style={{ minWidth: 55 }}\n >\n <TicketRow\n tableType={true}\n ticketTier={ticket}\n prevTicketTier={arr[i - 1]}\n selectedTickets={selectedTickets}\n handleTicketSelect={ticketSelect}\n isSeatMapAllowed={isSeatMapAllowed}\n />\n </div>\n </div>\n </div>\n </React.Fragment>\n </>\n )\n })}\n </>\n )\n}\n","import _map from 'lodash/map'\nimport moment from 'moment-timezone'\nimport React from 'react'\n\nconst EventInfoItem = ({ image, name }: EventInfoTypes) => (\n <div className=\"event-info\">\n <img src={image} alt=\"event\" />\n {name}\n </div>\n)\n\nconst tableConfig = (columns?: IColumnData[], key?: string) => {\n let config\n\n if (columns) {\n return {\n header: _map(columns, item => item.label),\n body: _map(columns, item => {\n if (item.component) {\n const ItemComponent = item.component\n return (row: RowItems) => ({\n columnProps: item,\n component: <ItemComponent {...row} />,\n })\n }\n\n if (item.key === 'event') {\n return (row: RowItems) => ({\n columnProps: item,\n component: <EventInfoItem image={row.image} name={row.eventName} />,\n })\n }\n\n if (item.key === 'total') {\n return (row: RowItems) => ({\n columnProps: item,\n component: row.currency + row.amount,\n })\n }\n\n return (row: RowItems) => ({\n columnProps: item,\n component: item.normalizer\n ? item.normalizer(row[item.key as keyof RowItems])\n : row[item.key as keyof RowItems],\n })\n }) as ITableBodyType[],\n }\n }\n\n switch (key) {\n default:\n config = {\n header: ['Order No.', 'Date', 'Event', 'Total'],\n body: [\n (row: RowItems) => ({\n columnProps: {} as IColumnData,\n component: row.id,\n }),\n (row: RowItems) => ({\n columnProps: {} as IColumnData,\n component: row.timezone\n ? moment.tz(row.date, row.timezone).format('DD MMMM YYYY')\n : row.date,\n }),\n (row: RowItems) => ({\n columnProps: {} as IColumnData,\n component: <EventInfoItem image={row.image} name={row.eventName} />,\n }),\n (row: RowItems) => ({\n columnProps: {} as IColumnData,\n component: row.currency + row.amount,\n }),\n ] as ITableBodyType[],\n }\n }\n return config\n}\n\nexport default tableConfig\n","import TableCell from '@mui/material/TableCell'\nimport TableRow from '@mui/material/TableRow'\nimport _get from 'lodash/get'\nimport _identity from 'lodash/identity'\nimport React from 'react'\n\nimport tableConfig from './tableConfig'\n\nconst Row = ({\n row,\n handleDetailsInfo,\n columns = [],\n hideDetailsButton,\n}: RowPropsTypes) => (\n <TableRow sx={{ '& > *': { borderBottom: 'unset' } }}>\n {tableConfig(columns).body.map((column: ITableBodyType, index: number) => (\n <TableCell\n component=\"th\"\n scope=\"row\"\n key={index}\n onClick={e => {\n const { columnProps, component }: IRowReturnType = column(row)\n const onCellClick = columnProps?.onCellClick || _identity\n const componentProps = _get(component, 'props', {})\n\n onCellClick(componentProps, e)\n }}\n >\n {column(row).component}\n </TableCell>\n ))}\n {!hideDetailsButton && (\n <TableCell component=\"th\" scope=\"row\">\n <button\n type=\"button\"\n className=\"order-details-button\"\n onClick={() => handleDetailsInfo(row.id)}\n >\n Details\n </button>\n </TableCell>\n )}\n </TableRow>\n)\n\nexport default Row\n","import React from 'react'\nimport FormGroup from '@mui/material/FormGroup'\nimport FormControlLabel from '@mui/material/FormControlLabel'\nimport Radio from '@mui/material/Radio';\nimport { FieldInputProps } from 'formik'\nimport { useTheme } from '@mui/styles'\n\nexport interface IRadioField {\n label: string | number | JSX.Element;\n field?: FieldInputProps<any>;\n}\n\ninterface IOtherProps {\n [key: string]: any;\n}\n\nexport const RadioField = ({\n label,\n field,\n theme,\n disableDropdown,\n ...rest\n}: IRadioField & IOtherProps) => {\n const customTheme: any = useTheme()\n return (\n <FormGroup>\n <FormControlLabel\n control={<Radio {...field} {...rest} />}\n label={label}\n componentsProps={{\n typography: customTheme?.checkbox\n }}\n />\n </FormGroup>\n )\n}\n","import './style.css'\n\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport CircularProgress from '@mui/material/CircularProgress'\nimport Modal from '@mui/material/Modal'\nimport { Field, Form, Formik } from 'formik'\nimport React from 'react'\nimport SVG from 'react-inlinesvg'\nimport * as yup from 'yup'\n\nimport EmailSvg from '../../assets/images/email.svg'\nimport UserSvg from '../../assets/images/user.svg'\nimport { CheckboxField } from '../common/CheckboxField'\nimport { CustomField } from '../common/CustomField'\nimport { RadioField } from '../common/RadioField'\nimport { ITicketTypes } from '../orderDetailsContainer/ticketsTable'\n\ninterface Props {\n ticket: ITicketTypes;\n onClose: () => void;\n onSubmit: (values: InitialValuesTypes) => void;\n loading?: boolean;\n}\n\nexport interface InitialValuesTypes {\n to: string;\n first_name: string;\n last_name: string;\n email: string;\n confirm_email: string;\n confirm: boolean;\n}\n\nconst style: React.CSSProperties = {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n minWidth: 480,\n backgroundColor: '#e3e3e3',\n border: '1px solid white',\n outline: 'none',\n padding: '14px',\n maxHeight: '85vh',\n overflow: 'auto'\n}\n\nconst schema = yup.object().shape({\n to: yup.string().required(),\n first_name: yup.string().when('to', {\n is: (to: string) => to === 'friend',\n then: yup.string().required('First Name is required')\n }),\n last_name: yup.string().when('to', {\n is: (to: string) => to === 'friend',\n then: yup.string().required('Last Name is required')\n }),\n email: yup.string().when('to', {\n is: (to: string) => to === 'friend',\n then: yup.string().email('Invalid email').required('Email is required')\n }),\n confirm_email: yup.string().when('to', {\n is: (to: string) => to === 'friend',\n then: yup.string().email('Invalid email').oneOf([yup.ref('email'), null], 'Emails must match').required('Confirm Email is required')\n }),\n confirm: yup.boolean().oneOf([true])\n})\n\nconst initialValues: InitialValuesTypes = {\n to: 'friend',\n first_name: '',\n last_name: '',\n email: '',\n confirm_email: '',\n confirm: false\n}\n\nexport const TicketResaleModal = ({\n ticket = {} as ITicketTypes,\n onClose = () => { },\n onSubmit = () => { },\n loading = false\n}: Props) => {\n const { hash, holder_name, event_name, currency, retain_amount_on_sale, ticket_type_is_active } = ticket\n\n return (\n <Modal\n open={true}\n onClose={onClose}\n aria-labelledby=\"modal-modal-title\"\n aria-describedby=\"modal-modal-description\"\n className='resale-modal'\n >\n <Box style={style}>\n <h3>Sell Ticket</h3>\n <div>\n <h3>Ticket Details</h3>\n <div>\n <h4>Event</h4>\n <p>{event_name}</p>\n </div>\n <div>\n <h4>Ticket Holder</h4>\n <p>{holder_name}</p>\n </div>\n <div>\n <h4>Ticket ID</h4>\n <p>{hash}</p>\n </div>\n </div>\n <div>\n <h3>Sell to Whom</h3>\n <Formik\n initialValues={initialValues}\n validationSchema={schema}\n onSubmit={onSubmit}\n >\n {({ values, isValid, dirty }) => (\n <Form>\n <div>\n <Field\n name='to'\n label='I want to sell the ticket to someone I know'\n type='radio'\n value='friend'\n component={RadioField}\n />\n {values.to === 'friend' && (\n <div className='sell-to-friend'>\n <div className='user-info-box'>\n <div className='field-box'>\n <div className='icon'>\n <SVG\n src={UserSvg}\n width='24'\n height='24'\n />\n </div>\n <Field\n name='first_name'\n label='First Name'\n type='text'\n component={CustomField}\n />\n </div>\n <div className='field-box'>\n <div className='empty-box' />\n <Field\n name='last_name'\n label='Last Name'\n type='text'\n component={CustomField}\n />\n </div>\n </div>\n <div className='email-info-box'>\n <div className='field-box'>\n <div className='icon'>\n <SVG\n src={EmailSvg}\n width='24'\n height='24'\n />\n </div>\n <Field\n name='email'\n label='Email address'\n type='text'\n component={CustomField}\n />\n </div>\n <div className='field-box'>\n <div className='empty-box' />\n <Field\n name='confirm_email'\n label='Confirm Email address'\n type='text'\n component={CustomField}\n />\n </div>\n </div>\n </div>\n )}\n </div>\n {ticket_type_is_active && (\n <div>\n <Field\n name=\"to\"\n label=\"I will sell my ticket to anyone who wants to buy it\"\n type=\"radio\"\n value=\"anyone\"\n component={RadioField}\n />\n </div>\n )}\n <div>\n <h4>Terms of Resale</h4>\n <p>I confirm that I want to sell this ticket and that, if someone chooses to buy it, I will no longer own it or have the right to ask for it back.</p>\n <p>I also understand that, if no one chooses to buy it, it remains my property, is valid for entry to <strong>{event_name}</strong> and I will not receive any refund.</p>\n <p>If my ticket is sold, the original card I used to buy my ticket will be refunded with the original amount paid, minus a small handling fee of <strong>{`${currency ?? ''} ${retain_amount_on_sale ?? '0'}`}</strong>, and that any existing refunds due to me for referring sales for this event are no longer valid.</p>\n <Field\n name='confirm'\n label='I agree'\n type='checkbox'\n component={CheckboxField}\n />\n </div>\n <div className=\"resale-action-button\">\n <Button\n type=\"submit\"\n disabled={!(isValid && dirty)}\n >\n {loading ? <CircularProgress size=\"22px\" /> : 'Sell Ticket'}\n </Button>\n </div>\n </Form>\n )}\n </Formik>\n </div>\n </Box>\n </Modal>\n )\n}\n","import CircularProgress from '@mui/material/CircularProgress'\nimport Paper from '@mui/material/Paper'\nimport Table from '@mui/material/Table'\nimport TableBody from '@mui/material/TableBody'\nimport TableCell from '@mui/material/TableCell'\nimport TableContainer from '@mui/material/TableContainer'\nimport TableHead from '@mui/material/TableHead'\nimport TableRow from '@mui/material/TableRow'\nimport _identity from 'lodash/identity'\nimport _map from 'lodash/map'\nimport React, { Fragment, useState } from 'react'\n\nimport { downloadPDF } from '../../utils'\nimport SnackbarAlert from '../common/SnackbarAlert'\n\ninterface IAddOnTypes {\n name: string;\n groupName: string;\n status: string;\n}\nexport interface ITicketTypes {\n add_ons?: IAddOnTypes[];\n hash: string;\n ticket_type: string;\n holder_name: string;\n status: string;\n pdf_link: string;\n is_sellable: boolean;\n is_on_sale?: boolean;\n event_name: string;\n currency: string;\n ticket_type_hash: string;\n ticket_type_is_active?: boolean;\n canSellTicket?: boolean;\n retain_amount_on_sale: number | string;\n ticketsTitle: string;\n}\n\nexport interface IActionColumns {\n download?: boolean;\n sell_ticket?: boolean;\n}\n\ninterface TicketsTableTypes {\n canSellTicket?: boolean;\n tickets: ITicketTypes[];\n columns: Array<{\n id?: string | number;\n key: keyof ITicketTypes & keyof IActionColumns;\n label: string | number | null | undefined;\n }>;\n handleSellTicket: (ticket: ITicketTypes) => void;\n handleRemoveFromResale: (ticket: ITicketTypes) => void;\n\n icon?: string;\n displayColumnNameInRow?: boolean;\n ticketsTitle?: string;\n}\n\ntype PdfDownload = {\n hash: string;\n loading: boolean;\n}\n\nconst TicketsTable = ({\n tickets = [],\n columns = [],\n handleSellTicket = _identity,\n handleRemoveFromResale = _identity,\n icon = '',\n displayColumnNameInRow = false,\n canSellTicket = true,\n ticketsTitle = 'Your Tickets',\n}: TicketsTableTypes) => {\n const [pdfError, setPdfError] = useState<string | null>(null)\n const [pdfDownload, setPdfDownload] = useState<PdfDownload>({\n hash: '',\n loading: false,\n })\n\n const getRow = (ticket: ITicketTypes) =>\n _map(columns, (column, columnIndex) => {\n if (column.key === 'download') {\n const ticketIsDownloading =\n pdfDownload.loading && pdfDownload.hash === ticket.hash\n\n if (!ticket.pdf_link || ticket.status === 'Sold' || ticket.is_on_sale)\n return <TableCell key={columnIndex}>{null}</TableCell>\n\n return (\n <TableCell key={columnIndex}>\n {Boolean(icon) && <img src={icon} alt=\"nodata\" />}\n <span\n aria-hidden={true}\n className=\"action-button\"\n onClick={async () => {\n if (ticketIsDownloading) {\n return\n }\n\n setPdfDownload({ hash: ticket.hash, loading: true })\n try {\n const pdfDownloadError = await downloadPDF(ticket.pdf_link)\n if (pdfDownloadError) {\n setPdfError(pdfDownloadError?.message)\n }\n } catch (err) {\n if (err && typeof err === 'string') {\n setPdfError(err)\n }\n } finally {\n setPdfDownload({ hash: '', loading: false })\n }\n }}\n >\n {ticketIsDownloading ? (\n <CircularProgress size=\"22px\" />\n ) : (\n 'Download'\n )}\n </span>\n </TableCell>\n )\n }\n\n if (column.key === 'sell_ticket') {\n return (\n <TableCell key={columnIndex}>\n {ticket.is_sellable && canSellTicket && (\n <span\n aria-hidden={true}\n className=\"action-button\"\n onClick={() => handleSellTicket(ticket)}\n >\n Sell Ticket\n </span>\n )}\n {ticket.is_on_sale && (\n <span\n aria-hidden={true}\n className=\"action-button\"\n onClick={() => handleRemoveFromResale(ticket)}\n >\n Remove from Resale\n </span>\n )}\n </TableCell>\n )\n }\n\n return displayColumnNameInRow ? (\n <TableCell key={columnIndex}>\n <div className=\"cell-block\">\n <span>{column.label}</span>\n <span>{ticket[column.key]}</span>\n </div>\n </TableCell>\n ) : (\n <TableCell key={columnIndex}>\n <div className=\"cell-block\">\n <span>{ticket[column.key]}</span>\n </div>\n </TableCell>\n )\n })\n\n return (\n <div className=\"tickets-box\">\n <SnackbarAlert\n type=\"error\"\n isOpen={!!pdfError}\n message={pdfError || ''}\n onClose={() => setPdfError(null)}\n />\n <h4 className=\"sub-title tickets-title\">{ticketsTitle}</h4>\n <TableContainer component={Paper}>\n <Table aria-label=\"collapsible table\">\n {displayColumnNameInRow ? null : (\n <TableHead>\n <TableRow>\n {_map(columns, item => (\n <TableCell key={item.key}>{item.label || ''}</TableCell>\n ))}\n </TableRow>\n </TableHead>\n )}\n <TableBody>\n {tickets.map((ticket: ITicketTypes, index: number) => (\n <Fragment key={index}>\n <TableRow>{getRow(ticket)}</TableRow>\n {!!ticket.add_ons?.length && (\n <TableRow>\n <TableCell colSpan={6}>\n <Table className=\"ticket-add-on-table\">\n <TableHead>\n <TableRow>\n <TableCell>Add-On</TableCell>\n <TableCell>Status</TableCell>\n </TableRow>\n </TableHead>\n <TableBody>\n {ticket.add_ons.map(\n (add_on: IAddOnTypes, index: number) => (\n <TableRow key={index}>\n <TableCell>{add_on.groupName}:{add_on.name}</TableCell>\n <TableCell>{add_on.status}</TableCell>\n </TableRow>\n )\n )}\n </TableBody>\n </Table>\n </TableCell>\n </TableRow>\n )}\n </Fragment>\n ))}\n </TableBody>\n </Table>\n </TableContainer>\n </div>\n )\n}\n\nexport default TicketsTable\n","import React, { FC, useState } from 'react'\nimport { Field, Form, Formik } from 'formik'\nimport { CircularProgress } from '@mui/material'\nimport { CustomField } from '../common/CustomField'\nimport axios, { AxiosError } from 'axios'\nimport * as Yup from 'yup'\nimport { resetPassword } from '../../api'\nimport './style.css'\n\ninterface IResetPasswordProps {\n token?: string\n onResetPasswordSuccess?: (res: any) => void\n onResetPasswordError?: (e: AxiosError) => void\n}\n\nconst Schema = Yup.object().shape({\n password: Yup.string()\n .min(6, 'Password must have 5+ characters')\n .required('Required'),\n password_confirmation: Yup.string()\n .required('Required')\n .oneOf([Yup.ref('password'), null], 'Passwords must match'),\n})\n\nexport const ResetPasswordContainer: FC<IResetPasswordProps> = ({\n token: tokenProps = '',\n onResetPasswordSuccess = () => {},\n onResetPasswordError = () => {},\n}) => {\n const [loading, setLoading] = useState(false)\n return (\n <div className=\"reset-password\">\n <div className=\"title\">Change Password</div>\n <Formik\n initialValues={{ password: '', password_confirmation: '' }}\n validationSchema={Schema}\n onSubmit={async (values: any) => {\n try {\n setLoading(true)\n let token\n if (tokenProps) {\n token = tokenProps\n } else {\n if (typeof window !== 'undefined') {\n const params: URLSearchParams = new URL(`${window.location}`)\n .searchParams\n token = params.get('token')\n }\n }\n\n const payload = {\n token,\n ...values,\n }\n const res = await resetPassword(payload)\n onResetPasswordSuccess(res)\n } catch (e) {\n if (axios.isAxiosError(e)) {\n onResetPasswordError(e)\n }\n } finally {\n setLoading(false)\n }\n }}\n >\n {({ isValid, dirty }) => (\n <Form>\n <div className=\"body\">\n <div className=\"field-item\">\n <Field\n name=\"password\"\n label=\"New Password\"\n type=\"password\"\n component={CustomField}\n />\n </div>\n <div className=\"field-item\">\n <Field\n name=\"password_confirmation\"\n label=\"Confirm Password\"\n type=\"password\"\n component={CustomField}\n />\n </div>\n </div>\n <div className=\"action-button\">\n <button type=\"submit\" disabled={!(isValid && dirty)}>\n {loading ? <CircularProgress size=\"22px\" /> : 'Submit'}\n </button>\n </div>\n </Form>\n )}\n </Formik>\n </div>\n )\n}\n","import _get from 'lodash/get'\nimport _isEmpty from 'lodash/isEmpty'\n\nexport interface IAddOnsData {\n add_on_groups: Array<{ [key: string]: any }>;\n add_ons: Array<[]>;\n}\n\nexport const addonsWithGroupsAdapter = (data: IAddOnsData) => {\n const addonsData = { ...data }\n const addOnsGroups = _get(addonsData, 'add_on_groups', [])\n const addons = _get(addonsData, 'add_ons', [])\n\n if (!_isEmpty(addOnsGroups)) {\n const addOnGroupsWithVariants: any = []\n const addOnsWithoutVariants: any = []\n\n addons.forEach((addon: any) => {\n if (addon.attributes.addOnGroupId) {\n // Collect addons groups inside with their variants\n const currentGroupId = addon.attributes.addOnGroupId\n const exsistingGroupIndex = addOnGroupsWithVariants.findIndex(\n (item: any) => item.id === currentGroupId\n )\n\n if (addOnGroupsWithVariants[exsistingGroupIndex]) {\n const addOnGroup = addOnGroupsWithVariants[exsistingGroupIndex]\n addOnGroupsWithVariants[exsistingGroupIndex] = {\n ...addOnGroup,\n variants: [...addOnGroup.variants, ...addon.attributes],\n }\n } else {\n const group =\n addOnsGroups.find(\n group => group.attributes.id === currentGroupId\n ) || {}\n\n addOnGroupsWithVariants.push({\n ...group.attributes,\n variants: [...addon.attributes],\n })\n }\n } else {\n addOnsWithoutVariants.push(addon.attributes)\n }\n })\n\n return addOnGroupsWithVariants.concat(addOnsWithoutVariants)\n }\n\n // Adapt only simple addons data\n const adaptedAddons = (addons as any[]).map((addon: any) => ({\n ...addon.attributes,\n }))\n return adaptedAddons\n}\n\nexport const cartAdapter = (cart: any) => {\n const cartData = _get(cart, 'data.data.attributes', [])\n const { expiresAt, cart: carts_arr } = cartData\n const { id, quantity } = carts_arr[0] || {}\n\n return { id, quantity, expiresAt }\n}\n","import { Field } from 'formik'\nimport _identity from 'lodash/identity'\nimport _isNull from 'lodash/isNull'\nimport React from 'react'\n\nimport { NativeSelectField } from '../common'\n\ninterface IAddonComponentProps {\n classNamePrefix: string;\n data: any;\n selectOptions: any;\n handleAddonChange?: (...res: any) => void;\n}\n\nconst AddonComponent = ({\n classNamePrefix = '',\n data,\n selectOptions,\n handleAddonChange = _identity,\n}: IAddonComponentProps) => {\n const { id, name, active, stock } = data\n\n return (\n <div key={id} className={`${classNamePrefix}_product_select_container`}>\n <div className={`${classNamePrefix}_product_select_block`} key={name}>\n <div className={`${classNamePrefix}_product_size`}>{name}</div>\n <div className={`${classNamePrefix}_product_qty_select_block`}>\n {!active || (!_isNull(stock) && stock <= 0) ? (\n <div className=\"sold_out\">SOLD OUT</div>\n ) : (\n <div className={`${classNamePrefix}_product_qty_select`}>\n <Field\n name={id}\n selectOptions={selectOptions}\n component={NativeSelectField}\n onChange={(e: any) => {\n const { value } = e.target\n handleAddonChange(id, value)\n }}\n />\n </div>\n )}\n </div>\n </div>\n </div>\n )\n}\n\nexport default AddonComponent\n","import _isEmpty from 'lodash/isEmpty'\nimport _isNull from 'lodash/isNull'\nimport _reverse from 'lodash/reverse'\nimport _sortBy from 'lodash/sortBy'\n\ninterface ObjectLiteral {\n [key: string]: any;\n}\n\nexport const generateSelectOptions = (minCount = 1, maxCount = 10) => {\n const options = []\n for (let i = minCount; i <= maxCount; i++) {\n options.push({ label: i, value: i })\n }\n return options\n}\n\nconst generateStockBasedOnLimitations = (\n addon: any,\n ticketQuantity: number\n) => {\n // Generate addon available stock count based on limitations\n const { flagLimitToTicketQuantity, maxQuantity, limitPerTicket } = addon\n\n let allowedStockCount\n\n // Generate stock\n if (flagLimitToTicketQuantity) {\n // Limited to ticket quantity case\n allowedStockCount = ticketQuantity\n } else if (maxQuantity && limitPerTicket) {\n const stockBasedOnLimitPerTicket = limitPerTicket * ticketQuantity\n // Both maximum quantity and limited to per ticket selected case, stock is minimum of them\n allowedStockCount =\n maxQuantity <= stockBasedOnLimitPerTicket\n ? maxQuantity\n : stockBasedOnLimitPerTicket\n } else if (maxQuantity && !limitPerTicket) {\n // Limited to maximum quantity case\n allowedStockCount = maxQuantity\n } else if (!maxQuantity && limitPerTicket) {\n // Limited to per ticket case\n allowedStockCount = limitPerTicket * ticketQuantity\n }\n\n return Number(allowedStockCount)\n}\n\nconst filterStockBasedOnAvailability = (\n generatedStock: any,\n availableStock: any\n) => {\n // Check generated stock count admissibility with addon stock availability\n let filteredStockCount = generatedStock\n\n if (generatedStock) {\n if (generatedStock > availableStock && !_isNull(availableStock)) {\n filteredStockCount = availableStock\n }\n } else {\n // Not set any restriction\n // Here 10 value is business logic\n filteredStockCount = 10\n\n if (!_isNull(availableStock) && availableStock < filteredStockCount) {\n filteredStockCount = availableStock\n }\n }\n\n return filteredStockCount\n}\n\nexport const getAddonSelectOptions = (addons: any, choosedTicketCount: any) => {\n const addonsWithOptions: ObjectLiteral = {}\n const groupsWithSelectedVariantsInfo: ObjectLiteral = {}\n const groupsWithVariants: ObjectLiteral = {}\n\n addons.forEach((addon: any) => {\n // Here addon can act either as simple Addon or Addon Group\n const {\n id,\n stock: simpleAddonStock,\n variants,\n active,\n flagLimitToTicketQuantity,\n maxQuantity,\n limitPerTicket,\n } = addon\n\n if (variants) {\n // Addon Group with inside addon variants case\n variants.forEach((variant: any) => {\n const { id: variantId, stock: variantStock } = variant\n\n // null checking is for unlimited stock value\n if (active && (variantStock > 0 || _isNull(variantStock))) {\n // Generate Addon Group allowed stock count based on limitations\n const stockBasedOnLimitation = generateStockBasedOnLimitations(\n addon,\n choosedTicketCount\n )\n\n // Detect if group has limitation or not\n if (flagLimitToTicketQuantity || maxQuantity || limitPerTicket) {\n // Generate Group with inside variants info\n if (groupsWithSelectedVariantsInfo[id]) {\n // Set group limit\n if (\n groupsWithSelectedVariantsInfo[id].limit <\n stockBasedOnLimitation\n ) {\n groupsWithSelectedVariantsInfo[\n id\n ].limit = stockBasedOnLimitation\n }\n\n // Set choosed variants info\n groupsWithSelectedVariantsInfo[id] = {\n ...groupsWithSelectedVariantsInfo[id],\n choosedVariants: {\n ...groupsWithSelectedVariantsInfo[id].choosedVariants,\n [variantId]: 0,\n },\n }\n } else {\n groupsWithSelectedVariantsInfo[id] = {\n limit: stockBasedOnLimitation,\n selectedCount: 0,\n choosedVariants: { [variantId]: 0 },\n }\n }\n }\n\n // Check stock admissibility with addon stock availability\n const allowedVariantStockCount = filterStockBasedOnAvailability(\n stockBasedOnLimitation,\n variantStock\n )\n\n // Generate options for variant\n const variantOptions = generateSelectOptions(\n 0,\n allowedVariantStockCount\n )\n\n addonsWithOptions[variantId] = [...variantOptions]\n\n // Generate Group with its variants list\n groupsWithVariants[id] = {\n ...groupsWithVariants[id],\n [variantId]: allowedVariantStockCount,\n }\n }\n })\n } else {\n // Simple addon case, null checking is for unlimited stock value\n if (active && (simpleAddonStock > 0 || _isNull(simpleAddonStock))) {\n // Generate Addon Group allowed stock count based on limitations\n const stockBasedOnLimitation = generateStockBasedOnLimitations(\n addon,\n choosedTicketCount\n )\n\n // Check stock admissibility with addon stock availability\n const allowedVariantStockCount = filterStockBasedOnAvailability(\n stockBasedOnLimitation,\n simpleAddonStock\n )\n\n const addonOptions = generateSelectOptions(0, allowedVariantStockCount)\n addonsWithOptions[id] = [...addonOptions]\n }\n }\n })\n\n return {\n addonsWithOptions,\n groupsWithSelectedVariantsInfo,\n groupsWithVariants,\n }\n}\n\nexport const getTicketRelatedAddons = (addons: any, ticketId: any) => {\n // Filter addons based on choosed ticket\n const filteredAddons: any = addons.filter(\n (addon: any) =>\n _isNull(addon.prerequisiteTicketTypeIds) ||\n addon.prerequisiteTicketTypeIds.includes(ticketId)\n )\n\n return filteredAddons\n}\n\nexport const getSortedAddons = (addons: any, sortDirection = 'asc') => {\n const addonsCopy = [...addons]\n\n addonsCopy.forEach(addon => {\n if (addon.variants) {\n const unsortedVariants: any = []\n addon.variants.forEach((variant: any) => {\n unsortedVariants.push({\n ...variant,\n sortOrder: Number(variant.sortOrder),\n })\n })\n addon.sortOrder = Number(addon.variants[0].sortOrder)\n const sortedVariants = _sortBy(\n unsortedVariants,\n variant => variant.sortOrder\n )\n addon.variants = sortedVariants\n } else {\n addon.sortOrder = Number(addon.sortOrder)\n }\n })\n\n const sortedAddons = _sortBy(addonsCopy, addon => addon.sortOrder)\n if (sortDirection === 'desc') {\n return _reverse(sortedAddons)\n }\n\n return sortedAddons\n}\n\nexport const isAtLeastOneAddonSelected = (value: any) => {\n const selectedAddons = Object.fromEntries(\n Object.entries(value).filter(([_, count]) => Number(count) !== 0)\n )\n\n return !_isEmpty(selectedAddons)\n}\n","import _get from 'lodash/get'\n\nimport { addToCart, getCheckoutPageConfigs, postOnCheckout } from '../../api'\nimport { createCheckoutDataBodyWithDefaultHolder } from '../../utils'\n\ninterface IAddToCartFuncProps {\n eventId: string | number;\n data: any;\n ticketQuantity: number;\n enableBillingInfoAutoCreate?: boolean;\n}\n\nexport const addToCartFunc = async ({\n eventId,\n data,\n ticketQuantity,\n enableBillingInfoAutoCreate = true,\n}: IAddToCartFuncProps) => {\n const isWindowDefined = typeof window !== 'undefined'\n\n const result = await addToCart(eventId, data)\n const pageConfigsDataResponse = await getCheckoutPageConfigs()\n\n if (result.status === 200 && pageConfigsDataResponse.status === 200) {\n const pageConfigsData =\n _get(pageConfigsDataResponse, 'data.attributes') || {}\n\n const {\n skip_billing_page: skipBillingPage = false,\n names_required: nameIsRequired = false,\n age_required: ageIsRequired = false,\n phone_required: phoneIsRequired = false,\n hide_phone_field: hidePhoneField = false,\n has_add_on: hasAddOn = false,\n free_ticket: freeTicket = false,\n collect_optional_wallet_address: collectOptionalWalletAddress = false,\n collect_mandatory_wallet_address: collectMandatoryWalletAddress = false,\n } = pageConfigsData\n\n let hash = ''\n let total = ''\n\n isWindowDefined && window.localStorage.removeItem('add_ons')\n\n if (skipBillingPage && !hasAddOn) {\n // Get user data for checkout data\n const userData =\n isWindowDefined && window.localStorage.getItem('user_data')\n ? JSON.parse(window.localStorage.getItem('user_data') || '')\n : {}\n\n const checkoutBody = createCheckoutDataBodyWithDefaultHolder(\n ticketQuantity,\n userData\n )\n\n const checkoutResult = enableBillingInfoAutoCreate\n ? await postOnCheckout(checkoutBody, undefined, freeTicket)\n : null\n\n hash = _get(checkoutResult, 'data.data.attributes.hash') || ''\n total = _get(checkoutResult, 'data.data.attributes.total') || ''\n }\n\n return {\n skip_billing_page: skipBillingPage,\n names_required: nameIsRequired,\n phone_required: phoneIsRequired,\n age_required: ageIsRequired,\n hide_phone_field: hidePhoneField,\n free_ticket: freeTicket,\n collect_optional_wallet_address: collectOptionalWalletAddress,\n collect_mandatory_wallet_address: collectMandatoryWalletAddress,\n event_id: String(eventId),\n hash,\n total,\n hasAddOn,\n }\n }\n\n return null\n}\n","import _find from 'lodash/find'\nimport _forEach from 'lodash/forEach'\nimport _isEmpty from 'lodash/isEmpty'\nimport _values from 'lodash/values'\n\nexport const getTierIdBasedOnSeatId = (\n seatId: string,\n eventSeats: Array<EventSeat>\n) => {\n let tierId: number | string = ''\n\n _forEach(eventSeats, group => {\n _forEach(group.seats, (seatsCount, rowId) => {\n const [row_id, seat_id] = seatId.split(':')\n if (row_id === rowId && seat_id <= seatsCount) {\n tierId = Number(group.tier_id)\n return false\n }\n return true\n })\n })\n\n return tierId\n}\n\nexport const getButtonLabel = (count: number, tableMapEnabled: boolean) => {\n if (!count) {\n return tableMapEnabled ? `GET TABLES` : `GET TICKETS`\n } else if (count === 1) {\n return tableMapEnabled ? `GET ${count} TABLE` : `GET ${count} TICKET`\n }\n return tableMapEnabled ? `GET ${count} TABLES` : `GET ${count} TICKETS`\n}\n\nexport const getOwnReservationsBasedOnStatuses = (statuses: any) => {\n const ownReservations: string[] = []\n Object.keys(statuses).forEach((groupRowId: string) =>\n Object.keys(statuses[groupRowId]).forEach((seatIndex: string | number) => {\n if (statuses[groupRowId][seatIndex] === 'OR') {\n ownReservations.push(`${groupRowId}:${seatIndex}`)\n } else if (statuses[groupRowId][seatIndex] === 'H') {\n statuses[groupRowId][seatIndex] = 'BLOCKED'\n }\n })\n )\n return ownReservations\n}\n\nexport const getTicketDropdownData = (\n reservationData: Array<SeatReservationData>,\n tierReleations: TicketTypeTierRelations\n) => {\n const ticketsDropdownsData: Array<ITicketsDropdownsData> = []\n _forEach(reservationData, reservation => {\n if (tierReleations[reservation.tierId]) {\n const ticketsData = _values(tierReleations[reservation.tierId])\n ticketsDropdownsData.push({\n seatId: reservation.seatId,\n tierId: reservation.tierId,\n ticketsData,\n })\n } else {\n ticketsDropdownsData.push({\n seatId: reservation.seatId,\n tierId: reservation.tierId,\n ticketsData: [\n {\n ticket_type_tier_id: reservation.tierId,\n ticket_type_name: 'Please select Ticket Type',\n ticket_type_price: '',\n ticket_type_id: 'default',\n },\n ],\n })\n }\n })\n return ticketsDropdownsData\n}\n\nexport const getAddToCartRequestData = ({\n eventId,\n reservations = [],\n selectedSeats = [],\n selectedTickets = [],\n guestCounts = {},\n}: any) => {\n const hasGuests = !_isEmpty(guestCounts)\n\n const addToCartData = {\n attributes: {\n alternative_view_id: null,\n product_cart_quantity: reservations.length,\n product_options: {},\n product_id: eventId,\n ticket_types: {},\n },\n }\n\n const productOptions = {} as any\n const ticketTypes = {} as any\n\n _forEach(reservations, (item, index) => {\n const ticket = _find(\n selectedSeats[item],\n sitem => sitem.ticket_type_id === selectedTickets[item]\n )\n productOptions[ticket.ticket_type_option] = ticket.ticket_type_id\n\n const ticketTypesKey = hasGuests ? index : ticket.ticket_type_id\n const quantity = hasGuests\n ? guestCounts[item]\n : (ticketTypes[ticket.ticket_type_id]?.quantity || 0) + 1\n\n ticketTypes[ticketTypesKey] = {\n quantity,\n product_options: {\n [ticket.ticket_type_option]: ticket.ticket_type_id,\n ticket_price: ticket.ticket_type_price,\n },\n }\n })\n\n addToCartData.attributes.product_options = productOptions\n addToCartData.attributes.ticket_types = ticketTypes\n\n return addToCartData\n}\n\nexport const getTierRelationsArray = (\n data: Array<TicketTypeTierRelationsData>\n) => {\n const ticketTypeTireRelationsArray: Array<string | number> = []\n _forEach(data, (item: TicketTypeTierRelationsData) => {\n ticketTypeTireRelationsArray.push(..._values(item))\n })\n\n return ticketTypeTireRelationsArray\n}\n","import 'tf-seat-map-view/dist/index.css'\n\nimport React, { useEffect } from 'react'\nimport ReactDom from 'react-dom'\nimport SeatMapView from 'tf-seat-map-view'\n\nimport { getTierRelationsArray } from './utils'\n\nconst CONTAINER_DEFAULT_ID = 'seat_map_default_container'\n\n// Temp solution\ndeclare global {\n interface Window {\n tierPrices: any;\n }\n}\n\nexport const SeatMapComponent = (props: ISeatMapContainerProps) => {\n const { seatMapProps, mapContainerId } = props\n const {\n seatData,\n statuses,\n seatMapType = null,\n seatMapEvents = {},\n ticketTypeTierRelations = {},\n tierPrices,\n isReserving,\n predefinedSeats,\n } = seatMapProps\n\n useEffect(() => {\n const parentElement = document.getElementById(\n mapContainerId || CONTAINER_DEFAULT_ID\n )\n\n // Temp solution\n window.tierPrices = tierPrices\n\n if (Boolean(parentElement)) {\n const mapComponent = (\n <SeatMapView\n disabled={isReserving}\n loading={isReserving}\n events={seatMapEvents}\n isSelectionOn={false}\n seatData={seatData}\n statuses={statuses}\n ticketTypeTireRelationsArray={getTierRelationsArray(\n ticketTypeTierRelations\n )}\n width={Math.min(parentElement?.clientWidth || 800, 800)}\n height={Math.min(parentElement?.clientWidth || 800, 800)}\n isBlockMap={seatMapType === 'block'}\n isTableMap={seatMapType === 'table'}\n predefinedSeats={predefinedSeats}\n />\n )\n\n ReactDom.render(mapComponent, parentElement)\n }\n }, [\n isReserving,\n mapContainerId,\n seatData,\n seatMapEvents,\n seatMapType,\n tierPrices,\n statuses,\n ticketTypeTierRelations,\n ])\n\n return <div id={CONTAINER_DEFAULT_ID} />\n}\n","import { CSSProperties } from '@emotion/serialize'\nimport { createTheme, Select, SelectChangeEvent,ThemeOptions } from '@mui/material'\nimport CircularProgress from '@mui/material/CircularProgress'\nimport FormControl from '@mui/material/FormControl'\nimport InputLabel from '@mui/material/InputLabel'\nimport MenuItem from '@mui/material/MenuItem'\nimport { ThemeProvider } from '@mui/private-theming'\nimport _find from 'lodash/find'\nimport _identity from 'lodash/identity'\nimport _isEmpty from 'lodash/isEmpty'\nimport _keys from 'lodash/keys'\nimport _map from 'lodash/map'\nimport _some from 'lodash/some'\nimport React from 'react'\nimport { Button } from 'react-bootstrap'\n\nimport { createFixedFloatNormalizer } from '../../normalizers'\nimport { getButtonLabel, getTicketDropdownData } from './utils'\n\nexport const TicketsSection = (\n props: ITicketsSectionProps & {\n themeOptions?: ThemeOptions & {\n input?: CSSProperties;\n checkbox?: CSSProperties;\n };\n }\n) => {\n const {\n ticketTypeTierRelations,\n reservedSeats,\n theme = 'light',\n getTicketsBtnLabel,\n contentStyle = {},\n isButtonScrollable = false,\n themeOptions,\n handleGetTicketClick,\n handleCancelReservation,\n ticketDeleteButtonContent = 'Delete',\n selectedTickets,\n handleTicketSelect,\n currencySymbol,\n tableMapEnabled = false,\n guestCounts,\n setGuestCounts,\n isAddingToCart,\n } = props\n\n const bookButtonIsDisabled =\n _some(selectedTickets, item => !item) ||\n _isEmpty(reservedSeats) ||\n reservedSeats.length !== _keys(selectedTickets).length\n const themeMui = createTheme(themeOptions)\n\n const ticketsDropdownsData = getTicketDropdownData(\n reservedSeats,\n ticketTypeTierRelations\n )\n const handleTicketChange = (event: SelectChangeEvent<string>, seatId: string) => {\n const {\n target: { value },\n } = event\n\n if (value !== 'default') {\n handleTicketSelect(value, seatId)\n }\n }\n\n return (\n <ThemeProvider theme={themeMui}>\n <div className={`get-tickets-page ${theme}`} style={contentStyle}>\n <div className=\"tickets-section\">\n {_map(selectedTickets, (ticketItem: string, key: string) => {\n const dropdownData =\n _find(ticketsDropdownsData, item => item.seatId === key) ||\n ({} as ITicketsDropdownsData)\n\n const selectedTicketData = _find(\n dropdownData.ticketsData,\n ticket => ticket.ticket_type_id === ticketItem\n ) as TicketTypeTierRelationsData\n\n // guest count dropdown options\n const startNum = Number(\n selectedTicketData?.ticket_type_min_number_of_guests\n )\n const endNum = Number(\n selectedTicketData?.ticket_type_max_number_of_guests\n )\n const numLength = endNum - startNum + 1\n const showGuestCountDropdown = Boolean(startNum && endNum)\n\n // prices\n const guestPrice =\n (guestCounts[dropdownData.seatId] - startNum) *\n Number(selectedTicketData?.guest_price)\n\n const finalPrice = createFixedFloatNormalizer(2)(\n selectedTicketData?.ticket_type_price + guestPrice\n )\n\n return (\n <div className=\"ticket\" key={key}>\n <div className=\"ticketsDropdowns\">\n <Select\n value={ticketItem || 'default'}\n onChange={event =>\n handleTicketChange(event, dropdownData.seatId)\n }\n inputProps={{ 'aria-label': 'Without label' }}\n MenuProps={{\n PaperProps: {\n sx: { maxHeight: 150 },\n className: 'get-tickets-paper',\n },\n }}\n displayEmpty\n sx={{ borderRadius: 0 }}\n >\n <MenuItem value={'default'}>\n {`Please select ${\n tableMapEnabled ? 'Table Type' : 'Ticket Type'\n }`}\n </MenuItem>\n {_map(dropdownData.ticketsData, (option, index) => {\n if (option.ticket_type_id !== 'default') {\n return (\n <MenuItem value={option.ticket_type_id} key={index}>\n {option.ticket_type_name}\n </MenuItem>\n )\n }\n return null\n })}\n </Select>\n <Button\n className=\"ticket-delete\"\n onClick={() => {\n handleCancelReservation(\n dropdownData.seatId,\n dropdownData.tierId\n )\n }}\n >\n {ticketDeleteButtonContent}\n </Button>\n </div>\n {selectedTicketData && (\n <div style={{ display: 'flex', flexDirection: 'row' }}>\n <div\n style={{\n width: '100%',\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n }}\n >\n <div className=\"ticketPrice\">\n Price:\n <span className=\"ticketPrice-value\">\n {`${currencySymbol} ${finalPrice}`}\n </span>\n </div>\n {!_isEmpty(selectedTicketData.ticket_type_deposit) && (\n <div className=\"ticketDeposit\">\n Deposit:\n <span className=\"ticketPrice-value\">\n {` ${selectedTicketData?.ticket_type_deposit}%`}\n </span>\n </div>\n )}\n </div>\n {showGuestCountDropdown && (\n <div\n style={{\n width: '100%',\n display: 'flex',\n justifyContent: 'end',\n marginRight: 16,\n }}\n >\n <FormControl\n variant=\"outlined\"\n sx={{ m: 1, minWidth: 80 }}\n >\n <InputLabel\n id=\"demo-simple-select-standard-label\"\n shrink\n >\n GUESTS\n </InputLabel>\n <Select\n label=\"GUESTS\"\n labelId=\"demo-simple-select-standard-label\"\n value={guestCounts[dropdownData.seatId] || startNum}\n onChange={event => {\n setGuestCounts({\n ...guestCounts,\n [dropdownData.seatId]: Number(\n event.target.value\n ),\n })\n }}\n inputProps={{ 'aria-label': 'Without label' }}\n MenuProps={{\n PaperProps: {\n sx: { maxHeight: 150 },\n className: 'get-tickets-paper',\n },\n }}\n displayEmpty\n sx={{ borderRadius: 0 }}\n >\n {_map(\n Array.from(\n { length: numLength },\n (_, i) => startNum + i\n ),\n (option, index) => (\n <MenuItem value={option} key={index}>\n {option}\n </MenuItem>\n )\n )}\n </Select>\n </FormControl>\n </div>\n )}\n </div>\n )}\n </div>\n )\n })}\n </div>\n <div>\n <Button\n className={`book-button\n ${bookButtonIsDisabled ? 'disabled' : ''}\n ${isButtonScrollable ? 'is-scrollable' : ''}\n `}\n onClick={!bookButtonIsDisabled ? handleGetTicketClick : _identity}\n disabled={isAddingToCart}\n >\n {isAddingToCart ? (\n <CircularProgress size={20} style={{ marginLeft: 10 }} />\n ) : (\n getTicketsBtnLabel ||\n getButtonLabel(reservedSeats.length, tableMapEnabled)\n )}\n </Button>\n </div>\n </div>\n </ThemeProvider>\n )\n}\n","/* eslint-disable max-len */\nexport const VERIFICATION_STATUSES = {\n PENDING: 'PENDING',\n APPROVED: 'APPROVED_VERIFIED',\n FAILED: 'FAILED',\n WRONG_CUSTOMER: 'WRONG_CUSTOMER',\n}\n\nexport const TRANSACTION_STATUSES = {\n ERROR: 'ERROR',\n SUCCESS: 'SUCCESS',\n}\n\nexport const VERIFICATION_MESSAGES = {\n PENDING: 'Your ID verification is currently being processed. We will notify you as soon as it is completed. Thank you for your patience.',\n APPROVED: 'Your ID verification is approved!',\n FAILED: 'Unfortunately your ID verification has failed. Please try again.',\n WRONG_CUSTOMER: 'The order does not belong to the customer.'\n}\n","import React from 'react'\nimport Modal from '@mui/material/Modal'\nimport Box from '@mui/material/Box'\n\ninterface IRedirectModal {\n message: string\n onClickOk: () => void\n}\n\nconst style: React.CSSProperties = {\n position: 'absolute',\n top: '10%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n minWidth: 480,\n backgroundColor: '#e3e3e3',\n border: '1px solid white',\n outline: 'none',\n padding: '14px',\n maxHeight: '85vh',\n overflow: 'auto',\n}\n\nexport const RedirectModal = ({\n message = 'Your cart has expired. Please click on \"OK\" to return to the ticket selection page.',\n onClickOk = () => {},\n}: IRedirectModal) => {\n return (\n <Modal\n open={true}\n aria-labelledby=\"modal-modal-title\"\n aria-describedby=\"modal-modal-description\"\n className=\"redirect-modal\"\n >\n <Box style={style}>\n <p>{message}</p>\n <div className=\"footer\">\n <button onClick={onClickOk}>OK</button>\n </div>\n </Box>\n </Modal>\n )\n}\n","import React, { useState } from 'react'\nimport { Field, Form, Formik } from 'formik'\nimport Button from '@mui/material/Button'\nimport Modal from '@mui/material/Modal'\nimport Box from '@mui/material/Box'\nimport { CustomField, Loader } from '../common/index'\nimport { combineValidators, requiredValidator, emailValidator } from '../../validators'\nimport { sendRSVPInfo } from '../../api'\n\ninterface IRsvpContainerPage {\n showSection?: boolean;\n eventId: number;\n}\n\ninterface IRSVPValuesTypes {\n email: string;\n}\n\nconst style: React.CSSProperties = {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n minWidth: 480,\n backgroundColor: '#e3e3e3',\n border: '1px solid white',\n outline: 'none',\n padding: '14px',\n maxHeight: '85vh',\n overflow: 'auto'\n}\n\nexport const RsvpContainer = ({ showSection = false, eventId }: IRsvpContainerPage) => {\n const userDataEncoded =\n typeof window !== 'undefined' ? window.localStorage.getItem('user_data') : ''\n const parsedData = JSON.parse(userDataEncoded || '{}')\n\n const [loading, setLoading] = useState(false)\n const [modal, setModal] = useState({ isOpen: false, text: '' })\n\n const handleModalClose = () => {\n setModal({ isOpen: false, text: '' })\n }\n\n const handleSubmit = async (values: IRSVPValuesTypes) => {\n try {\n setLoading(true)\n\n const requestData = {\n data: {\n email: values.email\n }\n }\n const { data } = await sendRSVPInfo(eventId, requestData)\n\n setModal({ isOpen: true, text: data.message })\n } catch (error) {\n if (error.response.status === 403) {\n setModal({ isOpen: true, text: error.response.data?.message })\n }\n } finally {\n setLoading(false)\n }\n }\n\n if (!showSection) {\n return null\n }\n\n return (\n <>\n <Modal\n open={modal.isOpen}\n onClose={handleModalClose}\n aria-labelledby=\"modal-modal-title\"\n aria-describedby=\"modal-modal-description\"\n className=\"rsvp-modal\"\n >\n <Box style={style} className=\"rsvp-modal-box\">\n <div className=\"rsvp-modal-container\">\n <div className=\"rsvp-modal-header\">{modal.text}</div>\n <div className=\"rsvp-modal-button\">\n <button onClick={handleModalClose}>OK</button>\n </div>\n </div>\n </Box>\n </Modal>\n <div className=\"rsvp-container\">\n {loading ? (\n <Loader />\n ) : (\n <>\n <div className=\"rsvp-header\">RSVP</div>\n <div className=\"rsvp-email-container\">\n <Formik\n initialValues={{\n email: parsedData?.email || ''\n }}\n onSubmit={handleSubmit}\n enableReinitialize\n >\n <Form>\n <div className=\"rsvp-email-input-container\">\n <Field\n name=\"email\"\n label=\"EMAIL ADDRESS\"\n type=\"email\"\n validate={combineValidators(\n (value: string) => requiredValidator(value, 'Please enter your Email'),\n (value: string) => emailValidator(value)\n )}\n component={CustomField}\n />\n </div>\n <div className=\"rsvp-button-container\">\n <Button type=\"submit\">RSVP</Button>\n </div>\n </Form>\n </Formik>\n </div>\n </>\n )}\n </div>\n </>\n )\n}\n","/* eslint-disable react/no-unescaped-entities */\n\nimport { CircularProgress } from '@mui/material'\nimport { Form, Formik } from 'formik'\nimport _get from 'lodash/get'\nimport _identity from 'lodash/identity'\nimport React, { useEffect, useState } from 'react'\n\nimport {\n getAddons,\n getCart,\n getCheckoutPageConfigs,\n postOnCheckout,\n} from '../../api'\nimport { currencyNormalizerCreator } from '../../normalizers'\nimport { ICheckoutPageConfigs } from '../../types'\nimport {\n createCheckoutDataBodyWithDefaultHolder,\n createMarkup,\n getQueryVariable,\n} from '../../utils'\nimport { VerificationPendingModal } from '../idVerificationContainer/VerificationPendingModal'\nimport TimerWidget from '../timerWidget'\nimport { addonsWithGroupsAdapter, cartAdapter } from './adapters'\nimport AddonComponent from './AddonComponent'\nimport { getNormalizedPrice } from './normalizers'\nimport {\n generateSelectOptions,\n getAddonSelectOptions,\n getSortedAddons,\n getTicketRelatedAddons,\n isAtLeastOneAddonSelected,\n} from './utils'\n\nexport interface IAddonContainterProps {\n classNamePrefix?: string;\n enableBillingInfoAutoCreate?: boolean;\n enableTimer?: boolean;\n onGetAddonsPageInfoSuccess?: (res: any) => void;\n onGetAddonsPageInfoError?: (error: any) => void;\n onPostCheckoutSuccess?: (res: any) => void;\n onPostCheckoutError?: (error: any) => void;\n onConfirmSelectionSuccess?: (res: any) => void;\n onConfirmSelectionError?: (error: any) => void;\n onCountdownFinish?: () => void;\n onPendingVerification?: () => void;\n}\n\nexport interface ObjectLiteral {\n [key: string]: any;\n}\n\nexport const AddonsContainter = ({\n classNamePrefix = 'add_on',\n enableBillingInfoAutoCreate = true,\n enableTimer = false,\n onGetAddonsPageInfoSuccess = _identity,\n onGetAddonsPageInfoError = _identity,\n onPostCheckoutSuccess = _identity,\n onPostCheckoutError = _identity,\n onConfirmSelectionSuccess = _identity,\n onConfirmSelectionError = _identity,\n onCountdownFinish = _identity,\n onPendingVerification = _identity,\n}: IAddonContainterProps) => {\n const eventId = getQueryVariable('event_id')\n const [addons, setAddons] = useState<any>([])\n const [addonsOptions, setAddonsOptions] = useState<any>({})\n const [groupsWithSelectedVariants, setGroupsWithSelectedVariants] = useState<\n any\n >({})\n const [\n groupsWithInitialVariantsValues,\n setGroupsWithInitialVariantsValues,\n ] = useState<any>({})\n const [loading, setLoading] = useState(true)\n const [cartExpirationTime, setCartExpirationTime] = useState(0)\n const [pendingVerificationMessage, setPendingVerificationMessage] = useState()\n\n useEffect(() => {\n const getAddonsPageInfo = async () => {\n try {\n if (eventId) {\n setLoading(true)\n\n // Get choosed ticket info (id, count) from Cart request for addons options calculations\n const cart = await getCart()\n const { id: choosedTicketID, quantity, expiresAt } = cartAdapter(cart)\n const choosedTicketCount = Number(quantity)\n setCartExpirationTime(expiresAt)\n\n // Get and collect addons data\n const addonsData = await getAddons(eventId)\n const adaptedAddons = addonsWithGroupsAdapter(addonsData)\n const ticketRelatedAddons = getTicketRelatedAddons(\n adaptedAddons,\n choosedTicketID\n )\n const sortedTicketAddons = getSortedAddons(ticketRelatedAddons)\n\n setAddons(sortedTicketAddons)\n\n // Collect addons and addon group options\n const {\n addonsWithOptions,\n groupsWithSelectedVariantsInfo,\n groupsWithVariants,\n } = getAddonSelectOptions(adaptedAddons, choosedTicketCount)\n\n setAddonsOptions(addonsWithOptions)\n setGroupsWithSelectedVariants(groupsWithSelectedVariantsInfo)\n setGroupsWithInitialVariantsValues(groupsWithVariants)\n\n // Success callback props\n onGetAddonsPageInfoSuccess(addonsData)\n }\n } catch (e) {\n // Callback error props\n onGetAddonsPageInfoError(e)\n } finally {\n setLoading(false)\n }\n }\n\n getAddonsPageInfo()\n }, [])\n\n const recreateGroupVariantsSelectOptions = (\n groupId: any,\n changedGroupd: any\n ) => {\n const { choosedVariants, limit, selectedCount } = changedGroupd\n const remainingGroupStock = limit - selectedCount\n const recreatedVariantsOptions: ObjectLiteral = {}\n\n // Regenerate variants allowed stock counts\n for (const variant in choosedVariants) {\n const variantId = variant\n const variantCurrSelectedValue = choosedVariants[variant]\n let allowedOptionCount\n\n // Formula for regenerating\n if (\n remainingGroupStock >=\n groupsWithInitialVariantsValues[groupId][variantId] -\n variantCurrSelectedValue\n ) {\n allowedOptionCount = groupsWithInitialVariantsValues[groupId][variantId]\n } else {\n allowedOptionCount = remainingGroupStock + variantCurrSelectedValue\n }\n\n recreatedVariantsOptions[variantId] = generateSelectOptions(\n 0,\n allowedOptionCount\n )\n }\n\n setAddonsOptions((prevState: any) =>\n Object.assign({}, prevState, recreatedVariantsOptions)\n )\n }\n\n const onFieldChange = (id: any, value: any, addon: any) => {\n // If changeableGroup exsists it means that group with limitation variant was changed\n const changeableGroup = groupsWithSelectedVariants[addon.id]\n\n if (changeableGroup) {\n const currGroupId = addon.id\n const currSelectedVariantId = id\n const currSelectedVariantCount = Number(value)\n const currSelectedVariantPrevCount =\n groupsWithSelectedVariants[currGroupId].choosedVariants[\n currSelectedVariantId\n ]\n\n const currSelectedGroupCount =\n changeableGroup.selectedCount +\n (currSelectedVariantCount - currSelectedVariantPrevCount)\n\n // Update Group info\n const updatedGroupsWithSelectedVariants = {\n ...groupsWithSelectedVariants,\n [currGroupId]: {\n ...groupsWithSelectedVariants[currGroupId],\n selectedCount: currSelectedGroupCount,\n choosedVariants: {\n ...groupsWithSelectedVariants[currGroupId].choosedVariants,\n [currSelectedVariantId]: currSelectedVariantCount,\n },\n },\n }\n setGroupsWithSelectedVariants(updatedGroupsWithSelectedVariants)\n\n // Recreate Select Options for Addon Group Variants\n recreateGroupVariantsSelectOptions(\n currGroupId,\n updatedGroupsWithSelectedVariants[currGroupId]\n )\n }\n }\n\n const handleConfirm = async (values: any, skipAddonPage?: boolean) => {\n try {\n const pageConfigsDataResponse = await getCheckoutPageConfigs()\n const pageConfigsData: ICheckoutPageConfigs =\n _get(pageConfigsDataResponse, 'data.attributes') || {}\n\n const isWindowDefined = typeof window !== 'undefined'\n const skipBillingPage = pageConfigsData.skip_billing_page ?? false\n const nameIsRequired = pageConfigsData.names_required ?? false\n const ageIsRequired = pageConfigsData.age_required ?? false\n const phoneIsRequired = pageConfigsData.phone_required ?? false\n const hasAddOn = pageConfigsData.has_add_on ?? false\n const freeTicket = pageConfigsData.free_ticket ?? false\n const collectOptionalWalletAddress =\n pageConfigsData.collect_optional_wallet_address ?? false\n const collectMandatoryWalletAddress =\n pageConfigsData.collect_mandatory_wallet_address ?? false\n\n if (skipBillingPage && enableBillingInfoAutoCreate) {\n const ticketsQuantity = window.localStorage.getItem('quantity')\n const userData = JSON.parse(\n window.localStorage.getItem('user_data') || '{}'\n )\n\n const checkoutBody = createCheckoutDataBodyWithDefaultHolder(\n Number(ticketsQuantity) || 0,\n userData\n )\n\n try {\n const checkoutResponse = await postOnCheckout({\n ...checkoutBody,\n attributes: {\n ...checkoutBody.attributes,\n ...(!skipAddonPage && { add_ons: values }),\n },\n })\n const hash = _get(checkoutResponse, 'data.data.attributes.hash')\n const total = _get(checkoutResponse, 'data.data.attributes.total')\n\n isWindowDefined && window.localStorage.removeItem('quantity')\n isWindowDefined && window.localStorage.removeItem('add_ons')\n\n onPostCheckoutSuccess(checkoutResponse?.data)\n onConfirmSelectionSuccess({\n skip_billing_page: skipBillingPage,\n names_required: nameIsRequired,\n phone_required: phoneIsRequired,\n age_required: ageIsRequired,\n event_id: String(eventId),\n hash,\n total,\n hasAddOn,\n free_ticket: freeTicket,\n collect_optional_wallet_address: collectOptionalWalletAddress,\n collect_mandatory_wallet_address: collectMandatoryWalletAddress,\n })\n } catch (error) {\n if (error.response?.data?.data?.hasUnverifiedOrder) {\n setPendingVerificationMessage(error.response?.data?.message)\n } else {\n onPostCheckoutError(error)\n onConfirmSelectionError(error)\n }\n }\n } else {\n if (isWindowDefined) {\n if (!skipAddonPage) {\n window.localStorage.setItem('add_ons', JSON.stringify(values))\n }\n\n onConfirmSelectionSuccess({\n skip_billing_page: skipBillingPage && enableBillingInfoAutoCreate,\n names_required: nameIsRequired,\n phone_required: phoneIsRequired,\n age_required: ageIsRequired,\n event_id: String(eventId),\n hasAddOn,\n })\n } else {\n onConfirmSelectionError({\n error: true,\n message: 'Window is not defined',\n })\n }\n }\n } catch (e) {\n onConfirmSelectionError(e)\n }\n }\n\n const handleClearAddons = () => {\n window.localStorage.removeItem('add_ons')\n }\n\n if (loading) {\n return (\n <div className={`${classNamePrefix}_loader`}>\n <CircularProgress size={50} />\n </div>\n )\n }\n\n return (\n <>\n {!!cartExpirationTime && enableTimer && (\n <TimerWidget\n expires_at={cartExpirationTime}\n onCountdownFinish={() => {\n handleClearAddons()\n onCountdownFinish()\n }}\n />\n )}\n <div className={`${classNamePrefix}_container`}>\n <div className={`${classNamePrefix}_block`}>\n <div className={`${classNamePrefix}_line_block`}>\n <p className={`${classNamePrefix}_info_title`}>Get Your Tickets</p>\n <button\n type=\"button\"\n className={`${classNamePrefix}_skip`}\n onClick={() => {\n handleClearAddons()\n handleConfirm({}, true)\n }}\n >\n Skip\n </button>\n </div>\n <div className={`${classNamePrefix}_title`}>UPGRADES & ADD-ONS</div>\n <div className={`${classNamePrefix}_subtitle`}>\n PLEASE SELECT FROM THE OPTIONAL ADD-ONS BELOW\n </div>\n <Formik\n initialValues={{}}\n onSubmit={values => {\n handleConfirm(values)\n }}\n >\n {({ values }) => {\n const isConfirmDisabled = !isAtLeastOneAddonSelected(values)\n\n return (\n <Form autoComplete=\"off\" className=\"form_holder\">\n <>\n {addons.map((addon: any) => {\n const price = addon.feeIncluded ? addon.price : addon.cost\n const isAddonFree = Number(price) === 0\n\n const addonNormalizedPrice = isAddonFree\n ? 'FREE'\n : currencyNormalizerCreator(\n getNormalizedPrice(price),\n addon.currency\n )\n\n return (\n <div\n key={addon.id}\n className={`${classNamePrefix}_product_block`}\n >\n <div className={`${classNamePrefix}_product_images`}>\n {addon.imageUrl && (\n <div\n className={`${classNamePrefix}_product_image_block`}\n >\n <img src={addon.imageUrl} alt=\"No Data\" />\n </div>\n )}\n </div>\n <div\n className={`${classNamePrefix}_product_info_block`}\n >\n <div className={`${classNamePrefix}_product_title`}>\n {addon.name}\n </div>\n <div className={`${classNamePrefix}_product_price`}>\n {addonNormalizedPrice}\n {!isAddonFree && (\n <span\n className={`${classNamePrefix}_product_fee`}\n >\n {addon.feeIncluded\n ? '(incl. Fees)'\n : '(excl. Fees)'}\n </span>\n )}\n </div>\n </div>\n <div\n className={`${classNamePrefix}_product_desc`}\n dangerouslySetInnerHTML={createMarkup(\n addon.description\n )}\n />\n <div\n className={`${classNamePrefix}_product_select_container`}\n >\n {addon.variants ? (\n addon.variants.map((variant: any) => (\n // Group Variants\n <AddonComponent\n key={variant.id}\n data={variant}\n selectOptions={addonsOptions[variant.id]}\n classNamePrefix={classNamePrefix}\n handleAddonChange={(id, value) =>\n onFieldChange(id, value, addon)\n }\n />\n ))\n ) : (\n // Simple Addon\n <AddonComponent\n key={addon.id}\n data={addon}\n selectOptions={addonsOptions[addon.id]}\n classNamePrefix={classNamePrefix}\n handleAddonChange={(id, value) =>\n onFieldChange(id, value, addon)\n }\n />\n )}\n </div>\n </div>\n )\n })}\n <button\n type=\"submit\"\n className={`${\n isConfirmDisabled\n ? `${classNamePrefix}_is_disabled`\n : ''\n } ${classNamePrefix}_submit_button`}\n disabled={isConfirmDisabled}\n >\n CONFIRM SELECTION\n </button>\n </>\n </Form>\n )\n }}\n </Formik>\n </div>\n </div>\n <VerificationPendingModal\n message={pendingVerificationMessage}\n onClose={() => {\n onPendingVerification()\n }}\n />\n </>\n )\n}\n","export const getNormalizedPrice = (value: any) => {\n const minimizedValue = Number(value) / 100\n const normalized = minimizedValue.toFixed(2)\n return normalized\n}","/* eslint-disable react/no-unescaped-entities */\nimport './style.css'\n\nimport Modal from '@mui/material/Modal'\nimport { AxiosError } from 'axios'\nimport _get from 'lodash/get'\nimport _identity from 'lodash/identity'\nimport _map from 'lodash/map'\nimport React, { useEffect, useRef, useState } from 'react'\n\nimport { getConfirmationData } from '../../api'\nimport { usePixel } from '../../hooks/usePixel'\nimport { IReferralPromotion } from '../../types'\nimport { createMarkup, isBrowser } from '../../utils'\nimport SocialButtons from './social-buttons'\n\nexport interface IShareButton {\n mainLabel: string;\n subLabel: string;\n platform: string;\n shareData: any;\n}\n\nexport interface IConfirmationLabels {\n confirmationTitle?: string;\n confirmationMain?: string;\n confirmationHelper?: string;\n}\n\nexport interface IConfirmationPage {\n hasCopyIcon?: boolean;\n isReferralEnabled: boolean;\n showDefaultShareButtons: boolean;\n messengerAppId: string;\n shareButtons: IShareButton[];\n onGetConfirmationDataSuccess: (res: any) => void;\n onGetConfirmationDataError: (e: AxiosError) => void;\n onLinkCopied: () => void;\n orderHash?: string;\n confirmationLabels: IConfirmationLabels;\n clientLabel?: string;\n showReferralsInfoText?: boolean;\n showCopyInfoModal?: boolean;\n showPricingNoteSection?: boolean;\n}\n\nexport const ConfirmationContainer = ({\n confirmationLabels,\n hasCopyIcon = true,\n isReferralEnabled,\n showDefaultShareButtons,\n messengerAppId = '',\n shareButtons = [],\n onGetConfirmationDataSuccess = _identity,\n onGetConfirmationDataError = _identity,\n orderHash,\n onLinkCopied = _identity,\n clientLabel,\n showReferralsInfoText = false,\n showCopyInfoModal = false,\n showPricingNoteSection = false,\n}: IConfirmationPage) => {\n const inputRef = useRef(null)\n const [data, setData] = useState<any>(null)\n const dataEncoded =\n (isBrowser && window.localStorage.getItem('checkoutData')) || ''\n const dataDecoded = dataEncoded\n ? JSON.parse(dataEncoded)\n : { hash: orderHash }\n const { hash } = dataDecoded\n const eventId = data?.product_id || ''\n\n useEffect(() => {\n (async () => {\n if (hash) {\n try {\n const response = await getConfirmationData(hash)\n const data = _get(response, 'data.data.attributes')\n data.personal_share_sales = data.personal_share_sales.map(\n (d: any) => {\n const salesData: IReferralPromotion = {\n label: `If your friends buy ${d.sales} tickets`,\n price: '',\n }\n if (d.price === 0) {\n salesData.subLabel = 'Your ticket becomes'\n salesData.price = 'FREE!'\n } else {\n salesData.subLabel = 'Your ticket goes down to'\n salesData.price = data.currency.symbol + d.price?.toFixed(2)\n }\n\n return salesData\n }\n )\n data.personal_share_sales.unshift({\n label: 'Your ticket is currently',\n price: data.currency.symbol + data.product_price?.toFixed(2),\n })\n setData(data)\n onGetConfirmationDataSuccess(response.data)\n } catch (error) {\n onGetConfirmationDataError(error.response)\n }\n }\n })()\n }, [])\n\n const [showCopyModal, setShowCopyModal] = useState(false)\n\n const onClose = () => {\n setShowCopyModal(false)\n }\n\n const onChangeShareLink = (e: React.ChangeEvent<HTMLInputElement>) => {\n const newData = { ...data, personal_share_link: e.target.value }\n setData(newData)\n }\n const {\n confirmationTitle = 'Your Tickets are Confirmed!',\n confirmationMain = 'Your tickets are available in My Tickets section',\n confirmationHelper = 'Please bring them with you to the event',\n } = confirmationLabels\n\n const pageUrl = isBrowser ? window.location.href.split('?')[0] : ''\n usePixel(eventId, { page: 'complete', pageUrl, orderHash: hash })\n\n return (\n <div className=\"confirmation-page\">\n {showCopyInfoModal && (\n <Modal\n open={showCopyModal}\n onClose={onClose}\n aria-labelledby=\"modal-modal-title\"\n aria-describedby=\"modal-modal-description\"\n className=\"success-copy-modal\"\n >\n <div className=\"message-copy-success-box\">\n <div className=\"message-copy-success\">\n <span>\n Copied to your clipboard! Now paste your link in a Snapchat\n message,\n </span>\n <span>your Instagram bio, Whatsapp, Facebook or a text :)</span>\n </div>\n <div className=\"footer\">\n <button className=\"footer-button\" type=\"button\" onClick={onClose}>\n OK\n </button>\n </div>\n </div>\n </Modal>\n )}\n {data && (\n <>\n <div className=\"header-container\">\n <div className=\"header-product-image\">\n <img alt=\"\" className=\"product-image\" src={data.product_image} />\n </div>\n <div className=\"header-product-text\">\n <p className=\"title\">{confirmationTitle}</p>\n <div\n className=\"share-message-section\"\n dangerouslySetInnerHTML={\n data.custom_confirmation_page_text &&\n data.custom_confirmation_page_text_full_replacement\n ? createMarkup(data.custom_confirmation_page_text)\n : undefined\n }\n >\n {data.custom_confirmation_page_text &&\n data.custom_confirmation_page_text_full_replacement ? (\n undefined\n ) : (\n <>\n {data.attach_tickets ? (\n <span className=\"main\">\n Your tickets have been emailed to you\n </span>\n ) : (\n <span className=\"main\">{confirmationMain}</span>\n )}\n <span className=\"helper\">\n {data.attach_tickets\n ? 'Please bring them with you to the event'\n : confirmationHelper}\n </span>\n </>\n )}\n </div>\n </div>\n </div>\n {data.custom_confirmation_page_text &&\n !data.custom_confirmation_page_text_full_replacement ? (\n <div\n className=\"custom-confirmation-page-text\"\n dangerouslySetInnerHTML={createMarkup(\n data.custom_confirmation_page_text\n )}\n />\n ) : null}\n {data.disable_referral === false && isReferralEnabled && (\n <>\n <div className=\"referral_text_image_section\">\n <div className=\"referral_text_section\">\n <div className=\"referral_title_text\">\n Your ticket can become\n <span className=\"strong-text\"> cheaper </span>\n or even\n <span className=\"strong-text\"> FREE!</span>\n </div>\n <div className=\"referral_text\">\n <span className=\"strong-text\"> Invite friends </span>\n and we'll refund up to\n <span className=\"strong-text\"> 100% </span>\n of your ticket money, if they buy tickets as well!\n </div>\n </div>\n <img\n className=\"body-product-image\"\n src={data.product_image}\n alt=\"No Data\"\n />\n </div>\n <div className=\"share_wrapper\">\n <div className=\"share_section\">\n <div className=\"invitation_section\">\n <div className=\"invitation_title\">\n How do you invite your friends?\n </div>\n <div className=\"share_buttons\">\n <div className=\"share-by-link\">\n <h5 className=\"share-by-link label\">\n Send them this link:\n </h5>\n <div className=\"share-btn-inner\">\n <input\n ref={inputRef}\n className=\"share-input\"\n value={data.personal_share_link}\n onChange={onChangeShareLink}\n />\n <div\n aria-hidden={true}\n className=\"share-by-link-copy-icon\"\n onClick={() => {\n navigator.clipboard.writeText(\n _get(inputRef, 'current.value')\n )\n setShowCopyModal(true)\n onLinkCopied()\n }}\n >\n {hasCopyIcon ? (\n <img\n src=\"https://img.icons8.com/office/50/000000/copy.png\"\n alt=\"copy\"\n />\n ) : (\n <span className=\"copy-icon\">Copy</span>\n )}\n </div>\n </div>\n </div>\n {(showDefaultShareButtons || !!shareButtons.length) && (\n <SocialButtons\n showDefaultShareButtons={showDefaultShareButtons}\n name={data.product_name}\n appId={messengerAppId}\n shareLink={data.personal_share_link}\n shareButtons={shareButtons}\n clientLabel={clientLabel}\n showReferralsInfoText={showReferralsInfoText}\n />\n )}\n </div>\n </div>\n </div>\n <div className=\"pricing-section\">\n <div className=\"invitation_title\">How much cheaper?</div>\n {_map(data.personal_share_sales, (pricing, index) => (\n <div key={index} className=\"pricing-section_wrapper\">\n <div className=\"pricing-section_label\">\n {pricing.label}\n {pricing.subLabel && (\n <div className=\"pricing-section_sublabel\">\n {pricing.subLabel}\n </div>\n )}\n </div>\n <div className=\"pricing-section_price\">\n {' '}\n {pricing.price}\n </div>\n </div>\n ))}\n {showPricingNoteSection && (\n <div className=\"note-pricing-section\">\n ^ This is based on the most expensive ticket in your\n order.\n </div>\n )}\n </div>\n </div>\n </>\n )}\n </>\n )}\n </div>\n )\n}\n","import Button from '@mui/material/Button'\nimport { AxiosError } from 'axios'\nimport _identity from 'lodash/identity'\nimport _isEmpty from 'lodash/isEmpty'\nimport React, { useEffect, useState } from 'react'\n\nimport {\n checkCustomerOrder,\n checkVerificationStatus,\n getNetverifyUrl,\n updateVerificationStatus,\n} from '../../api'\nimport {\n GetNetverifyUrlResponseData,\n VerificationStatusResponseData,\n} from '../../types/verification'\nimport { getQueryVariable, isJson } from '../../utils'\nimport Modal from '../common/ModalComponent'\nimport { VERIFICATION_MESSAGES, VERIFICATION_STATUSES } from './constants'\n\ninterface IDVerificationProps {\n onGetVerifyUrlSuccess?: (response: GetNetverifyUrlResponseData) => void;\n onGetVerifyUrlError?: (error: AxiosError) => void;\n\n onGetVerificationStatusSuccess?: (response: {\n data: VerificationStatusResponseData;\n }) => void;\n onGetVerificationStatusError?: (error: AxiosError) => void;\n\n onVerificationMessageModalClose?: (status: string | null) => void;\n\n onPassVerificationStepsSuccess?: () => void;\n onPassVerificationStepsError?: (error: AxiosError) => void;\n}\n\nexport const IDVerification = (props: IDVerificationProps) => {\n const {\n onGetVerifyUrlSuccess = _identity,\n onGetVerifyUrlError = _identity,\n\n onGetVerificationStatusSuccess = _identity,\n onGetVerificationStatusError = _identity,\n\n onVerificationMessageModalClose = _identity,\n\n onPassVerificationStepsSuccess = _identity,\n onPassVerificationStepsError = _identity,\n } = props\n\n const [loadingStatus, setLoadingStatus] = useState(true)\n const [verificationStatus, setVerificationStatus] = useState<string | null>(\n null\n )\n const [showModal, setShowModal] = useState(false)\n const [netverifyUrl, setNetverifyUrl] = useState<string | null>(null)\n const [modalData, setModalData] = useState({\n message: '',\n hideCancelBtn: true,\n displaModal: false,\n })\n\n const isAccountVerifiedOrPending =\n (verificationStatus === VERIFICATION_STATUSES.APPROVED ||\n verificationStatus === VERIFICATION_STATUSES.PENDING) &&\n verificationStatus !== VERIFICATION_STATUSES.WRONG_CUSTOMER\n\n const handleClose = () => {\n setModalData({\n message: '',\n displaModal: false,\n hideCancelBtn: true,\n })\n\n onVerificationMessageModalClose(verificationStatus)\n }\n\n useEffect(() => {\n const callbackNetVerify = async (e: any) => {\n if (e.data && isJson(e.data)) {\n try {\n const result = JSON.parse(e.data)\n if (\n result.payload &&\n (result.payload.value === 'success' ||\n result.payload.transactionStatus === 'SUCCESS')\n ) {\n await updateVerificationStatus()\n onPassVerificationStepsSuccess()\n } else if (\n result.payload &&\n (result.payload.value === 'error' ||\n result.payload.transactionStatus === 'ERROR')\n ) {\n setShowModal(false)\n onPassVerificationStepsError(result.payload)\n }\n } catch (e) {\n onPassVerificationStepsError(e)\n }\n }\n }\n\n window.addEventListener('message', callbackNetVerify)\n\n return () => {\n window.removeEventListener('message', callbackNetVerify)\n }\n }, [])\n\n useEffect(() => {\n let intervalId: any = null\n const orderHash = getQueryVariable('order_hash') || ''\n\n const getUrl = async () => {\n try {\n const urlResponse = await getNetverifyUrl()\n setNetverifyUrl(urlResponse.netverifyUrl)\n onGetVerifyUrlSuccess(urlResponse)\n } catch (error) {\n onGetVerifyUrlError(error)\n }\n }\n\n const getVerificationStatus = async () => {\n try {\n const statusResponse = await checkVerificationStatus()\n const { status } = statusResponse.data.attributes\n\n if (verificationStatus !== status) {\n setVerificationStatus(status)\n setModalData({\n displaModal:\n status === VERIFICATION_STATUSES.APPROVED ||\n status === VERIFICATION_STATUSES.FAILED,\n hideCancelBtn: true,\n message:\n status === VERIFICATION_STATUSES.APPROVED\n ? VERIFICATION_MESSAGES.APPROVED\n : status === VERIFICATION_STATUSES.FAILED\n ? VERIFICATION_MESSAGES.FAILED\n : status,\n })\n }\n onGetVerificationStatusSuccess(statusResponse)\n } catch (error) {\n onGetVerificationStatusError(error)\n } finally {\n setLoadingStatus(false)\n }\n }\n\n const getCustomerOrderStatus = async () => {\n try {\n const customerOrderResponse = await checkCustomerOrder(orderHash)\n return customerOrderResponse\n } catch (error) {\n throw error\n }\n }\n\n const makeRequests = async () => {\n try {\n if (orderHash) {\n await getCustomerOrderStatus()\n }\n getUrl()\n getVerificationStatus()\n\n // Check the verification status every 30 seconds\n intervalId = setInterval(() => {\n getVerificationStatus()\n }, 10000)\n } catch (error) {\n if (\n error.response?.data?.message === VERIFICATION_MESSAGES.WRONG_CUSTOMER\n ) {\n setVerificationStatus(VERIFICATION_STATUSES.WRONG_CUSTOMER)\n setModalData({\n displaModal: true,\n hideCancelBtn: true,\n message: VERIFICATION_MESSAGES.WRONG_CUSTOMER,\n })\n }\n }\n }\n\n makeRequests()\n\n // Clear the interval when the component unmounts\n return () => clearInterval(intervalId)\n }, [])\n\n const iframe = (netverifyUrl: string) => {\n // eslint-disable-next-line max-len\n const iframe = `<iframe allowFullScreen id=\"verificationIframe\" frameBorder=\"0\" width=\"100%\" height=\"570px\" allow=\"camera;fullscreen;accelerometer;gyroscope;magnetometer\" src=\"${netverifyUrl}\"></iframe>`\n return {\n __html: iframe,\n }\n }\n\n useEffect(() => {\n const isWindowDefined = typeof window !== 'undefined'\n const orderHash = getQueryVariable('order_hash')\n\n if (isWindowDefined) {\n const checkoutData = JSON.parse(\n window.localStorage.getItem('checkoutData') || '{}'\n )\n if (_isEmpty(checkoutData) && orderHash) {\n window.localStorage.setItem(\n 'checkoutData',\n JSON.stringify({ hash: orderHash })\n )\n }\n }\n }, [])\n\n return (\n <div>\n <h2 className=\"page-header\">Account Verification</h2>\n {loadingStatus ? null : (\n <>\n {!isAccountVerifiedOrPending && (\n <div className=\"verify-message\">\n To complete the purchase, please verify your identity.\n </div>\n )}\n {verificationStatus === VERIFICATION_STATUSES.PENDING && (\n <div className=\"verify-message\">\n {VERIFICATION_MESSAGES.PENDING}\n </div>\n )}\n {!isAccountVerifiedOrPending && (\n <Button\n type=\"button\"\n variant=\"contained\"\n className=\"verify-button\"\n onClick={() => {\n setShowModal(true)\n }}\n >\n Verify\n </Button>\n )}\n </>\n )}\n\n {modalData.displaModal && (\n <Modal\n modalClassName=\"verification-message-modal\"\n actions={[\n {\n id: 'ok',\n label: 'Ok',\n variant: 'contained',\n onClick: handleClose,\n },\n ]}\n >\n <div className=\"verify-message\">{modalData.message}</div>\n </Modal>\n )}\n\n {showModal && (\n <Modal\n modalClassName=\"id-verification-modal\"\n actions={[\n {\n id: 'close',\n label: 'Close',\n variant: 'contained',\n onClick: () => {\n setShowModal(false)\n },\n },\n ]}\n >\n <div dangerouslySetInnerHTML={iframe(netverifyUrl || '')} />\n </Modal>\n )}\n </div>\n )\n}\n","import './style.css'\n\nimport Autocomplete from '@mui/material/Autocomplete'\nimport CircularProgress from '@mui/material/CircularProgress'\nimport Paper from '@mui/material/Paper'\nimport Table from '@mui/material/Table'\nimport TableBody from '@mui/material/TableBody'\nimport TableCell from '@mui/material/TableCell'\nimport TableContainer from '@mui/material/TableContainer'\nimport TableHead from '@mui/material/TableHead'\nimport TablePagination from '@mui/material/TablePagination'\nimport TableRow from '@mui/material/TableRow'\nimport TextField from '@mui/material/TextField'\nimport axios from 'axios'\nimport _get from 'lodash/get'\nimport _identity from 'lodash/identity'\nimport React, { useEffect, useState } from 'react'\n\nimport { getOrders } from '../../api'\nimport { getCookieByName } from '../../utils'\nimport { LoginModal } from '../loginModal'\nimport MyTicketsRow from './row'\nimport tableConfig from './tableConfig'\n\ninterface MyTicketsTypes {\n handleDetailsInfo: (id: string | number) => void;\n onGetOrdersSuccess: (res: any) => void;\n onGetOrdersError: (err: any) => void;\n logo?: string;\n theme?: 'light' | 'dark';\n selectEventsLabel?: string;\n\n hideDetailsButton?: boolean;\n columns?: IColumnData[];\n}\n\ninterface EventFilter {\n event_name: string;\n url_name: string;\n}\n\nexport const MyTicketsContainer = ({\n handleDetailsInfo = _identity,\n onGetOrdersSuccess = _identity,\n onGetOrdersError = _identity,\n theme = 'dark',\n selectEventsLabel = 'Events',\n logo,\n hideDetailsButton = false,\n columns = [],\n}: MyTicketsTypes) => {\n const [data, setData] = useState<any>(null)\n const [loading, setLoading] = useState(true)\n const [limit, setLimit] = useState(10)\n const [filter, setFilter] = useState('')\n\n const isWindowDefined = typeof window !== 'undefined'\n const [isLogged, setIsLogged] = useState(\n isWindowDefined ? !!getCookieByName('X-TF-ECOMMERCE') : false\n )\n const [showModalLogin, setShowModalLogin] = useState(false)\n const [userExpired, setUserExpired] = useState(false)\n\n //just once\n useEffect(() => {\n fetchData(1, limit, filter)\n }, [isLogged])\n\n const fetchData = async (page: number, limit: number, filter: string) => {\n try {\n setLoading(true)\n const response = await getOrders(page, limit, filter)\n onGetOrdersSuccess(response)\n\n const data = _get(response, 'data.data.attributes')\n data.page -= 1\n\n setData(data)\n } catch (error) {\n if (axios.isAxiosError(error)) {\n if (error.response?.data.error === 'invalid_token') {\n if (isWindowDefined) {\n window.localStorage.removeItem('user_data')\n window.localStorage.removeItem('access_token')\n setUserExpired(true)\n setShowModalLogin(true)\n }\n }\n }\n onGetOrdersError(error)\n } finally {\n setLoading(false)\n }\n }\n\n const handleChangePage = (_event: any, newPage: number) => {\n fetchData(newPage + 1, limit, filter)\n }\n\n const handleChangeRowsPerPage = (event: React.ChangeEvent<HTMLInputElement>) => {\n fetchData(1, +event.target.value, filter)\n setLimit(+event.target.value)\n }\n\n const onChange = (\n _event: React.SyntheticEvent<Element, Event>,\n eventFilter: EventFilter | null\n ) => {\n fetchData(1, limit, eventFilter?.url_name || '')\n setFilter(eventFilter?.url_name || '')\n }\n\n return (\n <div className={`my-ticket ${theme}`}>\n <>\n {showModalLogin ||\n (!isLogged && (\n <LoginModal\n onClose={() => {\n setShowModalLogin(false)\n }}\n onLogin={() => {\n setShowModalLogin(false)\n setUserExpired(false)\n setIsLogged(true)\n }}\n userExpired={userExpired}\n logo={logo}\n />\n ))}\n </>\n {data?.orders?.length ? (\n <>\n <h2>My Ticket Orders</h2>\n <Autocomplete\n disablePortal\n id=\"combo-box-demo\"\n getOptionLabel={(option: EventFilter) => option.event_name}\n onChange={onChange}\n options={data.purchased_events}\n sx={{ width: 300 }}\n renderInput={params => <TextField {...params} label={selectEventsLabel} />}\n />\n {loading ? (\n <div className=\"loading\">\n <CircularProgress />\n </div>\n ) : (\n <>\n <TableContainer component={Paper} className=\"my-ticket-table\">\n <Table aria-label=\"collapsible table\">\n <TableHead>\n <TableRow>\n {tableConfig(columns).header.map(\n (column: string, index: number) => (\n <TableCell key={index}>{column}</TableCell>\n )\n )}\n {!hideDetailsButton && <TableCell />}\n </TableRow>\n </TableHead>\n <TableBody>\n {data.orders?.map((row: RowItems) => (\n <MyTicketsRow\n row={row}\n handleDetailsInfo={handleDetailsInfo}\n columns={columns}\n hideDetailsButton={hideDetailsButton}\n />\n ))}\n </TableBody>\n </Table>\n </TableContainer>\n <TablePagination\n rowsPerPageOptions={[10, 25, 100]}\n component=\"div\"\n count={data.total_count}\n rowsPerPage={limit}\n page={data.page}\n onPageChange={handleChangePage}\n onRowsPerPageChange={handleChangeRowsPerPage}\n />\n </>\n )}\n </>\n ) : !loading && (\n <>\n <h2>My Ticket Orders</h2>\n <div className=\"no_orders_section\">\n <div className=\"nodata_title\">\n You have no current ticket orders on this account\n </div>\n <div className=\"nodata_subtitle\">\n Discover your next nite out <a href=\"/events\">here</a>.\n </div>\n </div>\n </>\n )}\n <>\n {showModalLogin && (\n <LoginModal\n onClose={() => {\n setShowModalLogin(false)\n }}\n onLogin={() => {\n setShowModalLogin(false)\n setUserExpired(false)\n setIsLogged(true)\n }}\n userExpired={userExpired}\n />\n )}\n </>\n </div>\n )\n}\n","import './style.css'\n\nimport CircularProgress from '@mui/material/CircularProgress'\nimport Paper from '@mui/material/Paper'\nimport Table from '@mui/material/Table'\nimport TableBody from '@mui/material/TableBody'\nimport TableCell from '@mui/material/TableCell'\nimport TableContainer from '@mui/material/TableContainer'\nimport TableHead from '@mui/material/TableHead'\nimport TableRow from '@mui/material/TableRow'\nimport _find from 'lodash/find'\nimport _get from 'lodash/get'\nimport _has from 'lodash/has'\nimport _identity from 'lodash/identity'\nimport _map from 'lodash/map'\nimport moment from 'moment-timezone'\nimport React, { useEffect, useState } from 'react'\n\nimport { getOrderDetails, removeFromResale, resaleTicket } from '../../api'\nimport { isBrowser } from '../../utils'\nimport ConfirmModal from '../confirmModal'\nimport { InitialValuesTypes, TicketResaleModal } from '../ticketResaleModal'\nimport TicketsTable, { IActionColumns, ITicketTypes } from './ticketsTable'\n\ninterface TicketTypes {\n currency: string;\n discount: string;\n name: string;\n price: string;\n quantity: string;\n total: string;\n groupName: string;\n guests_count: string;\n deposit_paid: string;\n remaining: string;\n}\n\ninterface OrderDetailsTypes {\n columns: Array<{ label: string }>;\n onGetOrdersSuccess: (res: any) => void;\n onGetOrdersError: (err: any) => void;\n onReturnButtonClick: (data: any) => void;\n onRemoveFromResaleSuccess: () => void;\n onRemoveFromResaleError: (err: any) => void;\n onResaleTicketSuccess: () => void;\n onResaleTicketError: (err: any) => void;\n personalLinkIcon?: string;\n displayColumnNameInRow?: boolean;\n canSellTicket?: boolean;\n ticketsTableColumns?: Array<{\n id?: string | number;\n key: keyof ITicketTypes & keyof IActionColumns;\n label: string | number | null | undefined;\n }>;\n ordersPath?: string;\n orderId?: string | number;\n referralTitle?: string;\n itemsTitle?: string;\n ticketsTitle?: string;\n}\n\nconst getTotal = (data: any) => {\n if (data?.total && data?.tickets && data.tickets[0]?.currency)\n return data.tickets[0].currency + data.total\n if (!data?.total || !_has(data, 'items.ticket_types.length')) return ''\n\n return data.items.ticket_types[0].currency + data.total\n}\n\nexport const OrderDetailsContainer = ({\n columns = [],\n onGetOrdersSuccess = _identity,\n onGetOrdersError = _identity,\n onRemoveFromResaleSuccess = _identity,\n onRemoveFromResaleError = _identity,\n onResaleTicketSuccess = _identity,\n onResaleTicketError = _identity,\n onReturnButtonClick,\n personalLinkIcon = '',\n displayColumnNameInRow = false,\n canSellTicket = true,\n ticketsTableColumns,\n ordersPath,\n orderId: pOrderId,\n referralTitle = '',\n itemsTitle = '',\n ticketsTitle = 'Your Tickets'\n}: OrderDetailsTypes) => {\n const [data, setData] = useState<any>({})\n const [loading, setLoading] = useState(true)\n const [removeFromResaleLoading, setRemoveFromResaleLoading] = useState(false)\n const [resaleTicketLoading, setResaleTicketLoading] = useState(false)\n const [showResaleModal, setShowResaleModal] = useState(false)\n const [showRemoveResaleModal, setShowRemoveResaleModal] = useState(false)\n const [activeTicket, setActiveTicket] = useState<any>(null)\n\n useEffect(() => {\n (async () => {\n try {\n setLoading(true)\n let orderId = pOrderId || ''\n if (isBrowser && !pOrderId) {\n const params: URLSearchParams = new URL(`${window.location}`)\n .searchParams\n orderId = params.get('o') || ''\n }\n const response = await getOrderDetails(String(orderId))\n onGetOrdersSuccess(response)\n\n const data = _get(response, 'data.data.attributes')\n\n setData(data)\n } catch (error) {\n onGetOrdersError(error)\n } finally {\n setLoading(false)\n }\n })()\n }, [])\n\n const handleSellTicket = (ticket: ITicketTypes) => {\n const ticketTypesArr = data.items.ticket_types\n const sellTicketType = _find(\n ticketTypesArr,\n ticketType => ticketType.hash === ticket.ticket_type_hash\n )\n setActiveTicket({\n ...ticket,\n ticket_type_is_active: sellTicketType?.active,\n })\n setShowResaleModal(true)\n }\n\n const handleOnClose = () => {\n setShowResaleModal(false)\n setActiveTicket(null)\n }\n\n const handleOnSubmit = async (values: InitialValuesTypes) => {\n if (resaleTicketLoading) {\n return\n }\n\n try {\n setResaleTicketLoading(true)\n const {\n to,\n first_name,\n last_name,\n email,\n confirm_email,\n confirm,\n } = values\n const formData = new FormData()\n formData.append('to', to)\n formData.append('first_name', first_name)\n formData.append('last_name', last_name)\n formData.append('email', email)\n formData.append('confirm_email', confirm_email)\n formData.append('confirm', String(confirm))\n\n await resaleTicket(formData, activeTicket.hash)\n const updatedData = { ...data }\n updatedData?.tickets?.forEach((ticket: ITicketTypes) => {\n if (ticket.hash === activeTicket.hash) {\n ticket.is_sellable = false\n ticket.is_on_sale = true\n }\n })\n\n setData(updatedData)\n onResaleTicketSuccess()\n } catch (error) {\n onResaleTicketError(error)\n } finally {\n setShowResaleModal(false)\n setResaleTicketLoading(false)\n }\n }\n\n const handleRemoveFromResale = (ticket: ITicketTypes) => {\n setShowRemoveResaleModal(true)\n setActiveTicket(ticket)\n }\n\n const onCloseRemoveResale = () => {\n setShowRemoveResaleModal(false)\n setActiveTicket(null)\n }\n\n const onConfirmRemoveResale = async () => {\n if (removeFromResaleLoading) {\n return\n }\n\n try {\n setRemoveFromResaleLoading(true)\n await removeFromResale(activeTicket.hash)\n const updatedData = { ...data }\n updatedData?.tickets?.forEach((ticket: ITicketTypes) => {\n if (ticket.hash === activeTicket.hash) {\n ticket.is_sellable = true\n ticket.is_on_sale = false\n }\n })\n\n setData(updatedData)\n onRemoveFromResaleSuccess()\n } catch (error) {\n onRemoveFromResaleError(error)\n } finally {\n setShowRemoveResaleModal(false)\n setRemoveFromResaleLoading(false)\n }\n }\n\n let orderSummery = `ID ${data.id}, placed`\n if (data.date && data.timezone) {\n const date = moment\n .tz(data.date, data.timezone)\n .format('dddd, DD MMMM YYYY')\n orderSummery += ` ${date}`\n }\n\n const columnsProps =\n data.tickets && data.tickets[0].is_table\n ? [\n { label: 'Items' },\n { label: 'Price' },\n { label: 'Guests count' },\n { label: 'Deposit paid' },\n { label: 'Remaining' },\n ]\n : columns\n return (\n <div className=\"order-details\">\n {loading ? (\n <div className=\"loading\">\n <CircularProgress />\n </div>\n ) : (\n <>\n <h1 className=\"layout-title\">Order Details</h1>\n <div className=\"order-summary-box\">\n <div className=\"summary-block\">\n <div className=\"summary-item\">\n <h6 className=\"sub-title\">Order Summary</h6>\n <p className='order-summary-date'>{orderSummery}</p>\n </div>\n <div className=\"summary-item\">\n <div className=\"return-button-container\">\n <button\n type=\"button\"\n className=\"return-button\"\n onClick={() => {\n if (typeof window !== 'undefined') {\n window.location.assign(ordersPath ?? '/orders')\n }\n }}\n >\n Back to Orders\n </button>\n </div>\n </div>\n </div>\n {!data?.disable_referral && (\n <>\n {referralTitle && <h4 className=\"referral-title sub-title\">{referralTitle}</h4>}\n <div className=\"personal-link\">\n <div className=\"link-item\">\n <span>Personal Share Link: </span>\n <a\n href={data?.personal_share_link}\n target=\"_blank\"\n rel=\"noreferrer\"\n >\n {Boolean(personalLinkIcon) && (\n <img src={personalLinkIcon} alt=\"Icon\" />\n )}\n {data?.personal_share_link}\n </a>\n </div>\n {data?.sales_referred ? (\n <div className=\"link-item\">\n <p className=\"total-referrer\">{`So far, you’ve referred ${data.sales_referred} tickets`}</p>\n </div>\n ) : null}\n </div>\n </>\n )}\n {itemsTitle && <h4 className=\"items-title sub-title\">{itemsTitle}</h4>}\n <TableContainer component={Paper}>\n <Table className=\"tt-type\" aria-label=\"collapsible table\">\n <TableHead>\n <TableRow>\n {_map(columnsProps, item => (\n <TableCell>{item.label || ''}</TableCell>\n ))}\n </TableRow>\n </TableHead>\n <TableBody>\n {data?.items?.ticket_types?.map(\n (ticket: TicketTypes, index: number) =>\n data?.tickets && !data?.tickets[0].is_table ? (\n <TableRow key={index}>\n <TableCell>\n <b>Ticket Type:</b> {ticket.name}\n </TableCell>\n <TableCell>\n {ticket.currency + ticket.price}\n </TableCell>\n <TableCell>{ticket.quantity}</TableCell>\n <TableCell>\n {ticket.currency + ticket.total}\n </TableCell>\n </TableRow>\n ) : (\n <TableRow key={index}>\n <TableCell>\n <b>Ticket Type:</b> {ticket.name}\n </TableCell>\n <TableCell>\n {ticket.currency + ticket.price}\n </TableCell>\n <TableCell>{ticket.guests_count}</TableCell>\n <TableCell>{ticket.deposit_paid}</TableCell>\n <TableCell>{ticket.remaining}</TableCell>\n </TableRow>\n )\n )}\n {data?.items?.add_ons?.map(\n (ticket: TicketTypes, index: number) => (\n <TableRow key={index}>\n <TableCell>\n <div>\n <b>Add-On</b>\n <div>{ticket.groupName}: {ticket.name}</div>\n </div>\n </TableCell>\n <TableCell>{ticket.currency + ticket.price}</TableCell>\n <TableCell>{ticket.quantity}</TableCell>\n <TableCell>{ticket.currency + ticket.total}</TableCell>\n </TableRow>\n )\n )}\n <TableRow className=\"total-row\">\n <TableCell />\n <TableCell />\n <TableCell>Total</TableCell>\n <TableCell>{getTotal(data)}</TableCell>\n </TableRow>\n </TableBody>\n </Table>\n </TableContainer>\n </div>\n <TicketsTable\n ticketsTitle={ticketsTitle}\n tickets={data.tickets}\n columns={\n ticketsTableColumns?.length\n ? ticketsTableColumns\n : [\n { key: 'hash' as never, label: 'Ticket ID' },\n { key: 'ticket_type' as never, label: 'Ticket Type' },\n { key: 'holder_name' as never, label: 'Ticket Holder' },\n { key: 'status' as never, label: 'Status' },\n { key: 'download' as never, label: '' },\n { key: 'sell_ticket' as never, label: '' },\n ]\n }\n handleSellTicket={handleSellTicket}\n handleRemoveFromResale={handleRemoveFromResale}\n displayColumnNameInRow={displayColumnNameInRow}\n canSellTicket={canSellTicket}\n />\n <div className=\"return-button-container\">\n <button\n type=\"button\"\n className=\"return-button\"\n onClick={() => {\n if (onReturnButtonClick) {\n onReturnButtonClick(data)\n } else if (typeof window !== 'undefined') {\n window.location.assign(ordersPath ?? '/orders')\n }\n }}\n >\n Return to Order History\n </button>\n </div>\n </>\n )}\n {showResaleModal && (\n <TicketResaleModal\n ticket={activeTicket}\n onClose={handleOnClose}\n onSubmit={handleOnSubmit}\n loading={resaleTicketLoading}\n />\n )}\n {showRemoveResaleModal && (\n <ConfirmModal\n message=\"Are you sure you want to withdraw your ticket from resale?\"\n onClose={onCloseRemoveResale}\n onConfirm={onConfirmRemoveResale}\n loading={removeFromResaleLoading}\n />\n )}\n </div>\n )\n}\n","import { Alert } from '@mui/material'\nimport axios from 'axios'\nimport { identity } from 'lodash'\nimport _find from 'lodash/find'\nimport _forEach from 'lodash/forEach'\nimport _get from 'lodash/get'\nimport _isEmpty from 'lodash/isEmpty'\nimport _keys from 'lodash/keys'\nimport _map from 'lodash/map'\nimport _values from 'lodash/values'\nimport moment from 'moment'\nimport React, { useCallback, useEffect, useRef,useState } from 'react'\nimport Countdown from 'react-countdown'\n\nimport {\n getSeatMapData,\n getSeatMapStatuses,\n removeSeatReserve,\n reserveSeat,\n} from '../../api'\nimport { showZero } from '../../utils/showZero'\nimport { ReferralLogic } from '../ticketsContainer/ReferralLogic'\nimport { addToCartFunc } from './addToCart'\nimport { SeatMapComponent } from './SeatMapComponent'\nimport { TicketsSection } from './TicketsSection'\nimport {\n getAddToCartRequestData,\n getOwnReservationsBasedOnStatuses,\n getTicketDropdownData,\n getTierIdBasedOnSeatId,\n} from './utils'\n\ninterface IGuestCounts {\n [key: string]: number;\n}\n\nexport const SeatMapContainer = (props: IMapContainerProps) => {\n const {\n event: {\n id: eventId,\n currency: { symbol },\n tableMapEnabled,\n country,\n },\n mapContainerId,\n timerMessage = '',\n onAddToCartSuccess = identity,\n onCountdownFinish = identity,\n ticketDeleteButtonContent,\n } = props\n\n const [seatMapData, setSeatMapData] = useState({\n seatMap: '',\n } as {\n seatMap: string;\n seatReservationTime: number;\n seatMapType: string | null;\n tierPrices: any;\n predefinedSeats: any;\n })\n const eventSeatsRef = useRef([] as EventSeat[])\n const ticketTypeTierRelationsRef = useRef({} as TicketTypeTierRelations)\n const [selectedTickets, setSelectedTickets] = useState<{\n [seatId: string]: string;\n }>({})\n const [seatMapStatuses, setSeatMapStatuses] = useState('')\n const [reservedSeats, setReservedSeats] = useState<\n Array<SeatReservationData>\n >([])\n const [isReserving, setIsReserving] = useState(false)\n const [isAddingToCart, setIsAddingToCart] = useState(false)\n const [error, setError] = useState<string | null>(null)\n const [showTimer, setShowTimer] = useState(\n Date.now() <= Number(localStorage.getItem(`reservationStart-${eventId}`))\n )\n const [guestCounts, setGuestCounts] = useState<IGuestCounts>(\n {} as IGuestCounts\n )\n\n const updateGuestCounts = (data: any) => {\n _forEach(data, (item: any) => {\n const tierTickets = ticketTypeTierRelationsRef.current[item.tierId]\n const seatTicketsArray = _values(tierTickets)\n\n setGuestCounts((prevState: any) => ({\n ...prevState,\n [item.seatId]: Number(\n seatTicketsArray[0].ticket_type_min_number_of_guests\n ),\n }))\n })\n }\n\n const fetchSeatMapData = useCallback(async () => {\n try {\n const seatMapDataResponse = await getSeatMapData(eventId)\n const {\n data: {\n attributes: {\n seatData,\n ticketTypeTierRelations,\n eventSeats,\n seatReservationTime,\n seatMapType,\n tierPrices,\n predefinedSeats,\n },\n },\n } = seatMapDataResponse\n eventSeatsRef.current = eventSeats\n ticketTypeTierRelationsRef.current = ticketTypeTierRelations\n setSeatMapData({\n seatMap: JSON.parse(seatData),\n seatReservationTime,\n seatMapType,\n tierPrices,\n predefinedSeats,\n })\n } catch (error) {\n setError('Something went wrong')\n }\n }, [eventId])\n\n const fetchSeatMapReservations = useCallback(async () => {\n try {\n const statusesResponse = await getSeatMapStatuses(eventId)\n const statuses = _get(statusesResponse, 'data.attributes') || {}\n const reservationData: Array<SeatReservationData> = []\n const ownReservations: string[] = getOwnReservationsBasedOnStatuses(\n statuses\n )\n\n _forEach(ownReservations, reservation => {\n const tierIdOfReservation = getTierIdBasedOnSeatId(\n reservation,\n eventSeatsRef.current,\n ) as string\n reservationData.push({\n seatId: reservation,\n tierId: tierIdOfReservation,\n type: 'reserve',\n })\n })\n\n localStorage.setItem('reservationData', JSON.stringify(reservationData))\n setSeatMapStatuses(statusesResponse.data.attributes)\n setReservedSeats(reservationData)\n // automatically set ticket/table type if it's the only one\n if (ticketTypeTierRelationsRef.current) {\n _forEach(reservationData, (item: any) => {\n const tierTickets = ticketTypeTierRelationsRef.current[item.tierId]\n const seatTicketsArray = _values(tierTickets)\n\n setSelectedTickets((prevState: any) => ({\n ...prevState,\n [item.seatId]:\n seatTicketsArray.length === 1\n ? seatTicketsArray[0].ticket_type_id\n : '',\n }))\n })\n\n if (_isEmpty(reservationData)) {\n setGuestCounts({})\n setSelectedTickets({})\n }\n }\n } catch (error) {\n setError('Something went wrong')\n }\n }, [eventId])\n\n const startTimer = useCallback((duration: number) => {\n setShowTimer(true)\n\n if (!localStorage.getItem(`reservationStart-${eventId}`)) {\n localStorage.setItem(\n `reservationStart-${eventId}`,\n String(Date.now() + duration)\n )\n }\n }, [])\n\n const endTimer = useCallback(() => {\n localStorage.removeItem(`reservationStart-${eventId}`)\n setShowTimer(false)\n }, [])\n\n const handleSeatReservation = async (\n eventId: string,\n tierId: string,\n seatId: string\n ) => {\n setIsReserving(true)\n try {\n await reserveSeat(eventId, tierId, seatId)\n await fetchSeatMapReservations()\n\n startTimer(seatMapData.seatReservationTime * 60000)\n const reservationData = JSON.parse(\n localStorage.getItem('reservationData') || ''\n )\n setReservedSeats(reservationData)\n updateGuestCounts(reservationData)\n\n // automatically set ticket/table type if it's the only one\n const relations = _keys(ticketTypeTierRelationsRef.current[tierId])\n const [firstItem] = _keys(ticketTypeTierRelationsRef.current[tierId])\n handleTicketSelect(relations.length === 1 ? firstItem : '', seatId)\n } catch (error) {\n setError('Something went wrong')\n } finally {\n setIsReserving(false)\n }\n }\n\n const handleCancelSeatReservtion = async (\n eventId: string,\n tierId: string,\n seatId: string\n ) => {\n setIsReserving(true)\n try {\n await removeSeatReserve(eventId, tierId, [seatId])\n await fetchSeatMapReservations()\n if (\n _isEmpty(JSON.parse(localStorage.getItem('reservationData') as string))\n ) {\n endTimer()\n }\n const reservationData = JSON.parse(\n localStorage.getItem('reservationData') || ''\n )\n const currentSelectedTickets = { ...selectedTickets }\n delete currentSelectedTickets[seatId]\n setReservedSeats(reservationData)\n setSelectedTickets(currentSelectedTickets)\n } catch (error) {\n setError('Something went wrong')\n } finally {\n setIsReserving(false)\n }\n }\n\n const onSeatClick = async (seatInfo: any) => {\n const {\n seat: { tierId, seatId, status },\n } = seatInfo\n\n const reservationData = JSON.parse(\n localStorage.getItem('reservationData') || '[]'\n )\n if (status === 'B' || status === 'R' || status === 'BLOCKED' || status === 'RE') return\n if (_find(reservationData, data => data.seatId === seatId)) {\n handleCancelSeatReservtion(eventId, tierId, seatId)\n } else if (reservationData.length >= 10) {\n setError('Limit exceeded')\n } else {\n handleSeatReservation(eventId, tierId, seatId)\n }\n }\n\n const handleTicketSelect = (ticketId: string, seatId: string) => {\n const currentSelectedTickets = { ...selectedTickets }\n currentSelectedTickets[seatId] = ticketId\n setSelectedTickets(currentSelectedTickets)\n }\n\n const handleGetTicketBtnClick = async () => {\n setIsAddingToCart(true)\n const ticketsDropdownsData = getTicketDropdownData(\n reservedSeats,\n ticketTypeTierRelationsRef.current\n )\n let selectedSeats = {}\n _forEach(ticketsDropdownsData, ticketData => {\n selectedSeats = {\n ...selectedSeats,\n [ticketData.seatId]: ticketData.ticketsData,\n }\n })\n const addToCartData = getAddToCartRequestData({\n eventId,\n reservations: _map(reservedSeats, seat => seat.seatId),\n selectedSeats,\n selectedTickets,\n guestCounts,\n })\n try {\n const response = await addToCartFunc({\n eventId,\n data: addToCartData,\n ticketQuantity: addToCartData?.attributes?.product_cart_quantity,\n })\n localStorage.removeItem('reservationData')\n onAddToCartSuccess(response)\n } catch (error) {\n if (axios.isAxiosError(error)) {\n const message = _get(error, 'response.data.message', '')\n setError(message)\n }\n } finally {\n setIsAddingToCart(false)\n }\n }\n\n useEffect(() => {\n if (\n Date.now() > Number(localStorage.getItem(`reservationStart-${eventId}`))\n ) {\n setSelectedTickets({})\n setReservedSeats([])\n }\n\n const makeRequests = async () => {\n try {\n await fetchSeatMapData()\n fetchSeatMapReservations()\n } catch (error) {\n setError('Something went wrong')\n }\n }\n\n makeRequests()\n\n if (country) {\n localStorage.setItem('eventCountry', country)\n }\n\n const intervalId = setInterval(() => {\n fetchSeatMapReservations()\n }, 3000)\n\n return () => {\n clearInterval(intervalId)\n }\n }, [fetchSeatMapData, fetchSeatMapReservations])\n\n return (\n <>\n {error && (\n <Alert\n severity=\"error\"\n onClose={() => {\n setError(null)\n }}\n variant=\"filled\"\n style={{ width: '350px' }}\n >\n {error}\n </Alert>\n )}\n {showTimer && (\n <Countdown\n date={moment(\n Number(localStorage.getItem(`reservationStart-${eventId}`))\n ).valueOf()}\n renderer={(props: any) => (\n <div className=\"reservation-countdown\">\n <span className=\"reservation-message\">{timerMessage}</span>\n <span className=\"reservation-timer\">\n {showZero(props.minutes)}:{showZero(props.seconds)}\n </span>\n </div>\n )}\n onComplete={() => {\n endTimer()\n setSelectedTickets({})\n setReservedSeats([])\n if (onCountdownFinish) {\n onCountdownFinish()\n }\n }}\n />\n )}\n {Boolean(eventId) && <ReferralLogic eventId={eventId} />}\n <TicketsSection\n selectedTickets={selectedTickets}\n handleTicketSelect={handleTicketSelect}\n handleCancelReservation={(seatId: string, tireId: string) =>\n handleCancelSeatReservtion(eventId, tireId, seatId)\n }\n handleGetTicketClick={handleGetTicketBtnClick}\n isAddingToCart={isAddingToCart}\n reservedSeats={reservedSeats}\n ticketDeleteButtonContent={ticketDeleteButtonContent}\n ticketTypeTierRelations={ticketTypeTierRelationsRef.current}\n currencySymbol={symbol}\n tableMapEnabled={Boolean(tableMapEnabled)}\n guestCounts={guestCounts}\n setGuestCounts={setGuestCounts}\n />\n {seatMapData.seatMap && seatMapStatuses && (\n <SeatMapComponent\n seatMapProps={{\n seatData: seatMapData.seatMap,\n statuses: seatMapStatuses,\n tierPrices: seatMapData.tierPrices,\n seatMapType: seatMapData.seatMapType,\n ticketTypeTierRelations: ticketTypeTierRelationsRef.current,\n seatMapEvents: { onSeatClick },\n isReserving,\n predefinedSeats: seatMapData.predefinedSeats,\n }}\n mapContainerId={mapContainerId}\n />\n )}\n </>\n )\n}\n","import { AxiosError } from 'axios'\nimport _get from 'lodash/get'\nimport React, { useEffect, useState } from 'react'\n\nimport { declineInvitation,processTicket } from '../../api'\n\nexport interface ITicketResaleContainer {\n onProcessTicketSuccess: (res: any) => void;\n onProcessTicketError: (e: AxiosError) => void;\n onDeclineTicketPurchaseSuccess: (res: any) => void;\n onDeclineTicketPurchaseError: (e: AxiosError) => void;\n orderHash?: string;\n billingPath?: string;\n}\n\nexport const TicketResaleContainer = ({\n onProcessTicketSuccess = () => {},\n onProcessTicketError = () => {},\n onDeclineTicketPurchaseSuccess = () => {},\n onDeclineTicketPurchaseError = () => {},\n orderHash,\n billingPath,\n}: ITicketResaleContainer) => {\n const isWindowDefined = typeof window !== 'undefined'\n const [error, setError] = useState('')\n const [successMessage, setSuccessMessage] = useState('')\n\n useEffect(() => {\n (async () => {\n if (isWindowDefined) {\n const params: URLSearchParams = new URL(`${window.location}`)\n .searchParams\n const hash = params.get('invitation_hash') || orderHash || null\n const isDeclined = params.get('decline') || false\n\n if (hash) {\n // Process of declining ticket purchase invitation\n if (isDeclined) {\n try {\n const response = await declineInvitation(hash)\n onDeclineTicketPurchaseSuccess(response)\n setSuccessMessage(\"Thanks for letting us know! We'll offer this ticket to someone else!\")\n } catch (error) {\n setError(error?.response?.data?.message)\n onDeclineTicketPurchaseError(error.response)\n }\n return\n }\n\n try {\n const response = await processTicket(hash)\n const data = _get(response, 'data.data.attributes')\n const age_required = _get(data, 'age_required', false)\n const names_required = _get(data, 'names_required', false)\n const event_id = _get(data, 'event_id')\n\n onProcessTicketSuccess(response.data)\n window.location.href = `${\n billingPath ?? '/billing/billing-info/'\n }?age_required=${age_required}&names_required=${names_required}&event_id=${event_id}`\n } catch (error) {\n setError(error?.response?.data?.message)\n onProcessTicketError(error.response)\n }\n } else {\n window.location.href = '/'\n }\n }\n })()\n }, [])\n\n return (\n <div className=\"ticket-resale-page\">\n <div className={`${successMessage ? 'success-block': 'error-block'}`}>\n <h3>{successMessage ? successMessage : error}</h3>\n </div>\n </div>\n )\n}\n","import './style.css'\n\nimport { createTheme, ThemeOptions } from '@mui/material'\nimport Alert from '@mui/material/Alert'\nimport { ThemeProvider } from '@mui/private-theming'\nimport { CSSProperties } from '@mui/styles'\nimport axios, { AxiosError } from 'axios'\nimport jwt_decode from 'jwt-decode'\nimport _filter from 'lodash/filter'\nimport _find from 'lodash/find'\nimport _forEach from 'lodash/forEach'\nimport _get from 'lodash/get'\nimport _identity from 'lodash/identity'\nimport _includes from 'lodash/includes'\nimport _isEmpty from 'lodash/isEmpty'\nimport _some from 'lodash/some'\nimport React, { ReactNode, useEffect, useRef, useState } from 'react'\nimport Button from 'react-bootstrap/Button'\n\nimport {\n addToCart,\n getCheckoutPageConfigs,\n getEvent,\n getProfileData,\n getTickets,\n logout,\n postOnCheckout,\n} from '../../api'\nimport { X_TF_ECOMMERCE } from '../../constants'\nimport { useCookieListener } from '../../hooks/useCookieListener'\nimport { usePixel } from '../../hooks/usePixel'\nimport {\n createCheckoutDataBodyWithDefaultHolder,\n deleteCookieByName,\n getCookieByName,\n getQueryVariable,\n isBrowser,\n setLoggedUserData,\n} from '../../utils'\nimport { Loader } from '../common/index'\nimport { PoweredBy } from '../common/PoweredBy'\nimport ConfirmModal from '../confirmModal'\nimport Countdown from '../countdown'\nimport { VerificationPendingModal } from '../idVerificationContainer/VerificationPendingModal'\nimport { LoginModal } from '../loginModal'\nimport WaitingList from '../waitingList'\nimport { AccessCodeSection } from './AccessCodeSection'\nimport { PromoCodeSection } from './PromoCodeSection'\nimport { ReferralLogic } from './ReferralLogic'\nimport { TicketsSection } from './TicketsSection'\n\ninterface CartSuccess {\n skip_billing_page: boolean;\n names_required: boolean;\n age_required: boolean;\n phone_required: boolean;\n hide_phone_field: boolean;\n event_id: string;\n hash?: string;\n total?: string;\n hasAddOn?: boolean;\n free_ticket: boolean;\n collect_optional_wallet_address?: boolean;\n collect_mandatory_wallet_address?: boolean;\n}\n\nexport interface IGetTickets {\n eventId: number;\n onAddToCartSuccess: (response: CartSuccess) => void;\n getTicketsLabel?: string;\n contentStyle?: React.CSSProperties;\n onAddToCartError: (e: AxiosError) => void;\n onGetTicketsSuccess: (response: any) => void;\n onGetTicketsError: (e: AxiosError) => void;\n onLogoutSuccess: () => void;\n onLogoutError: (e: AxiosError) => void;\n onGetProfileDataSuccess: (response: any) => void;\n onGetProfileDataError: (e: AxiosError) => void;\n onLoginSuccess: () => void;\n handleNotInvitedModalClose: () => void;\n handleInvalidLinkModalClose: () => void;\n theme?: 'light' | 'dark';\n queryPromoCode?: string;\n isPromotionsEnabled?: boolean;\n themeOptions?: ThemeOptions & {\n input?: CSSProperties;\n checkbox?: CSSProperties;\n };\n isAccessCodeEnabled?: boolean;\n hideSessionButtons?: boolean;\n hideWaitingList?: boolean;\n enableBillingInfoAutoCreate?: boolean;\n isButtonScrollable?: boolean;\n sortBySoldOut?: boolean;\n disableCountdownLeadingZero?: boolean;\n isLoggedIn?: boolean;\n actionsSectionComponent?: any;\n ticketsHeaderComponent?: ReactNode;\n hideTicketsHeader?: boolean;\n tableTicketsHeaderComponent?: ReactNode;\n hideTableTicketsHeader?: boolean;\n enableInfluencersSection?: boolean;\n enableAddOns?: boolean;\n ordersPath?: string;\n showPoweredByImage?: boolean;\n promoText?: string;\n showGroupNameBlock?: boolean;\n currencySybmol?: string;\n onReserveButtonClick?: () => void;\n onPendingVerification?: () => void;\n}\n\nexport interface ITicket {\n id: string | number;\n [key: string]: string | number;\n}\n\ninterface IInfluencer {\n [key: string]: string | undefined;\n}\nexport interface ISelectedTickets {\n isTable: boolean;\n [key: string]: string | number | boolean;\n}\n\nexport const TicketsContainer = ({\n onLoginSuccess,\n getTicketsLabel,\n eventId,\n onAddToCartSuccess,\n contentStyle = {},\n onAddToCartError = _identity,\n onGetTicketsSuccess = _identity,\n onGetTicketsError = _identity,\n onLogoutSuccess = _identity,\n onLogoutError = _identity,\n onGetProfileDataSuccess = _identity,\n onGetProfileDataError = _identity,\n theme = 'light',\n queryPromoCode = '',\n isPromotionsEnabled = true,\n themeOptions,\n isAccessCodeEnabled = false,\n hideSessionButtons = false,\n hideWaitingList = false,\n enableBillingInfoAutoCreate = true,\n isButtonScrollable = false,\n sortBySoldOut = false,\n disableCountdownLeadingZero = false,\n isLoggedIn = false,\n actionsSectionComponent: ActionsSectionComponent,\n ticketsHeaderComponent,\n hideTicketsHeader = false,\n tableTicketsHeaderComponent,\n hideTableTicketsHeader = false,\n enableInfluencersSection = true,\n enableAddOns = true,\n handleNotInvitedModalClose = _identity,\n handleInvalidLinkModalClose = _identity,\n ordersPath,\n showPoweredByImage = false,\n promoText,\n showGroupNameBlock = false,\n currencySybmol = '',\n onReserveButtonClick = _identity,\n onPendingVerification = _identity,\n}: IGetTickets) => {\n const [selectedTickets, setSelectedTickets] = useState({} as ISelectedTickets)\n const isWindowDefined = typeof window !== 'undefined'\n const [isLogged, setIsLogged] = useState(\n Boolean(getCookieByName(X_TF_ECOMMERCE))\n )\n const [showLoginModal, setShowLoginModal] = useState(false)\n const [tickets, setTickets] = useState([] as ITicket[])\n const [event, setEvent] = useState<any>(null)\n const [showWaitingList, setShowWaitingList] = useState(false)\n const [isLoading, setIsLoading] = useState(true)\n const [codeIsLoading, setCodeIsLoading] = useState(false)\n const [handleBookIsLoading, setHandleBookIsLoading] = useState(false)\n const [code, setCode] = useState(getQueryVariable('r') || queryPromoCode)\n const [showPromoInput, setShowPromoInput] = useState(false)\n const [codeIsApplied, setCodeIsApplied] = useState(false)\n const [codeIsInvalid, setCodeIsInvalid] = useState(false)\n const [showAccessCodeSection, setShowAccessCodeSection] = useState(\n isAccessCodeEnabled\n )\n const [showPromoCodeSection, setShowPromoCodeSection] = useState(\n isPromotionsEnabled\n )\n const [error, setError] = useState(null)\n const [isNotInvitedError, setIsNotInvitedError] = useState('')\n const [isInvalidLinkError, setIsInvalidLinkError] = useState('')\n const [pendingVerificationMessage, setPendingVerificationMessage] = useState()\n\n const ticketsContainerRef = useRef<HTMLDivElement>(null)\n const pageUrl = isBrowser ? window.location.href.split('?')[0] : ''\n\n useCookieListener(X_TF_ECOMMERCE, value => setIsLogged(Boolean(value)))\n usePixel(eventId, { pageUrl })\n\n useEffect(() => {\n if (typeof window !== 'undefined') {\n const access_token = window.localStorage.getItem('access_token')\n if (access_token) {\n const decoded = jwt_decode<{ exp: number }>(access_token)\n if (decoded && decoded.exp < Date.now() / 1000) {\n window.localStorage.removeItem('access_token')\n window.localStorage.removeItem('user_data')\n }\n }\n }\n }, [])\n\n useEffect(() => {\n !!eventId && getTicketsApi()\n }, [eventId])\n\n useEffect(() => {\n if (isLogged) {\n fetchUserData()\n .then(res => {\n window.localStorage.setItem('user_data', JSON.stringify(res))\n onGetProfileDataSuccess(res)\n })\n .catch(e => {\n if (axios.isAxiosError(e)) {\n onGetProfileDataError(e)\n }\n })\n }\n }, [isLogged])\n\n const handleLogout = async () => {\n try {\n await logout()\n onLogoutSuccess()\n if (isWindowDefined) {\n window.localStorage.removeItem('access_token')\n window.localStorage.removeItem('user_data')\n setIsLogged(false)\n const event = new window.CustomEvent('tf-logout')\n deleteCookieByName('X-TF-ECOMMERCE')\n window.document.dispatchEvent(event)\n }\n } catch (e) {\n onLogoutError(e)\n }\n }\n\n const handleExternalLogin = () => {\n setIsLogged(true)\n }\n\n const handleOnClose = () => {\n setShowLoginModal(false)\n }\n\n const handleOnLogin = () => {\n setShowLoginModal(false)\n setIsLogged(true)\n if (onLoginSuccess) {\n onLoginSuccess()\n }\n }\n\n async function getTicketsApi(isUpdateingCode?: boolean, type?: string) {\n try {\n isUpdateingCode ? setCodeIsLoading(true) : setIsLoading(true)\n const previewKey = getQueryVariable('pk') || undefined\n const response = await getTickets(eventId, code, previewKey)\n const eventResponse = await getEvent(eventId, previewKey)\n if (response.data.success) {\n const attributes = _get(response, 'data.data.attributes')\n type === 'promo' && setCodeIsApplied(attributes.ValidPromoCode)\n type === 'promo' && setCodeIsInvalid(!attributes.ValidPromoCode)\n setTickets(_get(attributes, 'tickets'))\n setShowWaitingList(attributes.showWaitingList)\n onGetTicketsSuccess(response.data)\n setCode('')\n setShowAccessCodeSection(attributes.is_access_code)\n setShowPromoCodeSection(attributes.isPromotionsEnabled)\n }\n if (eventResponse.data.success) {\n const event = _get(eventResponse, 'data.data.attributes')\n setEvent(event)\n\n if (event.country && isWindowDefined) {\n window.localStorage.setItem('eventCountry', event.country)\n }\n }\n } catch (e) {\n if (axios.isAxiosError(e)) {\n onGetTicketsError(e)\n setError(_get(e, 'response.data.message'))\n }\n } finally {\n setIsLoading(false)\n setCodeIsLoading(false)\n }\n }\n\n const handleTicketSelect = (\n key: string,\n value: number | string,\n isTable = false\n ) => {\n setSelectedTickets(prevState => {\n if (Object.keys(prevState)[0] !== key && !value) {\n return prevState\n }\n return {\n [key]: value,\n isTable,\n }\n })\n }\n\n const handleOrdersClick = () => {\n if (isWindowDefined) {\n window.location.href = ordersPath ?? '/orders'\n }\n }\n\n const onErrorClose = () => {\n setError(null)\n }\n\n const handleBook = async () => {\n setHandleBookIsLoading(true)\n const ticket =\n _find(tickets, item => selectedTickets[item.id] > 0) || ({} as ITicket)\n const optionName = _get(ticket, 'optionName')\n const ticketId = _get(ticket, 'id')\n const isTableType = _get(ticket, 'isTable', false)\n const productCartQuantity = +selectedTickets[ticket.id]\n const ticketQuantity = isTableType ? 1 : +selectedTickets[ticket.id]\n\n const data = {\n attributes: {\n alternative_view_id: null,\n product_cart_quantity: productCartQuantity,\n product_options: {\n [optionName]: ticketId,\n },\n product_id: eventId,\n ticket_types: {\n [ticketId]: {\n product_options: {\n [optionName]: ticketId,\n ticket_price: ticket.price,\n },\n quantity: ticketQuantity,\n },\n },\n },\n }\n\n try {\n const result = await addToCart(eventId, data)\n const pageConfigsDataResponse = enableAddOns\n ? await getCheckoutPageConfigs()\n : {\n status: 200,\n data: { attributes: _get(result, 'data.data.attributes') },\n }\n\n if (result.status === 200 && pageConfigsDataResponse.status === 200) {\n const pageConfigsData =\n _get(pageConfigsDataResponse, 'data.attributes') || {}\n\n const skipBillingPage = pageConfigsData.skip_billing_page ?? false\n const nameIsRequired = pageConfigsData.names_required ?? false\n const ageIsRequired = pageConfigsData.age_required ?? false\n const phoneIsRequired = pageConfigsData.phone_required ?? false\n const hidePhoneField = pageConfigsData.hide_phone_field ?? false\n const hasAddOn = pageConfigsData.has_add_on ?? false\n const freeTicket = pageConfigsData.free_ticket ?? false\n const collectOptionalWalletAddress =\n pageConfigsData.collect_optional_wallet_address ?? false\n const collectMandatoryWalletAddress =\n pageConfigsData.collect_mandatory_wallet_address ?? false\n\n let hash = ''\n let total = ''\n\n const isWindowDefined = typeof window !== 'undefined'\n isWindowDefined && window.localStorage.removeItem('add_ons')\n\n if (skipBillingPage && !hasAddOn) {\n // Get user data for checkout data\n const userData =\n isWindowDefined && window.localStorage.getItem('user_data')\n ? JSON.parse(window.localStorage.getItem('user_data') || '')\n : {}\n\n const access_token =\n isWindowDefined && window.localStorage.getItem('access_token')\n ? window.localStorage.getItem('access_token') || ''\n : ''\n\n const checkoutBody = createCheckoutDataBodyWithDefaultHolder(\n ticketQuantity,\n userData\n )\n\n const checkoutResult = enableBillingInfoAutoCreate\n ? await postOnCheckout(checkoutBody, access_token, freeTicket)\n : null\n\n hash = _get(checkoutResult, 'data.data.attributes.hash')\n total = _get(checkoutResult, 'data.data.attributes.total')\n }\n\n onAddToCartSuccess({\n skip_billing_page: skipBillingPage,\n names_required: nameIsRequired,\n phone_required: phoneIsRequired,\n age_required: ageIsRequired,\n hide_phone_field: hidePhoneField,\n free_ticket: freeTicket,\n collect_optional_wallet_address: collectOptionalWalletAddress,\n collect_mandatory_wallet_address: collectMandatoryWalletAddress,\n event_id: String(eventId),\n hash,\n total,\n hasAddOn,\n })\n }\n } catch (e) {\n if (e.response?.data?.data?.hasUnverifiedOrder) {\n setPendingVerificationMessage(e.response?.data?.message)\n } else if (axios.isAxiosError(e)) {\n onAddToCartError(e)\n const message = _get(e, 'response.data.message', '')\n const isInvalidLinkError = _includes(\n message,\n 'No more of this ticket type are available right now'\n )\n const isNotInvitedError = _includes(\n message,\n 'You must have been invited to this event to attend'\n )\n\n if (isInvalidLinkError) {\n setIsInvalidLinkError(message)\n } else if (isNotInvitedError) {\n setIsNotInvitedError(message)\n } else {\n setError(message)\n }\n }\n } finally {\n setHandleBookIsLoading(false)\n }\n }\n\n const updateTickets = (isUpdateingCode?: boolean, type?: string) => {\n getTicketsApi(isUpdateingCode, type)\n }\n\n const fetchUserData = async () => {\n try {\n const userDataResponse = await getProfileData()\n const profileData = _get(userDataResponse, 'data.data')\n const profileDataObj = setLoggedUserData(profileData)\n return profileDataObj\n } catch (e) {\n throw new Error(e)\n }\n }\n\n const isTicketOnSale = _some(\n tickets,\n item => item.salesStarted && !item.salesEnded && !item.soldOut\n )\n\n const eventHasTickets = !_isEmpty(tickets)\n const isSalesClosed = event?.salesEnded\n\n const themeMui = createTheme(themeOptions)\n\n useEffect(() => {\n window.document.addEventListener('custom-login', handleExternalLogin)\n window.document.addEventListener('custom-logout', handleLogout)\n\n return () => {\n window.document.removeEventListener('custom-login', handleExternalLogin)\n window.document.removeEventListener('custom-logout', handleLogout)\n }\n }, [])\n\n const handleGetTicketClick = () => {\n if (\n !handleBookIsLoading &&\n !_isEmpty(selectedTickets) &&\n Object.values(selectedTickets)[0] > 0\n ) {\n handleBook()\n } else {\n if (\n isButtonScrollable &&\n ticketsContainerRef &&\n ticketsContainerRef.current\n ) {\n ticketsContainerRef.current.scrollIntoView({\n behavior: 'smooth',\n block: 'center',\n inline: 'nearest',\n })\n }\n }\n }\n\n const bookButtonIsDisabled =\n (handleBookIsLoading ||\n _isEmpty(selectedTickets) ||\n Object.values(selectedTickets)[0] === 0) &&\n !event?.flagSeatMapAllowed\n\n const isTicketAvailable = _some(\n tickets,\n ticket => ticket.displayTicket && !ticket.soldOut && ticket.salesStarted\n )\n\n const wrappedActionsSectionComponent = React.isValidElement(\n ActionsSectionComponent\n )\n ? React.cloneElement(ActionsSectionComponent as React.ReactElement<any>, {\n handleGetTicketClick,\n isTicketOnSale,\n isTicketAvailable,\n })\n : null\n\n const externalUrl = event?.redirectUrl\n const eventSaleIsNotStarted =\n !event?.salesStarted && event?.salesStart && !isTicketAvailable\n const influencers = event?.referralsEnabled ? event?.referrals : []\n\n const canShowGetTicketBtn = () => {\n if (\n !wrappedActionsSectionComponent &&\n !eventSaleIsNotStarted &&\n isTicketOnSale &&\n !event?.salesEnded &&\n !externalUrl\n ) {\n return true\n }\n\n return false\n }\n\n const onClose = (value: string) => {\n if (value === 'notInvited') {\n handleNotInvitedModalClose()\n } else if (value === 'invalidLink') {\n handleInvalidLinkModalClose()\n }\n setIsNotInvitedError('')\n setIsInvalidLinkError('')\n }\n const hideTopInfluencers = event?.hideTopInfluencers\n const isSeatMapAllowed = _get(event, 'seatMapAllowed', false)\n const isTableMapEnabled = _get(event, 'tableMapEnabled', false)\n\n const tableTickets = _filter(tickets, (ticket: any) => ticket.isTable)\n const ordinarTickets = {} as ITicket\n _forEach(tickets, (ticket: any, key: string) => {\n if (!ticket.isTable) {\n ordinarTickets[key] = ticket\n }\n })\n\n return (\n <ThemeProvider theme={themeMui}>\n {!isLoading && <ReferralLogic eventId={eventId} />}\n <div className={`get-tickets-page ${theme}`} style={contentStyle}>\n {isInvalidLinkError && (\n <ConfirmModal\n message={isInvalidLinkError}\n hideCancelBtn={true}\n onClose={() => onClose('invalidLink')}\n onConfirm={() => onClose('invalidLink')}\n />\n )}\n {isNotInvitedError && (\n <ConfirmModal\n hideCancelBtn={true}\n message={isNotInvitedError}\n onClose={() => onClose('notInvited')}\n onConfirm={() => onClose('notInvited')}\n // loading={removeFromResaleLoading}\n />\n )}\n {error && (\n <Alert\n severity=\"error\"\n onClose={onErrorClose}\n variant=\"filled\"\n style={{ width: '350px' }}\n >\n {error}\n </Alert>\n )}\n {isLoading ? (\n <Loader />\n ) : (\n <div ref={ticketsContainerRef}>\n {!isSalesClosed && (\n <TicketsSection\n event={event}\n ticketsList={ordinarTickets}\n tableTickets={tableTickets}\n selectedTickets={selectedTickets}\n handleTicketSelect={handleTicketSelect}\n sortBySoldOut={sortBySoldOut}\n ticketsHeaderComponent={ticketsHeaderComponent}\n tableTicketsHeaderComponent={tableTicketsHeaderComponent}\n hideTableTicketsHeader={\n hideTableTicketsHeader || _isEmpty(tableTickets)\n }\n hideTicketsHeader={\n hideTicketsHeader || _isEmpty(ordinarTickets)\n }\n showGroupNameBlock={showGroupNameBlock}\n currencySybmol={currencySybmol}\n isSeatMapAllowed={isSeatMapAllowed}\n />\n )}\n {externalUrl ? null : isSalesClosed ? (\n <p\n className={`event-closed-message ${\n !isLoggedIn ? 'event-closed-on-bottom' : ''\n }`}\n >\n Sales for this event are closed.\n </p>\n ) : eventSaleIsNotStarted ? (\n <Countdown\n startDate={event.salesStart}\n timezone={event.timezone}\n title=\"Sales start in:\"\n message=\"No tickets are currently available for this event.\"\n showMessage={!eventHasTickets}\n callback={updateTickets}\n disableLeadingZero={disableCountdownLeadingZero}\n isLoggedIn={isLoggedIn}\n />\n ) : null}\n {showWaitingList && event.salesStarted && !hideWaitingList && (\n <WaitingList\n tickets={ordinarTickets}\n eventId={eventId}\n defaultMaxQuantity={event.waitingListMaxQuantity}\n />\n )}\n {codeIsLoading ? (\n <Loader />\n ) : isSalesClosed ? null : showAccessCodeSection ? (\n <AccessCodeSection\n code={code}\n setCode={setCode}\n updateTickets={updateTickets}\n />\n ) : showPromoCodeSection ? (\n <PromoCodeSection\n code={code}\n codeIsApplied={codeIsApplied}\n setCodeIsApplied={setCodeIsApplied}\n showPromoInput={showPromoInput}\n setShowPromoInput={setShowPromoInput}\n setCode={setCode}\n updateTickets={updateTickets}\n codeIsInvalid={codeIsInvalid}\n setCodeIsInvalid={setCodeIsInvalid}\n promoText={promoText}\n />\n ) : null}\n {wrappedActionsSectionComponent}\n {canShowGetTicketBtn() && (\n <Button\n aria-hidden={true}\n className={`book-button \n ${bookButtonIsDisabled ? 'disabled' : ''} \n ${isButtonScrollable ? 'is-scrollable' : ''}\n ${!isLoggedIn ? 'on-bottom' : ''}\n `}\n onClick={handleGetTicketClick}\n >\n {selectedTickets.isTable\n ? 'RESERVE TABLES'\n : getTicketsLabel || 'GET TICKETS'}\n </Button>\n )}\n {isSeatMapAllowed && !event?.salesEnded && isTicketAvailable && (\n <Button\n className=\"reserve-button\"\n aria-hidden={true}\n onClick={onReserveButtonClick}\n >\n {isTableMapEnabled ? 'Select on map' : 'Select your seats'}\n </Button>\n )}\n {isLogged && !hideSessionButtons ? (\n <div className=\"session-wrapper\">\n <span className=\"session-container\">\n <Button\n variant=\"outline-light\"\n className=\"session-buttons\"\n onClick={handleOrdersClick}\n >\n My Orders\n </Button>\n </span>\n <span className=\"session-container\">\n <Button\n variant=\"outline-light\"\n className=\"session-buttons\"\n onClick={handleLogout}\n >\n Log out\n </Button>\n </span>\n </div>\n ) : (\n ''\n )}\n </div>\n )}\n {showLoginModal ? (\n <LoginModal onClose={handleOnClose} onLogin={handleOnLogin} />\n ) : null}\n </div>\n {showPoweredByImage ? <PoweredBy /> : null}\n {enableInfluencersSection && !hideTopInfluencers && influencers.length ? (\n <div className=\"event-influencers\">\n <h3>\n <span>TOP</span> INFLUENCERS\n </h3>\n <ol className=\"influencer-list\">\n {influencers.map((influencer: IInfluencer, i: number) => (\n <li className=\"influencer-item\" key={i}>\n {`${influencer.firstName} ${influencer.lastName?.charAt(0)}`}{' '}\n </li>\n ))}\n </ol>\n </div>\n ) : null}\n <VerificationPendingModal\n message={pendingVerificationMessage}\n onClose={() => {\n onPendingVerification()\n }}\n />\n </ThemeProvider>\n )\n}\n","export const X_TF_ECOMMERCE = 'X-TF-ECOMMERCE'\n","import { useEffect, useRef, useState } from 'react'\n\nimport { getCookieByName } from '../utils'\n\nexport const useCookieListener = (\n key: string,\n handler: (value: string | null) => void\n) => {\n const getCookie = () => getCookieByName(key)\n const [intervalValue, setIntervalValue] = useState<NodeJS.Timeout>()\n const cookieRef = useRef<string>(getCookie())\n\n const handleCookieChange = () => {\n const currentCookie = getCookie()\n const prevCookie = cookieRef.current\n\n if (currentCookie !== prevCookie) {\n cookieRef.current = getCookie()\n handler(cookieRef.current)\n }\n }\n\n useEffect(() => {\n const interval = setInterval(handleCookieChange, 500)\n setIntervalValue(interval)\n\n return () => {\n intervalValue && clearInterval(intervalValue)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n}\n","export const setLoggedUserData = (data: IUserData) => ({\n id: data.id,\n first_name: data.firstName,\n last_name: data.lastName,\n email: data.email,\n confirmEmail: data.email,\n city: data?.city || '',\n country: data?.countryId || data?.country || '',\n phone: data?.phone || '',\n street_address: data?.streetAddress || '',\n state: data?.stateId || '',\n zip: data?.zip || data?.zipCode || '',\n})\n"],"names":["ttfHeaders","Accept","Content-Type","CONFIGS","publicRequest","axios","create","baseURL","BASE_URL","headers","getQueryVariable","variable","window","vars","location","search","substring","split","i","length","pair","decodeURIComponent","ErrorFocus","connect","componentDidUpdate","prevProps","formik","isSubmitting","isValidating","keys","Object","errors","errorElement","document","querySelector","focus","Component","getDomain","url","subdomain","updatedUrl","replace","slice","join","indexOf","getCookieByName","cname","name","ca","cookie","c","charAt","deleteCookieByName","domain","hostname","downloadPDF","pdfUrl","xtfCookie","accessToken","localStorage","getItem","Authorization","X-TF-ECOMMERCE","fetch","credentials","then","response","_context","blob","blobValue","fileNameHeader","get","fileName","Error","file","Blob","type","fileURL","URL","createObjectURL","link","createElement","href","setAttribute","body","appendChild","click","removeChild","error","createCheckoutDataBodyWithDefaultHolder","ticketsQuantity","logedInValues","includeDob","userCredentials","ticket_holders","first_name","_get","last_name","phone","email","push","attributes","confirm_email","holderAgeDate","Date","dob_day","getDate","dob_month","getMonth","dob_year","getFullYear","createMarkup","data","__html","isBrowser","isJson","value","JSON","parse","e","isWindowDefined","isDocumentDefined","interceptors","use","authGuestToken","setItem","setGuestToken","_error$response","status","removeItem","_error$response2","_error$response2$data","Promise","reject","request","config","guestToken","userData","updatedHeaders","Authorization-Guest","additionalCookiesHeaderValue","Additional-Cookies","X_SOURCE_ORIGIN","X-Source-Origin","method","days","expires","date","setTime","getTime","toUTCString","setCustomCookie","token","defaults","common","setBaseUrl","baseUrl","setAccessToken","setCustomHeader","guestHeaderResponseValue","guestHeaderExistingValue","guestHeader","getEvent","id","pk","referralValue","referralId","searchParams","referral_key","referralIdlocal","params","Referer-Url","referrer","Referrer-Id","getTickets","promoCode","invitationHash","Promotion-Event","String","Promotion-Code","addToCart","post","getCart","postOnCheckout","freeTicket","city","country","state","zip","street_address","register","getPaymentData","hash","handlePaymentSuccess","orderHash","undefined","getProfileData","getConfirmationData","getOrders","page","limit","eventSlug","BRAND_SLUG","getOrderDetails","orderId","getConditions","eventId","resaleTicket","postReferralVisits","forgotPassword","processTicket","declineInvitation","sendRSVPInfo","validatePhoneNumber","getAddons","_context2","addons","getCheckoutPageConfigs","_context3","getSeatMapData","reservedSeatsHash","reserved_seats_hash","_context4","getSeatMapStatuses","_context5","reserveSeat","tierId","seatId","_context6","ttl","removeSeatReserve","seatIds","_context7","getNetverifyUrl","_context8","checkVerificationStatus","_context9","updateVerificationStatus","_context10","patch","verification","verificationStatus","checkCustomerOrder","_context11","appendScriptsToHeader","code","tempEl","innerHTML","scripts","getElementsByTagName","index","script","src","head","addGTagToHeader","tagId","links","_document","_document2","trim","append","scriptBody","dataLayer","gtag","args","_window","domains","usePixel","options","getScript","page_url","pageOptions","pageUrl","order_hash","brandGoogleTagKey","eventGoogleTagKey","eventGoogleTagManagerLinkerDomains","console","useEffect","emailRegex","combineValidators","validators","error_message","requiredValidator","message","errorMessage","item","addEventListener","err","isFalsy","emailValidator","test","SnackbarAlert","_ref$autoHideDuration","autoHideDuration","onClose","React","className","Snackbar","open","isOpen","anchorOrigin","position","vertical","horizontal","classes","root","Alert","severity","variant","icon","action","filled","CustomField","label","_ref2$type","field","_ref2$selectOptions","selectOptions","_ref2$form","form","touched","submitCount","theme","_ref2$inputProps","inputProps","pInputProps","_ref2$InputProps","InputProps","inputRef","_ref2$multiline","multiline","minRows","maxRows","useState","Boolean","isShrinked","setIsShrinked","_ref","useRef","isAutoFilled","current","_ref$current","matches","isSelectField","isTouched","_includes","customTheme","useTheme","sx","input","_isFunction","_isObject","TextField","placeholder","select","fullWidth","helperText","onFocus","SelectProps","native","MenuProps","InputLabelProps","shrink","onBlur","_map","option","key","disabled","PoweredBy","alt","style","top","left","transform","minWidth","backgroundColor","border","outline","padding","Schema","Yup","shape","required","ForgotPasswordModal","_ref$onLogin","onLogin","_ref$onForgotPassword","onForgotPasswordSuccess","_ref$onForgotPassword2","onForgotPasswordError","_ref$showPoweredByIma","showPoweredByImage","loading","setLoading","onForgotPassword","isAxiosError","Modal","Box","Formik","initialValues","validationSchema","onSubmit","isValid","dirty","Form","handleSubmit","Field","component","CircularProgress","size","onClick","maxHeight","overflow","_ref$actions","actions","_ref$modalClassName","modalClassName","MuiModal","children","Button","VerificationPendingModal","props","displayModal","showModal","setShowModal","LoginModal","_ref$alreadyHasUser","alreadyHasUser","_ref$userExpired","userExpired","_ref$onGetProfileData","onGetProfileDataSuccess","_identity","_ref$onGetProfileData2","onGetProfileDataError","_ref$onSignup","onSignup","_ref$modalClassname","modalClassname","logo","_ref$showForgotPasswo","showForgotPasswordButton","_ref$showSignUpButton","showSignUpButton","setError","password","CLIENT_ID","profileResponse","profileSpecifiedData","profileDataObj","firstName","lastName","confirmEmail","countryId","streetAddress","stateId","zipCode","stringify","event","CustomEvent","dispatchEvent","_e$response","_e$response$data","validate","meta","SignupSchema","min","confirmPassword","oneOf","SignupModal","_ref$onRegisterSucces","onRegisterSuccess","_ref$onRegisterError","onRegisterError","values","formData","FormData","set","CLIENT_SECRET","access_token_register","res","refreshToken","showZero","intNumber","Number","_isNumber","TimerWidget","expires_at","buyLoading","_ref$onCountdownFinis","onCountdownFinish","setShowTimer","handleCountdownFinish","timerRl","visibility","SVG","width","height","fill","Countdown","now","renderer","minutes","seconds","completed","memo","CheckboxField","rest","FormControl","_rest$form","FormGroup","FormControlLabel","control","Checkbox","componentsProps","typography","checkbox","_rest$form2","FormHelperText","PhoneNumberField","_ref$form","setFieldError","setFieldValue","setFieldTouched","setErrors","_ref$disableDropdown","disableDropdown","_ref$defaultCountry","defaultCountry","_ref$fill","setPhoneValidationIsLoading","isCountryCodeEditable","debounceCb","useCallback","_debounce","cb","newErrors","MuiPhoneNumber","onChange","dialCode","autoFormat","disableAreaCodes","countryCodeEditable","Loader","NativeSelectField","_ref$type","_ref$selectOptions","_ref$onChange","InputLabel","htmlFor","Select","target","RadioGroupField","radios","radioId","FormLabel","RadioGroup","map","radio","Radio","SelectField","isMultiple","_ref$options","selectId","getSelectedItemLabel","selectedValue","selectedItem","find","labelId","multiple","OutlinedInput","renderValue","selected","textAlign","MenuItem","checked","ListItemText","primary","compactStyleTheme","createTheme","components","MuiPaper","defaultProps","& > div","& > div > div, & > div > div > div, & .MuiCalendarPicker-root","& .MuiTypography-caption","margin","& .PrivatePickersSlideTransition-root","minHeight","DATE_SIZE","& .PrivatePickersSlideTransition-root [role=\"row\"]","& .MuiPickersDay-dayWithMargin","& .MuiPickersDay-root","& .MuiPickersArrowSwitcher-spacer","& [role=\"presentation\"] .PrivatePickersFadeTransitionGroup-root","marginRight","DatePickerField","_ref$useCompact","useCompact","_ref$dateFormat","dateFormat","_ref$placeholder","ThemeProvider","LocalizationProvider","dateAdapter","AdapterMoment","DatePicker","PopperProps","placement","showDaysOutsideCurrentMonth","disableFuture","inputFormat","mask","renderInput","evt","getInitialValues","propsInitialValues","userValues","results","_flatMapDeep","fields","groupItems","_forEach","groupItem","createRegisterFormData","checkoutBody","flagFreeTicket","bodyFormData","includes","setLoggedUserData","createCheckoutDataBody","holderAge","restValues","holders","individualHolder","fromEntries","entries","filter","_loop","holder","firstNameLogged","lastNameLogged","emailLogged","filteredRestValue","getValidateFunctions","element","states","validationFunctions","onValidate","assingUniqueIds","itemValue","_isArray","some","uniqueId","nanoid","getFieldLabel","flagRequirePhone","collectMandatoryWalletAddress","isRequiredField","isValidElement","getFieldComponent","select_multi","text","LogicRunner","setStates","setValues","setUserValues","onGetStatesSuccess","onGetStatesError","shouldFetchCountries","brandOptIn","prevCountry","mappedStates","stateExists","_mappedStates$find","_mappedStates$","fetchStates","userDataEncoded","parsedData","mappedValues","brand_opt_in","holderFirstName-0","holderLastName-0","holderEmail-0","getStoredUserData","BillingInfoContainer","_ref4$ticketHoldersFi","ticketHoldersFields","_ref4$initialValues","_ref4$buttonName","buttonName","_ref4$handleSubmit","_ref4$theme","_ref4$onRegisterSucce","_ref4$onRegisterError","_ref4$onSubmitError","onSubmitError","_ref4$onGetCartSucces","onGetCartSuccess","_ref4$onGetCartError","onGetCartError","_ref4$onGetCountriesS","onGetCountriesSuccess","_ref4$onGetCountriesE","onGetCountriesError","_ref4$onGetStatesSucc","_ref4$onGetStatesErro","_ref4$onGetProfileDat","_ref4$onGetProfileDat2","_ref4$onAuthorizeSucc","onAuthorizeSuccess","_ref4$onAuthorizeErro","onAuthorizeError","_ref4$onLoginSuccess","onLoginSuccess","_ref4$isLoggedIn","isLoggedIn","pIsLoggedIn","_ref4$accountInfoTitl","accountInfoTitle","hideLogo","themeOptions","_ref4$onErrorClose","onErrorClose","_ref4$hideErrorsAlert","hideErrorsAlertSection","_ref4$onSkipBillingPa","onSkipBillingPage","_ref4$skipPage","skipPage","_ref4$canSkipHolderNa","canSkipHolderNames","_ref4$onForgotPasswor","_ref4$onForgotPasswor2","_ref4$shouldFetchCoun","_ref4$onCountdownFini","_ref4$enableTimer","enableTimer","_ref4$showForgotPassw","_ref4$showSignUpButto","_ref4$brandOptIn","_ref4$showPoweredByIm","_ref4$isCountryCodeEd","_ref4$onPendingVerifi","onPendingVerification","isNewUser","setIsNewUser","themeMui","access_token","dataWithUniqueIds","setDataWithUniqueIds","setIsLoggedIn","cartInfoData","setCartInfo","countries","setCountries","showModalLogin","setShowModalLogin","setAlreadyHasUser","setUserExpired","showModalSignup","setShowModalSignup","showModalForgotPassword","setShowModalForgotPassword","setTicketsQuantity","holderFirstName","holderLastName","cardLoading","setCardLoading","isCountriesLoading","setIsCountriesLoading","phoneValidationIsLoading","showDOB","showTicketHolders","optedInFieldValue","ttfOptIn","isTable","hideTtfOptIn","expirationTime","collectOptionalWalletAddress","hidePhoneField","hideWalletAddressField","pendingVerificationMessage","setPendingVerificationMessage","prevData","addAddOnsInAttributes","selectedAddOns","add_ons","hasUniqueId","isEqualData","_isEqual","getQuantity","cart","qty","forEach","quantity","fetchCountries","fetchCart","cartInfo","_cartInfo$cart","Array","fetchUserData","userDataResponse","_isEmpty","removeReferralKey","_e$response$data$data","hasUnverifiedOrder","_e$response2","_e$response2$data","collectPaymentData","collectCheckoutBody","profileData","initialCountry","_find","toLowerCase","Backdrop","color","zIndex","ttf_opt_in","enableReinitialize","formikHelpers","checkoutBodyForRegistration","resRegister","userProfile","_e$response3","_e$response3$data","_e$response3$data$dat","_e$response4","_e$response4$data","_e$response5","_e$response5$data","_e$response6","_e$response6$data","_e$response6$data$dat","_e$response7","_e$response7$data","_e$response8","_e$response9","_e$response9$data","_e$response10","Fragment","labelClassName","group","groupClassname","el","handleBlur","format","_item","currencyNormalizerCreator","currency","getCurrencySymbolByCurrency","createFixedFloatNormalizer","fixedValue","toFixed","base","fontSize","letterSpacing",":-webkit-autofill","::placeholder","invalid","CheckoutForm","total","_ref$onSubmit","_ref$stripeCardOption","stripeCardOptions","_ref$error","stripe_client_secret","billing_info","_ref$isLoading","isLoading","_ref$handleSetLoading","handleSetLoading","_ref$conditions","conditions","disableZipSection","paymentButtonText","stripe","useStripe","elements","useElements","postalCode","setPostalCode","stripeError","setStripeError","checkboxes","setCheckboxes","allowSubmit","setAllowSubmit","preventDefault","card","getElement","CardNumberElement","address","line1","postal_code","createPaymentMethod","billing_details","paymentMethodReq","confirmCardPayment","payment_method","paymentMethod","handleCheckboxes","updatedCheckedState","allChecked","every","buttonIsDiabled","onReady","CardExpiryElement","CardCvcElement","publishableKey","STRIPE_PUBLISHABLE_KEY","getStripePromise","reviewData","stripePublishableKey","stripeAccount","loadStripe","initialOrderValues","product_name","ticketType","price","guest_count","pay_now","initialReviewValues","order_details","facebook","FacebookShareButton","FacebookIcon","messenger","FacebookMessengerShareButton","FacebookMessengerIcon","twitter","TwitterShareButton","TwitterIcon","linkedin","LinkedinShareButton","LinkedinIcon","pinterest","PinterestShareButton","PinterestIcon","vk","VKShareButton","VKIcon","ok","OKShareButton","OKIcon","telegram","TelegramShareButton","TelegramIcon","whatsapp","WhatsappShareButton","WhatsappIcon","reddit","RedditShareButton","RedditIcon","tumblr","TumblrShareButton","TumblrIcon","mailru","MailruShareButton","MailruIcon","EmailShareButton","EmailIcon","livejournal","LivejournalShareButton","LivejournalIcon","viber","ViberShareButton","ViberIcon","workplace","WorkplaceShareButton","WorkplaceIcon","line","LineShareButton","LineIcon","pocket","PocketShareButton","PocketIcon","instapaper","InstapaperShareButton","InstapaperIcon","weibo","WeiboShareButton","WeiboIcon","hatena","HatenaShareButton","HatenaIcon","SocialComponent","mainLabel","subLabel","platform","shareData","_config","Icon","_config2","round","SocialButtons","showDefaultShareButtons","shareLink","appId","shareButtons","clientLabel","showReferralsInfoText","quote","title","shareButton","ConfirmModal","_ref$loading","_ref$hideCancelBtn","hideCancelBtn","_ref$onClose","_ref$onConfirm","onConfirm","isTimeExpired","startDate","timezone","moment","isAfter","tz","_ref$timezone","guess","_ref$title","_ref$message","_ref$showMessage","showMessage","_ref$disableLeadingZe","disableLeadingZero","_ref$callback","callback","duration","setDuration","timeExpired","setTimeExpired","timer","setInterval","clearInterval","currentDate","diffTime","diff","dateArr","year","years","month","months","day","hour","hours","minute","second","timeLeft","unit","val","generateQuantity","n","quantityList","WaitingList","tickets","_ref$defaultMaxQuanti","defaultMaxQuantity","showSuccessMessage","setShowSuccessMessage","ticketTypesList","d","displayName","showTicketsField","requestData","success","ticketTypeId","AccessCodeSection","setCode","updateTickets","isAccessCodeHasValue","onKeyPress","PromoCodeSection","codeIsApplied","showPromoInput","setShowPromoInput","setCodeIsApplied","codeIsInvalid","setCodeIsInvalid","promoText","isPromoCodeHasValue","preProcessor","ReferralLogic","isAlreadyCounted","_asyncToGenerator","TicketRow","ticketTier","prevTicketTier","selectedTickets","handleTicketSelect","isSeatMapAllowed","tableType","soldOutMessage","toUpperCase","isSalesClosed","salesStarted","salesEnded","maxCount","minCount","multiplier","Math","getTicketSelectOptions","maxGuests","maxQuantity","minGuests","minQuantity","ticketsClosedMessage","canPurchaseTicket","displayTicket","isDirectPurchaseAllowed","onSaleContent","borderRadius","displayEmpty","aria-label","PaperProps","returnValue","sold_out","soldOut","TicketsSection","ticketsList","ticketsHeaderComponent","tableTicketsHeaderComponent","hideTicketsHeader","hideTableTicketsHeader","showGroupNameBlock","currencySybmol","tableTickets","symbol","sortedTicketsList","sortBySoldOut","_sortBy","showGroup","ticket","groupName","priceSymbol","arr","ticketPrice","ticketOldPrice","oldPrice","isSoldOut","ticketIsDiscounted","ticketIsFree","ticketPriceElem","isNewGroupTicket","_arr","feeIncluded","_arr2","depositPercent","EventInfoItem","image","tableConfig","columns","header","ItemComponent","row","columnProps","eventName","amount","normalizer","Row","handleDetailsInfo","_ref$columns","hideDetailsButton","TableRow","& > *","borderBottom","column","TableCell","scope","onCellClick","RadioField","schema","yup","to","when","is","confirm","TicketResaleModal","holder_name","event_name","retain_amount_on_sale","ticket_type_is_active","TicketsTable","_ref$handleSellTicket","handleSellTicket","_ref$handleRemoveFrom","handleRemoveFromResale","_ref$icon","_ref$displayColumnNam","displayColumnNameInRow","_ref$canSellTicket","canSellTicket","_ref$ticketsTitle","ticketsTitle","pdfError","setPdfError","pdfDownload","setPdfDownload","TableContainer","Paper","Table","TableHead","TableBody","columnIndex","ticketIsDownloading","pdf_link","is_on_sale","pdfDownloadError","is_sellable","getRow","_ticket$add_ons","colSpan","add_on","password_confirmation","addonsWithGroupsAdapter","addonsData","addOnsGroups","addOnGroupsWithVariants","addOnsWithoutVariants","addon","addOnGroupId","currentGroupId","exsistingGroupIndex","findIndex","addOnGroup","variants","concat","cartAdapter","cartData","expiresAt","AddonComponent","classNamePrefix","_ref$handleAddonChang","handleAddonChange","active","stock","_isNull","generateSelectOptions","generateStockBasedOnLimitations","ticketQuantity","allowedStockCount","limitPerTicket","flagLimitToTicketQuantity","stockBasedOnLimitPerTicket","filterStockBasedOnAvailability","generatedStock","availableStock","filteredStockCount","getAddonSelectOptions","choosedTicketCount","addonsWithOptions","groupsWithSelectedVariantsInfo","groupsWithVariants","simpleAddonStock","variantId","variantStock","stockBasedOnLimitation","choosedVariants","selectedCount","allowedVariantStockCount","variantOptions","addonOptions","getTicketRelatedAddons","ticketId","prerequisiteTicketTypeIds","getSortedAddons","sortDirection","addonsCopy","unsortedVariants","sortOrder","sortedVariants","sortedAddons","_reverse","addToCartFunc","enableBillingInfoAutoCreate","result","pageConfigsDataResponse","pageConfigsData","skipBillingPage","_pageConfigsData$skip","skip_billing_page","nameIsRequired","names_required","ageIsRequired","age_required","phoneIsRequired","phone_required","hide_phone_field","hasAddOn","has_add_on","free_ticket","collect_optional_wallet_address","collect_mandatory_wallet_address","checkoutResult","event_id","getOwnReservationsBasedOnStatuses","statuses","ownReservations","groupRowId","seatIndex","getTicketDropdownData","reservationData","tierReleations","ticketsDropdownsData","reservation","ticketsData","_values","ticket_type_tier_id","ticket_type_name","ticket_type_price","ticket_type_id","getAddToCartRequestData","_ref$reservations","reservations","_ref$selectedSeats","selectedSeats","_ref$selectedTickets","_ref$guestCounts","guestCounts","hasGuests","addToCartData","alternative_view_id","product_cart_quantity","product_options","product_id","ticket_types","productOptions","ticketTypes","sitem","ticket_type_option","_ticketTypes$ticket$t","ticket_price","SeatMapComponent","seatMapProps","mapContainerId","seatData","_seatMapProps$seatMap","seatMapType","_seatMapProps$seatMap2","seatMapEvents","_seatMapProps$ticketT","ticketTypeTierRelations","tierPrices","isReserving","predefinedSeats","ticketTypeTireRelationsArray","parentElement","getElementById","mapComponent","SeatMapView","events","isSelectionOn","clientWidth","isBlockMap","isTableMap","ReactDom","render","reservedSeats","_props$theme","getTicketsBtnLabel","_props$contentStyle","contentStyle","_props$isButtonScroll","isButtonScrollable","handleGetTicketClick","handleCancelReservation","_props$ticketDeleteBu","ticketDeleteButtonContent","currencySymbol","_props$tableMapEnable","tableMapEnabled","setGuestCounts","isAddingToCart","bookButtonIsDisabled","_some","_keys","ticketItem","dropdownData","selectedTicketData","startNum","ticket_type_min_number_of_guests","endNum","ticket_type_max_number_of_guests","numLength","showGuestCountDropdown","guestPrice","guest_price","finalPrice","handleTicketChange","display","flexDirection","justifyContent","ticket_type_deposit","m","from","_","marginLeft","count","getButtonLabel","VERIFICATION_STATUSES","PENDING","APPROVED","FAILED","WRONG_CUSTOMER","_ref$enableBillingInf","_ref$enableTimer","_ref$onGetAddonsPageI","onGetAddonsPageInfoSuccess","_ref$onGetAddonsPageI2","onGetAddonsPageInfoError","_ref$onPostCheckoutSu","onPostCheckoutSuccess","_ref$onPostCheckoutEr","onPostCheckoutError","_ref$onConfirmSelecti","onConfirmSelectionSuccess","_ref$onConfirmSelecti2","onConfirmSelectionError","_ref$onPendingVerific","setAddons","addonsOptions","setAddonsOptions","groupsWithSelectedVariants","setGroupsWithSelectedVariants","groupsWithInitialVariantsValues","setGroupsWithInitialVariantsValues","cartExpirationTime","setCartExpirationTime","_cartAdapter","choosedTicketID","adaptedAddons","ticketRelatedAddons","sortedTicketAddons","_getAddonSelectOption","getAddonsPageInfo","onFieldChange","changeableGroup","currGroupId","currSelectedVariantId","currSelectedVariantCount","updatedGroupsWithSelectedVariants","groupId","changedGroupd","remainingGroupStock","recreatedVariantsOptions","variantCurrSelectedValue","prevState","assign","recreateGroupVariantsSelectOptions","handleConfirm","skipAddonPage","checkoutResponse","_error$response$data","_error$response$data$","handleClearAddons","selectedAddons","isConfirmDisabled","autoComplete","cost","isAddonFree","addonNormalizedPrice","getNormalizedPrice","imageUrl","dangerouslySetInnerHTML","description","confirmationLabels","_ref$hasCopyIcon","hasCopyIcon","isReferralEnabled","_ref$messengerAppId","messengerAppId","_ref$shareButtons","_ref$onGetConfirmatio","onGetConfirmationDataSuccess","_ref$onGetConfirmatio2","onGetConfirmationDataError","_ref$onLinkCopied","onLinkCopied","_ref$showReferralsInf","_ref$showCopyInfoModa","showCopyInfoModal","_ref$showPricingNoteS","showPricingNoteSection","setData","dataEncoded","personal_share_sales","salesData","sales","_d$price","unshift","product_price","_data$product_price","showCopyModal","setShowCopyModal","confirmationTitle","_confirmationLabels$c2","confirmationMain","_confirmationLabels$c3","confirmationHelper","product_image","custom_confirmation_page_text","custom_confirmation_page_text_full_replacement","attach_tickets","disable_referral","ref","personal_share_link","newData","navigator","clipboard","writeText","pricing","onGetVerifyUrlSuccess","_props$onGetVerifyUrl2","onGetVerifyUrlError","_props$onGetVerificat","onGetVerificationStatusSuccess","_props$onGetVerificat2","onGetVerificationStatusError","_props$onVerification","onVerificationMessageModalClose","_props$onPassVerifica","onPassVerificationStepsSuccess","_props$onPassVerifica2","onPassVerificationStepsError","loadingStatus","setLoadingStatus","setVerificationStatus","netverifyUrl","setNetverifyUrl","displaModal","modalData","setModalData","isAccountVerifiedOrPending","callbackNetVerify","payload","transactionStatus","removeEventListener","intervalId","getUrl","urlResponse","getVerificationStatus","statusResponse","getCustomerOrderStatus","makeRequests","checkoutData","iframe","_ref$onGetOrdersSucce","onGetOrdersSuccess","_ref$onGetOrdersError","onGetOrdersError","_ref$theme","_ref$selectEventsLabe","selectEventsLabel","_ref$hideDetailsButto","setLimit","setFilter","isLogged","setIsLogged","fetchData","orders","_data$orders","Autocomplete","disablePortal","getOptionLabel","_event","eventFilter","url_name","purchased_events","_data$orders2","MyTicketsRow","TablePagination","rowsPerPageOptions","total_count","rowsPerPage","onPageChange","newPage","onRowsPerPageChange","_ref$onRemoveFromResa","onRemoveFromResaleSuccess","_ref$onRemoveFromResa2","onRemoveFromResaleError","_ref$onResaleTicketSu","onResaleTicketSuccess","_ref$onResaleTicketEr","onResaleTicketError","onReturnButtonClick","_ref$personalLinkIcon","personalLinkIcon","ticketsTableColumns","ordersPath","pOrderId","_ref$referralTitle","referralTitle","_ref$itemsTitle","itemsTitle","removeFromResaleLoading","setRemoveFromResaleLoading","resaleTicketLoading","setResaleTicketLoading","showResaleModal","setShowResaleModal","showRemoveResaleModal","setShowRemoveResaleModal","activeTicket","setActiveTicket","handleOnSubmit","updatedData","_updatedData$tickets","onConfirmRemoveResale","_updatedData$tickets2","orderSummery","columnsProps","is_table","rel","sales_referred","items","_data$items","_data$items$ticket_ty","guests_count","deposit_paid","remaining","_data$items2","_data$items2$add_ons","_data$tickets$","_has","getTotal","sellTicketType","ticket_type_hash","paymentFields","handlePayment","_ref$formTitle","formTitle","errorText","_ref$onErrorClose","_ref$onGetPaymentData","onGetPaymentDataSuccess","_ref$onGetPaymentData2","onGetPaymentDataError","_ref$onPaymentError","onPaymentError","_ref$disableZipSectio","elementsOptions","_ref$enablePaymentPla","enablePaymentPlan","_ref$orderInfoLabel","orderInfoLabel","_ref$paymentInfoLabel","paymentInfoLabel","setReviewData","orderData","setOrderData","showPaymentPlanSection","setShowPaymentPlanSection","paymentIsLoading","setPaymentIsLoading","paymentDataIsLoading","setPaymentDataIsLoading","setConditions","showFormTitle","showErrorText","isFreeTickets","orderDataArray","_cart$","_cart$2","debt","tableTypes","conditionsInfo","fetchConditions","handlePaymentMiddleWare","paymentSuccessResponse","orderValue","orderCurrency","hasTableTypes","paymentFieldsData","parseFloat","Container","maxWidth","_field$className","_field$normalizer","tableTypeItem","gridTemplateColumns","gridColumnGap","Elements","StripePayment","_ref$onClickOk","onClickOk","tokenProps","_ref$onResetPasswordS","onResetPasswordSuccess","_ref$onResetPasswordE","onResetPasswordError","showSection","modal","setModal","handleModalClose","_props$timerMessage","timerMessage","_props$onAddToCartSuc","onAddToCartSuccess","identity","_props$onCountdownFin","seatMap","seatMapData","setSeatMapData","eventSeatsRef","ticketTypeTierRelationsRef","setSelectedTickets","seatMapStatuses","setSeatMapStatuses","setReservedSeats","setIsReserving","setIsAddingToCart","showTimer","fetchSeatMapData","_seatMapDataResponse$","seatReservationTime","eventSeats","fetchSeatMapReservations","statusesResponse","tierIdOfReservation","seats","seatsCount","rowId","tier_id","seatTicketsArray","startTimer","endTimer","handleSeatReservation","relations","_keys2","firstItem","handleCancelSeatReservtion","currentSelectedTickets","onSeatClick","seatInfo","_seatInfo$seat","seat","handleGetTicketBtnClick","ticketData","_addToCartData$attrib","valueOf","onComplete","tireId","onProcessTicketSuccess","_ref$onProcessTicketE","onProcessTicketError","_ref$onDeclineTicketP","onDeclineTicketPurchaseSuccess","_ref$onDeclineTicketP2","onDeclineTicketPurchaseError","billingPath","successMessage","setSuccessMessage","isDeclined","getTicketsLabel","_ref$contentStyle","_ref$onAddToCartError","onAddToCartError","_ref$onGetTicketsSucc","onGetTicketsSuccess","_ref$onGetTicketsErro","onGetTicketsError","_ref$onLogoutSuccess","onLogoutSuccess","_ref$onLogoutError","onLogoutError","_ref$queryPromoCode","queryPromoCode","_ref$isPromotionsEnab","isPromotionsEnabled","_ref$isAccessCodeEnab","isAccessCodeEnabled","_ref$hideSessionButto","hideSessionButtons","_ref$hideWaitingList","hideWaitingList","_ref$isButtonScrollab","_ref$sortBySoldOut","_ref$disableCountdown","disableCountdownLeadingZero","_ref$isLoggedIn","ActionsSectionComponent","actionsSectionComponent","_ref$hideTicketsHeade","_ref$hideTableTickets","_ref$enableInfluencer","enableInfluencersSection","_ref$enableAddOns","enableAddOns","_ref$handleNotInvited","handleNotInvitedModalClose","_ref$handleInvalidLin","handleInvalidLinkModalClose","_ref$showGroupNameBlo","_ref$currencySybmol","_ref$onReserveButtonC","onReserveButtonClick","showLoginModal","setShowLoginModal","setTickets","setEvent","showWaitingList","setShowWaitingList","setIsLoading","codeIsLoading","setCodeIsLoading","handleBookIsLoading","setHandleBookIsLoading","showAccessCodeSection","setShowAccessCodeSection","showPromoCodeSection","setShowPromoCodeSection","isNotInvitedError","setIsNotInvitedError","isInvalidLinkError","setIsInvalidLinkError","ticketsContainerRef","handler","getCookie","intervalValue","setIntervalValue","cookieRef","handleCookieChange","interval","useCookieListener","decoded","jwt_decode","exp","getTicketsApi","handleLogout","handleExternalLogin","_getTicketsApi","isUpdateingCode","previewKey","eventResponse","ValidPromoCode","is_access_code","handleBook","optionName","isTableType","isTicketOnSale","eventHasTickets","scrollIntoView","behavior","block","inline","flagSeatMapAllowed","isTicketAvailable","wrappedActionsSectionComponent","cloneElement","externalUrl","redirectUrl","eventSaleIsNotStarted","salesStart","influencers","referralsEnabled","referrals","hideTopInfluencers","isTableMapEnabled","_filter","ordinarTickets","waitingListMaxQuantity","influencer","_influencer$lastName","configs"],"mappings":"2iUAGO,IAAMA,GAAqC,CAChDC,OAAQ,2BACRC,eAAgB,4BAkBLC,GAAoB,GAEpBC,GAAgCC,EAAMC,OAAO,CACxDC,QAASJ,GAAQK,4CACjBC,QAAST,KC3BEU,GAAmB,SAACC,GAC/B,GAAsB,oBAAXC,OAGT,IAFA,IACMC,EADQD,OAAOE,SAASC,OAAOC,UAAU,GAC5BC,MAAM,KAChBC,EAAI,EAAGA,EAAIL,EAAKM,OAAQD,IAAK,CACpC,IAAME,EAAOP,EAAKK,GAAGD,MAAM,KAC3B,GAAIG,EAAK,KAAOT,EACd,OAAOU,mBAAmBD,EAAK,IAIrC,OAAO,GCYIE,GAAaC,8BAhB1B,mBAa6B,+CAAX,WAAA,OAAM,QAFrB,oGAVMC,mBAAA,SAAmBC,GACxB,MAA+CA,EAAUC,OAAjDC,IAAAA,aAAcC,IAAAA,aAChBC,EAAOC,OAAOD,OADgBE,QAEpC,GAAIF,EAAKV,OAAS,GAAKQ,IAAiBC,EAAc,CACpD,IACMI,EAAeC,SAASC,w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Y3B9wC,wBAAMC,UAAU,qBACdD,gBAAC4H,IACC/G,QAAQ,gBACRZ,UAAU,kBACVkH,QAAS24C,iBAOf,IAILhC,GACC99C,gBAACkI,IAAWnI,QA9dE,WACpBg+C,IAAkB,IA6dwBr4C,QA1dtB,WACpBq4C,IAAkB,GAClBjP,IAAY,GACR30B,GACFA,OAudM,MAELnU,GAAqBhG,gBAACyE,SAAe,KACrC04C,KAA6BuE,IAAsBH,GAAY5yD,OAC9DqR,uBAAKC,UAAU,qBACbD,0BACEA,mDAEFA,sBAAIC,UAAU,mBACXshD,GAAYjxC,KAAI,SAACyxC,EAAyBrzD,GAAS,MAAA,OAClDsR,sBAAIC,UAAU,kBAAkBsE,IAAK7V,GAC/BqzD,EAAWp4C,wBAAao4C,EAAWn4C,iBAAXo4C,EAAqBrxD,OAAO,IAAM,UAKpE,KACJqP,gBAAC6H,IACCzI,QAASmf,GACTxe,QAAS,WACPkc,yItE9sBgB,SAACgmC,GACzB1tC,EAAS0tC,GAAS,SAACrtD,EAAO2P,GACxB5W,GAAQ4W,GAAO3P,KAGjBhH,GAAcuJ,WAAWxJ,GAAQK,UAE7BL,GAAQ2I,kBAVZ9I,GAAW,mBAWQG,GAAQ2I"}
1
+ {"version":3,"file":"tf-checkout-react.cjs.production.min.js","sources":["../src/utils/setConfigs.ts","../src/utils/getQueryVariable.ts","../src/utils/formikErrorFocus.ts","../src/utils/getDomain.ts","../src/utils/cookies.ts","../src/utils/downloadPDF.tsx","../src/utils/createCheckoutDataBodyWithDefaultHolder.ts","../src/utils/createMarkup.ts","../src/utils/isBrowser.ts","../src/utils/jsonUtils.ts","../src/api/index.ts","../src/hooks/usePixel.ts","../src/validators/index.ts","../src/components/common/SnackbarAlert.tsx","../src/components/common/CustomField.tsx","../src/components/common/PoweredBy.tsx","../src/components/forgotPasswordModal/index.tsx","../src/components/common/ModalComponent/index.tsx","../src/components/idVerificationContainer/VerificationPendingModal.tsx","../src/components/loginModal/index.tsx","../src/components/signupModal/index.tsx","../src/utils/showZero.tsx","../src/components/timerWidget/index.tsx","../src/components/common/CheckboxField.tsx","../src/components/common/PhoneNumberField.tsx","../src/components/common/Loader.tsx","../src/components/common/NativeSelectFeild/index.tsx","../src/components/common/RadioGroupField/index.tsx","../src/components/common/SelectField/index.tsx","../src/components/common/DatePickerField.tsx","../src/components/billing-info-container/utils.ts","../src/components/billing-info-container/index.tsx","../src/normalizers/index.ts","../src/components/stripePayment/index.tsx","../src/components/paymentContainer/index.tsx","../src/components/confirmationContainer/config.ts","../src/components/confirmationContainer/social-buttons.tsx","../src/components/confirmModal/index.tsx","../src/components/countdown/index.tsx","../src/components/waitingList/index.tsx","../src/components/ticketsContainer/AccessCodeSection.tsx","../src/components/ticketsContainer/PromoCodeSection.tsx","../src/components/ticketsContainer/ReferralLogic.tsx","../src/components/ticketsContainer/TicketRow.tsx","../src/components/ticketsContainer/utils.ts","../src/components/ticketsContainer/TicketsSection.tsx","../src/components/myTicketsContainer/tableConfig.tsx","../src/components/myTicketsContainer/row.tsx","../src/components/common/RadioField.tsx","../src/components/ticketResaleModal/index.tsx","../src/components/orderDetailsContainer/ticketsTable.tsx","../src/components/resetPasswordContainer/index.tsx","../src/components/addonsContainer/adapters/index.tsx","../src/components/addonsContainer/AddonComponent.tsx","../src/components/addonsContainer/utils/index.tsx","../src/components/seatMapContainer/addToCart.ts","../src/components/seatMapContainer/utils.ts","../src/components/seatMapContainer/SeatMapComponent.tsx","../src/components/seatMapContainer/TicketsSection.tsx","../src/components/idVerificationContainer/constants.ts","../src/components/common/RedirectModal.tsx","../src/components/rsvpContainer/index.tsx","../src/components/addonsContainer/index.tsx","../src/components/addonsContainer/normalizers/index.ts","../src/components/confirmationContainer/index.tsx","../src/components/idVerificationContainer/index.tsx","../src/components/myTicketsContainer/index.tsx","../src/components/orderDetailsContainer/index.tsx","../src/components/seatMapContainer/index.tsx","../src/components/ticketResale/index.tsx","../src/components/ticketsContainer/index.tsx","../src/constants/index.ts","../src/hooks/useCookieListener.ts","../src/utils/auth.ts"],"sourcesContent":["import axios, { AxiosInstance } from 'axios';\nimport _forEach from 'lodash/forEach'\n\nexport const ttfHeaders: { [key: string]: any } = {\n Accept: 'application/vnd.api+json',\n 'Content-Type': 'application/vnd.api+json',\n}\n\ninterface IPublicRequest extends AxiosInstance {\n setGuestToken: (token: string) => void;\n setAccessToken: (token: string) => void;\n setBaseUrl: (baseUrl: string) => void;\n}\n\nexport interface IConfigs {\n BASE_URL: string;\n CLIENT_ID: string;\n CLIENT_SECRET: string;\n STRIPE_PUBLISHABLE_KEY: string;\n X_SOURCE_ORIGIN: string;\n [key: string]: string | number;\n}\n\nexport const CONFIGS: IConfigs = {} as IConfigs\n\nexport const publicRequest: IPublicRequest = axios.create({\n baseURL: CONFIGS.BASE_URL || `https://www.ticketfairy.com/api`,\n headers: ttfHeaders,\n}) as IPublicRequest\n\nexport const setXSourceOrigin = (sourceOrigin: string) => {\n ttfHeaders['X-Source-Origin'] = sourceOrigin\n}\n\nexport const setConfigs = (configs: IConfigs) => {\n _forEach(configs, (value, key) => {\n CONFIGS[key] = value\n })\n\n publicRequest.setBaseUrl(CONFIGS.BASE_URL)\n\n if (CONFIGS.X_SOURCE_ORIGIN) {\n setXSourceOrigin(CONFIGS.X_SOURCE_ORIGIN)\n }\n}","export const getQueryVariable = (variable: string) => {\n if (typeof window !== 'undefined') {\n const query = window.location.search.substring(1)\n const vars = query.split('&')\n for (let i = 0; i < vars.length; i++) {\n const pair = vars[i].split('=')\n if (pair[0] === variable) {\n return decodeURIComponent(pair[1])\n }\n }\n }\n return false\n}\n","import { connect, FormikContextType } from 'formik'\nimport { Component } from 'react'\n\ninterface IProps {\n formik: FormikContextType<any>;\n}\n\nclass ErrorFocusInternal extends Component<IProps> {\n public componentDidUpdate(prevProps: IProps) {\n const { isSubmitting, isValidating, errors } = prevProps.formik\n const keys = Object.keys(errors)\n if (keys.length > 0 && isSubmitting && !isValidating) {\n const selector = `[name=\"${keys[0]}\"]`\n const errorElement = document.querySelector(selector) as HTMLElement\n if (errorElement) {\n errorElement.focus()\n }\n }\n }\n\n public render = () => null;\n}\n\nexport const ErrorFocus = connect<{}>(ErrorFocusInternal)\n","export function getDomain(url: string, subdomain?: string): string {\n let updatedUrl: any = url.replace(/(https?:\\/\\/)?(www.)?/i, '')\n\n if (!subdomain) {\n updatedUrl = updatedUrl.split('.')\n\n updatedUrl = updatedUrl.slice(updatedUrl.length - 2).join('.')\n }\n\n if (updatedUrl.indexOf('/') !== -1) {\n return updatedUrl.split('/')[0]\n }\n\n return updatedUrl\n}\n","import { getDomain } from './getDomain'\n\nexport function setCustomCookie(name: string, value: string, days: number = 5) {\n let expires = ''\n if (days) {\n let date = new Date()\n date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000)\n expires = '; expires=' + date.toUTCString()\n }\n if (typeof window !== 'undefined') {\n const domain = getDomain(window.location.hostname)\n document.cookie =\n name + '=' + (value || '') + expires + '; path=/' + `; domain=${domain}`\n }\n}\n\nexport function getCookieByName(cname: string) {\n if (typeof window === 'undefined') return ''\n let name = cname + '='\n let ca = document.cookie.split(';')\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i]\n while (c.charAt(0) == ' ') {\n c = c.substring(1)\n }\n if (c.indexOf(name) == 0) {\n return c.substring(name.length, c.length)\n }\n }\n return ''\n}\n\nexport function deleteCookieByName(name: string) {\n if (typeof window !== 'undefined') {\n const domain = getDomain(window.location.hostname)\n document.cookie =\n name +\n '=; Path=/' +\n `; domain=${domain}` +\n '; Expires=Thu, 01 Jan 1970 00:00:01 GMT;'\n }\n}\n","import { getCookieByName } from './cookies'\n\nexport const downloadPDF = (pdfUrl: string) => {\n if (typeof window === 'undefined') return\n\n const xtfCookie = getCookieByName('X-TF-ECOMMERCE')\n const accessToken: string | null = localStorage.getItem('access_token')\n\n if (!accessToken && !xtfCookie) return\n\n let headers = {}\n\n if (accessToken) {\n headers = {\n Authorization: `Bearer ${accessToken}`,\n }\n }\n\n if (xtfCookie) {\n headers = {\n 'X-TF-ECOMMERCE': xtfCookie,\n }\n }\n\n return fetch(pdfUrl, {\n headers,\n credentials: 'include',\n })\n .then(async response => {\n const blobValue = await response.blob()\n const fileNameHeader = response.headers.get('content-disposition') || ''\n const fileName = fileNameHeader.split('\"')[1]\n return { blobValue, fileName }\n })\n .then(({ blobValue, fileName }) => {\n if (!fileName) {\n throw Error('Something went wrong.')\n return\n }\n const file = new Blob([blobValue], { type: 'application/pdf' })\n const fileURL = URL.createObjectURL(file)\n const link = document.createElement('a')\n link.href = fileURL\n link.setAttribute('download', fileName)\n document.body.appendChild(link)\n link.click()\n document.body.removeChild(link)\n })\n .catch(error => {\n return error\n })\n}\n","import _get from 'lodash/get'\n\ntype Type1 = string | number | null | undefined\ninterface ICheckoutBody {\n attributes: {\n [key: string]:\n | Type1\n | Record<string | number, Type1>\n | Array<Type1 | IticketHolder>;\n };\n}\n\ninterface IticketHolder {\n first_name?: string;\n last_name?: string;\n phone?: string;\n email?: string;\n}\n\ninterface IUserCredentialsValues {\n emailLogged?: string;\n firstNameLogged?: string;\n lastNameLogged?: string;\n}\n\nexport const createCheckoutDataBodyWithDefaultHolder = (\n ticketsQuantity: number,\n logedInValues: Record<string, string | undefined>,\n includeDob = false,\n userCredentials: IUserCredentialsValues = {}\n): ICheckoutBody => {\n const ticket_holders: IticketHolder[] = []\n\n const first_name =\n _get(logedInValues, 'firstName') ||\n _get(logedInValues, 'first_name') ||\n _get(userCredentials, 'firstNameLogged') ||\n ''\n\n const last_name =\n _get(logedInValues, 'lastName') ||\n _get(logedInValues, 'last_name') ||\n _get(userCredentials, 'lastNameLogged') ||\n ''\n const phone = _get(logedInValues, 'phone', '')\n const email =\n _get(logedInValues, 'email') || _get(userCredentials, 'emailLogged') || ''\n\n for (let i = 0; i <= ticketsQuantity - 1; i++) {\n const individualHolder = i\n ? { first_name: '', last_name: '', phone: '', email: '' }\n : { first_name, last_name, phone, email }\n\n ticket_holders.push(individualHolder)\n }\n\n const body: ICheckoutBody = {\n attributes: {\n ...logedInValues,\n email,\n confirm_email: email,\n first_name,\n last_name,\n ticket_holders,\n },\n }\n\n if (includeDob) {\n const holderAgeDate = new Date(_get(logedInValues, 'holderAge', ''))\n body.attributes.dob_day = holderAgeDate.getDate()\n body.attributes.dob_month = holderAgeDate.getMonth() + 1\n body.attributes.dob_year = holderAgeDate.getFullYear()\n }\n\n return body\n}\n","export const createMarkup = (data: string) => ({ __html: data })","export const isBrowser =\n typeof window !== 'undefined' && typeof window.document !== 'undefined'\n","export const isJson = (value: any): boolean => {\n try {\n JSON.parse(value)\n } catch (e) {\n return false\n }\n return true\n}\n","import { AxiosRequestConfig, AxiosResponse } from 'axios'\nimport _get from 'lodash/get'\n\nimport { pageOptions } from '../hooks/usePixel'\nimport {\n GetNetverifyUrlResponseData,\n UpdateVerificationStatusResponseData,\n VerificationStatusResponseData,\n} from '../types/verification'\nimport { CONFIGS, getCookieByName, setCustomCookie } from '../utils'\nimport { getQueryVariable } from '../utils/getQueryVariable'\nimport { publicRequest, ttfHeaders } from '../utils/setConfigs'\n\nconst isWindowDefined = typeof window !== 'undefined'\nconst isDocumentDefined = typeof document !== 'undefined'\n\nif (isWindowDefined && localStorage.getItem('auth_guest_token')) {\n ttfHeaders['Authorization-Guest'] = localStorage.getItem('auth_guest_token')\n}\n\npublicRequest.interceptors.response.use(\n response => {\n const authGuestToken = _get(response, 'headers.authorization-guest')\n\n if (isWindowDefined && authGuestToken) {\n window.localStorage.setItem('auth_guest_token', authGuestToken)\n publicRequest.setGuestToken(authGuestToken)\n }\n\n return response\n },\n error => {\n if (error?.response?.status === 401) {\n if (isWindowDefined) {\n window.localStorage.removeItem('user_data')\n window.localStorage.removeItem('access_token')\n const errorType = error?.response?.data?.error\n if (errorType === 'invalid_token') {\n window.location.href = '/'\n }\n }\n }\n\n const authGuestToken = _get(error, 'response.headers.authorization-guest')\n if (isWindowDefined && authGuestToken) {\n window.localStorage.setItem('auth_guest_token', authGuestToken)\n publicRequest.setGuestToken(authGuestToken)\n }\n\n return Promise.reject(error)\n }\n)\n\npublicRequest.interceptors.request.use((config: AxiosRequestConfig) => {\n const guestToken = isWindowDefined\n ? window.localStorage.getItem('auth_guest_token')\n : null\n const userData = isWindowDefined ? window.localStorage.getItem('user_data') : null\n const accessToken = isWindowDefined ? window.localStorage.getItem('access_token') : null\n\n if (userData && accessToken) {\n const updatedHeaders = {\n ...config.headers,\n Authorization: `Bearer ${accessToken}`,\n }\n config.headers = updatedHeaders\n }\n\n if (guestToken) {\n publicRequest.setGuestToken(guestToken)\n const updatedHeaders = {\n ...config.headers,\n 'Authorization-Guest': guestToken,\n }\n config.headers = updatedHeaders\n }\n\n if (getCookieByName('X-TF-ECOMMERCE')) {\n const updatedHeaders = {\n ...config.headers,\n 'X-TF-ECOMMERCE': getCookieByName('X-TF-ECOMMERCE'),\n }\n config.headers = updatedHeaders\n }\n\n const additionalCookiesHeaderValue = document.cookie ?? ''\n if (additionalCookiesHeaderValue !== '') {\n const updatedHeaders = {\n ...config.headers,\n 'Additional-Cookies': additionalCookiesHeaderValue,\n }\n config.headers = updatedHeaders\n }\n\n if (CONFIGS.X_SOURCE_ORIGIN) {\n const updatedHeaders = {\n ...config.headers,\n 'X-Source-Origin': CONFIGS.X_SOURCE_ORIGIN,\n }\n config.headers = updatedHeaders\n }\n\n if (CONFIGS.BASE_URL) {\n config.baseURL = CONFIGS.BASE_URL + '/api'\n }\n\n return config\n})\n\npublicRequest.interceptors.response.use((response: AxiosResponse) => {\n const xtfCookie = _get(response, 'headers.x-tf-ecommerce')\n const url = _get(response, 'config.url')\n const method = _get(response, 'config.method')\n\n if (xtfCookie && !(url === '/auth' && method === 'delete')) {\n setCustomCookie('X-TF-ECOMMERCE', xtfCookie)\n }\n\n return response\n})\n\npublicRequest.setGuestToken = token =>\n (publicRequest.defaults.headers.common['Authorization-Guest'] = token)\n\npublicRequest.setBaseUrl = (baseUrl: string) =>\n (publicRequest.defaults.baseURL = baseUrl + '/api')\n\npublicRequest.setAccessToken = token =>\n (publicRequest.defaults.headers.common.Authorization = token)\n\nexport const setCustomHeader = (response: any) => {\n const guestHeaderResponseValue = _get(response, 'headers.authorization-guest')\n const guestHeaderExistingValue = _get(response, 'config.headers[Authorization-Guest]')\n const guestHeader = guestHeaderResponseValue || guestHeaderExistingValue\n\n if (guestHeader) {\n if (isWindowDefined) {\n window.localStorage.setItem('auth_guest_token', guestHeader)\n publicRequest.setGuestToken(guestHeader)\n }\n }\n}\n\nexport const handleSetAccessToken = (token: string) => {\n if (token) {\n if (isWindowDefined) {\n window.localStorage.setItem('access_token', token)\n publicRequest.setAccessToken(token)\n }\n }\n}\n\nexport function getEvent(id: string | number, pk?: string) {\n let referralValue = ''\n if (isWindowDefined) {\n const params = new URL(`${window.location}`)\n const referralId = params.searchParams.get('ttf_r') || ''\n const referral_key = window.localStorage.getItem('referral_key')\n let referralIdlocal = ''\n if (referral_key) {\n referralIdlocal = referral_key.split('.')[1]\n }\n referralValue = referralId || referralIdlocal\n }\n\n const response = publicRequest\n .get(`v1/event/${id}`, {\n params: {\n pk,\n },\n headers: {\n ...ttfHeaders,\n 'Referer-Url': isDocumentDefined ? document.referrer : '',\n 'Referrer-Id': isWindowDefined ? referralValue : '',\n },\n })\n .catch(error => {\n throw error\n })\n return response\n}\n\nexport function getTickets(\n id: string | number,\n promoCode?: string,\n pk?: string\n) {\n const invitationHash = getQueryVariable('invitation-hash')\n const params = { pk } as any\n\n if (invitationHash) {\n params['invitation-hash'] = invitationHash\n }\n\n const response = publicRequest\n .get(`v1/event/${id}/tickets`, {\n params,\n headers: promoCode\n ? {\n ...ttfHeaders,\n 'Promotion-Event': String(id),\n 'Promotion-Code': promoCode,\n }\n : { ...ttfHeaders },\n })\n .catch(error => {\n throw error\n })\n return response\n}\n\nexport const addToCart = (id: string | number, data: any) => {\n const res = publicRequest.post(\n `v1/event/${id}/add-to-cart/`,\n { data },\n {\n headers: {\n 'Referer-Url': isDocumentDefined ? document.referrer : '',\n },\n }\n )\n return res\n}\n\nexport const getCart = () => {\n const res = publicRequest.get(`v1/cart/`)\n return res\n}\n\nexport const postOnCheckout = (data: any, accessToken?: string, freeTicket = false) => {\n if (freeTicket) {\n delete data.attributes.city\n delete data.attributes.country\n delete data.attributes.state\n delete data.attributes.zip\n delete data.attributes.street_address\n }\n const res = publicRequest.post(\n `v1/on-checkout/`,\n { data },\n {\n headers: {\n ...ttfHeaders,\n Authorization: `Bearer ${accessToken}`,\n },\n }\n )\n return res\n}\n\nexport const authorize = (data: { email: string, password: string }) =>\n publicRequest.post(\n `/auth?clientId=${CONFIGS.CLIENT_ID || 'e9d8f8922797b4621e562255afe90dbf'}`,\n data\n )\n\nexport const register = (data: FormData) =>\n publicRequest.post('v1/oauth/register-rn', data)\n\nexport const getAccessToken = (data: FormData) =>\n publicRequest.post('v1/oauth/access_token', data)\n\nexport const getPaymentData = (hash: string) => {\n const response = publicRequest\n .get(`v1/order/${hash}/review/`, {\n headers: {\n 'Referer-Url': isDocumentDefined ? document.referrer : '',\n },\n })\n .catch(error => {\n throw error\n })\n return response\n}\n\nexport const handlePaymentData = (orderHash: string, data: any) => {\n const res = publicRequest\n .post(`v1/order/${orderHash}/pay`, {\n data: { attributes: { 'stripe-source': data } },\n })\n .catch(error => {\n throw error\n })\n return res\n}\n\nexport const handlePaymentSuccess = (orderHash: string) => {\n const res = publicRequest\n .post(`v1/order/${orderHash}/success`, undefined, {\n headers: {\n 'Referer-Url': isDocumentDefined ? document.referrer : '',\n },\n })\n .catch(error => {\n throw error\n })\n return res\n}\n\nexport const handleFreeSuccess = (orderHash: string) => {\n const res = publicRequest\n .post(`v1/order/${orderHash}/complete_free_registration`, undefined, {\n headers: {\n 'Referer-Url': isDocumentDefined ? document.referrer : '',\n },\n })\n .catch(error => {\n throw error\n })\n return res\n}\n\nexport const getProfileData = (accessToken?: string) =>\n publicRequest\n .get('/customer/profile/', {\n headers: {\n ...ttfHeaders,\n Authorization: `Bearer ${accessToken}`,\n },\n })\n .catch((e: any) => e)\n\nexport const getCountries = () => publicRequest.get('/countries/list')\n\nexport const getConfirmationData = (orderHash: string) =>\n publicRequest.get(`v1/order/${orderHash}/payment/complete`)\n\nexport const getStates = (countryId: string) =>\n publicRequest.get(`/countries/${countryId}/states/`)\n\nexport const getOrders = (page: number, limit: number, eventSlug: string) =>\n publicRequest.get(\n `v1/account/orders/?page=${page}&limit=${limit}&filter[event]=${eventSlug}&${\n CONFIGS.BRAND_SLUG\n ? `filter[brand]=${CONFIGS.BRAND_SLUG}&filter[subbrands]=true`\n : ''\n }`\n )\n\nexport const getOrderDetails = (orderId: string) =>\n publicRequest.get(`v1/account/order/${orderId}`)\n\nexport const addToWaitingList = (id: number, data: any) =>\n publicRequest.post(`v1/event/${id}/add_to_waiting_list`, data)\n\nexport const getConditions = (eventId: string) =>\n publicRequest.get(`v1/event/${eventId}/conditions`)\n\n// resale\nexport const resaleTicket = (data: any, hash: string) =>\n publicRequest.post(`v1/ticket/${hash}/sell`, data)\n\nexport const removeFromResale = (hash: string) =>\n publicRequest.delete(`v1/ticket/${hash}/sell`)\n\nexport const postReferralVisits = (eventId: string, referralId: string) =>\n publicRequest.post(`v1/event/${eventId}/referrer/`, {\n referrer: `${referralId}`,\n })\n\nexport const logout = () => publicRequest.delete('/auth')\n\n// forgot password\nexport const forgotPassword = (email: string) =>\n publicRequest.post(`/auth/restore-password`, { email })\n\n// reset password\ninterface IResetPasswordData {\n token: string;\n password: string;\n confirmPassword: string;\n}\nexport const resetPassword = (data: IResetPasswordData) =>\n publicRequest.post(`/auth/reset-password`, data)\n\nexport const processTicket = (hash: string) =>\n publicRequest.post(`v1/ticket/${hash}/process/`)\n\nexport const declineInvitation = (hash: string) =>\n publicRequest.post(`v1/ticket/${hash}/decline`)\n\nexport const sendRSVPInfo = (eventId: number, data: any) =>\n publicRequest.post(`v1/event/${eventId}/send-rsvp-info`, data)\n\nexport const validatePhoneNumber = async (phone: string): Promise<any> => {\n const response: AxiosResponse<any, AxiosRequestConfig> = await publicRequest.get(\n `/v1/account/validate_phone?phone=${phone}`\n )\n\n return response.data\n}\n\nexport const getAddons = async (eventId: string) => {\n const result = await publicRequest.get(`/v1/event/${eventId}/add-ons`)\n const addons = _get(result, 'data.data.attributes', [])\n return addons\n}\n\nexport const selectAddons = (data: any) => {\n publicRequest.post(`v1/on-checkout`, data)\n}\n\nexport const getCheckoutPageConfigs = async () => {\n const response = await publicRequest.get(`v1/checkout-configs`)\n return response.data\n}\n\n// seat map <--start-->\n\n// const makeId = (length = 20) => {\n// let result = ''\n// const characters =\n// 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'\n// const charactersLength = characters.length\n// for (let i = 0; i < length; i++) {\n// result += characters.charAt(Math.floor(Math.random() * charactersLength))\n// }\n// return result\n// }\n\nexport const getSeatMapData = async (\n eventId: string | number\n): Promise<SeatMapDataResponse> => {\n localStorage.setItem('tierId', '')\n const reservedSeatsHash = getQueryVariable('reserved_seats_hash')\n const params = {} as any\n if (reservedSeatsHash) {\n params.reserved_seats_hash = reservedSeatsHash\n }\n\n const response: AxiosResponse<\n SeatMapDataResponse,\n AxiosRequestConfig\n > = await publicRequest.get(`v1/event/${eventId}/seat-map-data`, { params })\n return response.data\n}\n\nexport const getSeatMapStatuses = async (\n eventId: string | number\n): Promise<SeatMapStatusesResponse> => {\n const response = await publicRequest.get(`v1/event/${eventId}/seats/status`)\n return response.data\n}\n\nexport const reserveSeat = async (\n eventId: string | number,\n tierId: string,\n seatId: string\n) => {\n const response = await publicRequest.post(\n `v1/event/${eventId}/seats/reserve`,\n {\n data: {\n tierId,\n seatId,\n ttl: 10,\n },\n }\n )\n return response.data\n}\n\nexport const removeSeatReserve = async (\n eventId: string | number,\n tierId: string,\n seatIds: string[]\n) => {\n const response = await publicRequest.delete(\n `v1/event/${eventId}/seats/delete-reserved`,\n {\n data: {\n tierId,\n seatIds,\n },\n }\n )\n\n return response.data\n}\n\n// seat map <--end-->\nexport function getPixelScript(id: string | number, pageOptions: pageOptions) {\n const response = publicRequest.get(`v1/event/${id}/track`, {\n params: {\n page_url: pageOptions.pageUrl,\n page: pageOptions.page,\n order_hash: pageOptions.orderHash,\n },\n })\n return response\n}\n\n// ID Verification\nexport const getNetverifyUrl = async (): Promise<GetNetverifyUrlResponseData> => {\n const response: AxiosResponse<\n GetNetverifyUrlResponseData,\n AxiosRequestConfig\n > = await publicRequest.get('v1/authenticate/verify')\n return response.data\n}\n\nexport const checkVerificationStatus = async (): Promise<{\n data: VerificationStatusResponseData;\n}> => {\n const response: AxiosResponse<\n { data: VerificationStatusResponseData },\n AxiosRequestConfig\n > = await publicRequest.get('v1/authenticate/get-verification-info')\n return response.data\n}\n\nexport const updateVerificationStatus = async (): Promise<{\n data: UpdateVerificationStatusResponseData;\n}> => {\n const response: AxiosResponse<\n { data: UpdateVerificationStatusResponseData },\n AxiosRequestConfig\n > = await publicRequest.patch('v1/authenticate/verify', {\n data: {\n verification: {\n verificationStatus: 'PENDING',\n },\n },\n })\n return response.data\n}\n\nexport const checkCustomerOrder = async (orderHash: string): Promise<any> => {\n const response: AxiosResponse<\n any,\n AxiosRequestConfig\n > = await publicRequest.get(`v1/order/${orderHash}/verify-customer-order`)\n\n return response.data\n}\n","/* eslint-disable react-hooks/exhaustive-deps */\nimport _get from 'lodash/get'\nimport { useEffect } from 'react'\n\nimport { getPixelScript } from '../api'\nimport { isBrowser } from '../utils'\n\nexport interface pageOptions {\n pageUrl: string;\n page?: string;\n orderHash?: string;\n}\n\nfunction appendScriptsToHeader(code: string) {\n if (isBrowser && code) {\n const tempEl = document.createElement('div')\n tempEl.innerHTML = code\n const scripts = tempEl.getElementsByTagName('script')\n\n for (let index = 0; index < scripts.length; ++index) {\n const script = document.createElement('script')\n script.type = 'text/javascript'\n\n if (scripts[index].src) {\n script.src = scripts[index].src\n } else {\n script.innerHTML = scripts[index].innerHTML\n }\n\n document.head.appendChild(script)\n }\n }\n}\n\nconst addGTagToHeader = (tagId?: string, links?: string[]) => {\n if (document?.head && document?.body && tagId) {\n const script = document.createElement('script')\n script.innerHTML = `(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':\n new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],\n j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=\n 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);\n })(window,document,'script','dataLayer','${tagId}');`.trim()\n document.head.append(script)\n\n const scriptBody = document.createElement('noscript')\n scriptBody.innerHTML = `<iframe src=\"https://www.googletagmanager.com/ns.html?id=${tagId}\"\n height=\"0\" width=\"0\" style=\"display:none;visibility:hidden\"></iframe>`\n document.body.append(scriptBody);\n\n (window as any).dataLayer = (window as any).dataLayer || [];\n (window as any).gtag = function gtag(...args: any){(window as any).dataLayer.push(args)}\n if (links) {\n (window as any)?.gtag('set', 'linker', {\n 'domains': links\n })\n }\n (window as any).gtag('js', new Date());\n (window as any).gtag('config', tagId)\n }\n}\n\nexport const usePixel = async (\n eventId: string | number,\n options: pageOptions\n) => {\n const getScript = async () => {\n if (!eventId) return\n\n try {\n const response = await getPixelScript(eventId, options)\n const pixels = _get(response, 'data.data.attributes.pixels', '')\n appendScriptsToHeader(pixels)\n const brandGoogleTagKey = _get(response, 'data.data.attributes.brandGoogleTagKey', '')\n const eventGoogleTagKey = _get(response, 'data.data.attributes.eventGoogleTagKey', '')\n const eventGoogleTagManagerLinkerDomains = _get(response, 'data.data.attributes.eventGoogleTagManagerLinkerDomains', '')\n addGTagToHeader(brandGoogleTagKey, eventGoogleTagManagerLinkerDomains)\n if (eventGoogleTagKey) {\n addGTagToHeader(eventGoogleTagKey, eventGoogleTagManagerLinkerDomains)\n }\n } catch (e) {\n console.error(e)\n }\n }\n\n useEffect(() => {\n getScript()\n }, [eventId])\n}","const emailRegex = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/\n\nexport const combineValidators = (...validators: any) => (...value: any) => {\n for (let i = 0; i < validators.length; ++i) {\n const error_message = validators[i](...value)\n if (error_message) return error_message\n }\n}\n\nexport function isFalsy(item: any) {\n try {\n if (\n !item || // handles most, like false, 0, null, etc\n (typeof item == 'object' &&\n Object.keys(item).length === 0 && // for empty objects, like {}, []\n !(typeof item.addEventListener == 'function')) // omit webpage elements\n ) {\n return true\n }\n } catch (err) {\n return true\n }\n\n return false\n}\n\nexport const requiredValidator = (\n value?: string | number | Array<string> | boolean,\n message?: string\n): string => {\n let errorMessage = ''\n\n if (isFalsy(value)) {\n errorMessage = message || 'Required'\n }\n return errorMessage\n}\n\nexport const emailValidator = (email: string) =>\n !emailRegex.test(email) ? 'Please enter a valid email address' : ''\n","import React from 'react'\nimport { Alert, AlertColor, Snackbar, SnackbarOrigin } from '@mui/material'\n\ninterface ISnackbarAlertProps {\n isOpen: boolean\n message: string\n type: AlertColor\n position?: SnackbarOrigin\n autoHideDuration?: number\n variant?: 'filled' | 'standard' | 'outlined'\n\n onClose: () => void\n}\n\nconst SnackbarAlert = ({\n isOpen,\n message,\n type,\n position,\n autoHideDuration = 3000,\n variant,\n onClose,\n}: ISnackbarAlertProps) => {\n return (\n <div className=\"snackbar-alert-container\">\n <Snackbar\n autoHideDuration={autoHideDuration}\n open={isOpen}\n anchorOrigin={position || { vertical: 'top', horizontal: 'center' }}\n onClose={onClose}\n classes={{\n root: 'snackbar-alert-snackbar-root',\n }}\n >\n <Alert\n severity={type}\n onClose={onClose}\n variant={variant || 'filled'}\n classes={{\n icon: 'snackbar-alert-icon',\n root: 'snackbar-alert-alert-root',\n action: 'snackbar-alert-action',\n message: 'snackbar-alert-message',\n filled: 'snackbar-alert-filled',\n }}\n >\n {message}\n </Alert>\n </Snackbar>\n </div>\n )\n}\n\nexport default SnackbarAlert\n","/* eslint-disable no-underscore-dangle */\nimport TextField from '@mui/material/TextField'\nimport { useTheme } from '@mui/styles'\nimport { FieldInputProps, FormikProps } from 'formik'\nimport _get from 'lodash/get'\nimport _includes from 'lodash/includes'\nimport _isFunction from 'lodash/isFunction'\nimport _isObject from 'lodash/isObject'\nimport _map from 'lodash/map'\nimport React, { useEffect, useRef, useState } from 'react'\n\nexport interface ISelectOption {\n label: string | number;\n value?: string | number;\n [key: string]: any;\n}\n\nexport interface ICustomField {\n label: string;\n field: FieldInputProps<any>;\n form: FormikProps<any>;\n theme: 'dark' | 'light';\n // optional\n type?: string;\n selectOptions?: ISelectOption[];\n inputRef?:\n | { current: HTMLInputElement | null }\n | ((node: HTMLInputElement | null) => void);\n multiline?: boolean;\n minRows?: string | number;\n maxRows?: string | number;\n}\nexport interface IOtherProps {\n [key: string]: any;\n}\n\nexport const CustomField = ({\n label,\n type = 'text',\n field,\n selectOptions = [] as ISelectOption[],\n form: { touched, errors, submitCount },\n theme,\n inputProps: pInputProps = {},\n InputProps = {},\n inputRef,\n multiline = false,\n minRows,\n maxRows,\n}: ICustomField & IOtherProps) => {\n const [isShrinked, setIsShrinked] = useState(Boolean(field.value))\n const _ref = useRef<HTMLInputElement>(null)\n const isAutoFilled = _ref.current?.matches(':-webkit-autofill')\n const isSelectField = type === 'select'\n const error = _get(errors, field.name)\n const isTouched =\n Boolean(_get(touched, field.name)) ||\n (_includes(field.name, 'holder') && !!error && !!submitCount)\n\n const customTheme: any = useTheme()\n const inputProps: any = { sx: customTheme?.input }\n\n useEffect(() => {\n if (_isFunction(inputRef)) {\n inputRef(_ref.current)\n } else if (_isObject(inputRef)) {\n inputRef.current = _ref.current\n }\n })\n\n return (\n <TextField\n placeholder=\"\"\n id={field.name}\n label={label}\n type={type}\n select={isSelectField}\n fullWidth={true}\n error={!!error && isTouched}\n helperText={isTouched && error}\n onFocus={() => {\n setIsShrinked(true)\n }}\n SelectProps={{\n native: true,\n className: theme,\n MenuProps: { className: theme },\n }}\n InputLabelProps={{\n sx: customTheme?.input,\n shrink: isShrinked || Boolean(field.value) || isAutoFilled,\n }}\n InputProps={InputProps}\n inputProps={{ ...inputProps, ...pInputProps }}\n inputRef={_ref}\n multiline={multiline}\n minRows={minRows}\n maxRows={maxRows}\n {...field}\n onBlur={(e: React.FocusEvent<any, Element>) => {\n setIsShrinked(Boolean(field.value))\n if (field.onBlur) {\n field.onBlur(e)\n }\n }}\n >\n {isSelectField\n ? _map(selectOptions, option => (\n <option\n key={option.value}\n value={option.value}\n disabled={option.disabled}\n >\n {option.label}\n </option>\n ))\n : null}\n </TextField>\n )\n}\n","import React from 'react'\n\nexport const PoweredBy = () => (\n <div className=\"powered-container\">\n <div className='powered-text'>Powered By</div>\n <img\n className='powered-img'\n alt=\"The Ticket Fairy\"\n src={\"https://cdn-checkout.s3.us-east-2.amazonaws.com/IconTicketFairy.svg\"}\n />\n <div className='powered-ttf'>\n The<strong>Ticket</strong>Fairy\n </div>\n </div>\n)\n","import './style.css'\n\nimport { Box, CircularProgress,Modal } from '@mui/material'\nimport axios, { AxiosError } from 'axios'\nimport { Field, Form, Formik } from 'formik'\nimport React, { FC, useState } from 'react'\nimport * as Yup from 'yup'\n\nimport { forgotPassword } from '../../api'\nimport { CustomField } from '../common/CustomField'\nimport { PoweredBy } from '../common/PoweredBy'\n\ninterface IForgotPasswordProps {\n onClose: () => void;\n onLogin: () => void;\n onForgotPasswordSuccess: (res: any) => void;\n onForgotPasswordError: (e: AxiosError) => void;\n showPoweredByImage?: boolean;\n}\n\ninterface ValuesTypes {\n email: string;\n}\n\nconst style: React.CSSProperties = {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n minWidth: 480,\n backgroundColor: '#fff',\n border: '1px solid white',\n outline: 'none',\n padding: '14px',\n}\n\nconst Schema = Yup.object().shape({\n email: Yup.string()\n .email('Invalid email')\n .required('Required'),\n})\n\nexport const ForgotPasswordModal: FC<IForgotPasswordProps> = ({\n onClose = () => {},\n onLogin = () => {},\n onForgotPasswordSuccess = () => {},\n onForgotPasswordError = () => {},\n showPoweredByImage = false,\n}) => {\n const [loading, setLoading] = useState(false)\n\n const onForgotPassword = async ({ email }: ValuesTypes) => {\n try {\n setLoading(true)\n const { data } = await forgotPassword(email)\n\n onForgotPasswordSuccess(data)\n onClose()\n } catch (e) {\n if (axios.isAxiosError(e)) {\n onForgotPasswordError(e)\n }\n } finally {\n setLoading(false)\n }\n }\n\n const _onClose = loading ? () => {} : onClose\n\n return (\n <Modal\n open={true}\n onClose={_onClose}\n aria-labelledby=\"modal-modal-title\"\n aria-describedby=\"modal-modal-description\"\n className=\"forgot-password-modal\"\n >\n <Box style={style}>\n <div>\n <Formik\n initialValues={{ email: '' }}\n validationSchema={Schema}\n onSubmit={onForgotPassword}\n >\n {({ isValid, dirty, handleSubmit }) => (\n <Form onSubmit={handleSubmit}>\n <div className=\"forgot-password-container\">\n <div className=\"title\">Password Reset</div>\n <div className=\"forgot-password-container__singleField\">\n <Field\n name=\"email\"\n label=\"Email\"\n component={CustomField}\n />\n </div>\n </div>\n <div className=\"forgot-password-action-button\">\n <button type=\"submit\" disabled={!(isValid && dirty)}>\n {loading ? <CircularProgress size=\"22px\" /> : 'Submit'}\n </button>\n </div>\n <div className=\"login\">\n <span onClick={onLogin}>Back to Log In</span>\n </div>\n {showPoweredByImage ? <PoweredBy /> : null}\n </Form>\n )}\n </Formik>\n </div>\n </Box>\n </Modal>\n )\n}\n","import { Modal as MuiModal } from '@mui/material'\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport CircularProgress from '@mui/material/CircularProgress'\nimport _map from 'lodash/map'\nimport React, { FC } from 'react'\n\nexport interface Action {\n id: string;\n label: string;\n onClick: () => void;\n disabled?: boolean;\n loading?: boolean;\n variant?: \"text\" | \"contained\" | \"outlined\";\n}\n\ninterface Props {\n onClose?: () => void;\n actions: Action[];\n modalClassName?: string;\n}\n\nconst style: React.CSSProperties = {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n minWidth: 480,\n backgroundColor: '#e3e3e3',\n border: '1px solid white',\n outline: 'none',\n padding: '14px',\n maxHeight: '85vh',\n overflow: 'auto',\n}\n\nconst Modal: FC<Props> = ({\n onClose,\n actions = [],\n children,\n modalClassName = '',\n}) => (\n <MuiModal\n open={true}\n onClose={onClose}\n aria-labelledby=\"modal-modal-title\"\n aria-describedby=\"modal-modal-description\"\n className={`confirm-modal ${modalClassName}`}\n >\n <Box style={style}>\n <div className=\"modal-body\">{children}</div>\n <div className=\"footer\">\n {_map(actions, (action: Action) => (\n <Button\n key={action.id}\n onClick={action.onClick}\n disabled={action.disabled || action.loading}\n variant={action.variant || \"text\"}\n >\n {action.loading ? <CircularProgress size=\"22px\" /> : action.label}\n </Button>\n ))}\n </div>\n </Box>\n </MuiModal>\n)\n\nexport default Modal\n","import React, { useEffect, useState } from 'react'\n\nimport Modal, { Action } from '../common/ModalComponent'\n\ninterface IDVerificationProps {\n message?: string | null;\n displayModal?: boolean;\n actions?: Action[];\n onClose?: () => void;\n}\n\nexport const VerificationPendingModal = (props: IDVerificationProps) => {\n const { message, displayModal, actions, onClose } = props\n const [showModal, setShowModal] = useState(false)\n\n useEffect(() => {\n if (displayModal === undefined) {\n setShowModal(Boolean(message))\n }\n }, [message, displayModal])\n\n return showModal || displayModal ? (\n <div>\n <Modal\n modalClassName=\"id-verification-modal\"\n actions={\n actions || [\n {\n id: 'okay',\n label: 'OK',\n variant: 'contained',\n onClick: () => {\n setShowModal(false)\n\n if (onClose) {\n onClose()\n }\n },\n },\n ]\n }\n >\n <div>{message}</div>\n </Modal>\n </div>\n ) : null\n}\n","import './style.css'\n\nimport { TextField } from '@mui/material'\nimport Box from '@mui/material/Box'\nimport Modal from '@mui/material/Modal'\nimport axios, { AxiosError } from 'axios'\nimport { Field, Form, Formik } from 'formik'\nimport _get from 'lodash/get'\nimport _identity from 'lodash/identity'\nimport React, { FC, useState } from 'react'\n\nimport {\n authorize,\n getProfileData,\n} from '../../api'\nimport { requiredValidator } from '../../validators'\nimport { PoweredBy } from '../common/PoweredBy'\n\ninterface Props {\n onClose: () => void;\n onLogin: () => void;\n alreadyHasUser?: boolean;\n userExpired?: boolean;\n onAuthorizeSuccess?: (res: any) => void;\n onAuthorizeError?: (e: AxiosError) => void;\n onGetProfileDataSuccess?: (res: any) => void;\n onGetProfileDataError?: (e: AxiosError) => void;\n onForgotPassword?: () => void;\n onSignup?: () => void;\n modalClassname?: string;\n logo?: string;\n showForgotPasswordButton?: boolean;\n showSignUpButton?: boolean;\n showPoweredByImage?: boolean;\n}\n\nconst style: React.CSSProperties = {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n minWidth: 480,\n backgroundColor: '#e3e3e3',\n border: '1px solid white',\n outline: 'none',\n}\ninterface IUserData {\n id: string;\n firstName: string;\n lastName: string;\n email: string;\n city?: string;\n country?: string;\n countryId?: string;\n phone?: string;\n streetAddress?: string;\n state?: string;\n zip?: string;\n zipCode?: string;\n stateId?: string;\n}\n\nexport const setLoggedUserData = (data: IUserData) => ({\n id: data.id,\n first_name: data.firstName,\n last_name: data.lastName,\n email: data.email,\n confirmEmail: data.email,\n city: data?.city || '',\n country: data?.countryId || data?.country || '',\n phone: data?.phone || '',\n street_address: data?.streetAddress || '',\n state: data?.stateId || '',\n zip: data?.zip || data?.zipCode || '',\n})\n\nexport const LoginModal: FC<Props> = ({\n onClose,\n onLogin,\n alreadyHasUser = false,\n userExpired = false,\n onGetProfileDataSuccess = _identity,\n onGetProfileDataError = _identity,\n onForgotPassword = _identity,\n onSignup = _identity,\n modalClassname = '',\n logo,\n showForgotPasswordButton = false,\n showSignUpButton = false,\n showPoweredByImage = false,\n}) => {\n const [error, setError] = useState('')\n return (\n <Modal\n open={true}\n onClose={onClose}\n aria-labelledby=\"modal-modal-title\"\n aria-describedby=\"modal-modal-description\"\n className={`login-modal ${modalClassname}`}\n >\n <Box style={style}>\n <div>\n <Formik\n initialValues={{ email: '', password: '' }}\n onSubmit={async ({ email, password }) => {\n try {\n const body = { email, password }\n await authorize(body)\n let profileResponse = null\n try {\n profileResponse = await getProfileData()\n onGetProfileDataSuccess(profileResponse.data)\n } catch (e) {\n if (axios.isAxiosError(e)) {\n onGetProfileDataError(e)\n }\n return\n }\n\n const profileSpecifiedData = _get(profileResponse, 'data.data')\n const profileDataObj = setLoggedUserData(profileSpecifiedData)\n if (typeof window !== 'undefined') {\n window.localStorage.setItem(\n 'user_data',\n JSON.stringify(profileDataObj)\n )\n const event = new window.CustomEvent('tf-login')\n window.document.dispatchEvent(event)\n }\n onLogin()\n } catch (e) {\n if (axios.isAxiosError(e)) {\n const error = e?.response?.data?.message || 'Error'\n setError(error)\n } else if (e instanceof Error) {\n setError(e?.message || 'Error')\n }\n }\n }}\n >\n {props => (\n <Form onSubmit={props.handleSubmit}>\n <div className=\"modal-title\">Login</div>\n <div className='login-logo-container'>\n <img\n className=\"login-logo-tff\"\n src={logo || \"https://www.ticketfairy.com/resources/images/logo-ttf-black.svg\"}\n alt=\"logo\"\n />\n </div>\n <div className=\"server_auth__error\">{error}</div>\n {alreadyHasUser && (\n <p className=\"info-text-for-login\">\n It appears this email is already attached to an account.\n Please log in here to complete your registration.\n </p>\n )}\n {userExpired && (\n <p className=\"info-text-for-login\">\n Your session has expired, please log in again.\n </p>\n )}\n <div className=\"login-modal-body\">\n <div className=\"login-modal-body__email\">\n <Field name={'email'} validate={requiredValidator}>\n {({ field, meta }: { [key: string]: any }) => (\n <TextField\n label={'Email'}\n type={'email'}\n fullWidth\n error={!!meta.error && meta.touched}\n helperText={meta.touched && meta.error}\n {...field}\n />\n )}\n </Field>\n </div>\n <div className=\"login-modal-body__password\">\n <Field name={'password'} validate={requiredValidator}>\n {({ field, meta }: { [key: string]: any }) => (\n <TextField\n label=\"Password\"\n type=\"password\"\n fullWidth\n error={!!meta.error && meta.touched}\n helperText={meta.touched && meta.error}\n {...field}\n />\n )}\n </Field>\n </div>\n <div className=\"login-action-button\">\n <button type=\"submit\">Login</button>\n </div>\n {showForgotPasswordButton && (\n <div className=\"forgot-password\">\n <span aria-hidden=\"true\" onClick={onForgotPassword}>Forgot password?</span>\n </div>\n )}\n {showSignUpButton && (\n <div className=\"forgot-password\">\n <span aria-hidden=\"true\" onClick={onSignup}>Sign up</span>\n </div>\n )}\n {showPoweredByImage ? <PoweredBy /> : null}\n </div>\n </Form>\n )}\n </Formik>\n </div>\n </Box>\n </Modal>\n )\n}\n","import './style.css'\n\nimport { Box, CircularProgress,Modal } from '@mui/material'\nimport axios, { AxiosError } from 'axios'\nimport { Field, Form, Formik } from 'formik'\nimport _get from 'lodash/get'\nimport React, { FC, useState } from 'react'\nimport * as Yup from 'yup'\n\nimport { handleSetAccessToken,register } from '../../api'\nimport { CONFIGS } from '../../utils'\nimport { CustomField } from '../common/CustomField'\nimport { PoweredBy } from '../common/PoweredBy'\n\ninterface ISignupProps {\n onClose: () => void;\n onLogin: () => void;\n onRegisterSuccess: (value: {\n accessToken: string;\n refreshToken: string;\n }) => void;\n onRegisterError: (e: AxiosError, email: string) => void;\n showPoweredByImage?: boolean;\n}\n\ninterface ValuesTypes {\n firstName: string;\n lastName: string;\n email: string;\n password: string;\n confirmPassword: string;\n}\n\nconst style: React.CSSProperties = {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n minWidth: 480,\n backgroundColor: '#fff',\n border: '1px solid white',\n outline: 'none',\n padding: '14px',\n}\n\nconst SignupSchema = Yup.object().shape({\n firstName: Yup.string().required('Required'),\n lastName: Yup.string().required('Required'),\n email: Yup.string()\n .email('Invalid email')\n .required('Required'),\n password: Yup.string()\n .min(6, 'Password must have 5+ characters')\n .required('Required'),\n confirmPassword: Yup.string()\n .required('Required')\n .oneOf([Yup.ref('password'), null], 'Passwords must match'),\n})\n\nexport const SignupModal: FC<ISignupProps> = ({\n onClose = () => {},\n onLogin = () => {},\n onRegisterSuccess = () => {},\n onRegisterError = () => {},\n showPoweredByImage = false,\n}) => {\n const [loading, setLoading] = useState(false)\n\n const onSignup = async (values: ValuesTypes) => {\n try {\n setLoading(true)\n const formData = new FormData()\n formData.set('first_name', values.firstName)\n formData.set('last_name', values.lastName)\n formData.set('email', values.email)\n formData.set('password', values.password)\n formData.set('password_confirmation', values.confirmPassword)\n formData.append(\n 'client_id',\n CONFIGS.CLIENT_ID || 'e9d8f8922797b4621e562255afe90dbf'\n )\n formData.append(\n 'client_secret',\n CONFIGS.CLIENT_SECRET || 'b89c191eff22fdcf84ac9bfd88d005355a151ec2c83b26b9'\n )\n\n const res = await register(formData)\n\n const access_token_register = _get(\n res,\n 'data.data.attributes.access_token'\n )\n const refreshToken = _get(\n res,\n 'data.data.attributes.refresh_token'\n )\n handleSetAccessToken(access_token_register)\n\n const tokens = {\n accessToken: access_token_register,\n refreshToken,\n }\n onRegisterSuccess(tokens)\n onClose()\n } catch (e) {\n if (axios.isAxiosError(e)) {\n onRegisterError(e, values.email)\n }\n } finally {\n setLoading(false)\n }\n }\n\n const _onClose = loading ? () => {} : onClose\n\n return (\n <Modal\n open={true}\n onClose={_onClose}\n aria-labelledby=\"modal-modal-title\"\n aria-describedby=\"modal-modal-description\"\n className=\"signup-modal\"\n >\n <Box style={style}>\n <div>\n <Formik\n initialValues={{\n firstName: '',\n lastName: '',\n email: '',\n password: '',\n confirmPassword: '',\n }}\n validationSchema={SignupSchema}\n onSubmit={onSignup}\n >\n {({ isValid, dirty, handleSubmit }) => (\n <Form onSubmit={handleSubmit}>\n <div className=\"signup-container\">\n <div className=\"title\">Create an Account</div>\n <div className=\"signup-container__twoFields\">\n <div className=\"is-half\">\n <Field\n name=\"firstName\"\n label=\"First Name\"\n component={CustomField}\n />\n </div>\n <div className=\"is-half\">\n <Field\n name=\"lastName\"\n label=\"Last Name\"\n component={CustomField}\n />\n </div>\n </div>\n <div className=\"signup-container__singleField\">\n <div className=\"\">\n <Field\n name=\"email\"\n label=\"Email\"\n component={CustomField}\n />\n </div>\n </div>\n <div className=\"signup-container__twoFields\">\n <div className=\"is-half\">\n <Field\n name=\"password\"\n label=\"Password\"\n type=\"password\"\n component={CustomField}\n />\n </div>\n <div className=\"is-half\">\n <Field\n name=\"confirmPassword\"\n label=\"Confirm Password\"\n type=\"password\"\n component={CustomField}\n />\n </div>\n </div>\n </div>\n <div className=\"signup-action-button\">\n <button type=\"submit\" disabled={!(isValid && dirty)}>\n {loading ? <CircularProgress size=\"22px\" /> : 'Submit'}\n </button>\n </div>\n <div className=\"login\">\n <span onClick={onLogin}>Login</span>\n </div>\n {showPoweredByImage ? <PoweredBy /> : null}\n </Form>\n )}\n </Formik>\n </div>\n </Box>\n </Modal>\n )\n}\n","import _isNumber from 'lodash/isNumber'\n\nexport const showZero = (value = 0) => {\n const intNumber = Number(value)\n return _isNumber(intNumber)\n ? intNumber >= 0 && intNumber < 10\n ? '0' + intNumber\n : intNumber\n : null\n}\n","import './style.css'\n\nimport React, { memo,useState } from 'react'\nimport Countdown from 'react-countdown'\nimport SVG from 'react-inlinesvg'\n\nimport Cross from '../../assets/images/cross.svg'\nimport { showZero } from '../../utils/showZero'\n\nexport interface ITimerWidgetPage {\n expires_at: number;\n buyLoading?: boolean;\n onCountdownFinish?: () => void;\n}\n\nexport interface IRenderer {\n minutes: number;\n seconds: number;\n completed: number;\n handleCountdownFinish: () => void;\n}\n\nconst TimerWidget = ({\n expires_at,\n buyLoading,\n onCountdownFinish = () => {},\n}: ITimerWidgetPage) => {\n const [showTimer, setShowTimer] = useState(true)\n\n const handleCountdownFinish = () => {\n setShowTimer(false)\n if (!buyLoading) {\n onCountdownFinish()\n }\n }\n\n const renderer = ({\n minutes,\n seconds,\n completed,\n handleCountdownFinish,\n }: IRenderer) => {\n if (completed) {\n handleCountdownFinish()\n return null\n }\n return (\n <span>\n {showZero(minutes)}:{showZero(seconds)}\n </span>\n )\n }\n\n const hideTimer = () => {\n const timerRl: HTMLElement | null = document.querySelector('.timer')\n if(timerRl) {\n timerRl.style.visibility = \"hidden\"\n }\n }\n\n return showTimer && !!expires_at ? (\n <div className=\"timer\">\n <div className='close-icon' onClick={hideTimer}>\n <SVG\n src={Cross}\n width='10'\n height='10'\n fill='#fff'\n />\n </div>\n <div className=\"toast-message\">\n <p>Please complete your purchase before the timer reaches zero.</p>\n <p className=\"countdown\">\n <Countdown\n date={Date.now() + expires_at * 1000}\n renderer={(props: any) =>\n renderer({\n ...props,\n handleCountdownFinish,\n })\n }\n />\n </p>\n </div>\n </div>\n ) : null\n}\n\nexport default memo(TimerWidget)\n","import { FormControl, FormHelperText } from '@mui/material'\nimport Checkbox from '@mui/material/Checkbox'\nimport FormControlLabel from '@mui/material/FormControlLabel'\nimport FormGroup from '@mui/material/FormGroup'\nimport { useTheme } from '@mui/styles'\nimport { FieldInputProps } from 'formik'\nimport React from 'react'\n\nexport interface ICheckboxField {\n label: string | number | JSX.Element;\n field?: FieldInputProps<any>;\n}\n\ninterface IOtherProps {\n [key: string]: any;\n}\n\nexport const CheckboxField = ({\n label,\n field,\n selectOptions,\n theme,\n setFieldValue,\n disableDropdown,\n setPhoneValidationIsLoading,\n defaultCountry,\n required,\n uniqueId,\n dateFormat,\n datePlaceholder,\n ...rest\n}: ICheckboxField & IOtherProps) => {\n const customTheme: any = useTheme()\n return (\n <FormControl\n error={!!(rest?.form?.errors && rest.form.errors[field?.name ?? ''])}\n >\n <FormGroup>\n <FormControlLabel\n control={<Checkbox {...field} {...rest} />}\n label={label}\n componentsProps={{\n typography: customTheme?.checkbox,\n }}\n />\n </FormGroup>\n {!!(rest?.form?.errors && rest.form.errors[field?.name ?? '']) ? (\n <FormHelperText>Required</FormHelperText>\n ) : null}\n </FormControl>\n )\n}\n","import { FieldInputProps, FormikProps } from 'formik'\nimport _debounce from 'lodash/debounce'\nimport _get from 'lodash/get'\nimport MuiPhoneNumber from 'material-ui-phone-number'\nimport React, { useCallback, useEffect } from 'react'\n\nimport { validatePhoneNumber } from '../../api'\n\nexport interface IPhoneNumberField {\n label: string;\n field: FieldInputProps<any>;\n form: FormikProps<any>;\n type: string;\n disableDropdown: boolean;\n fill: boolean;\n setPhoneValidationIsLoading: (isLoading: boolean) => void;\n\n // optional\n defaultCountry?: string;\n isCountryCodeEditable?: boolean;\n}\n\nexport const PhoneNumberField = ({\n label,\n field,\n form: {\n errors,\n touched,\n setFieldError,\n values,\n initialValues,\n setFieldValue,\n setFieldTouched,\n setErrors,\n },\n disableDropdown = true,\n defaultCountry = 'us',\n fill = false,\n setPhoneValidationIsLoading,\n isCountryCodeEditable,\n}: IPhoneNumberField) => {\n const error = _get(errors, field.name)\n const isTouched = Boolean(_get(touched, field.name))\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debounceCb = useCallback(\n _debounce((cb: () => void) => void cb(), 1000),\n []\n )\n\n useEffect(() => {\n if (field.value) {\n setPhoneValidationIsLoading(true)\n }\n\n debounceCb(async () => {\n try {\n if (!values[field.name]) {\n const newErrors = { ...errors }\n delete newErrors[field.name]\n setErrors(newErrors)\n return\n }\n if (values[field.name]) {\n await validatePhoneNumber(values[field.name])\n }\n if (errors[field.name]) {\n const newErrors = { ...errors }\n delete newErrors[field.name]\n setErrors(newErrors)\n }\n } catch (error) {\n const message = _get(\n error,\n 'response.data.message',\n 'Invalid phone number'\n )\n if (values[field.name] && errors[field.name] !== message) {\n setFieldError(field.name, message)\n }\n } finally {\n setPhoneValidationIsLoading(false)\n }\n })\n // eslint-disable-next-line\n }, [field.value])\n\n return (\n <>\n <MuiPhoneNumber\n name={field.name}\n value={fill ? values[field.name] : initialValues[field.name]}\n onChange={(value: any, country?: any) => {\n if (`+${country?.dialCode}` === value || value === '+') {\n setFieldValue(field.name, '')\n setFieldError(field.name, '')\n } else {\n setFieldTouched(field.name, true)\n setFieldValue(field.name, value)\n }\n }}\n variant=\"outlined\"\n defaultCountry={defaultCountry}\n disableDropdown={disableDropdown}\n label={label}\n error={!!error && (isTouched || fill)}\n helperText={(isTouched || fill) && error}\n fullWidth\n autoFormat={false}\n disableAreaCodes={true}\n countryCodeEditable={isCountryCodeEditable}\n />\n </>\n )\n}\n","import CircularProgress from '@mui/material/CircularProgress'\nimport React from 'react'\n\nexport const Loader = () => (\n <div className=\"loader-container\">\n <CircularProgress />\n </div>\n)\n","import { FormControl, FormHelperText, InputLabel } from '@mui/material'\nimport Select from '@mui/material/Select'\nimport { useTheme } from '@mui/styles'\nimport { FieldInputProps, FormikProps } from 'formik'\nimport _get from 'lodash/get'\nimport _map from 'lodash/map'\nimport React from 'react'\n\nexport interface ISelectOption {\n label: string | number;\n value?: string | number;\n [key: string]: any;\n}\n\nexport interface ISelectField {\n label: string;\n\n field: FieldInputProps<any>;\n form: FormikProps<any>;\n theme: 'dark' | 'light';\n\n // optional\n type?: string;\n selectOptions?: ISelectOption[];\n onChange?: (e: any) => void;\n}\n\ninterface IOtherProps {\n [key: string]: any;\n}\n\nexport const NativeSelectField = ({\n label,\n type = 'text',\n field,\n selectOptions = [] as ISelectOption[],\n form: { touched, errors, setFieldValue },\n theme,\n onChange = () => {},\n}: ISelectField & IOtherProps) => {\n const isTouched = Boolean(_get(touched, field.name))\n const error = _get(errors, field.name)\n\n const customTheme: any = useTheme()\n\n return (\n <FormControl fullWidth={true}>\n <InputLabel\n style={customTheme?.input}\n htmlFor={field.name}\n error={!!error && isTouched}\n shrink={true}\n >\n {label}\n </InputLabel>\n <Select\n id={field.name}\n label={label}\n type={type}\n fullWidth={true}\n error={!!error && isTouched}\n inputProps={{\n id: field.name,\n }}\n native={true}\n className={theme}\n MenuProps={{ className: theme }}\n {...field}\n style={customTheme?.input}\n onChange={e => {\n onChange(e)\n setFieldValue(field.name, e.target.value)\n }}\n >\n {_map(selectOptions, option => (\n <option\n key={option.value}\n value={option.value}\n disabled={option.disabled}\n >\n {option.label}\n </option>\n ))}\n </Select>\n {isTouched && error ? (\n <FormHelperText error={!!error && isTouched}>{error}</FormHelperText>\n ) : null}\n </FormControl>\n )\n}\n","import FormControl from '@mui/material/FormControl'\nimport FormControlLabel from '@mui/material/FormControlLabel'\nimport FormHelperText from '@mui/material/FormHelperText'\nimport FormLabel from '@mui/material/FormLabel'\nimport Radio from '@mui/material/Radio'\nimport RadioGroup from '@mui/material/RadioGroup'\nimport { FieldInputProps, FormikProps } from 'formik'\nimport _get from 'lodash/get'\nimport _identity from 'lodash/identity'\nimport React from 'react'\n\nexport interface IRadio {\n id: string | number;\n label: string | number;\n value: string | number;\n [key: string]: any;\n}\n\nexport interface IRadioGroupField {\n label?: string;\n field: FieldInputProps<any>;\n form: FormikProps<any>;\n radios: IRadio[];\n disabled?: boolean;\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n}\n\nexport const RadioGroupField = ({\n label,\n field,\n radios,\n disabled,\n form: { touched, errors, setFieldValue },\n onChange = _identity,\n}: IRadioGroupField) => {\n const radioId = `radio-${field.name}`\n const error = _get(errors, field.name)\n const isTouched = Boolean(_get(touched, field.name))\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const { value } = e.target as HTMLInputElement\n setFieldValue(field.name, value)\n onChange(e)\n }\n\n if (!radios) return null\n\n return (\n <FormControl disabled={disabled} error={isTouched && Boolean(error)}>\n {isTouched && Boolean(error) ? (\n <FormHelperText className=\"radio-error\" error>\n {error}\n </FormHelperText>\n ) : null}\n {label && <FormLabel id={radioId}>{label}</FormLabel>}\n <RadioGroup\n aria-labelledby={radioId}\n name={field.name}\n value={field.value}\n onChange={handleChange}\n >\n {radios.map(radio => {\n const { id, label, value } = radio\n return (\n <FormControlLabel\n key={id}\n label={label}\n value={value}\n control={<Radio />}\n />\n )\n })}\n </RadioGroup>\n </FormControl>\n )\n}\n","import { FormControl, InputLabel } from '@mui/material'\nimport Checkbox from '@mui/material/Checkbox'\nimport FormHelperText from '@mui/material/FormHelperText'\nimport ListItemText from '@mui/material/ListItemText'\nimport MenuItem from '@mui/material/MenuItem'\nimport OutlinedInput from '@mui/material/OutlinedInput'\nimport Select, { SelectChangeEvent } from '@mui/material/Select'\nimport { FieldInputProps, FormikProps } from 'formik'\nimport _get from 'lodash/get'\nimport _identity from 'lodash/identity'\nimport _map from 'lodash/map'\nimport React from 'react'\n\ninterface ISelectOption {\n id: string | number;\n label: string | number;\n value: string | number;\n}\n\ninterface ISelectField {\n field: FieldInputProps<any>;\n form: FormikProps<any>;\n options: ISelectOption[];\n\n // optional\n label?: string;\n isMultiple?: boolean;\n disabled?: boolean;\n onChange?: (e: SelectChangeEvent<string[]>) => void;\n}\n\nfunction SelectField({\n label,\n isMultiple,\n field,\n form: { touched, errors, setFieldValue },\n options = [],\n disabled,\n onChange = _identity,\n}: ISelectField) {\n const { name, value } = field\n const selectId = `select-field-${name}`\n const error = _get(errors, name)\n const isTouched = Boolean(_get(touched, field.name))\n\n const handleChange = (event: SelectChangeEvent<string[]>) => {\n const {\n target: { value },\n } = event\n\n setFieldValue(name, value)\n onChange(event)\n }\n\n const getSelectedItemLabel = (selectedValue: any) => {\n const selectedItem = options.find(option => option.value === selectedValue)\n const label = _get(selectedItem, 'label', '')\n return label\n }\n\n return (\n <>\n <FormControl\n fullWidth={true}\n disabled={disabled}\n error={isTouched && Boolean(error)}\n >\n {label && <InputLabel id={selectId}>{label}</InputLabel>}\n <Select\n id={name}\n labelId={selectId}\n multiple={isMultiple}\n value={value || []}\n onChange={handleChange}\n input={<OutlinedInput label={label} />}\n renderValue={selected => {\n if (isMultiple) {\n const selectedLabels = _map(selected, (selectedValue: string) =>\n getSelectedItemLabel(selectedValue)\n )\n return selectedLabels.join(', ')\n }\n\n const selectedLabel = getSelectedItemLabel(selected)\n return selectedLabel\n }}\n sx={{ textAlign: 'start' }}\n >\n {options.map((option: ISelectOption) => (\n <MenuItem key={option.label} value={option.value}>\n {isMultiple && (\n <Checkbox checked={value.indexOf(option.value) > -1} />\n )}\n <ListItemText primary={option.label} />\n </MenuItem>\n ))}\n </Select>\n {isTouched && Boolean(error) ? (\n <FormHelperText error>{error}</FormHelperText>\n ) : null}\n </FormControl>\n </>\n )\n}\n\nexport { SelectField }\n","import { createTheme, ThemeProvider } from '@mui/material/styles'\nimport { DatePicker } from '@mui/x-date-pickers'\nimport { AdapterMoment } from '@mui/x-date-pickers/AdapterMoment'\nimport { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'\nimport { FieldInputProps, FormikProps } from 'formik'\nimport React from 'react'\n\nimport { CustomField } from './CustomField'\n\nconst DATE_SIZE = 32\nconst compactStyles = {\n '& > div': {\n minWidth: 256,\n },\n '& > div > div, & > div > div > div, & .MuiCalendarPicker-root': {\n width: 256,\n },\n '& .MuiTypography-caption': {\n width: DATE_SIZE,\n margin: 0,\n },\n '& .PrivatePickersSlideTransition-root': {\n minHeight: DATE_SIZE * 6,\n },\n '& .PrivatePickersSlideTransition-root [role=\"row\"]': {\n margin: 0,\n },\n '& .MuiPickersDay-dayWithMargin': {\n margin: 0,\n },\n '& .MuiPickersDay-root': {\n width: DATE_SIZE,\n height: DATE_SIZE,\n },\n '& .MuiPickersArrowSwitcher-spacer': {\n width: 0,\n },\n '& [role=\"presentation\"] .PrivatePickersFadeTransitionGroup-root': {\n marginRight: -1,\n },\n}\n\nconst compactStyleTheme = createTheme({\n components: {\n MuiPaper: {\n defaultProps: {\n sx: compactStyles,\n },\n },\n },\n})\n\nexport interface IDatePickerFieldProps {\n label: string;\n\n field: FieldInputProps<any>;\n form: FormikProps<any>;\n theme: 'dark' | 'light';\n\n useCompact?: boolean;\n}\n\ninterface IOtherProps {\n [key: string]: any;\n}\n\nexport const DatePickerField = ({\n label,\n field,\n form,\n theme,\n useCompact = true,\n dateFormat = 'DD/MM/YYYY',\n placeholder = 'dd/mm/yyyy',\n}: IDatePickerFieldProps & IOtherProps) => (\n <ThemeProvider theme={useCompact ? compactStyleTheme : {}}>\n <LocalizationProvider dateAdapter={AdapterMoment}>\n <DatePicker\n value={field.value || ''}\n onChange={value => form.setFieldValue(field.name, value)}\n PopperProps={{\n placement: 'bottom-start',\n }}\n showDaysOutsideCurrentMonth={true}\n disableFuture={true}\n inputFormat={dateFormat}\n mask=\"__/__/____\"\n renderInput={(params: any) => (\n <CustomField\n {...params}\n inputProps={{ ...params.inputProps, placeholder }}\n theme={theme}\n field={{\n ...field,\n onChange: (\n evt: React.FormEvent<HTMLInputElement | HTMLTextAreaElement>\n ) => {\n if (params.inputProps && params.inputProps.onChange) {\n params.inputProps.onChange(evt)\n }\n },\n }}\n form={form}\n label={label}\n type=\"tel\"\n />\n )}\n />\n </LocalizationProvider>\n </ThemeProvider>\n)\n","import { FormikErrors, FormikValues } from 'formik'\nimport _flatMapDeep from 'lodash/flatMapDeep'\nimport _forEach from 'lodash/forEach'\nimport _get from 'lodash/get'\nimport _isArray from 'lodash/isArray'\nimport _map from 'lodash/map'\nimport { nanoid } from 'nanoid'\nimport React from 'react'\n\nimport { IGroupItem } from '../../types'\nimport { CONFIGS } from '../../utils'\nimport { getQueryVariable } from '../../utils/getQueryVariable'\nimport { combineValidators, requiredValidator } from '../../validators'\nimport {\n CheckboxField,\n CustomField,\n DatePickerField,\n PhoneNumberField,\n RadioGroupField,\n SelectField,\n} from '../common/index'\n\nexport interface ILoggedInValues {\n emailLogged?: string;\n firstNameLogged?: string;\n lastNameLogged?: string;\n}\n\nexport interface IValues {\n [key: string]: any;\n}\n\nexport const getInitialValues = (\n data: any = [],\n propsInitialValues: IValues = {},\n userValues: any = {}\n): IValues => {\n const results = _flatMapDeep(data, ({ fields }) =>\n _map(fields, ({ groupItems }) =>\n _map(groupItems, ({ name, value }) => ({ name, value }))\n )\n )\n\n const initialValues: IValues = {}\n _forEach(results, groupItem => {\n const { name, value } = groupItem\n initialValues[name] =\n value || propsInitialValues[name] || userValues[name] || ''\n })\n\n // set logged in user as first ticket holder\n initialValues['holderFirstName-0'] =\n propsInitialValues.firstName || userValues.firstName || ''\n initialValues['holderLastName-0'] =\n propsInitialValues.lastName || userValues.lastName || ''\n initialValues['holderEmail-0'] =\n propsInitialValues.email || userValues.email || ''\n\n return initialValues\n}\n\nexport const createRegisterFormData = (\n values: IValues = {},\n checkoutBody: { attributes: { [key: string]: any } },\n flagFreeTicket = false\n): FormData => {\n const bodyFormData = new FormData()\n bodyFormData.append('first_name', values.firstName)\n bodyFormData.append('last_name', values.lastName)\n bodyFormData.append('email', values.email)\n bodyFormData.append('password', values.password)\n bodyFormData.append('password_confirmation', values.confirmPassword)\n bodyFormData.append(\n 'client_id',\n CONFIGS.CLIENT_ID || 'e9d8f8922797b4621e562255afe90dbf'\n )\n bodyFormData.append(\n 'client_secret',\n CONFIGS.CLIENT_SECRET || 'b89c191eff22fdcf84ac9bfd88d005355a151ec2c83b26b9'\n )\n bodyFormData.append('check_cart_expiration', 'true')\n\n _forEach(checkoutBody.attributes, (item: any, key: string) => {\n if (\n !(\n flagFreeTicket &&\n ['country', 'state', 'city', 'street_address', 'zip'].includes(key)\n )\n ) {\n bodyFormData.append(key, item)\n }\n })\n\n return bodyFormData\n}\n\ninterface ICheckoutBody {\n attributes: {\n [key: string]: any;\n };\n}\n\ninterface IUserData {\n id: string;\n firstName: string;\n lastName: string;\n email: string;\n city?: string;\n country?: string;\n countryId?: string;\n phone?: string;\n streetAddress?: string;\n state?: string;\n zip?: string;\n zipCode?: string;\n stateId?: string;\n}\n\ninterface IticketHolder {\n first_name?: string;\n last_name?: string;\n phone?: string;\n email?: string;\n}\n\nexport const setLoggedUserData = (data: IUserData) => ({\n id: data.id,\n first_name: data.firstName,\n last_name: data.lastName,\n email: data.email,\n confirmEmail: data.email,\n city: data?.city || '',\n country: data?.countryId || data?.country || '',\n phone: data?.phone || '',\n street_address: data?.streetAddress || '',\n state: data?.stateId || '',\n zip: data?.zip || data?.zipCode || '',\n})\n\nexport const createCheckoutDataBody = (\n ticketsQuantity: number,\n values: IValues = {},\n logedInValues: ILoggedInValues = {},\n includeDob = false\n): ICheckoutBody => {\n const {\n firstName,\n lastName,\n holderAge,\n confirmEmail,\n confirmPassword,\n ...restValues\n } = values\n\n const holders = []\n let ticket_holders: IticketHolder[] = []\n\n for (let i = 0; i <= ticketsQuantity; i++) {\n const individualHolder = Object.fromEntries(\n Object.entries(values).filter(([key, _val]) => key.includes(String(i)))\n )\n holders.push(individualHolder)\n }\n\n const filteredHolders = holders.filter(\n holder => Object.entries(holder).length > 0\n )\n ticket_holders = filteredHolders.map((item, index) => ({\n first_name: !index\n ? item[`holderFirstName-${index}`] || logedInValues.firstNameLogged || ''\n : item[`holderFirstName-${index}`] || '',\n last_name: !index\n ? item[`holderLastName-${index}`] || logedInValues.lastNameLogged || ''\n : item[`holderLastName-${index}`] || '',\n phone: item[`holderPhone-${index}`] || '',\n email: !index\n ? item[`holderEmail-${index}`] || logedInValues.emailLogged || ''\n : item[`holderEmail-${index}`] || '',\n }))\n\n const filteredRestValue: { [key: string]: any } = {}\n _forEach(restValues, (value, key) => {\n if (!key.includes('holder')) {\n filteredRestValue[key] = value\n }\n })\n\n const body: ICheckoutBody = {\n attributes: {\n ...filteredRestValue,\n email: restValues.email || logedInValues.emailLogged,\n confirm_email: restValues.email || logedInValues.emailLogged,\n first_name: firstName || logedInValues.firstNameLogged,\n last_name: lastName || logedInValues.lastNameLogged,\n ticket_holders,\n },\n }\n\n if (includeDob) {\n const holderAgeDate = new Date(holderAge)\n body.attributes.dob_day = holderAgeDate.getDate()\n body.attributes.dob_month = holderAgeDate.getMonth() + 1\n body.attributes.dob_year = holderAgeDate.getFullYear()\n }\n return body\n}\n\nexport const getValidateFunctions = (\n element: IGroupItem,\n states: Array<{ [key: string]: any }>,\n values: FormikValues,\n errors: FormikErrors<any>\n) => {\n const validationFunctions: any[] = []\n\n if (element.required) {\n if (\n element.name !== 'state' ||\n (element.name === 'state' && states.length)\n ) {\n validationFunctions.push(requiredValidator)\n }\n }\n\n if (element.onValidate) {\n validationFunctions.push(element.onValidate)\n }\n\n if (element.name === 'phone') {\n const invalidPhone = () =>\n errors.phone === 'Invalid phone number' ? 'Invalid phone number' : null\n validationFunctions.push(invalidPhone)\n }\n\n if (element.name === 'confirmEmail') {\n const isSameEmail = (confirmEmail?: string) =>\n values.email !== confirmEmail\n ? 'Please confirm your email address correctly'\n : null\n validationFunctions.push(isSameEmail)\n }\n\n if (element.name === 'confirmPassword') {\n const isSame = (confirmPassword?: string) =>\n values.password !== confirmPassword\n ? 'Password confirmation does not match'\n : null\n validationFunctions.push(isSame)\n }\n\n return combineValidators(...validationFunctions)\n}\n\nexport const assingUniqueIds = (data: any): any => {\n if (_get(data[0], 'uniqueId')) {\n return data\n }\n\n return _map(data, (item: any) => {\n _forEach(item, (itemValue: string, key) => {\n if (\n _isArray(itemValue) &&\n !itemValue.some(item => typeof item === 'string')\n ) {\n item[key] = assingUniqueIds(itemValue)\n }\n })\n\n return { ...item, uniqueId: nanoid() }\n })\n}\n\nexport const isRequiredField = (element: IGroupItem) => {\n const flagRequirePhone = getQueryVariable('phone_required') === 'true'\n const collectMandatoryWalletAddress =\n getQueryVariable('collect_mandatory_wallet_address') === 'true'\n const { name, required } = element\n\n if (\n required ||\n (name === 'phone' && flagRequirePhone) ||\n (name === 'data_capture[wallet_address]' && !collectMandatoryWalletAddress)\n ) {\n return true\n }\n\n return false\n}\n\nexport const getFieldLabel = (element: IGroupItem) => {\n if (isRequiredField(element) || React.isValidElement(element.label)) {\n return element.label\n }\n\n return `${element.label} (optional)`\n}\n\nexport const getFieldComponent = (element: IGroupItem) => {\n const type = _get(element, 'type', 'text')\n\n const fieldComponentConfigs = {\n checkbox: CheckboxField,\n select: CustomField, // Temp change untill refactoring\n select_multi: SelectField,\n phone: PhoneNumberField,\n date: DatePickerField,\n radio: RadioGroupField,\n text: CustomField,\n }\n\n const fieldComponent = _get(fieldComponentConfigs, type, CustomField)\n return fieldComponent\n}\n","import './style.css'\n\nimport { CircularProgress, ThemeOptions } from '@mui/material'\nimport Backdrop from '@mui/material/Backdrop'\nimport Button from '@mui/material/Button'\nimport { createTheme, ThemeProvider } from '@mui/material/styles'\nimport { CSSProperties } from '@mui/styles'\nimport axios, { AxiosError } from 'axios'\nimport {\n Field,\n Form,\n Formik,\n FormikHelpers,\n FormikProps,\n FormikValues,\n} from 'formik'\nimport _find from 'lodash/find'\nimport _get from 'lodash/get'\nimport _identity from 'lodash/identity'\nimport _includes from 'lodash/includes'\nimport _isEmpty from 'lodash/isEmpty'\nimport _isEqual from 'lodash/isEqual'\nimport _map from 'lodash/map'\nimport { nanoid } from 'nanoid'\nimport React, { FC, useEffect, useRef, useState } from 'react'\n\nimport {\n getCart,\n getCountries,\n getProfileData,\n getStates,\n postOnCheckout,\n register,\n setCustomHeader,\n} from '../../api'\nimport { usePixel } from '../../hooks/usePixel'\nimport { IBillingInfoData } from '../../types'\nimport {\n createCheckoutDataBodyWithDefaultHolder,\n deleteCookieByName,\n getCookieByName,\n isBrowser,\n} from '../../utils'\nimport { ErrorFocus } from '../../utils/formikErrorFocus'\nimport { getQueryVariable } from '../../utils/getQueryVariable'\nimport { combineValidators, requiredValidator } from '../../validators'\nimport SnackbarAlert from '../common/SnackbarAlert'\nimport { ForgotPasswordModal } from '../forgotPasswordModal'\nimport { VerificationPendingModal } from '../idVerificationContainer/VerificationPendingModal'\nimport { LoginModal } from '../loginModal'\nimport { SignupModal } from '../signupModal'\nimport TimerWidget from '../timerWidget'\nimport {\n assingUniqueIds,\n createCheckoutDataBody,\n createRegisterFormData,\n getFieldComponent,\n getFieldLabel,\n getInitialValues,\n getValidateFunctions,\n setLoggedUserData,\n} from './utils'\n\nexport interface IBillingInfoPage {\n data?: IBillingInfoData[];\n ticketHoldersFields?: IBillingInfoData;\n handleSubmit?: (\n values: FormikValues,\n formikHelpers: FormikHelpers<FormikValues>,\n eventId: any,\n res: any\n ) => void;\n onRegisterSuccess?: (value: any) => void;\n onRegisterError?: (e: AxiosError, email: string) => void;\n onSubmitError?: (e: AxiosError) => void;\n onGetCartSuccess?: (res: any) => void;\n onGetCartError?: (e: AxiosError) => void;\n onGetCountriesSuccess?: (res: any) => void;\n onGetCountriesError?: (e: AxiosError) => void;\n onGetStatesSuccess?: (res: any) => void;\n onGetStatesError?: (e: AxiosError) => void;\n onGetProfileDataSuccess?: (res: any) => void;\n onGetProfileDataError?: (e: AxiosError) => void;\n onAuthorizeSuccess?: () => void;\n onAuthorizeError?: (e: AxiosError) => void;\n onLogin?: () => void;\n onLoginSuccess?: () => void;\n onErrorClose?: () => void;\n initialValues?: FormikValues;\n buttonName?: string;\n theme?: 'light' | 'dark';\n isLoggedIn?: boolean;\n accountInfoTitle?: string | JSX.Element;\n hideLogo?: boolean;\n themeOptions?: ThemeOptions & {\n input?: CSSProperties;\n checkbox?: CSSProperties;\n };\n hideErrorsAlertSection?: boolean;\n onSkipBillingPage: (data: any) => void;\n skipPage?: boolean;\n canSkipHolderNames?: boolean;\n shouldFetchCountries?: boolean;\n onForgotPasswordSuccess?: (res: any) => void;\n onForgotPasswordError?: (e: AxiosError) => void;\n onCountdownFinish?: () => void;\n enableTimer?: boolean;\n logo?: string;\n showForgotPasswordButton?: boolean;\n showSignUpButton?: boolean;\n brandOptIn?: boolean;\n showPoweredByImage?: boolean;\n isCountryCodeEditable?: boolean;\n\n onPendingVerification?: () => void;\n}\n\nconst LogicRunner: FC<{\n brandOptIn?: boolean;\n values: any;\n setStates: React.Dispatch<any>;\n setFieldValue: any;\n setValues: any;\n setUserValues: any;\n onGetStatesSuccess: any;\n onGetStatesError: any;\n shouldFetchCountries: boolean;\n}> = ({\n values,\n setStates,\n setFieldValue,\n setValues,\n setUserValues,\n onGetStatesSuccess,\n onGetStatesError,\n shouldFetchCountries,\n brandOptIn,\n}) => {\n const prevCountry = useRef(values.country)\n useEffect(() => {\n const fetchStates = async () => {\n try {\n const res = await getStates(values.country)\n const mappedStates = _map(_get(res, 'data.data'), (item, key) => ({\n label: item,\n value: key,\n }))\n setStates(mappedStates)\n if (prevCountry.current !== values.country) {\n const stateExists = mappedStates.find(\n state => state.value === values.state\n )?.value\n setFieldValue('state', stateExists ?? mappedStates[0]?.value ?? '')\n prevCountry.current = values.country\n }\n onGetStatesSuccess(res.data)\n } catch (e) {\n if (axios.isAxiosError(e)) {\n onGetStatesError(e)\n }\n }\n }\n shouldFetchCountries && fetchStates()\n }, [values.country, setStates, setFieldValue])\n const userDataEncoded =\n typeof window !== 'undefined'\n ? window.localStorage.getItem('user_data')\n : ''\n useEffect(() => {\n // set user data from local storage\n const getStoredUserData = () => {\n if (typeof window !== 'undefined') {\n if (userDataEncoded) {\n try {\n const parsedData = JSON.parse(userDataEncoded)\n const mappedValues = {\n firstName: parsedData?.first_name || parsedData?.firstName || '',\n lastName: parsedData?.last_name || parsedData?.lastName || '',\n email: parsedData?.email || '',\n phone: parsedData?.phone || '',\n confirmEmail: parsedData?.email || '',\n state: parsedData?.state || '',\n street_address: parsedData?.street_address || '',\n country: parsedData?.country || '1',\n zip: parsedData?.zip || '',\n brand_opt_in: brandOptIn\n ? brandOptIn\n : parsedData?.brand_opt_in || false,\n city: parsedData?.city || '',\n confirmPassword: '',\n password: '',\n 'holderFirstName-0':\n parsedData?.first_name || parsedData?.firstName || '',\n 'holderLastName-0':\n parsedData?.last_name || parsedData?.lastName || '',\n 'holderEmail-0': parsedData?.email || '',\n }\n setValues({ ...values, ...mappedValues })\n setUserValues(mappedValues)\n } catch (e) {}\n }\n }\n }\n getStoredUserData()\n }, [userDataEncoded, setValues, setUserValues])\n return null\n}\n\nexport const BillingInfoContainer = React.memo(\n ({\n data = [],\n ticketHoldersFields = {\n id: 1,\n fields: [],\n },\n initialValues = {},\n buttonName = 'Submit',\n handleSubmit = _identity,\n theme = 'light',\n onRegisterSuccess = _identity,\n onRegisterError = _identity,\n onSubmitError = _identity,\n onGetCartSuccess = _identity,\n onGetCartError = _identity,\n onGetCountriesSuccess = _identity,\n onGetCountriesError = _identity,\n onGetStatesSuccess = _identity,\n onGetStatesError = _identity,\n onGetProfileDataSuccess = _identity,\n onGetProfileDataError = _identity,\n onAuthorizeSuccess = _identity,\n onAuthorizeError = _identity,\n onLogin,\n onLoginSuccess = _identity,\n isLoggedIn: pIsLoggedIn = false,\n accountInfoTitle = '',\n hideLogo,\n themeOptions,\n onErrorClose = _identity,\n hideErrorsAlertSection = false,\n onSkipBillingPage = _identity,\n skipPage = false,\n canSkipHolderNames = false,\n onForgotPasswordSuccess = _identity,\n onForgotPasswordError = _identity,\n shouldFetchCountries = true,\n onCountdownFinish = _identity,\n enableTimer = false,\n logo,\n showForgotPasswordButton = false,\n showSignUpButton = false,\n brandOptIn = false,\n showPoweredByImage = false,\n isCountryCodeEditable = true,\n onPendingVerification = _identity,\n }: IBillingInfoPage) => {\n const [isNewUser, setIsNewUser] = useState(false)\n const themeMui = createTheme(themeOptions)\n const isWindowDefined = typeof window !== 'undefined'\n const defaultCountry = isWindowDefined\n ? window.localStorage.getItem('eventCountry')\n : ''\n const userData =\n isWindowDefined && window.localStorage.getItem('user_data')\n ? JSON.parse(window.localStorage.getItem('user_data') || '')\n : {}\n const access_token =\n isWindowDefined && window.localStorage.getItem('access_token')\n ? window.localStorage.getItem('access_token') || ''\n : ''\n const [dataWithUniqueIds, setDataWithUniqueIds] = useState<\n IBillingInfoData[]\n >(assingUniqueIds(data))\n const xtfCookie = getCookieByName('X-TF-ECOMMERCE')\n const [isLoggedIn, setIsLoggedIn] = useState(!!(pIsLoggedIn || xtfCookie))\n const [cartInfoData, setCartInfo] = useState<any>({})\n const [countries, setCountries] = useState<any>([])\n const [states, setStates] = useState<any>([])\n const [showModalLogin, setShowModalLogin] = useState(false)\n const [alreadyHasUser, setAlreadyHasUser] = useState(false)\n const [userExpired, setUserExpired] = useState(false)\n const [showModalSignup, setShowModalSignup] = useState(false)\n const [showModalForgotPassword, setShowModalForgotPassword] = useState(\n false\n )\n const [ticketsQuantity, setTicketsQuantity] = useState<string[]>([])\n const [userValues, setUserValues] = useState<any>({\n firstName: '',\n lastName: '',\n email: '',\n phone: '',\n confirmEmail: '',\n holderFirstName: '',\n holderLastName: '',\n holderAge: '',\n city: '',\n country: '',\n street_address: '',\n state: '',\n zip: '',\n })\n const [loading, setLoading] = useState(true)\n const [cardLoading, setCardLoading] = useState(false)\n const [isCountriesLoading, setIsCountriesLoading] = useState(true)\n const [error, setError] = useState(null)\n const [phoneValidationIsLoading, setPhoneValidationIsLoading] = useState(\n false\n )\n const emailLogged =\n _get(userData, 'email', '') || _get(userValues, 'email', '')\n const firstNameLogged =\n _get(userData, 'first_name', '') || _get(userValues, 'first_name', '')\n const lastNameLogged =\n _get(userData, 'last_name', '') || _get(userValues, 'last_name', '')\n const showDOB = getQueryVariable('age_required') === 'true'\n const showTicketHolders = getQueryVariable('names_required') === 'true'\n const eventId = getQueryVariable('event_id') || ''\n const optedInFieldValue: boolean = brandOptIn\n ? brandOptIn\n : _get(cartInfoData, 'optedIn', false)\n const ttfOptIn = Boolean(_get(cartInfoData, 'ttfOptIn', false))\n const isTable = Boolean(_get(cartInfoData, 'is_table', false))\n const hideTtfOptIn: boolean = _get(cartInfoData, 'hide_ttf_opt_in', true)\n const expirationTime = _get(cartInfoData, 'expiresAt')\n const flagRequirePhone = getQueryVariable('phone_required') === 'true'\n const collectMandatoryWalletAddress =\n getQueryVariable('collect_mandatory_wallet_address') === 'true'\n const collectOptionalWalletAddress =\n getQueryVariable('collect_optional_wallet_address') === 'true'\n const flagFreeTicket = getQueryVariable('free_ticket') === 'true'\n const hidePhoneField = getQueryVariable('hide_phone_field') === 'true'\n const hideWalletAddressField =\n !collectOptionalWalletAddress && !collectMandatoryWalletAddress\n\n const [\n pendingVerificationMessage,\n setPendingVerificationMessage,\n ] = useState()\n\n // Get prevProps\n const prevData = useRef(data)\n\n const addAddOnsInAttributes = (checkoutBody: any) => {\n const selectedAddOns = window.localStorage.getItem('add_ons') || '{}'\n checkoutBody.attributes.add_ons = JSON.parse(selectedAddOns)\n }\n\n useEffect(() => {\n const hasUniqueId = _get(dataWithUniqueIds, '[0].uniqueId')\n const isEqualData = _isEqual(prevData.current, data)\n if (!hasUniqueId || !isEqualData) {\n setDataWithUniqueIds(assingUniqueIds(data))\n if (!isEqualData) {\n prevData.current = data\n }\n }\n }, [dataWithUniqueIds, data])\n\n const getQuantity = (cart: any = []) => {\n let qty = 0\n cart.forEach((item: any) => {\n qty += +item.quantity\n })\n return qty\n }\n\n useEffect(() => {\n if (pIsLoggedIn !== isLoggedIn || xtfCookie) {\n setIsLoggedIn(!!(pIsLoggedIn || xtfCookie))\n }\n }, [pIsLoggedIn, isLoggedIn, xtfCookie])\n //just once\n useEffect(() => {\n // fetch countries data\n const fetchCountries = async () => {\n try {\n const res = await getCountries()\n setCustomHeader(res)\n setCountries(_get(res, 'data.data'))\n setIsCountriesLoading(false)\n onGetCountriesSuccess(res.data)\n } catch (e) {\n if (axios.isAxiosError(e)) {\n onGetCountriesError(e)\n }\n setIsCountriesLoading(false)\n }\n }\n shouldFetchCountries && fetchCountries()\n fetchCart()\n }, [])\n // fetch cart data\n const fetchCart = async () => {\n try {\n setCardLoading(true)\n const res = await getCart()\n setCustomHeader(res)\n const cartInfo = _get(res, 'data.data.attributes')\n setCartInfo(cartInfo)\n const { cart = [] } = cartInfo\n setTicketsQuantity(\n new Array(getQuantity(cart)).fill(null).map(() => nanoid())\n )\n onGetCartSuccess(res.data)\n } catch (e) {\n if (axios.isAxiosError(e)) {\n onGetCartError(e)\n }\n } finally {\n setCardLoading(false)\n }\n }\n // fetch user data\n const fetchUserData = async (token: string) => {\n try {\n if ((isWindowDefined && token) || isLoggedIn) {\n const userDataResponse = await getProfileData(token)\n const profileSpecifiedData = _get(userDataResponse, 'data.data')\n const profileDataObj = setLoggedUserData(profileSpecifiedData)\n setUserValues({\n ...profileDataObj,\n firstName: profileDataObj.first_name,\n lastName: profileDataObj.last_name,\n })\n window.localStorage.setItem(\n 'user_data',\n JSON.stringify(profileDataObj)\n )\n onGetProfileDataSuccess(userDataResponse.data)\n }\n } catch (e) {\n if (axios.isAxiosError(e)) {\n onGetProfileDataError(e)\n }\n }\n }\n useEffect(() => {\n fetchUserData(access_token)\n fetchCart()\n }, [access_token, isLoggedIn])\n\n useEffect(() => {\n const collectPaymentData = async () => {\n if (\n skipPage &&\n !_isEmpty(ticketsQuantity) &&\n !showDOB &&\n !loading &&\n !isNewUser\n ) {\n setLoading(true)\n const checkoutBody = createCheckoutDataBodyWithDefaultHolder(\n ticketsQuantity.length,\n userData\n )\n\n try {\n if (isWindowDefined) {\n addAddOnsInAttributes(checkoutBody)\n }\n\n const res = await postOnCheckout(\n checkoutBody,\n access_token,\n flagFreeTicket\n )\n removeReferralKey()\n onSkipBillingPage(_get(res, 'data.data.attributes'))\n setLoading(false)\n } catch (e) {\n onSubmitError(e)\n if (e.response?.data?.data?.hasUnverifiedOrder) {\n setPendingVerificationMessage(e.response?.data?.message)\n }\n }\n } else {\n setLoading(false)\n }\n }\n collectPaymentData()\n }, [skipPage, ticketsQuantity])\n\n const collectCheckoutBody = (\n values: Record<string, any>,\n profileData?: any\n ): Record<string, any> => {\n let checkoutBody = {}\n\n // Auto collect ticket holders name when it was skipped optionally\n if (showDOB && !showTicketHolders && canSkipHolderNames) {\n checkoutBody = createCheckoutDataBodyWithDefaultHolder(\n ticketsQuantity.length,\n values,\n true,\n { emailLogged, firstNameLogged, lastNameLogged }\n )\n } else {\n checkoutBody = createCheckoutDataBody(\n ticketsQuantity.length,\n values,\n {\n emailLogged: emailLogged || profileData.email,\n firstNameLogged:\n firstNameLogged ||\n profileData.first_name ||\n profileData.firstName,\n lastNameLogged:\n lastNameLogged || profileData.last_name || profileData.lastName,\n },\n showDOB\n )\n }\n\n return checkoutBody\n }\n\n const removeReferralKey = () => {\n localStorage.removeItem('referral_key')\n }\n\n if (\n loading ||\n (enableTimer && !expirationTime && typeof window !== 'undefined')\n ) {\n if (expirationTime === 0) {\n // Redirect to homepage (countdown finished and browser reloaded case)\n window.location.href = '/'\n }\n }\n\n const selectedCountry =\n _find(countries, item => item.code.toLowerCase() === defaultCountry) || {}\n const initialCountry =\n selectedCountry.id || _get(userData, 'country', '') || '1'\n\n const pageUrl = isBrowser ? window.location.href.split('?')[0] : ''\n usePixel(eventId, { page: 'billing', pageUrl })\n if (isTable) {\n dataWithUniqueIds[0].label = 'Get Your Tables'\n }\n return (\n <ThemeProvider theme={themeMui}>\n {(loading || cardLoading || isCountriesLoading) && (\n <Backdrop\n sx={{ color: '#fff', backgroundColor: '#000000bd', zIndex: 1205 }}\n open={true}\n >\n <CircularProgress color=\"inherit\" />\n </Backdrop>\n )}\n {!!expirationTime && enableTimer && (\n <TimerWidget\n expires_at={expirationTime}\n onCountdownFinish={onCountdownFinish}\n />\n )}\n {!isCountriesLoading && (\n <Formik\n initialValues={getInitialValues(\n dataWithUniqueIds,\n {\n country: initialCountry,\n state: _get(userData, 'state', '') || '1',\n brand_opt_in: optedInFieldValue,\n ttf_opt_in: ttfOptIn,\n ...initialValues,\n },\n userValues\n )}\n enableReinitialize={false}\n onSubmit={async (values, formikHelpers) => {\n try {\n if (isLoggedIn) {\n const checkoutBody = collectCheckoutBody(values, userData)\n\n if (isWindowDefined) {\n addAddOnsInAttributes(checkoutBody)\n }\n\n const res = await postOnCheckout(\n checkoutBody,\n access_token,\n flagFreeTicket\n )\n removeReferralKey()\n // After checkout is successful recover updated profile and store it on local storage if needed\n if (isWindowDefined) {\n const updatedUserData = await getProfileData(access_token)\n const profileSpecifiedData = _get(\n updatedUserData,\n 'data.data'\n )\n const profileDataObj = setLoggedUserData(\n profileSpecifiedData\n )\n window.localStorage.setItem(\n 'user_data',\n JSON.stringify(profileDataObj)\n )\n }\n\n handleSubmit(\n values,\n formikHelpers as FormikHelpers<any>,\n eventId,\n res\n )\n return\n }\n const checkoutBodyForRegistration = createCheckoutDataBody(\n ticketsQuantity.length,\n values,\n { emailLogged, firstNameLogged, lastNameLogged },\n showDOB\n )\n const bodyFormData = createRegisterFormData(\n values,\n checkoutBodyForRegistration,\n flagFreeTicket\n )\n try {\n setLoading(true)\n const resRegister = await register(bodyFormData)\n const xtfCookie = _get(resRegister, 'headers.x-tf-ecommerce')\n const accessToken = _get(\n resRegister,\n 'data.data.attributes.access_token'\n )\n const refreshToken = _get(\n resRegister,\n 'data.data.attributes.refresh_token'\n )\n const userProfile = _get(\n resRegister,\n 'data.data.attributes.user_profile'\n )\n\n setIsNewUser(true)\n onRegisterSuccess({\n xtfCookie,\n accessToken,\n refreshToken,\n userProfile,\n })\n } catch (e) {\n setLoading(false)\n\n if (e.response?.data?.data?.hasUnverifiedOrder) {\n setPendingVerificationMessage(e.response?.data?.message)\n } else if (axios.isAxiosError(e)) {\n const error = e?.response?.data?.message\n if (_includes(error, 'You must be aged')) {\n formikHelpers.setFieldError('holderAge', error)\n }\n if (error?.password) {\n formikHelpers.setFieldError('password', error.password)\n formikHelpers.setFieldError(\n 'confirmPassword',\n error.password\n )\n }\n if (error?.email && !onLogin) {\n // False will stand for outside controll\n setAlreadyHasUser(true)\n setShowModalLogin(true)\n }\n\n if (\n _includes(error, 'The cart is expired') &&\n !hideErrorsAlertSection\n ) {\n setError(error)\n }\n\n onRegisterError(e, values.email)\n }\n return\n }\n const profileData = await getProfileData()\n const profileSpecifiedData = _get(profileData, 'data.data')\n const profileDataObj = setLoggedUserData(profileSpecifiedData)\n if (isWindowDefined) {\n window.localStorage.setItem(\n 'user_data',\n JSON.stringify(profileDataObj)\n )\n }\n\n const checkoutBody = collectCheckoutBody(values, profileDataObj)\n\n if (isWindowDefined) {\n addAddOnsInAttributes(checkoutBody)\n }\n\n const res = await postOnCheckout(\n checkoutBody,\n undefined,\n flagFreeTicket\n )\n removeReferralKey()\n handleSubmit(\n values,\n formikHelpers as FormikHelpers<any>,\n eventId,\n res\n )\n } catch (e) {\n setLoading(false)\n if (e.response?.data?.data?.hasUnverifiedOrder) {\n setPendingVerificationMessage(e.response?.data?.message)\n } else if (axios.isAxiosError(e)) {\n if (\n e.response?.status === 401 ||\n e.response?.data?.error === 'invalid_token'\n ) {\n if (isWindowDefined) {\n window.localStorage.removeItem('user_data')\n window.localStorage.removeItem('access_token')\n setUserExpired(true)\n setShowModalLogin(true)\n setIsLoggedIn(false)\n setShowModalSignup(false)\n setShowModalForgotPassword(false)\n const event = new window.CustomEvent('tf-logout')\n deleteCookieByName('X-TF-ECOMMERCE')\n window.document.dispatchEvent(event)\n }\n }\n if (e.response?.data.message && !hideErrorsAlertSection) {\n setError(_get(e, 'response.data.message'))\n }\n onSubmitError(e)\n }\n } finally {\n setLoading(false)\n }\n }}\n >\n {(props: FormikProps<any>) => (\n <Form onSubmit={props.handleSubmit}>\n <ErrorFocus />\n <LogicRunner\n brandOptIn={brandOptIn}\n values={props.values}\n setStates={setStates}\n setFieldValue={props.setFieldValue}\n setValues={props.setValues}\n setUserValues={setUserValues}\n onGetStatesSuccess={onGetStatesSuccess}\n onGetStatesError={onGetStatesError}\n shouldFetchCountries={shouldFetchCountries}\n />\n <div className={`billing-info-container ${theme}`}>\n <SnackbarAlert\n type=\"error\"\n isOpen={!!error}\n message={error || ''}\n onClose={() => {\n setError(null)\n onErrorClose()\n }}\n />\n {!isLoggedIn && (\n <div className=\"account-actions-block\">\n <div className=\"action-item\">\n <div>{accountInfoTitle}</div>\n <div>Login & skip ahead:</div>\n </div>\n <div className=\"action-item login-block\">\n <button\n className=\"login-register-button\"\n type=\"button\"\n onClick={() => {\n // If outside login needed to skip package login functionallity\n if (onLogin) {\n onLogin()\n } else {\n setShowModalLogin(true)\n }\n }}\n >\n Login\n </button>\n {!hideLogo && (\n <div className=\"logo-image-container\">\n <img\n src={\n theme === 'dark'\n ? 'https://www.ticketfairy.com/resources/images/logo-ttf.svg'\n : 'https://www.ticketfairy.com/resources/images/logo-ttf-black.svg'\n }\n alt=\"nodata\"\n />\n </div>\n )}\n </div>\n </div>\n )}\n {!cardLoading &&\n _map(dataWithUniqueIds, item => {\n const { label, labelClassName, fields } = item\n return (\n <React.Fragment key={item.uniqueId}>\n <p className={labelClassName}>{label}</p>\n {_map(fields, group => {\n const { groupClassname, groupItems } = group\n return (\n <React.Fragment key={group.uniqueId}>\n <div className={groupClassname}>\n {_map(\n groupItems.filter(el => {\n if (el.name === 'holderAge' && !showDOB) {\n return false\n }\n if (\n el.name === 'ttf_opt_in' &&\n hideTtfOptIn\n ) {\n return false\n }\n if (el.name === 'phone') {\n if (!hidePhoneField) {\n el.required = flagRequirePhone\n } else {\n return false\n }\n }\n if (\n el.name ===\n 'data_capture[wallet_address]'\n ) {\n if (collectMandatoryWalletAddress) {\n el.required = true\n }\n }\n if (\n [\n 'street_address',\n 'country',\n 'state',\n 'city',\n 'zip',\n ].includes(el.name)\n ) {\n if (flagFreeTicket) {\n el.required = false\n return false\n }\n }\n if (\n hideWalletAddressField &&\n el.name === 'wallet-address-info'\n ) {\n return false\n }\n return true\n }),\n element =>\n [\n 'password',\n 'confirmPassword',\n 'password-info',\n ].includes(element.name) &&\n isLoggedIn ? null : [\n 'data_capture[wallet_address]',\n ].includes(element.name) &&\n hideWalletAddressField ? null : (\n <React.Fragment key={element.uniqueId}>\n <div\n className={`${\n element.className\n } ${props?.errors[element.name] ||\n ''}`}\n >\n {element.component ? (\n element.component\n ) : (\n <Field\n {...element}\n type={\n element.type === 'radio'\n ? undefined\n : element.type\n }\n setPhoneValidationIsLoading={\n element.type === 'phone'\n ? setPhoneValidationIsLoading\n : undefined\n }\n label={getFieldLabel(element)}\n validate={getValidateFunctions(\n element,\n states,\n props.values,\n props.errors\n )}\n setFieldValue={\n props.setFieldValue\n }\n onBlur={props.handleBlur}\n component={getFieldComponent(\n element\n )}\n selectOptions={\n element.name === 'country'\n ? _map(countries, item => ({\n value: item.id,\n label: item.name,\n }))\n : element.name === 'state'\n ? [\n { label: element.label, value: '', disabled: true },\n ...states,\n ]\n : element.selectOptions || []\n }\n theme={theme}\n defaultCountry={\n defaultCountry ||\n element.defaultCountry\n }\n dateFormat={element.format}\n isCountryCodeEditable={\n isCountryCodeEditable\n }\n />\n )}\n </div>\n </React.Fragment>\n )\n )}\n </div>\n </React.Fragment>\n )\n })}\n </React.Fragment>\n )\n })}\n {!_isEmpty(ticketHoldersFields.fields) && (\n <div className=\"ticket-holders-fields\">\n <h2>{ticketHoldersFields.label}</h2>\n {_map(ticketsQuantity, (_item, index) => (\n <div key={_item}>\n <h5>Ticket {index + 1}</h5>\n {_map(ticketHoldersFields.fields, group => {\n const { groupClassname, groupItems } = group\n return (\n <div key={group.id}>\n <div className={groupClassname}>\n {_map(groupItems, element => {\n if (\n _includes(\n ['holderFirstName', 'holderLastName'],\n element.name\n )\n ) {\n element.required = showTicketHolders\n }\n return (\n <div\n className={element.className}\n key={element.name}\n >\n <Field\n {...element}\n type={\n element.type === 'radio'\n ? undefined\n : element.type\n }\n name={`${element.name}-${index}`}\n label={getFieldLabel(element)}\n component={getFieldComponent(element)}\n validate={combineValidators(\n element.required\n ? requiredValidator\n : () =>\n props.errors[\n `${element.name}-${index}`\n ],\n element.onValidate\n ? element.onValidate\n : () =>\n props.errors[\n `${element.name}-${index}`\n ]\n )}\n setPhoneValidationIsLoading={\n setPhoneValidationIsLoading\n }\n defaultCountry={\n defaultCountry ||\n element.defaultCountry\n }\n isCountryCodeEditable={\n isCountryCodeEditable\n }\n />\n </div>\n )\n })}\n </div>\n </div>\n )\n })}\n </div>\n ))}\n </div>\n )}\n <div className=\"button-container\">\n <Button\n type=\"submit\"\n variant=\"contained\"\n className=\"login-register-button\"\n disabled={props.isSubmitting || phoneValidationIsLoading}\n >\n {props.isSubmitting ? (\n <CircularProgress size={26} />\n ) : (\n buttonName\n )}\n </Button>\n </div>\n </div>\n </Form>\n )}\n </Formik>\n )}\n {showModalLogin && (\n <LoginModal\n logo={logo}\n onClose={() => {\n setShowModalLogin(false)\n }}\n onLogin={() => {\n setShowModalLogin(false)\n setUserExpired(false)\n onLoginSuccess()\n }}\n alreadyHasUser={alreadyHasUser}\n userExpired={userExpired}\n onAuthorizeSuccess={onAuthorizeSuccess}\n onAuthorizeError={onAuthorizeError}\n onGetProfileDataSuccess={(data: any) => {\n fetchCart()\n onGetProfileDataSuccess(data)\n }}\n onGetProfileDataError={onGetProfileDataError}\n showSignUpButton={showSignUpButton}\n showForgotPasswordButton={showForgotPasswordButton}\n onForgotPassword={() => {\n setShowModalLogin(false)\n setShowModalForgotPassword(true)\n }}\n onSignup={() => {\n setShowModalLogin(false)\n setShowModalSignup(true)\n }}\n showPoweredByImage={showPoweredByImage}\n />\n )}\n {showModalSignup && (\n <SignupModal\n onClose={() => {\n setShowModalSignup(false)\n }}\n onLogin={() => {\n setShowModalSignup(false)\n setShowModalLogin(true)\n }}\n onRegisterSuccess={onRegisterSuccess}\n onRegisterError={onRegisterError}\n showPoweredByImage={showPoweredByImage}\n />\n )}\n {showModalForgotPassword && (\n <ForgotPasswordModal\n onClose={() => {\n setShowModalForgotPassword(false)\n }}\n onLogin={() => {\n setShowModalForgotPassword(false)\n setShowModalLogin(true)\n }}\n onForgotPasswordSuccess={onForgotPasswordSuccess}\n onForgotPasswordError={onForgotPasswordError}\n showPoweredByImage={showPoweredByImage}\n />\n )}\n <VerificationPendingModal\n message={pendingVerificationMessage}\n onClose={() => {\n onPendingVerification()\n }}\n />\n </ThemeProvider>\n )\n }\n)\n","export const currencyNormalizerCreator = (\n value: string | number,\n currency: string\n) => (!value ? '' : `${getCurrencySymbolByCurrency(currency)} ${value}`)\n\nexport const createFixedFloatNormalizer = (fixedValue: number) => (\n value: string | number\n) => (value || `${value}` === '0' ? (+value).toFixed(fixedValue) : '')\n\nexport const getCurrencySymbolByCurrency = (currency = '') => {\n switch (currency) {\n case 'GBP':\n return '£'\n case 'EUR':\n return '€'\n case 'INR':\n return '₹'\n case 'JMD':\n return 'J$'\n case 'NZD':\n return 'NZ$'\n case 'MYR':\n return 'RM'\n case 'MXN':\n return 'Mex$'\n case 'SGD':\n return 'S$'\n case 'AUD':\n return 'A$'\n case 'ZAR':\n return 'R'\n case 'ke':\n return 'Ksh'\n case 'TRY':\n return '₺'\n case 'CAD':\n return 'CA$'\n case 'THB':\n return '฿'\n case 'ISK':\n return 'Kr'\n case 'SEK':\n return 'kr'\n default:\n return 'US$'\n }\n}\n\nexport const removePlusSign = (string = '') => string.replace('+', '')\n","import './style.css'\n\nimport CircularProgress from '@mui/material/CircularProgress'\nimport {\n CardCvcElement,\n CardExpiryElement,\n CardNumberElement,\n useElements,\n useStripe,\n} from '@stripe/react-stripe-js'\nimport { StripeCardNumberElementOptions } from '@stripe/stripe-js'\nimport _get from 'lodash/get'\nimport _identity from 'lodash/identity'\nimport React, { useEffect, useState } from 'react'\n\nimport { getCurrencySymbolByCurrency } from '../../normalizers'\nimport { CheckboxField } from '../common/index'\n\nconst options: StripeCardNumberElementOptions = {\n style: {\n base: {\n backgroundColor: '#000',\n fontSize: '18px',\n color: '#ffffff',\n letterSpacing: '1px',\n ':-webkit-autofill': {\n color: '#ffffff',\n },\n '::placeholder': {\n color: 'rgba(201, 201, 201, 0.5)',\n },\n },\n invalid: {\n color: '#E53935',\n },\n },\n}\n\nexport interface ICheckoutForm {\n total: string;\n currency: string;\n onSubmit: (error: any) => Promise<any>;\n error?: string | null;\n stripeCardOptions?: StripeCardNumberElementOptions;\n stripe_client_secret: string;\n billing_info: { [key: string]: any };\n isLoading: any;\n handleSetLoading: (loading: any) => void;\n conditions: any;\n disableZipSection: boolean;\n paymentButtonText?: string;\n}\n\ninterface AddressTypes {\n city: string;\n line1: string;\n state: string;\n postal_code?: string;\n}\n\nconst CheckoutForm = ({\n total,\n onSubmit = _identity,\n stripeCardOptions = {},\n error = null,\n stripe_client_secret,\n currency,\n billing_info,\n isLoading = false,\n handleSetLoading = () => {},\n conditions = [],\n disableZipSection,\n paymentButtonText,\n}: ICheckoutForm) => {\n const stripe = useStripe()\n const elements = useElements()\n const [postalCode, setPostalCode] = useState<any>('')\n const [stripeError, setStripeError] = useState<any>(null)\n const [checkboxes, setCheckboxes] = useState<any>([])\n const [allowSubmit, setAllowSubmit] = useState(false)\n\n const handleSubmit = async (event: React.SyntheticEvent) => {\n setStripeError(null)\n try {\n event.preventDefault()\n\n if (!postalCode && !disableZipSection) {\n setStripeError('Please enter your zip code.')\n handleSetLoading(false)\n return\n }\n\n if (!stripe || !elements) {\n // Stripe.js has not loaded yet. Make sure to disable\n // form submission until Stripe.js has loaded.\n handleSetLoading(false)\n return\n }\n\n const card = elements.getElement(CardNumberElement)\n\n const address: AddressTypes = {\n city: billing_info.city,\n line1: billing_info.street_address,\n state: billing_info.state,\n }\n\n if (!disableZipSection) {\n address.postal_code = postalCode\n }\n\n const paymentMethodReq = await stripe.createPaymentMethod({\n type: 'card',\n card: card || { token: '' },\n billing_details: {\n address,\n },\n })\n\n if (paymentMethodReq.error) {\n setStripeError(paymentMethodReq.error.message || null)\n handleSetLoading(false)\n return\n }\n\n handleSetLoading(true)\n const { error } = await stripe.confirmCardPayment(stripe_client_secret, {\n payment_method: paymentMethodReq.paymentMethod.id,\n })\n\n if (error) {\n setStripeError(error.message)\n handleSetLoading(false)\n return\n }\n\n onSubmit(null)\n } catch (e) {\n onSubmit(e)\n }\n }\n\n const handleCheckboxes = (e: any) => {\n const checkbox = e.target\n const updatedCheckedState = checkboxes.map((item: any) => {\n const value = item.id === checkbox.name ? !item.checked : item.checked\n return {\n ...item,\n checked: value,\n }\n })\n setCheckboxes(updatedCheckedState)\n }\n\n const onChangePostalCode = (e: any) => {\n setPostalCode(e.target.value)\n }\n\n useEffect(() => {\n if (typeof window !== 'undefined') {\n const userData = JSON.parse(\n window.localStorage.getItem('user_data') || ''\n )\n const zipCode = _get(userData, 'zip', '')\n zipCode && setPostalCode(zipCode)\n }\n }, [])\n\n useEffect(() => {\n if (conditions.length) {\n setCheckboxes(conditions)\n }\n }, [conditions])\n\n useEffect(() => {\n if (checkboxes.length) {\n const allChecked = checkboxes.every((item: any) => item?.checked === true)\n setAllowSubmit(allChecked)\n } else {\n setAllowSubmit(true)\n }\n }, [checkboxes])\n\n const buttonIsDiabled = !stripe || !!error || isLoading || !allowSubmit\n\n return (\n <div className=\"stripe_payment_container\">\n {!!stripeError && (\n <div className=\"checkout_error_block\">{stripeError}</div>\n )}\n <form onSubmit={handleSubmit}>\n <div className=\"card_form_inner\">\n <div className=\"card_number_element\">\n <span className=\"card_label_text\">Card number</span>\n <CardNumberElement\n options={{ ...options, ...stripeCardOptions }}\n onReady={_identity}\n onChange={_identity}\n onBlur={_identity}\n onFocus={_identity}\n />\n </div>\n <div className=\"elements\">\n <div className=\"expiration_element\">\n <span className=\"card_label_text\">Expiration date</span>\n <CardExpiryElement\n options={{ ...options, ...stripeCardOptions }}\n />\n </div>\n <div className=\"cvc_element\">\n <span className=\"card_label_text\">CVC</span>\n <CardCvcElement options={{ ...options, ...stripeCardOptions }} />\n </div>\n </div>\n {!disableZipSection && (\n <div className=\"zip_element\">\n <p className=\"card_label_text\">ZIP</p>\n <input\n type=\"text\"\n value={postalCode}\n onChange={onChangePostalCode}\n placeholder=\"ZIP\"\n />\n </div>\n )}\n </div>\n {checkboxes?.map((checkbox: any) => (\n <div\n className={'billing-info-container__singleField'}\n key={checkbox.id}\n >\n <div className=\"conditions-block\">\n <CheckboxField\n name={checkbox.id}\n label={checkbox.text}\n required={true}\n onChange={handleCheckboxes}\n checked={checkbox.checked}\n />\n </div>\n </div>\n ))}\n <div\n className={`payment_button ${\n buttonIsDiabled ? 'disabled-payment-button' : ''\n }`}\n >\n <button disabled={buttonIsDiabled} type=\"submit\">\n {isLoading ? (\n <CircularProgress size={26} />\n ) : (\n `${\n paymentButtonText ? paymentButtonText : 'Pay'\n } ${getCurrencySymbolByCurrency(currency)}${total}`\n )}\n </button>\n </div>\n </form>\n </div>\n )\n}\n\nexport default CheckoutForm\n","import './style.css'\n\nimport { ThemeOptions } from '@mui/material'\nimport Alert from '@mui/material/Alert'\nimport CircularProgress from '@mui/material/CircularProgress'\nimport Container from '@mui/material/Container'\nimport { createTheme, ThemeProvider } from '@mui/material/styles'\nimport { CSSProperties } from '@mui/styles'\nimport { Elements } from '@stripe/react-stripe-js'\nimport {\n loadStripe,\n StripeCardNumberElementOptions,\n StripeConstructorOptions,\n StripeElementsOptions,\n} from '@stripe/stripe-js'\nimport { AxiosError } from 'axios'\nimport _get from 'lodash/get'\nimport _identity from 'lodash/identity'\nimport _isEmpty from 'lodash/isEmpty'\nimport _map from 'lodash/map'\nimport { nanoid } from 'nanoid'\nimport React, { useEffect, useState } from 'react'\n\nimport {\n getConditions,\n getPaymentData,\n handleFreeSuccess,\n handlePaymentSuccess,\n} from '../../api'\nimport { usePixel } from '../../hooks/usePixel'\nimport {\n createFixedFloatNormalizer,\n currencyNormalizerCreator,\n} from '../../normalizers'\nimport { IAddOn, IOrderData, IPaymentField } from '../../types'\nimport { CONFIGS, isBrowser } from '../../utils'\nimport { getQueryVariable } from '../../utils/getQueryVariable'\nimport { Loader } from '../common/index'\nimport StripePayment from '../stripePayment'\nimport TimerWidget from '../timerWidget'\n\nconst publishableKey = CONFIGS.STRIPE_PUBLISHABLE_KEY || ''\n\nconst getStripePromise = (reviewData: any) => {\n const stripePublishableKey =\n _get(reviewData, 'payment_method.stripe_publishable_key') || publishableKey\n const stripeAccount = _get(\n reviewData,\n 'payment_method.stripe_connected_account'\n )\n\n const options: StripeConstructorOptions = {}\n if (stripeAccount) {\n options.stripeAccount = stripeAccount\n }\n\n return loadStripe(stripePublishableKey, options)\n}\nexport interface IPaymentPage {\n paymentFields: IPaymentField[];\n handlePayment: any;\n checkoutData: any;\n formTitle?: string;\n errorText?: string;\n onErrorClose?: () => void;\n onGetPaymentDataSuccess: (value: any) => void;\n onGetPaymentDataError: (value: AxiosError) => void;\n onPaymentError: (value: AxiosError) => void;\n stripeCardOptions?: StripeCardNumberElementOptions;\n disableZipSection: boolean;\n themeOptions?: ThemeOptions & {\n input?: CSSProperties;\n checkbox?: CSSProperties;\n };\n elementsOptions?: StripeElementsOptions;\n onCountdownFinish?: () => void;\n enableTimer?: boolean;\n enablePaymentPlan?: boolean;\n paymentButtonText?: string;\n paymentInfoLabel?: string;\n orderInfoLabel?: string;\n}\n\nconst initialOrderValues: IOrderData = {\n id: '',\n product_name: '',\n ticketType: '',\n quantity: '',\n price: '',\n total: '',\n currency: '',\n guest_count: '',\n pay_now: '',\n add_ons: [] as IAddOn[],\n}\n\nconst initialReviewValues = {\n order_details: {\n order_hash: '',\n },\n payment_method: {\n stripe_client_secret: '',\n },\n billing_info: {},\n}\n\nexport const PaymentContainer = ({\n paymentFields = [],\n handlePayment,\n formTitle = 'Get Your Tickets',\n errorText,\n checkoutData,\n onErrorClose = _identity,\n onGetPaymentDataSuccess = _identity,\n onGetPaymentDataError = _identity,\n onPaymentError = _identity,\n stripeCardOptions = {},\n disableZipSection = false,\n themeOptions,\n elementsOptions,\n onCountdownFinish = _identity,\n enableTimer = false,\n enablePaymentPlan = false,\n paymentButtonText,\n orderInfoLabel = 'Order Review',\n paymentInfoLabel = 'Order Confirmation',\n}: IPaymentPage) => {\n const [reviewData, setReviewData] = useState(initialReviewValues)\n const [orderData, setOrderData] = useState(initialOrderValues)\n const [error, setError] = useState(null)\n const [showPaymentPlanSection, setShowPaymentPlanSection] = useState(false)\n const [paymentIsLoading, setPaymentIsLoading] = useState(false)\n const [paymentDataIsLoading, setPaymentDataIsLoading] = useState(true)\n const [conditions, setConditions] = useState<{ id: string, text: string }[]>(\n []\n )\n\n const showFormTitle = Boolean(formTitle)\n const showErrorText = Boolean(errorText)\n\n const eventId =\n getQueryVariable('event_id') || _get(reviewData, 'cart[0].product_id') || ''\n const { hash, total } = checkoutData\n const isFreeTickets =\n (!Number(total) && !Number(orderData.total)) || !Number(orderData.pay_now)\n\n const pageUrl = isBrowser ? window.location.href.split('?')[0] : ''\n usePixel(eventId, { page: 'review', pageUrl })\n\n useEffect(() => {\n (async () => {\n try {\n const response = await getPaymentData(hash)\n if (response.data.success) {\n const attributes = _get(response, 'data.data.attributes')\n setReviewData(attributes)\n const { cart, order_details } = attributes\n const {\n tickets: [ticket],\n } = order_details\n\n const orderDataArray = _map(order_details.tickets, item => ({\n product_name: cart[0]?.product_name,\n ticketType: item?.name,\n quantity: item?.guest_count,\n price: item?.price,\n id: item.id,\n count: item?.quantity,\n }))\n\n const orderData = {\n id: order_details?.id,\n product_name: cart[0]?.product_name,\n ticketType: ticket?.name,\n quantity: ticket?.quantity,\n price: ticket?.price,\n total: order_details?.total,\n currency: order_details?.currency,\n add_ons: order_details?.add_ons || [],\n pay_now: order_details?.pay_now || '',\n guest_count: order_details?.guest_count || null,\n debt: order_details?.debt || null,\n tableTypes: orderDataArray,\n }\n setOrderData(orderData)\n onGetPaymentDataSuccess(response.data)\n }\n } catch (e) {\n setError(_get(e, 'response.data.message'))\n onGetPaymentDataError(e.response)\n } finally {\n setPaymentDataIsLoading(false)\n }\n })()\n }, [checkoutData])\n\n //just once\n useEffect(() => {\n // fetch conditions data\n const fetchConditions = async () => {\n if (eventId) {\n const res = await getConditions(eventId)\n const conditionsInfo = _get(res, 'data.data.attributes')\n setConditions(\n conditionsInfo\n ? conditionsInfo.map((item: string) => ({\n id: nanoid(),\n text: item,\n checked: false,\n }))\n : []\n )\n }\n }\n fetchConditions()\n }, [])\n\n // 1. get payment data ---> v1/order/${hash}/review/ done\n // 2. handle payment ---> v1/order/${orderHash}/pay/\n // 3. redirect to confirmation page\n const handlePaymentMiddleWare = async (error: any) => {\n try {\n if (error) {\n throw error\n }\n const {\n order_details: { order_hash },\n } = reviewData\n const paymentSuccessResponse = isFreeTickets\n ? await handleFreeSuccess(order_hash)\n : await handlePaymentSuccess(order_hash)\n if (paymentSuccessResponse.status === 200) {\n handlePayment(paymentSuccessResponse)\n setPaymentIsLoading(false)\n\n // clear seat-map related data from localStorage\n localStorage.removeItem('reservationData')\n localStorage.removeItem(`reservationStart-${eventId}`)\n localStorage.removeItem('ownReservations')\n localStorage.removeItem('tierId')\n\n const isWindowDefined = typeof window !== \"undefined\"\n if (isWindowDefined) {\n (window as any)?.dataLayer.push({\n 'event': 'Purchase',\n 'orderValue': orderData.total,\n 'orderCurrency': orderData.currency,\n 'orderId': orderData.id\n })\n }\n }\n } catch (e) {\n setError(_get(e, 'response.data.message'))\n setPaymentIsLoading(false)\n onPaymentError(e.response)\n }\n }\n\n const themeMui = createTheme(themeOptions)\n const hasTableTypes = Boolean(Number(orderData.guest_count))\n const paymentFieldsData = hasTableTypes\n ? [\n {\n label: 'Event',\n id: 'product_name',\n },\n {\n label: '',\n id: 'tableTypes',\n },\n {\n label: 'Total (incl. fees, card processing and taxes)',\n id: 'total',\n normalizer: (value: string, currency: any) =>\n currencyNormalizerCreator(\n createFixedFloatNormalizer(2)(parseFloat(value)),\n currency\n ),\n },\n {\n label: 'Pay Now',\n id: 'pay_now',\n normalizer: (value: string, currency: any) =>\n currencyNormalizerCreator(\n createFixedFloatNormalizer(2)(parseFloat(value)),\n currency\n ),\n },\n {\n label: 'Pay On Check-in',\n id: 'debt',\n normalizer: (value: string, currency: any) =>\n currencyNormalizerCreator(\n createFixedFloatNormalizer(2)(parseFloat(value)),\n currency\n ),\n },\n ]\n : paymentFields\n const isTable = orderData?.guest_count\n return (\n <ThemeProvider theme={themeMui}>\n <div className=\"payment_page\">\n {enableTimer && (\n <TimerWidget\n expires_at={_get(reviewData, 'expires_at', 0)}\n buyLoading={paymentIsLoading}\n onCountdownFinish={onCountdownFinish}\n />\n )}\n {error && (\n <Alert severity=\"error\" onClose={onErrorClose} variant=\"filled\">\n {error}\n </Alert>\n )}\n {paymentDataIsLoading && <Loader />}\n {!paymentDataIsLoading && (\n <Container maxWidth=\"md\">\n {showFormTitle && (\n <h1>{isTable ? 'Get Your Tables' : formTitle}</h1>\n )}\n <div className=\"order_info_text\">{orderInfoLabel}</div>\n <div\n className=\"order_info_section\"\n style={{ display: hasTableTypes ? 'block' : 'grid' }}\n >\n {_map(paymentFieldsData, field => {\n const {\n id,\n label,\n className = '',\n normalizer = _identity,\n } = field\n const { currency } = orderData\n const value = orderData[id as keyof IOrderData]\n let component = null\n\n if (field.id === 'add_ons' && _isEmpty(value)) {\n return false\n }\n\n if (field.id === 'tableTypes') {\n const valueArray = value as Array<any>\n\n component = (\n <div\n key={id}\n className=\"order_info_block\"\n style={{\n display: 'flex',\n flexDirection: 'column',\n }}\n >\n {_map(valueArray, tableTypeItem => (\n <div\n key={tableTypeItem.id}\n style={{\n display: 'grid',\n gridTemplateColumns: '33% 33% 33%',\n gridColumnGap: '10%',\n }}\n >\n <div className=\"order_info_block\">\n <div className=\"order_info_title\">Table Type</div>\n <div className={`${className} order_info_text`}>\n {tableTypeItem.ticketType}\n </div>\n </div>\n <div className=\"order_info_block\">\n <div className=\"order_info_title\">\n Number of Tables\n </div>\n <div className={`${className} order_info_text`}>\n {tableTypeItem.count}\n </div>\n </div>\n <div className=\"order_info_block\">\n <div className=\"order_info_title\">Guest Count</div>\n <div className={`${className} order_info_text`}>\n {tableTypeItem.quantity}\n </div>\n </div>\n </div>\n ))}\n </div>\n )\n }\n\n return (\n component || (\n <div key={id} className=\"order_info_block\">\n <div className=\"order_info_title\">{label}</div>\n <div className={`${className} order_info_text`}>\n {typeof value === 'string'\n ? normalizer(value, currency)\n : _map(value, item => (\n <div key={item.id} className=\"add-on-container\">\n <span>{item.quantity}</span>\n <span className=\"add-on-x\">{' x '}</span>\n <span>\n {item.groupName ? item.groupName + ' - ' : ''}\n </span>\n <span>{item.name}</span>\n <span>{' - '}</span>\n <span>\n {currencyNormalizerCreator(\n createFixedFloatNormalizer(2)(\n parseFloat(item.price)\n ),\n currency\n )}\n </span>\n <span className=\"add-on-each\">{' each'}</span>\n </div>\n ))}\n </div>\n </div>\n )\n )\n })}\n </div>\n {enablePaymentPlan && (\n <div className=\"payment_toggle\">\n <label htmlFor=\"togBtn\" className=\"switch\">\n <input\n type=\"checkbox\"\n id=\"togBtn\"\n disabled={true}\n onChange={() =>\n setShowPaymentPlanSection(!showPaymentPlanSection)\n }\n />\n <div className=\"slider round\" />\n <span className=\"tog_text\">\n Click to checkout using Payment Plan\n </span>\n </label>\n </div>\n )}\n {showPaymentPlanSection && (\n <div className=\"payment_plan\">\n <h2>PAYMENT PLAN</h2>\n <div className=\"plan_block\">\n <h3>Mbrand Payment Plan Terms</h3>\n <p>\n By clicking on the “Confirm Payment Plan” button, you are\n starting your payment plan of 2 payments of $115.00, which\n will be drawn from your account every 2 weeks, with the\n first payment taken later today.\n </p>\n <p>\n This includes a non-refundable admin fee of $3.00 per\n payment.\n </p>\n <p className=\"payment_note\">\n NOTE: If today’s payment fails, your payment plan will not\n activate, and your tickets will not be issued until you\n complete your final payment.\n </p>\n <p>\n If you do not complete your payements, your order will be\n canceled. Your first payment of $115.00, plus the\n non-refundable admin fee of $3.00 will not be refunded.\n </p>\n <p>\n Your payment will proceed with the card ending in **** 4242.\n </p>\n </div>\n </div>\n )}\n {!isFreeTickets ? (\n <div className=\"payment_info\">\n <div className=\"payment_info_label\">{paymentInfoLabel}</div>\n {showErrorText && (\n <p className=\"payment_info__error\">{errorText}</p>\n )}\n <div>\n <Elements\n stripe={getStripePromise(reviewData)}\n options={elementsOptions}\n >\n <StripePayment\n stripe_client_secret={_get(\n reviewData,\n 'payment_method.stripe_client_secret'\n )}\n total={\n orderData.guest_count\n ? orderData.pay_now\n : orderData.total\n }\n onSubmit={handlePaymentMiddleWare}\n error={error}\n currency={orderData.currency}\n billing_info={reviewData.billing_info}\n isLoading={paymentIsLoading}\n handleSetLoading={value => setPaymentIsLoading(value)}\n conditions={conditions}\n stripeCardOptions={stripeCardOptions}\n disableZipSection={disableZipSection}\n paymentButtonText={paymentButtonText}\n />\n </Elements>\n </div>\n </div>\n ) : (\n <div\n className={`payment_button ${\n paymentIsLoading ? 'disabled-payment-button' : ''\n }`}\n >\n <button\n disabled={paymentIsLoading}\n type=\"button\"\n onClick={() => {\n setPaymentIsLoading(true)\n handlePaymentMiddleWare(null)\n }}\n >\n {paymentIsLoading ? (\n <CircularProgress size={26} />\n ) : (\n 'Complete Registration'\n )}\n </button>\n </div>\n )}\n </Container>\n )}\n </div>\n </ThemeProvider>\n )\n}\n","import {\n FacebookShareButton,\n FacebookMessengerShareButton,\n TwitterShareButton,\n LinkedinShareButton,\n PinterestShareButton,\n VKShareButton,\n OKShareButton,\n TelegramShareButton,\n WhatsappShareButton,\n RedditShareButton,\n TumblrShareButton,\n MailruShareButton,\n EmailShareButton,\n LivejournalShareButton,\n ViberShareButton,\n WorkplaceShareButton,\n LineShareButton,\n PocketShareButton,\n InstapaperShareButton,\n WeiboShareButton,\n HatenaShareButton,\n FacebookIcon,\n FacebookMessengerIcon,\n TwitterIcon,\n LinkedinIcon,\n PinterestIcon,\n VKIcon,\n OKIcon,\n TelegramIcon,\n WhatsappIcon,\n RedditIcon,\n TumblrIcon,\n MailruIcon,\n EmailIcon,\n LivejournalIcon,\n ViberIcon,\n WorkplaceIcon,\n LineIcon,\n PocketIcon,\n InstapaperIcon,\n WeiboIcon,\n HatenaIcon,\n} from 'react-share'\n\nconst config: any = {\n facebook: { component: FacebookShareButton, icon: FacebookIcon },\n messenger: { component: FacebookMessengerShareButton, icon: FacebookMessengerIcon },\n twitter: { component: TwitterShareButton, icon: TwitterIcon },\n linkedin: { component: LinkedinShareButton, icon: LinkedinIcon },\n pinterest: { component: PinterestShareButton, icon: PinterestIcon },\n vk: { component: VKShareButton, icon: VKIcon },\n ok: { component: OKShareButton, icon: OKIcon },\n telegram: { component: TelegramShareButton, icon: TelegramIcon },\n whatsapp: { component: WhatsappShareButton, icon: WhatsappIcon },\n reddit: { component: RedditShareButton, icon: RedditIcon },\n tumblr: { component: TumblrShareButton, icon: TumblrIcon },\n mailru: { component: MailruShareButton, icon: MailruIcon },\n email: { component: EmailShareButton, icon: EmailIcon },\n livejournal: { component: LivejournalShareButton, icon: LivejournalIcon },\n viber: { component: ViberShareButton, icon: ViberIcon },\n workplace: { component: WorkplaceShareButton, icon: WorkplaceIcon },\n line: { component: LineShareButton, icon: LineIcon },\n pocket: { component: PocketShareButton, icon: PocketIcon },\n instapaper: { component: InstapaperShareButton, icon: InstapaperIcon },\n weibo: { component: WeiboShareButton, icon: WeiboIcon },\n hatena: { component: HatenaShareButton, icon: HatenaIcon },\n}\n\nexport default function (key: string) {\n return config[key]\n}\n","import React from 'react'\n\nimport config from './config'\nimport { IShareButton } from './index'\n\nconst SocialComponent = ({\n mainLabel,\n subLabel,\n platform,\n shareData,\n}: IShareButton) => {\n const Component = config(platform)?.component\n const Icon = config(platform)?.icon\n\n return (\n <>\n {Component && (\n <Component {...shareData}>\n <div className=\"social-media-sharing\">\n <div className=\"share-icon\">\n <Icon size={32} round />\n </div>\n <span className=\"share-text\">\n {mainLabel}\n <br /> {subLabel}\n </span>\n </div>\n </Component>\n )}\n </>\n )\n}\n\ninterface SocialButtonsTypes {\n shareLink: string;\n name: string;\n appId: string;\n showDefaultShareButtons: boolean;\n shareButtons: IShareButton[];\n clientLabel?: string;\n showReferralsInfoText?: boolean;\n}\n\nconst SocialButtons = ({\n showDefaultShareButtons,\n shareLink,\n name,\n appId,\n shareButtons,\n clientLabel,\n showReferralsInfoText,\n}: SocialButtonsTypes) => (\n <>\n <div className=\"convenient_buttons\">\n or use one of these convenient buttons:\n </div>\n <div className=\"social-media-btns\">\n {showDefaultShareButtons && (\n <>\n <SocialComponent\n mainLabel=\"Share on\"\n subLabel=\"Facebook\"\n platform=\"facebook\"\n shareData={{\n quote: name,\n url: shareLink,\n }}\n />\n <SocialComponent\n mainLabel=\"Tweet to your\"\n subLabel=\"Followers\"\n platform=\"twitter\"\n shareData={{\n title: name,\n url: shareLink,\n }}\n />\n <SocialComponent\n mainLabel=\"Message friends on\"\n subLabel=\"Facebook\"\n platform=\"messenger\"\n shareData={{\n appId,\n url: shareLink,\n }}\n />\n <SocialComponent\n mainLabel=\"Message friends on\"\n subLabel=\"Whatsapp\"\n platform=\"whatsapp\"\n shareData={{\n title: name,\n url: shareLink,\n }}\n />\n </>\n )}\n {shareButtons.map((shareButton: IShareButton, index: number) => (\n <SocialComponent key={index} {...shareButton} />\n ))}\n </div>\n {(showDefaultShareButtons || shareButtons.length) && (\n <p>\n We <strong>never</strong> post on Facebook without your permission!\n </p>\n )}\n {(showReferralsInfoText || Boolean(clientLabel)) && (\n <p className=\"note-message\">\n <span>\n *Please note, only purchases made from a different{' '}\n {clientLabel || 'Ticket Fairy'} account can count towards your\n referrals\n </span>\n <span>\n {' '}\n so please make sure you ask your friends to buy their own tickets\n using their own {clientLabel || 'Ticket Fairy'} account!\n </span>\n </p>\n )}\n </>\n)\n\nexport default SocialButtons\n","import Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport CircularProgress from '@mui/material/CircularProgress'\nimport Modal from '@mui/material/Modal'\nimport _identity from 'lodash/identity'\nimport React, { FC } from 'react'\n\ninterface Props {\n message: string;\n loading?: boolean;\n hideCancelBtn?: boolean;\n onClose: () => void;\n onConfirm: () => void;\n}\n\nconst style: React.CSSProperties = {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n minWidth: 480,\n backgroundColor: '#e3e3e3',\n border: '1px solid white',\n outline: 'none',\n padding: '14px',\n maxHeight: '85vh',\n overflow: 'auto',\n}\n\nconst ConfirmModal: FC<Props> = ({\n message = '',\n loading = false,\n hideCancelBtn = false,\n onClose = _identity,\n onConfirm = _identity,\n}) => (\n <Modal\n open={true}\n onClose={onClose}\n aria-labelledby=\"modal-modal-title\"\n aria-describedby=\"modal-modal-description\"\n className=\"confirm-modal\"\n >\n <Box style={style}>\n <p>{message}</p>\n <div className=\"footer\">\n {!hideCancelBtn && (\n <Button onClick={onClose} disabled={loading}>\n Cancel\n </Button>\n )}\n <Button onClick={onConfirm}>\n {loading ? <CircularProgress size=\"22px\" /> : 'OK'}\n </Button>\n </div>\n </Box>\n </Modal>\n)\n\nexport default ConfirmModal\n","import React, { useEffect, useState } from 'react'\nimport moment from 'moment-timezone'\nimport './style.css'\n\ninterface CountdownTypes {\n startDate: string;\n timezone?: string;\n title?: string;\n message?: string;\n showMessage?: boolean;\n disableLeadingZero?: boolean;\n callback?: () => void;\n isLoggedIn?: boolean;\n}\n\nconst isTimeExpired = (startDate: string, timezone: string) => {\n return !moment(startDate).isAfter(moment.tz(moment(), timezone).format('YYYY-MM-DD HH:mm:ss'))\n}\n\nfunction Countdown({\n startDate,\n timezone = moment.tz.guess(),\n title = '',\n message = '',\n showMessage = false,\n disableLeadingZero = false,\n callback = () => {},\n isLoggedIn\n}: CountdownTypes) {\n const [duration, setDuration] = useState('')\n const [timeExpired, setTimeExpired] = useState(false)\n\n useEffect(() => {\n setTimeExpired(isTimeExpired(startDate, timezone))\n }, [])\n\n useEffect(() => {\n let timer: any;\n\n if(!timeExpired) {\n timer = setInterval(() => {\n if(isTimeExpired(startDate, timezone)) {\n clearInterval(timer)\n setTimeExpired(true)\n callback()\n return\n }\n\n const currentDate = moment.tz(moment(), timezone).format('YYYY-MM-DD HH:mm:ss')\n const diffTime = moment(startDate).diff(currentDate)\n const duration = moment.duration(diffTime)\n const dateArr: any = {\n year: duration.years(),\n month: duration.months(),\n day: duration.days(),\n hour: duration.hours(),\n minute: duration.minutes(),\n second: duration.seconds(),\n }\n let timeLeft = ''\n \n for(let date in dateArr) {\n const unit = dateArr[date] === 1 ? date : date + 's'\n let val = dateArr[date]\n\n if (!disableLeadingZero && String(dateArr[date]).length === 1) {\n val = '0' + dateArr[date]\n }\n\n if(timeLeft) {\n timeLeft += `, ${val} ${unit}`\n } else if(dateArr[date]) {\n timeLeft += `${val} ${unit}`\n }\n }\n \n setDuration(timeLeft)\n }, 1000)\n }\n return () => {\n clearInterval(timer)\n }\n }, [timeExpired])\n\n return (\n <>\n {!timeExpired && duration && (\n <div className={`countdown ${!isLoggedIn ? 'countdown-on-bottom' : ''}`}>\n <div>\n <p className='title'>{title}</p>\n <p>{duration}</p>\n </div>\n {showMessage && <p className='message'>{message}</p>}\n </div>\n )}\n </>\n )\n}\n\nexport default Countdown\n","import React, { useState } from 'react'\nimport Button from '@mui/material/Button'\nimport CircularProgress from '@mui/material/CircularProgress'\nimport { Field, Form, Formik } from 'formik'\nimport { CustomField } from '../common/index'\nimport { addToWaitingList } from '../../api'\nimport {\n combineValidators,\n requiredValidator,\n emailValidator,\n} from '../../validators'\nimport { ErrorFocus } from '../../utils/formikErrorFocus'\n\nimport './style.css'\n\ninterface WaitingListProps {\n tickets: any;\n eventId: number;\n defaultMaxQuantity: number;\n}\n\ninterface WaitingListFields {\n ticketTypeId: string;\n quantity: string;\n firstName: string;\n lastName: string;\n email: string;\n}\n\nconst generateQuantity = (n: number) => {\n const quantityList = []\n for (let i = 1; i <= n; i++) {\n quantityList.push({ label: i, value: i })\n }\n return quantityList\n}\n \nconst WaitingList = ({ tickets = {}, eventId, defaultMaxQuantity = 10 }: WaitingListProps) => {\n const isWindowDefined = typeof window !== 'undefined'\n const userData =\n isWindowDefined && window.localStorage.getItem('user_data')\n ? JSON.parse(window.localStorage.getItem('user_data') || '')\n : {}\n\n const [showSuccessMessage, setShowSuccessMessage] = useState(false)\n const [loading, setLoading] = useState(false)\n const ticketTypesList = Object.values(tickets).map((d: any) => ({\n label: d.displayName,\n value: d.id,\n }))\n\n const showTicketsField = Boolean(ticketTypesList.length)\n\n const handleSubmit = async (values: WaitingListFields) => {\n try {\n setLoading(true)\n const requestData = {\n data: {\n attributes: values,\n },\n }\n const { data } = await addToWaitingList(eventId, requestData)\n\n if (data.success) {\n setShowSuccessMessage(true)\n }\n } catch (error) {\n } finally {\n setLoading(false)\n }\n }\n\n return (\n <div className=\"waiting-list\">\n {showSuccessMessage ? (\n <div className=\"success-message\">\n <p className=\"added-success-message\">You've been added to the waiting list!</p>\n <p>You'll be notified if tickets become available.</p>\n </div>\n ) : (\n <>\n <h2>WAITING LIST</h2>\n <Formik\n initialValues={{\n ticketTypeId: '',\n quantity: '',\n firstName: userData.first_name || '',\n lastName: userData.last_name || '',\n email: userData.email || '',\n }}\n onSubmit={handleSubmit}\n >\n <Form>\n <ErrorFocus />\n {showTicketsField && (\n <>\n <div className=\"field-item\">\n <Field\n name=\"ticketTypeId\"\n label=\"Type of Ticket\"\n type=\"select\"\n component={CustomField}\n selectOptions={[\n { label: 'Type of Ticket', value: '', disabled: true },\n ...ticketTypesList,\n ]}\n />\n </div>\n <div className=\"field-item\">\n <Field\n name=\"quantity\"\n label=\"Quantity Requested\"\n type=\"select\"\n component={CustomField}\n selectOptions={[\n {\n label: 'Quantity Requested',\n value: '',\n disabled: true,\n },\n ...generateQuantity(defaultMaxQuantity ?? 10),\n ]}\n />\n </div>\n </>\n )}\n <div className=\"field-item\">\n <Field\n name=\"firstName\"\n label=\"First name\"\n validate={(value: string) =>\n requiredValidator(value, 'Please enter your First name')\n }\n component={CustomField}\n />\n </div>\n <div className=\"field-item\">\n <Field\n name=\"lastName\"\n label=\"Last name\"\n validate={(value: string) =>\n requiredValidator(value, 'Please enter your Last name')\n }\n component={CustomField}\n />\n </div>\n <div className=\"field-item\">\n <Field\n name=\"email\"\n label=\"Email\"\n validate={combineValidators(\n (value: string) =>\n requiredValidator(value, 'Please enter your Email'),\n (value: string) => emailValidator(value)\n )}\n component={CustomField}\n />\n </div>\n\n <Button\n type=\"submit\"\n variant=\"contained\"\n className=\"waiting-list-button\"\n >\n {loading ? (\n <CircularProgress size=\"22px\" />\n ) : (\n 'ADD TO WAITING LIST'\n )}\n </Button>\n </Form>\n </Formik>\n </>\n )}\n </div>\n )\n}\n\nexport default WaitingList\n","import React from 'react'\nimport Button from 'react-bootstrap/Button'\n\nexport interface IAccessCodeSectionProps {\n code: string;\n setCode: (value: string) => void;\n updateTickets: (value: boolean) => void;\n}\n\n// This section is seperate because additional changes layter may be applied to Access Code\n\nexport const AccessCodeSection = ({\n code,\n setCode,\n updateTickets\n}: IAccessCodeSectionProps) => {\n const isAccessCodeHasValue = !!code.trim()\n\n return (\n <div className=\"access-code-block\">\n <div className=\"access-code-block\">\n <p className=\"access-code-text\">\n Access code required\n </p>\n </div>\n <input\n className=\"access-code-input\"\n placeholder=\"\"\n onChange={e => {\n setCode(e.target.value)\n }}\n onKeyPress={event => {\n if (event.key === 'Enter' && isAccessCodeHasValue) {\n updateTickets(true)\n }\n }}\n />\n <Button\n className=\"access-submit-button\"\n onClick={() => {\n if (isAccessCodeHasValue) {\n updateTickets(true)\n }\n }}\n >\n ENTER\n </Button>\n </div>\n )\n}\n","import React from 'react'\nimport Button from 'react-bootstrap/Button'\nimport SVG from 'react-inlinesvg'\n\nimport DoneSvg from '../../assets/images/done.svg'\nimport XmarkSvg from '../../assets/images/xmark.svg'\n\nexport interface IPromoCodeSectionProps {\n code: string;\n codeIsApplied: boolean;\n showPromoInput: boolean;\n setCode: (value: string) => void;\n setShowPromoInput: (value: boolean) => void;\n updateTickets: (value: boolean, type: string) => void;\n setCodeIsApplied: (value: boolean) => void;\n codeIsInvalid: boolean;\n setCodeIsInvalid: (value: boolean) => void;\n promoText?: string;\n}\n\nexport const PromoCodeSection = ({\n code,\n codeIsApplied,\n showPromoInput,\n setCode,\n setShowPromoInput,\n updateTickets,\n setCodeIsApplied,\n codeIsInvalid,\n setCodeIsInvalid,\n promoText,\n}: IPromoCodeSectionProps) => {\n const isPromoCodeHasValue = !!code.trim()\n\n const renderInputField = () => (\n <div className=\"promo-code-block\">\n <div className=\"promo-code-block\">\n <p className=\"promo-code-text\">Promo code</p>\n </div>\n <input\n className=\"promo-code-input\"\n placeholder=\"\"\n onChange={e => {\n setCode(e.target.value)\n }}\n onKeyPress={event => {\n if (event.key === 'Enter' && isPromoCodeHasValue) {\n setShowPromoInput(false)\n updateTickets(true, 'promo')\n }\n }}\n />\n <Button\n className=\"promo-submit-button\"\n onClick={() => {\n if (isPromoCodeHasValue) {\n setShowPromoInput(false)\n updateTickets(true, 'promo')\n }\n }}\n >\n APPLY\n </Button>\n </div>\n )\n\n return (\n <div>\n {codeIsApplied ? (\n <div className=\"alert-info\">\n <SVG\n src={DoneSvg}\n preProcessor={code =>\n code.replace(/fill=\".*?\"/g, 'fill=\"currentColor\"')\n }\n />\n <p className=\"promo-code-success\">PROMO CODE APPLIED SUCCESSFULLY</p>\n </div>\n ) : null}\n {codeIsInvalid ? (\n <div className=\"alert-info fail\">\n <SVG\n src={XmarkSvg}\n />\n <p className=\"promo-code-fail\">Invalid Promo Code</p>\n </div>\n ) : null}\n {!showPromoInput && (\n <Button\n className=\"promo-code-button\"\n placeholder=\"Promo Codes\"\n onClick={() => {\n setCodeIsApplied(false)\n setShowPromoInput(true)\n setCodeIsInvalid(false)\n }}\n >\n {promoText ?? 'Got a promo code? Click here'}\n </Button>\n )}\n {showPromoInput && renderInputField()}\n </div>\n )\n}","import { useEffect } from 'react'\n\nimport { postReferralVisits } from '../../api'\n\ninterface IReferralLogicProps {\n eventId: string | number;\n}\n\nexport const ReferralLogic = (props: IReferralLogicProps) => {\n const { eventId } = props\n\n useEffect(() => {\n const isWindowDefined = typeof window !== 'undefined'\n\n if (isWindowDefined) {\n const params: URLSearchParams = new URL(`${window.location}`).searchParams\n const referralId = params.get('ttf_r') || ''\n const referralValue = [eventId, '.', referralId].join('')\n const isAlreadyCounted = localStorage.getItem('referral_key') === referralValue\n\n if (referralId && eventId && !isAlreadyCounted) {\n (async () => {\n try {\n await postReferralVisits(`${eventId}`, referralId)\n localStorage.setItem('referral_key', referralValue)\n } catch (error) {}\n })()\n }\n }\n }, [eventId])\n\n return null\n}\n","import './style.css'\n\nimport Box from '@mui/material/Box'\nimport FormControl from '@mui/material/FormControl'\nimport MenuItem from '@mui/material/MenuItem'\nimport Select from '@mui/material/Select'\nimport _get from 'lodash/get'\nimport React from 'react'\n\nimport { getTicketSelectOptions } from './utils'\n\ninterface ITicketRowProps {\n ticketTier: any;\n prevTicketTier: any;\n selectedTickets: any;\n handleTicketSelect: any;\n isSeatMapAllowed?: any;\n tableType?: boolean;\n}\n\nexport const TicketRow = ({\n ticketTier,\n prevTicketTier,\n selectedTickets,\n handleTicketSelect,\n isSeatMapAllowed,\n tableType,\n}: ITicketRowProps) => {\n const soldOutMessage = ticketTier.soldOutMessage\n ? `${ticketTier.soldOutMessage}`.toUpperCase()\n : 'SOLD OUT'\n const isSalesClosed = !ticketTier.salesStarted || ticketTier.salesEnded\n const maxCount = tableType ? ticketTier.maxGuests : ticketTier.maxQuantity\n const minCount = tableType ? ticketTier.minGuests : ticketTier.minQuantity\n const { multiplier } = ticketTier\n const options = getTicketSelectOptions(maxCount, minCount, multiplier)\n\n const ticketsClosedMessage = !ticketTier.salesStarted\n ? 'Sales not started'\n : 'Sales Ended'\n const canPurchaseTicket = ticketTier.displayTicket && ticketTier.maxQuantity\n const isDirectPurchaseAllowed = _get(ticketTier, 'allowDirectPurchase', false)\n\n const onSaleContent = (\n <div className=\"get-tickets\">\n {ticketTier.isTable && <span>GUESTS</span>}\n <Box className=\"get-tickets__selectbox\">\n <FormControl fullWidth>\n <Select\n sx={{ borderRadius: 0 }}\n value={\n selectedTickets[ticketTier.id]\n ? selectedTickets[ticketTier.id]\n : 0\n }\n onChange={handleTicketSelect}\n displayEmpty\n inputProps={{ 'aria-label': 'Without label' }}\n MenuProps={{\n PaperProps: {\n sx: { maxHeight: 150 },\n className: 'get-tickets-paper',\n },\n }}\n >\n {options.map((option, index) => (\n <MenuItem key={index} value={option.value}>\n {option.value}\n </MenuItem>\n ))}\n </Select>\n </FormControl>\n </Box>\n </div>\n )\n\n let returnValue: any = ''\n\n // ticketTier.soldOut === false --> means that ticket is in the stock\n const isSoldOut =\n ticketTier.sold_out ||\n !ticketTier.displayTicket ||\n ticketTier.soldOut ||\n ticketTier.soldOut === false\n\n if (isSoldOut) {\n returnValue = soldOutMessage\n } else if (isSalesClosed) {\n returnValue = ticketsClosedMessage\n } else if (\n canPurchaseTicket &&\n isSeatMapAllowed &&\n !isDirectPurchaseAllowed\n ) {\n // Seat Map Tickets renderer logic\n returnValue = null\n } else if (canPurchaseTicket) {\n returnValue = onSaleContent\n } else if (_get(prevTicketTier, 'in_stock')) {\n returnValue = 'SOON'\n }\n\n return <>{returnValue} </>\n}\n","export const getTicketSelectOptions = (\n maxCount = 10,\n minCount = 1,\n multiplier = 1\n) => {\n const options = [{ label: 0, value: 0 }]\n for (let i = minCount; i <= Math.min(50, maxCount); i += multiplier) {\n options.push({ label: i, value: i })\n }\n return options\n}\n","import './style.css'\n\nimport _sortBy from 'lodash/sortBy'\nimport React, { ReactNode } from 'react'\n\nimport { TicketRow } from './TicketRow'\n\ninterface ITicketsSectionProps {\n event: any;\n ticketsList: any;\n selectedTickets: any;\n handleTicketSelect: any;\n sortBySoldOut: boolean;\n hideTicketsHeader: boolean;\n hideTableTicketsHeader: boolean;\n tableTickets: any;\n ticketsHeaderComponent?: ReactNode;\n tableTicketsHeaderComponent?: ReactNode;\n showGroupNameBlock?: boolean;\n currencySybmol?: string;\n isSeatMapAllowed?: boolean;\n}\n\nexport const TicketsSection = ({\n event = { currency: {} },\n ticketsList,\n selectedTickets,\n handleTicketSelect,\n sortBySoldOut,\n ticketsHeaderComponent,\n tableTicketsHeaderComponent,\n hideTicketsHeader,\n hideTableTicketsHeader,\n showGroupNameBlock,\n currencySybmol,\n isSeatMapAllowed,\n tableTickets,\n}: ITicketsSectionProps) => {\n const {\n currency: { symbol },\n } = event\n const sortedTicketsList = sortBySoldOut\n ? _sortBy(_sortBy(ticketsList, 'sortOrder'), 'soldOut')\n : _sortBy(ticketsList, 'sortOrder')\n const showGroup = !!sortedTicketsList.find(ticket => ticket.groupName)\n const priceSymbol = currencySybmol ? currencySybmol : symbol\n return (\n <>\n {!hideTicketsHeader && ticketsHeaderComponent}\n {sortedTicketsList.map((ticket, i, arr) => {\n const ticketPrice = `${priceSymbol} ${(+ticket.price).toFixed(2)}`\n const ticketOldPrice = `${priceSymbol} ${(+ticket.oldPrice).toFixed(2)}`\n\n const isSoldOut =\n ticket.sold_out || !ticket.displayTicket || ticket.soldOut\n const ticketSelect = (event: any) => {\n const { value } = event.target\n handleTicketSelect(ticket.id, value)\n }\n\n let ticketIsDiscounted = false\n if (ticket.oldPrice && !isSoldOut && ticket.oldPrice !== ticket.price) {\n ticketIsDiscounted = true\n }\n\n const ticketIsFree = +ticket.price === 0\n const ticketPriceElem = isSoldOut\n ? 'SOLD OUT'\n : ticketIsFree\n ? 'FREE'\n : ticketPrice\n const isNewGroupTicket = ticket?.groupName !== arr[i - 1]?.groupName\n\n return (\n <React.Fragment key={ticket.id || ticket.name}>\n {showGroupNameBlock && showGroup && isNewGroupTicket ? (\n <div className=\"event-detail__tier group-title\">\n {ticket.groupName || ''}\n </div>\n ) : null}\n <div\n className={`event-detail__tier ${isSoldOut ? 'disabled' : ''}`}\n >\n <div className=\"event-detail__tier-name\">\n {ticket.displayName || ticket.name}\n </div>\n <div className=\"event-tickets-container\">\n <div className=\"event-detail__tier-price\">\n {ticketIsDiscounted && (\n <p className=\"old-price\">{ticketOldPrice}</p>\n )}\n <p className={isSoldOut ? 'sold-out' : ''}>\n {ticketPriceElem}\n </p>\n {!isSoldOut && !ticketIsFree && (\n <p className=\"fees\">\n {ticket.feeIncluded ? '(incl. Fees)' : '(excl. Fees)'}\n </p>\n )}\n </div>\n <div\n className=\"event-detail__tier-state\"\n style={{ minWidth: 55 }}\n >\n <TicketRow\n ticketTier={ticket}\n prevTicketTier={arr[i - 1]}\n selectedTickets={selectedTickets}\n handleTicketSelect={ticketSelect}\n />\n </div>\n </div>\n </div>\n </React.Fragment>\n )\n })}\n {!hideTableTicketsHeader && tableTicketsHeaderComponent}\n {tableTickets.map((ticket: any, i: any, arr: any) => {\n const ticketPrice = `${priceSymbol} ${(+ticket.price).toFixed(2)}`\n const ticketOldPrice = `${priceSymbol} ${(+ticket.oldPrice).toFixed(2)}`\n\n const isSoldOut =\n ticket.sold_out || !ticket.displayTicket || ticket.soldOut\n const ticketSelect = (event: any) => {\n const { value } = event.target\n handleTicketSelect(ticket.id, value, true)\n }\n\n let ticketIsDiscounted = false\n if (ticket.oldPrice && !isSoldOut && ticket.oldPrice !== ticket.price) {\n ticketIsDiscounted = true\n }\n\n const ticketIsFree = +ticket.price === 0\n const ticketPriceElem = isSoldOut\n ? 'SOLD OUT'\n : ticketIsFree\n ? 'FREE'\n : ticketPrice\n const isNewGroupTicket = ticket?.groupName !== arr[i - 1]?.groupName\n\n return (\n <>\n <React.Fragment key={ticket.id || ticket.name}>\n {showGroupNameBlock && showGroup && isNewGroupTicket ? (\n <div className=\"event-detail__tier group-title\">\n {ticket.groupName || ''}\n </div>\n ) : null}\n <div\n className={`event-detail__tier ${isSoldOut ? 'disabled' : ''}`}\n >\n <div className=\"event-detail__tier-name\">\n {ticket.displayName || ticket.name}\n </div>\n <div className=\"event-tickets-container\">\n <div className=\"event-detail__tier-price\">\n {ticketIsDiscounted && (\n <p className=\"old-price\">{ticketOldPrice}</p>\n )}\n <p className={isSoldOut ? 'sold-out' : ''}>\n {ticketPriceElem}\n </p>\n {!isSoldOut && !ticketIsFree && (\n <p className=\"fees\">\n {ticket.feeIncluded ? '(incl. Fees)' : '(excl. Fees)'}\n </p>\n )}\n {ticket.depositPercent && (\n <p className=\"deposits\">\n {ticket.depositPercent + '% DEPOSIT'}\n </p>\n )}\n </div>\n <div\n className=\"event-detail__tier-state\"\n style={{ minWidth: 55 }}\n >\n <TicketRow\n tableType={true}\n ticketTier={ticket}\n prevTicketTier={arr[i - 1]}\n selectedTickets={selectedTickets}\n handleTicketSelect={ticketSelect}\n isSeatMapAllowed={isSeatMapAllowed}\n />\n </div>\n </div>\n </div>\n </React.Fragment>\n </>\n )\n })}\n </>\n )\n}\n","import _map from 'lodash/map'\nimport moment from 'moment-timezone'\nimport React from 'react'\n\nconst EventInfoItem = ({ image, name }: EventInfoTypes) => (\n <div className=\"event-info\">\n <img src={image} alt=\"event\" />\n {name}\n </div>\n)\n\nconst tableConfig = (columns?: IColumnData[], key?: string) => {\n let config\n\n if (columns) {\n return {\n header: _map(columns, item => item.label),\n body: _map(columns, item => {\n if (item.component) {\n const ItemComponent = item.component\n return (row: RowItems) => ({\n columnProps: item,\n component: <ItemComponent {...row} />,\n })\n }\n\n if (item.key === 'event') {\n return (row: RowItems) => ({\n columnProps: item,\n component: <EventInfoItem image={row.image} name={row.eventName} />,\n })\n }\n\n if (item.key === 'total') {\n return (row: RowItems) => ({\n columnProps: item,\n component: row.currency + row.amount,\n })\n }\n\n return (row: RowItems) => ({\n columnProps: item,\n component: item.normalizer\n ? item.normalizer(row[item.key as keyof RowItems])\n : row[item.key as keyof RowItems],\n })\n }) as ITableBodyType[],\n }\n }\n\n switch (key) {\n default:\n config = {\n header: ['Order No.', 'Date', 'Event', 'Total'],\n body: [\n (row: RowItems) => ({\n columnProps: {} as IColumnData,\n component: row.id,\n }),\n (row: RowItems) => ({\n columnProps: {} as IColumnData,\n component: row.timezone\n ? moment.tz(row.date, row.timezone).format('DD MMMM YYYY')\n : row.date,\n }),\n (row: RowItems) => ({\n columnProps: {} as IColumnData,\n component: <EventInfoItem image={row.image} name={row.eventName} />,\n }),\n (row: RowItems) => ({\n columnProps: {} as IColumnData,\n component: row.currency + row.amount,\n }),\n ] as ITableBodyType[],\n }\n }\n return config\n}\n\nexport default tableConfig\n","import TableCell from '@mui/material/TableCell'\nimport TableRow from '@mui/material/TableRow'\nimport _get from 'lodash/get'\nimport _identity from 'lodash/identity'\nimport React from 'react'\n\nimport tableConfig from './tableConfig'\n\nconst Row = ({\n row,\n handleDetailsInfo,\n columns = [],\n hideDetailsButton,\n}: RowPropsTypes) => (\n <TableRow sx={{ '& > *': { borderBottom: 'unset' } }}>\n {tableConfig(columns).body.map((column: ITableBodyType, index: number) => (\n <TableCell\n component=\"th\"\n scope=\"row\"\n key={index}\n onClick={e => {\n const { columnProps, component }: IRowReturnType = column(row)\n const onCellClick = columnProps?.onCellClick || _identity\n const componentProps = _get(component, 'props', {})\n\n onCellClick(componentProps, e)\n }}\n >\n {column(row).component}\n </TableCell>\n ))}\n {!hideDetailsButton && (\n <TableCell component=\"th\" scope=\"row\">\n <button\n type=\"button\"\n className=\"order-details-button\"\n onClick={() => handleDetailsInfo(row.id)}\n >\n Details\n </button>\n </TableCell>\n )}\n </TableRow>\n)\n\nexport default Row\n","import React from 'react'\nimport FormGroup from '@mui/material/FormGroup'\nimport FormControlLabel from '@mui/material/FormControlLabel'\nimport Radio from '@mui/material/Radio';\nimport { FieldInputProps } from 'formik'\nimport { useTheme } from '@mui/styles'\n\nexport interface IRadioField {\n label: string | number | JSX.Element;\n field?: FieldInputProps<any>;\n}\n\ninterface IOtherProps {\n [key: string]: any;\n}\n\nexport const RadioField = ({\n label,\n field,\n theme,\n disableDropdown,\n ...rest\n}: IRadioField & IOtherProps) => {\n const customTheme: any = useTheme()\n return (\n <FormGroup>\n <FormControlLabel\n control={<Radio {...field} {...rest} />}\n label={label}\n componentsProps={{\n typography: customTheme?.checkbox\n }}\n />\n </FormGroup>\n )\n}\n","import './style.css'\n\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport CircularProgress from '@mui/material/CircularProgress'\nimport Modal from '@mui/material/Modal'\nimport { Field, Form, Formik } from 'formik'\nimport React from 'react'\nimport SVG from 'react-inlinesvg'\nimport * as yup from 'yup'\n\nimport EmailSvg from '../../assets/images/email.svg'\nimport UserSvg from '../../assets/images/user.svg'\nimport { CheckboxField } from '../common/CheckboxField'\nimport { CustomField } from '../common/CustomField'\nimport { RadioField } from '../common/RadioField'\nimport { ITicketTypes } from '../orderDetailsContainer/ticketsTable'\n\ninterface Props {\n ticket: ITicketTypes;\n onClose: () => void;\n onSubmit: (values: InitialValuesTypes) => void;\n loading?: boolean;\n}\n\nexport interface InitialValuesTypes {\n to: string;\n first_name: string;\n last_name: string;\n email: string;\n confirm_email: string;\n confirm: boolean;\n}\n\nconst style: React.CSSProperties = {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n minWidth: 480,\n backgroundColor: '#e3e3e3',\n border: '1px solid white',\n outline: 'none',\n padding: '14px',\n maxHeight: '85vh',\n overflow: 'auto'\n}\n\nconst schema = yup.object().shape({\n to: yup.string().required(),\n first_name: yup.string().when('to', {\n is: (to: string) => to === 'friend',\n then: yup.string().required('First Name is required')\n }),\n last_name: yup.string().when('to', {\n is: (to: string) => to === 'friend',\n then: yup.string().required('Last Name is required')\n }),\n email: yup.string().when('to', {\n is: (to: string) => to === 'friend',\n then: yup.string().email('Invalid email').required('Email is required')\n }),\n confirm_email: yup.string().when('to', {\n is: (to: string) => to === 'friend',\n then: yup.string().email('Invalid email').oneOf([yup.ref('email'), null], 'Emails must match').required('Confirm Email is required')\n }),\n confirm: yup.boolean().oneOf([true])\n})\n\nconst initialValues: InitialValuesTypes = {\n to: 'friend',\n first_name: '',\n last_name: '',\n email: '',\n confirm_email: '',\n confirm: false\n}\n\nexport const TicketResaleModal = ({\n ticket = {} as ITicketTypes,\n onClose = () => { },\n onSubmit = () => { },\n loading = false\n}: Props) => {\n const { hash, holder_name, event_name, currency, retain_amount_on_sale, ticket_type_is_active } = ticket\n\n return (\n <Modal\n open={true}\n onClose={onClose}\n aria-labelledby=\"modal-modal-title\"\n aria-describedby=\"modal-modal-description\"\n className='resale-modal'\n >\n <Box style={style}>\n <h3>Sell Ticket</h3>\n <div>\n <h3>Ticket Details</h3>\n <div>\n <h4>Event</h4>\n <p>{event_name}</p>\n </div>\n <div>\n <h4>Ticket Holder</h4>\n <p>{holder_name}</p>\n </div>\n <div>\n <h4>Ticket ID</h4>\n <p>{hash}</p>\n </div>\n </div>\n <div>\n <h3>Sell to Whom</h3>\n <Formik\n initialValues={initialValues}\n validationSchema={schema}\n onSubmit={onSubmit}\n >\n {({ values, isValid, dirty }) => (\n <Form>\n <div>\n <Field\n name='to'\n label='I want to sell the ticket to someone I know'\n type='radio'\n value='friend'\n component={RadioField}\n />\n {values.to === 'friend' && (\n <div className='sell-to-friend'>\n <div className='user-info-box'>\n <div className='field-box'>\n <div className='icon'>\n <SVG\n src={UserSvg}\n width='24'\n height='24'\n />\n </div>\n <Field\n name='first_name'\n label='First Name'\n type='text'\n component={CustomField}\n />\n </div>\n <div className='field-box'>\n <div className='empty-box' />\n <Field\n name='last_name'\n label='Last Name'\n type='text'\n component={CustomField}\n />\n </div>\n </div>\n <div className='email-info-box'>\n <div className='field-box'>\n <div className='icon'>\n <SVG\n src={EmailSvg}\n width='24'\n height='24'\n />\n </div>\n <Field\n name='email'\n label='Email address'\n type='text'\n component={CustomField}\n />\n </div>\n <div className='field-box'>\n <div className='empty-box' />\n <Field\n name='confirm_email'\n label='Confirm Email address'\n type='text'\n component={CustomField}\n />\n </div>\n </div>\n </div>\n )}\n </div>\n {ticket_type_is_active && (\n <div>\n <Field\n name=\"to\"\n label=\"I will sell my ticket to anyone who wants to buy it\"\n type=\"radio\"\n value=\"anyone\"\n component={RadioField}\n />\n </div>\n )}\n <div>\n <h4>Terms of Resale</h4>\n <p>I confirm that I want to sell this ticket and that, if someone chooses to buy it, I will no longer own it or have the right to ask for it back.</p>\n <p>I also understand that, if no one chooses to buy it, it remains my property, is valid for entry to <strong>{event_name}</strong> and I will not receive any refund.</p>\n <p>If my ticket is sold, the original card I used to buy my ticket will be refunded with the original amount paid, minus a small handling fee of <strong>{`${currency ?? ''} ${retain_amount_on_sale ?? '0'}`}</strong>, and that any existing refunds due to me for referring sales for this event are no longer valid.</p>\n <Field\n name='confirm'\n label='I agree'\n type='checkbox'\n component={CheckboxField}\n />\n </div>\n <div className=\"resale-action-button\">\n <Button\n type=\"submit\"\n disabled={!(isValid && dirty)}\n >\n {loading ? <CircularProgress size=\"22px\" /> : 'Sell Ticket'}\n </Button>\n </div>\n </Form>\n )}\n </Formik>\n </div>\n </Box>\n </Modal>\n )\n}\n","import CircularProgress from '@mui/material/CircularProgress'\nimport Paper from '@mui/material/Paper'\nimport Table from '@mui/material/Table'\nimport TableBody from '@mui/material/TableBody'\nimport TableCell from '@mui/material/TableCell'\nimport TableContainer from '@mui/material/TableContainer'\nimport TableHead from '@mui/material/TableHead'\nimport TableRow from '@mui/material/TableRow'\nimport _identity from 'lodash/identity'\nimport _map from 'lodash/map'\nimport React, { Fragment, useState } from 'react'\n\nimport { downloadPDF } from '../../utils'\nimport SnackbarAlert from '../common/SnackbarAlert'\n\ninterface IAddOnTypes {\n name: string;\n groupName: string;\n status: string;\n}\nexport interface ITicketTypes {\n add_ons?: IAddOnTypes[];\n hash: string;\n ticket_type: string;\n holder_name: string;\n status: string;\n pdf_link: string;\n is_sellable: boolean;\n is_on_sale?: boolean;\n event_name: string;\n currency: string;\n ticket_type_hash: string;\n ticket_type_is_active?: boolean;\n canSellTicket?: boolean;\n retain_amount_on_sale: number | string;\n ticketsTitle: string;\n}\n\nexport interface IActionColumns {\n download?: boolean;\n sell_ticket?: boolean;\n}\n\ninterface TicketsTableTypes {\n canSellTicket?: boolean;\n tickets: ITicketTypes[];\n columns: Array<{\n id?: string | number;\n key: keyof ITicketTypes & keyof IActionColumns;\n label: string | number | null | undefined;\n }>;\n handleSellTicket: (ticket: ITicketTypes) => void;\n handleRemoveFromResale: (ticket: ITicketTypes) => void;\n\n icon?: string;\n displayColumnNameInRow?: boolean;\n ticketsTitle?: string;\n}\n\ntype PdfDownload = {\n hash: string;\n loading: boolean;\n}\n\nconst TicketsTable = ({\n tickets = [],\n columns = [],\n handleSellTicket = _identity,\n handleRemoveFromResale = _identity,\n icon = '',\n displayColumnNameInRow = false,\n canSellTicket = true,\n ticketsTitle = 'Your Tickets',\n}: TicketsTableTypes) => {\n const [pdfError, setPdfError] = useState<string | null>(null)\n const [pdfDownload, setPdfDownload] = useState<PdfDownload>({\n hash: '',\n loading: false,\n })\n\n const getRow = (ticket: ITicketTypes) =>\n _map(columns, (column, columnIndex) => {\n if (column.key === 'download') {\n const ticketIsDownloading =\n pdfDownload.loading && pdfDownload.hash === ticket.hash\n\n if (!ticket.pdf_link || ticket.status === 'Sold' || ticket.is_on_sale)\n return <TableCell key={columnIndex}>{null}</TableCell>\n\n return (\n <TableCell key={columnIndex}>\n {Boolean(icon) && <img src={icon} alt=\"nodata\" />}\n <span\n aria-hidden={true}\n className=\"action-button\"\n onClick={async () => {\n if (ticketIsDownloading) {\n return\n }\n\n setPdfDownload({ hash: ticket.hash, loading: true })\n try {\n const pdfDownloadError = await downloadPDF(ticket.pdf_link)\n if (pdfDownloadError) {\n setPdfError(pdfDownloadError?.message)\n }\n } catch (err) {\n if (err && typeof err === 'string') {\n setPdfError(err)\n }\n } finally {\n setPdfDownload({ hash: '', loading: false })\n }\n }}\n >\n {ticketIsDownloading ? (\n <CircularProgress size=\"22px\" />\n ) : (\n 'Download'\n )}\n </span>\n </TableCell>\n )\n }\n\n if (column.key === 'sell_ticket') {\n return (\n <TableCell key={columnIndex}>\n {ticket.is_sellable && canSellTicket && (\n <span\n aria-hidden={true}\n className=\"action-button\"\n onClick={() => handleSellTicket(ticket)}\n >\n Sell Ticket\n </span>\n )}\n {ticket.is_on_sale && (\n <span\n aria-hidden={true}\n className=\"action-button\"\n onClick={() => handleRemoveFromResale(ticket)}\n >\n Remove from Resale\n </span>\n )}\n </TableCell>\n )\n }\n\n return displayColumnNameInRow ? (\n <TableCell key={columnIndex}>\n <div className=\"cell-block\">\n <span>{column.label}</span>\n <span>{ticket[column.key]}</span>\n </div>\n </TableCell>\n ) : (\n <TableCell key={columnIndex}>\n <div className=\"cell-block\">\n <span>{ticket[column.key]}</span>\n </div>\n </TableCell>\n )\n })\n\n return (\n <div className=\"tickets-box\">\n <SnackbarAlert\n type=\"error\"\n isOpen={!!pdfError}\n message={pdfError || ''}\n onClose={() => setPdfError(null)}\n />\n <h4 className=\"sub-title tickets-title\">{ticketsTitle}</h4>\n <TableContainer component={Paper}>\n <Table aria-label=\"collapsible table\">\n {displayColumnNameInRow ? null : (\n <TableHead>\n <TableRow>\n {_map(columns, item => (\n <TableCell key={item.key}>{item.label || ''}</TableCell>\n ))}\n </TableRow>\n </TableHead>\n )}\n <TableBody>\n {tickets.map((ticket: ITicketTypes, index: number) => (\n <Fragment key={index}>\n <TableRow>{getRow(ticket)}</TableRow>\n {!!ticket.add_ons?.length && (\n <TableRow>\n <TableCell colSpan={6}>\n <Table className=\"ticket-add-on-table\">\n <TableHead>\n <TableRow>\n <TableCell>Add-On</TableCell>\n <TableCell>Status</TableCell>\n </TableRow>\n </TableHead>\n <TableBody>\n {ticket.add_ons.map(\n (add_on: IAddOnTypes, index: number) => (\n <TableRow key={index}>\n <TableCell>{add_on.groupName}:{add_on.name}</TableCell>\n <TableCell>{add_on.status}</TableCell>\n </TableRow>\n )\n )}\n </TableBody>\n </Table>\n </TableCell>\n </TableRow>\n )}\n </Fragment>\n ))}\n </TableBody>\n </Table>\n </TableContainer>\n </div>\n )\n}\n\nexport default TicketsTable\n","import React, { FC, useState } from 'react'\nimport { Field, Form, Formik } from 'formik'\nimport { CircularProgress } from '@mui/material'\nimport { CustomField } from '../common/CustomField'\nimport axios, { AxiosError } from 'axios'\nimport * as Yup from 'yup'\nimport { resetPassword } from '../../api'\nimport './style.css'\n\ninterface IResetPasswordProps {\n token?: string\n onResetPasswordSuccess?: (res: any) => void\n onResetPasswordError?: (e: AxiosError) => void\n}\n\nconst Schema = Yup.object().shape({\n password: Yup.string()\n .min(6, 'Password must have 5+ characters')\n .required('Required'),\n password_confirmation: Yup.string()\n .required('Required')\n .oneOf([Yup.ref('password'), null], 'Passwords must match'),\n})\n\nexport const ResetPasswordContainer: FC<IResetPasswordProps> = ({\n token: tokenProps = '',\n onResetPasswordSuccess = () => {},\n onResetPasswordError = () => {},\n}) => {\n const [loading, setLoading] = useState(false)\n return (\n <div className=\"reset-password\">\n <div className=\"title\">Change Password</div>\n <Formik\n initialValues={{ password: '', password_confirmation: '' }}\n validationSchema={Schema}\n onSubmit={async (values: any) => {\n try {\n setLoading(true)\n let token\n if (tokenProps) {\n token = tokenProps\n } else {\n if (typeof window !== 'undefined') {\n const params: URLSearchParams = new URL(`${window.location}`)\n .searchParams\n token = params.get('token')\n }\n }\n\n const payload = {\n token,\n ...values,\n }\n const res = await resetPassword(payload)\n onResetPasswordSuccess(res)\n } catch (e) {\n if (axios.isAxiosError(e)) {\n onResetPasswordError(e)\n }\n } finally {\n setLoading(false)\n }\n }}\n >\n {({ isValid, dirty }) => (\n <Form>\n <div className=\"body\">\n <div className=\"field-item\">\n <Field\n name=\"password\"\n label=\"New Password\"\n type=\"password\"\n component={CustomField}\n />\n </div>\n <div className=\"field-item\">\n <Field\n name=\"password_confirmation\"\n label=\"Confirm Password\"\n type=\"password\"\n component={CustomField}\n />\n </div>\n </div>\n <div className=\"action-button\">\n <button type=\"submit\" disabled={!(isValid && dirty)}>\n {loading ? <CircularProgress size=\"22px\" /> : 'Submit'}\n </button>\n </div>\n </Form>\n )}\n </Formik>\n </div>\n )\n}\n","import _get from 'lodash/get'\nimport _isEmpty from 'lodash/isEmpty'\n\nexport interface IAddOnsData {\n add_on_groups: Array<{ [key: string]: any }>;\n add_ons: Array<[]>;\n}\n\nexport const addonsWithGroupsAdapter = (data: IAddOnsData) => {\n const addonsData = { ...data }\n const addOnsGroups = _get(addonsData, 'add_on_groups', [])\n const addons = _get(addonsData, 'add_ons', [])\n\n if (!_isEmpty(addOnsGroups)) {\n const addOnGroupsWithVariants: any = []\n const addOnsWithoutVariants: any = []\n\n addons.forEach((addon: any) => {\n if (addon.attributes.addOnGroupId) {\n // Collect addons groups inside with their variants\n const currentGroupId = addon.attributes.addOnGroupId\n const exsistingGroupIndex = addOnGroupsWithVariants.findIndex(\n (item: any) => item.id === currentGroupId\n )\n\n if (addOnGroupsWithVariants[exsistingGroupIndex]) {\n const addOnGroup = addOnGroupsWithVariants[exsistingGroupIndex]\n addOnGroupsWithVariants[exsistingGroupIndex] = {\n ...addOnGroup,\n variants: [...addOnGroup.variants, ...addon.attributes],\n }\n } else {\n const group =\n addOnsGroups.find(\n group => group.attributes.id === currentGroupId\n ) || {}\n\n addOnGroupsWithVariants.push({\n ...group.attributes,\n variants: [...addon.attributes],\n })\n }\n } else {\n addOnsWithoutVariants.push(addon.attributes)\n }\n })\n\n return addOnGroupsWithVariants.concat(addOnsWithoutVariants)\n }\n\n // Adapt only simple addons data\n const adaptedAddons = (addons as any[]).map((addon: any) => ({\n ...addon.attributes,\n }))\n return adaptedAddons\n}\n\nexport const cartAdapter = (cart: any) => {\n const cartData = _get(cart, 'data.data.attributes', [])\n const { expiresAt, cart: carts_arr } = cartData\n const { id, quantity } = carts_arr[0] || {}\n\n return { id, quantity, expiresAt }\n}\n","import { Field } from 'formik'\nimport _identity from 'lodash/identity'\nimport _isNull from 'lodash/isNull'\nimport React from 'react'\n\nimport { NativeSelectField } from '../common'\n\ninterface IAddonComponentProps {\n classNamePrefix: string;\n data: any;\n selectOptions: any;\n handleAddonChange?: (...res: any) => void;\n}\n\nconst AddonComponent = ({\n classNamePrefix = '',\n data,\n selectOptions,\n handleAddonChange = _identity,\n}: IAddonComponentProps) => {\n const { id, name, active, stock } = data\n\n return (\n <div key={id} className={`${classNamePrefix}_product_select_container`}>\n <div className={`${classNamePrefix}_product_select_block`} key={name}>\n <div className={`${classNamePrefix}_product_size`}>{name}</div>\n <div className={`${classNamePrefix}_product_qty_select_block`}>\n {!active || (!_isNull(stock) && stock <= 0) ? (\n <div className=\"sold_out\">SOLD OUT</div>\n ) : (\n <div className={`${classNamePrefix}_product_qty_select`}>\n <Field\n name={id}\n selectOptions={selectOptions}\n component={NativeSelectField}\n onChange={(e: any) => {\n const { value } = e.target\n handleAddonChange(id, value)\n }}\n />\n </div>\n )}\n </div>\n </div>\n </div>\n )\n}\n\nexport default AddonComponent\n","import _isEmpty from 'lodash/isEmpty'\nimport _isNull from 'lodash/isNull'\nimport _reverse from 'lodash/reverse'\nimport _sortBy from 'lodash/sortBy'\n\ninterface ObjectLiteral {\n [key: string]: any;\n}\n\nexport const generateSelectOptions = (minCount = 1, maxCount = 10) => {\n const options = []\n for (let i = minCount; i <= maxCount; i++) {\n options.push({ label: i, value: i })\n }\n return options\n}\n\nconst generateStockBasedOnLimitations = (\n addon: any,\n ticketQuantity: number\n) => {\n // Generate addon available stock count based on limitations\n const { flagLimitToTicketQuantity, maxQuantity, limitPerTicket } = addon\n\n let allowedStockCount\n\n // Generate stock\n if (flagLimitToTicketQuantity) {\n // Limited to ticket quantity case\n allowedStockCount = ticketQuantity\n } else if (maxQuantity && limitPerTicket) {\n const stockBasedOnLimitPerTicket = limitPerTicket * ticketQuantity\n // Both maximum quantity and limited to per ticket selected case, stock is minimum of them\n allowedStockCount =\n maxQuantity <= stockBasedOnLimitPerTicket\n ? maxQuantity\n : stockBasedOnLimitPerTicket\n } else if (maxQuantity && !limitPerTicket) {\n // Limited to maximum quantity case\n allowedStockCount = maxQuantity\n } else if (!maxQuantity && limitPerTicket) {\n // Limited to per ticket case\n allowedStockCount = limitPerTicket * ticketQuantity\n }\n\n return Number(allowedStockCount)\n}\n\nconst filterStockBasedOnAvailability = (\n generatedStock: any,\n availableStock: any\n) => {\n // Check generated stock count admissibility with addon stock availability\n let filteredStockCount = generatedStock\n\n if (generatedStock) {\n if (generatedStock > availableStock && !_isNull(availableStock)) {\n filteredStockCount = availableStock\n }\n } else {\n // Not set any restriction\n // Here 10 value is business logic\n filteredStockCount = 10\n\n if (!_isNull(availableStock) && availableStock < filteredStockCount) {\n filteredStockCount = availableStock\n }\n }\n\n return filteredStockCount\n}\n\nexport const getAddonSelectOptions = (addons: any, choosedTicketCount: any) => {\n const addonsWithOptions: ObjectLiteral = {}\n const groupsWithSelectedVariantsInfo: ObjectLiteral = {}\n const groupsWithVariants: ObjectLiteral = {}\n\n addons.forEach((addon: any) => {\n // Here addon can act either as simple Addon or Addon Group\n const {\n id,\n stock: simpleAddonStock,\n variants,\n active,\n flagLimitToTicketQuantity,\n maxQuantity,\n limitPerTicket,\n } = addon\n\n if (variants) {\n // Addon Group with inside addon variants case\n variants.forEach((variant: any) => {\n const { id: variantId, stock: variantStock } = variant\n\n // null checking is for unlimited stock value\n if (active && (variantStock > 0 || _isNull(variantStock))) {\n // Generate Addon Group allowed stock count based on limitations\n const stockBasedOnLimitation = generateStockBasedOnLimitations(\n addon,\n choosedTicketCount\n )\n\n // Detect if group has limitation or not\n if (flagLimitToTicketQuantity || maxQuantity || limitPerTicket) {\n // Generate Group with inside variants info\n if (groupsWithSelectedVariantsInfo[id]) {\n // Set group limit\n if (\n groupsWithSelectedVariantsInfo[id].limit <\n stockBasedOnLimitation\n ) {\n groupsWithSelectedVariantsInfo[\n id\n ].limit = stockBasedOnLimitation\n }\n\n // Set choosed variants info\n groupsWithSelectedVariantsInfo[id] = {\n ...groupsWithSelectedVariantsInfo[id],\n choosedVariants: {\n ...groupsWithSelectedVariantsInfo[id].choosedVariants,\n [variantId]: 0,\n },\n }\n } else {\n groupsWithSelectedVariantsInfo[id] = {\n limit: stockBasedOnLimitation,\n selectedCount: 0,\n choosedVariants: { [variantId]: 0 },\n }\n }\n }\n\n // Check stock admissibility with addon stock availability\n const allowedVariantStockCount = filterStockBasedOnAvailability(\n stockBasedOnLimitation,\n variantStock\n )\n\n // Generate options for variant\n const variantOptions = generateSelectOptions(\n 0,\n allowedVariantStockCount\n )\n\n addonsWithOptions[variantId] = [...variantOptions]\n\n // Generate Group with its variants list\n groupsWithVariants[id] = {\n ...groupsWithVariants[id],\n [variantId]: allowedVariantStockCount,\n }\n }\n })\n } else {\n // Simple addon case, null checking is for unlimited stock value\n if (active && (simpleAddonStock > 0 || _isNull(simpleAddonStock))) {\n // Generate Addon Group allowed stock count based on limitations\n const stockBasedOnLimitation = generateStockBasedOnLimitations(\n addon,\n choosedTicketCount\n )\n\n // Check stock admissibility with addon stock availability\n const allowedVariantStockCount = filterStockBasedOnAvailability(\n stockBasedOnLimitation,\n simpleAddonStock\n )\n\n const addonOptions = generateSelectOptions(0, allowedVariantStockCount)\n addonsWithOptions[id] = [...addonOptions]\n }\n }\n })\n\n return {\n addonsWithOptions,\n groupsWithSelectedVariantsInfo,\n groupsWithVariants,\n }\n}\n\nexport const getTicketRelatedAddons = (addons: any, ticketId: any) => {\n // Filter addons based on choosed ticket\n const filteredAddons: any = addons.filter(\n (addon: any) =>\n _isNull(addon.prerequisiteTicketTypeIds) ||\n addon.prerequisiteTicketTypeIds.includes(ticketId)\n )\n\n return filteredAddons\n}\n\nexport const getSortedAddons = (addons: any, sortDirection = 'asc') => {\n const addonsCopy = [...addons]\n\n addonsCopy.forEach(addon => {\n if (addon.variants) {\n const unsortedVariants: any = []\n addon.variants.forEach((variant: any) => {\n unsortedVariants.push({\n ...variant,\n sortOrder: Number(variant.sortOrder),\n })\n })\n addon.sortOrder = Number(addon.variants[0].sortOrder)\n const sortedVariants = _sortBy(\n unsortedVariants,\n variant => variant.sortOrder\n )\n addon.variants = sortedVariants\n } else {\n addon.sortOrder = Number(addon.sortOrder)\n }\n })\n\n const sortedAddons = _sortBy(addonsCopy, addon => addon.sortOrder)\n if (sortDirection === 'desc') {\n return _reverse(sortedAddons)\n }\n\n return sortedAddons\n}\n\nexport const isAtLeastOneAddonSelected = (value: any) => {\n const selectedAddons = Object.fromEntries(\n Object.entries(value).filter(([_, count]) => Number(count) !== 0)\n )\n\n return !_isEmpty(selectedAddons)\n}\n","import _get from 'lodash/get'\n\nimport { addToCart, getCheckoutPageConfigs, postOnCheckout } from '../../api'\nimport { createCheckoutDataBodyWithDefaultHolder } from '../../utils'\n\ninterface IAddToCartFuncProps {\n eventId: string | number;\n data: any;\n ticketQuantity: number;\n enableBillingInfoAutoCreate?: boolean;\n}\n\nexport const addToCartFunc = async ({\n eventId,\n data,\n ticketQuantity,\n enableBillingInfoAutoCreate = true,\n}: IAddToCartFuncProps) => {\n const isWindowDefined = typeof window !== 'undefined'\n\n const result = await addToCart(eventId, data)\n const pageConfigsDataResponse = await getCheckoutPageConfigs()\n\n if (result.status === 200 && pageConfigsDataResponse.status === 200) {\n const pageConfigsData =\n _get(pageConfigsDataResponse, 'data.attributes') || {}\n\n const {\n skip_billing_page: skipBillingPage = false,\n names_required: nameIsRequired = false,\n age_required: ageIsRequired = false,\n phone_required: phoneIsRequired = false,\n hide_phone_field: hidePhoneField = false,\n has_add_on: hasAddOn = false,\n free_ticket: freeTicket = false,\n collect_optional_wallet_address: collectOptionalWalletAddress = false,\n collect_mandatory_wallet_address: collectMandatoryWalletAddress = false,\n } = pageConfigsData\n\n let hash = ''\n let total = ''\n\n isWindowDefined && window.localStorage.removeItem('add_ons')\n\n if (skipBillingPage && !hasAddOn) {\n // Get user data for checkout data\n const userData =\n isWindowDefined && window.localStorage.getItem('user_data')\n ? JSON.parse(window.localStorage.getItem('user_data') || '')\n : {}\n\n const checkoutBody = createCheckoutDataBodyWithDefaultHolder(\n ticketQuantity,\n userData\n )\n\n const checkoutResult = enableBillingInfoAutoCreate\n ? await postOnCheckout(checkoutBody, undefined, freeTicket)\n : null\n\n hash = _get(checkoutResult, 'data.data.attributes.hash') || ''\n total = _get(checkoutResult, 'data.data.attributes.total') || ''\n }\n\n return {\n skip_billing_page: skipBillingPage,\n names_required: nameIsRequired,\n phone_required: phoneIsRequired,\n age_required: ageIsRequired,\n hide_phone_field: hidePhoneField,\n free_ticket: freeTicket,\n collect_optional_wallet_address: collectOptionalWalletAddress,\n collect_mandatory_wallet_address: collectMandatoryWalletAddress,\n event_id: String(eventId),\n hash,\n total,\n hasAddOn,\n }\n }\n\n return null\n}\n","import _find from 'lodash/find'\nimport _forEach from 'lodash/forEach'\nimport _isEmpty from 'lodash/isEmpty'\nimport _values from 'lodash/values'\n\nexport const getTierIdBasedOnSeatId = (\n seatId: string,\n eventSeats: Array<EventSeat>\n) => {\n let tierId: number | string = ''\n\n _forEach(eventSeats, group => {\n _forEach(group.seats, (seatsCount, rowId) => {\n const [row_id, seat_id] = seatId.split(':')\n if (row_id === rowId && seat_id <= seatsCount) {\n tierId = Number(group.tier_id)\n return false\n }\n return true\n })\n })\n\n return tierId\n}\n\nexport const getButtonLabel = (count: number, tableMapEnabled: boolean) => {\n if (!count) {\n return tableMapEnabled ? `GET TABLES` : `GET TICKETS`\n } else if (count === 1) {\n return tableMapEnabled ? `GET ${count} TABLE` : `GET ${count} TICKET`\n }\n return tableMapEnabled ? `GET ${count} TABLES` : `GET ${count} TICKETS`\n}\n\nexport const getOwnReservationsBasedOnStatuses = (statuses: any) => {\n const ownReservations: string[] = []\n Object.keys(statuses).forEach((groupRowId: string) =>\n Object.keys(statuses[groupRowId]).forEach((seatIndex: string | number) => {\n if (statuses[groupRowId][seatIndex] === 'OR') {\n ownReservations.push(`${groupRowId}:${seatIndex}`)\n } else if (statuses[groupRowId][seatIndex] === 'H') {\n statuses[groupRowId][seatIndex] = 'BLOCKED'\n }\n })\n )\n return ownReservations\n}\n\nexport const getTicketDropdownData = (\n reservationData: Array<SeatReservationData>,\n tierReleations: TicketTypeTierRelations\n) => {\n const ticketsDropdownsData: Array<ITicketsDropdownsData> = []\n _forEach(reservationData, reservation => {\n if (tierReleations[reservation.tierId]) {\n const ticketsData = _values(tierReleations[reservation.tierId])\n ticketsDropdownsData.push({\n seatId: reservation.seatId,\n tierId: reservation.tierId,\n ticketsData,\n })\n } else {\n ticketsDropdownsData.push({\n seatId: reservation.seatId,\n tierId: reservation.tierId,\n ticketsData: [\n {\n ticket_type_tier_id: reservation.tierId,\n ticket_type_name: 'Please select Ticket Type',\n ticket_type_price: '',\n ticket_type_id: 'default',\n },\n ],\n })\n }\n })\n return ticketsDropdownsData\n}\n\nexport const getAddToCartRequestData = ({\n eventId,\n reservations = [],\n selectedSeats = [],\n selectedTickets = [],\n guestCounts = {},\n}: any) => {\n const hasGuests = !_isEmpty(guestCounts)\n\n const addToCartData = {\n attributes: {\n alternative_view_id: null,\n product_cart_quantity: reservations.length,\n product_options: {},\n product_id: eventId,\n ticket_types: {},\n },\n }\n\n const productOptions = {} as any\n const ticketTypes = {} as any\n\n _forEach(reservations, (item, index) => {\n const ticket = _find(\n selectedSeats[item],\n sitem => sitem.ticket_type_id === selectedTickets[item]\n )\n productOptions[ticket.ticket_type_option] = ticket.ticket_type_id\n\n const ticketTypesKey = hasGuests ? index : ticket.ticket_type_id\n const quantity = hasGuests\n ? guestCounts[item]\n : (ticketTypes[ticket.ticket_type_id]?.quantity || 0) + 1\n\n ticketTypes[ticketTypesKey] = {\n quantity,\n product_options: {\n [ticket.ticket_type_option]: ticket.ticket_type_id,\n ticket_price: ticket.ticket_type_price,\n },\n }\n })\n\n addToCartData.attributes.product_options = productOptions\n addToCartData.attributes.ticket_types = ticketTypes\n\n return addToCartData\n}\n\nexport const getTierRelationsArray = (\n data: Array<TicketTypeTierRelationsData>\n) => {\n const ticketTypeTireRelationsArray: Array<string | number> = []\n _forEach(data, (item: TicketTypeTierRelationsData) => {\n ticketTypeTireRelationsArray.push(..._values(item))\n })\n\n return ticketTypeTireRelationsArray\n}\n","import 'tf-seat-map-view/dist/index.css'\n\nimport React, { useEffect } from 'react'\nimport ReactDom from 'react-dom'\nimport SeatMapView from 'tf-seat-map-view'\n\nimport { getTierRelationsArray } from './utils'\n\nconst CONTAINER_DEFAULT_ID = 'seat_map_default_container'\n\n// Temp solution\ndeclare global {\n interface Window {\n tierPrices: any;\n }\n}\n\nexport const SeatMapComponent = (props: ISeatMapContainerProps) => {\n const { seatMapProps, mapContainerId } = props\n const {\n seatData,\n statuses,\n seatMapType = null,\n seatMapEvents = {},\n ticketTypeTierRelations = {},\n tierPrices,\n isReserving,\n predefinedSeats,\n } = seatMapProps\n\n useEffect(() => {\n const parentElement = document.getElementById(\n mapContainerId || CONTAINER_DEFAULT_ID\n )\n\n // Temp solution\n window.tierPrices = tierPrices\n\n if (Boolean(parentElement)) {\n const mapComponent = (\n <SeatMapView\n disabled={isReserving}\n loading={isReserving}\n events={seatMapEvents}\n isSelectionOn={false}\n seatData={seatData}\n statuses={statuses}\n ticketTypeTireRelationsArray={getTierRelationsArray(\n ticketTypeTierRelations\n )}\n width={Math.min(parentElement?.clientWidth || 800, 800)}\n height={Math.min(parentElement?.clientWidth || 800, 800)}\n isBlockMap={seatMapType === 'block'}\n isTableMap={seatMapType === 'table'}\n predefinedSeats={predefinedSeats}\n />\n )\n\n ReactDom.render(mapComponent, parentElement)\n }\n }, [\n isReserving,\n mapContainerId,\n seatData,\n seatMapEvents,\n seatMapType,\n tierPrices,\n statuses,\n ticketTypeTierRelations,\n ])\n\n return <div id={CONTAINER_DEFAULT_ID} />\n}\n","import { CSSProperties } from '@emotion/serialize'\nimport { createTheme, Select, SelectChangeEvent,ThemeOptions } from '@mui/material'\nimport CircularProgress from '@mui/material/CircularProgress'\nimport FormControl from '@mui/material/FormControl'\nimport InputLabel from '@mui/material/InputLabel'\nimport MenuItem from '@mui/material/MenuItem'\nimport { ThemeProvider } from '@mui/private-theming'\nimport _find from 'lodash/find'\nimport _identity from 'lodash/identity'\nimport _isEmpty from 'lodash/isEmpty'\nimport _keys from 'lodash/keys'\nimport _map from 'lodash/map'\nimport _some from 'lodash/some'\nimport React from 'react'\nimport { Button } from 'react-bootstrap'\n\nimport { createFixedFloatNormalizer } from '../../normalizers'\nimport { getButtonLabel, getTicketDropdownData } from './utils'\n\nexport const TicketsSection = (\n props: ITicketsSectionProps & {\n themeOptions?: ThemeOptions & {\n input?: CSSProperties;\n checkbox?: CSSProperties;\n };\n }\n) => {\n const {\n ticketTypeTierRelations,\n reservedSeats,\n theme = 'light',\n getTicketsBtnLabel,\n contentStyle = {},\n isButtonScrollable = false,\n themeOptions,\n handleGetTicketClick,\n handleCancelReservation,\n ticketDeleteButtonContent = 'Delete',\n selectedTickets,\n handleTicketSelect,\n currencySymbol,\n tableMapEnabled = false,\n guestCounts,\n setGuestCounts,\n isAddingToCart,\n } = props\n\n const bookButtonIsDisabled =\n _some(selectedTickets, item => !item) ||\n _isEmpty(reservedSeats) ||\n reservedSeats.length !== _keys(selectedTickets).length\n const themeMui = createTheme(themeOptions)\n\n const ticketsDropdownsData = getTicketDropdownData(\n reservedSeats,\n ticketTypeTierRelations\n )\n const handleTicketChange = (event: SelectChangeEvent<string>, seatId: string) => {\n const {\n target: { value },\n } = event\n\n if (value !== 'default') {\n handleTicketSelect(value, seatId)\n }\n }\n\n return (\n <ThemeProvider theme={themeMui}>\n <div className={`get-tickets-page ${theme}`} style={contentStyle}>\n <div className=\"tickets-section\">\n {_map(selectedTickets, (ticketItem: string, key: string) => {\n const dropdownData =\n _find(ticketsDropdownsData, item => item.seatId === key) ||\n ({} as ITicketsDropdownsData)\n\n const selectedTicketData = _find(\n dropdownData.ticketsData,\n ticket => ticket.ticket_type_id === ticketItem\n ) as TicketTypeTierRelationsData\n\n // guest count dropdown options\n const startNum = Number(\n selectedTicketData?.ticket_type_min_number_of_guests\n )\n const endNum = Number(\n selectedTicketData?.ticket_type_max_number_of_guests\n )\n const numLength = endNum - startNum + 1\n const showGuestCountDropdown = Boolean(startNum && endNum)\n\n // prices\n const guestPrice =\n (guestCounts[dropdownData.seatId] - startNum) *\n Number(selectedTicketData?.guest_price)\n\n const finalPrice = createFixedFloatNormalizer(2)(\n selectedTicketData?.ticket_type_price + guestPrice\n )\n\n return (\n <div className=\"ticket\" key={key}>\n <div className=\"ticketsDropdowns\">\n <Select\n value={ticketItem || 'default'}\n onChange={event =>\n handleTicketChange(event, dropdownData.seatId)\n }\n inputProps={{ 'aria-label': 'Without label' }}\n MenuProps={{\n PaperProps: {\n sx: { maxHeight: 150 },\n className: 'get-tickets-paper',\n },\n }}\n displayEmpty\n sx={{ borderRadius: 0 }}\n >\n <MenuItem value={'default'}>\n {`Please select ${\n tableMapEnabled ? 'Table Type' : 'Ticket Type'\n }`}\n </MenuItem>\n {_map(dropdownData.ticketsData, (option, index) => {\n if (option.ticket_type_id !== 'default') {\n return (\n <MenuItem value={option.ticket_type_id} key={index}>\n {option.ticket_type_name}\n </MenuItem>\n )\n }\n return null\n })}\n </Select>\n <Button\n className=\"ticket-delete\"\n onClick={() => {\n handleCancelReservation(\n dropdownData.seatId,\n dropdownData.tierId\n )\n }}\n >\n {ticketDeleteButtonContent}\n </Button>\n </div>\n {selectedTicketData && (\n <div style={{ display: 'flex', flexDirection: 'row' }}>\n <div\n style={{\n width: '100%',\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n }}\n >\n <div className=\"ticketPrice\">\n Price:\n <span className=\"ticketPrice-value\">\n {`${currencySymbol} ${finalPrice}`}\n </span>\n </div>\n {!_isEmpty(selectedTicketData.ticket_type_deposit) && (\n <div className=\"ticketDeposit\">\n Deposit:\n <span className=\"ticketPrice-value\">\n {` ${selectedTicketData?.ticket_type_deposit}%`}\n </span>\n </div>\n )}\n </div>\n {showGuestCountDropdown && (\n <div\n style={{\n width: '100%',\n display: 'flex',\n justifyContent: 'end',\n marginRight: 16,\n }}\n >\n <FormControl\n variant=\"outlined\"\n sx={{ m: 1, minWidth: 80 }}\n >\n <InputLabel\n id=\"demo-simple-select-standard-label\"\n shrink\n >\n GUESTS\n </InputLabel>\n <Select\n label=\"GUESTS\"\n labelId=\"demo-simple-select-standard-label\"\n value={guestCounts[dropdownData.seatId] || startNum}\n onChange={event => {\n setGuestCounts({\n ...guestCounts,\n [dropdownData.seatId]: Number(\n event.target.value\n ),\n })\n }}\n inputProps={{ 'aria-label': 'Without label' }}\n MenuProps={{\n PaperProps: {\n sx: { maxHeight: 150 },\n className: 'get-tickets-paper',\n },\n }}\n displayEmpty\n sx={{ borderRadius: 0 }}\n >\n {_map(\n Array.from(\n { length: numLength },\n (_, i) => startNum + i\n ),\n (option, index) => (\n <MenuItem value={option} key={index}>\n {option}\n </MenuItem>\n )\n )}\n </Select>\n </FormControl>\n </div>\n )}\n </div>\n )}\n </div>\n )\n })}\n </div>\n <div>\n <Button\n className={`book-button\n ${bookButtonIsDisabled ? 'disabled' : ''}\n ${isButtonScrollable ? 'is-scrollable' : ''}\n `}\n onClick={!bookButtonIsDisabled ? handleGetTicketClick : _identity}\n disabled={isAddingToCart}\n >\n {isAddingToCart ? (\n <CircularProgress size={20} style={{ marginLeft: 10 }} />\n ) : (\n getTicketsBtnLabel ||\n getButtonLabel(reservedSeats.length, tableMapEnabled)\n )}\n </Button>\n </div>\n </div>\n </ThemeProvider>\n )\n}\n","/* eslint-disable max-len */\nexport const VERIFICATION_STATUSES = {\n PENDING: 'PENDING',\n APPROVED: 'APPROVED_VERIFIED',\n FAILED: 'FAILED',\n WRONG_CUSTOMER: 'WRONG_CUSTOMER',\n}\n\nexport const TRANSACTION_STATUSES = {\n ERROR: 'ERROR',\n SUCCESS: 'SUCCESS',\n}\n\nexport const VERIFICATION_MESSAGES = {\n PENDING: 'Your ID verification is currently being processed. We will notify you as soon as it is completed. Thank you for your patience.',\n APPROVED: 'Your ID verification is approved!',\n FAILED: 'Unfortunately your ID verification has failed. Please try again.',\n WRONG_CUSTOMER: 'The order does not belong to the customer.'\n}\n","import React from 'react'\nimport Modal from '@mui/material/Modal'\nimport Box from '@mui/material/Box'\n\ninterface IRedirectModal {\n message: string\n onClickOk: () => void\n}\n\nconst style: React.CSSProperties = {\n position: 'absolute',\n top: '10%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n minWidth: 480,\n backgroundColor: '#e3e3e3',\n border: '1px solid white',\n outline: 'none',\n padding: '14px',\n maxHeight: '85vh',\n overflow: 'auto',\n}\n\nexport const RedirectModal = ({\n message = 'Your cart has expired. Please click on \"OK\" to return to the ticket selection page.',\n onClickOk = () => {},\n}: IRedirectModal) => {\n return (\n <Modal\n open={true}\n aria-labelledby=\"modal-modal-title\"\n aria-describedby=\"modal-modal-description\"\n className=\"redirect-modal\"\n >\n <Box style={style}>\n <p>{message}</p>\n <div className=\"footer\">\n <button onClick={onClickOk}>OK</button>\n </div>\n </Box>\n </Modal>\n )\n}\n","import React, { useState } from 'react'\nimport { Field, Form, Formik } from 'formik'\nimport Button from '@mui/material/Button'\nimport Modal from '@mui/material/Modal'\nimport Box from '@mui/material/Box'\nimport { CustomField, Loader } from '../common/index'\nimport { combineValidators, requiredValidator, emailValidator } from '../../validators'\nimport { sendRSVPInfo } from '../../api'\n\ninterface IRsvpContainerPage {\n showSection?: boolean;\n eventId: number;\n}\n\ninterface IRSVPValuesTypes {\n email: string;\n}\n\nconst style: React.CSSProperties = {\n position: 'absolute',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n minWidth: 480,\n backgroundColor: '#e3e3e3',\n border: '1px solid white',\n outline: 'none',\n padding: '14px',\n maxHeight: '85vh',\n overflow: 'auto'\n}\n\nexport const RsvpContainer = ({ showSection = false, eventId }: IRsvpContainerPage) => {\n const userDataEncoded =\n typeof window !== 'undefined' ? window.localStorage.getItem('user_data') : ''\n const parsedData = JSON.parse(userDataEncoded || '{}')\n\n const [loading, setLoading] = useState(false)\n const [modal, setModal] = useState({ isOpen: false, text: '' })\n\n const handleModalClose = () => {\n setModal({ isOpen: false, text: '' })\n }\n\n const handleSubmit = async (values: IRSVPValuesTypes) => {\n try {\n setLoading(true)\n\n const requestData = {\n data: {\n email: values.email\n }\n }\n const { data } = await sendRSVPInfo(eventId, requestData)\n\n setModal({ isOpen: true, text: data.message })\n } catch (error) {\n if (error.response.status === 403) {\n setModal({ isOpen: true, text: error.response.data?.message })\n }\n } finally {\n setLoading(false)\n }\n }\n\n if (!showSection) {\n return null\n }\n\n return (\n <>\n <Modal\n open={modal.isOpen}\n onClose={handleModalClose}\n aria-labelledby=\"modal-modal-title\"\n aria-describedby=\"modal-modal-description\"\n className=\"rsvp-modal\"\n >\n <Box style={style} className=\"rsvp-modal-box\">\n <div className=\"rsvp-modal-container\">\n <div className=\"rsvp-modal-header\">{modal.text}</div>\n <div className=\"rsvp-modal-button\">\n <button onClick={handleModalClose}>OK</button>\n </div>\n </div>\n </Box>\n </Modal>\n <div className=\"rsvp-container\">\n {loading ? (\n <Loader />\n ) : (\n <>\n <div className=\"rsvp-header\">RSVP</div>\n <div className=\"rsvp-email-container\">\n <Formik\n initialValues={{\n email: parsedData?.email || ''\n }}\n onSubmit={handleSubmit}\n enableReinitialize\n >\n <Form>\n <div className=\"rsvp-email-input-container\">\n <Field\n name=\"email\"\n label=\"EMAIL ADDRESS\"\n type=\"email\"\n validate={combineValidators(\n (value: string) => requiredValidator(value, 'Please enter your Email'),\n (value: string) => emailValidator(value)\n )}\n component={CustomField}\n />\n </div>\n <div className=\"rsvp-button-container\">\n <Button type=\"submit\">RSVP</Button>\n </div>\n </Form>\n </Formik>\n </div>\n </>\n )}\n </div>\n </>\n )\n}\n","/* eslint-disable react/no-unescaped-entities */\n\nimport { CircularProgress } from '@mui/material'\nimport { Form, Formik } from 'formik'\nimport _get from 'lodash/get'\nimport _identity from 'lodash/identity'\nimport React, { useEffect, useState } from 'react'\n\nimport {\n getAddons,\n getCart,\n getCheckoutPageConfigs,\n postOnCheckout,\n} from '../../api'\nimport { currencyNormalizerCreator } from '../../normalizers'\nimport { ICheckoutPageConfigs } from '../../types'\nimport {\n createCheckoutDataBodyWithDefaultHolder,\n createMarkup,\n getQueryVariable,\n} from '../../utils'\nimport { VerificationPendingModal } from '../idVerificationContainer/VerificationPendingModal'\nimport TimerWidget from '../timerWidget'\nimport { addonsWithGroupsAdapter, cartAdapter } from './adapters'\nimport AddonComponent from './AddonComponent'\nimport { getNormalizedPrice } from './normalizers'\nimport {\n generateSelectOptions,\n getAddonSelectOptions,\n getSortedAddons,\n getTicketRelatedAddons,\n isAtLeastOneAddonSelected,\n} from './utils'\n\nexport interface IAddonContainterProps {\n classNamePrefix?: string;\n enableBillingInfoAutoCreate?: boolean;\n enableTimer?: boolean;\n onGetAddonsPageInfoSuccess?: (res: any) => void;\n onGetAddonsPageInfoError?: (error: any) => void;\n onPostCheckoutSuccess?: (res: any) => void;\n onPostCheckoutError?: (error: any) => void;\n onConfirmSelectionSuccess?: (res: any) => void;\n onConfirmSelectionError?: (error: any) => void;\n onCountdownFinish?: () => void;\n onPendingVerification?: () => void;\n}\n\nexport interface ObjectLiteral {\n [key: string]: any;\n}\n\nexport const AddonsContainter = ({\n classNamePrefix = 'add_on',\n enableBillingInfoAutoCreate = true,\n enableTimer = false,\n onGetAddonsPageInfoSuccess = _identity,\n onGetAddonsPageInfoError = _identity,\n onPostCheckoutSuccess = _identity,\n onPostCheckoutError = _identity,\n onConfirmSelectionSuccess = _identity,\n onConfirmSelectionError = _identity,\n onCountdownFinish = _identity,\n onPendingVerification = _identity,\n}: IAddonContainterProps) => {\n const eventId = getQueryVariable('event_id')\n const [addons, setAddons] = useState<any>([])\n const [addonsOptions, setAddonsOptions] = useState<any>({})\n const [groupsWithSelectedVariants, setGroupsWithSelectedVariants] = useState<\n any\n >({})\n const [\n groupsWithInitialVariantsValues,\n setGroupsWithInitialVariantsValues,\n ] = useState<any>({})\n const [loading, setLoading] = useState(true)\n const [cartExpirationTime, setCartExpirationTime] = useState(0)\n const [pendingVerificationMessage, setPendingVerificationMessage] = useState()\n\n useEffect(() => {\n const getAddonsPageInfo = async () => {\n try {\n if (eventId) {\n setLoading(true)\n\n // Get choosed ticket info (id, count) from Cart request for addons options calculations\n const cart = await getCart()\n const { id: choosedTicketID, quantity, expiresAt } = cartAdapter(cart)\n const choosedTicketCount = Number(quantity)\n setCartExpirationTime(expiresAt)\n\n // Get and collect addons data\n const addonsData = await getAddons(eventId)\n const adaptedAddons = addonsWithGroupsAdapter(addonsData)\n const ticketRelatedAddons = getTicketRelatedAddons(\n adaptedAddons,\n choosedTicketID\n )\n const sortedTicketAddons = getSortedAddons(ticketRelatedAddons)\n\n setAddons(sortedTicketAddons)\n\n // Collect addons and addon group options\n const {\n addonsWithOptions,\n groupsWithSelectedVariantsInfo,\n groupsWithVariants,\n } = getAddonSelectOptions(adaptedAddons, choosedTicketCount)\n\n setAddonsOptions(addonsWithOptions)\n setGroupsWithSelectedVariants(groupsWithSelectedVariantsInfo)\n setGroupsWithInitialVariantsValues(groupsWithVariants)\n\n // Success callback props\n onGetAddonsPageInfoSuccess(addonsData)\n }\n } catch (e) {\n // Callback error props\n onGetAddonsPageInfoError(e)\n } finally {\n setLoading(false)\n }\n }\n\n getAddonsPageInfo()\n }, [])\n\n const recreateGroupVariantsSelectOptions = (\n groupId: any,\n changedGroupd: any\n ) => {\n const { choosedVariants, limit, selectedCount } = changedGroupd\n const remainingGroupStock = limit - selectedCount\n const recreatedVariantsOptions: ObjectLiteral = {}\n\n // Regenerate variants allowed stock counts\n for (const variant in choosedVariants) {\n const variantId = variant\n const variantCurrSelectedValue = choosedVariants[variant]\n let allowedOptionCount\n\n // Formula for regenerating\n if (\n remainingGroupStock >=\n groupsWithInitialVariantsValues[groupId][variantId] -\n variantCurrSelectedValue\n ) {\n allowedOptionCount = groupsWithInitialVariantsValues[groupId][variantId]\n } else {\n allowedOptionCount = remainingGroupStock + variantCurrSelectedValue\n }\n\n recreatedVariantsOptions[variantId] = generateSelectOptions(\n 0,\n allowedOptionCount\n )\n }\n\n setAddonsOptions((prevState: any) =>\n Object.assign({}, prevState, recreatedVariantsOptions)\n )\n }\n\n const onFieldChange = (id: any, value: any, addon: any) => {\n // If changeableGroup exsists it means that group with limitation variant was changed\n const changeableGroup = groupsWithSelectedVariants[addon.id]\n\n if (changeableGroup) {\n const currGroupId = addon.id\n const currSelectedVariantId = id\n const currSelectedVariantCount = Number(value)\n const currSelectedVariantPrevCount =\n groupsWithSelectedVariants[currGroupId].choosedVariants[\n currSelectedVariantId\n ]\n\n const currSelectedGroupCount =\n changeableGroup.selectedCount +\n (currSelectedVariantCount - currSelectedVariantPrevCount)\n\n // Update Group info\n const updatedGroupsWithSelectedVariants = {\n ...groupsWithSelectedVariants,\n [currGroupId]: {\n ...groupsWithSelectedVariants[currGroupId],\n selectedCount: currSelectedGroupCount,\n choosedVariants: {\n ...groupsWithSelectedVariants[currGroupId].choosedVariants,\n [currSelectedVariantId]: currSelectedVariantCount,\n },\n },\n }\n setGroupsWithSelectedVariants(updatedGroupsWithSelectedVariants)\n\n // Recreate Select Options for Addon Group Variants\n recreateGroupVariantsSelectOptions(\n currGroupId,\n updatedGroupsWithSelectedVariants[currGroupId]\n )\n }\n }\n\n const handleConfirm = async (values: any, skipAddonPage?: boolean) => {\n try {\n const pageConfigsDataResponse = await getCheckoutPageConfigs()\n const pageConfigsData: ICheckoutPageConfigs =\n _get(pageConfigsDataResponse, 'data.attributes') || {}\n\n const isWindowDefined = typeof window !== 'undefined'\n const skipBillingPage = pageConfigsData.skip_billing_page ?? false\n const nameIsRequired = pageConfigsData.names_required ?? false\n const ageIsRequired = pageConfigsData.age_required ?? false\n const phoneIsRequired = pageConfigsData.phone_required ?? false\n const hasAddOn = pageConfigsData.has_add_on ?? false\n const freeTicket = pageConfigsData.free_ticket ?? false\n const collectOptionalWalletAddress =\n pageConfigsData.collect_optional_wallet_address ?? false\n const collectMandatoryWalletAddress =\n pageConfigsData.collect_mandatory_wallet_address ?? false\n\n if (skipBillingPage && enableBillingInfoAutoCreate) {\n const ticketsQuantity = window.localStorage.getItem('quantity')\n const userData = JSON.parse(\n window.localStorage.getItem('user_data') || '{}'\n )\n\n const checkoutBody = createCheckoutDataBodyWithDefaultHolder(\n Number(ticketsQuantity) || 0,\n userData\n )\n\n try {\n const checkoutResponse = await postOnCheckout({\n ...checkoutBody,\n attributes: {\n ...checkoutBody.attributes,\n ...(!skipAddonPage && { add_ons: values }),\n },\n })\n const hash = _get(checkoutResponse, 'data.data.attributes.hash')\n const total = _get(checkoutResponse, 'data.data.attributes.total')\n\n isWindowDefined && window.localStorage.removeItem('quantity')\n isWindowDefined && window.localStorage.removeItem('add_ons')\n\n onPostCheckoutSuccess(checkoutResponse?.data)\n onConfirmSelectionSuccess({\n skip_billing_page: skipBillingPage,\n names_required: nameIsRequired,\n phone_required: phoneIsRequired,\n age_required: ageIsRequired,\n event_id: String(eventId),\n hash,\n total,\n hasAddOn,\n free_ticket: freeTicket,\n collect_optional_wallet_address: collectOptionalWalletAddress,\n collect_mandatory_wallet_address: collectMandatoryWalletAddress,\n })\n } catch (error) {\n if (error.response?.data?.data?.hasUnverifiedOrder) {\n setPendingVerificationMessage(error.response?.data?.message)\n } else {\n onPostCheckoutError(error)\n onConfirmSelectionError(error)\n }\n }\n } else {\n if (isWindowDefined) {\n if (!skipAddonPage) {\n window.localStorage.setItem('add_ons', JSON.stringify(values))\n }\n\n onConfirmSelectionSuccess({\n skip_billing_page: skipBillingPage && enableBillingInfoAutoCreate,\n names_required: nameIsRequired,\n phone_required: phoneIsRequired,\n age_required: ageIsRequired,\n event_id: String(eventId),\n hasAddOn,\n })\n } else {\n onConfirmSelectionError({\n error: true,\n message: 'Window is not defined',\n })\n }\n }\n } catch (e) {\n onConfirmSelectionError(e)\n }\n }\n\n const handleClearAddons = () => {\n window.localStorage.removeItem('add_ons')\n }\n\n if (loading) {\n return (\n <div className={`${classNamePrefix}_loader`}>\n <CircularProgress size={50} />\n </div>\n )\n }\n\n return (\n <>\n {!!cartExpirationTime && enableTimer && (\n <TimerWidget\n expires_at={cartExpirationTime}\n onCountdownFinish={() => {\n handleClearAddons()\n onCountdownFinish()\n }}\n />\n )}\n <div className={`${classNamePrefix}_container`}>\n <div className={`${classNamePrefix}_block`}>\n <div className={`${classNamePrefix}_line_block`}>\n <p className={`${classNamePrefix}_info_title`}>Get Your Tickets</p>\n <button\n type=\"button\"\n className={`${classNamePrefix}_skip`}\n onClick={() => {\n handleClearAddons()\n handleConfirm({}, true)\n }}\n >\n Skip\n </button>\n </div>\n <div className={`${classNamePrefix}_title`}>UPGRADES & ADD-ONS</div>\n <div className={`${classNamePrefix}_subtitle`}>\n PLEASE SELECT FROM THE OPTIONAL ADD-ONS BELOW\n </div>\n <Formik\n initialValues={{}}\n onSubmit={values => {\n handleConfirm(values)\n }}\n >\n {({ values }) => {\n const isConfirmDisabled = !isAtLeastOneAddonSelected(values)\n\n return (\n <Form autoComplete=\"off\" className=\"form_holder\">\n <>\n {addons.map((addon: any) => {\n const price = addon.feeIncluded ? addon.price : addon.cost\n const isAddonFree = Number(price) === 0\n\n const addonNormalizedPrice = isAddonFree\n ? 'FREE'\n : currencyNormalizerCreator(\n getNormalizedPrice(price),\n addon.currency\n )\n\n return (\n <div\n key={addon.id}\n className={`${classNamePrefix}_product_block`}\n >\n <div className={`${classNamePrefix}_product_images`}>\n {addon.imageUrl && (\n <div\n className={`${classNamePrefix}_product_image_block`}\n >\n <img src={addon.imageUrl} alt=\"No Data\" />\n </div>\n )}\n </div>\n <div\n className={`${classNamePrefix}_product_info_block`}\n >\n <div className={`${classNamePrefix}_product_title`}>\n {addon.name}\n </div>\n <div className={`${classNamePrefix}_product_price`}>\n {addonNormalizedPrice}\n {!isAddonFree && (\n <span\n className={`${classNamePrefix}_product_fee`}\n >\n {addon.feeIncluded\n ? '(incl. Fees)'\n : '(excl. Fees)'}\n </span>\n )}\n </div>\n </div>\n <div\n className={`${classNamePrefix}_product_desc`}\n dangerouslySetInnerHTML={createMarkup(\n addon.description\n )}\n />\n <div\n className={`${classNamePrefix}_product_select_container`}\n >\n {addon.variants ? (\n addon.variants.map((variant: any) => (\n // Group Variants\n <AddonComponent\n key={variant.id}\n data={variant}\n selectOptions={addonsOptions[variant.id]}\n classNamePrefix={classNamePrefix}\n handleAddonChange={(id, value) =>\n onFieldChange(id, value, addon)\n }\n />\n ))\n ) : (\n // Simple Addon\n <AddonComponent\n key={addon.id}\n data={addon}\n selectOptions={addonsOptions[addon.id]}\n classNamePrefix={classNamePrefix}\n handleAddonChange={(id, value) =>\n onFieldChange(id, value, addon)\n }\n />\n )}\n </div>\n </div>\n )\n })}\n <button\n type=\"submit\"\n className={`${\n isConfirmDisabled\n ? `${classNamePrefix}_is_disabled`\n : ''\n } ${classNamePrefix}_submit_button`}\n disabled={isConfirmDisabled}\n >\n CONFIRM SELECTION\n </button>\n </>\n </Form>\n )\n }}\n </Formik>\n </div>\n </div>\n <VerificationPendingModal\n message={pendingVerificationMessage}\n onClose={() => {\n onPendingVerification()\n }}\n />\n </>\n )\n}\n","export const getNormalizedPrice = (value: any) => {\n const minimizedValue = Number(value) / 100\n const normalized = minimizedValue.toFixed(2)\n return normalized\n}","/* eslint-disable react/no-unescaped-entities */\nimport './style.css'\n\nimport Modal from '@mui/material/Modal'\nimport { AxiosError } from 'axios'\nimport _get from 'lodash/get'\nimport _identity from 'lodash/identity'\nimport _map from 'lodash/map'\nimport React, { useEffect, useRef, useState } from 'react'\n\nimport { getConfirmationData } from '../../api'\nimport { usePixel } from '../../hooks/usePixel'\nimport { IReferralPromotion } from '../../types'\nimport { createMarkup, isBrowser } from '../../utils'\nimport SocialButtons from './social-buttons'\n\nexport interface IShareButton {\n mainLabel: string;\n subLabel: string;\n platform: string;\n shareData: any;\n}\n\nexport interface IConfirmationLabels {\n confirmationTitle?: string;\n confirmationMain?: string;\n confirmationHelper?: string;\n}\n\nexport interface IConfirmationPage {\n hasCopyIcon?: boolean;\n isReferralEnabled: boolean;\n showDefaultShareButtons: boolean;\n messengerAppId: string;\n shareButtons: IShareButton[];\n onGetConfirmationDataSuccess: (res: any) => void;\n onGetConfirmationDataError: (e: AxiosError) => void;\n onLinkCopied: () => void;\n orderHash?: string;\n confirmationLabels: IConfirmationLabels;\n clientLabel?: string;\n showReferralsInfoText?: boolean;\n showCopyInfoModal?: boolean;\n showPricingNoteSection?: boolean;\n}\n\nexport const ConfirmationContainer = ({\n confirmationLabels,\n hasCopyIcon = true,\n isReferralEnabled,\n showDefaultShareButtons,\n messengerAppId = '',\n shareButtons = [],\n onGetConfirmationDataSuccess = _identity,\n onGetConfirmationDataError = _identity,\n orderHash,\n onLinkCopied = _identity,\n clientLabel,\n showReferralsInfoText = false,\n showCopyInfoModal = false,\n showPricingNoteSection = false,\n}: IConfirmationPage) => {\n const inputRef = useRef(null)\n const [data, setData] = useState<any>(null)\n const dataEncoded =\n (isBrowser && window.localStorage.getItem('checkoutData')) || ''\n const dataDecoded = dataEncoded\n ? JSON.parse(dataEncoded)\n : { hash: orderHash }\n const { hash } = dataDecoded\n const eventId = data?.product_id || ''\n\n useEffect(() => {\n (async () => {\n if (hash) {\n try {\n const response = await getConfirmationData(hash)\n const data = _get(response, 'data.data.attributes')\n data.personal_share_sales = data.personal_share_sales.map(\n (d: any) => {\n const salesData: IReferralPromotion = {\n label: `If your friends buy ${d.sales} tickets`,\n price: '',\n }\n if (d.price === 0) {\n salesData.subLabel = 'Your ticket becomes'\n salesData.price = 'FREE!'\n } else {\n salesData.subLabel = 'Your ticket goes down to'\n salesData.price = data.currency.symbol + d.price?.toFixed(2)\n }\n\n return salesData\n }\n )\n data.personal_share_sales.unshift({\n label: 'Your ticket is currently',\n price: data.currency.symbol + data.product_price?.toFixed(2),\n })\n setData(data)\n onGetConfirmationDataSuccess(response.data)\n } catch (error) {\n onGetConfirmationDataError(error.response)\n }\n }\n })()\n }, [])\n\n const [showCopyModal, setShowCopyModal] = useState(false)\n\n const onClose = () => {\n setShowCopyModal(false)\n }\n\n const onChangeShareLink = (e: React.ChangeEvent<HTMLInputElement>) => {\n const newData = { ...data, personal_share_link: e.target.value }\n setData(newData)\n }\n const {\n confirmationTitle = 'Your Tickets are Confirmed!',\n confirmationMain = 'Your tickets are available in My Tickets section',\n confirmationHelper = 'Please bring them with you to the event',\n } = confirmationLabels\n\n const pageUrl = isBrowser ? window.location.href.split('?')[0] : ''\n usePixel(eventId, { page: 'complete', pageUrl, orderHash: hash })\n\n return (\n <div className=\"confirmation-page\">\n {showCopyInfoModal && (\n <Modal\n open={showCopyModal}\n onClose={onClose}\n aria-labelledby=\"modal-modal-title\"\n aria-describedby=\"modal-modal-description\"\n className=\"success-copy-modal\"\n >\n <div className=\"message-copy-success-box\">\n <div className=\"message-copy-success\">\n <span>\n Copied to your clipboard! Now paste your link in a Snapchat\n message,\n </span>\n <span>your Instagram bio, Whatsapp, Facebook or a text :)</span>\n </div>\n <div className=\"footer\">\n <button className=\"footer-button\" type=\"button\" onClick={onClose}>\n OK\n </button>\n </div>\n </div>\n </Modal>\n )}\n {data && (\n <>\n <div className=\"header-container\">\n <div className=\"header-product-image\">\n <img alt=\"\" className=\"product-image\" src={data.product_image} />\n </div>\n <div className=\"header-product-text\">\n <p className=\"title\">{confirmationTitle}</p>\n <div\n className=\"share-message-section\"\n dangerouslySetInnerHTML={\n data.custom_confirmation_page_text &&\n data.custom_confirmation_page_text_full_replacement\n ? createMarkup(data.custom_confirmation_page_text)\n : undefined\n }\n >\n {data.custom_confirmation_page_text &&\n data.custom_confirmation_page_text_full_replacement ? (\n undefined\n ) : (\n <>\n {data.attach_tickets ? (\n <span className=\"main\">\n Your tickets have been emailed to you\n </span>\n ) : (\n <span className=\"main\">{confirmationMain}</span>\n )}\n <span className=\"helper\">\n {data.attach_tickets\n ? 'Please bring them with you to the event'\n : confirmationHelper}\n </span>\n </>\n )}\n </div>\n </div>\n </div>\n {data.custom_confirmation_page_text &&\n !data.custom_confirmation_page_text_full_replacement ? (\n <div\n className=\"custom-confirmation-page-text\"\n dangerouslySetInnerHTML={createMarkup(\n data.custom_confirmation_page_text\n )}\n />\n ) : null}\n {data.disable_referral === false && isReferralEnabled && (\n <>\n <div className=\"referral_text_image_section\">\n <div className=\"referral_text_section\">\n <div className=\"referral_title_text\">\n Your ticket can become\n <span className=\"strong-text\"> cheaper </span>\n or even\n <span className=\"strong-text\"> FREE!</span>\n </div>\n <div className=\"referral_text\">\n <span className=\"strong-text\"> Invite friends </span>\n and we'll refund up to\n <span className=\"strong-text\"> 100% </span>\n of your ticket money, if they buy tickets as well!\n </div>\n </div>\n <img\n className=\"body-product-image\"\n src={data.product_image}\n alt=\"No Data\"\n />\n </div>\n <div className=\"share_wrapper\">\n <div className=\"share_section\">\n <div className=\"invitation_section\">\n <div className=\"invitation_title\">\n How do you invite your friends?\n </div>\n <div className=\"share_buttons\">\n <div className=\"share-by-link\">\n <h5 className=\"share-by-link label\">\n Send them this link:\n </h5>\n <div className=\"share-btn-inner\">\n <input\n ref={inputRef}\n className=\"share-input\"\n value={data.personal_share_link}\n onChange={onChangeShareLink}\n />\n <div\n aria-hidden={true}\n className=\"share-by-link-copy-icon\"\n onClick={() => {\n navigator.clipboard.writeText(\n _get(inputRef, 'current.value')\n )\n setShowCopyModal(true)\n onLinkCopied()\n }}\n >\n {hasCopyIcon ? (\n <img\n src=\"https://img.icons8.com/office/50/000000/copy.png\"\n alt=\"copy\"\n />\n ) : (\n <span className=\"copy-icon\">Copy</span>\n )}\n </div>\n </div>\n </div>\n {(showDefaultShareButtons || !!shareButtons.length) && (\n <SocialButtons\n showDefaultShareButtons={showDefaultShareButtons}\n name={data.product_name}\n appId={messengerAppId}\n shareLink={data.personal_share_link}\n shareButtons={shareButtons}\n clientLabel={clientLabel}\n showReferralsInfoText={showReferralsInfoText}\n />\n )}\n </div>\n </div>\n </div>\n <div className=\"pricing-section\">\n <div className=\"invitation_title\">How much cheaper?</div>\n {_map(data.personal_share_sales, (pricing, index) => (\n <div key={index} className=\"pricing-section_wrapper\">\n <div className=\"pricing-section_label\">\n {pricing.label}\n {pricing.subLabel && (\n <div className=\"pricing-section_sublabel\">\n {pricing.subLabel}\n </div>\n )}\n </div>\n <div className=\"pricing-section_price\">\n {' '}\n {pricing.price}\n </div>\n </div>\n ))}\n {showPricingNoteSection && (\n <div className=\"note-pricing-section\">\n ^ This is based on the most expensive ticket in your\n order.\n </div>\n )}\n </div>\n </div>\n </>\n )}\n </>\n )}\n </div>\n )\n}\n","import Button from '@mui/material/Button'\nimport { AxiosError } from 'axios'\nimport _identity from 'lodash/identity'\nimport _isEmpty from 'lodash/isEmpty'\nimport React, { useEffect, useState } from 'react'\n\nimport {\n checkCustomerOrder,\n checkVerificationStatus,\n getNetverifyUrl,\n updateVerificationStatus,\n} from '../../api'\nimport {\n GetNetverifyUrlResponseData,\n VerificationStatusResponseData,\n} from '../../types/verification'\nimport { getQueryVariable, isJson } from '../../utils'\nimport Modal from '../common/ModalComponent'\nimport { VERIFICATION_MESSAGES, VERIFICATION_STATUSES } from './constants'\n\ninterface IDVerificationProps {\n onGetVerifyUrlSuccess?: (response: GetNetverifyUrlResponseData) => void;\n onGetVerifyUrlError?: (error: AxiosError) => void;\n\n onGetVerificationStatusSuccess?: (response: {\n data: VerificationStatusResponseData;\n }) => void;\n onGetVerificationStatusError?: (error: AxiosError) => void;\n\n onVerificationMessageModalClose?: (status: string | null) => void;\n\n onPassVerificationStepsSuccess?: () => void;\n onPassVerificationStepsError?: (error: AxiosError) => void;\n}\n\nexport const IDVerification = (props: IDVerificationProps) => {\n const {\n onGetVerifyUrlSuccess = _identity,\n onGetVerifyUrlError = _identity,\n\n onGetVerificationStatusSuccess = _identity,\n onGetVerificationStatusError = _identity,\n\n onVerificationMessageModalClose = _identity,\n\n onPassVerificationStepsSuccess = _identity,\n onPassVerificationStepsError = _identity,\n } = props\n\n const [loadingStatus, setLoadingStatus] = useState(true)\n const [verificationStatus, setVerificationStatus] = useState<string | null>(\n null\n )\n const [showModal, setShowModal] = useState(false)\n const [netverifyUrl, setNetverifyUrl] = useState<string | null>(null)\n const [modalData, setModalData] = useState({\n message: '',\n hideCancelBtn: true,\n displaModal: false,\n })\n\n const isAccountVerifiedOrPending =\n (verificationStatus === VERIFICATION_STATUSES.APPROVED ||\n verificationStatus === VERIFICATION_STATUSES.PENDING) &&\n verificationStatus !== VERIFICATION_STATUSES.WRONG_CUSTOMER\n\n const handleClose = () => {\n setModalData({\n message: '',\n displaModal: false,\n hideCancelBtn: true,\n })\n\n onVerificationMessageModalClose(verificationStatus)\n }\n\n useEffect(() => {\n const callbackNetVerify = async (e: any) => {\n if (e.data && isJson(e.data)) {\n try {\n const result = JSON.parse(e.data)\n if (\n result.payload &&\n (result.payload.value === 'success' ||\n result.payload.transactionStatus === 'SUCCESS')\n ) {\n await updateVerificationStatus()\n onPassVerificationStepsSuccess()\n } else if (\n result.payload &&\n (result.payload.value === 'error' ||\n result.payload.transactionStatus === 'ERROR')\n ) {\n setShowModal(false)\n onPassVerificationStepsError(result.payload)\n }\n } catch (e) {\n onPassVerificationStepsError(e)\n }\n }\n }\n\n window.addEventListener('message', callbackNetVerify)\n\n return () => {\n window.removeEventListener('message', callbackNetVerify)\n }\n }, [])\n\n useEffect(() => {\n let intervalId: any = null\n const orderHash = getQueryVariable('order_hash') || ''\n\n const getUrl = async () => {\n try {\n const urlResponse = await getNetverifyUrl()\n setNetverifyUrl(urlResponse.netverifyUrl)\n onGetVerifyUrlSuccess(urlResponse)\n } catch (error) {\n onGetVerifyUrlError(error)\n }\n }\n\n const getVerificationStatus = async () => {\n try {\n const statusResponse = await checkVerificationStatus()\n const { status } = statusResponse.data.attributes\n\n if (verificationStatus !== status) {\n setVerificationStatus(status)\n setModalData({\n displaModal:\n status === VERIFICATION_STATUSES.APPROVED ||\n status === VERIFICATION_STATUSES.FAILED,\n hideCancelBtn: true,\n message:\n status === VERIFICATION_STATUSES.APPROVED\n ? VERIFICATION_MESSAGES.APPROVED\n : status === VERIFICATION_STATUSES.FAILED\n ? VERIFICATION_MESSAGES.FAILED\n : status,\n })\n }\n onGetVerificationStatusSuccess(statusResponse)\n } catch (error) {\n onGetVerificationStatusError(error)\n } finally {\n setLoadingStatus(false)\n }\n }\n\n const getCustomerOrderStatus = async () => {\n try {\n const customerOrderResponse = await checkCustomerOrder(orderHash)\n return customerOrderResponse\n } catch (error) {\n throw error\n }\n }\n\n const makeRequests = async () => {\n try {\n if (orderHash) {\n await getCustomerOrderStatus()\n }\n getUrl()\n getVerificationStatus()\n\n // Check the verification status every 30 seconds\n intervalId = setInterval(() => {\n getVerificationStatus()\n }, 10000)\n } catch (error) {\n if (\n error.response?.data?.message === VERIFICATION_MESSAGES.WRONG_CUSTOMER\n ) {\n setVerificationStatus(VERIFICATION_STATUSES.WRONG_CUSTOMER)\n setModalData({\n displaModal: true,\n hideCancelBtn: true,\n message: VERIFICATION_MESSAGES.WRONG_CUSTOMER,\n })\n }\n }\n }\n\n makeRequests()\n\n // Clear the interval when the component unmounts\n return () => clearInterval(intervalId)\n }, [])\n\n const iframe = (netverifyUrl: string) => {\n // eslint-disable-next-line max-len\n const iframe = `<iframe allowFullScreen id=\"verificationIframe\" frameBorder=\"0\" width=\"100%\" height=\"570px\" allow=\"camera;fullscreen;accelerometer;gyroscope;magnetometer\" src=\"${netverifyUrl}\"></iframe>`\n return {\n __html: iframe,\n }\n }\n\n useEffect(() => {\n const isWindowDefined = typeof window !== 'undefined'\n const orderHash = getQueryVariable('order_hash')\n\n if (isWindowDefined) {\n const checkoutData = JSON.parse(\n window.localStorage.getItem('checkoutData') || '{}'\n )\n if (_isEmpty(checkoutData) && orderHash) {\n window.localStorage.setItem(\n 'checkoutData',\n JSON.stringify({ hash: orderHash })\n )\n }\n }\n }, [])\n\n return (\n <div>\n <h2 className=\"page-header\">Account Verification</h2>\n {loadingStatus ? null : (\n <>\n {!isAccountVerifiedOrPending && (\n <div className=\"verify-message\">\n To complete the purchase, please verify your identity.\n </div>\n )}\n {verificationStatus === VERIFICATION_STATUSES.PENDING && (\n <div className=\"verify-message\">\n {VERIFICATION_MESSAGES.PENDING}\n </div>\n )}\n {!isAccountVerifiedOrPending && (\n <Button\n type=\"button\"\n variant=\"contained\"\n className=\"verify-button\"\n onClick={() => {\n setShowModal(true)\n }}\n >\n Verify\n </Button>\n )}\n </>\n )}\n\n {modalData.displaModal && (\n <Modal\n modalClassName=\"verification-message-modal\"\n actions={[\n {\n id: 'ok',\n label: 'Ok',\n variant: 'contained',\n onClick: handleClose,\n },\n ]}\n >\n <div className=\"verify-message\">{modalData.message}</div>\n </Modal>\n )}\n\n {showModal && (\n <Modal\n modalClassName=\"id-verification-modal\"\n actions={[\n {\n id: 'close',\n label: 'Close',\n variant: 'contained',\n onClick: () => {\n setShowModal(false)\n },\n },\n ]}\n >\n <div dangerouslySetInnerHTML={iframe(netverifyUrl || '')} />\n </Modal>\n )}\n </div>\n )\n}\n","import './style.css'\n\nimport Autocomplete from '@mui/material/Autocomplete'\nimport CircularProgress from '@mui/material/CircularProgress'\nimport Paper from '@mui/material/Paper'\nimport Table from '@mui/material/Table'\nimport TableBody from '@mui/material/TableBody'\nimport TableCell from '@mui/material/TableCell'\nimport TableContainer from '@mui/material/TableContainer'\nimport TableHead from '@mui/material/TableHead'\nimport TablePagination from '@mui/material/TablePagination'\nimport TableRow from '@mui/material/TableRow'\nimport TextField from '@mui/material/TextField'\nimport axios from 'axios'\nimport _get from 'lodash/get'\nimport _identity from 'lodash/identity'\nimport React, { useEffect, useState } from 'react'\n\nimport { getOrders } from '../../api'\nimport { getCookieByName } from '../../utils'\nimport { LoginModal } from '../loginModal'\nimport MyTicketsRow from './row'\nimport tableConfig from './tableConfig'\n\ninterface MyTicketsTypes {\n handleDetailsInfo: (id: string | number) => void;\n onGetOrdersSuccess: (res: any) => void;\n onGetOrdersError: (err: any) => void;\n logo?: string;\n theme?: 'light' | 'dark';\n selectEventsLabel?: string;\n\n hideDetailsButton?: boolean;\n columns?: IColumnData[];\n}\n\ninterface EventFilter {\n event_name: string;\n url_name: string;\n}\n\nexport const MyTicketsContainer = ({\n handleDetailsInfo = _identity,\n onGetOrdersSuccess = _identity,\n onGetOrdersError = _identity,\n theme = 'dark',\n selectEventsLabel = 'Events',\n logo,\n hideDetailsButton = false,\n columns = [],\n}: MyTicketsTypes) => {\n const [data, setData] = useState<any>(null)\n const [loading, setLoading] = useState(true)\n const [limit, setLimit] = useState(10)\n const [filter, setFilter] = useState('')\n\n const isWindowDefined = typeof window !== 'undefined'\n const [isLogged, setIsLogged] = useState(\n isWindowDefined ? !!getCookieByName('X-TF-ECOMMERCE') : false\n )\n const [showModalLogin, setShowModalLogin] = useState(false)\n const [userExpired, setUserExpired] = useState(false)\n\n //just once\n useEffect(() => {\n fetchData(1, limit, filter)\n }, [isLogged])\n\n const fetchData = async (page: number, limit: number, filter: string) => {\n try {\n setLoading(true)\n const response = await getOrders(page, limit, filter)\n onGetOrdersSuccess(response)\n\n const data = _get(response, 'data.data.attributes')\n data.page -= 1\n\n setData(data)\n } catch (error) {\n if (axios.isAxiosError(error)) {\n if (error.response?.data.error === 'invalid_token') {\n if (isWindowDefined) {\n window.localStorage.removeItem('user_data')\n window.localStorage.removeItem('access_token')\n setUserExpired(true)\n setShowModalLogin(true)\n }\n }\n }\n onGetOrdersError(error)\n } finally {\n setLoading(false)\n }\n }\n\n const handleChangePage = (_event: any, newPage: number) => {\n fetchData(newPage + 1, limit, filter)\n }\n\n const handleChangeRowsPerPage = (event: React.ChangeEvent<HTMLInputElement>) => {\n fetchData(1, +event.target.value, filter)\n setLimit(+event.target.value)\n }\n\n const onChange = (\n _event: React.SyntheticEvent<Element, Event>,\n eventFilter: EventFilter | null\n ) => {\n fetchData(1, limit, eventFilter?.url_name || '')\n setFilter(eventFilter?.url_name || '')\n }\n\n return (\n <div className={`my-ticket ${theme}`}>\n <>\n {showModalLogin ||\n (!isLogged && (\n <LoginModal\n onClose={() => {\n setShowModalLogin(false)\n }}\n onLogin={() => {\n setShowModalLogin(false)\n setUserExpired(false)\n setIsLogged(true)\n }}\n userExpired={userExpired}\n logo={logo}\n />\n ))}\n </>\n {data?.orders?.length ? (\n <>\n <h2>My Ticket Orders</h2>\n <Autocomplete\n disablePortal\n id=\"combo-box-demo\"\n getOptionLabel={(option: EventFilter) => option.event_name}\n onChange={onChange}\n options={data.purchased_events}\n sx={{ width: 300 }}\n renderInput={params => <TextField {...params} label={selectEventsLabel} />}\n />\n {loading ? (\n <div className=\"loading\">\n <CircularProgress />\n </div>\n ) : (\n <>\n <TableContainer component={Paper} className=\"my-ticket-table\">\n <Table aria-label=\"collapsible table\">\n <TableHead>\n <TableRow>\n {tableConfig(columns).header.map(\n (column: string, index: number) => (\n <TableCell key={index}>{column}</TableCell>\n )\n )}\n {!hideDetailsButton && <TableCell />}\n </TableRow>\n </TableHead>\n <TableBody>\n {data.orders?.map((row: RowItems) => (\n <MyTicketsRow\n row={row}\n handleDetailsInfo={handleDetailsInfo}\n columns={columns}\n hideDetailsButton={hideDetailsButton}\n />\n ))}\n </TableBody>\n </Table>\n </TableContainer>\n <TablePagination\n rowsPerPageOptions={[10, 25, 100]}\n component=\"div\"\n count={data.total_count}\n rowsPerPage={limit}\n page={data.page}\n onPageChange={handleChangePage}\n onRowsPerPageChange={handleChangeRowsPerPage}\n />\n </>\n )}\n </>\n ) : !loading && (\n <>\n <h2>My Ticket Orders</h2>\n <div className=\"no_orders_section\">\n <div className=\"nodata_title\">\n You have no current ticket orders on this account\n </div>\n <div className=\"nodata_subtitle\">\n Discover your next nite out <a href=\"/events\">here</a>.\n </div>\n </div>\n </>\n )}\n <>\n {showModalLogin && (\n <LoginModal\n onClose={() => {\n setShowModalLogin(false)\n }}\n onLogin={() => {\n setShowModalLogin(false)\n setUserExpired(false)\n setIsLogged(true)\n }}\n userExpired={userExpired}\n />\n )}\n </>\n </div>\n )\n}\n","import './style.css'\n\nimport CircularProgress from '@mui/material/CircularProgress'\nimport Paper from '@mui/material/Paper'\nimport Table from '@mui/material/Table'\nimport TableBody from '@mui/material/TableBody'\nimport TableCell from '@mui/material/TableCell'\nimport TableContainer from '@mui/material/TableContainer'\nimport TableHead from '@mui/material/TableHead'\nimport TableRow from '@mui/material/TableRow'\nimport _find from 'lodash/find'\nimport _get from 'lodash/get'\nimport _has from 'lodash/has'\nimport _identity from 'lodash/identity'\nimport _map from 'lodash/map'\nimport moment from 'moment-timezone'\nimport React, { useEffect, useState } from 'react'\n\nimport { getOrderDetails, removeFromResale, resaleTicket } from '../../api'\nimport { isBrowser } from '../../utils'\nimport ConfirmModal from '../confirmModal'\nimport { InitialValuesTypes, TicketResaleModal } from '../ticketResaleModal'\nimport TicketsTable, { IActionColumns, ITicketTypes } from './ticketsTable'\n\ninterface TicketTypes {\n currency: string;\n discount: string;\n name: string;\n price: string;\n quantity: string;\n total: string;\n groupName: string;\n guests_count: string;\n deposit_paid: string;\n remaining: string;\n}\n\ninterface OrderDetailsTypes {\n columns: Array<{ label: string }>;\n onGetOrdersSuccess: (res: any) => void;\n onGetOrdersError: (err: any) => void;\n onReturnButtonClick: (data: any) => void;\n onRemoveFromResaleSuccess: () => void;\n onRemoveFromResaleError: (err: any) => void;\n onResaleTicketSuccess: () => void;\n onResaleTicketError: (err: any) => void;\n personalLinkIcon?: string;\n displayColumnNameInRow?: boolean;\n canSellTicket?: boolean;\n ticketsTableColumns?: Array<{\n id?: string | number;\n key: keyof ITicketTypes & keyof IActionColumns;\n label: string | number | null | undefined;\n }>;\n ordersPath?: string;\n orderId?: string | number;\n referralTitle?: string;\n itemsTitle?: string;\n ticketsTitle?: string;\n}\n\nconst getTotal = (data: any) => {\n if (data?.total && data?.tickets && data.tickets[0]?.currency)\n return data.tickets[0].currency + data.total\n if (!data?.total || !_has(data, 'items.ticket_types.length')) return ''\n\n return data.items.ticket_types[0].currency + data.total\n}\n\nexport const OrderDetailsContainer = ({\n columns = [],\n onGetOrdersSuccess = _identity,\n onGetOrdersError = _identity,\n onRemoveFromResaleSuccess = _identity,\n onRemoveFromResaleError = _identity,\n onResaleTicketSuccess = _identity,\n onResaleTicketError = _identity,\n onReturnButtonClick,\n personalLinkIcon = '',\n displayColumnNameInRow = false,\n canSellTicket = true,\n ticketsTableColumns,\n ordersPath,\n orderId: pOrderId,\n referralTitle = '',\n itemsTitle = '',\n ticketsTitle = 'Your Tickets'\n}: OrderDetailsTypes) => {\n const [data, setData] = useState<any>({})\n const [loading, setLoading] = useState(true)\n const [removeFromResaleLoading, setRemoveFromResaleLoading] = useState(false)\n const [resaleTicketLoading, setResaleTicketLoading] = useState(false)\n const [showResaleModal, setShowResaleModal] = useState(false)\n const [showRemoveResaleModal, setShowRemoveResaleModal] = useState(false)\n const [activeTicket, setActiveTicket] = useState<any>(null)\n\n useEffect(() => {\n (async () => {\n try {\n setLoading(true)\n let orderId = pOrderId || ''\n if (isBrowser && !pOrderId) {\n const params: URLSearchParams = new URL(`${window.location}`)\n .searchParams\n orderId = params.get('o') || ''\n }\n const response = await getOrderDetails(String(orderId))\n onGetOrdersSuccess(response)\n\n const data = _get(response, 'data.data.attributes')\n\n setData(data)\n } catch (error) {\n onGetOrdersError(error)\n } finally {\n setLoading(false)\n }\n })()\n }, [])\n\n const handleSellTicket = (ticket: ITicketTypes) => {\n const ticketTypesArr = data.items.ticket_types\n const sellTicketType = _find(\n ticketTypesArr,\n ticketType => ticketType.hash === ticket.ticket_type_hash\n )\n setActiveTicket({\n ...ticket,\n ticket_type_is_active: sellTicketType?.active,\n })\n setShowResaleModal(true)\n }\n\n const handleOnClose = () => {\n setShowResaleModal(false)\n setActiveTicket(null)\n }\n\n const handleOnSubmit = async (values: InitialValuesTypes) => {\n if (resaleTicketLoading) {\n return\n }\n\n try {\n setResaleTicketLoading(true)\n const {\n to,\n first_name,\n last_name,\n email,\n confirm_email,\n confirm,\n } = values\n const formData = new FormData()\n formData.append('to', to)\n formData.append('first_name', first_name)\n formData.append('last_name', last_name)\n formData.append('email', email)\n formData.append('confirm_email', confirm_email)\n formData.append('confirm', String(confirm))\n\n await resaleTicket(formData, activeTicket.hash)\n const updatedData = { ...data }\n updatedData?.tickets?.forEach((ticket: ITicketTypes) => {\n if (ticket.hash === activeTicket.hash) {\n ticket.is_sellable = false\n ticket.is_on_sale = true\n }\n })\n\n setData(updatedData)\n onResaleTicketSuccess()\n } catch (error) {\n onResaleTicketError(error)\n } finally {\n setShowResaleModal(false)\n setResaleTicketLoading(false)\n }\n }\n\n const handleRemoveFromResale = (ticket: ITicketTypes) => {\n setShowRemoveResaleModal(true)\n setActiveTicket(ticket)\n }\n\n const onCloseRemoveResale = () => {\n setShowRemoveResaleModal(false)\n setActiveTicket(null)\n }\n\n const onConfirmRemoveResale = async () => {\n if (removeFromResaleLoading) {\n return\n }\n\n try {\n setRemoveFromResaleLoading(true)\n await removeFromResale(activeTicket.hash)\n const updatedData = { ...data }\n updatedData?.tickets?.forEach((ticket: ITicketTypes) => {\n if (ticket.hash === activeTicket.hash) {\n ticket.is_sellable = true\n ticket.is_on_sale = false\n }\n })\n\n setData(updatedData)\n onRemoveFromResaleSuccess()\n } catch (error) {\n onRemoveFromResaleError(error)\n } finally {\n setShowRemoveResaleModal(false)\n setRemoveFromResaleLoading(false)\n }\n }\n\n let orderSummery = `ID ${data.id}, placed`\n if (data.date && data.timezone) {\n const date = moment\n .tz(data.date, data.timezone)\n .format('dddd, DD MMMM YYYY')\n orderSummery += ` ${date}`\n }\n\n const columnsProps =\n data.tickets && data.tickets[0].is_table\n ? [\n { label: 'Items' },\n { label: 'Price' },\n { label: 'Guests count' },\n { label: 'Deposit paid' },\n { label: 'Remaining' },\n ]\n : columns\n return (\n <div className=\"order-details\">\n {loading ? (\n <div className=\"loading\">\n <CircularProgress />\n </div>\n ) : (\n <>\n <h1 className=\"layout-title\">Order Details</h1>\n <div className=\"order-summary-box\">\n <div className=\"summary-block\">\n <div className=\"summary-item\">\n <h6 className=\"sub-title\">Order Summary</h6>\n <p className='order-summary-date'>{orderSummery}</p>\n </div>\n <div className=\"summary-item\">\n <div className=\"return-button-container\">\n <button\n type=\"button\"\n className=\"return-button\"\n onClick={() => {\n if (typeof window !== 'undefined') {\n window.location.assign(ordersPath ?? '/orders')\n }\n }}\n >\n Back to Orders\n </button>\n </div>\n </div>\n </div>\n {!data?.disable_referral && (\n <>\n {referralTitle && <h4 className=\"referral-title sub-title\">{referralTitle}</h4>}\n <div className=\"personal-link\">\n <div className=\"link-item\">\n <span>Personal Share Link: </span>\n <a\n href={data?.personal_share_link}\n target=\"_blank\"\n rel=\"noreferrer\"\n >\n {Boolean(personalLinkIcon) && (\n <img src={personalLinkIcon} alt=\"Icon\" />\n )}\n {data?.personal_share_link}\n </a>\n </div>\n {data?.sales_referred ? (\n <div className=\"link-item\">\n <p className=\"total-referrer\">{`So far, you’ve referred ${data.sales_referred} tickets`}</p>\n </div>\n ) : null}\n </div>\n </>\n )}\n {itemsTitle && <h4 className=\"items-title sub-title\">{itemsTitle}</h4>}\n <TableContainer component={Paper}>\n <Table className=\"tt-type\" aria-label=\"collapsible table\">\n <TableHead>\n <TableRow>\n {_map(columnsProps, item => (\n <TableCell>{item.label || ''}</TableCell>\n ))}\n </TableRow>\n </TableHead>\n <TableBody>\n {data?.items?.ticket_types?.map(\n (ticket: TicketTypes, index: number) =>\n data?.tickets && !data?.tickets[0].is_table ? (\n <TableRow key={index}>\n <TableCell>\n <b>Ticket Type:</b> {ticket.name}\n </TableCell>\n <TableCell>\n {ticket.currency + ticket.price}\n </TableCell>\n <TableCell>{ticket.quantity}</TableCell>\n <TableCell>\n {ticket.currency + ticket.total}\n </TableCell>\n </TableRow>\n ) : (\n <TableRow key={index}>\n <TableCell>\n <b>Ticket Type:</b> {ticket.name}\n </TableCell>\n <TableCell>\n {ticket.currency + ticket.price}\n </TableCell>\n <TableCell>{ticket.guests_count}</TableCell>\n <TableCell>{ticket.deposit_paid}</TableCell>\n <TableCell>{ticket.remaining}</TableCell>\n </TableRow>\n )\n )}\n {data?.items?.add_ons?.map(\n (ticket: TicketTypes, index: number) => (\n <TableRow key={index}>\n <TableCell>\n <div>\n <b>Add-On</b>\n <div>{ticket.groupName}: {ticket.name}</div>\n </div>\n </TableCell>\n <TableCell>{ticket.currency + ticket.price}</TableCell>\n <TableCell>{ticket.quantity}</TableCell>\n <TableCell>{ticket.currency + ticket.total}</TableCell>\n </TableRow>\n )\n )}\n <TableRow className=\"total-row\">\n <TableCell />\n <TableCell />\n <TableCell>Total</TableCell>\n <TableCell>{getTotal(data)}</TableCell>\n </TableRow>\n </TableBody>\n </Table>\n </TableContainer>\n </div>\n <TicketsTable\n ticketsTitle={ticketsTitle}\n tickets={data.tickets}\n columns={\n ticketsTableColumns?.length\n ? ticketsTableColumns\n : [\n { key: 'hash' as never, label: 'Ticket ID' },\n { key: 'ticket_type' as never, label: 'Ticket Type' },\n { key: 'holder_name' as never, label: 'Ticket Holder' },\n { key: 'status' as never, label: 'Status' },\n { key: 'download' as never, label: '' },\n { key: 'sell_ticket' as never, label: '' },\n ]\n }\n handleSellTicket={handleSellTicket}\n handleRemoveFromResale={handleRemoveFromResale}\n displayColumnNameInRow={displayColumnNameInRow}\n canSellTicket={canSellTicket}\n />\n <div className=\"return-button-container\">\n <button\n type=\"button\"\n className=\"return-button\"\n onClick={() => {\n if (onReturnButtonClick) {\n onReturnButtonClick(data)\n } else if (typeof window !== 'undefined') {\n window.location.assign(ordersPath ?? '/orders')\n }\n }}\n >\n Return to Order History\n </button>\n </div>\n </>\n )}\n {showResaleModal && (\n <TicketResaleModal\n ticket={activeTicket}\n onClose={handleOnClose}\n onSubmit={handleOnSubmit}\n loading={resaleTicketLoading}\n />\n )}\n {showRemoveResaleModal && (\n <ConfirmModal\n message=\"Are you sure you want to withdraw your ticket from resale?\"\n onClose={onCloseRemoveResale}\n onConfirm={onConfirmRemoveResale}\n loading={removeFromResaleLoading}\n />\n )}\n </div>\n )\n}\n","import { Alert } from '@mui/material'\nimport axios from 'axios'\nimport { identity } from 'lodash'\nimport _find from 'lodash/find'\nimport _forEach from 'lodash/forEach'\nimport _get from 'lodash/get'\nimport _isEmpty from 'lodash/isEmpty'\nimport _keys from 'lodash/keys'\nimport _map from 'lodash/map'\nimport _values from 'lodash/values'\nimport moment from 'moment'\nimport React, { useCallback, useEffect, useRef,useState } from 'react'\nimport Countdown from 'react-countdown'\n\nimport {\n getSeatMapData,\n getSeatMapStatuses,\n removeSeatReserve,\n reserveSeat,\n} from '../../api'\nimport { showZero } from '../../utils/showZero'\nimport { ReferralLogic } from '../ticketsContainer/ReferralLogic'\nimport { addToCartFunc } from './addToCart'\nimport { SeatMapComponent } from './SeatMapComponent'\nimport { TicketsSection } from './TicketsSection'\nimport {\n getAddToCartRequestData,\n getOwnReservationsBasedOnStatuses,\n getTicketDropdownData,\n getTierIdBasedOnSeatId,\n} from './utils'\n\ninterface IGuestCounts {\n [key: string]: number;\n}\n\nexport const SeatMapContainer = (props: IMapContainerProps) => {\n const {\n event: {\n id: eventId,\n currency: { symbol },\n tableMapEnabled,\n country,\n },\n mapContainerId,\n timerMessage = '',\n onAddToCartSuccess = identity,\n onCountdownFinish = identity,\n ticketDeleteButtonContent,\n } = props\n\n const [seatMapData, setSeatMapData] = useState({\n seatMap: '',\n } as {\n seatMap: string;\n seatReservationTime: number;\n seatMapType: string | null;\n tierPrices: any;\n predefinedSeats: any;\n })\n const eventSeatsRef = useRef([] as EventSeat[])\n const ticketTypeTierRelationsRef = useRef({} as TicketTypeTierRelations)\n const [selectedTickets, setSelectedTickets] = useState<{\n [seatId: string]: string;\n }>({})\n const [seatMapStatuses, setSeatMapStatuses] = useState('')\n const [reservedSeats, setReservedSeats] = useState<\n Array<SeatReservationData>\n >([])\n const [isLoadingSeatMapData, setIsLoadingSeatMapData] = useState(true)\n const [isReserving, setIsReserving] = useState(false)\n const [isAddingToCart, setIsAddingToCart] = useState(false)\n const [error, setError] = useState<string | null>(null)\n const [showTimer, setShowTimer] = useState(\n Date.now() <= Number(localStorage.getItem(`reservationStart-${eventId}`))\n )\n const [guestCounts, setGuestCounts] = useState<IGuestCounts>(\n {} as IGuestCounts\n )\n\n const updateGuestCounts = (data: any) => {\n _forEach(data, (item: any) => {\n const tierTickets = ticketTypeTierRelationsRef.current[item.tierId]\n const seatTicketsArray = _values(tierTickets)\n\n setGuestCounts((prevState: any) => ({\n ...prevState,\n [item.seatId]: Number(\n seatTicketsArray[0].ticket_type_min_number_of_guests\n ),\n }))\n })\n }\n\n const fetchSeatMapData = useCallback(async () => {\n try {\n const seatMapDataResponse = await getSeatMapData(eventId)\n const {\n data: {\n attributes: {\n seatData,\n ticketTypeTierRelations,\n eventSeats,\n seatReservationTime,\n seatMapType,\n tierPrices,\n predefinedSeats,\n },\n },\n } = seatMapDataResponse\n eventSeatsRef.current = eventSeats\n ticketTypeTierRelationsRef.current = ticketTypeTierRelations\n setSeatMapData({\n seatMap: JSON.parse(seatData),\n seatReservationTime,\n seatMapType,\n tierPrices,\n predefinedSeats,\n })\n } catch (error) {\n setError('Something went wrong')\n } finally {\n setIsLoadingSeatMapData(false)\n }\n }, [eventId])\n\n const fetchSeatMapReservations = useCallback(async () => {\n try {\n const statusesResponse = await getSeatMapStatuses(eventId)\n const statuses = _get(statusesResponse, 'data.attributes') || {}\n const reservationData: Array<SeatReservationData> = []\n const ownReservations: string[] = getOwnReservationsBasedOnStatuses(\n statuses\n )\n\n _forEach(ownReservations, reservation => {\n const tierIdOfReservation = getTierIdBasedOnSeatId(\n reservation,\n eventSeatsRef.current,\n ) as string\n reservationData.push({\n seatId: reservation,\n tierId: tierIdOfReservation,\n type: 'reserve',\n })\n })\n\n localStorage.setItem('reservationData', JSON.stringify(reservationData))\n setSeatMapStatuses(statusesResponse.data.attributes)\n setReservedSeats(reservationData)\n // automatically set ticket/table type if it's the only one\n if (ticketTypeTierRelationsRef.current) {\n _forEach(reservationData, (item: any) => {\n const tierTickets = ticketTypeTierRelationsRef.current[item.tierId]\n const seatTicketsArray = _values(tierTickets)\n\n setSelectedTickets((prevState: any) => ({\n ...prevState,\n [item.seatId]:\n seatTicketsArray.length === 1\n ? seatTicketsArray[0].ticket_type_id\n : '',\n }))\n })\n\n if (_isEmpty(reservationData)) {\n setGuestCounts({})\n setSelectedTickets({})\n }\n }\n } catch (error) {\n setError('Something went wrong')\n }\n }, [eventId])\n\n const startTimer = useCallback((duration: number) => {\n setShowTimer(true)\n\n if (!localStorage.getItem(`reservationStart-${eventId}`)) {\n localStorage.setItem(\n `reservationStart-${eventId}`,\n String(Date.now() + duration)\n )\n }\n }, [])\n\n const endTimer = useCallback(() => {\n localStorage.removeItem(`reservationStart-${eventId}`)\n setShowTimer(false)\n }, [])\n\n const handleSeatReservation = async (\n eventId: string,\n tierId: string,\n seatId: string\n ) => {\n setIsReserving(true)\n try {\n await reserveSeat(eventId, tierId, seatId)\n await fetchSeatMapReservations()\n\n startTimer(seatMapData.seatReservationTime * 60000)\n const reservationData = JSON.parse(\n localStorage.getItem('reservationData') || ''\n )\n setReservedSeats(reservationData)\n updateGuestCounts(reservationData)\n\n // automatically set ticket/table type if it's the only one\n const relations = _keys(ticketTypeTierRelationsRef.current[tierId])\n const [firstItem] = _keys(ticketTypeTierRelationsRef.current[tierId])\n handleTicketSelect(relations.length === 1 ? firstItem : '', seatId)\n } catch (error) {\n setError('Something went wrong')\n } finally {\n setIsReserving(false)\n }\n }\n\n const handleCancelSeatReservtion = async (\n eventId: string,\n tierId: string,\n seatId: string\n ) => {\n setIsReserving(true)\n try {\n await removeSeatReserve(eventId, tierId, [seatId])\n await fetchSeatMapReservations()\n if (\n _isEmpty(JSON.parse(localStorage.getItem('reservationData') as string))\n ) {\n endTimer()\n }\n const reservationData = JSON.parse(\n localStorage.getItem('reservationData') || ''\n )\n const currentSelectedTickets = { ...selectedTickets }\n delete currentSelectedTickets[seatId]\n setReservedSeats(reservationData)\n setSelectedTickets(currentSelectedTickets)\n } catch (error) {\n setError('Something went wrong')\n } finally {\n setIsReserving(false)\n }\n }\n\n const onSeatClick = async (seatInfo: any) => {\n const {\n seat: { tierId, seatId, status },\n } = seatInfo\n\n const reservationData = JSON.parse(\n localStorage.getItem('reservationData') || '[]'\n )\n if (status === 'B' || status === 'R' || status === 'BLOCKED' || status === 'RE') return\n if (_find(reservationData, data => data.seatId === seatId)) {\n handleCancelSeatReservtion(eventId, tierId, seatId)\n } else if (reservationData.length >= 10) {\n setError('Limit exceeded')\n } else {\n handleSeatReservation(eventId, tierId, seatId)\n }\n }\n\n const handleTicketSelect = (ticketId: string, seatId: string) => {\n const currentSelectedTickets = { ...selectedTickets }\n currentSelectedTickets[seatId] = ticketId\n setSelectedTickets(currentSelectedTickets)\n }\n\n const handleGetTicketBtnClick = async () => {\n setIsAddingToCart(true)\n const ticketsDropdownsData = getTicketDropdownData(\n reservedSeats,\n ticketTypeTierRelationsRef.current\n )\n let selectedSeats = {}\n _forEach(ticketsDropdownsData, ticketData => {\n selectedSeats = {\n ...selectedSeats,\n [ticketData.seatId]: ticketData.ticketsData,\n }\n })\n const addToCartData = getAddToCartRequestData({\n eventId,\n reservations: _map(reservedSeats, seat => seat.seatId),\n selectedSeats,\n selectedTickets,\n guestCounts,\n })\n try {\n const response = await addToCartFunc({\n eventId,\n data: addToCartData,\n ticketQuantity: addToCartData?.attributes?.product_cart_quantity,\n })\n localStorage.removeItem('reservationData')\n onAddToCartSuccess(response)\n } catch (error) {\n if (axios.isAxiosError(error)) {\n const message = _get(error, 'response.data.message', '')\n setError(message)\n }\n } finally {\n setIsAddingToCart(false)\n }\n }\n\n useEffect(() => {\n if (\n Date.now() > Number(localStorage.getItem(`reservationStart-${eventId}`))\n ) {\n setSelectedTickets({})\n setReservedSeats([])\n }\n\n const makeRequests = async () => {\n try {\n await fetchSeatMapData()\n fetchSeatMapReservations()\n } catch (error) {\n setError('Something went wrong')\n }\n }\n\n makeRequests()\n\n if (country) {\n localStorage.setItem('eventCountry', country)\n }\n\n const intervalId = setInterval(() => {\n fetchSeatMapReservations()\n }, 3000)\n\n return () => {\n clearInterval(intervalId)\n }\n }, [fetchSeatMapData, fetchSeatMapReservations])\n\n return (\n <>\n {error && (\n <Alert\n severity=\"error\"\n onClose={() => {\n setError(null)\n }}\n variant=\"filled\"\n style={{ width: '350px' }}\n >\n {error}\n </Alert>\n )}\n {showTimer && (\n <Countdown\n date={moment(\n Number(localStorage.getItem(`reservationStart-${eventId}`))\n ).valueOf()}\n renderer={(props: any) => (\n <div className=\"reservation-countdown\">\n <span className=\"reservation-message\">{timerMessage}</span>\n <span className=\"reservation-timer\">\n {showZero(props.minutes)}:{showZero(props.seconds)}\n </span>\n </div>\n )}\n onComplete={() => {\n endTimer()\n setSelectedTickets({})\n setReservedSeats([])\n if (onCountdownFinish) {\n onCountdownFinish()\n }\n }}\n />\n )}\n {!isLoadingSeatMapData && <ReferralLogic eventId={eventId} />}\n <TicketsSection\n selectedTickets={selectedTickets}\n handleTicketSelect={handleTicketSelect}\n handleCancelReservation={(seatId: string, tireId: string) =>\n handleCancelSeatReservtion(eventId, tireId, seatId)\n }\n handleGetTicketClick={handleGetTicketBtnClick}\n isAddingToCart={isAddingToCart}\n reservedSeats={reservedSeats}\n ticketDeleteButtonContent={ticketDeleteButtonContent}\n ticketTypeTierRelations={ticketTypeTierRelationsRef.current}\n currencySymbol={symbol}\n tableMapEnabled={Boolean(tableMapEnabled)}\n guestCounts={guestCounts}\n setGuestCounts={setGuestCounts}\n />\n {seatMapData.seatMap && seatMapStatuses && (\n <SeatMapComponent\n seatMapProps={{\n seatData: seatMapData.seatMap,\n statuses: seatMapStatuses,\n tierPrices: seatMapData.tierPrices,\n seatMapType: seatMapData.seatMapType,\n ticketTypeTierRelations: ticketTypeTierRelationsRef.current,\n seatMapEvents: { onSeatClick },\n isReserving,\n predefinedSeats: seatMapData.predefinedSeats,\n }}\n mapContainerId={mapContainerId}\n />\n )}\n </>\n )\n}\n","import { AxiosError } from 'axios'\nimport _get from 'lodash/get'\nimport React, { useEffect, useState } from 'react'\n\nimport { declineInvitation,processTicket } from '../../api'\n\nexport interface ITicketResaleContainer {\n onProcessTicketSuccess: (res: any) => void;\n onProcessTicketError: (e: AxiosError) => void;\n onDeclineTicketPurchaseSuccess: (res: any) => void;\n onDeclineTicketPurchaseError: (e: AxiosError) => void;\n orderHash?: string;\n billingPath?: string;\n}\n\nexport const TicketResaleContainer = ({\n onProcessTicketSuccess = () => {},\n onProcessTicketError = () => {},\n onDeclineTicketPurchaseSuccess = () => {},\n onDeclineTicketPurchaseError = () => {},\n orderHash,\n billingPath,\n}: ITicketResaleContainer) => {\n const isWindowDefined = typeof window !== 'undefined'\n const [error, setError] = useState('')\n const [successMessage, setSuccessMessage] = useState('')\n\n useEffect(() => {\n (async () => {\n if (isWindowDefined) {\n const params: URLSearchParams = new URL(`${window.location}`)\n .searchParams\n const hash = params.get('invitation_hash') || orderHash || null\n const isDeclined = params.get('decline') || false\n\n if (hash) {\n // Process of declining ticket purchase invitation\n if (isDeclined) {\n try {\n const response = await declineInvitation(hash)\n onDeclineTicketPurchaseSuccess(response)\n setSuccessMessage(\"Thanks for letting us know! We'll offer this ticket to someone else!\")\n } catch (error) {\n setError(error?.response?.data?.message)\n onDeclineTicketPurchaseError(error.response)\n }\n return\n }\n\n try {\n const response = await processTicket(hash)\n const data = _get(response, 'data.data.attributes')\n const age_required = _get(data, 'age_required', false)\n const names_required = _get(data, 'names_required', false)\n const event_id = _get(data, 'event_id')\n\n onProcessTicketSuccess(response.data)\n window.location.href = `${\n billingPath ?? '/billing/billing-info/'\n }?age_required=${age_required}&names_required=${names_required}&event_id=${event_id}`\n } catch (error) {\n setError(error?.response?.data?.message)\n onProcessTicketError(error.response)\n }\n } else {\n window.location.href = '/'\n }\n }\n })()\n }, [])\n\n return (\n <div className=\"ticket-resale-page\">\n <div className={`${successMessage ? 'success-block': 'error-block'}`}>\n <h3>{successMessage ? successMessage : error}</h3>\n </div>\n </div>\n )\n}\n","import './style.css'\n\nimport { createTheme, ThemeOptions } from '@mui/material'\nimport Alert from '@mui/material/Alert'\nimport { ThemeProvider } from '@mui/private-theming'\nimport { CSSProperties } from '@mui/styles'\nimport axios, { AxiosError } from 'axios'\nimport jwt_decode from 'jwt-decode'\nimport _filter from 'lodash/filter'\nimport _find from 'lodash/find'\nimport _forEach from 'lodash/forEach'\nimport _get from 'lodash/get'\nimport _identity from 'lodash/identity'\nimport _includes from 'lodash/includes'\nimport _isEmpty from 'lodash/isEmpty'\nimport _some from 'lodash/some'\nimport React, { ReactNode, useEffect, useRef, useState } from 'react'\nimport Button from 'react-bootstrap/Button'\n\nimport {\n addToCart,\n getCheckoutPageConfigs,\n getEvent,\n getProfileData,\n getTickets,\n logout,\n postOnCheckout,\n} from '../../api'\nimport { X_TF_ECOMMERCE } from '../../constants'\nimport { useCookieListener } from '../../hooks/useCookieListener'\nimport { usePixel } from '../../hooks/usePixel'\nimport {\n createCheckoutDataBodyWithDefaultHolder,\n deleteCookieByName,\n getCookieByName,\n getQueryVariable,\n isBrowser,\n setLoggedUserData,\n} from '../../utils'\nimport { Loader } from '../common/index'\nimport { PoweredBy } from '../common/PoweredBy'\nimport ConfirmModal from '../confirmModal'\nimport Countdown from '../countdown'\nimport { VerificationPendingModal } from '../idVerificationContainer/VerificationPendingModal'\nimport { LoginModal } from '../loginModal'\nimport WaitingList from '../waitingList'\nimport { AccessCodeSection } from './AccessCodeSection'\nimport { PromoCodeSection } from './PromoCodeSection'\nimport { ReferralLogic } from './ReferralLogic'\nimport { TicketsSection } from './TicketsSection'\n\ninterface CartSuccess {\n skip_billing_page: boolean;\n names_required: boolean;\n age_required: boolean;\n phone_required: boolean;\n hide_phone_field: boolean;\n event_id: string;\n hash?: string;\n total?: string;\n hasAddOn?: boolean;\n free_ticket: boolean;\n collect_optional_wallet_address?: boolean;\n collect_mandatory_wallet_address?: boolean;\n}\n\nexport interface IGetTickets {\n eventId: number;\n onAddToCartSuccess: (response: CartSuccess) => void;\n getTicketsLabel?: string;\n contentStyle?: React.CSSProperties;\n onAddToCartError: (e: AxiosError) => void;\n onGetTicketsSuccess: (response: any) => void;\n onGetTicketsError: (e: AxiosError) => void;\n onLogoutSuccess: () => void;\n onLogoutError: (e: AxiosError) => void;\n onGetProfileDataSuccess: (response: any) => void;\n onGetProfileDataError: (e: AxiosError) => void;\n onLoginSuccess: () => void;\n handleNotInvitedModalClose: () => void;\n handleInvalidLinkModalClose: () => void;\n theme?: 'light' | 'dark';\n queryPromoCode?: string;\n isPromotionsEnabled?: boolean;\n themeOptions?: ThemeOptions & {\n input?: CSSProperties;\n checkbox?: CSSProperties;\n };\n isAccessCodeEnabled?: boolean;\n hideSessionButtons?: boolean;\n hideWaitingList?: boolean;\n enableBillingInfoAutoCreate?: boolean;\n isButtonScrollable?: boolean;\n sortBySoldOut?: boolean;\n disableCountdownLeadingZero?: boolean;\n isLoggedIn?: boolean;\n actionsSectionComponent?: any;\n ticketsHeaderComponent?: ReactNode;\n hideTicketsHeader?: boolean;\n tableTicketsHeaderComponent?: ReactNode;\n hideTableTicketsHeader?: boolean;\n enableInfluencersSection?: boolean;\n enableAddOns?: boolean;\n ordersPath?: string;\n showPoweredByImage?: boolean;\n promoText?: string;\n showGroupNameBlock?: boolean;\n currencySybmol?: string;\n onReserveButtonClick?: () => void;\n onPendingVerification?: () => void;\n}\n\nexport interface ITicket {\n id: string | number;\n [key: string]: string | number;\n}\n\ninterface IInfluencer {\n [key: string]: string | undefined;\n}\nexport interface ISelectedTickets {\n isTable: boolean;\n [key: string]: string | number | boolean;\n}\n\nexport const TicketsContainer = ({\n onLoginSuccess,\n getTicketsLabel,\n eventId,\n onAddToCartSuccess,\n contentStyle = {},\n onAddToCartError = _identity,\n onGetTicketsSuccess = _identity,\n onGetTicketsError = _identity,\n onLogoutSuccess = _identity,\n onLogoutError = _identity,\n onGetProfileDataSuccess = _identity,\n onGetProfileDataError = _identity,\n theme = 'light',\n queryPromoCode = '',\n isPromotionsEnabled = true,\n themeOptions,\n isAccessCodeEnabled = false,\n hideSessionButtons = false,\n hideWaitingList = false,\n enableBillingInfoAutoCreate = true,\n isButtonScrollable = false,\n sortBySoldOut = false,\n disableCountdownLeadingZero = false,\n isLoggedIn = false,\n actionsSectionComponent: ActionsSectionComponent,\n ticketsHeaderComponent,\n hideTicketsHeader = false,\n tableTicketsHeaderComponent,\n hideTableTicketsHeader = false,\n enableInfluencersSection = true,\n enableAddOns = true,\n handleNotInvitedModalClose = _identity,\n handleInvalidLinkModalClose = _identity,\n ordersPath,\n showPoweredByImage = false,\n promoText,\n showGroupNameBlock = false,\n currencySybmol = '',\n onReserveButtonClick = _identity,\n onPendingVerification = _identity,\n}: IGetTickets) => {\n const [selectedTickets, setSelectedTickets] = useState({} as ISelectedTickets)\n const isWindowDefined = typeof window !== 'undefined'\n const [isLogged, setIsLogged] = useState(\n Boolean(getCookieByName(X_TF_ECOMMERCE))\n )\n const [showLoginModal, setShowLoginModal] = useState(false)\n const [tickets, setTickets] = useState([] as ITicket[])\n const [event, setEvent] = useState<any>(null)\n const [showWaitingList, setShowWaitingList] = useState(false)\n const [isLoading, setIsLoading] = useState(true)\n const [codeIsLoading, setCodeIsLoading] = useState(false)\n const [handleBookIsLoading, setHandleBookIsLoading] = useState(false)\n const [code, setCode] = useState(getQueryVariable('r') || queryPromoCode)\n const [showPromoInput, setShowPromoInput] = useState(false)\n const [codeIsApplied, setCodeIsApplied] = useState(false)\n const [codeIsInvalid, setCodeIsInvalid] = useState(false)\n const [showAccessCodeSection, setShowAccessCodeSection] = useState(\n isAccessCodeEnabled\n )\n const [showPromoCodeSection, setShowPromoCodeSection] = useState(\n isPromotionsEnabled\n )\n const [error, setError] = useState(null)\n const [isNotInvitedError, setIsNotInvitedError] = useState('')\n const [isInvalidLinkError, setIsInvalidLinkError] = useState('')\n const [pendingVerificationMessage, setPendingVerificationMessage] = useState()\n\n const ticketsContainerRef = useRef<HTMLDivElement>(null)\n const pageUrl = isBrowser ? window.location.href.split('?')[0] : ''\n\n useCookieListener(X_TF_ECOMMERCE, value => setIsLogged(Boolean(value)))\n usePixel(eventId, { pageUrl })\n\n useEffect(() => {\n if (typeof window !== 'undefined') {\n const access_token = window.localStorage.getItem('access_token')\n if (access_token) {\n const decoded = jwt_decode<{ exp: number }>(access_token)\n if (decoded && decoded.exp < Date.now() / 1000) {\n window.localStorage.removeItem('access_token')\n window.localStorage.removeItem('user_data')\n }\n }\n }\n }, [])\n\n useEffect(() => {\n !!eventId && getTicketsApi()\n }, [eventId])\n\n useEffect(() => {\n if (isLogged) {\n fetchUserData()\n .then(res => {\n window.localStorage.setItem('user_data', JSON.stringify(res))\n onGetProfileDataSuccess(res)\n })\n .catch(e => {\n if (axios.isAxiosError(e)) {\n onGetProfileDataError(e)\n }\n })\n }\n }, [isLogged])\n\n const handleLogout = async () => {\n try {\n await logout()\n onLogoutSuccess()\n if (isWindowDefined) {\n window.localStorage.removeItem('access_token')\n window.localStorage.removeItem('user_data')\n setIsLogged(false)\n const event = new window.CustomEvent('tf-logout')\n deleteCookieByName('X-TF-ECOMMERCE')\n window.document.dispatchEvent(event)\n }\n } catch (e) {\n onLogoutError(e)\n }\n }\n\n const handleExternalLogin = () => {\n setIsLogged(true)\n }\n\n const handleOnClose = () => {\n setShowLoginModal(false)\n }\n\n const handleOnLogin = () => {\n setShowLoginModal(false)\n setIsLogged(true)\n if (onLoginSuccess) {\n onLoginSuccess()\n }\n }\n\n async function getTicketsApi(isUpdateingCode?: boolean, type?: string) {\n try {\n isUpdateingCode ? setCodeIsLoading(true) : setIsLoading(true)\n const previewKey = getQueryVariable('pk') || undefined\n const response = await getTickets(eventId, code, previewKey)\n const eventResponse = await getEvent(eventId, previewKey)\n if (response.data.success) {\n const attributes = _get(response, 'data.data.attributes')\n type === 'promo' && setCodeIsApplied(attributes.ValidPromoCode)\n type === 'promo' && setCodeIsInvalid(!attributes.ValidPromoCode)\n setTickets(_get(attributes, 'tickets'))\n setShowWaitingList(attributes.showWaitingList)\n onGetTicketsSuccess(response.data)\n setCode('')\n setShowAccessCodeSection(attributes.is_access_code)\n setShowPromoCodeSection(attributes.isPromotionsEnabled)\n }\n if (eventResponse.data.success) {\n const event = _get(eventResponse, 'data.data.attributes')\n setEvent(event)\n\n if (event.country && isWindowDefined) {\n window.localStorage.setItem('eventCountry', event.country)\n }\n }\n } catch (e) {\n if (axios.isAxiosError(e)) {\n onGetTicketsError(e)\n setError(_get(e, 'response.data.message'))\n }\n } finally {\n setIsLoading(false)\n setCodeIsLoading(false)\n }\n }\n\n const handleTicketSelect = (\n key: string,\n value: number | string,\n isTable = false\n ) => {\n setSelectedTickets(prevState => {\n if (Object.keys(prevState)[0] !== key && !value) {\n return prevState\n }\n return {\n [key]: value,\n isTable,\n }\n })\n }\n\n const handleOrdersClick = () => {\n if (isWindowDefined) {\n window.location.href = ordersPath ?? '/orders'\n }\n }\n\n const onErrorClose = () => {\n setError(null)\n }\n\n const handleBook = async () => {\n setHandleBookIsLoading(true)\n const ticket =\n _find(tickets, item => selectedTickets[item.id] > 0) || ({} as ITicket)\n const optionName = _get(ticket, 'optionName')\n const ticketId = _get(ticket, 'id')\n const isTableType = _get(ticket, 'isTable', false)\n const productCartQuantity = +selectedTickets[ticket.id]\n const ticketQuantity = isTableType ? 1 : +selectedTickets[ticket.id]\n\n const data = {\n attributes: {\n alternative_view_id: null,\n product_cart_quantity: productCartQuantity,\n product_options: {\n [optionName]: ticketId,\n },\n product_id: eventId,\n ticket_types: {\n [ticketId]: {\n product_options: {\n [optionName]: ticketId,\n ticket_price: ticket.price,\n },\n quantity: ticketQuantity,\n },\n },\n },\n }\n\n try {\n const result = await addToCart(eventId, data)\n const pageConfigsDataResponse = enableAddOns\n ? await getCheckoutPageConfigs()\n : {\n status: 200,\n data: { attributes: _get(result, 'data.data.attributes') },\n }\n\n if (result.status === 200 && pageConfigsDataResponse.status === 200) {\n const pageConfigsData =\n _get(pageConfigsDataResponse, 'data.attributes') || {}\n\n const skipBillingPage = pageConfigsData.skip_billing_page ?? false\n const nameIsRequired = pageConfigsData.names_required ?? false\n const ageIsRequired = pageConfigsData.age_required ?? false\n const phoneIsRequired = pageConfigsData.phone_required ?? false\n const hidePhoneField = pageConfigsData.hide_phone_field ?? false\n const hasAddOn = pageConfigsData.has_add_on ?? false\n const freeTicket = pageConfigsData.free_ticket ?? false\n const collectOptionalWalletAddress =\n pageConfigsData.collect_optional_wallet_address ?? false\n const collectMandatoryWalletAddress =\n pageConfigsData.collect_mandatory_wallet_address ?? false\n\n let hash = ''\n let total = ''\n\n const isWindowDefined = typeof window !== 'undefined'\n isWindowDefined && window.localStorage.removeItem('add_ons')\n\n if (skipBillingPage && !hasAddOn) {\n // Get user data for checkout data\n const userData =\n isWindowDefined && window.localStorage.getItem('user_data')\n ? JSON.parse(window.localStorage.getItem('user_data') || '')\n : {}\n\n const access_token =\n isWindowDefined && window.localStorage.getItem('access_token')\n ? window.localStorage.getItem('access_token') || ''\n : ''\n\n const checkoutBody = createCheckoutDataBodyWithDefaultHolder(\n ticketQuantity,\n userData\n )\n\n const checkoutResult = enableBillingInfoAutoCreate\n ? await postOnCheckout(checkoutBody, access_token, freeTicket)\n : null\n\n hash = _get(checkoutResult, 'data.data.attributes.hash')\n total = _get(checkoutResult, 'data.data.attributes.total')\n }\n\n onAddToCartSuccess({\n skip_billing_page: skipBillingPage,\n names_required: nameIsRequired,\n phone_required: phoneIsRequired,\n age_required: ageIsRequired,\n hide_phone_field: hidePhoneField,\n free_ticket: freeTicket,\n collect_optional_wallet_address: collectOptionalWalletAddress,\n collect_mandatory_wallet_address: collectMandatoryWalletAddress,\n event_id: String(eventId),\n hash,\n total,\n hasAddOn,\n })\n }\n } catch (e) {\n if (e.response?.data?.data?.hasUnverifiedOrder) {\n setPendingVerificationMessage(e.response?.data?.message)\n } else if (axios.isAxiosError(e)) {\n onAddToCartError(e)\n const message = _get(e, 'response.data.message', '')\n const isInvalidLinkError = _includes(\n message,\n 'No more of this ticket type are available right now'\n )\n const isNotInvitedError = _includes(\n message,\n 'You must have been invited to this event to attend'\n )\n\n if (isInvalidLinkError) {\n setIsInvalidLinkError(message)\n } else if (isNotInvitedError) {\n setIsNotInvitedError(message)\n } else {\n setError(message)\n }\n }\n } finally {\n setHandleBookIsLoading(false)\n }\n }\n\n const updateTickets = (isUpdateingCode?: boolean, type?: string) => {\n getTicketsApi(isUpdateingCode, type)\n }\n\n const fetchUserData = async () => {\n try {\n const userDataResponse = await getProfileData()\n const profileData = _get(userDataResponse, 'data.data')\n const profileDataObj = setLoggedUserData(profileData)\n return profileDataObj\n } catch (e) {\n throw new Error(e)\n }\n }\n\n const isTicketOnSale = _some(\n tickets,\n item => item.salesStarted && !item.salesEnded && !item.soldOut\n )\n\n const eventHasTickets = !_isEmpty(tickets)\n const isSalesClosed = event?.salesEnded\n\n const themeMui = createTheme(themeOptions)\n\n useEffect(() => {\n window.document.addEventListener('custom-login', handleExternalLogin)\n window.document.addEventListener('custom-logout', handleLogout)\n\n return () => {\n window.document.removeEventListener('custom-login', handleExternalLogin)\n window.document.removeEventListener('custom-logout', handleLogout)\n }\n }, [])\n\n const handleGetTicketClick = () => {\n if (\n !handleBookIsLoading &&\n !_isEmpty(selectedTickets) &&\n Object.values(selectedTickets)[0] > 0\n ) {\n handleBook()\n } else {\n if (\n isButtonScrollable &&\n ticketsContainerRef &&\n ticketsContainerRef.current\n ) {\n ticketsContainerRef.current.scrollIntoView({\n behavior: 'smooth',\n block: 'center',\n inline: 'nearest',\n })\n }\n }\n }\n\n const bookButtonIsDisabled =\n (handleBookIsLoading ||\n _isEmpty(selectedTickets) ||\n Object.values(selectedTickets)[0] === 0) &&\n !event?.flagSeatMapAllowed\n\n const isTicketAvailable = _some(\n tickets,\n ticket => ticket.displayTicket && !ticket.soldOut && ticket.salesStarted\n )\n\n const wrappedActionsSectionComponent = React.isValidElement(\n ActionsSectionComponent\n )\n ? React.cloneElement(ActionsSectionComponent as React.ReactElement<any>, {\n handleGetTicketClick,\n isTicketOnSale,\n isTicketAvailable,\n })\n : null\n\n const externalUrl = event?.redirectUrl\n const eventSaleIsNotStarted =\n !event?.salesStarted && event?.salesStart && !isTicketAvailable\n const influencers = event?.referralsEnabled ? event?.referrals : []\n\n const canShowGetTicketBtn = () => {\n if (\n !wrappedActionsSectionComponent &&\n !eventSaleIsNotStarted &&\n isTicketOnSale &&\n !event?.salesEnded &&\n !externalUrl\n ) {\n return true\n }\n\n return false\n }\n\n const onClose = (value: string) => {\n if (value === 'notInvited') {\n handleNotInvitedModalClose()\n } else if (value === 'invalidLink') {\n handleInvalidLinkModalClose()\n }\n setIsNotInvitedError('')\n setIsInvalidLinkError('')\n }\n const hideTopInfluencers = event?.hideTopInfluencers\n const isSeatMapAllowed = _get(event, 'seatMapAllowed', false)\n const isTableMapEnabled = _get(event, 'tableMapEnabled', false)\n\n const tableTickets = _filter(tickets, (ticket: any) => ticket.isTable)\n const ordinarTickets = {} as ITicket\n _forEach(tickets, (ticket: any, key: string) => {\n if (!ticket.isTable) {\n ordinarTickets[key] = ticket\n }\n })\n\n return (\n <ThemeProvider theme={themeMui}>\n {!isLoading && <ReferralLogic eventId={eventId} />}\n <div className={`get-tickets-page ${theme}`} style={contentStyle}>\n {isInvalidLinkError && (\n <ConfirmModal\n message={isInvalidLinkError}\n hideCancelBtn={true}\n onClose={() => onClose('invalidLink')}\n onConfirm={() => onClose('invalidLink')}\n />\n )}\n {isNotInvitedError && (\n <ConfirmModal\n hideCancelBtn={true}\n message={isNotInvitedError}\n onClose={() => onClose('notInvited')}\n onConfirm={() => onClose('notInvited')}\n // loading={removeFromResaleLoading}\n />\n )}\n {error && (\n <Alert\n severity=\"error\"\n onClose={onErrorClose}\n variant=\"filled\"\n style={{ width: '350px' }}\n >\n {error}\n </Alert>\n )}\n {isLoading ? (\n <Loader />\n ) : (\n <div ref={ticketsContainerRef}>\n {!isSalesClosed && (\n <TicketsSection\n event={event}\n ticketsList={ordinarTickets}\n tableTickets={tableTickets}\n selectedTickets={selectedTickets}\n handleTicketSelect={handleTicketSelect}\n sortBySoldOut={sortBySoldOut}\n ticketsHeaderComponent={ticketsHeaderComponent}\n tableTicketsHeaderComponent={tableTicketsHeaderComponent}\n hideTableTicketsHeader={\n hideTableTicketsHeader || _isEmpty(tableTickets)\n }\n hideTicketsHeader={\n hideTicketsHeader || _isEmpty(ordinarTickets)\n }\n showGroupNameBlock={showGroupNameBlock}\n currencySybmol={currencySybmol}\n isSeatMapAllowed={isSeatMapAllowed}\n />\n )}\n {externalUrl ? null : isSalesClosed ? (\n <p\n className={`event-closed-message ${\n !isLoggedIn ? 'event-closed-on-bottom' : ''\n }`}\n >\n Sales for this event are closed.\n </p>\n ) : eventSaleIsNotStarted ? (\n <Countdown\n startDate={event.salesStart}\n timezone={event.timezone}\n title=\"Sales start in:\"\n message=\"No tickets are currently available for this event.\"\n showMessage={!eventHasTickets}\n callback={updateTickets}\n disableLeadingZero={disableCountdownLeadingZero}\n isLoggedIn={isLoggedIn}\n />\n ) : null}\n {showWaitingList && event.salesStarted && !hideWaitingList && (\n <WaitingList\n tickets={ordinarTickets}\n eventId={eventId}\n defaultMaxQuantity={event.waitingListMaxQuantity}\n />\n )}\n {codeIsLoading ? (\n <Loader />\n ) : isSalesClosed ? null : showAccessCodeSection ? (\n <AccessCodeSection\n code={code}\n setCode={setCode}\n updateTickets={updateTickets}\n />\n ) : showPromoCodeSection ? (\n <PromoCodeSection\n code={code}\n codeIsApplied={codeIsApplied}\n setCodeIsApplied={setCodeIsApplied}\n showPromoInput={showPromoInput}\n setShowPromoInput={setShowPromoInput}\n setCode={setCode}\n updateTickets={updateTickets}\n codeIsInvalid={codeIsInvalid}\n setCodeIsInvalid={setCodeIsInvalid}\n promoText={promoText}\n />\n ) : null}\n {wrappedActionsSectionComponent}\n {canShowGetTicketBtn() && (\n <Button\n aria-hidden={true}\n className={`book-button \n ${bookButtonIsDisabled ? 'disabled' : ''} \n ${isButtonScrollable ? 'is-scrollable' : ''}\n ${!isLoggedIn ? 'on-bottom' : ''}\n `}\n onClick={handleGetTicketClick}\n >\n {selectedTickets.isTable\n ? 'RESERVE TABLES'\n : getTicketsLabel || 'GET TICKETS'}\n </Button>\n )}\n {isSeatMapAllowed && !event?.salesEnded && isTicketAvailable && (\n <Button\n className=\"reserve-button\"\n aria-hidden={true}\n onClick={onReserveButtonClick}\n >\n {isTableMapEnabled ? 'Select on map' : 'Select your seats'}\n </Button>\n )}\n {isLogged && !hideSessionButtons ? (\n <div className=\"session-wrapper\">\n <span className=\"session-container\">\n <Button\n variant=\"outline-light\"\n className=\"session-buttons\"\n onClick={handleOrdersClick}\n >\n My Orders\n </Button>\n </span>\n <span className=\"session-container\">\n <Button\n variant=\"outline-light\"\n className=\"session-buttons\"\n onClick={handleLogout}\n >\n Log out\n </Button>\n </span>\n </div>\n ) : (\n ''\n )}\n </div>\n )}\n {showLoginModal ? (\n <LoginModal onClose={handleOnClose} onLogin={handleOnLogin} />\n ) : null}\n </div>\n {showPoweredByImage ? <PoweredBy /> : null}\n {enableInfluencersSection && !hideTopInfluencers && influencers.length ? (\n <div className=\"event-influencers\">\n <h3>\n <span>TOP</span> INFLUENCERS\n </h3>\n <ol className=\"influencer-list\">\n {influencers.map((influencer: IInfluencer, i: number) => (\n <li className=\"influencer-item\" key={i}>\n {`${influencer.firstName} ${influencer.lastName?.charAt(0)}`}{' '}\n </li>\n ))}\n </ol>\n </div>\n ) : null}\n <VerificationPendingModal\n message={pendingVerificationMessage}\n onClose={() => {\n onPendingVerification()\n }}\n />\n </ThemeProvider>\n )\n}\n","export const X_TF_ECOMMERCE = 'X-TF-ECOMMERCE'\n","import { useEffect, useRef, useState } from 'react'\n\nimport { getCookieByName } from '../utils'\n\nexport const useCookieListener = (\n key: string,\n handler: (value: string | null) => void\n) => {\n const getCookie = () => getCookieByName(key)\n const [intervalValue, setIntervalValue] = useState<NodeJS.Timeout>()\n const cookieRef = useRef<string>(getCookie())\n\n const handleCookieChange = () => {\n const currentCookie = getCookie()\n const prevCookie = cookieRef.current\n\n if (currentCookie !== prevCookie) {\n cookieRef.current = getCookie()\n handler(cookieRef.current)\n }\n }\n\n useEffect(() => {\n const interval = setInterval(handleCookieChange, 500)\n setIntervalValue(interval)\n\n return () => {\n intervalValue && clearInterval(intervalValue)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n}\n","export const setLoggedUserData = (data: IUserData) => ({\n id: data.id,\n first_name: data.firstName,\n last_name: data.lastName,\n email: data.email,\n confirmEmail: data.email,\n city: data?.city || '',\n country: data?.countryId || data?.country || '',\n phone: data?.phone || '',\n street_address: data?.streetAddress || '',\n state: data?.stateId || '',\n zip: data?.zip || data?.zipCode || '',\n})\n"],"names":["ttfHeaders","Accept","Content-Type","CONFIGS","publicRequest","axios","create","baseURL","BASE_URL","headers","getQueryVariable","variable","window","vars","location","search","substring","split","i","length","pair","decodeURIComponent","ErrorFocus","connect","componentDidUpdate","prevProps","formik","isSubmitting","isValidating","keys","Object","errors","errorElement","document","querySelector","focus","Component","getDomain","url","subdomain","updatedUrl","replace","slice","join","indexOf","getCookieByName","cname","name","ca","cookie","c","charAt","deleteCookieByName","domain","hostname","downloadPDF","pdfUrl","xtfCookie","accessToken","localStorage","getItem","Authorization","X-TF-ECOMMERCE","fetch","credentials","then","response","_context","blob","blobValue","fileNameHeader","get","fileName","Error","file","Blob","type","fileURL","URL","createObjectURL","link","createElement","href","setAttribute","body","appendChild","click","removeChild","error","createCheckoutDataBodyWithDefaultHolder","ticketsQuantity","logedInValues","includeDob","userCredentials","ticket_holders","first_name","_get","last_name","phone","email","push","attributes","confirm_email","holderAgeDate","Date","dob_day","getDate","dob_month","getMonth","dob_year","getFullYear","createMarkup","data","__html","isBrowser","isJson","value","JSON","parse","e","isWindowDefined","isDocumentDefined","interceptors","use","authGuestToken","setItem","setGuestToken","_error$response","status","removeItem","_error$response2","_error$response2$data","Promise","reject","request","config","guestToken","userData","updatedHeaders","Authorization-Guest","additionalCookiesHeaderValue","Additional-Cookies","X_SOURCE_ORIGIN","X-Source-Origin","method","days","expires","date","setTime","getTime","toUTCString","setCustomCookie","token","defaults","common","setBaseUrl","baseUrl","setAccessToken","setCustomHeader","guestHeaderResponseValue","guestHeaderExistingValue","guestHeader","getEvent","id","pk","referralValue","referralId","searchParams","referral_key","referralIdlocal","params","Referer-Url","referrer","Referrer-Id","getTickets","promoCode","invitationHash","Promotion-Event","String","Promotion-Code","addToCart","post","getCart","postOnCheckout","freeTicket","city","country","state","zip","street_address","register","getPaymentData","hash","handlePaymentSuccess","orderHash","undefined","getProfileData","getConfirmationData","getOrders","page","limit","eventSlug","BRAND_SLUG","getOrderDetails","orderId","getConditions","eventId","resaleTicket","postReferralVisits","forgotPassword","processTicket","declineInvitation","sendRSVPInfo","validatePhoneNumber","getAddons","_context2","addons","getCheckoutPageConfigs","_context3","getSeatMapData","reservedSeatsHash","reserved_seats_hash","_context4","getSeatMapStatuses","_context5","reserveSeat","tierId","seatId","_context6","ttl","removeSeatReserve","seatIds","_context7","getNetverifyUrl","_context8","checkVerificationStatus","_context9","updateVerificationStatus","_context10","patch","verification","verificationStatus","checkCustomerOrder","_context11","appendScriptsToHeader","code","tempEl","innerHTML","scripts","getElementsByTagName","index","script","src","head","addGTagToHeader","tagId","links","_document","_document2","trim","append","scriptBody","dataLayer","gtag","args","_window","domains","usePixel","options","getScript","page_url","pageOptions","pageUrl","order_hash","brandGoogleTagKey","eventGoogleTagKey","eventGoogleTagManagerLinkerDomains","console","useEffect","emailRegex","combineValidators","validators","error_message","requiredValidator","message","errorMessage","item","addEventListener","err","isFalsy","emailValidator","test","SnackbarAlert","_ref$autoHideDuration","autoHideDuration","onClose","React","className","Snackbar","open","isOpen","anchorOrigin","position","vertical","horizontal","classes","root","Alert","severity","variant","icon","action","filled","CustomField","label","_ref2$type","field","_ref2$selectOptions","selectOptions","_ref2$form","form","touched","submitCount","theme","_ref2$inputProps","inputProps","pInputProps","_ref2$InputProps","InputProps","inputRef","_ref2$multiline","multiline","minRows","maxRows","useState","Boolean","isShrinked","setIsShrinked","_ref","useRef","isAutoFilled","current","_ref$current","matches","isSelectField","isTouched","_includes","customTheme","useTheme","sx","input","_isFunction","_isObject","TextField","placeholder","select","fullWidth","helperText","onFocus","SelectProps","native","MenuProps","InputLabelProps","shrink","onBlur","_map","option","key","disabled","PoweredBy","alt","style","top","left","transform","minWidth","backgroundColor","border","outline","padding","Schema","Yup","shape","required","ForgotPasswordModal","_ref$onLogin","onLogin","_ref$onForgotPassword","onForgotPasswordSuccess","_ref$onForgotPassword2","onForgotPasswordError","_ref$showPoweredByIma","showPoweredByImage","loading","setLoading","onForgotPassword","isAxiosError","Modal","Box","Formik","initialValues","validationSchema","onSubmit","isValid","dirty","Form","handleSubmit","Field","component","CircularProgress","size","onClick","maxHeight","overflow","_ref$actions","actions","_ref$modalClassName","modalClassName","MuiModal","children","Button","VerificationPendingModal","props","displayModal","showModal","setShowModal","LoginModal","_ref$alreadyHasUser","alreadyHasUser","_ref$userExpired","userExpired","_ref$onGetProfileData","onGetProfileDataSuccess","_identity","_ref$onGetProfileData2","onGetProfileDataError","_ref$onSignup","onSignup","_ref$modalClassname","modalClassname","logo","_ref$showForgotPasswo","showForgotPasswordButton","_ref$showSignUpButton","showSignUpButton","setError","password","CLIENT_ID","profileResponse","profileSpecifiedData","profileDataObj","firstName","lastName","confirmEmail","countryId","streetAddress","stateId","zipCode","stringify","event","CustomEvent","dispatchEvent","_e$response","_e$response$data","validate","meta","SignupSchema","min","confirmPassword","oneOf","SignupModal","_ref$onRegisterSucces","onRegisterSuccess","_ref$onRegisterError","onRegisterError","values","formData","FormData","set","CLIENT_SECRET","access_token_register","res","refreshToken","showZero","intNumber","Number","_isNumber","TimerWidget","expires_at","buyLoading","_ref$onCountdownFinis","onCountdownFinish","setShowTimer","handleCountdownFinish","timerRl","visibility","SVG","width","height","fill","Countdown","now","renderer","minutes","seconds","completed","memo","CheckboxField","rest","FormControl","_rest$form","FormGroup","FormControlLabel","control","Checkbox","componentsProps","typography","checkbox","_rest$form2","FormHelperText","PhoneNumberField","_ref$form","setFieldError","setFieldValue","setFieldTouched","setErrors","_ref$disableDropdown","disableDropdown","_ref$defaultCountry","defaultCountry","_ref$fill","setPhoneValidationIsLoading","isCountryCodeEditable","debounceCb","useCallback","_debounce","cb","newErrors","MuiPhoneNumber","onChange","dialCode","autoFormat","disableAreaCodes","countryCodeEditable","Loader","NativeSelectField","_ref$type","_ref$selectOptions","_ref$onChange","InputLabel","htmlFor","Select","target","RadioGroupField","radios","radioId","FormLabel","RadioGroup","map","radio","Radio","SelectField","isMultiple","_ref$options","selectId","getSelectedItemLabel","selectedValue","selectedItem","find","labelId","multiple","OutlinedInput","renderValue","selected","textAlign","MenuItem","checked","ListItemText","primary","compactStyleTheme","createTheme","components","MuiPaper","defaultProps","& > div","& > div > div, & > div > div > div, & .MuiCalendarPicker-root","& .MuiTypography-caption","margin","& .PrivatePickersSlideTransition-root","minHeight","DATE_SIZE","& .PrivatePickersSlideTransition-root [role=\"row\"]","& .MuiPickersDay-dayWithMargin","& .MuiPickersDay-root","& .MuiPickersArrowSwitcher-spacer","& [role=\"presentation\"] .PrivatePickersFadeTransitionGroup-root","marginRight","DatePickerField","_ref$useCompact","useCompact","_ref$dateFormat","dateFormat","_ref$placeholder","ThemeProvider","LocalizationProvider","dateAdapter","AdapterMoment","DatePicker","PopperProps","placement","showDaysOutsideCurrentMonth","disableFuture","inputFormat","mask","renderInput","evt","getInitialValues","propsInitialValues","userValues","results","_flatMapDeep","fields","groupItems","_forEach","groupItem","createRegisterFormData","checkoutBody","flagFreeTicket","bodyFormData","includes","setLoggedUserData","createCheckoutDataBody","holderAge","restValues","holders","individualHolder","fromEntries","entries","filter","_loop","holder","firstNameLogged","lastNameLogged","emailLogged","filteredRestValue","getValidateFunctions","element","states","validationFunctions","onValidate","assingUniqueIds","itemValue","_isArray","some","uniqueId","nanoid","getFieldLabel","flagRequirePhone","collectMandatoryWalletAddress","isRequiredField","isValidElement","getFieldComponent","select_multi","text","LogicRunner","setStates","setValues","setUserValues","onGetStatesSuccess","onGetStatesError","shouldFetchCountries","brandOptIn","prevCountry","mappedStates","stateExists","_mappedStates$find","_mappedStates$","fetchStates","userDataEncoded","parsedData","mappedValues","brand_opt_in","holderFirstName-0","holderLastName-0","holderEmail-0","getStoredUserData","BillingInfoContainer","_ref4$ticketHoldersFi","ticketHoldersFields","_ref4$initialValues","_ref4$buttonName","buttonName","_ref4$handleSubmit","_ref4$theme","_ref4$onRegisterSucce","_ref4$onRegisterError","_ref4$onSubmitError","onSubmitError","_ref4$onGetCartSucces","onGetCartSuccess","_ref4$onGetCartError","onGetCartError","_ref4$onGetCountriesS","onGetCountriesSuccess","_ref4$onGetCountriesE","onGetCountriesError","_ref4$onGetStatesSucc","_ref4$onGetStatesErro","_ref4$onGetProfileDat","_ref4$onGetProfileDat2","_ref4$onAuthorizeSucc","onAuthorizeSuccess","_ref4$onAuthorizeErro","onAuthorizeError","_ref4$onLoginSuccess","onLoginSuccess","_ref4$isLoggedIn","isLoggedIn","pIsLoggedIn","_ref4$accountInfoTitl","accountInfoTitle","hideLogo","themeOptions","_ref4$onErrorClose","onErrorClose","_ref4$hideErrorsAlert","hideErrorsAlertSection","_ref4$onSkipBillingPa","onSkipBillingPage","_ref4$skipPage","skipPage","_ref4$canSkipHolderNa","canSkipHolderNames","_ref4$onForgotPasswor","_ref4$onForgotPasswor2","_ref4$shouldFetchCoun","_ref4$onCountdownFini","_ref4$enableTimer","enableTimer","_ref4$showForgotPassw","_ref4$showSignUpButto","_ref4$brandOptIn","_ref4$showPoweredByIm","_ref4$isCountryCodeEd","_ref4$onPendingVerifi","onPendingVerification","isNewUser","setIsNewUser","themeMui","access_token","dataWithUniqueIds","setDataWithUniqueIds","setIsLoggedIn","cartInfoData","setCartInfo","countries","setCountries","showModalLogin","setShowModalLogin","setAlreadyHasUser","setUserExpired","showModalSignup","setShowModalSignup","showModalForgotPassword","setShowModalForgotPassword","setTicketsQuantity","holderFirstName","holderLastName","cardLoading","setCardLoading","isCountriesLoading","setIsCountriesLoading","phoneValidationIsLoading","showDOB","showTicketHolders","optedInFieldValue","ttfOptIn","isTable","hideTtfOptIn","expirationTime","collectOptionalWalletAddress","hidePhoneField","hideWalletAddressField","pendingVerificationMessage","setPendingVerificationMessage","prevData","addAddOnsInAttributes","selectedAddOns","add_ons","hasUniqueId","isEqualData","_isEqual","getQuantity","cart","qty","forEach","quantity","fetchCountries","fetchCart","cartInfo","_cartInfo$cart","Array","fetchUserData","userDataResponse","_isEmpty","removeReferralKey","_e$response$data$data","hasUnverifiedOrder","_e$response2","_e$response2$data","collectPaymentData","collectCheckoutBody","profileData","initialCountry","_find","toLowerCase","Backdrop","color","zIndex","ttf_opt_in","enableReinitialize","formikHelpers","checkoutBodyForRegistration","resRegister","userProfile","_e$response3","_e$response3$data","_e$response3$data$dat","_e$response4","_e$response4$data","_e$response5","_e$response5$data","_e$response6","_e$response6$data","_e$response6$data$dat","_e$response7","_e$response7$data","_e$response8","_e$response9","_e$response9$data","_e$response10","Fragment","labelClassName","group","groupClassname","el","handleBlur","format","_item","currencyNormalizerCreator","currency","getCurrencySymbolByCurrency","createFixedFloatNormalizer","fixedValue","toFixed","base","fontSize","letterSpacing",":-webkit-autofill","::placeholder","invalid","CheckoutForm","total","_ref$onSubmit","_ref$stripeCardOption","stripeCardOptions","_ref$error","stripe_client_secret","billing_info","_ref$isLoading","isLoading","_ref$handleSetLoading","handleSetLoading","_ref$conditions","conditions","disableZipSection","paymentButtonText","stripe","useStripe","elements","useElements","postalCode","setPostalCode","stripeError","setStripeError","checkboxes","setCheckboxes","allowSubmit","setAllowSubmit","preventDefault","card","getElement","CardNumberElement","address","line1","postal_code","createPaymentMethod","billing_details","paymentMethodReq","confirmCardPayment","payment_method","paymentMethod","handleCheckboxes","updatedCheckedState","allChecked","every","buttonIsDiabled","onReady","CardExpiryElement","CardCvcElement","publishableKey","STRIPE_PUBLISHABLE_KEY","getStripePromise","reviewData","stripePublishableKey","stripeAccount","loadStripe","initialOrderValues","product_name","ticketType","price","guest_count","pay_now","initialReviewValues","order_details","facebook","FacebookShareButton","FacebookIcon","messenger","FacebookMessengerShareButton","FacebookMessengerIcon","twitter","TwitterShareButton","TwitterIcon","linkedin","LinkedinShareButton","LinkedinIcon","pinterest","PinterestShareButton","PinterestIcon","vk","VKShareButton","VKIcon","ok","OKShareButton","OKIcon","telegram","TelegramShareButton","TelegramIcon","whatsapp","WhatsappShareButton","WhatsappIcon","reddit","RedditShareButton","RedditIcon","tumblr","TumblrShareButton","TumblrIcon","mailru","MailruShareButton","MailruIcon","EmailShareButton","EmailIcon","livejournal","LivejournalShareButton","LivejournalIcon","viber","ViberShareButton","ViberIcon","workplace","WorkplaceShareButton","WorkplaceIcon","line","LineShareButton","LineIcon","pocket","PocketShareButton","PocketIcon","instapaper","InstapaperShareButton","InstapaperIcon","weibo","WeiboShareButton","WeiboIcon","hatena","HatenaShareButton","HatenaIcon","SocialComponent","mainLabel","subLabel","platform","shareData","_config","Icon","_config2","round","SocialButtons","showDefaultShareButtons","shareLink","appId","shareButtons","clientLabel","showReferralsInfoText","quote","title","shareButton","ConfirmModal","_ref$loading","_ref$hideCancelBtn","hideCancelBtn","_ref$onClose","_ref$onConfirm","onConfirm","isTimeExpired","startDate","timezone","moment","isAfter","tz","_ref$timezone","guess","_ref$title","_ref$message","_ref$showMessage","showMessage","_ref$disableLeadingZe","disableLeadingZero","_ref$callback","callback","duration","setDuration","timeExpired","setTimeExpired","timer","setInterval","clearInterval","currentDate","diffTime","diff","dateArr","year","years","month","months","day","hour","hours","minute","second","timeLeft","unit","val","generateQuantity","n","quantityList","WaitingList","tickets","_ref$defaultMaxQuanti","defaultMaxQuantity","showSuccessMessage","setShowSuccessMessage","ticketTypesList","d","displayName","showTicketsField","requestData","success","ticketTypeId","AccessCodeSection","setCode","updateTickets","isAccessCodeHasValue","onKeyPress","PromoCodeSection","codeIsApplied","showPromoInput","setShowPromoInput","setCodeIsApplied","codeIsInvalid","setCodeIsInvalid","promoText","isPromoCodeHasValue","preProcessor","ReferralLogic","isAlreadyCounted","_asyncToGenerator","TicketRow","ticketTier","prevTicketTier","selectedTickets","handleTicketSelect","isSeatMapAllowed","tableType","soldOutMessage","toUpperCase","isSalesClosed","salesStarted","salesEnded","maxCount","minCount","multiplier","Math","getTicketSelectOptions","maxGuests","maxQuantity","minGuests","minQuantity","ticketsClosedMessage","canPurchaseTicket","displayTicket","isDirectPurchaseAllowed","onSaleContent","borderRadius","displayEmpty","aria-label","PaperProps","returnValue","sold_out","soldOut","TicketsSection","ticketsList","ticketsHeaderComponent","tableTicketsHeaderComponent","hideTicketsHeader","hideTableTicketsHeader","showGroupNameBlock","currencySybmol","tableTickets","symbol","sortedTicketsList","sortBySoldOut","_sortBy","showGroup","ticket","groupName","priceSymbol","arr","ticketPrice","ticketOldPrice","oldPrice","isSoldOut","ticketIsDiscounted","ticketIsFree","ticketPriceElem","isNewGroupTicket","_arr","feeIncluded","_arr2","depositPercent","EventInfoItem","image","tableConfig","columns","header","ItemComponent","row","columnProps","eventName","amount","normalizer","Row","handleDetailsInfo","_ref$columns","hideDetailsButton","TableRow","& > *","borderBottom","column","TableCell","scope","onCellClick","RadioField","schema","yup","to","when","is","confirm","TicketResaleModal","holder_name","event_name","retain_amount_on_sale","ticket_type_is_active","TicketsTable","_ref$handleSellTicket","handleSellTicket","_ref$handleRemoveFrom","handleRemoveFromResale","_ref$icon","_ref$displayColumnNam","displayColumnNameInRow","_ref$canSellTicket","canSellTicket","_ref$ticketsTitle","ticketsTitle","pdfError","setPdfError","pdfDownload","setPdfDownload","TableContainer","Paper","Table","TableHead","TableBody","columnIndex","ticketIsDownloading","pdf_link","is_on_sale","pdfDownloadError","is_sellable","getRow","_ticket$add_ons","colSpan","add_on","password_confirmation","addonsWithGroupsAdapter","addonsData","addOnsGroups","addOnGroupsWithVariants","addOnsWithoutVariants","addon","addOnGroupId","currentGroupId","exsistingGroupIndex","findIndex","addOnGroup","variants","concat","cartAdapter","cartData","expiresAt","AddonComponent","classNamePrefix","_ref$handleAddonChang","handleAddonChange","active","stock","_isNull","generateSelectOptions","generateStockBasedOnLimitations","ticketQuantity","allowedStockCount","limitPerTicket","flagLimitToTicketQuantity","stockBasedOnLimitPerTicket","filterStockBasedOnAvailability","generatedStock","availableStock","filteredStockCount","getAddonSelectOptions","choosedTicketCount","addonsWithOptions","groupsWithSelectedVariantsInfo","groupsWithVariants","simpleAddonStock","variantId","variantStock","stockBasedOnLimitation","choosedVariants","selectedCount","allowedVariantStockCount","variantOptions","addonOptions","getTicketRelatedAddons","ticketId","prerequisiteTicketTypeIds","getSortedAddons","sortDirection","addonsCopy","unsortedVariants","sortOrder","sortedVariants","sortedAddons","_reverse","addToCartFunc","enableBillingInfoAutoCreate","result","pageConfigsDataResponse","pageConfigsData","skipBillingPage","_pageConfigsData$skip","skip_billing_page","nameIsRequired","names_required","ageIsRequired","age_required","phoneIsRequired","phone_required","hide_phone_field","hasAddOn","has_add_on","free_ticket","collect_optional_wallet_address","collect_mandatory_wallet_address","checkoutResult","event_id","getOwnReservationsBasedOnStatuses","statuses","ownReservations","groupRowId","seatIndex","getTicketDropdownData","reservationData","tierReleations","ticketsDropdownsData","reservation","ticketsData","_values","ticket_type_tier_id","ticket_type_name","ticket_type_price","ticket_type_id","getAddToCartRequestData","_ref$reservations","reservations","_ref$selectedSeats","selectedSeats","_ref$selectedTickets","_ref$guestCounts","guestCounts","hasGuests","addToCartData","alternative_view_id","product_cart_quantity","product_options","product_id","ticket_types","productOptions","ticketTypes","sitem","ticket_type_option","_ticketTypes$ticket$t","ticket_price","SeatMapComponent","seatMapProps","mapContainerId","seatData","_seatMapProps$seatMap","seatMapType","_seatMapProps$seatMap2","seatMapEvents","_seatMapProps$ticketT","ticketTypeTierRelations","tierPrices","isReserving","predefinedSeats","ticketTypeTireRelationsArray","parentElement","getElementById","mapComponent","SeatMapView","events","isSelectionOn","clientWidth","isBlockMap","isTableMap","ReactDom","render","reservedSeats","_props$theme","getTicketsBtnLabel","_props$contentStyle","contentStyle","_props$isButtonScroll","isButtonScrollable","handleGetTicketClick","handleCancelReservation","_props$ticketDeleteBu","ticketDeleteButtonContent","currencySymbol","_props$tableMapEnable","tableMapEnabled","setGuestCounts","isAddingToCart","bookButtonIsDisabled","_some","_keys","ticketItem","dropdownData","selectedTicketData","startNum","ticket_type_min_number_of_guests","endNum","ticket_type_max_number_of_guests","numLength","showGuestCountDropdown","guestPrice","guest_price","finalPrice","handleTicketChange","display","flexDirection","justifyContent","ticket_type_deposit","m","from","_","marginLeft","count","getButtonLabel","VERIFICATION_STATUSES","PENDING","APPROVED","FAILED","WRONG_CUSTOMER","_ref$enableBillingInf","_ref$enableTimer","_ref$onGetAddonsPageI","onGetAddonsPageInfoSuccess","_ref$onGetAddonsPageI2","onGetAddonsPageInfoError","_ref$onPostCheckoutSu","onPostCheckoutSuccess","_ref$onPostCheckoutEr","onPostCheckoutError","_ref$onConfirmSelecti","onConfirmSelectionSuccess","_ref$onConfirmSelecti2","onConfirmSelectionError","_ref$onPendingVerific","setAddons","addonsOptions","setAddonsOptions","groupsWithSelectedVariants","setGroupsWithSelectedVariants","groupsWithInitialVariantsValues","setGroupsWithInitialVariantsValues","cartExpirationTime","setCartExpirationTime","_cartAdapter","choosedTicketID","adaptedAddons","ticketRelatedAddons","sortedTicketAddons","_getAddonSelectOption","getAddonsPageInfo","onFieldChange","changeableGroup","currGroupId","currSelectedVariantId","currSelectedVariantCount","updatedGroupsWithSelectedVariants","groupId","changedGroupd","remainingGroupStock","recreatedVariantsOptions","variantCurrSelectedValue","prevState","assign","recreateGroupVariantsSelectOptions","handleConfirm","skipAddonPage","checkoutResponse","_error$response$data","_error$response$data$","handleClearAddons","selectedAddons","isConfirmDisabled","autoComplete","cost","isAddonFree","addonNormalizedPrice","getNormalizedPrice","imageUrl","dangerouslySetInnerHTML","description","confirmationLabels","_ref$hasCopyIcon","hasCopyIcon","isReferralEnabled","_ref$messengerAppId","messengerAppId","_ref$shareButtons","_ref$onGetConfirmatio","onGetConfirmationDataSuccess","_ref$onGetConfirmatio2","onGetConfirmationDataError","_ref$onLinkCopied","onLinkCopied","_ref$showReferralsInf","_ref$showCopyInfoModa","showCopyInfoModal","_ref$showPricingNoteS","showPricingNoteSection","setData","dataEncoded","personal_share_sales","salesData","sales","_d$price","unshift","product_price","_data$product_price","showCopyModal","setShowCopyModal","confirmationTitle","_confirmationLabels$c2","confirmationMain","_confirmationLabels$c3","confirmationHelper","product_image","custom_confirmation_page_text","custom_confirmation_page_text_full_replacement","attach_tickets","disable_referral","ref","personal_share_link","newData","navigator","clipboard","writeText","pricing","onGetVerifyUrlSuccess","_props$onGetVerifyUrl2","onGetVerifyUrlError","_props$onGetVerificat","onGetVerificationStatusSuccess","_props$onGetVerificat2","onGetVerificationStatusError","_props$onVerification","onVerificationMessageModalClose","_props$onPassVerifica","onPassVerificationStepsSuccess","_props$onPassVerifica2","onPassVerificationStepsError","loadingStatus","setLoadingStatus","setVerificationStatus","netverifyUrl","setNetverifyUrl","displaModal","modalData","setModalData","isAccountVerifiedOrPending","callbackNetVerify","payload","transactionStatus","removeEventListener","intervalId","getUrl","urlResponse","getVerificationStatus","statusResponse","getCustomerOrderStatus","makeRequests","checkoutData","iframe","_ref$onGetOrdersSucce","onGetOrdersSuccess","_ref$onGetOrdersError","onGetOrdersError","_ref$theme","_ref$selectEventsLabe","selectEventsLabel","_ref$hideDetailsButto","setLimit","setFilter","isLogged","setIsLogged","fetchData","orders","_data$orders","Autocomplete","disablePortal","getOptionLabel","_event","eventFilter","url_name","purchased_events","_data$orders2","MyTicketsRow","TablePagination","rowsPerPageOptions","total_count","rowsPerPage","onPageChange","newPage","onRowsPerPageChange","_ref$onRemoveFromResa","onRemoveFromResaleSuccess","_ref$onRemoveFromResa2","onRemoveFromResaleError","_ref$onResaleTicketSu","onResaleTicketSuccess","_ref$onResaleTicketEr","onResaleTicketError","onReturnButtonClick","_ref$personalLinkIcon","personalLinkIcon","ticketsTableColumns","ordersPath","pOrderId","_ref$referralTitle","referralTitle","_ref$itemsTitle","itemsTitle","removeFromResaleLoading","setRemoveFromResaleLoading","resaleTicketLoading","setResaleTicketLoading","showResaleModal","setShowResaleModal","showRemoveResaleModal","setShowRemoveResaleModal","activeTicket","setActiveTicket","handleOnSubmit","updatedData","_updatedData$tickets","onConfirmRemoveResale","_updatedData$tickets2","orderSummery","columnsProps","is_table","rel","sales_referred","items","_data$items","_data$items$ticket_ty","guests_count","deposit_paid","remaining","_data$items2","_data$items2$add_ons","_data$tickets$","_has","getTotal","sellTicketType","ticket_type_hash","paymentFields","handlePayment","_ref$formTitle","formTitle","errorText","_ref$onErrorClose","_ref$onGetPaymentData","onGetPaymentDataSuccess","_ref$onGetPaymentData2","onGetPaymentDataError","_ref$onPaymentError","onPaymentError","_ref$disableZipSectio","elementsOptions","_ref$enablePaymentPla","enablePaymentPlan","_ref$orderInfoLabel","orderInfoLabel","_ref$paymentInfoLabel","paymentInfoLabel","setReviewData","orderData","setOrderData","showPaymentPlanSection","setShowPaymentPlanSection","paymentIsLoading","setPaymentIsLoading","paymentDataIsLoading","setPaymentDataIsLoading","setConditions","showFormTitle","showErrorText","isFreeTickets","orderDataArray","_cart$","_cart$2","debt","tableTypes","conditionsInfo","fetchConditions","handlePaymentMiddleWare","paymentSuccessResponse","orderValue","orderCurrency","hasTableTypes","paymentFieldsData","parseFloat","Container","maxWidth","_field$className","_field$normalizer","tableTypeItem","gridTemplateColumns","gridColumnGap","Elements","StripePayment","_ref$onClickOk","onClickOk","tokenProps","_ref$onResetPasswordS","onResetPasswordSuccess","_ref$onResetPasswordE","onResetPasswordError","showSection","modal","setModal","handleModalClose","_props$timerMessage","timerMessage","_props$onAddToCartSuc","onAddToCartSuccess","identity","_props$onCountdownFin","seatMap","seatMapData","setSeatMapData","eventSeatsRef","ticketTypeTierRelationsRef","setSelectedTickets","seatMapStatuses","setSeatMapStatuses","setReservedSeats","isLoadingSeatMapData","setIsLoadingSeatMapData","setIsReserving","setIsAddingToCart","showTimer","fetchSeatMapData","_seatMapDataResponse$","seatReservationTime","eventSeats","fetchSeatMapReservations","statusesResponse","tierIdOfReservation","seats","seatsCount","rowId","tier_id","seatTicketsArray","startTimer","endTimer","handleSeatReservation","relations","_keys2","firstItem","handleCancelSeatReservtion","currentSelectedTickets","onSeatClick","seatInfo","_seatInfo$seat","seat","handleGetTicketBtnClick","ticketData","_addToCartData$attrib","valueOf","onComplete","tireId","onProcessTicketSuccess","_ref$onProcessTicketE","onProcessTicketError","_ref$onDeclineTicketP","onDeclineTicketPurchaseSuccess","_ref$onDeclineTicketP2","onDeclineTicketPurchaseError","billingPath","successMessage","setSuccessMessage","isDeclined","getTicketsLabel","_ref$contentStyle","_ref$onAddToCartError","onAddToCartError","_ref$onGetTicketsSucc","onGetTicketsSuccess","_ref$onGetTicketsErro","onGetTicketsError","_ref$onLogoutSuccess","onLogoutSuccess","_ref$onLogoutError","onLogoutError","_ref$queryPromoCode","queryPromoCode","_ref$isPromotionsEnab","isPromotionsEnabled","_ref$isAccessCodeEnab","isAccessCodeEnabled","_ref$hideSessionButto","hideSessionButtons","_ref$hideWaitingList","hideWaitingList","_ref$isButtonScrollab","_ref$sortBySoldOut","_ref$disableCountdown","disableCountdownLeadingZero","_ref$isLoggedIn","ActionsSectionComponent","actionsSectionComponent","_ref$hideTicketsHeade","_ref$hideTableTickets","_ref$enableInfluencer","enableInfluencersSection","_ref$enableAddOns","enableAddOns","_ref$handleNotInvited","handleNotInvitedModalClose","_ref$handleInvalidLin","handleInvalidLinkModalClose","_ref$showGroupNameBlo","_ref$currencySybmol","_ref$onReserveButtonC","onReserveButtonClick","showLoginModal","setShowLoginModal","setTickets","setEvent","showWaitingList","setShowWaitingList","setIsLoading","codeIsLoading","setCodeIsLoading","handleBookIsLoading","setHandleBookIsLoading","showAccessCodeSection","setShowAccessCodeSection","showPromoCodeSection","setShowPromoCodeSection","isNotInvitedError","setIsNotInvitedError","isInvalidLinkError","setIsInvalidLinkError","ticketsContainerRef","handler","getCookie","intervalValue","setIntervalValue","cookieRef","handleCookieChange","interval","useCookieListener","decoded","jwt_decode","exp","getTicketsApi","handleLogout","handleExternalLogin","_getTicketsApi","isUpdateingCode","previewKey","eventResponse","ValidPromoCode","is_access_code","handleBook","optionName","isTableType","isTicketOnSale","eventHasTickets","scrollIntoView","behavior","block","inline","flagSeatMapAllowed","isTicketAvailable","wrappedActionsSectionComponent","cloneElement","externalUrl","redirectUrl","eventSaleIsNotStarted","salesStart","influencers","referralsEnabled","referrals","hideTopInfluencers","isTableMapEnabled","_filter","ordinarTickets","waitingListMaxQuantity","influencer","_influencer$lastName","configs"],"mappings":"2iUAGO,IAAMA,GAAqC,CAChDC,OAAQ,2BACRC,eAAgB,4BAkBLC,GAAoB,GAEpBC,GAAgCC,EAAMC,OAAO,CACxDC,QAASJ,GAAQK,4CACjBC,QAAST,KC3BEU,GAAmB,SAACC,GAC/B,GAAsB,oBAAXC,OAGT,IAFA,IACMC,EADQD,OAAOE,SAASC,OAAOC,UAAU,GAC5BC,MAAM,KAChBC,EAAI,EAAGA,EAAIL,EAAKM,OAAQD,IAAK,CACpC,IAAME,EAAOP,EAAKK,GAAGD,MAAM,KAC3B,GAAIG,EAAK,KAAOT,EACd,OAAOU,mBAAmBD,EAAK,IAIrC,OAAO,GCYIE,GAAaC,8BAhB1B,mBAa6B,+CAAX,WAAA,OAAM,QAFrB,oGAVMC,mBAAA,SAAmBC,GACxB,MAA+CA,EAAUC,OAAjDC,IAAAA,aAAcC,IAAAA,aAChBC,EAAOC,OAAOD,OADgBE,QAEpC,GAAIF,EAAKV,OAAS,GAAKQ,IAAiBC,EAAc,CACpD,IACMI,EAAeC,SAASC,wBADHL,EAAK,SAE5BG,GACFA,EAAaG,aARYC,uBCPjBC,GAAUC,EAAaC,GACrC,IAAIC,EAAkBF,EAAIG,QAAQ,yBAA0B,IAQ5D,OANKF,IAGHC,GAFAA,EAAaA,EAAWvB,MAAM,MAENyB,MAAMF,EAAWrB,OAAS,GAAGwB,KAAK,OAG3B,IAA7BH,EAAWI,QAAQ,KACdJ,EAAWvB,MAAM,KAAK,GAGxBuB,WCGOK,GAAgBC,GAC9B,GAAsB,oBAAXlC,OAAwB,MAAO,GAG1C,IAFA,IAAImC,EAAOD,EAAQ,IACfE,EAAKf,SAASgB,OAAOhC,MAAM,KACtBC,EAAI,EAAGA,EAAI8B,EAAG7B,OAAQD,IAAK,CAElC,IADA,IAAIgC,EAAIF,EAAG9B,GACW,KAAfgC,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