text: /*! algoliasearch 3.4.0 | © 2014, 2015 Algolia SAS | github.com/algolia/algoliasearch-client-js */
  (function(g){var k;"undefined"!==typeof window?k=window:"undefined"!==typeof self&&(k=self);k.ALGOLIA_MIGRATION_LAYER=g()})(function(){return function k(e,n,b){function c(f,m){if(!n[f]){if(!e[f]){var p="function"==typeof require&&require;if(!m&&p)return p(f,!0);if(l)return l(f,!0);p=Error("Cannot find module '"+f+"'");throw p.code="MODULE_NOT_FOUND",p;}p=n[f]={exports:{}};e[f][0].call(p.exports,function(b){var l=e[f][1][b];return c(l?l:b)},p,p.exports,k,e,n,b)}return n[f].exports}for(var l="function"==
  typeof require&&require,f=0;f<b.length;f++)c(b[f]);return c}({1:[function(k,e,n){function b(f,c){for(var b in c)f.setAttribute(b,c[b])}function c(f,c){f.onload=function(){this.onerror=this.onload=null;c(null,f)};f.onerror=function(){this.onerror=this.onload=null;c(Error("Failed to load "+this.src),f)}}function l(f,c){f.onreadystatechange=function(){if("complete"==this.readyState||"loaded"==this.readyState)this.onreadystatechange=null,c(null,f)}}e.exports=function(f,q,m){var p=document.head||document.getElementsByTagName("head")[0],
  e=document.createElement("script");"function"===typeof q&&(m=q,q={});q=q||{};m=m||function(){};e.type=q.type||"text/javascript";e.charset=q.charset||"utf8";e.async="async"in q?!!q.async:!0;e.src=f;q.attrs&&b(e,q.attrs);q.text&&(e.text=""+q.text);("onload"in e?c:l)(e,m);e.onload||c(e,m);p.appendChild(e)}},{}],2:[function(k,e,n){e.exports=function(b){b=new RegExp("cdn\\.jsdelivr\\.net/algoliasearch/latest/"+b.replace(".","\\.")+"(?:\\.min)?\\.js$");for(var c=document.getElementsByTagName("script"),
  l=!1,f=0,e=c.length;f<e;f++)if(c[f].src&&b.test(c[f].src)){l=!0;break}return l}},{}],3:[function(k,e,n){(function(b){function c(c){return function(){var f="AlgoliaSearch: loaded V2 script using "+c;b.console&&b.console.log&&b.console.log(f)}}e.exports=function(l){var f=k(1);l="//cdn.jsdelivr.net/algoliasearch/2/"+l+".min.js";b.console&&(b.console.warn?b.console.warn("-- AlgoliaSearch `latest` warning --\nWarning, you are using the `latest` version string from jsDelivr to load the AlgoliaSearch library.\nUsing `latest` is no more recommended, you should load //cdn.jsdelivr.net/algoliasearch/2/algoliasearch.min.js\n\nAlso, we updated the AlgoliaSearch JavaScript client to V3. If you want to upgrade,\nplease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch  `latest` warning --"):
  b.console.log&&b.console.log("-- AlgoliaSearch `latest` warning --\nWarning, you are using the `latest` version string from jsDelivr to load the AlgoliaSearch library.\nUsing `latest` is no more recommended, you should load //cdn.jsdelivr.net/algoliasearch/2/algoliasearch.min.js\n\nAlso, we updated the AlgoliaSearch JavaScript client to V3. If you want to upgrade,\nplease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch  `latest` warning --"));
  try{document.write("<script>window.ALGOLIA_SUPPORTS_DOCWRITE = true\x3c/script>"),!0===b.ALGOLIA_SUPPORTS_DOCWRITE?(document.write('<script src="'+l+'">\x3c/script>'),c("document.write")()):f(l,c("DOMElement"))}catch(e){f(l,c("DOMElement"))}}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{1:1}],4:[function(k,e,n){(function(b){e.exports=function(){b.AlgoliaSearch=function(){throw Error("-- AlgoliaSearch V2 => V3 error --\nYou are trying to use a new version of the AlgoliaSearch JavaScript client with an old notation.\nPlease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch V2 => V3 error --");
  };b.AlgoliaSearchHelper=function(){throw Error("-- AlgoliaSearch V2 => V3 error --\nYou are trying to use a new version of the AlgoliaSearch JavaScript client with an old notation.\nPlease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch V2 => V3 error --");};AlgoliaExplainResults=function(){throw Error("-- AlgoliaSearch V2 => V3 error --\nYou are trying to use a new version of the AlgoliaSearch JavaScript client with an old notation.\nPlease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch V2 => V3 error --");
  }}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],5:[function(k,e,n){e=k(2);n=k(3);k=k(4);e("algoliasearch.angular")?n("algoliasearch.angular"):k()},{2:2,3:3,4:4}]},{},[5])(5)});
  (function e$$0(k,e,n){function b(f,l){if(!e[f]){if(!k[f]){var m="function"==typeof require&&require;if(!l&&m)return m(f,!0);if(c)return c(f,!0);m=Error("Cannot find module '"+f+"'");throw m.code="MODULE_NOT_FOUND",m;}m=e[f]={exports:{}};k[f][0].call(m.exports,function(c){var l=k[f][1][c];return b(l?l:c)},m,m.exports,e$$0,k,e,n)}return e[f].exports}for(var c="function"==typeof require&&require,l=0;l<n.length;l++)b(n[l]);return b})({1:[function(g,k,e){function n(){if(!l){l=!0;for(var f,b=c.length;b;){f=
  c;c=[];for(var e=-1;++e<b;)f[e]();b=c.length}l=!1}}function b(){}g=k.exports={};var c=[],l=!1;g.nextTick=function(f){c.push(f);l||setTimeout(n,0)};g.title="browser";g.browser=!0;g.env={};g.argv=[];g.version="";g.versions={};g.on=b;g.addListener=b;g.once=b;g.off=b;g.removeListener=b;g.removeAllListeners=b;g.emit=b;g.binding=function(f){throw Error("process.binding is not supported");};g.cwd=function(){return"/"};g.chdir=function(f){throw Error("process.chdir is not supported");};g.umask=function(){return 0}},
  {}],2:[function(g,k,e){k.exports=function(b,c,l,f){l=l||"=";var e={};if("string"!==typeof b||0===b.length)return e;var m=/\+/g;b=b.split(c||"&");c=1E3;f&&"number"===typeof f.maxKeys&&(c=f.maxKeys);f=b.length;0<c&&f>c&&(f=c);for(c=0;c<f;++c){var p=b[c].replace(m,"%20"),g=p.indexOf(l),k;0<=g?(k=p.substr(0,g),p=p.substr(g+1)):(k=p,p="");k=decodeURIComponent(k);p=decodeURIComponent(p);Object.prototype.hasOwnProperty.call(e,k)?n(e[k])?e[k].push(p):e[k]=[e[k],p]:e[k]=p}return e};var n=Array.isArray||function(b){return"[object Array]"===
  Object.prototype.toString.call(b)}},{}],3:[function(g,k,e){function n(f,c){if(f.map)return f.map(c);for(var b=[],l=0;l<f.length;l++)b.push(c(f[l],l));return b}var b=function(f){switch(typeof f){case "string":return f;case "boolean":return f?"true":"false";case "number":return isFinite(f)?f:"";default:return""}};k.exports=function(f,e,m,p){e=e||"&";m=m||"=";null===f&&(f=void 0);return"object"===typeof f?n(l(f),function(l){var p=encodeURIComponent(b(l))+m;return c(f[l])?n(f[l],function(a){return p+
  encodeURIComponent(b(a))}).join(e):p+encodeURIComponent(b(f[l]))}).join(e):p?encodeURIComponent(b(p))+m+encodeURIComponent(b(f)):""};var c=Array.isArray||function(f){return"[object Array]"===Object.prototype.toString.call(f)},l=Object.keys||function(f){var c=[],b;for(b in f)Object.prototype.hasOwnProperty.call(f,b)&&c.push(b);return c}},{}],4:[function(g,k,e){e.decode=e.parse=g(2);e.encode=e.stringify=g(3)},{2:2,3:3}],5:[function(g,k,e){function n(){var c;try{c=b.debug}catch(f){}return c}e=k.exports=
  g(6);e.log=function(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)};e.formatArgs=function(){var c=arguments,f=this.useColors;c[0]=(f?"%c":"")+this.namespace+(f?" %c":" ")+c[0]+(f?"%c ":" ")+"+"+e.humanize(this.diff);if(!f)return c;var f="color: "+this.color,c=[c[0],f,"color: inherit"].concat(Array.prototype.slice.call(c,1)),b=0,m=0;c[0].replace(/%[a-z%]/g,function(c){"%%"!==c&&(b++,"%c"===c&&(m=b))});c.splice(m,0,f);return c};e.save=function(c){try{null==
  c?b.removeItem("debug"):b.debug=c}catch(f){}};e.load=n;e.useColors=function(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)};var b;if("undefined"!==typeof chrome&&"undefined"!==typeof chrome.storage)b=chrome.storage.local;else a:{try{b=window.localStorage;break a}catch(c){}b=void 0}e.colors="lightseagreen forestgreen goldenrod dodgerblue darkorchid crimson".split(" ");
  e.formatters.j=function(c){return JSON.stringify(c)};e.enable(n())},{6:6}],6:[function(g,k,e){e=k.exports=function(c){function l(){}function f(){var c=+new Date;f.diff=c-(b||c);f.prev=b;b=f.curr=c;null==f.useColors&&(f.useColors=e.useColors());null==f.color&&f.useColors&&(f.color=e.colors[n++%e.colors.length]);var l=Array.prototype.slice.call(arguments);l[0]=e.coerce(l[0]);"string"!==typeof l[0]&&(l=["%o"].concat(l));var g=0;l[0]=l[0].replace(/%([a-z%])/g,function(c,a){if("%%"===c)return c;g++;var d=
  e.formatters[a];"function"===typeof d&&(c=d.call(f,l[g]),l.splice(g,1),g--);return c});"function"===typeof e.formatArgs&&(l=e.formatArgs.apply(f,l));(f.log||e.log||console.log.bind(console)).apply(f,l)}l.enabled=!1;f.enabled=!0;var g=e.enabled(c)?f:l;g.namespace=c;return g};e.coerce=function(c){return c instanceof Error?c.stack||c.message:c};e.disable=function(){e.enable("")};e.enable=function(c){e.save(c);for(var b=(c||"").split(/[\s,]+/),f=b.length,g=0;g<f;g++)b[g]&&(c=b[g].replace(/\*/g,".*?"),
  "-"===c[0]?e.skips.push(new RegExp("^"+c.substr(1)+"$")):e.names.push(new RegExp("^"+c+"$")))};e.enabled=function(c){var b,f;b=0;for(f=e.skips.length;b<f;b++)if(e.skips[b].test(c))return!1;b=0;for(f=e.names.length;b<f;b++)if(e.names[b].test(c))return!0;return!1};e.humanize=g(7);e.names=[];e.skips=[];e.formatters={};var n=0,b},{7:7}],7:[function(g,k,e){function n(c){if(c=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(c)){var b=
  parseFloat(c[1]);switch((c[2]||"ms").toLowerCase()){case "years":case "year":case "yrs":case "yr":case "y":return 315576E5*b;case "days":case "day":case "d":return 864E5*b;case "hours":case "hour":case "hrs":case "hr":case "h":return 36E5*b;case "minutes":case "minute":case "mins":case "min":case "m":return 6E4*b;case "seconds":case "second":case "secs":case "sec":case "s":return 1E3*b;case "milliseconds":case "millisecond":case "msecs":case "msec":case "ms":return b}}}function b(c,b,f){if(!(c<b))return c<
  1.5*b?Math.floor(c/b)+" "+f:Math.ceil(c/b)+" "+f+"s"}k.exports=function(c,e){e=e||{};return"string"==typeof c?n(c):e.long?b(c,864E5,"day")||b(c,36E5,"hour")||b(c,6E4,"minute")||b(c,1E3,"second")||c+" ms":864E5<=c?Math.round(c/864E5)+"d":36E5<=c?Math.round(c/36E5)+"h":6E4<=c?Math.round(c/6E4)+"m":1E3<=c?Math.round(c/1E3)+"s":c+"ms"}},{}],8:[function(g,k,e){(function(e,b){(function(){function c(a){return"function"===typeof a}function l(){return function(){e.nextTick(p)}}function f(){var a=0,d=new K(p),
  h=document.createTextNode("");d.observe(h,{characterData:!0});return function(){h.data=a=++a%2}}function g(){var a=new MessageChannel;a.port1.onmessage=p;return function(){a.port2.postMessage(0)}}function m(){return function(){setTimeout(p,1)}}function p(){for(var a=0;a<z;a+=2)(0,A[a])(A[a+1]),A[a]=void 0,A[a+1]=void 0;z=0}function w(){}function r(a,d,h,c){try{a.call(d,h,c)}catch(b){return b}}function a(a,d,c){B(function(a){var b=!1,f=r(c,d,function(c){b||(b=!0,d!==c?h(a,c):v(a,c))},function(d){b||
  (b=!0,u(a,d))},"Settle: "+(a._label||" unknown promise"));!b&&f&&(b=!0,u(a,f))},a)}function d(a,d){1===d._state?v(a,d._result):2===a._state?u(a,d._result):D(d,void 0,function(d){h(a,d)},function(d){u(a,d)})}function h(h,b){if(h===b)u(h,new TypeError("You cannot resolve a promise with itself"));else if("function"===typeof b||"object"===typeof b&&null!==b)if(b.constructor===h.constructor)d(h,b);else{var f;try{f=b.then}catch(t){E.error=t,f=E}f===E?u(h,E.error):void 0===f?v(h,b):c(f)?a(h,b,f):v(h,b)}else v(h,
  b)}function t(a){a._onerror&&a._onerror(a._result);H(a)}function v(a,d){void 0===a._state&&(a._result=d,a._state=1,0!==a._subscribers.length&&B(H,a))}function u(a,d){void 0===a._state&&(a._state=2,a._result=d,B(t,a))}function D(a,d,h,c){var b=a._subscribers,f=b.length;a._onerror=null;b[f]=d;b[f+1]=h;b[f+2]=c;0===f&&a._state&&B(H,a)}function H(a){var d=a._subscribers,h=a._state;if(0!==d.length){for(var b,c,f=a._result,t=0;t<d.length;t+=3)b=d[t],c=d[t+h],b?F(h,b,c,f):c(f);a._subscribers.length=0}}function C(){this.error=
  null}function F(a,d,b,f){var t=c(b),e,l,g,m;if(t){try{e=b(f)}catch(k){I.error=k,e=I}e===I?(m=!0,l=e.error,e=null):g=!0;if(d===e){u(d,new TypeError("A promises callback cannot return that same promise."));return}}else e=f,g=!0;void 0===d._state&&(t&&g?h(d,e):m?u(d,l):1===a?v(d,e):2===a&&u(d,e))}function N(a,d){try{d(function(d){h(a,d)},function(d){u(a,d)})}catch(b){u(a,b)}}function y(a,d,h,b){this._instanceConstructor=a;this.promise=new a(w,b);this._abortOnReject=h;this._validateInput(d)?(this._input=
  d,this._remaining=this.length=d.length,this._init(),0===this.length?v(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&v(this.promise,this._result))):u(this.promise,this._validationError())}function x(a){this._id=O++;this._result=this._state=void 0;this._subscribers=[];if(w!==a){if(!c(a))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof x))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
  N(this,a)}}var L=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)},z=0,B=function(a,d){A[z]=a;A[z+1]=d;z+=2;2===z&&M()},G="undefined"!==typeof window?window:{},K=G.MutationObserver||G.WebKitMutationObserver,G="undefined"!==typeof Uint8ClampedArray&&"undefined"!==typeof importScripts&&"undefined"!==typeof MessageChannel,A=Array(1E3),M;M="undefined"!==typeof e&&"[object process]"==={}.toString.call(e)?l():K?f():G?g():m();var E=new C,I=new C;y.prototype._validateInput=
  function(a){return L(a)};y.prototype._validationError=function(){return Error("Array Methods must be provided an Array")};y.prototype._init=function(){this._result=Array(this.length)};y.prototype._enumerate=function(){for(var a=this.length,d=this.promise,h=this._input,b=0;void 0===d._state&&b<a;b++)this._eachEntry(h[b],b)};y.prototype._eachEntry=function(a,d){var h=this._instanceConstructor;"object"===typeof a&&null!==a?a.constructor===h&&void 0!==a._state?(a._onerror=null,this._settledAt(a._state,
  d,a._result)):this._willSettleAt(h.resolve(a),d):(this._remaining--,this._result[d]=this._makeResult(1,d,a))};y.prototype._settledAt=function(a,d,h){var b=this.promise;void 0===b._state&&(this._remaining--,this._abortOnReject&&2===a?u(b,h):this._result[d]=this._makeResult(a,d,h));0===this._remaining&&v(b,this._result)};y.prototype._makeResult=function(a,d,h){return h};y.prototype._willSettleAt=function(a,d){var h=this;D(a,void 0,function(a){h._settledAt(1,d,a)},function(a){h._settledAt(2,d,a)})};
  var O=0;x.all=function(a,d){return(new y(this,a,!0,d)).promise};x.race=function(a,d){function b(a){h(f,a)}function c(a){u(f,a)}var f=new this(w,d);if(!L(a))return u(f,new TypeError("You must pass an array to race.")),f;for(var t=a.length,e=0;void 0===f._state&&e<t;e++)D(this.resolve(a[e]),void 0,b,c);return f};x.resolve=function(a,d){if(a&&"object"===typeof a&&a.constructor===this)return a;var b=new this(w,d);h(b,a);return b};x.reject=function(a,d){var h=new this(w,d);u(h,a);return h};x.prototype=
  {constructor:x,then:function(a,d){var h=this._state;if(1===h&&!a||2===h&&!d)return this;var b=new this.constructor(w),c=this._result;if(h){var f=arguments[h-1];B(function(){F(h,b,f,c)})}else D(this,b,a,d);return b},"catch":function(a){return this.then(null,a)}};var J={Promise:x,polyfill:function(){var a;a="undefined"!==typeof b?b:"undefined"!==typeof window&&window.document?window:self;"Promise"in a&&"resolve"in a.Promise&&"reject"in a.Promise&&"all"in a.Promise&&"race"in a.Promise&&function(){var d;
  new a.Promise(function(a){d=a});return c(d)}()||(a.Promise=x)}};"function"===typeof define&&define.amd?define(function(){return J}):"undefined"!==typeof k&&k.exports?k.exports=J:"undefined"!==typeof this&&(this.ES6Promise=J)}).call(this)}).call(this,g(1),"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{1:1}],9:[function(g,k,e){var n=Object.prototype.hasOwnProperty,b=Object.prototype.toString,c=function(c){return"function"===typeof Array.isArray?
  Array.isArray(c):"[object Array]"===b.call(c)},l=function(c){if(!c||"[object Object]"!==b.call(c))return!1;var e=n.call(c,"constructor"),l=c.constructor&&c.constructor.prototype&&n.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!e&&!l)return!1;for(var g in c);return void 0===g||n.call(c,g)};k.exports=function q(){var b,e,g,k,a,d=arguments[0],h=1,t=arguments.length,v=!1;if("boolean"===typeof d)v=d,d=arguments[1]||{},h=2;else if("object"!==typeof d&&"function"!==typeof d||null==d)d=
  {};for(;h<t;++h)if(b=arguments[h],null!=b)for(e in b)g=d[e],k=b[e],d!==k&&(v&&k&&(l(k)||(a=c(k)))?(a?(a=!1,g=g&&c(g)?g:[]):g=g&&l(g)?g:{},d[e]=q(v,g,k)):void 0!==k&&(d[e]=k));return d}},{}],10:[function(g,k,e){var n=Object.prototype.hasOwnProperty,b=Object.prototype.toString;k.exports=function(c,e,f){if("[object Function]"!==b.call(e))throw new TypeError("iterator must be a function");var g=c.length;if(g===+g)for(var k=0;k<g;k++)e.call(f,c[k],k,c);else for(k in c)n.call(c,k)&&e.call(f,c[k],k,c)}},
  {}],11:[function(g,k,e){k.exports="function"===typeof Object.create?function(e,b){e.super_=b;e.prototype=Object.create(b.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,b){e.super_=b;var c=function(){};c.prototype=b.prototype;e.prototype=new c;e.prototype.constructor=e}},{}],12:[function(g,k,e){function n(a,d,h){var f=g(9);if(!a)throw new r.AlgoliaSearchError("Please provide an application ID. Usage: algoliasearch(applicationID, apiKey, opts)");if(!d)throw new r.AlgoliaSearchError("Please provide an API key. Usage: algoliasearch(applicationID, apiKey, opts)");
  this.applicationID=a;this.apiKey=d;a=[this.applicationID+"-1.algolianet.com",this.applicationID+"-2.algolianet.com",this.applicationID+"-3.algolianet.com"];this.hosts={read:[],write:[]};this.hostIndex={read:0,write:0};h=h||{};d=h.protocol||"https:";var e=void 0===h.timeout?2E3:h.timeout;/:$/.test(d)||(d+=":");if("http:"!==h.protocol&&"https:"!==h.protocol)throw new r.AlgoliaSearchError("protocol must be `http:` or `https:` (was `"+h.protocol+"`)");h.hosts?(this.hosts.read=f([],h.hosts),this.hosts.write=
  f([],h.hosts)):(this.hosts.read=[this.applicationID+"-dsn.algolia.net"].concat(a),this.hosts.write=[this.applicationID+".algolia.net"].concat(a));this.hosts.read=b(this.hosts.read,c(d));this.hosts.write=b(this.hosts.write,c(d));this.requestTimeout=e;this.extraHeaders=[];this.cache={};this._ua=h._ua;this._useCache=void 0===h._useCache?!0:h._useCache;this._setTimeout=h._setTimeout;p("init done, %j",this)}function b(a,d){for(var h=[],b=0;b<a.length;++b)h.push(d(a[b],b));return h}function c(a){return function(d){return a+
  "//"+d.toLowerCase()}}function l(){throw new r.AlgoliaSearchError("Not implemented in this environment.\nIf you feel this is a mistake, write to support@algolia.com");}function f(a,d){var h=a.toLowerCase().replace(".","").replace("()","");return"algoliasearch: `"+a+"` was replaced by `"+d+"`. Please see https://github.com/algolia/algoliasearch-client-js/wiki/Deprecated#"+h}function q(a,d){d(a,0)}function m(a,d){var h=!1;return function(){h||(console.log(d),h=!0);return a.apply(this,arguments)}}k.exports=
  n;var p=g(5)("algoliasearch"),w=g(10),r=g(18);n.prototype={deleteIndex:function(a,d){return this._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(a),hostType:"write",callback:d})},moveIndex:function(a,d,h){d={operation:"move",destination:d};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(a)+"/operation",body:d,hostType:"write",callback:h})},copyIndex:function(a,d,h){d={operation:"copy",destination:d};return this._jsonRequest({method:"POST",url:"/1/indexes/"+
  encodeURIComponent(a)+"/operation",body:d,hostType:"write",callback:h})},getLogs:function(a,d,h){if(0===arguments.length||"function"===typeof a)h=a,a=0,d=10;else if(1===arguments.length||"function"===typeof d)h=d,d=10;return this._jsonRequest({method:"GET",url:"/1/logs?offset="+a+"&length="+d,hostType:"read",callback:h})},listIndexes:function(a,d){var h="";void 0===a||"function"===typeof a?d=a:h="?page="+a;return this._jsonRequest({method:"GET",url:"/1/indexes"+h,hostType:"read",callback:d})},initIndex:function(a){return new this.Index(this,
  a)},listUserKeys:function(a){return this._jsonRequest({method:"GET",url:"/1/keys",hostType:"read",callback:a})},getUserKeyACL:function(a,d){return this._jsonRequest({method:"GET",url:"/1/keys/"+a,hostType:"read",callback:d})},deleteUserKey:function(a,d){return this._jsonRequest({method:"DELETE",url:"/1/keys/"+a,hostType:"write",callback:d})},addUserKey:function(a,d,h){if(1===arguments.length||"function"===typeof d)h=d,d=null;var b={acl:a};d&&(b.validity=d.validity,b.maxQueriesPerIPPerHour=d.maxQueriesPerIPPerHour,
  b.maxHitsPerQuery=d.maxHitsPerQuery,b.indexes=d.indexes,b.description=d.description,d.queryParameters&&(b.queryParameters=this._getSearchParams(d.queryParameters,"")),b.referers=d.referers);return this._jsonRequest({method:"POST",url:"/1/keys",body:b,hostType:"write",callback:h})},addUserKeyWithValidity:m(function(a,d,h){return this.addUserKey(a,d,h)},f("client.addUserKeyWithValidity()","client.addUserKey()")),updateUserKey:function(a,d,h,b){if(2===arguments.length||"function"===typeof h)b=h,h=null;
  var c={acl:d};h&&(c.validity=h.validity,c.maxQueriesPerIPPerHour=h.maxQueriesPerIPPerHour,c.maxHitsPerQuery=h.maxHitsPerQuery,c.indexes=h.indexes,c.description=h.description,h.queryParameters&&(c.queryParameters=this._getSearchParams(h.queryParameters,"")),c.referers=h.referers);return this._jsonRequest({method:"PUT",url:"/1/keys/"+a,body:c,hostType:"write",callback:b})},setSecurityTags:function(a){if("[object Array]"===Object.prototype.toString.call(a)){for(var d=[],b=0;b<a.length;++b)if("[object Array]"===
  Object.prototype.toString.call(a[b])){for(var c=[],f=0;f<a[b].length;++f)c.push(a[b][f]);d.push("("+c.join(",")+")")}else d.push(a[b]);a=d.join(",")}this.securityTags=a},setUserToken:function(a){this.userToken=a},startQueriesBatch:m(function(){this._batch=[]},f("client.startQueriesBatch()","client.search()")),addQueryInBatch:m(function(a,d,b){this._batch.push({indexName:a,query:d,params:b})},f("client.addQueryInBatch()","client.search()")),clearCache:function(){this.cache={}},sendQueriesBatch:m(function(a){return this.search(this._batch,
  a)},f("client.sendQueriesBatch()","client.search()")),setRequestTimeout:function(a){a&&(this.requestTimeout=parseInt(a,10))},search:function(a,d){var h=this,c={requests:b(a,function(a){var d="";void 0!==a.query&&(d+="query="+encodeURIComponent(a.query));return{indexName:a.indexName,params:h._getSearchParams(a.params,d)}})};return this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",body:c,hostType:"read",callback:d})},batch:function(a,d){return this._jsonRequest({method:"POST",
  url:"/1/indexes/*/batch",body:{requests:a},hostType:"write",callback:d})},destroy:l,enableRateLimitForward:l,disableRateLimitForward:l,useSecuredAPIKey:l,disableSecuredAPIKey:l,generateSecuredApiKey:l,Index:function(a,d){this.indexName=d;this.as=a;this.typeAheadValueOption=this.typeAheadArgs=null;this.cache={}},setExtraHeader:function(a,d){this.extraHeaders.push({name:a.toLowerCase(),value:d})},_sendQueriesBatch:function(a,d){return this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",
  body:a,hostType:"read",fallback:{method:"GET",url:"/1/indexes/*",body:{params:function(){for(var d="",b=0;b<a.requests.length;++b)var c="/1/indexes/"+encodeURIComponent(a.requests[b].indexName)+"?"+a.requests[b].params,d=d+(b+"="+encodeURIComponent(c)+"&");return d}()}},callback:d})},_jsonRequest:function(a){function d(g,m){function n(){e.hostIndex[a.hostType]=++e.hostIndex[a.hostType]%e.hosts[a.hostType].length;l+=1;m.timeout=e.requestTimeout*(l+1);return d(g,m)}var p;e._useCache&&(p=a.url);e._useCache&&
  c&&(p+="_body_"+m.body);if(e._useCache&&f&&void 0!==f[p])return b("serving response from cache"),e._promise.resolve(JSON.parse(JSON.stringify(f[p])));if(l>=e.hosts[a.hostType].length){if(!a.fallback||!e._request.fallback||k)return e._promise.reject(new r.AlgoliaSearchError("Cannot connect to the AlgoliaSearch API. Send an email to support@algolia.com to report and resolve the issue."));l=0;m.method=a.fallback.method;m.url=a.fallback.url;m.jsonBody=a.fallback.body;m.jsonBody&&(m.body=JSON.stringify(a.fallback.body));
  m.timeout=e.requestTimeout*(l+1);e.hostIndex[a.hostType]=0;k=e.useFallback=!0;return d(e._request.fallback,m)}return g.call(e,e.hosts[a.hostType][e.hostIndex[a.hostType]]+m.url,{body:c,jsonBody:a.body,method:m.method,headers:e._computeRequestHeaders(),timeout:m.timeout,debug:b}).then(function(a){b("received response: %j",a);var d=a&&a.body&&a.body.message&&a.body.status||a.statusCode||a&&a.body&&200,c=200===d||201===d,d=!c&&4!==Math.floor(d/100)&&1!==Math.floor(d/100);e._useCache&&c&&f&&(f[p]=a.body);
  if(c)return a.body;if(d)return n();a=new r.AlgoliaSearchError(a.body&&a.body.message);return e._promise.reject(a)},function(c){b("error: %s, stack: %s",c.message,c.stack);if(c instanceof r.RequestTimeout)return b("timedout"),n();c instanceof r.AlgoliaSearchError||(c=new r.Unknown(c&&c.message,c));if(c instanceof r.Unknown||c instanceof r.UnparsableJSON||!g.fallback&&c instanceof r.Network)return e._promise.reject(c);e.useFallback?(e.hostIndex[a.hostType]=++e.hostIndex[a.hostType]%e.hosts[a.hostType].length,
  l+=1):l=e.hosts[a.hostType].length;return d(g,m)})}var b=g(5)("algoliasearch:"+a.url),c,f=a.cache,e=this,l=0,k=!1;void 0!==a.body&&(c=JSON.stringify(a.body));b("request start");var m=e.useFallback&&a.fallback,n=m?a.fallback:a,m=d(m?e._request.fallback:e._request,{url:n.url,method:n.method,body:c,jsonBody:a.body,timeout:e.requestTimeout*(l+1)});if(a.callback)m.then(function(d){q(function(){a.callback(null,d)},e._setTimeout||setTimeout)},function(d){q(function(){a.callback(d)},e._setTimeout||setTimeout)});
  else return m},_getSearchParams:function(a,d){if(this._isUndefined(a)||null===a)return d;for(var b in a)null!==b&&a.hasOwnProperty(b)&&(d+=""===d?"":"&",d+=b+"="+encodeURIComponent("[object Array]"===Object.prototype.toString.call(a[b])?JSON.stringify(a[b]):a[b]));return d},_isUndefined:function(a){return void 0===a},_computeRequestHeaders:function(){var a={"x-algolia-api-key":this.apiKey,"x-algolia-application-id":this.applicationID,"x-algolia-agent":this._ua};this.userToken&&(a["x-algolia-usertoken"]=
  this.userToken);this.securityTags&&(a["x-algolia-tagfilters"]=this.securityTags);this.extraHeaders&&w(this.extraHeaders,function(d){a[d.name]=d.value});return a}};n.prototype.Index.prototype={clearCache:function(){this.cache={}},addObject:function(a,d,b){if(1===arguments.length||"function"===typeof d)b=d,d=void 0;return this.as._jsonRequest({method:void 0!==d?"PUT":"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+(void 0!==d?"/"+encodeURIComponent(d):""),body:a,hostType:"write",callback:b})},
  addObjects:function(a,d){for(var b={requests:[]},c=0;c<a.length;++c)b.requests.push({action:"addObject",body:a[c]});return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:b,hostType:"write",callback:d})},getObject:function(a,d,b){if(1===arguments.length||"function"===typeof d)b=d,d=void 0;var c="";if(void 0!==d)for(var c="?attributes=",e=0;e<d.length;++e)0!==e&&(c+=","),c+=d[e];return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+
  "/"+encodeURIComponent(a)+c,hostType:"read",callback:b})},getObjects:function(a,d,c){var e=this;if(1===arguments.length||"function"===typeof d)c=d,d=void 0;var f={requests:b(a,function(a){a={indexName:e.indexName,objectID:a};d&&(a.attributesToRetrieve=d.join(","));return a})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/*/objects",hostType:"read",body:f,callback:c})},partialUpdateObject:function(a,d){return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+
  "/"+encodeURIComponent(a.objectID)+"/partial",body:a,hostType:"write",callback:d})},partialUpdateObjects:function(a,d){for(var b={requests:[]},c=0;c<a.length;++c)b.requests.push({action:"partialUpdateObject",objectID:a[c].objectID,body:a[c]});return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:b,hostType:"write",callback:d})},saveObject:function(a,d){return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+
  "/"+encodeURIComponent(a.objectID),body:a,hostType:"write",callback:d})},saveObjects:function(a,d){for(var b={requests:[]},c=0;c<a.length;++c)b.requests.push({action:"updateObject",objectID:a[c].objectID,body:a[c]});return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:b,hostType:"write",callback:d})},deleteObject:function(a,d){if("function"===typeof a||"string"!==typeof a&&"number"!==typeof a){var b=new r.AlgoliaSearchError("Cannot delete an object without an objectID");
  d=a;return"function"===typeof d?d(b):this.as._promise.reject(b)}return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(a),hostType:"write",callback:d})},deleteObjects:function(a,d){var c={requests:b(a,function(a){return{action:"deleteObject",objectID:a,body:{objectID:a}}})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:c,hostType:"write",callback:d})},deleteByQuery:function(a,
  d,c){function e(a){return g.waitTask(a.taskID)}function f(){return g.deleteByQuery(a,d)}var g=this,l=g.as;if(1===arguments.length||"function"===typeof d)c=d,d={};d.attributesToRetrieve="objectID";d.hitsPerPage=1E3;this.clearCache();var k=this.search(a,d).then(function(a){if(0===a.nbHits)return a;a=b(a.hits,function(a){return a.objectID});return g.deleteObjects(a).then(e).then(f)});if(!c)return k;k.then(function(){q(function(){c(null)},l._setTimeout||setTimeout)},function(a){q(function(){c(a)},l._setTimeout||
  setTimeout)})},search:function(a,d,b){if("function"===typeof a&&"object"===typeof d||"object"===typeof b)throw new r.AlgoliaSearchError("index.search usage is index.search(query, params, cb)");if(0===arguments.length||"function"===typeof a)b=a,a="";else if(1===arguments.length||"function"===typeof d)b=d,d=void 0;if("object"===typeof a&&null!==a)d=a,a=void 0;else if(void 0===a||null===a)a="";var c="";void 0!==a&&(c+="query="+encodeURIComponent(a));void 0!==d&&(c=this.as._getSearchParams(d,c));return this._search(c,
  b)},browse:function(a,d,b){if(1===arguments.length||"function"===typeof d)b=d,d=void 0;var c="?page="+a;this.as._isUndefined(d)||(c+="&hitsPerPage="+d);return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse"+c,hostType:"read",callback:b})},ttAdapter:function(a){var d=this;return function(b,c){d.search(b,a,function(a,d){a?c(a):c(d.hits)})}},waitTask:function(a,d){var b=this,c=b.as,e=this.as._jsonRequest({method:"GET",hostType:"read",url:"/1/indexes/"+
  encodeURIComponent(b.indexName)+"/task/"+a}).then(function(d){return"published"!==d.status?b.as._promise.delay(100).then(function(){return b.waitTask(a)}):d});if(!d)return e;e.then(function(a){q(function(){d(null,a)},c._setTimeout||setTimeout)},function(a){q(function(){d(a)},c._setTimeout||setTimeout)})},clearIndex:function(a){return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/clear",hostType:"write",callback:a})},getSettings:function(a){return this.as._jsonRequest({method:"GET",
  url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/settings",hostType:"read",callback:a})},setSettings:function(a,d){return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/settings",hostType:"write",body:a,callback:d})},listUserKeys:function(a){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",hostType:"read",callback:a})},getUserKeyACL:function(a,d){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+
  encodeURIComponent(this.indexName)+"/keys/"+a,hostType:"read",callback:d})},deleteUserKey:function(a,d){return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+a,hostType:"write",callback:d})},addUserKey:function(a,d,b){if(1===arguments.length||"function"===typeof d)b=d,d=null;var c={acl:a};d&&(c.validity=d.validity,c.maxQueriesPerIPPerHour=d.maxQueriesPerIPPerHour,c.maxHitsPerQuery=d.maxHitsPerQuery,c.description=d.description,d.queryParameters&&
  (c.queryParameters=this.as._getSearchParams(d.queryParameters,"")),c.referers=d.referers);return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",body:c,hostType:"write",callback:b})},addUserKeyWithValidity:m(function(a,d,b){return this.addUserKey(a,d,b)},f("index.addUserKeyWithValidity()","index.addUserKey()")),updateUserKey:function(a,d,b,c){if(2===arguments.length||"function"===typeof b)c=b,b=null;var e={acl:d};b&&(e.validity=b.validity,e.maxQueriesPerIPPerHour=
  b.maxQueriesPerIPPerHour,e.maxHitsPerQuery=b.maxHitsPerQuery,e.description=b.description,b.queryParameters&&(e.queryParameters=this.as._getSearchParams(b.queryParameters,"")),e.referers=b.referers);return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+a,body:e,hostType:"write",callback:c})},_search:function(a,d){return this.as._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/query",body:{params:a},
  hostType:"read",fallback:{method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName),body:{params:a}},callback:d})},as:null,indexName:null,typeAheadArgs:null,typeAheadValueOption:null}},{10:10,18:18,5:5,9:9}],13:[function(g,k,e){k.exports=function(b,c,e){function f(){c.debug("JSONP: success");v||a||(v=!0,r||(c.debug("JSONP: Fail. Script loaded but did not call the callback"),k(),e(Error("Failed to load JSONP script"))))}function g(){"loaded"!==this.readyState&&"complete"!==this.readyState||
  f()}function k(){clearTimeout(u);h.onload=null;h.onreadystatechange=null;h.onerror=null;d.removeChild(h);try{delete window[t],delete window[t+"_loaded"]}catch(a){window[t]=null,window[t+"_loaded"]=null}}function p(){c.debug("JSONP: Script timeout");a=!0;k();e(Error("Timeout - Could not connect to endpoint "+b))}function w(){c.debug("JSONP: Script error");v||a||(k(),e(Error("Failed to load JSONP script")))}if("GET"!==c.method)e(Error("Method "+c.method+" "+b+" is not supported by JSONP."));else{c.debug("JSONP: start");
  var r=!1,a=!1;n+=1;var d=document.getElementsByTagName("head")[0],h=document.createElement("script"),t="algoliaJSONP_"+n,v=!1;window[t]=function(d){try{delete window[t]}catch(b){window[t]=void 0}a||(r=!0,k(),e(null,{body:d}))};b+="&callback="+t;c.jsonBody&&c.jsonBody.params&&(b+="&"+c.jsonBody.params);var u=setTimeout(p,c.timeout);h.onreadystatechange=g;h.onload=f;h.onerror=w;h.async=!0;h.defer=!0;h.src=b;d.appendChild(h)}};var n=0},{}],14:[function(g,k,e){(function(e){var b=g(11),c=g(12),l=g(18),
  f=g(17),k=g(13);window.algoliasearch=g(15);e.angular.module("algoliasearch",[]).service("algolia",["$http","$q","$timeout",function(e,p,n){function r(d,b,c){var e=g(9),f=g(16);c=e(!0,{},c)||{};void 0===c.protocol&&(c.protocol=f());c._ua=r.ua;return new a(d,b,c)}function a(){c.apply(this,arguments)}r.version=g(19);r.ua="Algolia for AngularJS "+r.version;b(a,c);a.prototype._request=function(a,b){var c=p.defer(),g=c.resolve,k=c.reject,q,r=b.body;a=f(a,b.headers);var C=p.defer(),F=C.promise;n(function(){q=
  !0;C.resolve("test");k(new l.RequestTimeout)},b.timeout);e({url:a,method:b.method,data:r,cache:!1,timeout:F}).then(function(a){g({statusCode:a.status,body:a.data})},function(a){q||(0===a.status?k(new l.Network({more:a})):g({body:a.data,statusCode:a.status}))});return c.promise};a.prototype._request.fallback=function(a,b){a=f(a,b.headers);var c=p.defer(),e=c.resolve,g=c.reject;k(a,b,function(a,b){a?g(new l.JSONP(a.message)):e(b)});return c.promise};a.prototype._promise={reject:function(a){return p.reject(a)},
  resolve:function(a){return p.when(a)},delay:function(a){var b=p.defer();n(b.resolve,a);return b.promise}};return{Client:function(a,b,c){return r(a,b,c)},ua:r.ua,version:r.version}}])}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{11:11,12:12,13:13,15:15,16:16,17:17,18:18,19:19,9:9}],15:[function(g,k,e){(function(e){function b(a,d,e){var f=g(9),k=g(16);e=f(!0,{},e)||{};void 0===e.protocol&&(e.protocol=k());e._ua=b.ua;return new c(a,
  d,e)}function c(){q.apply(this,arguments)}k.exports=b;var l=g(11),f=e.Promise||g(8).Promise,q=g(12),m=g(18),p=g(17),w=g(13);b.version=g(19);b.ua="Algolia for vanilla JavaScript "+b.version;var r="XDomainRequest"in window,a="withCredentials"in new XMLHttpRequest,d="timeout"in new XMLHttpRequest;l(c,q);c.prototype._request=function(b,c){return new f(function(e,f){function g(){if(!x){d||clearTimeout(w);var a;try{a={body:JSON.parse(q.responseText),statusCode:q.status}}catch(b){a=new m.UnparsableJSON({more:q.responseText})}a instanceof
  m.UnparsableJSON?f(a):e(a)}}function k(a){x||(d||clearTimeout(w),f(new m.Network({more:a})))}function l(){d||(x=!0,q.abort());f(new m.RequestTimeout)}if(a||r){b=p(b,c.headers);var n=c.body,q=a?new XMLHttpRequest:new XDomainRequest,w,x;q instanceof XMLHttpRequest?q.open(c.method,b,!0):q.open(c.method,b);a&&n&&"GET"!==c.method&&q.setRequestHeader("content-type","application/x-www-form-urlencoded");q.onprogress=function(){};q.onload=g;q.onerror=k;d?(q.timeout=c.timeout,q.ontimeout=l):w=setTimeout(l,
  c.timeout);q.send(n)}else f(new m.Network("CORS not supported"))})};c.prototype._request.fallback=function(a,b){a=p(a,b.headers);return new f(function(c,d){w(a,b,function(a,b){a?d(new m.JSONP(a.message)):c(b)})})};c.prototype._promise={reject:function(a){return f.reject(a)},resolve:function(a){return f.resolve(a)},delay:function(a){return new f(function(b){setTimeout(b,a)})}}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{11:11,
  12:12,13:13,16:16,17:17,18:18,19:19,8:8,9:9}],16:[function(g,k,e){(function(e){k.exports=function(){var b=e.document.location.protocol;"http:"!==b&&"https:"!==b&&(b="http:");return b}}).call(this,"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],17:[function(g,k,e){k.exports=function(b,c){b=/\?/.test(b)?b+"&":b+"?";return b+n.encode(c)};var n=g(4)},{4:4}],18:[function(g,k,e){function n(b,e){var g=this;"function"===typeof Error.captureStackTrace?
  Error.captureStackTrace(this,this.constructor):g.stack=Error().stack||"Cannot get a stacktrace, browser is too old";this.name=this.constructor.name;this.message=b||"Unknown error";e&&c(e,function(b,c){g[c]=b})}function b(b,c){function e(){var g=Array.prototype.slice.call(arguments,0);"string"!==typeof g[0]&&g.unshift(c);n.apply(this,g);this.name="AlgoliaSearch"+b+"Error"}l(e,n);return e}var c=g(10),l=g(11);l(n,Error);k.exports={AlgoliaSearchError:n,UnparsableJSON:b("UnparsableJSON","Could not parse the incoming response as JSON, see err.more for details"),
  RequestTimeout:b("RequestTimeout","Request timedout before getting a response"),Network:b("Network","Network issue, see err.more for details"),JSONP:b("JSONP","JSONP failed"),Unknown:b("Unknown","Unknown error occured")}},{10:10,11:11}],19:[function(g,k,e){k.exports="3.4.0"},{}]},{},[14]);
  