vendor: 4,342 bytes, line 1
1(self.webpackChunkweb_v3=self.webpackChunkweb_v3||[]).push([[9196],{74103:function(e,t,n){"use strict";var r=n(36571),i=n(19127),a=n(42223),s=n(33371),o=n(67691);function c(e,t,n,i){return new r(e,t,n,i)}c.version=n(16938),c.AlgoliaSearchHelper=r,c.SearchParameters=s,c.RecommendParameters=i,c.SearchResults=o,c.RecommendResults=a,e.exports=c},46732:function(e,t,n){"use strict";var r=n(72733);function i(e,t,n){this.main=e,this.fn=t,this.recommendFn=n,this.lastResults=null,this.lastRecommendResults=null}n(73014)(i,r),i.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},i.prototype.getModifiedState=function(e){return this.fn(e)},i.prototype.getModifiedRecommendState=function(e){return this.recommendFn(e)},e.exports=i},19127:function(e){"use strict";function t(e){e=e||{},this.params=e.params||[]}t.prototype={constructor:t,addParams:function(e){var n=this.params.slice();return n.push(e),new t({params:n})},removeParams:function(e){return new t({params:this.params.filter(function(t){return t.$$id!==e})})},addFrequentlyBoughtTogether:function(e){return this.addParams(Object.assign({},e,{model:"bought-together"}))},addRelatedProducts:function(e){return this.addParams(Object.assign({},e,{model:"related-products"}))},addTrendingItems:function(e){return this.addParams(Object.assign({},e,{model:"trending-items"}))},addTrendingFacets:function(e){return this.addParams(Object.assign({},e,{model:"trending-facets"}))},addLookingSimilar:function(e){return this.addParams(Object.assign({},e,{model:"looking-similar"}))},_buildQueries:function(e,t){return this.params.filter(function(e){return void 0===t[e.$$id]}).map(function(t){var n=Object.assign({},t,{indexName:e,threshold:t.threshold||0});return delete n.$$id,n})}},e.exports=t},42223:function(e){"use strict";function t(e,t){this._state=e,this._rawResults={};var n=this;e.params.forEach(function(e){var r=e.$$id;n[r]=t[r],n._rawResults[r]=t[r]})}t.prototype={constructor:t},e.exports=t},44054:function(e,t,n){"use strict";var r=n(29110),i=n(40317),a=n(21383),s={addRefinement:function(e,t,n){if(s.isRefined(e,t,n))return e;var i=""+n,a=e[t]?e[t].concat(i):[i],o={};return o[t]=a,r(o,e)},removeRefinement:function(e,t,n){if(void 0===n)return s.clearRefinement(e,function(e,n){return t===n});var r=""+n;return s.clearRefinement(e,function(e,n){return t===n&&r===e})},toggleRefinement:function(e,t,n){if(void 0===n)throw new Error("toggleRefinement should be used with a value");return s.isRefined(e,t,n)?s.removeRefinement(e,t,n):s.addRefinement(e,t,n)},clearRefinement:function(e,t,n){if(void 0===t)return i(e)?{}:e;if("string"==typeof t)return a(e,[t]);if("function"==typeof t){var r=!1,s=Object.keys(e).reduce(function(i,a){var s=e[a]||[],o=s.filter(function(e){return!t(e,a,n)});return o.length!==s.length&&(r=!0),i[a]=o,i},{});return r?s:e}},isRefined:function(e,t,n){var r=Boolean(e[t])&&e[t].length>0;if(void 0===n||!r)return r;var i=""+n;return-1!==e[t].indexOf(i)}};e.exports=s},33371:function(e,t,n){"use strict";var r=n(29110),i=n(20849),a=n(14843),s=n(44728),o=n(40317),c=n(21383),u=n(17507),l=n(72208),d=n(44054);function h(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every(function(e,n){return h(t[n],e)}):e===t}function f(e){var t=e?f._parseNumbers(e):{};void 0===t.userToken||l(t.userToken)||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=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var n=this;Object.keys(t).forEach(function(e){var r=-1!==f.PARAMETERS.indexOf(e),i=void 0!==t[e];!r&&i&&(n[e]=t[e])})}function m(e){var t=parseFloat(e);return isFinite(t)?t:null}f.PARAMETERS=Object.keys(new f),f._parseNumbers=function(e){if(e instanceof f)return e;var t={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroun
1dRadius","hitsPerPage","minProximity"].forEach(function(n){var r=e[n];if("string"==typeof r){var i=parseFloat(r);isNaN(i)?t[n]=r:isFinite(i)?t[n]=i:t[n]=null}else"number"!=typeof r||isFinite(r)||(t[n]=null)}),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map(function(e){return Array.isArray(e)?e.map(function(e){return"string"==typeof e?m(e):"number"!=typeof e||isFinite(e)?e:null}):e})),e.numericRefinements){var n={};Object.keys(e.numericRefinements).forEach(function(t){var r=e.numericRefinements[t]||{};n[t]={},Object.keys(r).forEach(function(e){var i=r[e].map(function(e){return Array.isArray(e)?e.map(function(e){return"string"==typeof e?m(e):"number"!=typeof e||isFinite(e)?e:null}):"string"==typeof e?m(e):"number"!=typeof e||isFinite(e)?e:null});n[t][e]=i})}),t.numericRefinements=n}return s(e,t)},f.make=function(e){var t=new f(e);return(e.hierarchicalFacets||[]).forEach(function(e){if(e.rootPath){var n=t.getHierarchicalRefinement(e.name);n.length>0&&0!==n[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(n=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}}),t},f.validate=function(e,t){var n=t||{};return e.tagFilters&&n.tagRefinements&&n.tagRefinements.length>0?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."):e.tagRefinements.length>0&&n.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&&n.numericRefinements&&o(n.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."):o(e.numericRefinements)&&n.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){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:d.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:d.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:d.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:d.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},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=u(n);if(this.isNumericRefined(e,t,r))return this;var i=s({},this.numericRefinements);return i[e]=s({},i[e]),i[e][t]?(i[e][t]=i[e][t].slice(),i[e][t].push(r)):i[e][t]=[r],this.setQueryParameters({numericRefinements:i})},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(e,t,n){var r=n;return void 0!==r?this.isNumericRefined(e,t,r)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(n,i){return i===e&&n.op===t&&h(n.val,u(r))})}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(n,r){return r===e&&n.op===t})}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(t,n){return n===e})}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return o(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof e)return c(this.numericRefinements,[e]);if("function"==typeof e){var t=!1,n=this.numericRefinements,r=Object.keys(n).reduce(function(r,i){var a=n[i],s={};return a=a||{}
vendor: 22,609 bytes, line 1
1,Object.keys(a).forEach(function(n){var r=a[n]||[],o=[];r.forEach(function(t){e({val:t,op:n},i,"numeric")||o.push(t)}),o.length!==r.length&&(t=!0),s[n]=o}),r[i]=s,r},{});return t?r:this.numericRefinements}},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))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return d.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:d.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return d.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:d.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return d.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:d.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter(function(t){return t!==e})}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter(function(t){return t!==e})}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter(function(t){return t.name!==e})}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return d.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:d.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return d.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:d.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return d.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:d.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter(function(t){return t!==e})};return this.setQueryParameters(t)},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))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:d.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:d.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:d.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var n=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),i={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+n))?-1===t.indexOf(n)?i[e]=[]:i[e]=[t.slice(0,t.lastIndexOf(n))]:i[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:r(i,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var n={};return n[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:r(n,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:r(t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&d.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&d.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&d.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var n=this.getHierarchicalRefinement(e);return t?-1!==n.indexOf(t):n.length>0},isNumericRefined:function(e,t,n){if(void 0===n&&void 0===t)return Boolean(this.numericRefinements[e]);var r=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===n||!r)return r;var a,s,o=u(n),c=void 0!==(a=this.numericRefinements[e][t],s=o,i(a,function(e){return h(e,s)}));return r&&c},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=a(Object.keys(this.numericRefinements).filter(function(t){return Object.keys(e.numericRefinements[t]).length>0}),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter(function(t){return e.disjunctiveFacetsRefinements[t].length>0}).concat(t).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var e=this;return a(this.hierarchicalFacets.map(function(e){return e.name}),Object.keys(this.hierarchicalFacetsRefinements).filter(function(t){return e.hierarchicalFacetsRefinements[t].length>0})).sort()},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter(function(t){return-1===e.indexOf(t)})},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},n=this;return Object.keys(this).forEach(function(r){var i=n[r];-1===e.indexOf(r)&&void 0!==i&&(t[r]=i)}),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var n={};return 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,r=f._parseNumbers(e),i=Object.keys(this).reduce(function(e,t){return e[t]=n[t],e},{}),a=Object.keys(r).reduce(function(e,t){var n=void 0!==e[t],i=void 0!==r[t];return n&&!i?c(e,[t]):(i&&(e[t]=r[t]),e)},i);return new this.constructor(a)},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(e){return i(this.hierarchicalFacets,function(t){return t.name===e})},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var n=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e));return t.split(n).map(function(e){return e.trim()})},toString:function(){return JSON.stringify(this,null,2)}},e.exports=f},76673:function(e,t,n){"use strict";e.exports=function(e){return function(t,n){var r=e.hierarchicalFacets[n],u=e.hierarchicalFacetsRefinements[r.name]&&e.hierarchicalFacetsRefinements[r.name][0]||"",l=e._getHierarchicalFacetSeparator(r),d=e._getHierarchicalRootPath(r),h=e._getHierarchicalShowParentLevel(r),f=a(e._getHierarchicalFacetSortBy(r)),m=t.every(function(e){return e.exhaustive}),p=function(e,t,n,r,a){return function(u,l,d){var h=u;if(d>0){var f=0;for(h=u;f<d;){var m=h&&Array.isArray(h.data)?h.data:[];h=i(m,function(e){return e.isRefined}),f++}}if(h){var p=Object.keys(l.data).map(function(e){return[e,l.data[e]]}).filter(function(e){return function(e,t,n,r,i,a){if(i&&(0!==e.indexOf(i)||i===e))return!1;return!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))}(e[0],h.path||n,a,t,n,r)});h.data=s(p.map(function(e){var n=e[0];return function(e,t,n,r,i){var a=t.split(n);return{name:a[a.length-1].trim(),path:t,escapedValue:o(t),count:e,isRefined:r===t||0===r.indexOf(t+n),exhaustive:i,data:null}}(e[1],n,t,c(a),l.exhaustive)}),e[0],e[1])}return u}}(f,l,d,h,u),g=t;return d&&(g=t.slice(d.split(l).length)),g.reduce(p,{name:e.hierarchicalFacets[n].name,count:null,isRefined:!0,path:null,escapedValue:null,exhaustive:m,data:null})}};var r=n(2909),i=n(20849),a=n(7577),s=n(38601),o=r.escapeFacetValue,c=r.unescapeFacetValue},67691:function(e,t,n){"use strict";var r=n(78965),i=n(29110),a=n(2909),s=n(20849),o=n(43917),c=n(7577),u=n(92183),l=n(38601),d=a.escapeFacetValue,h=a.unescapeFacetValue,f=n(76673);function m(e){var t={};return e.forEach(function(e,n){t[e]=n}),t}function p(e,t,n){t&&t[n]&&(e.stats=t[n])}function g(e,t,n){var a=t[0]||{};this._rawResults=t;var c=this;Object.keys(a).forEach(function(e){c[e]=a[e]});var l=i(n,{persistHierarchicalRootCount:!1});Object.keys(l).forEach(function(e){c[e]=l[e]}),this.processingTimeMS=t.reduce(function(e,t){return void 0===t.processingTimeMS?e:e+t.processingTimeMS},0),this.disjunctiveFacets=[],this.hierarchicalFacets=e.hierarchicalFacets.map(function(){return[]}),this.facets=[];var d=e.getRefinedDisjunctiveFacets(),g=m(e.facets),v=m(e.disjunctiveFacets),y=1,_=a.facets||{};Object.keys(_).forEach(function(t){var n,r,i=_[t],u=(n=e.hierarchicalFacets,r=t,s(n,function(e){return(e.attributes||[]).indexOf(r)>-1}));if(u){var l=u.attributes.indexOf(t),d=o(e.hierarchicalFacets,function(e){return e.name===u.name});c.hierarchicalFacets[d][l]={attribute:t,data:i,exhaustive:a.exhaustiveFacetsCount}}else{var h,f=-1!==e.disjunctiveFacets.indexOf(t),m=-1!==e.facets.indexOf(t);f&&(h=v[t],c.disjunctiveFacets[h]={name:t,data:i,exhaustive:a.exhaustiveFacetsCount},p(c.disjunctiveFacets[h],a.facets_stats,t)),m&&(h=g[t],c.facets[h]={name:t,data:i,exhaustive:a.exhaustiveFacetsCount},p(c.facets[h],a.facets_stats,t))}}),this.hierarchicalFacets=r(this.hierarchicalFacets),d.forEach(function(n){var r=t[y],s=r&&r.facets?r.facets:{},l=e.getHierarchicalFacetByName(n);Object.keys(s).forEach(function(t){var n,d=s[t];if(l){n=o(e.hierarchicalFacets,function(e){return e.name===l.name});var f=o(c.hierarchicalFacets[n],function(e){return e.attribute===t});if(-1===f)return;c.hierarchicalFacets[n][f].data=c.persistHierarchicalRootCount?u(c.hierarchicalFacets[n][f].data,d):i(d,c.hierarchicalFacets[n][f].data)}else{n=v[t];var m=a.facets&&a.facets[t]||{};c.disjunctiveFacets[n]={name:t,data:u(m,d),exhaustive:r.exhaustiveFacetsCount},p(c.disjunctiveFacets[n],r.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach(function(r){!c.disjunctiveFacets[n].data[r]&&e.disjunctiveFacetsRefinements[t].indexOf(h(r))>-1&&(c.disjunctiveFacets[n].data[r]=0)})}}),y++}),e.getRefinedHierarchicalFacets().forEach(function(n){var r=e.getHierarchicalFacetByName(n),a=e._getHierarchicalFacetSeparator(r),s=e.getHierarchicalRefinement(n);0===s.length||s[0].split(a).length<2||t.slice(y).forEach(function(t){var n=t&&t.facets?t.facets:{};Object.keys(n).forEach(function(t){var u=n[t],l=o(e.hierarchicalFacets,function(e){return e.name===r.name}),d=o(c.hierarchicalFacets[l],function(e){return e.attribute===t});if(-1!==d){var h={};if(s.length>0&&!c.persistHierarchicalRootCount){var f=s[0].split(a)[0];h[f]=c.hierarchicalFacets[l][d].data[f]}c.hierarchicalFacets[l][d].data=i(h,u,c.hierarchicalFacets[l][d].data)}}),y++})}),Object.keys(e.facetsExcludes).forEach(function(t){var n=e.facetsExcludes[t],r=g[t];c.facets[r]={name:t,data:_[t],exhaustive:a.exhaustiveFacetsCount},n.forEach(function(e){c.facets[r]=c.facets[r]||{name:t},c.facets[r].data=c.facets[r].data||{},c.facets[r].data[e]=0})}),this.hierarchicalFacets=this.hierarchicalFacets.map(f(e)),this.facets=r(this.facets),this.disjunctiveFacets=r(this.disjunctiveFacets),this._state=e}function v(e,t){function n(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var r=s(e.facets,n);return r?Object.keys(r.data).map(function(n){var i=d(n);return{name:n,escapedValue:i,count:r.data[n],isRefined:e._state.isFacetRefined(t,i),isExcluded:e._state.isExcludeRefined(t,n)}}):[]}if(e._state.isDisjunctiveFacet(t)){var i=s(e.disjunctiveFacets,n);return i?Object.keys(i.data).map(function(n){var r=d(n);return{name:n,escapedValue:r,count:i.data[n],isRefined:e._state.isDisjunctiveFacetRefined(t,r)}}):[]}if(e._state.isHierarchicalFacet(t)){var a=s(e.hierarchicalFacets,n);if(!a)return a;var o=e._state.getHierarchicalFacetByName(t),c=e._state._getHierarchicalFacetSeparator(o),u=h(e._state.getHierarchicalRefinement(t)[0]||"");0===u.indexOf(o.rootPath)&&(u=u.replace(o.rootPath+c,""));var l=u.split(c);return l.unshift(t),y(a,l,0),a}}function y(e,t,n){e.isRefined=e.name===(t[n]&&t[n].trim()),e.data&&e.data.forEach(function(e){y(e,t,n+1)})}function _(e,t,n,r){if(r=r||0,Array.isArray(t))return e(t,n[r]);if(!t.data||0===t.data.length)return t;var a=t.data.map(function(t){return _(e,t,n,r+1)}),s=e(a,n[r]);return i({data:s},t)}function S(e,t){var n=s(e,function(e){return e.name===t});return n&&n.stats}function R(e,t,n,r,i){var a=s(i,function(e){return e.name===n}),o=a&&a.data&&a.data[r]?a.data[r]:0,c=a&&a.exhaustive||!1;return{type:t,attributeName:n,name:r,count:o,exhaustive:c}}g.prototype.getFacetByName=function(e){function t(t){return t.name===e}return s(this.facets,t)||s(this.disjunctiveFacets,t)||s(this.hierarchicalFacets,t)},g.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],g.prototype.getFacetValues=function(e,t){var n=v(this,e);if(n){var r,a=i(t,{sortBy:g.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),s=this;if(Array.isArray(n))r=[e];else r=s._state.getHierarchicalFacetByName(n.name).attributes;return _(function(e,t){var n=function(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}(s,t);if(a.facetOrdering&&n)return function(e,t){var n=[],r=[],i=t.hide||[],a=(t.order||[]).reduce(function(e,t,n){return e[t]=n,e},{});e.forEach(function(e){var t=e.path||e.name,s=i.indexOf(t)>-1;s||void 0===a[t]?s||r.push(e):n[a[t]]=e}),n=n.filter(function(e){return e});var s,o=t.sortRemainingBy;return"hidden"===o?n:(s="alpha"===o?[["path","name"],["asc","asc"]]:[["count"],["desc"]],n.concat(l(r,s[0],s[1])))}(e,n);if(Array.isArray(a.sortBy)){var r=c(a.sortBy,g.DEFAULT_SORT),i=l(e,r[0],r[1]),o=n&&n.hide?n.hide:[];if(o.length>0){var u=[];return i.forEach(function(e){var t=e.path||e.name;-1===o.indexOf(t)&&u.push(e)}),u}return i}if("function"==typeof a.sortBy)return function(e,t){return t.sort(e)}(a.sortBy,e);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")},n,r)}},g.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?S(this.facets,e):this._state.isDisjunctiveFacet(e)?S(this.disjunctiveFacets,e):void 0},g.prototype.getRefinements=function(){var e=this._state,t=this,n=[];return Object.keys(e.facetsRefinements).forEach(function(r){e.facetsRefinements[r].forEach(function(i){n.push(R(e,"facet",r,i,t.facets))})}),Object.keys(e.facetsExcludes).forEach(function(r){e.facetsExcludes[r].forEach(function(i){n.push(R(e,"exclude",r,i,t.facets))})}),Object.keys(e.disjunctiveFacetsRefinements).forEach(function(r){e.disjunctiveFacetsRefinements[r].forEach(function(i){n.push(R(e,"disjunctive",r,i,t.disjunctiveFacets))})}),Object.keys(e.hierarchicalFacetsRefinements).forEach(function(r){e.hierarchicalFacetsRefinements[r].forEach(function(i){n.push(function(e,t,n,r){var i=e.getHierarchicalFacetByName(t),a=e._getHierarchicalFacetSeparator(i),o=n.split(a),c=s(r,function(e){return e.name===t}),u=o.reduce(function(e,t){var n=e&&s(e.data,function(e){return e.name===t});return void 0!==n?n:e},c),l=u&&u.count||0,d=u&&u.exhaustive||!1,h=u&&u.path||"";return{type:"hierarchical",attributeName:t,name:h,count:l,exhaustive:d}}(e,r,i,t.hierarchicalFacets))})}),Object.keys(e.numericRefinements).forEach(function(t){var r=e.numericRefinements[t];Object.keys(r).forEach(function(e){r[e].forEach(function(r){n.push({type:"numeric",attributeName:t,name:r,numericValue:r,operator:e})})})}),e.tagRefinements.forEach(function(e){n.push({type:"tag",attributeName:"_tags",name:e})}),n},e.exports=g},36571:function(e,t,n){"use strict";var r=n(72733),i=n(46732),a=n(2909).escapeFacetValue,s=n(73014),o=n(44728),c=n(40317),u=n(21383),l=n(19127),d=n(42223),h=n(49228),f=n(33371),m=n(67691),p=n(57749),g=n(16938);function v(e,t,n,r){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+g+")"),this.setClient(e);var i=n||{};i.index=t,this.state=f.make(i),this.recommendState=new l({params:i.recommendState}),this.lastResults=null,this.lastRecommendResults=null,this._queryId=0,this._recommendQueryId=0,this._lastQueryIdReceived=-1,this._lastRecommendQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0,this._currentNbRecommendQueries=0,this._searchResultsOptions=r,this._recommendCache={}}function y(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function _(){return this.state.page}s(v,r),v.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},v.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},v.prototype.searchWithComposition=function(){return this._runComposition({onlyWithDerivedHelpers:!0}),this},v.prototype.recommend=function(){return this._recommend(),this},v.prototype.getQuery=function(){var e=this.state;return h._getHitsSearchParams(e)},v.prototype.searchOnce=function(e,t){var n=e?this.state.setQueryParameters(e):this.state,r=h._getQueries(n.index,n),i=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:n}),!t)return this.client.search(r).then(function(e){return i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),{content:new m(n,e.results),state:n,_originalResponse:e}},function(e){throw i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),e});this.client.search(r).then(function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(null,new m(n,e.results),n)}).catch(function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(e,null,n)})},v.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 r=n.getModifiedState(t),i=o({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:u(h._getHitsSearchParams(r),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),a="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(a);var s=this.client.initIndex(r.index);if("function"!=typeof s.findAnswers)throw new Error(a);return s.findAnswers(r.query,e.queryLanguages,i)},v.prototype.searchForFacetValues=function(e,t,n,r){var i="function"==typeof this.client.searchForFacetValues&&"function"!=typeof this.client.searchForFacets,s="function"==typeof this.client.initIndex;if(!i&&!s&&"function"!=typeof this.client.search)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");var o=this.state.setQueryParameters(r||{}),c=o.isDisjunctiveFacet(e),u=h.getSearchForFacetQuery(e,t,n,o);this._currentNbQueries++;var l,d=this;i?l=this.client.searchForFacetValues([{indexName:o.index,params:u}]):s?l=this.client.initIndex(o.index).searchForFacetValues(u):(delete u.facetName,l=this.client.search([{type:"facet",facet:e,indexName:o.index,params:u}]).then(function(e){return e.results[0]}
vendor: 5,357 bytes, line 1
1)),this.emit("searchForFacetValues",{state:o,facet:e,query:t});var f=this.lastResults&&this.lastResults.index===o.index&&this.lastResults.renderingContent&&this.lastResults.renderingContent.facetOrdering&&this.lastResults.renderingContent.facetOrdering.values&&this.lastResults.renderingContent.facetOrdering.values[e]&&this.lastResults.renderingContent.facetOrdering.values[e].hide||[];return l.then(function(t){return d._currentNbQueries--,0===d._currentNbQueries&&d.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits=t.facetHits.reduce(function(t,n){return f.indexOf(n.value)>-1||(n.escapedValue=a(n.value),n.isRefined=c?o.isDisjunctiveFacetRefined(e,n.escapedValue):o.isFacetRefined(e,n.escapedValue),t.push(n)),t},[]),t},function(e){throw d._currentNbQueries--,0===d._currentNbQueries&&d.emit("searchQueueEmpty"),e})},v.prototype.searchForCompositionFacetValues=function(e,t,n,r){if("function"!=typeof this.client.searchForFacetValues)throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues");var i=this.state.setQueryParameters(r||{}),s=i.isDisjunctiveFacet(e);this._currentNbQueries++;var o,c=this;return o=this.client.searchForFacetValues({compositionID:i.index,facetName:e,searchForFacetValuesRequest:{params:{query:t,maxFacetHits:n,searchQuery:h._getCompositionHitsSearchParams(i)}}}),this.emit("searchForFacetValues",{state:i,facet:e,query:t}),o.then(function(t){return c._currentNbQueries--,0===c._currentNbQueries&&c.emit("searchQueueEmpty"),(t=t.results[0]).facetHits.forEach(function(t){t.escapedValue=a(t.value),t.isRefined=s?i.isDisjunctiveFacetRefined(e,t.escapedValue):i.isFacetRefined(e,t.escapedValue)}),t},function(e){throw c._currentNbQueries--,0===c._currentNbQueries&&c.emit("searchQueueEmpty"),e})},v.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},v.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},v.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},v.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},v.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.addNumericRefinement=function(e,t,n){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,n),isPageReset:!0}),this},v.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},v.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},v.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},v.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},v.prototype.addFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.addFrequentlyBoughtTogether(e)}),this},v.prototype.addRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.addRelatedProducts(e)}),this},v.prototype.addTrendingItems=function(e){return this._recommendChange({state:this.recommendState.addTrendingItems(e)}),this},v.prototype.addTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.addTrendingFacets(e)}),this},v.prototype.addLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.addLookingSimilar(e)}),this},v.prototype.removeNumericRefinement=function(e,t,n){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,n),isPageReset:!0}),this},v.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},v.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},v.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},v.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},v.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},v.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},v.prototype.removeFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.removeParam
vendor: 8,196 bytes, line 1
1s(e)}),this},v.prototype.removeRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.removeTrendingItems=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.removeTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.removeLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},v.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},v.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},v.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},v.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},v.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},v.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},v.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},v.prototype.setCurrentPage=y,v.prototype.setPage=y,v.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},v.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},v.prototype.setState=function(e){return this._change({state:f.make(e),isPageReset:!1}),this},v.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new f(e),this},v.prototype.hasRefinements=function(e){return!!c(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))},v.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},v.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},v.prototype.hasTag=function(e){return this.state.isTagRefined(e)},v.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},v.prototype.getIndex=function(){return this.state.index},v.prototype.getCurrentPage=_,v.prototype.getPage=_,v.prototype.getTags=function(){return this.state.tagRefinements},v.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e))this.state.getConjunctiveRefinements(e).forEach(function(e){t.push({value:e,type:"conjunctive"})}),this.state.getExcludeRefinements(e).forEach(function(e){t.push({value:e,type:"exclude"})});else if(this.state.isDisjunctiveFacet(e)){this.state.getDisjunctiveRefinements(e).forEach(function(e){t.push({value:e,type:"disjunctive"})})}var n=this.state.getNumericRefinements(e);return Object.keys(n).forEach(function(e){var r=n[e];t.push({value:r,operator:e,type:"numeric"})}),t},v.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},v.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},v.prototype._search=function(e){var t=this.state,n=[],r=[];e.onlyWithDerivedHelpers||(r=h._getQueries(t.index,t),n.push({state:t,queriesCount:r.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var i=this.derivedHelpers.map(function(e){var r=e.getModifiedState(t),i=r.index?h._getQueries(r.index,r):[];return n.push({state:r,queriesCount:i.length,helper:e}),e.emit("search",{state:r,results:e.lastResults}),i}),a=Array.prototype.concat.apply(r,i),s=this._queryId++;if(this._currentNbQueries++,!a.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,n,s));try{this.client.search(a).then(this._dispatchAlgoliaResponse.bind(this,n,s)).catch(this._dispatchAlgoliaError.bind(this,s))}catch(e){this.emit("error",{error:e})}},v.prototype._runComposition=function(){var e=this.state,t=[],n=this.derivedHelpers.map(function(n){var r=n.getModifiedState(e),i=h._getCompositionQueries(r);return t.push({state:r,helper:n}),n.emit("search",{state:r,results:n.lastResults}),i}),r=Array.prototype.concat.apply([],n),i=this._queryId++;if(this._currentNbQueries++,!r.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,t,i));if(r.length>1)throw new Error("Only one query is allowed when using a composition.");var a=r[0];try{this.client.search(a).then(this._dispatchAlgoliaResponse.bind(this,t,i)).catch(this._dispatchAlgoliaError.bind(this,i))}catch(e){this.emit("error",{error:e})}},v.prototype._recommend=function(){var e=this.state,t=this.recommendState,n=this.getIndex(),r=[{state:t,index:n,helper:this}],i=t.params.map(function(e){return e.$$id});this.emit("fetch",{recommend:{state:t,results:this.lastRecommendResults}});var a=this._recommendCache,s=this.derivedHelpers.map(function(t){var n=t.getModifiedState(e).index;if(!n)return[];var s=t.getModifiedRecommendState(new l);return r.push({state:s,index:n,helper:t}),i=Array.prototype.concat.apply(i,s.params.map(function(e){return e.$$id})),t.emit("fetch",{recommend:{state:s,results:t.lastRecommendResults}}),s._buildQueries(n,a)}),o=Array.prototype.concat.apply(this.recommendState._buildQueries(n,a),s);if(0!==o.length)if(o.length>0&&void 0===this.client.getRecommendations)console.warn("Please update algoliasearch/lite to the latest version in order to use recommend widgets.");else{var c=this._recommendQueryId++;this._currentNbRecommendQueries++;try{this.client.getRecommendations(o).then(this._dispatchRecommendResponse.bind(this,c,r,i)).catch(this._dispatchRecommendError.bind(this,c))}catch(e){this.emit("error",{error:e})}}},v.prototype._dispatchAlgoliaResponse=function(e,t,n){var r=this;if(!(t<this._lastQueryIdReceived)){this._currentNbQueries-=t-this._lastQueryIdReceived,this._lastQueryIdReceived=t,0===this._currentNbQueries&&this.emit("searchQueueEmpty");var i=n.results.slice(),a=Object.keys(n).reduce(function(e,t){return"results"!==t&&(e[t]=n[t]),e},{});Object.keys(a).length<=0&&(a=void 0),e.forEach(function(e){var t=e.state,n=e.queriesCount,s=e.helper,o=void 0!==n?i.splice(0,n):i;if(t.index){if(o.length>0&&o[0].feedID){var c=o.map(function(e){var n=new m(t,[e],r._searchResultsOptions);return void 0!==a&&(n._rawContent=a),n});s.lastResults=new m(t,[o[0]],r._searchResultsOptions),s.lastResults.feeds=c,void 0!==a&&(s.lastResults._rawContent=a)}else s.lastResults=new m(t,o,r._searchResultsOptions),void 0!==a&&(s.lastResults._rawContent=a);s.emit("result",{results:s.lastResults,state:t})}else s.emit("result",{results:null,state:t})})}},v.prototype._dispatchRecommendResponse=function(e,t,n,r){if(!(e<this._lastRecommendQueryIdReceived)){this._currentNbRecommendQueries-=e-this._lastRecommendQueryIdReceived,this._lastRecommendQueryIdReceived=e,0===this._currentNbRecommendQueries&&this.emit("recommendQueueEmpty");var i=this._recommendCache,a={};n.filter(function(e){return void 0===i[e]}).forEach(function(e,t){a[e]||(a[e]=[]),a[e].push(t)}),Object.keys(a).forEach(function(e){var t=a[e],s=r.results[t[0]];1!==t.length?i[e]=Object.assign({},s,{hits:p(n,t.map(function(e){return r.results[e].hits}))}):i[e]=s});var s={};n.forEach(function(e){s[e]=i[e]}),t.forEach(function(e){var t=e.state,n=e.helper;e.index?(n.lastRecommendResults=new d(t,s),n.emit("recommend:result",{recommend:{results:n.lastRecommendResults,state:t}})):n.emit("recommend:result",{results:null,state:t})})}},v.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"))},v.prototype._dispatchRecommendError=function(e,t){e<this._lastRecommendQueryIdReceived||(this._currentNbRecommendQueries-=e-this._lastRecommendQueryId
1Received,this._lastRecommendQueryIdReceived=e,this.emit("error",{error:t}),0===this._currentNbRecommendQueries&&this.emit("recommendQueueEmpty"))},v.prototype.containsRefinement=function(e,t,n,r){return e||0!==t.length||0!==n.length||0!==r.length},v.prototype._hasDisjunctiveRefinements=function(e){return this.state.disjunctiveRefinements[e]&&this.state.disjunctiveRefinements[e].length>0},v.prototype._change=function(e){var t=e.state,n=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:n}))},v.prototype._recommendChange=function(e){var t=e.state;t!==this.recommendState&&(this.recommendState=t,this.emit("recommend:change",{search:{results:this.lastResults,state:this.state},recommend:{results:this.lastRecommendResults,state:this.recommendState}}))},v.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},v.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+g+")"),this.client=e),this},v.prototype.getClient=function(){return this.client},v.prototype.derive=function(e,t){var n=new i(this,e,t);return this.derivedHelpers.push(n),n},v.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},v.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=v},78965:function(e){"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},29110:function(e){"use strict";e.exports=function(){return Array.prototype.slice.call(arguments).reduceRight(function(e,t){return Object.keys(Object(t)).forEach(function(n){void 0!==t[n]&&(void 0!==e[n]&&delete e[n],e[n]=t[n])}),e},{})}},2909:function(e){"use strict";e.exports={escapeFacetValue:function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},unescapeFacetValue:function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")}}},20849:function(e){"use strict";e.exports=function(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}},43917:function(e){"use strict";e.exports=function(e,t){if(!Array.isArray(e))return-1;for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}},38657:function(e){e.exports=function(e){return e.reduce(function(e,t){return e.concat(t)},[])}},7577:function(e,t,n){"use strict";var r=n(20849);e.exports=function(e,t){var n=(t||[]).map(function(e){return e.split(":")});return e.reduce(function(e,t){var i=t.split(":"),a=r(n,function(e){return e[0]===i[0]});return i.length>1||!a?(e[0].push(i[0]),e[1].push(i[1]),e):(e[0].push(a[0]),e[1].push(a[1]),e)},[[],[]])}},73014:function(e){"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},14843:function(e){"use strict";e.exports=function(e,t){return e.filter(function(n,r){return t.indexOf(n)>-1&&e.indexOf(n)===r})}},44728:function(e){"use strict";function t(e){return"object"==typeof e&&null!==e?r(Array.isArray(e)?[]:{},e):e}function n(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function r(e,i){if(e===i)return e;for(var a in i)if(Object.prototype.hasOwnProperty.call(i,a)&&"__proto__"!==a&&"constructor"!==a){var s=i[a],o=e[a];void 0!==o&&void 0===s||(n(o)&&n(s)?e[a]=r(o,s):e[a]=t(s))}return e}e.exports=function(e){n(e)||(e={});for(var t=1,i=arguments.length;t<i;t++){var a=arguments[t];n(a)&&r(e,a)}return e}},92183:function(e){"use strict";e.exports=function(){return Array.prototype.slice.call(arguments).reduceRight(function(e,t){return Object.keys(Object(t)).forEach(function(n){var r="number"==typeof e[n]?e[n]:0,i=t[n];void 0!==i&&i>=r&&(void 0!==e[n]&&delete e[n],e[n]=i)}),e},{})}},40317:function(e){"use strict";e.exports=function(e){return e&&Object.keys(e).length>0}},21383:function(e){"use strict";e.exports=function(e,t){if(null===e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}},38601:function(e){"use strict";function t(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=void 0!==t,a=null===t;if(!a&&e>t||r&&i||!n)return 1;if(!r&&e<t||a&&n||!i)return-1}return 0}e.exports=function(e,n,r){if(!Array.isArray(e))return[];Array.isArray(r)||(r=[]);var i=e.map(function(e,t){return{criteria:n.map(function(t){return e[t]}),index:t,value:e}});return i.sort(function(e,n){for(var i=-1;++i<e.criteria.length;){var a=t(e.criteria[i],n.criteria[i]);if(a)return i>=r.length?a:"desc"===r[i]?-a:a}return e.index-n.index}),i.map(function(e){return e.value})}},17507:function(e){"use strict";e.exports=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.")}},49228:function(e,t,n){"use strict";var r=n(44728);function i(e){return Object.keys(e).sort().reduce(function(t,n){return t[n]=e[n],t},{})}var a={_getQueries:function(e,t){var n=[];return n.push({indexName:e,params:a._getHitsSearchParams(t)}
vendor: 2,725 bytes, line 1
1),t.getRefinedDisjunctiveFacets().forEach(function(r){n.push({indexName:e,params:a._getDisjunctiveFacetSearchParams(t,r)})}),t.getRefinedHierarchicalFacets().forEach(function(r){var i=t.getHierarchicalFacetByName(r),s=t.getHierarchicalRefinement(r),o=t._getHierarchicalFacetSeparator(i);if(s.length>0&&s[0].split(o).length>1){var c=s[0].split(o).slice(0,-1).reduce(function(e,t,n){return e.concat({attribute:i.attributes[n],value:0===n?t:[e[e.length-1].value,t].join(o)})},[]);c.forEach(function(r,s){var o=a._getDisjunctiveFacetSearchParams(t,r.attribute,0===s);function u(e){return i.attributes.some(function(t){return t===e.split(":")[0]})}var l=(o.facetFilters||[]).reduce(function(e,t){if(Array.isArray(t)){var n=t.filter(function(e){return!u(e)});n.length>0&&e.push(n)}return"string"!=typeof t||u(t)||e.push(t),e},[]),d=c[s-1];s>0?o.facetFilters=l.concat(d.attribute+":"+d.value):l.length>0?o.facetFilters=l:delete o.facetFilters,n.push({indexName:e,params:o})})}}),n},_getCompositionQueries:function(e){return[{compositionID:e.index,requestBody:{params:a._getCompositionHitsSearchParams(e)}}]},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(a._getHitsHierarchicalFacetsAttributes(e)).sort(),n=a._getFacetFilters(e),s=a._getNumericFilters(e),o=a._getTagFilters(e),c={};return t.length>0&&(c.facets=t.indexOf("*")>-1?["*"]:t),o.length>0&&(c.tagFilters=o),n.length>0&&(c.facetFilters=n),s.length>0&&(c.numericFilters=s),i(r({},e.getQueryParams(),c))},_getCompositionHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets.map(function(t){return e.disjunctiveFacetsRefinements&&e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].length>0?"disjunctive("+t+")":t})).concat(a._getHitsHierarchicalFacetsAttributes(e)).sort(),n=a._getFacetFilters(e),s=a._getNumericFilters(e),o=a._getTagFilters(e),c={};t.length>0&&(c.facets=t.indexOf("*")>-1?["*"]:t),o.length>0&&(c.tagFilters=o),n.length>0&&(c.facetFilters=n),s.length>0&&(c.numericFilters=s);var u=e.getQueryParams();return delete u.highlightPreTag,delete u.highlightPostTag,delete u.index,i(r({},u,c))},_getDisjunctiveFacetSearchParams:function(e,t,n){var s=a._getFacetFilters(e,t,n),o=a._getNumericFilters(e,t),c=a._getTagFilters(e),u={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};c.length>0&&(u.tagFilters=c);var l=e.getHierarchicalFacetByName(t);return u.facets=l?a._getDisjunctiveHierarchicalFacetAttribute(e,l,n):t,o.length>0&&(u.numericFilters=o),s.length>0&&(u.facetFilters=s),i(r({},e.getQueryParams(),u))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var n=[];return Object.keys(e.numericRefinements).forEach(function(r){var i=e.numericRefinements[r]||{};
1Object.keys(i).forEach(function(e){var a=i[e]||[];t!==r&&a.forEach(function(t){if(Array.isArray(t)){var i=t.map(function(t){return r+e+t});n.push(i)}else n.push(r+e+t)})})}),n},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,n){var r=[],i=e.facetsRefinements||{};Object.keys(i).sort().forEach(function(e){(i[e]||[]).slice().sort().forEach(function(t){r.push(e+":"+t)})});var a=e.facetsExcludes||{};Object.keys(a).sort().forEach(function(e){(a[e]||[]).sort().forEach(function(t){r.push(e+":-"+t)})});var s=e.disjunctiveFacetsRefinements||{};Object.keys(s).sort().forEach(function(e){var n=s[e]||[];if(e!==t&&n&&0!==n.length){var i=[];n.slice().sort().forEach(function(t){i.push(e+":"+t)}),r.push(i)}});var o=e.hierarchicalFacetsRefinements||{};return Object.keys(o).sort().forEach(function(i){var a=(o[i]||[])[0];if(void 0!==a){var s,c,u=e.getHierarchicalFacetByName(i),l=e._getHierarchicalFacetSeparator(u),d=e._getHierarchicalRootPath(u);if(t===i){if(-1===a.indexOf(l)||!d&&!0===n||d&&d.split(l).length===a.split(l).length)return;d?(c=d.split(l).length-1,a=d):(c=a.split(l).length-2,a=a.slice(0,a.lastIndexOf(l))),s=u.attributes[c]}else c=a.split(l).length-1,s=u.attributes[c];s&&r.push([s+":"+a])}}),r},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce(function(t,n){var r=e.getHierarchicalRefinement(n.name)[0];if(!r)return t.push(n.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(n),a=r.split(i).length,s=n.attributes.slice(0,a+1);return t.concat(s)},[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,n){var r=e._getHierarchicalFacetSeparator(t);if(!0===n){var i=e._getHierarchicalRootPath(t),a=0;return i&&(a=i.split(r).length),[t.attributes[a]]}var s=(e.getHierarchicalRefinement(t.name)[0]||"").split(r).length-1;return t.attributes.slice(0,s+1)},getSearchForFacetQuery:function(e,t,n,s){var o=s.isDisjunctiveFacet(e)?s.clearRefinements(e):s,c={facetQuery:t,facetName:e};return"number"==typeof n&&(c.maxFacetHits=n),i(r({},a._getHitsSearchParams(o),c))}};e.exports=a},72208:function(e){"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},57749:function(e,t,n){"use strict";var r=n(20849),i=n(38657);e.exports=function(e,t){var n={};return t.forEach(function(t){t.forEach(function(t,r){e.includes(t.objectID)||(n[t.objectID]?n[t.objectID]={indexSum:n[t.objectID].indexSum+r,count:n[t.objectID].count+1}:n[t.objectID]={indexSum:r,count:1})})}),function(e,t){var n=[];return Object.keys(e).forEach(function(r){e[r].count<2&&(e[r].indexSum+=100),n.push({objectID:r,avgOfIndices:e[r].indexSum/t})}),n.sort(function(e,t){return e.avgOfIndices>t.avgOfIndices?1:-1})}(n,t.length).reduce(function(e,n){var a=r(i(t),function(e){return e.objectID===n.objectID});return a?e.concat(a):e},[])}},16938:function(e){"use strict";e.exports="3.29.3"},86862:function(){},74765:function(e){"use strict";var t=String.prototype.replace,n=/%20/g,r="RFC1738",i="RFC3986";e.exports={default:i,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:r,RFC3986:i}},55373:function(e,t,n){"use strict";var r=n(98636),i=n(62642),a=n(74765);e.exports={formats:a,parse:i,stringify:r}},62642:function(e,t,n){"use strict";var r=n(37720),i=Object.prototype.hasOwnProperty,a=Array.isArray,s={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:r.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},c=function(e,t,n){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1){if(t.throwOnLimitExceeded)for(var r=0,i=e.indexOf(",");i>-1;){if((r+=1)>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");i=e.indexOf(",",i+1)}return e.split(",")}if(t.throwOnLimitExceeded&&n>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},u=function(e,t,n,a){if(e){var s=function(e,t){var n=t.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(t.depth<=0){if(!t.plainObjects&&i.call(Object.prototype,n)&&!t.allowPrototypes)return;return[n]}
vendor: 15,048 bytes, line 1
1var r=[],a=n.indexOf("["),s=a>=0?n.slice(0,a):n;if(s){if(!t.plainObjects&&i.call(Object.prototype,s)&&!t.allowPrototypes)return;r[r.length]=s}for(var o=n.length,c=a,u=0;c>=0&&u<t.depth;){for(var l=1,d=c+1,h=-1;d<o&&h<0;){var f=n.charCodeAt(d);91===f?l+=1:93===f&&0==(l-=1)&&(h=d),d+=1}if(h<0)return r[r.length]="["+n.slice(c)+"]",r;var m=n.slice(c,h+1),p=m.slice(1,-1);if(!t.plainObjects&&i.call(Object.prototype,p)&&!t.allowPrototypes)return;r[r.length]=m,u+=1,c=n.indexOf("[",h+1)}if(c>=0){if(!0===t.strictDepth)throw new RangeError("Input depth exceeded depth option of "+t.depth+" and strictDepth is true");r[r.length]="["+n.slice(c)+"]"}return r}(e,n);if(s)return function(e,t,n,i){var a=0;if(e.length>0&&"[]"===e[e.length-1]){var s=e.slice(0,-1).join("");a=Array.isArray(t)&&t[s]?t[s].length:0}for(var o=i?t:c(t,n,a),u=e.length-1;u>=0;--u){var l,d=e[u];if("[]"===d&&n.parseArrays)l=r.isOverflow(o)?o:n.allowEmptyArrays&&(""===o||n.strictNullHandling&&null===o)?[]:r.combine([],o,n.arrayLimit,n.plainObjects,n.throwOnLimitExceeded);else{l=n.plainObjects?{__proto__:null}:{};var h="["===d.charAt(0)&&"]"===d.charAt(d.length-1)?d.slice(1,-1):d,f=n.decodeDotInKeys?h.replace(/%2E/g,"."):h,m=parseInt(f,10),p=!isNaN(m)&&d!==f&&String(m)===f&&m>=0&&n.parseArrays;if(n.parseArrays||""!==f)if(p&&m<n.arrayLimit)(l=[])[m]=o;else{if(p&&n.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+n.arrayLimit+" element"+(1===n.arrayLimit?"":"s")+" allowed in an array.");p?(l[m]=o,r.markOverflow(l,m)):"__proto__"!==f&&(l[f]=o)}else l={0:o}}o=l}return o}(s,t,n,a)}};e.exports=function(e,t){var n=function(e){if(!e)return s;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");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");if(void 0!==e.throwOnLimitExceeded&&"boolean"!=typeof e.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var t=void 0===e.charset?s.charset:e.charset,n=void 0===e.duplicates?s.duplicates:e.duplicates;if("combine"!==n&&"first"!==n&&"last"!==n)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||s.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:s.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:s.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:s.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:s.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:s.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:s.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:s.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:s.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:s.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:s.depth,duplicates:n,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:s.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:s.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:s.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:s.strictDepth,strictMerge:"boolean"==typeof e.strictMerge?!!e.strictMerge:s.strictMerge,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:s.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof e.throwOnLimitExceeded&&e.throwOnLimitExceeded}}(t);if(""===e||null==e)return n.plainObjects?{__proto__:null}:{};for(var l="string"==typeof e?function(e,t){var n={__proto__:null},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;u=u.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var l=t.parameterLimit===1/0?void 0:t.parameterLimit,d=u.split(t.delimiter,t.throwOnLimitExceeded&&void 0!==l?l+1:l);if(t.throwOnLimitExceeded&&void 0!==l&&d.length>l)throw new RangeError("Parameter limit exceeded. Only "+l+" parameter"+(1===l?"":"s")+" allowed.");var h,f=-1,m=t.charset;if(t.charsetSentinel)for(h=0;h<d.length;++h)0===d[h].indexOf("utf8=")&&("utf8=%E2%9C%93"===d[h]?m="utf-8":"utf8=%26%2310003%3B"===d[h]&&(m="iso-8859-1"),f=h,h=d.length);for(h=0;h<d.length;++h)if(h!==f){var p,g,v=d[h],y=v.indexOf("]="),_=-1===y?v.indexOf("="):y+1;if(-1===_?(p=t.decoder(v,s.decoder,m,"key"),g=t.strictNullHandling?null:""):null!==(p=t.decoder(v.slice(0,_),s.decoder,m,"key"))&&(g=r.maybeMap(c(v.slice(_+1),t,a(n[p])?n[p].length:0),function(e){return t.decoder(e,s.decoder,m,"value")})),g&&t.interpretNumericEntities&&"iso-8859-1"===m&&(g=o(String(g))),v.indexOf("[]=")>-1&&(g=a(g)?[g]:g),t.comma&&a(g)&&g.length>t.arrayLimit&&(g=r.combine([],g,t.arrayLimit,t.plainObjects,t.throwOnLimitExceeded)),null!==p){var S=i.call(n,p);S&&("combine"===t.duplicates||v.indexOf("[]=")>-1)?n[p]=r.combine(n[p],g,t.arrayLimit,t.plainObjects,t.throwOnLimitExceeded):S&&"last"!==t.duplicates||(n[p]=g)}}return n}(e,n):e,d=n.plainObjects?{__proto__:null}:{},h=Object.keys(l),f=0;f<h.length;++f){var m=h[f],p=u(m,l[m],n,"string"==typeof e);d=r.merge(d,p,n)}return!0===n.allowSparse?d:r.compact(d)}},98636:function(e,t,n){"use strict";var r=n(920),i=n(37720),a=n(74765),s=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},c=Array.isArray,u=Array.prototype.push,l=function(e,t){u.apply(e,c(t)?t:[t])},d=Date.prototype.toISOString,h=a.default,f={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",depth:1/0,encode:!0,encodeDotInKeys:!1,encoder:i.encode,encodeValuesOnly:!1,filter:void 0,format:h,formatter:a.formatters[h],indices:!1,serializeDate:function(e){return d.call(e)},skipNulls:!1,strictNullHandling:!1},m={},p=function e(t,n,a,s,o,u,d,h,p,g,v,y,_,S,R,w,b,x,P,I){var F=t;if(I>P)throw new RangeError("Input depth exceeded depth option of "+P);for(var E,T=x,A=0,j=!1;void 0!==(T=T.get(m))&&!j;){var C=T.get(t);if(A+=1,void 0!==C){if(C===A)throw new RangeError("Cyclic object value");j=!0}void 0===T.get(m)&&(A=0)}if((F="function"==typeof g?g(n,F):F)instanceof Date?F=_(F):"comma"===a&&c(F)&&(F=i.maybeMap(F,function(e){return e instanceof Date?_(e):e})),null===F){if(u)return R(p&&!w?p(n,f.encoder,b,"key",S):n);F=""}if("string"==typeof(E=F)||"number"==typeof E||"boolean"==typeof E||"symbol"==typeof E||"bigint"==typeof E||i.isBuffer(F))return p?[R(w?n:p(n,f.encoder,b,"key",S))+"="+R(p(F,f.encoder,b,"value",S))]:[R(n)+"="+R(String(F))];var O,N=[];if(void 0===F)return N;if("comma"===a&&c(F))w&&p&&(F=i.maybeMap(F,function(e){return null==e?e:p(e)})),O=[{value:F.length>0?F.join(",")||null:void 0}];else if(c(g))O=g;else{var H=Object.keys(F);O=v?H.sort(v):H}var k=h?String(n).replace(/\./g,"%2E"):String(n),W=s&&c(F)&&1===F.length?k+"[]":k;if(o&&c(F)&&0===F.length&&0===Object.keys(F).length)return W+"[]";for(var D=0;D<O.length;++D){var L=O[D],U="object"==typeof L&&L&&void 0!==L.value?L.value:F[L];if(!d||null!==U){var q=y&&h?String(L).replace(/\./g,"%2E"):String(L),Q=c(F)?"function"==typeof a?a(W,q):W:W+(y?"."+q:"["+q+"]");x.set(t,A);var $=r();$.set(m,x),l(N,e(U,Q,a,s,o,u,d,h,"comma"===a&&w&&c(F)?null:p,g,v,y,_,S,R,w,b,$,P,I+1))}}return N};e.exports=function(e,t){var n,i=e,u=function(e){if(!e)return f;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");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||f.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 n=a.default;if(void 0!==e.format){if(!s.call(a.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r,i=a.formatters[n],u=f.filter;if(("function"==typeof e.filter||c(e.filter))&&(u=e.filter),r=e.arrayFormat in o?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":f.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var l=void 0===e.allowDots?!0===e.encodeDotInKeys||f.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:f.addQueryPrefix,allowDots:l,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:f.allowEmptyArrays,arrayFormat:r,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:f.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?f.delimiter:e.delimiter,depth:"number"==typeof e.depth?e.depth:f.depth,encode:"boolean"==typeof e.encode?e.encode:f.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:f.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:f.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:f.encodeValuesOnly,filter:u,format:n,formatter:i,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:f.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:f.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:f.strictNullHandling}}(t);"function"==typeof u.filter?i=(0,u.filter)("",i):c(u.filter)&&(n=u.filter);var d=[];if("object"!=typeof i||null===i)return"";var h=o[u.arrayFormat],m="comma"===h&&u.commaRoundTrip;n||(n=Object.keys(i)),u.sort&&n.sort(u.sort);for(var g=r(),v=0;v<n.length;++v){var y=n[v];if(null!=y){var _=i[y];if(!u.skipNulls||null!==_){var S=u.encodeDotInKeys?String(y).replace(/\./g,"%2E"):String(y);l(d,p(_,S,h,m,u.allowEmptyArrays,u.strictNullHandling,u.skipNulls,u.encodeDotInKeys,u.encode?u.encoder:null,u.filter,u.sort,u.allowDots,u.serializeDate,u.format,u.formatter,u.encodeValuesOnly,u.charset,g,u.depth,0))}}}var R=d.join(u.delimiter),w=!0===u.addQueryPrefix?"?":"";return u.charsetSentinel&&("iso-8859-1"===u.charset?w+="utf8=%26%2310003%3B"+u.delimiter:w+="utf8=%E2%9C%93"+u.delimiter),R.length>0?w+R:""}},37720:function(e,t,n){"use strict";var r=n(74765),i=n(920),a=n(30655),s=Object.prototype.hasOwnProperty,o=Array.isArray,c=i(),u=function(e,t){return c.set(e,t),e},l=function(e){return c.has(e)},d=function(e){return c.get(e)},h=function(e,t){c.set(e,t)},f=function(){for(var e=[],t=0;t<256;++t)e[e.length]="%"+((t<16?"0":"")+t.toString(16)).toUpperCase();return e}(),m=function(e,t){for(var n=t&&t.plainObjects?{__proto__:null}:{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n},p=function(e,t,n){"__proto__"===t&&a?a(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},g=1024;e.exports={arrayToObject:m,assign:function(e,t){return Object.keys(t).reduce(function(e,n){return p(e,n,t[n]),e},e)},combine:function(e,t,n,r,i){if(l(e)){if(i)throw new RangeError("Array limit exceeded. Only "+n+" element"+(1===n?"":"s")+" allowed in an array.");for(var a=o(t)?t:[t],s=d(e),c=0;c<a.length;++c)e[s+=1]=a[c];return h(e,s),e}var f=[].concat(e,t);if(f.length>n){if(i)throw new RangeError("Array limit exceeded. Only "+n+" element"+(1===n?"":"s")+" allowed in an array.");return u(m(f,{plainObjects:r}),f.length-1)}return f},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=i(),r=0;r<t.length;++r)for(var a=t[r],s=a.obj[a.prop],c=Object.keys(s),u=0;u<c.length;++u){var l=c[u],d=s[l];"object"!=typeof d||null===d||n.has(d)||(t[t.length]={obj:s,prop:l},n.set(d,!0))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(o(n)){for(var r=[],i=0;i<n.length;++i)void 0!==n[i]&&(r[r.length]=n[i]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,n,i,a){if(0===e.length)return e;var s=e;if("symbol"==typeof e?s=Symbol.prototype.toString.call(e):"string"!=typeof e&&(s=String(e)),"iso-8859-1"===n)return escape(s).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var o="",c=0;c<s.length;c+=g){var u=s.length>=g?s.slice(c,c+g):s;if(c+g<s.length){var l=u.charCodeAt(u.length-1);l>=55296&&l<=56319&&(u=u.slice(0,-1),c-=1)}for(var d=[],h=0;h<u.length;++h){var m=u.charCodeAt(h);45===m||46===m||95===m||126===m||m>=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||a===r.RFC1738&&(40===m||41===m)?d[d.length]=u.charAt(h):m<128?d[d.length]=f[m]:m<2048?d[d.length]=f[192|m>>6]+f[128|63&m]:m<55296||m>=57344?d[d.length]=f[224|m>>12]+f[128|m>>6&63]+f[128|63&m]:(h+=1,m=65536+((1023&m)<<10|1023&u.charCodeAt(h)),d[d.length]=f[240|m>>18]+f[128|m>>12&63]+f[128|m>>6&63]+f[128|63&m])}o+=d.join("")}return o},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!(!e.constructor||"function"!=typeof e.constructor.isBuffer||!e.constructor.isBuffer(e))},isOverflow:l,isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},markOverflow:u,maybeMap:function(e,t){if(o(e)){for(var n=[],r=0;r<e.length;r+=1)n[n.length]=t(e[r]);return n}return t(e)},merge:function e(t,n,r){if(!n)return t;if("object"!=typeof n&&"function"!=typeof n){if(o(t)){var i=t.length;if(r&&"number"==typeof r.arrayLimit&&i>=r.arrayLimit){if(r.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+r.arrayLimit+" element"+(1===r.arrayLimit?"":"s")+" allowed in an array.");return u(m(t.concat(n),r),i)}t[i]=n}else{if(!t||"object"!=typeof t)return[t,n];if(l(t)){var a=d(t)+1;t[a]=n,h(t,a)}else{if(r&&r.strictMerge)return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!s.call(Object.prototype,n))&&(t[n]=!0)}}return t}if(!t||"object"!=typeof t){if(l(n)){for(var c=Object.keys(n),f=r&&r.plainObjects?{__proto__:null,0:t}:{0:t},g=0;g<c.length;g++){f[parseInt(c[g],10)+1]=n[c[g]]}return u(f,d(n)+1)}var v=[t].concat(n);if(r&&"number"==typeof r.arrayLimit&&v.length>r.arrayLimit){if(r.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+r.arrayLimit+" element"+(1===r.arrayLimit?"":"s")+" allowed in an array.");return u(m(v,r),v.length-1)}return v}var y=t;if(o(t)&&!o(n)&&(y=m(t,r)),o(t)&&o(n)){if(n.forEach(function(n,i){if
1(s.call(t,i)){var a=t[i];a&&"object"==typeof a&&n&&"object"==typeof n?t[i]=e(a,n,r):t[t.length]=n}else t[i]=n}),r&&"number"==typeof r.arrayLimit&&t.length>r.arrayLimit){if(r.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+r.arrayLimit+" element"+(1===r.arrayLimit?"":"s")+" allowed in an array.");return u(m(t,r),t.length-1)}return t}return Object.keys(n).reduce(function(t,i){var a=n[i];if(s.call(t,i)?p(t,i,e(t[i],a,r)):p(t,i,a),l(n)&&!l(t)&&u(t,d(n)),l(t)){var o=parseInt(i,10);String(o)===i&&o>=0&&o>d(t)&&h(t,o)}return t},y)}}},79587:function(e,t,n){"use strict";n.d(t,{p:function(){return s}});var r=n(24267),i=n(5375),a="5.57.0";function s(e,t,n){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!t||"string"!=typeof t)throw new Error("`apiKey` is missing.");const{compression:s,...o}=n||{};return function({appId:e,apiKey:t,authMode:n,algoliaAgents:i,...s}){const o=(0,r.PA)(e,t,n),c=(0,r.zf)({hosts:(u=e,[{url:`${u}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${u}.algolia.net`,accept:"write",protocol:"https"}].concat((0,r.k4)([{url:`${u}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${u}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${u}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))),...s,algoliaAgent:(0,r.F1)({algoliaAgents:i,client:"Lite",version:a}),baseHeaders:{"content-type":"text/plain",...o.headers(),...s.baseHeaders},baseQueryParameters:{...o.queryParameters(),...s.baseQueryParameters}});var u;return{transporter:c,appId:e,apiKey:t,clearCache(){return Promise.all([c.requestsCache.clear(),c.responsesCache.clear()]).then(()=>{})},get _ua(){return c.algoliaAgent.value},addAlgoliaAgent(e,t){c.algoliaAgent.add({segment:e,version:t})},setClientApiKey({apiKey:e}){n&&"WithinHeaders"!==n?c.baseQueryParameters["x-algolia-api-key"]=e:c.baseHeaders["x-algolia-api-key"]=e},searchForHits(e,t){return this.search(e,t)},searchForFacets(e,t){return this.search(e,t)},customPost({path:e,parameters:t,body:n},i){(0,r.Kf)("path","customPost",e);const a={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:n||{}};return c.request(a,i)},customPostWithHTTPInfo({path:e,parameters:t,body:n},i){(0,r.Kf)("path","customPostWithHTTPInfo",e);const a={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:n||{}};return c.requestWithHttpInfo(a,i)},getRecommendations(e,t){e&&Array.isArray(e)&&(e={requests:e}),(0,r.Kf)("getRecommendationsParams","getRecommendations",e),(0,r.Kf)("getRecommendationsParams.requests","getRecommendations",e.requests);const n={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return c.request(n,t)},getRecommendationsWithHTTPInfo(e,t){e&&Array.isArray(e)&&(e={requests:e}),(0,r.Kf)("getRecommendationsParams","getRecommendationsWithHTTPInfo",e),(0,r.Kf)("getRecommendationsParams.requests","getRecommendationsWithHTTPInfo",e.requests);const n={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return c.requestWithHttpInfo(n,t)},search(e,t){if(e&&Array.isArray(e)){const t={requests:e.map(({params:e,...t})=>"facet"===t.type?{...t,...e,type:"facet"}:{...t,...e,facet:void 0,maxFacetHits:void 0,facetQuery:void 0})};e=t}(0,r.Kf)("searchMethodParams","search",e),(0,r.Kf)("searchMethodParams.requests","search",e.requests);const n={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return c.request(n,t)},searchWithHTTPInfo(e,t){if(e&&Array.isArray(e)){const t={requests:e.map(({params:e,...t})=>"facet"===t.type?{...t,...e,type:"facet"}:{...t,...e,facet:void 0,maxFacetHits:void 0,facetQuery:void 0})};e=t}(0,r.Kf)("searchMethodParams","searchWithHTTPInfo",e),(0,r.Kf)("searchMethodParams.requests","searchWithHTTPInfo",e.requests);const n={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return c.requestWithHttpInfo(n,t)}}}({appId:e,apiKey:t,timeouts:{connect:1e3,read:2e3,write:3e4},logger:(0,r.oh)(),requester:(0,i.D)(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",requestIdChannel:"queryParameters",responsesCache:(0,r.of)(),requestsCache:(0,r.of)({serializable:!1}),hostsCache:(0,r.v2)({caches:[(0,r.jY)({key:`${a}-${e}`}),(0,r.of)()]}),...o})}},39445:function(e,t,n){"use strict";n.d(t,{A:function(){return m}});var r=n(71893),i=n(55456),a=n(74243),s=n(40069),o=n(89098);function c(e,t){var n=null;return function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return new Promise(function(r,a){n&&clearTimeout(n),n=setTimeout(function(){n=null,Promise.resolve(e.apply(void 0,(0,o._)(i))).then(r).catch(a)},t)})}}var u=n(92783),l=n(56845),d=n(84582);var h=n(60513);var f=(0,a.V)({name:"answers",connector:!0}),m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:h.l;return(0,s.t)(e,f()),function(n){var a=n||{},s=a.queryLanguages,o=a.attributesForPrediction,h=a.nbHits,m=void 0===h?1:h,p=a.renderDebounceTime,g=void 0===p?100:p,v=a.searchDebounceTime,y=void 0===v?100:v,_=a.escapeHTML,S=void 0===_||_,R=a.extraParameters,w=void 0===R?{}:R;if(!s||0===s.length)throw new Error(f("The `queryLanguages` expects an array of str
1ings."));var b,x,P,I,F=(b=-1,x=-1,P=void 0,function(e){var t=++b;return Promise.resolve(e).then(function(e){return P&&t<x?P:(x=t,P=e,e)})}),E=[],T=!1,A=c(e,g);return{$$type:"ais.answers",init:function(t){var n=t.state,a=t.instantSearchInstance;if("function"!=typeof a.client.initIndex)throw new Error(f("`algoliasearch` <5 required."));var s=a.client.initIndex(n.index);if(!function(e){return"function"==typeof e.findAnswers}(s))throw new Error(f("`algoliasearch` >= 4.8.0 required."));I=c(s.findAnswers,y),e((0,i._)((0,r._)({},this.getWidgetRenderState(t)),{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){var n=this,a=t.state.query;if(!a)return E=[],T=!1,void e((0,i._)((0,r._)({},this.getWidgetRenderState(t)),{instantSearchInstance:t.instantSearchInstance}),!1);E=[],T=!0,e((0,i._)((0,r._)({},this.getWidgetRenderState(t)),{instantSearchInstance:t.instantSearchInstance}),!1),F(I(a,s,(0,i._)((0,r._)({},w),{nbHits:m,attributesForPrediction:o}))).then(function(e){if(e){S&&e.hits.length>0&&(e.hits=(0,u.S8)(e.hits));var a=(0,l.g)(e.hits,0,m),s=(0,d.P)(a,e.queryID);E=s,T=!1,A((0,i._)((0,r._)({},n.getWidgetRenderState(t)),{instantSearchInstance:t.instantSearchInstance}),!1)}})},getRenderState:function(e,t){return(0,i._)((0,r._)({},e),{answers:this.getWidgetRenderState(t)})},getWidgetRenderState:function(){return{hits:E,isLoading:T,widgetParams:n}},dispose:function(e){var n=e.state;return t(),n},getWidgetSearchParameters:function(e){return e}}}}},41379:function(e,t,n){"use strict";n.d(t,{A:function(){return m}});var r=n(50467),i=n(71893),a=n(55456),s=n(1230),o=n(92783),c=n(74243),u=n(40069),l=n(84582),d=n(56845),h=n(60513),f=(0,c.V)({name:"autocomplete",connector:!0}),m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:h.l;return(0,u.t)(e,f()),function(n){var c=n||{},u=c.escapeHTML,h=void 0===u||u,f=c.transformItems,m=void 0===f?function(e){return e}:f,p=c.requiresSearch,g=void 0===p||p,v=c.future,y=(void 0===v?{}:v).undefinedEmptyQuery,_=void 0!==y&&y,S={};return{$$type:"ais.autocomplete",dependsOn:g?"search":"none",shouldRender:g?void 0:function(){return!0},init:function(t){var n=t.instantSearchInstance;e((0,a._)((0,i._)({},this.getWidgetRenderState(t)),{instantSearchInstance:n}),!0)},render:function(t){var n=t.instantSearchInstance,r=this.getWidgetRenderState(t);r.indices.forEach(function(e){(0,e.sendEvent)("view:internal",e.hits)}),e((0,a._)((0,i._)({},r),{instantSearchInstance:n}),!1)},getRenderState:function(e,t){return(0,a._)((0,i._)({},e),{autocomplete:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=this,r=e.helper,c=e.state,u=e.scopedResults,f=e.instantSearchInstance;S.refine||(S.refine=function(e){r.setQuery(e).search()});var p={},g=u.map(function(e){var n;e.results&&(e.results.hits=h?(0,o.S8)(e.results.hits):e.results.hits),p[e.indexId]=(0,s.U0)({instantSearchInstance:f,helper:e.helper,widgetType:t.$$type});var r=e.results?(0,l.P)((0,d.g)(e.results.hits,e.results.page,e.results.hitsPerPage),e.results.queryID):[];return{indexId:e.indexId,indexName:(null===(n=e.results)||void 0===n?void 0:n.index)||"",hits:r,results:e.results||{}}});return{currentRefinement:_?c.query:c.query||"",indices:m(g).map(function(e){return(0,a._)((0,i._)({},e),{sendEvent:p[e.indexId]})}),refine:S.refine,widgetParams:n}},getWidgetUiState:function(e,t){var n=t.searchParameters,r=_?n.query:n.query||"";return!r||""===r||e&&e.query===r?e:(0,a._)((0,i._)({},e),{query:r})},getWidgetSearchParameters:function(e,t){var n=t.uiState,r={query:_?n.query:n.query||""};return h?e.setQueryParameters((0,i._)({},r,o.FU)):e.setQueryParameters(r)},dispose:function(e){var n=e.state;t();var s=n.setQueryParameter("query",void 0);return h?s.setQueryParameters(Object.keys(o.FU).reduce(function(e,t){return(0,a._)((0,i._)({},e),(0,r._)({},t,void 0))},{})):s}}}}},32527:function(e,t,n){"use strict";n(50467),n(71893),n(55456),n(65631);var r=n(74243);n(40069),n(60513),(0,r.V)({name:"breadcrumb",connector:!0})},41578:function(e,t,n){"use strict";n(50467),n(53750),n(71893),n(55456),n(38001),n(65631),n(89098),n(61642),n(23029),n(49550),n(75373);n(58061),n(56199),n(52938),n(7192),n(30494),n(99407),n(20884),n(10021
1),n(38452);n(32405),n(77306);n(87520),n(94176),n(98539);var r=n(74243);n(40069),n(1230),n(60513),(0,r.V)({name:"chat",connector:!0})},41267:function(e,t,n){"use strict";n(71893),n(55456),n(57798);var r=n(74243);n(40069),n(60513),(0,r.V)({name:"chatTrigger",connector:!0})},90830:function(e,t,n){"use strict";n.d(t,{A:function(){return m}});var r=n(71893),i=n(55456),a=n(89098),s=n(52958),o=n(74243),c=n(40069),u=n(94176),l=n(98539),d=n(60513),h=n(87520),f=(0,o.V)({name:"clear-refinements",connector:!0}),m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.l;return(0,c.t)(e,f()),function(n){var o=n||{},c=o.includedAttributes,m=void 0===c?[]:c,p=o.excludedAttributes,g=void 0===p?["query"]:p,v=o.transformItems,y=void 0===v?function(e){return e}:v;if(n&&n.includedAttributes&&n.excludedAttributes)throw new Error(f("The options `includedAttributes` and `excludedAttributes` cannot be used together."));var _={refine:d.l,createURL:function(){return""},attributesToClear:[]},S=function(){return _.refine()},R=function(){return _.createURL()};return{$$type:"ais.clearRefinements",init:function(t){var n=t.instantSearchInstance;e((0,i._)((0,r._)({},this.getWidgetRenderState(t)),{instantSearchInstance:n}),!0)},render:function(t){var n=t.instantSearchInstance;e((0,i._)((0,r._)({},this.getWidgetRenderState(t)),{instantSearchInstance:n}),!1)},dispose:function(){t()},getRenderState:function(e,t){return(0,i._)((0,r._)({},e),{clearRefinements:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.createURL,r=e.scopedResults,i=e.results;_.attributesToClear=r.reduce(function(e,t){return e.concat(function(e){var t=e.scopedResult,n=e.includedAttributes,r=e.excludedAttributes,i=e.transformItems,a=e.results,s=-1!==n.indexOf("query")||-1===r.indexOf("query");return{helper:t.helper,items:i((0,u.s)((0,l.t)(t.results,t.helper.state,s).map(function(e){return e.attribute}).filter(function(e){return 0===n.length||-1!==n.indexOf(e)}).filter(function(e){return"query"===e&&s||-1===r.indexOf(e)})),{results:a})}}({scopedResult:t,includedAttributes:m,excludedAttributes:g,transformItems:y,results:i}))},[]),_.refine=function(){_.attributesToClear.forEach(function(e){var t=e.helper,n=e.items;t.setState((0,h.A)({helper:t,attributesToClear:n})).search()})},_.createURL=function(){return t(s.p.apply(void 0,(0,a._)(_.attributesToClear.map(function(e){var t=e.helper,n=e.items;return(0,h.A)({helper:t,attributesToClear:n})}))))};var o=_.attributesToClear.some(function(e){return e.items.length>0});return{canRefine:o,hasRefinements:o,refine:S,createURL:R,widgetParams:n}}}}}},73841:function(e,t,n){"use strict";n.d(t,{A:function(){return h}});var r=n(71893),i=n(55456),a=n(89098),s=n(74103),o=n(47121),c=n(74243),u=n(65150),l=(0,c.V)({name:"configure-related-items",connector:!0});function d(e){var t=e.attributeName,n=e.attributeValue,r=e.attributeScore;return"".concat(t,":").concat(n,"<score=").concat(r||1,">")}var h=function(e,t){return function(n){var c=n||{},h=c.hit,f=c.matchingPatterns,m=c.transformSearchParameters,p=void 0===m?function(e){return e}:m;if(!h)throw new Error(l("The `hit` option is required."));if(!f)throw new Error(l("The `matchingPatterns` option is required."));var g=Object.keys(f).reduce(function(e,t){var n=f[t],r=(0,u.E)(h,t),i=n.score;return Array.isArray(r)?(0,a._)(e).concat([r.map(function(e){return d({attributeName:t,attributeValue:e,attributeScore:i})})]):"string"==typeof r?(0,a._)(e).concat([d({attributeName:t,attributeValue:r,attributeScore:i})]):e},[]),v=(0,r._)({},p(new s.SearchParameters({sumOrFiltersScores:!0,facetFilters:["objectID:-".concat(h.objectID)],optionalFilters:g}))),y=(0,o.A)(e,t);return(0,i._)((0,r._)({},y({searchParameters:v})),{$$type:"ais.configureRelatedItems"})}}},47121:function(e,t,n){"use strict";n.d(t,{A:function(){return f}});var r=n(50467),i=n(71893),a=n(55456),s=n(74103),o=n(31810),c=n(74243),u=n(52958),l=n(60513),d=(0,c.V)({name:"configure",connector:!0});function h(e,t){return e.setQueryParameters(Object.keys(t.searchParameters).reduce(function(e,t){return(0,a._)((0,i._)({},e),(0,r._)({},t,void 0))},{}))}var f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.l,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.l;return function(n){if(!n||!(0,o.Q)(n.searchParameters))throw new Error(d("The `searchParameters` option expects an object."));var r={};return{$$type:"ais.configure",init:function(t){var n=t.instantSearchInstance;e((0,a._)((0,i._)({},this.getWidgetRenderState(t)),{instantSearchInstance:n}),!0)},render:function(t){var n=t.instantSearchInstance;e((0,a._)((0,i._)({},this.getWidgetRenderState(t)),{instantSearchInstance:n}),!1)},dispose:function(e){var r=e.state;return t(),h(r,n)},getRenderState:function(e,t){var n,r=this.getWidgetRenderState(t);return(0,a._)((0,i._)({},e),{configure:(0,a._)((0,i._)({},r),{widgetParams:(0,a._)((0,i._)({},r.widgetParams),{searchParameters:(0,u.p)(new s.SearchParameters(null===(n=e.configure)||void 0===n?void 0:n.widgetParams.searchParameters),new s.SearchParameters(r.widgetParams.searchParameters)).getQueryParams()})})})},getWidgetRenderState:function(e){var t=e.helper;return r.refine||(r.refine=function(e){return function(t){var r=h(e.state,n),i=(0,u.p)(r,new s.SearchParameters(t));n.searchParameters=t,e.setState(i).search()}}(t)),{refine:r.refine,widgetParams:n}},getWidgetSearchParameters:function(e,t){var r=t.uiState;return(0,u.p)(e,new s.SearchParameters((0,i._)({},r.configure,n.searchParameters)))},getWidgetUiState:function(e){return(0,a._)((0,i._)({},e),{configure:(0,i._)({},e.configure,n.searchParameters)})}}}}},81854:function(e,t,n){"use strict";n.d(t,{A:function(){return d}});var r=n(71893),i=n(55456),a=n(89098),s=n(74243),o=n(40069),c=n(60513),u=n(98539),l=(0,s.V)({name:"current-refinements",connector:!0}),d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.l;return(0,o.t)(e,l()),function(n){if((n||{}).includedAttributes&&(n||{}).excludedAttributes)throw new Error(l("The options `includedAttributes` and `excludedAttributes` cannot be used together."));var a=n||{},s=a.includedAttributes,o=a.excludedAttributes,c=void 0===o?["query"]:o,u=a.transformItems,d=void 0===u?function(e){return e}:u;return{$$type:"ais.currentRefinements",init:function(t){var n=t.instantSearchInstance;e((0,i._)((0,r._)({},this.getWidgetRenderState(t)),{instantSearchInstance:n}),!0)},render:function(t){var n=t.instantSearchInstance;e((0,i._)((0,r._)({},this.getWidgetRenderState(t)),{instantSearchInstance:n}),!1)},dispose:function(){t()},getRenderState:function(e,t){return(0,i._)((0,r._)({},e),{currentRefinements:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,r=e.scopedResults,i=e.createURL,a=e.helper;var o=t?r.reduce(function(e,n){return e.concat(d(h({results:n.results,helper:n.helper,indexId:n.indexId,includedAttributes:s,excludedAttributes:c}),{results:t}))}
vendor: 4,657 bytes, line 1
1,[]):d(h({results:null,helper:a,indexId:a.state.index,includedAttributes:s,excludedAttributes:c}),{results:t});return{items:o,canRefine:o.length>0,refine:function(e){return m(a,e)},createURL:function(e){return i(f(a.state,e))},widgetParams:n}}}}};function h(e){var t=e.results,n=e.helper,r=e.indexId,i=e.includedAttributes,s=e.excludedAttributes,o=-1!==(i||[]).indexOf("query")||-1===(s||[]).indexOf("query"),c=i?function(e){return-1!==i.indexOf(e.attribute)}:function(e){return-1===s.indexOf(e.attribute)},l=(0,u.t)(t,n.state,o).map(p).filter(c);return l.reduce(function(e,t){return(0,a._)(e.filter(function(e){return e.attribute!==t.attribute})).concat([{indexName:n.state.index,indexId:r,attribute:t.attribute,label:t.attribute,refinements:l.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 m(n,e)}}])},[])}function f(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 m(e,t){e.setState(f(e.state,t)).search()}function p(e){var t=function(e){if("numeric"===e.type)return Number(e.name);if("escapedValue"in e)return e.escapedValue;return e.name}(e),n=e.operator?"".concat(function(e){switch(e){case">=":return"â¥";case"<=":return"â¤";default:return e}}(e.operator)," ").concat(e.name):e.name,r={attribute:e.attribute,type:e.type,value:t,label:n};return void 0!==e.operator&&(r.operator=e.operator),void 0!==e.count&&(r.count=e.count),void 0!==e.exhaustive&&(r.exhaustive=e.exhaustive),r}},80510:function(e,t,n){"use strict";n.d(t,{A:function(){return d}});var r=n(71893),i=n(55456),a=n(61642),s=n(62417),o=n(74243),c=n(40069),u=n(60513),l=(0,o.V)({name:"dynamic-widgets",connector:!0}),d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.l;return(0,c.t)(e,l()),function(n){var o=n.widgets,c=n.maxValuesPerFacet,u=void 0===c?20:c,d=n.facets,h=void 0===d?["*"]:d,f=n.transformItems,m=void 0===f?function(e){return e}:f,p=n.fallbackWidget;if(!(o&&Array.isArray(o)&&o.every(function(e){return"object"===(void 0===e?"undefined":(0,a._)(e))})))throw new Error(l("The `widgets` option expects an array of widgets."));if(!Array.isArray(h))throw new Error(l("The `facets` option only accepts an array of facets, you passed ".concat(JSON.stringify(h))));var g=new Map;return{$$type:"ais.dynamicWidgets",init:function(t){o.forEach(function(e){var n=(0,s.z)(e,t);g.set(n,{widget:e,isMounted:!1})}),e((0,i._)((0,r._)({},this.getWidgetRenderState(t)),{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){var n=t.parent,a=this.getWidgetRenderState(t),s=[],o=[];p&&a.attributesToRender.forEach(function(e){if(!g.has(e)){var t=p({attribute:e});g.set(e,{widget:t,isMounted:!1})}}),g.forEach(function(e,t){var n=e.widget,r=e.isMounted,i=a.attributesToRender.indexOf(t)>-1;!r&&i?(o.push(n),g.set(t,{widget:n,isMounted:!0})):r&&!i&&(s.push(n),g.set(t,{widget:n,isMounted:!1}))}),n.addWidgets(o),setTimeout(function(){return n.removeWidgets(s)},0),e((0,i._)((0,r._)({},a),{instantSearchInstance:t.instantSearchInstance}),!1)},dispose:function(e){var n=e.parent,r=[];g.forEach(function(e){var t=e.widget;e.isMounted&&r.push(t)}),n.removeWidgets(r),t()},getWidgetSearchParameters:function(e){return h.reduce(function(e,t){return e.addFacet(t)},e.setQueryParameters({maxValuesPerFacet:Math.max(u||0,e.maxValuesPerFacet||0)}))},getRenderState:function(e,t){return(0,i._)((0,r._)({},e),{dynamicWidgets:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t,r,i,a,s=e.results;if(e.state,!s)return{attributesToRender:[],widgetParams:n};var o=m(null!==(t=null===(a=s.renderingContent)||void 0===a||null===(i=a.facetOrdering)||void 0===i||null===(r=i.facets)||void 0===r?void 0:r.order)&&void 0!==t?t:[],{results:s});if(!Array.isArray(o))throw new Error(l("The `transformItems` option expects a function that returns an Array."));return{attributesToRender:o,widgetParams:n}}}}}},16455:function(e,t,n){"use strict";n.d(t,{A:function(){return h}});var r=n(53750),i=n(71893),a=n(55456),s=n(74103),o=n(74243),c=n(40069),u=n(60513);function l(e,t){return Object.assign(new s.SearchResults(e,[t]),{feedID:t.feedID})}
1var d=(0,o.V)({name:"feeds",connector:!0}),h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.l;return(0,c.t)(e,d()),function(n){var o=n.isolated,c=n.transformFeeds,u=void 0===c?function(e){return e}:c;if(!1!==o)throw new Error(d("The `isolated` option currently only supports `false`."));return{$$type:"ais.feeds",$$widgetType:"ais.feeds",init:function(t){var n=t.instantSearchInstance;if(!n.compositionID)throw new Error(d("The `feeds` widget requires a composition-based InstantSearch instance (compositionID must be set)."));!function(e,t){var n,r,i=null===(n=e._initialResults)||void 0===n?void 0:n[t.getIndexId()],a=(null==i?void 0:i.compositionFeedsResults)||[];if(0!==a.length){var s=null===(r=t.getHelper())||void 0===r?void 0:r.lastResults;s&&(s.feeds&&s.feeds.length>0||(s.feeds=a.map(function(e){return l(s._state,e)})))}}(n,t.parent),e((0,a._)((0,i._)({},this.getWidgetRenderState(t)),{instantSearchInstance:n}),!0)},render:function(t){var n=t.instantSearchInstance;e((0,a._)((0,i._)({},this.getWidgetRenderState(t)),{instantSearchInstance:n}),!1)},dispose:function(){t()},getWidgetSearchParameters:function(e){return e},getRenderState:function(e,t){return(0,a._)((0,i._)({},e),{feeds:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results;if(!t)return{feedIDs:[],widgetParams:n};Array.isArray(t.feeds)&&t.feeds.length>0&&!t.feeds.every(function(e){return(0,r._)(e,s.SearchResults)})&&(t.feeds=t.feeds.map(function(e){return(0,r._)(e,s.SearchResults)?e:l(t._state,e)}));var i=t.feeds?t.feeds.map(function(e){return e.feedID}):[""];if(i=u(i),!Array.isArray(i))throw new Error(d("The `transformFeeds` option expects a function that returns an Array."));if(!i.every(function(e){return"string"==typeof e}))throw new Error(d("The `transformFeeds` option expects a function that returns an array of feed IDs (strings)."));return{feedIDs:i,widgetParams:n}}}}}},84886:function(e,t,n){"use strict";n(71893),n(55456),n(65631);var r=n(74243);n(40069),n(58061),n(32405),n(60513),n(98539),(0,r.V)({name:"filter-suggestions",connector:!0})},63199:function(e,t,n){"use strict";n(71893),n(55456);var r=n(74243);n(40069),n(1230),n(92783),n(56845),n(84582),n(60513),(0,r.V)({name:"frequently-bought-together",connector:!0})},33083:function(e,t,n){"use strict";n(71893),n(55456),n(65631);var r=n(74243);n(40069),n(1230),n(60513),(0,r.V)({name:"geo-search",connector:!0})},32092:function(e,t,n){"use strict";n(50467),n(71893),n(55456),n(38001),n(65631),n(59066);var r=n(74243);n(40069),n(60513),(0,r.V)({name:"hierarchical-menu",connector:!0})},84267:function(e,t,n){"use strict";n.d(t,{A:function(){return l}});var r=n(71893),i=n(55456),a=n(89098),s=n(74243),o=n(40069),c=n(60513),u=(0,s.V)({name:"hits-per-page",connector:!0}),l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.l;return(0,o.t)(e,u()),function(n){var s=n||{},o=s.items,c=s.transformItems,l=void 0===c?function(e){return e}:c;if(!Array.isArray(o))throw new Error(u("The `items` option expects an array of objects."));var d=o,h=d.filter(function(e){return!0===e.default});if(0===h.length)throw new Error(u("A default value must be specified in `items`."));if(h.length>1)throw new Error(u("More than one default value is specified in `items`."));var f=h[0],m=function(e){var t=e.hitsPerPage;return d.map(function(e){return(0,i._)((0,r._)({},e),{isRefined:Number(e.value)===Number(t)})})},p=function(e){return function(t){return t||0===t?e.setQueryParameter("hitsPerPage",t).search():e.setQueryParameter("hitsPerPage",void 0).search()}},g=function(e){var t=e.state,n=e.createURL,r=e.getWidgetUiState,i=e.helper;return function(e){return n(function(n){return r(n,{searchParameters:t.resetPage().setQueryParameter("hitsPerPage",e||0===e?e:void 0),helper:i})})}};return{$$type:"ais.hitsPerPage",init:function(t){var n=t.state,s=t.instantSearchInstance;d.some(function(e){return Number(n.hitsPerPage)===Number(e.value)})||(d=[{value:"",label:""}].concat((0,a._)(d))),e((0,i._)((0,r._)({},this.getWidgetRenderState(t)),{instantSearchInstance:s}),!0)},render:function(t){var n=t.instantSearchInstance;e((0,i._)((0,r._)({},this.getWidgetRenderState(t)),{instantSearchInstance:n}),!1)},dispose:function(e){var n=e.state;return t(),n.setQueryParameter("hitsPerPage",void 0)},getRenderState:function(e,t){return(0,i._)((0,r._)({},e),{hitsPerPage:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.state,r=e.results,i=e.createURL,a=e.helper,s=!!r&&r.nbHits>0;return{items:l(m(t),{results:r}),refine:p(a),createURL:g({state:t,createURL:i,getWidgetUiState:this.getWidgetUiState,helper:
1a}),hasNoResults:!s,canRefine:s,widgetParams:n}},getWidgetUiState:function(e,t){var n=t.searchParameters.hitsPerPage;return void 0===n||n===f.value?e:(0,i._)((0,r._)({},e),{hitsPerPage:n})},getWidgetSearchParameters:function(e,t){var n=t.uiState;return e.setQueryParameters({hitsPerPage:n.hitsPerPage||f.value})}}}}},58467:function(e,t,n){"use strict";n.d(t,{A:function(){return m}});var r=n(50467),i=n(71893),a=n(55456),s=n(1230),o=n(74243),c=n(40069),u=n(92783),l=n(56845),d=n(84582),h=n(60513),f=(0,o.V)({name:"hits",connector:!0}),m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:h.l;return(0,c.t)(e,f()),function(n){var o,c,h=n||{},f=h.escapeHTML,m=void 0===f||f,p=h.transformItems,g=void 0===p?function(e){return e}:p;return{$$type:"ais.hits",init:function(t){e((0,a._)((0,i._)({},this.getWidgetRenderState(t)),{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){var n=this.getWidgetRenderState(t);e((0,a._)((0,i._)({},n),{instantSearchInstance:t.instantSearchInstance}),!1),n.sendEvent("view:internal",n.items)},getRenderState:function(e,t){return(0,a._)((0,i._)({},e),{hits:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t,r,i,a=e.results,h=e.helper,f=e.instantSearchInstance;if(o||(o=(0,s.U0)({instantSearchInstance:f,helper:h,widgetType:this.$$type})),c||(c=(0,s.Zp)({helper:h,widgetType:this.$$type,instantSearchInstance:f})),!a)return{hits:[],items:[],results:void 0,banner:void 0,sendEvent:o,bindEvent:c,widgetParams:n};m&&a.hits.length>0&&(a.hits=(0,u.S8)(a.hits));var p=(0,l.g)(a.hits,a.page,a.hitsPerPage),v=(0,d.P)(p,a.queryID),y=g(v,{results:a});return{hits:y,items:y,results:a,banner:null===(i=a.renderingContent)||void 0===i||null===(r=i.widgets)||void 0===r||null===(t=r.banners)||void 0===t?void 0:t[0],sendEvent:o,bindEvent:c,widgetParams:n}},dispose:function(e){var n=e.state;return t(),m?n.setQueryParameters(Object.keys(u.FU).reduce(function(e,t){return(0,a._)((0,i._)({},e),(0,r._)({},t,void 0))},{})):n},getWidgetSearchParameters:function(e,t){return m?e.setQueryParameters(u.FU):e}}}}},24370:function(e,t,n){"use strict";n.d(t,{Lj:function(){return p.A},GE:function(){return s.A},G6:function(){return o.A},Rx:function(){return c.A},HT:function(){return d.A},wY:function(){return g.A},MA:function(){return h.A},oN:function(){return f.A},IL:function(){return m.A}});var r=n(39445),i=n(73841),a=n(80510),s=n(90830),o=n(81854),c=(n(32092),n(58467)),u=n(65314),l=((0,u.A)(c.A),n(84267),n(79703)),d=((0,u.A)(l.A),n(47535),n(94348),n(71835)),h=n(16595),f=n(57052),m=(n(86566),n(55222),n(10014),n(58892),n(2863),n(52466)),p=(n(24304),n(89324),n(32527),n(33083),n(15080),n(47121),n(41379)),g=n(48312),v=(n(47199),n(60284),n(63199),n(83170),n(41578),n(68054),n(1848),n(16455),n(41267),n(84886),n(20065));(0,v.CI)(r.A),(0,v.CI)(i.A),(0,v.CI)(a.A)},79703:function(e,t,n){"use strict";n.d(t,{A:function(){return R}});var r=n(50467),i=n(71893),a=n(55456),s=n(38001),o=n(89098);function c(e){return"ais.dynamicWidgets"===e.$$type||"ais.feeds"===e.$$type}var u=n(74243),l=n(40069),d=n(1230),h=n(92783),f=n(56845),m=n(84582),p=n(52938),g=n(60513),v=n(53453),y=(0,u.V)({name:"infinite-hits",connector:!0});function _(e){var t=e||{};return t.page,(0,s._)(t,["page"])}function S(e){var t=e||{};return t.clickAnalytics,t.userToken,(0,s._)(t,["clickAnalytics","userToken"])}var R=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g.l;return(0,l.t)(e,y()),function(n){var s,u,l,g,y,R,w=n||{},b=w.escapeHTML,x=void 0===b||b,P=w.transformItems,I=void 0===P?function(e){return e}:P,F=w.cache,E=void 0===F?(s=null,u=null,{read:function(e){var t=e.state;return(0,v.n)(u,_(t))?s:null},write:function(e){var t=e.state,n=e.hits;u=_(t),s=n}}):F,T=function(e,t){var n,r=e.page,i=void 0===r?0:r,a=Object.keys(t).map(Number);return 0===a.length?i:(n=Math).min.apply(n,[i].concat((0,o._)(a)))},A=function(e,t){var n,r=e.page,i=void 0===r?0:r,a=Object.keys(t).map(Number);return 0===a.length?i:(n=Math).max.apply(n,[i].concat((0,o._)(a)))};return{$$type:"ais.infiniteHits",init:function(t){e((0,a._)((0,i._)({},this.getWidgetRenderState(t)),{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){var n=t.instantSearchInstance,r=this.getWidgetRenderState(t);e((0,a._)((0,i._)({},r),{instantSearchInstance:n}),!1),y("view:internal",r.currentPageHits)},getRenderState:function(e,t){return(0,a._)((0,i._)({},e),{infiniteHits:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t,r,s,o,u=e.results,v=e.helper,_=e.parent,w=e.state,b=e.instantSearchInstance,P=function(){var e=_.getPreviousState()||w;return E.read({state:S(e)})||{}},F=[],j=_.getPreviousState()||w,C=P(),O=null==u||null===(s=u.renderingContent)||void 0===s||null===(r=s.widgets)||void 0===r||null===(t=r.banners)||void 0===t?void 0:t[0];if(l||(l=function(){return function(e,t){return function(){var n=t();e.overrideStateWithoutTriggeringChangeEvent((0,a._)((0,i._)({},e.state),{page:T(e.state,n)-1})).searchWithoutTriggeringOnStateChange()}}(v,P)()},g=function(){return function(e,t){return function(){var n=t();e.setPage(A(e.state,n)+1).search()}}(v,P)()}),y||(y=(0,d.U0)({instantSearchInstance:b,helper:v,widgetType:this.$$type}),R=(0,d.Zp)({helper:v,widgetType:this.$$type,instantSearchInstance:b})),u){var N,H,k=j.page,W=void 0===k?0:k;x&&u.hits.length>0&&(u.hits=(0,h.S8)(u.hits));var D=(0,f.g)(u.hits,u.page,u.hitsPerPage),L=(0,m.P)(D,u.queryID),U=I(L,{results:u}),q=!1;(0,p.Q)(b.mainIndex,function(e){!q&&e.getWidgets().some(c)&&(q=!0)});var Q=!(null===(N=j.disjunctiveFacets)||void 0===N?void 0:N.length)&&!(j.facets||[]).filter(function(e){return"*"!==e}).length&&!(null===(H=j.hierarchicalFacets)||void 0===H?void 0:H.length);void 0!==C[W]||u.__isArtificial||"idle"!==b.status||q&&Q||(C[W]=U,E.write({state:S(j),hits:C})),F=U,o=0===T(j,C)}else o=void 0===j.page||0===T(j,C);var $=function(e){return Object.keys(e).map(Number).sort(function(e,t){return e-t}).reduce(function(t,n){return t.concat(e[n])},[])}(C),V=!u||u.nbPages<=A(j,C)+1;return{hits:$,items:$,currentPageHits:F,sendEvent:y,bindEvent:R,banner:O,results:u||void 0,showPrevious:l,showMore:g,isFirstPage:o,isLastPage:V,widgetParams:n}},dispose:function(e){var n=e.state;t();var s=n.setQueryParameter("page",void 0);return x?s.setQueryParameters(Object.keys(h.FU).reduce(function(e,t){return(0,a._)((0,i._)({},e),(0,r._)({},t,void 0))},{})):s},getWidgetUiState:function(e,t){var n=t.searchParameters.page||0;return n?(0,a._)((0,i._)({},e),{page:n+1}):e},getWidgetSearchParameters:function(e,t){var n=t.uiState,r=e;x&&(r=e.setQueryParameters(h.FU));var i=n.page?n.page-1:0;return r.setQueryParameter("page",i)}}}}},83170:function(e,t,n){"use strict";n(71893),n(55456);var r=n(74243);n(40069),n(1230),n(92783),n(56845),n(84582),n(60513),(0,r.V)({name:"looking-similar",connector:!0})},47535:function(e,t,n){"use strict";n(50467),n(71893),n(55456),n(38001),n(65631);var r=n(74243);n(40069),n(59066),n(60513),(0,r.V)({name:"menu",connector:!0})},94348:function(e,t,n){"use strict";n(50467),n(71893),n(55456),n(65631),n(17183);var r=n(74243);n(40069),n(60513),(0,r.V)({name:"numeric-menu",connector:!0})},71835:function(e,t,n){"use strict";n.d(t,{A:function(){return m}});var r=n(71893),i=n(55456),a=n(30494),s=n(99407),o=n(50467),c=n(13148),u=187==n.j?function(){function e(t){(0,a._)(this,e),(0,o._)(this,"currentPage",void 0),(0,o._)(this,"total",void 0),(0,o._)(this,"padding",void 0),this.currentPage=t.currentPage,this.total=t.total,this.padding=t.padding}return(0,s._)(e,[{key:"pages",value:function(){var e=this,t=e.total,n=e.currentPage,r=e.padding;if(0===t)return[0];var i=this.nbPagesDisplayed(r,t);if(i===t)return(0,c.y)({end:t});var a=this.calculatePaddingLeft(n,r,t,i),s=n-a,o=n+(i-a);return(0,c.y)({start:s,end:o})}},{key:"nbPagesDisplayed",value:function(e,t){return Math.min(2*e+1,t)}},{key:"calculatePaddingLeft",value:function(e,t,n,r){return e<=t?e:e>=n-t?r-(n-e):t}},{key:"isLastPage",value:function(){return this.currentPage>=this.total-1}},{key:"isFirstPage",value:function(){return this.currentPage<=0}}]),e}():null,l=n(74243),d=n(40069),h=n(60513),f=(0,l.V)({name:"pagination",connector:!0}),m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:h.l;return(0,d.t)(e,f()),function(n){var a=n||{},s=a.totalPages,o=a.padding,c=new u({currentPage:0,total:0,padding:void 0===o?3:o}),l={};return{$$type:"ais.pagination",init:function(t){var n=t.instantSearchInstance;e((0,i._)((0,r._)({},this.getWidgetRenderState(t)),{instantSearchInstance:n}),!0)},render:function(t){var n=t.instantSearchInstance;e((0,i._)((0,r._)({},this.getWidgetRenderState(t)),{instantSearchInstance:n}),!1)},dispose:function(e){var n=e.state;return t(),n.setQueryParameter("page",void 0)},getWidgetUiState:function(e,t){var n=t.searchParameters.page||0;return n?(0,i._)((0,r._)({},e),{page:n+1}):e},getWidgetSearchParameters:function(e,t){var n=t.uiState,r=n.page?n.page-1:0;return e.setQueryParameter("page",r)},getWidgetRenderState:function(e){var t=e.results,a=e.helper,o=e.state,u=e.createURL;l.refine||(l.refine=function(e){a.setPage(e),a.search()}),l.createURL||(l.createURL=function(e){return u(function(t){return(0,i._)((0,r._)({},t),{page:e+1})})});var d=o.page||0,h=function(e){var t=e.nbPages;return void 0!==s?Math.min(s,t):t}(t||{nbPages:0});return c.currentPage=d,c.total=h,{createURL:l.createURL,refine:l.refine,canRefine:h>1,currentRefinement:d,nbHits:(null==t?void 0:t.nbHits)||0,nbPages:h,pages:t?c.pages():[],isFirstPage:c.isFirstPage(),isLastPage:c.isLastPage(),widgetParams:n}},getRenderState:function(e,t){return(0,i._)((0,r._)({},e),{pagination:this.getWidgetRenderState(t)})}}}}},15080:function(e,t,n){"use strict";n(71893),n(55456);var r=n(74243);n(40069),n(56199),n(60513),(0,r.V)({name:"powered-by",connector:!0})},68054:function(e,t,n){"use strict";n(50467),n(71893),n(55456),n(65631),n(61642),n(1848),n(75373),n(57798);var r=n(74243);n(40069),n(60513),n(98539),(0,r.V)({name:"prompt-suggestions",connector:!0})},48312:function(e,t,n){"use strict";n.d(t,{A:function(){return f}});var r=n(71893),i=n(55456),a=n(89098),s=n(74243),o=n(40069),c=n(53453),u=n(60513),l=n(98539),d=(0,s.V)({name:"query-rules",connector:!0});function h(e){var t=this,n=t.helper,s=t.initialRuleContexts,o=t.trackedFilters,u=t.transformRuleContexts,d=e.state,h=d.ruleContexts||[],f=function(e){var t=e.helper,n=e.sharedHelperState,r=e.trackedFilters;return Object.keys(r).reduce(function(e,i){var s=(0,l.t)(t.lastResults||{},n,!0).filter(function(e){return e.attribute===i}).map(function(e){return e.numericValue||e.name}),o=(0,r[i])(s);return(0,a._)(e).concat((0,a._)(s.filter(function(e){return o.includes(e)}).map(function(e){return"ais-".concat(i,"-").concat(e).replace(/[^a-z0-9-_]+/gi,"_")})))},[])}({helper:n,sharedHelperState:d,trackedFilters:o}),m=u((0,a._)(s).concat((0,a._)(f))).slice(0,10);(0,c.n)(h,m)||n.overrideStateWithoutTriggeringChangeEvent((0,i._)((0,r._)({},d),{ruleContexts:m}))}var f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.l;return(0,o.t)(e,d()),function(n){var a=n||{},s=a.trackedFilters,o=void 0===s?{}:s,c=a.transformRuleContexts,u=void 0===c?function(e){return e}:c,l=a.transformItems,f=void 0===l?function(e){return e}:l;
1Object.keys(o).forEach(function(e){if("function"!=typeof o[e])throw new Error(d("'The \"".concat(e,'" filter value in the `trackedFilters` option expects a function.')))});var m,p=Object.keys(o).length>0,g=[];return{$$type:"ais.queryRules",init:function(t){var a=t.helper,s=t.state,c=t.instantSearchInstance;g=s.ruleContexts||[],m=h.bind({helper:a,initialRuleContexts:g,trackedFilters:o,transformRuleContexts:u}),p&&((function(e){return[e.disjunctiveFacetsRefinements,e.facetsRefinements,e.hierarchicalFacetsRefinements,e.numericRefinements].some(function(e){return Boolean(e&&Object.keys(e).length>0)})}(s)||Boolean(n.transformRuleContexts))&&m({state:s}),a.on("change",m)),e((0,i._)((0,r._)({},this.getWidgetRenderState(t)),{instantSearchInstance:c}),!0)},render:function(t){var n=t.instantSearchInstance;e((0,i._)((0,r._)({},this.getWidgetRenderState(t)),{instantSearchInstance:n}),!1)},getWidgetRenderState:function(e){var t=e.results,r=(t||{}).userData;return{items:f(void 0===r?[]:r,{results:t}),widgetParams:n}},getRenderState:function(e,t){return(0,i._)((0,r._)({},e),{queryRules:this.getWidgetRenderState(t)})},dispose:function(e){var n=e.helper,r=e.state;return t(),p?(n.removeListener("change",m),r.setQueryParameter("ruleContexts",g)):r}}}}},16595:function(e,t,n){"use strict";n.d(t,{A:function(){return m}});var r=n(50467),i=n(71893),a=n(55456),s=n(65631),o=n(74243),c=n(40069),u=n(17183),l=n(67438),d=n(60513),h=(0,o.V)({name:"range-input",connector:!0},{name:"range-slider",connector:!0});function f(e){var t=e.min,n=e.max,r=e.precision,i=Math.pow(10,r);return{min:t?Math.floor(t*i)/i:t,max:n?Math.ceil(n*i)/i:n}}var m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.l;return(0,c.t)(e,h()),function(n){var o=n||{},c=o.attribute,d=void 0===c?"":c,m=o.min,p=o.max,g=o.precision,v=void 0===g?0:g;if(!d)throw new Error(h("The `attribute` option is required."));if((0,u.B)(m)&&(0,u.B)(p)&&m>p)throw new Error(h("The `max` option can't be lower than `min`."));var y={from:function(e){return e.toLocaleString()},to:function(e){return function(e){return Number(Number(e).toFixed(v))}(e).toLocaleString()}},_=function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];1!==n.length||e.sendEventToInsights(n[0])}};function S(e,t){return function(){var n=(0,s._)(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[void 0,void 0],2),r=n[0],i=n[1],a=function(e,t,n,r){var i,a,o=e.state,c=t.min,l=t.max,h=(0,s._)(o.getNumericRefinement(d,">=")||[],1)[0],g=(0,s._)(o.getNumericRefinement(d,"<=")||[],1)[0],y=void 0===n||""===n,_=void 0===r||""===r,S=f({min:y?void 0:parseFloat(n),max:_?void 0:parseFloat(r),precision:v}),R=S.min,w=S.max;i=(0,u.B)(m)||c!==R?(0,u.B)(m)&&y?m:R:void 0,a=(0,u.B)(p)||l!==w?(0,u.B)(p)&&_?p:w:void 0;var b=void 0===i,x=(0,u.B)(c)&&c<=i,P=b||(0,u.B)(i)&&(!(0,u.B)(c)||x),I=void 0===a,F=(0,u.B)(a)&&l>=a,E=I||(0,u.B)(a)&&(!(0,u.B)(l)||F);return(h!==i||g!==a)&&P&&E?(o=o.removeNumericRefinement(d),(0,u.B)(i)&&(o=o.addNumericRefinement(d,">=",i)),(0,u.B)(a)&&(o=o.addNumericRefinement(d,"<=",a)),o.resetPage()):null}(e,t,r,i);a&&e.setState(a).search()}}return{$$type:"ais.range",init:function(t){e((0,a._)((0,i._)({},this.getWidgetRenderState(t)),{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){e((0,a._)((0,i._)({},this.getWidgetRenderState(t)),{instantSearchInstance:t.instantSearchInstance}),!1)},getRenderState:function(e,t){return(0,a._)((0,i._)({},e),{range:(0,a._)((0,i._)({},e.range),(0,r._)({},d,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t=e.results,r=e.helper,o=e.instantSearchInstance,c=t&&t.disjunctiveFacets||[],h=(0,l.I)(c,function(e){return e.name===d}),g=function(e){return f({min:(0,u.B)(m)?m:(0,u.B)(e.min)?e.min:0,max:(0,u.B)(p)?p:(0,u.B)(e.max)?e.max:0,precision:v})}(h&&h.stats||{min:void 0,max:void 0}),R=function(e){var t=(0,s._)(e.getNumericRefinement(d,">=")||[],1)[0],n=(0,s._)(e.getNumericRefinement(d,"<=")||[],1)[0];return[(0,u.B)(t)?t:-1/0,(0,u.B)(n)?n:1/0]}(r);return{refine:S(r,t?g:{min:void 0,max:void 0}),canRefine:g.min!==g.max,format:y,range:g,sendEvent:_(o),widgetParams:(0,a._)((0,i._)({},n),{precision:v}),start:R}},dispose:function(e){var n=e.state;return t(),n.removeDisjunctiveFacet(d).removeNumericRefinement(d)},getWidgetUiState:function(e,t){var n=t.searchParameters.getNumericRefinements(d),s=n[">="],o=void 0===s?[]:s,c=n["<="],u=void 0===c?[]:c;return 0===o.length&&0===u.length?e:(0,a._)((0,i._)({},e),{range:(0,a._)((0,i._)({},e.range),(0,r._)({},d,"".concat(o,":").concat(u)))})},getWidgetSearchParameters:function(e,t){var n=t.uiState,o=e.addDisjunctiveFacet(d).setQueryParameters({numericRefinements:(0,a._)((0,i._)({},e.numericRefinements),(0,r._)({},d,{}))});(0,u.B)(m)&&(o=o.addNumericRefinement(d,">=",m)),(0,u.B)(p)&&(o=o.addNumericRefinement(d,"<=",p));var c=n.range&&n.range[d];if(!c||-1===c.indexOf(":"))return o;var l=(0,s._)(c.split(":").map(parseFloat),2),h=l[0],f=l[1];return(0,u.B)(h)&&(!(0,u.B)(m)||m<h)&&(o=(o=o.removeNumericRefinement(d,">=")).addNumericRefinement(d,">=",h)),(0,u.B)(f)&&(!(0,u.B)(p)||f<p)&&(o=(o=o.removeNumericRefinement(d,"<=")).addNumericRefinement(d,"<=",f)),o}}}}},58892:function(e,t,n){"use strict";n(50467),n(71893),n(55456),n(65631),n(89098);var r=n(74243);n(40069),n(60513),(0,r.V)({name:"rating-menu",connector:!0})},57052:function(e,t,n){"use strict";n.d(t,{A:function(){return m}});var r=n(50467),i=n(71893),a=n(55456),s=n(38001),o=n(92783),c=n(74243),u=n(40069),l=n(59066),d=n(60513),h=(0,c.V)({name:"refinement-list",connector:!0}
1),f=187==n.j?["isRefined","count:desc","name:asc"]:null,m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.l;return(0,u.t)(e,h()),function(n){var c=n||{},u=c.attribute,d=c.operator,m=void 0===d?"or":d,p=c.limit,g=void 0===p?10:p,v=c.showMore,y=void 0!==v&&v,_=c.showMoreLimit,S=void 0===_?20:_,R=c.sortBy,w=void 0===R?f:R,b=c.escapeFacetValues,x=void 0===b||b,P=c.transformItems,I=void 0===P?function(e){return e}:P;if(!u)throw new Error(h("The `attribute` option is required."));if(!/^(and|or)$/.test(m))throw new Error(h('The `operator` must one of: `"and"`, `"or"` (got "'.concat(m,'").')));if(!0===y&&S<=g)throw new Error(h("`showMoreLimit` should be greater than `limit`."));var F,E,T,A=function(e){var t=e.name,n=e.escapedValue,r=(0,s._)(e,["name","escapedValue"]);return(0,a._)((0,i._)({},r),{value:n,label:t,highlighted:t})},j=[],C=!0,O=!1,N=function(){};function H(){N()}function k(){return O?S:g}var W=function(){return function(){}};return{$$type:"ais.refinementList",init:function(t){e((0,a._)((0,i._)({},this.getWidgetRenderState(t)),{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){e((0,a._)((0,i._)({},this.getWidgetRenderState(t)),{instantSearchInstance:t.instantSearchInstance}),!1)},getRenderState:function(e,t){return(0,a._)((0,i._)({},e),{refinementList:(0,a._)((0,i._)({},e.refinementList),(0,r._)({},u,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(t){var r=this,c=t.results,d=t.state,h=t.createURL,m=t.instantSearchInstance,p=t.helper,v=[],_=[];if(T&&E&&W||(T=(0,l.D)({instantSearchInstance:m,helper:p,attribute:u,widgetType:this.$$type}),E=function(e){T("click:internal",e),p.toggleFacetRefinement(u,e).search()},W=function(t,n){return function(r){return function(c){var l=r.instantSearchInstance,d=r.results;if(""===c&&j)e((0,a._)((0,i._)({},n.getWidgetRenderState((0,a._)((0,i._)({},r),{results:F}))),{instantSearchInstance:l}),!1);else{var h={highlightPreTag:x?o.FU.highlightPreTag:o.sn.highlightPreTag,highlightPostTag:x?o.FU.highlightPostTag:o.sn.highlightPostTag};t.searchForFacetValues(u,c,Math.min(k(),100),h).then(function(t){var c=x?(0,o.ef)(t.facetHits):t.facetHits,u=I(c.map(function(e){var t=e.escapedValue,n=e.value,r=(0,s._)(e,["escapedValue","value"]);return(0,a._)((0,i._)({},r),{value:t,label:n})}),{results:d});e((0,a._)((0,i._)({},n.getWidgetRenderState((0,a._)((0,i._)({},r),{results:F}))),{items:u,canToggleShowMore:!1,canRefine:!0,isFromSearch:!0,instantSearchInstance:l}),!1)})}}}}(p,this)),c){var S=c.getFacetValues(u,{sortBy:w,facetOrdering:w===f});_=S&&Array.isArray(S)?S:[],v=I(_.slice(0,k()).map(A),{results:c});var R=d.maxValuesPerFacet,b=k();C=R>b?_.length<=b:_.length<b,F=c,j=v,t.results&&(N=function(e,t){return function(){O=!O,t.render(e)}}(t,this))}var P=W&&W(t),D=O&&j.length>g||y&&!C;return{createURL:function(e){return h(function(t){return r.getWidgetUiState(t,{searchParameters:d.resetPage().toggleFacetRefinement(u,e),helper:p})})},items:v,refine:E,searchForItems:P,isFromSearch:!1,canRefine:v.length>0,widgetParams:n,isShowingMore:O,canToggleShowMore:D,toggleShowMore:H,sendEvent:T,hasExhaustiveItems:C}},dispose:function(e){var n=e.state;t();var r=n.setQueryParameter("maxValuesPerFacet",void 0);return"and"===m?r.removeFacet(u):r.removeDisjunctiveFacet(u)},getWidgetUiState:function(e,t){var n=t.searchParameters,s="or"===m?n.getDisjunctiveRefinements(u):n.getConjunctiveRefinements(u);return function(e,t){if(!e.refinementList)return e;e.refinementList[t]&&0!==e.refinementList[t].length||delete e.refinementList[t];0===Object.keys(e.refinementList).length&&delete e.refinementList;return e}((0,a._)((0,i._)({},e),{refinementList:(0,a._)((0,i._)({},e.refinementList),(0,r._)({},u,s))}),u)},getWidgetSearchParameters:function(e,t){var n=t.uiState,s="or"===m;if(e.isHierarchicalFacet(u))return e;if(s&&e.isConjunctiveFacet(u)||!s&&e.isDisjunctiveFacet(u))return e;var o=n.refinementList&&n.refinementList[u],c=s?e.addDisjunctiveFacet(u).removeDisjunctiveFacetRefinement(u):e.addFacet(u).removeFacetRefinement(u),l=c.maxValuesPerFacet||0,d=Math.max(l,y?S:g),h=c.setQueryParameter("maxValuesPerFacet",d);if(!o){var f=s?"disjunctiveFacetsRefinements":"facetsRefinements";return h.setQueryParameters((0,r._)({},f,(0,a._)((0,i._)({},h[f]),(0,r._)({},u,[]))))}return o.reduce(function(e,t){return s?e.addDisjunctiveFacetRefinement(u,t):e.addFacetRefinement(u,t)},h)}}}}},86566:function(e,t,n){"use strict";n(71893),n(55456);var r=n(74243);n(40069),n(1230),n(92783),n(56845),n(84582),n(60513),(0,r.V)({name:"related-products",connector:!0})},60284:function(e,t,n){"use strict";n(71893),n(55456),n(60513)},55222:function(e,t,n){"use strict";n.d(t,{A:function(){return l}});var r=n(71893),i=n(55456),a=n(74243),s=n(40069),o=n(60513),c=(0,a.V)({name:"search-box",connector:!0}),u=function(e,t){return t(e)},l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.l;return(0,s.t)(e,c()),function(n){var a,s,o=(n||{}).queryHook,c=void 0===o?u:o;return{$$type:"ais.searchBox",init:function(t){var n=t.instantSearchInstance;e((0,i._)((0,r._)({},this.getWidgetRenderState(t)),{instantSearchInstance:n}),!0)},render:function(t){var n=t.instantSearchInstance;e((0,i._)((0,r._)({},this.getWidgetRenderState(t)),{instantSearchInstance:n}),!1)},dispose:function(e){var n=e.state;return t(),n.setQueryParameter("query",void 0)},getRenderState:function(e,t){return(0,i._)((0,r._)({},e),{searchBox:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.helper,r=e.instantSearchInstance,i=e.state;return a||(a=function(e){c(e,function(e){return t.setQuery(e).search()})},s=function(){t.setQuery("").search()}),{query:i.query||"",refine:a,clear:s,widgetParams:n,isSearchStalled:"stalled"===r.status}},getWidgetUiState:function(e,t){var n=t.searchParameters.query||"";return""===n||e&&e.query===n?e:(0,i._)((0,r._)({},e),{query:n})},getWidgetSearchParameters:function(e,t){var n=t.uiState;return e.setQueryParameter("query",n.query||"")}}}}},10014:function(e,t,n){"use strict";n.d(t,{A:function(){return f}});var r=n(71893),i=n(55456),a=n(74243),s=n(40069),o=n(67438),c=n(60513),u=(0,a.V)({name:"sort-by",connector:!0});function l(e){return"strategy"in e&&void 0!==e.strategy}function d(e){return l(e)?e.strategy:e.value}function h(e,t){if(!t)return!1;var n=e[t];return void 0!==n&&l(n)}var f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.l;(0,s.t)(e,u());var n={};return function(a){var s=a||{},c=s.items,f=s.transformItems,m=void 0===f?function(e){return e}:f;if(!Array.isArray(c))throw new Error(u("The `items` option expects an array of objects."));var p={};
1return c.forEach(function(e,t){var n="value"in e&&void 0!==e.value,r="strategy"in e&&void 0!==e.strategy;if(n&&r)throw new Error(u("Item at index ".concat(t,' cannot have both "value" and "strategy" properties.')));if(!n&&!r)throw new Error(u("Item at index ".concat(t,' must have either a "value" or "strategy" property.')));var i=d(e);p[i]=e}),n.itemsLookup=p,{$$type:"ais.sortBy",init:function(t){var n=t.instantSearchInstance;if(c.some(function(e){return"strategy"in e&&e.strategy})&&!n.compositionID)throw new Error(u('Sorting strategies can only be used in composition mode. Please provide a "compositionID" to your InstantSearch instance.'));var a=this.getWidgetRenderState(t),s=a.currentRefinement;(0,o.I)(c,function(e){return d(e)===s}),e((0,i._)((0,r._)({},a),{instantSearchInstance:n}),!0)},render:function(t){var n=t.instantSearchInstance;e((0,i._)((0,r._)({},this.getWidgetRenderState(t)),{instantSearchInstance:n}),!1)},dispose:function(e){var r=e.state;return t(),n.isUsingComposition&&r.sortBy&&(r=r.setQueryParameter("sortBy",void 0)),n.initialValue&&r.index!==n.initialValue?r.setIndex(n.initialValue):r},getRenderState:function(e,t){return(0,i._)((0,r._)({},e),{sortBy:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,r=e.helper,i=e.state,s=e.parent,o=e.instantSearchInstance;!n.initialValue&&s&&(n.initialValue=s.getIndexName()),n.refine||(n.isUsingComposition=Boolean(null==o?void 0:o.compositionID),n.refine=function(e){var t=n.itemsLookup[e];t&&l(t)?r.setQueryParameter("sortBy",t.strategy).search():r.setQueryParameter("sortBy",void 0).setIndex(e).search()});var u=m(c,{results:t}).map(function(e){return{label:e.label,value:d(e)}}),f=n.isUsingComposition&&h(n.itemsLookup,i.sortBy)?i.sortBy:i.index,p=!t||0===t.nbHits;return{currentRefinement:f,options:u,refine:n.refine,hasNoResults:p,canRefine:!p&&c.length>0,widgetParams:a}},getWidgetUiState:function(e,t){var a=t.searchParameters,s=n.isUsingComposition&&h(n.itemsLookup,a.sortBy)?a.sortBy:a.index;return(0,i._)((0,r._)({},e),{sortBy:s!==n.initialValue?s:void 0})},getWidgetSearchParameters:function(e,t){var r=t.uiState,i=(!r.sortBy||Object.prototype.hasOwnProperty.call(n.itemsLookup,r.sortBy)?r.sortBy:void 0)||n.initialValue||e.index;if(h(n.itemsLookup,i)){var a=n.itemsLookup[i];return e.setQueryParameter("sortBy",a.strategy)}return e.setQueryParameter("index",i)}}}}},2863:function(e,t,n){"use strict";n.d(t,{A:function(){return u}});var r=n(71893),i=n(55456),a=n(74243),s=n(40069),o=n(60513),c=(0,a.V)({name:"stats",connector:!0}),u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.l;return(0,s.t)(e,c()),function(n){return{$$type:"ais.stats",init:function(t){var n=t.instantSearchInstance;e((0,i._)((0,r._)({},this.getWidgetRenderState(t)),{instantSearchInstance:n}),!0)},render:function(t){var n=t.instantSearchInstance;e((0,i._)((0,r._)({},this.getWidgetRenderState(t)),{instantSearchInstance:n}),!1)},dispose:function(){t()},getRenderState:function(e,t){return(0,i._)((0,r._)({},e),{stats:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,r=e.state;return t?{hitsPerPage:t.hitsPerPage,nbHits:t.nbHits,nbSortedHits:t.nbSortedHits,areHitsSorted:void 0!==t.appliedRelevancyStrictness&&t.appliedRelevancyStrictness>0&&t.nbSortedHits!==t.nbHits,nbPages:t.nbPages,page:t.page,processingTimeMS:t.processingTimeMS,query:t.query,widgetParams:n}:{hitsPerPage:r.hitsPerPage,nbHits:0,nbSortedHits:void 0,areHitsSorted:!1,nbPages:0,page:r.page||0,processingTimeMS:-1,query:r.query||"",widgetParams:n}}}}}},1848:function(e,t,n){"use strict";n(53750),n(71893),n(55456),n(65631),n(38452),n(30494),n(99407),n(50467),n(61642),n(53453),n(6865);var r=n(74243);n(40069),n(58061),n(32405),n(60513),(0,r.V)({name:"tasks",connector:!0})},52466:function(e,t,n){"use strict";n.d(t,{A:function(){return p}});var r=n(50467),i=n(71893),a=n(55456),s=n(65631),o=n(29850),c=n(74243),u=n(40069),l=n(90307),d=n(67438),h=n(60513),f=(0,c.V)({name:"toggle-refinement",connector:!0}),m="ais.toggleRefinement",p=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:h.l;return(0,u.t)(e,f()),function(n){var c=n||{},u=c.attribute,h=c.on,p=void 0===h||h,g=c.off;if(!u)throw new Error(f("The `attribute` option is required."));var v,y=void 0!==g,_=(0,l.$)(p).map(o.A),S=y?(0,l.$)(g).map(o.A):void 0,R=function(e){return function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isRefined:!1}).isRefined;t?(_.forEach(function(t){return e.removeDisjunctiveFacetRefinement(u,t)}
1),y&&S.forEach(function(t){return e.addDisjunctiveFacetRefinement(u,t)})):(v("click:internal",t),y&&S.forEach(function(t){return e.removeDisjunctiveFacetRefinement(u,t)}),_.forEach(function(t){return e.addDisjunctiveFacetRefinement(u,t)})),e.search()}},w=function(e,t){var n=t.state,r=t.createURL,i=t.getWidgetUiState,a=t.helper;return function(){n=n.resetPage();var t=e?_:S;t&&t.forEach(function(e){n=n.removeDisjunctiveFacetRefinement(u,e)});var s=e?S:_;return s&&s.forEach(function(e){n=n.addDisjunctiveFacetRefinement(u,e)}),r(function(e){return i(e,{searchParameters:n,helper:a})})}};return{$$type:m,init:function(t){var n=t.instantSearchInstance;e((0,a._)((0,i._)({},this.getWidgetRenderState(t)),{instantSearchInstance:n}),!0)},render:function(t){var n=t.instantSearchInstance;e((0,a._)((0,i._)({},this.getWidgetRenderState(t)),{instantSearchInstance:n}),!1)},dispose:function(e){var n=e.state;return t(),n.removeDisjunctiveFacet(u)},getRenderState:function(e,t){return(0,a._)((0,i._)({},e),{toggleRefinement:(0,a._)((0,i._)({},e.toggleRefinement),(0,r._)({},u,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t=e.state,r=e.helper,i=e.results,a=e.createURL,c=e.instantSearchInstance,h=_.every(function(e){return t.isDisjunctiveFacetRefined(u,e)}),f={isRefined:h,count:0},p={isRefined:y&&!h,count:0};if(i){var g=(0,l.$)(S||!1),b=i.getFacetValues(u,{})||[],x=_.map(function(e){return(0,d.I)(b,function(t){return t.escapedValue===(0,o.A)(String(e))})}).filter(function(e){return void 0!==e}),P=y?g.map(function(e){return(0,d.I)(b,function(t){return t.escapedValue===(0,o.A)(String(e))})}).filter(function(e){return void 0!==e}):[];f={isRefined:!!x.length&&x.every(function(e){return e.isRefined}),count:x.reduce(function(e,t){return e+t.count},0)||null},p={isRefined:!!P.length&&P.every(function(e){return e.isRefined}),count:P.reduce(function(e,t){return e+t.count},0)||b.reduce(function(e,t){return e+t.count},0)}}v||(v=function(e){var t=e.instantSearchInstance,n=e.helper,r=e.attribute,i=e.on;return function(){for(var e=arguments.length,a=new Array(e),o=0;o<e;o++)a[o]=arguments[o];if(1!==a.length){var c,u=(0,s._)(a,3),l=u[1],d=u[2],h=void 0===d?"Filter Applied":d,f=(0,s._)(a[0].split(":"),2),p=f[0],g=f[1];"click"===p&&void 0!==i&&(l||t.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:m,eventType:p,eventModifier:g,payload:{eventName:h,index:(null===(c=n.lastResults)||void 0===c?void 0:c.index)||n.state.index,filters:i.map(function(e){return"".concat(r,":").concat(e)})},attribute:r}))}else t.sendEventToInsights(a[0])}}({instantSearchInstance:c,attribute:u,on:_,helper:r}));var I=h?p:f;return{value:{name:u,isRefined:h,count:i?I.count:null,onFacetValue:f,offFacetValue:p},createURL:w(h,{state:t,createURL:a,helper:r,getWidgetUiState:this.getWidgetUiState}),sendEvent:v,canRefine:Boolean(i?I.count:null),refine:R(r),widgetParams:n}},getWidgetUiState:function(e,t){var n,s=t.searchParameters,o=_&&_.every(function(e){return s.isDisjunctiveFacetRefined(u,e)});return o?(0,a._)((0,i._)({},e),{toggle:(0,a._)((0,i._)({},e.toggle),(0,r._)({},u,o))}):(null===(n=e.toggle)||void 0===n||delete n[u],e)},getWidgetSearchParameters:function(e,t){var n=t.uiState;if(e.isHierarchicalFacet(u)||e.isConjunctiveFacet(u))return e;var s=e.addDisjunctiveFacet(u).removeDisjunctiveFacetRefinement(u);return Boolean(n.toggle&&n.toggle[u])?(_&&_.forEach(function(e){s=s.addDisjunctiveFacetRefinement(u,e)}
1),s):y?(S&&S.forEach(function(e){s=s.addDisjunctiveFacetRefinement(u,e)}),s):s.setQueryParameters({disjunctiveFacetsRefinements:(0,a._)((0,i._)({},e.disjunctiveFacetsRefinements),(0,r._)({},u,[]))})}}}}},24304:function(e,t,n){"use strict";n(71893),n(55456),n(18454);var r=n(74243);n(40069),n(92783),n(60513),(0,r.V)({name:"trending-facets",connector:!0})},89324:function(e,t,n){"use strict";n(71893),n(55456);var r=n(74243);n(40069),n(9886),n(1230),n(92783),n(56845),n(84582),n(60513),(0,r.V)({name:"trending-items",connector:!0})},47199:function(e,t,n){"use strict";n(71893),n(55456);var r=n(74243);n(40069),n(60513),(0,r.V)({name:"voice-search",connector:!0})},68887:function(e,t,n){"use strict";n.d(t,{Si:function(){return a}});var r=n(61642),i="_ALGOLIA";function a(){return function(e){if("object"===("undefined"==typeof document?"undefined":(0,r._)(document))&&"string"==typeof document.cookie)for(var t="".concat(e,"="),n=document.cookie.split(";"),i=0;i<n.length;i++){for(var a=n[i];" "===a.charAt(0);)a=a.substring(1);if(0===a.indexOf(t))return a.substring(t.length,a.length)}}(i)}},12632:function(e,t,n){"use strict";n.d(t,{Zt:function(){return o}});var r=n(69734),i=n(65150),a=n(92783),s=(0,r.s)("Highlight");function o(e){var t=e.attribute,n=e.highlightedTagName,r=void 0===n?"mark":n,o=e.hit,c=e.cssClasses,u=void 0===c?{}:c,l=((0,i.E)(o._highlightResult,t)||{}).value,d=void 0===l?"":l,h=s({descendantName:"highlighted"})+(u.highlighted?" ".concat(u.highlighted):"");return d.replace(new RegExp(a.sn.highlightPreTag,"g"),"<".concat(r,' class="').concat(h,'">')).replace(new RegExp(a.sn.highlightPostTag,"g"),"</".concat(r,">"))}n(71893),n(55456),n(18454),new RegExp(/\w/i);n(38796),(0,r.s)("ReverseHighlight");(0,r.s)("Snippet");(0,r.s)("ReverseSnippet");n(35984),n(68887)},35984:function(e,t,n){"use strict";n.d(t,{Zd:function(){return s}});n(61642);var r=n(33526),i=(n(10793),"ais.usage.sessionId"),a=null;function s(){if(a)return a;try{var e=sessionStorage.getItem(i);return e?a=e:(a=(0,r.G)(),sessionStorage.setItem(i,a),a)}catch(e){return a=(0,r.G)()}}},29815:function(e,t,n){"use strict";n.d(t,{default:function(){return Ke}});var r=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.descendantName,r=t.modifierName,i=n?"-".concat(n):"",a=r?"--".concat(r):"";return"".concat("ais","-").concat(e).concat(i).concat(a)}},i=n(71893),a=n(55456),s=n(74103),o=n(65631),c=n(89098),u=n(50467),l=(n(50595),n(70561),n(61642)),d="<mark>",h="</mark>",f=(n(86862),Promise.resolve());function m(e,t){var n=null,r=!1,i=null,a=function(){for(var a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];null===n?(i=s,n=f.then(function(){n=null;var t=i;i=null,r?r=!1:e.apply(void 0,(0,c._)(t))})):t&&null!==i&&(i=t(i,s))};return a.wait=function(){if(null===n)throw new Error("The deferred function should be called before calling `wait()`");return n},a.cancel=function(){null!==n&&(r=!0)},a}var p=n(53750);function g(e,t){return(Array.isArray(t)?t:t.split(".")).reduce(function(e,t){return e&&e[t]},e)}var v=n(38001),y=r("Highlight");function _(e){var t=e.attribute,n=e.highlightedTagName,r=void 0===n?"mark":n,i=e.hit,a=e.cssClasses,s=void 0===a?{}:a,o=(g(i._highlightResult,t)||{}).value,c=void 0===o?"":o,u=y({descendantName:"highlighted"})+(s.highlighted?" ".concat(s.highlighted):"");return c.replace(new RegExp(d,"g"),"<".concat(r,' class="').concat(u,'">')).replace(new RegExp(h,"g"),"</".concat(r,">"))}function S(e){var t=d,n=h;return e.map(function(e){return e.isHighlighted?t+e.value+n:e.value}).join("")}function R(e){var t=h,n=d,r=e.split(n),i=r.shift(),a=i?[{value:i,isHighlighted:!1}]:[];return r.forEach(function(e){var n=e.split(t);a.push({value:n[0],isHighlighted:!0}),""!==n[1]&&a.push({value:n[1],isHighlighted:!1})}),a}var w={"&":"&","<":"<",">":">",""":'"',"'":"'"},b=/&(amp|quot|lt|gt|#39);/g,x=RegExp(b.source);var P=new RegExp(/\w/i);function I(e,t){var n,r,i,a,s,o=e[t],c=null===(n=null===(i=e[t+1])||void 0===i?void 0:i.isHighlighted)||void 0===n||n,u=null===(r=null===(a=e[t-1])||void 0===a?void 0:a.isHighlighted)||void 0===r||r;return P.test((s=o.value)&&x.test(s)?s.replace(b,function(e){return w[e]}):s)||u!==c?o.isHighlighted:u}function F(e){return e.some(function(e){return e.isHighlighted})?e.map(function(t,n){return(0,a._)((0,i._)({},t),{isHighlighted:!I(e,n)})}):e.map(function(e){return(0,a._)((0,i._)({},e),{isHighlighted:!1})})}var E=r("ReverseHighlight");function T(e){var t=e.attribute,n=e.highlightedTagName,r=void 0===n?"mark":n,i=e.hit,a=e.cssClasse
1s,s=void 0===a?{}:a,o=(g(i._highlightResult,t)||{}).value,c=void 0===o?"":o,u=E({descendantName:"highlighted"})+(s.highlighted?" ".concat(s.highlighted):"");return S(F(R(c))).replace(new RegExp(d,"g"),"<".concat(r,' class="').concat(u,'">')).replace(new RegExp(h,"g"),"</".concat(r,">"))}var A=r("Snippet");function j(e){var t=e.attribute,n=e.highlightedTagName,r=void 0===n?"mark":n,i=e.hit,a=e.cssClasses,s=void 0===a?{}:a,o=(g(i._snippetResult,t)||{}).value,c=void 0===o?"":o,u=A({descendantName:"highlighted"})+(s.highlighted?" ".concat(s.highlighted):"");return c.replace(new RegExp(d,"g"),"<".concat(r,' class="').concat(u,'">')).replace(new RegExp(h,"g"),"</".concat(r,">"))}var C=r("ReverseSnippet");function O(e){var t=e.attribute,n=e.highlightedTagName,r=void 0===n?"mark":n,i=e.hit,a=e.cssClasses,s=void 0===a?{}:a,o=(g(i._snippetResult,t)||{}).value,c=void 0===o?"":o,u=C({descendantName:"highlighted"})+(s.highlighted?" ".concat(s.highlighted):"");return S(F(R(c))).replace(new RegExp(d,"g"),"<".concat(r,' class="').concat(u,'">')).replace(new RegExp(h,"g"),"</".concat(r,">"))}function N(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}var H="ais.usage.sessionId",k=null;function W(){if(k)return k;try{var e=sessionStorage.getItem(H);return e?k=e:(k=N(),sessionStorage.setItem(H,k),k)}catch(e){return k=N()}}function D(e){var t,n=e.method,r=e.payload;if("object"!==(void 0===r?"undefined":(0,l._)(r)))throw new Error("The insights helper expects the payload to be an object.");try{t=function(e){return btoa(encodeURIComponent(JSON.stringify(e)))}(r)}catch(e){throw new Error("Could not JSON serialize the payload object.")}return'data-insights-method="'.concat(n,'" data-insights-payload="').concat(t,'"')}function L(e,t){return D({method:e,payload:t})}function U(){return function(e){if("object"===("undefined"==typeof document?"undefined":(0,l._)(document))&&"string"==typeof document.cookie)for(var t="".concat(e,"="),n=document.cookie.split(";"),r=0;r<n.length;r++){for(var i=n[r];" "===i.charAt(0);)i=i.substring(1);if(0===i.indexOf(t))return i.substring(t.length,i.length)}}("_ALGOLIA")}function q(e){return e!==Object(e)}function Q(e,t){if(e===t)return!0;if(q(e)||q(t)||"function"==typeof e||"function"==typeof t)return e===t;if(Object.keys(e).length!==Object.keys(t).length)return!1;var n=!0,r=!1,i=void 0;try{for(var a,s=Object.keys(e)[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var o=a.value;if(!(o in t))return!1;if(!Q(e[o],t[o]))return!1}}catch(e){r=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw i}}return!0}function $(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{fallback:function(){}}).fallback;return"undefined"==typeof window?t():e({window:window})}function V(e){var t=e||{};return t.page,(0,v._)(t,["page"])}var M=n(7192),B=n(30494),K=n(99407),X=n(20884),J=n(72733);function z(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n]}function Y(e,t){for(var n,r=0;r<e.length;r++)if(t(n=e[r],r,e))return n}function G(e){var t=e;return t.transporter&&t.transporter.userAgent?t.transporter.userAgent.value:t._ua}function Z(e){if(e.appId&&e.apiKey)return[e.appId,e.apiKey];if(e.transporter){var t=e.transporter,n=t.headers||t.baseHeaders,r=t.queryParameters||t.baseQueryParameters,i="x-algolia-application-id",a="x-algolia-api-key";return[n[i]||r[i],n[a]||r[a]]}return[e.applicationID,e.apiKey]}var ee=["ais.index","ais.feedContainer"];function te(e){return ee.includes(e.$$type)}function ne(e,t,n){var r=t.getHelper();return{uiState:n,helper:r,parent:t,instantSearchInstance:e,state:r.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,scopedResults:[],searchMetadata:{isSearchStalled:"stalled"===e.status},status:e.status,error:e.error}}function re(e,t,n){var r=t.getResultsForWidget(n),i=t.getHelper();return{helper:i,parent:t,instantSearchInstance:e,results:r,scopedResults:t.getScopedResults(),state:r&&"_state"in r?r._state:i.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,searchMetadata:{isSearchStalled:"stalled"===e.status},status:e.status,error:e.error}}function ie(e){var t=e.renderState,n=e.instantSearchInstance,r=e.parent,s=r?r.getIndexId():n.mainIndex.getIndexId();n.renderState=(0,a._)((0,i._)({},n.renderState),(0,u._)({},s,(0,i._)({},n.renderState[s],t)))}function ae(e){var t=[];return Object.keys(e).forEach(function(n){var r=e[n];if(void 0!==r){var a=function(e){if(null==e)return null;var t=void 0===e?"undefined":(0,l._)(e);if("string"===t||"number"===t||"boolean"===t)return{value:String(e),type:t};if(Array.isArray(e)||"object"===t){var n=Array.isArray(e)?"array":"object";try{return{value:JSON.stringify(e),type:n}}catch(e){return{type:n}}}return"function"===t?{value:e.name,type:"function"}:null}(r);a?t.push((0,i._)({name:n},a)):t.push({name:n})}}),t}function se(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.mainIndex,r=ne(t,n,t._initialUiState);return e.map(function(e){var n={};if(e.getWidgetRenderState){var i=e.getWidgetRenderState(r);i&&i.widgetParams&&(n=i.widgetParams)}var a=ae(n),s=te(e)?se(e.getWidgets(),t,e):[];return{type:e.$$widgetType||e.$$type||"unknown",params:a,children:s}})}var oe="undefined"!=typeof performance?function(){return performance.now()}:function(){return Date.now()},ce="4.116.0",ue="2.17.2",le="https://cdn.jsdelivr.net/npm/search-insights@".concat(ue,"/dist/search-insights.min.js"),de=["searchClient","
1insightsClient","initialUiState"];function he(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.insightsClient,n=e.insightsInitParams,r=e.onEvent,s=e.$$internal,u=void 0!==s&&s,l=e.$$automatic,d=void 0!==l&&l,h=t;t||null===t||$(function(e){var t=e.window,n=t.AlgoliaAnalyticsObject||"aa";"string"==typeof n&&(h=t[n]),h||(t.AlgoliaAnalyticsObject=n,t[n]||(t[n]=function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];t[n].queue||(t[n].queue=[]),t[n].queue.push(r)},t[n].version=ue,t[n].shouldAddScript=!0),h=t[n])});var f=h||z;return function(e){var t,s=e.instantSearchInstance,l=s.middleware.filter(function(e){return"ais.insights"===e.instance.$$type&&e.instance.$$internal}).map(function(e){return e.creator});(t=s).unuse.apply(t,(0,c._)(l));var h,m,p,g=(0,o._)(Z(s.client),2),v=g[0],y=g[1],_=void 0,S=void 0,R=void 0,w=f.queue;Array.isArray(w)&&(h=(0,o._)(["setUserToken","init"].map(function(e){var t=(0,o._)(Y(w.slice().reverse(),function(t){return(0,o._)(t,1)[0]===e})||[],2);return t[1]}),2),S=h[0],_=h[1]);f("getUserToken",null,function(e,t){R=me(t)}),!n&&fe(f)||f("init",(0,i._)({appId:v,apiKey:y,partial:!0},n));var b=null;return{$$type:"ais.insights",$$internal:u,$$automatic:d,onStateChange:function(){},subscribe:function(){if(f.shouldAddScript){var e="[insights middleware]: could not load search-insights.js. Please load it manually following https://alg.li/insights-init";try{var t=document.createElement("script");t.async=!0,t.src=le,t.onerror=function(){s.emit("error",new Error(e))},document.body.appendChild(t),f.shouldAddScript=!1}catch(t){f.shouldAddScript=!1,s.emit("error",new Error(e))}}},started:function(){f("addAlgoliaAgent","insights-middleware"),p=s.mainHelper;var e,t=f.queue;Array.isArray(t)&&(e=(0,o._)(["setUserToken","init"].map(function(e){var n=(0,o._)(Y(t.slice().reverse(),function(t){return(0,o._)(t,1)[0]===e})||[],2);return n[1]}),2),S=e[0],_=e[1]);m=function(e){var t,n,r=(null===(n=e._initialResults)||void 0===n||null===(t=n[e.indexName])||void 0===t?void 0:t.state)||{},i=e.mainHelper.state;return{userToken:r.userToken||i.userToken,clickAnalytics:r.clickAnalytics||i.clickAnalytics}}(s),d||p.overrideStateWithoutTriggeringChangeEvent((0,a._)((0,i._)({},p.state),{clickAnalytics:!0})),u||s.scheduleSearch();var l=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=me(e);if(n){var r=p.state.userToken;t?o():setTimeout(o,0)}function o(){p.overrideStateWithoutTriggeringChangeEvent((0,a._)((0,i._)({},p.state),{userToken:n})),r&&r!==n&&(p._recommendCache={},s.scheduleSearch())}};function h(e){l(e,!0),f("setUserToken",e)}var g,y=void 0,w=U();w?y=w:y="anonymous-".concat(N());var x=m.userToken;(null==n?void 0:n.userToken)&&(g=n.userToken),g?h(g):x?h(x):R?h(R):S?h(S):y&&(h(y),((null==n?void 0:n.useCookie)||(null==_?void 0:_.useCookie))&&function(e,t){var n=2592e6,r=new Date;r.setTime(r.getTime()+(t||6*n));var i="expires=".concat(r.toUTCString());document.cookie="_ALGOLIA=".concat(e,";").concat(i,";path=/")}
1(y,(null==n?void 0:n.cookieDuration)||(null==_?void 0:_.cookieDuration))),f("onUserTokenChange",function(e){return l(e,!0)},{immediate:!0});var P=f;fe(f)&&(P=function(e,t){var n=(0,o._)(Z(s.client),2),r=n[0],i=n[1];return f(e,t,{headers:{"X-Algolia-Application-Id":r,"X-Algolia-API-Key":i}})});var I,F=new Set;s.mainHelper.derivedHelpers[0].on("result",function(e){var t=e.results;!t||t.queryID&&t.queryID===I||(I=t.queryID,F.clear())}),s.sendEventToInsights=function(e){if(r)r(e,P);else if(e.insightsMethod){if("viewedObjectIDs"===e.insightsMethod){var t=e.payload,n=function(e){return t.queryID?"".concat(t.queryID,":").concat(e):e},i=t.objectIDs.filter(function(e){return!F.has(n(e))});if(0===i.length)return;i.forEach(function(e){return F.add(n(e))}),t.objectIDs=i}e.payload.algoliaSource=["instantsearch"],d&&e.payload.algoliaSource.push("instantsearch-automatic"),"internal"===e.eventModifier&&e.payload.algoliaSource.push("instantsearch-internal"),P(e.insightsMethod,e.payload)}},$(function(){var e=W();var t=function(){try{var t=Math.round(oe()-s._createdAt);n={eventName:"__start__",algoliaAgent:G(s.client),version:ce,applicationId:v,performance:{bootstrapMs:t},widgets:[{type:"ais.instantSearch",params:s._initialOptions?ae((o=s._initialOptions,u=(0,c._)(de),null==o?o:Object.keys(o).reduce(function(e,t){if(u.indexOf(t)>=0)return e;var n=t;return e[n]=o[n],e},{}))):[],children:se(s.mainIndex.getWidgets(),s)}]},a=null===(r=p.state)||void 0===r?void 0:r.userToken,P("sendEvents",[(0,i._)({eventType:"instantsearch",timestamp:Date.now(),sessionID:e,userToken:a?String(a):void 0},n)])}catch(e){}var n,r,a,o,u};s.once("render",t),b=function(){return s.removeListener("render",t)}})},unsubscribe:function(){b&&b(),f("onUserTokenChange",void 0),s.sendEventToInsights=z,p&&m&&(p.overrideStateWithoutTriggeringChangeEvent((0,i._)({},p.state,m)),s.scheduleSearch())}}}}function fe(e){var t=(0,o._)((e.version||"").split(".").map(Number),2),n=t[0],r=t[1];return n>=3||2===n&&r>=6||1===n&&r>=10}function me(e){if(e)return"number"==typeof e?e.toString():e}function pe(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.mainIndex,i=ne(t,r,t._initialUiState);e.forEach(function(e){var r={};if(e.getWidgetRenderState){var a=e.getWidgetRenderState(i);a&&a.widgetParams&&(r=a.widgetParams)}var s=Object.keys(r).filter(function(e){return void 0!==r[e]});n.widgets.push({type:e.$$type,widgetType:e.$$widgetType,params:s}),te(e)&&pe(e.getWidgets(),t,n,e)})}function ge(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).$$internal,t=void 0!==e&&e;return function(e){var n=e.instantSearchInstance,r={widgets:[]},i=document.createElement("meta"),a=document.querySelector("head");return i.name="instantsearch:widgets",{$$type:"ais.metadata",$$internal:t,onStateChange:function(){},subscribe:function(){setTimeout(function(){r.ua=G(n.client),pe(n.mainIndex.getWidgets(),n,r),n.middleware.forEach(function(e){return r.widgets.push({middleware:!0,type:e.instance.$$type,internal:e.instance.$$internal})}),i.content=JSON.stringify(r),a.appendChild(i)},0)},started:function(){},unsubscribe:function(){i.remove()}}}}var ve=n(55373),ye=function(e){e&&(window.document.title=e)},_e=function(){function e(t){var n=this,r=t.windowTitle,i=t.writeDelay,a=void 0===i?400:i,s=t.createURL,o=t.parseURL,c=t.getLocation,l=t.start,d=t.dispose,h=t.push,f=t.cleanUrlOnDispose;(0,B._)(this,e),(0,u._)(this,"$$type","ais.browser"),(0,u._)(this,"windowTitle",void 0),(0,u._)(this,"writeDelay",void 0),(0,u._)(this,"_createURL",void 0),(0,u._)(this,"parseURL",void 0),(0,u._)(this,"getLocation",void 0),(0,u._)(this,"writeTimer",void 0),(0,u._)(this,"_onPopState",void 0),(0,u._)(this,"inPopState",!1),(0,u._)(this,"isDisposed",!1),(0,u._)(this,"latestAcknowledgedHistory",0),(0,u._)(this,"_start",void 0),(0,u._)(this,"_dispose",void 0),(0,u._)(this,"_push",void 0),(0,u._)(this,"_cleanUrlOnDispose",void 0),this.windowTitle=r,this.writeTimer=void 0,this.writeDelay=a,this._createURL=s,this.parseURL=o,this.getLocation=c,this._start=l,this._dispose=d,this._push=h,this._cleanUrlOnDispose=void 0===f||f,$(function(e){var t=e.window,r=n.windowTitle&&n.windowTitle(n.read());ye(r),n.latestAcknowledgedHistory=t.history.length})}return(0,K._)(e,[{key:"read",value:function(){return this.parseURL({qsModule:ve,location:this.getLocation()})}},{key:"write",value:function(e){var t=this;$(function(n){var r=n.window,i=t.createURL(e),a=t.windowTitle&&t.windowTitle(e);t.writeTimer&&clearTimeout(t.writeTimer),t.writeTimer=setTimeout(function(){ye(a),t.shouldWrite(i)&&(t._push?t._push(i):r.history.pushState(e,a||"",i),t.latestAcknowledgedHistory=r.history.length),t.inPopState=!1,t.writeTimer=void 0},t.writeDelay)})}}
1,{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())},$(function(e){e.window.addEventListener("popstate",t._onPopState)})}},{key:"createURL",value:function(e){return this._createURL({qsModule:ve,routeState:e,location:this.getLocation()})}},{key:"dispose",value:function(){var e=this;this._dispose&&this._dispose(),this.isDisposed=!0,$(function(t){var n=t.window;e._onPopState&&n.removeEventListener("popstate",e._onPopState)}),this.writeTimer&&clearTimeout(this.writeTimer),this._cleanUrlOnDispose&&this.write({})}},{key:"start",value:function(){this.isDisposed=!1}},{key:"shouldWrite",value:function(e){var t=this;return $(function(n){var r=n.window;if(t.isDisposed&&!t._cleanUrlOnDispose)return!1;var i=!(t.isDisposed&&t.latestAcknowledgedHistory!==r.history.length);return!t.inPopState&&i&&e!==r.location.href})}}]),e}();function Se(e){return e.configure,(0,v._)(e,["configure"])}var Re=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.router,n=void 0===t?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.createURL,n=void 0===t?function(e){var t=e.qsModule,n=e.routeState,r=e.location,i=r.protocol,a=r.hostname,s=r.port,o=void 0===s?"":s,c=r.pathname,u=r.hash,l=t.stringify(n),d=""===o?"":":".concat(o);return l?"".concat(i,"//").concat(a).concat(d).concat(c,"?").concat(l).concat(u):"".concat(i,"//").concat(a).concat(d).concat(c).concat(u)}:t,r=e.parseURL,i=void 0===r?function(e){var t=e.qsModule,n=e.location;return t.parse(n.search.slice(1),{arrayLimit:99})}:r,a=e.writeDelay,s=void 0===a?400:a,o=e.windowTitle,c=e.getLocation,u=void 0===c?function(){return $(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.")}})}:c,l=e.start,d=e.dispose,h=e.push,f=e.cleanUrlOnDispose;return new _e({createURL:n,parseURL:i,writeDelay:s,windowTitle:o,getLocation:u,start:l,dispose:d,push:h,cleanUrlOnDispose:f})}():t,r=e.stateMapping,s=void 0===r?{$$type:"ais.simple",stateToRoute:function(e){return Object.keys(e).reduce(function(t,n){return(0,a._)((0,i._)({},t),(0,u._)({},n,Se(e[n])))},{})},routeToState:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce(function(t,n){var r=e[n];return"object"!==(void 0===r?"undefined":(0,l._)(r))||null===r?t:(0,a._)((0,i._)({},t),(0,u._)({},n,Se(r)))},{})}}:r,o=e.$$internal,c=void 0!==o&&o;return function(e){var t=e.instantSearchInstance;t._createURL=function(e){var r=0===t.mainIndex.getWidgets().length?t._initialUiState:t.mainIndex.getWidgetUiState({}),o=Object.keys(e).reduce(function(t,n){return(0,a._)((0,i._)({},t),(0,u._)({},n,e[n]))},r),c=s.stateToRoute(o);return n.createURL(c)};var r=void 0,o=t._initialUiState;return{$$type:"ais.router({router:".concat(n.$$type||"__unknown__",", stateMapping:").concat(s.$$type||"__unknown__","})"),$$internal:c,onStateChange:function(e){var t=e.uiState,i=s.stateToRoute(t);void 0!==r&&Q(r,i)||(n.write(i),r=i)},subscribe:function(){t._initialUiState=(0,i._)({},o,s.routeToState(n.read())),n.onUpdate(function(e){t.mainIndex.getWidgets().length>0&&t.setUiState(s.routeToState(e))})},started:function(){var e;null===(e=n.start)||void 0===e||e.call(n)},unsubscribe:function(){n.dispose()}}}};var we=0;function be(e){"recommend"===e.dependsOn&&(e.$$id=we++)}function xe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.map(function(e){return n=(t=e).name,r=t.connector,["https://www.algolia.com/doc/api-reference/widgets/",n,"/js/",void 0!==r&&r?"#connector":""].join("");var t,n,r}).join(", ");return function(e){return[e,"See documentation: ".concat(r)].filter(Boolean).join("\n\n")}}var Pe=function(e,t){return e.setQueryParameters({hierarchicalFacets:t.hierarchicalFacets.reduce(function(e,t){var n=function(e,t){if(!Array.isArray(e))return-1;for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}(e,function(e){return e.name===t.name});if(-1===n)return e.concat(t);var r=e.slice();return r.splice(n,1,t),r},e.hierarchicalFacets)})},Ie=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(function(e,t){var n=function(e,t){return e.setQueryParameters({hierarchicalFacetsRefinements:(0,i._)({},e.hierarchicalFacetsRefinements,t.hierarchicalFacetsRefinements)})}(e,t),r=function(e,t){return t.tagRefinements.reduce(function(e,t){return e.addTagRefinement(t)},e)}(Pe(n,t),t),a=function(e,t){return e.setQueryParameters({numericRefinements:(0,i._)({},e.numericRefinements,t.numericRefinements)})}(r,t),s=function(e,t){return e.setQueryParameters({disjunctiveFacetsRefinements:(0,i._)({},e.disjunctiveFacetsRefinements,t.disjunctiveFacetsRefinements)})}(a,t),o=function(e,t){return e.setQueryParameters({facetsExcludes:(0,i._)({},e.facetsExcludes,t.facetsExcludes)})}(s,t),c=function(e,t){return e.setQueryParameters({facetsRefinements:(0,i._)({},e.facetsRefinements,t.facetsRefinements)})}(o,t),u=function(e,t){return t.disjunctiveFacets.reduce(function(e,t){return e.addDisjunctiveFacet(t)},e)}(c,t),l=function(e,t){var n=[].concat(e.ruleContexts).concat(t.ruleContexts).filter(
1Boolean).filter(function(e,t,n){return n.indexOf(e)===t});return n.length>0?e.setQueryParameters({ruleContexts:n}):e}(u,t),d=function(e,t){return t.facets.reduce(function(e,t){return e.addFacet(t)},e)}(l,t);return function(e,t){t.facets,t.disjunctiveFacets,t.facetsRefinements,t.facetsExcludes,t.disjunctiveFacetsRefinements,t.numericRefinements,t.tagRefinements,t.hierarchicalFacets,t.hierarchicalFacetsRefinements,t.ruleContexts;var n=(0,v._)(t,["facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements","ruleContexts"]);return e.setQueryParameters(n)}(d,t)})};function Fe(e){for(var t=e.getParent(),n=[e.getHelper().state];null!==t;)n=[t.getHelper().state].concat(n),t=t.getParent();return n}var Ee=xe({name:"index-widget"});function Te(e,t){var n=t.state,r=t.recommendState,i=t.isPageReset,a=t._uiState;n!==e.state&&(e.state=n,e.emit("change",{state:e.state,results:e.lastResults,isPageReset:i,_uiState:a})),r!==e.recommendState&&(e.recommendState=r)}function Ae(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.reduce(function(e,n){return te(n)?e:n.getWidgetUiState||n.getWidgetState?n.getWidgetUiState?n.getWidgetUiState(e,t):n.getWidgetState(e,t):e},n)}function je(e,t){var n=t.initialSearchParameters,r=(0,v._)(t,["initialSearchParameters"]);return e.reduce(function(e,t){return!t.getWidgetSearchParameters||te(t)?e:"search"===t.dependsOn&&t.getWidgetParameters?t.getWidgetParameters(e,r):t.getWidgetSearchParameters(e,r)},n)}function Ce(e,t){var n=t.initialRecommendParameters,r=(0,v._)(t,["initialRecommendParameters"]);return e.reduce(function(e,t){return!te(t)&&"recommend"===t.dependsOn&&t.getWidgetParameters?t.getWidgetParameters(e,r):e},n)}function Oe(e){var t=e.filter(te);0!==t.length&&t.forEach(function(e){var t=e.getHelper();Te(t,{state:t.state.resetPage(),recommendState:t.recommendState,isPageReset:!0}),Oe(e.getWidgets())})}function Ne(e){return e.filter(te).reduce(function(e,t){var n;return(n=e).concat.apply(n,[{indexId:t.getIndexId(),results:t.getResults(),helper:t.getHelper()}].concat((0,c._)(Ne(t.getWidgets()))))},[])}function He(e){return e.reduce(function(e,t){if(te(t)){if(t._isolated)return e;var n=He(t.getWidgets());return{hasSearchWidget:e.hasSearchWidget||n.hasSearchWidget,hasRecommendWidget:e.hasRecommendWidget||n.hasRecommendWidget}}return"recommend"===t.dependsOn?(0,a._)((0,i._)({},e),{hasRecommendWidget:!0}):"none"===t.dependsOn?e:(0,a._)((0,i._)({},e),{hasSearchWidget:!0})},{hasSearchWidget:!1,hasRecommendWidget:!1})}function ke(e){var t=He(e.mainIndex.getWidgets()),n=t.hasSearchWidget,r=t.hasRecommendWidget;e._hasSearchWidget=n,e._hasRecommendWidget=r}var We=function(e){var t;if(void 0===e||void 0===e.indexName&&!e.isolated&&!e.EXPERIMENTAL_isolated)throw new Error(Ee("The `indexName` option is required."));var n,r=e.indexName,o=void 0===r?"":r,l=e.indexId,d=void 0===l?o:l,h=e.isolated,f=void 0===h?null!==(t=e.EXPERIMENTAL_isolated)&&void 0!==t&&t:h,g=[],v={},y=null,_=null,S=null,R=null,w=null,b=function(){y&&ke(y)};return{$$type:"ais.index",$$widgetType:"ais.index",_isolated:f,getIndexName:function(){return o},getIndexId:function(){return d},getHelper:function(){return S},getResults:function(){return(null==R?void 0:R.lastResults)?(R.lastResults._state=S.state,R.lastResults):null},getResultsForWidget:function(e){return"recommend"!==e.dependsOn||te(e)||void 0===e.$$id?this.getResults():(null==S?void 0:S.lastRecommendResults)?S.lastRecommendResults[e.$$id]:null},getPreviousState:function(){return w},getScopedResults:function(){var e=this.getParent();return Ne(e?e.getWidgets():0===o.length?this.getWidgets():[this])},getParent:function(){return f?null:_},createURL:function(e){return"function"==typeof e?y._createURL((0,u._)({},d,e(v))):y._createURL((0,u._)({},d,Ae(g,{searchParameters:e,helper:S})))},scheduleLocalSearch:m(function(){f&&(null==S||S.search())}),getWidgets:function(){return g},addWidgets:function(e){var t=this;if(!Array.isArray(e))throw new Error(Ee("The `addWidgets` method expects an array of widgets."));var n=e.reduce(function(e,t){return e.concat(Array.isArray(t)?t:[t])},[]);if(n.some(function(e){return"function"!=typeof e.init&&"function"!=typeof e.render}))throw new Error(Ee("The widget definition expects a `render` and/or an `init` method."));
1return n.forEach(function(e){e.parent=t,te(e)||be(e)}),g=g.concat(n),b(),y&&Boolean(n.length)&&(Te(S,{state:je(g,{uiState:v,initialSearchParameters:S.state}),recommendState:Ce(g,{uiState:v,initialRecommendParameters:S.recommendState}),_uiState:v}),n.forEach(function(e){e.getRenderState&&ie({renderState:e.getRenderState(y.renderState[t.getIndexId()]||{},ne(y,t,y._initialUiState)),instantSearchInstance:y,parent:t})}),n.forEach(function(e){e.init&&e.init(ne(y,t,y._initialUiState))}),f?this.scheduleLocalSearch():y.scheduleSearch()),this},updateWidget:function(e,t){if("function"!=typeof e.dispose)throw new Error(Ee("The widget definition expects a `dispose` method."));if("function"!=typeof t.init&&"function"!=typeof t.render)throw new Error(Ee("The widget definition expects a `render` and/or an `init` method."));var n=v;e.parent=void 0,t.parent=this,te(t)||be(t);var r=g.slice(),i=r.indexOf(e);if(-1===i?r.push(t):r[i]=t,g=r,b(),!y)return this;var a=e.dispose({helper:S,state:S.state,recommendState:S.recommendState,parent:this}),o=(0,p._)(a,s.RecommendParameters)?a:S.recommendState,c=a&&!(0,p._)(a,s.RecommendParameters)?a:S.state,u=y.future.preserveSharedStateOnUnmount?new s.SearchParameters({index:this.getIndexName()}):c;v=Ae(g,{searchParameters:je(g,{uiState:n,initialSearchParameters:u}),helper:S});var l=je(g,{uiState:v,initialSearchParameters:u});(Te(S,{state:l,recommendState:Ce(g,{uiState:v,initialRecommendParameters:o}),_uiState:v}),t.getRenderState)&&ie({renderState:t.getRenderState(y.renderState[this.getIndexId()]||{},ne(y,this,y._initialUiState)),instantSearchInstance:y,parent:this});return t.init&&t.init(ne(y,this,y._initialUiState)),f?this.scheduleLocalSearch():y.scheduleSearch(),this},removeWidgets:function(e){var t=this;if(!Array.isArray(e))throw new Error(Ee("The `removeWidgets` method expects an array of widgets."));var n=e.reduce(function(e,t){return e.concat(Array.isArray(t)?t:[t])},[]);if(n.some(function(e){return"function"!=typeof e.dispose}))throw new Error(Ee("The widget definition expects a `dispose` method."));if(g=g.filter(function(e){return-1===n.indexOf(e)}),n.forEach(function(e){e.parent=void 0}),b(),y&&Boolean(n.length)){var r=n.reduce(function(e,n){var r=n.dispose({helper:S,state:e.cleanedSearchState,recommendState:e.cleanedRecommendState,parent:t});return(0,p._)(r,s.RecommendParameters)?e.cleanedRecommendState=r:r&&(e.cleanedSearchState=r),e},{cleanedSearchState:S.state,cleanedRecommendState:S.recommendState}),i=r.cleanedSearchState,a=r.cleanedRecommendState,o=y.future.preserveSharedStateOnUnmount?je(g,{uiState:v,initialSearchParameters:new s.SearchParameters({index:this.getIndexName()})}):je(g,{uiState:Ae(g,{searchParameters:i,helper:S}),initialSearchParameters:i});v=Ae(g,{searchParameters:o,helper:S}),S.setState(o),S.recommendState=a,g.length&&(f?this.scheduleLocalSearch():y.scheduleSearch())}return this},init:function(e){var t,n=this,r=e.instantSearchInstance,u=e.parent,l=e.uiState;if(null===S){y=r,_=u,v=l[d]||{};var h=r.mainHelper,m=je(g,{uiState:v,initialSearchParameters:new s.SearchParameters({index:o})}),p=Ce(g,{uiState:v,initialRecommendParameters:new s.RecommendParameters});(S=s(h.getClient(),m.index,m)).recommendState=p,S.search=function(){return f?(r.status="loading",n.render({instantSearchInstance:r}),r.compositionID?S.searchWithComposition():S.searchOnlyWithDerivedHelpers()):r.onStateChange?(r.onStateChange({uiState:r.mainIndex.getWidgetUiState({}),setUiState:function(e){return r.setUiState(e,!1)}}),h):h.search()},S.searchWithoutTriggeringOnStateChange=function(){return h.search()},S.searchForFacetValues=function(e,t,r,i){var a=Ie.apply(void 0,[h.state].concat((0,c._)(Fe(n)))).setQueryParameters(i);return h.searchForFacetValues(e,t,r,a)};var x=o?S:s({},"__empty_index__",{}),P=f?x:function(e,t){for(;e;){if(e._isolated)return e.getHelper();e=e.getParent()}return t}(u,h);R=P.derive(function(){return Ie.apply(void 0,[h.state].concat((0,c._)(Fe(n))))},function(){return function(e,t){var n=t.userToken,r=t.clickAnalytics;if(void 0===n&&void 0===r)return e;var o=(0,i._)({},void 0===r?{}:{clickAnalytics:r},void 0===n?{}:{userToken:n});return new s.RecommendParameters({params:e.params.map(function(e){var t=e.queryParameters,n=e.fallbackParameters;return(0,i._)((0,a._)((0,i._)({},e),{queryParameters:(0,i._)({},o,t)}),n&&{fallbackParameters:(0,i._)({},o,n)})})})}(n.getHelper().recommendState,h.state)});var I=null===(t=r._initialResults)||void 0===t?void 0:t[this.getIndexId()];if(null==I?void 0:I.results){var F=new s.SearchResults(new s.SearchParameters(I.state),I.results);R.lastResults=F,S.lastResults=F}if(null==I?void 0:I.recommendResults){var E=new s.RecommendResults(new s.RecommendParameters({params:I.recommendResults.params}),I.recommendResults.results);R.lastRecommendResults=E,S.lastRecommendResults=E}S.on("change",function(e){e.isPageReset&&Oe(g)}),R.on("search",function(){r.scheduleStalledRender()}),R.on("result",function(e){var t=e.results;r.scheduleRender(),S.lastResults=t,w=null==t?void 0:t._state}),R.on("recommend:result",function(e){var t=e.recommend;r.scheduleRender(),S.lastRecommendResults=t.results}
1),g.forEach(function(e){e.getRenderState&&ie({renderState:e.getRenderState(r.renderState[n.getIndexId()]||{},ne(r,n,l)),instantSearchInstance:r,parent:n})}),g.forEach(function(e){e.init&&e.init(ne(r,n,l))}),S.on("change",function(e){var t=e.state,n=e._uiState;v=Ae(g,{searchParameters:t,helper:S},n||{}),r.onStateChange||r.onInternalStateChange()}),I&&r.scheduleRender(),b()}},render:function(e){var t=this,r=e.instantSearchInstance;"error"!==r.status?n=void 0:r.error!==n&&!r.mainHelper.hasPendingRequests()&&w&&(n=r.error,S.setState(w));var i=this.getResults()||(null==R?void 0:R.lastRecommendResults)||f&&!o?g:g.filter(function(e){return e.shouldRender});(i=i.filter(function(e){return!e.shouldRender||e.shouldRender({instantSearchInstance:r})})).forEach(function(e){e.getRenderState&&ie({renderState:e.getRenderState(r.renderState[t.getIndexId()]||{},re(r,t,e)),instantSearchInstance:r,parent:t})}),i.forEach(function(e){e.render&&e.render(re(r,t,e))})},dispose:function(){var e=this;g.forEach(function(t){t.dispose&&S&&t.dispose({helper:S,state:S.state,recommendState:S.recommendState,parent:e})}),y=null,_=null,null==S||S.removeAllListeners(),S=null,null==R||R.detach(),R=null},getWidgetUiState:function(e){return g.filter(te).filter(function(e){return!e._isolated}).reduce(function(e,t){return t.getWidgetUiState(e)},(0,a._)((0,i._)({},e),(0,u._)({},d,(0,i._)({},e[d],v))))},getWidgetState:function(e){return this.getWidgetUiState(e)},getWidgetSearchParameters:function(e,t){var n=t.uiState;return je(g,{uiState:n,initialSearchParameters:e})},shouldRender:function(){return!0},refreshUiState:function(){v=Ae(g,{searchParameters:this.getHelper().state,helper:this.getHelper()},v)},setIndexUiState:function(e){var t="function"==typeof e?e(v):e;y.setUiState(function(e){return(0,a._)((0,i._)({},e),(0,u._)({},d,t))})}}};function De(e){var t=e.numberLocale;return{formatNumber:function(e,n){return function(e,t){return e.toLocaleString(t)}(Number(n(e)),t)},highlight:function(e,t){try{var n=JSON.parse(e);return t(_((0,a._)((0,i._)({},n),{hit:this})))}catch(e){throw new Error('\nThe highlight helper expects a JSON object of the format:\n{ "attribute": "name", "highlightedTagName": "mark" }')}},reverseHighlight:function(e,t){try{var n=JSON.parse(e);return t(T((0,a._)((0,i._)({},n),{hit:this})))}catch(e){throw new Error('\n The reverseHighlight helper expects a JSON object of the format:\n { "attribute": "name", "highlightedTagName": "mark" }')}},snippet:function(e,t){try{var n=JSON.parse(e);return t(j((0,a._)((0,i._)({},n),{hit:this})))}catch(e){throw new Error('\nThe snippet helper expects a JSON object of the format:\n{ "attribute": "name", "highlightedTagName": "mark" }')}},reverseSnippet:function(e,t){try{var n=JSON.parse(e);return t(O((0,a._)((0,i._)({},n),{hit:this})))}catch(e){throw new Error('\n The reverseSnippet helper expects a JSON object of the format:\n { "attribute": "name", "highlightedTagName": "mark" }')}},insights:function(e,t){try{var n=JSON.parse(e),r=n.method,a=n.payload;return t(L(r,(0,i._)({objectIDs:[this.objectID]},a)))}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 Le(e,t){var n=e[t.getIndexId()]||{};t.getHelper().setState(t.getWidgetSearchParameters(t.getHelper().state,{uiState:n})),t.getWidgets().filter(te).forEach(function(t){return Le(e,t)})}function Ue(e){var t;return(null===(t=e.compositionFeedsResults)||void 0===t?void 0:t.length)?e.compositionFeedsResults:e.results||[]}function qe(e){return Object.keys(e).map(function(t){return function(e){for(var t=arguments.length,n=new Array(t>1?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",t,(n=e[t],"[object Object]"===Object.prototype.toString.call(n)||"[object Array]"===Object.prototype.toString.call(n)?JSON.stringify(e[t]):e[t]));var n}).join("&")}var Qe=xe({name:"instantsearch"});function $e(){return"#"}var Ve={preserveSharedStateOnUnmount:!1,persistHierarchicalRootCount:!1},Me=function(e){function t(e){var n;(0,B._)(this,t),n=(0,M._)(this,t),(0,u._)(n,"client",void 0),(0,u._)(n,"indexName",void 0),(0,u._)(n,"compositionID",void 0),(0,u._)(n,"insightsClient",void 0),(0,u._)(n,"onStateChange",null),(0,u._)(n,"future",void 0),(0,u._)(n,"helper",void 0),(0,u._)(n,"mainHelper",void 0),(0,u._)(n,"mainIndex",void 0),(0,u._)(n,"started",void 0),(0,u._)(n,"templatesConfig",void 0),(0,u._)(n,"renderState",{}),(0,u._)(n,"_stalledSearchDelay",void 0),(0,u._)(n,"_searchStalledTimer",void 0),(0,u._)(n,"_initialUiState",void 0),(0,u._)(n,"_initialResults",void 0),(0,u._)(n,"_manuallyResetScheduleSearch",!1),(0,u._)(n,"_resetScheduleSearch",void 0),(0,u._)(n,"_createURL",void 0),(0,u._)(n,"_searchFunction",void 0),(0,u._)(n,"_mainHelperSearch",void 0),(0,u._)(n,"_hasSearchWidget",!1),(0,u._)(n,"_hasRecommendWidget",!1),(0,u._)(n,"_insights",void 0),(0,u._)(n,"_initialOptions",void 0),(0,u._)(n,"middleware",[]),(0,u._)(n,"sendEventToInsights",void 0),(0,u._)(n,"_createdAt",oe()),(0,u._)(n,"status","idle"),(0,u._)(n,"error",void 0),(0,u._)(n,"scheduleSearch",m(function(){n.started&&n.mainHelper.search()})),(0,u._)(n,"scheduleRender",m(function(){var e,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];(null===(e=n.mainHelper)||void 0===e?void 0:e.hasPendingRequests())||(clearTimeout(n._searchStalledTimer),n._searchStalledTimer=null,t&&(n.status="idle",n.error=void 0)),n.mainIndex.render({instantSearchInstance:n}),n.emit("render")},function(e,t){var n=(0,o._)(e,1)[0],r=void 0===n||n,i=(0,o._)(t,1)[0];return[r||(void 0===i||i)]})),(0,u._)(n,"onInternalStateChange",m(function(){var e=n.mainIndex.getWidgetUiState({});n.middleware.forEach(function(t){t.instance.onStateChange({uiState:e})})})),n.setMaxListeners(100);var r=e.indexName,a=void 0===r?"":r,s=e.compositionID,c=e.numberLocale,l=e.initialUiState,d=void 0===l?{}:l,h=e.routing,f=void 0===h?null:h,p=e.insights,g=void 0===p?void 0:p,v=e.searchFunction,y=e.stalledSearchDelay,_=void 0===y?200:y,S=e.searchClient,R=void 0===S?null:S,w=e.insightsClient,b=void 0===w?null:w,x=e.onStateChange,P=void 0===x?null:x,I=e.future,F=void 0===I?(0,i._)({},Ve,e.future||{}):I;if(null===R)throw new Error(Qe("The `searchClient` option is required."));if("function"!=typeof R.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 R.addAlgoliaAgent&&R.addAlgoliaAgent("instantsearch.js (".concat(ce,")")),b&&"function"!=typeof b)throw new Error(Qe("The `insightsClient` option should be a function."));if(n._initialOptions=e,n.client=R,n.future=F,n.insightsClient=b,n.indexName=a,n.compositionID=s,n.helper=null,n.mainHelper=null,n.mainIndex=We({indexName:n.compositionID||n.indexName}),n.onStateChange=P,n.started=!1,n.templatesConfig={helpers:De({numberLocale:c}
1),compileOptions:{}},n._stalledSearchDelay=_,n._searchStalledTimer=null,n._createURL=$e,n._initialUiState=d,n._initialResults=null,n._insights=g,v&&(n._searchFunction=v),n.sendEventToInsights=z,f){var E="boolean"==typeof f?{}:f;E.$$internal=!0,n.use(Re(E))}if(g){var T="boolean"==typeof g?{}:g;T.$$internal=!0,n.use(he(T))}return $(function(e){var t,n;return(null===(n=e.window.navigator)||void 0===n||null===(t=n.userAgent)||void 0===t?void 0:t.indexOf("Algolia Crawler"))>-1},{fallback:function(){return!1}})&&n.use(ge({$$internal:!0})),n}return(0,X._)(t,e),(0,K._)(t,[{key:"_isSearchStalled",get:function(){return"stalled"===this.status}},{key:"use",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n.map(function(t){var n=(0,i._)({$$type:"__unknown__",$$internal:!1,subscribe:z,started:z,unsubscribe:z,onStateChange:z},t({instantSearchInstance:e}));return e.middleware.push({creator:t,instance:n}),n});return this.started&&a.forEach(function(e){e.subscribe(),e.started()}),this}},{key:"unuse",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];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(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.use.apply(this,(0,c._)(t))}},{key:"addWidget",value:function(e){return this.addWidgets([e])}},{key:"addWidgets",value:function(e){if(!Array.isArray(e))throw new Error(Qe("The `addWidgets` method expects an array of widgets. Please use `addWidget`."));if(this.compositionID&&e.some(function(e){return!Array.isArray(e)&&te(e)&&!e._isolated}))throw new Error(Qe("The `index` widget cannot be used with a composition-based InstantSearch implementation."));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(Qe("The `removeWidgets` method expects an array of widgets. Please use `removeWidget`."));return this.mainIndex.removeWidgets(e),this}},{key:"start",value:function(){var e=this;if(this.started)throw new Error(Qe("The `start` method has already been called once."));var t,n,r,l=this.mainHelper||s(this.client,this.indexName,void 0,{persistHierarchicalRootCount:this.future.persistHierarchicalRootCount});if(this.compositionID&&(l.searchForFacetValues=l.searchForCompositionFacetValues.bind(l)),l.search=function(){var t=e._hasSearchWidget||e._hasRecommendWidget;return t&&(e.status="loading"),e.scheduleRender(!t),e._hasSearchWidget&&(e.compositionID?l.searchWithComposition():l.searchOnlyWithDerivedHelpers()),e._hasRecommendWidget&&l.recommend(),l},this._searchFunction){var d={search:function(){return new Promise(z)}};this._mainHelperSearch=l.search.bind(l),l.search=function(){var t=e.mainIndex.getHelper(),n=s(d,t.state.index,t.state);return n.once("search",function(n){var r=n.state;t.overrideStateWithoutTriggeringChangeEvent(r),e._mainHelperSearch()}),n.on("change",function(e){var n=e.state;t.setState(n)}),e._searchFunction(n),l}}if(l.on("error",function(t){var n=t.error;if(!(0,p._)(n,Error)){var r=n;n=Object.keys(r).reduce(function(e,t){return e[t]=r[t],e},new Error(r.message))}n.error=n,e.error=n,e.status="error",e.scheduleRender(!e._hasSearchWidget&&!e._hasRecommendWidget),e.emit("error",n)}),this.mainHelper=l,this.middleware.forEach(function(e){e.instance.subscribe()}),this.mainIndex.init({instantSearchInstance:this,parent:null,uiState:this._initialUiState}),this._initialResults){!function(e,t){if(t&&("transporter"in e&&!e._cacheHydrated||e._useCache&&"function"==typeof e.addAlgoliaAgent)){var n=[Object.keys(t).reduce(function(e,n){var r=t[n],a=r.state,s=r.requestParams,c=Ue(r),u=c&&a?c.map(function(e,t){return(0,i._)({indexName:a.index||e.index},(null==s?void 0:s[t])||e.params?{params:qe((null==s?void 0:s[t])||(n=e.params,n.split("&").reduce(function(e,t){var n=(0,o._)(t.split("="),2),r=n[0],i=n[1];
1return e[r]=i?decodeURIComponent(i):"",e},{})))}:{});var n}):[];return e.concat(u)},[])],r=Object.keys(t).reduce(function(e,n){var r=Ue(t[n]);return r?e.concat(r):e},[]);if("transporter"in e&&!e._cacheHydrated){e._cacheHydrated=!0;var s=e.search.bind(e);e.search=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var u=Array.isArray(t)?t.map(function(e){return(0,a._)((0,i._)({},e),{params:qe(e.params)})}):qe(t.requestBody.params);return e.transporter.responsesCache.get({method:"search",args:[u].concat((0,c._)(r))},function(){return s.apply(void 0,[t].concat((0,c._)(r)))})},e.transporter.responsesCache.set({method:"search",args:n},{results:r})}if(!("transporter"in e)){var l="/1/indexes/*/queries_body_".concat(JSON.stringify({requests:n}));e.cache=(0,a._)((0,i._)({},e.cache),(0,u._)({},l,JSON.stringify({results:Object.keys(t).map(function(e){return Ue(t[e])})})))}}}(this.client,this._initialResults),t=this.mainHelper,n=this._initialResults,r=Object.keys(n).reduce(function(e,t){var r=n[t];return r.recommendResults?(0,i._)({},e,r.recommendResults.results):e},{}),t._recommendCache=r;var h=this.scheduleSearch;this.scheduleSearch=m(z),this._manuallyResetScheduleSearch?this._resetScheduleSearch=function(){e.scheduleSearch=h}:m(function(){e.scheduleSearch=h})()}else this.mainIndex.getWidgets().length>0&&this.scheduleSearch();this.helper=this.mainIndex.getHelper(),this.started=!0,this.middleware.forEach(function(e){e.instance.started()}),void 0===this._insights&&l.derivedHelpers[0].once("result",function(){e.mainIndex.getScopedResults().some(function(e){var t=e.results;return null==t?void 0:t._automaticInsights})&&e.use(he({$$internal:!0,$$automatic:!0}))})}},{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)||void 0===e||e.removeAllListeners(),this.mainHelper=null,this.helper=null,this.middleware.forEach(function(e){e.instance.unsubscribe()}),this._initialOptions=null}},{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,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!this.mainHelper)throw new Error(Qe("The `start` method needs to be called before `setUiState`."));this.mainIndex.refreshUiState();var r="function"==typeof e?e(this.mainIndex.getWidgetUiState({})):e;this.onStateChange&&n?this.onStateChange({uiState:r,setUiState:function(e){Le("function"==typeof e?e(r):e,t.mainIndex),t.scheduleSearch(),t.onInternalStateChange()}}):(Le(r,this.mainIndex),this.scheduleSearch(),this.onInternalStateChange())}},{key:"getUiState",value:function(){return this.started&&this.mainIndex.refreshUiState(),this.mainIndex.getWidgetUiState({})}},{key:"createURL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.started)throw new Error(Qe("The `start` method needs to be called before `createURL`."));return this._createURL(e)}},{key:"refresh",value:function(){if(!this.mainHelper)throw new Error(Qe("The `start` method needs to be called before `refresh`."));this.mainHelper.clearCache().search()}}]),t}(J),Be=function(e,t){return e},Ke=function(e){return new Me(e)};Ke.version=ce,Ke.createInfiniteHitsSessionStorageCache=Be(function(){var e=["ais.infiniteHits",(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).key].filter(Boolean).join(":");return{read:function(t){var n=t.state,r=$(function(e){return e.window.sessionStorage});if(!r)return null;try{var i=JSON.parse(r.getItem(e));return i&&Q(i.state,V(n))?i.hits:null}catch(t){if((0,p._)(t,SyntaxError))try{r.removeItem(e)}catch(e){}return null}},write:function(t){var n=t.state,r=t.hits,i=$(function(e){return e.window.sessionStorage});if(i)try{i.setItem(e,JSON.stringify({state:V(n),hits:r}))}catch(e){}}}}),Ke.highlight=Be(_),Ke.reverseHighlight=Be(T),Ke.snippet=Be(j),Ke.reverseSnippet=Be(O),Ke.insights=L,Ke.getInsightsAnonymousUserToken=function(){return U()},Object.defineProperty(Ke,"widgets",{get:function(){throw new ReferenceError("\"instantsearch.widgets\" are not available from the ES build.\n\nTo import the widgets:\n\nimport { searchBox } from 'instantsearch.js/es/widgets'")}}),Object.defineProperty(Ke,"connectors",{get:function(){throw new ReferenceError("\"instantsearch.connectors\" are not available from the ES build.\n\nTo import the connectors:\n\nimport { connectSearchBox } from 'instantsearch.js/es/connectors'")}}),Object.defineProperty(Ke,"templates",{get:function(){throw new ReferenceError("\"instantsearch.templates\" are not available from the ES build.\n\nTo import the templates:\n\nimport { carousel } from 'instantsearch.js/es/templates'")}})},88426:function(e,t,n){"use strict";n(30494),n(99407),n(50467),n(53750),n(71893),n(55456),n(38001),n(65631),n(89098),n(53453),n(6865),n(10021
1),n(38452)},6865:function(){"use strict"},10021:function(){"use strict"},38452:function(e,t,n){"use strict";var r=n(7192),i=n(30494),a=(n(99407),n(50467),n(20884));n(61642);(0,n(73981)._)(Error)},77306:function(e,t,n){"use strict";n(7192),n(30494),n(99407),n(50467),n(20884),n(71893),n(55456),n(38001),n(89098),n(56199),n(88426)},49550:function(e,t,n){"use strict";n(77306),n(57798),n(88426)},57798:function(e,t,n){"use strict";n.d(t,{J:function(){return i},m:function(){return a}});var r=n(71893);function i(e){var t,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=i.message,o=i.referer,c=i.turnContext;if(!e)return!1;var u=null!==(t=null==s?void 0:s.trim())&&void 0!==t?t:"";if(!u){var l;if(e.focusInput)e.focusInput();else null===(l=e.setOpen)||void 0===l||l.call(e,!0);return!1}return null===(n=e.setOpen)||void 0===n||n.call(e,!0),!(a(e)||!e.sendMessage)&&(e.sendMessage((0,r._)({text:u},c?{metadata:{turnContext:c}}:{}),o?{headers:{"x-algolia-referer":o}}:void 0),!0)}function a(e){return"submitted"===(null==e?void 0:e.status)||"streaming"===(null==e?void 0:e.status)}},65314:function(e,t,n){"use strict";n.d(t,{A:function(){return d}});var r=n(71893),i=n(55456),a=n(65631),s=n(74243),o=n(67438),c=n(94176),u=function(e){var t=e.method,n=e.results,r=e.hits,i=e.objectIDs,a=n.index,s=function(e,t){return t.map(function(t){var n=(0,o.I)(e,function(e){return e.objectID===t});if(void 0===n)throw new Error('Could not find objectID "'.concat(t,'" passed to `clickedObjectIDsAfterSearch` in the returned hits. This is necessary to infer the absolute position and the query ID.'));return n})}(r,i),u=function(e){var t=(0,c.s)(e.map(function(e){return e.__queryID}));if(t.length>1)throw new Error("Insights currently allows a single `queryID`. The `objectIDs` provided map to multiple `queryID`s.");var n=t[0];if("string"!=typeof n)throw new Error("Could not infer `queryID`. Ensure InstantSearch `clickAnalytics: true` was added with the Configure widget.\n\nSee: https://alg.li/lNiZZ7");return n}(s);switch(t){case"clickedObjectIDsAfterSearch":var l=function(e){return e.map(function(e){return e.__position})}(s);return{index:a,queryID:u,objectIDs:i,positions:l};case"convertedObjectIDsAfterSearch":return{index:a,queryID:u,objectIDs:i};default:throw new Error('Unsupported method passed to insights: "'.concat(t,'".'))}},l=function(e,t,n){return function(i){for(var o=arguments.length,c=new Array(o>1?o-1:0),l=1;l<o;l++)c[l-1]=arguments[l];var d=(0,a._)(c,1)[0];if(!e){var h=(0,s.V)({name:"instantsearch"});throw new Error(h("The `insightsClient` option has not been provided to `instantsearch`."))}if(!Array.isArray(d.objectIDs))throw new TypeError("Expected `objectIDs` to be an array.");var f=u({method:i,results:t,hits:n,objectIDs:d.objectIDs});e(i,(0,r._)({},f,d))}};function d(e){return function(t,n){return e(function(e,n){var a=e.results,s=e.hits,o=e.instantSearchInstance;if(a&&s&&o){var c=l(o.insightsClient,a,s);return t((0,i._)((0,r._)({},e),{insights:c}),n)}return t(e,n)},n)}}},21262:function(e,t,n){"use strict";n.d(t,{A:function(){return l}});var r=n(30494),i=n(99407),a=n(50467),s=n(55373),o=n(56199),c=function(e){e&&(window.document.title=e)},u=187==n.j?function(){function e(t){var n=this,i=t.windowTitle,s=t.writeDelay,u=void 0===s?400:s,l=t.createURL,d=t.parseURL,h=t.getLocation,f=t.start,m=t.dispose,p=t.push,g=t.cleanUrlOnDispose;(0,r._)(this,e),(0,a._)(this,"$$type","ais.browser"),(0,a._)(this,"windowTitle",void 0),(0,a._)(this,"writeDelay",void 0),(0,a._)(this,"_createURL",void 0),(0,a._)(this,"parseURL",void 0),(0,a._)(this,"getLocation",void 0),(0,a._)(this,"writeTimer",void 0),(0,a._)(this,"_onPopState",void 0),(0,a._)(this,"inPopState",!1),(0,a._)(this,"isDisposed",!1),(0,a._)(this,"latestAcknowledgedHistory",0),(0,a._)(this,"_start",void 0),(0,a._)(this,"_dispose",void 0),(0,a._)(this,"_push",void 0),(0,a._)(this,"_cleanUrlOnDispose",void 0),this.windowTitle=i,this.writeTimer=void 0,this.writeDelay=u,this._createURL=l,this.parseURL=d,this.getLocation=h,this._start=f,this._dispose=m,this._push=p,this._cleanUrlOnDispose=void 0===g||g,(0,o.x)(function(e){var t=e.window,r=n.windowTitle&&n.windowTitle(n.read());c(r),n.latestAcknowledgedHistory=t.history.length})}return(0,i._)(e,[{key:"read",value:function(){return this.parseURL({qsModule:s,location:this.getLocation()})}},{key:"write",value:function(e){var t=this;(0,o.x)(function(n){var r=n.window,i=t.createURL(e),a=t.windowTitle&&t.windowTitle(e);t.writeTimer&&clearTimeout(t.writeTimer),t.writeTimer=setTimeout(function(){c(a),t.shouldWrite(i)&&(t._push?t._push(i):r.history.pushState(e,a||"",i),t.latestAcknowledgedHistory=r.history.length),t.inPopState=!1,t.writeTimer=void 0},t.writeDelay)})}}
1,{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())},(0,o.x)(function(e){e.window.addEventListener("popstate",t._onPopState)})}},{key:"createURL",value:function(e){return this._createURL({qsModule:s,routeState:e,location:this.getLocation()})}},{key:"dispose",value:function(){var e=this;this._dispose&&this._dispose(),this.isDisposed=!0,(0,o.x)(function(t){var n=t.window;e._onPopState&&n.removeEventListener("popstate",e._onPopState)}),this.writeTimer&&clearTimeout(this.writeTimer),this._cleanUrlOnDispose&&this.write({})}},{key:"start",value:function(){this.isDisposed=!1}},{key:"shouldWrite",value:function(e){var t=this;return(0,o.x)(function(n){var r=n.window;if(t.isDisposed&&!t._cleanUrlOnDispose)return!1;var i=!(t.isDisposed&&t.latestAcknowledgedHistory!==r.history.length);return!t.inPopState&&i&&e!==r.location.href})}}]),e}():null;function l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.createURL,n=void 0===t?function(e){var t=e.qsModule,n=e.routeState,r=e.location,i=r.protocol,a=r.hostname,s=r.port,o=void 0===s?"":s,c=r.pathname,u=r.hash,l=t.stringify(n),d=""===o?"":":".concat(o);return l?"".concat(i,"//").concat(a).concat(d).concat(c,"?").concat(l).concat(u):"".concat(i,"//").concat(a).concat(d).concat(c).concat(u)}:t,r=e.parseURL,i=void 0===r?function(e){var t=e.qsModule,n=e.location;return t.parse(n.search.slice(1),{arrayLimit:99})}:r,a=e.writeDelay,s=void 0===a?400:a,c=e.windowTitle,l=e.getLocation,d=void 0===l?function(){return(0,o.x)(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.")}})}:l,h=e.start,f=e.dispose,m=e.push,p=e.cleanUrlOnDispose;return new u({createURL:n,parseURL:i,writeDelay:s,windowTitle:c,getLocation:d,start:h,dispose:f,push:m,cleanUrlOnDispose:p})}},69734:function(e,t,n){"use strict";n.d(t,{s:function(){return r}});var r=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.descendantName,r=t.modifierName,i=n?"-".concat(n):"",a=r?"--".concat(r):"";return"".concat("ais","-").concat(e).concat(i).concat(a)}}},40069:function(e,t,n){"use strict";n.d(t,{t:function(){return i}});var r=n(9886);function i(e,t){if(void 0===e||"function"!=typeof e)throw new Error("The render function is not valid (received type ".concat((0,r.K)(e),").\n\n").concat(t))}},87520:function(e,t,n){"use strict";function r(e){var t=e.helper,n=e.attributesToClear,r=void 0===n?[]:n,i=t.state.setPage(0);return i=r.reduce(function(e,t){return i.isNumericRefined(t)?e.removeNumericRefinement(t):i.isHierarchicalFacet(t)?e.removeHierarchicalFacetRefinement(t):i.isDisjunctiveFacet(t)?e.removeDisjunctiveFacetRefinement(t):i.isConjunctiveFacet(t)?e.removeFacetRefinement(t):e},i),-1!==r.indexOf("query")&&(i=i.setQuery("")),i}n.d(t,{A:function(){return r}})},59066:function(e,t,n){"use strict";n.d(t,{D:function(){return s}});var r=n(71893),i=n(65631),a=n(61642);function s(e){var t=e.instantSearchInstance,n=e.helper,s=e.attribute,o=e.widgetType;return function(){for(var e=arguments.length,c=new Array(e),u=0;u<e;u++)c[u]=arguments[u];var l=(0,i._)(c,4),d=l[1],h=l[2],f=void 0===h?"Filter Applied":h,m=l[3],p=void 0===m?{}:m,g=(0,i._)(c[0].split(":"),2),v=g[0],y=g[1],_="string"==typeof s?s:s(d);if(1===c.length&&"object"===(0,a._)(c[0]))t.sendEventToInsights(c[0]);else if("click"===v&&c.length>=2&&c.length<=4){var S;if(!function(e,t,n){return e.state.isHierarchicalFacet(t)?e.state.isHierarchicalFacetRefined(t,n):e.state.isConjunctiveFacet(t)?e.state.isFacetRefined(t,n):e.state.isDisjunctiveFacetRefined(t,n)}(n,_,d))t.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:o,eventType:v,eventModifier:y,payload:(0,r._)({eventName:f,index:(null===(S=n.lastResults)||void 0===S?void 0:S.index)||n.state.index,filters:["".concat(_,":").concat(d)]},p),attribute:_})}}}},1230:function(e,t,n){"use strict";n.d(t,{U0:function(){return c}
1,Zp:function(){return u}});var r=n(71893),i=n(65631),a=n(61642),s=n(10793);function o(e){var t=e.helper,n=e.widgetType;e.methodName;var s=e.args,o=e.instantSearchInstance;if(1===s.length&&"object"===(0,a._)(s[0]))return[s[0]];var c=(0,i._)(s[0].split(":"),2),u=c[0],l=c[1],d=s[1],h=s[2],f=s[3]||{};if(!d)return[];if(("click"===u||"conversion"===u)&&!h)return[];var m=Array.isArray(d)?d:[d];if(0===m.length)return[];var p=m[0].__queryID,g=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,n=[],r=0;r<Math.ceil(e.length/t);r++)n.push(e.slice(r*t,(r+1)*t));return n}(m),v=g.map(function(e){return e.map(function(e){return e.objectID})}),y=g.map(function(e){return e.map(function(e){return e.__position})});return"view"===u?"idle"!==o.status?[]:g.map(function(e,i){var a;return{insightsMethod:"viewedObjectIDs",widgetType:n,eventType:u,payload:(0,r._)({eventName:h||"Hits Viewed",index:(null===(a=t.lastResults)||void 0===a?void 0:a.index)||t.state.index,objectIDs:v[i]},f),hits:e,eventModifier:l}}):"click"===u?g.map(function(e,i){var a;return{insightsMethod:"clickedObjectIDsAfterSearch",widgetType:n,eventType:u,payload:(0,r._)({eventName:h||"Hit Clicked",index:(null===(a=t.lastResults)||void 0===a?void 0:a.index)||t.state.index,queryID:p,objectIDs:v[i],positions:y[i]},f),hits:e,eventModifier:l}}):"conversion"===u?g.map(function(e,i){var a;return{insightsMethod:"convertedObjectIDsAfterSearch",widgetType:n,eventType:u,payload:(0,r._)({eventName:h||"Hit Converted",index:(null===(a=t.lastResults)||void 0===a?void 0:a.index)||t.state.index,queryID:p,objectIDs:v[i]},f),hits:e,eventModifier:l}}):[]}function c(e){var t=e.instantSearchInstance,n=e.helper,r=e.widgetType,i={},a=void 0;return function(){for(var e=arguments.length,s=new Array(e),c=0;c<e;c++)s[c]=arguments[c];o({widgetType:r,helper:n,methodName:"sendEvent",args:s,instantSearchInstance:t}).forEach(function(e){"click"===e.eventType&&"internal"===e.eventModifier&&i[e.eventType]||(i[e.eventType]=!0,t.sendEventToInsights(e))}),clearTimeout(a),a=setTimeout(function(){i={}},0)}}function u(e){var t=e.helper,n=e.widgetType,r=e.instantSearchInstance;return function(){for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];var c=o({widgetType:n,helper:t,methodName:"bindEvent",args:i,instantSearchInstance:r});return c.length?"data-insights-event=".concat((0,s.h)(c)):""}}},75373:function(e,t,n){"use strict";n.d(t,{v:function(){return a}});var r=n(89098),i=Promise.resolve();function a(e,t){var n=null,a=!1,s=null,o=function(){for(var o=arguments.length,c=new Array(o),u=0;u<o;u++)c[u]=arguments[u];null===n?(s=c,n=i.then(function(){n=null;var t=s;s=null,a?a=!1:e.apply(void 0,(0,r._)(t))})):t&&null!==s&&(s=t(s,c))};return o.wait=function(){if(null===n)throw new Error("The deferred function should be called before calling `wait()`");return n},o.cancel=function(){null!==n&&(a=!0)},o}},74243:function(e,t,n){"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.map(function(e){return n=(t=e).name,r=t.connector,["https://www.algolia.com/doc/api-reference/widgets/",n,"/js/",void 0!==r&&r?"#connector":""].join("");var t,n,r}).join(", ");return function(e){return[e,"See documentation: ".concat(r)].filter(Boolean).join("\n\n")}}n.d(t,{V:function(){return r}})},92783:function(e,t,n){"use strict";n.d(t,{FU:function(){return l},S8:function(){return m},ef:function(){return p},sn:function(){return d}});var r=n(50467),i=n(50595),a=n(70561),s=n(71893),o=n(55456),c=n(18454),u=n(31810),l={highlightPreTag:"__ais-highlight__",highlightPostTag:"__/ais-highlight__"},d={highlightPreTag:"<mark>",highlightPostTag:"</mark>"};function h(e){return(0,c.i)(e).replace(new RegExp(l.highlightPreTag,"g"),d.highlightPreTag).replace(new RegExp(l.highlightPostTag,"g"),d.highlightPostTag)}function f(e){return(0,u.Q)(e)&&"string"!=typeof e.value?Object.keys(e).reduce(function(t,n){return(0,o._)((0,s._)({},t),(0,r._)({},n,f(e[n])))},{}):Array.isArray(e)?e.map(f):(0,o._)((0,s._)({},e),{value:h(e.value)})}function m(e){return void 0===e.__escaped&&((e=e.map(function(e){(0,a._)(e);var t=(0,i._)({},e);return t._highlightResult&&(t._highlightResult=f(t._highlightResult)),t._snippetResult&&(t._snippetResult=f(t._snippetResult)),t})).__escaped=!0),e}function p(e){return e.map(function(e){return(0,o._)((0,s._)({},e),{highlighted:h(e.highlighted)})})}},18454:function(e,t,n){"use strict";n.d(t,{i:function(){return s},x:function(){return l}});var r={"&":"&","<":"<",">":">",'"':""","'":"'"},i=/[&<>"']/g,a=RegExp(i.source);function s(e){return e&&a.test(e)?e.replace(i,function(e){return r[e]}):e}var o={"&":"&","<":"<",">":">",""":'"',"'":"'"},c=/&(amp|quot|lt|gt|#39);/g,u=RegExp(c.source);function l(e){return e&&u.test(e)?e.replace(c,function(e){return o[e]}):e}},29850:function(e,t,n){"use strict";function r(e){return"string"==typeof e?e.replace(/^\\-/,"-"):e}function i(e){return"number"==typeof e&&e<0||"string"==typeof e?String(e).replace(/^-/,"\\-"):e}n.d(t,{A:function(){return i},T:function(){return r}})},67438:function(e,t,n){"use strict";function r(e,t){for(var n,r=0;r<e.length;r++)if(t(n=e[r],r,e))return n}n.d(t,{I:function(){return r}})},32405:function(e,t,n){"use strict";function r(e){var t=e;return t.transporter&&t.transporter.userAgent?t.transporter.userAgent.value:t._ua}n.d(t,{F:function(){return r}})},58061:function(e,t,n){"use strict";function r(e){if(e.appId&&e.apiKey)return[e.appId,e.apiKey];if(e.transporter){var t=e.transporter,n=t.headers||t.baseHeaders,r
1=t.queryParameters||t.baseQueryParameters,i="x-algolia-application-id",a="x-algolia-api-key";return[n[i]||r[i],n[a]||r[a]]}return[e.applicationID,e.apiKey]}n.d(t,{j:function(){return r}})},38796:function(e,t,n){"use strict";n.d(t,{I:function(){return i}});var r=n(92783);function i(e){var t=r.sn.highlightPostTag,n=r.sn.highlightPreTag,i=e.split(n),a=i.shift(),s=a?[{value:a,isHighlighted:!1}]:[];return i.forEach(function(e){var n=e.split(t);s.push({value:n[0],isHighlighted:!0}),""!==n[1]&&s.push({value:n[1],isHighlighted:!1})}),s}},9886:function(e,t,n){"use strict";function r(e){return Object.prototype.toString.call(e).slice(8,-1)}n.d(t,{K:function(){return r}})},65150:function(e,t,n){"use strict";function r(e,t){return(Array.isArray(t)?t:t.split(".")).reduce(function(e,t){return e&&e[t]},e)}n.d(t,{E:function(){return r}})},98539:function(e,t,n){"use strict";n.d(t,{t:function(){return s}});var r=n(29850),i=n(67438);function a(e,t,n,a){var s,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],c={type:t,attribute:n,name:a,escapedValue:(0,r.A)(a)},u=(0,i.I)(o,function(e){return e.name===n});if("hierarchical"===t){for(var l=function(e){u=u&&u.data&&(0,i.I)(Object.keys(u.data).map(f(u.data)),function(t){return t.name===h[e]})},d=e.getHierarchicalFacetByName(n),h=a.split(d.separator),f=function(e){return function(t){return e[t]}},m=0;void 0!==u&&m<h.length;++m)l(m);s=u&&u.count}else s=u&&u.data&&u.data[c.name];return void 0!==s&&(c.count=s),u&&void 0!==u.exhaustive&&(c.exhaustive=u.exhaustive),c}function s(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=e||{},s=[],o=t.facetsRefinements,c=void 0===o?{}:o,u=t.facetsExcludes,l=void 0===u?{}:u,d=t.disjunctiveFacetsRefinements,h=void 0===d?{}:d,f=t.hierarchicalFacetsRefinements,m=void 0===f?{}:f,p=t.numericRefinements,g=void 0===p?{}:p,v=t.tagRefinements,y=void 0===v?[]:v;return Object.keys(c).forEach(function(e){c[e].forEach(function(n){s.push(a(t,"facet",e,n,i.facets))})}),Object.keys(l).forEach(function(e){l[e].forEach(function(t){s.push({type:"exclude",attribute:e,name:t,exclude:!0})})}),Object.keys(h).forEach(function(e){h[e].forEach(function(n){s.push(a(t,"disjunctive",e,(0,r.T)(n),i.disjunctiveFacets))})}),Object.keys(m).forEach(function(e){m[e].forEach(function(n){s.push(a(t,"hierarchical",e,n,i.hierarchicalFacets))})}),Object.keys(g).forEach(function(e){var t=g[e];Object.keys(t).forEach(function(n){var r=n,i=t[r];(Array.isArray(i)?i:[i]).forEach(function(t){s.push({type:"numeric",attribute:e,name:"".concat(t),numericValue:t,operator:r})})})}),y.forEach(function(e){s.push({type:"tag",attribute:"_tags",name:e})}),n&&t.query&&t.query.trim()&&s.push({attribute:"query",type:"query",name:t.query,query:t.query}),s}},62417:function(e,t,n){"use strict";function r(e,t){var n,r=null===(n=e.getWidgetRenderState)||void 0===n?void 0:n.call(e,t),i=null;if(r&&r.widgetParams){var a=r.widgetParams;a.attribute?i=a.attribute:Array.isArray(a.attributes)&&(i=a.attributes[0])}if("string"!=typeof i)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 i}n.d(t,{z:function(){return r}})},56845:function(e,t,n){"use strict";n.d(t,{g:function(){return a}});var r=n(71893),i=n(55456);function a(e,t,n){return e.map(function(e,a){return(0,i._)((0,r._)({},e),{__position:n*t+a+1})})}},84582:function(e,t,n){"use strict";n.d(t,{P:function(){return a}});var r=n(71893),i=n(55456);function a(e,t){return t?e.map(function(e){return(0,i._)((0,r._)({},e),{__queryID:t})}):e}},53453:function(e,t,n){"use strict";function r(e){return e!==Object(e)}function i(e,t){if(e===t)return!0;if(r(e)||r(t)||"function"==typeof e||"function"==typeof t)return e===t;if(Object.keys(e).length!==Object.keys(t).length)return!1;var n=!0,a=!1,s=void 0;try{for(var o,c=Object.keys(e)[Symbol.iterator]();!(n=(o=c.next()).done);n=!0){var u=o.value;if(!(u in t))return!1;if(!i(e[u],t[u]))return!1}}catch(e){a=!0,s=e}finally{try{n||null==c.return||c.return()}finally{if(a)throw s}}return!0}n.d(t,{n:function(){return i}})},17183:function(e,t,n){"use strict";function r(e){return"number"==typeof e&&isFinite(e)}n.d(t,{B:function(){return r}})},64677:function(e,t,n){"use strict";n.d(t,{l:function(){return i}});var r=["ais.index","ais.feedContainer"];function i(e){return r.includes(e.$$type)}},31810:function(e,t,n){"use strict";n.d(t,{Q:function(){return i}});var r=n(61642);function i(e){if(!function(e){return"object"===(void 0===e?"undefined":(0,r._)(e))&&null!==e}(e)||"[object Object]"!==function(e){return null===e?void 0===e?"[object Undef
1ined]":"[object Null]":Object.prototype.toString.call(e)}(e))return!1;if(null===Object.getPrototypeOf(e))return!0;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}},20065:function(e,t,n){"use strict";n.d(t,{CI:function(){return r}});n(89098),n(60513);var r=function(e,t){return e}},52958:function(e,t,n){"use strict";n.d(t,{p:function(){return o}});var r=n(71893),i=n(38001);var a=n(94176),s=function(e,t){return e.setQueryParameters({hierarchicalFacets:t.hierarchicalFacets.reduce(function(e,t){var n=function(e,t){if(!Array.isArray(e))return-1;for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}(e,function(e){return e.name===t.name});if(-1===n)return e.concat(t);var r=e.slice();return r.splice(n,1,t),r},e.hierarchicalFacets)})},o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(function(e,t){var n=function(e,t){return e.setQueryParameters({hierarchicalFacetsRefinements:(0,r._)({},e.hierarchicalFacetsRefinements,t.hierarchicalFacetsRefinements)})}(e,t),o=function(e,t){return t.tagRefinements.reduce(function(e,t){return e.addTagRefinement(t)},e)}(s(n,t),t),c=function(e,t){return e.setQueryParameters({numericRefinements:(0,r._)({},e.numericRefinements,t.numericRefinements)})}(o,t),u=function(e,t){return e.setQueryParameters({disjunctiveFacetsRefinements:(0,r._)({},e.disjunctiveFacetsRefinements,t.disjunctiveFacetsRefinements)})}(c,t),l=function(e,t){return e.setQueryParameters({facetsExcludes:(0,r._)({},e.facetsExcludes,t.facetsExcludes)})}(u,t),d=function(e,t){return e.setQueryParameters({facetsRefinements:(0,r._)({},e.facetsRefinements,t.facetsRefinements)})}(l,t),h=function(e,t){return t.disjunctiveFacets.reduce(function(e,t){return e.addDisjunctiveFacet(t)},e)}(d,t),f=function(e,t){var n=(0,a.s)([].concat(e.ruleContexts).concat(t.ruleContexts).filter(Boolean));return n.length>0?e.setQueryParameters({ruleContexts:n}):e}(h,t),m=function(e,t){return t.facets.reduce(function(e,t){return e.addFacet(t)},e)}(f,t);return function(e,t){t.facets,t.disjunctiveFacets,t.facetsRefinements,t.facetsExcludes,t.disjunctiveFacetsRefinements,t.numericRefinements,t.tagRefinements,t.hierarchicalFacets,t.hierarchicalFacetsRefinements,t.ruleContexts;var n=(0,i._)(t,["facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements","ruleContexts"]);return e.setQueryParameters(n)}(m,t)})}},60513:function(e,t,n){"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n]}n.d(t,{l:function(){return r}})},86288:function(e,t,n){"use strict";function r(e,t){return null==e?e:Object.keys(e).reduce(function(n,r){if(t.indexOf(r)>=0)return n;var i=r;return n[i]=e[i],n},{})}n.d(t,{c:function(){return r}})},13148:function(e,t,n){"use strict";n.d(t,{y:function(){return i}});var r=n(89098);function i(e){var t=e.start,n=void 0===t?0:t,i=e.end,a=e.step,s=void 0===a?1:a,o=0===s?1:s,c=Math.round((i-n)/o);return(0,r._)(Array(c)).map(function(e,t){return n+t*o})}},4519:function(e,t,n){"use strict";n.d(t,{Ah:function(){return o},eX:function(){return s},r2:function(){return c}});var r=n(50467),i=n(71893),a=n(55456);function s(e,t,n){var r=t.getHelper();return{uiState:n,helper:r,parent:t,instantSearchInstance:e,state:r.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,scopedResults:[],searchMetadata:{isSearchStalled:"stalled"===e.status},status:e.status,error:e.error}}function o(e,t,n){var r=t.getResultsForWidget(n),i=t.getHelper();return{helper:i,parent:t,instantSearchInstance:e,results:r,scopedResults:t.getScopedResults(),state:r&&"_state"in r?r._state:i.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,searchMetadata:{isSearchStalled:"stalled"===e.status},status:e.status,error:e.error}}function c(e){var t=e.renderState,n=e.instantSearchInstance,s=e.parent,o=s?s.getIndexId():n.mainIndex.getIndexId();n.renderState=(0,a._)((0,i._)({},n.renderState),(0,r._)({},o,(0,i._)({},n.renderState[o],t)))}},56199:function(e,t,n){"use strict";function r(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{fallback:function(){}}).fallback;return"undefined"==typeof window?t():e({window:window})}n.d(t,{x:function(){return r}})},10793:function(e,t,n){"use strict";function r(e){return btoa(encodeURIComponent(JSON.stringify(e)))}n.d(t,{h:function(){return r}})},90307:function(e,t,n){"use strict";function r(e){return Array.isArray(e)?e:[e]}n.d(t,{$:function(){return r}})},94176:function(e,t,n){"use strict";function r(e){return e.filter(function(e,t,n){return n.indexOf(e)===t})}n.d(t,{s:function(){return r}})},33526:function(e,t,n){"use strict";function r(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}n.d(t,{G:function(){return r}})},52938:function(e,t,n){"use strict";n.d(t,{Q:function(){return i}});var r=n(64677);
1function i(e,t){t(e),e.getWidgets().forEach(function(e){(0,r.l)(e)&&i(e,t)})}},89189:function(e,t,n){"use strict";n.d(t,{kj:function(){return I}});var r=n(71893),i=n(55456),a=n(65631),s=n(89098),o=n(33526),c="4.116.0",u=n(68887),l=n(35984),d="undefined"!=typeof performance?function(){return performance.now()}:function(){return Date.now()},h=n(61642),f=n(64677),m=n(4519);function p(e){var t=[];return Object.keys(e).forEach(function(n){var i=e[n];if(void 0!==i){var a=function(e){if(null==e)return null;var t=void 0===e?"undefined":(0,h._)(e);if("string"===t||"number"===t||"boolean"===t)return{value:String(e),type:t};if(Array.isArray(e)||"object"===t){var n=Array.isArray(e)?"array":"object";try{return{value:JSON.stringify(e),type:n}}catch(e){return{type:n}}}return"function"===t?{value:e.name,type:"function"}:null}(i);a?t.push((0,r._)({name:n},a)):t.push({name:n})}}),t}function g(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.mainIndex,r=(0,m.eX)(t,n,t._initialUiState);return e.map(function(e){var n={};if(e.getWidgetRenderState){var i=e.getWidgetRenderState(r);i&&i.widgetParams&&(n=i.widgetParams)}var a=p(n),s=(0,f.l)(e)?g(e.getWidgets(),t,e):[];return{type:e.$$widgetType||e.$$type||"unknown",params:a,children:s}})}var v=n(86288),y=n(56199),_=n(58061),S=n(67438),R=n(60513),w=n(32405),b="2.17.2",x="https://cdn.jsdelivr.net/npm/search-insights@".concat(b,"/dist/search-insights.min.js"),P=["searchClient","insightsClient","initialUiState"];function I(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.insightsClient,n=e.insightsInitParams,h=e.onEvent,f=e.$$internal,m=void 0!==f&&f,I=e.$$automatic,T=void 0!==I&&I,A=t;t||null===t||(0,y.x)(function(e){var t=e.window,n=t.AlgoliaAnalyticsObject||"aa";"string"==typeof n&&(A=t[n]),A||(t.AlgoliaAnalyticsObject=n,t[n]||(t[n]=function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];t[n].queue||(t[n].queue=[]),t[n].queue.push(r)},t[n].version=b,t[n].shouldAddScript=!0),A=t[n])});var j=A||R.l;return function(e){var t,f=e.instantSearchInstance,b=f.middleware.filter(function(e){return"ais.insights"===e.instance.$$type&&e.instance.$$internal}).map(function(e){return e.creator});(t=f).unuse.apply(t,(0,s._)(b));var I,A,C,O=(0,a._)((0,_.j)(f.client),2),N=O[0],H=O[1],k=void 0,W=void 0,D=void 0,L=j.queue;Array.isArray(L)&&(I=(0,a._)(["setUserToken","init"].map(function(e){var t=(0,a._)((0,S.I)(L.slice().reverse(),function(t){return(0,a._)(t,1)[0]===e})||[],2);return t[1]}),2),W=I[0],k=I[1]);j("getUserToken",null,function(e,t){D=E(t)}),!n&&F(j)||j("init",(0,r._)({appId:N,apiKey:H,partial:!0},n));var U=null;return{$$type:"ais.insights",$$internal:m,$$automatic:T,onStateChange:function(){},subscribe:function(){if(j.shouldAddScript){var e="[insights middleware]: could not load search-insights.js. Please load it manually following https://alg.li/insights-init";try{var t=document.createElement("script");t.async=!0,t.src=x,t.onerror=function(){f.emit("error",new Error(e))},document.body.appendChild(t),j.shouldAddScript=!1}catch(t){j.shouldAddScript=!1,f.emit("error",new Error(e))}}},started:function(){j("addAlgoliaAgent","insights-middleware"),C=f.mainHelper;var e,t=j.queue;Array.isArray(t)&&(e=(0,a._)(["setUserToken","init"].map(function(e){var n=(0,a._)((0,S.I)(t.slice().reverse(),function(t){return(0,a._)(t,1)[0]===e})||[],2);return n[1]}),2),W=e[0],k=e[1]);A=function(e){var t,n,r=(null===(n=e._initialResults)||void 0===n||null===(t=n[e.indexName])||void 0===t?void 0:t.state)||{},i=e.mainHelper.state;return{userToken:r.userToken||i.userToken,clickAnalytics:r.clickAnalytics||i.clickAnalytics}}(f),T||C.overrideStateWithoutTriggeringChangeEvent((0,i._)((0,r._)({},C.state),{clickAnalytics:!0})),m||f.scheduleSearch();var R=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=E(e);if(n){var a=C.state.userToken;t?s():setTimeout(s,0)}function s(){C.overrideStateWithoutTriggeringChangeEvent((0,i._)((0,r._)({},C.state),{userToken:n})),a&&a!==n&&(C._recommendCache={},f.scheduleSearch())}};function b(e){R(e,!0),j("setUserToken",e)}var x,I=void 0,O=(0,u.Si)();O?I=O:I="anonymous-".concat((0,o.G)());var H=A.userToken;(null==n?void 0:n.userToken)&&(x=n.userToken),x?b(x):H?b(H):D?b(D):W?b(W):I&&(b(I),((null==n?void 0:n.useCookie)||(null==k?void 0:k.useCookie))&&function(e,t){var n=2592e6,r=new Date;r.setTime(r.getTime()+(t||6*n));var i="expires=".concat(r.toUTCString());document.cookie="_ALGOLIA=".concat(e,";").concat(i,";path=/")}
1(I,(null==n?void 0:n.cookieDuration)||(null==k?void 0:k.cookieDuration))),j("onUserTokenChange",function(e){return R(e,!0)},{immediate:!0});var L=j;F(j)&&(L=function(e,t){var n=(0,a._)((0,_.j)(f.client),2),r=n[0],i=n[1];return j(e,t,{headers:{"X-Algolia-Application-Id":r,"X-Algolia-API-Key":i}})});var q,Q=new Set;f.mainHelper.derivedHelpers[0].on("result",function(e){var t=e.results;!t||t.queryID&&t.queryID===q||(q=t.queryID,Q.clear())}),f.sendEventToInsights=function(e){if(h)h(e,L);else if(e.insightsMethod){if("viewedObjectIDs"===e.insightsMethod){var t=e.payload,n=function(e){return t.queryID?"".concat(t.queryID,":").concat(e):e},r=t.objectIDs.filter(function(e){return!Q.has(n(e))});if(0===r.length)return;r.forEach(function(e){return Q.add(n(e))}),t.objectIDs=r}e.payload.algoliaSource=["instantsearch"],T&&e.payload.algoliaSource.push("instantsearch-automatic"),"internal"===e.eventModifier&&e.payload.algoliaSource.push("instantsearch-internal"),L(e.insightsMethod,e.payload)}},(0,y.x)(function(){var e=(0,l.Zd)();var t=function(){try{var t=Math.round(d()-f._createdAt);n={eventName:"__start__",algoliaAgent:(0,w.F)(f.client),version:c,applicationId:N,performance:{bootstrapMs:t},widgets:[{type:"ais.instantSearch",params:f._initialOptions?p((0,v.c)(f._initialOptions,(0,s._)(P))):[],children:g(f.mainIndex.getWidgets(),f)}]},a=null===(i=C.state)||void 0===i?void 0:i.userToken,L("sendEvents",[(0,r._)({eventType:"instantsearch",timestamp:Date.now(),sessionID:e,userToken:a?String(a):void 0},n)])}catch(e){}var n,i,a};f.once("render",t),U=function(){return f.removeListener("render",t)}})},unsubscribe:function(){U&&U(),j("onUserTokenChange",void 0),f.sendEventToInsights=R.l,C&&A&&(C.overrideStateWithoutTriggeringChangeEvent((0,r._)({},C.state,A)),f.scheduleSearch())}}}}function F(e){var t=(0,a._)((e.version||"").split(".").map(Number),2),n=t[0],r=t[1];return n>=3||2===n&&r>=6||1===n&&r>=10}function E(e){if(e)return"number"==typeof e?e.toString():e}n(50467),n(21262),n(38001);n(53453)},65772:function(e,t,n){"use strict";n.d(t,{jK:function(){return te},rJ:function(){return st},Pe:function(){return ve},q7:function(){return ht},Ul:function(){return Ct},M1:function(){return Lt}});var r=n(71893),i=n(55456),a=n(23029),s=n(50172),o=n(7192),c=n(30494),u=n(99407),l=n(50467),d=n(20884),h=n(53750),f=n(89098),m=n(61642),p=n(53453),g=n(34714),v=n(46590),y=n(38001),_=(0,a.Yk)({createElement:s.n,Fragment:s.FK});function S(e){var t=e.classNames,n=void 0===t?{}:t,i=(0,y._)(e,["classNames"]);return(0,s.h)(_,(0,r._)({classNames:{root:(0,a.cx)("ais-Highlight",n.root),highlighted:(0,a.cx)("ais-Highlight-highlighted",n.highlighted),nonHighlighted:(0,a.cx)("ais-Highlight-nonHighlighted",n.nonHighlighted),separator:(0,a.cx)("ais-Highlight-separator",n.separator)}},i))}var R=n(65150),w=n(38796),b=n(18454),x=n(90307);function P(e){var t=e.hit,n=e.attribute,a=e.cssClasses,o=(0,y._)(e,["hit","attribute","cssClasses"]),c=(0,R.E)(t._highlightResult,n)||[],u=(0,x.$)(c).map(function(e){var t=e.value;return(0,w.I)((0,b.x)(t||""))});return(0,s.h)(S,(0,i._)((0,r._)({},o),{parts:u,classNames:a}))}function I(e){var t=e.classNames,n=void 0===t?{}:t,i=(0,y._)(e,["classNames"]);return(0,s.h)(_,(0,r._)({classNames:{root:(0,a.cx)("ais-ReverseHighlight",n.root),highlighted:(0,a.cx)("ais-ReverseHighlight-highlighted",n.highlighted),nonHighlighted:(0,a.cx)("ais-ReverseHighlight-nonHighlighted",n.nonHighlighted),separator:(0,a.cx)("ais-ReverseHighlight-separator",n.separator)}},i))}function F(e){var t=e.hit,n=e.attribute,a=e.cssClasses,o=(0,y._)(e,["hit","attribute","cssClasses"]),c=(0,R.E)(t._highlightResult,n)||[],u=(0,x.$)(c).map(function(e){var t=e.value;return(0,w.I)((0,b.x)(t||"")).map(function(e){var t=e.isHighlighted,n=(0,y._)(e,["isHighlighted"]);return(0,i._)((0,r._)({},n),{isHighlighted:!t})})});return(0,s.h)(I,(0,i._)((0,r._)({},o),{parts:u,classNames:a}))}function E(e){var t=e.classNames,n=void 0===t?{}:t,i=(0,y._)(e,["classNames"]);return(0,s.h)(_,(0,r._)({classNames:{root:(0,a.cx)("ais-Snippet",n.root),highlighted:(0,a.cx)("ais-Snippet-highlighted",n.highlighted),nonHighlighted:(0,a.cx
1)("ais-Snippet-nonHighlighted",n.nonHighlighted),separator:(0,a.cx)("ais-Snippet-separator",n.separator)}},i))}function T(e){var t=e.hit,n=e.attribute,a=e.cssClasses,o=(0,y._)(e,["hit","attribute","cssClasses"]),c=(0,R.E)(t._snippetResult,n)||[],u=(0,x.$)(c).map(function(e){var t=e.value;return(0,w.I)((0,b.x)(t||""))});return(0,s.h)(E,(0,i._)((0,r._)({},o),{parts:u,classNames:a}))}function A(e){var t=e.classNames,n=void 0===t?{}:t,i=(0,y._)(e,["classNames"]);return(0,s.h)(_,(0,r._)({classNames:{root:(0,a.cx)("ais-ReverseSnippet",n.root),highlighted:(0,a.cx)("ais-ReverseSnippet-highlighted",n.highlighted),nonHighlighted:(0,a.cx)("ais-ReverseSnippet-nonHighlighted",n.nonHighlighted),separator:(0,a.cx)("ais-ReverseSnippet-separator",n.separator)}},i))}function j(e){var t=e.hit,n=e.attribute,a=e.cssClasses,o=(0,y._)(e,["hit","attribute","cssClasses"]),c=(0,R.E)(t._snippetResult,n)||[],u=(0,x.$)(c).map(function(e){var t=e.value;return(0,w.I)((0,b.x)(t||"")).map(function(e){var t=e.isHighlighted,n=(0,y._)(e,["isHighlighted"]);return(0,i._)((0,r._)({},n),{isHighlighted:!t})})});return(0,s.h)(A,(0,i._)((0,r._)({},o),{parts:u,classNames:a}))}function C(e){var t=e.templates,n=e.templateKey,a=e.compileOptions,s=e.helpers,o=e.data,c=e.bindEvent,u=e.sendEvent,d=t[n];if("string"!=typeof d&&"function"!=typeof d)throw new Error("Template must be 'string' or 'function', was '".concat(void 0===d?"undefined":(0,m._)(d),"' (key: ").concat(n,")"));if("function"==typeof d){var h=c||{};return h.html=v.qy,h.sendEvent=u,h.components={Highlight:P,ReverseHighlight:F,Snippet:T,ReverseSnippet:j},d(o,h)}var f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return Object.keys(e).reduce(function(a,s){return(0,i._)((0,r._)({},a),(0,l._)({},s,function(){var r=this;return function(i){return e[s].call(n,i,function(e){return g.compile(e,t).render(r)})}}))},{})}(s,a,o);return g.compile(d,a).render((0,i._)((0,r._)({},o),{helpers:f})).replace(/[ \n\r\t\f\xA0]+/g,function(e){return e.replace(/(^|\xA0+)[^\xA0]+/g,"$1 ")}).trim()}var O=function(e){function t(){var e;return(0,c._)(this,t),e=(0,o._)(this,t,arguments),(0,l._)(e,"ref",(0,s._3)()),(0,l._)(e,"nodes",[]),e}
1return(0,d._)(t,e),(0,u._)(t,[{key:"componentDidMount",value:function(){var e=new DocumentFragment,t=document.createElement("div");t.innerHTML=this.props.content,this.nodes=(0,f._)(t.childNodes),this.nodes.forEach(function(t){return e.appendChild(t)}),this.ref.current.replaceWith(e)}},{key:"componentWillUnmount",value:function(){this.nodes.forEach(function(e){(0,h._)(e,Element)?e.outerHTML="":e.nodeValue=""}),this.nodes[0]&&this.nodes[0].nodeValue&&(this.nodes[0].nodeValue="")}},{key:"render",value:function(){return(0,s.h)("div",{ref:this.ref})}}]),t}(s.uA),N=function(e){function t(){return(0,c._)(this,t),(0,o._)(this,t,arguments)}return(0,d._)(t,e),(0,u._)(t,[{key:"shouldComponentUpdate",value:function(e){return!(0,p.n)(this.props.data,e.data)||this.props.templateKey!==e.templateKey||!(0,p.n)(this.props.rootProps,e.rootProps)}},{key:"render",value:function(){var e="fragment"===this.props.rootTagName?s.FK:this.props.rootTagName,t=this.props.useCustomCompileOptions[this.props.templateKey]?this.props.templatesConfig.compileOptions:{},n=C({templates:this.props.templates,templateKey:this.props.templateKey,compileOptions:t,helpers:this.props.templatesConfig.helpers,data:this.props.data,bindEvent:this.props.bindEvent,sendEvent:this.props.sendEvent});return null===n?null:"object"===(void 0===n?"undefined":(0,m._)(n))?(0,s.h)(e,this.props.rootProps,n):e===s.FK?(0,s.h)(O,{content:n,key:Math.random()}):(0,s.h)(e,(0,i._)((0,r._)({},this.props.rootProps),{dangerouslySetInnerHTML:{__html:n}}))}}]),t}(s.uA);(0,l._)(N,"defaultProps",{data:{},rootTagName:"div",useCustomCompileOptions:{},templates:{},templatesConfig:{}});var H=function(e){var t=e.hits,n=e.isLoading,o=e.cssClasses,c=e.templateProps;return(0,s.h)("div",{className:(0,a.cx)(o.root,0===t.length&&o.emptyRoot)},(0,s.h)(N,(0,i._)((0,r._)({},c),{templateKey:"header",rootProps:{className:o.header},data:{hits:t,isLoading:n}})),n?(0,s.h)(N,(0,i._)((0,r._)({},c),{templateKey:"loader",rootProps:{className:o.loader}})):(0,s.h)("ul",{className:o.list},t.map(function(e,t){return(0,s.h)(N,(0,i._)((0,r._)({},c),{templateKey:"item",rootTagName:"li",rootProps:{className:o.item},key:e.objectID,data:(0,i._)((0,r._)({},e),{get __hitIndex(){return t}})}))})))},k=n(39445),W=n(69734),D={header:function(){return""},loader:function(){return""},item:function(e){return(0,s.h)(s.FK,null,JSON.stringify(e))}};function L(e){var t,n="string"==typeof e,r=n?document.querySelector(e):e;if(t=r,!((0,h._)(t,HTMLElement)||Boolean(t)&&t.nodeType>0)){var i="Container must be `string` or `HTMLElement`.";throw n&&(i+=" Unable to find ".concat(e)),new Error(i)}return r}var U=n(94176);function q(e){var t=e.defaultTemplates,n=e.templates,i=e.templatesConfig,a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,U.s)((0,f._)(Object.keys(e||{})).concat((0,f._)(Object.keys(t)))).reduce(function(n,r){var i=e?e[r]:void 0,a=t[r],s=void 0!==a&&a!==i;return n.templates[r]=s?a:i,n.useCustomCompileOptions[r]=s,n},{templates:{},useCustomCompileOptions:{}})}(t,n);return(0,r._)({templatesConfig:i},a)}var Q=n(74243),$=n(20065),V=(0,Q.V)({name:"answers"}),M=(0,W.s)("Answers"),B=(0,$.CI)(function(e){var t=e||{},n=t.container,o=t.attributesForPrediction,c=t.queryLanguages,u=t.nbHits,l=t.searchDebounceTime,d=t.renderDebounceTime,h=t.escapeHTML,f=t.extraParameters,m=t.templates,p=void 0===m?{}:m,g=t.cssClasses,v=void 0===g?{}:g;if(!n)throw new Error(V("The `container` option is required."));var y=L(n),_={root:(0,a.cx)(M(),v.root),emptyRoot:(0,a.cx)(M({modifierName:"empty"}),v.emptyRoot),header:(0,a.cx)(M({descendantName:"header"}),v.header),loader:(0,a.cx)(M({descendantName:"loader"}),v.loader),list:(0,a.cx)(M({descendantName:"list"}),v.list),item:(0,a.cx)(M({descendantName:"item"}),v.item)},S=function(e){var t=e.containerNode,n=e.cssClasses,r=e.renderState,i=e.templates;return function(e,a){var o=e.hits,c=e.isLoading,u=e.instantSearchInstance;a?r.templateProps=q({defaultTemplates:D,templatesConfig:u.templatesConfig,templates:i}):(0,s.XX)((0,s.h)(H,{cssClasses:n,hits:o,isLoading:c,templateProps:r.templateProps}),t)}}
1({containerNode:y,cssClasses:_,templates:p,renderState:{}}),R=(0,k.A)(S,function(){return(0,s.XX)(null,y)});return(0,i._)((0,r._)({},R({attributesForPrediction:o,queryLanguages:c,nbHits:u,searchDebounceTime:l,renderDebounceTime:d,escapeHTML:h,extraParameters:f})),{$$widgetType:"ais.answers"})}),K=n(65631),X=n(45994),J=n(16455),z=n(74103),Y=n(4519);function G(e,t,n){return e.reduce(function(e,t){return t.getWidgetUiState?t.getWidgetUiState(e,n):e},t)}var Z=n(47121),ee=n(60513),te=function(e){var t=(0,Z.A)(ee.l);return(0,i._)((0,r._)({},t({searchParameters:e})),{$$widgetType:"ais.configure"})},ne=0;function re(e){"recommend"===e.dependsOn&&(e.$$id=ne++)}var ie=n(64677);function ae(e){for(var t=e.getParent(),n=[e.getHelper().state];null!==t;)n=[t.getHelper().state].concat(n),t=t.getParent();return n}var se=n(75373),oe=n(52958),ce=(0,Q.V)({name:"index-widget"});function ue(e,t){var n=t.state,r=t.recommendState,i=t.isPageReset,a=t._uiState;n!==e.state&&(e.state=n,e.emit("change",{state:e.state,results:e.lastResults,isPageReset:i,_uiState:a})),r!==e.recommendState&&(e.recommendState=r)}function le(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.reduce(function(e,n){return(0,ie.l)(n)?e:n.getWidgetUiState||n.getWidgetState?n.getWidgetUiState?n.getWidgetUiState(e,t):n.getWidgetState(e,t):e},n)}function de(e,t){var n=t.initialSearchParameters,r=(0,y._)(t,["initialSearchParameters"]);return e.reduce(function(e,t){return!t.getWidgetSearchParameters||(0,ie.l)(t)?e:"search"===t.dependsOn&&t.getWidgetParameters?t.getWidgetParameters(e,r):t.getWidgetSearchParameters(e,r)},n)}function he(e,t){var n=t.initialRecommendParameters,r=(0,y._)(t,["initialRecommendParameters"]);return e.reduce(function(e,t){return!(0,ie.l)(t)&&"recommend"===t.dependsOn&&t.getWidgetParameters?t.getWidgetParameters(e,r):e},n)}function fe(e){var t=e.filter(ie.l);0!==t.length&&t.forEach(function(e){var t=e.getHelper();ue(t,{state:t.state.resetPage(),recommendState:t.recommendState,isPageReset:!0}),fe(e.getWidgets())})}function me(e){return e.filter(ie.l).reduce(function(e,t){var n;return(n=e).concat.apply(n,[{indexId:t.getIndexId(),results:t.getResults(),helper:t.getHelper()}].concat((0,f._)(me(t.getWidgets()))))},[])}function pe(e){return e.reduce(function(e,t){if((0,ie.l)(t)){if(t._isolated)return e;var n=pe(t.getWidgets());return{hasSearchWidget:e.hasSearchWidget||n.hasSearchWidget,hasRecommendWidget:e.hasRecommendWidget||n.hasRecommendWidget}}return"recommend"===t.dependsOn?(0,i._)((0,r._)({},e),{hasRecommendWidget:!0}):"none"===t.dependsOn?e:(0,i._)((0,r._)({},e),{hasSearchWidget:!0})},{hasSearchWidget:!1,hasRecommendWidget:!1})}function ge(e){var t=pe(e.mainIndex.getWidgets()),n=t.hasSearchWidget,r=t.hasRecommendWidget;e._hasSearchWidget=n,e._hasRecommendWidget=r}var ve=function(e){var t;if(void 0===e||void 0===e.indexName&&!e.isolated&&!e.EXPERIMENTAL_isolated)throw new Error(ce("The `indexName` option is required."));var n,a=e.indexName,s=void 0===a?"":a,o=e.indexId,c=void 0===o?s:o,u=e.isolated,d=void 0===u?null!==(t=e.EXPERIMENTAL_isolated)&&void 0!==t&&t:u,m=[],p={},g=null,v=null,y=null,_=null,S=null,R=function(){g&&ge(g)};return{$$type:"ais.index",$$widgetType:"ais.index",_isolated:d,getIndexName:function(){return s},getIndexId:function(){return c},getHelper:function(){return y},getResults:function(){return(null==_?void 0:_.lastResults)?(_.lastResults._state=y.state,_.lastResults):null},getResultsForWidget:function(e){return"recommend"!==e.dependsOn||(0,ie.l)(e)||void 0===e.$$id?this.getResults():(null==y?void 0:y.lastRecommendResults)?y.lastRecommendResults[e.$$id]:null},getPreviousState:function(){return S},getScopedResults:function(){var e=this.getParent();return me(e?e.getWidgets():0===s.length?this.getWidgets():[this])},getParent:function(){return d?null:v},createURL:function(e){return"function"==typeof e?g._createURL((0,l._)({},c,e(p))):g._createURL((0,l._)({},c,le(m,{searchParameters:e,helper:y})))},scheduleLocalSearch:(0,se.v)(function(){d&&(null==y||y.search())}),getWidgets:function(){return m},addWidgets:function(e){var t=this;if(!Array.isArray(e))throw new Error(ce("The `addWidgets` method expects an array of widgets."));var n=e.reduce(function(e,t){return e.concat(Array.isArray(t)?t:[t])},[]);if(n.some(function(e){return"function"!=typeof e.init&&"function"!=typeof e.render}))throw new Error(ce("The widget definition expects a `render` and/or an `init` method."));
1return n.forEach(function(e){e.parent=t,(0,ie.l)(e)||re(e)}),m=m.concat(n),R(),g&&Boolean(n.length)&&(ue(y,{state:de(m,{uiState:p,initialSearchParameters:y.state}),recommendState:he(m,{uiState:p,initialRecommendParameters:y.recommendState}),_uiState:p}),n.forEach(function(e){if(e.getRenderState){var n=e.getRenderState(g.renderState[t.getIndexId()]||{},(0,Y.eX)(g,t,g._initialUiState));(0,Y.r2)({renderState:n,instantSearchInstance:g,parent:t})}}),n.forEach(function(e){e.init&&e.init((0,Y.eX)(g,t,g._initialUiState))}),d?this.scheduleLocalSearch():g.scheduleSearch()),this},updateWidget:function(e,t){if("function"!=typeof e.dispose)throw new Error(ce("The widget definition expects a `dispose` method."));if("function"!=typeof t.init&&"function"!=typeof t.render)throw new Error(ce("The widget definition expects a `render` and/or an `init` method."));var n=p;e.parent=void 0,t.parent=this,(0,ie.l)(t)||re(t);var r=m.slice(),i=r.indexOf(e);if(-1===i?r.push(t):r[i]=t,m=r,R(),!g)return this;var a=e.dispose({helper:y,state:y.state,recommendState:y.recommendState,parent:this}),s=(0,h._)(a,z.RecommendParameters)?a:y.recommendState,o=a&&!(0,h._)(a,z.RecommendParameters)?a:y.state,c=g.future.preserveSharedStateOnUnmount?new z.SearchParameters({index:this.getIndexName()}):o;p=le(m,{searchParameters:de(m,{uiState:n,initialSearchParameters:c}),helper:y});var u=de(m,{uiState:p,initialSearchParameters:c});if(ue(y,{state:u,recommendState:he(m,{uiState:p,initialRecommendParameters:s}),_uiState:p}),t.getRenderState){var l=t.getRenderState(g.renderState[this.getIndexId()]||{},(0,Y.eX)(g,this,g._initialUiState));(0,Y.r2)({renderState:l,instantSearchInstance:g,parent:this})}return t.init&&t.init((0,Y.eX)(g,this,g._initialUiState)),d?this.scheduleLocalSearch():g.scheduleSearch(),this},removeWidgets:function(e){var t=this;if(!Array.isArray(e))throw new Error(ce("The `removeWidgets` method expects an array of widgets."));var n=e.reduce(function(e,t){return e.concat(Array.isArray(t)?t:[t])},[]);if(n.some(function(e){return"function"!=typeof e.dispose}))throw new Error(ce("The widget definition expects a `dispose` method."));if(m=m.filter(function(e){return-1===n.indexOf(e)}),n.forEach(function(e){e.parent=void 0}),R(),g&&Boolean(n.length)){var r=n.reduce(function(e,n){var r=n.dispose({helper:y,state:e.cleanedSearchState,recommendState:e.cleanedRecommendState,parent:t});return(0,h._)(r,z.RecommendParameters)?e.cleanedRecommendState=r:r&&(e.cleanedSearchState=r),e},{cleanedSearchState:y.state,cleanedRecommendState:y.recommendState}),i=r.cleanedSearchState,a=r.cleanedRecommendState,s=g.future.preserveSharedStateOnUnmount?de(m,{uiState:p,initialSearchParameters:new z.SearchParameters({index:this.getIndexName()})}):de(m,{uiState:le(m,{searchParameters:i,helper:y}),initialSearchParameters:i});p=le(m,{searchParameters:s,helper:y}),y.setState(s),y.recommendState=a,m.length&&(d?this.scheduleLocalSearch():g.scheduleSearch())}return this},init:function(e){var t,n=this,a=e.instantSearchInstance,o=e.parent,u=e.uiState;if(null===y){g=a,v=o,p=u[c]||{};var l=a.mainHelper,h=de(m,{uiState:p,initialSearchParameters:new z.SearchParameters({index:s})}),w=he(m,{uiState:p,initialRecommendParameters:new z.RecommendParameters});(y=z(l.getClient(),h.index,h)).recommendState=w,y.search=function(){return d?(a.status="loading",n.render({instantSearchInstance:a}),a.compositionID?y.searchWithComposition():y.searchOnlyWithDerivedHelpers()):a.onStateChange?(a.onStateChange({uiState:a.mainIndex.getWidgetUiState({}),setUiState:function(e){return a.setUiState(e,!1)}}),l):l.search()},y.searchWithoutTriggeringOnStateChange=function(){return l.search()},y.searchForFacetValues=function(e,t,r,i){var a=oe.p.apply(void 0,[l.state].concat((0,f._)(ae(n)))).setQueryParameters(i);return l.searchForFacetValues(e,t,r,a)};var b=s?y:z({},"__empty_index__",{}),x=d?b:function(e,t){for(;e;){if(e._isolated)return e.getHelper();e=e.getParent()}return t}(o,l);_=x.derive(function(){return oe.p.apply(void 0,[l.state].concat((0,f._)(ae(n))))},function(){return function(e,t){var n=t.userToken,a=t.clickAnalytics;if(void 0===n&&void 0===a)return e;var s=(0,r._)({},void 0===a?{}:{clickAnalytics:a},void 0===n?{}:{userToken:n});return new z.RecommendParameters({params:e.params.map(function(e){var t=e.queryParameters,n=e.fallbackParameters;return(0,r._)((0,i._)((0,r._)({},e),{queryParameters:(0,r._)({},s,t)}),n&&{fallbackParameters:(0,r._)({},s,n)})})})}(n.getHelper().recommendState,l.state)});var P=null===(t=a._initialResults)||void 0===t?void 0:t[this.getIndexId()];if(null==P?void 0:P.results){var I=new z.SearchResults(new z.SearchParameters(P.state),P.results);_.lastResults=I,y.lastResults=I}if(null==P?void 0:P.recommendResults){var F=new z.RecommendResults(new z.RecommendParameters({params:P.recommendResults.params}),P.recommendResults.results);_.lastRecommendResults=F,y.lastRecommendResults=F}y.on("change",function(e){e.isPageReset&&fe(m)}),_.on("search",function(){a.scheduleStalledRender()}),_.on("result",function(e){var t=e.results;a.scheduleRender(),y.lastResults=t,S=null==t?void 0:t._state}),_.on("recommend:result",function(e){var t=e.recommend;a.scheduleRender(),y.lastRecommendResults=t.results}),m.forEach(function(e){if(e.getRenderState){var t=e.getRenderState(a.renderState[n.getIndexId()]||{},(0,Y.eX)(a,n,u));(0,Y.r2)({renderState:t,instantSearchInstance:a,parent:n})}}),m.forEach(function(e){e.init&&e.init((0,Y.eX)(a,n,u))}),y.on("change",function(e){var t=e.state,n=e._uiState;p=le(m,{searchParameters:t,helper:y},n||{}),a.onStateChange||a.onInternalStateChange()}),P&&a.scheduleRender(),R()}},render:function(e){var t=this,r=e.instantSearchInstance;"error"!==r.status?n=void 0:r.error!==n&&!r.mainHelper.hasPendingRequests()&&S&&(n=r.error,y.setState(S));var i=this.getResults()||(null==_?void 0:_.lastRecommendResults)||d&&!s?m:m.filter(function(e){return e.shouldRender});(i=i.filter(function(e){return!e.shouldRender||e.shouldRender({instantSearchInstance:r})}
1)).forEach(function(e){if(e.getRenderState){var n=e.getRenderState(r.renderState[t.getIndexId()]||{},(0,Y.Ah)(r,t,e));(0,Y.r2)({renderState:n,instantSearchInstance:r,parent:t})}}),i.forEach(function(e){e.render&&e.render((0,Y.Ah)(r,t,e))})},dispose:function(){var e=this;m.forEach(function(t){t.dispose&&y&&t.dispose({helper:y,state:y.state,recommendState:y.recommendState,parent:e})}),g=null,v=null,null==y||y.removeAllListeners(),y=null,null==_||_.detach(),_=null},getWidgetUiState:function(e){return m.filter(ie.l).filter(function(e){return!e._isolated}).reduce(function(e,t){return t.getWidgetUiState(e)},(0,i._)((0,r._)({},e),(0,l._)({},c,(0,r._)({},e[c],p))))},getWidgetState:function(e){return this.getWidgetUiState(e)},getWidgetSearchParameters:function(e,t){var n=t.uiState;return de(m,{uiState:n,initialSearchParameters:e})},shouldRender:function(){return!0},refreshUiState:function(){p=le(m,{searchParameters:this.getHelper().state,helper:this.getHelper()},p)},setIndexUiState:function(e){var t="function"==typeof e?e(p):e;g.setUiState(function(e){return(0,i._)((0,r._)({},e),(0,l._)({},c,t))})}}};var ye=n(41379),_e=n(57798),Se=n(55222),Re=n(52938),we=n(67438),be=0,xe=(0,Q.V)({name:"autocomplete"}),Pe=(0,W.s)("Autocomplete"),Ie=(0,a.od)({createElement:s.h,Fragment:s.FK}),Fe=(0,a.iS)({createElement:s.h,Fragment:s.FK}),Ee=(0,a.uv)({createElement:s.h,Fragment:s.FK}),Te=(0,a.G8)({createElement:s.h,Fragment:s.FK}),Ae=(0,a.oY)({createElement:s.h,Fragment:s.FK}),je=(0,a.eK)({createElement:s.h,Fragment:s.FK}),Ce=(0,a.X5)({createElement:s.h,Fragment:s.FK}),Oe=(0,a.P1)({createElement:s.h,Fragment:s.FK}),Ne=(0,a.iQ)({createElement:s.h,Fragment:s.FK}),He=(0,a.dr)({createElement:s.h,Fragment:s.FK}),ke=(0,a.EI)({createElement:s.h,Fragment:s.FK}),We=(0,a.Ez)({useEffect:X.vJ,useId:X.Bi,useMemo:X.Kr,useRef:X.li,useState:X.J0}),De=(0,a.yF)({useEffect:X.vJ,useState:X.J0,useMemo:X.Kr}),Le={detachedCancelButtonText:"Cancel",detachedSearchButtonTitle:"Search",detachedClearButtonTitle:"Clear"};function Ue(e,t,n){return""===e?"":e||(r=t,("undefined"==typeof window||"undefined"==typeof document?"":getComputedStyle(document.documentElement).getPropertyValue(r).trim())||n);var r}function qe(e){return"undefined"==typeof window||"function"!=typeof window.matchMedia?null:window.matchMedia(e)}function Qe(e){var t,n,o,c,u,d,h,f,p,g,v=e.indicesConfig,_=e.indices,S=e.activate,R=e.getSearchPageURL,w=e.onSelect,b=e.refine,x=e.cssClasses,P=e.renderState,I=e.instantSearchInstance,F=e.showRecent,E=e.showQuerySuggestions,T=e.showPromptSuggestions,A=e.templates,j=e.placeholder,C=e.autofocus,O=e.detachedMediaQuery,H=e.translations,k=e.aiMode,W=P.isolatedIndex,D=P.targetIndex,L=null==W||null===(o=W.getHelper())||void 0===o?void 0:o.state.query,U=null==D||null===(c=D.getHelper())||void 0===c?void 0:c.state.query,Q=(0,K._)((0,X.J0)(void 0!==L?L:null!=U?U:""),2),$=Q[0],V=Q[1];(0,X.vJ)(function(){var e=void 0!==L?L:U;void 0!==e&&V(e)},[L,U]);var M=(0,X.Kr)(function(){return Ue(O,"--ais-autocomplete-detached-media-query","(max-width: 680px)")},[O]),B=(0,K._)((0,X.J0)(!!M&&Boolean(null===(u=qe(M))||void 0===u?void 0:u.matches)),2),J=B[0],z=B[1],Y=(0,K._)((0,X.J0)(!1),2),G=Y[0],Z=Y[1],ee=(0,K._)((0,X.J0)(!1),2),te=ee[0],ne=ee[1],re=(0,X.li)(J);(0,X.vJ)(function(){if(!M)return z(!1),function(){};var e=qe(M);if(!e)return z(!1),function(){};var t=function(e){var t=J;z(e.matches),t&&!e.matches&&Z(!1)};return e.addEventListener("change",t),function(){return e.removeEventListener("change",t)}},[M,J]),(0,X.vJ)(function(){if(!J)return ne(!1),function(){};var e=Ue(void 0,"--ais-autocomplete-detached-modal-media-query","(min-width: 680px)");if(!e)return ne(!1),function(){};var t=qe(e);if(!t)return ne(!1),function(){};var n=function(e){ne(e.matches)};return ne(t.matches),t.addEventListener("change",n),function(){return t.removeEventListener("change",n)}},[J]),(0,X.vJ)(function(){if("undefined"==typeof document)return function(){};if(G){var e=window.scrollY;return document.body.style.top="-".concat(e,"px"),document.body.classList.add("ais-Autocomplete--detached"),function(){document.body.classList.remove("ais-Autocomplete--detached"),document.body.style.top="",window.scrollTo(0,e)}}return function(){}},[G]);var ie=De({query:L,showRecent:F,indices:_,indicesConfig:v,suggestionsIndexName:null==E?void 0:E.indexName}),ae=ie.storage,se=ie.storageHits,oe=ie.indicesConfigForPropGetters,ce=ie.indicesForPropGetters,ue=null==T?void 0:T.indexName,le=null!==(t=null==T||null===(d=T.searchParameters)||void 0===d?void 0:d.hitsPerPage)&&void 0!==t?t:3,de=_.map(function(e){var t=e.indexName===(null==E?void 0:E.indexName)&&F?e.hits.filter(function(e){return!(0,we.I)(se,function(t){return t.query===e.query})}):e.hits;return e.indexName!==ue?(0,i._)((0,r._)({},e),{hits:t}):(0,i._)((0,r._)({},e),{hits:(0,a.Pm)({hits:t,limit:le})})}),he=ce.map(function(e){return e.indexName!==ue?e:(0,i._)((0,r._)({},e),{hits:(0,a.Pm)({hits:e.hits,limit:le})})}),fe=F,me={root:(0,a.cx)("ais-AutocompleteRecentSearches",null==fe||null===(h=fe.cssClasse
1s)||void 0===h?void 0:h.root),list:(0,a.cx)("ais-AutocompleteRecentSearchesList",null==fe||null===(f=fe.cssClasses)||void 0===f?void 0:f.list),header:(0,a.cx)("ais-AutocompleteRecentSearchesHeader",null==fe||null===(p=fe.cssClasses)||void 0===p?void 0:p.header),item:(0,a.cx)("ais-AutocompleteRecentSearchesItem",null==fe||null===(g=fe.cssClasses)||void 0===g?void 0:g.item)},pe=null!==(n=null==D?void 0:D.getWidgets().some(function(e){var t=e.$$type;return["ais.hits","ais.infiniteHits"].includes(t)}))&&void 0!==n&&n,ge=function(e){V(e),b(e),I.setUiState(function(t){var n;return(0,i._)((0,r._)({},t),(n={},(0,l._)(n,D.getIndexId(),(0,i._)((0,r._)({},t[D.getIndexId()]),{query:e})),(0,l._)(n,W.getIndexId(),{query:e}),n))}),e.length>0&&ae.onAdd(e)},ve=de.every(function(e){return 0===e.hits.length}),ye=!se||0===se.length,Se=v.some(function(e){var t;return void 0!==(null===(t=e.templates)||void 0===t?void 0:t.noResults)}),Re=ve&&ye&&!Se&&!A.panel,be=function(){var e;return null===(e=I.renderState[D.getIndexId()])||void 0===e?void 0:e.chat},xe=We({indices:he,indicesConfig:oe,onRefine:ge,onSelect:null!=w?w:function(e){var t=e.query,n=e.item,s=e.setQuery,o=e.url;if((0,a.bC)(n)){var c=be();if(c)return void((0,_e.J)(c,{message:n.prompt,referer:"prompt-suggestions-autocomplete"})&&s(""))}if(o)window.location.href=o;else if(pe||void 0===R)s(t);else{var u=I.getUiState()[D.getIndexId()];window.location.href=R((0,i._)((0,r._)({},u),{query:t}))}},onApply:function(e){b(e)},onSubmit:function(){J&&Z(!1)},placeholder:j,isDetached:J,shouldHidePanel:Re,autoFocus:C}
1),Pe=xe.getInputProps,Te=xe.getItemProps,Ae=xe.getPanelProps,Ce=xe.getRootProps,Le=xe.isOpen,Qe=xe.setIsOpen,$e=xe.focusInput;(0,X.vJ)(function(){J&&G&&(Qe(!0),$e())},[J,G,Qe,$e]),(0,X.vJ)(function(){!re.current&&J&&Le&&Z(!0),re.current=J},[J,Le,Z]);var Ve={};F&&(Ve.recent=(0,s.h)(Ee,{HeaderComponent:P.recentSearchHeaderComponent,ItemComponent:function(e){var t=e.item,n=e.onSelect,r=e.onApply;return(0,s.h)(P.RecentSearchComponent,{item:t,onSelect:n,onApply:r,onRemoveRecentSearch:function(){return ae.onRemove(t.query)}})},classNames:me,items:se,getItemProps:Te})),de.forEach(function(e,t){var n,a,o,c=e.indexId,u=e.indexName,l=e.hits,d=(0,we.I)(v,function(e){return e.indexName===u});if(d){P.indexTemplateProps[t]||(P.indexTemplateProps[t]=q({defaultTemplates:{},templatesConfig:I.templatesConfig,templates:d.templates}));var h=(null===(n=d.templates)||void 0===n?void 0:n.header)?function(e){var n=e.items;return(0,s.h)(N,(0,i._)((0,r._)({},P.indexTemplateProps[t]),{templateKey:"header",rootTagName:"fragment",data:{items:n}}))}:void 0,f=(null===(a=d.templates)||void 0===a?void 0:a.noResults)?function(){return(0,s.h)(N,(0,i._)((0,r._)({},P.indexTemplateProps[t]),{templateKey:"noResults",rootTagName:"fragment",data:{}}))}:void 0,m=u;u===(null==E?void 0:E.indexName)?m="suggestions":u===(null==T?void 0:T.indexName)&&(m="promptSuggestions"),Ve[m]=(0,s.h)(Ee,{key:c,HeaderComponent:h,ItemComponent:function(e){var n=e.item,a=e.onSelect,o=e.onApply;return(0,s.h)(N,(0,i._)((0,r._)({},P.indexTemplateProps[t]),{templateKey:"item",rootTagName:"fragment",data:{item:n,onSelect:a,onApply:o}}))},NoResultsComponent:f,items:l.map(function(e){return(0,i._)((0,r._)({},e),{__indexName:u})}),getItemProps:Te,sendEvent:null===(o=(0,we.I)(_,function(e){return e.indexId===c}
1))||void 0===o?void 0:o.sendEvent,classNames:d.cssClasses})}});var Me=Pe(),Be="object"===(void 0===Me?"undefined":(0,m._)(Me))&&null!==Me?Me:{},Ke=function(){Z(!1),Qe(!1)},Xe=(0,s.h)(je,{query:$,inputProps:(0,i._)((0,r._)({},Be),{onFocus:function(e){var t;S(),null===(t=Be.onFocus)||void 0===t||t.call(Be,e)},onInput:function(e){var t=e.currentTarget.value;V(t),b(t)}}),onClear:function(){ge("")},isSearchStalled:"stalled"===I.status,onCancel:function(){J&&Ke()},isDetached:J,submitTitle:J?H.detachedCancelButtonText:void 0,onAiModeClick:k?function(){Qe(!1),J&&Z(!1),(0,_e.J)(be(),{message:$,referer:"ai-mode"})&&ge("")}:void 0,aiModeButtonDisabled:k?(0,_e.m)(be()):void 0,classNames:x}),Je=(0,s.h)(Fe,(0,i._)((0,r._)({},Ae()),{classNames:{root:null==x?void 0:x.panel,open:null==x?void 0:x.panelOpen,layout:null==x?void 0:x.panelLayout}}),A.panel?(0,s.h)(N,(0,i._)((0,r._)({},P.templateProps),{templateKey:"panel",rootTagName:"fragment",data:{elements:Ve,indices:de}})):Object.keys(Ve).map(function(e){return Ve[e]})),ze=te?(0,i._)((0,r._)({},x),{detachedContainer:(0,a.cx)("ais-AutocompleteDetachedContainer--modal",x.detachedContainer)}):x,Ye=Ce(),Ge=Ye.ref,Ze=(0,y._)(Ye,["ref"]);return J?(0,s.h)(Ie,(0,i._)((0,r._)({},Ze),{rootRef:Ge,classNames:x}),(0,s.h)(ke,{query:$,placeholder:j,classNames:x,onClick:function(){Z(!0),Qe(!0)},onClear:function(){ge("")},translations:H}),G&&(0,s.h)(Ne,{classNames:x,onClose:Ke},(0,s.h)(Oe,{classNames:ze},(0,s.h)(He,{classNames:x},Xe),Je))):(0,s.h)(Ie,(0,i._)((0,r._)({},Ze),{rootRef:Ge,classNames:x}),Xe,Je)}function $e(e){var t,n=e.item;return(null===(t=n._highlightResult)||void 0===t?void 0:t.query)&&"none"!==n._highlightResult.query.matchLevel?(0,s.h)(F,{attribute:"query",hit:n}):n.query}var Ve=n(73841),Me=n(80510),Be=n(62417),Ke=(0,Q.V)({name:"dynamic-widgets"}),Xe=(0,W.s)("DynamicWidgets");function Je(e){var t=document.createElement("div");return t.className=Xe({descendantName:"widget"}),e.appendChild(t),t}(0,Q.V)({name:"analytics"});n(32527),(0,Q.V)({name:"breadcrumb"}),(0,W.s)("Breadcrumb"),n(90830),(0,Q.V)({name:"clear-refinements"}),(0,W.s)("ClearRefinements");n(81854),(0,Q.V)({name:"current-refinements"}),(0,W.s)("CurrentRefinements"),(0,Q.V)({name:"feeds"}),(0,W.s)("Feeds"),n(33083),(0,Q.V)({name:"geo-search"}),(0,W.s)("GeoSearch");var ze={query:"",showSubmit:!0,showReset:!0,showLoadingIndicator:!0,autofocus:!1,searchAsYouType:!0,ignoreCompositionEvents:!1,isSearchStalled:!1,disabled:!1,ariaLabel:"Search",submitTitle:"Submit the search query",resetTitle:"Clear the search query",onChange:ee.l,onSubmit:ee.l,onReset:ee.l,refine:ee.l,inputProps:{}},Ye=function(e){function t(){var e;return(0,c._)(this,t),e=(0,o._)(this,t,arguments),(0,l._)(e,"state",{query:e.props.query,focused:!1}),(0,l._)(e,"input",(0,s._3)()),(0,l._)(e,"onInput",function(t){var n,r;null===(n=(r=e.props.inputProps).onInput)||void 0===n||n.call(r,t);var i=e.props,a=i.searchAsYouType,s=i.refine,o=i.onChange,c=t.target.value;e.props.ignoreCompositionEvents&&t.isComposing||(a&&s(c),e.setState({query:c}),o(t))}),(0,l._)(e,"onSubmit",function(t){var n=e.props,r=n.searchAsYouType,i=n.refine,a=n.onSubmit;return t.preventDefault(),t.stopPropagation(),e.input.current&&e.input.current.blur(),r||i(e.state.query),a(t),!1}),(0,l._)(e,"onReset",function(t){var n=e.props,r=n.refine,i=n.onReset;e.input.current&&e.input.current.focus(),r(""),e.setState({query:""}),i(t)}),(0,l._)(e,"onBlur",function(t){var n,r;null===(n=(r=e.props.inputProps).onBlur)||void 0===n||n.call(r,t),e.setState({focused:!1})}),(0,l._)(e,"onFocus",function(t){var n,r;null===(n=(r=e.props.inputProps).onFocus)||void 0===n||n.call(r,t),e.setState({focused:!0})}),(0,l._)(e,"onAiModeClick",function(t){var n,r;t.preventDefault(),null===(n=(r=e.props).onAiModeClick)||void 0===n||n.call(r,e.state.query)}),e}return(0,d._)(t,e),(0,u._)(t,[{key:"resetInput",value:function(){this.setState({query:""})}},{key:"componentWillReceiveProps",value:function(e){this.state.focused||e.query===this.state.query||this.setState({query:e.query})}}
1,{key:"render",value:function(){var e=this.props,t=e.cssClasses,n=e.placeholder,a=e.autofocus,o=e.showSubmit,c=e.showReset,u=e.showLoadingIndicator,l=e.templates,d=e.isSearchStalled,h=e.ariaLabel,f=e.inputProps,m=e.onAiModeClick,p=e.aiModeButtonDisabled;return(0,s.h)("div",{className:t.root},(0,s.h)("form",{action:"",role:"search",className:t.form,noValidate:!0,onSubmit:this.onSubmit,onReset:this.onReset},(0,s.h)("input",(0,i._)((0,r._)({},f),{ref:this.input,value:this.state.query,disabled:this.props.disabled,className:t.input,type:"search",placeholder:n,autoFocus:a,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:"false",maxLength:512,onInput:this.onInput,oncompositionend:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus,"aria-label":h})),(0,s.h)(N,{templateKey:"submit",rootTagName:"button",rootProps:{className:t.submit,type:"submit",title:this.props.submitTitle,"aria-label":this.props.submitTitle,hidden:!o},templates:l,data:{cssClasses:t}}),(0,s.h)(N,{templateKey:"reset",rootTagName:"button",rootProps:{className:t.reset,type:"reset",title:this.props.resetTitle,"aria-label":this.props.resetTitle,hidden:!(c&&this.state.query.trim()&&!d)},templates:l,data:{cssClasses:t}}),u&&(0,s.h)(N,{templateKey:"loadingIndicator",rootTagName:"span",rootProps:{className:t.loadingIndicator,hidden:!d},templates:l,data:{cssClasses:t}}),m&&(0,s.h)(N,{templateKey:"aiMode",rootTagName:"button",rootProps:{className:t.aiModeButton,type:"button",title:"AI Mode",disabled:p,onClick:this.onAiModeClick},templates:l,data:{cssClasses:t}})))}}]),t}(s.uA);function Ge(e){var t=e.className,n=e.handleClick,a=e.facetValueToRefine,o=e.isRefined,c=e.templateProps,u=e.templateKey,l=e.templateData,d=e.subItems;return(0,s.h)("li",{className:t,onClick:function(e){n({facetValueToRefine:a,isRefined:o,originalEvent:e})}},(0,s.h)(N,(0,i._)((0,r._)({},c),{templateKey:u,data:l})),d)}(0,l._)(Ye,"defaultProps",ze);function Ze(e){return void 0!==e.data}var et=function(e){function t(){var e;return(0,c._)(this,t),e=(0,o._)(this,t,arguments),(0,l._)(e,"listRef",(0,s._3)()),(0,l._)(e,"searchBox",(0,s._3)()),(0,l._)(e,"lastRefinedValue",void 0),(0,l._)(e,"_generateFacetItem",function(n){var o;if(Ze(n)&&Array.isArray(n.data)&&n.data.length>0){var c=e.props.cssClasses;c.root;var u=(0,y._)(c,["root"]);o=(0,s.h)(t,(0,i._)((0,r._)({},e.props),{cssClasses:u,depth:e.props.depth+1,facetValues:n.data,showMore:!1,className:e.props.cssClasses.childList}))}var l=e.props.createURL(n.value),d=(0,i._)((0,r._)({},n),{url:l,attribute:e.props.attribute,cssClasses:e.props.cssClasses,isFromSearch:e.props.isFromSearch}),h=n.value;void 0!==n.isRefined&&(h+="/".concat(n.isRefined)),void 0!==n.count&&(h+="/".concat(n.count));var f=(0,a.cx)(e.props.cssClasses.item,n.isRefined&&e.props.cssClasses.selectedItem,!n.count&&e.props.cssClasses.disabledItem,Boolean(Ze(n)&&Array.isArray(n.data)&&n.data.length>0)&&e.props.cssClasses.parentItem);return(0,s.h)(Ge,{templateKey:"item",key:h,facetValueToRefine:n.value,handleClick:e.handleItemClick,isRefined:n.isRefined,className:f,subItems:o,templateData:d,templateProps:e.props.templateProps})}),(0,l._)(e,"handleItemClick",function(t){var n=t.facetValueToRefine,r=t.isRefined,i=t.originalEvent;if(!(1===(a=i).button||a.altKey||a.ctrlKey||a.metaKey||a.shiftKey)){var a,s=i.target;if(!(null===s||null===s.parentNode||r&&s.parentNode.querySelector('input[type="radio"]:checked')))if("INPUT"!==s.tagName){for(;s!==i.currentTarget;){if("LABEL"===s.tagName&&(s.querySelector('input[type="checkbox"]')||s.querySelector('input[type="radio"]')))return;"A"===s.tagName&&s.href&&i.preventDefault(),s=s.parentNode}i.stopPropagation(),e.refine(n)}else e.refine(n)}}),e}return(0,d._)(t,e),(0,u._)(t,[{key:"shouldComponentUpdate",value:function(e){return!(0,p.n)(this.props.facetValues,e.facetValues)}},{key:"refine",value:function(e){this.lastRefinedValue=e,this.props.toggleRefinement(e)}},{key:"componentWillReceiveProps",value:function(e){this.searchBox.current&&!e.isFromSearch&&this.searchBox.current.resetInput()}},{key:"componentDidUpdate",value:function(){for(var e,t=(null===(e=this.listRef.current)||void 0===e?void 0:e.getElementsByTagName("input"))||[],n=0;n<t.length;n++)if(t[n].value===this.lastRefinedValue){t[n].focus();break}this.lastRefinedValue=void 0}},{key:"refineFirstValue",value:function(){if(!1!==this.props.searchableSelectOnSubmit){var e=this.props.facetValues&&this.props.facetValues[0];if(e){var t=e.value;this.props.toggleRefinement(t)}}}},{key:"render",value:function(){var e=this,t=(0,a.cx)(this.props.cssClasse
1s.showMore,!(!0===this.props.showMore&&this.props.canToggleShowMore)&&this.props.cssClasses.disabledShowMore),n=!0===this.props.showMore&&(0,s.h)(N,(0,i._)((0,r._)({},this.props.templateProps),{templateKey:"showMoreText",rootTagName:"button",rootProps:{className:t,disabled:!this.props.canToggleShowMore,onClick:this.props.toggleShowMore,"aria-expanded":Boolean(this.props.isShowingMore),"aria-label":this.props.showMoreButtonLabel},data:{isShowingMore:this.props.isShowingMore}})),o=!0!==this.props.searchIsAlwaysActive&&!(this.props.isFromSearch||!this.props.hasExhaustiveItems),c=this.props.searchFacetValues&&(0,s.h)("div",{className:this.props.cssClasses.searchBox},(0,s.h)(Ye,{ref:this.searchBox,placeholder:this.props.searchPlaceholder,disabled:o,cssClasses:this.props.cssClasses.searchable,templates:this.props.searchBoxTemplateProps.templates,onChange:function(t){return e.props.searchFacetValues(t.target.value)},onReset:function(){return e.props.searchFacetValues("")},onSubmit:function(){return e.refineFirstValue()},searchAsYouType:!1,ariaLabel:"Search for filters"})),u=this.props.facetValues&&this.props.facetValues.length>0&&(0,s.h)("ul",{ref:this.listRef,className:this.props.cssClasses.list},this.props.facetValues.map(this._generateFacetItem,this)),l=this.props.searchFacetValues&&this.props.isFromSearch&&(!this.props.facetValues||0===this.props.facetValues.length)&&(0,s.h)(N,(0,i._)((0,r._)({},this.props.templateProps),{templateKey:"searchableNoResults",rootProps:{className:this.props.cssClasses.noResults}})),d=(0,a.cx)(this.props.cssClasses.root,(!this.props.facetValues||0===this.props.facetValues.length)&&this.props.cssClasses.noRefinementRoot,this.props.className);return(0,s.h)("div",{className:d},this.props.children,c,u,l,n)}}]),t}(s.uA);(0,l._)(et,"defaultProps",{cssClasses:{},depth:0});n(32092);function tt(e,t){return e.toLocaleString(t)}(0,Q.V)({name:"hierarchical-menu"}),(0,W.s)("HierarchicalMenu"),n(50595),n(70561),n(58467),n(35984),n(10793);n(86288),n(65314),(0,Q.V)({name:"hits"}),(0,a._P)({createElement:s.h,Fragment:s.FK});function nt(e){var t=e.currentValue,n=e.options,r=e.cssClasses,i=e.setValue,o=e.ariaLabel;return(0,s.h)("select",{className:(0,a.cx)(r.select),onChange:function(e){return i(e.target.value)},value:"".concat(t),"aria-label":o},n.map(function(e){return(0,s.h)("option",{className:(0,a.cx)(r.option),key:e.label+e.value,value:"".concat(e.value)},e.label)}))}var rt=n(84267),it=(0,Q.V)({name:"hits-per-page"}),at=(0,W.s)("HitsPerPage"),st=function(e){var t=e||{},n=t.container,o=t.items,c=t.cssClasses,u=void 0===c?{}:c,l=t.transformItems;if(!n)throw new Error(it("The `container` option is required."));var d=L(n),h={root:(0,a.cx)(at(),u.root),select:(0,a.cx)(at({descendantName:"select"}),u.select),option:(0,a.cx)(at({descendantName:"option"}),u.option)},f=function(e){var t=e.containerNode,n=e.cssClasses;return function(e,r){var i=e.items,a=e.refine;if(!r){var o=(0,we.I)(i,function(e){return e.isRefined})||{},c=o.value;(0,s.XX)((0,s.h)("div",{className:n.root},(0,s.h)(nt,{cssClasses:n,currentValue:c,options:i,setValue:a})),t)}}}
1({containerNode:d,cssClasses:h}),m=(0,rt.A)(f,function(){return(0,s.XX)(null,d)});return(0,i._)((0,r._)({},m({items:o,transformItems:l})),{$$widgetType:"ais.hitsPerPage"})};n(79703),(0,Q.V)({name:"infinite-hits"}),(0,W.s)("InfiniteHits"),n(47535),(0,Q.V)({name:"menu"}),(0,W.s)("Menu");(0,Q.V)({name:"menu-select"}),(0,W.s)("MenuSelect"),n(94348),(0,Q.V)({name:"numeric-menu"}),(0,W.s)("NumericMenu");n(71835),(0,W.s)("Pagination"),(0,Q.V)({name:"pagination"});(0,Q.V)({name:"panel"}),(0,W.s)("Panel"),(0,$.CI)(function(e){var t=e||{},n=t.placesReference,a=t.defaultPosition,s=void 0===a?[]:a,o=(0,y._)(t,["placesReference","defaultPosition"]);if("function"!=typeof n)throw new Error("The `placesReference` option requires a valid Places.js reference.");var c=n(o),u={query:"",initialLatLngViaIP:void 0,isInitialLatLngViaIPSet:!1};return{$$type:"ais.places",$$widgetType:"ais.places",init:function(e){var t=e.helper;c.on("change",function(e){var n=e.suggestion,r=n.value,i=n.latlng,a=i.lat,s=i.lng;u.query=r,t.setQueryParameter("insideBoundingBox",void 0).setQueryParameter("aroundLatLngViaIP",!1).setQueryParameter("aroundLatLng","".concat(a,",").concat(s)).search()}),c.on("clear",function(){u.query="",t.setQueryParameter("insideBoundingBox",void 0),s.length>1?t.setQueryParameter("aroundLatLngViaIP",!1).setQueryParameter("aroundLatLng",s.join(",")):t.setQueryParameter("aroundLatLngViaIP",u.initialLatLngViaIP).setQueryParameter("aroundLatLng",void 0),t.search()})},getWidgetUiState:function(e,t){var n=t.searchParameters.aroundLatLng||s.join(",");return n!==s.join(",")||u.query?(0,i._)((0,r._)({},e),{places:{query:u.query,position:n}}):(e.places,(0,y._)(e,["places"]))},getWidgetSearchParameters:function(e,t){var n=t.uiState.places||{},r=n.query,i=void 0===r?"":r,a=n.position,o=void 0===a?s.join(","):a;return u.query=i,u.isInitialLatLngViaIPSet||(u.isInitialLatLngViaIPSet=!0,u.initialLatLngViaIP=e.aroundLatLngViaIP),c.setVal(i),c.close(),e.setQueryParameter("insideBoundingBox",void 0).setQueryParameter("aroundLatLngViaIP",!1).setQueryParameter("aroundLatLng",o||void 0)},getRenderState:function(e,t){return(0,i._)((0,r._)({},e),{places:this.getWidgetRenderState(t)})},getWidgetRenderState:function(){return{widgetParams:e}}}}),n(15080),(0,W.s)("PoweredBy"),(0,Q.V)({name:"powered-by"});var ot=n(48312),ct=((0,Q.V)({name:"query-rule-context"}),function(e){var t=e.cssClasses,n=e.templates,r=e.items;return(0,s.h)(N,{templateKey:"default",templates:n,rootProps:{className:t.root},data:{items:r}})}),ut={default:function(e){var t=e.items;return JSON.stringify(t,null,2)}},lt=(0,Q.V)({name:"query-rule-custom-data"}),dt=(0,W.s)("QueryRuleCustomData"),ht=function(e){var t=e||{},n=t.container,o=t.cssClasses,c=void 0===o?{}:o,u=t.templates,l=void 0===u?{}:u,d=t.transformItems,h=void 0===d?function(e){return e}:d;if(!n)throw new Error(lt("The `container` option is required."));var f={root:(0,a.cx)(dt(),c.root)},m=L(n),p=(0,r._)({},ut,l),g=function(e){var t=e.containerNode,n=e.cssClasses,r=e.templates;return function(e){var i=e.items;(0,s.XX)((0,s.h)(ct,{cssClasses:n,templates:r,items:i}),t)}}({containerNode:m,cssClasses:f,renderState:{},templates:p}),v=(0,ot.A)(g,function(){(0,s.XX)(null,m)});return(0,i._)((0,r._)({},v({transformItems:h})),{$$widgetType:"ais.queryRuleCustomData"})};n(86566),(0,Q.V)({name:"related-products"}),(0,a.re)({createElement:s.h,Fragment:s.FK});n(16595),(0,Q.V)({name:"range-input"}),(0,W.s)("RangeInput");var ft=40,mt=35,pt=27,gt=36,vt=37,yt=34,_t=33,St=39,Rt=38,wt=100;function bt(e,t,n){return(e-t)/(n-t)*100}function xt(e,t,n){var r=e/100;return 0===e?t:100===e?n:Math.round((n-t)*r+t)}function Pt(e){return["rheostat","vertical"===e.orientation?"rheostat-vertical":"rheostat-horizontal"].concat(e.className.split(" ")).join(" ")}function It(e){return Number(e.currentTarget.getAttribute("data-handle-key"))}function Ft(e){e.stopPropagation(),e.preventDefault()}var Et=function(e){function t(){var e;return(0,c._)(this,t),e=(0,o._)(this,t,arguments),(0,l._)(e,"x",[0,0].map(function(e){return e})),(0,l._)(e,"state",{className:Pt(e.props),handlePos:e.props.values.map(function(t){return bt(t,e.props.min,e.props.max)}
1),handleDimensions:0,mousePos:null,sliderBox:{},slidingIndex:null,values:e.props.values}),(0,l._)(e,"rheostat",(0,s._3)()),(0,l._)(e,"componentWillReceiveProps",function(t){var n=e.props,r=n.className,i=n.disabled,a=n.min,s=n.max,o=n.orientation,c=e.state,u=c.values,l=c.slidingIndex,d=t.min!==a||t.max!==s,h=u.length!==t.values.length||u.some(function(e,n){return t.values[n]!==e}),f=t.className!==r||t.orientation!==o,m=t.disabled&&!i;f&&e.setState({className:Pt(t)}),(d||h)&&e.updateNewValues(t),m&&null!==l&&e.endSlide()}),(0,l._)(e,"getPublicState",function(){var t=e.props,n=t.min;return{max:t.max,min:n,values:e.state.values}}),(0,l._)(e,"getSliderBoundingBox",function(){var t=e.rheostat.current,n=t.getBoundingClientRect();return{height:n.height||t.clientHeight,left:n.left,top:n.top,width:n.width||t.clientWidth}}),(0,l._)(e,"getProgressStyle",function(t){var n=e.state.handlePos,r=n[t];if(0===t)return"vertical"===e.props.orientation?{height:"".concat(r,"%"),top:0}:{left:0,width:"".concat(r,"%")};var i=n[t-1],a=r-i;return"vertical"===e.props.orientation?{height:"".concat(a,"%"),top:"".concat(i,"%")}:{left:"".concat(i,"%"),width:"".concat(a,"%")}}),(0,l._)(e,"getMinValue",function(t){return e.state.values[t-1]?Math.max(e.props.min,e.state.values[t-1]):e.props.min}),(0,l._)(e,"getMaxValue",function(t){return e.state.values[t+1]?Math.min(e.props.max,e.state.values[t+1]):e.props.max}),(0,l._)(e,"getHandleDimensions",function(t,n){var r=t.currentTarget||null;return r?"vertical"===e.props.orientation?r.clientHeight/n.height*wt/2:r.clientWidth/n.width*wt/2:0}),(0,l._)(e,"getClosestSnapPoint",function(t){return e.props.snapPoints.length?e.props.snapPoints.reduce(function(e,n){return Math.abs(e-t)<Math.abs(n-t)?e:n}):t}),(0,l._)(e,"getSnapPosition",function(t){if(!e.props.snap)return t;var n=e.props,r=n.max,i=n.min,a=xt(t,i,r);return bt(e.getClosestSnapPoint(a),i,r)}),(0,l._)(e,"getNextPositionForKey",function(t,n){var r=e.state,i=r.handlePos,a=r.values,s=e.props,o=s.max,c=s.min,u=s.snapPoints,d=Boolean(e.props.snap&&u.length),h=a[t],f=i[t],m=f,p=1;o>=100?f=Math.round(f):p=100/(o-c);var g,v=null;d&&(v=u.indexOf(e.getClosestSnapPoint(a[t])));var y=(g={},(0,l._)(g,vt,function(e){return-1*e}),(0,l._)(g,St,function(e){return e}),(0,l._)(g,Rt,function(e){return e}),(0,l._)(g,ft,function(e){return-1*e}),(0,l._)(g,yt,function(e){return e>1?-e:-10*e}),(0,l._)(g,_t,function(e){return e>1?e:10*e}),g);if(Object.prototype.hasOwnProperty.call(y,n))f+=y[n](p),d&&v&&(f>m?v<u.length-1&&(h=u[v+1]):v>0&&(h=u[v-1]));else if(n===gt)f=0,d&&(h=u[0]);else{if(n!==mt)return null;f=wt,d&&(h=u[u.length-1])}return d?bt(h,c,o):f}),(0,l._)(e,"getNextState",function(t,n){var r=e.state.handlePos,i=e.props,a=i.max,s=i.min,o=e.validatePosition(t,n),c=r.map(function(e,n){return n===t?o:e});return{handlePos:c,values:c.map(function(e){return xt(e,s,a)})}}),(0,l._)(e,"getClosestHandle",function(t){var n=e.state.handlePos;return n.reduce(function(e,r,i){return Math.abs(n[i]-t)<Math.abs(n[e]-t)?i:e},0)}),(0,l._)(e,"setStartSlide",function(t,n,r){var i=e.getSliderBoundingBox();e.setState({handleDimensions:e.getHandleDimensions(t,i),mousePos:{x:n,y:r},sliderBox:i,slidingIndex:It(t)})}),(0,l._)(e,"startMouseSlide",function(t){e.setStartSlide(t,t.clientX,t.clientY),document.addEventListener("mousemove",e.handleMouseSlide,!1),document.addEventListener("mouseup",e.endSlide,!1),Ft(t)}),(0,l._)(e,"startTouchSlide",function(t){if(!(t.changedTouches.length>1)){var n=t.changedTouches[0];e.setStartSlide(t,n.clientX,n.clientY),document.addEventListener("touchmove",e.handleTouchSlide,!1),document.addEventListener("touchend",e.endSlide,!1),e.props.onSliderDragStart&&e.props.onSliderDragStart(),Ft(t)}}),(0,l._)(e,"handleMouseSlide",function(t){null!==e.state.slidingIndex&&(e.handleSlide(t.clientX,t.clientY),Ft(t))}),(0,l._)(e,"handleTouchSlide",function(t){if(null!==e.state.slidingIndex)if(t.changedTouches.length>1)e.endSlide();else{var n=t.changedTouches[0];e.handleSlide(n.clientX,n.clientY),Ft(t)}}),(0,l._)(e,"handleSlide",function(t,n){var r=e.state,i=r.slidingIndex,a=r.sliderBox,s="vertical"===e.props.orientation?(n-a.top)/a.height*wt:(t-a.left)/a.width*wt;e.slideTo(i,s),e.canMove(i,s)&&(e.setState({mousePos:{x:t,y:n}}),e.props.onSliderDragMove&&e.props.onSliderDragMove())}),(0,l._)(e,"endSlide",function(){var t=e.state.slidingIndex;if(e.setState({slidingIndex:null}),document.removeEventListener("mouseup",e.endSlide,!1),document.removeEventListener("touchend",e.endSlide,!1),document.removeEventListener("touchmove",e.handleTouchSlide,!1),document.removeEventListener("mousemove",e.handleMouseSlide,!1),e.props.onSliderDragEnd&&e.props.onSliderDragEnd(),e.props.snap){var n=e.getSnapPosition(e.state.handlePos[t]);e.slideTo(t,n,function(){return e.fireChangeEvent()})}else e.fireChangeEvent()}),(0,l._)(e,"handleClick",function(t){if(!t.target.getAttribute("data-handle-key")){var n=e.getSliderBoundingBox(),r=("vertical"===e.props.orientation?(t.clientY-n.top)/n.height:(t.clientX-n.left)/n.width)*wt,i=e.getClosestHandle(r),a=e.getSnapPosition(r);e.slideTo(i,a,function(){return e.fireChangeEvent()}),e.props.onClick&&e.props.onClick()}}),(0,l._)(e,"handleKeydown",function(t){var n=It(t);if(t.keyCode!==pt){var r=e.getNextPositionForKey(n,t.keyCode);null!==r&&(e.canMove(n,r)&&(e.slideTo(n,r,function(){return e.fireChangeEvent()}),e.props.onKeyPress&&e.props.onKeyPress()),Ft(t))}else t.currentTarget.blur()}),(0,l._)(e,"validatePosition",function(t,n){var r=e.state,i=r.handlePos,a=r.handleDimensions;return Math.max(Math.min(n,void 0!==i[t+1]?i[t+1]-a:wt),void 0!==i[t-1]?i[t-1]+a:0)}),(0,l._)(e,"validateValues",function(t,n){var r=n||e.props,i=r.max,a=r.min;return t.map(function(e,t,n){var r=Math.max(Math.min(e,i),a);return n.length&&r<n[t-1]?n[t-1]:r})}),(0,l._)(e,"canMove",function(t,n){var r=e.state,i=r.handlePos,a=r.handleDimensions;return!(n<0)&&(!(n>wt)&&(!(n>(void 0!==i[t+1]?i[t+1]-a:1/0))&&!(n<(void 0!==i[t-1]?i[t-1]+a:-1/0))))}),(0,l._)(e,"fireChangeEvent",function(){var t=e.props.onChange;t&&t(e.getPublicState())}),(0,l._)(e,"slideTo",function(t,n,r){var i=e.getNextState(t,n);e.setState(i,function(){var t=e.props.onValuesUpdated;t&&t(e.getPublicState()),r&&r()})}),(0,l._)(e,"updateNewValues",function(t){if(null===e.state.slidingIndex){var n=t.max,r=t.min,i=t.values,a=e.validateValues(i,t);e.setState({handlePos:a.map(function(e){return bt(e,r,n)}),values:a},function(){return e.fireChangeEvent()})}}),(0,l._)(e,"render",function(){var t=e.props,n=t.children,r=t.disabled,i=t.handle,a=t.max,o=t.min,c=t.orientation,u=t.pitComponent,l=t.pitPoints,d=t.progressBar,h=e.state,f=h.className,m=h.handlePos,p=h.values;return(0,s.h)("div",{className:f,ref:e.rheostat,onClick:r?void 0:e.handleClick,style:{position:"relative"}}
1,(0,s.h)("div",{className:"rheostat-background"}),m.map(function(t,n){var a="vertical"===c?{top:"".concat(t,"%"),position:"absolute"}:{left:"".concat(t,"%"),position:"absolute"};return(0,s.h)(i,{"aria-valuemax":e.getMaxValue(n),"aria-valuemin":e.getMinValue(n),"aria-valuenow":p[n],"aria-disabled":r,"data-handle-key":n,className:"rheostat-handle",key:"handle-".concat(n),onClick:Ft,onKeyDown:r?void 0:e.handleKeydown,onMouseDown:r?void 0:e.startMouseSlide,onTouchStart:r?void 0:e.startTouchSlide,role:"slider",style:a,tabIndex:0})}),m.map(function(t,n,r){return 0===n&&r.length>1?null:(0,s.h)(d,{className:"rheostat-progress",key:"progress-bar-".concat(n),style:e.getProgressStyle(n)})}),u&&l.map(function(e){var t=bt(e,o,a),n="vertical"===c?{top:"".concat(t,"%"),position:"absolute"}:{left:"".concat(t,"%"),position:"absolute"};return(0,s.h)(u,{key:"pit-".concat(e),style:n},e)}),n)}),e}return(0,d._)(t,e),t}(s.uA);(0,l._)(Et,"defaultProps",{className:"",children:null,disabled:!1,handle:function(e){return(0,s.h)("button",(0,i._)((0,r._)({},e),{type:"button"}))},max:wt,min:0,onClick:null,onChange:null,onKeyPress:null,onSliderDragEnd:null,onSliderDragMove:null,onSliderDragStart:null,onValuesUpdated:null,orientation:"horizontal",pitComponent:null,pitPoints:[],progressBar:"div",snap:!1,snapPoints:[],values:[0]});n(13148),(0,Q.V)({name:"range-slider"}),(0,W.s)("RangeSlider"),n(58892);(0,Q.V)({name:"rating-menu"}),(0,W.s)("RatingMenu"),n(57052),(0,Q.V)({name:"refinement-list"}),(0,W.s)("RefinementList"),(0,W.s)("SearchBox"),n(60284),(0,Q.V)({name:"relevant-sort"}),(0,W.s)("RelevantSort"),(0,Q.V)({name:"search-box"}),(0,W.s)("SearchBox"),(0,W.s)("AiModeButton");var Tt=n(10014),At=(0,Q.V)({name:"sort-by"}),jt=(0,W.s)("SortBy"),Ct=function(e){var t=e||{},n=t.container,o=t.items,c=t.cssClasses,u=void 0===c?{}:c,l=t.transformItems;if(!n)throw new Error(At("The `container` option is required."));var d=L(n),h={root:(0,a.cx)(jt(),u.root),select:(0,a.cx)(jt({descendantName:"select"}),u.select),option:(0,a.cx)(jt({descendantName:"option"}),u.option)},f=function(e){var t=e.containerNode,n=e.cssClasses;return function(e,r){var i=e.currentRefinement,a=e.options,o=e.refine;r||(0,s.XX)((0,s.h)("div",{className:n.root},(0,s.h)(nt,{cssClasses:n,currentValue:i,options:a,setValue:o,ariaLabel:"Sort results by"})),t)}}
1({containerNode:d,cssClasses:h}),m=(0,Tt.A)(f,function(){return(0,s.XX)(null,d)});return(0,i._)((0,r._)({},m({container:d,items:o,transformItems:l})),{$$widgetType:"ais.sortBy"})},Ot=187==n.j?{position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0}:null;var Nt=function(e){var t=e.nbHits,n=e.nbSortedHits,o=e.areHitsSorted,c=e.cssClasses,u=e.templateProps,l=(0,y._)(e,["nbHits","nbSortedHits","areHitsSorted","cssClasses","templateProps"]),d=function(e,t,n){if(n){var r="sorted out of ".concat(tt(e));return 0===t?"No relevant results ".concat(r):1===t?"1 relevant result ".concat(r):"".concat(tt(t||0)," relevant results ").concat(r)}return 0===e?"No results":1===e?"1 result":"".concat(tt(e)," results")}(t,n,o),h=(0,K._)((0,X.J0)(""),2),f=h[0],m=h[1],p=(0,X.li)(),g=(0,X.li)(!0);return(0,X.vJ)(function(){if(!g.current)return clearTimeout(p.current),p.current=setTimeout(function(){m(d)},1400),function(){return clearTimeout(p.current)};g.current=!1},[d]),(0,s.h)("div",{className:(0,a.cx)(c.root)},(0,s.h)(N,(0,i._)((0,r._)({},u),{templateKey:"text",rootTagName:"span",rootProps:{className:c.text},data:(0,r._)({hasManySortedResults:n&&n>1,hasNoSortedResults:0===n,hasOneSortedResults:1===n,hasManyResults:t>1,hasNoResults:0===t,hasOneResult:1===t,nbHits:t,nbSortedHits:n,areHitsSorted:o,cssClasses:c},l)})),(0,s.h)("span",{className:"ais-Stats-announcement",role:"status","aria-live":"polite","aria-atomic":"true",style:Ot},f))},Ht=n(2863),kt=(0,Q.V)({name:"stats"}),Wt=(0,W.s)("Stats"),Dt=187==n.j?{text:function(e){return"".concat(e.areHitsSorted?function(e){var t=e.nbHits,n=e.hasNoSortedResults,r=e.hasOneSortedResults,i=e.hasManySortedResults,a=e.nbSortedHits,s="sorted out of ".concat(tt(t));if(n)return"No relevant results ".concat(s);if(r)return"1 relevant result ".concat(s);if(i)return"".concat(tt(a||0)," relevant results ").concat(s);return""}(e):function(e){var t=e.nbHits,n=e.hasNoResults,r=e.hasOneResult,i=e.hasManyResults;if(n)return"No results";if(r)return"1 result";if(i)return"".concat(tt(t)," results");return""}(e)," found in ").concat(e.processingTimeMS,"ms")}}:null;var Lt=function(e){var t=e||{},n=t.container,o=t.cssClasses,c=void 0===o?{}:o,u=t.templates,l=void 0===u?{}:u;if(!n)throw new Error(kt("The `container` option is required."));var d=L(n),h={root:(0,a.cx)(Wt(),c.root),text:(0,a.cx)(Wt({descendantName:"text"}),c.text)},f=function(e){var t=e.renderState,n=e.cssClasses,r=e.containerNode,i=e.templates;return function(e,a){var o=e.hitsPerPage,c=e.nbHits,u=e.nbSortedHits,l=e.areHitsSorted,d=e.nbPages,h=e.page,f=e.processingTimeMS,m=e.query,p=e.instantSearchInstance;a?t.templateProps=q({defaultTemplates:Dt,templatesConfig:p.templatesConfig,templates:i}):(0,s.XX)((0,s.h)(Nt,{cssClasses:n,hitsPerPage:o,nbHits:c,nbSortedHits:u,areHitsSorted:l,nbPages:d,page:h,processingTimeMS:f,query:m,templateProps:t.templateProps}),r)}}
1({containerNode:d,cssClasses:h,templates:l,renderState:{}}),m=(0,Ht.A)(f,function(){return(0,s.XX)(null,d)});return(0,i._)((0,r._)({},m({})),{$$widgetType:"ais.stats"})};n(52466),(0,Q.V)({name:"toggle-refinement"}),(0,W.s)("ToggleRefinement"),n(24304),(0,Q.V)({name:"trending-facets"}),(0,a.Rv)({createElement:s.h,Fragment:s.FK});n(89324),(0,Q.V)({name:"trending-items"}),(0,a.VF)({createElement:s.h,Fragment:s.FK});n(47199),(0,Q.V)({name:"voice-search"}),(0,W.s)("VoiceSearch"),n(63199),(0,Q.V)({name:"frequently-bought-together"}),(0,a.kn)({createElement:s.h,Fragment:s.FK}),n(83170),(0,Q.V)({name:"looking-similar"}),(0,a.w4)({createElement:s.h,Fragment:s.FK});n(41578),n(49550),new WeakSet,new WeakMap;(0,a.Bq)({useCallback:X.hb,useEffect:X.vJ,useMemo:X.Kr,useRef:X.li,useState:X.J0}),(0,a.ke)({createElement:s.h,Fragment:s.FK,useEffect:X.vJ,useRef:X.li});(0,Q.V)({name:"chat"}),(0,a.Mo)({createElement:s.h,Fragment:s.FK,useMemo:X.Kr,useState:X.J0,useEffect:X.vJ});n(68054),(0,Q.V)({name:"prompt-suggestions"}),(0,a.Xg)({createElement:s.h,Fragment:"fragment"}),n(41267),(0,Q.V)({name:"chatTrigger"}),(0,a.i1)({createElement:s.h,Fragment:s.FK});n(84886),(0,Q.V)({name:"filter-suggestions"}),(0,a.pp)({createElement:s.h,Fragment:"fragment"}),(0,$.CI)(B),(0,$.CI)(function(e){var t=(0,Ve.A)(ee.l);return(0,i._)((0,r._)({},t(e)),{$$widgetType:"ais.configureRelatedItems"})}),(0,$.CI)(function(e){var t=e||{},n=t.container,a=t.widgets,s=t.fallbackWidget,o=(0,y._)(t,["container","widgets","fallbackWidget"]);if(!n)throw new Error(Ke("The `container` option is required."));if(!(a&&Array.isArray(a)&&a.every(function(e){return"function"==typeof e})))throw new Error(Ke("The `widgets` option expects an array of callbacks."));var c=L(n),u=document.createElement("div");u.className=Xe();var l=new Map,d=[],h=(0,Me.A)(function(e,t){var n=e.attributesToRender;t&&c.appendChild(u),n.forEach(function(e){if(l.has(e)){var t=l.get(e);u.appendChild(t)}})},function(){c.removeChild(u)})((0,i._)((0,r._)({},o),{widgets:d,fallbackWidget:"function"==typeof s?function(e){var t=e.attribute,n=Je(u);return l.set(t,n),s({attribute:t,container:n})}:void 0}));return(0,i._)((0,r._)({},h),{init:function(e){a.forEach(function(t){var n=Je(u),r=t(n),i=(0,Be.z)(r,e);l.set(i,n),d.push(r)}),h.init(e)},$$widgetType:"ais.dynamicWidgets"})}),(0,$.CI)(function(e){var t=e||{},n="indices"in t?t.indices:void 0,o="feeds"in t?t.feeds:void 0,c=void 0!==o,u=t.container,l=t.escapeHTML,d=t.showQuerySuggestions,m=t.showPromptSuggestions,p=t.showRecent,g=t.searchParameters,v=t.requiresSearch,_=void 0===v||v,S=t.getSearchPageURL,R=t.onSelect,w=t.templates,b=void 0===w?{}:w,x=t.transformItems,I=t.cssClasses,F=void 0===I?{}:I,E=t.placeholder,T=t.autofocus,A=t.detachedMediaQuery,j=t.translations,C=void 0===j?{}:j,O=t.aiMode;if(c&&void 0!==n)throw new Error(xe("The `feeds` and `indices` options are mutually exclusive."));if(!u)throw new Error(xe("The `container` option is required."));var H=L(u),k=(0,r._)({hitsPerPage:5},g),W={root:(0,a.cx)(Pe(),F.root)},D=c?null==d?void 0:d.feedID:null==d?void 0:d.indexName,U=c?null==m?void 0:m.feedID:null==m?void 0:m.indexName,Q=c?o.map(function(e){return{indexName:e.feedID,templates:e.templates,cssClasses:e.cssClasses,getURL:e.getURL,getQuery:e.getQuery}}):(0,f._)(null!=n?n:[]);if(D){var $,V,M,B,K=c?void 0:(0,r._)({hitsPerPage:3},d.searchParameters);Q.unshift({indexName:D,templates:(0,r._)({item:function(e){var t=e.item,n=e.onSelect,r=e.onApply;return(0,s.h)(Te,{item:t,onSelect:n,onApply:r},(0,s.h)($e,{item:t}))}}
1,d.templates),cssClasses:{root:(0,a.cx)("ais-AutocompleteSuggestions",null==d||null===($=d.cssClasses)||void 0===$?void 0:$.root),list:(0,a.cx)("ais-AutocompleteSuggestionsList",null==d||null===(V=d.cssClasses)||void 0===V?void 0:V.list),header:(0,a.cx)("ais-AutocompleteSuggestionsHeader",null==d||null===(M=d.cssClasses)||void 0===M?void 0:M.header),item:(0,a.cx)("ais-AutocompleteSuggestionsItem",null==d||null===(B=d.cssClasses)||void 0===B?void 0:B.item)},searchParameters:K,getQuery:function(e){return e.query},getURL:d.getURL})}if(U){var X,Z,ne,re,ie=c?void 0:(0,r._)({hitsPerPage:3},m.searchParameters);Q.push({indexName:U,templates:(0,r._)({item:function(e){var t=e.item,n=e.onSelect;return(0,s.h)(Ae,{item:t,onSelect:n},function(e){var t,n=e.item,r=e.attribute;if(!(null===(t=n._highlightResult)||void 0===t?void 0:t[r])||"none"===n._highlightResult[r].matchLevel)return n[r];return(0,s.h)(P,{attribute:r,hit:n})}({item:t,attribute:"prompt"}))}},m.templates),cssClasses:{root:(0,a.cx)("ais-AutocompletePromptSuggestions",null==m||null===(X=m.cssClasses)||void 0===X?void 0:X.root),list:(0,a.cx)("ais-AutocompletePromptSuggestionsList",null==m||null===(Z=m.cssClasses)||void 0===Z?void 0:Z.list),header:(0,a.cx)("ais-AutocompletePromptSuggestionsHeader",null==m||null===(ne=m.cssClasses)||void 0===ne?void 0:ne.header),item:(0,a.cx)("ais-AutocompletePromptSuggestionsItem",null==m||null===(re=m.cssClasses)||void 0===re?void 0:re.item)},searchParameters:ie,getQuery:function(e){return e.prompt},getURL:m.getURL})}var ae,se=d?c?(0,i._)((0,r._)({},d),{indexName:D}):d:void 0,oe=m?c?(0,i._)((0,r._)({},m),{indexName:U}):m:void 0,ce=c?function(e){var t=e.map(function(e){return(0,i._)((0,r._)({},e),{indexName:e.indexId})});return x?x(t):t}:x,ue=++be,le=_?"search":"none",de=function(){return(0,i._)((0,r._)({},(0,Se.A)(function(){return null})({})),{dependsOn:le})},he=p||void 0,fe="boolean"==typeof he?{}:he,me=(0,r._)({},Le,C),pe=null,ge=null,_e=!1,we=function(e){var t=e.instanceId,n=e.containerNode,a=(0,y._)(e,["instanceId","containerNode"]);return function(e,o){if(o){var c=a.showRecent,u=e.instantSearchInstance.mainIndex,l=e.instantSearchInstance.mainIndex;(0,Re.Q)(l,function(e){e.getIndexId()==="ais-autocomplete-".concat(t)&&(u=e,l=e.parent)});var d=function(e){var t=e.item,n=e.onSelect,r=e.onApply,i=e.onRemoveRecentSearch;return(0,s.h)(Ce,{item:t,onSelect:n,onApply:r,onRemoveRecentSearch:i},(0,s.h)($e,{item:t}))},h=void 0;if(c&&c.templates){var f=q({defaultTemplates:{},templatesConfig:e.instantSearchInstance.templatesConfig,templates:c.templates});c.templates.item&&(d=function(e){var t=e.item,n=e.onSelect,a=e.onRemoveRecentSearch;return(0,s.h)(N,(0,i._)((0,r._)({},f),{templateKey:"item",rootTagName:"fragment",data:{item:t,onSelect:n,onRemoveRecentSearch:a}}))}),c.templates.header&&(h=function(e){var t=e.items;return(0,s.h)(N,(0,i._)((0,r._)({},f),{templateKey:"header",rootTagName:"fragment",data:{items:t}}))})}a.renderState={indexTemplateProps:[],isolatedIndex:u,targetIndex:l,templateProps:q({defaultTemplates:{},templatesConfig:e.instantSearchInstance.templatesConfig,templates:a.templates}),RecentSearchComponent:d,recentSearchHeaderComponent:h,hasWarnedMissingPromptSuggestionsChat:!1}}(0,s.XX)((0,s.h)(Qe,(0,r._)({},a,e)),n)}}({instanceId:ue,containerNode:H,activate:function(){var e;if(!_e&&ae&&pe&&ge){_e=!0,ae.addWidgets([pe]),ge.scheduleSearch.cancel();var t,n=null===(e=ae.getHelper())||void 0===e?void 0:e.state.query;if(n)null===(t=pe.getHelper())||void 0===t||t.setQuery(n);pe.scheduleLocalSearch()}}
1,indicesConfig:Q,getSearchPageURL:S,onSelect:R,cssClasses:W,showRecent:fe,showQuerySuggestions:se,showPromptSuggestions:oe,placeholder:E,autofocus:T,detachedMediaQuery:A,translations:me,renderState:{indexTemplateProps:[],isolatedIndex:void 0,targetIndex:void 0,templateProps:void 0,RecentSearchComponent:Ce,recentSearchHeaderComponent:void 0,hasWarnedMissingPromptSuggestionsChat:!1},templates:b,aiMode:O}),Ie=(0,ye.A)(we,function(){return(0,s.XX)(null,H)});if(c){var Fe=(0,f._)(D?[D]:[]).concat((0,f._)(o.map(function(e){return e.feedID})),(0,f._)(U?[U]:[]));return[de(),Ee(function(e){if(!e.compositionID)throw new Error(xe("feeds-mode requires a composition-based InstantSearch instance (compositionID must be set)."));var t=ve({indexName:e.compositionID,indexId:"ais-autocomplete-".concat(ue),isolated:!0}),n=Fe.map(function(n){return function(e,t,n){var r=[],i=!1,a={$$type:"ais.feedContainer",$$widgetType:"ais.feedContainer",_isolated:!0,getIndexName:function(){return t.getIndexName()},getIndexId:function(){return e},getHelper:function(){return t.getHelper()},getResults:function(){var n=t.getResults();if(!n)return null;if(!n.feeds)return""===e?(n._state=t.getHelper().state,n):null;var r=n.feeds.find(function(t){return t.feedID===e});return r?(r._state=t.getHelper().state,r):null},getResultsForWidget:function(){return this.getResults()},getParent:function(){return t},getWidgets:function(){return r},getScopedResults:function(){return t.getScopedResults()},getPreviousState:function(){return null},createURL:function(e){return t.createURL(e)},scheduleLocalSearch:function(){return t.scheduleLocalSearch()},addWidgets:function(e){var s=e.reduce(function(e,t){return e.concat(Array.isArray(t)?t:[t])},[]);if(s.forEach(function(e){e.parent=a}),r=r.concat(s),i){s.forEach(function(e){if(e.getRenderState){var t=e.getRenderState(n.renderState[a.getIndexId()]||{},(0,Y.eX)(n,a,n._initialUiState));(0,Y.r2)({renderState:t,instantSearchInstance:n,parent:a})}}),s.forEach(function(e){e.init&&e.init((0,Y.eX)(n,a,n._initialUiState))});var o=t.getHelper(),c=a.getWidgetSearchParameters(o.state,{uiState:{}});c!==o.state&&o.setState(c)}return a},removeWidgets:function(e){var n=e.reduce(function(e,t){return e.concat(Array.isArray(t)?t:[t])},[]),i=t.getHelper();if(!i)return r=r.filter(function(e){return!n.includes(e)}),a;var s=i.state;return n.forEach(function(e){if(e.dispose){var t=e.dispose({helper:i,state:s,recommendState:i.recommendState,parent:a});(0,h._)(t,z.RecommendParameters)||t&&(s=t)}}),r=r.filter(function(e){return!n.includes(e)}),s!==i.state&&i.setState(s),a},init:function(){i=!0,r.forEach(function(e){if(e.getRenderState){var t=e.getRenderState(n.renderState[a.getIndexId()]||{},(0,Y.eX)(n,a,n._initialUiState));(0,Y.r2)({renderState:t,instantSearchInstance:n,parent:a})}}),r.forEach(function(e){e.init&&e.init((0,Y.eX)(n,a,n._initialUiState))})},render:function(){r.forEach(function(e){if(e.getRenderState){var t=e.getRenderState(n.renderState[a.getIndexId()]||{},(0,Y.Ah)(n,a,e));(0,Y.r2)({renderState:t,instantSearchInstance:n,parent:a})}}),r.forEach(function(e){e.render&&e.render((0,Y.Ah)(n,a,e))})},dispose:function(e){var n,s=t.getHelper(),o=null!==(n=null==e?void 0:e.state)&&void 0!==n?n:null==s?void 0:s.state;return r.forEach(function(e){if(e.dispose&&s){var t=e.dispose({helper:s,state:o,recommendState:s.recommendState,parent:a});(0,h._)(t,z.RecommendParameters)||t&&(o=t)}}),r=[],i=!1,o},getWidgetState:function(e){return this.getWidgetUiState(e)},getWidgetUiState:function(e){var n=t.getHelper();return G(r,e,{searchParameters:n.state,helper:n})},getWidgetSearchParameters:function(e,t){var n=t.uiState;return r.reduce(function(e,t){return t.getWidgetSearchParameters?t.getWidgetSearchParameters(e,{uiState:n}):e},e)},updateWidget:function(e,s){var o=t.getHelper(),c=o?G(r,{},{searchParameters:o.state,helper:o}):{};e.parent=void 0,s.parent=a;var u=r.slice(),l=u.indexOf(e);if(-1===l?u.push(s):u[l]=s,r=u,!o||!i)return a;var d=o.state;if(e.dispose){var f=e.dispose({helper:o,state:d,recommendState:o.recommendState,parent:a});f&&!(0,h._)(f,z.RecommendParameters)&&(d=f)}var m=G(r,{},{searchParameters:a.getWidgetSearchParameters(d,{uiState:c}),helper:o}),p=a.getWidgetSearchParameters(d,{uiState:m});if(s.getRenderState){var g=s.getRenderState(n.renderState[a.getIndexId()]||{},(0,Y.eX)(n,a,n._initialUiState));(0,Y.r2)({renderState:g,instantSearchInstance:n,parent:a})}return s.init&&s.init((0,Y.eX)(n,a,n._initialUiState)),p!==o.state&&o.setState(p),a},refreshUiState:function(){},setIndexUiState:function(){}};return a}(n,t,e)});return t.addWidgets([te(k),(0,J.A)(ee.l,ee.l)({isolated:!1})].concat((0,f._)(n),[(0,r._)((0,i._)((0,r._)({},Ie({escapeHTML:l,transformItems:ce,future:{undefinedEmptyQuery:!0}})),{$$widgetType:"ais.autocomplete"}),O?{opensChat:!0}:{})])),t})]}return[de(),Ee(function(){return ve({indexId:"ais-autocomplete-".concat(ue),isolated:!0}).addWidgets([te(k)].concat((0,f._)(Q.map(function(e){var t=e.indexName,n=e.searchParameters;return ve({indexName:t,indexId:"ais-autocomplete-".concat(ue,"-").concat(t)}).addWidgets([te(n||{})])})),[(0,r._)((0,i._)((0,r._)({},Ie({escapeHTML:l,transformItems:ce,future:{undefinedEmptyQuery:!0}})),{$$widgetType:"ais.autocomplete"}),O?{opensChat:!0}:{})]))})];function Ee(e){return{$$type:"ais.autocomplete",$$widgetType:"ais.autocomplete",dependsOn:le,init:function(t){var n=t.instantSearchInstance,r=t.parent;ae=r,ge=n,pe=e(n),function(e,t){e({instantSearchInstance:t,indices:[],refine:ee.l,currentRefinement:"",widgetParams:{}},!0)}(we,n)},render:function(){},dispose:function(e){var t=e.parent;_e&&pe&&(null==t||t.removeWidgets([pe])),(0,s.XX)(null,H),pe=null,ae=void 0,ge=null,_e=!1}}}})}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.