diff --git a/CHANGELOG.md b/CHANGELOG.md index 0626c8cff..e61e2e1dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # CHANGELOG +## 1.0.1 + +- Fixed issue with merging JS files - added new line at the end of [algoliaBundle.min.js](https://github.com/algolia/algoliasearch-magento-2/blob/master/view/frontend/web/internals/algoliaBundle.min.js) +- Fixed page indexing when some excluded pages were set +- Fixed data types of `enabled` variables in `algoliaConfig` +- Fixed few typos + ## 1.0.0 - Release @@ -16,7 +23,7 @@ - Layout's XML files were rewritten and optimized - Extension's assets were removed and replaced by SVGs - Fixed CSS of autocomplete menu's footer (#55, #58) -- Instatnsearch.js library was updated to it's latest version (#56) +- Instantsearch.js library was updated to it's latest version (#56) - The extension officially supports only 2.0.X versions of Magento, however it's still possible and encouraged to use it on 2.1.0 (#53) - Fixed some annotations in code (#52, #51) diff --git a/Helper/AlgoliaHelper.php b/Helper/AlgoliaHelper.php index 581cf15d2..2a64d0072 100755 --- a/Helper/AlgoliaHelper.php +++ b/Helper/AlgoliaHelper.php @@ -194,7 +194,7 @@ private function checkClient($methodName) $this->resetCredentialsFromConfig(); if (!isset($this->client)) { - throw new AlgoliaException('Operation "' . $methodName . ' could not be performed because Algolia credetials were not provided.'); + throw new AlgoliaException('Operation "' . $methodName . ' could not be performed because Algolia credentials were not provided.'); } } } diff --git a/Helper/ConfigHelper.php b/Helper/ConfigHelper.php index 0b4552a29..20e9818b9 100755 --- a/Helper/ConfigHelper.php +++ b/Helper/ConfigHelper.php @@ -158,7 +158,7 @@ public function showSuggestionsOnNoResultsPage($storeId = null) public function isEnabledFrontEnd($storeId = null) { - // Frontend = Backend + Frontent + // Frontend = Backend + Frontend return (bool) $this->configInterface->getValue(self::ENABLE_BACKEND, ScopeInterface::SCOPE_STORE, $storeId) && (bool) $this->configInterface->getValue(self::ENABLE_FRONTEND, ScopeInterface::SCOPE_STORE, $storeId); } diff --git a/Helper/Data.php b/Helper/Data.php index 42a39be10..ec095a73b 100755 --- a/Helper/Data.php +++ b/Helper/Data.php @@ -164,9 +164,9 @@ public function rebuildStoreAdditionalSectionsIndex($storeId) return; } - $additionnal_sections = $this->configHelper->getAutocompleteSections(); + $additional_sections = $this->configHelper->getAutocompleteSections(); - foreach ($additionnal_sections as $section) { + foreach ($additional_sections as $section) { if ($section['name'] === 'products' || $section['name'] === 'categories' || $section['name'] === 'pages' || $section['name'] === 'suggestions') { continue; } diff --git a/Helper/Entity/CategoryHelper.php b/Helper/Entity/CategoryHelper.php index e0c09f33e..44da2065f 100755 --- a/Helper/Entity/CategoryHelper.php +++ b/Helper/Entity/CategoryHelper.php @@ -172,10 +172,10 @@ public function getObject(Category $category) foreach ($this->config->getCategoryAdditionalAttributes($storeId) as $attribute) { $value = $category->getData($attribute['attribute']); - $attribute_ressource = $category->getResource()->getAttribute($attribute['attribute']); + $attribute_resource = $category->getResource()->getAttribute($attribute['attribute']); - if ($attribute_ressource) { - $value = $attribute_ressource->getFrontend()->getValue($category); + if ($attribute_resource) { + $value = $attribute_resource->getFrontend()->getValue($category); } if (isset($data[$attribute['attribute']])) { diff --git a/Helper/Entity/PageHelper.php b/Helper/Entity/PageHelper.php index 359d50bce..f975eea04 100755 --- a/Helper/Entity/PageHelper.php +++ b/Helper/Entity/PageHelper.php @@ -28,7 +28,7 @@ public function getPages($storeId) $excluded_pages = array_values($this->config->getExcludedPages()); foreach ($excluded_pages as &$excluded_page) { - $excluded_page = $excluded_page['pages']; + $excluded_page = $excluded_page['attribute']; } $pages = []; diff --git a/Helper/Entity/ProductHelper.php b/Helper/Entity/ProductHelper.php index 6e9841bde..ec395ca81 100755 --- a/Helper/Entity/ProductHelper.php +++ b/Helper/Entity/ProductHelper.php @@ -291,7 +291,7 @@ public function setSettings($storeId, $saveToTmpIndicesToo = false) $synonymsToSet[] = [ 'objectID' => $objectID, 'type' => 'synonym', - 'synonyms' => $this->explodeSynomyms($synonym['synonyms']), + 'synonyms' => $this->explodeSynonyms($synonym['synonyms']), ]; } @@ -301,7 +301,7 @@ public function setSettings($storeId, $saveToTmpIndicesToo = false) 'objectID' => $objectID, 'type' => 'oneWaySynonym', 'input' => $onewaySynonym['input'], - 'synonyms' => $this->explodeSynomyms($onewaySynonym['synonyms']), + 'synonyms' => $this->explodeSynonyms($onewaySynonym['synonyms']), ]; } } @@ -800,7 +800,7 @@ public function getObject(Product $product) return $customData; } - private function explodeSynomyms($synonyms) + private function explodeSynonyms($synonyms) { return array_map('trim', explode(',', $synonyms)); } diff --git a/Model/Source/CustomPages.php b/Model/Source/CustomPages.php index 42beb178b..e48e9a71b 100755 --- a/Model/Source/CustomPages.php +++ b/Model/Source/CustomPages.php @@ -13,7 +13,7 @@ protected function getTableData() return [ 'attribute' => [ - 'label' => 'Attribute', + 'label' => 'Page', 'values' => function () use ($pageCollection) { $options = []; $magento_pages = $pageCollection->addFieldToFilter('is_active', 1); diff --git a/Model/Source/Sections.php b/Model/Source/Sections.php index 43d378328..c1addbce1 100755 --- a/Model/Source/Sections.php +++ b/Model/Source/Sections.php @@ -10,7 +10,7 @@ protected function getTableData() return [ 'name' => [ - 'label' => 'Attribute', + 'label' => 'Section', 'values' => function () use ($config) { $options = []; diff --git a/README.md b/README.md index ff74ebace..a81580956 100755 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This extension replaces the default search of Magento with a typo-tolerant, fast See features and benefits of [Algolia Search Extension for Magento](https://community.algolia.com/magento). -![Latest version](https://img.shields.io/badge/latest-1.0.0-green.svg) +![Latest version](https://img.shields.io/badge/latest-1.0.1-green.svg) ![Magento 2.0.X](https://img.shields.io/badge/Magento-2.0.X-blue.svg) ![PHP >= 5.5.22](https://img.shields.io/badge/PHP-%3E=5.5.22-green.svg) diff --git a/Setup/UpgradeSchema.php b/Setup/UpgradeSchema.php index c6ecfc9c8..2cd85644a 100644 --- a/Setup/UpgradeSchema.php +++ b/Setup/UpgradeSchema.php @@ -23,7 +23,7 @@ public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $con $table->addColumn('method', $table::TYPE_TEXT, 50, ['nullable' => false]); $table->addColumn('data', $table::TYPE_TEXT, 5000, ['nullable' => false]); $table->addColumn('max_retries', $table::TYPE_INTEGER, 11, ['nullable' => false, 'default' => 3]); - $table->addColumn('retries', $table::TYPE_INTEGER, 11, ['nullable' => false, 'defualt' => 0]); + $table->addColumn('retries', $table::TYPE_INTEGER, 11, ['nullable' => false, 'default' => 0]); $table->addColumn('error_log', $table::TYPE_TEXT, null, ['nullable' => false]); $table->addColumn('data_size', $table::TYPE_INTEGER, 11, ['nullable' => true, 'default' => null]); diff --git a/composer.json b/composer.json index e347f1e83..33a8aeeeb 100755 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "algolia/algoliasearch-magento-2", "description": "Algolia Search integration for Magento 2", "type": "magento2-module", - "version": "1.0.0", + "version": "1.0.1", "license": ["MIT"], "require": { "php": "~5.5.0|~5.6.0|~7.0.0", diff --git a/etc/module.xml b/etc/module.xml index 5e789918c..bb92e088a 100755 --- a/etc/module.xml +++ b/etc/module.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/i18n/en_US.csv b/i18n/en_US.csv index 63fc06538..2b1ed0845 100644 --- a/i18n/en_US.csv +++ b/i18n/en_US.csv @@ -493,7 +493,7 @@ Synonyms,Synonyms

