forked from anfibiacreativa/helix-norddal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bundle.js
13 lines (13 loc) · 180 KB
/
bundle.js
1
2
3
4
5
6
7
8
9
10
11
12
13
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=77)}([function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},,function(e,t,r){"use strict";var n=r(62),i=r(29),o=r(31);function a(e,t,r){return new n(e,t,r)}a.version=r(35),a.AlgoliaSearchHelper=n,a.SearchParameters=i,a.SearchResults=o,e.exports=a},function(e,t){e.exports=function(e){return JSON.parse(JSON.stringify(e))}},function(e,t,r){var n;
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)&&n.length){var a=i.apply(null,n);a&&e.push(a)}else if("object"===o)for(var s in n)r.call(n,s)&&n[s]&&e.push(s)}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},function(e,t,r){"use strict";var n=r(8);function i(e,t){var n=r(6),i=this;"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):i.stack=(new Error).stack||"Cannot get a stacktrace, browser is too old",this.name="AlgoliaSearchError",this.message=e||"Unknown error",t&&n(t,(function(e,t){i[t]=e}))}function o(e,t){function r(){var r=Array.prototype.slice.call(arguments,0);"string"!=typeof r[0]&&r.unshift(t),i.apply(this,r),this.name="AlgoliaSearch"+e+"Error"}return n(r,i),r}n(i,Error),e.exports={AlgoliaSearchError:i,UnparsableJSON:o("UnparsableJSON","Could not parse the incoming response as JSON, see err.more for details"),RequestTimeout:o("RequestTimeout","Request timed out before getting a response"),Network:o("Network","Network issue, see err.more for details"),JSONPScriptFail:o("JSONPScriptFail","<script> was loaded but did not call our provided callback"),ValidUntilNotFound:o("ValidUntilNotFound","The SecuredAPIKey does not have a validUntil parameter."),JSONPScriptError:o("JSONPScriptError","<script> unable to load due to an `error` event on it"),ObjectNotFound:o("ObjectNotFound","Object not found"),Unknown:o("Unknown","Unknown error occured")}},function(e,t){var r=Object.prototype.hasOwnProperty,n=Object.prototype.toString;e.exports=function(e,t,i){if("[object Function]"!==n.call(t))throw new TypeError("iterator must be a function");var o=e.length;if(o===+o)for(var a=0;a<o;a++)t.call(i,e[a],a,e);else for(var s in e)r.call(e,s)&&t.call(i,e[s],s,e)}},function(e,t,r){var n=r(6);e.exports=function(e,t){var r=[];return n(e,(function(n,i){r.push(t(n,i,e))})),r}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},function(e,t,r){"use strict";var n,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};n=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function l(e,t,r,n){var i,o,a,s;if("function"!=typeof r)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r);if(void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]),void 0===a)a=o[t]=r,++e._eventsCount;else if("function"==typeof a?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=u(e))>0&&a.length>i&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,s=c,console&&console.warn&&console.warn(s)}return e}function f(){for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,o(this.listener,this.target,e))}function h(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=f.bind(n);return i.listener=r,n.wrapFn=i,i}function p(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):y(i,i.length)}function d(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function y(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");c=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)o(c,this,t);else{var u=c.length,l=y(c,u);for(r=0;r<u;++r)o(l[r],this,t)}return!0},s.prototype.addListener=function(e,t){return l(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return l(this,e,t,!0)},s.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.on(e,h(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.prependListener(e,h(this,e,t)),this},s.prototype.removeListener=function(e,t){var r,n,i,o,a;if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);if(void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return p(this,e,!0)},s.prototype.rawListeners=function(e){return p(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},s.prototype.listenerCount=d,s.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(e,t,r){(function(n){function i(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG),e}(t=e.exports=r(50)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var r=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+t.humanize(this.diff),!r)return;var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))})),e.splice(o,0,n)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=i,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(i())}).call(this,r(14))},function(e,t,r){"use strict";e.exports=function(e,t){if(Array.isArray(e))for(var r=0;r<e.length;r++)if(t(e[r]))return e[r]}},function(e,t){e.exports=function(e,t){var r=!1;return function(){return r||(console.warn(t),r=!0),e.apply(this,arguments)}}},function(e,t){e.exports=function(e,t){var r=e.toLowerCase().replace(/[\.\(\)]/g,"");return"algoliasearch: `"+e+"` was replaced by `"+t+"`. Please see https://github.com/algolia/algoliasearch-client-javascript/wiki/Deprecated#"+r}},function(e,t){var r,n,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var c,u=[],l=!1,f=-1;function h(){l&&c&&(l=!1,c.length?u=c.concat(u):f=-1,u.length&&p())}function p(){if(!l){var e=s(h);l=!0;for(var t=u.length;t;){for(c=u,u=[];++f<t;)c&&c[f].run();f=-1,t=u.length}c=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function y(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new d(e,t)),1!==u.length||l||s(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";function n(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function i(e,t){if(e===t)return e;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var o=t[r],a=e[r];void 0!==a&&void 0===o||(n(a)&&n(o)?e[r]=i(a,o):e[r]="object"==typeof(s=o)&&null!==s?i(Array.isArray(s)?[]:{},s):s)}var s;return e}e.exports=function(e){n(e)||(e={});for(var t=1,r=arguments.length;t<r;t++){var o=arguments[t];n(o)&&i(e,o)}return e}},function(e,t,r){"use strict";e.exports=function(){var e=Array.prototype.slice.call(arguments);return e.reduceRight((function(e,t){return Object.keys(Object(t)).forEach((function(r){void 0!==t[r]&&(e[r]=t[r])})),e}),{})}},function(e,t,r){"use strict";e.exports=function(e){return e&&Object.keys(e).length>0}},function(e,t,r){"use strict";var n=r(43),i=r(53);e.exports=i(n,"Browser")},function(e,t,r){"use strict";var n=r(71),i=r(72),o=r(37);e.exports={formats:o,parse:i,stringify:n}},function(e,t,r){var n=r(75);n.Template=r(76).Template,n.template=n.Template,e.exports=n},function(e,t,r){var n=r(23),i=r(12),o=r(13);function a(e,t){this.indexName=t,this.as=e,this.typeAheadArgs=null,this.typeAheadValueOption=null,this.cache={}}e.exports=a,a.prototype.clearCache=function(){this.cache={}},a.prototype.search=n("query"),a.prototype.similarSearch=i(n("similarQuery"),o("index.similarSearch(query[, callback])","index.search({ similarQuery: query }[, callback])")),a.prototype.browse=function(e,t,n){var i,o,a=r(24),s=this;0===arguments.length||1===arguments.length&&"function"==typeof arguments[0]?(i=0,n=arguments[0],e=void 0):"number"==typeof arguments[0]?(i=arguments[0],"number"==typeof arguments[1]?o=arguments[1]:"function"==typeof arguments[1]&&(n=arguments[1],o=void 0),e=void 0,t=void 0):"object"==typeof arguments[0]?("function"==typeof arguments[1]&&(n=arguments[1]),t=arguments[0],e=void 0):"string"==typeof arguments[0]&&"function"==typeof arguments[1]&&(n=arguments[1],t=void 0),t=a({},t||{},{page:i,hitsPerPage:o,query:e});var c=this.as._getSearchParams(t,"");return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(s.indexName)+"/browse",body:{params:c},hostType:"read",callback:n})},a.prototype.browseFrom=function(e,t){return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse",body:{cursor:e},hostType:"read",callback:t})},a.prototype.searchForFacetValues=function(e,t){var n=r(3),i=r(25);if(void 0===e.facetName||void 0===e.facetQuery)throw new Error("Usage: index.searchForFacetValues({facetName, facetQuery, ...params}[, callback])");var o=e.facetName,a=i(n(e),(function(e){return"facetName"===e})),s=this.as._getSearchParams(a,"");return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/facets/"+encodeURIComponent(o)+"/query",hostType:"read",body:{params:s},callback:t})},a.prototype.searchFacet=i((function(e,t){return this.searchForFacetValues(e,t)}),o("index.searchFacet(params[, callback])","index.searchForFacetValues(params[, callback])")),a.prototype._search=function(e,t,r,n){return this.as._jsonRequest({cache:this.cache,method:"POST",url:t||"/1/indexes/"+encodeURIComponent(this.indexName)+"/query",body:{params:e},hostType:"read",fallback:{method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName),body:{params:e}},callback:r,additionalUA:n})},a.prototype.getObject=function(e,t,r){var n=this;1!==arguments.length&&"function"!=typeof t||(r=t,t=void 0);var i="";if(void 0!==t){i="?attributes=";for(var o=0;o<t.length;++o)0!==o&&(i+=","),i+=t[o]}return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/"+encodeURIComponent(e)+i,hostType:"read",callback:r})},a.prototype.getObjects=function(e,t,n){var i=r(0),o=r(7),a="Usage: index.getObjects(arrayOfObjectIDs[, callback])";if(!i(e))throw new Error(a);var s=this;1!==arguments.length&&"function"!=typeof t||(n=t,t=void 0);var c={requests:o(e,(function(e){var r={indexName:s.indexName,objectID:e};return t&&(r.attributesToRetrieve=t.join(",")),r}))};return this.as._jsonRequest({method:"POST",url:"/1/indexes/*/objects",hostType:"read",body:c,callback:n})},a.prototype.as=null,a.prototype.indexName=null,a.prototype.typeAheadArgs=null,a.prototype.typeAheadValueOption=null},function(e,t,r){e.exports=function(e,t){return function(r,i,o){if("function"==typeof r&&"object"==typeof i||"object"==typeof o)throw new n.AlgoliaSearchError("index.search usage is index.search(query, params, cb)");0===arguments.length||"function"==typeof r?(o=r,r=""):1!==arguments.length&&"function"!=typeof i||(o=i,i=void 0),"object"==typeof r&&null!==r?(i=r,r=void 0):null==r&&(r="");var a,s="";return void 0!==r&&(s+=e+"="+encodeURIComponent(r)),void 0!==i&&(i.additionalUA&&(a=i.additionalUA,delete i.additionalUA),s=this.as._getSearchParams(i,s)),this._search(s,t,o,a)}};var n=r(5)},function(e,t,r){var n=r(6);e.exports=function e(t){var r=Array.prototype.slice.call(arguments);return n(r,(function(r){for(var n in r)r.hasOwnProperty(n)&&("object"==typeof t[n]&&"object"==typeof r[n]?t[n]=e({},t[n],r[n]):void 0!==r[n]&&(t[n]=r[n]))})),t}},function(e,t,r){e.exports=function(e,t){var n=r(45),i=r(6),o={};return i(n(e),(function(r){!0!==t(r)&&(o[r]=e[r])})),o}},function(e,t,r){"use strict";var n=Object.prototype.toString;e.exports=function(e){var t=n.call(e),r="[object Arguments]"===t;return r||(r="[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===n.call(e.callee)),r}},function(e,t){e.exports=function(e,t){t(e,0)}},function(e,t,r){"use strict";var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,r,s){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?o(a(e),(function(a){var s=encodeURIComponent(n(a))+r;return i(e[a])?o(e[a],(function(e){return s+encodeURIComponent(n(e))})).join(t):s+encodeURIComponent(n(e[a]))})).join(t):s?encodeURIComponent(n(s))+r+encodeURIComponent(n(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var a=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},function(e,t,r){"use strict";var n=r(16),i=r(17),o=r(63),a=r(11),s=r(64),c=r(30),u=r(18),l=r(65);function f(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,r){return f(t[r],e)})):e===t}function h(e){var t=e?h._parseNumbers(e):{};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(e){var n=-1!==h.PARAMETERS.indexOf(e),i=void 0!==t[e];!n&&i&&(r[e]=t[e])}))}h.PARAMETERS=Object.keys(new h),h._parseNumbers=function(e){if(e instanceof h)return e;var t={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach((function(r){var n=e[r];if("string"==typeof n){var i=parseFloat(n);t[r]=isNaN(i)?n:i}})),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map((function(e){return e.map((function(e){return parseFloat(e)}))}))),e.numericRefinements){var r={};Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t]||{};r[t]={},Object.keys(n).forEach((function(e){var i=n[e].map((function(e){return Array.isArray(e)?e.map((function(e){return"string"==typeof e?parseFloat(e):e})):"string"==typeof e?parseFloat(e):e}));r[t][e]=i}))})),t.numericRefinements=r}return n({},e,t)},h.make=function(e){var t=new h(e);return(e.hierarchicalFacets||[]).forEach((function(e){if(e.rootPath){var r=t.getHierarchicalRefinement(e.name);r.length>0&&0!==r[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(r=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}})),t},h.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&&u(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."):u(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},h.prototype={constructor:h,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:l.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:l.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:l.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:l.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,r){var i=s(r);if(this.isNumericRefined(e,t,i))return this;var o=n({},this.numericRefinements);return o[e]=n({},o[e]),o[e][t]?(o[e][t]=o[e][t].slice(),o[e][t].push(i)):o[e][t]=[i],this.setQueryParameters({numericRefinements:o})},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){return void 0!==r?this.isNumericRefined(e,t,r)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(n,i){return i===e&&n.op===t&&f(n.val,s(r))}))}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,n){return n===e&&r.op===t}))}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(t,r){return r===e}))}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return u(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof e)return u(this.numericRefinements[e])?c(this.numericRefinements,e):this.numericRefinements;if("function"==typeof e){var t=!1,r=this.numericRefinements,n=Object.keys(r).reduce((function(n,i){var o=r[i],a={};return o=o||{},Object.keys(o).forEach((function(r){var n=o[r]||[],s=[];n.forEach((function(t){e({val:t,op:r},i,"numeric")||s.push(t)})),s.length!==n.length&&(t=!0),a[r]=s})),n[i]=a,n}),{});return t?n:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return l.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:l.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return l.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:l.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return l.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:l.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter((function(t){return t!==e}))}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter((function(t){return t!==e}))}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter((function(t){return t.name!==e}))}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return l.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:l.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return l.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:l.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return l.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:l.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter((function(t){return t!==e}))};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:l.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:l.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:l.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),n={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+r))?-1===t.indexOf(r)?n[e]=[]:n[e]=[t.slice(0,t.lastIndexOf(r))]:n[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:i({},n,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:i({},r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:i({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&l.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&l.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&l.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var r=this.getHierarchicalRefinement(e);return t?-1!==r.indexOf(t):r.length>0},isNumericRefined:function(e,t,r){if(void 0===r&&void 0===t)return!!this.numericRefinements[e];var n=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===r||!n)return n;var i,o,c=s(r),u=void 0!==(i=this.numericRefinements[e][t],o=c,a(i,(function(e){return f(e,o)})));return n&&u},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=o(Object.keys(this.numericRefinements).filter((function(t){return Object.keys(e.numericRefinements[t]).length>0})),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter((function(t){return e.disjunctiveFacetsRefinements[t].length>0})).concat(t).concat(this.getRefinedHierarchicalFacets())},getRefinedHierarchicalFacets:function(){var e=this;return o(this.hierarchicalFacets.map((function(e){return e.name})),Object.keys(this.hierarchicalFacetsRefinements).filter((function(t){return e.hierarchicalFacetsRefinements[t].length>0})))},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter((function(t){return-1===e.indexOf(t)}))},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},r=this;return Object.keys(this).forEach((function(n){var i=r[n];-1===e.indexOf(n)&&void 0!==i&&(t[n]=i)})),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var r={};return r[e]=t,this.setQueryParameters(r)},setQueryParameters:function(e){if(!e)return this;var t=h.validate(this,e);if(t)throw t;var r=this,n=h._parseNumbers(e),i=Object.keys(this).reduce((function(e,t){return e[t]=r[t],e}),{}),o=Object.keys(n).reduce((function(e,t){var r=void 0!==e[t],i=void 0!==n[t];return r&&!i?c(e,[t]):(i&&(e[t]=n[t]),e)}),i);return new this.constructor(o)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return a(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));return t.split(r).map((function(e){return e.trim()}))},toString:function(){return JSON.stringify(this,null,2)}},e.exports=h},function(e,t,r){"use strict";e.exports=function(e,t){if(null===e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}},function(e,t,r){"use strict";var n=r(16),i=r(17),o=r(32),a=r(66),s=r(11),c=r(67),u=r(33),l=r(68);function f(e){var t={};return e.forEach((function(e,r){t[e]=r})),t}function h(e,t,r){t&&t[r]&&(e.stats=t[r])}function p(e,t){var r=t[0];this._rawResults=t,this.query=r.query,this.parsedQuery=r.parsedQuery,this.hits=r.hits,this.index=r.index,this.hitsPerPage=r.hitsPerPage,this.nbHits=r.nbHits,this.nbPages=r.nbPages,this.page=r.page,this.processingTimeMS=t.reduce((function(e,t){return void 0===t.processingTimeMS?e:e+t.processingTimeMS}),0),this.aroundLatLng=r.aroundLatLng,this.automaticRadius=r.automaticRadius,this.serverUsed=r.serverUsed,this.timeoutCounts=r.timeoutCounts,this.timeoutHits=r.timeoutHits,this.exhaustiveFacetsCount=r.exhaustiveFacetsCount,this.exhaustiveNbHits=r.exhaustiveNbHits,this.userData=r.userData,this.queryID=r.queryID,this.disjunctiveFacets=[],this.hierarchicalFacets=e.hierarchicalFacets.map((function(){return[]})),this.facets=[];var o=e.getRefinedDisjunctiveFacets(),u=f(e.facets),p=f(e.disjunctiveFacets),d=1,y=this,m=r.facets||{};Object.keys(m).forEach((function(t){var n,i,o=m[t],a=(n=e.hierarchicalFacets,i=t,s(n,(function(e){return(e.attributes||[]).indexOf(i)>-1})));if(a){var l=a.attributes.indexOf(t),f=c(e.hierarchicalFacets,(function(e){return e.name===a.name}));y.hierarchicalFacets[f][l]={attribute:t,data:o,exhaustive:r.exhaustiveFacetsCount}}else{var d,g=-1!==e.disjunctiveFacets.indexOf(t),v=-1!==e.facets.indexOf(t);g&&(d=p[t],y.disjunctiveFacets[d]={name:t,data:o,exhaustive:r.exhaustiveFacetsCount},h(y.disjunctiveFacets[d],r.facets_stats,t)),v&&(d=u[t],y.facets[d]={name:t,data:o,exhaustive:r.exhaustiveFacetsCount},h(y.facets[d],r.facets_stats,t))}})),this.hierarchicalFacets=a(this.hierarchicalFacets),o.forEach((function(o){var a=t[d],s=a&&a.facets?a.facets:{},u=e.getHierarchicalFacetByName(o);Object.keys(s).forEach((function(t){var o,l=s[t];if(u){o=c(e.hierarchicalFacets,(function(e){return e.name===u.name}));var f=c(y.hierarchicalFacets[o],(function(e){return e.attribute===t}));if(-1===f)return;y.hierarchicalFacets[o][f].data=n({},y.hierarchicalFacets[o][f].data,l)}else{o=p[t];var d=r.facets&&r.facets[t]||{};y.disjunctiveFacets[o]={name:t,data:i({},l,d),exhaustive:a.exhaustiveFacetsCount},h(y.disjunctiveFacets[o],a.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach((function(r){!y.disjunctiveFacets[o].data[r]&&e.disjunctiveFacetsRefinements[t].indexOf(r)>-1&&(y.disjunctiveFacets[o].data[r]=0)}))}})),d++})),e.getRefinedHierarchicalFacets().forEach((function(r){var n=e.getHierarchicalFacetByName(r),o=e._getHierarchicalFacetSeparator(n),a=e.getHierarchicalRefinement(r);if(!(0===a.length||a[0].split(o).length<2)){var s=t[d],u=s&&s.facets?s.facets:{};Object.keys(u).forEach((function(t){var r=u[t],s=c(e.hierarchicalFacets,(function(e){return e.name===n.name})),l=c(y.hierarchicalFacets[s],(function(e){return e.attribute===t}));if(-1!==l){var f={};if(a.length>0){var h=a[0].split(o)[0];f[h]=y.hierarchicalFacets[s][l].data[h]}y.hierarchicalFacets[s][l].data=i(f,r,y.hierarchicalFacets[s][l].data)}})),d++}})),Object.keys(e.facetsExcludes).forEach((function(t){var n=e.facetsExcludes[t],i=u[t];y.facets[i]={name:t,data:r.facets[t],exhaustive:r.exhaustiveFacetsCount},n.forEach((function(e){y.facets[i]=y.facets[i]||{name:t},y.facets[i].data=y.facets[i].data||{},y.facets[i].data[e]=0}))})),this.hierarchicalFacets=this.hierarchicalFacets.map(l(e)),this.facets=a(this.facets),this.disjunctiveFacets=a(this.disjunctiveFacets),this._state=e}function d(e,t){if(!t.data||0===t.data.length)return t;var r=t.data.map((function(t){return d(e,t)})),i=e(r);return n({},t,{data:i})}function y(e,t){var r=s(e,(function(e){return e.name===t}));return r&&r.stats}function m(e,t,r,n,i){var o=s(i,(function(e){return e.name===r})),a=o&&o.data&&o.data[n]?o.data[n]:0,c=o&&o.exhaustive||!1;return{type:t,attributeName:r,name:n,count:a,exhaustive:c}}p.prototype.getFacetByName=function(e){function t(t){return t.name===e}return s(this.facets,t)||s(this.disjunctiveFacets,t)||s(this.hierarchicalFacets,t)},p.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],p.prototype.getFacetValues=function(e,t){var r=function(e,t){function r(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var n=s(e.facets,r);return n?Object.keys(n.data).map((function(r){return{name:r,count:n.data[r],isRefined:e._state.isFacetRefined(t,r),isExcluded:e._state.isExcludeRefined(t,r)}})):[]}if(e._state.isDisjunctiveFacet(t)){var i=s(e.disjunctiveFacets,r);return i?Object.keys(i.data).map((function(r){return{name:r,count:i.data[r],isRefined:e._state.isDisjunctiveFacetRefined(t,r)}})):[]}if(e._state.isHierarchicalFacet(t))return s(e.hierarchicalFacets,r)}(this,e);if(r){var n=i({},t,{sortBy:p.DEFAULT_SORT});if(Array.isArray(n.sortBy)){var a=u(n.sortBy,p.DEFAULT_SORT);return Array.isArray(r)?o(r,a[0],a[1]):d((function(e){return o(e,a[0],a[1])}),r)}if("function"==typeof n.sortBy)return Array.isArray(r)?r.sort(n.sortBy):d((function(e){return function(e,t){return t.sort(e)}(n.sortBy,e)}),r);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")}},p.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?y(this.facets,e):this._state.isDisjunctiveFacet(e)?y(this.disjunctiveFacets,e):void 0},p.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(m(e,"facet",n,i,t.facets))}))})),Object.keys(e.facetsExcludes).forEach((function(n){e.facetsExcludes[n].forEach((function(i){r.push(m(e,"exclude",n,i,t.facets))}))})),Object.keys(e.disjunctiveFacetsRefinements).forEach((function(n){e.disjunctiveFacetsRefinements[n].forEach((function(i){r.push(m(e,"disjunctive",n,i,t.disjunctiveFacets))}))})),Object.keys(e.hierarchicalFacetsRefinements).forEach((function(n){e.hierarchicalFacetsRefinements[n].forEach((function(i){r.push(function(e,t,r,n){var i=e.getHierarchicalFacetByName(t),o=e._getHierarchicalFacetSeparator(i),a=r.split(o),c=s(n,(function(e){return e.name===t})),u=a.reduce((function(e,t){var r=e&&s(e.data,(function(e){return e.name===t}));return void 0!==r?r:e}),c),l=u&&u.count||0,f=u&&u.exhaustive||!1,h=u&&u.path||"";return{type:"hierarchical",attributeName:t,name:h,count:l,exhaustive:f}}(e,n,i,t.hierarchicalFacets))}))})),Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t];Object.keys(n).forEach((function(e){n[e].forEach((function(n){r.push({type:"numeric",attributeName:t,name:n,numericValue:n,operator:e})}))}))})),e.tagRefinements.forEach((function(e){r.push({type:"tag",attributeName:"_tags",name:e})})),r},e.exports=p},function(e,t,r){"use strict";function n(e,t){if(e!==t){var r=void 0!==e,n=null===e,i=void 0!==t,o=null===t;if(!o&&e>t||n&&i||!r)return 1;if(!n&&e<t||o&&r||!i)return-1}return 0}e.exports=function(e,t,r){if(!Array.isArray(e))return[];Array.isArray(r)||(r=[]);var i=e.map((function(e,r){return{criteria:t.map((function(t){return e[t]})),index:r,value:e}}));return i.sort((function(e,t){for(var i=-1;++i<e.criteria.length;){var o=n(e.criteria[i],t.criteria[i]);if(o)return i>=r.length?o:"desc"===r[i]?-o:o}return e.index-t.index})),i.map((function(e){return e.value}))}},function(e,t,r){"use strict";var n=r(11);e.exports=function(e,t){var r=(t||[]).map((function(e){return e.split(":")}));return e.reduce((function(e,t){var i=t.split(":"),o=n(r,(function(e){return e[0]===i[0]}));return i.length>1||!o?(e[0].push(i[0]),e[1].push(i[1]),e):(e[0].push(o[0]),e[1].push(o[1]),e)}),[[],[]])}},function(e,t,r){"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},function(e,t,r){"use strict";e.exports="0.0.0-5a0352a"},function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),o=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r};e.exports={arrayToObject:o,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var i=t[n],o=i.obj[i.prop],a=Object.keys(o),s=0;s<a.length;++s){var c=a[s],u=o[c];"object"==typeof u&&null!==u&&-1===r.indexOf(u)&&(t.push({obj:o,prop:c}),r.push(u))}return function(e){for(var t;e.length;){var r=e.pop();if(t=r.obj[r.prop],Array.isArray(t)){for(var n=[],i=0;i<t.length;++i)void 0!==t[i]&&n.push(t[i]);r.obj[r.prop]=n}}return t}(t)},decode:function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},encode:function(e){if(0===e.length)return e;for(var t="string"==typeof e?e:String(e),r="",n=0;n<t.length;++n){var o=t.charCodeAt(n);45===o||46===o||95===o||126===o||o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122?r+=t.charAt(n):o<128?r+=i[o]:o<2048?r+=i[192|o>>6]+i[128|63&o]:o<55296||o>=57344?r+=i[224|o>>12]+i[128|o>>6&63]+i[128|63&o]:(n+=1,o=65536+((1023&o)<<10|1023&t.charCodeAt(n)),r+=i[240|o>>18]+i[128|o>>12&63]+i[128|o>>6&63]+i[128|63&o])}return r},isBuffer:function(e){return null!=e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},merge:function e(t,r,i){if(!r)return t;if("object"!=typeof r){if(Array.isArray(t))t.push(r);else{if("object"!=typeof t)return[t,r];(i.plainObjects||i.allowPrototypes||!n.call(Object.prototype,r))&&(t[r]=!0)}return t}if("object"!=typeof t)return[t].concat(r);var a=t;return Array.isArray(t)&&!Array.isArray(r)&&(a=o(t,i)),Array.isArray(t)&&Array.isArray(r)?(r.forEach((function(r,o){n.call(t,o)?t[o]&&"object"==typeof t[o]?t[o]=e(t[o],r,i):t.push(r):t[o]=r})),t):Object.keys(r).reduce((function(t,o){var a=r[o];return n.call(t,o)?t[o]=e(t[o],a,i):t[o]=a,t}),a)}}},function(e,t,r){"use strict";var n=String.prototype.replace,i=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return n.call(e,i,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},function(e,t,r){e.exports=r(73)()},,function(e,t,r){},function(e,t){function r(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var n,i=document.getElementsByTagName("main");n=i[0],wrapSections=function(){var e={},t={},i={},o={},a=r(n.children);if(-1===n.lastChild.className.indexOf("author-page")){var s=document.createElement("section"),c=document.createElement("aside"),u=document.createElement("div");a&&a.length>0&&a.forEach((function(r){r.className.indexOf("blog-author")>=0?i=r:r.querySelector("img")?e=r:r.querySelector("h1")?t=r:o=r})),n.innerHTML="",e&&n.appendChild(e),n.appendChild(s),s.appendChild(c),s.appendChild(u),t&&t.childElementCount>0&&u.appendChild(t),o&&o.childElementCount>0&&u.appendChild(o),i&&i.childElementCount>0&&c.appendChild(i)}else{n.classList.add("author-page__base");var l=document.createElement("section");l.classList.add("author-teaser__base");var f=n.lastChild.querySelector("img"),h=document.createElement("div"),p=document.createElement("div");n.appendChild(l),l.appendChild(h),h.appendChild(f);var d=r(n.children);d.pop(),l.appendChild(p),d.forEach((function(e){p.appendChild(e)}))}},wrapSections()},function(e,t){},function(e,t,r){e.exports=u;var n=r(44),i=r(12),o=r(13),a=r(48),s=r(8),c=r(5);function u(){a.apply(this,arguments)}function l(){throw new c.AlgoliaSearchError("Not implemented in this environment.\nIf you feel this is a mistake, write to [email protected]")}s(u,a),u.prototype.deleteIndex=function(e,t){return this._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(e),hostType:"write",callback:t})},u.prototype.moveIndex=function(e,t,r){var n={operation:"move",destination:t};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(e)+"/operation",body:n,hostType:"write",callback:r})},u.prototype.copyIndex=function(e,t,r,n){var i={operation:"copy",destination:t},o=n;if("function"==typeof r)o=r;else if(Array.isArray(r)&&r.length>0)i.scope=r;else if(void 0!==r)throw new Error("the scope given to `copyIndex` was not an array with settings, synonyms or rules");return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(e)+"/operation",body:i,hostType:"write",callback:o})},u.prototype.getLogs=function(e,t,n){var i=r(3),o={};return"object"==typeof e?(o=i(e),n=t):0===arguments.length||"function"==typeof e?n=e:1===arguments.length||"function"==typeof t?(n=t,o.offset=e):(o.offset=e,o.length=t),void 0===o.offset&&(o.offset=0),void 0===o.length&&(o.length=10),this._jsonRequest({method:"GET",url:"/1/logs?"+this._getSearchParams(o,""),hostType:"read",callback:n})},u.prototype.listIndexes=function(e,t){var r="";return void 0===e||"function"==typeof e?t=e:r="?page="+e,this._jsonRequest({method:"GET",url:"/1/indexes"+r,hostType:"read",callback:t})},u.prototype.initIndex=function(e){return new n(this,e)},u.prototype.initAnalytics=function(e){return r(52)(this.applicationID,this.apiKey,e)},u.prototype.listUserKeys=i((function(e){return this.listApiKeys(e)}),o("client.listUserKeys()","client.listApiKeys()")),u.prototype.listApiKeys=function(e){return this._jsonRequest({method:"GET",url:"/1/keys",hostType:"read",callback:e})},u.prototype.getUserKeyACL=i((function(e,t){return this.getApiKey(e,t)}),o("client.getUserKeyACL()","client.getApiKey()")),u.prototype.getApiKey=function(e,t){return this._jsonRequest({method:"GET",url:"/1/keys/"+e,hostType:"read",callback:t})},u.prototype.deleteUserKey=i((function(e,t){return this.deleteApiKey(e,t)}),o("client.deleteUserKey()","client.deleteApiKey()")),u.prototype.deleteApiKey=function(e,t){return this._jsonRequest({method:"DELETE",url:"/1/keys/"+e,hostType:"write",callback:t})},u.prototype.restoreApiKey=function(e,t){return this._jsonRequest({method:"POST",url:"/1/keys/"+e+"/restore",hostType:"write",callback:t})},u.prototype.addUserKey=i((function(e,t,r){return this.addApiKey(e,t,r)}),o("client.addUserKey()","client.addApiKey()")),u.prototype.addApiKey=function(e,t,n){var i=r(0),o="Usage: client.addApiKey(arrayOfAcls[, params, callback])";if(!i(e))throw new Error(o);1!==arguments.length&&"function"!=typeof t||(n=t,t=null);var a={acl:e};return t&&(a.validity=t.validity,a.maxQueriesPerIPPerHour=t.maxQueriesPerIPPerHour,a.maxHitsPerQuery=t.maxHitsPerQuery,a.indexes=t.indexes,a.description=t.description,t.queryParameters&&(a.queryParameters=this._getSearchParams(t.queryParameters,"")),a.referers=t.referers),this._jsonRequest({method:"POST",url:"/1/keys",body:a,hostType:"write",callback:n})},u.prototype.addUserKeyWithValidity=i((function(e,t,r){return this.addApiKey(e,t,r)}),o("client.addUserKeyWithValidity()","client.addApiKey()")),u.prototype.updateUserKey=i((function(e,t,r,n){return this.updateApiKey(e,t,r,n)}),o("client.updateUserKey()","client.updateApiKey()")),u.prototype.updateApiKey=function(e,t,n,i){var o=r(0),a="Usage: client.updateApiKey(key, arrayOfAcls[, params, callback])";if(!o(t))throw new Error(a);2!==arguments.length&&"function"!=typeof n||(i=n,n=null);var s={acl:t};return n&&(s.validity=n.validity,s.maxQueriesPerIPPerHour=n.maxQueriesPerIPPerHour,s.maxHitsPerQuery=n.maxHitsPerQuery,s.indexes=n.indexes,s.description=n.description,n.queryParameters&&(s.queryParameters=this._getSearchParams(n.queryParameters,"")),s.referers=n.referers),this._jsonRequest({method:"PUT",url:"/1/keys/"+e,body:s,hostType:"write",callback:i})},u.prototype.startQueriesBatch=i((function(){this._batch=[]}),o("client.startQueriesBatch()","client.search()")),u.prototype.addQueryInBatch=i((function(e,t,r){this._batch.push({indexName:e,query:t,params:r})}),o("client.addQueryInBatch()","client.search()")),u.prototype.sendQueriesBatch=i((function(e){return this.search(this._batch,e)}),o("client.sendQueriesBatch()","client.search()")),u.prototype.batch=function(e,t){if(!r(0)(e))throw new Error("Usage: client.batch(operations[, callback])");return this._jsonRequest({method:"POST",url:"/1/indexes/*/batch",body:{requests:e},hostType:"write",callback:t})},u.prototype.assignUserID=function(e,t){if(!e.userID||!e.cluster)throw new c.AlgoliaSearchError("You have to provide both a userID and cluster",e);return this._jsonRequest({method:"POST",url:"/1/clusters/mapping",hostType:"write",body:{cluster:e.cluster},callback:t,headers:{"x-algolia-user-id":e.userID}})},u.prototype.assignUserIDs=function(e,t){if(!e.userIDs||!e.cluster)throw new c.AlgoliaSearchError("You have to provide both an array of userIDs and cluster",e);return this._jsonRequest({method:"POST",url:"/1/clusters/mapping/batch",hostType:"write",body:{cluster:e.cluster,users:e.userIDs},callback:t})},u.prototype.getTopUserID=function(e){return this._jsonRequest({method:"GET",url:"/1/clusters/mapping/top",hostType:"read",callback:e})},u.prototype.getUserID=function(e,t){if(!e.userID)throw new c.AlgoliaSearchError("You have to provide a userID",{debugData:e});return this._jsonRequest({method:"GET",url:"/1/clusters/mapping/"+e.userID,hostType:"read",callback:t})},u.prototype.listClusters=function(e){return this._jsonRequest({method:"GET",url:"/1/clusters",hostType:"read",callback:e})},u.prototype.listUserIDs=function(e,t){return this._jsonRequest({method:"GET",url:"/1/clusters/mapping",body:e,hostType:"read",callback:t})},u.prototype.removeUserID=function(e,t){if(!e.userID)throw new c.AlgoliaSearchError("You have to provide a userID",{debugData:e});return this._jsonRequest({method:"DELETE",url:"/1/clusters/mapping",hostType:"write",callback:t,headers:{"x-algolia-user-id":e.userID}})},u.prototype.searchUserIDs=function(e,t){return this._jsonRequest({method:"POST",url:"/1/clusters/mapping/search",body:e,hostType:"read",callback:t})},u.prototype.setPersonalizationStrategy=function(e,t){return this._jsonRequest({method:"POST",url:"/1/recommendation/personalization/strategy",body:e,hostType:"write",callback:t})},u.prototype.getPersonalizationStrategy=function(e){return this._jsonRequest({method:"GET",url:"/1/recommendation/personalization/strategy",hostType:"read",callback:e})},u.prototype.destroy=l,u.prototype.enableRateLimitForward=l,u.prototype.disableRateLimitForward=l,u.prototype.useSecuredAPIKey=l,u.prototype.disableSecuredAPIKey=l,u.prototype.generateSecuredApiKey=l,u.prototype.getSecuredApiKeyRemainingValidity=l},function(e,t,r){var n=r(8),i=r(22),o=r(12),a=r(13),s=r(27),c=r(5),u=o((function(){}),a("forwardToSlaves","forwardToReplicas"));function l(){i.apply(this,arguments)}function f(e,t,r){return function r(n,i){var o={page:n||0,hitsPerPage:t||100},a=i||[];return e(o).then((function(e){var t=e.hits,n=e.nbHits,i=t.map((function(e){return delete e._highlightResult,e})),s=a.concat(i);return s.length<n?r(o.page+1,s):s}))}().then((function(e){if("function"!=typeof r)return e;r(e)}))}e.exports=l,n(l,i),l.prototype.addObject=function(e,t,r){var n=this;return 1!==arguments.length&&"function"!=typeof t||(r=t,t=void 0),this.as._jsonRequest({method:void 0!==t?"PUT":"POST",url:"/1/indexes/"+encodeURIComponent(n.indexName)+(void 0!==t?"/"+encodeURIComponent(t):""),body:e,hostType:"write",callback:r})},l.prototype.addObjects=function(e,t){if(!r(0)(e))throw new Error("Usage: index.addObjects(arrayOfObjects[, callback])");for(var n={requests:[]},i=0;i<e.length;++i){var o={action:"addObject",body:e[i]};n.requests.push(o)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:n,hostType:"write",callback:t})},l.prototype.partialUpdateObject=function(e,t,r){1!==arguments.length&&"function"!=typeof t||(r=t,t=void 0);var n=this,i="/1/indexes/"+encodeURIComponent(n.indexName)+"/"+encodeURIComponent(e.objectID)+"/partial";return!1===t&&(i+="?createIfNotExists=false"),this.as._jsonRequest({method:"POST",url:i,body:e,hostType:"write",callback:r})},l.prototype.partialUpdateObjects=function(e,t,n){1!==arguments.length&&"function"!=typeof t||(n=t,t=!0);var i=r(0),o="Usage: index.partialUpdateObjects(arrayOfObjects[, callback])";if(!i(e))throw new Error(o);for(var a=this,s={requests:[]},c=0;c<e.length;++c){var u={action:!0===t?"partialUpdateObject":"partialUpdateObjectNoCreate",objectID:e[c].objectID,body:e[c]};s.requests.push(u)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(a.indexName)+"/batch",body:s,hostType:"write",callback:n})},l.prototype.saveObject=function(e,t){return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(e.objectID),body:e,hostType:"write",callback:t})},l.prototype.saveObjects=function(e,t){if(!r(0)(e))throw new Error("Usage: index.saveObjects(arrayOfObjects[, callback])");for(var n={requests:[]},i=0;i<e.length;++i){var o={action:"updateObject",objectID:e[i].objectID,body:e[i]};n.requests.push(o)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:n,hostType:"write",callback:t})},l.prototype.deleteObject=function(e,t){if("function"==typeof e||"string"!=typeof e&&"number"!=typeof e){var r=new c.AlgoliaSearchError(e&&"function"!=typeof e?"ObjectID must be a string":"Cannot delete an object without an objectID");return"function"==typeof(t=e)?t(r):this.as._promise.reject(r)}return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(e),hostType:"write",callback:t})},l.prototype.deleteObjects=function(e,t){var n=r(0),i=r(7);if(!n(e))throw new Error("Usage: index.deleteObjects(arrayOfObjectIDs[, callback])");var o={requests:i(e,(function(e){return{action:"deleteObject",objectID:e,body:{objectID:e}}}))};return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:o,hostType:"write",callback:t})},l.prototype.deleteByQuery=o((function(e,t,n){var i=r(3),o=r(7),a=this,c=a.as;1===arguments.length||"function"==typeof t?(n=t,t={}):t=i(t),t.attributesToRetrieve="objectID",t.hitsPerPage=1e3,t.distinct=!1,this.clearCache();var u=this.search(e,t).then(l);function l(e){if(0===e.nbHits)return e;var t=o(e.hits,(function(e){return e.objectID}));return a.deleteObjects(t).then(f).then(h)}function f(e){return a.waitTask(e.taskID)}function h(){return a.deleteByQuery(e,t)}if(!n)return u;function p(){s((function(){n(null)}),c._setTimeout||setTimeout)}function d(e){s((function(){n(e)}),c._setTimeout||setTimeout)}u.then(p,d)}),a("index.deleteByQuery()","index.deleteBy()")),l.prototype.deleteBy=function(e,t){return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/deleteByQuery",body:{params:this.as._getSearchParams(e,"")},hostType:"write",callback:t})},l.prototype.browseAll=function(e,t){"object"==typeof e&&(t=e,e=void 0);var n=r(24),i=new(r(47)),o=this.as,a=this,s=o._getSearchParams(n({},t||{},{query:e}),"");function c(e){var t;i._stopped||(t=void 0!==e?{cursor:e}:{params:s},o._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(a.indexName)+"/browse",hostType:"read",body:t,callback:u}))}function u(e,t){i._stopped||(e?i._error(e):(i._result(t),void 0!==t.cursor?c(t.cursor):i._end()))}return(c(),i)},l.prototype.ttAdapter=o((function(e){var t=this;return function(r,n,i){var o;o="function"==typeof i?i:n,t.search(r,e,(function(e,t){o(e||t.hits)}))}}),"ttAdapter is not necessary anymore and will be removed in the next version,\nhave a look at autocomplete.js (https://github.com/algolia/autocomplete.js)"),l.prototype.waitTask=function(e,t){var r=100,n=5e3,i=0,o=this,a=o.as,c=function t(){return a._jsonRequest({method:"GET",hostType:"read",url:"/1/indexes/"+encodeURIComponent(o.indexName)+"/task/"+e}).then((function(e){var o=r*++i*i;return o>n&&(o=n),"published"!==e.status?a._promise.delay(o).then(t):e}))}();if(!t)return c;c.then((function(e){s((function(){t(null,e)}),a._setTimeout||setTimeout)}),(function(e){s((function(){t(e)}),a._setTimeout||setTimeout)}))},l.prototype.clearIndex=function(e){return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/clear",hostType:"write",callback:e})},l.prototype.getSettings=function(e,t){1===arguments.length&&"function"==typeof e&&(t=e,e={}),e=e||{};var r=encodeURIComponent(this.indexName);return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+r+"/settings?getVersion=2"+(e.advanced?"&advanced="+e.advanced:""),hostType:"read",callback:t})},l.prototype.searchSynonyms=function(e,t){return"function"==typeof e?(t=e,e={}):void 0===e&&(e={}),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/search",body:e,hostType:"read",callback:t})},l.prototype.exportSynonyms=function(e,t){return f(this.searchSynonyms.bind(this),e,t)},l.prototype.saveSynonym=function(e,t,r){"function"==typeof t?(r=t,t={}):void 0===t&&(t={}),void 0!==t.forwardToSlaves&&u();var n=t.forwardToSlaves||t.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/"+encodeURIComponent(e.objectID)+"?forwardToReplicas="+n,body:e,hostType:"write",callback:r})},l.prototype.getSynonym=function(e,t){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/"+encodeURIComponent(e),hostType:"read",callback:t})},l.prototype.deleteSynonym=function(e,t,r){"function"==typeof t?(r=t,t={}):void 0===t&&(t={}),void 0!==t.forwardToSlaves&&u();var n=t.forwardToSlaves||t.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/"+encodeURIComponent(e)+"?forwardToReplicas="+n,hostType:"write",callback:r})},l.prototype.clearSynonyms=function(e,t){"function"==typeof e?(t=e,e={}):void 0===e&&(e={}),void 0!==e.forwardToSlaves&&u();var r=e.forwardToSlaves||e.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/clear?forwardToReplicas="+r,hostType:"write",callback:t})},l.prototype.batchSynonyms=function(e,t,r){"function"==typeof t?(r=t,t={}):void 0===t&&(t={}),void 0!==t.forwardToSlaves&&u();var n=t.forwardToSlaves||t.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/batch?forwardToReplicas="+n+"&replaceExistingSynonyms="+(t.replaceExistingSynonyms?"true":"false"),hostType:"write",body:e,callback:r})},l.prototype.searchRules=function(e,t){return"function"==typeof e?(t=e,e={}):void 0===e&&(e={}),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/rules/search",body:e,hostType:"read",callback:t})},l.prototype.exportRules=function(e,t){return f(this.searchRules.bind(this),e,t)},l.prototype.saveRule=function(e,t,r){if("function"==typeof t?(r=t,t={}):void 0===t&&(t={}),!e.objectID)throw new c.AlgoliaSearchError("Missing or empty objectID field for rule");var n=!0===t.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/rules/"+encodeURIComponent(e.objectID)+"?forwardToReplicas="+n,body:e,hostType:"write",callback:r})},l.prototype.getRule=function(e,t){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/rules/"+encodeURIComponent(e),hostType:"read",callback:t})},l.prototype.deleteRule=function(e,t,r){"function"==typeof t?(r=t,t={}):void 0===t&&(t={});var n=!0===t.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/rules/"+encodeURIComponent(e)+"?forwardToReplicas="+n,hostType:"write",callback:r})},l.prototype.clearRules=function(e,t){"function"==typeof e?(t=e,e={}):void 0===e&&(e={});var r=!0===e.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/rules/clear?forwardToReplicas="+r,hostType:"write",callback:t})},l.prototype.batchRules=function(e,t,r){"function"==typeof t?(r=t,t={}):void 0===t&&(t={});var n=!0===t.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/rules/batch?forwardToReplicas="+n+"&clearExistingRules="+(!0===t.clearExistingRules?"true":"false"),hostType:"write",body:e,callback:r})},l.prototype.exists=function(e){var t=this.getSettings().then((function(){return!0})).catch((function(e){if(e instanceof c.AlgoliaSearchError&&404===e.statusCode)return!1;throw e}));if("function"!=typeof e)return t;t.then((function(t){e(null,t)})).catch((function(t){e(t)}))},l.prototype.findObject=function(e,t,r){var n=void 0===(t=void 0===t?{}:t).paginate||t.paginate,i=void 0!==t.query?t.query:"",o=this,a=0,s=function(){return t.page=a,o.search(i,t).then((function(t){for(var r=t.hits,i=0;i<r.length;i++){var o=r[i];if(e(o))return{object:o,position:i,page:a}}if(a+=1,!n||a>=t.nbPages)throw new c.ObjectNotFound("Object not found");return s()}))},u=s(a);if(void 0===r)return u;u.then((function(e){r(null,e)})).catch((function(e){r(e)}))},l.prototype.getObjectPosition=function(e,t){for(var r=e.hits,n=0;n<r.length;n++)if(r[n].objectID===t)return n;return-1},l.prototype.setSettings=function(e,t,r){1!==arguments.length&&"function"!=typeof t||(r=t,t={}),void 0!==t.forwardToSlaves&&u();var n=t.forwardToSlaves||t.forwardToReplicas?"true":"false",i=this;return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(i.indexName)+"/settings?forwardToReplicas="+n,hostType:"write",body:e,callback:r})},l.prototype.listUserKeys=o((function(e){return this.listApiKeys(e)}),a("index.listUserKeys()","client.listApiKeys()")),l.prototype.listApiKeys=o((function(e){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",hostType:"read",callback:e})}),a("index.listApiKeys()","client.listApiKeys()")),l.prototype.getUserKeyACL=o((function(e,t){return this.getApiKey(e,t)}),a("index.getUserKeyACL()","client.getApiKey()")),l.prototype.getApiKey=o((function(e,t){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+e,hostType:"read",callback:t})}),a("index.getApiKey()","client.getApiKey()")),l.prototype.deleteUserKey=o((function(e,t){return this.deleteApiKey(e,t)}),a("index.deleteUserKey()","client.deleteApiKey()")),l.prototype.deleteApiKey=o((function(e,t){return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+e,hostType:"write",callback:t})}),a("index.deleteApiKey()","client.deleteApiKey()")),l.prototype.addUserKey=o((function(e,t,r){return this.addApiKey(e,t,r)}),a("index.addUserKey()","client.addApiKey()")),l.prototype.addApiKey=o((function(e,t,n){var i=r(0),o="Usage: index.addApiKey(arrayOfAcls[, params, callback])";if(!i(e))throw new Error(o);1!==arguments.length&&"function"!=typeof t||(n=t,t=null);var a={acl:e};return t&&(a.validity=t.validity,a.maxQueriesPerIPPerHour=t.maxQueriesPerIPPerHour,a.maxHitsPerQuery=t.maxHitsPerQuery,a.description=t.description,t.queryParameters&&(a.queryParameters=this.as._getSearchParams(t.queryParameters,"")),a.referers=t.referers),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",body:a,hostType:"write",callback:n})}),a("index.addApiKey()","client.addApiKey()")),l.prototype.addUserKeyWithValidity=o((function(e,t,r){return this.addApiKey(e,t,r)}),a("index.addUserKeyWithValidity()","client.addApiKey()")),l.prototype.updateUserKey=o((function(e,t,r,n){return this.updateApiKey(e,t,r,n)}),a("index.updateUserKey()","client.updateApiKey()")),l.prototype.updateApiKey=o((function(e,t,n,i){var o=r(0),a="Usage: index.updateApiKey(key, arrayOfAcls[, params, callback])";if(!o(t))throw new Error(a);2!==arguments.length&&"function"!=typeof n||(i=n,n=null);var s={acl:t};return n&&(s.validity=n.validity,s.maxQueriesPerIPPerHour=n.maxQueriesPerIPPerHour,s.maxHitsPerQuery=n.maxHitsPerQuery,s.description=n.description,n.queryParameters&&(s.queryParameters=this.as._getSearchParams(n.queryParameters,"")),s.referers=n.referers),this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+e,body:s,hostType:"write",callback:i})}),a("index.updateApiKey()","client.updateApiKey()"))},function(e,t,r){"use strict";var n=Array.prototype.slice,i=r(26),o=Object.keys,a=o?function(e){return o(e)}:r(46),s=Object.keys;a.shim=function(){Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return i(e)?s(n.call(e)):s(e)}):Object.keys=a;return Object.keys||a},e.exports=a},function(e,t,r){"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=r(26),s=Object.prototype.propertyIsEnumerable,c=!s.call({toString:null},"toString"),u=s.call((function(){}),"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(e){var t=e.constructor;return t&&t.prototype===e},h={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},p=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!h["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{f(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();n=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===o.call(e),n=a(e),s=t&&"[object String]"===o.call(e),h=[];if(!t&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var d=u&&r;if(s&&e.length>0&&!i.call(e,0))for(var y=0;y<e.length;++y)h.push(String(y));if(n&&e.length>0)for(var m=0;m<e.length;++m)h.push(String(m));else for(var g in e)d&&"prototype"===g||!i.call(e,g)||h.push(String(g));if(c)for(var v=function(e){if("undefined"==typeof window||!p)return f(e);try{return f(e)}catch(e){return!1}}(e),b=0;b<l.length;++b)v&&"constructor"===l[b]||!i.call(e,l[b])||h.push(l[b]);return h}}e.exports=n},function(e,t,r){"use strict";function n(){}e.exports=n,r(8)(n,r(9).EventEmitter),n.prototype.stop=function(){this._stopped=!0,this._clean()},n.prototype._end=function(){this.emit("end"),this._clean()},n.prototype._error=function(e){this.emit("error",e),this._clean()},n.prototype._result=function(e){this.emit("result",e)},n.prototype._clean=function(){this.removeAllListeners("stop"),this.removeAllListeners("end"),this.removeAllListeners("error"),this.removeAllListeners("result")}},function(e,t,r){(function(t){e.exports=c;var n=r(5),i=r(27),o=r(22),a=r(49),s=t.env.RESET_APP_DATA_TIMER&&parseInt(t.env.RESET_APP_DATA_TIMER,10)||12e4;function c(e,t,i){var o=r(10)("algoliasearch"),a=r(3),s=r(0),c=r(7),l="Usage: algoliasearch(applicationID, apiKey, opts)";if(!0!==i._allowEmptyCredentials&&!e)throw new n.AlgoliaSearchError("Please provide an application ID. "+l);if(!0!==i._allowEmptyCredentials&&!t)throw new n.AlgoliaSearchError("Please provide an API key. "+l);this.applicationID=e,this.apiKey=t,this.hosts={read:[],write:[]},i=i||{},this._timeouts=i.timeouts||{connect:1e3,read:2e3,write:3e4},i.timeout&&(this._timeouts.connect=this._timeouts.read=this._timeouts.write=i.timeout);var f=i.protocol||"https:";if(/:$/.test(f)||(f+=":"),"http:"!==f&&"https:"!==f)throw new n.AlgoliaSearchError("protocol must be `http:` or `https:` (was `"+i.protocol+"`)");if(this._checkAppIdData(),i.hosts)s(i.hosts)?(this.hosts.read=a(i.hosts),this.hosts.write=a(i.hosts)):(this.hosts.read=a(i.hosts.read),this.hosts.write=a(i.hosts.write));else{var h=c(this._shuffleResult,(function(t){return e+"-"+t+".algolianet.com"})),p=(!1===i.dsn?"":"-dsn")+".algolia.net";this.hosts.read=[this.applicationID+p].concat(h),this.hosts.write=[this.applicationID+".algolia.net"].concat(h)}this.hosts.read=c(this.hosts.read,u(f)),this.hosts.write=c(this.hosts.write,u(f)),this.extraHeaders={},this.cache=i._cache||{},this._ua=i._ua,this._useCache=!(void 0!==i._useCache&&!i._cache)||i._useCache,this._useRequestCache=this._useCache&&i._useRequestCache,this._useFallback=void 0===i.useFallback||i.useFallback,this._setTimeout=i._setTimeout,o("init done, %j",this)}function u(e){return function(t){return e+"//"+t.toLowerCase()}}function l(e){if(void 0===Array.prototype.toJSON)return JSON.stringify(e);var t=Array.prototype.toJSON;delete Array.prototype.toJSON;var r=JSON.stringify(e);return Array.prototype.toJSON=t,r}function f(e){var t={};for(var r in e){var n;if(Object.prototype.hasOwnProperty.call(e,r))n="x-algolia-api-key"===r||"x-algolia-application-id"===r?"**hidden for security purposes**":e[r],t[r]=n}return t}c.prototype.initIndex=function(e){return new o(this,e)},c.prototype.setExtraHeader=function(e,t){this.extraHeaders[e.toLowerCase()]=t},c.prototype.getExtraHeader=function(e){return this.extraHeaders[e.toLowerCase()]},c.prototype.unsetExtraHeader=function(e){delete this.extraHeaders[e.toLowerCase()]},c.prototype.addAlgoliaAgent=function(e){var t="; "+e;-1===this._ua.indexOf(t)&&(this._ua+=t)},c.prototype._jsonRequest=function(e){this._checkAppIdData();var t,o,a,s=r(10)("algoliasearch:"+e.url),c=e.additionalUA||"",u=e.cache,h=this,p=0,d=!1,y=h._useFallback&&h._request.fallback&&e.fallback;this.apiKey.length>500&&void 0!==e.body&&(void 0!==e.body.params||void 0!==e.body.requests)?(e.body.apiKey=this.apiKey,a=this._computeRequestHeaders({additionalUA:c,withApiKey:!1,headers:e.headers})):a=this._computeRequestHeaders({additionalUA:c,headers:e.headers}),void 0!==e.body&&(t=l(e.body)),s("request start");var m=[];function g(e,t,r){return h._useCache&&e&&t&&void 0!==t[r]}function v(t,r){if(g(h._useRequestCache,u,o)&&t.catch((function(){delete u[o]})),"function"!=typeof e.callback)return t.then(r);t.then((function(t){i((function(){e.callback(null,r(t))}),h._setTimeout||setTimeout)}),(function(t){i((function(){e.callback(t)}),h._setTimeout||setTimeout)}))}if(h._useCache&&h._useRequestCache&&(o=e.url),h._useCache&&h._useRequestCache&&t&&(o+="_body_"+t),g(h._useRequestCache,u,o)){s("serving request from cache");var b=u[o];return v("function"!=typeof b.then?h._promise.resolve({responseText:b}):b,(function(e){return JSON.parse(e.responseText)}))}var w=function r(i,v){h._checkAppIdData();var b=new Date;if(h._useCache&&!h._useRequestCache&&(o=e.url),h._useCache&&!h._useRequestCache&&t&&(o+="_body_"+v.body),g(!h._useRequestCache,u,o)){s("serving response from cache");var w=u[o];return h._promise.resolve({body:JSON.parse(w),responseText:w})}if(p>=h.hosts[e.hostType].length)return!y||d?(s("could not get any response"),h._promise.reject(new n.AlgoliaSearchError("Cannot connect to the AlgoliaSearch API. Send an email to [email protected] to report and resolve the issue. Application id was: "+h.applicationID,{debugData:m}))):(s("switching to fallback"),p=0,v.method=e.fallback.method,v.url=e.fallback.url,v.jsonBody=e.fallback.body,v.jsonBody&&(v.body=l(v.jsonBody)),a=h._computeRequestHeaders({additionalUA:c,headers:e.headers}),v.timeouts=h._getTimeoutsForRequest(e.hostType),h._setHostIndexByType(0,e.hostType),d=!0,r(h._request.fallback,v));var _=h._getHostByType(e.hostType),j=_+v.url,R={body:v.body,jsonBody:v.jsonBody,method:v.method,headers:a,timeouts:v.timeouts,debug:s,forceAuthHeaders:v.forceAuthHeaders};return s("method: %s, url: %s, headers: %j, timeouts: %d",R.method,j,R.headers,R.timeouts),i===h._request.fallback&&s("using fallback"),i.call(h,j,R).then((function(e){var r=e&&e.body&&e.body.message&&e.body.status||e.statusCode||e&&e.body&&200;s("received response: statusCode: %s, computed statusCode: %d, headers: %j",e.statusCode,r,e.headers);var i=2===Math.floor(r/100),c=new Date;if(m.push({currentHost:_,headers:f(a),content:t||null,contentLength:void 0!==t?t.length:null,method:v.method,timeouts:v.timeouts,url:v.url,startTime:b,endTime:c,duration:c-b,statusCode:r}),i)return h._useCache&&!h._useRequestCache&&u&&(u[o]=e.responseText),{responseText:e.responseText,body:e.body};if(4!==Math.floor(r/100))return p+=1,O();s("unrecoverable error");var l=new n.AlgoliaSearchError(e.body&&e.body.message,{debugData:m,statusCode:r});return h._promise.reject(l)}),(function(o){s("error: %s, stack: %s",o.message,o.stack);var c=new Date;m.push({currentHost:_,headers:f(a),content:t||null,contentLength:void 0!==t?t.length:null,method:v.method,timeouts:v.timeouts,url:v.url,startTime:b,endTime:c,duration:c-b}),o instanceof n.AlgoliaSearchError||(o=new n.Unknown(o&&o.message,o));if(p+=1,o instanceof n.Unknown||o instanceof n.UnparsableJSON||p>=h.hosts[e.hostType].length&&(d||!y))return o.debugData=m,h._promise.reject(o);if(o instanceof n.RequestTimeout)return s("retrying request with higher timeout"),h._incrementHostIndex(e.hostType),h._incrementTimeoutMultipler(),v.timeouts=h._getTimeoutsForRequest(e.hostType),r(i,v);return O()}));function O(){return s("retrying request"),h._incrementHostIndex(e.hostType),r(i,v)}}(h._request,{url:e.url,method:e.method,body:t,jsonBody:e.body,timeouts:h._getTimeoutsForRequest(e.hostType),forceAuthHeaders:e.forceAuthHeaders});return h._useCache&&h._useRequestCache&&u&&(u[o]=w),v(w,(function(e){return e.body}))},c.prototype._getSearchParams=function(e,t){if(null==e)return t;for(var r in e)null!==r&&void 0!==e[r]&&e.hasOwnProperty(r)&&(t+=""===t?"":"&",t+=r+"="+encodeURIComponent("[object Array]"===Object.prototype.toString.call(e[r])?l(e[r]):e[r]));return t},c.prototype._computeRequestHeaders=function(e){var t=r(6),n={"x-algolia-agent":e.additionalUA?this._ua+"; "+e.additionalUA:this._ua,"x-algolia-application-id":this.applicationID};return!1!==e.withApiKey&&(n["x-algolia-api-key"]=this.apiKey),this.userToken&&(n["x-algolia-usertoken"]=this.userToken),this.securityTags&&(n["x-algolia-tagfilters"]=this.securityTags),t(this.extraHeaders,(function(e,t){n[t]=e})),e.headers&&t(e.headers,(function(e,t){n[t]=e})),n},c.prototype.search=function(e,t,n){var i=r(0),o=r(7);if(!i(e))throw new Error("Usage: client.search(arrayOfQueries[, callback])");"function"==typeof t?(n=t,t={}):void 0===t&&(t={});var a=this,s={requests:o(e,(function(e){var t="";return void 0!==e.query&&(t+="query="+encodeURIComponent(e.query)),{indexName:e.indexName,params:a._getSearchParams(e.params,t)}}))},c=o(s.requests,(function(e,t){return t+"="+encodeURIComponent("/1/indexes/"+encodeURIComponent(e.indexName)+"?"+e.params)})).join("&");return void 0!==t.strategy&&(s.strategy=t.strategy),this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",body:s,hostType:"read",fallback:{method:"GET",url:"/1/indexes/*",body:{params:c}},callback:n})},c.prototype.searchForFacetValues=function(e){var t=r(0),n=r(7),i="Usage: client.searchForFacetValues([{indexName, params: {facetName, facetQuery, ...params}}, ...queries])";if(!t(e))throw new Error(i);var o=this;return o._promise.all(n(e,(function(e){if(!e||void 0===e.indexName||void 0===e.params.facetName||void 0===e.params.facetQuery)throw new Error(i);var t=r(3),n=r(25),a=e.indexName,s=e.params,c=s.facetName,u=n(t(s),(function(e){return"facetName"===e})),l=o._getSearchParams(u,"");return o._jsonRequest({cache:o.cache,method:"POST",url:"/1/indexes/"+encodeURIComponent(a)+"/facets/"+encodeURIComponent(c)+"/query",hostType:"read",body:{params:l}})})))},c.prototype.setSecurityTags=function(e){if("[object Array]"===Object.prototype.toString.call(e)){for(var t=[],r=0;r<e.length;++r)if("[object Array]"===Object.prototype.toString.call(e[r])){for(var n=[],i=0;i<e[r].length;++i)n.push(e[r][i]);t.push("("+n.join(",")+")")}else t.push(e[r]);e=t.join(",")}this.securityTags=e},c.prototype.setUserToken=function(e){this.userToken=e},c.prototype.clearCache=function(){this.cache={}},c.prototype.setRequestTimeout=function(e){e&&(this._timeouts.connect=this._timeouts.read=this._timeouts.write=e)},c.prototype.setTimeouts=function(e){this._timeouts=e},c.prototype.getTimeouts=function(){return this._timeouts},c.prototype._getAppIdData=function(){var e=a.get(this.applicationID);return null!==e&&this._cacheAppIdData(e),e},c.prototype._setAppIdData=function(e){return e.lastChange=(new Date).getTime(),this._cacheAppIdData(e),a.set(this.applicationID,e)},c.prototype._checkAppIdData=function(){var e=this._getAppIdData(),t=(new Date).getTime();return null===e||t-e.lastChange>s?this._resetInitialAppIdData(e):e},c.prototype._resetInitialAppIdData=function(e){var t=e||{};return t.hostIndexes={read:0,write:0},t.timeoutMultiplier=1,t.shuffleResult=t.shuffleResult||function(e){var t,r,n=e.length;for(;0!==n;)r=Math.floor(Math.random()*n),t=e[n-=1],e[n]=e[r],e[r]=t;return e}([1,2,3]),this._setAppIdData(t)},c.prototype._cacheAppIdData=function(e){this._hostIndexes=e.hostIndexes,this._timeoutMultiplier=e.timeoutMultiplier,this._shuffleResult=e.shuffleResult},c.prototype._partialAppIdDataUpdate=function(e){var t=r(6),n=this._getAppIdData();return t(e,(function(e,t){n[t]=e})),this._setAppIdData(n)},c.prototype._getHostByType=function(e){return this.hosts[e][this._getHostIndexByType(e)]},c.prototype._getTimeoutMultiplier=function(){return this._timeoutMultiplier},c.prototype._getHostIndexByType=function(e){return this._hostIndexes[e]},c.prototype._setHostIndexByType=function(e,t){var n=r(3)(this._hostIndexes);return n[t]=e,this._partialAppIdDataUpdate({hostIndexes:n}),e},c.prototype._incrementHostIndex=function(e){return this._setHostIndexByType((this._getHostIndexByType(e)+1)%this.hosts[e].length,e)},c.prototype._incrementTimeoutMultipler=function(){var e=Math.max(this._timeoutMultiplier+1,4);return this._partialAppIdDataUpdate({timeoutMultiplier:e})},c.prototype._getTimeoutsForRequest=function(e){return{connect:this._timeouts.connect*this._timeoutMultiplier,complete:this._timeouts[e]*this._timeoutMultiplier}}}).call(this,r(14))},function(e,t,r){(function(t){var n,i=r(10)("algoliasearch:src/hostIndexState.js"),o="algoliasearch-client-js",a={state:{},set:function(e,t){return this.state[e]=t,this.state[e]},get:function(e){return this.state[e]||null}},s={set:function(e,r){a.set(e,r);try{var n=JSON.parse(t.localStorage[o]);return n[e]=r,t.localStorage[o]=JSON.stringify(n),n[e]}catch(t){return c(e,t)}},get:function(e){try{return JSON.parse(t.localStorage[o])[e]||null}catch(t){return c(e,t)}}};function c(e,r){return i("localStorage failed with",r),function(){try{t.localStorage.removeItem(o)}catch(e){}}(),(n=a).get(e)}function u(e,t){return 1===arguments.length?n.get(e):n.set(e,t)}function l(){try{return"localStorage"in t&&null!==t.localStorage&&(t.localStorage[o]||t.localStorage.setItem(o,JSON.stringify({})),!0)}catch(e){return!1}}n=l()?s:a,e.exports={get:u,set:u,supportsLocalStorage:l}}).call(this,r(15))},function(e,t,r){var n;function i(e){function r(){if(r.enabled){var e=r,i=+new Date,o=i-(n||i);e.diff=o,e.prev=n,e.curr=i,n=i;for(var a=new Array(arguments.length),s=0;s<a.length;s++)a[s]=arguments[s];a[0]=t.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var c=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,(function(r,n){if("%%"===r)return r;c++;var i=t.formatters[n];if("function"==typeof i){var o=a[c];r=i.call(e,o),a.splice(c,1),c--}return r})),t.formatArgs.call(e,a),(r.log||t.log||console.log.bind(console)).apply(e,a)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var r,n=0;for(r in e)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]}(e),"function"==typeof t.init&&t.init(r),r}(t=e.exports=i.debug=i.default=i).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var r=("string"==typeof e?e:"").split(/[\s,]+/),n=r.length,i=0;i<n;i++)r[i]&&("-"===(e=r[i].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(51),t.names=[],t.skips=[],t.formatters={}},function(e,t){var r=1e3,n=60*r,i=60*n,o=24*i,a=365.25*o;function s(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}e.exports=function(e,t){t=t||{};var c,u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var s=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return s*a;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(e);if("number"===u&&!1===isNaN(e))return t.long?s(c=e,o,"day")||s(c,i,"hour")||s(c,n,"minute")||s(c,r,"second")||c+" ms":function(e){if(e>=o)return Math.round(e/o)+"d";if(e>=i)return Math.round(e/i)+"h";if(e>=n)return Math.round(e/n)+"m";if(e>=r)return Math.round(e/r)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,r){e.exports=function(e,t,r){var i={};return(r=r||{}).hosts=r.hosts||["analytics.algolia.com","analytics.algolia.com","analytics.algolia.com","analytics.algolia.com"],r.protocol=r.protocol||"https:",i.as=n(e,t,r),i.getABTests=function(e,t){var r=r||{},n=r.offset||0,i=r.limit||10;return this.as._jsonRequest({method:"GET",url:"/2/abtests?offset="+encodeURIComponent(n)+"&limit="+encodeURIComponent(i),hostType:"read",forceAuthHeaders:!0,callback:t})},i.getABTest=function(e,t){return this.as._jsonRequest({method:"GET",url:"/2/abtests/"+encodeURIComponent(e),hostType:"read",forceAuthHeaders:!0,callback:t})},i.addABTest=function(e,t){return this.as._jsonRequest({method:"POST",url:"/2/abtests",body:e,hostType:"read",forceAuthHeaders:!0,callback:t})},i.stopABTest=function(e,t){return this.as._jsonRequest({method:"POST",url:"/2/abtests/"+encodeURIComponent(e)+"/stop",hostType:"read",forceAuthHeaders:!0,callback:t})},i.deleteABTest=function(e,t){return this.as._jsonRequest({method:"DELETE",url:"/2/abtests/"+encodeURIComponent(e),hostType:"write",forceAuthHeaders:!0,callback:t})},i.waitTask=function(e,t,r){return this.as.initIndex(e).waitTask(t,r)},i};var n=r(19)},function(e,t,r){"use strict";var n=r(54),i=n.Promise||r(55).Promise;e.exports=function(e,t){var o=r(8),a=r(5),s=r(56),c=r(57),u=r(58);function l(e,t,n){return(n=r(3)(n||{}))._ua=n._ua||l.ua,new h(e,t,n)}t=t||"",l.version=r(61),l.ua="Algolia for JavaScript ("+l.version+"); "+t,l.initPlaces=u(l),n.__algolia={debug:r(10),algoliasearch:l};var f={hasXMLHttpRequest:"XMLHttpRequest"in n,hasXDomainRequest:"XDomainRequest"in n};function h(){e.apply(this,arguments)}return f.hasXMLHttpRequest&&(f.cors="withCredentials"in new XMLHttpRequest),o(h,e),h.prototype._request=function(e,t){return new i((function(r,n){if(f.cors||f.hasXDomainRequest){e=s(e,t.headers);var i,o,c=t.body,u=f.cors?new XMLHttpRequest:new XDomainRequest,l=!1;i=setTimeout(h,t.timeouts.connect),u.onprogress=function(){l||p()},"onreadystatechange"in u&&(u.onreadystatechange=function(){!l&&u.readyState>1&&p()}),u.onload=function(){if(o)return;var e;clearTimeout(i);try{e={body:JSON.parse(u.responseText),responseText:u.responseText,statusCode:u.status,headers:u.getAllResponseHeaders&&u.getAllResponseHeaders()||{}}}catch(t){e=new a.UnparsableJSON({more:u.responseText})}e instanceof a.UnparsableJSON?n(e):r(e)},u.onerror=function(e){if(o)return;clearTimeout(i),n(new a.Network({more:e}))},u instanceof XMLHttpRequest?(u.open(t.method,e,!0),t.forceAuthHeaders&&(u.setRequestHeader("x-algolia-application-id",t.headers["x-algolia-application-id"]),u.setRequestHeader("x-algolia-api-key",t.headers["x-algolia-api-key"]))):u.open(t.method,e),f.cors&&(c&&("POST"===t.method?u.setRequestHeader("content-type","application/x-www-form-urlencoded"):u.setRequestHeader("content-type","application/json")),u.setRequestHeader("accept","application/json")),c?u.send(c):u.send()}else n(new a.Network("CORS not supported"));function h(){o=!0,u.abort(),n(new a.RequestTimeout)}function p(){l=!0,clearTimeout(i),i=setTimeout(h,t.timeouts.complete)}}))},h.prototype._request.fallback=function(e,t){return e=s(e,t.headers),new i((function(r,n){c(e,t,(function(e,t){e?n(e):r(t)}))}))},h.prototype._promise={reject:function(e){return i.reject(e)},resolve:function(e){return i.resolve(e)},delay:function(e){return new i((function(t){setTimeout(t,e)}))},all:function(e){return i.all(e)}},l}},function(e,t,r){(function(t){var r;r="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},e.exports=r}).call(this,r(15))},function(e,t,r){(function(t,r){
/*!
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
* @version v4.2.8+1e68dce6
*/var n;n=function(){"use strict";function e(e){return"function"==typeof e}var n=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=0,o=void 0,a=void 0,s=function(e,t){d[i]=e,d[i+1]=t,2===(i+=2)&&(a?a(y):w())},c="undefined"!=typeof window?window:void 0,u=c||{},l=u.MutationObserver||u.WebKitMutationObserver,f="undefined"==typeof self&&void 0!==t&&"[object process]"==={}.toString.call(t),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function p(){var e=setTimeout;return function(){return e(y,1)}}var d=new Array(1e3);function y(){for(var e=0;e<i;e+=2)(0,d[e])(d[e+1]),d[e]=void 0,d[e+1]=void 0;i=0}var m,g,v,b,w=void 0;function _(e,t){var r=this,n=new this.constructor(O);void 0===n[R]&&U(n);var i=r._state;if(i){var o=arguments[i-1];s((function(){return D(i,n,o,r._result)}))}else I(r,n,e,t);return n}function j(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(O);return E(t,e),t}f?w=function(){return t.nextTick(y)}:l?(g=0,v=new l(y),b=document.createTextNode(""),v.observe(b,{characterData:!0}),w=function(){b.data=g=++g%2}):h?((m=new MessageChannel).port1.onmessage=y,w=function(){return m.port2.postMessage(0)}):w=void 0===c?function(){try{var e=Function("return this")().require("vertx");return void 0!==(o=e.runOnLoop||e.runOnContext)?function(){o(y)}:p()}catch(e){return p()}}():p();var R=Math.random().toString(36).substring(2);function O(){}var P=void 0,x=1,T=2;function S(t,r,n){r.constructor===t.constructor&&n===_&&r.constructor.resolve===j?function(e,t){t._state===x?A(e,t._result):t._state===T?k(e,t._result):I(t,void 0,(function(t){return E(e,t)}),(function(t){return k(e,t)}))}(t,r):void 0===n?A(t,r):e(n)?function(e,t,r){s((function(e){var n=!1,i=function(e,t,r,n){try{e.call(t,r,n)}catch(e){return e}}(r,t,(function(r){n||(n=!0,t!==r?E(e,r):A(e,r))}),(function(t){n||(n=!0,k(e,t))}),e._label);!n&&i&&(n=!0,k(e,i))}),e)}(t,r,n):A(t,r)}function E(e,t){if(e===t)k(e,new TypeError("You cannot resolve a promise with itself"));else if(i=typeof(n=t),null===n||"object"!==i&&"function"!==i)A(e,t);else{var r=void 0;try{r=t.then}catch(t){return void k(e,t)}S(e,t,r)}var n,i}function F(e){e._onerror&&e._onerror(e._result),C(e)}function A(e,t){e._state===P&&(e._result=t,e._state=x,0!==e._subscribers.length&&s(C,e))}function k(e,t){e._state===P&&(e._state=T,e._result=t,s(F,e))}function I(e,t,r,n){var i=e._subscribers,o=i.length;e._onerror=null,i[o]=t,i[o+x]=r,i[o+T]=n,0===o&&e._state&&s(C,e)}function C(e){var t=e._subscribers,r=e._state;if(0!==t.length){for(var n=void 0,i=void 0,o=e._result,a=0;a<t.length;a+=3)n=t[a],i=t[a+r],n?D(r,n,i,o):i(o);e._subscribers.length=0}}function D(t,r,n,i){var o=e(n),a=void 0,s=void 0,c=!0;if(o){try{a=n(i)}catch(e){c=!1,s=e}if(r===a)return void k(r,new TypeError("A promises callback cannot return that same promise."))}else a=i;r._state!==P||(o&&c?E(r,a):!1===c?k(r,s):t===x?A(r,a):t===T&&k(r,a))}var N=0;function U(e){e[R]=N++,e._state=void 0,e._result=void 0,e._subscribers=[]}var H=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(O),this.promise[R]||U(this.promise),n(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?A(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&A(this.promise,this._result))):k(this.promise,new Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(e){for(var t=0;this._state===P&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var r=this._instanceConstructor,n=r.resolve;if(n===j){var i=void 0,o=void 0,a=!1;try{i=e.then}catch(e){a=!0,o=e}if(i===_&&e._state!==P)this._settledAt(e._state,t,e._result);else if("function"!=typeof i)this._remaining--,this._result[t]=e;else if(r===q){var s=new r(O);a?k(s,o):S(s,e,i),this._willSettleAt(s,t)}else this._willSettleAt(new r((function(t){return t(e)})),t)}else this._willSettleAt(n(e),t)},e.prototype._settledAt=function(e,t,r){var n=this.promise;n._state===P&&(this._remaining--,e===T?k(n,r):this._result[t]=r),0===this._remaining&&A(n,this._result)},e.prototype._willSettleAt=function(e,t){var r=this;I(e,void 0,(function(e){return r._settledAt(x,t,e)}),(function(e){return r._settledAt(T,t,e)}))},e}(),q=function(){function t(e){this[R]=N++,this._result=this._state=void 0,this._subscribers=[],O!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof t?function(e,t){try{t((function(t){E(e,t)}),(function(t){k(e,t)}))}catch(t){k(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return t.prototype.catch=function(e){return this.then(null,e)},t.prototype.finally=function(t){var r=this.constructor;return e(t)?this.then((function(e){return r.resolve(t()).then((function(){return e}))}),(function(e){return r.resolve(t()).then((function(){throw e}))})):this.then(t,t)},t}();return q.prototype.then=_,q.all=function(e){return new H(this,e).promise},q.race=function(e){var t=this;return n(e)?new t((function(r,n){for(var i=e.length,o=0;o<i;o++)t.resolve(e[o]).then(r,n)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))},q.resolve=j,q.reject=function(e){var t=new this(O);return k(t,e),t},q._setScheduler=function(e){a=e},q._setAsap=function(e){s=e},q._asap=s,q.polyfill=function(){var e=void 0;if(void 0!==r)e=r;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=q},q.Promise=q,q},e.exports=n()}).call(this,r(14),r(15))},function(e,t,r){"use strict";e.exports=function(e,t){/\?/.test(e)?e+="&":e+="?";return e+n(t)};var n=r(28)},function(e,t,r){"use strict";e.exports=function(e,t,r){if("GET"!==t.method)return void r(new Error("Method "+t.method+" "+e+" is not supported by JSONP."));t.debug("JSONP: start");var o=!1,a=!1;i+=1;var s=document.getElementsByTagName("head")[0],c=document.createElement("script"),u="algoliaJSONP_"+i,l=!1;window[u]=function(e){!function(){try{delete window[u],delete window[u+"_loaded"]}catch(e){window[u]=window[u+"_loaded"]=void 0}}(),a?t.debug("JSONP: Late answer, ignoring"):(o=!0,p(),r(null,{body:e,responseText:JSON.stringify(e)}))},e+="&callback="+u,t.jsonBody&&t.jsonBody.params&&(e+="&"+t.jsonBody.params);var f=setTimeout((function(){t.debug("JSONP: Script timeout"),a=!0,p(),r(new n.RequestTimeout)}),t.timeouts.complete);function h(){t.debug("JSONP: success"),l||a||(l=!0,o||(t.debug("JSONP: Fail. Script loaded but did not call the callback"),p(),r(new n.JSONPScriptFail)))}function p(){clearTimeout(f),c.onload=null,c.onreadystatechange=null,c.onerror=null,s.removeChild(c)}c.onreadystatechange=function(){"loaded"!==this.readyState&&"complete"!==this.readyState||h()},c.onload=h,c.onerror=function(){t.debug("JSONP: Script error"),l||a||(p(),r(new n.JSONPScriptError))},c.async=!0,c.defer=!0,c.src=e,s.appendChild(c)};var n=r(5),i=0},function(e,t,r){e.exports=function(e){return function(t,o,a){var s=r(3);(a=a&&s(a)||{}).hosts=a.hosts||["places-dsn.algolia.net","places-1.algolianet.com","places-2.algolianet.com","places-3.algolianet.com"],0!==arguments.length&&"object"!=typeof t&&void 0!==t||(t="",o="",a._allowEmptyCredentials=!0);var c=e(t,o,a),u=c.initIndex("places");return u.search=i("query","/1/places/query"),u.reverse=function(e,t){var r=n.encode(e);return this.as._jsonRequest({method:"GET",url:"/1/places/reverse?"+r,hostType:"read",callback:t})},u.getObject=function(e,t){return this.as._jsonRequest({method:"GET",url:"/1/places/"+encodeURIComponent(e),hostType:"read",callback:t})},u}};var n=r(59),i=r(23)},function(e,t,r){"use strict";t.decode=t.parse=r(60),t.encode=t.stringify=r(28)},function(e,t,r){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,r,o){t=t||"&",r=r||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var c=1e3;o&&"number"==typeof o.maxKeys&&(c=o.maxKeys);var u=e.length;c>0&&u>c&&(u=c);for(var l=0;l<u;++l){var f,h,p,d,y=e[l].replace(s,"%20"),m=y.indexOf(r);m>=0?(f=y.substr(0,m),h=y.substr(m+1)):(f=y,h=""),p=decodeURIComponent(f),d=decodeURIComponent(h),n(a,p)?i(a[p])?a[p].push(d):a[p]=[a[p],d]:a[p]=d}return a};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,r){"use strict";e.exports="3.35.1"},function(e,t,r){"use strict";var n=r(29),i=r(31),o=r(69),a=r(70),s=r(9),c=r(34),u=r(18),l=r(35);function f(e,t,r){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+l+")"),this.setClient(e);var i=r||{};i.index=t,this.state=n.make(i),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0}function h(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function p(){return this.state.page}c(f,s.EventEmitter),f.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},f.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},f.prototype.getQuery=function(){var e=this.state;return a._getHitsSearchParams(e)},f.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,n=a._getQueries(r.index,r),o=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),!t)return this.client.search(n).then((function(e){return o._currentNbQueries--,0===o._currentNbQueries&&o.emit("searchQueueEmpty"),{content:new i(r,e.results),state:r,_originalResponse:e}}),(function(e){throw o._currentNbQueries--,0===o._currentNbQueries&&o.emit("searchQueueEmpty"),e}));this.client.search(n).then((function(e){o._currentNbQueries--,0===o._currentNbQueries&&o.emit("searchQueueEmpty"),t(null,new i(r,e.results),r)})).catch((function(e){o._currentNbQueries--,0===o._currentNbQueries&&o.emit("searchQueueEmpty"),t(e,null,r)}))},f.prototype.searchForFacetValues=function(e,t,r,n){var i="function"==typeof this.client.searchForFacetValues;if(!i&&"function"!=typeof this.client.initIndex)throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var o=this.state.setQueryParameters(n||{}),s=o.isDisjunctiveFacet(e),c=a.getSearchForFacetQuery(e,t,r,o);this._currentNbQueries++;var u=this;return this.emit("searchForFacetValues",{state:o,facet:e,query:t}),(i?this.client.searchForFacetValues([{indexName:o.index,params:c}]):this.client.initIndex(o.index).searchForFacetValues(c)).then((function(t){return u._currentNbQueries--,0===u._currentNbQueries&&u.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits.forEach((function(t){t.isRefined=s?o.isDisjunctiveFacetRefined(e,t.value):o.isFacetRefined(e,t.value)})),t}),(function(e){throw u._currentNbQueries--,0===u._currentNbQueries&&u.emit("searchQueueEmpty"),e}))},f.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},f.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},f.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},f.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},f.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},f.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},f.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this},f.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},f.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},f.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},f.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},f.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},f.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this},f.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},f.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},f.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},f.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},f.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},f.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},f.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},f.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},f.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},f.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},f.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},f.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},f.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},f.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},f.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},f.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},f.prototype.setCurrentPage=h,f.prototype.setPage=h,f.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},f.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},f.prototype.setState=function(e){return this._change({state:n.make(e),isPageReset:!1}),this},f.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new n(e),this},f.prototype.hasRefinements=function(e){return!!u(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},f.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},f.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},f.prototype.hasTag=function(e){return this.state.isTagRefined(e)},f.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},f.prototype.getIndex=function(){return this.state.index},f.prototype.getCurrentPage=p,f.prototype.getPage=p,f.prototype.getTags=function(){return this.state.tagRefinements},f.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e))this.state.getConjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"conjunctive"})})),this.state.getExcludeRefinements(e).forEach((function(e){t.push({value:e,type:"exclude"})}));else if(this.state.isDisjunctiveFacet(e)){this.state.getDisjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"disjunctive"})}))}var r=this.state.getNumericRefinements(e);return Object.keys(r).forEach((function(e){var n=r[e];t.push({value:n,operator:e,type:"numeric"})})),t},f.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},f.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},f.prototype._search=function(e){var t=this.state,r=[],n=[];e.onlyWithDerivedHelpers||(n=a._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(e){var n=e.getModifiedState(t),i=a._getQueries(n.index,n);return r.push({state:n,queriesCount:i.length,helper:e}),e.emit("search",{state:n,results:e.lastResults}),i})),o=Array.prototype.concat.apply(n,i),s=this._queryId++;this._currentNbQueries++;try{this.client.search(o).then(this._dispatchAlgoliaResponse.bind(this,r,s)).catch(this._dispatchAlgoliaError.bind(this,s))}catch(e){this.emit("error",{error:e})}},f.prototype._dispatchAlgoliaResponse=function(e,t,r){if(!(t<this._lastQueryIdReceived)){this._currentNbQueries-=t-this._lastQueryIdReceived,this._lastQueryIdReceived=t,0===this._currentNbQueries&&this.emit("searchQueueEmpty");var n=r.results.slice();e.forEach((function(e){var t=e.state,r=e.queriesCount,o=e.helper,a=n.splice(0,r),s=o.lastResults=new i(t,a);o.emit("result",{results:s,state:t})}))}},f.prototype._dispatchAlgoliaError=function(e,t){e<this._lastQueryIdReceived||(this._currentNbQueries-=e-this._lastQueryIdReceived,this._lastQueryIdReceived=e,this.emit("error",{error:t}),0===this._currentNbQueries&&this.emit("searchQueueEmpty"))},f.prototype.containsRefinement=function(e,t,r,n){return e||0!==t.length||0!==r.length||0!==n.length},f.prototype._hasDisjunctiveRefinements=function(e){return this.state.disjunctiveRefinements[e]&&this.state.disjunctiveRefinements[e].length>0},f.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}))},f.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},f.prototype.setClient=function(e){return this.client===e?this:("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+l+")"),this.client=e,this)},f.prototype.getClient=function(){return this.client},f.prototype.derive=function(e){var t=new o(this,e);return this.derivedHelpers.push(t),t},f.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},f.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=f},function(e,t,r){"use strict";e.exports=function(e,t){return e.filter((function(r,n){return t.indexOf(r)>-1&&e.indexOf(r)===n}))}},function(e,t,r){"use strict";e.exports=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw new Error("The value should be a number, a parsable string or an array of those.")}},function(e,t,r){"use strict";var n=r(17),i=r(30),o=r(18),a={addRefinement:function(e,t,r){if(a.isRefined(e,t,r))return e;var i=""+r,o=e[t]?e[t].concat(i):[i],s={};return s[t]=o,n({},s,e)},removeRefinement:function(e,t,r){if(void 0===r)return a.clearRefinement(e,(function(e,r){return t===r}));var n=""+r;return a.clearRefinement(e,(function(e,r){return t===r&&n===e}))},toggleRefinement:function(e,t,r){if(void 0===r)throw new Error("toggleRefinement should be used with a value");return a.isRefined(e,t,r)?a.removeRefinement(e,t,r):a.addRefinement(e,t,r)},clearRefinement:function(e,t,r){if(void 0===t)return o(e)?{}:e;if("string"==typeof t)return i(e,t);if("function"==typeof t){var n=!1,a=Object.keys(e).reduce((function(i,o){var a=e[o]||[],s=a.filter((function(e){return!t(e,o,r)}));return s.length!==a.length&&(n=!0),i[o]=s,i}),{});return n?a:e}},isRefined:function(e,t,r){var n=!!e[t]&&e[t].length>0;if(void 0===r||!n)return n;var i=""+r;return-1!==e[t].indexOf(i)}};e.exports=a},function(e,t,r){"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},function(e,t,r){"use strict";e.exports=function(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(e,t,r){"use strict";e.exports=function(e){return function(t,r){var a=e.hierarchicalFacets[r],s=e.hierarchicalFacetsRefinements[a.name]&&e.hierarchicalFacetsRefinements[a.name][0]||"",c=e._getHierarchicalFacetSeparator(a),u=e._getHierarchicalRootPath(a),l=e._getHierarchicalShowParentLevel(a),f=o(e._getHierarchicalFacetSortBy(a)),h=t.every((function(e){return e.exhaustive})),p=function(e,t,r,o,a){return function(s,c,u){var l=s;if(u>0){var f=0;for(l=s;f<u;){var h=l&&Array.isArray(l.data)?l.data:[];l=i(h,(function(e){return e.isRefined})),f++}}if(l){var p=Object.keys(c.data).map((function(e){return[e,c.data[e]]})).filter((function(e){return function(e,t,r,n,i,o){if(i&&(0!==e.indexOf(i)||i===e))return!1;return!i&&-1===e.indexOf(n)||i&&e.split(n).length-i.split(n).length==1||-1===e.indexOf(n)&&-1===r.indexOf(n)||0===r.indexOf(e)||0===e.indexOf(t+n)&&(o||0===e.indexOf(r))}(e[0],l.path||r,a,t,r,o)}));l.data=n(p.map((function(e){var r=e[0];return function(e,t,r,n,i){var o=t.split(r);return{name:o[o.length-1].trim(),path:t,count:e,isRefined:n===t||0===n.indexOf(t+r),exhaustive:i,data:null}}(e[1],r,t,a,c.exhaustive)})),e[0],e[1])}return s}}(f,c,u,l,s),d=t;return u&&(d=t.slice(u.split(c).length)),d.reduce(p,{name:e.hierarchicalFacets[r].name,count:null,isRefined:!0,path:null,exhaustive:h,data:null})}};var n=r(32),i=r(11),o=r(33)},function(e,t,r){"use strict";var n=r(9);function i(e,t){this.main=e,this.fn=t,this.lastResults=null}r(34)(i,n.EventEmitter),i.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},i.prototype.getModifiedState=function(e){return this.fn(e)},e.exports=i},function(e,t,r){"use strict";var n=r(16),i={_getQueries:function(e,t){var r=[];return r.push({indexName:e,params:i._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach((function(n){r.push({indexName:e,params:i._getDisjunctiveFacetSearchParams(t,n)})})),t.getRefinedHierarchicalFacets().forEach((function(n){var o=t.getHierarchicalFacetByName(n),a=t.getHierarchicalRefinement(n),s=t._getHierarchicalFacetSeparator(o);a.length>0&&a[0].split(s).length>1&&r.push({indexName:e,params:i._getDisjunctiveFacetSearchParams(t,n,!0)})})),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(i._getHitsHierarchicalFacetsAttributes(e)),r=i._getFacetFilters(e),o=i._getNumericFilters(e),a={facets:t,tagFilters:i._getTagFilters(e)};return r.length>0&&(a.facetFilters=r),o.length>0&&(a.numericFilters=o),n({},e.getQueryParams(),a)},_getDisjunctiveFacetSearchParams:function(e,t,r){var o=i._getFacetFilters(e,t,r),a=i._getNumericFilters(e,t),s={hitsPerPage:1,page:0,attributesToRetrieve:[],attributesToHighlight:[],attributesToSnippet:[],tagFilters:i._getTagFilters(e),analytics:!1,clickAnalytics:!1},c=e.getHierarchicalFacetByName(t);return s.facets=c?i._getDisjunctiveHierarchicalFacetAttribute(e,c,r):t,a.length>0&&(s.numericFilters=a),o.length>0&&(s.facetFilters=o),n({},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(e){var o=i[e]||[];t!==n&&o.forEach((function(t){if(Array.isArray(t)){var i=t.map((function(t){return n+e+t}));r.push(i)}else r.push(n+e+t)}))}))})),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).forEach((function(e){(i[e]||[]).forEach((function(t){n.push(e+":"+t)}))}));var o=e.facetsExcludes||{};Object.keys(o).forEach((function(e){(o[e]||[]).forEach((function(t){n.push(e+":-"+t)}))}));var a=e.disjunctiveFacetsRefinements||{};Object.keys(a).forEach((function(e){var r=a[e]||[];if(e!==t&&r&&0!==r.length){var i=[];r.forEach((function(t){i.push(e+":"+t)})),n.push(i)}}));var s=e.hierarchicalFacetsRefinements||{};return Object.keys(s).forEach((function(i){var o=(s[i]||[])[0];if(void 0!==o){var a,c,u=e.getHierarchicalFacetByName(i),l=e._getHierarchicalFacetSeparator(u),f=e._getHierarchicalRootPath(u);if(t===i){if(-1===o.indexOf(l)||!f&&!0===r||f&&f.split(l).length===o.split(l).length)return;f?(c=f.split(l).length-1,o=f):(c=o.split(l).length-2,o=o.slice(0,o.lastIndexOf(l))),a=u.attributes[c]}else c=o.split(l).length-1,a=u.attributes[c];a&&n.push([a+":"+o])}})),n},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce((function(t,r){var n=e.getHierarchicalRefinement(r.name)[0];if(!n)return t.push(r.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(r),o=n.split(i).length,a=r.attributes.slice(0,o+1);return t.concat(a)}),[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var n=e._getHierarchicalFacetSeparator(t);if(!0===r){var i=e._getHierarchicalRootPath(t),o=0;return i&&(o=i.split(n).length),[t.attributes[o]]}var a=(e.getHierarchicalRefinement(t.name)[0]||"").split(n).length-1;return t.attributes.slice(0,a+1)},getSearchForFacetQuery:function(e,t,r,o){var a=o.isDisjunctiveFacet(e)?o.clearRefinements(e):o,s={facetQuery:t,facetName:e};return"number"==typeof r&&(s.maxFacetHits=r),n({},i._getHitsSearchParams(a),s)}};e.exports=i},function(e,t,r){"use strict";var n=r(36),i=r(37),o={brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},a=Date.prototype.toISOString,s={delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,serializeDate:function(e){return a.call(e)},skipNulls:!1,strictNullHandling:!1},c=function e(t,r,i,o,a,c,u,l,f,h,p,d){var y=t;if("function"==typeof u)y=u(r,y);else if(y instanceof Date)y=h(y);else if(null===y){if(o)return c&&!d?c(r,s.encoder):r;y=""}if("string"==typeof y||"number"==typeof y||"boolean"==typeof y||n.isBuffer(y))return c?[p(d?r:c(r,s.encoder))+"="+p(c(y,s.encoder))]:[p(r)+"="+p(String(y))];var m,g=[];if(void 0===y)return g;if(Array.isArray(u))m=u;else{var v=Object.keys(y);m=l?v.sort(l):v}for(var b=0;b<m.length;++b){var w=m[b];a&&null===y[w]||(g=Array.isArray(y)?g.concat(e(y[w],i(r,w),i,o,a,c,u,l,f,h,p,d)):g.concat(e(y[w],r+(f?"."+w:"["+w+"]"),i,o,a,c,u,l,f,h,p,d)))}return g};e.exports=function(e,t){var r=e,a=t?n.assign({},t):{};if(null!==a.encoder&&void 0!==a.encoder&&"function"!=typeof a.encoder)throw new TypeError("Encoder has to be a function.");var u=void 0===a.delimiter?s.delimiter:a.delimiter,l="boolean"==typeof a.strictNullHandling?a.strictNullHandling:s.strictNullHandling,f="boolean"==typeof a.skipNulls?a.skipNulls:s.skipNulls,h="boolean"==typeof a.encode?a.encode:s.encode,p="function"==typeof a.encoder?a.encoder:s.encoder,d="function"==typeof a.sort?a.sort:null,y=void 0!==a.allowDots&&a.allowDots,m="function"==typeof a.serializeDate?a.serializeDate:s.serializeDate,g="boolean"==typeof a.encodeValuesOnly?a.encodeValuesOnly:s.encodeValuesOnly;if(void 0===a.format)a.format=i.default;else if(!Object.prototype.hasOwnProperty.call(i.formatters,a.format))throw new TypeError("Unknown format option provided.");var v,b,w=i.formatters[a.format];"function"==typeof a.filter?r=(b=a.filter)("",r):Array.isArray(a.filter)&&(v=b=a.filter);var _,j=[];if("object"!=typeof r||null===r)return"";_=a.arrayFormat in o?a.arrayFormat:"indices"in a?a.indices?"indices":"repeat":"indices";var R=o[_];v||(v=Object.keys(r)),d&&v.sort(d);for(var O=0;O<v.length;++O){var P=v[O];f&&null===r[P]||(j=j.concat(c(r[P],P,R,l,f,h?p:null,b,d,y,m,w,g)))}var x=j.join(u),T=!0===a.addQueryPrefix?"?":"";return x.length>0?T+x:""}},function(e,t,r){"use strict";var n=r(36),i=Object.prototype.hasOwnProperty,o={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:n.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},a=function(e,t,r){if(e){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,a=/(\[[^[\]]*])/.exec(n),s=a?n.slice(0,a.index):n,c=[];if(s){if(!r.plainObjects&&i.call(Object.prototype,s)&&!r.allowPrototypes)return;c.push(s)}for(var u=0;null!==(a=o.exec(n))&&u<r.depth;){if(u+=1,!r.plainObjects&&i.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(a[1])}return a&&c.push("["+n.slice(a.index)+"]"),function(e,t,r){for(var n=t,i=e.length-1;i>=0;--i){var o,a=e[i];if("[]"===a)o=(o=[]).concat(n);else{o=r.plainObjects?Object.create(null):{};var s="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,c=parseInt(s,10);!isNaN(c)&&a!==s&&String(c)===s&&c>=0&&r.parseArrays&&c<=r.arrayLimit?(o=[])[c]=n:o[s]=n}n=o}return n}(c,t,r)}};e.exports=function(e,t){var r=t?n.assign({},t):{};if(null!==r.decoder&&void 0!==r.decoder&&"function"!=typeof r.decoder)throw new TypeError("Decoder has to be a function.");if(r.ignoreQueryPrefix=!0===r.ignoreQueryPrefix,r.delimiter="string"==typeof r.delimiter||n.isRegExp(r.delimiter)?r.delimiter:o.delimiter,r.depth="number"==typeof r.depth?r.depth:o.depth,r.arrayLimit="number"==typeof r.arrayLimit?r.arrayLimit:o.arrayLimit,r.parseArrays=!1!==r.parseArrays,r.decoder="function"==typeof r.decoder?r.decoder:o.decoder,r.allowDots="boolean"==typeof r.allowDots?r.allowDots:o.allowDots,r.plainObjects="boolean"==typeof r.plainObjects?r.plainObjects:o.plainObjects,r.allowPrototypes="boolean"==typeof r.allowPrototypes?r.allowPrototypes:o.allowPrototypes,r.parameterLimit="number"==typeof r.parameterLimit?r.parameterLimit:o.parameterLimit,r.strictNullHandling="boolean"==typeof r.strictNullHandling?r.strictNullHandling:o.strictNullHandling,""===e||null==e)return r.plainObjects?Object.create(null):{};for(var s="string"==typeof e?function(e,t){for(var r={},n=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=t.parameterLimit===1/0?void 0:t.parameterLimit,s=n.split(t.delimiter,a),c=0;c<s.length;++c){var u,l,f=s[c],h=f.indexOf("]="),p=-1===h?f.indexOf("="):h+1;-1===p?(u=t.decoder(f,o.decoder),l=t.strictNullHandling?null:""):(u=t.decoder(f.slice(0,p),o.decoder),l=t.decoder(f.slice(p+1),o.decoder)),i.call(r,u)?r[u]=[].concat(r[u]).concat(l):r[u]=l}return r}(e,r):e,c=r.plainObjects?Object.create(null):{},u=Object.keys(s),l=0;l<u.length;++l){var f=u[l],h=a(f,s[f],r);c=n.merge(c,h,r)}return n.compact(c)}},function(e,t,r){"use strict";var n=r(74);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,r,i,o,a){if(a!==n){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return r.PropTypes=r,r}},function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,r){!function(e){var t=/\S/,r=/\"/g,n=/\n/g,i=/\r/g,o=/\\/g,a=/\u2028/,s=/\u2029/;function c(e){"}"===e.n.substr(e.n.length-1)&&(e.n=e.n.substring(0,e.n.length-1))}function u(e){return e.trim?e.trim():e.replace(/^\s*|\s*$/g,"")}function l(e,t,r){if(t.charAt(r)!=e.charAt(0))return!1;for(var n=1,i=e.length;n<i;n++)if(t.charAt(r+n)!=e.charAt(n))return!1;return!0}e.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},e.scan=function(r,n){var i=r.length,o=0,a=null,s=null,f="",h=[],p=!1,d=0,y=0,m="{{",g="}}";function v(){f.length>0&&(h.push({tag:"_t",text:new String(f)}),f="")}function b(r,n){if(v(),r&&function(){for(var r=!0,n=y;n<h.length;n++)if(!(r=e.tags[h[n].tag]<e.tags._v||"_t"==h[n].tag&&null===h[n].text.match(t)))return!1;return r}())for(var i,o=y;o<h.length;o++)h[o].text&&((i=h[o+1])&&">"==i.tag&&(i.indent=h[o].text.toString()),h.splice(o,1));else n||h.push({tag:"\n"});p=!1,y=h.length}function w(e,t){var r="="+g,n=e.indexOf(r,t),i=u(e.substring(e.indexOf("=",t)+1,n)).split(" ");return m=i[0],g=i[i.length-1],n+r.length-1}for(n&&(n=n.split(" "),m=n[0],g=n[1]),d=0;d<i;d++)0==o?l(m,r,d)?(--d,v(),o=1):"\n"==r.charAt(d)?b(p):f+=r.charAt(d):1==o?(d+=m.length-1,"="==(a=(s=e.tags[r.charAt(d+1)])?r.charAt(d+1):"_v")?(d=w(r,d),o=0):(s&&d++,o=2),p=d):l(g,r,d)?(h.push({tag:a,n:u(f),otag:m,ctag:g,i:"/"==a?p-m.length:d+g.length}),f="",d+=g.length-1,o=0,"{"==a&&("}}"==g?d++:c(h[h.length-1]))):f+=r.charAt(d);return b(p,!0),h};var f={_t:!0,"\n":!0,$:!0,"/":!0};function h(e,t){for(var r=0,n=t.length;r<n;r++)if(t[r].o==e.n)return e.tag="#",!0}function p(e,t,r){for(var n=0,i=r.length;n<i;n++)if(r[n].c==e&&r[n].o==t)return!0}function d(e){var t=[];for(var r in e.partials)t.push('"'+m(r)+'":{name:"'+m(e.partials[r].name)+'", '+d(e.partials[r])+"}");return"partials: {"+t.join(",")+"}, subs: "+function(e){var t=[];for(var r in e)t.push('"'+m(r)+'": function(c,p,t,i) {'+e[r]+"}");return"{ "+t.join(",")+" }"}(e.subs)}e.stringify=function(t,r,n){return"{code: function (c,p,i) { "+e.wrapMain(t.code)+" },"+d(t)+"}"};var y=0;function m(e){return e.replace(o,"\\\\").replace(r,'\\"').replace(n,"\\n").replace(i,"\\r").replace(a,"\\u2028").replace(s,"\\u2029")}function g(e){return~e.indexOf(".")?"d":"f"}function v(e,t){var r="<"+(t.prefix||"")+e.n+y++;return t.partials[r]={name:e.n,partials:{}},t.code+='t.b(t.rp("'+m(r)+'",c,p,"'+(e.indent||"")+'"));',r}function b(e,t){t.code+="t.b(t.t(t."+g(e.n)+'("'+m(e.n)+'",c,p,0)));'}function w(e){return"t.b("+e+");"}e.generate=function(t,r,n){y=0;var i={code:"",subs:{},partials:{}};return e.walk(t,i),n.asString?this.stringify(i,r,n):this.makeTemplate(i,r,n)},e.wrapMain=function(e){return'var t=this;t.b(i=i||"");'+e+"return t.fl();"},e.template=e.Template,e.makeTemplate=function(e,t,r){var n=this.makePartials(e);return n.code=new Function("c","p","i",this.wrapMain(e.code)),new this.template(n,t,this,r)},e.makePartials=function(e){var t,r={subs:{},partials:e.partials,name:e.name};for(t in r.partials)r.partials[t]=this.makePartials(r.partials[t]);for(t in e.subs)r.subs[t]=new Function("c","p","t","i",e.subs[t]);return r},e.codegen={"#":function(t,r){r.code+="if(t.s(t."+g(t.n)+'("'+m(t.n)+'",c,p,1),c,p,0,'+t.i+","+t.end+',"'+t.otag+" "+t.ctag+'")){t.rs(c,p,function(c,p,t){',e.walk(t.nodes,r),r.code+="});c.pop();}"},"^":function(t,r){r.code+="if(!t.s(t."+g(t.n)+'("'+m(t.n)+'",c,p,1),c,p,1,0,0,"")){',e.walk(t.nodes,r),r.code+="};"},">":v,"<":function(t,r){var n={partials:{},code:"",subs:{},inPartial:!0};e.walk(t.nodes,n);var i=r.partials[v(t,r)];i.subs=n.subs,i.partials=n.partials},$:function(t,r){var n={subs:{},code:"",partials:r.partials,prefix:t.n};e.walk(t.nodes,n),r.subs[t.n]=n.code,r.inPartial||(r.code+='t.sub("'+m(t.n)+'",c,p,i);')},"\n":function(e,t){t.code+=w('"\\n"'+(e.last?"":" + i"))},_v:function(e,t){t.code+="t.b(t.v(t."+g(e.n)+'("'+m(e.n)+'",c,p,0)));'},_t:function(e,t){t.code+=w('"'+m(e.text)+'"')},"{":b,"&":b},e.walk=function(t,r){for(var n,i=0,o=t.length;i<o;i++)(n=e.codegen[t[i].tag])&&n(t[i],r);return r},e.parse=function(t,r,n){return function t(r,n,i,o){var a,s=[],c=null,u=null;for(a=i[i.length-1];r.length>0;){if(u=r.shift(),a&&"<"==a.tag&&!(u.tag in f))throw new Error("Illegal content in < super tag.");if(e.tags[u.tag]<=e.tags.$||h(u,o))i.push(u),u.nodes=t(r,u.tag,i,o);else{if("/"==u.tag){if(0===i.length)throw new Error("Closing tag without opener: /"+u.n);if(c=i.pop(),u.n!=c.n&&!p(u.n,c.n,o))throw new Error("Nesting error: "+c.n+" vs. "+u.n);return c.end=u.i,s}"\n"==u.tag&&(u.last=0==r.length||"\n"==r[0].tag)}s.push(u)}if(i.length>0)throw new Error("missing closing tag: "+i.pop().n);return s}(t,0,[],(n=n||{}).sectionTags||[])},e.cache={},e.cacheKey=function(e,t){return[e,!!t.asString,!!t.disableLambda,t.delimiters,!!t.modelGet].join("||")},e.compile=function(t,r){r=r||{};var n=e.cacheKey(t,r),i=this.cache[n];if(i){var o=i.partials;for(var a in o)delete o[a].instance;return i}return i=this.generate(this.parse(this.scan(t,r.delimiters),t,r),t,r),this.cache[n]=i}}(t)},function(e,t,r){!function(e){function t(e,t,r){var n;return t&&"object"==typeof t&&(void 0!==t[e]?n=t[e]:r&&t.get&&"function"==typeof t.get&&(n=t.get(e))),n}e.Template=function(e,t,r,n){e=e||{},this.r=e.code||this.r,this.c=r,this.options=n||{},this.text=t||"",this.partials=e.partials||{},this.subs=e.subs||{},this.buf=""},e.Template.prototype={r:function(e,t,r){return""},v:function(e){return e=c(e),s.test(e)?e.replace(r,"&").replace(n,"<").replace(i,">").replace(o,"'").replace(a,"""):e},t:c,render:function(e,t,r){return this.ri([e],t||{},r)},ri:function(e,t,r){return this.r(e,t,r)},ep:function(e,t){var r=this.partials[e],n=t[r.name];if(r.instance&&r.base==n)return r.instance;if("string"==typeof n){if(!this.c)throw new Error("No compiler available.");n=this.c.compile(n,this.options)}if(!n)return null;if(this.partials[e].base=n,r.subs){for(key in t.stackText||(t.stackText={}),r.subs)t.stackText[key]||(t.stackText[key]=void 0!==this.activeSub&&t.stackText[this.activeSub]?t.stackText[this.activeSub]:this.text);n=function(e,t,r,n,i,o){function a(){}function s(){}var c;a.prototype=e,s.prototype=e.subs;var u=new a;for(c in u.subs=new s,u.subsText={},u.buf="",n=n||{},u.stackSubs=n,u.subsText=o,t)n[c]||(n[c]=t[c]);for(c in n)u.subs[c]=n[c];for(c in i=i||{},u.stackPartials=i,r)i[c]||(i[c]=r[c]);for(c in i)u.partials[c]=i[c];return u}(n,r.subs,r.partials,this.stackSubs,this.stackPartials,t.stackText)}return this.partials[e].instance=n,n},rp:function(e,t,r,n){var i=this.ep(e,r);return i?i.ri(t,r,n):""},rs:function(e,t,r){var n=e[e.length-1];if(u(n))for(var i=0;i<n.length;i++)e.push(n[i]),r(e,t,this),e.pop();else r(e,t,this)},s:function(e,t,r,n,i,o,a){var s;return(!u(e)||0!==e.length)&&("function"==typeof e&&(e=this.ms(e,t,r,n,i,o,a)),s=!!e,!n&&s&&t&&t.push("object"==typeof e?e:t[t.length-1]),s)},d:function(e,r,n,i){var o,a=e.split("."),s=this.f(a[0],r,n,i),c=this.options.modelGet,l=null;if("."===e&&u(r[r.length-2]))s=r[r.length-1];else for(var f=1;f<a.length;f++)void 0!==(o=t(a[f],s,c))?(l=s,s=o):s="";return!(i&&!s)&&(i||"function"!=typeof s||(r.push(l),s=this.mv(s,r,n),r.pop()),s)},f:function(e,r,n,i){for(var o=!1,a=!1,s=this.options.modelGet,c=r.length-1;c>=0;c--)if(void 0!==(o=t(e,r[c],s))){a=!0;break}return a?(i||"function"!=typeof o||(o=this.mv(o,r,n)),o):!i&&""},ls:function(e,t,r,n,i){var o=this.options.delimiters;return this.options.delimiters=i,this.b(this.ct(c(e.call(t,n)),t,r)),this.options.delimiters=o,!1},ct:function(e,t,r){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(e,this.options).render(t,r)},b:function(e){this.buf+=e},fl:function(){var e=this.buf;return this.buf="",e},ms:function(e,t,r,n,i,o,a){var s,c=t[t.length-1],u=e.call(c);return"function"==typeof u?!!n||(s=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(u,c,r,s.substring(i,o),a)):u},mv:function(e,t,r){var n=t[t.length-1],i=e.call(n);return"function"==typeof i?this.ct(c(i.call(n)),n,r):i},sub:function(e,t,r,n){var i=this.subs[e];i&&(this.activeSub=e,i(t,r,this,n),this.activeSub=!1)}};var r=/&/g,n=/</g,i=/>/g,o=/\'/g,a=/\"/g,s=/[&<>\"\']/;function c(e){return String(null==e?"":e)}var u=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}}(t)},function(e,t,r){"use strict";r.r(t);r(40),r(41),r(42);var n=r(2),i=r.n(n),o=r(9),a=r.n(o),s=function(e){var t=e.name,r=e.connector;return["https://www.algolia.com/doc/api-reference/widgets/",t,"/js/",void 0!==r&&r?"#connector":""].join("")},c=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.map((function(e){return s(e)})).join(", ");return function(e){return[e,"See documentation: ".concat(n)].filter(Boolean).join("\n\n")}};var u=function(e,t){if(!Array.isArray(e))return-1;for(var r=0;r<e.length;r++)if(t(e[r]))return r;return-1};var l=function(e){return e.filter((function(e,t,r){return r.indexOf(e)===t}))};function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(r,!0).forEach((function(t){p(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var y=function(e,t){t.facets,t.disjunctiveFacets,t.facetsRefinements,t.facetsExcludes,t.disjunctiveFacetsRefinements,t.numericRefinements,t.tagRefinements,t.hierarchicalFacets,t.hierarchicalFacetsRefinements,t.ruleContexts;var r=d(t,["facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements","ruleContexts"]);return e.setQueryParameters(r)},m=function(e,t){return t.facets.reduce((function(e,t){return e.addFacet(t)}),e)},g=function(e,t){return t.disjunctiveFacets.reduce((function(e,t){return e.addDisjunctiveFacet(t)}),e)},v=function(e,t){return e.setQueryParameters({hierarchicalFacets:t.hierarchicalFacets.reduce((function(e,t){var r=u(e,(function(e){return e.name===t.name}));if(-1===r)return e.concat(t);var n=e.slice();return n.splice(r,1,t),n}),e.hierarchicalFacets)})},b=function(e,t){return t.tagRefinements.reduce((function(e,t){return e.addTagRefinement(t)}),e)},w=function(e,t){return e.setQueryParameters({facetsRefinements:h({},e.facetsRefinements,{},t.facetsRefinements)})},_=function(e,t){return e.setQueryParameters({facetsExcludes:h({},e.facetsExcludes,{},t.facetsExcludes)})},j=function(e,t){return e.setQueryParameters({disjunctiveFacetsRefinements:h({},e.disjunctiveFacetsRefinements,{},t.disjunctiveFacetsRefinements)})},R=function(e,t){return e.setQueryParameters({numericRefinements:h({},e.numericRefinements,{},t.numericRefinements)})},O=function(e,t){return e.setQueryParameters({hierarchicalFacetsRefinements:h({},e.hierarchicalFacetsRefinements,{},t.hierarchicalFacetsRefinements)})},P=function(e,t){var r=l([].concat(e.ruleContexts).concat(t.ruleContexts).filter(Boolean));return r.length>0?e.setQueryParameters({ruleContexts:r}):e},x=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.reduce((function(e,t){var r=O(e,t),n=v(r,t),i=b(n,t),o=R(i,t),a=j(o,t),s=_(a,t),c=w(s,t),u=g(c,t),l=P(u,t),f=m(l,t);return y(f,t)}))},T=function(e){for(var t=e.getParent(),r=[e.getHelper().state];null!==t;)r=[t.getHelper().state].concat(r),t=t.getParent();return r};function S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function E(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function F(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function A(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var k=c({name:"index"});function I(e){return"ais.index"===e.$$type}function C(e,t){return e.filter((function(e){return!I(e)})).reduce((function(e,r){return r.getWidgetState?r.getWidgetState(e,t):e}),{})}function D(e,t){var r=t.initialSearchParameters,n=A(t,["initialSearchParameters"]);return e.filter((function(e){return!I(e)})).reduce((function(e,t){return t.getWidgetSearchParameters?t.getWidgetSearchParameters(e,n):e}),r)}function N(e){var t=e.getParent();return function e(t){return t.filter(I).reduce((function(t,r){return t.concat.apply(t,[{indexId:r.getIndexId(),results:r.getResults(),helper:r.getHelper()}].concat(F(e(r.getWidgets()))))}),[])}(t?t.getWidgets():[e])}var U=function(e){if(void 0===e||void 0===e.indexName)throw new Error(k("The `indexName` option is required."));var t=e.indexName,r=e.indexId,n=void 0===r?t:r,o=[],a={},s=null,c=null,u=null,l=null,f=function(e){return s._createURL(E({},n,C(o,{searchParameters:e,helper:u})))};return{$$type:"ais.index",getIndexName:function(){return t},getIndexId:function(){return n},getHelper:function(){return u},getResults:function(){return l&&l.lastResults},getParent:function(){return c},getWidgets:function(){return o},addWidgets:function(e){var t=this;if(!Array.isArray(e))throw new Error(k("The `addWidgets` method expects an array of widgets."));if(e.some((function(e){return"function"!=typeof e.init&&"function"!=typeof e.render})))throw new Error(k("The widget definition expects a `render` and/or an `init` method."));return o=o.concat(e),s&&Boolean(e.length)&&(u.setState(D(o,{uiState:a,initialSearchParameters:u.state})),e.forEach((function(e){s&&e.init&&e.init({helper:u,parent:t,uiState:{},instantSearchInstance:s,state:u.state,templatesConfig:s.templatesConfig,createURL:f})})),s.scheduleSearch()),this},removeWidgets:function(e){if(!Array.isArray(e))throw new Error(k("The `removeWidgets` method expects an array of widgets."));if(e.some((function(e){return"function"!=typeof e.dispose})))throw new Error(k("The widget definition expects a `dispose` method."));if(o=o.filter((function(t){return-1===e.indexOf(t)})),s&&Boolean(e.length)){var t=e.reduce((function(e,t){return t.dispose({helper:u,state:e})||e}),u.state);a=C(o,{searchParameters:t,helper:u}),u.setState(D(o,{uiState:a,initialSearchParameters:t})),o.length&&s.scheduleSearch()}return this},init:function(e){var r=this,h=e.instantSearchInstance,p=e.parent,d=e.uiState;s=h,c=p,a=d[n]||{};var y=h.mainHelper,m=D(o,{uiState:a,initialSearchParameters:new i.a.SearchParameters({index:t})});(u=i()({},m.index,m)).search=function(){return y.search()},u.searchForFacetValues=function(e,t,r,n){var i=u.state.setQueryParameters(n);return y.searchForFacetValues(e,t,r,i)},l=y.derive((function(){return x.apply(void 0,F(T(r)))})),u.on("change",(function(e){e.isPageReset&&function e(t){var r=t.filter(I);0!==r.length&&r.forEach((function(t){var r=t.getHelper();r.setState(r.state.resetPage()),e(t.getWidgets())}))}(o)})),l.on("search",(function(){h.scheduleStalledRender()})),l.on("result",(function(e){var t=e.results;h.scheduleRender(),u.lastResults=t})),o.forEach((function(e){e.init&&e.init({uiState:d,helper:u,parent:r,instantSearchInstance:h,state:u.state,templatesConfig:h.templatesConfig,createURL:f})})),u.on("change",(function(e){var t=e.state;a=C(o,{searchParameters:t,helper:u}),h.onStateChange()}))},render:function(e){var t=this,r=e.instantSearchInstance;o.forEach((function(e){e.render&&l.lastResults&&e.render({helper:u,instantSearchInstance:r,results:l.lastResults,scopedResults:N(t),state:l.lastResults._state,templatesConfig:r.templatesConfig,createURL:f,searchMetadata:{isSearchStalled:r._isSearchStalled}})}))},dispose:function(){o.forEach((function(e){e.dispose&&e.dispose({helper:u,state:u.state})})),s=null,c=null,u.removeAllListeners(),u=null,l.detach(),l=null},getWidgetState:function(e){return o.filter(I).reduce((function(e,t){return t.getWidgetState(e)}),function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?S(r,!0).forEach((function(t){E(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e,E({},this.getIndexId(),a)))}}};function H(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function q(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function L(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Q=function(){function e(t){var r=t.router,n=t.stateMapping,i=t.instantSearchInstance;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),L(this,"instantSearchInstance",void 0),L(this,"router",void 0),L(this,"stateMapping",void 0),this.router=r,this.stateMapping=n,this.instantSearchInstance=i,this.createURL=this.createURL.bind(this)}var t,r,n;return t=e,(r=[{key:"read",value:function(){var e=this.router.read();return this.stateMapping.routeToState(e)}},{key:"write",value:function(e){var t=e.state,r=this.stateMapping.stateToRoute(t);this.router.write(r)}},{key:"subscribe",value:function(){var e=this;this.router.onUpdate((function(t){var r=e.stateMapping.routeToState(t);!function e(t,r){r(t),t.getWidgets().filter((function(e){return"ais.index"===e.$$type})).forEach((function(t){e(t,r)}))}(e.instantSearchInstance.mainIndex,(function(t){var n=t.getWidgets(),i=r[t.getIndexId()]||{},o=n.reduce((function(e,t){return t.getWidgetSearchParameters?t.getWidgetSearchParameters(e,{uiState:i}):e}),t.getHelper().state);t.getHelper().overrideStateWithoutTriggeringChangeEvent(o),e.instantSearchInstance.scheduleSearch()}))}))}},{key:"dispose",value:function(){this.router.dispose()}},{key:"createURL",value:function(e){var t=Object.keys(e).reduce((function(t,r){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?H(r,!0).forEach((function(t){L(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},t,L({},r,e[r]))}),this.instantSearchInstance.mainIndex.getWidgetState({})),r=this.stateMapping.stateToRoute(t);return this.router.createURL(r)}}])&&q(t.prototype,r),n&&q(t,n),e}();function K(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?K(r,!0).forEach((function(t){B(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):K(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function B(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function W(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function J(e){e.configure;return W(e,["configure"])}var $=r(20),V=r.n($);function G(e,t,r){return(G=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&z(i,r.prototype),i}).apply(null,arguments)}function z(e,t){return(z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function X(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Z=function(e){var t=e.qsModule,r=e.routeState,n=e.location,i=n.protocol,o=n.hostname,a=n.port,s=void 0===a?"":a,c=n.pathname,u=n.hash,l=t.stringify(r),f=""===s?"":":".concat(s);return l?"".concat(i,"//").concat(o).concat(f).concat(c,"?").concat(l).concat(u):"".concat(i,"//").concat(o).concat(f).concat(c).concat(u)},ee=function(e){var t=e.qsModule,r=e.location;return t.parse(r.search.slice(1),{arrayLimit:99})},te=function(e){e&&(window.document.title=e)},re=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.windowTitle,n=t.writeDelay,i=void 0===n?400:n,o=t.createURL,a=void 0===o?Z:o,s=t.parseURL,c=void 0===s?ee:s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Y(this,"windowTitle",void 0),Y(this,"writeDelay",void 0),Y(this,"_createURL",void 0),Y(this,"parseURL",void 0),Y(this,"writeTimer",void 0),this.windowTitle=r,this.writeTimer=void 0,this.writeDelay=i,this._createURL=a,this.parseURL=c;var u=this.windowTitle&&this.windowTitle(this.read());te(u)}var t,r,n;return t=e,(r=[{key:"read",value:function(){return this.parseURL({qsModule:V.a,location:window.location})}},{key:"write",value:function(e){var t=this,r=this.createURL(e),n=this.windowTitle&&this.windowTitle(e);this.writeTimer&&window.clearTimeout(this.writeTimer),this.writeTimer=window.setTimeout((function(){te(n),window.history.pushState(e,n||"",r),t.writeTimer=void 0}),this.writeDelay)}},{key:"onUpdate",value:function(e){var t=this;this._onPopState=function(r){t.writeTimer&&(window.clearTimeout(t.writeTimer),t.writeTimer=void 0);var n=r.state;e(n||t.read())},window.addEventListener("popstate",this._onPopState)}},{key:"createURL",value:function(e){return this._createURL({qsModule:V.a,routeState:e,location:window.location})}},{key:"dispose",value:function(){this._onPopState&&window.removeEventListener("popstate",this._onPopState),this.writeTimer&&window.clearTimeout(this.writeTimer),this.write({})}}])&&X(t.prototype,r),n&&X(t,n),e}(),ne=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return G(re,t)},ie="4.0.0";var oe=function(e,t){return t.split(".").reduce((function(e,t){return e&&e[t]}),e)},ae={"&":"&","<":"<",">":">",'"':""","'":"'"},se=/[&<>"']/g,ce=RegExp(se.source);var ue=function(e){return e&&ce.test(e)?e.replace(se,(function(e){return ae[e]})):e};function le(e){return(le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var fe=function(e){if(!function(e){return"object"===le(e)&&null!==e}(e)||"[object Object]"!==function(e){return null===e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}(e))return!1;if(null===Object.getPrototypeOf(e))return!0;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t};function he(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function pe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?he(r,!0).forEach((function(t){de(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):he(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function de(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ye={highlightPreTag:"__ais-highlight__",highlightPostTag:"__/ais-highlight__"},me={highlightPreTag:"<mark>",highlightPostTag:"</mark>"};function ge(e){return ue(e).replace(new RegExp(ye.highlightPreTag,"g"),me.highlightPreTag).replace(new RegExp(ye.highlightPostTag,"g"),me.highlightPostTag)}function ve(e){return fe(e)&&"string"!=typeof e.value?Object.keys(e).reduce((function(t,r){return pe({},t,de({},r,ve(e[r])))}),{}):Array.isArray(e)?e.map(ve):pe({},e,{value:ge(e.value)})}function be(e){return void 0===e.__escaped&&((e=e.map((function(e){return e._highlightResult&&(e._highlightResult=ve(e._highlightResult)),e._snippetResult&&(e._snippetResult=ve(e._snippetResult)),e}))).__escaped=!0),e}var we=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.descendantName,n=t.modifierName,i=r?"-".concat(r):"",o=n?"--".concat(n):"";return"".concat("ais","-").concat(e).concat(i).concat(o)}},_e=we("Highlight");function je(e){var t=e.attribute,r=e.highlightedTagName,n=void 0===r?"mark":r,i=e.hit,o=oe(i,"_highlightResult.".concat(t,".value"))||"",a=_e({descendantName:"highlighted"});return o.replace(new RegExp(me.highlightPreTag,"g"),"<".concat(n,' class="').concat(a,'">')).replace(new RegExp(me.highlightPostTag,"g"),"</".concat(n,">"))}var Re=we("Snippet");function Oe(e){var t=e.attribute,r=e.highlightedTagName,n=void 0===r?"mark":r,i=e.hit,o=oe(i,"_snippetResult.".concat(t,".value"))||"",a=Re({descendantName:"highlighted"});return o.replace(new RegExp(me.highlightPreTag,"g"),"<".concat(n,' class="').concat(a,'">')).replace(new RegExp(me.highlightPostTag,"g"),"</".concat(n,">"))}function Pe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function xe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pe(r,!0).forEach((function(t){Te(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pe(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Te(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Se(e){var t=e.numberLocale;return{formatNumber:function(e,r){return Number(r(e)).toLocaleString(t)},highlight:function(e,t){try{return t(je(xe({},JSON.parse(e),{hit:this})))}catch(e){throw new Error('\nThe highlight helper expects a JSON object of the format:\n{ "attribute": "name", "highlightedTagName": "mark" }')}},snippet:function(e,t){try{return t(Oe(xe({},JSON.parse(e),{hit:this})))}catch(e){throw new Error('\nThe snippet helper expects a JSON object of the format:\n{ "attribute": "name", "highlightedTagName": "mark" }')}}}}var Ee=Promise.resolve(),Fe=function(e){var t=null,r=!1,n=function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];null===t&&(t=Ee.then((function(){t=null,r?r=!1:e.apply(void 0,i)})))};return n.wait=function(){if(null===t)throw new Error("The deferred function should be called before calling `wait()`");return t},n.cancel=function(){null!==t&&(r=!0)},n};var Ae=function(){};function ke(e){return(ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ce(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ie(r,!0).forEach((function(t){qe(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ie(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function De(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ne(e){return(Ne=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ue(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function He(e,t){return(He=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Le=c({name:"instantsearch"});function Qe(){return"#"}var Ke=function(e){function t(e){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=function(e,t){return!t||"object"!==ke(t)&&"function"!=typeof t?Ue(e):t}(this,Ne(t).call(this)),qe(Ue(r),"client",void 0),qe(Ue(r),"indexName",void 0),qe(Ue(r),"insightsClient",void 0),qe(Ue(r),"helper",void 0),qe(Ue(r),"mainHelper",void 0),qe(Ue(r),"mainIndex",void 0),qe(Ue(r),"started",void 0),qe(Ue(r),"templatesConfig",void 0),qe(Ue(r),"_stalledSearchDelay",void 0),qe(Ue(r),"_searchStalledTimer",void 0),qe(Ue(r),"_isSearchStalled",void 0),qe(Ue(r),"_initialUiState",void 0),qe(Ue(r),"_createURL",void 0),qe(Ue(r),"_searchFunction",void 0),qe(Ue(r),"_mainHelperSearch",void 0),qe(Ue(r),"_routingManager",void 0),qe(Ue(r),"scheduleSearch",Fe((function(){r.mainHelper.search()}))),qe(Ue(r),"scheduleRender",Fe((function(){r.mainHelper.hasPendingRequests()||(clearTimeout(r._searchStalledTimer),r._searchStalledTimer=null,r._isSearchStalled=!1),r.mainIndex.render({instantSearchInstance:Ue(r)}),r.emit("render")}))),qe(Ue(r),"onStateChange",(function(){var e=r.mainIndex.getWidgetState({});r._routingManager&&r._routingManager.write({state:e})}));var n=e.indexName,i=void 0===n?null:n,o=e.numberLocale,a=e.initialUiState,s=void 0===a?{}:a,c=e.routing,u=void 0===c?null:c,l=e.searchFunction,f=e.stalledSearchDelay,h=void 0===f?200:f,p=e.searchClient,d=void 0===p?null:p,y=e.insightsClient,m=void 0===y?null:y;if(null===i)throw new Error(Le("The `indexName` option is required."));if(null===d)throw new Error(Le("The `searchClient` option is required."));if(void 0!==e.urlSync)throw new Error(Le("The `urlSync` option was removed in InstantSearch.js 3. You may want to use the `routing` option."));if("function"!=typeof d.search)throw new Error("The `searchClient` must implement a `search` method.\n\nSee: https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/backend-instantsearch/js/");if("function"==typeof d.addAlgoliaAgent&&d.addAlgoliaAgent("instantsearch.js (".concat(ie,")")),m&&"function"!=typeof m)throw new Error(Le("The `insightsClient` option should be a function."));r.client=d,r.insightsClient=m,r.indexName=i,r.helper=null,r.mainHelper=null,r.mainIndex=U({indexName:i}),r.started=!1,r.templatesConfig={helpers:Se({numberLocale:o}),compileOptions:{}},r._stalledSearchDelay=h,r._searchStalledTimer=null,r._isSearchStalled=!1,r._createURL=Qe,r._initialUiState=s,l&&(r._searchFunction=l);var g={stateMapping:{stateToRoute:function(e){return Object.keys(e).reduce((function(t,r){return M({},t,B({},r,J(e[r])))}),{})},routeToState:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,r){return M({},t,B({},r,J(e[r])))}),{})}},router:ne()},v=null;return!0===u?v=g:fe(u)&&(v=Ce({},g,{},u)),v&&(r._routingManager=new Q(Ce({},v,{instantSearchInstance:Ue(r)})),r._createURL=r._routingManager.createURL,r._initialUiState=Ce({},s,{},r._routingManager.read())),r}var r,n,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&He(e,t)}(t,e),r=t,(n=[{key:"addWidget",value:function(e){return this.addWidgets([e])}},{key:"addWidgets",value:function(e){if(!Array.isArray(e))throw new Error(Le("The `addWidgets` method expects an array of widgets. Please use `addWidget`."));if(e.some((function(e){return"function"!=typeof e.init&&"function"!=typeof e.render})))throw new Error(Le("The widget definition expects a `render` and/or an `init` method."));return this.mainIndex.addWidgets(e),this}},{key:"removeWidget",value:function(e){return this.removeWidgets([e])}},{key:"removeWidgets",value:function(e){if(!Array.isArray(e))throw new Error(Le("The `removeWidgets` method expects an array of widgets. Please use `removeWidget`."));if(e.some((function(e){return"function"!=typeof e.dispose})))throw new Error(Le("The widget definition expects a `dispose` method."));return this.mainIndex.removeWidgets(e),this}},{key:"start",value:function(){var e=this;if(this.started)throw new Error(Le("The `start` method has already been called once."));var t=i()(this.client,this.indexName);if(t.search=function(){return t.searchOnlyWithDerivedHelpers()},this._searchFunction){var r={search:function(){return new Promise(Ae)}};this._mainHelperSearch=t.search.bind(t),t.search=function(){var n=e.mainIndex.getHelper(),o=i()(r,n.state.index,n.state);return o.once("search",(function(t){var r=t.state;n.overrideStateWithoutTriggeringChangeEvent(r),e._mainHelperSearch()})),o.on("change",(function(e){var t=e.state;n.setState(t)})),e._searchFunction(o),t}}t.on("error",(function(t){var r=t.error;e.emit("error",{error:r})})),this.mainHelper=t,this.mainIndex.init({instantSearchInstance:this,parent:null,uiState:this._initialUiState}),this._routingManager&&this._routingManager.subscribe(),t.search(),this.helper=this.mainIndex.getHelper(),this.started=!0}},{key:"dispose",value:function(){this.scheduleSearch.cancel(),this.scheduleRender.cancel(),clearTimeout(this._searchStalledTimer),this.removeWidgets(this.mainIndex.getWidgets()),this.mainIndex.dispose(),this.started=!1,this.removeAllListeners(),this.mainHelper.removeAllListeners(),this.mainHelper=null,this.helper=null,this._routingManager&&this._routingManager.dispose()}},{key:"scheduleStalledRender",value:function(){var e=this;this._searchStalledTimer||(this._searchStalledTimer=setTimeout((function(){e._isSearchStalled=!0,e.scheduleRender()}),this._stalledSearchDelay))}},{key:"createURL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.started)throw new Error(Le("The `start` method needs to be called before `createURL`."));return this._createURL(e)}},{key:"refresh",value:function(){if(!this.mainHelper)throw new Error(Le("The `start` method needs to be called before `refresh`."));this.mainHelper.clearCache().search()}}])&&De(r.prototype,n),o&&De(r,o),t}(a.a),Me=function(e){return new Ke(e)};Me.version=ie,Me.snippet=Oe,Me.highlight=je,Object.defineProperty(Me,"widgets",{get:function(){throw new ReferenceError("\"instantsearch.widgets\" are not available from the ES build.\n\nTo import the widgets:\n\nimport { searchBox } from 'instantsearch.js/es/widgets'")}}),Object.defineProperty(Me,"connectors",{get:function(){throw new ReferenceError("\"instantsearch.connectors\" are not available from the ES build.\n\nTo import the connectors:\n\nimport { connectSearchBox } from 'instantsearch.js/es/connectors'")}});var Be=Me,We=r(19),Je=r.n(We);function $e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ve(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$e(r,!0).forEach((function(t){Ge(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$e(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ge(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ze=c({name:"configure",connector:!0});function Xe(e,t){return e.setQueryParameters(Object.keys(t.searchParameters).reduce((function(e,t){return Ve({},e,Ge({},t,void 0))}),{}))}var Ye,Ze,et,tt,rt,nt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ae,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ae;return function(r){if(!r||!fe(r.searchParameters))throw new Error(ze("The `searchParameters` option expects an object."));var n={};return{$$type:"ais.configure",init:function(t){var o=t.instantSearchInstance,a=t.helper;n.refine=function(e){return function(t){var n=Xe(e.state,r),o=x(n,new i.a.SearchParameters(t));e.setState(o).search(),r.searchParameters=t}}(a),e({refine:n.refine,instantSearchInstance:o,widgetParams:r},!0)},render:function(t){var i=t.instantSearchInstance;e({refine:n.refine,instantSearchInstance:i,widgetParams:r},!1)},dispose:function(e){var n=e.state;return t(),Xe(n,r)},getWidgetSearchParameters:function(e,t){var n=t.uiState;return x(e,new i.a.SearchParameters(Ve({},n.configure,{},r.searchParameters)))},getWidgetState:function(e){return Ve({},e,{configure:Ve({},e.configure,{},r.searchParameters)})}}}},it=function(e){return nt()({searchParameters:e})},ot={},at=[],st=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i;function ct(e,t){for(var r in t)e[r]=t[r];return e}function ut(e){var t=e.parentNode;t&&t.removeChild(e)}function lt(e,t,r){var n,i,o,a,s=arguments;if(t=ct({},t),arguments.length>3)for(r=[r],n=3;n<arguments.length;n++)r.push(s[n]);if(null!=r&&(t.children=r),null!=e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===t[i]&&(t[i]=e.defaultProps[i]);return a=t.key,null!=(o=t.ref)&&delete t.ref,null!=a&&delete t.key,ft(e,t,a,o)}function ft(e,t,r,n){var i={type:e,props:t,key:r,ref:n,__k:null,__p:null,__b:0,__e:null,l:null,__c:null,constructor:void 0};return Ye.vnode&&Ye.vnode(i),i}function ht(e){return e.children}function pt(e,t){this.props=e,this.context=t}function dt(e,t){if(null==t)return e.__p?dt(e.__p,e.__p.__k.indexOf(e)+1):null;for(var r;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e)return r.__e;return"function"==typeof e.type?dt(e):null}function yt(e){var t,r;if(null!=(e=e.__p)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e){e.__e=e.__c.base=r.__e;break}return yt(e)}}function mt(e){(!e.__d&&(e.__d=!0)&&1===Ze.push(e)||tt!==Ye.debounceRendering)&&(tt=Ye.debounceRendering,(Ye.debounceRendering||et)(gt))}function gt(){var e,t,r,n,i,o,a;for(Ze.sort((function(e,t){return t.__v.__b-e.__v.__b}));e=Ze.pop();)e.__d&&(r=void 0,n=void 0,o=(i=(t=e).__v).__e,(a=t.__P)&&(r=[],n=Rt(a,i,ct({},i),t.__n,void 0!==a.ownerSVGElement,null,r,null==o?dt(i):o),Ot(r,i),n!=o&&yt(i)))}function vt(e,t,r,n,i,o,a,s,c){var u,l,f,h,p,d,y,m=r&&r.__k||at,g=m.length;if(s==ot&&(s=null!=o?o[0]:g?dt(r,0):null),u=0,t.__k=bt(t.__k,(function(r){if(null!=r){if(r.__p=t,r.__b=t.__b+1,null===(f=m[u])||f&&r.key==f.key&&r.type===f.type)m[u]=void 0;else for(l=0;l<g;l++){if((f=m[l])&&r.key==f.key&&r.type===f.type){m[l]=void 0;break}f=null}if(h=Rt(e,r,f=f||ot,n,i,o,a,s,c),(l=r.ref)&&f.ref!=l&&(y||(y=[])).push(l,r.__c||h,r),null!=h){if(null==d&&(d=h),null!=r.l)h=r.l,r.l=null;else if(o==f||h!=s||null==h.parentNode){e:if(null==s||s.parentNode!==e)e.appendChild(h);else{for(p=s,l=0;(p=p.nextSibling)&&l<g;l+=2)if(p==h)break e;e.insertBefore(h,s)}"option"==t.type&&(e.value="")}s=h.nextSibling,"function"==typeof t.type&&(t.l=h)}}return u++,r})),t.__e=d,null!=o&&"function"!=typeof t.type)for(u=o.length;u--;)null!=o[u]&&ut(o[u]);for(u=g;u--;)null!=m[u]&&Tt(m[u],m[u]);if(y)for(u=0;u<y.length;u++)xt(y[u],y[++u],y[++u])}function bt(e,t,r){if(null==r&&(r=[]),null==e||"boolean"==typeof e)t&&r.push(t(null));else if(Array.isArray(e))for(var n=0;n<e.length;n++)bt(e[n],t,r);else r.push(t?t(function(e){if(null==e||"boolean"==typeof e)return null;if("string"==typeof e||"number"==typeof e)return ft(null,e,null,null);if(null!=e.__e||null!=e.__c){var t=ft(e.type,e.props,e.key,null);return t.__e=e.__e,t}return e}(e)):e);return r}function wt(e,t,r){"-"===t[0]?e.setProperty(t,r):e[t]="number"==typeof r&&!1===st.test(t)?r+"px":null==r?"":r}function _t(e,t,r,n,i){var o,a,s,c,u;if("key"===(t=i?"className"===t?"class":t:"class"===t?"className":t)||"children"===t);else if("style"===t)if(o=e.style,"string"==typeof r)o.cssText=r;else{if("string"==typeof n&&(o.cssText="",n=null),n)for(a in n)r&&a in r||wt(o,a,"");if(r)for(s in r)n&&r[s]===n[s]||wt(o,s,r[s])}else"o"===t[0]&&"n"===t[1]?(c=t!==(t=t.replace(/Capture$/,"")),u=t.toLowerCase(),t=(u in e?u:t).slice(2),r?(n||e.addEventListener(t,jt,c),(e.u||(e.u={}))[t]=r):e.removeEventListener(t,jt,c)):"list"!==t&&"tagName"!==t&&"form"!==t&&!i&&t in e?e[t]=null==r?"":r:"function"!=typeof r&&"dangerouslySetInnerHTML"!==t&&(t!==(t=t.replace(/^xlink:?/,""))?null==r||!1===r?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),r):null==r||!1===r?e.removeAttribute(t):e.setAttribute(t,r))}function jt(e){return this.u[e.type](Ye.event?Ye.event(e):e)}function Rt(e,t,r,n,i,o,a,s,c){var u,l,f,h,p,d,y,m,g,v,b=t.type;if(void 0!==t.constructor)return null;(u=Ye.__b)&&u(t);try{e:if("function"==typeof b){if(m=t.props,g=(u=b.contextType)&&n[u.__c],v=u?g?g.props.value:u.__p:n,r.__c?y=(l=t.__c=r.__c).__p=l.__E:("prototype"in b&&b.prototype.render?t.__c=l=new b(m,v):(t.__c=l=new pt(m,v),l.constructor=b,l.render=St),g&&g.sub(l),l.props=m,l.state||(l.state={}),l.context=v,l.__n=n,f=l.__d=!0,l.__h=[]),null==l.__s&&(l.__s=l.state),null!=b.getDerivedStateFromProps&&ct(l.__s==l.state?l.__s=ct({},l.__s):l.__s,b.getDerivedStateFromProps(m,l.__s)),f)null==b.getDerivedStateFromProps&&null!=l.componentWillMount&&l.componentWillMount(),null!=l.componentDidMount&&a.push(l);else{if(null==b.getDerivedStateFromProps&&null==l.t&&null!=l.componentWillReceiveProps&&l.componentWillReceiveProps(m,v),!l.t&&null!=l.shouldComponentUpdate&&!1===l.shouldComponentUpdate(m,l.__s,v)){for(l.props=m,l.state=l.__s,l.__d=!1,l.__v=t,t.__e=r.__e,t.__k=r.__k,u=0;u<t.__k.length;u++)t.__k[u]&&(t.__k[u].__p=t);break e}null!=l.componentWillUpdate&&l.componentWillUpdate(m,l.__s,v)}h=l.props,p=l.state,l.context=v,l.props=m,l.state=l.__s,(u=Ye.__r)&&u(t),l.__d=!1,l.__v=t,l.__P=e,u=l.render(l.props,l.state,l.context),t.__k=bt(null!=u&&u.type==ht&&null==u.key?u.props.children:u),null!=l.getChildContext&&(n=ct(ct({},n),l.getChildContext())),f||null==l.getSnapshotBeforeUpdate||(d=l.getSnapshotBeforeUpdate(h,p)),vt(e,t,r,n,i,o,a,s,c),l.base=t.__e,u=l.__h,l.__h=[],u.some((function(e){e.call(l)})),f||null==h||null==l.componentDidUpdate||l.componentDidUpdate(h,p,d),y&&(l.__E=l.__p=null),l.t=null}else t.__e=Pt(r.__e,t,r,n,i,o,a,c);(u=Ye.diffed)&&u(t)}catch(e){Ye.__e(e,t,r)}return t.__e}function Ot(e,t){for(var r;r=e.pop();)try{r.componentDidMount()}catch(e){Ye.__e(e,r.__v)}Ye.__c&&Ye.__c(t)}function Pt(e,t,r,n,i,o,a,s){var c,u,l,f,h,p=r.props,d=t.props;if(i="svg"===t.type||i,null==e&&null!=o)for(c=0;c<o.length;c++)if(null!=(u=o[c])&&(null===t.type?3===u.nodeType:u.localName===t.type)){e=u,o[c]=null;break}if(null==e){if(null===t.type)return document.createTextNode(d);e=i?document.createElementNS("http://www.w3.org/2000/svg",t.type):document.createElement(t.type),o=null}if(null===t.type)null!=o&&(o[o.indexOf(e)]=null),p!==d&&(e.data=d);else if(t!==r){if(null!=o&&(o=at.slice.call(e.childNodes)),l=(p=r.props||ot).dangerouslySetInnerHTML,f=d.dangerouslySetInnerHTML,!s){if(p===ot)for(p={},h=0;h<e.attributes.length;h++)p[e.attributes[h].name]=e.attributes[h].value;(f||l)&&(f&&l&&f.__html==l.__html||(e.innerHTML=f&&f.__html||""))}(function(e,t,r,n,i){var o;for(o in r)o in t||_t(e,o,null,r[o],n);for(o in t)i&&"function"!=typeof t[o]||"value"===o||"checked"===o||r[o]===t[o]||_t(e,o,t[o],r[o],n)})(e,d,p,i,s),t.__k=t.props.children,f||vt(e,t,r,n,"foreignObject"!==t.type&&i,o,a,ot,s),s||("value"in d&&void 0!==d.value&&d.value!==e.value&&(e.value=null==d.value?"":d.value),"checked"in d&&void 0!==d.checked&&d.checked!==e.checked&&(e.checked=d.checked))}return e}function xt(e,t,r){try{"function"==typeof e?e(t):e.current=t}catch(e){Ye.__e(e,r)}}function Tt(e,t,r){var n,i,o;if(Ye.unmount&&Ye.unmount(e),(n=e.ref)&&xt(n,null,t),r||"function"==typeof e.type||(r=null!=(i=e.__e)),e.__e=e.l=null,null!=(n=e.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(e){Ye.__e(e,t)}n.base=n.__P=null}if(n=e.__k)for(o=0;o<n.length;o++)n[o]&&Tt(n[o],t,r);null!=i&&ut(i)}function St(e,t,r){return this.constructor(e,r)}function Et(e,t,r){var n,i,o;Ye.__p&&Ye.__p(e,t),i=(n=r===rt)?null:r&&r.__k||t.__k,e=lt(ht,null,[e]),o=[],Rt(t,n?t.__k=e:(r||t).__k=e,i||ot,ot,void 0!==t.ownerSVGElement,r&&!n?[r]:i?null:at.slice.call(t.childNodes),o,r||ot,n),Ot(o,e)}Ye={},pt.prototype.setState=function(e,t){var r=this.__s!==this.state&&this.__s||(this.__s=ct({},this.state));("function"!=typeof e||(e=e(r,this.props)))&&ct(r,e),null!=e&&this.__v&&(this.t=!1,t&&this.__h.push(t),mt(this))},pt.prototype.forceUpdate=function(e){this.__v&&(this.t=!0,e&&this.__h.push(e),mt(this))},pt.prototype.render=ht,Ze=[],et="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,tt=Ye.debounceRendering,Ye.__e=function(e,t,r){for(var n;t=t.__p;)if((n=t.__c)&&!n.__p)try{if(n.constructor&&null!=n.constructor.getDerivedStateFromError)n.setState(n.constructor.getDerivedStateFromError(e));else{if(null==n.componentDidCatch)continue;n.componentDidCatch(e)}return mt(n.__E=n)}catch(t){e=t}throw e},rt=ot;var Ft=r(4),At=r.n(Ft);function kt(e){return(kt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var It=function(e,t){if(void 0===e||"function"!=typeof e)throw new Error('The render function is not valid (got type "'.concat(kt(e),'").\n\n').concat(t))};function Ct(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Dt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Nt=function(e,t,r){return e.map((function(e,n){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ct(r,!0).forEach((function(t){Dt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ct(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e,{__position:r*t+n+1})}))};function Ut(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ht(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var qt=function(e,t){return t?e.map((function(e){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ut(r,!0).forEach((function(t){Ht(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ut(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e,{__queryID:t})})):e};function Lt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Qt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Lt(r,!0).forEach((function(t){Kt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lt(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Kt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Mt=c({name:"hits",connector:!0});function Bt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ae;return It(e,Mt()),function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=r.escapeHTML,i=void 0===n||n,o=r.transformItems,a=void 0===o?function(e){return e}:o;return{$$type:"ais.hits",init:function(t){var n=t.instantSearchInstance;e({hits:[],results:void 0,instantSearchInstance:n,widgetParams:r},!0)},render:function(t){var n=t.results,o=t.instantSearchInstance;i&&n.hits.length>0&&(n.hits=be(n.hits));var s=n.hits.__escaped;n.hits=Nt(n.hits,n.page,n.hitsPerPage),n.hits=qt(n.hits,n.queryID),n.hits=a(n.hits),n.hits.__escaped=s,e({hits:n.hits,results:n,instantSearchInstance:o,widgetParams:r},!1)},dispose:function(e){var r=e.state;return t(),i?r.setQueryParameters(Object.keys(ye).reduce((function(e,t){return Qt({},e,Kt({},t,void 0))}),{})):r},getWidgetSearchParameters:function(e){return i?e.setQueryParameters(ye):e}}}}r(38);function Wt(e){return e!==Object(e)}var Jt=function e(t,r){if(t===r)return!0;if(Wt(t)||Wt(r)||"function"==typeof t||"function"==typeof r)return t===r;if(Object.keys(t).length!==Object.keys(r).length)return!1;for(var n=0,i=Object.keys(t);n<i.length;n++){var o=i[n];if(!(o in r))return!1;if(!e(t[o],r[o]))return!1}return!0},$t=r(21),Vt=r.n($t);function Gt(e){return(Gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Xt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?zt(r,!0).forEach((function(t){Yt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zt(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Yt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Zt=function(e){var t=e.templates,r=e.templateKey,n=e.compileOptions,i=e.helpers,o=e.data,a=t[r],s=Gt(a),c="function"===s;if(!("string"===s)&&!c)throw new Error("Template must be 'string' or 'function', was '".concat(s,"' (key: ").concat(r,")"));if(c)return a(o);var u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;return Object.keys(e).reduce((function(n,i){return Xt({},n,Yt({},i,(function(){var n=this;return function(o){return e[i].call(r,o,(function(e){return Vt.a.compile(e,t).render(n)}))}})))}),{})}(i,n,o);return Vt.a.compile(a,n).render(Xt({},o,{helpers:u})).replace(/[ \n\r\t\f\xA0]+/g,(function(e){return e.replace(/(^|\xA0+)[^\xA0]+/g,"$1 ")})).trim()};function er(e){return(er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tr(){return(tr=Object.assign||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}).apply(this,arguments)}function rr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function nr(e,t){return!t||"object"!==er(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ir(e){return(ir=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function or(e,t){return(or=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ar=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),nr(this,ir(t).apply(this,arguments))}var r,n,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&or(e,t)}(t,e),r=t,(n=[{key:"shouldComponentUpdate",value:function(e){return!Jt(this.props.data,e.data)||this.props.templateKey!==e.templateKey||!Jt(this.props.rootProps,e.rootProps)}},{key:"render",value:function(){var e=this.props.rootTagName,t=this.props.useCustomCompileOptions[this.props.templateKey]?this.props.templatesConfig.compileOptions:{},r=Zt({templates:this.props.templates,templateKey:this.props.templateKey,compileOptions:t,helpers:this.props.templatesConfig.helpers,data:this.props.data});return null===r?null:lt(e,tr({},this.props.rootProps,{dangerouslySetInnerHTML:{__html:r}}))}}])&&rr(r.prototype,n),i&&rr(r,i),t}(pt);ar.defaultProps={data:{},rootTagName:"div",useCustomCompileOptions:{},templates:{},templatesConfig:{}};var sr=ar;function cr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ur(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cr(r,!0).forEach((function(t){lr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cr(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function lr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fr(){return(fr=Object.assign||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}).apply(this,arguments)}var hr=function(e){var t=e.results,r=e.hits,n=e.cssClasses,i=e.templateProps;return 0===t.hits.length?lt(sr,fr({},i,{templateKey:"empty",rootProps:{className:At()(n.root,n.emptyRoot)},data:t})):lt("div",{className:n.root},lt("ol",{className:n.list},r.map((function(e,t){return lt(sr,fr({},i,{templateKey:"item",rootTagName:"li",rootProps:{className:n.item},key:e.objectID,data:ur({},e,{__hitIndex:t})}))}))))};hr.defaultProps={results:{hits:[]},hits:[]};var pr=hr,dr={empty:"No results",item:function(e){return JSON.stringify(e,null,2)}};function yr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function mr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gr(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var vr=function(e){var t=e.defaultTemplates,r=e.templates;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yr(r,!0).forEach((function(t){mr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yr(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({templatesConfig:e.templatesConfig},function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l([].concat(gr(Object.keys(e)),gr(Object.keys(t)))).reduce((function(r,n){var i=e[n],o=t[n],a=void 0!==o&&o!==i;return r.templates[n]=a?o:i,r.useCustomCompileOptions[n]=a,r}),{templates:{},useCustomCompileOptions:{}})}(t,r))};var br=function(e){return e instanceof HTMLElement||Boolean(e)&&e.nodeType>0};var wr=function(e){var t="string"==typeof e,r=t?document.querySelector(e):e;if(!br(r)){var n="Container must be `string` or `HTMLElement`.";throw t&&(n+=" Unable to find ".concat(e)),new Error(n)}return r};var _r=function(e){return function(t){return lt("div",{onClick:function(e){if(e.target.hasAttribute("data-insights-method")){if(!t.insights)throw new Error("The `insightsClient` option has not been provided to `instantsearch`.");var r=function(e){var t=e.getAttribute("data-insights-method"),r=e.getAttribute("data-insights-payload");if("string"!=typeof r)throw new Error("The insights helper expects `data-insights-payload` to be a base64-encoded JSON string.");try{return{method:t,payload:JSON.parse(atob(r))}}catch(e){throw new Error("The insights helper was unable to parse `data-insights-payload`.")}}(e.target),n=r.method,i=r.payload;t.insights(n,i)}}},lt(e,t))}};var jr=function(e,t,r){return Array.prototype.find?e.find(t,r):e.filter(t,r)[0]};function Rr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Or(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Rr(r,!0).forEach((function(t){Pr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rr(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Pr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var xr=function(e){var t=e.method,r=e.results,n=e.hits,i=e.objectIDs,o=r.index,a=function(e,t){return t.map((function(t){var r=jr(e,(function(e){return e.objectID===t}));if(void 0===r)throw new Error('Could not find objectID "'.concat(t,'" passed to `clickedObjectIDsAfterSearch` in the returned hits. This is necessary to infer the absolute position and the query ID.'));return r}))}(n,i),s=function(e){var t=l(e.map((function(e){return e.__queryID})));if(t.length>1)throw new Error("Insights currently allows a single `queryID`. The `objectIDs` provided map to multiple `queryID`s.");var r=t[0];if("string"!=typeof r)throw new Error("Could not infer `queryID`. Ensure InstantSearch is configured with `clickAnalytics: true`");return r}(a);switch(t){case"clickedObjectIDsAfterSearch":return{index:o,queryID:s,objectIDs:i,positions:function(e){return e.map((function(e){return e.__position}))}(a)};case"convertedObjectIDsAfterSearch":return{index:o,queryID:s,objectIDs:i};default:throw new Error('Unsupported method passed to insights: "'.concat(t,'".'))}},Tr=function(e,t,r){return function(n,i){if(!Array.isArray(i.objectIDs))throw new TypeError("Expected `objectIDs` to be an array.");var o=xr({method:n,results:t,hits:r,objectIDs:i.objectIDs});e(n,Or({},o,{},i))}};function Sr(e){return function(t,r){return e(function(e){return function(t,r){var n=t.results,i=t.hits,o=t.instantSearchInstance;if(n&&i&&o&&o.insightsClient){var a=Tr(o.insightsClient,n,i);return e(Or({},t,{insights:a}),r)}return e(t,r)}}(t),r)}}var Er=c({name:"hits"}),Fr=we("Hits"),Ar=_r(pr),kr=function(e){var t=e.renderState,r=e.cssClasses,n=e.containerNode,i=e.templates;return function(e,o){var a=e.hits,s=e.results,c=e.instantSearchInstance,u=e.insights;o?t.templateProps=vr({defaultTemplates:dr,templatesConfig:c.templatesConfig,templates:i}):Et(lt(Ar,{cssClasses:r,hits:a,results:s,templateProps:t.templateProps,insights:u}),n)}};function Ir(e){return document.querySelector("#".concat(e,"-template")).innerHTML}!function(e){var t=document.getElementsByTagName("title")[0].text,r=document.getElementsByTagName("main")[0],n=document.createElement("div");n.setAttribute("id","related-posts"),r.appendChild(n);var i=Be({searchClient:Je()(e.appId,e.apiKey),appId:e.appId,apiKey:e.apiKey,indexName:e.indexName});i.addWidgets([it({hitsPerPage:10,facetFilters:["author:".concat(t)]})]),i.addWidget(function(e){var t=e.container,r=e.escapeHTML,n=e.transformItems,i=e.templates,o=void 0===i?dr:i,a=e.cssClasses,s=void 0===a?{}:a;if(!t)throw new Error(Er("The `container` option is required."));var c=wr(t),u={root:At()(Fr(),s.root),emptyRoot:At()(Fr({modifierName:"empty"}),s.emptyRoot),list:At()(Fr({descendantName:"list"}),s.list),item:At()(Fr({descendantName:"item"}),s.item)},l=kr({containerNode:c,cssClasses:u,renderState:{},templates:o});return Sr(Bt)(l,(function(){return Et(null,c)}))({escapeHTML:r,transformItems:n})}({container:"#related-posts",templates:{item:Ir("hit"),empty:Ir("no-results")}})),i.start()}({appId:"A8PL9E4TZT",apiKey:"c5f99b37bfef18fd6ad1c440b5abd6c9",indexName:"anfibiacreativa--helix-norddal"})}]);