UNPKG

react-dadata-suggestions-reactoutsideclick

Version:

Just another one react component for dadata suggestions

7 lines 53.6 kB
module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=12)}([function(e,t){e.exports=require("react")},function(e,t,n){"use strict";function r(e,t,n,r){var o;t in e&&("function"!=typeof(o=r)||"[object Function]"!==u.call(o)||!r())||(l?c(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n)}function o(e,t){var n=2<arguments.length?arguments[2]:{},o=i(t);a&&(o=s.call(o,Object.getOwnPropertySymbols(t)));for(var u=0;u<o.length;u+=1)r(e,o[u],t[o[u]],n[o[u]])}var i=n(16),a="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),u=Object.prototype.toString,s=Array.prototype.concat,c=Object.defineProperty,l=c&&function(){var e={};try{for(var t in c(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}();o.supportsDescriptors=!!l,e.exports=o},function(e,t,n){"use strict";var r=n(19);e.exports=Function.prototype.bind||r},function(e,t,n){"use strict";var r,o=TypeError,i=Object.getOwnPropertyDescriptor;if(i)try{i({},"")}catch(e){i=null}function a(){throw new o}var u=i?function(){try{return a}catch(e){try{return i(arguments,"callee").get}catch(e){return a}}}():a,s=n(22)(),c=Object.getPrototypeOf||function(e){return e.__proto__},l=r,f="undefined"==typeof Uint8Array?r:c(Uint8Array),p={"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer.prototype,"%ArrayIteratorPrototype%":s?c([][Symbol.iterator]()):r,"%ArrayPrototype%":Array.prototype,"%ArrayProto_entries%":Array.prototype.entries,"%ArrayProto_forEach%":Array.prototype.forEach,"%ArrayProto_keys%":Array.prototype.keys,"%ArrayProto_values%":Array.prototype.values,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":void 0,"%AsyncFunctionPrototype%":r,"%AsyncGenerator%":r,"%AsyncGeneratorFunction%":void 0,"%AsyncGeneratorPrototype%":r,"%AsyncIteratorPrototype%":l&&s&&Symbol.asyncIterator?l[Symbol.asyncIterator]():r,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%Boolean%":Boolean,"%BooleanPrototype%":Boolean.prototype,"%DataView%":"undefined"==typeof DataView?r:DataView,"%DataViewPrototype%":"undefined"==typeof DataView?r:DataView.prototype,"%Date%":Date,"%DatePrototype%":Date.prototype,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%ErrorPrototype%":Error.prototype,"%eval%":eval,"%EvalError%":EvalError,"%EvalErrorPrototype%":EvalError.prototype,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float32ArrayPrototype%":"undefined"==typeof Float32Array?r:Float32Array.prototype,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%Float64ArrayPrototype%":"undefined"==typeof Float64Array?r:Float64Array.prototype,"%Function%":Function,"%FunctionPrototype%":Function.prototype,"%Generator%":r,"%GeneratorFunction%":void 0,"%GeneratorPrototype%":r,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int8ArrayPrototype%":"undefined"==typeof Int8Array?r:Int8Array.prototype,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int16ArrayPrototype%":"undefined"==typeof Int16Array?r:Int8Array.prototype,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%Int32ArrayPrototype%":"undefined"==typeof Int32Array?r:Int32Array.prototype,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":s?c(c([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%JSONParse%":"object"==typeof JSON?JSON.parse:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&s?c((new Map)[Symbol.iterator]()):r,"%MapPrototype%":"undefined"==typeof Map?r:Map.prototype,"%Math%":Math,"%Number%":Number,"%NumberPrototype%":Number.prototype,"%Object%":Object,"%ObjectPrototype%":Object.prototype,"%ObjProto_toString%":Object.prototype.toString,"%ObjProto_valueOf%":Object.prototype.valueOf,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%PromisePrototype%":"undefined"==typeof Promise?r:Promise.prototype,"%PromiseProto_then%":"undefined"==typeof Promise?r:Promise.prototype.then,"%Promise_all%":"undefined"==typeof Promise?r:Promise.all,"%Promise_reject%":"undefined"==typeof Promise?r:Promise.reject,"%Promise_resolve%":"undefined"==typeof Promise?r:Promise.resolve,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":RangeError,"%RangeErrorPrototype%":RangeError.prototype,"%ReferenceError%":ReferenceError,"%ReferenceErrorPrototype%":ReferenceError.prototype,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%RegExpPrototype%":RegExp.prototype,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&s?c((new Set)[Symbol.iterator]()):r,"%SetPrototype%":"undefined"==typeof Set?r:Set.prototype,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer.prototype,"%String%":String,"%StringIteratorPrototype%":s?c(""[Symbol.iterator]()):r,"%StringPrototype%":String.prototype,"%Symbol%":s?Symbol:r,"%SymbolPrototype%":s?Symbol.prototype:r,"%SyntaxError%":SyntaxError,"%SyntaxErrorPrototype%":SyntaxError.prototype,"%ThrowTypeError%":u,"%TypedArray%":f,"%TypedArrayPrototype%":f?f.prototype:r,"%TypeError%":o,"%TypeErrorPrototype%":o.prototype,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ArrayPrototype%":"undefined"==typeof Uint8Array?r:Uint8Array.prototype,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray.prototype,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?r:Uint16Array.prototype,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?r:Uint32Array.prototype,"%URIError%":URIError,"%URIErrorPrototype%":URIError.prototype,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakMapPrototype%":"undefined"==typeof WeakMap?r:WeakMap.prototype,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet,"%WeakSetPrototype%":"undefined"==typeof WeakSet?r:WeakSet.prototype},y=n(2).call(Function.call,String.prototype.replace),d=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,h=/\\(\\)?/g;e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new TypeError("intrinsic name must be a non-empty string");if(1<arguments.length&&"boolean"!=typeof t)throw new TypeError('"allowMissing" argument must be a boolean');for(var n,r=(n=[],y(e,d,(function(e,t,r,o){n[n.length]=r?y(o,h,"$1"):t||e})),n),a=function(e,t){if(!(e in p))throw new SyntaxError("intrinsic "+e+" does not exist!");if(void 0===p[e]&&!t)throw new o("intrinsic "+e+" exists, but is not available. Please file an issue!");return p[e]}("%"+(0<r.length?r[0]:"")+"%",t),u=1;u<r.length;u+=1)if(null!=a)if(i&&u+1>=r.length){var s=i(a,r[u]);if(!t&&!(r[u]in a))throw new o("base intrinsic for "+e+" exists, but the property is not available.");a=s?s.get||s.value:a[r[u]]}else a=a[r[u]];return a}},function(e,t,n){"use strict";function r(e,t){return u.apply(e,[t])}var o=n(1),i=n(8),a=n(9),u=a();o(r,{getPolyfill:a,implementation:i,shim:n(28)}),e.exports=r},function(e,t,n){"use strict";var r=Object.prototype.toString;e.exports=function(e){var t=r.call(e),n="[object Arguments]"===t;return n||"[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&0<=e.length&&"[object Function]"===r.call(e.callee)}},function(e,t,n){"use strict";var r=n(18),o=n(20),i=n(25)("Object.prototype.propertyIsEnumerable");e.exports=function(e){var t=o(e),n=[];for(var a in t)r(t,a)&&i(t,a)&&n.push(t[a]);return n}},function(e,t,n){"use strict";var r=n(6);e.exports=function(){return"function"==typeof Object.values?Object.values:r}},function(e,t,n){"use strict";e.exports=function(e){if(arguments.length<1)throw new TypeError("1 argument is required");if("object"!=typeof e)throw new TypeError("Argument 1 (”other“) to Node.contains must be an instance of Node");var t=e;do{if(this===t)return!0;t=t&&t.parentNode}while(t);return!1}},function(e,t,n){"use strict";var r=n(8);e.exports=function(){if("undefined"!=typeof document){if(document.contains)return document.contains;if(document.body&&document.body.contains)try{if("boolean"==typeof document.body.contains.call(document,""))return document.body.contains}catch(e){}}return r}},function(e,t,n){function r(e){if(i[e])return i[e].exports;var t=i[e]={exports:{},id:e,loaded:!1};return o[e].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}var o,i;e.exports=(i={},r.m=o=[function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,o=(r=n(2))&&r.__esModule?r:{default:r};t.default=o.default,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=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};function o(e){return e&&e.__esModule?e:{default:e}}t.default=c;var i=n(3),a=o(n(4)),u=n(14),s=o(n(15));function c(e){var t=e.activeClassName,n=void 0===t?"":t,o=e.activeIndex,a=void 0===o?-1:o,c=e.activeStyle,l=e.autoEscape,f=e.caseSensitive,p=void 0!==f&&f,y=e.className,d=e.findChunks,h=e.highlightClassName,v=void 0===h?"":h,g=e.highlightStyle,b=void 0===g?{}:g,m=e.highlightTag,O=void 0===m?"mark":m,w=e.sanitize,S=e.searchWords,E=e.textToHighlight,P=e.unhighlightClassName,j=void 0===P?"":P,x=e.unhighlightStyle,A=function(e,t){var n={};for(var r in e)0<=t.indexOf(r)||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["activeClassName","activeIndex","activeStyle","autoEscape","caseSensitive","className","findChunks","highlightClassName","highlightStyle","highlightTag","sanitize","searchWords","textToHighlight","unhighlightClassName","unhighlightStyle"]),_=(0,i.findAll)({autoEscape:l,caseSensitive:p,findChunks:d,sanitize:w,searchWords:S,textToHighlight:E}),k=O,T=-1,N="",I=void 0,R=(0,s.default)((function(e){var t={};for(var n in e)t[n.toLowerCase()]=e[n];return t}));return(0,u.createElement)("span",r({className:y},A,{children:_.map((function(e,t){var r=E.substr(e.start,e.end-e.start);if(e.highlight){T++;var o;o="object"==typeof v?p?v[r]:(v=R(v))[r.toLowerCase()]:v;var i=T===+a;N=o+" "+(i?n:""),I=1==i&&null!=c?Object.assign({},b,c):b;var s={children:r,className:N,key:t,style:I};return"string"!=typeof k&&(s.highlightIndex=T),(0,u.createElement)(k,s)}return(0,u.createElement)("span",{children:r,className:j,key:t,style:x})}))}))}c.propTypes={activeClassName:a.default.string,activeIndex:a.default.number,activeStyle:a.default.object,autoEscape:a.default.bool,className:a.default.string,findChunks:a.default.func,highlightClassName:a.default.oneOfType([a.default.object,a.default.string]),highlightStyle:a.default.object,highlightTag:a.default.oneOfType([a.default.node,a.default.func,a.default.string]),sanitize:a.default.func,searchWords:a.default.arrayOf(a.default.oneOfType([a.default.string,a.default.instanceOf(RegExp)])).isRequired,textToHighlight:a.default.string.isRequired,unhighlightClassName:a.default.string,unhighlightStyle:a.default.object},e.exports=t.default},function(e,t){function n(e){if(o[e])return o[e].exports;var t=o[e]={exports:{},id:e,loaded:!1};return r[e].call(t.exports,t,t.exports,n),t.loaded=!0,t.exports}var r,o;e.exports=(o={},n.m=r=[function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2);Object.defineProperty(t,"combineChunks",{enumerable:!0,get:function(){return r.combineChunks}}),Object.defineProperty(t,"fillInChunks",{enumerable:!0,get:function(){return r.fillInChunks}}),Object.defineProperty(t,"findAll",{enumerable:!0,get:function(){return r.findAll}}),Object.defineProperty(t,"findChunks",{enumerable:!0,get:function(){return r.findChunks}})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findAll=function(e){var t=e.autoEscape,i=e.caseSensitive,a=void 0!==i&&i,u=e.findChunks,s=void 0===u?r:u,c=e.sanitize,l=e.searchWords,f=e.textToHighlight;return o({chunksToHighlight:n({chunks:s({autoEscape:t,caseSensitive:a,sanitize:c,searchWords:l,textToHighlight:f})}),totalLength:f?f.length:0})};var n=t.combineChunks=function(e){var t=e.chunks;return t.sort((function(e,t){return e.start-t.start})).reduce((function(e,t){if(0===e.length)return[t];var n=e.pop();if(t.start<=n.end){var r=Math.max(n.end,t.end);e.push({start:n.start,end:r})}else e.push(n,t);return e}),[])},r=function(e){var t=e.autoEscape,n=e.caseSensitive,r=e.sanitize,o=void 0===r?i:r,a=e.searchWords,u=e.textToHighlight;return u=o(u),a.filter((function(e){return e})).reduce((function(e,r){r=o(r),t&&(r=r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"));for(var i=new RegExp(r,n?"g":"gi"),a=void 0;a=i.exec(u);){var s=a.index,c=i.lastIndex;s<c&&e.push({start:s,end:c}),a.index==i.lastIndex&&i.lastIndex++}return e}),[])};t.findChunks=r;var o=t.fillInChunks=function(e){function t(e,t,n){0<t-e&&o.push({start:e,end:t,highlight:n})}var n=e.chunksToHighlight,r=e.totalLength,o=[];if(0===n.length)t(0,r,!1);else{var i=0;n.forEach((function(e){t(i,e.start,!1),t(e.start,e.end,!0),i=e.end})),t(i,r,!1)}return o};function i(e){return e}}],n.c=o,n.p="",n(0))},function(e,t,n){(function(t){if("production"!==t.env.NODE_ENV){var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;e.exports=n(6)((function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}),!0)}else e.exports=n(13)()}).call(t,n(5))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,c=[],l=!1,f=-1;function p(){l&&s&&(l=!1,s.length?c=s.concat(c):f=-1,c.length&&y())}function y(){if(!l){var e=u(p);l=!0;for(var t=c.length;t;){for(s=c,c=[];++f<t;)s&&s[f].run();f=-1,t=c.length}s=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function h(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new d(e,t)),1!==c.length||l||u(y)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){(function(t){"use strict";var r=n(7),o=n(8),i=n(9),a=n(10),u=n(11),s=n(12);e.exports=function(e,n){var c="function"==typeof Symbol&&Symbol.iterator,l="<<anonymous>>",f={array:h("array"),bool:h("boolean"),func:h("function"),number:h("number"),object:h("object"),string:h("string"),symbol:h("symbol"),any:d(r.thatReturnsNull),arrayOf:function(e){return d((function(t,n,r,o,i){if("function"!=typeof e)return new y("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a))return new y("Invalid "+o+" `"+i+"` of type `"+g(a)+"` supplied to `"+r+"`, expected an array.");for(var s=0;s<a.length;s++){var c=e(a,s,r,o,i+"["+s+"]",u);if(c instanceof Error)return c}return null}))},element:d((function(t,n,r,o,i){var a=t[n];return e(a)?null:new y("Invalid "+o+" `"+i+"` of type `"+g(a)+"` supplied to `"+r+"`, expected a single ReactElement.")})),instanceOf:function(e){return d((function(t,n,r,o,i){if(t[n]instanceof e)return null;var a,u=e.name||l;return new y("Invalid "+o+" `"+i+"` of type `"+((a=t[n]).constructor&&a.constructor.name?a.constructor.name:l)+"` supplied to `"+r+"`, expected instance of `"+u+"`.")}))},node:d((function(e,t,n,r,o){return v(e[t])?null:new y("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return d((function(t,n,r,o,i){if("function"!=typeof e)return new y("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var a=t[n],s=g(a);if("object"!==s)return new y("Invalid "+o+" `"+i+"` of type `"+s+"` supplied to `"+r+"`, expected an object.");for(var c in a)if(a.hasOwnProperty(c)){var l=e(a,c,r,o,i+"."+c,u);if(l instanceof Error)return l}return null}))},oneOf:function(e){return Array.isArray(e)?d((function(t,n,r,o,i){for(var a=t[n],u=0;u<e.length;u++)if(p(a,e[u]))return null;return new y("Invalid "+o+" `"+i+"` of value `"+a+"` supplied to `"+r+"`, expected one of "+JSON.stringify(e)+".")})):("production"!==t.env.NODE_ENV&&i(!1,"Invalid argument supplied to oneOf, expected an instance of array."),r.thatReturnsNull)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==t.env.NODE_ENV&&i(!1,"Invalid argument supplied to oneOfType, expected an instance of array."),r.thatReturnsNull;for(var n=0;n<e.length;n++){var o=e[n];if("function"!=typeof o)return i(!1,"Invalid argument supplied to oneOfType. Expected an array of check functions, but received %s at index %s.",m(o),n),r.thatReturnsNull}return d((function(t,n,r,o,i){for(var a=0;a<e.length;a++)if(null==(0,e[a])(t,n,r,o,i,u))return null;return new y("Invalid "+o+" `"+i+"` supplied to `"+r+"`.")}))},shape:function(e){return d((function(t,n,r,o,i){var a=t[n],s=g(a);if("object"!==s)return new y("Invalid "+o+" `"+i+"` of type `"+s+"` supplied to `"+r+"`, expected `object`.");for(var c in e){var l=e[c];if(l){var f=l(a,c,r,o,i+"."+c,u);if(f)return f}}return null}))},exact:function(e){return d((function(t,n,r,o,i){var s=t[n],c=g(s);if("object"!==c)return new y("Invalid "+o+" `"+i+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");var l=a({},t[n],e);for(var f in l){var p=e[f];if(!p)return new y("Invalid "+o+" `"+i+"` key `"+f+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var d=p(s,f,r,o,i+"."+f,u);if(d)return d}return null}))}};function p(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function y(e){this.message=e,this.stack=""}function d(e){if("production"!==t.env.NODE_ENV)var r={},a=0;function s(s,c,f,p,d,h,v){if(p=p||l,h=h||f,v!==u)if(n)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"!==t.env.NODE_ENV&&"undefined"!=typeof console){var g=p+":"+f;!r[g]&&a<3&&(i(!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.",h,p),r[g]=!0,a++)}return null==c[f]?s?null===c[f]?new y("The "+d+" `"+h+"` is marked as required in `"+p+"`, but its value is `null`."):new y("The "+d+" `"+h+"` is marked as required in `"+p+"`, but its value is `undefined`."):null:e(c,f,p,d,h)}var c=s.bind(null,!1);return c.isRequired=s.bind(null,!0),c}function h(e){return d((function(t,n,r,o,i,a){var u=t[n];return g(u)===e?null:new y("Invalid "+o+" `"+i+"` of type `"+b(u)+"` supplied to `"+r+"`, expected `"+e+"`.")}))}function v(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(v);if(null===t||e(t))return!0;var n=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);if("function"==typeof t)return t}(t);if(!n)return!1;var r,o=n.call(t);if(n!==t.entries){for(;!(r=o.next()).done;)if(!v(r.value))return!1}else for(;!(r=o.next()).done;){var i=r.value;if(i&&!v(i[1]))return!1}return!0;default:return!1}}function g(e){var t,n=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":(t=e,"symbol"===n||"Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol?"symbol":n)}function b(e){if(null==e)return""+e;var t=g(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function m(e){var t=b(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return y.prototype=Error.prototype,f.checkPropTypes=s,f.PropTypes=f}}).call(t,n(5))},function(e,t){"use strict";function n(e){return function(){return e}}function r(){}r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){(function(t){"use strict";var n=function(){};"production"!==t.env.NODE_ENV&&(n=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")}),e.exports=function(e,t,r,o,i,a,u,s){if(n(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[r,o,i,a,u,s],f=0;(c=new Error(t.replace(/%s/g,(function(){return l[f++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}}}).call(t,n(5))},function(e,t,n){(function(t){"use strict";var r=n(7);"production"!==t.env.NODE_ENV&&(r=function(e,t){if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==t.indexOf("Failed Composite propType: ")&&!e){for(var n=arguments.length,r=Array(2<n?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];(function(e){for(var t=arguments.length,n=Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0,i="Warning: "+e.replace(/%s/g,(function(){return n[o++]}));"undefined"!=typeof console&&console.error(i);try{throw new Error(i)}catch(e){}}).apply(void 0,[t].concat(r))}}),e.exports=r}).call(t,n(5))},function(e,t){ /* object-assign (c) Sindre Sorhus @license MIT */ "use strict";var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},r)).join("")?void 0:1}catch(e){return}}()?Object.assign:function(e,t){for(var i,a,u=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;s<arguments.length;s++){for(var c in i=Object(arguments[s]))r.call(i,c)&&(u[c]=i[c]);if(n){a=n(i);for(var l=0;l<a.length;l++)o.call(i,a[l])&&(u[a[l]]=i[a[l]])}}return u}},function(e,t){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){(function(t){"use strict";if("production"!==t.env.NODE_ENV)var r=n(8),o=n(9),i=n(11),a={};e.exports=function(e,n,u,s,c){if("production"!==t.env.NODE_ENV)for(var l in e)if(e.hasOwnProperty(l)){var f;try{r("function"==typeof e[l],"%s: %s type `%s` is invalid; it must be a function, usually from the `prop-types` package, but received `%s`.",s||"React class",u,l,typeof e[l]),f=e[l](n,l,s,u,null,i)}catch(e){f=e}if(o(!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).",s||"React class",u,l,typeof f),f instanceof Error&&!(f.message in a)){a[f.message]=!0;var p=c?c():"";o(!1,"Failed %s type: %s%s",u,f.message,null!=p?p:"")}}}}).call(t,n(5))},function(e,t,n){"use strict";var r=n(7),o=n(8),i=n(11);e.exports=function(){function e(e,t,n,r,a,u){u!==i&&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}var n={array:e.isRequired=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,exact:t};return n.checkPropTypes=r,n.PropTypes=n}},function(e,t){e.exports=n(0)},function(e,t){"use strict";function n(e,t){return e===t}e.exports=function(e){function t(e,t){return r(e,i[t])}var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:n,o=void 0,i=[],a=void 0,u=!1;return function(){for(var n=arguments.length,r=Array(n),s=0;s<n;s++)r[s]=arguments[s];return u&&o===this&&r.length===i.length&&r.every(t)?a:(u=!0,o=this,i=r,a=e.apply(this,r))}}}],r.c=i,r.p="",r(0))},function(e,t,n){"use strict";var r=n(1),o=n(6),i=n(7),a=n(27),u=i();r(u,{getPolyfill:i,implementation:o,shim:a}),e.exports=u},function(e,t,n){e.exports=n(29)},function(e,t,n){},function(e,t,n){e.exports=n(15)},function(e,t,n){"use strict";function r(){return null}function o(){return r}r.isRequired=r,e.exports={and:o,between:o,booleanSome:o,childrenHavePropXorChildren:o,childrenOf:o,childrenOfType:o,childrenSequenceOf:o,componentWithName:o,disallowedIf:o,elementType:o,empty:o,explicitNull:o,forbidExtraProps:Object,integer:o,keysOf:o,mutuallyExclusiveProps:o,mutuallyExclusiveTrueProps:o,nChildren:o,nonNegativeInteger:r,nonNegativeNumber:o,numericString:o,object:o,or:o,predicate:o,range:o,ref:o,requiredBy:o,restrictedProp:o,sequenceOf:o,shape:o,stringEndsWith:o,stringStartsWith:o,uniqueArray:o,uniqueArrayOf:o,valuesOf:o,withShape:o}},function(e,t,n){"use strict";var r=Array.prototype.slice,o=n(5),i=Object.keys,a=i?function(e){return i(e)}:n(17),u=Object.keys;a.shim=function(){return Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return o(e)?u(r.call(e)):u(e)}):Object.keys=a,Object.keys||a},e.exports=a},function(e,t,n){"use strict";var r;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=n(5),u=Object.prototype.propertyIsEnumerable,s=!u.call({toString:null},"toString"),c=u.call((function(){}),"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(e){var t=e.constructor;return t&&t.prototype===e},p={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},y=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!p["$"+e]&&o.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{f(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();r=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===i.call(e),r=a(e),u=t&&"[object String]"===i.call(e),p=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var d=c&&n;if(u&&0<e.length&&!o.call(e,0))for(var h=0;h<e.length;++h)p.push(String(h));if(r&&0<e.length)for(var v=0;v<e.length;++v)p.push(String(v));else for(var g in e)d&&"prototype"===g||!o.call(e,g)||p.push(String(g));if(s)for(var b=function(e){if("undefined"==typeof window||!y)return f(e);try{return f(e)}catch(e){return!1}}(e),m=0;m<l.length;++m)b&&"constructor"===l[m]||!o.call(e,l[m])||p.push(l[m]);return p}}e.exports=r},function(e,t,n){"use strict";var r=n(2);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},function(e,t,n){"use strict";var r=Array.prototype.slice,o=Object.prototype.toString;e.exports=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==o.call(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var n,i=r.call(arguments,1),a=Math.max(0,t.length-i.length),u=[],s=0;s<a;s++)u.push("$"+s);if(n=Function("binder","return function ("+u.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof n){var o=t.apply(this,i.concat(r.call(arguments)));return Object(o)===o?o:this}return t.apply(e,i.concat(r.call(arguments)))})),t.prototype){var c=function(){};c.prototype=t.prototype,n.prototype=new c,c.prototype=null}return n}},function(e,t,n){"use strict";e.exports=n(21)},function(e,t,n){"use strict";var r=n(3)("%TypeError%");e.exports=function(e,t){if(null==e)throw new r(t||"Cannot call method on "+e);return e}},function(e,t,n){"use strict";(function(t){var r=t.Symbol,o=n(24);e.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&o()}}).call(this,n(23))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},function(e,t,n){"use strict";var r=n(3),o=n(26),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")?o(n):n}},function(e,t,n){"use strict";var r=n(2),o=n(3)("%Function%"),i=o.apply,a=o.call;e.exports=function(){return r.apply(a,arguments)},e.exports.apply=function(){return r.apply(i,arguments)}},function(e,t,n){"use strict";var r=n(7),o=n(1);e.exports=function(){var e=r();return o(Object,{values:e},{values:function(){return Object.values!==e}}),e}},function(e,t,n){"use strict";var r=n(1),o=n(9);e.exports=function(){var e=o();return"undefined"!=typeof document&&(r(document,{contains:e},{contains:function(){return document.contains!==e}}),"undefined"!=typeof Element&&r(Element.prototype,{contains:e},{contains:function(){return Element.prototype.contains!==e}})),e}},function(e,t,n){"use strict";function r(e){var t=e.highlighting,n=e.searchWords,r=e.value,o=e.status;return i.a.createElement("span",{className:"suggestions-value","data-suggestion-status":o},t?i.a.createElement(u.a,{highlightClassName:"suggestions-highlighting",searchWords:n,autoEscape:!0,textToHighlight:r}):r)}n.r(t);var o=n(0),i=n.n(o),a=(n(13),n(10)),u=n.n(a);function s(e){var t=e.children;return t?i.a.createElement("div",{className:"suggestions-subtext"},t):null}r.defaultProps={highlighting:!0};var c=r;s.defaultProps={};var l=s;function f(e){return(f="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})(e)}function p(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)}}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(r,o.Component);var e,t,n=function(e){return function(){var t,n,r,o=d(e);if(function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),1}catch(e){return}}}()){var i=d(this).constructor;t=Reflect.construct(o,arguments,i)}else t=o.apply(this,arguments);return n=this,!(r=t)||"object"!==f(r)&&"function"!=typeof r?y(n):r}}(r);function r(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return v(y(e=n.call.apply(n,[this].concat(o))),"state",{hover:!1}),v(y(e),"handleHover",(function(){return e.setHover(!0)})),v(y(e),"handleBlur",(function(){return e.setHover(!1)})),v(y(e),"setHover",(function(t){e.setState({hover:t})})),e}return e=r,(t=[{key:"render",value:function(){var e=this.props,t=e.selected,n=e.highlighting,r=e.searchWords,o=e.subtext,a=e.value,u=e.status,s=t||this.state.hover?" suggestions-selected":"";return i.a.createElement("div",{className:"suggestions-suggestion".concat(s),onMouseEnter:this.handleHover,onMouseLeave:this.handleBlur,onMouseDown:this.props.onSelect},i.a.createElement(c,{highlighting:n,searchWords:r,value:a,status:u}),i.a.createElement(l,null,o))}}])&&p(e.prototype,t),r}();function b(e){return e&&"function"==typeof e}function m(e){return["data","state","status"].reduce((function(e,t){return e&&e[t]?e[t]:null}),e)}function O(e){var t=e.suggestions,n=e.visible,r=e.selected;return t.length&&n?i.a.createElement("div",{className:"suggestions-wrapper"},i.a.createElement("div",{className:"suggestions-suggestions"},i.a.createElement("div",{className:"suggestions-hint"},e.hint),t.map((function(t,n){return i.a.createElement(w,{key:n,index:n,selected:n===r,onSelect:e.onSelect(n),searchWords:e.highlighting?e.searchWords():[],highlighting:e.highlighting,value:e.suggestionsFormatter(t),subtext:e.subtextFormatter(t),status:m(t)})})))):null}g.defaultProps={};var w=g;function S(e){var t=e.name,n=e.loading,r=e.placeholder,o=e.query,a=e.disabled,u=e.readOnly,s=e.onChange,c=e.onMouseDown,l=e.onKeyPress,f=e.onBlur,p=e.onFocus,y="suggestions-input".concat(n?" loading":"");return i.a.createElement("input",{type:"text",className:y,autoComplete:"off",name:t,placeholder:r,value:o,disabled:a,readOnly:u,onChange:s,onMouseDown:c,onKeyPress:l,onKeyDown:l,onBlur:f,onFocus:p})}O.defaultProps={};var E=O;S.defaultProps={loading:!1,placeholder:""};var P=S,j=(n(14),!("undefined"==typeof window||!window.document||!window.document.createElement)),x=void 0;function A(e){e.handlers===e.nextHandlers&&(e.nextHandlers=e.handlers.slice())}function _(e){this.target=e,this.events={}}_.prototype.getEventHandlers=function(e,t){var n,r=String(e)+" "+String((n=t)?!0===n?100:(n.capture<<0)+(n.passive<<1)+(n.once<<2):0);return this.events[r]||(this.events[r]={handlers:[],handleEvent:void 0},this.events[r].nextHandlers=this.events[r].handlers),this.events[r]},_.prototype.handleEvent=function(e,t,n){var r=this.getEventHandlers(e,t);r.handlers=r.nextHandlers,r.handlers.forEach((function(e){e&&e(n)}))},_.prototype.add=function(e,t,n){var r=this,o=this.getEventHandlers(e,n);A(o),0===o.nextHandlers.length&&(o.handleEvent=this.handleEvent.bind(this,e,n),this.target.addEventListener(e,o.handleEvent,n)),o.nextHandlers.push(t);var i=!0;return function(){if(i){i=!1,A(o);var a=o.nextHandlers.indexOf(t);o.nextHandlers.splice(a,1),0===o.nextHandlers.length&&(r.target&&r.target.removeEventListener(e,o.handleEvent,n),o.handleEvent=void 0)}}};var k="__consolidated_events_handlers__";function T(e,t,n,r){e[k]||(e[k]=new _(e));var o=function(e){if(e)return void 0===x&&(x=function(){if(!j)return!1;if(!window.addEventListener||!window.removeEventListener||!Object.defineProperty)return!1;var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}}),n=function(){};window.addEventListener("testPassiveEventSupport",n,t),window.removeEventListener("testPassiveEventSupport",n,t)}catch(e){}return e}()),x?e:!!e.capture}(r);return e[k].add(t,n,o)}var N=n(11),I=n.n(N),R=n(4),C=n.n(R);function D(e){return(D="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})(e)}function F(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)}}function M(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function U(e){return(U=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function L(e,t){return(L=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var q={BLOCK:"block",FLEX:"flex",INLINE:"inline",INLINE_BLOCK:"inline-block",CONTENTS:"contents"},W={disabled:!1,useCapture:!0,display:q.BLOCK},B=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&L(e,t)}(r,i.a.Component);var e,t,n=function(e){return function(){var t,n,r,o=U(e);if(function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),1}catch(e){return}}}()){var i=U(this).constructor;t=Reflect.construct(o,arguments,i)}else t=o.apply(this,arguments);return n=this,!(r=t)||"object"!==D(r)&&"function"!=typeof r?M(n):r}}(r);function r(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return(e=n.call.apply(n,[this].concat(o))).onMouseDown=e.onMouseDown.bind(M(e)),e.onMouseUp=e.onMouseUp.bind(M(e)),e.setChildNodeRef=e.setChildNodeRef.bind(M(e)),e}return e=r,(t=[{key:"componentDidMount",value:function(){var e=this.props,t=e.disabled,n=e.useCapture;t||this.addMouseDownEventListener(n)}},{key:"componentDidUpdate",value:function(e){var t=e.disabled,n=this.props,r=n.disabled,o=n.useCapture;t!==r&&(r?this.removeEventListeners():this.addMouseDownEventListener(o))}},{key:"componentWillUnmount",value:function(){this.removeEventListeners()}},{key:"onMouseDown",value:function(e){var t=this.props.useCapture;this.childNode&&C()(this.childNode,e.target)||(this.removeMouseUp&&(this.removeMouseUp(),this.removeMouseUp=null),this.removeMouseUp=T(document,"mouseup",this.onMouseUp,{capture:t}))}},{key:"onMouseUp",value:function(e){var t=this.props.onOutsideClick,n=this.childNode&&C()(this.childNode,e.target);this.removeMouseUp&&(this.removeMouseUp(),this.removeMouseUp=null),n||t(e)}},{key:"setChildNodeRef",value:function(e){this.childNode=e}},{key:"addMouseDownEventListener",value:function(e){this.removeMouseDown=T(document,"mousedown",this.onMouseDown,{capture:e})}},{key:"removeEventListeners",value:function(){this.removeMouseDown&&this.removeMouseDown(),this.removeMouseUp&&this.removeMouseUp()}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.display;return i.a.createElement("div",{ref:this.setChildNodeRef,style:n!==q.BLOCK&&I()(q).includes(n)?{display:n}:void 0,className:this.props.className},t)}}])&&F(e.prototype,t),r}();B.defaultProps=W;var H=function(e){e.shiftKey||e.ctrlKey||e.altKey||[new J(e,this),new Y(e,this),new V(e,this),new $(e,this),new K(e,this)].map((function(t){t.KEY_CODE===e.which&&t.handle()}))},$=function(e,t){return{KEY_CODE:9,handle:function(){t.state.showSuggestions&&new V(e,t).handle()}}},V=function(e,t){return{KEY_CODE:13,handle:function(){var n=t.state,r=n.selected,o=n.suggestions;if(e.preventDefault(),-1!==r)t.handleSelect(r)();else if(o.length){var i=t.state.query.trim(),a=o.findIndex((function(e){return e.value===i}));-1!==a&&t.handleSelect(a)()}}}},K=function(e,t){return{KEY_CODE:27,handle:function(){e.preventDefault(),t.makeListInvisible()}}},J=function(e,t){return{KEY_CODE:38,handle:function(){e.preventDefault();var n=t.state,r=n.selected,o=n.suggestions;if(n.showSuggestions){var i=o.length-1,a=0<r?r-1:i;t.selectSuggestion(a)}}}},Y=function(e,t){return{KEY_CODE:40,handle:function(){e.preventDefault();var n=t.state,r=n.selected,o=n.suggestions,i=n.showSuggestions;if(i||!o.length){if(i){var a=r<o.length-1?r+1:0;t.selectSuggestion(a)}}else t.makeListVisible()}}};function z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,G),this.locations_boost=[],this.token=e}z(G,"apiUrl","https://suggestions.dadata.ru/suggestions/api/4_1/rs"),z(G,"FIO","fio"),z(G,"ADDRESS","address"),z(G,"ORGANISATION","party"),z(G,"BANK","bank"),z(G,"EMAIL","email");var X=G,Q=function(e){return new Headers({"Content-Type":"application/json",Accept:"application/json",Authorization:"Token ".concat(e)})},Z=function(e){return function(t,n){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,o={endpoint:t,method:n,headers:e};return r&&(o.body=JSON.stringify(r)),new Request(t,o)}};function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function te(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ne(e){return(ne="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})(e)}function re(e){return function(e){if(Array.isArray(e))return oe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return oe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oe(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ie(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ae(e){return(ae=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ue(e,t){return(ue=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function se(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ce=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ue(e,t)}(t,X);var e=function(e){return function(){var t,n,r,o=ae(e);if(function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),1}catch(e){return}}}()){var i=ae(this).constructor;t=Reflect.construct(o,arguments,i)}else t=o.apply(this,arguments);return n=this,!(r=t)||"object"!==ne(r)&&"function"!=typeof r?ie(n):r}}(t);function t(n,r){var o,i=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),se(ie(o=e.call(this,n)),"detectAddress",(function(){var e="".concat(X.apiUrl,"/detectAddressByIp"),t=o.requestFactory(e,"GET");fetch(t).then((function(e){return e.json()})).then((function(e){return e.location.data})).then((function(e){return e?e.kladr_id:null})).then((function(e){e&&(o.locations_boost=[].concat(re(o.locations_boost),[{kladr_id:e}]))})).catch((function(){return null}))})),se(ie(o),"suggestions",(function(e){o.locations_boost.length&&(e.locations_boost=o.locations_boost);var t=o.requestFactory(o.endpoint,"POST",e);return fetch(t).then((function(e){if(!e.ok)throw Error(e.statusText);return e.json()})).then((function(e){return e.suggestions}))})),o.headers=Q(n),o.requestFactory=Z(o.headers),o.endpoint="".concat(X.apiUrl,"/suggest/").concat(r),i&&r.toLowerCase()===X.ADDRESS&&o.detectAddress(),o}return t}(),le=["аобл","респ","вл","г","гск","д","двлд","днп","дор","дп","жт","им","к","кв","кв-л","км","комн","кп","лпх","м","мкр","наб","нп","обл","оф","п","пгт","пер","пл","платф","рзд","рп","р-н","с","сл","снт","ст","стр","тер","туп","ул","х","ш"];function fe(e){return(fe="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})(e)}function pe(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)}}function ye(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function de(e){return(de=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function he(e,t){return(he=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ge=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&he(e,t)}(r,o.Component);var e,t,n=function(e){return function(){var t,n,r,o=de(e);if(function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),1}catch(e){return}}}()){var i=de(this).constructor;t=Reflect.construct(o,arguments,i)}else t=o.apply(this,arguments);return n=this,!(r=t)||"object"!==fe(r)&&"function"!=typeof r?ye(n):r}}(r);function r(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),ve(ye(t=n.call(this,e)),"state",{query:"",suggestions:[],selected:-1,loading:!1,success:!1,error:!1,showSuggestions:!1}),ve(ye(t),"clearFetchTimeout",(function(){t.fetchTimeoutId&&clearTimeout(t.fetchTimeoutId)})),ve(ye(t),"fetchData",(function(e){t._isMounted&&t.setState({loading:!0,success:!1});var n=function(e,t){var n=t.count,r=t.specialRequestOptions;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(n),!0).forEach((function(t){te(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({query:e,count:n},void 0===r?{}:r)}(e,t.props);t.api.suggestions(n).then((function(e){t._isMounted&&t.setState({suggestions:e,loading:!1,error:!1,success:!0,showSuggestions:!0})})).catch((function(e){return t.handleError(e)}))})),ve(ye(t),"searchWords",(function(){var e=t.state.query.split(/[^-А-Яа-яЁё\d\w]+/);return t.props.service===ce.ADDRESS?e.filter((function(e){return!le.includes(e)})):e})),ve(ye(t),"handleChange",(function(e){var n=t.props.deferRequestBy;t.clearFetchTimeout()