import{r as C,i as Pa,R as oe}from"./index.00979935.js";import{b as Ra}from"./754a85d3.js";import{c as Oa}from"./cc9718ab.js";var pr="7.10.0";function re(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}var Dr=re;re.prototype._events=void 0;re.prototype._maxListeners=void 0;re.defaultMaxListeners=10;re.prototype.setMaxListeners=function(e){if(!wa(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this};re.prototype.emit=function(e){var t,r,n,i,a,s;if(this._events||(this._events={}),e==="error"&&(!this._events.error||ct(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var u=new Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}if(r=this._events[e],ui(r))return!1;if(_e(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:i=Array.prototype.slice.call(arguments,1),r.apply(this,i)}else if(ct(r))for(i=Array.prototype.slice.call(arguments,1),s=r.slice(),n=s.length,a=0;a<n;a++)s[a].apply(this,i);return!0};re.prototype.addListener=function(e,t){var r;if(!_e(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,_e(t.listener)?t.listener:t),this._events[e]?ct(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,ct(this._events[e])&&!this._events[e].warned&&(ui(this._maxListeners)?r=re.defaultMaxListeners:r=this._maxListeners,r&&r>0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),typeof console.trace=="function"&&console.trace())),this};re.prototype.on=re.prototype.addListener;re.prototype.once=function(e,t){if(!_e(t))throw TypeError("listener must be a function");var r=!1;function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}return n.listener=t,this.on(e,n),this};re.prototype.removeListener=function(e,t){var r,n,i,a;if(!_e(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],i=r.length,n=-1,r===t||_e(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(ct(r)){for(a=i;a-- >0;)if(r[a]===t||r[a].listener&&r[a].listener===t){n=a;break}if(n<0)return this;r.length===1?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this};re.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[e]&&delete this._events[e],this;if(arguments.length===0){for(t in this._events)t!=="removeListener"&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],_e(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this};re.prototype.listeners=function(e){var t;return!this._events||!this._events[e]?t=[]:_e(this._events[e])?t=[this._events[e]]:t=this._events[e].slice(),t};re.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(_e(t))return 1;if(t)return t.length}return 0};re.listenerCount=function(e,t){return e.listenerCount(t)};function _e(e){return typeof e=="function"}function wa(e){return typeof e=="number"}function ct(e){return typeof e=="object"&&e!==null}function ui(e){return e===void 0}function ja(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}var ci=ja,_a=Dr,xa=ci;function Ht(e,t,r){this.main=e,this.fn=t,this.recommendFn=r,this.lastResults=null,this.lastRecommendResults=null}xa(Ht,_a);Ht.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)};Ht.prototype.getModifiedState=function(e){return this.fn(e)};Ht.prototype.getModifiedRecommendState=function(e){return this.recommendFn(e)};var Fa=Ht;function $a(e){return typeof e!="string"?e:String(e).replace(/^-/,"\\-")}function Ea(e){return typeof e!="string"?e:e.replace(/^\\-/,"-")}var Nr={escapeFacetValue:$a,unescapeFacetValue:Ea};function Ta(e){return typeof e=="object"&&e!==null?Lr(Array.isArray(e)?[]:{},e):e}function Kt(e){return typeof e=="function"||Array.isArray(e)||Object.prototype.toString.call(e)==="[object Object]"}function Lr(e,t){if(e===t)return e;for(var r in t)if(!(!Object.prototype.hasOwnProperty.call(t,r)||r==="__proto__"||r==="constructor")){var n=t[r],i=e[r];typeof i!="undefined"&&typeof n=="undefined"||(Kt(i)&&Kt(n)?e[r]=Lr(i,n):e[r]=Ta(n))}return e}function Ia(e){Kt(e)||(e={});for(var t=1,r=arguments.length;t<r;t++){var n=arguments[t];Kt(n)&&Lr(e,n)}return e}var Xt=Ia;function Aa(e){return e&&Object.keys(e).length>0}var Ur=Aa;function Ca(e,t){if(e===null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var Wr=Ca;function at(e){e=e||{},this.params=e.params||[]}at.prototype={constructor:at,addParams:function(e){var t=this.params.slice();return t.push(e),new at({params:t})},removeParams:function(e){return new at({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(r){return t[r.$$id]===void 0}).map(function(r){var n=Object.assign({},r,{indexName:e});return delete n.$$id,n})}};var fi=at;function vr(e,t){this._state=e,this._rawResults={};var r=this;e.params.forEach(function(n){var i=n.$$id;r[i]=t[i],r._rawResults[i]=t[i]})}vr.prototype={constructor:vr};var li=vr,rr=Xt;function nr(e){return Object.keys(e).sort().reduce(function(t,r){return t[r]=e[r],t},{})}var fe={_getQueries:function(t,r){var n=[];return n.push({indexName:t,params:fe._getHitsSearchParams(r)}),r.getRefinedDisjunctiveFacets().forEach(function(i){n.push({indexName:t,params:fe._getDisjunctiveFacetSearchParams(r,i)})}),r.getRefinedHierarchicalFacets().forEach(function(i){var a=r.getHierarchicalFacetByName(i),s=r.getHierarchicalRefinement(i),u=r._getHierarchicalFacetSeparator(a);if(s.length>0&&s[0].split(u).length>1){var c=s[0].split(u).slice(0,-1).reduce(function(f,l,h){return f.concat({attribute:a.attributes[h],value:h===0?l:[f[f.length-1].value,l].join(u)})},[]);c.forEach(function(o,f){var l=fe._getDisjunctiveFacetSearchParams(r,o.attribute,f===0);function h(d){return a.attributes.some(function(v){return v===d.split(":")[0]})}var m=(l.facetFilters||[]).reduce(function(d,v){if(Array.isArray(v)){var P=v.filter(function(y){return!h(y)});P.length>0&&d.push(P)}return typeof v=="string"&&!h(v)&&d.push(v),d},[]),g=c[f-1];f>0?l.facetFilters=m.concat(g.attribute+":"+g.value):l.facetFilters=m.length>0?m:void 0,n.push({indexName:t,params:l})})}}),n},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(fe._getHitsHierarchicalFacetsAttributes(e)).sort(),r=fe._getFacetFilters(e),n=fe._getNumericFilters(e),i=fe._getTagFilters(e),a={facets:t.indexOf("*")>-1?["*"]:t,tagFilters:i};return r.length>0&&(a.facetFilters=r),n.length>0&&(a.numericFilters=n),nr(rr({},e.getQueryParams(),a))},_getDisjunctiveFacetSearchParams:function(e,t,r){var n=fe._getFacetFilters(e,t,r),i=fe._getNumericFilters(e,t),a=fe._getTagFilters(e),s={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};a.length>0&&(s.tagFilters=a);var u=e.getHierarchicalFacetByName(t);return u?s.facets=fe._getDisjunctiveHierarchicalFacetAttribute(e,u,r):s.facets=t,i.length>0&&(s.numericFilters=i),n.length>0&&(s.facetFilters=n),nr(rr({},e.getQueryParams(),s))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var r=[];return Object.keys(e.numericRefinements).forEach(function(n){var i=e.numericRefinements[n]||{};Object.keys(i).forEach(function(a){var s=i[a]||[];t!==n&&s.forEach(function(u){if(Array.isArray(u)){var c=u.map(function(o){return n+a+o});r.push(c)}else r.push(n+a+u)})})}),r},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,r){var n=[],i=e.facetsRefinements||{};Object.keys(i).sort().forEach(function(c){var o=i[c]||[];o.slice().sort().forEach(function(f){n.push(c+":"+f)})});var a=e.facetsExcludes||{};Object.keys(a).sort().forEach(function(c){var o=a[c]||[];o.sort().forEach(function(f){n.push(c+":-"+f)})});var s=e.disjunctiveFacetsRefinements||{};Object.keys(s).sort().forEach(function(c){var o=s[c]||[];if(!(c===t||!o||o.length===0)){var f=[];o.slice().sort().forEach(function(l){f.push(c+":"+l)}),n.push(f)}});var u=e.hierarchicalFacetsRefinements||{};return Object.keys(u).sort().forEach(function(c){var o=u[c]||[],f=o[0];if(f!==void 0){var l=e.getHierarchicalFacetByName(c),h=e._getHierarchicalFacetSeparator(l),m=e._getHierarchicalRootPath(l),g,d;if(t===c){if(f.indexOf(h)===-1||!m&&r===!0||m&&m.split(h).length===f.split(h).length)return;m?(d=m.split(h).length-1,f=m):(d=f.split(h).length-2,f=f.slice(0,f.lastIndexOf(h))),g=l.attributes[d]}else d=f.split(h).length-1,g=l.attributes[d];g&&n.push([g+":"+f])}}),n},_getHitsHierarchicalFacetsAttributes:function(e){var t=[];return e.hierarchicalFacets.reduce(function(n,i){var a=e.getHierarchicalRefinement(i.name)[0];if(!a)return n.push(i.attributes[0]),n;var s=e._getHierarchicalFacetSeparator(i),u=a.split(s).length,c=i.attributes.slice(0,u+1);return n.concat(c)},t)},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var n=e._getHierarchicalFacetSeparator(t);if(r===!0){var i=e._getHierarchicalRootPath(t),a=0;return i&&(a=i.split(n).length),[t.attributes[a]]}var s=e.getHierarchicalRefinement(t.name)[0]||"",u=s.split(n).length-1;return t.attributes.slice(0,u+1)},getSearchForFacetQuery:function(e,t,r,n){var i=n.isDisjunctiveFacet(e)?n.clearRefinements(e):n,a={facetQuery:t,facetName:e};return typeof r=="number"&&(a.maxFacetHits=r),nr(rr({},fe._getHitsSearchParams(i),a))}},Ha=fe,Qr=function(){var t=Array.prototype.slice.call(arguments);return t.reduceRight(function(r,n){return Object.keys(Object(n)).forEach(function(i){n[i]!==void 0&&(r[i]!==void 0&&delete r[i],r[i]=n[i])}),r},{})},Dt=function(t,r){if(!!Array.isArray(t)){for(var n=0;n<t.length;n++)if(r(t[n]))return t[n]}};function Da(e,t){return e.filter(function(r,n){return t.indexOf(r)>-1&&e.indexOf(r)===n})}var Na=Da;function hi(e){if(typeof e=="number")return e;if(typeof e=="string")return parseFloat(e);if(Array.isArray(e))return e.map(hi);throw new Error("The value should be a number, a parsable string or an array of those.")}var La=hi,Ua=function(t){return t===null?!1:/^[a-zA-Z0-9_-]{1,64}$/.test(t)},Wa=Qr,Qa=Ur,qa=Wr,He={addRefinement:function(t,r,n){if(He.isRefined(t,r,n))return t;var i=""+n,a=t[r]?t[r].concat(i):[i],s={};return s[r]=a,Wa({},s,t)},removeRefinement:function(t,r,n){if(n===void 0)return He.clearRefinement(t,function(a,s){return r===s});var i=""+n;return He.clearRefinement(t,function(a,s){return r===s&&i===a})},toggleRefinement:function(t,r,n){if(n===void 0)throw new Error("toggleRefinement should be used with a value");return He.isRefined(t,r,n)?He.removeRefinement(t,r,n):He.addRefinement(t,r,n)},clearRefinement:function(t,r,n){if(r===void 0)return Qa(t)?{}:t;if(typeof r=="string")return qa(t,[r]);if(typeof r=="function"){var i=!1,a=Object.keys(t).reduce(function(s,u){var c=t[u]||[],o=c.filter(function(f){return!r(f,u,n)});return o.length!==c.length&&(i=!0),s[u]=o,s},{});return i?a:t}},isRefined:function(t,r,n){var i=Boolean(t[r])&&t[r].length>0;if(n===void 0||!i)return i;var a=""+n;return t[r].indexOf(a)!==-1}},ka=He,ir=Qr,di=Dt,Vr=Na,yr=Xt,br=Ur,Jr=Wr,ar=La,Ma=Ua,K=ka;function qr(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every(function(r,n){return qr(t[n],r)}):e===t}function Ba(e,t){return di(e,function(r){return qr(r,t)})}function ue(e){var t=e?ue._parseNumbers(e):{};t.userToken!==void 0&&!Ma(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 r=this;Object.keys(t).forEach(function(n){var i=ue.PARAMETERS.indexOf(n)!==-1,a=t[n]!==void 0;!i&&a&&(r[n]=t[n])})}ue.PARAMETERS=Object.keys(new ue);ue._parseNumbers=function(e){if(e instanceof ue)return e;var t={},r=["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"];if(r.forEach(function(i){var a=e[i];if(typeof a=="string"){var s=parseFloat(a);t[i]=isNaN(s)?a:s}}),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map(function(i){return Array.isArray(i)?i.map(function(a){return parseFloat(a)}):i})),e.numericRefinements){var n={};Object.keys(e.numericRefinements).forEach(function(i){var a=e.numericRefinements[i]||{};n[i]={},Object.keys(a).forEach(function(s){var u=a[s],c=u.map(function(o){return Array.isArray(o)?o.map(function(f){return typeof f=="string"?parseFloat(f):f}):typeof o=="string"?parseFloat(o):o});n[i][s]=c})}),t.numericRefinements=n}return yr(e,t)};ue.make=function(t){var r=new ue(t),n=t.hierarchicalFacets||[];return n.forEach(function(i){if(i.rootPath){var a=r.getHierarchicalRefinement(i.name);a.length>0&&a[0].indexOf(i.rootPath)!==0&&(r=r.clearRefinements(i.name)),a=r.getHierarchicalRefinement(i.name),a.length===0&&(r=r.toggleHierarchicalFacetRefinement(i.name,i.rootPath))}}),r};ue.validate=function(e,t){var r=t||{};return e.tagFilters&&r.tagRefinements&&r.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&&r.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&&r.numericRefinements&&br(r.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."):br(e.numericRefinements)&&r.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};ue.prototype={constructor:ue,clearRefinements:function(t){var r={numericRefinements:this._clearNumericRefinements(t),facetsRefinements:K.clearRefinement(this.facetsRefinements,t,"conjunctiveFacet"),facetsExcludes:K.clearRefinement(this.facetsExcludes,t,"exclude"),disjunctiveFacetsRefinements:K.clearRefinement(this.disjunctiveFacetsRefinements,t,"disjunctiveFacet"),hierarchicalFacetsRefinements:K.clearRefinement(this.hierarchicalFacetsRefinements,t,"hierarchicalFacet")};return r.numericRefinements===this.numericRefinements&&r.facetsRefinements===this.facetsRefinements&&r.facetsExcludes===this.facetsExcludes&&r.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&r.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(r)},clearTags:function(){return this.tagFilters===void 0&&this.tagRefinements.length===0?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(t){return t===this.index?this:this.setQueryParameters({index:t})},setQuery:function(t){return t===this.query?this:this.setQueryParameters({query:t})},setPage:function(t){return t===this.page?this:this.setQueryParameters({page:t})},setFacets:function(t){return this.setQueryParameters({facets:t})},setDisjunctiveFacets:function(t){return this.setQueryParameters({disjunctiveFacets:t})},setHitsPerPage:function(t){return this.hitsPerPage===t?this:this.setQueryParameters({hitsPerPage:t})},setTypoTolerance:function(t){return this.typoTolerance===t?this:this.setQueryParameters({typoTolerance:t})},addNumericRefinement:function(e,t,r){var n=ar(r);if(this.isNumericRefined(e,t,n))return this;var i=yr({},this.numericRefinements);return i[e]=yr({},i[e]),i[e][t]?(i[e][t]=i[e][t].slice(),i[e][t].push(n)):i[e][t]=[n],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,r){var n=r;return n!==void 0?this.isNumericRefined(e,t,n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(i,a){return a===e&&i.op===t&&qr(i.val,ar(n))})}):this:t!==void 0?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(i,a){return a===e&&i.op===t})}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(i,a){return a===e})}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(t){if(t===void 0)return br(this.numericRefinements)?{}:this.numericRefinements;if(typeof t=="string")return Jr(this.numericRefinements,[t]);if(typeof t=="function"){var r=!1,n=this.numericRefinements,i=Object.keys(n).reduce(function(a,s){var u=n[s],c={};return u=u||{},Object.keys(u).forEach(function(o){var f=u[o]||[],l=[];f.forEach(function(h){var m=t({val:h,op:o},s,"numeric");m||l.push(h)}),l.length!==f.length&&(r=!0),c[o]=l}),a[s]=c,a},{});return r?i:this.numericRefinements}},addFacet:function(t){return this.isConjunctiveFacet(t)?this:this.setQueryParameters({facets:this.facets.concat([t])})},addDisjunctiveFacet:function(t){return this.isDisjunctiveFacet(t)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([t])})},addHierarchicalFacet:function(t){if(this.isHierarchicalFacet(t.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+t.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([t])})},addFacetRefinement:function(t,r){if(!this.isConjunctiveFacet(t))throw new Error(t+" is not defined in the facets attribute of the helper configuration");return K.isRefined(this.facetsRefinements,t,r)?this:this.setQueryParameters({facetsRefinements:K.addRefinement(this.facetsRefinements,t,r)})},addExcludeRefinement:function(t,r){if(!this.isConjunctiveFacet(t))throw new Error(t+" is not defined in the facets attribute of the helper configuration");return K.isRefined(this.facetsExcludes,t,r)?this:this.setQueryParameters({facetsExcludes:K.addRefinement(this.facetsExcludes,t,r)})},addDisjunctiveFacetRefinement:function(t,r){if(!this.isDisjunctiveFacet(t))throw new Error(t+" is not defined in the disjunctiveFacets attribute of the helper configuration");return K.isRefined(this.disjunctiveFacetsRefinements,t,r)?this:this.setQueryParameters({disjunctiveFacetsRefinements:K.addRefinement(this.disjunctiveFacetsRefinements,t,r)})},addTagRefinement:function(t){if(this.isTagRefined(t))return this;var r={tagRefinements:this.tagRefinements.concat(t)};return this.setQueryParameters(r)},removeFacet:function(t){return this.isConjunctiveFacet(t)?this.clearRefinements(t).setQueryParameters({facets:this.facets.filter(function(r){return r!==t})}):this},removeDisjunctiveFacet:function(t){return this.isDisjunctiveFacet(t)?this.clearRefinements(t).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter(function(r){return r!==t})}):this},removeHierarchicalFacet:function(t){return this.isHierarchicalFacet(t)?this.clearRefinements(t).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter(function(r){return r.name!==t})}):this},removeFacetRefinement:function(t,r){if(!this.isConjunctiveFacet(t))throw new Error(t+" is not defined in the facets attribute of the helper configuration");return K.isRefined(this.facetsRefinements,t,r)?this.setQueryParameters({facetsRefinements:K.removeRefinement(this.facetsRefinements,t,r)}):this},removeExcludeRefinement:function(t,r){if(!this.isConjunctiveFacet(t))throw new Error(t+" is not defined in the facets attribute of the helper configuration");return K.isRefined(this.facetsExcludes,t,r)?this.setQueryParameters({facetsExcludes:K.removeRefinement(this.facetsExcludes,t,r)}):this},removeDisjunctiveFacetRefinement:function(t,r){if(!this.isDisjunctiveFacet(t))throw new Error(t+" is not defined in the disjunctiveFacets attribute of the helper configuration");return K.isRefined(this.disjunctiveFacetsRefinements,t,r)?this.setQueryParameters({disjunctiveFacetsRefinements:K.removeRefinement(this.disjunctiveFacetsRefinements,t,r)}):this},removeTagRefinement:function(t){if(!this.isTagRefined(t))return this;var r={tagRefinements:this.tagRefinements.filter(function(n){return n!==t})};return this.setQueryParameters(r)},toggleRefinement:function(t,r){return this.toggleFacetRefinement(t,r)},toggleFacetRefinement:function(t,r){if(this.isHierarchicalFacet(t))return this.toggleHierarchicalFacetRefinement(t,r);if(this.isConjunctiveFacet(t))return this.toggleConjunctiveFacetRefinement(t,r);if(this.isDisjunctiveFacet(t))return this.toggleDisjunctiveFacetRefinement(t,r);throw new Error("Cannot refine the undeclared facet "+t+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(t,r){if(!this.isConjunctiveFacet(t))throw new Error(t+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:K.toggleRefinement(this.facetsRefinements,t,r)})},toggleExcludeFacetRefinement:function(t,r){if(!this.isConjunctiveFacet(t))throw new Error(t+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:K.toggleRefinement(this.facetsExcludes,t,r)})},toggleDisjunctiveFacetRefinement:function(t,r){if(!this.isDisjunctiveFacet(t))throw new Error(t+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:K.toggleRefinement(this.disjunctiveFacetsRefinements,t,r)})},toggleHierarchicalFacetRefinement:function(t,r){if(!this.isHierarchicalFacet(t))throw new Error(t+" is not defined in the hierarchicalFacets attribute of the helper configuration");var n=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(t)),i={},a=this.hierarchicalFacetsRefinements[t]!==void 0&&this.hierarchicalFacetsRefinements[t].length>0&&(this.hierarchicalFacetsRefinements[t][0]===r||this.hierarchicalFacetsRefinements[t][0].indexOf(r+n)===0);return a?r.indexOf(n)===-1?i[t]=[]:i[t]=[r.slice(0,r.lastIndexOf(n))]:i[t]=[r],this.setQueryParameters({hierarchicalFacetsRefinements:ir({},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 r={};return r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:ir({},r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:ir({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(t){return this.isTagRefined(t)?this.removeTagRefinement(t):this.addTagRefinement(t)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return this.getHierarchicalFacetByName(e)!==void 0},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(t,r){return this.isConjunctiveFacet(t)?K.isRefined(this.facetsRefinements,t,r):!1},isExcludeRefined:function(t,r){return this.isConjunctiveFacet(t)?K.isRefined(this.facetsExcludes,t,r):!1},isDisjunctiveFacetRefined:function(t,r){return this.isDisjunctiveFacet(t)?K.isRefined(this.disjunctiveFacetsRefinements,t,r):!1},isHierarchicalFacetRefined:function(t,r){if(!this.isHierarchicalFacet(t))return!1;var n=this.getHierarchicalRefinement(t);return r?n.indexOf(r)!==-1:n.length>0},isNumericRefined:function(t,r,n){if(n===void 0&&r===void 0)return Boolean(this.numericRefinements[t]);var i=this.numericRefinements[t]&&this.numericRefinements[t][r]!==void 0;if(n===void 0||!i)return i;var a=ar(n),s=Ba(this.numericRefinements[t][r],a)!==void 0;return i&&s},isTagRefined:function(t){return this.tagRefinements.indexOf(t)!==-1},getRefinedDisjunctiveFacets:function(){var t=this,r=Vr(Object.keys(this.numericRefinements).filter(function(n){return Object.keys(t.numericRefinements[n]).length>0}),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter(function(n){return t.disjunctiveFacetsRefinements[n].length>0}).concat(r).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var t=this;return Vr(this.hierarchicalFacets.map(function(r){return r.name}),Object.keys(this.hierarchicalFacetsRefinements).filter(function(r){return t.hierarchicalFacetsRefinements[r].length>0})).sort()},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter(function(t){return e.indexOf(t)===-1})},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var t=this.managedParameters,r={},n=this;return Object.keys(this).forEach(function(i){var a=n[i];t.indexOf(i)===-1&&a!==void 0&&(r[i]=a)}),r},setQueryParameter:function(t,r){if(this[t]===r)return this;var n={};return n[t]=r,this.setQueryParameters(n)},setQueryParameters:function(t){if(!t)return this;var r=ue.validate(this,t);if(r)throw r;var n=this,i=ue._parseNumbers(t),a=Object.keys(this).reduce(function(u,c){return u[c]=n[c],u},{}),s=Object.keys(i).reduce(function(u,c){var o=u[c]!==void 0,f=i[c]!==void 0;return o&&!f?Jr(u,[c]):(f&&(u[c]=i[c]),u)},a);return new this.constructor(s)},resetPage:function(){return this.page===void 0?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 typeof e.showParentLevel=="boolean"?e.showParentLevel:!0},getHierarchicalFacetByName:function(e){return di(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 r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),n=t.split(r);return n.map(function(i){return i.trim()})},toString:function(){return JSON.stringify(this,null,2)}};var mi=ue,Ka=function(t){return Array.isArray(t)?t.filter(Boolean):[]},Va=function(t,r){if(!Array.isArray(t))return-1;for(var n=0;n<t.length;n++)if(r(t[n]))return n;return-1},Ja=Dt,gi=function(t,r){var n=(r||[]).map(function(i){return i.split(":")});return t.reduce(function(a,s){var u=s.split(":"),c=Ja(n,function(o){return o[0]===u[0]});return u.length>1||!c?(a[0].push(u[0]),a[1].push(u[1]),a):(a[0].push(c[0]),a[1].push(c[1]),a)},[[],[]])};function za(e,t){if(e!==t){var r=e!==void 0,n=e===null,i=t!==void 0,a=t===null;if(!a&&e>t||n&&i||!r)return 1;if(!n&&e<t||a&&r||!i)return-1}return 0}function Ga(e,t,r){if(!Array.isArray(e))return[];Array.isArray(r)||(r=[]);var n=e.map(function(i,a){return{criteria:t.map(function(s){return i[s]}),index:a,value:i}});return n.sort(function(a,s){for(var u=-1;++u<a.criteria.length;){var c=za(a.criteria[u],s.criteria[u]);if(c)return u>=r.length?c:r[u]==="desc"?-c:c}return a.index-s.index}),n.map(function(i){return i.value})}var pi=Ga,Xa=ns,vi=Nr,Za=Dt,Ya=gi,es=pi,ts=vi.escapeFacetValue,rs=vi.unescapeFacetValue;function ns(e){return function(r,n){var i=e.hierarchicalFacets[n],a=e.hierarchicalFacetsRefinements[i.name]&&e.hierarchicalFacetsRefinements[i.name][0]||"",s=e._getHierarchicalFacetSeparator(i),u=e._getHierarchicalRootPath(i),c=e._getHierarchicalShowParentLevel(i),o=Ya(e._getHierarchicalFacetSortBy(i)),f=r.every(function(m){return m.exhaustive}),l=is(o,s,u,c,a),h=r;return u&&(h=r.slice(u.split(s).length)),h.reduce(l,{name:e.hierarchicalFacets[n].name,count:null,isRefined:!0,path:null,escapedValue:null,exhaustive:f,data:null})}}function is(e,t,r,n,i){return function(s,u,c){var o=s;if(c>0){var f=0;for(o=s;f<c;){var l=o&&Array.isArray(o.data)?o.data:[];o=Za(l,function(m){return m.isRefined}),f++}}if(o){var h=Object.keys(u.data).map(function(m){return[m,u.data[m]]}).filter(function(m){var g=m[0];return as(g,o.path||r,i,t,r,n)});o.data=es(h.map(function(m){var g=m[0],d=m[1];return ss(d,g,t,rs(i),u.exhaustive)}),e[0],e[1])}return s}}function as(e,t,r,n,i,a){return i&&(e.indexOf(i)!==0||i===e)?!1:!i&&e.indexOf(n)===-1||i&&e.split(n).length-i.split(n).length===1||e.indexOf(n)===-1&&r.indexOf(n)===-1||r.indexOf(e)===0||e.indexOf(t+n)===0&&(a||e.indexOf(r)===0)}function ss(e,t,r,n,i){var a=t.split(r);return{name:a[a.length-1].trim(),path:t,escapedValue:ts(t),count:e,isRefined:n===t||n.indexOf(t+r)===0,exhaustive:i,data:null}}var sr=Ka,Vt=Qr,yi=Nr,pe=Dt,Ze=Va,os=gi,zr=Xt,bi=pi,Gr=yi.escapeFacetValue,Si=yi.unescapeFacetValue,us=Xa;function Xr(e){var t={};return e.forEach(function(r,n){t[r]=n}),t}function or(e,t,r){t&&t[r]&&(e.stats=t[r])}function cs(e,t){return pe(e,function(n){var i=n.attributes||[];return i.indexOf(t)>-1})}function Ie(e,t,r){var n=t[0];this._rawResults=t;var i=this;Object.keys(n).forEach(function(l){i[l]=n[l]});var a=zr({persistHierarchicalRootCount:!1},r);Object.keys(a).forEach(function(l){i[l]=a[l]}),this.processingTimeMS=t.reduce(function(l,h){return h.processingTimeMS===void 0?l:l+h.processingTimeMS},0),this.disjunctiveFacets=[],this.hierarchicalFacets=e.hierarchicalFacets.map(function(){return[]}),this.facets=[];var s=e.getRefinedDisjunctiveFacets(),u=Xr(e.facets),c=Xr(e.disjunctiveFacets),o=1,f=n.facets||{};Object.keys(f).forEach(function(l){var h=f[l],m=cs(e.hierarchicalFacets,l);if(m){var g=m.attributes.indexOf(l),d=Ze(e.hierarchicalFacets,function(F){return F.name===m.name});i.hierarchicalFacets[d][g]={attribute:l,data:h,exhaustive:n.exhaustiveFacetsCount}}else{var v=e.disjunctiveFacets.indexOf(l)!==-1,P=e.facets.indexOf(l)!==-1,y;v&&(y=c[l],i.disjunctiveFacets[y]={name:l,data:h,exhaustive:n.exhaustiveFacetsCount},or(i.disjunctiveFacets[y],n.facets_stats,l)),P&&(y=u[l],i.facets[y]={name:l,data:h,exhaustive:n.exhaustiveFacetsCount},or(i.facets[y],n.facets_stats,l))}}),this.hierarchicalFacets=sr(this.hierarchicalFacets),s.forEach(function(l){var h=t[o],m=h&&h.facets?h.facets:{},g=e.getHierarchicalFacetByName(l);Object.keys(m).forEach(function(d){var v=m[d],P;if(g){P=Ze(e.hierarchicalFacets,function(j){return j.name===g.name});var y=Ze(i.hierarchicalFacets[P],function(j){return j.attribute===d});if(y===-1)return;i.hierarchicalFacets[P][y].data=zr({},i.hierarchicalFacets[P][y].data,v)}else{P=c[d];var F=n.facets&&n.facets[d]||{};i.disjunctiveFacets[P]={name:d,data:Vt({},v,F),exhaustive:h.exhaustiveFacetsCount},or(i.disjunctiveFacets[P],h.facets_stats,d),e.disjunctiveFacetsRefinements[d]&&e.disjunctiveFacetsRefinements[d].forEach(function(j){!i.disjunctiveFacets[P].data[j]&&e.disjunctiveFacetsRefinements[d].indexOf(Si(j))>-1&&(i.disjunctiveFacets[P].data[j]=0)})}}),o++}),e.getRefinedHierarchicalFacets().forEach(function(l){var h=e.getHierarchicalFacetByName(l),m=e._getHierarchicalFacetSeparator(h),g=e.getHierarchicalRefinement(l);g.length===0||g[0].split(m).length<2||t.slice(o).forEach(function(d){var v=d&&d.facets?d.facets:{};Object.keys(v).forEach(function(P){var y=v[P],F=Ze(e.hierarchicalFacets,function(A){return A.name===h.name}),j=Ze(i.hierarchicalFacets[F],function(A){return A.attribute===P});if(j!==-1){var _={};if(g.length>0&&!i.persistHierarchicalRootCount){var D=g[0].split(m)[0];_[D]=i.hierarchicalFacets[F][j].data[D]}i.hierarchicalFacets[F][j].data=Vt(_,y,i.hierarchicalFacets[F][j].data)}}),o++})}),Object.keys(e.facetsExcludes).forEach(function(l){var h=e.facetsExcludes[l],m=u[l];i.facets[m]={name:l,data:f[l],exhaustive:n.exhaustiveFacetsCount},h.forEach(function(g){i.facets[m]=i.facets[m]||{name:l},i.facets[m].data=i.facets[m].data||{},i.facets[m].data[g]=0})}),this.hierarchicalFacets=this.hierarchicalFacets.map(us(e)),this.facets=sr(this.facets),this.disjunctiveFacets=sr(this.disjunctiveFacets),this._state=e}Ie.prototype.getFacetByName=function(e){function t(r){return r.name===e}return pe(this.facets,t)||pe(this.disjunctiveFacets,t)||pe(this.hierarchicalFacets,t)};function fs(e,t){function r(f){return f.name===t}if(e._state.isConjunctiveFacet(t)){var n=pe(e.facets,r);return n?Object.keys(n.data).map(function(f){var l=Gr(f);return{name:f,escapedValue:l,count:n.data[f],isRefined:e._state.isFacetRefined(t,l),isExcluded:e._state.isExcludeRefined(t,f)}}):[]}else if(e._state.isDisjunctiveFacet(t)){var i=pe(e.disjunctiveFacets,r);return i?Object.keys(i.data).map(function(f){var l=Gr(f);return{name:f,escapedValue:l,count:i.data[f],isRefined:e._state.isDisjunctiveFacetRefined(t,l)}}):[]}else if(e._state.isHierarchicalFacet(t)){var a=pe(e.hierarchicalFacets,r);if(!a)return a;var s=e._state.getHierarchicalFacetByName(t),u=e._state._getHierarchicalFacetSeparator(s),c=Si(e._state.getHierarchicalRefinement(t)[0]||"");c.indexOf(s.rootPath)===0&&(c=c.replace(s.rootPath+u,""));var o=c.split(u);return o.unshift(t),Pi(a,o,0),a}}function Pi(e,t,r){e.isRefined=e.name===(t[r]&&t[r].trim()),e.data&&e.data.forEach(function(n){Pi(n,t,r+1)})}function Ri(e,t,r,n){if(n=n||0,Array.isArray(t))return e(t,r[n]);if(!t.data||t.data.length===0)return t;var i=t.data.map(function(u){return Ri(e,u,r,n+1)}),a=e(i,r[n]),s=Vt({data:a},t);return s}Ie.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"];function ls(e,t){return t.sort(e)}function hs(e,t){var r=[],n=[],i=t.order||[],a=i.reduce(function(c,o,f){return c[o]=f,c},{});e.forEach(function(c){var o=c.path||c.name;a[o]!==void 0?r[a[o]]=c:n.push(c)}),r=r.filter(function(c){return c});var s=t.sortRemainingBy,u;return s==="hidden"?r:(s==="alpha"?u=[["path","name"],["asc","asc"]]:u=[["count"],["desc"]],r.concat(bi(n,u[0],u[1])))}function ds(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}Ie.prototype.getFacetValues=function(e,t){var r=fs(this,e);if(!!r){var n=Vt({},t,{sortBy:Ie.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),i=this,a;if(Array.isArray(r))a=[e];else{var s=i._state.getHierarchicalFacetByName(r.name);a=s.attributes}return Ri(function(u,c){if(n.facetOrdering){var o=ds(i,c);if(o)return hs(u,o)}if(Array.isArray(n.sortBy)){var f=os(n.sortBy,Ie.DEFAULT_SORT);return bi(u,f[0],f[1])}else if(typeof n.sortBy=="function")return ls(n.sortBy,u);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")},r,a)}};Ie.prototype.getFacetStats=function(e){if(this._state.isConjunctiveFacet(e))return Zr(this.facets,e);if(this._state.isDisjunctiveFacet(e))return Zr(this.disjunctiveFacets,e)};function Zr(e,t){var r=pe(e,function(n){return n.name===t});return r&&r.stats}Ie.prototype.getRefinements=function(){var e=this._state,t=this,r=[];return Object.keys(e.facetsRefinements).forEach(function(n){e.facetsRefinements[n].forEach(function(i){r.push(ur(e,"facet",n,i,t.facets))})}),Object.keys(e.facetsExcludes).forEach(function(n){e.facetsExcludes[n].forEach(function(i){r.push(ur(e,"exclude",n,i,t.facets))})}),Object.keys(e.disjunctiveFacetsRefinements).forEach(function(n){e.disjunctiveFacetsRefinements[n].forEach(function(i){r.push(ur(e,"disjunctive",n,i,t.disjunctiveFacets))})}),Object.keys(e.hierarchicalFacetsRefinements).forEach(function(n){e.hierarchicalFacetsRefinements[n].forEach(function(i){r.push(ms(e,n,i,t.hierarchicalFacets))})}),Object.keys(e.numericRefinements).forEach(function(n){var i=e.numericRefinements[n];Object.keys(i).forEach(function(a){i[a].forEach(function(s){r.push({type:"numeric",attributeName:n,name:s,numericValue:s,operator:a})})})}),e.tagRefinements.forEach(function(n){r.push({type:"tag",attributeName:"_tags",name:n})}),r};function ur(e,t,r,n,i){var a=pe(i,function(c){return c.name===r}),s=a&&a.data&&a.data[n]?a.data[n]:0,u=a&&a.exhaustive||!1;return{type:t,attributeName:r,name:n,count:s,exhaustive:u}}function ms(e,t,r,n){var i=e.getHierarchicalFacetByName(t),a=e._getHierarchicalFacetSeparator(i),s=r.split(a),u=pe(n,function(h){return h.name===t}),c=s.reduce(function(h,m){var g=h&&pe(h.data,function(d){return d.name===m});return g!==void 0?g:h},u),o=c&&c.count||0,f=c&&c.exhaustive||!1,l=c&&c.path||"";return{type:"hierarchical",attributeName:t,name:l,count:o,exhaustive:f}}var Oi=Ie,gs=function(t){return t.reduce(function(r,n){return r.concat(n)},[])},ps=Dt,vs=gs;function ys(e,t){var r=[];return Object.keys(e).forEach(function(n){e[n].count<2&&(e[n].indexSum+=100),r.push({objectID:n,avgOfIndices:e[n].indexSum/t})}),r.sort(function(n,i){return n.avgOfIndices>i.avgOfIndices?1:-1})}function bs(e){var t={};e.forEach(function(i){i.forEach(function(a,s){t[a.objectID]?t[a.objectID]={indexSum:t[a.objectID].indexSum+s,count:t[a.objectID].count+1}:t[a.objectID]={indexSum:s,count:1}})});var r=ys(t,e.length),n=r.reduce(function(i,a){var s=ps(vs(e),function(u){return u.objectID===a.objectID});return s?i.concat(s):i},[]);return n}var Ss=bs,wi="3.21.0",Ps=Dr,Rs=Fa,Os=Nr.escapeFacetValue,ws=ci,js=Xt,_s=Ur,xs=Wr,ji=fi,Fs=li,Be=Ha,kr=mi,Sr=Oi,$s=Ss,_i=wi;function O(e,t,r,n){typeof e.addAlgoliaAgent=="function"&&e.addAlgoliaAgent("JS Helper ("+_i+")"),this.setClient(e);var i=r||{};i.index=t,this.state=kr.make(i),this.recommendState=new ji({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=n,this._recommendCache={}}ws(O,Ps);O.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this};O.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this};O.prototype.recommend=function(){return this._recommend(),this};O.prototype.getQuery=function(){var e=this.state;return Be._getHitsSearchParams(e)};O.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,n=Be._getQueries(r.index,r),i=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),t){this.client.search(n).then(function(a){i._currentNbQueries--,i._currentNbQueries===0&&i.emit("searchQueueEmpty"),t(null,new Sr(r,a.results),r)}).catch(function(a){i._currentNbQueries--,i._currentNbQueries===0&&i.emit("searchQueueEmpty"),t(a,null,r)});return}return this.client.search(n).then(function(a){return i._currentNbQueries--,i._currentNbQueries===0&&i.emit("searchQueueEmpty"),{content:new Sr(r,a.results),state:r,_originalResponse:a}},function(a){throw i._currentNbQueries--,i._currentNbQueries===0&&i.emit("searchQueueEmpty"),a})};O.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,r=this.derivedHelpers[0];if(!r)return Promise.resolve([]);var n=r.getModifiedState(t),i=js({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:xs(Be._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),a="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if(typeof this.client.initIndex!="function")throw new Error(a);var s=this.client.initIndex(n.index);if(typeof s.findAnswers!="function")throw new Error(a);return s.findAnswers(n.query,e.queryLanguages,i)};O.prototype.searchForFacetValues=function(e,t,r,n){var i=typeof this.client.searchForFacetValues=="function",a=typeof this.client.initIndex=="function";if(!i&&!a&&typeof this.client.search!="function")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 s=this.state.setQueryParameters(n||{}),u=s.isDisjunctiveFacet(e),c=Be.getSearchForFacetQuery(e,t,r,s);this._currentNbQueries++;var o=this,f;return i?f=this.client.searchForFacetValues([{indexName:s.index,params:c}]):a?f=this.client.initIndex(s.index).searchForFacetValues(c):(delete c.facetName,f=this.client.search([{type:"facet",facet:e,indexName:s.index,params:c}]).then(function(h){return h.results[0]})),this.emit("searchForFacetValues",{state:s,facet:e,query:t}),f.then(function(h){return o._currentNbQueries--,o._currentNbQueries===0&&o.emit("searchQueueEmpty"),h=Array.isArray(h)?h[0]:h,h.facetHits.forEach(function(m){m.escapedValue=Os(m.value),m.isRefined=u?s.isDisjunctiveFacetRefined(e,m.escapedValue):s.isFacetRefined(e,m.escapedValue)}),h},function(l){throw o._currentNbQueries--,o._currentNbQueries===0&&o.emit("searchQueueEmpty"),l})};O.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this};O.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this};O.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this};O.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this};O.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)};O.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this};O.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this};O.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this};O.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)};O.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this};O.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)};O.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this};O.prototype.addFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.addFrequentlyBoughtTogether(e)}),this};O.prototype.addRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.addRelatedProducts(e)}),this};O.prototype.addTrendingItems=function(e){return this._recommendChange({state:this.recommendState.addTrendingItems(e)}),this};O.prototype.addTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.addTrendingFacets(e)}),this};O.prototype.addLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.addLookingSimilar(e)}),this};O.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this};O.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this};O.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)};O.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this};O.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this};O.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)};O.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this};O.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)};O.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this};O.prototype.removeFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this};O.prototype.removeRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this};O.prototype.removeTrendingItems=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this};O.prototype.removeTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this};O.prototype.removeLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this};O.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this};O.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)};O.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)};O.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this};O.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)};O.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this};O.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)};O.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)};function xi(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}O.prototype.setCurrentPage=xi;O.prototype.setPage=xi;O.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this};O.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this};O.prototype.setState=function(e){return this._change({state:kr.make(e),isPageReset:!1}),this};O.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new kr(e),this};O.prototype.hasRefinements=function(e){return _s(this.state.getNumericRefinements(e))?!0:this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):this.state.isHierarchicalFacet(e)?this.state.isHierarchicalFacetRefined(e):!1};O.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)};O.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)};O.prototype.hasTag=function(e){return this.state.isTagRefined(e)};O.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)};O.prototype.getIndex=function(){return this.state.index};function Fi(){return this.state.page}O.prototype.getCurrentPage=Fi;O.prototype.getPage=Fi;O.prototype.getTags=function(){return this.state.tagRefinements};O.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e)){var r=this.state.getConjunctiveRefinements(e);r.forEach(function(s){t.push({value:s,type:"conjunctive"})});var n=this.state.getExcludeRefinements(e);n.forEach(function(s){t.push({value:s,type:"exclude"})})}else if(this.state.isDisjunctiveFacet(e)){var i=this.state.getDisjunctiveRefinements(e);i.forEach(function(s){t.push({value:s,type:"disjunctive"})})}var a=this.state.getNumericRefinements(e);return Object.keys(a).forEach(function(s){var u=a[s];t.push({value:u,operator:s,type:"numeric"})}),t};O.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)};O.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)};O.prototype._search=function(e){var t=this.state,r=[],n=[];e.onlyWithDerivedHelpers||(n=Be._getQueries(t.index,t),r.push({state:t,queriesCount:n.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var i=this.derivedHelpers.map(function(u){var c=u.getModifiedState(t),o=c.index?Be._getQueries(c.index,c):[];return r.push({state:c,queriesCount:o.length,helper:u}),u.emit("search",{state:c,results:u.lastResults}),o}),a=Array.prototype.concat.apply(n,i),s=this._queryId++;if(this._currentNbQueries++,!a.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,r,s));try{this.client.search(a).then(this._dispatchAlgoliaResponse.bind(this,r,s)).catch(this._dispatchAlgoliaError.bind(this,s))}catch(u){this.emit("error",{error:u})}};O.prototype._recommend=function(){var e=this.state,t=this.recommendState,r=this.getIndex(),n=[{state:t,index:r,helper:this}],i=t.params.map(function(o){return o.$$id});this.emit("fetch",{recommend:{state:t,results:this.lastRecommendResults}});var a=this._recommendCache,s=this.derivedHelpers.map(function(o){var f=o.getModifiedState(e).index;if(!f)return[];var l=o.getModifiedRecommendState(new ji);return n.push({state:l,index:f,helper:o}),i=Array.prototype.concat.apply(i,l.params.map(function(h){return h.$$id})),o.emit("fetch",{recommend:{state:l,results:o.lastRecommendResults}}),l._buildQueries(f,a)}),u=Array.prototype.concat.apply(this.recommendState._buildQueries(r,a),s);if(u.length!==0){if(u.length>0&&typeof this.client.getRecommendations=="undefined"){console.warn("Please update algoliasearch/lite to the latest version in order to use recommend widgets.");return}var c=this._recommendQueryId++;this._currentNbRecommendQueries++;try{this.client.getRecommendations(u).then(this._dispatchRecommendResponse.bind(this,c,n,i)).catch(this._dispatchRecommendError.bind(this,c))}catch(o){this.emit("error",{error:o})}}};O.prototype._dispatchAlgoliaResponse=function(e,t,r){var n=this;if(!(t<this._lastQueryIdReceived)){this._currentNbQueries-=t-this._lastQueryIdReceived,this._lastQueryIdReceived=t,this._currentNbQueries===0&&this.emit("searchQueueEmpty");var i=r.results.slice();e.forEach(function(a){var s=a.state,u=a.queriesCount,c=a.helper,o=i.splice(0,u);if(!s.index){c.emit("result",{results:null,state:s});return}c.lastResults=new Sr(s,o,n._searchResultsOptions),c.emit("result",{results:c.lastResults,state:s})})}};O.prototype._dispatchRecommendResponse=function(e,t,r,n){if(!(e<this._lastRecommendQueryIdReceived)){this._currentNbRecommendQueries-=e-this._lastRecommendQueryIdReceived,this._lastRecommendQueryIdReceived=e,this._currentNbRecommendQueries===0&&this.emit("recommendQueueEmpty");var i=this._recommendCache,a={};r.filter(function(u){return i[u]===void 0}).forEach(function(u,c){a[u]||(a[u]=[]),a[u].push(c)}),Object.keys(a).forEach(function(u){var c=a[u],o=n.results[c[0]];if(c.length===1){i[u]=o;return}i[u]=Object.assign({},o,{hits:$s(c.map(function(f){return n.results[f].hits}))})});var s={};r.forEach(function(u){s[u]=i[u]}),t.forEach(function(u){var c=u.state,o=u.helper;if(!u.index){o.emit("recommend:result",{results:null,state:c});return}o.lastRecommendResults=new Fs(c,s),o.emit("recommend:result",{recommend:{results:o.lastRecommendResults,state:c}})})}};O.prototype._dispatchAlgoliaError=function(e,t){e<this._lastQueryIdReceived||(this._currentNbQueries-=e-this._lastQueryIdReceived,this._lastQueryIdReceived=e,this.emit("error",{error:t}),this._currentNbQueries===0&&this.emit("searchQueueEmpty"))};O.prototype._dispatchRecommendError=function(e,t){e<this._lastRecommendQueryIdReceived||(this._currentNbRecommendQueries-=e-this._lastRecommendQueryIdReceived,this._lastRecommendQueryIdReceived=e,this.emit("error",{error:t}),this._currentNbRecommendQueries===0&&this.emit("recommendQueueEmpty"))};O.prototype.containsRefinement=function(e,t,r,n){return e||t.length!==0||r.length!==0||n.length!==0};O.prototype._hasDisjunctiveRefinements=function(e){return this.state.disjunctiveRefinements[e]&&this.state.disjunctiveRefinements[e].length>0};O.prototype._change=function(e){var t=e.state,r=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:r}))};O.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}}))};O.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this};O.prototype.setClient=function(e){return this.client===e?this:(typeof e.addAlgoliaAgent=="function"&&e.addAlgoliaAgent("JS Helper ("+_i+")"),this.client=e,this)};O.prototype.getClient=function(){return this.client};O.prototype.derive=function(e,t){var r=new Rs(this,e,t);return this.derivedHelpers.push(r),r};O.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(t===-1)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)};O.prototype.hasPendingRequests=function(){return this._currentNbQueries>0};var Es=O,$i=Es,Ts=fi,Is=li,As=mi,Cs=Oi;function Le(e,t,r,n){return new $i(e,t,r,n)}Le.version=wi;Le.AlgoliaSearchHelper=$i;Le.SearchParameters=As;Le.RecommendParameters=Ts;Le.SearchResults=Cs;Le.RecommendResults=Is;var te=Le,Hs=0;function Ds(e){e.dependsOn==="recommend"&&(e.$$id=Hs++)}function ie(){}function Ns(e){return Object.prototype.toString.call(e).slice(8,-1)}function Zt(e,t){if(e===void 0||typeof e!="function")throw new Error("The render function is not valid (received type ".concat(Ns(e),`).

`).concat(t))}var Ls={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ei=/[&<>"']/g,Us=RegExp(Ei.source);function Ws(e){return e&&Us.test(e)?e.replace(Ei,function(t){return Ls[t]}):e}var Qs={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Ti=/&(amp|quot|lt|gt|#39);/g,qs=RegExp(Ti.source);function ks(e){return e&&qs.test(e)?e.replace(Ti,function(t){return Qs[t]}):e}function Pr(e){return Pr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pr(e)}function Ms(e){return e===null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function Bs(e){return Pr(e)==="object"&&e!==null}function Ii(e){if(!Bs(e)||Ms(e)!=="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function ft(e){return ft=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ft(e)}function Ks(e){if(e==null)throw new TypeError("Cannot destructure "+e)}function Rr(){return Rr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Rr.apply(this,arguments)}function Yr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ke(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yr(Object(r),!0).forEach(function(n){Ai(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ai(e,t,r){return t=Vs(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vs(e){var t=Js(e,"string");return ft(t)==="symbol"?t:String(t)}function Js(e,t){if(ft(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ft(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Jt={highlightPreTag:"__ais-highlight__",highlightPostTag:"__/ais-highlight__"},ce={highlightPreTag:"<mark>",highlightPostTag:"</mark>"};function Ci(e){return Ws(e).replace(new RegExp(Jt.highlightPreTag,"g"),ce.highlightPreTag).replace(new RegExp(Jt.highlightPostTag,"g"),ce.highlightPostTag)}function zt(e){return Ii(e)&&typeof e.value!="string"?Object.keys(e).reduce(function(t,r){return ke(ke({},t),{},Ai({},r,zt(e[r])))},{}):Array.isArray(e)?e.map(zt):ke(ke({},e),{},{value:Ci(e.value)})}function zs(e){return e.__escaped===void 0&&(e=e.map(function(t){var r=Rr({},(Ks(t),t));return r._highlightResult&&(r._highlightResult=zt(r._highlightResult)),r._snippetResult&&(r._snippetResult=zt(r._snippetResult)),r}),e.__escaped=!0),e}function th(e){return e.map(function(t){return ke(ke({},t),{},{highlighted:Ci(t.highlighted)})})}function Hi(e){var t=ce.highlightPreTag,r=ce.highlightPostTag;return e.map(function(n){return n.isHighlighted?t+n.value+r:n.value}).join("")}function Di(e){return btoa(encodeURIComponent(JSON.stringify(e)))}function en(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?en(Object(r),!0).forEach(function(n){Gs(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):en(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Gs(e,t,r){return t=Xs(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xs(e){var t=Zs(e,"string");return Ke(t)==="symbol"?t:String(t)}function Zs(e,t){if(Ke(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ke(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ys(e,t){return no(e)||ro(e,t)||to(e,t)||eo()}function eo(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function to(e,t){if(!!e){if(typeof e=="string")return tn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tn(e,t)}}function tn(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ro(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,o=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(f){o=!0,i=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(o)throw i}}return u}}function no(e){if(Array.isArray(e))return e}function Ke(e){return Ke=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ke(e)}function io(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:20,r=[],n=0;n<Math.ceil(e.length/t);n++)r.push(e.slice(n*t,(n+1)*t));return r}function Ni(e){var t=e.getIndex,r=e.widgetType;e.methodName;var n=e.args,i=e.instantSearchInstance;if(n.length===1&&Ke(n[0])==="object")return[n[0]];var a=n[0].split(":"),s=Ys(a,2),u=s[0],c=s[1],o=n[1],f=n[2],l=n[3]||{};if(!o)return[];if((u==="click"||u==="conversion")&&!f)return[];var h=Array.isArray(o)?o:[o];if(h.length===0)return[];var m=h[0].__queryID,g=io(h),d=g.map(function(P){return P.map(function(y){return y.objectID})}),v=g.map(function(P){return P.map(function(y){return y.__position})});return u==="view"?i.status!=="idle"?[]:g.map(function(P,y){return{insightsMethod:"viewedObjectIDs",widgetType:r,eventType:u,payload:cr({eventName:f||"Hits Viewed",index:t(),objectIDs:d[y]},l),hits:P,eventModifier:c}}):u==="click"?g.map(function(P,y){return{insightsMethod:"clickedObjectIDsAfterSearch",widgetType:r,eventType:u,payload:cr({eventName:f||"Hit Clicked",index:t(),queryID:m,objectIDs:d[y],positions:v[y]},l),hits:P,eventModifier:c}}):u==="conversion"?g.map(function(P,y){return{insightsMethod:"convertedObjectIDsAfterSearch",widgetType:r,eventType:u,payload:cr({eventName:f||"Hit Converted",index:t(),queryID:m,objectIDs:d[y]},l),hits:P,eventModifier:c}}):[]}function ao(e){var t=e.instantSearchInstance,r=e.getIndex,n=e.widgetType,i={},a=void 0,s=function(){for(var c=arguments.length,o=new Array(c),f=0;f<c;f++)o[f]=arguments[f];var l=Ni({widgetType:n,getIndex:r,methodName:"sendEvent",args:o,instantSearchInstance:t});l.forEach(function(h){h.eventType==="click"&&h.eventModifier==="internal"&&i[h.eventType]||(i[h.eventType]=!0,t.sendEventToInsights(h))}),clearTimeout(a),a=setTimeout(function(){i={}},0)};return s}function so(e){var t=e.getIndex,r=e.widgetType,n=e.instantSearchInstance,i=function(){for(var s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];var o=Ni({widgetType:r,getIndex:t,methodName:"bindEvent",args:u,instantSearchInstance:n});return o.length?"data-insights-event=".concat(Di(o)):""};return i}function he(e){return e.$$type==="ais.index"}function Or(e,t){var r=e[t.getIndexId()]||{};t.getHelper().setState(t.getWidgetSearchParameters(t.getHelper().state,{uiState:r})),t.getWidgets().filter(he).forEach(function(n){return Or(e,n)})}var oo=Promise.resolve();function Ye(e){var t=null,r=!1,n=function(){for(var a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];t===null&&(t=oo.then(function(){if(t=null,r){r=!1;return}e.apply(void 0,s)}))};return n.wait=function(){if(t===null)throw new Error("The deferred function should be called before calling `wait()`");return t},n.cancel=function(){t!==null&&(r=!0)},n}function uo(e){var t=e.name,r=e.connector,n=r===void 0?!1:r;return["https://www.algolia.com/doc/api-reference/widgets/",t,"/js/",n?"#connector":""].join("")}function Ue(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.map(function(i){return uo(i)}).join(", ");return function(i){return[i,"See documentation: ".concat(n)].filter(Boolean).join(`

`)}}function co(e,t){for(var r,n=0;n<e.length;n++)if(r=e[n],t(r,n,e))return r}function fo(e,t){if(!Array.isArray(e))return-1;for(var r=0;r<e.length;r++)if(t(e[r]))return r;return-1}function lo(e){if(e.transporter){var t=e.transporter,r=t.headers,n=t.queryParameters,i="x-algolia-application-id",a="x-algolia-api-key",s=r[i]||n[i],u=r[a]||n[a];return[s,u]}else return[e.applicationID,e.apiKey]}function Li(e){var t=ce.highlightPostTag,r=ce.highlightPreTag,n=e.split(r),i=n.shift(),a=i?[{value:i,isHighlighted:!1}]:[];return n.forEach(function(s){var u=s.split(t);a.push({value:u[0],isHighlighted:!0}),u[1]!==""&&a.push({value:u[1],isHighlighted:!1})}),a}var ho=new RegExp(/\w/i);function mo(e,t){var r,n,i=e[t],a=((r=e[t+1])===null||r===void 0?void 0:r.isHighlighted)||!0,s=((n=e[t-1])===null||n===void 0?void 0:n.isHighlighted)||!0;return!ho.test(ks(i.value))&&s===a?s:i.isHighlighted}function Yt(e,t){var r=Array.isArray(t)?t:t.split(".");return r.reduce(function(n,i){return n&&n[i]},e)}function lt(e){return lt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lt(e)}function rn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function nn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rn(Object(r),!0).forEach(function(n){go(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function go(e,t,r){return t=po(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function po(e){var t=vo(e,"string");return lt(t)==="symbol"?t:String(t)}function vo(e,t){if(lt(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(lt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yo(e,t,r){return e.map(function(n,i){return nn(nn({},n),{},{__position:r*t+i+1})})}function ht(e){return ht=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ht(e)}function an(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function sn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?an(Object(r),!0).forEach(function(n){bo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):an(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bo(e,t,r){return t=So(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function So(e){var t=Po(e,"string");return ht(t)==="symbol"?t:String(t)}function Po(e,t){if(ht(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ht(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ro(e,t){return t?e.map(function(r){return sn(sn({},r),{},{__queryID:t})}):e}function dt(e){return dt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dt(e)}function on(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function un(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?on(Object(r),!0).forEach(function(n){Oo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):on(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Oo(e,t,r){return t=wo(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wo(e){var t=jo(e,"string");return dt(t)==="symbol"?t:String(t)}function jo(e,t){if(dt(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(dt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _o(e,t){var r=Object.keys(t).reduce(function(n,i){var a=t[i];return a.recommendResults?un(un({},n),a.recommendResults.results):n},{});e._recommendCache=r}function mt(e){return mt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mt(e)}function xo(e,t){return To(e)||Eo(e,t)||$o(e,t)||Fo()}function Fo(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $o(e,t){if(!!e){if(typeof e=="string")return cn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return cn(e,t)}}function cn(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Eo(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,o=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(f){o=!0,i=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(o)throw i}}return u}}function To(e){if(Array.isArray(e))return e}function fn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function et(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fn(Object(r),!0).forEach(function(n){Ui(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ui(e,t,r){return t=Io(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Io(e){var t=Ao(e,"string");return mt(t)==="symbol"?t:String(t)}function Ao(e,t){if(mt(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(mt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Co(e,t){if(!!t&&!((!("transporter"in e)||e._cacheHydrated)&&(!e._useCache||typeof e.addAlgoliaAgent!="function"))){var r=Object.keys(t).map(function(s){var u=t[s],c=u.state,o=u.requestParams,f=u.results;return f&&c?f.map(function(l){return et({indexName:c.index||l.index},o||l.params?{params:ln(o||Ho(l.params))}:{})}):[]}),n=Object.keys(t).reduce(function(s,u){var c=t[u].results;return c?s.concat(c):s},[]);if("transporter"in e&&!e._cacheHydrated){e._cacheHydrated=!0;var i=e.search;e.search=function(s){for(var u=arguments.length,c=new Array(u>1?u-1:0),o=1;o<u;o++)c[o-1]=arguments[o];var f=s.map(function(l){return et(et({},l),{},{params:ln(l.params)})});return e.transporter.responsesCache.get({method:"search",args:[f].concat(c)},function(){return i.apply(void 0,[s].concat(c))})},e.transporter.responsesCache.set({method:"search",args:r},{results:n})}if(!("transporter"in e)){var a="/1/indexes/*/queries_body_".concat(JSON.stringify({requests:r}));e.cache=et(et({},e.cache),{},Ui({},a,JSON.stringify({results:Object.keys(t).map(function(s){return t[s].results})})))}}}function Ho(e){return e.split("&").reduce(function(t,r){var n=r.split("="),i=xo(n,2),a=i[0],s=i[1];return t[a]=s?decodeURIComponent(s):"",t},{})}function ln(e){var t=function(i){return Object.prototype.toString.call(i)==="[object Object]"||Object.prototype.toString.call(i)==="[object Array]"},r=function(i){for(var a=arguments.length,s=new Array(a>1?a-1:0),u=1;u<a;u++)s[u-1]=arguments[u];var c=0;return i.replace(/%s/g,function(){return encodeURIComponent(s[c++])})};return Object.keys(e).map(function(n){return r("%s=%s",n,t(e[n])?JSON.stringify(e[n]):e[n])}).join("&")}function hn(e){return e!==Object(e)}function Wi(e,t){if(e===t)return!0;if(hn(e)||hn(t)||typeof e=="function"||typeof t=="function")return e===t;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];if(!(i in t)||!Wi(e[i],t[i]))return!1}return!0}function Do(e){return e.filter(function(t,r,n){return n.indexOf(t)===r})}function gt(e){return gt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gt(e)}var No=["facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements","ruleContexts"];function dn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Re(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dn(Object(r),!0).forEach(function(n){Lo(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Lo(e,t,r){return t=Uo(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Uo(e){var t=Wo(e,"string");return gt(t)==="symbol"?t:String(t)}function Wo(e,t){if(gt(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(gt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qo(e,t){if(e==null)return{};var r=qo(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(r[n]=e[n]))}return r}function qo(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var ko=function(t,r){r.facets,r.disjunctiveFacets,r.facetsRefinements,r.facetsExcludes,r.disjunctiveFacetsRefinements,r.numericRefinements,r.tagRefinements,r.hierarchicalFacets,r.hierarchicalFacetsRefinements,r.ruleContexts;var n=Qo(r,No);return t.setQueryParameters(n)},Mo=function(t,r){return r.facets.reduce(function(n,i){return n.addFacet(i)},t)},Bo=function(t,r){return r.disjunctiveFacets.reduce(function(n,i){return n.addDisjunctiveFacet(i)},t)},Ko=function(t,r){return t.setQueryParameters({hierarchicalFacets:r.hierarchicalFacets.reduce(function(n,i){var a=fo(n,function(u){return u.name===i.name});if(a===-1)return n.concat(i);var s=n.slice();return s.splice(a,1,i),s},t.hierarchicalFacets)})},Vo=function(t,r){return r.tagRefinements.reduce(function(n,i){return n.addTagRefinement(i)},t)},Jo=function(t,r){return t.setQueryParameters({facetsRefinements:Re(Re({},t.facetsRefinements),r.facetsRefinements)})},zo=function(t,r){return t.setQueryParameters({facetsExcludes:Re(Re({},t.facetsExcludes),r.facetsExcludes)})},Go=function(t,r){return t.setQueryParameters({disjunctiveFacetsRefinements:Re(Re({},t.disjunctiveFacetsRefinements),r.disjunctiveFacetsRefinements)})},Xo=function(t,r){return t.setQueryParameters({numericRefinements:Re(Re({},t.numericRefinements),r.numericRefinements)})},Zo=function(t,r){return t.setQueryParameters({hierarchicalFacetsRefinements:Re(Re({},t.hierarchicalFacetsRefinements),r.hierarchicalFacetsRefinements)})},Yo=function(t,r){var n=Do([].concat(t.ruleContexts).concat(r.ruleContexts).filter(Boolean));return n.length>0?t.setQueryParameters({ruleContexts:n}):t},Bt=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return r.reduce(function(i,a){var s=Zo(i,a),u=Ko(s,a),c=Vo(u,a),o=Xo(c,a),f=Go(o,a),l=zo(f,a),h=Jo(l,a),m=Bo(h,a),g=Yo(m,a),d=Mo(g,a);return ko(d,a)})};function eu(e){return iu(e)||nu(e)||ru(e)||tu()}function tu(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ru(e,t){if(!!e){if(typeof e=="string")return wr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wr(e,t)}}function nu(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function iu(e){if(Array.isArray(e))return wr(e)}function wr(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function mn(e){var t=e.start,r=t===void 0?0:t,n=e.end,i=e.step,a=i===void 0?1:i,s=a===0?1:a,u=Math.round((n-r)/s);return eu(Array(u)).map(function(c,o){return r+o*s})}function st(e,t,r){var n=t.getHelper();return{uiState:r,helper:n,parent:t,instantSearchInstance:e,state:n.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,scopedResults:[],searchMetadata:{isSearchStalled:e.status==="stalled"},status:e.status,error:e.error}}function gn(e,t,r){var n=t.getResultsForWidget(r),i=t.getHelper();return{helper:i,parent:t,instantSearchInstance:e,results:n,scopedResults:t.getScopedResults(),state:n&&"_state"in n?n._state:i.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,searchMetadata:{isSearchStalled:e.status==="stalled"},status:e.status,error:e.error}}function au(e){for(var t=e.getParent(),r=[e.getHelper().state];t!==null;)r=[t.getHelper().state].concat(r),t=t.getParent();return r}function pt(e){return pt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pt(e)}function pn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pn(Object(r),!0).forEach(function(n){su(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function su(e,t,r){return t=ou(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ou(e){var t=uu(e,"string");return pt(t)==="symbol"?t:String(t)}function uu(e,t){if(pt(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(pt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qi(e){return e.some(function(t){return t.isHighlighted})?e.map(function(t,r){return qt(qt({},t),{},{isHighlighted:!mo(e,r)})}):e.map(function(t){return qt(qt({},t),{},{isHighlighted:!1})})}function Te(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{fallback:function(){}},r=t.fallback;return typeof window=="undefined"?r():e({window})}function vt(e){return vt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vt(e)}function vn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function X(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vn(Object(r),!0).forEach(function(n){qi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qi(e,t,r){return t=cu(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cu(e){var t=fu(e,"string");return vt(t)==="symbol"?t:String(t)}function fu(e,t){if(vt(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(vt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var lu=Ue({name:"configure",connector:!0});function yn(e,t){return e.setQueryParameters(Object.keys(t.searchParameters).reduce(function(r,n){return X(X({},r),{},qi({},n,void 0))},{}))}var hu=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ie,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ie;return function(n){if(!n||!Ii(n.searchParameters))throw new Error(lu("The `searchParameters` option expects an object."));var i={};function a(s){return function(u){var c=yn(s.state,n),o=Bt(c,new te.SearchParameters(u));n.searchParameters=u,s.setState(o).search()}}return{$$type:"ais.configure",init:function(u){var c=u.instantSearchInstance;t(X(X({},this.getWidgetRenderState(u)),{},{instantSearchInstance:c}),!0)},render:function(u){var c=u.instantSearchInstance;t(X(X({},this.getWidgetRenderState(u)),{},{instantSearchInstance:c}),!1)},dispose:function(u){var c=u.state;return r(),yn(c,n)},getRenderState:function(u,c){var o,f=this.getWidgetRenderState(c);return X(X({},u),{},{configure:X(X({},f),{},{widgetParams:X(X({},f.widgetParams),{},{searchParameters:Bt(new te.SearchParameters((o=u.configure)===null||o===void 0?void 0:o.widgetParams.searchParameters),new te.SearchParameters(f.widgetParams.searchParameters)).getQueryParams()})})})},getWidgetRenderState:function(u){var c=u.helper;return i.refine||(i.refine=a(c)),{refine:i.refine,widgetParams:n}},getWidgetSearchParameters:function(u,c){var o=c.uiState;return Bt(u,new te.SearchParameters(X(X({},o.configure),n.searchParameters)))},getWidgetUiState:function(u){return X(X({},u),{},{configure:X(X({},u.configure),n.searchParameters)})}}}},du=hu;function jr(e){return jr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jr(e)}var bn=Object.prototype.hasOwnProperty;function Ve(e,t,r){if(r!=null&&r(e,t))return!0;var n,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((i=e.length)===t.length)for(;i--&&Ve(e[i],t[i],r););return i===-1}if(!n||jr(e)==="object"){i=0;for(n in e)if(bn.call(e,n)&&++i&&!bn.call(t,n)||!(n in t)||!Ve(e[n],t[n],r))return!1;return Object.keys(t).length===i}}return e!==e&&t!==t}function Sn(e){var t,r,n;return new te.SearchResults(e,[{query:(t=e.query)!==null&&t!==void 0?t:"",page:(r=e.page)!==null&&r!==void 0?r:0,hitsPerPage:(n=e.hitsPerPage)!==null&&n!==void 0?n:20,hits:[],nbHits:0,nbPages:0,params:"",exhaustiveNbHits:!0,exhaustiveFacetsCount:!0,processingTimeMS:0,index:e.index}],{__isArtificial:!0})}function yt(e){return yt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yt(e)}function Pn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Rn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Pn(Object(r),!0).forEach(function(n){mu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mu(e,t,r){return t=gu(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gu(e){var t=pu(e,"string");return yt(t)==="symbol"?t:String(t)}function pu(e,t){if(yt(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(yt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _r(e){var t=e.getHelper(),r=e.getResults()||Sn(t.state),n=e.getScopedResults().map(function(i){var a=i.indexId===e.getIndexId()?r:Sn(i.helper.state);return Rn(Rn({},i),{},{results:i.results||a})});return{results:r,scopedResults:n,recommendResults:t.lastRecommendResults}}function ki(e,t){if(!e)throw new Error("Invariant failed")}var Mi=C.exports.createContext(null);function Mr(){var e=C.exports.useContext(Mi);return ki(e!==null),e}var Bi=C.exports.createContext(null);function Nt(){var e=C.exports.useContext(Bi);return ki(e!==null),e}var vu=C.exports.createContext(null);function Ki(){return C.exports.useContext(vu)}var yu=C.exports.createContext(null);function Vi(){return C.exports.useContext(yu)}function bu(e,t){return Ou(e)||Ru(e,t)||Pu(e,t)||Su()}function Su(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pu(e,t){if(!!e){if(typeof e=="string")return On(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return On(e,t)}}function On(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ru(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,o=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(f){o=!0,i=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(o)throw i}}return u}}function Ou(e){if(Array.isArray(e))return e}function wn(e){var t=C.exports.useState(function(){return e}),r=bu(t,2),n=r[0],i=r[1];return Ve(n,e)||i(e),n}var wu="use",jn=Pa[wu],Ji=typeof window!="undefined"?C.exports.useLayoutEffect:C.exports.useEffect,ju=C.exports.createContext(null);function zi(){return C.exports.useContext(ju)}function _u(e){var t,r=e.widget,n=e.parentIndex,i=e.props,a=e.shouldSsr,s=zi(),u=C.exports.useRef(i);C.exports.useEffect(function(){u.current=i},[i]);var c=C.exports.useRef(r);C.exports.useEffect(function(){c.current=r},[r]);var o=C.exports.useRef(null),f=a&&!n.getWidgets().includes(r),l=Nt();if(Ji(function(){var m=c.current;if(!o.current)a||n.addWidgets([r]);else{clearTimeout(o.current);var g=Ve(i,u.current);g||(n.removeWidgets([m]),n.addWidgets([r]))}return function(){o.current=setTimeout(function(){l._schedule(function(){l._preventWidgetCleanup||n.removeWidgets([m])})})}},[n,r,a,l,i]),(f||(s==null||(t=s.current)===null||t===void 0?void 0:t.status)==="pending")&&n.addWidgets([r]),typeof window=="undefined"&&s!==null&&s!==void 0&&s.current&&r.$$type!=="ais.index"){var h;jn(s.current),r.$$type!=="ais.dynamicWidgets"&&(h=l.helper)!==null&&h!==void 0&&h.lastResults&&jn(s.current)}}function bt(e){return bt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bt(e)}var xu=["instantSearchInstance","widgetParams"],Fu=["widgetParams"];function $u(e,t){return Au(e)||Iu(e,t)||Tu(e,t)||Eu()}function Eu(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tu(e,t){if(!!e){if(typeof e=="string")return _n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _n(e,t)}}function _n(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Iu(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,o=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(f){o=!0,i=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(o)throw i}}return u}}function Au(e){if(Array.isArray(e))return e}function xn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Fn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xn(Object(r),!0).forEach(function(n){Cu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Cu(e,t,r){return t=Hu(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hu(e){var t=Du(e,"string");return bt(t)==="symbol"?t:String(t)}function Du(e,t){if(bt(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(bt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $n(e,t){if(e==null)return{};var r=Nu(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(r[n]=e[n]))}return r}function Nu(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function Lt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=Ki(),i=Vi(),a=Nt(),s=Mr(),u=wn(t),c=wn(r),o=C.exports.useRef(!0),f=C.exports.useRef(null),l=C.exports.useRef(a.status),h=C.exports.useMemo(function(){var P=e(function(y,F){if(F){o.current=!0;return}if(o.current){var j=y.instantSearchInstance;y.widgetParams;var _=$n(y,xu);(!Ve(_,f.current,function(D,A){return(D==null?void 0:D.constructor)===Function&&(A==null?void 0:A.constructor)===Function})||j.status!==l.current)&&(v(_),f.current=_,l.current=j.status)}},function(){o.current=!1});return Fn(Fn({},P(u)),c)},[e,u,c]),m=C.exports.useState(function(){if(h.getWidgetRenderState){var P,y=s.getHelper(),F=s.getWidgetUiState({})[s.getIndexId()];y.state=((P=h.getWidgetSearchParameters)===null||P===void 0?void 0:P.call(h,y.state,{uiState:F}))||y.state;var j=_r(s),_=j.results,D=j.scopedResults,A=j.recommendResults,E=h.getWidgetRenderState({helper:y,parent:s,instantSearchInstance:a,results:h.dependsOn==="recommend"&&A&&i?A[i.recommendIdx.current++]:_,scopedResults:D,state:y.state,renderState:a.renderState,templatesConfig:a.templatesConfig,createURL:s.createURL,searchMetadata:{isSearchStalled:a.status==="stalled"},status:a.status,error:a.error});E.widgetParams;var L=$n(E,Fu);return L}return{}}),g=$u(m,2),d=g[0],v=g[1];return _u({widget:h,parentIndex:s,props:u,shouldSsr:Boolean(n)}),d}function Lu(e,t){return Lt(du,{searchParameters:e},t)}function St(e){return St=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},St(e)}function En(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Uu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?En(Object(r),!0).forEach(function(n){Wu(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):En(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Wu(e,t,r){return t=Qu(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qu(e){var t=qu(e,"string");return St(t)==="symbol"?t:String(t)}function qu(e,t){if(St(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(St(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rh(e){return Lu(Uu({},e),{$$widgetType:"ais.configure"}),null}function Pt(e){return Pt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pt(e)}var ku=["initialSearchParameters"],Mu=["initialRecommendParameters"];function Tn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Pe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tn(Object(r),!0).forEach(function(n){Me(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Me(e,t,r){return t=Bu(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bu(e){var t=Ku(e,"string");return Pt(t)==="symbol"?t:String(t)}function Ku(e,t){if(Pt(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Pt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Gi(e){return Gu(e)||zu(e)||Ju(e)||Vu()}function Vu(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ju(e,t){if(!!e){if(typeof e=="string")return xr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return xr(e,t)}}function zu(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Gu(e){if(Array.isArray(e))return xr(e)}function xr(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Xi(e,t){if(e==null)return{};var r=Xu(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(r[n]=e[n]))}return r}function Xu(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var tt=Ue({name:"index-widget"});function Zi(e,t){var r=t.state,n=t.recommendState,i=t.isPageReset,a=t._uiState;r!==e.state&&(e.state=r,e.emit("change",{state:e.state,results:e.lastResults,isPageReset:i,_uiState:a})),n!==e.recommendState&&(e.recommendState=n)}function rt(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return e.reduce(function(n,i){return he(i)||!i.getWidgetUiState&&!i.getWidgetState?n:i.getWidgetUiState?i.getWidgetUiState(n,t):i.getWidgetState(n,t)},r)}function nt(e,t){var r=t.initialSearchParameters,n=Xi(t,ku);return e.reduce(function(i,a){return!a.getWidgetSearchParameters||he(a)?i:a.dependsOn==="search"&&a.getWidgetParameters?a.getWidgetParameters(i,n):a.getWidgetSearchParameters(i,n)},r)}function In(e,t){var r=t.initialRecommendParameters,n=Xi(t,Mu);return e.reduce(function(i,a){return!he(a)&&a.dependsOn==="recommend"&&a.getWidgetParameters?a.getWidgetParameters(i,n):i},r)}function Yi(e){var t=e.filter(he);t.length!==0&&t.forEach(function(r){var n=r.getHelper();Zi(n,{state:n.state.resetPage(),recommendState:n.recommendState,isPageReset:!0}),Yi(r.getWidgets())})}function ea(e){var t=e.filter(he);return t.reduce(function(r,n){return r.concat.apply(r,[{indexId:n.getIndexId(),results:n.getResults(),helper:n.getHelper()}].concat(Gi(ea(n.getWidgets()))))},[])}var Zu=function(t){if(t===void 0||t.indexName===void 0)throw new Error(tt("The `indexName` option is required."));var r=t.indexName,n=t.indexId,i=n===void 0?r:n,a=[],s={},u=null,c=null,o=null,f=null,l=null,h=!1,m=!1;return{$$type:"ais.index",$$widgetType:"ais.index",getIndexName:function(){return r},getIndexId:function(){return i},getHelper:function(){return o},getResults:function(){var d;return(d=f)!==null&&d!==void 0&&d.lastResults?(f.lastResults._state=o.state,f.lastResults):null},getResultsForWidget:function(d){var v;return d.dependsOn!=="recommend"||he(d)||d.$$id===void 0?this.getResults():(v=o)!==null&&v!==void 0&&v.lastRecommendResults?o.lastRecommendResults[d.$$id]:null},getPreviousState:function(){return l},getScopedResults:function(){var d=this.getParent(),v;return d?v=d.getWidgets():r.length===0?v=this.getWidgets():v=[this],ea(v)},getParent:function(){return c},createURL:function(d){return typeof d=="function"?u._createURL(Me({},i,d(s))):u._createURL(Me({},i,rt(a,{searchParameters:d,helper:o})))},getWidgets:function(){return a},addWidgets:function(d){var v=this;if(!Array.isArray(d))throw new Error(tt("The `addWidgets` method expects an array of widgets."));if(d.some(function(P){return typeof P.init!="function"&&typeof P.render!="function"}))throw new Error(tt("The widget definition expects a `render` and/or an `init` method."));return d.forEach(function(P){he(P)||(u&&P.dependsOn==="recommend"?u._hasRecommendWidget=!0:u?u._hasSearchWidget=!0:P.dependsOn==="recommend"?h=!0:m=!0,Ds(P))}),a=a.concat(d),u&&Boolean(d.length)&&(Zi(o,{state:nt(a,{uiState:s,initialSearchParameters:o.state}),recommendState:In(a,{uiState:s,initialRecommendParameters:o.recommendState}),_uiState:s}),d.forEach(function(P){if(P.getRenderState){var y=P.getRenderState(u.renderState[v.getIndexId()]||{},st(u,v,u._initialUiState));fr({renderState:y,instantSearchInstance:u,parent:v})}}),d.forEach(function(P){P.init&&P.init(st(u,v,u._initialUiState))}),u.scheduleSearch()),this},removeWidgets:function(d){var v=this;if(!Array.isArray(d))throw new Error(tt("The `removeWidgets` method expects an array of widgets."));if(d.some(function(_){return typeof _.dispose!="function"}))throw new Error(tt("The widget definition expects a `dispose` method."));if(a=a.filter(function(_){return d.indexOf(_)===-1}),a.forEach(function(_){he(_)||(u&&_.dependsOn==="recommend"?u._hasRecommendWidget=!0:u?u._hasSearchWidget=!0:_.dependsOn==="recommend"?h=!0:m=!0)}),u&&Boolean(d.length)){var P=d.reduce(function(_,D){var A=D.dispose({helper:o,state:_.cleanedSearchState,recommendState:_.cleanedRecommendState,parent:v});return A instanceof te.RecommendParameters?_.cleanedRecommendState=A:A&&(_.cleanedSearchState=A),_},{cleanedSearchState:o.state,cleanedRecommendState:o.recommendState}),y=P.cleanedSearchState,F=P.cleanedRecommendState,j=u.future.preserveSharedStateOnUnmount?nt(a,{uiState:s,initialSearchParameters:new te.SearchParameters({index:this.getIndexName()})}):nt(a,{uiState:rt(a,{searchParameters:y,helper:o}),initialSearchParameters:y});s=rt(a,{searchParameters:j,helper:o}),o.setState(j),o.recommendState=F,a.length&&u.scheduleSearch()}return this},init:function(d){var v=this,P,y=d.instantSearchInstance,F=d.parent,j=d.uiState;if(o===null){u=y,c=F,s=j[i]||{};var _=y.mainHelper,D=nt(a,{uiState:s,initialSearchParameters:new te.SearchParameters({index:r})}),A=In(a,{uiState:s,initialRecommendParameters:new te.RecommendParameters});o=te({},D.index,D),o.recommendState=A,o.search=function(){return y.onStateChange?(y.onStateChange({uiState:y.mainIndex.getWidgetUiState({}),setUiState:function(H){return y.setUiState(H,!1)}}),_):_.search()},o.searchWithoutTriggeringOnStateChange=function(){return _.search()},o.searchForFacetValues=function(T,H,ae,Oe){var xe=o.state.setQueryParameters(Oe);return _.searchForFacetValues(T,H,ae,xe)},f=_.derive(function(){return Bt.apply(void 0,[_.state].concat(Gi(au(v))))},function(){return v.getHelper().recommendState});var E=(P=y._initialResults)===null||P===void 0?void 0:P[this.getIndexId()];if(E!=null&&E.results){var L=new te.SearchResults(new te.SearchParameters(E.state),E.results);f.lastResults=L,o.lastResults=L}if(E!=null&&E.recommendResults){var B=new te.RecommendResults(new te.RecommendParameters({params:E.recommendResults.params}),E.recommendResults.results);f.lastRecommendResults=B,o.lastRecommendResults=B}o.on("change",function(T){var H=T.isPageReset;H&&Yi(a)}),f.on("search",function(){y.scheduleStalledRender()}),f.on("result",function(T){var H=T.results;y.scheduleRender(),o.lastResults=H,l=H==null?void 0:H._state}),f.on("recommend:result",function(T){var H=T.recommend;y.scheduleRender(),o.lastRecommendResults=H.results}),a.forEach(function(T){if(T.getRenderState){var H=T.getRenderState(y.renderState[v.getIndexId()]||{},st(y,v,j));fr({renderState:H,instantSearchInstance:y,parent:v})}}),a.forEach(function(T){T.init&&T.init(st(y,v,j))}),o.on("change",function(T){var H=T.state,ae=T._uiState;s=rt(a,{searchParameters:H,helper:o},ae||{}),y.onStateChange||y.onInternalStateChange()}),E&&y.scheduleRender(),h&&(y._hasRecommendWidget=!0),m&&(y._hasSearchWidget=!0)}},render:function(d){var v,P=this,y=d.instantSearchInstance;y.status==="error"&&!y.mainHelper.hasPendingRequests()&&l&&o.setState(l);var F=this.getResults()||(v=f)!==null&&v!==void 0&&v.lastRecommendResults?a:a.filter(he);F=F.filter(function(j){return j.shouldRender?j.shouldRender({instantSearchInstance:y}):!0}),F.forEach(function(j){if(j.getRenderState){var _=j.getRenderState(y.renderState[P.getIndexId()]||{},gn(y,P,j));fr({renderState:_,instantSearchInstance:y,parent:P})}}),F.forEach(function(j){j.render&&j.render(gn(y,P,j))})},dispose:function(){var d=this,v,P;a.forEach(function(y){y.dispose&&o&&y.dispose({helper:o,state:o.state,recommendState:o.recommendState,parent:d})}),u=null,c=null,(v=o)===null||v===void 0||v.removeAllListeners(),o=null,(P=f)===null||P===void 0||P.detach(),f=null},getWidgetUiState:function(d){return a.filter(he).reduce(function(v,P){return P.getWidgetUiState(v)},Pe(Pe({},d),{},Me({},i,Pe(Pe({},d[i]),s))))},getWidgetState:function(d){return this.getWidgetUiState(d)},getWidgetSearchParameters:function(d,v){var P=v.uiState;return nt(a,{uiState:P,initialSearchParameters:d})},refreshUiState:function(){s=rt(a,{searchParameters:this.getHelper().state,helper:this.getHelper()},s)},setIndexUiState:function(d){var v=typeof d=="function"?d(s):d;u.setUiState(function(P){return Pe(Pe({},P),{},Me({},i,v))})}}},Yu=Zu;function fr(e){var t=e.renderState,r=e.instantSearchInstance,n=e.parent,i=n?n.getIndexId():r.mainIndex.getIndexId();r.renderState=Pe(Pe({},r.renderState),{},Me({},i,Pe(Pe({},r.renderState[i]),t)))}function ec(e,t){return ic(e)||nc(e,t)||rc(e,t)||tc()}function tc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rc(e,t){if(!!e){if(typeof e=="string")return An(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return An(e,t)}}function An(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function nc(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,o=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(f){o=!0,i=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(o)throw i}}return u}}function ic(e){if(Array.isArray(e))return e}function ac(){var e=C.exports.useReducer(function(n){return n+1},0),t=ec(e,2),r=t[1];return r}var sc="ais",er=function(t){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=r.descendantName,i=r.modifierName,a=n?"-".concat(n):"",s=i?"--".concat(i):"";return"".concat(sc,"-").concat(t).concat(a).concat(s)}},oc=er("Highlight");function uc(e){var t=e.attribute,r=e.highlightedTagName,n=r===void 0?"mark":r,i=e.hit,a=e.cssClasses,s=a===void 0?{}:a,u=Yt(i._highlightResult,t),c=u||{},o=c.value,f=o===void 0?"":o,l=oc({descendantName:"highlighted"})+(s.highlighted?" ".concat(s.highlighted):"");return f.replace(new RegExp(ce.highlightPreTag,"g"),"<".concat(n,' class="').concat(l,'">')).replace(new RegExp(ce.highlightPostTag,"g"),"</".concat(n,">"))}var cc=er("ReverseHighlight");function fc(e){var t=e.attribute,r=e.highlightedTagName,n=r===void 0?"mark":r,i=e.hit,a=e.cssClasses,s=a===void 0?{}:a,u=Yt(i._highlightResult,t),c=u||{},o=c.value,f=o===void 0?"":o,l=cc({descendantName:"highlighted"})+(s.highlighted?" ".concat(s.highlighted):""),h=Hi(Qi(Li(f)));return h.replace(new RegExp(ce.highlightPreTag,"g"),"<".concat(n,' class="').concat(l,'">')).replace(new RegExp(ce.highlightPostTag,"g"),"</".concat(n,">"))}var lc=er("Snippet");function hc(e){var t=e.attribute,r=e.highlightedTagName,n=r===void 0?"mark":r,i=e.hit,a=e.cssClasses,s=a===void 0?{}:a,u=Yt(i._snippetResult,t),c=u||{},o=c.value,f=o===void 0?"":o,l=lc({descendantName:"highlighted"})+(s.highlighted?" ".concat(s.highlighted):"");return f.replace(new RegExp(ce.highlightPreTag,"g"),"<".concat(n,' class="').concat(l,'">')).replace(new RegExp(ce.highlightPostTag,"g"),"</".concat(n,">"))}var dc=er("ReverseSnippet");function mc(e){var t=e.attribute,r=e.highlightedTagName,n=r===void 0?"mark":r,i=e.hit,a=e.cssClasses,s=a===void 0?{}:a,u=Yt(i._snippetResult,t),c=u||{},o=c.value,f=o===void 0?"":o,l=dc({descendantName:"highlighted"})+(s.highlighted?" ".concat(s.highlighted):""),h=Hi(Qi(Li(f)));return h.replace(new RegExp(ce.highlightPreTag,"g"),"<".concat(n,' class="').concat(l,'">')).replace(new RegExp(ce.highlightPostTag,"g"),"</".concat(n,">"))}function Fr(e){return Fr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fr(e)}function gc(e){var t=e.method,r=e.payload;if(Fr(r)!=="object")throw new Error("The insights helper expects the payload to be an object.");var n;try{n=Di(r)}catch{throw new Error("Could not JSON serialize the payload object.")}return'data-insights-method="'.concat(t,'" data-insights-payload="').concat(n,'"')}function pc(e,t){return gc({method:e,payload:t})}function $r(e){return $r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$r(e)}var vc="_ALGOLIA";function yc(e){if(!((typeof document=="undefined"?"undefined":$r(document))!=="object"||typeof document.cookie!="string"))for(var t="".concat(e,"="),r=document.cookie.split(";"),n=0;n<r.length;n++){for(var i=r[n];i.charAt(0)===" ";)i=i.substring(1);if(i.indexOf(t)===0)return i.substring(t.length,i.length)}}function bc(){return yc(vc)}function Rt(e){return Rt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rt(e)}function Cn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ce(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cn(Object(r),!0).forEach(function(n){Sc(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Sc(e,t,r){return t=Pc(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pc(e){var t=Rc(e,"string");return Rt(t)==="symbol"?t:String(t)}function Rc(e,t){if(Rt(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Rt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ot(e,t){return jc(e)||wc(e,t)||ta(e,t)||Oc()}function Oc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wc(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,o=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(f){o=!0,i=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(o)throw i}}return u}}function jc(e){if(Array.isArray(e))return e}function _c(e){return $c(e)||Fc(e)||ta(e)||xc()}function xc(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ta(e,t){if(!!e){if(typeof e=="string")return Er(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Er(e,t)}}function Fc(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $c(e){if(Array.isArray(e))return Er(e)}function Er(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ra="2.13.0",Ec="https://cdn.jsdelivr.net/npm/search-insights@".concat(ra,"/dist/search-insights.min.js");function Hn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.insightsClient,r=e.insightsInitParams,n=e.onEvent,i=e.$$internal,a=i===void 0?!1:i,s=e.$$automatic,u=s===void 0?!1:s,c=t;!t&&t!==null&&Te(function(f){var l=f.window,h=l.AlgoliaAnalyticsObject||"aa";typeof h=="string"&&(c=l[h]),c||(l.AlgoliaAnalyticsObject=h,l[h]||(l[h]=function(){l[h].queue||(l[h].queue=[]);for(var m=arguments.length,g=new Array(m),d=0;d<m;d++)g[d]=arguments[d];l[h].queue.push(g)},l[h].version=ra,l[h].shouldAddScript=!0),c=l[h])});var o=c||ie;return function(f){var l=f.instantSearchInstance,h=l.middleware.filter(function(B){return B.instance.$$type==="ais.insights"&&B.instance.$$internal}).map(function(B){return B.creator});l.unuse.apply(l,_c(h));var m=lo(l.client),g=ot(m,2),d=g[0],v=g[1],P=void 0,y=void 0,F=void 0,j=void 0,_=o.queue;if(Array.isArray(_)){var D=["setUserToken","setAuthenticatedUserToken"].map(function(B){var T=co(_.slice().reverse(),function(Oe){var xe=ot(Oe,1),Ae=xe[0];return Ae===B})||[],H=ot(T,2),ae=H[1];return ae}),A=ot(D,2);P=A[0],y=A[1]}o("getUserToken",null,function(B,T){F=lr(T)}),o("getAuthenticatedUserToken",null,function(B,T){j=lr(T)}),(r||!Dn(o))&&o("init",Ce({appId:d,apiKey:v,partial:!0},r));var E,L;return{$$type:"ais.insights",$$internal:a,$$automatic:u,onStateChange:function(){},subscribe:function(){if(!!o.shouldAddScript){var T="[insights middleware]: could not load search-insights.js. Please load it manually following https://alg.li/insights-init";try{var H=document.createElement("script");H.async=!0,H.src=Ec,H.onerror=function(){l.emit("error",new Error(T))},document.body.appendChild(H),o.shouldAddScript=!1}catch{o.shouldAddScript=!1,l.emit("error",new Error(T))}}},started:function(){o("addAlgoliaAgent","insights-middleware"),L=l.mainHelper,E={userToken:L.state.userToken,clickAnalytics:L.state.clickAnalytics},u||L.overrideStateWithoutTriggeringChangeEvent(Ce(Ce({},L.state),{},{clickAnalytics:!0})),a||l.scheduleSearch();var T=function(de){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,We=lr(de);if(!We)return;var Ut=L.state.userToken;function Ge(){L.overrideStateWithoutTriggeringChangeEvent(Ce(Ce({},L.state),{},{userToken:We})),Ut&&Ut!==de&&l.scheduleSearch()}me?Ge():setTimeout(Ge,0)},H=bc();H&&T(H,!0);function ae(z,de,me){T(z,!0),de&&o("setUserToken",de),me&&o("setAuthenticatedUserToken",me)}var Oe=j||F,xe=y||P;Oe?ae(Oe,F,j):xe&&ae(xe,P,y),o("onUserTokenChange",T,{immediate:!0}),o("onAuthenticatedUserTokenChange",function(z){z||o("getUserToken",null,function(de,me){T(me)}),T(z)},{immediate:!0});var Ae=o;Dn(o)&&(Ae=function(de,me){var We={headers:{"X-Algolia-Application-Id":d,"X-Algolia-API-Key":v}};return o(de,me,We)}),l.sendEventToInsights=function(z){n?n(z,Ae):z.insightsMethod&&(z.payload.algoliaSource=["instantsearch"],u&&z.payload.algoliaSource.push("instantsearch-automatic"),z.eventModifier==="internal"&&z.payload.algoliaSource.push("instantsearch-internal"),Ae(z.insightsMethod,z.payload))}},unsubscribe:function(){o("onUserTokenChange",void 0),o("onAuthenticatedUserTokenChange",void 0),l.sendEventToInsights=ie,L&&E&&(L.overrideStateWithoutTriggeringChangeEvent(Ce(Ce({},L.state),E)),l.scheduleSearch())}}}}function Dn(e){var t=(e.version||"").split(".").map(Number),r=ot(t,2),n=r[0],i=r[1],a=n>=3,s=n===2&&i>=6,u=n===1&&i>=10;return a||s||u}function lr(e){if(!!e)return typeof e=="number"?e.toString():e}function na(e,t,r){var n=st(t,t.mainIndex,t._initialUiState);e.forEach(function(i){var a={};if(i.getWidgetRenderState){var s=i.getWidgetRenderState(n);s&&s.widgetParams&&(a=s.widgetParams)}var u=Object.keys(a).filter(function(c){return a[c]!==void 0});r.widgets.push({type:i.$$type,widgetType:i.$$widgetType,params:u}),i.$$type==="ais.index"&&na(i.getWidgets(),t,r)})}function Tc(){return Te(function(e){var t,r,n=e.window;return((t=n.navigator)===null||t===void 0||(r=t.userAgent)===null||r===void 0?void 0:r.indexOf("Algolia Crawler"))>-1},{fallback:function(){return!1}})}function Ic(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.$$internal,r=t===void 0?!1:t;return function(n){var i=n.instantSearchInstance,a={widgets:[]},s=document.createElement("meta"),u=document.querySelector("head");return s.name="instantsearch:widgets",{$$type:"ais.metadata",$$internal:r,onStateChange:function(){},subscribe:function(){setTimeout(function(){var o=i.client;a.ua=o.transporter&&o.transporter.userAgent?o.transporter.userAgent.value:o._ua,na(i.mainIndex.getWidgets(),i,a),i.middleware.forEach(function(f){return a.widgets.push({middleware:!0,type:f.instance.$$type,internal:f.instance.$$internal})}),s.content=JSON.stringify(a),u.appendChild(s)},0)},started:function(){},unsubscribe:function(){s.remove()}}}}var Ac=String.prototype.replace,Cc=/%20/g,hr={RFC1738:"RFC1738",RFC3986:"RFC3986"},Br={default:hr.RFC3986,formatters:{RFC1738:function(e){return Ac.call(e,Cc,"+")},RFC3986:function(e){return String(e)}},RFC1738:hr.RFC1738,RFC3986:hr.RFC3986},Hc=Br,dr=Object.prototype.hasOwnProperty,De=Array.isArray,ye=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Dc=function(t){for(;t.length>1;){var r=t.pop(),n=r.obj[r.prop];if(De(n)){for(var i=[],a=0;a<n.length;++a)typeof n[a]!="undefined"&&i.push(n[a]);r.obj[r.prop]=i}}},ia=function(t,r){for(var n=r&&r.plainObjects?Object.create(null):{},i=0;i<t.length;++i)typeof t[i]!="undefined"&&(n[i]=t[i]);return n},Nc=function e(t,r,n){if(!r)return t;if(typeof r!="object"){if(De(t))t.push(r);else if(t&&typeof t=="object")(n&&(n.plainObjects||n.allowPrototypes)||!dr.call(Object.prototype,r))&&(t[r]=!0);else return[t,r];return t}if(!t||typeof t!="object")return[t].concat(r);var i=t;return De(t)&&!De(r)&&(i=ia(t,n)),De(t)&&De(r)?(r.forEach(function(a,s){if(dr.call(t,s)){var u=t[s];u&&typeof u=="object"&&a&&typeof a=="object"?t[s]=e(u,a,n):t.push(a)}else t[s]=a}),t):Object.keys(r).reduce(function(a,s){var u=r[s];return dr.call(a,s)?a[s]=e(a[s],u,n):a[s]=u,a},i)},Lc=function(t,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},t)},Uc=function(e,t,r){var n=e.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},Wc=function(t,r,n,i,a){if(t.length===0)return t;var s=t;if(typeof t=="symbol"?s=Symbol.prototype.toString.call(t):typeof t!="string"&&(s=String(t)),n==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(f){return"%26%23"+parseInt(f.slice(2),16)+"%3B"});for(var u="",c=0;c<s.length;++c){var o=s.charCodeAt(c);if(o===45||o===46||o===95||o===126||o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122||a===Hc.RFC1738&&(o===40||o===41)){u+=s.charAt(c);continue}if(o<128){u=u+ye[o];continue}if(o<2048){u=u+(ye[192|o>>6]+ye[128|o&63]);continue}if(o<55296||o>=57344){u=u+(ye[224|o>>12]+ye[128|o>>6&63]+ye[128|o&63]);continue}c+=1,o=65536+((o&1023)<<10|s.charCodeAt(c)&1023),u+=ye[240|o>>18]+ye[128|o>>12&63]+ye[128|o>>6&63]+ye[128|o&63]}return u},Qc=function(t){for(var r=[{obj:{o:t},prop:"o"}],n=[],i=0;i<r.length;++i)for(var a=r[i],s=a.obj[a.prop],u=Object.keys(s),c=0;c<u.length;++c){var o=u[c],f=s[o];typeof f=="object"&&f!==null&&n.indexOf(f)===-1&&(r.push({obj:s,prop:o}),n.push(f))}return Dc(r),t},qc=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},kc=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},Mc=function(t,r){return[].concat(t,r)},Bc=function(t,r){if(De(t)){for(var n=[],i=0;i<t.length;i+=1)n.push(r(t[i]));return n}return r(t)},aa={arrayToObject:ia,assign:Lc,combine:Mc,compact:Qc,decode:Uc,encode:Wc,isBuffer:kc,isRegExp:qc,maybeMap:Bc,merge:Nc},Tr=aa,ut=Br,Kc=Object.prototype.hasOwnProperty,Nn={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,r){return t+"["+r+"]"},repeat:function(t){return t}},Ne=Array.isArray,Vc=String.prototype.split,Jc=Array.prototype.push,sa=function(e,t){Jc.apply(e,Ne(t)?t:[t])},zc=Date.prototype.toISOString,Ln=ut.default,Y={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Tr.encode,encodeValuesOnly:!1,format:Ln,formatter:ut.formatters[Ln],indices:!1,serializeDate:function(t){return zc.call(t)},skipNulls:!1,strictNullHandling:!1},Gc=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Xc=function e(t,r,n,i,a,s,u,c,o,f,l,h,m,g){var d=t;if(typeof u=="function"?d=u(r,d):d instanceof Date?d=f(d):n==="comma"&&Ne(d)&&(d=Tr.maybeMap(d,function(T){return T instanceof Date?f(T):T})),d===null){if(i)return s&&!m?s(r,Y.encoder,g,"key",l):r;d=""}if(Gc(d)||Tr.isBuffer(d)){if(s){var v=m?r:s(r,Y.encoder,g,"key",l);if(n==="comma"&&m){for(var P=Vc.call(String(d),","),y="",F=0;F<P.length;++F)y+=(F===0?"":",")+h(s(P[F],Y.encoder,g,"value",l));return[h(v)+"="+y]}return[h(v)+"="+h(s(d,Y.encoder,g,"value",l))]}return[h(r)+"="+h(String(d))]}var j=[];if(typeof d=="undefined")return j;var _;if(n==="comma"&&Ne(d))_=[{value:d.length>0?d.join(",")||null:void 0}];else if(Ne(u))_=u;else{var D=Object.keys(d);_=c?D.sort(c):D}for(var A=0;A<_.length;++A){var E=_[A],L=typeof E=="object"&&typeof E.value!="undefined"?E.value:d[E];if(!(a&&L===null)){var B=Ne(d)?typeof n=="function"?n(r,E):r:r+(o?"."+E:"["+E+"]");sa(j,e(L,B,n,i,a,s,u,c,o,f,l,h,m,g))}}return j},Zc=function(t){if(!t)return Y;if(t.encoder!==null&&typeof t.encoder!="undefined"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=t.charset||Y.charset;if(typeof t.charset!="undefined"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=ut.default;if(typeof t.format!="undefined"){if(!Kc.call(ut.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var i=ut.formatters[n],a=Y.filter;return(typeof t.filter=="function"||Ne(t.filter))&&(a=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Y.addQueryPrefix,allowDots:typeof t.allowDots=="undefined"?Y.allowDots:!!t.allowDots,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Y.charsetSentinel,delimiter:typeof t.delimiter=="undefined"?Y.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Y.encode,encoder:typeof t.encoder=="function"?t.encoder:Y.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Y.encodeValuesOnly,filter:a,format:n,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Y.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Y.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Y.strictNullHandling}},Yc=function(e,t){var r=e,n=Zc(t),i,a;typeof n.filter=="function"?(a=n.filter,r=a("",r)):Ne(n.filter)&&(a=n.filter,i=a);var s=[];if(typeof r!="object"||r===null)return"";var u;t&&t.arrayFormat in Nn?u=t.arrayFormat:t&&"indices"in t?u=t.indices?"indices":"repeat":u="indices";var c=Nn[u];i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var o=0;o<i.length;++o){var f=i[o];n.skipNulls&&r[f]===null||sa(s,Xc(r[f],f,c,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset))}var l=s.join(n.delimiter),h=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),l.length>0?h+l:""},Je=aa,Ir=Object.prototype.hasOwnProperty,ef=Array.isArray,Z={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Je.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},tf=function(e){return e.replace(/&#(\d+);/g,function(t,r){return String.fromCharCode(parseInt(r,10))})},oa=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},rf="utf8=%26%2310003%3B",nf="utf8=%E2%9C%93",af=function(t,r){var n={},i=r.ignoreQueryPrefix?t.replace(/^\?/,""):t,a=r.parameterLimit===1/0?void 0:r.parameterLimit,s=i.split(r.delimiter,a),u=-1,c,o=r.charset;if(r.charsetSentinel)for(c=0;c<s.length;++c)s[c].indexOf("utf8=")===0&&(s[c]===nf?o="utf-8":s[c]===rf&&(o="iso-8859-1"),u=c,c=s.length);for(c=0;c<s.length;++c)if(c!==u){var f=s[c],l=f.indexOf("]="),h=l===-1?f.indexOf("="):l+1,m,g;h===-1?(m=r.decoder(f,Z.decoder,o,"key"),g=r.strictNullHandling?null:""):(m=r.decoder(f.slice(0,h),Z.decoder,o,"key"),g=Je.maybeMap(oa(f.slice(h+1),r),function(d){return r.decoder(d,Z.decoder,o,"value")})),g&&r.interpretNumericEntities&&o==="iso-8859-1"&&(g=tf(g)),f.indexOf("[]=")>-1&&(g=ef(g)?[g]:g),Ir.call(n,m)?n[m]=Je.combine(n[m],g):n[m]=g}return n},sf=function(e,t,r,n){for(var i=n?t:oa(t,r),a=e.length-1;a>=0;--a){var s,u=e[a];if(u==="[]"&&r.parseArrays)s=[].concat(i);else{s=r.plainObjects?Object.create(null):{};var c=u.charAt(0)==="["&&u.charAt(u.length-1)==="]"?u.slice(1,-1):u,o=parseInt(c,10);!r.parseArrays&&c===""?s={0:i}:!isNaN(o)&&u!==c&&String(o)===c&&o>=0&&r.parseArrays&&o<=r.arrayLimit?(s=[],s[o]=i):c!=="__proto__"&&(s[c]=i)}i=s}return i},of=function(t,r,n,i){if(!!t){var a=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,u=/(\[[^[\]]*])/g,c=n.depth>0&&s.exec(a),o=c?a.slice(0,c.index):a,f=[];if(o){if(!n.plainObjects&&Ir.call(Object.prototype,o)&&!n.allowPrototypes)return;f.push(o)}for(var l=0;n.depth>0&&(c=u.exec(a))!==null&&l<n.depth;){if(l+=1,!n.plainObjects&&Ir.call(Object.prototype,c[1].slice(1,-1))&&!n.allowPrototypes)return;f.push(c[1])}return c&&f.push("["+a.slice(c.index)+"]"),sf(f,r,n,i)}},uf=function(t){if(!t)return Z;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset!="undefined"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=typeof t.charset=="undefined"?Z.charset:t.charset;return{allowDots:typeof t.allowDots=="undefined"?Z.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Z.allowPrototypes,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Z.arrayLimit,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Z.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Z.comma,decoder:typeof t.decoder=="function"?t.decoder:Z.decoder,delimiter:typeof t.delimiter=="string"||Je.isRegExp(t.delimiter)?t.delimiter:Z.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Z.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Z.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Z.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Z.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Z.strictNullHandling}},cf=function(e,t){var r=uf(t);if(e===""||e===null||typeof e=="undefined")return r.plainObjects?Object.create(null):{};for(var n=typeof e=="string"?af(e,r):e,i=r.plainObjects?Object.create(null):{},a=Object.keys(n),s=0;s<a.length;++s){var u=a[s],c=of(u,n[u],r,typeof e=="string");i=Je.merge(i,c,r)}return Je.compact(i)},ff=Yc,lf=cf,hf=Br,Un={formats:hf,parse:lf,stringify:ff};function Ot(e){return Ot=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ot(e)}function df(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wn(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ua(n.key),n)}}function mf(e,t,r){return t&&Wn(e.prototype,t),r&&Wn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ne(e,t,r){return t=ua(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ua(e){var t=gf(e,"string");return Ot(t)==="symbol"?t:String(t)}function gf(e,t){if(Ot(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ot(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Qn=function(t){t&&(window.document.title=t)},pf=function(){function e(t){var r=this,n=t.windowTitle,i=t.writeDelay,a=i===void 0?400:i,s=t.createURL,u=t.parseURL,c=t.getLocation,o=t.start,f=t.dispose,l=t.push,h=t.cleanUrlOnDispose;df(this,e),ne(this,"$$type","ais.browser"),ne(this,"windowTitle",void 0),ne(this,"writeDelay",void 0),ne(this,"_createURL",void 0),ne(this,"parseURL",void 0),ne(this,"getLocation",void 0),ne(this,"writeTimer",void 0),ne(this,"_onPopState",void 0),ne(this,"inPopState",!1),ne(this,"isDisposed",!1),ne(this,"latestAcknowledgedHistory",0),ne(this,"_start",void 0),ne(this,"_dispose",void 0),ne(this,"_push",void 0),ne(this,"_cleanUrlOnDispose",void 0),this.windowTitle=n,this.writeTimer=void 0,this.writeDelay=a,this._createURL=s,this.parseURL=u,this.getLocation=c,this._start=o,this._dispose=f,this._push=l,this._cleanUrlOnDispose=typeof h=="undefined"?!0:h,Te(function(m){var g=m.window,d=r.windowTitle&&r.windowTitle(r.read());Qn(d),r.latestAcknowledgedHistory=g.history.length})}return mf(e,[{key:"read",value:function(){return this.parseURL({qsModule:Un,location:this.getLocation()})}},{key:"write",value:function(r){var n=this;Te(function(i){var a=i.window,s=n.createURL(r),u=n.windowTitle&&n.windowTitle(r);n.writeTimer&&clearTimeout(n.writeTimer),n.writeTimer=setTimeout(function(){Qn(u),n.shouldWrite(s)&&(n._push?n._push(s):a.history.pushState(r,u||"",s),n.latestAcknowledgedHistory=a.history.length),n.inPopState=!1,n.writeTimer=void 0},n.writeDelay)})}},{key:"onUpdate",value:function(r){var n=this;this._start&&this._start(function(){r(n.read())}),this._onPopState=function(){n.writeTimer&&(clearTimeout(n.writeTimer),n.writeTimer=void 0),n.inPopState=!0,r(n.read())},Te(function(i){var a=i.window;a.addEventListener("popstate",n._onPopState)})}},{key:"createURL",value:function(r){var n=this._createURL({qsModule:Un,routeState:r,location:this.getLocation()});return n}},{key:"dispose",value:function(){var r=this;this._dispose&&this._dispose(),this.isDisposed=!0,Te(function(n){var i=n.window;r._onPopState&&i.removeEventListener("popstate",r._onPopState)}),this.writeTimer&&clearTimeout(this.writeTimer),this._cleanUrlOnDispose&&this.write({})}},{key:"start",value:function(){this.isDisposed=!1}},{key:"shouldWrite",value:function(r){var n=this;return Te(function(i){var a=i.window,s=!(n.isDisposed&&n.latestAcknowledgedHistory!==a.history.length);return!n.inPopState&&s&&r!==a.location.href})}}]),e}();function vf(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.createURL,r=t===void 0?function(g){var d=g.qsModule,v=g.routeState,P=g.location,y=P.protocol,F=P.hostname,j=P.port,_=j===void 0?"":j,D=P.pathname,A=P.hash,E=d.stringify(v),L=_===""?"":":".concat(_);return E?"".concat(y,"//").concat(F).concat(L).concat(D,"?").concat(E).concat(A):"".concat(y,"//").concat(F).concat(L).concat(D).concat(A)}:t,n=e.parseURL,i=n===void 0?function(g){var d=g.qsModule,v=g.location;return d.parse(v.search.slice(1),{arrayLimit:99})}:n,a=e.writeDelay,s=a===void 0?400:a,u=e.windowTitle,c=e.getLocation,o=c===void 0?function(){return Te(function(g){var d=g.window;return d.location},{fallback:function(){throw new Error("You need to provide `getLocation` to the `history` router in environments where `window` does not exist.")}})}:c,f=e.start,l=e.dispose,h=e.push,m=e.cleanUrlOnDispose;return new pf({createURL:r,parseURL:i,writeDelay:s,windowTitle:u,getLocation:o,start:f,dispose:l,push:h,cleanUrlOnDispose:m})}function wt(e){return wt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wt(e)}var yf=["configure"];function qn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function kt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qn(Object(r),!0).forEach(function(n){Ar(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ar(e,t,r){return t=bf(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bf(e){var t=Sf(e,"string");return wt(t)==="symbol"?t:String(t)}function Sf(e,t){if(wt(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(wt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Pf(e,t){if(e==null)return{};var r=Rf(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(r[n]=e[n]))}return r}function Rf(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function kn(e){e.configure;var t=Pf(e,yf);return t}function Of(){return{$$type:"ais.simple",stateToRoute:function(t){return Object.keys(t).reduce(function(r,n){return kt(kt({},r),{},Ar({},n,kn(t[n])))},{})},routeToState:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(t).reduce(function(r,n){return kt(kt({},r),{},Ar({},n,kn(t[n])))},{})}}}function jt(e){return jt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jt(e)}function Mn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mn(Object(r),!0).forEach(function(n){ca(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ca(e,t,r){return t=wf(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wf(e){var t=jf(e,"string");return jt(t)==="symbol"?t:String(t)}function jf(e,t){if(jt(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(jt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _f=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.router,n=r===void 0?vf():r,i=t.stateMapping,a=i===void 0?Of():i,s=t.$$internal,u=s===void 0?!1:s;return function(c){var o=c.instantSearchInstance;function f(m){var g=o.mainIndex.getWidgets().length===0?o._initialUiState:o.mainIndex.getWidgetUiState({}),d=Object.keys(m).reduce(function(P,y){return Mt(Mt({},P),{},ca({},y,m[y]))},g),v=a.stateToRoute(d);return n.createURL(v)}o._createURL=f;var l=void 0,h=o._initialUiState;return{$$type:"ais.router({router:".concat(n.$$type||"__unknown__",", stateMapping:").concat(a.$$type||"__unknown__","})"),$$internal:u,onStateChange:function(g){var d=g.uiState,v=a.stateToRoute(d);(l===void 0||!Wi(l,v))&&(n.write(v),l=v)},subscribe:function(){o._initialUiState=Mt(Mt({},h),a.routeToState(n.read())),n.onUpdate(function(g){o.mainIndex.getWidgets().length>0&&o.setUiState(a.routeToState(g))})},started:function(){var g;(g=n.start)===null||g===void 0||g.call(n)},unsubscribe:function(){n.dispose()}}}};function xf(e,t){return e.toLocaleString(t)}function _t(e){return _t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_t(e)}function Bn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function je(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bn(Object(r),!0).forEach(function(n){Ff(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ff(e,t,r){return t=$f(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $f(e){var t=Ef(e,"string");return _t(t)==="symbol"?t:String(t)}function Ef(e,t){if(_t(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(_t(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Tf(e){var t=e.numberLocale;return{formatNumber:function(n,i){return xf(Number(i(n)),t)},highlight:function(n,i){try{var a=JSON.parse(n);return i(uc(je(je({},a),{},{hit:this})))}catch{throw new Error(`
The highlight helper expects a JSON object of the format:
{ "attribute": "name", "highlightedTagName": "mark" }`)}},reverseHighlight:function(n,i){try{var a=JSON.parse(n);return i(fc(je(je({},a),{},{hit:this})))}catch{throw new Error(`
  The reverseHighlight helper expects a JSON object of the format:
  { "attribute": "name", "highlightedTagName": "mark" }`)}},snippet:function(n,i){try{var a=JSON.parse(n);return i(hc(je(je({},a),{},{hit:this})))}catch{throw new Error(`
The snippet helper expects a JSON object of the format:
{ "attribute": "name", "highlightedTagName": "mark" }`)}},reverseSnippet:function(n,i){try{var a=JSON.parse(n);return i(mc(je(je({},a),{},{hit:this})))}catch{throw new Error(`
  The reverseSnippet helper expects a JSON object of the format:
  { "attribute": "name", "highlightedTagName": "mark" }`)}},insights:function(n,i){try{var a=JSON.parse(n),s=a.method,u=a.payload;return i(pc(s,je({objectIDs:[this.objectID]},u)))}catch{throw new Error(`
The insights helper expects a JSON object of the format:
{ "method": "method-name", "payload": { "eventName": "name of the event" } }`)}}}}var If="4.70.0";function ze(e){return ze=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ze(e)}function Kn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function mr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Kn(Object(r),!0).forEach(function(n){U(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Af(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vn(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,fa(n.key),n)}}function Cf(e,t,r){return t&&Vn(e.prototype,t),r&&Vn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Hf(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cr(e,t)}function Cr(e,t){return Cr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Cr(e,t)}function Df(e){var t=Lf();return function(){var n=Gt(e),i;if(t){var a=Gt(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return Nf(this,i)}}function Nf(e,t){if(t&&(ze(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return N(e)}function N(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lf(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Gt(e){return Gt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Gt(e)}function U(e,t,r){return t=fa(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fa(e){var t=Uf(e,"string");return ze(t)==="symbol"?t:String(t)}function Uf(e,t){if(ze(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ze(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var be=Ue({name:"instantsearch"});function Wf(){return"#"}var la={preserveSharedStateOnUnmount:!1,persistHierarchicalRootCount:!1},Qf=function(e){Hf(r,e);var t=Df(r);function r(n){var i;Af(this,r),i=t.call(this),U(N(i),"client",void 0),U(N(i),"indexName",void 0),U(N(i),"insightsClient",void 0),U(N(i),"onStateChange",null),U(N(i),"future",void 0),U(N(i),"helper",void 0),U(N(i),"mainHelper",void 0),U(N(i),"mainIndex",void 0),U(N(i),"started",void 0),U(N(i),"templatesConfig",void 0),U(N(i),"renderState",{}),U(N(i),"_stalledSearchDelay",void 0),U(N(i),"_searchStalledTimer",void 0),U(N(i),"_initialUiState",void 0),U(N(i),"_initialResults",void 0),U(N(i),"_createURL",void 0),U(N(i),"_searchFunction",void 0),U(N(i),"_mainHelperSearch",void 0),U(N(i),"_hasSearchWidget",!1),U(N(i),"_hasRecommendWidget",!1),U(N(i),"_insights",void 0),U(N(i),"middleware",[]),U(N(i),"sendEventToInsights",void 0),U(N(i),"status","idle"),U(N(i),"error",void 0),U(N(i),"scheduleSearch",Ye(function(){i.started&&i.mainHelper.search()})),U(N(i),"scheduleRender",Ye(function(){var T,H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;(T=i.mainHelper)!==null&&T!==void 0&&T.hasPendingRequests()||(clearTimeout(i._searchStalledTimer),i._searchStalledTimer=null,H&&(i.status="idle",i.error=void 0)),i.mainIndex.render({instantSearchInstance:N(i)}),i.emit("render")})),U(N(i),"onInternalStateChange",Ye(function(){var T=i.mainIndex.getWidgetUiState({});i.middleware.forEach(function(H){var ae=H.instance;ae.onStateChange({uiState:T})})})),i.setMaxListeners(100);var a=n.indexName,s=a===void 0?"":a,u=n.numberLocale,c=n.initialUiState,o=c===void 0?{}:c,f=n.routing,l=f===void 0?null:f,h=n.insights,m=h===void 0?void 0:h,g=n.searchFunction,d=n.stalledSearchDelay,v=d===void 0?200:d,P=n.searchClient,y=P===void 0?null:P,F=n.insightsClient,j=F===void 0?null:F,_=n.onStateChange,D=_===void 0?null:_,A=n.future,E=A===void 0?mr(mr({},la),n.future||{}):A;if(y===null)throw new Error(be("The `searchClient` option is required."));if(typeof y.search!="function")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(typeof y.addAlgoliaAgent=="function"&&y.addAlgoliaAgent("instantsearch.js (".concat(If,")")),j&&typeof j!="function")throw new Error(be("The `insightsClient` option should be a function."));if(i.client=y,i.future=E,i.insightsClient=j,i.indexName=s,i.helper=null,i.mainHelper=null,i.mainIndex=Yu({indexName:s}),i.onStateChange=D,i.started=!1,i.templatesConfig={helpers:Tf({numberLocale:u}),compileOptions:{}},i._stalledSearchDelay=v,i._searchStalledTimer=null,i._createURL=Wf,i._initialUiState=o,i._initialResults=null,i._insights=m,g&&(i._searchFunction=g),i.sendEventToInsights=ie,l){var L=typeof l=="boolean"?{}:l;L.$$internal=!0,i.use(_f(L))}if(m){var B=typeof m=="boolean"?{}:m;B.$$internal=!0,i.use(Hn(B))}return Tc()&&i.use(Ic({$$internal:!0})),i}return Cf(r,[{key:"_isSearchStalled",get:function(){return this.status==="stalled"}},{key:"use",value:function(){for(var i=this,a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];var c=s.map(function(o){var f=mr({$$type:"__unknown__",$$internal:!1,subscribe:ie,started:ie,unsubscribe:ie,onStateChange:ie},o({instantSearchInstance:i}));return i.middleware.push({creator:o,instance:f}),f});return this.started&&c.forEach(function(o){o.subscribe(),o.started()}),this}},{key:"unuse",value:function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return this.middleware.filter(function(u){return a.includes(u.creator)}).forEach(function(u){return u.instance.unsubscribe()}),this.middleware=this.middleware.filter(function(u){return!a.includes(u.creator)}),this}},{key:"EXPERIMENTAL_use",value:function(){return this.use.apply(this,arguments)}},{key:"addWidget",value:function(i){return this.addWidgets([i])}},{key:"addWidgets",value:function(i){if(!Array.isArray(i))throw new Error(be("The `addWidgets` method expects an array of widgets. Please use `addWidget`."));if(i.some(function(a){return typeof a.init!="function"&&typeof a.render!="function"}))throw new Error(be("The widget definition expects a `render` and/or an `init` method."));return this.mainIndex.addWidgets(i),this}},{key:"removeWidget",value:function(i){return this.removeWidgets([i])}},{key:"removeWidgets",value:function(i){if(!Array.isArray(i))throw new Error(be("The `removeWidgets` method expects an array of widgets. Please use `removeWidget`."));if(i.some(function(a){return typeof a.dispose!="function"}))throw new Error(be("The widget definition expects a `dispose` method."));return this.mainIndex.removeWidgets(i),this}},{key:"start",value:function(){var i=this;if(this.started)throw new Error(be("The `start` method has already been called once."));var a=this.mainHelper||te(this.client,this.indexName,void 0,{persistHierarchicalRootCount:this.future.persistHierarchicalRootCount});if(a.search=function(){return i.status="loading",i.scheduleRender(!1),i._hasSearchWidget&&a.searchOnlyWithDerivedHelpers(),i._hasRecommendWidget&&a.recommend(),a},this._searchFunction){var s={search:function(){return new Promise(ie)}};this._mainHelperSearch=a.search.bind(a),a.search=function(){var c=i.mainIndex.getHelper(),o=te(s,c.state.index,c.state);return o.once("search",function(f){var l=f.state;c.overrideStateWithoutTriggeringChangeEvent(l),i._mainHelperSearch()}),o.on("change",function(f){var l=f.state;c.setState(l)}),i._searchFunction(o),a}}if(a.on("error",function(c){var o=c.error;if(!(o instanceof Error)){var f=o;o=Object.keys(f).reduce(function(l,h){return l[h]=f[h],l},new Error(f.message))}o.error=o,i.error=o,i.status="error",i.scheduleRender(!1),i.emit("error",o)}),this.mainHelper=a,this.middleware.forEach(function(c){var o=c.instance;o.subscribe()}),this.mainIndex.init({instantSearchInstance:this,parent:null,uiState:this._initialUiState}),this._initialResults){Co(this.client,this._initialResults),_o(this.mainHelper,this._initialResults);var u=this.scheduleSearch;this.scheduleSearch=Ye(ie),Ye(function(){i.scheduleSearch=u})()}else this.mainIndex.getWidgets().length>0&&this.scheduleSearch();this.helper=this.mainIndex.getHelper(),this.started=!0,this.middleware.forEach(function(c){var o=c.instance;o.started()}),typeof this._insights=="undefined"&&a.derivedHelpers[0].once("result",function(){var c=i.mainIndex.getScopedResults().some(function(o){var f=o.results;return f==null?void 0:f._automaticInsights});c&&i.use(Hn({$$internal:!0,$$automatic:!0}))})}},{key:"dispose",value:function(){var i;this.scheduleSearch.cancel(),this.scheduleRender.cancel(),clearTimeout(this._searchStalledTimer),this.removeWidgets(this.mainIndex.getWidgets()),this.mainIndex.dispose(),this.started=!1,this.removeAllListeners(),(i=this.mainHelper)===null||i===void 0||i.removeAllListeners(),this.mainHelper=null,this.helper=null,this.middleware.forEach(function(a){var s=a.instance;s.unsubscribe()})}},{key:"scheduleStalledRender",value:function(){var i=this;this._searchStalledTimer||(this._searchStalledTimer=setTimeout(function(){i.status="stalled",i.scheduleRender()},this._stalledSearchDelay))}},{key:"setUiState",value:function(i){var a=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!this.mainHelper)throw new Error(be("The `start` method needs to be called before `setUiState`."));this.mainIndex.refreshUiState();var u=typeof i=="function"?i(this.mainIndex.getWidgetUiState({})):i;this.onStateChange&&s?this.onStateChange({uiState:u,setUiState:function(o){Or(typeof o=="function"?o(u):o,a.mainIndex),a.scheduleSearch(),a.onInternalStateChange()}}):(Or(u,this.mainIndex),this.scheduleSearch(),this.onInternalStateChange())}},{key:"getUiState",value:function(){return this.started&&this.mainIndex.refreshUiState(),this.mainIndex.getWidgetUiState({})}},{key:"createURL",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.started)throw new Error(be("The `start` method needs to be called before `createURL`."));return this._createURL(i)}},{key:"refresh",value:function(){if(!this.mainHelper)throw new Error(be("The `start` method needs to be called before `refresh`."));this.mainHelper.clearCache().search()}}]),r}(Dr),qf=Qf;function xt(e){return xt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xt(e)}function Jn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function zn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jn(Object(r),!0).forEach(function(n){kf(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kf(e,t,r){return t=Mf(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mf(e){var t=Bf(e,"string");return xt(t)==="symbol"?t:String(t)}function Bf(e,t){if(xt(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(xt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Gn=["react (".concat(C.exports.version,")"),"react-instantsearch (".concat(pr,")"),"react-instantsearch-core (".concat(pr,")")],Xn="react-instantsearch-server (".concat(pr,")"),Kf=function(t){return t?"next.js (".concat(t,")"):null};function Vf(e){var t=ac(),r=Ki(),n=Vi(),i=zi(),a=n==null?void 0:n.initialResults,s=C.exports.useRef(e),u=r||a||i,c=C.exports.useRef(null);if(n&&(c=n.ssrSearchRef),c.current===null){var o=new qf(e);o._schedule=function(v){o._schedule.queue.push(v),clearTimeout(o._schedule.timer),o._schedule.timer=setTimeout(function(){o._schedule.queue.forEach(function(P){P()}),o._schedule.queue=[]},0)},o._schedule.queue=[],u&&(o._initialResults=a||{}),Zn(e.searchClient,[].concat(Gn,[r&&Xn,Kf(Jf())])),u&&o.start(),r&&r.notifyServer({search:o}),e.routing,c.current=o}{var f=c.current,l=s.current;if(l.indexName!==e.indexName&&(f.helper.setIndex(e.indexName||"").search(),s.current=e),l.searchClient!==e.searchClient&&(Zn(e.searchClient,[].concat(Gn,[r&&Xn])),f.mainHelper.setClient(e.searchClient).search(),s.current=e),l.onStateChange!==e.onStateChange&&(f.onStateChange=e.onStateChange,s.current=e),l.searchFunction!==e.searchFunction&&(f._searchFunction=e.searchFunction,s.current=e),l.stalledSearchDelay!==e.stalledSearchDelay){var h;f._stalledSearchDelay=(h=e.stalledSearchDelay)!==null&&h!==void 0?h:200,s.current=e}Ve(l.future,e.future)||(f.future=zn(zn({},la),e.future),s.current=e)}var m=C.exports.useRef(null),g=Ra.exports.useSyncExternalStore(C.exports.useCallback(function(){var d=c.current;return m.current===null?d.started||(d.start(),t()):(clearTimeout(m.current),d._preventWidgetCleanup=!1),function(){function v(){d.dispose()}clearTimeout(d._schedule.timer),m.current=setTimeout(v),d._preventWidgetCleanup=!0}},[t]),function(){return c.current},function(){return c.current});return g}function Zn(e,t){typeof e.addAlgoliaAgent=="function"&&t.filter(Boolean).forEach(function(r){e.addAlgoliaAgent(r)})}function Jf(){var e,t;return typeof window!="undefined"&&((e=window.next)===null||e===void 0?void 0:e.version)||(typeof process!="undefined"?(t=process.env)===null||t===void 0?void 0:t.NEXT_RUNTIME:void 0)}var zf=["children"];function Gf(e,t){if(e==null)return{};var r=Xf(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(r[n]=e[n]))}return r}function Xf(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function nh(e){var t=e.children,r=Gf(e,zf),n=Vf(r);return n.started?oe.createElement(Bi.Provider,{value:n},oe.createElement(Mi.Provider,{value:n.mainIndex},t)):null}function Ft(e){return Ft=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ft(e)}function Yn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function $e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yn(Object(r),!0).forEach(function(n){ha(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ha(e,t,r){return t=Zf(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zf(e){var t=Yf(e,"string");return Ft(t)==="symbol"?t:String(t)}function Yf(e,t){if(Ft(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ft(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var el=Ue({name:"hits",connector:!0}),tl=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ie;return Zt(t,el()),function(n){var i=n||{},a=i.escapeHTML,s=a===void 0?!0:a,u=i.transformItems,c=u===void 0?function(l){return l}:u,o,f;return{$$type:"ais.hits",init:function(h){t($e($e({},this.getWidgetRenderState(h)),{},{instantSearchInstance:h.instantSearchInstance}),!0)},render:function(h){var m=this.getWidgetRenderState(h);t($e($e({},m),{},{instantSearchInstance:h.instantSearchInstance}),!1),m.sendEvent("view:internal",m.hits)},getRenderState:function(h,m){return $e($e({},h),{},{hits:this.getWidgetRenderState(m)})},getWidgetRenderState:function(h){var m,g,d,v=h.results,P=h.helper,y=h.instantSearchInstance;if(o||(o=ao({instantSearchInstance:y,getIndex:function(){return P.getIndex()},widgetType:this.$$type})),f||(f=so({getIndex:function(){return P.getIndex()},widgetType:this.$$type,instantSearchInstance:y})),!v)return{hits:[],results:void 0,banner:void 0,sendEvent:o,bindEvent:f,widgetParams:n};s&&v.hits.length>0&&(v.hits=zs(v.hits));var F=yo(v.hits,v.page,v.hitsPerPage),j=Ro(F,v.queryID),_=c(j,{results:v}),D=(m=v.renderingContent)===null||m===void 0||(g=m.widgets)===null||g===void 0||(d=g.banners)===null||d===void 0?void 0:d[0];return{hits:_,results:v,banner:D,sendEvent:o,bindEvent:f,widgetParams:n}},dispose:function(h){var m=h.state;return r(),s?m.setQueryParameters(Object.keys(Jt).reduce(function(g,d){return $e($e({},g),{},ha({},d,void 0))},{})):m},getWidgetSearchParameters:function(h){return s?h.setQueryParameters(Jt):h}}}},rl=tl;function ih(e,t){return Lt(rl,e,t)}function $t(e){return $t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$t(e)}function nl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ei(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,da(n.key),n)}}function il(e,t,r){return t&&ei(e.prototype,t),r&&ei(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function gr(e,t,r){return t=da(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function da(e){var t=al(e,"string");return $t(t)==="symbol"?t:String(t)}function al(e,t){if($t(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if($t(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sl=function(){function e(t){nl(this,e),gr(this,"currentPage",void 0),gr(this,"total",void 0),gr(this,"padding",void 0),this.currentPage=t.currentPage,this.total=t.total,this.padding=t.padding}return il(e,[{key:"pages",value:function(){var r=this.total,n=this.currentPage,i=this.padding;if(r===0)return[0];var a=this.nbPagesDisplayed(i,r);if(a===r)return mn({end:r});var s=this.calculatePaddingLeft(n,i,r,a),u=a-s,c=n-s,o=n+u;return mn({start:c,end:o})}},{key:"nbPagesDisplayed",value:function(r,n){return Math.min(2*r+1,n)}},{key:"calculatePaddingLeft",value:function(r,n,i,a){return r<=n?r:r>=i-n?a-(i-r):n}},{key:"isLastPage",value:function(){return this.currentPage===this.total-1||this.total===0}},{key:"isFirstPage",value:function(){return this.currentPage===0}}]),e}(),ol=sl;function Et(e){return Et=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Et(e)}function ti(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Se(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ti(Object(r),!0).forEach(function(n){ul(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ti(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ul(e,t,r){return t=cl(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cl(e){var t=fl(e,"string");return Et(t)==="symbol"?t:String(t)}function fl(e,t){if(Et(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Et(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ll=Ue({name:"pagination",connector:!0}),hl=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ie;return Zt(t,ll()),function(n){var i=n||{},a=i.totalPages,s=i.padding,u=s===void 0?3:s,c=new ol({currentPage:0,total:0,padding:u}),o={};function f(l){var h=l.nbPages;return a!==void 0?Math.min(a,h):h}return{$$type:"ais.pagination",init:function(h){var m=h.instantSearchInstance;t(Se(Se({},this.getWidgetRenderState(h)),{},{instantSearchInstance:m}),!0)},render:function(h){var m=h.instantSearchInstance;t(Se(Se({},this.getWidgetRenderState(h)),{},{instantSearchInstance:m}),!1)},dispose:function(h){var m=h.state;return r(),m.setQueryParameter("page",void 0)},getWidgetUiState:function(h,m){var g=m.searchParameters,d=g.page||0;return d?Se(Se({},h),{},{page:d+1}):h},getWidgetSearchParameters:function(h,m){var g=m.uiState,d=g.page?g.page-1:0;return h.setQueryParameter("page",d)},getWidgetRenderState:function(h){var m=h.results,g=h.helper,d=h.state,v=h.createURL;o.refine||(o.refine=function(F){g.setPage(F),g.search()}),o.createURL||(o.createURL=function(F){return v(function(j){return Se(Se({},j),{},{page:F+1})})});var P=d.page||0,y=f(m||{nbPages:0});return c.currentPage=P,c.total=y,{createURL:o.createURL,refine:o.refine,canRefine:y>1,currentRefinement:P,nbHits:(m==null?void 0:m.nbHits)||0,nbPages:y,pages:m?c.pages():[],isFirstPage:c.isFirstPage(),isLastPage:c.isLastPage(),widgetParams:n}},getRenderState:function(h,m){return Se(Se({},h),{},{pagination:this.getWidgetRenderState(m)})}}}},dl=hl;function ml(e,t){return Lt(dl,e,t)}function Tt(e){return Tt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tt(e)}function ri(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ee(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ri(Object(r),!0).forEach(function(n){gl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ri(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gl(e,t,r){return t=pl(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pl(e){var t=vl(e,"string");return Tt(t)==="symbol"?t:String(t)}function vl(e,t){if(Tt(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Tt(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var yl=Ue({name:"search-box",connector:!0}),bl=function(t,r){return r(t)},Sl=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ie;return Zt(t,yl()),function(n){var i=n||{},a=i.queryHook,s=a===void 0?bl:a,u,c;return{$$type:"ais.searchBox",init:function(f){var l=f.instantSearchInstance;t(Ee(Ee({},this.getWidgetRenderState(f)),{},{instantSearchInstance:l}),!0)},render:function(f){var l=f.instantSearchInstance;t(Ee(Ee({},this.getWidgetRenderState(f)),{},{instantSearchInstance:l}),!1)},dispose:function(f){var l=f.state;return r(),l.setQueryParameter("query",void 0)},getRenderState:function(f,l){return Ee(Ee({},f),{},{searchBox:this.getWidgetRenderState(l)})},getWidgetRenderState:function(f){var l=f.helper,h=f.instantSearchInstance,m=f.state;return u||(u=function(d){s(d,function(v){return l.setQuery(v).search()})},c=function(){l.setQuery("").search()}),{query:m.query||"",refine:u,clear:c,widgetParams:n,isSearchStalled:h.status==="stalled"}},getWidgetUiState:function(f,l){var h=l.searchParameters,m=h.query||"";return m===""||f&&f.query===m?f:Ee(Ee({},f),{},{query:m})},getWidgetSearchParameters:function(f,l){var h=l.uiState;return f.setQueryParameter("query",h.query||"")}}}},Pl=Sl;function ah(e,t){return Lt(Pl,e,t)}function It(e){return It=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},It(e)}function ni(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function qe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ni(Object(r),!0).forEach(function(n){Rl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ni(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Rl(e,t,r){return t=Ol(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ol(e){var t=wl(e,"string");return It(t)==="symbol"?t:String(t)}function wl(e,t){if(It(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(It(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jl=Ue({name:"stats",connector:!0}),_l=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ie;return Zt(t,jl()),function(n){return{$$type:"ais.stats",init:function(a){var s=a.instantSearchInstance;t(qe(qe({},this.getWidgetRenderState(a)),{},{instantSearchInstance:s}),!0)},render:function(a){var s=a.instantSearchInstance;t(qe(qe({},this.getWidgetRenderState(a)),{},{instantSearchInstance:s}),!1)},dispose:function(){r()},getRenderState:function(a,s){return qe(qe({},a),{},{stats:this.getWidgetRenderState(s)})},getWidgetRenderState:function(a){var s=a.results,u=a.state;return s?{hitsPerPage:s.hitsPerPage,nbHits:s.nbHits,nbSortedHits:s.nbSortedHits,areHitsSorted:typeof s.appliedRelevancyStrictness!="undefined"&&s.appliedRelevancyStrictness>0&&s.nbSortedHits!==s.nbHits,nbPages:s.nbPages,page:s.page,processingTimeMS:s.processingTimeMS,query:s.query,widgetParams:n}:{hitsPerPage:u.hitsPerPage,nbHits:0,nbSortedHits:void 0,areHitsSorted:!1,nbPages:0,page:u.page||0,processingTimeMS:-1,query:u.query||"",widgetParams:n}}}}},xl=_l;function sh(e,t){return Lt(xl,e,t)}function Fl(e,t){return Il(e)||Tl(e,t)||El(e,t)||$l()}function $l(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function El(e,t){if(!!e){if(typeof e=="string")return ii(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ii(e,t)}}function ii(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Tl(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,o=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(f){o=!0,i=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(o)throw i}}return u}}function Il(e){if(Array.isArray(e))return e}function Al(){var e=Nt(),t=Mr(),r=C.exports.useState(function(){var s=_r(t);return{results:s.results,scopedResults:s.scopedResults}}),n=Fl(r,2),i=n[0],a=n[1];return C.exports.useEffect(function(){function s(){var u=t.getResults();if(u!==null)a({results:u,scopedResults:t.getScopedResults()});else if(e.mainIndex.getIndexName().length===0){var c=e.mainIndex.getWidgets().find(he);c&&a({results:_r(t).results,scopedResults:c.getScopedResults()})}}return e.addListener("render",s),function(){e.removeListener("render",s)}},[e,t]),i}function ai(e,t){return Nl(e)||Dl(e,t)||Hl(e,t)||Cl()}function Cl(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hl(e,t){if(!!e){if(typeof e=="string")return si(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return si(e,t)}}function si(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Dl(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,s,u=[],c=!0,o=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(f){o=!0,i=f}finally{try{if(!c&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(o)throw i}}return u}}function Nl(e){if(Array.isArray(e))return e}function Ll(){var e=Nt(),t=Mr(),r=t.getIndexId(),n=C.exports.useState(function(){return e.getUiState()}),i=ai(n,2),a=i[0],s=i[1],u=a[r],c=C.exports.useState(function(){return e.renderState}),o=ai(c,2),f=o[0],l=o[1],h=f[r]||{},m=C.exports.useCallback(function(d){e.setUiState(d)},[e]),g=C.exports.useCallback(function(d){t.setIndexUiState(d)},[t]);return C.exports.useEffect(function(){function d(){s(e.getUiState()),l(e.renderState)}return e.addListener("render",d),function(){e.removeListener("render",d)}},[e]),{uiState:a,setUiState:m,indexUiState:u,setIndexUiState:g,renderState:f,indexRenderState:h}}function oh(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.catchError,r=Nt(),n=Ll(),i=n.uiState,a=n.setUiState,s=n.indexUiState,u=n.setIndexUiState,c=n.renderState,o=n.indexRenderState,f=Al(),l=f.results,h=f.scopedResults,m=C.exports.useCallback(function(){for(var d=arguments.length,v=new Array(d),P=0;P<d;P++)v[P]=arguments[P];return r.use.apply(r,v),function(){r.unuse.apply(r,v)}},[r]),g=C.exports.useCallback(function(){r.refresh()},[r]);return Ji(function(){if(t){var d=function(){};return r.addListener("error",d),function(){return r.removeListener("error",d)}}return function(){}},[r,t]),{results:l,scopedResults:h,uiState:i,setUiState:a,indexUiState:s,setIndexUiState:u,renderState:c,indexRenderState:o,addMiddlewares:m,refresh:g,status:r.status,error:r.error}}function le(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.reduce(function(n,i){return Array.isArray(i)?n.concat(i):n.concat([i])},[]).filter(Boolean).join(" ")}function Ul(e){var t=e.button===1;return Boolean(t||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)}var Wl=["pages","currentPage","nbPages","isFirstPage","isLastPage","showFirst","showPrevious","showNext","showLast","createURL","onNavigate","translations","classNames"],Ql=["isDisabled","className","classNames","href","onClick"];function At(){return At=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},At.apply(this,arguments)}function ma(e,t){if(e==null)return{};var r=ql(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(r[n]=e[n]))}return r}function ql(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function kl(e){var t=e.pages,r=e.currentPage,n=e.nbPages,i=e.isFirstPage,a=e.isLastPage,s=e.showFirst,u=s===void 0?!0:s,c=e.showPrevious,o=c===void 0?!0:c,f=e.showNext,l=f===void 0?!0:f,h=e.showLast,m=h===void 0?!0:h,g=e.createURL,d=e.onNavigate,v=e.translations,P=e.classNames,y=P===void 0?{}:P,F=ma(e,Wl),j=0,_=r-1,D=r+1,A=n-1;return oe.createElement("div",At({},F,{className:le("ais-Pagination",y.root,n<=1&&le("ais-Pagination--noRefinement",y.noRefinementRoot),F.className)}),oe.createElement("ul",{className:le("ais-Pagination-list",y.list)},u&&oe.createElement(it,{isDisabled:i,className:le("ais-Pagination-item--firstPage",y.firstPageItem),classNames:y,"aria-label":v.firstPageItemAriaLabel,href:g(j),onClick:function(){return d(j)}},v.firstPageItemText),o&&oe.createElement(it,{isDisabled:i,className:le("ais-Pagination-item--previousPage",y.previousPageItem),classNames:y,"aria-label":v.previousPageItemAriaLabel,href:g(_),onClick:function(){return d(_)}},v.previousPageItemText),t.map(function(E){return oe.createElement(it,{key:E,isDisabled:!1,className:le("ais-Pagination-item--page",y.pageItem,E===r&&le("ais-Pagination-item--selected",y.selectedItem)),classNames:y,"aria-label":v.pageItemAriaLabel({currentPage:E+1,nbPages:n}),href:g(E),onClick:function(){return d(E)}},v.pageItemText({currentPage:E+1,nbPages:n}))}),l&&oe.createElement(it,{isDisabled:a,className:le("ais-Pagination-item--nextPage",y.nextPageItem),classNames:y,"aria-label":v.nextPageItemAriaLabel,href:g(D),onClick:function(){return d(D)}},v.nextPageItemText),m&&oe.createElement(it,{isDisabled:a,className:le("ais-Pagination-item--lastPage",y.lastPageItem),classNames:y,"aria-label":v.lastPageItemAriaLabel,href:g(A),onClick:function(){return d(A)}},v.lastPageItemText)))}function it(e){var t=e.isDisabled,r=e.className,n=e.classNames,i=e.href,a=e.onClick,s=ma(e,Ql);return t?oe.createElement("li",{className:le("ais-Pagination-item",n.item,"ais-Pagination-item--disabled",n.disabledItem,r)},oe.createElement("span",At({className:le("ais-Pagination-link",n.link)},s))):oe.createElement("li",{className:le("ais-Pagination-item",n.item,r)},oe.createElement("a",At({className:le("ais-Pagination-link",n.link),href:i,onClick:function(c){Ul(c)||(c.preventDefault(),a(c))}},s)))}function Ct(e){return Ct=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ct(e)}var Ml=["showFirst","showPrevious","showNext","showLast","padding","totalPages","translations"];function Hr(){return Hr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hr.apply(this,arguments)}function oi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Bl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oi(Object(r),!0).forEach(function(n){Kl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Kl(e,t,r){return t=Vl(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vl(e){var t=Jl(e,"string");return Ct(t)==="symbol"?t:String(t)}function Jl(e,t){if(Ct(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ct(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zl(e,t){if(e==null)return{};var r=Gl(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(r[n]=e[n]))}return r}function Gl(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function uh(e){var t=e.showFirst,r=e.showPrevious,n=e.showNext,i=e.showLast,a=e.padding,s=e.totalPages,u=e.translations,c=zl(e,Ml),o=ml({padding:a,totalPages:s},{$$widgetType:"ais.pagination"}),f=o.pages,l=o.currentRefinement,h=o.isFirstPage,m=o.isLastPage,g=o.nbPages,d=o.createURL,v=o.refine,P={pages:f,currentPage:l,isFirstPage:h,isLastPage:m,nbPages:g,createURL:d,onNavigate:v,translations:Bl({firstPageItemText:"\u2039\u2039",previousPageItemText:"\u2039",nextPageItemText:"\u203A",lastPageItemText:"\u203A\u203A",pageItemText:function(F){var j=F.currentPage;return String(j)},firstPageItemAriaLabel:"First Page",previousPageItemAriaLabel:"Previous Page",nextPageItemAriaLabel:"Next Page",lastPageItemAriaLabel:"Last Page, Page ".concat(g),pageItemAriaLabel:function(F){var j=F.currentPage;return"Page ".concat(j)}},u)};return oe.createElement(kl,Hr({},c,P,{showFirst:t,showPrevious:r,showNext:n,showLast:i}))}var ga={exports:{}};/*! algoliasearch-lite.umd.js | 4.23.3 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */(function(e,t){(function(r,n){e.exports=n()})(Oa,function(){function r(p,b,S){return b in p?Object.defineProperty(p,b,{value:S,enumerable:!0,configurable:!0,writable:!0}):p[b]=S,p}function n(p,b){var S=Object.keys(p);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(p);b&&(R=R.filter(function(w){return Object.getOwnPropertyDescriptor(p,w).enumerable})),S.push.apply(S,R)}return S}function i(p){for(var b=1;b<arguments.length;b++){var S=arguments[b]!=null?arguments[b]:{};b%2?n(Object(S),!0).forEach(function(R){r(p,R,S[R])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(S)):n(Object(S)).forEach(function(R){Object.defineProperty(p,R,Object.getOwnPropertyDescriptor(S,R))})}return p}function a(p,b){if(p==null)return{};var S,R,w=function(I,x){if(I==null)return{};var W,M,Q={},G=Object.keys(I);for(M=0;M<G.length;M++)W=G[M],x.indexOf(W)>=0||(Q[W]=I[W]);return Q}(p,b);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(p);for(R=0;R<$.length;R++)S=$[R],b.indexOf(S)>=0||Object.prototype.propertyIsEnumerable.call(p,S)&&(w[S]=p[S])}return w}function s(p,b){return function(S){if(Array.isArray(S))return S}(p)||function(S,R){if(Symbol.iterator in Object(S)||Object.prototype.toString.call(S)==="[object Arguments]"){var w=[],$=!0,I=!1,x=void 0;try{for(var W,M=S[Symbol.iterator]();!($=(W=M.next()).done)&&(w.push(W.value),!R||w.length!==R);$=!0);}catch(Q){I=!0,x=Q}finally{try{$||M.return==null||M.return()}finally{if(I)throw x}}return w}}(p,b)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function u(p){return function(b){if(Array.isArray(b)){for(var S=0,R=new Array(b.length);S<b.length;S++)R[S]=b[S];return R}}(p)||function(b){if(Symbol.iterator in Object(b)||Object.prototype.toString.call(b)==="[object Arguments]")return Array.from(b)}(p)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function c(p){var b,S="algoliasearch-client-js-".concat(p.key),R=function(){return b===void 0&&(b=p.localStorage||window.localStorage),b},w=function(){return JSON.parse(R().getItem(S)||"{}")},$=function(x){R().setItem(S,JSON.stringify(x))},I=function(){var x=p.timeToLive?1e3*p.timeToLive:null,W=w(),M=Object.fromEntries(Object.entries(W).filter(function(G){return s(G,2)[1].timestamp!==void 0}));if($(M),x){var Q=Object.fromEntries(Object.entries(M).filter(function(G){var V=s(G,2)[1],se=new Date().getTime();return!(V.timestamp+x<se)}));$(Q)}};return{get:function(x,W){var M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then(function(){I();var Q=JSON.stringify(x);return w()[Q]}).then(function(Q){return Promise.all([Q?Q.value:W(),Q!==void 0])}).then(function(Q){var G=s(Q,2),V=G[0],se=G[1];return Promise.all([V,se||M.miss(V)])}).then(function(Q){return s(Q,1)[0]})},set:function(x,W){return Promise.resolve().then(function(){var M=w();return M[JSON.stringify(x)]={timestamp:new Date().getTime(),value:W},R().setItem(S,JSON.stringify(M)),W})},delete:function(x){return Promise.resolve().then(function(){var W=w();delete W[JSON.stringify(x)],R().setItem(S,JSON.stringify(W))})},clear:function(){return Promise.resolve().then(function(){R().removeItem(S)})}}}function o(p){var b=u(p.caches),S=b.shift();return S===void 0?{get:function(R,w){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}},I=w();return I.then(function(x){return Promise.all([x,$.miss(x)])}).then(function(x){return s(x,1)[0]})},set:function(R,w){return Promise.resolve(w)},delete:function(R){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(R,w){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return S.get(R,w,$).catch(function(){return o({caches:b}).get(R,w,$)})},set:function(R,w){return S.set(R,w).catch(function(){return o({caches:b}).set(R,w)})},delete:function(R){return S.delete(R).catch(function(){return o({caches:b}).delete(R)})},clear:function(){return S.clear().catch(function(){return o({caches:b}).clear()})}}}function f(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{serializable:!0},b={};return{get:function(S,R){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}},$=JSON.stringify(S);if($ in b)return Promise.resolve(p.serializable?JSON.parse(b[$]):b[$]);var I=R(),x=w&&w.miss||function(){return Promise.resolve()};return I.then(function(W){return x(W)}).then(function(){return I})},set:function(S,R){return b[JSON.stringify(S)]=p.serializable?JSON.stringify(R):R,Promise.resolve(R)},delete:function(S){return delete b[JSON.stringify(S)],Promise.resolve()},clear:function(){return b={},Promise.resolve()}}}function l(p){for(var b=p.length-1;b>0;b--){var S=Math.floor(Math.random()*(b+1)),R=p[b];p[b]=p[S],p[S]=R}return p}function h(p,b){return b&&Object.keys(b).forEach(function(S){p[S]=b[S](p)}),p}function m(p){for(var b=arguments.length,S=new Array(b>1?b-1:0),R=1;R<b;R++)S[R-1]=arguments[R];var w=0;return p.replace(/%s/g,function(){return encodeURIComponent(S[w++])})}var g={WithinQueryParameters:0,WithinHeaders:1};function d(p,b){var S=p||{},R=S.data||{};return Object.keys(S).forEach(function(w){["timeout","headers","queryParameters","data","cacheable"].indexOf(w)===-1&&(R[w]=S[w])}),{data:Object.entries(R).length>0?R:void 0,timeout:S.timeout||b,headers:S.headers||{},queryParameters:S.queryParameters||{},cacheable:S.cacheable}}var v={Read:1,Write:2,Any:3},P=1,y=2,F=3;function j(p){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:P;return i(i({},p),{},{status:b,lastUpdate:Date.now()})}function _(p){return typeof p=="string"?{protocol:"https",url:p,accept:v.Any}:{protocol:p.protocol||"https",url:p.url,accept:p.accept||v.Any}}var D="GET",A="POST";function E(p,b){return Promise.all(b.map(function(S){return p.get(S,function(){return Promise.resolve(j(S))})})).then(function(S){var R=S.filter(function(I){return function(x){return x.status===P||Date.now()-x.lastUpdate>12e4}(I)}),w=S.filter(function(I){return function(x){return x.status===F&&Date.now()-x.lastUpdate<=12e4}(I)}),$=[].concat(u(R),u(w));return{getTimeout:function(I,x){return(w.length===0&&I===0?1:w.length+3+I)*x},statelessHosts:$.length>0?$.map(function(I){return _(I)}):b}})}function L(p,b,S,R){var w=[],$=function(V,se){if(!(V.method===D||V.data===void 0&&se.data===void 0)){var k=Array.isArray(V.data)?V.data:i(i({},V.data),se.data);return JSON.stringify(k)}}(S,R),I=function(V,se){var k=i(i({},V.headers),se.headers),ee={};return Object.keys(k).forEach(function(we){var ge=k[we];ee[we.toLowerCase()]=ge}),ee}(p,R),x=S.method,W=S.method!==D?{}:i(i({},S.data),R.data),M=i(i(i({"x-algolia-agent":p.userAgent.value},p.queryParameters),W),R.queryParameters),Q=0,G=function V(se,k){var ee=se.pop();if(ee===void 0)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:ae(w)};var we={data:$,headers:I,method:x,url:T(ee,S.path,M),connectTimeout:k(Q,p.timeouts.connect),responseTimeout:k(Q,R.timeout)},ge=function(J){var q={request:we,response:J,host:ee,triesLeft:se.length};return w.push(q),q},Wt={onSuccess:function(J){return function(q){try{return JSON.parse(q.content)}catch(ve){throw function(Fe,Qe){return{name:"DeserializationError",message:Fe,response:Qe}}(ve.message,q)}}(J)},onRetry:function(J){var q=ge(J);return J.isTimedOut&&Q++,Promise.all([p.logger.info("Retryable failure",Oe(q)),p.hostsCache.set(ee,j(ee,J.isTimedOut?F:y))]).then(function(){return V(se,k)})},onFail:function(J){throw ge(J),function(q,ve){var Fe=q.content,Qe=q.status,Xe=Fe;try{Xe=JSON.parse(Fe).message}catch{}return function(Qt,tr,Sa){return{name:"ApiError",message:Qt,status:tr,transporterStackTrace:Sa}}(Xe,Qe,ve)}(J,ae(w))}};return p.requester.send(we).then(function(J){return function(q,ve){return function(Fe){var Qe=Fe.status;return Fe.isTimedOut||function(Xe){var Qt=Xe.isTimedOut,tr=Xe.status;return!Qt&&~~tr==0}(Fe)||~~(Qe/100)!=2&&~~(Qe/100)!=4}(q)?ve.onRetry(q):~~(q.status/100)==2?ve.onSuccess(q):ve.onFail(q)}(J,Wt)})};return E(p.hostsCache,b).then(function(V){return G(u(V.statelessHosts).reverse(),V.getTimeout)})}function B(p){var b={value:"Algolia for JavaScript (".concat(p,")"),add:function(S){var R="; ".concat(S.segment).concat(S.version!==void 0?" (".concat(S.version,")"):"");return b.value.indexOf(R)===-1&&(b.value="".concat(b.value).concat(R)),b}};return b}function T(p,b,S){var R=H(S),w="".concat(p.protocol,"://").concat(p.url,"/").concat(b.charAt(0)==="/"?b.substr(1):b);return R.length&&(w+="?".concat(R)),w}function H(p){return Object.keys(p).map(function(b){return m("%s=%s",b,(S=p[b],Object.prototype.toString.call(S)==="[object Object]"||Object.prototype.toString.call(S)==="[object Array]"?JSON.stringify(p[b]):p[b]));var S}).join("&")}function ae(p){return p.map(function(b){return Oe(b)})}function Oe(p){var b=p.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return i(i({},p),{},{request:i(i({},p.request),{},{headers:i(i({},p.request.headers),b)})})}var xe=function(p){var b=p.appId,S=function(w,$,I){var x={"x-algolia-api-key":I,"x-algolia-application-id":$};return{headers:function(){return w===g.WithinHeaders?x:{}},queryParameters:function(){return w===g.WithinQueryParameters?x:{}}}}(p.authMode!==void 0?p.authMode:g.WithinHeaders,b,p.apiKey),R=function(w){var $=w.hostsCache,I=w.logger,x=w.requester,W=w.requestsCache,M=w.responsesCache,Q=w.timeouts,G=w.userAgent,V=w.hosts,se=w.queryParameters,k={hostsCache:$,logger:I,requester:x,requestsCache:W,responsesCache:M,timeouts:Q,userAgent:G,headers:w.headers,queryParameters:se,hosts:V.map(function(ee){return _(ee)}),read:function(ee,we){var ge=d(we,k.timeouts.read),Wt=function(){return L(k,k.hosts.filter(function(q){return(q.accept&v.Read)!=0}),ee,ge)};if((ge.cacheable!==void 0?ge.cacheable:ee.cacheable)!==!0)return Wt();var J={request:ee,mappedRequestOptions:ge,transporter:{queryParameters:k.queryParameters,headers:k.headers}};return k.responsesCache.get(J,function(){return k.requestsCache.get(J,function(){return k.requestsCache.set(J,Wt()).then(function(q){return Promise.all([k.requestsCache.delete(J),q])},function(q){return Promise.all([k.requestsCache.delete(J),Promise.reject(q)])}).then(function(q){var ve=s(q,2);return ve[0],ve[1]})})},{miss:function(q){return k.responsesCache.set(J,q)}})},write:function(ee,we){return L(k,k.hosts.filter(function(ge){return(ge.accept&v.Write)!=0}),ee,d(we,k.timeouts.write))}};return k}(i(i({hosts:[{url:"".concat(b,"-dsn.algolia.net"),accept:v.Read},{url:"".concat(b,".algolia.net"),accept:v.Write}].concat(l([{url:"".concat(b,"-1.algolianet.com")},{url:"".concat(b,"-2.algolianet.com")},{url:"".concat(b,"-3.algolianet.com")}]))},p),{},{headers:i(i(i({},S.headers()),{"content-type":"application/x-www-form-urlencoded"}),p.headers),queryParameters:i(i({},S.queryParameters()),p.queryParameters)}));return h({transporter:R,appId:b,addAlgoliaAgent:function(w,$){R.userAgent.add({segment:w,version:$})},clearCache:function(){return Promise.all([R.requestsCache.clear(),R.responsesCache.clear()]).then(function(){})}},p.methods)},Ae=function(p){return function(b,S){return b.method===D?p.transporter.read(b,S):p.transporter.write(b,S)}},z=function(p){return function(b){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},R={transporter:p.transporter,appId:p.appId,indexName:b};return h(R,S.methods)}},de=function(p){return function(b,S){var R=b.map(function(w){return i(i({},w),{},{params:H(w.params||{})})});return p.transporter.read({method:A,path:"1/indexes/*/queries",data:{requests:R},cacheable:!0},S)}},me=function(p){return function(b,S){return Promise.all(b.map(function(R){var w=R.params,$=w.facetName,I=w.facetQuery,x=a(w,["facetName","facetQuery"]);return z(p)(R.indexName,{methods:{searchForFacetValues:Ge}}).searchForFacetValues($,I,i(i({},S),x))}))}},We=function(p){return function(b,S,R){return p.transporter.read({method:A,path:m("1/answers/%s/prediction",p.indexName),data:{query:b,queryLanguages:S},cacheable:!0},R)}},Ut=function(p){return function(b,S){return p.transporter.read({method:A,path:m("1/indexes/%s/query",p.indexName),data:{query:b},cacheable:!0},S)}},Ge=function(p){return function(b,S,R){return p.transporter.read({method:A,path:m("1/indexes/%s/facets/%s/query",p.indexName,b),data:{facetQuery:S},cacheable:!0},R)}},pa=1,va=2,ya=3,ba=function(p){return function(b,S){var R=b.map(function(w){return i(i({},w),{},{threshold:w.threshold||0})});return p.transporter.read({method:A,path:"1/indexes/*/recommendations",data:{requests:R},cacheable:!0},S)}};function Kr(p,b,S){var R,w={appId:p,apiKey:b,timeouts:{connect:1,read:2,write:30},requester:{send:function($){return new Promise(function(I){var x=new XMLHttpRequest;x.open($.method,$.url,!0),Object.keys($.headers).forEach(function(G){return x.setRequestHeader(G,$.headers[G])});var W,M=function(G,V){return setTimeout(function(){x.abort(),I({status:0,content:V,isTimedOut:!0})},1e3*G)},Q=M($.connectTimeout,"Connection timeout");x.onreadystatechange=function(){x.readyState>x.OPENED&&W===void 0&&(clearTimeout(Q),W=M($.responseTimeout,"Socket timeout"))},x.onerror=function(){x.status===0&&(clearTimeout(Q),clearTimeout(W),I({content:x.responseText||"Network request failed",status:x.status,isTimedOut:!1}))},x.onload=function(){clearTimeout(Q),clearTimeout(W),I({content:x.responseText,status:x.status,isTimedOut:!1})},x.send($.data)})}},logger:(R=ya,{debug:function($,I){return pa>=R&&console.debug($,I),Promise.resolve()},info:function($,I){return va>=R&&console.info($,I),Promise.resolve()},error:function($,I){return console.error($,I),Promise.resolve()}}),responsesCache:f(),requestsCache:f({serializable:!1}),hostsCache:o({caches:[c({key:"".concat("4.23.3","-").concat(p)}),f()]}),userAgent:B("4.23.3").add({segment:"Browser",version:"lite"}),authMode:g.WithinQueryParameters};return xe(i(i(i({},w),S),{},{methods:{search:de,searchForFacetValues:me,multipleQueries:de,multipleSearchForFacetValues:me,customRequest:Ae,initIndex:function($){return function(I){return z($)(I,{methods:{search:Ut,searchForFacetValues:Ge,findAnswers:We}})}},getRecommendations:ba}}))}return Kr.version="4.23.3",Kr})})(ga);var Xl=ga.exports;const ch=Xl("ZOMT85S26H","52885791268361b285e0b4036d60d87c");export{rh as C,nh as I,uh as P,Jt as T,oh as a,ih as b,ml as c,sh as d,Ue as e,co as f,Zt as g,Do as h,Lt as i,ce as j,th as k,Bt as m,ie as n,ch as s,ah as u};
//# sourceMappingURL=360e961f.js.map