You can find lots of information on how to set and read a JS cookie on Google.
The first time you should check if a cookie exists is probably on line 86, this is where we have determined a map exists on the page and the map is initialized. If a cookie exists then you can set the input field to the value from the cookie.
Storing the last made search for the user is probably best done directly after the user clicked the search button. This happens inside this function.
You can check the user input just before ‘return false’ ( line 645 ), and saved the entered input in a cookie for later user.
After you have made the changes you will need to minify the JS file, and save it as wpsl-gmap.min.js in the same folder as the wpsl-gmap.js.
The above is untested, but it should work.