{"version":3,"names":["getAttrOrDefault","node","name","def","val","attr","global","factory","module","exports","document","w","Error","window","this","noGlobal","getProto","Object","getPrototypeOf","slice","arr","flat","array","call","push","indexOf","toString","class2type","hasOwn","hasOwnProperty","fnToString","support","obj","isWindow","src","nonce","noModule","$","ready","formSubmitted","click","e","preventDefault","buttonID","addClass","html","setTimeout","console","log","removeClass","removeAttr","t","define","amd","accessibleAutocomplete","self","o","n","r","i","l","m","c","d","defineProperty","configurable","enumerable","get","__esModule","default","prototype","p","s","L","arguments","length","P","children","pop","String","u","nodeName","attributes","key","B","vnode","_dirty","R","debounceRendering","T","k","a","splitText","_componentConstructor","normalizedNodeName","toLowerCase","defaultProps","f","parentNode","removeChild","h","style","cssText","V","test","innerHTML","__html","replace","substring","addEventListener","v","removeEventListener","_listeners","removeAttribute","removeAttributeNS","setAttributeNS","setAttribute","className","type","event","y","q","afterMount","componentDidMount","_","U","j","ownerSVGElement","F","b","appendChild","_component","nodeValue","createTextNode","replaceChild","__preactattr_","I","createElementNS","createElement","firstChild","value","nextSibling","g","dangerouslySetInnerHTML","O","childNodes","C","x","E","__key","trim","insertBefore","M","ref","lastChild","previousSibling","W","render","A","constructor","N","nextBase","splice","S","_disable","__ref","base","componentWillMount","componentWillReceiveProps","context","prevContext","prevProps","props","syncComponentUpdates","state","prevState","shouldComponentUpdate","componentWillUpdate","getChildContext","_parentComponent","D","unshift","componentDidUpdate","afterUpdate","_renderCallbacks","beforeUnmount","componentWillUnmount","Promise","resolve","then","bind","setState","forceUpdate","K","cloneElement","Component","rerender","options","element","id","source","Array","isArray","assign","filter","enhanceSelectElement","selectElement","preserveNullOptions","map","textContent","innerText","onConfirm","selected","defaultValue","selectedIndex","autoselect","display","navigator","userAgent","match","onInput","onChange","pointerEvents","elementReferences","focused","hovered","menuOpen","query","handleComponentBlur","handleKeyDown","handleUpArrow","handleDownArrow","handleEnter","handlePrintableKey","handleOptionBlur","handleOptionClick","handleOptionFocus","handleOptionMouseDown","handleOptionMouseEnter","handleOptionMouseOut","handleInputBlur","handleInputChange","handleInputFocus","pollInputElement","getDirectInputChanges","create","writable","setPrototypeOf","__proto__","clearTimeout","$pollInput","target","focus","setSelectionRange","hasAutoselect","templateInputValue","templates","inputValue","templateSuggestion","suggestion","confirmOnBlur","relatedTarget","minLength","showAllValues","handleInputClick","handleSpace","keyCode","cssNamespace","displayMenu","placeholder","required","tNoResults","tStatusQueryTooShort","tStatusNoResults","tStatusSelectedOption","tStatusResults","dropdownArrow","showNoOptionsFound","H","Q","G","substr","J","X","onKeyDown","role","queryLength","minQueryLength","selectedOption","selectedOptionIndex","tQueryTooShort","tSelectedOption","tResults","readonly","tabIndex","autoComplete","onClick","onBlur","onFocus","onFocusOut","onMouseDown","onMouseEnter","onMouseOut","apply","concat","bump","border","clip","height","marginBottom","marginRight","overflow","padding","position","whiteSpace","width","version","xmlns","focusable","stroke","fill","points","foundation","togglerReady","on","panels","buttons","panelsUpdated","buttonsUpdated","Foundation","reInit","stepItem","currentTarget","nextExpanded","animate","scrollTop","offset","top","buttonsCount"],"sources":["../../js/app.js","../../js/character-count.js","../../js/button-prevent-double-click.js","webpack:///accessible-autocomplete.min.js"],"sourcesContent":["/*https://codekitapp.com/help/javascript/*/\r\n// @codekit-prepend quiet \"/node_modules/jquery/dist/jquery.js\";\r\n// @codekit-prepend quiet \"/node_modules/foundation-sites/dist/js/foundation.js\";\r\n\r\n// @codekit-prepend quiet \"character-count.js\";\r\n// @codekit-prepend quiet \"button-prevent-double-click.js\";\r\n// @codekit-prepend quiet \"/js/accessible-autocomplete-master/dist/accessible-autocomplete.min.js\";\r\n\r\n\r\n// JavaScript Document - \r\n\r\n$(document).foundation();\r\n\r\n// Jquery\r\n$('body').addClass('js-enabled');\r\n\r\nfunction getAttrOrDefault(node, name, def) {\r\n\tvar val = node.attr(name);\r\n\treturn val != null ? val : def;\r\n}\r\n\r\n\r\n/* Step by Step */\r\nvar togglerReady = false;\r\n\r\n$('#allSteps').on('click', function(e) {\r\n\r\n\t$(this).html($(this).html() == 'Show all' ? 'Hide all' : 'Show all');\r\n\r\n\tif(togglerReady == false) {\r\n\r\n\t\tvar panels = $('.app-step-nav__panel:not(.expanded)');\r\n\t\tvar buttons = $('.step-nav__button.singleStep[aria-expanded]').attr('aria-expanded', 'false');\r\n\r\n\t\t$(panels).foundation('toggle');\r\n\t\t$(buttons).html(\"Hide\");\r\n\r\n\t\ttogglerReady = true;\r\n\r\n\t} else {\r\n\r\n\t\tvar panelsUpdated = $('.app-step-nav__panel.expanded');\r\n\t\tvar buttonsUpdated = $('.step-nav__button.singleStep');\r\n\r\n\t\t$(panelsUpdated).foundation('toggle');\r\n\t\t$(buttonsUpdated).html(\"Show\");\r\n\r\n\t\ttogglerReady = false;\r\n\r\n\t}\r\n\t// reset the foundation toggler js component\r\n\tFoundation.reInit('toggler');\r\n\r\n});\r\n\r\n\r\n/* update the labels for the fondation toggler */\r\n$('.step-nav__button.singleStep').on('click', function(e) {\r\n\r\n\tvar stepItem = $(e.currentTarget);\r\n\tvar nextExpanded = $(this).attr('data-parent');\r\n\r\n\r\n\r\n\tif(stepItem.attr('aria-expanded') === 'true') {\r\n\r\n\t\t$(this).html('Show');\r\n\r\n\t} else {\r\n\r\n\t\t$(this).html('Hide');\r\n\r\n\t}\r\n\r\n\tif(stepItem.attr('aria-expanded') === 'false') {\r\n\r\n\t\t$(this).html('Hide');\r\n\r\n\t\t// improved focus \r\n\t\tconsole.log('lets scroll to ' + nextExpanded)\r\n\r\n\r\n\t\t$('html,body').animate({\r\n\t\t\tscrollTop: $(nextExpanded).offset().top\r\n\t\t}, 'slow');\r\n\r\n\r\n\t} else {\r\n\r\n\t\t$(this).html('Show');\r\n\r\n\t}\r\n\r\n\r\n\tvar buttonsCount = $('#allStepsListed > li .app-step-nav__panel.expanded').length;\r\n\tconsole.log('I count ' + buttonsCount + ' expanded panel step');\r\n\r\n\t// reset the Show / Hide all \r\n\tif(buttonsCount < 2) {\r\n\r\n\t\tconsole.log('Less than 2 panels open so lets reset')\r\n\r\n\t\t$('#allSteps').html('Show all');\r\n\r\n\t\t// reset the foundation toggler js component\r\n\t\tFoundation.reInit('toggler');\r\n\r\n\t\ttogglerReady = false;\r\n\r\n\t}\r\n\r\n\r\n\tif(buttonsCount > 4) {\r\n\r\n\t\tconsole.log('More than 4 panels open so lets reset')\r\n\r\n\t\t$('#allSteps').html('Hide all');\r\n\r\n\t\t// reset the foundation toggler js component\r\n\t\tFoundation.reInit('toggler');\r\n\r\n\t\ttogglerReady = true;\r\n\r\n\t}\r\n\r\n});","$(document).ready(function() {\n\n\t// text areas with character count hint below component\n\t//
...\n\t$('textarea').each(\n\n\n\t\tfunction() {\n\n\t\t\tvar textareaID = $(this).attr('id'),\n\t\t\t\tmaxlength = $(this).attr('maxlength'),\n\t\t\t\t// merge the ID to the longer class definition\n\t\t\t\t// see DOM :

$fieldCharacterCountString

\n\t\t\t\tcurrent = $('#' + textareaID + '-num-current');\n\n\t\t\t// set the FormFieldWordCount string\n\t\t\tvar lengthLoad = $(this).val().length;\n\n\t\t\t// first render in the onload\n\t\t\tif(lengthLoad > 1) {\n\n\t\t\t\t// any textareas with some text\n\n\t\t\t\tvar countLeft = maxlength - lengthLoad,\n\t\t\t\t\tcountPercent = lengthLoad / maxlength * 100;\n\n\t\t\t\tif(countLeft == 1) {\n\n\t\t\t\t\tcurrent.text('You have ' + countLeft + ' character remaining');\n\t\t\t\t\tcurrent.css('font-weight', 'normal');\n\n\t\t\t\t} else if(countLeft == 0) {\n\n\t\t\t\t\tcurrent.text('You have no characters remaining');\n\t\t\t\t\tcurrent.addClass('govuk-error-message');\n\t\t\t\t\tcurrent.css('font-weight', 'bold');\n\n\t\t\t\t} else {\n\n\t\t\t\t\tcurrent.text('You have ' + countLeft + ' characters remaining');\n\t\t\t\t\tcurrent.css('font-weight', 'normal');\n\t\t\t\t\tcurrent.removeClass('govuk-error-message');\n\n\t\t\t\t}\n\n\t\t\t\t/* This creates warning text colour when it's nearing the limit */\n\t\t\t\tif(countPercent > 70) {\n\n\t\t\t\t\tcurrent.addClass('count-warning');\n\n\t\t\t\t}\n\t\t\t\tif(countPercent < 70) {\n\n\t\t\t\t\tcurrent.removeClass('count-warning');\n\n\t\t\t\t}\n\n\n\t\t\t} else {\n\n\t\t\t\t// empty textareas\n\t\t\t\t$(current).text('You have ' + maxlength + ' characters remaining');\n\n\t\t\t}\n\n\n\t\t\t// count the live updates to a textarea with maxlength attribute set\n\t\t\t$(this).keyup(function() {\n\n\t\t\t\tvar characterCount = $(this).val().length,\n\t\t\t\t\tcountLeft = maxlength - characterCount;\n\t\t\t\tcountPercent = characterCount / maxlength * 100;\n\n\t\t\t\tif(countLeft == 1) {\n\n\t\t\t\t\tcurrent.text('You have ' + countLeft + ' character remaining');\n\t\t\t\t\tcurrent.css('font-weight', 'normal');\n\n\t\t\t\t} else if(countLeft == 0) {\n\n\t\t\t\t\tcurrent.text('You have no characters remaining');\n\t\t\t\t\tcurrent.addClass('govuk-error-message');\n\t\t\t\t\tcurrent.css('font-weight', 'bold');\n\n\t\t\t\t} else {\n\n\t\t\t\t\tcurrent.text('You have ' + countLeft + ' characters remaining');\n\t\t\t\t\tcurrent.css('font-weight', 'normal');\n\t\t\t\t\tcurrent.removeClass('govuk-error-message');\n\n\t\t\t\t}\n\n\t\t\t\t/* This creates warning text colour when it's nearing the limit */\n\t\t\t\tif(countPercent > 70) {\n\n\t\t\t\t\tcurrent.addClass('count-warning');\n\n\t\t\t\t}\n\t\t\t\tif(countPercent < 70) {\n\n\t\t\t\t\tcurrent.removeClass('count-warning');\n\n\t\t\t\t}\n\n\n\n\t\t\t});\n\n\n\t\t}\n\n\t);\n\n});","$(document).ready(function() {\n\t// JavaScript/jQuery code\n\tvar formSubmitted = false; // Flag to track form submission\n\n\t$('[data-prevent-double-click]').click(function(e) {\n\t\tif(formSubmitted) {\n\t\t\te.preventDefault(); // If the form has already been submitted, prevent further submissions\n\t\t\treturn;\n\t\t}\n\n\t\t// Save the ID of the clicked button\n\t\tvar buttonID = $(this).attr(\"id\");\n\n\t\t// Disable the button and show a spinner\n\t\t$(this).addClass('button-action-spinner');\n\t\t$(this).html(' Please wait');\n\t\t$(this).attr(\"disabled\", \"disabled\");\n\t\t$(this).attr(\"aria-busy\", \"true\");\n\n\t\t// Use setTimeout to create a delay before executing the rest of the code\n\t\tsetTimeout(function() {\n\t\t\tconsole.log('Button with the ID ' + buttonID + ' was clicked');\n\n\t\t\t// Perform your desired action here, but do not submit the form\n\t\t\t// $(\"#this-page\").submit();\n\n\t\t\t// Reset the flag after the action is completed\n\t\t\tformSubmitted = false;\n\n\t\t\t// After the action is completed, re-enable the button\n\t\t\t$('[data-prevent-double-click]').removeClass('button-action-spinner');\n\t\t\t$('[data-prevent-double-click]').html('Continue');\n\t\t\t$('[data-prevent-double-click]').removeAttr(\"disabled\");\n\t\t\t$('[data-prevent-double-click]').removeAttr(\"aria-busy\");\n\t\t}, 6000);\n\n\t\t// Prevent the default form submission behavior\n\t\te.preventDefault();\n\t\tformSubmitted = true;\n\t});\n});","(function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?exports.accessibleAutocomplete=t():e.accessibleAutocomplete=t()})(\"undefined\"!=typeof self?self:this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,\"a\",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p=\"/\",t(t.s=1)}([function(e,t,n){\"use strict\";function o(){}function r(e,t){var n,r,l,i,s=P;for(i=arguments.length;i-- >2;)B.push(arguments[i]);for(t&&null!=t.children&&(B.length||B.push(t.children),delete t.children);B.length;)if((r=B.pop())&&void 0!==r.pop)for(i=r.length;i--;)B.push(r[i]);else\"boolean\"==typeof r&&(r=null),(l=\"function\"!=typeof e)&&(null==r?r=\"\":\"number\"==typeof r?r=String(r):\"string\"!=typeof r&&(l=!1)),l&&n?s[s.length-1]+=r:s===P?s=[r]:s.push(r),n=l;var a=new o;return a.nodeName=e,a.children=s,a.attributes=null==t?void 0:t,a.key=null==t?void 0:t.key,void 0!==T.vnode&&T.vnode(a),a}function l(e,t){for(var n in t)e[n]=t[n];return e}function i(e,t){return r(e.nodeName,l(l({},e.attributes),t),arguments.length>2?[].slice.call(arguments,2):e.children)}function s(e){!e._dirty&&(e._dirty=!0)&&1==V.push(e)&&(T.debounceRendering||L)(a)}function a(){var e,t=V;for(V=[];e=t.pop();)e._dirty&&k(e)}function u(e,t,n){return\"string\"==typeof t||\"number\"==typeof t?void 0!==e.splitText:\"string\"==typeof t.nodeName?!e._componentConstructor&&p(e,t.nodeName):n||e._componentConstructor===t.nodeName}function p(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function c(e){var t=l({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var o in n)void 0===t[o]&&(t[o]=n[o]);return t}function d(e,t){var n=t?document.createElementNS(\"http://www.w3.org/2000/svg\",e):document.createElement(e);return n.normalizedNodeName=e,n}function f(e){var t=e.parentNode;t&&t.removeChild(e)}function h(e,t,n,o,r){if(\"className\"===t&&(t=\"class\"),\"key\"===t);else if(\"ref\"===t)n&&n(null),o&&o(e);else if(\"class\"!==t||r)if(\"style\"===t){if(o&&\"string\"!=typeof o&&\"string\"!=typeof n||(e.style.cssText=o||\"\"),o&&\"object\"==typeof o){if(\"string\"!=typeof n)for(var l in n)l in o||(e.style[l]=\"\");for(var l in o)e.style[l]=\"number\"==typeof o[l]&&!1===R.test(l)?o[l]+\"px\":o[l]}}else if(\"dangerouslySetInnerHTML\"===t)o&&(e.innerHTML=o.__html||\"\");else if(\"o\"==t[0]&&\"n\"==t[1]){var i=t!==(t=t.replace(/Capture$/,\"\"));t=t.toLowerCase().substring(2),o?n||e.addEventListener(t,v,i):e.removeEventListener(t,v,i),(e._listeners||(e._listeners={}))[t]=o}else if(\"list\"!==t&&\"type\"!==t&&!r&&t in e)m(e,t,null==o?\"\":o),null!=o&&!1!==o||e.removeAttribute(t);else{var s=r&&t!==(t=t.replace(/^xlink:?/,\"\"));null==o||!1===o?s?e.removeAttributeNS(\"http://www.w3.org/1999/xlink\",t.toLowerCase()):e.removeAttribute(t):\"function\"!=typeof o&&(s?e.setAttributeNS(\"http://www.w3.org/1999/xlink\",t.toLowerCase(),o):e.setAttribute(t,o))}else e.className=o||\"\"}function m(e,t,n){try{e[t]=n}catch(e){}}function v(e){return this._listeners[e.type](T.event&&T.event(e)||e)}function y(){for(var e;e=q.pop();)T.afterMount&&T.afterMount(e),e.componentDidMount&&e.componentDidMount()}function _(e,t,n,o,r,l){U++||(j=null!=r&&void 0!==r.ownerSVGElement,F=null!=e&&!(\"__preactattr_\"in e));var i=b(e,t,n,o,l);return r&&i.parentNode!==r&&r.appendChild(i),--U||(F=!1,l||y()),i}function b(e,t,n,o,r){var l=e,i=j;if(null!=t&&\"boolean\"!=typeof t||(t=\"\"),\"string\"==typeof t||\"number\"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||r)?e.nodeValue!=t&&(e.nodeValue=t):(l=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(l,e),w(e,!0))),l.__preactattr_=!0,l;var s=t.nodeName;if(\"function\"==typeof s)return I(e,t,n,o);if(j=\"svg\"===s||\"foreignObject\"!==s&&j,s=String(s),(!e||!p(e,s))&&(l=d(s,j),e)){for(;e.firstChild;)l.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(l,e),w(e,!0)}var a=l.firstChild,u=l.__preactattr_,c=t.children;if(null==u){u=l.__preactattr_={};for(var f=l.attributes,h=f.length;h--;)u[f[h].name]=f[h].value}return!F&&c&&1===c.length&&\"string\"==typeof c[0]&&null!=a&&void 0!==a.splitText&&null==a.nextSibling?a.nodeValue!=c[0]&&(a.nodeValue=c[0]):(c&&c.length||null!=a)&&g(l,c,n,o,F||null!=u.dangerouslySetInnerHTML),O(l,t.attributes,u),j=i,l}function g(e,t,n,o,r){var l,i,s,a,p,c=e.childNodes,d=[],h={},m=0,v=0,y=c.length,_=0,g=t?t.length:0;if(0!==y)for(var C=0;C47&&e<58||32===e||8===e||e>64&&e<91||e>95&&e<112||e>185&&e<193||e>218&&e<223}function u(e){return _?{onInput:e}:b?{onChange:e}:void 0}t.__esModule=!0,t.default=void 0;var p,c,d=Object.assign||function(e){for(var t=1;t=o;this.setState({query:s}),l||!a&&u&&p?r(s,function(e){var n=e.length>0;t.setState({menuOpen:n,options:e,selected:i&&n?0:-1})}):!a&&p||this.setState({menuOpen:!1,options:[]})},t.prototype.handleInputClick=function(e){this.handleInputChange(e)},t.prototype.handleInputFocus=function(e){this.setState({focused:-1})},t.prototype.handleOptionFocus=function(e){this.setState({focused:e,hovered:null,selected:e})},t.prototype.handleOptionMouseEnter=function(e,t){this.setState({hovered:t})},t.prototype.handleOptionMouseOut=function(e,t){this.setState({hovered:null})},t.prototype.handleOptionClick=function(e,t){var n=this.state.options[t],o=this.templateInputValue(n);this.props.onConfirm(n),this.setState({focused:-1,menuOpen:!1,query:o,selected:-1}),this.forceUpdate()},t.prototype.handleOptionMouseDown=function(e){e.preventDefault()},t.prototype.handleUpArrow=function(e){e.preventDefault();var t=this.state,n=t.menuOpen,o=t.selected;-1!==o&&n&&this.handleOptionFocus(o-1)},t.prototype.handleDownArrow=function(e){var t=this;if(e.preventDefault(),this.props.showAllValues&&!1===this.state.menuOpen)e.preventDefault(),this.props.source(\"\",function(e){t.setState({menuOpen:!0,options:e,selected:0,focused:0,hovered:null})});else if(!0===this.state.menuOpen){var n=this.state,o=n.menuOpen,r=n.options,l=n.selected,i=l!==r.length-1,s=i&&o;s&&this.handleOptionFocus(l+1)}},t.prototype.handleSpace=function(e){var t=this;this.props.showAllValues&&!1===this.state.menuOpen&&\"\"===this.state.query&&(e.preventDefault(),this.props.source(\"\",function(e){t.setState({menuOpen:!0,options:e})})),-1!==this.state.focused&&(e.preventDefault(),this.handleOptionClick(e,this.state.focused))},t.prototype.handleEnter=function(e){if(this.state.menuOpen){e.preventDefault();this.state.selected>=0&&this.handleOptionClick(e,this.state.selected)}},t.prototype.handlePrintableKey=function(e){var t=this.elementReferences[-1];e.target===t||t.focus()},t.prototype.handleKeyDown=function(e){switch(g[e.keyCode]){case\"up\":this.handleUpArrow(e);break;case\"down\":this.handleDownArrow(e);break;case\"space\":this.handleSpace(e);break;case\"enter\":this.handleEnter(e);break;case\"escape\":this.handleComponentBlur({query:this.state.query});break;default:a(e.keyCode)&&this.handlePrintableKey(e)}},t.prototype.render=function(){var e=this,t=this.props,n=t.cssNamespace,o=t.displayMenu,r=t.id,l=t.minLength,i=t.name,s=t.placeholder,a=t.required,p=t.showAllValues,c=t.tNoResults,h=t.tStatusQueryTooShort,v=t.tStatusNoResults,y=t.tStatusSelectedOption,_=t.tStatusResults,b=t.dropdownArrow,g=this.state,C=g.focused,O=g.hovered,x=g.menuOpen,E=g.options,N=g.query,S=g.selected,k=this.hasAutoselect(),I=-1===C,M=0===E.length,A=0!==N.length,D=N.length>=l,T=this.props.showNoOptionsFound&&I&&M&&A&&D,B=n+\"__wrapper\",P=n+\"__input\",L=null!==C,R=L?\" \"+P+\"--focused\":\"\",V=this.props.showAllValues?\" \"+P+\"--show-all-values\":\" \"+P+\"--default\",q=n+\"__dropdown-arrow-down\",U=-1!==C&&null!==C,j=n+\"__menu\",F=j+\"--\"+o,W=x||T,K=j+\"--\"+(W?\"visible\":\"hidden\"),H=n+\"__option\",Q=n+\"__hint\",$=this.templateInputValue(E[S]),z=$&&0===$.toLowerCase().indexOf(N.toLowerCase()),G=z&&k?N+$.substr(N.length):\"\",J=w&&G,X=void 0;return p&&\"string\"==typeof(X=b({className:q}))&&(X=(0,f.createElement)(\"div\",{className:n+\"__dropdown-arrow-down-wrapper\",dangerouslySetInnerHTML:{__html:X}})),(0,f.createElement)(\"div\",{className:B,onKeyDown:this.handleKeyDown,role:\"combobox\",\"aria-expanded\":x?\"true\":\"false\"},(0,f.createElement)(m.default,{length:E.length,queryLength:N.length,minQueryLength:l,selectedOption:this.templateInputValue(E[S]),selectedOptionIndex:S,tQueryTooShort:h,tNoResults:v,tSelectedOption:y,tResults:_}),J&&(0,f.createElement)(\"span\",null,(0,f.createElement)(\"input\",{className:Q,readonly:!0,tabIndex:\"-1\",value:G})),(0,f.createElement)(\"input\",d({\"aria-activedescendant\":!!U&&r+\"__option--\"+C,\"aria-owns\":r+\"__listbox\",autoComplete:\"off\",className:\"\"+P+R+V,id:r,onClick:function(t){return e.handleInputClick(t)},onBlur:this.handleInputBlur},u(this.handleInputChange),{onFocus:this.handleInputFocus,name:i,placeholder:s,ref:function(t){e.elementReferences[-1]=t},type:\"text\",role:\"textbox\",required:a,value:N})),X,(0,f.createElement)(\"ul\",{className:j+\" \"+F+\" \"+K,id:r+\"__listbox\",role:\"listbox\"},E.map(function(t,n){var o=-1===C?S===n:C===n,l=o&&null===O?\" \"+H+\"--focused\":\"\",i=n%2?\" \"+H+\"--odd\":\"\";return(0,f.createElement)(\"li\",{\"aria-selected\":C===n,className:\"\"+H+l+i,dangerouslySetInnerHTML:{__html:e.templateSuggestion(t)},id:r+\"__option--\"+n,key:n,onFocusOut:function(t){return e.handleOptionBlur(t,n)},onClick:function(t){return e.handleOptionClick(t,n)},onMouseDown:e.handleOptionMouseDown,onMouseEnter:function(t){return e.handleOptionMouseEnter(t,n)},onMouseOut:function(t){return e.handleOptionMouseOut(t,n)},ref:function(t){e.elementReferences[n]=t},role:\"option\",tabIndex:\"-1\"})}),T&&(0,f.createElement)(\"li\",{className:H+\" \"+H+\"--no-results\"},c())))},t}(f.Component),p.defaultProps={autoselect:!1,cssNamespace:\"autocomplete\",defaultValue:\"\",displayMenu:\"inline\",minLength:0,name:\"input-autocomplete\",placeholder:\"\",onConfirm:function(){},confirmOnBlur:!0,showNoOptionsFound:!0,showAllValues:!1,required:!1,tNoResults:function(){return\"No results found\"},dropdownArrow:y.default},c);t.default=C},function(e,t,n){\"use strict\";function o(e,t){if(!(e instanceof t))return;(\"Cannot call a class as a function\")}function r(e,t){if(!e)return;(\"this hasn't been initialised - super() hasn't been called\");return!t||\"object\"!=typeof t&&\"function\"!=typeof t?e:t}function l(e,t){if(\"function\"!=typeof t&&null!==t)return;(\"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)}t.__esModule=!0,t.default=void 0;var i,s,a=n(0),u=(s=i=function(e){function t(){var n,l,i;o(this,t);for(var s=arguments.length,a=Array(s),u=0;u