Socket
Socket
Sign inDemoInstall

react-geosuggest

Package Overview
Dependencies
23
Maintainers
3
Versions
64
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.4.0 to 2.5.0

.nyc_output/53557.json

8

CHANGELOG.md

@@ -0,1 +1,9 @@

## 2.5.0 (2017-08-17)
#### Features
* **filters:** Add autoCapitalize and autoCorrect to filters ([ff1153c2](https://github.com/ubilabs/react-geosuggest/commit/ff1153c27b18cd7d7b551e304a26d4ac5ff0d63d))
## 2.4.0 (2017-08-10)

@@ -2,0 +10,0 @@

2

dist/react-geosuggest.min.js

@@ -1,1 +0,1 @@

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Geosuggest=e()}}(function(){return function e(t,n,r){function o(i,u){if(!n[i]){if(!t[i]){var a="function"==typeof require&&require;if(!u&&a)return a(i,!0);if(s)return s(i,!0);var l=new Error("Cannot find module '"+i+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[i]={exports:{}};t[i][0].call(c.exports,function(e){var n=t[i][1][e];return o(n||e)},c,c.exports,e,t,n,r)}return n[i].exports}for(var s="function"==typeof require&&require,i=0;i<r.length;i++)o(r[i]);return o}({1:[function(e,t,n){!function(){"use strict";function e(){for(var t=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var s=typeof o;if("string"===s||"number"===s)t.push(o);else if(Array.isArray(o))t.push(e.apply(null,o));else if("object"===s)for(var i in o)n.call(o,i)&&o[i]&&t.push(i)}}return t.join(" ")}var n={}.hasOwnProperty;void 0!==t&&t.exports?t.exports=e:window.classNames=e}()},{}],2:[function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!==e&&t!==t}function o(e,t){if(r(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(var i=0;i<n.length;i++)if(!s.call(t,n[i])||!r(e[n[i]],t[n[i]]))return!1;return!0}var s=Object.prototype.hasOwnProperty;t.exports=o},{}],3:[function(e,t,n){(function(e){function n(e,t,n){function o(t){var n=h,r=y;return h=y=void 0,T=t,b=e.apply(r,n)}function s(e){return T=e,O=setTimeout(c,t),j?o(e):b}function a(e){var n=e-T,r=t-(e-_);return I?S(r,v-n):r}function l(e){var n=e-_,r=e-T;return void 0===_||n>=t||n<0||I&&r>=v}function c(){var e=w();if(l(e))return f(e);O=setTimeout(c,a(e))}function f(e){return O=void 0,N&&h?o(e):(h=y=void 0,b)}function p(){void 0!==O&&clearTimeout(O),T=0,h=_=y=O=void 0}function g(){return void 0===O?b:f(w())}function d(){var e=w(),n=l(e);if(h=arguments,y=this,_=e,n){if(void 0===O)return s(_);if(I)return O=setTimeout(c,t),o(_)}return void 0===O&&(O=setTimeout(c,t)),b}var h,y,v,b,O,_,T=0,j=!1,I=!1,N=!0;if("function"!=typeof e)throw new TypeError(u);return t=i(t)||0,r(n)&&(j=!!n.leading,v=(I="maxWait"in n)?m(i(n.maxWait)||0,t):v,N="trailing"in n?!!n.trailing:N),d.cancel=p,d.flush=g,d}function r(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function o(e){return!!e&&"object"==typeof e}function s(e){return"symbol"==typeof e||o(e)&&b.call(e)==l}function i(e){if("number"==typeof e)return e;if(s(e))return a;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(c,"");var n=p.test(e);return n||g.test(e)?d(e.slice(2),n?2:8):f.test(e)?a:+e}var u="Expected a function",a=NaN,l="[object Symbol]",c=/^\s+|\s+$/g,f=/^[-+]0x[0-9a-f]+$/i,p=/^0b[01]+$/i,g=/^0o[0-7]+$/i,d=parseInt,h="object"==typeof e&&e&&e.Object===Object&&e,y="object"==typeof self&&self&&self.Object===Object&&self,v=h||y||Function("return this")(),b=Object.prototype.toString,m=Math.max,S=Math.min,w=function(){return v.Date.now()};t.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(e,t,n){function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(f===setTimeout)return setTimeout(e,0);if((f===r||!f)&&setTimeout)return f=setTimeout,setTimeout(e,0);try{return f(e,0)}catch(t){try{return f.call(null,e,0)}catch(t){return f.call(this,e,0)}}}function i(e){if(p===clearTimeout)return clearTimeout(e);if((p===o||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function u(){y&&d&&(y=!1,d.length?h=d.concat(h):v=-1,h.length&&a())}function a(){if(!y){var e=s(u);y=!0;for(var t=h.length;t;){for(d=h,h=[];++v<t;)d&&d[v].run();v=-1,t=h.length}d=null,y=!1,i(e)}}function l(e,t){this.fun=e,this.array=t}function c(){}var f,p,g=t.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:r}catch(e){f=r}try{p="function"==typeof clearTimeout?clearTimeout:o}catch(e){p=o}}();var d,h=[],y=!1,v=-1;g.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.push(new l(e,t)),1!==h.length||y||s(a)},l.prototype.run=function(){this.fun.apply(null,this.array)},g.title="browser",g.browser=!0,g.env={},g.argv=[],g.version="",g.versions={},g.on=c,g.addListener=c,g.once=c,g.off=c,g.removeListener=c,g.removeAllListeners=c,g.emit=c,g.binding=function(e){throw new Error("process.binding is not supported")},g.cwd=function(){return"/"},g.chdir=function(e){throw new Error("process.chdir is not supported")},g.umask=function(){return 0}},{}],5:[function(e,t,n){(function(n){"use strict";function r(e,t,r,a,l){if("production"!==n.env.NODE_ENV)for(var c in e)if(e.hasOwnProperty(c)){var f;try{o("function"==typeof e[c],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",a||"React class",r,c),f=e[c](t,c,a,r,null,i)}catch(e){f=e}if(s(!f||f instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",a||"React class",r,c,typeof f),f instanceof Error&&!(f.message in u)){u[f.message]=!0;var p=l?l():"";s(!1,"Failed %s type: %s%s",r,f.message,null!=p?p:"")}}}if("production"!==n.env.NODE_ENV)var o=e("fbjs/lib/invariant"),s=e("fbjs/lib/warning"),i=e("./lib/ReactPropTypesSecret"),u={};t.exports=r}).call(this,e("_process"))},{"./lib/ReactPropTypesSecret":9,_process:4,"fbjs/lib/invariant":11,"fbjs/lib/warning":12}],6:[function(e,t,n){"use strict";var r=e("fbjs/lib/emptyFunction"),o=e("fbjs/lib/invariant"),s=e("./lib/ReactPropTypesSecret");t.exports=function(){function e(e,t,n,r,i,u){u!==s&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return n.checkPropTypes=r,n.PropTypes=n,n}},{"./lib/ReactPropTypesSecret":9,"fbjs/lib/emptyFunction":10,"fbjs/lib/invariant":11}],7:[function(e,t,n){(function(n){"use strict";var r=e("fbjs/lib/emptyFunction"),o=e("fbjs/lib/invariant"),s=e("fbjs/lib/warning"),i=e("./lib/ReactPropTypesSecret"),u=e("./checkPropTypes");t.exports=function(e,t){function a(e){var t=e&&(j&&e[j]||e[I]);if("function"==typeof t)return t}function l(e,t){return e===t?0!==e||1/e==1/t:e!==e&&t!==t}function c(e){this.message=e,this.stack=""}function f(e){function r(r,l,f,p,g,d,h){if(p=p||N,d=d||f,h!==i)if(t)o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else if("production"!==n.env.NODE_ENV&&"undefined"!=typeof console){var y=p+":"+f;!u[y]&&a<3&&(s(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",d,p),u[y]=!0,a++)}return null==l[f]?r?new c(null===l[f]?"The "+g+" `"+d+"` is marked as required in `"+p+"`, but its value is `null`.":"The "+g+" `"+d+"` is marked as required in `"+p+"`, but its value is `undefined`."):null:e(l,f,p,g,d)}if("production"!==n.env.NODE_ENV)var u={},a=0;var l=r.bind(null,!1);return l.isRequired=r.bind(null,!0),l}function p(e){function t(t,n,r,o,s,i){var u=t[n];return w(u)!==e?new c("Invalid "+o+" `"+s+"` of type `"+O(u)+"` supplied to `"+r+"`, expected `"+e+"`."):null}return f(t)}function g(e){function t(t,n,r,o,s){if("function"!=typeof e)return new c("Property `"+s+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=t[n];if(!Array.isArray(u))return new c("Invalid "+o+" `"+s+"` of type `"+w(u)+"` supplied to `"+r+"`, expected an array.");for(var a=0;a<u.length;a++){var l=e(u,a,r,o,s+"["+a+"]",i);if(l instanceof Error)return l}return null}return f(t)}function d(e){function t(t,n,r,o,s){if(!(t[n]instanceof e)){var i=e.name||N;return new c("Invalid "+o+" `"+s+"` of type `"+T(t[n])+"` supplied to `"+r+"`, expected instance of `"+i+"`.")}return null}return f(t)}function h(e){function t(t,n,r,o,s){for(var i=t[n],u=0;u<e.length;u++)if(l(i,e[u]))return null;return new c("Invalid "+o+" `"+s+"` of value `"+i+"` supplied to `"+r+"`, expected one of "+JSON.stringify(e)+".")}return Array.isArray(e)?f(t):("production"!==n.env.NODE_ENV&&s(!1,"Invalid argument supplied to oneOf, expected an instance of array."),r.thatReturnsNull)}function y(e){function t(t,n,r,o,s){if("function"!=typeof e)return new c("Property `"+s+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=t[n],a=w(u);if("object"!==a)return new c("Invalid "+o+" `"+s+"` of type `"+a+"` supplied to `"+r+"`, expected an object.");for(var l in u)if(u.hasOwnProperty(l)){var f=e(u,l,r,o,s+"."+l,i);if(f instanceof Error)return f}return null}return f(t)}function v(e){function t(t,n,r,o,s){for(var u=0;u<e.length;u++)if(null==(0,e[u])(t,n,r,o,s,i))return null;return new c("Invalid "+o+" `"+s+"` supplied to `"+r+"`.")}if(!Array.isArray(e))return"production"!==n.env.NODE_ENV&&s(!1,"Invalid argument supplied to oneOfType, expected an instance of array."),r.thatReturnsNull;for(var o=0;o<e.length;o++){var u=e[o];if("function"!=typeof u)return s(!1,"Invalid argument supplid to oneOfType. Expected an array of check functions, but received %s at index %s.",_(u),o),r.thatReturnsNull}return f(t)}function b(e){function t(t,n,r,o,s){var u=t[n],a=w(u);if("object"!==a)return new c("Invalid "+o+" `"+s+"` of type `"+a+"` supplied to `"+r+"`, expected `object`.");for(var l in e){var f=e[l];if(f){var p=f(u,l,r,o,s+"."+l,i);if(p)return p}}return null}return f(t)}function m(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(m);if(null===t||e(t))return!0;var n=a(t);if(!n)return!1;var r,o=n.call(t);if(n!==t.entries){for(;!(r=o.next()).done;)if(!m(r.value))return!1}else for(;!(r=o.next()).done;){var s=r.value;if(s&&!m(s[1]))return!1}return!0;default:return!1}}function S(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}function w(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":S(t,e)?"symbol":t}function O(e){if(void 0===e||null===e)return""+e;var t=w(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function _(e){var t=O(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}function T(e){return e.constructor&&e.constructor.name?e.constructor.name:N}var j="function"==typeof Symbol&&Symbol.iterator,I="@@iterator",N="<<anonymous>>",E={array:p("array"),bool:p("boolean"),func:p("function"),number:p("number"),object:p("object"),string:p("string"),symbol:p("symbol"),any:function(){return f(r.thatReturnsNull)}(),arrayOf:g,element:function(){function t(t,n,r,o,s){var i=t[n];return e(i)?null:new c("Invalid "+o+" `"+s+"` of type `"+w(i)+"` supplied to `"+r+"`, expected a single ReactElement.")}return f(t)}(),instanceOf:d,node:function(){function e(e,t,n,r,o){return m(e[t])?null:new c("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")}return f(e)}(),objectOf:y,oneOf:h,oneOfType:v,shape:b};return c.prototype=Error.prototype,E.checkPropTypes=u,E.PropTypes=E,E}}).call(this,e("_process"))},{"./checkPropTypes":5,"./lib/ReactPropTypesSecret":9,_process:4,"fbjs/lib/emptyFunction":10,"fbjs/lib/invariant":11,"fbjs/lib/warning":12}],8:[function(e,t,n){(function(n){if("production"!==n.env.NODE_ENV){var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,o=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r};t.exports=e("./factoryWithTypeCheckers")(o,!0)}else t.exports=e("./factoryWithThrowingShims")()}).call(this,e("_process"))},{"./factoryWithThrowingShims":6,"./factoryWithTypeCheckers":7,_process:4}],9:[function(e,t,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},{}],10:[function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},t.exports=o},{}],11:[function(e,t,n){(function(e){"use strict";function n(e,t,n,o,s,i,u,a){if(r(t),!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,o,s,i,u,a],f=0;(l=new Error(t.replace(/%s/g,function(){return c[f++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}}var r=function(e){};"production"!==e.env.NODE_ENV&&(r=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")}),t.exports=n}).call(this,e("_process"))},{_process:4}],12:[function(e,t,n){(function(n){"use strict";var r=e("./emptyFunction");"production"!==n.env.NODE_ENV&&function(){var e=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0,s="Warning: "+e.replace(/%s/g,function(){return n[o++]});try{throw new Error(s)}catch(e){}};r=function(t,n){if(void 0===n)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==n.indexOf("Failed Composite propType: ")&&!t){for(var r=arguments.length,o=Array(r>2?r-2:0),s=2;s<r;s++)o[s-2]=arguments[s];e.apply(void 0,[n].concat(o))}}}(),t.exports=r}).call(this,e("_process"))},{"./emptyFunction":10,_process:4}],13:[function(e,t,n){"use strict";function r(e,t,n){return!o(e.props,t)||!o(e.state,n)}var o=e("fbjs/lib/shallowEqual");t.exports=r},{"fbjs/lib/shallowEqual":2}],14:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}Object.defineProperty(n,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=r(window.React),p=r(e("classnames")),g=r(e("lodash.debounce")),d=r(e("./defaults")),h=r(e("./prop-types")),y=r(e("./filter-input-attributes")),v=r(e("./input")),b=r(e("./suggest-list")),m=function(e){function t(e){o(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.onInputChange=function(e){n.setState({userInput:e},n.onAfterInputChange)},n.onAfterInputChange=function(){n.state.isSuggestsHidden||n.showSuggests(),n.props.onChange(n.state.userInput)},n.onInputFocus=function(){n.props.onFocus(),n.showSuggests()},n.onInputBlur=function(){n.state.ignoreBlur||n.hideSuggests()},n.onNext=function(){return n.activateSuggest("next")},n.onPrev=function(){return n.activateSuggest("prev")},n.onSelect=function(){return n.selectSuggest(n.state.activeSuggest)},n.onSuggestMouseDown=function(){return n.setState({ignoreBlur:!0})},n.onSuggestMouseOut=function(){return n.setState({ignoreBlur:!1})},n.onSuggestNoResults=function(){n.props.onSuggestNoResults(n.state.userInput)},n.hideSuggests=function(){n.props.onBlur(n.state.userInput),n.timer=setTimeout(function(){n.setState({isSuggestsHidden:!0,activeSuggest:null})},100)},n.selectSuggest=function(e){if(e||(e={label:n.state.userInput}),n.setState({isSuggestsHidden:!0,userInput:"object"!==l(e.label)?e.label:e.description}),e.location)return n.setState({ignoreBlur:!1}),void n.props.onSuggestSelect(e);n.geocodeSuggest(e)},n.state={isSuggestsHidden:!0,isLoading:!1,userInput:e.initialValue,activeSuggest:null,suggests:[]},n.onInputChange=n.onInputChange.bind(n),n.onAfterInputChange=n.onAfterInputChange.bind(n),e.queryDelay&&(n.onAfterInputChange=(0,g.default)(n.onAfterInputChange,e.queryDelay)),n}return i(t,e),c(t,[{key:"componentWillReceiveProps",value:function(e){this.props.initialValue!==e.initialValue&&this.setState({userInput:e.initialValue})}},{key:"componentWillMount",value:function(){if("undefined"!=typeof window){var e=this.props.googleMaps||window.google&&window.google.maps||this.googleMaps;e?(this.googleMaps=e,this.autocompleteService=new e.places.AutocompleteService,this.geocoder=new e.Geocoder):console}}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timer)}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"update",value:function(e){this.setState({userInput:e}),this.props.onChange(e)}},{key:"clear",value:function(){this.setState({userInput:""},this.hideSuggests)}},{key:"searchSuggests",value:function(){var e=this;if(this.state.userInput){var t={input:this.state.userInput};this.state.userInput.length<this.props.minLength||(["location","radius","bounds","types"].forEach(function(n){e.props[n]&&(t[n]=e.props[n])}),this.props.country&&(t.componentRestrictions={country:this.props.country}),this.setState({isLoading:!0},function(){e.autocompleteService.getPlacePredictions(t,function(t){e.setState({isLoading:!1}),e.updateSuggests(t||[],function(){e.props.autoActivateFirstSuggest&&!e.state.activeSuggest&&e.activateSuggest("next")})})}))}else this.updateSuggests()}},{key:"updateSuggests",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments[1],r=[],o=this.state.userInput,s=new RegExp(u(o),"gim"),i=this.props.skipSuggest,a=this.props.maxFixtures,l=0,c=null;this.props.fixtures.forEach(function(e){l>=a||!i(e)&&e.label.match(s)&&(l++,e.placeId=e.label,e.isFixture=!0,e.matchedSubstrings={offset:e.label.indexOf(o),length:o.length},r.push(e))}),t.forEach(function(t){i(t)||r.push({description:t.description,label:e.props.getSuggestLabel(t),placeId:t.place_id,isFixture:!1,matchedSubstrings:t.matched_substrings[0]})}),c=this.updateActiveSuggest(r),this.setState({suggests:r,activeSuggest:c},n)}},{key:"updateActiveSuggest",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=this.state.activeSuggest;if(t){var n=e.filter(function(e){return t.placeId===e.placeId&&t.isFixture===e.isFixture})[0];t=n||null}return t}},{key:"showSuggests",value:function(){this.searchSuggests(),this.setState({isSuggestsHidden:!1})}},{key:"activateSuggest",value:function(e){if(this.state.isSuggestsHidden)this.showSuggests();else{var t=this.state.suggests.length-1,n="next"===e,r=null,o=0,s=0;for(s;s<=t;s++)this.state.suggests[s]===this.state.activeSuggest&&(o=n?s+1:s-1);this.state.activeSuggest||(o=n?0:t),o>=0&&o<=t&&(r=this.state.suggests[o]),this.props.onActivateSuggest(r),this.setState({activeSuggest:r})}}},{key:"geocodeSuggest",value:function(e){var t=this,n=null;n=e.placeId&&!e.isFixture?{placeId:e.placeId}:{address:e.label,location:this.props.location,bounds:this.props.bounds,componentRestrictions:this.props.country?{country:this.props.country}:null},this.geocoder.geocode(n,function(n,r){if(r===t.googleMaps.GeocoderStatus.OK){var o=n[0],s=o.geometry.location;e.gmaps=o,e.location={lat:s.lat(),lng:s.lng()}}t.props.onSuggestSelect(e)})}},{key:"render",value:function(){var e=this,t=(0,y.default)(this.props),n=(0,p.default)("geosuggest",this.props.className,{"geosuggest--loading":this.state.isLoading}),r=this.props.label&&t.id,o=f.default.createElement(v.default,a({className:this.props.inputClassName,ref:function(t){return e.input=t},value:this.state.userInput,ignoreEnter:!this.state.isSuggestsHidden,ignoreTab:this.props.ignoreTab,style:this.props.style.input,onChange:this.onInputChange,onFocus:this.onInputFocus,onBlur:this.onInputBlur,onKeyDown:this.props.onKeyDown,onKeyPress:this.props.onKeyPress,onNext:this.onNext,onPrev:this.onPrev,onSelect:this.onSelect,onEscape:this.hideSuggests},t)),s=f.default.createElement(b.default,{isHidden:this.state.isSuggestsHidden,style:this.props.style.suggests,suggestItemStyle:this.props.style.suggestItem,userInput:this.state.userInput,isHighlightMatch:this.props.highlightMatch,suggestsClassName:this.props.suggestsClassName,suggestItemClassName:this.props.suggestItemClassName,suggests:this.state.suggests,hiddenClassName:this.props.suggestsHiddenClassName,suggestItemActiveClassName:this.props.suggestItemActiveClassName,activeSuggest:this.state.activeSuggest,onSuggestNoResults:this.onSuggestNoResults,onSuggestMouseDown:this.onSuggestMouseDown,onSuggestMouseOut:this.onSuggestMouseOut,onSuggestSelect:this.selectSuggest,renderSuggestItem:this.props.renderSuggestItem,minLength:this.props.minLength});return f.default.createElement("div",{className:n},f.default.createElement("div",{className:"geosuggest__input-wrapper"},r&&f.default.createElement("label",{className:"geosuggest__label",htmlFor:t.id},this.props.label),o),f.default.createElement("div",{className:"geosuggest__suggests-wrapper"},s))}}]),t}(f.default.Component);m.propTypes=h.default,m.defaultProps=d.default,n.default=m},{"./defaults":15,"./filter-input-attributes":16,"./input":17,"./prop-types":18,"./suggest-list":20,classnames:1,"lodash.debounce":3}],15:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default={fixtures:[],maxFixtures:10,initialValue:"",placeholder:"Search places",disabled:!1,className:"",inputClassName:"",location:null,radius:null,bounds:null,country:null,types:null,queryDelay:250,googleMaps:null,highlightMatch:!0,onActivateSuggest:function(){},onSuggestSelect:function(){},onSuggestNoResults:function(){},onFocus:function(){},onBlur:function(){},onChange:function(){},skipSuggest:function(){},getSuggestLabel:function(e){return e.description},renderSuggestItem:null,autoActivateFirstSuggest:!1,style:{input:{},suggests:{},suggestItem:{}},ignoreTab:!1,minLength:1}},{}],16:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){var t={};return r.forEach(function(n){e[n]&&(t[n]=e[n])}),t};var r=["autoFocus","autoComplete","disabled","form","formAction","formEncType","formMethod","formNoValidate","formTarget","height","id","inputMode","maxLength","name","onClick","onContextMenu","onCopy","onCut","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onPaste","pattern","placeholder","readOnly","required","size","spellCheck","tabIndex","aria-atomic","aria-busy","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-dropeffect","aria-errormessage","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-live","aria-owns","aria-relevant","aria-roledescription","aria-activedescendant","aria-autocomplete","aria-multiline","aria-placeholder","aria-readonly","aria-required"]},{}],17:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=r(window.React),c=r(e("react-addons-shallow-compare")),f=r(e("classnames")),p=r(e("./filter-input-attributes")),g=function(e){function t(){var e,n,r,i;o(this,t);for(var u=arguments.length,a=Array(u),l=0;l<u;l++)a[l]=arguments[l];return n=r=s(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.onChange=function(){r.props.onChange(r.input.value)},r.onFocus=function(){r.props.onFocus()},r.onBlur=function(){r.props.onBlur()},r.onKeyPress=function(e){r.props.onKeyPress(e)},r.onInputKeyDown=function(e){switch(r.props.onKeyDown&&r.props.onKeyDown(e),e.which){case 40:e.shiftKey||(e.preventDefault(),r.props.onNext());break;case 38:e.shiftKey||(e.preventDefault(),r.props.onPrev());break;case 13:r.props.ignoreEnter&&e.preventDefault(),r.props.onSelect();break;case 9:r.props.ignoreTab||r.props.onSelect();break;case 27:r.props.onEscape()}},i=n,s(r,i)}return i(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,c.default)(this,e,t)}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"render",value:function(){var e=this,t=(0,p.default)(this.props),n=(0,f.default)("geosuggest__input",this.props.className);return l.default.createElement("input",u({className:n,ref:function(t){return e.input=t},type:"text"},t,{value:this.props.value,style:this.props.style,onKeyDown:this.onInputKeyDown,onChange:this.onChange,onKeyPress:this.onKeyPress,onFocus:this.onFocus,onBlur:this.onBlur}))}}]),t}(l.default.Component);g.defaultProps={className:"",value:"",ignoreTab:!1,onKeyDown:function(){},onKeyPress:function(){},autoComplete:"off"},n.default=g},{"./filter-input-attributes":16,classnames:1,"react-addons-shallow-compare":13}],18:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function(e){return e&&e.__esModule?e:{default:e}}(e("prop-types"));n.default={fixtures:r.default.array,maxFixtures:r.default.number,initialValue:r.default.string,placeholder:r.default.string,disabled:r.default.bool,className:r.default.string,inputClassName:r.default.string,suggestsClassName:r.default.string,suggestsHiddenClassName:r.default.string,suggestItemClassName:r.default.string,suggestItemActiveClassName:r.default.string,location:r.default.object,radius:r.default.oneOfType([r.default.string,r.default.number]),bounds:r.default.object,country:r.default.oneOfType([r.default.string,r.default.array]),types:r.default.array,queryDelay:r.default.number,googleMaps:r.default.object,highlightMatch:r.default.bool,onSuggestSelect:r.default.func,onFocus:r.default.func,onBlur:r.default.func,onChange:r.default.func,onKeyPress:r.default.func,skipSuggest:r.default.func,getSuggestLabel:r.default.func,renderSuggestItem:r.default.func,autoActivateFirstSuggest:r.default.bool,style:r.default.shape({input:r.default.object,suggests:r.default.object,suggestItem:r.default.object}),ignoreTab:r.default.bool,label:r.default.string,autoComplete:r.default.string,minLength:r.default.number}},{"prop-types":8}],19:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=r(window.React),c=r(e("classnames")),f=function(e){function t(){var e,n,r,o;s(this,t);for(var u=arguments.length,a=Array(u),l=0;l<u;l++)a[l]=arguments[l];return n=r=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.onClick=function(e){e.preventDefault(),r.props.onSelect(r.props.suggest)},o=n,i(r,o)}return u(t,e),a(t,[{key:"makeBold",value:function(e,t){return l.default.createElement("b",{className:"geosuggest__item__matched-text",key:t},e)}},{key:"formatMatchedText",value:function(e,t){if(!e||!t.matchedSubstrings)return t.label;var n=t.matchedSubstrings.offset,r=n+t.matchedSubstrings.length,o=this.makeBold(t.label.substring(n,r),t.label),s="",i="";return n>0&&(s=t.label.slice(0,n)),r<t.label.length&&(i=t.label.slice(r)),l.default.createElement("span",null,s,o,i)}},{key:"componentWillReceiveProps",value:function(e){e.isActive&&!this.props.isActive&&this.scrollIfNeeded()}},{key:"scrollIfNeeded",value:function(){var e=this.ref,t=e.parentElement,n=e.offsetTop-t.offsetTop<t.scrollTop,r=e.offsetTop-t.offsetTop+e.clientHeight>t.scrollTop+t.clientHeight;(n||r)&&(t.scrollTop=e.offsetTop-t.offsetTop-t.clientHeight/2+e.clientHeight/2)}},{key:"render",value:function(){var e=this,t=this.props.suggest,n=(0,c.default)("geosuggest__item",this.props.className,this.props.suggestItemClassName,{"geosuggest__item--active":this.props.isActive},o({},this.props.activeClassname,this.props.activeClassname?this.props.isActive:null)),r=t.label;return this.props.renderSuggestItem?r=this.props.renderSuggestItem(t):this.props.isHighlightMatch&&(r=this.formatMatchedText(this.props.userInput,t)),l.default.createElement("li",{className:n,ref:function(t){return e.ref=t},style:this.props.style,onMouseDown:this.props.onMouseDown,onMouseOut:this.props.onMouseOut,onClick:this.onClick},r)}}]),t}(l.default.Component);n.default=f,f.defaultProps={isActive:!1,className:"",suggest:{}}},{classnames:1}],20:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=r(window.React),c=r(e("react-addons-shallow-compare")),f=r(e("classnames")),p=r(e("./suggest-item")),g=function(e){function t(){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,c.default)(this,e,t)}},{key:"isHidden",value:function(){return this.props.isHidden||0===this.props.suggests.length}},{key:"componentWillReceiveProps",value:function(e){e.suggests!==this.props.suggests&&0===e.suggests.length&&this.props.onSuggestNoResults()}},{key:"render",value:function(){var e=this,t=(0,f.default)("geosuggest__suggests",this.props.suggestsClassName,{"geosuggest__suggests--hidden":this.isHidden()},o({},this.props.hiddenClassName,this.props.hiddenClassName?this.isHidden():null));return l.default.createElement("ul",{className:t,style:this.props.style},this.props.suggests.map(function(t){var n=e.props.activeSuggest&&t.placeId===e.props.activeSuggest.placeId,r=t.key||t.placeId;return l.default.createElement(p.default,{key:r,className:t.className,userInput:e.props.userInput,isHighlightMatch:e.props.isHighlightMatch,suggest:t,style:e.props.suggestItemStyle,suggestItemClassName:e.props.suggestItemClassName,isActive:n,activeClassname:e.props.suggestItemActiveClassName,onMouseDown:e.props.onSuggestMouseDown,onMouseOut:e.props.onSuggestMouseOut,onSelect:e.props.onSuggestSelect,renderSuggestItem:e.props.renderSuggestItem})}))}}]),t}(l.default.Component);n.default=g,g.defaultProps={isHidden:!0,suggests:[]}},{"./suggest-item":19,classnames:1,"react-addons-shallow-compare":13}]},{},[14])(14)});
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Geosuggest=e()}}(function(){return function e(t,n,r){function o(i,u){if(!n[i]){if(!t[i]){var a="function"==typeof require&&require;if(!u&&a)return a(i,!0);if(s)return s(i,!0);var l=new Error("Cannot find module '"+i+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[i]={exports:{}};t[i][0].call(c.exports,function(e){var n=t[i][1][e];return o(n||e)},c,c.exports,e,t,n,r)}return n[i].exports}for(var s="function"==typeof require&&require,i=0;i<r.length;i++)o(r[i]);return o}({1:[function(e,t,n){!function(){"use strict";function e(){for(var t=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var s=typeof o;if("string"===s||"number"===s)t.push(o);else if(Array.isArray(o))t.push(e.apply(null,o));else if("object"===s)for(var i in o)n.call(o,i)&&o[i]&&t.push(i)}}return t.join(" ")}var n={}.hasOwnProperty;void 0!==t&&t.exports?t.exports=e:window.classNames=e}()},{}],2:[function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!==e&&t!==t}function o(e,t){if(r(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(var i=0;i<n.length;i++)if(!s.call(t,n[i])||!r(e[n[i]],t[n[i]]))return!1;return!0}var s=Object.prototype.hasOwnProperty;t.exports=o},{}],3:[function(e,t,n){(function(e){function n(e,t,n){function o(t){var n=h,r=y;return h=y=void 0,T=t,b=e.apply(r,n)}function s(e){return T=e,O=setTimeout(c,t),j?o(e):b}function a(e){var n=e-T,r=t-(e-_);return I?S(r,v-n):r}function l(e){var n=e-_,r=e-T;return void 0===_||n>=t||n<0||I&&r>=v}function c(){var e=w();if(l(e))return f(e);O=setTimeout(c,a(e))}function f(e){return O=void 0,N&&h?o(e):(h=y=void 0,b)}function p(){void 0!==O&&clearTimeout(O),T=0,h=_=y=O=void 0}function g(){return void 0===O?b:f(w())}function d(){var e=w(),n=l(e);if(h=arguments,y=this,_=e,n){if(void 0===O)return s(_);if(I)return O=setTimeout(c,t),o(_)}return void 0===O&&(O=setTimeout(c,t)),b}var h,y,v,b,O,_,T=0,j=!1,I=!1,N=!0;if("function"!=typeof e)throw new TypeError(u);return t=i(t)||0,r(n)&&(j=!!n.leading,v=(I="maxWait"in n)?m(i(n.maxWait)||0,t):v,N="trailing"in n?!!n.trailing:N),d.cancel=p,d.flush=g,d}function r(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function o(e){return!!e&&"object"==typeof e}function s(e){return"symbol"==typeof e||o(e)&&b.call(e)==l}function i(e){if("number"==typeof e)return e;if(s(e))return a;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(c,"");var n=p.test(e);return n||g.test(e)?d(e.slice(2),n?2:8):f.test(e)?a:+e}var u="Expected a function",a=NaN,l="[object Symbol]",c=/^\s+|\s+$/g,f=/^[-+]0x[0-9a-f]+$/i,p=/^0b[01]+$/i,g=/^0o[0-7]+$/i,d=parseInt,h="object"==typeof e&&e&&e.Object===Object&&e,y="object"==typeof self&&self&&self.Object===Object&&self,v=h||y||Function("return this")(),b=Object.prototype.toString,m=Math.max,S=Math.min,w=function(){return v.Date.now()};t.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(e,t,n){function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(f===setTimeout)return setTimeout(e,0);if((f===r||!f)&&setTimeout)return f=setTimeout,setTimeout(e,0);try{return f(e,0)}catch(t){try{return f.call(null,e,0)}catch(t){return f.call(this,e,0)}}}function i(e){if(p===clearTimeout)return clearTimeout(e);if((p===o||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function u(){y&&d&&(y=!1,d.length?h=d.concat(h):v=-1,h.length&&a())}function a(){if(!y){var e=s(u);y=!0;for(var t=h.length;t;){for(d=h,h=[];++v<t;)d&&d[v].run();v=-1,t=h.length}d=null,y=!1,i(e)}}function l(e,t){this.fun=e,this.array=t}function c(){}var f,p,g=t.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:r}catch(e){f=r}try{p="function"==typeof clearTimeout?clearTimeout:o}catch(e){p=o}}();var d,h=[],y=!1,v=-1;g.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.push(new l(e,t)),1!==h.length||y||s(a)},l.prototype.run=function(){this.fun.apply(null,this.array)},g.title="browser",g.browser=!0,g.env={},g.argv=[],g.version="",g.versions={},g.on=c,g.addListener=c,g.once=c,g.off=c,g.removeListener=c,g.removeAllListeners=c,g.emit=c,g.binding=function(e){throw new Error("process.binding is not supported")},g.cwd=function(){return"/"},g.chdir=function(e){throw new Error("process.chdir is not supported")},g.umask=function(){return 0}},{}],5:[function(e,t,n){(function(n){"use strict";function r(e,t,r,a,l){if("production"!==n.env.NODE_ENV)for(var c in e)if(e.hasOwnProperty(c)){var f;try{o("function"==typeof e[c],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",a||"React class",r,c),f=e[c](t,c,a,r,null,i)}catch(e){f=e}if(s(!f||f instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",a||"React class",r,c,typeof f),f instanceof Error&&!(f.message in u)){u[f.message]=!0;var p=l?l():"";s(!1,"Failed %s type: %s%s",r,f.message,null!=p?p:"")}}}if("production"!==n.env.NODE_ENV)var o=e("fbjs/lib/invariant"),s=e("fbjs/lib/warning"),i=e("./lib/ReactPropTypesSecret"),u={};t.exports=r}).call(this,e("_process"))},{"./lib/ReactPropTypesSecret":9,_process:4,"fbjs/lib/invariant":11,"fbjs/lib/warning":12}],6:[function(e,t,n){"use strict";var r=e("fbjs/lib/emptyFunction"),o=e("fbjs/lib/invariant"),s=e("./lib/ReactPropTypesSecret");t.exports=function(){function e(e,t,n,r,i,u){u!==s&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return n.checkPropTypes=r,n.PropTypes=n,n}},{"./lib/ReactPropTypesSecret":9,"fbjs/lib/emptyFunction":10,"fbjs/lib/invariant":11}],7:[function(e,t,n){(function(n){"use strict";var r=e("fbjs/lib/emptyFunction"),o=e("fbjs/lib/invariant"),s=e("fbjs/lib/warning"),i=e("./lib/ReactPropTypesSecret"),u=e("./checkPropTypes");t.exports=function(e,t){function a(e){var t=e&&(j&&e[j]||e[I]);if("function"==typeof t)return t}function l(e,t){return e===t?0!==e||1/e==1/t:e!==e&&t!==t}function c(e){this.message=e,this.stack=""}function f(e){function r(r,l,f,p,g,d,h){if(p=p||N,d=d||f,h!==i)if(t)o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else if("production"!==n.env.NODE_ENV&&"undefined"!=typeof console){var y=p+":"+f;!u[y]&&a<3&&(s(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",d,p),u[y]=!0,a++)}return null==l[f]?r?new c(null===l[f]?"The "+g+" `"+d+"` is marked as required in `"+p+"`, but its value is `null`.":"The "+g+" `"+d+"` is marked as required in `"+p+"`, but its value is `undefined`."):null:e(l,f,p,g,d)}if("production"!==n.env.NODE_ENV)var u={},a=0;var l=r.bind(null,!1);return l.isRequired=r.bind(null,!0),l}function p(e){function t(t,n,r,o,s,i){var u=t[n];return w(u)!==e?new c("Invalid "+o+" `"+s+"` of type `"+O(u)+"` supplied to `"+r+"`, expected `"+e+"`."):null}return f(t)}function g(e){function t(t,n,r,o,s){if("function"!=typeof e)return new c("Property `"+s+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=t[n];if(!Array.isArray(u))return new c("Invalid "+o+" `"+s+"` of type `"+w(u)+"` supplied to `"+r+"`, expected an array.");for(var a=0;a<u.length;a++){var l=e(u,a,r,o,s+"["+a+"]",i);if(l instanceof Error)return l}return null}return f(t)}function d(e){function t(t,n,r,o,s){if(!(t[n]instanceof e)){var i=e.name||N;return new c("Invalid "+o+" `"+s+"` of type `"+T(t[n])+"` supplied to `"+r+"`, expected instance of `"+i+"`.")}return null}return f(t)}function h(e){function t(t,n,r,o,s){for(var i=t[n],u=0;u<e.length;u++)if(l(i,e[u]))return null;return new c("Invalid "+o+" `"+s+"` of value `"+i+"` supplied to `"+r+"`, expected one of "+JSON.stringify(e)+".")}return Array.isArray(e)?f(t):("production"!==n.env.NODE_ENV&&s(!1,"Invalid argument supplied to oneOf, expected an instance of array."),r.thatReturnsNull)}function y(e){function t(t,n,r,o,s){if("function"!=typeof e)return new c("Property `"+s+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=t[n],a=w(u);if("object"!==a)return new c("Invalid "+o+" `"+s+"` of type `"+a+"` supplied to `"+r+"`, expected an object.");for(var l in u)if(u.hasOwnProperty(l)){var f=e(u,l,r,o,s+"."+l,i);if(f instanceof Error)return f}return null}return f(t)}function v(e){function t(t,n,r,o,s){for(var u=0;u<e.length;u++)if(null==(0,e[u])(t,n,r,o,s,i))return null;return new c("Invalid "+o+" `"+s+"` supplied to `"+r+"`.")}if(!Array.isArray(e))return"production"!==n.env.NODE_ENV&&s(!1,"Invalid argument supplied to oneOfType, expected an instance of array."),r.thatReturnsNull;for(var o=0;o<e.length;o++){var u=e[o];if("function"!=typeof u)return s(!1,"Invalid argument supplid to oneOfType. Expected an array of check functions, but received %s at index %s.",_(u),o),r.thatReturnsNull}return f(t)}function b(e){function t(t,n,r,o,s){var u=t[n],a=w(u);if("object"!==a)return new c("Invalid "+o+" `"+s+"` of type `"+a+"` supplied to `"+r+"`, expected `object`.");for(var l in e){var f=e[l];if(f){var p=f(u,l,r,o,s+"."+l,i);if(p)return p}}return null}return f(t)}function m(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(m);if(null===t||e(t))return!0;var n=a(t);if(!n)return!1;var r,o=n.call(t);if(n!==t.entries){for(;!(r=o.next()).done;)if(!m(r.value))return!1}else for(;!(r=o.next()).done;){var s=r.value;if(s&&!m(s[1]))return!1}return!0;default:return!1}}function S(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}function w(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":S(t,e)?"symbol":t}function O(e){if(void 0===e||null===e)return""+e;var t=w(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function _(e){var t=O(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}function T(e){return e.constructor&&e.constructor.name?e.constructor.name:N}var j="function"==typeof Symbol&&Symbol.iterator,I="@@iterator",N="<<anonymous>>",E={array:p("array"),bool:p("boolean"),func:p("function"),number:p("number"),object:p("object"),string:p("string"),symbol:p("symbol"),any:function(){return f(r.thatReturnsNull)}(),arrayOf:g,element:function(){function t(t,n,r,o,s){var i=t[n];return e(i)?null:new c("Invalid "+o+" `"+s+"` of type `"+w(i)+"` supplied to `"+r+"`, expected a single ReactElement.")}return f(t)}(),instanceOf:d,node:function(){function e(e,t,n,r,o){return m(e[t])?null:new c("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")}return f(e)}(),objectOf:y,oneOf:h,oneOfType:v,shape:b};return c.prototype=Error.prototype,E.checkPropTypes=u,E.PropTypes=E,E}}).call(this,e("_process"))},{"./checkPropTypes":5,"./lib/ReactPropTypesSecret":9,_process:4,"fbjs/lib/emptyFunction":10,"fbjs/lib/invariant":11,"fbjs/lib/warning":12}],8:[function(e,t,n){(function(n){if("production"!==n.env.NODE_ENV){var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,o=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r};t.exports=e("./factoryWithTypeCheckers")(o,!0)}else t.exports=e("./factoryWithThrowingShims")()}).call(this,e("_process"))},{"./factoryWithThrowingShims":6,"./factoryWithTypeCheckers":7,_process:4}],9:[function(e,t,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},{}],10:[function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},t.exports=o},{}],11:[function(e,t,n){(function(e){"use strict";function n(e,t,n,o,s,i,u,a){if(r(t),!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,o,s,i,u,a],f=0;(l=new Error(t.replace(/%s/g,function(){return c[f++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}}var r=function(e){};"production"!==e.env.NODE_ENV&&(r=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")}),t.exports=n}).call(this,e("_process"))},{_process:4}],12:[function(e,t,n){(function(n){"use strict";var r=e("./emptyFunction");"production"!==n.env.NODE_ENV&&function(){var e=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0,s="Warning: "+e.replace(/%s/g,function(){return n[o++]});try{throw new Error(s)}catch(e){}};r=function(t,n){if(void 0===n)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==n.indexOf("Failed Composite propType: ")&&!t){for(var r=arguments.length,o=Array(r>2?r-2:0),s=2;s<r;s++)o[s-2]=arguments[s];e.apply(void 0,[n].concat(o))}}}(),t.exports=r}).call(this,e("_process"))},{"./emptyFunction":10,_process:4}],13:[function(e,t,n){"use strict";function r(e,t,n){return!o(e.props,t)||!o(e.state,n)}var o=e("fbjs/lib/shallowEqual");t.exports=r},{"fbjs/lib/shallowEqual":2}],14:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}Object.defineProperty(n,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=r(window.React),p=r(e("classnames")),g=r(e("lodash.debounce")),d=r(e("./defaults")),h=r(e("./prop-types")),y=r(e("./filter-input-attributes")),v=r(e("./input")),b=r(e("./suggest-list")),m=function(e){function t(e){o(this,t);var n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.onInputChange=function(e){n.setState({userInput:e},n.onAfterInputChange)},n.onAfterInputChange=function(){n.state.isSuggestsHidden||n.showSuggests(),n.props.onChange(n.state.userInput)},n.onInputFocus=function(){n.props.onFocus(),n.showSuggests()},n.onInputBlur=function(){n.state.ignoreBlur||n.hideSuggests()},n.onNext=function(){return n.activateSuggest("next")},n.onPrev=function(){return n.activateSuggest("prev")},n.onSelect=function(){return n.selectSuggest(n.state.activeSuggest)},n.onSuggestMouseDown=function(){return n.setState({ignoreBlur:!0})},n.onSuggestMouseOut=function(){return n.setState({ignoreBlur:!1})},n.onSuggestNoResults=function(){n.props.onSuggestNoResults(n.state.userInput)},n.hideSuggests=function(){n.props.onBlur(n.state.userInput),n.timer=setTimeout(function(){n.setState({isSuggestsHidden:!0,activeSuggest:null})},100)},n.selectSuggest=function(e){if(e||(e={label:n.state.userInput}),n.setState({isSuggestsHidden:!0,userInput:"object"!==l(e.label)?e.label:e.description}),e.location)return n.setState({ignoreBlur:!1}),void n.props.onSuggestSelect(e);n.geocodeSuggest(e)},n.state={isSuggestsHidden:!0,isLoading:!1,userInput:e.initialValue,activeSuggest:null,suggests:[]},n.onInputChange=n.onInputChange.bind(n),n.onAfterInputChange=n.onAfterInputChange.bind(n),e.queryDelay&&(n.onAfterInputChange=(0,g.default)(n.onAfterInputChange,e.queryDelay)),n}return i(t,e),c(t,[{key:"componentWillReceiveProps",value:function(e){this.props.initialValue!==e.initialValue&&this.setState({userInput:e.initialValue})}},{key:"componentWillMount",value:function(){if("undefined"!=typeof window){var e=this.props.googleMaps||window.google&&window.google.maps||this.googleMaps;e?(this.googleMaps=e,this.autocompleteService=new e.places.AutocompleteService,this.geocoder=new e.Geocoder):console}}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timer)}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"update",value:function(e){this.setState({userInput:e}),this.props.onChange(e)}},{key:"clear",value:function(){this.setState({userInput:""},this.hideSuggests)}},{key:"searchSuggests",value:function(){var e=this;if(this.state.userInput){var t={input:this.state.userInput};this.state.userInput.length<this.props.minLength||(["location","radius","bounds","types"].forEach(function(n){e.props[n]&&(t[n]=e.props[n])}),this.props.country&&(t.componentRestrictions={country:this.props.country}),this.setState({isLoading:!0},function(){e.autocompleteService.getPlacePredictions(t,function(t){e.setState({isLoading:!1}),e.updateSuggests(t||[],function(){e.props.autoActivateFirstSuggest&&!e.state.activeSuggest&&e.activateSuggest("next")})})}))}else this.updateSuggests()}},{key:"updateSuggests",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments[1],r=[],o=this.state.userInput,s=new RegExp(u(o),"gim"),i=this.props.skipSuggest,a=this.props.maxFixtures,l=0,c=null;this.props.fixtures.forEach(function(e){l>=a||!i(e)&&e.label.match(s)&&(l++,e.placeId=e.label,e.isFixture=!0,e.matchedSubstrings={offset:e.label.indexOf(o),length:o.length},r.push(e))}),t.forEach(function(t){i(t)||r.push({description:t.description,label:e.props.getSuggestLabel(t),placeId:t.place_id,isFixture:!1,matchedSubstrings:t.matched_substrings[0]})}),c=this.updateActiveSuggest(r),this.setState({suggests:r,activeSuggest:c},n)}},{key:"updateActiveSuggest",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=this.state.activeSuggest;if(t){var n=e.filter(function(e){return t.placeId===e.placeId&&t.isFixture===e.isFixture})[0];t=n||null}return t}},{key:"showSuggests",value:function(){this.searchSuggests(),this.setState({isSuggestsHidden:!1})}},{key:"activateSuggest",value:function(e){if(this.state.isSuggestsHidden)this.showSuggests();else{var t=this.state.suggests.length-1,n="next"===e,r=null,o=0,s=0;for(s;s<=t;s++)this.state.suggests[s]===this.state.activeSuggest&&(o=n?s+1:s-1);this.state.activeSuggest||(o=n?0:t),o>=0&&o<=t&&(r=this.state.suggests[o]),this.props.onActivateSuggest(r),this.setState({activeSuggest:r})}}},{key:"geocodeSuggest",value:function(e){var t=this,n=null;n=e.placeId&&!e.isFixture?{placeId:e.placeId}:{address:e.label,location:this.props.location,bounds:this.props.bounds,componentRestrictions:this.props.country?{country:this.props.country}:null},this.geocoder.geocode(n,function(n,r){if(r===t.googleMaps.GeocoderStatus.OK){var o=n[0],s=o.geometry.location;e.gmaps=o,e.location={lat:s.lat(),lng:s.lng()}}t.props.onSuggestSelect(e)})}},{key:"render",value:function(){var e=this,t=(0,y.default)(this.props),n=(0,p.default)("geosuggest",this.props.className,{"geosuggest--loading":this.state.isLoading}),r=this.props.label&&t.id,o=f.default.createElement(v.default,a({className:this.props.inputClassName,ref:function(t){return e.input=t},value:this.state.userInput,ignoreEnter:!this.state.isSuggestsHidden,ignoreTab:this.props.ignoreTab,style:this.props.style.input,onChange:this.onInputChange,onFocus:this.onInputFocus,onBlur:this.onInputBlur,onKeyDown:this.props.onKeyDown,onKeyPress:this.props.onKeyPress,onNext:this.onNext,onPrev:this.onPrev,onSelect:this.onSelect,onEscape:this.hideSuggests},t)),s=f.default.createElement(b.default,{isHidden:this.state.isSuggestsHidden,style:this.props.style.suggests,suggestItemStyle:this.props.style.suggestItem,userInput:this.state.userInput,isHighlightMatch:this.props.highlightMatch,suggestsClassName:this.props.suggestsClassName,suggestItemClassName:this.props.suggestItemClassName,suggests:this.state.suggests,hiddenClassName:this.props.suggestsHiddenClassName,suggestItemActiveClassName:this.props.suggestItemActiveClassName,activeSuggest:this.state.activeSuggest,onSuggestNoResults:this.onSuggestNoResults,onSuggestMouseDown:this.onSuggestMouseDown,onSuggestMouseOut:this.onSuggestMouseOut,onSuggestSelect:this.selectSuggest,renderSuggestItem:this.props.renderSuggestItem,minLength:this.props.minLength});return f.default.createElement("div",{className:n},f.default.createElement("div",{className:"geosuggest__input-wrapper"},r&&f.default.createElement("label",{className:"geosuggest__label",htmlFor:t.id},this.props.label),o),f.default.createElement("div",{className:"geosuggest__suggests-wrapper"},s))}}]),t}(f.default.Component);m.propTypes=h.default,m.defaultProps=d.default,n.default=m},{"./defaults":15,"./filter-input-attributes":16,"./input":17,"./prop-types":18,"./suggest-list":20,classnames:1,"lodash.debounce":3}],15:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default={fixtures:[],maxFixtures:10,initialValue:"",placeholder:"Search places",disabled:!1,className:"",inputClassName:"",location:null,radius:null,bounds:null,country:null,types:null,queryDelay:250,googleMaps:null,highlightMatch:!0,onActivateSuggest:function(){},onSuggestSelect:function(){},onSuggestNoResults:function(){},onFocus:function(){},onBlur:function(){},onChange:function(){},skipSuggest:function(){},getSuggestLabel:function(e){return e.description},renderSuggestItem:null,autoActivateFirstSuggest:!1,style:{input:{},suggests:{},suggestItem:{}},ignoreTab:!1,minLength:1}},{}],16:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){var t={};return r.forEach(function(n){e[n]&&(t[n]=e[n])}),t};var r=["autoCapitalize","autoComplete","autoCorrect","autoFocus","disabled","form","formAction","formEncType","formMethod","formNoValidate","formTarget","height","id","inputMode","maxLength","name","onClick","onContextMenu","onCopy","onCut","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onPaste","pattern","placeholder","readOnly","required","size","spellCheck","tabIndex","aria-atomic","aria-busy","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-dropeffect","aria-errormessage","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-live","aria-owns","aria-relevant","aria-roledescription","aria-activedescendant","aria-autocomplete","aria-multiline","aria-placeholder","aria-readonly","aria-required"]},{}],17:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=r(window.React),c=r(e("react-addons-shallow-compare")),f=r(e("classnames")),p=r(e("./filter-input-attributes")),g=function(e){function t(){var e,n,r,i;o(this,t);for(var u=arguments.length,a=Array(u),l=0;l<u;l++)a[l]=arguments[l];return n=r=s(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.onChange=function(){r.props.onChange(r.input.value)},r.onFocus=function(){r.props.onFocus()},r.onBlur=function(){r.props.onBlur()},r.onKeyPress=function(e){r.props.onKeyPress(e)},r.onInputKeyDown=function(e){switch(r.props.onKeyDown&&r.props.onKeyDown(e),e.which){case 40:e.shiftKey||(e.preventDefault(),r.props.onNext());break;case 38:e.shiftKey||(e.preventDefault(),r.props.onPrev());break;case 13:r.props.ignoreEnter&&e.preventDefault(),r.props.onSelect();break;case 9:r.props.ignoreTab||r.props.onSelect();break;case 27:r.props.onEscape()}},i=n,s(r,i)}return i(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,c.default)(this,e,t)}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"render",value:function(){var e=this,t=(0,p.default)(this.props),n=(0,f.default)("geosuggest__input",this.props.className);return l.default.createElement("input",u({className:n,ref:function(t){return e.input=t},type:"text"},t,{value:this.props.value,style:this.props.style,onKeyDown:this.onInputKeyDown,onChange:this.onChange,onKeyPress:this.onKeyPress,onFocus:this.onFocus,onBlur:this.onBlur}))}}]),t}(l.default.Component);g.defaultProps={className:"",value:"",ignoreTab:!1,onKeyDown:function(){},onKeyPress:function(){},autoComplete:"off"},n.default=g},{"./filter-input-attributes":16,classnames:1,"react-addons-shallow-compare":13}],18:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function(e){return e&&e.__esModule?e:{default:e}}(e("prop-types"));n.default={fixtures:r.default.array,maxFixtures:r.default.number,initialValue:r.default.string,placeholder:r.default.string,disabled:r.default.bool,className:r.default.string,inputClassName:r.default.string,suggestsClassName:r.default.string,suggestsHiddenClassName:r.default.string,suggestItemClassName:r.default.string,suggestItemActiveClassName:r.default.string,location:r.default.object,radius:r.default.oneOfType([r.default.string,r.default.number]),bounds:r.default.object,country:r.default.oneOfType([r.default.string,r.default.array]),types:r.default.array,queryDelay:r.default.number,googleMaps:r.default.object,highlightMatch:r.default.bool,onSuggestSelect:r.default.func,onFocus:r.default.func,onBlur:r.default.func,onChange:r.default.func,onKeyPress:r.default.func,skipSuggest:r.default.func,getSuggestLabel:r.default.func,renderSuggestItem:r.default.func,autoActivateFirstSuggest:r.default.bool,style:r.default.shape({input:r.default.object,suggests:r.default.object,suggestItem:r.default.object}),ignoreTab:r.default.bool,label:r.default.string,autoComplete:r.default.string,minLength:r.default.number}},{"prop-types":8}],19:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=r(window.React),c=r(e("classnames")),f=function(e){function t(){var e,n,r,o;s(this,t);for(var u=arguments.length,a=Array(u),l=0;l<u;l++)a[l]=arguments[l];return n=r=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.onClick=function(e){e.preventDefault(),r.props.onSelect(r.props.suggest)},o=n,i(r,o)}return u(t,e),a(t,[{key:"makeBold",value:function(e,t){return l.default.createElement("b",{className:"geosuggest__item__matched-text",key:t},e)}},{key:"formatMatchedText",value:function(e,t){if(!e||!t.matchedSubstrings)return t.label;var n=t.matchedSubstrings.offset,r=n+t.matchedSubstrings.length,o=this.makeBold(t.label.substring(n,r),t.label),s="",i="";return n>0&&(s=t.label.slice(0,n)),r<t.label.length&&(i=t.label.slice(r)),l.default.createElement("span",null,s,o,i)}},{key:"componentWillReceiveProps",value:function(e){e.isActive&&!this.props.isActive&&this.scrollIfNeeded()}},{key:"scrollIfNeeded",value:function(){var e=this.ref,t=e.parentElement,n=e.offsetTop-t.offsetTop<t.scrollTop,r=e.offsetTop-t.offsetTop+e.clientHeight>t.scrollTop+t.clientHeight;(n||r)&&(t.scrollTop=e.offsetTop-t.offsetTop-t.clientHeight/2+e.clientHeight/2)}},{key:"render",value:function(){var e=this,t=this.props.suggest,n=(0,c.default)("geosuggest__item",this.props.className,this.props.suggestItemClassName,{"geosuggest__item--active":this.props.isActive},o({},this.props.activeClassname,this.props.activeClassname?this.props.isActive:null)),r=t.label;return this.props.renderSuggestItem?r=this.props.renderSuggestItem(t):this.props.isHighlightMatch&&(r=this.formatMatchedText(this.props.userInput,t)),l.default.createElement("li",{className:n,ref:function(t){return e.ref=t},style:this.props.style,onMouseDown:this.props.onMouseDown,onMouseOut:this.props.onMouseOut,onClick:this.onClick},r)}}]),t}(l.default.Component);n.default=f,f.defaultProps={isActive:!1,className:"",suggest:{}}},{classnames:1}],20:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=r(window.React),c=r(e("react-addons-shallow-compare")),f=r(e("classnames")),p=r(e("./suggest-item")),g=function(e){function t(){return s(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return u(t,e),a(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,c.default)(this,e,t)}},{key:"isHidden",value:function(){return this.props.isHidden||0===this.props.suggests.length}},{key:"componentWillReceiveProps",value:function(e){e.suggests!==this.props.suggests&&0===e.suggests.length&&this.props.onSuggestNoResults()}},{key:"render",value:function(){var e=this,t=(0,f.default)("geosuggest__suggests",this.props.suggestsClassName,{"geosuggest__suggests--hidden":this.isHidden()},o({},this.props.hiddenClassName,this.props.hiddenClassName?this.isHidden():null));return l.default.createElement("ul",{className:t,style:this.props.style},this.props.suggests.map(function(t){var n=e.props.activeSuggest&&t.placeId===e.props.activeSuggest.placeId,r=t.key||t.placeId;return l.default.createElement(p.default,{key:r,className:t.className,userInput:e.props.userInput,isHighlightMatch:e.props.isHighlightMatch,suggest:t,style:e.props.suggestItemStyle,suggestItemClassName:e.props.suggestItemClassName,isActive:n,activeClassname:e.props.suggestItemActiveClassName,onMouseDown:e.props.onSuggestMouseDown,onMouseOut:e.props.onSuggestMouseOut,onSelect:e.props.onSuggestSelect,renderSuggestItem:e.props.renderSuggestItem})}))}}]),t}(l.default.Component);n.default=g,g.defaultProps={isHidden:!0,suggests:[]}},{"./suggest-item":19,classnames:1,"react-addons-shallow-compare":13}]},{},[14])(14)});

@@ -22,3 +22,3 @@ 'use strict';

*/
var allowedAttributes = ['autoFocus', 'autoComplete', 'disabled', 'form', 'formAction', 'formEncType', 'formMethod', 'formNoValidate', 'formTarget', 'height', 'id', 'inputMode', 'maxLength', 'name', 'onClick', 'onContextMenu', 'onCopy', 'onCut', 'onDoubleClick', 'onMouseDown', 'onMouseEnter', 'onMouseLeave', 'onMouseMove', 'onMouseOut', 'onMouseOver', 'onMouseUp', 'onPaste', 'pattern', 'placeholder', 'readOnly', 'required', 'size', 'spellCheck', 'tabIndex', 'aria-atomic', 'aria-busy', 'aria-controls', 'aria-current', 'aria-describedby', 'aria-details', 'aria-disabled', 'aria-dropeffect', 'aria-errormessage', 'aria-flowto', 'aria-grabbed', 'aria-haspopup', 'aria-hidden', 'aria-invalid', 'aria-keyshortcuts', 'aria-label', 'aria-labelledby', 'aria-live', 'aria-owns', 'aria-relevant', 'aria-roledescription', 'aria-activedescendant', 'aria-autocomplete', 'aria-multiline', 'aria-placeholder', 'aria-readonly', 'aria-required'];
var allowedAttributes = ['autoCapitalize', 'autoComplete', 'autoCorrect', 'autoFocus', 'disabled', 'form', 'formAction', 'formEncType', 'formMethod', 'formNoValidate', 'formTarget', 'height', 'id', 'inputMode', 'maxLength', 'name', 'onClick', 'onContextMenu', 'onCopy', 'onCut', 'onDoubleClick', 'onMouseDown', 'onMouseEnter', 'onMouseLeave', 'onMouseMove', 'onMouseOut', 'onMouseOver', 'onMouseUp', 'onPaste', 'pattern', 'placeholder', 'readOnly', 'required', 'size', 'spellCheck', 'tabIndex', 'aria-atomic', 'aria-busy', 'aria-controls', 'aria-current', 'aria-describedby', 'aria-details', 'aria-disabled', 'aria-dropeffect', 'aria-errormessage', 'aria-flowto', 'aria-grabbed', 'aria-haspopup', 'aria-hidden', 'aria-invalid', 'aria-keyshortcuts', 'aria-label', 'aria-labelledby', 'aria-live', 'aria-owns', 'aria-relevant', 'aria-roledescription', 'aria-activedescendant', 'aria-autocomplete', 'aria-multiline', 'aria-placeholder', 'aria-readonly', 'aria-required'];

@@ -25,0 +25,0 @@ /**

{
"name": "react-geosuggest",
"version": "2.4.0",
"version": "2.5.0",
"description": "A React autosuggest for the Google Maps Places API.",

@@ -5,0 +5,0 @@ "main": "module/Geosuggest.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc