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A,4BAAMolB,EAAuB,SAAEre,IAAY,GAAEhK,IAC3C,IAEE,aADuB,QAAuBA,IAC9BL,KAAK06B,UACvB,CAAE,MAAOp3B,GAEP,MADA+G,EAAS,8BAA+B,CAAEI,KAAM,wCAAyCnH,SAAS,CAAEoH,MAAM,IACpG,IAAIlH,KACZ,CACF,EAEA,uBAAMgmB,EAAkB,OAAEpf,EAAM,SAAEC,IAAY,GAAEhK,EAAE,WAAE+C,IAClD,IACE,MAAMiwB,QAAqB,QAAkB,CAAEhzB,KAAI+C,eACnDgH,EAAO,kBAAmBipB,GAC1BjpB,EAAO,oBAAqBipB,GAExBA,EAAaxvB,YACTwG,EAAS,sBAAuBgpB,EAAaxvB,KAAM,CAAE6G,MAAM,GAErE,CAAE,MAAOpH,GACP8G,EAAO,kBAAmB,MAC1BC,EAAS,8BAA+B,CAAEI,KAAM,iCAAkCnH,SAAS,CAAEoH,MAAM,GACrG,CACF,EAEA,yBAAM2gB,EAAoB,SAAEhhB,GAAYnK,GACtC,UACQ,QAAoBA,EAC5B,CAAE,MAAOoD,GACP+G,EAAS,8BAA+B,CAAEI,KAAM,mCAAoCnH,SAAS,CAAEoH,MAAM,GACvG,CACF,EAEA,6BAAMghB,EAAwB,SAAErhB,GAAY+oB,GAC1C,UACQ,QAAwB,IACzBA,GAEP,CAAE,MAAO9vB,GAEP,MADA+G,EAAS,8BAA+B,CAAEI,KAAM,2BAA4BnH,SAAS,CAAEoH,MAAM,IACvF,IAAIlH,KACZ,CACF,EAEA,4BAAMmoB,EAAuB,OAAEvhB,EAAM,SAAEC,IACrC,IAEED,EAAO,6BADqB,UAE9B,CAAE,MAAO9G,GACP+G,EAAS,8BAA+B,CAAEI,KAAM,wCAAyCnH,SAAS,CAAEoH,MAAM,GAC5G,CACF,G","sources":["webpack://kinside_app/./app/frontend/src/common/stores/modules/search.service.js","webpack://kinside_app/./app/frontend/src/common/services/user.service.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/messaging.service.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/messaging.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/tours.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/dependents.service.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/dependents.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/track.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/legup.service.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/legup.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/notifications.js","webpack://kinside_app/./app/frontend/src/common/services/hubspot.service.js","webpack://kinside_app/./app/frontend/src/care-provider/stores/modules/provider-user.service.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/tours.service.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/account.service.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/account.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/facility.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/facility.service.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/facilities.service.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/payments.service.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/facilities.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/payments.js"],"sourcesContent":["import {\n axios,\n toSnakeCase,\n toCamelCase,\n clearEmptyValue,\n getBoundsFromFacilities,\n} from '@utils';\n\nfunction searchParamsToFetchParams({\n location, filters: fil, bounds, geoSearchType, sort, searchRadius,\n}) {\n const filters = (() => {\n if (fil) {\n const {\n age,\n startDate,\n onlyEmergencyCare,\n ...rest\n } = fil;\n return {\n dependents: age?.dependents,\n age_ranges: age?.range,\n openings: startDate?.value,\n openings_from: startDate?.date,\n emergency_care: onlyEmergencyCare,\n search_radius: searchRadius,\n ...toSnakeCase(rest),\n };\n }\n return undefined;\n })();\n\n return clearEmptyValue({\n source_address: location?.targetAddress,\n source_latitude: location?.lat,\n source_longitude: location?.lon,\n precise_address_lat: location?.lat,\n precise_address_lon: location?.lon,\n source_city: location?.city,\n source_state: location?.state,\n source_zip: location?.zip,\n is_precise_address: location?.preciseLocation,\n filters,\n bounds_neLat: bounds?.neLat,\n bounds_neLon: bounds?.neLon,\n bounds_swLat: bounds?.swLat,\n bounds_swLon: bounds?.swLon,\n center_lon: location?.lon,\n center_lat: location?.lat,\n geo_search_type: geoSearchType,\n sort,\n });\n}\n\nfunction fetchParamsToSearchParams({\n filters: fetchFilters,\n /* eslint-disable camelcase */\n bounds_neLat,\n bounds_neLon,\n bounds_swLat,\n bounds_swLon,\n ...rest\n}) {\n const {\n dependents,\n age_ranges: range,\n openings,\n openings_from,\n emergency_care: onlyEmergencyCare,\n search_radius: searchRadius,\n ...restFilters\n } = fetchFilters;\n\n const filters = {\n age: { dependents: dependents || [], range: range || [] },\n startDate: { value: openings, date: openings_from },\n onlyEmergencyCare,\n ...toCamelCase(restFilters),\n };\n\n const location = {\n targetAddress: rest.source_address,\n lat: parseFloat(rest.source_latitude),\n lon: parseFloat(rest.source_longitude),\n city: rest.source_city,\n state: rest.source_state,\n zip: rest.source_zip,\n preciseLocation: rest.precise_address,\n };\n\n return ({\n bounds: {\n neLat: bounds_neLat,\n neLon: bounds_neLon,\n swLat: bounds_swLat,\n swLon: bounds_swLon,\n },\n location,\n filters: clearEmptyValue(filters),\n searchRadius,\n });\n /* eslint-enable camelcase */\n}\n\nasync function fetchSearchHistory() {\n const response = await axios.get('/cd_searches.json');\n return toCamelCase(response.data);\n}\n\nasync function saveSearch(params) {\n const response = await axios.post('/cd_searches.json', searchParamsToFetchParams(params));\n return toCamelCase(response.data);\n}\n\nasync function fetchSearch(id) {\n const response = await axios.get(`/cd_searches/${id}.json`);\n return fetchParamsToSearchParams(response.data);\n}\n\nfunction deleteSearch(id) {\n return axios.delete(`/cd_searches/${id}.json`);\n}\n\nasync function fetchPhilosophies() {\n const response = await axios.get('/facility_philosophies.json');\n return response.data;\n}\n\nasync function fetchScheduleTypes() {\n const response = await axios.get('/api/v1/schedule_types.json');\n return response.data;\n}\n\n// age ranges are disabled\n// async function fetchAgeRanges() {\n// const response = await axios.get('/age_groups.json');\n// return toCamelCase(response.data);\n// }\n\nasync function fetchMotivation() {\n const response = await axios.get('/parent_motivations.json');\n return toCamelCase(response.data);\n}\n\nfunction arrayToString(array = []) {\n return array.join(',');\n}\n\nfunction mapParamsToFetchParams({\n filters: fil, bounds, pagination, location, geoSearchType, sort, searchRadius, searchId,\n} = {}) {\n const { filters: fetchFilters, ...rest } = searchParamsToFetchParams({\n filters: fil,\n bounds,\n location,\n geoSearchType,\n sort,\n searchRadius,\n });\n\n const filters = {};\n if (fil) {\n Object.keys(fetchFilters).forEach((filterName) => {\n const value = fetchFilters[filterName];\n if (value === undefined || (Array.isArray(value) && !value.length)) {\n return;\n }\n filters[`filters[${filterName}]`] = Array.isArray(value) ? arrayToString(value) : value;\n });\n }\n\n return {\n ...filters,\n ...rest,\n per_page: pagination?.perPage,\n page: pagination?.page,\n search_id: searchId,\n };\n}\n\nasync function findFacilities(restOfParams) {\n const axiosController = new AbortController();\n\n try {\n const params = mapParamsToFetchParams(restOfParams);\n\n const response = await axios.get('/childcare/markers.json', {\n params,\n signal: axiosController.signal,\n });\n\n const { markers, ...restOfResponse } = response.data;\n const facilities = markers.map((m) => ({ ...m.facility, zipBased: m.zip_based }));\n\n return toCamelCase({\n ...restOfResponse,\n facilities,\n pagination: {\n page: response.data.current_page,\n totalPages: response.data.total_pages,\n totalRecords: response.data.total_results,\n },\n markers: markers\n .map(({ facility, ...rest }) => ({ ...rest, facilityId: facility.id })),\n boundsToFit: getBoundsFromFacilities(markers),\n });\n } catch (error) {\n if (axiosController.abort()) {\n return undefined;\n }\n throw new Error(error);\n }\n}\n\nexport {\n fetchSearchHistory,\n saveSearch,\n fetchSearch,\n deleteSearch,\n fetchPhilosophies,\n fetchScheduleTypes,\n searchParamsToFetchParams,\n fetchMotivation,\n findFacilities,\n};\n","import { axios, toCamelCase, toSnakeCase } from '@utils';\n\nconst notificationSettings = [\n { value: 'all', label: 'Receive all emails' },\n { value: 'important', label: 'Receive important emails only' },\n];\n\nasync function removeAvatar() {\n return axios.delete('/avatar');\n}\n\nasync function updateNotificationSettings(settings) {\n return axios.patch('/notification_settings', { user: { email_settings: settings } });\n}\n\nasync function getUser() {\n const { data } = await axios.get('/user.json');\n return toCamelCase(data.user);\n}\n\nasync function updateUser(userObj) {\n const { isImpersonated, ...user } = userObj;\n const response = await axios.put('/user.json', { user: toSnakeCase(user) });\n return toCamelCase(response.data.user);\n}\n\nasync function updatePassword(password, passwordConfirmation) {\n const response = await axios.put(\n '/users.json',\n {\n user: {\n password,\n password_confirmation: passwordConfirmation,\n },\n },\n ).catch(() => false);\n\n return response;\n}\n\nasync function getUserNavData(email) {\n const { data } = await axios.get('/api/v1/legup/users/nav', {\n params: {\n email,\n },\n });\n\n return toCamelCase(data);\n}\n\nexport default {\n removeAvatar,\n updateNotificationSettings,\n getUser,\n updateUser,\n updatePassword,\n notificationSettings,\n getUserNavData,\n};\n","import { axios, toSnakeCase, toCamelCase } from '@utils';\n\nconst CONVERSATIONS_BASE_PATH = 'api/v1/conversations';\nconst MESSAGES_BASE_PATH = 'api/v1/messages';\n\nasync function getConversations(params) {\n const response = await axios.get(`/${CONVERSATIONS_BASE_PATH}`, {\n params: toSnakeCase(params),\n });\n return toCamelCase(response.data);\n}\n\nasync function getMessages(params) {\n const response = await axios.get(`/${MESSAGES_BASE_PATH}`, {\n params: toSnakeCase(params),\n });\n return toCamelCase(response.data);\n}\n\nasync function sendMessage(body) {\n const response = await axios.post(\n `/${MESSAGES_BASE_PATH}`,\n toSnakeCase(body),\n );\n return toCamelCase(response.data);\n}\n\nasync function markAsRead(body) {\n const response = await axios.put(\n `/${MESSAGES_BASE_PATH}/mark_read`,\n toSnakeCase(body),\n );\n\n return response;\n}\n\nasync function getParentInfo(params) {\n const response = await axios.get(`/${CONVERSATIONS_BASE_PATH}/parent_info`, {\n params: toSnakeCase(params),\n });\n return toCamelCase(response.data);\n}\n\nfunction formatConversation(conversation, currentUser) {\n const conv = {\n id: conversation.id,\n lastMessage: conversation.lastMessage,\n facilityId: conversation.childCareFacilityId,\n color: ['gold', 'periwinkle', 'coral', 'fuchsia', 'rust'][Math.floor(Math.random() * 5)],\n lastUpdatedAt: conversation.updatedAt,\n hasUnreadMessages: conversation.hasUnreadMessages,\n };\n if (currentUser.isParent) {\n conv.secondUser = {\n id: conversation.firstUserType === 'User' ? conversation.secondUserId : conversation.firstUserId,\n name: conversation.childCareFacilityName,\n type: 'Provider',\n };\n } else {\n conv.secondUser = {\n id: conversation.firstUserType === 'Provider' ? conversation.secondUserId : conversation.firstUserId,\n name: conversation.firstUserType === 'Provider' ? conversation.secondUser : conversation.firstUser,\n type: 'User',\n legupParentId: conversation.legupParentId,\n };\n }\n return conv;\n}\nasync function getUnreadBadge() {\n const response = await axios.get(`/${CONVERSATIONS_BASE_PATH}/badge`);\n return toCamelCase(response.data);\n}\n\nexport {\n getConversations,\n getMessages,\n sendMessage,\n markAsRead,\n getParentInfo,\n formatConversation,\n getUnreadBadge,\n};\n","import cloneDeep from 'lodash/cloneDeep';\nimport { toCamelCase } from '../../utils';\nimport {\n getConversations,\n getMessages,\n sendMessage,\n markAsRead,\n getParentInfo,\n formatConversation,\n getUnreadBadge,\n} from './messaging.service';\n\nexport default {\n namespaced: true,\n\n state: {\n conversations: [],\n messages: [],\n currentConversationId: undefined,\n conversationScrollEnabled: true,\n messagesScrollEnabled: true,\n lastMessageId: undefined,\n currentConversationFamily: {},\n newMessageReceived: false,\n unreadBadge: 0,\n },\n mutations: {\n setConversations: (state, { conversations, lastId, isFirstNewConversation }) => {\n if (lastId) {\n state.conversations.push(...conversations);\n } else if (isFirstNewConversation) {\n // if conversation returned in request, merge with new conversation placeholder\n // else push rest of conversations to the list\n const newConv = state.conversations[0];\n const idx = conversations.findIndex((c) => c.secondUser.type === newConv.secondUser.type\n && c.secondUser.id === newConv.secondUser.id);\n if (idx > -1) {\n const conversation = conversations.splice(idx, 1)[0];\n state.conversations[0] = conversation;\n state.currentConversationId = conversation.id;\n }\n state.conversations.push(...conversations);\n } else {\n state.conversations = conversations;\n }\n },\n setMessages: (state, messages) => {\n state.lastMessageId = messages[messages.length - 1].id;\n // group messages by sent date to display dates in chat\n // and reverse the messages to handle the inverted scrolling\n const groupedMessages = messages.reverse().reduce((groups, message) => {\n const date = new Date(message.createdAt).toDateString();\n\n const index = groups.findIndex((group) => group.date === date);\n if (index < 0) {\n groups.push({\n date,\n messages: [message],\n });\n } else {\n groups[index].messages.push(message);\n }\n return groups;\n }, []);\n\n // check if the new messages last date overlaps with the old messages dates\n const lastDate = groupedMessages[groupedMessages.length - 1].date;\n if (lastDate === state.messages[0]?.date) {\n state.messages[0].messages.unshift(...groupedMessages[groupedMessages.length - 1].messages);\n groupedMessages.pop();\n }\n state.messages = [...groupedMessages, ...state.messages];\n },\n pushMessage: (state, message) => {\n // check if date matches last group of messages\n const date = new Date(message.createdAt).toDateString();\n if (date === state.messages[state.messages.length - 1]?.date) {\n state.messages[state.messages.length - 1].messages.push(message);\n } else {\n state.messages.push({\n date,\n messages: [message],\n });\n }\n },\n changeConversation: (state, conversationId) => {\n state.messages = [];\n state.lastMessageId = undefined;\n state.currentConversationId = conversationId;\n state.messagesScrollEnabled = true;\n state.currentConversationFamily = {};\n },\n setConversationsScroll: (state, isEnabled) => {\n state.conversationScrollEnabled = isEnabled;\n },\n setChatScroll: (state, isEnabled) => {\n state.messagesScrollEnabled = isEnabled;\n },\n moveConversationToTop: (state, { message, isNewConversation, conversation }) => {\n const conversationId = isNewConversation ? 'newConversation' : message.conversationId;\n const convIdx = state.conversations.findIndex((c) => c.id === conversationId);\n if (convIdx > -1) {\n const conv = state.conversations.splice(convIdx, 1)[0];\n conv.id = message.conversationId;\n conv.lastMessage = message;\n if (message.secondUserId && !conv.secondUser?.id) conv.secondUser.id = message.secondUserId;\n state.conversations.unshift(conv);\n } else if (conversation) {\n state.conversations.unshift(conversation);\n }\n },\n markAsRead: (state, conversationId) => {\n const convIdx = state.conversations.findIndex((c) => c.id === conversationId);\n\n if (convIdx === -1) return;\n\n state.conversations[convIdx].lastMessage.read = true;\n state.conversations[convIdx].hasUnreadMessages = false;\n },\n newMessage: (state, {\n providerId, facilityId, facilityName, legupParentId,\n }) => {\n // add new conversation to top of the list\n const conversations = cloneDeep(state.conversations);\n conversations.unshift({\n id: 'newConversation',\n secondUser: {\n id: legupParentId ? undefined : providerId,\n type: legupParentId ? 'User' : 'Provider',\n name: legupParentId ? '' : facilityName,\n legupParentId,\n },\n lastMessage: {},\n createdAt: new Date(),\n facilityId,\n });\n state.conversations = conversations;\n },\n setConversationFamily: (state, family) => {\n state.currentConversationFamily = family;\n },\n setConversationReceiverName: (state, parent) => {\n state.conversations[0].secondUser.name = `${parent.firstName} ${(parent.lastName || '').charAt(0)}`;\n },\n resetMessaging: (state) => {\n state.conversations = [];\n state.messages = [];\n state.currentConversationId = undefined;\n state.conversationScrollEnabled = true;\n state.messagesScrollEnabled = true;\n state.lastMessageId = undefined;\n state.currentConversationFamily = {};\n state.newMessageReceived = false;\n },\n setNewMessageReceived: (state, isNewMessage) => {\n state.newMessageReceived = isNewMessage;\n },\n setUnreadBadge: (state, count) => {\n state.unreadBadge = count;\n },\n updateUnreadBadge: (state, value) => {\n state.unreadBadge += value;\n },\n },\n actions: {\n async fetchConversations(\n {\n commit, dispatch, state, rootState,\n },\n params,\n ) {\n let lastId = state.conversations[state.conversations.length - 1]?.id;\n const lastUpdatedAt = state.conversations[state.conversations.length - 1]?.lastUpdatedAt;\n let isFirstNewConversation = false;\n if (lastId === 'newConversation') {\n lastId = undefined;\n isFirstNewConversation = true;\n }\n try {\n const data = await getConversations({ lastUpdatedAt, ...params });\n if (data.length) {\n const conversations = data.map((c) => formatConversation(c, rootState.user.current));\n commit('setConversations', {\n lastId,\n conversations,\n isFirstNewConversation,\n });\n } else {\n commit('setConversationsScroll', false);\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not get conversations', error }, { root: true });\n }\n },\n\n async fetchMessages({ commit, dispatch, state }, conversationId) {\n if (state.currentConversationId !== conversationId) {\n commit('changeConversation', conversationId);\n }\n try {\n const data = await getMessages({\n conversationId,\n lastId: state.lastMessageId,\n });\n if (data.length) {\n commit('setMessages', data);\n } else {\n commit('setChatScroll', false);\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not get messages', error }, { root: true });\n }\n },\n async fetchUnreadBadge({ commit, dispatch }) {\n try {\n const data = await getUnreadBadge();\n commit('setUnreadBadge', data?.badgeCount);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not get messages badge', error }, { root: true });\n }\n },\n\n async sendMessage(\n {\n commit, dispatch, state, rootState,\n },\n {\n content, receiverId, conversationId, facilityId, legupParentId,\n },\n ) {\n const isNewConversation = conversationId === 'newConversation';\n const body = {\n content, secondUserId: receiverId, facilityId, legupParentId,\n };\n if (rootState.user.current.isParent) {\n body.senderType = 'User';\n body.senderId = rootState.user.current.id;\n body.secondUserType = 'Provider';\n } else {\n body.senderType = 'Provider';\n body.senderId = rootState.providerId;\n body.secondUserType = 'User';\n }\n try {\n const data = await sendMessage(body);\n if (!data) return;\n\n commit('moveConversationToTop', { message: data, isNewConversation });\n if (!isNewConversation) commit('pushMessage', data);\n if (!state.conversationId || isNewConversation) {\n state.currentConversationId = data.conversationId;\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not send message', error }, { root: true });\n }\n },\n\n async markConversationAsRead({ commit, dispatch }, conversationId) {\n try {\n const response = await markAsRead({ conversationId });\n if (!response.status === 200) {\n dispatch('notifications/addToastError', { text: 'Could not mark messages as read' }, { root: true });\n }\n commit('markAsRead', conversationId);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not mark message as read', error }, { root: true });\n }\n },\n\n async fetchParentInfo({\n commit, dispatch, state,\n }, body) {\n try {\n const response = await getParentInfo(body);\n commit('setConversationFamily', response);\n if (body.legupParentId && state.currentConversationId === state.conversations[0].id) {\n commit('setConversationReceiverName', response.legupParent);\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not fetch family', error }, { root: true });\n }\n },\n\n newMessageReceived({ commit, rootState }, message) {\n const messageFormatted = toCamelCase(message).newMessage;\n const userType = rootState.user.current.isParent ? 'User' : 'Provider';\n // drop message if current user is the sender\n if (userType !== messageFormatted.senderType) {\n commit('pushMessage', messageFormatted);\n commit('setNewMessageReceived', true);\n }\n },\n\n newConversationReceived({ commit, rootState, state }, conv) {\n const { conversation, newMessage, incBadge } = toCamelCase(conv);\n const userType = rootState.user.current.isParent ? 'User' : 'Provider';\n if (userType === newMessage.senderType) return;\n\n if (conversation.id === state.currentConversationId) {\n newMessage.read = conversation.id === state.currentConversationId;\n } else if (incBadge) {\n commit('updateUnreadBadge', +1);\n }\n const formattedConversation = formatConversation({\n ...conversation,\n facilityId: conversation.childCareFacilityId,\n lastMessage: newMessage,\n }, rootState.user.current);\n commit('moveConversationToTop', {\n message: newMessage, isNewConversation: false, conversation: formattedConversation,\n });\n },\n },\n};\n","import vue from 'vue';\nimport moment from 'moment-timezone';\nimport { addArrayToDictionary } from '@utils';\nimport {\n fetchParentSlots, updateParentSlots, reserveTour, fetchTours,\n getTourSettings, updateSettings, fetchSingleTour,\n fetchUpcomingParentTourForCenter,\n fetchToursForParent,\n tourProviderSetting,\n centerTourPolicy,\n centerTourSlots,\n bookTour, cancelTour, rescheduleTour, confirmTour,\n} from './tours.service';\n\nexport default {\n namespaced: true,\n state: {\n parentSlots: [],\n tours: {},\n toursAsArray: [],\n centerSettings: {},\n tourPolicy: {},\n tourSlots: {},\n tourEnabled: false,\n upcomingTour: {},\n pastTour: {},\n toursForParent: [],\n tourToConfirm: {},\n },\n mutations: {\n setParentSlots: (state, { slots }) => {\n state.parentSlots = [...slots];\n },\n setTours: (state, payload) => {\n state.tours = { ...addArrayToDictionary(payload, state.tours) };\n },\n setToursAsArray: (state, payload) => {\n state.toursAsArray = [...payload];\n },\n // legup\n setCenterSettings: (state, settings) => {\n state.centerSettings = settings;\n },\n setTourPolicy: (state, { tourPolicy }) => {\n state.tourPolicy = tourPolicy;\n },\n setTourSlots: (state, { tourSlots }) => {\n state.tourSlots = tourSlots;\n },\n setTourSetting: (state, { tourEnabled }) => {\n state.tourEnabled = tourEnabled;\n },\n setCenterParentUpcomingTour: (state, { tour }) => {\n state.upcomingTour = tour;\n },\n setCenterParentPastTour: (state, { tour }) => {\n state.pastTour = tour;\n },\n setToursForParent(state, payload) {\n state.toursForParent = payload;\n },\n setSingleTour(state, tour) {\n state.tourToConfirm = tour;\n },\n },\n getters: {\n tourStartTime: (state) => (tourId, format = 'ddd MMM D h:mma') => {\n const tour = state.tours[tourId];\n const startTime = moment.unix(tour.startAt).tz(tour.timezone);\n return startTime.format(format);\n },\n // legup\n tourProviderSetting(state) {\n return state.tourEnabled;\n },\n centerTourPolicy(state) {\n return state.tourPolicy;\n },\n centerTourSlots(state) {\n return state.tourSlots;\n },\n upcomingTour(state) {\n return state.upcomingTour;\n },\n pastTour(state) {\n return state.pastTour;\n },\n tourToConfirm(state) {\n return state.tourToConfirm;\n },\n centerSettings: (state) => state.centerSettings,\n },\n actions: {\n async fetchParentSlots({ commit, dispatch }, { timezone }) {\n try {\n const slots = await fetchParentSlots(timezone);\n commit('setParentSlots', { slots });\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not load parent slots.', error }, { root: true });\n }\n },\n\n async fetchTours({ commit, rootState }) {\n const tours = await fetchTours(rootState.facilityId);\n commit('setTours', tours);\n commit('setToursAsArray', tours);\n },\n async updateParentSlots({ commit }, { newSlots, timezone }) {\n const slots = newSlots.map((ps) => {\n const date = vue.moment(ps.date).format('YYYY-MM-DD');\n const slotDateFrom = vue.moment\n .tz(`${date} ${ps.time.from}`, 'YYYY-MM-DD h:mm A', timezone)\n .utc();\n const slotDateTo = vue.moment\n .tz(`${date} ${ps.time.to}`, 'YYYY-MM-DD h:mm A', timezone)\n .utc();\n\n return {\n id: ps.id,\n from: slotDateFrom,\n to: slotDateTo,\n date: ps.date,\n };\n });\n const updatedSlots = await updateParentSlots(slots);\n commit('setParentSlots', { slots: updatedSlots });\n },\n async reserveTour({ commit, dispatch, rootState }, { tourData, facilityId }) {\n try {\n const { tour, redirectUrl } = await reserveTour(\n {\n ...tourData,\n facilityId,\n dependentIds: Object.keys(rootState.dependents.list),\n },\n );\n if (tour) {\n commit('setTours', [tour]);\n }\n return { redirectUrl, tour };\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not reserve the tour.', error }, { root: true });\n throw new Error();\n }\n },\n // legup tour\n async centerParentTour({ rootState, dispatch, commit }, { legupCenterId }) {\n try {\n if (rootState.user.current.legupParentId) {\n const response = await fetchUpcomingParentTourForCenter(\n rootState.user.current.legupParentId,\n legupCenterId,\n );\n if (response?.success) {\n const today = new Date();\n const upcomingTours = response.tours.filter((t) => (\n new Date(new Date(t.startTime).toDateString()) >= today\n ));\n upcomingTours.sort((a, b) => a.startTime.localeCompare(b.startTime));\n commit('setCenterParentUpcomingTour', { tour: (upcomingTours.shift() || {}) });\n\n const pastTours = response.tours.filter((t) => (\n new Date(new Date(t.startTime).toDateString()) <= today\n ));\n pastTours.sort((a, b) => a.startTime.localeCompare(b.startTime));\n commit('setCenterParentPastTour', { tour: (pastTours.shift() || {}) });\n }\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not fetch legup tours data.', error }, { root: true });\n }\n },\n async bookTour({ commit, dispatch }, {\n centerId, parent, child, tourInfo, noFamilyNotes, ageGroupId,\n }) {\n try {\n const response = await bookTour(\n centerId,\n parent,\n child,\n tourInfo,\n noFamilyNotes,\n ageGroupId,\n );\n if (response?.success) {\n commit('setCenterParentUpcomingTour', { tour: response.tour });\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not book tour.', error }, { root: true });\n throw new Error();\n }\n },\n async cancelTour({ commit, dispatch }, { tour, userId }) {\n try {\n const response = await cancelTour(tour, userId);\n if (response?.success) {\n if (userId) {\n commit('setSingleTour', response.tour);\n } else {\n commit('setCenterParentUpcomingTour', { tour: null });\n }\n dispatch('notifications/addToastSuccess', { text: 'Your tour has been canceled.' }, { root: true });\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not cancel tour.', error }, { root: true });\n throw new Error();\n }\n },\n async rescheduleTour({ commit, dispatch, state }, { params }) {\n try {\n const { tour, newDateTime, userId } = params;\n const response = await rescheduleTour(tour, newDateTime, userId);\n if (response?.success) {\n if (userId) {\n const { timezone, policy, ageGroupId } = state.tourToConfirm;\n commit('setSingleTour', {\n ...response.tour, timezone, policy, ageGroupId,\n });\n } else {\n commit('setCenterParentUpcomingTour', { tour: response.tour });\n }\n dispatch('notifications/addToastSuccess', { text: 'Your tour has been rescheduled.' }, { root: true });\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not reschedule tour.', error }, { root: true });\n throw new Error();\n }\n },\n async fetchSingleTour({ commit }, { tourId, centerId, userId }) {\n const response = await fetchSingleTour(tourId, centerId, userId);\n if (response?.success) {\n commit('setSingleTour', response.tour);\n }\n },\n async parentConfirmTour({ commit, dispatch, state }, { tourId, centerId, userId }) {\n try {\n const response = await confirmTour(tourId, centerId, userId);\n if (response?.success) {\n commit('setSingleTour', { ...state.tourToConfirm, confirmed: true });\n dispatch('notifications/addToastSuccess', { text: 'Your tour is confirmed.' }, { root: true });\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not confirm tour.', error }, { root: true });\n throw new Error();\n }\n },\n async fetchToursForParent({ rootState, dispatch, commit }) {\n try {\n if (rootState.user.current.legupParentId) {\n const response = await fetchToursForParent(\n rootState.user.current.legupParentId,\n );\n if (response?.success) {\n commit('setToursForParent', response.tours);\n }\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not fetch all tours for parent.', error }, { root: true });\n }\n },\n async tourProviderSetting({ commit, dispatch }, { params }) {\n try {\n const response = await tourProviderSetting(params);\n if (response?.success) {\n commit('setTourSetting', { tourEnabled: response.tourEnabled });\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not retrieve tour setting.', error }, { root: true });\n }\n },\n async centerTourPolicy({ commit, dispatch }, { params }) {\n try {\n const response = await centerTourPolicy(params);\n if (response?.success) {\n const { policy, virtualInstructions, virtualLink } = response;\n commit('setTourPolicy', { tourPolicy: { policy, virtualInstructions, virtualLink } });\n }\n } catch (error) {\n dispatch(\n 'notifications/addToastError',\n { text: 'Something went wrong fetching facility tour policy.', error },\n { root: true },\n );\n }\n },\n async centerTourSlots({ commit, dispatch }, { params }) {\n try {\n const response = await centerTourSlots(params);\n if (response?.success) {\n commit('setTourSlots', { tourSlots: response.times });\n }\n } catch (error) {\n dispatch(\n 'notifications/addToastError',\n { text: 'Something went wrong fetching facility available tours slots.', error },\n { root: true },\n );\n }\n },\n async fetchSettings({ commit, dispatch }, params) {\n try {\n const response = await getTourSettings({ params });\n commit('setCenterSettings', response.data);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not fetch your tour settings.', error }, { root: true });\n }\n },\n async updateSettings({ commit, dispatch }, params) {\n try {\n const response = await updateSettings(params);\n if (response.success) {\n commit('setCenterSettings', response.data);\n dispatch('notifications/addToastNotification', { text: 'Your tour settings have been updated.' }, { root: true });\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not fetch your tour settings.', error }, { root: true });\n }\n },\n },\n};\n","import { axios, toCamelCase, toSnakeCase } from '@utils';\n\nasync function fetchDependents(params) {\n const response = await axios.get('/api/v1/dependents.json', { params: toSnakeCase(params) });\n return toCamelCase(response.data);\n}\n\nasync function addDependent(dependent) {\n const response = await axios.post('/dependents.json', { dependent: toSnakeCase(dependent) });\n return toCamelCase(response.data);\n}\n\nasync function updateDependent(dependent) {\n const response = await axios.put(`/dependents/${dependent.id}.json`, toSnakeCase(dependent));\n return toCamelCase(response.data);\n}\n\nasync function removeDependent(id) {\n return axios.delete(`/dependents/${id}`);\n}\n\nexport {\n addDependent,\n updateDependent,\n removeDependent,\n fetchDependents,\n};\n","import { addArrayToDictionary } from '@utils';\nimport {\n fetchDependents,\n removeDependent,\n addDependent,\n updateDependent,\n} from './dependents.service';\n\nexport default {\n namespaced: true,\n\n state: {\n list: {},\n },\n getters: {\n dependentById: (state) => (depId) => (state.list[depId]),\n dependentIds: (state) => Object.keys(state.list),\n asArray(state) {\n return Object.values(state.list).filter((dependent) => dependent !== undefined);\n },\n },\n mutations: {\n clearDependents(state) {\n state.list = [];\n },\n updateDependents(state, dependents) {\n state.list = { ...addArrayToDictionary(dependents, state.list) };\n },\n updateDependent(state, dependent) {\n state.list[dependent.id] = dependent;\n },\n removeDependent(state, id) {\n const { [id]: removed, ...rest } = state.list;\n state.list = rest;\n },\n },\n\n actions: {\n async fetchDependents({ commit, dispatch }, params) {\n try {\n const dependents = await fetchDependents(params);\n commit('clearDependents');\n commit('updateDependents', dependents);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not load dependents', error }, { root: true });\n throw new Error();\n }\n },\n async addDependents({ commit, dispatch }, dependents) {\n try {\n if (dependents && dependents.length) {\n const newDependents = await Promise.all(dependents.map((d) => addDependent(d)));\n commit('updateDependents', newDependents);\n return newDependents;\n }\n return [];\n } catch (error) {\n const names = dependents.map((d1) => d1.firstName).join(', ');\n dispatch('notifications/addToastError', { text: `Could not add dependents: ${names}`, error }, { root: true });\n throw new Error();\n }\n },\n async updateDependent({ commit, dispatch }, dependent) {\n try {\n if (dependent) {\n const updatedDependent = await updateDependent(dependent);\n commit('updateDependent', updatedDependent);\n return updatedDependent;\n }\n return undefined;\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not update dependent', error }, { root: true });\n throw new Error();\n }\n },\n async updateDependents({ commit, dispatch }, dependents) {\n try {\n const dependentsToUpdate = dependents.filter((d) => d.id !== -1);\n const dependentsToAdd = dependents.filter((d) => d.id === -1);\n const [addedDependents, ...updatedDependents] = await Promise.all([\n dispatch('addDependents', dependentsToAdd),\n ...dependentsToUpdate.map((d) => updateDependent(d)),\n ]);\n commit('updateDependents', updatedDependents);\n return { addedDependents, updatedDependents };\n } catch (error) {\n const names = dependents.map((d1) => d1.firstName).join(', ');\n dispatch('notifications/addToastError', { text: `Could not update dependents: ${names}`, error }, { root: true });\n throw new Error();\n }\n },\n async removeDependent({ commit, dispatch, state }, id) {\n try {\n await removeDependent(id);\n commit('removeDependent', id);\n } catch (error) {\n const dependent = state.list[id];\n dispatch('notifications/addToastError', { text: `Could not remove dependent: ${dependent.firstName} ${dependent.lastName}`, error }, { root: true });\n throw new Error();\n }\n },\n },\n};\n","import { toSnakeCase } from '@utils';\nimport hubspot from '@services/hubspot.service';\n\nif (!window.analytics) {\n window.analytics = {\n page: (name) => {\n console.info('Tracking Page', name); // eslint-disable-line no-console\n },\n identify: (id, obj) => {\n console.info('Tracking User', id, obj); // eslint-disable-line no-console\n },\n };\n}\n\nfunction extractUtmParams(url) {\n const urlObject = new URL(url);\n const utmParams = {};\n\n urlObject.searchParams.forEach((value, key) => {\n if (key.startsWith('utm_')) {\n utmParams[key] = value;\n }\n });\n\n return utmParams;\n}\n\nexport default {\n namespaced: true,\n\n actions: {\n event: (store, { category, event, props }) => {\n const eventName = `${category}_${event}`;\n // catch missing events for the areas where provider views are loaded into\n // the admin UI\n try {\n window.MetaEvents.event(eventName, toSnakeCase(props));\n } catch (error) {\n console.warn(error); // eslint-disable-line no-console\n }\n },\n\n pageLoad: (store, path) => {\n window.analytics.page(path);\n },\n\n identifyUser: (store, { id, traits }) => {\n hubspot.identifyUser(traits);\n\n const utmParams = extractUtmParams(document.URL);\n\n window.analytics.identify(id, toSnakeCase({ ...traits, ...utmParams }));\n\n if (process.env.HOST !== 'www.kinside.com') {\n console.info('Identified user', id, { traits, utmParams }); // eslint-disable-line no-console\n }\n },\n },\n};\n","import {\n axios,\n toCamelCase,\n} from '@utils';\n\nlet dependentAgeGroupPromise;\nasync function dependentAgeGroup(centerId, childBirthDate, preferredDate) {\n if (dependentAgeGroupPromise) {\n return dependentAgeGroupPromise;\n }\n\n const promise = axios.get(\n '/api/v1/legup/tours/age_group',\n {\n params: {\n legup_center_id: centerId,\n birth_date: childBirthDate,\n preferred_date: preferredDate,\n },\n },\n )\n .then(({ data }) => {\n dependentAgeGroupPromise = null;\n return toCamelCase(data);\n })\n .catch((error) => {\n dependentAgeGroupPromise = null;\n throw new Error(error);\n });\n\n dependentAgeGroupPromise = promise;\n\n return promise;\n}\n\nlet providerWaitlistFeesPromise;\nasync function providerWaitlistFees(params) {\n if (providerWaitlistFeesPromise) {\n return providerWaitlistFeesPromise;\n }\n\n const promise = axios.get('/api/v1/legup/centers/waitlist_fee.json', { params })\n .then(({ data }) => {\n providerWaitlistFeesPromise = null;\n return data;\n })\n .catch(() => {\n providerWaitlistFeesPromise = null;\n });\n\n providerWaitlistFeesPromise = promise;\n\n return promise;\n}\n\nasync function validateProviderWaitlistCoupon(params) {\n const { data } = await axios.get('/api/v1/legup/coupons/validate_code_and_calculate_discount.json', { params });\n\n return data;\n}\n\nasync function checkForProviderQuestionsDiscount(params) {\n const { data } = await axios.post('/api/v1/legup/coupons/check_coupon_questions_for_automatic_discount.json', { params });\n\n return data;\n}\n\nasync function checkForProviderSubsidiesDiscount(params) {\n const { data } = await axios.post(' /api/v1/legup/coupons/check_coupons_for_automatic_subsidy_discount.json', { params });\n\n return data;\n}\n\nlet findCenterInfoPromise;\nasync function findCenterInfo(legupCenterId) {\n if (findCenterInfoPromise) {\n return findCenterInfoPromise;\n }\n\n const promise = axios.get(`/api/v1/legup/centers/${legupCenterId}.json`)\n .then(({ data }) => {\n findCenterInfoPromise = null;\n return data;\n })\n .catch(() => {\n findCenterInfoPromise = null;\n });\n\n findCenterInfoPromise = promise;\n\n return promise;\n}\n\nlet findCenterQuestionsPromise;\nasync function findCenterQuestions(params) {\n if (findCenterQuestionsPromise) {\n return findCenterQuestionsPromise;\n }\n\n const promise = axios.get('/api/v1/legup/centers/find_questions.json', { params })\n .then(({ data }) => {\n findCenterQuestionsPromise = null;\n return data;\n })\n .catch(() => {\n findCenterQuestionsPromise = null;\n });\n\n findCenterQuestionsPromise = promise;\n\n return promise;\n}\n\nlet findCenterSubsidiesPromise;\nasync function findCenterSubsidies(params) {\n if (findCenterSubsidiesPromise) {\n return findCenterSubsidiesPromise;\n }\n\n const promise = axios.get('/api/v1/legup/subsidies.json', { params })\n .then(({ data }) => {\n findCenterSubsidiesPromise = null;\n return data;\n })\n .catch(() => {\n findCenterSubsidiesPromise = null;\n });\n\n findCenterSubsidiesPromise = promise;\n\n return promise;\n}\n\nlet validateSubsidiesDiscountPromise;\nasync function validateSubsidiesDiscount(centerId) {\n if (validateSubsidiesDiscountPromise) {\n return validateSubsidiesDiscountPromise;\n }\n\n const promise = axios.get(`/api/v1/legup/centers/${centerId}/validate_subsidy_discount`)\n .then(({ data }) => {\n validateSubsidiesDiscountPromise = null;\n return data;\n })\n .catch(() => {\n validateSubsidiesDiscountPromise = null;\n });\n\n validateSubsidiesDiscountPromise = promise;\n\n return promise;\n}\n\nlet checkForProviderCouponsPromise;\nasync function checkForProviderCoupons(params) {\n if (checkForProviderCouponsPromise) {\n return checkForProviderCouponsPromise;\n }\n\n const promise = axios.get('/api/v1/legup/coupons/provider_coupons.json', { params })\n .then(({ data }) => data);\n\n checkForProviderCouponsPromise = promise;\n\n return promise;\n}\n\nasync function updateOrRemoveWaitlistSpot(params) {\n const spotId = params.waitlist_spot_id;\n\n const { data } = await axios.post(`/api/v1/legup/waitlist_spots/${spotId}/update_or_remove`, { params });\n\n return data;\n}\n\nasync function passOrDeclineSeatOffer(params) {\n const seatId = params.seat_id;\n\n const { data } = await axios.post(`/api/v1/legup/seat_offers/${seatId}/pass_or_decline.json`, params);\n\n return data;\n}\n\nasync function updateWaitlistSpotAnswers(spotId, answers) {\n const { data } = await axios.post(`/api/v1/legup/waitlist_spots/${spotId}/update_answers`, { answers });\n\n return data;\n}\n\nasync function ageGroupProgramSchedules(params) {\n const { data } = await axios.get('/api/v1/legup/age_group_program_schedules.json', { params });\n\n return toCamelCase(data);\n}\n\nasync function fetchAgeGroups(centerId) {\n const { data } = await axios.get(`/api/v1/legup/age_groups?center_id=${centerId}`);\n\n return toCamelCase(data);\n}\n\nasync function fetchSeatOfferDetails(seatId) {\n const { data } = await axios.get(`/api/v1/legup/seat_offers/${seatId}`);\n\n return toCamelCase(data);\n}\n\nasync function fetchSeatOffersForParent(params) {\n const { data } = await axios.get('/api/v1/legup/seat_offers', { params });\n\n return toCamelCase(data);\n}\n\nasync function sendOffersMessage(seatId) {\n const { data } = await axios.post(`/api/v1/legup/seat_offers/${seatId}/message_provider`);\n\n return toCamelCase(data);\n}\n\nasync function requestPaperwork(seatId) {\n const { data } = await axios.post(`/api/v1/legup/seat_offers/${seatId}/request_paperwork`);\n\n return toCamelCase(data);\n}\n\nasync function acceptSeatOffer({ seatId, paymentRequestMethods }) {\n const { data } = await axios.post(`/api/v1/legup/seat_offers/${seatId}/accept`, { payment_request_methods: paymentRequestMethods });\n\n return toCamelCase(data);\n}\n\nexport {\n dependentAgeGroup,\n providerWaitlistFees,\n validateProviderWaitlistCoupon,\n findCenterInfo,\n findCenterQuestions,\n findCenterSubsidies,\n checkForProviderQuestionsDiscount,\n checkForProviderSubsidiesDiscount,\n validateSubsidiesDiscount,\n checkForProviderCoupons,\n updateOrRemoveWaitlistSpot,\n passOrDeclineSeatOffer,\n updateWaitlistSpotAnswers,\n ageGroupProgramSchedules,\n fetchSeatOfferDetails,\n fetchSeatOffersForParent,\n sendOffersMessage,\n requestPaperwork,\n acceptSeatOffer,\n fetchAgeGroups,\n};\n","import {\n dependentAgeGroup,\n ageGroupProgramSchedules,\n updateOrRemoveWaitlistSpot,\n passOrDeclineSeatOffer,\n providerWaitlistFees,\n validateProviderWaitlistCoupon,\n validateSubsidiesDiscount,\n checkForProviderQuestionsDiscount,\n checkForProviderSubsidiesDiscount,\n findCenterInfo,\n findCenterQuestions,\n findCenterSubsidies,\n checkForProviderCoupons,\n fetchSeatOfferDetails,\n fetchSeatOffersForParent,\n sendOffersMessage,\n requestPaperwork,\n updateWaitlistSpotAnswers,\n acceptSeatOffer,\n fetchAgeGroups,\n} from './legup.service';\n\nexport default {\n namespaced: true,\n state: {\n dependentAgeGroup: null,\n waitlistFees: {},\n couponInfo: {},\n centerInfo: {},\n centerQuestions: [],\n centerSubsidies: [],\n providerCoupons: [],\n seatOfferDetails: {},\n seatOffersForParent: [],\n seatOfferMessageParams: {},\n declineOfferInfo: {},\n subsidyDiscount: false,\n ageGroups: [],\n },\n mutations: {\n setDeclineOfferInfo(state, payload) {\n state.declineOfferInfo = payload;\n },\n setDependentAgeGroup: (state, { ageGroupId }) => {\n state.dependentAgeGroup = ageGroupId;\n },\n setSubsidyDiscount: (state, { subsidyDiscount }) => {\n state.subsidyDiscount = subsidyDiscount;\n },\n setWaitlistFees: (state, { waitlistFees }) => {\n state.waitlistFees = waitlistFees;\n },\n setCouponInfo: (state, { couponInfo }) => {\n state.couponInfo = couponInfo;\n },\n setCenterInfo: (state, { centerInfo }) => {\n state.centerInfo = centerInfo;\n },\n setCenterQuestions: (state, { centerQuestions }) => {\n state.centerQuestions = centerQuestions;\n },\n setCenterSubsidies: (state, { centerSubsidies }) => {\n state.centerSubsidies = centerSubsidies;\n },\n setProviderCoupons: (state, { providerCoupons }) => {\n state.providerCoupons = providerCoupons;\n },\n setSeatOfferDetails: (state, { seatOfferDetails }) => {\n state.seatOfferDetails = seatOfferDetails;\n },\n setSeatOffersForParent: (state, { seatOffersForParent }) => {\n state.seatOffersForParent = seatOffersForParent;\n },\n setSeatOfferMessageParams: (state, { seatOfferMessageParams }) => {\n state.seatOfferMessageParams = seatOfferMessageParams;\n },\n setAgeGroups: (state, { ageGroups }) => {\n state.ageGroups = ageGroups;\n },\n },\n getters: {\n manageWaitlistUrl(state) {\n return `/manage_legup_waitlist/${state.parentId}`;\n },\n dependentAgeGroup(state) {\n return state.dependentAgeGroup;\n },\n ageGroupProgramSchedules(state) {\n return state.ageGroupProgramSchedules;\n },\n updateOrRemoveWaitlistSpot(state) {\n return state.updateOrRemoveWaitlistSpot;\n },\n passOrDeclineSeatOffer(state) {\n return state.passOrDeclineSeatOffer;\n },\n requestPaperwork(state) {\n return state.requestPaperwork;\n },\n validateSubsidiesDiscount(state) {\n return state.subsidyDiscount;\n },\n providerWaitlistFees(state) {\n return state.waitlistFees;\n },\n validateProviderWaitlistCoupon(state) {\n return state.couponInfo;\n },\n checkForProviderQuestionsDiscount(state) {\n return state.couponInfo;\n },\n checkForProviderSubsidiesDiscount(state) {\n return state.couponInfo;\n },\n findCenterInfo(state) {\n return state.centerInfo;\n },\n findCenterQuestions(state) {\n return state.centerQuestions;\n },\n findCenterSubsidies(state) {\n return state.centerSubsidies;\n },\n checkForProviderCoupons(state) {\n return state.providerCoupons;\n },\n fetchSeatOfferDetails(state) {\n return state.seatOfferDetails;\n },\n getCenterSeatOfferDetails(state) {\n return state.centerSeatOfferDetails;\n },\n getDeclineOfferInfo(state) {\n return state.declineOfferInfo;\n },\n },\n actions: {\n\n async dependentAgeGroup({ commit }, { centerId, childBirthDate, preferredDate }) {\n const response = await dependentAgeGroup(centerId, childBirthDate, preferredDate);\n if (response?.success) {\n commit('setDependentAgeGroup', { ageGroupId: Number(response.ageGroupId) });\n } else {\n commit('setDependentAgeGroup', { ageGroupId: undefined });\n }\n },\n\n async ageGroupProgramSchedules({ dispatch }, params) {\n try {\n const programs = await ageGroupProgramSchedules(params);\n\n return programs;\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not fetch age group program schedules', error }, { root: true });\n throw new Error(`ageGroupProgramSchedules failed due to ${error.code}: ${error.message}`);\n }\n },\n\n async updateOrRemoveWaitlistSpot({ dispatch }, params) {\n try {\n const result = await updateOrRemoveWaitlistSpot(params);\n if (params.remove_from_waitlist && params.provider_removal) {\n dispatch(\n 'notifications/addToastSuccess',\n { text: 'Waitlist spot successfully removed.' },\n { root: true },\n );\n }\n return result;\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not update the waitlist spot. Refresh the page to try again, or contact concierge@kinside.com for more help.', error }, { root: true });\n throw new Error();\n }\n },\n\n async passOrDeclineSeatOffer({ dispatch }, params) {\n try {\n await passOrDeclineSeatOffer(params);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not complete this offer response. Refresh the page to try again, or contact concierge@kinside.com for more help.', error }, { root: true });\n throw new Error(`passOrDeclineSeatOffer failed due to: ${error.code}: ${error.message}`);\n }\n },\n async validateSubsidiesDiscount({ commit, dispatch }, centerId) {\n try {\n const response = await validateSubsidiesDiscount(centerId);\n if (response?.success) {\n commit('setSubsidyDiscount', { subsidyDiscount: response.subsidy_discount });\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'There is no subsidy discount.', error }, { root: true });\n }\n },\n async providerWaitlistFees({ commit, dispatch }, params) {\n try {\n const response = await providerWaitlistFees(params);\n if (response?.success) {\n commit('setWaitlistFees', { waitlistFees: response.waitlist_fee });\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not retrieve the waitlist fees', error }, { root: true });\n }\n },\n async validateProviderWaitlistCoupon({ commit, dispatch }, params) {\n try {\n const response = await validateProviderWaitlistCoupon(params);\n if (response?.success) {\n commit('setCouponInfo', { couponInfo: response });\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not validate the provider coupon', error }, { root: true });\n }\n },\n async checkForProviderQuestionsDiscount({ commit, dispatch }, params) {\n try {\n const response = await checkForProviderQuestionsDiscount(params);\n if (response?.success) {\n commit('setCouponInfo', { couponInfo: response });\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not retrieve the provider questions discount', error }, { root: true });\n }\n },\n async checkForProviderSubsidiesDiscount({ commit, dispatch }, params) {\n try {\n const response = await checkForProviderSubsidiesDiscount(params);\n if (response?.success) {\n commit('setCouponInfo', { couponInfo: response });\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not retrieve the provider subsidies discount', error }, { root: true });\n }\n },\n async findCenterInfo({ commit, dispatch }, params) {\n try {\n const response = await findCenterInfo(params);\n commit('setCenterInfo', { centerInfo: response });\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not retrieve the LegUp center information', error }, { root: true });\n }\n },\n async findCenterQuestions({ commit, dispatch }, params) {\n try {\n const response = await findCenterQuestions(params);\n commit('setCenterQuestions', { centerQuestions: response });\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not retrieve the center questions', error }, { root: true });\n }\n },\n async findCenterSubsidies({ commit, dispatch }, params) {\n try {\n const response = await findCenterSubsidies(params);\n commit('setCenterSubsidies', { centerSubsidies: response });\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not retrieve the center subsidies', error }, { root: true });\n }\n },\n async checkForProviderCoupons({ commit, dispatch }, params) {\n try {\n const response = await checkForProviderCoupons(params);\n commit('setProviderCoupons', { providerCoupons: response });\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not retrieve provider coupons', error }, { root: true });\n }\n },\n async fetchSeatOfferDetails({ commit, dispatch }, params) {\n try {\n const response = await fetchSeatOfferDetails(params);\n commit('setSeatOfferDetails', { seatOfferDetails: response });\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not retrieve offer details', error }, { root: true });\n }\n },\n async fetchSeatOffersForParent({ commit, dispatch }, params) {\n try {\n const response = await fetchSeatOffersForParent(params);\n commit('setSeatOffersForParent', { seatOffersForParent: response });\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not retrieve offers', error }, { root: true });\n }\n },\n async sendOffersMessage({ commit, dispatch }, seatId) {\n try {\n const response = await sendOffersMessage(seatId);\n commit('setSeatOfferMessageParams', { seatOfferMessageParams: response });\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Cannot message this provider', error }, { root: true });\n }\n },\n async requestPaperwork({ dispatch }, seatId) {\n try {\n await requestPaperwork(seatId);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Request was not successful. Refresh the page to try again, or contact concierge@kinside.com for more help.', error }, { root: true });\n throw new Error();\n }\n },\n async updateWaitlistSpotAnswers({ dispatch }, { spotId, answers }) {\n try {\n await updateWaitlistSpotAnswers(spotId, answers);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not update the waitlist spot answers', error }, { root: true });\n }\n },\n async acceptSeatOffer({ dispatch }, { seatId, paymentRequestMethods }) {\n try {\n await acceptSeatOffer({ seatId, paymentRequestMethods });\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Request was not successful. Refresh the page to try again, or contact concierge@kinside.com for more help.', error }, { root: true });\n throw error;\n }\n },\n addDeclineOfferInfo({ commit }, declineInfo) {\n commit('setDeclineOfferInfo', declineInfo);\n },\n\n async fetchAgeGroups({ commit, dispatch }, { centerId }) {\n try {\n const response = await fetchAgeGroups(centerId);\n commit('setAgeGroups', { ageGroups: response });\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not retrieve age groups', error }, { root: true });\n }\n },\n },\n};\n","import { getEnvVar } from '@utils';\n\nexport default {\n namespaced: true,\n state: {\n toastNotifications: [],\n updated: false,\n },\n mutations: {\n addToastNotification: (state, notification) => {\n state.toastNotifications = [...state.toastNotifications, notification];\n },\n\n removeToastNotification: (state, id) => {\n state.toastNotifications = state.toastNotifications\n .filter((notification) => notification.id !== id);\n },\n\n setUpdated: (state, updatedStatus) => {\n state.updated = updatedStatus;\n },\n },\n actions: {\n addToastNotification: ({ commit }, { error, ...rest }) => {\n const isDev = getEnvVar('NODE_ENV') === 'development';\n const newNotification = {\n ...rest,\n id: `${Date.now()}${Math.floor((1000 * Math.random()))}`,\n error: isDev && error,\n };\n commit('addToastNotification', newNotification);\n },\n\n addToastError: ({ dispatch }, notification) => {\n dispatch('addToastNotification', { ...notification, isError: true });\n },\n\n addToastSuccess: ({ dispatch }, notification) => {\n dispatch('addToastNotification', { ...notification });\n },\n\n removeToastNotification: ({ commit }, id) => {\n commit('removeToastNotification', id);\n },\n\n async setUpdatedStatus({ commit }, updatedStatus) {\n commit('setUpdated', updatedStatus);\n },\n },\n};\n","class HubSpotService {\n constructor() {\n if (this.instance) {\n return this.instance; // eslint-disable-line no-constructor-return\n }\n this.instance = this;\n\n window.hsConversationsSettings = {\n inlineEmbedSelector: '#hubspot-chat-widget',\n };\n\n if (window.env.AUTHORIZED) {\n if (document.readyState === 'complete' || document.readyState === 'interactive') {\n setTimeout(() => this.loadScript(), 1);\n } else {\n document.addEventListener('DOMContentLoaded', () => this.loadScript());\n }\n }\n }\n\n async loadScript() {\n if (window.location.href.includes('messaging') || window.location.href.includes('admin')) return;\n\n const id = 'hs-script-loader';\n const scr = document.getElementById(id);\n if (scr) {\n this.loadHSC();\n } else {\n const scriptTag = document.createElement('script');\n scriptTag.src = 'https://js.hs-scripts.com/4769325.js';\n scriptTag.id = id;\n\n scriptTag.onload = () => this.loadHSC();\n document.body.appendChild(scriptTag);\n }\n }\n\n async loadHSC() {\n if (this.widget) {\n return;\n }\n if (window.HubSpotConversations) {\n this.hsc = window.HubSpotConversations;\n this.widget = this.hsc.widget;\n this.loaded = false;\n } else {\n window.hsConversationsOnReady = [() => {\n this.loadHSC();\n }];\n }\n }\n\n async waitForHSC() {\n return new Promise((resolve) => {\n const checkHSC = () => {\n setTimeout(() => {\n if (this.widget) {\n resolve();\n } else {\n checkHSC();\n }\n }, 300);\n };\n if (this.widget) {\n resolve();\n } else {\n checkHSC();\n }\n });\n }\n\n async waitForLoadedStatus() {\n await this.waitForHSC();\n return new Promise((resolve) => {\n const checkLoadedState = () => {\n setTimeout(() => {\n if (this.widget.status().loaded) {\n this.loaded = true;\n resolve();\n } else {\n checkLoadedState();\n }\n }, 3000);\n };\n if (this.loaded) {\n resolve();\n } else {\n checkLoadedState();\n }\n });\n }\n\n async load(widgetOpen = true) {\n if (!this.loaded) {\n await this.waitForHSC();\n await this.widget.load({ widgetOpen });\n }\n }\n\n async refresh(openToNewThread = false) {\n if (this.loaded) {\n await this.widget.refresh({ openToNewThread });\n } else {\n await this.load();\n }\n }\n\n async open() {\n if (!this.widget) {\n await this.waitForHSC();\n }\n window.HubSpotConversations.widget.open();\n return this.widget.open();\n }\n\n close() {\n if (this.loaded) {\n this.widget.close();\n }\n }\n\n isLoaded() {\n return this.loaded;\n }\n\n trackEvent(eventName, data) {\n /* eslint-disable no-underscore-dangle */\n window._hsq = window._hsq || [];\n this.hsq = window._hsq;\n window._hsq.push([eventName, data]);\n /* eslint-enable no-underscore-dangle */\n }\n\n identifyUser({\n firstName, lastName, type, phoneNumber, email,\n } = {}) {\n const contactType = (() => {\n switch (type) {\n case 'parent':\n return 'Parent';\n case 'provider':\n return 'Care provider';\n default:\n return null;\n }\n })();\n\n this.trackEvent('identify', {\n email,\n firstname: firstName,\n lastname: lastName,\n contact_type: contactType,\n mobilephone: phoneNumber,\n });\n\n this.trackEvent('trackPageView');\n\n return new Promise((resolve) => {\n setTimeout(\n async () => {\n await this.refresh();\n resolve();\n },\n 1000,\n );\n });\n }\n}\n\nconst hubspot = new HubSpotService();\n\nexport default hubspot;\n","import { axios, toCamelCase } from '@utils';\nimport userService from '@services/user.service';\n\nconst {\n removeAvatar, updateNotificationSettings, notificationSettings, getUserNavData,\n} = userService;\n\nasync function updateUser(userObj) {\n const user = await userService.updateUser(userObj);\n return user;\n}\n\nasync function getUser() {\n const user = await userService.getUser();\n const {\n openingsContactDetailsFirstName,\n openingsContactDetailsLastName,\n openingsContactDetailsEmail,\n openingsContactDetailsPhoneNumber,\n openingsContactDetailsTitle,\n ...rest\n } = user;\n return {\n ...rest,\n openingsContactDetails: {\n firstName: openingsContactDetailsFirstName,\n lastName: openingsContactDetailsLastName,\n email: openingsContactDetailsEmail,\n phoneNumber: openingsContactDetailsPhoneNumber,\n title: openingsContactDetailsTitle,\n },\n };\n}\n\nasync function getActionItems() {\n const { data } = await axios.get('/api/v1/legup/users/provider_action_items');\n\n return toCamelCase(data);\n}\n\nasync function confirmNewFeeStructure(providerId) {\n const response = await axios.put(`/api/v1/providers/${providerId}/confirm_new_fee_structure`);\n return toCamelCase(response.data);\n}\n\nasync function fetchSiteWideSearchResults({ query }) {\n const url = `/api/v1/providers/search?q=${query}`;\n const response = await axios.get(url);\n return toCamelCase(response.data);\n}\n\nexport {\n removeAvatar, updateNotificationSettings, getUser, updateUser, notificationSettings,\n getUserNavData, getActionItems, confirmNewFeeStructure, fetchSiteWideSearchResults,\n};\n","import { axios, toCamelCase, toSnakeCase } from '@utils';\nimport moment from 'moment-timezone';\n\nasync function fetchParentSlots(timezone = 'America/Los_Angeles') {\n const { data } = await axios.get('/parent_availability_slots.json');\n return toCamelCase(data).map(({\n date, from, to, id,\n }) => ({\n date,\n id,\n time: {\n from: moment(new Date(from).toLocaleString('en-US', { timeZone: timezone })).format('h:mm a'),\n to: moment(new Date(to).toLocaleString('en-US', { timeZone: timezone })).format('h:mm a'),\n },\n }));\n}\n\nasync function updateParentSlots(slots) {\n await axios.put('/parent_availability_slots.json', {\n slots,\n });\n return fetchParentSlots();\n}\n\nlet fetchToursPromise;\nasync function fetchTours(facilityId, onlyUpcoming) {\n if (fetchToursPromise) {\n return fetchToursPromise;\n }\n\n const promise = axios.get('/tour_reservations.json', {\n params: {\n upcoming: onlyUpcoming,\n facility_id: facilityId,\n },\n })\n .then(({ data }) => {\n fetchToursPromise = null;\n return toCamelCase(data.reservations);\n })\n .catch(() => {\n fetchToursPromise = null;\n });\n fetchToursPromise = promise;\n\n return promise;\n}\n\nasync function fetchLatestTour(facilityId) {\n const tours = await fetchTours(facilityId, true);\n if (tours?.length > 0) {\n const maxTourId = Math.max(...(tours.map((t) => t.id)));\n const tour = tours.find((t) => t.id === maxTourId);\n return tour;\n }\n return null;\n}\n\nasync function reserveTour({\n facilityId, tourSlotId, useParentSlots, comment, dependentIds,\n}) {\n const { data } = await axios.post('/tour_reservations.json', {\n facility_id: facilityId,\n tour_slot_id: tourSlotId,\n use_parent_slots: useParentSlots,\n parent_comment: comment,\n dependent_ids: dependentIds,\n });\n\n const { successMessage, errorMessage, redirectUrl } = toCamelCase(data);\n\n if (successMessage) {\n const tour = await fetchLatestTour(facilityId);\n return { tour, redirectUrl };\n }\n throw new Error(errorMessage);\n}\n\nasync function getTourSettings(params) {\n const { data } = await axios.get('/api/v1/legup/tours/setting', toSnakeCase(params));\n return toCamelCase(data);\n}\n\nasync function updateSettings(params) {\n const { data } = await axios.post('/api/v1/legup/tours/setting', toSnakeCase(params));\n return toCamelCase(data);\n}\n\nasync function fetchSingleTour(tourId, centerId, userId) {\n try {\n const { data } = await axios.get(`/api/v1/legup/tours/${tourId}?legup_center_id=${centerId}&user_id=${userId}`);\n return toCamelCase(data);\n } catch (error) {\n throw new Error(error);\n }\n}\n\nasync function bookTour(centerId, parent, child, tourInfo, noFamilyNotes, ageGroupId) {\n try {\n const { data } = await axios.post('/api/v1/legup/tours/schedule', {\n legup_center_id: centerId,\n parent: toSnakeCase(parent),\n child: toSnakeCase(child),\n tour_info: toSnakeCase(tourInfo),\n no_family_notes: noFamilyNotes,\n age_group_id: ageGroupId,\n });\n return toCamelCase(data);\n } catch (error) {\n throw new Error(error);\n }\n}\n\nasync function rescheduleTour(tour, newDateTime, userId) {\n try {\n const { data } = await axios.post('/api/v1/legup/tours/reschedule', {\n user_id: userId,\n legup_center_id: tour.centerId || tour.center.centerId,\n tour: toSnakeCase(tour),\n new_date_time: toSnakeCase(newDateTime),\n });\n return toCamelCase(data);\n } catch (error) {\n throw new Error(error);\n }\n}\n\nasync function cancelTour(tour, userId) {\n try {\n const { data } = await axios.post('/api/v1/legup/tours/cancel', {\n legup_center_id: tour.centerId,\n id: tour.tourId,\n user_id: userId,\n });\n return toCamelCase(data);\n } catch (error) {\n throw new Error(error);\n }\n}\n\nasync function confirmTour(tourId, centerId, userId) {\n try {\n const { data } = await axios.post('/api/v1/legup/tours/confirm', {\n legup_center_id: centerId,\n id: tourId,\n user_id: userId,\n });\n return toCamelCase(data);\n } catch (error) {\n throw new Error(error);\n }\n}\n\nlet fetchUpcomingParentTourForCenterPromise;\nasync function fetchUpcomingParentTourForCenter(parentId, legupCenterId) {\n if (fetchUpcomingParentTourForCenterPromise) {\n return fetchUpcomingParentTourForCenterPromise;\n }\n\n const promise = axios.get('/api/v1/legup/tours', {\n params: {\n parent_id: parentId,\n legup_center_id: legupCenterId,\n },\n })\n .then(({ data }) => {\n fetchUpcomingParentTourForCenterPromise = null;\n return toCamelCase(data);\n })\n .catch((error) => {\n fetchUpcomingParentTourForCenterPromise = null;\n throw new Error(error);\n });\n fetchUpcomingParentTourForCenterPromise = promise;\n\n return promise;\n}\n\nlet fetchToursForParentPromise;\nasync function fetchToursForParent(parentId) {\n if (fetchToursForParentPromise) {\n return fetchToursForParentPromise;\n }\n\n const promise = axios.get('/api/v1/legup/tours', {\n params: {\n parent_id: parentId,\n },\n })\n .then(({ data }) => {\n fetchToursForParentPromise = null;\n return toCamelCase(data);\n })\n .catch((error) => {\n fetchToursForParentPromise = null;\n throw new Error(error);\n });\n fetchToursForParentPromise = promise;\n\n return promise;\n}\n\nasync function centerTourPolicy(params) {\n try {\n const { data } = await axios.get(`/api/v1/legup/tours/policy?legup_center_id=${params.centerId}&user_id=${params.userId}`);\n return toCamelCase(data);\n } catch (error) {\n throw new Error(error);\n }\n}\n\nasync function tourProviderSetting(params) {\n try {\n const { data } = await axios.get('/api/v1/legup/tours/tours_enabled', {\n params: {\n legup_center_id: params.centerId,\n place: params.place,\n },\n });\n return toCamelCase(data);\n } catch (error) {\n throw new Error(error);\n }\n}\n\nasync function centerTourSlots(params) {\n try {\n const { data } = await axios.get('/api/v1/legup/tours/slots', {\n params: {\n legup_center_id: params.centerId,\n legup_age_group_id: params.ageGroupId,\n year: params.year,\n month: params.month,\n user_id: params.userId,\n },\n });\n return toCamelCase(data);\n } catch (error) {\n throw new Error(error);\n }\n}\n\nexport {\n fetchParentSlots,\n updateParentSlots,\n reserveTour,\n fetchLatestTour,\n fetchTours,\n getTourSettings,\n updateSettings,\n fetchSingleTour,\n bookTour,\n rescheduleTour,\n cancelTour,\n confirmTour,\n fetchUpcomingParentTourForCenter,\n fetchToursForParent,\n centerTourPolicy,\n tourProviderSetting,\n centerTourSlots,\n};\n","import { axios } from '@utils';\n\nconst BASE_PATH = 'api/v1/accounts';\n\nasync function accountValidateEmployerCode(accessCode) {\n const response = await axios.post(`/${BASE_PATH}/validate_employer_code.json`, accessCode);\n return response;\n}\n\nasync function accountResendConfirmationEmail() {\n const response = await axios.post(`/${BASE_PATH}/resend_confirmation_email.json`);\n return response;\n}\n\nexport {\n // eslint-disable-next-line import/prefer-default-export\n accountValidateEmployerCode,\n accountResendConfirmationEmail,\n};\n","import { accountValidateEmployerCode, accountResendConfirmationEmail } from './account.service';\n\nexport default {\n namespaced: true,\n\n state: {\n success: false,\n tries: null,\n confirmationDisabled: false,\n },\n mutations: {\n updateValidation: (state, validatedStatus) => {\n state.success = validatedStatus.data.success;\n state.tries = validatedStatus.data.tries;\n },\n disableConfirmation: (state) => {\n state.confirmationDisabled = true;\n },\n },\n\n actions: {\n async validateEmployerCode({ commit, dispatch }, accessCode) {\n try {\n const validatedStatus = await accountValidateEmployerCode({\n access_code: accessCode,\n });\n if (!validatedStatus.data.success && accessCode !== '') {\n const remainingTries = 3 - validatedStatus.data.tries;\n dispatch('notifications/addToastError', { text: `Could not validate the code. ${remainingTries} tries remaining.` }, { root: true });\n } else if (validatedStatus.data.success && accessCode !== '') {\n window.location.reload();\n }\n commit('updateValidation', validatedStatus);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not validate the code', error }, { root: true });\n }\n },\n\n async resendConfirmationEmail({ commit, dispatch }) {\n try {\n const validatedStatus = await accountResendConfirmationEmail();\n if (!validatedStatus.data.success) {\n dispatch(\n 'notifications/addToastError',\n { text: 'You have reached the maximum amount of confirmation retries, please contact our concierge team.' },\n { root: true },\n );\n commit('disableConfirmation');\n } else {\n dispatch(\n 'notifications/addToastNotification',\n { text: 'Sucessfully resent confirmation email!' },\n { root: true },\n );\n }\n } catch (error) {\n dispatch(\n 'notifications/addToastError',\n { text: 'Something went wrong resending confirmation instructions, please contact our concierge team.', error },\n { root: true },\n );\n }\n },\n },\n};\n","import { objHasFalseyValues } from '../../utils';\nimport {\n fetchFacility,\n fetchFacilityDetails,\n updateFacility,\n} from './facility.service';\n\nimport {\n fetchPhilosophies,\n} from './search.service';\n\nconst INITIAL_PROFILE_EDIT_COMPLETENESS = {\n basicInfo: false,\n licensing: false,\n programDetails: false,\n photos: false,\n welcome: false,\n approach: false,\n healthSafety: false,\n};\n\nexport default {\n namespaced: true,\n\n state: {\n facility: null,\n philosophies: null,\n profileCompletenessBySection: INITIAL_PROFILE_EDIT_COMPLETENESS,\n },\n\n mutations: {\n setFacility(state, facility) {\n state.facility = facility;\n },\n setPhilosophies(state, philosophies) {\n state.philosophies = philosophies;\n },\n setSectionCompleteness(state, { section, completeness }) {\n const newProfileCompletenessBySection = { ...state.profileCompletenessBySection };\n newProfileCompletenessBySection[section] = completeness;\n state.profileCompletenessBySection = newProfileCompletenessBySection;\n },\n },\n\n getters: {\n facilityInfo(state) {\n return state.facility;\n },\n basicInfoComplete(state) {\n if (!state.facility) return false;\n\n const fields = [\n 'name',\n 'facility_class',\n 'address',\n 'city',\n 'state',\n 'zip',\n 'website',\n 'email',\n 'phone_number',\n ];\n const data = {};\n fields.forEach((field) => {\n data[field] = state.facility[field];\n });\n return !objHasFalseyValues(data);\n },\n licensingComplete(state) {\n if (!state.facility) return false;\n\n return !!state.facility.license_number;\n },\n keyDetailsComplete(state) {\n if (!state.facility) return false;\n\n const fields = [\n 'age_months_to',\n 'time_open_from',\n 'time_open_to',\n 'schedule_types',\n 'schedule_days_of_week',\n ];\n const data = {};\n fields.forEach((field) => {\n data[field] = state.facility[field];\n });\n return !objHasFalseyValues(data);\n },\n photosComplete(state) {\n if (!state.facility) return false;\n\n return state.facility.profile_images\n && state.facility.profile_images.length > 0;\n },\n welcomeComplete(state) {\n if (!state.facility) return false;\n\n const fields = [\n 'profile_director',\n 'profile_description',\n 'administrator',\n 'director_profile_photo',\n ];\n const data = {};\n fields.forEach((field) => {\n data[field] = state.facility[field];\n });\n return !objHasFalseyValues(data);\n },\n approachComplete(state) {\n if (!state.facility) return false;\n\n const fields = [\n 'facility_philosophy_ids',\n ];\n const data = {};\n fields.forEach((field) => {\n data[field] = state.facility[field];\n });\n return !objHasFalseyValues(data);\n },\n healthSafetyComplete(state) {\n if (!state.facility) return false;\n\n const fields = [\n 'profile_covid_response',\n ];\n const data = {};\n fields.forEach((field) => {\n data[field] = state.facility[field];\n });\n return !objHasFalseyValues(data);\n },\n isProfileEditComplete(state, getters) {\n return getters.numCompleteProfileEditSections === getters.totalProfileEditSections;\n },\n profileEditSections(state) {\n return Object.keys(state.profileCompletenessBySection);\n },\n numCompleteProfileEditSections(state, getters) {\n const sectionsBycompleteness = getters\n .profileEditSections.map((section) => getters[`${section}Complete`]);\n return sectionsBycompleteness.filter((section) => section).length;\n },\n totalProfileEditSections(state, getters) {\n return getters.profileEditSections.length;\n },\n profileEditCompleteness(state, getters) {\n return parseInt(\n (getters.numCompleteProfileEditSections / getters.totalProfileEditSections) * 100,\n 10,\n );\n },\n },\n\n actions: {\n async fetchPhilosophies({ commit, dispatch }) {\n try {\n const philosophies = await fetchPhilosophies();\n await commit('setPhilosophies', philosophies);\n } catch (error) {\n dispatch('notifications/addToastError', {\n text: 'Could not load philosophies',\n error,\n }, { root: true });\n }\n },\n async fetchFacility({ commit, dispatch }, facilityId) {\n try {\n const facility = await fetchFacility(facilityId);\n await commit('setFacility', facility);\n } catch (error) {\n dispatch('notifications/addToastError', {\n text: 'Could not load facility',\n error,\n }, { root: true });\n }\n },\n async fetchFacilityDetails({ commit, dispatch }, facilitySlug) {\n try {\n const facility = await fetchFacilityDetails(facilitySlug);\n await commit('setFacility', facility);\n } catch (error) {\n dispatch('notifications/addToastError', {\n text: 'Could not load facility',\n error,\n }, { root: true });\n }\n },\n async updateFacility({ rootState, dispatch }, data) {\n try {\n await updateFacility(data, rootState.facilityId);\n await dispatch('fetchFacility', rootState.facilityId);\n } catch (error) {\n dispatch('notifications/addToastError', {\n text: 'This facility could not be updated, please ensure all information is correct and try again.',\n error,\n }, { root: true });\n }\n },\n },\n};\n","import { axios } from '@utils';\n\nasync function fetchFacility(facilityId) {\n const { data } = await axios.get(`/child_care_facilities/${facilityId}.json`);\n return data;\n}\n\nasync function updateFacility(data, facilityId) {\n await axios.post('/facility_logs.json', {\n child_care_facility_id: facilityId,\n facility_log: { ...data, source: 'insitu' },\n });\n}\nasync function fetchFacilityDetails(facilitySlug) {\n const { data } = await axios.get(`/child_care_facilities/${facilitySlug}/details.json`);\n return data;\n}\n\nexport {\n fetchFacility,\n updateFacility,\n fetchFacilityDetails,\n};\n","import { axios, toCamelCase } from '@utils';\n\nconst FACILITY_OPINIONS = {\n favorited: 'great_fit',\n ignored: 'not_a_fit',\n saved: 'maybe',\n noOpinion: null,\n};\n\nasync function fetchFacilities({ idsToRequest, ...restParams }, { isSearch, limited } = {}) {\n const axiosController = new AbortController();\n try {\n if (isSearch) {\n axiosController.abort();\n }\n\n const params = {\n facility_ids: idsToRequest,\n ...restParams,\n };\n\n const url = limited ? '/childcare/facilities_limited.json' : '/childcare/facilities.json';\n const response = await axios.get(url, { params, signal: axiosController.signal });\n return response.data.facilities;\n } catch (e) {\n if (axiosController.abort()) {\n // eslint-disable-next-line\n console.info('facilities/loadFacilityRecords request canceled', e.message);\n return [];\n }\n // eslint-disable-next-line\n console.error(e);\n throw new Error('Could not fetch facilities');\n }\n}\n\nasync function fetchMatchesFacilitiesForParent() {\n const response = await axios.get('/api/v1/matches.json');\n return response.data;\n}\n\nasync function acceptPayment(facilityId, facilityAcceptPayment) {\n const response = await axios.post(`/api/v1/child_care_facilities/${facilityId}/accept_payment.json`, {\n accept_payment: facilityAcceptPayment,\n });\n return toCamelCase(response.data);\n}\n\nasync function deactivateFacilitiesPayment() {\n const response = await axios.post('/api/v1/child_care_facilities/deactivate_all_payment.json');\n return toCamelCase(response.data);\n}\n\nasync function fetchFacilitiesByOpinion(opinion) {\n const response = await axios.get('/childcare/markers.json', {\n params: { opinion_only: FACILITY_OPINIONS[opinion], sort: 'quality' },\n });\n return {\n ids: response.data.ordered_ids.map(Number),\n facilities: toCamelCase(response.data.markers.map((m) => m.facility)),\n };\n}\n\nasync function fetchOpinionCounts() {\n const { data } = await axios.get('/facility_opinions/counts.json');\n return {\n favorited: data[FACILITY_OPINIONS.favorited],\n saved: data[FACILITY_OPINIONS.saved],\n ignored: data[FACILITY_OPINIONS.ignored],\n };\n}\n\nfunction saveFacilityOpinion(facilityId, opinion, context) {\n return axios.put(`/child_care_facilities/${facilityId}/opinion.json`, {\n opinion,\n context,\n });\n}\n\nasync function searchFacilities({ query, page = 1, perPage = 10 }) {\n const response = await axios.get('/childcare/payments_list.json', { params: { search: query, page, per_page: perPage } });\n return response.data;\n}\n\nfunction saveFacilityComment(facilityId, comment) {\n return axios.put(`/child_care_facilities/${facilityId}/comment.json`, { comment });\n}\n\nfunction saveFacilityImages(facilityId, facilityData) {\n return axios.post('/facility_logs.json', {\n child_care_facility_id: facilityId,\n facility_log: facilityData,\n });\n}\n\nasync function fetchFacilitiesForProvider({\n providerId, page = 1, search = null, messaging,\n}) {\n const BASE_URL = '/api/v1/child_care_facilities';\n const response = await axios.get(`${BASE_URL}/${providerId}/facilities_by_provider.json`, {\n params: {\n page,\n search,\n messaging,\n },\n });\n return toCamelCase(response.data);\n}\n\nexport {\n FACILITY_OPINIONS,\n fetchFacilities,\n fetchFacilitiesByOpinion,\n fetchOpinionCounts,\n fetchFacilitiesForProvider,\n fetchMatchesFacilitiesForParent,\n saveFacilityOpinion,\n saveFacilityComment,\n searchFacilities,\n saveFacilityImages,\n acceptPayment,\n deactivateFacilitiesPayment,\n};\n","import { axios, toSnakeCase, toCamelCase } from '../../utils';\n\nconst BASE_PATH = 'payments';\nconst METHODS_BASE_PATH = 'payment_methods';\nconst REQUESTS_BASE_PATH = 'payment_requests';\nconst API_REQUESTS_BASE_PATH = 'api/v1/payment_requests';\n\nfunction errorToData(error) {\n if (!error) {\n return undefined;\n }\n return {\n message: error.message,\n relatedObj: error.related_object_id\n ? {\n class: error.related_object_class,\n id: error.related_object_id,\n }\n : undefined,\n };\n}\n\nfunction paymentDataToRequest(data) {\n return {\n id: data.id,\n provider_id: data.providerId,\n child_care_facility_id: data.facilityId,\n amount: data.amount,\n category: data.category,\n date_from: data.from,\n date_to: data.to,\n dependent_ids: data.dependentIds || [data.dependentId || data.dependent?.id],\n dependent_data: toSnakeCase(data.dependentData),\n payment_request_items: toSnakeCase(data.paymentRequestItems),\n payment_request_methods: data.paymentRequestMethods.map(\n ({ initialAmount, paymentMethodId, id }) => ({\n amount: initialAmount,\n payment_method_id: paymentMethodId,\n id,\n }),\n ),\n provider_data: data.newProvider,\n message_to_provider: data.messageToProvider,\n payment_coupons: data.paymentCoupons,\n user_id: data.userId,\n scheduled_at: data.scheduledAt,\n recurring_settings: data.recurringSettings,\n is_pay_me_request: data.isPayMeRequest,\n };\n}\n\nfunction paymentRequestToData({\n amount,\n aasm_state: status,\n child_care_facility_id: facilityId,\n latest_error: error,\n ...request\n}) {\n return {\n ...toCamelCase(request),\n amount, // in cents\n status,\n facilityId,\n error: errorToData(error),\n };\n}\n\nasync function fetchPayees() {\n const response = await axios.get(`/${BASE_PATH}/providers_paid.json`);\n return response.data.providers;\n}\n\nasync function addProvider(provider) {\n const response = await axios.post(`/${BASE_PATH}/payments_provider.json`, {\n provider: toSnakeCase(provider),\n });\n return response.data;\n}\n\nasync function addCardPaymentMethod(stripeId, isFsa, userId, replace) {\n const response = await axios.post(`/${METHODS_BASE_PATH}/card.json`, {\n fsa: isFsa,\n stripe_payment_method_id: stripeId,\n user_id: userId,\n replace: replace,\n });\n return response.data;\n}\n\nasync function addBankAccountPaymentMethod(publicToken, accountId, userId) {\n const response = await axios.post(`/${METHODS_BASE_PATH}/bank_account.json`, {\n public_token: publicToken,\n account_id: accountId,\n user_id: userId,\n });\n return response.data;\n}\n\nasync function fetchPaymentMethods() {\n const response = await axios.get(`/${METHODS_BASE_PATH}.json`);\n return response.data;\n}\n\nfunction removePaymentMethod(id) {\n return axios.delete(`/${METHODS_BASE_PATH}/${id}.json`);\n}\n\nfunction canRemovePaymentMethod(id) {\n return axios.get(`/${METHODS_BASE_PATH}/${id}/can_remove.json`);\n}\n\nasync function addPaymentRequest(paymentData) {\n const payment = paymentDataToRequest(paymentData);\n\n const response = await axios.post(`/${REQUESTS_BASE_PATH}/checkout.json`, {\n payment_request: payment,\n send_payment: true,\n });\n\n return paymentRequestToData(response.data);\n}\n\nasync function updatePaymentRequest(paymentData, id) {\n const payment = paymentDataToRequest(paymentData);\n const response = await axios.put(`/${API_REQUESTS_BASE_PATH}/${id}.json`, {\n payment_request: payment,\n apply_changes_to_collection: paymentData.applyChangesToCollection,\n });\n\n return paymentRequestToData(response.data);\n}\n\nasync function updateByProvider(params, id) {\n const response = await axios.put(`/${API_REQUESTS_BASE_PATH}/${id}/update_by_provider.json`, { payment_request: toSnakeCase(params) });\n return toCamelCase(response.data);\n}\n\nasync function cancelPaymentRequest(id) {\n const response = await axios.put(`/${API_REQUESTS_BASE_PATH}/${id}/cancel.json`);\n return paymentRequestToData(response.data);\n}\n\nasync function fetchPaymentRequests() {\n const response = await axios.get(`/${API_REQUESTS_BASE_PATH}.json`);\n const paymentRequests = response.data.payment_requests.map(paymentRequestToData);\n return paymentRequests;\n}\n\nasync function fetchPaymentRequest(id) {\n const response = await axios.get(`/${API_REQUESTS_BASE_PATH}/${id}.json`);\n return paymentRequestToData(response.data);\n}\n\nasync function fetchPayMeRequest({ id, facilityId }) {\n const { data } = await axios.get(`/${API_REQUESTS_BASE_PATH}/${id}/pay_me_request.json?facility_id=${facilityId}`);\n return toCamelCase(data);\n}\n\nasync function getPaymentCouponsToApply() {\n const { data } = await axios.get('/payment_coupons.json');\n\n return toCamelCase(data);\n}\n\nasync function doPaymentMathAndGetCommissions({\n amount = 0,\n paymentRequestMethods,\n coupons,\n seatId = undefined,\n centerId = undefined,\n providerId,\n paymentRequestId,\n}) {\n if (amount === 0 || amount < 0) {\n return toCamelCase({\n total_remaining: amount,\n total_to_be_charged: amount,\n total_to_be_sent_to_provider: amount,\n });\n }\n\n const params = {\n amount_to_be_sent: amount,\n payment_coupons: coupons,\n payment_methods: toSnakeCase(\n paymentRequestMethods.map(\n ({ paymentMethodId, totalAmount, includesFees = true }) => ({\n id: paymentMethodId,\n includesFees,\n amount: totalAmount,\n }),\n ),\n ),\n seat_id: seatId,\n center_id: centerId,\n provider_id: providerId,\n id: paymentRequestId,\n };\n\n const { data } = await axios.put(\n `/${API_REQUESTS_BASE_PATH}/commissions.json`,\n params,\n );\n const { totalToBeSentToProvider, paymentMethods, ...rest } = toCamelCase(data);\n\n return {\n amount: totalToBeSentToProvider,\n paymentRequestMethods: paymentMethods.map(({ id, ...restOfRequest }) => ({\n paymentMethodId: id,\n includesFees: true,\n ...restOfRequest,\n })),\n ...rest,\n };\n}\n\nasync function recalculateAmount({ paymentRequestMethods, totalAmount }) {\n // eslint-disable-next-line no-param-reassign\n paymentRequestMethods = paymentRequestMethods.map(({ paymentMethodId }) => ({\n paymentMethodId,\n includesFees: false,\n totalAmount,\n }));\n const params = { amount: totalAmount, paymentRequestMethods };\n const data = await doPaymentMathAndGetCommissions(params);\n return data;\n}\n\nasync function checkNaviaBalance() {\n const { data } = await axios.get(`/${METHODS_BASE_PATH}/navia_balance.json`);\n\n return toCamelCase(data);\n}\n\nasync function submitCheckRequest(data) {\n await axios\n .post('/api/v1/providers/request_papercheck.json', {\n papercheck_request: data,\n })\n .then(() => {\n window.localStorage.setItem(\n 'kinside:paperCheckOnboardingMessage',\n \"We've received your information and are processing the payment. \"\n + 'Please allow 7-10 days for the check to arrive. '\n + 'You can mail us at support@kinside.com with any questions related to this process.',\n );\n window.location.replace('/');\n });\n}\n\nasync function downloadInvoicePdf(paymentRequestId) {\n await axios.get(`/${API_REQUESTS_BASE_PATH}/${paymentRequestId}/invoice_pdf.pdf`, { responseType: 'blob' })\n .then((response) => response.data)\n .then((blob) => {\n const data = URL.createObjectURL(blob);\n const link = document.createElement('a');\n link.href = data;\n link.download = 'receipt.pdf';\n link.click();\n });\n}\n\nasync function declinePayMeRequest(params) {\n const { paymentRequestId, declineReason, declineMessage } = params;\n await axios.post(`/${API_REQUESTS_BASE_PATH}/${paymentRequestId}/decline`, { decline_reason: declineReason, decline_message: declineMessage });\n}\n\nasync function acceptEnrollmentAutopay(paymentData) {\n const payment = paymentDataToRequest(paymentData);\n await axios.put(`/${API_REQUESTS_BASE_PATH}/${paymentData.id}/accept_enrollment_autopay`, { payment_request: payment });\n}\n\nasync function fetchUserPayMeRequests() {\n const { data } = await axios.get(`/${API_REQUESTS_BASE_PATH}/requested.json`);\n return toCamelCase(data);\n}\n\nexport {\n fetchPayees,\n addCardPaymentMethod,\n fetchPaymentMethods,\n addPaymentRequest,\n updatePaymentRequest,\n cancelPaymentRequest,\n fetchPaymentRequests,\n fetchPayMeRequest,\n addBankAccountPaymentMethod,\n addProvider,\n removePaymentMethod,\n getPaymentCouponsToApply,\n doPaymentMathAndGetCommissions,\n checkNaviaBalance,\n submitCheckRequest,\n downloadInvoicePdf,\n recalculateAmount,\n canRemovePaymentMethod,\n declinePayMeRequest,\n fetchUserPayMeRequests,\n acceptEnrollmentAutopay,\n fetchPaymentRequest,\n updateByProvider,\n};\n","import { addArrayToDictionary, getBoundsFromFacilities, toCamelCase } from '@utils';\nimport { upperFirst } from 'lodash';\nimport {\n FACILITY_OPINIONS,\n searchFacilities,\n fetchFacilities,\n fetchFacilitiesByOpinion,\n fetchFacilitiesForProvider,\n fetchMatchesFacilitiesForParent,\n saveFacilityOpinion,\n saveFacilityComment,\n fetchOpinionCounts,\n saveFacilityImages,\n acceptPayment,\n deactivateFacilitiesPayment,\n} from './facilities.service';\n\nconst searchSortOptionsMap = {\n partners: 'quality',\n distance: 'distance',\n price: 'price',\n};\n\nconst shortlistSortOptionsMap = {\n fit: 'fit',\n distance: 'distance',\n price: 'price',\n};\n\nconst matchesSortOptionsMap = {\n distance: 'distance',\n price: 'price',\n};\n\nfunction convertMapToRadioOptions(options) {\n const keys = Object.keys(options);\n return keys.map((k) => ({ label: k, value: options[k] }));\n}\n\nexport default {\n namespaced: true,\n\n state: {\n storedFacilities: {},\n orderedResultIds: [],\n\n hoveredId: undefined,\n\n records: {\n ids: [],\n facilities: {},\n },\n\n opinionCounts: {\n favorited: undefined,\n saved: undefined,\n ignored: undefined,\n },\n\n comments: {},\n\n favoritedIds: [],\n ignoredIds: [],\n savedIds: [],\n matchesIds: [],\n\n loadedIds: {\n favorited: false,\n saved: false,\n ignored: false,\n matches: false,\n },\n\n facilitiesResultsForProvider: null,\n\n matchesSortOption: matchesSortOptionsMap.distance,\n shortlistSortOption: shortlistSortOptionsMap.fit,\n searchSortOption: searchSortOptionsMap.partners,\n selectedFacilityId: null,\n },\n\n getters: {\n currentSearchSortKey: (state) => () => state.searchSortOption,\n\n currentMatchesSortKey: (state) => () => state.matchesSortOption,\n\n currentShortlistSortKey: (state) => () => state.shortlistSortOption,\n\n currentFacility: (state) => {\n const facilities = state.facilitiesResultsForProvider?.facilities;\n return facilities?.find((f) => f.id === state.selectedFacilityId);\n },\n\n orderedFacilities: (state) => {\n const facilities = state.records.ids\n .map((id) => state.records.facilities[id])\n .filter((f) => !!f && state.ignoredIds.indexOf(f.id) < 0);\n\n return {\n exact: facilities.filter((f) => f.exactMatch).map(({ id }) => id),\n partial: facilities.filter((f) => !f.exactMatch).map(({ id }) => id),\n };\n },\n\n resultsWithOffersCount: (state) => Object.values(state.records.facilities)\n .filter((f) => f.offersCount)\n .length,\n\n favoritedFacilities: (state) => state.favoritedIds\n .map((id) => state.storedFacilities[id])\n .filter((f) => !!f),\n\n ignoredFacilities: (state) => state.ignoredIds\n .map((id) => state.storedFacilities[id])\n .filter((f) => !!f),\n\n savedFacilities: (state) => state.savedIds\n .map((id) => state.storedFacilities[id])\n .filter((f) => !!f),\n\n shortlistFacilities: (state, getters) => getters.favoritedFacilities\n .concat(getters.savedFacilities),\n\n matchesFacilities: (state) => state.matchesIds\n .map((id) => state.storedFacilities[id])\n .filter((f) => !!f),\n\n sortedByDistance: (state, getters) => (facilities) => {\n const sortedFacilities = facilities.sort((a, b) => {\n const facilityA = getters.facilityById(a);\n const facilityB = getters.facilityById(b);\n return facilityA.distance - facilityB.distance;\n });\n return sortedFacilities;\n },\n\n sortedByPrice: (state, getters) => (facilities) => {\n const sortedFacilities = facilities.sort((a, b) => {\n const facilityA = getters.facilityById(a);\n const facilityB = getters.facilityById(b);\n\n if (facilityA.priceFrom === facilityB.priceFrom) return 0;\n if (facilityA.priceFrom === null) return 1;\n if (facilityB.priceFrom === null) return -1;\n return facilityA.priceFrom < facilityB.priceFrom ? -1 : 1;\n });\n return sortedFacilities;\n },\n\n sortedShortlistFacilities: (state, getters) => {\n const facilitiesByFit = state.favoritedIds.concat(state.savedIds);\n\n switch (state.shortlistSortOption) {\n case 'fit':\n return facilitiesByFit;\n case 'distance':\n return getters.sortedByDistance(facilitiesByFit);\n case 'price':\n return getters.sortedByPrice(facilitiesByFit);\n default:\n return facilitiesByFit;\n }\n },\n\n sortedMatchesFacilities: (state, getters) => {\n const facilities = state.matchesIds;\n\n switch (state.matchesSortOption) {\n case 'distance':\n return getters.sortedByDistance(facilities);\n case 'price':\n return getters.sortedByPrice(facilities);\n default:\n return facilities;\n }\n },\n\n areFavoritedIdsLoaded: (state) => state.loadedIds.favorited,\n\n areSavedIdsLoaded: (state) => state.loadedIds.saved,\n\n areIgnoredIdsLoaded: (state) => state.loadedIds.ignored,\n\n areShortlistIdsLoaded: (state) => state.loadedIds.favorited && state.loadedIds.saved,\n\n searchSortOptions: () => convertMapToRadioOptions(searchSortOptionsMap),\n\n matchesSortOptions: () => convertMapToRadioOptions(matchesSortOptionsMap),\n\n shortlistSortOptions: () => convertMapToRadioOptions(shortlistSortOptionsMap),\n\n opinionCounts: (state, getters) => {\n const shortlistIdsLength = state.favoritedIds.length + state.savedIds.length;\n\n return {\n favorited: (getters.areFavoritedIdsLoaded\n ? state.favoritedIds.length\n : state.opinionCounts.favorited)\n || 0,\n saved: (getters.areSavedIdsLoaded\n ? state.savedIds.length\n : state.opinionCounts.saved)\n || 0,\n ignored: (getters.areIgnoredIdsLoaded\n ? state.ignoredIds.length\n : state.opinionCounts.ignored)\n || 0,\n shortlisted: (getters.areShortlistIdsLoaded\n ? shortlistIdsLength\n : state.opinionCounts.shortlisted)\n || 0,\n };\n },\n\n facilityIsFavorited: (state) => (id) => state.favoritedIds.includes(id),\n\n facilityIsSaved: (state) => (id) => state.savedIds.includes(id),\n\n facilityIsIgnored: (state) => (id) => state.ignoredIds.includes(id),\n\n facilityById: (state) => (id) => state.records.facilities[id]\n || state.storedFacilities[id]\n || { id },\n\n totalMatchesFacilities: (state) => state.matchesIds.length || 0,\n\n currentFacilityTimezone: (state) => state.facilitiesResultsForProvider\n .facilities\n .find((f) => f.id === state.selectedFacilityId)\n ?.timezone,\n },\n\n mutations: {\n setSelectedFacilityId(state, facilityId) {\n state.selectedFacilityId = facilityId;\n localStorage.setItem('selectedFacilityId', facilityId);\n },\n\n setFacilityRecords: (state, { facilities, ids }) => {\n state.records = {\n facilities: addArrayToDictionary(facilities, []),\n ids,\n };\n },\n\n setMatchesSortOption: (state, sort) => {\n state.matchesSortOption = sort || state.matchesSortOption;\n },\n\n setShortlistSortOption: (state, sort) => {\n state.shortlistSortOption = sort || state.shortlistSortOption;\n },\n\n setSearchSortOption: (state, sort) => {\n state.searchSortOption = sort || state.searchSortOption;\n },\n\n setMatchesIds: (state, ids) => {\n state.matchesIds = ids;\n state.loadedIds.matches = true;\n },\n\n setFavoritedIds: (state, ids) => {\n state.favoritedIds = ids;\n state.loadedIds.favorited = true;\n },\n\n setSavedIds: (state, ids) => {\n state.savedIds = ids;\n state.loadedIds.saved = true;\n },\n\n setIgnoredIds: (state, ids) => {\n state.ignoredIds = ids;\n state.loadedIds.ignored = true;\n },\n\n setOpinionCounts: (state, counts) => {\n state.opinionCounts = counts;\n },\n\n setOpinionState: (state, { facilityId, opinion }) => {\n ['favorited', 'saved', 'ignored'].forEach((key) => {\n state[`${key}Ids`] = state[`${key}Ids`].filter((ids) => ids !== facilityId);\n });\n if (opinion === FACILITY_OPINIONS.favorited) {\n state.favoritedIds.push(facilityId);\n } else if (opinion === FACILITY_OPINIONS.saved) {\n state.savedIds.push(facilityId);\n } else if (opinion === FACILITY_OPINIONS.ignored) {\n state.ignoredIds.push(facilityId);\n }\n },\n\n addStoredFacilities: (state, facilities) => {\n state.storedFacilities = { ...addArrayToDictionary(facilities, state.storedFacilities) };\n facilities.forEach((f) => {\n state.comments[f.id] = f.comment || '';\n });\n },\n\n setHoveredId(state, id) {\n state.hoveredId = id;\n },\n\n updateFacilityComment(state, { facilityId, comment }) {\n state.comments = { ...state.comments, [facilityId]: comment };\n },\n setAcceptPayment(state, { facilityId, acceptKinsidePayment }) {\n state.facilitiesResultsForProvider = {\n ...state.facilitiesResultsForProvider,\n facilities: state.facilitiesResultsForProvider.facilities.map((facility) => {\n if (facility.id === facilityId) {\n return {\n ...facility,\n acceptKinsidePayment,\n };\n }\n return facility;\n }),\n };\n },\n setDeactivatePayment(state) {\n state.facilitiesResultsForProvider = {\n ...state.facilitiesResultsForProvider,\n facilities: state.facilitiesResultsForProvider.facilities\n .map((facility) => ({ ...facility, acceptKinsidePayment: false })),\n };\n },\n setFacilitiesResultsForProvider(state, results) {\n state.facilitiesResultsForProvider = { ...results };\n },\n },\n\n actions: {\n async setSort({ commit, dispatch, rootGetters }, sort) {\n if (rootGetters.showShortlist) {\n await commit('setShortlistSortOption', sort);\n }\n if (rootGetters.showRecords) {\n await commit('setSearchSortOption', sort);\n await commit('search/updatePagination', { page: 1 }, { root: true });\n dispatch('search/reload', undefined, { root: true });\n }\n if (rootGetters.showMatches) {\n await commit('setMatchesSortOption', sort);\n }\n },\n\n async loadOpinionCounts({ commit }) {\n const opinionCounts = await fetchOpinionCounts();\n commit('setOpinionCounts', opinionCounts);\n },\n\n async loadFacilitiesByOpinion({\n commit, dispatch, state,\n }, opinion) {\n const opinionLabel = upperFirst(opinion);\n try {\n const noFacilitiesWithOpinion = state.opinionCounts[opinion] === 0;\n if (noFacilitiesWithOpinion) {\n return;\n }\n\n const loadedFacilitiesCount = state[`${opinion}Ids`].map((id) => state.storedFacilities[id]).filter(Boolean).length;\n const areFacilitiesLoaded = state.opinionCounts[opinion] !== undefined\n && state.opinionCounts[opinion] === loadedFacilitiesCount;\n\n if (areFacilitiesLoaded) {\n return;\n }\n\n const {\n ids,\n facilities,\n } = await fetchFacilitiesByOpinion(opinion);\n const bounds = getBoundsFromFacilities(facilities);\n await commit(`set${opinionLabel}Ids`, ids);\n await commit(`map/set${opinionLabel}Bounds`, bounds, { root: true });\n commit('addStoredFacilities', facilities);\n } catch (error) {\n dispatch('notifications/addToastError', { text: `Could not load the list of ${opinion} facilities`, error }, { root: true });\n }\n },\n\n async fetchFacilitiesToStore({ commit, dispatch }, { ids = [], limited = true } = {}) {\n try {\n if (ids.length === 0) {\n return;\n }\n const params = { idsToRequest: ids };\n const facilities = await fetchFacilities(params, { limited });\n commit('addStoredFacilities', facilities);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not fetch and store facilities', error }, { root: true });\n throw new Error();\n }\n },\n\n async searchFacilities({ dispatch }, searchParams) {\n try {\n const records = await searchFacilities(searchParams);\n return records;\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not run a search', error }, { root: true });\n return [];\n }\n },\n\n async toggleFavorited({\n dispatch, getters,\n }, { facilityId, context }) {\n const wasFavorited = getters.facilityIsFavorited(facilityId);\n const opinion = wasFavorited\n ? FACILITY_OPINIONS.noOpinion\n : FACILITY_OPINIONS.favorited;\n\n await dispatch('updateFacilityOpinion', { facilityId, context, opinion });\n },\n\n async toggleSaved({\n dispatch, getters,\n }, { facilityId, context }) {\n const wasSaved = getters.facilityIsSaved(facilityId);\n const opinion = wasSaved\n ? FACILITY_OPINIONS.noOpinion\n : FACILITY_OPINIONS.saved;\n\n await dispatch('updateFacilityOpinion', { facilityId, context, opinion });\n },\n\n async toggleIgnored({\n dispatch, getters,\n }, { facilityId, context }) {\n const wasIgnored = getters.facilityIsIgnored(facilityId);\n const opinion = wasIgnored\n ? FACILITY_OPINIONS.noOpinion\n : FACILITY_OPINIONS.ignored;\n\n await dispatch('updateFacilityOpinion', { facilityId, context, opinion });\n },\n\n async updateFacilityOpinion({\n commit, dispatch, getters, rootGetters,\n }, { facilityId, opinion, context }) {\n const facility = getters.facilityById(facilityId);\n const oldOpinion = facility.opinion;\n\n // change optimistically\n commit('setOpinionState', { opinion, facilityId });\n commit('addStoredFacilities', [facility]);\n try {\n await saveFacilityOpinion(facilityId, opinion, context);\n\n if (opinion === FACILITY_OPINIONS.favorited || opinion === FACILITY_OPINIONS.saved) {\n await dispatch(\n 'notifications/addToastNotification',\n { text: 'Location added to your shortlist' },\n { root: true },\n );\n } else if (opinion === FACILITY_OPINIONS.ignored) {\n await dispatch(\n 'notifications/addToastNotification',\n { text: 'Location moved to not a fit' },\n { root: true },\n );\n }\n\n // fetch matches so we only show matches\n // that do not have an opinion set\n if (rootGetters.showMatches) {\n // fetch matches\n await dispatch('fetchMatchesFacilitiesForParent');\n\n // check/set flag for matches note\n const hasSeenMatchesNote = localStorage.getItem('hasSeenMatchesNote');\n if (!hasSeenMatchesNote) {\n await commit('setHasSeenMatchesNote', true, { root: true });\n localStorage.setItem('hasSeenMatchesNote', true);\n }\n }\n\n // update bounds\n if (!rootGetters.showShortlist\n && (\n [opinion, oldOpinion].includes(FACILITY_OPINIONS.favorited)\n || [opinion, oldOpinion].includes(FACILITY_OPINIONS.saved)\n )\n ) {\n commit('map/setShortlistBounds', getBoundsFromFacilities(getters.shortlistFacilities), { root: true });\n }\n if (!rootGetters.showFavorited\n && [opinion, oldOpinion].includes(FACILITY_OPINIONS.favorited)\n ) {\n commit('map/setFavoritedBounds', getBoundsFromFacilities(getters.favoritedFacilities), { root: true });\n }\n if (!rootGetters.showSaved && [opinion, oldOpinion].includes(FACILITY_OPINIONS.saved)) {\n commit('map/setSavedBounds', getBoundsFromFacilities(getters.savedFacilities), { root: true });\n }\n if (!rootGetters.showIgnored && [opinion, oldOpinion].includes(FACILITY_OPINIONS.ignored)) {\n commit('map/setIgnoredBounds', getBoundsFromFacilities(getters.ignoredFacilities), { root: true });\n }\n } catch (error) {\n commit('setOpinionState', { opinion: oldOpinion, facilityId });\n dispatch('notifications/addToastError', { text: 'Could not update opinion', error }, { root: true });\n }\n },\n\n async updateComment({\n commit, dispatch, getters,\n }, { facilityId, comment, context }) {\n const facility = getters.facilityById(facilityId);\n\n try {\n await saveFacilityComment(facilityId, comment);\n commit('updateFacilityComment', { facilityId, comment });\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not save a comment', error }, { root: true });\n }\n if (facility.friendlyId) {\n dispatch('track/event', {\n category: 'parents',\n event: 'add_location_note',\n props: {\n slug: `/childcare/${facility.friendlyId}`,\n context,\n opinion: facility.opinion,\n },\n }, { root: true });\n }\n return comment || facility?.comment;\n },\n // eslint-disable-next-line\n async saveFacilityImages({ commit }, { id, data }) {\n await saveFacilityImages(id, data);\n },\n\n async fetchFacilitiesForProvider(\n { commit, dispatch, rootState },\n { page = 1, search = null, messaging },\n ) {\n try {\n const results = await fetchFacilitiesForProvider({\n providerId: rootState.providerId,\n page,\n search,\n messaging,\n });\n commit('setFacilitiesResultsForProvider', results);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Something went wrong fetching facilities' }, { root: true });\n }\n },\n\n async fetchMatchesFacilitiesForParent({\n commit,\n dispatch,\n getters,\n }) {\n const matchesData = await fetchMatchesFacilitiesForParent();\n const facilityIds = matchesData.recommendations\n .map((facility) => parseInt(Object.keys(facility)[0], 10));\n await commit('setMatchesPhase', matchesData.empty_state, { root: true });\n await commit('setMatchesIds', facilityIds);\n await dispatch('fetchFacilitiesToStore', { ids: facilityIds, limited: false });\n const bounds = getBoundsFromFacilities(getters.matchesFacilities);\n await commit('map/setMatchesBounds', bounds, { root: true });\n },\n\n newConversationReceived({ rootState, state }, conv) {\n const { conversation, newMessage } = toCamelCase(conv);\n const userType = rootState.user.current.isParent ? 'User' : 'Provider';\n if (userType === newMessage.senderType) return;\n const facility = state.facilitiesResultsForProvider.facilities\n .find((f) => f.id === conversation.childCareFacilityId);\n facility.hasUnreadMessages = true;\n },\n\n async acceptPayment(\n { commit, dispatch },\n { facilityId, acceptKinsidePayment },\n ) {\n await acceptPayment(facilityId, acceptKinsidePayment);\n commit('setAcceptPayment', { facilityId, acceptKinsidePayment });\n\n if (acceptKinsidePayment) {\n dispatch('notifications/addToastNotification', { text: 'Location payment link activated' }, { root: true });\n } else {\n dispatch('notifications/addToastNotification', { text: 'Location payment link deactivated' }, { root: true });\n }\n },\n async deactivateFacilitiesPayment({ commit, dispatch }) {\n await deactivateFacilitiesPayment();\n commit('setDeactivatePayment');\n dispatch('notifications/addToastNotification', { text: 'Deactivated payment link for all locations' }, { root: true });\n },\n },\n};\n","import { loadStripe } from '@stripe/stripe-js';\nimport {\n addArrayToDictionary, add, subtract, isCurrencyAmountTooLow, getFullName, getEnvVar,\n} from '@utils';\nimport {\n confirmNewFeeStructure,\n} from '@care-provider/stores/modules/provider-user.service';\nimport {\n fetchPayees,\n addCardPaymentMethod,\n fetchPaymentMethods,\n fetchPaymentRequests,\n fetchPayMeRequest,\n addPaymentRequest,\n updatePaymentRequest,\n cancelPaymentRequest,\n addBankAccountPaymentMethod,\n addProvider,\n removePaymentMethod,\n getPaymentCouponsToApply,\n doPaymentMathAndGetCommissions,\n checkNaviaBalance,\n submitCheckRequest,\n canRemovePaymentMethod,\n declinePayMeRequest,\n fetchUserPayMeRequests,\n acceptEnrollmentAutopay,\n fetchPaymentRequest,\n updateByProvider,\n} from './payments.service';\n\nconst completedStatuses = [\n 'failed',\n 'completed',\n];\n\nconst pendingStatuses = [\n 'created',\n 'payin_initiating',\n 'payin_bank_transactions_inititated',\n 'payin_all_transactions_inititated',\n 'funds_received',\n 'payout_initiated',\n];\n\nexport default {\n namespaced: true,\n\n state: {\n payees: {},\n paymentMethods: {},\n paymentRequests: {},\n currentPayment: {\n paymentRequestMethods: [],\n paymentRequestItems: [],\n },\n payMeRequest: {},\n userPayMeRequests: [],\n coupons: {},\n navia: {},\n isInitialized: false,\n },\n\n getters: {\n scheduledPaymentRequest(state) {\n return Object.values(state.paymentRequests)\n .filter((request) => request.status === 'scheduled')\n .sort((a, b) => Date.parse(a.scheduledAt) - Date.parse(b.scheduledAt))[0];\n },\n paymentMethodTypes() {\n return {\n fsaCard: 'DCFSA Debit Card',\n stripeCard: 'Credit / Debit Card',\n bankAccount: 'Direct debit from a bank account',\n };\n },\n\n pendingPaymentRequestIds(state) {\n return Object.values(state.paymentRequests)\n .filter((request) => pendingStatuses.includes(request.status))\n .map(({ id }) => id);\n },\n\n schedulePaymentRequestIds(state) {\n return Object.values(state.paymentRequests)\n .filter((request) => request.status === 'scheduled')\n .map(({ id }) => id);\n },\n\n completedPaymentRequestIds(state) {\n return Object.values(state.paymentRequests)\n .filter((request) => completedStatuses.includes(request.status))\n .map(({ id }) => id);\n },\n\n nonScheduledPaymentRequestIds(state) {\n return Object.values(state.paymentRequests)\n .filter((request) => !['scheduled', 'canceled', 'requested'].includes(request.status))\n .map(({ id }) => id);\n },\n\n allPaymentRequestIds(state) {\n return Object.values(state.paymentRequests)\n .map(({ id }) => id);\n },\n\n currentPayment(state) {\n return state.currentPayment;\n },\n\n currentPaymentHasFsaMethod(state) {\n return state.currentPayment.paymentRequestMethods.some(\n (method) => state.paymentMethods[method.paymentMethodId].fsa,\n );\n },\n\n currentPaymentHasBankAccount(state) {\n return state.currentPayment.paymentRequestMethods.some(\n (method) => state.paymentMethods[method.paymentMethodId].paymentMethodType.includes('BankAccount'),\n );\n },\n\n currentPaymentTotalFees(state) {\n const paymentMethods = state.currentPayment.paymentRequestMethods || [];\n return paymentMethods.length\n ? state.currentPayment.paymentRequestMethods\n .reduce((sum, method) => add(sum, method.commissionAmount), 0)\n : 0;\n },\n\n currentPaymentDiscounts(state) {\n const uniqDiscountsFromPaymentMethods = [];\n\n state.currentPayment.paymentRequestMethods.forEach(({ couponsApplied }) => {\n if (couponsApplied) {\n couponsApplied.forEach(({ code, discountAmount }) => {\n const coupon = uniqDiscountsFromPaymentMethods.find((d) => d.code === code);\n if (coupon) {\n coupon.amount = add(coupon.amount, discountAmount);\n } else if (discountAmount) {\n uniqDiscountsFromPaymentMethods.push({ code, amount: discountAmount });\n }\n });\n }\n });\n\n return uniqDiscountsFromPaymentMethods;\n },\n\n currentPaymentTotalDiscount(state) {\n return state.currentPayment.paymentRequestMethods\n .reduce((sum, method) => add(sum, method.discountAmount), 0);\n },\n\n currentPaymentTotalFeeDiscount(state) {\n return state.currentPayment.paymentRequestMethods.reduce((sum, method) => {\n const feeDiscount = (method.couponsApplied || []).reduce((methodSum, coupon) => {\n const isFeeDiscount = ['ACHFREE', 'WELCOME2020'].includes(coupon.code);\n return isFeeDiscount ? add(methodSum, coupon.discountAmount) : methodSum;\n }, 0);\n return add(sum, feeDiscount);\n }, 0);\n },\n\n currentPaymentFeeAfterDiscount(state, getters) {\n const { currentPaymentTotalFees, currentPaymentTotalFeeDiscount } = getters;\n return subtract(currentPaymentTotalFees, currentPaymentTotalFeeDiscount);\n },\n\n currentPaymentTotalInPaymentMethods(state) {\n return (state.currentPayment.paymentRequestMethods || [])\n .reduce((sum, method) => add(sum, method?.totalAmount || 0), 0);\n },\n\n currentPaymentTotalRemainingWithFee(state, getters) {\n if (state.currentPayment.totalToBeCharged) {\n return subtract(\n state.currentPayment.totalToBeCharged,\n getters.currentPaymentTotalInPaymentMethods,\n );\n }\n return 0;\n },\n\n currentPaymentProviderName(state) {\n const { providerId, newProvider } = state.currentPayment;\n const provider = providerId && state.payees[providerId];\n return getFullName(provider || newProvider, provider?.email || 'Your contact');\n },\n\n currentPaymentFacility(state, g, rootState) {\n const { facilityId } = state.currentPayment;\n return facilityId && rootState.facilities.storedFacilities[facilityId];\n },\n\n currentPaymentFacilityName(state, getters) {\n const { providerId, newProvider } = state.currentPayment;\n const { companyName } = newProvider || {};\n const { currentPaymentFacility, currentPaymentProviderName } = getters;\n const payee = (providerId && state.payees[providerId]);\n const facilityName = currentPaymentFacility?.name || payee?.companyName;\n\n return facilityName || companyName || currentPaymentProviderName || 'Facility';\n },\n\n currentPaymentIsSomeAmountTooLow(state) {\n const isAmountTooLow = isCurrencyAmountTooLow(state.currentPayment.amount);\n const isSomeMethodAmountTooLow = state.currentPayment.paymentRequestMethods\n .map((m) => m.totalAmount).some(isCurrencyAmountTooLow);\n\n return isAmountTooLow || isSomeMethodAmountTooLow;\n },\n\n currentPaymentHasNoLongerActiveCard(state) {\n if (!state.currentPayment.error || !state.currentPayment.error.relatedObj) {\n return false;\n }\n\n const { error } = state.currentPayment;\n\n if (error.relatedObj.class !== 'PaymentMethod') {\n return false;\n }\n\n const isErrorRelatedToCurrentPaymentMethods = state.currentPayment.paymentRequestMethods\n .map((m) => m.paymentMethodId)\n .includes(error.relatedObj.id);\n\n const isNoLongerActiveError = (error.message || '').toLowerCase().includes('no longer active');\n\n return isErrorRelatedToCurrentPaymentMethods && isNoLongerActiveError;\n },\n\n paymentMethodsAsArray(state) {\n return Object.values(state.paymentMethods)\n .filter((method) => method !== undefined && !method.deleted);\n },\n\n payMeRequest(state) {\n return state.payMeRequest;\n },\n\n userPayMeRequests(state) {\n return state.userPayMeRequests;\n },\n\n payeeIds(state) {\n return Object.keys(state.payees);\n },\n\n payeesAsArray(state) {\n return Object.values(state.payees);\n },\n\n couponCodes(state) {\n return Object.keys(state.coupons);\n },\n\n hasNaviaCard(state, getters) {\n return getters.paymentMethodsAsArray.some((m) => m.navia);\n },\n\n naviaCard(s, getters) {\n return getters.paymentMethodsAsArray.filter((m) => m.navia)[0];\n },\n\n naviaCardId(s, getters) {\n return getters.paymentMethodsAsArray.filter((m) => m.navia)[0]?.id;\n },\n },\n\n mutations: {\n addPayees: (state, payees) => {\n state.payees = { ...addArrayToDictionary(payees, state.payees) };\n },\n\n addPaymentMethods: (state, methods) => {\n state.paymentMethods = { ...addArrayToDictionary(methods, state.paymentMethods) };\n },\n\n removePaymentMethod: (state, id) => {\n state.paymentMethods = {\n ...state.paymentMethods,\n [id]: { ...state.paymentMethods[id], deleted: true },\n };\n },\n\n resetPaymentRequests: (state) => {\n state.paymentRequests = {};\n },\n\n addPaymentRequests: (state, requests) => {\n state.paymentRequests = { ...addArrayToDictionary(requests, state.paymentRequests) };\n },\n\n updateCurrentPayment: (state, newPaymentDetails) => {\n state.currentPayment = {\n ...state.currentPayment,\n ...newPaymentDetails,\n };\n },\n\n setCurrentPayment: (state, initData) => {\n state.currentPayment = {\n providerId: undefined,\n facilityId: undefined,\n newProvider: undefined,\n amount: undefined,\n category: undefined,\n paymentRequestMethods: [],\n ...initData,\n };\n },\n\n updateCurrentPaymentMethods: (state, paymentRequestMethods) => {\n state.currentPayment = {\n ...state.currentPayment,\n paymentRequestMethods,\n };\n },\n\n updatePaymentRequest: (state, request) => {\n state.paymentRequests[request.id] = request;\n },\n\n setCoupons: (state, coupons) => {\n state.coupons = addArrayToDictionary(coupons, undefined, 'code');\n },\n\n storeInitialized: (state) => {\n state.isInitialized = true;\n },\n\n setNavia: (state, payload) => {\n state.navia = payload;\n },\n\n setPayMeRequest: (state, payMeRequest) => {\n state.payMeRequest = payMeRequest;\n },\n\n setUserPayMeRequests: (state, userPayMeRequests) => {\n state.userPayMeRequests = userPayMeRequests;\n },\n },\n\n actions: {\n // setup user\n async fetchPaymentMethods({ commit, state, dispatch }) {\n try {\n const isPaymentMethodsEmpty = Object.keys(state.paymentMethods).length === 0;\n if (isPaymentMethodsEmpty) {\n const paymentMethods = await fetchPaymentMethods();\n commit('addPaymentMethods', paymentMethods);\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not fetch payment methods', error }, { root: true });\n throw new Error();\n }\n },\n\n // setup payments store\n async initializePaymentsStore({ dispatch, commit, state }) {\n if (!state.isInitialized) {\n return new Promise((resolve, reject) => {\n const promises = [\n dispatch('fetchPayees'),\n dispatch('fetchPaymentRequests'),\n ];\n\n Promise.all(promises)\n .then(() => {\n commit('storeInitialized');\n resolve();\n })\n .catch(() => {\n reject(new Error('Could not initialize payments module'));\n });\n });\n }\n return undefined;\n },\n\n async fetchPayees({ commit, dispatch }) {\n try {\n const payees = await fetchPayees();\n commit('addPayees', payees);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not fetch payees', error }, { root: true });\n }\n },\n\n async fetchPaymentRequests({ commit, dispatch }) {\n try {\n const paymentRequests = await fetchPaymentRequests();\n commit('resetPaymentRequests');\n commit('addPaymentRequests', paymentRequests);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not fetch payment history', error }, { root: true });\n }\n },\n\n // eslint-disable-next-line consistent-return\n async fetchPaymentRequest({ dispatch }, id) {\n try {\n return await fetchPaymentRequest(id);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not fetch payment history', error }, { root: true });\n }\n },\n\n // setup payment\n async setCurrentPayment({ dispatch, commit }, initData) {\n try {\n commit('setCurrentPayment', initData);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not initialize sending payment', error }, { root: true });\n }\n },\n\n async updateCurrentPayment({ commit, dispatch }, newPaymentDetails) {\n try {\n commit('updateCurrentPayment', newPaymentDetails);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not update payment details', error }, { root: true });\n }\n },\n\n async getPaymentCoupons({ commit, dispatch }) {\n try {\n const coupons = await getPaymentCouponsToApply();\n commit('setCoupons', coupons);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not get coupons', error }, { root: true });\n throw new Error(error);\n }\n },\n\n // manage the amounts\n async setTotalAmount({ commit, dispatch }, amount) {\n try {\n await commit('updateCurrentPayment', {\n amount,\n });\n\n await dispatch('doPaymentMathAndGetCommissions');\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not update total amount', error }, { root: true });\n }\n },\n\n async updateMethodInCurrentPayment({ commit, state, dispatch }, method) {\n if (!method) {\n return;\n }\n\n // eslint-disable-next-line\n let { paymentRequestMethods, totalToBeCharged } = state.currentPayment;\n const methodToUpdateIndex = paymentRequestMethods.findIndex(\n (existingMethod) => existingMethod.paymentMethodId === method.paymentMethodId,\n );\n\n if (methodToUpdateIndex < 0) {\n paymentRequestMethods.push(method);\n } else {\n paymentRequestMethods[methodToUpdateIndex].totalAmount = method.totalAmount;\n }\n\n if (paymentRequestMethods.length === 2 && !!method.totalAmount) {\n const secondMethodIndex = methodToUpdateIndex < 0 ? 0 : 1 - methodToUpdateIndex;\n const secondPayment = paymentRequestMethods[secondMethodIndex];\n if (secondPayment) {\n const { paymentMethodId } = secondPayment;\n paymentRequestMethods[secondMethodIndex] = { paymentMethodId };\n // if the user edit split payment then choose whole amount,\n // we need to remove the other payment method\n if (method.totalAmount === totalToBeCharged) {\n paymentRequestMethods = paymentRequestMethods\n .filter((paymentMethod) => paymentMethod.paymentMethodId !== paymentMethodId);\n }\n }\n }\n await commit('updateCurrentPaymentMethods', paymentRequestMethods);\n await dispatch('doPaymentMathAndGetCommissions');\n },\n\n async removeMethodFromCurrentPayment({ commit, state, dispatch }, methodId) {\n if (!methodId) {\n return;\n }\n const { paymentRequestMethods } = state.currentPayment;\n const filteredPaymentRequestMethods = paymentRequestMethods\n .filter((method) => method.paymentMethodId !== methodId);\n\n await commit('updateCurrentPaymentMethods', filteredPaymentRequestMethods);\n await dispatch('doPaymentMathAndGetCommissions');\n },\n\n async doPaymentMathAndGetCommissions({\n commit, dispatch, state, getters, rootState,\n }) {\n try {\n const {\n id,\n amount,\n paymentRequestMethods,\n providerId,\n } = state.currentPayment;\n const params = {\n amount,\n paymentRequestMethods,\n coupons: getters.couponCodes,\n seatId: rootState.route.params.seatId,\n centerId: rootState.legup.centerInfo.center_id,\n providerId,\n paymentRequestId: id,\n };\n const data = await doPaymentMathAndGetCommissions(params);\n if (!state.currentPayment.paymentRequestMethods) {\n commit('updateCurrentPayment', data);\n return;\n }\n\n const updatedPaymentRequestMethods = state.currentPayment.paymentRequestMethods\n .map((method) => {\n let methodFromResponse = {};\n if (data.paymentRequestMethods) {\n methodFromResponse = data.paymentRequestMethods\n .find(({ paymentMethodId }) => paymentMethodId === method.paymentMethodId);\n }\n return {\n ...method,\n ...methodFromResponse,\n };\n });\n commit('updateCurrentPayment', {\n ...data,\n paymentRequestMethods: updatedPaymentRequestMethods,\n });\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not calculate payment commissions', error }, { root: true });\n throw new Error(error);\n }\n },\n\n // start a payment request\n async addPaymentProvider({ dispatch }, newProvider) {\n try {\n const provider = await addProvider(newProvider);\n return provider.id;\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not add a provider', error }, { root: true });\n throw new Error();\n }\n },\n\n async addPaymentRequest({ commit, dispatch, getters }, currentPayment) {\n try {\n const requestedPayment = await addPaymentRequest({\n ...currentPayment,\n paymentCoupons: getters.couponCodes,\n });\n await commit('updateCurrentPayment', {\n status: requestedPayment.status,\n id: requestedPayment.id,\n });\n commit('addPaymentRequests', [requestedPayment]);\n return requestedPayment.id;\n } catch (error) {\n const text = error.response.data.message || 'Could not send a payment request';\n dispatch('notifications/addToastError', { text, error }, { root: true });\n throw new Error();\n }\n },\n\n // eslint-disable-next-line max-len\n async updatePaymentRequest({ commit, dispatch, getters }, { id, applyChangesToCollection, ...data }) {\n try {\n const params = { ...data, paymentCoupons: getters.couponCodes, applyChangesToCollection };\n const updatedPayment = await updatePaymentRequest(params, id);\n commit('updatePaymentRequest', updatedPayment);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not update a payment request', error }, { root: true });\n throw new Error();\n }\n },\n\n async updateByProvider({ dispatch }, { id, params }) {\n let updatedPayment = {};\n try {\n updatedPayment = await updateByProvider(params, id);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not update a payment request', error }, { root: true });\n throw new Error();\n }\n return updatedPayment;\n },\n\n async cancelPaymentRequest({ commit, dispatch }, { id }) {\n try {\n const updatedPayment = await cancelPaymentRequest(id);\n commit('updatePaymentRequest', updatedPayment);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not cancel a payment request', error }, { root: true });\n throw new Error();\n }\n },\n\n // manage payment methods\n async addCard({\n dispatch, commit, getters,\n }, {\n cardType, cardData, userId, replace,\n }) {\n let stripePaymentMethod;\n\n // NAVIA FSA: CARD CHECK\n\n // stripe\n try {\n const stripe = await dispatch('loadStripe');\n const { nameOnCard, ...stripeData } = cardData;\n const { paymentMethod, error } = await stripe.createPaymentMethod({\n type: 'card',\n card: stripeData.cardNumber,\n billing_details: {\n name: nameOnCard,\n },\n });\n stripePaymentMethod = paymentMethod;\n if (error) {\n throw new Error(error);\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not add a card, please check card details', error }, { root: true });\n throw new Error();\n }\n\n // our db\n try {\n const isFsa = cardType === getters.paymentMethodTypes.fsaCard;\n const addedMethod = await addCardPaymentMethod(stripePaymentMethod.id, isFsa, userId, replace);\n commit('addPaymentMethods', [addedMethod]);\n return addedMethod.id;\n } catch (error) {\n dispatch('notifications/addToastError', { text: error.response?.data?.error || 'Could not add a card, please check card details', error }, { root: true });\n throw new Error();\n }\n },\n\n async loadStripe({ dispatch }) {\n try {\n if (window.stripe !== undefined) {\n return window.stripe;\n }\n const stripeKey = getEnvVar('STRIPE_PUBLISHABLE_KEY') || 'pk_test_Z6CKyvULf8ZrRYUMCCs70tXu00SWlreOO6';\n const stripe = await loadStripe(stripeKey);\n window.stripe = stripe;\n return window.stripe;\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not load stripe', error }, { root: true });\n throw new Error();\n }\n },\n\n async addBankAccount({ commit, dispatch }, { publicToken, accountId, userId }) {\n try {\n const addedMethod = await addBankAccountPaymentMethod(publicToken, accountId, userId);\n commit('addPaymentMethods', [addedMethod]);\n return addedMethod.id;\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not add a new bank account', error }, { root: true });\n throw new Error();\n }\n },\n\n async removePaymentMethod({ commit, dispatch }, id) {\n try {\n await removePaymentMethod(id);\n commit('removePaymentMethod', id);\n } catch (error) {\n dispatch('notifications/addToastError', { text: `Could not remove payment method: ${id}`, error }, { root: true });\n throw new Error();\n }\n },\n\n async checkNaviaBalance({ commit, getters }) {\n commit('setNavia', {});\n if (!getters.hasNaviaCard) {\n return;\n }\n\n try {\n const response = await checkNaviaBalance();\n const {\n nextContributionDate, availableBalance, paymentMethodId, gracePeriodDate,\n } = response;\n\n commit('setNavia', {\n nextContributionDate,\n balance: availableBalance,\n cardId: paymentMethodId,\n expirationDate: gracePeriodDate,\n });\n } catch (e) {\n const { errorMessage, error, paymentMethodId } = e.response?.data || {};\n\n commit('setNavia', {\n errorMessage,\n error: error || true,\n cardId: paymentMethodId,\n });\n }\n },\n\n async submitCheckRequest(_, data) {\n await submitCheckRequest(data);\n },\n\n async confirmNewFeeStructure({ dispatch }, { providerId }) {\n try {\n const response = await confirmNewFeeStructure(providerId);\n return response;\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not optin', error }, { root: true });\n return { error };\n }\n },\n async canRemovePaymentMethod({ dispatch }, { id }) {\n try {\n const response = await canRemovePaymentMethod(id);\n return response.data.can_remove;\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not check payment method status', error }, { root: true });\n throw new Error();\n }\n },\n\n async fetchPayMeRequest({ commit, dispatch }, { id, facilityId }) {\n try {\n const payMeRequest = await fetchPayMeRequest({ id, facilityId });\n commit('setPayMeRequest', payMeRequest);\n commit('setCurrentPayment', payMeRequest);\n // set user for guest user\n if (payMeRequest.user) {\n await dispatch('user/setCurrentUser', payMeRequest.user, { root: true });\n }\n } catch (error) {\n commit('setPayMeRequest', null);\n dispatch('notifications/addToastError', { text: 'Could not fetch pay me request', error }, { root: true });\n }\n },\n\n async declinePayMeRequest({ dispatch }, params) {\n try {\n await declinePayMeRequest(params);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not decline pay me request', error }, { root: true });\n }\n },\n\n async acceptEnrollmentAutopay({ dispatch }, currentPayment) {\n try {\n await acceptEnrollmentAutopay({\n ...currentPayment,\n });\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not accept autopay', error }, { root: true });\n throw new Error();\n }\n },\n\n async fetchUserPayMeRequests({ commit, dispatch }) {\n try {\n const payMeRequests = await fetchUserPayMeRequests();\n commit('setUserPayMeRequests', payMeRequests);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not fetch users pay me requests', error }, { root: true });\n }\n },\n },\n};\n"],"names":["searchParamsToFetchParams","location","filters","fil","bounds","geoSearchType","sort","searchRadius","age","startDate","onlyEmergencyCare","rest","dependents","age_ranges","range","openings","value","openings_from","date","emergency_care","search_radius","source_address","targetAddress","source_latitude","lat","source_longitude","lon","precise_address_lat","precise_address_lon","source_city","city","source_state","state","source_zip","zip","is_precise_address","preciseLocation","bounds_neLat","neLat","bounds_neLon","neLon","bounds_swLat","swLat","bounds_swLon","swLon","center_lon","center_lat","geo_search_type","async","fetchSearchHistory","response","get","data","saveSearch","params","post","fetchSearch","id","fetchFilters","restFilters","parseFloat","precise_address","fetchParamsToSearchParams","deleteSearch","delete","fetchPhilosophies","fetchScheduleTypes","fetchMotivation","findFacilities","restOfParams","axiosController","AbortController","pagination","searchId","Object","keys","forEach","filterName","undefined","Array","isArray","length","array","join","arrayToString","per_page","perPage","page","search_id","mapParamsToFetchParams","signal","markers","restOfResponse","facilities","map","m","facility","zipBased","zip_based","current_page","totalPages","total_pages","totalRecords","total_results","facilityId","boundsToFit","error","abort","Error","removeAvatar","updateNotificationSettings","settings","patch","user","email_settings","getUser","updateUser","userObj","isImpersonated","put","updatePassword","password","passwordConfirmation","password_confirmation","catch","notificationSettings","label","getUserNavData","email","CONVERSATIONS_BASE_PATH","MESSAGES_BASE_PATH","formatConversation","conversation","currentUser","conv","lastMessage","childCareFacilityId","color","Math","floor","random","lastUpdatedAt","updatedAt","hasUnreadMessages","isParent","secondUser","firstUserType","secondUserId","firstUserId","name","childCareFacilityName","type","firstUser","legupParentId","namespaced","conversations","messages","currentConversationId","conversationScrollEnabled","messagesScrollEnabled","lastMessageId","currentConversationFamily","newMessageReceived","unreadBadge","mutations","setConversations","lastId","isFirstNewConversation","push","newConv","idx","findIndex","c","splice","setMessages","groupedMessages","reverse","reduce","groups","message","Date","createdAt","toDateString","index","group","unshift","pop","pushMessage","changeConversation","conversationId","setConversationsScroll","isEnabled","setChatScroll","moveConversationToTop","isNewConversation","convIdx","markAsRead","read","newMessage","providerId","facilityName","setConversationFamily","family","setConversationReceiverName","parent","firstName","lastName","charAt","resetMessaging","setNewMessageReceived","isNewMessage","setUnreadBadge","count","updateUnreadBadge","actions","fetchConversations","commit","dispatch","rootState","getConversations","current","text","root","fetchMessages","getMessages","fetchUnreadBadge","getUnreadBadge","badgeCount","sendMessage","content","receiverId","body","senderType","senderId","secondUserType","markConversationAsRead","status","fetchParentInfo","getParentInfo","legupParent","messageFormatted","newConversationReceived","incBadge","parentSlots","tours","toursAsArray","centerSettings","tourPolicy","tourSlots","tourEnabled","upcomingTour","pastTour","toursForParent","tourToConfirm","setParentSlots","slots","setTours","payload","setToursAsArray","setCenterSettings","setTourPolicy","setTourSlots","setTourSetting","setCenterParentUpcomingTour","tour","setCenterParentPastTour","setToursForParent","setSingleTour","getters","tourStartTime","tourId","format","startAt","tz","timezone","tourProviderSetting","centerTourPolicy","centerTourSlots","fetchParentSlots","fetchTours","updateParentSlots","newSlots","ps","slotDateFrom","time","from","utc","slotDateTo","to","reserveTour","tourData","redirectUrl","dependentIds","list","centerParentTour","legupCenterId","success","today","upcomingTours","filter","t","startTime","a","b","localeCompare","shift","pastTours","bookTour","centerId","child","tourInfo","noFamilyNotes","ageGroupId","cancelTour","userId","rescheduleTour","newDateTime","policy","fetchSingleTour","parentConfirmTour","confirmed","fetchToursForParent","virtualInstructions","virtualLink","times","fetchSettings","updateSettings","updateDependent","dependent","dependentById","depId","asArray","values","clearDependents","updateDependents","removeDependent","removed","fetchDependents","addDependents","newDependents","Promise","all","d","addDependent","d1","updatedDependent","dependentsToUpdate","dependentsToAdd","addedDependents","updatedDependents","window","analytics","console","info","identify","obj","event","store","category","props","eventName","MetaEvents","warn","pageLoad","path","identifyUser","traits","utmParams","url","urlObject","URL","searchParams","key","startsWith","extractUtmParams","document","dependentAgeGroupPromise","providerWaitlistFeesPromise","findCenterInfoPromise","findCenterQuestionsPromise","findCenterSubsidiesPromise","validateSubsidiesDiscountPromise","checkForProviderCouponsPromise","dependentAgeGroup","waitlistFees","couponInfo","centerInfo","centerQuestions","centerSubsidies","providerCoupons","seatOfferDetails","seatOffersForParent","seatOfferMessageParams","declineOfferInfo","subsidyDiscount","ageGroups","setDeclineOfferInfo","setDependentAgeGroup","setSubsidyDiscount","setWaitlistFees","setCouponInfo","setCenterInfo","setCenterQuestions","setCenterSubsidies","setProviderCoupons","setSeatOfferDetails","setSeatOffersForParent","setSeatOfferMessageParams","setAgeGroups","manageWaitlistUrl","parentId","ageGroupProgramSchedules","updateOrRemoveWaitlistSpot","passOrDeclineSeatOffer","requestPaperwork","validateSubsidiesDiscount","providerWaitlistFees","validateProviderWaitlistCoupon","checkForProviderQuestionsDiscount","checkForProviderSubsidiesDiscount","findCenterInfo","findCenterQuestions","findCenterSubsidies","checkForProviderCoupons","fetchSeatOfferDetails","getCenterSeatOfferDetails","centerSeatOfferDetails","getDeclineOfferInfo","childBirthDate","preferredDate","promise","legup_center_id","birth_date","preferred_date","then","Number","programs","code","result","spotId","waitlist_spot_id","remove_from_waitlist","provider_removal","seatId","seat_id","subsidy_discount","waitlist_fee","fetchSeatOffersForParent","sendOffersMessage","updateWaitlistSpotAnswers","answers","acceptSeatOffer","paymentRequestMethods","payment_request_methods","addDeclineOfferInfo","declineInfo","fetchAgeGroups","toastNotifications","updated","addToastNotification","notification","removeToastNotification","setUpdated","updatedStatus","isDev","now","addToastError","isError","addToastSuccess","setUpdatedStatus","hubspot","constructor","this","instance","hsConversationsSettings","inlineEmbedSelector","env","AUTHORIZED","readyState","setTimeout","loadScript","addEventListener","href","includes","getElementById","loadHSC","scriptTag","createElement","src","onload","appendChild","widget","HubSpotConversations","hsc","loaded","hsConversationsOnReady","waitForHSC","resolve","checkHSC","waitForLoadedStatus","checkLoadedState","load","widgetOpen","refresh","openToNewThread","open","close","isLoaded","trackEvent","_hsq","hsq","phoneNumber","contactType","firstname","lastname","contact_type","mobilephone","openingsContactDetailsFirstName","openingsContactDetailsLastName","openingsContactDetailsEmail","openingsContactDetailsPhoneNumber","openingsContactDetailsTitle","openingsContactDetails","title","getActionItems","confirmNewFeeStructure","fetchSiteWideSearchResults","query","toLocaleString","timeZone","fetchToursPromise","fetchUpcomingParentTourForCenterPromise","fetchToursForParentPromise","onlyUpcoming","upcoming","facility_id","reservations","fetchLatestTour","maxTourId","max","find","tourSlotId","useParentSlots","comment","tour_slot_id","use_parent_slots","parent_comment","dependent_ids","successMessage","errorMessage","getTourSettings","tour_info","no_family_notes","age_group_id","user_id","center","new_date_time","confirmTour","fetchUpcomingParentTourForCenter","parent_id","place","legup_age_group_id","year","month","BASE_PATH","tries","confirmationDisabled","updateValidation","validatedStatus","disableConfirmation","validateEmployerCode","accessCode","accountValidateEmployerCode","access_code","reload","resendConfirmationEmail","accountResendConfirmationEmail","philosophies","profileCompletenessBySection","basicInfo","licensing","programDetails","photos","welcome","approach","healthSafety","setFacility","setPhilosophies","setSectionCompleteness","section","completeness","newProfileCompletenessBySection","facilityInfo","basicInfoComplete","field","licensingComplete","license_number","keyDetailsComplete","photosComplete","profile_images","welcomeComplete","approachComplete","healthSafetyComplete","isProfileEditComplete","numCompleteProfileEditSections","totalProfileEditSections","profileEditSections","profileEditCompleteness","parseInt","fetchFacility","fetchFacilityDetails","facilitySlug","updateFacility","child_care_facility_id","facility_log","source","FACILITY_OPINIONS","favorited","ignored","saved","noOpinion","fetchFacilities","idsToRequest","restParams","isSearch","limited","facility_ids","e","fetchMatchesFacilitiesForParent","acceptPayment","facilityAcceptPayment","accept_payment","deactivateFacilitiesPayment","fetchFacilitiesByOpinion","opinion","opinion_only","ids","ordered_ids","fetchOpinionCounts","saveFacilityOpinion","context","searchFacilities","search","saveFacilityComment","saveFacilityImages","facilityData","fetchFacilitiesForProvider","messaging","METHODS_BASE_PATH","REQUESTS_BASE_PATH","API_REQUESTS_BASE_PATH","errorToData","relatedObj","related_object_id","class","related_object_class","paymentDataToRequest","provider_id","amount","date_from","date_to","dependentId","dependent_data","dependentData","payment_request_items","paymentRequestItems","initialAmount","paymentMethodId","payment_method_id","provider_data","newProvider","message_to_provider","messageToProvider","payment_coupons","paymentCoupons","scheduled_at","scheduledAt","recurring_settings","recurringSettings","is_pay_me_request","isPayMeRequest","paymentRequestToData","aasm_state","latest_error","request","fetchPayees","providers","addProvider","provider","addCardPaymentMethod","stripeId","isFsa","replace","fsa","stripe_payment_method_id","addBankAccountPaymentMethod","publicToken","accountId","public_token","account_id","fetchPaymentMethods","removePaymentMethod","canRemovePaymentMethod","addPaymentRequest","paymentData","payment","payment_request","send_payment","updatePaymentRequest","apply_changes_to_collection","applyChangesToCollection","updateByProvider","cancelPaymentRequest","fetchPaymentRequests","payment_requests","fetchPaymentRequest","fetchPayMeRequest","getPaymentCouponsToApply","doPaymentMathAndGetCommissions","coupons","paymentRequestId","total_remaining","total_to_be_charged","total_to_be_sent_to_provider","amount_to_be_sent","payment_methods","totalAmount","includesFees","center_id","totalToBeSentToProvider","paymentMethods","restOfRequest","recalculateAmount","checkNaviaBalance","submitCheckRequest","papercheck_request","localStorage","setItem","downloadInvoicePdf","responseType","blob","createObjectURL","link","download","click","declinePayMeRequest","declineReason","declineMessage","decline_reason","decline_message","acceptEnrollmentAutopay","fetchUserPayMeRequests","searchSortOptionsMap","partners","distance","price","shortlistSortOptionsMap","fit","matchesSortOptionsMap","convertMapToRadioOptions","options","k","storedFacilities","orderedResultIds","hoveredId","records","opinionCounts","comments","favoritedIds","ignoredIds","savedIds","matchesIds","loadedIds","matches","facilitiesResultsForProvider","matchesSortOption","shortlistSortOption","searchSortOption","selectedFacilityId","currentSearchSortKey","currentMatchesSortKey","currentShortlistSortKey","currentFacility","f","orderedFacilities","indexOf","exact","exactMatch","partial","resultsWithOffersCount","offersCount","favoritedFacilities","ignoredFacilities","savedFacilities","shortlistFacilities","concat","matchesFacilities","sortedByDistance","facilityA","facilityById","facilityB","sortedByPrice","priceFrom","sortedShortlistFacilities","facilitiesByFit","sortedMatchesFacilities","areFavoritedIdsLoaded","areSavedIdsLoaded","areIgnoredIdsLoaded","areShortlistIdsLoaded","searchSortOptions","matchesSortOptions","shortlistSortOptions","shortlistIdsLength","shortlisted","facilityIsFavorited","facilityIsSaved","facilityIsIgnored","totalMatchesFacilities","currentFacilityTimezone","setSelectedFacilityId","setFacilityRecords","setMatchesSortOption","setShortlistSortOption","setSearchSortOption","setMatchesIds","setFavoritedIds","setSavedIds","setIgnoredIds","setOpinionCounts","counts","setOpinionState","addStoredFacilities","setHoveredId","updateFacilityComment","setAcceptPayment","acceptKinsidePayment","setDeactivatePayment","setFacilitiesResultsForProvider","results","setSort","rootGetters","showShortlist","showRecords","showMatches","loadOpinionCounts","loadFacilitiesByOpinion","opinionLabel","upperFirst","loadedFacilitiesCount","Boolean","fetchFacilitiesToStore","toggleFavorited","toggleSaved","toggleIgnored","updateFacilityOpinion","oldOpinion","getItem","showFavorited","showSaved","showIgnored","updateComment","friendlyId","slug","matchesData","facilityIds","recommendations","empty_state","completedStatuses","pendingStatuses","payees","paymentRequests","currentPayment","payMeRequest","userPayMeRequests","navia","isInitialized","scheduledPaymentRequest","parse","paymentMethodTypes","fsaCard","stripeCard","bankAccount","pendingPaymentRequestIds","schedulePaymentRequestIds","completedPaymentRequestIds","nonScheduledPaymentRequestIds","allPaymentRequestIds","currentPaymentHasFsaMethod","some","method","currentPaymentHasBankAccount","paymentMethodType","currentPaymentTotalFees","sum","commissionAmount","currentPaymentDiscounts","uniqDiscountsFromPaymentMethods","couponsApplied","discountAmount","coupon","currentPaymentTotalDiscount","currentPaymentTotalFeeDiscount","feeDiscount","methodSum","currentPaymentFeeAfterDiscount","currentPaymentTotalInPaymentMethods","currentPaymentTotalRemainingWithFee","totalToBeCharged","currentPaymentProviderName","currentPaymentFacility","g","currentPaymentFacilityName","companyName","payee","currentPaymentIsSomeAmountTooLow","isAmountTooLow","isSomeMethodAmountTooLow","currentPaymentHasNoLongerActiveCard","isErrorRelatedToCurrentPaymentMethods","isNoLongerActiveError","toLowerCase","paymentMethodsAsArray","deleted","payeeIds","payeesAsArray","couponCodes","hasNaviaCard","naviaCard","s","naviaCardId","addPayees","addPaymentMethods","methods","resetPaymentRequests","addPaymentRequests","requests","updateCurrentPayment","newPaymentDetails","setCurrentPayment","initData","updateCurrentPaymentMethods","setCoupons","storeInitialized","setNavia","setPayMeRequest","setUserPayMeRequests","initializePaymentsStore","reject","promises","getPaymentCoupons","setTotalAmount","updateMethodInCurrentPayment","methodToUpdateIndex","existingMethod","secondMethodIndex","secondPayment","paymentMethod","removeMethodFromCurrentPayment","methodId","filteredPaymentRequestMethods","route","legup","updatedPaymentRequestMethods","methodFromResponse","addPaymentProvider","requestedPayment","updatedPayment","addCard","cardType","cardData","stripePaymentMethod","stripe","nameOnCard","stripeData","createPaymentMethod","card","cardNumber","billing_details","addedMethod","loadStripe","stripeKey","addBankAccount","nextContributionDate","availableBalance","gracePeriodDate","balance","cardId","expirationDate","_","can_remove"],"sourceRoot":""}