(self.webpackChunkspeice_io=self.webpackChunkspeice_io||[]).push([["4294"],{71639:function(e,t,n){"use strict";e.exports=n(29281)},47114:function(e,t,n){"use strict";var i=n(85670),r={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},dropdown:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},suggestions:{display:"block"},suggestion:{whiteSpace:"nowrap",cursor:"pointer"},suggestionChild:{whiteSpace:"normal"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:"0"},defaultClasses:{root:"algolia-autocomplete",prefix:"aa",noPrefix:!1,dropdownMenu:"dropdown-menu",input:"input",hint:"hint",suggestions:"suggestions",suggestion:"suggestion",cursor:"cursor",dataset:"dataset",empty:"empty"},appendTo:{wrapper:{position:"absolute",zIndex:"100",display:"none"},input:{},inputWithNoHint:{},dropdown:{display:"block"}}};i.isMsie()&&i.mixin(r.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),i.isMsie()&&7>=i.isMsie()&&i.mixin(r.input,{marginTop:"-1px"}),e.exports=r},13312:function(e,t,n){"use strict";var i="aaDataset",r="aaValue",s="aaDatum",o=n(85670),a=n(33855),u=n(26619),c=n(47114),l=n(6823);function h(e){(e=e||{}).templates=e.templates||{},!e.source&&o.error("missing source"),e.name&&!function(e){return/^[_a-zA-Z0-9-]+$/.test(e)}(e.name)&&o.error("invalid dataset name: "+e.name),this.query=null,this._isEmpty=!0,this.highlight=!!e.highlight,this.name=void 0===e.name||null===e.name?o.getUniqueId():e.name,this.source=e.source,this.displayFn=function(e){return e=e||"value",o.isFunction(e)?e:function(t){return t[e]}}(e.display||e.displayKey),this.debounce=e.debounce,this.cache=!1!==e.cache,this.templates=function(e,t){return{empty:e.empty&&o.templatify(e.empty),header:e.header&&o.templatify(e.header),footer:e.footer&&o.templatify(e.footer),suggestion:e.suggestion||function(e){return"

"+t(e)+"

"}}}(e.templates,this.displayFn),this.css=o.mixin({},c,e.appendTo?c.appendTo:{}),this.cssClasses=e.cssClasses=o.mixin({},c.defaultClasses,e.cssClasses||{}),this.cssClasses.prefix=e.cssClasses.formattedPrefix||o.formatPrefix(this.cssClasses.prefix,this.cssClasses.noPrefix);var t=o.className(this.cssClasses.prefix,this.cssClasses.dataset);this.$el=e.$menu&&e.$menu.find(t+"-"+this.name).length>0?a.element(e.$menu.find(t+"-"+this.name)[0]):a.element(u.dataset.replace("%CLASS%",this.name).replace("%PREFIX%",this.cssClasses.prefix).replace("%DATASET%",this.cssClasses.dataset)),this.$menu=e.$menu,this.clearCachedSuggestions()}h.extractDatasetName=function(e){return a.element(e).data(i)},h.extractValue=function(e){return a.element(e).data(r)},h.extractDatum=function(e){var t=a.element(e).data(s);return"string"==typeof t&&(t=JSON.parse(t)),t},o.mixin(h.prototype,l,{_render:function(e,t){if(!!this.$el){var n,c=this,l=[].slice.call(arguments,2);if(this.$el.empty(),n=t&&t.length,this._isEmpty=!n,!n&&this.templates.empty)this.$el.html((function(){var t=[].slice.call(arguments,0);return t=[{query:e,isEmpty:!0}].concat(t),c.templates.empty.apply(this,t)}).apply(this,l)).prepend(c.templates.header?h.apply(this,l):null).append(c.templates.footer?p.apply(this,l):null);else if(n)this.$el.html((function(){var e,n,l=[].slice.call(arguments,0),h=this,p=u.suggestions.replace("%PREFIX%",this.cssClasses.prefix).replace("%SUGGESTIONS%",this.cssClasses.suggestions);return e=a.element(p).css(this.css.suggestions),n=o.map(t,function(e){var t,n=u.suggestion.replace("%PREFIX%",h.cssClasses.prefix).replace("%SUGGESTION%",h.cssClasses.suggestion);return(t=a.element(n).attr({role:"option",id:["option",Math.floor(1e8*Math.random())].join("-")}).append(c.templates.suggestion.apply(this,[e].concat(l)))).data(i,c.name),t.data(r,c.displayFn(e)||void 0),t.data(s,JSON.stringify(e)),t.children().each(function(){a.element(this).css(h.css.suggestionChild)}),t}),e.append.apply(e,n),e}).apply(this,l)).prepend(c.templates.header?h.apply(this,l):null).append(c.templates.footer?p.apply(this,l):null);else if(t&&!Array.isArray(t))throw TypeError("suggestions must be an array");this.$menu&&this.$menu.addClass(this.cssClasses.prefix+(n?"with":"without")+"-"+this.name).removeClass(this.cssClasses.prefix+(n?"without":"with")+"-"+this.name),this.trigger("rendered",e)}function h(){var t=[].slice.call(arguments,0);return t=[{query:e,isEmpty:!n}].concat(t),c.templates.header.apply(this,t)}function p(){var t=[].slice.call(arguments,0);return t=[{query:e,isEmpty:!n}].concat(t),c.templates.footer.apply(this,t)}},getRoot:function(){return this.$el},update:function(e){function t(t){if(!this.canceled&&e===this.query){var n=[].slice.call(arguments,1);this.cacheSuggestions(e,t,n),this._render.apply(this,[e,t].concat(n))}}if(this.query=e,this.canceled=!1,this.shouldFetchFromCache(e))t.apply(this,[this.cachedSuggestions].concat(this.cachedRenderExtraArgs));else{var n=this,i=function(){!n.canceled&&n.source(e,t.bind(n))};this.debounce?(clearTimeout(this.debounceTimeout),this.debounceTimeout=setTimeout(function(){n.debounceTimeout=null,i()},this.debounce)):i()}},cacheSuggestions:function(e,t,n){this.cachedQuery=e,this.cachedSuggestions=t,this.cachedRenderExtraArgs=n},shouldFetchFromCache:function(e){return this.cache&&this.cachedQuery===e&&this.cachedSuggestions&&this.cachedSuggestions.length},clearCachedSuggestions:function(){delete this.cachedQuery,delete this.cachedSuggestions,delete this.cachedRenderExtraArgs},cancel:function(){this.canceled=!0},clear:function(){this.$el&&(this.cancel(),this.$el.empty(),this.trigger("rendered",""))},isEmpty:function(){return this._isEmpty},destroy:function(){this.clearCachedSuggestions(),this.$el=null}});e.exports=h},35445:function(e,t,n){"use strict";var i=n(85670),r=n(33855),s=n(6823),o=n(13312),a=n(47114);function u(e){var t,n,s,o=this;!(e=e||{}).menu&&i.error("menu is required"),!i.isArray(e.datasets)&&!i.isObject(e.datasets)&&i.error("1 or more datasets required"),!e.datasets&&i.error("datasets is required"),this.isOpen=!1,this.isEmpty=!0,this.minLength=e.minLength||0,this.templates={},this.appendTo=e.appendTo||!1,this.css=i.mixin({},a,e.appendTo?a.appendTo:{}),this.cssClasses=e.cssClasses=i.mixin({},a.defaultClasses,e.cssClasses||{}),this.cssClasses.prefix=e.cssClasses.formattedPrefix||i.formatPrefix(this.cssClasses.prefix,this.cssClasses.noPrefix),t=i.bind(this._onSuggestionClick,this),n=i.bind(this._onSuggestionMouseEnter,this),s=i.bind(this._onSuggestionMouseLeave,this);var c=i.className(this.cssClasses.prefix,this.cssClasses.suggestion);this.$menu=r.element(e.menu).on("mouseenter.aa",c,n).on("mouseleave.aa",c,s).on("click.aa",c,t),this.$container=e.appendTo?e.wrapper:this.$menu,e.templates&&e.templates.header&&(this.templates.header=i.templatify(e.templates.header),this.$menu.prepend(this.templates.header())),e.templates&&e.templates.empty&&(this.templates.empty=i.templatify(e.templates.empty),this.$empty=r.element('
'),this.$menu.append(this.$empty),this.$empty.hide()),this.datasets=i.map(e.datasets,function(t){return function(e,t,n){return new u.Dataset(i.mixin({$menu:e,cssClasses:n},t))}(o.$menu,t,e.cssClasses)}),i.each(this.datasets,function(e){var t=e.getRoot();t&&0===t.parent().length&&o.$menu.append(t),e.onSync("rendered",o._onRendered,o)}),e.templates&&e.templates.footer&&(this.templates.footer=i.templatify(e.templates.footer),this.$menu.append(this.templates.footer()));var l=this;r.element(window).resize(function(){l._redraw()})}i.mixin(u.prototype,s,{_onSuggestionClick:function(e){this.trigger("suggestionClicked",r.element(e.currentTarget))},_onSuggestionMouseEnter:function(e){var t=r.element(e.currentTarget);if(!t.hasClass(i.className(this.cssClasses.prefix,this.cssClasses.cursor,!0))){this._removeCursor();var n=this;setTimeout(function(){n._setCursor(t,!1)},0)}},_onSuggestionMouseLeave:function(e){if(!e.relatedTarget||!(r.element(e.relatedTarget).closest("."+i.className(this.cssClasses.prefix,this.cssClasses.cursor,!0)).length>0))this._removeCursor(),this.trigger("cursorRemoved")},_onRendered:function(e,t){if(this.isEmpty=i.every(this.datasets,function(e){return e.isEmpty()}),this.isEmpty){if(t.length>=this.minLength&&this.trigger("empty"),this.$empty){if(t.length=this.minLength?this._show():this._hide());this.trigger("datasetRendered")},_hide:function(){this.$container.hide()},_show:function(){this.$container.css("display","block"),this._redraw(),this.trigger("shown")},_redraw:function(){this.isOpen&&this.appendTo&&this.trigger("redrawn")},_getSuggestions:function(){return this.$menu.find(i.className(this.cssClasses.prefix,this.cssClasses.suggestion))},_getCursor:function(){return this.$menu.find(i.className(this.cssClasses.prefix,this.cssClasses.cursor)).first()},_setCursor:function(e,t){e.first().addClass(i.className(this.cssClasses.prefix,this.cssClasses.cursor,!0)).attr("aria-selected","true"),this.trigger("cursorMoved",t)},_removeCursor:function(){this._getCursor().removeClass(i.className(this.cssClasses.prefix,this.cssClasses.cursor,!0)).removeAttr("aria-selected")},_moveCursor:function(e){var t,n,i,r;if(!!this.isOpen){if(n=this._getCursor(),t=this._getSuggestions(),this._removeCursor(),-1==(i=((i=t.index(n)+e)+1)%(t.length+1)-1)){this.trigger("cursorRemoved");return}i<-1&&(i=t.length-1);this._setCursor(r=t.eq(i),!0),this._ensureVisible(r)}},_ensureVisible:function(e){var t,n,i,r;n=(t=e.position().top)+e.height()+parseInt(e.css("margin-top"),10)+parseInt(e.css("margin-bottom"),10),i=this.$menu.scrollTop(),r=this.$menu.height()+parseInt(this.$menu.css("padding-top"),10)+parseInt(this.$menu.css("padding-bottom"),10),t<0?this.$menu.scrollTop(i+t):r',dropdown:'',dataset:'
',suggestions:'',suggestion:'
'}},21286:function(e,t,n){"use strict";i={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"};var i,r=n(85670),s=n(33855),o=n(6823);function a(e){var t,n,o,a,u=this;!(e=e||{}).input&&r.error("input is missing"),t=r.bind(this._onBlur,this),n=r.bind(this._onFocus,this),o=r.bind(this._onKeydown,this),a=r.bind(this._onInput,this),this.$hint=s.element(e.hint),this.$input=s.element(e.input).on("blur.aa",t).on("focus.aa",n).on("keydown.aa",o),0===this.$hint.length&&(this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=r.noop),r.isMsie()?this.$input.on("keydown.aa keypress.aa cut.aa paste.aa",function(e){if(!i[e.which||e.keyCode])r.defer(r.bind(u._onInput,u,e))}):this.$input.on("input.aa",a),this.query=this.$input.val(),this.$overflowHelper=function(e){return s.element('').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:e.css("font-family"),fontSize:e.css("font-size"),fontStyle:e.css("font-style"),fontVariant:e.css("font-variant"),fontWeight:e.css("font-weight"),wordSpacing:e.css("word-spacing"),letterSpacing:e.css("letter-spacing"),textIndent:e.css("text-indent"),textRendering:e.css("text-rendering"),textTransform:e.css("text-transform")}).insertAfter(e)}(this.$input)}a.normalizeQuery=function(e){return(e||"").replace(/^\s*/g,"").replace(/\s{2,}/g," ")},r.mixin(a.prototype,o,{_onBlur:function(){this.resetInputValue(),this.$input.removeAttr("aria-activedescendant"),this.trigger("blurred")},_onFocus:function(){this.trigger("focused")},_onKeydown:function(e){var t=i[e.which||e.keyCode];this._managePreventDefault(t,e),t&&this._shouldTrigger(t,e)&&this.trigger(t+"Keyed",e)},_onInput:function(){this._checkInputValue()},_managePreventDefault:function(e,t){var n,i,r;switch(e){case"tab":i=this.getHint(),r=this.getInputValue(),n=i&&i!==r&&!u(t);break;case"up":case"down":n=!u(t);break;default:n=!1}n&&t.preventDefault()},_shouldTrigger:function(e,t){var n;if("tab"===e)n=!u(t);else n=!0;return n},_checkInputValue:function(){var e,t,n;n=!!(t=function(e,t){return a.normalizeQuery(e)===a.normalizeQuery(t)}(e=this.getInputValue(),this.query))&&!!this.query&&this.query.length!==e.length,this.query=e,t?n&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query)},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getQuery:function(){return this.query},setQuery:function(e){this.query=e},getInputValue:function(){return this.$input.val()},setInputValue:function(e,t){void 0===e&&(e=this.query),this.$input.val(e),t?this.clearHint():this._checkInputValue()},expand:function(){this.$input.attr("aria-expanded","true")},collapse:function(){this.$input.attr("aria-expanded","false")},setActiveDescendant:function(e){this.$input.attr("aria-activedescendant",e)},removeActiveDescendant:function(){this.$input.removeAttr("aria-activedescendant")},resetInputValue:function(){this.setInputValue(this.query,!0)},getHint:function(){return this.$hint.val()},setHint:function(e){this.$hint.val(e)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var e,t,n;e=this.getInputValue(),n=e!==(t=this.getHint())&&0===t.indexOf(e),!(""!==e&&n&&!this.hasOverflow())&&this.clearHint()},getLanguageDirection:function(){return(this.$input.css("direction")||"ltr").toLowerCase()},hasOverflow:function(){var e=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=e},isCursorAtEnd:function(){var e,t,n;return(e=this.$input.val().length,t=this.$input[0].selectionStart,r.isNumber(t))?t===e:!document.selection||((n=document.selection.createRange()).moveStart("character",-e),e===n.text.length)},destroy:function(){this.$hint.off(".aa"),this.$input.off(".aa"),this.$hint=this.$input=this.$overflowHelper=null}});function u(e){return e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}e.exports=a},4520:function(e,t,n){"use strict";var i="aaAttrs",r=n(85670),s=n(33855),o=n(47368),a=n(21286),u=n(35445),c=n(26619),l=n(47114);function h(e){if(!(e=e||{}).input&&r.error("missing input"),this.isActivated=!1,this.debug=!!e.debug,this.autoselect=!!e.autoselect,this.autoselectOnBlur=!!e.autoselectOnBlur,this.openOnFocus=!!e.openOnFocus,this.minLength=r.isNumber(e.minLength)?e.minLength:1,this.autoWidth=void 0===e.autoWidth||!!e.autoWidth,this.clearOnSelected=!!e.clearOnSelected,this.tabAutocomplete=void 0===e.tabAutocomplete||!!e.tabAutocomplete,e.hint=!!e.hint,e.hint&&e.appendTo)throw Error("[autocomplete.js] hint and appendTo options can't be used at the same time");this.css=e.css=r.mixin({},l,e.appendTo?l.appendTo:{}),this.cssClasses=e.cssClasses=r.mixin({},l.defaultClasses,e.cssClasses||{}),this.cssClasses.prefix=e.cssClasses.formattedPrefix=r.formatPrefix(this.cssClasses.prefix,this.cssClasses.noPrefix),this.listboxId=e.listboxId=[this.cssClasses.root,"listbox",r.getUniqueId()].join("-");var t,n,a=function(e){t=s.element(e.input),n=s.element(c.wrapper.replace("%ROOT%",e.cssClasses.root)).css(e.css.wrapper),!e.appendTo&&"block"===t.css("display")&&"table"===t.parent().css("display")&&n.css("display","table-cell");var t,n,o,a,u=c.dropdown.replace("%PREFIX%",e.cssClasses.prefix).replace("%DROPDOWN_MENU%",e.cssClasses.dropdownMenu);o=s.element(u).css(e.css.dropdown).attr({role:"listbox",id:e.listboxId}),e.templates&&e.templates.dropdownMenu&&o.html(r.templatify(e.templates.dropdownMenu)()),(a=t.clone().css(e.css.hint).css(function(e){return{backgroundAttachment:e.css("background-attachment"),backgroundClip:e.css("background-clip"),backgroundColor:e.css("background-color"),backgroundImage:e.css("background-image"),backgroundOrigin:e.css("background-origin"),backgroundPosition:e.css("background-position"),backgroundRepeat:e.css("background-repeat"),backgroundSize:e.css("background-size")}}(t))).val("").addClass(r.className(e.cssClasses.prefix,e.cssClasses.hint,!0)).removeAttr("id name placeholder required").prop("readonly",!0).attr({"aria-hidden":"true",autocomplete:"off",spellcheck:"false",tabindex:-1}),a.removeData&&a.removeData(),t.data(i,{"aria-autocomplete":t.attr("aria-autocomplete"),"aria-expanded":t.attr("aria-expanded"),"aria-owns":t.attr("aria-owns"),autocomplete:t.attr("autocomplete"),dir:t.attr("dir"),role:t.attr("role"),spellcheck:t.attr("spellcheck"),style:t.attr("style"),type:t.attr("type")}),t.addClass(r.className(e.cssClasses.prefix,e.cssClasses.input,!0)).attr({autocomplete:"off",spellcheck:!1,role:"combobox","aria-autocomplete":e.datasets&&e.datasets[0]&&e.datasets[0].displayKey?"both":"list","aria-expanded":"false","aria-label":e.ariaLabel,"aria-owns":e.listboxId}).css(e.hint?e.css.input:e.css.inputWithNoHint);try{!t.attr("dir")&&t.attr("dir","auto")}catch(e){}return(n=e.appendTo?n.appendTo(s.element(e.appendTo).eq(0)).eq(0):t.wrap(n).parent()).prepend(e.hint?a:null).append(o),{wrapper:n,input:t,hint:a,menu:o}}(e);this.$node=a.wrapper;var u=this.$input=a.input;t=a.menu,n=a.hint,e.dropdownMenuContainer&&s.element(e.dropdownMenuContainer).css("position","relative").append(t.css("top","0")),u.on("blur.aa",function(e){var n=document.activeElement;r.isMsie()&&(t[0]===n||t[0].contains(n))&&(e.preventDefault(),e.stopImmediatePropagation(),r.defer(function(){u.focus()}))}),t.on("mousedown.aa",function(e){e.preventDefault()}),this.eventBus=e.eventBus||new o({el:u}),this.dropdown=new h.Dropdown({appendTo:e.appendTo,wrapper:this.$node,menu:t,datasets:e.datasets,templates:e.templates,cssClasses:e.cssClasses,minLength:this.minLength}).onSync("suggestionClicked",this._onSuggestionClicked,this).onSync("cursorMoved",this._onCursorMoved,this).onSync("cursorRemoved",this._onCursorRemoved,this).onSync("opened",this._onOpened,this).onSync("closed",this._onClosed,this).onSync("shown",this._onShown,this).onSync("empty",this._onEmpty,this).onSync("redrawn",this._onRedrawn,this).onAsync("datasetRendered",this._onDatasetRendered,this),this.input=new h.Input({input:u,hint:n}).onSync("focused",this._onFocused,this).onSync("blurred",this._onBlurred,this).onSync("enterKeyed",this._onEnterKeyed,this).onSync("tabKeyed",this._onTabKeyed,this).onSync("escKeyed",this._onEscKeyed,this).onSync("upKeyed",this._onUpKeyed,this).onSync("downKeyed",this._onDownKeyed,this).onSync("leftKeyed",this._onLeftKeyed,this).onSync("rightKeyed",this._onRightKeyed,this).onSync("queryChanged",this._onQueryChanged,this).onSync("whitespaceChanged",this._onWhitespaceChanged,this),this._bindKeyboardShortcuts(e),this._setLanguageDirection()}r.mixin(h.prototype,{_bindKeyboardShortcuts:function(e){if(!!e.keyboardShortcuts){var t=this.$input,n=[];r.each(e.keyboardShortcuts,function(e){"string"==typeof e&&(e=e.toUpperCase().charCodeAt(0)),n.push(e)}),s.element(document).keydown(function(e){var i=e.target||e.srcElement,r=i.tagName;if(i.isContentEditable||"INPUT"===r||"SELECT"===r||"TEXTAREA"===r)return;var s=e.which||e.keyCode;if(-1!==n.indexOf(s))t.focus(),e.stopPropagation(),e.preventDefault()})}},_onSuggestionClicked:function(e,t){var n;(n=this.dropdown.getDatumForSuggestion(t))&&this._select(n,{selectionMethod:"click"})},_onCursorMoved:function(e,t){var n=this.dropdown.getDatumForCursor(),i=this.dropdown.getCurrentCursor().attr("id");this.input.setActiveDescendant(i),n&&(t&&this.input.setInputValue(n.value,!0),this.eventBus.trigger("cursorchanged",n.raw,n.datasetName))},_onCursorRemoved:function(){this.input.resetInputValue(),this._updateHint(),this.eventBus.trigger("cursorremoved")},_onDatasetRendered:function(){this._updateHint(),this.eventBus.trigger("updated")},_onOpened:function(){this._updateHint(),this.input.expand(),this.eventBus.trigger("opened")},_onEmpty:function(){this.eventBus.trigger("empty")},_onRedrawn:function(){this.$node.css("top","0px"),this.$node.css("left","0px");var e=this.$input[0].getBoundingClientRect();this.autoWidth&&this.$node.css("width",e.width+"px");var t=this.$node[0].getBoundingClientRect(),n=e.bottom-t.top;this.$node.css("top",n+"px");var i=e.left-t.left;this.$node.css("left",i+"px"),this.eventBus.trigger("redrawn")},_onShown:function(){this.eventBus.trigger("shown"),this.autoselect&&this.dropdown.cursorTopSuggestion()},_onClosed:function(){this.input.clearHint(),this.input.removeActiveDescendant(),this.input.collapse(),this.eventBus.trigger("closed")},_onFocused:function(){if(this.isActivated=!0,this.openOnFocus){var e=this.input.getQuery();e.length>=this.minLength?this.dropdown.update(e):this.dropdown.empty(),this.dropdown.open()}},_onBlurred:function(){e=this.dropdown.getDatumForCursor(),t=this.dropdown.getDatumForTopSuggestion();var e,t,n={selectionMethod:"blur"};!this.debug&&(this.autoselectOnBlur&&e?this._select(e,n):this.autoselectOnBlur&&t?this._select(t,n):(this.isActivated=!1,this.dropdown.empty(),this.dropdown.close()))},_onEnterKeyed:function(e,t){n=this.dropdown.getDatumForCursor(),i=this.dropdown.getDatumForTopSuggestion();var n,i,r={selectionMethod:"enterKey"};n?(this._select(n,r),t.preventDefault()):this.autoselect&&i&&(this._select(i,r),t.preventDefault())},_onTabKeyed:function(e,t){var n;if(!this.tabAutocomplete){this.dropdown.close();return}(n=this.dropdown.getDatumForCursor())?(this._select(n,{selectionMethod:"tabKey"}),t.preventDefault()):this._autocomplete(!0)},_onEscKeyed:function(){this.dropdown.close(),this.input.resetInputValue()},_onUpKeyed:function(){var e=this.input.getQuery();this.dropdown.isEmpty&&e.length>=this.minLength?this.dropdown.update(e):this.dropdown.moveCursorUp(),this.dropdown.open()},_onDownKeyed:function(){var e=this.input.getQuery();this.dropdown.isEmpty&&e.length>=this.minLength?this.dropdown.update(e):this.dropdown.moveCursorDown(),this.dropdown.open()},_onLeftKeyed:function(){"rtl"===this.dir&&this._autocomplete()},_onRightKeyed:function(){"ltr"===this.dir&&this._autocomplete()},_onQueryChanged:function(e,t){this.input.clearHintIfInvalid(),t.length>=this.minLength?this.dropdown.update(t):this.dropdown.empty(),this.dropdown.open(),this._setLanguageDirection()},_onWhitespaceChanged:function(){this._updateHint(),this.dropdown.open()},_setLanguageDirection:function(){var e=this.input.getLanguageDirection();this.dir!==e&&(this.dir=e,this.$node.css("direction",e),this.dropdown.setLanguageDirection(e))},_updateHint:function(){var e,t,n,i;(e=this.dropdown.getDatumForTopSuggestion())&&this.dropdown.isVisible()&&!this.input.hasOverflow()?(t=this.input.getInputValue(),n=a.normalizeQuery(t),(i=RegExp("^(?:"+r.escapeRegExChars(n)+")(.+$)","i").exec(e.value))?this.input.setHint(t+i[1]):this.input.clearHint()):this.input.clearHint()},_autocomplete:function(e){var t,n,i,r;t=this.input.getHint(),n=this.input.getQuery(),i=e||this.input.isCursorAtEnd(),t&&n!==t&&i&&((r=this.dropdown.getDatumForTopSuggestion())&&this.input.setInputValue(r.value),this.eventBus.trigger("autocompleted",r.raw,r.datasetName))},_select:function(e,t){void 0!==e.value&&this.input.setQuery(e.value),this.clearOnSelected?this.setVal(""):this.input.setInputValue(e.value,!0),this._setLanguageDirection(),!1===this.eventBus.trigger("selected",e.raw,e.datasetName,t).isDefaultPrevented()&&(this.dropdown.close(),r.defer(r.bind(this.dropdown.empty,this.dropdown)))},open:function(){if(!this.isActivated){var e=this.input.getInputValue();e.length>=this.minLength?this.dropdown.update(e):this.dropdown.empty()}this.dropdown.open()},close:function(){this.dropdown.close()},setVal:function(e){e=r.toStr(e),this.isActivated?this.input.setInputValue(e):(this.input.setQuery(e),this.input.setInputValue(e,!0)),this._setLanguageDirection()},getVal:function(){return this.input.getQuery()},destroy:function(){this.input.destroy(),this.dropdown.destroy(),function(e,t){var n=e.find(r.className(t.prefix,t.input));r.each(n.data(i),function(e,t){void 0===e?n.removeAttr(t):n.attr(t,e)}),n.detach().removeClass(r.className(t.prefix,t.input,!0)).insertAfter(e),n.removeData&&n.removeData(i),e.remove()}(this.$node,this.cssClasses),this.$node=null},getWrapper:function(){return this.dropdown.$container[0]}});h.Dropdown=u,h.Input=a,h.sources=n(86331),e.exports=h},33855:function(e){"use strict";e.exports={element:null}},22926:function(e){"use strict";e.exports=function(e){var t=e.match(/Algolia for JavaScript \((\d+\.)(\d+\.)(\d+)\)/)||e.match(/Algolia for vanilla JavaScript (\d+\.)(\d+\.)(\d+)/);if(t)return[t[1],t[2],t[3]]}},85670:function(e,t,n){"use strict";var i,r=n(33855);function s(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}e.exports={isArray:null,isFunction:null,isObject:null,bind:null,each:null,map:null,mixin:null,isMsie:function(e){if(void 0===e&&(e=navigator.userAgent),/(msie|trident)/i.test(e)){var t=e.match(/(msie |rv:)(\d+(.\d+)?)/i);if(t)return t[2]}return!1},escapeRegExChars:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isNumber:function(e){return"number"==typeof e},toStr:function(e){return null==e?"":e+""},cloneDeep:function(e){var t=this.mixin({},e),n=this;return this.each(t,function(e,i){e&&(n.isArray(e)?t[i]=[].concat(e):n.isObject(e)&&(t[i]=n.cloneDeep(e)))}),t},error:function(e){throw Error(e)},every:function(e,t){var n=!0;return e?(this.each(e,function(i,r){n&&(n=t.call(null,i,r,e)&&n)}),!!n):n},any:function(e,t){var n=!1;return e?(this.each(e,function(i,r){if(t.call(null,i,r,e))return n=!0,!1}),n):n},getUniqueId:(i=0,function(){return i++}),templatify:function(e){if(this.isFunction(e))return e;var t=r.element(e);return"SCRIPT"===t.prop("tagName")?function(){return t.text()}:function(){return String(e)}},defer:function(e){setTimeout(e,0)},noop:function(){},formatPrefix:function(e,t){return t?"":e+"-"},className:function(e,t,n){return(n?"":".")+e+t},escapeHighlightedString:function(e,t,n){t=t||"";var i=document.createElement("div");i.appendChild(document.createTextNode(t)),n=n||"";var r=document.createElement("div");r.appendChild(document.createTextNode(n));var o=document.createElement("div");return o.appendChild(document.createTextNode(e)),o.innerHTML.replace(RegExp(s(i.innerHTML),"g"),t).replace(RegExp(s(r.innerHTML),"g"),n)}}},42683:function(e,t,n){"use strict";var i=n(85670),r=n(93489),s=n(22926);e.exports=function(e,t){var n=s(e.as._ua);return n&&n[0]>=3&&n[1]>20&&((t=t||{}).additionalUA="autocomplete.js "+r),function(n,r){e.search(n,t,function(e,t){if(e){i.error(e.message);return}r(t.hits,t)})}}},86331:function(e,t,n){"use strict";e.exports={hits:n(42683),popularIn:n(82226)}},82226:function(e,t,n){"use strict";var i=n(85670),r=n(93489),s=n(22926);e.exports=function(e,t,n,o){var a=s(e.as._ua);if(a&&a[0]>=3&&a[1]>20&&((t=t||{}).additionalUA="autocomplete.js "+r),!n.source)return i.error("Missing 'source' key");var u=i.isFunction(n.source)?n.source:function(e){return e[n.source]};if(!n.index)return i.error("Missing 'index' key");var c=n.index;return o=o||{},function(a,l){e.search(a,t,function(e,a){if(e){i.error(e.message);return}if(a.hits.length>0){var h=a.hits[0],p=i.mixin({hitsPerPage:0},n);delete p.source,delete p.index;var d=s(c.as._ua);d&&d[0]>=3&&d[1]>20&&(t.additionalUA="autocomplete.js "+r),c.search(u(h),p,function(e,t){if(e){i.error(e.message);return}var n=[];if(o.includeAll){var r=o.allTitle||"All departments";n.push(i.mixin({facet:{value:r,count:t.nbHits}},i.cloneDeep(h)))}i.each(t.facets,function(e,t){i.each(e,function(e,r){n.push(i.mixin({facet:{facet:t,value:r,count:e}},i.cloneDeep(h)))})});for(var s=1;s]*>/,m=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,y=/^(?:body|html)$/i,x=/([A-Z])/g,b=["val","css","html","text","data","width","height","offset"],w=h.createElement("table"),S=h.createElement("tr"),C={tr:h.createElement("tbody"),tbody:w,thead:w,tfoot:w,td:S,th:S,"*":h.createElement("div")},E=/complete|loaded|interactive/,_=/^[\w-]*$/,k={},T=k.toString,O={},L=h.createElement("div"),A={tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},$=Array.isArray||function(e){return e instanceof Array};function P(e){return null==e?String(e):k[T.call(e)]||"object"}function I(e){return"function"==P(e)}function Q(e){return null!=e&&e==e.window}function R(e){return null!=e&&e.nodeType==e.DOCUMENT_NODE}function N(e){return"object"==P(e)}function D(e){return N(e)&&!Q(e)&&Object.getPrototypeOf(e)==Object.prototype}function F(e){var t=!!e&&"length"in e&&e.length,n=i.type(e);return"function"!=n&&!Q(e)&&("array"==n||0===t||"number"==typeof t&&t>0&&t-1 in e)}O.matches=function(e,t){if(!t||!e||1!==e.nodeType)return!1;var n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.matchesSelector;if(n)return n.call(e,t);var i,r=e.parentNode,s=!r;return s&&(r=L).appendChild(e),i=~O.qsa(r,t).indexOf(e),s&&L.removeChild(e),i};function j(e){return e.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function H(e){return e in d?d[e]:d[e]=RegExp("(^|\\s)"+e+"(\\s|$)")}function V(e,t){return"number"!=typeof t||f[j(e)]?t:t+"px"}s=function(e){return e.replace(/-+(.)?/g,function(e,t){return t?t.toUpperCase():""})},o=function(e){return c.call(e,function(t,n){return e.indexOf(t)==n})};function B(e){return"children"in e?l.call(e.children):i.map(e.childNodes,function(e){if(1==e.nodeType)return e})}function M(e,t){var n,i=e?e.length:0;for(n=0;n")),t===n&&(n=g.test(e)&&RegExp.$1),!(n in C)&&(n="*"),(a=C[n]).innerHTML=""+e,s=i.each(l.call(a.childNodes),function(){a.removeChild(this)})),D(r)&&(o=i(s),i.each(r,function(e,t){b.indexOf(e)>-1?o[e](t):o.attr(e,t)})),s},O.Z=function(e,t){return new M(e,t)},O.isZ=function(e){return e instanceof O.Z},O.init=function(e,n){var r,s;if(!e)return O.Z();if("string"==typeof e){if("<"==(e=e.trim())[0]&&g.test(e))r=O.fragment(e,RegExp.$1,n),e=null;else{if(t!==n)return i(n).find(e);r=O.qsa(h,e)}}else{if(I(e))return i(h).ready(e);if(O.isZ(e))return e;if($(e)){;s=e,r=c.call(s,function(e){return null!=e})}else if(N(e))r=[e],e=null;else if(g.test(e))r=O.fragment(e.trim(),RegExp.$1,n),e=null;else{if(t!==n)return i(n).find(e);r=O.qsa(h,e)}}return O.Z(r,e)},i=function(e,t){return O.init(e,t)};function q(e,t){return null==t?i(e):i(e).filter(t)}function z(e,t,n,i){return I(t)?t.call(e,n,i):t}function K(e,t,n){null==n?e.removeAttribute(t):e.setAttribute(t,n)}function W(e,n){var i=e.className||"",r=i&&i.baseVal!==t;if(t===n)return r?i.baseVal:i;r?i.baseVal=n:e.className=n}function U(e){try{return e?"true"==e||"false"!=e&&("null"==e?null:+e+""==e?+e:/^[\[\{]/.test(e)?i.parseJSON(e):e):e}catch(t){return e}}return i.extend=function(e){var i,r=l.call(arguments,1);return"boolean"==typeof e&&(i=e,e=r.shift()),r.forEach(function(r){!function e(i,r,s){for(n in r)s&&(D(r[n])||$(r[n]))?(D(r[n])&&!D(i[n])&&(i[n]={}),$(r[n])&&!$(i[n])&&(i[n]=[]),e(i[n],r[n],s)):r[n]!==t&&(i[n]=r[n])}(e,r,i)}),e},O.qsa=function(e,t){var n,i="#"==t[0],r=!i&&"."==t[0],s=i||r?t.slice(1):t,o=_.test(s);return e.getElementById&&o&&i?(n=e.getElementById(s))?[n]:[]:1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType?[]:l.call(o&&!i&&e.getElementsByClassName?r?e.getElementsByClassName(s):e.getElementsByTagName(t):e.querySelectorAll(t))},i.contains=h.documentElement.contains?function(e,t){return e!==t&&e.contains(t)}:function(e,t){for(;t&&(t=t.parentNode);)if(t===e)return!0;return!1},i.type=P,i.isFunction=I,i.isWindow=Q,i.isArray=$,i.isPlainObject=D,i.isEmptyObject=function(e){var t;for(t in e)return!1;return!0},i.isNumeric=function(e){var t=Number(e),n=typeof e;return null!=e&&"boolean"!=n&&("string"!=n||e.length)&&!isNaN(t)&&isFinite(t)||!1},i.inArray=function(e,t,n){return a.indexOf.call(t,e,n)},i.camelCase=s,i.trim=function(e){return null==e?"":String.prototype.trim.call(e)},i.uuid=0,i.support={},i.expr={},i.noop=function(){},i.map=function(e,t){var n,r,s,o,a=[];if(F(e))for(s=0;s0?i.fn.concat.apply([],n):n},i.each=function(e,t){var n,i;if(F(e))for(n=0;n=0?e:e+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(e){return a.every.call(this,function(t,n){return!1!==e.call(t,n,t)}),this},filter:function(e){return I(e)?this.not(this.not(e)):i(c.call(this,function(t){return O.matches(t,e)}))},add:function(e,t){return i(o(this.concat(i(e,t))))},is:function(e){return this.length>0&&O.matches(this[0],e)},not:function(e){var n=[];if(I(e)&&e.call!==t)this.each(function(t){!e.call(this,t)&&n.push(this)});else{var r="string"==typeof e?this.filter(e):F(e)&&I(e.item)?l.call(e):i(e);this.forEach(function(e){0>r.indexOf(e)&&n.push(e)})}return i(n)},has:function(e){return this.filter(function(){return N(e)?i.contains(this,e):i(this).find(e).size()})},eq:function(e){return -1===e?this.slice(e):this.slice(e,+e+1)},first:function(){var e=this[0];return e&&!N(e)?e:i(e)},last:function(){var e=this[this.length-1];return e&&!N(e)?e:i(e)},find:function(e){var t,n=this;return t=e?"object"==typeof e?i(e).filter(function(){var e=this;return a.some.call(n,function(t){return i.contains(t,e)})}):1==this.length?i(O.qsa(this[0],e)):this.map(function(){return O.qsa(this,e)}):i()},closest:function(e,t){var n=[],r="object"==typeof e&&i(e);return this.each(function(i,s){for(;s&&!(r?r.indexOf(s)>=0:O.matches(s,e));)s=s!==t&&!R(s)&&s.parentNode;s&&0>n.indexOf(s)&&n.push(s)}),i(n)},parents:function(e){for(var t=[],n=this;n.length>0;)n=i.map(n,function(e){if((e=e.parentNode)&&!R(e)&&0>t.indexOf(e))return t.push(e),e});return q(t,e)},parent:function(e){return q(o(this.pluck("parentNode")),e)},children:function(e){return q(this.map(function(){return B(this)}),e)},contents:function(){return this.map(function(){return this.contentDocument||l.call(this.childNodes)})},siblings:function(e){return q(this.map(function(e,t){return c.call(B(t.parentNode),function(e){return e!==t})}),e)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(e){return i.map(this,function(t){return t[e]})},show:function(){return this.each(function(){if("none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")){var e,t,n;this.style.display=(!p[e=this.nodeName]&&(t=h.createElement(e),h.body.appendChild(t),n=getComputedStyle(t,"").getPropertyValue("display"),t.parentNode.removeChild(t),"none"==n&&(n="block"),p[e]=n),p[e])}})},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){var t=I(e);if(this[0]&&!t)var n=i(e).get(0),r=n.parentNode||this.length>1;return this.each(function(s){i(this).wrapAll(t?e.call(this,s):r?n.cloneNode(!0):n)})},wrapAll:function(e){if(this[0]){var t;for(i(this[0]).before(e=i(e));(t=e.children()).length;)e=t.first();i(e).append(this)}return this},wrapInner:function(e){var t=I(e);return this.each(function(n){var r=i(this),s=r.contents(),o=t?e.call(this,n):e;s.length?s.wrapAll(o):r.append(o)})},unwrap:function(){return this.parent().each(function(){i(this).replaceWith(i(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(e){return this.each(function(){var n=i(this);(t===e?"none"==n.css("display"):e)?n.show():n.hide()})},prev:function(e){return i(this.pluck("previousElementSibling")).filter(e||"*")},next:function(e){return i(this.pluck("nextElementSibling")).filter(e||"*")},html:function(e){return 0 in arguments?this.each(function(t){var n=this.innerHTML;i(this).empty().append(z(this,e,t,n))}):0 in this?this[0].innerHTML:null},text:function(e){return 0 in arguments?this.each(function(t){var n=z(this,e,t,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this.pluck("textContent").join(""):null},attr:function(e,i){var r;return"string"!=typeof e||1 in arguments?this.each(function(t){if(1===this.nodeType){if(N(e))for(n in e)K(this,n,e[n]);else K(this,e,z(this,i,t,this.getAttribute(e)))}}):0 in this&&1==this[0].nodeType&&null!=(r=this[0].getAttribute(e))?r:t},removeAttr:function(e){return this.each(function(){1===this.nodeType&&e.split(" ").forEach(function(e){K(this,e)},this)})},prop:function(e,t){return e=A[e]||e,1 in arguments?this.each(function(n){this[e]=z(this,t,n,this[e])}):this[0]&&this[0][e]},removeProp:function(e){return e=A[e]||e,this.each(function(){delete this[e]})},data:function(e,n){var i="data-"+e.replace(x,"-$1").toLowerCase(),r=1 in arguments?this.attr(i,n):this.attr(i);return null!==r?U(r):t},val:function(e){return 0 in arguments?(null==e&&(e=""),this.each(function(t){this.value=z(this,e,t,this.value)})):this[0]&&(this[0].multiple?i(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(t){if(t)return this.each(function(e){var n=i(this),r=z(this,t,e,n.offset()),s=n.offsetParent().offset(),o={top:r.top-s.top,left:r.left-s.left};"static"==n.css("position")&&(o.position="relative"),n.css(o)});if(!this.length)return null;if(h.documentElement!==this[0]&&!i.contains(h.documentElement,this[0]))return{top:0,left:0};var n=this[0].getBoundingClientRect();return{left:n.left+e.pageXOffset,top:n.top+e.pageYOffset,width:Math.round(n.width),height:Math.round(n.height)}},css:function(e,t){if(arguments.length<2){var r=this[0];if("string"==typeof e){if(!r)return;return r.style[s(e)]||getComputedStyle(r,"").getPropertyValue(e)}if($(e)){if(!r)return;var o={},a=getComputedStyle(r,"");return i.each(e,function(e,t){o[t]=r.style[s(t)]||a.getPropertyValue(t)}),o}}var u="";if("string"==P(e))t||0===t?u=j(e)+":"+V(e,t):this.each(function(){this.style.removeProperty(j(e))});else for(n in e)e[n]||0===e[n]?u+=j(n)+":"+V(n,e[n])+";":this.each(function(){this.style.removeProperty(j(n))});return this.each(function(){this.style.cssText+=";"+u})},index:function(e){return e?this.indexOf(i(e)[0]):this.parent().children().indexOf(this[0])},hasClass:function(e){return!!e&&a.some.call(this,function(e){return this.test(W(e))},H(e))},addClass:function(e){return e?this.each(function(t){if("className"in this){r=[];var n=W(this);z(this,e,t,n).split(/\s+/g).forEach(function(e){!i(this).hasClass(e)&&r.push(e)},this),r.length&&W(this,n+(n?" ":"")+r.join(" "))}}):this},removeClass:function(e){return this.each(function(n){if("className"in this){if(t===e)return W(this,"");z(this,e,n,r=W(this)).split(/\s+/g).forEach(function(e){r=r.replace(H(e)," ")}),W(this,r.trim())}})},toggleClass:function(e,n){return e?this.each(function(r){var s=i(this);z(this,e,r,W(this)).split(/\s+/g).forEach(function(e){(t===n?!s.hasClass(e):n)?s.addClass(e):s.removeClass(e)})}):this},scrollTop:function(e){if(this.length){var n="scrollTop"in this[0];return t===e?n?this[0].scrollTop:this[0].pageYOffset:this.each(n?function(){this.scrollTop=e}:function(){this.scrollTo(this.scrollX,e)})}},scrollLeft:function(e){if(this.length){var n="scrollLeft"in this[0];return t===e?n?this[0].scrollLeft:this[0].pageXOffset:this.each(n?function(){this.scrollLeft=e}:function(){this.scrollTo(e,this.scrollY)})}},position:function(){if(this.length){var e=this[0],t=this.offsetParent(),n=this.offset(),r=y.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(i(e).css("margin-top"))||0,n.left-=parseFloat(i(e).css("margin-left"))||0,r.top+=parseFloat(i(t[0]).css("border-top-width"))||0,r.left+=parseFloat(i(t[0]).css("border-left-width"))||0,{top:n.top-r.top,left:n.left-r.left}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||h.body;e&&!y.test(e.nodeName)&&"static"==i(e).css("position");)e=e.offsetParent;return e})}},i.fn.detach=i.fn.remove,["width","height"].forEach(function(e){var n=e.replace(/./,function(e){return e[0].toUpperCase()});i.fn[e]=function(r){var s,o=this[0];return t===r?Q(o)?o["inner"+n]:R(o)?o.documentElement["scroll"+n]:(s=this.offset())&&s[e]:this.each(function(t){(o=i(this)).css(e,z(this,r,t,o[e]()))})}}),["after","prepend","before","append"].forEach(function(n,r){var s=r%2;i.fn[n]=function(){var n,o,a=i.map(arguments,function(e){var r=[];return"array"==(n=P(e))?(e.forEach(function(e){return e.nodeType!==t?r.push(e):i.zepto.isZ(e)?r=r.concat(e.get()):void(r=r.concat(O.fragment(e)))}),r):"object"==n||null==e?e:O.fragment(e)}),u=this.length>1;return a.length<1?this:this.each(function(t,n){o=s?n:n.parentNode,n=0==r?n.nextSibling:1==r?n.firstChild:2==r?n:null;var c=i.contains(h.documentElement,o);a.forEach(function(t){if(u)t=t.cloneNode(!0);else if(!o)return i(t).remove();o.insertBefore(t,n),c&&!function e(t,n){n(t);for(var i=0,r=t.childNodes.length;i":7,"=":8,_v:9,"{":10,"&":11,_t:12},e.scan=function(n,i){var r=n.length,s=0,o=null,a=null,l="",h=[],p=!1,d=0,f=0,g="{{",m="}}";function v(){l.length>0&&(h.push({tag:"_t",text:new String(l)}),l="")}function y(n,i){if(v(),n&&function(){for(var n=!0,i=f;i"==r.tag&&(r.indent=h[s].text.toString()),h.splice(s,1));else!i&&h.push({tag:"\n"});p=!1,f=h.length}for(i&&(g=(i=i.split(" "))[0],m=i[1]),d=0;d":f,"<":function(t,n){var i={partials:{},code:"",subs:{},inPartial:!0};e.walk(t.nodes,i);var r=n.partials[f(t,n)];r.subs=i.subs,r.partials=i.partials},$:function(t,n){var i={subs:{},code:"",partials:n.partials,prefix:t.n};e.walk(t.nodes,i),n.subs[t.n]=i.code,!n.inPartial&&(n.code+='t.sub("'+p(t.n)+'",c,p,i);')},"\n":function(e,t){t.code+=m('"\\n"'+(e.last?"":" + i"))},_v:function(e,t){t.code+="t.b(t.v(t."+d(e.n)+'("'+p(e.n)+'",c,p,0)));'},_t:function(e,t){t.code+=m('"'+p(e.text)+'"')},"{":g,"&":g},e.walk=function(t,n){for(var i,r=0,s=t.length;r0;){if(c=n.shift(),u&&"<"==u.tag&&!(c.tag in l))throw Error("Illegal content in < super tag.");if(e.tags[c.tag]<=e.tags.$||function(e,t){for(var n=0,i=t.length;n0)throw Error("missing closing tag: "+r.pop().n);return o}(t,"",[],(i=i||{}).sectionTags||[])},e.cache={},e.cacheKey=function(e,t){return[e,!!t.asString,!!t.disableLambda,t.delimiters,!!t.modelGet].join("||")},e.compile=function(t,n){n=n||{};var i=e.cacheKey(t,n),r=this.cache[i];if(r){var s=r.partials;for(var o in s)delete s[o].instance;return r}return r=this.generate(this.parse(this.scan(t,n.delimiters),t,n),t,n),this.cache[i]=r}}(t)},5485:function(e,t,n){var i=n(49397);i.Template=n(22882).Template,i.template=i.Template,e.exports=i},22882:function(e,t){!function(e){function t(e,t,n){var i;return t&&"object"==typeof t&&(void 0!==t[e]?i=t[e]:n&&t.get&&"function"==typeof t.get&&(i=t.get(e))),i}e.Template=function(e,t,n,i){e=e||{},this.r=e.code||this.r,this.c=n,this.options=i||{},this.text=t||"",this.partials=e.partials||{},this.subs=e.subs||{},this.buf=""},e.Template.prototype={r:function(e,t,n){return""},v:function(e){return e=u(e),a.test(e)?e.replace(n,"&").replace(i,"<").replace(r,">").replace(s,"'").replace(o,"""):e},t:u,render:function(e,t,n){return this.ri([e],t||{},n)},ri:function(e,t,n){return this.r(e,t,n)},ep:function(e,t){var n=this.partials[e],i=t[n.name];if(n.instance&&n.base==i)return n.instance;if("string"==typeof i){if(!this.c)throw Error("No compiler available.");i=this.c.compile(i,this.options)}if(!i)return null;if(this.partials[e].base=i,n.subs){for(key in!t.stackText&&(t.stackText={}),n.subs)!t.stackText[key]&&(t.stackText[key]=void 0!==this.activeSub&&t.stackText[this.activeSub]?t.stackText[this.activeSub]:this.text);i=function(e,t,n,i,r,s){function o(){}function a(){}o.prototype=e,a.prototype=e.subs;var u,c=new o;for(u in c.subs=new a,c.subsText={},c.buf="",i=i||{},c.stackSubs=i,c.subsText=s,t)!i[u]&&(i[u]=t[u]);for(u in i)c.subs[u]=i[u];for(u in r=r||{},c.stackPartials=r,n)!r[u]&&(r[u]=n[u]);for(u in r)c.partials[u]=r[u];return c}(i,n.subs,n.partials,this.stackSubs,this.stackPartials,t.stackText)}return this.partials[e].instance=i,i},rp:function(e,t,n,i){var r=this.ep(e,n);return r?r.ri(t,n,i):""},rs:function(e,t,n){var i=e[e.length-1];if(!c(i)){n(e,t,this);return}for(var r=0;r=0;c--)if(void 0!==(s=t(e,o=n[c],u))){a=!0;break}return a?(!r&&"function"==typeof s&&(s=this.mv(s,n,i)),s):!r&&""},ls:function(e,t,n,i,r){var s=this.options.delimiters;return this.options.delimiters=r,this.b(this.ct(u(e.call(t,i)),t,n)),this.options.delimiters=s,!1},ct:function(e,t,n){if(this.options.disableLambda)throw Error("Lambda features disabled.");return this.c.compile(e,this.options).render(t,n)},b:function(e){this.buf+=e},fl:function(){var e=this.buf;return this.buf="",e},ms:function(e,t,n,i,r,s,o){var a,u=t[t.length-1],c=e.call(u);if("function"==typeof c)return!!i||(a=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(c,u,n,a.substring(r,s),o));return c},mv:function(e,t,n){var i=t[t.length-1],r=e.call(i);return"function"==typeof r?this.ct(u(r.call(i)),i,n):r},sub:function(e,t,n,i){var r=this.subs[e];r&&(this.activeSub=e,r(t,n,this,i),this.activeSub=!1)}};var n=/&/g,i=//g,s=/\'/g,o=/\"/g,a=/[&<>\"\']/;function u(e){return String(null==e?"":e)}var c=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}}(t)},70624:function(e,t,n){"use strict";var i,r,s,o=[n(47936),n(64785),n(28291),n(2709),n(42506),n(79176)],a=-1,u=[],c=!1;function l(){if(!!i&&!!r)i=!1,r.length?u=r.concat(u):a=-1,u.length&&h()}function h(){if(!i){c=!1,i=!0;for(var e=u.length,t=setTimeout(l);e;){for(r=u,u=[];r&&++a1)for(var n=1;n0){var c=A.utils.clone(t)||{};c.position=[o,u],c.index=r.length,r.push(new A.Token(n.slice(o,s),c))}o=s+1}}return r},A.tokenizer.separator=/[\s\-]+/,A.Pipeline=function(){this._stack=[]},A.Pipeline.registeredFunctions=Object.create(null),A.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&A.utils.warn("Overwriting existing registered function: "+t),e.label=t,A.Pipeline.registeredFunctions[e.label]=e},A.Pipeline.warnIfFunctionNotRegistered=function(e){!(e.label&&e.label in this.registeredFunctions)&&A.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},A.Pipeline.load=function(e){var t=new A.Pipeline;return e.forEach(function(e){var n=A.Pipeline.registeredFunctions[e];if(n)t.add(n);else throw Error("Cannot load unregistered function: "+e)}),t},A.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){A.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)},this)},A.Pipeline.prototype.after=function(e,t){A.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(-1==n)throw Error("Cannot find existingFn");n+=1,this._stack.splice(n,0,t)},A.Pipeline.prototype.before=function(e,t){A.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(-1==n)throw Error("Cannot find existingFn");this._stack.splice(n,0,t)},A.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);if(-1!=t)this._stack.splice(t,1)},A.Pipeline.prototype.run=function(e){for(var t=this._stack.length,n=0;n1&&(se&&(n=r),s!=e);){;i=n-t,r=t+Math.floor(i/2),s=this.elements[2*r]}return s==e||s>e?2*r:sa?c+=2:o==a&&(t+=n[u+1]*i[c+1],u+=2,c+=2);return t},A.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},A.Vector.prototype.toArray=function(){for(var e=Array(this.elements.length/2),t=1,n=0;t0){var s,o=r.str.charAt(0);o in r.node.edges?s=r.node.edges[o]:(s=new A.TokenSet,r.node.edges[o]=s),1==r.str.length&&(s.final=!0),i.push({node:s,editsRemaining:r.editsRemaining,str:r.str.slice(1)})}if(0!=r.editsRemaining){if("*"in r.node.edges)var a=r.node.edges["*"];else{var a=new A.TokenSet;r.node.edges["*"]=a}if(0==r.str.length&&(a.final=!0),i.push({node:a,editsRemaining:r.editsRemaining-1,str:r.str}),r.str.length>1&&i.push({node:r.node,editsRemaining:r.editsRemaining-1,str:r.str.slice(1)}),1==r.str.length&&(r.node.final=!0),r.str.length>=1){if("*"in r.node.edges)var u=r.node.edges["*"];else{var u=new A.TokenSet;r.node.edges["*"]=u}1==r.str.length&&(u.final=!0),i.push({node:u,editsRemaining:r.editsRemaining-1,str:r.str.slice(1)})}if(r.str.length>1){var c,l=r.str.charAt(0),h=r.str.charAt(1);h in r.node.edges?c=r.node.edges[h]:(c=new A.TokenSet,r.node.edges[h]=c),1==r.str.length&&(c.final=!0),i.push({node:c,editsRemaining:r.editsRemaining-1,str:l+r.str.slice(2)})}}}return n},A.TokenSet.fromString=function(e){for(var t=new A.TokenSet,n=t,i=0,r=e.length;i=e;t--){var n=this.uncheckedNodes[t],i=n.child.toString();i in this.minimizedNodes?n.parent.edges[n.char]=this.minimizedNodes[i]:(n.child._str=i,this.minimizedNodes[i]=n.child),this.uncheckedNodes.pop()}},A.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},A.Index.prototype.search=function(e){return this.query(function(t){new A.QueryParser(e,t).parse()})},A.Index.prototype.query=function(e){for(var t=new A.Query(this.fields),n=Object.create(null),i=Object.create(null),r=Object.create(null),s=Object.create(null),o=Object.create(null),a=0;a1?this._b=1:this._b=e},A.Builder.prototype.k1=function(e){this._k1=e},A.Builder.prototype.add=function(e,t){var n=e[this._ref],i=Object.keys(this._fields);this._documents[n]=t||{},this.documentCount+=1;for(var r=0;r=this.length)return A.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},A.QueryLexer.prototype.width=function(){return this.pos-this.start},A.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},A.QueryLexer.prototype.backup=function(){this.pos-=1},A.QueryLexer.prototype.acceptDigitRun=function(){var e,t;do t=(e=this.next()).charCodeAt(0);while(t>47&&t<58);e!=A.QueryLexer.EOS&&this.backup()},A.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(A.QueryLexer.TERM)),e.ignore(),e.more())return A.QueryLexer.lexText},A.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(A.QueryLexer.EDIT_DISTANCE),A.QueryLexer.lexText},A.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(A.QueryLexer.BOOST),A.QueryLexer.lexText},A.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(A.QueryLexer.TERM)},A.QueryLexer.termSeparator=A.tokenizer.separator,A.QueryLexer.lexText=function(e){for(;;){var t=e.next();if(t==A.QueryLexer.EOS)return A.QueryLexer.lexEOS;if(92==t.charCodeAt(0)){e.escapeCharacter();continue}if(":"==t)return A.QueryLexer.lexField;if("~"==t)return e.backup(),e.width()>0&&e.emit(A.QueryLexer.TERM),A.QueryLexer.lexEditDistance;if("^"==t)return e.backup(),e.width()>0&&e.emit(A.QueryLexer.TERM),A.QueryLexer.lexBoost;if("+"==t&&1===e.width()||"-"==t&&1===e.width())return e.emit(A.QueryLexer.PRESENCE),A.QueryLexer.lexText;if(t.match(A.QueryLexer.termSeparator))return A.QueryLexer.lexTerm}},A.QueryParser=function(e,t){this.lexer=new A.QueryLexer(e),this.query=t,this.currentClause={},this.lexemeIdx=0},A.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=A.QueryParser.parseClause;e;)e=e(this);return this.query},A.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},A.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},A.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},A.QueryParser.parseClause=function(e){var t=e.peekLexeme();if(void 0!=t)switch(t.type){case A.QueryLexer.PRESENCE:return A.QueryParser.parsePresence;case A.QueryLexer.FIELD:return A.QueryParser.parseField;case A.QueryLexer.TERM:return A.QueryParser.parseTerm;default:var n="expected either a field or a term, found "+t.type;throw t.str.length>=1&&(n+=" with value '"+t.str+"'"),new A.QueryParseError(n,t.start,t.end)}},A.QueryParser.parsePresence=function(e){var t=e.consumeLexeme();if(void 0!=t){switch(t.str){case"-":e.currentClause.presence=A.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=A.Query.presence.REQUIRED;break;default:var n="unrecognised presence operator'"+t.str+"'";throw new A.QueryParseError(n,t.start,t.end)}var i=e.peekLexeme();if(void 0==i){var n="expecting term or field, found nothing";throw new A.QueryParseError(n,t.start,t.end)}switch(i.type){case A.QueryLexer.FIELD:return A.QueryParser.parseField;case A.QueryLexer.TERM:return A.QueryParser.parseTerm;default:var n="expecting term or field, found '"+i.type+"'";throw new A.QueryParseError(n,i.start,i.end)}}},A.QueryParser.parseField=function(e){var t=e.consumeLexeme();if(void 0!=t){if(-1==e.query.allFields.indexOf(t.str)){var n=e.query.allFields.map(function(e){return"'"+e+"'"}).join(", "),i="unrecognised field '"+t.str+"', possible fields: "+n;throw new A.QueryParseError(i,t.start,t.end)}e.currentClause.fields=[t.str];var r=e.peekLexeme();if(void 0==r){var i="expecting term, found nothing";throw new A.QueryParseError(i,t.start,t.end)}if(r.type===A.QueryLexer.TERM)return A.QueryParser.parseTerm;var i="expecting term, found '"+r.type+"'";throw new A.QueryParseError(i,r.start,r.end)}},A.QueryParser.parseTerm=function(e){var t=e.consumeLexeme();if(void 0!=t){e.currentClause.term=t.str.toLowerCase(),-1!=t.str.indexOf("*")&&(e.currentClause.usePipeline=!1);var n=e.peekLexeme();if(void 0==n){e.nextClause();return}switch(n.type){case A.QueryLexer.TERM:return e.nextClause(),A.QueryParser.parseTerm;case A.QueryLexer.FIELD:return e.nextClause(),A.QueryParser.parseField;case A.QueryLexer.EDIT_DISTANCE:return A.QueryParser.parseEditDistance;case A.QueryLexer.BOOST:return A.QueryParser.parseBoost;case A.QueryLexer.PRESENCE:return e.nextClause(),A.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+n.type+"'";throw new A.QueryParseError(i,n.start,n.end)}}},A.QueryParser.parseEditDistance=function(e){var t=e.consumeLexeme();if(void 0!=t){var n=parseInt(t.str,10);if(isNaN(n)){var i="edit distance must be numeric";throw new A.QueryParseError(i,t.start,t.end)}e.currentClause.editDistance=n;var r=e.peekLexeme();if(void 0==r){e.nextClause();return}switch(r.type){case A.QueryLexer.TERM:return e.nextClause(),A.QueryParser.parseTerm;case A.QueryLexer.FIELD:return e.nextClause(),A.QueryParser.parseField;case A.QueryLexer.EDIT_DISTANCE:return A.QueryParser.parseEditDistance;case A.QueryLexer.BOOST:return A.QueryParser.parseBoost;case A.QueryLexer.PRESENCE:return e.nextClause(),A.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new A.QueryParseError(i,r.start,r.end)}}},A.QueryParser.parseBoost=function(e){var t=e.consumeLexeme();if(void 0!=t){var n=parseInt(t.str,10);if(isNaN(n)){var i="boost must be numeric";throw new A.QueryParseError(i,t.start,t.end)}e.currentClause.boost=n;var r=e.peekLexeme();if(void 0==r){e.nextClause();return}switch(r.type){case A.QueryLexer.TERM:return e.nextClause(),A.QueryParser.parseTerm;case A.QueryLexer.FIELD:return e.nextClause(),A.QueryParser.parseField;case A.QueryLexer.EDIT_DISTANCE:return A.QueryParser.parseEditDistance;case A.QueryLexer.BOOST:return A.QueryParser.parseBoost;case A.QueryLexer.PRESENCE:return e.nextClause(),A.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new A.QueryParseError(i,r.start,r.end)}}},O=0,L=function(){return A},"function"==typeof define&&define.amd?define(L):e.exports=L()}()},75322:function(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>v});var i=n("5485"),r=n.n(i),s=n("74802");s.Z.tokenizer.separator=/[\s\-/]+/;let o=class e{constructor(e,t,n="/",i){this.searchDocs=e,this.lunrIndex=s.Z.Index.load(t),this.baseUrl=n,this.maxHits=i}getLunrResult(e){return this.lunrIndex.query(function(t){let n=s.Z.tokenizer(e);t.term(n,{boost:10}),t.term(n,{wildcard:s.Z.Query.wildcard.TRAILING})})}getHit(e,t,n){return{hierarchy:{lvl0:e.pageTitle||e.title,lvl1:0===e.type?null:e.title},url:e.url,version:e.version,_snippetResult:n?{content:{value:n,matchLevel:"full"}}:null,_highlightResult:{hierarchy:{lvl0:{value:0===e.type?t||e.title:e.pageTitle},lvl1:0===e.type?null:{value:t||e.title}}}}}getTitleHit(e,t,n){let i=t[0],r=t[0]+n,s=e.title.substring(0,i)+''+e.title.substring(i,r)+""+e.title.substring(r,e.title.length);return this.getHit(e,s)}getKeywordHit(e,t,n){let i=t[0],r=t[0]+n,s=e.title+"
Keywords: "+e.keywords.substring(0,i)+''+e.keywords.substring(i,r)+""+e.keywords.substring(r,e.keywords.length)+"";return this.getHit(e,s)}getContentHit(e,t){let n=t[0],i=t[0]+t[1],r=n,s=i,o=!0,a=!0;for(let t=0;t<3;t++){let t=e.content.lastIndexOf(" ",r-2),n=e.content.lastIndexOf(".",r-2);if(n>0&&n>t){r=n+1,o=!1;break}if(t<0){r=0,o=!1;break}r=t+1}for(let t=0;t<10;t++){let t=e.content.indexOf(" ",s+1),n=e.content.indexOf(".",s+1);if(n>0&&n",u+=e.content.substring(i,s),a&&(u+=" ..."),this.getHit(e,null,u)}search(e){return new Promise((t,n)=>{let i=this.getLunrResult(e),r=[];i.length>this.maxHits&&(i.length=this.maxHits),this.titleHitsRes=[],this.contentHitsRes=[],i.forEach(t=>{let n=this.searchDocs[t.ref],{metadata:i}=t.matchData;for(let s in i)if(i[s].title){if(!this.titleHitsRes.includes(t.ref)){let o=i[s].title.position[0];r.push(this.getTitleHit(n,o,e.length)),this.titleHitsRes.push(t.ref)}}else if(i[s].content){let e=i[s].content.position[0];r.push(this.getContentHit(n,e))}else if(i[s].keywords){let o=i[s].keywords.position[0];r.push(this.getKeywordHit(n,o,e.length)),this.titleHitsRes.push(t.ref)}}),r.length>this.maxHits&&(r.length=this.maxHits),t(r)})}};var a=n("71639"),u=n.n(a);let c="algolia-docsearch",l=`${c}-suggestion`,h=`${c}-footer`,p={suggestion:`
{{{category}}}
{{{subcategory}}}
{{#isTextOrSubcategoryNonEmpty}}
{{{subcategory}}}
{{{title}}}
{{#text}}
{{{text}}}
{{/text}} {{#version}}
{{version}}
{{/version}}
{{/isTextOrSubcategoryNonEmpty}}
`,suggestionSimple:`
{{^isLvl0}} {{{category}}} {{^isLvl1}} {{^isLvl1EmptyOrDuplicate}} {{{subcategory}}} {{/isLvl1EmptyOrDuplicate}} {{/isLvl1}} {{/isLvl0}}
{{#isLvl2}} {{{title}}} {{/isLvl2}} {{#isLvl1}} {{{subcategory}}} {{/isLvl1}} {{#isLvl0}} {{{category}}} {{/isLvl0}}
{{#text}}
{{{text}}}
{{/text}}
`,footer:`
`,empty:`
No results found for query "{{query}}"
`,searchBox:` `};var d=n("7939"),f=n.n(d);let g={mergeKeyWithParent(e,t){if(void 0===e[t]||"object"!=typeof e[t])return e;let n=f().extend({},e,e[t]);return delete n[t],n},groupBy(e,t){let n={};return f().each(e,(e,i)=>{if(void 0===i[t])throw Error(`[groupBy]: Object has no key ${t}`);let r=i[t];"string"==typeof r&&(r=r.toLowerCase()),!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=[]),n[r].push(i)}),n},values:e=>Object.keys(e).map(t=>e[t]),flatten(e){let t=[];return e.forEach(e=>{if(!Array.isArray(e)){t.push(e);return}e.forEach(e=>{t.push(e)})}),t},flattenAndFlagFirst(e,t){let n=this.values(e).map(e=>e.map((e,n)=>(e[t]=0===n,e)));return this.flatten(n)},compact(e){let t=[];return e.forEach(e=>{if(!!e)t.push(e)}),t},getHighlightedValue:(e,t)=>e._highlightResult&&e._highlightResult.hierarchy_camel&&e._highlightResult.hierarchy_camel[t]&&e._highlightResult.hierarchy_camel[t].matchLevel&&"none"!==e._highlightResult.hierarchy_camel[t].matchLevel&&e._highlightResult.hierarchy_camel[t].value?e._highlightResult.hierarchy_camel[t].value:e._highlightResult&&e._highlightResult&&e._highlightResult[t]&&e._highlightResult[t].value?e._highlightResult[t].value:e[t],getSnippetedValue(e,t){if(!e._snippetResult||!e._snippetResult[t]||!e._snippetResult[t].value)return e[t];let n=e._snippetResult[t].value;return n[0]!==n[0].toUpperCase()&&(n=`\u{2026}${n}`),-1===[".","!","?"].indexOf(n[n.length-1])&&(n=`${n}\u{2026}`),n},deepClone:e=>JSON.parse(JSON.stringify(e))};class m{constructor({searchDocs:e,searchIndex:t,inputSelector:n,debug:i=!1,baseUrl:r="/",queryDataCallback:s=null,autocompleteOptions:a={debug:!1,hint:!1,autoselect:!0},transformData:c=!1,queryHook:l=!1,handleSelected:h=!1,enhancedSearchInput:d=!1,layout:g="column",maxHits:v=5}){this.input=m.getInputFromSelector(n),this.queryDataCallback=s||null;let y=!!a&&!!a.debug&&a.debug;a.debug=i||y,this.autocompleteOptions=a,this.autocompleteOptions.cssClasses=this.autocompleteOptions.cssClasses||{},this.autocompleteOptions.cssClasses.prefix=this.autocompleteOptions.cssClasses.prefix||"ds";let x=this.input&&"function"==typeof this.input.attr&&this.input.attr("aria-label");this.autocompleteOptions.ariaLabel=this.autocompleteOptions.ariaLabel||x||"search input",this.isSimpleLayout="simple"===g,this.client=new o(e,t,r,v),d&&(this.input=m.injectSearchBox(this.input)),this.autocomplete=u()(this.input,a,[{source:this.getAutocompleteSource(c,l),templates:{suggestion:m.getSuggestionTemplate(this.isSimpleLayout),footer:p.footer,empty:m.getEmptyTemplate()}}]);this.handleSelected=h||this.handleSelected,h&&f()(".algolia-autocomplete").on("click",".ds-suggestions a",e=>{e.preventDefault()}),this.autocomplete.on("autocomplete:selected",this.handleSelected.bind(null,this.autocomplete.autocomplete)),this.autocomplete.on("autocomplete:shown",this.handleShown.bind(null,this.input)),d&&m.bindSearchBoxEvent(),document.addEventListener("keydown",e=>{(e.ctrlKey||e.metaKey)&&"k"==e.key&&(this.input.focus(),e.preventDefault())})}static injectSearchBox(e){e.before(p.searchBox);let t=e.prev().prev().find("input");return e.remove(),t}static bindSearchBoxEvent(){f()('.searchbox [type="reset"]').on("click",function(){f()("input#docsearch").focus(),f()(this).addClass("hide"),u().autocomplete.setVal("")}),f()("input#docsearch").on("keyup",()=>{let e=document.querySelector("input#docsearch"),t=document.querySelector('.searchbox [type="reset"]');t.className="searchbox__reset",0===e.value.length&&(t.className+=" hide")})}static getInputFromSelector(e){let t=f()(e).filter("input");return t.length?f()(t[0]):null}getAutocompleteSource(e,t){return(n,i)=>{t&&(n=t(n)||n),this.client.search(n).then(t=>{this.queryDataCallback&&"function"==typeof this.queryDataCallback&&this.queryDataCallback(t),e&&(t=e(t)||t),i(m.formatHits(t))})}}static formatHits(e){let t=g.deepClone(e).map(e=>(e._highlightResult&&(e._highlightResult=g.mergeKeyWithParent(e._highlightResult,"hierarchy")),g.mergeKeyWithParent(e,"hierarchy"))),n=g.groupBy(t,"lvl0");return f().each(n,(e,t)=>{let i=g.groupBy(t,"lvl1"),r=g.flattenAndFlagFirst(i,"isSubCategoryHeader");n[e]=r}),(n=g.flattenAndFlagFirst(n,"isCategoryHeader")).map(e=>{let t=m.formatURL(e),n=g.getHighlightedValue(e,"lvl0"),i=g.getHighlightedValue(e,"lvl1")||n,r=g.compact([g.getHighlightedValue(e,"lvl2")||i,g.getHighlightedValue(e,"lvl3"),g.getHighlightedValue(e,"lvl4"),g.getHighlightedValue(e,"lvl5"),g.getHighlightedValue(e,"lvl6")]).join(''),s=g.getSnippetedValue(e,"content"),o=i&&""!==i||r&&""!==r,a=!i||""===i||i===n,u=r&&""!==r&&r!==i,c=!u&&i&&""!==i&&i!==n,l=e.version;return{isLvl0:!c&&!u,isLvl1:c,isLvl2:u,isLvl1EmptyOrDuplicate:a,isCategoryHeader:e.isCategoryHeader,isSubCategoryHeader:e.isSubCategoryHeader,isTextOrSubcategoryNonEmpty:o,category:n,subcategory:i,title:r,text:s,url:t,version:l}})}static formatURL(e){let{url:t,anchor:n}=e;if(t){if(-1!==t.indexOf("#"));else if(n)return`${e.url}#${e.anchor}`;return t}return n?`#${e.anchor}`:(console.warn("no anchor nor url for : ",JSON.stringify(e)),null)}static getEmptyTemplate(){return e=>r().compile(p.empty).render(e)}static getSuggestionTemplate(e){let t=e?p.suggestionSimple:p.suggestion,n=r().compile(t);return e=>n.render(e)}handleSelected(e,t,n,i){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};if("click"!==r.selectionMethod)e.setVal(""),window.location.assign(n.url)}handleShown(e){let t=e.offset().left+e.width()/2,n=f()(document).width()/2;isNaN(n)&&(n=900);let i=t-n>=0?"algolia-autocomplete-right":"algolia-autocomplete-left",r=t-n<0?"algolia-autocomplete-right":"algolia-autocomplete-left",s=f()(".algolia-autocomplete");!s.hasClass(i)&&s.addClass(i),s.hasClass(r)&&s.removeClass(r)}}let v=m}}]);