(window.webpackJsonp=window.webpackJsonp||[]).push([[28],{179:function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=t.initialState;return{getState:function(){return r},dispatch:function(a,c){var i=function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var C=null;function N(e){var t=e.event,r=e.nextState,n=void 0===r?{}:r,o=e.props,a=e.query,c=e.refresh,i=e.store,l=D(e,["event","nextState","props","query","refresh","store"]);if(o.onInput)return Promise.resolve(o.onInput(P({query:a,refresh:c,state:i.getState()},l)));C&&o.environment.clearTimeout(C);var s,u=l.setCollections,f=l.setIsOpen,m=l.setQuery,p=l.setSelectedItemId,h=l.setStatus;return m(a),p(o.defaultSelectedItemId),0===a.length&&!1===o.openOnFocus?(h("idle"),u(i.getState().collections.map((function(e){return P(P({},e),{},{items:[]})}))),f(null!==(s=n.isOpen)&&void 0!==s?s:o.shouldPanelShow({state:i.getState()})),Promise.resolve()):(h("loading"),C=o.environment.setTimeout((function(){h("stalled")}),o.stallThreshold),o.getSources(P({query:a,refresh:c,state:i.getState()},l)).then((function(e){return h("loading"),Promise.all(e.map((function(e){return Promise.resolve(e.getItems(P({query:a,refresh:c,state:i.getState()},l))).then((function(t){return Array.isArray(t),"The `getItems` function must return an array of items but returned type ".concat(JSON.stringify(w(t)),":\n\n").concat(JSON.stringify(t,null,2)),{source:e,items:t}}))}))).then((function(e){var r;h("idle"),u(e),f(null!==(r=n.isOpen)&&void 0!==r?r:0===a.length&&o.openOnFocus||o.shouldPanelShow({state:i.getState()}));var s=E(i.getState());if(null!==i.getState().selectedItemId&&s){var m=s.item,p=s.itemInputValue,d=s.itemUrl,v=s.source;v.onHighlight(P({event:t,item:m,itemInputValue:p,itemUrl:d,refresh:c,source:v,state:i.getState()},l))}})).catch((function(e){throw h("error"),e})).finally((function(){C&&o.environment.clearTimeout(C)}))})))}function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function H(e,t){return e===t||e.contains(t)}function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function T(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function L(e){var t=e.props,r=e.refresh,n=e.store,o=M(e,["props","refresh","store"]);return{getEnvironmentProps:function(e){return{onTouchStart:function(r){!1!==n.getState().isOpen&&r.target!==e.inputElement&&(!1===[e.formElement,e.panelElement].some((function(e){return H(e,r.target)||H(e,t.environment.document.activeElement)}))&&n.dispatch("blur",null))},onTouchMove:function(r){!1!==n.getState().isOpen&&e.inputElement===t.environment.document.activeElement&&r.target!==e.inputElement&&e.inputElement.blur()}}},getRootProps:function(e){return T({role:"combobox","aria-expanded":n.getState().isOpen,"aria-haspopup":"listbox","aria-owns":n.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label")},e)},getFormProps:function(e){e.inputElement;return T({action:"",noValidate:!0,role:"search",onSubmit:function(a){var c;a.preventDefault(),t.onSubmit(T({event:a,refresh:r,state:n.getState()},o)),n.dispatch("submit",null),null===(c=e.inputElement)||void 0===c||c.blur()},onReset:function(a){var c;a.preventDefault(),t.onReset(T({event:a,refresh:r,state:n.getState()},o)),n.dispatch("reset",null),null===(c=e.inputElement)||void 0===c||c.focus()}},M(e,["inputElement"]))},getLabelProps:function(e){return T({htmlFor:"".concat(t.id,"-input"),id:"".concat(t.id,"-label")},e)},getInputProps:function(e){function a(e){(t.openOnFocus||n.getState().query.length>0)&&N(T({event:e,props:t,query:n.getState().completion||n.getState().query,refresh:r,store:n},o)),n.dispatch("focus",null)}var c="ontouchstart"in t.environment,i=e||{},l=(i.inputElement,i.maxLength),s=void 0===l?512:l,u=M(i,["inputElement","maxLength"]),f=E(n.getState());return T({"aria-autocomplete":"both","aria-activedescendant":n.getState().isOpen&&null!==n.getState().selectedItemId?"".concat(t.id,"-item-").concat(n.getState().selectedItemId):void 0,"aria-controls":n.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label"),value:n.getState().completion||n.getState().query,id:"".concat(t.id,"-input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:null!=f&&f.itemUrl?"go":"search",spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:s,type:"search",onChange:function(e){N(T({event:e,props:t,query:e.currentTarget.value.slice(0,s),refresh:r,store:n},o))},onKeyDown:function(e){!function(e){var t=e.event,r=e.props,n=e.refresh,o=e.store,a=q(e,["event","props","refresh","store"]);if("ArrowUp"===t.key||"ArrowDown"===t.key){t.preventDefault(),o.dispatch(t.key,null);var c=r.environment.document.getElementById("".concat(r.id,"-item-").concat(o.getState().selectedItemId));c&&(c.scrollIntoViewIfNeeded?c.scrollIntoViewIfNeeded(!1):c.scrollIntoView(!1));var i=E(o.getState());if(null!==o.getState().selectedItemId&&i){var l=i.item,s=i.itemInputValue,u=i.itemUrl,f=i.source;f.onHighlight(x({event:t,item:l,itemInputValue:s,itemUrl:u,refresh:n,source:f,state:o.getState()},a))}}else if("Escape"===t.key)t.preventDefault(),o.dispatch(t.key,null);else if("Enter"===t.key){if(null===o.getState().selectedItemId||o.getState().collections.every((function(e){return 0===e.items.length})))return;t.preventDefault();var m=E(o.getState()),p=m.item,h=m.itemInputValue,d=m.itemUrl,v=m.source;if(t.metaKey||t.ctrlKey)void 0!==d&&(v.onSelect(x({event:t,item:p,itemInputValue:h,itemUrl:d,refresh:n,source:v,state:o.getState()},a)),r.navigator.navigateNewTab({itemUrl:d,item:p,state:o.getState()}));else if(t.shiftKey)void 0!==d&&(v.onSelect(x({event:t,item:p,itemInputValue:h,itemUrl:d,refresh:n,source:v,state:o.getState()},a)),r.navigator.navigateNewWindow({itemUrl:d,item:p,state:o.getState()}));else if(t.altKey);else{if(void 0!==d)return v.onSelect(x({event:t,item:p,itemInputValue:h,itemUrl:d,refresh:n,source:v,state:o.getState()},a)),void r.navigator.navigate({itemUrl:d,item:p,state:o.getState()});N(x({event:t,nextState:{isOpen:!1},props:r,query:h,refresh:n,store:o},a)).then((function(){v.onSelect(x({event:t,item:p,itemInputValue:h,itemUrl:d,refresh:n,source:v,state:o.getState()},a))}))}}}(T({event:e,props:t,refresh:r,store:n},o))},onFocus:a,onBlur:function(){c||n.dispatch("blur",null)},onClick:function(r){e.inputElement!==t.environment.document.activeElement||n.getState().isOpen||a(r)}},u)},getPanelProps:function(e){return T({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){n.dispatch("mouseleave",null)}},e)},getListProps:function(e){return T({role:"listbox","aria-labelledby":"".concat(t.id,"-label"),id:"".concat(t.id,"-list")},e)},getItemProps:function(e){var a=e.item,c=e.source,i=M(e,["item","source"]);return T({id:"".concat(t.id,"-item-").concat(a.__autocomplete_id),role:"option","aria-selected":n.getState().selectedItemId===a.__autocomplete_id,onMouseMove:function(e){if(a.__autocomplete_id!==n.getState().selectedItemId){n.dispatch("mousemove",a.__autocomplete_id);var t=E(n.getState());if(null!==n.getState().selectedItemId&&t){var c=t.item,i=t.itemInputValue,l=t.itemUrl,s=t.source;s.onHighlight(T({event:e,item:c,itemInputValue:i,itemUrl:l,refresh:r,source:s,state:n.getState()},o))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var i=c.getItemInputValue({item:a,state:n.getState()}),l=c.getItemUrl({item:a,state:n.getState()});(l?Promise.resolve():N(T({event:e,nextState:{isOpen:!1},props:t,query:i,refresh:r,store:n},o))).then((function(){c.onSelect(T({event:e,item:a,itemInputValue:i,itemUrl:l,refresh:r,source:c,state:n.getState()},o))}))}},i)}}}function F(e){var t=e.state;return!1===t.isOpen||null===t.selectedItemId?null:E(t).itemInputValue||null}function U(e,t,r,n){if(e<0&&(null===t||null!==n&&0===t))return r+e;var o=(null===t?-1:t)+e;return o<=-1||o>=r?null===n?null:0:o}function V(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function z(e){for(var t=1;t0});case"blur":return t.props.debug?e:z(z({},e),{},{isOpen:!1,selectedItemId:null});case"mousemove":return z(z({},e),{},{selectedItemId:t.payload});case"mouseleave":return z(z({},e),{},{selectedItemId:t.props.defaultSelectedItemId});default:return"The reducer action ".concat(JSON.stringify(t.type)," is not supported."),e}};function K(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function $(e){for(var t=1;t0}},e),{},{id:null!==(r=e.id)&&void 0!==r?r:"autocomplete-".concat(f++),plugins:o,initialState:O({selectedItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var r;null===(r=e.onStateChange)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onStateChange)||void 0===r?void 0:r.call(e,t)}))},onSubmit:function(t){var r;null===(r=e.onSubmit)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onSubmit)||void 0===r?void 0:r.call(e,t)}))},onReset:function(t){var r;null===(r=e.onReset)||void 0===r||r.call(e,t),o.forEach((function(e){var r;return null===(r=e.onReset)||void 0===r?void 0:r.call(e,t)}))},getSources:function(r){return Promise.all([].concat(y(o.map((function(e){return e.getSources}))),[e.getSources]).filter(Boolean).map((function(e){return v(e,r)}))).then((function(e){return c(e)})).then((function(e){return e.map((function(e){return O(O({},e),{},{onSelect:function(r){e.onSelect(r),t.forEach((function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,r)}))},onHighlight:function(r){e.onHighlight(r),t.forEach((function(e){var t;return null===(t=e.onHighlight)||void 0===t?void 0:t.call(e,r)}))}})}))}))},navigator:O({navigate:function(e){var t=e.itemUrl;n.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,r=n.open(t,"_blank","noopener");null==r||r.focus()},navigateNewWindow:function(e){var t=e.itemUrl;n.open(t,"_blank","noopener")}},e.navigator)})}(e,t),n=a(J,r),o=function(e){var t=e.store;return{setSelectedItemId:function(e){t.dispatch("setSelectedItemId",e)},setQuery:function(e){t.dispatch("setQuery",e)},setCollections:function(e){var r=0,n=e.map((function(e){return l(l({},e),{},{items:c(e.items).map((function(e){return l(l({},e),{},{__autocomplete_id:r++})}))})}));t.dispatch("setCollections",n)},setIsOpen:function(e){t.dispatch("setIsOpen",e)},setStatus:function(e){t.dispatch("setStatus",e)},setContext:function(e){t.dispatch("setContext",e)}}}({store:n}),i=L($({props:r,refresh:s,store:n},o));function s(){return N($({event:new Event("input"),nextState:{isOpen:n.getState().isOpen},props:r,query:n.getState().query,refresh:s,store:n},o))}return r.plugins.forEach((function(e){var r;return null===(r=e.subscribe)||void 0===r?void 0:r.call(e,$($({},o),{},{onSelect:function(e){t.push({onSelect:e})},onHighlight:function(e){t.push({onHighlight:e})}}))})),$($({refresh:s},i),o)}function Y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function G(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&te.a.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},te.a.createElement("p",{className:"DocSearch-Help"},"Try searching for:"),te.a.createElement("ul",null,t.slice(0,3).reduce((function(t,r){return[].concat(se(t),[te.a.createElement("li",{key:r},te.a.createElement("button",{className:"DocSearch-Prefill",key:r,onClick:function(){e.setQuery(r.toLowerCase()+" "),e.refresh(),e.inputRef.current.focus()}},r))])}),[]))),te.a.createElement("p",{className:"DocSearch-Help"},"Believe this query should return results?"," ",te.a.createElement("a",{href:"https://github.com/algolia/docsearch-configs/issues/new?template=Missing_results.md&title=[".concat(e.indexName,']+Missing+results+for+query+"').concat(e.state.query,'"'),target:"_blank",rel:"noopener noreferrer"},"Let us know"),"."))}function me(e){switch(e.type){case"lvl1":return te.a.createElement(pe,null);case"content":return te.a.createElement(de,null);default:return te.a.createElement(he,null)}}function pe(){return te.a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},te.a.createElement("path",{d:"M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function he(){return te.a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},te.a.createElement("path",{d:"M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function de(){return te.a.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},te.a.createElement("path",{d:"M17 5H3h14zm0 5H3h14zm0 5H3h14z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function ve(){return te.a.createElement("svg",{className:"DocSearch-Hit-Select-Icon",width:"20",height:"20",viewBox:"0 0 20 20"},te.a.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},te.a.createElement("path",{d:"M18 3v4c0 2-2 4-4 4H2"}),te.a.createElement("path",{d:"M8 17l-6-6 6-6"})))}function ye(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ge(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Se(e,t){return t.split(".").reduce((function(e,t){return e&&e[t]}),e)}function Ee(e){var t=e.hit,r=e.attribute,n=e.tagName,o=void 0===n?"span":n,a=Oe(e,["hit","attribute","tagName"]);return Object(ee.createElement)(o,ge(ge({},a),{},{dangerouslySetInnerHTML:{__html:Se(t,"_snippetResult.".concat(r,".value"))||Se(t,r)}}))}function we(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,o=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(n=(c=i.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(l){o=!0,a=l}finally{try{n||null==i.return||i.return()}finally{if(o)throw a}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return je(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return je(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function je(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0}));return e.state.query?!1===t?te.a.createElement(fe,e):te.a.createElement(Ne,e):te.a.createElement(He,Re({},e,{hasCollections:t}))}),(function(e,t){return"loading"===t.state.status||"stalled"===t.state.status}));function _e(){return te.a.createElement("svg",{viewBox:"0 0 38 38",stroke:"currentColor",strokeOpacity:".5"},te.a.createElement("g",{fill:"none",fillRule:"evenodd"},te.a.createElement("g",{transform:"translate(1 1)",strokeWidth:"2"},te.a.createElement("circle",{strokeOpacity:".3",cx:"18",cy:"18",r:"18"}),te.a.createElement("path",{d:"M36 18c0-9.94-8.06-18-18-18"},te.a.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))))}var Me=r(123);function Le(){return(Le=Object.assign||function(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Ve(e){return!1===function(){var e="__TEST_KEY__";try{return localStorage.setItem(e,""),localStorage.removeItem(e),!0}catch(t){return!1}}()?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(t){return window.localStorage.setItem(e,JSON.stringify(t))},getItem:function(){var t=window.localStorage.getItem(e);return t?JSON.parse(t):[]}}}function ze(e){var t=e.key,r=e.limit,n=void 0===r?5:r,o=Ve(t),a=o.getItem().slice(0,n);return{add:function(e){var t=e,r=(t._highlightResult,t._snippetResult,Ue(t,["_highlightResult","_snippetResult"])),c=a.findIndex((function(e){return e.objectID===r.objectID}));c>-1&&a.splice(c,1),a.unshift(r),a=a.slice(0,n),o.setItem(a)},remove:function(e){a=a.filter((function(t){return t.objectID!==e.objectID})),o.setItem(a)},getAll:function(){return a}}}function Be(e){const t=`algoliasearch-client-js-${e.key}`;let r;const n=()=>(void 0===r&&(r=e.localStorage||window.localStorage),r),o=()=>JSON.parse(n().getItem(t)||"{}");return{get:(e,t,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const r=JSON.stringify(e),n=o()[r];return Promise.all([n||t(),void 0!==n])})).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,r)=>Promise.resolve().then((()=>{const a=o();return a[JSON.stringify(e)]=r,n().setItem(t,JSON.stringify(a)),r})),delete:e=>Promise.resolve().then((()=>{const r=o();delete r[JSON.stringify(e)],n().setItem(t,JSON.stringify(r))})),clear:()=>Promise.resolve().then((()=>{n().removeItem(t)}))}}function Je(e){const t=[...e.caches],r=t.shift();return void 0===r?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,n,o={miss:()=>Promise.resolve()})=>r.get(e,n,o).catch((()=>Je({caches:t}).get(e,n,o))),set:(e,n)=>r.set(e,n).catch((()=>Je({caches:t}).set(e,n))),delete:e=>r.delete(e).catch((()=>Je({caches:t}).delete(e))),clear:()=>r.clear().catch((()=>Je({caches:t}).clear()))}}function Ke(e={serializable:!0}){let t={};return{get(r,n,o={miss:()=>Promise.resolve()}){const a=JSON.stringify(r);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);const c=n(),i=o&&o.miss||(()=>Promise.resolve());return c.then((e=>i(e))).then((()=>c))},set:(r,n)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}function $e(e){let t=e.length-1;for(;t>0;t--){const r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function We(e,t){return t?(Object.keys(t).forEach((r=>{e[r]=t[r](e)})),e):e}function Qe(e,...t){let r=0;return e.replace(/%s/g,(()=>encodeURIComponent(t[r++])))}const Ye="4.8.4",Ge={WithinQueryParameters:0,WithinHeaders:1};function Xe(e,t){const r=e||{},n=r.data||{};return Object.keys(r).forEach((e=>{-1===["timeout","headers","queryParameters","data","cacheable"].indexOf(e)&&(n[e]=r[e])})),{data:Object.entries(n).length>0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}const Ze={Read:1,Write:2,Any:3},et=1,tt=2,rt=3,nt=12e4;function ot(e,t=et){return{...e,status:t,lastUpdate:Date.now()}}function at(e){return"string"==typeof e?{protocol:"https",url:e,accept:Ze.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||Ze.Any}}const ct="GET",it="POST";function lt(e,t){return Promise.all(t.map((t=>e.get(t,(()=>Promise.resolve(ot(t))))))).then((e=>{const r=e.filter((e=>function(e){return e.status===et||Date.now()-e.lastUpdate>nt}(e))),n=e.filter((e=>function(e){return e.status===rt&&Date.now()-e.lastUpdate<=nt}(e))),o=[...r,...n];return{getTimeout:(e,t)=>(0===n.length&&0===e?1:n.length+3+e)*t,statelessHosts:o.length>0?o.map((e=>at(e))):t}}))}function st(e,t,r,n){const o=[],a=function(e,t){if(e.method===ct||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(r,n),c=function(e,t){const r={...e.headers,...t.headers},n={};return Object.keys(r).forEach((e=>{const t=r[e];n[e.toLowerCase()]=t})),n}(e,n),i=r.method,l=r.method!==ct?{}:{...r.data,...n.data},s={"x-algolia-agent":e.userAgent.value,...e.queryParameters,...l,...n.queryParameters};let u=0;const f=(t,l)=>{const m=t.pop();if(void 0===m)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:pt(o)};const p={data:a,headers:c,method:i,url:ft(m,r.path,s),connectTimeout:l(u,e.timeouts.connect),responseTimeout:l(u,n.timeout)},h=e=>{const r={request:p,response:e,host:m,triesLeft:t.length};return o.push(r),r},d={onSucess:e=>function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e),onRetry(r){const n=h(r);return r.isTimedOut&&u++,Promise.all([e.logger.info("Retryable failure",ht(n)),e.hostsCache.set(m,ot(m,r.isTimedOut?rt:tt))]).then((()=>f(t,l)))},onFail(e){throw h(e),function({content:e,status:t},r){let n=e;try{n=JSON.parse(e).message}catch(o){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(n,t,r)}(e,pt(o))}};return e.requester.send(p).then((e=>((e,t)=>(e=>{const t=e.status;return e.isTimedOut||(({isTimedOut:e,status:t})=>!e&&0==~~t)(e)||2!=~~(t/100)&&4!=~~(t/100)})(e)?t.onRetry(e):(({status:e})=>2==~~(e/100))(e)?t.onSucess(e):t.onFail(e))(e,d)))};return lt(e.hostsCache,t).then((e=>f([...e.statelessHosts].reverse(),e.getTimeout)))}function ut(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}function ft(e,t,r){const n=mt(r);let o=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return n.length&&(o+=`?${n}`),o}function mt(e){return Object.keys(e).map((t=>{return Qe("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function pt(e){return e.map((e=>ht(e)))}function ht(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}const dt=e=>{const t=e.appId,r=function(e,t,r){const n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:()=>e===Ge.WithinHeaders?n:{},queryParameters:()=>e===Ge.WithinQueryParameters?n:{}}}(void 0!==e.authMode?e.authMode:Ge.WithinHeaders,t,e.apiKey),n=function(e){const{hostsCache:t,logger:r,requester:n,requestsCache:o,responsesCache:a,timeouts:c,userAgent:i,hosts:l,queryParameters:s,headers:u}=e,f={hostsCache:t,logger:r,requester:n,requestsCache:o,responsesCache:a,timeouts:c,userAgent:i,headers:u,queryParameters:s,hosts:l.map((e=>at(e))),read(e,t){const r=Xe(t,f.timeouts.read),n=()=>st(f,f.hosts.filter((e=>0!=(e.accept&Ze.Read))),e,r);if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();const o={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(o,(()=>f.requestsCache.get(o,(()=>f.requestsCache.set(o,n()).then((e=>Promise.all([f.requestsCache.delete(o),e])),(e=>Promise.all([f.requestsCache.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>f.responsesCache.set(o,e)})},write:(e,t)=>st(f,f.hosts.filter((e=>0!=(e.accept&Ze.Write))),e,Xe(t,f.timeouts.write))};return f}({hosts:[{url:`${t}-dsn.algolia.net`,accept:Ze.Read},{url:`${t}.algolia.net`,accept:Ze.Write}].concat($e([{url:`${t}-1.algolianet.com`},{url:`${t}-2.algolianet.com`},{url:`${t}-3.algolianet.com`}])),...e,headers:{...r.headers(),"content-type":"application/x-www-form-urlencoded",...e.headers},queryParameters:{...r.queryParameters(),...e.queryParameters}});return We({transporter:n,appId:t,addAlgoliaAgent(e,t){n.userAgent.add({segment:e,version:t})},clearCache:()=>Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then((()=>{}))},e.methods)},vt=e=>(t,r={})=>We({transporter:e.transporter,appId:e.appId,indexName:t},r.methods),yt=e=>(t,r)=>{const n=t.map((e=>({...e,params:mt(e.params||{})})));return e.transporter.read({method:it,path:"1/indexes/*/queries",data:{requests:n},cacheable:!0},r)},gt=e=>(t,r)=>Promise.all(t.map((t=>{const{facetName:n,facetQuery:o,...a}=t.params;return vt(e)(t.indexName,{methods:{searchForFacetValues:St}}).searchForFacetValues(n,o,{...r,...a})}))),bt=e=>(t,r,n)=>e.transporter.read({method:it,path:Qe("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n),Ot=e=>(t,r)=>e.transporter.read({method:it,path:Qe("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r),St=e=>(t,r,n)=>e.transporter.read({method:it,path:Qe("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n),Et=1,wt=2,jt=3;function Pt(e,t,r){const n={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:e=>new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const n=(e,n)=>setTimeout((()=>{r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e),o=n(e.connectTimeout,"Connection timeout");let a;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===a&&(clearTimeout(o),a=n(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(o),clearTimeout(a),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(o),clearTimeout(a),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))},logger:(o=jt,{debug:(e,t)=>(Et>=o&&console.debug(e,t),Promise.resolve()),info:(e,t)=>(wt>=o&&console.info(e,t),Promise.resolve()),error:(e,t)=>(console.error(e,t),Promise.resolve())}),responsesCache:Ke(),requestsCache:Ke({serializable:!1}),hostsCache:Je({caches:[Be({key:`4.8.4-${e}`}),Ke()]}),userAgent:ut(Ye).add({segment:"Browser",version:"lite"}),authMode:Ge.WithinQueryParameters};var o;return dt({...n,...r,methods:{search:yt,searchForFacetValues:gt,multipleQueries:yt,multipleSearchForFacetValues:gt,initIndex:e=>t=>vt(e)(t,{methods:{search:Ot,searchForFacetValues:St,findAnswers:bt}})}})}Pt.version=Ye;var It=Pt,Dt="3.0.0-alpha.32";function Ct(){}function Nt(e){return e}function kt(e,t){return e.reduce((function(e,r){var n=t(r);return e.hasOwnProperty(n)||(e[n]=[]),e[n].length<5&&e[n].push(r),e}),{})}function xt(){return(xt=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r",highlightPostTag:"",hitsPerPage:20},i)}]}).catch((function(e){throw"RetryError"===e.name&&a("error"),e})).then((function(e){var t=e[0].hits,o=e[0].nbHits,a=kt(t,(function(e){return e.hierarchy.lvl0}));return r.context.searchSuggestions.length0&&(z(),A.current&&A.current.focus())}),[R,z]),te.a.useEffect((function(){function e(){if(N.current){var e=.01*window.innerHeight;N.current.style.setProperty("--docsearch-vh","".concat(e,"px"))}}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),te.a.createElement("div",xt({ref:C},V({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container","stalled"===I.status&&"DocSearch-Container--Stalled","error"===I.status&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),onMouseDown:function(e){e.target===e.currentTarget&&s()}}),te.a.createElement("div",{className:"DocSearch-Modal",ref:N},te.a.createElement("header",{className:"DocSearch-SearchBar",ref:k},te.a.createElement(Fe,xt({},F,{state:I,autoFocus:0===R.length,onClose:s,inputRef:A,isFromSelection:Boolean(R)&&R===H}))),te.a.createElement("div",{className:"DocSearch-Dropdown",ref:x},te.a.createElement(Te,xt({},F,{indexName:o,state:I,hitComponent:p,resultsFooterComponent:d,disableUserPersonalization:E,recentSearches:M,favoriteSearches:_,onItemClick:function(e){L(e),s()},inputRef:A}))),te.a.createElement("footer",{className:"DocSearch-Footer"},te.a.createElement(ne,null))))}}}]);