UNPKG

92.8 kBJavaScriptView Raw
1!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["exports","react","react-dom"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactBootstrapTypeahead={},e.React,e.ReactDOM)}(this,(function(e,t,n){"use strict";var r="default"in t?t.default:t;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 i(){return(i=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}).apply(this,arguments)}function a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function l(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n=n&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n;var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function c(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var f=/^\s+|\s+$/g,p=/^[-+]0x[0-9a-f]+$/i,d=/^0b[01]+$/i,h=/^0o[0-7]+$/i,y=parseInt,m="object"==typeof u&&u&&u.Object===Object&&u,b="object"==typeof self&&self&&self.Object===Object&&self,v=m||b||Function("return this")(),g=Object.prototype.toString,w=Math.max,O=Math.min,E=function(){return v.Date.now()};function S(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function x(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==g.call(e)}(e))return NaN;if(S(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=S(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(f,"");var n=d.test(e);return n||h.test(e)?y(e.slice(2),n?2:8):p.test(e)?NaN:+e}var I=function(e,t,n){var r,o,i,a,l,s,u=0,c=!1,f=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function d(t){var n=r,i=o;return r=o=void 0,u=t,a=e.apply(i,n)}function h(e){return u=e,l=setTimeout(m,t),c?d(e):a}function y(e){var n=e-s;return void 0===s||n>=t||n<0||f&&e-u>=i}function m(){var e=E();if(y(e))return b(e);l=setTimeout(m,function(e){var n=t-(e-s);return f?O(n,i-(e-u)):n}(e))}function b(e){return l=void 0,p&&r?d(e):(r=o=void 0,a)}function v(){var e=E(),n=y(e);if(r=arguments,o=this,s=e,n){if(void 0===l)return h(s);if(f)return l=setTimeout(m,t),d(s)}return void 0===l&&(l=setTimeout(m,t)),a}return t=x(t)||0,S(n)&&(c=!!n.leading,i=(f="maxWait"in n)?w(x(n.maxWait)||0,t):i,p="trailing"in n?!!n.trailing:p),v.cancel=function(){void 0!==l&&clearTimeout(l),u=0,r=s=o=l=void 0},v.flush=function(){return void 0===l?a:b(E())},v},P="function"==typeof Symbol&&Symbol.for,C=P?Symbol.for("react.element"):60103,A=P?Symbol.for("react.portal"):60106,j=P?Symbol.for("react.fragment"):60107,T=P?Symbol.for("react.strict_mode"):60108,R=P?Symbol.for("react.profiler"):60114,N=P?Symbol.for("react.provider"):60109,M=P?Symbol.for("react.context"):60110,k=P?Symbol.for("react.async_mode"):60111,F=P?Symbol.for("react.concurrent_mode"):60111,D=P?Symbol.for("react.forward_ref"):60112,_=P?Symbol.for("react.suspense"):60113,L=P?Symbol.for("react.suspense_list"):60120,B=P?Symbol.for("react.memo"):60115,U=P?Symbol.for("react.lazy"):60116,H=P?Symbol.for("react.block"):60121,W=P?Symbol.for("react.fundamental"):60117,$=P?Symbol.for("react.responder"):60118,K=P?Symbol.for("react.scope"):60119;
2/** @license React v16.13.1
3 * react-is.production.min.js
4 *
5 * Copyright (c) Facebook, Inc. and its affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */function V(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case C:switch(e=e.type){case k:case F:case j:case R:case T:case _:return e;default:switch(e=e&&e.$$typeof){case M:case D:case U:case B:case N:return e;default:return t}}case A:return t}}}function q(e){return V(e)===F}var Y={AsyncMode:k,ConcurrentMode:F,ContextConsumer:M,ContextProvider:N,Element:C,ForwardRef:D,Fragment:j,Lazy:U,Memo:B,Portal:A,Profiler:R,StrictMode:T,Suspense:_,isAsyncMode:function(e){return q(e)||V(e)===k},isConcurrentMode:q,isContextConsumer:function(e){return V(e)===M},isContextProvider:function(e){return V(e)===N},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===C},isForwardRef:function(e){return V(e)===D},isFragment:function(e){return V(e)===j},isLazy:function(e){return V(e)===U},isMemo:function(e){return V(e)===B},isPortal:function(e){return V(e)===A},isProfiler:function(e){return V(e)===R},isStrictMode:function(e){return V(e)===T},isSuspense:function(e){return V(e)===_},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===j||e===F||e===R||e===T||e===_||e===L||"object"==typeof e&&null!==e&&(e.$$typeof===U||e.$$typeof===B||e.$$typeof===N||e.$$typeof===M||e.$$typeof===D||e.$$typeof===W||e.$$typeof===$||e.$$typeof===K||e.$$typeof===H)},typeOf:V},z=(c((function(e,t){})),c((function(e){e.exports=Y})),Object.getOwnPropertySymbols),G=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable;function X(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;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!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}})()&&Object.assign,Function.call.bind(Object.prototype.hasOwnProperty);function Z(){}function Q(){}Q.resetWarningCache=Z;var ee=c((function(e){e.exports=function(){function e(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("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");throw a.name="Invariant Violation",a}}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,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Q,resetWarningCache:Z};return n.PropTypes=n,n}()}));function te(e){var n=t.useRef(null);return t.useEffect((function(){n.current=e})),n.current}var ne=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!=o--;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!=o--;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;0!=o--;){var a=i[o];if(!e(t[a],n[a]))return!1}return!0}return t!=t&&n!=n},re=function(e,t,n,r,o,i,a,l){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,o,i,a,l],c=0;(s=new Error(t.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}},oe={JUSTIFY:"justify",LEFT:"left",RIGHT:"right"};function ie(e){return"string"==typeof e?e:"label"}var ae=0;function le(e){return Array.isArray(e)&&e.length?e[0]:void 0}function se(e){return"function"==typeof e}function ue(e){return"string"==typeof e}function ce(){}function fe(e,t){var n={};return t.forEach((function(t){Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])})),n}function pe(e){return ae+=1,(null==e?"":String(e))+ae}function de(e){return se(Object.values)?Object.values(e):function(e){return Object.keys(e).reduce((function(t,n){return Object.prototype.propertyIsEnumerable.call(e,n)&&t.push(e[n]),t}),[])}(e)}function he(e,t){return ue(e)||!e.paginationOption&&!e.customOption?(n=se(t)?t(e):ue(e)?e:e[t],ue(n)||re(!1),n):e[ie(t)];var n}function ye(e,t){if(!ue(e))return e[t]}for(var me=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹÐ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"OE",letters:"ŒŒ"},{base:"oe",letters:"œœ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],be={},ve=0;ve<me.length;ve++)for(var ge=me[ve].letters,we=0;we<ge.length;we++)be[ge[we]]=me[ve].base;function Oe(e){return e.replace(/[\u0300-\u036F]/g,"").replace(/[^\u0000-\u007E]/g,(function(e){return be[e]||e}))}var Ee=function(){},Se={};function xe(e,t){if(!e&&-1!==t.indexOf("deprecated")){if(Se[t])return;Se[t]=!0}for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];Ee.apply(void 0,[e,"[react-bootstrap-typeahead] "+t].concat(r))}function Ie(e,t,n){var r=e,o=t;return n.caseSensitive||(r=r.toLowerCase(),o=o.toLowerCase()),n.ignoreDiacritics&&(r=Oe(r),o=Oe(o)),-1!==o.indexOf(r)}function Pe(e,t){var n=t.filterBy,r=t.labelKey,o=t.multiple,i=t.selected,a=t.text;if(o&&i.some((function(t){return ne(t,e)})))return!1;if(se(r)&&Ie(a,r(e),t))return!0;var l=n.slice();return ue(r)&&-1===l.indexOf(r)&&l.unshift(r),ue(e)?(xe(l.length<=1,"You cannot filter by properties when `option` is a string."),Ie(a,e,t)):l.some((function(n){var r=ye(e,n);return ue(r)||(xe(!1,"Fields passed to `filterBy` should have string values. Value will be converted to a string; results may be unexpected."),r=String(r)),Ie(a,r,t)}))}function Ce(e){return e.displayName||e.name||"Component"}var Ae=/[\u0300-\u036F]/;function je(e,t){var n=new RegExp(function(e){return"string"!=typeof e&&re(!1),e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(Oe(t)),"i").exec(Oe(e));if(!n)return null;var r=n.index,o=n[0].length;if(Ae.test(e)){for(var i=0;i<=r;i++)Ae.test(e[i])&&(r+=1);for(var a=r;a<=r+o;a++)Ae.test(e[a])&&(o+=1)}return{end:r+o,start:r}}function Te(e){var t=e.activeIndex,n=e.initialItem,r=e.isFocused,o=e.isMenuShown,i=e.labelKey,a=e.multiple,l=e.selected,s=e.text;if(!s||!r||!o||!n||n.customOption||t>-1||l.length&&!a)return"";var u=he(n,i),c=je(u.toLowerCase(),s.toLowerCase());return c&&0===c.start?s+u.slice(c.end,u.length):""}var Re=c((function(e){
10/*!
11 Copyright (c) 2017 Jed Watson.
12 Licensed under the MIT License (MIT), see
13 http://jedwatson.github.io/classnames
14 */
15!function(){var t={}.hasOwnProperty;function n(){for(var e=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var i=typeof o;if("string"===i||"number"===i)e.push(o);else if(Array.isArray(o)&&o.length){var a=n.apply(null,o);a&&e.push(a)}else if("object"===i)for(var l in o)t.call(o,l)&&o[l]&&e.push(l)}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}));function Ne(e,t){return(e||"")+"-item-"+t}var Me=function(e){var t=e.activeIndex,n=e.id,r=e.isFocused,o=e.isMenuShown,a=e.multiple,s=e.onFocus,u=e.placeholder,c=l(e,["activeIndex","id","isFocused","isMenuShown","multiple","onFocus","placeholder"]);return function(e){var f,p=void 0===e?{}:e,d=p.className,h=l(p,["className"]),y=i({autoComplete:"off",placeholder:u,type:"text"},h,c,{"aria-activedescendant":t>=0?Ne(n,t):void 0,"aria-autocomplete":"both","aria-expanded":o,"aria-haspopup":"listbox","aria-owns":o?n:void 0,className:Re((f={},f[d||""]=!a,f.focus=r,f)),onClick:s,onFocus:s,role:"combobox"});return a?i({},y,{"aria-autocomplete":"list","aria-expanded":void 0,inputClassName:d,role:void 0}):y}};function ke(e){var t=e.activeItem,n=e.labelKey,r=e.multiple,o=e.selected,i=e.text;if(t)return he(t,n);var a=!r&&!!o.length&&le(o);return a?he(a,n):i}function Fe(e){var t=e.allowNew,n=e.highlightOnlyResult,r=e.results;return!(!n||t)&&(1===r.length&&!ye(le(r),"disabled"))}function De(e,t,n){for(var r=e;n[r]&&n[r].disabled;)r+=38===t?-1:1;return r}function _e(e,t,n){var r=e;return(r=De(r+=38===t?-1:1,t,n))===n.length?r=-1:-2===r&&(r=De(r=n.length-1,t,n)),r}function Le(e){return null!=e.selectionStart}function Be(e){e.preventDefault()}function Ue(e){return"large"===e||"lg"===e}function He(e){return"small"===e||"sm"===e}var We=t.createContext({activeIndex:-1,hintText:"",id:"",initialItem:null,inputNode:null,isOnlyResult:!1,onActiveItemChange:ce,onAdd:ce,onInitialItemChange:ce,onMenuItemClick:ce,selectHintOnEnter:void 0,setItem:ce}),$e=function(){return t.useContext(We)},Ke=["activeIndex","disabled","id","inputRef","isFocused","isMenuShown","multiple","onBlur","onChange","onFocus","onKeyDown","placeholder"],Ve=["activeIndex","hideMenu","isMenuShown","labelKey","onClear","onHide","onRemove","results","selected","text","toggleMenu"],qe=["activeIndex","id","initialItem","inputNode","onActiveItemChange","onAdd","onInitialItemChange","onMenuItemClick","selectHintOnEnter","setItem"],Ye=function(e){var n=e.allowNew,o=e.children,a=e.initialItem,l=e.isMenuShown,s=e.onAdd,u=e.onInitialItemChange,c=e.onKeyDown,f=e.onMenuToggle,p=e.results,d=te(e);t.useEffect((function(){n||p.length||u(null)})),t.useEffect((function(){d&&d.isMenuShown!==l&&f(l)}));var h=i({},fe(e,Ve),{getInputProps:Me(i({},fe(e,Ke),{onKeyDown:function(t){switch(t.keyCode){case 13:a&&Fe(e)&&s(a)}c(t)},value:ke(e)}))}),y=i({},fe(e,qe),{hintText:Te(e),isOnlyResult:Fe(e)});return r.createElement(We.Provider,{value:y},o(h))},ze=[{alt:"onBlur",prop:"onBlur"},{alt:"onInputChange",prop:"onChange"},{alt:"onFocus",prop:"onFocus"},{alt:"onKeyDown",prop:"onKeyDown"}],Ge=ee.oneOf(de({LARGE:"large",LG:"lg",SM:"sm",SMALL:"small"}));function Je(e,t){return function(n,r,o){var i;ee.checkPropTypes(((i={})[r]=e,i),n,"prop",o),se(t)&&t(n,r,o)}}function Xe(e,t,n){xe(null!=e[t],"The prop `"+t+"` is required to make `"+n+"` accessible for users of assistive technologies such as screen readers.")}var Ze=ee.oneOfType([ee.object,ee.string]);var Qe,et,tt={allowNew:ee.oneOfType([ee.bool,ee.func]),autoFocus:ee.bool,caseSensitive:Je(ee.bool,(function(e,t,n){var r=e.caseSensitive,o=e.filterBy;xe(!r||"function"!=typeof o,"Your `filterBy` function will override the `caseSensitive` prop.")})),defaultInputValue:Je(ee.string,(function(e,t,n){var r=e.defaultInputValue,o=e.defaultSelected,i=e.multiple,a=e.selected,l=o.length?"defaultSelected":"selected";xe(!(!i&&r&&(o.length||a&&a.length)),"`defaultInputValue` will be overridden by the value from `"+l+"`.")})),defaultOpen:ee.bool,defaultSelected:Je(ee.arrayOf(Ze),(function(e,t,n){var r=e.defaultSelected;xe(e.multiple||r.length<=1,"You are passing multiple options to the `defaultSelected` prop of a Typeahead in single-select mode. The selections will be truncated to a single selection.")})),filterBy:ee.oneOfType([ee.arrayOf(ee.string.isRequired),ee.func]),highlightOnlyResult:Je(ee.bool,(function(e,t,n){var r=e.allowNew;xe(!(e.highlightOnlyResult&&r),"`highlightOnlyResult` will not work with `allowNew`.")})),id:Je(ee.oneOfType([ee.number,ee.string]),Xe),ignoreDiacritics:Je(ee.bool,(function(e,t,n){var r=e.filterBy;xe(e.ignoreDiacritics||"function"!=typeof r,"Your `filterBy` function will override the `ignoreDiacritics` prop.")})),labelKey:Je(ee.oneOfType([ee.string,ee.func]),(function(e,t,n){var r=e.allowNew;xe(!(se(e.labelKey)&&r),"`labelKey` must be a string when `allowNew={true}`.")})),maxResults:ee.number,minLength:ee.number,multiple:ee.bool,onBlur:ee.func,onChange:ee.func,onFocus:ee.func,onInputChange:ee.func,onKeyDown:ee.func,onMenuToggle:ee.func,onPaginate:ee.func,open:ee.bool,options:ee.arrayOf(Ze).isRequired,paginate:ee.bool,selected:Je(ee.arrayOf(Ze),(function(e,t,n){var r=e.multiple,o=e.onChange,i=e.selected;xe(r||!i||i.length<=1,"You are passing multiple options to the `selected` prop of a Typeahead in single-select mode. This may lead to unexpected behaviors or errors."),xe(!i||i&&se(o),"You provided a `selected` prop without an `onChange` handler. If you want the typeahead to be uncontrolled, use `defaultSelected`. Otherwise, set `onChange`.")})),selectHintOnEnter:(Qe=ee.bool,et="Use the `shouldSelect` prop on the `Hint` component to define which keystrokes can select the hint.",function(e,t,n){var r;return null!=e[t]&&xe(!1,"The `"+t+"` prop is deprecated. "+et),ee.checkPropTypes(((r={})[t]=Qe,r),e,"prop",n)})},nt={allowNew:!1,autoFocus:!1,caseSensitive:!1,defaultInputValue:"",defaultOpen:!1,defaultSelected:[],filterBy:[],highlightOnlyResult:!1,ignoreDiacritics:!0,labelKey:"label",maxResults:100,minLength:0,multiple:!1,onBlur:ce,onFocus:ce,onInputChange:ce,onKeyDown:ce,onMenuToggle:ce,onPaginate:ce,paginate:!0};function rt(e){var t=e.defaultInputValue,n=e.defaultOpen,r=e.defaultSelected,o=e.maxResults,i=e.multiple,a=e.selected?e.selected.slice():r.slice(),l=t;return!i&&a.length&&(l=he(le(a),e.labelKey),a.length>1&&(a=a.slice(0,1))),{activeIndex:-1,activeItem:null,initialItem:null,isFocused:!1,selected:a,showMenu:n,shownResults:o,text:l}}function ot(e,t){return i({},rt(t),{isFocused:e.isFocused,selected:[],text:""})}function it(e,t){var n=rt(t);return{activeIndex:n.activeIndex,activeItem:n.activeItem,initialItem:n.initialItem,showMenu:!1,shownResults:n.shownResults}}function at(e,t){return e.showMenu?it(0,t):{showMenu:!0}}var lt=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return o(s(t=e.call.apply(e,[this].concat(r))||this),"state",rt(t.props)),o(s(t),"inputNode",void 0),o(s(t),"isMenuShown",!1),o(s(t),"items",[]),o(s(t),"blur",(function(){t.inputNode&&t.inputNode.blur(),t.hideMenu()})),o(s(t),"clear",(function(){t.setState(ot)})),o(s(t),"focus",(function(){t.inputNode&&t.inputNode.focus()})),o(s(t),"getInput",(function(){return t.inputNode})),o(s(t),"inputRef",(function(e){t.inputNode=e})),o(s(t),"setItem",(function(e,n){t.items[n]=e})),o(s(t),"hideMenu",(function(){t.setState(it)})),o(s(t),"toggleMenu",(function(){t.setState(at)})),o(s(t),"_handleActiveIndexChange",(function(e){t.setState((function(t){return{activeIndex:e,activeItem:-1===e?null:t.activeItem}}))})),o(s(t),"_handleActiveItemChange",(function(e){ne(e,t.state.activeItem)||t.setState({activeItem:e})})),o(s(t),"_handleBlur",(function(e){e.persist(),t.setState({isFocused:!1},(function(){return t.props.onBlur(e)}))})),o(s(t),"_handleChange",(function(e){t.props.onChange&&t.props.onChange(e)})),o(s(t),"_handleClear",(function(){t.setState(ot,(function(){return t._handleChange([])}))})),o(s(t),"_handleFocus",(function(e){e.persist(),t.setState({isFocused:!0,showMenu:!0},(function(){return t.props.onFocus(e)}))})),o(s(t),"_handleInitialItemChange",(function(e){ne(e,t.state.initialItem)||t.setState({initialItem:e})})),o(s(t),"_handleInputChange",(function(e){e.persist();var n=e.currentTarget.value,r=t.props,o=r.multiple,i=r.onInputChange,a=t.state.selected.length&&!o;t.setState((function(e,t){var r=rt(t),o=r.activeIndex,i=r.activeItem,l=r.shownResults;return{activeIndex:o,activeItem:i,selected:a?[]:e.selected,showMenu:!0,shownResults:l,text:n}}),(function(){i(n,e),a&&t._handleChange([])}))})),o(s(t),"_handleKeyDown",(function(e){var n=t.state.activeItem;if(!t.isMenuShown)return 38!==e.keyCode&&40!==e.keyCode||t.setState({showMenu:!0}),void t.props.onKeyDown(e);switch(e.keyCode){case 38:case 40:e.preventDefault(),t._handleActiveIndexChange(_e(t.state.activeIndex,e.keyCode,t.items));break;case 13:e.preventDefault(),n&&t._handleMenuItemSelect(n,e);break;case 27:case 9:t.hideMenu()}t.props.onKeyDown(e)})),o(s(t),"_handleMenuItemSelect",(function(e,n){e.paginationOption?t._handlePaginate(n):t._handleSelectionAdd(e)})),o(s(t),"_handlePaginate",(function(e){e.persist(),t.setState((function(e,t){return{shownResults:e.shownResults+t.maxResults}}),(function(){return t.props.onPaginate(e,t.state.shownResults)}))})),o(s(t),"_handleSelectionAdd",(function(e){var n,r,o=t.props,a=o.multiple,l=o.labelKey,s=e;!ue(s)&&s.customOption&&(s=i({},s,{id:pe("new-id-")})),a?(n=t.state.selected.concat(s),r=""):(n=[s],r=he(s,l)),t.setState((function(e,t){return i({},it(0,t),{initialItem:s,selected:n,text:r})}),(function(){return t._handleChange(n)}))})),o(s(t),"_handleSelectionRemove",(function(e){var n=t.state.selected.filter((function(t){return!ne(t,e)}));t.focus(),t.setState((function(e,t){return i({},it(0,t),{selected:n})}),(function(){return t._handleChange(n)}))})),t}a(t,e);var n=t.prototype;return n.componentDidMount=function(){this.props.autoFocus&&this.focus()},n.componentDidUpdate=function(e,t){var n=this.props,r=n.labelKey,o=n.multiple,i=n.selected;!function(e,t){var n,r,o,i=!e&&t;i?(n="uncontrolled",r="controlled",o="an"):(n="controlled",r="uncontrolled",o="a"),xe(!(i||e&&!t),"You are changing "+o+" "+n+" typeahead to be "+r+". Input elements should not switch from "+n+" to "+r+" (or vice versa). Decide between using a controlled or uncontrolled element for the lifetime of the component.")}(i,e.selected),i&&!ne(i,t.selected)&&(this.setState({selected:i}),o||this.setState({text:i.length?he(le(i),r):""}))},n.render=function(){var e=this.props,t=(e.onChange,i({},l(e,["onChange"]),this.state)),n=t.filterBy,o=t.labelKey,a=t.options,s=t.paginate,u=t.shownResults,c=t.text;this.isMenuShown=function(e){var t=e.open,n=e.minLength,r=e.showMenu,o=e.text;return t||!1===t?t:!(o.length<n)&&r}(t),this.items=[];var f=[];if(this.isMenuShown){var p="function"==typeof n?n:Pe;f=a.filter((function(e){return p(e,t)}));var d,h,y=s&&f.length>u;if(function(e,t){var n=t.allowNew,r=t.labelKey,o=t.text;return!(!n||!o.trim())&&("function"==typeof n?n(e,t):!e.some((function(e){return he(e,r)===o})))}(f=function(e,t){return!t||t>=e.length?e:e.slice(0,t)}(f,u),t))f.push(((d={customOption:!0})[ie(o)]=c,d));if(y)f.push(((h={})[ie(o)]="",h.paginationOption=!0,h))}return r.createElement(Ye,i({},t,{hideMenu:this.hideMenu,inputNode:this.inputNode,inputRef:this.inputRef,isMenuShown:this.isMenuShown,onActiveItemChange:this._handleActiveItemChange,onAdd:this._handleSelectionAdd,onBlur:this._handleBlur,onChange:this._handleInputChange,onClear:this._handleClear,onFocus:this._handleFocus,onHide:this.hideMenu,onInitialItemChange:this._handleInitialItemChange,onKeyDown:this._handleKeyDown,onMenuItemClick:this._handleMenuItemSelect,onRemove:this._handleSelectionRemove,results:f,setItem:this.setItem,toggleMenu:this.toggleMenu}))},t}(r.Component);o(lt,"propTypes",tt),o(lt,"defaultProps",nt);var st={delay:ee.number,isLoading:ee.bool.isRequired,minLength:ee.number,onSearch:ee.func.isRequired,options:ee.arrayOf(Ze),promptText:ee.node,searchText:ee.node,useCache:ee.bool},ut={delay:200,minLength:2,options:[],promptText:"Type to search...",searchText:"Searching...",useCache:!0};function ct(e){var n=e.allowNew,r=e.delay,o=e.emptyLabel,a=e.isLoading,s=e.minLength,u=e.onInputChange,c=e.onSearch,f=e.options,p=e.promptText,d=e.searchText,h=e.useCache,y=l(e,["allowNew","delay","emptyLabel","isLoading","minLength","onInputChange","onSearch","options","promptText","searchText","useCache"]),m=t.useRef({}),b=t.useRef(),v=t.useRef(e.defaultInputValue||""),g=t.useReducer((function(e){return!e}),!1)[1],w=te(e),O=t.useCallback((function(e){v.current=e,!e||s&&e.length<s||(h&&m.current[e]?g():c(e))}),[g,s,c,h]);t.useEffect((function(){return b.current=I(O,r),function(){b.current&&b.current.cancel()}}),[r,O]),t.useEffect((function(){!a&&w&&w.isLoading&&h&&(m.current[v.current]=f)}));var E=t.useCallback((function(e,t){u&&u(e,t),b.current&&b.current(e)}),[u]),S=m.current[v.current];return i({},y,{allowNew:se(n)?n:n&&!a,emptyLabel:v.current.length?a?d:o:p,isLoading:a,minLength:s,onInputChange:E,options:h&&S?S:f})}function ft(e){var n=t.forwardRef((function(t,n){return r.createElement(e,i({},ct(t),{ref:n}))}));return n.displayName="withAsync("+Ce(e)+")",n.propTypes=st,n.defaultProps=ut,n}var pt=!("undefined"==typeof window||!window.document||!window.document.createElement),dt=!1,ht=!1;try{var yt={get passive(){return dt=!0},get once(){return ht=dt=!0}};pt&&(window.addEventListener("test",yt,yt),window.removeEventListener("test",yt,!0))}catch(j){}function mt(e,t,n,r){return function(e,t,n,r){if(r&&"boolean"!=typeof r&&!ht){var o=r.once,i=r.capture,a=n;!ht&&o&&(a=n.__once||function e(r){this.removeEventListener(t,e,i),n.call(this,r)},n.__once=a),e.addEventListener(t,a,dt?r:i)}e.addEventListener(t,n,r)}(e,t,n,r),function(){!function(e,t,n,r){var o=r&&"boolean"!=typeof r?r.capture:r;e.removeEventListener(t,n,o),n.__once&&e.removeEventListener(t,n.__once,o)}(e,t,n,r)}}function bt(e){var n=function(e){var n=t.useRef(e);return t.useEffect((function(){n.current=e}),[e]),n}(e);return t.useCallback((function(){return n.current&&n.current.apply(n,arguments)}),[n])}function vt(e){return(t=n.findDOMNode(e))&&t.ownerDocument||document;var t}var gt=function(){};function wt(e,n,r){var o=void 0===r?{}:r,i=o.disabled,a=o.clickTrigger,l=void 0===a?"click":a,s=t.useRef(!1),u=n||gt,c=t.useCallback((function(t){var n,r,o,i=e&&("current"in e?e.current:e);s.current=!i||!!((o=t).metaKey||o.altKey||o.ctrlKey||o.shiftKey)||!function(e){return 0===e.button}(t)||(n=i,r=t.target,n.contains?n.contains(r):n.compareDocumentPosition?n===r||!!(16&n.compareDocumentPosition(r)):void 0)}),[e]),f=bt((function(e){s.current||u(e)})),p=bt((function(e){27===e.keyCode&&u(e)}));t.useEffect((function(){if(!i&&null!=e){var t=vt(e.current),n=mt(t,l,c,!0),r=mt(t,l,f),o=mt(t,"keyup",p),a=[];return"ontouchstart"in t.documentElement&&(a=[].slice.call(t.body.children).map((function(e){return mt(e,"mousemove",gt)}))),function(){n(),r(),o(),a.forEach((function(e){return e()}))}}}),[e,i,l,c,f,p])}var Ot={label:ee.string,onClick:ee.func,size:Ge},Et={label:"Clear",onClick:ce},St=function(e){var t=e.className,n=e.label,o=e.onClick,a=e.size,s=l(e,["className","label","onClick","size"]);return r.createElement("button",i({},s,{"aria-label":n,className:Re("close","rbt-close",{"rbt-close-lg":Ue(a)},t),onClick:function(e){e.stopPropagation(),o(e)},type:"button"}),r.createElement("span",{"aria-hidden":"true"},"×"),r.createElement("span",{className:"sr-only"},n))};St.propTypes=Ot,St.defaultProps=Et;var xt={label:ee.string},It=function(e){var t=e.label;return r.createElement("div",{className:"rbt-loader spinner-border spinner-border-sm",role:"status"},r.createElement("span",{className:"sr-only"},t))};It.propTypes=xt,It.defaultProps={label:"Loading..."};var Pt=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o},Ct=c((function(e){function t(){return e.exports=t=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},t.apply(this,arguments)}e.exports=t}));var At=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e};var jt=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t};var Tt,Rt=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Nt=Object.prototype.toString,Mt=function(e){var t=Nt.call(e),n="[object Arguments]"===t;return n||(n="[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===Nt.call(e.callee)),n};if(!Object.keys){var kt=Object.prototype.hasOwnProperty,Ft=Object.prototype.toString,Dt=Mt,_t=Object.prototype.propertyIsEnumerable,Lt=!_t.call({toString:null},"toString"),Bt=_t.call((function(){}),"prototype"),Ut=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Ht=function(e){var t=e.constructor;return t&&t.prototype===e},Wt={$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},$t=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!Wt["$"+e]&&kt.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{Ht(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();Tt=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===Ft.call(e),r=Dt(e),o=t&&"[object String]"===Ft.call(e),i=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var a=Bt&&n;if(o&&e.length>0&&!kt.call(e,0))for(var l=0;l<e.length;++l)i.push(String(l));if(r&&e.length>0)for(var s=0;s<e.length;++s)i.push(String(s));else for(var u in e)a&&"prototype"===u||!kt.call(e,u)||i.push(String(u));if(Lt)for(var c=function(e){if("undefined"==typeof window||!$t)return Ht(e);try{return Ht(e)}catch(e){return!1}}(e),f=0;f<Ut.length;++f)c&&"constructor"===Ut[f]||!kt.call(e,Ut[f])||i.push(Ut[f]);return i}}var Kt=Tt,Vt=Array.prototype.slice,qt=Object.keys,Yt=qt?function(e){return qt(e)}:Kt,zt=Object.keys;Yt.shim=function(){Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return Mt(e)?zt(Vt.call(e)):zt(e)}):Object.keys=Yt;return Object.keys||Yt};var Gt=Yt,Jt="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,Xt=Object.prototype.toString,Zt=function(e){return!(Jt&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===Xt.call(e)},Qt=function(e){return!!Zt(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==Xt.call(e)&&"[object Function]"===Xt.call(e.callee)},en=function(){return Zt(arguments)}();Zt.isLegacyArguments=Qt;var tn=en?Zt:Qt,nn="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),rn=Object.prototype.toString,on=Array.prototype.concat,an=Object.defineProperty,ln=an&&function(){var e={};try{for(var t in an(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}(),sn=function(e,t,n,r){var o;(!(t in e)||"function"==typeof(o=r)&&"[object Function]"===rn.call(o)&&r())&&(ln?an(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n)},un=function(e,t){var n=arguments.length>2?arguments[2]:{},r=Gt(t);nn&&(r=on.call(r,Object.getOwnPropertySymbols(t)));for(var o=0;o<r.length;o+=1)sn(e,r[o],t[r[o]],n[r[o]])};un.supportsDescriptors=!!ln;var cn=un,fn="Function.prototype.bind called on incompatible ",pn=Array.prototype.slice,dn=Object.prototype.toString,hn=Function.prototype.bind||function(e){var t=this;if("function"!=typeof t||"[object Function]"!==dn.call(t))throw new TypeError(fn+t);for(var n,r=pn.call(arguments,1),o=function(){if(this instanceof n){var o=t.apply(this,r.concat(pn.call(arguments)));return Object(o)===o?o:this}return t.apply(e,r.concat(pn.call(arguments)))},i=Math.max(0,t.length-r.length),a=[],l=0;l<i;l++)a.push("$"+l);if(n=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(o),t.prototype){var s=function(){};s.prototype=t.prototype,n.prototype=new s,s.prototype=null}return n},yn=u.Symbol,mn=function(){return"function"==typeof yn&&("function"==typeof Symbol&&("symbol"==typeof yn("foo")&&("symbol"==typeof Symbol("bar")&&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}())))},bn=TypeError,vn=Object.getOwnPropertyDescriptor;if(vn)try{vn({},"")}catch(j){vn=null}var gn=function(){throw new bn},wn=vn?function(){try{return gn}catch(e){try{return vn(arguments,"callee").get}catch(e){return gn}}}():gn,On=mn(),En=Object.getPrototypeOf||function(e){return e.__proto__},Sn="undefined"==typeof Uint8Array?undefined:En(Uint8Array),xn={"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?undefined:ArrayBuffer,"%ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?undefined:ArrayBuffer.prototype,"%ArrayIteratorPrototype%":On?En([][Symbol.iterator]()):undefined,"%ArrayPrototype%":Array.prototype,"%ArrayProto_entries%":Array.prototype.entries,"%ArrayProto_forEach%":Array.prototype.forEach,"%ArrayProto_keys%":Array.prototype.keys,"%ArrayProto_values%":Array.prototype.values,"%AsyncFromSyncIteratorPrototype%":undefined,"%AsyncFunction%":undefined,"%AsyncFunctionPrototype%":undefined,"%AsyncGenerator%":undefined,"%AsyncGeneratorFunction%":undefined,"%AsyncGeneratorPrototype%":undefined,"%AsyncIteratorPrototype%":undefined,"%Atomics%":"undefined"==typeof Atomics?undefined:Atomics,"%Boolean%":Boolean,"%BooleanPrototype%":Boolean.prototype,"%DataView%":"undefined"==typeof DataView?undefined:DataView,"%DataViewPrototype%":"undefined"==typeof DataView?undefined: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?undefined:Float32Array,"%Float32ArrayPrototype%":"undefined"==typeof Float32Array?undefined:Float32Array.prototype,"%Float64Array%":"undefined"==typeof Float64Array?undefined:Float64Array,"%Float64ArrayPrototype%":"undefined"==typeof Float64Array?undefined:Float64Array.prototype,"%Function%":Function,"%FunctionPrototype%":Function.prototype,"%Generator%":undefined,"%GeneratorFunction%":undefined,"%GeneratorPrototype%":undefined,"%Int8Array%":"undefined"==typeof Int8Array?undefined:Int8Array,"%Int8ArrayPrototype%":"undefined"==typeof Int8Array?undefined:Int8Array.prototype,"%Int16Array%":"undefined"==typeof Int16Array?undefined:Int16Array,"%Int16ArrayPrototype%":"undefined"==typeof Int16Array?undefined:Int8Array.prototype,"%Int32Array%":"undefined"==typeof Int32Array?undefined:Int32Array,"%Int32ArrayPrototype%":"undefined"==typeof Int32Array?undefined:Int32Array.prototype,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":On?En(En([][Symbol.iterator]())):undefined,"%JSON%":"object"==typeof JSON?JSON:undefined,"%JSONParse%":"object"==typeof JSON?JSON.parse:undefined,"%Map%":"undefined"==typeof Map?undefined:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&On?En((new Map)[Symbol.iterator]()):undefined,"%MapPrototype%":"undefined"==typeof Map?undefined: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?undefined:Promise,"%PromisePrototype%":"undefined"==typeof Promise?undefined:Promise.prototype,"%PromiseProto_then%":"undefined"==typeof Promise?undefined:Promise.prototype.then,"%Promise_all%":"undefined"==typeof Promise?undefined:Promise.all,"%Promise_reject%":"undefined"==typeof Promise?undefined:Promise.reject,"%Promise_resolve%":"undefined"==typeof Promise?undefined:Promise.resolve,"%Proxy%":"undefined"==typeof Proxy?undefined:Proxy,"%RangeError%":RangeError,"%RangeErrorPrototype%":RangeError.prototype,"%ReferenceError%":ReferenceError,"%ReferenceErrorPrototype%":ReferenceError.prototype,"%Reflect%":"undefined"==typeof Reflect?undefined:Reflect,"%RegExp%":RegExp,"%RegExpPrototype%":RegExp.prototype,"%Set%":"undefined"==typeof Set?undefined:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&On?En((new Set)[Symbol.iterator]()):undefined,"%SetPrototype%":"undefined"==typeof Set?undefined:Set.prototype,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?undefined:SharedArrayBuffer,"%SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?undefined:SharedArrayBuffer.prototype,"%String%":String,"%StringIteratorPrototype%":On?En(""[Symbol.iterator]()):undefined,"%StringPrototype%":String.prototype,"%Symbol%":On?Symbol:undefined,"%SymbolPrototype%":On?Symbol.prototype:undefined,"%SyntaxError%":SyntaxError,"%SyntaxErrorPrototype%":SyntaxError.prototype,"%ThrowTypeError%":wn,"%TypedArray%":Sn,"%TypedArrayPrototype%":Sn?Sn.prototype:undefined,"%TypeError%":bn,"%TypeErrorPrototype%":bn.prototype,"%Uint8Array%":"undefined"==typeof Uint8Array?undefined:Uint8Array,"%Uint8ArrayPrototype%":"undefined"==typeof Uint8Array?undefined:Uint8Array.prototype,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?undefined:Uint8ClampedArray,"%Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?undefined:Uint8ClampedArray.prototype,"%Uint16Array%":"undefined"==typeof Uint16Array?undefined:Uint16Array,"%Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?undefined:Uint16Array.prototype,"%Uint32Array%":"undefined"==typeof Uint32Array?undefined:Uint32Array,"%Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?undefined:Uint32Array.prototype,"%URIError%":URIError,"%URIErrorPrototype%":URIError.prototype,"%WeakMap%":"undefined"==typeof WeakMap?undefined:WeakMap,"%WeakMapPrototype%":"undefined"==typeof WeakMap?undefined:WeakMap.prototype,"%WeakSet%":"undefined"==typeof WeakSet?undefined:WeakSet,"%WeakSetPrototype%":"undefined"==typeof WeakSet?undefined:WeakSet.prototype},In=hn.call(Function.call,String.prototype.replace),Pn=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Cn=/\\(\\)?/g,An=function(e){var t=[];return In(e,Pn,(function(e,n,r,o){t[t.length]=r?In(o,Cn,"$1"):n||e})),t},jn=function(e,t){if(!(e in xn))throw new SyntaxError("intrinsic "+e+" does not exist!");if(void 0===xn[e]&&!t)throw new bn("intrinsic "+e+" exists, but is not available. Please file an issue!");return xn[e]},Tn=function(e,t){if("string"!=typeof e||0===e.length)throw new TypeError("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new TypeError('"allowMissing" argument must be a boolean');for(var n=An(e),r=jn("%"+(n.length>0?n[0]:"")+"%",t),o=1;o<n.length;o+=1)if(null!=r)if(vn&&o+1>=n.length){var i=vn(r,n[o]);if(!t&&!(n[o]in r))throw new bn("base intrinsic for "+e+" exists, but the property is not available.");r=i?i.get||i.value:r[n[o]]}else r=r[n[o]];return r},Rn=Tn("%Function.prototype.apply%"),Nn=Tn("%Function.prototype.call%"),Mn=Tn("%Reflect.apply%",!0)||hn.call(Nn,Rn),kn=function(){return Mn(hn,Nn,arguments)};kn.apply=function(){return Mn(hn,Rn,arguments)};var Fn=function(e){return e!=e},Dn=function(e,t){return 0===e&&0===t?1/e==1/t:e===t||!(!Fn(e)||!Fn(t))},_n=function(){return"function"==typeof Object.is?Object.is:Dn},Ln=kn(_n(),Object);cn(Ln,{getPolyfill:_n,implementation:Dn,shim:function(){var e=_n();return cn(Object,{is:e},{is:function(){return Object.is!==e}}),e}});var Bn,Un,Hn,Wn,$n=Ln,Kn=mn()&&"symbol"==typeof Symbol.toStringTag;if(Kn){Bn=Function.call.bind(Object.prototype.hasOwnProperty),Un=Function.call.bind(RegExp.prototype.exec),Hn={};var Vn=function(){throw Hn};Wn={toString:Vn,valueOf:Vn},"symbol"==typeof Symbol.toPrimitive&&(Wn[Symbol.toPrimitive]=Vn)}var qn=Object.prototype.toString,Yn=Object.getOwnPropertyDescriptor,zn=Kn?function(e){if(!e||"object"!=typeof e)return!1;var t=Yn(e,"lastIndex");if(!(t&&Bn(t,"value")))return!1;try{Un(e,Wn)}catch(e){return e===Hn}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===qn.call(e)},Gn=Object,Jn=TypeError,Xn=function(){if(null!=this&&this!==Gn(this))throw new Jn("RegExp.prototype.flags getter called on non-object");var e="";return this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),this.dotAll&&(e+="s"),this.unicode&&(e+="u"),this.sticky&&(e+="y"),e},Zn=cn.supportsDescriptors,Qn=Object.getOwnPropertyDescriptor,er=TypeError,tr=function(){if(!Zn)throw new er("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");if("gim"===/a/gim.flags){var e=Qn(RegExp.prototype,"flags");if(e&&"function"==typeof e.get&&"boolean"==typeof/a/.dotAll)return e.get}return Xn},nr=cn.supportsDescriptors,rr=Object.getOwnPropertyDescriptor,or=Object.defineProperty,ir=TypeError,ar=Object.getPrototypeOf,lr=/a/,sr=kn(Xn);cn(sr,{getPolyfill:tr,implementation:Xn,shim:function(){if(!nr||!ar)throw new ir("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=tr(),t=ar(lr),n=rr(t,"flags");return n&&n.get===e||or(t,"flags",{configurable:!0,enumerable:!1,get:e}),e}});var ur=sr,cr=Date.prototype.getDay,fr=Object.prototype.toString,pr="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,dr=function(e){return"object"==typeof e&&null!==e&&(pr?function(e){try{return cr.call(e),!0}catch(e){return!1}}(e):"[object Date]"===fr.call(e))},hr=Date.prototype.getTime;function yr(e,t,n){var r=n||{};return!!(r.strict?$n(e,t):e===t)||(!e||!t||"object"!=typeof e&&"object"!=typeof t?r.strict?$n(e,t):e==t:function(e,t,n){var r,o;if(typeof e!=typeof t)return!1;if(mr(e)||mr(t))return!1;if(e.prototype!==t.prototype)return!1;if(tn(e)!==tn(t))return!1;var i=zn(e),a=zn(t);if(i!==a)return!1;if(i||a)return e.source===t.source&&ur(e)===ur(t);if(dr(e)&&dr(t))return hr.call(e)===hr.call(t);var l=br(e),s=br(t);if(l!==s)return!1;if(l||s){if(e.length!==t.length)return!1;for(r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}if(typeof e!=typeof t)return!1;try{var u=Gt(e),c=Gt(t)}catch(e){return!1}if(u.length!==c.length)return!1;for(u.sort(),c.sort(),r=u.length-1;r>=0;r--)if(u[r]!=c[r])return!1;for(r=u.length-1;r>=0;r--)if(!yr(e[o=u[r]],t[o],n))return!1;return!0}(e,t,r))}function mr(e){return null==e}function br(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length)&&("function"==typeof e.copy&&"function"==typeof e.slice&&!(e.length>0&&"number"!=typeof e[0]))}var vr=yr,gr="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,wr=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(gr&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0}();
16/**!
17 * @fileOverview Kickass library to create and place poppers near their reference elements.
18 * @version 1.16.1
19 * @license
20 * Copyright (c) 2016 Federico Zivolo and contributors
21 *
22 * Permission is hereby granted, free of charge, to any person obtaining a copy
23 * of this software and associated documentation files (the "Software"), to deal
24 * in the Software without restriction, including without limitation the rights
25 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
26 * copies of the Software, and to permit persons to whom the Software is
27 * furnished to do so, subject to the following conditions:
28 *
29 * The above copyright notice and this permission notice shall be included in all
30 * copies or substantial portions of the Software.
31 *
32 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
33 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
34 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
35 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
36 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
37 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
38 * SOFTWARE.
39 */var Or=gr&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),wr))}};function Er(e){return e&&"[object Function]"==={}.toString.call(e)}function Sr(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function xr(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function Ir(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=Sr(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/(auto|scroll|overlay)/.test(n+o+r)?e:Ir(xr(e))}function Pr(e){return e&&e.referenceNode?e.referenceNode:e}var Cr=gr&&!(!window.MSInputMethodContext||!document.documentMode),Ar=gr&&/MSIE 10/.test(navigator.userAgent);function jr(e){return 11===e?Cr:10===e?Ar:Cr||Ar}function Tr(e){if(!e)return document.documentElement;for(var t=jr(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===Sr(n,"position")?Tr(n):n:e?e.ownerDocument.documentElement:document.documentElement}function Rr(e){return null!==e.parentNode?Rr(e.parentNode):e}function Nr(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,o=n?t:e,i=document.createRange();i.setStart(r,0),i.setEnd(o,0);var a,l,s=i.commonAncestorContainer;if(e!==s&&t!==s||r.contains(o))return"BODY"===(l=(a=s).nodeName)||"HTML"!==l&&Tr(a.firstElementChild)!==a?Tr(s):s;var u=Rr(e);return u.host?Nr(u.host,t):Nr(e,Rr(t).host)}function Mr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var o=e.ownerDocument.documentElement,i=e.ownerDocument.scrollingElement||o;return i[n]}return e[n]}function kr(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=Mr(t,"top"),o=Mr(t,"left"),i=n?-1:1;return e.top+=r*i,e.bottom+=r*i,e.left+=o*i,e.right+=o*i,e}function Fr(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+r+"Width"])}function Dr(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],jr(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function _r(e){var t=e.body,n=e.documentElement,r=jr(10)&&getComputedStyle(n);return{height:Dr("Height",t,n,r),width:Dr("Width",t,n,r)}}var Lr=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Br=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}}(),Ur=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Hr=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 Wr(e){return Hr({},e,{right:e.left+e.width,bottom:e.top+e.height})}function $r(e){var t={};try{if(jr(10)){t=e.getBoundingClientRect();var n=Mr(e,"top"),r=Mr(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}else t=e.getBoundingClientRect()}catch(e){}var o={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},i="HTML"===e.nodeName?_r(e.ownerDocument):{},a=i.width||e.clientWidth||o.width,l=i.height||e.clientHeight||o.height,s=e.offsetWidth-a,u=e.offsetHeight-l;if(s||u){var c=Sr(e);s-=Fr(c,"x"),u-=Fr(c,"y"),o.width-=s,o.height-=u}return Wr(o)}function Kr(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=jr(10),o="HTML"===t.nodeName,i=$r(e),a=$r(t),l=Ir(e),s=Sr(t),u=parseFloat(s.borderTopWidth),c=parseFloat(s.borderLeftWidth);n&&o&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var f=Wr({top:i.top-a.top-u,left:i.left-a.left-c,width:i.width,height:i.height});if(f.marginTop=0,f.marginLeft=0,!r&&o){var p=parseFloat(s.marginTop),d=parseFloat(s.marginLeft);f.top-=u-p,f.bottom-=u-p,f.left-=c-d,f.right-=c-d,f.marginTop=p,f.marginLeft=d}return(r&&!n?t.contains(l):t===l&&"BODY"!==l.nodeName)&&(f=kr(f,t)),f}function Vr(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=Kr(e,n),o=Math.max(n.clientWidth,window.innerWidth||0),i=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:Mr(n),l=t?0:Mr(n,"left"),s={top:a-r.top+r.marginTop,left:l-r.left+r.marginLeft,width:o,height:i};return Wr(s)}function qr(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===Sr(e,"position"))return!0;var n=xr(e);return!!n&&qr(n)}function Yr(e){if(!e||!e.parentElement||jr())return document.documentElement;for(var t=e.parentElement;t&&"none"===Sr(t,"transform");)t=t.parentElement;return t||document.documentElement}function zr(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i={top:0,left:0},a=o?Yr(e):Nr(e,Pr(t));if("viewport"===r)i=Vr(a,o);else{var l=void 0;"scrollParent"===r?"BODY"===(l=Ir(xr(t))).nodeName&&(l=e.ownerDocument.documentElement):l="window"===r?e.ownerDocument.documentElement:r;var s=Kr(l,a,o);if("HTML"!==l.nodeName||qr(a))i=s;else{var u=_r(e.ownerDocument),c=u.height,f=u.width;i.top+=s.top-s.marginTop,i.bottom=c+s.top,i.left+=s.left-s.marginLeft,i.right=f+s.left}}var p="number"==typeof(n=n||0);return i.left+=p?n:n.left||0,i.top+=p?n:n.top||0,i.right-=p?n:n.right||0,i.bottom-=p?n:n.bottom||0,i}function Gr(e){return e.width*e.height}function Jr(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=zr(n,r,i,o),l={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},s=Object.keys(l).map((function(e){return Hr({key:e},l[e],{area:Gr(l[e])})})).sort((function(e,t){return t.area-e.area})),u=s.filter((function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight})),c=u.length>0?u[0].key:s[0].key,f=e.split("-")[1];return c+(f?"-"+f:"")}function Xr(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=r?Yr(t):Nr(t,Pr(n));return Kr(n,o,r)}function Zr(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function Qr(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function eo(e,t,n){n=n.split("-")[0];var r=Zr(e),o={width:r.width,height:r.height},i=-1!==["right","left"].indexOf(n),a=i?"top":"left",l=i?"left":"top",s=i?"height":"width",u=i?"width":"height";return o[a]=t[a]+t[s]/2-r[s]/2,o[l]=n===l?t[l]-r[u]:t[Qr(l)],o}function to(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function no(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var r=to(e,(function(e){return e[t]===n}));return e.indexOf(r)}(e,"name",n))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&Er(n)&&(t.offsets.popper=Wr(t.offsets.popper),t.offsets.reference=Wr(t.offsets.reference),t=n(t,e))})),t}function ro(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=Xr(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=Jr(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=eo(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=no(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function oo(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function io(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length;r++){var o=t[r],i=o?""+o+n:e;if(void 0!==document.body.style[i])return i}return null}function ao(){return this.state.isDestroyed=!0,oo(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[io("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function lo(e){var t=e.ownerDocument;return t?t.defaultView:window}function so(e,t,n,r){n.updateBound=r,lo(e).addEventListener("resize",n.updateBound,{passive:!0});var o=Ir(e);return function e(t,n,r,o){var i="BODY"===t.nodeName,a=i?t.ownerDocument.defaultView:t;a.addEventListener(n,r,{passive:!0}),i||e(Ir(a.parentNode),n,r,o),o.push(a)}(o,"scroll",n.updateBound,n.scrollParents),n.scrollElement=o,n.eventsEnabled=!0,n}function uo(){this.state.eventsEnabled||(this.state=so(this.reference,this.options,this.state,this.scheduleUpdate))}function co(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,lo(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach((function(e){e.removeEventListener("scroll",t.updateBound)})),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function fo(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function po(e,t){Object.keys(t).forEach((function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&fo(t[n])&&(r="px"),e.style[n]=t[n]+r}))}var ho=gr&&/Firefox/i.test(navigator.userAgent);function yo(e,t,n){var r=to(e,(function(e){return e.name===t})),o=!!r&&e.some((function(e){return e.name===n&&e.enabled&&e.order<r.order}));if(!o){var i="`"+t+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+i+" modifier in order to work, be sure to include it before "+i+"!")}return o}var mo=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],bo=mo.slice(3);function vo(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=bo.indexOf(e),r=bo.slice(n+1).concat(bo.slice(0,n));return t?r.reverse():r}var go="flip",wo="clockwise",Oo="counterclockwise";function Eo(e,t,n,r){var o=[0,0],i=-1!==["right","left"].indexOf(r),a=e.split(/(\+|\-)/).map((function(e){return e.trim()})),l=a.indexOf(to(a,(function(e){return-1!==e.search(/,|\s/)})));a[l]&&-1===a[l].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var s=/\s*,\s*|\s+/,u=-1!==l?[a.slice(0,l).concat([a[l].split(s)[0]]),[a[l].split(s)[1]].concat(a.slice(l+1))]:[a];return(u=u.map((function(e,r){var o=(1===r?!i:i)?"height":"width",a=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,n,r){var o=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+o[1],a=o[2];if(!i)return e;if(0===a.indexOf("%")){var l=void 0;switch(a){case"%p":l=n;break;case"%":case"%r":default:l=r}return Wr(l)[t]/100*i}if("vh"===a||"vw"===a)return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*i;return i}(e,o,t,n)}))}))).forEach((function(e,t){e.forEach((function(n,r){fo(n)&&(o[t]+=n*("-"===e[r-1]?-1:1))}))})),o}var So={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var o=e.offsets,i=o.reference,a=o.popper,l=-1!==["bottom","top"].indexOf(n),s=l?"left":"top",u=l?"width":"height",c={start:Ur({},s,i[s]),end:Ur({},s,i[s]+i[u]-a[u])};e.offsets.popper=Hr({},a,c[r])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,r=e.placement,o=e.offsets,i=o.popper,a=o.reference,l=r.split("-")[0],s=void 0;return s=fo(+n)?[+n,0]:Eo(n,i,a,l),"left"===l?(i.top+=s[0],i.left-=s[1]):"right"===l?(i.top+=s[0],i.left+=s[1]):"top"===l?(i.left+=s[0],i.top-=s[1]):"bottom"===l&&(i.left+=s[0],i.top+=s[1]),e.popper=i,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||Tr(e.instance.popper);e.instance.reference===n&&(n=Tr(n));var r=io("transform"),o=e.instance.popper.style,i=o.top,a=o.left,l=o[r];o.top="",o.left="",o[r]="";var s=zr(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);o.top=i,o.left=a,o[r]=l,t.boundaries=s;var u=t.priority,c=e.offsets.popper,f={primary:function(e){var n=c[e];return c[e]<s[e]&&!t.escapeWithReference&&(n=Math.max(c[e],s[e])),Ur({},e,n)},secondary:function(e){var n="right"===e?"left":"top",r=c[n];return c[e]>s[e]&&!t.escapeWithReference&&(r=Math.min(c[n],s[e]-("right"===e?c.width:c.height))),Ur({},n,r)}};return u.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";c=Hr({},c,f[t](e))})),e.offsets.popper=c,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,o=e.placement.split("-")[0],i=Math.floor,a=-1!==["top","bottom"].indexOf(o),l=a?"right":"bottom",s=a?"left":"top",u=a?"width":"height";return n[l]<i(r[s])&&(e.offsets.popper[s]=i(r[s])-n[u]),n[s]>i(r[l])&&(e.offsets.popper[s]=i(r[l])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!yo(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"==typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var o=e.placement.split("-")[0],i=e.offsets,a=i.popper,l=i.reference,s=-1!==["left","right"].indexOf(o),u=s?"height":"width",c=s?"Top":"Left",f=c.toLowerCase(),p=s?"left":"top",d=s?"bottom":"right",h=Zr(r)[u];l[d]-h<a[f]&&(e.offsets.popper[f]-=a[f]-(l[d]-h)),l[f]+h>a[d]&&(e.offsets.popper[f]+=l[f]+h-a[d]),e.offsets.popper=Wr(e.offsets.popper);var y=l[f]+l[u]/2-h/2,m=Sr(e.instance.popper),b=parseFloat(m["margin"+c]),v=parseFloat(m["border"+c+"Width"]),g=y-e.offsets.popper[f]-b-v;return g=Math.max(Math.min(a[u]-h,g),0),e.arrowElement=r,e.offsets.arrow=(Ur(n={},f,Math.round(g)),Ur(n,p,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(oo(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=zr(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],o=Qr(r),i=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case go:a=[r,o];break;case wo:a=vo(r);break;case Oo:a=vo(r,!0);break;default:a=t.behavior}return a.forEach((function(l,s){if(r!==l||a.length===s+1)return e;r=e.placement.split("-")[0],o=Qr(r);var u=e.offsets.popper,c=e.offsets.reference,f=Math.floor,p="left"===r&&f(u.right)>f(c.left)||"right"===r&&f(u.left)<f(c.right)||"top"===r&&f(u.bottom)>f(c.top)||"bottom"===r&&f(u.top)<f(c.bottom),d=f(u.left)<f(n.left),h=f(u.right)>f(n.right),y=f(u.top)<f(n.top),m=f(u.bottom)>f(n.bottom),b="left"===r&&d||"right"===r&&h||"top"===r&&y||"bottom"===r&&m,v=-1!==["top","bottom"].indexOf(r),g=!!t.flipVariations&&(v&&"start"===i&&d||v&&"end"===i&&h||!v&&"start"===i&&y||!v&&"end"===i&&m),w=!!t.flipVariationsByContent&&(v&&"start"===i&&h||v&&"end"===i&&d||!v&&"start"===i&&m||!v&&"end"===i&&y),O=g||w;(p||b||O)&&(e.flipped=!0,(p||b)&&(r=a[s+1]),O&&(i=function(e){return"end"===e?"start":"start"===e?"end":e}(i)),e.placement=r+(i?"-"+i:""),e.offsets.popper=Hr({},e.offsets.popper,eo(e.instance.popper,e.offsets.reference,e.placement)),e=no(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,o=r.popper,i=r.reference,a=-1!==["left","right"].indexOf(n),l=-1===["top","left"].indexOf(n);return o[a?"left":"top"]=i[n]-(l?o[a?"width":"height"]:0),e.placement=Qr(t),e.offsets.popper=Wr(o),e}},hide:{order:800,enabled:!0,fn:function(e){if(!yo(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=to(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,r=t.y,o=e.offsets.popper,i=to(e.instance.modifiers,(function(e){return"applyStyle"===e.name})).gpuAcceleration;void 0!==i&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==i?i:t.gpuAcceleration,l=Tr(e.instance.popper),s=$r(l),u={position:o.position},c=function(e,t){var n=e.offsets,r=n.popper,o=n.reference,i=Math.round,a=Math.floor,l=function(e){return e},s=i(o.width),u=i(r.width),c=-1!==["left","right"].indexOf(e.placement),f=-1!==e.placement.indexOf("-"),p=t?c||f||s%2==u%2?i:a:l,d=t?i:l;return{left:p(s%2==1&&u%2==1&&!f&&t?r.left-1:r.left),top:d(r.top),bottom:d(r.bottom),right:p(r.right)}}(e,window.devicePixelRatio<2||!ho),f="bottom"===n?"top":"bottom",p="right"===r?"left":"right",d=io("transform"),h=void 0,y=void 0;if(y="bottom"===f?"HTML"===l.nodeName?-l.clientHeight+c.bottom:-s.height+c.bottom:c.top,h="right"===p?"HTML"===l.nodeName?-l.clientWidth+c.right:-s.width+c.right:c.left,a&&d)u[d]="translate3d("+h+"px, "+y+"px, 0)",u[f]=0,u[p]=0,u.willChange="transform";else{var m="bottom"===f?-1:1,b="right"===p?-1:1;u[f]=y*m,u[p]=h*b,u.willChange=f+", "+p}var v={"x-placement":e.placement};return e.attributes=Hr({},v,e.attributes),e.styles=Hr({},u,e.styles),e.arrowStyles=Hr({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,n;return po(e.instance.popper,e.styles),t=e.instance.popper,n=e.attributes,Object.keys(n).forEach((function(e){!1!==n[e]?t.setAttribute(e,n[e]):t.removeAttribute(e)})),e.arrowElement&&Object.keys(e.arrowStyles).length&&po(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,o){var i=Xr(o,t,e,n.positionFixed),a=Jr(n.placement,i,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),po(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},xo=function(){function e(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Lr(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=Or(this.update.bind(this)),this.options=Hr({},e.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(Hr({},e.Defaults.modifiers,o.modifiers)).forEach((function(t){r.options.modifiers[t]=Hr({},e.Defaults.modifiers[t]||{},o.modifiers?o.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return Hr({name:e},r.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&Er(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)})),this.update();var i=this.options.eventsEnabled;i&&this.enableEventListeners(),this.state.eventsEnabled=i}return Br(e,[{key:"update",value:function(){return ro.call(this)}},{key:"destroy",value:function(){return ao.call(this)}},{key:"enableEventListeners",value:function(){return uo.call(this)}},{key:"disableEventListeners",value:function(){return co.call(this)}}]),e}();xo.Utils=("undefined"!=typeof window?window:global).PopperUtils,xo.placements=mo,xo.Defaults=So;var Io="__global_unique_id__",Po=function(){return u[Io]=(u[Io]||0)+1},Co=c((function(e,t){t.__esModule=!0;i(r);var n=i(ee),o=i(Po);i(Ee);function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(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 s(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){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}}t.default=function(e,t){var i,c,f="__create-react-context-"+(0,o.default)()+"__",p=function(e){function n(){var t,r;a(this,n);for(var o=arguments.length,i=Array(o),s=0;s<o;s++)i[s]=arguments[s];return t=r=l(this,e.call.apply(e,[this].concat(i))),r.emitter=u(r.props.value),l(r,t)}return s(n,e),n.prototype.getChildContext=function(){var e;return(e={})[f]=this.emitter,e},n.prototype.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n=this.props.value,r=e.value,o=void 0;!function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,r)?(o="function"==typeof t?t(n,r):1073741823,0!==(o|=0)&&this.emitter.set(e.value,o)):o=0}},n.prototype.render=function(){return this.props.children},n}(r.Component);p.childContextTypes=((i={})[f]=n.default.object.isRequired,i);var d=function(t){function n(){var e,r;a(this,n);for(var o=arguments.length,i=Array(o),s=0;s<o;s++)i[s]=arguments[s];return e=r=l(this,t.call.apply(t,[this].concat(i))),r.state={value:r.getValue()},r.onUpdate=function(e,t){0!=((0|r.observedBits)&t)&&r.setState({value:r.getValue()})},l(r,e)}return s(n,t),n.prototype.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?1073741823:t},n.prototype.componentDidMount=function(){this.context[f]&&this.context[f].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?1073741823:e},n.prototype.componentWillUnmount=function(){this.context[f]&&this.context[f].off(this.onUpdate)},n.prototype.getValue=function(){return this.context[f]?this.context[f].get():e},n.prototype.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(r.Component);return d.contextTypes=((c={})[f]=n.default.object,c),{Provider:p,Consumer:d}},e.exports=t.default})),Ao=c((function(e,t){t.__esModule=!0;var n=i(r),o=i(Co);function i(e){return e&&e.__esModule?e:{default:e}}t.default=n.default.createContext||o.default,e.exports=t.default})),jo=Ao(),To=(Ao(),function(e,t){if("function"==typeof e)return function(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}}(e,t);null!=e&&(e.current=t)}),Ro={position:"absolute",top:0,left:0,opacity:0,pointerEvents:"none"},No={},Mo=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t=e.call.apply(e,[this].concat(r))||this,Rt(At(t),"state",{data:void 0,placement:void 0}),Rt(At(t),"popperInstance",void 0),Rt(At(t),"popperNode",null),Rt(At(t),"arrowNode",null),Rt(At(t),"setPopperNode",(function(e){e&&t.popperNode!==e&&(To(t.props.innerRef,e),t.popperNode=e,t.updatePopperInstance())})),Rt(At(t),"setArrowNode",(function(e){t.arrowNode=e})),Rt(At(t),"updateStateModifier",{enabled:!0,order:900,fn:function(e){var n=e.placement;return t.setState({data:e,placement:n}),e}}),Rt(At(t),"getOptions",(function(){return{placement:t.props.placement,eventsEnabled:t.props.eventsEnabled,positionFixed:t.props.positionFixed,modifiers:Ct({},t.props.modifiers,{arrow:Ct({},t.props.modifiers&&t.props.modifiers.arrow,{enabled:!!t.arrowNode,element:t.arrowNode}),applyStyle:{enabled:!1},updateStateModifier:t.updateStateModifier})}})),Rt(At(t),"getPopperStyle",(function(){return t.popperNode&&t.state.data?Ct({position:t.state.data.offsets.popper.position},t.state.data.styles):Ro})),Rt(At(t),"getPopperPlacement",(function(){return t.state.data?t.state.placement:void 0})),Rt(At(t),"getArrowStyle",(function(){return t.arrowNode&&t.state.data?t.state.data.arrowStyles:No})),Rt(At(t),"getOutOfBoundariesState",(function(){return t.state.data?t.state.data.hide:void 0})),Rt(At(t),"destroyPopperInstance",(function(){t.popperInstance&&(t.popperInstance.destroy(),t.popperInstance=null)})),Rt(At(t),"updatePopperInstance",(function(){t.destroyPopperInstance();var e=At(t).popperNode,n=t.props.referenceElement;n&&e&&(t.popperInstance=new xo(n,e,t.getOptions()))})),Rt(At(t),"scheduleUpdate",(function(){t.popperInstance&&t.popperInstance.scheduleUpdate()})),t}jt(t,e);var n=t.prototype;return n.componentDidUpdate=function(e,t){this.props.placement===e.placement&&this.props.referenceElement===e.referenceElement&&this.props.positionFixed===e.positionFixed&&vr(this.props.modifiers,e.modifiers,{strict:!0})?this.props.eventsEnabled!==e.eventsEnabled&&this.popperInstance&&(this.props.eventsEnabled?this.popperInstance.enableEventListeners():this.popperInstance.disableEventListeners()):this.updatePopperInstance(),t.placement!==this.state.placement&&this.scheduleUpdate()},n.componentWillUnmount=function(){To(this.props.innerRef,null),this.destroyPopperInstance()},n.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)({ref:this.setPopperNode,style:this.getPopperStyle(),placement:this.getPopperPlacement(),outOfBoundaries:this.getOutOfBoundariesState(),scheduleUpdate:this.scheduleUpdate,arrowProps:{ref:this.setArrowNode,style:this.getArrowStyle()}});var e},t}(t.Component);function ko(e){var n=e.referenceElement,r=Pt(e,["referenceElement"]);return t.createElement(jo.Consumer,null,(function(e){return t.createElement(Mo,Ct({referenceElement:void 0!==n?n:e},r))}))}Rt(Mo,"defaultProps",{placement:"bottom",eventsEnabled:!0,referenceElement:void 0,positionFixed:!1});var Fo="undefined"==typeof Element?function(){}:Element,Do={align:ee.oneOf(de(oe)),children:ee.func.isRequired,dropup:ee.bool,flip:ee.bool,isMenuShown:ee.bool,positionFixed:ee.bool,referenceElement:ee.instanceOf(Fo)},_o={align:oe.JUSTIFY,dropup:!1,flip:!1,isMenuShown:!1,positionFixed:!1};var Lo={bottom:{end:"bottom-end",start:"bottom-start"},top:{end:"top-end",start:"top-start"}};function Bo(e){var t=e.align,n=e.dropup;return Lo[n?"top":"bottom"][t===oe.RIGHT?"end":"start"]}var Uo=function(e){var n,r,o=e.children,a=e.isMenuShown,s=e.positionFixed,u=e.referenceElement;return a?t.createElement(ko,{modifiers:(n=e,r=n.align,{computeStyles:{enabled:!0,fn:function(e){var t=e.styles,n=l(e,["styles"]);return i({},n,{styles:i({},t,{width:r!==oe.RIGHT&&r!==oe.LEFT?n.offsets.reference.width:t.width})})}},flip:{enabled:n.flip},preventOverflow:{escapeWithReference:!0}}),placement:Bo(e),positionFixed:s,referenceElement:u},(function(e){var t=e.ref,n=l(e,["ref"]);return o(i({},n,{innerRef:t,inputHeight:u?u.offsetHeight:0}))})):null};Uo.propTypes=Do,Uo.defaultProps=_o;var Ho={onBlur:ee.func,onClick:ee.func,onFocus:ee.func,onRemove:ee.func,option:Ze.isRequired},Wo=function(e){var n=e.onBlur,r=e.onClick,o=e.onFocus,a=e.onRemove,s=e.option,u=l(e,["onBlur","onClick","onFocus","onRemove","option"]),c=t.useState(!1),f=c[0],p=c[1],d=t.useState(null),h=d[0],y=d[1],m=function(e,t,n){e.stopPropagation(),p(t),"function"==typeof n&&n(e)},b=function(e){m(e,!1,n)},v=function(){a&&a(s)};return wt(h,b,i({},u,{disabled:!f})),i({},u,{active:f,onBlur:b,onClick:function(e){m(e,!0,r)},onFocus:function(e){m(e,!0,o)},onKeyDown:function(e){switch(e.keyCode){case 8:f&&(e.preventDefault(),v())}},onRemove:se(a)?v:void 0,ref:y})},$o=function(e){var t="withToken("+Ce(e)+")",n=function(t){return r.createElement(e,Wo(t))};return n.displayName=t,n.propTypes=Ho,n};var Ko=t.forwardRef((function(e,t){var n=e.active,o=e.children,a=e.className,s=e.onRemove,u=e.tabIndex,c=l(e,["active","children","className","onRemove","tabIndex"]);return r.createElement("div",i({},c,{className:Re("rbt-token","rbt-token-removeable",{"rbt-token-active":!!n},a),ref:t,tabIndex:u||0}),o,r.createElement(St,{className:"rbt-token-remove-button",label:"Remove",onClick:s,tabIndex:-1}))})),Vo=function(e){var t=e.children,n=e.className,o=e.disabled,i=e.href,a=Re("rbt-token",{"rbt-token-disabled":o},n);return i&&!o?r.createElement("a",{className:a,href:i},t):r.createElement("div",{className:a},t)},qo=$o(t.forwardRef((function(e,t){var n=e.disabled,o=e.onRemove,a=e.readOnly;return n||a||!se(o)?r.createElement(Vo,e):r.createElement(Ko,i({},e,{ref:t}))})));function Yo(e,t,n){return void 0===n&&(n=""),n&&(n=n.replace(n[0],n[0].toUpperCase())),["Top","Right","Bottom","Left"].map((function(r){return e[t+r+n]})).join(" ")}var zo=function(e){var n=e.children,o=e.shouldSelect;1!==r.Children.count(n)&&re(!1);var a=$e(),l=a.hintText,s=a.initialItem,u=a.inputNode,c=a.onAdd,f=a.selectHintOnEnter,p=t.useRef(null);return t.useEffect((function(){!function(e,t){if(e&&t){var n=window.getComputedStyle(e);t.style.borderStyle=Yo(n,"border","style"),t.style.borderWidth=Yo(n,"border","width"),t.style.fontSize=n.fontSize,t.style.height=n.height,t.style.lineHeight=n.lineHeight,t.style.margin=Yo(n,"margin"),t.style.padding=Yo(n,"padding")}}(u,p.current)})),{child:t.cloneElement(n,i({},n.props,{onKeyDown:function(e){l&&s&&function(e,t){var n=!1,r=e.currentTarget,o=e.keyCode;return 39===o&&(n=!Le(r)||r.selectionStart===r.value.length),9===o&&(e.preventDefault(),n=!0),13===o&&(n=!!t.selectHintOnEnter),"function"==typeof t.shouldSelect?t.shouldSelect(n,e):n}(e,{selectHintOnEnter:f,shouldSelect:o})&&c(s),n.props.onKeyDown&&n.props.onKeyDown(e)}})),hintRef:p,hintText:l}},Go=function(e){var t=e.className,n=l(e,["className"]),o=zo(n),i=o.child,a=o.hintRef,s=o.hintText;return r.createElement("div",{className:t,style:{display:"flex",flex:1,height:"100%",position:"relative"}},i,r.createElement("input",{"aria-hidden":!0,className:"rbt-input-hint",ref:a,readOnly:!0,style:{backgroundColor:"transparent",borderColor:"transparent",boxShadow:"none",color:"rgba(0, 0, 0, 0.35)",left:0,pointerEvents:"none",position:"absolute",top:0,width:"100%"},tabIndex:-1,value:s}))},Jo=r.forwardRef((function(e,t){return r.createElement("input",i({},e,{className:Re("rbt-input-main",e.className),ref:t}))}));function Xo(e){var t=function(t){function n(){return t.apply(this,arguments)||this}return a(n,t),n.prototype.render=function(){var t=this.props,n=t.className,o=t.isInvalid,a=t.isValid,s=t.size,u=l(t,["className","isInvalid","isValid","size"]);return r.createElement(e,i({},u,{className:Re("form-control","rbt-input",{"form-control-lg":Ue(s),"form-control-sm":He(s),"is-invalid":o,"is-valid":a},n)}))},n}(r.Component);return o(t,"displayName","withClassNames("+Ce(e)+")"),t}var Zo=Xo(function(e){function t(){for(var t,n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return o(s(t=e.call.apply(e,[this].concat(i))||this),"wrapperRef",r.createRef()),o(s(t),"_input",void 0),o(s(t),"getInputRef",(function(e){t._input=e,t.props.inputRef(e)})),o(s(t),"_handleContainerClickOrFocus",(function(e){if(t.props.disabled)e.currentTarget.blur();else{var n=t._input;n&&(e.currentTarget!==n&&Le(n)&&(n.selectionStart=n.value.length),n.focus())}})),o(s(t),"_handleKeyDown",(function(e){var n=t.props,r=n.onKeyDown,o=n.selected,i=n.value;switch(e.keyCode){case 8:if(e.currentTarget===t._input&&o.length&&!i&&(e.preventDefault(),t.wrapperRef.current)){var a=t.wrapperRef.current.children,l=a[a.length-2];l&&l.focus()}}r(e)})),t}return a(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.className,o=e.inputClassName,a=(e.inputRef,e.placeholder),s=e.referenceElementRef,u=e.selected,c=e.shouldSelectHint,f=l(e,["children","className","inputClassName","inputRef","placeholder","referenceElementRef","selected","shouldSelectHint"]);return r.createElement("div",{className:Re("rbt-input-multi",n),disabled:f.disabled,onClick:this._handleContainerClickOrFocus,onFocus:this._handleContainerClickOrFocus,ref:s,tabIndex:-1},r.createElement("div",{className:"rbt-input-wrapper",ref:this.wrapperRef},t,r.createElement(Go,{shouldSelect:c},r.createElement(Jo,i({},f,{className:o,onKeyDown:this._handleKeyDown,placeholder:u.length?"":a,ref:this.getInputRef,style:{backgroundColor:"transparent",border:0,boxShadow:"none",cursor:"inherit",outline:"none",padding:0,width:"100%",zIndex:1}})))))},t}(r.Component)),Qo=Xo((function(e){var t=e.inputRef,n=e.referenceElementRef,o=e.shouldSelectHint,a=l(e,["inputRef","referenceElementRef","shouldSelectHint"]);return r.createElement(Go,{shouldSelect:o},r.createElement(Jo,i({},a,{ref:function(e){t(e),n(e)}})))})),ei={children:ee.string.isRequired,highlightClassName:ee.string,search:ee.string.isRequired},ti=function(e){function t(){return e.apply(this,arguments)||this}return a(t,e),t.prototype.render=function(){var e=this.props,t=e.children,n=e.highlightClassName,o=e.search;if(!o||!t)return t;for(var i=0,a=t,l=[];a;){var s=je(a,o);if(!s){l.push(a);break}var u=a.slice(0,s.start);u&&l.push(u);var c=a.slice(s.start,s.end);l.push(r.createElement("mark",{className:n,key:i},c)),i+=1,a=a.slice(s.end)}return l},t}(r.PureComponent);function ni(e){return null!=e&&"object"==typeof e&&1===e.nodeType}function ri(e,t){return(!t||"hidden"!==e)&&("visible"!==e&&"clip"!==e)}function oi(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return ri(n.overflowY,t)||ri(n.overflowX,t)||function(e){var t=function(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}}(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)}(e)}return!1}function ii(e,t,n,r,o,i,a,l){return i<e&&a>t||i>e&&a<t?0:i<=e&&l<=n||a>=t&&l>=n?i-e-r:a>t&&l<n||i<e&&l>n?a-t+o:0}o(ti,"propTypes",ei),o(ti,"defaultProps",{highlightClassName:"rbt-highlight-text"});var ai=function(e,t){var n=t.scrollMode,r=t.block,o=t.inline,i=t.boundary,a=t.skipOverflowHiddenElements,l="function"==typeof i?i:function(e){return e!==i};if(!ni(e))throw new TypeError("Invalid target");for(var s=document.scrollingElement||document.documentElement,u=[],c=e;ni(c)&&l(c);){if((c=c.parentNode)===s){u.push(c);break}c===document.body&&oi(c)&&!oi(document.documentElement)||oi(c,a)&&u.push(c)}for(var f=window.visualViewport?visualViewport.width:innerWidth,p=window.visualViewport?visualViewport.height:innerHeight,d=window.scrollX||pageXOffset,h=window.scrollY||pageYOffset,y=e.getBoundingClientRect(),m=y.height,b=y.width,v=y.top,g=y.right,w=y.bottom,O=y.left,E="start"===r||"nearest"===r?v:"end"===r?w:v+m/2,S="center"===o?O+b/2:"end"===o?g:O,x=[],I=0;I<u.length;I++){var P=u[I],C=P.getBoundingClientRect(),A=C.height,j=C.width,T=C.top,R=C.right,N=C.bottom,M=C.left;if("if-needed"===n&&v>=0&&O>=0&&w<=p&&g<=f&&v>=T&&w<=N&&O>=M&&g<=R)return x;var k=getComputedStyle(P),F=parseInt(k.borderLeftWidth,10),D=parseInt(k.borderTopWidth,10),_=parseInt(k.borderRightWidth,10),L=parseInt(k.borderBottomWidth,10),B=0,U=0,H="offsetWidth"in P?P.offsetWidth-P.clientWidth-F-_:0,W="offsetHeight"in P?P.offsetHeight-P.clientHeight-D-L:0;if(s===P)B="start"===r?E:"end"===r?E-p:"nearest"===r?ii(h,h+p,p,D,L,h+E,h+E+m,m):E-p/2,U="start"===o?S:"center"===o?S-f/2:"end"===o?S-f:ii(d,d+f,f,F,_,d+S,d+S+b,b),B=Math.max(0,B+h),U=Math.max(0,U+d);else{B="start"===r?E-T-D:"end"===r?E-N+L+W:"nearest"===r?ii(T,N,A,D,L+W,E,E+m,m):E-(T+A/2)+W/2,U="start"===o?S-M-F:"center"===o?S-(M+j/2)+H/2:"end"===o?S-R+_+H:ii(M,R,j,F,_+H,S,S+b,b);var $=P.scrollLeft,K=P.scrollTop;E+=K-(B=Math.max(0,Math.min(K+B,P.scrollHeight-A+W))),S+=$-(U=Math.max(0,Math.min($+U,P.scrollWidth-j+H)))}x.push({el:P,top:B,left:U})}return x};function li(e){return e===Object(e)&&0!==Object.keys(e).length}function si(e,t){var n=!e.ownerDocument.documentElement.contains(e);if(li(t)&&"function"==typeof t.behavior)return t.behavior(n?[]:ai(e,t));if(!n){var r=function(e){return!1===e?{block:"end",inline:"nearest"}:li(e)?e:{block:"start",inline:"nearest"}}(t);return function(e,t){void 0===t&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach((function(e){var r=e.el,o=e.top,i=e.left;r.scroll&&n?r.scroll({top:o,left:i,behavior:t}):(r.scrollTop=o,r.scrollLeft=i)}))}(ai(e,r),r.behavior)}}var ui={option:Ze.isRequired,position:ee.number},ci=function(e){var n=e.label,r=e.onClick,o=e.option,a=e.position,s=l(e,["label","onClick","option","position"]),u=$e(),c=u.activeIndex,f=u.id,p=u.isOnlyResult,d=u.onActiveItemChange,h=u.onInitialItemChange,y=u.onMenuItemClick,m=u.setItem,b=t.useRef(null);t.useEffect((function(){0===a&&h(o)})),t.useEffect((function(){if(a===c){d(o);var e=b.current;e&&si(e,{block:"nearest",boundary:e.parentNode,inline:"nearest",scrollMode:"if-needed"})}}));var v=t.useCallback((function(e){y(o,e),r&&r(e)}),[r,y,o]),g=p||c===a;return m(o,a),i({},s,{active:g,"aria-label":n,"aria-selected":g,id:Ne(f,a),onClick:v,onMouseDown:Be,ref:b,role:"option"})},fi=function(e){var t="withItem("+Ce(e)+")",n=function(t){return r.createElement(e,ci(t))};return n.displayName=t,n.propTypes=ui,n};var pi=r.forwardRef((function(e,t){var n=e.active,o=e.children,a=e.className,s=e.disabled,u=e.onClick,c=e.onMouseDown,f=l(e,["active","children","className","disabled","onClick","onMouseDown"]);return r.createElement("a",i({},f,{className:Re("dropdown-item",{active:n,disabled:s},a),href:"#",onClick:function(e){e.preventDefault(),!s&&u&&u(e)},onMouseDown:c,ref:t}),o)})),di=fi(pi),hi={"aria-label":ee.string,emptyLabel:ee.node,id:Je(ee.oneOfType([ee.number,ee.string]),Xe),maxHeight:ee.string},yi=function(e){function n(){return e.apply(this,arguments)||this}a(n,e);var o=n.prototype;return o.componentDidUpdate=function(e){var t=this.props,n=t.inputHeight,r=t.scheduleUpdate;n!==e.inputHeight&&r()},o.render=function(){var e=this.props,n=e.children,o=e.className,a=e.emptyLabel,l=e.id,s=e.innerRef,u=e.maxHeight,c=e.style,f=e.text,p=0===t.Children.count(n)?r.createElement(pi,{disabled:!0,role:"option"},a):n;return r.createElement("div",{"aria-label":this.props["aria-label"],className:Re("rbt-menu","dropdown-menu","show",o),id:l,key:f,ref:s,role:"listbox",style:i({},c,{display:"block",maxHeight:u,overflow:"auto"})},p)},n}(r.Component);o(yi,"propTypes",hi),o(yi,"defaultProps",{"aria-label":"menu-options",emptyLabel:"No matches found.",maxHeight:"300px"}),o(yi,"Divider",(function(e){return r.createElement("div",{className:"dropdown-divider",role:"separator"})})),o(yi,"Header",(function(e){return r.createElement("div",i({},e,{className:"dropdown-header",role:"heading"}))}));var mi={newSelectionPrefix:ee.node,paginationText:ee.node,renderMenuItemChildren:ee.func},bi={newSelectionPrefix:"New selection: ",paginationText:"Display additional results...",renderMenuItemChildren:function(e,t,n){return r.createElement(ti,{search:t.text},he(e,t.labelKey))}},vi=function(e){var n=e.labelKey,o=e.newSelectionPrefix,a=e.options,s=e.paginationText,u=e.renderMenuItemChildren,c=e.text,f=l(e,["labelKey","newSelectionPrefix","options","paginationText","renderMenuItemChildren","text"]);return r.createElement(yi,i({},f,{text:c}),a.map((function(a,l){var f=he(a,n),p={disabled:ye(a,"disabled"),label:f,option:a,position:l};return a.customOption?r.createElement(di,i({},p,{className:"rbt-menu-custom-option",key:l,label:f}),o,r.createElement(ti,{search:c},f)):a.paginationOption?r.createElement(t.Fragment,{key:"pagination-item"},r.createElement(yi.Divider,null),r.createElement(di,i({},p,{className:"rbt-menu-pagination-option",label:s}),s)):r.createElement(di,i({},p,{key:l}),u(a,e,l))})))};vi.propTypes=mi,vi.defaultProps=bi;var gi={clearButton:ee.bool,inputProps:Je(ee.object,(function(e,t,n){var r=e.inputProps;r&&"[object Object]"===Object.prototype.toString.call(r)&&ze.forEach((function(e){var t=e.alt,n=e.prop,o=t?" Use the top-level `"+t+"` prop instead.":null;xe(!r[n],"The `"+n+"` property of `inputProps` will be ignored."+o)}))})),isInvalid:ee.bool,isLoading:ee.bool,isValid:ee.bool,renderInput:ee.func,renderMenu:ee.func,renderToken:ee.func,size:Ge},wi={clearButton:!1,inputProps:{},isInvalid:!1,isLoading:!1,isValid:!1,renderMenu:function(e,t,n){return r.createElement(vi,i({},t,{labelKey:n.labelKey,options:e,text:n.text}))},renderToken:function(e,t,n){return r.createElement(qo,{disabled:t.disabled,key:n,onRemove:t.onRemove,option:e,tabIndex:t.tabIndex},he(e,t.labelKey))}};var Oi=function(e){var n=e.children,r=e.onRootClose,o=l(e,["children","onRootClose"]),i=t.useState(null),a=i[0],s=i[1];return wt(a,r,o),n(s)},Ei=function(e){function t(){for(var t,n=arguments.length,a=new Array(n),l=0;l<n;l++)a[l]=arguments[l];return o(s(t=e.call.apply(e,[this].concat(a))||this),"_referenceElement",void 0),o(s(t),"referenceElementRef",(function(e){t._referenceElement=e})),o(s(t),"_renderInput",(function(e,n){var o=t.props,a=o.isInvalid,l=o.isValid,s=o.multiple,u=o.renderInput,c=o.renderToken,f=o.size;if(se(u))return u(e,n);var p=i({},e,{isInvalid:a,isValid:l,size:f});if(!s)return r.createElement(Qo,p);var d=n.labelKey,h=n.onRemove,y=n.selected;return r.createElement(Zo,i({},p,{selected:y}),y.map((function(e,t){return c(e,i({},p,{labelKey:d,onRemove:h}),t)})))})),o(s(t),"_renderMenu",(function(e,n,r){var o=t.props,a=o.emptyLabel,l=o.id,s=o.maxHeight,u=o.newSelectionPrefix,c=o.paginationText;return(0,o.renderMenu)(e,i({},n,{emptyLabel:a,id:l,maxHeight:s,newSelectionPrefix:u,paginationText:c,renderMenuItemChildren:o.renderMenuItemChildren}),r)})),o(s(t),"_renderAux",(function(e){var n,o=e.onClear,i=e.selected,a=t.props,l=a.clearButton,s=a.disabled,u=a.isLoading,c=a.size;return u?n=r.createElement(It,null):l&&!s&&i.length&&(n=r.createElement(St,{onClick:o,onFocus:function(e){e.stopPropagation()},onMouseDown:Be,size:c})),n?r.createElement("div",{className:Re("rbt-aux",{"rbt-aux-lg":Ue(c)})},n):null})),t}return a(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.children,o=t.className,a=t.instanceRef,s=t.open,u=t.options,c=t.style;return r.createElement(lt,i({},this.props,{options:u,ref:a}),(function(t){var a=t.getInputProps,u=l(t,["getInputProps"]),f=u.hideMenu,p=u.isMenuShown,d=u.results,h=e._renderAux(u);return r.createElement(Oi,{disabled:s||!p,onRootClose:f},(function(t){return r.createElement("div",{className:Re("rbt",{"has-aux":!!h},o),ref:t,style:i({},c,{outline:"none",position:"relative"}),tabIndex:-1},e._renderInput(i({},a(e.props.inputProps),{referenceElementRef:e.referenceElementRef}),u),r.createElement(Uo,i({},function(e){return fe(e,["align","dropup","flip","positionFixed"])}(e.props),{isMenuShown:p,referenceElement:e._referenceElement}),(function(t){return e._renderMenu(d,t,u)})),h,se(n)?n(u):n)}))}))},t}(r.Component);o(Ei,"propTypes",gi),o(Ei,"defaultProps",wi);var Si=t.forwardRef((function(e,t){return r.createElement(Ei,i({},e,{instanceRef:t}))})),xi=ft(Si);e.AsyncTypeahead=xi,e.ClearButton=St,e.Highlighter=ti,e.Hint=Go,e.Input=Jo,e.Loader=It,e.Menu=yi,e.MenuItem=di,e.Token=qo,e.Typeahead=Si,e.TypeaheadInputMulti=Zo,e.TypeaheadInputSingle=Qo,e.TypeaheadMenu=vi,e.asyncContainer=function(e){return xe(!1,"The `asyncContainer` export is deprecated; use `withAsync` instead."),ft(e)},e.menuItemContainer=function(e){return xe(!1,"The `menuItemContainer` export is deprecated; use `withItem` instead."),fi(e)},e.tokenContainer=function(e){return xe(!1,"The `tokenContainer` export is deprecated; use `withToken` instead."),$o(e)},e.useAsync=ct,e.useHint=zo,e.useItem=ci,e.useToken=Wo,e.withAsync=ft,e.withItem=fi,e.withToken=$o,Object.defineProperty(e,"__esModule",{value:!0})}));