algoliasearch
Advanced tools
Comparing version 3.7.5 to 3.7.6
{ | ||
"name": "algoliasearch", | ||
"version": "3.7.5", | ||
"version": "3.7.6", | ||
"homepage": "https://github.com/algolia/algoliasearch-client-js", | ||
@@ -5,0 +5,0 @@ "authors": [ |
@@ -1,3 +0,3 @@ | ||
/*! algoliasearch 3.7.5 | © 2014, 2015 Algolia SAS | github.com/algolia/algoliasearch-client-js */ | ||
/*! algoliasearch 3.7.6 | © 2014, 2015 Algolia SAS | github.com/algolia/algoliasearch-client-js */ | ||
!function(e){var t;"undefined"!=typeof window?t=window:"undefined"!=typeof self&&(t=self),t.ALGOLIA_MIGRATION_LAYER=e()}(function(){return function e(t,r,n){function o(s,a){if(!r[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[s]={exports:{}};t[s][0].call(l.exports,function(e){var r=t[s][1][e];return o(r?r:e)},l,l.exports,e,t,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(e,t,r){function n(e,t){for(var r in t)e.setAttribute(r,t[r])}function o(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function i(e,t){e.onreadystatechange=function(){("complete"==this.readyState||"loaded"==this.readyState)&&(this.onreadystatechange=null,t(null,e))}}t.exports=function(e,t,r){var s=document.head||document.getElementsByTagName("head")[0],a=document.createElement("script");"function"==typeof t&&(r=t,t={}),t=t||{},r=r||function(){},a.type=t.type||"text/javascript",a.charset=t.charset||"utf8",a.async="async"in t?!!t.async:!0,a.src=e,t.attrs&&n(a,t.attrs),t.text&&(a.text=""+t.text);var u="onload"in a?o:i;u(a,r),a.onload||o(a,r),s.appendChild(a)}},{}],2:[function(e,t,r){"use strict";function n(e){for(var t=new RegExp("cdn\\.jsdelivr\\.net/algoliasearch/latest/"+e.replace(".","\\.")+"(?:\\.min)?\\.js$"),r=document.getElementsByTagName("script"),n=!1,o=0,i=r.length;i>o;o++)if(r[o].src&&t.test(r[o].src)){n=!0;break}return n}t.exports=n},{}],3:[function(e,t,r){"use strict";function n(t){var r=e(1),n="//cdn.jsdelivr.net/algoliasearch/2/"+t+".min.js",i="-- 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 --";window.console&&(window.console.warn?window.console.warn(i):window.console.log&&window.console.log(i));try{document.write("<script>window.ALGOLIA_SUPPORTS_DOCWRITE = true</script>"),window.ALGOLIA_SUPPORTS_DOCWRITE===!0?(document.write('<script src="'+n+'"></script>'),o("document.write")()):r(n,o("DOMElement"))}catch(s){r(n,o("DOMElement"))}}function o(e){return function(){var t="AlgoliaSearch: loaded V2 script using "+e;window.console&&window.console.log&&window.console.log(t)}}t.exports=n},{1:1}],4:[function(e,t,r){"use strict";function n(){var e="-- 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 --";window.AlgoliaSearch=function(){throw new Error(e)},window.AlgoliaSearchHelper=function(){throw new Error(e)},window.AlgoliaExplainResults=function(){throw new Error(e)}}t.exports=n},{}],5:[function(e,t,r){"use strict";function n(t){var r=e(2),n=e(3),o=e(4);r(t)?n(t):o()}n("algoliasearch.angular")},{2:2,3:3,4:4}]},{},[5])(5)}),function e(t,r,n){function o(s,a){if(!r[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[s]={exports:{}};t[s][0].call(l.exports,function(e){var r=t[s][1][e];return o(r?r:e)},l,l.exports,e,t,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(e,t,r){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function o(e){return"function"==typeof e}function i(e){return"number"==typeof e}function s(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!i(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,r,n,i,u,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(r=this._events[e],a(r))return!1;if(o(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:for(n=arguments.length,i=new Array(n-1),u=1;n>u;u++)i[u-1]=arguments[u];r.apply(this,i)}else if(s(r)){for(n=arguments.length,i=new Array(n-1),u=1;n>u;u++)i[u-1]=arguments[u];for(c=r.slice(),n=c.length,u=0;n>u;u++)c[u].apply(this,i)}return!0},n.prototype.addListener=function(e,t){var r;if(!o(t))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,o(t.listener)?t.listener:t),this._events[e]?s(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,s(this._events[e])&&!this._events[e].warned){var r;r=a(this._maxListeners)?n.defaultMaxListeners:this._maxListeners,r&&r>0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())}return this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}if(!o(t))throw TypeError("listener must be a function");var n=!1;return r.listener=t,this.on(e,r),this},n.prototype.removeListener=function(e,t){var r,n,i,a;if(!o(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],i=r.length,n=-1,r===t||o(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(s(r)){for(a=i;a-->0;)if(r[a]===t||r[a].listener&&r[a].listener===t){n=a;break}if(0>n)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],o(r))this.removeListener(e,r);else for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?o(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.listenerCount=function(e,t){var r;return r=e._events&&e._events[t]?o(e._events[t])?1:e._events[t].length:0}},{}],2:[function(e,t,r){function n(){l=!1,a.length?c=a.concat(c):f=-1,c.length&&o()}function o(){if(!l){var e=setTimeout(n);l=!0;for(var t=c.length;t;){for(a=c,c=[];++f<t;)a[f].run();f=-1,t=c.length}a=null,l=!1,clearTimeout(e)}}function i(e,t){this.fun=e,this.array=t}function s(){}var a,u=t.exports={},c=[],l=!1,f=-1;u.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new i(e,t)),1!==c.length||l||setTimeout(o,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={},u.on=s,u.addListener=s,u.once=s,u.off=s,u.removeListener=s,u.removeAllListeners=s,u.emit=s,u.binding=function(e){throw new Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(e){throw new Error("process.chdir is not supported")},u.umask=function(){return 0}},{}],3:[function(e,t,r){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,r,i){t=t||"&",r=r||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(t);var u=1e3;i&&"number"==typeof i.maxKeys&&(u=i.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var l=0;c>l;++l){var f,d,p,h,y=e[l].replace(a,"%20"),m=y.indexOf(r);m>=0?(f=y.substr(0,m),d=y.substr(m+1)):(f=y,d=""),p=decodeURIComponent(f),h=decodeURIComponent(d),n(s,p)?o(s[p])?s[p].push(h):s[p]=[s[p],h]:s[p]=h}return s};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],4:[function(e,t,r){"use strict";function n(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var o=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,r,a){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?n(s(e),function(s){var a=encodeURIComponent(o(s))+r;return i(e[s])?n(e[s],function(e){return a+encodeURIComponent(o(e))}).join(t):a+encodeURIComponent(o(e[s]))}).join(t):a?encodeURIComponent(o(a))+r+encodeURIComponent(o(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},{}],5:[function(e,t,r){"use strict";r.decode=r.parse=e(3),r.encode=r.stringify=e(4)},{3:3,4:4}],6:[function(e,t,r){function n(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function o(){var e=arguments,t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+r.humanize(this.diff),!t)return e;var n="color: "+this.color;e=[e[0],n,"color: inherit"].concat(Array.prototype.slice.call(e,1));var o=0,i=0;return e[0].replace(/%[a-z%]/g,function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))}),e.splice(i,0,n),e}function i(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(e){try{null==e?r.storage.removeItem("debug"):r.storage.debug=e}catch(t){}}function a(){var e;try{e=r.storage.debug}catch(t){}return e}function u(){try{return window.localStorage}catch(e){}}r=t.exports=e(7),r.log=i,r.formatArgs=o,r.save=s,r.load=a,r.useColors=n,r.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:u(),r.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],r.formatters.j=function(e){return JSON.stringify(e)},r.enable(a())},{7:7}],7:[function(e,t,r){function n(){return r.colors[l++%r.colors.length]}function o(e){function t(){}function o(){var e=o,t=+new Date,i=t-(c||t);e.diff=i,e.prev=c,e.curr=t,c=t,null==e.useColors&&(e.useColors=r.useColors()),null==e.color&&e.useColors&&(e.color=n());var s=Array.prototype.slice.call(arguments);s[0]=r.coerce(s[0]),"string"!=typeof s[0]&&(s=["%o"].concat(s));var a=0;s[0]=s[0].replace(/%([a-z%])/g,function(t,n){if("%%"===t)return t;a++;var o=r.formatters[n];if("function"==typeof o){var i=s[a];t=o.call(e,i),s.splice(a,1),a--}return t}),"function"==typeof r.formatArgs&&(s=r.formatArgs.apply(e,s));var u=o.log||r.log||console.log.bind(console);u.apply(e,s)}t.enabled=!1,o.enabled=!0;var i=r.enabled(e)?o:t;return i.namespace=e,i}function i(e){r.save(e);for(var t=(e||"").split(/[\s,]+/),n=t.length,o=0;n>o;o++)t[o]&&(e=t[o].replace(/\*/g,".*?"),"-"===e[0]?r.skips.push(new RegExp("^"+e.substr(1)+"$")):r.names.push(new RegExp("^"+e+"$")))}function s(){r.enable("")}function a(e){var t,n;for(t=0,n=r.skips.length;n>t;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;n>t;t++)if(r.names[t].test(e))return!0;return!1}function u(e){return e instanceof Error?e.stack||e.message:e}r=t.exports=o,r.coerce=u,r.disable=s,r.enable=i,r.enabled=a,r.humanize=e(8),r.names=[],r.skips=[],r.formatters={};var c,l=0},{8:8}],8:[function(e,t,r){function n(e){if(e=""+e,!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*f;case"days":case"day":case"d":return r*l;case"hours":case"hour":case"hrs":case"hr":case"h":return r*c;case"minutes":case"minute":case"mins":case"min":case"m":return r*u;case"seconds":case"second":case"secs":case"sec":case"s":return r*a;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r}}}}function o(e){return e>=l?Math.round(e/l)+"d":e>=c?Math.round(e/c)+"h":e>=u?Math.round(e/u)+"m":e>=a?Math.round(e/a)+"s":e+"ms"}function i(e){return s(e,l,"day")||s(e,c,"hour")||s(e,u,"minute")||s(e,a,"second")||e+" ms"}function s(e,t,r){return t>e?void 0:1.5*t>e?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}var a=1e3,u=60*a,c=60*u,l=24*c,f=365.25*l;t.exports=function(e,t){return t=t||{},"string"==typeof e?n(e):t["long"]?i(e):o(e)}},{}],9:[function(e,t,r){(function(r,n){(function(){"use strict";function o(e){return"function"==typeof e||"object"==typeof e&&null!==e}function i(e){return"function"==typeof e}function s(e){return"object"==typeof e&&null!==e}function a(e){Q=e}function u(e){W=e}function c(){var e=r.nextTick,t=r.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(t)&&"0"===t[1]&&"10"===t[2]&&(e=setImmediate),function(){e(h)}}function l(){return function(){K(h)}}function f(){var e=0,t=new z(h),r=document.createTextNode("");return t.observe(r,{characterData:!0}),function(){r.data=e=++e%2}}function d(){var e=new MessageChannel;return e.port1.onmessage=h,function(){e.port2.postMessage(0)}}function p(){return function(){setTimeout(h,1)}}function h(){for(var e=0;V>e;e+=2){var t=te[e],r=te[e+1];t(r),te[e]=void 0,te[e+1]=void 0}V=0}function y(){try{var t=e,r=t("vertx");return K=r.runOnLoop||r.runOnContext,l()}catch(n){return p()}}function m(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function g(){return new TypeError("A promises callback cannot return that same promise.")}function b(e){try{return e.then}catch(t){return ie.error=t,ie}}function w(e,t,r,n){try{e.call(t,r,n)}catch(o){return o}}function x(e,t,r){W(function(e){var n=!1,o=w(r,t,function(r){n||(n=!0,t!==r?T(e,r):S(e,r))},function(t){n||(n=!0,O(e,t))},"Settle: "+(e._label||" unknown promise"));!n&&o&&(n=!0,O(e,o))},e)}function _(e,t){t._state===ne?S(e,t._result):t._state===oe?O(e,t._result):k(t,void 0,function(t){T(e,t)},function(t){O(e,t)})}function j(e,t){if(t.constructor===e.constructor)_(e,t);else{var r=b(t);r===ie?O(e,ie.error):void 0===r?S(e,t):i(r)?x(e,t,r):S(e,t)}}function T(e,t){e===t?O(e,v()):o(t)?j(e,t):S(e,t)}function A(e){e._onerror&&e._onerror(e._result),P(e)}function S(e,t){e._state===re&&(e._result=t,e._state=ne,0!==e._subscribers.length&&W(P,e))}function O(e,t){e._state===re&&(e._state=oe,e._result=t,W(A,e))}function k(e,t,r,n){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+ne]=r,o[i+oe]=n,0===i&&e._state&&W(P,e)}function P(e){var t=e._subscribers,r=e._state;if(0!==t.length){for(var n,o,i=e._result,s=0;s<t.length;s+=3)n=t[s],o=t[s+r],n?q(r,n,o,i):o(i);e._subscribers.length=0}}function I(){this.error=null}function R(e,t){try{return e(t)}catch(r){return se.error=r,se}}function q(e,t,r,n){var o,s,a,u,c=i(r);if(c){if(o=R(r,n),o===se?(u=!0,s=o.error,o=null):a=!0,t===o)return void O(t,g())}else o=n,a=!0;t._state!==re||(c&&a?T(t,o):u?O(t,s):e===ne?S(t,o):e===oe&&O(t,o))}function E(e,t){try{t(function(t){T(e,t)},function(t){O(e,t)})}catch(r){O(e,r)}}function U(e,t){var r=this;r._instanceConstructor=e,r.promise=new e(m),r._validateInput(t)?(r._input=t,r.length=t.length,r._remaining=t.length,r._init(),0===r.length?S(r.promise,r._result):(r.length=r.length||0,r._enumerate(),0===r._remaining&&S(r.promise,r._result))):O(r.promise,r._validationError())}function C(e){return new ae(this,e).promise}function N(e){function t(e){T(o,e)}function r(e){O(o,e)}var n=this,o=new n(m);if(!$(e))return O(o,new TypeError("You must pass an array to race.")),o;for(var i=e.length,s=0;o._state===re&&i>s;s++)k(n.resolve(e[s]),void 0,t,r);return o}function L(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var r=new t(m);return T(r,e),r}function D(e){var t=this,r=new t(m);return O(r,e),r}function M(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function H(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function F(e){this._id=de++,this._state=void 0,this._result=void 0,this._subscribers=[],m!==e&&(i(e)||M(),this instanceof F||H(),E(this,e))}function J(){var e;if("undefined"!=typeof n)e=n;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var r=e.Promise;(!r||"[object Promise]"!==Object.prototype.toString.call(r.resolve())||r.cast)&&(e.Promise=pe)}var B;B=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var K,Q,G,$=B,V=0,W=({}.toString,function(e,t){te[V]=e,te[V+1]=t,V+=2,2===V&&(Q?Q(h):G())}),X="undefined"!=typeof window?window:void 0,Y=X||{},z=Y.MutationObserver||Y.WebKitMutationObserver,Z="undefined"!=typeof r&&"[object process]"==={}.toString.call(r),ee="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,te=new Array(1e3);G=Z?c():z?f():ee?d():void 0===X&&"function"==typeof e?y():p();var re=void 0,ne=1,oe=2,ie=new I,se=new I;U.prototype._validateInput=function(e){return $(e)},U.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},U.prototype._init=function(){this._result=new Array(this.length)};var ae=U;U.prototype._enumerate=function(){for(var e=this,t=e.length,r=e.promise,n=e._input,o=0;r._state===re&&t>o;o++)e._eachEntry(n[o],o)},U.prototype._eachEntry=function(e,t){var r=this,n=r._instanceConstructor;s(e)?e.constructor===n&&e._state!==re?(e._onerror=null,r._settledAt(e._state,t,e._result)):r._willSettleAt(n.resolve(e),t):(r._remaining--,r._result[t]=e)},U.prototype._settledAt=function(e,t,r){var n=this,o=n.promise;o._state===re&&(n._remaining--,e===oe?O(o,r):n._result[t]=r),0===n._remaining&&S(o,n._result)},U.prototype._willSettleAt=function(e,t){var r=this;k(e,void 0,function(e){r._settledAt(ne,t,e)},function(e){r._settledAt(oe,t,e)})};var ue=C,ce=N,le=L,fe=D,de=0,pe=F;F.all=ue,F.race=ce,F.resolve=le,F.reject=fe,F._setScheduler=a,F._setAsap=u,F._asap=W,F.prototype={constructor:F,then:function(e,t){var r=this,n=r._state;if(n===ne&&!e||n===oe&&!t)return this;var o=new this.constructor(m),i=r._result;if(n){var s=arguments[n-1];W(function(){q(n,o,s,i)})}else k(r,o,e,t);return o},"catch":function(e){return this.then(null,e)}};var he=J,ye={Promise:pe,polyfill:he};"function"==typeof define&&define.amd?define(function(){return ye}):"undefined"!=typeof t&&t.exports?t.exports=ye:"undefined"!=typeof this&&(this.ES6Promise=ye),he()}).call(this)}).call(this,e(2),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],10:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],11:[function(e,t,r){var n=e(14),o=e(18),i=e(30),s=i(n,o);t.exports=s},{14:14,18:18,30:30}],12:[function(e,t,r){function n(e,t){if("function"!=typeof e)throw new TypeError(o);return t=i(void 0===t?e.length-1:+t||0,0),function(){for(var r=arguments,n=-1,o=i(r.length-t,0),s=Array(o);++n<o;)s[n]=r[t+n];switch(t){case 0:return e.call(this,s);case 1:return e.call(this,r[0],s);case 2:return e.call(this,r[0],r[1],s)}var a=Array(t+1);for(n=-1;++n<t;)a[n]=r[n];return a[t]=s,e.apply(this,a)}}var o="Expected a function",i=Math.max;t.exports=n},{}],13:[function(e,t,r){function n(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}t.exports=n},{}],14:[function(e,t,r){function n(e,t){for(var r=-1,n=e.length;++r<n&&t(e[r],r,e)!==!1;);return e}t.exports=n},{}],15:[function(e,t,r){function n(e,t){return null==t?e:o(t,i(t),e)}var o=e(17),i=e(55);t.exports=n},{17:17,55:55}],16:[function(e,t,r){function n(e,t,r,y,m,v,g){var w;if(r&&(w=m?r(e,y,m):r(e)),void 0!==w)return w;if(!p(e))return e;var x=f(e);if(x){if(w=u(e),!t)return o(e,w)}else{var j=M.call(e),T=j==b;if(j!=_&&j!=h&&(!T||m))return L[j]?c(e,j,t):m?e:{};if(d(e))return m?e:{};if(w=l(T?{}:e),!t)return s(w,e)}v||(v=[]),g||(g=[]);for(var A=v.length;A--;)if(v[A]==e)return g[A];return v.push(e),g.push(w),(x?i:a)(e,function(o,i){w[i]=n(o,t,r,i,e,v,g)}),w}var o=e(13),i=e(14),s=e(15),a=e(21),u=e(33),c=e(34),l=e(35),f=e(47),d=e(37),p=e(50),h="[object Arguments]",y="[object Array]",m="[object Boolean]",v="[object Date]",g="[object Error]",b="[object Function]",w="[object Map]",x="[object Number]",_="[object Object]",j="[object RegExp]",T="[object Set]",A="[object String]",S="[object WeakMap]",O="[object ArrayBuffer]",k="[object Float32Array]",P="[object Float64Array]",I="[object Int8Array]",R="[object Int16Array]",q="[object Int32Array]",E="[object Uint8Array]",U="[object Uint8ClampedArray]",C="[object Uint16Array]",N="[object Uint32Array]",L={};L[h]=L[y]=L[O]=L[m]=L[v]=L[k]=L[P]=L[I]=L[R]=L[q]=L[x]=L[_]=L[j]=L[A]=L[E]=L[U]=L[C]=L[N]=!0,L[g]=L[b]=L[w]=L[T]=L[S]=!1;var D=Object.prototype,M=D.toString;t.exports=n},{13:13,14:14,15:15,21:21,33:33,34:34,35:35,37:37,47:47,50:50}],17:[function(e,t,r){function n(e,t,r){r||(r={});for(var n=-1,o=t.length;++n<o;){var i=t[n];r[i]=e[i]}return r}t.exports=n},{}],18:[function(e,t,r){var n=e(21),o=e(28),i=o(n);t.exports=i},{21:21,28:28}],19:[function(e,t,r){var n=e(29),o=n();t.exports=o},{29:29}],20:[function(e,t,r){function n(e,t){return o(e,t,i)}var o=e(19),i=e(56);t.exports=n},{19:19,56:56}],21:[function(e,t,r){function n(e,t){return o(e,t,i)}var o=e(19),i=e(55);t.exports=n},{19:19,55:55}],22:[function(e,t,r){function n(e,t,r,d,p){if(!u(e))return e;var h=a(t)&&(s(t)||l(t)),y=h?void 0:f(t);return o(y||t,function(o,s){if(y&&(s=o,o=t[s]),c(o))d||(d=[]),p||(p=[]),i(e,t,s,n,r,d,p);else{var a=e[s],u=r?r(a,o,s,e,t):void 0,l=void 0===u;l&&(u=o),void 0===u&&(!h||s in e)||!l&&(u===u?u===a:a!==a)||(e[s]=u)}}),e}var o=e(14),i=e(23),s=e(47),a=e(36),u=e(50),c=e(41),l=e(53),f=e(55);t.exports=n},{14:14,23:23,36:36,41:41,47:47,50:50,53:53,55:55}],23:[function(e,t,r){function n(e,t,r,n,f,d,p){for(var h=d.length,y=t[r];h--;)if(d[h]==y)return void(e[r]=p[h]);var m=e[r],v=f?f(m,y,r,e,t):void 0,g=void 0===v;g&&(v=y,a(y)&&(s(y)||c(y))?v=s(m)?m:a(m)?o(m):[]:u(y)||i(y)?v=i(m)?l(m):u(m)?m:{}:g=!1),d.push(y),p.push(v),g?e[r]=n(v,y,f,d,p):(v===v?v!==m:m===m)&&(e[r]=v)}var o=e(13),i=e(46),s=e(47),a=e(36),u=e(51),c=e(53),l=e(54);t.exports=n},{13:13,36:36,46:46,47:47,51:51,53:53,54:54}],24:[function(e,t,r){function n(e){return function(t){return null==t?void 0:o(t)[e]}}var o=e(43);t.exports=n},{43:43}],25:[function(e,t,r){function n(e,t,r){if("function"!=typeof e)return o;if(void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 3:return function(r,n,o){return e.call(t,r,n,o)};case 4:return function(r,n,o,i){return e.call(t,r,n,o,i)};case 5:return function(r,n,o,i,s){return e.call(t,r,n,o,i,s)}}return function(){return e.apply(t,arguments)}}var o=e(59);t.exports=n},{59:59}],26:[function(e,t,r){(function(e){function r(e){var t=new n(e.byteLength),r=new o(t);return r.set(new o(e)),t}var n=e.ArrayBuffer,o=e.Uint8Array;t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],27:[function(e,t,r){function n(e){return s(function(t,r){var n=-1,s=null==t?0:r.length,a=s>2?r[s-2]:void 0,u=s>2?r[2]:void 0,c=s>1?r[s-1]:void 0;for("function"==typeof a?(a=o(a,c,5),s-=2):(a="function"==typeof c?c:void 0,s-=a?1:0),u&&i(r[0],r[1],u)&&(a=3>s?void 0:a,s=1);++n<s;){var l=r[n];l&&e(t,l,a)}return t})}var o=e(25),i=e(39),s=e(12);t.exports=n},{12:12,25:25,39:39}],28:[function(e,t,r){function n(e,t){return function(r,n){var a=r?o(r):0;if(!i(a))return e(r,n);for(var u=t?a:-1,c=s(r);(t?u--:++u<a)&&n(c[u],u,c)!==!1;);return r}}var o=e(31),i=e(40),s=e(43);t.exports=n},{31:31,40:40,43:43}],29:[function(e,t,r){function n(e){return function(t,r,n){for(var i=o(t),s=n(t),a=s.length,u=e?a:-1;e?u--:++u<a;){var c=s[u];if(r(i[c],c,i)===!1)break}return t}}var o=e(43);t.exports=n},{43:43}],30:[function(e,t,r){function n(e,t){return function(r,n,s){return"function"==typeof n&&void 0===s&&i(r)?e(r,n):t(r,o(n,s,3))}}var o=e(25),i=e(47);t.exports=n},{25:25,47:47}],31:[function(e,t,r){var n=e(24),o=n("length");t.exports=o},{24:24}],32:[function(e,t,r){function n(e,t){var r=null==e?void 0:e[t];return o(r)?r:void 0}var o=e(49);t.exports=n},{49:49}],33:[function(e,t,r){function n(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&i.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var o=Object.prototype,i=o.hasOwnProperty;t.exports=n},{}],34:[function(e,t,r){(function(r){function n(e,t,r){var n=e.constructor;switch(t){case l:return o(e);case i:case s:return new n(+e);case f:case d:case p:case h:case y:case m:case v:case g:case b:n instanceof n&&(n=_[t]);var x=e.buffer;return new n(r?o(x):x,e.byteOffset,e.length);case a:case c:return new n(e);case u:var j=new n(e.source,w.exec(e));j.lastIndex=e.lastIndex}return j}var o=e(26),i="[object Boolean]",s="[object Date]",a="[object Number]",u="[object RegExp]",c="[object String]",l="[object ArrayBuffer]",f="[object Float32Array]",d="[object Float64Array]",p="[object Int8Array]",h="[object Int16Array]",y="[object Int32Array]",m="[object Uint8Array]",v="[object Uint8ClampedArray]",g="[object Uint16Array]",b="[object Uint32Array]",w=/\w*$/,x=r.Uint8Array,_={};_[f]=r.Float32Array,_[d]=r.Float64Array,_[p]=r.Int8Array,_[h]=r.Int16Array,_[y]=r.Int32Array,_[m]=x,_[v]=r.Uint8ClampedArray,_[g]=r.Uint16Array,_[b]=r.Uint32Array,t.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{26:26}],35:[function(e,t,r){function n(e){var t=e.constructor;return"function"==typeof t&&t instanceof t||(t=Object),new t}t.exports=n},{}],36:[function(e,t,r){function n(e){return null!=e&&i(o(e))}var o=e(31),i=e(40);t.exports=n},{31:31,40:40}],37:[function(e,t,r){var n=function(){try{Object({toString:0}+"")}catch(e){return function(){return!1}}return function(e){return"function"!=typeof e.toString&&"string"==typeof(e+"")}}();t.exports=n},{}],38:[function(e,t,r){function n(e,t){return e="number"==typeof e||o.test(e)?+e:-1,t=null==t?i:t,e>-1&&e%1==0&&t>e}var o=/^\d+$/,i=9007199254740991;t.exports=n},{}],39:[function(e,t,r){function n(e,t,r){if(!s(r))return!1;var n=typeof t;if("number"==n?o(r)&&i(t,r.length):"string"==n&&t in r){var a=r[t];return e===e?e===a:a!==a}return!1}var o=e(36),i=e(38),s=e(50);t.exports=n},{36:36,38:38,50:50}],40:[function(e,t,r){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&o>=e}var o=9007199254740991;t.exports=n},{}],41:[function(e,t,r){function n(e){return!!e&&"object"==typeof e}t.exports=n},{}],42:[function(e,t,r){function n(e){for(var t=c(e),r=t.length,n=r&&e.length,l=!!n&&a(n)&&(i(e)||o(e)||u(e)),d=-1,p=[];++d<r;){var h=t[d];(l&&s(h,n)||f.call(e,h))&&p.push(h)}return p}var o=e(46),i=e(47),s=e(38),a=e(40),u=e(52),c=e(56),l=Object.prototype,f=l.hasOwnProperty;t.exports=n},{38:38,40:40,46:46,47:47,52:52,56:56}],43:[function(e,t,r){function n(e){if(s.unindexedChars&&i(e)){for(var t=-1,r=e.length,n=Object(e);++t<r;)n[t]=e.charAt(t);return n}return o(e)?e:Object(e)}var o=e(50),i=e(52),s=e(58);t.exports=n},{50:50,52:52,58:58}],44:[function(e,t,r){function n(e,t,r,n){return t&&"boolean"!=typeof t&&s(e,t,r)?t=!1:"function"==typeof t&&(n=r,r=t,t=!1),"function"==typeof r?o(e,t,i(r,n,1)):o(e,t)}var o=e(16),i=e(25),s=e(39);t.exports=n},{16:16,25:25,39:39}],45:[function(e,t,r){function n(e,t,r){return"function"==typeof t?o(e,!0,i(t,r,1)):o(e,!0)}var o=e(16),i=e(25);t.exports=n},{16:16,25:25}],46:[function(e,t,r){function n(e){return i(e)&&o(e)&&a.call(e,"callee")&&!u.call(e,"callee")}var o=e(36),i=e(41),s=Object.prototype,a=s.hasOwnProperty,u=s.propertyIsEnumerable;t.exports=n},{36:36,41:41}],47:[function(e,t,r){var n=e(32),o=e(40),i=e(41),s="[object Array]",a=Object.prototype,u=a.toString,c=n(Array,"isArray"),l=c||function(e){return i(e)&&o(e.length)&&u.call(e)==s};t.exports=l},{32:32,40:40,41:41}],48:[function(e,t,r){function n(e){return o(e)&&a.call(e)==i}var o=e(50),i="[object Function]",s=Object.prototype,a=s.toString;t.exports=n},{50:50}],49:[function(e,t,r){function n(e){return null==e?!1:o(e)?f.test(c.call(e)):s(e)&&(i(e)?f:a).test(e)}var o=e(48),i=e(37),s=e(41),a=/^\[object .+?Constructor\]$/,u=Object.prototype,c=Function.prototype.toString,l=u.hasOwnProperty,f=RegExp("^"+c.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=n},{37:37,41:41,48:48}],50:[function(e,t,r){function n(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}t.exports=n},{}],51:[function(e,t,r){function n(e){var t;if(!a(e)||d.call(e)!=c||s(e)||i(e)||!f.call(e,"constructor")&&(t=e.constructor,"function"==typeof t&&!(t instanceof t)))return!1;var r;return u.ownLast?(o(e,function(e,t,n){return r=f.call(n,t),!1}),r!==!1):(o(e,function(e,t){r=t}),void 0===r||f.call(e,r))}var o=e(20),i=e(46),s=e(37),a=e(41),u=e(58),c="[object Object]",l=Object.prototype,f=l.hasOwnProperty,d=l.toString;t.exports=n},{20:20,37:37,41:41,46:46,58:58}],52:[function(e,t,r){function n(e){return"string"==typeof e||o(e)&&a.call(e)==i}var o=e(41),i="[object String]",s=Object.prototype,a=s.toString;t.exports=n},{41:41}],53:[function(e,t,r){function n(e){return i(e)&&o(e.length)&&!!P[R.call(e)]}var o=e(40),i=e(41),s="[object Arguments]",a="[object Array]",u="[object Boolean]",c="[object Date]",l="[object Error]",f="[object Function]",d="[object Map]",p="[object Number]",h="[object Object]",y="[object RegExp]",m="[object Set]",v="[object String]",g="[object WeakMap]",b="[object ArrayBuffer]",w="[object Float32Array]",x="[object Float64Array]",_="[object Int8Array]",j="[object Int16Array]",T="[object Int32Array]",A="[object Uint8Array]",S="[object Uint8ClampedArray]",O="[object Uint16Array]",k="[object Uint32Array]",P={};P[w]=P[x]=P[_]=P[j]=P[T]=P[A]=P[S]=P[O]=P[k]=!0,P[s]=P[a]=P[b]=P[u]=P[c]=P[l]=P[f]=P[d]=P[p]=P[h]=P[y]=P[m]=P[v]=P[g]=!1;var I=Object.prototype,R=I.toString;t.exports=n},{40:40,41:41}],54:[function(e,t,r){function n(e){return o(e,i(e))}var o=e(17),i=e(56);t.exports=n},{17:17,56:56}],55:[function(e,t,r){var n=e(32),o=e(36),i=e(50),s=e(42),a=e(58),u=n(Object,"keys"),c=u?function(e){var t=null==e?void 0:e.constructor;return"function"==typeof t&&t.prototype===e||("function"==typeof e?a.enumPrototypes:o(e))?s(e):i(e)?u(e):[]}:s;t.exports=c},{32:32,36:36,42:42,50:50,58:58}],56:[function(e,t,r){function n(e){if(null==e)return[];l(e)||(e=Object(e));var t=e.length;t=t&&c(t)&&(s(e)||i(e)||f(e))&&t||0;for(var r=e.constructor,n=-1,o=a(r)&&r.prototype||T,p=o===e,h=Array(t),y=t>0,v=d.enumErrorProps&&(e===j||e instanceof Error),g=d.enumPrototypes&&a(e);++n<t;)h[n]=n+""; | ||
for(var w in e)g&&"prototype"==w||v&&("message"==w||"name"==w)||y&&u(w,t)||"constructor"==w&&(p||!S.call(e,w))||h.push(w);if(d.nonEnumShadows&&e!==T){var P=e===A?x:e===j?m:O.call(e),I=k[P]||k[b];for(P==b&&(o=T),t=_.length;t--;){w=_[t];var R=I[w];p&&R||(R?!S.call(e,w):e[w]===o[w])||h.push(w)}}return h}var o=e(14),i=e(46),s=e(47),a=e(48),u=e(38),c=e(40),l=e(50),f=e(52),d=e(58),p="[object Array]",h="[object Boolean]",y="[object Date]",m="[object Error]",v="[object Function]",g="[object Number]",b="[object Object]",w="[object RegExp]",x="[object String]",_=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],j=Error.prototype,T=Object.prototype,A=String.prototype,S=T.hasOwnProperty,O=T.toString,k={};k[p]=k[y]=k[g]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},k[h]=k[x]={constructor:!0,toString:!0,valueOf:!0},k[m]=k[v]=k[w]={constructor:!0,toString:!0},k[b]={constructor:!0},o(_,function(e){for(var t in k)if(S.call(k,t)){var r=k[t];r[e]=S.call(r,e)}}),t.exports=n},{14:14,38:38,40:40,46:46,47:47,48:48,50:50,52:52,58:58}],57:[function(e,t,r){var n=e(22),o=e(27),i=o(n);t.exports=i},{22:22,27:27}],58:[function(e,t,r){var n=Array.prototype,o=Error.prototype,i=Object.prototype,s=i.propertyIsEnumerable,a=n.splice,u={};!function(e){var t=function(){this.x=e},r={0:e,length:e},n=[];t.prototype={valueOf:e,y:e};for(var i in new t)n.push(i);u.enumErrorProps=s.call(o,"message")||s.call(o,"name"),u.enumPrototypes=s.call(t,"prototype"),u.nonEnumShadows=!/valueOf/.test(n),u.ownLast="x"!=n[0],u.spliceObjects=(a.call(r,0,1),!r[0]),u.unindexedChars="x"[0]+Object("x")[0]!="xx"}(1,0),t.exports=u},{}],59:[function(e,t,r){function n(e){return e}t.exports=n},{}],60:[function(e,t,r){(function(r){"use strict";function n(t,r,n){var s=e(6)("algoliasearch"),a=e(44),u=e(47),c="Usage: algoliasearch(applicationID, apiKey, opts)";if(!t)throw new f.AlgoliaSearchError("Please provide an application ID. "+c);if(!r)throw new f.AlgoliaSearchError("Please provide an API key. "+c);this.applicationID=t,this.apiKey=r;var l=[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},n=n||{};var d=n.protocol||"https:",p=void 0===n.timeout?2e3:n.timeout;if(/:$/.test(d)||(d+=":"),"http:"!==n.protocol&&"https:"!==n.protocol)throw new f.AlgoliaSearchError("protocol must be `http:` or `https:` (was `"+n.protocol+"`)");n.hosts?u(n.hosts)?(this.hosts.read=a(n.hosts),this.hosts.write=a(n.hosts)):(this.hosts.read=a(n.hosts.read),this.hosts.write=a(n.hosts.write)):(this.hosts.read=[this.applicationID+"-dsn.algolia.net"].concat(l),this.hosts.write=[this.applicationID+".algolia.net"].concat(l)),this.hosts.read=o(this.hosts.read,i(d)),this.hosts.write=o(this.hosts.write,i(d)),this.requestTimeout=p,this.extraHeaders=[],this.cache={},this._ua=n._ua,this._useCache=void 0===n._useCache?!0:n._useCache,this._setTimeout=n._setTimeout,s("init done, %j",this)}function o(e,t){for(var r=[],n=0;n<e.length;++n)r.push(t(e[n],n));return r}function i(e){return function(t){return e+"//"+t.toLowerCase()}}function s(){var e="Not implemented in this environment.\nIf you feel this is a mistake, write to support@algolia.com";throw new f.AlgoliaSearchError(e)}function a(e,t){var r=e.toLowerCase().replace(".","").replace("()","");return"algoliasearch: `"+e+"` was replaced by `"+t+"`. Please see https://github.com/algolia/algoliasearch-client-js/wiki/Deprecated#"+r}function u(e,t){t(e,0)}function c(e,t){function r(){return n||(console.log(t),n=!0),e.apply(this,arguments)}var n=!1;return r}function l(e){if(void 0===Array.prototype.toJSON)return JSON.stringify(e);var t=Array.prototype.toJSON;delete Array.prototype.toJSON;var r=JSON.stringify(e);return Array.prototype.toJSON=t,r}t.exports=n;var f=e(67);n.prototype={deleteIndex:function(e,t){return this._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(e),hostType:"write",callback:t})},moveIndex:function(e,t,r){var n={operation:"move",destination:t};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(e)+"/operation",body:n,hostType:"write",callback:r})},copyIndex:function(e,t,r){var n={operation:"copy",destination:t};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(e)+"/operation",body:n,hostType:"write",callback:r})},getLogs:function(e,t,r){return 0===arguments.length||"function"==typeof e?(r=e,e=0,t=10):(1===arguments.length||"function"==typeof t)&&(r=t,t=10),this._jsonRequest({method:"GET",url:"/1/logs?offset="+e+"&length="+t,hostType:"read",callback:r})},listIndexes:function(e,t){var r="";return void 0===e||"function"==typeof e?t=e:r="?page="+e,this._jsonRequest({method:"GET",url:"/1/indexes"+r,hostType:"read",callback:t})},initIndex:function(e){return new this.Index(this,e)},listUserKeys:function(e){return this._jsonRequest({method:"GET",url:"/1/keys",hostType:"read",callback:e})},getUserKeyACL:function(e,t){return this._jsonRequest({method:"GET",url:"/1/keys/"+e,hostType:"read",callback:t})},deleteUserKey:function(e,t){return this._jsonRequest({method:"DELETE",url:"/1/keys/"+e,hostType:"write",callback:t})},addUserKey:function(e,t,r){(1===arguments.length||"function"==typeof t)&&(r=t,t=null);var n={acl:e};return t&&(n.validity=t.validity,n.maxQueriesPerIPPerHour=t.maxQueriesPerIPPerHour,n.maxHitsPerQuery=t.maxHitsPerQuery,n.indexes=t.indexes,n.description=t.description,t.queryParameters&&(n.queryParameters=this._getSearchParams(t.queryParameters,"")),n.referers=t.referers),this._jsonRequest({method:"POST",url:"/1/keys",body:n,hostType:"write",callback:r})},addUserKeyWithValidity:c(function(e,t,r){return this.addUserKey(e,t,r)},a("client.addUserKeyWithValidity()","client.addUserKey()")),updateUserKey:function(e,t,r,n){(2===arguments.length||"function"==typeof r)&&(n=r,r=null);var o={acl:t};return r&&(o.validity=r.validity,o.maxQueriesPerIPPerHour=r.maxQueriesPerIPPerHour,o.maxHitsPerQuery=r.maxHitsPerQuery,o.indexes=r.indexes,o.description=r.description,r.queryParameters&&(o.queryParameters=this._getSearchParams(r.queryParameters,"")),o.referers=r.referers),this._jsonRequest({method:"PUT",url:"/1/keys/"+e,body:o,hostType:"write",callback:n})},setSecurityTags:function(e){if("[object Array]"===Object.prototype.toString.call(e)){for(var t=[],r=0;r<e.length;++r)if("[object Array]"===Object.prototype.toString.call(e[r])){for(var n=[],o=0;o<e[r].length;++o)n.push(e[r][o]);t.push("("+n.join(",")+")")}else t.push(e[r]);e=t.join(",")}this.securityTags=e},setUserToken:function(e){this.userToken=e},startQueriesBatch:c(function(){this._batch=[]},a("client.startQueriesBatch()","client.search()")),addQueryInBatch:c(function(e,t,r){this._batch.push({indexName:e,query:t,params:r})},a("client.addQueryInBatch()","client.search()")),clearCache:function(){this.cache={}},sendQueriesBatch:c(function(e){return this.search(this._batch,e)},a("client.sendQueriesBatch()","client.search()")),setRequestTimeout:function(e){e&&(this.requestTimeout=parseInt(e,10))},search:function(e,t){var r=this,n={requests:o(e,function(e){var t="";return void 0!==e.query&&(t+="query="+encodeURIComponent(e.query)),{indexName:e.indexName,params:r._getSearchParams(e.params,t)}})};return this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",body:n,hostType:"read",callback:t})},batch:function(e,t){return this._jsonRequest({method:"POST",url:"/1/indexes/*/batch",body:{requests:e},hostType:"write",callback:t})},destroy:s,enableRateLimitForward:s,disableRateLimitForward:s,useSecuredAPIKey:s,disableSecuredAPIKey:s,generateSecuredApiKey:s,Index:function(e,t){this.indexName=t,this.as=e,this.typeAheadArgs=null,this.typeAheadValueOption=null,this.cache={}},setExtraHeader:function(e,t){this.extraHeaders.push({name:e.toLowerCase(),value:t})},_sendQueriesBatch:function(e,t){function r(){for(var t="",r=0;r<e.requests.length;++r){var n="/1/indexes/"+encodeURIComponent(e.requests[r].indexName)+"?"+e.requests[r].params;t+=r+"="+encodeURIComponent(n)+"&"}return t}return this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",body:e,hostType:"read",fallback:{method:"GET",url:"/1/indexes/*",body:{params:r()}},callback:t})},_jsonRequest:function(t){function n(e,u){function p(e){var t=e&&e.body&&e.body.message&&e.body.status||e.statusCode||e&&e.body&&200;i("received response: statusCode: %s, computed statusCode: %d, headers: %j",e.statusCode,t,e.headers),r.env.DEBUG&&-1!==r.env.DEBUG.indexOf("debugBody")&&i("body: %j",e.body);var n=200===t||201===t,o=!n&&4!==Math.floor(t/100)&&1!==Math.floor(t/100);if(a._useCache&&n&&s&&(s[m]=e.body),n)return e.body;if(o)return c+=1,y();var u=new f.AlgoliaSearchError(e.body&&e.body.message);return a._promise.reject(u)}function h(r){return i("error: %s, stack: %s",r.message,r.stack),r instanceof f.AlgoliaSearchError||(r=new f.Unknown(r&&r.message,r)),c+=1,r instanceof f.Unknown||r instanceof f.UnparsableJSON||!e.fallback&&r instanceof f.Network||c>=a.hosts[t.hostType].length&&(d||!t.fallback||!a._request.fallback)?a._promise.reject(r):(a.hostIndex[t.hostType]=++a.hostIndex[t.hostType]%a.hosts[t.hostType].length,r instanceof f.RequestTimeout?y():(a._request.fallback&&!a.useFallback&&(a.useFallback=!0),n(e,u)))}function y(){return a.hostIndex[t.hostType]=++a.hostIndex[t.hostType]%a.hosts[t.hostType].length,u.timeout=a.requestTimeout*(c+1),n(e,u)}var m;if(a._useCache&&(m=t.url),a._useCache&&o&&(m+="_body_"+u.body),a._useCache&&s&&void 0!==s[m])return i("serving response from cache"),a._promise.resolve(JSON.parse(l(s[m])));if(c>=a.hosts[t.hostType].length||a.useFallback&&!d)return t.fallback&&a._request.fallback&&!d?(i("switching to fallback"),c=0,u.method=t.fallback.method,u.url=t.fallback.url,u.jsonBody=t.fallback.body,u.jsonBody&&(u.body=l(u.jsonBody)),u.timeout=a.requestTimeout*(c+1),a.hostIndex[t.hostType]=0,d=!0,n(a._request.fallback,u)):(i("could not get any response"),a._promise.reject(new f.AlgoliaSearchError("Cannot connect to the AlgoliaSearch API. Send an email to support@algolia.com to report and resolve the issue. Application id was: "+a.applicationID)));var v=a.hosts[t.hostType][a.hostIndex[t.hostType]]+u.url,g={body:o,jsonBody:t.body,method:u.method,headers:a._computeRequestHeaders(),timeout:u.timeout,debug:i};return i("method: %s, url: %s, headers: %j, timeout: %d",g.method,v,g.headers,g.timeout),e===a._request.fallback&&i("using fallback"),e.call(a,v,g).then(p,h)}var o,i=e(6)("algoliasearch:"+t.url),s=t.cache,a=this,c=0,d=!1;void 0!==t.body&&(o=l(t.body)),i("request start");var p=a.useFallback&&t.fallback,h=p?t.fallback:t,y=n(p?a._request.fallback:a._request,{url:h.url,method:h.method,body:o,jsonBody:t.body,timeout:a.requestTimeout*(c+1)});return t.callback?void y.then(function(e){u(function(){t.callback(null,e)},a._setTimeout||setTimeout)},function(e){u(function(){t.callback(e)},a._setTimeout||setTimeout)}):y},_getSearchParams:function(e,t){if(this._isUndefined(e)||null===e)return t;for(var r in e)null!==r&&void 0!==e[r]&&e.hasOwnProperty(r)&&(t+=""===t?"":"&",t+=r+"="+encodeURIComponent("[object Array]"===Object.prototype.toString.call(e[r])?l(e[r]):e[r]));return t},_isUndefined:function(e){return void 0===e},_computeRequestHeaders:function(){var t=e(11),r={"x-algolia-api-key":this.apiKey,"x-algolia-application-id":this.applicationID,"x-algolia-agent":this._ua};return this.userToken&&(r["x-algolia-usertoken"]=this.userToken),this.securityTags&&(r["x-algolia-tagfilters"]=this.securityTags),this.extraHeaders&&t(this.extraHeaders,function(e){r[e.name]=e.value}),r}},n.prototype.Index.prototype={clearCache:function(){this.cache={}},addObject:function(e,t,r){var n=this;return(1===arguments.length||"function"==typeof t)&&(r=t,t=void 0),this.as._jsonRequest({method:void 0!==t?"PUT":"POST",url:"/1/indexes/"+encodeURIComponent(n.indexName)+(void 0!==t?"/"+encodeURIComponent(t):""),body:e,hostType:"write",callback:r})},addObjects:function(e,t){for(var r=this,n={requests:[]},o=0;o<e.length;++o){var i={action:"addObject",body:e[o]};n.requests.push(i)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/batch",body:n,hostType:"write",callback:t})},getObject:function(e,t,r){var n=this;(1===arguments.length||"function"==typeof t)&&(r=t,t=void 0);var o="";if(void 0!==t){o="?attributes=";for(var i=0;i<t.length;++i)0!==i&&(o+=","),o+=t[i]}return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/"+encodeURIComponent(e)+o,hostType:"read",callback:r})},getObjects:function(e,t,r){var n=this;(1===arguments.length||"function"==typeof t)&&(r=t,t=void 0);var i={requests:o(e,function(e){var r={indexName:n.indexName,objectID:e};return t&&(r.attributesToRetrieve=t.join(",")),r})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/*/objects",hostType:"read",body:i,callback:r})},partialUpdateObject:function(e,t){var r=this;return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/"+encodeURIComponent(e.objectID)+"/partial",body:e,hostType:"write",callback:t})},partialUpdateObjects:function(e,t){for(var r=this,n={requests:[]},o=0;o<e.length;++o){var i={action:"partialUpdateObject",objectID:e[o].objectID,body:e[o]};n.requests.push(i)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/batch",body:n,hostType:"write",callback:t})},saveObject:function(e,t){var r=this;return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/"+encodeURIComponent(e.objectID),body:e,hostType:"write",callback:t})},saveObjects:function(e,t){for(var r=this,n={requests:[]},o=0;o<e.length;++o){var i={action:"updateObject",objectID:e[o].objectID,body:e[o]};n.requests.push(i)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/batch",body:n,hostType:"write",callback:t})},deleteObject:function(e,t){if("function"==typeof e||"string"!=typeof e&&"number"!=typeof e){var r=new f.AlgoliaSearchError("Cannot delete an object without an objectID");return t=e,"function"==typeof t?t(r):this.as._promise.reject(r)}var n=this;return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/"+encodeURIComponent(e),hostType:"write",callback:t})},deleteObjects:function(e,t){var r=this,n={requests:o(e,function(e){return{action:"deleteObject",objectID:e,body:{objectID:e}}})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/batch",body:n,hostType:"write",callback:t})},deleteByQuery:function(e,t,r){function n(e){if(0===e.nbHits)return e;var t=o(e.hits,function(e){return e.objectID});return l.deleteObjects(t).then(i).then(s)}function i(e){return l.waitTask(e.taskID)}function s(){return l.deleteByQuery(e,t)}function a(){u(function(){r(null)},f._setTimeout||setTimeout)}function c(e){u(function(){r(e)},f._setTimeout||setTimeout)}var l=this,f=l.as;(1===arguments.length||"function"==typeof t)&&(r=t,t={}),t.attributesToRetrieve="objectID",t.hitsPerPage=1e3,this.clearCache();var d=this.search(e,t).then(n);return r?void d.then(a,c):d},search:function(e,t,r){if("function"==typeof e&&"object"==typeof t||"object"==typeof r)throw new f.AlgoliaSearchError("index.search usage is index.search(query, params, cb)");0===arguments.length||"function"==typeof e?(r=e,e=""):(1===arguments.length||"function"==typeof t)&&(r=t,t=void 0),"object"==typeof e&&null!==e?(t=e,e=void 0):(void 0===e||null===e)&&(e="");var n="";return void 0!==e&&(n+="query="+encodeURIComponent(e)),void 0!==t&&(n=this.as._getSearchParams(t,n)),this._search(n,r)},browse:function(t,r,n){var o,i,s=e(57),a=this;0===arguments.length||1===arguments.length&&"function"==typeof arguments[0]?(o=0,n=arguments[0],t=void 0):"number"==typeof arguments[0]?(o=arguments[0],"number"==typeof arguments[1]?i=arguments[1]:"function"==typeof arguments[1]&&(n=arguments[1],i=void 0),t=void 0,r=void 0):"object"==typeof arguments[0]?("function"==typeof arguments[1]&&(n=arguments[1]),r=arguments[0],t=void 0):"string"==typeof arguments[0]&&"function"==typeof arguments[1]&&(n=arguments[1],r=void 0),r=s({},r||{},{page:o,hitsPerPage:i,query:t});var u=this.as._getSearchParams(r,"");return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(a.indexName)+"/browse?"+u,hostType:"read",callback:n})},browseFrom:function(e,t){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse?cursor="+e,hostType:"read",callback:t})},browseAll:function(t,r){function n(e){if(!a._stopped){var t;t=void 0!==e?"cursor="+encodeURIComponent(e):l,u._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(c.indexName)+"/browse?"+t,hostType:"read",callback:o})}}function o(e,t){return a._stopped?void 0:e?void a._error(e):(a._result(t),void 0===t.cursor?void a._end():void n(t.cursor))}"object"==typeof t&&(r=t,t=void 0);var i=e(57),s=e(61),a=new s,u=this.as,c=this,l=u._getSearchParams(i({},r||{},{query:t}),"");return n(),a},ttAdapter:function(e){var t=this;return function(r,n,o){var i;i="function"==typeof o?o:n,t.search(r,e,function(e,t){return e?void i(e):void i(t.hits)})}},waitTask:function(e,t){function r(){return l._jsonRequest({method:"GET",hostType:"read",url:"/1/indexes/"+encodeURIComponent(c.indexName)+"/task/"+e}).then(function(e){a++;var t=i*a*a;return t>s&&(t=s),"published"!==e.status?l._promise.delay(t).then(r):e})}function n(e){u(function(){t(null,e)},l._setTimeout||setTimeout)}function o(e){u(function(){t(e)},l._setTimeout||setTimeout)}var i=100,s=5e3,a=0,c=this,l=c.as,f=r();return t?void f.then(n,o):f},clearIndex:function(e){var t=this;return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/clear",hostType:"write",callback:e})},getSettings:function(e){var t=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/settings",hostType:"read",callback:e})},setSettings:function(e,t){var r=this;return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/settings",hostType:"write",body:e,callback:t})},listUserKeys:function(e){var t=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/keys",hostType:"read",callback:e})},getUserKeyACL:function(e,t){var r=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/keys/"+e,hostType:"read",callback:t})},deleteUserKey:function(e,t){var r=this;return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/keys/"+e,hostType:"write",callback:t})},addUserKey:function(e,t,r){(1===arguments.length||"function"==typeof t)&&(r=t,t=null);var n={acl:e};return t&&(n.validity=t.validity,n.maxQueriesPerIPPerHour=t.maxQueriesPerIPPerHour,n.maxHitsPerQuery=t.maxHitsPerQuery,n.description=t.description,t.queryParameters&&(n.queryParameters=this.as._getSearchParams(t.queryParameters,"")),n.referers=t.referers),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",body:n,hostType:"write",callback:r})},addUserKeyWithValidity:c(function(e,t,r){return this.addUserKey(e,t,r)},a("index.addUserKeyWithValidity()","index.addUserKey()")),updateUserKey:function(e,t,r,n){(2===arguments.length||"function"==typeof r)&&(n=r,r=null);var o={acl:t};return r&&(o.validity=r.validity,o.maxQueriesPerIPPerHour=r.maxQueriesPerIPPerHour,o.maxHitsPerQuery=r.maxHitsPerQuery,o.description=r.description,r.queryParameters&&(o.queryParameters=this.as._getSearchParams(r.queryParameters,"")),o.referers=r.referers),this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+e,body:o,hostType:"write",callback:n})},_search:function(e,t){return this.as._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/query",body:{params:e},hostType:"read",fallback:{method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName),body:{params:e}},callback:t})},as:null,indexName:null,typeAheadArgs:null,typeAheadValueOption:null}}).call(this,e(2))},{11:11,2:2,44:44,47:47,57:57,6:6,61:61,67:67}],61:[function(e,t,r){"use strict";function n(){}t.exports=n;var o=e(10),i=e(1).EventEmitter;o(n,i),n.prototype.stop=function(){this._stopped=!0,this._clean()},n.prototype._end=function(){this.emit("end"),this._clean()},n.prototype._error=function(e){this.emit("error",e),this._clean()},n.prototype._result=function(e){this.emit("result",e)},n.prototype._clean=function(){this.removeAllListeners("stop"),this.removeAllListeners("end"),this.removeAllListeners("error"),this.removeAllListeners("result")}},{1:1,10:10}],62:[function(e,t,r){"use strict";var n=e(10),o=e(60),i=e(67),s=e(65),a=e(66);window.algoliasearch=e(63),window.angular.module("algoliasearch",[]).service("algolia",["$http","$q","$timeout",function(t,r,u){function c(t,r,n){var o=e(45),i=e(64);return n=o(n||{}),void 0===n.protocol&&(n.protocol=i()),n._ua=n._ua||c.ua,new l(t,r,n)}function l(){o.apply(this,arguments)}return c.version=e(68),c.ua="Algolia for AngularJS "+c.version,window.__algolia={debug:e(6),algoliasearch:c},n(l,o),l.prototype._request=function(e,n){var o,a=r.defer(),c=a.resolve,l=a.reject,f=n.body;e=s(e,n.headers);var d=r.defer(),p=d.promise;u(function(){o=!0,d.resolve("test"),l(new i.RequestTimeout)},n.timeout);var h={accept:"application/json"};return f&&("POST"===n.method?h["content-type"]="application/x-www-form-urlencoded":h["content-type"]="application/json"),t({url:e,method:n.method,data:f,cache:!1,timeout:p,headers:h,withCredentials:!1}).then(function(e){c({statusCode:e.status,headers:e.headers,body:e.data})},function(e){return o?void 0:0===e.status?void l(new i.Network({more:e})):void c({body:e.data,statusCode:e.status})}),a.promise},l.prototype._request.fallback=function(e,t){e=s(e,t.headers);var n=r.defer(),o=n.resolve,i=n.reject;return a(e,t,function(e,t){return e?void i(e):void o(t)}),n.promise},l.prototype._promise={reject:function(e){return r.reject(e)},resolve:function(e){return r.when(e)},delay:function(e){var t=r.defer(),n=t.resolve;return u(n,e),t.promise}},{Client:function(e,t,r){return c(e,t,r)},ua:c.ua,version:c.version}}])},{10:10,45:45,6:6,60:60,63:63,64:64,65:65,66:66,67:67,68:68}],63:[function(e,t,r){"use strict";function n(t,r,i){var s=e(45),a=e(64);return i=s(i||{}),void 0===i.protocol&&(i.protocol=a()),i._ua=i._ua||n.ua,new o(t,r,i)}function o(){a.apply(this,arguments)}t.exports=n;var i=e(10),s=window.Promise||e(9).Promise,a=e(60),u=e(67),c=e(65),l=e(66);n.version=e(68),n.ua="Algolia for vanilla JavaScript "+n.version,window.__algolia={debug:e(6),algoliasearch:n};var f={hasXMLHttpRequest:"XMLHttpRequest"in window,hasXDomainRequest:"XDomainRequest"in window,cors:"withCredentials"in new XMLHttpRequest,timeout:"timeout"in new XMLHttpRequest};i(o,a),o.prototype._request=function(e,t){return new s(function(r,n){function o(){if(!l){f.timeout||clearTimeout(a);var e;try{e={body:JSON.parse(p.responseText),statusCode:p.status,headers:p.getAllResponseHeaders&&p.getAllResponseHeaders()||{}}}catch(t){e=new u.UnparsableJSON({more:p.responseText})}e instanceof u.UnparsableJSON?n(e):r(e)}}function i(e){l||(f.timeout||clearTimeout(a),n(new u.Network({more:e})))}function s(){f.timeout||(l=!0,p.abort()),n(new u.RequestTimeout)}if(!f.cors&&!f.hasXDomainRequest)return void n(new u.Network("CORS not supported"));e=c(e,t.headers);var a,l,d=t.body,p=f.cors?new XMLHttpRequest:new XDomainRequest;p instanceof XMLHttpRequest?p.open(t.method,e,!0):p.open(t.method,e),f.cors&&(d&&("POST"===t.method?p.setRequestHeader("content-type","application/x-www-form-urlencoded"):p.setRequestHeader("content-type","application/json")),p.setRequestHeader("accept","application/json")),p.onprogress=function(){},p.onload=o,p.onerror=i,f.timeout?(p.timeout=t.timeout,p.ontimeout=s):a=setTimeout(s,t.timeout),p.send(d)})},o.prototype._request.fallback=function(e,t){return e=c(e,t.headers),new s(function(r,n){l(e,t,function(e,t){return e?void n(e):void r(t)})})},o.prototype._promise={reject:function(e){return s.reject(e)},resolve:function(e){return s.resolve(e)},delay:function(e){return new s(function(t){setTimeout(t,e)})}}},{10:10,45:45,6:6,60:60,64:64,65:65,66:66,67:67,68:68,9:9}],64:[function(e,t,r){"use strict";function n(){var e=window.document.location.protocol;return"http:"!==e&&"https:"!==e&&(e="http:"),e}t.exports=n},{}],65:[function(e,t,r){"use strict";function n(e,t){return e+=/\?/.test(e)?"&":"?",e+o.encode(t)}t.exports=n;var o=e(5)},{5:5}],66:[function(e,t,r){"use strict";function n(e,t,r){function n(){t.debug("JSONP: success"),y||f||(y=!0,l||(t.debug("JSONP: Fail. Script loaded but did not call the callback"),a(),r(new o.JSONPScriptFail)))}function s(){("loaded"===this.readyState||"complete"===this.readyState)&&n()}function a(){clearTimeout(m),p.onload=null,p.onreadystatechange=null,p.onerror=null,d.removeChild(p);try{delete window[h],delete window[h+"_loaded"]}catch(e){window[h]=null,window[h+"_loaded"]=null}}function u(){t.debug("JSONP: Script timeout"),f=!0,a(),r(new o.RequestTimeout)}function c(){t.debug("JSONP: Script error"),y||f||(a(),r(new o.JSONPScriptError))}if("GET"!==t.method)return void r(new Error("Method "+t.method+" "+e+" is not supported by JSONP."));t.debug("JSONP: start");var l=!1,f=!1;i+=1;var d=document.getElementsByTagName("head")[0],p=document.createElement("script"),h="algoliaJSONP_"+i,y=!1;window[h]=function(e){try{delete window[h]}catch(t){window[h]=void 0}f||(l=!0,a(),r(null,{body:e}))},e+="&callback="+h,t.jsonBody&&t.jsonBody.params&&(e+="&"+t.jsonBody.params);var m=setTimeout(u,t.timeout);p.onreadystatechange=s,p.onload=n,p.onerror=c,p.async=!0,p.defer=!0,p.src=e,d.appendChild(p)}t.exports=n;var o=e(67),i=0},{67:67}],67:[function(e,t,r){"use strict";function n(t,r){var n=e(11),o=this;"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):o.stack=(new Error).stack||"Cannot get a stacktrace, browser is too old",this.name=this.constructor.name,this.message=t||"Unknown error",r&&n(r,function(e,t){o[t]=e})}function o(e,t){function r(){var r=Array.prototype.slice.call(arguments,0);"string"!=typeof r[0]&&r.unshift(t),n.apply(this,r),this.name="AlgoliaSearch"+e+"Error"}return i(r,n),r}var i=e(10);i(n,Error),t.exports={AlgoliaSearchError:n,UnparsableJSON:o("UnparsableJSON","Could not parse the incoming response as JSON, see err.more for details"),RequestTimeout:o("RequestTimeout","Request timedout before getting a response"),Network:o("Network","Network issue, see err.more for details"),JSONPScriptFail:o("JSONPScriptFail","<script> was loaded but did not call our provided callback"),JSONPScriptError:o("JSONPScriptError","<script> unable to load due to an `error` event on it"),Unknown:o("Unknown","Unknown error occured")}},{10:10,11:11}],68:[function(e,t,r){t.exports="3.7.5"},{}]},{},[62]); | ||
for(var w in e)g&&"prototype"==w||v&&("message"==w||"name"==w)||y&&u(w,t)||"constructor"==w&&(p||!S.call(e,w))||h.push(w);if(d.nonEnumShadows&&e!==T){var P=e===A?x:e===j?m:O.call(e),I=k[P]||k[b];for(P==b&&(o=T),t=_.length;t--;){w=_[t];var R=I[w];p&&R||(R?!S.call(e,w):e[w]===o[w])||h.push(w)}}return h}var o=e(14),i=e(46),s=e(47),a=e(48),u=e(38),c=e(40),l=e(50),f=e(52),d=e(58),p="[object Array]",h="[object Boolean]",y="[object Date]",m="[object Error]",v="[object Function]",g="[object Number]",b="[object Object]",w="[object RegExp]",x="[object String]",_=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],j=Error.prototype,T=Object.prototype,A=String.prototype,S=T.hasOwnProperty,O=T.toString,k={};k[p]=k[y]=k[g]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},k[h]=k[x]={constructor:!0,toString:!0,valueOf:!0},k[m]=k[v]=k[w]={constructor:!0,toString:!0},k[b]={constructor:!0},o(_,function(e){for(var t in k)if(S.call(k,t)){var r=k[t];r[e]=S.call(r,e)}}),t.exports=n},{14:14,38:38,40:40,46:46,47:47,48:48,50:50,52:52,58:58}],57:[function(e,t,r){var n=e(22),o=e(27),i=o(n);t.exports=i},{22:22,27:27}],58:[function(e,t,r){var n=Array.prototype,o=Error.prototype,i=Object.prototype,s=i.propertyIsEnumerable,a=n.splice,u={};!function(e){var t=function(){this.x=e},r={0:e,length:e},n=[];t.prototype={valueOf:e,y:e};for(var i in new t)n.push(i);u.enumErrorProps=s.call(o,"message")||s.call(o,"name"),u.enumPrototypes=s.call(t,"prototype"),u.nonEnumShadows=!/valueOf/.test(n),u.ownLast="x"!=n[0],u.spliceObjects=(a.call(r,0,1),!r[0]),u.unindexedChars="x"[0]+Object("x")[0]!="xx"}(1,0),t.exports=u},{}],59:[function(e,t,r){function n(e){return e}t.exports=n},{}],60:[function(e,t,r){(function(r){"use strict";function n(t,r,n){var s=e(6)("algoliasearch"),a=e(44),u=e(47),c="Usage: algoliasearch(applicationID, apiKey, opts)";if(!t)throw new f.AlgoliaSearchError("Please provide an application ID. "+c);if(!r)throw new f.AlgoliaSearchError("Please provide an API key. "+c);this.applicationID=t,this.apiKey=r;var l=[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},n=n||{};var d=n.protocol||"https:",p=void 0===n.timeout?2e3:n.timeout;if(/:$/.test(d)||(d+=":"),"http:"!==n.protocol&&"https:"!==n.protocol)throw new f.AlgoliaSearchError("protocol must be `http:` or `https:` (was `"+n.protocol+"`)");n.hosts?u(n.hosts)?(this.hosts.read=a(n.hosts),this.hosts.write=a(n.hosts)):(this.hosts.read=a(n.hosts.read),this.hosts.write=a(n.hosts.write)):(this.hosts.read=[this.applicationID+"-dsn.algolia.net"].concat(l),this.hosts.write=[this.applicationID+".algolia.net"].concat(l)),this.hosts.read=o(this.hosts.read,i(d)),this.hosts.write=o(this.hosts.write,i(d)),this.requestTimeout=p,this.extraHeaders=[],this.cache={},this._ua=n._ua,this._useCache=void 0===n._useCache?!0:n._useCache,this._setTimeout=n._setTimeout,s("init done, %j",this)}function o(e,t){for(var r=[],n=0;n<e.length;++n)r.push(t(e[n],n));return r}function i(e){return function(t){return e+"//"+t.toLowerCase()}}function s(){var e="Not implemented in this environment.\nIf you feel this is a mistake, write to support@algolia.com";throw new f.AlgoliaSearchError(e)}function a(e,t){var r=e.toLowerCase().replace(".","").replace("()","");return"algoliasearch: `"+e+"` was replaced by `"+t+"`. Please see https://github.com/algolia/algoliasearch-client-js/wiki/Deprecated#"+r}function u(e,t){t(e,0)}function c(e,t){function r(){return n||(console.log(t),n=!0),e.apply(this,arguments)}var n=!1;return r}function l(e){if(void 0===Array.prototype.toJSON)return JSON.stringify(e);var t=Array.prototype.toJSON;delete Array.prototype.toJSON;var r=JSON.stringify(e);return Array.prototype.toJSON=t,r}t.exports=n;var f=e(67);n.prototype={deleteIndex:function(e,t){return this._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(e),hostType:"write",callback:t})},moveIndex:function(e,t,r){var n={operation:"move",destination:t};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(e)+"/operation",body:n,hostType:"write",callback:r})},copyIndex:function(e,t,r){var n={operation:"copy",destination:t};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(e)+"/operation",body:n,hostType:"write",callback:r})},getLogs:function(e,t,r){return 0===arguments.length||"function"==typeof e?(r=e,e=0,t=10):(1===arguments.length||"function"==typeof t)&&(r=t,t=10),this._jsonRequest({method:"GET",url:"/1/logs?offset="+e+"&length="+t,hostType:"read",callback:r})},listIndexes:function(e,t){var r="";return void 0===e||"function"==typeof e?t=e:r="?page="+e,this._jsonRequest({method:"GET",url:"/1/indexes"+r,hostType:"read",callback:t})},initIndex:function(e){return new this.Index(this,e)},listUserKeys:function(e){return this._jsonRequest({method:"GET",url:"/1/keys",hostType:"read",callback:e})},getUserKeyACL:function(e,t){return this._jsonRequest({method:"GET",url:"/1/keys/"+e,hostType:"read",callback:t})},deleteUserKey:function(e,t){return this._jsonRequest({method:"DELETE",url:"/1/keys/"+e,hostType:"write",callback:t})},addUserKey:function(e,t,r){(1===arguments.length||"function"==typeof t)&&(r=t,t=null);var n={acl:e};return t&&(n.validity=t.validity,n.maxQueriesPerIPPerHour=t.maxQueriesPerIPPerHour,n.maxHitsPerQuery=t.maxHitsPerQuery,n.indexes=t.indexes,n.description=t.description,t.queryParameters&&(n.queryParameters=this._getSearchParams(t.queryParameters,"")),n.referers=t.referers),this._jsonRequest({method:"POST",url:"/1/keys",body:n,hostType:"write",callback:r})},addUserKeyWithValidity:c(function(e,t,r){return this.addUserKey(e,t,r)},a("client.addUserKeyWithValidity()","client.addUserKey()")),updateUserKey:function(e,t,r,n){(2===arguments.length||"function"==typeof r)&&(n=r,r=null);var o={acl:t};return r&&(o.validity=r.validity,o.maxQueriesPerIPPerHour=r.maxQueriesPerIPPerHour,o.maxHitsPerQuery=r.maxHitsPerQuery,o.indexes=r.indexes,o.description=r.description,r.queryParameters&&(o.queryParameters=this._getSearchParams(r.queryParameters,"")),o.referers=r.referers),this._jsonRequest({method:"PUT",url:"/1/keys/"+e,body:o,hostType:"write",callback:n})},setSecurityTags:function(e){if("[object Array]"===Object.prototype.toString.call(e)){for(var t=[],r=0;r<e.length;++r)if("[object Array]"===Object.prototype.toString.call(e[r])){for(var n=[],o=0;o<e[r].length;++o)n.push(e[r][o]);t.push("("+n.join(",")+")")}else t.push(e[r]);e=t.join(",")}this.securityTags=e},setUserToken:function(e){this.userToken=e},startQueriesBatch:c(function(){this._batch=[]},a("client.startQueriesBatch()","client.search()")),addQueryInBatch:c(function(e,t,r){this._batch.push({indexName:e,query:t,params:r})},a("client.addQueryInBatch()","client.search()")),clearCache:function(){this.cache={}},sendQueriesBatch:c(function(e){return this.search(this._batch,e)},a("client.sendQueriesBatch()","client.search()")),setRequestTimeout:function(e){e&&(this.requestTimeout=parseInt(e,10))},search:function(e,t){var r=this,n={requests:o(e,function(e){var t="";return void 0!==e.query&&(t+="query="+encodeURIComponent(e.query)),{indexName:e.indexName,params:r._getSearchParams(e.params,t)}})};return this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",body:n,hostType:"read",callback:t})},batch:function(e,t){return this._jsonRequest({method:"POST",url:"/1/indexes/*/batch",body:{requests:e},hostType:"write",callback:t})},destroy:s,enableRateLimitForward:s,disableRateLimitForward:s,useSecuredAPIKey:s,disableSecuredAPIKey:s,generateSecuredApiKey:s,Index:function(e,t){this.indexName=t,this.as=e,this.typeAheadArgs=null,this.typeAheadValueOption=null,this.cache={}},setExtraHeader:function(e,t){this.extraHeaders.push({name:e.toLowerCase(),value:t})},_sendQueriesBatch:function(e,t){function r(){for(var t="",r=0;r<e.requests.length;++r){var n="/1/indexes/"+encodeURIComponent(e.requests[r].indexName)+"?"+e.requests[r].params;t+=r+"="+encodeURIComponent(n)+"&"}return t}return this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",body:e,hostType:"read",fallback:{method:"GET",url:"/1/indexes/*",body:{params:r()}},callback:t})},_jsonRequest:function(t){function n(e,u){function p(e){var t=e&&e.body&&e.body.message&&e.body.status||e.statusCode||e&&e.body&&200;i("received response: statusCode: %s, computed statusCode: %d, headers: %j",e.statusCode,t,e.headers),r.env.DEBUG&&-1!==r.env.DEBUG.indexOf("debugBody")&&i("body: %j",e.body);var n=200===t||201===t,o=!n&&4!==Math.floor(t/100)&&1!==Math.floor(t/100);if(a._useCache&&n&&s&&(s[m]=e.body),n)return e.body;if(o)return c+=1,y();var u=new f.AlgoliaSearchError(e.body&&e.body.message);return a._promise.reject(u)}function h(r){return i("error: %s, stack: %s",r.message,r.stack),r instanceof f.AlgoliaSearchError||(r=new f.Unknown(r&&r.message,r)),c+=1,r instanceof f.Unknown||r instanceof f.UnparsableJSON||!e.fallback&&r instanceof f.Network||c>=a.hosts[t.hostType].length&&(d||!t.fallback||!a._request.fallback)?a._promise.reject(r):(a.hostIndex[t.hostType]=++a.hostIndex[t.hostType]%a.hosts[t.hostType].length,r instanceof f.RequestTimeout?y():(a._request.fallback&&!a.useFallback&&(a.useFallback=!0),n(e,u)))}function y(){return a.hostIndex[t.hostType]=++a.hostIndex[t.hostType]%a.hosts[t.hostType].length,u.timeout=a.requestTimeout*(c+1),n(e,u)}var m;if(a._useCache&&(m=t.url),a._useCache&&o&&(m+="_body_"+u.body),a._useCache&&s&&void 0!==s[m])return i("serving response from cache"),a._promise.resolve(JSON.parse(l(s[m])));if(c>=a.hosts[t.hostType].length||a.useFallback&&!d)return t.fallback&&a._request.fallback&&!d?(i("switching to fallback"),c=0,u.method=t.fallback.method,u.url=t.fallback.url,u.jsonBody=t.fallback.body,u.jsonBody&&(u.body=l(u.jsonBody)),u.timeout=a.requestTimeout*(c+1),a.hostIndex[t.hostType]=0,d=!0,n(a._request.fallback,u)):(i("could not get any response"),a._promise.reject(new f.AlgoliaSearchError("Cannot connect to the AlgoliaSearch API. Send an email to support@algolia.com to report and resolve the issue. Application id was: "+a.applicationID)));var v=a.hosts[t.hostType][a.hostIndex[t.hostType]]+u.url,g={body:o,jsonBody:t.body,method:u.method,headers:a._computeRequestHeaders(),timeout:u.timeout,debug:i};return i("method: %s, url: %s, headers: %j, timeout: %d",g.method,v,g.headers,g.timeout),e===a._request.fallback&&i("using fallback"),e.call(a,v,g).then(p,h)}var o,i=e(6)("algoliasearch:"+t.url),s=t.cache,a=this,c=0,d=!1;void 0!==t.body&&(o=l(t.body)),i("request start");var p=a.useFallback&&t.fallback,h=p?t.fallback:t,y=n(p?a._request.fallback:a._request,{url:h.url,method:h.method,body:o,jsonBody:t.body,timeout:a.requestTimeout*(c+1)});return t.callback?void y.then(function(e){u(function(){t.callback(null,e)},a._setTimeout||setTimeout)},function(e){u(function(){t.callback(e)},a._setTimeout||setTimeout)}):y},_getSearchParams:function(e,t){if(this._isUndefined(e)||null===e)return t;for(var r in e)null!==r&&void 0!==e[r]&&e.hasOwnProperty(r)&&(t+=""===t?"":"&",t+=r+"="+encodeURIComponent("[object Array]"===Object.prototype.toString.call(e[r])?l(e[r]):e[r]));return t},_isUndefined:function(e){return void 0===e},_computeRequestHeaders:function(){var t=e(11),r={"x-algolia-api-key":this.apiKey,"x-algolia-application-id":this.applicationID,"x-algolia-agent":this._ua};return this.userToken&&(r["x-algolia-usertoken"]=this.userToken),this.securityTags&&(r["x-algolia-tagfilters"]=this.securityTags),this.extraHeaders&&t(this.extraHeaders,function(e){r[e.name]=e.value}),r}},n.prototype.Index.prototype={clearCache:function(){this.cache={}},addObject:function(e,t,r){var n=this;return(1===arguments.length||"function"==typeof t)&&(r=t,t=void 0),this.as._jsonRequest({method:void 0!==t?"PUT":"POST",url:"/1/indexes/"+encodeURIComponent(n.indexName)+(void 0!==t?"/"+encodeURIComponent(t):""),body:e,hostType:"write",callback:r})},addObjects:function(e,t){for(var r=this,n={requests:[]},o=0;o<e.length;++o){var i={action:"addObject",body:e[o]};n.requests.push(i)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/batch",body:n,hostType:"write",callback:t})},getObject:function(e,t,r){var n=this;(1===arguments.length||"function"==typeof t)&&(r=t,t=void 0);var o="";if(void 0!==t){o="?attributes=";for(var i=0;i<t.length;++i)0!==i&&(o+=","),o+=t[i]}return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/"+encodeURIComponent(e)+o,hostType:"read",callback:r})},getObjects:function(e,t,r){var n=this;(1===arguments.length||"function"==typeof t)&&(r=t,t=void 0);var i={requests:o(e,function(e){var r={indexName:n.indexName,objectID:e};return t&&(r.attributesToRetrieve=t.join(",")),r})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/*/objects",hostType:"read",body:i,callback:r})},partialUpdateObject:function(e,t){var r=this;return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/"+encodeURIComponent(e.objectID)+"/partial",body:e,hostType:"write",callback:t})},partialUpdateObjects:function(e,t){for(var r=this,n={requests:[]},o=0;o<e.length;++o){var i={action:"partialUpdateObject",objectID:e[o].objectID,body:e[o]};n.requests.push(i)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/batch",body:n,hostType:"write",callback:t})},saveObject:function(e,t){var r=this;return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/"+encodeURIComponent(e.objectID),body:e,hostType:"write",callback:t})},saveObjects:function(e,t){for(var r=this,n={requests:[]},o=0;o<e.length;++o){var i={action:"updateObject",objectID:e[o].objectID,body:e[o]};n.requests.push(i)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/batch",body:n,hostType:"write",callback:t})},deleteObject:function(e,t){if("function"==typeof e||"string"!=typeof e&&"number"!=typeof e){var r=new f.AlgoliaSearchError("Cannot delete an object without an objectID");return t=e,"function"==typeof t?t(r):this.as._promise.reject(r)}var n=this;return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/"+encodeURIComponent(e),hostType:"write",callback:t})},deleteObjects:function(e,t){var r=this,n={requests:o(e,function(e){return{action:"deleteObject",objectID:e,body:{objectID:e}}})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/batch",body:n,hostType:"write",callback:t})},deleteByQuery:function(e,t,r){function n(e){if(0===e.nbHits)return e;var t=o(e.hits,function(e){return e.objectID});return l.deleteObjects(t).then(i).then(s)}function i(e){return l.waitTask(e.taskID)}function s(){return l.deleteByQuery(e,t)}function a(){u(function(){r(null)},f._setTimeout||setTimeout)}function c(e){u(function(){r(e)},f._setTimeout||setTimeout)}var l=this,f=l.as;(1===arguments.length||"function"==typeof t)&&(r=t,t={}),t.attributesToRetrieve="objectID",t.hitsPerPage=1e3,this.clearCache();var d=this.search(e,t).then(n);return r?void d.then(a,c):d},search:function(e,t,r){if("function"==typeof e&&"object"==typeof t||"object"==typeof r)throw new f.AlgoliaSearchError("index.search usage is index.search(query, params, cb)");0===arguments.length||"function"==typeof e?(r=e,e=""):(1===arguments.length||"function"==typeof t)&&(r=t,t=void 0),"object"==typeof e&&null!==e?(t=e,e=void 0):(void 0===e||null===e)&&(e="");var n="";return void 0!==e&&(n+="query="+encodeURIComponent(e)),void 0!==t&&(n=this.as._getSearchParams(t,n)),this._search(n,r)},browse:function(t,r,n){var o,i,s=e(57),a=this;0===arguments.length||1===arguments.length&&"function"==typeof arguments[0]?(o=0,n=arguments[0],t=void 0):"number"==typeof arguments[0]?(o=arguments[0],"number"==typeof arguments[1]?i=arguments[1]:"function"==typeof arguments[1]&&(n=arguments[1],i=void 0),t=void 0,r=void 0):"object"==typeof arguments[0]?("function"==typeof arguments[1]&&(n=arguments[1]),r=arguments[0],t=void 0):"string"==typeof arguments[0]&&"function"==typeof arguments[1]&&(n=arguments[1],r=void 0),r=s({},r||{},{page:o,hitsPerPage:i,query:t});var u=this.as._getSearchParams(r,"");return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(a.indexName)+"/browse?"+u,hostType:"read",callback:n})},browseFrom:function(e,t){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse?cursor="+encodeURIComponent(e),hostType:"read",callback:t})},browseAll:function(t,r){function n(e){if(!a._stopped){var t;t=void 0!==e?"cursor="+encodeURIComponent(e):l,u._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(c.indexName)+"/browse?"+t,hostType:"read",callback:o})}}function o(e,t){return a._stopped?void 0:e?void a._error(e):(a._result(t),void 0===t.cursor?void a._end():void n(t.cursor))}"object"==typeof t&&(r=t,t=void 0);var i=e(57),s=e(61),a=new s,u=this.as,c=this,l=u._getSearchParams(i({},r||{},{query:t}),"");return n(),a},ttAdapter:function(e){var t=this;return function(r,n,o){var i;i="function"==typeof o?o:n,t.search(r,e,function(e,t){return e?void i(e):void i(t.hits)})}},waitTask:function(e,t){function r(){return l._jsonRequest({method:"GET",hostType:"read",url:"/1/indexes/"+encodeURIComponent(c.indexName)+"/task/"+e}).then(function(e){a++;var t=i*a*a;return t>s&&(t=s),"published"!==e.status?l._promise.delay(t).then(r):e})}function n(e){u(function(){t(null,e)},l._setTimeout||setTimeout)}function o(e){u(function(){t(e)},l._setTimeout||setTimeout)}var i=100,s=5e3,a=0,c=this,l=c.as,f=r();return t?void f.then(n,o):f},clearIndex:function(e){var t=this;return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/clear",hostType:"write",callback:e})},getSettings:function(e){var t=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/settings",hostType:"read",callback:e})},setSettings:function(e,t){var r=this;return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/settings",hostType:"write",body:e,callback:t})},listUserKeys:function(e){var t=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/keys",hostType:"read",callback:e})},getUserKeyACL:function(e,t){var r=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/keys/"+e,hostType:"read",callback:t})},deleteUserKey:function(e,t){var r=this;return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/keys/"+e,hostType:"write",callback:t})},addUserKey:function(e,t,r){(1===arguments.length||"function"==typeof t)&&(r=t,t=null);var n={acl:e};return t&&(n.validity=t.validity,n.maxQueriesPerIPPerHour=t.maxQueriesPerIPPerHour,n.maxHitsPerQuery=t.maxHitsPerQuery,n.description=t.description,t.queryParameters&&(n.queryParameters=this.as._getSearchParams(t.queryParameters,"")),n.referers=t.referers),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",body:n,hostType:"write",callback:r})},addUserKeyWithValidity:c(function(e,t,r){return this.addUserKey(e,t,r)},a("index.addUserKeyWithValidity()","index.addUserKey()")),updateUserKey:function(e,t,r,n){(2===arguments.length||"function"==typeof r)&&(n=r,r=null);var o={acl:t};return r&&(o.validity=r.validity,o.maxQueriesPerIPPerHour=r.maxQueriesPerIPPerHour,o.maxHitsPerQuery=r.maxHitsPerQuery,o.description=r.description,r.queryParameters&&(o.queryParameters=this.as._getSearchParams(r.queryParameters,"")),o.referers=r.referers),this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+e,body:o,hostType:"write",callback:n})},_search:function(e,t){return this.as._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/query",body:{params:e},hostType:"read",fallback:{method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName),body:{params:e}},callback:t})},as:null,indexName:null,typeAheadArgs:null,typeAheadValueOption:null}}).call(this,e(2))},{11:11,2:2,44:44,47:47,57:57,6:6,61:61,67:67}],61:[function(e,t,r){"use strict";function n(){}t.exports=n;var o=e(10),i=e(1).EventEmitter;o(n,i),n.prototype.stop=function(){this._stopped=!0,this._clean()},n.prototype._end=function(){this.emit("end"),this._clean()},n.prototype._error=function(e){this.emit("error",e),this._clean()},n.prototype._result=function(e){this.emit("result",e)},n.prototype._clean=function(){this.removeAllListeners("stop"),this.removeAllListeners("end"),this.removeAllListeners("error"),this.removeAllListeners("result")}},{1:1,10:10}],62:[function(e,t,r){"use strict";var n=e(10),o=e(60),i=e(67),s=e(65),a=e(66);window.algoliasearch=e(63),window.angular.module("algoliasearch",[]).service("algolia",["$http","$q","$timeout",function(t,r,u){function c(t,r,n){var o=e(45),i=e(64);return n=o(n||{}),void 0===n.protocol&&(n.protocol=i()),n._ua=n._ua||c.ua,new l(t,r,n)}function l(){o.apply(this,arguments)}return c.version=e(68),c.ua="Algolia for AngularJS "+c.version,window.__algolia={debug:e(6),algoliasearch:c},n(l,o),l.prototype._request=function(e,n){var o,a=r.defer(),c=a.resolve,l=a.reject,f=n.body;e=s(e,n.headers);var d=r.defer(),p=d.promise;u(function(){o=!0,d.resolve("test"),l(new i.RequestTimeout)},n.timeout);var h={accept:"application/json"};return f&&("POST"===n.method?h["content-type"]="application/x-www-form-urlencoded":h["content-type"]="application/json"),t({url:e,method:n.method,data:f,cache:!1,timeout:p,headers:h,withCredentials:!1}).then(function(e){c({statusCode:e.status,headers:e.headers,body:e.data})},function(e){return o?void 0:0===e.status?void l(new i.Network({more:e})):void c({body:e.data,statusCode:e.status})}),a.promise},l.prototype._request.fallback=function(e,t){e=s(e,t.headers);var n=r.defer(),o=n.resolve,i=n.reject;return a(e,t,function(e,t){return e?void i(e):void o(t)}),n.promise},l.prototype._promise={reject:function(e){return r.reject(e)},resolve:function(e){return r.when(e)},delay:function(e){var t=r.defer(),n=t.resolve;return u(n,e),t.promise}},{Client:function(e,t,r){return c(e,t,r)},ua:c.ua,version:c.version}}])},{10:10,45:45,6:6,60:60,63:63,64:64,65:65,66:66,67:67,68:68}],63:[function(e,t,r){"use strict";function n(t,r,i){var s=e(45),a=e(64);return i=s(i||{}),void 0===i.protocol&&(i.protocol=a()),i._ua=i._ua||n.ua,new o(t,r,i)}function o(){a.apply(this,arguments)}t.exports=n;var i=e(10),s=window.Promise||e(9).Promise,a=e(60),u=e(67),c=e(65),l=e(66);n.version=e(68),n.ua="Algolia for vanilla JavaScript "+n.version,window.__algolia={debug:e(6),algoliasearch:n};var f={hasXMLHttpRequest:"XMLHttpRequest"in window,hasXDomainRequest:"XDomainRequest"in window,cors:"withCredentials"in new XMLHttpRequest,timeout:"timeout"in new XMLHttpRequest};i(o,a),o.prototype._request=function(e,t){return new s(function(r,n){function o(){if(!l){f.timeout||clearTimeout(a);var e;try{e={body:JSON.parse(p.responseText),statusCode:p.status,headers:p.getAllResponseHeaders&&p.getAllResponseHeaders()||{}}}catch(t){e=new u.UnparsableJSON({more:p.responseText})}e instanceof u.UnparsableJSON?n(e):r(e)}}function i(e){l||(f.timeout||clearTimeout(a),n(new u.Network({more:e})))}function s(){f.timeout||(l=!0,p.abort()),n(new u.RequestTimeout)}if(!f.cors&&!f.hasXDomainRequest)return void n(new u.Network("CORS not supported"));e=c(e,t.headers);var a,l,d=t.body,p=f.cors?new XMLHttpRequest:new XDomainRequest;p instanceof XMLHttpRequest?p.open(t.method,e,!0):p.open(t.method,e),f.cors&&(d&&("POST"===t.method?p.setRequestHeader("content-type","application/x-www-form-urlencoded"):p.setRequestHeader("content-type","application/json")),p.setRequestHeader("accept","application/json")),p.onprogress=function(){},p.onload=o,p.onerror=i,f.timeout?(p.timeout=t.timeout,p.ontimeout=s):a=setTimeout(s,t.timeout),p.send(d)})},o.prototype._request.fallback=function(e,t){return e=c(e,t.headers),new s(function(r,n){l(e,t,function(e,t){return e?void n(e):void r(t)})})},o.prototype._promise={reject:function(e){return s.reject(e)},resolve:function(e){return s.resolve(e)},delay:function(e){return new s(function(t){setTimeout(t,e)})}}},{10:10,45:45,6:6,60:60,64:64,65:65,66:66,67:67,68:68,9:9}],64:[function(e,t,r){"use strict";function n(){var e=window.document.location.protocol;return"http:"!==e&&"https:"!==e&&(e="http:"),e}t.exports=n},{}],65:[function(e,t,r){"use strict";function n(e,t){return e+=/\?/.test(e)?"&":"?",e+o.encode(t)}t.exports=n;var o=e(5)},{5:5}],66:[function(e,t,r){"use strict";function n(e,t,r){function n(){t.debug("JSONP: success"),y||f||(y=!0,l||(t.debug("JSONP: Fail. Script loaded but did not call the callback"),a(),r(new o.JSONPScriptFail)))}function s(){("loaded"===this.readyState||"complete"===this.readyState)&&n()}function a(){clearTimeout(m),p.onload=null,p.onreadystatechange=null,p.onerror=null,d.removeChild(p);try{delete window[h],delete window[h+"_loaded"]}catch(e){window[h]=null,window[h+"_loaded"]=null}}function u(){t.debug("JSONP: Script timeout"),f=!0,a(),r(new o.RequestTimeout)}function c(){t.debug("JSONP: Script error"),y||f||(a(),r(new o.JSONPScriptError))}if("GET"!==t.method)return void r(new Error("Method "+t.method+" "+e+" is not supported by JSONP."));t.debug("JSONP: start");var l=!1,f=!1;i+=1;var d=document.getElementsByTagName("head")[0],p=document.createElement("script"),h="algoliaJSONP_"+i,y=!1;window[h]=function(e){try{delete window[h]}catch(t){window[h]=void 0}f||(l=!0,a(),r(null,{body:e}))},e+="&callback="+h,t.jsonBody&&t.jsonBody.params&&(e+="&"+t.jsonBody.params);var m=setTimeout(u,t.timeout);p.onreadystatechange=s,p.onload=n,p.onerror=c,p.async=!0,p.defer=!0,p.src=e,d.appendChild(p)}t.exports=n;var o=e(67),i=0},{67:67}],67:[function(e,t,r){"use strict";function n(t,r){var n=e(11),o=this;"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):o.stack=(new Error).stack||"Cannot get a stacktrace, browser is too old",this.name=this.constructor.name,this.message=t||"Unknown error",r&&n(r,function(e,t){o[t]=e})}function o(e,t){function r(){var r=Array.prototype.slice.call(arguments,0);"string"!=typeof r[0]&&r.unshift(t),n.apply(this,r),this.name="AlgoliaSearch"+e+"Error"}return i(r,n),r}var i=e(10);i(n,Error),t.exports={AlgoliaSearchError:n,UnparsableJSON:o("UnparsableJSON","Could not parse the incoming response as JSON, see err.more for details"),RequestTimeout:o("RequestTimeout","Request timedout before getting a response"),Network:o("Network","Network issue, see err.more for details"),JSONPScriptFail:o("JSONPScriptFail","<script> was loaded but did not call our provided callback"),JSONPScriptError:o("JSONPScriptError","<script> unable to load due to an `error` event on it"),Unknown:o("Unknown","Unknown error occured")}},{10:10,11:11}],68:[function(e,t,r){t.exports="3.7.6"},{}]},{},[62]); |
@@ -1,3 +0,3 @@ | ||
/*! algoliasearch 3.7.5 | © 2014, 2015 Algolia SAS | github.com/algolia/algoliasearch-client-js */ | ||
/*! algoliasearch 3.7.6 | © 2014, 2015 Algolia SAS | github.com/algolia/algoliasearch-client-js */ | ||
!function(e){var t;"undefined"!=typeof window?t=window:"undefined"!=typeof self&&(t=self),t.ALGOLIA_MIGRATION_LAYER=e()}(function(){return function e(t,r,n){function o(s,a){if(!r[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[s]={exports:{}};t[s][0].call(l.exports,function(e){var r=t[s][1][e];return o(r?r:e)},l,l.exports,e,t,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(e,t,r){function n(e,t){for(var r in t)e.setAttribute(r,t[r])}function o(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function i(e,t){e.onreadystatechange=function(){("complete"==this.readyState||"loaded"==this.readyState)&&(this.onreadystatechange=null,t(null,e))}}t.exports=function(e,t,r){var s=document.head||document.getElementsByTagName("head")[0],a=document.createElement("script");"function"==typeof t&&(r=t,t={}),t=t||{},r=r||function(){},a.type=t.type||"text/javascript",a.charset=t.charset||"utf8",a.async="async"in t?!!t.async:!0,a.src=e,t.attrs&&n(a,t.attrs),t.text&&(a.text=""+t.text);var u="onload"in a?o:i;u(a,r),a.onload||o(a,r),s.appendChild(a)}},{}],2:[function(e,t,r){"use strict";function n(e){for(var t=new RegExp("cdn\\.jsdelivr\\.net/algoliasearch/latest/"+e.replace(".","\\.")+"(?:\\.min)?\\.js$"),r=document.getElementsByTagName("script"),n=!1,o=0,i=r.length;i>o;o++)if(r[o].src&&t.test(r[o].src)){n=!0;break}return n}t.exports=n},{}],3:[function(e,t,r){"use strict";function n(t){var r=e(1),n="//cdn.jsdelivr.net/algoliasearch/2/"+t+".min.js",i="-- 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 --";window.console&&(window.console.warn?window.console.warn(i):window.console.log&&window.console.log(i));try{document.write("<script>window.ALGOLIA_SUPPORTS_DOCWRITE = true</script>"),window.ALGOLIA_SUPPORTS_DOCWRITE===!0?(document.write('<script src="'+n+'"></script>'),o("document.write")()):r(n,o("DOMElement"))}catch(s){r(n,o("DOMElement"))}}function o(e){return function(){var t="AlgoliaSearch: loaded V2 script using "+e;window.console&&window.console.log&&window.console.log(t)}}t.exports=n},{1:1}],4:[function(e,t,r){"use strict";function n(){var e="-- 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 --";window.AlgoliaSearch=function(){throw new Error(e)},window.AlgoliaSearchHelper=function(){throw new Error(e)},window.AlgoliaExplainResults=function(){throw new Error(e)}}t.exports=n},{}],5:[function(e,t,r){"use strict";function n(t){var r=e(2),n=e(3),o=e(4);r(t)?n(t):o()}n("algoliasearch.jquery")},{2:2,3:3,4:4}]},{},[5])(5)}),function e(t,r,n){function o(s,a){if(!r[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[s]={exports:{}};t[s][0].call(l.exports,function(e){var r=t[s][1][e];return o(r?r:e)},l,l.exports,e,t,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(e,t,r){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function o(e){return"function"==typeof e}function i(e){return"number"==typeof e}function s(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!i(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,r,n,i,u,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(r=this._events[e],a(r))return!1;if(o(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:for(n=arguments.length,i=new Array(n-1),u=1;n>u;u++)i[u-1]=arguments[u];r.apply(this,i)}else if(s(r)){for(n=arguments.length,i=new Array(n-1),u=1;n>u;u++)i[u-1]=arguments[u];for(c=r.slice(),n=c.length,u=0;n>u;u++)c[u].apply(this,i)}return!0},n.prototype.addListener=function(e,t){var r;if(!o(t))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,o(t.listener)?t.listener:t),this._events[e]?s(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,s(this._events[e])&&!this._events[e].warned){var r;r=a(this._maxListeners)?n.defaultMaxListeners:this._maxListeners,r&&r>0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())}return this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}if(!o(t))throw TypeError("listener must be a function");var n=!1;return r.listener=t,this.on(e,r),this},n.prototype.removeListener=function(e,t){var r,n,i,a;if(!o(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],i=r.length,n=-1,r===t||o(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(s(r)){for(a=i;a-->0;)if(r[a]===t||r[a].listener&&r[a].listener===t){n=a;break}if(0>n)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],o(r))this.removeListener(e,r);else for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?o(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.listenerCount=function(e,t){var r;return r=e._events&&e._events[t]?o(e._events[t])?1:e._events[t].length:0}},{}],2:[function(e,t,r){function n(){l=!1,a.length?c=a.concat(c):f=-1,c.length&&o()}function o(){if(!l){var e=setTimeout(n);l=!0;for(var t=c.length;t;){for(a=c,c=[];++f<t;)a[f].run();f=-1,t=c.length}a=null,l=!1,clearTimeout(e)}}function i(e,t){this.fun=e,this.array=t}function s(){}var a,u=t.exports={},c=[],l=!1,f=-1;u.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new i(e,t)),1!==c.length||l||setTimeout(o,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={},u.on=s,u.addListener=s,u.once=s,u.off=s,u.removeListener=s,u.removeAllListeners=s,u.emit=s,u.binding=function(e){throw new Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(e){throw new Error("process.chdir is not supported")},u.umask=function(){return 0}},{}],3:[function(e,t,r){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,r,i){t=t||"&",r=r||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(t);var u=1e3;i&&"number"==typeof i.maxKeys&&(u=i.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var l=0;c>l;++l){var f,d,p,h,y=e[l].replace(a,"%20"),m=y.indexOf(r);m>=0?(f=y.substr(0,m),d=y.substr(m+1)):(f=y,d=""),p=decodeURIComponent(f),h=decodeURIComponent(d),n(s,p)?o(s[p])?s[p].push(h):s[p]=[s[p],h]:s[p]=h}return s};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],4:[function(e,t,r){"use strict";function n(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var o=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,r,a){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?n(s(e),function(s){var a=encodeURIComponent(o(s))+r;return i(e[s])?n(e[s],function(e){return a+encodeURIComponent(o(e))}).join(t):a+encodeURIComponent(o(e[s]))}).join(t):a?encodeURIComponent(o(a))+r+encodeURIComponent(o(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},{}],5:[function(e,t,r){"use strict";r.decode=r.parse=e(3),r.encode=r.stringify=e(4)},{3:3,4:4}],6:[function(e,t,r){function n(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function o(){var e=arguments,t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+r.humanize(this.diff),!t)return e;var n="color: "+this.color;e=[e[0],n,"color: inherit"].concat(Array.prototype.slice.call(e,1));var o=0,i=0;return e[0].replace(/%[a-z%]/g,function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))}),e.splice(i,0,n),e}function i(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(e){try{null==e?r.storage.removeItem("debug"):r.storage.debug=e}catch(t){}}function a(){var e;try{e=r.storage.debug}catch(t){}return e}function u(){try{return window.localStorage}catch(e){}}r=t.exports=e(7),r.log=i,r.formatArgs=o,r.save=s,r.load=a,r.useColors=n,r.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:u(),r.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],r.formatters.j=function(e){return JSON.stringify(e)},r.enable(a())},{7:7}],7:[function(e,t,r){function n(){return r.colors[l++%r.colors.length]}function o(e){function t(){}function o(){var e=o,t=+new Date,i=t-(c||t);e.diff=i,e.prev=c,e.curr=t,c=t,null==e.useColors&&(e.useColors=r.useColors()),null==e.color&&e.useColors&&(e.color=n());var s=Array.prototype.slice.call(arguments);s[0]=r.coerce(s[0]),"string"!=typeof s[0]&&(s=["%o"].concat(s));var a=0;s[0]=s[0].replace(/%([a-z%])/g,function(t,n){if("%%"===t)return t;a++;var o=r.formatters[n];if("function"==typeof o){var i=s[a];t=o.call(e,i),s.splice(a,1),a--}return t}),"function"==typeof r.formatArgs&&(s=r.formatArgs.apply(e,s));var u=o.log||r.log||console.log.bind(console);u.apply(e,s)}t.enabled=!1,o.enabled=!0;var i=r.enabled(e)?o:t;return i.namespace=e,i}function i(e){r.save(e);for(var t=(e||"").split(/[\s,]+/),n=t.length,o=0;n>o;o++)t[o]&&(e=t[o].replace(/\*/g,".*?"),"-"===e[0]?r.skips.push(new RegExp("^"+e.substr(1)+"$")):r.names.push(new RegExp("^"+e+"$")))}function s(){r.enable("")}function a(e){var t,n;for(t=0,n=r.skips.length;n>t;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;n>t;t++)if(r.names[t].test(e))return!0;return!1}function u(e){return e instanceof Error?e.stack||e.message:e}r=t.exports=o,r.coerce=u,r.disable=s,r.enable=i,r.enabled=a,r.humanize=e(8),r.names=[],r.skips=[],r.formatters={};var c,l=0},{8:8}],8:[function(e,t,r){function n(e){if(e=""+e,!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*f;case"days":case"day":case"d":return r*l;case"hours":case"hour":case"hrs":case"hr":case"h":return r*c;case"minutes":case"minute":case"mins":case"min":case"m":return r*u;case"seconds":case"second":case"secs":case"sec":case"s":return r*a;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r}}}}function o(e){return e>=l?Math.round(e/l)+"d":e>=c?Math.round(e/c)+"h":e>=u?Math.round(e/u)+"m":e>=a?Math.round(e/a)+"s":e+"ms"}function i(e){return s(e,l,"day")||s(e,c,"hour")||s(e,u,"minute")||s(e,a,"second")||e+" ms"}function s(e,t,r){return t>e?void 0:1.5*t>e?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}var a=1e3,u=60*a,c=60*u,l=24*c,f=365.25*l;t.exports=function(e,t){return t=t||{},"string"==typeof e?n(e):t["long"]?i(e):o(e)}},{}],9:[function(e,t,r){(function(r,n){(function(){"use strict";function o(e){return"function"==typeof e||"object"==typeof e&&null!==e}function i(e){return"function"==typeof e}function s(e){return"object"==typeof e&&null!==e}function a(e){Q=e}function u(e){W=e}function c(){var e=r.nextTick,t=r.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(t)&&"0"===t[1]&&"10"===t[2]&&(e=setImmediate),function(){e(h)}}function l(){return function(){K(h)}}function f(){var e=0,t=new z(h),r=document.createTextNode("");return t.observe(r,{characterData:!0}),function(){r.data=e=++e%2}}function d(){var e=new MessageChannel;return e.port1.onmessage=h,function(){e.port2.postMessage(0)}}function p(){return function(){setTimeout(h,1)}}function h(){for(var e=0;V>e;e+=2){var t=te[e],r=te[e+1];t(r),te[e]=void 0,te[e+1]=void 0}V=0}function y(){try{var t=e,r=t("vertx");return K=r.runOnLoop||r.runOnContext,l()}catch(n){return p()}}function m(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function g(){return new TypeError("A promises callback cannot return that same promise.")}function b(e){try{return e.then}catch(t){return ie.error=t,ie}}function w(e,t,r,n){try{e.call(t,r,n)}catch(o){return o}}function x(e,t,r){W(function(e){var n=!1,o=w(r,t,function(r){n||(n=!0,t!==r?T(e,r):S(e,r))},function(t){n||(n=!0,O(e,t))},"Settle: "+(e._label||" unknown promise"));!n&&o&&(n=!0,O(e,o))},e)}function _(e,t){t._state===ne?S(e,t._result):t._state===oe?O(e,t._result):k(t,void 0,function(t){T(e,t)},function(t){O(e,t)})}function j(e,t){if(t.constructor===e.constructor)_(e,t);else{var r=b(t);r===ie?O(e,ie.error):void 0===r?S(e,t):i(r)?x(e,t,r):S(e,t)}}function T(e,t){e===t?O(e,v()):o(t)?j(e,t):S(e,t)}function A(e){e._onerror&&e._onerror(e._result),P(e)}function S(e,t){e._state===re&&(e._result=t,e._state=ne,0!==e._subscribers.length&&W(P,e))}function O(e,t){e._state===re&&(e._state=oe,e._result=t,W(A,e))}function k(e,t,r,n){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+ne]=r,o[i+oe]=n,0===i&&e._state&&W(P,e)}function P(e){var t=e._subscribers,r=e._state;if(0!==t.length){for(var n,o,i=e._result,s=0;s<t.length;s+=3)n=t[s],o=t[s+r],n?q(r,n,o,i):o(i);e._subscribers.length=0}}function I(){this.error=null}function R(e,t){try{return e(t)}catch(r){return se.error=r,se}}function q(e,t,r,n){var o,s,a,u,c=i(r);if(c){if(o=R(r,n),o===se?(u=!0,s=o.error,o=null):a=!0,t===o)return void O(t,g())}else o=n,a=!0;t._state!==re||(c&&a?T(t,o):u?O(t,s):e===ne?S(t,o):e===oe&&O(t,o))}function E(e,t){try{t(function(t){T(e,t)},function(t){O(e,t)})}catch(r){O(e,r)}}function U(e,t){var r=this;r._instanceConstructor=e,r.promise=new e(m),r._validateInput(t)?(r._input=t,r.length=t.length,r._remaining=t.length,r._init(),0===r.length?S(r.promise,r._result):(r.length=r.length||0,r._enumerate(),0===r._remaining&&S(r.promise,r._result))):O(r.promise,r._validationError())}function C(e){return new ae(this,e).promise}function N(e){function t(e){T(o,e)}function r(e){O(o,e)}var n=this,o=new n(m);if(!$(e))return O(o,new TypeError("You must pass an array to race.")),o;for(var i=e.length,s=0;o._state===re&&i>s;s++)k(n.resolve(e[s]),void 0,t,r);return o}function L(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var r=new t(m);return T(r,e),r}function D(e){var t=this,r=new t(m);return O(r,e),r}function H(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function M(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function F(e){this._id=de++,this._state=void 0,this._result=void 0,this._subscribers=[],m!==e&&(i(e)||H(),this instanceof F||M(),E(this,e))}function J(){var e;if("undefined"!=typeof n)e=n;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var r=e.Promise;(!r||"[object Promise]"!==Object.prototype.toString.call(r.resolve())||r.cast)&&(e.Promise=pe)}var B;B=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var K,Q,G,$=B,V=0,W=({}.toString,function(e,t){te[V]=e,te[V+1]=t,V+=2,2===V&&(Q?Q(h):G())}),X="undefined"!=typeof window?window:void 0,Y=X||{},z=Y.MutationObserver||Y.WebKitMutationObserver,Z="undefined"!=typeof r&&"[object process]"==={}.toString.call(r),ee="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,te=new Array(1e3);G=Z?c():z?f():ee?d():void 0===X&&"function"==typeof e?y():p();var re=void 0,ne=1,oe=2,ie=new I,se=new I;U.prototype._validateInput=function(e){return $(e)},U.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},U.prototype._init=function(){this._result=new Array(this.length)};var ae=U;U.prototype._enumerate=function(){for(var e=this,t=e.length,r=e.promise,n=e._input,o=0;r._state===re&&t>o;o++)e._eachEntry(n[o],o)},U.prototype._eachEntry=function(e,t){var r=this,n=r._instanceConstructor;s(e)?e.constructor===n&&e._state!==re?(e._onerror=null,r._settledAt(e._state,t,e._result)):r._willSettleAt(n.resolve(e),t):(r._remaining--,r._result[t]=e)},U.prototype._settledAt=function(e,t,r){var n=this,o=n.promise;o._state===re&&(n._remaining--,e===oe?O(o,r):n._result[t]=r),0===n._remaining&&S(o,n._result)},U.prototype._willSettleAt=function(e,t){var r=this;k(e,void 0,function(e){r._settledAt(ne,t,e)},function(e){r._settledAt(oe,t,e)})};var ue=C,ce=N,le=L,fe=D,de=0,pe=F;F.all=ue,F.race=ce,F.resolve=le,F.reject=fe,F._setScheduler=a,F._setAsap=u,F._asap=W,F.prototype={constructor:F,then:function(e,t){var r=this,n=r._state;if(n===ne&&!e||n===oe&&!t)return this;var o=new this.constructor(m),i=r._result;if(n){var s=arguments[n-1];W(function(){q(n,o,s,i)})}else k(r,o,e,t);return o},"catch":function(e){return this.then(null,e)}};var he=J,ye={Promise:pe,polyfill:he};"function"==typeof define&&define.amd?define(function(){return ye}):"undefined"!=typeof t&&t.exports?t.exports=ye:"undefined"!=typeof this&&(this.ES6Promise=ye),he()}).call(this)}).call(this,e(2),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],10:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],11:[function(e,t,r){var n=e(14),o=e(18),i=e(30),s=i(n,o);t.exports=s},{14:14,18:18,30:30}],12:[function(e,t,r){function n(e,t){if("function"!=typeof e)throw new TypeError(o);return t=i(void 0===t?e.length-1:+t||0,0),function(){for(var r=arguments,n=-1,o=i(r.length-t,0),s=Array(o);++n<o;)s[n]=r[t+n];switch(t){case 0:return e.call(this,s);case 1:return e.call(this,r[0],s);case 2:return e.call(this,r[0],r[1],s)}var a=Array(t+1);for(n=-1;++n<t;)a[n]=r[n];return a[t]=s,e.apply(this,a)}}var o="Expected a function",i=Math.max;t.exports=n},{}],13:[function(e,t,r){function n(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}t.exports=n},{}],14:[function(e,t,r){function n(e,t){for(var r=-1,n=e.length;++r<n&&t(e[r],r,e)!==!1;);return e}t.exports=n},{}],15:[function(e,t,r){function n(e,t){return null==t?e:o(t,i(t),e)}var o=e(17),i=e(55);t.exports=n},{17:17,55:55}],16:[function(e,t,r){function n(e,t,r,y,m,v,g){var w;if(r&&(w=m?r(e,y,m):r(e)),void 0!==w)return w;if(!p(e))return e;var x=f(e);if(x){if(w=u(e),!t)return o(e,w)}else{var j=H.call(e),T=j==b;if(j!=_&&j!=h&&(!T||m))return L[j]?c(e,j,t):m?e:{};if(d(e))return m?e:{};if(w=l(T?{}:e),!t)return s(w,e)}v||(v=[]),g||(g=[]);for(var A=v.length;A--;)if(v[A]==e)return g[A];return v.push(e),g.push(w),(x?i:a)(e,function(o,i){w[i]=n(o,t,r,i,e,v,g)}),w}var o=e(13),i=e(14),s=e(15),a=e(21),u=e(33),c=e(34),l=e(35),f=e(47),d=e(37),p=e(50),h="[object Arguments]",y="[object Array]",m="[object Boolean]",v="[object Date]",g="[object Error]",b="[object Function]",w="[object Map]",x="[object Number]",_="[object Object]",j="[object RegExp]",T="[object Set]",A="[object String]",S="[object WeakMap]",O="[object ArrayBuffer]",k="[object Float32Array]",P="[object Float64Array]",I="[object Int8Array]",R="[object Int16Array]",q="[object Int32Array]",E="[object Uint8Array]",U="[object Uint8ClampedArray]",C="[object Uint16Array]",N="[object Uint32Array]",L={};L[h]=L[y]=L[O]=L[m]=L[v]=L[k]=L[P]=L[I]=L[R]=L[q]=L[x]=L[_]=L[j]=L[A]=L[E]=L[U]=L[C]=L[N]=!0,L[g]=L[b]=L[w]=L[T]=L[S]=!1;var D=Object.prototype,H=D.toString;t.exports=n},{13:13,14:14,15:15,21:21,33:33,34:34,35:35,37:37,47:47,50:50}],17:[function(e,t,r){function n(e,t,r){r||(r={});for(var n=-1,o=t.length;++n<o;){var i=t[n];r[i]=e[i]}return r}t.exports=n},{}],18:[function(e,t,r){var n=e(21),o=e(28),i=o(n);t.exports=i},{21:21,28:28}],19:[function(e,t,r){var n=e(29),o=n();t.exports=o},{29:29}],20:[function(e,t,r){function n(e,t){return o(e,t,i)}var o=e(19),i=e(56);t.exports=n},{19:19,56:56}],21:[function(e,t,r){function n(e,t){return o(e,t,i)}var o=e(19),i=e(55);t.exports=n},{19:19,55:55}],22:[function(e,t,r){function n(e,t,r,d,p){if(!u(e))return e;var h=a(t)&&(s(t)||l(t)),y=h?void 0:f(t);return o(y||t,function(o,s){if(y&&(s=o,o=t[s]),c(o))d||(d=[]),p||(p=[]),i(e,t,s,n,r,d,p);else{var a=e[s],u=r?r(a,o,s,e,t):void 0,l=void 0===u;l&&(u=o),void 0===u&&(!h||s in e)||!l&&(u===u?u===a:a!==a)||(e[s]=u)}}),e}var o=e(14),i=e(23),s=e(47),a=e(36),u=e(50),c=e(41),l=e(53),f=e(55);t.exports=n},{14:14,23:23,36:36,41:41,47:47,50:50,53:53,55:55}],23:[function(e,t,r){function n(e,t,r,n,f,d,p){for(var h=d.length,y=t[r];h--;)if(d[h]==y)return void(e[r]=p[h]);var m=e[r],v=f?f(m,y,r,e,t):void 0,g=void 0===v;g&&(v=y,a(y)&&(s(y)||c(y))?v=s(m)?m:a(m)?o(m):[]:u(y)||i(y)?v=i(m)?l(m):u(m)?m:{}:g=!1),d.push(y),p.push(v),g?e[r]=n(v,y,f,d,p):(v===v?v!==m:m===m)&&(e[r]=v)}var o=e(13),i=e(46),s=e(47),a=e(36),u=e(51),c=e(53),l=e(54);t.exports=n},{13:13,36:36,46:46,47:47,51:51,53:53,54:54}],24:[function(e,t,r){function n(e){return function(t){return null==t?void 0:o(t)[e]}}var o=e(43);t.exports=n},{43:43}],25:[function(e,t,r){function n(e,t,r){if("function"!=typeof e)return o;if(void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 3:return function(r,n,o){return e.call(t,r,n,o)};case 4:return function(r,n,o,i){return e.call(t,r,n,o,i)};case 5:return function(r,n,o,i,s){return e.call(t,r,n,o,i,s)}}return function(){return e.apply(t,arguments)}}var o=e(59);t.exports=n},{59:59}],26:[function(e,t,r){(function(e){function r(e){var t=new n(e.byteLength),r=new o(t);return r.set(new o(e)),t}var n=e.ArrayBuffer,o=e.Uint8Array;t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],27:[function(e,t,r){function n(e){return s(function(t,r){var n=-1,s=null==t?0:r.length,a=s>2?r[s-2]:void 0,u=s>2?r[2]:void 0,c=s>1?r[s-1]:void 0;for("function"==typeof a?(a=o(a,c,5),s-=2):(a="function"==typeof c?c:void 0,s-=a?1:0),u&&i(r[0],r[1],u)&&(a=3>s?void 0:a,s=1);++n<s;){var l=r[n];l&&e(t,l,a)}return t})}var o=e(25),i=e(39),s=e(12);t.exports=n},{12:12,25:25,39:39}],28:[function(e,t,r){function n(e,t){return function(r,n){var a=r?o(r):0;if(!i(a))return e(r,n);for(var u=t?a:-1,c=s(r);(t?u--:++u<a)&&n(c[u],u,c)!==!1;);return r}}var o=e(31),i=e(40),s=e(43);t.exports=n},{31:31,40:40,43:43}],29:[function(e,t,r){function n(e){return function(t,r,n){for(var i=o(t),s=n(t),a=s.length,u=e?a:-1;e?u--:++u<a;){var c=s[u];if(r(i[c],c,i)===!1)break}return t}}var o=e(43);t.exports=n},{43:43}],30:[function(e,t,r){function n(e,t){return function(r,n,s){return"function"==typeof n&&void 0===s&&i(r)?e(r,n):t(r,o(n,s,3))}}var o=e(25),i=e(47);t.exports=n},{25:25,47:47}],31:[function(e,t,r){var n=e(24),o=n("length");t.exports=o},{24:24}],32:[function(e,t,r){function n(e,t){var r=null==e?void 0:e[t];return o(r)?r:void 0}var o=e(49);t.exports=n},{49:49}],33:[function(e,t,r){function n(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&i.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var o=Object.prototype,i=o.hasOwnProperty;t.exports=n},{}],34:[function(e,t,r){(function(r){function n(e,t,r){var n=e.constructor;switch(t){case l:return o(e);case i:case s:return new n(+e);case f:case d:case p:case h:case y:case m:case v:case g:case b:n instanceof n&&(n=_[t]);var x=e.buffer;return new n(r?o(x):x,e.byteOffset,e.length);case a:case c:return new n(e);case u:var j=new n(e.source,w.exec(e));j.lastIndex=e.lastIndex}return j}var o=e(26),i="[object Boolean]",s="[object Date]",a="[object Number]",u="[object RegExp]",c="[object String]",l="[object ArrayBuffer]",f="[object Float32Array]",d="[object Float64Array]",p="[object Int8Array]",h="[object Int16Array]",y="[object Int32Array]",m="[object Uint8Array]",v="[object Uint8ClampedArray]",g="[object Uint16Array]",b="[object Uint32Array]",w=/\w*$/,x=r.Uint8Array,_={};_[f]=r.Float32Array,_[d]=r.Float64Array,_[p]=r.Int8Array,_[h]=r.Int16Array,_[y]=r.Int32Array,_[m]=x,_[v]=r.Uint8ClampedArray,_[g]=r.Uint16Array,_[b]=r.Uint32Array,t.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{26:26}],35:[function(e,t,r){function n(e){var t=e.constructor;return"function"==typeof t&&t instanceof t||(t=Object),new t}t.exports=n},{}],36:[function(e,t,r){function n(e){return null!=e&&i(o(e))}var o=e(31),i=e(40);t.exports=n},{31:31,40:40}],37:[function(e,t,r){var n=function(){try{Object({toString:0}+"")}catch(e){return function(){return!1}}return function(e){return"function"!=typeof e.toString&&"string"==typeof(e+"")}}();t.exports=n},{}],38:[function(e,t,r){function n(e,t){return e="number"==typeof e||o.test(e)?+e:-1,t=null==t?i:t,e>-1&&e%1==0&&t>e}var o=/^\d+$/,i=9007199254740991;t.exports=n},{}],39:[function(e,t,r){function n(e,t,r){if(!s(r))return!1;var n=typeof t;if("number"==n?o(r)&&i(t,r.length):"string"==n&&t in r){var a=r[t];return e===e?e===a:a!==a}return!1}var o=e(36),i=e(38),s=e(50);t.exports=n},{36:36,38:38,50:50}],40:[function(e,t,r){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&o>=e}var o=9007199254740991;t.exports=n},{}],41:[function(e,t,r){function n(e){return!!e&&"object"==typeof e}t.exports=n},{}],42:[function(e,t,r){function n(e){for(var t=c(e),r=t.length,n=r&&e.length,l=!!n&&a(n)&&(i(e)||o(e)||u(e)),d=-1,p=[];++d<r;){var h=t[d];(l&&s(h,n)||f.call(e,h))&&p.push(h)}return p}var o=e(46),i=e(47),s=e(38),a=e(40),u=e(52),c=e(56),l=Object.prototype,f=l.hasOwnProperty;t.exports=n},{38:38,40:40,46:46,47:47,52:52,56:56}],43:[function(e,t,r){function n(e){if(s.unindexedChars&&i(e)){for(var t=-1,r=e.length,n=Object(e);++t<r;)n[t]=e.charAt(t);return n}return o(e)?e:Object(e)}var o=e(50),i=e(52),s=e(58);t.exports=n},{50:50,52:52,58:58}],44:[function(e,t,r){function n(e,t,r,n){return t&&"boolean"!=typeof t&&s(e,t,r)?t=!1:"function"==typeof t&&(n=r,r=t,t=!1),"function"==typeof r?o(e,t,i(r,n,1)):o(e,t)}var o=e(16),i=e(25),s=e(39);t.exports=n},{16:16,25:25,39:39}],45:[function(e,t,r){function n(e,t,r){return"function"==typeof t?o(e,!0,i(t,r,1)):o(e,!0)}var o=e(16),i=e(25);t.exports=n},{16:16,25:25}],46:[function(e,t,r){function n(e){return i(e)&&o(e)&&a.call(e,"callee")&&!u.call(e,"callee")}var o=e(36),i=e(41),s=Object.prototype,a=s.hasOwnProperty,u=s.propertyIsEnumerable;t.exports=n},{36:36,41:41}],47:[function(e,t,r){var n=e(32),o=e(40),i=e(41),s="[object Array]",a=Object.prototype,u=a.toString,c=n(Array,"isArray"),l=c||function(e){return i(e)&&o(e.length)&&u.call(e)==s};t.exports=l},{32:32,40:40,41:41}],48:[function(e,t,r){function n(e){return o(e)&&a.call(e)==i}var o=e(50),i="[object Function]",s=Object.prototype,a=s.toString;t.exports=n},{50:50}],49:[function(e,t,r){function n(e){return null==e?!1:o(e)?f.test(c.call(e)):s(e)&&(i(e)?f:a).test(e)}var o=e(48),i=e(37),s=e(41),a=/^\[object .+?Constructor\]$/,u=Object.prototype,c=Function.prototype.toString,l=u.hasOwnProperty,f=RegExp("^"+c.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=n},{37:37,41:41,48:48}],50:[function(e,t,r){function n(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}t.exports=n},{}],51:[function(e,t,r){function n(e){var t;if(!a(e)||d.call(e)!=c||s(e)||i(e)||!f.call(e,"constructor")&&(t=e.constructor,"function"==typeof t&&!(t instanceof t)))return!1;var r;return u.ownLast?(o(e,function(e,t,n){return r=f.call(n,t),!1}),r!==!1):(o(e,function(e,t){r=t}),void 0===r||f.call(e,r))}var o=e(20),i=e(46),s=e(37),a=e(41),u=e(58),c="[object Object]",l=Object.prototype,f=l.hasOwnProperty,d=l.toString;t.exports=n},{20:20,37:37,41:41,46:46,58:58}],52:[function(e,t,r){function n(e){return"string"==typeof e||o(e)&&a.call(e)==i}var o=e(41),i="[object String]",s=Object.prototype,a=s.toString;t.exports=n},{41:41}],53:[function(e,t,r){function n(e){return i(e)&&o(e.length)&&!!P[R.call(e)]}var o=e(40),i=e(41),s="[object Arguments]",a="[object Array]",u="[object Boolean]",c="[object Date]",l="[object Error]",f="[object Function]",d="[object Map]",p="[object Number]",h="[object Object]",y="[object RegExp]",m="[object Set]",v="[object String]",g="[object WeakMap]",b="[object ArrayBuffer]",w="[object Float32Array]",x="[object Float64Array]",_="[object Int8Array]",j="[object Int16Array]",T="[object Int32Array]",A="[object Uint8Array]",S="[object Uint8ClampedArray]",O="[object Uint16Array]",k="[object Uint32Array]",P={};P[w]=P[x]=P[_]=P[j]=P[T]=P[A]=P[S]=P[O]=P[k]=!0,P[s]=P[a]=P[b]=P[u]=P[c]=P[l]=P[f]=P[d]=P[p]=P[h]=P[y]=P[m]=P[v]=P[g]=!1;var I=Object.prototype,R=I.toString;t.exports=n},{40:40,41:41}],54:[function(e,t,r){function n(e){return o(e,i(e))}var o=e(17),i=e(56);t.exports=n},{17:17,56:56}],55:[function(e,t,r){var n=e(32),o=e(36),i=e(50),s=e(42),a=e(58),u=n(Object,"keys"),c=u?function(e){var t=null==e?void 0:e.constructor;return"function"==typeof t&&t.prototype===e||("function"==typeof e?a.enumPrototypes:o(e))?s(e):i(e)?u(e):[]}:s;t.exports=c},{32:32,36:36,42:42,50:50,58:58}],56:[function(e,t,r){function n(e){if(null==e)return[];l(e)||(e=Object(e));var t=e.length;t=t&&c(t)&&(s(e)||i(e)||f(e))&&t||0;for(var r=e.constructor,n=-1,o=a(r)&&r.prototype||T,p=o===e,h=Array(t),y=t>0,v=d.enumErrorProps&&(e===j||e instanceof Error),g=d.enumPrototypes&&a(e);++n<t;)h[n]=n+""; | ||
for(var w in e)g&&"prototype"==w||v&&("message"==w||"name"==w)||y&&u(w,t)||"constructor"==w&&(p||!S.call(e,w))||h.push(w);if(d.nonEnumShadows&&e!==T){var P=e===A?x:e===j?m:O.call(e),I=k[P]||k[b];for(P==b&&(o=T),t=_.length;t--;){w=_[t];var R=I[w];p&&R||(R?!S.call(e,w):e[w]===o[w])||h.push(w)}}return h}var o=e(14),i=e(46),s=e(47),a=e(48),u=e(38),c=e(40),l=e(50),f=e(52),d=e(58),p="[object Array]",h="[object Boolean]",y="[object Date]",m="[object Error]",v="[object Function]",g="[object Number]",b="[object Object]",w="[object RegExp]",x="[object String]",_=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],j=Error.prototype,T=Object.prototype,A=String.prototype,S=T.hasOwnProperty,O=T.toString,k={};k[p]=k[y]=k[g]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},k[h]=k[x]={constructor:!0,toString:!0,valueOf:!0},k[m]=k[v]=k[w]={constructor:!0,toString:!0},k[b]={constructor:!0},o(_,function(e){for(var t in k)if(S.call(k,t)){var r=k[t];r[e]=S.call(r,e)}}),t.exports=n},{14:14,38:38,40:40,46:46,47:47,48:48,50:50,52:52,58:58}],57:[function(e,t,r){var n=e(22),o=e(27),i=o(n);t.exports=i},{22:22,27:27}],58:[function(e,t,r){var n=Array.prototype,o=Error.prototype,i=Object.prototype,s=i.propertyIsEnumerable,a=n.splice,u={};!function(e){var t=function(){this.x=e},r={0:e,length:e},n=[];t.prototype={valueOf:e,y:e};for(var i in new t)n.push(i);u.enumErrorProps=s.call(o,"message")||s.call(o,"name"),u.enumPrototypes=s.call(t,"prototype"),u.nonEnumShadows=!/valueOf/.test(n),u.ownLast="x"!=n[0],u.spliceObjects=(a.call(r,0,1),!r[0]),u.unindexedChars="x"[0]+Object("x")[0]!="xx"}(1,0),t.exports=u},{}],59:[function(e,t,r){function n(e){return e}t.exports=n},{}],60:[function(e,t,r){(function(r){"use strict";function n(t,r,n){var s=e(6)("algoliasearch"),a=e(44),u=e(47),c="Usage: algoliasearch(applicationID, apiKey, opts)";if(!t)throw new f.AlgoliaSearchError("Please provide an application ID. "+c);if(!r)throw new f.AlgoliaSearchError("Please provide an API key. "+c);this.applicationID=t,this.apiKey=r;var l=[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},n=n||{};var d=n.protocol||"https:",p=void 0===n.timeout?2e3:n.timeout;if(/:$/.test(d)||(d+=":"),"http:"!==n.protocol&&"https:"!==n.protocol)throw new f.AlgoliaSearchError("protocol must be `http:` or `https:` (was `"+n.protocol+"`)");n.hosts?u(n.hosts)?(this.hosts.read=a(n.hosts),this.hosts.write=a(n.hosts)):(this.hosts.read=a(n.hosts.read),this.hosts.write=a(n.hosts.write)):(this.hosts.read=[this.applicationID+"-dsn.algolia.net"].concat(l),this.hosts.write=[this.applicationID+".algolia.net"].concat(l)),this.hosts.read=o(this.hosts.read,i(d)),this.hosts.write=o(this.hosts.write,i(d)),this.requestTimeout=p,this.extraHeaders=[],this.cache={},this._ua=n._ua,this._useCache=void 0===n._useCache?!0:n._useCache,this._setTimeout=n._setTimeout,s("init done, %j",this)}function o(e,t){for(var r=[],n=0;n<e.length;++n)r.push(t(e[n],n));return r}function i(e){return function(t){return e+"//"+t.toLowerCase()}}function s(){var e="Not implemented in this environment.\nIf you feel this is a mistake, write to support@algolia.com";throw new f.AlgoliaSearchError(e)}function a(e,t){var r=e.toLowerCase().replace(".","").replace("()","");return"algoliasearch: `"+e+"` was replaced by `"+t+"`. Please see https://github.com/algolia/algoliasearch-client-js/wiki/Deprecated#"+r}function u(e,t){t(e,0)}function c(e,t){function r(){return n||(console.log(t),n=!0),e.apply(this,arguments)}var n=!1;return r}function l(e){if(void 0===Array.prototype.toJSON)return JSON.stringify(e);var t=Array.prototype.toJSON;delete Array.prototype.toJSON;var r=JSON.stringify(e);return Array.prototype.toJSON=t,r}t.exports=n;var f=e(67);n.prototype={deleteIndex:function(e,t){return this._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(e),hostType:"write",callback:t})},moveIndex:function(e,t,r){var n={operation:"move",destination:t};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(e)+"/operation",body:n,hostType:"write",callback:r})},copyIndex:function(e,t,r){var n={operation:"copy",destination:t};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(e)+"/operation",body:n,hostType:"write",callback:r})},getLogs:function(e,t,r){return 0===arguments.length||"function"==typeof e?(r=e,e=0,t=10):(1===arguments.length||"function"==typeof t)&&(r=t,t=10),this._jsonRequest({method:"GET",url:"/1/logs?offset="+e+"&length="+t,hostType:"read",callback:r})},listIndexes:function(e,t){var r="";return void 0===e||"function"==typeof e?t=e:r="?page="+e,this._jsonRequest({method:"GET",url:"/1/indexes"+r,hostType:"read",callback:t})},initIndex:function(e){return new this.Index(this,e)},listUserKeys:function(e){return this._jsonRequest({method:"GET",url:"/1/keys",hostType:"read",callback:e})},getUserKeyACL:function(e,t){return this._jsonRequest({method:"GET",url:"/1/keys/"+e,hostType:"read",callback:t})},deleteUserKey:function(e,t){return this._jsonRequest({method:"DELETE",url:"/1/keys/"+e,hostType:"write",callback:t})},addUserKey:function(e,t,r){(1===arguments.length||"function"==typeof t)&&(r=t,t=null);var n={acl:e};return t&&(n.validity=t.validity,n.maxQueriesPerIPPerHour=t.maxQueriesPerIPPerHour,n.maxHitsPerQuery=t.maxHitsPerQuery,n.indexes=t.indexes,n.description=t.description,t.queryParameters&&(n.queryParameters=this._getSearchParams(t.queryParameters,"")),n.referers=t.referers),this._jsonRequest({method:"POST",url:"/1/keys",body:n,hostType:"write",callback:r})},addUserKeyWithValidity:c(function(e,t,r){return this.addUserKey(e,t,r)},a("client.addUserKeyWithValidity()","client.addUserKey()")),updateUserKey:function(e,t,r,n){(2===arguments.length||"function"==typeof r)&&(n=r,r=null);var o={acl:t};return r&&(o.validity=r.validity,o.maxQueriesPerIPPerHour=r.maxQueriesPerIPPerHour,o.maxHitsPerQuery=r.maxHitsPerQuery,o.indexes=r.indexes,o.description=r.description,r.queryParameters&&(o.queryParameters=this._getSearchParams(r.queryParameters,"")),o.referers=r.referers),this._jsonRequest({method:"PUT",url:"/1/keys/"+e,body:o,hostType:"write",callback:n})},setSecurityTags:function(e){if("[object Array]"===Object.prototype.toString.call(e)){for(var t=[],r=0;r<e.length;++r)if("[object Array]"===Object.prototype.toString.call(e[r])){for(var n=[],o=0;o<e[r].length;++o)n.push(e[r][o]);t.push("("+n.join(",")+")")}else t.push(e[r]);e=t.join(",")}this.securityTags=e},setUserToken:function(e){this.userToken=e},startQueriesBatch:c(function(){this._batch=[]},a("client.startQueriesBatch()","client.search()")),addQueryInBatch:c(function(e,t,r){this._batch.push({indexName:e,query:t,params:r})},a("client.addQueryInBatch()","client.search()")),clearCache:function(){this.cache={}},sendQueriesBatch:c(function(e){return this.search(this._batch,e)},a("client.sendQueriesBatch()","client.search()")),setRequestTimeout:function(e){e&&(this.requestTimeout=parseInt(e,10))},search:function(e,t){var r=this,n={requests:o(e,function(e){var t="";return void 0!==e.query&&(t+="query="+encodeURIComponent(e.query)),{indexName:e.indexName,params:r._getSearchParams(e.params,t)}})};return this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",body:n,hostType:"read",callback:t})},batch:function(e,t){return this._jsonRequest({method:"POST",url:"/1/indexes/*/batch",body:{requests:e},hostType:"write",callback:t})},destroy:s,enableRateLimitForward:s,disableRateLimitForward:s,useSecuredAPIKey:s,disableSecuredAPIKey:s,generateSecuredApiKey:s,Index:function(e,t){this.indexName=t,this.as=e,this.typeAheadArgs=null,this.typeAheadValueOption=null,this.cache={}},setExtraHeader:function(e,t){this.extraHeaders.push({name:e.toLowerCase(),value:t})},_sendQueriesBatch:function(e,t){function r(){for(var t="",r=0;r<e.requests.length;++r){var n="/1/indexes/"+encodeURIComponent(e.requests[r].indexName)+"?"+e.requests[r].params;t+=r+"="+encodeURIComponent(n)+"&"}return t}return this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",body:e,hostType:"read",fallback:{method:"GET",url:"/1/indexes/*",body:{params:r()}},callback:t})},_jsonRequest:function(t){function n(e,u){function p(e){var t=e&&e.body&&e.body.message&&e.body.status||e.statusCode||e&&e.body&&200;i("received response: statusCode: %s, computed statusCode: %d, headers: %j",e.statusCode,t,e.headers),r.env.DEBUG&&-1!==r.env.DEBUG.indexOf("debugBody")&&i("body: %j",e.body);var n=200===t||201===t,o=!n&&4!==Math.floor(t/100)&&1!==Math.floor(t/100);if(a._useCache&&n&&s&&(s[m]=e.body),n)return e.body;if(o)return c+=1,y();var u=new f.AlgoliaSearchError(e.body&&e.body.message);return a._promise.reject(u)}function h(r){return i("error: %s, stack: %s",r.message,r.stack),r instanceof f.AlgoliaSearchError||(r=new f.Unknown(r&&r.message,r)),c+=1,r instanceof f.Unknown||r instanceof f.UnparsableJSON||!e.fallback&&r instanceof f.Network||c>=a.hosts[t.hostType].length&&(d||!t.fallback||!a._request.fallback)?a._promise.reject(r):(a.hostIndex[t.hostType]=++a.hostIndex[t.hostType]%a.hosts[t.hostType].length,r instanceof f.RequestTimeout?y():(a._request.fallback&&!a.useFallback&&(a.useFallback=!0),n(e,u)))}function y(){return a.hostIndex[t.hostType]=++a.hostIndex[t.hostType]%a.hosts[t.hostType].length,u.timeout=a.requestTimeout*(c+1),n(e,u)}var m;if(a._useCache&&(m=t.url),a._useCache&&o&&(m+="_body_"+u.body),a._useCache&&s&&void 0!==s[m])return i("serving response from cache"),a._promise.resolve(JSON.parse(l(s[m])));if(c>=a.hosts[t.hostType].length||a.useFallback&&!d)return t.fallback&&a._request.fallback&&!d?(i("switching to fallback"),c=0,u.method=t.fallback.method,u.url=t.fallback.url,u.jsonBody=t.fallback.body,u.jsonBody&&(u.body=l(u.jsonBody)),u.timeout=a.requestTimeout*(c+1),a.hostIndex[t.hostType]=0,d=!0,n(a._request.fallback,u)):(i("could not get any response"),a._promise.reject(new f.AlgoliaSearchError("Cannot connect to the AlgoliaSearch API. Send an email to support@algolia.com to report and resolve the issue. Application id was: "+a.applicationID)));var v=a.hosts[t.hostType][a.hostIndex[t.hostType]]+u.url,g={body:o,jsonBody:t.body,method:u.method,headers:a._computeRequestHeaders(),timeout:u.timeout,debug:i};return i("method: %s, url: %s, headers: %j, timeout: %d",g.method,v,g.headers,g.timeout),e===a._request.fallback&&i("using fallback"),e.call(a,v,g).then(p,h)}var o,i=e(6)("algoliasearch:"+t.url),s=t.cache,a=this,c=0,d=!1;void 0!==t.body&&(o=l(t.body)),i("request start");var p=a.useFallback&&t.fallback,h=p?t.fallback:t,y=n(p?a._request.fallback:a._request,{url:h.url,method:h.method,body:o,jsonBody:t.body,timeout:a.requestTimeout*(c+1)});return t.callback?void y.then(function(e){u(function(){t.callback(null,e)},a._setTimeout||setTimeout)},function(e){u(function(){t.callback(e)},a._setTimeout||setTimeout)}):y},_getSearchParams:function(e,t){if(this._isUndefined(e)||null===e)return t;for(var r in e)null!==r&&void 0!==e[r]&&e.hasOwnProperty(r)&&(t+=""===t?"":"&",t+=r+"="+encodeURIComponent("[object Array]"===Object.prototype.toString.call(e[r])?l(e[r]):e[r]));return t},_isUndefined:function(e){return void 0===e},_computeRequestHeaders:function(){var t=e(11),r={"x-algolia-api-key":this.apiKey,"x-algolia-application-id":this.applicationID,"x-algolia-agent":this._ua};return this.userToken&&(r["x-algolia-usertoken"]=this.userToken),this.securityTags&&(r["x-algolia-tagfilters"]=this.securityTags),this.extraHeaders&&t(this.extraHeaders,function(e){r[e.name]=e.value}),r}},n.prototype.Index.prototype={clearCache:function(){this.cache={}},addObject:function(e,t,r){var n=this;return(1===arguments.length||"function"==typeof t)&&(r=t,t=void 0),this.as._jsonRequest({method:void 0!==t?"PUT":"POST",url:"/1/indexes/"+encodeURIComponent(n.indexName)+(void 0!==t?"/"+encodeURIComponent(t):""),body:e,hostType:"write",callback:r})},addObjects:function(e,t){for(var r=this,n={requests:[]},o=0;o<e.length;++o){var i={action:"addObject",body:e[o]};n.requests.push(i)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/batch",body:n,hostType:"write",callback:t})},getObject:function(e,t,r){var n=this;(1===arguments.length||"function"==typeof t)&&(r=t,t=void 0);var o="";if(void 0!==t){o="?attributes=";for(var i=0;i<t.length;++i)0!==i&&(o+=","),o+=t[i]}return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/"+encodeURIComponent(e)+o,hostType:"read",callback:r})},getObjects:function(e,t,r){var n=this;(1===arguments.length||"function"==typeof t)&&(r=t,t=void 0);var i={requests:o(e,function(e){var r={indexName:n.indexName,objectID:e};return t&&(r.attributesToRetrieve=t.join(",")),r})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/*/objects",hostType:"read",body:i,callback:r})},partialUpdateObject:function(e,t){var r=this;return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/"+encodeURIComponent(e.objectID)+"/partial",body:e,hostType:"write",callback:t})},partialUpdateObjects:function(e,t){for(var r=this,n={requests:[]},o=0;o<e.length;++o){var i={action:"partialUpdateObject",objectID:e[o].objectID,body:e[o]};n.requests.push(i)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/batch",body:n,hostType:"write",callback:t})},saveObject:function(e,t){var r=this;return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/"+encodeURIComponent(e.objectID),body:e,hostType:"write",callback:t})},saveObjects:function(e,t){for(var r=this,n={requests:[]},o=0;o<e.length;++o){var i={action:"updateObject",objectID:e[o].objectID,body:e[o]};n.requests.push(i)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/batch",body:n,hostType:"write",callback:t})},deleteObject:function(e,t){if("function"==typeof e||"string"!=typeof e&&"number"!=typeof e){var r=new f.AlgoliaSearchError("Cannot delete an object without an objectID");return t=e,"function"==typeof t?t(r):this.as._promise.reject(r)}var n=this;return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/"+encodeURIComponent(e),hostType:"write",callback:t})},deleteObjects:function(e,t){var r=this,n={requests:o(e,function(e){return{action:"deleteObject",objectID:e,body:{objectID:e}}})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/batch",body:n,hostType:"write",callback:t})},deleteByQuery:function(e,t,r){function n(e){if(0===e.nbHits)return e;var t=o(e.hits,function(e){return e.objectID});return l.deleteObjects(t).then(i).then(s)}function i(e){return l.waitTask(e.taskID)}function s(){return l.deleteByQuery(e,t)}function a(){u(function(){r(null)},f._setTimeout||setTimeout)}function c(e){u(function(){r(e)},f._setTimeout||setTimeout)}var l=this,f=l.as;(1===arguments.length||"function"==typeof t)&&(r=t,t={}),t.attributesToRetrieve="objectID",t.hitsPerPage=1e3,this.clearCache();var d=this.search(e,t).then(n);return r?void d.then(a,c):d},search:function(e,t,r){if("function"==typeof e&&"object"==typeof t||"object"==typeof r)throw new f.AlgoliaSearchError("index.search usage is index.search(query, params, cb)");0===arguments.length||"function"==typeof e?(r=e,e=""):(1===arguments.length||"function"==typeof t)&&(r=t,t=void 0),"object"==typeof e&&null!==e?(t=e,e=void 0):(void 0===e||null===e)&&(e="");var n="";return void 0!==e&&(n+="query="+encodeURIComponent(e)),void 0!==t&&(n=this.as._getSearchParams(t,n)),this._search(n,r)},browse:function(t,r,n){var o,i,s=e(57),a=this;0===arguments.length||1===arguments.length&&"function"==typeof arguments[0]?(o=0,n=arguments[0],t=void 0):"number"==typeof arguments[0]?(o=arguments[0],"number"==typeof arguments[1]?i=arguments[1]:"function"==typeof arguments[1]&&(n=arguments[1],i=void 0),t=void 0,r=void 0):"object"==typeof arguments[0]?("function"==typeof arguments[1]&&(n=arguments[1]),r=arguments[0],t=void 0):"string"==typeof arguments[0]&&"function"==typeof arguments[1]&&(n=arguments[1],r=void 0),r=s({},r||{},{page:o,hitsPerPage:i,query:t});var u=this.as._getSearchParams(r,"");return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(a.indexName)+"/browse?"+u,hostType:"read",callback:n})},browseFrom:function(e,t){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse?cursor="+e,hostType:"read",callback:t})},browseAll:function(t,r){function n(e){if(!a._stopped){var t;t=void 0!==e?"cursor="+encodeURIComponent(e):l,u._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(c.indexName)+"/browse?"+t,hostType:"read",callback:o})}}function o(e,t){return a._stopped?void 0:e?void a._error(e):(a._result(t),void 0===t.cursor?void a._end():void n(t.cursor))}"object"==typeof t&&(r=t,t=void 0);var i=e(57),s=e(61),a=new s,u=this.as,c=this,l=u._getSearchParams(i({},r||{},{query:t}),"");return n(),a},ttAdapter:function(e){var t=this;return function(r,n,o){var i;i="function"==typeof o?o:n,t.search(r,e,function(e,t){return e?void i(e):void i(t.hits)})}},waitTask:function(e,t){function r(){return l._jsonRequest({method:"GET",hostType:"read",url:"/1/indexes/"+encodeURIComponent(c.indexName)+"/task/"+e}).then(function(e){a++;var t=i*a*a;return t>s&&(t=s),"published"!==e.status?l._promise.delay(t).then(r):e})}function n(e){u(function(){t(null,e)},l._setTimeout||setTimeout)}function o(e){u(function(){t(e)},l._setTimeout||setTimeout)}var i=100,s=5e3,a=0,c=this,l=c.as,f=r();return t?void f.then(n,o):f},clearIndex:function(e){var t=this;return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/clear",hostType:"write",callback:e})},getSettings:function(e){var t=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/settings",hostType:"read",callback:e})},setSettings:function(e,t){var r=this;return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/settings",hostType:"write",body:e,callback:t})},listUserKeys:function(e){var t=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/keys",hostType:"read",callback:e})},getUserKeyACL:function(e,t){var r=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/keys/"+e,hostType:"read",callback:t})},deleteUserKey:function(e,t){var r=this;return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/keys/"+e,hostType:"write",callback:t})},addUserKey:function(e,t,r){(1===arguments.length||"function"==typeof t)&&(r=t,t=null);var n={acl:e};return t&&(n.validity=t.validity,n.maxQueriesPerIPPerHour=t.maxQueriesPerIPPerHour,n.maxHitsPerQuery=t.maxHitsPerQuery,n.description=t.description,t.queryParameters&&(n.queryParameters=this.as._getSearchParams(t.queryParameters,"")),n.referers=t.referers),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",body:n,hostType:"write",callback:r})},addUserKeyWithValidity:c(function(e,t,r){return this.addUserKey(e,t,r)},a("index.addUserKeyWithValidity()","index.addUserKey()")),updateUserKey:function(e,t,r,n){(2===arguments.length||"function"==typeof r)&&(n=r,r=null);var o={acl:t};return r&&(o.validity=r.validity,o.maxQueriesPerIPPerHour=r.maxQueriesPerIPPerHour,o.maxHitsPerQuery=r.maxHitsPerQuery,o.description=r.description,r.queryParameters&&(o.queryParameters=this.as._getSearchParams(r.queryParameters,"")),o.referers=r.referers),this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+e,body:o,hostType:"write",callback:n})},_search:function(e,t){return this.as._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/query",body:{params:e},hostType:"read",fallback:{method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName),body:{params:e}},callback:t})},as:null,indexName:null,typeAheadArgs:null,typeAheadValueOption:null}}).call(this,e(2))},{11:11,2:2,44:44,47:47,57:57,6:6,61:61,67:67}],61:[function(e,t,r){"use strict";function n(){}t.exports=n;var o=e(10),i=e(1).EventEmitter;o(n,i),n.prototype.stop=function(){this._stopped=!0,this._clean()},n.prototype._end=function(){this.emit("end"),this._clean()},n.prototype._error=function(e){this.emit("error",e),this._clean()},n.prototype._result=function(e){this.emit("result",e)},n.prototype._clean=function(){this.removeAllListeners("stop"),this.removeAllListeners("end"),this.removeAllListeners("error"),this.removeAllListeners("result")}},{1:1,10:10}],62:[function(e,t,r){"use strict";function n(t,r,i){var s=e(45),a=e(64);return i=s(i||{}),void 0===i.protocol&&(i.protocol=a()),i._ua=i._ua||n.ua,new o(t,r,i)}function o(){s.apply(this,arguments)}var i=e(10),s=e(60),a=e(67),u=e(65),c=e(66);window.algoliasearch=e(63),n.version=e(68),n.ua="Algolia for jQuery "+n.version,window.__algolia={debug:e(6),algoliasearch:n};var l=window.jQuery;l.algolia={Client:n,ua:n.ua,version:n.version},i(o,s),o.prototype._request=function(e,t){return new l.Deferred(function(r){var n=t.body;e=u(e,t.headers);var o={accept:"application/json"};n&&("POST"===t.method?o["content-type"]="application/x-www-form-urlencoded":o["content-type"]="application/json"),l.ajax(e,{type:t.method,timeout:t.timeout,dataType:"json",data:n,headers:o,complete:function(e,t){return"timeout"===t?void r.reject(new a.RequestTimeout):0===e.status?void r.reject(new a.Network({more:e})):void r.resolve({statusCode:e.status,body:e.responseJSON,headers:e.getAllResponseHeaders()})}})}).promise()},o.prototype._request.fallback=function(e,t){return e=u(e,t.headers),new l.Deferred(function(r){c(e,t,function(e,t){return e?void r.reject(e):void r.resolve(t)})}).promise()},o.prototype._promise={reject:function(e){return new l.Deferred(function(t){t.reject(e)}).promise()},resolve:function(e){return new l.Deferred(function(t){t.resolve(e)}).promise()},delay:function(e){return new l.Deferred(function(t){setTimeout(function(){t.resolve()},e)}).promise()}}},{10:10,45:45,6:6,60:60,63:63,64:64,65:65,66:66,67:67,68:68}],63:[function(e,t,r){"use strict";function n(t,r,i){var s=e(45),a=e(64);return i=s(i||{}),void 0===i.protocol&&(i.protocol=a()),i._ua=i._ua||n.ua,new o(t,r,i)}function o(){a.apply(this,arguments)}t.exports=n;var i=e(10),s=window.Promise||e(9).Promise,a=e(60),u=e(67),c=e(65),l=e(66);n.version=e(68),n.ua="Algolia for vanilla JavaScript "+n.version,window.__algolia={debug:e(6),algoliasearch:n};var f={hasXMLHttpRequest:"XMLHttpRequest"in window,hasXDomainRequest:"XDomainRequest"in window,cors:"withCredentials"in new XMLHttpRequest,timeout:"timeout"in new XMLHttpRequest};i(o,a),o.prototype._request=function(e,t){return new s(function(r,n){function o(){if(!l){f.timeout||clearTimeout(a);var e;try{e={body:JSON.parse(p.responseText),statusCode:p.status,headers:p.getAllResponseHeaders&&p.getAllResponseHeaders()||{}}}catch(t){e=new u.UnparsableJSON({more:p.responseText})}e instanceof u.UnparsableJSON?n(e):r(e)}}function i(e){l||(f.timeout||clearTimeout(a),n(new u.Network({more:e})))}function s(){f.timeout||(l=!0,p.abort()),n(new u.RequestTimeout)}if(!f.cors&&!f.hasXDomainRequest)return void n(new u.Network("CORS not supported"));e=c(e,t.headers);var a,l,d=t.body,p=f.cors?new XMLHttpRequest:new XDomainRequest;p instanceof XMLHttpRequest?p.open(t.method,e,!0):p.open(t.method,e),f.cors&&(d&&("POST"===t.method?p.setRequestHeader("content-type","application/x-www-form-urlencoded"):p.setRequestHeader("content-type","application/json")),p.setRequestHeader("accept","application/json")),p.onprogress=function(){},p.onload=o,p.onerror=i,f.timeout?(p.timeout=t.timeout,p.ontimeout=s):a=setTimeout(s,t.timeout),p.send(d)})},o.prototype._request.fallback=function(e,t){return e=c(e,t.headers),new s(function(r,n){l(e,t,function(e,t){return e?void n(e):void r(t)})})},o.prototype._promise={reject:function(e){return s.reject(e)},resolve:function(e){return s.resolve(e)},delay:function(e){return new s(function(t){setTimeout(t,e)})}}},{10:10,45:45,6:6,60:60,64:64,65:65,66:66,67:67,68:68,9:9}],64:[function(e,t,r){"use strict";function n(){var e=window.document.location.protocol;return"http:"!==e&&"https:"!==e&&(e="http:"),e}t.exports=n},{}],65:[function(e,t,r){"use strict";function n(e,t){return e+=/\?/.test(e)?"&":"?",e+o.encode(t)}t.exports=n;var o=e(5)},{5:5}],66:[function(e,t,r){"use strict";function n(e,t,r){function n(){t.debug("JSONP: success"),y||f||(y=!0,l||(t.debug("JSONP: Fail. Script loaded but did not call the callback"),a(),r(new o.JSONPScriptFail)))}function s(){("loaded"===this.readyState||"complete"===this.readyState)&&n()}function a(){clearTimeout(m),p.onload=null,p.onreadystatechange=null,p.onerror=null,d.removeChild(p);try{delete window[h],delete window[h+"_loaded"]}catch(e){window[h]=null,window[h+"_loaded"]=null}}function u(){t.debug("JSONP: Script timeout"),f=!0,a(),r(new o.RequestTimeout)}function c(){t.debug("JSONP: Script error"),y||f||(a(),r(new o.JSONPScriptError))}if("GET"!==t.method)return void r(new Error("Method "+t.method+" "+e+" is not supported by JSONP."));t.debug("JSONP: start");var l=!1,f=!1;i+=1;var d=document.getElementsByTagName("head")[0],p=document.createElement("script"),h="algoliaJSONP_"+i,y=!1;window[h]=function(e){try{delete window[h]}catch(t){window[h]=void 0}f||(l=!0,a(),r(null,{body:e}))},e+="&callback="+h,t.jsonBody&&t.jsonBody.params&&(e+="&"+t.jsonBody.params);var m=setTimeout(u,t.timeout);p.onreadystatechange=s,p.onload=n,p.onerror=c,p.async=!0,p.defer=!0,p.src=e,d.appendChild(p)}t.exports=n;var o=e(67),i=0},{67:67}],67:[function(e,t,r){"use strict";function n(t,r){var n=e(11),o=this;"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):o.stack=(new Error).stack||"Cannot get a stacktrace, browser is too old",this.name=this.constructor.name,this.message=t||"Unknown error",r&&n(r,function(e,t){o[t]=e})}function o(e,t){function r(){var r=Array.prototype.slice.call(arguments,0);"string"!=typeof r[0]&&r.unshift(t),n.apply(this,r),this.name="AlgoliaSearch"+e+"Error"}return i(r,n),r}var i=e(10);i(n,Error),t.exports={AlgoliaSearchError:n,UnparsableJSON:o("UnparsableJSON","Could not parse the incoming response as JSON, see err.more for details"),RequestTimeout:o("RequestTimeout","Request timedout before getting a response"),Network:o("Network","Network issue, see err.more for details"),JSONPScriptFail:o("JSONPScriptFail","<script> was loaded but did not call our provided callback"),JSONPScriptError:o("JSONPScriptError","<script> unable to load due to an `error` event on it"),Unknown:o("Unknown","Unknown error occured")}},{10:10,11:11}],68:[function(e,t,r){t.exports="3.7.5"},{}]},{},[62]); | ||
for(var w in e)g&&"prototype"==w||v&&("message"==w||"name"==w)||y&&u(w,t)||"constructor"==w&&(p||!S.call(e,w))||h.push(w);if(d.nonEnumShadows&&e!==T){var P=e===A?x:e===j?m:O.call(e),I=k[P]||k[b];for(P==b&&(o=T),t=_.length;t--;){w=_[t];var R=I[w];p&&R||(R?!S.call(e,w):e[w]===o[w])||h.push(w)}}return h}var o=e(14),i=e(46),s=e(47),a=e(48),u=e(38),c=e(40),l=e(50),f=e(52),d=e(58),p="[object Array]",h="[object Boolean]",y="[object Date]",m="[object Error]",v="[object Function]",g="[object Number]",b="[object Object]",w="[object RegExp]",x="[object String]",_=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],j=Error.prototype,T=Object.prototype,A=String.prototype,S=T.hasOwnProperty,O=T.toString,k={};k[p]=k[y]=k[g]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},k[h]=k[x]={constructor:!0,toString:!0,valueOf:!0},k[m]=k[v]=k[w]={constructor:!0,toString:!0},k[b]={constructor:!0},o(_,function(e){for(var t in k)if(S.call(k,t)){var r=k[t];r[e]=S.call(r,e)}}),t.exports=n},{14:14,38:38,40:40,46:46,47:47,48:48,50:50,52:52,58:58}],57:[function(e,t,r){var n=e(22),o=e(27),i=o(n);t.exports=i},{22:22,27:27}],58:[function(e,t,r){var n=Array.prototype,o=Error.prototype,i=Object.prototype,s=i.propertyIsEnumerable,a=n.splice,u={};!function(e){var t=function(){this.x=e},r={0:e,length:e},n=[];t.prototype={valueOf:e,y:e};for(var i in new t)n.push(i);u.enumErrorProps=s.call(o,"message")||s.call(o,"name"),u.enumPrototypes=s.call(t,"prototype"),u.nonEnumShadows=!/valueOf/.test(n),u.ownLast="x"!=n[0],u.spliceObjects=(a.call(r,0,1),!r[0]),u.unindexedChars="x"[0]+Object("x")[0]!="xx"}(1,0),t.exports=u},{}],59:[function(e,t,r){function n(e){return e}t.exports=n},{}],60:[function(e,t,r){(function(r){"use strict";function n(t,r,n){var s=e(6)("algoliasearch"),a=e(44),u=e(47),c="Usage: algoliasearch(applicationID, apiKey, opts)";if(!t)throw new f.AlgoliaSearchError("Please provide an application ID. "+c);if(!r)throw new f.AlgoliaSearchError("Please provide an API key. "+c);this.applicationID=t,this.apiKey=r;var l=[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},n=n||{};var d=n.protocol||"https:",p=void 0===n.timeout?2e3:n.timeout;if(/:$/.test(d)||(d+=":"),"http:"!==n.protocol&&"https:"!==n.protocol)throw new f.AlgoliaSearchError("protocol must be `http:` or `https:` (was `"+n.protocol+"`)");n.hosts?u(n.hosts)?(this.hosts.read=a(n.hosts),this.hosts.write=a(n.hosts)):(this.hosts.read=a(n.hosts.read),this.hosts.write=a(n.hosts.write)):(this.hosts.read=[this.applicationID+"-dsn.algolia.net"].concat(l),this.hosts.write=[this.applicationID+".algolia.net"].concat(l)),this.hosts.read=o(this.hosts.read,i(d)),this.hosts.write=o(this.hosts.write,i(d)),this.requestTimeout=p,this.extraHeaders=[],this.cache={},this._ua=n._ua,this._useCache=void 0===n._useCache?!0:n._useCache,this._setTimeout=n._setTimeout,s("init done, %j",this)}function o(e,t){for(var r=[],n=0;n<e.length;++n)r.push(t(e[n],n));return r}function i(e){return function(t){return e+"//"+t.toLowerCase()}}function s(){var e="Not implemented in this environment.\nIf you feel this is a mistake, write to support@algolia.com";throw new f.AlgoliaSearchError(e)}function a(e,t){var r=e.toLowerCase().replace(".","").replace("()","");return"algoliasearch: `"+e+"` was replaced by `"+t+"`. Please see https://github.com/algolia/algoliasearch-client-js/wiki/Deprecated#"+r}function u(e,t){t(e,0)}function c(e,t){function r(){return n||(console.log(t),n=!0),e.apply(this,arguments)}var n=!1;return r}function l(e){if(void 0===Array.prototype.toJSON)return JSON.stringify(e);var t=Array.prototype.toJSON;delete Array.prototype.toJSON;var r=JSON.stringify(e);return Array.prototype.toJSON=t,r}t.exports=n;var f=e(67);n.prototype={deleteIndex:function(e,t){return this._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(e),hostType:"write",callback:t})},moveIndex:function(e,t,r){var n={operation:"move",destination:t};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(e)+"/operation",body:n,hostType:"write",callback:r})},copyIndex:function(e,t,r){var n={operation:"copy",destination:t};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(e)+"/operation",body:n,hostType:"write",callback:r})},getLogs:function(e,t,r){return 0===arguments.length||"function"==typeof e?(r=e,e=0,t=10):(1===arguments.length||"function"==typeof t)&&(r=t,t=10),this._jsonRequest({method:"GET",url:"/1/logs?offset="+e+"&length="+t,hostType:"read",callback:r})},listIndexes:function(e,t){var r="";return void 0===e||"function"==typeof e?t=e:r="?page="+e,this._jsonRequest({method:"GET",url:"/1/indexes"+r,hostType:"read",callback:t})},initIndex:function(e){return new this.Index(this,e)},listUserKeys:function(e){return this._jsonRequest({method:"GET",url:"/1/keys",hostType:"read",callback:e})},getUserKeyACL:function(e,t){return this._jsonRequest({method:"GET",url:"/1/keys/"+e,hostType:"read",callback:t})},deleteUserKey:function(e,t){return this._jsonRequest({method:"DELETE",url:"/1/keys/"+e,hostType:"write",callback:t})},addUserKey:function(e,t,r){(1===arguments.length||"function"==typeof t)&&(r=t,t=null);var n={acl:e};return t&&(n.validity=t.validity,n.maxQueriesPerIPPerHour=t.maxQueriesPerIPPerHour,n.maxHitsPerQuery=t.maxHitsPerQuery,n.indexes=t.indexes,n.description=t.description,t.queryParameters&&(n.queryParameters=this._getSearchParams(t.queryParameters,"")),n.referers=t.referers),this._jsonRequest({method:"POST",url:"/1/keys",body:n,hostType:"write",callback:r})},addUserKeyWithValidity:c(function(e,t,r){return this.addUserKey(e,t,r)},a("client.addUserKeyWithValidity()","client.addUserKey()")),updateUserKey:function(e,t,r,n){(2===arguments.length||"function"==typeof r)&&(n=r,r=null);var o={acl:t};return r&&(o.validity=r.validity,o.maxQueriesPerIPPerHour=r.maxQueriesPerIPPerHour,o.maxHitsPerQuery=r.maxHitsPerQuery,o.indexes=r.indexes,o.description=r.description,r.queryParameters&&(o.queryParameters=this._getSearchParams(r.queryParameters,"")),o.referers=r.referers),this._jsonRequest({method:"PUT",url:"/1/keys/"+e,body:o,hostType:"write",callback:n})},setSecurityTags:function(e){if("[object Array]"===Object.prototype.toString.call(e)){for(var t=[],r=0;r<e.length;++r)if("[object Array]"===Object.prototype.toString.call(e[r])){for(var n=[],o=0;o<e[r].length;++o)n.push(e[r][o]);t.push("("+n.join(",")+")")}else t.push(e[r]);e=t.join(",")}this.securityTags=e},setUserToken:function(e){this.userToken=e},startQueriesBatch:c(function(){this._batch=[]},a("client.startQueriesBatch()","client.search()")),addQueryInBatch:c(function(e,t,r){this._batch.push({indexName:e,query:t,params:r})},a("client.addQueryInBatch()","client.search()")),clearCache:function(){this.cache={}},sendQueriesBatch:c(function(e){return this.search(this._batch,e)},a("client.sendQueriesBatch()","client.search()")),setRequestTimeout:function(e){e&&(this.requestTimeout=parseInt(e,10))},search:function(e,t){var r=this,n={requests:o(e,function(e){var t="";return void 0!==e.query&&(t+="query="+encodeURIComponent(e.query)),{indexName:e.indexName,params:r._getSearchParams(e.params,t)}})};return this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",body:n,hostType:"read",callback:t})},batch:function(e,t){return this._jsonRequest({method:"POST",url:"/1/indexes/*/batch",body:{requests:e},hostType:"write",callback:t})},destroy:s,enableRateLimitForward:s,disableRateLimitForward:s,useSecuredAPIKey:s,disableSecuredAPIKey:s,generateSecuredApiKey:s,Index:function(e,t){this.indexName=t,this.as=e,this.typeAheadArgs=null,this.typeAheadValueOption=null,this.cache={}},setExtraHeader:function(e,t){this.extraHeaders.push({name:e.toLowerCase(),value:t})},_sendQueriesBatch:function(e,t){function r(){for(var t="",r=0;r<e.requests.length;++r){var n="/1/indexes/"+encodeURIComponent(e.requests[r].indexName)+"?"+e.requests[r].params;t+=r+"="+encodeURIComponent(n)+"&"}return t}return this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",body:e,hostType:"read",fallback:{method:"GET",url:"/1/indexes/*",body:{params:r()}},callback:t})},_jsonRequest:function(t){function n(e,u){function p(e){var t=e&&e.body&&e.body.message&&e.body.status||e.statusCode||e&&e.body&&200;i("received response: statusCode: %s, computed statusCode: %d, headers: %j",e.statusCode,t,e.headers),r.env.DEBUG&&-1!==r.env.DEBUG.indexOf("debugBody")&&i("body: %j",e.body);var n=200===t||201===t,o=!n&&4!==Math.floor(t/100)&&1!==Math.floor(t/100);if(a._useCache&&n&&s&&(s[m]=e.body),n)return e.body;if(o)return c+=1,y();var u=new f.AlgoliaSearchError(e.body&&e.body.message);return a._promise.reject(u)}function h(r){return i("error: %s, stack: %s",r.message,r.stack),r instanceof f.AlgoliaSearchError||(r=new f.Unknown(r&&r.message,r)),c+=1,r instanceof f.Unknown||r instanceof f.UnparsableJSON||!e.fallback&&r instanceof f.Network||c>=a.hosts[t.hostType].length&&(d||!t.fallback||!a._request.fallback)?a._promise.reject(r):(a.hostIndex[t.hostType]=++a.hostIndex[t.hostType]%a.hosts[t.hostType].length,r instanceof f.RequestTimeout?y():(a._request.fallback&&!a.useFallback&&(a.useFallback=!0),n(e,u)))}function y(){return a.hostIndex[t.hostType]=++a.hostIndex[t.hostType]%a.hosts[t.hostType].length,u.timeout=a.requestTimeout*(c+1),n(e,u)}var m;if(a._useCache&&(m=t.url),a._useCache&&o&&(m+="_body_"+u.body),a._useCache&&s&&void 0!==s[m])return i("serving response from cache"),a._promise.resolve(JSON.parse(l(s[m])));if(c>=a.hosts[t.hostType].length||a.useFallback&&!d)return t.fallback&&a._request.fallback&&!d?(i("switching to fallback"),c=0,u.method=t.fallback.method,u.url=t.fallback.url,u.jsonBody=t.fallback.body,u.jsonBody&&(u.body=l(u.jsonBody)),u.timeout=a.requestTimeout*(c+1),a.hostIndex[t.hostType]=0,d=!0,n(a._request.fallback,u)):(i("could not get any response"),a._promise.reject(new f.AlgoliaSearchError("Cannot connect to the AlgoliaSearch API. Send an email to support@algolia.com to report and resolve the issue. Application id was: "+a.applicationID)));var v=a.hosts[t.hostType][a.hostIndex[t.hostType]]+u.url,g={body:o,jsonBody:t.body,method:u.method,headers:a._computeRequestHeaders(),timeout:u.timeout,debug:i};return i("method: %s, url: %s, headers: %j, timeout: %d",g.method,v,g.headers,g.timeout),e===a._request.fallback&&i("using fallback"),e.call(a,v,g).then(p,h)}var o,i=e(6)("algoliasearch:"+t.url),s=t.cache,a=this,c=0,d=!1;void 0!==t.body&&(o=l(t.body)),i("request start");var p=a.useFallback&&t.fallback,h=p?t.fallback:t,y=n(p?a._request.fallback:a._request,{url:h.url,method:h.method,body:o,jsonBody:t.body,timeout:a.requestTimeout*(c+1)});return t.callback?void y.then(function(e){u(function(){t.callback(null,e)},a._setTimeout||setTimeout)},function(e){u(function(){t.callback(e)},a._setTimeout||setTimeout)}):y},_getSearchParams:function(e,t){if(this._isUndefined(e)||null===e)return t;for(var r in e)null!==r&&void 0!==e[r]&&e.hasOwnProperty(r)&&(t+=""===t?"":"&",t+=r+"="+encodeURIComponent("[object Array]"===Object.prototype.toString.call(e[r])?l(e[r]):e[r]));return t},_isUndefined:function(e){return void 0===e},_computeRequestHeaders:function(){var t=e(11),r={"x-algolia-api-key":this.apiKey,"x-algolia-application-id":this.applicationID,"x-algolia-agent":this._ua};return this.userToken&&(r["x-algolia-usertoken"]=this.userToken),this.securityTags&&(r["x-algolia-tagfilters"]=this.securityTags),this.extraHeaders&&t(this.extraHeaders,function(e){r[e.name]=e.value}),r}},n.prototype.Index.prototype={clearCache:function(){this.cache={}},addObject:function(e,t,r){var n=this;return(1===arguments.length||"function"==typeof t)&&(r=t,t=void 0),this.as._jsonRequest({method:void 0!==t?"PUT":"POST",url:"/1/indexes/"+encodeURIComponent(n.indexName)+(void 0!==t?"/"+encodeURIComponent(t):""),body:e,hostType:"write",callback:r})},addObjects:function(e,t){for(var r=this,n={requests:[]},o=0;o<e.length;++o){var i={action:"addObject",body:e[o]};n.requests.push(i)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/batch",body:n,hostType:"write",callback:t})},getObject:function(e,t,r){var n=this;(1===arguments.length||"function"==typeof t)&&(r=t,t=void 0);var o="";if(void 0!==t){o="?attributes=";for(var i=0;i<t.length;++i)0!==i&&(o+=","),o+=t[i]}return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/"+encodeURIComponent(e)+o,hostType:"read",callback:r})},getObjects:function(e,t,r){var n=this;(1===arguments.length||"function"==typeof t)&&(r=t,t=void 0);var i={requests:o(e,function(e){var r={indexName:n.indexName,objectID:e};return t&&(r.attributesToRetrieve=t.join(",")),r})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/*/objects",hostType:"read",body:i,callback:r})},partialUpdateObject:function(e,t){var r=this;return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/"+encodeURIComponent(e.objectID)+"/partial",body:e,hostType:"write",callback:t})},partialUpdateObjects:function(e,t){for(var r=this,n={requests:[]},o=0;o<e.length;++o){var i={action:"partialUpdateObject",objectID:e[o].objectID,body:e[o]};n.requests.push(i)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/batch",body:n,hostType:"write",callback:t})},saveObject:function(e,t){var r=this;return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/"+encodeURIComponent(e.objectID),body:e,hostType:"write",callback:t})},saveObjects:function(e,t){for(var r=this,n={requests:[]},o=0;o<e.length;++o){var i={action:"updateObject",objectID:e[o].objectID,body:e[o]};n.requests.push(i)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/batch",body:n,hostType:"write",callback:t})},deleteObject:function(e,t){if("function"==typeof e||"string"!=typeof e&&"number"!=typeof e){var r=new f.AlgoliaSearchError("Cannot delete an object without an objectID");return t=e,"function"==typeof t?t(r):this.as._promise.reject(r)}var n=this;return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/"+encodeURIComponent(e),hostType:"write",callback:t})},deleteObjects:function(e,t){var r=this,n={requests:o(e,function(e){return{action:"deleteObject",objectID:e,body:{objectID:e}}})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/batch",body:n,hostType:"write",callback:t})},deleteByQuery:function(e,t,r){function n(e){if(0===e.nbHits)return e;var t=o(e.hits,function(e){return e.objectID});return l.deleteObjects(t).then(i).then(s)}function i(e){return l.waitTask(e.taskID)}function s(){return l.deleteByQuery(e,t)}function a(){u(function(){r(null)},f._setTimeout||setTimeout)}function c(e){u(function(){r(e)},f._setTimeout||setTimeout)}var l=this,f=l.as;(1===arguments.length||"function"==typeof t)&&(r=t,t={}),t.attributesToRetrieve="objectID",t.hitsPerPage=1e3,this.clearCache();var d=this.search(e,t).then(n);return r?void d.then(a,c):d},search:function(e,t,r){if("function"==typeof e&&"object"==typeof t||"object"==typeof r)throw new f.AlgoliaSearchError("index.search usage is index.search(query, params, cb)");0===arguments.length||"function"==typeof e?(r=e,e=""):(1===arguments.length||"function"==typeof t)&&(r=t,t=void 0),"object"==typeof e&&null!==e?(t=e,e=void 0):(void 0===e||null===e)&&(e="");var n="";return void 0!==e&&(n+="query="+encodeURIComponent(e)),void 0!==t&&(n=this.as._getSearchParams(t,n)),this._search(n,r)},browse:function(t,r,n){var o,i,s=e(57),a=this;0===arguments.length||1===arguments.length&&"function"==typeof arguments[0]?(o=0,n=arguments[0],t=void 0):"number"==typeof arguments[0]?(o=arguments[0],"number"==typeof arguments[1]?i=arguments[1]:"function"==typeof arguments[1]&&(n=arguments[1],i=void 0),t=void 0,r=void 0):"object"==typeof arguments[0]?("function"==typeof arguments[1]&&(n=arguments[1]),r=arguments[0],t=void 0):"string"==typeof arguments[0]&&"function"==typeof arguments[1]&&(n=arguments[1],r=void 0),r=s({},r||{},{page:o,hitsPerPage:i,query:t});var u=this.as._getSearchParams(r,"");return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(a.indexName)+"/browse?"+u,hostType:"read",callback:n})},browseFrom:function(e,t){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse?cursor="+encodeURIComponent(e),hostType:"read",callback:t})},browseAll:function(t,r){function n(e){if(!a._stopped){var t;t=void 0!==e?"cursor="+encodeURIComponent(e):l,u._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(c.indexName)+"/browse?"+t,hostType:"read",callback:o})}}function o(e,t){return a._stopped?void 0:e?void a._error(e):(a._result(t),void 0===t.cursor?void a._end():void n(t.cursor))}"object"==typeof t&&(r=t,t=void 0);var i=e(57),s=e(61),a=new s,u=this.as,c=this,l=u._getSearchParams(i({},r||{},{query:t}),"");return n(),a},ttAdapter:function(e){var t=this;return function(r,n,o){var i;i="function"==typeof o?o:n,t.search(r,e,function(e,t){return e?void i(e):void i(t.hits)})}},waitTask:function(e,t){function r(){return l._jsonRequest({method:"GET",hostType:"read",url:"/1/indexes/"+encodeURIComponent(c.indexName)+"/task/"+e}).then(function(e){a++;var t=i*a*a;return t>s&&(t=s),"published"!==e.status?l._promise.delay(t).then(r):e})}function n(e){u(function(){t(null,e)},l._setTimeout||setTimeout)}function o(e){u(function(){t(e)},l._setTimeout||setTimeout)}var i=100,s=5e3,a=0,c=this,l=c.as,f=r();return t?void f.then(n,o):f},clearIndex:function(e){var t=this;return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/clear",hostType:"write",callback:e})},getSettings:function(e){var t=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/settings",hostType:"read",callback:e})},setSettings:function(e,t){var r=this;return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/settings",hostType:"write",body:e,callback:t})},listUserKeys:function(e){var t=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/keys",hostType:"read",callback:e})},getUserKeyACL:function(e,t){var r=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/keys/"+e,hostType:"read",callback:t})},deleteUserKey:function(e,t){var r=this;return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/keys/"+e,hostType:"write",callback:t})},addUserKey:function(e,t,r){(1===arguments.length||"function"==typeof t)&&(r=t,t=null);var n={acl:e};return t&&(n.validity=t.validity,n.maxQueriesPerIPPerHour=t.maxQueriesPerIPPerHour,n.maxHitsPerQuery=t.maxHitsPerQuery,n.description=t.description,t.queryParameters&&(n.queryParameters=this.as._getSearchParams(t.queryParameters,"")),n.referers=t.referers),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",body:n,hostType:"write",callback:r})},addUserKeyWithValidity:c(function(e,t,r){return this.addUserKey(e,t,r)},a("index.addUserKeyWithValidity()","index.addUserKey()")),updateUserKey:function(e,t,r,n){(2===arguments.length||"function"==typeof r)&&(n=r,r=null);var o={acl:t};return r&&(o.validity=r.validity,o.maxQueriesPerIPPerHour=r.maxQueriesPerIPPerHour,o.maxHitsPerQuery=r.maxHitsPerQuery,o.description=r.description,r.queryParameters&&(o.queryParameters=this.as._getSearchParams(r.queryParameters,"")),o.referers=r.referers),this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+e,body:o,hostType:"write",callback:n})},_search:function(e,t){return this.as._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/query",body:{params:e},hostType:"read",fallback:{method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName),body:{params:e}},callback:t})},as:null,indexName:null,typeAheadArgs:null,typeAheadValueOption:null}}).call(this,e(2))},{11:11,2:2,44:44,47:47,57:57,6:6,61:61,67:67}],61:[function(e,t,r){"use strict";function n(){}t.exports=n;var o=e(10),i=e(1).EventEmitter;o(n,i),n.prototype.stop=function(){this._stopped=!0,this._clean()},n.prototype._end=function(){this.emit("end"),this._clean()},n.prototype._error=function(e){this.emit("error",e),this._clean()},n.prototype._result=function(e){this.emit("result",e)},n.prototype._clean=function(){this.removeAllListeners("stop"),this.removeAllListeners("end"),this.removeAllListeners("error"),this.removeAllListeners("result")}},{1:1,10:10}],62:[function(e,t,r){"use strict";function n(t,r,i){var s=e(45),a=e(64);return i=s(i||{}),void 0===i.protocol&&(i.protocol=a()),i._ua=i._ua||n.ua,new o(t,r,i)}function o(){s.apply(this,arguments)}var i=e(10),s=e(60),a=e(67),u=e(65),c=e(66);window.algoliasearch=e(63),n.version=e(68),n.ua="Algolia for jQuery "+n.version,window.__algolia={debug:e(6),algoliasearch:n};var l=window.jQuery;l.algolia={Client:n,ua:n.ua,version:n.version},i(o,s),o.prototype._request=function(e,t){return new l.Deferred(function(r){var n=t.body;e=u(e,t.headers);var o={accept:"application/json"};n&&("POST"===t.method?o["content-type"]="application/x-www-form-urlencoded":o["content-type"]="application/json"),l.ajax(e,{type:t.method,timeout:t.timeout,dataType:"json",data:n,headers:o,complete:function(e,t){return"timeout"===t?void r.reject(new a.RequestTimeout):0===e.status?void r.reject(new a.Network({more:e})):void r.resolve({statusCode:e.status,body:e.responseJSON,headers:e.getAllResponseHeaders()})}})}).promise()},o.prototype._request.fallback=function(e,t){return e=u(e,t.headers),new l.Deferred(function(r){c(e,t,function(e,t){return e?void r.reject(e):void r.resolve(t)})}).promise()},o.prototype._promise={reject:function(e){return new l.Deferred(function(t){t.reject(e)}).promise()},resolve:function(e){return new l.Deferred(function(t){t.resolve(e)}).promise()},delay:function(e){return new l.Deferred(function(t){setTimeout(function(){t.resolve()},e)}).promise()}}},{10:10,45:45,6:6,60:60,63:63,64:64,65:65,66:66,67:67,68:68}],63:[function(e,t,r){"use strict";function n(t,r,i){var s=e(45),a=e(64);return i=s(i||{}),void 0===i.protocol&&(i.protocol=a()),i._ua=i._ua||n.ua,new o(t,r,i)}function o(){a.apply(this,arguments)}t.exports=n;var i=e(10),s=window.Promise||e(9).Promise,a=e(60),u=e(67),c=e(65),l=e(66);n.version=e(68),n.ua="Algolia for vanilla JavaScript "+n.version,window.__algolia={debug:e(6),algoliasearch:n};var f={hasXMLHttpRequest:"XMLHttpRequest"in window,hasXDomainRequest:"XDomainRequest"in window,cors:"withCredentials"in new XMLHttpRequest,timeout:"timeout"in new XMLHttpRequest};i(o,a),o.prototype._request=function(e,t){return new s(function(r,n){function o(){if(!l){f.timeout||clearTimeout(a);var e;try{e={body:JSON.parse(p.responseText),statusCode:p.status,headers:p.getAllResponseHeaders&&p.getAllResponseHeaders()||{}}}catch(t){e=new u.UnparsableJSON({more:p.responseText})}e instanceof u.UnparsableJSON?n(e):r(e)}}function i(e){l||(f.timeout||clearTimeout(a),n(new u.Network({more:e})))}function s(){f.timeout||(l=!0,p.abort()),n(new u.RequestTimeout)}if(!f.cors&&!f.hasXDomainRequest)return void n(new u.Network("CORS not supported"));e=c(e,t.headers);var a,l,d=t.body,p=f.cors?new XMLHttpRequest:new XDomainRequest;p instanceof XMLHttpRequest?p.open(t.method,e,!0):p.open(t.method,e),f.cors&&(d&&("POST"===t.method?p.setRequestHeader("content-type","application/x-www-form-urlencoded"):p.setRequestHeader("content-type","application/json")),p.setRequestHeader("accept","application/json")),p.onprogress=function(){},p.onload=o,p.onerror=i,f.timeout?(p.timeout=t.timeout,p.ontimeout=s):a=setTimeout(s,t.timeout),p.send(d)})},o.prototype._request.fallback=function(e,t){return e=c(e,t.headers),new s(function(r,n){l(e,t,function(e,t){return e?void n(e):void r(t)})})},o.prototype._promise={reject:function(e){return s.reject(e)},resolve:function(e){return s.resolve(e)},delay:function(e){return new s(function(t){setTimeout(t,e)})}}},{10:10,45:45,6:6,60:60,64:64,65:65,66:66,67:67,68:68,9:9}],64:[function(e,t,r){"use strict";function n(){var e=window.document.location.protocol;return"http:"!==e&&"https:"!==e&&(e="http:"),e}t.exports=n},{}],65:[function(e,t,r){"use strict";function n(e,t){return e+=/\?/.test(e)?"&":"?",e+o.encode(t)}t.exports=n;var o=e(5)},{5:5}],66:[function(e,t,r){"use strict";function n(e,t,r){function n(){t.debug("JSONP: success"),y||f||(y=!0,l||(t.debug("JSONP: Fail. Script loaded but did not call the callback"),a(),r(new o.JSONPScriptFail)))}function s(){("loaded"===this.readyState||"complete"===this.readyState)&&n()}function a(){clearTimeout(m),p.onload=null,p.onreadystatechange=null,p.onerror=null,d.removeChild(p);try{delete window[h],delete window[h+"_loaded"]}catch(e){window[h]=null,window[h+"_loaded"]=null}}function u(){t.debug("JSONP: Script timeout"),f=!0,a(),r(new o.RequestTimeout)}function c(){t.debug("JSONP: Script error"),y||f||(a(),r(new o.JSONPScriptError))}if("GET"!==t.method)return void r(new Error("Method "+t.method+" "+e+" is not supported by JSONP."));t.debug("JSONP: start");var l=!1,f=!1;i+=1;var d=document.getElementsByTagName("head")[0],p=document.createElement("script"),h="algoliaJSONP_"+i,y=!1;window[h]=function(e){try{delete window[h]}catch(t){window[h]=void 0}f||(l=!0,a(),r(null,{body:e}))},e+="&callback="+h,t.jsonBody&&t.jsonBody.params&&(e+="&"+t.jsonBody.params);var m=setTimeout(u,t.timeout);p.onreadystatechange=s,p.onload=n,p.onerror=c,p.async=!0,p.defer=!0,p.src=e,d.appendChild(p)}t.exports=n;var o=e(67),i=0},{67:67}],67:[function(e,t,r){"use strict";function n(t,r){var n=e(11),o=this;"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):o.stack=(new Error).stack||"Cannot get a stacktrace, browser is too old",this.name=this.constructor.name,this.message=t||"Unknown error",r&&n(r,function(e,t){o[t]=e})}function o(e,t){function r(){var r=Array.prototype.slice.call(arguments,0);"string"!=typeof r[0]&&r.unshift(t),n.apply(this,r),this.name="AlgoliaSearch"+e+"Error"}return i(r,n),r}var i=e(10);i(n,Error),t.exports={AlgoliaSearchError:n,UnparsableJSON:o("UnparsableJSON","Could not parse the incoming response as JSON, see err.more for details"),RequestTimeout:o("RequestTimeout","Request timedout before getting a response"),Network:o("Network","Network issue, see err.more for details"),JSONPScriptFail:o("JSONPScriptFail","<script> was loaded but did not call our provided callback"),JSONPScriptError:o("JSONPScriptError","<script> unable to load due to an `error` event on it"),Unknown:o("Unknown","Unknown error occured")}},{10:10,11:11}],68:[function(e,t,r){t.exports="3.7.6"},{}]},{},[62]); |
@@ -1,3 +0,3 @@ | ||
/*! algoliasearch 3.7.5 | © 2014, 2015 Algolia SAS | github.com/algolia/algoliasearch-client-js */ | ||
!function(e){var t;"undefined"!=typeof window?t=window:"undefined"!=typeof self&&(t=self),t.ALGOLIA_MIGRATION_LAYER=e()}(function(){return function e(t,n,r){function o(s,a){if(!n[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[s]={exports:{}};t[s][0].call(l.exports,function(e){var n=t[s][1][e];return o(n?n:e)},l,l.exports,e,t,n,r)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(e,t,n){function r(e,t){for(var n in t)e.setAttribute(n,t[n])}function o(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function i(e,t){e.onreadystatechange=function(){("complete"==this.readyState||"loaded"==this.readyState)&&(this.onreadystatechange=null,t(null,e))}}t.exports=function(e,t,n){var s=document.head||document.getElementsByTagName("head")[0],a=document.createElement("script");"function"==typeof t&&(n=t,t={}),t=t||{},n=n||function(){},a.type=t.type||"text/javascript",a.charset=t.charset||"utf8",a.async="async"in t?!!t.async:!0,a.src=e,t.attrs&&r(a,t.attrs),t.text&&(a.text=""+t.text);var u="onload"in a?o:i;u(a,n),a.onload||o(a,n),s.appendChild(a)}},{}],2:[function(e,t,n){"use strict";function r(e){for(var t=new RegExp("cdn\\.jsdelivr\\.net/algoliasearch/latest/"+e.replace(".","\\.")+"(?:\\.min)?\\.js$"),n=document.getElementsByTagName("script"),r=!1,o=0,i=n.length;i>o;o++)if(n[o].src&&t.test(n[o].src)){r=!0;break}return r}t.exports=r},{}],3:[function(e,t,n){"use strict";function r(t){var n=e(1),r="//cdn.jsdelivr.net/algoliasearch/2/"+t+".min.js",i="-- 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 --";window.console&&(window.console.warn?window.console.warn(i):window.console.log&&window.console.log(i));try{document.write("<script>window.ALGOLIA_SUPPORTS_DOCWRITE = true</script>"),window.ALGOLIA_SUPPORTS_DOCWRITE===!0?(document.write('<script src="'+r+'"></script>'),o("document.write")()):n(r,o("DOMElement"))}catch(s){n(r,o("DOMElement"))}}function o(e){return function(){var t="AlgoliaSearch: loaded V2 script using "+e;window.console&&window.console.log&&window.console.log(t)}}t.exports=r},{1:1}],4:[function(e,t,n){"use strict";function r(){var e="-- 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 --";window.AlgoliaSearch=function(){throw new Error(e)},window.AlgoliaSearchHelper=function(){throw new Error(e)},window.AlgoliaExplainResults=function(){throw new Error(e)}}t.exports=r},{}],5:[function(e,t,n){"use strict";function r(t){var n=e(2),r=e(3),o=e(4);n(t)?r(t):o()}r("algoliasearch")},{2:2,3:3,4:4}]},{},[5])(5)}),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.algoliasearch=e()}}(function(){var e;return function t(e,n,r){function o(s,a){if(!n[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[s]={exports:{}};e[s][0].call(l.exports,function(t){var n=e[s][1][t];return o(n?n:t)},l,l.exports,t,e,n,r)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function o(e){return"function"==typeof e}function i(e){return"number"==typeof e}function s(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!i(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,i,u,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[e],a(n))return!1;if(o(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,i=new Array(r-1),u=1;r>u;u++)i[u-1]=arguments[u];n.apply(this,i)}else if(s(n)){for(r=arguments.length,i=new Array(r-1),u=1;r>u;u++)i[u-1]=arguments[u];for(c=n.slice(),r=c.length,u=0;r>u;u++)c[u].apply(this,i)}return!0},r.prototype.addListener=function(e,t){var n;if(!o(t))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,o(t.listener)?t.listener:t),this._events[e]?s(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,s(this._events[e])&&!this._events[e].warned){var n;n=a(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,n&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())}return this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}if(!o(t))throw TypeError("listener must be a function");var r=!1;return n.listener=t,this.on(e,n),this},r.prototype.removeListener=function(e,t){var n,r,i,a;if(!o(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],i=n.length,r=-1,n===t||o(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(s(n)){for(a=i;a-->0;)if(n[a]===t||n[a].listener&&n[a].listener===t){r=a;break}if(0>r)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],o(n))this.removeListener(e,n);else for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?o(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.listenerCount=function(e,t){var n;return n=e._events&&e._events[t]?o(e._events[t])?1:e._events[t].length:0}},{}],2:[function(e,t,n){function r(){l=!1,a.length?c=a.concat(c):f=-1,c.length&&o()}function o(){if(!l){var e=setTimeout(r);l=!0;for(var t=c.length;t;){for(a=c,c=[];++f<t;)a[f].run();f=-1,t=c.length}a=null,l=!1,clearTimeout(e)}}function i(e,t){this.fun=e,this.array=t}function s(){}var a,u=t.exports={},c=[],l=!1,f=-1;u.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new i(e,t)),1!==c.length||l||setTimeout(o,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={},u.on=s,u.addListener=s,u.once=s,u.off=s,u.removeListener=s,u.removeAllListeners=s,u.emit=s,u.binding=function(e){throw new Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(e){throw new Error("process.chdir is not supported")},u.umask=function(){return 0}},{}],3:[function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,n,i){t=t||"&",n=n||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(t);var u=1e3;i&&"number"==typeof i.maxKeys&&(u=i.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var l=0;c>l;++l){var f,d,p,h,y=e[l].replace(a,"%20"),m=y.indexOf(n);m>=0?(f=y.substr(0,m),d=y.substr(m+1)):(f=y,d=""),p=decodeURIComponent(f),h=decodeURIComponent(d),r(s,p)?o(s[p])?s[p].push(h):s[p]=[s[p],h]:s[p]=h}return s};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],4:[function(e,t,n){"use strict";function r(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var o=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,n,a){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?r(s(e),function(s){var a=encodeURIComponent(o(s))+n;return i(e[s])?r(e[s],function(e){return a+encodeURIComponent(o(e))}).join(t):a+encodeURIComponent(o(e[s]))}).join(t):a?encodeURIComponent(o(a))+n+encodeURIComponent(o(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},{}],5:[function(e,t,n){"use strict";n.decode=n.parse=e(3),n.encode=n.stringify=e(4)},{3:3,4:4}],6:[function(e,t,n){function r(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function o(){var e=arguments,t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+n.humanize(this.diff),!t)return e;var r="color: "+this.color;e=[e[0],r,"color: inherit"].concat(Array.prototype.slice.call(e,1));var o=0,i=0;return e[0].replace(/%[a-z%]/g,function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))}),e.splice(i,0,r),e}function i(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(e){try{null==e?n.storage.removeItem("debug"):n.storage.debug=e}catch(t){}}function a(){var e;try{e=n.storage.debug}catch(t){}return e}function u(){try{return window.localStorage}catch(e){}}n=t.exports=e(7),n.log=i,n.formatArgs=o,n.save=s,n.load=a,n.useColors=r,n.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:u(),n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],n.formatters.j=function(e){return JSON.stringify(e)},n.enable(a())},{7:7}],7:[function(e,t,n){function r(){return n.colors[l++%n.colors.length]}function o(e){function t(){}function o(){var e=o,t=+new Date,i=t-(c||t);e.diff=i,e.prev=c,e.curr=t,c=t,null==e.useColors&&(e.useColors=n.useColors()),null==e.color&&e.useColors&&(e.color=r());var s=Array.prototype.slice.call(arguments);s[0]=n.coerce(s[0]),"string"!=typeof s[0]&&(s=["%o"].concat(s));var a=0;s[0]=s[0].replace(/%([a-z%])/g,function(t,r){if("%%"===t)return t;a++;var o=n.formatters[r];if("function"==typeof o){var i=s[a];t=o.call(e,i),s.splice(a,1),a--}return t}),"function"==typeof n.formatArgs&&(s=n.formatArgs.apply(e,s));var u=o.log||n.log||console.log.bind(console);u.apply(e,s)}t.enabled=!1,o.enabled=!0;var i=n.enabled(e)?o:t;return i.namespace=e,i}function i(e){n.save(e);for(var t=(e||"").split(/[\s,]+/),r=t.length,o=0;r>o;o++)t[o]&&(e=t[o].replace(/\*/g,".*?"),"-"===e[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")))}function s(){n.enable("")}function a(e){var t,r;for(t=0,r=n.skips.length;r>t;t++)if(n.skips[t].test(e))return!1;for(t=0,r=n.names.length;r>t;t++)if(n.names[t].test(e))return!0;return!1}function u(e){return e instanceof Error?e.stack||e.message:e}n=t.exports=o,n.coerce=u,n.disable=s,n.enable=i,n.enabled=a,n.humanize=e(8),n.names=[],n.skips=[],n.formatters={};var c,l=0},{8:8}],8:[function(e,t,n){function r(e){if(e=""+e,!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),r=(t[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*f;case"days":case"day":case"d":return n*l;case"hours":case"hour":case"hrs":case"hr":case"h":return n*c;case"minutes":case"minute":case"mins":case"min":case"m":return n*u;case"seconds":case"second":case"secs":case"sec":case"s":return n*a;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n}}}}function o(e){return e>=l?Math.round(e/l)+"d":e>=c?Math.round(e/c)+"h":e>=u?Math.round(e/u)+"m":e>=a?Math.round(e/a)+"s":e+"ms"}function i(e){return s(e,l,"day")||s(e,c,"hour")||s(e,u,"minute")||s(e,a,"second")||e+" ms"}function s(e,t,n){return t>e?void 0:1.5*t>e?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}var a=1e3,u=60*a,c=60*u,l=24*c,f=365.25*l;t.exports=function(e,t){return t=t||{},"string"==typeof e?r(e):t["long"]?i(e):o(e)}},{}],9:[function(t,n,r){(function(r,o){(function(){"use strict";function i(e){return"function"==typeof e||"object"==typeof e&&null!==e}function s(e){return"function"==typeof e}function a(e){return"object"==typeof e&&null!==e}function u(e){G=e}function c(e){X=e}function l(){var e=r.nextTick,t=r.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(t)&&"0"===t[1]&&"10"===t[2]&&(e=setImmediate),function(){e(y)}}function f(){return function(){Q(y)}}function d(){var e=0,t=new Z(y),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function p(){var e=new MessageChannel;return e.port1.onmessage=y,function(){e.port2.postMessage(0)}}function h(){return function(){setTimeout(y,1)}}function y(){for(var e=0;W>e;e+=2){var t=ne[e],n=ne[e+1];t(n),ne[e]=void 0,ne[e+1]=void 0}W=0}function m(){try{var e=t,n=e("vertx");return Q=n.runOnLoop||n.runOnContext,f()}catch(r){return h()}}function v(){}function g(){return new TypeError("You cannot resolve a promise with itself")}function b(){return new TypeError("A promises callback cannot return that same promise.")}function w(e){try{return e.then}catch(t){return se.error=t,se}}function x(e,t,n,r){try{e.call(t,n,r)}catch(o){return o}}function _(e,t,n){X(function(e){var r=!1,o=x(n,t,function(n){r||(r=!0,t!==n?A(e,n):O(e,n))},function(t){r||(r=!0,k(e,t))},"Settle: "+(e._label||" unknown promise"));!r&&o&&(r=!0,k(e,o))},e)}function j(e,t){t._state===oe?O(e,t._result):t._state===ie?k(e,t._result):P(t,void 0,function(t){A(e,t)},function(t){k(e,t)})}function T(e,t){if(t.constructor===e.constructor)j(e,t);else{var n=w(t);n===se?k(e,se.error):void 0===n?O(e,t):s(n)?_(e,t,n):O(e,t)}}function A(e,t){e===t?k(e,g()):i(t)?T(e,t):O(e,t)}function S(e){e._onerror&&e._onerror(e._result),I(e)}function O(e,t){e._state===re&&(e._result=t,e._state=oe,0!==e._subscribers.length&&X(I,e))}function k(e,t){e._state===re&&(e._state=ie,e._result=t,X(S,e))}function P(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+oe]=n,o[i+ie]=r,0===i&&e._state&&X(I,e)}function I(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r,o,i=e._result,s=0;s<t.length;s+=3)r=t[s],o=t[s+n],r?q(n,r,o,i):o(i);e._subscribers.length=0}}function R(){this.error=null}function E(e,t){try{return e(t)}catch(n){return ae.error=n,ae}}function q(e,t,n,r){var o,i,a,u,c=s(n);if(c){if(o=E(n,r),o===ae?(u=!0,i=o.error,o=null):a=!0,t===o)return void k(t,b())}else o=r,a=!0;t._state!==re||(c&&a?A(t,o):u?k(t,i):e===oe?O(t,o):e===ie&&k(t,o))}function U(e,t){try{t(function(t){A(e,t)},function(t){k(e,t)})}catch(n){k(e,n)}}function C(e,t){var n=this;n._instanceConstructor=e,n.promise=new e(v),n._validateInput(t)?(n._input=t,n.length=t.length,n._remaining=t.length,n._init(),0===n.length?O(n.promise,n._result):(n.length=n.length||0,n._enumerate(),0===n._remaining&&O(n.promise,n._result))):k(n.promise,n._validationError())}function N(e){return new ue(this,e).promise}function L(e){function t(e){A(o,e)}function n(e){k(o,e)}var r=this,o=new r(v);if(!V(e))return k(o,new TypeError("You must pass an array to race.")),o;for(var i=e.length,s=0;o._state===re&&i>s;s++)P(r.resolve(e[s]),void 0,t,n);return o}function D(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(v);return A(n,e),n}function M(e){var t=this,n=new t(v);return k(n,e),n}function H(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function F(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function B(e){this._id=pe++,this._state=void 0,this._result=void 0,this._subscribers=[],v!==e&&(s(e)||H(),this instanceof B||F(),U(this,e))}function J(){var e;if("undefined"!=typeof o)e=o;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=e.Promise;(!n||"[object Promise]"!==Object.prototype.toString.call(n.resolve())||n.cast)&&(e.Promise=he)}var K;K=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var Q,G,$,V=K,W=0,X=({}.toString,function(e,t){ne[W]=e,ne[W+1]=t,W+=2,2===W&&(G?G(y):$())}),Y="undefined"!=typeof window?window:void 0,z=Y||{},Z=z.MutationObserver||z.WebKitMutationObserver,ee="undefined"!=typeof r&&"[object process]"==={}.toString.call(r),te="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,ne=new Array(1e3);$=ee?l():Z?d():te?p():void 0===Y&&"function"==typeof t?m():h();var re=void 0,oe=1,ie=2,se=new R,ae=new R;C.prototype._validateInput=function(e){return V(e)},C.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},C.prototype._init=function(){this._result=new Array(this.length)};var ue=C;C.prototype._enumerate=function(){for(var e=this,t=e.length,n=e.promise,r=e._input,o=0;n._state===re&&t>o;o++)e._eachEntry(r[o],o)},C.prototype._eachEntry=function(e,t){var n=this,r=n._instanceConstructor;a(e)?e.constructor===r&&e._state!==re?(e._onerror=null,n._settledAt(e._state,t,e._result)):n._willSettleAt(r.resolve(e),t):(n._remaining--,n._result[t]=e)},C.prototype._settledAt=function(e,t,n){var r=this,o=r.promise;o._state===re&&(r._remaining--,e===ie?k(o,n):r._result[t]=n),0===r._remaining&&O(o,r._result)},C.prototype._willSettleAt=function(e,t){var n=this;P(e,void 0,function(e){n._settledAt(oe,t,e)},function(e){n._settledAt(ie,t,e)})};var ce=N,le=L,fe=D,de=M,pe=0,he=B;B.all=ce,B.race=le,B.resolve=fe,B.reject=de,B._setScheduler=u,B._setAsap=c,B._asap=X,B.prototype={constructor:B,then:function(e,t){var n=this,r=n._state;if(r===oe&&!e||r===ie&&!t)return this;var o=new this.constructor(v),i=n._result;if(r){var s=arguments[r-1];X(function(){q(r,o,s,i)})}else P(n,o,e,t);return o},"catch":function(e){return this.then(null,e)}};var ye=J,me={Promise:he,polyfill:ye};"function"==typeof e&&e.amd?e(function(){return me}):"undefined"!=typeof n&&n.exports?n.exports=me:"undefined"!=typeof this&&(this.ES6Promise=me),ye()}).call(this)}).call(this,t(2),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],10:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],11:[function(e,t,n){var r=e(14),o=e(18),i=e(30),s=i(r,o);t.exports=s},{14:14,18:18,30:30}],12:[function(e,t,n){function r(e,t){if("function"!=typeof e)throw new TypeError(o);return t=i(void 0===t?e.length-1:+t||0,0),function(){for(var n=arguments,r=-1,o=i(n.length-t,0),s=Array(o);++r<o;)s[r]=n[t+r];switch(t){case 0:return e.call(this,s);case 1:return e.call(this,n[0],s);case 2:return e.call(this,n[0],n[1],s)}var a=Array(t+1);for(r=-1;++r<t;)a[r]=n[r];return a[t]=s,e.apply(this,a)}}var o="Expected a function",i=Math.max;t.exports=r},{}],13:[function(e,t,n){function r(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}t.exports=r},{}],14:[function(e,t,n){function r(e,t){for(var n=-1,r=e.length;++n<r&&t(e[n],n,e)!==!1;);return e}t.exports=r},{}],15:[function(e,t,n){function r(e,t){return null==t?e:o(t,i(t),e)}var o=e(17),i=e(55);t.exports=r},{17:17,55:55}],16:[function(e,t,n){function r(e,t,n,y,m,v,g){var w;if(n&&(w=m?n(e,y,m):n(e)),void 0!==w)return w;if(!p(e))return e;var x=f(e);if(x){if(w=u(e),!t)return o(e,w)}else{var j=M.call(e),T=j==b;if(j!=_&&j!=h&&(!T||m))return L[j]?c(e,j,t):m?e:{};if(d(e))return m?e:{};if(w=l(T?{}:e),!t)return s(w,e)}v||(v=[]),g||(g=[]);for(var A=v.length;A--;)if(v[A]==e)return g[A];return v.push(e),g.push(w),(x?i:a)(e,function(o,i){w[i]=r(o,t,n,i,e,v,g)}),w}var o=e(13),i=e(14),s=e(15),a=e(21),u=e(33),c=e(34),l=e(35),f=e(47),d=e(37),p=e(50),h="[object Arguments]",y="[object Array]",m="[object Boolean]",v="[object Date]",g="[object Error]",b="[object Function]",w="[object Map]",x="[object Number]",_="[object Object]",j="[object RegExp]",T="[object Set]",A="[object String]",S="[object WeakMap]",O="[object ArrayBuffer]",k="[object Float32Array]",P="[object Float64Array]",I="[object Int8Array]",R="[object Int16Array]",E="[object Int32Array]",q="[object Uint8Array]",U="[object Uint8ClampedArray]",C="[object Uint16Array]",N="[object Uint32Array]",L={};L[h]=L[y]=L[O]=L[m]=L[v]=L[k]=L[P]=L[I]=L[R]=L[E]=L[x]=L[_]=L[j]=L[A]=L[q]=L[U]=L[C]=L[N]=!0,L[g]=L[b]=L[w]=L[T]=L[S]=!1;var D=Object.prototype,M=D.toString;t.exports=r},{13:13,14:14,15:15,21:21,33:33,34:34,35:35,37:37,47:47,50:50}],17:[function(e,t,n){function r(e,t,n){n||(n={});for(var r=-1,o=t.length;++r<o;){var i=t[r];n[i]=e[i]}return n}t.exports=r},{}],18:[function(e,t,n){var r=e(21),o=e(28),i=o(r);t.exports=i},{21:21,28:28}],19:[function(e,t,n){var r=e(29),o=r();t.exports=o},{29:29}],20:[function(e,t,n){function r(e,t){return o(e,t,i)}var o=e(19),i=e(56);t.exports=r},{19:19,56:56}],21:[function(e,t,n){function r(e,t){return o(e,t,i)}var o=e(19),i=e(55);t.exports=r},{19:19,55:55}],22:[function(e,t,n){function r(e,t,n,d,p){if(!u(e))return e;var h=a(t)&&(s(t)||l(t)),y=h?void 0:f(t);return o(y||t,function(o,s){if(y&&(s=o,o=t[s]),c(o))d||(d=[]),p||(p=[]),i(e,t,s,r,n,d,p);else{var a=e[s],u=n?n(a,o,s,e,t):void 0,l=void 0===u;l&&(u=o),void 0===u&&(!h||s in e)||!l&&(u===u?u===a:a!==a)||(e[s]=u)}}),e}var o=e(14),i=e(23),s=e(47),a=e(36),u=e(50),c=e(41),l=e(53),f=e(55);t.exports=r},{14:14,23:23,36:36,41:41,47:47,50:50,53:53,55:55}],23:[function(e,t,n){function r(e,t,n,r,f,d,p){for(var h=d.length,y=t[n];h--;)if(d[h]==y)return void(e[n]=p[h]);var m=e[n],v=f?f(m,y,n,e,t):void 0,g=void 0===v;g&&(v=y,a(y)&&(s(y)||c(y))?v=s(m)?m:a(m)?o(m):[]:u(y)||i(y)?v=i(m)?l(m):u(m)?m:{}:g=!1),d.push(y),p.push(v),g?e[n]=r(v,y,f,d,p):(v===v?v!==m:m===m)&&(e[n]=v)}var o=e(13),i=e(46),s=e(47),a=e(36),u=e(51),c=e(53),l=e(54);t.exports=r},{13:13,36:36,46:46,47:47,51:51,53:53,54:54}],24:[function(e,t,n){function r(e){return function(t){return null==t?void 0:o(t)[e]}}var o=e(43);t.exports=r},{43:43}],25:[function(e,t,n){function r(e,t,n){if("function"!=typeof e)return o;if(void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,o){return e.call(t,n,r,o)};case 4:return function(n,r,o,i){return e.call(t,n,r,o,i)};case 5:return function(n,r,o,i,s){return e.call(t,n,r,o,i,s)}}return function(){return e.apply(t,arguments)}}var o=e(59);t.exports=r},{59:59}],26:[function(e,t,n){(function(e){function n(e){var t=new r(e.byteLength),n=new o(t);return n.set(new o(e)),t}var r=e.ArrayBuffer,o=e.Uint8Array;t.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],27:[function(e,t,n){function r(e){return s(function(t,n){var r=-1,s=null==t?0:n.length,a=s>2?n[s-2]:void 0,u=s>2?n[2]:void 0,c=s>1?n[s-1]:void 0;for("function"==typeof a?(a=o(a,c,5),s-=2):(a="function"==typeof c?c:void 0,s-=a?1:0),u&&i(n[0],n[1],u)&&(a=3>s?void 0:a,s=1);++r<s;){var l=n[r];l&&e(t,l,a)}return t})}var o=e(25),i=e(39),s=e(12);t.exports=r},{12:12,25:25,39:39}],28:[function(e,t,n){function r(e,t){return function(n,r){var a=n?o(n):0;if(!i(a))return e(n,r);for(var u=t?a:-1,c=s(n);(t?u--:++u<a)&&r(c[u],u,c)!==!1;);return n}}var o=e(31),i=e(40),s=e(43);t.exports=r},{31:31,40:40,43:43}],29:[function(e,t,n){function r(e){return function(t,n,r){for(var i=o(t),s=r(t),a=s.length,u=e?a:-1;e?u--:++u<a;){var c=s[u];if(n(i[c],c,i)===!1)break}return t}}var o=e(43);t.exports=r},{43:43}],30:[function(e,t,n){function r(e,t){return function(n,r,s){return"function"==typeof r&&void 0===s&&i(n)?e(n,r):t(n,o(r,s,3))}}var o=e(25),i=e(47);t.exports=r},{25:25,47:47}],31:[function(e,t,n){var r=e(24),o=r("length");t.exports=o},{24:24}],32:[function(e,t,n){function r(e,t){var n=null==e?void 0:e[t];return o(n)?n:void 0}var o=e(49);t.exports=r},{49:49}],33:[function(e,t,n){function r(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&i.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var o=Object.prototype,i=o.hasOwnProperty;t.exports=r},{}],34:[function(e,t,n){(function(n){function r(e,t,n){var r=e.constructor;switch(t){case l:return o(e);case i:case s:return new r(+e);case f:case d:case p:case h:case y:case m:case v:case g:case b:r instanceof r&&(r=_[t]);var x=e.buffer;return new r(n?o(x):x,e.byteOffset,e.length);case a:case c:return new r(e);case u:var j=new r(e.source,w.exec(e));j.lastIndex=e.lastIndex}return j}var o=e(26),i="[object Boolean]",s="[object Date]",a="[object Number]",u="[object RegExp]",c="[object String]",l="[object ArrayBuffer]",f="[object Float32Array]",d="[object Float64Array]",p="[object Int8Array]",h="[object Int16Array]",y="[object Int32Array]",m="[object Uint8Array]",v="[object Uint8ClampedArray]",g="[object Uint16Array]",b="[object Uint32Array]",w=/\w*$/,x=n.Uint8Array,_={};_[f]=n.Float32Array,_[d]=n.Float64Array,_[p]=n.Int8Array,_[h]=n.Int16Array,_[y]=n.Int32Array,_[m]=x,_[v]=n.Uint8ClampedArray,_[g]=n.Uint16Array,_[b]=n.Uint32Array,t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{26:26}],35:[function(e,t,n){function r(e){var t=e.constructor;return"function"==typeof t&&t instanceof t||(t=Object),new t}t.exports=r},{}],36:[function(e,t,n){function r(e){return null!=e&&i(o(e))}var o=e(31),i=e(40);t.exports=r},{31:31,40:40}],37:[function(e,t,n){var r=function(){try{Object({toString:0}+"")}catch(e){return function(){return!1}}return function(e){return"function"!=typeof e.toString&&"string"==typeof(e+"")}}();t.exports=r},{}],38:[function(e,t,n){function r(e,t){return e="number"==typeof e||o.test(e)?+e:-1,t=null==t?i:t,e>-1&&e%1==0&&t>e}var o=/^\d+$/,i=9007199254740991;t.exports=r},{}],39:[function(e,t,n){function r(e,t,n){if(!s(n))return!1;var r=typeof t;if("number"==r?o(n)&&i(t,n.length):"string"==r&&t in n){var a=n[t];return e===e?e===a:a!==a}return!1}var o=e(36),i=e(38),s=e(50);t.exports=r},{36:36,38:38,50:50}],40:[function(e,t,n){function r(e){return"number"==typeof e&&e>-1&&e%1==0&&o>=e}var o=9007199254740991;t.exports=r},{}],41:[function(e,t,n){function r(e){return!!e&&"object"==typeof e}t.exports=r},{}],42:[function(e,t,n){function r(e){for(var t=c(e),n=t.length,r=n&&e.length,l=!!r&&a(r)&&(i(e)||o(e)||u(e)),d=-1,p=[];++d<n;){var h=t[d];(l&&s(h,r)||f.call(e,h))&&p.push(h)}return p}var o=e(46),i=e(47),s=e(38),a=e(40),u=e(52),c=e(56),l=Object.prototype,f=l.hasOwnProperty;t.exports=r},{38:38,40:40,46:46,47:47,52:52,56:56}],43:[function(e,t,n){function r(e){if(s.unindexedChars&&i(e)){for(var t=-1,n=e.length,r=Object(e);++t<n;)r[t]=e.charAt(t);return r}return o(e)?e:Object(e)}var o=e(50),i=e(52),s=e(58);t.exports=r},{50:50,52:52,58:58}],44:[function(e,t,n){function r(e,t,n,r){return t&&"boolean"!=typeof t&&s(e,t,n)?t=!1:"function"==typeof t&&(r=n,n=t,t=!1),"function"==typeof n?o(e,t,i(n,r,1)):o(e,t)}var o=e(16),i=e(25),s=e(39);t.exports=r},{16:16,25:25,39:39}],45:[function(e,t,n){function r(e,t,n){return"function"==typeof t?o(e,!0,i(t,n,1)):o(e,!0)}var o=e(16),i=e(25);t.exports=r},{16:16,25:25}],46:[function(e,t,n){function r(e){return i(e)&&o(e)&&a.call(e,"callee")&&!u.call(e,"callee")}var o=e(36),i=e(41),s=Object.prototype,a=s.hasOwnProperty,u=s.propertyIsEnumerable;t.exports=r},{36:36,41:41}],47:[function(e,t,n){var r=e(32),o=e(40),i=e(41),s="[object Array]",a=Object.prototype,u=a.toString,c=r(Array,"isArray"),l=c||function(e){return i(e)&&o(e.length)&&u.call(e)==s};t.exports=l},{32:32,40:40,41:41}],48:[function(e,t,n){function r(e){return o(e)&&a.call(e)==i}var o=e(50),i="[object Function]",s=Object.prototype,a=s.toString;t.exports=r},{50:50}],49:[function(e,t,n){function r(e){return null==e?!1:o(e)?f.test(c.call(e)):s(e)&&(i(e)?f:a).test(e)}var o=e(48),i=e(37),s=e(41),a=/^\[object .+?Constructor\]$/,u=Object.prototype,c=Function.prototype.toString,l=u.hasOwnProperty,f=RegExp("^"+c.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=r},{37:37,41:41,48:48}],50:[function(e,t,n){function r(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}t.exports=r},{}],51:[function(e,t,n){function r(e){var t;if(!a(e)||d.call(e)!=c||s(e)||i(e)||!f.call(e,"constructor")&&(t=e.constructor,"function"==typeof t&&!(t instanceof t)))return!1;var n;return u.ownLast?(o(e,function(e,t,r){return n=f.call(r,t),!1}),n!==!1):(o(e,function(e,t){n=t}),void 0===n||f.call(e,n))}var o=e(20),i=e(46),s=e(37),a=e(41),u=e(58),c="[object Object]",l=Object.prototype,f=l.hasOwnProperty,d=l.toString;t.exports=r},{20:20,37:37,41:41,46:46,58:58}],52:[function(e,t,n){function r(e){return"string"==typeof e||o(e)&&a.call(e)==i}var o=e(41),i="[object String]",s=Object.prototype,a=s.toString;t.exports=r},{41:41}],53:[function(e,t,n){function r(e){return i(e)&&o(e.length)&&!!P[R.call(e)]}var o=e(40),i=e(41),s="[object Arguments]",a="[object Array]",u="[object Boolean]",c="[object Date]",l="[object Error]",f="[object Function]",d="[object Map]",p="[object Number]",h="[object Object]",y="[object RegExp]",m="[object Set]",v="[object String]",g="[object WeakMap]",b="[object ArrayBuffer]",w="[object Float32Array]",x="[object Float64Array]",_="[object Int8Array]",j="[object Int16Array]",T="[object Int32Array]",A="[object Uint8Array]",S="[object Uint8ClampedArray]",O="[object Uint16Array]",k="[object Uint32Array]",P={};P[w]=P[x]=P[_]=P[j]=P[T]=P[A]=P[S]=P[O]=P[k]=!0,P[s]=P[a]=P[b]=P[u]=P[c]=P[l]=P[f]=P[d]=P[p]=P[h]=P[y]=P[m]=P[v]=P[g]=!1;var I=Object.prototype,R=I.toString;t.exports=r},{40:40,41:41}],54:[function(e,t,n){function r(e){return o(e,i(e))}var o=e(17),i=e(56);t.exports=r},{17:17,56:56}],55:[function(e,t,n){var r=e(32),o=e(36),i=e(50),s=e(42),a=e(58),u=r(Object,"keys"),c=u?function(e){var t=null==e?void 0:e.constructor;return"function"==typeof t&&t.prototype===e||("function"==typeof e?a.enumPrototypes:o(e))?s(e):i(e)?u(e):[]; | ||
}:s;t.exports=c},{32:32,36:36,42:42,50:50,58:58}],56:[function(e,t,n){function r(e){if(null==e)return[];l(e)||(e=Object(e));var t=e.length;t=t&&c(t)&&(s(e)||i(e)||f(e))&&t||0;for(var n=e.constructor,r=-1,o=a(n)&&n.prototype||T,p=o===e,h=Array(t),y=t>0,v=d.enumErrorProps&&(e===j||e instanceof Error),g=d.enumPrototypes&&a(e);++r<t;)h[r]=r+"";for(var w in e)g&&"prototype"==w||v&&("message"==w||"name"==w)||y&&u(w,t)||"constructor"==w&&(p||!S.call(e,w))||h.push(w);if(d.nonEnumShadows&&e!==T){var P=e===A?x:e===j?m:O.call(e),I=k[P]||k[b];for(P==b&&(o=T),t=_.length;t--;){w=_[t];var R=I[w];p&&R||(R?!S.call(e,w):e[w]===o[w])||h.push(w)}}return h}var o=e(14),i=e(46),s=e(47),a=e(48),u=e(38),c=e(40),l=e(50),f=e(52),d=e(58),p="[object Array]",h="[object Boolean]",y="[object Date]",m="[object Error]",v="[object Function]",g="[object Number]",b="[object Object]",w="[object RegExp]",x="[object String]",_=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],j=Error.prototype,T=Object.prototype,A=String.prototype,S=T.hasOwnProperty,O=T.toString,k={};k[p]=k[y]=k[g]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},k[h]=k[x]={constructor:!0,toString:!0,valueOf:!0},k[m]=k[v]=k[w]={constructor:!0,toString:!0},k[b]={constructor:!0},o(_,function(e){for(var t in k)if(S.call(k,t)){var n=k[t];n[e]=S.call(n,e)}}),t.exports=r},{14:14,38:38,40:40,46:46,47:47,48:48,50:50,52:52,58:58}],57:[function(e,t,n){var r=e(22),o=e(27),i=o(r);t.exports=i},{22:22,27:27}],58:[function(e,t,n){var r=Array.prototype,o=Error.prototype,i=Object.prototype,s=i.propertyIsEnumerable,a=r.splice,u={};!function(e){var t=function(){this.x=e},n={0:e,length:e},r=[];t.prototype={valueOf:e,y:e};for(var i in new t)r.push(i);u.enumErrorProps=s.call(o,"message")||s.call(o,"name"),u.enumPrototypes=s.call(t,"prototype"),u.nonEnumShadows=!/valueOf/.test(r),u.ownLast="x"!=r[0],u.spliceObjects=(a.call(n,0,1),!n[0]),u.unindexedChars="x"[0]+Object("x")[0]!="xx"}(1,0),t.exports=u},{}],59:[function(e,t,n){function r(e){return e}t.exports=r},{}],60:[function(e,t,n){(function(n){"use strict";function r(t,n,r){var s=e(6)("algoliasearch"),a=e(44),u=e(47),c="Usage: algoliasearch(applicationID, apiKey, opts)";if(!t)throw new f.AlgoliaSearchError("Please provide an application ID. "+c);if(!n)throw new f.AlgoliaSearchError("Please provide an API key. "+c);this.applicationID=t,this.apiKey=n;var l=[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},r=r||{};var d=r.protocol||"https:",p=void 0===r.timeout?2e3:r.timeout;if(/:$/.test(d)||(d+=":"),"http:"!==r.protocol&&"https:"!==r.protocol)throw new f.AlgoliaSearchError("protocol must be `http:` or `https:` (was `"+r.protocol+"`)");r.hosts?u(r.hosts)?(this.hosts.read=a(r.hosts),this.hosts.write=a(r.hosts)):(this.hosts.read=a(r.hosts.read),this.hosts.write=a(r.hosts.write)):(this.hosts.read=[this.applicationID+"-dsn.algolia.net"].concat(l),this.hosts.write=[this.applicationID+".algolia.net"].concat(l)),this.hosts.read=o(this.hosts.read,i(d)),this.hosts.write=o(this.hosts.write,i(d)),this.requestTimeout=p,this.extraHeaders=[],this.cache={},this._ua=r._ua,this._useCache=void 0===r._useCache?!0:r._useCache,this._setTimeout=r._setTimeout,s("init done, %j",this)}function o(e,t){for(var n=[],r=0;r<e.length;++r)n.push(t(e[r],r));return n}function i(e){return function(t){return e+"//"+t.toLowerCase()}}function s(){var e="Not implemented in this environment.\nIf you feel this is a mistake, write to support@algolia.com";throw new f.AlgoliaSearchError(e)}function a(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 u(e,t){t(e,0)}function c(e,t){function n(){return r||(console.log(t),r=!0),e.apply(this,arguments)}var r=!1;return n}function l(e){if(void 0===Array.prototype.toJSON)return JSON.stringify(e);var t=Array.prototype.toJSON;delete Array.prototype.toJSON;var n=JSON.stringify(e);return Array.prototype.toJSON=t,n}t.exports=r;var f=e(66);r.prototype={deleteIndex:function(e,t){return this._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(e),hostType:"write",callback:t})},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})},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})},getLogs:function(e,t,n){return 0===arguments.length||"function"==typeof e?(n=e,e=0,t=10):(1===arguments.length||"function"==typeof t)&&(n=t,t=10),this._jsonRequest({method:"GET",url:"/1/logs?offset="+e+"&length="+t,hostType:"read",callback:n})},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})},initIndex:function(e){return new this.Index(this,e)},listUserKeys:function(e){return this._jsonRequest({method:"GET",url:"/1/keys",hostType:"read",callback:e})},getUserKeyACL:function(e,t){return this._jsonRequest({method:"GET",url:"/1/keys/"+e,hostType:"read",callback:t})},deleteUserKey:function(e,t){return this._jsonRequest({method:"DELETE",url:"/1/keys/"+e,hostType:"write",callback:t})},addUserKey:function(e,t,n){(1===arguments.length||"function"==typeof t)&&(n=t,t=null);var r={acl:e};return t&&(r.validity=t.validity,r.maxQueriesPerIPPerHour=t.maxQueriesPerIPPerHour,r.maxHitsPerQuery=t.maxHitsPerQuery,r.indexes=t.indexes,r.description=t.description,t.queryParameters&&(r.queryParameters=this._getSearchParams(t.queryParameters,"")),r.referers=t.referers),this._jsonRequest({method:"POST",url:"/1/keys",body:r,hostType:"write",callback:n})},addUserKeyWithValidity:c(function(e,t,n){return this.addUserKey(e,t,n)},a("client.addUserKeyWithValidity()","client.addUserKey()")),updateUserKey:function(e,t,n,r){(2===arguments.length||"function"==typeof n)&&(r=n,n=null);var o={acl:t};return n&&(o.validity=n.validity,o.maxQueriesPerIPPerHour=n.maxQueriesPerIPPerHour,o.maxHitsPerQuery=n.maxHitsPerQuery,o.indexes=n.indexes,o.description=n.description,n.queryParameters&&(o.queryParameters=this._getSearchParams(n.queryParameters,"")),o.referers=n.referers),this._jsonRequest({method:"PUT",url:"/1/keys/"+e,body:o,hostType:"write",callback:r})},setSecurityTags:function(e){if("[object Array]"===Object.prototype.toString.call(e)){for(var t=[],n=0;n<e.length;++n)if("[object Array]"===Object.prototype.toString.call(e[n])){for(var r=[],o=0;o<e[n].length;++o)r.push(e[n][o]);t.push("("+r.join(",")+")")}else t.push(e[n]);e=t.join(",")}this.securityTags=e},setUserToken:function(e){this.userToken=e},startQueriesBatch:c(function(){this._batch=[]},a("client.startQueriesBatch()","client.search()")),addQueryInBatch:c(function(e,t,n){this._batch.push({indexName:e,query:t,params:n})},a("client.addQueryInBatch()","client.search()")),clearCache:function(){this.cache={}},sendQueriesBatch:c(function(e){return this.search(this._batch,e)},a("client.sendQueriesBatch()","client.search()")),setRequestTimeout:function(e){e&&(this.requestTimeout=parseInt(e,10))},search:function(e,t){var n=this,r={requests:o(e,function(e){var t="";return void 0!==e.query&&(t+="query="+encodeURIComponent(e.query)),{indexName:e.indexName,params:n._getSearchParams(e.params,t)}})};return this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",body:r,hostType:"read",callback:t})},batch:function(e,t){return this._jsonRequest({method:"POST",url:"/1/indexes/*/batch",body:{requests:e},hostType:"write",callback:t})},destroy:s,enableRateLimitForward:s,disableRateLimitForward:s,useSecuredAPIKey:s,disableSecuredAPIKey:s,generateSecuredApiKey:s,Index:function(e,t){this.indexName=t,this.as=e,this.typeAheadArgs=null,this.typeAheadValueOption=null,this.cache={}},setExtraHeader:function(e,t){this.extraHeaders.push({name:e.toLowerCase(),value:t})},_sendQueriesBatch:function(e,t){function n(){for(var t="",n=0;n<e.requests.length;++n){var r="/1/indexes/"+encodeURIComponent(e.requests[n].indexName)+"?"+e.requests[n].params;t+=n+"="+encodeURIComponent(r)+"&"}return t}return this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",body:e,hostType:"read",fallback:{method:"GET",url:"/1/indexes/*",body:{params:n()}},callback:t})},_jsonRequest:function(t){function r(e,u){function p(e){var t=e&&e.body&&e.body.message&&e.body.status||e.statusCode||e&&e.body&&200;i("received response: statusCode: %s, computed statusCode: %d, headers: %j",e.statusCode,t,e.headers),n.env.DEBUG&&-1!==n.env.DEBUG.indexOf("debugBody")&&i("body: %j",e.body);var r=200===t||201===t,o=!r&&4!==Math.floor(t/100)&&1!==Math.floor(t/100);if(a._useCache&&r&&s&&(s[m]=e.body),r)return e.body;if(o)return c+=1,y();var u=new f.AlgoliaSearchError(e.body&&e.body.message);return a._promise.reject(u)}function h(n){return i("error: %s, stack: %s",n.message,n.stack),n instanceof f.AlgoliaSearchError||(n=new f.Unknown(n&&n.message,n)),c+=1,n instanceof f.Unknown||n instanceof f.UnparsableJSON||!e.fallback&&n instanceof f.Network||c>=a.hosts[t.hostType].length&&(d||!t.fallback||!a._request.fallback)?a._promise.reject(n):(a.hostIndex[t.hostType]=++a.hostIndex[t.hostType]%a.hosts[t.hostType].length,n instanceof f.RequestTimeout?y():(a._request.fallback&&!a.useFallback&&(a.useFallback=!0),r(e,u)))}function y(){return a.hostIndex[t.hostType]=++a.hostIndex[t.hostType]%a.hosts[t.hostType].length,u.timeout=a.requestTimeout*(c+1),r(e,u)}var m;if(a._useCache&&(m=t.url),a._useCache&&o&&(m+="_body_"+u.body),a._useCache&&s&&void 0!==s[m])return i("serving response from cache"),a._promise.resolve(JSON.parse(l(s[m])));if(c>=a.hosts[t.hostType].length||a.useFallback&&!d)return t.fallback&&a._request.fallback&&!d?(i("switching to fallback"),c=0,u.method=t.fallback.method,u.url=t.fallback.url,u.jsonBody=t.fallback.body,u.jsonBody&&(u.body=l(u.jsonBody)),u.timeout=a.requestTimeout*(c+1),a.hostIndex[t.hostType]=0,d=!0,r(a._request.fallback,u)):(i("could not get any response"),a._promise.reject(new f.AlgoliaSearchError("Cannot connect to the AlgoliaSearch API. Send an email to support@algolia.com to report and resolve the issue. Application id was: "+a.applicationID)));var v=a.hosts[t.hostType][a.hostIndex[t.hostType]]+u.url,g={body:o,jsonBody:t.body,method:u.method,headers:a._computeRequestHeaders(),timeout:u.timeout,debug:i};return i("method: %s, url: %s, headers: %j, timeout: %d",g.method,v,g.headers,g.timeout),e===a._request.fallback&&i("using fallback"),e.call(a,v,g).then(p,h)}var o,i=e(6)("algoliasearch:"+t.url),s=t.cache,a=this,c=0,d=!1;void 0!==t.body&&(o=l(t.body)),i("request start");var p=a.useFallback&&t.fallback,h=p?t.fallback:t,y=r(p?a._request.fallback:a._request,{url:h.url,method:h.method,body:o,jsonBody:t.body,timeout:a.requestTimeout*(c+1)});return t.callback?void y.then(function(e){u(function(){t.callback(null,e)},a._setTimeout||setTimeout)},function(e){u(function(){t.callback(e)},a._setTimeout||setTimeout)}):y},_getSearchParams:function(e,t){if(this._isUndefined(e)||null===e)return t;for(var n in e)null!==n&&void 0!==e[n]&&e.hasOwnProperty(n)&&(t+=""===t?"":"&",t+=n+"="+encodeURIComponent("[object Array]"===Object.prototype.toString.call(e[n])?l(e[n]):e[n]));return t},_isUndefined:function(e){return void 0===e},_computeRequestHeaders:function(){var t=e(11),n={"x-algolia-api-key":this.apiKey,"x-algolia-application-id":this.applicationID,"x-algolia-agent":this._ua};return this.userToken&&(n["x-algolia-usertoken"]=this.userToken),this.securityTags&&(n["x-algolia-tagfilters"]=this.securityTags),this.extraHeaders&&t(this.extraHeaders,function(e){n[e.name]=e.value}),n}},r.prototype.Index.prototype={clearCache:function(){this.cache={}},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})},addObjects:function(e,t){for(var n=this,r={requests:[]},o=0;o<e.length;++o){var i={action:"addObject",body:e[o]};r.requests.push(i)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/batch",body:r,hostType:"write",callback:t})},getObject:function(e,t,n){var r=this;(1===arguments.length||"function"==typeof t)&&(n=t,t=void 0);var o="";if(void 0!==t){o="?attributes=";for(var i=0;i<t.length;++i)0!==i&&(o+=","),o+=t[i]}return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/"+encodeURIComponent(e)+o,hostType:"read",callback:n})},getObjects:function(e,t,n){var r=this;(1===arguments.length||"function"==typeof t)&&(n=t,t=void 0);var i={requests:o(e,function(e){var n={indexName:r.indexName,objectID:e};return t&&(n.attributesToRetrieve=t.join(",")),n})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/*/objects",hostType:"read",body:i,callback:n})},partialUpdateObject:function(e,t){var n=this;return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/"+encodeURIComponent(e.objectID)+"/partial",body:e,hostType:"write",callback:t})},partialUpdateObjects:function(e,t){for(var n=this,r={requests:[]},o=0;o<e.length;++o){var i={action:"partialUpdateObject",objectID:e[o].objectID,body:e[o]};r.requests.push(i)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/batch",body:r,hostType:"write",callback:t})},saveObject:function(e,t){var n=this;return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/"+encodeURIComponent(e.objectID),body:e,hostType:"write",callback:t})},saveObjects:function(e,t){for(var n=this,r={requests:[]},o=0;o<e.length;++o){var i={action:"updateObject",objectID:e[o].objectID,body:e[o]};r.requests.push(i)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/batch",body:r,hostType:"write",callback:t})},deleteObject:function(e,t){if("function"==typeof e||"string"!=typeof e&&"number"!=typeof e){var n=new f.AlgoliaSearchError("Cannot delete an object without an objectID");return t=e,"function"==typeof t?t(n):this.as._promise.reject(n)}var r=this;return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/"+encodeURIComponent(e),hostType:"write",callback:t})},deleteObjects:function(e,t){var n=this,r={requests:o(e,function(e){return{action:"deleteObject",objectID:e,body:{objectID:e}}})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/batch",body:r,hostType:"write",callback:t})},deleteByQuery:function(e,t,n){function r(e){if(0===e.nbHits)return e;var t=o(e.hits,function(e){return e.objectID});return l.deleteObjects(t).then(i).then(s)}function i(e){return l.waitTask(e.taskID)}function s(){return l.deleteByQuery(e,t)}function a(){u(function(){n(null)},f._setTimeout||setTimeout)}function c(e){u(function(){n(e)},f._setTimeout||setTimeout)}var l=this,f=l.as;(1===arguments.length||"function"==typeof t)&&(n=t,t={}),t.attributesToRetrieve="objectID",t.hitsPerPage=1e3,this.clearCache();var d=this.search(e,t).then(r);return n?void d.then(a,c):d},search:function(e,t,n){if("function"==typeof e&&"object"==typeof t||"object"==typeof n)throw new f.AlgoliaSearchError("index.search usage is index.search(query, params, cb)");0===arguments.length||"function"==typeof e?(n=e,e=""):(1===arguments.length||"function"==typeof t)&&(n=t,t=void 0),"object"==typeof e&&null!==e?(t=e,e=void 0):(void 0===e||null===e)&&(e="");var r="";return void 0!==e&&(r+="query="+encodeURIComponent(e)),void 0!==t&&(r=this.as._getSearchParams(t,r)),this._search(r,n)},browse:function(t,n,r){var o,i,s=e(57),a=this;0===arguments.length||1===arguments.length&&"function"==typeof arguments[0]?(o=0,r=arguments[0],t=void 0):"number"==typeof arguments[0]?(o=arguments[0],"number"==typeof arguments[1]?i=arguments[1]:"function"==typeof arguments[1]&&(r=arguments[1],i=void 0),t=void 0,n=void 0):"object"==typeof arguments[0]?("function"==typeof arguments[1]&&(r=arguments[1]),n=arguments[0],t=void 0):"string"==typeof arguments[0]&&"function"==typeof arguments[1]&&(r=arguments[1],n=void 0),n=s({},n||{},{page:o,hitsPerPage:i,query:t});var u=this.as._getSearchParams(n,"");return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(a.indexName)+"/browse?"+u,hostType:"read",callback:r})},browseFrom:function(e,t){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse?cursor="+e,hostType:"read",callback:t})},browseAll:function(t,n){function r(e){if(!a._stopped){var t;t=void 0!==e?"cursor="+encodeURIComponent(e):l,u._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(c.indexName)+"/browse?"+t,hostType:"read",callback:o})}}function o(e,t){return a._stopped?void 0:e?void a._error(e):(a._result(t),void 0===t.cursor?void a._end():void r(t.cursor))}"object"==typeof t&&(n=t,t=void 0);var i=e(57),s=e(61),a=new s,u=this.as,c=this,l=u._getSearchParams(i({},n||{},{query:t}),"");return r(),a},ttAdapter:function(e){var t=this;return function(n,r,o){var i;i="function"==typeof o?o:r,t.search(n,e,function(e,t){return e?void i(e):void i(t.hits)})}},waitTask:function(e,t){function n(){return l._jsonRequest({method:"GET",hostType:"read",url:"/1/indexes/"+encodeURIComponent(c.indexName)+"/task/"+e}).then(function(e){a++;var t=i*a*a;return t>s&&(t=s),"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,s=5e3,a=0,c=this,l=c.as,f=n();return t?void f.then(r,o):f},clearIndex:function(e){var t=this;return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/clear",hostType:"write",callback:e})},getSettings:function(e){var t=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/settings",hostType:"read",callback:e})},setSettings:function(e,t){var n=this;return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/settings",hostType:"write",body:e,callback:t})},listUserKeys:function(e){var t=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/keys",hostType:"read",callback:e})},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})},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})},addUserKey:function(e,t,n){(1===arguments.length||"function"==typeof t)&&(n=t,t=null);var r={acl:e};return t&&(r.validity=t.validity,r.maxQueriesPerIPPerHour=t.maxQueriesPerIPPerHour,r.maxHitsPerQuery=t.maxHitsPerQuery,r.description=t.description,t.queryParameters&&(r.queryParameters=this.as._getSearchParams(t.queryParameters,"")),r.referers=t.referers),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",body:r,hostType:"write",callback:n})},addUserKeyWithValidity:c(function(e,t,n){return this.addUserKey(e,t,n)},a("index.addUserKeyWithValidity()","index.addUserKey()")),updateUserKey:function(e,t,n,r){(2===arguments.length||"function"==typeof n)&&(r=n,n=null);var o={acl:t};return n&&(o.validity=n.validity,o.maxQueriesPerIPPerHour=n.maxQueriesPerIPPerHour,o.maxHitsPerQuery=n.maxHitsPerQuery,o.description=n.description,n.queryParameters&&(o.queryParameters=this.as._getSearchParams(n.queryParameters,"")),o.referers=n.referers),this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+e,body:o,hostType:"write",callback:r})},_search:function(e,t){return this.as._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/query",body:{params:e},hostType:"read",fallback:{method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName),body:{params:e}},callback:t})},as:null,indexName:null,typeAheadArgs:null,typeAheadValueOption:null}}).call(this,e(2))},{11:11,2:2,44:44,47:47,57:57,6:6,61:61,66:66}],61:[function(e,t,n){"use strict";function r(){}t.exports=r;var o=e(10),i=e(1).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")}},{1:1,10:10}],62:[function(e,t,n){"use strict";function r(t,n,i){var s=e(45),a=e(63);return i=s(i||{}),void 0===i.protocol&&(i.protocol=a()),i._ua=i._ua||r.ua,new o(t,n,i)}function o(){a.apply(this,arguments)}t.exports=r;var i=e(10),s=window.Promise||e(9).Promise,a=e(60),u=e(66),c=e(64),l=e(65);r.version=e(67),r.ua="Algolia for vanilla JavaScript "+r.version,window.__algolia={debug:e(6),algoliasearch:r};var f={hasXMLHttpRequest:"XMLHttpRequest"in window,hasXDomainRequest:"XDomainRequest"in window,cors:"withCredentials"in new XMLHttpRequest,timeout:"timeout"in new XMLHttpRequest};i(o,a),o.prototype._request=function(e,t){return new s(function(n,r){function o(){if(!l){f.timeout||clearTimeout(a);var e;try{e={body:JSON.parse(p.responseText),statusCode:p.status,headers:p.getAllResponseHeaders&&p.getAllResponseHeaders()||{}}}catch(t){e=new u.UnparsableJSON({more:p.responseText})}e instanceof u.UnparsableJSON?r(e):n(e)}}function i(e){l||(f.timeout||clearTimeout(a),r(new u.Network({more:e})))}function s(){f.timeout||(l=!0,p.abort()),r(new u.RequestTimeout)}if(!f.cors&&!f.hasXDomainRequest)return void r(new u.Network("CORS not supported"));e=c(e,t.headers);var a,l,d=t.body,p=f.cors?new XMLHttpRequest:new XDomainRequest;p instanceof XMLHttpRequest?p.open(t.method,e,!0):p.open(t.method,e),f.cors&&(d&&("POST"===t.method?p.setRequestHeader("content-type","application/x-www-form-urlencoded"):p.setRequestHeader("content-type","application/json")),p.setRequestHeader("accept","application/json")),p.onprogress=function(){},p.onload=o,p.onerror=i,f.timeout?(p.timeout=t.timeout,p.ontimeout=s):a=setTimeout(s,t.timeout),p.send(d)})},o.prototype._request.fallback=function(e,t){return e=c(e,t.headers),new s(function(n,r){l(e,t,function(e,t){return e?void r(e):void n(t)})})},o.prototype._promise={reject:function(e){return s.reject(e)},resolve:function(e){return s.resolve(e)},delay:function(e){return new s(function(t){setTimeout(t,e)})}}},{10:10,45:45,6:6,60:60,63:63,64:64,65:65,66:66,67:67,9:9}],63:[function(e,t,n){"use strict";function r(){var e=window.document.location.protocol;return"http:"!==e&&"https:"!==e&&(e="http:"),e}t.exports=r},{}],64:[function(e,t,n){"use strict";function r(e,t){return e+=/\?/.test(e)?"&":"?",e+o.encode(t)}t.exports=r;var o=e(5)},{5:5}],65:[function(e,t,n){"use strict";function r(e,t,n){function r(){t.debug("JSONP: success"),y||f||(y=!0,l||(t.debug("JSONP: Fail. Script loaded but did not call the callback"),a(),n(new o.JSONPScriptFail)))}function s(){("loaded"===this.readyState||"complete"===this.readyState)&&r()}function a(){clearTimeout(m),p.onload=null,p.onreadystatechange=null,p.onerror=null,d.removeChild(p);try{delete window[h],delete window[h+"_loaded"]}catch(e){window[h]=null,window[h+"_loaded"]=null}}function u(){t.debug("JSONP: Script timeout"),f=!0,a(),n(new o.RequestTimeout)}function c(){t.debug("JSONP: Script error"),y||f||(a(),n(new o.JSONPScriptError))}if("GET"!==t.method)return void n(new Error("Method "+t.method+" "+e+" is not supported by JSONP."));t.debug("JSONP: start");var l=!1,f=!1;i+=1;var d=document.getElementsByTagName("head")[0],p=document.createElement("script"),h="algoliaJSONP_"+i,y=!1;window[h]=function(e){try{delete window[h]}catch(t){window[h]=void 0}f||(l=!0,a(),n(null,{body:e}))},e+="&callback="+h,t.jsonBody&&t.jsonBody.params&&(e+="&"+t.jsonBody.params);var m=setTimeout(u,t.timeout);p.onreadystatechange=s,p.onload=r,p.onerror=c,p.async=!0,p.defer=!0,p.src=e,d.appendChild(p)}t.exports=r;var o=e(66),i=0},{66:66}],66:[function(e,t,n){"use strict";function r(t,n){var r=e(11),o=this;"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):o.stack=(new Error).stack||"Cannot get a stacktrace, browser is too old",this.name=this.constructor.name,this.message=t||"Unknown error",n&&r(n,function(e,t){o[t]=e})}function o(e,t){function n(){var n=Array.prototype.slice.call(arguments,0);"string"!=typeof n[0]&&n.unshift(t),r.apply(this,n),this.name="AlgoliaSearch"+e+"Error"}return i(n,r),n}var i=e(10);i(r,Error),t.exports={AlgoliaSearchError:r,UnparsableJSON:o("UnparsableJSON","Could not parse the incoming response as JSON, see err.more for details"),RequestTimeout:o("RequestTimeout","Request timedout before getting a response"),Network:o("Network","Network issue, see err.more for details"),JSONPScriptFail:o("JSONPScriptFail","<script> was loaded but did not call our provided callback"),JSONPScriptError:o("JSONPScriptError","<script> unable to load due to an `error` event on it"),Unknown:o("Unknown","Unknown error occured")}},{10:10,11:11}],67:[function(e,t,n){t.exports="3.7.5"},{}]},{},[62])(62)}); | ||
/*! algoliasearch 3.7.6 | © 2014, 2015 Algolia SAS | github.com/algolia/algoliasearch-client-js */ | ||
!function(e){var t;"undefined"!=typeof window?t=window:"undefined"!=typeof self&&(t=self),t.ALGOLIA_MIGRATION_LAYER=e()}(function(){return function e(t,n,r){function o(s,a){if(!n[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[s]={exports:{}};t[s][0].call(l.exports,function(e){var n=t[s][1][e];return o(n?n:e)},l,l.exports,e,t,n,r)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(e,t,n){function r(e,t){for(var n in t)e.setAttribute(n,t[n])}function o(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function i(e,t){e.onreadystatechange=function(){("complete"==this.readyState||"loaded"==this.readyState)&&(this.onreadystatechange=null,t(null,e))}}t.exports=function(e,t,n){var s=document.head||document.getElementsByTagName("head")[0],a=document.createElement("script");"function"==typeof t&&(n=t,t={}),t=t||{},n=n||function(){},a.type=t.type||"text/javascript",a.charset=t.charset||"utf8",a.async="async"in t?!!t.async:!0,a.src=e,t.attrs&&r(a,t.attrs),t.text&&(a.text=""+t.text);var u="onload"in a?o:i;u(a,n),a.onload||o(a,n),s.appendChild(a)}},{}],2:[function(e,t,n){"use strict";function r(e){for(var t=new RegExp("cdn\\.jsdelivr\\.net/algoliasearch/latest/"+e.replace(".","\\.")+"(?:\\.min)?\\.js$"),n=document.getElementsByTagName("script"),r=!1,o=0,i=n.length;i>o;o++)if(n[o].src&&t.test(n[o].src)){r=!0;break}return r}t.exports=r},{}],3:[function(e,t,n){"use strict";function r(t){var n=e(1),r="//cdn.jsdelivr.net/algoliasearch/2/"+t+".min.js",i="-- 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 --";window.console&&(window.console.warn?window.console.warn(i):window.console.log&&window.console.log(i));try{document.write("<script>window.ALGOLIA_SUPPORTS_DOCWRITE = true</script>"),window.ALGOLIA_SUPPORTS_DOCWRITE===!0?(document.write('<script src="'+r+'"></script>'),o("document.write")()):n(r,o("DOMElement"))}catch(s){n(r,o("DOMElement"))}}function o(e){return function(){var t="AlgoliaSearch: loaded V2 script using "+e;window.console&&window.console.log&&window.console.log(t)}}t.exports=r},{1:1}],4:[function(e,t,n){"use strict";function r(){var e="-- 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 --";window.AlgoliaSearch=function(){throw new Error(e)},window.AlgoliaSearchHelper=function(){throw new Error(e)},window.AlgoliaExplainResults=function(){throw new Error(e)}}t.exports=r},{}],5:[function(e,t,n){"use strict";function r(t){var n=e(2),r=e(3),o=e(4);n(t)?r(t):o()}r("algoliasearch")},{2:2,3:3,4:4}]},{},[5])(5)}),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.algoliasearch=e()}}(function(){var e;return function t(e,n,r){function o(s,a){if(!n[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[s]={exports:{}};e[s][0].call(l.exports,function(t){var n=e[s][1][t];return o(n?n:t)},l,l.exports,t,e,n,r)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function o(e){return"function"==typeof e}function i(e){return"number"==typeof e}function s(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!i(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,i,u,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[e],a(n))return!1;if(o(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,i=new Array(r-1),u=1;r>u;u++)i[u-1]=arguments[u];n.apply(this,i)}else if(s(n)){for(r=arguments.length,i=new Array(r-1),u=1;r>u;u++)i[u-1]=arguments[u];for(c=n.slice(),r=c.length,u=0;r>u;u++)c[u].apply(this,i)}return!0},r.prototype.addListener=function(e,t){var n;if(!o(t))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,o(t.listener)?t.listener:t),this._events[e]?s(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,s(this._events[e])&&!this._events[e].warned){var n;n=a(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,n&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())}return this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}if(!o(t))throw TypeError("listener must be a function");var r=!1;return n.listener=t,this.on(e,n),this},r.prototype.removeListener=function(e,t){var n,r,i,a;if(!o(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],i=n.length,r=-1,n===t||o(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(s(n)){for(a=i;a-->0;)if(n[a]===t||n[a].listener&&n[a].listener===t){r=a;break}if(0>r)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],o(n))this.removeListener(e,n);else for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?o(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.listenerCount=function(e,t){var n;return n=e._events&&e._events[t]?o(e._events[t])?1:e._events[t].length:0}},{}],2:[function(e,t,n){function r(){l=!1,a.length?c=a.concat(c):f=-1,c.length&&o()}function o(){if(!l){var e=setTimeout(r);l=!0;for(var t=c.length;t;){for(a=c,c=[];++f<t;)a[f].run();f=-1,t=c.length}a=null,l=!1,clearTimeout(e)}}function i(e,t){this.fun=e,this.array=t}function s(){}var a,u=t.exports={},c=[],l=!1,f=-1;u.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new i(e,t)),1!==c.length||l||setTimeout(o,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",u.versions={},u.on=s,u.addListener=s,u.once=s,u.off=s,u.removeListener=s,u.removeAllListeners=s,u.emit=s,u.binding=function(e){throw new Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(e){throw new Error("process.chdir is not supported")},u.umask=function(){return 0}},{}],3:[function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,n,i){t=t||"&",n=n||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(t);var u=1e3;i&&"number"==typeof i.maxKeys&&(u=i.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var l=0;c>l;++l){var f,d,p,h,y=e[l].replace(a,"%20"),m=y.indexOf(n);m>=0?(f=y.substr(0,m),d=y.substr(m+1)):(f=y,d=""),p=decodeURIComponent(f),h=decodeURIComponent(d),r(s,p)?o(s[p])?s[p].push(h):s[p]=[s[p],h]:s[p]=h}return s};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],4:[function(e,t,n){"use strict";function r(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var o=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,n,a){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?r(s(e),function(s){var a=encodeURIComponent(o(s))+n;return i(e[s])?r(e[s],function(e){return a+encodeURIComponent(o(e))}).join(t):a+encodeURIComponent(o(e[s]))}).join(t):a?encodeURIComponent(o(a))+n+encodeURIComponent(o(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},{}],5:[function(e,t,n){"use strict";n.decode=n.parse=e(3),n.encode=n.stringify=e(4)},{3:3,4:4}],6:[function(e,t,n){function r(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function o(){var e=arguments,t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+n.humanize(this.diff),!t)return e;var r="color: "+this.color;e=[e[0],r,"color: inherit"].concat(Array.prototype.slice.call(e,1));var o=0,i=0;return e[0].replace(/%[a-z%]/g,function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))}),e.splice(i,0,r),e}function i(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(e){try{null==e?n.storage.removeItem("debug"):n.storage.debug=e}catch(t){}}function a(){var e;try{e=n.storage.debug}catch(t){}return e}function u(){try{return window.localStorage}catch(e){}}n=t.exports=e(7),n.log=i,n.formatArgs=o,n.save=s,n.load=a,n.useColors=r,n.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:u(),n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],n.formatters.j=function(e){return JSON.stringify(e)},n.enable(a())},{7:7}],7:[function(e,t,n){function r(){return n.colors[l++%n.colors.length]}function o(e){function t(){}function o(){var e=o,t=+new Date,i=t-(c||t);e.diff=i,e.prev=c,e.curr=t,c=t,null==e.useColors&&(e.useColors=n.useColors()),null==e.color&&e.useColors&&(e.color=r());var s=Array.prototype.slice.call(arguments);s[0]=n.coerce(s[0]),"string"!=typeof s[0]&&(s=["%o"].concat(s));var a=0;s[0]=s[0].replace(/%([a-z%])/g,function(t,r){if("%%"===t)return t;a++;var o=n.formatters[r];if("function"==typeof o){var i=s[a];t=o.call(e,i),s.splice(a,1),a--}return t}),"function"==typeof n.formatArgs&&(s=n.formatArgs.apply(e,s));var u=o.log||n.log||console.log.bind(console);u.apply(e,s)}t.enabled=!1,o.enabled=!0;var i=n.enabled(e)?o:t;return i.namespace=e,i}function i(e){n.save(e);for(var t=(e||"").split(/[\s,]+/),r=t.length,o=0;r>o;o++)t[o]&&(e=t[o].replace(/\*/g,".*?"),"-"===e[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")))}function s(){n.enable("")}function a(e){var t,r;for(t=0,r=n.skips.length;r>t;t++)if(n.skips[t].test(e))return!1;for(t=0,r=n.names.length;r>t;t++)if(n.names[t].test(e))return!0;return!1}function u(e){return e instanceof Error?e.stack||e.message:e}n=t.exports=o,n.coerce=u,n.disable=s,n.enable=i,n.enabled=a,n.humanize=e(8),n.names=[],n.skips=[],n.formatters={};var c,l=0},{8:8}],8:[function(e,t,n){function r(e){if(e=""+e,!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),r=(t[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*f;case"days":case"day":case"d":return n*l;case"hours":case"hour":case"hrs":case"hr":case"h":return n*c;case"minutes":case"minute":case"mins":case"min":case"m":return n*u;case"seconds":case"second":case"secs":case"sec":case"s":return n*a;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n}}}}function o(e){return e>=l?Math.round(e/l)+"d":e>=c?Math.round(e/c)+"h":e>=u?Math.round(e/u)+"m":e>=a?Math.round(e/a)+"s":e+"ms"}function i(e){return s(e,l,"day")||s(e,c,"hour")||s(e,u,"minute")||s(e,a,"second")||e+" ms"}function s(e,t,n){return t>e?void 0:1.5*t>e?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}var a=1e3,u=60*a,c=60*u,l=24*c,f=365.25*l;t.exports=function(e,t){return t=t||{},"string"==typeof e?r(e):t["long"]?i(e):o(e)}},{}],9:[function(t,n,r){(function(r,o){(function(){"use strict";function i(e){return"function"==typeof e||"object"==typeof e&&null!==e}function s(e){return"function"==typeof e}function a(e){return"object"==typeof e&&null!==e}function u(e){G=e}function c(e){X=e}function l(){var e=r.nextTick,t=r.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(t)&&"0"===t[1]&&"10"===t[2]&&(e=setImmediate),function(){e(y)}}function f(){return function(){Q(y)}}function d(){var e=0,t=new Z(y),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function p(){var e=new MessageChannel;return e.port1.onmessage=y,function(){e.port2.postMessage(0)}}function h(){return function(){setTimeout(y,1)}}function y(){for(var e=0;W>e;e+=2){var t=ne[e],n=ne[e+1];t(n),ne[e]=void 0,ne[e+1]=void 0}W=0}function m(){try{var e=t,n=e("vertx");return Q=n.runOnLoop||n.runOnContext,f()}catch(r){return h()}}function v(){}function g(){return new TypeError("You cannot resolve a promise with itself")}function b(){return new TypeError("A promises callback cannot return that same promise.")}function w(e){try{return e.then}catch(t){return se.error=t,se}}function x(e,t,n,r){try{e.call(t,n,r)}catch(o){return o}}function _(e,t,n){X(function(e){var r=!1,o=x(n,t,function(n){r||(r=!0,t!==n?A(e,n):O(e,n))},function(t){r||(r=!0,k(e,t))},"Settle: "+(e._label||" unknown promise"));!r&&o&&(r=!0,k(e,o))},e)}function j(e,t){t._state===oe?O(e,t._result):t._state===ie?k(e,t._result):I(t,void 0,function(t){A(e,t)},function(t){k(e,t)})}function T(e,t){if(t.constructor===e.constructor)j(e,t);else{var n=w(t);n===se?k(e,se.error):void 0===n?O(e,t):s(n)?_(e,t,n):O(e,t)}}function A(e,t){e===t?k(e,g()):i(t)?T(e,t):O(e,t)}function S(e){e._onerror&&e._onerror(e._result),P(e)}function O(e,t){e._state===re&&(e._result=t,e._state=oe,0!==e._subscribers.length&&X(P,e))}function k(e,t){e._state===re&&(e._state=ie,e._result=t,X(S,e))}function I(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+oe]=n,o[i+ie]=r,0===i&&e._state&&X(P,e)}function P(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r,o,i=e._result,s=0;s<t.length;s+=3)r=t[s],o=t[s+n],r?q(n,r,o,i):o(i);e._subscribers.length=0}}function R(){this.error=null}function E(e,t){try{return e(t)}catch(n){return ae.error=n,ae}}function q(e,t,n,r){var o,i,a,u,c=s(n);if(c){if(o=E(n,r),o===ae?(u=!0,i=o.error,o=null):a=!0,t===o)return void k(t,b())}else o=r,a=!0;t._state!==re||(c&&a?A(t,o):u?k(t,i):e===oe?O(t,o):e===ie&&k(t,o))}function U(e,t){try{t(function(t){A(e,t)},function(t){k(e,t)})}catch(n){k(e,n)}}function C(e,t){var n=this;n._instanceConstructor=e,n.promise=new e(v),n._validateInput(t)?(n._input=t,n.length=t.length,n._remaining=t.length,n._init(),0===n.length?O(n.promise,n._result):(n.length=n.length||0,n._enumerate(),0===n._remaining&&O(n.promise,n._result))):k(n.promise,n._validationError())}function N(e){return new ue(this,e).promise}function L(e){function t(e){A(o,e)}function n(e){k(o,e)}var r=this,o=new r(v);if(!V(e))return k(o,new TypeError("You must pass an array to race.")),o;for(var i=e.length,s=0;o._state===re&&i>s;s++)I(r.resolve(e[s]),void 0,t,n);return o}function D(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(v);return A(n,e),n}function M(e){var t=this,n=new t(v);return k(n,e),n}function H(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function F(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function B(e){this._id=pe++,this._state=void 0,this._result=void 0,this._subscribers=[],v!==e&&(s(e)||H(),this instanceof B||F(),U(this,e))}function J(){var e;if("undefined"!=typeof o)e=o;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=e.Promise;(!n||"[object Promise]"!==Object.prototype.toString.call(n.resolve())||n.cast)&&(e.Promise=he)}var K;K=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var Q,G,$,V=K,W=0,X=({}.toString,function(e,t){ne[W]=e,ne[W+1]=t,W+=2,2===W&&(G?G(y):$())}),Y="undefined"!=typeof window?window:void 0,z=Y||{},Z=z.MutationObserver||z.WebKitMutationObserver,ee="undefined"!=typeof r&&"[object process]"==={}.toString.call(r),te="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,ne=new Array(1e3);$=ee?l():Z?d():te?p():void 0===Y&&"function"==typeof t?m():h();var re=void 0,oe=1,ie=2,se=new R,ae=new R;C.prototype._validateInput=function(e){return V(e)},C.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},C.prototype._init=function(){this._result=new Array(this.length)};var ue=C;C.prototype._enumerate=function(){for(var e=this,t=e.length,n=e.promise,r=e._input,o=0;n._state===re&&t>o;o++)e._eachEntry(r[o],o)},C.prototype._eachEntry=function(e,t){var n=this,r=n._instanceConstructor;a(e)?e.constructor===r&&e._state!==re?(e._onerror=null,n._settledAt(e._state,t,e._result)):n._willSettleAt(r.resolve(e),t):(n._remaining--,n._result[t]=e)},C.prototype._settledAt=function(e,t,n){var r=this,o=r.promise;o._state===re&&(r._remaining--,e===ie?k(o,n):r._result[t]=n),0===r._remaining&&O(o,r._result)},C.prototype._willSettleAt=function(e,t){var n=this;I(e,void 0,function(e){n._settledAt(oe,t,e)},function(e){n._settledAt(ie,t,e)})};var ce=N,le=L,fe=D,de=M,pe=0,he=B;B.all=ce,B.race=le,B.resolve=fe,B.reject=de,B._setScheduler=u,B._setAsap=c,B._asap=X,B.prototype={constructor:B,then:function(e,t){var n=this,r=n._state;if(r===oe&&!e||r===ie&&!t)return this;var o=new this.constructor(v),i=n._result;if(r){var s=arguments[r-1];X(function(){q(r,o,s,i)})}else I(n,o,e,t);return o},"catch":function(e){return this.then(null,e)}};var ye=J,me={Promise:he,polyfill:ye};"function"==typeof e&&e.amd?e(function(){return me}):"undefined"!=typeof n&&n.exports?n.exports=me:"undefined"!=typeof this&&(this.ES6Promise=me),ye()}).call(this)}).call(this,t(2),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],10:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],11:[function(e,t,n){var r=e(14),o=e(18),i=e(30),s=i(r,o);t.exports=s},{14:14,18:18,30:30}],12:[function(e,t,n){function r(e,t){if("function"!=typeof e)throw new TypeError(o);return t=i(void 0===t?e.length-1:+t||0,0),function(){for(var n=arguments,r=-1,o=i(n.length-t,0),s=Array(o);++r<o;)s[r]=n[t+r];switch(t){case 0:return e.call(this,s);case 1:return e.call(this,n[0],s);case 2:return e.call(this,n[0],n[1],s)}var a=Array(t+1);for(r=-1;++r<t;)a[r]=n[r];return a[t]=s,e.apply(this,a)}}var o="Expected a function",i=Math.max;t.exports=r},{}],13:[function(e,t,n){function r(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}t.exports=r},{}],14:[function(e,t,n){function r(e,t){for(var n=-1,r=e.length;++n<r&&t(e[n],n,e)!==!1;);return e}t.exports=r},{}],15:[function(e,t,n){function r(e,t){return null==t?e:o(t,i(t),e)}var o=e(17),i=e(55);t.exports=r},{17:17,55:55}],16:[function(e,t,n){function r(e,t,n,y,m,v,g){var w;if(n&&(w=m?n(e,y,m):n(e)),void 0!==w)return w;if(!p(e))return e;var x=f(e);if(x){if(w=u(e),!t)return o(e,w)}else{var j=M.call(e),T=j==b;if(j!=_&&j!=h&&(!T||m))return L[j]?c(e,j,t):m?e:{};if(d(e))return m?e:{};if(w=l(T?{}:e),!t)return s(w,e)}v||(v=[]),g||(g=[]);for(var A=v.length;A--;)if(v[A]==e)return g[A];return v.push(e),g.push(w),(x?i:a)(e,function(o,i){w[i]=r(o,t,n,i,e,v,g)}),w}var o=e(13),i=e(14),s=e(15),a=e(21),u=e(33),c=e(34),l=e(35),f=e(47),d=e(37),p=e(50),h="[object Arguments]",y="[object Array]",m="[object Boolean]",v="[object Date]",g="[object Error]",b="[object Function]",w="[object Map]",x="[object Number]",_="[object Object]",j="[object RegExp]",T="[object Set]",A="[object String]",S="[object WeakMap]",O="[object ArrayBuffer]",k="[object Float32Array]",I="[object Float64Array]",P="[object Int8Array]",R="[object Int16Array]",E="[object Int32Array]",q="[object Uint8Array]",U="[object Uint8ClampedArray]",C="[object Uint16Array]",N="[object Uint32Array]",L={};L[h]=L[y]=L[O]=L[m]=L[v]=L[k]=L[I]=L[P]=L[R]=L[E]=L[x]=L[_]=L[j]=L[A]=L[q]=L[U]=L[C]=L[N]=!0,L[g]=L[b]=L[w]=L[T]=L[S]=!1;var D=Object.prototype,M=D.toString;t.exports=r},{13:13,14:14,15:15,21:21,33:33,34:34,35:35,37:37,47:47,50:50}],17:[function(e,t,n){function r(e,t,n){n||(n={});for(var r=-1,o=t.length;++r<o;){var i=t[r];n[i]=e[i]}return n}t.exports=r},{}],18:[function(e,t,n){var r=e(21),o=e(28),i=o(r);t.exports=i},{21:21,28:28}],19:[function(e,t,n){var r=e(29),o=r();t.exports=o},{29:29}],20:[function(e,t,n){function r(e,t){return o(e,t,i)}var o=e(19),i=e(56);t.exports=r},{19:19,56:56}],21:[function(e,t,n){function r(e,t){return o(e,t,i)}var o=e(19),i=e(55);t.exports=r},{19:19,55:55}],22:[function(e,t,n){function r(e,t,n,d,p){if(!u(e))return e;var h=a(t)&&(s(t)||l(t)),y=h?void 0:f(t);return o(y||t,function(o,s){if(y&&(s=o,o=t[s]),c(o))d||(d=[]),p||(p=[]),i(e,t,s,r,n,d,p);else{var a=e[s],u=n?n(a,o,s,e,t):void 0,l=void 0===u;l&&(u=o),void 0===u&&(!h||s in e)||!l&&(u===u?u===a:a!==a)||(e[s]=u)}}),e}var o=e(14),i=e(23),s=e(47),a=e(36),u=e(50),c=e(41),l=e(53),f=e(55);t.exports=r},{14:14,23:23,36:36,41:41,47:47,50:50,53:53,55:55}],23:[function(e,t,n){function r(e,t,n,r,f,d,p){for(var h=d.length,y=t[n];h--;)if(d[h]==y)return void(e[n]=p[h]);var m=e[n],v=f?f(m,y,n,e,t):void 0,g=void 0===v;g&&(v=y,a(y)&&(s(y)||c(y))?v=s(m)?m:a(m)?o(m):[]:u(y)||i(y)?v=i(m)?l(m):u(m)?m:{}:g=!1),d.push(y),p.push(v),g?e[n]=r(v,y,f,d,p):(v===v?v!==m:m===m)&&(e[n]=v)}var o=e(13),i=e(46),s=e(47),a=e(36),u=e(51),c=e(53),l=e(54);t.exports=r},{13:13,36:36,46:46,47:47,51:51,53:53,54:54}],24:[function(e,t,n){function r(e){return function(t){return null==t?void 0:o(t)[e]}}var o=e(43);t.exports=r},{43:43}],25:[function(e,t,n){function r(e,t,n){if("function"!=typeof e)return o;if(void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,o){return e.call(t,n,r,o)};case 4:return function(n,r,o,i){return e.call(t,n,r,o,i)};case 5:return function(n,r,o,i,s){return e.call(t,n,r,o,i,s)}}return function(){return e.apply(t,arguments)}}var o=e(59);t.exports=r},{59:59}],26:[function(e,t,n){(function(e){function n(e){var t=new r(e.byteLength),n=new o(t);return n.set(new o(e)),t}var r=e.ArrayBuffer,o=e.Uint8Array;t.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],27:[function(e,t,n){function r(e){return s(function(t,n){var r=-1,s=null==t?0:n.length,a=s>2?n[s-2]:void 0,u=s>2?n[2]:void 0,c=s>1?n[s-1]:void 0;for("function"==typeof a?(a=o(a,c,5),s-=2):(a="function"==typeof c?c:void 0,s-=a?1:0),u&&i(n[0],n[1],u)&&(a=3>s?void 0:a,s=1);++r<s;){var l=n[r];l&&e(t,l,a)}return t})}var o=e(25),i=e(39),s=e(12);t.exports=r},{12:12,25:25,39:39}],28:[function(e,t,n){function r(e,t){return function(n,r){var a=n?o(n):0;if(!i(a))return e(n,r);for(var u=t?a:-1,c=s(n);(t?u--:++u<a)&&r(c[u],u,c)!==!1;);return n}}var o=e(31),i=e(40),s=e(43);t.exports=r},{31:31,40:40,43:43}],29:[function(e,t,n){function r(e){return function(t,n,r){for(var i=o(t),s=r(t),a=s.length,u=e?a:-1;e?u--:++u<a;){var c=s[u];if(n(i[c],c,i)===!1)break}return t}}var o=e(43);t.exports=r},{43:43}],30:[function(e,t,n){function r(e,t){return function(n,r,s){return"function"==typeof r&&void 0===s&&i(n)?e(n,r):t(n,o(r,s,3))}}var o=e(25),i=e(47);t.exports=r},{25:25,47:47}],31:[function(e,t,n){var r=e(24),o=r("length");t.exports=o},{24:24}],32:[function(e,t,n){function r(e,t){var n=null==e?void 0:e[t];return o(n)?n:void 0}var o=e(49);t.exports=r},{49:49}],33:[function(e,t,n){function r(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&i.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var o=Object.prototype,i=o.hasOwnProperty;t.exports=r},{}],34:[function(e,t,n){(function(n){function r(e,t,n){var r=e.constructor;switch(t){case l:return o(e);case i:case s:return new r(+e);case f:case d:case p:case h:case y:case m:case v:case g:case b:r instanceof r&&(r=_[t]);var x=e.buffer;return new r(n?o(x):x,e.byteOffset,e.length);case a:case c:return new r(e);case u:var j=new r(e.source,w.exec(e));j.lastIndex=e.lastIndex}return j}var o=e(26),i="[object Boolean]",s="[object Date]",a="[object Number]",u="[object RegExp]",c="[object String]",l="[object ArrayBuffer]",f="[object Float32Array]",d="[object Float64Array]",p="[object Int8Array]",h="[object Int16Array]",y="[object Int32Array]",m="[object Uint8Array]",v="[object Uint8ClampedArray]",g="[object Uint16Array]",b="[object Uint32Array]",w=/\w*$/,x=n.Uint8Array,_={};_[f]=n.Float32Array,_[d]=n.Float64Array,_[p]=n.Int8Array,_[h]=n.Int16Array,_[y]=n.Int32Array,_[m]=x,_[v]=n.Uint8ClampedArray,_[g]=n.Uint16Array,_[b]=n.Uint32Array,t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{26:26}],35:[function(e,t,n){function r(e){var t=e.constructor;return"function"==typeof t&&t instanceof t||(t=Object),new t}t.exports=r},{}],36:[function(e,t,n){function r(e){return null!=e&&i(o(e))}var o=e(31),i=e(40);t.exports=r},{31:31,40:40}],37:[function(e,t,n){var r=function(){try{Object({toString:0}+"")}catch(e){return function(){return!1}}return function(e){return"function"!=typeof e.toString&&"string"==typeof(e+"")}}();t.exports=r},{}],38:[function(e,t,n){function r(e,t){return e="number"==typeof e||o.test(e)?+e:-1,t=null==t?i:t,e>-1&&e%1==0&&t>e}var o=/^\d+$/,i=9007199254740991;t.exports=r},{}],39:[function(e,t,n){function r(e,t,n){if(!s(n))return!1;var r=typeof t;if("number"==r?o(n)&&i(t,n.length):"string"==r&&t in n){var a=n[t];return e===e?e===a:a!==a}return!1}var o=e(36),i=e(38),s=e(50);t.exports=r},{36:36,38:38,50:50}],40:[function(e,t,n){function r(e){return"number"==typeof e&&e>-1&&e%1==0&&o>=e}var o=9007199254740991;t.exports=r},{}],41:[function(e,t,n){function r(e){return!!e&&"object"==typeof e}t.exports=r},{}],42:[function(e,t,n){function r(e){for(var t=c(e),n=t.length,r=n&&e.length,l=!!r&&a(r)&&(i(e)||o(e)||u(e)),d=-1,p=[];++d<n;){var h=t[d];(l&&s(h,r)||f.call(e,h))&&p.push(h)}return p}var o=e(46),i=e(47),s=e(38),a=e(40),u=e(52),c=e(56),l=Object.prototype,f=l.hasOwnProperty;t.exports=r},{38:38,40:40,46:46,47:47,52:52,56:56}],43:[function(e,t,n){function r(e){if(s.unindexedChars&&i(e)){for(var t=-1,n=e.length,r=Object(e);++t<n;)r[t]=e.charAt(t);return r}return o(e)?e:Object(e)}var o=e(50),i=e(52),s=e(58);t.exports=r},{50:50,52:52,58:58}],44:[function(e,t,n){function r(e,t,n,r){return t&&"boolean"!=typeof t&&s(e,t,n)?t=!1:"function"==typeof t&&(r=n,n=t,t=!1),"function"==typeof n?o(e,t,i(n,r,1)):o(e,t)}var o=e(16),i=e(25),s=e(39);t.exports=r},{16:16,25:25,39:39}],45:[function(e,t,n){function r(e,t,n){return"function"==typeof t?o(e,!0,i(t,n,1)):o(e,!0)}var o=e(16),i=e(25);t.exports=r},{16:16,25:25}],46:[function(e,t,n){function r(e){return i(e)&&o(e)&&a.call(e,"callee")&&!u.call(e,"callee")}var o=e(36),i=e(41),s=Object.prototype,a=s.hasOwnProperty,u=s.propertyIsEnumerable;t.exports=r},{36:36,41:41}],47:[function(e,t,n){var r=e(32),o=e(40),i=e(41),s="[object Array]",a=Object.prototype,u=a.toString,c=r(Array,"isArray"),l=c||function(e){return i(e)&&o(e.length)&&u.call(e)==s};t.exports=l},{32:32,40:40,41:41}],48:[function(e,t,n){function r(e){return o(e)&&a.call(e)==i}var o=e(50),i="[object Function]",s=Object.prototype,a=s.toString;t.exports=r},{50:50}],49:[function(e,t,n){function r(e){return null==e?!1:o(e)?f.test(c.call(e)):s(e)&&(i(e)?f:a).test(e)}var o=e(48),i=e(37),s=e(41),a=/^\[object .+?Constructor\]$/,u=Object.prototype,c=Function.prototype.toString,l=u.hasOwnProperty,f=RegExp("^"+c.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=r},{37:37,41:41,48:48}],50:[function(e,t,n){function r(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}t.exports=r},{}],51:[function(e,t,n){function r(e){var t;if(!a(e)||d.call(e)!=c||s(e)||i(e)||!f.call(e,"constructor")&&(t=e.constructor,"function"==typeof t&&!(t instanceof t)))return!1;var n;return u.ownLast?(o(e,function(e,t,r){return n=f.call(r,t),!1}),n!==!1):(o(e,function(e,t){n=t}),void 0===n||f.call(e,n))}var o=e(20),i=e(46),s=e(37),a=e(41),u=e(58),c="[object Object]",l=Object.prototype,f=l.hasOwnProperty,d=l.toString;t.exports=r},{20:20,37:37,41:41,46:46,58:58}],52:[function(e,t,n){function r(e){return"string"==typeof e||o(e)&&a.call(e)==i}var o=e(41),i="[object String]",s=Object.prototype,a=s.toString;t.exports=r},{41:41}],53:[function(e,t,n){function r(e){return i(e)&&o(e.length)&&!!I[R.call(e)]}var o=e(40),i=e(41),s="[object Arguments]",a="[object Array]",u="[object Boolean]",c="[object Date]",l="[object Error]",f="[object Function]",d="[object Map]",p="[object Number]",h="[object Object]",y="[object RegExp]",m="[object Set]",v="[object String]",g="[object WeakMap]",b="[object ArrayBuffer]",w="[object Float32Array]",x="[object Float64Array]",_="[object Int8Array]",j="[object Int16Array]",T="[object Int32Array]",A="[object Uint8Array]",S="[object Uint8ClampedArray]",O="[object Uint16Array]",k="[object Uint32Array]",I={};I[w]=I[x]=I[_]=I[j]=I[T]=I[A]=I[S]=I[O]=I[k]=!0,I[s]=I[a]=I[b]=I[u]=I[c]=I[l]=I[f]=I[d]=I[p]=I[h]=I[y]=I[m]=I[v]=I[g]=!1;var P=Object.prototype,R=P.toString;t.exports=r},{40:40,41:41}],54:[function(e,t,n){function r(e){return o(e,i(e))}var o=e(17),i=e(56);t.exports=r},{17:17,56:56}],55:[function(e,t,n){var r=e(32),o=e(36),i=e(50),s=e(42),a=e(58),u=r(Object,"keys"),c=u?function(e){var t=null==e?void 0:e.constructor;return"function"==typeof t&&t.prototype===e||("function"==typeof e?a.enumPrototypes:o(e))?s(e):i(e)?u(e):[]; | ||
}:s;t.exports=c},{32:32,36:36,42:42,50:50,58:58}],56:[function(e,t,n){function r(e){if(null==e)return[];l(e)||(e=Object(e));var t=e.length;t=t&&c(t)&&(s(e)||i(e)||f(e))&&t||0;for(var n=e.constructor,r=-1,o=a(n)&&n.prototype||T,p=o===e,h=Array(t),y=t>0,v=d.enumErrorProps&&(e===j||e instanceof Error),g=d.enumPrototypes&&a(e);++r<t;)h[r]=r+"";for(var w in e)g&&"prototype"==w||v&&("message"==w||"name"==w)||y&&u(w,t)||"constructor"==w&&(p||!S.call(e,w))||h.push(w);if(d.nonEnumShadows&&e!==T){var I=e===A?x:e===j?m:O.call(e),P=k[I]||k[b];for(I==b&&(o=T),t=_.length;t--;){w=_[t];var R=P[w];p&&R||(R?!S.call(e,w):e[w]===o[w])||h.push(w)}}return h}var o=e(14),i=e(46),s=e(47),a=e(48),u=e(38),c=e(40),l=e(50),f=e(52),d=e(58),p="[object Array]",h="[object Boolean]",y="[object Date]",m="[object Error]",v="[object Function]",g="[object Number]",b="[object Object]",w="[object RegExp]",x="[object String]",_=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],j=Error.prototype,T=Object.prototype,A=String.prototype,S=T.hasOwnProperty,O=T.toString,k={};k[p]=k[y]=k[g]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},k[h]=k[x]={constructor:!0,toString:!0,valueOf:!0},k[m]=k[v]=k[w]={constructor:!0,toString:!0},k[b]={constructor:!0},o(_,function(e){for(var t in k)if(S.call(k,t)){var n=k[t];n[e]=S.call(n,e)}}),t.exports=r},{14:14,38:38,40:40,46:46,47:47,48:48,50:50,52:52,58:58}],57:[function(e,t,n){var r=e(22),o=e(27),i=o(r);t.exports=i},{22:22,27:27}],58:[function(e,t,n){var r=Array.prototype,o=Error.prototype,i=Object.prototype,s=i.propertyIsEnumerable,a=r.splice,u={};!function(e){var t=function(){this.x=e},n={0:e,length:e},r=[];t.prototype={valueOf:e,y:e};for(var i in new t)r.push(i);u.enumErrorProps=s.call(o,"message")||s.call(o,"name"),u.enumPrototypes=s.call(t,"prototype"),u.nonEnumShadows=!/valueOf/.test(r),u.ownLast="x"!=r[0],u.spliceObjects=(a.call(n,0,1),!n[0]),u.unindexedChars="x"[0]+Object("x")[0]!="xx"}(1,0),t.exports=u},{}],59:[function(e,t,n){function r(e){return e}t.exports=r},{}],60:[function(e,t,n){(function(n){"use strict";function r(t,n,r){var s=e(6)("algoliasearch"),a=e(44),u=e(47),c="Usage: algoliasearch(applicationID, apiKey, opts)";if(!t)throw new f.AlgoliaSearchError("Please provide an application ID. "+c);if(!n)throw new f.AlgoliaSearchError("Please provide an API key. "+c);this.applicationID=t,this.apiKey=n;var l=[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},r=r||{};var d=r.protocol||"https:",p=void 0===r.timeout?2e3:r.timeout;if(/:$/.test(d)||(d+=":"),"http:"!==r.protocol&&"https:"!==r.protocol)throw new f.AlgoliaSearchError("protocol must be `http:` or `https:` (was `"+r.protocol+"`)");r.hosts?u(r.hosts)?(this.hosts.read=a(r.hosts),this.hosts.write=a(r.hosts)):(this.hosts.read=a(r.hosts.read),this.hosts.write=a(r.hosts.write)):(this.hosts.read=[this.applicationID+"-dsn.algolia.net"].concat(l),this.hosts.write=[this.applicationID+".algolia.net"].concat(l)),this.hosts.read=o(this.hosts.read,i(d)),this.hosts.write=o(this.hosts.write,i(d)),this.requestTimeout=p,this.extraHeaders=[],this.cache={},this._ua=r._ua,this._useCache=void 0===r._useCache?!0:r._useCache,this._setTimeout=r._setTimeout,s("init done, %j",this)}function o(e,t){for(var n=[],r=0;r<e.length;++r)n.push(t(e[r],r));return n}function i(e){return function(t){return e+"//"+t.toLowerCase()}}function s(){var e="Not implemented in this environment.\nIf you feel this is a mistake, write to support@algolia.com";throw new f.AlgoliaSearchError(e)}function a(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 u(e,t){t(e,0)}function c(e,t){function n(){return r||(console.log(t),r=!0),e.apply(this,arguments)}var r=!1;return n}function l(e){if(void 0===Array.prototype.toJSON)return JSON.stringify(e);var t=Array.prototype.toJSON;delete Array.prototype.toJSON;var n=JSON.stringify(e);return Array.prototype.toJSON=t,n}t.exports=r;var f=e(66);r.prototype={deleteIndex:function(e,t){return this._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(e),hostType:"write",callback:t})},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})},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})},getLogs:function(e,t,n){return 0===arguments.length||"function"==typeof e?(n=e,e=0,t=10):(1===arguments.length||"function"==typeof t)&&(n=t,t=10),this._jsonRequest({method:"GET",url:"/1/logs?offset="+e+"&length="+t,hostType:"read",callback:n})},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})},initIndex:function(e){return new this.Index(this,e)},listUserKeys:function(e){return this._jsonRequest({method:"GET",url:"/1/keys",hostType:"read",callback:e})},getUserKeyACL:function(e,t){return this._jsonRequest({method:"GET",url:"/1/keys/"+e,hostType:"read",callback:t})},deleteUserKey:function(e,t){return this._jsonRequest({method:"DELETE",url:"/1/keys/"+e,hostType:"write",callback:t})},addUserKey:function(e,t,n){(1===arguments.length||"function"==typeof t)&&(n=t,t=null);var r={acl:e};return t&&(r.validity=t.validity,r.maxQueriesPerIPPerHour=t.maxQueriesPerIPPerHour,r.maxHitsPerQuery=t.maxHitsPerQuery,r.indexes=t.indexes,r.description=t.description,t.queryParameters&&(r.queryParameters=this._getSearchParams(t.queryParameters,"")),r.referers=t.referers),this._jsonRequest({method:"POST",url:"/1/keys",body:r,hostType:"write",callback:n})},addUserKeyWithValidity:c(function(e,t,n){return this.addUserKey(e,t,n)},a("client.addUserKeyWithValidity()","client.addUserKey()")),updateUserKey:function(e,t,n,r){(2===arguments.length||"function"==typeof n)&&(r=n,n=null);var o={acl:t};return n&&(o.validity=n.validity,o.maxQueriesPerIPPerHour=n.maxQueriesPerIPPerHour,o.maxHitsPerQuery=n.maxHitsPerQuery,o.indexes=n.indexes,o.description=n.description,n.queryParameters&&(o.queryParameters=this._getSearchParams(n.queryParameters,"")),o.referers=n.referers),this._jsonRequest({method:"PUT",url:"/1/keys/"+e,body:o,hostType:"write",callback:r})},setSecurityTags:function(e){if("[object Array]"===Object.prototype.toString.call(e)){for(var t=[],n=0;n<e.length;++n)if("[object Array]"===Object.prototype.toString.call(e[n])){for(var r=[],o=0;o<e[n].length;++o)r.push(e[n][o]);t.push("("+r.join(",")+")")}else t.push(e[n]);e=t.join(",")}this.securityTags=e},setUserToken:function(e){this.userToken=e},startQueriesBatch:c(function(){this._batch=[]},a("client.startQueriesBatch()","client.search()")),addQueryInBatch:c(function(e,t,n){this._batch.push({indexName:e,query:t,params:n})},a("client.addQueryInBatch()","client.search()")),clearCache:function(){this.cache={}},sendQueriesBatch:c(function(e){return this.search(this._batch,e)},a("client.sendQueriesBatch()","client.search()")),setRequestTimeout:function(e){e&&(this.requestTimeout=parseInt(e,10))},search:function(e,t){var n=this,r={requests:o(e,function(e){var t="";return void 0!==e.query&&(t+="query="+encodeURIComponent(e.query)),{indexName:e.indexName,params:n._getSearchParams(e.params,t)}})};return this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",body:r,hostType:"read",callback:t})},batch:function(e,t){return this._jsonRequest({method:"POST",url:"/1/indexes/*/batch",body:{requests:e},hostType:"write",callback:t})},destroy:s,enableRateLimitForward:s,disableRateLimitForward:s,useSecuredAPIKey:s,disableSecuredAPIKey:s,generateSecuredApiKey:s,Index:function(e,t){this.indexName=t,this.as=e,this.typeAheadArgs=null,this.typeAheadValueOption=null,this.cache={}},setExtraHeader:function(e,t){this.extraHeaders.push({name:e.toLowerCase(),value:t})},_sendQueriesBatch:function(e,t){function n(){for(var t="",n=0;n<e.requests.length;++n){var r="/1/indexes/"+encodeURIComponent(e.requests[n].indexName)+"?"+e.requests[n].params;t+=n+"="+encodeURIComponent(r)+"&"}return t}return this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",body:e,hostType:"read",fallback:{method:"GET",url:"/1/indexes/*",body:{params:n()}},callback:t})},_jsonRequest:function(t){function r(e,u){function p(e){var t=e&&e.body&&e.body.message&&e.body.status||e.statusCode||e&&e.body&&200;i("received response: statusCode: %s, computed statusCode: %d, headers: %j",e.statusCode,t,e.headers),n.env.DEBUG&&-1!==n.env.DEBUG.indexOf("debugBody")&&i("body: %j",e.body);var r=200===t||201===t,o=!r&&4!==Math.floor(t/100)&&1!==Math.floor(t/100);if(a._useCache&&r&&s&&(s[m]=e.body),r)return e.body;if(o)return c+=1,y();var u=new f.AlgoliaSearchError(e.body&&e.body.message);return a._promise.reject(u)}function h(n){return i("error: %s, stack: %s",n.message,n.stack),n instanceof f.AlgoliaSearchError||(n=new f.Unknown(n&&n.message,n)),c+=1,n instanceof f.Unknown||n instanceof f.UnparsableJSON||!e.fallback&&n instanceof f.Network||c>=a.hosts[t.hostType].length&&(d||!t.fallback||!a._request.fallback)?a._promise.reject(n):(a.hostIndex[t.hostType]=++a.hostIndex[t.hostType]%a.hosts[t.hostType].length,n instanceof f.RequestTimeout?y():(a._request.fallback&&!a.useFallback&&(a.useFallback=!0),r(e,u)))}function y(){return a.hostIndex[t.hostType]=++a.hostIndex[t.hostType]%a.hosts[t.hostType].length,u.timeout=a.requestTimeout*(c+1),r(e,u)}var m;if(a._useCache&&(m=t.url),a._useCache&&o&&(m+="_body_"+u.body),a._useCache&&s&&void 0!==s[m])return i("serving response from cache"),a._promise.resolve(JSON.parse(l(s[m])));if(c>=a.hosts[t.hostType].length||a.useFallback&&!d)return t.fallback&&a._request.fallback&&!d?(i("switching to fallback"),c=0,u.method=t.fallback.method,u.url=t.fallback.url,u.jsonBody=t.fallback.body,u.jsonBody&&(u.body=l(u.jsonBody)),u.timeout=a.requestTimeout*(c+1),a.hostIndex[t.hostType]=0,d=!0,r(a._request.fallback,u)):(i("could not get any response"),a._promise.reject(new f.AlgoliaSearchError("Cannot connect to the AlgoliaSearch API. Send an email to support@algolia.com to report and resolve the issue. Application id was: "+a.applicationID)));var v=a.hosts[t.hostType][a.hostIndex[t.hostType]]+u.url,g={body:o,jsonBody:t.body,method:u.method,headers:a._computeRequestHeaders(),timeout:u.timeout,debug:i};return i("method: %s, url: %s, headers: %j, timeout: %d",g.method,v,g.headers,g.timeout),e===a._request.fallback&&i("using fallback"),e.call(a,v,g).then(p,h)}var o,i=e(6)("algoliasearch:"+t.url),s=t.cache,a=this,c=0,d=!1;void 0!==t.body&&(o=l(t.body)),i("request start");var p=a.useFallback&&t.fallback,h=p?t.fallback:t,y=r(p?a._request.fallback:a._request,{url:h.url,method:h.method,body:o,jsonBody:t.body,timeout:a.requestTimeout*(c+1)});return t.callback?void y.then(function(e){u(function(){t.callback(null,e)},a._setTimeout||setTimeout)},function(e){u(function(){t.callback(e)},a._setTimeout||setTimeout)}):y},_getSearchParams:function(e,t){if(this._isUndefined(e)||null===e)return t;for(var n in e)null!==n&&void 0!==e[n]&&e.hasOwnProperty(n)&&(t+=""===t?"":"&",t+=n+"="+encodeURIComponent("[object Array]"===Object.prototype.toString.call(e[n])?l(e[n]):e[n]));return t},_isUndefined:function(e){return void 0===e},_computeRequestHeaders:function(){var t=e(11),n={"x-algolia-api-key":this.apiKey,"x-algolia-application-id":this.applicationID,"x-algolia-agent":this._ua};return this.userToken&&(n["x-algolia-usertoken"]=this.userToken),this.securityTags&&(n["x-algolia-tagfilters"]=this.securityTags),this.extraHeaders&&t(this.extraHeaders,function(e){n[e.name]=e.value}),n}},r.prototype.Index.prototype={clearCache:function(){this.cache={}},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})},addObjects:function(e,t){for(var n=this,r={requests:[]},o=0;o<e.length;++o){var i={action:"addObject",body:e[o]};r.requests.push(i)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/batch",body:r,hostType:"write",callback:t})},getObject:function(e,t,n){var r=this;(1===arguments.length||"function"==typeof t)&&(n=t,t=void 0);var o="";if(void 0!==t){o="?attributes=";for(var i=0;i<t.length;++i)0!==i&&(o+=","),o+=t[i]}return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/"+encodeURIComponent(e)+o,hostType:"read",callback:n})},getObjects:function(e,t,n){var r=this;(1===arguments.length||"function"==typeof t)&&(n=t,t=void 0);var i={requests:o(e,function(e){var n={indexName:r.indexName,objectID:e};return t&&(n.attributesToRetrieve=t.join(",")),n})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/*/objects",hostType:"read",body:i,callback:n})},partialUpdateObject:function(e,t){var n=this;return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/"+encodeURIComponent(e.objectID)+"/partial",body:e,hostType:"write",callback:t})},partialUpdateObjects:function(e,t){for(var n=this,r={requests:[]},o=0;o<e.length;++o){var i={action:"partialUpdateObject",objectID:e[o].objectID,body:e[o]};r.requests.push(i)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/batch",body:r,hostType:"write",callback:t})},saveObject:function(e,t){var n=this;return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/"+encodeURIComponent(e.objectID),body:e,hostType:"write",callback:t})},saveObjects:function(e,t){for(var n=this,r={requests:[]},o=0;o<e.length;++o){var i={action:"updateObject",objectID:e[o].objectID,body:e[o]};r.requests.push(i)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/batch",body:r,hostType:"write",callback:t})},deleteObject:function(e,t){if("function"==typeof e||"string"!=typeof e&&"number"!=typeof e){var n=new f.AlgoliaSearchError("Cannot delete an object without an objectID");return t=e,"function"==typeof t?t(n):this.as._promise.reject(n)}var r=this;return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/"+encodeURIComponent(e),hostType:"write",callback:t})},deleteObjects:function(e,t){var n=this,r={requests:o(e,function(e){return{action:"deleteObject",objectID:e,body:{objectID:e}}})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/batch",body:r,hostType:"write",callback:t})},deleteByQuery:function(e,t,n){function r(e){if(0===e.nbHits)return e;var t=o(e.hits,function(e){return e.objectID});return l.deleteObjects(t).then(i).then(s)}function i(e){return l.waitTask(e.taskID)}function s(){return l.deleteByQuery(e,t)}function a(){u(function(){n(null)},f._setTimeout||setTimeout)}function c(e){u(function(){n(e)},f._setTimeout||setTimeout)}var l=this,f=l.as;(1===arguments.length||"function"==typeof t)&&(n=t,t={}),t.attributesToRetrieve="objectID",t.hitsPerPage=1e3,this.clearCache();var d=this.search(e,t).then(r);return n?void d.then(a,c):d},search:function(e,t,n){if("function"==typeof e&&"object"==typeof t||"object"==typeof n)throw new f.AlgoliaSearchError("index.search usage is index.search(query, params, cb)");0===arguments.length||"function"==typeof e?(n=e,e=""):(1===arguments.length||"function"==typeof t)&&(n=t,t=void 0),"object"==typeof e&&null!==e?(t=e,e=void 0):(void 0===e||null===e)&&(e="");var r="";return void 0!==e&&(r+="query="+encodeURIComponent(e)),void 0!==t&&(r=this.as._getSearchParams(t,r)),this._search(r,n)},browse:function(t,n,r){var o,i,s=e(57),a=this;0===arguments.length||1===arguments.length&&"function"==typeof arguments[0]?(o=0,r=arguments[0],t=void 0):"number"==typeof arguments[0]?(o=arguments[0],"number"==typeof arguments[1]?i=arguments[1]:"function"==typeof arguments[1]&&(r=arguments[1],i=void 0),t=void 0,n=void 0):"object"==typeof arguments[0]?("function"==typeof arguments[1]&&(r=arguments[1]),n=arguments[0],t=void 0):"string"==typeof arguments[0]&&"function"==typeof arguments[1]&&(r=arguments[1],n=void 0),n=s({},n||{},{page:o,hitsPerPage:i,query:t});var u=this.as._getSearchParams(n,"");return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(a.indexName)+"/browse?"+u,hostType:"read",callback:r})},browseFrom:function(e,t){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse?cursor="+encodeURIComponent(e),hostType:"read",callback:t})},browseAll:function(t,n){function r(e){if(!a._stopped){var t;t=void 0!==e?"cursor="+encodeURIComponent(e):l,u._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(c.indexName)+"/browse?"+t,hostType:"read",callback:o})}}function o(e,t){return a._stopped?void 0:e?void a._error(e):(a._result(t),void 0===t.cursor?void a._end():void r(t.cursor))}"object"==typeof t&&(n=t,t=void 0);var i=e(57),s=e(61),a=new s,u=this.as,c=this,l=u._getSearchParams(i({},n||{},{query:t}),"");return r(),a},ttAdapter:function(e){var t=this;return function(n,r,o){var i;i="function"==typeof o?o:r,t.search(n,e,function(e,t){return e?void i(e):void i(t.hits)})}},waitTask:function(e,t){function n(){return l._jsonRequest({method:"GET",hostType:"read",url:"/1/indexes/"+encodeURIComponent(c.indexName)+"/task/"+e}).then(function(e){a++;var t=i*a*a;return t>s&&(t=s),"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,s=5e3,a=0,c=this,l=c.as,f=n();return t?void f.then(r,o):f},clearIndex:function(e){var t=this;return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/clear",hostType:"write",callback:e})},getSettings:function(e){var t=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/settings",hostType:"read",callback:e})},setSettings:function(e,t){var n=this;return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/settings",hostType:"write",body:e,callback:t})},listUserKeys:function(e){var t=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/keys",hostType:"read",callback:e})},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})},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})},addUserKey:function(e,t,n){(1===arguments.length||"function"==typeof t)&&(n=t,t=null);var r={acl:e};return t&&(r.validity=t.validity,r.maxQueriesPerIPPerHour=t.maxQueriesPerIPPerHour,r.maxHitsPerQuery=t.maxHitsPerQuery,r.description=t.description,t.queryParameters&&(r.queryParameters=this.as._getSearchParams(t.queryParameters,"")),r.referers=t.referers),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",body:r,hostType:"write",callback:n})},addUserKeyWithValidity:c(function(e,t,n){return this.addUserKey(e,t,n)},a("index.addUserKeyWithValidity()","index.addUserKey()")),updateUserKey:function(e,t,n,r){(2===arguments.length||"function"==typeof n)&&(r=n,n=null);var o={acl:t};return n&&(o.validity=n.validity,o.maxQueriesPerIPPerHour=n.maxQueriesPerIPPerHour,o.maxHitsPerQuery=n.maxHitsPerQuery,o.description=n.description,n.queryParameters&&(o.queryParameters=this.as._getSearchParams(n.queryParameters,"")),o.referers=n.referers),this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+e,body:o,hostType:"write",callback:r})},_search:function(e,t){return this.as._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/query",body:{params:e},hostType:"read",fallback:{method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName),body:{params:e}},callback:t})},as:null,indexName:null,typeAheadArgs:null,typeAheadValueOption:null}}).call(this,e(2))},{11:11,2:2,44:44,47:47,57:57,6:6,61:61,66:66}],61:[function(e,t,n){"use strict";function r(){}t.exports=r;var o=e(10),i=e(1).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")}},{1:1,10:10}],62:[function(e,t,n){"use strict";function r(t,n,i){var s=e(45),a=e(63);return i=s(i||{}),void 0===i.protocol&&(i.protocol=a()),i._ua=i._ua||r.ua,new o(t,n,i)}function o(){a.apply(this,arguments)}t.exports=r;var i=e(10),s=window.Promise||e(9).Promise,a=e(60),u=e(66),c=e(64),l=e(65);r.version=e(67),r.ua="Algolia for vanilla JavaScript "+r.version,window.__algolia={debug:e(6),algoliasearch:r};var f={hasXMLHttpRequest:"XMLHttpRequest"in window,hasXDomainRequest:"XDomainRequest"in window,cors:"withCredentials"in new XMLHttpRequest,timeout:"timeout"in new XMLHttpRequest};i(o,a),o.prototype._request=function(e,t){return new s(function(n,r){function o(){if(!l){f.timeout||clearTimeout(a);var e;try{e={body:JSON.parse(p.responseText),statusCode:p.status,headers:p.getAllResponseHeaders&&p.getAllResponseHeaders()||{}}}catch(t){e=new u.UnparsableJSON({more:p.responseText})}e instanceof u.UnparsableJSON?r(e):n(e)}}function i(e){l||(f.timeout||clearTimeout(a),r(new u.Network({more:e})))}function s(){f.timeout||(l=!0,p.abort()),r(new u.RequestTimeout)}if(!f.cors&&!f.hasXDomainRequest)return void r(new u.Network("CORS not supported"));e=c(e,t.headers);var a,l,d=t.body,p=f.cors?new XMLHttpRequest:new XDomainRequest;p instanceof XMLHttpRequest?p.open(t.method,e,!0):p.open(t.method,e),f.cors&&(d&&("POST"===t.method?p.setRequestHeader("content-type","application/x-www-form-urlencoded"):p.setRequestHeader("content-type","application/json")),p.setRequestHeader("accept","application/json")),p.onprogress=function(){},p.onload=o,p.onerror=i,f.timeout?(p.timeout=t.timeout,p.ontimeout=s):a=setTimeout(s,t.timeout),p.send(d)})},o.prototype._request.fallback=function(e,t){return e=c(e,t.headers),new s(function(n,r){l(e,t,function(e,t){return e?void r(e):void n(t)})})},o.prototype._promise={reject:function(e){return s.reject(e)},resolve:function(e){return s.resolve(e)},delay:function(e){return new s(function(t){setTimeout(t,e)})}}},{10:10,45:45,6:6,60:60,63:63,64:64,65:65,66:66,67:67,9:9}],63:[function(e,t,n){"use strict";function r(){var e=window.document.location.protocol;return"http:"!==e&&"https:"!==e&&(e="http:"),e}t.exports=r},{}],64:[function(e,t,n){"use strict";function r(e,t){return e+=/\?/.test(e)?"&":"?",e+o.encode(t)}t.exports=r;var o=e(5)},{5:5}],65:[function(e,t,n){"use strict";function r(e,t,n){function r(){t.debug("JSONP: success"),y||f||(y=!0,l||(t.debug("JSONP: Fail. Script loaded but did not call the callback"),a(),n(new o.JSONPScriptFail)))}function s(){("loaded"===this.readyState||"complete"===this.readyState)&&r()}function a(){clearTimeout(m),p.onload=null,p.onreadystatechange=null,p.onerror=null,d.removeChild(p);try{delete window[h],delete window[h+"_loaded"]}catch(e){window[h]=null,window[h+"_loaded"]=null}}function u(){t.debug("JSONP: Script timeout"),f=!0,a(),n(new o.RequestTimeout)}function c(){t.debug("JSONP: Script error"),y||f||(a(),n(new o.JSONPScriptError))}if("GET"!==t.method)return void n(new Error("Method "+t.method+" "+e+" is not supported by JSONP."));t.debug("JSONP: start");var l=!1,f=!1;i+=1;var d=document.getElementsByTagName("head")[0],p=document.createElement("script"),h="algoliaJSONP_"+i,y=!1;window[h]=function(e){try{delete window[h]}catch(t){window[h]=void 0}f||(l=!0,a(),n(null,{body:e}))},e+="&callback="+h,t.jsonBody&&t.jsonBody.params&&(e+="&"+t.jsonBody.params);var m=setTimeout(u,t.timeout);p.onreadystatechange=s,p.onload=r,p.onerror=c,p.async=!0,p.defer=!0,p.src=e,d.appendChild(p)}t.exports=r;var o=e(66),i=0},{66:66}],66:[function(e,t,n){"use strict";function r(t,n){var r=e(11),o=this;"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):o.stack=(new Error).stack||"Cannot get a stacktrace, browser is too old",this.name=this.constructor.name,this.message=t||"Unknown error",n&&r(n,function(e,t){o[t]=e})}function o(e,t){function n(){var n=Array.prototype.slice.call(arguments,0);"string"!=typeof n[0]&&n.unshift(t),r.apply(this,n),this.name="AlgoliaSearch"+e+"Error"}return i(n,r),n}var i=e(10);i(r,Error),t.exports={AlgoliaSearchError:r,UnparsableJSON:o("UnparsableJSON","Could not parse the incoming response as JSON, see err.more for details"),RequestTimeout:o("RequestTimeout","Request timedout before getting a response"),Network:o("Network","Network issue, see err.more for details"),JSONPScriptFail:o("JSONPScriptFail","<script> was loaded but did not call our provided callback"),JSONPScriptError:o("JSONPScriptError","<script> unable to load due to an `error` event on it"),Unknown:o("Unknown","Unknown error occured")}},{10:10,11:11}],67:[function(e,t,n){t.exports="3.7.6"},{}]},{},[62])(62)}); |
{ | ||
"name": "algoliasearch", | ||
"version": "3.7.5", | ||
"version": "3.7.6", | ||
"description": "AlgoliaSearch API JavaScript client", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -16,2 +16,4 @@ # Algolia Search API Client for JavaScript | ||
[Algolia Search](http://www.algolia.com) is a hosted full-text, numerical, and faceted search engine capable of delivering realtime results from the first keystroke. | ||
@@ -352,3 +354,3 @@ | ||
- `hosts.write` array of write hosts to use to call Algolia servers, computed automatically | ||
- `httpAgent` <sup>node-only</sup> [Node.js httpAgent](https://nodejs.org/api/http.html#http_class_http_agent) to use when communicating with Algolia servers. | ||
- `httpAgent` <sup>node-only</sup> [Node.js httpAgent](https://nodejs.org/api/http.html#http_class_http_agent) to use when communicating with Algolia servers. | ||
@@ -622,2 +624,4 @@ To pass an option, use: | ||
The search query allows only to retrieve 1000 hits, if you need to retrieve more than 1000 hits for seo, you can use [Backup / Retrieve all index content](#backup--retrieve-of-all-index-content) | ||
You can use the following optional arguments: | ||
@@ -637,3 +641,3 @@ | ||
* **firstWords**: When a query does not return any results, the first word will be added as optional. The process is repeated with second word, third word, ... until there are results. | ||
* **allOptional**: When a query does not return any results, a second trial will be made with all words as optional. This is equivalent to transforming the AND operand between query terms to an OR operand. | ||
* **allOptional**: When a query does not return any results, a second trial will be made with all words as optional. This is equivalent to transforming the AND operand between query terms to an OR operand. | ||
* **none**: No specific processing is done when a query does not return any results (default behavior). | ||
@@ -772,2 +776,5 @@ * **minWordSizefor1Typo**: The minimum number of characters in a query word to accept one typo in this word.<br/>Defaults to 4. | ||
Multiple queries | ||
@@ -1044,3 +1051,3 @@ -------------- | ||
You may want to perform multiple operations with one API call to reduce latency. | ||
We expose three methods to perform batch operations: | ||
We expose four methods to perform batch operations: | ||
* `addObjects`: Add an array of objects using automatic `objectID` assignment. | ||
@@ -1403,2 +1410,7 @@ * `saveObjects`: Add or update an array of objects that contains an `objectID` attribute. | ||
// browser.stop(); | ||
// Retrieve the next cursor from the browse method | ||
index.browse(query, function(err, content) { | ||
console.log(content[cursor]); | ||
}); | ||
``` | ||
@@ -1405,0 +1417,0 @@ |
@@ -1,1 +0,1 @@ | ||
"3.7.5" | ||
"3.7.6" |
@@ -32,4 +32,5 @@ 'use strict'; | ||
var appId = process.env.INTEGRATION_TEST_APPID; | ||
var indexName = (process.env.TRAVIS_BUILD_NUMBER || | ||
'JS-integration-tests-') + chance.word({length: 12}); | ||
var indexName = '_travis-algoliasearch-client-js' + | ||
(process.env.TRAVIS_BUILD_NUMBER || 'DEV') + | ||
chance.word({length: 12}); | ||
@@ -36,0 +37,0 @@ var client = algoliasearch(appId, apiKey, { |
@@ -279,2 +279,8 @@ 'use strict'; | ||
if (!fauxJax.support.xhr.cors) { | ||
// IE9 has XHR but no cors, skip this test | ||
t.pass('skipping this test for browsers not using CORS, unneeded and false positive'); | ||
return; | ||
} | ||
// load AngularJS Algolia Search module | ||
@@ -281,0 +287,0 @@ require('../../../src/browser/builds/algoliasearch.angular'); |
@@ -18,2 +18,17 @@ 'use strict'; | ||
} | ||
}, { | ||
object: 'index', | ||
methodName: 'browseFrom', | ||
testName: 'index.browseFrom(cursor, cb)', | ||
callArguments: ['=&"dsa'], | ||
action: 'read', | ||
expectedRequest: { | ||
method: 'GET', | ||
URL: { | ||
pathname: '/1/indexes/%s/browse', | ||
query: { | ||
cursor: '=&"dsa' | ||
} | ||
} | ||
} | ||
}]; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1370797
31944
1472
16