Algolia offers more synonymys’ types - placeholders and alternative corrections. These types can be managed directly from your Algolia’s dashboard. - Any changes you will make to placeholders and alternative corrections in Algolia’s dashboard won’t be overriden. + Any changes you will make to placeholders and alternative corrections in Algolia’s dashboard won’t be overridden. "," diff --git a/view/frontend/templates/internals/configuration.phtml b/view/frontend/templates/internals/configuration.phtml index b6d8e6417..0e1ff97f7 100644 --- a/view/frontend/templates/internals/configuration.phtml +++ b/view/frontend/templates/internals/configuration.phtml @@ -91,12 +91,12 @@ if ($config->isInstantEnabled() && $isSearchPage) { $algoliaJsConfig = [ 'instant' => [ - 'enabled' => $config->isInstantEnabled(), + 'enabled' => (bool) $config->isInstantEnabled(), 'selector' => $config->getInstantSelector(), 'isAddToCartEnabled' => $config->isAddToCartEnable(), ], 'autocomplete' => [ - 'enabled' => $config->isAutoCompleteEnabled(), + 'enabled' => (bool) $config->isAutoCompleteEnabled(), 'selector' => $config->getAutocompleteSelector(), 'sections' => $config->getAutocompleteSections(), 'nbOfProductsSuggestions' => $config->getNumberOfProductsSuggestions(), diff --git a/view/frontend/web/autocomplete.js b/view/frontend/web/autocomplete.js index 9ddd2b5fc..3df2f62a8 100644 --- a/view/frontend/web/autocomplete.js +++ b/view/frontend/web/autocomplete.js @@ -16,7 +16,7 @@ requirejs(['algoliaBundle'], function(algoliaBundle) { products: algoliaBundle.Hogan.compile($('#autocomplete_products_template').html()), categories: algoliaBundle.Hogan.compile($('#autocomplete_categories_template').html()), pages: algoliaBundle.Hogan.compile($('#autocomplete_pages_template').html()), - additionnalSection: algoliaBundle.Hogan.compile($('#autocomplete_extra_template').html()) + additionalSection: algoliaBundle.Hogan.compile($('#autocomplete_extra_template').html()) }; /** diff --git a/view/frontend/web/instantsearch.js b/view/frontend/web/instantsearch.js index 86d51f53d..f085440a0 100644 --- a/view/frontend/web/instantsearch.js +++ b/view/frontend/web/instantsearch.js @@ -292,7 +292,7 @@ requirejs(['algoliaBundle'], function(algoliaBundle) { } }; - /** Add all facet widgets to instatnsearch object **/ + /** Add all facet widgets to instantsearch object **/ window.getFacetWidget = function (facet, templates) { diff --git a/view/frontend/web/internals/algoliaBundle.min.js b/view/frontend/web/internals/algoliaBundle.min.js index b3f050886..2b9a240e8 100644 --- a/view/frontend/web/internals/algoliaBundle.min.js +++ b/view/frontend/web/internals/algoliaBundle.min.js @@ -23,4 +23,4 @@ var n=void 0,r=e.data&&e.data.length>0;r&&(n=p["default"].createElement(t,c({},t start:l["default"].PropTypes.arrayOf(l["default"].PropTypes.number).isRequired,step:l["default"].PropTypes.number,tooltips:l["default"].PropTypes.oneOfType([l["default"].PropTypes.bool,l["default"].PropTypes.arrayOf(l["default"].PropTypes.shape({to:l["default"].PropTypes.func}))])},e.exports=d},function(e,t){var n,r,o;!function(i){r=[],n=i,o="function"==typeof n?n.apply(t,r):n,!(void 0!==o&&(e.exports=o))}(function(){"use strict";function e(e){return e.filter(function(e){return this[e]?!1:this[e]=!0},{})}function t(e,t){return Math.round(e/t)*t}function n(e){var t=e.getBoundingClientRect(),n=e.ownerDocument,r=n.documentElement,o=f();return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(o.x=0),{top:t.top+o.y-r.clientTop,left:t.left+o.x-r.clientLeft}}function r(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function o(e,t,n){u(e,t),setTimeout(function(){c(e,t)},n)}function i(e){return Math.max(Math.min(e,100),0)}function a(e){return Array.isArray(e)?e:[e]}function s(e){var t=e.split(".");return t.length>1?t[1].length:0}function u(e,t){e.classList?e.classList.add(t):e.className+=" "+t}function c(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function l(e,t){return e.classList?e.classList.contains(t):new RegExp("\\b"+t+"\\b").test(e.className)}function f(){var e=void 0!==window.pageXOffset,t="CSS1Compat"===(document.compatMode||""),n=e?window.pageXOffset:t?document.documentElement.scrollLeft:document.body.scrollLeft,r=e?window.pageYOffset:t?document.documentElement.scrollTop:document.body.scrollTop;return{x:n,y:r}}function p(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function d(e,t){return 100/(t-e)}function h(e,t){return 100*t/(e[1]-e[0])}function m(e,t){return h(e,e[0]<0?t+Math.abs(e[0]):t-e[0])}function v(e,t){return t*(e[1]-e[0])/100+e[0]}function g(e,t){for(var n=1;e>=t[n];)n+=1;return n}function y(e,t,n){if(n>=e.slice(-1)[0])return 100;var r,o,i,a,s=g(n,e);return r=e[s-1],o=e[s],i=t[s-1],a=t[s],i+m([r,o],n)/d(i,a)}function b(e,t,n){if(n>=100)return e.slice(-1)[0];var r,o,i,a,s=g(n,t);return r=e[s-1],o=e[s],i=t[s-1],a=t[s],v([r,o],(n-i)*d(i,a))}function x(e,n,r,o){if(100===o)return o;var i,a,s=g(o,e);return r?(i=e[s-1],a=e[s],o-i>(a-i)/2?a:i):n[s-1]?e[s-1]+t(o-e[s-1],n[s-1]):o}function _(e,t,n){var o;if("number"==typeof t&&(t=[t]),"[object Array]"!==Object.prototype.toString.call(t))throw new Error("noUiSlider: 'range' contains invalid value.");if(o="min"===e?0:"max"===e?100:parseFloat(e),!r(o)||!r(t[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");n.xPct.push(o),n.xVal.push(t[0]),o?n.xSteps.push(isNaN(t[1])?!1:t[1]):isNaN(t[1])||(n.xSteps[0]=t[1])}function w(e,t,n){return t?void(n.xSteps[e]=h([n.xVal[e],n.xVal[e+1]],t)/d(n.xPct[e],n.xPct[e+1])):!0}function C(e,t,n,r){this.xPct=[],this.xVal=[],this.xSteps=[r||!1],this.xNumSteps=[!1],this.snap=t,this.direction=n;var o,i=[];for(o in e)e.hasOwnProperty(o)&&i.push([e[o],o]);for(i.sort(i.length&&"object"==typeof i[0][0]?function(e,t){return e[0][0]-t[0][0]}:function(e,t){return e[0]-t[0]}),o=0;o2)throw new Error("noUiSlider: 'start' option is incorrect.");e.handles=t.length,e.start=t}function R(e,t){if(e.snap=t,"boolean"!=typeof t)throw new Error("noUiSlider: 'snap' option must be a boolean.")}function T(e,t){if(e.animate=t,"boolean"!=typeof t)throw new Error("noUiSlider: 'animate' option must be a boolean.")}function k(e,t){if(e.animationDuration=t,"number"!=typeof t)throw new Error("noUiSlider: 'animationDuration' option must be a number.")}function O(e,t){if("lower"===t&&1===e.handles)e.connect=1;else if("upper"===t&&1===e.handles)e.connect=2;else if(t===!0&&2===e.handles)e.connect=3;else{if(t!==!1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");e.connect=0}}function j(e,t){switch(t){case"horizontal":e.ort=0;break;case"vertical":e.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function N(e,t){if(!r(t))throw new Error("noUiSlider: 'margin' option must be numeric.");if(0!==t&&(e.margin=e.spectrum.getMargin(t),!e.margin))throw new Error("noUiSlider: 'margin' option is only supported on linear sliders.")}function A(e,t){if(!r(t))throw new Error("noUiSlider: 'limit' option must be numeric.");if(e.limit=e.spectrum.getMargin(t),!e.limit)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders.")}function M(e,t){switch(t){case"ltr":e.dir=0;break;case"rtl":e.dir=1,e.connect=[0,2,1,3][e.connect];break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function D(e,t){if("string"!=typeof t)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var n=t.indexOf("tap")>=0,r=t.indexOf("drag")>=0,o=t.indexOf("fixed")>=0,i=t.indexOf("snap")>=0,a=t.indexOf("hover")>=0;if(r&&!e.connect)throw new Error("noUiSlider: 'drag' behaviour must be used with 'connect': true.");e.events={tap:n||i,drag:r,fixed:o,snap:i,hover:a}}function F(e,t){var n;if(t!==!1)if(t===!0)for(e.tooltips=[],n=0;nr&&(o+=Math.abs(r)),o>100&&(r-=o-100),[i(r),i(o)]):[r,o]}function m(e,t){e.preventDefault();var n,r,o=0===e.type.indexOf("touch"),i=0===e.type.indexOf("mouse"),a=0===e.type.indexOf("pointer"),s=e;return 0===e.type.indexOf("MSPointer")&&(a=!0),o&&(n=e.changedTouches[0].pageX,r=e.changedTouches[0].pageY),t=t||f(),(i||a)&&(n=e.clientX+t.x,r=e.clientY+t.y),s.pageOffset=t,s.points=[n,r],s.cursor=i||a,s}function v(e,t){var n=document.createElement("div"),o=document.createElement("div"),i=[r.cssClasses.handleLower,r.cssClasses.handleUpper];return e&&i.reverse(),u(o,r.cssClasses.handle),u(o,i[t]),u(n,r.cssClasses.origin),n.appendChild(o),n}function g(e,t,n){switch(e){case 1:u(t,r.cssClasses.connect),u(n[0],r.cssClasses.background);break;case 3:u(n[1],r.cssClasses.background);case 2:u(n[0],r.cssClasses.connect);case 0:u(t,r.cssClasses.background)}}function y(e,t,n){var r,o=[];for(r=0;e>r;r+=1)o.push(n.appendChild(v(t,r)));return o}function b(e,t,n){u(n,r.cssClasses.target),0===e?u(n,r.cssClasses.ltr):u(n,r.cssClasses.rtl),0===t?u(n,r.cssClasses.horizontal):u(n,r.cssClasses.vertical);var o=document.createElement("div");return u(o,r.cssClasses.base),n.appendChild(o),o}function x(e,t){if(!r.tooltips[t])return!1;var n=document.createElement("div");return n.className=r.cssClasses.tooltip,e.firstChild.appendChild(n)}function _(){r.dir&&r.tooltips.reverse();var e=Q.map(x);r.dir&&(e.reverse(),r.tooltips.reverse()),W("update",function(t,n,o){e[n]&&(e[n].innerHTML=r.tooltips[n]===!0?t[n]:r.tooltips[n].to(o[n]))})}function w(e,t,n){if("range"===e||"steps"===e)return Z.xVal;if("count"===e){var r,o=100/(t-1),i=0;for(t=[];(r=i++*o)<=100;)t.push(r);e="positions"}return"positions"===e?t.map(function(e){return Z.fromStepping(n?Z.getStep(e):e)}):"values"===e?n?t.map(function(e){return Z.fromStepping(Z.getStep(Z.toStepping(e)))}):t:void 0}function C(t,n,r){function o(e,t){return(e+t).toFixed(7)/1}var i=Z.direction,a={},s=Z.xVal[0],u=Z.xVal[Z.xVal.length-1],c=!1,l=!1,f=0;return Z.direction=0,r=e(r.slice().sort(function(e,t){return e-t})),r[0]!==s&&(r.unshift(s),c=!0),r[r.length-1]!==u&&(r.push(u),l=!0),r.forEach(function(e,i){var s,u,p,d,h,m,v,g,y,b,x=e,_=r[i+1];if("steps"===n&&(s=Z.xNumSteps[i]),s||(s=_-x),x!==!1&&void 0!==_)for(u=x;_>=u;u=o(u,s)){for(d=Z.toStepping(u),h=d-f,g=h/t,y=Math.round(g),b=h/y,p=1;y>=p;p+=1)m=f+p*b,a[m.toFixed(5)]=["x",0];v=r.indexOf(u)>-1?1:"steps"===n?2:0,!i&&c&&(v=0),u===_&&l||(a[d.toFixed(5)]=[u,v]),f=d}}),Z.direction=i,a}function E(e,t,n){function o(e,t){var n=t===r.cssClasses.value,o=n?p:d,i=n?l:f;return t+" "+o[r.ort]+" "+i[e]}function i(e,t,n){return'class="'+o(n[1],t)+'" style="'+r.style+": "+e+'%"'}function a(e,o){Z.direction&&(e=100-e),o[1]=o[1]&&t?t(o[0],o[1]):o[1],c+="
",o[1]&&(c+="
"+n.to(o[0])+"
")}var s=document.createElement("div"),c="",l=[r.cssClasses.valueNormal,r.cssClasses.valueLarge,r.cssClasses.valueSub],f=[r.cssClasses.markerNormal,r.cssClasses.markerLarge,r.cssClasses.markerSub],p=[r.cssClasses.valueHorizontal,r.cssClasses.valueVertical],d=[r.cssClasses.markerHorizontal,r.cssClasses.markerVertical];return u(s,r.cssClasses.pips),u(s,0===r.ort?r.cssClasses.pipsHorizontal:r.cssClasses.pipsVertical),Object.keys(e).forEach(function(t){a(t,e[t])}),s.innerHTML=c,s}function P(e){var t=e.mode,n=e.density||1,r=e.filter||!1,o=e.values||!1,i=e.stepped||!1,a=w(t,o,i),s=C(n,t,a),u=e.format||{to:Math.round};return Y.appendChild(E(s,r,u))}function S(){var e=z.getBoundingClientRect(),t="offset"+["Width","Height"][r.ort];return 0===r.ort?e.width||z[t]:e.height||z[t]}function R(e,t,n){var o;for(o=0;o1?!1:o.hover&&t.buttons?!1:(t.calcPoint=t.points[r.ort],void n(t,o)))},a=[];return e.split(" ").forEach(function(e){t.addEventListener(e,i,!1),a.push([e,i])}),a}function O(e,t){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===e.buttons&&0!==t.buttonsProperty)return j(e,t);var n,r,o=t.handles||Q,i=!1,a=100*(e.calcPoint-t.start)/t.baseSize,s=o[0]===Q[0]?0:1;if(n=h(a,t.positions,o.length>1),i=I(o[0],n[s],1===o.length),o.length>1){if(i=I(o[1],n[s?0:1],!1)||i)for(r=0;r1&&u(Y,r.cssClasses.drag);var s=function(){return!1};document.body.noUiListener=s,document.body.addEventListener("selectstart",s,!1)}void 0!==t.handleNumber&&R("start",t.handleNumber)}function M(e){var t,i,a=e.calcPoint,s=0;return e.stopPropagation(),Q.forEach(function(e){s+=n(e)[r.style]}),t=s/2>a||1===Q.length?0:1,Q[t].hasAttribute("disabled")&&(t=t?0:1),a-=n(z)[r.style],i=100*a/S(),r.events.snap||o(Y,r.cssClasses.tap,r.animationDuration),Q[t].hasAttribute("disabled")?!1:(I(Q[t],i),R("slide",t,!0),R("set",t,!0),R("change",t,!0),void(r.events.snap&&A(e,{handles:[Q[t]]})))}function D(e){var t=e.calcPoint-n(z)[r.style],o=Z.getStep(100*t/S()),i=Z.fromStepping(o);Object.keys(te).forEach(function(e){"hover"===e.split(".")[0]&&te[e].forEach(function(e){e.call(X,i)})})}function F(e){if(e.fixed||Q.forEach(function(e,t){k(G.start,e.children[0],A,{handles:[e],handleNumber:t})}),e.tap&&k(G.start,z,M,{handles:Q}),e.hover&&k(G.move,z,D,{hover:!0}),e.drag){var t=[z.querySelector("."+r.cssClasses.connect)];u(t[0],r.cssClasses.draggable),e.fixed&&t.push(Q[t[0]===Q[0]?1:0].children[0]),t.forEach(function(e){k(G.start,e,A,{handles:Q})})}}function I(e,t,n){var o=e!==Q[0]?1:0,a=J[0]+r.margin,s=J[1]-r.margin,l=J[0]+r.limit,f=J[1]-r.limit;return Q.length>1&&(t=o?Math.max(t,a):Math.min(t,s)),n!==!1&&r.limit&&Q.length>1&&(t=o?Math.min(t,l):Math.max(t,f)),t=Z.getStep(t),t=i(t),t===J[o]?!1:(window.requestAnimationFrame?window.requestAnimationFrame(function(){e.style[r.style]=t+"%"}):e.style[r.style]=t+"%",e.previousSibling||(c(e,r.cssClasses.stacking),t>50&&u(e,r.cssClasses.stacking)),J[o]=t,ee[o]=Z.fromStepping(t),R("update",o),!0)}function L(e,t){var n,o,i;for(r.limit&&(e+=1),n=0;e>n;n+=1)o=n%2,i=t[o],null!==i&&i!==!1&&("number"==typeof i&&(i=String(i)),i=r.format.from(i),(i===!1||isNaN(i)||I(Q[o],Z.toStepping(i),n===3-r.dir)===!1)&&R("update",o))}function U(e,t){var n,i,s=a(e);for(t=void 0===t?!0:!!t,r.dir&&r.handles>1&&s.reverse(),r.animate&&-1!==J[0]&&o(Y,r.cssClasses.tap,r.animationDuration),n=Q.length>1?3:1,1===s.length&&(n=1),L(n,s),i=0;i=n[1]?n[2]:n[0]||!1;return[u,i]});return T(e)}function W(e,t){te[e]=te[e]||[],te[e].push(t),"update"===e.split(".")[0]&&Q.forEach(function(e,t){R("update",t)})}function $(e){var t=e&&e.split(".")[0],n=t&&e.substring(t.length);Object.keys(te).forEach(function(e){var r=e.split(".")[0],o=e.substring(r.length);t&&t!==r||n&&n!==o||delete te[e]})}function K(e,t){var n=q(),o=H({start:[0,0],margin:e.margin,limit:e.limit,step:void 0===e.step?r.singleStep:e.step,range:e.range,animate:e.animate,snap:void 0===e.snap?r.snap:e.snap});["margin","limit","range","animate"].forEach(function(t){void 0!==e[t]&&(r[t]=e[t])}),o.spectrum.direction=Z.direction,Z=o.spectrum,J=[-1,-1],U(e.start||n,t)}var z,Q,X,G=p(),Y=t,J=[-1,-1],Z=r.spectrum,ee=[],te={};if(Y.noUiSlider)throw new Error("Slider was already initialized.");return z=b(r.dir,r.ort,Y),Q=y(r.handles,r.dir,z),g(r.connect,Y,Q),r.pips&&P(r.pips),r.tooltips&&_(),X={destroy:B,steps:V,on:W,off:$,get:q,set:U,updateOptions:K,options:d,target:Y,pips:P},F(r.events),X}function B(e,t){if(!e.nodeName)throw new Error("noUiSlider.create requires a single element.");var n=H(t,e),r=q(e,n,t);return r.set(n.start),e.noUiSlider=r,r}C.prototype.getMargin=function(e){return 2===this.xPct.length?h(this.xVal,e):!1},C.prototype.toStepping=function(e){return e=y(this.xVal,this.xPct,e),this.direction&&(e=100-e),e},C.prototype.fromStepping=function(e){return this.direction&&(e=100-e),b(this.xVal,this.xPct,e)},C.prototype.getStep=function(e){return this.direction&&(e=100-e),e=x(this.xPct,this.xSteps,this.snap,e),this.direction&&(e=100-e),e},C.prototype.getApplicableStep=function(e){var t=g(e,this.xPct),n=100===e?2:1;return[this.xNumSteps[t-2],this.xVal[t-n],this.xNumSteps[t-n]]},C.prototype.convert=function(e){return this.getStep(this.toStepping(e))};var V={to:function(e){return void 0!==e&&e.toFixed(2)},from:Number};return{create:B}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.container,n=e.indices,r=e.cssClasses,o=void 0===r?{}:r,a=e.autoHideContainer,s=void 0===a?!1:a;if(!t||!n)throw new Error(_);var c=d.getContainerNode(t),f=b["default"];s===!0&&(f=g["default"](f));var h=p["default"](n,function(e){return{label:e.label,value:e.name}}),v={root:m["default"](x(null),o.root),item:m["default"](x("item"),o.item)};return{init:function(e){var t=e.helper,r=t.getIndex(),o=-1!==l["default"](n,{name:r});if(!o)throw new Error("[sortBySelector]: Index "+r+" not present in `indices`");this.setIndex=function(e){return t.setIndex(e).search()}},render:function(e){var t=e.helper,n=e.results;u["default"].render(i(f,{cssClasses:v,currentValue:t.getIndex(),options:h,setValue:this.setIndex,shouldAutoHideContainer:0===n.nbHits}),c)}}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,o){var i=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&i)for(var s in i)void 0===n[s]&&(n[s]=i[s]);else n||(n=i||{});if(1===a)n.children=o;else if(a>1){for(var u=Array(a),c=0;a>c;c++)u[c]=arguments[c+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),a=n(381),s=(r(a),n(411)),u=r(s),c=n(677),l=r(c),f=n(616),p=r(f),d=n(544),h=n(575),m=r(h),v=n(576),g=r(v),y=n(636),b=r(y),x=d.bemHelper("ais-sort-by-selector"),_="Usage:\nsortBySelector({\n container,\n indices,\n [cssClasses.{root,item}={}],\n [autoHideContainer=false]\n})";t["default"]=o},function(e,t,n){"use strict";var r=n(678),o=r();e.exports=o},function(e,t,n){"use strict";function r(e){return function(t,n,r){return t&&t.length?(n=o(n,r,3),i(t,n,e)):-1}}var o=n(548),i=n(567);e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.container,n=e.attributeName,r=e.max,o=void 0===r?5:r,a=e.cssClasses,s=void 0===a?{}:a,l=e.labels,p=void 0===l?b["default"]:l,h=e.templates,v=void 0===h?g["default"]:h,y=e.collapsible,x=void 0===y?!1:y,E=e.transformData,P=e.autoHideContainer,S=void 0===P?!0:P,R=c.getContainerNode(t),T=m["default"](_["default"]);if(S===!0&&(T=d["default"](T)),!t||!n)throw new Error(C);var k={root:f["default"](w(null),s.root),header:f["default"](w("header"),s.header),body:f["default"](w("body"),s.body),footer:f["default"](w("footer"),s.footer),list:f["default"](w("list"),s.list),item:f["default"](w("item"),s.item),link:f["default"](w("link"),s.link),disabledLink:f["default"](w("link","disabled"),s.disabledLink),count:f["default"](w("count"),s.count),star:f["default"](w("star"),s.star),emptyStar:f["default"](w("star","empty"),s.emptyStar),active:f["default"](w("item","active"),s.active)};return{getConfiguration:function(){return{disjunctiveFacets:[n]}},init:function(e){var t=e.templatesConfig,n=e.helper;this._templateProps=c.prepareTemplateProps({transformData:E,defaultTemplates:g["default"],templatesConfig:t,templates:v}),this._toggleRefinement=this._toggleRefinement.bind(this,n)},render:function(e){function t(e){return c(s.toggleRefinement(n,e))}for(var r=e.helper,a=e.results,s=e.state,c=e.createURL,l=[],f={},d=o-1;d>=0;--d)f[d]=0;a.getFacetValues(n).forEach(function(e){var t=Math.round(e.name);if(t&&!(t>o-1))for(var n=t;n>=1;--n)f[n]+=e.count});for(var h=this._getRefinedStar(r),m=o-1;m>=1;--m){var v=f[m];if(!h||m===h||0!==v){for(var g=[],y=1;o>=y;++y)g.push(m>=y);l.push({stars:g,name:String(m),count:v,isRefined:h===m,labels:p})}}u["default"].render(i(T,{collapsible:x,createURL:t,cssClasses:k,facetValues:l,shouldAutoHideContainer:0===a.nbHits,templateProps:this._templateProps,toggleRefinement:this._toggleRefinement}),R)},_toggleRefinement:function(e,t){var r=this._getRefinedStar(e)===Number(t);if(e.clearRefinements(n),!r)for(var i=Number(t);o>=i;++i)e.addDisjunctiveFacetRefinement(n,i);e.search()},_getRefinedStar:function(e){var t=void 0,r=e.getRefinements(n);return r.forEach(function(e){(!t||Number(e.value)1){for(var u=Array(a),c=0;a>c;c++)u[c]=arguments[c+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),a=n(381),s=(r(a),n(411)),u=r(s),c=n(544),l=n(575),f=r(l),p=n(576),d=r(p),h=n(577),m=r(h),v=n(680),g=r(v),y=n(681),b=r(y),x=n(626),_=r(x),w=c.bemHelper("ais-star-rating"),C="Usage:\nstarRating({\n container,\n attributeName,\n [ max=5 ],\n [ cssClasses.{root,header,body,footer,list,item,active,link,disabledLink,star,emptyStar,count} ],\n [ templates.{header,item,footer} ],\n [ transformData.{item} ],\n [ labels.{andUp} ],\n [ autoHideContainer=true ],\n [ collapsible=false ]\n})";t["default"]=o},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={header:"",item:'\n {{#stars}}{{/stars}}\n {{labels.andUp}}\n {{#count}}{{#helpers.formatNumber}}{{count}}{{/helpers.formatNumber}}{{/count}}\n',footer:""}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={andUp:"& Up"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.container,n=e.cssClasses,r=void 0===n?{}:n,o=e.autoHideContainer,a=void 0===o?!0:o,s=e.templates,l=void 0===s?b["default"]:s,p=e.collapsible,h=void 0===p?!1:p,v=e.transformData;if(!t)throw new Error(_);var y=c.getContainerNode(t),w=d["default"](m["default"]);if(a===!0&&(w=f["default"](w)),!y)throw new Error(_);var C={body:g["default"](x("body"),r.body),footer:g["default"](x("footer"),r.footer),header:g["default"](x("header"),r.header),root:g["default"](x(null),r.root),time:g["default"](x("time"),r.time)};return{init:function(e){var t=e.templatesConfig;this._templateProps=c.prepareTemplateProps({transformData:v,defaultTemplates:b["default"],templatesConfig:t,templates:l})},render:function(e){var t=e.results;u["default"].render(i(w,{collapsible:h,cssClasses:C,hitsPerPage:t.hitsPerPage,nbHits:t.nbHits,nbPages:t.nbPages,page:t.page,processingTimeMS:t.processingTimeMS,query:t.query,shouldAutoHideContainer:0===t.nbHits,templateProps:this._templateProps}),y)}}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,o){var i=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&i)for(var s in i)void 0===n[s]&&(n[s]=i[s]);else n||(n=i||{});if(1===a)n.children=o;else if(a>1){for(var u=Array(a),c=0;a>c;c++)u[c]=arguments[c+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),a=n(381),s=(r(a),n(411)),u=r(s),c=n(544),l=n(576),f=r(l),p=n(577),d=r(p),h=n(683),m=r(h),v=n(575),g=r(v),y=n(684),b=r(y),x=c.bemHelper("ais-stats"),_="Usage:\nstats({\n container,\n [ templates.{header,body,footer} ],\n [ transformData.{body} ],\n [ autoHideContainer]\n})";t["default"]=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t1,hasNoResults:0===this.props.nbHits,hasOneResult:1===this.props.nbHits,hitsPerPage:this.props.hitsPerPage,nbHits:this.props.nbHits,nbPages:this.props.nbPages,page:this.props.page,processingTimeMS:this.props.processingTimeMS,query:this.props.query,cssClasses:this.props.cssClasses};return l["default"].createElement(p["default"],s({data:e,templateKey:"body"},this.props.templateProps))}}]),t}(l["default"].Component);t["default"]=d},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={header:"",body:'{{#hasNoResults}}No results{{/hasNoResults}}\n {{#hasOneResult}}1 result{{/hasOneResult}}\n {{#hasManyResults}}{{#helpers.formatNumber}}{{nbHits}}{{/helpers.formatNumber}} results{{/hasManyResults}}\n found in {{processingTimeMS}}ms',footer:""}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.container,n=e.attributeName,r=e.label,o=e.values,a=void 0===o?{on:!0,off:void 0}:o,u=e.templates,l=void 0===u?s["default"]:u,p=e.collapsible,h=void 0===p?!1:p,v=e.cssClasses,y=void 0===v?{}:v,C=e.transformData,E=e.autoHideContainer,P=void 0===E?!0:E,S=i.getContainerNode(t);if(!t||!n||!r)throw new Error(w);var R=d["default"](m["default"]);P===!0&&(R=f["default"](R));var T=void 0!==a.off,k={root:c["default"](x(null),y.root),header:c["default"](x("header"),y.header),body:c["default"](x("body"),y.body),footer:c["default"](x("footer"),y.footer),list:c["default"](x("list"),y.list),item:c["default"](x("item"),y.item),active:c["default"](x("item","active"),y.active),label:c["default"](x("label"),y.label),checkbox:c["default"](x("checkbox"),y.checkbox),count:c["default"](x("count"),y.count)},O={attributeName:n,label:r,userValues:a,templates:l,collapsible:h,transformData:C,hasAnOffValue:T,containerNode:S,RefinementList:R,cssClasses:k};return{getConfiguration:function(e,t){var r=_(n,e)||_(n,t),o=r?b["default"](O):g["default"](O);return this.init=o.init.bind(o),this.render=o.render.bind(o),o.getConfiguration(e,t)},init:function(){},render:function(){}}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(544),a=n(686),s=r(a),u=n(575),c=r(u),l=n(576),f=r(l),p=n(577),d=r(p),h=n(626),m=r(h),v=n(687),g=r(v),y=n(688),b=r(y),x=i.bemHelper("ais-toggle"),_=function(e,t){return t&&t.facetsRefinements&&void 0!==t.facetsRefinements[e]},w="Usage:\ntoggle({\n container,\n attributeName,\n label,\n [ values={on: true, off: undefined} ],\n [ cssClasses.{root,header,body,footer,list,item,active,label,checkbox,count} ],\n [ templates.{header,item,footer} ],\n [ transformData.{item} ],\n [ autoHideContainer=true ],\n [ collapsible=false ]\n})";t["default"]=o},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]={header:"",item:'',footer:""}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,o){var i=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&i)for(var s in i)void 0===n[s]&&(n[s]=i[s]);else n||(n=i||{});if(1===a)n.children=o;else if(a>1){for(var u=Array(a),c=0;a>c;c++)u[c]=arguments[c+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}(),i=n(564),a=r(i),s=n(381),u=(r(s),n(411)),c=r(u),l=n(686),f=r(l),p=n(544),d=function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.attributeName,n=e.label,r=e.userValues,i=e.templates,s=e.collapsible,u=e.transformData,l=e.hasAnOffValue,d=e.containerNode,h=e.RefinementList,m=e.cssClasses;return{getConfiguration:function(){return{disjunctiveFacets:[t]}},toggleRefinement:function(e,n,o){var i=r.on,a=r.off;o?(e.removeDisjunctiveFacetRefinement(t,i),l&&e.addDisjunctiveFacetRefinement(t,a)):(l&&e.removeDisjunctiveFacetRefinement(t,a),e.addDisjunctiveFacetRefinement(t,i)), e.search()},init:function(e){var n=e.state,o=e.helper,a=e.templatesConfig;if(this._templateProps=p.prepareTemplateProps({transformData:u,defaultTemplates:f["default"],templatesConfig:a,templates:i}),this.toggleRefinement=this.toggleRefinement.bind(this,o),l){var s=n.isDisjunctiveFacetRefined(t,r.on);s||o.addDisjunctiveFacetRefinement(t,r.off)}},render:function(e){function i(){return p(f.removeDisjunctiveFacetRefinement(t,v?g:r.off).addDisjunctiveFacetRefinement(t,v?r.off:g))}var u=e.helper,l=e.results,f=e.state,p=e.createURL,v=u.state.isDisjunctiveFacetRefined(t,r.on),g=r.on,y=void 0===r.off?!1:r.off,b=l.getFacetValues(t),x=a["default"](b,{name:g.toString()}),_={name:n,isRefined:void 0!==x?x.isRefined:!1,count:void 0===x?null:x.count},w=a["default"](b,{name:y.toString()}),C={name:n,isRefined:void 0!==w?w.isRefined:!1,count:void 0===w?null:w.count},E=v?C:_,P={name:n,isRefined:v,count:void 0===E?null:E.count,onFacetValue:_,offFacetValue:C};c["default"].render(o(h,{collapsible:s,createURL:i,cssClasses:m,facetValues:[P],shouldAutoHideContainer:0===l.nbHits,templateProps:this._templateProps,toggleRefinement:this.toggleRefinement}),d)}}};t["default"]=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.attributeName,n=e.label,r=e.userValues,o=e.templates,a=e.collapsible,u=e.transformData,c=e.hasAnOffValue,f=e.containerNode,h=e.RefinementList,m=e.cssClasses;return{getConfiguration:function(){return{facets:[t]}},toggleRefinement:function(e,n,o){var i=r.on,a=r.off;o?(e.removeFacetRefinement(t,i),c&&e.addFacetRefinement(t,a)):(c&&e.removeFacetRefinement(t,a),e.addFacetRefinement(t,i)),e.search()},init:function(e){var n=e.state,i=e.helper,a=e.templatesConfig;if(this._templateProps=d.prepareTemplateProps({transformData:u,defaultTemplates:p["default"],templatesConfig:a,templates:o}),this.toggleRefinement=this.toggleRefinement.bind(this,i),c){var s=n.isFacetRefined(t,r.on);s||i.addFacetRefinement(t,r.off)}},render:function(e){function o(){return d(p.toggleRefinement(t,v))}var u=e.helper,c=e.results,p=e.state,d=e.createURL,v=u.state.isFacetRefined(t,r.on),g=v?r.on:r.off,y=void 0;if("number"==typeof g)y=c.getFacetStats(t).sum;else{var b=s["default"](c.getFacetValues(t),{name:v.toString()});y=void 0!==b?b.count:null}var x={name:n,isRefined:v,count:y};l["default"].render(i(h,{collapsible:a,createURL:o,cssClasses:m,facetValues:[x],shouldAutoHideContainer:0===c.nbHits,templateProps:this._templateProps,toggleRefinement:this.toggleRefinement}),f)}}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){var e="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103;return function(t,n,r,o){var i=t&&t.defaultProps,a=arguments.length-3;if(n||0===a||(n={}),n&&i)for(var s in i)void 0===n[s]&&(n[s]=i[s]);else n||(n=i||{});if(1===a)n.children=o;else if(a>1){for(var u=Array(a),c=0;a>c;c++)u[c]=arguments[c+3];n.children=u}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:n,_owner:null}}}();t["default"]=o;var a=n(564),s=r(a),u=n(381),c=(r(u),n(411)),l=r(c),f=n(686),p=r(f),d=n(544)},function(e,t,n){"use strict";var r=n(690),o=n(23);e.exports=o(r)},function(e,t,n){function r(){u.apply(this,arguments)}function o(){var e="Not implemented in this environment.\nIf you feel this is a mistake, write to support@algolia.com";throw new l.AlgoliaSearchError(e)}e.exports=r;var i=n(691),a=n(692),s=n(693),u=n(9),c=n(11),l=n(10);c(r,u),r.prototype.deleteIndex=function(e,t){return this._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(e),hostType:"write",callback:t})},r.prototype.moveIndex=function(e,t,n){var r={operation:"move",destination:t};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(e)+"/operation",body:r,hostType:"write",callback:n})},r.prototype.copyIndex=function(e,t,n){var r={operation:"copy",destination:t};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(e)+"/operation",body:r,hostType:"write",callback:n})},r.prototype.getLogs=function(e,t,r){var o=n(22),i={};return"object"==typeof e?(i=o(e),r=t):0===arguments.length||"function"==typeof e?r=e:1===arguments.length||"function"==typeof t?(r=t,i.offset=e):(i.offset=e,i.length=t),void 0===i.offset&&(i.offset=0),void 0===i.length&&(i.length=10),this._jsonRequest({method:"GET",url:"/1/logs?"+this._getSearchParams(i,""),hostType:"read",callback:r})},r.prototype.listIndexes=function(e,t){var n="";return void 0===e||"function"==typeof e?t=e:n="?page="+e,this._jsonRequest({method:"GET",url:"/1/indexes"+n,hostType:"read",callback:t})},r.prototype.initIndex=function(e){return new i(this,e)},r.prototype.listUserKeys=function(e){return this._jsonRequest({method:"GET",url:"/1/keys",hostType:"read",callback:e})},r.prototype.getUserKeyACL=function(e,t){return this._jsonRequest({method:"GET",url:"/1/keys/"+e,hostType:"read",callback:t})},r.prototype.deleteUserKey=function(e,t){return this._jsonRequest({method:"DELETE",url:"/1/keys/"+e,hostType:"write",callback:t})},r.prototype.addUserKey=function(e,t,r){var o=n(17),i="Usage: client.addUserKey(arrayOfAcls[, params, callback])";if(!o(e))throw new Error(i);(1===arguments.length||"function"==typeof t)&&(r=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:r})},r.prototype.addUserKeyWithValidity=a(function(e,t,n){return this.addUserKey(e,t,n)},s("client.addUserKeyWithValidity()","client.addUserKey()")),r.prototype.updateUserKey=function(e,t,r,o){var i=n(17),a="Usage: client.updateUserKey(key, arrayOfAcls[, params, callback])";if(!i(t))throw new Error(a);(2===arguments.length||"function"==typeof r)&&(o=r,r=null);var s={acl:t};return r&&(s.validity=r.validity,s.maxQueriesPerIPPerHour=r.maxQueriesPerIPPerHour,s.maxHitsPerQuery=r.maxHitsPerQuery,s.indexes=r.indexes,s.description=r.description,r.queryParameters&&(s.queryParameters=this._getSearchParams(r.queryParameters,"")),s.referers=r.referers),this._jsonRequest({method:"PUT",url:"/1/keys/"+e,body:s,hostType:"write",callback:o})},r.prototype.startQueriesBatch=a(function(){this._batch=[]},s("client.startQueriesBatch()","client.search()")),r.prototype.addQueryInBatch=a(function(e,t,n){this._batch.push({indexName:e,query:t,params:n})},s("client.addQueryInBatch()","client.search()")),r.prototype.sendQueriesBatch=a(function(e){return this.search(this._batch,e)},s("client.sendQueriesBatch()","client.search()")),r.prototype.batch=function(e,t){var r=n(17),o="Usage: client.batch(operations[, callback])";if(!r(e))throw new Error(o);return this._jsonRequest({method:"POST",url:"/1/indexes/*/batch",body:{requests:e},hostType:"write",callback:t})},r.prototype.destroy=o,r.prototype.enableRateLimitForward=o,r.prototype.disableRateLimitForward=o,r.prototype.useSecuredAPIKey=o,r.prototype.disableSecuredAPIKey=o,r.prototype.generateSecuredApiKey=o},function(e,t,n){function r(){i.apply(this,arguments)}var o=n(11),i=n(14),a=n(692),s=n(693),u=n(13),c=n(10);e.exports=r,o(r,i),r.prototype.addObject=function(e,t,n){var r=this;return(1===arguments.length||"function"==typeof t)&&(n=t,t=void 0),this.as._jsonRequest({method:void 0!==t?"PUT":"POST",url:"/1/indexes/"+encodeURIComponent(r.indexName)+(void 0!==t?"/"+encodeURIComponent(t):""),body:e,hostType:"write",callback:n})},r.prototype.addObjects=function(e,t){var r=n(17),o="Usage: index.addObjects(arrayOfObjects[, callback])";if(!r(e))throw new Error(o);for(var i=this,a={requests:[]},s=0;sa&&(t=a),"published"!==e.status?l._promise.delay(t).then(n):e})}function r(e){u(function(){t(null,e)},l._setTimeout||setTimeout)}function o(e){u(function(){t(e)},l._setTimeout||setTimeout)}var i=100,a=5e3,s=0,c=this,l=c.as,f=n();return t?void f.then(r,o):f},r.prototype.clearIndex=function(e){var t=this;return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/clear",hostType:"write",callback:e})},r.prototype.getSettings=function(e){var t=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/settings?getVersion=2",hostType:"read",callback:e})},r.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})},r.prototype.saveSynonym=function(e,t,n){return"function"==typeof t?(n=t,t={}):void 0===t&&(t={}),this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/"+encodeURIComponent(e.objectID)+"?forwardToSlaves="+(t.forwardToSlaves?"true":"false"),body:e,hostType:"write",callback:n})},r.prototype.getSynonym=function(e,t){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/"+encodeURIComponent(e),hostType:"read",callback:t})},r.prototype.deleteSynonym=function(e,t,n){return"function"==typeof t?(n=t,t={}):void 0===t&&(t={}),this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/"+encodeURIComponent(e)+"?forwardToSlaves="+(t.forwardToSlaves?"true":"false"),hostType:"write",callback:n})},r.prototype.clearSynonyms=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/clear?forwardToSlaves="+(e.forwardToSlaves?"true":"false"),hostType:"write",callback:t})},r.prototype.batchSynonyms=function(e,t,n){return"function"==typeof t?(n=t,t={}):void 0===t&&(t={}),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/batch?forwardToSlaves="+(t.forwardToSlaves?"true":"false")+"&replaceExistingSynonyms="+(t.replaceExistingSynonyms?"true":"false"),hostType:"write",body:e,callback:n})},r.prototype.setSettings=function(e,t,n){(1===arguments.length||"function"==typeof t)&&(n=t,t={});var r=t.forwardToSlaves||!1,o=this;return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(o.indexName)+"/settings?forwardToSlaves="+(r?"true":"false"),hostType:"write",body:e,callback:n})},r.prototype.listUserKeys=function(e){var t=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/keys",hostType:"read",callback:e})},r.prototype.getUserKeyACL=function(e,t){var n=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/keys/"+e,hostType:"read",callback:t})},r.prototype.deleteUserKey=function(e,t){var n=this;return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/keys/"+e,hostType:"write",callback:t})},r.prototype.addUserKey=function(e,t,r){var o=n(17),i="Usage: index.addUserKey(arrayOfAcls[, params, callback])";if(!o(e))throw new Error(i);(1===arguments.length||"function"==typeof t)&&(r=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:r})},r.prototype.addUserKeyWithValidity=a(function(e,t,n){return this.addUserKey(e,t,n)},s("index.addUserKeyWithValidity()","index.addUserKey()")),r.prototype.updateUserKey=function(e,t,r,o){var i=n(17),a="Usage: index.updateUserKey(key, arrayOfAcls[, params, callback])";if(!i(t))throw new Error(a);(2===arguments.length||"function"==typeof r)&&(o=r,r=null);var s={acl:t};return r&&(s.validity=r.validity,s.maxQueriesPerIPPerHour=r.maxQueriesPerIPPerHour,s.maxHitsPerQuery=r.maxHitsPerQuery,s.description=r.description,r.queryParameters&&(s.queryParameters=this.as._getSearchParams(r.queryParameters,"")),s.referers=r.referers),this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+e,body:s,hostType:"write",callback:o})}},function(e){e.exports=function(e,t){function n(){return r||(console.log(t),r=!0),e.apply(this,arguments)}var r=!1;return n}},function(e){e.exports=function(e,t){var n=e.toLowerCase().replace(".","").replace("()","");return"algoliasearch: `"+e+"` was replaced by `"+t+"`. Please see https://github.com/algolia/algoliasearch-client-js/wiki/Deprecated#"+n}},function(e,t,n){"use strict";function r(){}e.exports=r;var o=n(11),i=n(301).EventEmitter;o(r,i),r.prototype.stop=function(){this._stopped=!0,this._clean()},r.prototype._end=function(){this.emit("end"),this._clean()},r.prototype._error=function(e){this.emit("error",e),this._clean()},r.prototype._result=function(e){this.emit("result",e)},r.prototype._clean=function(){this.removeAllListeners("stop"),this.removeAllListeners("end"),this.removeAllListeners("error"),this.removeAllListeners("result")}},function(e,t,n){"use strict";e.exports=n(696)},function(e,t,n){"use strict";var r=n(697),o=n(1);r.element=o;var i=n(698);i.isArray=o.isArray,i.isFunction=o.isFunction,i.isObject=o.isPlainObject,i.bind=o.proxy,i.each=function(e,t){function n(e,n){return t(n,e)}o.each(e,n)},i.map=o.map,i.mixin=o.extend,i.Event=o.Event;var a,s,u,c=n(699),l=n(700);a=o.fn.autocomplete,s="aaAutocomplete",u={initialize:function(e,t){function n(){var n,r=o(this),i=new l({el:r});n=new c({input:r,eventBus:i,dropdownMenuContainer:e.dropdownMenuContainer,hint:void 0===e.hint?!0:!!e.hint,minLength:e.minLength,autoselect:e.autoselect,openOnFocus:e.openOnFocus,templates:e.templates,debug:e.debug,cssClasses:e.cssClasses,datasets:t,keyboardShortcuts:e.keyboardShortcuts}),r.data(s,n)}return t=i.isArray(t)?t:[].slice.call(arguments,1),e=e||{},this.each(n)},open:function(){function e(){var e,t=o(this);(e=t.data(s))&&e.open()}return this.each(e)},close:function(){function e(){var e,t=o(this);(e=t.data(s))&&e.close()}return this.each(e)},val:function(e){function t(){var t,n=o(this);(t=n.data(s))&&t.setVal(e)}function n(e){var t,n;return(t=e.data(s))&&(n=t.getVal()),n}return arguments.length?this.each(t):n(this.first())},destroy:function(){function e(){var e,t=o(this);(e=t.data(s))&&(e.destroy(),t.removeData(s))}return this.each(e)}},o.fn.autocomplete=function(e){var t;return u[e]&&"initialize"!==e?(t=this.filter(function(){return!!o(this).data(s)}),u[e].apply(t,[].slice.call(arguments,1))):u.initialize.apply(this,arguments)},o.fn.autocomplete.noConflict=function(){return o.fn.autocomplete=a,this},o.fn.autocomplete.sources=c.sources,e.exports=o.fn.autocomplete},function(e){"use strict";e.exports={element:null}},function(e,t,n){"use strict";var r=n(697);e.exports={isArray:null,isFunction:null,isObject:null,bind:null,each:null,map:null,mixin:null,isMsie:function(){return/(msie|trident)/i.test(navigator.userAgent)?navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]:!1},escapeRegExChars:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isNumber:function(e){return"number"==typeof e},toStr:function(e){return void 0===e||null===e?"":e+""},cloneDeep:function(e){var t=this.mixin({},e),n=this;return this.each(t,function(e,r){e&&(n.isArray(e)?t[r]=[].concat(e):n.isObject(e)&&(t[r]=n.cloneDeep(e)))}),t},error:function(e){throw new Error(e)},every:function(e,t){var n=!0;return e?(this.each(e,function(r,o){return n=t.call(null,r,o,e),n?void 0:!1}),!!n):n},getUniqueId:function(){var e=0;return function(){return e++}}(),templatify:function(e){if(this.isFunction(e))return e;var t=r.element(e);return"SCRIPT"===t.prop("tagName")?function(){return t.text()}:function(){return String(e)}},defer:function(e){setTimeout(e,0)},noop:function(){},className:function(e,t,n){return(n?"":".")+e+"-"+t}}},function(e,t,n){"use strict";function r(e){var t,n,i;e=e||{},e.input||u.error("missing input"),this.isActivated=!1,this.debug=!!e.debug,this.autoselect=!!e.autoselect,this.openOnFocus=!!e.openOnFocus,this.minLength=u.isNumber(e.minLength)?e.minLength:1,this.cssClasses=e.cssClasses=u.mixin({},h.defaultClasses,e.cssClasses||{}),this.$node=o(e),t=this.$node.find(u.className(this.cssClasses.prefix,this.cssClasses.dropdownMenu)),n=this.$node.find(u.className(this.cssClasses.prefix,this.cssClasses.input)),i=this.$node.find(u.className(this.cssClasses.prefix,this.cssClasses.hint)),e.dropdownMenuContainer&&c.element(e.dropdownMenuContainer).css("position","relative").append(t.css("top","0")),n.on("blur.aa",function(e){var r=document.activeElement;u.isMsie()&&(t.is(r)||t.has(r).length>0)&&(e.preventDefault(),e.stopImmediatePropagation(),u.defer(function(){n.focus()}))}),t.on("mousedown.aa",function(e){e.preventDefault()}),this.eventBus=e.eventBus||new l({el:n}),this.dropdown=new r.Dropdown({menu:t,datasets:e.datasets,templates:e.templates,cssClasses:this.cssClasses,minLength:this.minLength}).onSync("suggestionClicked",this._onSuggestionClicked,this).onSync("cursorMoved",this._onCursorMoved,this).onSync("cursorRemoved",this._onCursorRemoved,this).onSync("opened",this._onOpened,this).onSync("closed",this._onClosed,this).onSync("shown",this._onShown,this).onSync("empty",this._onEmpty,this).onAsync("datasetRendered",this._onDatasetRendered,this),this.input=new r.Input({input:n,hint:i}).onSync("focused",this._onFocused,this).onSync("blurred",this._onBlurred,this).onSync("enterKeyed",this._onEnterKeyed,this).onSync("tabKeyed",this._onTabKeyed,this).onSync("escKeyed",this._onEscKeyed,this).onSync("upKeyed",this._onUpKeyed,this).onSync("downKeyed",this._onDownKeyed,this).onSync("leftKeyed",this._onLeftKeyed,this).onSync("rightKeyed",this._onRightKeyed,this).onSync("queryChanged",this._onQueryChanged,this).onSync("whitespaceChanged",this._onWhitespaceChanged,this),this._bindKeyboardShortcuts(n,e),this._setLanguageDirection()}function o(e){var t,n,r,o;t=c.element(e.input),n=c.element(d.wrapper.replace("%ROOT%",e.cssClasses.root)).css(h.wrapper),"block"===t.css("display")&&"table"===t.parent().css("display")&&n.css("display","table-cell");var a=d.dropdown.replace("%PREFIX%",e.cssClasses.prefix).replace("%DROPDOWN_MENU%",e.cssClasses.dropdownMenu);r=c.element(a).css(h.dropdown),e.templates&&e.templates.dropdownMenu&&r.html(u.templatify(e.templates.dropdownMenu)()),o=t.clone().css(h.hint).css(i(t)),o.val("").addClass(u.className(e.cssClasses.prefix,e.cssClasses.hint,!0)).removeAttr("id name placeholder required").prop("readonly",!0).attr({autocomplete:"off",spellcheck:"false",tabindex:-1}),o.removeData&&o.removeData(),t.data(s,{dir:t.attr("dir"),autocomplete:t.attr("autocomplete"),spellcheck:t.attr("spellcheck"),style:t.attr("style")}),t.addClass(u.className(e.cssClasses.prefix,e.cssClasses.input,!0)).attr({autocomplete:"off",spellcheck:!1}).css(e.hint?h.input:h.inputWithNoHint);try{t.attr("dir")||t.attr("dir","auto")}catch(l){}return t.wrap(n).parent().prepend(e.hint?o:null).append(r)}function i(e){return{backgroundAttachment:e.css("background-attachment"),backgroundClip:e.css("background-clip"),backgroundColor:e.css("background-color"),backgroundImage:e.css("background-image"),backgroundOrigin:e.css("background-origin"),backgroundPosition:e.css("background-position"),backgroundRepeat:e.css("background-repeat"),backgroundSize:e.css("background-size")}}function a(e,t){var n=e.find(u.className(t.prefix,t.input));u.each(n.data(s),function(e,t){void 0===e?n.removeAttr(t):n.attr(t,e)}),n.detach().removeClass(u.className(t.prefix,t.input,!0)).insertAfter(e),n.removeData&&n.removeData(s),e.remove()}var s="aaAttrs",u=n(698),c=n(697),l=n(700),f=n(701),p=n(705),d=n(707),h=n(708);u.mixin(r.prototype,{_bindKeyboardShortcuts:function(e,t){if(t.keyboardShortcuts){var n=[];u.each(t.keyboardShortcuts,function(e){"string"==typeof e&&(e=e.toUpperCase().charCodeAt(0)),n.push(e)}),c.element(document).keydown(function(t){var r=t.target||t.srcElement,o=r.tagName;if(!r.isContentEditable&&"INPUT"!==o&&"SELECT"!==o&&"TEXTAREA"!==o){var i=t.which||t.keyCode;-1!==n.indexOf(i)&&(e.focus(),t.stopPropagation(),t.preventDefault())}})}},_onSuggestionClicked:function(e,t){var n;(n=this.dropdown.getDatumForSuggestion(t))&&this._select(n)},_onCursorMoved:function(e,t){var n=this.dropdown.getDatumForCursor();t&&this.input.setInputValue(n.value,!0),this.eventBus.trigger("cursorchanged",n.raw,n.datasetName)},_onCursorRemoved:function(){this.input.resetInputValue(),this._updateHint()},_onDatasetRendered:function(){this._updateHint(),this.eventBus.trigger("updated")},_onOpened:function(){this._updateHint(),this.eventBus.trigger("opened")},_onEmpty:function(){this.eventBus.trigger("empty")},_onShown:function(){this.eventBus.trigger("shown")},_onClosed:function(){this.input.clearHint(),this.eventBus.trigger("closed")},_onFocused:function(){if(this.isActivated=!0,this.openOnFocus){var e=this.input.getQuery();e.length>=this.minLength?this.dropdown.update(e):this.dropdown.empty(),this.dropdown.open()}},_onBlurred:function(){this.debug||(this.isActivated=!1,this.dropdown.empty(),this.dropdown.close())},_onEnterKeyed:function(e,t){var n,r;n=this.dropdown.getDatumForCursor(),r=this.dropdown.getDatumForTopSuggestion(),n?(this._select(n),t.preventDefault()):this.autoselect&&r&&(this._select(r),t.preventDefault())},_onTabKeyed:function(e,t){var n;(n=this.dropdown.getDatumForCursor())?(this._select(n),t.preventDefault()):this._autocomplete(!0)},_onEscKeyed:function(){this.dropdown.close(),this.input.resetInputValue()},_onUpKeyed:function(){var e=this.input.getQuery();this.dropdown.isEmpty&&e.length>=this.minLength?this.dropdown.update(e):this.dropdown.moveCursorUp(),this.dropdown.open()},_onDownKeyed:function(){var e=this.input.getQuery();this.dropdown.isEmpty&&e.length>=this.minLength?this.dropdown.update(e):this.dropdown.moveCursorDown(),this.dropdown.open()},_onLeftKeyed:function(){"rtl"===this.dir&&this._autocomplete()},_onRightKeyed:function(){"ltr"===this.dir&&this._autocomplete()},_onQueryChanged:function(e,t){this.input.clearHintIfInvalid(),t.length>=this.minLength?this.dropdown.update(t):this.dropdown.empty(),this.dropdown.open(),this._setLanguageDirection()},_onWhitespaceChanged:function(){this._updateHint(),this.dropdown.open()},_setLanguageDirection:function(){var e=this.input.getLanguageDirection();this.dir!==e&&(this.dir=e,this.$node.css("direction",e),this.dropdown.setLanguageDirection(e))},_updateHint:function(){var e,t,n,r,o,i;e=this.dropdown.getDatumForTopSuggestion(),e&&this.dropdown.isVisible()&&!this.input.hasOverflow()?(t=this.input.getInputValue(),n=f.normalizeQuery(t),r=u.escapeRegExChars(n),o=new RegExp("^(?:"+r+")(.+$)","i"),i=o.exec(e.value),i?this.input.setHint(t+i[1]):this.input.clearHint()):this.input.clearHint()},_autocomplete:function(e){var t,n,r,o;t=this.input.getHint(),n=this.input.getQuery(),r=e||this.input.isCursorAtEnd(),t&&n!==t&&r&&(o=this.dropdown.getDatumForTopSuggestion(),o&&this.input.setInputValue(o.value),this.eventBus.trigger("autocompleted",o.raw,o.datasetName))},_select:function(e){"undefined"!=typeof e.value&&this.input.setQuery(e.value),this.input.setInputValue(e.value,!0),this._setLanguageDirection();var t=this.eventBus.trigger("selected",e.raw,e.datasetName);t.isDefaultPrevented()===!1&&(this.dropdown.close(),u.defer(u.bind(this.dropdown.empty,this.dropdown)))},open:function(){if(!this.isActivated){var e=this.input.getInputValue();e.length>=this.minLength?this.dropdown.update(e):this.dropdown.empty()}this.dropdown.open()},close:function(){this.dropdown.close()},setVal:function(e){e=u.toStr(e),this.isActivated?this.input.setInputValue(e):(this.input.setQuery(e),this.input.setInputValue(e,!0)),this._setLanguageDirection()},getVal:function(){return this.input.getQuery()},destroy:function(){this.input.destroy(),this.dropdown.destroy(),a(this.$node,this.cssClasses),this.$node=null}}),r.Dropdown=p,r.Input=f,r.sources=n(709),e.exports=r},function(e,t,n){"use strict";function r(e){e&&e.el||i.error("EventBus initialized without el"),this.$el=a.element(e.el)}var o="autocomplete:",i=n(698),a=n(697);i.mixin(r.prototype,{trigger:function(e){var t=[].slice.call(arguments,1),n=i.Event(o+e);return this.$el.trigger(n,t),n}}),e.exports=r},function(e,t,n){"use strict";function r(e){var t,n,r,i,a=this;e=e||{},e.input||u.error("input is missing"),t=u.bind(this._onBlur,this),n=u.bind(this._onFocus,this),r=u.bind(this._onKeydown,this),i=u.bind(this._onInput,this),this.$hint=c.element(e.hint),this.$input=c.element(e.input).on("blur.aa",t).on("focus.aa",n).on("keydown.aa",r),0===this.$hint.length&&(this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=u.noop),u.isMsie()?this.$input.on("keydown.aa keypress.aa cut.aa paste.aa",function(e){s[e.which||e.keyCode]||u.defer(u.bind(a._onInput,a,e))}):this.$input.on("input.aa",i),this.query=this.$input.val(),this.$overflowHelper=o(this.$input)}function o(e){return c.element('').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:e.css("font-family"),fontSize:e.css("font-size"),fontStyle:e.css("font-style"),fontVariant:e.css("font-variant"),fontWeight:e.css("font-weight"),wordSpacing:e.css("word-spacing"),letterSpacing:e.css("letter-spacing"),textIndent:e.css("text-indent"),textRendering:e.css("text-rendering"),textTransform:e.css("text-transform")}).insertAfter(e)}function i(e,t){return r.normalizeQuery(e)===r.normalizeQuery(t)}function a(e){return e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}var s;s={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"};var u=n(698),c=n(697),l=n(702);r.normalizeQuery=function(e){return(e||"").replace(/^\s*/g,"").replace(/\s{2,}/g," ")},u.mixin(r.prototype,l,{_onBlur:function(){this.resetInputValue(),this.trigger("blurred")},_onFocus:function(){this.trigger("focused")},_onKeydown:function(e){var t=s[e.which||e.keyCode];this._managePreventDefault(t,e),t&&this._shouldTrigger(t,e)&&this.trigger(t+"Keyed",e)},_onInput:function(){this._checkInputValue()},_managePreventDefault:function(e,t){var n,r,o;switch(e){case"tab":r=this.getHint(),o=this.getInputValue(),n=r&&r!==o&&!a(t);break;case"up":case"down":n=!a(t);break;default:n=!1}n&&t.preventDefault()},_shouldTrigger:function(e,t){var n;switch(e){case"tab":n=!a(t);break;default:n=!0}return n},_checkInputValue:function(){var e,t,n;e=this.getInputValue(),t=i(e,this.query),n=t&&this.query?this.query.length!==e.length:!1,this.query=e,t?n&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query)},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getQuery:function(){return this.query},setQuery:function(e){this.query=e},getInputValue:function(){return this.$input.val()},setInputValue:function(e,t){"undefined"==typeof e&&(e=this.query),this.$input.val(e),t?this.clearHint():this._checkInputValue()},resetInputValue:function(){this.setInputValue(this.query,!0)},getHint:function(){return this.$hint.val()},setHint:function(e){this.$hint.val(e)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var e,t,n,r;e=this.getInputValue(),t=this.getHint(),n=e!==t&&0===t.indexOf(e),r=""!==e&&n&&!this.hasOverflow(),r||this.clearHint()},getLanguageDirection:function(){return(this.$input.css("direction")||"ltr").toLowerCase()},hasOverflow:function(){var e=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=e},isCursorAtEnd:function(){var e,t,n;return e=this.$input.val().length,t=this.$input[0].selectionStart,u.isNumber(t)?t===e:document.selection?(n=document.selection.createRange(),n.moveStart("character",-e),e===n.text.length):!0},destroy:function(){this.$hint.off(".aa"),this.$input.off(".aa"),this.$hint=this.$input=this.$overflowHelper=null}}),e.exports=r},function(e,t,n){(function(t){"use strict";function n(e,t,n,r){var o;if(!n)return this;for(t=t.split(l),n=r?c(n,r):n,this._callbacks=this._callbacks||{};o=t.shift();)this._callbacks[o]=this._callbacks[o]||{ sync:[],async:[]},this._callbacks[o][e].push(n);return this}function r(e,t,r){return n.call(this,"async",e,t,r)}function o(e,t,r){return n.call(this,"sync",e,t,r)}function i(e){var t;if(!this._callbacks)return this;for(e=e.split(l);t=e.shift();)delete this._callbacks[t];return this}function a(e){var t,n,r,o,i;if(!this._callbacks)return this;for(e=e.split(l),r=[].slice.call(arguments,1);(t=e.shift())&&(n=this._callbacks[t]);)o=s(n.sync,this,[t].concat(r)),i=s(n.async,this,[t].concat(r)),o()&&f(i);return this}function s(e,t,n){function r(){for(var r,o=0,i=e.length;!r&&i>o;o+=1)r=e[o].apply(t,n)===!1;return!r}return r}function u(){var e;return e=window.setImmediate?function(e){t(function(){e()})}:function(e){setTimeout(function(){e()},0)}}function c(e,t){return e.bind?e.bind(t):function(){e.apply(t,[].slice.call(arguments,0))}}var l=/\s+/,f=u();e.exports={onSync:o,onAsync:r,off:i,trigger:a}}).call(t,n(703).setImmediate)},function(e,t,n){(function(e,r){function o(e,t){this._id=e,this._clearFn=t}var i=n(704).nextTick,a=Function.prototype.apply,s=Array.prototype.slice,u={},c=0;t.setTimeout=function(){return new o(a.call(setTimeout,window,arguments),clearTimeout)},t.setInterval=function(){return new o(a.call(setInterval,window,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(window,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},t.setImmediate="function"==typeof e?e:function(e){var n=c++,r=arguments.length<2?!1:s.call(arguments,1);return u[n]=!0,i(function(){u[n]&&(r?e.apply(null,r):e.call(null),t.clearImmediate(n))}),n},t.clearImmediate="function"==typeof r?r:function(e){delete u[e]}}).call(t,n(703).setImmediate,n(703).clearImmediate)},function(e){function t(e){if(s===setTimeout)return setTimeout(e,0);try{return s(e,0)}catch(t){try{return s.call(null,e,0)}catch(t){return s.call(this,e,0)}}}function n(e){if(u===clearTimeout)return clearTimeout(e);try{return u(e)}catch(t){try{return u.call(null,e)}catch(t){return u.call(this,e)}}}function r(){p&&l&&(p=!1,l.length?f=l.concat(f):d=-1,f.length&&o())}function o(){if(!p){var e=t(r);p=!0;for(var o=f.length;o;){for(l=f,f=[];++d1)for(var r=1;r'),this.$menu.append(this.$empty))}function o(e,t,n){return new r.Dataset(i.mixin({$menu:e,cssClasses:n},t))}var i=n(698),a=n(697),s=n(702),u=n(706),c=n(708);i.mixin(r.prototype,s,{_onSuggestionClick:function(e){this.trigger("suggestionClicked",a.element(e.currentTarget))},_onSuggestionMouseEnter:function(e){var t=a.element(e.currentTarget);t.hasClass(i.className(this.cssClasses.prefix,this.cssClasses.cursor,!0))||(this._removeCursor(),this._setCursor(t,!1))},_onSuggestionMouseLeave:function(e){if(e.relatedTarget){var t=a.element(e.relatedTarget);if(t.closest("."+i.className(this.cssClasses.prefix,this.cssClasses.cursor,!0)).length>0)return}this._removeCursor(),this.trigger("cursorRemoved")},_onRendered:function(e,t){function n(e){return e.isEmpty()}if(this.isEmpty=i.every(this.datasets,n),this.isEmpty)if(t.length>=this.minLength&&this.trigger("empty"),this.$empty)if(t.length=this.minLength?this._show():this._hide());this.trigger("datasetRendered")},_hide:function(){this.$menu.hide()},_show:function(){this.$menu.css("display","block"),this.trigger("shown")},_getSuggestions:function(){return this.$menu.find(i.className(this.cssClasses.prefix,this.cssClasses.suggestion))},_getCursor:function(){return this.$menu.find(i.className(this.cssClasses.prefix,this.cssClasses.cursor)).first()},_setCursor:function(e,t){e.first().addClass(i.className(this.cssClasses.prefix,this.cssClasses.cursor,!0)),this.trigger("cursorMoved",t)},_removeCursor:function(){this._getCursor().removeClass(i.className(this.cssClasses.prefix,this.cssClasses.cursor,!0))},_moveCursor:function(e){var t,n,r,o;if(this.isOpen){if(n=this._getCursor(),t=this._getSuggestions(),this._removeCursor(),r=t.index(n)+e,r=(r+1)%(t.length+1)-1,-1===r)return void this.trigger("cursorRemoved");-1>r&&(r=t.length-1),this._setCursor(o=t.eq(r),!0),this._ensureVisible(o)}},_ensureVisible:function(e){var t,n,r,o;t=e.position().top,n=t+e.height()+parseInt(e.css("margin-top"),10)+parseInt(e.css("margin-bottom"),10),r=this.$menu.scrollTop(),o=this.$menu.height()+parseInt(this.$menu.css("paddingTop"),10)+parseInt(this.$menu.css("paddingBottom"),10),0>t?this.$menu.scrollTop(r+t):n>o&&this.$menu.scrollTop(r+(n-o))},close:function(){this.isOpen&&(this.isOpen=!1,this._removeCursor(),this._hide(),this.trigger("closed"))},open:function(){this.isOpen||(this.isOpen=!0,this.isEmpty||this._show(),this.trigger("opened"))},setLanguageDirection:function(e){this.$menu.css("ltr"===e?c.ltr:c.rtl)},moveCursorUp:function(){this._moveCursor(-1)},moveCursorDown:function(){this._moveCursor(1)},getDatumForSuggestion:function(e){var t=null;return e.length&&(t={raw:u.extractDatum(e),value:u.extractValue(e),datasetName:u.extractDatasetName(e)}),t},getDatumForCursor:function(){return this.getDatumForSuggestion(this._getCursor().first())},getDatumForTopSuggestion:function(){return this.getDatumForSuggestion(this._getSuggestions().first())},update:function(e){function t(t){t.update(e)}i.each(this.datasets,t)},empty:function(){function e(e){e.clear()}i.each(this.datasets,e),this.isEmpty=!0},isVisible:function(){return this.isOpen&&!this.isEmpty},destroy:function(){function e(e){e.destroy()}this.$menu.off(".aa"),this.$menu=null,i.each(this.datasets,e)}}),r.Dataset=u,e.exports=r},function(e,t,n){"use strict";function r(e){e=e||{},e.templates=e.templates||{},e.source||l.error("missing source"),e.name&&!a(e.name)&&l.error("invalid dataset name: "+e.name),this.query=null,this._isEmpty=!0,this.highlight=!!e.highlight,this.name="undefined"==typeof e.name||null===e.name?l.getUniqueId():e.name,this.source=e.source,this.displayFn=o(e.display||e.displayKey),this.templates=i(e.templates,this.displayFn),this.cssClasses=l.mixin({},d.defaultClasses,e.cssClasses||{});var t=l.className(this.cssClasses.prefix,this.cssClasses.dataset);this.$el=f.element(e.$menu&&e.$menu.find(t+"-"+this.name).length>0?e.$menu.find(t+"-"+this.name)[0]:p.dataset.replace("%CLASS%",this.name).replace("%PREFIX%",this.cssClasses.prefix).replace("%DATASET%",this.cssClasses.dataset)),this.$menu=e.$menu}function o(e){function t(t){return t[e]}return e=e||"value",l.isFunction(e)?e:t}function i(e,t){function n(e){return"

"+t(e)+"

"}return{empty:e.empty&&l.templatify(e.empty),header:e.header&&l.templatify(e.header),footer:e.footer&&l.templatify(e.footer),suggestion:e.suggestion||n}}function a(e){return/^[_a-zA-Z0-9-]+$/.test(e)}var s="aaDataset",u="aaValue",c="aaDatum",l=n(698),f=n(697),p=n(707),d=n(708),h=n(702);r.extractDatasetName=function(e){return f.element(e).data(s)},r.extractValue=function(e){return f.element(e).data(u)},r.extractDatum=function(e){var t=f.element(e).data(c);return"string"==typeof t&&(t=JSON.parse(t)),t},l.mixin(r.prototype,h,{_render:function(e,t){function n(){var t=[].slice.call(arguments,0);return t=[{query:e,isEmpty:!0}].concat(t),h.templates.empty.apply(this,t)}function r(){function e(e){var t,n=p.suggestion.replace("%PREFIX%",i.cssClasses.prefix).replace("%SUGGESTION%",i.cssClasses.suggestion);return t=f.element(n).append(h.templates.suggestion.apply(this,[e].concat(o))),t.data(s,h.name),t.data(u,h.displayFn(e)||void 0),t.data(c,JSON.stringify(e)),t.children().each(function(){f.element(this).css(d.suggestionChild)}),t}var n,r,o=[].slice.call(arguments,0),i=this,a=p.suggestions.replace("%PREFIX%",this.cssClasses.prefix).replace("%SUGGESTIONS%",this.cssClasses.suggestions);return n=f.element(a).css(d.suggestions),r=l.map(t,e),n.append.apply(n,r),n}function o(){var t=[].slice.call(arguments,0);return t=[{query:e,isEmpty:!a}].concat(t),h.templates.header.apply(this,t)}function i(){var t=[].slice.call(arguments,0);return t=[{query:e,isEmpty:!a}].concat(t),h.templates.footer.apply(this,t)}if(this.$el){var a,h=this,m=[].slice.call(arguments,2);this.$el.empty(),a=t&&t.length,this._isEmpty=!a,!a&&this.templates.empty?this.$el.html(n.apply(this,m)).prepend(h.templates.header?o.apply(this,m):null).append(h.templates.footer?i.apply(this,m):null):a&&this.$el.html(r.apply(this,m)).prepend(h.templates.header?o.apply(this,m):null).append(h.templates.footer?i.apply(this,m):null),this.$menu&&this.$menu.addClass(this.cssClasses.prefix+"-"+(a?"with":"without")+"-"+this.name).removeClass(this.cssClasses.prefix+"-"+(a?"without":"with")+"-"+this.name),this.trigger("rendered",e)}},getRoot:function(){return this.$el},update:function(e){function t(t){if(!n.canceled&&e===n.query){var r=[].slice.call(arguments,1);r=[e,t].concat(r),n._render.apply(n,r)}}var n=this;this.query=e,this.canceled=!1,this.source(e,t)},cancel:function(){this.canceled=!0},clear:function(){this.cancel(),this.$el.empty(),this.trigger("rendered","")},isEmpty:function(){return this._isEmpty},destroy:function(){this.$el=null}}),e.exports=r},function(e){"use strict";e.exports={wrapper:'',dropdown:'',dataset:'
',suggestions:'',suggestion:'
'}},function(e,t,n){"use strict";var r=n(698),o={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},dropdown:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},suggestions:{display:"block"},suggestion:{whiteSpace:"nowrap",cursor:"pointer"},suggestionChild:{whiteSpace:"normal"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:"0"},defaultClasses:{root:"algolia-autocomplete",prefix:"aa",dropdownMenu:"dropdown-menu",input:"input",hint:"hint",suggestions:"suggestions",suggestion:"suggestion",cursor:"cursor",dataset:"dataset",empty:"empty"}};r.isMsie()&&r.mixin(o.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),r.isMsie()&&r.isMsie()<=7&&r.mixin(o.input,{marginTop:"-1px"}),e.exports=o},function(e,t,n){"use strict";e.exports={hits:n(710),popularIn:n(711)}},function(e,t,n){"use strict";var r=n(698);e.exports=function(e,t){function n(n,o){e.search(n,t,function(e,t){return e?void r.error(e.message):void o(t.hits,t)})}return n}},function(e,t,n){"use strict";var r=n(698);e.exports=function(e,t,n,o){function i(i,u){e.search(i,t,function(e,t){if(e)return void r.error(e.message);if(t.hits.length>0){var i=t.hits[0],c=r.mixin({hitsPerPage:0},n);return delete c.source,delete c.index,void s.search(a(i),c,function(e,n){if(e)return void r.error(e.message);var a=[];if(o.includeAll){var s=o.allTitle||"All departments";a.push(r.mixin({facet:{value:s,count:n.nbHits}},r.cloneDeep(i)))}r.each(n.facets,function(e,t){r.each(e,function(e,n){a.push(r.mixin({facet:{facet:t,value:n,count:e}},r.cloneDeep(i)))})});for(var c=1;c