react-instantsearch-core 6.40.3 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +70 -2
- package/dist/cjs/components/Configure.js +13 -0
- package/dist/cjs/components/DynamicWidgets.js +63 -0
- package/dist/cjs/components/Index.js +24 -0
- package/dist/cjs/components/InstantSearch.js +27 -0
- package/dist/cjs/{connectors/connectConfigure.js → components/InstantSearchSSRProvider.js} +27 -63
- package/dist/cjs/components/InstantSearchServerContext.js +12 -0
- package/dist/cjs/connectors/useBreadcrumb.js +12 -0
- package/dist/cjs/connectors/useClearRefinements.js +12 -0
- package/dist/cjs/connectors/useConfigure.js +14 -0
- package/dist/cjs/connectors/useCurrentRefinements.js +12 -0
- package/dist/cjs/connectors/useDynamicWidgets.js +22 -0
- package/dist/cjs/connectors/useGeoSearch.js +12 -0
- package/dist/cjs/connectors/useHierarchicalMenu.js +12 -0
- package/dist/cjs/connectors/useHits.js +12 -0
- package/dist/cjs/connectors/useHitsPerPage.js +12 -0
- package/dist/cjs/connectors/useInfiniteHits.js +12 -0
- package/dist/cjs/connectors/useMenu.js +12 -0
- package/dist/cjs/connectors/useNumericMenu.js +12 -0
- package/dist/cjs/connectors/usePagination.js +12 -0
- package/dist/cjs/connectors/usePoweredBy.js +21 -0
- package/dist/cjs/connectors/useQueryRules.js +12 -0
- package/dist/cjs/connectors/useRange.js +12 -0
- package/dist/cjs/connectors/useRefinementList.js +12 -0
- package/dist/cjs/connectors/useSearchBox.js +12 -0
- package/dist/cjs/connectors/useSortBy.js +12 -0
- package/dist/cjs/connectors/useStats.js +12 -0
- package/dist/cjs/connectors/useToggleRefinement.js +12 -0
- package/dist/cjs/hooks/useConnector.js +136 -0
- package/dist/cjs/hooks/useInstantSearch.js +58 -0
- package/dist/cjs/index.js +328 -320
- package/dist/cjs/lib/IndexContext.js +12 -0
- package/dist/cjs/lib/InstantSearchContext.js +12 -0
- package/dist/cjs/lib/InstantSearchSSRContext.js +12 -0
- package/dist/cjs/lib/createSearchResults.js +27 -0
- package/dist/cjs/lib/dequal.js +53 -0
- package/dist/cjs/lib/getIndexSearchResults.js +32 -0
- package/dist/cjs/lib/invariant.js +25 -0
- package/dist/cjs/lib/noop.js +8 -0
- package/dist/cjs/lib/useForceUpdate.js +25 -0
- package/dist/cjs/lib/useIndex.js +38 -0
- package/dist/cjs/lib/useIndexContext.js +14 -0
- package/dist/cjs/lib/useInstantSearchApi.js +191 -0
- package/dist/cjs/lib/useInstantSearchContext.js +14 -0
- package/dist/cjs/lib/useInstantSearchSSRContext.js +11 -0
- package/dist/cjs/lib/useInstantSearchServerContext.js +11 -0
- package/dist/cjs/lib/useIsomorphicLayoutEffect.js +14 -0
- package/dist/cjs/lib/useSearchResults.js +46 -0
- package/dist/cjs/lib/useSearchState.js +48 -0
- package/dist/cjs/lib/useStableValue.js +26 -0
- package/dist/cjs/lib/useWidget.js +78 -0
- package/dist/cjs/lib/warn.js +41 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/server/getServerState.js +93 -0
- package/dist/cjs/{types → server}/index.js +4 -4
- package/dist/cjs/{core/version.js → version.js} +1 -1
- package/dist/es/components/Configure.d.ts +3 -0
- package/dist/es/components/Configure.js +7 -0
- package/dist/es/components/DynamicWidgets.d.ts +13 -0
- package/dist/es/components/DynamicWidgets.js +55 -0
- package/dist/es/components/Index.d.ts +6 -0
- package/dist/es/components/Index.js +17 -0
- package/dist/es/components/InstantSearch.d.ts +7 -0
- package/dist/es/components/InstantSearch.js +20 -0
- package/dist/es/components/InstantSearchSSRProvider.d.ts +13 -0
- package/dist/es/{connectors/connectConfigure.js → components/InstantSearchSSRProvider.js} +26 -61
- package/dist/es/components/InstantSearchServerContext.d.ts +12 -0
- package/dist/es/components/InstantSearchServerContext.js +5 -0
- package/dist/es/connectors/useBreadcrumb.d.ts +4 -0
- package/dist/es/connectors/useBreadcrumb.js +5 -0
- package/dist/es/connectors/useClearRefinements.d.ts +4 -0
- package/dist/es/connectors/useClearRefinements.js +5 -0
- package/dist/es/connectors/useConfigure.d.ts +4 -0
- package/dist/es/connectors/useConfigure.js +7 -0
- package/dist/es/connectors/useCurrentRefinements.d.ts +4 -0
- package/dist/es/connectors/useCurrentRefinements.js +5 -0
- package/dist/es/connectors/useDynamicWidgets.d.ts +4 -0
- package/dist/es/connectors/useDynamicWidgets.js +15 -0
- package/dist/es/connectors/useGeoSearch.d.ts +6 -0
- package/dist/es/connectors/useGeoSearch.js +5 -0
- package/dist/es/connectors/useHierarchicalMenu.d.ts +4 -0
- package/dist/es/connectors/useHierarchicalMenu.js +5 -0
- package/dist/es/connectors/useHits.d.ts +5 -0
- package/dist/es/connectors/useHits.js +5 -0
- package/dist/es/connectors/useHitsPerPage.d.ts +4 -0
- package/dist/es/connectors/useHitsPerPage.js +5 -0
- package/dist/es/connectors/useInfiniteHits.d.ts +5 -0
- package/dist/es/connectors/useInfiniteHits.js +5 -0
- package/dist/es/connectors/useMenu.d.ts +4 -0
- package/dist/es/connectors/useMenu.js +5 -0
- package/dist/es/connectors/useNumericMenu.d.ts +4 -0
- package/dist/es/connectors/useNumericMenu.js +5 -0
- package/dist/es/connectors/usePagination.d.ts +4 -0
- package/dist/es/connectors/usePagination.js +5 -0
- package/dist/es/connectors/usePoweredBy.d.ts +2 -0
- package/dist/es/connectors/usePoweredBy.js +15 -0
- package/dist/es/connectors/useQueryRules.d.ts +4 -0
- package/dist/es/connectors/useQueryRules.js +5 -0
- package/dist/es/connectors/useRange.d.ts +4 -0
- package/dist/es/connectors/useRange.js +5 -0
- package/dist/es/connectors/useRefinementList.d.ts +4 -0
- package/dist/es/connectors/useRefinementList.js +5 -0
- package/dist/es/connectors/useSearchBox.d.ts +4 -0
- package/dist/es/connectors/useSearchBox.js +5 -0
- package/dist/es/connectors/useSortBy.d.ts +4 -0
- package/dist/es/connectors/useSortBy.js +5 -0
- package/dist/es/connectors/useStats.d.ts +4 -0
- package/dist/es/connectors/useStats.js +5 -0
- package/dist/es/connectors/useToggleRefinement.d.ts +4 -0
- package/dist/es/connectors/useToggleRefinement.js +5 -0
- package/dist/es/hooks/useConnector.d.ts +3 -0
- package/dist/es/hooks/useConnector.js +130 -0
- package/dist/es/hooks/useInstantSearch.d.ts +32 -0
- package/dist/es/hooks/useInstantSearch.js +52 -0
- package/dist/es/index.d.ts +31 -0
- package/dist/es/index.js +31 -86
- package/dist/es/lib/IndexContext.d.ts +3 -0
- package/dist/es/lib/IndexContext.js +5 -0
- package/dist/es/lib/InstantSearchContext.d.ts +3 -0
- package/dist/es/lib/InstantSearchContext.js +5 -0
- package/dist/es/lib/InstantSearchSSRContext.d.ts +8 -0
- package/dist/es/lib/InstantSearchSSRContext.js +5 -0
- package/dist/es/lib/createSearchResults.d.ts +3 -0
- package/dist/es/lib/createSearchResults.js +20 -0
- package/dist/es/lib/dequal.d.ts +1 -0
- package/dist/es/lib/dequal.js +47 -0
- package/dist/es/lib/getIndexSearchResults.d.ts +9 -0
- package/dist/es/lib/getIndexSearchResults.js +26 -0
- package/dist/es/lib/invariant.d.ts +9 -0
- package/dist/es/lib/invariant.js +19 -0
- package/dist/es/lib/noop.d.ts +1 -0
- package/dist/es/lib/noop.js +1 -0
- package/dist/es/lib/useForceUpdate.d.ts +6 -0
- package/dist/es/lib/useForceUpdate.js +20 -0
- package/dist/es/lib/useIndex.d.ts +3 -0
- package/dist/es/lib/useIndex.js +31 -0
- package/dist/es/lib/useIndexContext.d.ts +2 -0
- package/dist/es/lib/useIndexContext.js +8 -0
- package/dist/es/lib/useInstantSearchApi.d.ts +21 -0
- package/dist/es/lib/useInstantSearchApi.js +184 -0
- package/dist/es/lib/useInstantSearchContext.d.ts +3 -0
- package/dist/es/lib/useInstantSearchContext.js +8 -0
- package/dist/es/lib/useInstantSearchSSRContext.d.ts +3 -0
- package/dist/es/lib/useInstantSearchSSRContext.js +5 -0
- package/dist/es/lib/useInstantSearchServerContext.d.ts +3 -0
- package/dist/es/lib/useInstantSearchServerContext.js +5 -0
- package/dist/es/lib/useIsomorphicLayoutEffect.d.ts +7 -0
- package/dist/es/lib/useIsomorphicLayoutEffect.js +8 -0
- package/dist/es/lib/useSearchResults.d.ts +7 -0
- package/dist/es/lib/useSearchResults.js +40 -0
- package/dist/es/lib/useSearchState.d.ts +8 -0
- package/dist/es/lib/useSearchState.js +42 -0
- package/dist/es/lib/useStableValue.d.ts +1 -0
- package/dist/es/lib/useStableValue.js +20 -0
- package/dist/es/lib/useWidget.d.ts +8 -0
- package/dist/es/lib/useWidget.js +72 -0
- package/dist/es/lib/warn.d.ts +10 -0
- package/dist/es/lib/warn.js +33 -0
- package/dist/es/server/getServerState.d.ts +10 -0
- package/dist/es/server/getServerState.js +86 -0
- package/dist/es/server/index.d.ts +1 -0
- package/dist/es/server/index.js +1 -0
- package/dist/es/version.d.ts +2 -0
- package/dist/es/version.js +1 -0
- package/dist/umd/ReactInstantSearchCore.js +16316 -10183
- package/dist/umd/ReactInstantSearchCore.js.map +1 -1
- package/dist/umd/ReactInstantSearchCore.min.js +1 -1
- package/dist/umd/ReactInstantSearchCore.min.js.map +1 -1
- package/package.json +24 -9
- package/dist/cjs/connectors/connectAutoComplete.js +0 -104
- package/dist/cjs/connectors/connectBreadcrumb.js +0 -123
- package/dist/cjs/connectors/connectConfigureRelatedItems.js +0 -127
- package/dist/cjs/connectors/connectCurrentRefinements.js +0 -69
- package/dist/cjs/connectors/connectDynamicWidgets.js +0 -65
- package/dist/cjs/connectors/connectGeoSearch.js +0 -189
- package/dist/cjs/connectors/connectHierarchicalMenu.js +0 -273
- package/dist/cjs/connectors/connectHighlight.js +0 -87
- package/dist/cjs/connectors/connectHitInsights.js +0 -76
- package/dist/cjs/connectors/connectHits.js +0 -88
- package/dist/cjs/connectors/connectHitsPerPage.js +0 -97
- package/dist/cjs/connectors/connectInfiniteHits.js +0 -154
- package/dist/cjs/connectors/connectMenu.js +0 -221
- package/dist/cjs/connectors/connectNumericMenu.js +0 -215
- package/dist/cjs/connectors/connectPagination.js +0 -94
- package/dist/cjs/connectors/connectPoweredBy.js +0 -27
- package/dist/cjs/connectors/connectQueryRules.js +0 -129
- package/dist/cjs/connectors/connectRange.js +0 -287
- package/dist/cjs/connectors/connectRefinementList.js +0 -243
- package/dist/cjs/connectors/connectRelevantSort.js +0 -56
- package/dist/cjs/connectors/connectScrollTo.js +0 -70
- package/dist/cjs/connectors/connectSearchBox.js +0 -104
- package/dist/cjs/connectors/connectSortBy.js +0 -100
- package/dist/cjs/connectors/connectStateResults.js +0 -79
- package/dist/cjs/connectors/connectStats.js +0 -39
- package/dist/cjs/connectors/connectToggleRefinement.js +0 -163
- package/dist/cjs/connectors/connectVoiceSearch.js +0 -124
- package/dist/cjs/core/context.js +0 -37
- package/dist/cjs/core/createConnector.js +0 -268
- package/dist/cjs/core/createInstantSearchManager.d.js +0 -1
- package/dist/cjs/core/createInstantSearchManager.js +0 -541
- package/dist/cjs/core/createStore.js +0 -27
- package/dist/cjs/core/createWidgetsManager.js +0 -39
- package/dist/cjs/core/highlight.js +0 -102
- package/dist/cjs/core/indexUtils.js +0 -214
- package/dist/cjs/core/metadata.js +0 -46
- package/dist/cjs/core/translatable.js +0 -82
- package/dist/cjs/core/utils.js +0 -161
- package/dist/cjs/types/algoliasearch.js +0 -1
- package/dist/cjs/types/translatable.js +0 -1
- package/dist/cjs/widgets/Configure.js +0 -48
- package/dist/cjs/widgets/ConfigureRelatedItems.js +0 -21
- package/dist/cjs/widgets/DynamicWidgets.js +0 -61
- package/dist/cjs/widgets/Index.js +0 -149
- package/dist/cjs/widgets/InstantSearch.js +0 -251
- package/dist/cjs/widgets/QueryRuleContext.js +0 -14
- package/dist/es/connectors/connectAutoComplete.js +0 -96
- package/dist/es/connectors/connectBreadcrumb.js +0 -115
- package/dist/es/connectors/connectConfigureRelatedItems.js +0 -121
- package/dist/es/connectors/connectCurrentRefinements.js +0 -62
- package/dist/es/connectors/connectDynamicWidgets.js +0 -56
- package/dist/es/connectors/connectGeoSearch.js +0 -182
- package/dist/es/connectors/connectHierarchicalMenu.js +0 -264
- package/dist/es/connectors/connectHighlight.js +0 -79
- package/dist/es/connectors/connectHitInsights.js +0 -69
- package/dist/es/connectors/connectHits.js +0 -81
- package/dist/es/connectors/connectHitsPerPage.js +0 -89
- package/dist/es/connectors/connectInfiniteHits.js +0 -146
- package/dist/es/connectors/connectMenu.js +0 -213
- package/dist/es/connectors/connectNumericMenu.js +0 -207
- package/dist/es/connectors/connectPagination.js +0 -86
- package/dist/es/connectors/connectPoweredBy.js +0 -20
- package/dist/es/connectors/connectQueryRules.js +0 -122
- package/dist/es/connectors/connectRange.js +0 -280
- package/dist/es/connectors/connectRefinementList.js +0 -235
- package/dist/es/connectors/connectRelevantSort.js +0 -50
- package/dist/es/connectors/connectScrollTo.js +0 -63
- package/dist/es/connectors/connectSearchBox.js +0 -96
- package/dist/es/connectors/connectSortBy.js +0 -92
- package/dist/es/connectors/connectStateResults.js +0 -72
- package/dist/es/connectors/connectStats.js +0 -32
- package/dist/es/connectors/connectToggleRefinement.js +0 -155
- package/dist/es/connectors/connectVoiceSearch.js +0 -116
- package/dist/es/core/context.js +0 -28
- package/dist/es/core/createConnector.js +0 -257
- package/dist/es/core/createInstantSearchManager.d.js +0 -0
- package/dist/es/core/createInstantSearchManager.js +0 -534
- package/dist/es/core/createStore.js +0 -21
- package/dist/es/core/createWidgetsManager.js +0 -33
- package/dist/es/core/highlight.js +0 -94
- package/dist/es/core/indexUtils.js +0 -203
- package/dist/es/core/metadata.js +0 -38
- package/dist/es/core/translatable.js +0 -74
- package/dist/es/core/utils.js +0 -139
- package/dist/es/core/version.js +0 -1
- package/dist/es/types/algoliasearch.js +0 -1
- package/dist/es/types/index.js +0 -1
- package/dist/es/types/translatable.js +0 -1
- package/dist/es/widgets/Configure.js +0 -42
- package/dist/es/widgets/ConfigureRelatedItems.js +0 -13
- package/dist/es/widgets/DynamicWidgets.js +0 -51
- package/dist/es/widgets/Index.js +0 -138
- package/dist/es/widgets/InstantSearch.js +0 -241
- package/dist/es/widgets/QueryRuleContext.js +0 -6
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! React InstantSearchCore UNRELEASED | © Algolia, inc. | https://github.com/algolia/instantsearch.js */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e=e||self).ReactInstantSearchCore={},e.React)}(this,function(e,a){"use strict";var o="default"in a?a.default:a;function H(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function I(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?H(Object(n),!0).forEach(function(e){_(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function M(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,J(r.key),r)}}function $(e,t,n){t&&M(e.prototype,t),n&&M(e,n),Object.defineProperty(e,"prototype",{writable:!1})}function _(e,t,n){return(t=J(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(){return(D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function Q(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&L(e,t)}function B(e){return(B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function L(e,t){return(L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function O(e,t){if(null==e)return{};var n,r=function(e,t){if(null==e)return{};for(var n,r={},i=Object.keys(e),a=0;a<i.length;a++)n=i[a],0<=t.indexOf(n)||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols)for(var i=Object.getOwnPropertySymbols(e),a=0;a<i.length;a++)n=i[a],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function q(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=B(n),t=(e=r?(e=B(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return c(t)}}function U(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,s,o=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}(e,t)||W(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 m(e){return function(e){if(Array.isArray(e))return z(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||W(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function W(e,t){var n;if(e)return"string"==typeof e?z(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?z(e,t):void 0}function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function J(e){e=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!=typeof(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"==typeof e?e:String(e)}var Y="undefined"!=typeof Element,G="function"==typeof Map,K="function"==typeof Set,X="function"==typeof ArrayBuffer;function Z(e){ie.then(e)}var ee=function(e,t){try{return function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,i,a,s;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1}else if(G&&t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(s=t.entries();!(i=s.next()).done;)if(!n.has(i.value[0]))return!1;for(s=t.entries();!(i=s.next()).done;)if(!e(i.value[1],n.get(i.value[0])))return!1}else if(K&&t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(s=t.entries();!(i=s.next()).done;)if(!n.has(i.value[0]))return!1}else if(X&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(t[i]!==n[i])return!1}else{if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(a=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;if(Y&&t instanceof Element)return!1;for(i=r;0!=i--;)if(!("_owner"===a[i]&&t.$$typeof||e(t[a[i]],n[a[i]])))return!1}return!0}return t!=t&&n!=n}(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}},te=Object.prototype.hasOwnProperty,ne=function(e,t){if(e!==t){var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!te.call(t,n[i])||e[n[i]]!==t[n[i]])return!1}return!0},re=function(e){return e.displayName||e.name||"UnknownComponent"},ie=Promise.resolve(),ae=function r(i){return Object.keys(i).forEach(function(e){var t,n=i[e];"object"!==s(t=n)||null===t||Array.isArray(t)||(ue(n)?r(n):delete i[e])}),i};function se(e,n,r){return e.map(function(e,t){return I(I({},e),{},{__position:n*r+t+1})})}function oe(e,t){return t?e.map(function(e){return I(I({},e),{},{__queryID:t})}):e}function ce(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}function ue(e){return e&&0<Object.keys(e).length}function l(e,t){if(null==e)return{};for(var n={},r=Object.keys(e),i=0;i<r.length;i++){var a=r[i];0<=t.indexOf(a)||(n[a]=e[a])}return n}var le=function(e,t){return(Array.isArray(t)?t:t.replace(/\[(\d+)]/g,".$1").split(".")).reduce(function(e,t){return e?e[t]:void 0},e)};function fe(e){return e.replace(/^\\-/,"-")}var he=a.createContext({onInternalStateUpdate:function(){},createHrefForState:function(){return"#"},onSearchForFacetValues:function(){},onSearchStateChange:function(){},onSearchParameters:function(){},store:{},widgetsManager:{},mainTargetedIndex:""}),de=he.Consumer,me=he.Provider,pe=a.createContext(void 0),ge=pe.Consumer,xe=pe.Provider,ve=["contextValue"];function t(n){return function(e,t){var r=function(u){var r;if(u.displayName)return r="function"==typeof u.getSearchParameters||"function"==typeof u.getMetadata||"function"==typeof u.transitionState,function(i){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},t=function(){Q(n,a.Component);var t=q(n);function n(e){var i;return k(this,n),_(c(i=t.call(this,e)),"unsubscribe",void 0),_(c(i),"unregisterWidget",void 0),_(c(i),"cleanupTimerRef",null),_(c(i),"isUnmounting",!1),_(c(i),"state",{providedProps:i.getProvidedProps(i.props)}),_(c(i),"refine",function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];i.props.contextValue.onInternalStateUpdate((e=u.refine).call.apply(e,[c(i),i.props,i.props.contextValue.store.getState().widgets].concat(n)))}),_(c(i),"createURL",function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return i.props.contextValue.createHrefForState((e=u.refine).call.apply(e,[c(i),i.props,i.props.contextValue.store.getState().widgets].concat(n)))}),_(c(i),"searchForFacetValues",function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];i.props.contextValue.onSearchForFacetValues((e=u.searchForFacetValues).call.apply(e,[c(i),i.props,i.props.contextValue.store.getState().widgets].concat(n)))}),u.getSearchParameters&&i.props.contextValue.onSearchParameters(u.getSearchParameters.bind(c(i)),{ais:i.props.contextValue,multiIndexContext:i.props.indexContextValue},i.props,u.getMetadata&&u.getMetadata.bind(c(i)),u.displayName),i}return $(n,[{key:"componentDidMount",value:function(){var e=this;this.cleanupTimerRef&&(clearTimeout(this.cleanupTimerRef),this.cleanupTimerRef=null),this.unsubscribe=this.props.contextValue.store.subscribe(function(){e.isUnmounting||e.setState({providedProps:e.getProvidedProps(e.props)})}),r&&(this.unregisterWidget=this.props.contextValue.widgetsManager.registerWidget(this))}},{key:"shouldComponentUpdate",value:function(e,t){return"function"==typeof u.shouldComponentUpdate?u.shouldComponentUpdate.call(this,this.props,e,this.state,t):(e=ne(this.props,e),null===this.state.providedProps||null===t.providedProps?this.state.providedProps!==t.providedProps||!e:!e||!ne(this.state.providedProps,t.providedProps))}},{key:"componentDidUpdate",value:function(e){ee(e,this.props)||(this.setState({providedProps:this.getProvidedProps(this.props)}),r&&(this.props.contextValue.widgetsManager.update(),"function"==typeof u.transitionState)&&this.props.contextValue.onSearchStateChange(u.transitionState.call(this,this.props,this.props.contextValue.store.getState().widgets,this.props.contextValue.store.getState().widgets)))}},{key:"componentWillUnmount",value:function(){var t=this;this.cleanupTimerRef=setTimeout(function(){var e;t.isUnmounting=!0,t.unsubscribe&&t.unsubscribe(),t.unregisterWidget&&(t.unregisterWidget(),"function"==typeof u.cleanUp)&&(e=u.cleanUp.call(t,t.props,t.props.contextValue.store.getState().widgets),t.props.contextValue.store.setState(I(I({},t.props.contextValue.store.getState()),{},{widgets:e})),t.props.contextValue.onSearchStateChange(ae(e)))})}},{key:"getProvidedProps",value:function(e){var t=this.props.contextValue.store.getState(),n=t.widgets,r=t.results,i=t.resultsFacetValues,a=t.searching,s=t.searchingForFacetValues,o=t.isSearchStalled,c=t.metadata,t=t.error;return u.getProvidedProps.call(this,e,n,{results:r,searching:a,searchingForFacetValues:s,isSearchStalled:o,error:t},c,i)}},{key:"getSearchParameters",value:function(e){return"function"==typeof u.getSearchParameters?u.getSearchParameters.call(this,e,this.props,this.props.contextValue.store.getState().widgets):null}},{key:"getMetadata",value:function(e){return"function"==typeof u.getMetadata?u.getMetadata.call(this,this.props,e):{}}},{key:"transitionState",value:function(e,t){return"function"==typeof u.transitionState?u.transitionState.call(this,this.props,e,t):t}},{key:"render",value:function(){var e,t,n=this.props,n=(n.contextValue,O(n,ve)),r=this.state.providedProps;return null===r?null:(e="function"==typeof u.refine?{refine:this.refine,createURL:this.createURL}:{},t="function"==typeof u.searchForFacetValues?{searchForItems:this.searchForFacetValues}:{},o.createElement(i,D({},n,r,e,t)))}}]),n}();return _(t,"displayName","".concat(u.displayName,"(").concat(re(i),")")),_(t,"$$type",u.$$type),_(t,"$$widgetType",e.$$widgetType),_(t,"defaultProps",u.defaultProps),_(t,"_connectorDesc",u),t};throw new Error("`createConnector` requires you to provide a `displayName` property.")}(n)(e,t);return function(n){return o.createElement(de,null,function(t){return o.createElement(ge,null,function(e){return o.createElement(r,D({contextValue:t,indexContextValue:e},n))})})}}}var ye={highlightPreTag:"<ais-highlight-0000000000>",highlightPostTag:"</ais-highlight-0000000000>"};function Re(e){var t,n=e.preTag,r=e.postTag,e=e.highlightedValue,e=(void 0===e?"":e).split(n),i=e.shift(),a=""===i?[]:[{value:i,isHighlighted:!1}];return r===n?(t=!0,e.forEach(function(e){a.push({value:e,isHighlighted:t}),t=!t})):e.forEach(function(e){e=e.split(r);a.push({value:e[0],isHighlighted:!0}),""!==e[1]&&a.push({value:e[1],isHighlighted:!1})}),a}var be="6.40.3";function h(e){return d(e)?e.multiIndexContext.targetedIndex:e.ais.mainTargetedIndex}function p(e,t){if(e.results){if(e.results.hits)return e.results;t=h(t);if(e.results[t])return e.results[t]}return null}function d(e){return e&&e.multiIndexContext}function g(t,e,n,r,i){var a,s,o,c,u,l,f;return d(n)?(n=h(n),i?(o=e,c=n,l=i,u=(u=r)?{page:1}:void 0,f=(s=t).indices&&s.indices[c]?I(I({},s.indices),{},_({},c,I(I({},s.indices[c]),{},(_(f={},l,I(I({},s.indices[c][l]),o)),_(f,"page",1),f)))):I(I({},s.indices),{},_({},c,I(_({},l,o),u))),I(I({},s),{},{indices:f})):(c=e,l=n,o=(o=r)?{page:1}:void 0,l=(u=t).indices&&u.indices[l]?I(I({},u.indices),{},_({},l,I(I(I({},u.indices[l]),c),o))):I(I({},u.indices),{},_({},l,I(I({},c),o))),I(I({},u),{},{indices:l}))):(t.indices&&r&&Object.keys(t.indices).forEach(function(e){t=g(t,{page:1},{multiIndexContext:{targetedIndex:e}},!0,i)}),i?(s=e,f=i,n=(n=r)?{page:1}:void 0,I(I({},a=t),{},_({},f,I(I({},a[f]),s)),n)):(a=e,n=(n=r)?{page:1}:void 0,I(I(I({},t),a),n)))}function Fe(e){e=e.match(/^([^.]*)\.(.*)/);return{namespace:e&&e[1],attributeName:e&&e[2]}}function u(e,t,n,r,i){var a,s=h(n),o=Fe(r),c=o.namespace,o=o.attributeName,n={multiIndex:d(n),indexId:s,namespace:c,attributeName:o,id:r,searchState:t};return c=(s=n).multiIndex,o=s.indexId,r=s.namespace,t=s.attributeName,a=s.id,s=s.searchState,(c&&r?s.indices&&s.indices[o]&&s.indices[o][r]&&Object.hasOwnProperty.call(s.indices[o][r],t):c?s.indices&&s.indices[o]&&Object.hasOwnProperty.call(s.indices[o],a):r?s[r]&&Object.hasOwnProperty.call(s[r],t):Object.hasOwnProperty.call(s,a))?(o=(c=n).multiIndex,r=c.indexId,t=c.namespace,s=c.attributeName,a=c.id,c=c.searchState,o&&t?c.indices[r][t][s]:o?c.indices[r][a]:t?c[t][s]:c[a]):e.defaultRefinement||i}function r(e,t,n){var r,i,a,s,o=h(t),c=Fe(n),u=c.namespace,c=c.attributeName;return d(t)&&Boolean(e.indices)?(o=(t={attribute:c,searchState:e,indexId:o,id:n,namespace:u}).searchState,i=t.indexId,r=t.id,s=t.namespace,t=t.attribute,a=o.indices[i],s&&a?I(I({},o),{},{indices:I(I({},o.indices),{},_({},i,I(I({},a),{},_({},s,l(a[s],[t])))))}):a?I(I({},o),{},{indices:I(I({},o.indices),{},_({},i,l(a,[r])))}):o):(t=(s={attribute:c,searchState:e,id:n,namespace:u}).searchState,i=s.id,a=s.namespace,s=s.attribute,a?I(I({},t),{},_({},a,l(t[a],[s]))):l(t,[i]))}var Pe=["children","contextValue","indexContextValue"],Ce=["children","contextValue","indexContextValue"];function Se(){return"configure"}var pe=t({displayName:"AlgoliaConfigure",$$type:"ais.configure",getProvidedProps:function(){return{}},getSearchParameters:function(e,t){t.children,t.contextValue,t.indexContextValue;t=O(t,Pe);return e.setQueryParameters(t)},transitionState:function(e,t,n){var r=Se(),i=(e.children,e.contextValue,e.indexContextValue,O(e,Ce)),a=Object.keys(e),s=this._props?Object.keys(this._props).filter(function(e){return-1===a.indexOf(e)}):[];return this._props=e,g(n,_({},r,I(I({},l(n[r],s)),i)),{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(n,e){var r=Se(),t=h({ais:n.contextValue,multiIndexContext:n.indexContextValue}),i=d({ais:n.contextValue,multiIndexContext:n.indexContextValue})&&e.indices?e.indices[t]:e,t=(i&&i[r]?Object.keys(i[r]):[]).reduce(function(e,t){return n[t]||(e[t]=i[r][t]),e},{});return g(e,_({},r,t),{ais:n.contextValue,multiIndexContext:n.indexContextValue})}}),Ve=pe(function(){return null},{$$widgetType:"ais.configure"});function we(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function je(e,t){var n,r;if(e!==t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&"__proto__"!==i&&"constructor"!==i&&(n=t[i],void 0!==(r=e[i])&&void 0===n||(we(r)&&we(n)?e[i]=je(r,n):e[i]="object"==typeof(r=n)&&null!==r?je(Array.isArray(r)?[]:{},r):r));return e}function x(){return Array.prototype.slice.call(arguments).reduceRight(function(t,n){return Object.keys(Object(n)).forEach(function(e){void 0!==n[e]&&(void 0!==t[e]&&delete t[e],t[e]=n[e])}),t},{})}var v=function(e){we(e)||(e={});for(var t=1,n=arguments.length;t<n;t++){var r=arguments[t];we(r)&&je(e,r)}return e};var Ie=function(n,r){return n.filter(function(e,t){return-1<r.indexOf(e)&&n.indexOf(e)===t})},y=function(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]};var _e=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw new Error("The value should be a number, a parsable string or an array of those.")};var Oe=function(e,t){if(null===e)return{};for(var n,r={},i=Object.keys(e),a=0;a<i.length;a++)n=i[a],0<=t.indexOf(n)||(r[n]=e[n]);return r};var Ee=function(e){return e&&0<Object.keys(e).length},i={addRefinement:function(e,t,n){var r;return i.isRefined(e,t,n)?e:(n=""+n,n=e[t]?e[t].concat(n):[n],(r={})[t]=n,x({},r,e))},removeRefinement:function(e,n,t){var r;return void 0===t?i.clearRefinement(e,function(e,t){return n===t}):(r=""+t,i.clearRefinement(e,function(e,t){return n===t&&r===e}))},toggleRefinement:function(e,t,n){if(void 0===n)throw new Error("toggleRefinement should be used with a value");return i.isRefined(e,t,n)?i.removeRefinement(e,t,n):i.addRefinement(e,t,n)},clearRefinement:function(i,a,s){var o,e;return void 0===a?Ee(i)?{}:i:"string"==typeof a?Oe(i,[a]):"function"==typeof a?(o=!1,e=Object.keys(i).reduce(function(e,t){var n=i[t]||[],r=n.filter(function(e){return!a(e,t,s)});return r.length!==n.length&&(o=!0),e[t]=r,e},{}),o?e:i):void 0},isRefined:function(e,t,n){var r=Boolean(e[t])&&0<e[t].length;return void 0!==n&&r?-1!==e[t].indexOf(""+n):r}},n=i;function Ae(e,n){return Array.isArray(e)&&Array.isArray(n)?e.length===n.length&&e.every(function(e,t){return Ae(n[t],e)}):e===n}function f(e){var r=e?f._parseNumbers(e):{},i=(void 0===r.userToken||null!==(e=r.userToken)&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=r.facets||[],this.disjunctiveFacets=r.disjunctiveFacets||[],this.hierarchicalFacets=r.hierarchicalFacets||[],this.facetsRefinements=r.facetsRefinements||{},this.facetsExcludes=r.facetsExcludes||{},this.disjunctiveFacetsRefinements=r.disjunctiveFacetsRefinements||{},this.numericRefinements=r.numericRefinements||{},this.tagRefinements=r.tagRefinements||[],this.hierarchicalFacetsRefinements=r.hierarchicalFacetsRefinements||{},this);Object.keys(r).forEach(function(e){var t=-1!==f.PARAMETERS.indexOf(e),n=void 0!==r[e];!t&&n&&(i[e]=r[e])})}f.PARAMETERS=Object.keys(new f),f._parseNumbers=function(i){var r,a;return i instanceof f?i:(r={},["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach(function(e){var t,n=i[e];"string"==typeof n&&(t=parseFloat(n),r[e]=isNaN(t)?n:t)}),Array.isArray(i.insideBoundingBox)&&(r.insideBoundingBox=i.insideBoundingBox.map(function(e){return Array.isArray(e)?e.map(function(e){return parseFloat(e)}):e})),i.numericRefinements&&(a={},Object.keys(i.numericRefinements).forEach(function(n){var r=i.numericRefinements[n]||{};a[n]={},Object.keys(r).forEach(function(e){var t=r[e].map(function(e){return Array.isArray(e)?e.map(function(e){return"string"==typeof e?parseFloat(e):e}):"string"==typeof e?parseFloat(e):e});a[n][e]=t})}),r.numericRefinements=a),v({},i,r))},f.make=function(e){var n=new f(e);return(e.hierarchicalFacets||[]).forEach(function(e){var t;e.rootPath&&0===(t=(n=0<(t=n.getHierarchicalRefinement(e.name)).length&&0!==t[0].indexOf(e.rootPath)?n.clearRefinements(e.name):n).getHierarchicalRefinement(e.name)).length&&(n=n.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}),n},f.validate=function(e,t){t=t||{};return e.tagFilters&&t.tagRefinements&&0<t.tagRefinements.length?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):0<e.tagRefinements.length&&t.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&t.numericRefinements&&Ee(t.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):Ee(e.numericRefinements)&&t.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},f.prototype={constructor:f,clearRefinements:function(e){e={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:n.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:n.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:n.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:n.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return e.numericRefinements===this.numericRefinements&&e.facetsRefinements===this.facetsRefinements&&e.facetsExcludes===this.facetsExcludes&&e.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&e.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(e)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,n){var r,n=_e(n);return this.isNumericRefined(e,t,n)?this:((r=v({},this.numericRefinements))[e]=v({},r[e]),r[e][t]?(r[e][t]=r[e][t].slice(),r[e][t].push(n)):r[e][t]=[n],this.setQueryParameters({numericRefinements:r}))},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(n,r,e){var i=e;return void 0!==i?this.isNumericRefined(n,r,i)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(e,t){return t===n&&e.op===r&&Ae(e.val,_e(i))})}):this:void 0!==r?this.isNumericRefined(n,r)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(e,t){return t===n&&e.op===r})}):this:this.isNumericRefined(n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(e,t){return t===n})}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(s){var o,t,e;return void 0===s?Ee(this.numericRefinements)?{}:this.numericRefinements:"string"==typeof s?Oe(this.numericRefinements,[s]):"function"==typeof s?(o=!1,t=this.numericRefinements,e=Object.keys(t).reduce(function(e,r){var i=t[r],a={},i=i||{};return Object.keys(i).forEach(function(t){var e=i[t]||[],n=[];e.forEach(function(e){s({val:e,op:t},r,"numeric")||n.push(e)}),n.length!==e.length&&(o=!0),a[t]=n}),e[r]=a,e},{}),o?e:this.numericRefinements):void 0},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(this.isConjunctiveFacet(e))return n.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:n.addRefinement(this.facetsRefinements,e,t)});throw new Error(e+" is not defined in the facets attribute of the helper configuration")},addExcludeRefinement:function(e,t){if(this.isConjunctiveFacet(e))return n.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:n.addRefinement(this.facetsExcludes,e,t)});throw new Error(e+" is not defined in the facets attribute of the helper configuration")},addDisjunctiveFacetRefinement:function(e,t){if(this.isDisjunctiveFacet(e))return n.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:n.addRefinement(this.disjunctiveFacetsRefinements,e,t)});throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration")},addTagRefinement:function(e){return this.isTagRefined(e)?this:(e={tagRefinements:this.tagRefinements.concat(e)},this.setQueryParameters(e))},removeFacet:function(t){return this.isConjunctiveFacet(t)?this.clearRefinements(t).setQueryParameters({facets:this.facets.filter(function(e){return e!==t})}):this},removeDisjunctiveFacet:function(t){return this.isDisjunctiveFacet(t)?this.clearRefinements(t).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter(function(e){return e!==t})}):this},removeHierarchicalFacet:function(t){return this.isHierarchicalFacet(t)?this.clearRefinements(t).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter(function(e){return e.name!==t})}):this},removeFacetRefinement:function(e,t){if(this.isConjunctiveFacet(e))return n.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:n.removeRefinement(this.facetsRefinements,e,t)}):this;throw new Error(e+" is not defined in the facets attribute of the helper configuration")},removeExcludeRefinement:function(e,t){if(this.isConjunctiveFacet(e))return n.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:n.removeRefinement(this.facetsExcludes,e,t)}):this;throw new Error(e+" is not defined in the facets attribute of the helper configuration")},removeDisjunctiveFacetRefinement:function(e,t){if(this.isDisjunctiveFacet(e))return n.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:n.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this;throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration")},removeTagRefinement:function(t){var e;return this.isTagRefined(t)?(e={tagRefinements:this.tagRefinements.filter(function(e){return e!==t})},this.setQueryParameters(e)):this},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(this.isConjunctiveFacet(e))return this.setQueryParameters({facetsRefinements:n.toggleRefinement(this.facetsRefinements,e,t)});throw new Error(e+" is not defined in the facets attribute of the helper configuration")},toggleExcludeFacetRefinement:function(e,t){if(this.isConjunctiveFacet(e))return this.setQueryParameters({facetsExcludes:n.toggleRefinement(this.facetsExcludes,e,t)});throw new Error(e+" is not defined in the facets attribute of the helper configuration")},toggleDisjunctiveFacetRefinement:function(e,t){if(this.isDisjunctiveFacet(e))return this.setQueryParameters({disjunctiveFacetsRefinements:n.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)});throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration")},toggleHierarchicalFacetRefinement:function(e,t){var n,r;if(this.isHierarchicalFacet(e))return n=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),r={},void 0!==this.hierarchicalFacetsRefinements[e]&&0<this.hierarchicalFacetsRefinements[e].length&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+n))?-1===t.indexOf(n)?r[e]=[]:r[e]=[t.slice(0,t.lastIndexOf(n))]:r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:x({},r,this.hierarchicalFacetsRefinements)});throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration")},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");var n;if(this.isHierarchicalFacet(e))return(n={})[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:x({},n,this.hierarchicalFacetsRefinements)});throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.")},removeHierarchicalFacetRefinement:function(e){var t;return this.isHierarchicalFacetRefined(e)?((t={})[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:x({},t,this.hierarchicalFacetsRefinements)})):this},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return-1<this.disjunctiveFacets.indexOf(e)},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return-1<this.facets.indexOf(e)},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&n.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&n.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&n.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){return!!this.isHierarchicalFacet(e)&&(e=this.getHierarchicalRefinement(e),t?-1!==e.indexOf(t):0<e.length)},isNumericRefined:function(e,t,n){var r,i;return void 0===n&&void 0===t?Boolean(this.numericRefinements[e]):(r=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t],void 0!==n&&r?(n=_e(n),t=void 0!==(e=this.numericRefinements[e][t],i=n,y(e,function(e){return Ae(e,i)})),r&&t):r)},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var t=this,e=Ie(Object.keys(this.numericRefinements).filter(function(e){return 0<Object.keys(t.numericRefinements[e]).length}),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter(function(e){return 0<t.disjunctiveFacetsRefinements[e].length}).concat(e).concat(this.getRefinedHierarchicalFacets())},getRefinedHierarchicalFacets:function(){var t=this;return Ie(this.hierarchicalFacets.map(function(e){return e.name}),Object.keys(this.hierarchicalFacetsRefinements).filter(function(e){return 0<t.hierarchicalFacetsRefinements[e].length}))},getUnrefinedDisjunctiveFacets:function(){var t=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter(function(e){return-1===t.indexOf(e)})},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var n=this.managedParameters,r={},i=this;return Object.keys(this).forEach(function(e){var t=i[e];-1===n.indexOf(e)&&void 0!==t&&(r[e]=t)}),r},setQueryParameter:function(e,t){var n;return this[e]===t?this:((n={})[e]=t,this.setQueryParameters(n))},setQueryParameters:function(e){if(!e)return this;var t=f.validate(this,e);if(t)throw t;var n=this,i=f._parseNumbers(e),t=Object.keys(this).reduce(function(e,t){return e[t]=n[t],e},{}),e=Object.keys(i).reduce(function(e,t){var n=void 0!==e[t],r=void 0!==i[t];return n&&!r?Oe(e,[t]):(r&&(e[t]=i[t]),e)},t);return new this.constructor(e)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(t){return y(this.hierarchicalFacets,function(e){return e.name===t})},getHierarchicalFacetBreadcrumb:function(e){var t;return this.isHierarchicalFacet(e)&&(t=this.getHierarchicalRefinement(e)[0])?(e=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),t.split(e).map(function(e){return e.trim()})):[]},toString:function(){return JSON.stringify(this,null,2)}};var Ne=f;function Te(e){return Array.isArray(e)?e.filter(Boolean):[]}function He(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function ke(e,t){var r=(t||[]).map(function(e){return e.split(":")});return e.reduce(function(e,t){var n=t.split(":"),t=y(r,function(e){return e[0]===n[0]});return 1<n.length||!t?(e[0].push(n[0]),e[1].push(n[1])):(e[0].push(t[0]),e[1].push(t[1])),e},[[],[]])}var Me=function(e,n,i){return Array.isArray(e)?(Array.isArray(i)||(i=[]),(e=e.map(function(t,e){return{criteria:n.map(function(e){return t[e]}),index:e,value:t}})).sort(function(e,t){for(var n=-1;++n<e.criteria.length;){var r=function(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=void 0!==t,a=null===t;if(!a&&t<e||r&&i||!n)return 1;if(!r&&e<t||a&&n||!i)return-1}return 0}(e.criteria[n],t.criteria[n]);if(r)return!(n>=i.length)&&"desc"===i[n]?-r:r}return e.index-t.index}),e.map(function(e){return e.value})):[]};var R=function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},b=function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")},$e=function(m){return function(e,t){function n(e,s,t){var n,o=e;if(0<t){var r=0;for(o=e;r<t;){var i=o&&Array.isArray(o.data)?o.data:[],o=y(i,function(e){return e.isRefined});r++}}return o&&(n=Object.keys(s.data).map(function(e){return[e,s.data[e]]}).filter(function(e){var t,n,r,i,a,e=e[0];return e=e,t=o.path||u,n=f,r=c,a=l,(!(i=u)||0===e.indexOf(i)&&i!==e)&&(!i&&-1===e.indexOf(r)||i&&e.split(r).length-i.split(r).length==1||-1===e.indexOf(r)&&-1===n.indexOf(r)||0===n.indexOf(e)||0===e.indexOf(t+r)&&(a||0===e.indexOf(n)))}),o.data=Me(n.map(function(e){var t,n,r,i,a=e[0],e=e[1];return e=e,a=a,t=c,n=Qe(f),r=s.exhaustive,{name:(i=a.split(t))[i.length-1].trim(),path:a,escapedValue:De(a),count:e,isRefined:n===a||0===n.indexOf(a+t),exhaustive:r,data:null}}),a[0],a[1])),e}var a,c,u,l,f,r=m.hierarchicalFacets[t],i=m.hierarchicalFacetsRefinements[r.name]&&m.hierarchicalFacetsRefinements[r.name][0]||"",s=m._getHierarchicalFacetSeparator(r),o=m._getHierarchicalRootPath(r),h=m._getHierarchicalShowParentLevel(r),r=ke(m._getHierarchicalFacetSortBy(r)),d=e.every(function(e){return e.exhaustive}),r=(a=r,c=s,l=h,f=i,e);return(r=(u=o)?e.slice(o.split(s).length):r).reduce(n,{name:m.hierarchicalFacets[t].name,count:null,isRefined:!0,path:null,escapedValue:null,exhaustive:d,data:null})}},De=R,Qe=b;var Be=R,Le=b;function qe(e){var n={};return e.forEach(function(e,t){n[e]=t}),n}function Ue(e,t,n){t&&t[n]&&(e.stats=t[n])}function F(l,t,n){var o=t[0],f=(this._rawResults=t,this),e=(Object.keys(o).forEach(function(e){f[e]=o[e]}),Object.keys(n||{}).forEach(function(e){f[e]=n[e]}),this.processingTimeMS=t.reduce(function(e,t){return void 0===t.processingTimeMS?e:e+t.processingTimeMS},0),this.disjunctiveFacets=[],this.hierarchicalFacets=l.hierarchicalFacets.map(function(){return[]}),this.facets=[],l.getRefinedDisjunctiveFacets()),c=qe(l.facets),u=qe(l.disjunctiveFacets),r=1,h=o.facets||{};Object.keys(h).forEach(function(e){var t,n,r,i,a=h[e],s=(r=l.hierarchicalFacets,t=e,y(r,function(e){return-1<(e.attributes||[]).indexOf(t)}));s?(r=s.attributes.indexOf(e),n=He(l.hierarchicalFacets,function(e){return e.name===s.name}),f.hierarchicalFacets[n][r]={attribute:e,data:a,exhaustive:o.exhaustiveFacetsCount}):(n=-1!==l.disjunctiveFacets.indexOf(e),r=-1!==l.facets.indexOf(e),n&&(i=u[e],f.disjunctiveFacets[i]={name:e,data:a,exhaustive:o.exhaustiveFacetsCount},Ue(f.disjunctiveFacets[i],o.facets_stats,e)),r&&(i=c[e],f.facets[i]={name:e,data:a,exhaustive:o.exhaustiveFacetsCount},Ue(f.facets[i],o.facets_stats,e)))}),this.hierarchicalFacets=Te(this.hierarchicalFacets),e.forEach(function(e){var i=t[r],a=i&&i.facets?i.facets:{},s=l.getHierarchicalFacetByName(e);Object.keys(a).forEach(function(t){var n,e,r=a[t];s?(n=He(l.hierarchicalFacets,function(e){return e.name===s.name}),-1!==(e=He(f.hierarchicalFacets[n],function(e){return e.attribute===t}))&&(f.hierarchicalFacets[n][e].data=v({},f.hierarchicalFacets[n][e].data,r))):(n=u[t],e=o.facets&&o.facets[t]||{},f.disjunctiveFacets[n]={name:t,data:x({},r,e),exhaustive:i.exhaustiveFacetsCount},Ue(f.disjunctiveFacets[n],i.facets_stats,t),l.disjunctiveFacetsRefinements[t]&&l.disjunctiveFacetsRefinements[t].forEach(function(e){!f.disjunctiveFacets[n].data[e]&&-1<l.disjunctiveFacetsRefinements[t].indexOf(Le(e))&&(f.disjunctiveFacets[n].data[e]=0)}))}),r++}),l.getRefinedHierarchicalFacets().forEach(function(e){var o=l.getHierarchicalFacetByName(e),c=l._getHierarchicalFacetSeparator(o),u=l.getHierarchicalRefinement(e);0===u.length||u[0].split(c).length<2||t.slice(r).forEach(function(e){var s=e&&e.facets?e.facets:{};Object.keys(s).forEach(function(t){var e,n,r=s[t],i=He(l.hierarchicalFacets,function(e){return e.name===o.name}),a=He(f.hierarchicalFacets[i],function(e){return e.attribute===t});-1!==a&&(e={},0<u.length&&(e[n=u[0].split(c)[0]]=f.hierarchicalFacets[i][a].data[n]),f.hierarchicalFacets[i][a].data=x(e,r,f.hierarchicalFacets[i][a].data))}),r++})}),Object.keys(l.facetsExcludes).forEach(function(t){var e=l.facetsExcludes[t],n=c[t];f.facets[n]={name:t,data:h[t],exhaustive:o.exhaustiveFacetsCount},e.forEach(function(e){f.facets[n]=f.facets[n]||{name:t},f.facets[n].data=f.facets[n].data||{},f.facets[n].data[e]=0})}),this.hierarchicalFacets=this.hierarchicalFacets.map($e(l)),this.facets=Te(this.facets),this.disjunctiveFacets=Te(this.disjunctiveFacets),this._state=l}function We(n,r){function e(e){return e.name===r}var i,a,t,s,o,c;return n._state.isConjunctiveFacet(r)?(i=y(n.facets,e))?Object.keys(i.data).map(function(e){var t=Be(e);return{name:e,escapedValue:t,count:i.data[e],isRefined:n._state.isFacetRefined(r,t),isExcluded:n._state.isExcludeRefined(r,e)}}):[]:n._state.isDisjunctiveFacet(r)?(a=y(n.disjunctiveFacets,e))?Object.keys(a.data).map(function(e){var t=Be(e);return{name:e,escapedValue:t,count:a.data[e],isRefined:n._state.isDisjunctiveFacetRefined(r,t)}}):[]:n._state.isHierarchicalFacet(r)?((t=y(n.hierarchicalFacets,e))&&(c=n._state.getHierarchicalFacetByName(r),s=n._state._getHierarchicalFacetSeparator(c),(c=(o=0===(o=Le(n._state.getHierarchicalRefinement(r)[0]||"")).indexOf(c.rootPath)?o.replace(c.rootPath+s,""):o).split(s)).unshift(r),function t(e,n,r){e.isRefined=e.name===n[r];e.data&&e.data.forEach(function(e){t(e,n,r+1)})}(t,c,0)),t):void 0}function ze(e,t){e=y(e,function(e){return e.name===t});return e&&e.stats}function Je(e,t,n,r,i){var i=y(i,function(e){return e.name===n}),a=i&&i.data&&i.data[r]?i.data[r]:0,i=i&&i.exhaustive||!1;return{type:t,attributeName:n,name:r,count:a,exhaustive:i}}F.prototype.getFacetByName=function(t){function e(e){return e.name===t}return y(this.facets,e)||y(this.disjunctiveFacets,e)||y(this.hierarchicalFacets,e)},F.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],F.prototype.getFacetValues=function(e,t){var s,o,n=We(this,e);if(n)return s=x({},t,{sortBy:F.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),o=this,function t(n,e,r,i){var a;return i=i||0,Array.isArray(e)?n(e,r[i]):e.data&&0!==e.data.length?(a=e.data.map(function(e){return t(n,e,r,i+1)}),a=n(a,r[i]),x({data:a},e)):e}(function(e,t){if(s.facetOrdering){t=t;a=(a=o).renderingContent&&a.renderingContent.facetOrdering&&a.renderingContent.facetOrdering.values&&a.renderingContent.facetOrdering.values[t];if(a)return t=e,n=[],r=[],i=((a=a).order||[]).reduce(function(e,t,n){return e[t]=n,e},{}),t.forEach(function(e){var t=e.path||e.name;void 0!==i[t]?n[i[t]]=e:r.push(e)}),n=n.filter(function(e){return e}),"hidden"===(t=a.sortRemainingBy)?n:n.concat(Me(r,(a="alpha"===t?[["path","name"],["asc","asc"]]:[["count"],["desc"]])[0],a[1]))}var n,r,i,a;if(Array.isArray(s.sortBy))return t=ke(s.sortBy,F.DEFAULT_SORT),Me(e,t[0],t[1]);if("function"==typeof s.sortBy)return a=s.sortBy,e.sort(a);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")},n,Array.isArray(n)?[e]:o._state.getHierarchicalFacetByName(n.name).attributes)},F.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?ze(this.facets,e):this._state.isDisjunctiveFacet(e)?ze(this.disjunctiveFacets,e):void 0},F.prototype.getRefinements=function(){var s=this._state,o=this,c=[];return Object.keys(s.facetsRefinements).forEach(function(t){s.facetsRefinements[t].forEach(function(e){c.push(Je(0,"facet",t,e,o.facets))})}),Object.keys(s.facetsExcludes).forEach(function(t){s.facetsExcludes[t].forEach(function(e){c.push(Je(0,"exclude",t,e,o.facets))})}),Object.keys(s.disjunctiveFacetsRefinements).forEach(function(t){s.disjunctiveFacetsRefinements[t].forEach(function(e){c.push(Je(0,"disjunctive",t,e,o.disjunctiveFacets))})}),Object.keys(s.hierarchicalFacetsRefinements).forEach(function(a){s.hierarchicalFacetsRefinements[a].forEach(function(e){var t,n,r,i;c.push((t=s,n=a,e=e,r=o.hierarchicalFacets,i=t.getHierarchicalFacetByName(n),t=t._getHierarchicalFacetSeparator(i),i=e.split(t),e=y(r,function(e){return e.name===n}),t=i.reduce(function(e,t){var n=e&&y(e.data,function(e){return e.name===t});return void 0!==n?n:e},e),r=t&&t.count||0,i=t&&t.exhaustive||!1,e=t&&t.path||"",{type:"hierarchical",attributeName:n,name:e,count:r,exhaustive:i}))})}),Object.keys(s.numericRefinements).forEach(function(n){var e=s.numericRefinements[n];Object.keys(e).forEach(function(t){e[t].forEach(function(e){c.push({type:"numeric",attributeName:n,name:e,numericValue:e,operator:t})})})}),s.tagRefinements.forEach(function(e){c.push({type:"tag",attributeName:"_tags",name:e})}),c};var Ye=F;function P(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}b=P;function C(e){return"function"==typeof e}function Ge(e){return"object"==typeof e&&null!==e}function Ke(e){return void 0===e}P.prototype._events=void 0,P.prototype._maxListeners=void 0,P.defaultMaxListeners=10,P.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},P.prototype.emit=function(e){var t,n,r,i,a,s,o;if((this._events||(this._events={}),"error"===e)&&(!this._events.error||Ge(this._events.error)&&!this._events.error.length))throw(o=arguments[1])instanceof Error?o:((s=new Error('Uncaught, unspecified "error" event. ('+o+")")).context=o,s);if(Ke(t=this._events[e]))return!1;if(C(t))switch(arguments.length){case 1:t.call(this);break;case 2:t.call(this,arguments[1]);break;case 3:t.call(this,arguments[1],arguments[2]);break;default:r=Array.prototype.slice.call(arguments,1),t.apply(this,r)}else if(Ge(t))for(r=Array.prototype.slice.call(arguments,1),n=(a=t.slice()).length,i=0;i<n;i++)a[i].apply(this,r);return!0},P.prototype.on=P.prototype.addListener=function(e,t){if(C(t))return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,C(t.listener)?t.listener:t),this._events[e]?Ge(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,Ge(this._events[e])&&!this._events[e].warned&&(t=Ke(this._maxListeners)?P.defaultMaxListeners:this._maxListeners)&&0<t&&this._events[e].length>t&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace)&&console.trace(),this;throw TypeError("listener must be a function")},P.prototype.once=function(e,t){var n;if(C(t))return n=!1,r.listener=t,this.on(e,r),this;throw TypeError("listener must be a function");function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}},P.prototype.removeListener=function(e,t){var n,r,i,a;if(!C(t))throw TypeError("listener must be a function");if(this._events&&this._events[e])if(i=(n=this._events[e]).length,r=-1,n===t||C(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(Ge(n)){for(a=i;0<a--;)if(n[a]===t||n[a].listener&&n[a].listener===t){r=a;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},P.prototype.removeAllListeners=function(e){var t,n;if(this._events)if(this._events.removeListener)if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);this.removeAllListeners("removeListener"),this._events={}}else{if(C(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);delete this._events[e]}else 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e];return this},P.prototype.listeners=function(e){e=this._events&&this._events[e]?C(this._events[e])?[this._events[e]]:this._events[e].slice():[];return e},P.prototype.listenerCount=function(e){if(this._events){e=this._events[e];if(C(e))return 1;if(e)return e.length}return 0},P.listenerCount=function(e,t){return e.listenerCount(t)};var S=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})};function Xe(e,t){this.main=e,this.fn=t,this.lastResults=null}S(Xe,b),Xe.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},Xe.prototype.getModifiedState=function(e){return this.fn(e)};var Ze=Xe;function et(n){return Object.keys(n).sort(function(e,t){return e.localeCompare(t)}).reduce(function(e,t){return e[t]=n[t],e},{})}var V={_getQueries:function(o,c){var u=[];return u.push({indexName:o,params:V._getHitsSearchParams(c)}),c.getRefinedDisjunctiveFacets().forEach(function(e){u.push({indexName:o,params:V._getDisjunctiveFacetSearchParams(c,e)})}),c.getRefinedHierarchicalFacets().forEach(function(e){var a,s=c.getHierarchicalFacetByName(e),e=c.getHierarchicalRefinement(e),r=c._getHierarchicalFacetSeparator(s);0<e.length&&1<e[0].split(r).length&&(a=e[0].split(r).slice(0,-1).reduce(function(e,t,n){return e.concat({attribute:s.attributes[n],value:0===n?t:[e[e.length-1].value,t].join(r)})},[])).forEach(function(e,t){e=V._getDisjunctiveFacetSearchParams(c,e.attribute,0===t);function r(t){return s.attributes.some(function(e){return e===t.split(":")[0]})}var n=(e.facetFilters||[]).reduce(function(e,t){var n;return Array.isArray(t)&&0<(n=t.filter(function(e){return!r(e)})).length&&e.push(n),"string"!=typeof t||r(t)||e.push(t),e},[]),i=a[t-1];e.facetFilters=0<t?n.concat(i.attribute+":"+i.value):0<n.length?n:void 0,u.push({indexName:o,params:e})})}),u},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(V._getHitsHierarchicalFacetsAttributes(e)),n=V._getFacetFilters(e),r=V._getNumericFilters(e),i=V._getTagFilters(e),t={facets:-1<t.indexOf("*")?["*"]:t,tagFilters:i};return 0<n.length&&(t.facetFilters=n),0<r.length&&(t.numericFilters=r),et(v({},e.getQueryParams(),t))},_getDisjunctiveFacetSearchParams:function(e,t,n){var r=V._getFacetFilters(e,t,n),i=V._getNumericFilters(e,t),a=V._getTagFilters(e),s={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1},a=(0<a.length&&(s.tagFilters=a),e.getHierarchicalFacetByName(t));return s.facets=a?V._getDisjunctiveHierarchicalFacetAttribute(e,a,n):t,0<i.length&&(s.numericFilters=i),0<r.length&&(s.facetFilters=r),et(v({},e.getQueryParams(),s))},_getNumericFilters:function(e,i){var a;return e.numericFilters||(a=[],Object.keys(e.numericRefinements).forEach(function(r){var t=e.numericRefinements[r]||{};Object.keys(t).forEach(function(n){var e=t[n]||[];i!==r&&e.forEach(function(e){var t;Array.isArray(e)?(t=e.map(function(e){return r+n+e}),a.push(t)):a.push(r+n+e)})})}),a)},_getTagFilters:function(e){return e.tagFilters||e.tagRefinements.join(",")},_getFacetFilters:function(s,o,c){var u=[],e=s.facetsRefinements||{},n=(Object.keys(e).forEach(function(t){(e[t]||[]).forEach(function(e){u.push(t+":"+e)})}),s.facetsExcludes||{}),r=(Object.keys(n).forEach(function(t){(n[t]||[]).forEach(function(e){u.push(t+":-"+e)})}),s.disjunctiveFacetsRefinements||{}),l=(Object.keys(r).forEach(function(t){var n,e=r[t]||[];t!==o&&e&&0!==e.length&&(n=[],e.forEach(function(e){n.push(t+":"+e)}),u.push(n))}),s.hierarchicalFacetsRefinements||{});return Object.keys(l).forEach(function(e){var t=(l[e]||[])[0];if(void 0!==t){var n,r=s.getHierarchicalFacetByName(e),i=s._getHierarchicalFacetSeparator(r),a=s._getHierarchicalRootPath(r);if(o===e){if(-1===t.indexOf(i)||!a&&!0===c||a&&a.split(i).length===t.split(i).length)return;t=a?(n=a.split(i).length-1,a):(n=t.split(i).length-2,t.slice(0,t.lastIndexOf(i)))}else n=t.split(i).length-1;(e=r.attributes[n])&&u.push([e+":"+t])}}),u},_getHitsHierarchicalFacetsAttributes:function(i){return i.hierarchicalFacets.reduce(function(e,t){var n,r=i.getHierarchicalRefinement(t.name)[0];return r?(n=i._getHierarchicalFacetSeparator(t),r=r.split(n).length,n=t.attributes.slice(0,r+1),e.concat(n)):(e.push(t.attributes[0]),e)},[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,n){var r,i=e._getHierarchicalFacetSeparator(t);return!0===n?(n=0,(r=e._getHierarchicalRootPath(t))&&(n=r.split(i).length),[t.attributes[n]]):(r=(e.getHierarchicalRefinement(t.name)[0]||"").split(i).length-1,t.attributes.slice(0,1+r))},getSearchForFacetQuery:function(e,t,n,r){r=r.isDisjunctiveFacet(e)?r.clearRefinements(e):r,t={facetQuery:t,facetName:e};return"number"==typeof n&&(t.maxFacetHits=n),et(v({},V._getHitsSearchParams(r),t))}},w=V,j="3.13.5",tt=R;function E(e,t,n){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper (3.13.5)"),this.setClient(e);e=n||{};e.index=t,this.state=Ne.make(e),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0}function nt(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function rt(){return this.state.page}S(E,b),E.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},E.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},E.prototype.getQuery=function(){var e=this.state;return w._getHitsSearchParams(e)},E.prototype.searchOnce=function(e,t){var n=e?this.state.setQueryParameters(e):this.state,e=w._getQueries(n.index,n),r=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:n}),!t)return this.client.search(e).then(function(e){return r._currentNbQueries--,0===r._currentNbQueries&&r.emit("searchQueueEmpty"),{content:new Ye(n,e.results),state:n,_originalResponse:e}},function(e){throw r._currentNbQueries--,0===r._currentNbQueries&&r.emit("searchQueueEmpty"),e});this.client.search(e).then(function(e){r._currentNbQueries--,0===r._currentNbQueries&&r.emit("searchQueueEmpty"),t(null,new Ye(n,e.results),n)}).catch(function(e){r._currentNbQueries--,0===r._currentNbQueries&&r.emit("searchQueueEmpty"),t(e,null,n)})},E.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,n=this.derivedHelpers[0];if(!n)return Promise.resolve([]);var n=n.getModifiedState(t),t=v({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:Oe(w._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),r="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if("function"!=typeof this.client.initIndex)throw new Error(r);var i=this.client.initIndex(n.index);if("function"!=typeof i.findAnswers)throw new Error(r);return i.findAnswers(n.query,e.queryLanguages,t)},E.prototype.searchForFacetValues=function(t,e,n,r){var i,a,s,o="function"==typeof this.client.searchForFacetValues,c="function"==typeof this.client.initIndex;if(o||c||"function"==typeof this.client.search)return i=this.state.setQueryParameters(r||{}),a=i.isDisjunctiveFacet(t),r=w.getSearchForFacetQuery(t,e,n,i),this._currentNbQueries++,s=this,n=o?this.client.searchForFacetValues([{indexName:i.index,params:r}]):c?this.client.initIndex(i.index).searchForFacetValues(r):(delete r.facetName,this.client.search([{type:"facet",facet:t,indexName:i.index,params:r}]).then(function(e){return e.results[0]})),this.emit("searchForFacetValues",{state:i,facet:t,query:e}),n.then(function(e){return s._currentNbQueries--,0===s._currentNbQueries&&s.emit("searchQueueEmpty"),(e=Array.isArray(e)?e[0]:e).facetHits.forEach(function(e){e.escapedValue=tt(e.value),e.isRefined=a?i.isDisjunctiveFacetRefined(t,e.escapedValue):i.isFacetRefined(t,e.escapedValue)}),e},function(e){throw s._currentNbQueries--,0===s._currentNbQueries&&s.emit("searchQueueEmpty"),e});throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues")},E.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},E.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},E.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},E.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},E.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},E.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},E.prototype.addNumericRefinement=function(e,t,n){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,n),isPageReset:!0}),this},E.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},E.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},E.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},E.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},E.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},E.prototype.removeNumericRefinement=function(e,t,n){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,n),isPageReset:!0}),this},E.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},E.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},E.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},E.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},E.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},E.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},E.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},E.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},E.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},E.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},E.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},E.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},E.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},E.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},E.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},E.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},E.prototype.setCurrentPage=nt,E.prototype.setPage=nt,E.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},E.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},E.prototype.setState=function(e){return this._change({state:Ne.make(e),isPageReset:!1}),this},E.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new Ne(e),this},E.prototype.hasRefinements=function(e){return!!Ee(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},E.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},E.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},E.prototype.hasTag=function(e){return this.state.isTagRefined(e)},E.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},E.prototype.getIndex=function(){return this.state.index},E.prototype.getCurrentPage=rt,E.prototype.getPage=rt,E.prototype.getTags=function(){return this.state.tagRefinements},E.prototype.getRefinements=function(e){var n=[],r=(this.state.isConjunctiveFacet(e)?(this.state.getConjunctiveRefinements(e).forEach(function(e){n.push({value:e,type:"conjunctive"})}),this.state.getExcludeRefinements(e).forEach(function(e){n.push({value:e,type:"exclude"})})):this.state.isDisjunctiveFacet(e)&&this.state.getDisjunctiveRefinements(e).forEach(function(e){n.push({value:e,type:"disjunctive"})}),this.state.getNumericRefinements(e));return Object.keys(r).forEach(function(e){var t=r[e];n.push({value:t,operator:e,type:"numeric"})}),n},E.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},E.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},E.prototype._search=function(e){var r=this.state,i=[],t=[],e=(e.onlyWithDerivedHelpers||(t=w._getQueries(r.index,r),i.push({state:r,queriesCount:t.length,helper:this}),this.emit("search",{state:r,results:this.lastResults})),this.derivedHelpers.map(function(e){var t=e.getModifiedState(r),n=t.index?w._getQueries(t.index,t):[];return i.push({state:t,queriesCount:n.length,helper:e}),e.emit("search",{state:t,results:e.lastResults}),n})),t=Array.prototype.concat.apply(t,e),e=this._queryId++;if(this._currentNbQueries++,!t.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,i,e));try{this.client.search(t).then(this._dispatchAlgoliaResponse.bind(this,i,e)).catch(this._dispatchAlgoliaError.bind(this,e))}catch(e){this.emit("error",{error:e})}},E.prototype._dispatchAlgoliaResponse=function(e,t,n){var r;t<this._lastQueryIdReceived||(this._currentNbQueries-=t-this._lastQueryIdReceived,this._lastQueryIdReceived=t,0===this._currentNbQueries&&this.emit("searchQueueEmpty"),r=n.results.slice(),e.forEach(function(e){var t=e.state,n=e.queriesCount,e=e.helper,n=r.splice(0,n);t.index?(e.lastResults=new Ye(t,n),e.emit("result",{results:e.lastResults,state:t})):e.emit("result",{results:null,state:t})}))},E.prototype._dispatchAlgoliaError=function(e,t){e<this._lastQueryIdReceived||(this._currentNbQueries-=e-this._lastQueryIdReceived,this._lastQueryIdReceived=e,this.emit("error",{error:t}),0===this._currentNbQueries&&this.emit("searchQueueEmpty"))},E.prototype.containsRefinement=function(e,t,n,r){return e||0!==t.length||0!==n.length||0!==r.length},E.prototype._hasDisjunctiveRefinements=function(e){return this.state.disjunctiveRefinements[e]&&0<this.state.disjunctiveRefinements[e].length},E.prototype._change=function(e){var t=e.state,e=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:e}))},E.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},E.prototype.setClient=function(e){return this.client!==e&&("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper (3.13.5)"),this.client=e),this},E.prototype.getClient=function(){return this.client},E.prototype.derive=function(e){e=new Ze(this,e);return this.derivedHelpers.push(e),e},E.prototype.detachDerivedHelper=function(e){e=this.derivedHelpers.indexOf(e);if(-1===e)throw new Error("Derived helper already detached");this.derivedHelpers.splice(e,1)},E.prototype.hasPendingRequests=function(){return 0<this._currentNbQueries};var it=E;function at(e,t,n){return new it(e,t,n)}at.version=j,at.AlgoliaSearchHelper=it,at.SearchParameters=Ne,at.SearchResults=Ye;var A=at;function st(e){var t=e.attributeName,n=e.attributeValue,e=e.attributeScore;return"".concat(t,":").concat(n,"<score=").concat(e||1,">")}function ot(){return"configure"}function ct(a){var e=Object.keys(a.matchingPatterns).reduce(function(e,t){var n=a.matchingPatterns[t],r=le(a.hit,t),i=n.score;return Array.isArray(r)?[].concat(m(e),[r.map(function(e){return st({attributeName:t,attributeValue:e,attributeScore:i})})]):"string"==typeof r?[].concat(m(e),[st({attributeName:t,attributeValue:r,attributeScore:i})]):e},[]);return a.transformSearchParameters(new A.SearchParameters({sumOrFiltersScores:!0,facetFilters:["objectID:-".concat(a.hit.objectID)],optionalFilters:e}))}R=t({displayName:"AlgoliaConfigureRelatedItems",$$type:"ais.configureRelatedItems",defaultProps:{transformSearchParameters:function(e){return I({},e)}},getProvidedProps:function(){return{}},getSearchParameters:function(e,t){return e.setQueryParameters(ct(t))},transitionState:function(e,t,n){var r,i=ot(),a=(r=ae(ct(e)),Object.keys(r).forEach(function(e){var t=r[e];Array.isArray(t)&&0===t.length&&delete r[e]}),r),s=Object.keys(a),o=this._searchParameters?Object.keys(this._searchParameters).filter(function(e){return-1===s.indexOf(e)}):[];return this._searchParameters=a,g(n,_({},i,I(I({},l(n[i],o)),a)),{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(e,t){var n=this,r=ot(),i=h({ais:e.contextValue,multiIndexContext:e.indexContextValue}),a=d({ais:e.contextValue,multiIndexContext:e.indexContextValue})&&t.indices?t.indices[i]:t,i=(a&&a[r]?Object.keys(a[r]):[]).reduce(function(e,t){return n._searchParameters[t]||(e[t]=a[r][t]),e},{});return g(t,_({},r,i),{ais:e.contextValue,multiIndexContext:e.indexContextValue})}}),S=("undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{}).performance||{};S.now||S.mozNow||S.msNow||S.oNow||S.webkitNow;function ut(e,t){return e(t={exports:{}},t.exports),t.exports}var b="function"==typeof Symbol&&Symbol.for,lt=b?Symbol.for("react.element"):60103,ft=b?Symbol.for("react.portal"):60106,ht=b?Symbol.for("react.fragment"):60107,dt=b?Symbol.for("react.strict_mode"):60108,mt=b?Symbol.for("react.profiler"):60114,pt=b?Symbol.for("react.provider"):60109,gt=b?Symbol.for("react.context"):60110,xt=b?Symbol.for("react.async_mode"):60111,vt=b?Symbol.for("react.concurrent_mode"):60111,yt=b?Symbol.for("react.forward_ref"):60112,Rt=b?Symbol.for("react.suspense"):60113,bt=b?Symbol.for("react.suspense_list"):60120,Ft=b?Symbol.for("react.memo"):60115,Pt=b?Symbol.for("react.lazy"):60116,Ct=b?Symbol.for("react.block"):60121,St=b?Symbol.for("react.fundamental"):60117,Vt=b?Symbol.for("react.responder"):60118,wt=b?Symbol.for("react.scope"):60119;function N(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case lt:switch(e=e.type){case xt:case vt:case ht:case mt:case dt:case Rt:return e;default:switch(e=e&&e.$$typeof){case gt:case yt:case Pt:case Ft:case pt:return e;default:return t}}case ft:return t}}}function jt(e){return N(e)===vt}var It={AsyncMode:xt,ConcurrentMode:vt,ContextConsumer:gt,ContextProvider:pt,Element:lt,ForwardRef:yt,Fragment:ht,Lazy:Pt,Memo:Ft,Portal:ft,Profiler:mt,StrictMode:dt,Suspense:Rt,isAsyncMode:function(e){return jt(e)||N(e)===xt},isConcurrentMode:jt,isContextConsumer:function(e){return N(e)===gt},isContextProvider:function(e){return N(e)===pt},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===lt},isForwardRef:function(e){return N(e)===yt},isFragment:function(e){return N(e)===ht},isLazy:function(e){return N(e)===Pt},isMemo:function(e){return N(e)===Ft},isPortal:function(e){return N(e)===ft},isProfiler:function(e){return N(e)===mt},isStrictMode:function(e){return N(e)===dt},isSuspense:function(e){return N(e)===Rt},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===ht||e===vt||e===mt||e===dt||e===Rt||e===bt||"object"==typeof e&&null!==e&&(e.$$typeof===Pt||e.$$typeof===Ft||e.$$typeof===pt||e.$$typeof===gt||e.$$typeof===yt||e.$$typeof===St||e.$$typeof===Vt||e.$$typeof===wt||e.$$typeof===Ct)},typeOf:N},j=ut(function(e,t){});j.AsyncMode,j.ConcurrentMode,j.ContextConsumer,j.ContextProvider,j.Element,j.ForwardRef,j.Fragment,j.Lazy,j.Memo,j.Portal,j.Profiler,j.StrictMode,j.Suspense,j.isAsyncMode,j.isConcurrentMode,j.isContextConsumer,j.isContextProvider,j.isElement,j.isForwardRef,j.isFragment,j.isLazy,j.isMemo,j.isPortal,j.isProfiler,j.isStrictMode,j.isSuspense,j.isValidElementType,j.typeOf,ut(function(e){e.exports=It});function _t(){}function Ot(){}Ot.resetWarningCache=_t;S=ut(function(e){function t(e,t,n,r,i,a){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==a)throw(a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")).name="Invariant Violation",a}function n(){return t}e.exports=(e={array:t.isRequired=t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:n,element:t,elementType:t,instanceOf:n,node:t,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:Ot,resetWarningCache:_t}).PropTypes=e});function Et(){return null}Et.propTypes={hit:S.object.isRequired,matchingPatterns:S.object.isRequired,transformSearchParameters:S.func};b=R(Et,{$$widgetType:"ais.configureRelatedItems"}),j=t({displayName:"AlgoliaDynamicWidgets",$$type:"ais.dynamicWidgets",defaultProps:{transformItems:function(e){return e},maxValuesPerFacet:20},propTypes:{transformItems:S.func,facets:S.arrayOf(S.string),maxValuesPerFacet:S.number},getProvidedProps:function(e,t,n){var r,n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue});if(!e.facets||Array.isArray(e.facets)&&e.facets.length<=1&&("*"===e.facets[0]||void 0===e.facets[0]))return n?(r=n.renderingContent&&n.renderingContent.facetOrdering&&n.renderingContent.facetOrdering.facets&&n.renderingContent.facetOrdering.facets.order||[],20<(r=e.transformItems(r,{results:n})).length&&!e.facets&&console.warn("More than ".concat(20," facets are requested to be displayed without explicitly setting which facets to retrieve. This could have a performance impact. Set \"facets\" to [] to do two smaller network requests, or explicitly to ['*'] to avoid this warning.")),e.maxValuesPerFacet<n._state.maxValuesPerFacet&&console.warn("The maxValuesPerFacet set by dynamic widgets (".concat(e.maxValuesPerFacet,") is smaller than one of the limits set by a widget (").concat(n._state.maxValuesPerFacet,"). This causes a mismatch in query parameters and thus an extra network request when that widget is mounted.")),{attributesToRender:r}):{attributesToRender:[]};throw new Error('The `facets` prop only accepts [] or ["*"], you passed '.concat(JSON.stringify(e.facets)))},getSearchParameters:function(e,t){return(t.facets||["*"]).reduce(function(e,t){return e.addFacet(t)},e.setQueryParameters({maxValuesPerFacet:Math.max(t.maxValuesPerFacet||0,e.maxValuesPerFacet||0)}))}});function At(e){var t;if("object"===s(t=e)&&t.props)return e.props.attribute||(Array.isArray(e.props.attributes)?e.props.attributes[0]:e.props.children?At(o.Children.only(e.props.children)):void 0)}var Nt=j(function(e){var t=e.children,n=e.attributesToRender,r=void 0===(e=e.fallbackComponent)?function(){return null}:e,i=new Map;return o.Children.forEach(t,function(e){var t=At(e);if(!t)throw new Error('Could not find "attribute" prop for '.concat(re(e),"."));i.set(t,e)}),o.createElement(o.Fragment,null,n.map(function(e){return o.createElement(a.Fragment,{key:e},i.get(e)||o.createElement(r,{attribute:e}))}))},{$$widgetType:"ais.dynamicWidgets"});function Tt(r,e){var i=1<arguments.length&&void 0!==e?e:{};return Object.keys(i).filter(function(e){return void 0!==i[e]&&void 0!==i[e][r]}).map(function(e){var t=r,n=i[e];switch(e){case"range":return Object.keys(n[t]).map(function(e){return n[t][e]});case"refinementList":return n[t];case"hierarchicalMenu":case"menu":return[n[t]];case"multiRange":return n[t].split(":");case"toggle":return[n[t]];default:return[]}}).reduce(function(e,t){return e.concat(t)},[])}var Ht=t({displayName:"AlgoliaQueryRules",$$type:"ais.queryRules",defaultProps:{transformItems:function(e){return e},transformRuleContexts:function(e){return e},trackedFilters:{}},getProvidedProps:function(e,t,n){var n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue});return null===n?{items:[],canRefine:!1}:(n=n.userData,{items:e=(0,e.transformItems)(void 0===n?[]:n),canRefine:0<e.length})},getSearchParameters:function(e,t,n){var i,a,r;return 0===Object.keys(t.trackedFilters).length?e:(n=d({ais:t.contextValue,multiIndexContext:t.indexContextValue})&&n.indices?n.indices[h({ais:t.contextValue,multiIndexContext:t.indexContextValue})]:n,n={searchState:n,trackedFilters:t.trackedFilters},i=n.searchState,a=n.trackedFilters,n=Object.keys(a).reduce(function(e,t){var n=Tt(t,i),r=(0,a[t])(n);return[].concat(m(e),m(n.filter(function(e){return r.includes(e)}).map(function(e){return"ais-".concat(t,"-").concat(e).replace(/[^a-z0-9-_]+/gi,"_")})))},[]),r=e.ruleContexts||[],r=[].concat(m(r),m(n)),n=t.transformRuleContexts(r).slice(0,10),e.setQueryParameter("ruleContexts",n))}}),kt=Ht(function(){return null},{$$widgetType:"ais.queryRuleContext"});function Mt(e){return{targetedIndex:e.indexId}}var $t=function(){Q(n,a.Component);var t=q(n);function n(e){return k(this,n),_(c(e=t.call(this,e)),"state",{indexContext:Mt(e.props)}),_(c(e),"unregisterWidget",void 0),e.props.contextValue.onSearchParameters(e.getSearchParameters.bind(c(e)),{ais:e.props.contextValue,multiIndexContext:e.state.indexContext},e.props,void 0,n.displayName),e}return $(n,[{key:"componentDidMount",value:function(){this.unregisterWidget=this.props.contextValue.widgetsManager.registerWidget(this)}},{key:"componentDidUpdate",value:function(e){this.props.indexName!==e.indexName&&this.props.contextValue.widgetsManager.update()}},{key:"componentWillUnmount",value:function(){"function"==typeof this.unregisterWidget&&this.unregisterWidget()}},{key:"getSearchParameters",value:function(e,t){return e.setIndex((this.props||t).indexName)}},{key:"render",value:function(){return 0===a.Children.count(this.props.children)?null:o.createElement(xe,{value:this.state.indexContext},this.props.children)}}],[{key:"getDerivedStateFromProps",value:function(e){return{indexContext:Mt(e)}}}]),n}();_($t,"displayName","AlgoliaIndex"),_($t,"$$type","ais.index"),_($t,"$$widgetType","ais.index");var Dt=["resultsFacetValues"],Qt=["resultsFacetValues"],Bt=["resultsFacetValues"];function Lt(e){"function"==typeof e.addAlgoliaAgent&&(e.addAlgoliaAgent("react (".concat(a.version,")")),e.addAlgoliaAgent("react-instantsearch (".concat(be,")")))}var qt=function(e){return d({ais:e.props.contextValue,multiIndexContext:e.props.indexContextValue})},Ut=function(e,t){return e.props.indexContextValue.targetedIndex===t},Wt=function(e){return Boolean(e.props.indexId)},zt=function(e,t){return e.props.indexId===t},Jt=function(e,t){e=Wt(e),t=Wt(t);return e&&!t?-1:!e&&t?1:0};function Yt(n){return Object.keys(n).map(function(e){return function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=0;return e.replace(/%s/g,function(){return encodeURIComponent(n[i++])})}("%s=%s",e,(t=n[e],"[object Object]"===Object.prototype.toString.call(t)||"[object Array]"===Object.prototype.toString.call(t)?JSON.stringify(n[e]):n[e]));var t}).join("&")}function Gt(e){var i,t,n,r,a,s,o,c,u,l=e.indexName,f=e.initialState,f=void 0===f?{}:f,h=e.searchClient,d=e.resultsState,m=e.stalledSearchDelay,p=A(h,l,I({},ye)),g=(Lt(h),p.on("search",function(){x=x||setTimeout(function(){var e=P.getState(),e=(e.resultsFacetValues,O(e,Bt));P.setState(I(I({},e),{},{isSearchStalled:!0}))},m)}).on("result",w({indexId:l})).on("error",j),!1),x=null,v=p.state,y=(t=function(){var e=C(P.getState().widgets);P.setState(I(I({},P.getState()),{},{metadata:e,searching:!0})),V()},r=!(n=[]),{registerWidget:function(e){return n.push(e),R(),function(){n.splice(n.indexOf(e),1),R()}},update:R,getWidgets:function(){return n}});function R(){r||(r=!0,Z(function(){r=!1,t()}))}a=h,(e=d)&&(a.transporter&&!a._cacheHydrated||a._useCache&&"function"==typeof a.addAlgoliaAgent)&&(a.transporter&&!a._cacheHydrated&&(a._cacheHydrated=!0,s=a.search,a.search=function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=e.map(function(e){return I(I({},e),{},{params:Yt(e.params)})});return a.transporter.responsesCache.get({method:"search",args:[i].concat(n)},function(){return s.apply(void 0,[e].concat(n))})}),Array.isArray(e.results)?(u=a,o=e.results,u.transporter?u.transporter.responsesCache.set({method:"search",args:[o.reduce(function(e,t){return e.concat(t.rawResults.map(function(e){return{indexName:e.index,params:e.params}}))},[])]},{results:o.reduce(function(e,t){return e.concat(t.rawResults)},[])}):(c="/1/indexes/*/queries_body_".concat(JSON.stringify({requests:o.reduce(function(e,t){return e.concat(t.rawResults.map(function(e){return{indexName:e.index,params:e.params}}))},[])})),u.cache=I(I({},u.cache),{},_({},c,JSON.stringify({results:o.reduce(function(e,t){return e.concat(t.rawResults)},[])}))))):(u=e,(c=a).transporter?c.transporter.responsesCache.set({method:"search",args:[u.rawResults.map(function(e){return{indexName:e.index,params:e.params}})]},{results:u.rawResults}):(o="/1/indexes/*/queries_body_".concat(JSON.stringify({requests:u.rawResults.map(function(e){return{indexName:e.index,params:e.params}})})),c.cache=I(I({},c.cache),{},_({},o,JSON.stringify({results:u.rawResults}))))));e={widgets:f,metadata:(h=d)?h.metadata.map(function(e){return I(I({value:function(){return{}}},e),{},{items:e.items&&e.items.map(function(e){return I(I({value:function(){return{}}},e),{},{items:e.items&&e.items.map(function(e){return I({value:function(){return{}}},e)})})})})}):[],results:function(e){if(!e)return null;if(Array.isArray(e.results))return e.results.reduce(function(e,t){return I(I({},e),{},_({},t._internalIndexId,new A.SearchResults(new A.SearchParameters(t.state),t.rawResults)))},{});return new A.SearchResults(new A.SearchParameters(e.state),e.rawResults)}(d),error:null,searching:!1,isSearchStalled:!0,searchingForFacetValues:!1},b=e,F=[];var b,F,P={getState:function(){return b},setState:function(e){b=e,F.forEach(function(e){return e()})},subscribe:function(e){return F.push(e),function(){F.splice(F.indexOf(e),1)}}};function C(t){return y.getWidgets().filter(function(e){return Boolean(e.getMetadata)}).map(function(e){return e.getMetadata(t)})}function S(){var t=y.getWidgets().filter(function(e){return Boolean(e.getSearchParameters)}).filter(function(e){return!qt(e)&&!Wt(e)}).reduce(function(e,t){return t.getSearchParameters(e)},v),e=y.getWidgets().filter(function(e){return Boolean(e.getSearchParameters)}).filter(function(e){var t=qt(e)&&Ut(e,l),e=Wt(e)&&zt(e,l);return t||e}).sort(Jt).reduce(function(e,t){return t.getSearchParameters(e)},t),n=y.getWidgets().filter(function(e){return Boolean(e.getSearchParameters)}).filter(function(e){var t=qt(e)&&!Ut(e,l),e=Wt(e)&&!zt(e,l);return t||e}).sort(Jt).reduce(function(e,t){var n=qt(t)?t.props.indexContextValue.targetedIndex:t.props.indexId,r=e[n]||[];return I(I({},e),{},_({},n,r.concat(t)))},{});return{mainParameters:e,derivedParameters:Object.keys(n).map(function(e){return{parameters:n[e].reduce(function(e,t){return t.getSearchParameters(e)},t),indexId:e}})}}function V(){var e,t;g||(e=(t=S()).mainParameters,t=t.derivedParameters,i=t.length+1,p.derivedHelpers.slice().forEach(function(e){e.detach()}),t.forEach(function(e){var t=e.indexId,n=e.parameters;p.derive(function(){return n}).on("result",w({indexId:t})).on("error",j)}),p.setState(e),p.search())}function w(e){var r=e.indexId;return function(e){i--;var t=P.getState(),n=!p.derivedHelpers.length,t=t.results||{},t=!n&&t.getFacetByName?{}:t,n=(t=n?e.results:I(I({},t),{},_({},r,e.results)),P.getState()),e=n.isSearchStalled,n=(p.hasPendingRequests()||(clearTimeout(x),x=null,e=!1),n.resultsFacetValues,O(n,Dt));P.setState(I(I({},n),{},{results:t,isSearchStalled:e,searching:0<i,error:null}))}}function j(e){var e=e.error,t=P.getState(),n=t.isSearchStalled,t=(p.hasPendingRequests()||(clearTimeout(x),n=!1),t.resultsFacetValues,O(t,Qt));P.setState(I(I({},t),{},{isSearchStalled:n,error:e,searching:!1}))}return{store:P,widgetsManager:y,getWidgetsIds:function(){return P.getState().metadata.reduce(function(e,t){return void 0!==t.id?e.concat(t.id):e},[])},getSearchParameters:S,onSearchForFacetValues:function(e){var n=e.facetName,r=e.query,e=e.maxFacetHits,e=Math.max(1,Math.min(void 0===e?10:e,100));P.setState(I(I({},P.getState()),{},{searchingForFacetValues:!0})),p.searchForFacetValues(n,r,e).then(function(e){var t;P.setState(I(I({},P.getState()),{},{error:null,searchingForFacetValues:!1,resultsFacetValues:I(I({},P.getState().resultsFacetValues),{},(_(t={},n,e.facetHits),_(t,"query",r),t))}))},function(e){P.setState(I(I({},P.getState()),{},{searchingForFacetValues:!1,error:e}))}).catch(function(e){setTimeout(function(){throw e})})},onExternalStateUpdate:function(e){var t=C(e);P.setState(I(I({},P.getState()),{},{widgets:e,metadata:t,searching:!0})),V()},transitionState:function(e){var n=P.getState().widgets;return y.getWidgets().filter(function(e){return Boolean(e.transitionState)}).reduce(function(e,t){return t.transitionState(n,e)},e)},updateClient:function(e){Lt(e),p.setClient(e),V()},updateIndex:function(e){v=v.setIndex(e)},clearCache:function(){p.clearCache(),V()},skipSearch:function(){g=!0}}}function Kt(e,t){var a,n=document.createElement("meta"),r=document.querySelector("head"),t=(n.name="algolia:metadata",t=t,a=["contextValue","indexContextValue"],e=(e=e).map(function(e){var t=e.props,e=e.constructor,n=e._connectorDesc||{},r=n.defaultProps,i=void 0===r?{}:r,r=n.displayName;return{displayName:void 0===r?e.displayName:r,$$type:e.$$type,$$widgetType:e.$$widgetType,params:Object.keys(t).filter(function(e){return!a.includes(e)&&i[e]!==t[e]&&void 0!==t[e]})}}),{ua:t.transporter&&t.transporter.userAgent?t.transporter.userAgent.value:t._ua,widgets:e});n.content=JSON.stringify(t),r.appendChild(n)}function Xt(e){return Boolean(e.searchState)}function Zt(){return"query"}var en=function(){Q(i,a.Component);var r=q(i);function i(e){k(this,i),_(c(e=r.call(this,e)),"cleanupTimerRef",null),_(c(e),"isUnmounting",!1);var t=Gt({indexName:e.props.indexName,searchClient:e.props.searchClient,initialState:e.props.searchState||{},resultsState:e.props.resultsState,stalledSearchDelay:e.props.stalledSearchDelay}),n={store:t.store,widgetsManager:t.widgetsManager,mainTargetedIndex:e.props.indexName,onInternalStateUpdate:e.onWidgetsInternalStateUpdate.bind(c(e)),createHrefForState:e.createHrefForState.bind(c(e)),onSearchForFacetValues:e.onSearchForFacetValues.bind(c(e)),onSearchStateChange:e.onSearchStateChange.bind(c(e)),onSearchParameters:e.onSearchParameters.bind(c(e))};return e.state={isControlled:Xt(e.props),instantSearchManager:t,contextValue:n},e}return $(i,[{key:"componentDidUpdate",value:function(e){var t=Xt(e);if(t&&!this.state.isControlled)throw new Error("You can't switch <InstantSearch> from being controlled to uncontrolled");if(!t&&this.state.isControlled)throw new Error("You can't switch <InstantSearch> from being uncontrolled to controlled");this.props.refresh!==e.refresh&&this.props.refresh&&this.state.instantSearchManager.clearCache(),e.indexName!==this.props.indexName&&this.state.instantSearchManager.updateIndex(this.props.indexName),e.searchClient!==this.props.searchClient&&this.state.instantSearchManager.updateClient(this.props.searchClient)}},{key:"componentDidMount",value:function(){this.cleanupTimerRef&&(clearTimeout(this.cleanupTimerRef),this.cleanupTimerRef=null),"object"===("undefined"==typeof window?"undefined":s(window))&&"object"===s(window.navigator)&&"string"==typeof window.navigator.userAgent&&window.navigator.userAgent.includes("Algolia Crawler")&&"object"===s(window.document)&&Kt(this.state.instantSearchManager.widgetsManager.getWidgets(),this.props.searchClient)}},{key:"componentWillUnmount",value:function(){var e=this;this.cleanupTimerRef=setTimeout(function(){e.isUnmounting=!0,e.state.instantSearchManager.skipSearch()})}},{key:"createHrefForState",value:function(e){return e=this.state.instantSearchManager.transitionState(e),this.state.isControlled&&this.props.createURL?this.props.createURL(e,this.getKnownKeys()):"#"}},{key:"onWidgetsInternalStateUpdate",value:function(e){e=this.state.instantSearchManager.transitionState(e),this.onSearchStateChange(e),this.state.isControlled||this.state.instantSearchManager.onExternalStateUpdate(e)}},{key:"onSearchStateChange",value:function(e){this.props.onSearchStateChange&&!this.isUnmounting&&this.props.onSearchStateChange(e)}},{key:"onSearchParameters",value:function(e,t,n,r,i){var a;this.props.onSearchParameters&&(a=this.props.searchState||{},this.props.onSearchParameters(e,t,n,a)),this.props.widgetsCollector&&(a=this.props.searchState||{},this.props.widgetsCollector({getSearchParameters:e,getMetadata:r,context:t,props:n,searchState:a,displayName:i}))}},{key:"onSearchForFacetValues",value:function(e){this.state.instantSearchManager.onSearchForFacetValues(e)}},{key:"getKnownKeys",value:function(){return this.state.instantSearchManager.getWidgetsIds()}},{key:"render",value:function(){return 0===a.Children.count(this.props.children)?null:o.createElement(me,{value:this.state.contextValue},this.props.children)}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=Xt(e),r=t.instantSearchManager.store.getState().widgets,i=e.searchState;return n&&!ee(r,i)&&t.instantSearchManager.onExternalStateUpdate(e.searchState),{isControlled:n,contextValue:I(I({},t.contextValue),{},{mainTargetedIndex:e.indexName})}}}]),i}();_(en,"defaultProps",{stalledSearchDelay:200,refresh:!1});function tn(e,t,n){Zt();e=u(e,t,n,"query","");return e||""}function nn(e){return e.attributes[0]}var rn=t({displayName:"AlgoliaAutoComplete",$$type:"ais.autoComplete",getProvidedProps:function(e,t,n){return{hits:(r=n).results?r.results.hits&&Array.isArray(r.results.hits)?se(oe(r.results.hits,r.results.queryID),r.results.hitsPerPage,r.results.page):Object.keys(r.results).reduce(function(e,t){return[].concat(m(e),[{index:t,hits:se(oe(r.results[t].hits,r.results[t].queryID),r.results[t].hitsPerPage,r.results[t].page)}])},[]):[],currentRefinement:tn(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue})};var r},refine:function(e,t,n){return e={ais:e.contextValue,multiIndexContext:e.indexContextValue},Zt(),g(t,_({},"query",n),e,!0)},cleanUp:function(e,t){return e={ais:e.contextValue,multiIndexContext:e.indexContextValue},r(t,e,Zt())},getSearchParameters:function(e,t,n){return e.setQuery(tn(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}))}});function an(){return"boundingBox"}function sn(e){return[e.northEast.lat,e.northEast.lng,e.southWest.lat,e.southWest.lng].join()}function on(e){return e=e.match(mn),{lat:parseFloat(e[1]),lng:parseFloat(e[2])}}function cn(e,t,n){if(ue(e=u(e,t,n,an(),{})))return{northEast:{lat:parseFloat(e.northEast.lat),lng:parseFloat(e.northEast.lng)},southWest:{lat:parseFloat(e.southWest.lat),lng:parseFloat(e.southWest.lng)}}}function un(e,t,n){return g(e,_({},an(),t),n,!0)}function ln(e){return e.attributes[0]}var fn=t({displayName:"AlgoliaBreadcrumb",$$type:"ais.breadcrumb",propTypes:{attributes:function(e,t,n){if(!Array.isArray(e[t])||e[t].some(function(e){return"string"!=typeof e})||e[t].length<1)return new Error("Invalid prop ".concat(t," supplied to ").concat(n,". Expected an Array of Strings"))},transformItems:S.func},getProvidedProps:function(e,t,n){var r=nn(e),n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue});return Boolean(n)&&Boolean(n.getFacetByName(r))?(r=(n=n.getFacetValues(r)).data?function n(e){return e.reduce(function(e,t){return e=t.isRefined&&(e.push({label:t.name,value:t.escapedValue}),t.data)?e.concat(n(t.data)):e},[])}(n.data):[],{canRefine:0<(n=e.transformItems?e.transformItems(r):r).length,items:n}):{items:[],canRefine:!1}},refine:function(e,t,n){return r={ais:e.contextValue,multiIndexContext:e.indexContextValue},g(t,_({},nn(e),n||""),r,!0,"hierarchicalMenu");var r}}),hn=t({displayName:"AlgoliaCurrentRefinements",$$type:"ais.currentRefinements",propTypes:{transformItems:S.func},getProvidedProps:function(n,e,t,r){r=r.reduce(function(e,t){return void 0===t.items||!n.clearsQuery&&"query"===t.id||n.clearsQuery&&"query"===t.id&&""===t.items[0].currentRefinement?e:e.concat(t.items.map(function(e){return I(I({},e),{},{id:t.id,index:t.index})}))},[]),r=n.transformItems?n.transformItems(r):r;return{items:r,canRefine:0<r.length}},refine:function(e,t,n){return(n instanceof Array?n.map(function(e){return e.value}):[n]).reduce(function(e,t){return t(e)},t)}}),dn=["defaultRefinement"],mn=/^(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)$/,pn=t({displayName:"AlgoliaGeoSearch",$$type:"ais.geoSearch",getProvidedProps:function(e,t,n){var r={ais:e.contextValue,multiIndexContext:e.indexContextValue},n=p(n,r),i=cn(e,t,r),a=n&&n._state.insideBoundingBox&&function(e){e=e.split(",");return{northEast:{lat:parseFloat(e[0]),lng:parseFloat(e[1])},southWest:{lat:parseFloat(e[2]),lng:parseFloat(e[3])}}}(n._state.insideBoundingBox)||void 0,e=(t=t,r=r,(e=e).defaultRefinement,e=O(e,dn),(s=u(e,t,r,"aroundLatLng"))||(s=u(e,t,r,"configure.aroundLatLng"))&&on(s)),t=n&&n._state.aroundLatLng&&on(n._state.aroundLatLng)||void 0,r=i||a,s=e||t;return{hits:n?n.hits.filter(function(e){return Boolean(e._geoloc)}):[],isRefinedWithMap:Boolean(r),currentRefinement:r,position:s}},refine:function(e,t,n){return un(t,n,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},getSearchParameters:function(e,t,n){n=cn(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue});return n?e.setQueryParameter("insideBoundingBox",sn(n)):e},cleanUp:function(e,t){return r(t,{ais:e.contextValue,multiIndexContext:e.indexContextValue},an())},getMetadata:function(e,t){var n=[],r=an(),i={ais:e.contextValue,multiIndexContext:e.indexContextValue},a=h(i),s={},e=cn(e,t,i);return e&&n.push({label:"".concat(r,": ").concat(sn(e)),value:function(e){return un(e,s,i)},currentRefinement:e}),{id:r,index:a,items:n}},shouldComponentUpdate:function(){return!0}}),gn="hierarchicalMenu";function xn(e,t,n){t=u(e,t,n,"".concat(gn,".").concat(ln(e)),null);return""===t?null:t}function vn(e,c,u,l){return e.map(function(e){return{label:e.name,value:(t=e.escapedValue,r=(n=c).id,i=c.attributes,a=c.separator,s=c.rootPath,o=c.showParentLevel,null===(n=xn(c,u,l))?t:new A.SearchParameters({hierarchicalFacets:[{name:r,attributes:i,separator:a,rootPath:s,showParentLevel:o}]}).toggleHierarchicalFacetRefinement(r,n).toggleHierarchicalFacetRefinement(r,t).getHierarchicalRefinement(r)[0]),count:e.count,isRefined:e.isRefined,items:e.data&&vn(e.data,c,u,l)};var t,n,r,i,a,s,o})}function yn(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:10;return e.slice(0,t).map(function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return Array.isArray(e.items)?I(I({},e),{},{items:yn(e.items,t)}):e})}function Rn(e,t,n,r){return g(t,_({},ln(e),n||""),r,!0,gn)}function bn(e){var t=e.attribute,n=e.hit,r=e.highlightProperty,i=void 0===(i=e.preTag)?ye.highlightPreTag:i,e=e.postTag,t={attribute:t,highlightProperty:r,hit:n,preTag:i,postTag:void 0===e?ye.highlightPostTag:e},a=void 0===(r=t.preTag)?"<em>":r,s=void 0===(r=t.postTag)?"</em>":r,r=t.highlightProperty,n=t.attribute;if(t=t.hit)return t=le(t[r],n)||{},Array.isArray(t)?t.map(function(e){return Re({preTag:a,postTag:s,highlightedValue:e.value})}):Re({preTag:a,postTag:s,highlightedValue:t.value});throw new Error("`hit`, the matching record, must be provided")}var Fn=["name:asc"],Pn=t({displayName:"AlgoliaHierarchicalMenu",$$type:"ais.hierarchicalMenu",propTypes:{attributes:function(e,t,n){if(!Array.isArray(e[t])||e[t].some(function(e){return"string"!=typeof e})||e[t].length<1)return new Error("Invalid prop ".concat(t," supplied to ").concat(n,". Expected an Array of Strings"))},separator:S.string,rootPath:S.string,showParentLevel:S.bool,defaultRefinement:S.string,showMore:S.bool,limit:S.number,showMoreLimit:S.number,transformItems:S.func,facetOrdering:S.bool},defaultProps:{showMore:!1,limit:10,showMoreLimit:20,separator:" > ",rootPath:null,showParentLevel:!0,facetOrdering:!0},getProvidedProps:function(e,t,n){var r=e.showMore,i=e.limit,a=e.showMoreLimit,s=e.facetOrdering,o=ln(e),n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue});return Boolean(n)&&Boolean(n.getFacetByName(o))?(r=r?a:i,i=(a=n.getFacetValues(o,{sortBy:Fn,facetOrdering:s})).data?vn(a.data,e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}):[],n=e.transformItems?e.transformItems(i):i,{items:yn(n,r),currentRefinement:xn(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),canRefine:0<n.length}):{items:[],currentRefinement:xn(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),canRefine:!1}},refine:function(e,t,n){return Rn(e,t,n,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(e,t){return e={ais:(n=e).contextValue,multiIndexContext:e.indexContextValue},r(t,e,"".concat(gn,".").concat(ln(n)));var n},getSearchParameters:function(e,t,n){var r=t.attributes,i=t.separator,a=t.rootPath,s=t.showParentLevel,o=t.showMore,c=t.limit,u=t.showMoreLimit,l=t.contextValue,f=ln(t),o=o?u:c,u=(e=e.addHierarchicalFacet({name:f,attributes:r,separator:i,rootPath:a,showParentLevel:s}).setQueryParameters({maxValuesPerFacet:Math.max(e.maxValuesPerFacet||0,o)}),xn(t,n,{ais:l,multiIndexContext:t.indexContextValue}));return e=null!==u?e.toggleHierarchicalFacetRefinement(f,u):e},getMetadata:function(t,e){var n=t.attributes[0],r=ln(t),e=xn(t,e,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),n=e?[{label:"".concat(n,": ").concat(fe(e)),attribute:n,value:function(e){return Rn(t,e,"",{ais:t.contextValue,multiIndexContext:t.indexContextValue})},currentRefinement:e}]:[];return{id:r,index:h({ais:t.contextValue,multiIndexContext:t.indexContextValue}),items:n}}}),Cn=t({displayName:"AlgoliaHighlighter",$$type:"ais.highlighter",propTypes:{},getProvidedProps:function(){return{highlight:bn}}}),Sn=t({displayName:"AlgoliaHits",$$type:"ais.hits",getProvidedProps:function(e,t,n){n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue});return n?{hits:oe(se(n.hits,n.hitsPerPage,n.page),n.queryID)}:{hits:[]}},getSearchParameters:function(e){return e}});function Vn(){return"hitsPerPage"}function wn(e,t,n){e=u(e,t,n,"hitsPerPage",null);return"string"==typeof e?parseInt(e,10):e}var jn=t({displayName:"AlgoliaHitsPerPage",$$type:"ais.hitsPerPage",propTypes:{defaultRefinement:S.number.isRequired,items:S.arrayOf(S.shape({label:S.string,value:S.number.isRequired})).isRequired,transformItems:S.func},getProvidedProps:function(e,t){var n=wn(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),t=e.items.map(function(e){return e.value===n?I(I({},e),{},{isRefined:!0}):I(I({},e),{},{isRefined:!1})});return{items:e.transformItems?e.transformItems(t):t,currentRefinement:n}},refine:function(e,t,n){return g(t,_({},"hitsPerPage",n),{ais:e.contextValue,multiIndexContext:e.indexContextValue},!0)},cleanUp:function(e,t){return r(t,{ais:e.contextValue,multiIndexContext:e.indexContextValue},Vn())},getSearchParameters:function(e,t,n){return e.setHitsPerPage(wn(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}))},getMetadata:function(){return{id:Vn()}}}),In=["page"];function _n(e){e=e||{};e.page;return O(e,In)}var On=t({displayName:"AlgoliaInfiniteHits",$$type:"ais.infiniteHits",getProvidedProps:function(e,t,n){var r,i,a,s,o,c,u,l,f,h,d=this,n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue});return n?(r=n.page,c=n.hits,f=n.hitsPerPage,i=n.nbPages,a=n._state,this._cache=e.cache||this._cache||(o=s=void 0,{read:function(e){e=e.state;return ee(o,_n(e))?s:null},write:function(e){var t=e.state,e=e.hits;o=_n(t),s=e}}),e=this._cache.read({state:a})||{},c=oe(se(c,f,r),n.queryID),e[r]=c,this._cache.write({state:a,hits:e}),u=Math.min.apply(Math,m(Object.keys(e).map(Number))),l=Math.max.apply(Math,m(Object.keys(e).map(Number))),f=0<u,n=l<i-1,{hits:(h=e,Object.keys(h).map(Number).sort(function(e,t){return e-t}).reduce(function(e,t){return e.concat(h[t])},[])),hasPrevious:f,hasMore:n,refinePrevious:function(e){return d.refine(e,u-1)},refineNext:function(e){return d.refine(e,l+1)}}):{hits:[],hasPrevious:!1,hasMore:!1,refine:function(){},refinePrevious:function(){},refineNext:function(){}}},getSearchParameters:function(e,t,n){return e.setQueryParameters({page:(t={ais:(e=t).contextValue,multiIndexContext:t.indexContextValue},("string"==typeof(e=u(e,n,t,"page",1))?parseInt(e,10):e)-1)})},refine:function(e,t,n,r){return g(t,_({},"page",r+1),{ais:e.contextValue,multiIndexContext:e.indexContextValue},!1)}}),En="menu";function An(e){return e.attribute}function Nn(e,t,n){t=u(e,t,n,"".concat(En,".").concat(An(e)),null);return""===t?null:t}function Tn(e,t,n,r){return e===Nn(t,n,r)?"":e}function Hn(e){var t=e.showMore,n=e.limit,e=e.showMoreLimit;return t?e:n}function kn(e,t,n,r){return g(t,_({},An(e),n||""),r,!0,En)}var Mn=["count:desc","name:asc"],$n=t({displayName:"AlgoliaMenu",$$type:"ais.menu",propTypes:{attribute:S.string.isRequired,showMore:S.bool,limit:S.number,showMoreLimit:S.number,defaultRefinement:S.string,transformItems:S.func,searchable:S.bool,facetOrdering:S.bool},defaultProps:{showMore:!1,limit:10,showMoreLimit:20,facetOrdering:!0},getProvidedProps:function(t,n,e,r,i){var a=t.attribute,s=t.searchable,o=t.indexContextValue,c=t.facetOrdering,e=p(e,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),u=Boolean(e)&&Boolean(e.getFacetByName(a)),l=Boolean(i&&i[a]&&""!==i.query);if(s&&o)throw new Error("react-instantsearch: searching in *List is not available when used inside a multi index context");return u?(o=l?i[a].map(function(e){return{label:e.value,value:Tn(e.escapedValue,t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),_highlightResult:{label:{value:e.highlighted}},count:e.count,isRefined:e.isRefined}}):e.getFacetValues(a,{sortBy:s?void 0:Mn,facetOrdering:c}).map(function(e){return{label:e.name,value:Tn(e.escapedValue,t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),count:e.count,isRefined:e.isRefined}}),{items:(i=t.transformItems?t.transformItems(o):o).slice(0,Hn(t)),currentRefinement:Nn(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),isFromSearch:l,searchable:s,canRefine:0<i.length}):{items:[],currentRefinement:Nn(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),isFromSearch:l,searchable:s,canRefine:u}},refine:function(e,t,n){return kn(e,t,n,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},searchForFacetValues:function(e,t,n){return{facetName:e.attribute,query:n,maxFacetHits:Hn(e)}},cleanUp:function(e,t){return e={ais:(n=e).contextValue,multiIndexContext:e.indexContextValue},r(t,e,"".concat(En,".").concat(An(n)));var n},getSearchParameters:function(e,t,n){var r=t.attribute,n=(e=(e=e.setQueryParameters({maxValuesPerFacet:Math.max(e.maxValuesPerFacet||0,Hn(t))})).addDisjunctiveFacet(r),Nn(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}));return e=null!==n?e.addDisjunctiveFacetRefinement(r,n):e},getMetadata:function(t,e){var n=An(t),e=Nn(t,e,{ais:t.contextValue,multiIndexContext:t.indexContextValue});return{id:n,index:h({ais:t.contextValue,multiIndexContext:t.indexContextValue}),items:null===e?[]:[{label:"".concat(t.attribute,": ").concat(fe(e)),attribute:t.attribute,value:function(e){return kn(t,e,"",{ais:t.contextValue,multiIndexContext:t.indexContextValue})},currentRefinement:e}]}}});function Dn(e){var t;return void 0===e.start&&void 0===e.end?"":(t=void 0!==e.start?e.start:"",e=void 0!==e.end?e.end:"","".concat(t,":").concat(e))}var Qn="multiRange";function Bn(e){return e.attribute}function Ln(e,t,n){return u(e,t,n,"".concat(Qn,".").concat(Bn(e)),"")}function qn(e,t,n,r){return g(t,_({},Bn(e),n),r,!0,Qn)}var Un=t({displayName:"AlgoliaNumericMenu",$$type:"ais.numericMenu",propTypes:{id:S.string,attribute:S.string.isRequired,items:S.arrayOf(S.shape({label:S.node,start:S.number,end:S.number})).isRequired,transformItems:S.func},getProvidedProps:function(s,e,t){var n=s.attribute,o=Ln(s,e,{ais:s.contextValue,multiIndexContext:s.indexContextValue}),c=p(t,{ais:s.contextValue,multiIndexContext:s.indexContextValue}),e=s.items.map(function(e){var t,n,r,i,a=Dn(e);return{label:e.label,value:a,isRefined:a===o,noRefinement:!(!c||(e=Bn(s),a=a,t=(t=c).getFacetByName(e)?t.getFacetStats(e):null,e=a.split(":"),i=0===Number(e[0])||""===a?Number.NEGATIVE_INFINITY:Number(e[0]),a=0===Number(e[1])||""===a?Number.POSITIVE_INFINITY:Number(e[1]),Boolean(t)&&(e=i,r=a,(n=t).min>=e&&n.min<=r||n.max>=e&&n.max<=r||(e=a,(n=i)>=(r=t).min&&n<=r.max)||e>=r.min&&e<=r.max)))}}),t=c&&c.getFacetByName(n)?c.getFacetStats(n):null,n=ce(e,function(e){return!0===e.isRefined}),n=(e.some(function(e){return""===e.value})||e.push({value:"",isRefined:void 0===n,noRefinement:!t,label:"All"}),s.transformItems?s.transformItems(e):e);return{items:n,currentRefinement:o,canRefine:0<n.length&&n.some(function(e){return!1===e.noRefinement})}},refine:function(e,t,n){return qn(e,t,n,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(e,t){return e={ais:(n=e).contextValue,multiIndexContext:e.indexContextValue},r(t,e,"".concat(Qn,".").concat(Bn(n)));var n},getSearchParameters:function(e,t,n){var r=t.attribute,t=0===(n=Ln(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue})).length?{start:null,end:null}:(t=(n=U(n.split(":"),2))[0],n=n[1],{start:0<t.length?parseFloat(t):null,end:0<n.length?parseFloat(n):null}),n=t.start,t=t.end;return e=e.addDisjunctiveFacet(r),"number"==typeof n&&(e=e.addNumericRefinement(r,">=",n)),e="number"==typeof t?e.addNumericRefinement(r,"<=",t):e},getMetadata:function(t,e){var n,r=Bn(t),i=Ln(t,e,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),e=[],a=h({ais:t.contextValue,multiIndexContext:t.indexContextValue});return""!==i&&(n=ce(t.items,function(e){return Dn(e)===i}).label,e.push({label:"".concat(t.attribute,": ").concat(n),attribute:t.attribute,currentRefinement:n,value:function(e){return qn(t,e,"",{ais:t.contextValue,multiIndexContext:t.indexContextValue})}})),{id:r,index:a,items:e}}});function Wn(){return"page"}function zn(e,t,n){e=u(e,t,n,"page",1);return"string"==typeof e?parseInt(e,10):e}var Jn=t({displayName:"AlgoliaPagination",$$type:"ais.pagination",getProvidedProps:function(e,t,n){var n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue});return n?{nbPages:n=n.nbPages,currentRefinement:zn(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),canRefine:1<n}:null},refine:function(e,t,n){return e={ais:e.contextValue,multiIndexContext:e.indexContextValue},g(t,_({},"page",n),e,!1)},cleanUp:function(e,t){return r(t,{ais:e.contextValue,multiIndexContext:e.indexContextValue},Wn())},getSearchParameters:function(e,t,n){return e.setPage(zn(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue})-1)},getMetadata:function(){return{id:Wn()}}}),Yn=t({displayName:"AlgoliaPoweredBy",$$type:"ais.poweredBy",getProvidedProps:function(){var e="undefined"==typeof window||void 0===window.location?"":window.location.hostname;return{url:"https://www.algolia.com/?utm_source=react-instantsearch&utm_medium=website&"+"utm_content=".concat(e,"&")+"utm_campaign=poweredby"}}});function Gn(e){return e.attribute}var Kn="range";function Xn(e,t,n,r){var t=u(e,t,r,"".concat(Kn,".").concat(Gn(e)),{}),r=t.min,t=t.max,i=Boolean(e.precision),r={min:r="string"==typeof r?i?parseFloat(r):parseInt(r,10):r,max:t="string"==typeof t?i?parseFloat(t):parseInt(t,10):t},i=void 0!==e.min,t=void 0!==e.max,e=void 0!==r.min,a=void 0!==r.max;if(i&&e&&r.min<n.min)throw Error("You can't provide min value lower than range.");if(t&&a&&r.max>n.max)throw Error("You can't provide max value greater than range.");return i&&!e&&(r.min=n.min),t&&!a&&(r.max=n.max),r}function Zn(e,t){return{min:(void 0!==e.min?e:t).min,max:(void 0!==e.max?e:t).max}}function er(e,t,n,r){e=e||n!==r?e&&t?n:r:void 0;return e}function tr(e,t,n,r,i){var a=n.min,n=n.max,s=r.min,r=r.max,o=void 0===a||""===a,c=void 0===n||""===n,a=o?void 0:parseFloat(a),n=c?void 0:parseFloat(n),u=o||isFinite(a),l=c||isFinite(n);if(!u||!l)throw Error("You can't provide non finite values to the range connector.");if(a<s)throw Error("You can't provide min value lower than range.");if(r<n)throw Error("You can't provide max value greater than range.");return g(t,_({},Gn(e),{min:er(void 0!==e.min,o,s,a),max:er(void 0!==e.max,c,r,n)}),i,!0,Kn)}var nr=t({displayName:"AlgoliaRange",$$type:"ais.range",propTypes:{id:S.string,attribute:S.string.isRequired,defaultRefinement:S.shape({min:S.number,max:S.number}),min:S.number,max:S.number,precision:S.number,header:S.node,footer:S.node},defaultProps:{precision:0},getProvidedProps:function(e,t,n){var r=e.attribute,i=e.precision,a=e.min,s=e.max,n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),o=n&&n.getFacetByName(r),c=o&&n.getFacetStats(r)||{},o=(o?n.getFacetValues(r):[]).map(function(e){return{value:e.name,count:e.count}}),c=(n={min:a,max:s},r=c,a=i,a=Math.pow(10,a),s="number"==typeof n.min&&isFinite(n.min)?n.min:"number"==typeof r.min&&isFinite(r.min)?r.min:void 0,n="number"==typeof n.max&&isFinite(n.max)?n.max:"number"==typeof r.max&&isFinite(r.max)?r.max:void 0,{min:void 0!==s?Math.floor(s*a)/a:s,max:void 0!==n?Math.ceil(n*a)/a:n}),r=c.min,s=c.max,a=(this._currentRange={min:r,max:s},Xn(e,t,this._currentRange,{ais:e.contextValue,multiIndexContext:e.indexContextValue}));return{min:r,max:s,canRefine:0<o.length,currentRefinement:Zn(a,this._currentRange),count:o,precision:i}},refine:function(e,t,n){return tr(e,t,n,this._currentRange,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(e,t){return e={ais:(n=e).contextValue,multiIndexContext:e.indexContextValue},r(t,e,"".concat(Kn,".").concat(Gn(n)));var n},getSearchParameters:function(e,t,n){var r=t.attribute,n=Xn(t,n,this._currentRange,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),t=n.min,n=n.max;return e=e.addDisjunctiveFacet(r),void 0!==t&&(e=e.addNumericRefinement(r,">=",t)),e=void 0!==n?e.addNumericRefinement(r,"<=",n):e},getMetadata:function(t,e){var n=this,r=this._currentRange,i=r.min,r=r.max,e=Xn(t,e,this._currentRange,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),a=e.min,e=e.max,s=[],o=void 0!==a,c=void 0!==e;return(o&&a!==i||c&&e!==r)&&(o=[o?"".concat(a," <= "):"",t.attribute,c?" <= ".concat(e):""],s.push({label:o.join(""),attribute:t.attribute,value:function(e){return tr(t,e,{},n._currentRange,{ais:t.contextValue,multiIndexContext:t.indexContextValue})},currentRefinement:Zn({min:a,max:e},{min:i,max:r})})),{id:Gn(t),index:h({ais:t.contextValue,multiIndexContext:t.indexContextValue}),items:s}}}),rr="refinementList";function ir(e){return e.attribute}function T(e,t,n){t=u(e,t,n,"".concat(rr,".").concat(ir(e)),[]);return"string"!=typeof t?t:t?[t]:[]}function ar(t,e,n,r){e=T(e,n,r);return-1===e.indexOf(t)?e.concat([t]):e.filter(function(e){return e!==t})}function sr(e){var t=e.showMore,n=e.limit,e=e.showMoreLimit;return t?e:n}function or(e,t,n,r){return g(t,_({},ir(e),0<n.length?n:""),r,!0,rr)}var cr=["isRefined","count:desc","name:asc"],ur=t({displayName:"AlgoliaRefinementList",$$type:"ais.refinementList",propTypes:{id:S.string,attribute:S.string.isRequired,operator:S.oneOf(["and","or"]),showMore:S.bool,limit:S.number,showMoreLimit:S.number,defaultRefinement:S.arrayOf(S.oneOfType([S.string,S.number])),searchable:S.bool,transformItems:S.func,facetOrdering:S.bool},defaultProps:{operator:"or",showMore:!1,limit:10,showMoreLimit:20,facetOrdering:!0},getProvidedProps:function(t,n,e,r,i){var a=t.attribute,s=t.searchable,o=t.indexContextValue,c=t.facetOrdering,e=p(e,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),u=Boolean(e)&&Boolean(e.getFacetByName(a)),l=Boolean(i&&i[a]&&""!==i.query);if(s&&o)throw new Error("react-instantsearch: searching in *List is not available when used inside a multi index context");return u?(o=l?i[a].map(function(e){return{label:e.value,value:ar(e.escapedValue,t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),_highlightResult:{label:{value:e.highlighted}},count:e.count,isRefined:e.isRefined}}):e.getFacetValues(a,{sortBy:cr,facetOrdering:c}).map(function(e){return{label:e.name,value:ar(e.escapedValue,t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),count:e.count,isRefined:e.isRefined}}),{items:(i=t.transformItems?t.transformItems(o):o).slice(0,sr(t)),currentRefinement:T(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),isFromSearch:l,searchable:s,canRefine:0<i.length}):{items:[],currentRefinement:T(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),canRefine:u,isFromSearch:l,searchable:s}},refine:function(e,t,n){return or(e,t,n,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},searchForFacetValues:function(e,t,n){return{facetName:e.attribute,query:n,maxFacetHits:sr(e)}},cleanUp:function(e,t){return e={ais:(n=e).contextValue,multiIndexContext:e.indexContextValue},r(t,e,"".concat(rr,".").concat(ir(n)));var n},getSearchParameters:function(e,t,n){var r=t.attribute,i="and"===t.operator?"addFacet":"addDisjunctiveFacet",a="".concat(i,"Refinement");return e=(e=e.setQueryParameters({maxValuesPerFacet:Math.max(e.maxValuesPerFacet||0,sr(t))}))[i](r),T(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}).reduce(function(e,t){return e[a](r,t)},e)},getMetadata:function(n,r){var e=ir(n),i={ais:n.contextValue,multiIndexContext:n.indexContextValue};return{id:e,index:h(i),items:0<T(n,r,i).length?[{attribute:n.attribute,label:"".concat(n.attribute,": "),currentRefinement:T(n,r,i),value:function(e){return or(n,e,[],i)},items:T(n,r,i).map(function(t){return{label:fe("".concat(t)),value:function(e){e=T(n,e,i).filter(function(e){return e!==t});return or(n,r,e,i)}}})}]:[]}}}),lr=t({displayName:"AlgoliaScrollTo",$$type:"ais.scrollTo",propTypes:{scrollOn:S.string},defaultProps:{scrollOn:"page"},getProvidedProps:function(e,t){var n=e.scrollOn,r=u(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue},n,null),e=(this._prevSearchState||(this._prevSearchState={}),l(t=d({ais:e.contextValue,multiIndexContext:e.indexContextValue})?t.indices?t.indices[h({ais:e.contextValue,multiIndexContext:e.indexContextValue})]:{}:t,["configure",n])),t=ne(this._prevSearchState,e);return this._prevSearchState=e,{value:r,hasNotChanged:t}}});function fr(){return"query"}function hr(e,t,n){e=u(e,t,n,"query","");return e||""}function dr(e,t,n,r){return g(t,_({},"query",n),r,!0)}var mr=t({displayName:"AlgoliaSearchBox",$$type:"ais.searchBox",propTypes:{defaultRefinement:S.string},getProvidedProps:function(e,t,n){return{currentRefinement:hr(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),isSearchStalled:n.isSearchStalled}},refine:function(e,t,n){return dr(0,t,n,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(e,t){return e={ais:e.contextValue,multiIndexContext:e.indexContextValue},r(t,e,fr())},getSearchParameters:function(e,t,n){return e.setQuery(hr(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}))},getMetadata:function(t,e){e=hr(t,e,{ais:t.contextValue,multiIndexContext:t.indexContextValue});return{id:"query",index:h({ais:t.contextValue,multiIndexContext:t.indexContextValue}),items:null===e?[]:[{label:"".concat("query",": ").concat(e),value:function(e){return dr(0,e,"",{ais:t.contextValue,multiIndexContext:t.indexContextValue})},currentRefinement:e}]}}});function pr(){return"relevancyStrictness"}var gr=t({displayName:"AlgoliaRelevantSort",$$type:"ais.relevantSort",getProvidedProps:function(e,t,n){n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue});return n?{isVirtualReplica:void 0!==n.appliedRelevancyStrictness,isRelevantSorted:void 0!==n.appliedRelevancyStrictness&&0<n.appliedRelevancyStrictness}:{isVirtualReplica:!1,isRelevantSorted:!1}},getSearchParameters:function(e,t,n){return e.setQueryParameter("relevancyStrictness",(e={ais:t.contextValue,multiIndexContext:t.indexContextValue},u(t,n,e,"relevancyStrictness")))},refine:function(e,t,n){return g(t,_({},pr(),n),{ais:e.contextValue,multiIndexContext:e.indexContextValue},!0)}});function xr(){return"sortBy"}function vr(e,t,n){e=u(e,t,n,"sortBy",null);return e||null}var yr=t({displayName:"AlgoliaSortBy",$$type:"ais.sortBy",propTypes:{defaultRefinement:S.string,items:S.arrayOf(S.shape({label:S.string,value:S.string.isRequired})).isRequired,transformItems:S.func},getProvidedProps:function(e,t){var n=vr(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),t=e.items.map(function(e){return e.value===n?I(I({},e),{},{isRefined:!0}):I(I({},e),{},{isRefined:!1})});return{items:e.transformItems?e.transformItems(t):t,currentRefinement:n}},refine:function(e,t,n){return g(t,_({},"sortBy",n),{ais:e.contextValue,multiIndexContext:e.indexContextValue},!0)},cleanUp:function(e,t){return r(t,{ais:e.contextValue,multiIndexContext:e.indexContextValue},xr())},getSearchParameters:function(e,t,n){n=vr(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue});return e.setIndex(n)},getMetadata:function(){return{id:xr()}}}),Rr=t({displayName:"AlgoliaStateResults",$$type:"ais.stateResults",getProvidedProps:function(e,t,n){return{searchState:t,searchResults:p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),allSearchResults:n.results,searching:n.searching,isSearchStalled:n.isSearchStalled,error:n.error,searchingForFacetValues:n.searchingForFacetValues,props:e}}}),br=t({displayName:"AlgoliaStats",$$type:"ais.stats",getProvidedProps:function(e,t,n){n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue});return n?{areHitsSorted:void 0!==n.appliedRelevancyStrictness&&0<n.appliedRelevancyStrictness&&n.nbHits!==n.nbSortedHits,nbHits:n.nbHits,nbSortedHits:n.nbSortedHits,processingTimeMS:n.processingTimeMS}:null}});function Fr(e){return e.attribute}var Pr="toggle",Cr=["0","false","null","undefined"];function Sr(e,t,n){t=u(e,t,n,"".concat(Pr,".").concat(Fr(e)),!1);return-1===Cr.indexOf(t)&&Boolean(t)}function Vr(e,t,n,r){return g(t,_({},Fr(e),n||!1),r,!0,Pr)}var wr=t({displayName:"AlgoliaToggle",$$type:"ais.toggle",propTypes:{label:S.string.isRequired,attribute:S.string.isRequired,value:S.any.isRequired,filter:S.func,defaultRefinement:S.bool},getProvidedProps:function(e,t,n){var r=e.attribute,i=e.value,n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),t=Sr(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),e=n&&n.getFacetByName(r)?n.getFacetValues(r):null,n=e&&e.length?ce(e,function(e){return e.name===i.toString()}):null,r=n&&n.count,n=e&&e.length?e.reduce(function(e,t){return e+t.count},0):null;return{currentRefinement:t,canRefine:t?null!==n&&0<n:null!==r&&0<r,count:{checked:n,unchecked:r}}},refine:function(e,t,n){return Vr(e,t,n,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(e,t){return e={ais:(n=e).contextValue,multiIndexContext:e.indexContextValue},r(t,e,"".concat(Pr,".").concat(Fr(n)));var n},getSearchParameters:function(e,t,n){var r=t.attribute,i=t.value,a=t.filter,n=Sr(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),t=e.addDisjunctiveFacet(r);return t=n&&(t=t.addDisjunctiveFacetRefinement(r,i),a)?a(t):t},getMetadata:function(t,e){var n=Fr(t),e=Sr(t,e,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),r=[],i=h({ais:t.contextValue,multiIndexContext:t.indexContextValue});return e&&r.push({label:t.label,currentRefinement:e,attribute:t.attribute,value:function(e){return Vr(t,e,!1,{ais:t.contextValue,multiIndexContext:t.indexContextValue})}}),{id:n,index:i,items:r}}});function jr(r,i,a){return function(e,t){if("function"!=typeof r)throw new TypeError("Expected insightsClient to be a Function");var n=function(e){var t=e.method,n=e.results,r=e.currentHit,i=n.index,a=r.__queryID,s=[r.objectID];if(!a)throw new Error("Could not infer `queryID`. Ensure `clickAnalytics: true` was added with the Configure widget.\nSee: https://alg.li/VpPpLt");switch(t){case"clickedObjectIDsAfterSearch":return{index:i,queryID:a,objectIDs:s,positions:[r.__position]};case"convertedObjectIDsAfterSearch":return{index:i,queryID:a,objectIDs:s};default:throw new Error('Unsupported method "'.concat(t,'" passed to the insights function. The supported methods are: "clickedObjectIDsAfterSearch", "convertedObjectIDsAfterSearch".'))}}({method:e,results:i,currentHit:a});r(e,I(I({},n),t))}}function Ir(){return"query"}function _r(){return"additionalVoiceParameters"}function Or(e,t,n){e=u(e,t,n,"query","");return e||""}function Er(e,t,n,r){var i,a=e.language?{queryLanguages:[e.language.split("-")[0]]}:{},e="function"==typeof e.additionalQueryParameters?I({ignorePlurals:!0,removeStopWords:!0,optionalWords:n},e.additionalQueryParameters({query:n})):{};_(i={},"query",n),_(i,"additionalVoiceParameters",I(I({},a),e));return g(t,i,r,!0)}var S=t({displayName:"AlgoliaVoiceSearch",$$type:"ais.voiceSearch",propTypes:{defaultRefinement:S.string},getProvidedProps:function(e,t,n){return{currentRefinement:Or(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),isSearchStalled:n.isSearchStalled}},refine:function(e,t,n){return Er(e,t,n,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(e,t){return n=t,e={ais:e.contextValue,multiIndexContext:e.indexContextValue},n=r(t,e,Ir()),r(n,e,_r());var n},getSearchParameters:function(e,t,n){var r,i=Or(t,n,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),n=(t={ais:(r=t).contextValue,multiIndexContext:t.indexContextValue},(r=u(r,n,t,"additionalVoiceParameters",""))||{});return e.setQuery(i).setQueryParameters(n)},getMetadata:function(t,e){e=Or(t,e,{ais:t.contextValue,multiIndexContext:t.indexContextValue});return{id:"query",index:h({ais:t.contextValue,multiIndexContext:t.indexContextValue}),items:null===e?[]:[{label:"".concat("query",": ").concat(e),value:function(e){return Er(t,e,"",{ais:t.contextValue,multiIndexContext:t.indexContextValue})},currentRefinement:e}]}}}),Ar=Nt,Nr=j;e.Configure=Ve,e.DynamicWidgets=Nt,e.EXPERIMENTAL_connectConfigureRelatedItems=R,e.EXPERIMENTAL_connectDynamicWidgets=Nr,e.ExperimentalConfigureRelatedItems=b,e.ExperimentalDynamicWidgets=Ar,e.HIGHLIGHT_TAGS=ye,e.Index=function(t){var n=t.indexName;return o.createElement(de,null,function(e){return o.createElement($t,D({contextValue:e,indexId:n},t))})},e.InstantSearch=en,e.InstantSearchConsumer=de,e.InstantSearchProvider=me,e.QueryRuleContext=kt,e.connectAutoComplete=rn,e.connectBreadcrumb=fn,e.connectConfigure=pe,e.connectCurrentRefinements=hn,e.connectDynamicWidgets=j,e.connectGeoSearch=pn,e.connectHierarchicalMenu=Pn,e.connectHighlight=Cn,e.connectHitInsights=function(r){return t({displayName:"AlgoliaInsights",$$type:"ais.insights",getProvidedProps:function(e,t,n){n=p(n,{ais:e.contextValue,multiIndexContext:e.indexContextValue});return{insights:jr(r,n,e.hit)}}})},e.connectHits=Sn,e.connectHitsPerPage=jn,e.connectInfiniteHits=On,e.connectMenu=$n,e.connectNumericMenu=Un,e.connectPagination=Jn,e.connectPoweredBy=Yn,e.connectQueryRules=Ht,e.connectRange=nr,e.connectRefinementList=ur,e.connectRelevantSort=gr,e.connectScrollTo=lr,e.connectSearchBox=mr,e.connectSortBy=yr,e.connectStateResults=Rr,e.connectStats=br,e.connectToggleRefinement=wr,e.connectVoiceSearch=S,e.createConnector=t,e.instantSearchContext=he,e.translatable=function(s){return function(e){var t=function(){Q(i,a.Component);var r=q(i);function i(){var a;k(this,i);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _(c(a=r.call.apply(r,[this].concat(t))),"translate",function(e){var t=a.props.translations,t=(t&&t.hasOwnProperty(e)?t:s)[e];if("function"!=typeof t)return t;for(var n=arguments.length,r=new Array(1<n?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.apply(void 0,r)}),a}return $(i,[{key:"render",value:function(){return o.createElement(e,D({translate:this.translate},this.props))}}]),i}(),n=e.displayName||e.name||"UnknownComponent";return t.displayName="Translatable(".concat(n,")"),t}},e.version=be,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e=e||self).ReactInstantSearchCore={},e.React)}(this,function(e,g){"use strict";var s="default"in g?g.default:g,H="7.0.0";function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}var W=r;function C(e){return"function"==typeof e}function L(e){return"object"==typeof e&&null!==e}function M(e){return void 0===e}r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,r,n,i,a,o,c;if((this._events||(this._events={}),"error"===e)&&(!this._events.error||L(this._events.error)&&!this._events.error.length))throw(c=arguments[1])instanceof Error?c:((o=new Error('Uncaught, unspecified "error" event. ('+c+")")).context=c,o);if(M(t=this._events[e]))return!1;if(C(t))switch(arguments.length){case 1:t.call(this);break;case 2:t.call(this,arguments[1]);break;case 3:t.call(this,arguments[1],arguments[2]);break;default:n=Array.prototype.slice.call(arguments,1),t.apply(this,n)}else if(L(t))for(n=Array.prototype.slice.call(arguments,1),r=(a=t.slice()).length,i=0;i<r;i++)a[i].apply(this,n);return!0},r.prototype.on=r.prototype.addListener=function(e,t){if(C(t))return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,C(t.listener)?t.listener:t),this._events[e]?L(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,L(this._events[e])&&!this._events[e].warned&&(t=M(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&0<t&&this._events[e].length>t&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace)&&console.trace(),this;throw TypeError("listener must be a function")},r.prototype.once=function(e,t){var r;if(C(t))return r=!1,n.listener=t,this.on(e,n),this;throw TypeError("listener must be a function");function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}},r.prototype.removeListener=function(e,t){var r,n,i,a;if(!C(t))throw TypeError("listener must be a function");if(this._events&&this._events[e])if(i=(r=this._events[e]).length,n=-1,r===t||C(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(L(r)){for(a=i;0<a--;)if(r[a]===t||r[a].listener&&r[a].listener===t){n=a;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,r;if(this._events)if(this._events.removeListener)if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);this.removeAllListeners("removeListener"),this._events={}}else{if(C(r=this._events[e]))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);delete this._events[e]}else 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e];return this},r.prototype.listeners=function(e){e=this._events&&this._events[e]?C(this._events[e])?[this._events[e]]:this._events[e].slice():[];return e},r.prototype.listenerCount=function(e){if(this._events){e=this._events[e];if(C(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)};var U=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})};function Q(e,t){this.main=e,this.fn=t,this.lastResults=null}U(Q,W),Q.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},Q.prototype.getModifiedState=function(e){return this.fn(e)};var $=Q;var B=function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},q=function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")};function V(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function J(e,t){var r,n;if(e!==t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&"__proto__"!==i&&"constructor"!==i&&(r=t[i],void 0!==(n=e[i])&&void 0===r||(V(n)&&V(r)?e[i]=J(n,r):e[i]="object"==typeof(n=r)&&null!==n?J(Array.isArray(n)?[]:{},n):n));return e}var z=function(e){V(e)||(e={});for(var t=1,r=arguments.length;t<r;t++){var n=arguments[t];V(n)&&J(e,n)}return e};var X=function(e){return e&&0<Object.keys(e).length};var K=function(e,t){if(null===e)return{};for(var r,n={},i=Object.keys(e),a=0;a<i.length;a++)r=i[a],0<=t.indexOf(r)||(n[r]=e[r]);return n};function G(r){return Object.keys(r).sort().reduce(function(e,t){return e[t]=r[t],e},{})}function Z(){return Array.prototype.slice.call(arguments).reduceRight(function(t,r){return Object.keys(Object(r)).forEach(function(e){void 0!==r[e]&&(void 0!==t[e]&&delete t[e],t[e]=r[e])}),t},{})}var f={_getQueries:function(c,s){var u=[];return u.push({indexName:c,params:f._getHitsSearchParams(s)}),s.getRefinedDisjunctiveFacets().forEach(function(e){u.push({indexName:c,params:f._getDisjunctiveFacetSearchParams(s,e)})}),s.getRefinedHierarchicalFacets().forEach(function(e){var a,o=s.getHierarchicalFacetByName(e),e=s.getHierarchicalRefinement(e),n=s._getHierarchicalFacetSeparator(o);0<e.length&&1<e[0].split(n).length&&(a=e[0].split(n).slice(0,-1).reduce(function(e,t,r){return e.concat({attribute:o.attributes[r],value:0===r?t:[e[e.length-1].value,t].join(n)})},[])).forEach(function(e,t){e=f._getDisjunctiveFacetSearchParams(s,e.attribute,0===t);function n(t){return o.attributes.some(function(e){return e===t.split(":")[0]})}var r=(e.facetFilters||[]).reduce(function(e,t){var r;return Array.isArray(t)&&0<(r=t.filter(function(e){return!n(e)})).length&&e.push(r),"string"!=typeof t||n(t)||e.push(t),e},[]),i=a[t-1];e.facetFilters=0<t?r.concat(i.attribute+":"+i.value):0<r.length?r:void 0,u.push({indexName:c,params:e})})}),u},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(f._getHitsHierarchicalFacetsAttributes(e)).sort(),r=f._getFacetFilters(e),n=f._getNumericFilters(e),i=f._getTagFilters(e),t={facets:-1<t.indexOf("*")?["*"]:t,tagFilters:i};return 0<r.length&&(t.facetFilters=r),0<n.length&&(t.numericFilters=n),G(z({},e.getQueryParams(),t))},_getDisjunctiveFacetSearchParams:function(e,t,r){var n=f._getFacetFilters(e,t,r),i=f._getNumericFilters(e,t),a=f._getTagFilters(e),o={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1},a=(0<a.length&&(o.tagFilters=a),e.getHierarchicalFacetByName(t));return o.facets=a?f._getDisjunctiveHierarchicalFacetAttribute(e,a,r):t,0<i.length&&(o.numericFilters=i),0<n.length&&(o.facetFilters=n),G(z({},e.getQueryParams(),o))},_getNumericFilters:function(e,i){var a;return e.numericFilters||(a=[],Object.keys(e.numericRefinements).forEach(function(n){var t=e.numericRefinements[n]||{};Object.keys(t).forEach(function(r){var e=t[r]||[];i!==n&&e.forEach(function(e){var t;Array.isArray(e)?(t=e.map(function(e){return n+r+e}),a.push(t)):a.push(n+r+e)})})}),a)},_getTagFilters:function(e){return e.tagFilters||e.tagRefinements.join(",")},_getFacetFilters:function(o,c,s){var u=[],e=o.facetsRefinements||{},r=(Object.keys(e).sort().forEach(function(t){(e[t]||[]).sort().forEach(function(e){u.push(t+":"+e)})}),o.facetsExcludes||{}),n=(Object.keys(r).sort().forEach(function(t){(r[t]||[]).sort().forEach(function(e){u.push(t+":-"+e)})}),o.disjunctiveFacetsRefinements||{}),f=(Object.keys(n).sort().forEach(function(t){var r,e=n[t]||[];t!==c&&e&&0!==e.length&&(r=[],e.sort().forEach(function(e){r.push(t+":"+e)}),u.push(r))}),o.hierarchicalFacetsRefinements||{});return Object.keys(f).sort().forEach(function(e){var t=(f[e]||[])[0];if(void 0!==t){var r,n=o.getHierarchicalFacetByName(e),i=o._getHierarchicalFacetSeparator(n),a=o._getHierarchicalRootPath(n);if(c===e){if(-1===t.indexOf(i)||!a&&!0===s||a&&a.split(i).length===t.split(i).length)return;t=a?(r=a.split(i).length-1,a):(r=t.split(i).length-2,t.slice(0,t.lastIndexOf(i)))}else r=t.split(i).length-1;(e=n.attributes[r])&&u.push([e+":"+t])}}),u},_getHitsHierarchicalFacetsAttributes:function(i){return i.hierarchicalFacets.reduce(function(e,t){var r,n=i.getHierarchicalRefinement(t.name)[0];return n?(r=i._getHierarchicalFacetSeparator(t),n=n.split(r).length,r=t.attributes.slice(0,n+1),e.concat(r)):(e.push(t.attributes[0]),e)},[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var n,i=e._getHierarchicalFacetSeparator(t);return!0===r?(r=0,(n=e._getHierarchicalRootPath(t))&&(r=n.split(i).length),[t.attributes[r]]):(n=(e.getHierarchicalRefinement(t.name)[0]||"").split(i).length-1,t.attributes.slice(0,1+n))},getSearchForFacetQuery:function(e,t,r,n){n=n.isDisjunctiveFacet(e)?n.clearRefinements(e):n,t={facetQuery:t,facetName:e};return"number"==typeof r&&(t.maxFacetHits=r),G(z({},f._getHitsSearchParams(n),t))}},Y=f,m=function(e,t){if(Array.isArray(e))for(var r=0;r<e.length;r++)if(t(e[r]))return e[r]};var ee=function(r,n){return r.filter(function(e,t){return-1<n.indexOf(e)&&r.indexOf(e)===t})};var te=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw new Error("The value should be a number, a parsable string or an array of those.")},re={addRefinement:function(e,t,r){var n;return re.isRefined(e,t,r)?e:(r=""+r,r=e[t]?e[t].concat(r):[r],(n={})[t]=r,Z({},n,e))},removeRefinement:function(e,r,t){var n;return void 0===t?re.clearRefinement(e,function(e,t){return r===t}):(n=""+t,re.clearRefinement(e,function(e,t){return r===t&&n===e}))},toggleRefinement:function(e,t,r){if(void 0===r)throw new Error("toggleRefinement should be used with a value");return re.isRefined(e,t,r)?re.removeRefinement(e,t,r):re.addRefinement(e,t,r)},clearRefinement:function(i,a,o){var c,e;return void 0===a?X(i)?{}:i:"string"==typeof a?K(i,[a]):"function"==typeof a?(c=!1,e=Object.keys(i).reduce(function(e,t){var r=i[t]||[],n=r.filter(function(e){return!a(e,t,o)});return n.length!==r.length&&(c=!0),e[t]=n,e},{}),c?e:i):void 0},isRefined:function(e,t,r){var n=Boolean(e[t])&&0<e[t].length;return void 0!==r&&n?-1!==e[t].indexOf(""+r):n}},n=re;function ne(e,r){return Array.isArray(e)&&Array.isArray(r)?e.length===r.length&&e.every(function(e,t){return ne(r[t],e)}):e===r}function o(e){var n=e?o._parseNumbers(e):{},i=(void 0===n.userToken||null!==(e=n.userToken)&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=n.facets||[],this.disjunctiveFacets=n.disjunctiveFacets||[],this.hierarchicalFacets=n.hierarchicalFacets||[],this.facetsRefinements=n.facetsRefinements||{},this.facetsExcludes=n.facetsExcludes||{},this.disjunctiveFacetsRefinements=n.disjunctiveFacetsRefinements||{},this.numericRefinements=n.numericRefinements||{},this.tagRefinements=n.tagRefinements||[],this.hierarchicalFacetsRefinements=n.hierarchicalFacetsRefinements||{},this);Object.keys(n).forEach(function(e){var t=-1!==o.PARAMETERS.indexOf(e),r=void 0!==n[e];!t&&r&&(i[e]=n[e])})}o.PARAMETERS=Object.keys(new o),o._parseNumbers=function(i){var n,a;return i instanceof o?i:(n={},["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach(function(e){var t,r=i[e];"string"==typeof r&&(t=parseFloat(r),n[e]=isNaN(t)?r:t)}),Array.isArray(i.insideBoundingBox)&&(n.insideBoundingBox=i.insideBoundingBox.map(function(e){return Array.isArray(e)?e.map(function(e){return parseFloat(e)}):e})),i.numericRefinements&&(a={},Object.keys(i.numericRefinements).forEach(function(r){var n=i.numericRefinements[r]||{};a[r]={},Object.keys(n).forEach(function(e){var t=n[e].map(function(e){return Array.isArray(e)?e.map(function(e){return"string"==typeof e?parseFloat(e):e}):"string"==typeof e?parseFloat(e):e});a[r][e]=t})}),n.numericRefinements=a),z({},i,n))},o.make=function(e){var r=new o(e);return(e.hierarchicalFacets||[]).forEach(function(e){var t;e.rootPath&&0===(t=(r=0<(t=r.getHierarchicalRefinement(e.name)).length&&0!==t[0].indexOf(e.rootPath)?r.clearRefinements(e.name):r).getHierarchicalRefinement(e.name)).length&&(r=r.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}),r},o.validate=function(e,t){t=t||{};return e.tagFilters&&t.tagRefinements&&0<t.tagRefinements.length?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):0<e.tagRefinements.length&&t.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&t.numericRefinements&&X(t.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):X(e.numericRefinements)&&t.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},o.prototype={constructor:o,clearRefinements:function(e){e={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:n.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:n.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:n.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:n.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return e.numericRefinements===this.numericRefinements&&e.facetsRefinements===this.facetsRefinements&&e.facetsExcludes===this.facetsExcludes&&e.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&e.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(e)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,r){var n,r=te(r);return this.isNumericRefined(e,t,r)?this:((n=z({},this.numericRefinements))[e]=z({},n[e]),n[e][t]?(n[e][t]=n[e][t].slice(),n[e][t].push(r)):n[e][t]=[r],this.setQueryParameters({numericRefinements:n}))},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(r,n,e){var i=e;return void 0!==i?this.isNumericRefined(r,n,i)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(e,t){return t===r&&e.op===n&&ne(e.val,te(i))})}):this:void 0!==n?this.isNumericRefined(r,n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(e,t){return t===r&&e.op===n})}):this:this.isNumericRefined(r)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(e,t){return t===r})}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(o){var c,t,e;return void 0===o?X(this.numericRefinements)?{}:this.numericRefinements:"string"==typeof o?K(this.numericRefinements,[o]):"function"==typeof o?(c=!1,t=this.numericRefinements,e=Object.keys(t).reduce(function(e,n){var i=t[n],a={},i=i||{};return Object.keys(i).forEach(function(t){var e=i[t]||[],r=[];e.forEach(function(e){o({val:e,op:t},n,"numeric")||r.push(e)}),r.length!==e.length&&(c=!0),a[t]=r}),e[n]=a,e},{}),c?e:this.numericRefinements):void 0},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(this.isConjunctiveFacet(e))return n.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:n.addRefinement(this.facetsRefinements,e,t)});throw new Error(e+" is not defined in the facets attribute of the helper configuration")},addExcludeRefinement:function(e,t){if(this.isConjunctiveFacet(e))return n.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:n.addRefinement(this.facetsExcludes,e,t)});throw new Error(e+" is not defined in the facets attribute of the helper configuration")},addDisjunctiveFacetRefinement:function(e,t){if(this.isDisjunctiveFacet(e))return n.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:n.addRefinement(this.disjunctiveFacetsRefinements,e,t)});throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration")},addTagRefinement:function(e){return this.isTagRefined(e)?this:(e={tagRefinements:this.tagRefinements.concat(e)},this.setQueryParameters(e))},removeFacet:function(t){return this.isConjunctiveFacet(t)?this.clearRefinements(t).setQueryParameters({facets:this.facets.filter(function(e){return e!==t})}):this},removeDisjunctiveFacet:function(t){return this.isDisjunctiveFacet(t)?this.clearRefinements(t).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter(function(e){return e!==t})}):this},removeHierarchicalFacet:function(t){return this.isHierarchicalFacet(t)?this.clearRefinements(t).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter(function(e){return e.name!==t})}):this},removeFacetRefinement:function(e,t){if(this.isConjunctiveFacet(e))return n.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:n.removeRefinement(this.facetsRefinements,e,t)}):this;throw new Error(e+" is not defined in the facets attribute of the helper configuration")},removeExcludeRefinement:function(e,t){if(this.isConjunctiveFacet(e))return n.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:n.removeRefinement(this.facetsExcludes,e,t)}):this;throw new Error(e+" is not defined in the facets attribute of the helper configuration")},removeDisjunctiveFacetRefinement:function(e,t){if(this.isDisjunctiveFacet(e))return n.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:n.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this;throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration")},removeTagRefinement:function(t){var e;return this.isTagRefined(t)?(e={tagRefinements:this.tagRefinements.filter(function(e){return e!==t})},this.setQueryParameters(e)):this},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(this.isConjunctiveFacet(e))return this.setQueryParameters({facetsRefinements:n.toggleRefinement(this.facetsRefinements,e,t)});throw new Error(e+" is not defined in the facets attribute of the helper configuration")},toggleExcludeFacetRefinement:function(e,t){if(this.isConjunctiveFacet(e))return this.setQueryParameters({facetsExcludes:n.toggleRefinement(this.facetsExcludes,e,t)});throw new Error(e+" is not defined in the facets attribute of the helper configuration")},toggleDisjunctiveFacetRefinement:function(e,t){if(this.isDisjunctiveFacet(e))return this.setQueryParameters({disjunctiveFacetsRefinements:n.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)});throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration")},toggleHierarchicalFacetRefinement:function(e,t){var r,n;if(this.isHierarchicalFacet(e))return r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),n={},void 0!==this.hierarchicalFacetsRefinements[e]&&0<this.hierarchicalFacetsRefinements[e].length&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+r))?-1===t.indexOf(r)?n[e]=[]:n[e]=[t.slice(0,t.lastIndexOf(r))]:n[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:Z({},n,this.hierarchicalFacetsRefinements)});throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration")},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");var r;if(this.isHierarchicalFacet(e))return(r={})[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:Z({},r,this.hierarchicalFacetsRefinements)});throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.")},removeHierarchicalFacetRefinement:function(e){var t;return this.isHierarchicalFacetRefined(e)?((t={})[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:Z({},t,this.hierarchicalFacetsRefinements)})):this},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return-1<this.disjunctiveFacets.indexOf(e)},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return-1<this.facets.indexOf(e)},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&n.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&n.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&n.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){return!!this.isHierarchicalFacet(e)&&(e=this.getHierarchicalRefinement(e),t?-1!==e.indexOf(t):0<e.length)},isNumericRefined:function(e,t,r){var n,i;return void 0===r&&void 0===t?Boolean(this.numericRefinements[e]):(n=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t],void 0!==r&&n?(r=te(r),t=void 0!==(e=this.numericRefinements[e][t],i=r,m(e,function(e){return ne(e,i)})),n&&t):n)},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var t=this,e=ee(Object.keys(this.numericRefinements).filter(function(e){return 0<Object.keys(t.numericRefinements[e]).length}),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter(function(e){return 0<t.disjunctiveFacetsRefinements[e].length}).concat(e).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var t=this;return ee(this.hierarchicalFacets.map(function(e){return e.name}),Object.keys(this.hierarchicalFacetsRefinements).filter(function(e){return 0<t.hierarchicalFacetsRefinements[e].length})).sort()},getUnrefinedDisjunctiveFacets:function(){var t=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter(function(e){return-1===t.indexOf(e)})},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var r=this.managedParameters,n={},i=this;return Object.keys(this).forEach(function(e){var t=i[e];-1===r.indexOf(e)&&void 0!==t&&(n[e]=t)}),n},setQueryParameter:function(e,t){var r;return this[e]===t?this:((r={})[e]=t,this.setQueryParameters(r))},setQueryParameters:function(e){if(!e)return this;var t=o.validate(this,e);if(t)throw t;var r=this,i=o._parseNumbers(e),t=Object.keys(this).reduce(function(e,t){return e[t]=r[t],e},{}),e=Object.keys(i).reduce(function(e,t){var r=void 0!==e[t],n=void 0!==i[t];return r&&!n?K(e,[t]):(n&&(e[t]=i[t]),e)},t);return new this.constructor(e)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(t){return m(this.hierarchicalFacets,function(e){return e.name===t})},getHierarchicalFacetBreadcrumb:function(e){var t;return this.isHierarchicalFacet(e)&&(t=this.getHierarchicalRefinement(e)[0])?(e=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),t.split(e).map(function(e){return e.trim()})):[]},toString:function(){return JSON.stringify(this,null,2)}};function ie(e){return Array.isArray(e)?e.filter(Boolean):[]}function ae(e,t){if(Array.isArray(e))for(var r=0;r<e.length;r++)if(t(e[r]))return r;return-1}function oe(e,t){var n=(t||[]).map(function(e){return e.split(":")});return e.reduce(function(e,t){var r=t.split(":"),t=m(n,function(e){return e[0]===r[0]});return 1<r.length||!t?(e[0].push(r[0]),e[1].push(r[1])):(e[0].push(t[0]),e[1].push(t[1])),e},[[],[]])}var ce=o;var se=function(e,r,i){return Array.isArray(e)?(Array.isArray(i)||(i=[]),(e=e.map(function(t,e){return{criteria:r.map(function(e){return t[e]}),index:e,value:t}})).sort(function(e,t){for(var r=-1;++r<e.criteria.length;){var n=function(e,t){if(e!==t){var r=void 0!==e,n=null===e,i=void 0!==t,a=null===t;if(!a&&t<e||n&&i||!r)return 1;if(!n&&e<t||a&&r||!i)return-1}return 0}(e.criteria[r],t.criteria[r]);if(n)return!(r>=i.length)&&"desc"===i[r]?-n:n}return e.index-t.index}),e.map(function(e){return e.value})):[]},ue=function(p){return function(e,t){function r(e,o,t){var r,c=e;if(0<t){var n=0;for(c=e;n<t;){var i=c&&Array.isArray(c.data)?c.data:[],c=m(i,function(e){return e.isRefined});n++}}return c&&(r=Object.keys(o.data).map(function(e){return[e,o.data[e]]}).filter(function(e){var t,r,n,i,a,e=e[0];return e=e,t=c.path||u,r=l,n=s,a=f,(!(i=u)||0===e.indexOf(i)&&i!==e)&&(!i&&-1===e.indexOf(n)||i&&e.split(n).length-i.split(n).length==1||-1===e.indexOf(n)&&-1===r.indexOf(n)||0===r.indexOf(e)||0===e.indexOf(t+n)&&(a||0===e.indexOf(r)))}),c.data=se(r.map(function(e){var t,r,n,i,a=e[0],e=e[1];return e=e,a=a,t=s,r=le(l),n=o.exhaustive,{name:(i=a.split(t))[i.length-1].trim(),path:a,escapedValue:fe(a),count:e,isRefined:r===a||0===r.indexOf(a+t),exhaustive:n,data:null}}),a[0],a[1])),e}var a,s,u,f,l,n=p.hierarchicalFacets[t],i=p.hierarchicalFacetsRefinements[n.name]&&p.hierarchicalFacetsRefinements[n.name][0]||"",o=p._getHierarchicalFacetSeparator(n),c=p._getHierarchicalRootPath(n),h=p._getHierarchicalShowParentLevel(n),n=oe(p._getHierarchicalFacetSortBy(n)),d=e.every(function(e){return e.exhaustive}),n=(a=n,s=o,f=h,l=i,e);return(n=(u=c)?e.slice(c.split(o).length):n).reduce(r,{name:p.hierarchicalFacets[t].name,count:null,isRefined:!0,path:null,escapedValue:null,exhaustive:d,data:null})}},fe=B,le=q;var he=B,de=q;function pe(e){var r={};return e.forEach(function(e,t){r[e]=t}),r}function me(e,t,r){t&&t[r]&&(e.stats=t[r])}function ge(f,t,r){var c=t[0],l=(this._rawResults=t,this),e=(Object.keys(c).forEach(function(e){l[e]=c[e]}),Object.keys(r||{}).forEach(function(e){l[e]=r[e]}),this.processingTimeMS=t.reduce(function(e,t){return void 0===t.processingTimeMS?e:e+t.processingTimeMS},0),this.disjunctiveFacets=[],this.hierarchicalFacets=f.hierarchicalFacets.map(function(){return[]}),this.facets=[],f.getRefinedDisjunctiveFacets()),s=pe(f.facets),u=pe(f.disjunctiveFacets),n=1,h=c.facets||{};Object.keys(h).forEach(function(e){var t,r,n,i,a=h[e],o=(n=f.hierarchicalFacets,t=e,m(n,function(e){return-1<(e.attributes||[]).indexOf(t)}));o?(n=o.attributes.indexOf(e),r=ae(f.hierarchicalFacets,function(e){return e.name===o.name}),l.hierarchicalFacets[r][n]={attribute:e,data:a,exhaustive:c.exhaustiveFacetsCount}):(r=-1!==f.disjunctiveFacets.indexOf(e),n=-1!==f.facets.indexOf(e),r&&(i=u[e],l.disjunctiveFacets[i]={name:e,data:a,exhaustive:c.exhaustiveFacetsCount},me(l.disjunctiveFacets[i],c.facets_stats,e)),n&&(i=s[e],l.facets[i]={name:e,data:a,exhaustive:c.exhaustiveFacetsCount},me(l.facets[i],c.facets_stats,e)))}),this.hierarchicalFacets=ie(this.hierarchicalFacets),e.forEach(function(e){var i=t[n],a=i&&i.facets?i.facets:{},o=f.getHierarchicalFacetByName(e);Object.keys(a).forEach(function(t){var r,e,n=a[t];o?(r=ae(f.hierarchicalFacets,function(e){return e.name===o.name}),-1!==(e=ae(l.hierarchicalFacets[r],function(e){return e.attribute===t}))&&(l.hierarchicalFacets[r][e].data=z({},l.hierarchicalFacets[r][e].data,n))):(r=u[t],e=c.facets&&c.facets[t]||{},l.disjunctiveFacets[r]={name:t,data:Z({},n,e),exhaustive:i.exhaustiveFacetsCount},me(l.disjunctiveFacets[r],i.facets_stats,t),f.disjunctiveFacetsRefinements[t]&&f.disjunctiveFacetsRefinements[t].forEach(function(e){!l.disjunctiveFacets[r].data[e]&&-1<f.disjunctiveFacetsRefinements[t].indexOf(de(e))&&(l.disjunctiveFacets[r].data[e]=0)}))}),n++}),f.getRefinedHierarchicalFacets().forEach(function(e){var c=f.getHierarchicalFacetByName(e),s=f._getHierarchicalFacetSeparator(c),u=f.getHierarchicalRefinement(e);0===u.length||u[0].split(s).length<2||t.slice(n).forEach(function(e){var o=e&&e.facets?e.facets:{};Object.keys(o).forEach(function(t){var e,r,n=o[t],i=ae(f.hierarchicalFacets,function(e){return e.name===c.name}),a=ae(l.hierarchicalFacets[i],function(e){return e.attribute===t});-1!==a&&(e={},0<u.length&&(e[r=u[0].split(s)[0]]=l.hierarchicalFacets[i][a].data[r]),l.hierarchicalFacets[i][a].data=Z(e,n,l.hierarchicalFacets[i][a].data))}),n++})}),Object.keys(f.facetsExcludes).forEach(function(t){var e=f.facetsExcludes[t],r=s[t];l.facets[r]={name:t,data:h[t],exhaustive:c.exhaustiveFacetsCount},e.forEach(function(e){l.facets[r]=l.facets[r]||{name:t},l.facets[r].data=l.facets[r].data||{},l.facets[r].data[e]=0})}),this.hierarchicalFacets=this.hierarchicalFacets.map(ue(f)),this.facets=ie(this.facets),this.disjunctiveFacets=ie(this.disjunctiveFacets),this._state=f}function ye(r,n){function e(e){return e.name===n}var i,a,t,o,c,s;return r._state.isConjunctiveFacet(n)?(i=m(r.facets,e))?Object.keys(i.data).map(function(e){var t=he(e);return{name:e,escapedValue:t,count:i.data[e],isRefined:r._state.isFacetRefined(n,t),isExcluded:r._state.isExcludeRefined(n,e)}}):[]:r._state.isDisjunctiveFacet(n)?(a=m(r.disjunctiveFacets,e))?Object.keys(a.data).map(function(e){var t=he(e);return{name:e,escapedValue:t,count:a.data[e],isRefined:r._state.isDisjunctiveFacetRefined(n,t)}}):[]:r._state.isHierarchicalFacet(n)?((t=m(r.hierarchicalFacets,e))&&(s=r._state.getHierarchicalFacetByName(n),o=r._state._getHierarchicalFacetSeparator(s),(s=(c=0===(c=de(r._state.getHierarchicalRefinement(n)[0]||"")).indexOf(s.rootPath)?c.replace(s.rootPath+o,""):c).split(o)).unshift(n),function t(e,r,n){e.isRefined=e.name===r[n];e.data&&e.data.forEach(function(e){t(e,r,n+1)})}(t,s,0)),t):void 0}function ve(e,t){e=m(e,function(e){return e.name===t});return e&&e.stats}function be(e,t,r,n,i){var i=m(i,function(e){return e.name===r}),a=i&&i.data&&i.data[n]?i.data[n]:0,i=i&&i.exhaustive||!1;return{type:t,attributeName:r,name:n,count:a,exhaustive:i}}ge.prototype.getFacetByName=function(t){function e(e){return e.name===t}return m(this.facets,e)||m(this.disjunctiveFacets,e)||m(this.hierarchicalFacets,e)},ge.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],ge.prototype.getFacetValues=function(e,t){var o,c,r=ye(this,e);if(r)return o=Z({},t,{sortBy:ge.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),c=this,function t(r,e,n,i){var a;return i=i||0,Array.isArray(e)?r(e,n[i]):e.data&&0!==e.data.length?(a=e.data.map(function(e){return t(r,e,n,i+1)}),a=r(a,n[i]),Z({data:a},e)):e}(function(e,t){if(o.facetOrdering){t=t;a=(a=c).renderingContent&&a.renderingContent.facetOrdering&&a.renderingContent.facetOrdering.values&&a.renderingContent.facetOrdering.values[t];if(a)return t=e,r=[],n=[],i=((a=a).order||[]).reduce(function(e,t,r){return e[t]=r,e},{}),t.forEach(function(e){var t=e.path||e.name;void 0!==i[t]?r[i[t]]=e:n.push(e)}),r=r.filter(function(e){return e}),"hidden"===(t=a.sortRemainingBy)?r:r.concat(se(n,(a="alpha"===t?[["path","name"],["asc","asc"]]:[["count"],["desc"]])[0],a[1]))}var r,n,i,a;if(Array.isArray(o.sortBy))return t=oe(o.sortBy,ge.DEFAULT_SORT),se(e,t[0],t[1]);if("function"==typeof o.sortBy)return a=o.sortBy,e.sort(a);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")},r,Array.isArray(r)?[e]:c._state.getHierarchicalFacetByName(r.name).attributes)},ge.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?ve(this.facets,e):this._state.isDisjunctiveFacet(e)?ve(this.disjunctiveFacets,e):void 0},ge.prototype.getRefinements=function(){var o=this._state,c=this,s=[];return Object.keys(o.facetsRefinements).forEach(function(t){o.facetsRefinements[t].forEach(function(e){s.push(be(0,"facet",t,e,c.facets))})}),Object.keys(o.facetsExcludes).forEach(function(t){o.facetsExcludes[t].forEach(function(e){s.push(be(0,"exclude",t,e,c.facets))})}),Object.keys(o.disjunctiveFacetsRefinements).forEach(function(t){o.disjunctiveFacetsRefinements[t].forEach(function(e){s.push(be(0,"disjunctive",t,e,c.disjunctiveFacets))})}),Object.keys(o.hierarchicalFacetsRefinements).forEach(function(a){o.hierarchicalFacetsRefinements[a].forEach(function(e){var t,r,n,i;s.push((t=o,r=a,e=e,n=c.hierarchicalFacets,i=t.getHierarchicalFacetByName(r),t=t._getHierarchicalFacetSeparator(i),i=e.split(t),e=m(n,function(e){return e.name===r}),t=i.reduce(function(e,t){var r=e&&m(e.data,function(e){return e.name===t});return void 0!==r?r:e},e),n=t&&t.count||0,i=t&&t.exhaustive||!1,e=t&&t.path||"",{type:"hierarchical",attributeName:r,name:e,count:n,exhaustive:i}))})}),Object.keys(o.numericRefinements).forEach(function(r){var e=o.numericRefinements[r];Object.keys(e).forEach(function(t){e[t].forEach(function(e){s.push({type:"numeric",attributeName:r,name:e,numericValue:e,operator:t})})})}),o.tagRefinements.forEach(function(e){s.push({type:"tag",attributeName:"_tags",name:e})}),s};var Se=ge,q="3.14.0",Oe=B;function t(e,t,r){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper (3.14.0)"),this.setClient(e);e=r||{};e.index=t,this.state=ce.make(e),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0}function je(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function we(){return this.state.page}U(t,W),t.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},t.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},t.prototype.getQuery=function(){var e=this.state;return Y._getHitsSearchParams(e)},t.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,e=Y._getQueries(r.index,r),n=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),!t)return this.client.search(e).then(function(e){return n._currentNbQueries--,0===n._currentNbQueries&&n.emit("searchQueueEmpty"),{content:new Se(r,e.results),state:r,_originalResponse:e}},function(e){throw n._currentNbQueries--,0===n._currentNbQueries&&n.emit("searchQueueEmpty"),e});this.client.search(e).then(function(e){n._currentNbQueries--,0===n._currentNbQueries&&n.emit("searchQueueEmpty"),t(null,new Se(r,e.results),r)}).catch(function(e){n._currentNbQueries--,0===n._currentNbQueries&&n.emit("searchQueueEmpty"),t(e,null,r)})},t.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,r=this.derivedHelpers[0];if(!r)return Promise.resolve([]);var r=r.getModifiedState(t),t=z({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:K(Y._getHitsSearchParams(r),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),n="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if("function"!=typeof this.client.initIndex)throw new Error(n);var i=this.client.initIndex(r.index);if("function"!=typeof i.findAnswers)throw new Error(n);return i.findAnswers(r.query,e.queryLanguages,t)},t.prototype.searchForFacetValues=function(t,e,r,n){var i,a,o,c="function"==typeof this.client.searchForFacetValues,s="function"==typeof this.client.initIndex;if(c||s||"function"==typeof this.client.search)return i=this.state.setQueryParameters(n||{}),a=i.isDisjunctiveFacet(t),n=Y.getSearchForFacetQuery(t,e,r,i),this._currentNbQueries++,o=this,r=c?this.client.searchForFacetValues([{indexName:i.index,params:n}]):s?this.client.initIndex(i.index).searchForFacetValues(n):(delete n.facetName,this.client.search([{type:"facet",facet:t,indexName:i.index,params:n}]).then(function(e){return e.results[0]})),this.emit("searchForFacetValues",{state:i,facet:t,query:e}),r.then(function(e){return o._currentNbQueries--,0===o._currentNbQueries&&o.emit("searchQueueEmpty"),(e=Array.isArray(e)?e[0]:e).facetHits.forEach(function(e){e.escapedValue=Oe(e.value),e.isRefined=a?i.isDisjunctiveFacetRefined(t,e.escapedValue):i.isFacetRefined(t,e.escapedValue)}),e},function(e){throw o._currentNbQueries--,0===o._currentNbQueries&&o.emit("searchQueueEmpty"),e});throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues")},t.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},t.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},t.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},t.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},t.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},t.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},t.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this},t.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},t.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},t.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},t.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},t.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},t.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this},t.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},t.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},t.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},t.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},t.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},t.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},t.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},t.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},t.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},t.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},t.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},t.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},t.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},t.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},t.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},t.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},t.prototype.setCurrentPage=je,t.prototype.setPage=je,t.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},t.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},t.prototype.setState=function(e){return this._change({state:ce.make(e),isPageReset:!1}),this},t.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new ce(e),this},t.prototype.hasRefinements=function(e){return!!X(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},t.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},t.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},t.prototype.hasTag=function(e){return this.state.isTagRefined(e)},t.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},t.prototype.getIndex=function(){return this.state.index},t.prototype.getCurrentPage=we,t.prototype.getPage=we,t.prototype.getTags=function(){return this.state.tagRefinements},t.prototype.getRefinements=function(e){var r=[],n=(this.state.isConjunctiveFacet(e)?(this.state.getConjunctiveRefinements(e).forEach(function(e){r.push({value:e,type:"conjunctive"})}),this.state.getExcludeRefinements(e).forEach(function(e){r.push({value:e,type:"exclude"})})):this.state.isDisjunctiveFacet(e)&&this.state.getDisjunctiveRefinements(e).forEach(function(e){r.push({value:e,type:"disjunctive"})}),this.state.getNumericRefinements(e));return Object.keys(n).forEach(function(e){var t=n[e];r.push({value:t,operator:e,type:"numeric"})}),r},t.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},t.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},t.prototype._search=function(e){var n=this.state,i=[],t=[],e=(e.onlyWithDerivedHelpers||(t=Y._getQueries(n.index,n),i.push({state:n,queriesCount:t.length,helper:this}),this.emit("search",{state:n,results:this.lastResults})),this.derivedHelpers.map(function(e){var t=e.getModifiedState(n),r=t.index?Y._getQueries(t.index,t):[];return i.push({state:t,queriesCount:r.length,helper:e}),e.emit("search",{state:t,results:e.lastResults}),r})),t=Array.prototype.concat.apply(t,e),e=this._queryId++;if(this._currentNbQueries++,!t.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,i,e));try{this.client.search(t).then(this._dispatchAlgoliaResponse.bind(this,i,e)).catch(this._dispatchAlgoliaError.bind(this,e))}catch(e){this.emit("error",{error:e})}},t.prototype._dispatchAlgoliaResponse=function(e,t,r){var n;t<this._lastQueryIdReceived||(this._currentNbQueries-=t-this._lastQueryIdReceived,this._lastQueryIdReceived=t,0===this._currentNbQueries&&this.emit("searchQueueEmpty"),n=r.results.slice(),e.forEach(function(e){var t=e.state,r=e.queriesCount,e=e.helper,r=n.splice(0,r);t.index?(e.lastResults=new Se(t,r),e.emit("result",{results:e.lastResults,state:t})):e.emit("result",{results:null,state:t})}))},t.prototype._dispatchAlgoliaError=function(e,t){e<this._lastQueryIdReceived||(this._currentNbQueries-=e-this._lastQueryIdReceived,this._lastQueryIdReceived=e,this.emit("error",{error:t}),0===this._currentNbQueries&&this.emit("searchQueueEmpty"))},t.prototype.containsRefinement=function(e,t,r,n){return e||0!==t.length||0!==r.length||0!==n.length},t.prototype._hasDisjunctiveRefinements=function(e){return this.state.disjunctiveRefinements[e]&&0<this.state.disjunctiveRefinements[e].length},t.prototype._change=function(e){var t=e.state,e=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:e}))},t.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},t.prototype.setClient=function(e){return this.client!==e&&("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper (3.14.0)"),this.client=e),this},t.prototype.getClient=function(){return this.client},t.prototype.derive=function(e){e=new $(this,e);return this.derivedHelpers.push(e),e},t.prototype.detachDerivedHelper=function(e){e=this.derivedHelpers.indexOf(e);if(-1===e)throw new Error("Derived helper already detached");this.derivedHelpers.splice(e,1)},t.prototype.hasPendingRequests=function(){return 0<this._currentNbQueries};var Pe=t;function Re(e,t,r){return new Pe(e,t,r)}Re.version=q,Re.AlgoliaSearchHelper=Pe,Re.SearchParameters=ce,Re.SearchResults=Se;var y=Re,B=("undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{}).performance||{};B.now||B.mozNow||B.msNow||B.oNow||B.webkitNow;function v(){}function h(e,t){if(void 0===e||"function"!=typeof e)throw new Error("The render function is not valid (received type ".concat(Object.prototype.toString.call(e).slice(8,-1),").\n\n").concat(t))}function Fe(e){var t=e.helper,e=e.attributesToClear,e=void 0===e?[]:e,r=t.state.setPage(0),r=e.reduce(function(e,t){return r.isNumericRefined(t)?e.removeNumericRefinement(t):r.isHierarchicalFacet(t)?e.removeHierarchicalFacetRefinement(t):r.isDisjunctiveFacet(t)?e.removeDisjunctiveFacetRefinement(t):r.isConjunctiveFacet(t)?e.removeFacetRefinement(t):e},r);return r=-1!==e.indexOf("query")?r.setQuery(""):r}var Ee={"&":"&","<":"<",">":">",'"':""","'":"'"},xe=/[&<>"']/g,Ie=RegExp(xe.source);var Ae={"&":"&","<":"<",">":">",""":'"',"'":"'"},Te=/&(amp|quot|lt|gt|#39);/g,_e=RegExp(Te.source);function De(e){return(De="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ne(e){if("object"===De(t=e)&&null!==t&&"[object Object]"===(null===(t=e)?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t))){var t;if(null===Object.getPrototypeOf(e))return 1;for(var r=e;null!==Object.getPrototypeOf(r);)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r}}function ke(e){return(ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function He(){return(He=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r,n=arguments[t];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function We(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function Ce(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?We(Object(r),!0).forEach(function(e){Le(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):We(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Le(e,t,r){return(t=function(e){e=function(e,t){if("object"!==ke(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==ke(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===ke(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Me={highlightPreTag:"__ais-highlight__",highlightPostTag:"__/ais-highlight__"},u={highlightPreTag:"<mark>",highlightPostTag:"</mark>"};function Ue(e){return((e=e)&&Ie.test(e)?e.replace(xe,function(e){return Ee[e]}):e).replace(new RegExp(Me.highlightPreTag,"g"),u.highlightPreTag).replace(new RegExp(Me.highlightPostTag,"g"),u.highlightPostTag)}function Qe(r){return Ne(r)&&"string"!=typeof r.value?Object.keys(r).reduce(function(e,t){return Ce(Ce({},e),{},Le({},t,Qe(r[t])))},{}):Array.isArray(r)?r.map(Qe):Ce(Ce({},r),{},{value:Ue(r.value)})}function $e(e){return void 0===e.__escaped&&((e=e.map(function(e){e=He({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return e._highlightResult&&(e._highlightResult=Qe(e._highlightResult)),e._snippetResult&&(e._snippetResult=Qe(e._snippetResult)),e})).__escaped=!0),e}function Be(e){var t=u.highlightPreTag,r=u.highlightPostTag;return e.map(function(e){return e.isHighlighted?t+e.value+r:e.value}).join("")}function qe(e){return(qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ve(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,c=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return c}}(e,t)||function(e,t){var r;if(e)return"string"==typeof e?Je(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Je(e,t):void 0}(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);r<t;r++)n[r]=e[r];return n}function ze(e){var l=e.instantSearchInstance,h=e.helper,d=e.attribute,p=e.widgetType;return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,i,a,o=t[1],c=t[2],c=void 0===c?"Filter Applied":c,s=Ve(t[0].split(":"),2),u=s[0],s=s[1],f="string"==typeof d?d:d(o);1===t.length&&"object"===qe(t[0])?l.sendEventToInsights(t[0]):"click"!==u||2!==t.length&&3!==t.length||(i=f,a=o,(n=h).state.isHierarchicalFacet(i)?n.state.isHierarchicalFacetRefined(i,a):n.state.isConjunctiveFacet(i)?n.state.isFacetRefined(i,a):n.state.isDisjunctiveFacetRefined(i,a))||l.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:p,eventType:u,eventModifier:s,payload:{eventName:c,index:h.getIndex(),filters:["".concat(f,":").concat(o)]},attribute:f})}}function Xe(e){return btoa(encodeURIComponent(JSON.stringify(e)))}function Ke(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,c=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return c}}(e,t)||function(e,t){var r;if(e)return"string"==typeof e?Ge(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ge(e,t):void 0}(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 Ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ze(e){return(Ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ye(e){var r,n,i,a,t,o,c,s=e.index,u=e.widgetType,f=(e.methodName,e.args),e=e.instantSearchInstance;return 1===f.length&&"object"===Ze(f[0])?[f[0]]:(t=Ke(f[0].split(":"),2),r=t[0],n=t[1],t=f[1],i=f[2],!t||!("click"!==r&&"conversion"!==r||i)||0===(f=Array.isArray(t)?t:[t]).length?[]:(a=f[0].__queryID,t=function(e,t){for(var r=1<arguments.length&&void 0!==t?t:20,n=[],i=0;i<Math.ceil(e.length/r);i++)n.push(e.slice(i*r,(i+1)*r));return n}(f),o=t.map(function(e){return e.map(function(e){return e.objectID})}),c=t.map(function(e){return e.map(function(e){return e.__position})}),"view"===r?"idle"!==e.status?[]:t.map(function(e,t){return{insightsMethod:"viewedObjectIDs",widgetType:u,eventType:r,payload:{eventName:i||"Hits Viewed",index:s,objectIDs:o[t]},hits:e,eventModifier:n}}):"click"===r?t.map(function(e,t){return{insightsMethod:"clickedObjectIDsAfterSearch",widgetType:u,eventType:r,payload:{eventName:i||"Hit Clicked",index:s,queryID:a,objectIDs:o[t],positions:c[t]},hits:e,eventModifier:n}}):"conversion"===r?t.map(function(e,t){return{insightsMethod:"convertedObjectIDsAfterSearch",widgetType:u,eventType:r,payload:{eventName:i||"Hit Converted",index:s,queryID:a,objectIDs:o[t]},hits:e,eventModifier:n}}):[]))}function et(e){var n=e.instantSearchInstance,i=e.index,a=e.widgetType,o={},c=void 0;return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];Ye({widgetType:a,index:i,methodName:"sendEvent",args:t,instantSearchInstance:n}).forEach(function(e){"click"===e.eventType&&"internal"===e.eventModifier&&o[e.eventType]||(o[e.eventType]=!0,n.sendEventToInsights(e))}),clearTimeout(c),c=setTimeout(function(){o={}},0)}}function tt(e){var i=e.index,a=e.widgetType,o=e.instantSearchInstance;return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=Ye({widgetType:a,index:i,methodName:"bindEvent",args:t,instantSearchInstance:o});return n.length?"data-insights-event=".concat(Xe(n)):""}}function rt(e){return"ais.index"===e.$$type}function nt(t,e){var r=t[e.getIndexId()]||{};e.getHelper().setState(e.getWidgetSearchParameters(e.getHelper().state,{uiState:r})),e.getWidgets().filter(rt).forEach(function(e){return nt(t,e)})}var it=Promise.resolve();function at(n){function e(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];null===i&&(i=it.then(function(){i=null,a?a=!1:n.apply(void 0,t)}))}var i=null,a=!1;return e.wait=function(){if(null===i)throw new Error("The deferred function should be called before calling `wait()`");return i},e.cancel=function(){null!==i&&(a=!0)},e}function i(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.map(function(e){return t=(e=e).name,e=e.connector,["https://www.algolia.com/doc/api-reference/widgets/",t,"/js/",void 0!==e&&e?"#connector":""].join("");var t}).join(", ");return function(e){return[e,"See documentation: ".concat(n)].filter(Boolean).join("\n\n")}}function ot(e){return"number"==typeof e&&e<0||"string"==typeof e?String(e).replace(/^-/,"\\-"):e}function ct(e,t){for(var r,n=0;n<e.length;n++)if(t(r=e[n],n,e))return r}function st(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,c=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return c}}(e,t)||function(e,t){var r;if(e)return"string"==typeof e?ut(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ut(e,t):void 0}(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 ut(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ft=/^(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)$/;function lt(e){if(Array.isArray(e)){var t=e,r=st(t,1)[0],n=(r=st(void 0===r?[void 0,void 0,void 0,void 0]:r,4))[0],i=r[1],a=r[2],r=r[3];if(n&&i&&a&&r)return{northEast:{lat:n,lng:i},southWest:{lat:a,lng:r}};throw new Error('Invalid value for "insideBoundingBox" parameter: ['.concat(t,"]"))}n=e,a=(i=st(n.split(",").map(parseFloat),4))[0],r=i[1],t=i[2],i=i[3];if(a&&r&&t&&i)return{northEast:{lat:a,lng:r},southWest:{lat:t,lng:i}};throw new Error('Invalid value for "insideBoundingBox" parameter: "'.concat(n,'"'))}function ht(e){var t=u.highlightPostTag,r=u.highlightPreTag,e=e.split(r),r=e.shift(),n=r?[{value:r,isHighlighted:!1}]:[];return e.forEach(function(e){e=e.split(t);n.push({value:e[0],isHighlighted:!0}),""!==e[1]&&n.push({value:e[1],isHighlighted:!1})}),n}var dt=new RegExp(/\w/i);function pt(e,t){var r=e[t],n=(null==(n=e[t+1])?void 0:n.isHighlighted)||!0,t=(null==(e=e[t-1])?void 0:e.isHighlighted)||!0;return dt.test((e=r.value)&&_e.test(e)?e.replace(Te,function(e){return Ae[e]}):e)||t!==n?r.isHighlighted:t}function mt(e,t){return(Array.isArray(t)?t:t.split(".")).reduce(function(e,t){return e&&e[t]},e)}function gt(e,t,r,n,i){var a,i=4<arguments.length&&void 0!==i?i:[],o={type:t,attribute:r,name:n,escapedValue:ot(n)},c=ct(i,function(e){return e.name===r});if("hierarchical"===t){for(var i=e.getHierarchicalFacetByName(r),s=n.split(i.separator),u=0;void 0!==c&&u<s.length;++u)!function(t){var r;c=c&&c.data&&ct(Object.keys(c.data).map((r=c.data,function(e){return r[e]})),function(e){return e.name===s[t]})}(u);a=c&&c.count}else a=c&&c.data&&c.data[o.name];return void 0!==a&&(o.count=a),c&&void 0!==c.exhaustive&&(o.exhaustive=c.exhaustive),o}function yt(r,n,e){var e=2<arguments.length&&void 0!==e&&e,i=[],t=n.facetsRefinements,a=void 0===t?{}:t,t=n.facetsExcludes,o=void 0===t?{}:t,t=n.disjunctiveFacetsRefinements,c=void 0===t?{}:t,t=n.hierarchicalFacetsRefinements,s=void 0===t?{}:t,t=n.numericRefinements,u=void 0===t?{}:t,t=n.tagRefinements,t=void 0===t?[]:t;return Object.keys(a).forEach(function(t){a[t].forEach(function(e){i.push(gt(n,"facet",t,e,r.facets))})}),Object.keys(o).forEach(function(t){o[t].forEach(function(e){i.push({type:"exclude",attribute:t,name:e,exclude:!0})})}),Object.keys(c).forEach(function(t){c[t].forEach(function(e){i.push(gt(n,"disjunctive",t,"string"==typeof(e=e)?e.replace(/^\\-/,"-"):e,r.disjunctiveFacets))})}),Object.keys(s).forEach(function(t){s[t].forEach(function(e){i.push(gt(n,"hierarchical",t,e,r.hierarchicalFacets))})}),Object.keys(u).forEach(function(r){var n=u[r];Object.keys(n).forEach(function(e){var t=e,e=n[t];(Array.isArray(e)?e:[e]).forEach(function(e){i.push({type:"numeric",attribute:r,name:"".concat(e),numericValue:e,operator:t})})})}),t.forEach(function(e){i.push({type:"tag",attribute:"_tags",name:e})}),e&&n.query&&n.query.trim()&&i.push({attribute:"query",type:"query",name:n.query,query:n.query}),i}function vt(e){return(vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bt(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function St(n){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?bt(Object(i),!0).forEach(function(e){var t,r;t=n,r=i[e=e],(e=function(e){e=function(e,t){if("object"!==vt(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==vt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===vt(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):bt(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}function Ot(e,r,n){return e.map(function(e,t){return St(St({},e),{},{__position:n*r+t+1})})}function jt(e){return(jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function wt(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function Pt(n){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?wt(Object(i),!0).forEach(function(e){var t,r;t=n,r=i[e=e],(e=function(e){e=function(e,t){if("object"!==jt(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==jt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===jt(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):wt(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}function Rt(e,t){return t?e.map(function(e){return Pt(Pt({},e),{},{__queryID:t})}):e}function Ft(e){return e!==Object(e)}function Et(e,t){if(e===t)return 1;if(Ft(e)||Ft(t)||"function"==typeof e||"function"==typeof t)return e===t;if(Object.keys(e).length===Object.keys(t).length){for(var r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];if(!(i in t))return;if(!Et(e[i],t[i]))return}return 1}}function b(e){return"number"==typeof e&&isFinite(e)}function xt(e,t){t(e),e.getWidgets().forEach(function(e){rt(e)&&xt(e,t)})}function It(e){return e.filter(function(e,t,r){return r.indexOf(e)===t})}function At(e){return(At="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Tt=["facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements","ruleContexts"];function _t(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function a(n){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?_t(Object(i),!0).forEach(function(e){var t,r;t=n,r=i[e=e],(e=function(e){e=function(e,t){if("object"!==At(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==At(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===At(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):_t(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}function Dt(e,t){if(null==e)return{};var r,n=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],0<=t.indexOf(r)||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols)for(var i=Object.getOwnPropertySymbols(e),a=0;a<i.length;a++)r=i[a],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r]);return n}function Nt(e,t){return e.setQueryParameters({hierarchicalFacets:t.hierarchicalFacets.reduce(function(e,t){var r=function(e,t){if(Array.isArray(e))for(var r=0;r<e.length;r++)if(t(e[r]))return r;return-1}(e,function(e){return e.name===t.name});return-1===r?e.concat(t):((e=e.slice()).splice(r,1,t),e)},e.hierarchicalFacets)})}var kt=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.reduce(function(e,t){r=t;var e=e.setQueryParameters({hierarchicalFacetsRefinements:a(a({},e.hierarchicalFacetsRefinements),r.hierarchicalFacetsRefinements)}),r=Nt(e,t),e=t.tagRefinements.reduce(function(e,t){return e.addTagRefinement(t)},r),e=(r=t,e.setQueryParameters({numericRefinements:a(a({},e.numericRefinements),r.numericRefinements)})),e=(r=t,e.setQueryParameters({disjunctiveFacetsRefinements:a(a({},e.disjunctiveFacetsRefinements),r.disjunctiveFacetsRefinements)})),e=(r=t,e.setQueryParameters({facetsExcludes:a(a({},e.facetsExcludes),r.facetsExcludes)})),e=(r=t,e.setQueryParameters({facetsRefinements:a(a({},e.facetsRefinements),r.facetsRefinements)})),r=function(e,t){t=It([].concat(e.ruleContexts).concat(t.ruleContexts).filter(Boolean));return 0<t.length?e.setQueryParameters({ruleContexts:t}):e}(t.disjunctiveFacets.reduce(function(e,t){return e.addDisjunctiveFacet(t)},e),t),e=t.facets.reduce(function(e,t){return e.addFacet(t)},r),r=t;return r.facets,r.disjunctiveFacets,r.facetsRefinements,r.facetsExcludes,r.disjunctiveFacetsRefinements,r.numericRefinements,r.tagRefinements,r.hierarchicalFacets,r.hierarchicalFacetsRefinements,r.ruleContexts,r=Dt(r,Tt),e.setQueryParameters(r)})};function Ht(e){return function(e){if(Array.isArray(e))return Wt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var r;if(e)return"string"==typeof e?Wt(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Wt(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ct(e){var t=e.start,r=void 0===t?0:t,t=e.end,e=e.step,e=void 0===e?1:e,n=0===e?1:e,e=Math.round((t-r)/n);return Ht(Array(e)).map(function(e,t){return r+t*n})}function Lt(e,t,r){var n=t.getHelper();return{uiState:r,helper:n,parent:t,instantSearchInstance:e,state:n.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,scopedResults:[],searchMetadata:{isSearchStalled:"stalled"===e.status},status:e.status,error:e.error}}function Mt(e,t){var r=t.getResults(),n=t.getHelper();return{helper:n,parent:t,instantSearchInstance:e,results:r,scopedResults:t.getScopedResults(),state:r?r._state:n.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,searchMetadata:{isSearchStalled:"stalled"===e.status},status:e.status,error:e.error}}function Ut(e){return(Ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qt(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function $t(n){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Qt(Object(i),!0).forEach(function(e){var t,r;t=n,r=i[e=e],(e=function(e){e=function(e,t){if("object"!==Ut(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==Ut(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Ut(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Qt(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}function Bt(r){return r.some(function(e){return e.isHighlighted})?r.map(function(e,t){return $t($t({},e),{},{isHighlighted:!pt(r,t)})}):r.map(function(e){return $t($t({},e),{},{isHighlighted:!1})})}function qt(e,t){t=(1<arguments.length&&void 0!==t?t:{fallback:function(){}}).fallback;return"undefined"==typeof window?t():e({window:window})}function Vt(e){return Array.isArray(e)?e:[e]}function Jt(e){return(Jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zt(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function c(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?zt(Object(r),!0).forEach(function(e){Xt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Xt(e,t,r){return(t=function(e){e=function(e,t){if("object"!==Jt(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==Jt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Jt(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Kt=i({name:"configure",connector:!0});function Gt(e,t){return e.setQueryParameters(Object.keys(t.searchParameters).reduce(function(e,t){return c(c({},e),{},Xt({},t,void 0))},{}))}var Zt=function(){var r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:v,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return function(n){var t;if(n&&Ne(n.searchParameters))return t={},{$$type:"ais.configure",init:function(e){var t=e.instantSearchInstance;r(c(c({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;r(c(c({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return i(),Gt(e,n)},getRenderState:function(e,t){t=this.getWidgetRenderState(t);return c(c({},e),{},{configure:c(c({},t),{},{widgetParams:c(c({},t.widgetParams),{},{searchParameters:kt(new y.SearchParameters(null==(e=e.configure)?void 0:e.widgetParams.searchParameters),new y.SearchParameters(t.widgetParams.searchParameters)).getQueryParams()})})})},getWidgetRenderState:function(e){var r,e=e.helper;return t.refine||(t.refine=(r=e,function(e){var t=Gt(r.state,n),t=kt(t,new y.SearchParameters(e));n.searchParameters=e,r.setState(t).search()})),{refine:t.refine,widgetParams:n}},getWidgetSearchParameters:function(e,t){t=t.uiState;return kt(e,new y.SearchParameters(c(c({},t.configure),n.searchParameters)))},getWidgetUiState:function(e){return c(c({},e),{},{configure:c(c({},e.configure),n.searchParameters)})}};throw new Error(Kt("The `searchParameters` option expects an object."))}};function Yt(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function er(n){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Yt(Object(i),!0).forEach(function(e){var t,r;t=n,r=i[e=e],(e=function(e){e=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Yt(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}function tr(e){return(tr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rr(e,t){if(null==e)return{};var r,n=function(e,t){if(null==e)return{};for(var r,n={},i=Object.keys(e),a=0;a<i.length;a++)r=i[a],0<=t.indexOf(r)||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols)for(var i=Object.getOwnPropertySymbols(e),a=0;a<i.length;a++)r=i[a],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r]);return n}function nr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,c=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return c}}(e,t)||function(e,t){var r;if(e)return"string"==typeof e?ir(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ir(e,t):void 0}(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 ir(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ar=Object.prototype.hasOwnProperty;function or(e,t,r){if(null!=r&&r(e,t))return!0;var n,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((i=e.length)===t.length)for(;i--&&or(e[i],t[i],r););return-1===i}if(!n||"object"===tr(e)){for(n in i=0,e){if(ar.call(e,n)&&++i&&!ar.call(t,n))return!1;if(!(n in t&&or(e[n],t[n],r)))return!1}return Object.keys(t).length===i}}return e!=e&&t!=t}function cr(e){var t;return new y.SearchResults(e,[{query:null!=(t=e.query)?t:"",page:null!=(t=e.page)?t:0,hitsPerPage:null!=(t=e.hitsPerPage)?t:20,hits:[],nbHits:0,nbPages:0,params:"",exhaustiveNbHits:!0,exhaustiveFacetsCount:!0,processingTimeMS:0,index:e.index}],{__isArtificial:!0})}function sr(r){var e=r.getHelper(),n=r.getResults()||cr(e.state),e=r.getScopedResults().map(function(e){var t=e.indexId===r.getIndexId()?n:cr(e.helper.state);return er(er({},e),{},{results:e.results||t})});return{results:n,scopedResults:e}}function ur(e){if(!e)throw new Error("Invariant failed")}var fr=g.createContext(null);function lr(){var e=g.useContext(fr);return ur(null!==e),e}var hr=g.createContext(null);function dr(){var e=g.useContext(hr);return ur(null!==e),e}var pr=g.createContext(null);function mr(){return g.useContext(pr)}function gr(e){var t=nr(g.useState(function(){return e}),2),r=t[0],t=t[1];return or(r,e)||t(e),r}var yr="undefined"!=typeof window?g.useLayoutEffect:g.useEffect;function vr(e){var t=e.widget,r=e.parentIndex,n=e.props,e=e.shouldSsr,i=g.useRef(n),a=(g.useEffect(function(){i.current=n},[n]),g.useRef(t)),o=(g.useEffect(function(){a.current=t},[t]),g.useRef(null)),c=e&&!r.getWidgets().includes(t),s=dr();yr(function(){var e=a.current;return o.current?(clearTimeout(o.current),or(n,i.current)||(r.removeWidgets([e]),r.addWidgets([t]))):c||r.addWidgets([t]),function(){o.current=setTimeout(function(){s._schedule(function(){s._preventWidgetCleanup||r.removeWidgets([e])})})}},[r,t,c,s,n]),c&&r.addWidgets([t])}var br=["instantSearchInstance","widgetParams"],Sr=["widgetParams"];function l(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},n=mr(),i=dr(),a=lr(),o=gr(t),c=gr(r),s=g.useRef(!0),u=g.useRef(null),f=g.useRef(i.status),l=g.useMemo(function(){return er(er({},e(function(e,t){t?s.current=!0:s.current&&(t=e.instantSearchInstance,e.widgetParams,or(e=rr(e,br),u.current,function(e,t){return(null==e?void 0:e.constructor)===Function&&(null==t?void 0:t.constructor)===Function})&&t.status===f.current||(h(e),u.current=e,f.current=t.status))},function(){s.current=!1})(o)),c)},[e,o,c]),t=nr(g.useState(function(){var e,t,r;return l.getWidgetRenderState?(e=a.getHelper(),r=a.getWidgetUiState({})[a.getIndexId()],e.state=(null==(t=l.getWidgetSearchParameters)?void 0:t.call(l,e.state,{uiState:r}))||e.state,r=(t=sr(a)).results,t=t.scopedResults,(r=l.getWidgetRenderState({helper:e,parent:a,instantSearchInstance:i,results:r,scopedResults:t,state:e.state,renderState:i.renderState,templatesConfig:i.templatesConfig,createURL:a.createURL,searchMetadata:{isSearchStalled:"stalled"===i.status},status:i.status,error:i.error})).widgetParams,rr(r,Sr)):{}}),2),r=t[0],h=t[1];return vr({widget:l,parentIndex:a,props:o,shouldSsr:Boolean(n)}),r}function Or(e,t){return l(Zt,{searchParameters:e},t)}function jr(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function wr(n){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?jr(Object(i),!0).forEach(function(e){var t,r;t=n,r=i[e=e],(e=function(e){e=function(e,t){if("object"!==Pr(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==Pr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Pr(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):jr(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}function Pr(e){return(Pr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Rr=i({name:"dynamic-widgets",connector:!0}),Fr=function(u){var o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(u,Rr()),function(r){var c,e=r.widgets,t=r.maxValuesPerFacet,n=void 0===t?20:t,t=r.facets,i=void 0===t?["*"]:t,t=r.transformItems,a=void 0===t?function(e){return e}:t,s=r.fallbackWidget;if(!(e&&Array.isArray(e)&&e.every(function(e){return"object"===Pr(e)})))throw new Error(Rr("The `widgets` option expects an array of widgets."));if(Array.isArray(i)&&i.length<=1&&("*"===i[0]||void 0===i[0]))return c=new Map,{$$type:"ais.dynamicWidgets",init:function(r){e.forEach(function(e){var t=function(e,t){var r=null==(r=e.getWidgetRenderState)?void 0:r.call(e,t),t=null;if(r&&r.widgetParams&&((r=r.widgetParams).attribute?t=r.attribute:Array.isArray(r.attributes)&&(t=r.attributes[0])),"string"!=typeof t)throw new Error("Could not find the attribute of the widget:\n\n".concat(JSON.stringify(e),"\n\nPlease check whether the widget's getWidgetRenderState returns widgetParams.attribute correctly."));return t}(e,r);c.set(t,{widget:e,isMounted:!1})}),u(wr(wr({},this.getWidgetRenderState(r)),{},{instantSearchInstance:r.instantSearchInstance}),!0)},render:function(e){var t=e.parent,i=this.getWidgetRenderState(e),a=[],o=[];s&&i.attributesToRender.forEach(function(e){var t;c.has(e)||(t=s({attribute:e}),c.set(e,{widget:t,isMounted:!1}))}),c.forEach(function(e,t){var r=e.widget,e=e.isMounted,n=-1<i.attributesToRender.indexOf(t);!e&&n?(o.push(r),c.set(t,{widget:r,isMounted:!0})):e&&!n&&(a.push(r),c.set(t,{widget:r,isMounted:!1}))}),t.addWidgets(o),setTimeout(function(){return t.removeWidgets(a)},0),u(wr(wr({},i),{},{instantSearchInstance:e.instantSearchInstance}),!1)},dispose:function(e){var e=e.parent,r=[];c.forEach(function(e){var t=e.widget;e.isMounted&&r.push(t)}),e.removeWidgets(r),o()},getWidgetSearchParameters:function(e){return i.reduce(function(e,t){return e.addFacet(t)},e.setQueryParameters({maxValuesPerFacet:Math.max(n||0,e.maxValuesPerFacet||0)}))},getRenderState:function(e,t){return wr(wr({},e),{},{dynamicWidgets:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results;e.state;if(!t)return{attributesToRender:[],widgetParams:r};e=a(null!=(e=null==(e=t.renderingContent)||null==(e=e.facetOrdering)||null==(e=e.facets)?void 0:e.order)?e:[],{results:t});if(Array.isArray(e))return{attributesToRender:e,widgetParams:r};throw new Error(Rr("The `transformItems` option expects a function that returns an Array."))}};throw new Error(Rr('The `facets` option only accepts [] or ["*"], you passed '.concat(JSON.stringify(i))))}};function Er(e,t){return l(Fr,er(er({},e),{},{widgets:[]}),t)}var xr=["children","fallbackComponent"];function Ir(){return null}function Ar(e){return"object"===tr(e)&&e.props}function Tr(e){return(Tr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var _r=["initialSearchParameters"];function Dr(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function S(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Dr(Object(r),!0).forEach(function(e){Nr(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Dr(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Nr(e,t,r){return(t=function(e){e=function(e,t){if("object"!==Tr(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==Tr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Tr(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kr(e){return function(e){if(Array.isArray(e))return Hr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var r;if(e)return"string"==typeof e?Hr(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Hr(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Wr(e,t){if(null==e)return{};var r,n=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],0<=t.indexOf(r)||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols)for(var i=Object.getOwnPropertySymbols(e),a=0;a<i.length;a++)r=i[a],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r]);return n}var Cr=i({name:"index-widget"});function Lr(e,t){var r=t.state,n=t.isPageReset,t=t._uiState;r!==e.state&&(e.state=r,e.emit("change",{state:e.state,results:e.lastResults,isPageReset:n,_uiState:t}))}function Mr(e,r,t){return e.reduce(function(e,t){return!rt(t)&&(t.getWidgetUiState||t.getWidgetState)?t.getWidgetUiState?t.getWidgetUiState(e,r):t.getWidgetState(e,r):e},2<arguments.length&&void 0!==t?t:{})}function Ur(e,t){var r=t.initialSearchParameters,n=Wr(t,_r);return e.filter(function(e){return!rt(e)}).reduce(function(e,t){return t.getWidgetSearchParameters?t.getWidgetSearchParameters(e,n):e},r)}var Qr=function(e){if(void 0===e||void 0===e.indexName)throw new Error(Cr("The `indexName` option is required."));var o=e.indexName,e=e.indexId,c=void 0===e?o:e,s=[],u={},f=null,l=null,h=null,d=null,p=null;return{$$type:"ais.index",$$widgetType:"ais.index",getIndexName:function(){return o},getIndexId:function(){return c},getHelper:function(){return h},getResults:function(){var e;return null!=(e=d)&&e.lastResults?(d.lastResults._state=h.state,d.lastResults):null},getPreviousState:function(){return p},getScopedResults:function(){var e=this.getParent();return function r(e){return e.filter(rt).reduce(function(e,t){return e.concat.apply(e,[{indexId:t.getIndexId(),results:t.getResults(),helper:t.getHelper()}].concat(kr(r(t.getWidgets()))))},[])}(e?e.getWidgets():[this])},getParent:function(){return l},createURL:function(e){return"function"==typeof e?f._createURL(Nr({},c,e(u))):f._createURL(Nr({},c,Mr(s,{searchParameters:e,helper:h})))},getWidgets:function(){return s},addWidgets:function(e){var t=this;if(!Array.isArray(e))throw new Error(Cr("The `addWidgets` method expects an array of widgets."));if(e.some(function(e){return"function"!=typeof e.init&&"function"!=typeof e.render}))throw new Error(Cr("The widget definition expects a `render` and/or an `init` method."));return s=s.concat(e),f&&Boolean(e.length)&&(Lr(h,{state:Ur(s,{uiState:u,initialSearchParameters:h.state}),_uiState:u}),e.forEach(function(e){e.getRenderState&&$r({renderState:e.getRenderState(f.renderState[t.getIndexId()]||{},Lt(f,t,f._initialUiState)),instantSearchInstance:f,parent:t})}),e.forEach(function(e){e.init&&e.init(Lt(f,t,f._initialUiState))}),f.scheduleSearch()),this},removeWidgets:function(t){var e,r=this;if(!Array.isArray(t))throw new Error(Cr("The `removeWidgets` method expects an array of widgets."));if(t.some(function(e){return"function"!=typeof e.dispose}))throw new Error(Cr("The widget definition expects a `dispose` method."));return s=s.filter(function(e){return-1===t.indexOf(e)}),f&&Boolean(t.length)&&(e=t.reduce(function(e,t){return t.dispose({helper:h,state:e,parent:r})||e},h.state),u=Mr(s,{searchParameters:e,helper:h}),h.setState(Ur(s,{uiState:u,initialSearchParameters:e})),s.length)&&f.scheduleSearch(),this},init:function(e){var i,t=this,r=e.instantSearchInstance,n=e.parent,a=e.uiState;null===h&&(f=r,l=n,u=a[c]||{},i=r.mainHelper,e=Ur(s,{uiState:u,initialSearchParameters:new y.SearchParameters({index:o})}),(h=y({},e.index,e)).search=function(){return r.onStateChange?(r.onStateChange({uiState:r.mainIndex.getWidgetUiState({}),setUiState:function(e){return r.setUiState(e,!1)}}),i):i.search()},h.searchWithoutTriggeringOnStateChange=function(){return i.search()},h.searchForFacetValues=function(e,t,r,n){n=h.state.setQueryParameters(n);return i.searchForFacetValues(e,t,r,n)},d=i.derive(function(){return kt.apply(void 0,kr(function(e){for(var t=e.getParent(),r=[e.getHelper().state];null!==t;)r=[t.getHelper().state].concat(r),t=t.getParent();return r}(t)))}),(e=null==(n=r._initialResults)?void 0:n[this.getIndexId()])&&(n=new y.SearchResults(new y.SearchParameters(e.state),e.results),d.lastResults=n,h.lastResults=n),h.on("change",function(e){e.isPageReset&&!function r(e){e=e.filter(rt);0!==e.length&&e.forEach(function(e){var t=e.getHelper();Lr(t,{state:t.state.resetPage(),isPageReset:!0}),r(e.getWidgets())})}(s)}),d.on("search",function(){r.scheduleStalledRender()}),d.on("result",function(e){e=e.results;r.scheduleRender(),h.lastResults=e,p=null==e?void 0:e._state}),s.forEach(function(e){e.getRenderState&&$r({renderState:e.getRenderState(r.renderState[t.getIndexId()]||{},Lt(r,t,a)),instantSearchInstance:r,parent:t})}),s.forEach(function(e){e.init&&e.init(Lt(r,t,a))}),h.on("change",function(e){var t=e.state,e=e._uiState;u=Mr(s,{searchParameters:t,helper:h},e||{}),r.onStateChange||r.onInternalStateChange()}),e)&&r.scheduleRender()},render:function(e){var t=this,r=e.instantSearchInstance,e=("error"===r.status&&!r.mainHelper.hasPendingRequests()&&p&&h.setState(p),this.getResults()?s:s.filter(rt));e.forEach(function(e){e.getRenderState&&$r({renderState:e.getRenderState(r.renderState[t.getIndexId()]||{},Mt(r,t)),instantSearchInstance:r,parent:t})}),e.forEach(function(e){e.render&&e.render(Mt(r,t))})},dispose:function(){var e,t=this;s.forEach(function(e){e.dispose&&e.dispose({helper:h,state:h.state,parent:t})}),(l=f=null)!=(e=h)&&e.removeAllListeners(),(h=null)!=(e=d)&&e.detach(),d=null},getWidgetUiState:function(e){return s.filter(rt).reduce(function(e,t){return t.getWidgetUiState(e)},S(S({},e),{},Nr({},c,S(S({},e[c]),u))))},getWidgetState:function(e){return this.getWidgetUiState(e)},getWidgetSearchParameters:function(e,t){t=t.uiState;return Ur(s,{uiState:t,initialSearchParameters:e})},refreshUiState:function(){u=Mr(s,{searchParameters:this.getHelper().state,helper:this.getHelper()},u)},setIndexUiState:function(e){var t="function"==typeof e?e(u):e;f.setUiState(function(e){return S(S({},e),{},Nr({},c,t))})}}};function $r(e){var t=e.renderState,r=e.instantSearchInstance,e=e.parent,e=(e||r.mainIndex).getIndexId();r.renderState=S(S({},r.renderState),{},Nr({},e,S(S({},r.renderState[e]),t)))}function Br(){return nr(g.useReducer(function(e){return e+1},0),2)[1]}var qr=g.createContext(null);function Vr(){return g.useContext(qr)}var Jr=["children"];function zr(r){return function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.descendantName,e=e.modifierName,t=t?"-".concat(t):"",e=e?"--".concat(e):"";return"".concat("ais","-").concat(r).concat(t).concat(e)}}var Xr=zr("Highlight");var Kr=zr("ReverseHighlight");var Gr=zr("Snippet");var Zr=zr("ReverseSnippet");function Yr(e){return(Yr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function en(e,t){var r,e={method:e,payload:t},t=e.method;if("object"!==Yr(e=e.payload))throw new Error("The insights helper expects the payload to be an object.");try{r=Xe(e)}catch(e){throw new Error("Could not JSON serialize the payload object.")}return'data-insights-method="'.concat(t,'" data-insights-payload="').concat(r,'"')}function tn(e){return(tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var rn="_ALGOLIA";function nn(){var e=rn;if("object"===("undefined"==typeof document?"undefined":tn(document))&&"string"==typeof document.cookie)for(var t="".concat(e,"="),r=document.cookie.split(";"),n=0;n<r.length;n++){for(var i=r[n];" "===i.charAt(0);)i=i.substring(1);if(0===i.indexOf(t))return i.substring(t.length,i.length)}}function an(e){return(an="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function on(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function cn(n){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?on(Object(i),!0).forEach(function(e){var t,r;t=n,r=i[e=e],(e=function(e){e=function(e,t){if("object"!==an(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==an(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===an(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):on(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}function sn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,c=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return c}}(e,t)||fn(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 un(e){return function(e){if(Array.isArray(e))return ln(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||fn(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fn(e,t){var r;if(e)return"string"==typeof e?ln(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ln(e,t):void 0}function ln(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var hn="2.6.0",dn="https://cdn.jsdelivr.net/npm/search-insights@".concat(hn,"/dist/search-insights.min.js");function pn(e){var e=0<arguments.length&&void 0!==e?e:{},t=e.insightsClient,l=e.insightsInitParams,h=e.onEvent,e=e.$$internal,d=void 0!==e&&e,r=t,p=(t||null===t||qt(function(e){var n=e.window,i=n.AlgoliaAnalyticsObject||"aa";(r="string"==typeof i?n[i]:r)||(n.AlgoliaAnalyticsObject=i,n[i]||(n[i]=function(){n[i].queue||(n[i].queue=[]);for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];n[i].queue.push(t)},n[i].version=hn,n[i].shouldAddScript=!0),r=n[i])}),r||v);return function(e){var n=e.instantSearchInstance,e=n.middleware.filter(function(e){return"ais.insights"===e.instance.$$type&&e.instance.$$internal}).map(function(e){return e.creator});n.unuse.apply(n,un(e));var t,r,i,a,o=sn((e=n.client).transporter?(o=(r=e.transporter).headers,r=r.queryParameters,[o[t="x-algolia-application-id"]||r[t],o[t="x-algolia-api-key"]||r[t]]):[e.applicationID,e.apiKey],2),c=o[0],s=o[1],u=void 0,f=void 0;return Array.isArray(p.queue)&&(r=ct(p.queue.slice().reverse(),function(e){return"setUserToken"===sn(e,1)[0]})||[],u=sn(r,2)[1]),p("getUserToken",null,function(e,t){f=t}),!l&&mn(p)||p("init",cn({appId:c,apiKey:s,partial:!0},l)),{$$type:"ais.insights",$$internal:d,onStateChange:function(){},subscribe:function(){if(p.shouldAddScript){var t="[insights middleware]: could not load search-insights.js. Please load it manually following https://alg.li/insights-init";try{var e=document.createElement("script");e.async=!0,e.src=dn,e.onerror=function(){n.emit("error",new Error(t))},document.body.appendChild(e),p.shouldAddScript=!1}catch(e){p.shouldAddScript=!1,n.emit("error",new Error(t))}}},started:function(){p("addAlgoliaAgent","insights-middleware"),a=n.helper,i={userToken:a.state.userToken,clickAnalytics:a.state.clickAnalytics},a.overrideStateWithoutTriggeringChangeEvent(cn(cn({},a.state),{},{clickAnalytics:!0})),d||n.scheduleSearch();function e(e){var t;function r(){a.overrideStateWithoutTriggeringChangeEvent(cn(cn({},a.state),{},{userToken:e})),t&&t!==e&&n.scheduleSearch()}e&&(t=a.state.userToken,1<arguments.length&&void 0!==arguments[1]&&arguments[1]?r():setTimeout(r,0))}var t=nn(),r=(t&&e(t,!0),f?(e(f,!0),p("setUserToken",f)):u&&(e(u,!0),p("setUserToken",u)),p("onUserTokenChange",e,{immediate:!0}),p);mn(p)&&(r=function(e,t){return p(e,t,{headers:{"X-Algolia-Application-Id":c,"X-Algolia-API-Key":s}})}),n.sendEventToInsights=function(e){h?h(e,r):e.insightsMethod&&(e.payload.algoliaSource=["instantsearch"],"internal"===e.eventModifier&&e.payload.algoliaSource.push("instantsearch-internal"),r(e.insightsMethod,e.payload))}},unsubscribe:function(){p("onUserTokenChange",void 0),n.sendEventToInsights=v,a&&i&&(a.overrideStateWithoutTriggeringChangeEvent(cn(cn({},a.state),i)),n.scheduleSearch())}}}}function mn(e){var e=sn((e.version||"").split(".").map(Number),2),t=e[0],e=e[1];return 3<=t||2===t&&6<=e||1===t&&10<=e}function gn(e){var e=(0<arguments.length&&void 0!==e?e:{}).$$internal,a=void 0!==e&&e;return function(e){var t=e.instantSearchInstance,r={widgets:[]},n=document.createElement("meta"),i=document.querySelector("head");return n.name="instantsearch:widgets",{$$type:"ais.metadata",$$internal:a,onStateChange:function(){},subscribe:function(){setTimeout(function(){var e=t.client;r.ua=e.transporter&&e.transporter.userAgent?e.transporter.userAgent.value:e._ua,function n(e,i,a){var o=Lt(i,i.mainIndex,i._initialUiState);e.forEach(function(e){var t={},r=(e.getWidgetRenderState&&(r=e.getWidgetRenderState(o))&&r.widgetParams&&(t=r.widgetParams),Object.keys(t).filter(function(e){return void 0!==t[e]}));a.widgets.push({type:e.$$type,widgetType:e.$$widgetType,params:r}),"ais.index"===e.$$type&&n(e.getWidgets(),i,a)})}(t.mainIndex.getWidgets(),t,r),t.middleware.forEach(function(e){return r.widgets.push({middleware:!0,type:e.instance.$$type,internal:e.instance.$$internal})}),n.content=JSON.stringify(r),i.appendChild(n)},0)},started:function(){},unsubscribe:function(){n.remove()}}}}function yn(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r}function vn(e,t,r,n,i,a,o,c,s,u,f,l,h,d){var p=e;if("function"==typeof o?p=o(t,p):p instanceof Date?p=u(p):"comma"===r&&En(p)&&(p=Pn.maybeMap(p,function(e){return e instanceof Date?u(e):e})),null===p){if(n)return a&&!h?a(t,w.encoder,d,"key",f):t;p=""}if(_n(p)||Pn.isBuffer(p)){if(a){e=h?t:a(t,w.encoder,d,"key",f);if("comma"===r&&h){for(var m=xn.call(String(p),","),g="",y=0;y<m.length;++y)g+=(0===y?"":",")+l(a(m[y],w.encoder,d,"value",f));return[l(e)+"="+g]}return[l(e)+"="+l(a(p,w.encoder,d,"value",f))]}return[l(t)+"="+l(String(p))]}var v,b=[];if(void 0!==p){v="comma"===r&&En(p)?[{value:0<p.length?p.join(",")||null:void 0}]:En(o)?o:(e=Object.keys(p),c?e.sort(c):e);for(var S=0;S<v.length;++S){var O=v[S],j="object"==typeof O&&void 0!==O.value?O.value:p[O];i&&null===j||(O=En(p)?"function"==typeof r?r(t,O):t:t+(s?"."+O:"["+O+"]"),An(b,vn(j,O,r,n,i,a,o,c,s,u,f,l,h,d)))}}return b}var bn=String.prototype.replace,Sn=/%20/g,U="RFC3986",On={default:U,formatters:{RFC1738:function(e){return bn.call(e,Sn,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:U},jn=Object.prototype.hasOwnProperty,wn=Array.isArray,d=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Pn={arrayToObject:yn,assign:function(e,r){return Object.keys(r).reduce(function(e,t){return e[t]=r[t],e},e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var i=t[n],a=i.obj[i.prop],o=Object.keys(a),c=0;c<o.length;++c){var s=o[c],u=a[s];"object"==typeof u&&null!==u&&-1===r.indexOf(u)&&(t.push({obj:a,prop:s}),r.push(u))}for(var f=t;1<f.length;){var l=f.pop(),h=l.obj[l.prop];if(wn(h)){for(var d=[],p=0;p<h.length;++p)void 0!==h[p]&&d.push(h[p]);l.obj[l.prop]=d}}return e},decode:function(t,e,r){t=t.replace(/\+/g," ");if("iso-8859-1"===r)return t.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(t)}catch(e){return t}},encode:function(e,t,r,n,i){if(0===e.length)return e;var a=e;if("symbol"==typeof e?a=Symbol.prototype.toString.call(e):"string"!=typeof e&&(a=String(e)),"iso-8859-1"===r)return escape(a).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var o="",c=0;c<a.length;++c){var s=a.charCodeAt(c);45===s||46===s||95===s||126===s||48<=s&&s<=57||65<=s&&s<=90||97<=s&&s<=122||i===On.RFC1738&&(40===s||41===s)?o+=a.charAt(c):s<128?o+=d[s]:s<2048?o+=d[192|s>>6]+d[128|63&s]:s<55296||57344<=s?o+=d[224|s>>12]+d[128|s>>6&63]+d[128|63&s]:(c+=1,s=65536+((1023&s)<<10|1023&a.charCodeAt(c)),o+=d[240|s>>18]+d[128|s>>12&63]+d[128|s>>6&63]+d[128|63&s])}return o},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(wn(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function n(i,a,o){if(!a)return i;if("object"!=typeof a){if(wn(i))i.push(a);else{if(!i||"object"!=typeof i)return[i,a];(o&&(o.plainObjects||o.allowPrototypes)||!jn.call(Object.prototype,a))&&(i[a]=!0)}return i}var e;return i&&"object"==typeof i?(wn(e=i)&&!wn(a)&&(e=yn(i,o)),wn(i)&&wn(a)?(a.forEach(function(e,t){var r;jn.call(i,t)?(r=i[t])&&"object"==typeof r&&e&&"object"==typeof e?i[t]=n(r,e,o):i.push(e):i[t]=e}),i):Object.keys(a).reduce(function(e,t){var r=a[t];return jn.call(e,t)?e[t]=n(e[t],r,o):e[t]=r,e},e)):[i].concat(a)}},Rn=Object.prototype.hasOwnProperty,Fn={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},En=Array.isArray,xn=String.prototype.split,In=Array.prototype.push,An=function(e,t){In.apply(e,En(t)?t:[t])},Tn=Date.prototype.toISOString,q=On.default,w={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Pn.encode,encodeValuesOnly:!1,format:q,formatter:On.formatters[q],indices:!1,serializeDate:function(e){return Tn.call(e)},skipNulls:!1,strictNullHandling:!1},_n=function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||"symbol"==typeof e||"bigint"==typeof e},Dn=Object.prototype.hasOwnProperty,Nn=Array.isArray,p={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Pn.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},kn=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},Hn=function(e,t){return e&&"string"==typeof e&&t.comma&&-1<e.indexOf(",")?e.split(","):e},Wn="utf8=%26%2310003%3B",Cn="utf8=%E2%9C%93",Ln=function(e,t,r,n){for(var i=n?t:Hn(t,r),a=e.length-1;0<=a;--a){var o,c,s,u=e[a];"[]"===u&&r.parseArrays?o=[].concat(i):(o=r.plainObjects?Object.create(null):{},c="["===u.charAt(0)&&"]"===u.charAt(u.length-1)?u.slice(1,-1):u,s=parseInt(c,10),r.parseArrays||""!==c?!isNaN(s)&&u!==c&&String(s)===c&&0<=s&&r.parseArrays&&s<=r.arrayLimit?(o=[])[s]=i:"__proto__"!==c&&(o[c]=i):o={0:i}),i=o}return i},Mn={formats:On,parse:function(e,t){var r=function(e){if(!e)return p;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=(void 0===e.charset?p:e).charset;return{allowDots:void 0===e.allowDots?p.allowDots:!!e.allowDots,allowPrototypes:("boolean"==typeof e.allowPrototypes?e:p).allowPrototypes,arrayLimit:("number"==typeof e.arrayLimit?e:p).arrayLimit,charset:t,charsetSentinel:("boolean"==typeof e.charsetSentinel?e:p).charsetSentinel,comma:("boolean"==typeof e.comma?e:p).comma,decoder:("function"==typeof e.decoder?e:p).decoder,delimiter:("string"==typeof e.delimiter||Pn.isRegExp(e.delimiter)?e:p).delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:p.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:("boolean"==typeof e.interpretNumericEntities?e:p).interpretNumericEntities,parameterLimit:("number"==typeof e.parameterLimit?e:p).parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:("boolean"==typeof e.plainObjects?e:p).plainObjects,strictNullHandling:("boolean"==typeof e.strictNullHandling?e:p).strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var n="string"==typeof e?function(e,t){var r,n,i,a,o={},e=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,c=t.parameterLimit===1/0?void 0:t.parameterLimit,s=e.split(t.delimiter,c),u=-1,f=t.charset;if(t.charsetSentinel)for(r=0;r<s.length;++r)0===s[r].indexOf("utf8=")&&(s[r]===Cn?f="utf-8":s[r]===Wn&&(f="iso-8859-1"),u=r,r=s.length);for(r=0;r<s.length;++r)r!==u&&((a=-1===(a=-1===(a=(n=s[r]).indexOf("]="))?n.indexOf("="):a+1)?(i=t.decoder(n,p.decoder,f,"key"),t.strictNullHandling?null:""):(i=t.decoder(n.slice(0,a),p.decoder,f,"key"),Pn.maybeMap(Hn(n.slice(a+1),t),function(e){return t.decoder(e,p.decoder,f,"value")})))&&t.interpretNumericEntities&&"iso-8859-1"===f&&(a=kn(a)),-1<n.indexOf("[]=")&&(a=Nn(a)?[a]:a),Dn.call(o,i)?o[i]=Pn.combine(o[i],a):o[i]=a);return o}(e,r):e,i=r.plainObjects?Object.create(null):{},a=Object.keys(n),o=0;o<a.length;++o)var c=a[o],c=function(e,t,r,n){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,o=0<r.depth&&/(\[[^[\]]*])/.exec(i),e=o?i.slice(0,o.index):i,c=[];if(e){if(!r.plainObjects&&Dn.call(Object.prototype,e)&&!r.allowPrototypes)return;c.push(e)}for(var s=0;0<r.depth&&null!==(o=a.exec(i))&&s<r.depth;){if(s+=1,!r.plainObjects&&Dn.call(Object.prototype,o[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(o[1])}return o&&c.push("["+i.slice(o.index)+"]"),Ln(c,t,r,n)}}(c,n[c],r,"string"==typeof e),i=Pn.merge(i,c,r);return Pn.compact(i)},stringify:function(e,t){var r=e,n=function(e){if(!e)return w;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||w.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=On.default;if(void 0!==e.format){if(!Rn.call(On.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=On.formatters[r],i=w.filter;return"function"!=typeof e.filter&&!En(e.filter)||(i=e.filter),{addQueryPrefix:("boolean"==typeof e.addQueryPrefix?e:w).addQueryPrefix,allowDots:void 0===e.allowDots?w.allowDots:!!e.allowDots,charset:t,charsetSentinel:("boolean"==typeof e.charsetSentinel?e:w).charsetSentinel,delimiter:(void 0===e.delimiter?w:e).delimiter,encode:("boolean"==typeof e.encode?e:w).encode,encoder:("function"==typeof e.encoder?e:w).encoder,encodeValuesOnly:("boolean"==typeof e.encodeValuesOnly?e:w).encodeValuesOnly,filter:i,format:r,formatter:n,serializeDate:("function"==typeof e.serializeDate?e:w).serializeDate,skipNulls:("boolean"==typeof e.skipNulls?e:w).skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:("boolean"==typeof e.strictNullHandling?e:w).strictNullHandling}}(t),i=("function"==typeof n.filter?r=(0,n.filter)("",r):En(n.filter)&&(o=n.filter),[]);if("object"!=typeof r||null===r)return"";var e=t&&t.arrayFormat in Fn?t.arrayFormat:!(t&&"indices"in t)||t.indices?"indices":"repeat",a=Fn[e],o=o||Object.keys(r);n.sort&&o.sort(n.sort);for(var c=0;c<o.length;++c){var s=o[c];n.skipNulls&&null===r[s]||An(i,vn(r[s],s,a,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset))}t=i.join(n.delimiter),e=!0===n.addQueryPrefix?"?":"";return n.charsetSentinel&&("iso-8859-1"===n.charset?e+="utf8=%26%2310003%3B&":e+="utf8=%E2%9C%93&"),0<t.length?e+t:""}};function Un(e){return(Un="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qn(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,$n(n.key),n)}}function O(e,t,r){(t=$n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}function $n(e){e=function(e,t){if("object"!==Un(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==Un(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Un(e)?e:String(e)}function Bn(e){e&&(window.document.title=e)}var qn=function(){function u(e){var r=this,t=e.windowTitle,n=e.writeDelay,n=void 0===n?400:n,i=e.createURL,a=e.parseURL,o=e.getLocation,c=e.start,s=e.dispose,e=e.push;if(!(this instanceof u))throw new TypeError("Cannot call a class as a function");O(this,"$$type","ais.browser"),O(this,"windowTitle",void 0),O(this,"writeDelay",void 0),O(this,"_createURL",void 0),O(this,"parseURL",void 0),O(this,"getLocation",void 0),O(this,"writeTimer",void 0),O(this,"_onPopState",void 0),O(this,"inPopState",!1),O(this,"isDisposed",!1),O(this,"latestAcknowledgedHistory",0),O(this,"_start",void 0),O(this,"_dispose",void 0),O(this,"_push",void 0),this.windowTitle=t,this.writeTimer=void 0,this.writeDelay=n,this._createURL=i,this.parseURL=a,this.getLocation=o,this._start=c,this._dispose=s,this._push=e,qt(function(e){var e=e.window,t=r.windowTitle&&r.windowTitle(r.read());Bn(t),r.latestAcknowledgedHistory=e.history.length})}var e,t,r;return e=u,(t=[{key:"read",value:function(){return this.parseURL({qsModule:Mn,location:this.getLocation()})}},{key:"write",value:function(i){var a=this;qt(function(e){var t=e.window,r=a.createURL(i),n=a.windowTitle&&a.windowTitle(i);a.writeTimer&&clearTimeout(a.writeTimer),a.writeTimer=setTimeout(function(){Bn(n),a.shouldWrite(r)&&(a._push?a._push(r):t.history.pushState(i,n||"",r),a.latestAcknowledgedHistory=t.history.length),a.inPopState=!1,a.writeTimer=void 0},a.writeDelay)})}},{key:"onUpdate",value:function(e){var t=this;this._start&&this._start(function(){e(t.read())}),this._onPopState=function(){t.writeTimer&&(clearTimeout(t.writeTimer),t.writeTimer=void 0),t.inPopState=!0,e(t.read())},qt(function(e){e.window.addEventListener("popstate",t._onPopState)})}},{key:"createURL",value:function(e){return this._createURL({qsModule:Mn,routeState:e,location:this.getLocation()})}},{key:"dispose",value:function(){var t=this;this._dispose&&this._dispose(),this.isDisposed=!0,qt(function(e){e=e.window;t._onPopState&&e.removeEventListener("popstate",t._onPopState)}),this.writeTimer&&clearTimeout(this.writeTimer),this.write({})}},{key:"start",value:function(){this.isDisposed=!1}},{key:"shouldWrite",value:function(r){var n=this;return qt(function(e){var e=e.window,t=!(n.isDisposed&&n.latestAcknowledgedHistory!==e.history.length);return!n.inPopState&&t&&r!==e.location.href})}}])&&Qn(e.prototype,t),r&&Qn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),u}();function Vn(e){return(Vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Jn=["configure"];function zn(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function Xn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?zn(Object(r),!0).forEach(function(e){Kn(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zn(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Kn(e,t,r){return(t=function(e){e=function(e,t){if("object"!==Vn(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==Vn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Vn(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gn(e,t){if(null==e)return{};var r,n=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],0<=t.indexOf(r)||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols)for(var i=Object.getOwnPropertySymbols(e),a=0;a<i.length;a++)r=i[a],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r]);return n}function Zn(e){e.configure;return Gn(e,Jn)}function Yn(e){return(Yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ei(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function ti(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ei(Object(r),!0).forEach(function(e){ri(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ei(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function ri(e,t,r){return(t=function(e){e=function(e,t){if("object"!==Yn(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==Yn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Yn(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ni(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.router,i=void 0===t?function(e){var e=0<arguments.length&&void 0!==e?e:{},t=e.createURL,r=e.parseURL,n=e.writeDelay,i=e.windowTitle,a=e.getLocation,o=e.start,c=e.dispose,e=e.push;return new qn({createURL:void 0===t?function(e){var t=e.qsModule,r=e.routeState,e=e.location,n=e.protocol,i=e.hostname,a=e.port,a=void 0===a?"":a,o=e.pathname,e=e.hash,t=t.stringify(r),r=""===a?"":":".concat(a);return(t?"".concat(n,"//").concat(i).concat(r).concat(o,"?").concat(t):"".concat(n,"//").concat(i).concat(r).concat(o)).concat(e)}:t,parseURL:void 0===r?function(e){var t=e.qsModule,e=e.location;return t.parse(e.search.slice(1),{arrayLimit:99})}:r,writeDelay:void 0===n?400:n,windowTitle:i,getLocation:void 0===a?function(){return qt(function(e){return e.window.location},{fallback:function(){throw new Error("You need to provide `getLocation` to the `history` router in environments where `window` does not exist.")}})}:a,start:o,dispose:c,push:e})}():t,a=void 0===(t=e.stateMapping)?{$$type:"ais.simple",stateToRoute:function(r){return Object.keys(r).reduce(function(e,t){return Xn(Xn({},e),{},Kn({},t,Zn(r[t])))},{})},routeToState:function(){var r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(r).reduce(function(e,t){return Xn(Xn({},e),{},Kn({},t,Zn(r[t])))},{})}}:t,o=void 0!==(t=e.$$internal)&&t;return function(e){var t=e.instantSearchInstance;t._createURL=function(r){var e=0===t.mainIndex.getWidgets().length?t._initialUiState:t.mainIndex.getWidgetUiState({}),e=Object.keys(r).reduce(function(e,t){return ti(ti({},e),{},ri({},t,r[t]))},e),e=a.stateToRoute(e);return i.createURL(e)};var r=void 0,n=t._initialUiState;return{$$type:"ais.router({router:".concat(i.$$type||"__unknown__",", stateMapping:").concat(a.$$type||"__unknown__","})"),$$internal:o,onStateChange:function(e){e=e.uiState,e=a.stateToRoute(e);void 0!==r&&Et(r,e)||(i.write(e),r=e)},subscribe:function(){t._initialUiState=ti(ti({},n),a.routeToState(i.read())),i.onUpdate(function(e){0<t.mainIndex.getWidgets().length&&t.setUiState(a.routeToState(e))})},started:function(){var e;null!=(e=i.start)&&e.call(i)},unsubscribe:function(){i.dispose()}}}}function ii(e){return(ii="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ai(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function oi(n){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ai(Object(i),!0).forEach(function(e){var t,r;t=n,r=i[e=e],(e=function(e){e=function(e,t){if("object"!==ii(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==ii(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===ii(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):ai(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}function ci(e){var r=e.numberLocale;return{formatNumber:function(e,t){return Number(t(e)).toLocaleString(r)},highlight:function(e,t){try{var r=JSON.parse(e);return t((n=oi(oi({},r),{},{hit:this}),i=n.attribute,a=void 0===(a=n.highlightedTagName)?"mark":a,o=n.hit,n=void 0===(n=n.cssClasses)?{}:n,i=void 0===(o=(mt(o._highlightResult,i)||{}).value)?"":o,o=Xr({descendantName:"highlighted"})+(n.highlighted?" ".concat(n.highlighted):""),i.replace(new RegExp(u.highlightPreTag,"g"),"<".concat(a,' class="').concat(o,'">')).replace(new RegExp(u.highlightPostTag,"g"),"</".concat(a,">"))))}catch(e){throw new Error('\nThe highlight helper expects a JSON object of the format:\n{ "attribute": "name", "highlightedTagName": "mark" }')}var n,i,a,o},reverseHighlight:function(e,t){try{var r=JSON.parse(e);return t((n=oi(oi({},r),{},{hit:this}),i=n.attribute,a=void 0===(a=n.highlightedTagName)?"mark":a,o=n.hit,n=void 0===(n=n.cssClasses)?{}:n,i=void 0===(o=(mt(o._highlightResult,i)||{}).value)?"":o,o=Kr({descendantName:"highlighted"})+(n.highlighted?" ".concat(n.highlighted):""),Be(Bt(ht(i))).replace(new RegExp(u.highlightPreTag,"g"),"<".concat(a,' class="').concat(o,'">')).replace(new RegExp(u.highlightPostTag,"g"),"</".concat(a,">"))))}catch(e){throw new Error('\n The reverseHighlight helper expects a JSON object of the format:\n { "attribute": "name", "highlightedTagName": "mark" }')}var n,i,a,o},snippet:function(e,t){try{var r=JSON.parse(e);return t((n=oi(oi({},r),{},{hit:this}),i=n.attribute,a=void 0===(a=n.highlightedTagName)?"mark":a,o=n.hit,n=void 0===(n=n.cssClasses)?{}:n,i=void 0===(o=(mt(o._snippetResult,i)||{}).value)?"":o,o=Gr({descendantName:"highlighted"})+(n.highlighted?" ".concat(n.highlighted):""),i.replace(new RegExp(u.highlightPreTag,"g"),"<".concat(a,' class="').concat(o,'">')).replace(new RegExp(u.highlightPostTag,"g"),"</".concat(a,">"))))}catch(e){throw new Error('\nThe snippet helper expects a JSON object of the format:\n{ "attribute": "name", "highlightedTagName": "mark" }')}var n,i,a,o},reverseSnippet:function(e,t){try{var r=JSON.parse(e);return t((n=oi(oi({},r),{},{hit:this}),i=n.attribute,a=void 0===(a=n.highlightedTagName)?"mark":a,o=n.hit,n=void 0===(n=n.cssClasses)?{}:n,i=void 0===(o=(mt(o._snippetResult,i)||{}).value)?"":o,o=Zr({descendantName:"highlighted"})+(n.highlighted?" ".concat(n.highlighted):""),Be(Bt(ht(i))).replace(new RegExp(u.highlightPreTag,"g"),"<".concat(a,' class="').concat(o,'">')).replace(new RegExp(u.highlightPostTag,"g"),"</".concat(a,">"))))}catch(e){throw new Error('\n The reverseSnippet helper expects a JSON object of the format:\n { "attribute": "name", "highlightedTagName": "mark" }')}var n,i,a,o},insights:function(e,t){try{var r=JSON.parse(e),n=r.method,i=r.payload;return t(en(n,oi({objectIDs:[this.objectID]},i)))}catch(e){throw new Error('\nThe insights helper expects a JSON object of the format:\n{ "method": "method-name", "payload": { "eventName": "name of the event" } }')}}}}function si(e){return(si="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ui(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function fi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,pi(n.key),n)}}function li(e,t){return(li=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function hi(r){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=di(r),t=(e=n?(e=di(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===si(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return j(t)}}function j(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function di(e){return(di=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function P(e,t,r){(t=pi(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}function pi(e){e=function(e,t){if("object"!==si(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==si(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===si(e)?e:String(e)}var R=i({name:"instantsearch"});function mi(){return"#"}var gi=function(){var e=h,t=W;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&li(e,t);var r,l=hi(h);function h(e){var r;if(!(this instanceof h))throw new TypeError("Cannot call a class as a function");P(j(r=l.call(this)),"client",void 0),P(j(r),"indexName",void 0),P(j(r),"insightsClient",void 0),P(j(r),"onStateChange",null),P(j(r),"helper",void 0),P(j(r),"mainHelper",void 0),P(j(r),"mainIndex",void 0),P(j(r),"started",void 0),P(j(r),"templatesConfig",void 0),P(j(r),"renderState",{}),P(j(r),"_stalledSearchDelay",void 0),P(j(r),"_searchStalledTimer",void 0),P(j(r),"_initialUiState",void 0),P(j(r),"_initialResults",void 0),P(j(r),"_createURL",void 0),P(j(r),"_searchFunction",void 0),P(j(r),"_mainHelperSearch",void 0),P(j(r),"middleware",[]),P(j(r),"sendEventToInsights",void 0),P(j(r),"status","idle"),P(j(r),"error",void 0),P(j(r),"scheduleSearch",at(function(){r.started&&r.mainHelper.search()})),P(j(r),"scheduleRender",at(function(){var e,t=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];null!=(e=r.mainHelper)&&e.hasPendingRequests()||(clearTimeout(r._searchStalledTimer),r._searchStalledTimer=null,t&&(r.status="idle",r.error=void 0)),r.mainIndex.render({instantSearchInstance:j(r)}),r.emit("render")})),P(j(r),"onInternalStateChange",at(function(){var t=r.mainIndex.getWidgetUiState({});r.middleware.forEach(function(e){e.instance.onStateChange({uiState:t})})})),r.setMaxListeners(100);var t=e.indexName,t=void 0===t?"":t,n=e.numberLocale,i=e.initialUiState,i=void 0===i?{}:i,a=e.routing,a=void 0===a?null:a,o=e.insights,o=void 0!==o&&o,c=e.searchFunction,s=e.stalledSearchDelay,s=void 0===s?200:s,u=e.searchClient,u=void 0===u?null:u,f=e.insightsClient,f=void 0===f?null:f,e=e.onStateChange,e=void 0===e?null:e;if(null===u)throw new Error(R("The `searchClient` option is required."));if("function"!=typeof u.search)throw new Error("The `searchClient` must implement a `search` method.\n\nSee: https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/backend-instantsearch/js/");if("function"==typeof u.addAlgoliaAgent&&u.addAlgoliaAgent("instantsearch.js (".concat("4.56.8",")")),f&&"function"!=typeof f)throw new Error(R("The `insightsClient` option should be a function."));return r.client=u,r.insightsClient=f,r.indexName=t,r.helper=null,r.mainHelper=null,r.mainIndex=Qr({indexName:t}),r.onStateChange=e,r.started=!1,r.templatesConfig={helpers:ci({numberLocale:n}),compileOptions:{}},r._stalledSearchDelay=s,r._searchStalledTimer=null,r._createURL=mi,r._initialUiState=i,r._initialResults=null,c&&(r._searchFunction=c),r.sendEventToInsights=v,a&&((u="boolean"==typeof a?{}:a).$$internal=!0,r.use(ni(u))),o&&((f="boolean"==typeof o?{}:o).$$internal=!0,r.use(pn(f))),qt(function(e){return-1<(null==(e=e.window.navigator)||null==(e=e.userAgent)?void 0:e.indexOf("Algolia Crawler"))},{fallback:function(){return!1}})&&r.use(gn({$$internal:!0})),r}return e=h,(t=[{key:"_isSearchStalled",get:function(){return"stalled"===this.status}},{key:"use",value:function(){for(var r=this,e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t.map(function(e){var t=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ui(Object(r),!0).forEach(function(e){P(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ui(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({$$type:"__unknown__",$$internal:!1,subscribe:v,started:v,unsubscribe:v,onStateChange:v},e({instantSearchInstance:r}));return r.middleware.push({creator:e,instance:t}),t});return this.started&&i.forEach(function(e){e.subscribe(),e.started()}),this}},{key:"unuse",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.middleware.filter(function(e){return t.includes(e.creator)}).forEach(function(e){return e.instance.unsubscribe()}),this.middleware=this.middleware.filter(function(e){return!t.includes(e.creator)}),this}},{key:"EXPERIMENTAL_use",value:function(){return this.use.apply(this,arguments)}},{key:"addWidget",value:function(e){return this.addWidgets([e])}},{key:"addWidgets",value:function(e){if(!Array.isArray(e))throw new Error(R("The `addWidgets` method expects an array of widgets. Please use `addWidget`."));if(e.some(function(e){return"function"!=typeof e.init&&"function"!=typeof e.render}))throw new Error(R("The widget definition expects a `render` and/or an `init` method."));return this.mainIndex.addWidgets(e),this}},{key:"removeWidget",value:function(e){return this.removeWidgets([e])}},{key:"removeWidgets",value:function(e){if(!Array.isArray(e))throw new Error(R("The `removeWidgets` method expects an array of widgets. Please use `removeWidget`."));if(e.some(function(e){return"function"!=typeof e.dispose}))throw new Error(R("The widget definition expects a `dispose` method."));return this.mainIndex.removeWidgets(e),this}},{key:"start",value:function(){var n=this;if(this.started)throw new Error(R("The `start` method has already been called once."));var r,e,i=this.mainHelper||y(this.client,this.indexName);i.search=function(){return n.status="loading",n.scheduleRender(!1),i.searchOnlyWithDerivedHelpers()},this._searchFunction&&(r={search:function(){return new Promise(v)}},this._mainHelperSearch=i.search.bind(i),i.search=function(){var t=n.mainIndex.getHelper(),e=y(r,t.state.index,t.state);return e.once("search",function(e){e=e.state;t.overrideStateWithoutTriggeringChangeEvent(e),n._mainHelperSearch()}),e.on("change",function(e){e=e.state;t.setState(e)}),n._searchFunction(e),i}),i.on("error",function(e){var r,e=e.error;e instanceof Error||(r=e,e=Object.keys(r).reduce(function(e,t){return e[t]=r[t],e},new Error(r.message))),e.error=e,n.error=e,n.status="error",n.scheduleRender(!1),n.emit("error",e)}),this.mainHelper=i,this.middleware.forEach(function(e){e.instance.subscribe()}),this.mainIndex.init({instantSearchInstance:this,parent:null,uiState:this._initialUiState}),this._initialResults?(e=this.scheduleSearch,this.scheduleSearch=at(v),at(function(){n.scheduleSearch=e})()):0<this.mainIndex.getWidgets().length&&this.scheduleSearch(),this.helper=this.mainIndex.getHelper(),this.started=!0,this.middleware.forEach(function(e){e.instance.started()})}},{key:"dispose",value:function(){var e;this.scheduleSearch.cancel(),this.scheduleRender.cancel(),clearTimeout(this._searchStalledTimer),this.removeWidgets(this.mainIndex.getWidgets()),this.mainIndex.dispose(),this.started=!1,this.removeAllListeners(),null!=(e=this.mainHelper)&&e.removeAllListeners(),this.mainHelper=null,this.helper=null,this.middleware.forEach(function(e){e.instance.unsubscribe()})}},{key:"scheduleStalledRender",value:function(){var e=this;this._searchStalledTimer||(this._searchStalledTimer=setTimeout(function(){e.status="stalled",e.scheduleRender()},this._stalledSearchDelay))}},{key:"setUiState",value:function(e){var t=this,r=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];if(!this.mainHelper)throw new Error(R("The `start` method needs to be called before `setUiState`."));this.mainIndex.refreshUiState();var n="function"==typeof e?e(this.mainIndex.getWidgetUiState({})):e;this.onStateChange&&r?this.onStateChange({uiState:n,setUiState:function(e){nt("function"==typeof e?e(n):e,t.mainIndex),t.scheduleSearch(),t.onInternalStateChange()}}):(nt(n,this.mainIndex),this.scheduleSearch(),this.onInternalStateChange())}},{key:"getUiState",value:function(){return this.started&&this.mainIndex.refreshUiState(),this.mainIndex.getWidgetUiState({})}},{key:"createURL",value:function(){if(this.started)return this._createURL(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{});throw new Error(R("The `start` method needs to be called before `createURL`."))}},{key:"refresh",value:function(){if(!this.mainHelper)throw new Error(R("The `start` method needs to be called before `refresh`."));this.mainHelper.clearCache().search()}}])&&fi(e.prototype,t),r&&fi(e,r),Object.defineProperty(e,"prototype",{writable:!1}),h}();function yi(e,t){return e(t={exports:{}},t.exports),t.exports}var vi="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},bi=s.useState,Si=s.useEffect,Oi=s.useLayoutEffect,ji=s.useDebugValue;function wi(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!vi(e,r)}catch(e){return 1}}var B="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=bi({inst:{value:r,getSnapshot:t}}),i=n[0].inst,a=n[1];return Oi(function(){i.value=r,i.getSnapshot=t,wi(i)&&a({inst:i})},[e,r,t]),Si(function(){return wi(i)&&a({inst:i}),e(function(){wi(i)&&a({inst:i})})},[e]),ji(r),r},Pi={useSyncExternalStore:void 0!==s.useSyncExternalStore?s.useSyncExternalStore:B},Ri=(yi(function(e,t){}).useSyncExternalStore,yi(function(e){e.exports=Pi}).useSyncExternalStore),Fi=["react (".concat(g.version,")"),"react-instantsearch (".concat(H,")"),"react-instantsearch-core (".concat(H,")")],Ei="react-instantsearch-server (".concat(H,")"),xi=function(e){return e?"next.js (".concat(e,")"):null};function Ii(e){var t,r=Br(),n=mr(),i=Vr(),a=null==i?void 0:i.initialResults,o=g.useRef(e),c=g.useRef(null),i=(null===(c=i?i.ssrSearchRef:c).current&&((t=new gi(e))._schedule=function(e){t._schedule.queue.push(e),clearTimeout(t._schedule.timer),t._schedule.timer=setTimeout(function(){t._schedule.queue.forEach(function(e){e()}),t._schedule.queue=[]},0)},t._schedule.queue=[],(n||a)&&(t._initialResults=a||{}),Ai(e.searchClient,[].concat(Fi,[n&&Ei,xi("undefined"!=typeof window&&(null==(s=window.next)?void 0:s.version)||("undefined"==typeof process||null==(s=process.env)?void 0:s.NEXT_RUNTIME))])),(n||a)&&t.start(),n&&n.notifyServer({search:t}),e.routing,c.current=t),c.current),s=o.current,u=(s.indexName!==e.indexName&&(i.helper.setIndex(e.indexName||"").search(),o.current=e),s.searchClient!==e.searchClient&&(Ai(e.searchClient,[].concat(Fi,[n&&Ei])),i.mainHelper.setClient(e.searchClient).search(),o.current=e),s.onStateChange!==e.onStateChange&&(i.onStateChange=e.onStateChange,o.current=e),s.searchFunction!==e.searchFunction&&(i._searchFunction=e.searchFunction,o.current=e),s.stalledSearchDelay!==e.stalledSearchDelay&&(i._stalledSearchDelay=null!=(a=e.stalledSearchDelay)?a:200,o.current=e),g.useRef(null));return Ri(g.useCallback(function(){var e=c.current;return null===u.current?e.started||(e.start(),r()):(clearTimeout(u.current),e._preventWidgetCleanup=!1),function(){clearTimeout(e._schedule.timer),u.current=setTimeout(function(){e.dispose()}),e._preventWidgetCleanup=!0}},[r]),function(){return c.current},function(){return c.current})}function Ai(t,e){"function"==typeof t.addAlgoliaAgent&&e.filter(Boolean).forEach(function(e){t.addAlgoliaAgent(e)})}var Ti=["children"];var _i=["children"];function Di(e){var t=e.children,e=rr(e,_i),r=s.useRef(null);return 0===Object.keys(e).length?s.createElement(s.Fragment,null,t):s.createElement(qr.Provider,{value:er(er({},e),{},{ssrSearchRef:r})},t)}function Ni(e){return(Ni="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ki(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function F(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ki(Object(r),!0).forEach(function(e){Hi(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ki(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Hi(e,t,r){return(t=function(e){e=function(e,t){if("object"!==Ni(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==Ni(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Ni(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wi(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,c=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return c}}(e,t)||function(e,t){var r;if(e)return"string"==typeof e?Ci(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ci(e,t):void 0}(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 Ci(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Li(u){var f=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v,l=(h(u,Mi()),{});return function(o){var r,e=o||{},n=e.attributes,t=e.separator,i=void 0===t?" > ":t,t=e.rootPath,a=void 0===t?null:t,t=e.transformItems,c=void 0===t?function(e){return e}:t;if(n&&Array.isArray(n)&&0!==n.length)return r=Wi(n,1)[0],{$$type:"ais.breadcrumb",init:function(e){u(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(e){u(F(F({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!1)},dispose:function(){f()},getRenderState:function(e,t){return F(F({},e),{},{breadcrumb:F(F({},e.breadcrumb),{},Hi({},r,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var r=this,n=e.helper,i=e.createURL,t=e.results,e=e.state;var a,e=t&&0!==e.hierarchicalFacets.length?(e=Wi(e.hierarchicalFacets,1)[0].name,e=(e=t.getFacetValues(e,{}))&&!Array.isArray(e)&&e.data?e.data:[],c((a=function r(e){return e.reduce(function(e,t){return e=t.isRefined&&(e.push({label:t.name,value:t.escapedValue}),Array.isArray(t.data))?e.concat(r(t.data)):e},[])}(e)).map(function(e,t){return{label:e.label,value:t+1===a.length?null:a[t+1].value}}),{results:t})):[];return l.createURL||(l.createURL=function(t){return i(function(e){return r.getWidgetUiState(e,{searchParameters:s(n.state,t),helper:n})})}),l.refine||(l.refine=function(e){n.setState(s(n.state,e)).search()}),{canRefine:0<e.length,createURL:l.createURL,items:e,refine:l.refine,widgetParams:o}},getWidgetUiState:function(e,t){t=t.searchParameters.getHierarchicalFacetBreadcrumb(r);return t.length?F(F({},e),{},{hierarchicalMenu:F(F({},e.hierarchicalMenu),{},Hi({},r,t))}):e},getWidgetSearchParameters:function(e,t){t=t.uiState,t=t.hierarchicalMenu&&t.hierarchicalMenu[r];if(e.isConjunctiveFacet(r)||e.isDisjunctiveFacet(r))return e;e.isHierarchicalFacet(r)&&e.getHierarchicalFacetByName(r);e=e.removeHierarchicalFacet(r).addHierarchicalFacet({name:r,attributes:n,separator:i,rootPath:a});return t?e.addHierarchicalFacetRefinement(r,t.join(i)):e.setQueryParameters({hierarchicalFacetsRefinements:F(F({},e.hierarchicalFacetsRefinements),{},Hi({},r,[]))})}};throw new Error(Mi("The `attributes` option expects an array of strings."));function s(e,t){return t?e.resetPage().toggleFacetRefinement(r,t):0===(t=e.getHierarchicalFacetBreadcrumb(r)).length?e:e.resetPage().toggleFacetRefinement(r,t[0])}}}var Mi=i({name:"breadcrumb",connector:!0});function Ui(e){return(Ui="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qi(e){return function(e){if(Array.isArray(e))return $i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var r;if(e)return"string"==typeof e?$i(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$i(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Bi(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function qi(n){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Bi(Object(i),!0).forEach(function(e){var t,r;t=n,r=i[e=e],(e=function(e){e=function(e,t){if("object"!==Ui(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==Ui(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Ui(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Bi(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}function Vi(r){var o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(r,Ji()),function(n){var e=n||{},t=e.includedAttributes,c=void 0===t?[]:t,t=e.excludedAttributes,s=void 0===t?["query"]:t,t=e.transformItems,u=void 0===t?function(e){return e}:t;if(n&&n.includedAttributes&&n.excludedAttributes)throw new Error(Ji("The options `includedAttributes` and `excludedAttributes` cannot be used together."));function i(){return f.refine()}function a(){return f.createURL()}var f={refine:v,createURL:function(){return""},attributesToClear:[]};return{$$type:"ais.clearRefinements",init:function(e){var t=e.instantSearchInstance;r(qi(qi({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;r(qi(qi({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(){o()},getRenderState:function(e,t){return qi(qi({},e),{},{clearRefinements:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.createURL,r=e.scopedResults,o=e.results,e=(f.attributesToClear=r.reduce(function(e,t){return e.concat((t=(e={scopedResult:t,includedAttributes:c,excludedAttributes:s,transformItems:u,results:o}).scopedResult,r=e.includedAttributes,n=e.excludedAttributes,i=e.transformItems,e=e.results,a=-1!==r.indexOf("query")||-1===n.indexOf("query"),{helper:t.helper,items:i(It(yt(t.results,t.helper.state,a).map(function(e){return e.attribute}).filter(function(e){return 0===r.length||-1!==r.indexOf(e)}).filter(function(e){return"query"===e&&a||-1===n.indexOf(e)})),{results:e})}));var r,n,i,a},[]),f.refine=function(){f.attributesToClear.forEach(function(e){var t=e.helper,e=e.items;t.setState(Fe({helper:t,attributesToClear:e})).search()})},f.createURL=function(){return t(kt.apply(void 0,Qi(f.attributesToClear.map(function(e){return Fe({helper:e.helper,attributesToClear:e.items})}))))},f.attributesToClear.some(function(e){return 0<e.items.length}));return{canRefine:e,hasRefinements:e,refine:i,createURL:a,widgetParams:n}}}}}var Ji=i({name:"clear-refinements",connector:!0});function zi(e){return(zi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xi(e){return function(e){if(Array.isArray(e))return Ki(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var r;if(e)return"string"==typeof e?Ki(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ki(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ki(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Gi(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function Zi(n){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Gi(Object(i),!0).forEach(function(e){var t,r;t=n,r=i[e=e],(e=function(e){e=function(e,t){if("object"!==zi(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==zi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===zi(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Gi(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}function Yi(r){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(r,ea()),function(a){if((a||{}).includedAttributes&&(a||{}).excludedAttributes)throw new Error(ea("The options `includedAttributes` and `excludedAttributes` cannot be used together."));var e=a||{},o=e.includedAttributes,t=e.excludedAttributes,c=void 0===t?["query"]:t,t=e.transformItems,s=void 0===t?function(e){return e}:t;return{$$type:"ais.currentRefinements",init:function(e){var t=e.instantSearchInstance;r(Zi(Zi({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;r(Zi(Zi({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(){n()},getRenderState:function(e,t){return Zi(Zi({},e),{},{currentRefinements:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var r=e.results,t=e.scopedResults,n=e.createURL,i=e.helper;e=r?t.reduce(function(e,t){return e.concat(s(ta({results:t.results,helper:t.helper,indexId:t.indexId,includedAttributes:o,excludedAttributes:c}),{results:r}))},[]):s(ta({results:{},helper:i,indexId:i.state.index,includedAttributes:o,excludedAttributes:c}),{results:r});return{items:e,canRefine:0<e.length,refine:function(e){return na(i,e)},createURL:function(e){return n(ra(i.state,e))},widgetParams:a}}}}}var ea=i({name:"current-refinements",connector:!0});function ta(e){var t=e.results,r=e.helper,n=e.indexId,i=e.includedAttributes,a=e.excludedAttributes,e=-1!==(i||[]).indexOf("query")||-1===(a||[]).indexOf("query"),o=i?function(e){return-1!==i.indexOf(e.attribute)}:function(e){return-1===a.indexOf(e.attribute)},c=yt(t,r.state,e).map(ia).filter(o);return c.reduce(function(e,t){return[].concat(Xi(e.filter(function(e){return e.attribute!==t.attribute})),[{indexName:r.state.index,indexId:n,attribute:t.attribute,label:t.attribute,refinements:c.filter(function(e){return e.attribute===t.attribute}).sort(function(e,t){return"numeric"===e.type?e.value-t.value:0}),refine:function(e){return na(r,e)}}])},[])}function ra(e,t){switch(e=e.resetPage(),t.type){case"facet":return e.removeFacetRefinement(t.attribute,String(t.value));case"disjunctive":return e.removeDisjunctiveFacetRefinement(t.attribute,String(t.value));case"hierarchical":return e.removeHierarchicalFacetRefinement(t.attribute);case"exclude":return e.removeExcludeRefinement(t.attribute,String(t.value));case"numeric":return e.removeNumericRefinement(t.attribute,t.operator,String(t.value));case"tag":return e.removeTagRefinement(String(t.value));case"query":return e.setQueryParameter("query","");default:return e}}function na(e,t){e.setState(ra(e.state,t)).search()}function ia(e){var t=function(e){if("numeric"===e.type)return Number(e.name);if("escapedValue"in e)return e.escapedValue;return e.name}(e),r=e.operator?"".concat(function(e){switch(e){case">=":return"≥";case"<=":return"≤";default:return e}}(e.operator)," ").concat(e.name):e.name,t={attribute:e.attribute,type:e.type,value:t,label:r};return void 0!==e.operator&&(t.operator=e.operator),void 0!==e.count&&(t.count=e.count),void 0!==e.exhaustive&&(t.exhaustive=e.exhaustive),t}function aa(e){return(aa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oa(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function ca(n){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?oa(Object(i),!0).forEach(function(e){var t,r;t=n,r=i[e=e],(e=function(e){e=function(e,t){if("object"!==aa(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==aa(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===aa(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):oa(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var sa=i({name:"geo-search",connector:!0});function ua(e){return e.insideBoundingBox||""}function fa(e,t){return e.setQueryParameter("insideBoundingBox",t)}function la(g){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(g,sa()),function(c){function s(e){if(e.aroundLatLng){var e=e.aroundLatLng,t=e.match(ft);if(t)return{lat:parseFloat(t[1]),lng:parseFloat(t[2])};throw new Error('Invalid value for "aroundLatLng" parameter: "'.concat(e,'"'))}}function u(){return m.internalToggleRefineOnMapMove()}function a(e,t){return function(){m.isRefineOnMapMove=!m.isRefineOnMapMove,t(e)}}function f(){return m.isRefineOnMapMove}function l(){return m.internalSetMapMoveSinceLastRefine()}function o(t,r){return function(){var e=!0!==m.hasMapMoveSinceLastRefine;m.hasMapMoveSinceLastRefine=!0,e&&r(t)}}function h(){return m.hasMapMoveSinceLastRefine}var d,e=c||{},t=e.enableRefineOnMapMove,e=e.transformItems,p=void 0===e?function(e){return e}:e,m={isRefineOnMapMove:void 0===t||t,hasMapMoveSinceLastRefine:!1,lastRefinePosition:"",lastRefineBoundingBox:"",internalToggleRefineOnMapMove:v,internalSetMapMoveSinceLastRefine:v};return{$$type:ha,init:function(e){var t=e.instantSearchInstance;m.internalToggleRefineOnMapMove=a(e,v),m.internalSetMapMoveSinceLastRefine=o(e,v),g(ca(ca({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.helper,r=e.instantSearchInstance,t=t.state,n=Boolean(t.aroundLatLng)&&Boolean(m.lastRefinePosition)&&t.aroundLatLng!==m.lastRefinePosition,i=!t.insideBoundingBox&&Boolean(m.lastRefineBoundingBox)&&t.insideBoundingBox!==m.lastRefineBoundingBox,n=((n||i)&&(m.hasMapMoveSinceLastRefine=!1),m.lastRefinePosition=t.aroundLatLng||"",m.lastRefineBoundingBox=ua(t),m.internalToggleRefineOnMapMove=a(e,this.render.bind(this)),m.internalSetMapMoveSinceLastRefine=o(e,this.render.bind(this)),this.getWidgetRenderState(e));d("view:internal",n.items),g(ca(ca({},n),{},{instantSearchInstance:r}),!1)},getWidgetRenderState:function(e){var t,r,n,i=e.helper,a=e.results,e=e.instantSearchInstance,o=i.state,a=a?p(a.hits.filter(function(e){return e._geoloc}),{results:a}):[];return d=d||et({instantSearchInstance:e,index:i.getIndex(),widgetType:ha}),{items:a,position:s(o),currentRefinement:(e=o).insideBoundingBox&<(e.insideBoundingBox),refine:function(e){var t=e.northEast,e=e.southWest,t=[t.lat,t.lng,e.lat,e.lng].join();n.setState(fa(n.state,t).resetPage()).search(),m.hasMapMoveSinceLastRefine=!1,m.lastRefineBoundingBox=t},sendEvent:d,clearMapRefinement:(r=n=i,function(){r.setQueryParameter("insideBoundingBox",void 0).search()}),isRefinedWithMap:(t=o,function(){return Boolean(t.insideBoundingBox)}),toggleRefineOnMapMove:u,isRefineOnMapMove:f,setMapMoveSinceLastRefine:l,hasMapMoveSinceLastRefine:h,widgetParams:c}},getRenderState:function(e,t){return ca(ca({},e),{},{geoSearch:this.getWidgetRenderState(t)})},dispose:function(e){e=e.state;return r(),e.setQueryParameter("insideBoundingBox",void 0)},getWidgetUiState:function(e,t){t=ua(t.searchParameters);return!t||e&&e.geoSearch&&e.geoSearch.boundingBox===t?e:ca(ca({},e),{},{geoSearch:{boundingBox:t}})},getWidgetSearchParameters:function(e,t){t=t.uiState;return t&&t.geoSearch?fa(e,t.geoSearch.boundingBox):e.setQueryParameter("insideBoundingBox",void 0)}}}}var ha="ais.geoSearch";function da(e){return(da="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var pa=["name","escapedValue","data","path"];function ma(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function E(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ma(Object(r),!0).forEach(function(e){ga(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ma(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function ga(e,t,r){return(t=function(e){e=function(e,t){if("object"!==da(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==da(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===da(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ya(e,t){if(null==e)return{};var r,n=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],0<=t.indexOf(r)||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols)for(var i=Object.getOwnPropertySymbols(e),a=0;a<i.length;a++)r=i[a],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r]);return n}function va(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,c=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return c}}(e,t)||function(e,t){var r;if(e)return"string"==typeof e?ba(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ba(e,t):void 0}(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 ba(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Sa(s){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(s,Oa()),function(u){var e=u||{},f=e.attributes,t=e.separator,l=void 0===t?" > ":t,t=e.rootPath,n=void 0===t?null:t,t=e.showParentLevel,i=void 0===t||t,t=e.limit,a=void 0===t?10:t,t=e.showMore,h=void 0!==t&&t,t=e.showMoreLimit,o=void 0===t?20:t,t=e.sortBy,d=void 0===t?ja:t,t=e.transformItems,p=void 0===t?function(e){return e}:t;if(!f||!Array.isArray(f)||0===f.length)throw new Error(Oa("The `attributes` option expects an array of strings."));if(!0===h&&o<=a)throw new Error(Oa("The `showMoreLimit` option must be greater than `limit`."));var m,g,y=va(f,1)[0],c=function(){};function v(){c()}var b=!1;function S(){return b?o:a}return{$$type:"ais.hierarchicalMenu",init:function(e){var t=e.instantSearchInstance;s(E(E({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t,r,n=e.instantSearchInstance;t=e,c=function(){b=!b,r.render(t)},s(E(E({},(r=this).getWidgetRenderState(e)),{},{instantSearchInstance:n}),!1)},dispose:function(e){e=e.state;return r(),e.removeHierarchicalFacet(y).setQueryParameter("maxValuesPerFacet",void 0)},getRenderState:function(e,t){return E(E({},e),{},{hierarchicalMenu:E(E({},e.hierarchicalMenu),{},ga({},y,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t,r=this,n=e.results,i=e.state,a=e.createURL,o=e.instantSearchInstance,c=e.helper,e=[],s=!1;return m=m||ze({instantSearchInstance:o,helper:c,attribute:function(e){e=e.split(l).length-1;return f[e]},widgetType:this.$$type}),g=g||function(e){m("click:internal",e),c.toggleFacetRefinement(y,e).search()},n&&(o=(o=n.getFacetValues(y,{sortBy:d,facetOrdering:d===ja}))&&!Array.isArray(o)&&o.data?o.data:[],t=(i.maxValuesPerFacet||0)>S()?o.length<=S():o.length<S(),s=h&&(b||!t),e=p(function i(e){return e.slice(0,S()).map(function(e){var t=e.name,r=e.escapedValue,n=e.data,e=(e.path,E(E({},ya(e,pa)),{},{value:r,label:t,data:null}));return Array.isArray(n)&&(e.data=i(n)),e})}(o),{results:n})),{items:e,refine:g,canRefine:0<e.length,createURL:function(t){return a(function(e){return r.getWidgetUiState(e,{searchParameters:i.resetPage().toggleFacetRefinement(y,t),helper:c})})},sendEvent:m,widgetParams:u,isShowingMore:b,toggleShowMore:v,canToggleShowMore:s}},getWidgetUiState:function(e,t){t=t.searchParameters.getHierarchicalFacetBreadcrumb(y);return t.length?E(E({},e),{},{hierarchicalMenu:E(E({},e.hierarchicalMenu),{},ga({},y,t))}):e},getWidgetSearchParameters:function(e,t){t=t.uiState,t=t.hierarchicalMenu&&t.hierarchicalMenu[y];if(e.isConjunctiveFacet(y)||e.isDisjunctiveFacet(y))return e;e.isHierarchicalFacet(y)&&e.getHierarchicalFacetByName(y);var e=e.removeHierarchicalFacet(y).addHierarchicalFacet({name:y,attributes:f,separator:l,rootPath:n,showParentLevel:i}),r=e.maxValuesPerFacet||0,r=Math.max(r,h?o:a),e=e.setQueryParameter("maxValuesPerFacet",r);return t?e.addHierarchicalFacetRefinement(y,t.join(l)):e.setQueryParameters({hierarchicalFacetsRefinements:E(E({},e.hierarchicalFacetsRefinements),{},ga({},y,[]))})}}}}var Oa=i({name:"hierarchical-menu",connector:!0}),ja=["name:asc"];function wa(e){return(wa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pa(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function Ra(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Pa(Object(r),!0).forEach(function(e){Fa(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pa(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Fa(e,t,r){return(t=function(e){e=function(e,t){if("object"!==wa(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==wa(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===wa(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ea(r){var s=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(r,xa()),function(n){var i,a,e=n||{},t=e.escapeHTML,o=void 0===t||t,t=e.transformItems,c=void 0===t?function(e){return e}:t;return{$$type:"ais.hits",init:function(e){r(Ra(Ra({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(e){var t=this.getWidgetRenderState(e);r(Ra(Ra({},t),{},{instantSearchInstance:e.instantSearchInstance}),!1),t.sendEvent("view:internal",t.hits)},getRenderState:function(e,t){return Ra(Ra({},e),{},{hits:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,r=e.helper,e=e.instantSearchInstance;if(i=i||et({instantSearchInstance:e,index:r.getIndex(),widgetType:this.$$type}),a=a||tt({index:r.getIndex(),widgetType:this.$$type,instantSearchInstance:e}),!t)return{hits:[],results:void 0,sendEvent:i,bindEvent:a,widgetParams:n};o&&0<t.hits.length&&(t.hits=$e(t.hits));r=Rt(Ot(t.hits,t.page,t.hitsPerPage),t.queryID);return{hits:c(r,{results:t}),results:t,sendEvent:i,bindEvent:a,widgetParams:n}},dispose:function(e){e=e.state;return s(),o?e.setQueryParameters(Object.keys(Me).reduce(function(e,t){return Ra(Ra({},e),{},Fa({},t,void 0))},{})):e},getWidgetSearchParameters:function(e){return o?e.setQueryParameters(Me):e}}}}var xa=i({name:"hits",connector:!0});function Ia(e){return(Ia="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Aa(e){return function(e){if(Array.isArray(e))return Ta(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var r;if(e)return"string"==typeof e?Ta(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ta(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ta(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _a(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function x(n){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?_a(Object(i),!0).forEach(function(e){var t,r;t=n,r=i[e=e],(e=function(e){e=function(e,t){if("object"!==Ia(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==Ia(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Ia(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):_a(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}function Da(n){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(n,Na()),function(o){var e=o||{},t=e.items,e=e.transformItems,c=void 0===e?function(e){return e}:e;if(!Array.isArray(t))throw new Error(Na("The `items` option expects an array of objects."));var s=t,e=s.filter(function(e){return!0===e.default});if(0===e.length)throw new Error(Na("A default value must be specified in `items`."));if(1<e.length)throw new Error(Na("More than one default value is specified in `items`."));var r=e[0],u=function(t){return function(e){return(e||0===e?t.setQueryParameter("hitsPerPage",e):t.setQueryParameter("hitsPerPage",void 0)).search()}},f=function(e){var r=e.state,n=e.createURL,i=e.getWidgetUiState,a=e.helper;return function(t){return n(function(e){return i(e,{searchParameters:r.resetPage().setQueryParameter("hitsPerPage",t||0===t?t:void 0),helper:a})})}};return{$$type:"ais.hitsPerPage",init:function(e){var t=e.state,r=e.instantSearchInstance;s.some(function(e){return Number(t.hitsPerPage)===Number(e.value)})||(s=[{value:"",label:""}].concat(Aa(s))),n(x(x({},this.getWidgetRenderState(e)),{},{instantSearchInstance:r}),!0)},render:function(e){var t=e.instantSearchInstance;n(x(x({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return i(),e.setQueryParameter("hitsPerPage",void 0)},getRenderState:function(e,t){return x(x({},e),{},{hitsPerPage:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t,r=e.state,n=e.results,i=e.createURL,e=e.helper,a=!!n&&0<n.nbHits;return{items:c((t=r.hitsPerPage,s.map(function(e){return x(x({},e),{},{isRefined:Number(e.value)===Number(t)})})),{results:n}),refine:u(e),createURL:f({state:r,createURL:i,getWidgetUiState:this.getWidgetUiState,helper:e}),hasNoResults:!a,canRefine:a,widgetParams:o}},getWidgetUiState:function(e,t){t=t.searchParameters.hitsPerPage;return void 0===t||t===r.value?e:x(x({},e),{},{hitsPerPage:t})},getWidgetSearchParameters:function(e,t){t=t.uiState;return e.setQueryParameters({hitsPerPage:t.hitsPerPage||r.value})}}}}var Na=i({name:"hits-per-page",connector:!0});function ka(e){return(ka="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Ha=["page"],Wa=["clickAnalytics","userToken"];function Ca(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function I(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ca(Object(r),!0).forEach(function(e){La(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ca(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function La(e,t,r){return(t=function(e){e=function(e,t){if("object"!==ka(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==ka(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===ka(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ma(e){return function(e){if(Array.isArray(e))return Ua(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var r;if(e)return"string"==typeof e?Ua(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ua(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ua(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Qa(e,t){if(null==e)return{};var r,n=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],0<=t.indexOf(r)||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols)for(var i=Object.getOwnPropertySymbols(e),a=0;a<i.length;a++)r=i[a],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r]);return n}var $a=i({name:"infinite-hits",connector:!0});function Ba(e){e=e||{};e.page;return Qa(e,Ha)}function qa(e){e=e||{};e.clickAnalytics,e.userToken;return Qa(e,Wa)}function Va(i){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(i,$a()),function(d){var r,n,p,m,g,y,e=d||{},t=e.escapeHTML,v=void 0===t||t,t=e.transformItems,b=void 0===t?function(e){return e}:t,t=e.cache,S=void 0===t?(n=r=null,{read:function(e){e=e.state;return Et(n,Ba(e))?r:null},write:function(e){var t=e.state,e=e.hits;n=Ba(t),r=e}}):t,O=function(e,t){e=e.page,e=void 0===e?0:e,t=Object.keys(t).map(Number);return 0===t.length?e:Math.min.apply(Math,[e].concat(Ma(t)))},j=function(e,t){e=e.page,e=void 0===e?0:e,t=Object.keys(t).map(Number);return 0===t.length?e:Math.max.apply(Math,[e].concat(Ma(t)))};return{$$type:"ais.infiniteHits",init:function(e){i(I(I({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(e){var t=e.instantSearchInstance,e=this.getWidgetRenderState(e);i(I(I({},e),{},{instantSearchInstance:t}),!1),g("view:internal",e.currentPageHits)},getRenderState:function(e,t){return I(I({},e),{},{infiniteHits:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t,r,n,i,a=e.results,o=e.helper,c=e.parent,s=e.state,e=e.instantSearchInstance,u=[],c=c.getPreviousState()||s,s=S.read({state:qa(c)})||{},f=a?(l=void 0===(l=c.page)?0:l,v&&0<a.hits.length&&(a.hits=$e(a.hits)),h=Rt(Ot(a.hits,a.page,a.hitsPerPage),a.queryID),h=b(h,{results:a}),t=!1,xt(e.mainIndex,function(e){!t&&e.getWidgets().some(function(e){return"ais.dynamicWidgets"===e.$$type})&&(t=!0)}),f=!(null!=(f=c.disjunctiveFacets)&&f.length||(c.facets||[]).filter(function(e){return"*"!==e}).length||null!=(f=c.hierarchicalFacets)&&f.length),void 0!==s[l]||a.__isArtificial||"idle"!==e.status||t&&f||(s[l]=h,S.write({state:qa(c),hits:s})),u=h,0===O(c,s)):(p=function(){n.overrideStateWithoutTriggeringChangeEvent(I(I({},n.state),{},{page:O(n.state,S.read({state:qa(n.state)})||{})-1})).searchWithoutTriggeringOnStateChange()},m=function(){r.setPage(j(r.state,S.read({state:qa(r.state)})||{})+1).search()},g=et({instantSearchInstance:e,index:(r=n=o).getIndex(),widgetType:this.$$type}),y=tt({index:o.getIndex(),widgetType:this.$$type,instantSearchInstance:e}),void 0===c.page||0===O(c,s)),l=(i=s,Object.keys(i).map(Number).sort(function(e,t){return e-t}).reduce(function(e,t){return e.concat(i[t])},[])),h=!a||a.nbPages<=j(c,s)+1;return{hits:l,currentPageHits:u,sendEvent:g,bindEvent:y,results:a,showPrevious:p,showMore:m,isFirstPage:f,isLastPage:h,widgetParams:d}},dispose:function(e){e=e.state,a(),e=e.setQueryParameter("page",void 0);return v?e.setQueryParameters(Object.keys(Me).reduce(function(e,t){return I(I({},e),{},La({},t,void 0))},{})):e},getWidgetUiState:function(e,t){t=t.searchParameters.page||0;return t?I(I({},e),{},{page:t+1}):e},getWidgetSearchParameters:function(e,t){var t=t.uiState,r=e,e=(v&&(r=e.setQueryParameters(Me)),t.page?t.page-1:0);return r.setQueryParameter("page",e)}}}}var Ja=["name","escapedValue","path"];function za(e){return(za="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xa(e,t){if(null==e)return{};var r,n=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],0<=t.indexOf(r)||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols)for(var i=Object.getOwnPropertySymbols(e),a=0;a<i.length;a++)r=i[a],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r]);return n}function Ka(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,c=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return c}}(e,t)||function(e,t){var r;if(e)return"string"==typeof e?Ga(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ga(e,t):void 0}(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 Ga(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Za(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function A(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Za(Object(r),!0).forEach(function(e){Ya(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Za(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Ya(e,t,r){return(t=function(e){e=function(e,t){if("object"!==za(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==za(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===za(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eo(r){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(r,to()),function(f){var l,h,d,e=f||{},p=e.attribute,t=e.limit,n=void 0===t?10:t,t=e.showMore,m=void 0!==t&&t,t=e.showMoreLimit,i=void 0===t?20:t,t=e.sortBy,g=void 0===t?ro:t,t=e.transformItems,y=void 0===t?function(e){return e}:t;if(!p)throw new Error(to("The `attribute` option is required."));if(!0===m&&i<=n)throw new Error(to("The `showMoreLimit` option must be greater than `limit`."));var v=!1,b=function(){};function S(){b()}function O(){return v?i:n}return{$$type:"ais.menu",init:function(e){var t=e.instantSearchInstance;r(A(A({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;r(A(A({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return a(),e.removeHierarchicalFacet(p).setQueryParameter("maxValuesPerFacet",void 0)},getRenderState:function(e,t){return A(A({},e),{},{menu:A(A({},e.menu),{},Ya({},p,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t,r,n=this,i=e.results,a=e.createURL,o=e.instantSearchInstance,c=e.helper,s=[],u=!1;return l=l||ze({instantSearchInstance:o,helper:c,attribute:p,widgetType:this.$$type}),h=h||function(t){return a(function(e){return n.getWidgetUiState(e,{searchParameters:c.state.resetPage().toggleFacetRefinement(p,t),helper:c})})},d=d||function(e){var t=Ka(c.getHierarchicalFacetBreadcrumb(p),1)[0];l("click:internal",e||t),c.toggleFacetRefinement(p,e||t).search()},e.results&&(t=e,r=this,b=function(){v=!v,r.render(t)}),i&&(e=(o=i.getFacetValues(p,{sortBy:g,facetOrdering:g===ro}))&&!Array.isArray(o)&&o.data?o.data:[],u=m&&(v||e.length>O()),s=y(e.slice(0,O()).map(function(e){var t=e.name,r=e.escapedValue;e.path;return A(A({},Xa(e,Ja)),{},{label:t,value:r})}),{results:i})),{items:s,createURL:h,refine:d,sendEvent:l,canRefine:0<s.length,widgetParams:f,isShowingMore:v,toggleShowMore:S,canToggleShowMore:u}},getWidgetUiState:function(e,t){t=Ka(t.searchParameters.getHierarchicalFacetBreadcrumb(p),1)[0];return t?A(A({},e),{},{menu:A(A({},e.menu),{},Ya({},p,t))}):e},getWidgetSearchParameters:function(e,t){var r,t=t.uiState,t=t.menu&&t.menu[p];return e.isConjunctiveFacet(p)||e.isDisjunctiveFacet(p)?e:(r=(e=e.removeHierarchicalFacet(p).addHierarchicalFacet({name:p,attributes:[p]})).maxValuesPerFacet||0,r=Math.max(r,m?i:n),e=e.setQueryParameter("maxValuesPerFacet",r),t?e.addHierarchicalFacetRefinement(p,t):e.setQueryParameters({hierarchicalFacetsRefinements:A(A({},e.hierarchicalFacetsRefinements),{},Ya({},p,[]))}))}}}}var to=i({name:"menu",connector:!0}),ro=["isRefined","name:asc"];function no(e){return(no="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function io(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,c=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return c}}(e,t)||ao(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 ao(e,t){var r;if(e)return"string"==typeof e?oo(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?oo(e,t):void 0}function oo(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function co(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function T(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?co(Object(r),!0).forEach(function(e){so(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):co(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function so(e,t,r){return(t=function(e){e=function(e,t){if("object"!==no(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==no(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===no(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uo(r){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(r,fo()),function(h){var d,e=h||{},t=e.attribute,p=void 0===t?"":t,t=e.items,m=void 0===t?[]:t,t=e.transformItems,g=void 0===t?function(e){return e}:t;if(""===p)throw new Error(fo("The `attribute` option is required."));if(m&&0!==m.length)return d={},{$$type:lo,init:function(e){var t=e.instantSearchInstance;r(T(T({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;r(T(T({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return n(),e.clearRefinements(p)},getWidgetUiState:function(e,t){var t=t.searchParameters.getNumericRefinements(p),r=t["="]&&t["="][0];return r||0===r?T(T({},e),{},{numericMenu:T(T({},e.numericMenu),{},so({},p,"".concat(t["="])))}):(r=t[">="]&&t[">="][0]||"",t=t["<="]&&t["<="][0]||"",""===r&&""===t?e:T(T({},e),{},{numericMenu:T(T({},e.numericMenu),{},so({},p,"".concat(r,":").concat(t)))}))},getWidgetSearchParameters:function(e,t){var r,t=t.uiState,t=t.numericMenu&&t.numericMenu[p],e=e.clearRefinements(p);return t?-1===t.indexOf(":")?e.addNumericRefinement(p,"=",Number(t)):(r=(t=io(t.split(":").map(parseFloat),2))[0],t=t[1],r=b(r)?e.addNumericRefinement(p,">=",r):e,b(t)?r.addNumericRefinement(p,"<=",t):r):e.setQueryParameters({numericRefinements:T(T({},e.numericRefinements),{},so({},p,{}))})},getRenderState:function(e,t){return T(T({},e),{},{numericMenu:T(T({},e.numericMenu),{},so({},p,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var n,t,i=this,r=e.results,a=e.state,o=e.instantSearchInstance,c=e.helper,s=e.createURL,e=(d.refine||(d.refine=function(e){var t=mo(c.state,p,e);d.sendEvent("click:internal",e),c.setState(t).search()}),d.createURL||(d.createURL=function(r){return function(t){return s(function(e){return i.getWidgetUiState(e,{searchParameters:mo(r,p,t),helper:c})})}}),d.sendEvent||(d.sendEvent=ho({instantSearchInstance:o})),!r||0===r.nbHits),o=(n=a,m.map(function(e){var t=e.start,r=e.end,e=e.label;return{label:e,value:encodeURI(JSON.stringify({start:t,end:r})),isRefined:po(n,p,{start:t,end:r,label:e})}})),u=!0,f=function(e,t){var r,n,i,a,o="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(o)return n=!(r=!0),{s:function(){o=o.call(e)},n:function(){var e=o.next();return r=e.done,e},e:function(e){n=!0,i=e},f:function(){try{r||null==o.return||o.return()}finally{if(n)throw i}}};if(Array.isArray(e)||(o=ao(e))||t&&e&&"number"==typeof e.length)return o&&(e=o),a=0,{s:t=function(){},n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(o);try{for(f.s();!(t=f.n()).done;){var l=t.value;if(l.isRefined&&"{}"!==decodeURI(l.value)){u=!1;break}}}catch(e){f.e(e)}finally{f.f()}return{createURL:d.createURL(a),items:g(o,{results:r}),hasNoResults:e,canRefine:!(e&&u),refine:d.refine,sendEvent:d.sendEvent,widgetParams:h}}};throw new Error(fo("The `items` option expects an array of objects."))}}var fo=i({name:"numeric-menu",connector:!0}),lo="ais.numericMenu",ho=function(e){var t=e.instantSearchInstance;return function(){1===arguments.length&&t.sendEventToInsights(arguments.length<=0?void 0:arguments[0])}};function po(e,t,r){var n=e.getNumericRefinements(t);return void 0!==r.start&&void 0!==r.end?r.start===r.end?go(n,"=",r.start):go(n,">=",r.start)&&go(n,"<=",r.end):void 0!==r.start?go(n,">=",r.start):void 0!==r.end?go(n,"<=",r.end):void 0===r.start&&void 0===r.end&&Object.keys(n).every(function(e){return 0===(n[e]||[]).length})}function mo(e,t,r){var r=JSON.parse(decodeURI(r)),n=e.getNumericRefinements(t);if(void 0===r.start&&void 0===r.end)return e.removeNumericRefinement(t);if(po(e,t,r)||(e=e.removeNumericRefinement(t)),void 0!==r.start&&void 0!==r.end){if(r.start>r.end)throw new Error("option.start should be > to option.end");if(r.start===r.end)return e=go(n,"=",r.start)?e.removeNumericRefinement(t,"=",r.start):e.addNumericRefinement(t,"=",r.start)}return void 0!==r.start&&(e=(e=go(n,">=",r.start)?e.removeNumericRefinement(t,">=",r.start):e).addNumericRefinement(t,">=",r.start)),"number"==typeof(e=void 0!==r.end?(e=go(n,"<=",r.end)?e.removeNumericRefinement(t,"<=",r.end):e).addNumericRefinement(t,"<=",r.end):e).page&&(e.page=0),e}function go(e,t,r){return void 0!==e[t]&&e[t].includes(r)}function yo(e){return(yo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vo(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,So(n.key),n)}}function bo(e,t,r){(t=So(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}function So(e){e=function(e,t){if("object"!==yo(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==yo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===yo(e)?e:String(e)}var Oo=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");bo(this,"currentPage",void 0),bo(this,"total",void 0),bo(this,"padding",void 0),this.currentPage=e.currentPage,this.total=e.total,this.padding=e.padding}var e,r,n;return e=t,(r=[{key:"pages",value:function(){var e,t=this.total,r=this.currentPage,n=this.padding;return 0===t?[0]:Ct((e=this.nbPagesDisplayed(n,t))===t?{end:t}:{start:r-(n=this.calculatePaddingLeft(r,n,t,e)),end:r+(e-n)})}},{key:"nbPagesDisplayed",value:function(e,t){return Math.min(2*e+1,t)}},{key:"calculatePaddingLeft",value:function(e,t,r,n){return e<=t?e:r-t<=e?n-(r-e):t}},{key:"isLastPage",value:function(){return this.currentPage===this.total-1||0===this.total}},{key:"isFirstPage",value:function(){return 0===this.currentPage}}])&&vo(e.prototype,r),n&&vo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function jo(e){return(jo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function wo(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function _(n){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?wo(Object(i),!0).forEach(function(e){var t,r;t=n,r=i[e=e],(e=function(e){e=function(e,t){if("object"!==jo(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==jo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===jo(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):wo(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}function Po(r){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(r,Ro()),function(a){var e=a||{},o=e.totalPages,e=e.padding,c=new Oo({currentPage:0,total:0,padding:void 0===e?3:e}),s={};return{$$type:"ais.pagination",init:function(e){var t=e.instantSearchInstance;r(_(_({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;r(_(_({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return t(),e.setQueryParameter("page",void 0)},getWidgetUiState:function(e,t){t=t.searchParameters.page||0;return t?_(_({},e),{},{page:t+1}):e},getWidgetSearchParameters:function(e,t){t=t.uiState,t=t.page?t.page-1:0;return e.setQueryParameter("page",t)},getWidgetRenderState:function(e){var t=e.results,r=e.helper,n=e.state,i=e.createURL,e=(s.refine||(s.refine=function(e){r.setPage(e),r.search()}),s.createURL||(s.createURL=function(t){return i(function(e){return _(_({},e),{},{page:t})})}),n.page||0),n=(n=(n=t||{nbPages:0}).nbPages,void 0!==o?Math.min(o,n):n);return c.currentPage=e,c.total=n,{createURL:s.createURL,refine:s.refine,canRefine:1<n,currentRefinement:e,nbHits:(null==t?void 0:t.nbHits)||0,nbPages:n,pages:t?c.pages():[],isFirstPage:c.isFirstPage(),isLastPage:c.isLastPage(),widgetParams:a}},getRenderState:function(e,t){return _(_({},e),{},{pagination:this.getWidgetRenderState(t)})}}}}var Ro=i({name:"pagination",connector:!0});function Fo(e){return(Fo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Eo(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function xo(n){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Eo(Object(i),!0).forEach(function(e){var t,r;t=n,r=i[e=e],(e=function(e){e=function(e,t){if("object"!==Fo(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==Fo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Fo(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Eo(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}function Io(e){return function(e){if(Array.isArray(e))return Ao(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var r;if(e)return"string"==typeof e?Ao(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ao(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ao(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var To=i({name:"query-rules",connector:!0});function _o(e){var i,a,o,t=this.helper,r=this.initialRuleContexts,n=this.trackedFilters,c=this.transformRuleContexts,e=e.state,s=e.ruleContexts||[],n=(i=(n={helper:t,sharedHelperState:e,trackedFilters:n}).helper,a=n.sharedHelperState,o=n.trackedFilters,Object.keys(o).reduce(function(e,t){var r=yt(i.lastResults||{},a,!0).filter(function(e){return e.attribute===t}).map(function(e){return e.numericValue||e.name}),n=(0,o[t])(r);return[].concat(Io(e),Io(r.filter(function(e){return n.includes(e)}).map(function(e){return"ais-".concat(t,"-").concat(e).replace(/[^a-z0-9-_]+/gi,"_")})))},[])),c=c([].concat(Io(r),Io(n))).slice(0,10);Et(s,c)||t.overrideStateWithoutTriggeringChangeEvent(xo(xo({},e),{},{ruleContexts:c}))}function Do(f){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(f,To()),function(i){var a,e=i||{},t=e.trackedFilters,o=void 0===t?{}:t,t=e.transformRuleContexts,c=void 0===t?function(e){return e}:t,t=e.transformItems,r=void 0===t?function(e){return e}:t,s=(Object.keys(o).forEach(function(e){if("function"!=typeof o[e])throw new Error(To("'The \"".concat(e,'" filter value in the `trackedFilters` option expects a function.')))}),0<Object.keys(o).length),u=[];return{$$type:"ais.queryRules",init:function(e){var t=e.helper,r=e.state,n=e.instantSearchInstance;u=r.ruleContexts||[],a=_o.bind({helper:t,initialRuleContexts:u,trackedFilters:o,transformRuleContexts:c}),s&&(([r.disjunctiveFacetsRefinements,r.facetsRefinements,r.hierarchicalFacetsRefinements,r.numericRefinements].some(function(e){return Boolean(e&&0<Object.keys(e).length)})||Boolean(i.transformRuleContexts))&&a({state:r}),t.on("change",a)),f(xo(xo({},this.getWidgetRenderState(e)),{},{instantSearchInstance:n}),!0)},render:function(e){var t=e.instantSearchInstance;f(xo(xo({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},getWidgetRenderState:function(e){var e=e.results,t=(e||{}).userData;return{items:r(void 0===t?[]:t,{results:e}),widgetParams:i}},getRenderState:function(e,t){return xo(xo({},e),{},{queryRules:this.getWidgetRenderState(t)})},dispose:function(e){var t=e.helper,e=e.state;return n(),s?(t.removeListener("change",a),e.setQueryParameter("ruleContexts",u)):e}}}}function No(e){return(No="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ko(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function D(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ko(Object(r),!0).forEach(function(e){Ho(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ko(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Ho(e,t,r){return(t=function(e){e=function(e,t){if("object"!==No(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==No(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===No(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,c=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return c}}(e,t)||function(e,t){var r;if(e)return"string"==typeof e?Co(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Co(e,t):void 0}(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 Co(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Lo=i({name:"range-input",connector:!0},{name:"range-slider",connector:!0}),Mo="ais.range";function Uo(e){var t=e.min,r=e.max,e=e.precision,e=Math.pow(10,e);return{min:t&&Math.floor(t*e)/e,max:r&&Math.ceil(r*e)/e}}function Qo(r){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(r,Lo()),function(c){var e=c||{},t=e.attribute,u=void 0===t?"":t,f=e.min,l=e.max,t=e.precision,h=void 0===t?0:t;if(!u)throw new Error(Lo("The `attribute` option is required."));if(b(f)&&b(l)&&l<f)throw new Error(Lo("The `max` option can't be lower than `min`."));var s={from:function(e){return e.toLocaleString()},to:function(e){return Number(Number(e).toFixed(h)).toLocaleString()}},i=function(e,t,r,n){var e=e.state,i=t.min,t=t.max,a=Wo(e.getNumericRefinement(u,">=")||[],1)[0],o=Wo(e.getNumericRefinement(u,"<=")||[],1)[0],c=void 0===r||""===r,s=void 0===n||""===n,r=Uo({min:c?void 0:parseFloat(r),max:s?void 0:parseFloat(n),precision:h}),n=r.min,r=r.max,c=b(f)||i!==n?b(f)&&c?f:n:void 0,n=b(l)||t!==r?b(l)&&s?l:r:void 0,s=void 0===c,r=b(i)&&i<=c,s=s||b(c)&&(!b(i)||r),i=void 0===n,r=b(n)&&n<=t,i=i||b(n)&&(!b(t)||r);return(a!==c||o!==n)&&s&&i?(e=e.removeNumericRefinement(u),b(c)&&(e=e.addNumericRefinement(u,">=",c)),(e=b(n)?e.addNumericRefinement(u,"<=",n):e).resetPage()):null};function d(r,n){return function(){var e=Wo(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[void 0,void 0],2),t=e[0],e=e[1],t=i(r,n,t,e);t&&r.setState(t).search()}}return{$$type:Mo,init:function(e){r(D(D({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(e){r(D(D({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!1)},getRenderState:function(e,t){return D(D({},e),{},{range:D(D({},e.range),{},Ho({},u,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t,r=e.results,n=e.helper,e=e.instantSearchInstance,i=ct(r&&r.disjunctiveFacets||[],function(e){return e.name===u}),i=i&&i.stats||{min:void 0,max:void 0},a=(i=i,a=b(f)?f:b(i.min)?i.min:0,i=b(l)?l:b(i.max)?i.max:0,Uo({min:a,max:i,precision:h})),o=(o=Wo((i=n).getNumericRefinement(u,">=")||[],1)[0],i=Wo(i.getNumericRefinement(u,"<=")||[],1)[0],[b(o)?o:-1/0,b(i)?i:1/0]),i=d(n,r?a:{min:void 0,max:void 0});return{refine:i,canRefine:a.min!==a.max,format:s,range:a,sendEvent:(t=e,function(){1===arguments.length&&t.sendEventToInsights(arguments.length<=0?void 0:arguments[0])}),widgetParams:D(D({},c),{},{precision:h}),start:o}},dispose:function(e){e=e.state;return n(),e.removeDisjunctiveFacet(u).removeNumericRefinement(u)},getWidgetUiState:function(e,t){var t=t.searchParameters.getNumericRefinements(u),r=t[">="],r=void 0===r?[]:r,t=t["<="],t=void 0===t?[]:t;return 0===r.length&&0===t.length?e:D(D({},e),{},{range:D(D({},e.range),{},Ho({},u,"".concat(r,":").concat(t)))})},getWidgetSearchParameters:function(e,t){var r,t=t.uiState,e=e.addDisjunctiveFacet(u).setQueryParameters({numericRefinements:D(D({},e.numericRefinements),{},Ho({},u,{}))}),t=(b(f)&&(e=e.addNumericRefinement(u,">=",f)),b(l)&&(e=e.addNumericRefinement(u,"<=",l)),t.range&&t.range[u]);return e=t&&-1!==t.indexOf(":")&&(r=(t=Wo(t.split(":").map(parseFloat),2))[0],t=t[1],b(r)&&(!b(f)||f<r)&&(e=(e=e.removeNumericRefinement(u,">=")).addNumericRefinement(u,">=",r)),b(t))&&(!b(l)||t<l)?(e=e.removeNumericRefinement(u,"<=")).addNumericRefinement(u,"<=",t):e}}}}function $o(e){return($o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Bo=["name","escapedValue"],qo=["escapedValue","value"];function Vo(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function N(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Vo(Object(r),!0).forEach(function(e){Jo(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Vo(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Jo(e,t,r){return(t=function(e){e=function(e,t){if("object"!==$o(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==$o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===$o(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zo(e,t){if(null==e)return{};var r,n=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],0<=t.indexOf(r)||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols)for(var i=Object.getOwnPropertySymbols(e),a=0;a<i.length;a++)r=i[a],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r]);return n}function Xo(s){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(s,Ko()),function(h){var e=h||{},d=e.attribute,t=e.operator,i=void 0===t?"or":t,t=e.limit,p=void 0===t?10:t,t=e.showMore,m=void 0!==t&&t,t=e.showMoreLimit,a=void 0===t?20:t,t=e.sortBy,g=void 0===t?Go:t,t=e.escapeFacetValues,c=void 0===t||t,t=e.transformItems,y=void 0===t?function(e){return e}:t;if(!d)throw new Error(Ko("The `attribute` option is required."));if(!/^(and|or)$/.test(i))throw new Error(Ko('The `operator` must one of: `"and"`, `"or"` (got "'.concat(i,'").')));if(!0===m&&a<=p)throw new Error(Ko("`showMoreLimit` should be greater than `limit`."));function v(e){var t=e.name,r=e.escapedValue;return N(N({},zo(e,Bo)),{},{value:r,label:t,highlighted:t})}var b,S,O,j=[],w=!0,P=!1,R=function(){};function F(){R()}function E(){return P?a:p}function x(a,o){return function(i){return function(e){var t,r=i.instantSearchInstance,n=i.results;""===e&&j?s(N(N({},o.getWidgetRenderState(N(N({},i),{},{results:b}))),{},{instantSearchInstance:r}),!1):(t={highlightPreTag:(c?Me:u).highlightPreTag,highlightPostTag:(c?Me:u).highlightPostTag},a.searchForFacetValues(d,e,Math.min(E(),100),t).then(function(e){e=c?e.facetHits.map(function(e){return Ce(Ce({},e),{},{highlighted:Ue(e.highlighted)})}):e.facetHits,e=y(e.map(function(e){var t=e.escapedValue,r=e.value;return N(N({},zo(e,qo)),{},{value:t,label:r})}),{results:n});s(N(N({},o.getWidgetRenderState(N(N({},i),{},{results:b}))),{},{items:e,canToggleShowMore:!1,canRefine:!0,isFromSearch:!0,instantSearchInstance:r}),!1)}))}}}var I=function(){return function(){}};return{$$type:"ais.refinementList",init:function(e){s(N(N({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!0)},render:function(e){s(N(N({},this.getWidgetRenderState(e)),{},{instantSearchInstance:e.instantSearchInstance}),!1)},getRenderState:function(e,t){return N(N({},e),{},{refinementList:N(N({},e.refinementList),{},Jo({},d,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t,r,n=this,i=e.results,a=e.state,o=e.createURL,c=e.instantSearchInstance,s=e.helper,u=[],f=[],c=(O&&S&&I||(O=ze({instantSearchInstance:c,helper:s,attribute:d,widgetType:this.$$type}),S=function(e){O("click:internal",e),s.toggleFacetRefinement(d,e).search()},I=x(s,this)),i&&(f=(c=i.getFacetValues(d,{sortBy:g,facetOrdering:g===Go}))&&Array.isArray(c)?c:[],u=y(f.slice(0,E()).map(v),{results:i}),c=a.maxValuesPerFacet,l=E(),w=l<c?f.length<=l:f.length<l,b=i,j=u,e.results)&&(t=e,r=this,R=function(){P=!P,r.render(t)}),I&&I(e)),f=P&&j.length>p,l=m&&!w;return{createURL:function(t){return o(function(e){return n.getWidgetUiState(e,{searchParameters:a.resetPage().toggleFacetRefinement(d,t),helper:s})})},items:u,refine:S,searchForItems:c,isFromSearch:!1,canRefine:0<u.length,widgetParams:h,isShowingMore:P,canToggleShowMore:f||l,toggleShowMore:F,sendEvent:O,hasExhaustiveItems:w}},dispose:function(e){e=e.state,r(),e=e.setQueryParameter("maxValuesPerFacet",void 0);return"and"===i?e.removeFacet(d):e.removeDisjunctiveFacet(d)},getWidgetUiState:function(e,t){t=t.searchParameters,t="or"===i?t.getDisjunctiveRefinements(d):t.getConjunctiveRefinements(d);return t.length?N(N({},e),{},{refinementList:N(N({},e.refinementList),{},Jo({},d,t))}):e},getWidgetSearchParameters:function(e,t){var r,t=t.uiState,n="or"===i;return e.isHierarchicalFacet(d)||n&&e.isConjunctiveFacet(d)||!n&&e.isDisjunctiveFacet(d)?e:(t=t.refinementList&&t.refinementList[d],e=e.clearRefinements(d),r=(e=n?e.addDisjunctiveFacet(d):e.addFacet(d)).maxValuesPerFacet||0,r=Math.max(r,m?a:p),e=e.setQueryParameter("maxValuesPerFacet",r),t?t.reduce(function(e,t){return n?e.addDisjunctiveFacetRefinement(d,t):e.addFacetRefinement(d,t)},e):e.setQueryParameters(Jo({},r=n?"disjunctiveFacetsRefinements":"facetsRefinements",N(N({},e[r]),{},Jo({},d,[])))))}}}}var Ko=i({name:"refinement-list",connector:!0}),Go=["isRefined","count:desc","name:asc"];function Zo(e){return(Zo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Yo(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function ec(n){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Yo(Object(i),!0).forEach(function(e){var t,r;t=n,r=i[e=e],(e=function(e){e=function(e,t){if("object"!==Zo(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==Zo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===Zo(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Yo(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}function tc(r){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(r,rc()),function(n){var i,a,e=(n||{}).queryHook,o=void 0===e?nc:e;return{$$type:"ais.searchBox",init:function(e){var t=e.instantSearchInstance;r(ec(ec({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;r(ec(ec({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return t(),e.setQueryParameter("query",void 0)},getRenderState:function(e,t){return ec(ec({},e),{},{searchBox:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.helper,r=e.searchMetadata,e=e.state;return i||(i=function(e){o(e,function(e){return t.setQuery(e).search()})},a=function(){t.setQuery("").search()}),{query:e.query||"",refine:i,clear:a,widgetParams:n,isSearchStalled:r.isSearchStalled}},getWidgetUiState:function(e,t){t=t.searchParameters.query||"";return""===t||e&&e.query===t?e:ec(ec({},e),{},{query:t})},getWidgetSearchParameters:function(e,t){t=t.uiState;return e.setQueryParameter("query",t.query||"")}}}}var rc=i({name:"search-box",connector:!0}),nc=function(e,t){return t(e)};function ic(e){return(ic="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ac(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function oc(n){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ac(Object(i),!0).forEach(function(e){var t,r;t=n,r=i[e=e],(e=function(e){e=function(e,t){if("object"!==ic(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==ic(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===ic(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):ac(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}function cc(n){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v,c=(h(n,sc()),{});return function(i){var e=i||{},a=e.items,e=e.transformItems,o=void 0===e?function(e){return e}:e;if(Array.isArray(a))return{$$type:"ais.sortBy",init:function(e){var t=e.instantSearchInstance,e=this.getWidgetRenderState(e),r=e.currentRefinement;ct(a,function(e){return e.value===r});n(oc(oc({},e),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(oc(oc({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return t(),c.initialIndex?e.setIndex(c.initialIndex):e},getRenderState:function(e,t){return oc(oc({},e),{},{sortBy:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,r=e.helper,n=e.state,e=e.parent,e=(!c.initialIndex&&e&&(c.initialIndex=e.getIndexName()),c.setIndex||(c.setIndex=function(e){r.setIndex(e).search()}),!t||0===t.nbHits);return{currentRefinement:n.index,options:o(a,{results:t}),refine:c.setIndex,hasNoResults:e,canRefine:!e&&0<a.length,widgetParams:i}},getWidgetUiState:function(e,t){t=t.searchParameters.index;return oc(oc({},e),{},{sortBy:t!==c.initialIndex?t:void 0})},getWidgetSearchParameters:function(e,t){t=t.uiState;return e.setQueryParameter("index",t.sortBy||c.initialIndex||e.index)}};throw new Error(sc("The `items` option expects an array of objects."))}}var sc=i({name:"sort-by",connector:!0});function uc(e){return(uc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fc(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function lc(n){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?fc(Object(i),!0).forEach(function(e){var t,r;t=n,r=i[e=e],(e=function(e){e=function(e,t){if("object"!==uc(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==uc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===uc(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):fc(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}function hc(n){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(n,dc()),function(r){return{$$type:"ais.stats",init:function(e){var t=e.instantSearchInstance;n(lc(lc({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;n(lc(lc({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(){e()},getRenderState:function(e,t){return lc(lc({},e),{},{stats:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,e=e.state;return t?{hitsPerPage:t.hitsPerPage,nbHits:t.nbHits,nbSortedHits:t.nbSortedHits,areHitsSorted:void 0!==t.appliedRelevancyStrictness&&0<t.appliedRelevancyStrictness&&t.nbSortedHits!==t.nbHits,nbPages:t.nbPages,page:t.page,processingTimeMS:t.processingTimeMS,query:t.query,widgetParams:r}:{hitsPerPage:e.hitsPerPage,nbHits:0,nbSortedHits:void 0,areHitsSorted:!1,nbPages:0,page:e.page||0,processingTimeMS:-1,query:e.query||"",widgetParams:r}}}}}var dc=i({name:"stats",connector:!0});function pc(e){return(pc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mc(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function k(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?mc(Object(r),!0).forEach(function(e){gc(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):mc(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function gc(e,t,r){return(t=function(e){e=function(e,t){if("object"!==pc(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==pc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===pc(e)?e:String(e)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,c=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return c}}(e,t)||function(e,t){var r;if(e)return"string"==typeof e?vc(e,t):"Map"===(r="Object"===(r=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?vc(e,t):void 0}(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 vc(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function bc(r){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:v;return h(r,Sc()),function(h){var d,p,m,g,y,e=h||{},v=e.attribute,t=e.on,e=e.off;if(v)return d=void 0!==e,p=Vt(void 0===t||t).map(ot),m=d?Vt(e).map(ot):void 0,y=function(t,e){var r=e.state,n=e.createURL,i=e.getWidgetUiState,a=e.helper;return function(){r=r.resetPage();var e=t?p:m,e=(e&&e.forEach(function(e){r=r.removeDisjunctiveFacetRefinement(v,e)}),t?m:p);return e&&e.forEach(function(e){r=r.addDisjunctiveFacetRefinement(v,e)}),n(function(e){return i(e,{searchParameters:r,helper:a})})}},{$$type:Oc,init:function(e){var t=e.instantSearchInstance;r(k(k({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!0)},render:function(e){var t=e.instantSearchInstance;r(k(k({},this.getWidgetRenderState(e)),{},{instantSearchInstance:t}),!1)},dispose:function(e){e=e.state;return n(),e.removeDisjunctiveFacet(v)},getRenderState:function(e,t){return k(k({},e),{},{toggleRefinement:k(k({},e.toggleRefinement),{},gc({},v,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var r,t,n,i=e.state,a=e.helper,o=e.results,c=e.createURL,e=e.instantSearchInstance,s=o?p.every(function(e){return i.isDisjunctiveFacetRefined(v,e)}):p.every(function(e){return i.isDisjunctiveFacetRefined(v,e)}),u={isRefined:s,count:0},f={isRefined:d&&!s,count:0},l=(o&&(t=Vt(m||!1),r=o.getFacetValues(v,{})||[],l=p.map(function(t){return ct(r,function(e){return e.escapedValue===ot(String(t))})}).filter(function(e){return void 0!==e}),t=d?t.map(function(t){return ct(r,function(e){return e.escapedValue===ot(String(t))})}).filter(function(e){return void 0!==e}):[],u={isRefined:!!l.length&&l.every(function(e){return e.isRefined}),count:l.reduce(function(e,t){return e+t.count},0)||null},f={isRefined:!!t.length&&t.every(function(e){return e.isRefined}),count:t.reduce(function(e,t){return e+t.count},0)||r.reduce(function(e,t){return e+t.count},0)}),g=g||jc({instantSearchInstance:e,attribute:v,on:p,helper:a}),s?f:u);return{value:{name:v,isRefined:s,count:o?l.count:null,onFacetValue:u,offFacetValue:f},createURL:y(s,{state:i,createURL:c,helper:a,getWidgetUiState:this.getWidgetUiState}),sendEvent:g,canRefine:Boolean(o?l.count:null),refine:(n=a,function(){var e=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{isRefined:!1}).isRefined;e?(p.forEach(function(e){return n.removeDisjunctiveFacetRefinement(v,e)}),d&&m.forEach(function(e){return n.addDisjunctiveFacetRefinement(v,e)})):(g("click:internal",e),d&&m.forEach(function(e){return n.removeDisjunctiveFacetRefinement(v,e)}),p.forEach(function(e){return n.addDisjunctiveFacetRefinement(v,e)})),n.search()}),widgetParams:h}},getWidgetUiState:function(e,t){var r=t.searchParameters,t=p&&p.every(function(e){return r.isDisjunctiveFacetRefined(v,e)});return t?k(k({},e),{},{toggle:k(k({},e.toggle),{},gc({},v,t))}):(null!=(t=e.toggle)&&delete t[v],e)},getWidgetSearchParameters:function(e,t){var r,t=t.uiState;return e.isHierarchicalFacet(v)||e.isConjunctiveFacet(v)?e:(r=e.clearRefinements(v).addDisjunctiveFacet(v),Boolean(t.toggle&&t.toggle[v])?(p&&p.forEach(function(e){r=r.addDisjunctiveFacetRefinement(v,e)}),r):d?(m&&m.forEach(function(e){r=r.addDisjunctiveFacetRefinement(v,e)}),r):r.setQueryParameters({disjunctiveFacetsRefinements:k(k({},e.disjunctiveFacetsRefinements),{},gc({},v,[]))}))}};throw new Error(Sc("The `attribute` option is required."))}}var Sc=i({name:"toggle-refinement",connector:!0}),Oc="ais.toggleRefinement",jc=function(e){var c=e.instantSearchInstance,s=e.helper,u=e.attribute,f=e.on;return function(){for(var e,t,r,n,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];1===a.length?c.sendEventToInsights(a[0]):(e=a[1],t=void 0===(t=a[2])?"Filter Applied":t,r=(n=yc(a[0].split(":"),2))[0],n=n[1],"click"!==r||void 0===f||e||c.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:Oc,eventType:r,eventModifier:n,payload:{eventName:t,index:s.getIndex(),filters:f.map(function(e){return"".concat(u,":").concat(e)})},attribute:u}))}};function wc(e){return(wc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pc(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function Rc(n){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Pc(Object(i),!0).forEach(function(e){var t,r;t=n,r=i[e=e],(e=function(e){e=function(e,t){if("object"!==wc(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==wc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===wc(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Pc(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}function Fc(e){var t=e.children,r=e.renderToString,n=e.notifyServer,i=e.searchRef;return Promise.resolve().then(function(){r(s.createElement(pr.Provider,{value:{notifyServer:n}},t))}).then(function(){return new Promise(function(e){return setTimeout(e,0)})}).then(function(){if(i.current)return r=i.current,(n=r.mainHelper).searchOnlyWithDerivedHelpers(),new Promise(function(e,t){n.derivedHelpers[0].on("result",function(){e()}),n.on("error",function(e){t(e)}),r.on("error",function(e){t(e)}),n.derivedHelpers.forEach(function(e){return e.on("error",function(e){t(e)})})});throw new Error("Unable to retrieve InstantSearch's server state in `getServerState()`. Did you mount the <InstantSearch> component?");var r,n}).then(function(){return{initialResults:(e=i.current.mainIndex,r={},xt(e,function(e){var t=e.getResults();r[e.getIndexId()]={state:Rc({},t._state),results:t._rawResults}}),r)};var e,r})}e.Configure=function(e){return Or(e,{$$widgetType:"ais.configure"}),null},e.DynamicWidgets=function(e){var t=e.children,r=void 0===(r=e.fallbackComponent)?Ir:r,e=rr(e,xr),n=s.useRef(r),r=Er(e,{$$widgetType:"ais.dynamicWidgets"}).attributesToRender,i=new Map;return s.Children.forEach(t,function(e){var t=function e(t){if(!Ar(t))return;if(t.props.attribute)return t.props.attribute;if(Array.isArray(t.props.attributes))return t.props.attributes[0];if(t.props.children)return ur(1===s.Children.count(t.props.children)),e(s.Children.only(t.props.children));return}(e);ur(void 0!==t),i.set(t,e)}),s.createElement(s.Fragment,null,r.map(function(e){return s.createElement(g.Fragment,{key:e},i.get(e)||s.createElement(n.current,{attribute:e}))}))},e.Index=function(e){var t,r,n,i,a,o=e.children,c=(e=e=rr(e,Jr),t=mr(),r=null==(r=Vr())?void 0:r.initialResults,n=lr(),i=gr(e),c=(e=g.useMemo(function(){return Qr(i)},[i])).getHelper(),a=Br(),yr(function(){a()},[c,a]),vr({widget:e,parentIndex:n,props:i,shouldSsr:Boolean(t||r)}),e);return null===c.getHelper()?null:s.createElement(fr.Provider,{value:c},o)},e.InstantSearch=function(e){var t=e.children;return(e=Ii(rr(e,Ti))).started?s.createElement(hr.Provider,{value:e},s.createElement(fr.Provider,{value:e.mainIndex},t)):null},e.InstantSearchSSRProvider=Di,e.InstantSearchServerContext=pr,e.getServerState=function(r,e){function n(){var t=!1;return function(e){e=e.search;if(t)throw new Error("getServerState should be called with a single InstantSearchSSRProvider and a single InstantSearch component.");t=!0,a.current=e}}var i=e.renderToString,a={current:void 0};return Fc({children:r,renderToString:i,searchRef:a,notifyServer:n()}).then(function(e){var t=!1;return xt(a.current.mainIndex,function(e){t=t||e.getWidgets().some(function(e){return"ais.dynamicWidgets"===e.$$type})}),t?Fc({children:s.createElement(Di,e,r),renderToString:i,searchRef:a,notifyServer:n()}):e})},e.useBreadcrumb=function(e,t){return l(Li,e,t)},e.useClearRefinements=function(e,t){return l(Vi,e,t)},e.useConfigure=Or,e.useConnector=l,e.useCurrentRefinements=function(e,t){return l(Yi,e,t)},e.useDynamicWidgets=Er,e.useGeoSearch=function(e,t){return l(la,e,t)},e.useHierarchicalMenu=function(e,t){return l(Sa,e,t)},e.useHits=function(e,t){return l(Ea,e,t)},e.useHitsPerPage=function(e,t){return l(Da,e,t)},e.useInfiniteHits=function(e,t){return l(Va,e,t)},e.useInstantSearch=function(){var t,r,n,i,a,o,c=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).catchError,s=dr();t=dr(),r=lr(),e=r.getIndexId(),l=(u=nr(g.useState(function(){return t.getUiState()}),2))[0],n=u[1],u=l[e],e=g.useCallback(function(e){t.setUiState(e)},[t]),f=g.useCallback(function(e){r.setIndexUiState(e)},[r]),g.useEffect(function(){function e(){n(t.getUiState())}return t.addListener("render",e),function(){t.removeListener("render",e)}},[t]);var e=(l={uiState:l,setUiState:e,indexUiState:u,setIndexUiState:f}).uiState,u=l.setUiState,f=l.indexUiState,l=l.setIndexUiState;i=dr(),a=lr(),d=nr(g.useState(function(){return sr(a)}),2),h=d[0],o=d[1],g.useEffect(function(){function e(){var e=a.getResults();null!==e&&o({results:e,scopedResults:a.getScopedResults()})}return i.addListener("render",e),function(){i.removeListener("render",e)}},[i,a]);var h=(d=h).results,d=d.scopedResults,p=g.useCallback(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return s.use.apply(s,t),function(){s.unuse.apply(s,t)}},[s]),m=g.useCallback(function(){s.refresh()},[s]);return yr(function(){var e;return c?(s.addListener("error",e=function(){}),function(){return s.removeListener("error",e)}):function(){}},[s,c]),{results:h,scopedResults:d,uiState:e,setUiState:u,indexUiState:f,setIndexUiState:l,addMiddlewares:p,refresh:m,status:s.status,error:s.error}},e.useMenu=function(e,t){return l(eo,e,t)},e.useNumericMenu=function(e,t){return l(uo,e,t)},e.usePagination=function(e,t){return l(Po,e,t)},e.usePoweredBy=function(){var e=qt(function(e){return(null==(e=e.window.location)?void 0:e.hostname)||""},{fallback:function(){return""}});return{url:"https://www.algolia.com/?utm_source=react-instantsearch&utm_medium=website&utm_content=".concat(e,"&utm_campaign=poweredby")}},e.useQueryRules=function(e,t){return l(Do,e,t)},e.useRange=function(e,t){return l(Qo,e,t)},e.useRefinementList=function(e,t){return l(Xo,e,t)},e.useSearchBox=function(e,t){return l(tc,e,t)},e.useSortBy=function(e,t){return l(cc,e,t)},e.useStats=function(e,t){return l(hc,e,t)},e.useToggleRefinement=function(e,t){return l(bc,e,t)},e.version=H,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
3
3
|
//# sourceMappingURL=ReactInstantSearchCore.min.js.map
|