!function(){function e(e,t,r,n,u,a,o){try{var s=e[a](o),i=s.value}catch(c){return void r(c)}s.done?t(i):Promise.resolve(i).then(n,u)}function t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,u,a=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(i){s=!0,u=i}finally{try{o||null==r.return||r.return()}finally{if(s)throw u}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var n=document.createElement("style");n.innerHTML="._search_1u6p9_1 .results{width:100%!important}@media only screen and (min-width: 768px){._search_1u6p9_1{width:280px;display:inline-block}._search_1u6p9_1 .ui.input{width:100%}}@media only screen and (max-width: 767px){._search_1u6p9_1{flex-grow:1}}\n",document.head.appendChild(n),System.register(["./vendor-legacy.046e8265.js","./index-legacy.b746a8e2.js","./onEnterPress-legacy.f218462d.js"],(function(r){"use strict";var n,u,a,o,s,i,c;return{setters:[function(e){n=e.r,u=e.U,a=e.j,o=e.X},function(e){s=e.c,i=e.e},function(e){c=e.o}],execute:function(){var l="_search_1u6p9_1";r("P",(function(r){var f=t(n.exports.useState(""),2),p=f[0],d=f[1],h=t(n.exports.useState([]),2),y=h[0],m=h[1],v=t(n.exports.useState(!1),2),x=v[0],b=v[1],g=n.exports.useRef(""),w=u(function(){var t,n=(t=regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=t.trim(),b(!0),g.current=t,t){e.next=6;break}return b(!1),e.abrupt("return");case 6:return e.next=8,r.onSearch(t);case 8:if(n=e.sent,g.current===t){e.next=11;break}return e.abrupt("return");case 11:m(n||[]),R(!1),b(!1);case 14:case"end":return e.stop()}}),e)})),function(){var r=this,n=arguments;return new Promise((function(u,a){var o=t.apply(r,n);function s(t){e(o,u,a,s,i,"next",t)}function i(t){e(o,u,a,s,i,"throw",t)}s(void 0)}))});return function(e){return n.apply(this,arguments)}}(),500),_=t(n.exports.useState(!0),2),S=_[0],R=_[1];s().subscribe((function(e){return"ready"===e.type&&!S&&R(!0)}));var P=i(0,768);return a(o,{className:l+(r.className?" "+r.className:""),placeholder:r.placeholder,value:p,noResultsMessage:r.noResultsMessage,onSearchChange:function(e,t){var r=t.value;d(r),b(!0),w(r)},input:{iconPosition:"left",fluid:P},results:S?[]:y.map((function(e){return{key:r.onGetResultKey(e),title:"",data:e}})),loading:x,showNoResults:!x&&!S,resultRenderer:function(e){return r.onRenderResult(e.data)},onResultSelect:function(e,t){var n=t.result;return r.onResultSelect(n.data)},onKeyPress:c((function(){return p&&r.onEnterPress&&r.onEnterPress(p)}))})}))}}}))}();
