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hooks/usePredictiveSearch.js","webpack://_N_E/./js/config/state.js","webpack://_N_E/./js/helpers/cart.js","webpack://_N_E/./js/utils/filters.js","webpack://_N_E/./js/utils/validators.js","webpack://_N_E/./components/blocks/ServiceCheckForm/index.module.css"],"sourcesContent":["/**\n * @module ServiceCheckForm\n * @description Service Check Form\n */\nimport {\n useState, useRef, useEffect, useContext\n} from 'react';\nimport debounce from 'lodash/debounce';\nimport { usePredictiveSearch } from '@/hooks/usePredictiveSearch';\nimport { isValidAddressInput } from '@/js/utils/validators';\nimport { stringify } from '@/js/utils/filters';\nimport { trackEvent } from '@/js/helpers/tracking';\nimport state from '@/js/config/state';\nimport { v4 as uuidv4 } from 'uuid';\nimport styles from './index.module.css';\nimport { FuelContext } from '@/providers/fuel-provider';\n\nconst formContext = {\n formType: 'SERVICE CHECK - SINGLE LINE',\n formName: 'SERVICE CHECK - SINGLE LINE'\n};\n\n/**\n * @function Component\n * @description\n */\nconst Component = ( { ...props } ) => {\n const { theme, isHero, isGdtCta = false } = props;\n const [ addressValid, setAddressValid ] = useState( false );\n const [ addressError, setAddressError ] = useState( false );\n const [ suggestions, setSuggestions ] = useState( [ ] );\n const [ addressObject, setAddressObject ] = useState( { } );\n const [ formStarted, setFormStarted ] = useState( false );\n const [ addressKey, setAddressKey ] = useState( false );\n const [ placeholderText, setPlaceholderText ] = useState( 'Enter your address.' );\n const id = uuidv4();\n\n const addressField = useRef( null );\n const honeyPotField = useRef( null );\n\n const predictive = usePredictiveSearch( { addressField, honeyPotField }, setSuggestions, formContext );\n\n const { setFormInputted } = useContext( FuelContext );\n\n /**\n * @function setSuggestionValue\n * @description Set suggestion value on address and zip\n */\n const setSuggestionValue = async ( event ) => {\n const { address, addressData } = await predictive.setSuggestionValue( event );\n\n setAddressValid( isValidAddressInput( address ) );\n setAddressError( ! isValidAddressInput( address ) );\n setAddressObject( addressData );\n setAddressKey( true );\n };\n\n /**\n * @function fetchAddress\n * @description Fetch our address suggestions\n */\n const fetchAddress = async ( event ) => {\n if ( ! formStarted ) {\n trackEvent( { action: 'formStarted', data: formContext } );\n setFormStarted( true );\n }\n\n predictive.fetchAddress( event );\n setFormInputted( true );\n };\n\n /**\n * @function handleResize\n * @description Update placeholder text if viewport changes\n */\n const handleResize = () => {\n if ( state.is_desktop ) {\n return setPlaceholderText( 'Enter your address to view plans in your area.' );\n }\n\n setPlaceholderText( 'Enter your address.' );\n };\n\n /**\n * @function useEffect\n * @description Set our placeholder, then attach viewport resize event\n */\n useEffect( () => {\n handleResize();\n document.addEventListener( 'redventures/resize_executed', handleResize );\n }, [] );\n\n return (\n