!function(e){var t={};function s(a){if(t[a])return t[a].exports;var n=t[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,s),n.l=!0,n.exports}s.m=e,s.c=t,s.d=function(e,t,a){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(s.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)s.d(a,n,function(t){return e[t]}.bind(null,n));return a},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="",s(s.s=0)}([function(e,t,s){"use strict";var a=window.SearchSpring.Catalog,n=a.featureFlags,r=s(1),i=s(2),o=s(3),c={},l=s(4),u=a.importer.config.autocomplete2;u="string"==typeof u?{input:u}:u;var p={action:"",autoPosition:!1,history:!1,input:"",limit:6,termLimit:4,deepSearch:!0,siteid:a.site.id,spellCorrection:!0,trendingSearches:!1,trendingLimit:6,language:"en",queryMode:"suggestion",apiHost:"https://suggest-cache.searchspring.net",apiPath:"/api/suggest/query",trendingPath:"/api/suggest/trending",trendingVerbiage:""};angular.extend(p,u),p.siteid&&!u.apiHost&&(p.apiHost="https://"+p.siteid+".a.searchspring.io"),a.importer.include("spatial-navigation",{bundled:p.bundled}).then((function(){a.importer.resolve("autocomplete2")}));var m=a.config.createConfig((function(e){e.for("corrections",(function(e){e.set(!0===e.value),e.setIf(!0===e.inheritedValue,!0),e.setIf("aggressive"===e.inheritedValue,!0),e.setIf("integrated"===e.inheritedValue,!0)})),e.for("mode",(function(e){e.setIf(!0===e.inheritedValue,"default"),e.setIf(!1===e.inheritedValue,"disabled"),e.setIf("aggressive"===e.inheritedValue,"agressive"),e.setIf("integrated"===e.inheritedValue,"integrated")})),e.for("searchAssumptions",(function(e){e.for("corrections",(function(e){e.set(!0===e.value),e.setIf(!0===e.inheritedValue,!0),e.setIf("aggressive"===e.inheritedValue,!0)})),e.for("completions",(function(e){e.set(!0===e.value),e.setIf("aggressive"===e.inheritedValue,!0),e.setIf("integrated"===e.inheritedValue,!0)}))}))}));p.spell=p.spellCorrection=m(p.spellCorrection);function d(e){return""+e+""}var f,g,h=(f=window.document.createElement("textarea"),(new l).init({argFormat:[Array],coerceArgs:function(e){return["string"==typeof e[0]?e[0].split(/\s+/):e[0]]}}).map((function(e){return e.replace(/<\/?em>/g,"")})).map((function(e){return f.innerHTML=e,f.value.replace(//g,">")})).map((function(e){return e.split(/\s+/)})).map((function(e,t){var s=t[0];return e.map((function(e){var t=s.map((function(t){return function(e,t){for(var s=0;s1?s:"");return e.updateParameters(n),e}function y(e){if(e)return e.replace(/<\/?em>/g,"")}function w(e){if(e)return y(e).replace(/</g,"<").replace(/>/g,">")}function b(e,t){e instanceof angular.element||(e=angular.element(e)),e.off("input").on("input",(function(e){t.ac.input=e.target.value,t.$digest()})),e.attr("ss-nav-input",""),e.attr("ng-non-bindable",""),e.attr("spellcheck","false"),e.attr("autocomplete","off")}function x(e,t){t[0].style.position="fixed";var s=function(){if(window.document.body.scrollWidth)return window.document.body.scrollWidth;if(window.innerWidth)return window.innerWidth;if(window.document.documentElement&&window.document.documentElement.clientWidth)return window.document.documentElement.clientWidth;if(window.document.body)return window.document.body.clientWidth}(),a=e[0].getBoundingClientRect();t[0].style.top=a.top+a.height+"px",a.left>=s/2?(t[0].style.left="auto",t[0].style.right=s-a.right+"px"):(t[0].style.right="auto",t[0].style.left=a.left+"px"),window.document.querySelector("input:focus")==e[0]?angular.element(t[0]).removeClass("ss-multiple-ac-hide"):angular.element(t[0]).addClass("ss-multiple-ac-hide")}function S(e,t){"loading"!=window.document.readyState?(a.promises.compiler.then((function(s){var n=window.document.querySelectorAll(t||p.input);e.ac.elements={inputs:[],currentInput:void 0},angular.forEach(n,(function(t){var n=angular.element(t);e.ac.elements.inputs.push(n);var r=c.form=n[0].form,i=angular.element('
');void 0===n.parent().attr("ss-nav")?(b(n,e),n.after(i),n.parent().attr("ss-nav",""),s(n.parent())(e)):s(n.parent())(e,(function(t){n.parent().replaceWith(t),n=angular.element(t[0].querySelector("[ss-nav-input]")),r=c.form=n[0].form,i=angular.element(t[0].querySelector("[ss-autocomplete]")),n&&(!i||"object"==typeof i&&0==Object.keys(i).length)&&(i=angular.element('
'),n.after(i)),b(n,e)})),n.on("click",(function(e){e.stopPropagation()})),i.on("click",(function(e){e.stopPropagation()})),p.autoPosition&&(angular.element(window).on("resize scroll",(function(){x(n,i)})),n.on("focus blur",(function(){x(n,i)})),e.ac.$watch("input",(function(){x(n,i)}))),function(e,t,s){e instanceof angular.element||(e=angular.element(e)),t instanceof angular.element||(t=angular.element(t));var n=s.ac.search=function(e,n,r){e=(e||t.val()).trim(),n=(n||"").trim(),s.ac.history&&s.ac.history.store(e);var i=p.action.split("?"),o=encodeURIComponent(e);i[1]=a.context.search+"="+o,"integrated"==s.ac.options.spellCorrection.mode?i[1]+="&fallbackQuery="+s.ac.correctedQuery:(n&&n!=e&&(i[1]+="&oq="+n),r&&(i[1]+="&queryAssumption="+r)),s.ac.query&&s.ac.query.corrected&&"integrated"!=s.ac.options.spellCorrection.mode&&(i[1]+="&fallbackQuery="+s.ac.query.corrected),!1!==a.fire("autocompleteSubmit",t.val())&&(window.location.href=i.join("?"))};p.action&&!p.slave?t.bind("keydown",(function(e){var a,r,i;if(r=a=t.val(),13==e.keyCode)return e.preventDefault(),a&&a===s.ac.suggestQuery&&"integrated"!=s.ac.options.spellCorrection.mode&&s.ac.correctedQuery&&a!=s.ac.correctedQuery&&(r=s.ac.correctedQuery,i=s.ac.correctionType),n(r,a,i),!1})):p.action||e.bind("submit",(function(n){!1!==function(){var n=t.val();function r(t,s){var a=window.document.createElement("input");a.type="hidden",a.name=t,a.value=s,e.append(a)}return n&&n===s.ac.suggestQuery&&s.ac.correctedQuery&&n!=s.ac.correctedQuery&&("integrated"==s.ac.options.spellCorrection.mode?r("fallbackQuery",s.ac.correctedQuery):(r("oq",n.trim()),t.val(s.ac.correctedQuery.trim()),s.ac.correctionType&&r("queryAssumption",s.ac.correctionType))),s.ac.query&&s.ac.query.corrected&&"integrated"!=s.ac.options.spellCorrection.mode&&r("fallbackQuery",s.ac.query.corrected),a.fire("autocompleteSubmit",t.val())}()?s.ac.history&&s.ac.history.store(t.val()):n.preventDefault()}))}(r,n,e),function(e,t){e instanceof angular.element||(e=angular.element(e)),e.on("focus",(function(){t.ac.ready=!0,k(t.ac),t.ac.history&&C(t.ac),t.ac.elements.currentInput!=e&&(t.ac.elements.currentInput=e,q(t.ac)),t.ac.input||e.val()||!p.trendingSearches||a.fire("autocomplete/trendingQueryResult"),t.ac.$evalAsync()})),e.bind("keydown",(function(e){t.ac.ready=!0,9==e.keyCode&&t.ac.visible&&e.preventDefault(),13!=e.keyCode&&27!=e.keyCode&&9!=e.keyCode||(t.ac.visible=!1),t.ac.$evalAsync()}))}(n,e),window.document.activeElement===t&&(t.dispatchEvent(new window.Event("focus")),t.value&&(e.ac.input=t.value))}))})),angular.element(window.document.body).on("click",(function(){e.ac.visible=!1,e.ac.$evalAsync()}))):window.setTimeout(S.bind(null,e,t),100)}function k(e){if((e.visible||!e.loading)&&(e.visible=!1,e.input||e.history&&e.history.terms.length?"suggestion"==p.queryMode?e.results&&e.results.length>0&&(e.terms&&e.terms.length?(g=angular.copy(e.terms),e.visible=!0):e.loading&&(e.terms=angular.copy(g),e.visible=!0)):(e.results&&(e.visible=!0),e.terms&&e.terms.length?(g=angular.copy(e.terms),e.visible=!0):e.loading&&(e.terms=angular.copy(g),e.visible=!0)):(void 0===e.input||""===e.input)&&e.terms&&e.terms.length&&(e.visible=!0),"function"==typeof e.visibilityOverride)){var t=e.visibilityOverride.call(e);"boolean"==typeof t&&(e.visible=t)}}function q(e){e.elements&&(angular.forEach(e.elements.inputs,(function(e){e.removeClass("ss-ac-visible")})),e.visible&&e.elements.currentInput&&e.elements.currentInput.addClass("ss-ac-visible"))}function C(e){if(!e.visible&&e.history){var t=new v;e.update(t)}}window.terms=h,a.on("_templates/afterApply",(function(){if(!window.document.querySelector('script[type="text/ss-template"][target="[ss-autocomplete]"]')){var e=s(5);angular.element(window.document.body).append(e)}return a.on.UNBIND})),a.on("_afterAutocompleteSearch",(function(e){if(e.results)for(var t=0;t/g,""):c||void 0:p.spell.searchAssumptions.corrections&&(t.correctedQuery=c||void 0),n.terms=h.generate(n.terms,s),n.terms.length){var u=n.terms[0]?w(n.terms[0]):c;i=t.q=u,r.remove(a.context.search),r.add(a.context.search,u),t.location=r,m(r).then((function(e){e.terms=n.terms,o.resolve(e)}))}else a.fire("autocompleteZeroTerms",c),t.results=[],o.reject()}})).catch((function(){o.reject()})))):(t.results=[],t.terms=[],o.reject());return o.then((function(e){var s;for(s in e=angular.copy(e),l)delete t[s];for(s in e)t[s]=e[s];t.terms=e.terms,t.q=i,e.query&&e.query.corrected&&e.query.original&&(t.q=e.query.corrected),l=e,t.location.get("filter").length&&(t.facets=t._prevFacets&&angular.copy(t._prevFacets)||t.facets),t.trendingSearchesCall?t.trendingSearchesCall=!1:a.fire("afterSearch",t),a.fire("_afterAutocompleteSearch",t),t._prevFacets=angular.copy(t.facets),t.history&&!t.results.length&&t.history.remove(t.q)&&C(t)})).finally((function(){t.loading=!1,k(t),t.$evalAsync()})).catch((function(){})),o},t.onCommitQuery=function(){return t.activeUrl=window.location.href,t.location=new v,t.update()},a.on("autocomplete/trendingQueryResult",(function(){t.loading=!1,t.trendingSearchesCall=!0,t.trendingVerbiage&&(t.trendingVerbiageVisible=!0),t.onCommitQuery()}));var l={};e.$watch("ac.input",(function(e){delete t.correctedQuery,t.lastRequest&&t.lastRequest.reject&&t.lastRequest.reject(),window.clearTimeout(s),null!=e&&(t.loading=!0,s=window.setTimeout((function(){t.trendingVerbiageVisible=!1,""===e&&p.trendingSearches?a.fire("autocomplete/trendingQueryResult"):t.onCommitQuery()}),200))})),S(e),t.attach=S,e.$watch("ac.visible",(function(){q(e.ac)}))}))},function(e,t,s){"use strict";e.exports=function(e,t){var s,a,n,r="";if("object"==typeof e&&"FORM"==e.nodeName)for(s=e.elements.length-1;s>=0;s--)if(n=e.elements[s],("function"!=typeof t||t(n))&&n.name&&"file"!=n.type&&"reset"!=n.type)if("select-multiple"==n.type)for(a=e.elements[s].options.length-1;a>=0;a--)n.options[a].selected&&(r+="&"+n.name+"="+encodeURIComponent(n.options[a].value).replace(/%20/g,"+"));else"submit"!=n.type&&"button"!=n.type&&("checkbox"!=n.type&&"radio"!=n.type||n.checked)&&(r+="&"+n.name+"="+encodeURIComponent(n.value).replace(/%20/g,"+"));return r.substr(1)}},function(e,t,s){"use strict";var a=function(){var e=[];try{e=JSON.parse(window.localStorage["ss-ac-history"])}catch(e){}this.store=function(t){if(t){var s=e.indexOf(t);-1!=s&&e.splice(s,1),(e=[].concat(t,e)).length>5&&e.pop(),window.localStorage.setItem("ss-ac-history",JSON.stringify(e))}},this.remove=function(t){var s=e.indexOf(t);return-1!=s&&(e.splice(s,1),window.localStorage.setItem("ss-ac-history",JSON.stringify(e))),!0},this.terms=e,this.clear=function(){e=[],window.localStorage.removeItem("ss-ac-history")}};e.exports=function(){if(window.navigator.cookieEnabled&&"undefined"!=typeof Storage&&window.localStorage)return new a}()},function(e,t,s){"use strict";var a="ss-ac-trending-cache",n=function(){var e={};try{e=JSON.parse(window.localStorage[a])}catch(e){}this.store=function(t,s){s.terms&&s.terms.length&&(e[t]={ts:Date.now(),data:s},window.localStorage.setItem(a,JSON.stringify(e)))},this.items=e,this.retrieve=function(e){var s=this.items[e];return!(!s||t(s))&&s.data},this.clear=function(){window.localStorage.removeItem(a)};var t=function(e){return e.ts+18e5=3)throw"TermSuggestionAugmentator redundant ready call";return i=3,this}.bind(this),this.generate=function(o){if(i<3)throw"TermSuggestionAugmentator attempted generate before ready";var c=a(arguments).slice(1);if(t instanceof Function&&(c=t(c)),e&&!n(c,e))throw"TermSuggestionAugmentator invalid argument format";for(var l=o.slice(),u=0,p=s.length;u=3)throw"TermSuggestionAugmentator attempted modifier after ready";return s.push({type:e,fn:t}),this}}.bind(this))}},function(e,t){e.exports='